@reacteditor/core 0.0.17 → 0.0.19

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.
@@ -4,16 +4,16 @@ import {
4
4
  import {
5
5
  EditorInner,
6
6
  LoadedRichTextMenu
7
- } from "./chunk-2A2HBRLV.mjs";
8
- import "./chunk-OAOKQORI.mjs";
9
- import "./chunk-CUGSM3PC.mjs";
7
+ } from "./chunk-BORTMJJZ.mjs";
8
+ import "./chunk-MVJENRGK.mjs";
9
+ import "./chunk-M36T7BWB.mjs";
10
10
  import "./chunk-6QJ2HF4O.mjs";
11
- import "./chunk-ESU6AYGB.mjs";
12
- import "./chunk-C5G7WUBQ.mjs";
11
+ import "./chunk-PGSQPCM6.mjs";
12
+ import "./chunk-DKFLK64M.mjs";
13
13
  import {
14
14
  useAppStore,
15
15
  useAppStoreApi
16
- } from "./chunk-NUBRSWFJ.mjs";
16
+ } from "./chunk-MUBFR675.mjs";
17
17
  import "./chunk-M4JDRFYB.mjs";
18
18
  import "./chunk-FTVOCMGV.mjs";
19
19
  import "./chunk-DQU3HIP4.mjs";
@@ -88,25 +88,19 @@
88
88
  }
89
89
 
90
90
  /* css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Loader/styles.module.css/#css-module-data */
91
- @keyframes _loader-animation_nacdm_1 {
92
- 0% {
93
- transform: rotate(0deg) scale(1);
91
+ @keyframes _loader-spin_6933g_1 {
92
+ from {
93
+ transform: rotate(0deg);
94
94
  }
95
- 50% {
96
- transform: rotate(180deg) scale(0.8);
97
- }
98
- 100% {
99
- transform: rotate(360deg) scale(1);
95
+ to {
96
+ transform: rotate(360deg);
100
97
  }
101
98
  }
102
- ._Loader_nacdm_13 {
103
- background: transparent;
104
- border-radius: 100%;
105
- border: 2px solid currentColor;
106
- border-bottom-color: transparent;
107
- display: inline-block;
108
- animation: _loader-animation_nacdm_1 1s 0s infinite linear;
109
- animation-fill-mode: both;
99
+ ._Loader_6933g_10 {
100
+ display: inline-flex;
101
+ align-items: center;
102
+ justify-content: center;
103
+ animation: _loader-spin_6933g_1 1s linear infinite;
110
104
  }
111
105
 
112
106
  /* css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/ActionBar/styles.module.css/#css-module-data */
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  LoadedRichTextMenuInner
3
- } from "./chunk-OAOKQORI.mjs";
3
+ } from "./chunk-MVJENRGK.mjs";
4
4
  import {
5
5
  styles_module_default
6
6
  } from "./chunk-6QJ2HF4O.mjs";
7
7
  import {
8
8
  useAppStore,
9
9
  useAppStoreApi
10
- } from "./chunk-NUBRSWFJ.mjs";
10
+ } from "./chunk-MUBFR675.mjs";
11
11
  import {
12
12
  get_class_name_factory_default
13
13
  } from "./chunk-DQU3HIP4.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-35622JEC.mjs").then((m) => ({
103
+ () => import("./full-QWTPWHXQ.mjs").then((m) => ({
104
104
  default: m.LoadedRichTextMenuFull
105
105
  }))
106
106
  );
@@ -5,7 +5,7 @@ import {
5
5
  Heading4,
6
6
  Heading5,
7
7
  Heading6
8
- } from "./chunk-NUBRSWFJ.mjs";
8
+ } from "./chunk-MUBFR675.mjs";
9
9
  import {
10
10
  init_react_import
11
11
  } from "./chunk-M6W7YEVX.mjs";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  EditorInner,
3
3
  LoadedRichTextMenu
4
- } from "./chunk-2A2HBRLV.mjs";
4
+ } from "./chunk-BORTMJJZ.mjs";
5
5
  import {
6
6
  ActionBar,
7
7
  IconButton,
8
8
  LoadedRichTextMenuInner,
9
9
  Loader
10
- } from "./chunk-OAOKQORI.mjs";
10
+ } from "./chunk-MVJENRGK.mjs";
11
11
  import {
12
12
  RichTextRenderFallback,
13
13
  SlotRender,
@@ -60,7 +60,7 @@ import {
60
60
  useRegisterFieldsSlice,
61
61
  useRegisterHistorySlice,
62
62
  useRegisterPermissionsSlice
63
- } from "./chunk-NUBRSWFJ.mjs";
63
+ } from "./chunk-MUBFR675.mjs";
64
64
  import {
65
65
  getItem,
66
66
  insert,
@@ -226,9 +226,8 @@ var Button = (_a) => {
226
226
  href
227
227
  }, dataAttrs), {
228
228
  children: [
229
- icon && /* @__PURE__ */ jsx("div", { className: getClassName("icon"), children: icon }),
230
- children,
231
- loading && /* @__PURE__ */ jsx("div", { className: getClassName("spinner"), children: /* @__PURE__ */ jsx(Loader, { size: 14 }) })
229
+ loading ? /* @__PURE__ */ jsx("div", { className: getClassName("spinner"), children: /* @__PURE__ */ jsx(Loader, { size: 14 }) }) : icon && /* @__PURE__ */ jsx("div", { className: getClassName("icon"), children: icon }),
230
+ children
232
231
  ]
233
232
  })
