@puckeditor/core 0.22.0-canary.ea2ac3c2 → 0.22.0-canary.ed7231bb
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-O3WDTJHV.mjs → Editor-KEM37W75.mjs} +10 -10
- package/dist/{Render-I4N6YQDP.mjs → Render-CU35UAWV.mjs} +1 -1
- package/dist/{actions-BrxBrqKj.d.mts → actions-BNVZoC77.d.mts} +3 -3
- package/dist/{actions-BrxBrqKj.d.ts → actions-BNVZoC77.d.ts} +3 -3
- package/dist/{chunk-CDUFFBL7.mjs → chunk-5K6QEDSO.mjs} +7 -8
- package/dist/{chunk-ZARHKIBN.mjs → chunk-7HLEYXQ2.mjs} +4 -4
- package/dist/{chunk-6WA3HRH4.mjs → chunk-C3DADWZ5.mjs} +1 -1
- package/dist/{chunk-Q7O6TFQB.mjs → chunk-GWROLTHW.mjs} +1 -1
- package/dist/{chunk-MDUBGHWF.mjs → chunk-H7CHELWC.mjs} +3 -12
- package/dist/{chunk-37HTE4KO.mjs → chunk-IPJJYG5V.mjs} +60 -2
- package/dist/{chunk-Y4JP7GJG.mjs → chunk-NOLIVOCU.mjs} +8 -8
- package/dist/{chunk-PMXRXC2B.mjs → chunk-QUQNXLVA.mjs} +18 -17
- package/dist/{chunk-3CJZ5CW3.mjs → chunk-U6VOPOM5.mjs} +7126 -3819
- package/dist/{chunk-Q7WALXIQ.mjs → chunk-Y2EFNT5P.mjs} +2 -2
- package/dist/{chunk-TGGRMDFQ.mjs → chunk-YGQOG33Q.mjs} +1 -1
- package/dist/{chunk-EH5IVUJL.mjs → chunk-ZWCLCAIH.mjs} +56 -49
- package/dist/{full-IKKZDCXQ.mjs → full-5FICA5Q4.mjs} +9 -9
- package/dist/{index-GB3Q5h0c.d.ts → index-CLl8T9T-.d.mts} +9 -10
- package/dist/{index-sczExwEC.d.mts → index-S3JYh45C.d.ts} +9 -10
- package/dist/index.css +45 -38
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +4581 -1226
- package/dist/index.mjs +19 -16
- package/dist/internal.d.mts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +64 -13
- package/dist/internal.mjs +2 -2
- package/dist/{loaded-CDQ6IGP6.mjs → loaded-35AVIWCK.mjs} +6 -6
- package/dist/{loaded-244PGCK6.mjs → loaded-NBCRQQKO.mjs} +6 -6
- package/dist/{loaded-IEPYAJGX.mjs → loaded-ZHVN4E25.mjs} +6 -6
- package/dist/no-external.css +188 -185
- package/dist/no-external.d.mts +4 -4
- package/dist/no-external.d.ts +4 -4
- package/dist/no-external.js +4579 -1227
- package/dist/no-external.mjs +13 -15
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +53 -43
- package/dist/rsc.mjs +46 -28
- package/dist/{walk-tree-CQfHfM9_.d.mts → walk-tree-CvK-gJ1U.d.mts} +1 -1
- package/dist/{walk-tree-B8hGlO4f.d.ts → walk-tree-YOk8UlkR.d.ts} +1 -1
- package/package.json +11 -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-7HLEYXQ2.mjs";
|
|
8
8
|
import "./chunk-AOEDIUVK.mjs";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-NOLIVOCU.mjs";
|
|
10
|
+
import "./chunk-GWROLTHW.mjs";
|
|
11
|
+
import "./chunk-C3DADWZ5.mjs";
|
|
12
|
+
import "./chunk-YGQOG33Q.mjs";
|
|
13
13
|
import {
|
|
14
14
|
useAppStore,
|
|
15
15
|
useAppStoreApi
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-ZWCLCAIH.mjs";
|
|
17
|
+
import "./chunk-IPJJYG5V.mjs";
|
|
18
|
+
import "./chunk-H7CHELWC.mjs";
|
|
19
|
+
import "./chunk-Y2EFNT5P.mjs";
|
|
20
|
+
import "./chunk-QUQNXLVA.mjs";
|
|
21
21
|
import {
|
|
22
22
|
__spreadProps,
|
|
23
23
|
__spreadValues,
|
|
@@ -308,7 +308,7 @@ type CustomFieldRender<Value extends any> = (props: {
|
|
|
308
308
|
name: string;
|
|
309
309
|
id: string;
|
|
310
310
|
value: Value;
|
|
311
|
-
onChange: (value: Value) => void;
|
|
311
|
+
onChange: (value: Value, uiState?: Partial<UiState>) => void;
|
|
312
312
|
readOnly?: boolean;
|
|
313
313
|
}) => ReactElement;
|
|
314
314
|
interface CustomField<Value extends any> extends BaseField {
|
|
@@ -733,7 +733,7 @@ type Permissions = {
|
|
|
733
733
|
type IframeConfig = {
|
|
734
734
|
enabled?: boolean;
|
|
735
735
|
waitForStyles?: boolean;
|
|
736
|
-
|
|
736
|
+
syncHostStyles?: boolean;
|
|
737
737
|
};
|
|
738
738
|
type OnAction<UserData extends Data = Data> = (action: PuckAction, appState: AppState<UserData>, prevAppState: AppState<UserData>) => void;
|
|
739
739
|
type Plugin<UserConfig extends Config = Config> = {
|
|
@@ -836,4 +836,4 @@ type PuckAction = {
|
|
|
836
836
|
recordHistory?: boolean;
|
|
837
837
|
} & (ReorderAction | InsertAction | MoveAction | ReplaceAction | ReplaceRootAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
|
|
838
838
|
|
|
839
|
-
export { type
|
|
839
|
+
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 };
|
|
@@ -308,7 +308,7 @@ type CustomFieldRender<Value extends any> = (props: {
|
|
|
308
308
|
name: string;
|
|
309
309
|
id: string;
|
|
310
310
|
value: Value;
|
|
311
|
-
onChange: (value: Value) => void;
|
|
311
|
+
onChange: (value: Value, uiState?: Partial<UiState>) => void;
|
|
312
312
|
readOnly?: boolean;
|
|
313
313
|
}) => ReactElement;
|
|
314
314
|
interface CustomField<Value extends any> extends BaseField {
|
|
@@ -733,7 +733,7 @@ type Permissions = {
|
|
|
733
733
|
type IframeConfig = {
|
|
734
734
|
enabled?: boolean;
|
|
735
735
|
waitForStyles?: boolean;
|
|
736
|
-
|
|
736
|
+
syncHostStyles?: boolean;
|
|
737
737
|
};
|
|
738
738
|
type OnAction<UserData extends Data = Data> = (action: PuckAction, appState: AppState<UserData>, prevAppState: AppState<UserData>) => void;
|
|
739
739
|
type Plugin<UserConfig extends Config = Config> = {
|
|
@@ -836,4 +836,4 @@ type PuckAction = {
|
|
|
836
836
|
recordHistory?: boolean;
|
|
837
837
|
} & (ReorderAction | InsertAction | MoveAction | ReplaceAction | ReplaceRootAction | RemoveAction | DuplicateAction | SetAction | SetDataAction | SetUiAction | RegisterZoneAction | UnregisterZoneAction);
|
|
838
838
|
|
|
839
|
-
export { type
|
|
839
|
+
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,19 +3,18 @@ import {
|
|
|
3
3
|
} from "./chunk-AOEDIUVK.mjs";
|
|
4
4
|
import {
|
|
5
5
|
defaultAppState,
|
|
6
|
-
resolveComponentData
|
|
7
|
-
|
|
8
|
-
} from "./chunk-MDUBGHWF.mjs";
|
|
6
|
+
resolveComponentData
|
|
7
|
+
} from "./chunk-H7CHELWC.mjs";
|
|
9
8
|
import {
|
|
10
9
|
get_class_name_factory_default
|
|
11
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Y2EFNT5P.mjs";
|
|
12
11
|
import {
|
|
13
|
-
generateId,
|
|
14
12
|
getZoneId,
|
|
15
13
|
mapFields,
|
|
14
|
+
toComponent,
|
|
16
15
|
walkAppState,
|
|
17
16
|
walkTree
|
|
18
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-QUQNXLVA.mjs";
|
|
19
18
|
import {
|
|
20
19
|
__async,
|
|
21
20
|
__objRest,
|
|
@@ -400,7 +399,7 @@ function useRichtextProps(fields, props) {
|
|
|
400
399
|
const richtextProps = useMemo2(() => {
|
|
401
400
|
if (!(richtextKeys == null ? void 0 : richtextKeys.length)) return {};
|
|
402
401
|
const RichTextRender = lazy(
|
|
403
|
-
() => import("./Render-
|
|
402
|
+
() => import("./Render-CU35UAWV.mjs").then((m) => ({
|
|
404
403
|
default: m.RichTextRender
|
|
405
404
|
}))
|
|
406
405
|
);
|
|
@@ -412,7 +411,7 @@ function useRichtextProps(fields, props) {
|
|
|
412
411
|
fallback: /* @__PURE__ */ jsx2(RichTextRenderFallback, { content }),
|
|
413
412
|
children: /* @__PURE__ */ jsx2(RichTextRender, { content, field })
|
|
414
413
|
},
|
|
415
|
-
|
|
414
|
+
path.join(".")
|
|
416
415
|
));
|
|
417
416
|
}
|
|
418
417
|
return result;
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-AOEDIUVK.mjs";
|
|
4
4
|
import {
|
|
5
5
|
LoadedRichTextMenuInner
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NOLIVOCU.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useAppStore,
|
|
9
9
|
useAppStoreApi
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZWCLCAIH.mjs";
|
|
11
11
|
import {
|
|
12
12
|
get_class_name_factory_default
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-Y2EFNT5P.mjs";
|
|
14
14
|
import {
|
|
15
15
|
__spreadValues,
|
|
16
16
|
init_react_import
|
|
@@ -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-5FICA5Q4.mjs").then((m) => ({
|
|
104
104
|
default: m.LoadedRichTextMenuFull
|
|
105
105
|
}))
|
|
106
106
|
);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
mapFields
|
|
3
|
-
|
|
2
|
+
mapFields,
|
|
3
|
+
toComponent
|
|
4
|
+
} from "./chunk-QUQNXLVA.mjs";
|
|
4
5
|
import {
|
|
5
6
|
__async,
|
|
6
7
|
__spreadProps,
|
|
@@ -17,15 +18,6 @@ var defaultViewports = [
|
|
|
17
18
|
{ width: "100%", height: "auto", icon: "FullWidth", label: "Full-width" }
|
|
18
19
|
];
|
|
19
20
|
|
|
20
|
-
// lib/data/to-component.ts
|
|
21
|
-
init_react_import();
|
|
22
|
-
var toComponent = (item) => {
|
|
23
|
-
return "type" in item ? item : __spreadProps(__spreadValues({}, item), {
|
|
24
|
-
props: __spreadProps(__spreadValues({}, item.props), { id: "root" }),
|
|
25
|
-
type: "root"
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
|
|
29
21
|
// lib/resolve-component-data.ts
|
|
30
22
|
init_react_import();
|
|
31
23
|
|
|
@@ -150,7 +142,6 @@ var defaultAppState = {
|
|
|
150
142
|
export {
|
|
151
143
|
defaultViewports,
|
|
152
144
|
getChanged,
|
|
153
|
-
toComponent,
|
|
154
145
|
resolveComponentData,
|
|
155
146
|
defaultAppState
|
|
156
147
|
};
|
|
@@ -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-QUQNXLVA.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,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useAlignOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GWROLTHW.mjs";
|
|
4
4
|
import {
|
|
5
5
|
useHeadingOptions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-C3DADWZ5.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useListOptions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YGQOG33Q.mjs";
|
|
10
10
|
import {
|
|
11
11
|
AlignCenter,
|
|
12
12
|
AlignJustify,
|
|
@@ -26,10 +26,10 @@ import {
|
|
|
26
26
|
Strikethrough,
|
|
27
27
|
Underline,
|
|
28
28
|
useControlContext
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-ZWCLCAIH.mjs";
|
|
30
30
|
import {
|
|
31
31
|
get_class_name_factory_default
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-Y2EFNT5P.mjs";
|
|
33
33
|
import {
|
|
34
34
|
__objRest,
|
|
35
35
|
__spreadValues,
|
|
@@ -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-35AVIWCK.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-ZHVN4E25.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-NBCRQQKO.mjs").then((m) => ({
|
|
616
616
|
default: m.ListSelectLoaded
|
|
617
617
|
}))
|
|
618
618
|
);
|
|
@@ -267,6 +267,15 @@ var expandNode = (node) => {
|
|
|
267
267
|
});
|
|
268
268
|
};
|
|
269
269
|
|
|
270
|
+
// lib/data/to-component.ts
|
|
271
|
+
init_react_import();
|
|
272
|
+
var toComponent = (item) => {
|
|
273
|
+
return "type" in item ? item : __spreadProps(__spreadValues({}, item), {
|
|
274
|
+
props: __spreadProps(__spreadValues({}, item.props), { id: "root" }),
|
|
275
|
+
type: "root"
|
|
276
|
+
});
|
|
277
|
+
};
|
|
278
|
+
|
|
270
279
|
// lib/data/walk-app-state.ts
|
|
271
280
|
init_react_import();
|
|
272
281
|
|
|
@@ -358,7 +367,7 @@ function walkAppState(state, config, mapContent = (content) => content, mapNodeO
|
|
|
358
367
|
id
|
|
359
368
|
});
|
|
360
369
|
processRelatedZones(item, id, path);
|
|
361
|
-
const newItem = __spreadProps(__spreadValues({},
|
|
370
|
+
const newItem = __spreadProps(__spreadValues({}, mappedItem), { props: newProps });
|
|
362
371
|
const thisZoneCompound = path[path.length - 1];
|
|
363
372
|
const [parentId, zone] = thisZoneCompound ? thisZoneCompound.split(":") : [null, ""];
|
|
364
373
|
newNodeIndex[id] = {
|
|
@@ -398,17 +407,14 @@ function walkAppState(state, config, mapContent = (content) => content, mapNodeO
|
|
|
398
407
|
);
|
|
399
408
|
newZones[zoneCompound] = newContent2;
|
|
400
409
|
}, newZones);
|
|
401
|
-
|
|
402
|
-
{
|
|
403
|
-
type: "root",
|
|
404
|
-
props: __spreadProps(__spreadValues({}, (_a = state.data.root.props) != null ? _a : state.data.root), { id: "root" })
|
|
405
|
-
},
|
|
406
|
-
[],
|
|
407
|
-
-1
|
|
408
|
-
);
|
|
409
|
-
const root = __spreadProps(__spreadValues({}, state.data.root), {
|
|
410
|
-
props: processedRoot.props
|
|
410
|
+
let rootAsComponent = toComponent({
|
|
411
|
+
props: __spreadValues({}, (_a = state.data.root.props) != null ? _a : state.data.root)
|
|
411
412
|
});
|
|
413
|
+
if (state.data.root.readOnly) {
|
|
414
|
+
rootAsComponent.readOnly = state.data.root.readOnly;
|
|
415
|
+
}
|
|
416
|
+
const processedRoot = processItem(rootAsComponent, [], -1);
|
|
417
|
+
const root = __spreadValues(__spreadValues({}, state.data.root), processedRoot);
|
|
412
418
|
return __spreadProps(__spreadValues({}, state), {
|
|
413
419
|
data: {
|
|
414
420
|
root,
|
|
@@ -422,11 +428,6 @@ function walkAppState(state, config, mapContent = (content) => content, mapNodeO
|
|
|
422
428
|
});
|
|
423
429
|
}
|
|
424
430
|
|
|
425
|
-
// lib/generate-id.ts
|
|
426
|
-
init_react_import();
|
|
427
|
-
import { v4 as uuidv4 } from "uuid";
|
|
428
|
-
var generateId = (type) => type ? `${type}-${uuidv4()}` : uuidv4();
|
|
429
|
-
|
|
430
431
|
// lib/data/setup-zone.ts
|
|
431
432
|
init_react_import();
|
|
432
433
|
var setupZone = (data, zoneKey) => {
|
|
@@ -449,8 +450,8 @@ export {
|
|
|
449
450
|
walkField,
|
|
450
451
|
mapFields,
|
|
451
452
|
expandNode,
|
|
453
|
+
toComponent,
|
|
452
454
|
walkAppState,
|
|
453
|
-
generateId,
|
|
454
455
|
walkTree,
|
|
455
456
|
setupZone
|
|
456
457
|
};
|