@standhigher/puck-page-builder 0.12.14 → 0.12.16
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 +4 -17
- package/package.json +6 -7
- package/src/styles.css +0 -3
package/dist/index.js
CHANGED
|
@@ -378,7 +378,7 @@ function PropertyPanel({
|
|
|
378
378
|
|
|
379
379
|
// src/editor/shell/PageDocumentEditorShell.tsx
|
|
380
380
|
import { Puck as Puck2, usePuck } from "@puckeditor/core";
|
|
381
|
-
import { Badge as Badge3, Banner, Button as Button2, ButtonGroup as ButtonGroup2, Frame, InlineStack as InlineStack3, Select as Select2, Text as Text3, TextField, Toast } from "@shopify/polaris";
|
|
381
|
+
import { Badge as Badge3, Banner, Button as Button2, ButtonGroup as ButtonGroup2, Frame, InlineStack as InlineStack3, Modal as Modal2, Select as Select2, Text as Text3, TextField, Toast } from "@shopify/polaris";
|
|
382
382
|
import { DeleteIcon as DeleteIcon2, DragHandleIcon as DragHandleIcon2, LayoutSectionIcon as LayoutSectionIcon2, MenuIcon as MenuIcon2, ProductIcon, RedoIcon as RedoIcon2, UndoIcon as UndoIcon2, XIcon as XIcon2 } from "@shopify/polaris-icons";
|
|
383
383
|
import { useCallback as useCallback2, useEffect as useEffect4, useLayoutEffect as useLayoutEffect2, useMemo as useMemo2, useRef as useRef6, useState as useState4 } from "react";
|
|
384
384
|
|
|
@@ -1730,24 +1730,11 @@ function InspectorActions({ block, canDuplicate, canDelete, canMove, canMoveUp,
|
|
|
1730
1730
|
] });
|
|
1731
1731
|
}
|
|
1732
1732
|
function DeleteConfirmation({ block, config, i18n, onCancel, onConfirm }) {
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
/* @__PURE__ */ jsx10(Text3, { as: "p", variant: "bodyMd", children: config?.message?.(block) ?? i18n.t("confirmDeleteMessage") }),
|
|
1736
|
-
/* @__PURE__ */ jsxs7(ButtonGroup2, { children: [
|
|
1737
|
-
/* @__PURE__ */ jsx10(Button2, { onClick: onCancel, children: config?.cancelLabel ?? i18n.t("cancel") }),
|
|
1738
|
-
/* @__PURE__ */ jsx10(Button2, { tone: "critical", onClick: onConfirm, children: config?.confirmLabel ?? i18n.t("confirm") })
|
|
1739
|
-
] })
|
|
1740
|
-
] }) });
|
|
1733
|
+
const message = config?.message?.(block) ?? i18n.t("confirmDeleteMessage");
|
|
1734
|
+
return /* @__PURE__ */ jsx10(Modal2, { open: true, onClose: onCancel, title: config?.title ?? i18n.t("confirmDeleteTitle"), primaryAction: { content: config?.confirmLabel ?? i18n.t("confirm"), destructive: true, onAction: onConfirm }, secondaryActions: [{ content: config?.cancelLabel ?? i18n.t("cancel"), onAction: onCancel }], children: /* @__PURE__ */ jsx10(Modal2.Section, { children: typeof message === "string" ? /* @__PURE__ */ jsx10(Text3, { as: "p", variant: "bodyMd", children: message }) : message }) });
|
|
1741
1735
|
}
|
|
1742
1736
|
function LeaveConfirmation({ i18n, onCancel, onConfirm }) {
|
|
1743
|
-
return /* @__PURE__ */ jsx10("
|
|
1744
|
-
/* @__PURE__ */ jsx10(Text3, { as: "h2", variant: "headingMd", id: "pb-leave-confirmation-title", children: i18n.t("confirmLeaveTitle") }),
|
|
1745
|
-
/* @__PURE__ */ jsx10(Text3, { as: "p", variant: "bodyMd", children: i18n.t("leaveWarning") }),
|
|
1746
|
-
/* @__PURE__ */ jsxs7(ButtonGroup2, { children: [
|
|
1747
|
-
/* @__PURE__ */ jsx10(Button2, { onClick: onCancel, children: i18n.t("cancel") }),
|
|
1748
|
-
/* @__PURE__ */ jsx10(Button2, { tone: "critical", onClick: onConfirm, children: i18n.t("leave") })
|
|
1749
|
-
] })
|
|
1750
|
-
] }) });
|
|
1737
|
+
return /* @__PURE__ */ jsx10(Modal2, { open: true, onClose: onCancel, title: i18n.t("confirmLeaveTitle"), primaryAction: { content: i18n.t("leave"), destructive: true, onAction: onConfirm }, secondaryActions: [{ content: i18n.t("cancel"), onAction: onCancel }], children: /* @__PURE__ */ jsx10(Modal2.Section, { children: /* @__PURE__ */ jsx10(Text3, { as: "p", variant: "bodyMd", children: i18n.t("leaveWarning") }) }) });
|
|
1751
1738
|
}
|
|
1752
1739
|
function inspectorFieldConfig(name, field) {
|
|
1753
1740
|
const key = name.toLowerCase();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@standhigher/puck-page-builder",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.16",
|
|
4
4
|
"description": "React PageDocument editor, extension registry, and web renderer for BestTrack page experiences.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -50,11 +50,6 @@
|
|
|
50
50
|
},
|
|
51
51
|
"./styles.css": "./src/styles.css"
|
|
52
52
|
},
|
|
53
|
-
"scripts": {
|
|
54
|
-
"build": "tsup src/index.ts src/renderer.ts src/runtime.ts src/extensions.ts src/schema.ts src/theme.ts --format esm --dts --clean && node scripts/assert-runtime-boundary.mjs",
|
|
55
|
-
"typecheck": "tsc --noEmit",
|
|
56
|
-
"prepack": "pnpm run build"
|
|
57
|
-
},
|
|
58
53
|
"publishConfig": {
|
|
59
54
|
"access": "public"
|
|
60
55
|
},
|
|
@@ -73,5 +68,9 @@
|
|
|
73
68
|
"react-dom": "^18.3.1",
|
|
74
69
|
"tsup": "^8.5.1",
|
|
75
70
|
"typescript": "^5.9.3"
|
|
71
|
+
},
|
|
72
|
+
"scripts": {
|
|
73
|
+
"build": "tsup src/index.ts src/renderer.ts src/runtime.ts src/extensions.ts src/schema.ts src/theme.ts --format esm --dts --clean && node scripts/assert-runtime-boundary.mjs",
|
|
74
|
+
"typecheck": "tsc --noEmit"
|
|
76
75
|
}
|
|
77
|
-
}
|
|
76
|
+
}
|
package/src/styles.css
CHANGED
|
@@ -80,9 +80,6 @@ button:focus-visible, [role="button"]:focus-visible { outline: 2px solid var(--b
|
|
|
80
80
|
.pb-inspector-actions .Polaris-ButtonGroup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; margin: 0; gap: var(--builder-space-2); }
|
|
81
81
|
.pb-inspector-actions .Polaris-ButtonGroup__Item { min-width: 0; margin: 0; }
|
|
82
82
|
.pb-inspector-actions .Polaris-ButtonGroup__Item .Polaris-Button { width: 100%; justify-content: center; }
|
|
83
|
-
.pb-delete-confirmation-backdrop { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: var(--builder-space-4); background: rgb(15 23 42 / 42%); }
|
|
84
|
-
.pb-delete-confirmation { display: grid; gap: var(--builder-space-4); width: min(100%, 420px); padding: var(--builder-space-5); border-radius: 12px; color: #0f172a; background: #fff; box-shadow: 0 20px 50px rgb(15 23 42 / 25%); }
|
|
85
|
-
.pb-delete-confirmation h2, .pb-delete-confirmation p { margin: 0; }
|
|
86
83
|
.pb-panel--closed { display: none; }
|
|
87
84
|
.pb-block-list { display: flex; flex: 1; flex-direction: column; gap: var(--builder-space-2); min-height: 0; }
|
|
88
85
|
.pb-block-row { display: flex; align-items: center; gap: var(--builder-space-2); padding: var(--builder-space-2); border: 1px solid transparent; border-radius: var(--builder-panel-radius); background: transparent; transition: background-color 120ms ease, border-color 120ms ease; }
|