@reacteditor/core 0.0.5 → 0.0.7
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/Editor-4LPVLYSU.css +415 -0
- package/dist/{Editor-POJT3RA2.mjs → Editor-OSAG52QF.mjs} +10 -10
- package/dist/{Render-JNABKPAF.mjs → Render-STFB5CNO.mjs} +1 -1
- package/dist/Render-ZTUTUUAH.css +103 -0
- package/dist/{actions-CQmL3wwa.d.mts → actions-BDMhAtxP.d.mts} +2 -1
- package/dist/{actions-CQmL3wwa.d.ts → actions-BDMhAtxP.d.ts} +2 -1
- package/dist/{chunk-KC727YFW.mjs → chunk-6QJ2HF4O.mjs} +1 -1
- package/dist/{chunk-IUOWXGYR.mjs → chunk-AAK2555H.mjs} +4 -4
- package/dist/{chunk-DCL4UC2H.mjs → chunk-EEQGJ6FH.mjs} +1 -1
- package/dist/{chunk-VOLQMQPK.mjs → chunk-IIRJMJFU.mjs} +1 -1
- package/dist/{chunk-43G2QHSV.mjs → chunk-JUC25FB7.mjs} +10 -10
- package/dist/{chunk-UB2DES2O.mjs → chunk-M4JDRFYB.mjs} +8 -6
- package/dist/{chunk-X7IRHSQN.mjs → chunk-RNRHREWH.mjs} +4 -4
- package/dist/{chunk-YFRH22NT.mjs → chunk-TI3KC54Y.mjs} +20 -20
- package/dist/{chunk-QB3US7UE.mjs → chunk-W5I2Z7QS.mjs} +580 -195
- package/dist/{chunk-5N6RK26Z.mjs → chunk-XI7YTBCP.mjs} +1 -1
- package/dist/{chunk-JEDWXGVP.mjs → chunk-ZLSPSBV3.mjs} +1 -1
- package/dist/full-7ABPY2WA.css +311 -0
- package/dist/{full-HZMEMWCN.mjs → full-IHV5BO2L.mjs} +8 -8
- package/dist/{index-BOP2qNVA.d.mts → index-BwLKseT7.d.mts} +1 -1
- package/dist/{index-_G46lHpL.d.ts → index-DkYXZRPz.d.ts} +1 -1
- package/dist/index.css +1268 -1165
- package/dist/index.d.mts +35 -8
- package/dist/index.d.ts +35 -8
- package/dist/index.js +640 -246
- package/dist/index.mjs +15 -15
- package/dist/internal.d.mts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +7 -5
- package/dist/internal.mjs +2 -2
- package/dist/{loaded-35JQLXSA.mjs → loaded-3NPQWYKN.mjs} +5 -5
- package/dist/{loaded-QJMKRN35.mjs → loaded-FTSXIONQ.mjs} +5 -5
- package/dist/loaded-N4KWL7FV.css +90 -0
- package/dist/{loaded-U6ZILQXM.mjs → loaded-YTQOQIUU.mjs} +5 -5
- package/dist/no-external.css +1268 -1165
- package/dist/no-external.d.mts +4 -4
- package/dist/no-external.d.ts +4 -4
- package/dist/no-external.js +640 -246
- package/dist/no-external.mjs +15 -15
- package/dist/rsc.css +40 -40
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +1 -1
- package/dist/rsc.mjs +4 -4
- package/dist/{walk-tree-DxSkPLnl.d.ts → walk-tree-BweEZ37Y.d.ts} +1 -1
- package/dist/{walk-tree-Dwv3c_9M.d.mts → walk-tree-LcQXXDqe.d.mts} +1 -1
- package/package.json +2 -1
- package/dist/Editor-WYZZDKT3.css +0 -415
- package/dist/Render-WBTAN6PO.css +0 -103
- package/dist/full-5442HPZH.css +0 -311
- package/dist/loaded-KZZU4RNL.css +0 -90
- package/dist/{chunk-GAUBBDIR.mjs → chunk-JIXMPJZA.mjs} +37 -37
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useAlignOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XI7YTBCP.mjs";
|
|
4
4
|
import {
|
|
5
5
|
useHeadingOptions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EEQGJ6FH.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useListOptions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZLSPSBV3.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-AAK2555H.mjs";
|
|
30
30
|
import {
|
|
31
31
|
get_class_name_factory_default
|
|
32
32
|
} from "./chunk-Y2EFNT5P.mjs";
|
|
@@ -41,7 +41,7 @@ init_react_import();
|
|
|
41
41
|
|
|
42
42
|
// css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/ActionBar/styles.module.css#css-module
|
|
43
43
|
init_react_import();
|
|
44
|
-
var styles_module_default = { "ActionBar": "
|
|
44
|
+
var styles_module_default = { "ActionBar": "_ActionBar_15hub_1", "ActionBar-label": "_ActionBar-label_15hub_19", "ActionBarAction": "_ActionBarAction_15hub_32", "ActionBar-group": "_ActionBar-group_15hub_40", "ActionBarAction--disabled": "_ActionBarAction--disabled_15hub_75", "ActionBarAction--active": "_ActionBarAction--active_15hub_98", "ActionBar-separator": "_ActionBar-separator_15hub_108" };
|
|
45
45
|
|
|
46
46
|
// components/ActionBar/index.tsx
|
|
47
47
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -95,7 +95,7 @@ import { useState } from "react";
|
|
|
95
95
|
|
|
96
96
|
// css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/IconButton/IconButton.module.css#css-module
|
|
97
97
|
init_react_import();
|
|
98
|
-
var IconButton_module_default = { "IconButton": "
|
|
98
|
+
var IconButton_module_default = { "IconButton": "_IconButton_3u943_1", "IconButton--active": "_IconButton--active_3u943_15", "IconButton--disabled": "_IconButton--disabled_3u943_26", "IconButton-title": "_IconButton-title_3u943_39" };
|
|
99
99
|
|
|
100
100
|
// components/Loader/index.tsx
|
|
101
101
|
init_react_import();
|
|
@@ -188,7 +188,7 @@ init_react_import();
|
|
|
188
188
|
|
|
189
189
|
// css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/RichTextMenu/styles.module.css#css-module
|
|
190
190
|
init_react_import();
|
|
191
|
-
var styles_module_default3 = { "RichTextMenu": "
|
|
191
|
+
var styles_module_default3 = { "RichTextMenu": "_RichTextMenu_1l3cr_1", "RichTextMenu--form": "_RichTextMenu--form_1l3cr_7", "RichTextMenu-group": "_RichTextMenu-group_1l3cr_17", "RichTextMenu--inline": "_RichTextMenu--inline_1l3cr_35" };
|
|
192
192
|
|
|
193
193
|
// components/RichTextMenu/inner.tsx
|
|
194
194
|
import { useMemo } from "react";
|
|
@@ -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-FTSXIONQ.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-3NPQWYKN.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-YTQOQIUU.mjs").then((m) => ({
|
|
616
616
|
default: m.ListSelectLoaded
|
|
617
617
|
}))
|
|
618
618
|
);
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
setupZone,
|
|
5
5
|
walkAppState,
|
|
6
6
|
walkTree
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JIXMPJZA.mjs";
|
|
8
8
|
import {
|
|
9
9
|
__spreadProps,
|
|
10
10
|
__spreadValues,
|
|
@@ -74,12 +74,14 @@ function insertAction(state, action, appStore) {
|
|
|
74
74
|
const componentConfig = appStore.config.components[action.componentType];
|
|
75
75
|
const isGlobalType = (componentConfig == null ? void 0 : componentConfig.global) === true;
|
|
76
76
|
const defaultProps = (componentConfig == null ? void 0 : componentConfig.defaultProps) || {};
|
|
77
|
+
const sourceData = action.data ? __spreadProps(__spreadValues({}, action.data), { props: __spreadProps(__spreadValues({}, action.data.props), { id }) }) : __spreadValues({
|
|
78
|
+
type: action.componentType,
|
|
79
|
+
props: __spreadProps(__spreadValues({}, defaultProps), { id })
|
|
80
|
+
}, isGlobalType ? { synced: true } : {});
|
|
77
81
|
const emptyComponentData = populateIds(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}, isGlobalType ? { synced: true } : {}),
|
|
82
|
-
appStore.config
|
|
82
|
+
sourceData,
|
|
83
|
+
appStore.config,
|
|
84
|
+
!!action.data
|
|
83
85
|
);
|
|
84
86
|
const [parentId] = action.destinationZone.split(":");
|
|
85
87
|
const idsInPath = getIdsForParent(action.destinationZone, state);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
styles_module_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6QJ2HF4O.mjs";
|
|
4
4
|
import {
|
|
5
5
|
LoadedRichTextMenuInner
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JUC25FB7.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useAppStore,
|
|
9
9
|
useAppStoreApi
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AAK2555H.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-IHV5BO2L.mjs").then((m) => ({
|
|
104
104
|
default: m.LoadedRichTextMenuFull
|
|
105
105
|
}))
|
|
106
106
|
);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
styles_module_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6QJ2HF4O.mjs";
|
|
4
4
|
import {
|
|
5
5
|
defaultAppState,
|
|
6
6
|
resolveComponentData
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IIRJMJFU.mjs";
|
|
8
8
|
import {
|
|
9
9
|
get_class_name_factory_default
|
|
10
10
|
} from "./chunk-Y2EFNT5P.mjs";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
toComponent,
|
|
16
16
|
walkAppState,
|
|
17
17
|
walkTree
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-JIXMPJZA.mjs";
|
|
19
19
|
import {
|
|
20
20
|
__async,
|
|
21
21
|
__objRest,
|
|
@@ -263,22 +263,6 @@ function resolveAllData(_0, _1) {
|
|
|
263
263
|
});
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
// lib/field-transforms/default-transforms/slot-transform.tsx
|
|
267
|
-
init_react_import();
|
|
268
|
-
var getSlotTransform = (renderSlotEdit, renderSlotRender = renderSlotEdit) => ({
|
|
269
|
-
slot: ({ value: content, propName, field, isReadOnly }) => {
|
|
270
|
-
const render = isReadOnly ? renderSlotRender : renderSlotEdit;
|
|
271
|
-
const Slot = (dzProps) => render(__spreadProps(__spreadValues({
|
|
272
|
-
allow: (field == null ? void 0 : field.type) === "slot" ? field.allow : [],
|
|
273
|
-
disallow: (field == null ? void 0 : field.type) === "slot" ? field.disallow : []
|
|
274
|
-
}, dzProps), {
|
|
275
|
-
zone: propName,
|
|
276
|
-
content
|
|
277
|
-
}));
|
|
278
|
-
return Slot;
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
|
|
282
266
|
// lib/use-slots.tsx
|
|
283
267
|
init_react_import();
|
|
284
268
|
|
|
@@ -326,6 +310,22 @@ function useFieldTransforms(config, item, transforms, readOnly, forceReadOnly) {
|
|
|
326
310
|
return mergedProps;
|
|
327
311
|
}
|
|
328
312
|
|
|
313
|
+
// lib/field-transforms/default-transforms/slot-transform.tsx
|
|
314
|
+
init_react_import();
|
|
315
|
+
var getSlotTransform = (renderSlotEdit, renderSlotRender = renderSlotEdit) => ({
|
|
316
|
+
slot: ({ value: content, propName, field, isReadOnly }) => {
|
|
317
|
+
const render = isReadOnly ? renderSlotRender : renderSlotEdit;
|
|
318
|
+
const Slot = (dzProps) => render(__spreadProps(__spreadValues({
|
|
319
|
+
allow: (field == null ? void 0 : field.type) === "slot" ? field.allow : [],
|
|
320
|
+
disallow: (field == null ? void 0 : field.type) === "slot" ? field.disallow : []
|
|
321
|
+
}, dzProps), {
|
|
322
|
+
zone: propName,
|
|
323
|
+
content
|
|
324
|
+
}));
|
|
325
|
+
return Slot;
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
|
|
329
329
|
// lib/use-slots.tsx
|
|
330
330
|
function useSlots(config, item, renderSlotEdit, renderSlotRender = renderSlotEdit, readOnly, forceReadOnly) {
|
|
331
331
|
return useFieldTransforms(
|
|
@@ -400,7 +400,7 @@ function useRichtextProps(fields, props) {
|
|
|
400
400
|
const richtextProps = useMemo2(() => {
|
|
401
401
|
if (!(richtextKeys == null ? void 0 : richtextKeys.length)) return {};
|
|
402
402
|
const RichTextRender = lazy(
|
|
403
|
-
() => import("./Render-
|
|
403
|
+
() => import("./Render-STFB5CNO.mjs").then((m) => ({
|
|
404
404
|
default: m.RichTextRender
|
|
405
405
|
}))
|
|
406
406
|
);
|