@delmaredigital/payload-puck 0.1.0 → 0.1.2
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/README.md +32 -4
- package/dist/AccordionClient.d.mts +1 -1
- package/dist/AccordionClient.d.ts +1 -1
- package/dist/AccordionClient.js +2 -2
- package/dist/AccordionClient.mjs +2 -2
- package/dist/AnimatedWrapper.d.mts +1 -1
- package/dist/AnimatedWrapper.d.ts +1 -1
- package/dist/components/index.d.mts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +196 -217
- package/dist/components/index.mjs +200 -221
- package/dist/config/config.editor.d.mts +1 -1
- package/dist/config/config.editor.d.ts +1 -1
- package/dist/config/config.editor.js +199 -220
- package/dist/config/config.editor.mjs +203 -224
- package/dist/config/index.js +33 -16
- package/dist/config/index.mjs +33 -16
- package/dist/editor/index.js +56 -39
- package/dist/editor/index.mjs +56 -39
- package/dist/fields/index.d.mts +4 -4
- package/dist/fields/index.d.ts +4 -4
- package/dist/fields/index.js +201 -222
- package/dist/fields/index.mjs +205 -226
- package/dist/render/index.js +33 -16
- package/dist/render/index.mjs +33 -16
- package/dist/{shared-DMAF1AcH.d.mts → shared-DeNKN95N.d.mts} +7 -6
- package/dist/{shared-DMAF1AcH.d.ts → shared-DeNKN95N.d.ts} +7 -6
- package/examples/README.md +9 -2
- package/examples/app/(manage)/layout.tsx +31 -0
- package/package.json +13 -10
- package/dist/AccordionClient.js.map +0 -1
- package/dist/AccordionClient.mjs.map +0 -1
- package/dist/AnimatedWrapper.js.map +0 -1
- package/dist/AnimatedWrapper.mjs.map +0 -1
- package/dist/admin/client.js.map +0 -1
- package/dist/admin/client.mjs.map +0 -1
- package/dist/admin/index.js.map +0 -1
- package/dist/admin/index.mjs.map +0 -1
- package/dist/api/index.js.map +0 -1
- package/dist/api/index.mjs.map +0 -1
- package/dist/components/index.css.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/components/index.mjs.map +0 -1
- package/dist/config/config.editor.css.map +0 -1
- package/dist/config/config.editor.js.map +0 -1
- package/dist/config/config.editor.mjs.map +0 -1
- package/dist/config/index.js.map +0 -1
- package/dist/config/index.mjs.map +0 -1
- package/dist/editor/index.js.map +0 -1
- package/dist/editor/index.mjs.map +0 -1
- package/dist/fields/index.css.map +0 -1
- package/dist/fields/index.js.map +0 -1
- package/dist/fields/index.mjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/layouts/index.js.map +0 -1
- package/dist/layouts/index.mjs.map +0 -1
- package/dist/plugin/index.js.map +0 -1
- package/dist/plugin/index.mjs.map +0 -1
- package/dist/render/index.js.map +0 -1
- package/dist/render/index.mjs.map +0 -1
- package/dist/theme/index.js.map +0 -1
- package/dist/theme/index.mjs.map +0 -1
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/index.mjs.map +0 -1
package/dist/editor/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { ArrowLeft, MousePointer, MousePointerClick, Check, AlertTriangle, Eye, ExternalLink, Loader2, Save, Upload, X, History, ChevronDown, RotateCcw } from 'lucide-react';
|
|
3
3
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { memo, useCallback, useMemo, useEffect, useState, useRef, createContext, createElement } from 'react';
|
|
@@ -28,7 +28,7 @@ var __export = (target, all) => {
|
|
|
28
28
|
};
|
|
29
29
|
function LoadingState({ message = "Loading editor..." }) {
|
|
30
30
|
return /* @__PURE__ */ jsx("div", { className: "h-screen flex items-center justify-center bg-gray-50", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
31
|
-
/* @__PURE__ */ jsx(
|
|
31
|
+
/* @__PURE__ */ jsx(Loader2, { className: "h-8 w-8 animate-spin text-gray-600 mx-auto mb-4" }),
|
|
32
32
|
/* @__PURE__ */ jsx("p", { className: "text-gray-600", children: message })
|
|
33
33
|
] }) });
|
|
34
34
|
}
|
|
@@ -156,9 +156,9 @@ var init_VersionHistory = __esm({
|
|
|
156
156
|
disabled,
|
|
157
157
|
className: `${secondaryBtn} disabled:opacity-50 disabled:cursor-not-allowed`,
|
|
158
158
|
children: [
|
|
159
|
-
/* @__PURE__ */ jsx(
|
|
159
|
+
/* @__PURE__ */ jsx(History, { className: "h-4 w-4 mr-1 flex-shrink-0" }),
|
|
160
160
|
"History",
|
|
161
|
-
/* @__PURE__ */ jsx(
|
|
161
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "h-3 w-3 ml-1 flex-shrink-0" })
|
|
162
162
|
]
|
|
163
163
|
}
|
|
164
164
|
),
|
|
@@ -179,7 +179,7 @@ var init_VersionHistory = __esm({
|
|
|
179
179
|
type: "button",
|
|
180
180
|
onClick: () => setIsOpen(false),
|
|
181
181
|
className: "text-gray-400 hover:text-gray-600 transition-colors p-1",
|
|
182
|
-
children: /* @__PURE__ */ jsx(
|
|
182
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
|
|
183
183
|
}
|
|
184
184
|
)
|
|
185
185
|
]
|
|
@@ -189,7 +189,7 @@ var init_VersionHistory = __esm({
|
|
|
189
189
|
"div",
|
|
190
190
|
{
|
|
191
191
|
className: "flex items-center justify-center p-8",
|
|
192
|
-
children: /* @__PURE__ */ jsx(
|
|
192
|
+
children: /* @__PURE__ */ jsx(Loader2, { className: "h-5 w-5 animate-spin text-gray-400" })
|
|
193
193
|
}
|
|
194
194
|
) : error ? /* @__PURE__ */ jsx(
|
|
195
195
|
"div",
|
|
@@ -256,12 +256,12 @@ var init_VersionHistory = __esm({
|
|
|
256
256
|
disabled: isRestoring,
|
|
257
257
|
className: "text-xs font-medium text-blue-600 hover:text-blue-800 transition-colors disabled:opacity-50 flex items-center gap-1 px-2 py-1 flex-shrink-0",
|
|
258
258
|
children: [
|
|
259
|
-
isRestoring ? /* @__PURE__ */ jsx(
|
|
259
|
+
isRestoring ? /* @__PURE__ */ jsx(Loader2, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ jsx(RotateCcw, { className: "h-3 w-3" }),
|
|
260
260
|
"Restore"
|
|
261
261
|
]
|
|
262
262
|
}
|
|
263
263
|
),
|
|
264
|
-
index === 0 && /* @__PURE__ */ jsx("span", { className: "text-gray-400 flex-shrink-0", children: /* @__PURE__ */ jsx(
|
|
264
|
+
index === 0 && /* @__PURE__ */ jsx("span", { className: "text-gray-400 flex-shrink-0", children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) })
|
|
265
265
|
]
|
|
266
266
|
},
|
|
267
267
|
version.id
|
|
@@ -340,7 +340,7 @@ var init_HeaderActions = __esm({
|
|
|
340
340
|
onClick: onBack,
|
|
341
341
|
className: cn(btnBase, "px-3 py-1.5 bg-white text-gray-700 border border-gray-300 rounded hover:bg-gray-50"),
|
|
342
342
|
children: [
|
|
343
|
-
/* @__PURE__ */ jsx(
|
|
343
|
+
/* @__PURE__ */ jsx(ArrowLeft, { className: "h-4 w-4 mr-1 flex-shrink-0" }),
|
|
344
344
|
"Back"
|
|
345
345
|
]
|
|
346
346
|
}
|
|
@@ -380,7 +380,7 @@ var init_HeaderActions = __esm({
|
|
|
380
380
|
!isInteractive ? "bg-blue-500 text-white border-blue-500" : "bg-gray-100 text-gray-500 border-gray-200"
|
|
381
381
|
),
|
|
382
382
|
children: [
|
|
383
|
-
/* @__PURE__ */ jsx(
|
|
383
|
+
/* @__PURE__ */ jsx(MousePointer, { className: "h-3.5 w-3.5" }),
|
|
384
384
|
"Edit"
|
|
385
385
|
]
|
|
386
386
|
}
|
|
@@ -395,14 +395,14 @@ var init_HeaderActions = __esm({
|
|
|
395
395
|
isInteractive ? "bg-blue-500 text-white border-blue-500" : "bg-gray-100 text-gray-500 border-gray-200"
|
|
396
396
|
),
|
|
397
397
|
children: [
|
|
398
|
-
/* @__PURE__ */ jsx(
|
|
398
|
+
/* @__PURE__ */ jsx(MousePointerClick, { className: "h-3.5 w-3.5" }),
|
|
399
399
|
"Interactive"
|
|
400
400
|
]
|
|
401
401
|
}
|
|
402
402
|
)
|
|
403
403
|
] }),
|
|
404
404
|
lastSaved && !saveError && /* @__PURE__ */ jsxs("span", { className: "text-xs text-gray-500 flex items-center gap-1 whitespace-nowrap", children: [
|
|
405
|
-
/* @__PURE__ */ jsx(
|
|
405
|
+
/* @__PURE__ */ jsx(Check, { className: "h-3 w-3 flex-shrink-0" }),
|
|
406
406
|
"Saved ",
|
|
407
407
|
lastSaved.toLocaleTimeString()
|
|
408
408
|
] }),
|
|
@@ -415,7 +415,7 @@ var init_HeaderActions = __esm({
|
|
|
415
415
|
},
|
|
416
416
|
className: "flex items-center gap-1.5 px-2.5 py-1.5 bg-red-50 border border-red-200 rounded-md text-red-700 text-xs font-medium",
|
|
417
417
|
children: [
|
|
418
|
-
/* @__PURE__ */ jsx(
|
|
418
|
+
/* @__PURE__ */ jsx(AlertTriangle, { className: "h-4 w-4 text-red-500 flex-shrink-0" }),
|
|
419
419
|
"Error"
|
|
420
420
|
]
|
|
421
421
|
}
|
|
@@ -432,7 +432,7 @@ var init_HeaderActions = __esm({
|
|
|
432
432
|
onClick: (e) => e.stopPropagation(),
|
|
433
433
|
children: [
|
|
434
434
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 px-5 py-4 border-b border-gray-200 bg-red-50", children: [
|
|
435
|
-
/* @__PURE__ */ jsx("div", { className: "flex-shrink-0 w-10 h-10 rounded-full bg-red-100 flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
435
|
+
/* @__PURE__ */ jsx("div", { className: "flex-shrink-0 w-10 h-10 rounded-full bg-red-100 flex items-center justify-center", children: /* @__PURE__ */ jsx(AlertTriangle, { className: "h-5 w-5 text-red-600" }) }),
|
|
436
436
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
437
437
|
/* @__PURE__ */ jsx("h3", { className: "text-base font-semibold text-gray-900", children: "Save Failed" }),
|
|
438
438
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500", children: "Unable to save your changes" })
|
|
@@ -464,7 +464,7 @@ var init_HeaderActions = __esm({
|
|
|
464
464
|
"px-3 py-1.5 bg-blue-600 text-white border border-blue-600 rounded hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed"
|
|
465
465
|
),
|
|
466
466
|
children: [
|
|
467
|
-
/* @__PURE__ */ jsx(
|
|
467
|
+
/* @__PURE__ */ jsx(Eye, { className: "h-4 w-4 mr-1 flex-shrink-0" }),
|
|
468
468
|
"Preview"
|
|
469
469
|
]
|
|
470
470
|
}
|
|
@@ -476,7 +476,7 @@ var init_HeaderActions = __esm({
|
|
|
476
476
|
onClick: onPreview,
|
|
477
477
|
className: cn(btnBase, "px-3 py-1.5 bg-white text-gray-700 border border-gray-300 rounded hover:bg-gray-50"),
|
|
478
478
|
children: [
|
|
479
|
-
/* @__PURE__ */ jsx(
|
|
479
|
+
/* @__PURE__ */ jsx(ExternalLink, { className: "h-4 w-4 mr-1 flex-shrink-0" }),
|
|
480
480
|
"View"
|
|
481
481
|
]
|
|
482
482
|
}
|
|
@@ -500,7 +500,7 @@ var init_HeaderActions = __esm({
|
|
|
500
500
|
"px-3 py-1.5 bg-white text-gray-700 border border-gray-300 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"
|
|
501
501
|
),
|
|
502
502
|
children: [
|
|
503
|
-
isSaving ? /* @__PURE__ */ jsx(
|
|
503
|
+
isSaving ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 mr-1 flex-shrink-0 animate-spin" }) : /* @__PURE__ */ jsx(Save, { className: "h-4 w-4 mr-1 flex-shrink-0" }),
|
|
504
504
|
"Save"
|
|
505
505
|
]
|
|
506
506
|
}
|
|
@@ -516,7 +516,7 @@ var init_HeaderActions = __esm({
|
|
|
516
516
|
"px-3 py-1.5 bg-blue-600 text-white border border-blue-600 rounded hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed"
|
|
517
517
|
),
|
|
518
518
|
children: [
|
|
519
|
-
isSaving ? /* @__PURE__ */ jsx(
|
|
519
|
+
isSaving ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 mr-1 flex-shrink-0 animate-spin" }) : /* @__PURE__ */ jsx(Upload, { className: "h-4 w-4 mr-1 flex-shrink-0" }),
|
|
520
520
|
"Publish"
|
|
521
521
|
]
|
|
522
522
|
}
|
|
@@ -851,7 +851,7 @@ function transformValueToCSS(transform) {
|
|
|
851
851
|
}
|
|
852
852
|
function isResponsiveValue(value) {
|
|
853
853
|
if (!value || typeof value !== "object") return false;
|
|
854
|
-
return "
|
|
854
|
+
return "xs" in value;
|
|
855
855
|
}
|
|
856
856
|
function camelToKebab(str) {
|
|
857
857
|
return str.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
|
|
@@ -877,7 +877,7 @@ function responsiveValueToCSS(value, converter, uniqueId) {
|
|
|
877
877
|
if (bpValue === void 0) return;
|
|
878
878
|
const cssProps = converter(bpValue);
|
|
879
879
|
if (!cssProps) return;
|
|
880
|
-
if (bp.key === "
|
|
880
|
+
if (bp.key === "xs") {
|
|
881
881
|
baseStyles = cssProps;
|
|
882
882
|
} else {
|
|
883
883
|
const styleString = cssPropertiesToString(cssProps);
|
|
@@ -893,24 +893,41 @@ function responsiveValueToCSS(value, converter, uniqueId) {
|
|
|
893
893
|
function visibilityValueToCSS(visibility, uniqueId) {
|
|
894
894
|
if (!visibility) return "";
|
|
895
895
|
const mediaQueries = [];
|
|
896
|
-
|
|
897
|
-
|
|
896
|
+
const breakpointWidths = {
|
|
897
|
+
xs: null,
|
|
898
|
+
// 0px
|
|
899
|
+
sm: 640,
|
|
900
|
+
md: 768,
|
|
901
|
+
lg: 1024,
|
|
902
|
+
xl: 1280
|
|
903
|
+
};
|
|
904
|
+
const getNextBreakpointWidth = (bp) => {
|
|
905
|
+
const order = ["xs", "sm", "md", "lg", "xl"];
|
|
906
|
+
const index = order.indexOf(bp);
|
|
907
|
+
if (index === -1 || index === order.length - 1) return null;
|
|
908
|
+
return breakpointWidths[order[index + 1]];
|
|
909
|
+
};
|
|
910
|
+
if (visibility.xs === false) {
|
|
911
|
+
const nextWidth = getNextBreakpointWidth("xs");
|
|
912
|
+
if (nextWidth) {
|
|
913
|
+
mediaQueries.push(`@media (max-width: ${nextWidth - 1}px) { .${uniqueId} { display: none; } }`);
|
|
914
|
+
} else {
|
|
915
|
+
mediaQueries.push(`.${uniqueId} { display: none; }`);
|
|
916
|
+
}
|
|
898
917
|
}
|
|
899
|
-
let lastVisibility = visibility.base;
|
|
900
918
|
BREAKPOINTS.slice(1).forEach((bp) => {
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
if (
|
|
919
|
+
if (visibility[bp.key] === false) {
|
|
920
|
+
const minWidth = breakpointWidths[bp.key];
|
|
921
|
+
const maxWidth = getNextBreakpointWidth(bp.key);
|
|
922
|
+
if (minWidth && maxWidth) {
|
|
905
923
|
mediaQueries.push(
|
|
906
|
-
`@media (min-width: ${
|
|
924
|
+
`@media (min-width: ${minWidth}px) and (max-width: ${maxWidth - 1}px) { .${uniqueId} { display: none; } }`
|
|
907
925
|
);
|
|
908
|
-
} else {
|
|
926
|
+
} else if (minWidth) {
|
|
909
927
|
mediaQueries.push(
|
|
910
|
-
`@media (min-width: ${
|
|
928
|
+
`@media (min-width: ${minWidth}px) { .${uniqueId} { display: none; } }`
|
|
911
929
|
);
|
|
912
930
|
}
|
|
913
|
-
lastVisibility = bpValue;
|
|
914
931
|
}
|
|
915
932
|
});
|
|
916
933
|
return mediaQueries.join("\n");
|
|
@@ -1178,7 +1195,7 @@ var init_shared = __esm({
|
|
|
1178
1195
|
baseline: "items-baseline"
|
|
1179
1196
|
};
|
|
1180
1197
|
BREAKPOINTS = [
|
|
1181
|
-
{ key: "
|
|
1198
|
+
{ key: "xs", label: "XS", minWidth: null },
|
|
1182
1199
|
{ key: "sm", label: "SM", minWidth: 640 },
|
|
1183
1200
|
{ key: "md", label: "MD", minWidth: 768 },
|
|
1184
1201
|
{ key: "lg", label: "LG", minWidth: 1024 },
|
|
@@ -1442,7 +1459,7 @@ var init_dialog = __esm({
|
|
|
1442
1459
|
children: [
|
|
1443
1460
|
children,
|
|
1444
1461
|
/* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
1445
|
-
/* @__PURE__ */ jsx(
|
|
1462
|
+
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
1446
1463
|
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
1447
1464
|
] })
|
|
1448
1465
|
]
|
|
@@ -1465,7 +1482,7 @@ var init_dialog = __esm({
|
|
|
1465
1482
|
/* @__PURE__ */ jsx(DialogPrimitive.Title, { className: "sr-only", children: accessibleTitle }),
|
|
1466
1483
|
children,
|
|
1467
1484
|
!hideCloseButton && /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
1468
|
-
/* @__PURE__ */ jsx(
|
|
1485
|
+
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
1469
1486
|
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
1470
1487
|
] })
|
|
1471
1488
|
]
|
|
@@ -2883,7 +2900,7 @@ function SizeFieldInner({
|
|
|
2883
2900
|
onClick: handleClear,
|
|
2884
2901
|
className: "text-muted-foreground hover:text-destructive",
|
|
2885
2902
|
title: "Reset to default",
|
|
2886
|
-
children: /* @__PURE__ */ jsx(
|
|
2903
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
|
|
2887
2904
|
}
|
|
2888
2905
|
)
|
|
2889
2906
|
] }),
|
|
@@ -3411,7 +3428,7 @@ function AccordionItem({
|
|
|
3411
3428
|
children: [
|
|
3412
3429
|
/* @__PURE__ */ jsx("span", { children: item.title }),
|
|
3413
3430
|
/* @__PURE__ */ jsx(
|
|
3414
|
-
|
|
3431
|
+
ChevronDown,
|
|
3415
3432
|
{
|
|
3416
3433
|
className: cn2(
|
|
3417
3434
|
"h-4 w-4 shrink-0 transition-transform duration-200",
|
|
@@ -3761,7 +3778,7 @@ var init_PreviewModal = __esm({
|
|
|
3761
3778
|
className: "flex items-center gap-2 px-3 py-2 text-sm font-medium text-white bg-gray-900 hover:bg-gray-800 rounded-md transition-colors",
|
|
3762
3779
|
title: "Close preview (Esc)",
|
|
3763
3780
|
children: [
|
|
3764
|
-
/* @__PURE__ */ jsx(
|
|
3781
|
+
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
3765
3782
|
"Close Preview"
|
|
3766
3783
|
]
|
|
3767
3784
|
}
|
|
@@ -3774,7 +3791,7 @@ var init_PreviewModal = __esm({
|
|
|
3774
3791
|
className: "flex items-center gap-2 px-3 py-2 text-sm text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-md transition-colors",
|
|
3775
3792
|
title: "Open published page in new tab",
|
|
3776
3793
|
children: [
|
|
3777
|
-
/* @__PURE__ */ jsx(
|
|
3794
|
+
/* @__PURE__ */ jsx(ExternalLink, { className: "h-4 w-4" }),
|
|
3778
3795
|
"View Page"
|
|
3779
3796
|
]
|
|
3780
3797
|
}
|
|
@@ -3797,7 +3814,7 @@ var init_PreviewModal = __esm({
|
|
|
3797
3814
|
onClick: (e) => e.stopPropagation(),
|
|
3798
3815
|
children: [
|
|
3799
3816
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 px-5 py-4 border-b border-gray-200 bg-amber-50", children: [
|
|
3800
|
-
/* @__PURE__ */ jsx("div", { className: "flex-shrink-0 w-10 h-10 rounded-full bg-amber-100 flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
3817
|
+
/* @__PURE__ */ jsx("div", { className: "flex-shrink-0 w-10 h-10 rounded-full bg-amber-100 flex items-center justify-center", children: /* @__PURE__ */ jsx(AlertTriangle, { className: "h-5 w-5 text-amber-600" }) }),
|
|
3801
3818
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
3802
3819
|
/* @__PURE__ */ jsx("h3", { className: "text-base font-semibold text-gray-900", children: "Navigate away?" }),
|
|
3803
3820
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500", children: "This will close the preview" })
|
package/dist/fields/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ColorValue, P as PaddingValue, a as BorderValue, W as WidthValue, D as DimensionsValue, G as GradientValue, B as BackgroundValue, R as ResponsiveValue, V as VisibilityValue, A as AnimationValue, T as TransformValue } from '../shared-
|
|
2
|
-
export { _ as ANIMATION_CATEGORIES, F as AdvancedEasingFunction, J as AnimationCategory, I as AnimationOrigin, u as BREAKPOINTS, aI as BackgroundCSSResult, k as BackgroundImageValue, l as BackgroundOverlay, s as Breakpoint, j as ContentAlignment, $ as DEFAULT_ANIMATION, a2 as DEFAULT_TRANSFORM, z as DEFAULT_VISIBILITY, e as DimensionConstraint, h as DimensionsMode, f as DimensionsUnit, Z as EASING_CSS_MAP, E as EasingFunction, H as EntranceAnimation, o as GradientMask, n as GradientStop, M as MediaField, b as MediaReference, t as ResponsiveCSSResult, S as StaggerConfig, K as StaggerDirection, a0 as TransformOrigin, az as alignItemsMap, al as alignmentMap, L as animationValueToCSS, af as aspectRatioField, at as aspectRatioMap, a8 as backgroundColorField, p as backgroundValueToCSS, am as bgColorMap, ah as borderRadiusField, av as borderRadiusMap, aF as borderValueToCSS, a7 as buttonSizeField, a5 as buttonStyleField, a6 as buttonVariantField, a3 as cn, aC as colorValueToCSS, ai as columnsCountField, aw as columnsCountMap, c as createMediaField, x as cssPropertiesToString, d as dimensionsValueToCSS, ag as dividerStyleField, au as dividerStyleMap, aj as flexDirectionField, ax as flexDirectionMap, ak as flexWrapField, aB as flexWrapMap, aa as gapField, ao as gapMap, Y as generateStaggerStyles, O as getAnimationCSSVariables, r as getBackgroundImageOpacity, aH as getCustomStyleObject, Q as getDefaultEasingForAnimation, g as getDimensionsSummary, N as getEntranceAnimationStyles, U as getRelevantIntensityControls, X as getStaggerDelay, q as gradientValueToCSS, aJ as hasCustomStyles, ad as headingLevelField, ar as headingLevelMap, i as isLegacyWidthValue, v as isResponsiveValue, ay as justifyContentMap, aK as layoutComponentsDisallow, aE as marginValueToCSS, m as migrateWidthValue, aD as paddingValueToCSS, w as responsiveValueToCSS, aA as selfAlignmentMap, ab as shadowField, ap as shadowMap, ac as spacerHeightField, aq as spacerHeightMap, a9 as textColorField, an as textColorMap, ae as textSizeField, as as textSizeMap, a1 as transformValueToCSS, a4 as visibilityField, y as visibilityValueToCSS, aG as widthValueToCSS } from '../shared-
|
|
1
|
+
import { C as ColorValue, P as PaddingValue, a as BorderValue, W as WidthValue, D as DimensionsValue, G as GradientValue, B as BackgroundValue, R as ResponsiveValue, V as VisibilityValue, A as AnimationValue, T as TransformValue } from '../shared-DeNKN95N.mjs';
|
|
2
|
+
export { _ as ANIMATION_CATEGORIES, F as AdvancedEasingFunction, J as AnimationCategory, I as AnimationOrigin, u as BREAKPOINTS, aI as BackgroundCSSResult, k as BackgroundImageValue, l as BackgroundOverlay, s as Breakpoint, j as ContentAlignment, $ as DEFAULT_ANIMATION, a2 as DEFAULT_TRANSFORM, z as DEFAULT_VISIBILITY, e as DimensionConstraint, h as DimensionsMode, f as DimensionsUnit, Z as EASING_CSS_MAP, E as EasingFunction, H as EntranceAnimation, o as GradientMask, n as GradientStop, M as MediaField, b as MediaReference, t as ResponsiveCSSResult, S as StaggerConfig, K as StaggerDirection, a0 as TransformOrigin, az as alignItemsMap, al as alignmentMap, L as animationValueToCSS, af as aspectRatioField, at as aspectRatioMap, a8 as backgroundColorField, p as backgroundValueToCSS, am as bgColorMap, ah as borderRadiusField, av as borderRadiusMap, aF as borderValueToCSS, a7 as buttonSizeField, a5 as buttonStyleField, a6 as buttonVariantField, a3 as cn, aC as colorValueToCSS, ai as columnsCountField, aw as columnsCountMap, c as createMediaField, x as cssPropertiesToString, d as dimensionsValueToCSS, ag as dividerStyleField, au as dividerStyleMap, aj as flexDirectionField, ax as flexDirectionMap, ak as flexWrapField, aB as flexWrapMap, aa as gapField, ao as gapMap, Y as generateStaggerStyles, O as getAnimationCSSVariables, r as getBackgroundImageOpacity, aH as getCustomStyleObject, Q as getDefaultEasingForAnimation, g as getDimensionsSummary, N as getEntranceAnimationStyles, U as getRelevantIntensityControls, X as getStaggerDelay, q as gradientValueToCSS, aJ as hasCustomStyles, ad as headingLevelField, ar as headingLevelMap, i as isLegacyWidthValue, v as isResponsiveValue, ay as justifyContentMap, aK as layoutComponentsDisallow, aE as marginValueToCSS, m as migrateWidthValue, aD as paddingValueToCSS, w as responsiveValueToCSS, aA as selfAlignmentMap, ab as shadowField, ap as shadowMap, ac as spacerHeightField, aq as spacerHeightMap, a9 as textColorField, an as textColorMap, ae as textSizeField, as as textSizeMap, a1 as transformValueToCSS, a4 as visibilityField, y as visibilityValueToCSS, aG as widthValueToCSS } from '../shared-DeNKN95N.mjs';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import React__default from 'react';
|
|
5
5
|
import { CustomField } from '@measured/puck';
|
|
@@ -437,7 +437,7 @@ declare function createBackgroundField(config?: {
|
|
|
437
437
|
* ResponsiveField - Generic wrapper for breakpoint-specific field overrides
|
|
438
438
|
*
|
|
439
439
|
* This component wraps any existing field to provide responsive overrides
|
|
440
|
-
* at different breakpoints (
|
|
440
|
+
* at different breakpoints (xs, sm, md, lg, xl). It uses sparse storage,
|
|
441
441
|
* only storing values for breakpoints that have explicit overrides.
|
|
442
442
|
*/
|
|
443
443
|
|
|
@@ -452,7 +452,7 @@ interface ResponsiveFieldProps<T> {
|
|
|
452
452
|
onChange: (v: T | null) => void;
|
|
453
453
|
readOnly?: boolean;
|
|
454
454
|
}) => React__default.ReactNode;
|
|
455
|
-
/** Default value for the
|
|
455
|
+
/** Default value for the xs breakpoint */
|
|
456
456
|
defaultValue?: T;
|
|
457
457
|
}
|
|
458
458
|
declare const ResponsiveField: <T>(props: ResponsiveFieldProps<T>) => React__default.ReactElement;
|
package/dist/fields/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ColorValue, P as PaddingValue, a as BorderValue, W as WidthValue, D as DimensionsValue, G as GradientValue, B as BackgroundValue, R as ResponsiveValue, V as VisibilityValue, A as AnimationValue, T as TransformValue } from '../shared-
|
|
2
|
-
export { _ as ANIMATION_CATEGORIES, F as AdvancedEasingFunction, J as AnimationCategory, I as AnimationOrigin, u as BREAKPOINTS, aI as BackgroundCSSResult, k as BackgroundImageValue, l as BackgroundOverlay, s as Breakpoint, j as ContentAlignment, $ as DEFAULT_ANIMATION, a2 as DEFAULT_TRANSFORM, z as DEFAULT_VISIBILITY, e as DimensionConstraint, h as DimensionsMode, f as DimensionsUnit, Z as EASING_CSS_MAP, E as EasingFunction, H as EntranceAnimation, o as GradientMask, n as GradientStop, M as MediaField, b as MediaReference, t as ResponsiveCSSResult, S as StaggerConfig, K as StaggerDirection, a0 as TransformOrigin, az as alignItemsMap, al as alignmentMap, L as animationValueToCSS, af as aspectRatioField, at as aspectRatioMap, a8 as backgroundColorField, p as backgroundValueToCSS, am as bgColorMap, ah as borderRadiusField, av as borderRadiusMap, aF as borderValueToCSS, a7 as buttonSizeField, a5 as buttonStyleField, a6 as buttonVariantField, a3 as cn, aC as colorValueToCSS, ai as columnsCountField, aw as columnsCountMap, c as createMediaField, x as cssPropertiesToString, d as dimensionsValueToCSS, ag as dividerStyleField, au as dividerStyleMap, aj as flexDirectionField, ax as flexDirectionMap, ak as flexWrapField, aB as flexWrapMap, aa as gapField, ao as gapMap, Y as generateStaggerStyles, O as getAnimationCSSVariables, r as getBackgroundImageOpacity, aH as getCustomStyleObject, Q as getDefaultEasingForAnimation, g as getDimensionsSummary, N as getEntranceAnimationStyles, U as getRelevantIntensityControls, X as getStaggerDelay, q as gradientValueToCSS, aJ as hasCustomStyles, ad as headingLevelField, ar as headingLevelMap, i as isLegacyWidthValue, v as isResponsiveValue, ay as justifyContentMap, aK as layoutComponentsDisallow, aE as marginValueToCSS, m as migrateWidthValue, aD as paddingValueToCSS, w as responsiveValueToCSS, aA as selfAlignmentMap, ab as shadowField, ap as shadowMap, ac as spacerHeightField, aq as spacerHeightMap, a9 as textColorField, an as textColorMap, ae as textSizeField, as as textSizeMap, a1 as transformValueToCSS, a4 as visibilityField, y as visibilityValueToCSS, aG as widthValueToCSS } from '../shared-
|
|
1
|
+
import { C as ColorValue, P as PaddingValue, a as BorderValue, W as WidthValue, D as DimensionsValue, G as GradientValue, B as BackgroundValue, R as ResponsiveValue, V as VisibilityValue, A as AnimationValue, T as TransformValue } from '../shared-DeNKN95N.js';
|
|
2
|
+
export { _ as ANIMATION_CATEGORIES, F as AdvancedEasingFunction, J as AnimationCategory, I as AnimationOrigin, u as BREAKPOINTS, aI as BackgroundCSSResult, k as BackgroundImageValue, l as BackgroundOverlay, s as Breakpoint, j as ContentAlignment, $ as DEFAULT_ANIMATION, a2 as DEFAULT_TRANSFORM, z as DEFAULT_VISIBILITY, e as DimensionConstraint, h as DimensionsMode, f as DimensionsUnit, Z as EASING_CSS_MAP, E as EasingFunction, H as EntranceAnimation, o as GradientMask, n as GradientStop, M as MediaField, b as MediaReference, t as ResponsiveCSSResult, S as StaggerConfig, K as StaggerDirection, a0 as TransformOrigin, az as alignItemsMap, al as alignmentMap, L as animationValueToCSS, af as aspectRatioField, at as aspectRatioMap, a8 as backgroundColorField, p as backgroundValueToCSS, am as bgColorMap, ah as borderRadiusField, av as borderRadiusMap, aF as borderValueToCSS, a7 as buttonSizeField, a5 as buttonStyleField, a6 as buttonVariantField, a3 as cn, aC as colorValueToCSS, ai as columnsCountField, aw as columnsCountMap, c as createMediaField, x as cssPropertiesToString, d as dimensionsValueToCSS, ag as dividerStyleField, au as dividerStyleMap, aj as flexDirectionField, ax as flexDirectionMap, ak as flexWrapField, aB as flexWrapMap, aa as gapField, ao as gapMap, Y as generateStaggerStyles, O as getAnimationCSSVariables, r as getBackgroundImageOpacity, aH as getCustomStyleObject, Q as getDefaultEasingForAnimation, g as getDimensionsSummary, N as getEntranceAnimationStyles, U as getRelevantIntensityControls, X as getStaggerDelay, q as gradientValueToCSS, aJ as hasCustomStyles, ad as headingLevelField, ar as headingLevelMap, i as isLegacyWidthValue, v as isResponsiveValue, ay as justifyContentMap, aK as layoutComponentsDisallow, aE as marginValueToCSS, m as migrateWidthValue, aD as paddingValueToCSS, w as responsiveValueToCSS, aA as selfAlignmentMap, ab as shadowField, ap as shadowMap, ac as spacerHeightField, aq as spacerHeightMap, a9 as textColorField, an as textColorMap, ae as textSizeField, as as textSizeMap, a1 as transformValueToCSS, a4 as visibilityField, y as visibilityValueToCSS, aG as widthValueToCSS } from '../shared-DeNKN95N.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import React__default from 'react';
|
|
5
5
|
import { CustomField } from '@measured/puck';
|
|
@@ -437,7 +437,7 @@ declare function createBackgroundField(config?: {
|
|
|
437
437
|
* ResponsiveField - Generic wrapper for breakpoint-specific field overrides
|
|
438
438
|
*
|
|
439
439
|
* This component wraps any existing field to provide responsive overrides
|
|
440
|
-
* at different breakpoints (
|
|
440
|
+
* at different breakpoints (xs, sm, md, lg, xl). It uses sparse storage,
|
|
441
441
|
* only storing values for breakpoints that have explicit overrides.
|
|
442
442
|
*/
|
|
443
443
|
|
|
@@ -452,7 +452,7 @@ interface ResponsiveFieldProps<T> {
|
|
|
452
452
|
onChange: (v: T | null) => void;
|
|
453
453
|
readOnly?: boolean;
|
|
454
454
|
}) => React__default.ReactNode;
|
|
455
|
-
/** Default value for the
|
|
455
|
+
/** Default value for the xs breakpoint */
|
|
456
456
|
defaultValue?: T;
|
|
457
457
|
}
|
|
458
458
|
declare const ResponsiveField: <T>(props: ResponsiveFieldProps<T>) => React__default.ReactElement;
|