@levo-so/studio 0.1.101 → 0.1.103

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 (62) hide show
  1. package/{AuthProvider-56TywIOB.js → AuthProvider-C6bvedwF.js} +16 -16
  2. package/Beams-DboMUgCv.js +102 -0
  3. package/{BillingStep-Brc1Mzo3.js → BillingStep-BA3H9BVu.js} +1 -1
  4. package/{Button-XTKnNIl9.js → Button-CZycqusY.js} +249 -138
  5. package/Button-lUfKisu8.js +116 -0
  6. package/CollectionField-xa-jed3_.js +232 -0
  7. package/CollectionInput-CpNGIXJx.js +147 -0
  8. package/DateTimeWidget-DP_nMhqe.js +256 -0
  9. package/Dialog-IrII0ugb.js +130 -0
  10. package/Dots-a8xSboDv.js +100 -0
  11. package/{EntryCard-DTcx6wfA.js → EntryCard-CQpKNX7G.js} +4 -4
  12. package/Grid-BJQvxnks.js +99 -0
  13. package/{LoginCard-CnHmCKUF.js → LoginCard-Cyvm-y_q.js} +3 -3
  14. package/{LoginForm-Ck-xFaDg.js → LoginForm-_44FtvWg.js} +207 -206
  15. package/{LoginModal-BdYM8INu.js → LoginModal-Cyw_XKvz.js} +4 -4
  16. package/{MessageCard-ChDBqLVG.js → MessageCard-C2lNTxFx.js} +2 -2
  17. package/{MessageFooter-AzAtJWMo.js → MessageFooter-59Pziq3i.js} +2 -2
  18. package/{ModalManager-SggxCIno.js → ModalManager-DHkd0Zdb.js} +1 -1
  19. package/{PendingApprovalCard-C6ORDqrY.js → PendingApprovalCard-C8iZjo06.js} +3 -3
  20. package/PhoneWidget-CxxxDXkz.js +100 -0
  21. package/{Popover-BdKCElnb.js → Popover-DOvRAGzc.js} +19 -20
  22. package/PopupRenderer-C7OHYphU-Ct5T6tWM.js +2668 -0
  23. package/RichTextWidget-BqlcssWt.js +113 -0
  24. package/RteThemeProvider-Cfepkyer.js +20 -0
  25. package/{StripePaymentModal-BHIBBvRj.js → StripePaymentModal-DrLMN18M.js} +17 -17
  26. package/Toolbar-BwxoYWO_.js +738 -0
  27. package/Tooltip-NEMQqPyr.js +67 -0
  28. package/VerifyButton-TNkt-SDu.js +177 -0
  29. package/authentication-hnV1BI8s.js +36 -0
  30. package/bookingCard-BDyuBC6X.js +636 -0
  31. package/collection.d.ts +83 -0
  32. package/collection.js +9 -8
  33. package/{dialog-Dw6n_36P.js → dialog-C8-iHixJ.js} +32 -32
  34. package/dist-CG-pwDW0.js +3188 -0
  35. package/generateRadiusScale-BpcgkGtN.js +71 -0
  36. package/getFieldValidations-CSkSV2hW.js +90 -0
  37. package/index.d.ts +96 -9
  38. package/index.js +6021 -7731
  39. package/inlineRteTheme-Ajq9PNpQ.js +9 -0
  40. package/{nodeAlignment-BZbdafVA.js → nodeAlignment-DKCIjzlR.js} +41 -62
  41. package/package.json +38 -40
  42. package/studio.css +1 -1
  43. package/useLogin-B2qE8710.js +127 -0
  44. package/{utils-kDaDLLGt.js → utils-CZLafTgN.js} +1 -1
  45. package/{widgets-CWDiqXm9.js → widgets-eu5zXTf-.js} +58 -125
  46. package/Beams-B0O3uyYF.js +0 -118
  47. package/CollectionInput-cmJ0RXzG.js +0 -132
  48. package/DateTimeWidget-B5lBr0_R.js +0 -255
  49. package/Dots-DjezbpLp.js +0 -137
  50. package/Grid-C9aUfXM-.js +0 -145
  51. package/Input-Btdc1Dee.js +0 -293
  52. package/PhoneWidget-BRIAve47.js +0 -100
  53. package/RichTextWidget-CjEoGecM.js +0 -1136
  54. package/Tooltip-BOq5vSOW.js +0 -68
  55. package/VerifyButton-Bl2QqMpB.js +0 -273
  56. package/bookingCard-D3ZSjq-P.js +0 -577
  57. package/dist-DuTd566a.js +0 -3112
  58. package/getFieldValidations-DZnDgNI0.js +0 -159
  59. /package/{Gradient-B1K9Yi04.js → Gradient-NacpoDCM.js} +0 -0
  60. /package/{Waves-BkaAfGqA.js → Waves-DUuT_IFr.js} +0 -0
  61. /package/{card-BQr9258p.js → card-E2LKF9nT.js} +0 -0
  62. /package/{theme.cssm-2YTdd8Yh.js → theme.cssm-BXDp-ojp.js} +0 -0
