@measured/puck 0.21.0-canary.ace4c8b3 → 0.21.0-canary.b353d921

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 (40) hide show
  1. package/dist/Editor-F2LSS6SE.css +403 -0
  2. package/dist/Editor-N46HUQEC.mjs +201 -0
  3. package/dist/Render-QEMDIDQC.css +101 -0
  4. package/dist/Render-Y567PGZ7.mjs +53 -0
  5. package/dist/chunk-3QHWXJEI.mjs +33 -0
  6. package/dist/chunk-7KY6RHEY.mjs +2230 -0
  7. package/dist/chunk-C2TVYIYC.mjs +415 -0
  8. package/dist/chunk-DCSQEDMK.mjs +194 -0
  9. package/dist/{chunk-TC25DCTQ.mjs → chunk-DJSH5REF.mjs} +70 -498
  10. package/dist/chunk-DNF2EMM4.mjs +63 -0
  11. package/dist/chunk-FNWOH4R6.mjs +109 -0
  12. package/dist/chunk-GQKMOYLG.mjs +53 -0
  13. package/dist/chunk-K3V4LVUL.mjs +704 -0
  14. package/dist/chunk-R6CVX2IY.mjs +103 -0
  15. package/dist/{chunk-AIFI2M23.mjs → chunk-TB3SSIAY.mjs} +1041 -2778
  16. package/dist/chunk-WUWXFMEM.mjs +11 -0
  17. package/dist/full-2GJTAAZE.css +301 -0
  18. package/dist/full-NLUNPJWS.mjs +90 -0
  19. package/dist/index.css +278 -22
  20. package/dist/index.d.mts +100 -7
  21. package/dist/index.d.ts +100 -7
  22. package/dist/index.js +5811 -2550
  23. package/dist/index.mjs +25 -9
  24. package/dist/loaded-EV34KGYJ.mjs +57 -0
  25. package/dist/loaded-HMSPJUZM.mjs +54 -0
  26. package/dist/loaded-RVWBFK7L.css +87 -0
  27. package/dist/loaded-ZXOU6S6R.mjs +54 -0
  28. package/dist/no-external.css +278 -22
  29. package/dist/no-external.d.mts +17 -2
  30. package/dist/no-external.d.ts +17 -2
  31. package/dist/no-external.js +5811 -2550
  32. package/dist/no-external.mjs +25 -9
  33. package/dist/rsc.css +101 -0
  34. package/dist/rsc.d.mts +17 -2
  35. package/dist/rsc.d.ts +17 -2
  36. package/dist/rsc.js +409 -22
  37. package/dist/rsc.mjs +16 -9
  38. package/dist/{walk-tree-CkSoNBF7.d.mts → walk-tree-Ja9bNCM9.d.mts} +208 -7
  39. package/dist/{walk-tree-CkSoNBF7.d.ts → walk-tree-Ja9bNCM9.d.ts} +208 -7
  40. package/package.json +23 -1
