@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.
Files changed (52) hide show
  1. package/dist/Editor-4LPVLYSU.css +415 -0
  2. package/dist/{Editor-POJT3RA2.mjs → Editor-OSAG52QF.mjs} +10 -10
  3. package/dist/{Render-JNABKPAF.mjs → Render-STFB5CNO.mjs} +1 -1
  4. package/dist/Render-ZTUTUUAH.css +103 -0
  5. package/dist/{actions-CQmL3wwa.d.mts → actions-BDMhAtxP.d.mts} +2 -1
  6. package/dist/{actions-CQmL3wwa.d.ts → actions-BDMhAtxP.d.ts} +2 -1
  7. package/dist/{chunk-KC727YFW.mjs → chunk-6QJ2HF4O.mjs} +1 -1
  8. package/dist/{chunk-IUOWXGYR.mjs → chunk-AAK2555H.mjs} +4 -4
  9. package/dist/{chunk-DCL4UC2H.mjs → chunk-EEQGJ6FH.mjs} +1 -1
  10. package/dist/{chunk-VOLQMQPK.mjs → chunk-IIRJMJFU.mjs} +1 -1
  11. package/dist/{chunk-43G2QHSV.mjs → chunk-JUC25FB7.mjs} +10 -10
  12. package/dist/{chunk-UB2DES2O.mjs → chunk-M4JDRFYB.mjs} +8 -6
  13. package/dist/{chunk-X7IRHSQN.mjs → chunk-RNRHREWH.mjs} +4 -4
  14. package/dist/{chunk-YFRH22NT.mjs → chunk-TI3KC54Y.mjs} +20 -20
  15. package/dist/{chunk-QB3US7UE.mjs → chunk-W5I2Z7QS.mjs} +580 -195
  16. package/dist/{chunk-5N6RK26Z.mjs → chunk-XI7YTBCP.mjs} +1 -1
  17. package/dist/{chunk-JEDWXGVP.mjs → chunk-ZLSPSBV3.mjs} +1 -1
  18. package/dist/full-7ABPY2WA.css +311 -0
  19. package/dist/{full-HZMEMWCN.mjs → full-IHV5BO2L.mjs} +8 -8
  20. package/dist/{index-BOP2qNVA.d.mts → index-BwLKseT7.d.mts} +1 -1
  21. package/dist/{index-_G46lHpL.d.ts → index-DkYXZRPz.d.ts} +1 -1
  22. package/dist/index.css +1268 -1165
  23. package/dist/index.d.mts +35 -8
  24. package/dist/index.d.ts +35 -8
  25. package/dist/index.js +640 -246
  26. package/dist/index.mjs +15 -15
  27. package/dist/internal.d.mts +2 -2
  28. package/dist/internal.d.ts +2 -2
  29. package/dist/internal.js +7 -5
  30. package/dist/internal.mjs +2 -2
  31. package/dist/{loaded-35JQLXSA.mjs → loaded-3NPQWYKN.mjs} +5 -5
  32. package/dist/{loaded-QJMKRN35.mjs → loaded-FTSXIONQ.mjs} +5 -5
  33. package/dist/loaded-N4KWL7FV.css +90 -0
  34. package/dist/{loaded-U6ZILQXM.mjs → loaded-YTQOQIUU.mjs} +5 -5
  35. package/dist/no-external.css +1268 -1165
  36. package/dist/no-external.d.mts +4 -4
  37. package/dist/no-external.d.ts +4 -4
  38. package/dist/no-external.js +640 -246
  39. package/dist/no-external.mjs +15 -15
  40. package/dist/rsc.css +40 -40
  41. package/dist/rsc.d.mts +2 -2
  42. package/dist/rsc.d.ts +2 -2
  43. package/dist/rsc.js +1 -1
  44. package/dist/rsc.mjs +4 -4
  45. package/dist/{walk-tree-DxSkPLnl.d.ts → walk-tree-BweEZ37Y.d.ts} +1 -1
  46. package/dist/{walk-tree-Dwv3c_9M.d.mts → walk-tree-LcQXXDqe.d.mts} +1 -1
  47. package/package.json +2 -1
  48. package/dist/Editor-WYZZDKT3.css +0 -415
  49. package/dist/Render-WBTAN6PO.css +0 -103
  50. package/dist/full-5442HPZH.css +0 -311
  51. package/dist/loaded-KZZU4RNL.css +0 -90
  52. package/dist/{chunk-GAUBBDIR.mjs → chunk-JIXMPJZA.mjs} +37 -37
