Changeset 2685542
- Timestamp:
- 02/27/2022 09:38:53 AM (4 years ago)
- Location:
- wpstoreapp-spellcheck
- Files:
-
- 16 added
- 8 deleted
- 10 edited
- 1 copied
-
assets/icon-128x128.png (modified) (1 prop) (previous)
-
assets/icon-256x256.png (modified) (1 prop) (previous)
-
tags/0.0.3 (copied) (copied from wpstoreapp-spellcheck/trunk)
-
tags/0.0.3/.distignore (added)
-
tags/0.0.3/.github (added)
-
tags/0.0.3/.github/workflows (added)
-
tags/0.0.3/.github/workflows/publish-to-wordpress-org.yml (added)
-
tags/0.0.3/.gitignore (added)
-
tags/0.0.3/WPStoreApp_API.php (added)
-
tags/0.0.3/WPStoreApp_Gutenberg.php (added)
-
tags/0.0.3/WPStoreApp_Option.php (added)
-
tags/0.0.3/WPStore_API.php (deleted)
-
tags/0.0.3/WPStore_Gutenberg.php (deleted)
-
tags/0.0.3/WPStore_Option.php (deleted)
-
tags/0.0.3/build/index.asset.php (modified) (1 diff)
-
tags/0.0.3/build/index.js (modified) (1 diff)
-
tags/0.0.3/package.json (deleted)
-
tags/0.0.3/readme.txt (modified) (1 diff)
-
tags/0.0.3/wpstore-spellcheck.php (modified) (2 diffs)
-
trunk/.distignore (added)
-
trunk/.github (added)
-
trunk/.github/workflows (added)
-
trunk/.github/workflows/publish-to-wordpress-org.yml (added)
-
trunk/.gitignore (added)
-
trunk/WPStoreApp_API.php (added)
-
trunk/WPStoreApp_Gutenberg.php (added)
-
trunk/WPStoreApp_Option.php (added)
-
trunk/WPStore_API.php (deleted)
-
trunk/WPStore_Gutenberg.php (deleted)
-
trunk/WPStore_Option.php (deleted)
-
trunk/build/index.asset.php (modified) (1 diff)
-
trunk/build/index.js (modified) (1 diff)
-
trunk/package.json (deleted)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/wpstore-spellcheck.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpstoreapp-spellcheck/assets/icon-128x128.png
-
Property
svn:mime-type
changed from
application/octet-streamtoimage/png
-
Property
svn:mime-type
changed from
-
wpstoreapp-spellcheck/assets/icon-256x256.png
-
Property
svn:mime-type
changed from
application/octet-streamtoimage/png
-
Property
svn:mime-type
changed from
-
wpstoreapp-spellcheck/tags/0.0.3/build/index.asset.php
r2685214 r2685542 1 <?php return array('dependencies' => array('wp-api-fetch', 'wp-blocks', 'wp-components', 'wp- data', 'wp-edit-post', 'wp-element', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => '84513d934c67e76d55f6a42ba8c3cce1');1 <?php return array('dependencies' => array('wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => '074af1f03b1085936ff1af08f2e99946'); -
wpstoreapp-spellcheck/tags/0.0.3/build/index.js
r2685214 r2685542 1 !function(){"use strict";var e={n:function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.wp.element,n=window.wp.editPost,r=window.wp.plugins,l=window.wp.components,a=window.wp.primitives,o=(0,t.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(a.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),c=window.wp.apiFetch,i=e.n(c),d=window.wp.data,s=window.wp.blocks ;(0,r.registerPlugin)("chinese-spell-check",{icon:o,render:()=>{const[e,r]=(0,t.useState)([]),[a,o]=(0,t.useState)(0);return(0,d.subscribe)((()=>{const e=(0,d.select)("core/editor"),t=(0,s.parse)(e.getEditedPostContent());if(0===t.length)return;const n=t.map((e=>"core/paragraph"===e.name||"core/heading"===e.name?e.attributes.content.length:0)).reduce(((e,t)=>e+t));o(n)})),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(n.PluginSidebarMoreMenuItem,{target:"sidebar-name"},"中文语法检查"),(0,t.createElement)(n.PluginSidebar,{name:"chinese-spell-check",title:"中文语法检查"},(0,t.createElement)(l.Panel,null,(0,t.createElement)(l.PanelBody,{title:"文章基本信息",opened:!0},(0,t.createElement)(l.PanelRow,null,(0,t.createElement)(l.Tip,null,(0,t.createElement)("p",null,"当前仅支持全文检查"))),(0,t.createElement)(l.PanelRow,null,"本文全文共",a,"字"),(0,t.createElement)(l.PanelRow,null,(0,t.createElement)(l.Button,{variant:"primary",style:{},onClick:async()=>{r([]);const e=(0,d.select)("core/editor"),t=(0,s.parse)(e.getEditedPostContent()).map((e=>"core/paragraph"===e.name||"core/heading"===e.name?e.attributes.content:0)).reduce(((e,t)=>e+t)),n=await i()({path:"chinese-spell-check/v1/check",method:"POST",data:{content:t}});0==n.code?n.data.length&&r(n.data):alert(n.msg)}},"检查全文"))),(0,t.createElement)(l.PanelBody,{title:"拼写检查结果",opened:!0},(()=>{const n={char:"别字",word:"错词",redund:"冗余",order:"乱序",miss:"缺失",dapei:"搭配",punc:"标点",idm:"成语",org_R:"机构名字词冗余",leader:"领导人"};return 0===e.length?(0,t.createElement)(l.PanelRow,null,"暂无结果,请点击上方检查全文获取检查结果"):e.map((e=>(0,t.createElement)(l.PanelRow,null,(0,t.createElement)("div",null,(0,t.createElement)(l.Icon,{icon:(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",style:{verticalAlign:"middle"},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},(0,t.createElement)("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})),size:24}),(0,t.createElement)("strong",null,n[e[3]])),(0,t.createElement)("div",null,(0,t.createElement)("mark",null,e[1]),"应改为",(0,t.createElement)("mark",null,e[2]?e[2]:"__")))))})))))}})}();1 !function(){"use strict";var e={n:function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.wp.element,n=window.wp.editPost,r=window.wp.plugins,l=window.wp.components,a=window.wp.primitives,o=(0,t.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(a.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),c=window.wp.apiFetch,i=e.n(c),d=window.wp.data,s=window.wp.blocks,u=window.wp.compose;(0,r.registerPlugin)("chinese-spell-check",{icon:o,render:()=>{const[e,r]=(0,t.useState)([]),[a,o]=(0,t.useState)(0),c=(0,u.useDebounce)((0,t.useCallback)((()=>{const e=(0,d.select)("core/editor"),t=(0,s.parse)(e.getEditedPostContent());if(0===t.length)return;const n=t.map((e=>"core/paragraph"===e.name||"core/heading"===e.name?e.attributes.content.length:0)).reduce(((e,t)=>e+t));o(n)})),500);return(0,d.subscribe)(c),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(n.PluginSidebarMoreMenuItem,{target:"sidebar-name"},"中文语法检查"),(0,t.createElement)(n.PluginSidebar,{name:"chinese-spell-check",title:"中文语法检查"},(0,t.createElement)(l.Panel,null,(0,t.createElement)(l.PanelBody,{title:"文章基本信息",opened:!0},(0,t.createElement)(l.PanelRow,null,(0,t.createElement)(l.Tip,null,(0,t.createElement)("p",null,"当前仅支持全文检查"))),(0,t.createElement)(l.PanelRow,null,"本文全文共",a,"字"),(0,t.createElement)(l.PanelRow,null,(0,t.createElement)(l.Button,{variant:"primary",style:{},onClick:async()=>{r([]);const e=(0,d.select)("core/editor"),t=(0,s.parse)(e.getEditedPostContent()).map((e=>"core/paragraph"===e.name||"core/heading"===e.name?e.attributes.content:0)).reduce(((e,t)=>e+t)),n=await i()({path:"chinese-spell-check/v1/check",method:"POST",data:{content:t}});0==n.code?n.data.length&&r(n.data):alert(n.msg)}},"检查全文"))),(0,t.createElement)(l.PanelBody,{title:"拼写检查结果",opened:!0},(()=>{const n={char:"别字",word:"错词",redund:"冗余",order:"乱序",miss:"缺失",dapei:"搭配",punc:"标点",idm:"成语",org_R:"机构名字词冗余",leader:"领导人"};return 0===e.length?(0,t.createElement)(l.PanelRow,null,"暂无结果,请点击上方检查全文获取检查结果"):e.map((e=>(0,t.createElement)(l.PanelRow,null,(0,t.createElement)("div",null,(0,t.createElement)(l.Icon,{icon:(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",style:{verticalAlign:"middle"},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},(0,t.createElement)("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})),size:24}),(0,t.createElement)("strong",null,n[e[3]])),(0,t.createElement)("div",null,(0,t.createElement)("mark",null,e[1]),"应改为",(0,t.createElement)("mark",null,e[2]?e[2]:"__")))))})))))}})}(); -
wpstoreapp-spellcheck/tags/0.0.3/readme.txt
r2685475 r2685542 5 5 Requires at least: 5.0 6 6 Tested up to: 5.9 7 Stable tag: 0.0. 17 Stable tag: 0.0.3 8 8 Requires PHP: 8.0 9 9 License: GPLv2 -
wpstoreapp-spellcheck/tags/0.0.3/wpstore-spellcheck.php
r2685467 r2685542 1 1 <?php 2 3 2 /* 4 3 Plugin Name: WPStore.app Spell Check 5 4 Plugin URI: https://www.wpstore.app/?p=291 6 Description: Check Text Syntax in Chinese7 Version: 0.0. 15 Description: 为中国作者定制的中文语法检查插件,识别你的文章中的「的地得」错误,帮你纠正文章中的基本错误。 6 Version: 0.0.3 8 7 Author: WPStore.app Team 9 8 Author URI: https://wpstore.app … … 14 13 Domain Path: /languages 15 14 */ 16 if (!class_exists("WPS_SpellCheck")) { 17 require_once "WPStore_Option.php"; 18 require_once "WPStore_API.php"; 19 require_once "WPStore_Gutenberg.php"; 20 class WPS_SpellCheck 15 16 if (!class_exists( "WPStoreApp_SpellCheck" )) { 17 require_once "WPStoreApp_Option.php"; 18 require_once "WPStoreApp_API.php"; 19 require_once "WPStoreApp_Gutenberg.php"; 20 class WPStoreApp_SpellCheck 21 21 { 22 22 public function init() 23 23 { 24 WPStore _Option::init();25 WPStore _API::init();26 WPStore _Gutenberg::init();24 WPStoreApp_Option::init(); 25 WPStoreApp_API::init(); 26 WPStoreApp_Gutenberg::init(); 27 27 } 28 28 } 29 $instance = new WPS _SpellCheck();29 $instance = new WPStoreApp_SpellCheck(); 30 30 $instance->init(); 31 31 } -
wpstoreapp-spellcheck/trunk/build/index.asset.php
r2685214 r2685542 1 <?php return array('dependencies' => array('wp-api-fetch', 'wp-blocks', 'wp-components', 'wp- data', 'wp-edit-post', 'wp-element', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => '84513d934c67e76d55f6a42ba8c3cce1');1 <?php return array('dependencies' => array('wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => '074af1f03b1085936ff1af08f2e99946'); -
wpstoreapp-spellcheck/trunk/build/index.js
r2685214 r2685542 1 !function(){"use strict";var e={n:function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.wp.element,n=window.wp.editPost,r=window.wp.plugins,l=window.wp.components,a=window.wp.primitives,o=(0,t.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(a.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),c=window.wp.apiFetch,i=e.n(c),d=window.wp.data,s=window.wp.blocks ;(0,r.registerPlugin)("chinese-spell-check",{icon:o,render:()=>{const[e,r]=(0,t.useState)([]),[a,o]=(0,t.useState)(0);return(0,d.subscribe)((()=>{const e=(0,d.select)("core/editor"),t=(0,s.parse)(e.getEditedPostContent());if(0===t.length)return;const n=t.map((e=>"core/paragraph"===e.name||"core/heading"===e.name?e.attributes.content.length:0)).reduce(((e,t)=>e+t));o(n)})),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(n.PluginSidebarMoreMenuItem,{target:"sidebar-name"},"中文语法检查"),(0,t.createElement)(n.PluginSidebar,{name:"chinese-spell-check",title:"中文语法检查"},(0,t.createElement)(l.Panel,null,(0,t.createElement)(l.PanelBody,{title:"文章基本信息",opened:!0},(0,t.createElement)(l.PanelRow,null,(0,t.createElement)(l.Tip,null,(0,t.createElement)("p",null,"当前仅支持全文检查"))),(0,t.createElement)(l.PanelRow,null,"本文全文共",a,"字"),(0,t.createElement)(l.PanelRow,null,(0,t.createElement)(l.Button,{variant:"primary",style:{},onClick:async()=>{r([]);const e=(0,d.select)("core/editor"),t=(0,s.parse)(e.getEditedPostContent()).map((e=>"core/paragraph"===e.name||"core/heading"===e.name?e.attributes.content:0)).reduce(((e,t)=>e+t)),n=await i()({path:"chinese-spell-check/v1/check",method:"POST",data:{content:t}});0==n.code?n.data.length&&r(n.data):alert(n.msg)}},"检查全文"))),(0,t.createElement)(l.PanelBody,{title:"拼写检查结果",opened:!0},(()=>{const n={char:"别字",word:"错词",redund:"冗余",order:"乱序",miss:"缺失",dapei:"搭配",punc:"标点",idm:"成语",org_R:"机构名字词冗余",leader:"领导人"};return 0===e.length?(0,t.createElement)(l.PanelRow,null,"暂无结果,请点击上方检查全文获取检查结果"):e.map((e=>(0,t.createElement)(l.PanelRow,null,(0,t.createElement)("div",null,(0,t.createElement)(l.Icon,{icon:(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",style:{verticalAlign:"middle"},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},(0,t.createElement)("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})),size:24}),(0,t.createElement)("strong",null,n[e[3]])),(0,t.createElement)("div",null,(0,t.createElement)("mark",null,e[1]),"应改为",(0,t.createElement)("mark",null,e[2]?e[2]:"__")))))})))))}})}();1 !function(){"use strict";var e={n:function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.wp.element,n=window.wp.editPost,r=window.wp.plugins,l=window.wp.components,a=window.wp.primitives,o=(0,t.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(a.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),c=window.wp.apiFetch,i=e.n(c),d=window.wp.data,s=window.wp.blocks,u=window.wp.compose;(0,r.registerPlugin)("chinese-spell-check",{icon:o,render:()=>{const[e,r]=(0,t.useState)([]),[a,o]=(0,t.useState)(0),c=(0,u.useDebounce)((0,t.useCallback)((()=>{const e=(0,d.select)("core/editor"),t=(0,s.parse)(e.getEditedPostContent());if(0===t.length)return;const n=t.map((e=>"core/paragraph"===e.name||"core/heading"===e.name?e.attributes.content.length:0)).reduce(((e,t)=>e+t));o(n)})),500);return(0,d.subscribe)(c),(0,t.createElement)(t.Fragment,null,(0,t.createElement)(n.PluginSidebarMoreMenuItem,{target:"sidebar-name"},"中文语法检查"),(0,t.createElement)(n.PluginSidebar,{name:"chinese-spell-check",title:"中文语法检查"},(0,t.createElement)(l.Panel,null,(0,t.createElement)(l.PanelBody,{title:"文章基本信息",opened:!0},(0,t.createElement)(l.PanelRow,null,(0,t.createElement)(l.Tip,null,(0,t.createElement)("p",null,"当前仅支持全文检查"))),(0,t.createElement)(l.PanelRow,null,"本文全文共",a,"字"),(0,t.createElement)(l.PanelRow,null,(0,t.createElement)(l.Button,{variant:"primary",style:{},onClick:async()=>{r([]);const e=(0,d.select)("core/editor"),t=(0,s.parse)(e.getEditedPostContent()).map((e=>"core/paragraph"===e.name||"core/heading"===e.name?e.attributes.content:0)).reduce(((e,t)=>e+t)),n=await i()({path:"chinese-spell-check/v1/check",method:"POST",data:{content:t}});0==n.code?n.data.length&&r(n.data):alert(n.msg)}},"检查全文"))),(0,t.createElement)(l.PanelBody,{title:"拼写检查结果",opened:!0},(()=>{const n={char:"别字",word:"错词",redund:"冗余",order:"乱序",miss:"缺失",dapei:"搭配",punc:"标点",idm:"成语",org_R:"机构名字词冗余",leader:"领导人"};return 0===e.length?(0,t.createElement)(l.PanelRow,null,"暂无结果,请点击上方检查全文获取检查结果"):e.map((e=>(0,t.createElement)(l.PanelRow,null,(0,t.createElement)("div",null,(0,t.createElement)(l.Icon,{icon:(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",style:{verticalAlign:"middle"},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},(0,t.createElement)("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})),size:24}),(0,t.createElement)("strong",null,n[e[3]])),(0,t.createElement)("div",null,(0,t.createElement)("mark",null,e[1]),"应改为",(0,t.createElement)("mark",null,e[2]?e[2]:"__")))))})))))}})}(); -
wpstoreapp-spellcheck/trunk/readme.txt
r2685475 r2685542 5 5 Requires at least: 5.0 6 6 Tested up to: 5.9 7 Stable tag: 0.0. 17 Stable tag: 0.0.3 8 8 Requires PHP: 8.0 9 9 License: GPLv2 -
wpstoreapp-spellcheck/trunk/wpstore-spellcheck.php
r2685467 r2685542 1 1 <?php 2 3 2 /* 4 3 Plugin Name: WPStore.app Spell Check 5 4 Plugin URI: https://www.wpstore.app/?p=291 6 Description: Check Text Syntax in Chinese7 Version: 0.0. 15 Description: 为中国作者定制的中文语法检查插件,识别你的文章中的「的地得」错误,帮你纠正文章中的基本错误。 6 Version: 0.0.3 8 7 Author: WPStore.app Team 9 8 Author URI: https://wpstore.app … … 14 13 Domain Path: /languages 15 14 */ 16 if (!class_exists("WPS_SpellCheck")) { 17 require_once "WPStore_Option.php"; 18 require_once "WPStore_API.php"; 19 require_once "WPStore_Gutenberg.php"; 20 class WPS_SpellCheck 15 16 if (!class_exists( "WPStoreApp_SpellCheck" )) { 17 require_once "WPStoreApp_Option.php"; 18 require_once "WPStoreApp_API.php"; 19 require_once "WPStoreApp_Gutenberg.php"; 20 class WPStoreApp_SpellCheck 21 21 { 22 22 public function init() 23 23 { 24 WPStore _Option::init();25 WPStore _API::init();26 WPStore _Gutenberg::init();24 WPStoreApp_Option::init(); 25 WPStoreApp_API::init(); 26 WPStoreApp_Gutenberg::init(); 27 27 } 28 28 } 29 $instance = new WPS _SpellCheck();29 $instance = new WPStoreApp_SpellCheck(); 30 30 $instance->init(); 31 31 }
Note: See TracChangeset
for help on using the changeset viewer.