@puckeditor/core 0.22.0-canary.faffb521 → 0.22.0
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.
- package/dist/{Editor-HFELA66Z.mjs → Editor-FJJNKTC3.mjs} +8 -9
- package/dist/Editor-ZZW3KF2T.css +385 -0
- package/dist/{Render-MJ563JES.mjs → Render-DQXAYUBI.mjs} +1 -1
- package/dist/Render-EKEWMTMI.css +117 -0
- package/dist/{chunk-GFIZBMKN.mjs → chunk-3RQGAM3Z.mjs} +1 -1
- package/dist/{chunk-6PUO3QRB.mjs → chunk-4US666EQ.mjs} +91 -248
- package/dist/{chunk-52JFFDX2.mjs → chunk-ELDOSC5Y.mjs} +1469 -1335
- package/dist/{chunk-4V66DSMA.mjs → chunk-GKUX6MNS.mjs} +4 -4
- package/dist/{chunk-AOEDIUVK.mjs → chunk-H635BA2V.mjs} +1 -1
- package/dist/{chunk-4X2SLJRQ.mjs → chunk-M5GPDW62.mjs} +1 -1
- package/dist/{chunk-CO6PRTVM.mjs → chunk-SSXLOL3N.mjs} +6 -6
- package/dist/{chunk-MQKADUDK.mjs → chunk-XIGSFEU7.mjs} +1 -1
- package/dist/{chunk-OVPTKQ2P.mjs → chunk-XQHCQEAF.mjs} +229 -51
- package/dist/{full-YKFH7JSW.mjs → full-6ZILLKCS.mjs} +6 -6
- package/dist/full-S3QQ2IBQ.css +267 -0
- package/dist/index.css +1287 -1171
- package/dist/index.d.mts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +1993 -1837
- package/dist/index.mjs +11 -10
- package/dist/loaded-FVWRAJR3.css +215 -0
- package/dist/{loaded-A7UUCT2O.mjs → loaded-LAKI4KDY.mjs} +2 -2
- package/dist/{loaded-2QS7VXZ6.mjs → loaded-PILFUJGA.mjs} +2 -2
- package/dist/{loaded-JHBS3QYA.mjs → loaded-QH5RKCGC.mjs} +2 -2
- package/dist/no-external.css +1287 -1171
- package/dist/no-external.js +1993 -1837
- package/dist/no-external.mjs +11 -10
- package/dist/rsc.css +61 -46
- package/dist/rsc.js +6 -6
- package/dist/rsc.mjs +2 -2
- package/package.json +1 -1
- package/dist/Editor-IQP25PUX.css +0 -404
- package/dist/Render-3OV4N4MT.css +0 -102
- package/dist/full-2GJTAAZE.css +0 -301
- package/dist/loaded-RVWBFK7L.css +0 -87
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useAlignOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-M5GPDW62.mjs";
|
|
4
4
|
import {
|
|
5
5
|
useHeadingOptions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3RQGAM3Z.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useListOptions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XIGSFEU7.mjs";
|
|
10
10
|
import {
|
|
11
|
+
Action,
|
|
11
12
|
AlignCenter,
|
|
12
13
|
AlignJustify,
|
|
13
14
|
AlignLeft,
|
|
@@ -16,6 +17,7 @@ import {
|
|
|
16
17
|
Code,
|
|
17
18
|
ControlContext,
|
|
18
19
|
Heading,
|
|
20
|
+
IconButton,
|
|
19
21
|
Italic,
|
|
20
22
|
List,
|
|
21
23
|
ListOrdered,
|
|
@@ -26,169 +28,20 @@ import {
|
|
|
26
28
|
Strikethrough,
|
|
27
29
|
Underline,
|
|
28
30
|
useControlContext
|
|
29
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-XQHCQEAF.mjs";
|
|
30
32
|
import {
|
|
31
33
|
get_class_name_factory_default
|
|
32
34
|
} from "./chunk-Y2EFNT5P.mjs";
|
|
33
35
|
import {
|
|
34
|
-
__objRest,
|
|
35
|
-
__spreadValues,
|
|
36
36
|
init_react_import
|
|
37
37
|
} from "./chunk-M6W7YEVX.mjs";
|
|
38
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
39
|
// components/RichTextMenu/inner.tsx
|
|
187
40
|
init_react_import();
|
|
188
41
|
|
|
189
42
|
// css-module:/home/runner/work/puck/puck/packages/core/components/RichTextMenu/styles.module.css#css-module
|
|
190
43
|
init_react_import();
|
|
191
|
-
var
|
|
44
|
+
var styles_module_default = { "RichTextMenu": "_RichTextMenu_1ve2j_1", "RichTextMenu--form": "_RichTextMenu--form_1ve2j_7", "RichTextMenu-group": "_RichTextMenu-group_1ve2j_21", "RichTextMenu--inline": "_RichTextMenu--inline_1ve2j_39" };
|
|
192
45
|
|
|
193
46
|
// components/RichTextMenu/inner.tsx
|
|
194
47
|
import { useMemo } from "react";
|
|
@@ -202,16 +55,13 @@ init_react_import();
|
|
|
202
55
|
// components/RichTextMenu/components/Control/index.tsx
|
|
203
56
|
init_react_import();
|
|
204
57
|
|
|
205
|
-
// components/IconButton/index.ts
|
|
206
|
-
init_react_import();
|
|
207
|
-
|
|
208
58
|
// css-module:/home/runner/work/puck/puck/packages/core/components/RichTextMenu/components/Control/styles.module.css#css-module
|
|
209
59
|
init_react_import();
|
|
210
|
-
var
|
|
60
|
+
var styles_module_default2 = { "Control": "_Control_id4pm_1", "Control--inline": "_Control--inline_id4pm_6" };
|
|
211
61
|
|
|
212
62
|
// components/RichTextMenu/components/Control/index.tsx
|
|
213
|
-
import { jsx
|
|
214
|
-
var
|
|
63
|
+
import { jsx } from "react/jsx-runtime";
|
|
64
|
+
var getClassName = get_class_name_factory_default("Control", styles_module_default2);
|
|
215
65
|
function Control({
|
|
216
66
|
icon,
|
|
217
67
|
disabled,
|
|
@@ -221,7 +71,7 @@ function Control({
|
|
|
221
71
|
}) {
|
|
222
72
|
const { inline } = useControlContext();
|
|
223
73
|
if (inline) {
|
|
224
|
-
return /* @__PURE__ */
|
|
74
|
+
return /* @__PURE__ */ jsx("span", { className: getClassName({ inline: true }), children: /* @__PURE__ */ jsx(
|
|
225
75
|
Action,
|
|
226
76
|
{
|
|
227
77
|
onClick,
|
|
@@ -232,7 +82,7 @@ function Control({
|
|
|
232
82
|
}
|
|
233
83
|
) });
|
|
234
84
|
}
|
|
235
|
-
return /* @__PURE__ */
|
|
85
|
+
return /* @__PURE__ */ jsx("span", { className: getClassName(), children: /* @__PURE__ */ jsx(
|
|
236
86
|
IconButton,
|
|
237
87
|
{
|
|
238
88
|
onClick,
|
|
@@ -245,13 +95,13 @@ function Control({
|
|
|
245
95
|
}
|
|
246
96
|
|
|
247
97
|
// components/RichTextMenu/controls/AlignLeft.tsx
|
|
248
|
-
import { jsx as
|
|
98
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
249
99
|
function AlignLeft2() {
|
|
250
100
|
const { editor, editorState } = useControlContext();
|
|
251
|
-
return /* @__PURE__ */
|
|
101
|
+
return /* @__PURE__ */ jsx2(
|
|
252
102
|
Control,
|
|
253
103
|
{
|
|
254
|
-
icon: /* @__PURE__ */
|
|
104
|
+
icon: /* @__PURE__ */ jsx2(AlignLeft, {}),
|
|
255
105
|
onClick: (e) => {
|
|
256
106
|
e.stopPropagation();
|
|
257
107
|
editor == null ? void 0 : editor.chain().focus().setTextAlign("left").run();
|
|
@@ -265,13 +115,13 @@ function AlignLeft2() {
|
|
|
265
115
|
|
|
266
116
|
// components/RichTextMenu/controls/AlignCenter.tsx
|
|
267
117
|
init_react_import();
|
|
268
|
-
import { jsx as
|
|
118
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
269
119
|
function AlignCenter2() {
|
|
270
120
|
const { editor, editorState } = useControlContext();
|
|
271
|
-
return /* @__PURE__ */
|
|
121
|
+
return /* @__PURE__ */ jsx3(
|
|
272
122
|
Control,
|
|
273
123
|
{
|
|
274
|
-
icon: /* @__PURE__ */
|
|
124
|
+
icon: /* @__PURE__ */ jsx3(AlignCenter, {}),
|
|
275
125
|
onClick: (e) => {
|
|
276
126
|
e.stopPropagation();
|
|
277
127
|
editor == null ? void 0 : editor.chain().focus().setTextAlign("center").run();
|
|
@@ -285,13 +135,13 @@ function AlignCenter2() {
|
|
|
285
135
|
|
|
286
136
|
// components/RichTextMenu/controls/AlignRight.tsx
|
|
287
137
|
init_react_import();
|
|
288
|
-
import { jsx as
|
|
138
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
289
139
|
function AlignRight2() {
|
|
290
140
|
const { editor, editorState } = useControlContext();
|
|
291
|
-
return /* @__PURE__ */
|
|
141
|
+
return /* @__PURE__ */ jsx4(
|
|
292
142
|
Control,
|
|
293
143
|
{
|
|
294
|
-
icon: /* @__PURE__ */
|
|
144
|
+
icon: /* @__PURE__ */ jsx4(AlignRight, {}),
|
|
295
145
|
onClick: (e) => {
|
|
296
146
|
e.stopPropagation();
|
|
297
147
|
editor == null ? void 0 : editor.chain().focus().setTextAlign("right").run();
|
|
@@ -305,13 +155,13 @@ function AlignRight2() {
|
|
|
305
155
|
|
|
306
156
|
// components/RichTextMenu/controls/AlignJustify.tsx
|
|
307
157
|
init_react_import();
|
|
308
|
-
import { jsx as
|
|
158
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
309
159
|
function AlignJustify2() {
|
|
310
160
|
const { editor, editorState } = useControlContext();
|
|
311
|
-
return /* @__PURE__ */
|
|
161
|
+
return /* @__PURE__ */ jsx5(
|
|
312
162
|
Control,
|
|
313
163
|
{
|
|
314
|
-
icon: /* @__PURE__ */
|
|
164
|
+
icon: /* @__PURE__ */ jsx5(AlignJustify, {}),
|
|
315
165
|
onClick: (e) => {
|
|
316
166
|
e.stopPropagation();
|
|
317
167
|
editor == null ? void 0 : editor.chain().focus().setTextAlign("justify").run();
|
|
@@ -329,11 +179,11 @@ import { lazy, Suspense } from "react";
|
|
|
329
179
|
|
|
330
180
|
// components/RichTextMenu/controls/AlignSelect/fallback.tsx
|
|
331
181
|
init_react_import();
|
|
332
|
-
import { jsx as
|
|
182
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
333
183
|
function AlignSelectFallback() {
|
|
334
184
|
const ctx = useControlContext();
|
|
335
185
|
const alignOptions = useAlignOptions(ctx.options);
|
|
336
|
-
return /* @__PURE__ */
|
|
186
|
+
return /* @__PURE__ */ jsx6(
|
|
337
187
|
SelectControl,
|
|
338
188
|
{
|
|
339
189
|
options: alignOptions,
|
|
@@ -347,23 +197,23 @@ function AlignSelectFallback() {
|
|
|
347
197
|
}
|
|
348
198
|
|
|
349
199
|
// components/RichTextMenu/controls/AlignSelect/index.tsx
|
|
350
|
-
import { jsx as
|
|
200
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
351
201
|
var AlignSelectLoaded = lazy(
|
|
352
|
-
() => import("./loaded-
|
|
202
|
+
() => import("./loaded-QH5RKCGC.mjs").then((m) => ({
|
|
353
203
|
default: m.AlignSelectLoaded
|
|
354
204
|
}))
|
|
355
205
|
);
|
|
356
|
-
var AlignSelect = () => /* @__PURE__ */
|
|
206
|
+
var AlignSelect = () => /* @__PURE__ */ jsx7(Suspense, { fallback: /* @__PURE__ */ jsx7(AlignSelectFallback, {}), children: /* @__PURE__ */ jsx7(AlignSelectLoaded, {}) });
|
|
357
207
|
|
|
358
208
|
// components/RichTextMenu/controls/Bold.tsx
|
|
359
209
|
init_react_import();
|
|
360
|
-
import { jsx as
|
|
210
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
361
211
|
function Bold2() {
|
|
362
212
|
const { editor, editorState } = useControlContext();
|
|
363
|
-
return /* @__PURE__ */
|
|
213
|
+
return /* @__PURE__ */ jsx8(
|
|
364
214
|
Control,
|
|
365
215
|
{
|
|
366
|
-
icon: /* @__PURE__ */
|
|
216
|
+
icon: /* @__PURE__ */ jsx8(Bold, {}),
|
|
367
217
|
onClick: (e) => {
|
|
368
218
|
e.stopPropagation();
|
|
369
219
|
editor == null ? void 0 : editor.chain().focus().toggleBold().run();
|
|
@@ -377,13 +227,13 @@ function Bold2() {
|
|
|
377
227
|
|
|
378
228
|
// components/RichTextMenu/controls/Italic.tsx
|
|
379
229
|
init_react_import();
|
|
380
|
-
import { jsx as
|
|
230
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
381
231
|
function Italic2() {
|
|
382
232
|
const { editor, editorState } = useControlContext();
|
|
383
|
-
return /* @__PURE__ */
|
|
233
|
+
return /* @__PURE__ */ jsx9(
|
|
384
234
|
Control,
|
|
385
235
|
{
|
|
386
|
-
icon: /* @__PURE__ */
|
|
236
|
+
icon: /* @__PURE__ */ jsx9(Italic, {}),
|
|
387
237
|
onClick: (e) => {
|
|
388
238
|
e.stopPropagation();
|
|
389
239
|
editor == null ? void 0 : editor.chain().focus().toggleItalic().run();
|
|
@@ -397,13 +247,13 @@ function Italic2() {
|
|
|
397
247
|
|
|
398
248
|
// components/RichTextMenu/controls/Underline.tsx
|
|
399
249
|
init_react_import();
|
|
400
|
-
import { jsx as
|
|
250
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
401
251
|
function Underline2() {
|
|
402
252
|
const { editor, editorState } = useControlContext();
|
|
403
|
-
return /* @__PURE__ */
|
|
253
|
+
return /* @__PURE__ */ jsx10(
|
|
404
254
|
Control,
|
|
405
255
|
{
|
|
406
|
-
icon: /* @__PURE__ */
|
|
256
|
+
icon: /* @__PURE__ */ jsx10(Underline, {}),
|
|
407
257
|
onClick: (e) => {
|
|
408
258
|
e.stopPropagation();
|
|
409
259
|
editor == null ? void 0 : editor.chain().focus().toggleUnderline().run();
|
|
@@ -417,13 +267,13 @@ function Underline2() {
|
|
|
417
267
|
|
|
418
268
|
// components/RichTextMenu/controls/Strikethrough.tsx
|
|
419
269
|
init_react_import();
|
|
420
|
-
import { jsx as
|
|
270
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
421
271
|
function Strikethrough2() {
|
|
422
272
|
const { editor, editorState } = useControlContext();
|
|
423
|
-
return /* @__PURE__ */
|
|
273
|
+
return /* @__PURE__ */ jsx11(
|
|
424
274
|
Control,
|
|
425
275
|
{
|
|
426
|
-
icon: /* @__PURE__ */
|
|
276
|
+
icon: /* @__PURE__ */ jsx11(Strikethrough, {}),
|
|
427
277
|
onClick: (e) => {
|
|
428
278
|
e.stopPropagation();
|
|
429
279
|
editor == null ? void 0 : editor.chain().focus().toggleStrike().run();
|
|
@@ -437,13 +287,13 @@ function Strikethrough2() {
|
|
|
437
287
|
|
|
438
288
|
// components/RichTextMenu/controls/InlineCode.tsx
|
|
439
289
|
init_react_import();
|
|
440
|
-
import { jsx as
|
|
290
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
441
291
|
function InlineCode() {
|
|
442
292
|
const { editor, editorState } = useControlContext();
|
|
443
|
-
return /* @__PURE__ */
|
|
293
|
+
return /* @__PURE__ */ jsx12(
|
|
444
294
|
Control,
|
|
445
295
|
{
|
|
446
|
-
icon: /* @__PURE__ */
|
|
296
|
+
icon: /* @__PURE__ */ jsx12(Code, {}),
|
|
447
297
|
onClick: (e) => {
|
|
448
298
|
e.stopPropagation();
|
|
449
299
|
editor == null ? void 0 : editor.chain().focus().toggleCode().run();
|
|
@@ -457,13 +307,13 @@ function InlineCode() {
|
|
|
457
307
|
|
|
458
308
|
// components/RichTextMenu/controls/BulletList.tsx
|
|
459
309
|
init_react_import();
|
|
460
|
-
import { jsx as
|
|
310
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
461
311
|
function BulletList() {
|
|
462
312
|
const { editor, editorState } = useControlContext();
|
|
463
|
-
return /* @__PURE__ */
|
|
313
|
+
return /* @__PURE__ */ jsx13(
|
|
464
314
|
Control,
|
|
465
315
|
{
|
|
466
|
-
icon: /* @__PURE__ */
|
|
316
|
+
icon: /* @__PURE__ */ jsx13(List, {}),
|
|
467
317
|
onClick: (e) => {
|
|
468
318
|
e.stopPropagation();
|
|
469
319
|
editor == null ? void 0 : editor.chain().focus().toggleBulletList().run();
|
|
@@ -477,13 +327,13 @@ function BulletList() {
|
|
|
477
327
|
|
|
478
328
|
// components/RichTextMenu/controls/OrderedList.tsx
|
|
479
329
|
init_react_import();
|
|
480
|
-
import { jsx as
|
|
330
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
481
331
|
function OrderedList() {
|
|
482
332
|
const { editor, editorState } = useControlContext();
|
|
483
|
-
return /* @__PURE__ */
|
|
333
|
+
return /* @__PURE__ */ jsx14(
|
|
484
334
|
Control,
|
|
485
335
|
{
|
|
486
|
-
icon: /* @__PURE__ */
|
|
336
|
+
icon: /* @__PURE__ */ jsx14(ListOrdered, {}),
|
|
487
337
|
onClick: (e) => {
|
|
488
338
|
e.stopPropagation();
|
|
489
339
|
editor == null ? void 0 : editor.chain().focus().toggleOrderedList().run();
|
|
@@ -497,13 +347,13 @@ function OrderedList() {
|
|
|
497
347
|
|
|
498
348
|
// components/RichTextMenu/controls/CodeBlock.tsx
|
|
499
349
|
init_react_import();
|
|
500
|
-
import { jsx as
|
|
350
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
501
351
|
function CodeBlock() {
|
|
502
352
|
const { editor, editorState } = useControlContext();
|
|
503
|
-
return /* @__PURE__ */
|
|
353
|
+
return /* @__PURE__ */ jsx15(
|
|
504
354
|
Control,
|
|
505
355
|
{
|
|
506
|
-
icon: /* @__PURE__ */
|
|
356
|
+
icon: /* @__PURE__ */ jsx15(SquareCode, {}),
|
|
507
357
|
onClick: (e) => {
|
|
508
358
|
e.stopPropagation();
|
|
509
359
|
editor == null ? void 0 : editor.chain().focus().toggleCodeBlock().run();
|
|
@@ -517,13 +367,13 @@ function CodeBlock() {
|
|
|
517
367
|
|
|
518
368
|
// components/RichTextMenu/controls/Blockquote.tsx
|
|
519
369
|
init_react_import();
|
|
520
|
-
import { jsx as
|
|
370
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
521
371
|
function Blockquote() {
|
|
522
372
|
const { editor, editorState } = useControlContext();
|
|
523
|
-
return /* @__PURE__ */
|
|
373
|
+
return /* @__PURE__ */ jsx16(
|
|
524
374
|
Control,
|
|
525
375
|
{
|
|
526
|
-
icon: /* @__PURE__ */
|
|
376
|
+
icon: /* @__PURE__ */ jsx16(Quote, {}),
|
|
527
377
|
onClick: (e) => {
|
|
528
378
|
e.stopPropagation();
|
|
529
379
|
editor == null ? void 0 : editor.chain().focus().toggleBlockquote().run();
|
|
@@ -537,13 +387,13 @@ function Blockquote() {
|
|
|
537
387
|
|
|
538
388
|
// components/RichTextMenu/controls/HorizontalRule.tsx
|
|
539
389
|
init_react_import();
|
|
540
|
-
import { jsx as
|
|
390
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
541
391
|
function HorizontalRule() {
|
|
542
392
|
const { editor, editorState } = useControlContext();
|
|
543
|
-
return /* @__PURE__ */
|
|
393
|
+
return /* @__PURE__ */ jsx17(
|
|
544
394
|
Control,
|
|
545
395
|
{
|
|
546
|
-
icon: /* @__PURE__ */
|
|
396
|
+
icon: /* @__PURE__ */ jsx17(Minus, {}),
|
|
547
397
|
onClick: (e) => {
|
|
548
398
|
e.stopPropagation();
|
|
549
399
|
editor == null ? void 0 : editor.chain().focus().setHorizontalRule().run();
|
|
@@ -560,11 +410,11 @@ import { lazy as lazy2, Suspense as Suspense2 } from "react";
|
|
|
560
410
|
|
|
561
411
|
// components/RichTextMenu/controls/HeadingSelect/fallback.tsx
|
|
562
412
|
init_react_import();
|
|
563
|
-
import { jsx as
|
|
413
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
564
414
|
function HeadingSelectFallback() {
|
|
565
415
|
const ctx = useControlContext();
|
|
566
416
|
const headingOptions = useHeadingOptions(ctx.options);
|
|
567
|
-
return /* @__PURE__ */
|
|
417
|
+
return /* @__PURE__ */ jsx18(
|
|
568
418
|
SelectControl,
|
|
569
419
|
{
|
|
570
420
|
options: headingOptions,
|
|
@@ -578,13 +428,13 @@ function HeadingSelectFallback() {
|
|
|
578
428
|
}
|
|
579
429
|
|
|
580
430
|
// components/RichTextMenu/controls/HeadingSelect/index.tsx
|
|
581
|
-
import { jsx as
|
|
431
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
582
432
|
var HeadingSelectLoaded = lazy2(
|
|
583
|
-
() => import("./loaded-
|
|
433
|
+
() => import("./loaded-LAKI4KDY.mjs").then((m) => ({
|
|
584
434
|
default: m.HeadingSelectLoaded
|
|
585
435
|
}))
|
|
586
436
|
);
|
|
587
|
-
var HeadingSelect = () => /* @__PURE__ */
|
|
437
|
+
var HeadingSelect = () => /* @__PURE__ */ jsx19(Suspense2, { fallback: /* @__PURE__ */ jsx19(HeadingSelectFallback, {}), children: /* @__PURE__ */ jsx19(HeadingSelectLoaded, {}) });
|
|
588
438
|
|
|
589
439
|
// components/RichTextMenu/controls/ListSelect/index.tsx
|
|
590
440
|
init_react_import();
|
|
@@ -592,11 +442,11 @@ import { lazy as lazy3, Suspense as Suspense3 } from "react";
|
|
|
592
442
|
|
|
593
443
|
// components/RichTextMenu/controls/ListSelect/fallback.tsx
|
|
594
444
|
init_react_import();
|
|
595
|
-
import { jsx as
|
|
445
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
596
446
|
function ListSelectFallback() {
|
|
597
447
|
const ctx = useControlContext();
|
|
598
448
|
const listOptions = useListOptions(ctx.options);
|
|
599
|
-
return /* @__PURE__ */
|
|
449
|
+
return /* @__PURE__ */ jsx20(
|
|
600
450
|
SelectControl,
|
|
601
451
|
{
|
|
602
452
|
options: listOptions,
|
|
@@ -610,28 +460,28 @@ function ListSelectFallback() {
|
|
|
610
460
|
}
|
|
611
461
|
|
|
612
462
|
// components/RichTextMenu/controls/ListSelect/index.tsx
|
|
613
|
-
import { jsx as
|
|
463
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
614
464
|
var ListSelectLoaded = lazy3(
|
|
615
|
-
() => import("./loaded-
|
|
465
|
+
() => import("./loaded-PILFUJGA.mjs").then((m) => ({
|
|
616
466
|
default: m.ListSelectLoaded
|
|
617
467
|
}))
|
|
618
468
|
);
|
|
619
|
-
var ListSelect = () => /* @__PURE__ */
|
|
469
|
+
var ListSelect = () => /* @__PURE__ */ jsx21(Suspense3, { fallback: /* @__PURE__ */ jsx21(ListSelectFallback, {}), children: /* @__PURE__ */ jsx21(ListSelectLoaded, {}) });
|
|
620
470
|
|
|
621
471
|
// components/RichTextMenu/inner.tsx
|
|
622
|
-
import { jsx as
|
|
623
|
-
var
|
|
472
|
+
import { jsx as jsx22, jsxs } from "react/jsx-runtime";
|
|
473
|
+
var getClassName2 = get_class_name_factory_default("RichTextMenu", styles_module_default);
|
|
624
474
|
var DefaultMenu = ({ children }) => {
|
|
625
|
-
return /* @__PURE__ */
|
|
475
|
+
return /* @__PURE__ */ jsx22(RichTextMenu, { children });
|
|
626
476
|
};
|
|
627
477
|
var RichTextMenu = ({ children }) => {
|
|
628
478
|
const { inline } = useControlContext();
|
|
629
|
-
return /* @__PURE__ */
|
|
479
|
+
return /* @__PURE__ */ jsx22("div", { className: getClassName2({ inline, form: !inline }), "data-puck-rte-menu": true, children });
|
|
630
480
|
};
|
|
631
|
-
var
|
|
632
|
-
return /* @__PURE__ */
|
|
481
|
+
var Group = ({ children }) => {
|
|
482
|
+
return /* @__PURE__ */ jsx22("div", { className: getClassName2("group"), children });
|
|
633
483
|
};
|
|
634
|
-
RichTextMenu.Group =
|
|
484
|
+
RichTextMenu.Group = Group;
|
|
635
485
|
RichTextMenu.Control = Control;
|
|
636
486
|
RichTextMenu.AlignCenter = AlignCenter2;
|
|
637
487
|
RichTextMenu.AlignJustify = AlignJustify2;
|
|
@@ -663,46 +513,39 @@ var LoadedRichTextMenuInner = ({
|
|
|
663
513
|
[renderInlineMenu]
|
|
664
514
|
);
|
|
665
515
|
const Menu = useMemo(() => renderMenu || DefaultMenu, [renderMenu]);
|
|
666
|
-
return /* @__PURE__ */
|
|
516
|
+
return /* @__PURE__ */ jsx22(
|
|
667
517
|
ControlContext.Provider,
|
|
668
518
|
{
|
|
669
519
|
value: { editor, editorState, inline, options: field.options, readOnly },
|
|
670
|
-
children: inline ? /* @__PURE__ */
|
|
520
|
+
children: inline ? /* @__PURE__ */ jsx22(
|
|
671
521
|
InlineMenu,
|
|
672
522
|
{
|
|
673
523
|
editor,
|
|
674
524
|
editorState,
|
|
675
525
|
readOnly,
|
|
676
|
-
children: /* @__PURE__ */
|
|
677
|
-
/* @__PURE__ */
|
|
678
|
-
/* @__PURE__ */
|
|
679
|
-
/* @__PURE__ */
|
|
526
|
+
children: /* @__PURE__ */ jsxs(Group, { children: [
|
|
527
|
+
/* @__PURE__ */ jsx22(Bold2, {}),
|
|
528
|
+
/* @__PURE__ */ jsx22(Italic2, {}),
|
|
529
|
+
/* @__PURE__ */ jsx22(Underline2, {})
|
|
680
530
|
] })
|
|
681
531
|
}
|
|
682
|
-
) : /* @__PURE__ */
|
|
683
|
-
/* @__PURE__ */
|
|
684
|
-
/* @__PURE__ */
|
|
685
|
-
/* @__PURE__ */
|
|
532
|
+
) : /* @__PURE__ */ jsxs(Menu, { editor, editorState, readOnly, children: [
|
|
533
|
+
/* @__PURE__ */ jsxs(Group, { children: [
|
|
534
|
+
/* @__PURE__ */ jsx22(HeadingSelect, {}),
|
|
535
|
+
/* @__PURE__ */ jsx22(ListSelect, {})
|
|
686
536
|
] }),
|
|
687
|
-
/* @__PURE__ */
|
|
688
|
-
/* @__PURE__ */
|
|
689
|
-
/* @__PURE__ */
|
|
690
|
-
/* @__PURE__ */
|
|
537
|
+
/* @__PURE__ */ jsxs(Group, { children: [
|
|
538
|
+
/* @__PURE__ */ jsx22(Bold2, {}),
|
|
539
|
+
/* @__PURE__ */ jsx22(Italic2, {}),
|
|
540
|
+
/* @__PURE__ */ jsx22(Underline2, {})
|
|
691
541
|
] }),
|
|
692
|
-
/* @__PURE__ */
|
|
542
|
+
/* @__PURE__ */ jsx22(Group, { children: /* @__PURE__ */ jsx22(AlignSelect, {}) })
|
|
693
543
|
] })
|
|
694
544
|
}
|
|
695
545
|
);
|
|
696
546
|
};
|
|
697
547
|
|
|
698
548
|
export {
|
|
699
|
-
ActionBar,
|
|
700
|
-
Action,
|
|
701
|
-
Group,
|
|
702
|
-
Label,
|
|
703
|
-
Separator,
|
|
704
|
-
Loader,
|
|
705
|
-
IconButton,
|
|
706
549
|
RichTextMenu,
|
|
707
550
|
LoadedRichTextMenuInner
|
|
708
551
|
};
|