@measured/puck 0.21.0-canary.7dca3a5a → 0.21.0-canary.7ed9655b
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-6SIKCDJJ.mjs → chunk-IDP5ATXM.mjs} +11 -10
- package/dist/{chunk-FKDVYRQW.mjs → chunk-QOZ6ZSWO.mjs} +1001 -1080
- package/dist/index.css +35 -34
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +1282 -1368
- package/dist/index.mjs +2 -2
- package/dist/no-external.css +35 -34
- package/dist/no-external.d.mts +1 -1
- package/dist/no-external.d.ts +1 -1
- package/dist/no-external.js +1279 -1365
- 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 +11 -10
- package/dist/rsc.mjs +1 -1
- package/dist/{walk-tree-DS1xB387.d.mts → walk-tree-CI7CLsRf.d.mts} +9 -5
- package/dist/{walk-tree-DS1xB387.d.ts → walk-tree-CI7CLsRf.d.ts} +9 -5
- package/package.json +1 -1
|
@@ -697,7 +697,7 @@ var getChanged = (newItem, oldItem) => {
|
|
|
697
697
|
// lib/resolve-component-data.ts
|
|
698
698
|
import { deepEqual as deepEqual2 } from "fast-equals";
|
|
699
699
|
var cache = { lastChange: {} };
|
|
700
|
-
var resolveComponentData = (_0, _1, ..._2) => __async(
|
|
700
|
+
var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace") {
|
|
701
701
|
const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
|
|
702
702
|
const resolvedItem = __spreadValues({}, item);
|
|
703
703
|
const shouldRunResolver = (configForItem == null ? void 0 : configForItem.resolveData) && item.props;
|
|
@@ -725,11 +725,11 @@ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], f
|
|
|
725
725
|
let itemWithResolvedChildren = yield mapFields(
|
|
726
726
|
resolvedItem,
|
|
727
727
|
{
|
|
728
|
-
slot: (_02) => __async(
|
|
728
|
+
slot: (_02) => __async(null, [_02], function* ({ value }) {
|
|
729
729
|
const content = value;
|
|
730
730
|
return yield Promise.all(
|
|
731
731
|
content.map(
|
|
732
|
-
(childItem) => __async(
|
|
732
|
+
(childItem) => __async(null, null, function* () {
|
|
733
733
|
return (yield resolveComponentData(
|
|
734
734
|
childItem,
|
|
735
735
|
config,
|
|
@@ -772,7 +772,7 @@ function resolveAllData(_0, _1) {
|
|
|
772
772
|
return __async(this, arguments, function* (data, config, metadata = {}, onResolveStart, onResolveEnd) {
|
|
773
773
|
var _a;
|
|
774
774
|
const defaultedData = defaultData(data);
|
|
775
|
-
const resolveNode = (_node) => __async(
|
|
775
|
+
const resolveNode = (_node) => __async(null, null, function* () {
|
|
776
776
|
const node = toComponent(_node);
|
|
777
777
|
onResolveStart == null ? void 0 : onResolveStart(node);
|
|
778
778
|
const resolved = (yield resolveComponentData(
|
|
@@ -793,13 +793,13 @@ function resolveAllData(_0, _1) {
|
|
|
793
793
|
onResolveEnd == null ? void 0 : onResolveEnd(toComponent(resolvedDeep));
|
|
794
794
|
return resolvedDeep;
|
|
795
795
|
});
|
|
796
|
-
const processContent = (content) => __async(
|
|
796
|
+
const processContent = (content) => __async(null, null, function* () {
|
|
797
797
|
return Promise.all(content.map(resolveNode));
|
|
798
798
|
});
|
|
799
|
-
const processZones = () => __async(
|
|
799
|
+
const processZones = () => __async(null, null, function* () {
|
|
800
800
|
var _a2;
|
|
801
801
|
const zones = (_a2 = data.zones) != null ? _a2 : {};
|
|
802
|
-
Object.entries(zones).forEach((_02) => __async(
|
|
802
|
+
Object.entries(zones).forEach((_02) => __async(null, [_02], function* ([zoneKey, content]) {
|
|
803
803
|
zones[zoneKey] = yield Promise.all(content.map(resolveNode));
|
|
804
804
|
}));
|
|
805
805
|
return zones;
|
|
@@ -809,7 +809,7 @@ function resolveAllData(_0, _1) {
|
|
|
809
809
|
content: yield processContent(defaultedData.content),
|
|
810
810
|
zones: yield processZones()
|
|
811
811
|
};
|
|
812
|
-
Object.keys((_a = defaultedData.zones) != null ? _a : {}).forEach((zoneKey) => __async(
|
|
812
|
+
Object.keys((_a = defaultedData.zones) != null ? _a : {}).forEach((zoneKey) => __async(null, null, function* () {
|
|
813
813
|
const content = defaultedData.zones[zoneKey];
|
|
814
814
|
dynamic.zones[zoneKey] = yield processContent(content);
|
|
815
815
|
}), {});
|
|
@@ -916,8 +916,9 @@ var Item = ({
|
|
|
916
916
|
);
|
|
917
917
|
};
|
|
918
918
|
var SlotRender = forwardRef(
|
|
919
|
-
function SlotRenderInternal({ className, style, content, config, metadata }, ref) {
|
|
920
|
-
|
|
919
|
+
function SlotRenderInternal({ className, style, content, config, metadata, as }, ref) {
|
|
920
|
+
const El = as != null ? as : "div";
|
|
921
|
+
return /* @__PURE__ */ jsx(El, { className, style, ref, children: content.map((item) => {
|
|
921
922
|
if (!config.components[item.type]) {
|
|
922
923
|
return null;
|
|
923
924
|
}
|