@measured/puck 0.19.0-canary.b9add22 → 0.19.0-canary.c33636f
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-FNRHXUGA.mjs → chunk-T6VJEBJD.mjs} +5 -1
- package/dist/index.d.mts +123 -25
- package/dist/index.d.ts +123 -25
- package/dist/index.js +5137 -4918
- package/dist/index.mjs +5088 -4875
- package/dist/{resolve-all-data-DIpcwlzP.d.mts → resolve-all-data-wwgDuTnC.d.mts} +5 -1
- package/dist/{resolve-all-data-DIpcwlzP.d.ts → resolve-all-data-wwgDuTnC.d.ts} +5 -1
- package/dist/rsc.d.mts +3 -3
- package/dist/rsc.d.ts +3 -3
- package/dist/rsc.js +6 -4
- package/dist/rsc.mjs +6 -4
- package/package.json +2 -1
@@ -25,14 +25,18 @@ type BaseField = {
|
|
25
25
|
};
|
26
26
|
type TextField = BaseField & {
|
27
27
|
type: "text";
|
28
|
+
placeholder?: string;
|
28
29
|
};
|
29
30
|
type NumberField = BaseField & {
|
30
31
|
type: "number";
|
32
|
+
placeholder?: string;
|
31
33
|
min?: number;
|
32
34
|
max?: number;
|
35
|
+
step?: number;
|
33
36
|
};
|
34
37
|
type TextareaField = BaseField & {
|
35
38
|
type: "textarea";
|
39
|
+
placeholder?: string;
|
36
40
|
};
|
37
41
|
type SelectField = BaseField & {
|
38
42
|
type: "select";
|
@@ -464,4 +468,4 @@ type PuckAction = {
|
|
464
468
|
|
465
469
|
declare function resolveAllData<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends Record<string, any> = DefaultRootFieldProps>(data: Partial<Data>, config: Config, metadata?: Metadata, onResolveStart?: (item: ComponentData) => void, onResolveEnd?: (item: ComponentData) => void): Promise<Data<Props, RootProps>>;
|
466
470
|
|
467
|
-
export { type
|
471
|
+
export { type DefaultRootProps as $, type AppState as A, type BaseData as B, type Config as C, type DropZoneProps as D, type BaseField as E, type FieldProps as F, type TextareaField as G, type History as H, type IframeConfig as I, type RadioField as J, type ArrayField as K, type ObjectField as L, type Metadata as M, type NumberField as N, type OnAction as O, type Permissions as P, type Adaptor as Q, type RootDataWithProps as R, type SelectField as S, type TextField as T, type UserGenerics as U, type Viewports as V, type ExternalFieldWithAdaptor as W, type ExternalField as X, type CustomField as Y, type PuckContext as Z, type DefaultRootRenderProps as _, type Field as a, type WithId as a0, type WithPuckProps as a1, type AsFieldProps as a2, type WithChildren as a3, type ExtractPropsFromConfig as a4, type ExtractRootPropsFromConfig as a5, resolveAllData as a6, type Data as b, type UiState as c, type Plugin as d, type Overrides as e, type PuckAction as f, type InitialHistory as g, type DefaultComponentProps as h, type DefaultRootFieldProps as i, type ComponentData as j, type Fields as k, type ComponentConfig 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 PuckComponent as u, type RootDataWithoutProps as v, type RootData as w, type MappedItem as x, type ComponentDataMap as y, type Content as z };
|
@@ -25,14 +25,18 @@ type BaseField = {
|
|
25
25
|
};
|
26
26
|
type TextField = BaseField & {
|
27
27
|
type: "text";
|
28
|
+
placeholder?: string;
|
28
29
|
};
|
29
30
|
type NumberField = BaseField & {
|
30
31
|
type: "number";
|
32
|
+
placeholder?: string;
|
31
33
|
min?: number;
|
32
34
|
max?: number;
|
35
|
+
step?: number;
|
33
36
|
};
|
34
37
|
type TextareaField = BaseField & {
|
35
38
|
type: "textarea";
|
39
|
+
placeholder?: string;
|
36
40
|
};
|
37
41
|
type SelectField = BaseField & {
|
38
42
|
type: "select";
|
@@ -464,4 +468,4 @@ type PuckAction = {
|
|
464
468
|
|
465
469
|
declare function resolveAllData<Props extends DefaultComponentProps = DefaultComponentProps, RootProps extends Record<string, any> = DefaultRootFieldProps>(data: Partial<Data>, config: Config, metadata?: Metadata, onResolveStart?: (item: ComponentData) => void, onResolveEnd?: (item: ComponentData) => void): Promise<Data<Props, RootProps>>;
|
466
470
|
|
467
|
-
export { type
|
471
|
+
export { type DefaultRootProps as $, type AppState as A, type BaseData as B, type Config as C, type DropZoneProps as D, type BaseField as E, type FieldProps as F, type TextareaField as G, type History as H, type IframeConfig as I, type RadioField as J, type ArrayField as K, type ObjectField as L, type Metadata as M, type NumberField as N, type OnAction as O, type Permissions as P, type Adaptor as Q, type RootDataWithProps as R, type SelectField as S, type TextField as T, type UserGenerics as U, type Viewports as V, type ExternalFieldWithAdaptor as W, type ExternalField as X, type CustomField as Y, type PuckContext as Z, type DefaultRootRenderProps as _, type Field as a, type WithId as a0, type WithPuckProps as a1, type AsFieldProps as a2, type WithChildren as a3, type ExtractPropsFromConfig as a4, type ExtractRootPropsFromConfig as a5, resolveAllData as a6, type Data as b, type UiState as c, type Plugin as d, type Overrides as e, type PuckAction as f, type InitialHistory as g, type DefaultComponentProps as h, type DefaultRootFieldProps as i, type ComponentData as j, type Fields as k, type ComponentConfig 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 PuckComponent as u, type RootDataWithoutProps as v, type RootData as w, type MappedItem as x, type ComponentDataMap as y, type Content as z };
|
package/dist/rsc.d.mts
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
|
-
import { C as Config, U as UserGenerics, M as Metadata } from './resolve-all-data-
|
3
|
-
export { a6 as resolveAllData } from './resolve-all-data-
|
2
|
+
import { C as Config, U as UserGenerics, M as Metadata } from './resolve-all-data-wwgDuTnC.mjs';
|
3
|
+
export { a6 as resolveAllData } from './resolve-all-data-wwgDuTnC.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, }: {
|
7
7
|
config: UserConfig;
|
8
8
|
data: G["UserData"];
|
9
|
-
metadata
|
9
|
+
metadata?: Metadata;
|
10
10
|
}): react_jsx_runtime.JSX.Element;
|
11
11
|
|
12
12
|
export { Render };
|
package/dist/rsc.d.ts
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
|
-
import { C as Config, U as UserGenerics, M as Metadata } from './resolve-all-data-
|
3
|
-
export { a6 as resolveAllData } from './resolve-all-data-
|
2
|
+
import { C as Config, U as UserGenerics, M as Metadata } from './resolve-all-data-wwgDuTnC.js';
|
3
|
+
export { a6 as resolveAllData } from './resolve-all-data-wwgDuTnC.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, }: {
|
7
7
|
config: UserConfig;
|
8
8
|
data: G["UserData"];
|
9
|
-
metadata
|
9
|
+
metadata?: Metadata;
|
10
10
|
}): react_jsx_runtime.JSX.Element;
|
11
11
|
|
12
12
|
export { Render };
|
package/dist/rsc.js
CHANGED
@@ -76,7 +76,9 @@ module.exports = __toCommonJS(rsc_exports);
|
|
76
76
|
var import_react = __toESM(require("react"));
|
77
77
|
|
78
78
|
// lib/root-droppable-id.ts
|
79
|
-
var
|
79
|
+
var rootAreaId = "root";
|
80
|
+
var rootZone = "default-zone";
|
81
|
+
var rootDroppableId = `${rootAreaId}:${rootZone}`;
|
80
82
|
|
81
83
|
// lib/setup-zone.ts
|
82
84
|
var setupZone = (data, zoneKey) => {
|
@@ -104,7 +106,7 @@ function DropZoneRender({
|
|
104
106
|
if (!data || !config) {
|
105
107
|
return null;
|
106
108
|
}
|
107
|
-
if (areaId
|
109
|
+
if (areaId !== rootAreaId && zone !== rootZone) {
|
108
110
|
zoneCompound = `${areaId}:${zone}`;
|
109
111
|
content = setupZone(data, zoneCompound).zones[zoneCompound];
|
110
112
|
}
|
@@ -167,7 +169,7 @@ function Render({
|
|
167
169
|
{
|
168
170
|
config,
|
169
171
|
data,
|
170
|
-
zone:
|
172
|
+
zone: rootZone,
|
171
173
|
metadata
|
172
174
|
}
|
173
175
|
)
|
@@ -179,7 +181,7 @@ function Render({
|
|
179
181
|
{
|
180
182
|
config,
|
181
183
|
data,
|
182
|
-
zone:
|
184
|
+
zone: rootZone,
|
183
185
|
metadata
|
184
186
|
}
|
185
187
|
);
|
package/dist/rsc.mjs
CHANGED
@@ -3,9 +3,11 @@ import {
|
|
3
3
|
__spreadValues,
|
4
4
|
init_react_import,
|
5
5
|
resolveAllData,
|
6
|
+
rootAreaId,
|
6
7
|
rootDroppableId,
|
8
|
+
rootZone,
|
7
9
|
setupZone
|
8
|
-
} from "./chunk-
|
10
|
+
} from "./chunk-T6VJEBJD.mjs";
|
9
11
|
|
10
12
|
// rsc.tsx
|
11
13
|
init_react_import();
|
@@ -25,7 +27,7 @@ function DropZoneRender({
|
|
25
27
|
if (!data || !config) {
|
26
28
|
return null;
|
27
29
|
}
|
28
|
-
if (areaId
|
30
|
+
if (areaId !== rootAreaId && zone !== rootZone) {
|
29
31
|
zoneCompound = `${areaId}:${zone}`;
|
30
32
|
content = setupZone(data, zoneCompound).zones[zoneCompound];
|
31
33
|
}
|
@@ -88,7 +90,7 @@ function Render({
|
|
88
90
|
{
|
89
91
|
config,
|
90
92
|
data,
|
91
|
-
zone:
|
93
|
+
zone: rootZone,
|
92
94
|
metadata
|
93
95
|
}
|
94
96
|
)
|
@@ -100,7 +102,7 @@ function Render({
|
|
100
102
|
{
|
101
103
|
config,
|
102
104
|
data,
|
103
|
-
zone:
|
105
|
+
zone: rootZone,
|
104
106
|
metadata
|
105
107
|
}
|
106
108
|
);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@measured/puck",
|
3
|
-
"version": "0.19.0-canary.
|
3
|
+
"version": "0.19.0-canary.c33636f",
|
4
4
|
"author": "Measured Corporation Ltd <hello@measured.co>",
|
5
5
|
"repository": "measuredco/puck",
|
6
6
|
"bugs": "https://github.com/measuredco/puck/issues",
|
@@ -71,6 +71,7 @@
|
|
71
71
|
"@dnd-kit/helpers": "0.0.7-beta-20250130032138",
|
72
72
|
"@dnd-kit/react": "0.0.7-beta-20250130032138",
|
73
73
|
"deep-diff": "^1.0.2",
|
74
|
+
"fast-deep-equal": "^3.1.3",
|
74
75
|
"object-hash": "^3.0.0",
|
75
76
|
"react-hotkeys-hook": "^4.6.1",
|
76
77
|
"use-debounce": "^9.0.4",
|