234
233
  );
@@ -2146,7 +2145,7 @@ EditorFallback.displayName = "EditorFallback";
2146
2145
  // components/AutoField/fields/RichtextField/index.tsx
2147
2146
  import { Fragment as Fragment3, jsx as jsx20 } from "react/jsx-runtime";
2148
2147
  var Editor = lazy(
2149
- () => import("./Editor-RY6D73N6.mjs").then((m) => ({
2148
+ () => import("./Editor-GVYZ7S5L.mjs").then((m) => ({
2150
2149
  default: m.Editor
2151
2150
  }))
2152
2151
  );
@@ -4698,7 +4697,7 @@ import {
4698
4697
  } from "react";
4699
4698
  import { jsx as jsx30 } from "react/jsx-runtime";
4700
4699
  var Editor2 = lazy2(
4701
- () => import("./Editor-RY6D73N6.mjs").then((m) => ({
4700
+ () => import("./Editor-GVYZ7S5L.mjs").then((m) => ({
4702
4701
  default: m.Editor
4703
4702
  }))
4704
4703
  );
@@ -5896,6 +5895,9 @@ var createEditorCommands = (appStore) => {
5896
5895
  ui: { itemSelector: { index: sel.index, zone: sel.zone } }
5897
5896
  });
5898
5897
  };
5898
+ const publish = () => {
5899
+ void getState().publish();
5900
+ };
5899
5901
  return {
5900
5902
  insertComponent: insertComponent2,
5901
5903
  removeComponent,
@@ -5905,7 +5907,8 @@ var createEditorCommands = (appStore) => {
5905
5907
  updateProps,
5906
5908
  updateRoot,
5907
5909
  selectComponent,
5908
- scrollToComponent
5910
+ scrollToComponent,
5911
+ publish
5909
5912
  };
5910
5913
  };
5911
5914
 
@@ -5924,6 +5927,8 @@ var generateUseEditor = (store, getState, commands) => {
5924
5927
  const storeData = __spreadProps(__spreadValues({}, commands), {
5925
5928
  appState: makeStatePublic(store.state),
5926
5929
  config: store.config,
5930
+ route: store.route,
5931
+ isPublishing: store.isPublishing,
5927
5932
  dispatch: store.dispatch,
5928
5933
  getPermissions: store.permissions.getPermissions,
5929
5934
  refreshPermissions: store.permissions.refreshPermissions,
@@ -5958,7 +5963,9 @@ var convertToPickedStore = (store) => {
5958
5963
  dispatch: store.dispatch,
5959
5964
  permissions: store.permissions,
5960
5965
  history: store.history,
5961
- selectedItem: store.selectedItem
5966
+ selectedItem: store.selectedItem,
5967
+ route: store.route,
5968
+ isPublishing: store.isPublishing
5962
5969
  };
5963
5970
  };
5964
5971
  var useRegisterUseEditorStore = (appStore) => {
@@ -7634,18 +7641,19 @@ var DEVICE_VIEWPORTS = {
7634
7641
  mobile: { width: 360, height: "auto", icon: "Smartphone", label: "Mobile" }
7635
7642
  };
7636
7643
  var UrlBar = () => {
7637
- const { routes, currentRoute, onRouteChange } = usePropsContext();
7644
+ const { routes, route, onRouteChange } = usePropsContext();
7638
7645
  const chrome = useChromeConfig();
7639
- const showRoutePicker = !!routes && currentRoute !== void 0 && !!onRouteChange;
7640
- const [inputValue, setInputValue] = useState20(currentRoute != null ? currentRoute : "");
7641
- const lastSyncedPath = useRef13(currentRoute);
7642
- if (lastSyncedPath.current !== currentRoute) {
7643
- lastSyncedPath.current = currentRoute;
7644
- setInputValue(currentRoute != null ? currentRoute : "");
7646
+ const currentKey = route == null ? void 0 : route.key;
7647
+ const showRoutePicker = !!routes && currentKey !== void 0 && !!onRouteChange;
7648
+ const [inputValue, setInputValue] = useState20(currentKey != null ? currentKey : "");
7649
+ const lastSyncedPath = useRef13(currentKey);
7650
+ if (lastSyncedPath.current !== currentKey) {
7651
+ lastSyncedPath.current = currentKey;
7652
+ setInputValue(currentKey != null ? currentKey : "");
7645
7653
  }
7646
7654
  const submit = (raw) => {
7647
7655
  const next = normalizeRoute(raw);
7648
- if (!next || next === currentRoute) return;
7656
+ if (!next || next === currentKey) return;
7649
7657
  void (onRouteChange == null ? void 0 : onRouteChange(next));
7650
7658
  };
7651
7659
  if (!chrome.showUrlBar) return null;
@@ -7654,7 +7662,7 @@ var UrlBar = () => {
7654
7662
  Combobox,
7655
7663
  {
7656
7664
  items: routes,
7657
- value: currentRoute,
7665
+ value: currentKey,
7658
7666
  onValueChange: (next) => {
7659
7667
  if (typeof next === "string") submit(next);
7660
7668
  },
@@ -8425,12 +8433,12 @@ var TopHeader = ({
8425
8433
  pluginItems
8426
8434
  }) => {
8427
8435
  const appStore = useAppStoreApi();
8428
- const { onPublish, currentRoute } = usePropsContext();
8429
8436
  const chrome = useChromeConfig();
8430
8437
  const back = useAppStore((s) => s.history.back);
8431
8438
  const forward = useAppStore((s) => s.history.forward);
8432
8439
  const hasFuture = useAppStore((s) => s.history.hasFuture());
8433
8440
  const hasPast = useAppStore((s) => s.history.hasPast());
8441
+ const isPublishing = useAppStore((s) => s.isPublishing);
8434
8442
  const CustomHeaderActions = useAppStore(
8435
8443
  (s) => s.overrides.headerActions || DefaultOverride
8436
8444
  );
@@ -8482,11 +8490,8 @@ var TopHeader = ({
8482
8490
  /* @__PURE__ */ jsx53(CustomHeaderActions, { children: /* @__PURE__ */ jsx53(
8483
8491
  Button,
8484
8492
  {
8485
- onClick: () => {
8486
- const data = appStore.getState().state.data;
8487
- onPublish && onPublish(data, currentRoute);
8488
- },
8489
- children: "Publish"
8493
+ onClick: () => appStore.getState().publish(),
8494
+ children: isPublishing ? "Publishing\u2026" : "Publish"
8490
8495
  }
8491
8496
  ) })
8492
8497
  ] })
@@ -8908,6 +8913,7 @@ function EditorProvider({ children }) {
8908
8913
  data: initialData,
8909
8914
  ui: initialUi,
8910
8915
  onChange,
8916
+ onPublish,
8911
8917
  permissions = {},
8912
8918
  plugins,
8913
8919
  overrides,
@@ -8918,7 +8924,8 @@ function EditorProvider({ children }) {
8918
8924
  onAction,
8919
8925
  fieldTransforms,
8920
8926
  fullScreenCanvas,
8921
- _experimentalVirtualization
8927
+ _experimentalVirtualization,
8928
+ route
8922
8929
  } = usePropsContext();
8923
8930
  const iframe = useMemo24(
8924
8931
  () => __spreadValues({
@@ -9028,7 +9035,9 @@ function EditorProvider({ children }) {
9028
9035
  _experimentalVirtualization: !!_experimentalVirtualization,
9029
9036
  onAction,
9030
9037
  metadata,
9031
- fieldTransforms: loadedFieldTransforms
9038
+ fieldTransforms: loadedFieldTransforms,
9039
+ route: route != null ? route : null,
9040
+ onPublish
9032
9041
  };
9033
9042
  },
9034
9043
  [
@@ -9043,7 +9052,9 @@ function EditorProvider({ children }) {
9043
9052
  _experimentalVirtualization,
9044
9053
  onAction,
9045
9054
  metadata,
9046
- loadedFieldTransforms
9055
+ loadedFieldTransforms,
9056
+ route,
9057
+ onPublish
9047
9058
  ]
9048
9059
  );
9049
9060
  const [appStore] = useState24(
@@ -9131,34 +9142,31 @@ var useApp = () => {
9131
9142
  const rrNavigate = useNavigate();
9132
9143
  const currentPath = location.pathname || "/";
9133
9144
  const isEditing = cfg.editorPath !== null && (currentPath === cfg.editorPath || currentPath.startsWith(`${cfg.editorPath}/`));
9134
- const matchRoute = isEditing ? stripPrefix(currentPath, cfg.editorPath) : currentPath;
9135
- const matched = useMemo25(() => {
9145
+ const pagePath = isEditing ? stripPrefix(currentPath, cfg.editorPath) : currentPath;
9146
+ const route = useMemo25(() => {
9136
9147
  const routeKeys = Object.keys(cfg.pages);
9137
9148
  if (routeKeys.length === 0) return null;
9138
9149
  const matches = matchRoutes(
9139
9150
  routeKeys.map((path) => ({ path })),
9140
- matchRoute
9151
+ pagePath
9141
9152
  );
9142
9153
  if (!matches || matches.length === 0) return null;
9143
9154
  const last = matches[matches.length - 1];
9144
- const key = last.route.path;
9145
9155
  return {
9146
- route: key,
9147
- params: last.params,
9148
- data: cfg.pages[key]
9156
+ key: last.route.path,
9157
+ path: pagePath,
9158
+ params: last.params
9149
9159
  };
9150
- }, [cfg.pages, matchRoute]);
9160
+ }, [cfg.pages, pagePath]);
9151
9161
  const routes = useMemo25(() => Object.keys(cfg.pages), [cfg.pages]);
9152
- const navigate = (route) => {
9153
- const target = isEditing && cfg.editorPath ? `${cfg.editorPath}${route === "/" ? "" : route}` || "/" : route;
9154
- rrNavigate(target || "/");
9162
+ const navigate = (target) => {
9163
+ const next = isEditing && cfg.editorPath ? `${cfg.editorPath}${target === "/" ? "" : target}` || "/" : target;
9164
+ rrNavigate(next || "/");
9155
9165
  };
9156
9166
  return __spreadProps(__spreadValues({}, cfg), {
9157
9167
  routes,
9158
- currentPath,
9159
9168
  isEditing,
9160
- matchRoute,
9161
- matched,
9169
+ route,
9162
9170
  navigate
9163
9171
  });
9164
9172
  };
@@ -9252,9 +9260,14 @@ function EditorForKey({
9252
9260
  editorProps,
9253
9261
  children
9254
9262
  }) {
9255
- const { config, pages, routes, navigate } = useApp();
9263
+ const { config, pages, routes, navigate, route } = useApp();
9256
9264
  const data = pages[routeKey];
9257
9265
  if (!data) return null;
9266
+ const editorRoute = {
9267
+ key: routeKey,
9268
+ path: (route == null ? void 0 : route.key) === routeKey ? route.path : routeKey,
9269
+ params: (route == null ? void 0 : route.key) === routeKey ? route.params : {}
9270
+ };
9258
9271
  return /* @__PURE__ */ jsx56(
9259
9272
  Editor3,
9260
9273
  {
@@ -9281,7 +9294,7 @@ function EditorForKey({
9281
9294
  disableZoomControls: editorProps.disableZoomControls,
9282
9295
  _experimentalVirtualization: editorProps._experimentalVirtualization,
9283
9296
  routes,
9284
- currentRoute: routeKey,
9297
+ route: editorRoute,
9285
9298
  onRouteChange: (next) => navigate(next),
9286
9299
  children
9287
9300
  },
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  List,
3
3
  ListOrdered
4
- } from "./chunk-NUBRSWFJ.mjs";
4
+ } from "./chunk-MUBFR675.mjs";
5
5
  import {
6
6
  init_react_import
7
7
  } from "./chunk-M6W7YEVX.mjs";
@@ -1143,7 +1143,24 @@ var createAppStore = (initialAppStore) => create2()(
1143
1143
  metadata: {},
1144
1144
  fieldTransforms: {},
1145
1145
  scrollToComponent: () => {
1146
- }
1146
+ },
1147
+ route: null,
1148
+ isPublishing: false,
1149
+ publish: () => __async(null, null, function* () {
1150
+ const { onPublish, state, route } = get();
1151
+ if (!onPublish) return;
1152
+ const { root, content, globals } = state.data;
1153
+ const data = __spreadValues({
1154
+ root,
1155
+ content
1156
+ }, globals !== void 0 ? { globals } : {});
1157
+ set({ isPublishing: true });
1158
+ try {
1159
+ yield onPublish(data, route);
1160
+ } finally {
1161
+ set({ isPublishing: false });
1162
+ }
1163
+ })
1147
1164
  }, initialAppStore), {
1148
1165
  fields: createFieldsSlice(set, get),
1149
1166
  history: createHistorySlice(set, get),
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  useListOptions
3
- } from "./chunk-CUGSM3PC.mjs";
3
+ } from "./chunk-M36T7BWB.mjs";
4
4
  import {
5
5
  useAlignOptions
6
- } from "./chunk-ESU6AYGB.mjs";
6
+ } from "./chunk-PGSQPCM6.mjs";
7
7
  import {
8
8
  useHeadingOptions
9
- } from "./chunk-C5G7WUBQ.mjs";
9
+ } from "./chunk-DKFLK64M.mjs";
10
10
  import {
11
11
  AlignCenter,
12
12
  AlignJustify,
@@ -26,12 +26,13 @@ import {
26
26
  Strikethrough,
27
27
  Underline,
28
28
  useControlContext
29
- } from "./chunk-NUBRSWFJ.mjs";
29
+ } from "./chunk-MUBFR675.mjs";
30
30
  import {
31
31
  get_class_name_factory_default
32
32
  } from "./chunk-DQU3HIP4.mjs";
33
33
  import {
34
34
  __objRest,
35
+ __spreadProps,
35
36
  __spreadValues,
36
37
  init_react_import
37
38
  } from "./chunk-M6W7YEVX.mjs";
@@ -102,35 +103,135 @@ init_react_import();
102
103
 
103
104
  // css-module:/Users/rami/Documents/apps/react-editor/packages/core/components/Loader/styles.module.css#css-module
104
105
  init_react_import();
105
- var styles_module_default2 = { "Loader": "_Loader_nacdm_13", "loader-animation": "_loader-animation_nacdm_1" };
106
+ var styles_module_default2 = { "Loader": "_Loader_6933g_10", "loader-spin": "_loader-spin_6933g_1" };
106
107
 
107
108
  // components/Loader/index.tsx
108
- import { jsx as jsx2 } from "react/jsx-runtime";
109
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
109
110
  var getClassName2 = get_class_name_factory_default("Loader", styles_module_default2);
111
+ var LoaderIcon = ({ size = 16 }) => /* @__PURE__ */ jsxs2(
112
+ "svg",
113
+ {
114
+ height: size,
115
+ strokeLinejoin: "round",
116
+ style: { color: "currentcolor" },
117
+ viewBox: "0 0 16 16",
118
+ width: size,
119
+ "aria-hidden": "true",
120
+ children: [
121
+ /* @__PURE__ */ jsxs2("g", { clipPath: "url(#editor-loader-clip)", children: [
122
+ /* @__PURE__ */ jsx2("path", { d: "M8 0V4", stroke: "currentColor", strokeWidth: "1.5" }),
123
+ /* @__PURE__ */ jsx2(
124
+ "path",
125
+ {
126
+ d: "M8 16V12",
127
+ opacity: "0.5",
128
+ stroke: "currentColor",
129
+ strokeWidth: "1.5"
130
+ }
131
+ ),
132
+ /* @__PURE__ */ jsx2(
133
+ "path",
134
+ {
135
+ d: "M3.29773 1.52783L5.64887 4.7639",
136
+ opacity: "0.9",
137
+ stroke: "currentColor",
138
+ strokeWidth: "1.5"
139
+ }
140
+ ),
141
+ /* @__PURE__ */ jsx2(
142
+ "path",
143
+ {
144
+ d: "M12.7023 1.52783L10.3511 4.7639",
145
+ opacity: "0.1",
146
+ stroke: "currentColor",
147
+ strokeWidth: "1.5"
148
+ }
149
+ ),
150
+ /* @__PURE__ */ jsx2(
151
+ "path",
152
+ {
153
+ d: "M12.7023 14.472L10.3511 11.236",
154
+ opacity: "0.4",
155
+ stroke: "currentColor",
156
+ strokeWidth: "1.5"
157
+ }
158
+ ),
159
+ /* @__PURE__ */ jsx2(
160
+ "path",
161
+ {
162
+ d: "M3.29773 14.472L5.64887 11.236",
163
+ opacity: "0.6",
164
+ stroke: "currentColor",
165
+ strokeWidth: "1.5"
166
+ }
167
+ ),
168
+ /* @__PURE__ */ jsx2(
169
+ "path",
170
+ {
171
+ d: "M15.6085 5.52783L11.8043 6.7639",
172
+ opacity: "0.2",
173
+ stroke: "currentColor",
174
+ strokeWidth: "1.5"
175
+ }
176
+ ),
177
+ /* @__PURE__ */ jsx2(
178
+ "path",
179
+ {
180
+ d: "M0.391602 10.472L4.19583 9.23598",
181
+ opacity: "0.7",
182
+ stroke: "currentColor",
183
+ strokeWidth: "1.5"
184
+ }
185
+ ),
186
+ /* @__PURE__ */ jsx2(
187
+ "path",
188
+ {
189
+ d: "M15.6085 10.4722L11.8043 9.2361",
190
+ opacity: "0.3",
191
+ stroke: "currentColor",
192
+ strokeWidth: "1.5"
193
+ }
194
+ ),
195
+ /* @__PURE__ */ jsx2(
196
+ "path",
197
+ {
198
+ d: "M0.391602 5.52783L4.19583 6.7639",
199
+ opacity: "0.8",
200
+ stroke: "currentColor",
201
+ strokeWidth: "1.5"
202
+ }
203
+ )
204
+ ] }),
205
+ /* @__PURE__ */ jsx2("defs", { children: /* @__PURE__ */ jsx2("clipPath", { id: "editor-loader-clip", children: /* @__PURE__ */ jsx2("rect", { fill: "white", height: "16", width: "16" }) }) })
206
+ ]
207
+ }
208
+ );
110
209
  var Loader = (_a) => {
111
210
  var _b = _a, {
112
211
  color,
113
- size = 16
212
+ size = 16,
213
+ className,
214
+ style
114
215
  } = _b, props = __objRest(_b, [
115
216
  "color",
116
- "size"
217
+ "size",
218
+ "className",
219
+ "style"
117
220
  ]);
118
221
  return /* @__PURE__ */ jsx2(
119
- "span",
120
- __spreadValues({
121
- className: getClassName2(),
122
- style: {
123
- width: size,
124
- height: size,
125
- color
126
- },
222
+ "div",
223
+ __spreadProps(__spreadValues({
224
+ className: [getClassName2(), className].filter(Boolean).join(" "),
225
+ style: __spreadValues({ color }, style),
127
226
  "aria-label": "loading"
128
- }, props)
227
+ }, props), {
228
+ children: /* @__PURE__ */ jsx2(LoaderIcon, { size })
229
+ })
129
230
  );
130
231
  };
131
232
 
132
233
  // components/IconButton/IconButton.tsx
133
- import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
234
+ import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
134
235
  var getClassName3 = get_class_name_factory_default("IconButton", IconButton_module_default);
135
236
  var IconButton = ({
136
237
  active = false,
@@ -147,7 +248,7 @@ var IconButton = ({
147
248
  }) => {
148
249
  const [loading, setLoading] = useState(false);
149
250
  const ElementType = href ? "a" : "button";
150
- const el = /* @__PURE__ */ jsxs2(
251
+ const el = /* @__PURE__ */ jsxs3(
151
252
  ElementType,
152
253
  {
153
254
  className: getClassName3({
@@ -173,7 +274,7 @@ var IconButton = ({
173
274
  children: [
174
275
  /* @__PURE__ */ jsx3("span", { className: getClassName3("title"), children: title }),
175
276
  children,
176
- loading && /* @__PURE__ */ jsxs2(Fragment, { children: [
277
+ loading && /* @__PURE__ */ jsxs3(Fragment, { children: [
177
278
  "\xA0\xA0",
178
279
  /* @__PURE__ */ jsx3(Loader, { size: 14 })
179
280
  ] })
@@ -349,7 +450,7 @@ function AlignSelectFallback() {
349
450
  // components/RichTextMenu/controls/AlignSelect/index.tsx
350
451
  import { jsx as jsx10 } from "react/jsx-runtime";
351
452
  var AlignSelectLoaded = lazy(
352
- () => import("./loaded-HGQBTPJQ.mjs").then((m) => ({
453
+ () => import("./loaded-XKFARPER.mjs").then((m) => ({
353
454
  default: m.AlignSelectLoaded
354
455
  }))
355
456
  );
@@ -580,7 +681,7 @@ function HeadingSelectFallback() {
580
681
  // components/RichTextMenu/controls/HeadingSelect/index.tsx
581
682
  import { jsx as jsx22 } from "react/jsx-runtime";
582
683
  var HeadingSelectLoaded = lazy2(
583
- () => import("./loaded-I7V7FYES.mjs").then((m) => ({
684
+ () => import("./loaded-BHRFTTT2.mjs").then((m) => ({
584
685
  default: m.HeadingSelectLoaded
585
686
  }))
586
687
  );
@@ -612,14 +713,14 @@ function ListSelectFallback() {
612
713
  // components/RichTextMenu/controls/ListSelect/index.tsx
613
714
  import { jsx as jsx24 } from "react/jsx-runtime";
614
715
  var ListSelectLoaded = lazy3(
615
- () => import("./loaded-GJMTZ3M5.mjs").then((m) => ({
716
+ () => import("./loaded-HIFB4G2Q.mjs").then((m) => ({
616
717
  default: m.ListSelectLoaded
617
718
  }))
618
719
  );
619
720
  var ListSelect = () => /* @__PURE__ */ jsx24(Suspense3, { fallback: /* @__PURE__ */ jsx24(ListSelectFallback, {}), children: /* @__PURE__ */ jsx24(ListSelectLoaded, {}) });
620
721
 
621
722
  // components/RichTextMenu/inner.tsx
622
- import { jsx as jsx25, jsxs as jsxs3 } from "react/jsx-runtime";
723
+ import { jsx as jsx25, jsxs as jsxs4 } from "react/jsx-runtime";
623
724
  var getClassName5 = get_class_name_factory_default("RichTextMenu", styles_module_default3);
624
725
  var DefaultMenu = ({ children }) => {
625
726
  return /* @__PURE__ */ jsx25(RichTextMenu, { children });
@@ -673,18 +774,18 @@ var LoadedRichTextMenuInner = ({
673
774
  editor,
674
775
  editorState,
675
776
  readOnly,
676
- children: /* @__PURE__ */ jsxs3(Group2, { children: [
777
+ children: /* @__PURE__ */ jsxs4(Group2, { children: [
677
778
  /* @__PURE__ */ jsx25(Bold2, {}),
678
779
  /* @__PURE__ */ jsx25(Italic2, {}),
679
780
  /* @__PURE__ */ jsx25(Underline2, {})
680
781
  ] })
681
782
  }
682
- ) : /* @__PURE__ */ jsxs3(Menu, { editor, editorState, readOnly, children: [
683
- /* @__PURE__ */ jsxs3(Group2, { children: [
783
+ ) : /* @__PURE__ */ jsxs4(Menu, { editor, editorState, readOnly, children: [
784
+ /* @__PURE__ */ jsxs4(Group2, { children: [
684
785
  /* @__PURE__ */ jsx25(HeadingSelect, {}),
685
786
  /* @__PURE__ */ jsx25(ListSelect, {})
686
787
  ] }),
687
- /* @__PURE__ */ jsxs3(Group2, { children: [
788
+ /* @__PURE__ */ jsxs4(Group2, { children: [
688
789
  /* @__PURE__ */ jsx25(Bold2, {}),
689
790
  /* @__PURE__ */ jsx25(Italic2, {}),
690
791
  /* @__PURE__ */ jsx25(Underline2, {})
@@ -3,7 +3,7 @@ import {
3
3
  AlignJustify,
4
4
  AlignLeft,
5
5
  AlignRight
6
- } from "./chunk-NUBRSWFJ.mjs";
6
+ } from "./chunk-MUBFR675.mjs";
7
7
  import {
8
8
  init_react_import
9
9
  } from "./chunk-M6W7YEVX.mjs";