Changeset 2265602
- Timestamp:
- 03/23/2020 05:13:31 AM (6 years ago)
- Location:
- guidepost
- Files:
-
- 18 edited
- 1 copied
-
tags/1.2.1 (copied) (copied from guidepost/trunk)
-
tags/1.2.1/build/guidepost-editor.asset.php (modified) (1 diff)
-
tags/1.2.1/build/guidepost-editor.css (modified) (1 diff)
-
tags/1.2.1/build/guidepost-style.asset.php (modified) (1 diff)
-
tags/1.2.1/build/guidepost-theme.asset.php (modified) (1 diff)
-
tags/1.2.1/build/index.asset.php (modified) (1 diff)
-
tags/1.2.1/build/index.js (modified) (1 diff)
-
tags/1.2.1/changelog.txt (modified) (1 diff)
-
tags/1.2.1/guidepost.php (modified) (2 diffs)
-
tags/1.2.1/readme.txt (modified) (2 diffs)
-
trunk/build/guidepost-editor.asset.php (modified) (1 diff)
-
trunk/build/guidepost-editor.css (modified) (1 diff)
-
trunk/build/guidepost-style.asset.php (modified) (1 diff)
-
trunk/build/guidepost-theme.asset.php (modified) (1 diff)
-
trunk/build/index.asset.php (modified) (1 diff)
-
trunk/build/index.js (modified) (1 diff)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/guidepost.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
guidepost/tags/1.2.1/build/guidepost-editor.asset.php
r2256652 r2265602 1 <?php return array('dependencies' => array('wp-polyfill'), 'version' => ' 638c80af69179be18124986e7cbcd6e0');1 <?php return array('dependencies' => array('wp-polyfill'), 'version' => 'da27597f14a5018df7e377e071c0fa2f'); -
guidepost/tags/1.2.1/build/guidepost-editor.css
r2256652 r2265602 1 .wp-block[data-type="sortabrilliant/guidepost"] .ul{padding-left:1.3em;margin-left:1.3em}1 .wp-block[data-type="sortabrilliant/guidepost"] ul{padding-left:1.3em;margin-left:1.3em} 2 2 -
guidepost/tags/1.2.1/build/guidepost-style.asset.php
r2256652 r2265602 1 <?php return array('dependencies' => array('wp-polyfill'), 'version' => ' 9f6808ba9392c5dbb65d231bb4be0809');1 <?php return array('dependencies' => array('wp-polyfill'), 'version' => '32d6cdc2675636dbb932515b0217774e'); -
guidepost/tags/1.2.1/build/guidepost-theme.asset.php
r2256652 r2265602 1 <?php return array('dependencies' => array('wp-polyfill'), 'version' => ' 41b41d1f96d03043a7f30ca0abe16a68');1 <?php return array('dependencies' => array('wp-polyfill'), 'version' => 'aa6b506270d8fdddf9d6872557aea0ea'); -
guidepost/tags/1.2.1/build/index.asset.php
r2256652 r2265602 1 <?php return array('dependencies' => array('lodash', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => ' b9fd836aff6c19f9ae4aa032448c6777');1 <?php return array('dependencies' => array('lodash', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'a863e8895ae5fc4e499d31d6978ec73f'); -
guidepost/tags/1.2.1/build/index.js
r2256652 r2265602 1 !function( t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=23)}([function(t,e){!function(){t.exports=this.wp.element}()},function(t,e){!function(){t.exports=this.wp.i18n}()},function(t,e){!function(){t.exports=this.wp.components}()},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}},function(t,e,n){var r=n(14),o=n(15);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?o(t):e}},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}t.exports=n},function(t,e,n){var r=n(16);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}},function(t){t.exports=JSON.parse('{"name":"sortabrilliant/guidepost","title":"Guidepost","category":"common","description":"Add a list of internal links allowing your readers to quickly navigate around.","keywords":["toc","sortabrilliant"],"textDomain":"guidepost","attributes":{"headings":{"source":"query","selector":"a","query":{"content":{"source":"text"},"anchor":{"source":"attribute","attribute":"href"},"level":{"source":"attribute","attribute":"data-level"}}}},"editorScript":"build/index.js","editorStyle":"build/guidepost-editor.css","style":"build/guidepost-style.css"}')},function(t,e){!function(){t.exports=this.lodash}()},function(t,e){!function(){t.exports=this.wp.data}()},function(t,e){!function(){t.exports=this.wp.blocks}()},function(t,e){!function(){t.exports=this.wp.compose}()},,function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=n=function(t){return typeof t}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(e)}t.exports=n},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(e,r)}t.exports=n},,,,,,,function(t,e,n){"use strict";n.r(e);var r=n(8),o=n(3),i=n.n(o),c=n(4),u=n.n(c),l=n(5),a=n.n(l),s=n(6),p=n.n(s),f=n(7),b=n.n(f),d=n(0),h=n(9),y=n(2),g=function(t){return Object(d.createElement)("ul",null,t.headings.map((function(t,e){return Object(d.createElement)(v,{key:e,content:t.block.content,anchor:t.block.anchor,level:t.block.level,children:t.children})})))},v=function(t){return Object(d.createElement)("li",null,Object(d.createElement)(y.Disabled,null,Object(d.createElement)("a",{href:"#".concat(t.anchor.replace("#","")),"data-level":t.level},t.content)),t.children&&Object(d.createElement)(g,{headings:t.children}))},m=Object(d.createElement)(y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(y.Path,{d:"M21.71,11.29l-9-9c-0.39-0.39-1.02-0.39-1.41,0l-9,9c-0.39,0.39-0.39,1.02,0,1.41l9,9c0.39,0.39,1.02,0.39,1.41,0l9-9C22.1,12.32,22.1,11.69,21.71,11.29z M14,14.5V12h-4v2c0,0.55-0.45,1-1,1h0c-0.55,0-1-0.45-1-1v-3c0-0.55,0.45-1,1-1h5V7.5l3.15,3.15c0.2,0.2,0.2,0.51,0,0.71L14,14.5z"}));function O(t){var e=[];return t.forEach((function(n,r){if(void 0!==n.content&&n.level===t[0].level)if(void 0!==t[r+1]&&t[r+1].level>n.level){for(var o=t.length,i=r+1;i<t.length;i++)if(t[i].level===n.level){o=i;break}e.push({block:n,children:O(t.slice(r+1,o))})}else e.push({block:n,children:null})})),e}var j=n(1),k=n(12),x=n(10),w=function(t){function e(){return i()(this,e),a()(this,p()(e).apply(this,arguments))}return b()(e,t),u()(e,[{key:"componentDidUpdate",value:function(t){var e=this.props,n=e.headingBlocks,r=e.headings,o=e.setAttributes,i=e.updateBlockAttributes;Object(h.isEqual)(t.attributes.headings,r)||(n.forEach((function(t,e){var r=n.filter((function(e){return e.attributes.anchor===t.attributes.anchor}));(r&&r.length>1||void 0===t.attributes.anchor||""===t.attributes.anchor)&&i(t.clientId,{anchor:e+"-"+Object(h.kebabCase)(t.attributes.content)})})),o({headings:r}))}},{key:"render",value:function(){var t=this.props.headings,e=void 0===t?[]:t;if(e<1)return Object(d.createElement)(y.Placeholder,{icon:m,label:Object(j.__)("Guidepost","guidepost"),instructions:Object(j.__)("Start adding headings and your guidepost will be generated automatically.","guidepost")});var n=O(e);return Object(d.createElement)("div",{className:this.props.className},Object(d.createElement)(g,{headings:n}))}}]),e}(d.Component),_=Object(k.compose)([Object(x.withSelect)((function(t){var e=(0,t("core/block-editor").getBlocks)().filter((function(t){return"core/heading"===t.name&&!!t.attributes.content}));return{headingBlocks:e,headings:e.map((function(t){return{content:t.attributes.content,anchor:"#"+t.attributes.anchor,level:t.attributes.level.toString()}}))}})),Object(x.withDispatch)((function(t){return{updateBlockAttributes:t("core/block-editor").updateBlockAttributes}}))])(w),E=function(t){function e(){return i()(this,e),a()(this,p()(e).apply(this,arguments))}return b()(e,t),u()(e,[{key:"render",value:function(){var t=this.props.attributes.headings,e=void 0===t?[]:t;return e<1?null:Object(d.createElement)("div",{className:this.props.className},Object(d.createElement)(g,{headings:O(e)}))}}]),e}(d.Component),S=n(11);Object(S.registerBlockType)("sortabrilliant/guidepost",{title:Object(j.__)("Guidepost","guidepost"),description:Object(j.__)("Add a list of internal links allowing your readers to quickly navigate around.","guidepost"),icon:m,category:r.category,keywords:[Object(j.__)("toc","guidepost"),Object(j.__)("sortabrilliant","guidepost")],attributes:r.attributes,supports:{html:!1,multiple:!1},transforms:{from:[{type:"block",blocks:["*"],isMatch:function(t){return"sbb/guidepost"===t.originalName},transform:function(){return Object(S.createBlock)("sortabrilliant/guidepost")}}]},edit:_,save:E})}]);1 !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=23)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e){e.exports=JSON.parse('{"name":"sortabrilliant/guidepost","title":"Guidepost","category":"common","description":"Add a list of internal links allowing your readers to quickly navigate around.","keywords":["toc","sortabrilliant"],"textDomain":"guidepost","attributes":{"headings":{"source":"query","selector":"a","query":{"content":{"source":"text"},"anchor":{"source":"attribute","attribute":"href"},"level":{"source":"attribute","attribute":"data-level"}}}},"editorScript":"build/index.js","editorStyle":"build/guidepost-editor.css","style":"build/guidepost-style.css"}')},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(14),o=n(15);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(16);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){!function(){e.exports=this.wp.compose}()},,function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(3),o=n(0);function i(e){var t=[];return e.forEach((function(n,r){if(void 0!==n.content&&n.level===e[0].level)if(void 0!==e[r+1]&&e[r+1].level>n.level){for(var o=e.length,c=r+1;c<e.length;c++)if(e[c].level===n.level){o=c;break}t.push({block:n,children:i(e.slice(r+1,o))})}else t.push({block:n,children:null})})),t}var c=n(1),l=function(e){return Object(o.createElement)("ul",null,e.headings.map((function(e,t){return Object(o.createElement)(a,{key:t,content:e.block.content,anchor:e.block.anchor,level:e.block.level,children:e.children})})))},a=function(e){return Object(o.createElement)("li",null,Object(o.createElement)(c.Disabled,null,Object(o.createElement)("a",{href:"#".concat(e.anchor.replace("#","")),"data-level":e.level},e.content)),e.children&&Object(o.createElement)(l,{headings:e.children}))},u=[{attributes:r.attributes,save:function(e){var t=e.attributes,n=e.className,r=t.headings,c=void 0===r?[]:r;return c<1?null:Object(o.createElement)("div",{className:n},Object(o.createElement)(l,{headings:i(c)}))}}],s=n(4),f=n.n(s),p=n(5),b=n.n(p),d=n(6),h=n.n(d),m=n(7),v=n.n(m),y=n(8),g=n.n(y),O=n(9),j=function(e){return Object(o.createElement)("ul",null,e.headings.map((function(e,t){return Object(o.createElement)(k,{key:t,content:e.block.content,anchor:e.block.anchor,level:e.block.level,children:e.children})})))},k=function(e){return Object(o.createElement)("li",null,Object(o.createElement)("a",{href:"#".concat(e.anchor.replace("#","")),"data-level":e.level},e.content),e.children&&Object(o.createElement)(j,{headings:e.children}))},x=Object(o.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(c.Path,{d:"M21.71,11.29l-9-9c-0.39-0.39-1.02-0.39-1.41,0l-9,9c-0.39,0.39-0.39,1.02,0,1.41l9,9c0.39,0.39,1.02,0.39,1.41,0l9-9C22.1,12.32,22.1,11.69,21.71,11.29z M14,14.5V12h-4v2c0,0.55-0.45,1-1,1h0c-0.55,0-1-0.45-1-1v-3c0-0.55,0.45-1,1-1h5V7.5l3.15,3.15c0.2,0.2,0.2,0.51,0,0.71L14,14.5z"})),w=n(2),E=n(12),_=n(10),S=function(e){function t(){return f()(this,t),h()(this,v()(t).apply(this,arguments))}return g()(t,e),b()(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.headingBlocks,r=t.headings,o=t.setAttributes,i=t.updateBlockAttributes;Object(O.isEqual)(e.attributes.headings,r)||(n.forEach((function(e,t){var r=n.filter((function(t){return t.attributes.anchor===e.attributes.anchor}));(r&&r.length>1||void 0===e.attributes.anchor||""===e.attributes.anchor)&&i(e.clientId,{anchor:t+"-"+Object(O.kebabCase)(e.attributes.content)})})),o({headings:r}))}},{key:"render",value:function(){var e=this.props.headings,t=void 0===e?[]:e;if(t<1)return Object(o.createElement)(c.Placeholder,{icon:x,label:Object(w.__)("Guidepost","guidepost"),instructions:Object(w.__)("Start adding headings and your guidepost will be generated automatically.","guidepost")});var n=i(t);return Object(o.createElement)("div",{className:this.props.className},Object(o.createElement)(c.Disabled,null,Object(o.createElement)(j,{headings:n})))}}]),t}(o.Component),P=Object(E.compose)([Object(_.withSelect)((function(e){var t=(0,e("core/block-editor").getBlocks)().filter((function(e){return"core/heading"===e.name&&!!e.attributes.content}));return{headingBlocks:t,headings:t.map((function(e){return{content:e.attributes.content,anchor:"#"+e.attributes.anchor,level:e.attributes.level.toString()}}))}})),Object(_.withDispatch)((function(e){return{updateBlockAttributes:e("core/block-editor").updateBlockAttributes}}))])(S),B=function(e){function t(){return f()(this,t),h()(this,v()(t).apply(this,arguments))}return g()(t,e),b()(t,[{key:"render",value:function(){var e=this.props.attributes.headings,t=void 0===e?[]:e;return t<1?null:Object(o.createElement)("div",{className:this.props.className},Object(o.createElement)(j,{headings:i(t)}))}}]),t}(o.Component),N=n(11);Object(N.registerBlockType)("sortabrilliant/guidepost",{title:Object(w.__)("Guidepost","guidepost"),description:Object(w.__)("Add a list of internal links allowing your readers to quickly navigate around.","guidepost"),icon:x,category:r.category,keywords:[Object(w.__)("toc","guidepost"),Object(w.__)("sortabrilliant","guidepost")],attributes:r.attributes,supports:{html:!1,multiple:!1},transforms:{from:[{type:"block",blocks:["*"],isMatch:function(e){return"sbb/guidepost"===e.originalName},transform:function(){return Object(N.createBlock)("sortabrilliant/guidepost")}}]},deprecated:u,edit:P,save:B})}]); -
guidepost/tags/1.2.1/changelog.txt
r2256652 r2265602 1 2 1.2.1 / 2020-03-22 3 =================== 4 5 ### Bug Fixes 6 * Remove extraneous HTML elements in saved output 7 * Fix visual nesting of elements when editing 8 9 ### Misc 10 * Bumping "Tested up to" for WordPress 5.4.0 1 11 2 12 1.2.0 / 2020-03-08 -
guidepost/tags/1.2.1/guidepost.php
r2256652 r2265602 6 6 * Author: sorta brilliant 7 7 * Author URI: https://sortabrilliant.com 8 * Version: 1.2. 08 * Version: 1.2.1 9 9 * License: GPL2+ 10 10 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt … … 15 15 defined( 'ABSPATH' ) || exit; 16 16 17 define( 'GUIDEPOST_VERSION', '1.2. 0' );17 define( 'GUIDEPOST_VERSION', '1.2.1' ); 18 18 define( 'GUIDEPOST_PLUGIN_DIR', dirname( __FILE__ ) ); 19 19 define( 'GUIDEPOST_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); -
guidepost/tags/1.2.1/readme.txt
r2256652 r2265602 3 3 Tags: heading, style, block 4 4 Requires at least: 5.0 5 Tested up to: 5. 3.26 Stable tag: 1.2. 05 Tested up to: 5.4.0 6 Stable tag: 1.2.1 7 7 Requires PHP: 5.6 8 8 License: GPLv2 or later … … 28 28 == Changelog == 29 29 30 ### Enhancements31 * Performances improvements while editing heading blocks32 * Remove jQuery as a dependency30 ### Bug Fixes 31 * Remove extraneous HTML elements in saved output 32 * Fix visual nesting of elements when editing 33 33 34 ### Bug Fixes 35 * Allow upgrading from versions prior to 1.1.0 with the block name `sbb/guidepost` 36 * Prevent front-end script from loading within the editor 37 * Prevent duplicate anchors on headings. 34 ### Misc 35 * Bumping "Tested up to" for WordPress 5.4.0 -
guidepost/trunk/build/guidepost-editor.asset.php
r2256652 r2265602 1 <?php return array('dependencies' => array('wp-polyfill'), 'version' => ' 638c80af69179be18124986e7cbcd6e0');1 <?php return array('dependencies' => array('wp-polyfill'), 'version' => 'da27597f14a5018df7e377e071c0fa2f'); -
guidepost/trunk/build/guidepost-editor.css
r2256652 r2265602 1 .wp-block[data-type="sortabrilliant/guidepost"] .ul{padding-left:1.3em;margin-left:1.3em}1 .wp-block[data-type="sortabrilliant/guidepost"] ul{padding-left:1.3em;margin-left:1.3em} 2 2 -
guidepost/trunk/build/guidepost-style.asset.php
r2256652 r2265602 1 <?php return array('dependencies' => array('wp-polyfill'), 'version' => ' 9f6808ba9392c5dbb65d231bb4be0809');1 <?php return array('dependencies' => array('wp-polyfill'), 'version' => '32d6cdc2675636dbb932515b0217774e'); -
guidepost/trunk/build/guidepost-theme.asset.php
r2256652 r2265602 1 <?php return array('dependencies' => array('wp-polyfill'), 'version' => ' 41b41d1f96d03043a7f30ca0abe16a68');1 <?php return array('dependencies' => array('wp-polyfill'), 'version' => 'aa6b506270d8fdddf9d6872557aea0ea'); -
guidepost/trunk/build/index.asset.php
r2256652 r2265602 1 <?php return array('dependencies' => array('lodash', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => ' b9fd836aff6c19f9ae4aa032448c6777');1 <?php return array('dependencies' => array('lodash', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'a863e8895ae5fc4e499d31d6978ec73f'); -
guidepost/trunk/build/index.js
r2256652 r2265602 1 !function( t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=23)}([function(t,e){!function(){t.exports=this.wp.element}()},function(t,e){!function(){t.exports=this.wp.i18n}()},function(t,e){!function(){t.exports=this.wp.components}()},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}},function(t,e,n){var r=n(14),o=n(15);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?o(t):e}},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}t.exports=n},function(t,e,n){var r=n(16);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}},function(t){t.exports=JSON.parse('{"name":"sortabrilliant/guidepost","title":"Guidepost","category":"common","description":"Add a list of internal links allowing your readers to quickly navigate around.","keywords":["toc","sortabrilliant"],"textDomain":"guidepost","attributes":{"headings":{"source":"query","selector":"a","query":{"content":{"source":"text"},"anchor":{"source":"attribute","attribute":"href"},"level":{"source":"attribute","attribute":"data-level"}}}},"editorScript":"build/index.js","editorStyle":"build/guidepost-editor.css","style":"build/guidepost-style.css"}')},function(t,e){!function(){t.exports=this.lodash}()},function(t,e){!function(){t.exports=this.wp.data}()},function(t,e){!function(){t.exports=this.wp.blocks}()},function(t,e){!function(){t.exports=this.wp.compose}()},,function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=n=function(t){return typeof t}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(e)}t.exports=n},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(e,r)}t.exports=n},,,,,,,function(t,e,n){"use strict";n.r(e);var r=n(8),o=n(3),i=n.n(o),c=n(4),u=n.n(c),l=n(5),a=n.n(l),s=n(6),p=n.n(s),f=n(7),b=n.n(f),d=n(0),h=n(9),y=n(2),g=function(t){return Object(d.createElement)("ul",null,t.headings.map((function(t,e){return Object(d.createElement)(v,{key:e,content:t.block.content,anchor:t.block.anchor,level:t.block.level,children:t.children})})))},v=function(t){return Object(d.createElement)("li",null,Object(d.createElement)(y.Disabled,null,Object(d.createElement)("a",{href:"#".concat(t.anchor.replace("#","")),"data-level":t.level},t.content)),t.children&&Object(d.createElement)(g,{headings:t.children}))},m=Object(d.createElement)(y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(y.Path,{d:"M21.71,11.29l-9-9c-0.39-0.39-1.02-0.39-1.41,0l-9,9c-0.39,0.39-0.39,1.02,0,1.41l9,9c0.39,0.39,1.02,0.39,1.41,0l9-9C22.1,12.32,22.1,11.69,21.71,11.29z M14,14.5V12h-4v2c0,0.55-0.45,1-1,1h0c-0.55,0-1-0.45-1-1v-3c0-0.55,0.45-1,1-1h5V7.5l3.15,3.15c0.2,0.2,0.2,0.51,0,0.71L14,14.5z"}));function O(t){var e=[];return t.forEach((function(n,r){if(void 0!==n.content&&n.level===t[0].level)if(void 0!==t[r+1]&&t[r+1].level>n.level){for(var o=t.length,i=r+1;i<t.length;i++)if(t[i].level===n.level){o=i;break}e.push({block:n,children:O(t.slice(r+1,o))})}else e.push({block:n,children:null})})),e}var j=n(1),k=n(12),x=n(10),w=function(t){function e(){return i()(this,e),a()(this,p()(e).apply(this,arguments))}return b()(e,t),u()(e,[{key:"componentDidUpdate",value:function(t){var e=this.props,n=e.headingBlocks,r=e.headings,o=e.setAttributes,i=e.updateBlockAttributes;Object(h.isEqual)(t.attributes.headings,r)||(n.forEach((function(t,e){var r=n.filter((function(e){return e.attributes.anchor===t.attributes.anchor}));(r&&r.length>1||void 0===t.attributes.anchor||""===t.attributes.anchor)&&i(t.clientId,{anchor:e+"-"+Object(h.kebabCase)(t.attributes.content)})})),o({headings:r}))}},{key:"render",value:function(){var t=this.props.headings,e=void 0===t?[]:t;if(e<1)return Object(d.createElement)(y.Placeholder,{icon:m,label:Object(j.__)("Guidepost","guidepost"),instructions:Object(j.__)("Start adding headings and your guidepost will be generated automatically.","guidepost")});var n=O(e);return Object(d.createElement)("div",{className:this.props.className},Object(d.createElement)(g,{headings:n}))}}]),e}(d.Component),_=Object(k.compose)([Object(x.withSelect)((function(t){var e=(0,t("core/block-editor").getBlocks)().filter((function(t){return"core/heading"===t.name&&!!t.attributes.content}));return{headingBlocks:e,headings:e.map((function(t){return{content:t.attributes.content,anchor:"#"+t.attributes.anchor,level:t.attributes.level.toString()}}))}})),Object(x.withDispatch)((function(t){return{updateBlockAttributes:t("core/block-editor").updateBlockAttributes}}))])(w),E=function(t){function e(){return i()(this,e),a()(this,p()(e).apply(this,arguments))}return b()(e,t),u()(e,[{key:"render",value:function(){var t=this.props.attributes.headings,e=void 0===t?[]:t;return e<1?null:Object(d.createElement)("div",{className:this.props.className},Object(d.createElement)(g,{headings:O(e)}))}}]),e}(d.Component),S=n(11);Object(S.registerBlockType)("sortabrilliant/guidepost",{title:Object(j.__)("Guidepost","guidepost"),description:Object(j.__)("Add a list of internal links allowing your readers to quickly navigate around.","guidepost"),icon:m,category:r.category,keywords:[Object(j.__)("toc","guidepost"),Object(j.__)("sortabrilliant","guidepost")],attributes:r.attributes,supports:{html:!1,multiple:!1},transforms:{from:[{type:"block",blocks:["*"],isMatch:function(t){return"sbb/guidepost"===t.originalName},transform:function(){return Object(S.createBlock)("sortabrilliant/guidepost")}}]},edit:_,save:E})}]);1 !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=23)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e){e.exports=JSON.parse('{"name":"sortabrilliant/guidepost","title":"Guidepost","category":"common","description":"Add a list of internal links allowing your readers to quickly navigate around.","keywords":["toc","sortabrilliant"],"textDomain":"guidepost","attributes":{"headings":{"source":"query","selector":"a","query":{"content":{"source":"text"},"anchor":{"source":"attribute","attribute":"href"},"level":{"source":"attribute","attribute":"data-level"}}}},"editorScript":"build/index.js","editorStyle":"build/guidepost-editor.css","style":"build/guidepost-style.css"}')},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(14),o=n(15);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(16);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){!function(){e.exports=this.wp.compose}()},,function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(3),o=n(0);function i(e){var t=[];return e.forEach((function(n,r){if(void 0!==n.content&&n.level===e[0].level)if(void 0!==e[r+1]&&e[r+1].level>n.level){for(var o=e.length,c=r+1;c<e.length;c++)if(e[c].level===n.level){o=c;break}t.push({block:n,children:i(e.slice(r+1,o))})}else t.push({block:n,children:null})})),t}var c=n(1),l=function(e){return Object(o.createElement)("ul",null,e.headings.map((function(e,t){return Object(o.createElement)(a,{key:t,content:e.block.content,anchor:e.block.anchor,level:e.block.level,children:e.children})})))},a=function(e){return Object(o.createElement)("li",null,Object(o.createElement)(c.Disabled,null,Object(o.createElement)("a",{href:"#".concat(e.anchor.replace("#","")),"data-level":e.level},e.content)),e.children&&Object(o.createElement)(l,{headings:e.children}))},u=[{attributes:r.attributes,save:function(e){var t=e.attributes,n=e.className,r=t.headings,c=void 0===r?[]:r;return c<1?null:Object(o.createElement)("div",{className:n},Object(o.createElement)(l,{headings:i(c)}))}}],s=n(4),f=n.n(s),p=n(5),b=n.n(p),d=n(6),h=n.n(d),m=n(7),v=n.n(m),y=n(8),g=n.n(y),O=n(9),j=function(e){return Object(o.createElement)("ul",null,e.headings.map((function(e,t){return Object(o.createElement)(k,{key:t,content:e.block.content,anchor:e.block.anchor,level:e.block.level,children:e.children})})))},k=function(e){return Object(o.createElement)("li",null,Object(o.createElement)("a",{href:"#".concat(e.anchor.replace("#","")),"data-level":e.level},e.content),e.children&&Object(o.createElement)(j,{headings:e.children}))},x=Object(o.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(c.Path,{d:"M21.71,11.29l-9-9c-0.39-0.39-1.02-0.39-1.41,0l-9,9c-0.39,0.39-0.39,1.02,0,1.41l9,9c0.39,0.39,1.02,0.39,1.41,0l9-9C22.1,12.32,22.1,11.69,21.71,11.29z M14,14.5V12h-4v2c0,0.55-0.45,1-1,1h0c-0.55,0-1-0.45-1-1v-3c0-0.55,0.45-1,1-1h5V7.5l3.15,3.15c0.2,0.2,0.2,0.51,0,0.71L14,14.5z"})),w=n(2),E=n(12),_=n(10),S=function(e){function t(){return f()(this,t),h()(this,v()(t).apply(this,arguments))}return g()(t,e),b()(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.headingBlocks,r=t.headings,o=t.setAttributes,i=t.updateBlockAttributes;Object(O.isEqual)(e.attributes.headings,r)||(n.forEach((function(e,t){var r=n.filter((function(t){return t.attributes.anchor===e.attributes.anchor}));(r&&r.length>1||void 0===e.attributes.anchor||""===e.attributes.anchor)&&i(e.clientId,{anchor:t+"-"+Object(O.kebabCase)(e.attributes.content)})})),o({headings:r}))}},{key:"render",value:function(){var e=this.props.headings,t=void 0===e?[]:e;if(t<1)return Object(o.createElement)(c.Placeholder,{icon:x,label:Object(w.__)("Guidepost","guidepost"),instructions:Object(w.__)("Start adding headings and your guidepost will be generated automatically.","guidepost")});var n=i(t);return Object(o.createElement)("div",{className:this.props.className},Object(o.createElement)(c.Disabled,null,Object(o.createElement)(j,{headings:n})))}}]),t}(o.Component),P=Object(E.compose)([Object(_.withSelect)((function(e){var t=(0,e("core/block-editor").getBlocks)().filter((function(e){return"core/heading"===e.name&&!!e.attributes.content}));return{headingBlocks:t,headings:t.map((function(e){return{content:e.attributes.content,anchor:"#"+e.attributes.anchor,level:e.attributes.level.toString()}}))}})),Object(_.withDispatch)((function(e){return{updateBlockAttributes:e("core/block-editor").updateBlockAttributes}}))])(S),B=function(e){function t(){return f()(this,t),h()(this,v()(t).apply(this,arguments))}return g()(t,e),b()(t,[{key:"render",value:function(){var e=this.props.attributes.headings,t=void 0===e?[]:e;return t<1?null:Object(o.createElement)("div",{className:this.props.className},Object(o.createElement)(j,{headings:i(t)}))}}]),t}(o.Component),N=n(11);Object(N.registerBlockType)("sortabrilliant/guidepost",{title:Object(w.__)("Guidepost","guidepost"),description:Object(w.__)("Add a list of internal links allowing your readers to quickly navigate around.","guidepost"),icon:x,category:r.category,keywords:[Object(w.__)("toc","guidepost"),Object(w.__)("sortabrilliant","guidepost")],attributes:r.attributes,supports:{html:!1,multiple:!1},transforms:{from:[{type:"block",blocks:["*"],isMatch:function(e){return"sbb/guidepost"===e.originalName},transform:function(){return Object(N.createBlock)("sortabrilliant/guidepost")}}]},deprecated:u,edit:P,save:B})}]); -
guidepost/trunk/changelog.txt
r2256652 r2265602 1 2 1.2.1 / 2020-03-22 3 =================== 4 5 ### Bug Fixes 6 * Remove extraneous HTML elements in saved output 7 * Fix visual nesting of elements when editing 8 9 ### Misc 10 * Bumping "Tested up to" for WordPress 5.4.0 1 11 2 12 1.2.0 / 2020-03-08 -
guidepost/trunk/guidepost.php
r2256652 r2265602 6 6 * Author: sorta brilliant 7 7 * Author URI: https://sortabrilliant.com 8 * Version: 1.2. 08 * Version: 1.2.1 9 9 * License: GPL2+ 10 10 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt … … 15 15 defined( 'ABSPATH' ) || exit; 16 16 17 define( 'GUIDEPOST_VERSION', '1.2. 0' );17 define( 'GUIDEPOST_VERSION', '1.2.1' ); 18 18 define( 'GUIDEPOST_PLUGIN_DIR', dirname( __FILE__ ) ); 19 19 define( 'GUIDEPOST_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); -
guidepost/trunk/readme.txt
r2256652 r2265602 3 3 Tags: heading, style, block 4 4 Requires at least: 5.0 5 Tested up to: 5. 3.26 Stable tag: 1.2. 05 Tested up to: 5.4.0 6 Stable tag: 1.2.1 7 7 Requires PHP: 5.6 8 8 License: GPLv2 or later … … 28 28 == Changelog == 29 29 30 ### Enhancements31 * Performances improvements while editing heading blocks32 * Remove jQuery as a dependency30 ### Bug Fixes 31 * Remove extraneous HTML elements in saved output 32 * Fix visual nesting of elements when editing 33 33 34 ### Bug Fixes 35 * Allow upgrading from versions prior to 1.1.0 with the block name `sbb/guidepost` 36 * Prevent front-end script from loading within the editor 37 * Prevent duplicate anchors on headings. 34 ### Misc 35 * Bumping "Tested up to" for WordPress 5.4.0
Note: See TracChangeset
for help on using the changeset viewer.