@measured/puck 0.21.0-canary.3aa27d1d → 0.21.0-canary.56be3202

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