This commit is contained in:
zbatte committed 2026-07-02 15:54:39 -06:00
commit 9883323161
17470 files changed
+4470592

No files matched your search

@@ -0,0 +1,64 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "generateblocks-pro/accordion-toggle-icon",
"title": "Accordion Toggle Icon",
"category": "generateblocks",
"parent": [
"generateblocks-pro/accordion-toggle"
],
"icon": "star",
"description": "The open and close icon for the accordion toggle.",
"keywords": [
"accordion"
],
"version": "1.0.0",
"textdomain": "generateblocks-pro",
"attributes": {
"uniqueId": {
"type": "string",
"default": ""
},
"tagName": {
"type": "string",
"default": "",
"enum": [
"span"
]
},
"styles": {
"type": "object",
"default": {}
},
"css": {
"type": "string",
"default": ""
},
"globalClasses": {
"type": "array",
"default": []
},
"htmlAttributes": {
"type": "object",
"default": {}
},
"openIcon": {
"type": "string",
"source": "html",
"selector": ".gb-accordion__toggle-icon-open"
},
"closeIcon": {
"type": "string",
"source": "html",
"selector": ".gb-accordion__toggle-icon-close"
}
},
"supports": {
"align": false,
"className": false
},
"editorStyle": [
"file:./index.css"
],
"editorScript": "file:./index.js"
}
@@ -0,0 +1 @@
<?php return array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices', 'wp-url', 'generateblocks-pro-block-styles', 'generateblocks-pro-components', 'generateblocks-pro-styles-builder'), 'version' => 'd90a4637c28a252950ee');
@@ -0,0 +1,7 @@
(()=>{"use strict";var e={n:t=>{var l=t&&t.__esModule?()=>t.default:()=>t;return e.d(l,{a:l}),l},d:(t,l)=>{for(var r in l)e.o(l,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:l[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.React,l=window.wp.blocks,r=window.wp.compose,n=window.wp.i18n,o=window.wp.element,s=window.wp.blockEditor,c=window.gbp.blockStyles,i=window.gbp.stylesBuilder,a=window.wp.data,u=(0,a.createReduxStore)("gbp-current-style",{reducer:i.currentStyleReducer,actions:i.currentStyleActions,selectors:i.currentStyleSelectors}),d=(0,a.createReduxStore)("gbp-styles",{reducer:i.styleReducer,actions:i.styleActions,selectors:i.styleSelectors}),p=(0,a.createReduxStore)("gbp-styles-at-rule",{reducer:i.atRuleReducer,actions:i.atRuleActions,selectors:i.atRuleSelectors}),y=(0,a.createReduxStore)("gbp-styles-nested-rule",{reducer:i.nestedRuleReducer,actions:i.nestedRuleActions,selectors:i.nestedRuleSelectors}),g=window.wp.apiFetch;var b=e.n(g);const h=window.wp.notices,m=window.wp.url,k=window.wp.coreData;var f;window.lodash;const S="undefined"!=typeof gbGlobalStylePermissions&&null!==(f=gbGlobalStylePermissions?.canManageStyles)&&void 0!==f&&f,v=window.wp.editPost;const w=(0,a.createReduxStore)("gbp-block-styles-current-style",{reducer:i.currentStyleReducer,actions:i.currentStyleActions,selectors:i.currentStyleSelectors}),C=(0,a.createReduxStore)("gbp-block-styles-at-rule",{reducer:i.atRuleReducer,actions:i.atRuleActions,selectors:i.atRuleSelectors}),E=(0,a.createReduxStore)("gbp-block-styles-nested-rule",{reducer:i.nestedRuleReducer,actions:i.nestedRuleActions,selectors:i.nestedRuleSelectors});function L(){const e=(0,a.useSelect)((e=>e(C).getAtRule())),{setAtRule:t}=(0,a.useDispatch)(C),l=(0,a.useSelect)((e=>e(E).getNestedRule())),{setNestedRule:r}=(0,a.useDispatch)(E),o=(0,c.useCurrentAtRule)(i.defaultAtRules),{setCurrentStyle:g}=(0,a.useDispatch)(w),f=(0,a.useSelect)((e=>e(w).currentStyle())),{deviceType:L,setDeviceType:R}=(0,c.useDeviceType)(),x=function(){const{setCurrentStyle:e}=(0,a.useDispatch)(u),{setStyles:t}=(0,a.useDispatch)(d),{createNotice:l,removeAllNotices:r}=(0,a.useDispatch)(h.store),{getEntityRecordEdits:o}=(0,a.useSelect)(k.store),{getSelectedBlock:c}=(0,a.useSelect)((e=>e(s.store)),[]),{setAtRule:i}=(0,a.useDispatch)(p),{setNestedRule:g}=(0,a.useDispatch)(y),{openGeneralSidebar:f}=(0,a.useDispatch)(v.store);return async(s,a={})=>{if(!S)return;const{classStyles:u,classPostId:d}=await async function(e){var t;const l=await b()({path:(0,m.addQueryArgs)("/generateblocks-pro/v1/global-classes/get_styles",{globalClass:e}),method:"GET"});let r=null!==(t=l?.response?.data?.styles)&&void 0!==t?t:{};return Array.isArray(r)&&0===r.length&&(r={}),{classStyles:r,classPostId:l?.response?.data?.postId}}(s);if(!d)return r("snackbar"),void l("error",(0,n.sprintf)(
// Translators: Global class name.
// Translators: Global class name.
(0,n.__)("%s does not exist.","generateblocks-pro"),s),{type:"snackbar"});i(""),g(""),f("gblocks-editor-sidebar/gblocks-editor-sidebar"),e({postId:d,name:s,classStyles:u,clientId:c()?.clientId,options:a}),a.nestedRule&&g(a.nestedRule),a.atRule&&i(a.atRule);const p=o("postType","gblocks_styles",d);t(p?.gb_style_data||u),r("snackbar"),l("info",(0,n.sprintf)(
// Translators: Global class name.
// Translators: Global class name.
(0,n.__)("Editing %s.","generateblocks-pro"),s),{type:"snackbar"})}}(),_=function(){const{setCurrentStyle:e}=(0,a.useDispatch)(u),{setStyles:t}=(0,a.useDispatch)(d),{setAtRule:l}=(0,a.useDispatch)(p),{setNestedRule:r}=(0,a.useDispatch)(y);return()=>{e({}),t({}),l(""),r("")}}();return{atRule:e,nestedRule:l,setAtRule:t,currentAtRule:o,setNestedRule:r,setDeviceType:R,deviceType:L,setCurrentStyle:g,currentStyle:f,getPreviewDevice:c.getPreviewDevice,setGlobalStyle:x,cancelEditGlobalStyle:_}}function R({attributes:e,setAttributes:l,shortcuts:r,onStyleChange:n}){const{atRule:o,setAtRule:s,nestedRule:a,setNestedRule:u,setDeviceType:d,getPreviewDevice:p,currentStyle:y,setGlobalStyle:g,cancelEditGlobalStyle:b}=L(),{styles:h,globalClasses:m=[]}=e,k=(0,i.getStylesObject)(h,o,a);return(0,t.createElement)(i.StylesBuilder,{currentSelector:y?.selector,styles:k,allStyles:h,onDeleteStyle:(e,t)=>{const r=(0,i.deleteStylesObjectKey)(h,e,t);l({styles:r})},nestedRule:a,atRule:o,onStyleChange:(e,t=null)=>n(e,t,o,a),onNestedRuleChange:e=>u(e),onAtRuleChange:e=>{s(e);const t=(0,i.getPreviewWidth)(e),l=p(t);l&&d(l)},onUpdateKey:(e,t,r)=>{const n=(0,i.updateStylesObjectKey)(h,e,t,r);l({styles:n})},selectorShortcuts:r.selectorShortcuts,visibleSelectors:r.visibleShortcuts,onEditStyle:g,cancelEditStyle:b,setLocalTab:c.openBlockStylesTab,scope:"local",allowDevTools:!0,appliedGlobalStyles:m,onAllStylesChange:e=>l({styles:e})})}const x=window.wp.components,_=window.wp.hooks,A=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","readonly","required","reversed","selected"];function I(e){const t=e.trim().replace(/[^A-Za-z0-9-_:.]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");return t?/^[A-Za-z]/.test(t)?t:`id-${t}`:""}function j(e,t,l=!1){const{styles:r={},uniqueId:n="",globalClasses:o=[]}=t,s=[];return l&&s.push(e),o.length>0&&s.push(...o),Object.keys(r).length>0&&s.push(`${e}-${n}`),s}const D=window.gbp.components,N={caretDown:{label:(0,n._x)("Caret down","label","generateblocks-pro"),icon:(0,t.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 256 256"},(0,t.createElement)("rect",{width:"256",height:"256",fill:"none"}),(0,t.createElement)("polyline",{points:"208 96 128 176 48 96",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))},caretUp:{label:(0,n._x)("Caret Up","label","generateblocks-pro"),icon:(0,t.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 256 256"},(0,t.createElement)("rect",{width:"256",height:"256",fill:"none"}),(0,t.createElement)("polyline",{points:"48 160 128 80 208 160",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))},caretDownCircle:{label:(0,n._x)("Caret Down Circle","label","generateblocks-pro"),icon:(0,t.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 256 256"},(0,t.createElement)("rect",{width:"256",height:"256",fill:"none"}),(0,t.createElement)("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),(0,t.createElement)("polyline",{points:"88 112 128 152 168 112",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))},caretUpCircle:{label:(0,n._x)("Caret Up Circle","label","generateblocks-pro"),icon:(0,t.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 256 256"},(0,t.createElement)("rect",{width:"256",height:"256",fill:"none"}),(0,t.createElement)("circle",{cx:"128",cy:"128",r:"96",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),(0,t.createElement)("polyline",{points:"88 144 128 104 168 144",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))},plus:{label:(0,n._x)("Plus","label","generateblocks-pro"),icon:(0,t.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 256 256"},(0,t.createElement)("rect",{width:"256",height:"256",fill:"none"}),(0,t.createElement)("line",{x1:"40",y1:"128",x2:"216",y2:"128",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),(0,t.createElement)("line",{x1:"128",y1:"40",x2:"128",y2:"216",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))},minus:{label:(0,n._x)("Minus","label","generateblocks-pro"),icon:(0,t.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 256 256"},(0,t.createElement)("rect",{width:"256",height:"256",fill:"none"}),(0,t.createElement)("line",{x1:"40",y1:"128",x2:"216",y2:"128",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}))},plusCircle:{label:(0,n._x)("Plus Circle","label","generateblocks-pro"),icon:(0,t.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 256 256"},(0,t.createElement)("rect",{width:"256",height:"256",fiLine truncated