@measured/puck 0.20.3-canary.d855fa8c → 0.21.0-canary.1df9ddeb
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/{chunk-QIGVND56.mjs → chunk-KHAM6QNU.mjs} +135 -26
- package/dist/{chunk-OOLYDXKW.mjs → chunk-X7YZ3YE7.mjs} +5 -5
- package/dist/index.css +4 -3
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +176 -67
- package/dist/index.mjs +2 -2
- package/dist/no-external.css +4 -3
- package/dist/no-external.d.mts +1 -1
- package/dist/no-external.d.ts +1 -1
- package/dist/no-external.js +176 -67
- package/dist/no-external.mjs +2 -2
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +5 -5
- package/dist/rsc.mjs +1 -1
- package/dist/{walk-tree-JdJYB16L.d.mts → walk-tree-Ctf3FZQI.d.mts} +1 -0
- package/dist/{walk-tree-JdJYB16L.d.ts → walk-tree-Ctf3FZQI.d.ts} +1 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -153,6 +153,42 @@ var require_classnames = __commonJS({
|
|
|
153
153
|
}
|
|
154
154
|
});
|
|
155
155
|
|
|
156
|
+
// ../../node_modules/fast-deep-equal/index.js
|
|
157
|
+
var require_fast_deep_equal = __commonJS({
|
|
158
|
+
"../../node_modules/fast-deep-equal/index.js"(exports2, module2) {
|
|
159
|
+
"use strict";
|
|
160
|
+
init_react_import();
|
|
161
|
+
module2.exports = function equal(a, b) {
|
|
162
|
+
if (a === b) return true;
|
|
163
|
+
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
164
|
+
if (a.constructor !== b.constructor) return false;
|
|
165
|
+
var length, i, keys;
|
|
166
|
+
if (Array.isArray(a)) {
|
|
167
|
+
length = a.length;
|
|
168
|
+
if (length != b.length) return false;
|
|
169
|
+
for (i = length; i-- !== 0; )
|
|
170
|
+
if (!equal(a[i], b[i])) return false;
|
|
171
|
+
return true;
|
|
172
|
+
}
|
|
173
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
174
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
175
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
176
|
+
keys = Object.keys(a);
|
|
177
|
+
length = keys.length;
|
|
178
|
+
if (length !== Object.keys(b).length) return false;
|
|
179
|
+
for (i = length; i-- !== 0; )
|
|
180
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
181
|
+
for (i = length; i-- !== 0; ) {
|
|
182
|
+
var key = keys[i];
|
|
183
|
+
if (!equal(a[key], b[key])) return false;
|
|
184
|
+
}
|
|
185
|
+
return true;
|
|
186
|
+
}
|
|
187
|
+
return a !== a && b !== b;
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
|
|
156
192
|
// bundle/index.ts
|
|
157
193
|
var bundle_exports = {};
|
|
158
194
|
__export(bundle_exports, {
|
|
@@ -1661,7 +1697,9 @@ var keyCodeMap = {
|
|
|
1661
1697
|
KeyW: "w",
|
|
1662
1698
|
KeyX: "x",
|
|
1663
1699
|
KeyY: "y",
|
|
1664
|
-
KeyZ: "z"
|
|
1700
|
+
KeyZ: "z",
|
|
1701
|
+
Delete: "delete",
|
|
1702
|
+
Backspace: "backspace"
|
|
1665
1703
|
};
|
|
1666
1704
|
var useHotkeyStore = (0, import_zustand.create)()(
|
|
1667
1705
|
(0, import_middleware.subscribeWithSelector)((set) => ({
|
|
@@ -1685,8 +1723,10 @@ var monitorHotkeys = (doc) => {
|
|
|
1685
1723
|
([key2, value]) => value === !!combo[key2]
|
|
1686
1724
|
);
|
|
1687
1725
|
if (conditionMet) {
|
|
1688
|
-
e
|
|
1689
|
-
|
|
1726
|
+
const handled = cb(e);
|
|
1727
|
+
if (handled !== false) {
|
|
1728
|
+
e.preventDefault();
|
|
1729
|
+
}
|
|
1690
1730
|
}
|
|
1691
1731
|
});
|
|
1692
1732
|
if (key !== "meta" && key !== "ctrl" && key !== "shift") {
|
|
@@ -1709,6 +1749,10 @@ var monitorHotkeys = (doc) => {
|
|
|
1709
1749
|
useHotkeyStore.getState().reset();
|
|
1710
1750
|
}
|
|
1711
1751
|
};
|
|
1752
|
+
const onBlur = () => {
|
|
1753
|
+
useHotkeyStore.getState().reset();
|
|
1754
|
+
};
|
|
1755
|
+
window.addEventListener("blur", onBlur);
|
|
1712
1756
|
doc.addEventListener("keydown", onKeyDown);
|
|
1713
1757
|
doc.addEventListener("keyup", onKeyUp);
|
|
1714
1758
|
doc.addEventListener("visibilitychange", onVisibilityChanged);
|
|
@@ -1716,6 +1760,7 @@ var monitorHotkeys = (doc) => {
|
|
|
1716
1760
|
doc.removeEventListener("keydown", onKeyDown);
|
|
1717
1761
|
doc.removeEventListener("keyup", onKeyUp);
|
|
1718
1762
|
doc.removeEventListener("visibilitychange", onVisibilityChanged);
|
|
1763
|
+
window.removeEventListener("blur", onBlur);
|
|
1719
1764
|
};
|
|
1720
1765
|
};
|
|
1721
1766
|
var useMonitorHotkeys = () => {
|
|
@@ -1910,7 +1955,7 @@ var flattenData = (state, config) => {
|
|
|
1910
1955
|
(content) => content,
|
|
1911
1956
|
(item) => {
|
|
1912
1957
|
data.push(item);
|
|
1913
|
-
return
|
|
1958
|
+
return item;
|
|
1914
1959
|
}
|
|
1915
1960
|
);
|
|
1916
1961
|
return data;
|
|
@@ -1918,13 +1963,13 @@ var flattenData = (state, config) => {
|
|
|
1918
1963
|
|
|
1919
1964
|
// lib/get-changed.ts
|
|
1920
1965
|
init_react_import();
|
|
1921
|
-
var
|
|
1966
|
+
var import_fast_equals = require("fast-equals");
|
|
1922
1967
|
var getChanged = (newItem, oldItem) => {
|
|
1923
1968
|
return newItem ? Object.keys(newItem.props || {}).reduce((acc, item) => {
|
|
1924
1969
|
const newItemProps = (newItem == null ? void 0 : newItem.props) || {};
|
|
1925
1970
|
const oldItemProps = (oldItem == null ? void 0 : oldItem.props) || {};
|
|
1926
1971
|
return __spreadProps(__spreadValues({}, acc), {
|
|
1927
|
-
[item]: !(0,
|
|
1972
|
+
[item]: !(0, import_fast_equals.deepEqual)(oldItemProps[item], newItemProps[item])
|
|
1928
1973
|
});
|
|
1929
1974
|
}, {}) : {};
|
|
1930
1975
|
};
|
|
@@ -2079,6 +2124,7 @@ var useRegisterFieldsSlice = (appStore, id) => {
|
|
|
2079
2124
|
(reset) => __async(void 0, null, function* () {
|
|
2080
2125
|
var _a, _b;
|
|
2081
2126
|
const { fields, lastResolvedData } = appStore.getState().fields;
|
|
2127
|
+
const metadata = appStore.getState().metadata;
|
|
2082
2128
|
const nodes = appStore.getState().state.indexes.nodes;
|
|
2083
2129
|
const node = nodes[id || "root"];
|
|
2084
2130
|
const componentData = node == null ? void 0 : node.data;
|
|
@@ -2108,6 +2154,7 @@ var useRegisterFieldsSlice = (appStore, id) => {
|
|
|
2108
2154
|
changed,
|
|
2109
2155
|
fields: defaultFields2,
|
|
2110
2156
|
lastFields,
|
|
2157
|
+
metadata: __spreadValues(__spreadValues({}, metadata), componentConfig.metadata),
|
|
2111
2158
|
lastData,
|
|
2112
2159
|
appState: makeStatePublic(state),
|
|
2113
2160
|
parent
|
|
@@ -2143,7 +2190,7 @@ var useRegisterFieldsSlice = (appStore, id) => {
|
|
|
2143
2190
|
|
|
2144
2191
|
// lib/resolve-component-data.ts
|
|
2145
2192
|
init_react_import();
|
|
2146
|
-
var
|
|
2193
|
+
var import_fast_equals2 = require("fast-equals");
|
|
2147
2194
|
var cache = { lastChange: {} };
|
|
2148
2195
|
var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace") {
|
|
2149
2196
|
const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
|
|
@@ -2152,7 +2199,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], f
|
|
|
2152
2199
|
const id = "id" in item.props ? item.props.id : "root";
|
|
2153
2200
|
if (shouldRunResolver) {
|
|
2154
2201
|
const { item: oldItem = null, resolved = {} } = cache.lastChange[id] || {};
|
|
2155
|
-
if (trigger !== "force" && item && (0,
|
|
2202
|
+
if (trigger !== "force" && item && (0, import_fast_equals2.deepEqual)(item, oldItem)) {
|
|
2156
2203
|
return { node: resolved, didChange: false };
|
|
2157
2204
|
}
|
|
2158
2205
|
const changed = getChanged(item, oldItem);
|
|
@@ -2202,7 +2249,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], f
|
|
|
2202
2249
|
};
|
|
2203
2250
|
return {
|
|
2204
2251
|
node: itemWithResolvedChildren,
|
|
2205
|
-
didChange: !(0,
|
|
2252
|
+
didChange: !(0, import_fast_equals2.deepEqual)(item, itemWithResolvedChildren)
|
|
2206
2253
|
};
|
|
2207
2254
|
});
|
|
2208
2255
|
|
|
@@ -5529,26 +5576,26 @@ var registerOverlayPortal = (el, opts = {}) => {
|
|
|
5529
5576
|
capture: true
|
|
5530
5577
|
});
|
|
5531
5578
|
};
|
|
5532
|
-
if (
|
|
5533
|
-
el.addEventListener("focus", onFocus, { capture: true });
|
|
5534
|
-
el.addEventListener("blur", onBlur, { capture: true });
|
|
5535
|
-
} else if (disableDrag) {
|
|
5579
|
+
if (disableDrag) {
|
|
5536
5580
|
el.addEventListener("pointerdown", stopPropagation, {
|
|
5537
5581
|
capture: true
|
|
5538
5582
|
});
|
|
5583
|
+
} else if (disableDragOnFocus) {
|
|
5584
|
+
el.addEventListener("focus", onFocus, { capture: true });
|
|
5585
|
+
el.addEventListener("blur", onBlur, { capture: true });
|
|
5539
5586
|
}
|
|
5540
5587
|
el.setAttribute("data-puck-overlay-portal", "true");
|
|
5541
5588
|
return () => {
|
|
5542
5589
|
el.removeEventListener("mouseover", stopPropagation, {
|
|
5543
5590
|
capture: true
|
|
5544
5591
|
});
|
|
5545
|
-
if (
|
|
5546
|
-
el.removeEventListener("focus", onFocus, { capture: true });
|
|
5547
|
-
el.removeEventListener("blur", onFocus, { capture: true });
|
|
5548
|
-
} else if (disableDrag) {
|
|
5592
|
+
if (disableDrag) {
|
|
5549
5593
|
el.removeEventListener("pointerdown", stopPropagation, {
|
|
5550
5594
|
capture: true
|
|
5551
5595
|
});
|
|
5596
|
+
} else if (disableDragOnFocus) {
|
|
5597
|
+
el.removeEventListener("focus", onFocus, { capture: true });
|
|
5598
|
+
el.removeEventListener("blur", onBlur, { capture: true });
|
|
5552
5599
|
}
|
|
5553
5600
|
el.removeAttribute("data-puck-overlay-portal");
|
|
5554
5601
|
};
|
|
@@ -5556,7 +5603,7 @@ var registerOverlayPortal = (el, opts = {}) => {
|
|
|
5556
5603
|
|
|
5557
5604
|
// css-module:/home/runner/work/puck/puck/packages/core/components/InlineTextField/styles.module.css#css-module
|
|
5558
5605
|
init_react_import();
|
|
5559
|
-
var styles_module_default13 = { "InlineTextField": "
|
|
5606
|
+
var styles_module_default13 = { "InlineTextField": "_InlineTextField_104qp_1" };
|
|
5560
5607
|
|
|
5561
5608
|
// lib/data/set-deep.ts
|
|
5562
5609
|
init_react_import();
|
|
@@ -7046,7 +7093,7 @@ Drawer.Item = DrawerItem;
|
|
|
7046
7093
|
|
|
7047
7094
|
// components/Puck/index.tsx
|
|
7048
7095
|
init_react_import();
|
|
7049
|
-
var
|
|
7096
|
+
var import_react60 = require("react");
|
|
7050
7097
|
|
|
7051
7098
|
// components/SidebarSection/index.tsx
|
|
7052
7099
|
init_react_import();
|
|
@@ -8584,9 +8631,70 @@ var usePreviewModeHotkeys = () => {
|
|
|
8584
8631
|
useHotkey({ ctrl: true, i: true }, toggleInteractive);
|
|
8585
8632
|
};
|
|
8586
8633
|
|
|
8587
|
-
// lib/use-
|
|
8634
|
+
// lib/use-delete-hotkeys.ts
|
|
8588
8635
|
init_react_import();
|
|
8589
8636
|
var import_react55 = require("react");
|
|
8637
|
+
var isElementVisible = (element) => {
|
|
8638
|
+
let current = element;
|
|
8639
|
+
while (current && current !== document.body) {
|
|
8640
|
+
const style = window.getComputedStyle(current);
|
|
8641
|
+
if (style.display === "none" || style.visibility === "hidden" || style.opacity === "0" || current.getAttribute("aria-hidden") === "true" || current.hasAttribute("hidden")) {
|
|
8642
|
+
return false;
|
|
8643
|
+
}
|
|
8644
|
+
current = current.parentElement;
|
|
8645
|
+
}
|
|
8646
|
+
return true;
|
|
8647
|
+
};
|
|
8648
|
+
var shouldBlockDeleteHotkey = (e) => {
|
|
8649
|
+
var _a;
|
|
8650
|
+
if (e == null ? void 0 : e.defaultPrevented) return true;
|
|
8651
|
+
const origin = ((_a = e == null ? void 0 : e.composedPath) == null ? void 0 : _a.call(e)[0]) || (e == null ? void 0 : e.target) || document.activeElement;
|
|
8652
|
+
if (origin instanceof HTMLElement) {
|
|
8653
|
+
const tag = origin.tagName.toLowerCase();
|
|
8654
|
+
if (tag === "input" || tag === "textarea" || tag === "select") return true;
|
|
8655
|
+
if (origin.isContentEditable) return true;
|
|
8656
|
+
const role = origin.getAttribute("role");
|
|
8657
|
+
if (role === "textbox" || role === "combobox" || role === "searchbox" || role === "listbox" || role === "grid") {
|
|
8658
|
+
return true;
|
|
8659
|
+
}
|
|
8660
|
+
}
|
|
8661
|
+
const modal = document.querySelector(
|
|
8662
|
+
'dialog[open], [aria-modal="true"], [role="dialog"], [role="alertdialog"]'
|
|
8663
|
+
);
|
|
8664
|
+
if (modal && isElementVisible(modal)) {
|
|
8665
|
+
return true;
|
|
8666
|
+
}
|
|
8667
|
+
return false;
|
|
8668
|
+
};
|
|
8669
|
+
var useDeleteHotkeys = () => {
|
|
8670
|
+
const appStore = useAppStoreApi();
|
|
8671
|
+
const deleteSelectedComponent = (0, import_react55.useCallback)(
|
|
8672
|
+
(e) => {
|
|
8673
|
+
var _a;
|
|
8674
|
+
if (shouldBlockDeleteHotkey(e)) {
|
|
8675
|
+
return false;
|
|
8676
|
+
}
|
|
8677
|
+
const { state, dispatch, permissions, selectedItem } = appStore.getState();
|
|
8678
|
+
const sel = (_a = state.ui) == null ? void 0 : _a.itemSelector;
|
|
8679
|
+
if (!(sel == null ? void 0 : sel.zone) || !selectedItem) return true;
|
|
8680
|
+
if (!permissions.getPermissions({ item: selectedItem }).delete)
|
|
8681
|
+
return true;
|
|
8682
|
+
dispatch({
|
|
8683
|
+
type: "remove",
|
|
8684
|
+
index: sel.index,
|
|
8685
|
+
zone: sel.zone
|
|
8686
|
+
});
|
|
8687
|
+
return true;
|
|
8688
|
+
},
|
|
8689
|
+
[appStore]
|
|
8690
|
+
);
|
|
8691
|
+
useHotkey({ delete: true }, deleteSelectedComponent);
|
|
8692
|
+
useHotkey({ backspace: true }, deleteSelectedComponent);
|
|
8693
|
+
};
|
|
8694
|
+
|
|
8695
|
+
// lib/use-puck.ts
|
|
8696
|
+
init_react_import();
|
|
8697
|
+
var import_react56 = require("react");
|
|
8590
8698
|
var import_zustand6 = require("zustand");
|
|
8591
8699
|
var generateUsePuck = (store) => {
|
|
8592
8700
|
const history = {
|
|
@@ -8613,7 +8721,7 @@ var generateUsePuck = (store) => {
|
|
|
8613
8721
|
};
|
|
8614
8722
|
return storeData;
|
|
8615
8723
|
};
|
|
8616
|
-
var UsePuckStoreContext = (0,
|
|
8724
|
+
var UsePuckStoreContext = (0, import_react56.createContext)(
|
|
8617
8725
|
null
|
|
8618
8726
|
);
|
|
8619
8727
|
var convertToPickedStore = (store) => {
|
|
@@ -8627,12 +8735,12 @@ var convertToPickedStore = (store) => {
|
|
|
8627
8735
|
};
|
|
8628
8736
|
};
|
|
8629
8737
|
var useRegisterUsePuckStore = (appStore) => {
|
|
8630
|
-
const [usePuckStore] = (0,
|
|
8738
|
+
const [usePuckStore] = (0, import_react56.useState)(
|
|
8631
8739
|
() => (0, import_zustand6.createStore)(
|
|
8632
8740
|
() => generateUsePuck(convertToPickedStore(appStore.getState()))
|
|
8633
8741
|
)
|
|
8634
8742
|
);
|
|
8635
|
-
(0,
|
|
8743
|
+
(0, import_react56.useEffect)(() => {
|
|
8636
8744
|
return appStore.subscribe(
|
|
8637
8745
|
(store) => convertToPickedStore(store),
|
|
8638
8746
|
(pickedStore) => {
|
|
@@ -8644,7 +8752,7 @@ var useRegisterUsePuckStore = (appStore) => {
|
|
|
8644
8752
|
};
|
|
8645
8753
|
function createUsePuck() {
|
|
8646
8754
|
return function usePuck2(selector) {
|
|
8647
|
-
const usePuckApi = (0,
|
|
8755
|
+
const usePuckApi = (0, import_react56.useContext)(UsePuckStoreContext);
|
|
8648
8756
|
if (!usePuckApi) {
|
|
8649
8757
|
throw new Error("usePuck must be used inside <Puck>.");
|
|
8650
8758
|
}
|
|
@@ -8656,7 +8764,7 @@ function createUsePuck() {
|
|
|
8656
8764
|
};
|
|
8657
8765
|
}
|
|
8658
8766
|
function usePuck() {
|
|
8659
|
-
(0,
|
|
8767
|
+
(0, import_react56.useEffect)(() => {
|
|
8660
8768
|
console.warn(
|
|
8661
8769
|
"You're using the `usePuck` method without a selector, which may cause unnecessary re-renders. Replace with `createUsePuck` and provide a selector for improved performance."
|
|
8662
8770
|
);
|
|
@@ -8664,7 +8772,7 @@ function usePuck() {
|
|
|
8664
8772
|
return createUsePuck()((s) => s);
|
|
8665
8773
|
}
|
|
8666
8774
|
function useGetPuck() {
|
|
8667
|
-
const usePuckApi = (0,
|
|
8775
|
+
const usePuckApi = (0, import_react56.useContext)(UsePuckStoreContext);
|
|
8668
8776
|
if (!usePuckApi) {
|
|
8669
8777
|
throw new Error("usePuckGet must be used inside <Puck>.");
|
|
8670
8778
|
}
|
|
@@ -8672,11 +8780,11 @@ function useGetPuck() {
|
|
|
8672
8780
|
}
|
|
8673
8781
|
|
|
8674
8782
|
// components/Puck/index.tsx
|
|
8675
|
-
var
|
|
8783
|
+
var import_fast_deep_equal = __toESM(require_fast_deep_equal());
|
|
8676
8784
|
|
|
8677
8785
|
// components/Puck/components/Header/index.tsx
|
|
8678
8786
|
init_react_import();
|
|
8679
|
-
var
|
|
8787
|
+
var import_react57 = require("react");
|
|
8680
8788
|
|
|
8681
8789
|
// components/MenuBar/index.tsx
|
|
8682
8790
|
init_react_import();
|
|
@@ -8758,7 +8866,7 @@ var HeaderInner = () => {
|
|
|
8758
8866
|
} = usePropsContext();
|
|
8759
8867
|
const dispatch = useAppStore((s) => s.dispatch);
|
|
8760
8868
|
const appStore = useAppStoreApi();
|
|
8761
|
-
const defaultHeaderRender = (0,
|
|
8869
|
+
const defaultHeaderRender = (0, import_react57.useMemo)(() => {
|
|
8762
8870
|
if (renderHeader) {
|
|
8763
8871
|
console.warn(
|
|
8764
8872
|
"`renderHeader` is deprecated. Please use `overrides.header` and the `usePuck` hook instead"
|
|
@@ -8773,7 +8881,7 @@ var HeaderInner = () => {
|
|
|
8773
8881
|
}
|
|
8774
8882
|
return DefaultOverride;
|
|
8775
8883
|
}, [renderHeader]);
|
|
8776
|
-
const defaultHeaderActionsRender = (0,
|
|
8884
|
+
const defaultHeaderActionsRender = (0, import_react57.useMemo)(() => {
|
|
8777
8885
|
if (renderHeaderActions) {
|
|
8778
8886
|
console.warn(
|
|
8779
8887
|
"`renderHeaderActions` is deprecated. Please use `overrides.headerActions` and the `usePuck` hook instead."
|
|
@@ -8793,7 +8901,7 @@ var HeaderInner = () => {
|
|
|
8793
8901
|
const CustomHeaderActions = useAppStore(
|
|
8794
8902
|
(s) => s.overrides.headerActions || defaultHeaderActionsRender
|
|
8795
8903
|
);
|
|
8796
|
-
const [menuOpen, setMenuOpen] = (0,
|
|
8904
|
+
const [menuOpen, setMenuOpen] = (0, import_react57.useState)(false);
|
|
8797
8905
|
const rootTitle = useAppStore((s) => {
|
|
8798
8906
|
var _a, _b;
|
|
8799
8907
|
const rootData = (_a = s.state.indexes.nodes["root"]) == null ? void 0 : _a.data;
|
|
@@ -8803,7 +8911,7 @@ var HeaderInner = () => {
|
|
|
8803
8911
|
const rightSideBarVisible = useAppStore(
|
|
8804
8912
|
(s) => s.state.ui.rightSideBarVisible
|
|
8805
8913
|
);
|
|
8806
|
-
const toggleSidebars = (0,
|
|
8914
|
+
const toggleSidebars = (0, import_react57.useCallback)(
|
|
8807
8915
|
(sidebar) => {
|
|
8808
8916
|
const widerViewport = window.matchMedia("(min-width: 638px)").matches;
|
|
8809
8917
|
const sideBarVisible = sidebar === "left" ? leftSideBarVisible : rightSideBarVisible;
|
|
@@ -8906,14 +9014,14 @@ var HeaderInner = () => {
|
|
|
8906
9014
|
}
|
|
8907
9015
|
);
|
|
8908
9016
|
};
|
|
8909
|
-
var Header = (0,
|
|
9017
|
+
var Header = (0, import_react57.memo)(HeaderInner);
|
|
8910
9018
|
|
|
8911
9019
|
// components/Puck/components/Sidebar/index.tsx
|
|
8912
9020
|
init_react_import();
|
|
8913
9021
|
|
|
8914
9022
|
// components/Puck/components/ResizeHandle/index.tsx
|
|
8915
9023
|
init_react_import();
|
|
8916
|
-
var
|
|
9024
|
+
var import_react58 = require("react");
|
|
8917
9025
|
|
|
8918
9026
|
// css-module:/home/runner/work/puck/puck/packages/core/components/Puck/components/ResizeHandle/styles.module.css#css-module
|
|
8919
9027
|
init_react_import();
|
|
@@ -8930,11 +9038,11 @@ var ResizeHandle = ({
|
|
|
8930
9038
|
}) => {
|
|
8931
9039
|
const { frameRef } = useCanvasFrame();
|
|
8932
9040
|
const resetAutoZoom = useResetAutoZoom(frameRef);
|
|
8933
|
-
const handleRef = (0,
|
|
8934
|
-
const isDragging = (0,
|
|
8935
|
-
const startX = (0,
|
|
8936
|
-
const startWidth = (0,
|
|
8937
|
-
const handleMouseMove = (0,
|
|
9041
|
+
const handleRef = (0, import_react58.useRef)(null);
|
|
9042
|
+
const isDragging = (0, import_react58.useRef)(false);
|
|
9043
|
+
const startX = (0, import_react58.useRef)(0);
|
|
9044
|
+
const startWidth = (0, import_react58.useRef)(0);
|
|
9045
|
+
const handleMouseMove = (0, import_react58.useCallback)(
|
|
8938
9046
|
(e) => {
|
|
8939
9047
|
if (!isDragging.current) return;
|
|
8940
9048
|
const delta = e.clientX - startX.current;
|
|
@@ -8945,7 +9053,7 @@ var ResizeHandle = ({
|
|
|
8945
9053
|
},
|
|
8946
9054
|
[onResize, position]
|
|
8947
9055
|
);
|
|
8948
|
-
const handleMouseUp = (0,
|
|
9056
|
+
const handleMouseUp = (0, import_react58.useCallback)(() => {
|
|
8949
9057
|
var _a;
|
|
8950
9058
|
if (!isDragging.current) return;
|
|
8951
9059
|
isDragging.current = false;
|
|
@@ -8961,7 +9069,7 @@ var ResizeHandle = ({
|
|
|
8961
9069
|
onResizeEnd(finalWidth);
|
|
8962
9070
|
resetAutoZoom();
|
|
8963
9071
|
}, [onResizeEnd]);
|
|
8964
|
-
const handleMouseDown = (0,
|
|
9072
|
+
const handleMouseDown = (0, import_react58.useCallback)(
|
|
8965
9073
|
(e) => {
|
|
8966
9074
|
var _a;
|
|
8967
9075
|
isDragging.current = true;
|
|
@@ -9021,14 +9129,14 @@ var Sidebar = ({
|
|
|
9021
9129
|
|
|
9022
9130
|
// lib/use-sidebar-resize.ts
|
|
9023
9131
|
init_react_import();
|
|
9024
|
-
var
|
|
9132
|
+
var import_react59 = require("react");
|
|
9025
9133
|
function useSidebarResize(position, dispatch) {
|
|
9026
|
-
const [width, setWidth] = (0,
|
|
9027
|
-
const sidebarRef = (0,
|
|
9134
|
+
const [width, setWidth] = (0, import_react59.useState)(null);
|
|
9135
|
+
const sidebarRef = (0, import_react59.useRef)(null);
|
|
9028
9136
|
const storeWidth = useAppStore(
|
|
9029
9137
|
(s) => position === "left" ? s.state.ui.leftSideBarWidth : s.state.ui.rightSideBarWidth
|
|
9030
9138
|
);
|
|
9031
|
-
(0,
|
|
9139
|
+
(0, import_react59.useEffect)(() => {
|
|
9032
9140
|
if (typeof window !== "undefined" && !storeWidth) {
|
|
9033
9141
|
try {
|
|
9034
9142
|
const savedWidths = localStorage.getItem("puck-sidebar-widths");
|
|
@@ -9053,12 +9161,12 @@ function useSidebarResize(position, dispatch) {
|
|
|
9053
9161
|
}
|
|
9054
9162
|
}
|
|
9055
9163
|
}, [dispatch, position, storeWidth]);
|
|
9056
|
-
(0,
|
|
9164
|
+
(0, import_react59.useEffect)(() => {
|
|
9057
9165
|
if (storeWidth !== void 0) {
|
|
9058
9166
|
setWidth(storeWidth);
|
|
9059
9167
|
}
|
|
9060
9168
|
}, [storeWidth]);
|
|
9061
|
-
const handleResizeEnd = (0,
|
|
9169
|
+
const handleResizeEnd = (0, import_react59.useCallback)(
|
|
9062
9170
|
(width2) => {
|
|
9063
9171
|
dispatch({
|
|
9064
9172
|
type: "setUi",
|
|
@@ -9113,11 +9221,11 @@ var FieldSideBar = () => {
|
|
|
9113
9221
|
);
|
|
9114
9222
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SidebarSection, { noPadding: true, noBorderTop: true, showBreadcrumbs: true, title, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Fields, {}) });
|
|
9115
9223
|
};
|
|
9116
|
-
var propsContext = (0,
|
|
9224
|
+
var propsContext = (0, import_react60.createContext)({});
|
|
9117
9225
|
function PropsProvider(props) {
|
|
9118
9226
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(propsContext.Provider, { value: props, children: props.children });
|
|
9119
9227
|
}
|
|
9120
|
-
var usePropsContext = () => (0,
|
|
9228
|
+
var usePropsContext = () => (0, import_react60.useContext)(propsContext);
|
|
9121
9229
|
function PuckProvider({ children }) {
|
|
9122
9230
|
const {
|
|
9123
9231
|
config,
|
|
@@ -9134,14 +9242,14 @@ function PuckProvider({ children }) {
|
|
|
9134
9242
|
onAction,
|
|
9135
9243
|
fieldTransforms
|
|
9136
9244
|
} = usePropsContext();
|
|
9137
|
-
const iframe = (0,
|
|
9245
|
+
const iframe = (0, import_react60.useMemo)(
|
|
9138
9246
|
() => __spreadValues({
|
|
9139
9247
|
enabled: true,
|
|
9140
9248
|
waitForStyles: true
|
|
9141
9249
|
}, _iframe),
|
|
9142
9250
|
[_iframe]
|
|
9143
9251
|
);
|
|
9144
|
-
const [generatedAppState] = (0,
|
|
9252
|
+
const [generatedAppState] = (0, import_react60.useState)(() => {
|
|
9145
9253
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
9146
9254
|
const initial = __spreadValues(__spreadValues({}, defaultAppState.ui), initialUi);
|
|
9147
9255
|
let clientUiState = {};
|
|
@@ -9201,7 +9309,7 @@ function PuckProvider({ children }) {
|
|
|
9201
9309
|
return walkAppState(newAppState, config);
|
|
9202
9310
|
});
|
|
9203
9311
|
const { appendData = true } = _initialHistory || {};
|
|
9204
|
-
const [blendedHistories] = (0,
|
|
9312
|
+
const [blendedHistories] = (0, import_react60.useState)(
|
|
9205
9313
|
[
|
|
9206
9314
|
...(_initialHistory == null ? void 0 : _initialHistory.histories) || [],
|
|
9207
9315
|
...appendData ? [{ state: generatedAppState }] : []
|
|
@@ -9221,7 +9329,7 @@ function PuckProvider({ children }) {
|
|
|
9221
9329
|
overrides,
|
|
9222
9330
|
plugins
|
|
9223
9331
|
});
|
|
9224
|
-
const loadedFieldTransforms = (0,
|
|
9332
|
+
const loadedFieldTransforms = (0, import_react60.useMemo)(() => {
|
|
9225
9333
|
const _plugins = plugins || [];
|
|
9226
9334
|
const pluginFieldTransforms = _plugins.reduce(
|
|
9227
9335
|
(acc, plugin) => __spreadValues(__spreadValues({}, acc), plugin.fieldTransforms),
|
|
@@ -9229,7 +9337,7 @@ function PuckProvider({ children }) {
|
|
|
9229
9337
|
);
|
|
9230
9338
|
return __spreadValues(__spreadValues({}, pluginFieldTransforms), fieldTransforms);
|
|
9231
9339
|
}, [fieldTransforms, plugins]);
|
|
9232
|
-
const generateAppStore = (0,
|
|
9340
|
+
const generateAppStore = (0, import_react60.useCallback)(
|
|
9233
9341
|
(state) => {
|
|
9234
9342
|
return {
|
|
9235
9343
|
state,
|
|
@@ -9255,15 +9363,15 @@ function PuckProvider({ children }) {
|
|
|
9255
9363
|
loadedFieldTransforms
|
|
9256
9364
|
]
|
|
9257
9365
|
);
|
|
9258
|
-
const [appStore] = (0,
|
|
9366
|
+
const [appStore] = (0, import_react60.useState)(
|
|
9259
9367
|
() => createAppStore(generateAppStore(initialAppState))
|
|
9260
9368
|
);
|
|
9261
|
-
(0,
|
|
9369
|
+
(0, import_react60.useEffect)(() => {
|
|
9262
9370
|
if (process.env.NODE_ENV !== "production") {
|
|
9263
9371
|
window.__PUCK_INTERNAL_DO_NOT_USE = { appStore };
|
|
9264
9372
|
}
|
|
9265
9373
|
}, [appStore]);
|
|
9266
|
-
(0,
|
|
9374
|
+
(0, import_react60.useEffect)(() => {
|
|
9267
9375
|
const state = appStore.getState().state;
|
|
9268
9376
|
appStore.setState(__spreadValues({}, generateAppStore(state)));
|
|
9269
9377
|
}, [config, plugins, loadedOverrides, viewports, iframe, onAction, metadata]);
|
|
@@ -9272,13 +9380,13 @@ function PuckProvider({ children }) {
|
|
|
9272
9380
|
index: initialHistoryIndex,
|
|
9273
9381
|
initialAppState
|
|
9274
9382
|
});
|
|
9275
|
-
const previousData = (0,
|
|
9276
|
-
(0,
|
|
9383
|
+
const previousData = (0, import_react60.useRef)(null);
|
|
9384
|
+
(0, import_react60.useEffect)(() => {
|
|
9277
9385
|
appStore.subscribe(
|
|
9278
9386
|
(s) => s.state.data,
|
|
9279
9387
|
(data) => {
|
|
9280
9388
|
if (onChange) {
|
|
9281
|
-
if ((0,
|
|
9389
|
+
if ((0, import_fast_deep_equal.default)(data, previousData.current)) return;
|
|
9282
9390
|
onChange(data);
|
|
9283
9391
|
previousData.current = data;
|
|
9284
9392
|
}
|
|
@@ -9287,7 +9395,7 @@ function PuckProvider({ children }) {
|
|
|
9287
9395
|
}, []);
|
|
9288
9396
|
useRegisterPermissionsSlice(appStore, permissions);
|
|
9289
9397
|
const uPuckStore = useRegisterUsePuckStore(appStore);
|
|
9290
|
-
(0,
|
|
9398
|
+
(0, import_react60.useEffect)(() => {
|
|
9291
9399
|
const { resolveAndCommitData } = appStore.getState();
|
|
9292
9400
|
resolveAndCommitData();
|
|
9293
9401
|
}, []);
|
|
@@ -9299,7 +9407,7 @@ function PuckLayout({ children }) {
|
|
|
9299
9407
|
dnd,
|
|
9300
9408
|
initialHistory: _initialHistory
|
|
9301
9409
|
} = usePropsContext();
|
|
9302
|
-
const iframe = (0,
|
|
9410
|
+
const iframe = (0, import_react60.useMemo)(
|
|
9303
9411
|
() => __spreadValues({
|
|
9304
9412
|
enabled: true,
|
|
9305
9413
|
waitForStyles: true
|
|
@@ -9324,7 +9432,7 @@ function PuckLayout({ children }) {
|
|
|
9324
9432
|
sidebarRef: rightSidebarRef,
|
|
9325
9433
|
handleResizeEnd: handleRightSidebarResizeEnd
|
|
9326
9434
|
} = useSidebarResize("right", dispatch);
|
|
9327
|
-
(0,
|
|
9435
|
+
(0, import_react60.useEffect)(() => {
|
|
9328
9436
|
if (!window.matchMedia("(min-width: 638px)").matches) {
|
|
9329
9437
|
dispatch({
|
|
9330
9438
|
type: "setUi",
|
|
@@ -9348,17 +9456,18 @@ function PuckLayout({ children }) {
|
|
|
9348
9456
|
};
|
|
9349
9457
|
}, []);
|
|
9350
9458
|
const overrides = useAppStore((s) => s.overrides);
|
|
9351
|
-
const CustomPuck = (0,
|
|
9459
|
+
const CustomPuck = (0, import_react60.useMemo)(
|
|
9352
9460
|
() => overrides.puck || DefaultOverride,
|
|
9353
9461
|
[overrides]
|
|
9354
9462
|
);
|
|
9355
|
-
const [mounted, setMounted] = (0,
|
|
9356
|
-
(0,
|
|
9463
|
+
const [mounted, setMounted] = (0, import_react60.useState)(false);
|
|
9464
|
+
(0, import_react60.useEffect)(() => {
|
|
9357
9465
|
setMounted(true);
|
|
9358
9466
|
}, []);
|
|
9359
9467
|
const ready = useAppStore((s) => s.status === "READY");
|
|
9360
9468
|
useMonitorHotkeys();
|
|
9361
|
-
(
|
|
9469
|
+
useDeleteHotkeys();
|
|
9470
|
+
(0, import_react60.useEffect)(() => {
|
|
9362
9471
|
if (ready && iframe.enabled) {
|
|
9363
9472
|
const frameDoc = getFrame();
|
|
9364
9473
|
if (frameDoc) {
|
package/dist/index.mjs
CHANGED
|
@@ -18,14 +18,14 @@ import {
|
|
|
18
18
|
setDeep,
|
|
19
19
|
useGetPuck,
|
|
20
20
|
usePuck
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-KHAM6QNU.mjs";
|
|
22
22
|
import {
|
|
23
23
|
init_react_import,
|
|
24
24
|
migrate,
|
|
25
25
|
resolveAllData,
|
|
26
26
|
transformProps,
|
|
27
27
|
walkTree
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-X7YZ3YE7.mjs";
|
|
29
29
|
|
|
30
30
|
// bundle/index.ts
|
|
31
31
|
init_react_import();
|
package/dist/no-external.css
CHANGED
|
@@ -1329,16 +1329,17 @@ body:has(._DropZone--isAnimating_1i2sv_68:empty) [data-puck-overlay] {
|
|
|
1329
1329
|
}
|
|
1330
1330
|
|
|
1331
1331
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/InlineTextField/styles.module.css/#css-module-data */
|
|
1332
|
-
.
|
|
1332
|
+
._InlineTextField_104qp_1 {
|
|
1333
1333
|
cursor: text;
|
|
1334
1334
|
display: inline-block;
|
|
1335
1335
|
white-space: pre-wrap;
|
|
1336
|
+
text-decoration: inherit;
|
|
1336
1337
|
}
|
|
1337
|
-
[data-dnd-dragging] .
|
|
1338
|
+
[data-dnd-dragging] ._InlineTextField_104qp_1 {
|
|
1338
1339
|
cursor: none;
|
|
1339
1340
|
caret-color: transparent;
|
|
1340
1341
|
}
|
|
1341
|
-
[data-dnd-dragging] .
|
|
1342
|
+
[data-dnd-dragging] ._InlineTextField_104qp_1::selection {
|
|
1342
1343
|
display: none;
|
|
1343
1344
|
}
|
|
1344
1345
|
|
package/dist/no-external.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a7 as Adaptor, A as AppState, a5 as ArrayField, B as ArrayState, ak as AsFieldProps, N as BaseData, $ as BaseField, f as ComponentConfig, a as ComponentData, Z as ComponentDataMap, X as ComponentDataOptionalId, C as Config, _ as Content, ab as CustomField, aa as CustomFieldRender, j as Data, ah as DefaultComponentProps, K as DefaultComponents, ae as DefaultRootFieldProps, ag as DefaultRootProps, af as DefaultRootRenderProps, o as Direction, p as DragAxis, a9 as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, am as ExtractField, h as Field, i as FieldProps, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, g as FieldTransforms, F as Fields, H as History, I as IframeConfig, l as InitialHistory, z as ItemWithId, Y as MappedItem, M as Metadata, a1 as NumberField, a6 as ObjectField, k as OnAction, x as OverrideKey, O as Overrides, P as Permissions, d as Plugin, b as PuckAction, G as PuckComponent, ad as PuckContext, a4 as RadioField, c as ResolveDataTrigger, J as RootConfig, T as RootData, R as RootDataWithProps, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ac as SlotField, a0 as TextField, a2 as TextareaField, e as UiState, U as UserGenerics, q as Viewport, V as Viewports, al as WithChildren, ai as WithId, aj as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
1
|
+
export { a7 as Adaptor, A as AppState, a5 as ArrayField, B as ArrayState, ak as AsFieldProps, N as BaseData, $ as BaseField, f as ComponentConfig, a as ComponentData, Z as ComponentDataMap, X as ComponentDataOptionalId, C as Config, _ as Content, ab as CustomField, aa as CustomFieldRender, j as Data, ah as DefaultComponentProps, K as DefaultComponents, ae as DefaultRootFieldProps, ag as DefaultRootProps, af as DefaultRootRenderProps, o as Direction, p as DragAxis, a9 as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, am as ExtractField, h as Field, i as FieldProps, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, g as FieldTransforms, F as Fields, H as History, I as IframeConfig, l as InitialHistory, z as ItemWithId, Y as MappedItem, M as Metadata, a1 as NumberField, a6 as ObjectField, k as OnAction, x as OverrideKey, O as Overrides, P as Permissions, d as Plugin, b as PuckAction, G as PuckComponent, ad as PuckContext, a4 as RadioField, c as ResolveDataTrigger, J as RootConfig, T as RootData, R as RootDataWithProps, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ac as SlotField, a0 as TextField, a2 as TextareaField, e as UiState, U as UserGenerics, q as Viewport, V as Viewports, al as WithChildren, ai as WithId, aj as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Ctf3FZQI.mjs';
|
|
2
2
|
export { Action, ActionBar, AutoField, Button, Drawer, DropZone, FieldLabel, Group, IconButton, Label, Puck, PuckApi, Render, UsePuckData, createUsePuck, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck } from './index.mjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react/jsx-runtime';
|
package/dist/no-external.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a7 as Adaptor, A as AppState, a5 as ArrayField, B as ArrayState, ak as AsFieldProps, N as BaseData, $ as BaseField, f as ComponentConfig, a as ComponentData, Z as ComponentDataMap, X as ComponentDataOptionalId, C as Config, _ as Content, ab as CustomField, aa as CustomFieldRender, j as Data, ah as DefaultComponentProps, K as DefaultComponents, ae as DefaultRootFieldProps, ag as DefaultRootProps, af as DefaultRootRenderProps, o as Direction, p as DragAxis, a9 as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, am as ExtractField, h as Field, i as FieldProps, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, g as FieldTransforms, F as Fields, H as History, I as IframeConfig, l as InitialHistory, z as ItemWithId, Y as MappedItem, M as Metadata, a1 as NumberField, a6 as ObjectField, k as OnAction, x as OverrideKey, O as Overrides, P as Permissions, d as Plugin, b as PuckAction, G as PuckComponent, ad as PuckContext, a4 as RadioField, c as ResolveDataTrigger, J as RootConfig, T as RootData, R as RootDataWithProps, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ac as SlotField, a0 as TextField, a2 as TextareaField, e as UiState, U as UserGenerics, q as Viewport, V as Viewports, al as WithChildren, ai as WithId, aj as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
1
|
+
export { a7 as Adaptor, A as AppState, a5 as ArrayField, B as ArrayState, ak as AsFieldProps, N as BaseData, $ as BaseField, f as ComponentConfig, a as ComponentData, Z as ComponentDataMap, X as ComponentDataOptionalId, C as Config, _ as Content, ab as CustomField, aa as CustomFieldRender, j as Data, ah as DefaultComponentProps, K as DefaultComponents, ae as DefaultRootFieldProps, ag as DefaultRootProps, af as DefaultRootRenderProps, o as Direction, p as DragAxis, a9 as ExternalField, a8 as ExternalFieldWithAdaptor, L as ExtractConfigParams, am as ExtractField, h as Field, i as FieldProps, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, g as FieldTransforms, F as Fields, H as History, I as IframeConfig, l as InitialHistory, z as ItemWithId, Y as MappedItem, M as Metadata, a1 as NumberField, a6 as ObjectField, k as OnAction, x as OverrideKey, O as Overrides, P as Permissions, d as Plugin, b as PuckAction, G as PuckComponent, ad as PuckContext, a4 as RadioField, c as ResolveDataTrigger, J as RootConfig, T as RootData, R as RootDataWithProps, Q as RootDataWithoutProps, a3 as SelectField, S as Slot, E as SlotComponent, ac as SlotField, a0 as TextField, a2 as TextareaField, e as UiState, U as UserGenerics, q as Viewport, V as Viewports, al as WithChildren, ai as WithId, aj as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Ctf3FZQI.js';
|
|
2
2
|
export { Action, ActionBar, AutoField, Button, Drawer, DropZone, FieldLabel, Group, IconButton, Label, Puck, PuckApi, Render, UsePuckData, createUsePuck, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck } from './index.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react/jsx-runtime';
|