@reacteditor/core 0.0.4 → 0.0.5

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.
Files changed (46) hide show
  1. package/dist/{Editor-2TYODRQT.mjs → Editor-POJT3RA2.mjs} +8 -8
  2. package/dist/{Editor-GBV2O5RD.css → Editor-WYZZDKT3.css} +7 -7
  3. package/dist/{Render-VDC7AEQK.mjs → Render-JNABKPAF.mjs} +1 -1
  4. package/dist/{Render-EFT7YD2C.css → Render-WBTAN6PO.css} +1 -1
  5. package/dist/{actions-BCDhqbeL.d.mts → actions-CQmL3wwa.d.mts} +11 -6
  6. package/dist/{actions-BCDhqbeL.d.ts → actions-CQmL3wwa.d.ts} +11 -6
  7. package/dist/{chunk-6Q6A3BQH.mjs → chunk-43G2QHSV.mjs} +12 -12
  8. package/dist/{chunk-HMTHZBH6.mjs → chunk-5N6RK26Z.mjs} +1 -1
  9. package/dist/{chunk-ZHNRSSMW.mjs → chunk-DCL4UC2H.mjs} +1 -1
  10. package/dist/{chunk-2LVYDXZS.mjs → chunk-IUOWXGYR.mjs} +2 -2
  11. package/dist/{chunk-M2RKJTNY.mjs → chunk-JEDWXGVP.mjs} +1 -1
  12. package/dist/{chunk-MFI3RDA4.mjs → chunk-KC727YFW.mjs} +1 -1
  13. package/dist/{chunk-D2RG73WI.mjs → chunk-QB3US7UE.mjs} +148 -121
  14. package/dist/{chunk-VUEM62JF.mjs → chunk-UB2DES2O.mjs} +17 -6
  15. package/dist/{chunk-TCVU3WEN.mjs → chunk-X7IRHSQN.mjs} +4 -4
  16. package/dist/{chunk-VD3EVRUF.mjs → chunk-YFRH22NT.mjs} +2 -2
  17. package/dist/{full-ELX6RALJ.css → full-5442HPZH.css} +6 -6
  18. package/dist/{full-7KJICNR5.mjs → full-HZMEMWCN.mjs} +6 -6
  19. package/dist/{index-DVwiIwYU.d.mts → index-BOP2qNVA.d.mts} +1 -1
  20. package/dist/{index-ComBHfdn.d.ts → index-_G46lHpL.d.ts} +1 -1
  21. package/dist/index.css +93 -92
  22. package/dist/index.d.mts +11 -20
  23. package/dist/index.d.ts +11 -20
  24. package/dist/index.js +185 -147
  25. package/dist/index.mjs +10 -10
  26. package/dist/internal.d.mts +2 -2
  27. package/dist/internal.d.ts +2 -2
  28. package/dist/internal.js +17 -6
  29. package/dist/internal.mjs +1 -1
  30. package/dist/{loaded-IJNA4SY5.mjs → loaded-35JQLXSA.mjs} +3 -3
  31. package/dist/{loaded-TBSVRJPY.css → loaded-KZZU4RNL.css} +1 -1
  32. package/dist/{loaded-CBJRWD4Z.mjs → loaded-QJMKRN35.mjs} +3 -3
  33. package/dist/{loaded-DGSPK47E.mjs → loaded-U6ZILQXM.mjs} +3 -3
  34. package/dist/no-external.css +93 -92
  35. package/dist/no-external.d.mts +4 -4
  36. package/dist/no-external.d.ts +4 -4
  37. package/dist/no-external.js +185 -147
  38. package/dist/no-external.mjs +10 -10
  39. package/dist/rsc.css +1 -1
  40. package/dist/rsc.d.mts +2 -2
  41. package/dist/rsc.d.ts +2 -2
  42. package/dist/rsc.js +4 -4
  43. package/dist/rsc.mjs +2 -2
  44. package/dist/{walk-tree-BPIigVTF.d.mts → walk-tree-Dwv3c_9M.d.mts} +1 -1
  45. package/dist/{walk-tree-BZq1CPCH.d.ts → walk-tree-DxSkPLnl.d.ts} +1 -1
  46. package/package.json +1 -1
