@measured/puck 0.20.0-canary.c119ed0d → 0.20.0-canary.d12fc3a9
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.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -23
- package/dist/index.mjs +4 -23
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/{walk-tree-BOSl1o0G.d.mts → walk-tree-BDO40vbf.d.mts} +1 -1
- package/dist/{walk-tree-BOSl1o0G.d.ts → walk-tree-BDO40vbf.d.ts} +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as History, P as Permissions, C as ComponentData, a as Config, U as UserGenerics, F as Fields, b as PuckAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, O as Overrides, V as Viewports, I as IframeConfig, e as UiState, f as ComponentConfig, A as AppState, M as Metadata, g as Field, h as FieldProps, D as DropZoneProps, i as Data, j as OnAction, k as InitialHistory, l as ItemSelector } from './walk-tree-
|
|
2
|
-
export {
|
|
1
|
+
import { H as History, P as Permissions, C as ComponentData, a as Config, U as UserGenerics, F as Fields, b as PuckAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, O as Overrides, V as Viewports, I as IframeConfig, e as UiState, f as ComponentConfig, A as AppState, M as Metadata, g as Field, h as FieldProps, D as DropZoneProps, i as Data, j as OnAction, k as InitialHistory, l as ItemSelector } from './walk-tree-BDO40vbf.mjs';
|
|
2
|
+
export { $ as Adaptor, Z as ArrayField, t as ArrayState, ac as AsFieldProps, B as BaseData, L as BaseField, J as ComponentDataMap, E as ComponentDataOptionalId, K as Content, a3 as CustomField, a2 as CustomFieldRender, a9 as DefaultComponentProps, a6 as DefaultRootFieldProps, a8 as DefaultRootProps, a7 as DefaultRootRenderProps, m as Direction, n as DragAxis, a1 as ExternalField, a0 as ExternalFieldWithAdaptor, ae as ExtractPropsFromConfig, af as ExtractRootPropsFromConfig, r as FieldRenderFunctions, s as ItemWithId, G as MappedItem, N as NumberField, _ as ObjectField, q as OverrideKey, v as PuckComponent, a5 as PuckContext, Y as RadioField, x as RootConfig, z as RootData, y as RootDataWithoutProps, X as SelectField, S as Slot, u as SlotComponent, a4 as SlotField, T as TextField, Q as TextareaField, o as Viewport, ad as WithChildren, aa as WithId, ab as WithPuckProps, W as WithSlotProps, ag as migrate, p as overrideKeys, ai as resolveAllData, ah as transformProps, w as walkTree } from './walk-tree-BDO40vbf.mjs';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import react__default, { ReactNode, SyntheticEvent, ReactElement } from 'react';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as History, P as Permissions, C as ComponentData, a as Config, U as UserGenerics, F as Fields, b as PuckAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, O as Overrides, V as Viewports, I as IframeConfig, e as UiState, f as ComponentConfig, A as AppState, M as Metadata, g as Field, h as FieldProps, D as DropZoneProps, i as Data, j as OnAction, k as InitialHistory, l as ItemSelector } from './walk-tree-
|
|
2
|
-
export {
|
|
1
|
+
import { H as History, P as Permissions, C as ComponentData, a as Config, U as UserGenerics, F as Fields, b as PuckAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, O as Overrides, V as Viewports, I as IframeConfig, e as UiState, f as ComponentConfig, A as AppState, M as Metadata, g as Field, h as FieldProps, D as DropZoneProps, i as Data, j as OnAction, k as InitialHistory, l as ItemSelector } from './walk-tree-BDO40vbf.js';
|
|
2
|
+
export { $ as Adaptor, Z as ArrayField, t as ArrayState, ac as AsFieldProps, B as BaseData, L as BaseField, J as ComponentDataMap, E as ComponentDataOptionalId, K as Content, a3 as CustomField, a2 as CustomFieldRender, a9 as DefaultComponentProps, a6 as DefaultRootFieldProps, a8 as DefaultRootProps, a7 as DefaultRootRenderProps, m as Direction, n as DragAxis, a1 as ExternalField, a0 as ExternalFieldWithAdaptor, ae as ExtractPropsFromConfig, af as ExtractRootPropsFromConfig, r as FieldRenderFunctions, s as ItemWithId, G as MappedItem, N as NumberField, _ as ObjectField, q as OverrideKey, v as PuckComponent, a5 as PuckContext, Y as RadioField, x as RootConfig, z as RootData, y as RootDataWithoutProps, X as SelectField, S as Slot, u as SlotComponent, a4 as SlotField, T as TextField, Q as TextareaField, o as Viewport, ad as WithChildren, aa as WithId, ab as WithPuckProps, W as WithSlotProps, ag as migrate, p as overrideKeys, ai as resolveAllData, ah as transformProps, w as walkTree } from './walk-tree-BDO40vbf.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import react__default, { ReactNode, SyntheticEvent, ReactElement } from 'react';
|
package/dist/index.js
CHANGED
|
@@ -4699,19 +4699,9 @@ var DropZoneProvider = ({
|
|
|
4699
4699
|
},
|
|
4700
4700
|
[dispatch]
|
|
4701
4701
|
);
|
|
4702
|
-
const unregisterZone = (0, import_react25.useCallback)(
|
|
4703
|
-
(zoneCompound) => {
|
|
4704
|
-
dispatch({
|
|
4705
|
-
type: "unregisterZone",
|
|
4706
|
-
zone: zoneCompound
|
|
4707
|
-
});
|
|
4708
|
-
},
|
|
4709
|
-
[dispatch]
|
|
4710
|
-
);
|
|
4711
4702
|
const memoValue = (0, import_react25.useMemo)(
|
|
4712
4703
|
() => __spreadValues({
|
|
4713
|
-
registerZone
|
|
4714
|
-
unregisterZone
|
|
4704
|
+
registerZone
|
|
4715
4705
|
}, value),
|
|
4716
4706
|
[value]
|
|
4717
4707
|
);
|
|
@@ -5693,6 +5683,7 @@ var DropZoneEdit = (0, import_react35.forwardRef)(
|
|
|
5693
5683
|
collisionAxis
|
|
5694
5684
|
}, userRef) {
|
|
5695
5685
|
const ctx = (0, import_react35.useContext)(dropZoneContext);
|
|
5686
|
+
const appStoreApi = useAppStoreApi();
|
|
5696
5687
|
const {
|
|
5697
5688
|
// These all need setting via context
|
|
5698
5689
|
areaId,
|
|
@@ -5734,13 +5725,8 @@ var DropZoneEdit = (0, import_react35.forwardRef)(
|
|
|
5734
5725
|
if (ctx == null ? void 0 : ctx.registerZone) {
|
|
5735
5726
|
ctx == null ? void 0 : ctx.registerZone(zoneCompound);
|
|
5736
5727
|
}
|
|
5737
|
-
return () => {
|
|
5738
|
-
if (ctx == null ? void 0 : ctx.unregisterZone) {
|
|
5739
|
-
ctx == null ? void 0 : ctx.unregisterZone(zoneCompound);
|
|
5740
|
-
}
|
|
5741
|
-
};
|
|
5742
5728
|
}
|
|
5743
|
-
}, [zoneType]);
|
|
5729
|
+
}, [zoneType, appStoreApi]);
|
|
5744
5730
|
(0, import_react35.useEffect)(() => {
|
|
5745
5731
|
if (zoneType === "dropzone") {
|
|
5746
5732
|
if (zoneCompound !== rootDroppableId) {
|
|
@@ -5912,11 +5898,6 @@ var DropZoneRender2 = (0, import_react35.forwardRef)(
|
|
|
5912
5898
|
if (ctx == null ? void 0 : ctx.registerZone) {
|
|
5913
5899
|
ctx == null ? void 0 : ctx.registerZone(zoneCompound);
|
|
5914
5900
|
}
|
|
5915
|
-
return () => {
|
|
5916
|
-
if (ctx == null ? void 0 : ctx.unregisterZone) {
|
|
5917
|
-
ctx == null ? void 0 : ctx.unregisterZone(zoneCompound);
|
|
5918
|
-
}
|
|
5919
|
-
};
|
|
5920
5901
|
}
|
|
5921
5902
|
}, [content]);
|
|
5922
5903
|
if (!data || !config) {
|
|
@@ -7592,7 +7573,7 @@ var Preview2 = ({ id = "puck-preview" }) => {
|
|
|
7592
7573
|
editMode: true,
|
|
7593
7574
|
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DropZonePure, { zone: rootDroppableId })
|
|
7594
7575
|
})
|
|
7595
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Render2, { data: renderData, config });
|
|
7576
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Render2, { data: renderData, config, metadata });
|
|
7596
7577
|
(0, import_react46.useEffect)(() => {
|
|
7597
7578
|
if (!iframe.enabled) {
|
|
7598
7579
|
setStatus("READY");
|
package/dist/index.mjs
CHANGED
|
@@ -3808,19 +3808,9 @@ var DropZoneProvider = ({
|
|
|
3808
3808
|
},
|
|
3809
3809
|
[dispatch]
|
|
3810
3810
|
);
|
|
3811
|
-
const unregisterZone = useCallback5(
|
|
3812
|
-
(zoneCompound) => {
|
|
3813
|
-
dispatch({
|
|
3814
|
-
type: "unregisterZone",
|
|
3815
|
-
zone: zoneCompound
|
|
3816
|
-
});
|
|
3817
|
-
},
|
|
3818
|
-
[dispatch]
|
|
3819
|
-
);
|
|
3820
3811
|
const memoValue = useMemo6(
|
|
3821
3812
|
() => __spreadValues({
|
|
3822
|
-
registerZone
|
|
3823
|
-
unregisterZone
|
|
3813
|
+
registerZone
|
|
3824
3814
|
}, value),
|
|
3825
3815
|
[value]
|
|
3826
3816
|
);
|
|
@@ -4802,6 +4792,7 @@ var DropZoneEdit = forwardRef3(
|
|
|
4802
4792
|
collisionAxis
|
|
4803
4793
|
}, userRef) {
|
|
4804
4794
|
const ctx = useContext7(dropZoneContext);
|
|
4795
|
+
const appStoreApi = useAppStoreApi();
|
|
4805
4796
|
const {
|
|
4806
4797
|
// These all need setting via context
|
|
4807
4798
|
areaId,
|
|
@@ -4843,13 +4834,8 @@ var DropZoneEdit = forwardRef3(
|
|
|
4843
4834
|
if (ctx == null ? void 0 : ctx.registerZone) {
|
|
4844
4835
|
ctx == null ? void 0 : ctx.registerZone(zoneCompound);
|
|
4845
4836
|
}
|
|
4846
|
-
return () => {
|
|
4847
|
-
if (ctx == null ? void 0 : ctx.unregisterZone) {
|
|
4848
|
-
ctx == null ? void 0 : ctx.unregisterZone(zoneCompound);
|
|
4849
|
-
}
|
|
4850
|
-
};
|
|
4851
4837
|
}
|
|
4852
|
-
}, [zoneType]);
|
|
4838
|
+
}, [zoneType, appStoreApi]);
|
|
4853
4839
|
useEffect16(() => {
|
|
4854
4840
|
if (zoneType === "dropzone") {
|
|
4855
4841
|
if (zoneCompound !== rootDroppableId) {
|
|
@@ -5021,11 +5007,6 @@ var DropZoneRender = forwardRef3(
|
|
|
5021
5007
|
if (ctx == null ? void 0 : ctx.registerZone) {
|
|
5022
5008
|
ctx == null ? void 0 : ctx.registerZone(zoneCompound);
|
|
5023
5009
|
}
|
|
5024
|
-
return () => {
|
|
5025
|
-
if (ctx == null ? void 0 : ctx.unregisterZone) {
|
|
5026
|
-
ctx == null ? void 0 : ctx.unregisterZone(zoneCompound);
|
|
5027
|
-
}
|
|
5028
|
-
};
|
|
5029
5010
|
}
|
|
5030
5011
|
}, [content]);
|
|
5031
5012
|
if (!data || !config) {
|
|
@@ -6714,7 +6695,7 @@ var Preview2 = ({ id = "puck-preview" }) => {
|
|
|
6714
6695
|
editMode: true,
|
|
6715
6696
|
children: /* @__PURE__ */ jsx32(DropZonePure, { zone: rootDroppableId })
|
|
6716
6697
|
})
|
|
6717
|
-
) : /* @__PURE__ */ jsx32(Render, { data: renderData, config });
|
|
6698
|
+
) : /* @__PURE__ */ jsx32(Render, { data: renderData, config, metadata });
|
|
6718
6699
|
useEffect20(() => {
|
|
6719
6700
|
if (!iframe.enabled) {
|
|
6720
6701
|
setStatus("READY");
|
package/dist/rsc.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { a as Config, U as UserGenerics, M as Metadata } from './walk-tree-
|
|
3
|
-
export {
|
|
2
|
+
import { a as Config, U as UserGenerics, M as Metadata } from './walk-tree-BDO40vbf.mjs';
|
|
3
|
+
export { ag as migrate, ai as resolveAllData, ah as transformProps, w as walkTree } from './walk-tree-BDO40vbf.mjs';
|
|
4
4
|
import 'react';
|
|
5
5
|
|
|
6
6
|
declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data, metadata, }: {
|
package/dist/rsc.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { a as Config, U as UserGenerics, M as Metadata } from './walk-tree-
|
|
3
|
-
export {
|
|
2
|
+
import { a as Config, U as UserGenerics, M as Metadata } from './walk-tree-BDO40vbf.js';
|
|
3
|
+
export { ag as migrate, ai as resolveAllData, ah as transformProps, w as walkTree } from './walk-tree-BDO40vbf.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
|
|
6
6
|
declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data, metadata, }: {
|
|
@@ -548,4 +548,4 @@ type WalkTreeOptions = {
|
|
|
548
548
|
};
|
|
549
549
|
declare function walkTree<T extends ComponentData | RootData | G["UserData"], UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(data: T, config: UserConfig, callbackFn: (data: Content, options: WalkTreeOptions) => Content | null | void): T;
|
|
550
550
|
|
|
551
|
-
export { type
|
|
551
|
+
export { type Adaptor as $, type AppState as A, type BaseData as B, type ComponentData as C, type DropZoneProps as D, type ComponentDataOptionalId as E, type Fields as F, type MappedItem as G, type History as H, type IframeConfig as I, type ComponentDataMap as J, type Content as K, type BaseField as L, type Metadata as M, type NumberField as N, type Overrides as O, type Permissions as P, type TextareaField as Q, type RootDataWithProps as R, type Slot as S, type TextField as T, type UserGenerics as U, type Viewports as V, type WithSlotProps as W, type SelectField as X, type RadioField as Y, type ArrayField as Z, type ObjectField as _, type Config as a, type ExternalFieldWithAdaptor as a0, type ExternalField as a1, type CustomFieldRender as a2, type CustomField as a3, type SlotField as a4, type PuckContext as a5, type DefaultRootFieldProps as a6, type DefaultRootRenderProps as a7, type DefaultRootProps as a8, type DefaultComponentProps as a9, type WithId as aa, type WithPuckProps as ab, type AsFieldProps as ac, type WithChildren as ad, type ExtractPropsFromConfig as ae, type ExtractRootPropsFromConfig as af, migrate as ag, transformProps as ah, resolveAllData as ai, type PuckAction as b, type ResolveDataTrigger as c, type Plugin as d, type UiState as e, type ComponentConfig as f, type Field as g, type FieldProps as h, type Data as i, type OnAction as j, type InitialHistory as k, type ItemSelector as l, type Direction as m, type DragAxis as n, type Viewport as o, overrideKeys as p, type OverrideKey as q, type FieldRenderFunctions as r, type ItemWithId as s, type ArrayState as t, type SlotComponent as u, type PuckComponent as v, walkTree as w, type RootConfig as x, type RootDataWithoutProps as y, type RootData as z };
|
|
@@ -548,4 +548,4 @@ type WalkTreeOptions = {
|
|
|
548
548
|
};
|
|
549
549
|
declare function walkTree<T extends ComponentData | RootData | G["UserData"], UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>(data: T, config: UserConfig, callbackFn: (data: Content, options: WalkTreeOptions) => Content | null | void): T;
|
|
550
550
|
|
|
551
|
-
export { type
|
|
551
|
+
export { type Adaptor as $, type AppState as A, type BaseData as B, type ComponentData as C, type DropZoneProps as D, type ComponentDataOptionalId as E, type Fields as F, type MappedItem as G, type History as H, type IframeConfig as I, type ComponentDataMap as J, type Content as K, type BaseField as L, type Metadata as M, type NumberField as N, type Overrides as O, type Permissions as P, type TextareaField as Q, type RootDataWithProps as R, type Slot as S, type TextField as T, type UserGenerics as U, type Viewports as V, type WithSlotProps as W, type SelectField as X, type RadioField as Y, type ArrayField as Z, type ObjectField as _, type Config as a, type ExternalFieldWithAdaptor as a0, type ExternalField as a1, type CustomFieldRender as a2, type CustomField as a3, type SlotField as a4, type PuckContext as a5, type DefaultRootFieldProps as a6, type DefaultRootRenderProps as a7, type DefaultRootProps as a8, type DefaultComponentProps as a9, type WithId as aa, type WithPuckProps as ab, type AsFieldProps as ac, type WithChildren as ad, type ExtractPropsFromConfig as ae, type ExtractRootPropsFromConfig as af, migrate as ag, transformProps as ah, resolveAllData as ai, type PuckAction as b, type ResolveDataTrigger as c, type Plugin as d, type UiState as e, type ComponentConfig as f, type Field as g, type FieldProps as h, type Data as i, type OnAction as j, type InitialHistory as k, type ItemSelector as l, type Direction as m, type DragAxis as n, type Viewport as o, overrideKeys as p, type OverrideKey as q, type FieldRenderFunctions as r, type ItemWithId as s, type ArrayState as t, type SlotComponent as u, type PuckComponent as v, walkTree as w, type RootConfig as x, type RootDataWithoutProps as y, type RootData as z };
|
package/package.json
CHANGED