@measured/puck 0.20.0-canary.d405985b → 0.20.0-canary.f2447833
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-DBSNJT3R.mjs → chunk-F7MIAKDQ.mjs} +4636 -5469
- package/dist/chunk-IP64IXIP.mjs +2820 -0
- package/dist/index.css +508 -311
- package/dist/index.d.mts +18 -3
- package/dist/index.d.ts +18 -3
- package/dist/index.js +2980 -2042
- package/dist/index.mjs +10 -6
- package/dist/no-external.css +670 -469
- package/dist/no-external.d.mts +2 -2
- package/dist/no-external.d.ts +2 -2
- package/dist/no-external.js +2980 -2039
- package/dist/no-external.mjs +10 -2
- package/dist/rsc.css +26 -0
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +1884 -463
- package/dist/rsc.mjs +1 -1
- package/dist/{walk-tree-Bp8tnkJS.d.mts → walk-tree-yh0Fsxem.d.mts} +48 -5
- package/dist/{walk-tree-Bp8tnkJS.d.ts → walk-tree-yh0Fsxem.d.ts} +48 -5
- package/package.json +1 -1
- package/dist/chunk-32MJ3X3H.mjs +0 -1002
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as History, P as Permissions, a as ComponentData, C 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
|
|
2
|
-
export {
|
|
1
|
+
import { H as History, P as Permissions, a as ComponentData, C 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 FieldTransforms, h as Field, i as FieldProps, D as DropZoneProps, j as Data, k as OnAction, l as InitialHistory, n as ItemSelector } from './walk-tree-yh0Fsxem.mjs';
|
|
2
|
+
export { a5 as Adaptor, a3 as ArrayField, B as ArrayState, ai as AsFieldProps, K as BaseData, Z as BaseField, X as ComponentDataMap, Q as ComponentDataOptionalId, Y as Content, a9 as CustomField, a8 as CustomFieldRender, af as DefaultComponentProps, ac as DefaultRootFieldProps, ae as DefaultRootProps, ad as DefaultRootRenderProps, o as Direction, p as DragAxis, a7 as ExternalField, a6 as ExternalFieldWithAdaptor, am as ExtractField, ak as ExtractPropsFromConfig, al as ExtractRootPropsFromConfig, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, z as ItemWithId, T as MappedItem, $ as NumberField, a4 as ObjectField, x as OverrideKey, G as PuckComponent, ab as PuckContext, a2 as RadioField, J as RootConfig, N as RootData, L as RootDataWithoutProps, a1 as SelectField, S as Slot, E as SlotComponent, aa as SlotField, _ as TextField, a0 as TextareaField, q as Viewport, aj as WithChildren, ag as WithId, ah as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-yh0Fsxem.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';
|
|
@@ -105,6 +105,7 @@ type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserCon
|
|
|
105
105
|
history: HistorySlice;
|
|
106
106
|
nodes: NodesSlice;
|
|
107
107
|
permissions: PermissionsSlice;
|
|
108
|
+
fieldTransforms: FieldTransforms;
|
|
108
109
|
};
|
|
109
110
|
|
|
110
111
|
declare const ActionBar: {
|
|
@@ -207,6 +208,7 @@ type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserCo
|
|
|
207
208
|
permissions?: Partial<Permissions>;
|
|
208
209
|
plugins?: Plugin[];
|
|
209
210
|
overrides?: Partial<Overrides>;
|
|
211
|
+
fieldTransforms?: FieldTransforms;
|
|
210
212
|
renderHeader?: (props: {
|
|
211
213
|
children: ReactNode;
|
|
212
214
|
dispatch: (action: PuckAction) => void;
|
|
@@ -249,6 +251,16 @@ declare function Render<UserConfig extends Config = Config, G extends UserGeneri
|
|
|
249
251
|
metadata?: Metadata;
|
|
250
252
|
}): react_jsx_runtime.JSX.Element;
|
|
251
253
|
|
|
254
|
+
declare const registerOverlayPortal: (el: HTMLElement | null | undefined, opts?: {
|
|
255
|
+
disableDrag?: boolean;
|
|
256
|
+
disableDragOnFocus?: boolean;
|
|
257
|
+
}) => (() => void) | undefined;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Helper function to set a value based on a dot-notated path
|
|
261
|
+
*/
|
|
262
|
+
declare function setDeep<T extends Record<string, any>>(node: T, path: string, newVal: any): T;
|
|
263
|
+
|
|
252
264
|
type UsePuckData<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
|
|
253
265
|
appState: G["UserPublicAppState"];
|
|
254
266
|
config: UserConfig;
|
|
@@ -290,4 +302,7 @@ declare function usePuck<UserConfig extends Config = Config>(): UsePuckStore<Use
|
|
|
290
302
|
*/
|
|
291
303
|
declare function useGetPuck(): () => UsePuckStore<Config>;
|
|
292
304
|
|
|
293
|
-
|
|
305
|
+
declare const blocksPlugin: () => Plugin;
|
|
306
|
+
declare const outlinePlugin: () => Plugin;
|
|
307
|
+
|
|
308
|
+
export { Action, ActionBar, AppState, AutoField, Button, ComponentConfig, ComponentData, Config, Data, Drawer, DropZone, Field, FieldLabel, FieldProps, FieldTransforms, Fields, Group, History, IconButton, IframeConfig, InitialHistory, Label, Metadata, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, type PuckApi, Render, ResolveDataTrigger, RootDataWithProps, UiState, type UsePuckData, UserGenerics, Viewports, blocksPlugin, createUsePuck, outlinePlugin, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as History, P as Permissions, a as ComponentData, C 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
|
|
2
|
-
export {
|
|
1
|
+
import { H as History, P as Permissions, a as ComponentData, C 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 FieldTransforms, h as Field, i as FieldProps, D as DropZoneProps, j as Data, k as OnAction, l as InitialHistory, n as ItemSelector } from './walk-tree-yh0Fsxem.js';
|
|
2
|
+
export { a5 as Adaptor, a3 as ArrayField, B as ArrayState, ai as AsFieldProps, K as BaseData, Z as BaseField, X as ComponentDataMap, Q as ComponentDataOptionalId, Y as Content, a9 as CustomField, a8 as CustomFieldRender, af as DefaultComponentProps, ac as DefaultRootFieldProps, ae as DefaultRootProps, ad as DefaultRootRenderProps, o as Direction, p as DragAxis, a7 as ExternalField, a6 as ExternalFieldWithAdaptor, am as ExtractField, ak as ExtractPropsFromConfig, al as ExtractRootPropsFromConfig, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, z as ItemWithId, T as MappedItem, $ as NumberField, a4 as ObjectField, x as OverrideKey, G as PuckComponent, ab as PuckContext, a2 as RadioField, J as RootConfig, N as RootData, L as RootDataWithoutProps, a1 as SelectField, S as Slot, E as SlotComponent, aa as SlotField, _ as TextField, a0 as TextareaField, q as Viewport, aj as WithChildren, ag as WithId, ah as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-yh0Fsxem.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';
|
|
@@ -105,6 +105,7 @@ type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserCon
|
|
|
105
105
|
history: HistorySlice;
|
|
106
106
|
nodes: NodesSlice;
|
|
107
107
|
permissions: PermissionsSlice;
|
|
108
|
+
fieldTransforms: FieldTransforms;
|
|
108
109
|
};
|
|
109
110
|
|
|
110
111
|
declare const ActionBar: {
|
|
@@ -207,6 +208,7 @@ type PuckProps<UserConfig extends Config = Config, G extends UserGenerics<UserCo
|
|
|
207
208
|
permissions?: Partial<Permissions>;
|
|
208
209
|
plugins?: Plugin[];
|
|
209
210
|
overrides?: Partial<Overrides>;
|
|
211
|
+
fieldTransforms?: FieldTransforms;
|
|
210
212
|
renderHeader?: (props: {
|
|
211
213
|
children: ReactNode;
|
|
212
214
|
dispatch: (action: PuckAction) => void;
|
|
@@ -249,6 +251,16 @@ declare function Render<UserConfig extends Config = Config, G extends UserGeneri
|
|
|
249
251
|
metadata?: Metadata;
|
|
250
252
|
}): react_jsx_runtime.JSX.Element;
|
|
251
253
|
|
|
254
|
+
declare const registerOverlayPortal: (el: HTMLElement | null | undefined, opts?: {
|
|
255
|
+
disableDrag?: boolean;
|
|
256
|
+
disableDragOnFocus?: boolean;
|
|
257
|
+
}) => (() => void) | undefined;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Helper function to set a value based on a dot-notated path
|
|
261
|
+
*/
|
|
262
|
+
declare function setDeep<T extends Record<string, any>>(node: T, path: string, newVal: any): T;
|
|
263
|
+
|
|
252
264
|
type UsePuckData<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
|
|
253
265
|
appState: G["UserPublicAppState"];
|
|
254
266
|
config: UserConfig;
|
|
@@ -290,4 +302,7 @@ declare function usePuck<UserConfig extends Config = Config>(): UsePuckStore<Use
|
|
|
290
302
|
*/
|
|
291
303
|
declare function useGetPuck(): () => UsePuckStore<Config>;
|
|
292
304
|
|
|
293
|
-
|
|
305
|
+
declare const blocksPlugin: () => Plugin;
|
|
306
|
+
declare const outlinePlugin: () => Plugin;
|
|
307
|
+
|
|
308
|
+
export { Action, ActionBar, AppState, AutoField, Button, ComponentConfig, ComponentData, Config, Data, Drawer, DropZone, Field, FieldLabel, FieldProps, FieldTransforms, Fields, Group, History, IconButton, IframeConfig, InitialHistory, Label, Metadata, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, type PuckApi, Render, ResolveDataTrigger, RootDataWithProps, UiState, type UsePuckData, UserGenerics, Viewports, blocksPlugin, createUsePuck, outlinePlugin, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck };
|