@nxgt/material 3.65.0 → 3.67.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/CHANGELOG.md +28 -0
- package/README.md +6 -2
- package/dist/{alert-dialog-C0nGUSCP.js → alert-dialog-BgQDxcYh.js} +1 -1
- package/dist/{async-slice-CyansBvD.js → async-slice-BCZyWgGr.js} +48 -25
- package/dist/{background-qdnet2A5.js → background-D1gC4m2R.js} +1 -1
- package/dist/backgrounds.js +1 -1
- package/dist/{button-D5k3K-gM.js → button-2de_lrix.js} +1 -1
- package/dist/charts.js +3 -3
- package/dist/{chip-lWXIJkqo.js → chip-Cs0uEjpu.js} +2 -2
- package/dist/{code-editor-aXG4CdY-.js → code-editor-BYhBAfcc.js} +5 -5
- package/dist/code-editor.js +5 -5
- package/dist/{code-language-items-CsaXyApg.js → code-language-items-xhmbF6wA.js} +2 -2
- package/dist/components/components.css +2 -0
- package/dist/components/ui/layout/app-shell/activity-backdrop.css +4 -3
- package/dist/components/ui/primitives/tabs/tabs-nav-forced.css +27 -0
- package/dist/components/ui/primitives/toggle-group/toggle-group-segmented.css +10 -2
- package/dist/components/ui/primitives/toggle-group/toggle-group.css +5 -1
- package/dist/{components-DNcTvjlv.js → components-BRWaX4Xk.js} +17477 -17205
- package/dist/components.js +28 -28
- package/dist/{compose-refs-DZ0iIVF-.js → compose-refs-G4J4kaUA.js} +1 -1
- package/dist/{dialog-DWNaxpa-.js → dialog-Co5oksU1.js} +4 -4
- package/dist/dnd.js +2 -2
- package/dist/{dropdown-menu-ChvAIQIW.js → dropdown-menu-DdzyvN76.js} +1 -1
- package/dist/editor.js +365 -365
- package/dist/{empty-state-CFLcVzKL.js → empty-state-CQ0CV0kA.js} +2 -2
- package/dist/{field-blur-CV9orzdJ.js → field-blur-B2y-bNYi.js} +1 -1
- package/dist/{field-blur-context-C8BX8IBy.js → field-blur-context-BZtwcPUV.js} +1 -1
- package/dist/{hooks-DilW-3jc.js → hooks-DjuYsY-j.js} +2 -2
- package/dist/hooks.js +2 -2
- package/dist/{hover-card-IeS_1RPH.js → hover-card-BeBVy6tB.js} +1 -1
- package/dist/i18n.js +3 -3
- package/dist/{icon-badge-Bf4SoA2i.js → icon-badge-DbYsbzwZ.js} +3 -3
- package/dist/{icon-button-l3dQTRrC.js → icon-button-Co6ttdv1.js} +1 -1
- package/dist/lib/components/ui/actions/back-link/back-link.d.ts +10 -0
- package/dist/lib/components/ui/actions/back-link/index.d.ts +1 -0
- package/dist/lib/components/ui/actions/index.d.ts +2 -0
- package/dist/lib/components/ui/actions/link/link.d.ts +1 -19
- package/dist/lib/components/ui/actions/share-button/index.d.ts +3 -0
- package/dist/lib/components/ui/actions/share-button/share-button.d.ts +17 -0
- package/dist/lib/components/ui/actions/share-button/share-or-copy.d.ts +17 -0
- package/dist/lib/components/ui/collections/dnd/index.d.ts +1 -1
- package/dist/lib/components/ui/collections/row-menu/index.d.ts +1 -0
- package/dist/lib/components/ui/collections/row-menu/row-menu.d.ts +6 -1
- package/dist/lib/components/ui/collections/row-menu/use-row-menu-focus.d.ts +30 -0
- package/dist/lib/components/ui/display/enrolment-card/use-enrolment-card-labels.d.ts +1 -1
- package/dist/lib/components/ui/display/recovery-codes/use-recovery-codes-labels.d.ts +1 -1
- package/dist/lib/components/ui/display/recovery-codes-status/use-recovery-codes-status-labels.d.ts +1 -1
- package/dist/lib/components/ui/display/stat-card/partials/stat-card-link-parts.d.ts +7 -0
- package/dist/lib/components/ui/display/stat-card/stat-card.d.ts +6 -1
- package/dist/lib/components/ui/display/stat-card/types.d.ts +14 -0
- package/dist/lib/components/ui/feedback/step-up-dialog/use-step-up-labels.d.ts +1 -1
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/fields/number-field/number-control.d.ts +4 -1
- package/dist/lib/components/ui/fields/number-field/number-stepper.d.ts +5 -0
- package/dist/lib/components/ui/fields/verification-code/use-verification-labels.d.ts +1 -1
- package/dist/lib/components/ui/layout/app-shell/route-transition.d.ts +1 -1
- package/dist/lib/components/ui/media/media-player-host/use-host-engine.d.ts +1 -1
- package/dist/lib/components/ui/primitives/link/link-component-provider.d.ts +1 -1
- package/dist/lib/components/ui/primitives/link/nav-current.d.ts +22 -0
- package/dist/lib/components/ui/primitives/link/router-link.d.ts +25 -0
- package/dist/lib/components/ui/primitives/tabs/index.d.ts +2 -0
- package/dist/lib/components/ui/primitives/tabs/internal.d.ts +2 -0
- package/dist/lib/components/ui/primitives/tabs/partials/tabs-nav-link.d.ts +22 -0
- package/dist/lib/components/ui/primitives/tabs/tab-param-url.d.ts +53 -0
- package/dist/lib/components/ui/primitives/tabs/tabs-nav.d.ts +22 -0
- package/dist/lib/components/ui/primitives/tabs/tabs-selectors.d.ts +8 -0
- package/dist/lib/components/ui/primitives/tabs/use-tab-param.d.ts +35 -0
- package/dist/lib/components/ui/primitives/tabs/use-tabs-overflow.d.ts +4 -1
- package/dist/lib/components/ui/primitives/toggle-group/index.d.ts +1 -0
- package/dist/lib/components/ui/primitives/toggle-group/segmented-nav-item.d.ts +20 -0
- package/dist/lib/components/ui/primitives/toggle-group/segmented-nav.d.ts +22 -0
- package/dist/lib/components/ui/primitives/toggle-group/toggle-group.d.ts +4 -3
- package/dist/lib/i18n/resources/en/en.d.ts +5 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +6 -1
- package/dist/lib/i18n/resources/fr/fr.d.ts +5 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +6 -1
- package/dist/lib/i18n/resources/resources.d.ts +10 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib.js +31 -54
- package/dist/main.js +42 -42
- package/dist/map.js +8 -8
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/print.js +1 -1
- package/dist/{public-B-greXGt.js → public-AXwv1h3v.js} +10 -10
- package/dist/{rich-code-block-Cv6s59vB.js → rich-code-block-qSvkA5rI.js} +5 -5
- package/dist/{sortable-provider-DVmZcglU.js → sortable-provider-DPk-RVEU.js} +3 -3
- package/dist/{spinner-OQAweH2r.js → spinner-PdSk7zEs.js} +1 -1
- package/dist/theme-picker.js +2 -2
- package/dist/{theme-toggle-DPx44p6a.js → theme-toggle-CZQckLDd.js} +2 -2
- package/dist/{toggle-group-BkH23Jk4.js → toggle-group-DXXlqid2.js} +1 -1
- package/dist/{toolbar-items-CQ3S_XZw.js → toolbar-items-BmNYNaRB.js} +3 -3
- package/dist/{translate-material-BHL4g2UB.js → translate-material-BlCQ6AW9.js} +1 -1
- package/dist/{translator-BJsjXcAp.js → translator-ChpeKCO3.js} +8 -2
- package/dist/{typography-CwhEwPay.js → typography-C4JSRr2B.js} +1 -1
- package/dist/{use-chat-composer-R0vng5RU.js → use-chat-composer-OUa9akfM.js} +1725 -1719
- package/dist/{use-heading-spy-Brcn0l_J.js → use-heading-spy-K-HUp4o_.js} +4 -4
- package/dist/{use-material-translation-mY3U83TV.js → use-material-translation-DkE9J5NE.js} +1 -1
- package/dist/{use-return-focus-BQ413TNG.js → use-return-focus-KypnR7vv.js} +1 -1
- package/docs/components/README.md +3 -1
- package/docs/components/buttons-and-actions.md +50 -0
- package/docs/components/data-display.md +14 -1
- package/docs/components/data-table-filter-and-lists.md +68 -4
- package/docs/components/form-fields.md +9 -1
- package/docs/components/primitives.md +209 -0
- package/docs/previews/buttons-actions-backlink.webp +0 -0
- package/docs/previews/buttons-actions-sharebutton.webp +0 -0
- package/docs/previews/primitives-segmentednav.webp +0 -0
- package/docs/previews/primitives-tabsnav.webp +0 -0
- package/docs/roadmap.md +2 -1
- package/docs/troubleshooting.md +42 -3
- package/lib/components/components.css +2 -0
- package/lib/components/ui/layout/app-shell/activity-backdrop.css +4 -3
- package/lib/components/ui/primitives/tabs/tabs-nav-forced.css +27 -0
- package/lib/components/ui/primitives/toggle-group/toggle-group-segmented.css +10 -2
- package/lib/components/ui/primitives/toggle-group/toggle-group.css +5 -1
- package/package.json +1 -1
- /package/dist/lib/{components/ui/collections/dnd → lib}/compose-refs.d.ts +0 -0
package/dist/editor.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { t as e } from "./ui.utils-CAnKTCw5.js";
|
|
2
2
|
import { t } from "./utils-BLfntITJ.js";
|
|
3
|
-
import { $ as n, A as r,
|
|
4
|
-
import { l as
|
|
5
|
-
import { c as
|
|
6
|
-
import { c as
|
|
7
|
-
import { n as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { r as
|
|
11
|
-
import { a as
|
|
12
|
-
import { n as
|
|
13
|
-
import { f as
|
|
14
|
-
import { n as
|
|
15
|
-
import { t as
|
|
16
|
-
import { Ft as
|
|
3
|
+
import { $ as n, A as r, Bn as i, C as a, D as o, E as s, Er as c, G as l, Gn as u, J as d, Jn as f, K as p, Kn as m, M as h, Mn as g, N as _, Nn as v, O as y, On as b, Q as x, R as S, Rn as C, S as w, T, U as E, W as ee, Wn as D, X as te, Xi as ne, Y as re, Yi as ie, Yn as ae, Z as oe, Zi as se, a as ce, ar as le, c as ue, cn as de, cr as O, d as fe, et as pe, g as me, i as he, ir as ge, j as _e, k as ve, kn as ye, l as be, ln as xe, lr as Se, m as Ce, nr as k, or as we, p as Te, q as Ee, qn as De, rr as Oe, s as ke, sn as Ae, t as je, w as Me, x as Ne, z as Pe, zn as Fe } from "./use-chat-composer-OUa9akfM.js";
|
|
4
|
+
import { l as Ie, n as Le, t as Re } from "./alert-dialog-BgQDxcYh.js";
|
|
5
|
+
import { c as ze, i as Be, n as Ve, o as He, r as Ue, s as We, t as Ge, u as A } from "./dropdown-menu-DdzyvN76.js";
|
|
6
|
+
import { c as Ke, o as qe, s as Je } from "./toolbar-items-BmNYNaRB.js";
|
|
7
|
+
import { n as Ye, t as j } from "./button-2de_lrix.js";
|
|
8
|
+
import { t as M } from "./use-material-translation-DkE9J5NE.js";
|
|
9
|
+
import { t as N } from "./icon-button-Co6ttdv1.js";
|
|
10
|
+
import { r as Xe, t as Ze } from "./field-blur-B2y-bNYi.js";
|
|
11
|
+
import { a as Qe, s as P } from "./dist-C3GR7kJd.js";
|
|
12
|
+
import { n as $e, t as et } from "./toggle-group-DXXlqid2.js";
|
|
13
|
+
import { f as tt } from "./dialog-Co5oksU1.js";
|
|
14
|
+
import { n as nt } from "./icon-badge-DbYsbzwZ.js";
|
|
15
|
+
import { t as rt } from "./use-mobile-BDro060N.js";
|
|
16
|
+
import { Ft as it, Ht as at, Nt as ot, Ot as st, St as ct, bt as F, ht as I, mt as L, n as R, wt as z, xt as lt, yt as ut } from "./dist-moutbfbd.js";
|
|
17
17
|
import { t as dt } from "./markdown-Dw_uH7j7.js";
|
|
18
18
|
import { n as ft, r as B, t as pt } from "./create-store-Dqp-PLLn.js";
|
|
19
19
|
import { W as mt, w as ht } from "./youtube-node-A3NPAPgK.js";
|
|
@@ -228,7 +228,7 @@ function Rn(e, t) {
|
|
|
228
228
|
} } }), [e, t]);
|
|
229
229
|
}
|
|
230
230
|
function zn({ editor: e, controller: t, label: n, slot: r = "editor-assistant", locked: i, onDismiss: a, children: o }) {
|
|
231
|
-
let s =
|
|
231
|
+
let s = rt(), c = Rn(e, t);
|
|
232
232
|
return s ? Mt(/* @__PURE__ */ q("section", {
|
|
233
233
|
role: "dialog",
|
|
234
234
|
"aria-label": n,
|
|
@@ -236,10 +236,10 @@ function zn({ editor: e, controller: t, label: n, slot: r = "editor-assistant",
|
|
|
236
236
|
"data-layout": "sheet",
|
|
237
237
|
className: "fixed inset-x-2 bottom-[max(0.5rem,env(safe-area-inset-bottom))] z-50 max-h-[75svh] overflow-y-auto overscroll-contain rounded-2xl border bg-popover p-3 text-popover-foreground shadow-lg",
|
|
238
238
|
children: o
|
|
239
|
-
}), document.body) : /* @__PURE__ */ J(
|
|
239
|
+
}), document.body) : /* @__PURE__ */ J(qe, {
|
|
240
240
|
open: !0,
|
|
241
241
|
onOpenChange: (e) => !e && a("outside"),
|
|
242
|
-
children: [/* @__PURE__ */ q(
|
|
242
|
+
children: [/* @__PURE__ */ q(Je, { virtualRef: c }), /* @__PURE__ */ q(Ke, {
|
|
243
243
|
role: "dialog",
|
|
244
244
|
"aria-label": n,
|
|
245
245
|
"data-slot": r,
|
|
@@ -269,7 +269,7 @@ function Bn(e) {
|
|
|
269
269
|
e.preventDefault(), t[i]?.focus();
|
|
270
270
|
}
|
|
271
271
|
function Vn({ actions: e, hasSelection: t, onChoose: n }) {
|
|
272
|
-
let { t: r } =
|
|
272
|
+
let { t: r } = M(), [i, a] = G(null), o = U(() => Ln(i?.actions ?? e, t), [
|
|
273
273
|
i,
|
|
274
274
|
e,
|
|
275
275
|
t
|
|
@@ -305,7 +305,7 @@ function Vn({ actions: e, hasSelection: t, onChoose: n }) {
|
|
|
305
305
|
});
|
|
306
306
|
}
|
|
307
307
|
function Hn({ onAsk: e }) {
|
|
308
|
-
let { t } =
|
|
308
|
+
let { t } = M(), [n, r] = G(""), i = W(null);
|
|
309
309
|
H(() => i.current?.focus({ preventScroll: !0 }), []);
|
|
310
310
|
let a = () => {
|
|
311
311
|
let t = n.trim();
|
|
@@ -313,7 +313,7 @@ function Hn({ onAsk: e }) {
|
|
|
313
313
|
};
|
|
314
314
|
return /* @__PURE__ */ J("div", {
|
|
315
315
|
className: "flex items-center gap-1.5",
|
|
316
|
-
children: [/* @__PURE__ */ q(
|
|
316
|
+
children: [/* @__PURE__ */ q(tt, {
|
|
317
317
|
ref: i,
|
|
318
318
|
value: n,
|
|
319
319
|
"aria-label": t("material.editor.assistant.ask-label", "Ask the assistant"),
|
|
@@ -323,7 +323,7 @@ function Hn({ onAsk: e }) {
|
|
|
323
323
|
e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(), a());
|
|
324
324
|
},
|
|
325
325
|
className: "h-9 min-w-0 flex-1"
|
|
326
|
-
}), /* @__PURE__ */ q(
|
|
326
|
+
}), /* @__PURE__ */ q(N, {
|
|
327
327
|
variant: "filled",
|
|
328
328
|
"aria-label": t("material.editor.assistant.send", "Send"),
|
|
329
329
|
disabled: !n.trim(),
|
|
@@ -388,12 +388,12 @@ async function Kn(e) {
|
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
390
|
function qn({ text: e }) {
|
|
391
|
-
let { t } =
|
|
391
|
+
let { t } = M(), [n, r] = G(!1);
|
|
392
392
|
return H(() => {
|
|
393
393
|
if (!n) return;
|
|
394
394
|
let e = setTimeout(() => r(!1), 1600);
|
|
395
395
|
return () => clearTimeout(e);
|
|
396
|
-
}, [n]), /* @__PURE__ */ J(
|
|
396
|
+
}, [n]), /* @__PURE__ */ J(j, {
|
|
397
397
|
variant: "ghost",
|
|
398
398
|
size: "sm",
|
|
399
399
|
onClick: async () => r(await Kn(e)),
|
|
@@ -401,18 +401,18 @@ function qn({ text: e }) {
|
|
|
401
401
|
});
|
|
402
402
|
}
|
|
403
403
|
function Jn({ state: e, on: t }) {
|
|
404
|
-
let { t: n } =
|
|
404
|
+
let { t: n } = M(), r = W(null);
|
|
405
405
|
return H(() => r.current?.focus({ preventScroll: !0 }), []), /* @__PURE__ */ J("div", {
|
|
406
406
|
className: "flex flex-wrap items-center gap-1.5",
|
|
407
407
|
children: [
|
|
408
|
-
e.hasSelection && /* @__PURE__ */ J(
|
|
408
|
+
e.hasSelection && /* @__PURE__ */ J(j, {
|
|
409
409
|
ref: r,
|
|
410
410
|
size: "sm",
|
|
411
411
|
disabled: e.applying,
|
|
412
412
|
onClick: () => t.onApply("replace"),
|
|
413
413
|
children: [/* @__PURE__ */ q(ln, {}), n("material.editor.assistant.replace", "Replace selection")]
|
|
414
414
|
}),
|
|
415
|
-
/* @__PURE__ */ J(
|
|
415
|
+
/* @__PURE__ */ J(j, {
|
|
416
416
|
ref: e.hasSelection ? void 0 : r,
|
|
417
417
|
variant: e.hasSelection ? "outlined" : "filled",
|
|
418
418
|
size: "sm",
|
|
@@ -421,14 +421,14 @@ function Jn({ state: e, on: t }) {
|
|
|
421
421
|
children: [/* @__PURE__ */ q(Wt, {}), n("material.editor.assistant.insert-below", "Insert below")]
|
|
422
422
|
}),
|
|
423
423
|
/* @__PURE__ */ q(qn, { text: e.text }),
|
|
424
|
-
/* @__PURE__ */ J(
|
|
424
|
+
/* @__PURE__ */ J(j, {
|
|
425
425
|
variant: "ghost",
|
|
426
426
|
size: "sm",
|
|
427
427
|
disabled: e.applying,
|
|
428
428
|
onClick: t.onRetry,
|
|
429
429
|
children: [/* @__PURE__ */ q(un, {}), n("material.editor.assistant.retry", "Retry")]
|
|
430
430
|
}),
|
|
431
|
-
/* @__PURE__ */ J(
|
|
431
|
+
/* @__PURE__ */ J(j, {
|
|
432
432
|
variant: "ghost",
|
|
433
433
|
size: "sm",
|
|
434
434
|
onClick: t.onDiscard,
|
|
@@ -438,7 +438,7 @@ function Jn({ state: e, on: t }) {
|
|
|
438
438
|
});
|
|
439
439
|
}
|
|
440
440
|
function Yn({ state: e, on: t }) {
|
|
441
|
-
let { t: n } =
|
|
441
|
+
let { t: n } = M(), r = W(null);
|
|
442
442
|
return H(() => r.current?.focus({ preventScroll: !0 }), []), /* @__PURE__ */ J("div", {
|
|
443
443
|
className: "grid gap-2",
|
|
444
444
|
children: [/* @__PURE__ */ q("p", {
|
|
@@ -449,19 +449,19 @@ function Yn({ state: e, on: t }) {
|
|
|
449
449
|
}), /* @__PURE__ */ J("div", {
|
|
450
450
|
className: "flex flex-wrap items-center gap-1.5",
|
|
451
451
|
children: [
|
|
452
|
-
/* @__PURE__ */ J(
|
|
452
|
+
/* @__PURE__ */ J(j, {
|
|
453
453
|
ref: r,
|
|
454
454
|
size: "sm",
|
|
455
455
|
onClick: t.onRetry,
|
|
456
456
|
children: [/* @__PURE__ */ q(un, {}), n("material.editor.assistant.retry", "Retry")]
|
|
457
457
|
}),
|
|
458
|
-
/* @__PURE__ */ q(
|
|
458
|
+
/* @__PURE__ */ q(j, {
|
|
459
459
|
variant: "ghost",
|
|
460
460
|
size: "sm",
|
|
461
461
|
onClick: t.onBack,
|
|
462
462
|
children: n("material.editor.assistant.back", "Back")
|
|
463
463
|
}),
|
|
464
|
-
/* @__PURE__ */ q(
|
|
464
|
+
/* @__PURE__ */ q(j, {
|
|
465
465
|
variant: "ghost",
|
|
466
466
|
size: "sm",
|
|
467
467
|
onClick: t.onDiscard,
|
|
@@ -472,7 +472,7 @@ function Yn({ state: e, on: t }) {
|
|
|
472
472
|
});
|
|
473
473
|
}
|
|
474
474
|
function Xn({ editor: e, state: t, on: n, status: r }) {
|
|
475
|
-
let { t: i } =
|
|
475
|
+
let { t: i } = M(), a = W(null), o = t.phase === "streaming";
|
|
476
476
|
return H(() => {
|
|
477
477
|
o && a.current?.focus({ preventScroll: !0 });
|
|
478
478
|
}, [o]), /* @__PURE__ */ J("div", {
|
|
@@ -483,7 +483,7 @@ function Xn({ editor: e, state: t, on: n, status: r }) {
|
|
|
483
483
|
editor: e,
|
|
484
484
|
markdown: t.text
|
|
485
485
|
}),
|
|
486
|
-
o ? /* @__PURE__ */ q("div", { children: /* @__PURE__ */ J(
|
|
486
|
+
o ? /* @__PURE__ */ q("div", { children: /* @__PURE__ */ J(j, {
|
|
487
487
|
ref: a,
|
|
488
488
|
variant: "tonal",
|
|
489
489
|
size: "sm",
|
|
@@ -499,7 +499,7 @@ function Xn({ editor: e, state: t, on: n, status: r }) {
|
|
|
499
499
|
//#endregion
|
|
500
500
|
//#region lib/components/ui/widgets/editor/extensions/assistant/assistant-stage.tsx
|
|
501
501
|
function Zn({ label: e, onDiscard: t }) {
|
|
502
|
-
let { t: n } =
|
|
502
|
+
let { t: n } = M();
|
|
503
503
|
return /* @__PURE__ */ J("div", {
|
|
504
504
|
className: "flex items-center gap-2",
|
|
505
505
|
children: [
|
|
@@ -511,7 +511,7 @@ function Zn({ label: e, onDiscard: t }) {
|
|
|
511
511
|
className: "min-w-0 flex-1 truncate font-medium text-sm",
|
|
512
512
|
children: e
|
|
513
513
|
}),
|
|
514
|
-
/* @__PURE__ */ q(
|
|
514
|
+
/* @__PURE__ */ q(N, {
|
|
515
515
|
variant: "ghost",
|
|
516
516
|
"aria-label": n("material.editor.assistant.discard", "Discard"),
|
|
517
517
|
onClick: t,
|
|
@@ -540,7 +540,7 @@ function Qn({ editor: e, state: t, actions: n, onChoose: r, on: i }) {
|
|
|
540
540
|
}) : null;
|
|
541
541
|
}
|
|
542
542
|
function $n({ note: e }) {
|
|
543
|
-
let { t } =
|
|
543
|
+
let { t } = M();
|
|
544
544
|
return e ? /* @__PURE__ */ q("p", {
|
|
545
545
|
role: "status",
|
|
546
546
|
"data-slot": "editor-assistant-note",
|
|
@@ -549,7 +549,7 @@ function $n({ note: e }) {
|
|
|
549
549
|
}) : null;
|
|
550
550
|
}
|
|
551
551
|
function er({ phase: e, stopped: t }) {
|
|
552
|
-
let { t: n } =
|
|
552
|
+
let { t: n } = M(), r = n("material.editor.assistant.writing", "Writing…");
|
|
553
553
|
return /* @__PURE__ */ q("div", {
|
|
554
554
|
role: "status",
|
|
555
555
|
"data-slot": "editor-assistant-status",
|
|
@@ -607,7 +607,7 @@ function or(e) {
|
|
|
607
607
|
return !t.editor || !r || n.state.panel !== "assistant" ? null : /* @__PURE__ */ q(sr, {});
|
|
608
608
|
}
|
|
609
609
|
function sr() {
|
|
610
|
-
let { t: e, language: t } =
|
|
610
|
+
let { t: e, language: t } = M(), { handle: n } = O(), r = n.editor, i = tr(r), a = ar(r), o = i?.controller, s = U(() => In(i?.actions, e), [i?.actions, e]);
|
|
611
611
|
if (H(() => (o?.getState().phase === "idle" && o.begin(), () => o?.reset()), [o]), !o || a.phase === "idle") return null;
|
|
612
612
|
let c = (e) => {
|
|
613
613
|
o.close(), e !== "outside" && r.commands.focus();
|
|
@@ -682,7 +682,7 @@ function pr({ user: e }) {
|
|
|
682
682
|
"aria-label": e.name,
|
|
683
683
|
title: e.name,
|
|
684
684
|
className: "flex",
|
|
685
|
-
children: /* @__PURE__ */ q(
|
|
685
|
+
children: /* @__PURE__ */ q(me, { fallback: /* @__PURE__ */ q("span", {
|
|
686
686
|
ref: (t) => {
|
|
687
687
|
t?.style.setProperty("--nxgt-collab-color", e.color), t?.style.setProperty("--nxgt-collab-fg", Et(e.color));
|
|
688
688
|
},
|
|
@@ -692,7 +692,7 @@ function pr({ user: e }) {
|
|
|
692
692
|
});
|
|
693
693
|
}
|
|
694
694
|
function mr({ status: e, max: n = 4, className: r }) {
|
|
695
|
-
let { t: i } =
|
|
695
|
+
let { t: i } = M(), a = ur();
|
|
696
696
|
if (!e && a.length === 0) return null;
|
|
697
697
|
let [o, s, c] = e ? fr[e] : [];
|
|
698
698
|
return /* @__PURE__ */ J("div", {
|
|
@@ -705,7 +705,7 @@ function mr({ status: e, max: n = 4, className: r }) {
|
|
|
705
705
|
role: "status",
|
|
706
706
|
className: "text-muted-foreground text-xs",
|
|
707
707
|
children: i(s, c)
|
|
708
|
-
}), a.length > 0 && /* @__PURE__ */ q(
|
|
708
|
+
}), a.length > 0 && /* @__PURE__ */ q(Ce, {
|
|
709
709
|
size: "sm",
|
|
710
710
|
max: n,
|
|
711
711
|
role: "group",
|
|
@@ -720,7 +720,7 @@ var hr = "[&_textarea]:min-w-0", gr = (e) => e.key === "Enter" && (e.metaKey ||
|
|
|
720
720
|
//#endregion
|
|
721
721
|
//#region lib/components/ui/widgets/editor/extensions/comments/comment-composer-form.tsx
|
|
722
722
|
function _r({ composer: e, body: t, onBody: n, onSubmit: r, onDismiss: i }) {
|
|
723
|
-
let { t: a } =
|
|
723
|
+
let { t: a } = M(), o = e.error === "invalid-id" ? a("material.editor.comments.invalid-id", "The adapter answered a thread id that is not allowed.") : e.error;
|
|
724
724
|
return /* @__PURE__ */ J("form", {
|
|
725
725
|
className: "grid grid-cols-[minmax(0,1fr)] gap-2.5",
|
|
726
726
|
onSubmit: (e) => {
|
|
@@ -734,7 +734,7 @@ function _r({ composer: e, body: t, onBody: n, onSubmit: r, onDismiss: i }) {
|
|
|
734
734
|
className: "line-clamp-2 border-s-2 ps-2 text-muted-foreground text-xs italic",
|
|
735
735
|
children: e.quote
|
|
736
736
|
}),
|
|
737
|
-
/* @__PURE__ */ q(
|
|
737
|
+
/* @__PURE__ */ q(ae, {
|
|
738
738
|
className: hr,
|
|
739
739
|
"aria-label": a("material.editor.comments.body-label", "Comment"),
|
|
740
740
|
placeholder: a("material.editor.comments.placeholder", "Write a comment…"),
|
|
@@ -761,17 +761,17 @@ function _r({ composer: e, body: t, onBody: n, onSubmit: r, onDismiss: i }) {
|
|
|
761
761
|
});
|
|
762
762
|
}
|
|
763
763
|
function vr({ pending: e, empty: t, onDismiss: n }) {
|
|
764
|
-
let { t: r } =
|
|
764
|
+
let { t: r } = M();
|
|
765
765
|
return /* @__PURE__ */ J("div", {
|
|
766
766
|
className: "flex justify-end gap-2",
|
|
767
|
-
children: [/* @__PURE__ */ q(
|
|
767
|
+
children: [/* @__PURE__ */ q(j, {
|
|
768
768
|
type: "button",
|
|
769
769
|
size: "sm",
|
|
770
|
-
variant:
|
|
770
|
+
variant: Ye,
|
|
771
771
|
disabled: e,
|
|
772
772
|
onClick: n,
|
|
773
773
|
children: r("material.editor.comments.cancel", "Cancel")
|
|
774
|
-
}), /* @__PURE__ */ q(
|
|
774
|
+
}), /* @__PURE__ */ q(j, {
|
|
775
775
|
type: "submit",
|
|
776
776
|
size: "sm",
|
|
777
777
|
loading: e,
|
|
@@ -810,7 +810,7 @@ var wr = {
|
|
|
810
810
|
deleted: ["deleted-notice", "Thread deleted"]
|
|
811
811
|
};
|
|
812
812
|
function Tr({ editor: e }) {
|
|
813
|
-
let { t } =
|
|
813
|
+
let { t } = M(), { notice: n } = Cr(e), r = n ? wr[n.kind] : null;
|
|
814
814
|
return /* @__PURE__ */ q("div", {
|
|
815
815
|
role: "status",
|
|
816
816
|
"aria-live": "polite",
|
|
@@ -833,7 +833,7 @@ function Dr({ editor: e }) {
|
|
|
833
833
|
});
|
|
834
834
|
}
|
|
835
835
|
function Or({ editor: e, controller: t }) {
|
|
836
|
-
let { t: n } =
|
|
836
|
+
let { t: n } = M(), { chrome: r } = O(), i = Cr(e).composer, { actions: a } = r;
|
|
837
837
|
H(() => (a.setBubbleSuppressed(!0), () => {
|
|
838
838
|
a.setBubbleSuppressed(!1);
|
|
839
839
|
}), [a]);
|
|
@@ -872,10 +872,10 @@ function Ar({ id: e, children: t, ...n }) {
|
|
|
872
872
|
return At(() => {
|
|
873
873
|
let e = i.current, t = e?.getAttribute("aria-orientation") === "vertical" ? getComputedStyle(e).direction === "rtl" ? "left" : "right" : void 0;
|
|
874
874
|
t !== o && s(t);
|
|
875
|
-
}), /* @__PURE__ */ J(
|
|
875
|
+
}), /* @__PURE__ */ J(qe, {
|
|
876
876
|
open: a,
|
|
877
877
|
onOpenChange: (t) => t ? r.actions.openPanel(e) : r.actions.closePanel(),
|
|
878
|
-
children: [/* @__PURE__ */ q(
|
|
878
|
+
children: [/* @__PURE__ */ q(Je, { virtualRef: i }), /* @__PURE__ */ q(Ke, {
|
|
879
879
|
"data-panel": e,
|
|
880
880
|
side: o,
|
|
881
881
|
align: "start",
|
|
@@ -896,15 +896,15 @@ function Ar({ id: e, children: t, ...n }) {
|
|
|
896
896
|
//#endregion
|
|
897
897
|
//#region lib/components/ui/widgets/editor/extensions/comments/comments-status.tsx
|
|
898
898
|
function jr({ state: e, controller: t, count: n }) {
|
|
899
|
-
let { t: r } =
|
|
900
|
-
return n === 0 && !e.showResolved ? null : /* @__PURE__ */ q(
|
|
899
|
+
let { t: r } = M();
|
|
900
|
+
return n === 0 && !e.showResolved ? null : /* @__PURE__ */ q(c, {
|
|
901
901
|
label: r("material.editor.comments.show-resolved", "Show resolved"),
|
|
902
902
|
checked: e.showResolved,
|
|
903
903
|
onCheckedChange: t.setShowResolved
|
|
904
904
|
});
|
|
905
905
|
}
|
|
906
906
|
function Mr({ state: e, empty: t }) {
|
|
907
|
-
let { t: n } =
|
|
907
|
+
let { t: n } = M(), r = null;
|
|
908
908
|
return e.phase === "loading" ? r = n("material.editor.comments.loading", "Loading comments…") : e.phase === "failed" ? r = n("material.editor.comments.load-failed", "Comments could not be loaded: {message}", { message: e.loadError ?? "" }) : t && (r = n("material.editor.comments.empty", "No comments yet")), r ? /* @__PURE__ */ q("p", {
|
|
909
909
|
role: e.phase === "failed" ? "alert" : void 0,
|
|
910
910
|
className: "px-1 text-muted-foreground text-sm",
|
|
@@ -914,10 +914,10 @@ function Mr({ state: e, empty: t }) {
|
|
|
914
914
|
//#endregion
|
|
915
915
|
//#region lib/components/ui/widgets/editor/extensions/comments/comment-edit-form.tsx
|
|
916
916
|
function Nr({ draft: e, onChange: t, onSave: n, onCancel: r }) {
|
|
917
|
-
let { t: i } =
|
|
917
|
+
let { t: i } = M();
|
|
918
918
|
return /* @__PURE__ */ J("div", {
|
|
919
919
|
className: "grid grid-cols-[minmax(0,1fr)] gap-2",
|
|
920
|
-
children: [/* @__PURE__ */ q(
|
|
920
|
+
children: [/* @__PURE__ */ q(ae, {
|
|
921
921
|
className: hr,
|
|
922
922
|
"aria-label": i("material.editor.comments.body-label", "Comment"),
|
|
923
923
|
value: e,
|
|
@@ -929,14 +929,14 @@ function Nr({ draft: e, onChange: t, onSave: n, onCancel: r }) {
|
|
|
929
929
|
}
|
|
930
930
|
}), /* @__PURE__ */ J("div", {
|
|
931
931
|
className: "flex gap-2",
|
|
932
|
-
children: [/* @__PURE__ */ q(
|
|
932
|
+
children: [/* @__PURE__ */ q(j, {
|
|
933
933
|
size: "sm",
|
|
934
934
|
disabled: !e.trim(),
|
|
935
935
|
onClick: n,
|
|
936
936
|
children: i("material.editor.comments.save", "Save")
|
|
937
|
-
}), /* @__PURE__ */ q(
|
|
937
|
+
}), /* @__PURE__ */ q(j, {
|
|
938
938
|
size: "sm",
|
|
939
|
-
variant:
|
|
939
|
+
variant: Ye,
|
|
940
940
|
onClick: r,
|
|
941
941
|
children: i("material.editor.comments.cancel", "Cancel")
|
|
942
942
|
})]
|
|
@@ -1007,11 +1007,11 @@ function Yr(e, t, n) {
|
|
|
1007
1007
|
//#region lib/components/ui/widgets/editor/extensions/comments/comment-entry.tsx
|
|
1008
1008
|
var Xr = (e) => e.split(/\s+/).filter(Boolean).slice(0, 2).map((e) => e[0]?.toUpperCase()).join("");
|
|
1009
1009
|
function Zr({ comment: e, pending: t, onEdit: n }) {
|
|
1010
|
-
let { t: r, language: i } =
|
|
1010
|
+
let { t: r, language: i } = M();
|
|
1011
1011
|
return /* @__PURE__ */ J("div", {
|
|
1012
1012
|
className: "flex items-center gap-2",
|
|
1013
1013
|
children: [
|
|
1014
|
-
/* @__PURE__ */ q(
|
|
1014
|
+
/* @__PURE__ */ q(me, {
|
|
1015
1015
|
src: mt(e.author.avatarUrl),
|
|
1016
1016
|
alt: "",
|
|
1017
1017
|
fallback: Xr(e.author.name),
|
|
@@ -1026,7 +1026,7 @@ function Zr({ comment: e, pending: t, onEdit: n }) {
|
|
|
1026
1026
|
className: "shrink-0 text-muted-foreground text-xs",
|
|
1027
1027
|
children: t ? r("material.editor.comments.sending", "Sending…") : Yr(e.createdAt, Date.now(), i)
|
|
1028
1028
|
}),
|
|
1029
|
-
n && !t && /* @__PURE__ */ q(
|
|
1029
|
+
n && !t && /* @__PURE__ */ q(j, {
|
|
1030
1030
|
variant: "ghost",
|
|
1031
1031
|
size: "xs",
|
|
1032
1032
|
className: "ms-auto",
|
|
@@ -1063,11 +1063,11 @@ function Qr({ comment: e, editable: n, onEdit: r }) {
|
|
|
1063
1063
|
//#endregion
|
|
1064
1064
|
//#region lib/components/ui/widgets/editor/extensions/comments/thread-reply.tsx
|
|
1065
1065
|
function $r({ thread: e, controller: t, canRemove: n }) {
|
|
1066
|
-
let { t: r } =
|
|
1066
|
+
let { t: r } = M(), [i, a] = G(""), o = async () => {
|
|
1067
1067
|
let n = i;
|
|
1068
1068
|
n.trim() && (a(""), await t.reply(e.id, n) || a(n));
|
|
1069
1069
|
};
|
|
1070
|
-
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(
|
|
1070
|
+
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(ae, {
|
|
1071
1071
|
className: hr,
|
|
1072
1072
|
"aria-label": r("material.editor.comments.reply-label", "Reply to this thread"),
|
|
1073
1073
|
placeholder: r("material.editor.comments.reply-placeholder", "Reply…"),
|
|
@@ -1080,7 +1080,7 @@ function $r({ thread: e, controller: t, canRemove: n }) {
|
|
|
1080
1080
|
}), /* @__PURE__ */ J("div", {
|
|
1081
1081
|
className: "flex flex-wrap gap-2",
|
|
1082
1082
|
children: [
|
|
1083
|
-
/* @__PURE__ */ q(
|
|
1083
|
+
/* @__PURE__ */ q(j, {
|
|
1084
1084
|
size: "sm",
|
|
1085
1085
|
variant: "outlined",
|
|
1086
1086
|
color: "default",
|
|
@@ -1088,13 +1088,13 @@ function $r({ thread: e, controller: t, canRemove: n }) {
|
|
|
1088
1088
|
onClick: () => void o(),
|
|
1089
1089
|
children: r("material.editor.comments.reply", "Reply")
|
|
1090
1090
|
}),
|
|
1091
|
-
/* @__PURE__ */ q(
|
|
1091
|
+
/* @__PURE__ */ q(j, {
|
|
1092
1092
|
size: "sm",
|
|
1093
1093
|
variant: "tonal",
|
|
1094
1094
|
onClick: () => void t.resolve(e.id, !e.resolved),
|
|
1095
1095
|
children: e.resolved ? r("material.editor.comments.reopen", "Reopen") : r("material.editor.comments.resolve", "Resolve")
|
|
1096
1096
|
}),
|
|
1097
|
-
n && /* @__PURE__ */ q(
|
|
1097
|
+
n && /* @__PURE__ */ q(j, {
|
|
1098
1098
|
size: "sm",
|
|
1099
1099
|
variant: "ghost",
|
|
1100
1100
|
color: "error",
|
|
@@ -1108,7 +1108,7 @@ function $r({ thread: e, controller: t, canRemove: n }) {
|
|
|
1108
1108
|
//#endregion
|
|
1109
1109
|
//#region lib/components/ui/widgets/editor/extensions/comments/thread-card.tsx
|
|
1110
1110
|
function ei(e) {
|
|
1111
|
-
let { thread: n, controller: r, active: i, detached: a, error: o, user: s } = e, { t: c } =
|
|
1111
|
+
let { thread: n, controller: r, active: i, detached: a, error: o, user: s } = e, { t: c } = M(), l = n.comments[0]?.author.id === s?.id && !!s;
|
|
1112
1112
|
return /* @__PURE__ */ J("section", {
|
|
1113
1113
|
ref: e.cardRef,
|
|
1114
1114
|
"data-slot": "comment-thread",
|
|
@@ -1152,7 +1152,7 @@ function ei(e) {
|
|
|
1152
1152
|
//#endregion
|
|
1153
1153
|
//#region lib/components/ui/widgets/editor/extensions/comments/detached-threads.tsx
|
|
1154
1154
|
function ti({ views: e }) {
|
|
1155
|
-
let { t } =
|
|
1155
|
+
let { t } = M(), { controller: n, state: r, detached: i } = e;
|
|
1156
1156
|
return !n || i.length === 0 ? null : /* @__PURE__ */ J("section", {
|
|
1157
1157
|
"data-slot": "comment-detached",
|
|
1158
1158
|
className: "grid gap-2",
|
|
@@ -1476,11 +1476,11 @@ function vi(e) {
|
|
|
1476
1476
|
});
|
|
1477
1477
|
}
|
|
1478
1478
|
function yi({ editor: e }) {
|
|
1479
|
-
let { t } =
|
|
1479
|
+
let { t } = M(), n = _i(e), { controller: r, state: i, anchored: a } = n, o = W(null);
|
|
1480
1480
|
if (H(() => {
|
|
1481
1481
|
o.current?.querySelector("[data-active]")?.scrollIntoView({ block: "nearest" });
|
|
1482
1482
|
}, [i.activeId]), !r) return null;
|
|
1483
|
-
let s = (e, t) => /* @__PURE__ */ q(
|
|
1483
|
+
let s = (e, t) => /* @__PURE__ */ q(N, {
|
|
1484
1484
|
variant: "ghost",
|
|
1485
1485
|
"aria-label": t,
|
|
1486
1486
|
tooltip: t,
|
|
@@ -1635,7 +1635,7 @@ function Di(e) {
|
|
|
1635
1635
|
return !n || !X(n) ? null : /* @__PURE__ */ q(Oi, { editor: n });
|
|
1636
1636
|
}
|
|
1637
1637
|
function Oi({ editor: e }) {
|
|
1638
|
-
let { t } =
|
|
1638
|
+
let { t } = M(), n = _i(e), { controller: r, state: i, anchored: a } = n, o = W(null), { layout: s, cardRef: c } = Ei(e, o, a.map((e) => ({
|
|
1639
1639
|
id: e.id,
|
|
1640
1640
|
from: i.anchors[e.id]?.from ?? 0
|
|
1641
1641
|
})), i.activeId);
|
|
@@ -1779,7 +1779,7 @@ function Pi(e, t) {
|
|
|
1779
1779
|
}
|
|
1780
1780
|
var Fi = (e) => Pi(e.doc, e.selection.head);
|
|
1781
1781
|
function Ii(e, t) {
|
|
1782
|
-
let n = t.node.isAtom ? ut.create(e.doc, t.pos) :
|
|
1782
|
+
let n = t.node.isAtom ? ut.create(e.doc, t.pos) : z.near(e.doc.resolve(t.pos + 1));
|
|
1783
1783
|
return e.setSelection(n);
|
|
1784
1784
|
}
|
|
1785
1785
|
function Li(e, t, n = Fi(e)) {
|
|
@@ -1789,7 +1789,7 @@ function Li(e, t, n = Fi(e)) {
|
|
|
1789
1789
|
let { tr: i } = e, a = e.selection.head, o = e.selection.anchor, s = t === 1 ? n.pos : n.pos - r.nodeSize, c = t === 1 ? n.pos + n.node.nodeSize + r.nodeSize : n.pos + n.node.nodeSize, l = t === 1 ? [r, n.node] : [n.node, r];
|
|
1790
1790
|
i.replaceWith(s, c, l);
|
|
1791
1791
|
let u = t === 1 ? r.nodeSize : -r.nodeSize;
|
|
1792
|
-
return a >= n.pos && a <= n.pos + n.node.nodeSize && e.selection instanceof
|
|
1792
|
+
return a >= n.pos && a <= n.pos + n.node.nodeSize && e.selection instanceof z ? i.setSelection(z.create(i.doc, o + u, a + u)) : e.selection instanceof ut && i.setSelection(ut.create(i.doc, n.pos + u)), i.scrollIntoView();
|
|
1793
1793
|
}
|
|
1794
1794
|
function Ri(e, t = Fi(e)) {
|
|
1795
1795
|
if (!t) return null;
|
|
@@ -1809,7 +1809,7 @@ function zi(e, t = Fi(e)) {
|
|
|
1809
1809
|
}
|
|
1810
1810
|
n.delete(t.pos, r);
|
|
1811
1811
|
let i = Math.min(t.pos, n.doc.content.size);
|
|
1812
|
-
return n.setSelection(
|
|
1812
|
+
return n.setSelection(z.near(n.doc.resolve(i), -1)).scrollIntoView();
|
|
1813
1813
|
}
|
|
1814
1814
|
//#endregion
|
|
1815
1815
|
//#region lib/components/ui/widgets/editor/extensions/block/block-menu.tsx
|
|
@@ -1818,42 +1818,42 @@ function Bi(e, t) {
|
|
|
1818
1818
|
n && e.view.dispatch(n), e.isDestroyed || e.commands.focus();
|
|
1819
1819
|
}
|
|
1820
1820
|
function Vi({ editor: e, block: t }) {
|
|
1821
|
-
let { t: n } =
|
|
1821
|
+
let { t: n } = M(), { doc: r } = e.state, i = () => ({
|
|
1822
1822
|
...t,
|
|
1823
1823
|
node: r.child(t.index)
|
|
1824
1824
|
});
|
|
1825
1825
|
return /* @__PURE__ */ J(K, { children: [
|
|
1826
|
-
/* @__PURE__ */ J(
|
|
1826
|
+
/* @__PURE__ */ J(Ue, { children: [/* @__PURE__ */ q(Be, { children: n("material.editor.block.turn-into", "Turn into") }), Ni(e).map((t) => /* @__PURE__ */ J(A, {
|
|
1827
1827
|
onSelect: () => t.run(e),
|
|
1828
1828
|
children: [/* @__PURE__ */ q(t.icon, {}), n(t.key, t.label)]
|
|
1829
1829
|
}, t.id))] }),
|
|
1830
|
-
/* @__PURE__ */ q(
|
|
1831
|
-
/* @__PURE__ */ J(
|
|
1832
|
-
/* @__PURE__ */ J(
|
|
1830
|
+
/* @__PURE__ */ q(He, {}),
|
|
1831
|
+
/* @__PURE__ */ J(Ue, { children: [
|
|
1832
|
+
/* @__PURE__ */ J(A, {
|
|
1833
1833
|
onSelect: () => Bi(e, () => Ri(e.state, i())),
|
|
1834
1834
|
children: [/* @__PURE__ */ q(Ut, {}), n("material.editor.block.duplicate", "Duplicate")]
|
|
1835
1835
|
}),
|
|
1836
|
-
/* @__PURE__ */ J(
|
|
1836
|
+
/* @__PURE__ */ J(A, {
|
|
1837
1837
|
disabled: t.index === 0,
|
|
1838
1838
|
onSelect: () => Bi(e, () => Li(e.state, -1, i())),
|
|
1839
1839
|
children: [
|
|
1840
1840
|
/* @__PURE__ */ q(Pt, {}),
|
|
1841
1841
|
n("material.editor.block.move-up", "Move up"),
|
|
1842
|
-
/* @__PURE__ */ q(
|
|
1842
|
+
/* @__PURE__ */ q(We, { children: "⌥⇧↑" })
|
|
1843
1843
|
]
|
|
1844
1844
|
}),
|
|
1845
|
-
/* @__PURE__ */ J(
|
|
1845
|
+
/* @__PURE__ */ J(A, {
|
|
1846
1846
|
disabled: t.index >= r.childCount - 1,
|
|
1847
1847
|
onSelect: () => Bi(e, () => Li(e.state, 1, i())),
|
|
1848
1848
|
children: [
|
|
1849
1849
|
/* @__PURE__ */ q(Nt, {}),
|
|
1850
1850
|
n("material.editor.block.move-down", "Move down"),
|
|
1851
|
-
/* @__PURE__ */ q(
|
|
1851
|
+
/* @__PURE__ */ q(We, { children: "⌥⇧↓" })
|
|
1852
1852
|
]
|
|
1853
1853
|
})
|
|
1854
1854
|
] }),
|
|
1855
|
-
/* @__PURE__ */ q(
|
|
1856
|
-
/* @__PURE__ */ J(
|
|
1855
|
+
/* @__PURE__ */ q(He, {}),
|
|
1856
|
+
/* @__PURE__ */ J(A, {
|
|
1857
1857
|
variant: "error",
|
|
1858
1858
|
onSelect: () => Bi(e, () => zi(e.state, i())),
|
|
1859
1859
|
children: [/* @__PURE__ */ q(yn, {}), n("material.editor.block.delete", "Delete")]
|
|
@@ -1926,7 +1926,7 @@ function Ui({ children: e, className: t }) {
|
|
|
1926
1926
|
});
|
|
1927
1927
|
}
|
|
1928
1928
|
function Wi({ editor: e, children: n, className: r }) {
|
|
1929
|
-
let { chrome: i } = O(), a = W(null), o =
|
|
1929
|
+
let { chrome: i } = O(), a = W(null), o = P({
|
|
1930
1930
|
editor: e,
|
|
1931
1931
|
selector: (e) => e.editor.isEditable
|
|
1932
1932
|
}), s = i.state.panel === "block" && o, { active: c, hover: l, unhover: u } = Hi(e, a, s);
|
|
@@ -1944,24 +1944,24 @@ function Wi({ editor: e, children: n, className: r }) {
|
|
|
1944
1944
|
});
|
|
1945
1945
|
}
|
|
1946
1946
|
function Gi({ editor: e, active: n, open: r }) {
|
|
1947
|
-
let { t: i } =
|
|
1947
|
+
let { t: i } = M(), { chrome: a } = O();
|
|
1948
1948
|
return /* @__PURE__ */ J("div", {
|
|
1949
1949
|
"data-slot": "editor-block-handle",
|
|
1950
1950
|
"data-open": r || void 0,
|
|
1951
1951
|
style: { top: n.top },
|
|
1952
1952
|
className: t("absolute end-full me-1.5 flex items-center opacity-0 transition-opacity duration-(--nxgt-motion-effects-fast-duration) ease-effects-fast motion-reduce:transition-none", "group-hover/blocks:opacity-100 group-focus-within/blocks:opacity-100 data-open:opacity-100", "@max-xl:invisible not-pointer-fine:invisible"),
|
|
1953
|
-
children: [/* @__PURE__ */ q(
|
|
1953
|
+
children: [/* @__PURE__ */ q(N, {
|
|
1954
1954
|
variant: "ghost",
|
|
1955
1955
|
className: "size-6 text-muted-foreground",
|
|
1956
1956
|
tooltip: i("material.editor.block.add", "Add a block below"),
|
|
1957
1957
|
onClick: () => ki(e, n),
|
|
1958
1958
|
children: /* @__PURE__ */ q(sn, {})
|
|
1959
|
-
}), /* @__PURE__ */ J(
|
|
1959
|
+
}), /* @__PURE__ */ J(Ge, {
|
|
1960
1960
|
open: r,
|
|
1961
1961
|
onOpenChange: (e) => e ? a.actions.openPanel("block") : a.actions.closePanel(),
|
|
1962
|
-
children: [/* @__PURE__ */ q(
|
|
1962
|
+
children: [/* @__PURE__ */ q(ze, {
|
|
1963
1963
|
asChild: !0,
|
|
1964
|
-
children: /* @__PURE__ */ q(
|
|
1964
|
+
children: /* @__PURE__ */ q(N, {
|
|
1965
1965
|
variant: "ghost",
|
|
1966
1966
|
draggable: !0,
|
|
1967
1967
|
className: "size-6 cursor-grab text-muted-foreground active:cursor-grabbing",
|
|
@@ -1975,7 +1975,7 @@ function Gi({ editor: e, active: n, open: r }) {
|
|
|
1975
1975
|
onDragStart: (t) => Ai(e, n, t.nativeEvent),
|
|
1976
1976
|
children: /* @__PURE__ */ q(qt, {})
|
|
1977
1977
|
})
|
|
1978
|
-
}), /* @__PURE__ */ q(
|
|
1978
|
+
}), /* @__PURE__ */ q(Ve, {
|
|
1979
1979
|
align: "start",
|
|
1980
1980
|
onCloseAutoFocus: (t) => {
|
|
1981
1981
|
t.preventDefault(), e.isDestroyed || e.commands.focus();
|
|
@@ -1991,7 +1991,7 @@ function Gi({ editor: e, active: n, open: r }) {
|
|
|
1991
1991
|
//#endregion
|
|
1992
1992
|
//#region lib/components/ui/widgets/editor/extensions/find/find-fields.tsx
|
|
1993
1993
|
function Ki({ find: e }) {
|
|
1994
|
-
let { t } =
|
|
1994
|
+
let { t } = M(), n = "";
|
|
1995
1995
|
return e.term && (n = e.total === 0 ? t("material.editor.find.none", "No results") : t("material.editor.find.count", "{current} of {total}", {
|
|
1996
1996
|
current: e.current + 1,
|
|
1997
1997
|
total: e.total
|
|
@@ -2003,14 +2003,14 @@ function Ki({ find: e }) {
|
|
|
2003
2003
|
});
|
|
2004
2004
|
}
|
|
2005
2005
|
function qi({ find: e }) {
|
|
2006
|
-
let { t } =
|
|
2007
|
-
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(
|
|
2006
|
+
let { t } = M();
|
|
2007
|
+
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(fe, {
|
|
2008
2008
|
size: "sm",
|
|
2009
2009
|
"aria-label": t("material.editor.find.match-case", "Match case"),
|
|
2010
2010
|
pressed: e.caseSensitive,
|
|
2011
2011
|
onPressedChange: e.setCaseSensitive,
|
|
2012
2012
|
children: /* @__PURE__ */ q(It, {})
|
|
2013
|
-
}), /* @__PURE__ */ q(
|
|
2013
|
+
}), /* @__PURE__ */ q(fe, {
|
|
2014
2014
|
size: "sm",
|
|
2015
2015
|
"aria-label": t("material.editor.find.whole-word", "Whole word"),
|
|
2016
2016
|
pressed: e.wholeWord,
|
|
@@ -2019,15 +2019,15 @@ function qi({ find: e }) {
|
|
|
2019
2019
|
})] });
|
|
2020
2020
|
}
|
|
2021
2021
|
function Ji({ disabled: e, onStep: t }) {
|
|
2022
|
-
let { t: n } =
|
|
2023
|
-
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(
|
|
2022
|
+
let { t: n } = M();
|
|
2023
|
+
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(N, {
|
|
2024
2024
|
variant: "ghost",
|
|
2025
2025
|
className: "size-8",
|
|
2026
2026
|
tooltip: n("material.editor.find.previous", "Previous match"),
|
|
2027
2027
|
disabled: e,
|
|
2028
2028
|
onClick: () => t(-1),
|
|
2029
2029
|
children: /* @__PURE__ */ q(Vt, {})
|
|
2030
|
-
}), /* @__PURE__ */ q(
|
|
2030
|
+
}), /* @__PURE__ */ q(N, {
|
|
2031
2031
|
variant: "ghost",
|
|
2032
2032
|
className: "size-8",
|
|
2033
2033
|
tooltip: n("material.editor.find.next", "Next match"),
|
|
@@ -2037,11 +2037,11 @@ function Ji({ disabled: e, onStep: t }) {
|
|
|
2037
2037
|
})] });
|
|
2038
2038
|
}
|
|
2039
2039
|
function Yi({ find: e, inputRef: t, onStep: n, onClose: r, onKeyDown: i, replaceOpen: a, canReplace: o = !0, onToggleReplace: s }) {
|
|
2040
|
-
let { t: c } =
|
|
2040
|
+
let { t: c } = M();
|
|
2041
2041
|
return /* @__PURE__ */ J("div", {
|
|
2042
2042
|
className: "flex flex-wrap items-center gap-1.5",
|
|
2043
2043
|
children: [
|
|
2044
|
-
/* @__PURE__ */ q(
|
|
2044
|
+
/* @__PURE__ */ q(tt, {
|
|
2045
2045
|
ref: t,
|
|
2046
2046
|
type: "search",
|
|
2047
2047
|
"aria-label": c("material.editor.find.find", "Find"),
|
|
@@ -2052,7 +2052,7 @@ function Yi({ find: e, inputRef: t, onStep: n, onClose: r, onKeyDown: i, replace
|
|
|
2052
2052
|
className: "h-8 min-w-0 flex-1 basis-40 sm:max-w-64"
|
|
2053
2053
|
}),
|
|
2054
2054
|
/* @__PURE__ */ q(qi, { find: e }),
|
|
2055
|
-
o && /* @__PURE__ */ q(
|
|
2055
|
+
o && /* @__PURE__ */ q(N, {
|
|
2056
2056
|
variant: "ghost",
|
|
2057
2057
|
className: "size-8",
|
|
2058
2058
|
"aria-pressed": a,
|
|
@@ -2065,7 +2065,7 @@ function Yi({ find: e, inputRef: t, onStep: n, onClose: r, onKeyDown: i, replace
|
|
|
2065
2065
|
disabled: e.total === 0,
|
|
2066
2066
|
onStep: n
|
|
2067
2067
|
}),
|
|
2068
|
-
/* @__PURE__ */ q(
|
|
2068
|
+
/* @__PURE__ */ q(N, {
|
|
2069
2069
|
variant: "ghost",
|
|
2070
2070
|
className: "ms-auto size-8",
|
|
2071
2071
|
tooltip: c("material.editor.find.close", "Close"),
|
|
@@ -2110,7 +2110,7 @@ function ra(e, t, n) {
|
|
|
2110
2110
|
}
|
|
2111
2111
|
//#endregion
|
|
2112
2112
|
//#region lib/components/ui/widgets/editor/extensions/find/find-state.ts
|
|
2113
|
-
var Z = new
|
|
2113
|
+
var Z = new lt("nxgtFind"), ia = "";
|
|
2114
2114
|
function aa(e) {
|
|
2115
2115
|
let t = [];
|
|
2116
2116
|
return e.descendants((e, n) => e.isTextblock ? (t.push({
|
|
@@ -2119,18 +2119,18 @@ function aa(e) {
|
|
|
2119
2119
|
}), !1) : !0), t;
|
|
2120
2120
|
}
|
|
2121
2121
|
function oa(e, t) {
|
|
2122
|
-
return
|
|
2122
|
+
return I.create(e, t.map((e) => L.inline(e.from, e.to, { class: "nxgt-find-match" })));
|
|
2123
2123
|
}
|
|
2124
2124
|
function sa(e, t) {
|
|
2125
2125
|
let n = t.matches[t.current];
|
|
2126
|
-
return n ?
|
|
2126
|
+
return n ? I.create(e, [L.inline(n.from, n.to, { class: "nxgt-find-current" })]) : I.empty;
|
|
2127
2127
|
}
|
|
2128
2128
|
var ca = () => ({
|
|
2129
2129
|
...Xi,
|
|
2130
2130
|
term: "",
|
|
2131
2131
|
matches: [],
|
|
2132
2132
|
current: -1,
|
|
2133
|
-
decorations:
|
|
2133
|
+
decorations: I.empty
|
|
2134
2134
|
});
|
|
2135
2135
|
function la(e, t, n) {
|
|
2136
2136
|
let r = ta(aa(e), t.term, t);
|
|
@@ -2192,7 +2192,7 @@ function da(e, t, n) {
|
|
|
2192
2192
|
}), !1)), n && (n.blocks += r.length), s.push(...ta(r, t.term, t));
|
|
2193
2193
|
}
|
|
2194
2194
|
let c = [...a, ...s].sort((e, t) => e.from - t.from);
|
|
2195
|
-
s.length > 0 && (o = o.add(e.doc, s.map((e) =>
|
|
2195
|
+
s.length > 0 && (o = o.add(e.doc, s.map((e) => L.inline(e.from, e.to, { class: "nxgt-find-match" }))));
|
|
2196
2196
|
let l = t.current >= 0 && t.matches.length === c.length ? Math.min(t.current, c.length - 1) : na(c, e.selection.from);
|
|
2197
2197
|
return {
|
|
2198
2198
|
...t,
|
|
@@ -2211,7 +2211,7 @@ function pa(e) {
|
|
|
2211
2211
|
return /\n/.test(i) ? "" : i;
|
|
2212
2212
|
}
|
|
2213
2213
|
function ma(e) {
|
|
2214
|
-
let [t, n] = G(() => pa(e)), [r, i] = G(!1), [a, o] = G(!1), s =
|
|
2214
|
+
let [t, n] = G(() => pa(e)), [r, i] = G(!1), [a, o] = G(!1), s = P({
|
|
2215
2215
|
editor: e,
|
|
2216
2216
|
selector: ({ editor: e }) => {
|
|
2217
2217
|
let { matches: t, current: n } = fa(e.state);
|
|
@@ -2252,7 +2252,7 @@ function ha({ className: e }) {
|
|
|
2252
2252
|
return !r || !i || !a ? null : /* @__PURE__ */ q(ga, { className: e });
|
|
2253
2253
|
}
|
|
2254
2254
|
function ga({ className: e }) {
|
|
2255
|
-
let { t } =
|
|
2255
|
+
let { t } = M(), { handle: n, chrome: r } = O(), i = n.editor, a = ma(i), o = W(null), s = P({
|
|
2256
2256
|
editor: i,
|
|
2257
2257
|
selector: (e) => e.editor.isEditable
|
|
2258
2258
|
}), c = s && r.state.findReplace;
|
|
@@ -2287,11 +2287,11 @@ function ga({ className: e }) {
|
|
|
2287
2287
|
});
|
|
2288
2288
|
}
|
|
2289
2289
|
function _a({ editor: e, find: t }) {
|
|
2290
|
-
let { t: n } =
|
|
2290
|
+
let { t: n } = M(), [r, i] = G("");
|
|
2291
2291
|
return /* @__PURE__ */ J("div", {
|
|
2292
2292
|
className: "flex flex-wrap items-center gap-1.5",
|
|
2293
2293
|
children: [
|
|
2294
|
-
/* @__PURE__ */ q(
|
|
2294
|
+
/* @__PURE__ */ q(tt, {
|
|
2295
2295
|
"aria-label": n("material.editor.find.replace", "Replace"),
|
|
2296
2296
|
placeholder: n("material.editor.find.replace", "Replace"),
|
|
2297
2297
|
value: r,
|
|
@@ -2301,14 +2301,14 @@ function _a({ editor: e, find: t }) {
|
|
|
2301
2301
|
},
|
|
2302
2302
|
className: "h-8 min-w-0 flex-1 basis-40 sm:max-w-64"
|
|
2303
2303
|
}),
|
|
2304
|
-
/* @__PURE__ */ q(
|
|
2304
|
+
/* @__PURE__ */ q(j, {
|
|
2305
2305
|
variant: "tonal",
|
|
2306
2306
|
size: "sm",
|
|
2307
2307
|
disabled: t.total === 0,
|
|
2308
2308
|
onClick: () => e.commands.replaceCurrent(r),
|
|
2309
2309
|
children: n("material.editor.find.replace-one", "Replace")
|
|
2310
2310
|
}),
|
|
2311
|
-
/* @__PURE__ */ q(
|
|
2311
|
+
/* @__PURE__ */ q(j, {
|
|
2312
2312
|
variant: "tonal",
|
|
2313
2313
|
size: "sm",
|
|
2314
2314
|
disabled: t.total === 0,
|
|
@@ -2321,8 +2321,8 @@ function _a({ editor: e, find: t }) {
|
|
|
2321
2321
|
//#endregion
|
|
2322
2322
|
//#region lib/components/ui/widgets/editor/partials/editor-focus-exit.tsx
|
|
2323
2323
|
function va({ className: e }) {
|
|
2324
|
-
let { t: n } =
|
|
2325
|
-
return r.state.focusMode ? /* @__PURE__ */ q(
|
|
2324
|
+
let { t: n } = M(), { chrome: r, handle: i } = O();
|
|
2325
|
+
return r.state.focusMode ? /* @__PURE__ */ q(N, {
|
|
2326
2326
|
variant: "ghost",
|
|
2327
2327
|
"data-slot": "editor-focus-exit",
|
|
2328
2328
|
className: t("size-8 bg-card/80 backdrop-blur", e),
|
|
@@ -2339,7 +2339,7 @@ var ya = (e) => e.trim() ? e.trim().split(/\s+/).length : 0, ba = (e) => e <= 0
|
|
|
2339
2339
|
//#endregion
|
|
2340
2340
|
//#region lib/components/ui/widgets/editor/core/use-editor-stats.ts
|
|
2341
2341
|
function xa(e) {
|
|
2342
|
-
return
|
|
2342
|
+
return P({
|
|
2343
2343
|
editor: e.editor,
|
|
2344
2344
|
selector: ({ editor: e }) => {
|
|
2345
2345
|
let t = e?.storage.characterCount, n = t?.words?.() ?? ya(e?.getText() ?? ""), r = e?.extensionManager.extensions.find((e) => e.name === "characterCount")?.options.limit;
|
|
@@ -2360,7 +2360,7 @@ function xa(e) {
|
|
|
2360
2360
|
//#endregion
|
|
2361
2361
|
//#region lib/components/ui/widgets/editor/partials/editor-stats.tsx
|
|
2362
2362
|
function Sa({ readingTime: e = !0 }) {
|
|
2363
|
-
let { t } =
|
|
2363
|
+
let { t } = M(), { handle: n } = O(), r = xa(n), { words: i } = r;
|
|
2364
2364
|
return /* @__PURE__ */ J("p", {
|
|
2365
2365
|
"data-slot": "editor-stats",
|
|
2366
2366
|
className: "flex flex-wrap gap-x-2",
|
|
@@ -2385,7 +2385,7 @@ var Ca = {
|
|
|
2385
2385
|
unsaved: ["material.editor.footer.unsaved", "Unsaved changes"]
|
|
2386
2386
|
};
|
|
2387
2387
|
function wa({ className: n, status: r, actions: i, readingTime: a = !0 }) {
|
|
2388
|
-
let { t: o } =
|
|
2388
|
+
let { t: o } = M(), s = typeof r == "string" && r in Ca, [c, l] = s ? Ca[r] : [];
|
|
2389
2389
|
return /* @__PURE__ */ J("div", {
|
|
2390
2390
|
"data-slot": "editor-footer",
|
|
2391
2391
|
className: t("flex flex-wrap items-center gap-x-3 gap-y-2 text-muted-foreground text-sm", n),
|
|
@@ -2434,7 +2434,7 @@ function Ea(e, t) {
|
|
|
2434
2434
|
//#region lib/components/ui/widgets/editor/extensions/outline/use-outline.ts
|
|
2435
2435
|
var Da = 120, Oa = 700, ka = () => window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? !1;
|
|
2436
2436
|
function Aa(e) {
|
|
2437
|
-
let t =
|
|
2437
|
+
let t = P({
|
|
2438
2438
|
editor: e,
|
|
2439
2439
|
selector: ({ editor: e }) => Ta(e.state.doc)
|
|
2440
2440
|
}), [n, r] = G(0), i = W(0);
|
|
@@ -2488,7 +2488,7 @@ function Ma({ className: e, onNavigate: t }) {
|
|
|
2488
2488
|
}) : null;
|
|
2489
2489
|
}
|
|
2490
2490
|
function Na({ editor: e, className: n, onNavigate: r }) {
|
|
2491
|
-
let { t: i } =
|
|
2491
|
+
let { t: i } = M(), { items: a, active: o, goTo: s } = Aa(e);
|
|
2492
2492
|
return /* @__PURE__ */ J("nav", {
|
|
2493
2493
|
"aria-label": i("material.editor.outline", "Outline"),
|
|
2494
2494
|
"data-slot": "editor-outline",
|
|
@@ -2528,7 +2528,7 @@ function Pa(e) {
|
|
|
2528
2528
|
//#region lib/components/ui/widgets/editor/extensions/upload/use-editor-uploads.ts
|
|
2529
2529
|
var Fa = 0, Ia = 1e6;
|
|
2530
2530
|
function La(e) {
|
|
2531
|
-
let t =
|
|
2531
|
+
let t = f(e.editor)?.queue, n = jt(V((e) => t?.subscribe(e) ?? (() => {}), [t]), () => {
|
|
2532
2532
|
if (!t) return Fa;
|
|
2533
2533
|
let e = t.list(), n = e.filter((e) => e.status === "error").length;
|
|
2534
2534
|
return (e.length - n) * Ia + n;
|
|
@@ -2572,10 +2572,10 @@ function Va(e) {
|
|
|
2572
2572
|
//#endregion
|
|
2573
2573
|
//#region lib/components/ui/widgets/editor/extensions/assistant/assistant-button.tsx
|
|
2574
2574
|
function Ha({ editor: e }) {
|
|
2575
|
-
let { t } =
|
|
2575
|
+
let { t } = M(), { chrome: n } = O(), r = ir(e), i = n.state.panel === "assistant";
|
|
2576
2576
|
if (!r || !e.isEditable) return null;
|
|
2577
2577
|
let a = t("material.editor.assistant.title", "Assistant");
|
|
2578
|
-
return /* @__PURE__ */ q(
|
|
2578
|
+
return /* @__PURE__ */ q(k, {
|
|
2579
2579
|
"data-slot": "editor-assistant-button",
|
|
2580
2580
|
variant: i ? "filled" : "tonal",
|
|
2581
2581
|
"aria-label": a,
|
|
@@ -2869,7 +2869,7 @@ async function so(e, t) {
|
|
|
2869
2869
|
}
|
|
2870
2870
|
//#endregion
|
|
2871
2871
|
//#region lib/components/ui/widgets/editor/extensions/assistant/assistant-extension.ts
|
|
2872
|
-
var co =
|
|
2872
|
+
var co = R.create({
|
|
2873
2873
|
name: "assistant",
|
|
2874
2874
|
addStorage: () => ({}),
|
|
2875
2875
|
onBeforeCreate() {
|
|
@@ -2891,14 +2891,14 @@ var co = L.create({
|
|
|
2891
2891
|
n.follow = qa(e, () => r.getState().phase === "idle" ? null : r.getState().range, r.subscribe);
|
|
2892
2892
|
},
|
|
2893
2893
|
addProseMirrorPlugins() {
|
|
2894
|
-
let e = new
|
|
2895
|
-
return [new
|
|
2894
|
+
let e = new lt("assistantRange"), t = () => this.storage.controller;
|
|
2895
|
+
return [new F({
|
|
2896
2896
|
key: e,
|
|
2897
2897
|
props: { decorations: (e) => {
|
|
2898
2898
|
let n = t()?.getState();
|
|
2899
2899
|
if (!n || n.phase === "idle" || !n.hasSelection) return null;
|
|
2900
2900
|
let { from: r, to: i } = n.range;
|
|
2901
|
-
return r >= i || i > e.doc.content.size ? null :
|
|
2901
|
+
return r >= i || i > e.doc.content.size ? null : I.create(e.doc, [L.inline(r, i, { class: "nxgt-assistant-range" })]);
|
|
2902
2902
|
} },
|
|
2903
2903
|
view: (n) => {
|
|
2904
2904
|
let r = () => {
|
|
@@ -2985,10 +2985,10 @@ function po(e, t) {
|
|
|
2985
2985
|
//#endregion
|
|
2986
2986
|
//#region lib/components/ui/widgets/editor/extensions/comments/comments-buttons.tsx
|
|
2987
2987
|
function mo({ editor: e }) {
|
|
2988
|
-
let { t } =
|
|
2988
|
+
let { t } = M(), n = Sr(e);
|
|
2989
2989
|
if (!n) return null;
|
|
2990
2990
|
let r = t("material.editor.comments.comment", "Comment");
|
|
2991
|
-
return /* @__PURE__ */ q(
|
|
2991
|
+
return /* @__PURE__ */ q(k, {
|
|
2992
2992
|
"data-slot": "editor-comment-button",
|
|
2993
2993
|
variant: "ghost",
|
|
2994
2994
|
"aria-label": r,
|
|
@@ -3000,10 +3000,10 @@ function mo({ editor: e }) {
|
|
|
3000
3000
|
});
|
|
3001
3001
|
}
|
|
3002
3002
|
function ho({ editor: e }) {
|
|
3003
|
-
let { t } =
|
|
3003
|
+
let { t } = M(), { chrome: n } = O(), r = Cr(e);
|
|
3004
3004
|
if (!X(e)) return null;
|
|
3005
3005
|
let i = n.state.panel === "comments", a = mi(r).length, o = t("material.editor.comments.count", "Comments ({count})", { count: a });
|
|
3006
|
-
return /* @__PURE__ */ q(
|
|
3006
|
+
return /* @__PURE__ */ q(k, {
|
|
3007
3007
|
"data-slot": "editor-comments-button",
|
|
3008
3008
|
variant: i ? "filled" : "ghost",
|
|
3009
3009
|
"aria-label": o,
|
|
@@ -3049,11 +3049,11 @@ function xo(e, t) {
|
|
|
3049
3049
|
let o = a.attrs.threadId, s = n.get(o);
|
|
3050
3050
|
if (s === void 0 || s && !t.showResolved) continue;
|
|
3051
3051
|
let c = [yo];
|
|
3052
|
-
s && c.push(`${yo}-resolved`), o === t.activeId && c.push(`${yo}-active`), r.push(
|
|
3052
|
+
s && c.push(`${yo}-resolved`), o === t.activeId && c.push(`${yo}-active`), r.push(L.inline(i, i + e.nodeSize, { class: c.join(" ") }));
|
|
3053
3053
|
}
|
|
3054
3054
|
});
|
|
3055
3055
|
let i = t.composer?.range;
|
|
3056
|
-
return i && i.from < i.to && i.to <= e.content.size && r.push(
|
|
3056
|
+
return i && i.from < i.to && i.to <= e.content.size && r.push(L.inline(i.from, i.to, { class: `${yo} ${yo}-active` })), I.create(e, r);
|
|
3057
3057
|
}
|
|
3058
3058
|
//#endregion
|
|
3059
3059
|
//#region lib/components/ui/widgets/editor/extensions/comments/strip-comment-marks.ts
|
|
@@ -3064,15 +3064,15 @@ var So = (e) => {
|
|
|
3064
3064
|
let n = e.marks.filter((e) => e.type.name !== "comment");
|
|
3065
3065
|
t.push(n.length === e.marks.length ? e : e.mark(n));
|
|
3066
3066
|
} else t.push(e.copy(So(e.content)));
|
|
3067
|
-
}),
|
|
3068
|
-
}, Co = (e) => new
|
|
3067
|
+
}), it.fromArray(t);
|
|
3068
|
+
}, Co = (e) => new at(So(e.content), e.openStart, e.openEnd), wo = (e) => e?.dragging?.move === !0, To = (e, t) => wo(t) ? e : Co(e), Eo = new lt("comments"), Do = (e, t) => {
|
|
3069
3069
|
let n = [];
|
|
3070
3070
|
for (let r = e; r && r !== t; r = r.parentElement) {
|
|
3071
3071
|
let e = r.getAttribute?.("data-comment-thread");
|
|
3072
3072
|
e && n.push(e);
|
|
3073
3073
|
}
|
|
3074
3074
|
return n;
|
|
3075
|
-
}, Oo =
|
|
3075
|
+
}, Oo = R.create({
|
|
3076
3076
|
name: "comments",
|
|
3077
3077
|
addExtensions: () => [xt],
|
|
3078
3078
|
addStorage: () => ({}),
|
|
@@ -3111,7 +3111,7 @@ var So = (e) => {
|
|
|
3111
3111
|
},
|
|
3112
3112
|
addProseMirrorPlugins() {
|
|
3113
3113
|
let e = () => this.storage.controller, t = null;
|
|
3114
|
-
return [new
|
|
3114
|
+
return [new F({
|
|
3115
3115
|
key: Eo,
|
|
3116
3116
|
props: {
|
|
3117
3117
|
transformPasted: To,
|
|
@@ -3186,7 +3186,7 @@ var So = (e) => {
|
|
|
3186
3186
|
name: "comments",
|
|
3187
3187
|
extensions: () => [xt],
|
|
3188
3188
|
markdown: "native"
|
|
3189
|
-
}), No =
|
|
3189
|
+
}), No = R.create({
|
|
3190
3190
|
name: "nxgtBlockKeys",
|
|
3191
3191
|
addKeyboardShortcuts() {
|
|
3192
3192
|
let e = (e) => () => {
|
|
@@ -3211,8 +3211,8 @@ var So = (e) => {
|
|
|
3211
3211
|
//#endregion
|
|
3212
3212
|
//#region lib/components/ui/widgets/editor/extensions/find/find-button.tsx
|
|
3213
3213
|
function Fo({ editor: e }) {
|
|
3214
|
-
let { t } =
|
|
3215
|
-
return /* @__PURE__ */ q(
|
|
3214
|
+
let { t } = M(), { chrome: n } = O(), r = n.state.panel === "find";
|
|
3215
|
+
return /* @__PURE__ */ q(k, {
|
|
3216
3216
|
variant: r ? "filled" : "ghost",
|
|
3217
3217
|
"aria-pressed": r,
|
|
3218
3218
|
tooltip: t("material.editor.find.title", "Find and replace"),
|
|
@@ -3222,7 +3222,7 @@ function Fo({ editor: e }) {
|
|
|
3222
3222
|
}
|
|
3223
3223
|
//#endregion
|
|
3224
3224
|
//#region lib/components/ui/widgets/editor/extensions/find/find-plugin.ts
|
|
3225
|
-
var Io = () => new
|
|
3225
|
+
var Io = () => new F({
|
|
3226
3226
|
key: Z,
|
|
3227
3227
|
state: {
|
|
3228
3228
|
init: ca,
|
|
@@ -3237,7 +3237,7 @@ var Io = () => new P({
|
|
|
3237
3237
|
props: { decorations: (e) => Z.getState(e)?.decorations }
|
|
3238
3238
|
}), Lo = () => {
|
|
3239
3239
|
let e;
|
|
3240
|
-
return new
|
|
3240
|
+
return new F({ props: { decorations(t) {
|
|
3241
3241
|
let n = Z.getState(t);
|
|
3242
3242
|
if (!n) return;
|
|
3243
3243
|
if (e?.state === n && e.doc === t.doc) return e.set;
|
|
@@ -3248,7 +3248,7 @@ var Io = () => new P({
|
|
|
3248
3248
|
set: r
|
|
3249
3249
|
}, r;
|
|
3250
3250
|
} } });
|
|
3251
|
-
}, Ro =
|
|
3251
|
+
}, Ro = R.create({
|
|
3252
3252
|
name: "nxgtFind",
|
|
3253
3253
|
addProseMirrorPlugins() {
|
|
3254
3254
|
return [Io(), Lo()];
|
|
@@ -3259,7 +3259,7 @@ var Io = () => new P({
|
|
|
3259
3259
|
findStep: (e) => ({ state: t, tr: n, dispatch: r }) => {
|
|
3260
3260
|
let { matches: i, current: a } = fa(t), o = ra(i.length, a, e), s = i[o];
|
|
3261
3261
|
if (!s) return !1;
|
|
3262
|
-
let c =
|
|
3262
|
+
let c = z.create(n.doc, s.from, s.to);
|
|
3263
3263
|
return r?.(n.setSelection(c).scrollIntoView().setMeta(Z, { current: o })), !0;
|
|
3264
3264
|
},
|
|
3265
3265
|
replaceCurrent: (e) => ({ editor: t, state: n, tr: r, dispatch: i }) => {
|
|
@@ -3268,7 +3268,7 @@ var Io = () => new P({
|
|
|
3268
3268
|
if (!s) return !1;
|
|
3269
3269
|
r.insertText(e, s.from, s.to);
|
|
3270
3270
|
let c = s.from + e.length;
|
|
3271
|
-
return r.setSelection(
|
|
3271
|
+
return r.setSelection(z.create(r.doc, c)).scrollIntoView(), i?.(r), !0;
|
|
3272
3272
|
},
|
|
3273
3273
|
replaceAll: (e) => ({ editor: t, state: n, tr: r, dispatch: i }) => {
|
|
3274
3274
|
if (!t.isEditable) return !1;
|
|
@@ -3310,8 +3310,8 @@ var Io = () => new P({
|
|
|
3310
3310
|
//#endregion
|
|
3311
3311
|
//#region lib/components/ui/widgets/editor/extensions/focus-mode/focus-mode-button.tsx
|
|
3312
3312
|
function Vo({ editor: e }) {
|
|
3313
|
-
let { t } =
|
|
3314
|
-
return /* @__PURE__ */ q(
|
|
3313
|
+
let { t } = M(), { chrome: n } = O(), r = n.state.focusMode;
|
|
3314
|
+
return /* @__PURE__ */ q(k, {
|
|
3315
3315
|
variant: r ? "filled" : "ghost",
|
|
3316
3316
|
"aria-pressed": r,
|
|
3317
3317
|
tooltip: t("material.editor.focus-mode", "Focus mode"),
|
|
@@ -3343,14 +3343,14 @@ var Ho = () => B({
|
|
|
3343
3343
|
//#endregion
|
|
3344
3344
|
//#region lib/components/ui/widgets/editor/extensions/marks/inline-code-button.tsx
|
|
3345
3345
|
function Uo({ editor: e }) {
|
|
3346
|
-
let { t } =
|
|
3346
|
+
let { t } = M(), n = P({
|
|
3347
3347
|
editor: e,
|
|
3348
3348
|
selector: (e) => ({
|
|
3349
3349
|
isCode: e.editor.isActive("code") ?? !1,
|
|
3350
3350
|
canCode: e.editor.can().chain().toggleCode().run() ?? !1
|
|
3351
3351
|
})
|
|
3352
3352
|
});
|
|
3353
|
-
return /* @__PURE__ */ q(
|
|
3353
|
+
return /* @__PURE__ */ q(k, {
|
|
3354
3354
|
variant: n.isCode ? "filled" : "ghost",
|
|
3355
3355
|
"aria-pressed": n.isCode,
|
|
3356
3356
|
tooltip: t("material.editor.code", "Inline code"),
|
|
@@ -3380,12 +3380,12 @@ var Wo = () => B({
|
|
|
3380
3380
|
}],
|
|
3381
3381
|
requires: ["marks"],
|
|
3382
3382
|
markdown: "native"
|
|
3383
|
-
}), Go =
|
|
3383
|
+
}), Go = R.create({
|
|
3384
3384
|
name: "markdownPaste",
|
|
3385
3385
|
addProseMirrorPlugins() {
|
|
3386
3386
|
let { editor: e } = this, t = !1;
|
|
3387
|
-
return [new
|
|
3388
|
-
key: new
|
|
3387
|
+
return [new F({
|
|
3388
|
+
key: new lt("markdownPaste"),
|
|
3389
3389
|
props: {
|
|
3390
3390
|
handleKeyDown: (e, n) => (t = n.shiftKey && (n.metaKey || n.ctrlKey) && n.key.toLowerCase() === "v", !1),
|
|
3391
3391
|
handleDOMEvents: { keyup: () => (t = !1, !1) },
|
|
@@ -3416,8 +3416,8 @@ var Wo = () => B({
|
|
|
3416
3416
|
//#endregion
|
|
3417
3417
|
//#region lib/components/ui/widgets/editor/extensions/outline/outline-button.tsx
|
|
3418
3418
|
function Jo({ editor: e }) {
|
|
3419
|
-
let { t } =
|
|
3420
|
-
return /* @__PURE__ */ q(
|
|
3419
|
+
let { t } = M(), { chrome: n } = O(), r = n.state.panel === "outline";
|
|
3420
|
+
return /* @__PURE__ */ q(k, {
|
|
3421
3421
|
variant: r ? "filled" : "ghost",
|
|
3422
3422
|
"aria-pressed": r,
|
|
3423
3423
|
tooltip: t("material.editor.outline", "Outline"),
|
|
@@ -3444,19 +3444,19 @@ var Yo = () => B({
|
|
|
3444
3444
|
//#endregion
|
|
3445
3445
|
//#region lib/components/ui/widgets/editor/extensions/upload/image-alt-button.tsx
|
|
3446
3446
|
function Xo({ editor: e }) {
|
|
3447
|
-
let { t } =
|
|
3447
|
+
let { t } = M(), n = P({
|
|
3448
3448
|
editor: e,
|
|
3449
3449
|
selector: (e) => e.editor.getAttributes("image").alt ?? ""
|
|
3450
|
-
}), [r, i] = G(""), [a, o] = G(!1), { trigger: s, onCloseAutoFocus: c } =
|
|
3451
|
-
return /* @__PURE__ */ J(
|
|
3450
|
+
}), [r, i] = G(""), [a, o] = G(!1), { trigger: s, onCloseAutoFocus: c } = oe(), l = t("material.editor.upload.alt", "Alt text");
|
|
3451
|
+
return /* @__PURE__ */ J(Re, {
|
|
3452
3452
|
open: a,
|
|
3453
3453
|
onOpenChange: (e) => {
|
|
3454
3454
|
o(e), e && i(n);
|
|
3455
3455
|
},
|
|
3456
|
-
children: [/* @__PURE__ */ q(
|
|
3456
|
+
children: [/* @__PURE__ */ q(Ie, {
|
|
3457
3457
|
asChild: !0,
|
|
3458
3458
|
ref: s,
|
|
3459
|
-
children: /* @__PURE__ */ q(
|
|
3459
|
+
children: /* @__PURE__ */ q(k, {
|
|
3460
3460
|
variant: "ghost",
|
|
3461
3461
|
tooltip: l,
|
|
3462
3462
|
"aria-label": l,
|
|
@@ -3464,14 +3464,14 @@ function Xo({ editor: e }) {
|
|
|
3464
3464
|
more: { kind: "dialog" },
|
|
3465
3465
|
children: /* @__PURE__ */ q(_n, {})
|
|
3466
3466
|
})
|
|
3467
|
-
}), /* @__PURE__ */ J(
|
|
3467
|
+
}), /* @__PURE__ */ J(Le, {
|
|
3468
3468
|
className: "flex size-max flex-col gap-2 p-2",
|
|
3469
3469
|
onCloseAutoFocus: c,
|
|
3470
|
-
children: [/* @__PURE__ */ q(
|
|
3470
|
+
children: [/* @__PURE__ */ q(nt, {
|
|
3471
3471
|
value: r,
|
|
3472
3472
|
label: t("material.editor.upload.alt-label", "Describe the image"),
|
|
3473
3473
|
onChange: (e) => i(e.target.value)
|
|
3474
|
-
}), /* @__PURE__ */ q(
|
|
3474
|
+
}), /* @__PURE__ */ q(j, {
|
|
3475
3475
|
variant: "tonal",
|
|
3476
3476
|
onClick: () => {
|
|
3477
3477
|
e.chain().focus().updateAttributes("image", { alt: r }).run(), o(!1);
|
|
@@ -3517,7 +3517,7 @@ function os() {
|
|
|
3517
3517
|
}
|
|
3518
3518
|
//#endregion
|
|
3519
3519
|
//#region lib/components/ui/widgets/editor/extensions/upload/upload-widgets.ts
|
|
3520
|
-
var ss = /* @__PURE__ */ new WeakMap(), cs = (e, t) =>
|
|
3520
|
+
var ss = /* @__PURE__ */ new WeakMap(), cs = (e, t) => L.widget(e, () => {
|
|
3521
3521
|
let { element: e, destroy: n } = t.build(t.id);
|
|
3522
3522
|
return ss.set(e, n), e;
|
|
3523
3523
|
}, {
|
|
@@ -3531,9 +3531,9 @@ var ss = /* @__PURE__ */ new WeakMap(), cs = (e, t) => I.widget(e, () => {
|
|
|
3531
3531
|
destroy: (e) => ss.get(e)?.()
|
|
3532
3532
|
}), ls = {
|
|
3533
3533
|
cards: [],
|
|
3534
|
-
decorations:
|
|
3534
|
+
decorations: I.empty,
|
|
3535
3535
|
orphaned: []
|
|
3536
|
-
}, us = (e, t) => t.length ?
|
|
3536
|
+
}, us = (e, t) => t.length ? I.create(e, t.map((e) => cs(e.pos, e))) : I.empty, ds = (e) => e.steps.some((t, n) => t instanceof st && t.from === 0 && t.to === e.docs[n].content.size), fs = (e) => {
|
|
3537
3537
|
let t = !1;
|
|
3538
3538
|
return e.content.descendants((e) => ((e.isText || e.isLeaf) && (t = !0), !t)), t;
|
|
3539
3539
|
};
|
|
@@ -3625,12 +3625,12 @@ function _s(e, t) {
|
|
|
3625
3625
|
}
|
|
3626
3626
|
function vs(e, t) {
|
|
3627
3627
|
if (e.isDestroyed) return;
|
|
3628
|
-
let { doc: n } = e.state, r = n.resolve(Math.max(0, Math.min(t, n.content.size))), i =
|
|
3628
|
+
let { doc: n } = e.state, r = n.resolve(Math.max(0, Math.min(t, n.content.size))), i = ct.findFrom(r, 1, !0) ?? ct.findFrom(r, -1, !0) ?? ct.near(r, -1);
|
|
3629
3629
|
e.view.dispatch(e.state.tr.setSelection(i)), e.commands.focus();
|
|
3630
3630
|
}
|
|
3631
3631
|
//#endregion
|
|
3632
3632
|
//#region lib/components/ui/widgets/editor/extensions/upload/upload-plugin.ts
|
|
3633
|
-
var $ = new
|
|
3633
|
+
var $ = new lt("upload");
|
|
3634
3634
|
function ys(e, t) {
|
|
3635
3635
|
let n = e.doc.resolve(Math.min(t ?? e.selection.to, e.doc.content.size)), r = n.parent;
|
|
3636
3636
|
return !r.isTextblock || n.depth === 0 ? {
|
|
@@ -3655,7 +3655,7 @@ var bs = (e, t) => {
|
|
|
3655
3655
|
end: t
|
|
3656
3656
|
} });
|
|
3657
3657
|
function ws({ onFiles: e, onOrphans: t }) {
|
|
3658
|
-
return new
|
|
3658
|
+
return new F({
|
|
3659
3659
|
key: $,
|
|
3660
3660
|
state: {
|
|
3661
3661
|
init: () => ls,
|
|
@@ -3747,7 +3747,7 @@ function Fs(e, t, n, r) {
|
|
|
3747
3747
|
if (!a) return;
|
|
3748
3748
|
let o = _s(e, t), s = a.from;
|
|
3749
3749
|
try {
|
|
3750
|
-
let o = e.schema.nodeFromJSON(Ns(e, n, r)), c = i.doc.nodeAt(a.from), l = a.spec.replaceEmpty && Ps(c), u = l ? a.from :
|
|
3750
|
+
let o = e.schema.nodeFromJSON(Ns(e, n, r)), c = i.doc.nodeAt(a.from), l = a.spec.replaceEmpty && Ps(c), u = l ? a.from : ot(i.doc, a.from, o.type) ?? ms(i.doc, a.from), d = l ? u + (c?.nodeSize ?? 0) : u, f = i.tr.replaceWith(u, d, o);
|
|
3751
3751
|
s = f.mapping.map(d, 1), e.view.dispatch(f.setMeta($, Cs(t, s)));
|
|
3752
3752
|
} catch {
|
|
3753
3753
|
e.view.dispatch(i.tr.setMeta($, Ss(t)));
|
|
@@ -3772,15 +3772,15 @@ function Ls({ accept: e, multiple: t, label: n }, r) {
|
|
|
3772
3772
|
//#endregion
|
|
3773
3773
|
//#region lib/components/ui/widgets/editor/extensions/upload/upload-actions.tsx
|
|
3774
3774
|
function Rs({ id: e, name: t, failed: n, retryable: r, storage: i }) {
|
|
3775
|
-
let { t: a } =
|
|
3775
|
+
let { t: a } = M(), o = n ? a("material.editor.upload.remove", "Remove {name}", { name: t }) : a("material.editor.upload.cancel", "Cancel upload of {name}", { name: t });
|
|
3776
3776
|
return /* @__PURE__ */ J("div", {
|
|
3777
3777
|
className: "ms-auto flex shrink-0 items-center gap-1",
|
|
3778
|
-
children: [n && r && /* @__PURE__ */ J(
|
|
3778
|
+
children: [n && r && /* @__PURE__ */ J(j, {
|
|
3779
3779
|
variant: "tonal",
|
|
3780
3780
|
size: "sm",
|
|
3781
3781
|
onClick: () => i.retry(e),
|
|
3782
3782
|
children: [/* @__PURE__ */ q(un, {}), a("material.editor.upload.retry", "Retry")]
|
|
3783
|
-
}), /* @__PURE__ */ q(
|
|
3783
|
+
}), /* @__PURE__ */ q(N, {
|
|
3784
3784
|
variant: "ghost",
|
|
3785
3785
|
tooltip: o,
|
|
3786
3786
|
"aria-label": o,
|
|
@@ -3820,7 +3820,7 @@ function Bs(e, t, n) {
|
|
|
3820
3820
|
}
|
|
3821
3821
|
}
|
|
3822
3822
|
function Vs({ id: e, storage: n, maxSize: r }) {
|
|
3823
|
-
let { t: i } =
|
|
3823
|
+
let { t: i } = M(), { queue: a } = n, o = jt(a.subscribe, () => a.get(e), () => void 0);
|
|
3824
3824
|
if (!o) return null;
|
|
3825
3825
|
let s = o.file.name, c = o.status === "error";
|
|
3826
3826
|
return /* @__PURE__ */ J("div", {
|
|
@@ -3845,7 +3845,7 @@ function Vs({ id: e, storage: n, maxSize: r }) {
|
|
|
3845
3845
|
role: "alert",
|
|
3846
3846
|
className: "text-xs text-error-text",
|
|
3847
3847
|
children: Bs(i, o.failure, r)
|
|
3848
|
-
}) : /* @__PURE__ */ q(
|
|
3848
|
+
}) : /* @__PURE__ */ q(Se, {
|
|
3849
3849
|
value: o.progress === void 0 ? null : o.progress * 100,
|
|
3850
3850
|
"aria-label": i("material.editor.upload.uploading", "Uploading {name}", { name: s }),
|
|
3851
3851
|
className: "mt-1.5"
|
|
@@ -3864,7 +3864,7 @@ function Vs({ id: e, storage: n, maxSize: r }) {
|
|
|
3864
3864
|
//#endregion
|
|
3865
3865
|
//#region lib/components/ui/widgets/editor/extensions/upload/upload-widget.tsx
|
|
3866
3866
|
function Hs(e, t, n, r) {
|
|
3867
|
-
let i = new
|
|
3867
|
+
let i = new Qe(Vs, {
|
|
3868
3868
|
editor: e,
|
|
3869
3869
|
props: {
|
|
3870
3870
|
id: r,
|
|
@@ -4060,7 +4060,7 @@ function Zs(e) {
|
|
|
4060
4060
|
}
|
|
4061
4061
|
//#endregion
|
|
4062
4062
|
//#region lib/components/ui/widgets/editor/extensions/upload/upload-extension.ts
|
|
4063
|
-
var Qs = /* @__PURE__ */ new WeakMap(), $s =
|
|
4063
|
+
var Qs = /* @__PURE__ */ new WeakMap(), $s = R.create({
|
|
4064
4064
|
name: "upload",
|
|
4065
4065
|
addStorage: () => ({}),
|
|
4066
4066
|
onBeforeCreate() {
|
|
@@ -4119,18 +4119,18 @@ var Qs = /* @__PURE__ */ new WeakMap(), $s = L.create({
|
|
|
4119
4119
|
order: 61,
|
|
4120
4120
|
priority: 30,
|
|
4121
4121
|
kind: "panel",
|
|
4122
|
-
when: (e) => !!
|
|
4123
|
-
render:
|
|
4122
|
+
when: (e) => !!f(e)?.ownsImage,
|
|
4123
|
+
render: te
|
|
4124
4124
|
}],
|
|
4125
4125
|
bubble: [{
|
|
4126
4126
|
id: "image-alt",
|
|
4127
4127
|
order: 35,
|
|
4128
4128
|
priority: 60,
|
|
4129
4129
|
kind: "panel",
|
|
4130
|
-
when: (e) => !!
|
|
4130
|
+
when: (e) => !!f(e) && e.isActive("image"),
|
|
4131
4131
|
render: Xo
|
|
4132
4132
|
}],
|
|
4133
|
-
slash:
|
|
4133
|
+
slash: De("image"),
|
|
4134
4134
|
markdown: "native"
|
|
4135
4135
|
} : {
|
|
4136
4136
|
name: "upload",
|
|
@@ -4138,91 +4138,91 @@ var Qs = /* @__PURE__ */ new WeakMap(), $s = L.create({
|
|
|
4138
4138
|
markdown: "native"
|
|
4139
4139
|
});
|
|
4140
4140
|
}, tc = {
|
|
4141
|
-
accordion:
|
|
4142
|
-
actionCard:
|
|
4141
|
+
accordion: D,
|
|
4142
|
+
actionCard: i,
|
|
4143
4143
|
assistant: fo,
|
|
4144
|
-
blocks:
|
|
4145
|
-
callout:
|
|
4146
|
-
checkboxGroup:
|
|
4147
|
-
codeBlock:
|
|
4148
|
-
color:
|
|
4144
|
+
blocks: Fe,
|
|
4145
|
+
callout: C,
|
|
4146
|
+
checkboxGroup: v,
|
|
4147
|
+
codeBlock: g,
|
|
4148
|
+
color: ye,
|
|
4149
4149
|
comments: Mo,
|
|
4150
|
-
count:
|
|
4150
|
+
count: b,
|
|
4151
4151
|
dragHandle: Po,
|
|
4152
|
-
emoji:
|
|
4152
|
+
emoji: de,
|
|
4153
4153
|
find: Bo,
|
|
4154
4154
|
focusMode: Ho,
|
|
4155
|
-
fontFamily:
|
|
4156
|
-
gallery:
|
|
4155
|
+
fontFamily: Ae,
|
|
4156
|
+
gallery: pe,
|
|
4157
4157
|
headings: n,
|
|
4158
|
-
highlight:
|
|
4159
|
-
image:
|
|
4158
|
+
highlight: x,
|
|
4159
|
+
image: re,
|
|
4160
4160
|
inlineCode: Wo,
|
|
4161
|
-
link:
|
|
4161
|
+
link: d,
|
|
4162
4162
|
lists: Ee,
|
|
4163
4163
|
markdownPaste: qo,
|
|
4164
|
-
marks:
|
|
4165
|
-
mention:
|
|
4164
|
+
marks: E,
|
|
4165
|
+
mention: Pe,
|
|
4166
4166
|
outline: Yo,
|
|
4167
|
-
placeholder:
|
|
4168
|
-
radioGroup:
|
|
4169
|
-
selectCard:
|
|
4170
|
-
selectChip:
|
|
4167
|
+
placeholder: S,
|
|
4168
|
+
radioGroup: _,
|
|
4169
|
+
selectCard: h,
|
|
4170
|
+
selectChip: _e,
|
|
4171
4171
|
slash: r,
|
|
4172
|
-
table:
|
|
4173
|
-
textAlign:
|
|
4172
|
+
table: ve,
|
|
4173
|
+
textAlign: y,
|
|
4174
4174
|
upload: ec,
|
|
4175
4175
|
youtube: o
|
|
4176
4176
|
}, nc = (...e) => (t) => [...t, ...e], rc = (...e) => (t) => t.filter((t) => !e.includes(t.key ?? t.name)), ic = () => [
|
|
4177
|
-
|
|
4178
|
-
|
|
4177
|
+
i(),
|
|
4178
|
+
_e(),
|
|
4179
|
+
h(),
|
|
4179
4180
|
v(),
|
|
4180
|
-
|
|
4181
|
-
y()
|
|
4181
|
+
_()
|
|
4182
4182
|
], ac = () => [
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4183
|
+
C(),
|
|
4184
|
+
D(),
|
|
4185
|
+
pe(),
|
|
4186
4186
|
r(),
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4187
|
+
ye(),
|
|
4188
|
+
Ae(),
|
|
4189
|
+
E(),
|
|
4190
4190
|
n(),
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
C(),
|
|
4191
|
+
Fe(),
|
|
4192
|
+
d(),
|
|
4194
4193
|
x(),
|
|
4195
|
-
|
|
4196
|
-
|
|
4194
|
+
y(),
|
|
4195
|
+
S(),
|
|
4196
|
+
b(),
|
|
4197
4197
|
qo(),
|
|
4198
4198
|
Ee(),
|
|
4199
|
-
|
|
4199
|
+
re(),
|
|
4200
4200
|
ec(),
|
|
4201
4201
|
o(),
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4202
|
+
de({ suggest: !0 }),
|
|
4203
|
+
ve(),
|
|
4204
|
+
g(),
|
|
4205
4205
|
Bo(),
|
|
4206
4206
|
Ho(),
|
|
4207
4207
|
Po(),
|
|
4208
4208
|
Mo()
|
|
4209
4209
|
], oc = () => [
|
|
4210
|
-
|
|
4210
|
+
E({ compact: !0 }),
|
|
4211
4211
|
Wo(),
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4212
|
+
d(),
|
|
4213
|
+
S(),
|
|
4214
|
+
b(),
|
|
4215
4215
|
qo(),
|
|
4216
4216
|
Ee(),
|
|
4217
4217
|
ec()
|
|
4218
4218
|
], sc = () => [
|
|
4219
|
-
|
|
4219
|
+
E({ compact: !0 }),
|
|
4220
4220
|
Wo(),
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4221
|
+
d(),
|
|
4222
|
+
S(),
|
|
4223
|
+
b(),
|
|
4224
|
+
de({ suggest: !0 }),
|
|
4225
|
+
Pe()
|
|
4226
4226
|
];
|
|
4227
4227
|
//#endregion
|
|
4228
4228
|
//#region lib/components/ui/widgets/editor/extensions/assistant/use-assistant-feature.ts
|
|
@@ -4277,7 +4277,7 @@ function dc(e, t) {
|
|
|
4277
4277
|
//#endregion
|
|
4278
4278
|
//#region lib/components/ui/widgets/editor/partials/editor-character-count.tsx
|
|
4279
4279
|
function fc({ className: e }) {
|
|
4280
|
-
let { t: n } =
|
|
4280
|
+
let { t: n } = M(), { handle: r } = O(), i = P({
|
|
4281
4281
|
editor: r.editor,
|
|
4282
4282
|
selector: ({ editor: e }) => {
|
|
4283
4283
|
let t = e?.extensionManager.extensions.find((e) => e.name === "characterCount")?.options.limit;
|
|
@@ -4322,7 +4322,7 @@ function pc(e, t) {
|
|
|
4322
4322
|
//#endregion
|
|
4323
4323
|
//#region lib/components/ui/widgets/editor/presets/document-editor-frame-parts.tsx
|
|
4324
4324
|
function mc({ side: e, children: n }) {
|
|
4325
|
-
let { t: r } =
|
|
4325
|
+
let { t: r } = M();
|
|
4326
4326
|
return /* @__PURE__ */ q("aside", {
|
|
4327
4327
|
"aria-label": r("material.editor.outline-region", "Document outline"),
|
|
4328
4328
|
"data-slot": "document-editor-rail",
|
|
@@ -4352,7 +4352,7 @@ function gc({ presence: e, panels: t, children: n }) {
|
|
|
4352
4352
|
});
|
|
4353
4353
|
}
|
|
4354
4354
|
function _c({ children: e }) {
|
|
4355
|
-
let { t } =
|
|
4355
|
+
let { t } = M();
|
|
4356
4356
|
return /* @__PURE__ */ q("aside", {
|
|
4357
4357
|
"aria-label": t("material.editor.comments.title", "Comments"),
|
|
4358
4358
|
"data-slot": "document-editor-comments",
|
|
@@ -4435,7 +4435,7 @@ function Ic({ look: e }) {
|
|
|
4435
4435
|
"data-slot": "compact-editor-toolbar",
|
|
4436
4436
|
"data-look": e,
|
|
4437
4437
|
className: Fc(e),
|
|
4438
|
-
children: /* @__PURE__ */ q(
|
|
4438
|
+
children: /* @__PURE__ */ q(w, {
|
|
4439
4439
|
dividers: !1,
|
|
4440
4440
|
density: "compact",
|
|
4441
4441
|
className: Mc(e, Cc)
|
|
@@ -4456,7 +4456,7 @@ function Lc({ actions: e }) {
|
|
|
4456
4456
|
//#endregion
|
|
4457
4457
|
//#region lib/components/ui/widgets/editor/presets/preset-features.ts
|
|
4458
4458
|
var Rc = (e) => (t) => {
|
|
4459
|
-
let { features: n, mentions: r, outline: i, extra: a } = e, o = (typeof n == "function" ? n(t) : n) ?? (r ? [...t,
|
|
4459
|
+
let { features: n, mentions: r, outline: i, extra: a } = e, o = (typeof n == "function" ? n(t) : n) ?? (r ? [...t, Pe()] : t);
|
|
4460
4460
|
return [...i && !o.some((e) => e.key === "outline") ? [...o, Yo()] : o, ...a.filter((e) => !!e)];
|
|
4461
4461
|
}, zc = [
|
|
4462
4462
|
"min-h-[1lh]",
|
|
@@ -4510,43 +4510,43 @@ function Wc(e = 2, t = 8) {
|
|
|
4510
4510
|
}
|
|
4511
4511
|
//#endregion
|
|
4512
4512
|
//#region lib/components/ui/widgets/editor/presets/compact-editor.tsx
|
|
4513
|
-
function Gc({ features: e, minRows: n = 2, maxRows: r = 8, toolbar: i = !0, look: o = "expressive", actions:
|
|
4514
|
-
let { t:
|
|
4515
|
-
return /* @__PURE__ */ J(
|
|
4516
|
-
...
|
|
4513
|
+
function Gc({ features: e, minRows: n = 2, maxRows: r = 8, toolbar: i = !0, look: o = "expressive", actions: c, onUpload: l, uploadOptions: u, onUploadingChange: d, onAssist: f, assistOptions: p, label: m, helperText: h, error: g, required: _, className: v, attributes: y, ...b }) {
|
|
4514
|
+
let { t: x } = M(), S = U(oc, []), C = uc(l, u), w = cc(f, p), E = !!c || !!b.characterLimit;
|
|
4515
|
+
return /* @__PURE__ */ J(Oe, {
|
|
4516
|
+
...b,
|
|
4517
4517
|
look: o,
|
|
4518
4518
|
features: Rc({
|
|
4519
4519
|
features: e,
|
|
4520
|
-
mentions:
|
|
4521
|
-
extra: [C,
|
|
4520
|
+
mentions: b.mentions,
|
|
4521
|
+
extra: [C, w]
|
|
4522
4522
|
}),
|
|
4523
|
-
defaults:
|
|
4523
|
+
defaults: S,
|
|
4524
4524
|
attributes: {
|
|
4525
4525
|
class: t("nxgt-prose text-[0.9375rem] leading-relaxed focus:outline-none", Wc(n, r)),
|
|
4526
|
-
"aria-label":
|
|
4527
|
-
...
|
|
4526
|
+
"aria-label": x("material.editor.comment", "Comment"),
|
|
4527
|
+
...y
|
|
4528
4528
|
},
|
|
4529
4529
|
children: [
|
|
4530
4530
|
/* @__PURE__ */ q(Me, {
|
|
4531
4531
|
label: m,
|
|
4532
4532
|
helperText: h,
|
|
4533
|
-
error:
|
|
4534
|
-
required:
|
|
4535
|
-
className:
|
|
4533
|
+
error: g,
|
|
4534
|
+
required: _,
|
|
4535
|
+
className: v,
|
|
4536
4536
|
children: /* @__PURE__ */ J("div", {
|
|
4537
4537
|
"data-slot": "compact-editor",
|
|
4538
|
-
"data-invalid":
|
|
4538
|
+
"data-invalid": g || void 0,
|
|
4539
4539
|
"data-look": o,
|
|
4540
|
-
className: t("overflow-clip border bg-card text-card-foreground transition-colors duration-(--nxgt-motion-effects-fast-duration) ease-effects-fast motion-reduce:transition-none", Pc(o,
|
|
4540
|
+
className: t("overflow-clip border bg-card text-card-foreground transition-colors duration-(--nxgt-motion-effects-fast-duration) ease-effects-fast motion-reduce:transition-none", Pc(o, g)),
|
|
4541
4541
|
children: [
|
|
4542
4542
|
i && /* @__PURE__ */ q(Ic, { look: o }),
|
|
4543
|
-
/* @__PURE__ */ q(
|
|
4544
|
-
|
|
4543
|
+
/* @__PURE__ */ q(T, { className: "px-3 py-2.5" }),
|
|
4544
|
+
E && /* @__PURE__ */ q(Lc, { actions: c })
|
|
4545
4545
|
]
|
|
4546
4546
|
})
|
|
4547
4547
|
}),
|
|
4548
4548
|
l && /* @__PURE__ */ q(lc, { onChange: d }),
|
|
4549
|
-
/* @__PURE__ */ q(
|
|
4549
|
+
/* @__PURE__ */ q(s, {}),
|
|
4550
4550
|
/* @__PURE__ */ q(a, {}),
|
|
4551
4551
|
/* @__PURE__ */ q(or, {})
|
|
4552
4552
|
]
|
|
@@ -4555,16 +4555,16 @@ function Gc({ features: e, minRows: n = 2, maxRows: r = 8, toolbar: i = !0, look
|
|
|
4555
4555
|
//#endregion
|
|
4556
4556
|
//#region lib/components/ui/widgets/editor/presets/compact-editor-form-field.tsx
|
|
4557
4557
|
function Kc({ control: e, name: n, ...r }) {
|
|
4558
|
-
return /* @__PURE__ */ q(
|
|
4558
|
+
return /* @__PURE__ */ q(Xe, {
|
|
4559
4559
|
control: e,
|
|
4560
4560
|
name: n,
|
|
4561
|
-
render: ({ field: e, fieldState: n }) => /* @__PURE__ */ q(
|
|
4561
|
+
render: ({ field: e, fieldState: n }) => /* @__PURE__ */ q(Ze, {
|
|
4562
4562
|
onBlur: e.onBlur,
|
|
4563
4563
|
focusRef: e.ref,
|
|
4564
4564
|
children: /* @__PURE__ */ q(Gc, {
|
|
4565
4565
|
...r,
|
|
4566
4566
|
className: t(r.className, e.disabled && "nxgt-editor-disabled"),
|
|
4567
|
-
value: e.value ??
|
|
4567
|
+
value: e.value ?? we(r.format ?? "html"),
|
|
4568
4568
|
onChange: (t) => e.onChange(t),
|
|
4569
4569
|
editable: (r.editable ?? !0) && !e.disabled,
|
|
4570
4570
|
error: n.invalid,
|
|
@@ -4576,8 +4576,8 @@ function Kc({ control: e, name: n, ...r }) {
|
|
|
4576
4576
|
//#endregion
|
|
4577
4577
|
//#region lib/components/ui/widgets/editor/partials/page-mode-switch.tsx
|
|
4578
4578
|
function qc({ value: e, onChange: t }) {
|
|
4579
|
-
let { t: n } =
|
|
4580
|
-
return /* @__PURE__ */ J(
|
|
4579
|
+
let { t: n } = M();
|
|
4580
|
+
return /* @__PURE__ */ J(et, {
|
|
4581
4581
|
type: "single",
|
|
4582
4582
|
variant: "segmented",
|
|
4583
4583
|
size: "sm",
|
|
@@ -4586,15 +4586,15 @@ function qc({ value: e, onChange: t }) {
|
|
|
4586
4586
|
"aria-label": n("material.editor.page.mode", "View"),
|
|
4587
4587
|
"data-slot": "editor-page-mode",
|
|
4588
4588
|
children: [
|
|
4589
|
-
/* @__PURE__ */ q(
|
|
4589
|
+
/* @__PURE__ */ q($e, {
|
|
4590
4590
|
value: "write",
|
|
4591
4591
|
children: n("material.editor.page.write", "Write")
|
|
4592
4592
|
}),
|
|
4593
|
-
/* @__PURE__ */ q(
|
|
4593
|
+
/* @__PURE__ */ q($e, {
|
|
4594
4594
|
value: "preview",
|
|
4595
4595
|
children: n("material.editor.page.preview", "Preview")
|
|
4596
4596
|
}),
|
|
4597
|
-
/* @__PURE__ */ q(
|
|
4597
|
+
/* @__PURE__ */ q($e, {
|
|
4598
4598
|
value: "markdown",
|
|
4599
4599
|
children: n("material.editor.page.markdown", "Markdown")
|
|
4600
4600
|
})
|
|
@@ -4605,7 +4605,7 @@ function qc({ value: e, onChange: t }) {
|
|
|
4605
4605
|
//#region lib/components/ui/widgets/editor/partials/page-mode-views.tsx
|
|
4606
4606
|
var Jc = Ot(() => import("./rich-text-viewer-CXJp584B.js").then((e) => e.n).then((e) => ({ default: e.RichTextViewer })));
|
|
4607
4607
|
function Yc() {
|
|
4608
|
-
let { handle: e } = O(), { editor: t } = e, n =
|
|
4608
|
+
let { handle: e } = O(), { editor: t } = e, n = P({
|
|
4609
4609
|
editor: t,
|
|
4610
4610
|
selector: (e) => e.editor?.state.doc ?? null,
|
|
4611
4611
|
equalityFn: (e, t) => e === t
|
|
@@ -4624,7 +4624,7 @@ function Xc({ children: e }) {
|
|
|
4624
4624
|
});
|
|
4625
4625
|
}
|
|
4626
4626
|
function Zc({ json: e, components: t }) {
|
|
4627
|
-
let { t: n } =
|
|
4627
|
+
let { t: n } = M(), { look: r } = O(), i = n("material.editor.page.empty", "Nothing to show yet.");
|
|
4628
4628
|
return e ? /* @__PURE__ */ q(Dt, {
|
|
4629
4629
|
fallback: /* @__PURE__ */ q(Xc, { children: n("material.editor.page.loading", "Loading…") }),
|
|
4630
4630
|
children: /* @__PURE__ */ q(Jc, {
|
|
@@ -4636,7 +4636,7 @@ function Zc({ json: e, components: t }) {
|
|
|
4636
4636
|
}) : /* @__PURE__ */ q(Xc, { children: i });
|
|
4637
4637
|
}
|
|
4638
4638
|
function Qc({ json: e }) {
|
|
4639
|
-
let { t } =
|
|
4639
|
+
let { t } = M(), { handle: n } = O(), [r, i] = G(null), a = n.editor?.extensionManager.extensions;
|
|
4640
4640
|
return H(() => {
|
|
4641
4641
|
let t = !0;
|
|
4642
4642
|
if (!e) {
|
|
@@ -4713,7 +4713,7 @@ function il({ floating: e, children: n }) {
|
|
|
4713
4713
|
//#endregion
|
|
4714
4714
|
//#region lib/components/ui/widgets/editor/presets/page-rails.tsx
|
|
4715
4715
|
function al({ children: e, fab: t }) {
|
|
4716
|
-
let { t: n } =
|
|
4716
|
+
let { t: n } = M();
|
|
4717
4717
|
return t === void 0 ? /* @__PURE__ */ q("aside", {
|
|
4718
4718
|
"aria-label": n("material.editor.tools", "Tools"),
|
|
4719
4719
|
"data-slot": "document-editor-tools",
|
|
@@ -4733,7 +4733,7 @@ function al({ children: e, fab: t }) {
|
|
|
4733
4733
|
});
|
|
4734
4734
|
}
|
|
4735
4735
|
function ol({ side: e, children: t }) {
|
|
4736
|
-
let { t: n } =
|
|
4736
|
+
let { t: n } = M();
|
|
4737
4737
|
return /* @__PURE__ */ q("aside", {
|
|
4738
4738
|
"aria-label": n("material.editor.outline-region", "Document outline"),
|
|
4739
4739
|
"data-slot": "document-editor-rail",
|
|
@@ -4743,7 +4743,7 @@ function ol({ side: e, children: t }) {
|
|
|
4743
4743
|
});
|
|
4744
4744
|
}
|
|
4745
4745
|
function sl({ children: e }) {
|
|
4746
|
-
let { t } =
|
|
4746
|
+
let { t } = M();
|
|
4747
4747
|
return /* @__PURE__ */ q("aside", {
|
|
4748
4748
|
"aria-label": t("material.editor.comments.title", "Comments"),
|
|
4749
4749
|
"data-slot": "document-editor-comments",
|
|
@@ -4752,33 +4752,33 @@ function sl({ children: e }) {
|
|
|
4752
4752
|
});
|
|
4753
4753
|
}
|
|
4754
4754
|
function cl({ toolbar: e, bar: n, rail: r, railFab: i, previewComponents: a, panels: o, footer: s, outline: c, comments: l, presence: u, outlineSide: d = "start", className: f, children: p }) {
|
|
4755
|
-
let { chrome: m, handle: h, look: g } = O(), _ = g === "expressive", v = h.features.some((e) => e.key === "dragHandle"), y = m.state.focusMode, b = W(null), [x, S] = G("write"),
|
|
4755
|
+
let { chrome: m, handle: h, look: g } = O(), _ = g === "expressive", v = h.features.some((e) => e.key === "dragHandle"), y = m.state.focusMode, b = W(null), [x, S] = G("write"), C = x === "write", w = pc(b, 64), T = pc(b, 72), E = C && !y, ee = E && w && r, D = !!(n && E && !ee), te = c && E && T, ne = l && E && w;
|
|
4756
4756
|
return /* @__PURE__ */ J("div", {
|
|
4757
4757
|
ref: b,
|
|
4758
4758
|
"data-slot": "document-editor",
|
|
4759
4759
|
"data-look": g,
|
|
4760
4760
|
"data-layout": "page",
|
|
4761
4761
|
"data-mode": x,
|
|
4762
|
-
className: t(el(_,
|
|
4762
|
+
className: t(el(_, D), f),
|
|
4763
4763
|
children: [
|
|
4764
4764
|
/* @__PURE__ */ q(nl, {
|
|
4765
4765
|
mode: x,
|
|
4766
4766
|
onModeChange: S,
|
|
4767
4767
|
showSwitch: !y,
|
|
4768
4768
|
presence: u,
|
|
4769
|
-
panels:
|
|
4770
|
-
children:
|
|
4769
|
+
panels: C && o,
|
|
4770
|
+
children: E && !ee && e
|
|
4771
4771
|
}),
|
|
4772
4772
|
/* @__PURE__ */ q(va, { className: "absolute end-3 top-3 z-20" }),
|
|
4773
|
-
|
|
4773
|
+
D && n,
|
|
4774
4774
|
/* @__PURE__ */ J("div", {
|
|
4775
4775
|
className: "flex items-start gap-4 px-2 pb-6 @2xl:gap-6 @2xl:px-6",
|
|
4776
4776
|
children: [
|
|
4777
|
-
|
|
4777
|
+
ee && /* @__PURE__ */ q(al, {
|
|
4778
4778
|
fab: i,
|
|
4779
4779
|
children: r
|
|
4780
4780
|
}),
|
|
4781
|
-
|
|
4781
|
+
te && d === "start" && /* @__PURE__ */ q(ol, {
|
|
4782
4782
|
side: "start",
|
|
4783
4783
|
children: c
|
|
4784
4784
|
}),
|
|
@@ -4792,15 +4792,15 @@ function cl({ toolbar: e, bar: n, rail: r, railFab: i, previewComponents: a, pan
|
|
|
4792
4792
|
children: p
|
|
4793
4793
|
})
|
|
4794
4794
|
}),
|
|
4795
|
-
|
|
4795
|
+
te && d === "end" && /* @__PURE__ */ q(ol, {
|
|
4796
4796
|
side: "end",
|
|
4797
4797
|
children: c
|
|
4798
4798
|
}),
|
|
4799
|
-
|
|
4799
|
+
ne && /* @__PURE__ */ q(sl, { children: l })
|
|
4800
4800
|
]
|
|
4801
4801
|
}),
|
|
4802
4802
|
s && /* @__PURE__ */ q(il, {
|
|
4803
|
-
floating:
|
|
4803
|
+
floating: D,
|
|
4804
4804
|
children: s
|
|
4805
4805
|
})
|
|
4806
4806
|
]
|
|
@@ -4830,7 +4830,7 @@ var ll = {
|
|
|
4830
4830
|
history: 50
|
|
4831
4831
|
};
|
|
4832
4832
|
function dl(e) {
|
|
4833
|
-
return e.some((e) => e.name === "slash") ?
|
|
4833
|
+
return e.some((e) => e.name === "slash") ? u(e.flatMap((e) => e.slash ?? [])) : [];
|
|
4834
4834
|
}
|
|
4835
4835
|
function fl(e, t) {
|
|
4836
4836
|
let n = new Set(t.map((e) => e.id));
|
|
@@ -4840,14 +4840,14 @@ function fl(e, t) {
|
|
|
4840
4840
|
});
|
|
4841
4841
|
}
|
|
4842
4842
|
function pl(e, t) {
|
|
4843
|
-
return fl(e, t).flatMap((e) => e.id === "marks" && e.render ===
|
|
4843
|
+
return fl(e, t).flatMap((e) => e.id === "marks" && e.render === ee ? [{
|
|
4844
4844
|
...e,
|
|
4845
|
-
render:
|
|
4845
|
+
render: p
|
|
4846
4846
|
}, {
|
|
4847
4847
|
...e,
|
|
4848
4848
|
id: "marks-extra",
|
|
4849
4849
|
order: e.order + .5,
|
|
4850
|
-
render:
|
|
4850
|
+
render: l
|
|
4851
4851
|
}] : [e]).map((e) => ({
|
|
4852
4852
|
...e,
|
|
4853
4853
|
priority: ul[e.id] ?? e.priority
|
|
@@ -4857,24 +4857,24 @@ function pl(e, t) {
|
|
|
4857
4857
|
//#region lib/components/ui/widgets/editor/partials/use-toolbar-shown.ts
|
|
4858
4858
|
function ml() {
|
|
4859
4859
|
let { handle: e, chrome: t } = O();
|
|
4860
|
-
return !!
|
|
4860
|
+
return !!P({
|
|
4861
4861
|
editor: e.editor,
|
|
4862
|
-
selector: (e) => !!(e.editor?.isEditable &&
|
|
4862
|
+
selector: (e) => !!(e.editor?.isEditable && ge.selectShowToolbar(t.state))
|
|
4863
4863
|
});
|
|
4864
4864
|
}
|
|
4865
4865
|
//#endregion
|
|
4866
4866
|
//#region lib/components/ui/widgets/editor/partials/editor-insert-fab.tsx
|
|
4867
4867
|
function hl() {
|
|
4868
|
-
let { t: e } =
|
|
4869
|
-
return !n || !
|
|
4868
|
+
let { t: e } = M(), { handle: t } = O(), { editor: n, features: r } = t, i = W(!1), a = U(() => m(dl(r), "", e), [r, e]), o = ml();
|
|
4869
|
+
return !n || !o || a.length === 0 ? null : /* @__PURE__ */ q(se, {
|
|
4870
4870
|
"data-slot": "editor-insert-fab",
|
|
4871
4871
|
label: e("material.editor.insert", "Insert"),
|
|
4872
|
-
items:
|
|
4872
|
+
items: a.map((e) => ({
|
|
4873
4873
|
id: e.id,
|
|
4874
4874
|
icon: /* @__PURE__ */ q(e.icon, {}),
|
|
4875
4875
|
label: e.title,
|
|
4876
4876
|
onSelect: () => {
|
|
4877
|
-
|
|
4877
|
+
i.current = !0;
|
|
4878
4878
|
let t = n.state.selection.from;
|
|
4879
4879
|
e.run({
|
|
4880
4880
|
editor: n,
|
|
@@ -4886,7 +4886,7 @@ function hl() {
|
|
|
4886
4886
|
}
|
|
4887
4887
|
})),
|
|
4888
4888
|
onCloseAutoFocus: (e) => {
|
|
4889
|
-
|
|
4889
|
+
i.current && (i.current = !1, e.preventDefault(), n.isDestroyed || n.commands.focus());
|
|
4890
4890
|
}
|
|
4891
4891
|
});
|
|
4892
4892
|
}
|
|
@@ -4897,7 +4897,7 @@ function gl({ className: e }) {
|
|
|
4897
4897
|
return ml() ? /* @__PURE__ */ q("div", {
|
|
4898
4898
|
"data-slot": "editor-floating-bar",
|
|
4899
4899
|
className: "nxgt-editor-bar",
|
|
4900
|
-
children: /* @__PURE__ */ J(
|
|
4900
|
+
children: /* @__PURE__ */ J(ie, { children: [/* @__PURE__ */ q(w, {
|
|
4901
4901
|
variant: "floating",
|
|
4902
4902
|
dividers: !1,
|
|
4903
4903
|
className: e,
|
|
@@ -4909,7 +4909,7 @@ function gl({ className: e }) {
|
|
|
4909
4909
|
//#region lib/components/ui/widgets/editor/partials/editor-rail-toolbar.tsx
|
|
4910
4910
|
function _l({ floating: e, className: t }) {
|
|
4911
4911
|
let { handle: n } = O(), r = U(() => e ? dl(n.features) : [], [e, n.features]), i = V((e) => fl(e, r), [r]);
|
|
4912
|
-
return /* @__PURE__ */ q(
|
|
4912
|
+
return /* @__PURE__ */ q(w, {
|
|
4913
4913
|
orientation: "vertical",
|
|
4914
4914
|
variant: e ? "floating" : void 0,
|
|
4915
4915
|
className: t,
|
|
@@ -4921,7 +4921,7 @@ function _l({ floating: e, className: t }) {
|
|
|
4921
4921
|
function vl({ look: e, layout: t, previewComponents: n, outline: r, comments: i, collaboration: a, collaborationStatus: o, footer: s, status: c, actions: l }) {
|
|
4922
4922
|
let u = t === "page", d = Nc(e), f = e === "expressive";
|
|
4923
4923
|
return {
|
|
4924
|
-
toolbar: f ? void 0 : /* @__PURE__ */ q(
|
|
4924
|
+
toolbar: f ? void 0 : /* @__PURE__ */ q(w, {
|
|
4925
4925
|
dividers: !1,
|
|
4926
4926
|
className: u ? d.docked : Mc(e, Cc)
|
|
4927
4927
|
}),
|
|
@@ -4948,7 +4948,7 @@ function vl({ look: e, layout: t, previewComponents: n, outline: r, comments: i,
|
|
|
4948
4948
|
function yl(e) {
|
|
4949
4949
|
return /* @__PURE__ */ q(e.layout === "page" ? cl : Tc, {
|
|
4950
4950
|
...vl(e),
|
|
4951
|
-
children: /* @__PURE__ */ q(Ui, { children: /* @__PURE__ */ q(
|
|
4951
|
+
children: /* @__PURE__ */ q(Ui, { children: /* @__PURE__ */ q(T, {}) })
|
|
4952
4952
|
});
|
|
4953
4953
|
}
|
|
4954
4954
|
//#endregion
|
|
@@ -4962,7 +4962,7 @@ function bl({ adapter: e }) {
|
|
|
4962
4962
|
function xl({ onUpload: e, onUploadingChange: t, withComments: n, commentsAdapter: r }) {
|
|
4963
4963
|
return /* @__PURE__ */ J(K, { children: [
|
|
4964
4964
|
e && /* @__PURE__ */ q(lc, { onChange: t }),
|
|
4965
|
-
/* @__PURE__ */ q(
|
|
4965
|
+
/* @__PURE__ */ q(s, {}),
|
|
4966
4966
|
/* @__PURE__ */ q(a, {}),
|
|
4967
4967
|
/* @__PURE__ */ q(or, {}),
|
|
4968
4968
|
/* @__PURE__ */ q(vi, {}),
|
|
@@ -5017,8 +5017,8 @@ function Cl({ features: e, mentions: t, outline: n, onUpload: r, uploadOptions:
|
|
|
5017
5017
|
}
|
|
5018
5018
|
//#endregion
|
|
5019
5019
|
//#region lib/components/ui/widgets/editor/presets/document-editor.tsx
|
|
5020
|
-
function wl({ features: e, layout: n = "docked", look: r = "expressive", previewComponents: i, status: a, actions: o, footer: s = !0, outline: c = !1, onUpload: l, uploadOptions: u, onUploadingChange: d, onAssist: f, assistOptions: p, comments: m, collaboration: h, collaborationStatus:
|
|
5021
|
-
let { defaults:
|
|
5020
|
+
function wl({ features: e, layout: n = "docked", look: r = "expressive", previewComponents: i, status: a, actions: o, footer: s = !0, outline: c = !1, onUpload: l, uploadOptions: u, onUploadingChange: d, onAssist: f, assistOptions: p, comments: m, collaboration: h, collaborationStatus: g, label: _, helperText: v, error: y, required: b, className: x, attributes: S, ...C }) {
|
|
5021
|
+
let { defaults: w, commentsFeature: T, editorFeatures: E } = Cl({
|
|
5022
5022
|
features: e,
|
|
5023
5023
|
mentions: C.mentions,
|
|
5024
5024
|
outline: c,
|
|
@@ -5029,29 +5029,29 @@ function wl({ features: e, layout: n = "docked", look: r = "expressive", preview
|
|
|
5029
5029
|
comments: m,
|
|
5030
5030
|
collaboration: h
|
|
5031
5031
|
});
|
|
5032
|
-
return /* @__PURE__ */ J(
|
|
5032
|
+
return /* @__PURE__ */ J(Oe, {
|
|
5033
5033
|
...C,
|
|
5034
5034
|
look: r,
|
|
5035
|
-
features:
|
|
5036
|
-
defaults:
|
|
5035
|
+
features: E,
|
|
5036
|
+
defaults: w,
|
|
5037
5037
|
attributes: {
|
|
5038
5038
|
class: t("nxgt-prose min-h-64 focus:outline-none"),
|
|
5039
|
-
...
|
|
5039
|
+
...S
|
|
5040
5040
|
},
|
|
5041
5041
|
children: [/* @__PURE__ */ q(Me, {
|
|
5042
|
-
label:
|
|
5043
|
-
helperText:
|
|
5044
|
-
error:
|
|
5045
|
-
required:
|
|
5046
|
-
className:
|
|
5042
|
+
label: _,
|
|
5043
|
+
helperText: v,
|
|
5044
|
+
error: y,
|
|
5045
|
+
required: b,
|
|
5046
|
+
className: x,
|
|
5047
5047
|
children: /* @__PURE__ */ q(yl, {
|
|
5048
5048
|
layout: n,
|
|
5049
5049
|
look: r,
|
|
5050
5050
|
previewComponents: i,
|
|
5051
5051
|
outline: c,
|
|
5052
|
-
comments: !!
|
|
5052
|
+
comments: !!T,
|
|
5053
5053
|
collaboration: !!h,
|
|
5054
|
-
collaborationStatus:
|
|
5054
|
+
collaborationStatus: g,
|
|
5055
5055
|
footer: s,
|
|
5056
5056
|
status: a,
|
|
5057
5057
|
actions: o
|
|
@@ -5059,24 +5059,24 @@ function wl({ features: e, layout: n = "docked", look: r = "expressive", preview
|
|
|
5059
5059
|
}), /* @__PURE__ */ q(xl, {
|
|
5060
5060
|
onUpload: l,
|
|
5061
5061
|
onUploadingChange: d,
|
|
5062
|
-
commentsAdapter:
|
|
5063
|
-
withComments: !!
|
|
5062
|
+
commentsAdapter: T ? m?.adapter : void 0,
|
|
5063
|
+
withComments: !!T
|
|
5064
5064
|
})]
|
|
5065
5065
|
});
|
|
5066
5066
|
}
|
|
5067
5067
|
//#endregion
|
|
5068
5068
|
//#region lib/components/ui/widgets/editor/presets/document-editor-form-field.tsx
|
|
5069
5069
|
function Tl({ control: e, name: n, ...r }) {
|
|
5070
|
-
return /* @__PURE__ */ q(
|
|
5070
|
+
return /* @__PURE__ */ q(Xe, {
|
|
5071
5071
|
control: e,
|
|
5072
5072
|
name: n,
|
|
5073
|
-
render: ({ field: e, fieldState: n }) => /* @__PURE__ */ q(
|
|
5073
|
+
render: ({ field: e, fieldState: n }) => /* @__PURE__ */ q(Ze, {
|
|
5074
5074
|
onBlur: e.onBlur,
|
|
5075
5075
|
focusRef: e.ref,
|
|
5076
5076
|
children: /* @__PURE__ */ q(wl, {
|
|
5077
5077
|
...r,
|
|
5078
5078
|
className: t(r.className, e.disabled && "nxgt-editor-disabled"),
|
|
5079
|
-
value: e.value ??
|
|
5079
|
+
value: e.value ?? we(r.format ?? "html"),
|
|
5080
5080
|
onChange: (t) => e.onChange(t),
|
|
5081
5081
|
editable: (r.editable ?? !0) && !e.disabled,
|
|
5082
5082
|
error: n.invalid,
|
|
@@ -5101,12 +5101,12 @@ function Dl({ error: e, replyTo: t, onCancelReply: n, attachments: r, isDisabled
|
|
|
5101
5101
|
}),
|
|
5102
5102
|
t && /* @__PURE__ */ q("div", {
|
|
5103
5103
|
className: "w-full",
|
|
5104
|
-
children: /* @__PURE__ */ q(
|
|
5104
|
+
children: /* @__PURE__ */ q(ce, {
|
|
5105
5105
|
replyTo: t,
|
|
5106
5106
|
onCancel: n
|
|
5107
5107
|
})
|
|
5108
5108
|
}),
|
|
5109
|
-
/* @__PURE__ */ q(
|
|
5109
|
+
/* @__PURE__ */ q(ue, {
|
|
5110
5110
|
attachments: r,
|
|
5111
5111
|
isDisabled: i,
|
|
5112
5112
|
onAttachmentsChange: a,
|
|
@@ -5121,7 +5121,7 @@ function Ol({ id: e, look: t }) {
|
|
|
5121
5121
|
id: e,
|
|
5122
5122
|
"data-slot": "rich-chat-composer-toolbar",
|
|
5123
5123
|
className: "w-full px-1",
|
|
5124
|
-
children: /* @__PURE__ */ q(
|
|
5124
|
+
children: /* @__PURE__ */ q(w, {
|
|
5125
5125
|
dividers: !1,
|
|
5126
5126
|
density: "compact",
|
|
5127
5127
|
className: Mc(t, Cc)
|
|
@@ -5131,19 +5131,19 @@ function Ol({ id: e, look: t }) {
|
|
|
5131
5131
|
//#endregion
|
|
5132
5132
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/partials/send-control.tsx
|
|
5133
5133
|
function kl({ sendLabel: e, stopLabel: t, disabled: n, empty: r, onStop: i, onSchedule: a, squircle: o }) {
|
|
5134
|
-
let { t: s } =
|
|
5135
|
-
return !a || i ? /* @__PURE__ */ q(
|
|
5134
|
+
let { t: s } = M();
|
|
5135
|
+
return !a || i ? /* @__PURE__ */ q(ke, {
|
|
5136
5136
|
sendLabel: e,
|
|
5137
5137
|
stopLabel: t,
|
|
5138
5138
|
isDisabled: n,
|
|
5139
5139
|
isEmpty: r,
|
|
5140
5140
|
onStop: i,
|
|
5141
5141
|
shape: o ? "squircle" : "round"
|
|
5142
|
-
}) : /* @__PURE__ */ q(
|
|
5142
|
+
}) : /* @__PURE__ */ q(ne, {
|
|
5143
5143
|
type: "submit",
|
|
5144
5144
|
disabled: n || r,
|
|
5145
5145
|
menuLabel: s("material.editor.send-options", "Send options"),
|
|
5146
|
-
menu: /* @__PURE__ */ q(
|
|
5146
|
+
menu: /* @__PURE__ */ q(A, {
|
|
5147
5147
|
onSelect: a,
|
|
5148
5148
|
children: s("material.editor.schedule", "Schedule…")
|
|
5149
5149
|
}),
|
|
@@ -5153,7 +5153,7 @@ function kl({ sendLabel: e, stopLabel: t, disabled: n, empty: r, onStop: i, onSc
|
|
|
5153
5153
|
//#endregion
|
|
5154
5154
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/partials/send-on-enter.tsx
|
|
5155
5155
|
function Al(e, t) {
|
|
5156
|
-
return e.nativeEvent.keyCode !== 229 &&
|
|
5156
|
+
return e.nativeEvent.keyCode !== 229 && je(e, t);
|
|
5157
5157
|
}
|
|
5158
5158
|
function jl({ onSend: e, sendOnEnter: t, disabled: n, onFocus: r, className: i, children: a }) {
|
|
5159
5159
|
let { handle: o } = O();
|
|
@@ -5170,8 +5170,8 @@ function jl({ onSend: e, sendOnEnter: t, disabled: n, onFocus: r, className: i,
|
|
|
5170
5170
|
//#endregion
|
|
5171
5171
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/partials/format-buttons.tsx
|
|
5172
5172
|
function Ml({ formatOpen: e, toolbarId: t, onFormatToggle: n, mentionable: r }) {
|
|
5173
|
-
let { t: i } =
|
|
5174
|
-
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(
|
|
5173
|
+
let { t: i } = M(), { editor: a } = O().handle, o = i("material.editor.formatting-toggle", "Text formatting"), s = i("material.editor.mention", "Mention someone");
|
|
5174
|
+
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(N, {
|
|
5175
5175
|
variant: "ghost",
|
|
5176
5176
|
color: "default",
|
|
5177
5177
|
tooltip: o,
|
|
@@ -5182,7 +5182,7 @@ function Ml({ formatOpen: e, toolbarId: t, onFormatToggle: n, mentionable: r })
|
|
|
5182
5182
|
onClick: n,
|
|
5183
5183
|
className: "size-8 shrink-0 rounded aria-pressed:bg-primary/10 aria-pressed:text-primary-text",
|
|
5184
5184
|
children: /* @__PURE__ */ q(It, {})
|
|
5185
|
-
}), r && /* @__PURE__ */ q(
|
|
5185
|
+
}), r && /* @__PURE__ */ q(N, {
|
|
5186
5186
|
variant: "ghost",
|
|
5187
5187
|
color: "default",
|
|
5188
5188
|
tooltip: s,
|
|
@@ -5199,9 +5199,9 @@ function Nl({ pill: e, formatOpen: n, toolbarId: r, onFormatToggle: i, mentionab
|
|
|
5199
5199
|
return /* @__PURE__ */ J("div", {
|
|
5200
5200
|
"data-slot": "rich-chat-composer-tools",
|
|
5201
5201
|
className: t("flex min-w-0 items-end gap-1", e ? "order-1" : "flex-1"),
|
|
5202
|
-
children: [/* @__PURE__ */ q(
|
|
5202
|
+
children: [/* @__PURE__ */ q(be, {
|
|
5203
5203
|
...o,
|
|
5204
|
-
actions: /* @__PURE__ */ J(K, { children: [l?.storage.emoji && /* @__PURE__ */ q(
|
|
5204
|
+
actions: /* @__PURE__ */ J(K, { children: [l?.storage.emoji && /* @__PURE__ */ q(xe, { editor: l }), !e && /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Ml, {
|
|
5205
5205
|
formatOpen: n,
|
|
5206
5206
|
toolbarId: r,
|
|
5207
5207
|
onFormatToggle: i,
|
|
@@ -5213,11 +5213,11 @@ function Nl({ pill: e, formatOpen: n, toolbarId: r, onFormatToggle: i, mentionab
|
|
|
5213
5213
|
//#endregion
|
|
5214
5214
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/use-composer-editor.ts
|
|
5215
5215
|
function Pl({ features: e, minRows: n = 1, maxRows: r = 8, placeholder: i, attributes: a, ...o }) {
|
|
5216
|
-
let { t: s } =
|
|
5216
|
+
let { t: s } = M(), c = U(() => sc().map((e) => e.name === "emoji" ? {
|
|
5217
5217
|
...e,
|
|
5218
5218
|
toolbar: void 0
|
|
5219
5219
|
} : e), []);
|
|
5220
|
-
return
|
|
5220
|
+
return le({
|
|
5221
5221
|
...o,
|
|
5222
5222
|
features: e ?? c,
|
|
5223
5223
|
defaults: c,
|
|
@@ -5271,7 +5271,7 @@ var Rl = (e, t) => e.trim().length > 0 || t > 0;
|
|
|
5271
5271
|
//#endregion
|
|
5272
5272
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/use-composer-send.ts
|
|
5273
5273
|
function zl({ handle: e, attachments: t, blocked: n, clear: r, onSend: i, onSchedule: a, onError: o }) {
|
|
5274
|
-
let { t: s } =
|
|
5274
|
+
let { t: s } = M(), [c, l] = G(!1), u = W(!1), d = () => Ll({
|
|
5275
5275
|
getValue: () => e.getValue(),
|
|
5276
5276
|
getJSON: () => e.editor?.getJSON() ?? { type: "doc" },
|
|
5277
5277
|
getExtensions: () => e.editor?.extensionManager.extensions
|
|
@@ -5312,14 +5312,14 @@ function zl({ handle: e, attachments: t, blocked: n, clear: r, onSend: i, onSche
|
|
|
5312
5312
|
function Bl({ handle: e, onSend: t, onSchedule: n, onError: r, disabled: i = !1, isLoading: a = !1, accept: o, maxFiles: s, attachments: c, onAttachmentsChange: l }) {
|
|
5313
5313
|
let [u, d] = G([]), f = c ?? u, p = (e) => {
|
|
5314
5314
|
c === void 0 && d(e), l?.(e);
|
|
5315
|
-
}, m = W(null), h =
|
|
5315
|
+
}, m = W(null), h = he({
|
|
5316
5316
|
attachments: f,
|
|
5317
5317
|
accept: o,
|
|
5318
5318
|
maxFiles: s,
|
|
5319
5319
|
disabled: i,
|
|
5320
5320
|
isLoading: a,
|
|
5321
5321
|
onAttachmentsChange: p
|
|
5322
|
-
}), g = !Rl(
|
|
5322
|
+
}), g = !Rl(P({
|
|
5323
5323
|
editor: e.editor,
|
|
5324
5324
|
selector: (e) => (e.editor?.getText().trim().length ?? 0) > 0
|
|
5325
5325
|
}) ?? !1 ? "x" : "", f.length), _ = zl({
|
|
@@ -5348,7 +5348,7 @@ function Bl({ handle: e, onSend: t, onSchedule: n, onError: r, disabled: i = !1,
|
|
|
5348
5348
|
//#endregion
|
|
5349
5349
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/use-composer.ts
|
|
5350
5350
|
function Vl(e) {
|
|
5351
|
-
let { t } =
|
|
5351
|
+
let { t } = M(), { disabled: n = !1, isLoading: r = !1, collapsed: i = "never" } = e, a = !n && !r, o = Pl({
|
|
5352
5352
|
...e,
|
|
5353
5353
|
editable: a
|
|
5354
5354
|
}), s = Bl({
|
|
@@ -5379,66 +5379,66 @@ function Vl(e) {
|
|
|
5379
5379
|
//#endregion
|
|
5380
5380
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/rich-chat-composer.tsx
|
|
5381
5381
|
function Hl(e) {
|
|
5382
|
-
let { t: n } =
|
|
5382
|
+
let { t: n } = M(), { mentions: r, replyTo: i, onCancelReply: o, actions: c, className: l } = e, { sendOnEnter: u = !0, sendLabel: d, isLoading: f = !1 } = e, { look: p = "expressive" } = e, { handle: m, editable: h, composer: g, ui: _, attach: v } = Vl(e), { files: y, attachments: b } = g, { pill: x } = _;
|
|
5383
5383
|
return /* @__PURE__ */ q("form", {
|
|
5384
5384
|
"data-slot": "rich-chat-composer",
|
|
5385
5385
|
"data-look": p,
|
|
5386
|
-
"data-collapsed":
|
|
5387
|
-
onSubmit:
|
|
5388
|
-
...
|
|
5386
|
+
"data-collapsed": x || void 0,
|
|
5387
|
+
onSubmit: g.handleSubmit,
|
|
5388
|
+
..._.formEvents,
|
|
5389
5389
|
className: El({
|
|
5390
|
-
pill:
|
|
5390
|
+
pill: x,
|
|
5391
5391
|
look: p,
|
|
5392
5392
|
editable: h,
|
|
5393
5393
|
className: l
|
|
5394
5394
|
}),
|
|
5395
|
-
children: /* @__PURE__ */ J(
|
|
5395
|
+
children: /* @__PURE__ */ J(Oe, {
|
|
5396
5396
|
editor: m,
|
|
5397
5397
|
className: "contents",
|
|
5398
5398
|
look: p,
|
|
5399
5399
|
children: [
|
|
5400
5400
|
/* @__PURE__ */ q(Dl, {
|
|
5401
|
-
error:
|
|
5401
|
+
error: y.errorMessage ?? g.sendError,
|
|
5402
5402
|
replyTo: i,
|
|
5403
5403
|
onCancelReply: o,
|
|
5404
|
-
attachments:
|
|
5405
|
-
isDisabled:
|
|
5406
|
-
onAttachmentsChange:
|
|
5404
|
+
attachments: b,
|
|
5405
|
+
isDisabled: y.isDisabled,
|
|
5406
|
+
onAttachmentsChange: g.setAttachments
|
|
5407
5407
|
}),
|
|
5408
5408
|
/* @__PURE__ */ q(jl, {
|
|
5409
|
-
className: t("min-w-0 px-2 py-1",
|
|
5410
|
-
onFocus:
|
|
5411
|
-
onSend: () => void
|
|
5409
|
+
className: t("min-w-0 px-2 py-1", x ? "order-2 flex-1" : "w-full"),
|
|
5410
|
+
onFocus: _.activate,
|
|
5411
|
+
onSend: () => void g.send(),
|
|
5412
5412
|
sendOnEnter: u,
|
|
5413
5413
|
disabled: !h,
|
|
5414
|
-
children: /* @__PURE__ */ q(
|
|
5414
|
+
children: /* @__PURE__ */ q(T, {})
|
|
5415
5415
|
}),
|
|
5416
|
-
|
|
5417
|
-
id:
|
|
5416
|
+
_.formatOpen && !x && /* @__PURE__ */ q(Ol, {
|
|
5417
|
+
id: _.toolbarId,
|
|
5418
5418
|
look: p
|
|
5419
5419
|
}),
|
|
5420
5420
|
/* @__PURE__ */ q(Nl, {
|
|
5421
|
-
pill:
|
|
5422
|
-
formatOpen:
|
|
5423
|
-
toolbarId:
|
|
5424
|
-
onFormatToggle:
|
|
5421
|
+
pill: x,
|
|
5422
|
+
formatOpen: _.formatOpen,
|
|
5423
|
+
toolbarId: _.toolbarId,
|
|
5424
|
+
onFormatToggle: _.toggleFormat,
|
|
5425
5425
|
mentionable: !!r?.length,
|
|
5426
|
-
actions:
|
|
5427
|
-
attach:
|
|
5426
|
+
actions: c,
|
|
5427
|
+
attach: v
|
|
5428
5428
|
}),
|
|
5429
5429
|
/* @__PURE__ */ q("div", {
|
|
5430
|
-
className: t("shrink-0",
|
|
5430
|
+
className: t("shrink-0", x && "order-3"),
|
|
5431
5431
|
children: /* @__PURE__ */ q(kl, {
|
|
5432
5432
|
sendLabel: d ?? n("material.chat.send", "Send"),
|
|
5433
5433
|
stopLabel: n("material.chat.composer.stop", "Stop generating"),
|
|
5434
|
-
disabled:
|
|
5435
|
-
empty:
|
|
5434
|
+
disabled: y.isDisabled,
|
|
5435
|
+
empty: g.empty,
|
|
5436
5436
|
onStop: f ? e.onStop : void 0,
|
|
5437
|
-
onSchedule:
|
|
5437
|
+
onSchedule: g.schedule,
|
|
5438
5438
|
squircle: p === "expressive"
|
|
5439
5439
|
})
|
|
5440
5440
|
}),
|
|
5441
|
-
/* @__PURE__ */ q(
|
|
5441
|
+
/* @__PURE__ */ q(s, {}),
|
|
5442
5442
|
/* @__PURE__ */ q(a, {})
|
|
5443
5443
|
]
|
|
5444
5444
|
})
|
|
@@ -5447,12 +5447,12 @@ function Hl(e) {
|
|
|
5447
5447
|
//#endregion
|
|
5448
5448
|
//#region lib/components/ui/widgets/editor/index.ts
|
|
5449
5449
|
var Ul = {
|
|
5450
|
-
Root:
|
|
5451
|
-
Content:
|
|
5452
|
-
Toolbar:
|
|
5450
|
+
Root: Oe,
|
|
5451
|
+
Content: T,
|
|
5452
|
+
Toolbar: w,
|
|
5453
5453
|
Panel: Ar,
|
|
5454
5454
|
AssistantPanel: or,
|
|
5455
|
-
BubbleMenu:
|
|
5455
|
+
BubbleMenu: s,
|
|
5456
5456
|
CommentsRail: Di,
|
|
5457
5457
|
CommentsPanel: vi,
|
|
5458
5458
|
CommentComposer: Er,
|
|
@@ -5467,4 +5467,4 @@ var Ul = {
|
|
|
5467
5467
|
Presence: mr
|
|
5468
5468
|
};
|
|
5469
5469
|
//#endregion
|
|
5470
|
-
export { Gc as CompactEditor, Kc as CompactEditorFormField, wl as DocumentEditor, Tl as DocumentEditorFormField, Ul as Editor, or as EditorAssistantPanel, Ui as EditorBlockHandle,
|
|
5470
|
+
export { Gc as CompactEditor, Kc as CompactEditorFormField, wl as DocumentEditor, Tl as DocumentEditorFormField, Ul as Editor, or as EditorAssistantPanel, Ui as EditorBlockHandle, s as EditorBubbleMenu, Er as EditorCommentComposer, vi as EditorCommentsPanel, Di as EditorCommentsRail, T as EditorContent, Me as EditorField, ha as EditorFindPanel, va as EditorFocusExit, wa as EditorFooter, Ma as EditorOutline, Pa as EditorOutlinePanel, Ar as EditorPanel, mr as EditorPresence, Oe as EditorRoot, a as EditorSuggestionList, w as EditorToolbar, Hl as RichChatComposer, sc as chatKit, oc as compactKit, B as defineFeature, ac as documentKit, tc as editorFeatures, ic as formNodesKit, vt as fromMarkdown, Va as looksLikeMarkdown, yt as toHtml, _t as toJson, gt as toMarkdown, le as useEditor, O as useEditorContext, ur as useEditorPresence, xa as useEditorStats, La as useEditorUploads, nc as withFeatures, rc as withoutFeatures };
|