@@ -4,17 +4,17 @@ import {
4
4
  import {
5
5
  EditorInner,
6
6
  LoadedRichTextMenu
7
- } from "./chunk-TCVU3WEN.mjs";
8
- import "./chunk-MFI3RDA4.mjs";
9
- import "./chunk-6Q6A3BQH.mjs";
10
- import "./chunk-HMTHZBH6.mjs";
11
- import "./chunk-ZHNRSSMW.mjs";
12
- import "./chunk-M2RKJTNY.mjs";
7
+ } from "./chunk-X7IRHSQN.mjs";
8
+ import "./chunk-KC727YFW.mjs";
9
+ import "./chunk-43G2QHSV.mjs";
10
+ import "./chunk-5N6RK26Z.mjs";
11
+ import "./chunk-DCL4UC2H.mjs";
12
+ import "./chunk-JEDWXGVP.mjs";
13
13
  import {
14
14
  useAppStore,
15
15
  useAppStoreApi
16
- } from "./chunk-2LVYDXZS.mjs";
17
- import "./chunk-VUEM62JF.mjs";
16
+ } from "./chunk-IUOWXGYR.mjs";
17
+ import "./chunk-UB2DES2O.mjs";
18
18
  import "./chunk-VOLQMQPK.mjs";
19
19
  import "./chunk-Y2EFNT5P.mjs";
20
20
  import "./chunk-GAUBBDIR.mjs";
@@ -1,4 +1,4 @@
1
- /* css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/RichTextMenu/styles.module.css/#css-module-data */
1
+ /* css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/RichTextMenu/styles.module.css/#css-module-data */
2
2
  ._RichTextMenu_7muaf_1 {
3
3
  display: flex;
4
4
  flex-direction: row;
@@ -41,7 +41,7 @@
41
41
  border-left: 0.5px solid rgba(255, 255, 255, 0.2);
42
42
  }
43
43
 
44
- /* css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/IconButton/IconButton.module.css/#css-module-data */
44
+ /* css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/IconButton/IconButton.module.css/#css-module-data */
45
45
  ._IconButton_19x6h_1 {
46
46
  align-items: center;
47
47
  background: transparent;
@@ -87,7 +87,7 @@
87
87
  color: var(--re-text-tertiary);
88
88
  }
89
89
 
