@puckeditor/core 0.22.0-canary.3d2d4618 → 0.22.0-canary.3ef233f7
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/README.md +0 -3
- package/dist/{Editor-B4XBFE6T.mjs → Editor-HFELA66Z.mjs} +9 -9
- package/dist/{actions-WBE4JXM_.d.mts → actions-Csn3gOP8.d.mts} +3 -2
- package/dist/{actions-WBE4JXM_.d.ts → actions-Csn3gOP8.d.ts} +3 -2
- package/dist/{chunk-MODCHPUF.mjs → chunk-4V66DSMA.mjs} +3 -3
- package/dist/{chunk-FVCNE73M.mjs → chunk-4X2SLJRQ.mjs} +1 -1
- package/dist/{chunk-6MDV6FPH.mjs → chunk-6MO3E35Y.mjs} +4 -6
- package/dist/{chunk-LFUXRW6C.mjs → chunk-6PUO3QRB.mjs} +7 -7
- package/dist/{chunk-LWA6664X.mjs → chunk-7QEMMXYS.mjs} +7 -9
- package/dist/{chunk-YLLE6KXH.mjs → chunk-DVZWVU66.mjs} +60 -2
- package/dist/{chunk-Z6HTWEAL.mjs → chunk-FNE5FMBH.mjs} +3145 -330
- package/dist/{chunk-IRT55QMB.mjs → chunk-GFIZBMKN.mjs} +1 -1
- package/dist/{chunk-R27N4Y2L.mjs → chunk-MQKADUDK.mjs} +1 -1
- package/dist/{chunk-TTQH6OMN.mjs → chunk-OVPTKQ2P.mjs} +5 -8
- package/dist/{chunk-754HNMU2.mjs → chunk-SHVCBQDY.mjs} +2 -18
- package/dist/{full-JULOSDQK.mjs → full-YKFH7JSW.mjs} +8 -8
- package/dist/{index-DH7q-bs9.d.ts → index-B1b1cFug.d.ts} +1 -1
- package/dist/{index-rW_NN8GM.d.mts → index-ClzBCbx_.d.mts} +1 -1
- package/dist/index.css +65 -59
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3205 -346
- package/dist/index.mjs +11 -11
- package/dist/internal.d.mts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +50 -14
- package/dist/internal.mjs +2 -2
- package/dist/{loaded-S64W25CI.mjs → loaded-2QS7VXZ6.mjs} +5 -5
- package/dist/{loaded-ON3FMYL5.mjs → loaded-A7UUCT2O.mjs} +5 -5
- package/dist/{loaded-33PTDNED.mjs → loaded-JHBS3QYA.mjs} +5 -5
- package/dist/no-external.css +65 -59
- package/dist/no-external.d.mts +3 -3
- package/dist/no-external.d.ts +3 -3
- package/dist/no-external.js +3205 -346
- package/dist/no-external.mjs +11 -11
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +10 -28
- package/dist/rsc.mjs +3 -3
- package/dist/{walk-tree-BAQ1Jdlh.d.mts → walk-tree-BrW9VQ_t.d.mts} +1 -1
- package/dist/{walk-tree-CagzlNEC.d.ts → walk-tree-CWrsBHHe.d.ts} +1 -1
- package/package.json +13 -5
package/README.md
CHANGED
|
@@ -42,7 +42,6 @@ Render the editor:
|
|
|
42
42
|
```jsx
|
|
43
43
|
// Editor.jsx
|
|
44
44
|
import { Puck } from "@puckeditor/core";
|
|
45
|
-
import "@puckeditor/core/puck.css";
|
|
46
45
|
|
|
47
46
|
// Create Puck component config
|
|
48
47
|
const config = {
|
|
@@ -77,7 +76,6 @@ Render the page:
|
|
|
77
76
|
```jsx
|
|
78
77
|
// Page.jsx
|
|
79
78
|
import { Render } from "@puckeditor/core";
|
|
80
|
-
import "@puckeditor/core/puck.css";
|
|
81
79
|
|
|
82
80
|
export function Page() {
|
|
83
81
|
return <Render config={config} data={data} />;
|
|
@@ -95,7 +93,6 @@ npx create-puck-app my-app
|
|
|
95
93
|
Available recipes include:
|
|
96
94
|
|
|
97
95
|
- [**next**](https://github.com/puckeditor/puck/tree/main/recipes/next): Next.js example, using App Router and static page generation
|
|
98
|
-
- [**remix**](https://github.com/puckeditor/puck/tree/main/recipes/remix): Remix Run v2 example, using dynamic routes at root-level
|
|
99
96
|
- [**react-router**](https://github.com/puckeditor/puck/tree/main/recipes/react-router): React Router v7 app example, using dynamic routes to create pages at any level
|
|
100
97
|
|
|
101
98
|
## Community
|
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
EditorInner,
|
|
6
6
|
LoadedRichTextMenu
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4V66DSMA.mjs";
|
|
8
8
|
import "./chunk-AOEDIUVK.mjs";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-6PUO3QRB.mjs";
|
|
10
|
+
import "./chunk-4X2SLJRQ.mjs";
|
|
11
|
+
import "./chunk-GFIZBMKN.mjs";
|
|
12
|
+
import "./chunk-MQKADUDK.mjs";
|
|
13
13
|
import {
|
|
14
14
|
useAppStore,
|
|
15
15
|
useAppStoreApi
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-OVPTKQ2P.mjs";
|
|
17
|
+
import "./chunk-DVZWVU66.mjs";
|
|
18
|
+
import "./chunk-6MO3E35Y.mjs";
|
|
19
19
|
import "./chunk-Y2EFNT5P.mjs";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-SHVCBQDY.mjs";
|
|
21
21
|
import {
|
|
22
22
|
__spreadProps,
|
|
23
23
|
__spreadValues,
|
|
@@ -430,7 +430,7 @@ UserField extends BaseField = {}> = {
|
|
|
430
430
|
metadata: ComponentMetadata;
|
|
431
431
|
trigger: ResolveDataTrigger;
|
|
432
432
|
parent: ComponentData | null;
|
|
433
|
-
root:
|
|
433
|
+
root: RootData;
|
|
434
434
|
}) => Promise<WithPartialProps<DataShape, FieldProps>> | WithPartialProps<DataShape, FieldProps>;
|
|
435
435
|
resolvePermissions?: (data: DataShape, params: {
|
|
436
436
|
changed: Partial<Record<keyof FieldProps, boolean> & {
|
|
@@ -734,6 +734,7 @@ type Permissions = {
|
|
|
734
734
|
type IframeConfig = {
|
|
735
735
|
enabled?: boolean;
|
|
736
736
|
waitForStyles?: boolean;
|
|
737
|
+
syncHostStyles?: boolean;
|
|
737
738
|
};
|
|
738
739
|
type OnAction<UserData extends Data = Data> = (action: PuckAction, appState: AppState<UserData>, prevAppState: AppState<UserData>) => void;
|
|
739
740
|
type Plugin<UserConfig extends Config = Config> = {
|
|
@@ -836,4 +837,4 @@ type PuckAction = {
|
|
|
836
837
|
recordHistory?: boolean;
|
|
837
838
|
} & (ReorderAction | InsertAction | MoveAction | ReplaceAction | ReplaceRootAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
|
|
838
839
|
|
|
839
|
-
export { type
|
|
840
|
+
export { type Permissions as $, type Adaptor as A, type BaseData as B, type CacheOpts as C, type Data as D, type ExternalField as E, type ExtractConfigParams as F, type ExtractField as G, type Field as H, type FieldMetadata as I, type FieldProps as J, type FieldRenderFunctions as K, type FieldTransformFn as L, type FieldTransformFnParams as M, type FieldTransforms as N, type Fields as O, type History as P, type IframeConfig as Q, type InitialHistory as R, type ItemSelector as S, type ItemWithId as T, type MappedItem as U, type Metadata as V, type NumberField as W, type ObjectField as X, type OnAction as Y, type OverrideKey as Z, type Overrides as _, type AppState as a, type Plugin as a0, type PluginInternal as a1, type PrivateAppState as a2, type PuckAction as a3, type PuckComponent as a4, type PuckContext as a5, type PuckMetadata as a6, type RadioField as a7, type ResolveDataTrigger as a8, type RichText as a9, type RichtextField as aa, type RootConfig as ab, type RootData as ac, type RootDataWithProps as ad, type RootDataWithoutProps as ae, type SelectField as af, type Slot as ag, type SlotComponent as ah, type SlotField as ai, type TextField as aj, type TextareaField as ak, type UiState as al, type UserGenerics as am, type Viewport as an, type Viewports as ao, type WithChildren as ap, type WithId as aq, type WithPuckProps as ar, type WithSlotProps as as, overrideKeys as at, type ArrayField as b, type ArrayState as c, type AsFieldProps as d, type BaseField as e, type ComponentConfig as f, type ComponentConfigExtensions as g, type ComponentConfigParams as h, type ComponentData as i, type ComponentDataMap as j, type ComponentDataOptionalId as k, type ComponentMetadata as l, type Config as m, type ConfigParams as n, type Content as o, type CustomField as p, type CustomFieldRender as q, type DefaultComponentProps as r, type DefaultComponents as s, type DefaultRootFieldProps as t, type DefaultRootProps as u, type DefaultRootRenderProps as v, type Direction as w, type DragAxis as x, type DropZoneProps as y, type ExternalFieldWithAdaptor as z };
|
|
@@ -430,7 +430,7 @@ UserField extends BaseField = {}> = {
|
|
|
430
430
|
metadata: ComponentMetadata;
|
|
431
431
|
trigger: ResolveDataTrigger;
|
|
432
432
|
parent: ComponentData | null;
|
|
433
|
-
root:
|
|
433
|
+
root: RootData;
|
|
434
434
|
}) => Promise<WithPartialProps<DataShape, FieldProps>> | WithPartialProps<DataShape, FieldProps>;
|
|
435
435
|
resolvePermissions?: (data: DataShape, params: {
|
|
436
436
|
changed: Partial<Record<keyof FieldProps, boolean> & {
|
|
@@ -734,6 +734,7 @@ type Permissions = {
|
|
|
734
734
|
type IframeConfig = {
|
|
735
735
|
enabled?: boolean;
|
|
736
736
|
waitForStyles?: boolean;
|
|
737
|
+
syncHostStyles?: boolean;
|
|
737
738
|
};
|
|
738
739
|
type OnAction<UserData extends Data = Data> = (action: PuckAction, appState: AppState<UserData>, prevAppState: AppState<UserData>) => void;
|
|
739
740
|
type Plugin<UserConfig extends Config = Config> = {
|
|
@@ -836,4 +837,4 @@ type PuckAction = {
|
|
|
836
837
|
recordHistory?: boolean;
|
|
837
838
|
} & (ReorderAction | InsertAction | MoveAction | ReplaceAction | ReplaceRootAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
|
|
838
839
|
|
|
839
|
-
export { type
|
|
840
|
+
export { type Permissions as $, type Adaptor as A, type BaseData as B, type CacheOpts as C, type Data as D, type ExternalField as E, type ExtractConfigParams as F, type ExtractField as G, type Field as H, type FieldMetadata as I, type FieldProps as J, type FieldRenderFunctions as K, type FieldTransformFn as L, type FieldTransformFnParams as M, type FieldTransforms as N, type Fields as O, type History as P, type IframeConfig as Q, type InitialHistory as R, type ItemSelector as S, type ItemWithId as T, type MappedItem as U, type Metadata as V, type NumberField as W, type ObjectField as X, type OnAction as Y, type OverrideKey as Z, type Overrides as _, type AppState as a, type Plugin as a0, type PluginInternal as a1, type PrivateAppState as a2, type PuckAction as a3, type PuckComponent as a4, type PuckContext as a5, type PuckMetadata as a6, type RadioField as a7, type ResolveDataTrigger as a8, type RichText as a9, type RichtextField as aa, type RootConfig as ab, type RootData as ac, type RootDataWithProps as ad, type RootDataWithoutProps as ae, type SelectField as af, type Slot as ag, type SlotComponent as ah, type SlotField as ai, type TextField as aj, type TextareaField as ak, type UiState as al, type UserGenerics as am, type Viewport as an, type Viewports as ao, type WithChildren as ap, type WithId as aq, type WithPuckProps as ar, type WithSlotProps as as, overrideKeys as at, type ArrayField as b, type ArrayState as c, type AsFieldProps as d, type BaseField as e, type ComponentConfig as f, type ComponentConfigExtensions as g, type ComponentConfigParams as h, type ComponentData as i, type ComponentDataMap as j, type ComponentDataOptionalId as k, type ComponentMetadata as l, type Config as m, type ConfigParams as n, type Content as o, type CustomField as p, type CustomFieldRender as q, type DefaultComponentProps as r, type DefaultComponents as s, type DefaultRootFieldProps as t, type DefaultRootProps as u, type DefaultRootRenderProps as v, type Direction as w, type DragAxis as x, type DropZoneProps as y, type ExternalFieldWithAdaptor as z };
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./chunk-AOEDIUVK.mjs";
|
|
4
4
|
import {
|
|
5
5
|
LoadedRichTextMenuInner
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6PUO3QRB.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useAppStore,
|
|
9
9
|
useAppStoreApi
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-OVPTKQ2P.mjs";
|
|
11
11
|
import {
|
|
12
12
|
get_class_name_factory_default
|
|
13
13
|
} from "./chunk-Y2EFNT5P.mjs";
|
|
@@ -100,7 +100,7 @@ init_react_import();
|
|
|
100
100
|
import { lazy, Suspense } from "react";
|
|
101
101
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
102
102
|
var LoadedRichTextMenuFull = lazy(
|
|
103
|
-
() => import("./full-
|
|
103
|
+
() => import("./full-YKFH7JSW.mjs").then((m) => ({
|
|
104
104
|
default: m.LoadedRichTextMenuFull
|
|
105
105
|
}))
|
|
106
106
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mapFields,
|
|
3
3
|
toComponent
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SHVCBQDY.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__async,
|
|
7
7
|
__spreadProps,
|
|
@@ -37,12 +37,11 @@ var getChanged = (newItem, oldItem) => {
|
|
|
37
37
|
// lib/resolve-component-data.ts
|
|
38
38
|
import { deepEqual as deepEqual2 } from "fast-equals";
|
|
39
39
|
var cache = { lastChange: {} };
|
|
40
|
-
var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace", parent = null, root =
|
|
40
|
+
var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace", parent = null, root = { props: {} }) {
|
|
41
41
|
const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
|
|
42
42
|
const resolvedItem = __spreadValues({}, item);
|
|
43
43
|
const shouldRunResolver = (configForItem == null ? void 0 : configForItem.resolveData) && item.props;
|
|
44
44
|
const id = "id" in item.props ? item.props.id : "root";
|
|
45
|
-
const rootForItem = root != null ? root : "type" in item && item.type === "root" ? toComponent(item) : null;
|
|
46
45
|
if (shouldRunResolver) {
|
|
47
46
|
const {
|
|
48
47
|
item: oldItem = null,
|
|
@@ -66,7 +65,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], fun
|
|
|
66
65
|
metadata: __spreadValues(__spreadValues({}, metadata), configForItem.metadata),
|
|
67
66
|
trigger,
|
|
68
67
|
parent,
|
|
69
|
-
root
|
|
68
|
+
root
|
|
70
69
|
});
|
|
71
70
|
resolvedItem.props = __spreadValues(__spreadValues({}, item.props), resolvedProps);
|
|
72
71
|
if (Object.keys(readOnly).length) {
|
|
@@ -74,7 +73,6 @@ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], fun
|
|
|
74
73
|
}
|
|
75
74
|
}
|
|
76
75
|
const itemAsComponentData = toComponent(resolvedItem);
|
|
77
|
-
const rootForChildren = itemAsComponentData.type === "root" ? itemAsComponentData : rootForItem;
|
|
78
76
|
let itemWithResolvedChildren = yield mapFields(
|
|
79
77
|
resolvedItem,
|
|
80
78
|
{
|
|
@@ -91,7 +89,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], fun
|
|
|
91
89
|
onResolveEnd,
|
|
92
90
|
trigger,
|
|
93
91
|
itemAsComponentData,
|
|
94
|
-
|
|
92
|
+
root
|
|
95
93
|
)).node;
|
|
96
94
|
})
|
|
97
95
|
)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useAlignOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4X2SLJRQ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
useHeadingOptions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GFIZBMKN.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useListOptions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MQKADUDK.mjs";
|
|
10
10
|
import {
|
|
11
11
|
AlignCenter,
|
|
12
12
|
AlignJustify,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
Strikethrough,
|
|
27
27
|
Underline,
|
|
28
28
|
useControlContext
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-OVPTKQ2P.mjs";
|
|
30
30
|
import {
|
|
31
31
|
get_class_name_factory_default
|
|
32
32
|
} from "./chunk-Y2EFNT5P.mjs";
|
|
@@ -349,7 +349,7 @@ function AlignSelectFallback() {
|
|
|
349
349
|
// components/RichTextMenu/controls/AlignSelect/index.tsx
|
|
350
350
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
351
351
|
var AlignSelectLoaded = lazy(
|
|
352
|
-
() => import("./loaded-
|
|
352
|
+
() => import("./loaded-JHBS3QYA.mjs").then((m) => ({
|
|
353
353
|
default: m.AlignSelectLoaded
|
|
354
354
|
}))
|
|
355
355
|
);
|
|
@@ -580,7 +580,7 @@ function HeadingSelectFallback() {
|
|
|
580
580
|
// components/RichTextMenu/controls/HeadingSelect/index.tsx
|
|
581
581
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
582
582
|
var HeadingSelectLoaded = lazy2(
|
|
583
|
-
() => import("./loaded-
|
|
583
|
+
() => import("./loaded-A7UUCT2O.mjs").then((m) => ({
|
|
584
584
|
default: m.HeadingSelectLoaded
|
|
585
585
|
}))
|
|
586
586
|
);
|
|
@@ -612,7 +612,7 @@ function ListSelectFallback() {
|
|
|
612
612
|
// components/RichTextMenu/controls/ListSelect/index.tsx
|
|
613
613
|
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
614
614
|
var ListSelectLoaded = lazy3(
|
|
615
|
-
() => import("./loaded-
|
|
615
|
+
() => import("./loaded-2QS7VXZ6.mjs").then((m) => ({
|
|
616
616
|
default: m.ListSelectLoaded
|
|
617
617
|
}))
|
|
618
618
|
);
|
|
@@ -4,18 +4,17 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
defaultAppState,
|
|
6
6
|
resolveComponentData
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6MO3E35Y.mjs";
|
|
8
8
|
import {
|
|
9
9
|
get_class_name_factory_default
|
|
10
10
|
} from "./chunk-Y2EFNT5P.mjs";
|
|
11
11
|
import {
|
|
12
|
-
generateId,
|
|
13
12
|
getZoneId,
|
|
14
13
|
mapFields,
|
|
15
14
|
toComponent,
|
|
16
15
|
walkAppState,
|
|
17
16
|
walkTree
|
|
18
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SHVCBQDY.mjs";
|
|
19
18
|
import {
|
|
20
19
|
__async,
|
|
21
20
|
__objRest,
|
|
@@ -227,11 +226,10 @@ function resolveAllData(_0, _1) {
|
|
|
227
226
|
root
|
|
228
227
|
)).node;
|
|
229
228
|
const resolvedAsComponent = toComponent(resolved);
|
|
230
|
-
const rootForChildren = resolvedAsComponent.type === "root" ? resolvedAsComponent : root;
|
|
231
229
|
const resolvedDeepPromise = mapFields(
|
|
232
230
|
resolved,
|
|
233
231
|
{
|
|
234
|
-
slot: ({ value }) => processContent(value, resolvedAsComponent,
|
|
232
|
+
slot: ({ value }) => processContent(value, resolvedAsComponent, root)
|
|
235
233
|
},
|
|
236
234
|
config
|
|
237
235
|
);
|
|
@@ -242,7 +240,7 @@ function resolveAllData(_0, _1) {
|
|
|
242
240
|
resolvedZones[zoneCompound] = yield processContent(
|
|
243
241
|
content,
|
|
244
242
|
resolvedAsComponent,
|
|
245
|
-
|
|
243
|
+
root
|
|
246
244
|
);
|
|
247
245
|
})
|
|
248
246
|
);
|
|
@@ -256,11 +254,11 @@ function resolveAllData(_0, _1) {
|
|
|
256
254
|
return Promise.all(content.map((item) => resolveNode(item, parent, root)));
|
|
257
255
|
});
|
|
258
256
|
const result = defaultData({});
|
|
259
|
-
result.root = yield resolveNode(defaultedData.root, null,
|
|
257
|
+
result.root = yield resolveNode(defaultedData.root, null, defaultedData.root);
|
|
260
258
|
result.content = yield processContent(
|
|
261
259
|
defaultedData.content,
|
|
262
260
|
toComponent(result.root),
|
|
263
|
-
|
|
261
|
+
result.root
|
|
264
262
|
);
|
|
265
263
|
result.zones = resolvedZones;
|
|
266
264
|
return result;
|
|
@@ -416,7 +414,7 @@ function useRichtextProps(fields, props) {
|
|
|
416
414
|
fallback: /* @__PURE__ */ jsx2(RichTextRenderFallback, { content }),
|
|
417
415
|
children: /* @__PURE__ */ jsx2(RichTextRender, { content, field })
|
|
418
416
|
},
|
|
419
|
-
|
|
417
|
+
path.join(".")
|
|
420
418
|
));
|
|
421
419
|
}
|
|
422
420
|
return result;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
generateId,
|
|
3
2
|
rootDroppableId,
|
|
4
3
|
setupZone,
|
|
5
4
|
walkAppState,
|
|
6
5
|
walkTree
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SHVCBQDY.mjs";
|
|
8
7
|
import {
|
|
9
8
|
__spreadProps,
|
|
10
9
|
__spreadValues,
|
|
@@ -41,6 +40,64 @@ var insert = (list, index, item) => {
|
|
|
41
40
|
return result;
|
|
42
41
|
};
|
|
43
42
|
|
|
43
|
+
// lib/generate-id.ts
|
|
44
|
+
init_react_import();
|
|
45
|
+
|
|
46
|
+
// lib/uuid/index.ts
|
|
47
|
+
init_react_import();
|
|
48
|
+
|
|
49
|
+
// lib/uuid/rng.ts
|
|
50
|
+
init_react_import();
|
|
51
|
+
var rnds8 = new Uint8Array(16);
|
|
52
|
+
function rng() {
|
|
53
|
+
return crypto.getRandomValues(rnds8);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// lib/uuid/stringify.ts
|
|
57
|
+
init_react_import();
|
|
58
|
+
var byteToHex = [];
|
|
59
|
+
for (let i = 0; i < 256; ++i) {
|
|
60
|
+
byteToHex.push((i + 256).toString(16).slice(1));
|
|
61
|
+
}
|
|
62
|
+
function unsafeStringify(arr, offset = 0) {
|
|
63
|
+
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// lib/uuid/index.ts
|
|
67
|
+
function v4(options, buf, offset) {
|
|
68
|
+
if (!buf && !options && crypto.randomUUID) {
|
|
69
|
+
return crypto.randomUUID();
|
|
70
|
+
}
|
|
71
|
+
return _v4(options, buf, offset);
|
|
72
|
+
}
|
|
73
|
+
function _v4(options, buf, offset) {
|
|
74
|
+
var _a, _b, _c;
|
|
75
|
+
options = options || {};
|
|
76
|
+
const rnds = (_c = (_b = options.random) != null ? _b : (_a = options.rng) == null ? void 0 : _a.call(options)) != null ? _c : rng();
|
|
77
|
+
if (rnds.length < 16) {
|
|
78
|
+
throw new Error("Random bytes length must be >= 16");
|
|
79
|
+
}
|
|
80
|
+
rnds[6] = rnds[6] & 15 | 64;
|
|
81
|
+
rnds[8] = rnds[8] & 63 | 128;
|
|
82
|
+
if (buf) {
|
|
83
|
+
offset = offset || 0;
|
|
84
|
+
if (offset < 0 || offset + 16 > buf.length) {
|
|
85
|
+
throw new RangeError(
|
|
86
|
+
`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
for (let i = 0; i < 16; ++i) {
|
|
90
|
+
buf[offset + i] = rnds[i];
|
|
91
|
+
}
|
|
92
|
+
return buf;
|
|
93
|
+
}
|
|
94
|
+
return unsafeStringify(rnds);
|
|
95
|
+
}
|
|
96
|
+
var uuid_default = v4;
|
|
97
|
+
|
|
98
|
+
// lib/generate-id.ts
|
|
99
|
+
var generateId = (type) => type ? `${type}-${uuid_default()}` : uuid_default();
|
|
100
|
+
|
|
44
101
|
// lib/data/get-ids-for-parent.ts
|
|
45
102
|
init_react_import();
|
|
46
103
|
var getIdsForParent = (zoneCompound, state) => {
|
|
@@ -515,6 +572,7 @@ function createReducer({
|
|
|
515
572
|
|
|
516
573
|
export {
|
|
517
574
|
insert,
|
|
575
|
+
generateId,
|
|
518
576
|
populateIds,
|
|
519
577
|
insertAction,
|
|
520
578
|
getItem,
|