package/dist/index.mjs CHANGED
@@ -3,7 +3,6 @@ import {
3
3
  Button,
4
4
  ComponentList,
5
5
  Drawer,
6
- DropZone,
7
6
  Editor,
8
7
  FieldLabel,
9
8
  Render,
@@ -18,15 +17,16 @@ import {
18
17
  renderContext,
19
18
  setDeep,
20
19
  useEditor,
21
- useGetEditor
22
- } from "./chunk-QB3US7UE.mjs";
23
- import "./chunk-X7IRHSQN.mjs";
20
+ useGetEditor,
21
+ usePropsContext
22
+ } from "./chunk-W5I2Z7QS.mjs";
23
+ import "./chunk-RNRHREWH.mjs";
24
24
  import {
25
25
  migrate,
26
26
  resolveAllData,
27
27
  transformProps
28
- } from "./chunk-YFRH22NT.mjs";
29
- import "./chunk-KC727YFW.mjs";
28
+ } from "./chunk-TI3KC54Y.mjs";
29
+ import "./chunk-6QJ2HF4O.mjs";
30
30
  import {
31
31
  Action,
32
32
  ActionBar,
@@ -35,17 +35,17 @@ import {
35
35
  Label,
36
36
  RichTextMenu,
37
37
  Separator
38
- } from "./chunk-43G2QHSV.mjs";
39
- import "./chunk-5N6RK26Z.mjs";
40
- import "./chunk-DCL4UC2H.mjs";
41
- import "./chunk-JEDWXGVP.mjs";
42
- import "./chunk-IUOWXGYR.mjs";
43
- import "./chunk-UB2DES2O.mjs";
44
- import "./chunk-VOLQMQPK.mjs";
38
+ } from "./chunk-JUC25FB7.mjs";
39
+ import "./chunk-XI7YTBCP.mjs";
40
+ import "./chunk-EEQGJ6FH.mjs";
41
+ import "./chunk-ZLSPSBV3.mjs";
42
+ import "./chunk-AAK2555H.mjs";
43
+ import "./chunk-M4JDRFYB.mjs";
44
+ import "./chunk-IIRJMJFU.mjs";
45
45
  import "./chunk-Y2EFNT5P.mjs";
46
46
  import {
47
47
  walkTree
48
- } from "./chunk-GAUBBDIR.mjs";
48
+ } from "./chunk-JIXMPJZA.mjs";
49
49
  import {
50
50
  init_react_import
51
51
  } from "./chunk-M6W7YEVX.mjs";
@@ -59,7 +59,6 @@ export {
59
59
  Button,
60
60
  ComponentList,
61
61
  Drawer,
62
- DropZone,
63
62
  Editor,
64
63
  FieldLabel,
65
64
  Group,
@@ -83,5 +82,6 @@ export {
83
82
  transformProps,
84
83
  useEditor,
85
84
  useGetEditor,
85
+ usePropsContext,
86
86
  walkTree
87
87
  };
@@ -1,6 +1,6 @@
1
1
  import { Reducer } from 'react';
2
- import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, E as EditorAction } from './actions-CQmL3wwa.mjs';
3
- import { A as AppStore } from './index-BOP2qNVA.mjs';
2
+ import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, E as EditorAction } from './actions-BDMhAtxP.mjs';
3
+ import { A as AppStore } from './index-BwLKseT7.mjs';
4
4
  import '@tiptap/react';
5
5
  import '@tiptap/extension-blockquote';
6
6
  import '@tiptap/extension-bold';
@@ -1,6 +1,6 @@
1
1
  import { Reducer } from 'react';
2
- import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, E as EditorAction } from './actions-CQmL3wwa.js';
3
- import { A as AppStore } from './index-_G46lHpL.js';
2
+ import { D as Data, A as AppState, O as OnAction, P as PrivateAppState, E as EditorAction } from './actions-BDMhAtxP.js';
3
+ import { A as AppStore } from './index-DkYXZRPz.js';
4
4
  import '@tiptap/react';
5
5
  import '@tiptap/extension-blockquote';
6
6
  import '@tiptap/extension-bold';
