@measured/puck 0.14.0-canary.b365418 → 0.14.0-canary.cc7d391
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.d.ts +6 -2
- package/dist/index.js +6 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -125,6 +125,7 @@ declare const Drawer: {
|
|
125
125
|
name: string;
|
126
126
|
children?: ((props: {
|
127
127
|
children: ReactNode;
|
128
|
+
name: string;
|
128
129
|
}) => ReactElement) | undefined;
|
129
130
|
id?: string | undefined;
|
130
131
|
index: number;
|
@@ -167,7 +168,7 @@ type RenderFunc<Props extends {
|
|
167
168
|
[key: string]: any;
|
168
169
|
} = {
|
169
170
|
children: ReactNode;
|
170
|
-
}> =
|
171
|
+
}> = (props: Props) => ReactElement;
|
171
172
|
declare const overrideKeys: readonly ["header", "headerActions", "fields", "fieldLabel", "components", "componentItem", "outline", "puck", "preview"];
|
172
173
|
type OverrideKey = (typeof overrideKeys)[number];
|
173
174
|
type OverridesGeneric<Shape extends {
|
@@ -197,7 +198,10 @@ type Overrides = OverridesGeneric<{
|
|
197
198
|
className?: string;
|
198
199
|
}>;
|
199
200
|
components: RenderFunc;
|
200
|
-
componentItem: RenderFunc
|
201
|
+
componentItem: RenderFunc<{
|
202
|
+
children: ReactNode;
|
203
|
+
name: string;
|
204
|
+
}>;
|
201
205
|
outline: RenderFunc;
|
202
206
|
puck: RenderFunc;
|
203
207
|
}>;
|
package/dist/index.js
CHANGED
@@ -29387,10 +29387,10 @@ var DrawerItem = ({
|
|
29387
29387
|
const ctx = (0, import_react3.useContext)(drawerContext);
|
29388
29388
|
const resolvedId = `${ctx.droppableId}::${id || name}`;
|
29389
29389
|
const CustomInner = (0, import_react3.useMemo)(
|
29390
|
-
() => children || (({ children: children2 }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: getClassNameItem("default"), children: children2 })),
|
29390
|
+
() => children || (({ children: children2, name: name2 }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: getClassNameItem("default"), children: children2 })),
|
29391
29391
|
[children]
|
29392
29392
|
);
|
29393
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DrawerDraggable, { id: resolvedId, index, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CustomInner, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: getClassNameItem("draggableWrapper"), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: getClassNameItem("draggable"), children: [
|
29393
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DrawerDraggable, { id: resolvedId, index, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CustomInner, { name, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: getClassNameItem("draggableWrapper"), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: getClassNameItem("draggable"), children: [
|
29394
29394
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: getClassNameItem("name"), children: name }),
|
29395
29395
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: getClassNameItem("icon"), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DragIcon, {}) })
|
29396
29396
|
] }) }) }) });
|
@@ -31011,7 +31011,10 @@ var useResolvedData = (appState, config, dispatch) => {
|
|
31011
31011
|
);
|
31012
31012
|
const runResolvers = () => __async(void 0, null, function* () {
|
31013
31013
|
const newData = newAppState.data;
|
31014
|
-
const flatContent = Object.keys(newData.zones || {}).reduce((acc, zone) => [...acc, ...newData.zones[zone]], newData.content).filter((item) =>
|
31014
|
+
const flatContent = Object.keys(newData.zones || {}).reduce((acc, zone) => [...acc, ...newData.zones[zone]], newData.content).filter((item) => {
|
31015
|
+
var _a;
|
31016
|
+
return !!((_a = config.components[item.type]) == null ? void 0 : _a.resolveData);
|
31017
|
+
});
|
31015
31018
|
const applyIfChange = (dynamicDataMap, dynamicRoot) => {
|
31016
31019
|
const processed = applyDynamicProps(
|
31017
31020
|
appState.data,
|
package/package.json
CHANGED