@@ -0,0 +1,738 @@
1
+ import { t as e } from "./Button-lUfKisu8.js";
2
+ import { t } from "./nodeAlignment-DKCIjzlR.js";
3
+ import { l as n } from "./CollectionField-xa-jed3_.js";
4
+ import { n as r, r as i, t as a } from "./Tooltip-NEMQqPyr.js";
5
+ import { a as o, i as s, n as c, o as l, r as u } from "./Popover-DOvRAGzc.js";
6
+ import { c as d } from "react/compiler-runtime";
7
+ import { forwardRef as f, useEffect as p, useState as m } from "react";
8
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
9
+ import v from "clsx";
10
+ import { IconAlignCenter as y, IconAlignJustified as b, IconAlignLeft as x, IconAlignRight as S, IconArrowBackUp as C, IconArrowForwardUp as w, IconBold as T, IconChevronDown as E, IconCode as ee, IconCornerDownLeft as te, IconExternalLink as ne, IconH1 as D, IconH2 as re, IconH3 as O, IconH4 as k, IconH5 as A, IconH6 as j, IconItalic as M, IconLink as ie, IconList as N, IconListNumbers as P, IconPencil as F, IconPilcrow as I, IconRotate2 as L, IconStrikethrough as ae, IconSubscript as R, IconSuperscript as z, IconTrash as oe, IconUnderline as B } from "@tabler/icons-react";
11
+ import { BulletList as V } from "@tiptap/extension-bullet-list";
12
+ import { Color as H } from "@tiptap/extension-color";
13
+ import { Document as U } from "@tiptap/extension-document";
14
+ import { HardBreak as W } from "@tiptap/extension-hard-break";
15
+ import { Heading as G } from "@tiptap/extension-heading";
16
+ import { Highlight as K } from "@tiptap/extension-highlight";
17
+ import { Link as q } from "@tiptap/extension-link";
18
+ import { ListItem as J } from "@tiptap/extension-list-item";
19
+ import { OrderedList as se } from "@tiptap/extension-ordered-list";
20
+ import { Paragraph as ce } from "@tiptap/extension-paragraph";
21
+ import { Subscript as le } from "@tiptap/extension-subscript";
22
+ import { Superscript as ue } from "@tiptap/extension-superscript";
23
+ import { Text as de } from "@tiptap/extension-text";
24
+ import { TextStyle as fe } from "@tiptap/extension-text-style";
25
+ import { Typography as pe } from "@tiptap/extension-typography";
26
+ import { Underline as me } from "@tiptap/extension-underline";
27
+ import { UniqueID as he } from "@tiptap/extension-unique-id";
28
+ import { CodeBlock as ge } from "@tiptap/extension-code-block";
29
+ import { Details as _e } from "@tiptap/extension-details";
30
+ import { DetailsContent as ve } from "@tiptap/extension-details-content";
31
+ import { DetailsSummary as ye } from "@tiptap/extension-details-summary";
32
+ import { HorizontalRule as be } from "@tiptap/extension-horizontal-rule";
33
+ import { Image as xe } from "@tiptap/extension-image";
34
+ import { Mention as Se } from "@tiptap/extension-mention";
35
+ import { AllSelection as Ce, NodeSelection as we, TextSelection as Te } from "@tiptap/pm/state";
36
+ import { Table as Ee, TableCell as De, TableHeader as Oe, TableRow as ke } from "@tiptap/extension-table";
37
+ import { Youtube as Ae } from "@tiptap/extension-youtube";
38
+ import { CharacterCount as je } from "@tiptap/extension-character-count";
39
+ import { DragHandle as Me } from "@tiptap/extension-drag-handle";
40
+ import { DragHandle as Ne } from "@tiptap/extension-drag-handle-react";
41
+ import { Dropcursor as Pe } from "@tiptap/extension-dropcursor";
42
+ import { Emoji as Fe } from "@tiptap/extension-emoji";
43
+ import { FileHandler as Ie } from "@tiptap/extension-file-handler";
44
+ import { Focus as Le } from "@tiptap/extension-focus";
45
+ import { Gapcursor as Re } from "@tiptap/extension-gapcursor";
46
+ import { ListKeymap as ze } from "@tiptap/extension-list-keymap";
47
+ import { TextAlign as Be } from "@tiptap/extension-text-align";
48
+ //#region \0rolldown/runtime.js
49
+ var Ve = Object.defineProperty, He = Object.getOwnPropertyDescriptor, Ue = Object.getOwnPropertyNames, We = Object.prototype.hasOwnProperty, Ge = (e, t) => {
50
+ let n = {};
51
+ for (var r in e) Ve(n, r, {
52
+ get: e[r],
53
+ enumerable: !0
54
+ });
55
+ return t || Ve(n, Symbol.toStringTag, { value: "Module" }), n;
56
+ }, Ke = (e, t, n, r) => {
57
+ if (t && typeof t == "object" || typeof t == "function") for (var i = Ue(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !We.call(e, s) && s !== n && Ve(e, s, {
58
+ get: ((e) => t[e]).bind(null, s),
59
+ enumerable: !(r = He(t, s)) || r.enumerable
60
+ });
61
+ return e;
62
+ }, Y = (e, t, n) => (Ke(e, t, "default"), n && Ke(n, t, "default")), X = /* @__PURE__ */ Ge({
63
+ BulletList: () => V,
64
+ CharacterCount: () => je,
65
+ CodeBlock: () => ge,
66
+ Color: () => H,
67
+ Details: () => _e,
68
+ DetailsContent: () => ve,
69
+ DetailsSummary: () => ye,
70
+ Document: () => U,
71
+ DragHandle: () => Me,
72
+ DragHandleReact: () => Ne,
73
+ Dropcursor: () => Pe,
74
+ Emoji: () => Fe,
75
+ FileHandler: () => Ie,
76
+ Focus: () => Le,
77
+ Gapcursor: () => Re,
78
+ HardBreak: () => W,
79
+ Heading: () => G,
80
+ Highlight: () => K,
81
+ HorizontalRule: () => be,
82
+ Image: () => xe,
83
+ Link: () => q,
84
+ ListItem: () => J,
85
+ ListKeymap: () => ze,
86
+ Mention: () => Se,
87
+ OrderedList: () => se,
88
+ Paragraph: () => ce,
89
+ Subscript: () => le,
90
+ Superscript: () => ue,
91
+ Table: () => Ee,
92
+ TableCell: () => De,
93
+ TableHeader: () => Oe,
94
+ TableRow: () => ke,
95
+ Text: () => de,
96
+ TextAlign: () => Be,
97
+ TextStyle: () => fe,
98
+ Typography: () => pe,
99
+ Underline: () => me,
100
+ UniqueID: () => he,
101
+ Youtube: () => Ae
102
+ });
103
+ import * as qe from "@tiptap/core";
104
+ Y(X, qe);
105
+ import * as Je from "@tiptap/extensions";
106
+ Y(X, Je);
107
+ import * as Ye from "@tiptap/react";
108
+ Y(X, Ye);
109
+ import * as Xe from "@tiptap/starter-kit";
110
+ Y(X, Xe);
111
+ //#endregion
112
+ //#region ../../libraries/react-collection/dist/components/editor/extensionKit.js
113
+ var Ze = (e = { placeholder: "Write something ..." }) => [
114
+ X.StarterKit.configure({
115
+ blockquote: !1,
116
+ codeBlock: !1,
117
+ horizontalRule: !1,
118
+ dropcursor: { width: 2 },
119
+ link: {
120
+ openOnClick: !1,
121
+ HTMLAttributes: { target: "_blank" }
122
+ }
123
+ }),
124
+ X.Placeholder.configure({ placeholder: e?.placeholder }),
125
+ pe,
126
+ X.Selection,
127
+ ue,
128
+ le,
129
+ t,
130
+ he.configure({ types: [
131
+ "paragraph",
132
+ "heading",
133
+ "bulletList",
134
+ "orderedList"
135
+ ] })
136
+ ], Z = f((t, n) => {
137
+ let o = d(27), s, c, l, u, f, p, m;
138
+ o[0] === t ? (s = o[1], c = o[2], l = o[3], u = o[4], f = o[5], p = o[6], m = o[7]) : ({label: u, Icon: s, isActive: l, iconSize: p, trailing: m, className: c, ...f} = t, o[0] = t, o[1] = s, o[2] = c, o[3] = l, o[4] = u, o[5] = f, o[6] = p, o[7] = m);
139
+ let h = p === void 0 ? 16 : p, y = l || void 0, b = l && "_1vaxhty0", x;
140
+ o[8] !== c || o[9] !== b ? (x = v(b, c), o[8] = c, o[9] = b, o[10] = x) : x = o[10];
141
+ let S;
142
+ o[11] !== s || o[12] !== h ? (S = /* @__PURE__ */ g(s, { size: h }), o[11] = s, o[12] = h, o[13] = S) : S = o[13];
143
+ let C;
144
+ o[14] !== u || o[15] !== f || o[16] !== n || o[17] !== y || o[18] !== x || o[19] !== S || o[20] !== m ? (C = /* @__PURE__ */ g(r, {
145
+ onPointerDown: Qe,
146
+ render: /* @__PURE__ */ _(e, {
147
+ ref: n,
148
+ type: "button",
149
+ variant: "ghost",
150
+ size: "sm",
151
+ tabIndex: -1,
152
+ "aria-label": u,
153
+ "aria-pressed": y,
154
+ className: x,
155
+ ...f,
156
+ children: [S, m]
157
+ })
158
+ }), o[14] = u, o[15] = f, o[16] = n, o[17] = y, o[18] = x, o[19] = S, o[20] = m, o[21] = C) : C = o[21];
159
+ let w;
160
+ o[22] === u ? w = o[23] : (w = /* @__PURE__ */ g(i, { children: u }), o[22] = u, o[23] = w);
161
+ let T;
162
+ return o[24] !== C || o[25] !== w ? (T = /* @__PURE__ */ _(a, { children: [C, w] }), o[24] = C, o[25] = w, o[26] = T) : T = o[26], T;
163
+ });
164
+ Z.displayName = "ToolbarButton";
165
+ function Qe(e) {
166
+ return e.preventDefault();
167
+ }
168
+ //#endregion
169
+ //#region ../../libraries/react-collection/dist/components/editor/Toolbar.cssm.js
170
+ var $e = "_261ja30", Q = "_261ja31", et = [
171
+ "paragraph",
172
+ "heading",
173
+ "bulletList",
174
+ "orderedList",
175
+ "taskList",
176
+ "codeBlock"
177
+ ], tt = [
178
+ "tableCell",
179
+ "tableHeader",
180
+ "quoteCaption",
181
+ "detailsSummary"
182
+ ], nt = (e) => {
183
+ if (!e) return !1;
184
+ let { $from: t } = e.state.selection;
185
+ for (let e = t.depth; e > 0; e--) if (tt.includes(t.node(e).type.name)) return !0;
186
+ return !1;
187
+ }, rt = (e, t) => {
188
+ if (!e || t.length === 0) return !1;
189
+ let { selection: n } = e.state, r = new Set(t);
190
+ if (n instanceof we) {
191
+ let e = n.node?.type?.name;
192
+ return !!e && r.has(e);
193
+ }
194
+ if (n instanceof Te || n instanceof Ce) {
195
+ let t = !0;
196
+ return e.state.doc.nodesBetween(n.from, n.to, (e) => e.isTextblock && !r.has(e.type.name) ? (t = !1, !1) : t), t;
197
+ }
198
+ return !1;
199
+ }, it = /[\0-\x20\xA0\u1680\u180E\u2000-\u2029\u205F\u3000]/g, at = [
200
+ "http",
201
+ "https",
202
+ "ftp",
203
+ "ftps",
204
+ "mailto",
205
+ "tel",
206
+ "callto",
207
+ "sms"
208
+ ], ot = (e, t) => {
209
+ try {
210
+ let n = new URL(e, t), r = n.href.replace(it, ""), i = RegExp(`^(?:(?:${at.join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`, "i");
211
+ if (r.match(i)) return n.href;
212
+ } catch {}
213
+ return "#";
214
+ }, st = (e, t = []) => {
215
+ let { tr: n } = e.state, { selection: r } = n;
216
+ return r.empty ? !1 : (r.ranges.forEach((e) => {
217
+ n.doc.nodesBetween(e.$from.pos, e.$to.pos, (e, r) => (e.isInline && e.marks.forEach((i) => {
218
+ t.includes(i.type.name) || n.removeMark(r, r + e.nodeSize, i.type);
219
+ }), !0));
220
+ }), e.view.dispatch(n), e.commands.focus(), !0);
221
+ }, ct = (e) => {
222
+ let { selection: t } = e.state;
223
+ if (t.empty) return !1;
224
+ for (let n of t.ranges) {
225
+ let t = !1;
226
+ if (e.state.doc.nodesBetween(n.$from.pos, n.$to.pos, (e) => e.isInline && e.marks.length > 0 ? (t = !0, !1) : !0), t) return !0;
227
+ }
228
+ return !1;
229
+ }, lt = "j67x6z0", ut = "j67x6z1", dt = "_5pk5r80", ft = (e) => {
230
+ let t = d(50), { editor: n } = e, [f, h] = m(!1), { isActive: v, currentUrl: y } = (0, X.useEditorState)({
231
+ editor: n,
232
+ selector: pt
233
+ }) ?? {
234
+ isActive: !1,
235
+ currentUrl: ""
236
+ }, [b, x] = m(y), S, C;
237
+ t[0] !== y || t[1] !== f ? (S = () => {
238
+ f && x(y);
239
+ }, C = [f, y], t[0] = y, t[1] = f, t[2] = S, t[3] = C) : (S = t[2], C = t[3]), p(S, C);
240
+ let w;
241
+ t[4] !== n || t[5] !== b ? (w = () => {
242
+ b && (n.chain().focus().extendMarkRange("link").setLink({ href: b }).run(), h(!1));
243
+ }, t[4] = n, t[5] = b, t[6] = w) : w = t[6];
244
+ let T = w, E;
245
+ t[7] === n ? E = t[8] : (E = () => {
246
+ n.chain().focus().extendMarkRange("link").unsetLink().run(), x(""), h(!1);
247
+ }, t[7] = n, t[8] = E);
248
+ let ee = E, D;
249
+ t[9] === b ? D = t[10] : (D = () => {
250
+ let e = ot(b, window.location.href);
251
+ e !== "#" && window.open(e, "_blank", "noopener,noreferrer");
252
+ }, t[9] = b, t[10] = D);
253
+ let re = D, O;
254
+ t[11] === Symbol.for("react.memo_cache_sentinel") ? (O = (e) => {
255
+ e.preventDefault(), h(!0);
256
+ }, t[11] = O) : O = t[11];
257
+ let k;
258
+ t[12] === v ? k = t[13] : (k = /* @__PURE__ */ g(l, {
259
+ onPointerDown: mt,
260
+ render: /* @__PURE__ */ g(Z, {
261
+ label: "Link",
262
+ Icon: ie,
263
+ isActive: v,
264
+ onClick: O
265
+ })
266
+ }), t[12] = v, t[13] = k);
267
+ let A;
268
+ t[14] === Symbol.for("react.memo_cache_sentinel") ? (A = (e) => x(e.target.value), t[14] = A) : A = t[14];
269
+ let j;
270
+ t[15] === T ? j = t[16] : (j = (e) => {
271
+ e.key === "Enter" && (e.preventDefault(), T());
272
+ }, t[15] = T, t[16] = j);
273
+ let M;
274
+ t[17] !== j || t[18] !== b ? (M = /* @__PURE__ */ g("input", {
275
+ className: ut,
276
+ value: b,
277
+ onChange: A,
278
+ onKeyDown: j,
279
+ placeholder: "Paste a link..."
280
+ }), t[17] = j, t[18] = b, t[19] = M) : M = t[19];
281
+ let N = !b && !v, P;
282
+ t[20] === Symbol.for("react.memo_cache_sentinel") ? (P = /* @__PURE__ */ g(te, { size: 16 }), t[20] = P) : P = t[20];
283
+ let F;
284
+ t[21] !== T || t[22] !== N ? (F = /* @__PURE__ */ g(r, { render: /* @__PURE__ */ g("button", {
285
+ type: "button",
286
+ className: dt,
287
+ onClick: T,
288
+ disabled: N,
289
+ "aria-label": "Apply link",
290
+ children: P
291
+ }) }), t[21] = T, t[22] = N, t[23] = F) : F = t[23];
292
+ let I;
293
+ t[24] === Symbol.for("react.memo_cache_sentinel") ? (I = /* @__PURE__ */ g(i, { children: "Apply link" }), t[24] = I) : I = t[24];
294
+ let L;
295
+ t[25] === F ? L = t[26] : (L = /* @__PURE__ */ _(a, { children: [F, I] }), t[25] = F, t[26] = L);
296
+ let ae = !b && !v, R;
297
+ t[27] === Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ g(ne, { size: 16 }), t[27] = R) : R = t[27];
298
+ let z;
299
+ t[28] !== re || t[29] !== ae ? (z = /* @__PURE__ */ g(r, { render: /* @__PURE__ */ g("button", {
300
+ type: "button",
301
+ className: dt,
302
+ onClick: re,
303
+ disabled: ae,
304
+ "aria-label": "Open in new window",
305
+ children: R
306
+ }) }), t[28] = re, t[29] = ae, t[30] = z) : z = t[30];
307
+ let B;
308
+ t[31] === Symbol.for("react.memo_cache_sentinel") ? (B = /* @__PURE__ */ g(i, { children: "Open in new window" }), t[31] = B) : B = t[31];
309
+ let V;
310
+ t[32] === z ? V = t[33] : (V = /* @__PURE__ */ _(a, { children: [z, B] }), t[32] = z, t[33] = V);
311
+ let H = !b && !v, U;
312
+ t[34] === Symbol.for("react.memo_cache_sentinel") ? (U = /* @__PURE__ */ g(oe, { size: 16 }), t[34] = U) : U = t[34];
313
+ let W;
314
+ t[35] !== ee || t[36] !== H ? (W = /* @__PURE__ */ g(r, { render: /* @__PURE__ */ g("button", {
315
+ type: "button",
316
+ className: dt,
317
+ onClick: ee,
318
+ disabled: H,
319
+ "aria-label": "Remove link",
320
+ children: U
321
+ }) }), t[35] = ee, t[36] = H, t[37] = W) : W = t[37];
322
+ let G;
323
+ t[38] === Symbol.for("react.memo_cache_sentinel") ? (G = /* @__PURE__ */ g(i, { children: "Remove link" }), t[38] = G) : G = t[38];
324
+ let K;
325
+ t[39] === W ? K = t[40] : (K = /* @__PURE__ */ _(a, { children: [W, G] }), t[39] = W, t[40] = K);
326
+ let q;
327
+ t[41] !== M || t[42] !== L || t[43] !== V || t[44] !== K ? (q = /* @__PURE__ */ g(s, { children: /* @__PURE__ */ g(u, {
328
+ side: "bottom",
329
+ align: "center",
330
+ children: /* @__PURE__ */ _(o.Popup, {
331
+ className: lt,
332
+ children: [
333
+ M,
334
+ L,
335
+ V,
336
+ K
337
+ ]
338
+ })
339
+ }) }), t[41] = M, t[42] = L, t[43] = V, t[44] = K, t[45] = q) : q = t[45];
340
+ let J;
341
+ return t[46] !== f || t[47] !== q || t[48] !== k ? (J = /* @__PURE__ */ _(c, {
342
+ open: f,
343
+ onOpenChange: h,
344
+ children: [k, q]
345
+ }), t[46] = f, t[47] = q, t[48] = k, t[49] = J) : J = t[49], J;
346
+ };
347
+ function pt(e) {
348
+ let { editor: t } = e;
349
+ return {
350
+ isActive: t.isActive("link"),
351
+ currentUrl: t.getAttributes("link")?.href ?? ""
352
+ };
353
+ }
354
+ function mt(e) {
355
+ return e.preventDefault();
356
+ }
357
+ //#endregion
358
+ //#region ../../libraries/react-collection/dist/components/editor/menus/TurnIntoMenu.cssm.js
359
+ var ht = "_1keigwl0", gt = "_1keigwl1 _5pk5r80", $ = (e) => (t) => t.chain().focus().setHeading({ level: e }).run(), _t = [
360
+ {
361
+ type: "paragraph",
362
+ label: "Text",
363
+ Icon: I,
364
+ isActive: (e) => e.isActive("paragraph"),
365
+ canApply: (e) => e.can().setParagraph() || e.can().clearNodes(),
366
+ apply: (e) => e.chain().focus().setParagraph().run()
367
+ },
368
+ {
369
+ type: "heading_1",
370
+ label: "Heading 1",
371
+ Icon: D,
372
+ isActive: (e) => e.isActive("heading", { level: 1 }),
373
+ canApply: (e) => e.can().setHeading({ level: 1 }) || e.can().clearNodes(),
374
+ apply: $(1)
375
+ },
376
+ {
377
+ type: "heading_2",
378
+ label: "Heading 2",
379
+ Icon: re,
380
+ isActive: (e) => e.isActive("heading", { level: 2 }),
381
+ canApply: (e) => e.can().setHeading({ level: 2 }) || e.can().clearNodes(),
382
+ apply: $(2)
383
+ },
384
+ {
385
+ type: "heading_3",
386
+ label: "Heading 3",
387
+ Icon: O,
388
+ isActive: (e) => e.isActive("heading", { level: 3 }),
389
+ canApply: (e) => e.can().setHeading({ level: 3 }) || e.can().clearNodes(),
390
+ apply: $(3)
391
+ },
392
+ {
393
+ type: "heading_4",
394
+ label: "Heading 4",
395
+ Icon: k,
396
+ isActive: (e) => e.isActive("heading", { level: 4 }),
397
+ canApply: (e) => e.can().setHeading({ level: 4 }) || e.can().clearNodes(),
398
+ apply: $(4)
399
+ },
400
+ {
401
+ type: "heading_5",
402
+ label: "Heading 5",
403
+ Icon: A,
404
+ isActive: (e) => e.isActive("heading", { level: 5 }),
405
+ canApply: (e) => e.can().setHeading({ level: 5 }) || e.can().clearNodes(),
406
+ apply: $(5)
407
+ },
408
+ {
409
+ type: "heading_6",
410
+ label: "Heading 6",
411
+ Icon: j,
412
+ isActive: (e) => e.isActive("heading", { level: 6 }),
413
+ canApply: (e) => e.can().setHeading({ level: 6 }) || e.can().clearNodes(),
414
+ apply: $(6)
415
+ },
416
+ {
417
+ type: "bulletList",
418
+ label: "Bullet List",
419
+ Icon: N,
420
+ isActive: (e) => e.isActive("bulletList"),
421
+ canApply: (e) => e.can().toggleBulletList() || e.can().clearNodes(),
422
+ apply: (e) => e.chain().focus().toggleBulletList().run()
423
+ },
424
+ {
425
+ type: "orderedList",
426
+ label: "Ordered List",
427
+ Icon: P,
428
+ isActive: (e) => e.isActive("orderedList"),
429
+ canApply: (e) => e.can().toggleOrderedList() || e.can().clearNodes(),
430
+ apply: (e) => e.chain().focus().toggleOrderedList().run()
431
+ }
432
+ ], vt = (e) => {
433
+ let t = d(19), { editor: n } = e, [r, i] = m(!1), { activeBlock: a, canConvert: f, structural: p } = (0, X.useEditorState)({
434
+ editor: n,
435
+ selector: yt
436
+ }) ?? {
437
+ activeBlock: null,
438
+ canConvert: !1,
439
+ structural: !1
440
+ }, h = a?.Icon ?? F, v = a?.label ?? "Turn Into", y = p || !f, b, x;
441
+ t[0] === Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ g(E, { size: 12 }), x = (e) => {
442
+ e.preventDefault(), i(!0);
443
+ }, t[0] = b, t[1] = x) : (b = t[0], x = t[1]);
444
+ let S;
445
+ t[2] !== h || t[3] !== y || t[4] !== v ? (S = /* @__PURE__ */ g(l, {
446
+ onPointerDown: bt,
447
+ render: /* @__PURE__ */ g(Z, {
448
+ label: v,
449
+ Icon: h,
450
+ disabled: y,
451
+ trailing: b,
452
+ onClick: x
453
+ })
454
+ }), t[2] = h, t[3] = y, t[4] = v, t[5] = S) : S = t[5];
455
+ let C;
456
+ if (t[6] !== a?.type || t[7] !== n) {
457
+ let e;
458
+ t[9] === a?.type ? e = t[10] : (e = (e) => a?.type !== e.type, t[9] = a?.type, t[10] = e);
459
+ let r;
460
+ t[11] === n ? r = t[12] : (r = (e) => /* @__PURE__ */ _("button", {
461
+ type: "button",
462
+ className: gt,
463
+ disabled: !e.canApply(n),
464
+ onClick: () => {
465
+ e.apply(n), i(!1);
466
+ },
467
+ children: [/* @__PURE__ */ g(e.Icon, { size: 16 }), /* @__PURE__ */ g("span", { children: e.label })]
468
+ }, e.type), t[11] = n, t[12] = r), C = _t.filter(e).map(r), t[6] = a?.type, t[7] = n, t[8] = C;
469
+ } else C = t[8];
470
+ let w;
471
+ t[13] === C ? w = t[14] : (w = /* @__PURE__ */ g(s, { children: /* @__PURE__ */ g(u, {
472
+ side: "bottom",
473
+ align: "start",
474
+ children: /* @__PURE__ */ g(o.Popup, {
475
+ className: ht,
476
+ children: C
477
+ })
478
+ }) }), t[13] = C, t[14] = w);
479
+ let T;
480
+ return t[15] !== r || t[16] !== S || t[17] !== w ? (T = /* @__PURE__ */ _(c, {
481
+ open: r,
482
+ onOpenChange: i,
483
+ children: [S, w]
484
+ }), t[15] = r, t[16] = S, t[17] = w, t[18] = T) : T = t[18], T;
485
+ };
486
+ function yt(e) {
487
+ let { editor: t } = e;
488
+ return {
489
+ activeBlock: _t.find((e) => e.isActive(t)) ?? null,
490
+ canConvert: rt(t, et),
491
+ structural: nt(t)
492
+ };
493
+ }
494
+ function bt(e) {
495
+ return e.preventDefault();
496
+ }
497
+ //#endregion
498
+ //#region ../../libraries/react-collection/dist/components/editor/Toolbar.js
499
+ var xt = [
500
+ {
501
+ mark: "bold",
502
+ label: "Bold",
503
+ Icon: T
504
+ },
505
+ {
506
+ mark: "italic",
507
+ label: "Italic",
508
+ Icon: M
509
+ },
510
+ {
511
+ mark: "underline",
512
+ label: "Underline",
513
+ Icon: B
514
+ },
515
+ {
516
+ mark: "strike",
517
+ label: "Strike",
518
+ Icon: ae
519
+ },
520
+ {
521
+ mark: "code",
522
+ label: "Code",
523
+ Icon: ee
524
+ }
525
+ ], St = [{
526
+ mark: "superscript",
527
+ label: "Superscript",
528
+ Icon: z
529
+ }, {
530
+ mark: "subscript",
531
+ label: "Subscript",
532
+ Icon: R
533
+ }], Ct = [
534
+ {
535
+ align: "left",
536
+ label: "Align left",
537
+ Icon: x
538
+ },
539
+ {
540
+ align: "center",
541
+ label: "Align center",
542
+ Icon: y
543
+ },
544
+ {
545
+ align: "right",
546
+ label: "Align right",
547
+ Icon: S
548
+ },
549
+ {
550
+ align: "justify",
551
+ label: "Align justify",
552
+ Icon: b
553
+ }
554
+ ], wt = (e) => {
555
+ let t = d(9), { editor: n, mark: r, label: i, Icon: a } = e, { isActive: o, canExecute: s } = (0, X.useEditorState)({
556
+ editor: n,
557
+ selector: (e) => {
558
+ let { editor: t } = e;
559
+ return {
560
+ isActive: t.isActive(r),
561
+ canExecute: t.isEditable && t.can().toggleMark(r)
562
+ };
563
+ }
564
+ }) ?? {
565
+ isActive: !1,
566
+ canExecute: !1
567
+ }, c = !s, l;
568
+ t[0] !== n || t[1] !== r ? (l = () => n.chain().focus().toggleMark(r).run(), t[0] = n, t[1] = r, t[2] = l) : l = t[2];
569
+ let u;
570
+ return t[3] !== a || t[4] !== o || t[5] !== i || t[6] !== c || t[7] !== l ? (u = /* @__PURE__ */ g(Z, {
571
+ label: i,
572
+ Icon: a,
573
+ isActive: o,
574
+ disabled: c,
575
+ onClick: l
576
+ }), t[3] = a, t[4] = o, t[5] = i, t[6] = c, t[7] = l, t[8] = u) : u = t[8], u;
577
+ }, Tt = (e) => {
578
+ let t = d(9), { editor: n, align: r, label: i, Icon: a } = e, { isActive: o, canExecute: s } = (0, X.useEditorState)({
579
+ editor: n,
580
+ selector: (e) => {
581
+ let { editor: t } = e;
582
+ return {
583
+ isActive: t.isActive({ textAlign: r }),
584
+ canExecute: t.isEditable && t.can().setNodeTextAlign(r)
585
+ };
586
+ }
587
+ }) ?? {
588
+ isActive: !1,
589
+ canExecute: !1
590
+ }, c = !s, l;
591
+ t[0] !== r || t[1] !== n ? (l = () => n.chain().focus().setNodeTextAlign(r).run(), t[0] = r, t[1] = n, t[2] = l) : l = t[2];
592
+ let u;
593
+ return t[3] !== a || t[4] !== o || t[5] !== i || t[6] !== c || t[7] !== l ? (u = /* @__PURE__ */ g(Z, {
594
+ label: i,
595
+ Icon: a,
596
+ isActive: o,
597
+ disabled: c,
598
+ onClick: l
599
+ }), t[3] = a, t[4] = o, t[5] = i, t[6] = c, t[7] = l, t[8] = u) : u = t[8], u;
600
+ }, Et = (e) => {
601
+ let t = d(5), { editor: n } = e, r = !((0, X.useEditorState)({
602
+ editor: n,
603
+ selector: At
604
+ }) ?? !1), i;
605
+ t[0] === n ? i = t[1] : (i = () => n.chain().focus().undo().run(), t[0] = n, t[1] = i);
606
+ let a;
607
+ return t[2] !== r || t[3] !== i ? (a = /* @__PURE__ */ g(Z, {
608
+ label: "Undo",
609
+ Icon: C,
610
+ disabled: r,
611
+ onClick: i
612
+ }), t[2] = r, t[3] = i, t[4] = a) : a = t[4], a;
613
+ }, Dt = (e) => {
614
+ let t = d(5), { editor: n } = e, r = !((0, X.useEditorState)({
615
+ editor: n,
616
+ selector: jt
617
+ }) ?? !1), i;
618
+ t[0] === n ? i = t[1] : (i = () => n.chain().focus().redo().run(), t[0] = n, t[1] = i);
619
+ let a;
620
+ return t[2] !== r || t[3] !== i ? (a = /* @__PURE__ */ g(Z, {
621
+ label: "Redo",
622
+ Icon: w,
623
+ disabled: r,
624
+ onClick: i
625
+ }), t[2] = r, t[3] = i, t[4] = a) : a = t[4], a;
626
+ }, Ot = (e) => {
627
+ let t = d(5), { editor: n } = e, r = !((0, X.useEditorState)({
628
+ editor: n,
629
+ selector: Mt
630
+ }) ?? !1), i;
631
+ t[0] === n ? i = t[1] : (i = () => st(n), t[0] = n, t[1] = i);
632
+ let a;
633
+ return t[2] !== r || t[3] !== i ? (a = /* @__PURE__ */ g(Z, {
634
+ label: "Reset formatting",
635
+ Icon: L,
636
+ disabled: r,
637
+ onClick: i
638
+ }), t[2] = r, t[3] = i, t[4] = a) : a = t[4], a;
639
+ }, kt = (e) => {
640
+ let t = d(33), { children: r } = e, { editor: i } = (0, X.useCurrentEditor)();
641
+ if (!i) return null;
642
+ let a;
643
+ t[0] === i ? a = t[1] : (a = /* @__PURE__ */ g("div", {
644
+ className: Q,
645
+ children: /* @__PURE__ */ g(vt, { editor: i })
646
+ }), t[0] = i, t[1] = a);
647
+ let o;
648
+ t[2] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ g(n, { orientation: "vertical" }), t[2] = o) : o = t[2];
649
+ let s;
650
+ t[3] === i ? s = t[4] : (s = xt.map((e) => /* @__PURE__ */ g(wt, {
651
+ editor: i,
652
+ ...e
653
+ }, e.mark)), t[3] = i, t[4] = s);
654
+ let c;
655
+ t[5] === s ? c = t[6] : (c = /* @__PURE__ */ g("div", {
656
+ className: Q,
657
+ children: s
658
+ }), t[5] = s, t[6] = c);
659
+ let l;
660
+ t[7] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ g(n, { orientation: "vertical" }), t[7] = l) : l = t[7];
661
+ let u;
662
+ t[8] === i ? u = t[9] : (u = /* @__PURE__ */ g("div", {
663
+ className: Q,
664
+ children: /* @__PURE__ */ g(ft, { editor: i })
665
+ }), t[8] = i, t[9] = u);
666
+ let f;
667
+ t[10] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ g(n, { orientation: "vertical" }), t[10] = f) : f = t[10];
668
+ let p;
669
+ t[11] === i ? p = t[12] : (p = Ct.map((e) => /* @__PURE__ */ g(Tt, {
670
+ editor: i,
671
+ ...e
672
+ }, e.align)), t[11] = i, t[12] = p);
673
+ let m;
674
+ t[13] === p ? m = t[14] : (m = /* @__PURE__ */ g("div", {
675
+ className: Q,
676
+ children: p
677
+ }), t[13] = p, t[14] = m);
678
+ let v;
679
+ t[15] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ g(n, { orientation: "vertical" }), t[15] = v) : v = t[15];
680
+ let y;
681
+ t[16] === i ? y = t[17] : (y = St.map((e) => /* @__PURE__ */ g(wt, {
682
+ editor: i,
683
+ ...e
684
+ }, e.mark)), t[16] = i, t[17] = y);
685
+ let b;
686
+ t[18] === y ? b = t[19] : (b = /* @__PURE__ */ g("div", {
687
+ className: Q,
688
+ children: y
689
+ }), t[18] = y, t[19] = b);
690
+ let x;
691
+ t[20] === Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ g(n, { orientation: "vertical" }), t[20] = x) : x = t[20];
692
+ let S;
693
+ t[21] === i ? S = t[22] : (S = /* @__PURE__ */ _("div", {
694
+ className: Q,
695
+ children: [
696
+ /* @__PURE__ */ g(Ot, { editor: i }),
697
+ /* @__PURE__ */ g(Et, { editor: i }),
698
+ /* @__PURE__ */ g(Dt, { editor: i })
699
+ ]
700
+ }), t[21] = i, t[22] = S);
701
+ let C;
702
+ t[23] === r ? C = t[24] : (C = r && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(n, { orientation: "vertical" }), /* @__PURE__ */ g("div", {
703
+ className: "_261ja31",
704
+ children: r
705
+ })] }), t[23] = r, t[24] = C);
706
+ let w;
707
+ return t[25] !== a || t[26] !== b || t[27] !== S || t[28] !== C || t[29] !== c || t[30] !== u || t[31] !== m ? (w = /* @__PURE__ */ _("div", {
708
+ className: $e,
709
+ children: [
710
+ a,
711
+ o,
712
+ c,
713
+ l,
714
+ u,
715
+ f,
716
+ m,
717
+ v,
718
+ b,
719
+ x,
720
+ S,
721
+ C
722
+ ]
723
+ }), t[25] = a, t[26] = b, t[27] = S, t[28] = C, t[29] = c, t[30] = u, t[31] = m, t[32] = w) : w = t[32], w;
724
+ };
725
+ function At(e) {
726
+ let { editor: t } = e;
727
+ return t.isEditable && t.can().undo();
728
+ }
729
+ function jt(e) {
730
+ let { editor: t } = e;
731
+ return t.isEditable && t.can().redo();
732
+ }
733
+ function Mt(e) {
734
+ let { editor: t } = e;
735
+ return t.isEditable && ct(t);
736
+ }
737
+ //#endregion
738
+ export { Ge as a, X as i, Z as n, Ze as r, kt as t };