package/dist/internal.js CHANGED
@@ -496,12 +496,14 @@ function insertAction(state, action, appStore) {
496
496
  const componentConfig = appStore.config.components[action.componentType];
497
497
  const isGlobalType = (componentConfig == null ? void 0 : componentConfig.global) === true;
498
498
  const defaultProps = (componentConfig == null ? void 0 : componentConfig.defaultProps) || {};
499
+ const sourceData = action.data ? __spreadProps(__spreadValues({}, action.data), { props: __spreadProps(__spreadValues({}, action.data.props), { id }) }) : __spreadValues({
500
+ type: action.componentType,
501
+ props: __spreadProps(__spreadValues({}, defaultProps), { id })
502
+ }, isGlobalType ? { synced: true } : {});
499
503
  const emptyComponentData = populateIds(
500
- __spreadValues({
501
- type: action.componentType,
502
- props: __spreadProps(__spreadValues({}, defaultProps), { id })
503
- }, isGlobalType ? { synced: true } : {}),
504
- appStore.config
504
+ sourceData,
505
+ appStore.config,
506
+ !!action.data
505
507
  );
506
508
  const [parentId] = action.destinationZone.split(":");
507
509
  const idsInPath = getIdsForParent(action.destinationZone, state);
package/dist/internal.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createReducer
3
- } from "./chunk-UB2DES2O.mjs";
4
- import "./chunk-GAUBBDIR.mjs";
3
+ } from "./chunk-M4JDRFYB.mjs";
4
+ import "./chunk-JIXMPJZA.mjs";
5
5
  import {
6
6
  init_react_import
7
7
  } from "./chunk-M6W7YEVX.mjs";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  useHeadingOptions
3
- } from "./chunk-DCL4UC2H.mjs";
3
+ } from "./chunk-EEQGJ6FH.mjs";
4
4
  import {
5
5
  Heading,
6
6
  SelectControl,
7
7
  useControlContext
8
- } from "./chunk-IUOWXGYR.mjs";
9
- import "./chunk-UB2DES2O.mjs";
10
- import "./chunk-VOLQMQPK.mjs";
8
+ } from "./chunk-AAK2555H.mjs";
9
+ import "./chunk-M4JDRFYB.mjs";
10
+ import "./chunk-IIRJMJFU.mjs";
11
11
  import "./chunk-Y2EFNT5P.mjs";
12
- import "./chunk-GAUBBDIR.mjs";
12
+ import "./chunk-JIXMPJZA.mjs";
13
13
  import {
14
14
  init_react_import
15
15
  } from "./chunk-M6W7YEVX.mjs";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  useAlignOptions
3
- } from "./chunk-5N6RK26Z.mjs";
3
+ } from "./chunk-XI7YTBCP.mjs";
4
4
  import {
5
5
  AlignLeft,
6
6
  SelectControl,
7
7
  useControlContext
8
- } from "./chunk-IUOWXGYR.mjs";
9
- import "./chunk-UB2DES2O.mjs";
10
- import "./chunk-VOLQMQPK.mjs";
8
+ } from "./chunk-AAK2555H.mjs";
9
+ import "./chunk-M4JDRFYB.mjs";
10
+ import "./chunk-IIRJMJFU.mjs";
11
11
  import "./chunk-Y2EFNT5P.mjs";
12
- import "./chunk-GAUBBDIR.mjs";
12
+ import "./chunk-JIXMPJZA.mjs";
13
13
  import {
14
14
  init_react_import
15
15
  } from "./chunk-M6W7YEVX.mjs";
