Plugin Directory

Changeset 3345254


Ignore:
Timestamp:
08/15/2025 05:22:19 PM (7 months ago)
Author:
badasswp
Message:

Deploy version 1.0.9 for convert-blocks-to-json

Location:
convert-blocks-to-json
Files:
38 added
3 edited

Legend:

Unmodified
Added
Removed
  • convert-blocks-to-json/trunk/convert-blocks-to-json.php

    r3262149 r3345254  
    44 * Plugin URI:  https://github.com/badasswp/convert-blocks-to-json
    55 * Description: Convert your WP blocks to JSON.
    6  * Version:     1.0.8
     6 * Version:     1.0.9
    77 * Author:      badasswp
    88 * Author URI:  https://github.com/badasswp
  • convert-blocks-to-json/trunk/dist/app.js

    r3262149 r3345254  
    1 (()=>{"use strict";var t={20:(t,e,n)=>{var o=n(609),r=Symbol.for("react.element"),i=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(t,e,n){var o,i={},l=null,d=null;for(o in void 0!==n&&(l=""+n),void 0!==e.key&&(l=""+e.key),void 0!==e.ref&&(d=e.ref),e)c.call(e,o)&&!s.hasOwnProperty(o)&&(i[o]=e[o]);if(t&&t.defaultProps)for(o in e=t.defaultProps)void 0===i[o]&&(i[o]=e[o]);return{$$typeof:r,type:t,key:l,ref:d,props:i,_owner:a.current}}e.Fragment=i,e.jsx=l,e.jsxs=l},56:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},72:t=>{var e=[];function n(t){for(var n=-1,o=0;o<e.length;o++)if(e[o].identifier===t){n=o;break}return n}function o(t,o){for(var i={},c=[],a=0;a<t.length;a++){var s=t[a],l=o.base?s[0]+o.base:s[0],d=i[l]||0,p="".concat(l," ").concat(d);i[l]=d+1;var u=n(p),f={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==u)e[u].references++,e[u].updater(f);else{var v=r(f,o);o.byIndex=a,e.splice(a,0,{identifier:p,updater:v,references:1})}c.push(p)}return c}function r(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,r){var i=o(t=t||[],r=r||{});return function(t){t=t||[];for(var c=0;c<i.length;c++){var a=n(i[c]);e[a].references--}for(var s=o(t,r),l=0;l<i.length;l++){var d=n(i[l]);0===e[d].references&&(e[d].updater(),e.splice(d,1))}i=s}}},87:t=>{t.exports=window.wp.element},100:(t,e,n)=>{n.d(e,{A:()=>a});var o=n(354),r=n.n(o),i=n(314),c=n.n(i)()(r());c.push([t.id,"#cbtj p{margin-top:0 !important;margin-bottom:7.5px !important}#cbtj button{height:auto;padding:11.5px 15px;justify-content:center}#cbtj ul{margin:0;padding:0;display:flex;flex-direction:column}#cbtj ul li{padding:20px 0 22.5px 0;border-bottom:1px solid #eee;margin:0}#cbtj ul li:first-child{padding-top:0}","",{version:3,sources:["webpack://./src/styles/app.scss"],names:[],mappings:"AACC,QACC,uBAAA,CACA,8BAAA,CAGD,aACC,WAAA,CACA,mBAAA,CACA,sBAAA,CAGD,SACC,QAAA,CACA,SAAA,CACA,YAAA,CACA,qBAAA,CAEA,YACC,uBAAA,CACA,4BAAA,CACA,QAAA,CAEA,wBACC,aAAA",sourcesContent:["#cbtj {\n\tp {\n\t\tmargin-top: 0 !important;\n\t\tmargin-bottom: 7.5px !important;\n\t}\n\n\tbutton {\n\t\theight: auto;\n\t\tpadding: 11.5px 15px;\n\t\tjustify-content: center;\n\t}\n\n\tul {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\tli {\n\t\t\tpadding: 20px 0 22.5px 0;\n\t\t\tborder-bottom: 1px solid #EEE;\n\t\t\tmargin: 0;\n\n\t\t\t&:first-child {\n\t\t\t\tpadding-top: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=c},113:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},143:t=>{t.exports=window.wp.data},279:t=>{t.exports=window.wp.plugins},309:t=>{t.exports=window.wp.editPost},314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,o,r,i){"string"==typeof t&&(t=[[null,t,void 0]]);var c={};if(o)for(var a=0;a<this.length;a++){var s=this[a][0];null!=s&&(c[s]=!0)}for(var l=0;l<t.length;l++){var d=[].concat(t[l]);o&&c[d[0]]||(void 0!==i&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=i),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),r&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=r):d[4]="".concat(r)),e.push(d))}},e}},349:(t,e,n)=>{n.d(e,{A:()=>a});var o=n(848),r=n(723),i=n(143),c=n(427);const a=()=>{const t=(0,i.select)("core/editor").getCurrentPostId();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{children:(0,r.__)("View JSON","convert-blocks-to-json")}),(0,o.jsx)("a",{href:`${cbtj.url}/wp-json/cbtj/v1/${t}`,target:"_blank",rel:"noreferrer",children:(0,o.jsx)(c.Button,{variant:"primary",onClick:()=>{},children:(0,r.__)("View JSON","convert-blocks-to-json")})})]})}},354:t=>{t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),i="/*# ".concat(r," */");return[e].concat([i]).join("\n")}return[e].join("\n")}},377:(t,e,n)=>{n.d(e,{A:()=>l});var o=n(848),r=n(723),i=n(143),c=n(427),a=n(997),s=n(900);const l=()=>{const t=t=>{return e=void 0,n=void 0,r=function*(){const e=t.state().get("selection").first().toJSON();(yield(0,s.cO)(e)).forEach((({name:t,attributes:e,innerBlocks:n})=>{e=JSON.parse(e),(0,i.dispatch)("core/block-editor").insertBlocks((0,a.createBlock)(t,Object.assign({},e),n))}))},new((o=void 0)||(o=Promise))((function(t,i){function c(t){try{s(r.next(t))}catch(t){i(t)}}function a(t){try{s(r.throw(t))}catch(t){i(t)}}function s(e){var n;e.done?t(e.value):(n=e.value,n instanceof o?n:new o((function(t){t(n)}))).then(c,a)}s((r=r.apply(e,n||[])).next())}));var e,n,o,r};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{children:(0,r.__)("Import Blocks by JSON","convert-blocks-to-json")}),(0,o.jsx)(c.Button,{variant:"primary",onClick:()=>{const e=wp.media((0,s.ip)());e.on("select",(()=>t(e))).open()},children:(0,r.__)("Import Blocks","convert-blocks-to-json")})]})}},427:t=>{t.exports=window.wp.components},455:t=>{t.exports=window.wp.apiFetch},533:(t,e,n)=>{var o=n(72),r=n.n(o),i=n(825),c=n.n(i),a=n(659),s=n.n(a),l=n(56),d=n.n(l),p=n(540),u=n.n(p),f=n(113),v=n.n(f),m=n(100),A={};A.styleTagTransform=v(),A.setAttributes=d(),A.insert=s().bind(null,"head"),A.domAPI=c(),A.insertStyleElement=u(),r()(m.A,A),m.A&&m.A.locals&&m.A.locals},540:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},609:t=>{t.exports=window.React},659:t=>{var e={};t.exports=function(t,n){var o=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},723:t=>{t.exports=window.wp.i18n},724:(t,e,n)=>{n.d(e,{A:()=>a});var o=n(848),r=n(723),i=n(427),c=n(900);const a=()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{children:(0,r.__)("Export Blocks to JSON","convert-blocks-to-json")}),(0,o.jsx)(i.Button,{variant:"primary",onClick:()=>{return t=void 0,e=void 0,o=function*(){const t=yield(0,c.Tr)(),e=JSON.stringify(t,null,2),n=URL.createObjectURL(new Blob([e],{type:"application/json"})),o=document.createElement("a");o.href=n,o.download=`convert-blocks-to-json-${Date.now()}.json`,document.body.appendChild(o),o.click(),URL.revokeObjectURL(n),document.body.removeChild(o)},new((n=void 0)||(n=Promise))((function(r,i){function c(t){try{s(o.next(t))}catch(t){i(t)}}function a(t){try{s(o.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(c,a)}s((o=o.apply(t,e||[])).next())}));var t,e,n,o},children:(0,r.__)("Export Blocks","convert-blocks-to-json")})]})},825:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,r&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleTagTransform(o,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},848:(t,e,n)=>{t.exports=n(20)},900:(t,e,n)=>{n.d(e,{Tr:()=>a,cO:()=>s,ip:()=>l});var o=n(723),r=n(143),i=n(455),c=n.n(i);const a=()=>{const t=(0,r.select)("core/editor").getCurrentPostId();return c()({path:`/cbtj/v1/${t}`})},s=t=>c()({path:"/cbtj/v1/import",method:"POST",data:Object.assign({},t)}),l=()=>({title:(0,o.__)("Select JSON File","convert-blocks-to-json"),button:{text:(0,o.__)("Use JSON","convert-blocks-to-json")},multiple:!1})},997:t=>{t.exports=window.wp.blocks}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={id:o,exports:{}};return t[o](i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.nc=void 0;var o=n(848),r=n(723),i=n(87),c=n(427),a=n(279),s=n(309),l=n(349),d=n(377),p=n(724);n(533),(0,a.registerPlugin)("convert-blocks-to-json",{render:()=>(0,o.jsxs)(i.Fragment,{children:[(0,o.jsx)(s.PluginSidebarMoreMenuItem,{target:"cbtj-sidebar",icon:"editor-code",children:(0,r.__)("Convert Blocks to JSON","convert-blocks-to-json")}),(0,o.jsx)(s.PluginSidebar,{name:"cbtj-sidebar",title:(0,r.__)("Convert Blocks to JSON","convert-blocks-to-json"),icon:"editor-code",children:(0,o.jsx)(c.PanelBody,{children:(0,o.jsx)("div",{id:"cbtj",children:(0,o.jsxs)("ul",{children:[(0,o.jsx)("li",{children:(0,o.jsx)(l.A,{})}),(0,o.jsx)("li",{children:(0,o.jsx)(d.A,{})}),(0,o.jsx)("li",{children:(0,o.jsx)(p.A,{})})]})})})})]})})})();
     1(()=>{"use strict";var t={20:(t,e,n)=>{var o=n(609),r=Symbol.for("react.element"),i=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(t,e,n){var o,i={},l=null,d=null;for(o in void 0!==n&&(l=""+n),void 0!==e.key&&(l=""+e.key),void 0!==e.ref&&(d=e.ref),e)c.call(e,o)&&!s.hasOwnProperty(o)&&(i[o]=e[o]);if(t&&t.defaultProps)for(o in e=t.defaultProps)void 0===i[o]&&(i[o]=e[o]);return{$$typeof:r,type:t,key:l,ref:d,props:i,_owner:a.current}}e.Fragment=i,e.jsx=l,e.jsxs=l},56:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},72:t=>{var e=[];function n(t){for(var n=-1,o=0;o<e.length;o++)if(e[o].identifier===t){n=o;break}return n}function o(t,o){for(var i={},c=[],a=0;a<t.length;a++){var s=t[a],l=o.base?s[0]+o.base:s[0],d=i[l]||0,p="".concat(l," ").concat(d);i[l]=d+1;var u=n(p),f={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==u)e[u].references++,e[u].updater(f);else{var v=r(f,o);o.byIndex=a,e.splice(a,0,{identifier:p,updater:v,references:1})}c.push(p)}return c}function r(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,r){var i=o(t=t||[],r=r||{});return function(t){t=t||[];for(var c=0;c<i.length;c++){var a=n(i[c]);e[a].references--}for(var s=o(t,r),l=0;l<i.length;l++){var d=n(i[l]);0===e[d].references&&(e[d].updater(),e.splice(d,1))}i=s}}},87:t=>{t.exports=window.wp.element},100:(t,e,n)=>{n.d(e,{A:()=>a});var o=n(354),r=n.n(o),i=n(314),c=n.n(i)()(r());c.push([t.id,"#cbtj p{margin-top:0 !important;margin-bottom:7.5px !important}#cbtj button{height:auto;padding:11.5px 15px;justify-content:center}#cbtj ul{margin:0;padding:0;display:flex;flex-direction:column}#cbtj ul li{padding:20px 0 22.5px 0;border-bottom:1px solid #eee;margin:0}#cbtj ul li:first-child{padding-top:0}","",{version:3,sources:["webpack://./src/styles/app.scss"],names:[],mappings:"AACC,QACC,uBAAA,CACA,8BAAA,CAGD,aACC,WAAA,CACA,mBAAA,CACA,sBAAA,CAGD,SACC,QAAA,CACA,SAAA,CACA,YAAA,CACA,qBAAA,CAEA,YACC,uBAAA,CACA,4BAAA,CACA,QAAA,CAEA,wBACC,aAAA",sourcesContent:["#cbtj {\n\tp {\n\t\tmargin-top: 0 !important;\n\t\tmargin-bottom: 7.5px !important;\n\t}\n\n\tbutton {\n\t\theight: auto;\n\t\tpadding: 11.5px 15px;\n\t\tjustify-content: center;\n\t}\n\n\tul {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\tli {\n\t\t\tpadding: 20px 0 22.5px 0;\n\t\t\tborder-bottom: 1px solid #EEE;\n\t\t\tmargin: 0;\n\n\t\t\t&:first-child {\n\t\t\t\tpadding-top: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=c},113:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},143:t=>{t.exports=window.wp.data},279:t=>{t.exports=window.wp.plugins},309:t=>{t.exports=window.wp.editPost},314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n}).join("")},e.i=function(t,n,o,r,i){"string"==typeof t&&(t=[[null,t,void 0]]);var c={};if(o)for(var a=0;a<this.length;a++){var s=this[a][0];null!=s&&(c[s]=!0)}for(var l=0;l<t.length;l++){var d=[].concat(t[l]);o&&c[d[0]]||(void 0!==i&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=i),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),r&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=r):d[4]="".concat(r)),e.push(d))}},e}},349:(t,e,n)=>{n.d(e,{A:()=>a});var o=n(848),r=n(723),i=n(143),c=n(427);const a=()=>{const t=(0,i.select)("core/editor").getCurrentPostId();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{children:(0,r.__)("View JSON","convert-blocks-to-json")}),(0,o.jsx)("a",{href:`${cbtj.url}/wp-json/cbtj/v1/${t}`,target:"_blank",rel:"noreferrer",children:(0,o.jsx)(c.Button,{variant:"primary",onClick:()=>{},children:(0,r.__)("View JSON","convert-blocks-to-json")})})]})}},354:t=>{t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),i="/*# ".concat(r," */");return[e].concat([i]).join("\n")}return[e].join("\n")}},377:(t,e,n)=>{n.d(e,{A:()=>l});var o=n(848),r=n(723),i=n(143),c=n(427),a=n(997),s=n(900);const l=()=>{const t=t=>{return e=void 0,n=void 0,r=function*(){const e=t.state().get("selection").first().toJSON();(yield(0,s.cO)(e)).forEach(({name:t,attributes:e,innerBlocks:n})=>{e=JSON.parse(e),(0,i.dispatch)("core/block-editor").insertBlocks((0,a.createBlock)(t,Object.assign({},e),n))})},new((o=void 0)||(o=Promise))(function(t,i){function c(t){try{s(r.next(t))}catch(t){i(t)}}function a(t){try{s(r.throw(t))}catch(t){i(t)}}function s(e){var n;e.done?t(e.value):(n=e.value,n instanceof o?n:new o(function(t){t(n)})).then(c,a)}s((r=r.apply(e,n||[])).next())});var e,n,o,r};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{children:(0,r.__)("Import Blocks by JSON","convert-blocks-to-json")}),(0,o.jsx)(c.Button,{variant:"primary",onClick:()=>{const e=wp.media((0,s.ip)());e.on("select",()=>t(e)).open()},children:(0,r.__)("Import Blocks","convert-blocks-to-json")})]})}},427:t=>{t.exports=window.wp.components},455:t=>{t.exports=window.wp.apiFetch},533:(t,e,n)=>{var o=n(72),r=n.n(o),i=n(825),c=n.n(i),a=n(659),s=n.n(a),l=n(56),d=n.n(l),p=n(540),u=n.n(p),f=n(113),v=n.n(f),m=n(100),A={};A.styleTagTransform=v(),A.setAttributes=d(),A.insert=s().bind(null,"head"),A.domAPI=c(),A.insertStyleElement=u(),r()(m.A,A),m.A&&m.A.locals&&m.A.locals},540:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},609:t=>{t.exports=window.React},659:t=>{var e={};t.exports=function(t,n){var o=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},723:t=>{t.exports=window.wp.i18n},724:(t,e,n)=>{n.d(e,{A:()=>a});var o=n(848),r=n(723),i=n(427),c=n(900);const a=()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{children:(0,r.__)("Export Blocks to JSON","convert-blocks-to-json")}),(0,o.jsx)(i.Button,{variant:"primary",onClick:()=>{return t=void 0,e=void 0,o=function*(){const t=yield(0,c.Tr)(),e=JSON.stringify(t,null,2),n=URL.createObjectURL(new Blob([e],{type:"application/json"})),o=document.createElement("a");o.href=n,o.download=`convert-blocks-to-json-${Date.now()}.json`,document.body.appendChild(o),o.click(),URL.revokeObjectURL(n),document.body.removeChild(o)},new((n=void 0)||(n=Promise))(function(r,i){function c(t){try{s(o.next(t))}catch(t){i(t)}}function a(t){try{s(o.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(c,a)}s((o=o.apply(t,e||[])).next())});var t,e,n,o},children:(0,r.__)("Export Blocks","convert-blocks-to-json")})]})},825:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,r&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleTagTransform(o,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},848:(t,e,n)=>{t.exports=n(20)},900:(t,e,n)=>{n.d(e,{Tr:()=>a,cO:()=>s,ip:()=>l});var o=n(723),r=n(143),i=n(455),c=n.n(i);const a=()=>{const t=(0,r.select)("core/editor").getCurrentPostId();return c()({path:`/cbtj/v1/${t}`})},s=t=>c()({path:"/cbtj/v1/import",method:"POST",data:Object.assign({},t)}),l=()=>({title:(0,o.__)("Select JSON File","convert-blocks-to-json"),button:{text:(0,o.__)("Use JSON","convert-blocks-to-json")},multiple:!1})},997:t=>{t.exports=window.wp.blocks}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={id:o,exports:{}};return t[o](i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.nc=void 0;var o=n(848),r=n(723),i=n(87),c=n(427),a=n(279),s=n(309),l=n(349),d=n(377),p=n(724);n(533),(0,a.registerPlugin)("convert-blocks-to-json",{render:()=>(0,o.jsxs)(i.Fragment,{children:[(0,o.jsx)(s.PluginSidebarMoreMenuItem,{target:"cbtj-sidebar",icon:"editor-code",children:(0,r.__)("Convert Blocks to JSON","convert-blocks-to-json")}),(0,o.jsx)(s.PluginSidebar,{name:"cbtj-sidebar",title:(0,r.__)("Convert Blocks to JSON","convert-blocks-to-json"),icon:"editor-code",children:(0,o.jsx)(c.PanelBody,{children:(0,o.jsx)("div",{id:"cbtj",children:(0,o.jsxs)("ul",{children:[(0,o.jsx)("li",{children:(0,o.jsx)(l.A,{})}),(0,o.jsx)("li",{children:(0,o.jsx)(d.A,{})}),(0,o.jsx)("li",{children:(0,o.jsx)(p.A,{})})]})})})})]})})})();
    22//# sourceMappingURL=app.js.map
  • convert-blocks-to-json/trunk/readme.txt

    r3262149 r3345254  
    33Tags: convert, blocks, json, gutenberg, editor.
    44Requires at least: 4.0
    5 Tested up to: 6.7.2
    6 Stable tag: 1.0.8
     5Tested up to: 6.8
     6Stable tag: 1.0.9
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    5454
    5555== Changelog ==
     56
     57= 1.0.9 =
     58* Bump up plugin version.
     59* Tested up to WP 6.8
     60* Update README docs.
    5661
    5762= 1.0.8 =
Note: See TracChangeset for help on using the changeset viewer.