@webiny/website-builder-react 6.4.0-beta.2 → 6.4.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ const Box = createComponent(BoxComponent, {
6
6
  label: "Box",
7
7
  aiContext: "Generic container with no visual output of its own. Use it to group child elements and apply shared padding, margin, background, or other styles.",
8
8
  group: "basic",
9
- image: '<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e8eaed"><path d="M120-120v-720h720v720H120Zm80-80h560v-560H200v560Zm0 0v-560 560Z"/></svg>',
9
+ image: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M3 3v18h18V3H3zm16 16H5V5h14v14z"/></svg>',
10
10
  acceptsChildren: true,
11
11
  defaults: {
12
12
  styles: {
@@ -1 +1 @@
1
- {"version":3,"file":"editorComponents/Box.manifest.js","sources":["../../src/editorComponents/Box.manifest.ts"],"sourcesContent":["\"use client\";\nimport { createComponent } from \"~/createComponent.js\";\nimport { BoxComponent } from \"./Box.js\";\n\nexport const Box = createComponent(BoxComponent, {\n name: \"Webiny/Box\",\n label: \"Box\",\n aiContext:\n \"Generic container with no visual output of its own. Use it to group child elements and apply shared padding, margin, background, or other styles.\",\n group: \"basic\",\n image: `<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e8eaed\"><path d=\"M120-120v-720h720v720H120Zm80-80h560v-560H200v560Zm0 0v-560 560Z\"/></svg>`,\n acceptsChildren: true,\n defaults: {\n styles: {\n paddingTop: \"5px\",\n paddingRight: \"5px\",\n paddingBottom: \"5px\",\n paddingLeft: \"5px\"\n }\n }\n});\n"],"names":["Box","createComponent","BoxComponent"],"mappings":";;;AAIO,MAAMA,MAAMC,gBAAgBC,cAAc;IAC7C,MAAM;IACN,OAAO;IACP,WACI;IACJ,OAAO;IACP,OAAO;IACP,iBAAiB;IACjB,UAAU;QACN,QAAQ;YACJ,YAAY;YACZ,cAAc;YACd,eAAe;YACf,aAAa;QACjB;IACJ;AACJ"}
1
+ {"version":3,"file":"editorComponents/Box.manifest.js","sources":["../../src/editorComponents/Box.manifest.ts"],"sourcesContent":["\"use client\";\nimport { createComponent } from \"~/createComponent.js\";\nimport { BoxComponent } from \"./Box.js\";\n\nexport const Box = createComponent(BoxComponent, {\n name: \"Webiny/Box\",\n label: \"Box\",\n aiContext:\n \"Generic container with no visual output of its own. Use it to group child elements and apply shared padding, margin, background, or other styles.\",\n group: \"basic\",\n image: `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M3 3v18h18V3H3zm16 16H5V5h14v14z\"/></svg>`,\n acceptsChildren: true,\n defaults: {\n styles: {\n paddingTop: \"5px\",\n paddingRight: \"5px\",\n paddingBottom: \"5px\",\n paddingLeft: \"5px\"\n }\n }\n});\n"],"names":["Box","createComponent","BoxComponent"],"mappings":";;;AAIO,MAAMA,MAAMC,gBAAgBC,cAAc;IAC7C,MAAM;IACN,OAAO;IACP,WACI;IACJ,OAAO;IACP,OAAO;IACP,iBAAiB;IACjB,UAAU;QACN,QAAQ;YACJ,YAAY;YACZ,cAAc;YACd,eAAe;YACf,aAAa;QACjB;IACJ;AACJ"}
@@ -7,7 +7,7 @@ const Fragment = createComponent(FragmentComponent, {
7
7
  label: "Fragment",
8
8
  useInAiContentGeneration: false,
9
9
  group: "basic",
10
- image: '<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e8eaed"><path d="M120-120v-720h720v720H120Zm80-80h560v-560H200v560Zm0 0v-560 560Z"/></svg>',
10
+ image: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M3 3v18h18V3H3zm16 16H5V5h14v14z"/></svg>',
11
11
  inputs: [
12
12
  createTextInput({
13
13
  name: "name",
@@ -1 +1 @@
1
- {"version":3,"file":"editorComponents/Fragment.manifest.js","sources":["../../src/editorComponents/Fragment.manifest.ts"],"sourcesContent":["\"use client\";\nimport { createTextInput } from \"@webiny/website-builder-sdk\";\nimport { createComponent } from \"~/createComponent.js\";\nimport { FragmentComponent } from \"./Fragment.js\";\n\nexport const Fragment = createComponent(FragmentComponent, {\n name: \"Webiny/Fragment\",\n label: \"Fragment\",\n useInAiContentGeneration: false,\n group: \"basic\",\n image: `<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e8eaed\"><path d=\"M120-120v-720h720v720H120Zm80-80h560v-560H200v560Zm0 0v-560 560Z\"/></svg>`,\n inputs: [\n createTextInput({\n name: \"name\",\n label: \"Fragment\",\n description: \"Select fragment to display.\",\n renderer: \"Webiny/FragmentSelector\"\n })\n ]\n});\n"],"names":["Fragment","createComponent","FragmentComponent","createTextInput"],"mappings":";;;;AAKO,MAAMA,WAAWC,gBAAgBC,mBAAmB;IACvD,MAAM;IACN,OAAO;IACP,0BAA0B;IAC1B,OAAO;IACP,OAAO;IACP,QAAQ;QACJC,gBAAgB;YACZ,MAAM;YACN,OAAO;YACP,aAAa;YACb,UAAU;QACd;KACH;AACL"}
1
+ {"version":3,"file":"editorComponents/Fragment.manifest.js","sources":["../../src/editorComponents/Fragment.manifest.ts"],"sourcesContent":["\"use client\";\nimport { createTextInput } from \"@webiny/website-builder-sdk\";\nimport { createComponent } from \"~/createComponent.js\";\nimport { FragmentComponent } from \"./Fragment.js\";\n\nexport const Fragment = createComponent(FragmentComponent, {\n name: \"Webiny/Fragment\",\n label: \"Fragment\",\n useInAiContentGeneration: false,\n group: \"basic\",\n image: `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M3 3v18h18V3H3zm16 16H5V5h14v14z\"/></svg>`,\n inputs: [\n createTextInput({\n name: \"name\",\n label: \"Fragment\",\n description: \"Select fragment to display.\",\n renderer: \"Webiny/FragmentSelector\"\n })\n ]\n});\n"],"names":["Fragment","createComponent","FragmentComponent","createTextInput"],"mappings":";;;;AAKO,MAAMA,WAAWC,gBAAgBC,mBAAmB;IACvD,MAAM;IACN,OAAO;IACP,0BAA0B;IAC1B,OAAO;IACP,OAAO;IACP,QAAQ;QACJC,gBAAgB;YACZ,MAAM;YACN,OAAO;YACP,aAAa;YACb,UAAU;QACd;KACH;AACL"}
@@ -6,7 +6,7 @@ const Grid = createComponent(GridComponent, {
6
6
  name: "Webiny/Grid",
7
7
  label: "Grid",
8
8
  aiContext: "Multi-column layout container. Set gridLayout to a dash-separated pattern (e.g. '6-6' for two equal columns, '8-4' for wide-narrow, '4-4-4' for three equal). Each segment becomes a GridColumn. Columns stack vertically on smaller screens when stackAtBreakpoint is set.",
9
- image: '<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e8eaed"><path d="M120-520v-320h320v320H120Zm0 400v-320h320v320H120Zm400-400v-320h320v320H520Zm0 400v-320h320v320H520ZM200-600h160v-160H200v160Zm400 0h160v-160H600v160Zm0 400h160v-160H600v160Zm-400 0h160v-160H200v160Zm400-400Zm0 240Zm-240 0Zm0-240Z"/></svg>',
9
+ image: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 20H4v-4h4v4zm0-6H4v-4h4v4zm0-6H4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4z"/></svg>',
10
10
  group: "basic",
11
11
  autoApplyStyles: false,
12
12
  inputs: [
@@ -1 +1 @@
1
- {"version":3,"file":"editorComponents/Grid.manifest.js","sources":["../../src/editorComponents/Grid.manifest.ts"],"sourcesContent":["\"use client\";\nimport {\n createBooleanInput,\n createElement,\n createNumberInput,\n createObjectInput,\n createSelectInput,\n createSlotInput,\n createTextInput\n} from \"@webiny/website-builder-sdk\";\nimport { createComponent } from \"~/createComponent.js\";\nimport { GridComponent } from \"./Grid.js\";\n\nexport interface Column {\n children: React.ReactNode;\n}\nexport const Grid = createComponent(GridComponent, {\n name: \"Webiny/Grid\",\n label: \"Grid\",\n aiContext:\n \"Multi-column layout container. Set gridLayout to a dash-separated pattern (e.g. '6-6' for two equal columns, '8-4' for wide-narrow, '4-4-4' for three equal). Each segment becomes a GridColumn. Columns stack vertically on smaller screens when stackAtBreakpoint is set.\",\n image: `<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e8eaed\"><path d=\"M120-520v-320h320v320H120Zm0 400v-320h320v320H120Zm400-400v-320h320v320H520Zm0 400v-320h320v320H520ZM200-600h160v-160H200v160Zm400 0h160v-160H600v160Zm0 400h160v-160H600v160Zm-400 0h160v-160H200v160Zm400-400Zm0 240Zm-240 0Zm0-240Z\"/></svg>`,\n group: \"basic\",\n autoApplyStyles: false,\n inputs: [\n createTextInput({\n name: \"gridLayout\",\n label: \"Grid Layout\",\n renderer: \"Webiny/GridLayout\",\n onChange: ({ inputs, createElement }) => {\n const rowColumnCount = inputs.gridLayout.split(\"-\").length;\n const columns = inputs.columns.length;\n\n const remainder = columns % rowColumnCount;\n\n if (remainder !== 0) {\n const fullColumnCount = rowColumnCount * inputs.rowCount;\n const toCreate =\n columns > fullColumnCount ? remainder : rowColumnCount - remainder;\n\n Array.from({ length: toCreate }).forEach(() => {\n inputs.columns.push({\n children: createElement({\n component: \"Webiny/GridColumn\"\n })\n });\n });\n }\n\n inputs.rowCount = inputs.columns.length / rowColumnCount;\n }\n }),\n createNumberInput({\n name: \"rowCount\",\n label: \"Row Count\",\n defaultValue: 1,\n minValue: 1,\n onChange: ({ inputs, createElement }) => {\n const gridLayout = inputs.gridLayout;\n const columnCount = gridLayout.split(\"-\").length;\n const rowCount = Math.max(1, inputs.rowCount);\n const columns = inputs.columns;\n const rows: Column[][] = [];\n\n // Chunk columns into rows\n for (let i = 0; i < columns.length; i += columnCount) {\n rows.push(columns.slice(i, i + columnCount));\n }\n\n if (rows.length > rowCount) {\n inputs.columns = columns.slice(0, columnCount * rowCount);\n return;\n }\n\n const createRows = Math.max(0, rowCount - rows.length);\n\n if (createRows <= 0) {\n return;\n }\n\n const newRows = Array.from({ length: createRows * columnCount }).map(() => {\n return {\n children: createElement({\n component: \"Webiny/GridColumn\"\n })\n };\n });\n\n inputs.columns.push(...newRows);\n }\n }),\n createNumberInput({\n name: \"rowGap\",\n label: \"Row Gap\",\n defaultValue: 0,\n responsive: true,\n onChange: ({ inputs, styles }) => {\n const rowGap = parseInt(inputs.rowGap);\n if (isNaN(rowGap)) {\n delete styles.rowGap;\n } else {\n styles.rowGap = `${inputs.rowGap}px`;\n }\n }\n }),\n createNumberInput({\n name: \"columnGap\",\n label: \"Column Gap\",\n defaultValue: 0,\n responsive: true,\n onChange: ({ inputs, styles }) => {\n const columnGap = parseInt(inputs.columnGap);\n if (isNaN(columnGap)) {\n delete styles.columnGap;\n } else {\n styles.columnGap = `${inputs.columnGap}px`;\n }\n }\n }),\n createSelectInput({\n name: \"stackAtBreakpoint\",\n label: \"Stack at breakpoint\",\n options: [\n { label: \"Tablet\", value: \"tablet\" },\n { label: \"Mobile\", value: \"mobile\" }\n ]\n }),\n createBooleanInput({\n name: \"reverseWhenStacked\",\n label: \"Reverse columns when stacked\"\n }),\n createObjectInput({\n name: \"columns\",\n list: true,\n hideFromUi: true,\n fields: [\n createSlotInput({\n name: \"children\",\n list: false,\n components: [\"Webiny/GridColumn\"]\n })\n ]\n })\n ],\n defaults: {\n inputs: {\n gridLayout: \"6-6\",\n columns: [\n {\n children: createElement({\n component: \"Webiny/GridColumn\",\n inputs: {\n children: [\n createElement({\n component: \"Webiny/Lexical\"\n })\n ]\n }\n })\n },\n {\n children: createElement({\n component: \"Webiny/GridColumn\",\n inputs: {\n children: [\n createElement({\n component: \"Webiny/Lexical\"\n })\n ]\n }\n })\n }\n ]\n },\n styles: {\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"row\",\n flexWrap: \"wrap\",\n justifyContent: \"flex-start\",\n alignItems: \"stretch\",\n width: \"100%\",\n marginTop: \"0px\",\n marginBottom: \"0px\",\n marginLeft: \"0px\",\n marginRight: \"0px\",\n paddingTop: \"5px\",\n paddingRight: \"5px\",\n paddingBottom: \"5px\",\n paddingLeft: \"5px\"\n }\n }\n});\n"],"names":["Grid","createComponent","GridComponent","createTextInput","inputs","createElement","rowColumnCount","columns","remainder","fullColumnCount","toCreate","Array","createNumberInput","gridLayout","columnCount","rowCount","Math","rows","i","createRows","newRows","styles","rowGap","parseInt","isNaN","columnGap","createSelectInput","createBooleanInput","createObjectInput","createSlotInput"],"mappings":";;;;AAgBO,MAAMA,OAAOC,gBAAgBC,eAAe;IAC/C,MAAM;IACN,OAAO;IACP,WACI;IACJ,OAAO;IACP,OAAO;IACP,iBAAiB;IACjB,QAAQ;QACJC,gBAAgB;YACZ,MAAM;YACN,OAAO;YACP,UAAU;YACV,UAAU,CAAC,EAAEC,MAAM,EAAEC,aAAa,EAAE;gBAChC,MAAMC,iBAAiBF,OAAO,UAAU,CAAC,KAAK,CAAC,KAAK,MAAM;gBAC1D,MAAMG,UAAUH,OAAO,OAAO,CAAC,MAAM;gBAErC,MAAMI,YAAYD,UAAUD;gBAE5B,IAAIE,AAAc,MAAdA,WAAiB;oBACjB,MAAMC,kBAAkBH,iBAAiBF,OAAO,QAAQ;oBACxD,MAAMM,WACFH,UAAUE,kBAAkBD,YAAYF,iBAAiBE;oBAE7DG,MAAM,IAAI,CAAC;wBAAE,QAAQD;oBAAS,GAAG,OAAO,CAAC;wBACrCN,OAAO,OAAO,CAAC,IAAI,CAAC;4BAChB,UAAUC,cAAc;gCACpB,WAAW;4BACf;wBACJ;o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,MAAM;YACN,OAAO;YACP,cAAc;YACd,YAAY;YACZ,UAAU,CAAC,EAAER,MAAM,EAAEiB,MAAM,EAAE;gBACzB,MAAMI,YAAYF,SAASnB,OAAO,SAAS;gBAC3C,IAAIoB,MAAMC,YACN,OAAOJ,OAAO,SAAS;qBAEvBA,OAAO,SAAS,GAAG,GAAGjB,OAAO,SAAS,CAAC,EAAE,CAAC;YAElD;QACJ;QACAsB,kBAAkB;YACd,MAAM;YACN,OAAO;YACP,SAAS;gBACL;oBAAE,OAAO;oBAAU,OAAO;gBAAS;gBACnC;oBAAE,OAAO;oBAAU,OAAO;gBAAS;aACtC;QACL;QACAC,mBAAmB;YACf,MAAM;YACN,OAAO;QACX;QACAC,kBAAkB;YACd,MAAM;YACN,MAAM;YACN,YAAY;YACZ,QAAQ;gBACJC,gBAAgB;oBACZ,MAAM;oBACN,MAAM;oBACN,YAAY;wBAAC;qBAAoB;gBACrC;aACH;QACL;KACH;IACD,UAAU;QACN,QAAQ;YACJ,YAAY;YACZ,SAAS;gBACL;oBACI,UAAUxB,kCAAc;wBACpB,WAAW;wBACX,QAAQ;4BACJ,UAAU;gCACNA,kCAAc;oCACV,WAAW;gCACf;6BACH;wBACL;oBACJ;gBACJ;gBACA;oBACI,UAAUA,kCAAc;wBACpB,WAAW;wBACX,QAAQ;4BACJ,UAAU;gCACNA,kCAAc;oCACV,WAAW;gCACf;6BACH;wBACL;oBACJ;gBACJ;aACH;QACL;QACA,QAAQ;YACJ,WAAW;YACX,SAAS;YACT,eAAe;YACf,UAAU;YACV,gBAAgB;YAChB,YAAY;YACZ,OAAO;YACP,WAAW;YACX,cAAc;YACd,YAAY;YACZ,aAAa;YACb,YAAY;YACZ,cAAc;YACd,eAAe;YACf,aAAa;QACjB;IACJ;AACJ"}
1
+ {"version":3,"file":"editorComponents/Grid.manifest.js","sources":["../../src/editorComponents/Grid.manifest.ts"],"sourcesContent":["\"use client\";\nimport {\n createBooleanInput,\n createElement,\n createNumberInput,\n createObjectInput,\n createSelectInput,\n createSlotInput,\n createTextInput\n} from \"@webiny/website-builder-sdk\";\nimport { createComponent } from \"~/createComponent.js\";\nimport { GridComponent } from \"./Grid.js\";\n\nexport interface Column {\n children: React.ReactNode;\n}\nexport const Grid = createComponent(GridComponent, {\n name: \"Webiny/Grid\",\n label: \"Grid\",\n aiContext:\n \"Multi-column layout container. Set gridLayout to a dash-separated pattern (e.g. '6-6' for two equal columns, '8-4' for wide-narrow, '4-4-4' for three equal). Each segment becomes a GridColumn. Columns stack vertically on smaller screens when stackAtBreakpoint is set.\",\n image: `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 20H4v-4h4v4zm0-6H4v-4h4v4zm0-6H4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4z\"/></svg>`,\n group: \"basic\",\n autoApplyStyles: false,\n inputs: [\n createTextInput({\n name: \"gridLayout\",\n label: \"Grid Layout\",\n renderer: \"Webiny/GridLayout\",\n onChange: ({ inputs, createElement }) => {\n const rowColumnCount = inputs.gridLayout.split(\"-\").length;\n const columns = inputs.columns.length;\n\n const remainder = columns % rowColumnCount;\n\n if (remainder !== 0) {\n const fullColumnCount = rowColumnCount * inputs.rowCount;\n const toCreate =\n columns > fullColumnCount ? remainder : rowColumnCount - remainder;\n\n Array.from({ length: toCreate }).forEach(() => {\n inputs.columns.push({\n children: createElement({\n component: \"Webiny/GridColumn\"\n })\n });\n });\n }\n\n inputs.rowCount = inputs.columns.length / rowColumnCount;\n }\n }),\n createNumberInput({\n name: \"rowCount\",\n label: \"Row Count\",\n defaultValue: 1,\n minValue: 1,\n onChange: ({ inputs, createElement }) => {\n const gridLayout = inputs.gridLayout;\n const columnCount = gridLayout.split(\"-\").length;\n const rowCount = Math.max(1, inputs.rowCount);\n const columns = inputs.columns;\n const rows: Column[][] = [];\n\n // Chunk columns into rows\n for (let i = 0; i < columns.length; i += columnCount) {\n rows.push(columns.slice(i, i + columnCount));\n }\n\n if (rows.length > rowCount) {\n inputs.columns = columns.slice(0, columnCount * rowCount);\n return;\n }\n\n const createRows = Math.max(0, rowCount - rows.length);\n\n if (createRows <= 0) {\n return;\n }\n\n const newRows = Array.from({ length: createRows * columnCount }).map(() => {\n return {\n children: createElement({\n component: \"Webiny/GridColumn\"\n })\n };\n });\n\n inputs.columns.push(...newRows);\n }\n }),\n createNumberInput({\n name: \"rowGap\",\n label: \"Row Gap\",\n defaultValue: 0,\n responsive: true,\n onChange: ({ inputs, styles }) => {\n const rowGap = parseInt(inputs.rowGap);\n if (isNaN(rowGap)) {\n delete styles.rowGap;\n } else {\n styles.rowGap = `${inputs.rowGap}px`;\n }\n }\n }),\n createNumberInput({\n name: \"columnGap\",\n label: \"Column Gap\",\n defaultValue: 0,\n responsive: true,\n onChange: ({ inputs, styles }) => {\n const columnGap = parseInt(inputs.columnGap);\n if (isNaN(columnGap)) {\n delete styles.columnGap;\n } else {\n styles.columnGap = `${inputs.columnGap}px`;\n }\n }\n }),\n createSelectInput({\n name: \"stackAtBreakpoint\",\n label: \"Stack at breakpoint\",\n options: [\n { label: \"Tablet\", value: \"tablet\" },\n { label: \"Mobile\", value: \"mobile\" }\n ]\n }),\n createBooleanInput({\n name: \"reverseWhenStacked\",\n label: \"Reverse columns when stacked\"\n }),\n createObjectInput({\n name: \"columns\",\n list: true,\n hideFromUi: true,\n fields: [\n createSlotInput({\n name: \"children\",\n list: false,\n components: [\"Webiny/GridColumn\"]\n })\n ]\n })\n ],\n defaults: {\n inputs: {\n gridLayout: \"6-6\",\n columns: [\n {\n children: createElement({\n component: \"Webiny/GridColumn\",\n inputs: {\n children: [\n createElement({\n component: \"Webiny/Lexical\"\n })\n ]\n }\n })\n },\n {\n children: createElement({\n component: \"Webiny/GridColumn\",\n inputs: {\n children: [\n createElement({\n component: \"Webiny/Lexical\"\n })\n ]\n }\n })\n }\n ]\n },\n styles: {\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"row\",\n flexWrap: \"wrap\",\n justifyContent: \"flex-start\",\n alignItems: \"stretch\",\n width: \"100%\",\n marginTop: \"0px\",\n marginBottom: \"0px\",\n marginLeft: \"0px\",\n marginRight: \"0px\",\n paddingTop: \"5px\",\n paddingRight: \"5px\",\n paddingBottom: \"5px\",\n paddingLeft: \"5px\"\n }\n }\n});\n"],"names":["Grid","createComponent","GridComponent","createTextInput","inputs","createElement","rowColumnCount","columns","remainder","fullColumnCount","toCreate","Array","createNumberInput","gridLayout","columnCount","rowCount","Math","rows","i","createRows","newRows","styles","rowGap","parseInt","isNaN","columnGap","createSelectInput","createBooleanInput","createObjectInput","createSlotInput"],"mappings":";;;;AAgBO,MAAMA,OAAOC,gBAAgBC,eAAe;IAC/C,MAAM;IACN,OAAO;IACP,WACI;IACJ,OAAO;IACP,OAAO;IACP,iBAAiB;IACjB,QAAQ;QACJC,gBAAgB;YACZ,MAAM;YACN,OAAO;YACP,UAAU;YACV,UAAU,CAAC,EAAEC,MAAM,EAAEC,aAAa,EAAE;gBAChC,MAAMC,iBAAiBF,OAAO,UAAU,CAAC,KAAK,CAAC,KAAK,MAAM;gBAC1D,MAAMG,UAAUH,OAAO,OAAO,CAAC,MAAM;gBAErC,MAAMI,YAAYD,UAAUD;gBAE5B,IAAIE,AAAc,MAAdA,WAAiB;oBACjB,MAAMC,kBAAkBH,iBAAiBF,OAAO,QAAQ;oBACxD,MAAMM,WACFH,UAAUE,kBAAkBD,YAAYF,iBAAiBE;oBAE7DG,MAAM,IAAI,CAAC;wBAAE,QAAQD;oBAAS,GAAG,OAAO,CAAC;wBACrCN,OAAO,OAAO,CAAC,IAAI,CAAC;4BAChB,UAAUC,cAAc;gCACpB,WAAW;4BACf;wBACJ;oBACJ;gBACJ;g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AO;YACP,cAAc;YACd,YAAY;YACZ,UAAU,CAAC,EAAER,MAAM,EAAEiB,MAAM,EAAE;gBACzB,MAAMI,YAAYF,SAASnB,OAAO,SAAS;gBAC3C,IAAIoB,MAAMC,YACN,OAAOJ,OAAO,SAAS;qBAEvBA,OAAO,SAAS,GAAG,GAAGjB,OAAO,SAAS,CAAC,EAAE,CAAC;YAElD;QACJ;QACAsB,kBAAkB;YACd,MAAM;YACN,OAAO;YACP,SAAS;gBACL;oBAAE,OAAO;oBAAU,OAAO;gBAAS;gBACnC;oBAAE,OAAO;oBAAU,OAAO;gBAAS;aACtC;QACL;QACAC,mBAAmB;YACf,MAAM;YACN,OAAO;QACX;QACAC,kBAAkB;YACd,MAAM;YACN,MAAM;YACN,YAAY;YACZ,QAAQ;gBACJC,gBAAgB;oBACZ,MAAM;oBACN,MAAM;oBACN,YAAY;wBAAC;qBAAoB;gBACrC;aACH;QACL;KACH;IACD,UAAU;QACN,QAAQ;YACJ,YAAY;YACZ,SAAS;gBACL;oBACI,UAAUxB,kCAAc;wBACpB,WAAW;wBACX,QAAQ;4BACJ,UAAU;gCACNA,kCAAc;oCACV,WAAW;gCACf;6BACH;wBACL;oBACJ;gBACJ;gBACA;oBACI,UAAUA,kCAAc;wBACpB,WAAW;wBACX,QAAQ;4BACJ,UAAU;gCACNA,kCAAc;oCACV,WAAW;gCACf;6BACH;wBACL;oBACJ;gBACJ;aACH;QACL;QACA,QAAQ;YACJ,WAAW;YACX,SAAS;YACT,eAAe;YACf,UAAU;YACV,gBAAgB;YAChB,YAAY;YACZ,OAAO;YACP,WAAW;YACX,cAAc;YACd,YAAY;YACZ,aAAa;YACb,YAAY;YACZ,cAAc;YACd,eAAe;YACf,aAAa;QACjB;IACJ;AACJ"}
@@ -7,7 +7,7 @@ const Image = createComponent(ImageComponent, {
7
7
  label: "Image",
8
8
  aiContext: "Displays an image from the file manager with configurable title and alt text.",
9
9
  group: "basic",
10
- image: '<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px"><path d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm40-80h480L570-480 450-320l-90-120-120 160Zm-40 80v-560 560Z"/></svg>',
10
+ image: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86-3 3.87L9 13.14 6 17h12l-3.86-5.14z"/></svg>',
11
11
  autoApplyStyles: false,
12
12
  inputs: {
13
13
  image: createFileInput({
@@ -1 +1 @@
1
- {"version":3,"file":"editorComponents/Image.manifest.js","sources":["../../src/editorComponents/Image.manifest.ts"],"sourcesContent":["\"use client\";\nimport { createFileInput, createTextInput } from \"@webiny/website-builder-sdk\";\nimport { createComponent } from \"~/createComponent.js\";\nimport { ImageComponent } from \"./Image.js\";\n\nexport const Image = createComponent(ImageComponent, {\n name: \"Webiny/Image\",\n label: \"Image\",\n aiContext: \"Displays an image from the file manager with configurable title and alt text.\",\n group: \"basic\",\n image: `<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"><path d=\"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm40-80h480L570-480 450-320l-90-120-120 160Zm-40 80v-560 560Z\"/></svg>`,\n autoApplyStyles: false,\n inputs: {\n image: createFileInput({\n label: \"Image\",\n allowedFileTypes: [\"image/*\"],\n onChange: ({ inputs }) => {\n if (inputs.image) {\n inputs.title = inputs.image.name;\n inputs.altText = inputs.image.name;\n }\n }\n }),\n title: createTextInput({\n label: \"Title\",\n description: \"Title of the image\"\n }),\n altText: createTextInput({\n label: \"Alternate Text\",\n description: \"Shown when the user has disabled images\"\n })\n },\n defaults: {\n styles: {\n width: \"100%\"\n }\n }\n});\n"],"names":["Image","createComponent","ImageComponent","createFileInput","inputs","createTextInput"],"mappings":";;;;AAKO,MAAMA,QAAQC,gBAAgBC,gBAAgB;IACjD,MAAM;IACN,OAAO;IACP,WAAW;IACX,OAAO;IACP,OAAO;IACP,iBAAiB;IACjB,QAAQ;QACJ,OAAOC,gBAAgB;YACnB,OAAO;YACP,kBAAkB;gBAAC;aAAU;YAC7B,UAAU,CAAC,EAAEC,MAAM,EAAE;gBACjB,IAAIA,OAAO,KAAK,EAAE;oBACdA,OAAO,KAAK,GAAGA,OAAO,KAAK,CAAC,IAAI;oBAChCA,OAAO,OAAO,GAAGA,OAAO,KAAK,CAAC,IAAI;gBACtC;YACJ;QACJ;QACA,OAAOC,gBAAgB;YACnB,OAAO;YACP,aAAa;QACjB;QACA,SAASA,gBAAgB;YACrB,OAAO;YACP,aAAa;QACjB;IACJ;IACA,UAAU;QACN,QAAQ;YACJ,OAAO;QACX;IACJ;AACJ"}
1
+ {"version":3,"file":"editorComponents/Image.manifest.js","sources":["../../src/editorComponents/Image.manifest.ts"],"sourcesContent":["\"use client\";\nimport { createFileInput, createTextInput } from \"@webiny/website-builder-sdk\";\nimport { createComponent } from \"~/createComponent.js\";\nimport { ImageComponent } from \"./Image.js\";\n\nexport const Image = createComponent(ImageComponent, {\n name: \"Webiny/Image\",\n label: \"Image\",\n aiContext: \"Displays an image from the file manager with configurable title and alt text.\",\n group: \"basic\",\n image: `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86-3 3.87L9 13.14 6 17h12l-3.86-5.14z\"/></svg>`,\n autoApplyStyles: false,\n inputs: {\n image: createFileInput({\n label: \"Image\",\n allowedFileTypes: [\"image/*\"],\n onChange: ({ inputs }) => {\n if (inputs.image) {\n inputs.title = inputs.image.name;\n inputs.altText = inputs.image.name;\n }\n }\n }),\n title: createTextInput({\n label: \"Title\",\n description: \"Title of the image\"\n }),\n altText: createTextInput({\n label: \"Alternate Text\",\n description: \"Shown when the user has disabled images\"\n })\n },\n defaults: {\n styles: {\n width: \"100%\"\n }\n }\n});\n"],"names":["Image","createComponent","ImageComponent","createFileInput","inputs","createTextInput"],"mappings":";;;;AAKO,MAAMA,QAAQC,gBAAgBC,gBAAgB;IACjD,MAAM;IACN,OAAO;IACP,WAAW;IACX,OAAO;IACP,OAAO;IACP,iBAAiB;IACjB,QAAQ;QACJ,OAAOC,gBAAgB;YACnB,OAAO;YACP,kBAAkB;gBAAC;aAAU;YAC7B,UAAU,CAAC,EAAEC,MAAM,EAAE;gBACjB,IAAIA,OAAO,KAAK,EAAE;oBACdA,OAAO,KAAK,GAAGA,OAAO,KAAK,CAAC,IAAI;oBAChCA,OAAO,OAAO,GAAGA,OAAO,KAAK,CAAC,IAAI;gBACtC;YACJ;QACJ;QACA,OAAOC,gBAAgB;YACnB,OAAO;YACP,aAAa;QACjB;QACA,SAASA,gBAAgB;YACrB,OAAO;YACP,aAAa;QACjB;IACJ;IACA,UAAU;QACN,QAAQ;YACJ,OAAO;QACX;IACJ;AACJ"}
@@ -7,7 +7,7 @@ const Lexical = createComponent(LexicalComponent, {
7
7
  label: "Rich Text",
8
8
  aiContext: "Rich text content. Generate semantic HTML tags. Do NOT generate markdown.",
9
9
  group: "basic",
10
- image: '<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px"><path d="M280-160v-520H80v-120h520v120H400v520H280Zm360 0v-320H520v-120h360v120H760v320H640Z"/></svg>',
10
+ image: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/><path d="M14 17H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"/></svg>',
11
11
  inputs: [
12
12
  createLexicalInput({
13
13
  name: "content",
@@ -1 +1 @@
1
- {"version":3,"file":"editorComponents/Lexical.manifest.js","sources":["../../src/editorComponents/Lexical.manifest.ts"],"sourcesContent":["\"use client\";\nimport { createLexicalInput } from \"@webiny/website-builder-sdk\";\nimport { createComponent } from \"~/createComponent.js\";\nimport { LexicalComponent, createLexicalValue } from \"./Lexical.js\";\n\nexport const Lexical = createComponent(LexicalComponent, {\n name: \"Webiny/Lexical\",\n label: \"Rich Text\",\n aiContext: \"Rich text content. Generate semantic HTML tags. Do NOT generate markdown.\",\n group: \"basic\",\n image: `<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"><path d=\"M280-160v-520H80v-120h520v120H400v520H280Zm360 0v-320H520v-120h360v120H760v320H640Z\"/></svg>`,\n inputs: [\n createLexicalInput({\n name: \"content\",\n label: \"Content\"\n })\n ],\n defaults: {\n inputs: {\n content: createLexicalValue(\n \"Examine she brother prudent add day ham. Far stairs now coming bed oppose hunted become his. You zealously departure had procuring suspicion. Books whose front would purse if be do decay. Quitting you way formerly disposed perceive ladyship are. Common turned boy direct and yet.\"\n )\n }\n }\n});\n"],"names":["Lexical","createComponent","LexicalComponent","createLexicalInput","createLexicalValue"],"mappings":";;;;AAKO,MAAMA,UAAUC,gBAAgBC,kBAAkB;IACrD,MAAM;IACN,OAAO;IACP,WAAW;IACX,OAAO;IACP,OAAO;IACP,QAAQ;QACJC,mBAAmB;YACf,MAAM;YACN,OAAO;QACX;KACH;IACD,UAAU;QACN,QAAQ;YACJ,SAASC,mBACL;QAER;IACJ;AACJ"}
1
+ {"version":3,"file":"editorComponents/Lexical.manifest.js","sources":["../../src/editorComponents/Lexical.manifest.ts"],"sourcesContent":["\"use client\";\nimport { createLexicalInput } from \"@webiny/website-builder-sdk\";\nimport { createComponent } from \"~/createComponent.js\";\nimport { LexicalComponent, createLexicalValue } from \"./Lexical.js\";\n\nexport const Lexical = createComponent(LexicalComponent, {\n name: \"Webiny/Lexical\",\n label: \"Rich Text\",\n aiContext: \"Rich text content. Generate semantic HTML tags. Do NOT generate markdown.\",\n group: \"basic\",\n image: `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z\"/><path d=\"M14 17H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z\"/></svg>`,\n inputs: [\n createLexicalInput({\n name: \"content\",\n label: \"Content\"\n })\n ],\n defaults: {\n inputs: {\n content: createLexicalValue(\n \"Examine she brother prudent add day ham. Far stairs now coming bed oppose hunted become his. You zealously departure had procuring suspicion. Books whose front would purse if be do decay. Quitting you way formerly disposed perceive ladyship are. Common turned boy direct and yet.\"\n )\n }\n }\n});\n"],"names":["Lexical","createComponent","LexicalComponent","createLexicalInput","createLexicalValue"],"mappings":";;;;AAKO,MAAMA,UAAUC,gBAAgBC,kBAAkB;IACrD,MAAM;IACN,OAAO;IACP,WAAW;IACX,OAAO;IACP,OAAO;IACP,QAAQ;QACJC,mBAAmB;YACf,MAAM;YACN,OAAO;QACX;KACH;IACD,UAAU;QACN,QAAQ;YACJ,SAASC,mBACL;QAER;IACJ;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/website-builder-react",
3
- "version": "6.4.0-beta.2",
3
+ "version": "6.4.0-beta.4",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,7 +17,7 @@
17
17
  ],
18
18
  "license": "MIT",
19
19
  "dependencies": {
20
- "@webiny/website-builder-sdk": "6.4.0-beta.2",
20
+ "@webiny/website-builder-sdk": "6.4.0-beta.4",
21
21
  "deep-equal": "2.2.3",
22
22
  "mobx": "6.15.3",
23
23
  "mobx-react-lite": "4.1.1",
@@ -25,14 +25,15 @@
25
25
  "react-dom": "18.3.1"
26
26
  },
27
27
  "devDependencies": {
28
- "@types/react": "18.3.28",
29
- "@webiny/build-tools": "6.4.0-beta.2",
28
+ "@types/react": "18.3.29",
29
+ "@webiny/build-tools": "6.4.0-beta.4",
30
30
  "typescript": "6.0.3",
31
- "vitest": "4.1.6"
31
+ "vitest": "4.1.7"
32
32
  },
33
33
  "publishConfig": {
34
- "access": "public",
35
- "directory": "dist"
34
+ "access": "public"
36
35
  },
37
- "gitHead": "872f9f50baa1ff6915a5f338216f84bf0b6dfd24"
36
+ "webiny": {
37
+ "publishFrom": "dist"
38
+ }
38
39
  }