@puckeditor/plugin-pages 0.8.0-canary.9c5fbcbb → 0.8.0-canary.ad0c4c0e
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.
- package/dist/index.js +101 -63
- package/dist/index.mjs +105 -64
- package/package.json +14 -14
package/dist/index.js
CHANGED
|
@@ -115,25 +115,40 @@ init_react_import();
|
|
|
115
115
|
// src/index.tsx
|
|
116
116
|
init_react_import();
|
|
117
117
|
|
|
118
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
118
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/lucide-react.js
|
|
119
119
|
init_react_import();
|
|
120
120
|
|
|
121
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
121
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
122
122
|
init_react_import();
|
|
123
123
|
var import_react3 = require("react");
|
|
124
124
|
|
|
125
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
125
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
126
126
|
init_react_import();
|
|
127
127
|
var toKebabCase = (string4) => string4.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
128
|
+
var toCamelCase = (string4) => string4.replace(
|
|
129
|
+
/^([A-Z])|[\s-_]+(\w)/g,
|
|
130
|
+
(match2, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
|
|
131
|
+
);
|
|
132
|
+
var toPascalCase = (string4) => {
|
|
133
|
+
const camelCase2 = toCamelCase(string4);
|
|
134
|
+
return camelCase2.charAt(0).toUpperCase() + camelCase2.slice(1);
|
|
135
|
+
};
|
|
128
136
|
var mergeClasses = (...classes) => classes.filter((className, index2, array2) => {
|
|
129
|
-
return Boolean(className) && array2.indexOf(className) === index2;
|
|
130
|
-
}).join(" ");
|
|
137
|
+
return Boolean(className) && className.trim() !== "" && array2.indexOf(className) === index2;
|
|
138
|
+
}).join(" ").trim();
|
|
139
|
+
var hasA11yProp = (props) => {
|
|
140
|
+
for (const prop in props) {
|
|
141
|
+
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
|
142
|
+
return true;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
};
|
|
131
146
|
|
|
132
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
147
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/Icon.js
|
|
133
148
|
init_react_import();
|
|
134
149
|
var import_react2 = require("react");
|
|
135
150
|
|
|
136
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
151
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
137
152
|
init_react_import();
|
|
138
153
|
var defaultAttributes = {
|
|
139
154
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -147,7 +162,7 @@ var defaultAttributes = {
|
|
|
147
162
|
strokeLinejoin: "round"
|
|
148
163
|
};
|
|
149
164
|
|
|
150
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
165
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/Icon.js
|
|
151
166
|
var Icon = (0, import_react2.forwardRef)(
|
|
152
167
|
({
|
|
153
168
|
color = "currentColor",
|
|
@@ -158,64 +173,67 @@ var Icon = (0, import_react2.forwardRef)(
|
|
|
158
173
|
children,
|
|
159
174
|
iconNode,
|
|
160
175
|
...rest
|
|
161
|
-
}, ref) =>
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
176
|
+
}, ref) => (0, import_react2.createElement)(
|
|
177
|
+
"svg",
|
|
178
|
+
{
|
|
179
|
+
ref,
|
|
180
|
+
...defaultAttributes,
|
|
181
|
+
width: size4,
|
|
182
|
+
height: size4,
|
|
183
|
+
stroke: color,
|
|
184
|
+
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size4) : strokeWidth,
|
|
185
|
+
className: mergeClasses("lucide", className),
|
|
186
|
+
...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
|
|
187
|
+
...rest
|
|
188
|
+
},
|
|
189
|
+
[
|
|
190
|
+
...iconNode.map(([tag, attrs]) => (0, import_react2.createElement)(tag, attrs)),
|
|
191
|
+
...Array.isArray(children) ? children : [children]
|
|
192
|
+
]
|
|
193
|
+
)
|
|
180
194
|
);
|
|
181
195
|
|
|
182
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
196
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
183
197
|
var createLucideIcon = (iconName, iconNode) => {
|
|
184
198
|
const Component = (0, import_react3.forwardRef)(
|
|
185
199
|
({ className, ...props }, ref) => (0, import_react3.createElement)(Icon, {
|
|
186
200
|
ref,
|
|
187
201
|
iconNode,
|
|
188
|
-
className: mergeClasses(
|
|
202
|
+
className: mergeClasses(
|
|
203
|
+
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
|
204
|
+
`lucide-${iconName}`,
|
|
205
|
+
className
|
|
206
|
+
),
|
|
189
207
|
...props
|
|
190
208
|
})
|
|
191
209
|
);
|
|
192
|
-
Component.displayName =
|
|
210
|
+
Component.displayName = toPascalCase(iconName);
|
|
193
211
|
return Component;
|
|
194
212
|
};
|
|
195
213
|
|
|
196
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
214
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/check.js
|
|
197
215
|
init_react_import();
|
|
198
|
-
var
|
|
216
|
+
var __iconNode = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
217
|
+
var Check = createLucideIcon("check", __iconNode);
|
|
199
218
|
|
|
200
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
219
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/chevron-down.js
|
|
201
220
|
init_react_import();
|
|
202
|
-
var
|
|
203
|
-
|
|
204
|
-
]);
|
|
221
|
+
var __iconNode2 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
222
|
+
var ChevronDown = createLucideIcon("chevron-down", __iconNode2);
|
|
205
223
|
|
|
206
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
224
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/chevron-right.js
|
|
207
225
|
init_react_import();
|
|
208
|
-
var
|
|
209
|
-
|
|
210
|
-
]);
|
|
226
|
+
var __iconNode3 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
227
|
+
var ChevronRight = createLucideIcon("chevron-right", __iconNode3);
|
|
211
228
|
|
|
212
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
229
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/chevron-up.js
|
|
213
230
|
init_react_import();
|
|
214
|
-
var
|
|
231
|
+
var __iconNode4 = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
232
|
+
var ChevronUp = createLucideIcon("chevron-up", __iconNode4);
|
|
215
233
|
|
|
216
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
234
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/eye-off.js
|
|
217
235
|
init_react_import();
|
|
218
|
-
var
|
|
236
|
+
var __iconNode5 = [
|
|
219
237
|
[
|
|
220
238
|
"path",
|
|
221
239
|
{
|
|
@@ -232,33 +250,43 @@ var EyeOff = createLucideIcon("EyeOff", [
|
|
|
232
250
|
}
|
|
233
251
|
],
|
|
234
252
|
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
235
|
-
]
|
|
253
|
+
];
|
|
254
|
+
var EyeOff = createLucideIcon("eye-off", __iconNode5);
|
|
236
255
|
|
|
237
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
256
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/file-text.js
|
|
238
257
|
init_react_import();
|
|
239
|
-
var
|
|
240
|
-
[
|
|
241
|
-
|
|
258
|
+
var __iconNode6 = [
|
|
259
|
+
[
|
|
260
|
+
"path",
|
|
261
|
+
{
|
|
262
|
+
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
263
|
+
key: "1oefj6"
|
|
264
|
+
}
|
|
265
|
+
],
|
|
266
|
+
["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
|
|
242
267
|
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
243
268
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
244
269
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
245
|
-
]
|
|
270
|
+
];
|
|
271
|
+
var FileText = createLucideIcon("file-text", __iconNode6);
|
|
246
272
|
|
|
247
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
273
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/globe.js
|
|
248
274
|
init_react_import();
|
|
249
|
-
var
|
|
275
|
+
var __iconNode7 = [
|
|
250
276
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
251
277
|
["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
|
|
252
278
|
["path", { d: "M2 12h20", key: "9i4pu4" }]
|
|
253
|
-
]
|
|
279
|
+
];
|
|
280
|
+
var Globe = createLucideIcon("globe", __iconNode7);
|
|
254
281
|
|
|
255
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
282
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/trash.js
|
|
256
283
|
init_react_import();
|
|
257
|
-
var
|
|
284
|
+
var __iconNode8 = [
|
|
285
|
+
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
258
286
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
259
|
-
["path", { d: "
|
|
260
|
-
|
|
261
|
-
|
|
287
|
+
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
288
|
+
];
|
|
289
|
+
var Trash = createLucideIcon("trash", __iconNode8);
|
|
262
290
|
|
|
263
291
|
// ../platform-client/components/Toast/index.ts
|
|
264
292
|
init_react_import();
|
|
@@ -29856,6 +29884,17 @@ var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
|
29856
29884
|
var cx9 = getClassNameFactory2("Pages", styles_module_default7);
|
|
29857
29885
|
var cxPage = getClassNameFactory2("PagesPage", styles_module_default7);
|
|
29858
29886
|
var cxVersion = getClassNameFactory2("PagesVersion", styles_module_default7);
|
|
29887
|
+
function registerDynamicConfig(config2, data) {
|
|
29888
|
+
const dynamicConfig = data.root?.props?._dynamicConfig;
|
|
29889
|
+
if (!dynamicConfig?.components) return;
|
|
29890
|
+
for (const [name, def] of Object.entries(dynamicConfig.components)) {
|
|
29891
|
+
if (config2.components[name]) continue;
|
|
29892
|
+
config2.components[name] = {
|
|
29893
|
+
fields: { ...def.fields ?? {} },
|
|
29894
|
+
render: () => null
|
|
29895
|
+
};
|
|
29896
|
+
}
|
|
29897
|
+
}
|
|
29859
29898
|
var PagePlugin = (opts) => {
|
|
29860
29899
|
const getPuck = (0, import_core11.useGetPuck)();
|
|
29861
29900
|
const [confirmModalOpen, setConfirmModalOpen] = (0, import_react25.useState)(false);
|
|
@@ -29899,10 +29938,9 @@ var PagePlugin = (opts) => {
|
|
|
29899
29938
|
const getPageState = (0, import_react25.useCallback)(
|
|
29900
29939
|
async (data) => {
|
|
29901
29940
|
const { appState, config: config2 } = getPuck();
|
|
29902
|
-
const
|
|
29903
|
-
|
|
29904
|
-
|
|
29905
|
-
);
|
|
29941
|
+
const pageData = data && Object.keys(data).length > 0 ? data : appState.data;
|
|
29942
|
+
registerDynamicConfig(config2, pageData);
|
|
29943
|
+
const resolvedData = await (0, import_core11.resolveAllData)(pageData, config2);
|
|
29906
29944
|
const nextState = {
|
|
29907
29945
|
...appState,
|
|
29908
29946
|
data: resolvedData,
|
|
@@ -30697,7 +30735,7 @@ lucide-react/dist/esm/icons/globe.js:
|
|
|
30697
30735
|
lucide-react/dist/esm/icons/trash.js:
|
|
30698
30736
|
lucide-react/dist/esm/lucide-react.js:
|
|
30699
30737
|
(**
|
|
30700
|
-
* @license lucide-react v0.
|
|
30738
|
+
* @license lucide-react v0.554.0 - ISC
|
|
30701
30739
|
*
|
|
30702
30740
|
* This source code is licensed under the ISC license.
|
|
30703
30741
|
* See the LICENSE file in the root directory of this source tree.
|
package/dist/index.mjs
CHANGED
|
@@ -107,25 +107,40 @@ init_react_import();
|
|
|
107
107
|
// src/index.tsx
|
|
108
108
|
init_react_import();
|
|
109
109
|
|
|
110
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
110
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/lucide-react.js
|
|
111
111
|
init_react_import();
|
|
112
112
|
|
|
113
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
113
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
114
114
|
init_react_import();
|
|
115
115
|
import { forwardRef as forwardRef2, createElement as createElement2 } from "react";
|
|
116
116
|
|
|
117
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
117
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
118
118
|
init_react_import();
|
|
119
119
|
var toKebabCase = (string4) => string4.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
120
|
+
var toCamelCase = (string4) => string4.replace(
|
|
121
|
+
/^([A-Z])|[\s-_]+(\w)/g,
|
|
122
|
+
(match2, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
|
|
123
|
+
);
|
|
124
|
+
var toPascalCase = (string4) => {
|
|
125
|
+
const camelCase2 = toCamelCase(string4);
|
|
126
|
+
return camelCase2.charAt(0).toUpperCase() + camelCase2.slice(1);
|
|
127
|
+
};
|
|
120
128
|
var mergeClasses = (...classes) => classes.filter((className, index2, array2) => {
|
|
121
|
-
return Boolean(className) && array2.indexOf(className) === index2;
|
|
122
|
-
}).join(" ");
|
|
129
|
+
return Boolean(className) && className.trim() !== "" && array2.indexOf(className) === index2;
|
|
130
|
+
}).join(" ").trim();
|
|
131
|
+
var hasA11yProp = (props) => {
|
|
132
|
+
for (const prop in props) {
|
|
133
|
+
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
|
134
|
+
return true;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
};
|
|
123
138
|
|
|
124
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
139
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/Icon.js
|
|
125
140
|
init_react_import();
|
|
126
141
|
import { forwardRef, createElement } from "react";
|
|
127
142
|
|
|
128
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
143
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
129
144
|
init_react_import();
|
|
130
145
|
var defaultAttributes = {
|
|
131
146
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -139,7 +154,7 @@ var defaultAttributes = {
|
|
|
139
154
|
strokeLinejoin: "round"
|
|
140
155
|
};
|
|
141
156
|
|
|
142
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
157
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/Icon.js
|
|
143
158
|
var Icon = forwardRef(
|
|
144
159
|
({
|
|
145
160
|
color = "currentColor",
|
|
@@ -150,64 +165,67 @@ var Icon = forwardRef(
|
|
|
150
165
|
children,
|
|
151
166
|
iconNode,
|
|
152
167
|
...rest
|
|
153
|
-
}, ref) =>
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}
|
|
168
|
+
}, ref) => createElement(
|
|
169
|
+
"svg",
|
|
170
|
+
{
|
|
171
|
+
ref,
|
|
172
|
+
...defaultAttributes,
|
|
173
|
+
width: size4,
|
|
174
|
+
height: size4,
|
|
175
|
+
stroke: color,
|
|
176
|
+
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size4) : strokeWidth,
|
|
177
|
+
className: mergeClasses("lucide", className),
|
|
178
|
+
...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
|
|
179
|
+
...rest
|
|
180
|
+
},
|
|
181
|
+
[
|
|
182
|
+
...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),
|
|
183
|
+
...Array.isArray(children) ? children : [children]
|
|
184
|
+
]
|
|
185
|
+
)
|
|
172
186
|
);
|
|
173
187
|
|
|
174
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
188
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
175
189
|
var createLucideIcon = (iconName, iconNode) => {
|
|
176
190
|
const Component = forwardRef2(
|
|
177
191
|
({ className, ...props }, ref) => createElement2(Icon, {
|
|
178
192
|
ref,
|
|
179
193
|
iconNode,
|
|
180
|
-
className: mergeClasses(
|
|
194
|
+
className: mergeClasses(
|
|
195
|
+
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
|
196
|
+
`lucide-${iconName}`,
|
|
197
|
+
className
|
|
198
|
+
),
|
|
181
199
|
...props
|
|
182
200
|
})
|
|
183
201
|
);
|
|
184
|
-
Component.displayName =
|
|
202
|
+
Component.displayName = toPascalCase(iconName);
|
|
185
203
|
return Component;
|
|
186
204
|
};
|
|
187
205
|
|
|
188
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
206
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/check.js
|
|
189
207
|
init_react_import();
|
|
190
|
-
var
|
|
208
|
+
var __iconNode = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
209
|
+
var Check = createLucideIcon("check", __iconNode);
|
|
191
210
|
|
|
192
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
211
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/chevron-down.js
|
|
193
212
|
init_react_import();
|
|
194
|
-
var
|
|
195
|
-
|
|
196
|
-
]);
|
|
213
|
+
var __iconNode2 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
214
|
+
var ChevronDown = createLucideIcon("chevron-down", __iconNode2);
|
|
197
215
|
|
|
198
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
216
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/chevron-right.js
|
|
199
217
|
init_react_import();
|
|
200
|
-
var
|
|
201
|
-
|
|
202
|
-
]);
|
|
218
|
+
var __iconNode3 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
219
|
+
var ChevronRight = createLucideIcon("chevron-right", __iconNode3);
|
|
203
220
|
|
|
204
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
221
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/chevron-up.js
|
|
205
222
|
init_react_import();
|
|
206
|
-
var
|
|
223
|
+
var __iconNode4 = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
224
|
+
var ChevronUp = createLucideIcon("chevron-up", __iconNode4);
|
|
207
225
|
|
|
208
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
226
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/eye-off.js
|
|
209
227
|
init_react_import();
|
|
210
|
-
var
|
|
228
|
+
var __iconNode5 = [
|
|
211
229
|
[
|
|
212
230
|
"path",
|
|
213
231
|
{
|
|
@@ -224,33 +242,43 @@ var EyeOff = createLucideIcon("EyeOff", [
|
|
|
224
242
|
}
|
|
225
243
|
],
|
|
226
244
|
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
227
|
-
]
|
|
245
|
+
];
|
|
246
|
+
var EyeOff = createLucideIcon("eye-off", __iconNode5);
|
|
228
247
|
|
|
229
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
248
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/file-text.js
|
|
230
249
|
init_react_import();
|
|
231
|
-
var
|
|
232
|
-
[
|
|
233
|
-
|
|
250
|
+
var __iconNode6 = [
|
|
251
|
+
[
|
|
252
|
+
"path",
|
|
253
|
+
{
|
|
254
|
+
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
255
|
+
key: "1oefj6"
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
|
|
234
259
|
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
235
260
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
236
261
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
237
|
-
]
|
|
262
|
+
];
|
|
263
|
+
var FileText = createLucideIcon("file-text", __iconNode6);
|
|
238
264
|
|
|
239
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
265
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/globe.js
|
|
240
266
|
init_react_import();
|
|
241
|
-
var
|
|
267
|
+
var __iconNode7 = [
|
|
242
268
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
243
269
|
["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
|
|
244
270
|
["path", { d: "M2 12h20", key: "9i4pu4" }]
|
|
245
|
-
]
|
|
271
|
+
];
|
|
272
|
+
var Globe = createLucideIcon("globe", __iconNode7);
|
|
246
273
|
|
|
247
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
|
274
|
+
// ../../node_modules/.pnpm/lucide-react@0.554.0_react@19.1.1/node_modules/lucide-react/dist/esm/icons/trash.js
|
|
248
275
|
init_react_import();
|
|
249
|
-
var
|
|
276
|
+
var __iconNode8 = [
|
|
277
|
+
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
250
278
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
251
|
-
["path", { d: "
|
|
252
|
-
|
|
253
|
-
|
|
279
|
+
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
280
|
+
];
|
|
281
|
+
var Trash = createLucideIcon("trash", __iconNode8);
|
|
254
282
|
|
|
255
283
|
// ../platform-client/components/Toast/index.ts
|
|
256
284
|
init_react_import();
|
|
@@ -13546,7 +13574,10 @@ var styles_module_default7 = { "Pages": "_Pages_ey49w_5", "Pages-addPage": "_Pag
|
|
|
13546
13574
|
|
|
13547
13575
|
// src/components/PagePlugin/index.tsx
|
|
13548
13576
|
import { useCallback as useCallback9, useEffect as useEffect29, useMemo as useMemo22, useRef as useRef22, useState as useState30 } from "react";
|
|
13549
|
-
import {
|
|
13577
|
+
import {
|
|
13578
|
+
resolveAllData as resolveAllData2,
|
|
13579
|
+
useGetPuck as useGetPuck2
|
|
13580
|
+
} from "@puckeditor/core";
|
|
13550
13581
|
|
|
13551
13582
|
// src/components/CreateForm/index.tsx
|
|
13552
13583
|
init_react_import();
|
|
@@ -29848,6 +29879,17 @@ import { jsx as jsx43, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
|
29848
29879
|
var cx9 = getClassNameFactory2("Pages", styles_module_default7);
|
|
29849
29880
|
var cxPage = getClassNameFactory2("PagesPage", styles_module_default7);
|
|
29850
29881
|
var cxVersion = getClassNameFactory2("PagesVersion", styles_module_default7);
|
|
29882
|
+
function registerDynamicConfig(config2, data) {
|
|
29883
|
+
const dynamicConfig = data.root?.props?._dynamicConfig;
|
|
29884
|
+
if (!dynamicConfig?.components) return;
|
|
29885
|
+
for (const [name, def] of Object.entries(dynamicConfig.components)) {
|
|
29886
|
+
if (config2.components[name]) continue;
|
|
29887
|
+
config2.components[name] = {
|
|
29888
|
+
fields: { ...def.fields ?? {} },
|
|
29889
|
+
render: () => null
|
|
29890
|
+
};
|
|
29891
|
+
}
|
|
29892
|
+
}
|
|
29851
29893
|
var PagePlugin = (opts) => {
|
|
29852
29894
|
const getPuck = useGetPuck2();
|
|
29853
29895
|
const [confirmModalOpen, setConfirmModalOpen] = useState30(false);
|
|
@@ -29891,10 +29933,9 @@ var PagePlugin = (opts) => {
|
|
|
29891
29933
|
const getPageState = useCallback9(
|
|
29892
29934
|
async (data) => {
|
|
29893
29935
|
const { appState, config: config2 } = getPuck();
|
|
29894
|
-
const
|
|
29895
|
-
|
|
29896
|
-
|
|
29897
|
-
);
|
|
29936
|
+
const pageData = data && Object.keys(data).length > 0 ? data : appState.data;
|
|
29937
|
+
registerDynamicConfig(config2, pageData);
|
|
29938
|
+
const resolvedData = await resolveAllData2(pageData, config2);
|
|
29898
29939
|
const nextState = {
|
|
29899
29940
|
...appState,
|
|
29900
29941
|
data: resolvedData,
|
|
@@ -30688,7 +30729,7 @@ lucide-react/dist/esm/icons/globe.js:
|
|
|
30688
30729
|
lucide-react/dist/esm/icons/trash.js:
|
|
30689
30730
|
lucide-react/dist/esm/lucide-react.js:
|
|
30690
30731
|
(**
|
|
30691
|
-
* @license lucide-react v0.
|
|
30732
|
+
* @license lucide-react v0.554.0 - ISC
|
|
30692
30733
|
*
|
|
30693
30734
|
* This source code is licensed under the ISC license.
|
|
30694
30735
|
* See the LICENSE file in the root directory of this source tree.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@puckeditor/plugin-pages",
|
|
3
|
-
"version": "0.8.0-canary.
|
|
3
|
+
"version": "0.8.0-canary.ad0c4c0e",
|
|
4
4
|
"author": "Chris Villa <chris@puckeditor.com>",
|
|
5
5
|
"repository": "puckeditor/puck",
|
|
6
6
|
"bugs": "https://github.com/puckeditor/puck/issues",
|
|
@@ -28,31 +28,31 @@
|
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"zustand": "
|
|
31
|
+
"zustand": "catalog:"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@puckeditor/core": "
|
|
34
|
+
"@puckeditor/core": "catalog:",
|
|
35
35
|
"@puckeditor/platform-types": "workspace:*",
|
|
36
|
-
"@radix-ui/react-popover": "
|
|
36
|
+
"@radix-ui/react-popover": "catalog:",
|
|
37
37
|
"@testing-library/dom": "^10.4.1",
|
|
38
|
-
"@testing-library/react": "
|
|
39
|
-
"@types/jest": "
|
|
40
|
-
"@types/node": "
|
|
38
|
+
"@testing-library/react": "catalog:",
|
|
39
|
+
"@types/jest": "catalog:",
|
|
40
|
+
"@types/node": "catalog:",
|
|
41
41
|
"@types/react": "catalog:",
|
|
42
42
|
"@types/react-dom": "catalog:",
|
|
43
|
-
"date-fns": "
|
|
44
|
-
"eslint": "
|
|
43
|
+
"date-fns": "catalog:",
|
|
44
|
+
"eslint": "catalog:",
|
|
45
45
|
"eslint-config-custom": "workspace:*",
|
|
46
46
|
"fast-equals": "^6.0.0",
|
|
47
|
-
"jsdom": "
|
|
48
|
-
"lucide-react": "
|
|
47
|
+
"jsdom": "catalog:",
|
|
48
|
+
"lucide-react": "catalog:",
|
|
49
49
|
"tsconfig": "workspace:*",
|
|
50
|
-
"tsup": "
|
|
50
|
+
"tsup": "catalog:",
|
|
51
51
|
"tsup-config": "workspace:*",
|
|
52
52
|
"typescript": "catalog:",
|
|
53
|
-
"vite-tsconfig-paths": "
|
|
53
|
+
"vite-tsconfig-paths": "catalog:",
|
|
54
54
|
"vitest": "catalog:",
|
|
55
|
-
"zod": "
|
|
55
|
+
"zod": "catalog:"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@puckeditor/core": "^0.21.0 || 0.21.0-canary.de0baf39",
|