@measured/puck 0.21.0-canary.6dae6cb7 → 0.21.0-canary.7dca3a5a
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-OOLYDXKW.mjs → chunk-6SIKCDJJ.mjs} +10 -7
- package/dist/{chunk-NBNCSA43.mjs → chunk-FKDVYRQW.mjs} +2257 -1711
- package/dist/index.css +654 -275
- package/dist/index.d.mts +17 -5
- package/dist/index.d.ts +17 -5
- package/dist/index.js +1605 -1061
- package/dist/index.mjs +8 -2
- package/dist/no-external.css +654 -275
- package/dist/no-external.d.mts +2 -2
- package/dist/no-external.d.ts +2 -2
- package/dist/no-external.js +1605 -1061
- package/dist/no-external.mjs +8 -2
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +9 -7
- package/dist/rsc.mjs +1 -1
- package/dist/{walk-tree-Ctf3FZQI.d.mts → walk-tree-DS1xB387.d.mts} +74 -50
- package/dist/{walk-tree-Ctf3FZQI.d.ts → walk-tree-DS1xB387.d.ts} +74 -50
- package/package.json +2 -2
|
@@ -295,7 +295,8 @@ init_react_import();
|
|
|
295
295
|
var defaultViewports = [
|
|
296
296
|
{ width: 360, height: "auto", icon: "Smartphone", label: "Small" },
|
|
297
297
|
{ width: 768, height: "auto", icon: "Tablet", label: "Medium" },
|
|
298
|
-
{ width: 1280, height: "auto", icon: "Monitor", label: "Large" }
|
|
298
|
+
{ width: 1280, height: "auto", icon: "Monitor", label: "Large" },
|
|
299
|
+
{ width: "100%", height: "auto", icon: "FullWidth", label: "Full-width" }
|
|
299
300
|
];
|
|
300
301
|
|
|
301
302
|
// store/default-app-state.ts
|
|
@@ -317,7 +318,8 @@ var defaultAppState = {
|
|
|
317
318
|
options: [],
|
|
318
319
|
controlsVisible: true
|
|
319
320
|
},
|
|
320
|
-
field: { focus: null }
|
|
321
|
+
field: { focus: null },
|
|
322
|
+
plugin: { current: null }
|
|
321
323
|
},
|
|
322
324
|
indexes: {
|
|
323
325
|
nodes: {},
|
|
@@ -681,19 +683,19 @@ init_react_import();
|
|
|
681
683
|
|
|
682
684
|
// lib/get-changed.ts
|
|
683
685
|
init_react_import();
|
|
684
|
-
import
|
|
686
|
+
import { deepEqual } from "fast-equals";
|
|
685
687
|
var getChanged = (newItem, oldItem) => {
|
|
686
688
|
return newItem ? Object.keys(newItem.props || {}).reduce((acc, item) => {
|
|
687
689
|
const newItemProps = (newItem == null ? void 0 : newItem.props) || {};
|
|
688
690
|
const oldItemProps = (oldItem == null ? void 0 : oldItem.props) || {};
|
|
689
691
|
return __spreadProps(__spreadValues({}, acc), {
|
|
690
|
-
[item]: !
|
|
692
|
+
[item]: !deepEqual(oldItemProps[item], newItemProps[item])
|
|
691
693
|
});
|
|
692
694
|
}, {}) : {};
|
|
693
695
|
};
|
|
694
696
|
|
|
695
697
|
// lib/resolve-component-data.ts
|
|
696
|
-
import
|
|
698
|
+
import { deepEqual as deepEqual2 } from "fast-equals";
|
|
697
699
|
var cache = { lastChange: {} };
|
|
698
700
|
var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace") {
|
|
699
701
|
const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
|
|
@@ -702,7 +704,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], f
|
|
|
702
704
|
const id = "id" in item.props ? item.props.id : "root";
|
|
703
705
|
if (shouldRunResolver) {
|
|
704
706
|
const { item: oldItem = null, resolved = {} } = cache.lastChange[id] || {};
|
|
705
|
-
if (trigger !== "force" && item &&
|
|
707
|
+
if (trigger !== "force" && item && deepEqual2(item, oldItem)) {
|
|
706
708
|
return { node: resolved, didChange: false };
|
|
707
709
|
}
|
|
708
710
|
const changed = getChanged(item, oldItem);
|
|
@@ -752,7 +754,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], f
|
|
|
752
754
|
};
|
|
753
755
|
return {
|
|
754
756
|
node: itemWithResolvedChildren,
|
|
755
|
-
didChange: !
|
|
757
|
+
didChange: !deepEqual2(item, itemWithResolvedChildren)
|
|
756
758
|
};
|
|
757
759
|
});
|
|
758
760
|
|
|
@@ -958,6 +960,7 @@ export {
|
|
|
958
960
|
useSlots,
|
|
959
961
|
SlotRenderPure,
|
|
960
962
|
SlotRender,
|
|
963
|
+
toComponent,
|
|
961
964
|
migrate,
|
|
962
965
|
transformProps,
|
|
963
966
|
resolveAllData
|