@nxgt/material 3.6.0 → 3.7.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 +20 -0
- package/README.md +46 -1
- package/dist/components/components.css +2 -0
- package/dist/components/theme-tokens.css +9 -4
- package/dist/components/ui/widgets/drawing/drawing-animate.css +123 -0
- package/dist/components/ui/widgets/drawing/drawing.css +459 -0
- package/dist/{components-BCYZgeoV.js → components-BX4icy-g.js} +733 -733
- package/dist/components.js +16 -16
- package/dist/{dialog-JQT6iETD.js → dialog-DdJ1C4BR.js} +168 -168
- package/dist/dnd.js +1 -1
- package/dist/draw-animate.js +106 -0
- package/dist/draw-png.js +2 -0
- package/dist/draw-sketch.js +38 -0
- package/dist/draw.js +65 -0
- package/dist/drawing-B8VuG7nx.js +390 -0
- package/dist/drawing-context-CeKeZE6b.js +10 -0
- package/dist/editor.js +110 -110
- package/dist/{icon-badge-C30yKsAM.js → icon-badge-Bb5-73XP.js} +18 -18
- package/dist/{icon-button-BXlI3DJ_.js → icon-button-5A6Mrj6w.js} +60 -90
- package/dist/lib/components/ui/display/shape/use-shape-morph.d.ts +1 -0
- package/dist/lib/components/ui/widgets/drawing/drawing-a11y.d.ts +20 -0
- package/dist/lib/components/ui/widgets/drawing/drawing-context.d.ts +23 -0
- package/dist/lib/components/ui/widgets/drawing/drawing-types.d.ts +63 -0
- package/dist/lib/components/ui/widgets/drawing/drawing.d.ts +17 -0
- package/dist/lib/components/ui/widgets/drawing/index.d.ts +5 -0
- package/dist/lib/components/ui/widgets/drawing/partials/drawing-root.d.ts +17 -0
- package/dist/lib/components/ui/widgets/drawing/partials/interactive-node.d.ts +22 -0
- package/dist/lib/components/ui/widgets/drawing/partials/primitives/content.d.ts +20 -0
- package/dist/lib/components/ui/widgets/drawing/partials/primitives/path.d.ts +29 -0
- package/dist/lib/components/ui/widgets/drawing/partials/primitives/primitive.d.ts +19 -0
- package/dist/lib/components/ui/widgets/drawing/partials/primitives/shapes.d.ts +18 -0
- package/dist/lib/components/ui/widgets/drawing/partials/react-attrs.d.ts +5 -0
- package/dist/lib/components/ui/widgets/drawing/partials/ring.d.ts +9 -0
- package/dist/lib/components/ui/widgets/drawing/partials/svg-tree.d.ts +29 -0
- package/dist/lib/components/ui/widgets/drawing/use-exact-text.d.ts +16 -0
- package/dist/lib/draw/index.d.ts +32 -0
- package/dist/lib/draw-animate/index.d.ts +19 -0
- package/dist/lib/draw-animate/morph-drawing.d.ts +32 -0
- package/dist/lib/draw-animate/reduced-motion.d.ts +2 -0
- package/dist/lib/draw-animate/use-drawing-controls.d.ts +27 -0
- package/dist/lib/draw-animate/use-scene-morph.d.ts +15 -0
- package/dist/lib/draw-png/index.d.ts +11 -0
- package/dist/lib/draw-sketch/index.d.ts +17 -0
- package/dist/lib/draw-sketch/sketch.d.ts +19 -0
- package/dist/lib/print/components/print-drawing.d.ts +16 -0
- package/dist/lib/print/index.d.ts +2 -1
- package/dist/main.js +21 -21
- package/dist/map.js +63 -63
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/print.js +123 -115
- package/dist/{public-Cde8_SN8.js → public-CBlV2XuA.js} +742 -742
- package/dist/{sortable-provider-DYlpq8lP.js → sortable-provider-BvD98s8Y.js} +19 -19
- package/dist/{use-chat-composer-BwpSgP_D.js → use-chat-composer-BhdPNmYm.js} +912 -911
- package/dist/use-shape-morph-BKA_R5P5.js +35 -0
- package/docs/README.md +1 -0
- package/docs/components/rich-widgets.md +196 -0
- package/docs/guides/drawing.md +499 -0
- package/docs/guides/printing.md +47 -0
- package/docs/guides/theming.md +2 -2
- package/docs/previews/rich-widgets-drawing.webp +0 -0
- package/docs/roadmap.md +17 -0
- package/docs/troubleshooting.md +136 -1
- package/lib/components/components.css +2 -0
- package/lib/components/theme-tokens.css +9 -4
- package/lib/components/ui/widgets/drawing/drawing-animate.css +123 -0
- package/lib/components/ui/widgets/drawing/drawing.css +459 -0
- package/package.json +22 -2
package/dist/editor.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as e } from "./ui.utils-CAnKTCw5.js";
|
|
2
2
|
import { t } from "./utils-Bcd2Z3ea.js";
|
|
3
|
-
import { $i as n, A as r, B as i, C as a, Cn as o, D as s, Dn as c, E as l, En as u, Er as d, F as f, Fn as p, G as m, H as h, In as g, J as _, K as v, Ln as y, M as b, N as x, O as S, On as C, P as w, Qn as ee, Rn as T, S as E, T as D, Tn as te, Tr as ne, U as O, V as re, Vn as k, W as ie, X as ae, Xi as oe, Y as se, Zi as ce, _n as le, a as ue, an as de, bn as fe, c as pe, d as me, g as he, hr as ge, i as _e, in as ve, j as ye, k as be, l as xe, m as Se, mn as Ce, p as we, pn as Te, q as Ee, rn as De, s as Oe, t as ke, vn as Ae, vr as je, w as Me, wn as Ne, x as Pe, xn as Fe, yn as Ie, z as Le, zn as Re } from "./use-chat-composer-
|
|
4
|
-
import { t as A } from "./
|
|
5
|
-
import {
|
|
6
|
-
import { f as Ke } from "./dialog-JQT6iETD.js";
|
|
3
|
+
import { $i as n, A as r, B as i, C as a, Cn as o, D as s, Dn as c, E as l, En as u, Er as d, F as f, Fn as p, G as m, H as h, In as g, J as _, K as v, Ln as y, M as b, N as x, O as S, On as C, P as w, Qn as ee, Rn as T, S as E, T as D, Tn as te, Tr as ne, U as O, V as re, Vn as k, W as ie, X as ae, Xi as oe, Y as se, Zi as ce, _n as le, a as ue, an as de, bn as fe, c as pe, d as me, g as he, hr as ge, i as _e, in as ve, j as ye, k as be, l as xe, m as Se, mn as Ce, p as we, pn as Te, q as Ee, rn as De, s as Oe, t as ke, vn as Ae, vr as je, w as Me, wn as Ne, x as Pe, xn as Fe, yn as Ie, z as Le, zn as Re } from "./use-chat-composer-BhdPNmYm.js";
|
|
4
|
+
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-DiZvX4tG.js";
|
|
5
|
+
import { f as Ke } from "./dialog-DdJ1C4BR.js";
|
|
7
6
|
import { c as qe, o as Je, s as Ye } from "./toolbar-items-DnkS3bDY.js";
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
7
|
+
import { t as j } from "./use-material-translation-hLQzOjF0.js";
|
|
8
|
+
import { t as M } from "./button-1Fornjtn.js";
|
|
9
|
+
import { t as N } from "./icon-button-5A6Mrj6w.js";
|
|
10
10
|
import { r as Xe, t as Ze } from "./field-blur-DFUazxsL.js";
|
|
11
11
|
import { a as Qe, s as P } from "./dist-C3GR7kJd.js";
|
|
12
12
|
import { i as $e, r as et } from "./empty-state-Cpvsmk0R.js";
|
|
13
|
-
import { n as tt } from "./icon-badge-
|
|
13
|
+
import { n as tt } from "./icon-badge-Bb5-73XP.js";
|
|
14
14
|
import { t as nt } from "./use-mobile-BDro060N.js";
|
|
15
15
|
import { Ft as rt, Ht as it, Nt as at, Ot as ot, St as st, bt as F, ht as I, mt as L, n as R, wt as z, xt as ct, yt as lt } from "./dist-moutbfbd.js";
|
|
16
16
|
import { t as ut } from "./markdown-Dw_uH7j7.js";
|
|
@@ -268,7 +268,7 @@ function zn(e) {
|
|
|
268
268
|
e.preventDefault(), t[i]?.focus();
|
|
269
269
|
}
|
|
270
270
|
function Bn({ actions: e, hasSelection: t, onChoose: n }) {
|
|
271
|
-
let { t: r } =
|
|
271
|
+
let { t: r } = j(), [i, a] = G(null), o = U(() => In(i?.actions ?? e, t), [
|
|
272
272
|
i,
|
|
273
273
|
e,
|
|
274
274
|
t
|
|
@@ -304,7 +304,7 @@ function Bn({ actions: e, hasSelection: t, onChoose: n }) {
|
|
|
304
304
|
});
|
|
305
305
|
}
|
|
306
306
|
function Vn({ onAsk: e }) {
|
|
307
|
-
let { t } =
|
|
307
|
+
let { t } = j(), [n, r] = G(""), i = W(null);
|
|
308
308
|
H(() => i.current?.focus({ preventScroll: !0 }), []);
|
|
309
309
|
let a = () => {
|
|
310
310
|
let t = n.trim();
|
|
@@ -322,7 +322,7 @@ function Vn({ onAsk: e }) {
|
|
|
322
322
|
e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(), a());
|
|
323
323
|
},
|
|
324
324
|
className: "h-9 min-w-0 flex-1"
|
|
325
|
-
}), /* @__PURE__ */ q(
|
|
325
|
+
}), /* @__PURE__ */ q(N, {
|
|
326
326
|
variant: "filled",
|
|
327
327
|
"aria-label": t("material.editor.assistant.send", "Send"),
|
|
328
328
|
disabled: !n.trim(),
|
|
@@ -387,12 +387,12 @@ async function Gn(e) {
|
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
389
|
function Kn({ text: e }) {
|
|
390
|
-
let { t } =
|
|
390
|
+
let { t } = j(), [n, r] = G(!1);
|
|
391
391
|
return H(() => {
|
|
392
392
|
if (!n) return;
|
|
393
393
|
let e = setTimeout(() => r(!1), 1600);
|
|
394
394
|
return () => clearTimeout(e);
|
|
395
|
-
}, [n]), /* @__PURE__ */ J(
|
|
395
|
+
}, [n]), /* @__PURE__ */ J(M, {
|
|
396
396
|
variant: "ghost",
|
|
397
397
|
size: "sm",
|
|
398
398
|
onClick: async () => r(await Gn(e)),
|
|
@@ -400,18 +400,18 @@ function Kn({ text: e }) {
|
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
402
|
function qn({ state: e, on: t }) {
|
|
403
|
-
let { t: n } =
|
|
403
|
+
let { t: n } = j(), r = W(null);
|
|
404
404
|
return H(() => r.current?.focus({ preventScroll: !0 }), []), /* @__PURE__ */ J("div", {
|
|
405
405
|
className: "flex flex-wrap items-center gap-1.5",
|
|
406
406
|
children: [
|
|
407
|
-
e.hasSelection && /* @__PURE__ */ J(
|
|
407
|
+
e.hasSelection && /* @__PURE__ */ J(M, {
|
|
408
408
|
ref: r,
|
|
409
409
|
size: "sm",
|
|
410
410
|
disabled: e.applying,
|
|
411
411
|
onClick: () => t.onApply("replace"),
|
|
412
412
|
children: [/* @__PURE__ */ q(tn, {}), n("material.editor.assistant.replace", "Replace selection")]
|
|
413
413
|
}),
|
|
414
|
-
/* @__PURE__ */ J(
|
|
414
|
+
/* @__PURE__ */ J(M, {
|
|
415
415
|
ref: e.hasSelection ? void 0 : r,
|
|
416
416
|
variant: e.hasSelection ? "outlined" : "filled",
|
|
417
417
|
size: "sm",
|
|
@@ -420,14 +420,14 @@ function qn({ state: e, on: t }) {
|
|
|
420
420
|
children: [/* @__PURE__ */ q(Lt, {}), n("material.editor.assistant.insert-below", "Insert below")]
|
|
421
421
|
}),
|
|
422
422
|
/* @__PURE__ */ q(Kn, { text: e.text }),
|
|
423
|
-
/* @__PURE__ */ J(
|
|
423
|
+
/* @__PURE__ */ J(M, {
|
|
424
424
|
variant: "ghost",
|
|
425
425
|
size: "sm",
|
|
426
426
|
disabled: e.applying,
|
|
427
427
|
onClick: t.onRetry,
|
|
428
428
|
children: [/* @__PURE__ */ q(nn, {}), n("material.editor.assistant.retry", "Retry")]
|
|
429
429
|
}),
|
|
430
|
-
/* @__PURE__ */ J(
|
|
430
|
+
/* @__PURE__ */ J(M, {
|
|
431
431
|
variant: "ghost",
|
|
432
432
|
size: "sm",
|
|
433
433
|
onClick: t.onDiscard,
|
|
@@ -437,7 +437,7 @@ function qn({ state: e, on: t }) {
|
|
|
437
437
|
});
|
|
438
438
|
}
|
|
439
439
|
function Jn({ state: e, on: t }) {
|
|
440
|
-
let { t: n } =
|
|
440
|
+
let { t: n } = j(), r = W(null);
|
|
441
441
|
return H(() => r.current?.focus({ preventScroll: !0 }), []), /* @__PURE__ */ J("div", {
|
|
442
442
|
className: "grid gap-2",
|
|
443
443
|
children: [/* @__PURE__ */ q("p", {
|
|
@@ -448,19 +448,19 @@ function Jn({ state: e, on: t }) {
|
|
|
448
448
|
}), /* @__PURE__ */ J("div", {
|
|
449
449
|
className: "flex flex-wrap items-center gap-1.5",
|
|
450
450
|
children: [
|
|
451
|
-
/* @__PURE__ */ J(
|
|
451
|
+
/* @__PURE__ */ J(M, {
|
|
452
452
|
ref: r,
|
|
453
453
|
size: "sm",
|
|
454
454
|
onClick: t.onRetry,
|
|
455
455
|
children: [/* @__PURE__ */ q(nn, {}), n("material.editor.assistant.retry", "Retry")]
|
|
456
456
|
}),
|
|
457
|
-
/* @__PURE__ */ q(
|
|
457
|
+
/* @__PURE__ */ q(M, {
|
|
458
458
|
variant: "ghost",
|
|
459
459
|
size: "sm",
|
|
460
460
|
onClick: t.onBack,
|
|
461
461
|
children: n("material.editor.assistant.back", "Back")
|
|
462
462
|
}),
|
|
463
|
-
/* @__PURE__ */ q(
|
|
463
|
+
/* @__PURE__ */ q(M, {
|
|
464
464
|
variant: "ghost",
|
|
465
465
|
size: "sm",
|
|
466
466
|
onClick: t.onDiscard,
|
|
@@ -471,7 +471,7 @@ function Jn({ state: e, on: t }) {
|
|
|
471
471
|
});
|
|
472
472
|
}
|
|
473
473
|
function Yn({ editor: e, state: t, on: n, status: r }) {
|
|
474
|
-
let { t: i } =
|
|
474
|
+
let { t: i } = j(), a = W(null), o = t.phase === "streaming";
|
|
475
475
|
return H(() => {
|
|
476
476
|
o && a.current?.focus({ preventScroll: !0 });
|
|
477
477
|
}, [o]), /* @__PURE__ */ J("div", {
|
|
@@ -482,7 +482,7 @@ function Yn({ editor: e, state: t, on: n, status: r }) {
|
|
|
482
482
|
editor: e,
|
|
483
483
|
markdown: t.text
|
|
484
484
|
}),
|
|
485
|
-
o ? /* @__PURE__ */ q("div", { children: /* @__PURE__ */ J(
|
|
485
|
+
o ? /* @__PURE__ */ q("div", { children: /* @__PURE__ */ J(M, {
|
|
486
486
|
ref: a,
|
|
487
487
|
variant: "tonal",
|
|
488
488
|
size: "sm",
|
|
@@ -498,7 +498,7 @@ function Yn({ editor: e, state: t, on: n, status: r }) {
|
|
|
498
498
|
//#endregion
|
|
499
499
|
//#region lib/components/ui/widgets/editor/extensions/assistant/assistant-stage.tsx
|
|
500
500
|
function Xn({ label: e, onDiscard: t }) {
|
|
501
|
-
let { t: n } =
|
|
501
|
+
let { t: n } = j();
|
|
502
502
|
return /* @__PURE__ */ J("div", {
|
|
503
503
|
className: "flex items-center gap-2",
|
|
504
504
|
children: [
|
|
@@ -510,7 +510,7 @@ function Xn({ label: e, onDiscard: t }) {
|
|
|
510
510
|
className: "min-w-0 flex-1 truncate font-medium text-sm",
|
|
511
511
|
children: e
|
|
512
512
|
}),
|
|
513
|
-
/* @__PURE__ */ q(
|
|
513
|
+
/* @__PURE__ */ q(N, {
|
|
514
514
|
variant: "ghost",
|
|
515
515
|
"aria-label": n("material.editor.assistant.discard", "Discard"),
|
|
516
516
|
onClick: t,
|
|
@@ -539,7 +539,7 @@ function Zn({ editor: e, state: t, actions: n, onChoose: r, on: i }) {
|
|
|
539
539
|
}) : null;
|
|
540
540
|
}
|
|
541
541
|
function Qn({ note: e }) {
|
|
542
|
-
let { t } =
|
|
542
|
+
let { t } = j();
|
|
543
543
|
return e ? /* @__PURE__ */ q("p", {
|
|
544
544
|
role: "status",
|
|
545
545
|
"data-slot": "editor-assistant-note",
|
|
@@ -548,7 +548,7 @@ function Qn({ note: e }) {
|
|
|
548
548
|
}) : null;
|
|
549
549
|
}
|
|
550
550
|
function $n({ phase: e, stopped: t }) {
|
|
551
|
-
let { t: n } =
|
|
551
|
+
let { t: n } = j(), r = n("material.editor.assistant.writing", "Writing…");
|
|
552
552
|
return /* @__PURE__ */ q("div", {
|
|
553
553
|
role: "status",
|
|
554
554
|
"data-slot": "editor-assistant-status",
|
|
@@ -606,7 +606,7 @@ function or(e) {
|
|
|
606
606
|
return !t.editor || !r || n.state.panel !== "assistant" ? null : /* @__PURE__ */ q(sr, {});
|
|
607
607
|
}
|
|
608
608
|
function sr() {
|
|
609
|
-
let { t: e, language: t } =
|
|
609
|
+
let { t: e, language: t } = j(), { handle: n } = k(), r = n.editor, i = er(r), a = ar(r), o = i?.controller, s = U(() => Fn(i?.actions, e), [i?.actions, e]);
|
|
610
610
|
if (H(() => (o?.getState().phase === "idle" && o.begin(), () => o?.reset()), [o]), !o || a.phase === "idle") return null;
|
|
611
611
|
let c = (e) => {
|
|
612
612
|
o.close(), e !== "outside" && r.commands.focus();
|
|
@@ -691,7 +691,7 @@ function pr({ user: e }) {
|
|
|
691
691
|
});
|
|
692
692
|
}
|
|
693
693
|
function mr({ status: e, max: n = 4, className: r }) {
|
|
694
|
-
let { t: i } =
|
|
694
|
+
let { t: i } = j(), a = ur();
|
|
695
695
|
if (!e && a.length === 0) return null;
|
|
696
696
|
let [o, s, c] = e ? fr[e] : [];
|
|
697
697
|
return /* @__PURE__ */ J("div", {
|
|
@@ -719,7 +719,7 @@ var hr = "[&_textarea]:min-w-0", gr = (e) => e.key === "Enter" && (e.metaKey ||
|
|
|
719
719
|
//#endregion
|
|
720
720
|
//#region lib/components/ui/widgets/editor/extensions/comments/comment-composer-form.tsx
|
|
721
721
|
function _r({ composer: e, body: t, onBody: n, onSubmit: r, onDismiss: i }) {
|
|
722
|
-
let { t: a } =
|
|
722
|
+
let { t: a } = j(), o = e.error === "invalid-id" ? a("material.editor.comments.invalid-id", "The adapter answered a thread id that is not allowed.") : e.error;
|
|
723
723
|
return /* @__PURE__ */ J("form", {
|
|
724
724
|
className: "grid grid-cols-[minmax(0,1fr)] gap-2.5",
|
|
725
725
|
onSubmit: (e) => {
|
|
@@ -760,17 +760,17 @@ function _r({ composer: e, body: t, onBody: n, onSubmit: r, onDismiss: i }) {
|
|
|
760
760
|
});
|
|
761
761
|
}
|
|
762
762
|
function vr({ pending: e, empty: t, onDismiss: n }) {
|
|
763
|
-
let { t: r } =
|
|
763
|
+
let { t: r } = j();
|
|
764
764
|
return /* @__PURE__ */ J("div", {
|
|
765
765
|
className: "flex justify-end gap-2",
|
|
766
|
-
children: [/* @__PURE__ */ q(
|
|
766
|
+
children: [/* @__PURE__ */ q(M, {
|
|
767
767
|
type: "button",
|
|
768
768
|
size: "sm",
|
|
769
769
|
variant: "ghost",
|
|
770
770
|
disabled: e,
|
|
771
771
|
onClick: n,
|
|
772
772
|
children: r("material.editor.comments.cancel", "Cancel")
|
|
773
|
-
}), /* @__PURE__ */ q(
|
|
773
|
+
}), /* @__PURE__ */ q(M, {
|
|
774
774
|
type: "submit",
|
|
775
775
|
size: "sm",
|
|
776
776
|
loading: e,
|
|
@@ -809,7 +809,7 @@ var wr = {
|
|
|
809
809
|
deleted: ["deleted-notice", "Thread deleted"]
|
|
810
810
|
};
|
|
811
811
|
function Tr({ editor: e }) {
|
|
812
|
-
let { t } =
|
|
812
|
+
let { t } = j(), { notice: n } = Cr(e), r = n ? wr[n.kind] : null;
|
|
813
813
|
return /* @__PURE__ */ q("div", {
|
|
814
814
|
role: "status",
|
|
815
815
|
"aria-live": "polite",
|
|
@@ -832,7 +832,7 @@ function Dr({ editor: e }) {
|
|
|
832
832
|
});
|
|
833
833
|
}
|
|
834
834
|
function Or({ editor: e, controller: t }) {
|
|
835
|
-
let { t: n } =
|
|
835
|
+
let { t: n } = j(), { chrome: r } = k(), i = Cr(e).composer, { actions: a } = r;
|
|
836
836
|
H(() => (a.setBubbleSuppressed(!0), () => {
|
|
837
837
|
a.setBubbleSuppressed(!1);
|
|
838
838
|
}), [a]);
|
|
@@ -895,7 +895,7 @@ function Ar({ id: e, children: t, ...n }) {
|
|
|
895
895
|
//#endregion
|
|
896
896
|
//#region lib/components/ui/widgets/editor/extensions/comments/comments-status.tsx
|
|
897
897
|
function jr({ state: e, controller: t, count: n }) {
|
|
898
|
-
let { t: r } =
|
|
898
|
+
let { t: r } = j();
|
|
899
899
|
return n === 0 && !e.showResolved ? null : /* @__PURE__ */ q(d, {
|
|
900
900
|
label: r("material.editor.comments.show-resolved", "Show resolved"),
|
|
901
901
|
checked: e.showResolved,
|
|
@@ -903,7 +903,7 @@ function jr({ state: e, controller: t, count: n }) {
|
|
|
903
903
|
});
|
|
904
904
|
}
|
|
905
905
|
function Mr({ state: e, empty: t }) {
|
|
906
|
-
let { t: n } =
|
|
906
|
+
let { t: n } = j(), r = null;
|
|
907
907
|
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", {
|
|
908
908
|
role: e.phase === "failed" ? "alert" : void 0,
|
|
909
909
|
className: "px-1 text-muted-foreground text-sm",
|
|
@@ -913,7 +913,7 @@ function Mr({ state: e, empty: t }) {
|
|
|
913
913
|
//#endregion
|
|
914
914
|
//#region lib/components/ui/widgets/editor/extensions/comments/comment-edit-form.tsx
|
|
915
915
|
function Nr({ draft: e, onChange: t, onSave: n, onCancel: r }) {
|
|
916
|
-
let { t: i } =
|
|
916
|
+
let { t: i } = j();
|
|
917
917
|
return /* @__PURE__ */ J("div", {
|
|
918
918
|
className: "grid grid-cols-[minmax(0,1fr)] gap-2",
|
|
919
919
|
children: [/* @__PURE__ */ q(C, {
|
|
@@ -928,13 +928,13 @@ function Nr({ draft: e, onChange: t, onSave: n, onCancel: r }) {
|
|
|
928
928
|
}
|
|
929
929
|
}), /* @__PURE__ */ J("div", {
|
|
930
930
|
className: "flex gap-2",
|
|
931
|
-
children: [/* @__PURE__ */ q(
|
|
931
|
+
children: [/* @__PURE__ */ q(M, {
|
|
932
932
|
size: "sm",
|
|
933
933
|
variant: "tonal",
|
|
934
934
|
disabled: !e.trim(),
|
|
935
935
|
onClick: n,
|
|
936
936
|
children: i("material.editor.comments.save", "Save")
|
|
937
|
-
}), /* @__PURE__ */ q(
|
|
937
|
+
}), /* @__PURE__ */ q(M, {
|
|
938
938
|
size: "sm",
|
|
939
939
|
variant: "ghost",
|
|
940
940
|
onClick: r,
|
|
@@ -1007,7 +1007,7 @@ 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 } = j();
|
|
1011
1011
|
return /* @__PURE__ */ J("div", {
|
|
1012
1012
|
className: "flex items-center gap-2",
|
|
1013
1013
|
children: [
|
|
@@ -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(M, {
|
|
1030
1030
|
variant: "ghost",
|
|
1031
1031
|
size: "xs",
|
|
1032
1032
|
className: "ms-auto",
|
|
@@ -1063,7 +1063,7 @@ 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 } = j(), [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
|
};
|
|
@@ -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(M, {
|
|
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(M, {
|
|
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(M, {
|
|
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 } = j(), 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 } = j(), { 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 } = j(), 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 || !Y(n) ? null : /* @__PURE__ */ q(Oi, { editor: n });
|
|
1636
1636
|
}
|
|
1637
1637
|
function Oi({ editor: e }) {
|
|
1638
|
-
let { t } =
|
|
1638
|
+
let { t } = j(), 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);
|
|
@@ -1818,22 +1818,22 @@ 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 } = j(), { 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(Ue, { children: [/* @__PURE__ */ q(Be, { children: n("material.editor.block.turn-into", "Turn into") }), Ni(e).map((t) => /* @__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
1830
|
/* @__PURE__ */ q(He, {}),
|
|
1831
1831
|
/* @__PURE__ */ J(Ue, { children: [
|
|
1832
|
-
/* @__PURE__ */ J(
|
|
1832
|
+
/* @__PURE__ */ J(A, {
|
|
1833
1833
|
onSelect: () => Bi(e, () => Ri(e.state, i())),
|
|
1834
1834
|
children: [/* @__PURE__ */ q(It, {}), 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: [
|
|
@@ -1842,7 +1842,7 @@ function Vi({ editor: e, block: t }) {
|
|
|
1842
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: [
|
|
@@ -1853,7 +1853,7 @@ function Vi({ editor: e, block: t }) {
|
|
|
1853
1853
|
})
|
|
1854
1854
|
] }),
|
|
1855
1855
|
/* @__PURE__ */ q(He, {}),
|
|
1856
|
-
/* @__PURE__ */ J(
|
|
1856
|
+
/* @__PURE__ */ J(A, {
|
|
1857
1857
|
variant: "error",
|
|
1858
1858
|
onSelect: () => Bi(e, () => zi(e.state, i())),
|
|
1859
1859
|
children: [/* @__PURE__ */ q(fn, {}), n("material.editor.block.delete", "Delete")]
|
|
@@ -1944,13 +1944,13 @@ 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 } = j(), { chrome: a } = k();
|
|
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"),
|
|
@@ -1961,7 +1961,7 @@ function Gi({ editor: e, active: n, open: r }) {
|
|
|
1961
1961
|
onOpenChange: (e) => e ? a.actions.openPanel("block") : a.actions.closePanel(),
|
|
1962
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",
|
|
@@ -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 } = j(), 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,7 +2003,7 @@ function Ki({ find: e }) {
|
|
|
2003
2003
|
});
|
|
2004
2004
|
}
|
|
2005
2005
|
function qi({ find: e }) {
|
|
2006
|
-
let { t } =
|
|
2006
|
+
let { t } = j();
|
|
2007
2007
|
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(me, {
|
|
2008
2008
|
size: "sm",
|
|
2009
2009
|
"aria-label": t("material.editor.find.match-case", "Match case"),
|
|
@@ -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 } = j();
|
|
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(Pt, {})
|
|
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,7 +2037,7 @@ 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 } = j();
|
|
2041
2041
|
return /* @__PURE__ */ J("div", {
|
|
2042
2042
|
className: "flex flex-wrap items-center gap-1.5",
|
|
2043
2043
|
children: [
|
|
@@ -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"),
|
|
@@ -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 } = j(), { handle: n, chrome: r } = k(), 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,7 +2287,7 @@ function ga({ className: e }) {
|
|
|
2287
2287
|
});
|
|
2288
2288
|
}
|
|
2289
2289
|
function _a({ editor: e, find: t }) {
|
|
2290
|
-
let { t: n } =
|
|
2290
|
+
let { t: n } = j(), [r, i] = G("");
|
|
2291
2291
|
return /* @__PURE__ */ J("div", {
|
|
2292
2292
|
className: "flex flex-wrap items-center gap-1.5",
|
|
2293
2293
|
children: [
|
|
@@ -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(M, {
|
|
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(M, {
|
|
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 } = j(), { chrome: r, handle: i } = k();
|
|
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),
|
|
@@ -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 } = j(), { handle: n } = k(), 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 } = j(), 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),
|
|
@@ -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 } = j(), { 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",
|
|
@@ -2572,7 +2572,7 @@ 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 } = j(), { chrome: n } = k(), 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
2578
|
return /* @__PURE__ */ q(p, {
|
|
@@ -2985,7 +2985,7 @@ 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 } = j(), n = Sr(e);
|
|
2989
2989
|
if (!n) return null;
|
|
2990
2990
|
let r = t("material.editor.comments.comment", "Comment");
|
|
2991
2991
|
return /* @__PURE__ */ q(p, {
|
|
@@ -3000,7 +3000,7 @@ function mo({ editor: e }) {
|
|
|
3000
3000
|
});
|
|
3001
3001
|
}
|
|
3002
3002
|
function ho({ editor: e }) {
|
|
3003
|
-
let { t } =
|
|
3003
|
+
let { t } = j(), { chrome: n } = k(), r = Cr(e);
|
|
3004
3004
|
if (!Y(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
3006
|
return /* @__PURE__ */ q(p, {
|
|
@@ -3211,7 +3211,7 @@ 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 } =
|
|
3214
|
+
let { t } = j(), { chrome: n } = k(), r = n.state.panel === "find";
|
|
3215
3215
|
return /* @__PURE__ */ q(p, {
|
|
3216
3216
|
variant: r ? "filled" : "ghost",
|
|
3217
3217
|
"aria-pressed": r,
|
|
@@ -3310,7 +3310,7 @@ var Io = () => new F({
|
|
|
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 } =
|
|
3313
|
+
let { t } = j(), { chrome: n } = k(), r = n.state.focusMode;
|
|
3314
3314
|
return /* @__PURE__ */ q(p, {
|
|
3315
3315
|
variant: r ? "filled" : "ghost",
|
|
3316
3316
|
"aria-pressed": r,
|
|
@@ -3343,7 +3343,7 @@ 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 } = j(), n = P({
|
|
3347
3347
|
editor: e,
|
|
3348
3348
|
selector: (e) => ({
|
|
3349
3349
|
isCode: e.editor.isActive("code") ?? !1,
|
|
@@ -3416,7 +3416,7 @@ 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 } =
|
|
3419
|
+
let { t } = j(), { chrome: n } = k(), r = n.state.panel === "outline";
|
|
3420
3420
|
return /* @__PURE__ */ q(p, {
|
|
3421
3421
|
variant: r ? "filled" : "ghost",
|
|
3422
3422
|
"aria-pressed": r,
|
|
@@ -3444,7 +3444,7 @@ 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 } = j(), n = P({
|
|
3448
3448
|
editor: e,
|
|
3449
3449
|
selector: (e) => e.editor.getAttributes("image").alt ?? ""
|
|
3450
3450
|
}), [r, i] = G(""), [a, o] = G(!1), { trigger: s, onCloseAutoFocus: c } = Ee(), l = t("material.editor.upload.alt", "Alt text");
|
|
@@ -3471,7 +3471,7 @@ function Xo({ editor: e }) {
|
|
|
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(M, {
|
|
3475
3475
|
variant: "tonal",
|
|
3476
3476
|
onClick: () => {
|
|
3477
3477
|
e.chain().focus().updateAttributes("image", { alt: r }).run(), o(!1);
|
|
@@ -3772,15 +3772,15 @@ function Is({ 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 Ls({ id: e, name: t, failed: n, retryable: r, storage: i }) {
|
|
3775
|
-
let { t: a } =
|
|
3775
|
+
let { t: a } = j(), 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(M, {
|
|
3779
3779
|
variant: "tonal",
|
|
3780
3780
|
size: "sm",
|
|
3781
3781
|
onClick: () => i.retry(e),
|
|
3782
3782
|
children: [/* @__PURE__ */ q(nn, {}), 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 zs(e, t, n) {
|
|
|
3820
3820
|
}
|
|
3821
3821
|
}
|
|
3822
3822
|
function Bs({ id: e, storage: n, maxSize: r }) {
|
|
3823
|
-
let { t: i } =
|
|
3823
|
+
let { t: i } = j(), { queue: a } = n, o = bn(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", {
|
|
@@ -4277,7 +4277,7 @@ function uc(e, t) {
|
|
|
4277
4277
|
//#endregion
|
|
4278
4278
|
//#region lib/components/ui/widgets/editor/partials/editor-character-count.tsx
|
|
4279
4279
|
function dc({ className: e }) {
|
|
4280
|
-
let { t: n } =
|
|
4280
|
+
let { t: n } = j(), { handle: r } = k(), 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;
|
|
@@ -4323,7 +4323,7 @@ function fc(e, t) {
|
|
|
4323
4323
|
//#region lib/components/ui/widgets/editor/presets/toolbar-looks.ts
|
|
4324
4324
|
var pc = t("[&_button[aria-pressed=true]]:rounded-full [&_button[data-variant=filled]]:rounded-full", "[&_button[aria-pressed=true]]:bg-(--tb-on) [&_button[data-variant=filled]]:bg-(--tb-on)", "[&_button[aria-pressed=true]]:text-(--tb-on-fg) [&_button[data-variant=filled]]:text-(--tb-on-fg)", "[&_button[aria-pressed=true]_svg]:stroke-(--tb-on-fg) [&_button[data-variant=filled]_svg]:stroke-(--tb-on-fg)", "[&_button[aria-pressed=true]_svg]:text-(--tb-on-fg) [&_button[data-variant=filled]_svg]:text-(--tb-on-fg)", "[&_button[aria-pressed=true]_svg]:stroke-[2.6] [&_button[data-variant=filled]_svg]:stroke-[2.6]"), mc = t("[&_button[data-toolbar-fit][data-variant=filled]:not([aria-pressed])]:bg-(--tb-on)", "[&_button[data-toolbar-fit][data-variant=filled]:not([aria-pressed])]:text-(--tb-on-fg)"), hc = t("gap-x-2 gap-y-1.5", "**:data-group-id:gap-0 **:data-group-id:rounded-xl", "**:data-group-id:bg-muted/60 **:data-group-id:p-0.5", "[&_button[data-variant]]:rounded-md", pc, mc), gc = t("items-center gap-1 **:data-group-id:gap-1", "[--tb-item:2.25rem] [&_button[data-variant]]:rounded-full [&_[data-toolbar-more]]:rounded-full", pc, mc, "**:data-[group=outline]:@6xl:hidden", "**:data-[group=comments]:@5xl:hidden"), _c = t(hc, "**:data-[group=outline]:@6xl:hidden", "**:data-[group=comments]:@5xl:hidden"), vc = t(hc, "**:data-[group=outline]:@4xl:hidden", "**:data-[group=comments]:@5xl:hidden"), yc = 56;
|
|
4325
4325
|
function bc({ side: e, children: n }) {
|
|
4326
|
-
let { t: r } =
|
|
4326
|
+
let { t: r } = j();
|
|
4327
4327
|
return /* @__PURE__ */ q("aside", {
|
|
4328
4328
|
"aria-label": r("material.editor.outline-region", "Document outline"),
|
|
4329
4329
|
"data-slot": "document-editor-rail",
|
|
@@ -4336,7 +4336,7 @@ function bc({ side: e, children: n }) {
|
|
|
4336
4336
|
});
|
|
4337
4337
|
}
|
|
4338
4338
|
function xc({ toolbar: e, bar: n, panels: r, footer: i, outline: a, comments: o, presence: s, outlineSide: c = "start", className: l, children: u }) {
|
|
4339
|
-
let { t: d } =
|
|
4339
|
+
let { t: d } = j(), { chrome: f, handle: p, look: m } = k(), h = p.features.some((e) => e.key === "dragHandle"), g = f.state.focusMode, _ = W(null), v = fc(_, yc), y = a && !g && v, b = fc(_, 64), x = o && !g && b;
|
|
4340
4340
|
return /* @__PURE__ */ J("div", {
|
|
4341
4341
|
ref: _,
|
|
4342
4342
|
"data-slot": "document-editor",
|
|
@@ -4470,7 +4470,7 @@ function Rc(e) {
|
|
|
4470
4470
|
//#endregion
|
|
4471
4471
|
//#region lib/components/ui/widgets/editor/presets/compact-editor.tsx
|
|
4472
4472
|
function zc({ features: e, minRows: n = 2, maxRows: r = 8, toolbar: i = !0, look: o = "expressive", actions: s, onUpload: c, uploadOptions: u, onUploadingChange: d, onAssist: f, assistOptions: p, label: m, helperText: h, error: _, required: v, className: y, attributes: b, ...x }) {
|
|
4473
|
-
let { t: S } =
|
|
4473
|
+
let { t: S } = j(), C = U(ac, []), w = lc(c, u), ee = sc(f, p), T = !!s || !!x.characterLimit;
|
|
4474
4474
|
return /* @__PURE__ */ J(g, {
|
|
4475
4475
|
...x,
|
|
4476
4476
|
look: o,
|
|
@@ -4586,7 +4586,7 @@ function Uc(e) {
|
|
|
4586
4586
|
//#endregion
|
|
4587
4587
|
//#region lib/components/ui/widgets/editor/partials/page-mode-switch.tsx
|
|
4588
4588
|
function Wc({ value: e, onChange: t }) {
|
|
4589
|
-
let { t: n } =
|
|
4589
|
+
let { t: n } = j();
|
|
4590
4590
|
return /* @__PURE__ */ J(et, {
|
|
4591
4591
|
type: "single",
|
|
4592
4592
|
variant: "segmented",
|
|
@@ -4634,7 +4634,7 @@ function qc({ children: e }) {
|
|
|
4634
4634
|
});
|
|
4635
4635
|
}
|
|
4636
4636
|
function Jc({ json: e, components: t }) {
|
|
4637
|
-
let { t: n } =
|
|
4637
|
+
let { t: n } = j(), { look: r } = k(), i = n("material.editor.page.empty", "Nothing to show yet.");
|
|
4638
4638
|
return e ? /* @__PURE__ */ q(gn, {
|
|
4639
4639
|
fallback: /* @__PURE__ */ q(qc, { children: n("material.editor.page.loading", "Loading…") }),
|
|
4640
4640
|
children: /* @__PURE__ */ q(Gc, {
|
|
@@ -4646,7 +4646,7 @@ function Jc({ json: e, components: t }) {
|
|
|
4646
4646
|
}) : /* @__PURE__ */ q(qc, { children: i });
|
|
4647
4647
|
}
|
|
4648
4648
|
function Yc({ json: e }) {
|
|
4649
|
-
let { t } =
|
|
4649
|
+
let { t } = j(), { handle: n } = k(), [r, i] = G(null), a = n.editor?.extensionManager.extensions;
|
|
4650
4650
|
return H(() => {
|
|
4651
4651
|
let t = !0;
|
|
4652
4652
|
if (!e) {
|
|
@@ -4681,7 +4681,7 @@ function Qc(e, n) {
|
|
|
4681
4681
|
//#endregion
|
|
4682
4682
|
//#region lib/components/ui/widgets/editor/presets/page-rails.tsx
|
|
4683
4683
|
function $c({ children: e, fab: t }) {
|
|
4684
|
-
let { t: n } =
|
|
4684
|
+
let { t: n } = j();
|
|
4685
4685
|
return t === void 0 ? /* @__PURE__ */ q("aside", {
|
|
4686
4686
|
"aria-label": n("material.editor.tools", "Tools"),
|
|
4687
4687
|
"data-slot": "document-editor-tools",
|
|
@@ -4701,7 +4701,7 @@ function $c({ children: e, fab: t }) {
|
|
|
4701
4701
|
});
|
|
4702
4702
|
}
|
|
4703
4703
|
function el({ side: e, children: t }) {
|
|
4704
|
-
let { t: n } =
|
|
4704
|
+
let { t: n } = j();
|
|
4705
4705
|
return /* @__PURE__ */ q("aside", {
|
|
4706
4706
|
"aria-label": n("material.editor.outline-region", "Document outline"),
|
|
4707
4707
|
"data-slot": "document-editor-rail",
|
|
@@ -4711,7 +4711,7 @@ function el({ side: e, children: t }) {
|
|
|
4711
4711
|
});
|
|
4712
4712
|
}
|
|
4713
4713
|
function tl({ children: e }) {
|
|
4714
|
-
let { t } =
|
|
4714
|
+
let { t } = j();
|
|
4715
4715
|
return /* @__PURE__ */ q("aside", {
|
|
4716
4716
|
"aria-label": t("material.editor.comments.title", "Comments"),
|
|
4717
4717
|
"data-slot": "document-editor-comments",
|
|
@@ -4847,7 +4847,7 @@ function cl() {
|
|
|
4847
4847
|
//#endregion
|
|
4848
4848
|
//#region lib/components/ui/widgets/editor/partials/editor-insert-fab.tsx
|
|
4849
4849
|
function ll() {
|
|
4850
|
-
let { t: e } =
|
|
4850
|
+
let { t: e } = j(), { handle: t } = k(), { editor: r, features: i } = t, a = W(!1), o = U(() => te(al(i), "", e), [i, e]), s = cl();
|
|
4851
4851
|
return !r || !s || o.length === 0 ? null : /* @__PURE__ */ q(n, {
|
|
4852
4852
|
"data-slot": "editor-insert-fab",
|
|
4853
4853
|
label: e("material.editor.insert", "Insert"),
|
|
@@ -5029,7 +5029,7 @@ function hl({ error: e, replyTo: t, onCancelReply: n, attachments: r, isDisabled
|
|
|
5029
5029
|
//#endregion
|
|
5030
5030
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/partials/send-control.tsx
|
|
5031
5031
|
function gl({ sendLabel: e, stopLabel: t, disabled: n, empty: r, onStop: i, onSchedule: a, squircle: o }) {
|
|
5032
|
-
let { t: s } =
|
|
5032
|
+
let { t: s } = j();
|
|
5033
5033
|
return !a || i ? /* @__PURE__ */ q(Oe, {
|
|
5034
5034
|
sendLabel: e,
|
|
5035
5035
|
stopLabel: t,
|
|
@@ -5041,7 +5041,7 @@ function gl({ sendLabel: e, stopLabel: t, disabled: n, empty: r, onStop: i, onSc
|
|
|
5041
5041
|
type: "submit",
|
|
5042
5042
|
disabled: n || r,
|
|
5043
5043
|
menuLabel: s("material.editor.send-options", "Send options"),
|
|
5044
|
-
menu: /* @__PURE__ */ q(
|
|
5044
|
+
menu: /* @__PURE__ */ q(A, {
|
|
5045
5045
|
onSelect: a,
|
|
5046
5046
|
children: s("material.editor.schedule", "Schedule…")
|
|
5047
5047
|
}),
|
|
@@ -5068,14 +5068,14 @@ function vl({ onSend: e, sendOnEnter: t, disabled: n, onFocus: r, className: i,
|
|
|
5068
5068
|
//#endregion
|
|
5069
5069
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/partials/tools-row.tsx
|
|
5070
5070
|
function yl({ pill: e, formatOpen: n, toolbarId: r, onFormatToggle: i, mentionable: a, attach: o, actions: s }) {
|
|
5071
|
-
let { t: c } =
|
|
5071
|
+
let { t: c } = j(), { handle: l } = k(), { editor: u } = l, d = c("material.editor.formatting-toggle", "Text formatting"), f = c("material.editor.mention", "Mention someone");
|
|
5072
5072
|
return /* @__PURE__ */ J("div", {
|
|
5073
5073
|
"data-slot": "rich-chat-composer-tools",
|
|
5074
5074
|
className: t("flex min-w-0 items-end gap-1", e ? "order-1" : "flex-1"),
|
|
5075
5075
|
children: [/* @__PURE__ */ q(xe, {
|
|
5076
5076
|
...o,
|
|
5077
5077
|
actions: /* @__PURE__ */ J(K, { children: [u?.storage.emoji && /* @__PURE__ */ q(de, { editor: u }), !e && /* @__PURE__ */ J(K, { children: [
|
|
5078
|
-
/* @__PURE__ */ q(
|
|
5078
|
+
/* @__PURE__ */ q(N, {
|
|
5079
5079
|
variant: "ghost",
|
|
5080
5080
|
color: "default",
|
|
5081
5081
|
tooltip: d,
|
|
@@ -5087,7 +5087,7 @@ function yl({ pill: e, formatOpen: n, toolbarId: r, onFormatToggle: i, mentionab
|
|
|
5087
5087
|
className: "size-8 shrink-0 rounded aria-pressed:bg-primary/10 aria-pressed:text-primary-text",
|
|
5088
5088
|
children: /* @__PURE__ */ q(kt, {})
|
|
5089
5089
|
}),
|
|
5090
|
-
a && /* @__PURE__ */ q(
|
|
5090
|
+
a && /* @__PURE__ */ q(N, {
|
|
5091
5091
|
variant: "ghost",
|
|
5092
5092
|
color: "default",
|
|
5093
5093
|
tooltip: f,
|
|
@@ -5104,7 +5104,7 @@ function yl({ pill: e, formatOpen: n, toolbarId: r, onFormatToggle: i, mentionab
|
|
|
5104
5104
|
//#endregion
|
|
5105
5105
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/use-composer-editor.ts
|
|
5106
5106
|
function bl({ features: e, minRows: n = 1, maxRows: r = 8, placeholder: i, attributes: a, ...o }) {
|
|
5107
|
-
let { t: s } =
|
|
5107
|
+
let { t: s } = j(), c = U(() => oc().map((e) => e.name === "emoji" ? {
|
|
5108
5108
|
...e,
|
|
5109
5109
|
toolbar: void 0
|
|
5110
5110
|
} : e), []);
|
|
@@ -5162,7 +5162,7 @@ var wl = (e, t) => e.trim().length > 0 || t > 0;
|
|
|
5162
5162
|
//#endregion
|
|
5163
5163
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/use-composer-send.ts
|
|
5164
5164
|
function Tl({ handle: e, attachments: t, blocked: n, clear: r, onSend: i, onSchedule: a, onError: o }) {
|
|
5165
|
-
let { t: s } =
|
|
5165
|
+
let { t: s } = j(), [c, l] = G(!1), u = W(!1), d = () => Cl({
|
|
5166
5166
|
getValue: () => e.getValue(),
|
|
5167
5167
|
getJSON: () => e.editor?.getJSON() ?? { type: "doc" },
|
|
5168
5168
|
getExtensions: () => e.editor?.extensionManager.extensions
|
|
@@ -5239,7 +5239,7 @@ function El({ handle: e, onSend: t, onSchedule: n, onError: r, disabled: i = !1,
|
|
|
5239
5239
|
//#endregion
|
|
5240
5240
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/use-composer.ts
|
|
5241
5241
|
function Dl(e) {
|
|
5242
|
-
let { t } =
|
|
5242
|
+
let { t } = j(), { disabled: n = !1, isLoading: r = !1, collapsed: i = "never" } = e, a = !n && !r, o = bl({
|
|
5243
5243
|
...e,
|
|
5244
5244
|
editable: a
|
|
5245
5245
|
}), s = El({
|
|
@@ -5270,7 +5270,7 @@ function Dl(e) {
|
|
|
5270
5270
|
//#endregion
|
|
5271
5271
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/rich-chat-composer.tsx
|
|
5272
5272
|
function Ol(e) {
|
|
5273
|
-
let { t: n } =
|
|
5273
|
+
let { t: n } = j(), { mentions: r, replyTo: i, onCancelReply: o, actions: s, className: c } = e, { sendOnEnter: u = !0, sendLabel: d, isLoading: f = !1 } = e, { look: p = "expressive" } = e, { handle: m, editable: h, composer: _, ui: v, attach: y } = Dl(e), { files: b, attachments: x } = _, { pill: S } = v;
|
|
5274
5274
|
return /* @__PURE__ */ q("form", {
|
|
5275
5275
|
"data-slot": "rich-chat-composer",
|
|
5276
5276
|
"data-look": p,
|