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