@measured/puck 0.20.0-canary.6a211610 → 0.20.0-canary.6aefde61
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-FYXJ5FPS.mjs → chunk-5X2PB4G7.mjs} +2585 -2106
- package/dist/{chunk-HUKJ36SA.mjs → chunk-BNXRZWNI.mjs} +2 -1
- package/dist/index.css +523 -268
- package/dist/index.d.mts +11 -5
- package/dist/index.d.ts +11 -5
- package/dist/index.js +2123 -1648
- package/dist/index.mjs +8 -2
- package/dist/no-external.css +523 -268
- package/dist/no-external.d.mts +2 -2
- package/dist/no-external.d.ts +2 -2
- package/dist/no-external.js +2123 -1648
- 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 +2 -1
- package/dist/rsc.mjs +1 -1
- package/dist/{walk-tree-B57SgEEc.d.mts → walk-tree-CU8Fq-KC.d.mts} +17 -6
- package/dist/{walk-tree-B57SgEEc.d.ts → walk-tree-CU8Fq-KC.d.ts} +17 -6
- package/package.json +1 -1
package/dist/no-external.mjs
CHANGED
|
@@ -11,21 +11,24 @@ import {
|
|
|
11
11
|
Label,
|
|
12
12
|
Puck,
|
|
13
13
|
Render,
|
|
14
|
+
blocksPlugin,
|
|
14
15
|
createUsePuck,
|
|
16
|
+
fieldsPlugin,
|
|
17
|
+
outlinePlugin,
|
|
15
18
|
overrideKeys,
|
|
16
19
|
registerOverlayPortal,
|
|
17
20
|
renderContext,
|
|
18
21
|
setDeep,
|
|
19
22
|
useGetPuck,
|
|
20
23
|
usePuck
|
|
21
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-5X2PB4G7.mjs";
|
|
22
25
|
import {
|
|
23
26
|
init_react_import,
|
|
24
27
|
migrate,
|
|
25
28
|
resolveAllData,
|
|
26
29
|
transformProps,
|
|
27
30
|
walkTree
|
|
28
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-BNXRZWNI.mjs";
|
|
29
32
|
|
|
30
33
|
// bundle/no-external.ts
|
|
31
34
|
init_react_import();
|
|
@@ -42,8 +45,11 @@ export {
|
|
|
42
45
|
Label,
|
|
43
46
|
Puck,
|
|
44
47
|
Render,
|
|
48
|
+
blocksPlugin,
|
|
45
49
|
createUsePuck,
|
|
50
|
+
fieldsPlugin,
|
|
46
51
|
migrate,
|
|
52
|
+
outlinePlugin,
|
|
47
53
|
overrideKeys,
|
|
48
54
|
registerOverlayPortal,
|
|
49
55
|
renderContext,
|
package/dist/rsc.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-
|
|
3
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
2
|
+
import { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-CU8Fq-KC.mjs';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-CU8Fq-KC.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 { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-
|
|
3
|
-
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-
|
|
2
|
+
import { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-CU8Fq-KC.js';
|
|
3
|
+
export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-CU8Fq-KC.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, }: {
|
package/dist/rsc.js
CHANGED
package/dist/rsc.mjs
CHANGED
|
@@ -284,6 +284,7 @@ type Metadata = {
|
|
|
284
284
|
type ItemWithId = {
|
|
285
285
|
_arrayId: string;
|
|
286
286
|
_originalIndex: number;
|
|
287
|
+
_currentIndex: number;
|
|
287
288
|
};
|
|
288
289
|
type ArrayState = {
|
|
289
290
|
items: ItemWithId[];
|
|
@@ -315,6 +316,9 @@ type UiState = {
|
|
|
315
316
|
field: {
|
|
316
317
|
focus?: string | null;
|
|
317
318
|
};
|
|
319
|
+
plugin: {
|
|
320
|
+
current: string | null;
|
|
321
|
+
};
|
|
318
322
|
};
|
|
319
323
|
type AppState<UserData extends Data = Data> = {
|
|
320
324
|
data: UserData;
|
|
@@ -349,6 +353,14 @@ type BuiltinTypes = Date | RegExp | Error | Function | symbol | null | undefined
|
|
|
349
353
|
type WithDeepSlots<T, SlotType = T> = T extends Slot ? SlotType : T extends (infer U)[] ? Array<WithDeepSlots<U, SlotType>> : T extends (infer U)[] ? WithDeepSlots<U, SlotType>[] : T extends BuiltinTypes ? T : T extends object ? {
|
|
350
354
|
[K in keyof T]: WithDeepSlots<T[K], SlotType>;
|
|
351
355
|
} : T;
|
|
356
|
+
type RenderFunc<Props extends {
|
|
357
|
+
[key: string]: any;
|
|
358
|
+
} = {
|
|
359
|
+
children: ReactNode;
|
|
360
|
+
}> = (props: Props) => ReactElement;
|
|
361
|
+
type PluginInternal = Plugin & {
|
|
362
|
+
mobileOnly?: boolean;
|
|
363
|
+
};
|
|
352
364
|
|
|
353
365
|
type MapFnParams<ThisField = Field> = {
|
|
354
366
|
value: any;
|
|
@@ -367,11 +379,6 @@ type FieldTransforms = Partial<{
|
|
|
367
379
|
[FieldType in Field["type"]]: FieldTransformFn<ExtractField<FieldType>>;
|
|
368
380
|
}>;
|
|
369
381
|
|
|
370
|
-
type RenderFunc<Props extends {
|
|
371
|
-
[key: string]: any;
|
|
372
|
-
} = {
|
|
373
|
-
children: ReactNode;
|
|
374
|
-
}> = (props: Props) => ReactElement;
|
|
375
382
|
declare const overrideKeys: readonly ["header", "headerActions", "fields", "fieldLabel", "drawer", "drawerItem", "componentOverlay", "outline", "puck", "preview"];
|
|
376
383
|
type OverrideKey = (typeof overrideKeys)[number];
|
|
377
384
|
type OverridesGeneric<Shape extends {
|
|
@@ -468,6 +475,10 @@ type IframeConfig = {
|
|
|
468
475
|
};
|
|
469
476
|
type OnAction<UserData extends Data = Data> = (action: PuckAction, appState: AppState<UserData>, prevAppState: AppState<UserData>) => void;
|
|
470
477
|
type Plugin = {
|
|
478
|
+
name?: string;
|
|
479
|
+
label?: string;
|
|
480
|
+
icon?: ReactNode;
|
|
481
|
+
render?: () => ReactElement;
|
|
471
482
|
overrides?: Partial<Overrides>;
|
|
472
483
|
fieldTransforms?: FieldTransforms;
|
|
473
484
|
};
|
|
@@ -587,4 +598,4 @@ type WalkTreeOptions = {
|
|
|
587
598
|
};
|
|
588
599
|
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;
|
|
589
600
|
|
|
590
|
-
export { type
|
|
601
|
+
export { type TextField as $, type AppState as A, type ItemWithId as B, type Config as C, type DropZoneProps as D, type ArrayState as E, type Fields as F, type SlotComponent as G, type History as H, type IframeConfig as I, type PuckComponent as J, type RootConfig as K, type BaseData as L, type Metadata as M, type RootDataWithoutProps as N, type Overrides as O, type Permissions as P, type RootData as Q, type RootDataWithProps as R, type Slot as S, type ComponentDataOptionalId as T, type UserGenerics as U, type Viewports as V, type WithSlotProps as W, type MappedItem as X, type ComponentDataMap as Y, type Content as Z, type BaseField as _, type ComponentData as a, type NumberField as a0, type TextareaField as a1, type SelectField as a2, type RadioField as a3, type ArrayField as a4, type ObjectField as a5, type Adaptor as a6, type ExternalFieldWithAdaptor as a7, type ExternalField as a8, type CustomFieldRender as a9, type CustomField as aa, type SlotField as ab, type PuckContext as ac, type DefaultRootFieldProps as ad, type DefaultRootRenderProps as ae, type DefaultRootProps as af, type DefaultComponentProps as ag, type WithId as ah, type WithPuckProps as ai, type AsFieldProps as aj, type WithChildren as ak, type ExtractPropsFromConfig as al, type ExtractRootPropsFromConfig as am, type ExtractField as an, type PuckAction as b, type ResolveDataTrigger as c, type Plugin as d, type UiState as e, type ComponentConfig as f, type FieldTransforms as g, type Field as h, type FieldProps as i, type Data as j, type OnAction as k, type InitialHistory as l, migrate as m, type ItemSelector as n, type PluginInternal as o, type Direction as p, type DragAxis as q, resolveAllData as r, type Viewport as s, transformProps as t, type FieldTransformFnParams as u, type FieldTransformFn as v, walkTree as w, overrideKeys as x, type OverrideKey as y, type FieldRenderFunctions as z };
|
|
@@ -284,6 +284,7 @@ type Metadata = {
|
|
|
284
284
|
type ItemWithId = {
|
|
285
285
|
_arrayId: string;
|
|
286
286
|
_originalIndex: number;
|
|
287
|
+
_currentIndex: number;
|
|
287
288
|
};
|
|
288
289
|
type ArrayState = {
|
|
289
290
|
items: ItemWithId[];
|
|
@@ -315,6 +316,9 @@ type UiState = {
|
|
|
315
316
|
field: {
|
|
316
317
|
focus?: string | null;
|
|
317
318
|
};
|
|
319
|
+
plugin: {
|
|
320
|
+
current: string | null;
|
|
321
|
+
};
|
|
318
322
|
};
|
|
319
323
|
type AppState<UserData extends Data = Data> = {
|
|
320
324
|
data: UserData;
|
|
@@ -349,6 +353,14 @@ type BuiltinTypes = Date | RegExp | Error | Function | symbol | null | undefined
|
|
|
349
353
|
type WithDeepSlots<T, SlotType = T> = T extends Slot ? SlotType : T extends (infer U)[] ? Array<WithDeepSlots<U, SlotType>> : T extends (infer U)[] ? WithDeepSlots<U, SlotType>[] : T extends BuiltinTypes ? T : T extends object ? {
|
|
350
354
|
[K in keyof T]: WithDeepSlots<T[K], SlotType>;
|
|
351
355
|
} : T;
|
|
356
|
+
type RenderFunc<Props extends {
|
|
357
|
+
[key: string]: any;
|
|
358
|
+
} = {
|
|
359
|
+
children: ReactNode;
|
|
360
|
+
}> = (props: Props) => ReactElement;
|
|
361
|
+
type PluginInternal = Plugin & {
|
|
362
|
+
mobileOnly?: boolean;
|
|
363
|
+
};
|
|
352
364
|
|
|
353
365
|
type MapFnParams<ThisField = Field> = {
|
|
354
366
|
value: any;
|
|
@@ -367,11 +379,6 @@ type FieldTransforms = Partial<{
|
|
|
367
379
|
[FieldType in Field["type"]]: FieldTransformFn<ExtractField<FieldType>>;
|
|
368
380
|
}>;
|
|
369
381
|
|
|
370
|
-
type RenderFunc<Props extends {
|
|
371
|
-
[key: string]: any;
|
|
372
|
-
} = {
|
|
373
|
-
children: ReactNode;
|
|
374
|
-
}> = (props: Props) => ReactElement;
|
|
375
382
|
declare const overrideKeys: readonly ["header", "headerActions", "fields", "fieldLabel", "drawer", "drawerItem", "componentOverlay", "outline", "puck", "preview"];
|
|
376
383
|
type OverrideKey = (typeof overrideKeys)[number];
|
|
377
384
|
type OverridesGeneric<Shape extends {
|
|
@@ -468,6 +475,10 @@ type IframeConfig = {
|
|
|
468
475
|
};
|
|
469
476
|
type OnAction<UserData extends Data = Data> = (action: PuckAction, appState: AppState<UserData>, prevAppState: AppState<UserData>) => void;
|
|
470
477
|
type Plugin = {
|
|
478
|
+
name?: string;
|
|
479
|
+
label?: string;
|
|
480
|
+
icon?: ReactNode;
|
|
481
|
+
render?: () => ReactElement;
|
|
471
482
|
overrides?: Partial<Overrides>;
|
|
472
483
|
fieldTransforms?: FieldTransforms;
|
|
473
484
|
};
|
|
@@ -587,4 +598,4 @@ type WalkTreeOptions = {
|
|
|
587
598
|
};
|
|
588
599
|
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;
|
|
589
600
|
|
|
590
|
-
export { type
|
|
601
|
+
export { type TextField as $, type AppState as A, type ItemWithId as B, type Config as C, type DropZoneProps as D, type ArrayState as E, type Fields as F, type SlotComponent as G, type History as H, type IframeConfig as I, type PuckComponent as J, type RootConfig as K, type BaseData as L, type Metadata as M, type RootDataWithoutProps as N, type Overrides as O, type Permissions as P, type RootData as Q, type RootDataWithProps as R, type Slot as S, type ComponentDataOptionalId as T, type UserGenerics as U, type Viewports as V, type WithSlotProps as W, type MappedItem as X, type ComponentDataMap as Y, type Content as Z, type BaseField as _, type ComponentData as a, type NumberField as a0, type TextareaField as a1, type SelectField as a2, type RadioField as a3, type ArrayField as a4, type ObjectField as a5, type Adaptor as a6, type ExternalFieldWithAdaptor as a7, type ExternalField as a8, type CustomFieldRender as a9, type CustomField as aa, type SlotField as ab, type PuckContext as ac, type DefaultRootFieldProps as ad, type DefaultRootRenderProps as ae, type DefaultRootProps as af, type DefaultComponentProps as ag, type WithId as ah, type WithPuckProps as ai, type AsFieldProps as aj, type WithChildren as ak, type ExtractPropsFromConfig as al, type ExtractRootPropsFromConfig as am, type ExtractField as an, type PuckAction as b, type ResolveDataTrigger as c, type Plugin as d, type UiState as e, type ComponentConfig as f, type FieldTransforms as g, type Field as h, type FieldProps as i, type Data as j, type OnAction as k, type InitialHistory as l, migrate as m, type ItemSelector as n, type PluginInternal as o, type Direction as p, type DragAxis as q, resolveAllData as r, type Viewport as s, transformProps as t, type FieldTransformFnParams as u, type FieldTransformFn as v, walkTree as w, overrideKeys as x, type OverrideKey as y, type FieldRenderFunctions as z };
|
package/package.json
CHANGED