@@ -0,0 +1,90 @@
1
+ /* css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Select/styles.module.css/#css-module-data */
2
+ ._Select_1hzg4_1 {
3
+ position: relative;
4
+ z-index: 1;
5
+ }
6
+ ._Select-button_1hzg4_6 {
7
+ align-items: center;
8
+ background: transparent;
9
+ border: none;
10
+ border-radius: var(--editor-radius-sm);
11
+ display: flex;
12
+ justify-content: center;
13
+ gap: 0px;
14
+ height: 100%;
15
+ padding: 4px;
16
+ padding-right: 2px;
17
+ transition: background-color var(--editor-motion-fast) var(--editor-ease), color var(--editor-motion-fast) var(--editor-ease);
18
+ }
19
+ ._Select--hasOptions_1hzg4_21 ._Select-button_1hzg4_6 {
20
+ color: currentColor;
21
+ }
22
+ ._Select--hasOptions_1hzg4_21:not(._Select--disabled_1hzg4_25) ._Select-button_1hzg4_6 {
23
+ cursor: pointer;
24
+ }
25
+ ._Select-buttonIcon_1hzg4_29 {
26
+ align-items: center;
27
+ display: flex;
28
+ justify-content: center;
29
+ }
30
+ ._Select--standalone_1hzg4_35 ._Select-buttonIcon_1hzg4_29 .lucide {
31
+ height: 18px;
32
+ width: 18px;
33
+ }
34
+ ._Select--actionBar_1hzg4_40 ._Select-buttonIcon_1hzg4_29 .lucide {
35
+ height: 16px;
36
+ width: 16px;
37
+ }
38
+ ._Select--hasOptions_1hzg4_21:not(._Select--disabled_1hzg4_25) ._Select-button_1hzg4_6:hover,
39
+ ._Select--hasValue_1hzg4_46 ._Select-button_1hzg4_6 {
40
+ background: var(--editor-surface-hover);
41
+ color: var(--editor-text-accent);
42
+ }
43
+ ._Select--disabled_1hzg4_25 ._Select-button_1hzg4_6 {
44
+ color: var(--editor-text-tertiary);
45
+ }
46
+ ._Select--actionBar_1hzg4_40 {
47
+ &._Select--hasOptions_1hzg4_21 ._Select-button_1hzg4_6:hover,
48
+ &._Select--hasValue_1hzg4_46 ._Select-button_1hzg4_6 {
49
+ background: rgba(255, 255, 255, 0.12);
50
+ color: var(--editor-text-inverse);
51
+ }
52
+ }
53
+ ._Select-items_1hzg4_63 {
54
+ background: var(--editor-surface-panel);
55
+ border: 1px solid var(--editor-border-subtle);
56
+ border-radius: var(--editor-radius-lg);
57
+ box-shadow: var(--editor-shadow-lg);
58
+ margin: 10px 8px;
59
+ margin-left: 0;
60
+ padding: 4px;
61
+ z-index: 2;
62
+ list-style: none;
63
+ }
64
+ ._SelectItem_1hzg4_75 {
65
+ background: transparent;
66
+ border-radius: var(--editor-radius-sm);
67
+ border: none;
68
+ color: var(--editor-text-secondary);
69
+ cursor: pointer;
70
+ display: flex;
71
+ gap: 8px;
72
+ align-items: center;
73
+ font-size: var(--editor-font-size-xxs);
74
+ margin: 0;
75
+ padding: 8px 12px;
76
+ width: 100%;
77
+ transition: background-color var(--editor-motion-fast) var(--editor-ease), color var(--editor-motion-fast) var(--editor-ease);
78
+ }
79
+ ._SelectItem--isSelected_1hzg4_92 {
80
+ background: var(--editor-accent-soft);
81
+ color: var(--editor-text-accent);
82
+ font-weight: 500;
83
+ }
84
+ ._SelectItem--isSelected_1hzg4_92 ._SelectItem-icon_1hzg4_98 {
85
+ color: var(--editor-text-accent);
86
+ }
87
+ ._SelectItem_1hzg4_75:hover {
88
+ background: var(--editor-surface-hover);
89
+ color: var(--editor-text-accent);
90
+ }
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  useListOptions
3
- } from "./chunk-JEDWXGVP.mjs";
3
+ } from "./chunk-ZLSPSBV3.mjs";
4
4
  import {
5
5
  List,
6
6
  SelectControl,
7
7
  useControlContext
8
- } from "./chunk-IUOWXGYR.mjs";
9
- import "./chunk-UB2DES2O.mjs";
10
- import "./chunk-VOLQMQPK.mjs";
8
+ } from "./chunk-AAK2555H.mjs";
9
+ import "./chunk-M4JDRFYB.mjs";
10
+ import "./chunk-IIRJMJFU.mjs";
11
11
  import "./chunk-Y2EFNT5P.mjs";
12
- import "./chunk-GAUBBDIR.mjs";
12
+ import "./chunk-JIXMPJZA.mjs";
13
13
  import {
14
14
  init_react_import
15
15
  } from "./chunk-M6W7YEVX.mjs";