Plugin Directory

Changeset 2685542


Ignore:
Timestamp:
02/27/2022 09:38:53 AM (4 years ago)
Author:
bestony
Message:

Update to version 0.0.3 from GitHub

Location:
wpstoreapp-spellcheck
Files:
16 added
8 deleted
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wpstoreapp-spellcheck/assets/icon-128x128.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • wpstoreapp-spellcheck/assets/icon-256x256.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • 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  
    55Requires at least: 5.0
    66Tested up to: 5.9
    7 Stable tag: 0.0.1
     7Stable tag: 0.0.3
    88Requires PHP: 8.0
    99License: GPLv2
  • wpstoreapp-spellcheck/tags/0.0.3/wpstore-spellcheck.php

    r2685467 r2685542  
    11<?php
    2 
    32/*
    43Plugin Name: WPStore.app Spell Check
    54Plugin URI: https://www.wpstore.app/?p=291
    6 Description: Check Text Syntax in Chinese
    7 Version: 0.0.1
     5Description: 为中国作者定制的中文语法检查插件,识别你的文章中的「的地得」错误,帮你纠正文章中的基本错误。
     6Version: 0.0.3
    87Author: WPStore.app Team
    98Author URI: https://wpstore.app
     
    1413Domain Path: /languages
    1514*/
    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
     16if (!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
    2121    {
    2222        public function init()
    2323        {
    24             WPStore_Option::init();
    25             WPStore_API::init();
    26             WPStore_Gutenberg::init();
     24            WPStoreApp_Option::init();
     25            WPStoreApp_API::init();
     26            WPStoreApp_Gutenberg::init();
    2727        }
    2828    }
    29     $instance = new WPS_SpellCheck();
     29    $instance = new WPStoreApp_SpellCheck();
    3030    $instance->init();
    3131}
  • 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  
    55Requires at least: 5.0
    66Tested up to: 5.9
    7 Stable tag: 0.0.1
     7Stable tag: 0.0.3
    88Requires PHP: 8.0
    99License: GPLv2
  • wpstoreapp-spellcheck/trunk/wpstore-spellcheck.php

    r2685467 r2685542  
    11<?php
    2 
    32/*
    43Plugin Name: WPStore.app Spell Check
    54Plugin URI: https://www.wpstore.app/?p=291
    6 Description: Check Text Syntax in Chinese
    7 Version: 0.0.1
     5Description: 为中国作者定制的中文语法检查插件,识别你的文章中的「的地得」错误,帮你纠正文章中的基本错误。
     6Version: 0.0.3
    87Author: WPStore.app Team
    98Author URI: https://wpstore.app
     
    1413Domain Path: /languages
    1514*/
    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
     16if (!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
    2121    {
    2222        public function init()
    2323        {
    24             WPStore_Option::init();
    25             WPStore_API::init();
    26             WPStore_Gutenberg::init();
     24            WPStoreApp_Option::init();
     25            WPStoreApp_API::init();
     26            WPStoreApp_Gutenberg::init();
    2727        }
    2828    }
    29     $instance = new WPS_SpellCheck();
     29    $instance = new WPStoreApp_SpellCheck();
    3030    $instance->init();
    3131}
Note: See TracChangeset for help on using the changeset viewer.