90
- /* css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/Loader/styles.module.css/#css-module-data */
90
+ /* css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Loader/styles.module.css/#css-module-data */
91
91
  @keyframes _loader-animation_nacdm_1 {
92
92
  0% {
93
93
  transform: rotate(0deg) scale(1);
@@ -109,7 +109,7 @@
109
109
  animation-fill-mode: both;
110
110
  }
111
111
 
112
- /* css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/ActionBar/styles.module.css/#css-module-data */
112
+ /* css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/ActionBar/styles.module.css/#css-module-data */
113
113
  ._ActionBar_5kf61_1 {
114
114
  align-items: center;
115
115
  cursor: default;
@@ -209,7 +209,7 @@
209
209
  height: 100%;
210
210
  }
211
211
 
212
- /* css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/RichTextMenu/components/Control/styles.module.css/#css-module-data */
212
+ /* css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/RichTextMenu/components/Control/styles.module.css/#css-module-data */
213
213
  ._Control_1aveu_1 .lucide {
214
214
  height: 18px;
215
215
  width: 18px;
@@ -219,7 +219,7 @@
219
219
  width: 16px;
220
220
  }
221
221
 
222
- /* css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/Select/styles.module.css/#css-module-data */
222
+ /* css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Select/styles.module.css/#css-module-data */
223
223
  ._Select_6nen1_1 {
224
224
  position: relative;
225
225
  z-index: 1;
@@ -310,7 +310,7 @@
310
310
  color: var(--re-text-accent);
311
311
  }
312
312
 
313
- /* css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/RichTextEditor/styles.module.css/#css-module-data */
313
+ /* css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/RichTextEditor/styles.module.css/#css-module-data */
314
314
  ._RichTextEditor_1grt5_1 .ProseMirror {
315
315
  white-space: pre-wrap;
316
316
  word-wrap: break-word;
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-2YLS65V2.mjs";
4
4
  import {
5
5
  styles_module_default
6
- } from "./chunk-MFI3RDA4.mjs";
6
+ } from "./chunk-KC727YFW.mjs";
7
7
  import {
8
8
  get_class_name_factory_default
9
9
  } from "./chunk-Y2EFNT5P.mjs";
@@ -1,4 +1,4 @@
1
- /* css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/RichTextEditor/styles.module.css/#css-module-data */
1
+ /* css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/RichTextEditor/styles.module.css/#css-module-data */
2
2
  ._RichTextEditor_1grt5_1 .ProseMirror {
3
3
  white-space: pre-wrap;
4
4
  word-wrap: break-word;
@@ -414,12 +414,12 @@ UserField extends BaseField = {}> = {
414
414
  permissions?: Partial<Permissions>;
415
415
  inline?: boolean;
416
416
  /**
417
- * When true, every instance of this component type renders from the shared
418
- * `globalData[type].props` instead of its own props. The `children` slot is
419
- * always extrinsic (supplied by the instance / parent), matching React
420
- * conventions and enabling the "AppShell wraps a page" pattern. Marking a
421
- * component global is a developer decision that has data-migration
422
- * implications; it is not editable from the UI.
417
+ * When true, instances of this component type can opt into rendering from
418
+ * the shared `data.globals[type].props` slot instead of their own props.
419
+ * Newly inserted instances default to `synced: true`; users can detach an
420
+ * instance via the field panel toggle, which sets `synced: false` and
421
+ * keeps its props local. Children stay extrinsic, matching React
422
+ * conventions and enabling the "AppShell wraps a page" pattern.
423
423
  */
424
424
  global?: boolean;
425
425
  resolveFields?: (data: DataShape, params: {
@@ -510,12 +510,14 @@ type RootData<Props extends DefaultComponentProps = DefaultRootFieldProps> = Par
510
510
  type ComponentData<Props extends DefaultComponentProps = DefaultComponentProps, Name = string, Components extends Record<string, DefaultComponentProps> = Record<string, DefaultComponentProps>> = {
511
511
  type: Name;
512
512
  props: WithDeepSlots<WithId<Props>, Content<Components>>;
513
+ synced?: boolean;
513
514
  } & BaseData<Props>;
514
515
  type ComponentDataOptionalId<Props extends DefaultComponentProps = DefaultComponentProps, Name = string> = {
515
516
  type: Name;
516
517
  props: Props & {
517
518
  id?: string;
518
519
  };
520
+ synced?: boolean;
519
521
  } & BaseData<Props>;
520
522
  type MappedItem = ComponentData;
521
523
  type ComponentDataMap<Components extends DefaultComponents = DefaultComponents> = {
@@ -530,6 +532,9 @@ type Data<Components extends DefaultComponents = DefaultComponents, RootProps ex
530
532
  root: WithDeepSlots<RootData<RootProps>, Content<Components>>;
531
533
  content: Content<Components>;
532
534
  zones?: Record<string, Content<Components>>;
535
+ globals?: Record<string, {
536
+ props: Record<string, any>;
537
+ }>;
533
538
  };
534
539
  type Metadata = {
535
540
  [key: string]: any;
@@ -414,12 +414,12 @@ UserField extends BaseField = {}> = {
414
414
  permissions?: Partial<Permissions>;
415
415
  inline?: boolean;
416
416
  /**
417
- * When true, every instance of this component type renders from the shared
418
- * `globalData[type].props` instead of its own props. The `children` slot is
419
- * always extrinsic (supplied by the instance / parent), matching React
420
- * conventions and enabling the "AppShell wraps a page" pattern. Marking a
421
- * component global is a developer decision that has data-migration
422
- * implications; it is not editable from the UI.
417
+ * When true, instances of this component type can opt into rendering from
418
+ * the shared `data.globals[type].props` slot instead of their own props.
419
+ * Newly inserted instances default to `synced: true`; users can detach an
420
+ * instance via the field panel toggle, which sets `synced: false` and
421
+ * keeps its props local. Children stay extrinsic, matching React
422
+ * conventions and enabling the "AppShell wraps a page" pattern.
423
423
  */
424
424
  global?: boolean;
425
425
  resolveFields?: (data: DataShape, params: {
@@ -510,12 +510,14 @@ type RootData<Props extends DefaultComponentProps = DefaultRootFieldProps> = Par
510
510
  type ComponentData<Props extends DefaultComponentProps = DefaultComponentProps, Name = string, Components extends Record<string, DefaultComponentProps> = Record<string, DefaultComponentProps>> = {
511
511
  type: Name;
512
512
  props: WithDeepSlots<WithId<Props>, Content<Components>>;
513
+ synced?: boolean;
513
514
  } & BaseData<Props>;
514
515
  type ComponentDataOptionalId<Props extends DefaultComponentProps = DefaultComponentProps, Name = string> = {
515
516
  type: Name;
516
517
  props: Props & {
517
518
  id?: string;
518
519
  };
520
+ synced?: boolean;
519
521
  } & BaseData<Props>;
520
522
  type MappedItem = ComponentData;
521
523
  type ComponentDataMap<Components extends DefaultComponents = DefaultComponents> = {
@@ -530,6 +532,9 @@ type Data<Components extends DefaultComponents = DefaultComponents, RootProps ex
530
532
  root: WithDeepSlots<RootData<RootProps>, Content<Components>>;
531
533
  content: Content<Components>;
532
534
  zones?: Record<string, Content<Components>>;
535
+ globals?: Record<string, {
536
+ props: Record<string, any>;
537
+ }>;
533
538
  };
534
539
  type Metadata = {
535
540
  [key: string]: any;
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  useAlignOptions
3
- } from "./chunk-HMTHZBH6.mjs";
3
+ } from "./chunk-5N6RK26Z.mjs";
4
4
  import {
5
5
  useHeadingOptions
6
- } from "./chunk-ZHNRSSMW.mjs";
6
+ } from "./chunk-DCL4UC2H.mjs";
7
7
  import {
8
8
  useListOptions
9
- } from "./chunk-M2RKJTNY.mjs";
9
+ } from "./chunk-JEDWXGVP.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-2LVYDXZS.mjs";
29
+ } from "./chunk-IUOWXGYR.mjs";
30
30
  import {
31
31
  get_class_name_factory_default
32
32
  } from "./chunk-Y2EFNT5P.mjs";
@@ -39,7 +39,7 @@ import {
39
39
  // components/ActionBar/index.tsx
40
40
  init_react_import();
41
41
 
42
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/ActionBar/styles.module.css#css-module
42
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/ActionBar/styles.module.css#css-module
43
43
  init_react_import();
44
44
  var styles_module_default = { "ActionBar": "_ActionBar_5kf61_1", "ActionBar-label": "_ActionBar-label_5kf61_19", "ActionBarAction": "_ActionBarAction_5kf61_32", "ActionBar-group": "_ActionBar-group_5kf61_40", "ActionBarAction--disabled": "_ActionBarAction--disabled_5kf61_75", "ActionBarAction--active": "_ActionBarAction--active_5kf61_98", "ActionBar-separator": "_ActionBar-separator_5kf61_108" };
45
45
 
@@ -93,14 +93,14 @@ ActionBar.Separator = Separator;
93
93
  init_react_import();
94
94
  import { useState } from "react";
95
95
 
96
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/IconButton/IconButton.module.css#css-module
96
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/IconButton/IconButton.module.css#css-module
97
97
  init_react_import();
98
98
  var IconButton_module_default = { "IconButton": "_IconButton_19x6h_1", "IconButton--active": "_IconButton--active_19x6h_15", "IconButton--disabled": "_IconButton--disabled_19x6h_26", "IconButton-title": "_IconButton-title_19x6h_39" };
99
99
 
100
100
  // components/Loader/index.tsx
101
101
  init_react_import();
102
102
 
103
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/Loader/styles.module.css#css-module
103
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Loader/styles.module.css#css-module
104
104
  init_react_import();
105
105
  var styles_module_default2 = { "Loader": "_Loader_nacdm_13", "loader-animation": "_loader-animation_nacdm_1" };
106
106
 
@@ -186,7 +186,7 @@ var IconButton = ({
186
186
  // components/RichTextMenu/inner.tsx
187
187
  init_react_import();
188
188
 
189
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/RichTextMenu/styles.module.css#css-module
189
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/RichTextMenu/styles.module.css#css-module
190
190
  init_react_import();
191
191
  var styles_module_default3 = { "RichTextMenu": "_RichTextMenu_7muaf_1", "RichTextMenu--form": "_RichTextMenu--form_7muaf_7", "RichTextMenu-group": "_RichTextMenu-group_7muaf_17", "RichTextMenu--inline": "_RichTextMenu--inline_7muaf_35" };
192
192
 
@@ -205,7 +205,7 @@ init_react_import();
205
205
  // components/IconButton/index.ts
206
206
  init_react_import();
207
207
 
208
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/RichTextMenu/components/Control/styles.module.css#css-module
208
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/RichTextMenu/components/Control/styles.module.css#css-module
209
209
  init_react_import();
210
210
  var styles_module_default4 = { "Control": "_Control_1aveu_1", "Control--inline": "_Control--inline_1aveu_6" };
211
211
 
@@ -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-CBJRWD4Z.mjs").then((m) => ({
352
+ () => import("./loaded-QJMKRN35.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-IJNA4SY5.mjs").then((m) => ({
583
+ () => import("./loaded-35JQLXSA.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-DGSPK47E.mjs").then((m) => ({
615
+ () => import("./loaded-U6ZILQXM.mjs").then((m) => ({
616
616
  default: m.ListSelectLoaded
617
617
  }))
618
618
  );
@@ -3,7 +3,7 @@ import {
3
3
  AlignJustify,
4
4
  AlignLeft,
5
5
  AlignRight
6
- } from "./chunk-2LVYDXZS.mjs";
6
+ } from "./chunk-IUOWXGYR.mjs";
7
7
  import {
8
8
  init_react_import
9
9
  } from "./chunk-M6W7YEVX.mjs";
@@ -5,7 +5,7 @@ import {
5
5
  Heading4,
6
6
  Heading5,
7
7
  Heading6
8
- } from "./chunk-2LVYDXZS.mjs";
8
+ } from "./chunk-IUOWXGYR.mjs";
9
9
  import {
10
10
  init_react_import
11
11
  } from "./chunk-M6W7YEVX.mjs";
@@ -2,7 +2,7 @@ import {
2
2
  createReducer,
3
3
  getItem,
4
4
  makeStatePublic
5
- } from "./chunk-VUEM62JF.mjs";
5
+ } from "./chunk-UB2DES2O.mjs";
6
6
  import {
7
7
  defaultAppState,
8
8
  defaultViewports,
@@ -1332,7 +1332,7 @@ import { useMemo } from "react";
1332
1332
  // components/Select/index.tsx
1333
1333
  init_react_import();
1334
1334
 
1335
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/Select/styles.module.css#css-module
1335
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Select/styles.module.css#css-module
1336
1336
  init_react_import();
1337
1337
  var styles_module_default = { "Select": "_Select_6nen1_1", "Select-button": "_Select-button_6nen1_6", "Select--hasOptions": "_Select--hasOptions_6nen1_21", "Select--disabled": "_Select--disabled_6nen1_25", "Select-buttonIcon": "_Select-buttonIcon_6nen1_29", "Select--standalone": "_Select--standalone_6nen1_35", "Select--actionBar": "_Select--actionBar_6nen1_40", "Select--hasValue": "_Select--hasValue_6nen1_46", "Select-items": "_Select-items_6nen1_63", "SelectItem": "_SelectItem_6nen1_75", "SelectItem--isSelected": "_SelectItem--isSelected_6nen1_92", "SelectItem-icon": "_SelectItem-icon_6nen1_98" };
1338
1338
 
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  List,
3
3
  ListOrdered
4
- } from "./chunk-2LVYDXZS.mjs";
4
+ } from "./chunk-IUOWXGYR.mjs";
5
5
  import {
6
6
  init_react_import
7
7
  } from "./chunk-M6W7YEVX.mjs";
@@ -2,7 +2,7 @@ import {
2
2
  init_react_import
3
3
  } from "./chunk-M6W7YEVX.mjs";
4
4
 
5
- // css-module:/Users/rami/Documents/apps/frontend-react-editor/packages/core/components/RichTextEditor/styles.module.css#css-module
5
+ // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/RichTextEditor/styles.module.css#css-module
6
6
  init_react_import();
7
7
  var styles_module_default = { "RichTextEditor": "_RichTextEditor_1grt5_1", "RichTextEditor--editor": "_RichTextEditor--editor_1grt5_50", "RichTextEditor--disabled": "_RichTextEditor--disabled_1grt5_109", "RichTextEditor--isActive": "_RichTextEditor--isActive_1grt5_113", "RichTextEditor-menu": "_RichTextEditor-menu_1grt5_119" };
8
8