@@ -0,0 +1,704 @@
1
+ import {
2
+ useAlignOptions
3
+ } from "./chunk-GQKMOYLG.mjs";
4
+ import {
5
+ useHeadingOptions
6
+ } from "./chunk-DNF2EMM4.mjs";
7
+ import {
8
+ useListOptions
9
+ } from "./chunk-3QHWXJEI.mjs";
10
+ import {
11
+ AlignCenter,
12
+ AlignJustify,
13
+ AlignLeft,
14
+ AlignRight,
15
+ Bold,
16
+ Code,
17
+ ControlContext,
18
+ Heading,
19
+ Italic,
20
+ List,
21
+ ListOrdered,
22
+ Minus,
23
+ Quote,
24
+ SelectControl,
25
+ SquareCode,
26
+ Strikethrough,
27
+ Underline,
28
+ useControlContext
29
+ } from "./chunk-7KY6RHEY.mjs";
30
+ import {
31
+ __objRest,
32
+ __spreadValues,
33
+ get_class_name_factory_default,
34
+ init_react_import
35
+ } from "./chunk-DCSQEDMK.mjs";
36
+
37
+ // components/ActionBar/index.tsx
38
+ init_react_import();
39
+
40
+ // css-module:/home/runner/work/puck/puck/packages/core/components/ActionBar/styles.module.css#css-module
41
+ init_react_import();
42
+ var styles_module_default = { "ActionBar": "_ActionBar_1nmyk_1", "ActionBar-label": "_ActionBar-label_1nmyk_18", "ActionBarAction": "_ActionBarAction_1nmyk_30", "ActionBar-group": "_ActionBar-group_1nmyk_38", "ActionBarAction--disabled": "_ActionBarAction--disabled_1nmyk_71", "ActionBarAction--active": "_ActionBarAction--active_1nmyk_93", "ActionBar-separator": "_ActionBar-separator_1nmyk_102" };
43
+
44
+ // components/ActionBar/index.tsx
45
+ import { jsx, jsxs } from "react/jsx-runtime";
46
+ var getClassName = get_class_name_factory_default("ActionBar", styles_module_default);
47
+ var getActionClassName = get_class_name_factory_default("ActionBarAction", styles_module_default);
48
+ var ActionBar = ({
49
+ label,
50
+ children
51
+ }) => /* @__PURE__ */ jsxs(
52
+ "div",
53
+ {
54
+ className: getClassName(),
55
+ onClick: (e) => {
56
+ e.stopPropagation();
57
+ },
58
+ children: [
59
+ label && /* @__PURE__ */ jsx(ActionBar.Group, { children: /* @__PURE__ */ jsx("div", { className: getClassName("label"), children: label }) }),
60
+ children
61
+ ]
62
+ }
63
+ );
64
+ var Action = ({
65
+ children,
66
+ label,
67
+ onClick,
68
+ active = false,
69
+ disabled
70
+ }) => /* @__PURE__ */ jsx(
71
+ "button",
72
+ {
73
+ type: "button",
74
+ className: getActionClassName({ active, disabled }),
75
+ onClick,
76
+ title: label,
77
+ tabIndex: 0,
78
+ disabled,
79
+ children
80
+ }
81
+ );
82
+ var Group = ({ children }) => /* @__PURE__ */ jsx("div", { className: getClassName("group"), children });
83
+ var Label = ({ label }) => /* @__PURE__ */ jsx("div", { className: getClassName("label"), children: label });
84
+ var Separator = () => /* @__PURE__ */ jsx("div", { className: getClassName("separator") });
85
+ ActionBar.Action = Action;
86
+ ActionBar.Label = Label;
87
+ ActionBar.Group = Group;
88
+ ActionBar.Separator = Separator;
89
+
90
+ // components/IconButton/IconButton.tsx
91
+ init_react_import();
92
+ import { useState } from "react";
93
+
94
+ // css-module:/home/runner/work/puck/puck/packages/core/components/IconButton/IconButton.module.css#css-module
95
+ init_react_import();
96
+ var IconButton_module_default = { "IconButton": "_IconButton_ffob9_1", "IconButton--active": "_IconButton--active_ffob9_14", "IconButton--disabled": "_IconButton--disabled_ffob9_24", "IconButton-title": "_IconButton-title_ffob9_37" };
97
+
98
+ // components/Loader/index.tsx
99
+ init_react_import();
100
+
101
+ // css-module:/home/runner/work/puck/puck/packages/core/components/Loader/styles.module.css#css-module
102
+ init_react_import();
103
+ var styles_module_default2 = { "Loader": "_Loader_nacdm_13", "loader-animation": "_loader-animation_nacdm_1" };
104
+
105
+ // components/Loader/index.tsx
106
+ import { jsx as jsx2 } from "react/jsx-runtime";
107
+ var getClassName2 = get_class_name_factory_default("Loader", styles_module_default2);
108
+ var Loader = (_a) => {
109
+ var _b = _a, {
110
+ color,
111
+ size = 16
112
+ } = _b, props = __objRest(_b, [
113
+ "color",
114
+ "size"
115
+ ]);
116
+ return /* @__PURE__ */ jsx2(
117
+ "span",
118
+ __spreadValues({
119
+ className: getClassName2(),
120
+ style: {
121
+ width: size,
122
+ height: size,
123
+ color
124
+ },
125
+ "aria-label": "loading"
126
+ }, props)
127
+ );
128
+ };
129
+
130
+ // components/IconButton/IconButton.tsx
131
+ import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
132
+ var getClassName3 = get_class_name_factory_default("IconButton", IconButton_module_default);
133
+ var IconButton = ({
134
+ active = false,
135
+ children,
136
+ href,
137
+ onClick,
138
+ type,
139
+ disabled,
140
+ tabIndex,
141
+ newTab,
142
+ fullWidth,
143
+ title
144
+ }) => {
145
+ const [loading, setLoading] = useState(false);
146
+ const ElementType = href ? "a" : "button";
147
+ const el = /* @__PURE__ */ jsxs2(
148
+ ElementType,
149
+ {
150
+ className: getClassName3({
151
+ active,
152
+ disabled,
153
+ fullWidth
154
+ }),
155
+ onClick: (e) => {
156
+ if (!onClick) return;
157
+ setLoading(true);
158
+ Promise.resolve(onClick(e)).then(() => {
159
+ setLoading(false);
160
+ });
161
+ },
162
+ type,
163
+ disabled: disabled || loading,
164
+ tabIndex,
165
+ target: newTab ? "_blank" : void 0,
166
+ rel: newTab ? "noreferrer" : void 0,
167
+ href,
168
+ title,
169
+ children: [
170
+ /* @__PURE__ */ jsx3("span", { className: getClassName3("title"), children: title }),
171
+ children,
172
+ loading && /* @__PURE__ */ jsxs2(Fragment, { children: [
173
+ "\xA0\xA0",
174
+ /* @__PURE__ */ jsx3(Loader, { size: 14 })
175
+ ] })
176
+ ]
177
+ }
178
+ );
179
+ return el;
180
+ };
181
+
182
+ // components/RichTextMenu/inner.tsx
183
+ init_react_import();
184
+
185
+ // css-module:/home/runner/work/puck/puck/packages/core/components/RichTextMenu/styles.module.css#css-module
186
+ init_react_import();
187
+ var styles_module_default3 = { "RichTextMenu": "_RichTextMenu_k97eh_1", "RichTextMenu--form": "_RichTextMenu--form_k97eh_7", "RichTextMenu-group": "_RichTextMenu-group_k97eh_17", "RichTextMenu--inline": "_RichTextMenu--inline_k97eh_35" };
188
+
189
+ // components/RichTextMenu/inner.tsx
190
+ import { useMemo } from "react";
191
+
192
+ // components/RichTextMenu/controls/index.ts
193
+ init_react_import();
194
+
195
+ // components/RichTextMenu/controls/AlignLeft.tsx
196
+ init_react_import();
197
+
198
+ // components/RichTextMenu/components/Control/index.tsx
199
+ init_react_import();
200
+
201
+ // components/IconButton/index.ts
202
+ init_react_import();
203
+
204
+ // css-module:/home/runner/work/puck/puck/packages/core/components/RichTextMenu/components/Control/styles.module.css#css-module
205
+ init_react_import();
206
+ var styles_module_default4 = { "Control": "_Control_1aveu_1", "Control--inline": "_Control--inline_1aveu_6" };
207
+
208
+ // components/RichTextMenu/components/Control/index.tsx
209
+ import { jsx as jsx4 } from "react/jsx-runtime";
210
+ var getClassName4 = get_class_name_factory_default("Control", styles_module_default4);
211
+ function Control({
212
+ icon,
213
+ disabled,
214
+ active,
215
+ onClick,
216
+ title
217
+ }) {
218
+ const { inline } = useControlContext();
219
+ if (inline) {
220
+ return /* @__PURE__ */ jsx4("span", { className: getClassName4({ inline: true }), children: /* @__PURE__ */ jsx4(
221
+ Action,
222
+ {
223
+ onClick,
224
+ disabled,
225
+ active,
226
+ label: title,
227
+ children: icon
228
+ }
229
+ ) });
230
+ }
231
+ return /* @__PURE__ */ jsx4("span", { className: getClassName4(), children: /* @__PURE__ */ jsx4(
232
+ IconButton,
233
+ {
234
+ onClick,
235
+ disabled,
236
+ active,
237
+ title,
238
+ children: icon
239
+ }
240
+ ) });
241
+ }
242
+
243
+ // components/RichTextMenu/controls/AlignLeft.tsx
244
+ import { jsx as jsx5 } from "react/jsx-runtime";
245
+ function AlignLeft2() {
246
+ const { editor, editorState } = useControlContext();
247
+ return /* @__PURE__ */ jsx5(
248
+ Control,
249
+ {
250
+ icon: /* @__PURE__ */ jsx5(AlignLeft, {}),
251
+ onClick: (e) => {
252
+ e.stopPropagation();
253
+ editor == null ? void 0 : editor.chain().focus().setTextAlign("left").run();
254
+ },
255
+ disabled: !(editorState == null ? void 0 : editorState.canAlignLeft),
256
+ active: editorState == null ? void 0 : editorState.isAlignLeft,
257
+ title: "Align left"
258
+ }
259
+ );
260
+ }
261
+
262
+ // components/RichTextMenu/controls/AlignCenter.tsx
263
+ init_react_import();
264
+ import { jsx as jsx6 } from "react/jsx-runtime";
265
+ function AlignCenter2() {
266
+ const { editor, editorState } = useControlContext();
267
+ return /* @__PURE__ */ jsx6(
268
+ Control,
269
+ {
270
+ icon: /* @__PURE__ */ jsx6(AlignCenter, {}),
271
+ onClick: (e) => {
272
+ e.stopPropagation();
273
+ editor == null ? void 0 : editor.chain().focus().setTextAlign("center").run();
274
+ },
275
+ disabled: !(editorState == null ? void 0 : editorState.canAlignCenter),
276
+ active: editorState == null ? void 0 : editorState.isAlignCenter,
277
+ title: "Align center"
278
+ }
279
+ );
280
+ }
281
+
282
+ // components/RichTextMenu/controls/AlignRight.tsx
283
+ init_react_import();
284
+ import { jsx as jsx7 } from "react/jsx-runtime";
285
+ function AlignRight2() {
286
+ const { editor, editorState } = useControlContext();
287
+ return /* @__PURE__ */ jsx7(
288
+ Control,
289
+ {
290
+ icon: /* @__PURE__ */ jsx7(AlignRight, {}),
291
+ onClick: (e) => {
292
+ e.stopPropagation();
293
+ editor == null ? void 0 : editor.chain().focus().setTextAlign("right").run();
294
+ },
295
+ disabled: !(editorState == null ? void 0 : editorState.canAlignRight),
296
+ active: editorState == null ? void 0 : editorState.isAlignRight,
297
+ title: "Align right"
298
+ }
299
+ );
300
+ }
301
+
302
+ // components/RichTextMenu/controls/AlignJustify.tsx
303
+ init_react_import();
304
+ import { jsx as jsx8 } from "react/jsx-runtime";
305
+ function AlignJustify2() {
306
+ const { editor, editorState } = useControlContext();
307
+ return /* @__PURE__ */ jsx8(
308
+ Control,
309
+ {
310
+ icon: /* @__PURE__ */ jsx8(AlignJustify, {}),
311
+ onClick: (e) => {
312
+ e.stopPropagation();
313
+ editor == null ? void 0 : editor.chain().focus().setTextAlign("justify").run();
314
+ },
315
+ disabled: !(editorState == null ? void 0 : editorState.canAlignJustify),
316
+ active: editorState == null ? void 0 : editorState.isAlignJustify,
317
+ title: "Justify"
318
+ }
319
+ );
320
+ }
321
+
322
+ // components/RichTextMenu/controls/AlignSelect/index.tsx
323
+ init_react_import();
324
+ import { lazy, Suspense } from "react";
325
+
326
+ // components/RichTextMenu/controls/AlignSelect/fallback.tsx
327
+ init_react_import();
328
+ import { jsx as jsx9 } from "react/jsx-runtime";
329
+ function AlignSelectFallback() {
330
+ const ctx = useControlContext();
331
+ const alignOptions = useAlignOptions(ctx.options);
332
+ return /* @__PURE__ */ jsx9(
333
+ SelectControl,
334
+ {
335
+ options: alignOptions,
336
+ onChange: () => {
337
+ },
338
+ value: "left",
339
+ defaultValue: "left",
340
+ renderDefaultIcon: AlignLeft
341
+ }
342
+ );
343
+ }
344
+
345
+ // components/RichTextMenu/controls/AlignSelect/index.tsx
346
+ import { jsx as jsx10 } from "react/jsx-runtime";
347
+ var AlignSelectLoaded = lazy(
348
+ () => import("./loaded-ZXOU6S6R.mjs").then((m) => ({
349
+ default: m.AlignSelectLoaded
350
+ }))
351
+ );
352
+ var AlignSelect = () => /* @__PURE__ */ jsx10(Suspense, { fallback: /* @__PURE__ */ jsx10(AlignSelectFallback, {}), children: /* @__PURE__ */ jsx10(AlignSelectLoaded, {}) });
353
+
354
+ // components/RichTextMenu/controls/Bold.tsx
355
+ init_react_import();
356
+ import { jsx as jsx11 } from "react/jsx-runtime";
357
+ function Bold2() {
358
+ const { editor, editorState } = useControlContext();
359
+ return /* @__PURE__ */ jsx11(
360
+ Control,
361
+ {
362
+ icon: /* @__PURE__ */ jsx11(Bold, {}),
363
+ onClick: (e) => {
364
+ e.stopPropagation();
365
+ editor == null ? void 0 : editor.chain().focus().toggleBold().run();
366
+ },
367
+ disabled: !(editorState == null ? void 0 : editorState.canBold),
368
+ active: editorState == null ? void 0 : editorState.isBold,
369
+ title: "Bold"
370
+ }
371
+ );
372
+ }
373
+
374
+ // components/RichTextMenu/controls/Italic.tsx
375
+ init_react_import();
376
+ import { jsx as jsx12 } from "react/jsx-runtime";
377
+ function Italic2() {
378
+ const { editor, editorState } = useControlContext();
379
+ return /* @__PURE__ */ jsx12(
380
+ Control,
381
+ {
382
+ icon: /* @__PURE__ */ jsx12(Italic, {}),
383
+ onClick: (e) => {
384
+ e.stopPropagation();
385
+ editor == null ? void 0 : editor.chain().focus().toggleItalic().run();
386
+ },
387
+ disabled: !(editorState == null ? void 0 : editorState.canItalic),
388
+ active: editorState == null ? void 0 : editorState.isItalic,
389
+ title: "Italic"
390
+ }
391
+ );
392
+ }
393
+
394
+ // components/RichTextMenu/controls/Underline.tsx
395
+ init_react_import();
396
+ import { jsx as jsx13 } from "react/jsx-runtime";
397
+ function Underline2() {
398
+ const { editor, editorState } = useControlContext();
399
+ return /* @__PURE__ */ jsx13(
400
+ Control,
401
+ {
402
+ icon: /* @__PURE__ */ jsx13(Underline, {}),
403
+ onClick: (e) => {
404
+ e.stopPropagation();
405
+ editor == null ? void 0 : editor.chain().focus().toggleUnderline().run();
406
+ },
407
+ disabled: !(editorState == null ? void 0 : editorState.canUnderline),
408
+ active: editorState == null ? void 0 : editorState.isUnderline,
409
+ title: "Underline"
410
+ }
411
+ );
412
+ }
413
+
414
+ // components/RichTextMenu/controls/Strikethrough.tsx
415
+ init_react_import();
416
+ import { jsx as jsx14 } from "react/jsx-runtime";
417
+ function Strikethrough2() {
418
+ const { editor, editorState } = useControlContext();
419
+ return /* @__PURE__ */ jsx14(
420
+ Control,
421
+ {
422
+ icon: /* @__PURE__ */ jsx14(Strikethrough, {}),
423
+ onClick: (e) => {
424
+ e.stopPropagation();
425
+ editor == null ? void 0 : editor.chain().focus().toggleStrike().run();
426
+ },
427
+ disabled: !(editorState == null ? void 0 : editorState.canStrike),
428
+ active: editorState == null ? void 0 : editorState.isStrike,
429
+ title: "Strikethrough"
430
+ }
431
+ );
432
+ }
433
+
434
+ // components/RichTextMenu/controls/InlineCode.tsx
435
+ init_react_import();
436
+ import { jsx as jsx15 } from "react/jsx-runtime";
437
+ function InlineCode() {
438
+ const { editor, editorState } = useControlContext();
439
+ return /* @__PURE__ */ jsx15(
440
+ Control,
441
+ {
442
+ icon: /* @__PURE__ */ jsx15(Code, {}),
443
+ onClick: (e) => {
444
+ e.stopPropagation();
445
+ editor == null ? void 0 : editor.chain().focus().toggleCode().run();
446
+ },
447
+ disabled: !(editorState == null ? void 0 : editorState.canInlineCode),
448
+ active: editorState == null ? void 0 : editorState.isInlineCode,
449
+ title: "Inline code"
450
+ }
451
+ );
452
+ }
453
+
454
+ // components/RichTextMenu/controls/BulletList.tsx
455
+ init_react_import();
456
+ import { jsx as jsx16 } from "react/jsx-runtime";
457
+ function BulletList() {
458
+ const { editor, editorState } = useControlContext();
459
+ return /* @__PURE__ */ jsx16(
460
+ Control,
461
+ {
462
+ icon: /* @__PURE__ */ jsx16(List, {}),
463
+ onClick: (e) => {
464
+ e.stopPropagation();
465
+ editor == null ? void 0 : editor.chain().focus().toggleBulletList().run();
466
+ },
467
+ disabled: !(editorState == null ? void 0 : editorState.canBulletList),
468
+ active: editorState == null ? void 0 : editorState.isBulletList,
469
+ title: "Bullet list"
470
+ }
471
+ );
472
+ }
473
+
474
+ // components/RichTextMenu/controls/OrderedList.tsx
475
+ init_react_import();
476
+ import { jsx as jsx17 } from "react/jsx-runtime";
477
+ function OrderedList() {
478
+ const { editor, editorState } = useControlContext();
479
+ return /* @__PURE__ */ jsx17(
480
+ Control,
481
+ {
482
+ icon: /* @__PURE__ */ jsx17(ListOrdered, {}),
483
+ onClick: (e) => {
484
+ e.stopPropagation();
485
+ editor == null ? void 0 : editor.chain().focus().toggleOrderedList().run();
486
+ },
487
+ disabled: !(editorState == null ? void 0 : editorState.canOrderedList),
488
+ active: editorState == null ? void 0 : editorState.isOrderedList,
489
+ title: "Ordered list"
490
+ }
491
+ );
492
+ }
493
+
494
+ // components/RichTextMenu/controls/CodeBlock.tsx
495
+ init_react_import();
496
+ import { jsx as jsx18 } from "react/jsx-runtime";
497
+ function CodeBlock() {
498
+ const { editor, editorState } = useControlContext();
499
+ return /* @__PURE__ */ jsx18(
500
+ Control,
501
+ {
502
+ icon: /* @__PURE__ */ jsx18(SquareCode, {}),
503
+ onClick: (e) => {
504
+ e.stopPropagation();
505
+ editor == null ? void 0 : editor.chain().focus().toggleCodeBlock().run();
506
+ },
507
+ disabled: !(editorState == null ? void 0 : editorState.canCodeBlock),
508
+ active: editorState == null ? void 0 : editorState.isCodeBlock,
509
+ title: "Code block"
510
+ }
511
+ );
512
+ }
513
+
514
+ // components/RichTextMenu/controls/Blockquote.tsx
515
+ init_react_import();
516
+ import { jsx as jsx19 } from "react/jsx-runtime";
517
+ function Blockquote() {
518
+ const { editor, editorState } = useControlContext();
519
+ return /* @__PURE__ */ jsx19(
520
+ Control,
521
+ {
522
+ icon: /* @__PURE__ */ jsx19(Quote, {}),
523
+ onClick: (e) => {
524
+ e.stopPropagation();
525
+ editor == null ? void 0 : editor.chain().focus().toggleBlockquote().run();
526
+ },
527
+ disabled: !(editorState == null ? void 0 : editorState.canBlockquote),
528
+ active: editorState == null ? void 0 : editorState.isBlockquote,
529
+ title: "Blockquote"
530
+ }
531
+ );
532
+ }
533
+
534
+ // components/RichTextMenu/controls/HorizontalRule.tsx
535
+ init_react_import();
536
+ import { jsx as jsx20 } from "react/jsx-runtime";
537
+ function HorizontalRule() {
538
+ const { editor, editorState } = useControlContext();
539
+ return /* @__PURE__ */ jsx20(
540
+ Control,
541
+ {
542
+ icon: /* @__PURE__ */ jsx20(Minus, {}),
543
+ onClick: (e) => {
544
+ e.stopPropagation();
545
+ editor == null ? void 0 : editor.chain().focus().setHorizontalRule().run();
546
+ },
547
+ disabled: !(editorState == null ? void 0 : editorState.canHorizontalRule),
548
+ title: "Horizontal rule"
549
+ }
550
+ );
551
+ }
552
+
553
+ // components/RichTextMenu/controls/HeadingSelect/index.tsx
554
+ init_react_import();
555
+ import { lazy as lazy2, Suspense as Suspense2 } from "react";
556
+
557
+ // components/RichTextMenu/controls/HeadingSelect/fallback.tsx
558
+ init_react_import();
559
+ import { jsx as jsx21 } from "react/jsx-runtime";
560
+ function HeadingSelectFallback() {
561
+ const ctx = useControlContext();
562
+ const headingOptions = useHeadingOptions(ctx.options);
563
+ return /* @__PURE__ */ jsx21(
564
+ SelectControl,
565
+ {
566
+ options: headingOptions,
567
+ onChange: () => {
568
+ },
569
+ value: "p",
570
+ defaultValue: "p",
571
+ renderDefaultIcon: Heading
572
+ }
573
+ );
574
+ }
575
+
576
+ // components/RichTextMenu/controls/HeadingSelect/index.tsx
577
+ import { jsx as jsx22 } from "react/jsx-runtime";
578
+ var HeadingSelectLoaded = lazy2(
579
+ () => import("./loaded-EV34KGYJ.mjs").then((m) => ({
580
+ default: m.HeadingSelectLoaded
581
+ }))
582
+ );
583
+ var HeadingSelect = () => /* @__PURE__ */ jsx22(Suspense2, { fallback: /* @__PURE__ */ jsx22(HeadingSelectFallback, {}), children: /* @__PURE__ */ jsx22(HeadingSelectLoaded, {}) });
584
+
585
+ // components/RichTextMenu/controls/ListSelect/index.tsx
586
+ init_react_import();
587
+ import { lazy as lazy3, Suspense as Suspense3 } from "react";
588
+
589
+ // components/RichTextMenu/controls/ListSelect/fallback.tsx
590
+ init_react_import();
591
+ import { jsx as jsx23 } from "react/jsx-runtime";
592
+ function ListSelectFallback() {
593
+ const ctx = useControlContext();
594
+ const listOptions = useListOptions(ctx.options);
595
+ return /* @__PURE__ */ jsx23(
596
+ SelectControl,
597
+ {
598
+ options: listOptions,
599
+ onChange: () => {
600
+ },
601
+ value: "p",
602
+ defaultValue: "p",
603
+ renderDefaultIcon: List
604
+ }
605
+ );
606
+ }
607
+
608
+ // components/RichTextMenu/controls/ListSelect/index.tsx
609
+ import { jsx as jsx24 } from "react/jsx-runtime";
610
+ var ListSelectLoaded = lazy3(
611
+ () => import("./loaded-HMSPJUZM.mjs").then((m) => ({
612
+ default: m.ListSelectLoaded
613
+ }))
614
+ );
615
+ var ListSelect = () => /* @__PURE__ */ jsx24(Suspense3, { fallback: /* @__PURE__ */ jsx24(ListSelectFallback, {}), children: /* @__PURE__ */ jsx24(ListSelectLoaded, {}) });
616
+
617
+ // components/RichTextMenu/inner.tsx
618
+ import { jsx as jsx25, jsxs as jsxs3 } from "react/jsx-runtime";
619
+ var getClassName5 = get_class_name_factory_default("RichTextMenu", styles_module_default3);
620
+ var DefaultMenu = ({ children }) => {
621
+ return /* @__PURE__ */ jsx25(RichTextMenu, { children });
622
+ };
623
+ var RichTextMenu = ({ children }) => {
624
+ const { inline } = useControlContext();
625
+ return /* @__PURE__ */ jsx25("div", { className: getClassName5({ inline, form: !inline }), "data-puck-rte-menu": true, children });
626
+ };
627
+ var Group2 = ({ children }) => {
628
+ return /* @__PURE__ */ jsx25("div", { className: getClassName5("group"), children });
629
+ };
630
+ RichTextMenu.Group = Group2;
631
+ RichTextMenu.Control = Control;
632
+ RichTextMenu.AlignCenter = AlignCenter2;
633
+ RichTextMenu.AlignJustify = AlignJustify2;
634
+ RichTextMenu.AlignLeft = AlignLeft2;
635
+ RichTextMenu.AlignRight = AlignRight2;
636
+ RichTextMenu.AlignSelect = AlignSelect;
637
+ RichTextMenu.Blockquote = Blockquote;
638
+ RichTextMenu.Bold = Bold2;
639
+ RichTextMenu.BulletList = BulletList;
640
+ RichTextMenu.CodeBlock = CodeBlock;
641
+ RichTextMenu.HeadingSelect = HeadingSelect;
642
+ RichTextMenu.HorizontalRule = HorizontalRule;
643
+ RichTextMenu.InlineCode = InlineCode;
644
+ RichTextMenu.Italic = Italic2;
645
+ RichTextMenu.ListSelect = ListSelect;
646
+ RichTextMenu.OrderedList = OrderedList;
647
+ RichTextMenu.Strikethrough = Strikethrough2;
648
+ RichTextMenu.Underline = Underline2;
649
+ var LoadedRichTextMenuInner = ({
650
+ editor = null,
651
+ editorState = null,
652
+ field,
653
+ readOnly,
654
+ inline
655
+ }) => {
656
+ const { renderMenu, renderInlineMenu } = field;
657
+ const InlineMenu = useMemo(
658
+ () => renderInlineMenu || DefaultMenu,
659
+ [renderInlineMenu]
660
+ );
661
+ const Menu = useMemo(() => renderMenu || DefaultMenu, [renderMenu]);
662
+ return /* @__PURE__ */ jsx25(
663
+ ControlContext.Provider,
664
+ {
665
+ value: { editor, editorState, inline, options: field.options, readOnly },
666
+ children: inline ? /* @__PURE__ */ jsx25(
667
+ InlineMenu,
668
+ {
669
+ editor,
670
+ editorState,
671
+ readOnly,
672
+ children: /* @__PURE__ */ jsxs3(Group2, { children: [
673
+ /* @__PURE__ */ jsx25(Bold2, {}),
674
+ /* @__PURE__ */ jsx25(Italic2, {}),
675
+ /* @__PURE__ */ jsx25(Underline2, {})
676
+ ] })
677
+ }
678
+ ) : /* @__PURE__ */ jsxs3(Menu, { editor, editorState, readOnly, children: [
679
+ /* @__PURE__ */ jsxs3(Group2, { children: [
680
+ /* @__PURE__ */ jsx25(HeadingSelect, {}),
681
+ /* @__PURE__ */ jsx25(ListSelect, {})
682
+ ] }),
683
+ /* @__PURE__ */ jsxs3(Group2, { children: [
684
+ /* @__PURE__ */ jsx25(Bold2, {}),
685
+ /* @__PURE__ */ jsx25(Italic2, {}),
686
+ /* @__PURE__ */ jsx25(Underline2, {})
687
+ ] }),
688
+ /* @__PURE__ */ jsx25(Group2, { children: /* @__PURE__ */ jsx25(AlignSelect, {}) })
689
+ ] })
690
+ }
691
+ );
692
+ };
693
+
694
+ export {
695
+ ActionBar,
696
+ Action,
697
+ Group,
698
+ Label,
699
+ Separator,
700
+ Loader,
701
+ IconButton,
702
+ RichTextMenu,
703
+ LoadedRichTextMenuInner
704
+ };