@nxgt/material 3.75.0 → 3.76.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 +40 -0
- package/README.md +37 -1
- package/dist/{alert-dialog-BfO_ri-N.js → alert-dialog-653apk3f.js} +8 -7
- package/dist/{async-slice-roMAJVzG.js → async-slice-CXLbQuOc.js} +1 -1
- package/dist/{bubble-input-B7BVd9fX.js → bubble-input-CQwVSoU3.js} +30 -29
- package/dist/{button-DgenqmpS.js → button-3op3rtZh.js} +5 -4
- package/dist/calculator-BaSMe0SK.js +1189 -0
- package/dist/calculator-announce-DRd2c6Dq.js +89 -0
- package/dist/calculator-context-BugcKuVG.js +10 -0
- package/dist/calculator-field.js +172 -0
- package/dist/calculator-panel-announce-AZSnZUSr.js +29 -0
- package/dist/calculator-segment-BlJE1LaS.js +22 -0
- package/dist/calculator.js +2 -0
- package/dist/charts.js +3 -3
- package/dist/{chip-CiDczNxO.js → chip-MuKDwtkG.js} +2 -2
- package/dist/{code-editor-CohlhFsA.js → code-editor-Bp2RrdNx.js} +13 -13
- package/dist/code-editor.js +37 -37
- package/dist/{code-language-items-Cs8GLYDp.js → code-language-items-B7WR5ua_.js} +19 -24
- package/dist/components/base-content.css +9 -4
- package/dist/components/ui/collections/server-table/server-table-phone-row.css +10 -3
- package/dist/{components-zJdfH4im.js → components-Ci3Zo8kC.js} +15837 -17245
- package/dist/components.js +37 -28
- package/dist/conversion-variant-BDFAxqe9.js +529 -0
- package/dist/copy-to-clipboard-Be5Ffvs_.js +7 -0
- package/dist/currency-B-r3ig11.js +16 -0
- package/dist/currency-field-BJ9rSrif.js +285 -0
- package/dist/{number.utils-BG_eEt5g.js → date.utils-DUvqcjan.js} +1 -7
- package/dist/dialog-Bm5LvVlB.js +166 -0
- package/dist/dist-BZe2evxL.js +139 -0
- package/dist/dist-CxhKjOYm.js +28 -0
- package/dist/dist-DHdUUM1w.js +241 -0
- package/dist/{dist-C4wtXCjf.js → dist-DOK3zo5C.js} +33 -32
- package/dist/dist-DWZXlCZR.js +182 -0
- package/dist/dist-DkQbkF9T.js +33 -0
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-CzR6JP31.js → dropdown-menu-xlZ6NYUA.js} +160 -159
- package/dist/editor.js +299 -298
- package/dist/{empty-state-DjHGMp5F.js → empty-state-C0kviQdW.js} +2 -2
- package/dist/{field-blur-CdASxjL7.js → field-blur-DkiZOVNV.js} +178 -180
- package/dist/{field-blur-context-kZ4SD7xu.js → field-blur-context-BLGgf_3z.js} +2 -2
- package/dist/financial-variant-BsZEa5sF.js +459 -0
- package/dist/{hooks-Dqq8O3Az.js → hooks-Dg94jPRq.js} +12 -12
- package/dist/hooks.js +2 -2
- package/dist/{hover-card-BPKqte4a.js → hover-card-B1g55Hi6.js} +44 -43
- package/dist/i18n.js +3 -3
- package/dist/icon-badge-BcW66bRk.js +17 -0
- package/dist/{icon-button-Cr-DyDGg.js → icon-button-Cogxy1cy.js} +5 -4
- package/dist/{in-dialog-Vwkyp-M5.js → in-dialog-D61Yeaol.js} +2 -1
- package/dist/input-CC2joTjB.js +56 -0
- package/dist/key-layout-cR79xfGE.js +38 -0
- package/dist/lib/calculator/index.d.ts +16 -0
- package/dist/lib/calculator-field/index.d.ts +12 -0
- package/dist/lib/components/ui/collections/filter/use-filter-field-config.d.ts +2 -2
- package/dist/lib/components/ui/feedback/moment/moment-body.d.ts +17 -2
- package/dist/lib/components/ui/feedback/moment/moment-passive.d.ts +13 -0
- package/dist/lib/components/ui/feedback/moment/moment.d.ts +16 -2
- package/dist/lib/components/ui/fields/calculator-field/apply-calculated.d.ts +17 -0
- package/dist/lib/components/ui/fields/calculator-field/calculator-field-content.d.ts +16 -0
- package/dist/lib/components/ui/fields/calculator-field/calculator-field-trigger.d.ts +4 -0
- package/dist/lib/components/ui/fields/calculator-field/calculator-field.d.ts +12 -0
- package/dist/lib/components/ui/fields/calculator-field/calculator-field.types.d.ts +31 -0
- package/dist/lib/components/ui/fields/calculator-field/calculator-form-field.d.ts +4 -0
- package/dist/lib/components/ui/fields/calculator-field/index.d.ts +3 -0
- package/dist/lib/components/ui/fields/calculator-field/use-calculator-field.d.ts +15 -0
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/fields/currency-field/currency-field.d.ts +7 -1
- package/dist/lib/components/ui/layout/app-shell/app-sidebar-context.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/calculator-announce.d.ts +27 -0
- package/dist/lib/components/ui/widgets/calculator/calculator-clipboard.d.ts +19 -0
- package/dist/lib/components/ui/widgets/calculator/calculator-context.d.ts +49 -0
- package/dist/lib/components/ui/widgets/calculator/calculator-feedback.d.ts +18 -0
- package/dist/lib/components/ui/widgets/calculator/calculator-keyboard.d.ts +30 -0
- package/dist/lib/components/ui/widgets/calculator/calculator-storage.d.ts +17 -0
- package/dist/lib/components/ui/widgets/calculator/calculator-variant-steps.d.ts +16 -0
- package/dist/lib/components/ui/widgets/calculator/calculator.d.ts +11 -0
- package/dist/lib/components/ui/widgets/calculator/calculator.selectors.d.ts +23 -0
- package/dist/lib/components/ui/widgets/calculator/calculator.slice.d.ts +1881 -0
- package/dist/lib/components/ui/widgets/calculator/currency.d.ts +9 -0
- package/dist/lib/components/ui/widgets/calculator/engine.d.ts +22 -0
- package/dist/lib/components/ui/widgets/calculator/index.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-announcer.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-display.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-key.d.ts +17 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-keypad.d.ts +8 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-loading.d.ts +6 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-memory.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-panel-announce.d.ts +10 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-panel-body.d.ts +9 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-screen.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-segment.d.ts +21 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-shell.d.ts +9 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-switcher.d.ts +5 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-tape.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/partials/calculator-tools.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/partials/keypad-navigation.d.ts +24 -0
- package/dist/lib/components/ui/widgets/calculator/types.d.ts +102 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-clipboard.d.ts +19 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-conversion.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-feedback.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-keyboard.d.ts +22 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-persistence.d.ts +14 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-pos.d.ts +25 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-press.d.ts +26 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-tape.d.ts +29 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-value.d.ts +9 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator-variant.d.ts +23 -0
- package/dist/lib/components/ui/widgets/calculator/use-calculator.d.ts +10 -0
- package/dist/lib/components/ui/widgets/calculator/use-engine-settings.d.ts +10 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-fields.d.ts +19 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-labels.d.ts +17 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-math.d.ts +31 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-names.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-panel.d.ts +7 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-rates.d.ts +29 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-result.d.ts +15 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-state.d.ts +36 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-variant.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/conversion/use-conversion.d.ts +24 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-change.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-figures.d.ts +43 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-format.d.ts +12 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-loan-math.d.ts +14 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-loan.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-margin.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-math.d.ts +10 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-panel.d.ts +7 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-parts.d.ts +35 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-table.d.ts +7 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-variant.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-vat.d.ts +4 -0
- package/dist/lib/components/ui/widgets/calculator/variants/key-layout.d.ts +51 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-announce.d.ts +16 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-aside.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-display.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-fields.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-layout.d.ts +9 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-line.d.ts +6 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-names.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-state.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-tender.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-ticket-data.d.ts +41 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-ticket.d.ts +5 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-totals.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-types.d.ts +76 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-variant.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-vat.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-view.d.ts +28 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-announce.d.ts +19 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-base.d.ts +11 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-bitpad.d.ts +14 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-display.d.ts +9 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-layout.d.ts +6 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-names.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-readouts.d.ts +14 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-reduce.d.ts +29 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-state.d.ts +22 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-toolbar.d.ts +5 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-variant.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-word.d.ts +15 -0
- package/dist/lib/components/ui/widgets/calculator/variants/registry.d.ts +21 -0
- package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-layout.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-names.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-toolbar.d.ts +2 -0
- package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-variant.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/standard/standard-layout.d.ts +3 -0
- package/dist/lib/components/ui/widgets/calculator/variants/variant-loader.d.ts +34 -0
- package/dist/lib/components/ui/widgets/calculator/variants/variant-logic.d.ts +40 -0
- package/dist/lib/components/ui/widgets/calculator/variants/variant-types.d.ts +62 -0
- package/dist/lib/i18n/resources/en/en.d.ts +412 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +412 -0
- package/dist/lib/i18n/resources/fr/fr.d.ts +412 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +412 -0
- package/dist/lib/i18n/resources/resources.d.ts +824 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib.js +4 -3
- package/dist/main.js +50 -40
- package/dist/map.js +66 -65
- package/dist/material.css +1 -1
- package/dist/native-select-w_FlBLHV.js +40 -0
- package/dist/number.utils-CSueQZcv.js +7 -0
- package/dist/pdf-reader.js +1 -1
- package/dist/percent-field-lahyDJDG.js +14 -0
- package/dist/picker-surface-CV09H7Nb.js +1220 -0
- package/dist/popover-Cd7DkND4.js +233 -0
- package/dist/pos-types-DKCkOTYy.js +49 -0
- package/dist/pos-variant-GrUfbTTP.js +603 -0
- package/dist/print.js +1 -1
- package/dist/programmer-variant-eKJNKENL.js +501 -0
- package/dist/programmer-word-CNCF7DJF.js +15 -0
- package/dist/{public-DC9VQw4Z.js → public-y6g4ddxd.js} +895 -892
- package/dist/{rich-code-block-DBSL9zEN.js → rich-code-block-CRQ0iyLb.js} +5 -5
- package/dist/scientific-variant-2y3UxAAU.js +149 -0
- package/dist/{sortable-provider-C4tk5esY.js → sortable-provider-DdiI3Fwk.js} +2 -2
- package/dist/{spinner-B2MubVWb.js → spinner-C1QIewWv.js} +133 -159
- package/dist/standard-layout-BuSRr3TY.js +40 -0
- package/dist/tabs-DzEqMb1W.js +383 -0
- package/dist/{icon-badge-B9uvDoyY.js → text-field-BAdY-kpO.js} +20 -34
- package/dist/theme-picker.js +3 -3
- package/dist/{theme-toggle-BInlu21G.js → theme-toggle-C_VeiiCm.js} +2 -2
- package/dist/toggle-FeCCJqbg.js +40 -0
- package/dist/{toggle-group-DXXlqid2.js → toggle-group-CVMxEpWi.js} +1 -1
- package/dist/{toolbar-items-CRJSx1MU.js → toolbar-items-D310xDuM.js} +333 -554
- package/dist/{translate-material-pVlPJ1v4.js → translate-material-BypJJ1l5.js} +1 -1
- package/dist/{translator-BoYCward.js → translator-DJkf4J7t.js} +824 -0
- package/dist/{typography-B6YMbCge.js → typography-CYEquVeb.js} +1 -1
- package/dist/{use-chat-composer-BvWQogJe.js → use-chat-composer-DMXu9E1O.js} +4198 -4600
- package/dist/{use-heading-spy-B_Z4ArDh.js → use-heading-spy-DJR8YYm6.js} +19 -19
- package/dist/{use-material-translation-CIS2n3RB.js → use-material-translation-CD6QoVal.js} +1 -1
- package/dist/{use-return-focus-DNQtADAR.js → use-return-focus-Cevw_6yq.js} +106 -105
- package/dist/useLatest-C2PnQEeD.js +8 -0
- package/docs/README.md +1 -0
- package/docs/components/feedback-and-status.md +10 -1
- package/docs/components/form-fields.md +1 -0
- package/docs/components/rich-widgets.md +108 -0
- package/docs/getting-started.md +1 -0
- package/docs/guides/calculator.md +468 -0
- package/docs/guides/forms.md +4 -2
- package/docs/guides/i18n.md +5 -0
- package/docs/previews/rich-widgets-calculator-conversion.webp +0 -0
- package/docs/previews/rich-widgets-calculator-point-of-sale.webp +0 -0
- package/docs/previews/rich-widgets-calculator.webp +0 -0
- package/docs/roadmap.md +9 -3
- package/docs/troubleshooting.md +134 -0
- package/lib/components/base-content.css +9 -4
- package/lib/components/ui/collections/server-table/server-table-phone-row.css +10 -3
- package/lib/components/ui/widgets/calculator/calculator-bands.css +146 -0
- package/lib/components/ui/widgets/calculator/calculator-display.css +83 -0
- package/lib/components/ui/widgets/calculator/calculator-keys.css +118 -0
- package/lib/components/ui/widgets/calculator/calculator-pos-ticket.css +185 -0
- package/lib/components/ui/widgets/calculator/calculator-pos.css +38 -0
- package/lib/components/ui/widgets/calculator/calculator-tape.css +71 -0
- package/lib/components/ui/widgets/calculator/calculator.css +97 -0
- package/lib/components/ui/widgets/calculator/variants/conversion/conversion.css +98 -0
- package/lib/components/ui/widgets/calculator/variants/financial/financial.css +162 -0
- package/lib/components/ui/widgets/calculator/variants/programmer/programmer.css +162 -0
- package/package.json +17 -3
- package/dist/dialog-AGsB3bv4.js +0 -219
- package/dist/dist-B7RjY7SL.js +0 -158
- package/dist/dist-lmHmz_bu.js +0 -419
package/dist/editor.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { t as e } from "./ui.utils-CAnKTCw5.js";
|
|
2
2
|
import { t } from "./utils-BLfntITJ.js";
|
|
3
|
-
import {
|
|
4
|
-
import { l as
|
|
5
|
-
import { c as
|
|
6
|
-
import {
|
|
7
|
-
import { n as
|
|
8
|
-
import { t as M } from "./use-material-translation-
|
|
9
|
-
import { t as N } from "./icon-button-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { t as
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
3
|
+
import { A as n, An as r, Bn as i, C as a, Cn as o, D as s, Dn as c, E as l, Fi as u, G as d, Gn as f, H as p, Hn as m, I as h, Ii as g, J as _, K as v, Kn as y, L as b, Mn as x, O as S, On as ee, Pi as C, Q as w, S as te, Sn as T, T as E, U as ne, Un as re, V as ie, Vn as ae, W as oe, X as se, Y as ce, Z as le, a as ue, an as de, b as D, c as fe, d as pe, dn as me, dr as he, fn as ge, gn as _e, hn as ve, i as ye, j as be, jn as xe, k as Se, kn as Ce, l as we, on as Te, p as Ee, q as De, s as Oe, sn as ke, t as Ae, v as je, w as O, x as Me, xn as Ne, y as Pe, zn as k } from "./use-chat-composer-DMXu9E1O.js";
|
|
4
|
+
import { l as Fe, n as Ie, t as Le } from "./alert-dialog-653apk3f.js";
|
|
5
|
+
import { c as Re, i as ze, n as Be, o as Ve, r as He, s as Ue, t as We, u as A } from "./dropdown-menu-xlZ6NYUA.js";
|
|
6
|
+
import { n as Ge, r as Ke, t as qe } from "./popover-Cd7DkND4.js";
|
|
7
|
+
import { n as Je, t as j } from "./button-3op3rtZh.js";
|
|
8
|
+
import { t as M } from "./use-material-translation-CD6QoVal.js";
|
|
9
|
+
import { t as N } from "./icon-button-Cogxy1cy.js";
|
|
10
|
+
import { a as Ye, s as P } from "./dist-C3GR7kJd.js";
|
|
11
|
+
import { n as Xe, t as Ze } from "./toggle-group-CVMxEpWi.js";
|
|
12
|
+
import { t as Qe } from "./input-CC2joTjB.js";
|
|
13
|
+
import { t as $e } from "./text-field-BAdY-kpO.js";
|
|
14
|
+
import { t as et } from "./use-mobile-BDro060N.js";
|
|
15
|
+
import { Ft as tt, Ht as nt, Nt as rt, Ot as it, St as at, bt as F, ht as I, mt as L, n as R, wt as z, xt as B, yt as ot } from "./dist-moutbfbd.js";
|
|
16
|
+
import { t as st } from "./markdown-Dw_uH7j7.js";
|
|
17
|
+
import { n as ct, r as V, t as lt } from "./create-store-Dqp-PLLn.js";
|
|
18
|
+
import { W as ut, w as dt } from "./youtube-node-A3NPAPgK.js";
|
|
19
|
+
import { r as ft, t as pt } from "./field-blur-DkiZOVNV.js";
|
|
20
|
+
import { t as mt } from "./toggle-FeCCJqbg.js";
|
|
20
21
|
import { a as ht, i as gt, n as _t, r as vt } from "./convert-7g-F5cNf.js";
|
|
21
22
|
import { d as yt, n as bt, r as xt, u as St } from "./headless-extensions-B1NAgmkE.js";
|
|
22
23
|
import { t as Ct } from "./render-json-COvAkihK.js";
|
|
@@ -228,7 +229,7 @@ function Ln(e, t) {
|
|
|
228
229
|
} } }), [e, t]);
|
|
229
230
|
}
|
|
230
231
|
function Rn({ editor: e, controller: t, label: n, slot: r = "editor-assistant", locked: i, onDismiss: a, children: o }) {
|
|
231
|
-
let s =
|
|
232
|
+
let s = et(), c = Ln(e, t);
|
|
232
233
|
return s ? jt(/* @__PURE__ */ J("section", {
|
|
233
234
|
role: "dialog",
|
|
234
235
|
"aria-label": n,
|
|
@@ -239,7 +240,7 @@ function Rn({ editor: e, controller: t, label: n, slot: r = "editor-assistant",
|
|
|
239
240
|
}), document.body) : /* @__PURE__ */ Y(qe, {
|
|
240
241
|
open: !0,
|
|
241
242
|
onOpenChange: (e) => !e && a("outside"),
|
|
242
|
-
children: [/* @__PURE__ */ J(
|
|
243
|
+
children: [/* @__PURE__ */ J(Ge, { virtualRef: c }), /* @__PURE__ */ J(Ke, {
|
|
243
244
|
role: "dialog",
|
|
244
245
|
"aria-label": n,
|
|
245
246
|
"data-slot": r,
|
|
@@ -313,7 +314,7 @@ function Vn({ onAsk: e }) {
|
|
|
313
314
|
};
|
|
314
315
|
return /* @__PURE__ */ Y("div", {
|
|
315
316
|
className: "flex items-center gap-1.5",
|
|
316
|
-
children: [/* @__PURE__ */ J(
|
|
317
|
+
children: [/* @__PURE__ */ J(Qe, {
|
|
317
318
|
ref: i,
|
|
318
319
|
value: n,
|
|
319
320
|
"aria-label": t("material.editor.assistant.ask-label", "Ask the assistant"),
|
|
@@ -554,7 +555,7 @@ function $n({ phase: e, stopped: t }) {
|
|
|
554
555
|
role: "status",
|
|
555
556
|
"data-slot": "editor-assistant-status",
|
|
556
557
|
className: "flex min-h-6 items-center gap-2 text-muted-foreground text-xs",
|
|
557
|
-
children: e === "streaming" ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(
|
|
558
|
+
children: e === "streaming" ? /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(Pe, {
|
|
558
559
|
label: r,
|
|
559
560
|
className: "size-6"
|
|
560
561
|
}), r] }) : t ? n("material.editor.assistant.stopped", "Stopped") : n("material.editor.assistant.ready", "Answer ready")
|
|
@@ -603,32 +604,32 @@ function ar(e) {
|
|
|
603
604
|
//#endregion
|
|
604
605
|
//#region lib/components/ui/widgets/editor/extensions/assistant/assistant-panel.tsx
|
|
605
606
|
function or(e) {
|
|
606
|
-
let { handle: t, chrome: n } =
|
|
607
|
+
let { handle: t, chrome: n } = f(), r = t.features.some((e) => e.key === "assistant");
|
|
607
608
|
return !t.editor || !r || n.state.panel !== "assistant" ? null : /* @__PURE__ */ J(sr, {});
|
|
608
609
|
}
|
|
609
610
|
function sr() {
|
|
610
|
-
let { t: e, language: t } = M(), { handle: n } =
|
|
611
|
+
let { t: e, language: t } = M(), { handle: n } = f(), r = n.editor, i = er(r), a = ar(r), o = i?.controller, s = W(() => Fn(i?.actions, e), [i?.actions, e]);
|
|
611
612
|
if (U(() => (o?.getState().phase === "idle" && o.begin(), () => o?.reset()), [o]), !o || a.phase === "idle") return null;
|
|
612
613
|
let c = (e) => {
|
|
613
614
|
o.close(), e !== "outside" && r.commands.focus();
|
|
614
615
|
}, l = () => c("discard"), u = (e) => void o.run({
|
|
615
616
|
...e,
|
|
616
617
|
locale: t ?? "en"
|
|
617
|
-
}), d = (e) => void o.apply(async (t) => await kn(r, a.text, t, e, { allowMedia: i?.allowMedia }) ? "done" : r.isEditable ? "nothing" : "read-only"),
|
|
618
|
+
}), d = (e) => void o.apply(async (t) => await kn(r, a.text, t, e, { allowMedia: i?.allowMedia }) ? "done" : r.isEditable ? "nothing" : "read-only"), p = (e) => {
|
|
618
619
|
e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), c("escape"));
|
|
619
|
-
},
|
|
620
|
+
}, m = e("material.editor.assistant.title", "Assistant");
|
|
620
621
|
return /* @__PURE__ */ J(Rn, {
|
|
621
622
|
editor: r,
|
|
622
623
|
controller: o,
|
|
623
|
-
label:
|
|
624
|
+
label: m,
|
|
624
625
|
locked: a.phase !== "menu",
|
|
625
626
|
onDismiss: c,
|
|
626
627
|
children: /* @__PURE__ */ Y("div", {
|
|
627
628
|
ref: o.setPanel,
|
|
628
|
-
onKeyDown:
|
|
629
|
+
onKeyDown: p,
|
|
629
630
|
className: "grid gap-2.5",
|
|
630
631
|
children: [/* @__PURE__ */ J(Xn, {
|
|
631
|
-
label: a.run?.label ??
|
|
632
|
+
label: a.run?.label ?? m,
|
|
632
633
|
onDiscard: l
|
|
633
634
|
}), /* @__PURE__ */ J(Zn, {
|
|
634
635
|
editor: r,
|
|
@@ -650,7 +651,7 @@ function sr() {
|
|
|
650
651
|
//#region lib/components/ui/widgets/editor/extensions/collab/use-presence.ts
|
|
651
652
|
var cr = [], lr = () => () => {};
|
|
652
653
|
function ur() {
|
|
653
|
-
let { editor: e } =
|
|
654
|
+
let { editor: e } = f().handle;
|
|
654
655
|
return dr(e);
|
|
655
656
|
}
|
|
656
657
|
function dr(e) {
|
|
@@ -682,7 +683,7 @@ function pr({ user: e }) {
|
|
|
682
683
|
"aria-label": e.name,
|
|
683
684
|
title: e.name,
|
|
684
685
|
className: "flex",
|
|
685
|
-
children: /* @__PURE__ */ J(
|
|
686
|
+
children: /* @__PURE__ */ J(Ee, { fallback: /* @__PURE__ */ J("span", {
|
|
686
687
|
ref: (t) => {
|
|
687
688
|
t?.style.setProperty("--nxgt-collab-color", e.color), t?.style.setProperty("--nxgt-collab-fg", Tt(e.color));
|
|
688
689
|
},
|
|
@@ -699,13 +700,13 @@ function mr({ status: e, max: n = 4, className: r }) {
|
|
|
699
700
|
"data-slot": "editor-presence",
|
|
700
701
|
"data-status": e,
|
|
701
702
|
className: t("flex items-center gap-3", r),
|
|
702
|
-
children: [s && o && /* @__PURE__ */ J(
|
|
703
|
+
children: [s && o && /* @__PURE__ */ J(je, {
|
|
703
704
|
tone: o,
|
|
704
705
|
pulse: e === "connecting",
|
|
705
706
|
role: "status",
|
|
706
707
|
className: "text-muted-foreground text-xs",
|
|
707
708
|
children: i(s, c)
|
|
708
|
-
}), a.length > 0 && /* @__PURE__ */ J(
|
|
709
|
+
}), a.length > 0 && /* @__PURE__ */ J(pe, {
|
|
709
710
|
size: "sm",
|
|
710
711
|
max: n,
|
|
711
712
|
role: "group",
|
|
@@ -734,7 +735,7 @@ function _r({ composer: e, body: t, onBody: n, onSubmit: r, onDismiss: i }) {
|
|
|
734
735
|
className: "line-clamp-2 border-s-2 ps-2 text-muted-foreground text-xs italic",
|
|
735
736
|
children: e.quote
|
|
736
737
|
}),
|
|
737
|
-
/* @__PURE__ */ J(
|
|
738
|
+
/* @__PURE__ */ J(x, {
|
|
738
739
|
className: hr,
|
|
739
740
|
"aria-label": a("material.editor.comments.body-label", "Comment"),
|
|
740
741
|
placeholder: a("material.editor.comments.placeholder", "Write a comment…"),
|
|
@@ -767,7 +768,7 @@ function vr({ pending: e, empty: t, onDismiss: n }) {
|
|
|
767
768
|
children: [/* @__PURE__ */ J(j, {
|
|
768
769
|
type: "button",
|
|
769
770
|
size: "sm",
|
|
770
|
-
variant:
|
|
771
|
+
variant: Je,
|
|
771
772
|
disabled: e,
|
|
772
773
|
onClick: n,
|
|
773
774
|
children: r("material.editor.comments.cancel", "Cancel")
|
|
@@ -822,7 +823,7 @@ function Tr({ editor: e }) {
|
|
|
822
823
|
//#endregion
|
|
823
824
|
//#region lib/components/ui/widgets/editor/extensions/comments/comment-composer.tsx
|
|
824
825
|
function Er(e) {
|
|
825
|
-
let { handle: t } =
|
|
826
|
+
let { handle: t } = f(), { editor: n } = t;
|
|
826
827
|
return !n || !X(n) ? null : /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(Dr, { editor: n }), /* @__PURE__ */ J(Tr, { editor: n })] });
|
|
827
828
|
}
|
|
828
829
|
function Dr({ editor: e }) {
|
|
@@ -833,7 +834,7 @@ function Dr({ editor: e }) {
|
|
|
833
834
|
});
|
|
834
835
|
}
|
|
835
836
|
function Or({ editor: e, controller: t }) {
|
|
836
|
-
let { t: n } = M(), { chrome: r } =
|
|
837
|
+
let { t: n } = M(), { chrome: r } = f(), i = Cr(e).composer, { actions: a } = r;
|
|
837
838
|
U(() => (a.setBubbleSuppressed(!0), () => {
|
|
838
839
|
a.setBubbleSuppressed(!1);
|
|
839
840
|
}), [a]);
|
|
@@ -868,14 +869,14 @@ function kr(e, t) {
|
|
|
868
869
|
return !n || !(t instanceof Element) ? !1 : n.contains(t) ? !0 : n.getAttribute("aria-expanded") === "true" && !!t.closest("[role=\"menu\"]");
|
|
869
870
|
}
|
|
870
871
|
function Ar({ id: e, children: t, ...n }) {
|
|
871
|
-
let { chrome: r, toolbarRef: i } =
|
|
872
|
+
let { chrome: r, toolbarRef: i } = f(), a = r.state.panel === e, [o, s] = K();
|
|
872
873
|
return kt(() => {
|
|
873
874
|
let e = i.current, t = e?.getAttribute("aria-orientation") === "vertical" ? getComputedStyle(e).direction === "rtl" ? "left" : "right" : void 0;
|
|
874
875
|
t !== o && s(t);
|
|
875
876
|
}), /* @__PURE__ */ Y(qe, {
|
|
876
877
|
open: a,
|
|
877
878
|
onOpenChange: (t) => t ? r.actions.openPanel(e) : r.actions.closePanel(),
|
|
878
|
-
children: [/* @__PURE__ */ J(
|
|
879
|
+
children: [/* @__PURE__ */ J(Ge, { virtualRef: i }), /* @__PURE__ */ J(Ke, {
|
|
879
880
|
"data-panel": e,
|
|
880
881
|
side: o,
|
|
881
882
|
align: "start",
|
|
@@ -897,7 +898,7 @@ function Ar({ id: e, children: t, ...n }) {
|
|
|
897
898
|
//#region lib/components/ui/widgets/editor/extensions/comments/comments-status.tsx
|
|
898
899
|
function jr({ state: e, controller: t, count: n }) {
|
|
899
900
|
let { t: r } = M();
|
|
900
|
-
return n === 0 && !e.showResolved ? null : /* @__PURE__ */ J(
|
|
901
|
+
return n === 0 && !e.showResolved ? null : /* @__PURE__ */ J(he, {
|
|
901
902
|
label: r("material.editor.comments.show-resolved", "Show resolved"),
|
|
902
903
|
checked: e.showResolved,
|
|
903
904
|
onCheckedChange: t.setShowResolved
|
|
@@ -917,7 +918,7 @@ function Nr({ draft: e, onChange: t, onSave: n, onCancel: r }) {
|
|
|
917
918
|
let { t: i } = M();
|
|
918
919
|
return /* @__PURE__ */ Y("div", {
|
|
919
920
|
className: "grid grid-cols-[minmax(0,1fr)] gap-2",
|
|
920
|
-
children: [/* @__PURE__ */ J(
|
|
921
|
+
children: [/* @__PURE__ */ J(x, {
|
|
921
922
|
className: hr,
|
|
922
923
|
"aria-label": i("material.editor.comments.body-label", "Comment"),
|
|
923
924
|
value: e,
|
|
@@ -936,7 +937,7 @@ function Nr({ draft: e, onChange: t, onSave: n, onCancel: r }) {
|
|
|
936
937
|
children: i("material.editor.comments.save", "Save")
|
|
937
938
|
}), /* @__PURE__ */ J(j, {
|
|
938
939
|
size: "sm",
|
|
939
|
-
variant:
|
|
940
|
+
variant: Je,
|
|
940
941
|
onClick: r,
|
|
941
942
|
children: i("material.editor.comments.cancel", "Cancel")
|
|
942
943
|
})]
|
|
@@ -1011,8 +1012,8 @@ function Zr({ comment: e, pending: t, onEdit: n }) {
|
|
|
1011
1012
|
return /* @__PURE__ */ Y("div", {
|
|
1012
1013
|
className: "flex items-center gap-2",
|
|
1013
1014
|
children: [
|
|
1014
|
-
/* @__PURE__ */ J(
|
|
1015
|
-
src:
|
|
1015
|
+
/* @__PURE__ */ J(Ee, {
|
|
1016
|
+
src: ut(e.author.avatarUrl),
|
|
1016
1017
|
alt: "",
|
|
1017
1018
|
fallback: Xr(e.author.name),
|
|
1018
1019
|
className: "size-6 text-[0.625rem]"
|
|
@@ -1067,7 +1068,7 @@ function $r({ thread: e, controller: t, canRemove: n }) {
|
|
|
1067
1068
|
let n = i;
|
|
1068
1069
|
n.trim() && (a(""), await t.reply(e.id, n) || a(n));
|
|
1069
1070
|
};
|
|
1070
|
-
return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(
|
|
1071
|
+
return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(x, {
|
|
1071
1072
|
className: hr,
|
|
1072
1073
|
"aria-label": r("material.editor.comments.reply-label", "Reply to this thread"),
|
|
1073
1074
|
placeholder: r("material.editor.comments.reply-placeholder", "Reply…"),
|
|
@@ -1328,7 +1329,7 @@ var gi = class {
|
|
|
1328
1329
|
current;
|
|
1329
1330
|
core;
|
|
1330
1331
|
constructor(e, t = !1) {
|
|
1331
|
-
this.host = e, this.store =
|
|
1332
|
+
this.host = e, this.store = ct(yr(t)), this.core = {
|
|
1332
1333
|
host: e,
|
|
1333
1334
|
get: () => this.state,
|
|
1334
1335
|
set: (e) => this.set(e),
|
|
@@ -1467,7 +1468,7 @@ function _i(e) {
|
|
|
1467
1468
|
//#endregion
|
|
1468
1469
|
//#region lib/components/ui/widgets/editor/extensions/comments/comments-panel.tsx
|
|
1469
1470
|
function vi(e) {
|
|
1470
|
-
let { handle: t, chrome: n } =
|
|
1471
|
+
let { handle: t, chrome: n } = f(), { editor: r } = t;
|
|
1471
1472
|
return !r || !X(r) ? null : /* @__PURE__ */ J(Ar, {
|
|
1472
1473
|
id: "comments",
|
|
1473
1474
|
className: "max-h-[min(36rem,80svh)] w-96 max-w-[92vw] overflow-y-auto p-3",
|
|
@@ -1631,7 +1632,7 @@ function Ei(e, t, n, r) {
|
|
|
1631
1632
|
//#endregion
|
|
1632
1633
|
//#region lib/components/ui/widgets/editor/extensions/comments/comments-rail.tsx
|
|
1633
1634
|
function Di(e) {
|
|
1634
|
-
let { handle: t } =
|
|
1635
|
+
let { handle: t } = f(), { editor: n } = t;
|
|
1635
1636
|
return !n || !X(n) ? null : /* @__PURE__ */ J(Oi, { editor: n });
|
|
1636
1637
|
}
|
|
1637
1638
|
function Oi({ editor: e }) {
|
|
@@ -1687,7 +1688,7 @@ function ki(e, t) {
|
|
|
1687
1688
|
//#endregion
|
|
1688
1689
|
//#region lib/components/ui/widgets/editor/extensions/block/block-drag.ts
|
|
1689
1690
|
function Ai(e, t, n) {
|
|
1690
|
-
let { view: r } = e, i =
|
|
1691
|
+
let { view: r } = e, i = ot.create(r.state.doc, t.pos);
|
|
1691
1692
|
r.dispatch(r.state.tr.setSelection(i)), r.dragging = {
|
|
1692
1693
|
slice: i.content(),
|
|
1693
1694
|
move: !0
|
|
@@ -1779,7 +1780,7 @@ function Pi(e, t) {
|
|
|
1779
1780
|
}
|
|
1780
1781
|
var Fi = (e) => Pi(e.doc, e.selection.head);
|
|
1781
1782
|
function Ii(e, t) {
|
|
1782
|
-
let n = t.node.isAtom ?
|
|
1783
|
+
let n = t.node.isAtom ? ot.create(e.doc, t.pos) : z.near(e.doc.resolve(t.pos + 1));
|
|
1783
1784
|
return e.setSelection(n);
|
|
1784
1785
|
}
|
|
1785
1786
|
function Li(e, t, n = Fi(e)) {
|
|
@@ -1789,7 +1790,7 @@ function Li(e, t, n = Fi(e)) {
|
|
|
1789
1790
|
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
1791
|
i.replaceWith(s, c, l);
|
|
1791
1792
|
let u = t === 1 ? r.nodeSize : -r.nodeSize;
|
|
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
|
|
1793
|
+
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 ot && i.setSelection(ot.create(i.doc, n.pos + u)), i.scrollIntoView();
|
|
1793
1794
|
}
|
|
1794
1795
|
function Ri(e, t = Fi(e)) {
|
|
1795
1796
|
if (!t) return null;
|
|
@@ -1823,12 +1824,12 @@ function Vi({ editor: e, block: t }) {
|
|
|
1823
1824
|
node: r.child(t.index)
|
|
1824
1825
|
});
|
|
1825
1826
|
return /* @__PURE__ */ Y(q, { children: [
|
|
1826
|
-
/* @__PURE__ */ Y(
|
|
1827
|
+
/* @__PURE__ */ Y(He, { children: [/* @__PURE__ */ J(ze, { children: n("material.editor.block.turn-into", "Turn into") }), Ni(e).map((t) => /* @__PURE__ */ Y(A, {
|
|
1827
1828
|
onSelect: () => t.run(e),
|
|
1828
1829
|
children: [/* @__PURE__ */ J(t.icon, {}), n(t.key, t.label)]
|
|
1829
1830
|
}, t.id))] }),
|
|
1830
|
-
/* @__PURE__ */ J(
|
|
1831
|
-
/* @__PURE__ */ Y(
|
|
1831
|
+
/* @__PURE__ */ J(Ve, {}),
|
|
1832
|
+
/* @__PURE__ */ Y(He, { children: [
|
|
1832
1833
|
/* @__PURE__ */ Y(A, {
|
|
1833
1834
|
onSelect: () => Bi(e, () => Ri(e.state, i())),
|
|
1834
1835
|
children: [/* @__PURE__ */ J(Ht, {}), n("material.editor.block.duplicate", "Duplicate")]
|
|
@@ -1839,7 +1840,7 @@ function Vi({ editor: e, block: t }) {
|
|
|
1839
1840
|
children: [
|
|
1840
1841
|
/* @__PURE__ */ J(Nt, {}),
|
|
1841
1842
|
n("material.editor.block.move-up", "Move up"),
|
|
1842
|
-
/* @__PURE__ */ J(
|
|
1843
|
+
/* @__PURE__ */ J(Ue, { children: "⌥⇧↑" })
|
|
1843
1844
|
]
|
|
1844
1845
|
}),
|
|
1845
1846
|
/* @__PURE__ */ Y(A, {
|
|
@@ -1848,11 +1849,11 @@ function Vi({ editor: e, block: t }) {
|
|
|
1848
1849
|
children: [
|
|
1849
1850
|
/* @__PURE__ */ J(Mt, {}),
|
|
1850
1851
|
n("material.editor.block.move-down", "Move down"),
|
|
1851
|
-
/* @__PURE__ */ J(
|
|
1852
|
+
/* @__PURE__ */ J(Ue, { children: "⌥⇧↓" })
|
|
1852
1853
|
]
|
|
1853
1854
|
})
|
|
1854
1855
|
] }),
|
|
1855
|
-
/* @__PURE__ */ J(
|
|
1856
|
+
/* @__PURE__ */ J(Ve, {}),
|
|
1856
1857
|
/* @__PURE__ */ Y(A, {
|
|
1857
1858
|
variant: "error",
|
|
1858
1859
|
onSelect: () => Bi(e, () => zi(e.state, i())),
|
|
@@ -1915,7 +1916,7 @@ function Hi(e, t, n) {
|
|
|
1915
1916
|
//#endregion
|
|
1916
1917
|
//#region lib/components/ui/widgets/editor/partials/editor-block-handle.tsx
|
|
1917
1918
|
function Ui({ children: e, className: t }) {
|
|
1918
|
-
let { handle: n } =
|
|
1919
|
+
let { handle: n } = f(), r = n.features.some((e) => e.key === "dragHandle");
|
|
1919
1920
|
return !n.editor || !r ? /* @__PURE__ */ J("div", {
|
|
1920
1921
|
className: t,
|
|
1921
1922
|
children: e
|
|
@@ -1926,7 +1927,7 @@ function Ui({ children: e, className: t }) {
|
|
|
1926
1927
|
});
|
|
1927
1928
|
}
|
|
1928
1929
|
function Wi({ editor: e, children: n, className: r }) {
|
|
1929
|
-
let { chrome: i } =
|
|
1930
|
+
let { chrome: i } = f(), a = G(null), o = P({
|
|
1930
1931
|
editor: e,
|
|
1931
1932
|
selector: (e) => e.editor.isEditable
|
|
1932
1933
|
}), s = i.state.panel === "block" && o, { active: c, hover: l, unhover: u } = Hi(e, a, s);
|
|
@@ -1944,7 +1945,7 @@ function Wi({ editor: e, children: n, className: r }) {
|
|
|
1944
1945
|
});
|
|
1945
1946
|
}
|
|
1946
1947
|
function Gi({ editor: e, active: n, open: r }) {
|
|
1947
|
-
let { t: i } = M(), { chrome: a } =
|
|
1948
|
+
let { t: i } = M(), { chrome: a } = f();
|
|
1948
1949
|
return /* @__PURE__ */ Y("div", {
|
|
1949
1950
|
"data-slot": "editor-block-handle",
|
|
1950
1951
|
"data-open": r || void 0,
|
|
@@ -1956,10 +1957,10 @@ function Gi({ editor: e, active: n, open: r }) {
|
|
|
1956
1957
|
tooltip: i("material.editor.block.add", "Add a block below"),
|
|
1957
1958
|
onClick: () => ki(e, n),
|
|
1958
1959
|
children: /* @__PURE__ */ J(on, {})
|
|
1959
|
-
}), /* @__PURE__ */ Y(
|
|
1960
|
+
}), /* @__PURE__ */ Y(We, {
|
|
1960
1961
|
open: r,
|
|
1961
1962
|
onOpenChange: (e) => e ? a.actions.openPanel("block") : a.actions.closePanel(),
|
|
1962
|
-
children: [/* @__PURE__ */ J(
|
|
1963
|
+
children: [/* @__PURE__ */ J(Re, {
|
|
1963
1964
|
asChild: !0,
|
|
1964
1965
|
children: /* @__PURE__ */ J(N, {
|
|
1965
1966
|
variant: "ghost",
|
|
@@ -1975,7 +1976,7 @@ function Gi({ editor: e, active: n, open: r }) {
|
|
|
1975
1976
|
onDragStart: (t) => Ai(e, n, t.nativeEvent),
|
|
1976
1977
|
children: /* @__PURE__ */ J(Kt, {})
|
|
1977
1978
|
})
|
|
1978
|
-
}), /* @__PURE__ */ J(
|
|
1979
|
+
}), /* @__PURE__ */ J(Be, {
|
|
1979
1980
|
align: "start",
|
|
1980
1981
|
onCloseAutoFocus: (t) => {
|
|
1981
1982
|
t.preventDefault(), e.isDestroyed || e.commands.focus();
|
|
@@ -2004,13 +2005,13 @@ function Ki({ find: e }) {
|
|
|
2004
2005
|
}
|
|
2005
2006
|
function qi({ find: e }) {
|
|
2006
2007
|
let { t } = M();
|
|
2007
|
-
return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(
|
|
2008
|
+
return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(mt, {
|
|
2008
2009
|
size: "sm",
|
|
2009
2010
|
"aria-label": t("material.editor.find.match-case", "Match case"),
|
|
2010
2011
|
pressed: e.caseSensitive,
|
|
2011
2012
|
onPressedChange: e.setCaseSensitive,
|
|
2012
2013
|
children: /* @__PURE__ */ J(Ft, {})
|
|
2013
|
-
}), /* @__PURE__ */ J(
|
|
2014
|
+
}), /* @__PURE__ */ J(mt, {
|
|
2014
2015
|
size: "sm",
|
|
2015
2016
|
"aria-label": t("material.editor.find.whole-word", "Whole word"),
|
|
2016
2017
|
pressed: e.wholeWord,
|
|
@@ -2041,7 +2042,7 @@ function Yi({ find: e, inputRef: t, onStep: n, onClose: r, onKeyDown: i, replace
|
|
|
2041
2042
|
return /* @__PURE__ */ Y("div", {
|
|
2042
2043
|
className: "flex flex-wrap items-center gap-1.5",
|
|
2043
2044
|
children: [
|
|
2044
|
-
/* @__PURE__ */ J(
|
|
2045
|
+
/* @__PURE__ */ J(Qe, {
|
|
2045
2046
|
ref: t,
|
|
2046
2047
|
type: "search",
|
|
2047
2048
|
"aria-label": c("material.editor.find.find", "Find"),
|
|
@@ -2248,11 +2249,11 @@ function ma(e) {
|
|
|
2248
2249
|
//#endregion
|
|
2249
2250
|
//#region lib/components/ui/widgets/editor/partials/editor-find-panel.tsx
|
|
2250
2251
|
function ha({ className: e }) {
|
|
2251
|
-
let { handle: t, chrome: n } =
|
|
2252
|
+
let { handle: t, chrome: n } = f(), { editor: r } = t, i = n.state.panel === "find", a = t.features.some((e) => e.key === "find");
|
|
2252
2253
|
return !r || !i || !a ? null : /* @__PURE__ */ J(ga, { className: e });
|
|
2253
2254
|
}
|
|
2254
2255
|
function ga({ className: e }) {
|
|
2255
|
-
let { t } = M(), { handle: n, chrome: r } =
|
|
2256
|
+
let { t } = M(), { handle: n, chrome: r } = f(), i = n.editor, a = ma(i), o = G(null), s = P({
|
|
2256
2257
|
editor: i,
|
|
2257
2258
|
selector: (e) => e.editor.isEditable
|
|
2258
2259
|
}), c = s && r.state.findReplace;
|
|
@@ -2291,7 +2292,7 @@ function _a({ editor: e, find: t }) {
|
|
|
2291
2292
|
return /* @__PURE__ */ Y("div", {
|
|
2292
2293
|
className: "flex flex-wrap items-center gap-1.5",
|
|
2293
2294
|
children: [
|
|
2294
|
-
/* @__PURE__ */ J(
|
|
2295
|
+
/* @__PURE__ */ J(Qe, {
|
|
2295
2296
|
"aria-label": n("material.editor.find.replace", "Replace"),
|
|
2296
2297
|
placeholder: n("material.editor.find.replace", "Replace"),
|
|
2297
2298
|
value: r,
|
|
@@ -2321,7 +2322,7 @@ function _a({ editor: e, find: t }) {
|
|
|
2321
2322
|
//#endregion
|
|
2322
2323
|
//#region lib/components/ui/widgets/editor/partials/editor-focus-exit.tsx
|
|
2323
2324
|
function va({ className: e }) {
|
|
2324
|
-
let { t: n } = M(), { chrome: r, handle: i } =
|
|
2325
|
+
let { t: n } = M(), { chrome: r, handle: i } = f();
|
|
2325
2326
|
return r.state.focusMode ? /* @__PURE__ */ J(N, {
|
|
2326
2327
|
variant: "ghost",
|
|
2327
2328
|
"data-slot": "editor-focus-exit",
|
|
@@ -2360,7 +2361,7 @@ function xa(e) {
|
|
|
2360
2361
|
//#endregion
|
|
2361
2362
|
//#region lib/components/ui/widgets/editor/partials/editor-stats.tsx
|
|
2362
2363
|
function Sa({ readingTime: e = !0 }) {
|
|
2363
|
-
let { t } = M(), { handle: n } =
|
|
2364
|
+
let { t } = M(), { handle: n } = f(), r = xa(n), { words: i } = r;
|
|
2364
2365
|
return /* @__PURE__ */ Y("p", {
|
|
2365
2366
|
"data-slot": "editor-stats",
|
|
2366
2367
|
className: "flex flex-wrap gap-x-2",
|
|
@@ -2480,7 +2481,7 @@ var ja = {
|
|
|
2480
2481
|
3: "ps-8"
|
|
2481
2482
|
};
|
|
2482
2483
|
function Ma({ className: e, onNavigate: t }) {
|
|
2483
|
-
let { handle: n } =
|
|
2484
|
+
let { handle: n } = f();
|
|
2484
2485
|
return n.editor ? /* @__PURE__ */ J(Na, {
|
|
2485
2486
|
editor: n.editor,
|
|
2486
2487
|
className: e,
|
|
@@ -2517,7 +2518,7 @@ function Na({ editor: e, className: n, onNavigate: r }) {
|
|
|
2517
2518
|
//#endregion
|
|
2518
2519
|
//#region lib/components/ui/widgets/editor/partials/editor-outline-panel.tsx
|
|
2519
2520
|
function Pa(e) {
|
|
2520
|
-
let { handle: t, chrome: n } =
|
|
2521
|
+
let { handle: t, chrome: n } = f();
|
|
2521
2522
|
return t.features.some((e) => e.key === "outline") ? /* @__PURE__ */ J(Ar, {
|
|
2522
2523
|
id: "outline",
|
|
2523
2524
|
className: "w-72 max-w-[92vw] p-2",
|
|
@@ -2528,7 +2529,7 @@ function Pa(e) {
|
|
|
2528
2529
|
//#region lib/components/ui/widgets/editor/extensions/upload/use-editor-uploads.ts
|
|
2529
2530
|
var Fa = 0, Ia = 1e6;
|
|
2530
2531
|
function La(e) {
|
|
2531
|
-
let t =
|
|
2532
|
+
let t = xe(e.editor)?.queue, n = At(H((e) => t?.subscribe(e) ?? (() => {}), [t]), () => {
|
|
2532
2533
|
if (!t) return Fa;
|
|
2533
2534
|
let e = t.list(), n = e.filter((e) => e.status === "error").length;
|
|
2534
2535
|
return (e.length - n) * Ia + n;
|
|
@@ -2572,7 +2573,7 @@ function Va(e) {
|
|
|
2572
2573
|
//#endregion
|
|
2573
2574
|
//#region lib/components/ui/widgets/editor/extensions/assistant/assistant-button.tsx
|
|
2574
2575
|
function Ha({ editor: e }) {
|
|
2575
|
-
let { t } = M(), { chrome: n } =
|
|
2576
|
+
let { t } = M(), { chrome: n } = f(), r = ir(e), i = n.state.panel === "assistant";
|
|
2576
2577
|
if (!r || !e.isEditable) return null;
|
|
2577
2578
|
let a = t("material.editor.assistant.title", "Assistant");
|
|
2578
2579
|
return /* @__PURE__ */ J(k, {
|
|
@@ -2715,7 +2716,7 @@ async function no(e) {
|
|
|
2715
2716
|
//#region lib/components/ui/widgets/editor/extensions/assistant/assistant-controller.ts
|
|
2716
2717
|
var ro = class {
|
|
2717
2718
|
host;
|
|
2718
|
-
store =
|
|
2719
|
+
store = ct(nr);
|
|
2719
2720
|
abort = null;
|
|
2720
2721
|
token = 0;
|
|
2721
2722
|
panel = null;
|
|
@@ -3000,7 +3001,7 @@ function mo({ editor: e }) {
|
|
|
3000
3001
|
});
|
|
3001
3002
|
}
|
|
3002
3003
|
function ho({ editor: e }) {
|
|
3003
|
-
let { t } = M(), { chrome: n } =
|
|
3004
|
+
let { t } = M(), { chrome: n } = f(), r = Cr(e);
|
|
3004
3005
|
if (!X(e)) return null;
|
|
3005
3006
|
let i = n.state.panel === "comments", a = mi(r).length, o = t("material.editor.comments.count", "Comments ({count})", { count: a });
|
|
3006
3007
|
return /* @__PURE__ */ J(k, {
|
|
@@ -3064,8 +3065,8 @@ var So = (e) => {
|
|
|
3064
3065
|
let n = e.marks.filter((e) => e.type.name !== "comment");
|
|
3065
3066
|
t.push(n.length === e.marks.length ? e : e.mark(n));
|
|
3066
3067
|
} else t.push(e.copy(So(e.content)));
|
|
3067
|
-
}),
|
|
3068
|
-
}, Co = (e) => new
|
|
3068
|
+
}), tt.fromArray(t);
|
|
3069
|
+
}, Co = (e) => new nt(So(e.content), e.openStart, e.openEnd), wo = (e) => e?.dragging?.move === !0, To = (e, t) => wo(t) ? e : Co(e), Eo = new B("comments"), Do = (e, t) => {
|
|
3069
3070
|
let n = [];
|
|
3070
3071
|
for (let r = e; r && r !== t; r = r.parentElement) {
|
|
3071
3072
|
let e = r.getAttribute?.("data-comment-thread");
|
|
@@ -3211,7 +3212,7 @@ var So = (e) => {
|
|
|
3211
3212
|
//#endregion
|
|
3212
3213
|
//#region lib/components/ui/widgets/editor/extensions/find/find-button.tsx
|
|
3213
3214
|
function Fo({ editor: e }) {
|
|
3214
|
-
let { t } = M(), { chrome: n } =
|
|
3215
|
+
let { t } = M(), { chrome: n } = f(), r = n.state.panel === "find";
|
|
3215
3216
|
return /* @__PURE__ */ J(k, {
|
|
3216
3217
|
variant: r ? "filled" : "ghost",
|
|
3217
3218
|
"aria-pressed": r,
|
|
@@ -3310,7 +3311,7 @@ var Io = () => new F({
|
|
|
3310
3311
|
//#endregion
|
|
3311
3312
|
//#region lib/components/ui/widgets/editor/extensions/focus-mode/focus-mode-button.tsx
|
|
3312
3313
|
function Vo({ editor: e }) {
|
|
3313
|
-
let { t } = M(), { chrome: n } =
|
|
3314
|
+
let { t } = M(), { chrome: n } = f(), r = n.state.focusMode;
|
|
3314
3315
|
return /* @__PURE__ */ J(k, {
|
|
3315
3316
|
variant: r ? "filled" : "ghost",
|
|
3316
3317
|
"aria-pressed": r,
|
|
@@ -3391,7 +3392,7 @@ var Wo = () => V({
|
|
|
3391
3392
|
handleDOMEvents: { keyup: () => (t = !1, !1) },
|
|
3392
3393
|
handlePaste: (n, r) => {
|
|
3393
3394
|
let i = r.clipboardData, a = i?.getData("text/plain") ?? "", o = t;
|
|
3394
|
-
return t = !1, o || !a || i?.getData("text/html") || n.state.selection.$from.parent.type.spec.code || !Va(a) ? !1 : (
|
|
3395
|
+
return t = !1, o || !a || i?.getData("text/html") || n.state.selection.$from.parent.type.spec.code || !Va(a) ? !1 : (st().then((t) => {
|
|
3395
3396
|
if (e.isDestroyed) return;
|
|
3396
3397
|
let n = e.extensionManager.extensions, r = xt(t.parse(a, n), n);
|
|
3397
3398
|
e.commands.insertContent(r.content ?? []);
|
|
@@ -3416,7 +3417,7 @@ var Wo = () => V({
|
|
|
3416
3417
|
//#endregion
|
|
3417
3418
|
//#region lib/components/ui/widgets/editor/extensions/outline/outline-button.tsx
|
|
3418
3419
|
function Jo({ editor: e }) {
|
|
3419
|
-
let { t } = M(), { chrome: n } =
|
|
3420
|
+
let { t } = M(), { chrome: n } = f(), r = n.state.panel === "outline";
|
|
3420
3421
|
return /* @__PURE__ */ J(k, {
|
|
3421
3422
|
variant: r ? "filled" : "ghost",
|
|
3422
3423
|
"aria-pressed": r,
|
|
@@ -3447,13 +3448,13 @@ function Xo({ editor: e }) {
|
|
|
3447
3448
|
let { t } = M(), n = P({
|
|
3448
3449
|
editor: e,
|
|
3449
3450
|
selector: (e) => e.editor.getAttributes("image").alt ?? ""
|
|
3450
|
-
}), [r, i] = K(""), [a, o] = K(!1), { trigger: s, onCloseAutoFocus: c } =
|
|
3451
|
-
return /* @__PURE__ */ Y(
|
|
3451
|
+
}), [r, i] = K(""), [a, o] = K(!1), { trigger: s, onCloseAutoFocus: c } = ce(), l = t("material.editor.upload.alt", "Alt text");
|
|
3452
|
+
return /* @__PURE__ */ Y(Le, {
|
|
3452
3453
|
open: a,
|
|
3453
3454
|
onOpenChange: (e) => {
|
|
3454
3455
|
o(e), e && i(n);
|
|
3455
3456
|
},
|
|
3456
|
-
children: [/* @__PURE__ */ J(
|
|
3457
|
+
children: [/* @__PURE__ */ J(Fe, {
|
|
3457
3458
|
asChild: !0,
|
|
3458
3459
|
ref: s,
|
|
3459
3460
|
children: /* @__PURE__ */ J(k, {
|
|
@@ -3464,10 +3465,10 @@ function Xo({ editor: e }) {
|
|
|
3464
3465
|
more: { kind: "dialog" },
|
|
3465
3466
|
children: /* @__PURE__ */ J(gn, {})
|
|
3466
3467
|
})
|
|
3467
|
-
}), /* @__PURE__ */ Y(
|
|
3468
|
+
}), /* @__PURE__ */ Y(Ie, {
|
|
3468
3469
|
className: "flex size-max flex-col gap-2 p-2",
|
|
3469
3470
|
onCloseAutoFocus: c,
|
|
3470
|
-
children: [/* @__PURE__ */ J(
|
|
3471
|
+
children: [/* @__PURE__ */ J($e, {
|
|
3471
3472
|
value: r,
|
|
3472
3473
|
label: t("material.editor.upload.alt-label", "Describe the image"),
|
|
3473
3474
|
onChange: (e) => i(e.target.value)
|
|
@@ -3533,7 +3534,7 @@ var ss = /* @__PURE__ */ new WeakMap(), cs = (e, t) => L.widget(e, () => {
|
|
|
3533
3534
|
cards: [],
|
|
3534
3535
|
decorations: I.empty,
|
|
3535
3536
|
orphaned: []
|
|
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
|
|
3537
|
+
}, 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 it && t.from === 0 && t.to === e.docs[n].content.size), fs = (e) => {
|
|
3537
3538
|
let t = !1;
|
|
3538
3539
|
return e.content.descendants((e) => ((e.isText || e.isLeaf) && (t = !0), !t)), t;
|
|
3539
3540
|
};
|
|
@@ -3625,7 +3626,7 @@ function _s(e, t) {
|
|
|
3625
3626
|
}
|
|
3626
3627
|
function vs(e, t) {
|
|
3627
3628
|
if (e.isDestroyed) return;
|
|
3628
|
-
let { doc: n } = e.state, r = n.resolve(Math.max(0, Math.min(t, n.content.size))), i =
|
|
3629
|
+
let { doc: n } = e.state, r = n.resolve(Math.max(0, Math.min(t, n.content.size))), i = at.findFrom(r, 1, !0) ?? at.findFrom(r, -1, !0) ?? at.near(r, -1);
|
|
3629
3630
|
e.view.dispatch(e.state.tr.setSelection(i)), e.commands.focus();
|
|
3630
3631
|
}
|
|
3631
3632
|
//#endregion
|
|
@@ -3695,7 +3696,7 @@ function Ds(e, { accept: t = "image/*", maxSize: n }) {
|
|
|
3695
3696
|
}
|
|
3696
3697
|
var Os = /\.(avif|bmp|gif|jpe?g|png|svg|webp)$/i, ks = (e) => e.type ? e.type.startsWith("image/") : Os.test(e.name);
|
|
3697
3698
|
function As(e) {
|
|
3698
|
-
let t =
|
|
3699
|
+
let t = ut(e);
|
|
3699
3700
|
return t !== void 0 && !/^(mailto|tel):/i.test(t);
|
|
3700
3701
|
}
|
|
3701
3702
|
function js(e) {
|
|
@@ -3747,7 +3748,7 @@ function Fs(e, t, n, r) {
|
|
|
3747
3748
|
if (!a) return;
|
|
3748
3749
|
let o = _s(e, t), s = a.from;
|
|
3749
3750
|
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 :
|
|
3751
|
+
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 : rt(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
3752
|
s = f.mapping.map(d, 1), e.view.dispatch(f.setMeta($, Cs(t, s)));
|
|
3752
3753
|
} catch {
|
|
3753
3754
|
e.view.dispatch(i.tr.setMeta($, Ss(t)));
|
|
@@ -3801,7 +3802,7 @@ function zs({ previewUrl: e, busy: n }) {
|
|
|
3801
3802
|
}) : /* @__PURE__ */ J(Wt, {
|
|
3802
3803
|
"aria-hidden": "true",
|
|
3803
3804
|
className: "size-5"
|
|
3804
|
-
}), n && /* @__PURE__ */ J(
|
|
3805
|
+
}), n && /* @__PURE__ */ J(Pe, {
|
|
3805
3806
|
"aria-hidden": "true",
|
|
3806
3807
|
"aria-label": void 0,
|
|
3807
3808
|
contained: !0,
|
|
@@ -3845,7 +3846,7 @@ function Vs({ id: e, storage: n, maxSize: r }) {
|
|
|
3845
3846
|
role: "alert",
|
|
3846
3847
|
className: "text-xs text-error-text",
|
|
3847
3848
|
children: Bs(i, o.failure, r)
|
|
3848
|
-
}) : /* @__PURE__ */ J(
|
|
3849
|
+
}) : /* @__PURE__ */ J(y, {
|
|
3849
3850
|
value: o.progress === void 0 ? null : o.progress * 100,
|
|
3850
3851
|
"aria-label": i("material.editor.upload.uploading", "Uploading {name}", { name: s }),
|
|
3851
3852
|
className: "mt-1.5"
|
|
@@ -3864,7 +3865,7 @@ function Vs({ id: e, storage: n, maxSize: r }) {
|
|
|
3864
3865
|
//#endregion
|
|
3865
3866
|
//#region lib/components/ui/widgets/editor/extensions/upload/upload-widget.tsx
|
|
3866
3867
|
function Hs(e, t, n, r) {
|
|
3867
|
-
let i = new
|
|
3868
|
+
let i = new Ye(Vs, {
|
|
3868
3869
|
editor: e,
|
|
3869
3870
|
props: {
|
|
3870
3871
|
id: r,
|
|
@@ -3939,7 +3940,7 @@ function Js(e, t, n, r) {
|
|
|
3939
3940
|
var Ys = class {
|
|
3940
3941
|
options;
|
|
3941
3942
|
entries = /* @__PURE__ */ new Map();
|
|
3942
|
-
listeners =
|
|
3943
|
+
listeners = lt();
|
|
3943
3944
|
counter = 0;
|
|
3944
3945
|
preview;
|
|
3945
3946
|
limit;
|
|
@@ -4108,7 +4109,7 @@ var Qs = /* @__PURE__ */ new WeakMap(), $s = R.create({
|
|
|
4108
4109
|
let { onUpload: t, ...n } = e;
|
|
4109
4110
|
return V(t ? {
|
|
4110
4111
|
name: "upload",
|
|
4111
|
-
extensions: (e) => [...e.has("image") ? [] : [
|
|
4112
|
+
extensions: (e) => [...e.has("image") ? [] : [dt], $s.configure({
|
|
4112
4113
|
...n,
|
|
4113
4114
|
onUpload: t,
|
|
4114
4115
|
translate: e.translate,
|
|
@@ -4119,18 +4120,18 @@ var Qs = /* @__PURE__ */ new WeakMap(), $s = R.create({
|
|
|
4119
4120
|
order: 61,
|
|
4120
4121
|
priority: 30,
|
|
4121
4122
|
kind: "panel",
|
|
4122
|
-
when: (e) => !!
|
|
4123
|
-
render:
|
|
4123
|
+
when: (e) => !!xe(e)?.ownsImage,
|
|
4124
|
+
render: _
|
|
4124
4125
|
}],
|
|
4125
4126
|
bubble: [{
|
|
4126
4127
|
id: "image-alt",
|
|
4127
4128
|
order: 35,
|
|
4128
4129
|
priority: 60,
|
|
4129
4130
|
kind: "panel",
|
|
4130
|
-
when: (e) => !!
|
|
4131
|
+
when: (e) => !!xe(e) && e.isActive("image"),
|
|
4131
4132
|
render: Xo
|
|
4132
4133
|
}],
|
|
4133
|
-
slash:
|
|
4134
|
+
slash: r("image"),
|
|
4134
4135
|
markdown: "native"
|
|
4135
4136
|
} : {
|
|
4136
4137
|
name: "upload",
|
|
@@ -4138,91 +4139,91 @@ var Qs = /* @__PURE__ */ new WeakMap(), $s = R.create({
|
|
|
4138
4139
|
markdown: "native"
|
|
4139
4140
|
});
|
|
4140
4141
|
}, tc = {
|
|
4141
|
-
accordion:
|
|
4142
|
-
actionCard:
|
|
4142
|
+
accordion: c,
|
|
4143
|
+
actionCard: o,
|
|
4143
4144
|
assistant: fo,
|
|
4144
|
-
blocks:
|
|
4145
|
-
callout:
|
|
4146
|
-
checkboxGroup:
|
|
4147
|
-
codeBlock:
|
|
4148
|
-
color:
|
|
4145
|
+
blocks: T,
|
|
4146
|
+
callout: Ne,
|
|
4147
|
+
checkboxGroup: _e,
|
|
4148
|
+
codeBlock: ve,
|
|
4149
|
+
color: ge,
|
|
4149
4150
|
comments: Mo,
|
|
4150
|
-
count:
|
|
4151
|
+
count: me,
|
|
4151
4152
|
dragHandle: Po,
|
|
4152
|
-
emoji:
|
|
4153
|
+
emoji: Te,
|
|
4153
4154
|
find: Bo,
|
|
4154
4155
|
focusMode: Ho,
|
|
4155
|
-
fontFamily:
|
|
4156
|
-
gallery:
|
|
4157
|
-
headings:
|
|
4158
|
-
highlight:
|
|
4159
|
-
image:
|
|
4156
|
+
fontFamily: de,
|
|
4157
|
+
gallery: w,
|
|
4158
|
+
headings: le,
|
|
4159
|
+
highlight: se,
|
|
4160
|
+
image: De,
|
|
4160
4161
|
inlineCode: Wo,
|
|
4161
|
-
link:
|
|
4162
|
-
lists:
|
|
4162
|
+
link: v,
|
|
4163
|
+
lists: d,
|
|
4163
4164
|
markdownPaste: qo,
|
|
4164
|
-
marks:
|
|
4165
|
-
mention:
|
|
4165
|
+
marks: ie,
|
|
4166
|
+
mention: b,
|
|
4166
4167
|
outline: Yo,
|
|
4167
|
-
placeholder:
|
|
4168
|
-
radioGroup:
|
|
4169
|
-
selectCard:
|
|
4170
|
-
selectChip:
|
|
4171
|
-
slash:
|
|
4172
|
-
table:
|
|
4173
|
-
textAlign:
|
|
4168
|
+
placeholder: h,
|
|
4169
|
+
radioGroup: be,
|
|
4170
|
+
selectCard: n,
|
|
4171
|
+
selectChip: Se,
|
|
4172
|
+
slash: S,
|
|
4173
|
+
table: s,
|
|
4174
|
+
textAlign: l,
|
|
4174
4175
|
upload: ec,
|
|
4175
|
-
youtube:
|
|
4176
|
+
youtube: E
|
|
4176
4177
|
}, nc = (...e) => (t) => [...t, ...e], rc = (...e) => (t) => t.filter((t) => !e.includes(t.key ?? t.name)), ic = () => [
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4178
|
+
o(),
|
|
4179
|
+
Se(),
|
|
4180
|
+
n(),
|
|
4181
|
+
_e(),
|
|
4182
|
+
be()
|
|
4182
4183
|
], ac = () => [
|
|
4184
|
+
Ne(),
|
|
4185
|
+
c(),
|
|
4183
4186
|
w(),
|
|
4184
|
-
|
|
4187
|
+
S(),
|
|
4188
|
+
ge(),
|
|
4189
|
+
de(),
|
|
4190
|
+
ie(),
|
|
4191
|
+
le(),
|
|
4192
|
+
T(),
|
|
4193
|
+
v(),
|
|
4194
|
+
se(),
|
|
4195
|
+
l(),
|
|
4196
|
+
h(),
|
|
4185
4197
|
me(),
|
|
4186
|
-
i(),
|
|
4187
|
-
be(),
|
|
4188
|
-
Ae(),
|
|
4189
|
-
D(),
|
|
4190
|
-
n(),
|
|
4191
|
-
Fe(),
|
|
4192
|
-
d(),
|
|
4193
|
-
ee(),
|
|
4194
|
-
y(),
|
|
4195
|
-
C(),
|
|
4196
|
-
b(),
|
|
4197
4198
|
qo(),
|
|
4198
|
-
|
|
4199
|
-
|
|
4199
|
+
d(),
|
|
4200
|
+
De(),
|
|
4200
4201
|
ec(),
|
|
4202
|
+
E(),
|
|
4203
|
+
Te({ suggest: !0 }),
|
|
4201
4204
|
s(),
|
|
4202
|
-
|
|
4203
|
-
ye(),
|
|
4204
|
-
g(),
|
|
4205
|
+
ve(),
|
|
4205
4206
|
Bo(),
|
|
4206
4207
|
Ho(),
|
|
4207
4208
|
Po(),
|
|
4208
4209
|
Mo()
|
|
4209
4210
|
], oc = () => [
|
|
4210
|
-
|
|
4211
|
+
ie({ compact: !0 }),
|
|
4211
4212
|
Wo(),
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4213
|
+
v(),
|
|
4214
|
+
h(),
|
|
4215
|
+
me(),
|
|
4215
4216
|
qo(),
|
|
4216
|
-
|
|
4217
|
+
d(),
|
|
4217
4218
|
ec()
|
|
4218
4219
|
], sc = () => [
|
|
4219
|
-
|
|
4220
|
+
ie({ compact: !0 }),
|
|
4220
4221
|
Wo(),
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4222
|
+
v(),
|
|
4223
|
+
h(),
|
|
4224
|
+
me(),
|
|
4225
|
+
Te({ suggest: !0 }),
|
|
4226
|
+
b()
|
|
4226
4227
|
];
|
|
4227
4228
|
//#endregion
|
|
4228
4229
|
//#region lib/components/ui/widgets/editor/extensions/assistant/use-assistant-feature.ts
|
|
@@ -4240,7 +4241,7 @@ function cc(e, t) {
|
|
|
4240
4241
|
//#endregion
|
|
4241
4242
|
//#region lib/components/ui/widgets/editor/extensions/upload/upload-signal.tsx
|
|
4242
4243
|
function lc({ onChange: e }) {
|
|
4243
|
-
let { handle: t } =
|
|
4244
|
+
let { handle: t } = f(), n = La(t).pending > 0, r = G(e), i = G(!1);
|
|
4244
4245
|
return U(() => {
|
|
4245
4246
|
r.current = e;
|
|
4246
4247
|
}, [e]), U(() => {
|
|
@@ -4277,7 +4278,7 @@ function dc(e, t) {
|
|
|
4277
4278
|
//#endregion
|
|
4278
4279
|
//#region lib/components/ui/widgets/editor/partials/editor-character-count.tsx
|
|
4279
4280
|
function fc({ className: e }) {
|
|
4280
|
-
let { t: n } = M(), { handle: r } =
|
|
4281
|
+
let { t: n } = M(), { handle: r } = f(), i = P({
|
|
4281
4282
|
editor: r.editor,
|
|
4282
4283
|
selector: ({ editor: e }) => {
|
|
4283
4284
|
let t = e?.extensionManager.extensions.find((e) => e.name === "characterCount")?.options.limit;
|
|
@@ -4364,40 +4365,40 @@ function _c({ children: e }) {
|
|
|
4364
4365
|
//#region lib/components/ui/widgets/editor/presets/toolbar-looks.ts
|
|
4365
4366
|
var vc = 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]"), yc = 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)"), bc = 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", vc, yc), xc = t("items-center gap-1 **:data-group-id:gap-1", "[--tb-item:2.25rem] [&_button[data-variant]]:rounded-full [&_[data-toolbar-more]]:rounded-full", vc, yc, "**:data-[group=outline]:@6xl:hidden", "**:data-[group=comments]:@5xl:hidden"), Sc = t(bc, "**:data-[group=outline]:@6xl:hidden", "**:data-[group=comments]:@5xl:hidden"), Cc = t(bc, "**:data-[group=outline]:@4xl:hidden", "**:data-[group=comments]:@5xl:hidden"), wc = 56;
|
|
4366
4367
|
function Tc({ toolbar: e, bar: n, panels: r, footer: i, outline: a, comments: o, presence: s, outlineSide: c = "start", className: l, children: u }) {
|
|
4367
|
-
let { chrome: d, handle:
|
|
4368
|
+
let { chrome: d, handle: p, look: m } = f(), h = p.features.some((e) => e.key === "dragHandle"), g = d.state.focusMode, _ = G(null), v = pc(_, wc), y = a && !g && v, b = pc(_, 64), x = o && !g && b;
|
|
4368
4369
|
return /* @__PURE__ */ Y("div", {
|
|
4369
|
-
ref:
|
|
4370
|
+
ref: _,
|
|
4370
4371
|
"data-slot": "document-editor",
|
|
4371
|
-
"data-look":
|
|
4372
|
+
"data-look": m,
|
|
4372
4373
|
"data-layout": "docked",
|
|
4373
|
-
className: hc(
|
|
4374
|
+
className: hc(m, !!n, l),
|
|
4374
4375
|
children: [
|
|
4375
4376
|
/* @__PURE__ */ J(gc, {
|
|
4376
4377
|
presence: s,
|
|
4377
4378
|
panels: r,
|
|
4378
|
-
children: !
|
|
4379
|
+
children: !g && e
|
|
4379
4380
|
}),
|
|
4380
4381
|
/* @__PURE__ */ J(va, { className: "absolute end-3 top-3 z-20" }),
|
|
4381
|
-
!
|
|
4382
|
+
!g && n,
|
|
4382
4383
|
/* @__PURE__ */ Y("div", {
|
|
4383
4384
|
className: "flex",
|
|
4384
4385
|
children: [
|
|
4385
|
-
|
|
4386
|
+
y && c === "start" && /* @__PURE__ */ J(mc, {
|
|
4386
4387
|
side: "start",
|
|
4387
4388
|
children: a
|
|
4388
4389
|
}),
|
|
4389
4390
|
/* @__PURE__ */ J("div", {
|
|
4390
|
-
className: t("min-w-0 flex-1 px-5 py-6 @xl:px-10 @xl:py-10",
|
|
4391
|
+
className: t("min-w-0 flex-1 px-5 py-6 @xl:px-10 @xl:py-10", h && "@xl:pointer-fine:ps-16"),
|
|
4391
4392
|
children: /* @__PURE__ */ J("div", {
|
|
4392
4393
|
className: "mx-auto w-full max-w-[680px]",
|
|
4393
4394
|
children: u
|
|
4394
4395
|
})
|
|
4395
4396
|
}),
|
|
4396
|
-
|
|
4397
|
+
y && c === "end" && /* @__PURE__ */ J(mc, {
|
|
4397
4398
|
side: "end",
|
|
4398
4399
|
children: a
|
|
4399
4400
|
}),
|
|
4400
|
-
|
|
4401
|
+
x && /* @__PURE__ */ J(_c, { children: o })
|
|
4401
4402
|
]
|
|
4402
4403
|
}),
|
|
4403
4404
|
i && /* @__PURE__ */ J("div", {
|
|
@@ -4435,7 +4436,7 @@ function Ic({ look: e }) {
|
|
|
4435
4436
|
"data-slot": "compact-editor-toolbar",
|
|
4436
4437
|
"data-look": e,
|
|
4437
4438
|
className: Fc(e),
|
|
4438
|
-
children: /* @__PURE__ */ J(
|
|
4439
|
+
children: /* @__PURE__ */ J(D, {
|
|
4439
4440
|
dividers: !1,
|
|
4440
4441
|
density: "compact",
|
|
4441
4442
|
className: Mc(e, Cc)
|
|
@@ -4456,7 +4457,7 @@ function Lc({ actions: e }) {
|
|
|
4456
4457
|
//#endregion
|
|
4457
4458
|
//#region lib/components/ui/widgets/editor/presets/preset-features.ts
|
|
4458
4459
|
var Rc = (e) => (t) => {
|
|
4459
|
-
let { features: n, mentions: r, outline: i, extra: a } = e, o = (typeof n == "function" ? n(t) : n) ?? (r ? [...t,
|
|
4460
|
+
let { features: n, mentions: r, outline: i, extra: a } = e, o = (typeof n == "function" ? n(t) : n) ?? (r ? [...t, b()] : t);
|
|
4460
4461
|
return [...i && !o.some((e) => e.key === "outline") ? [...o, Yo()] : o, ...a.filter((e) => !!e)];
|
|
4461
4462
|
}, zc = [
|
|
4462
4463
|
"min-h-[1lh]",
|
|
@@ -4510,24 +4511,24 @@ function Wc(e = 2, t = 8) {
|
|
|
4510
4511
|
}
|
|
4511
4512
|
//#endregion
|
|
4512
4513
|
//#region lib/components/ui/widgets/editor/presets/compact-editor.tsx
|
|
4513
|
-
function Gc({ features: e, minRows: n = 2, maxRows: r = 8, toolbar:
|
|
4514
|
-
let { t: x } = M(),
|
|
4515
|
-
return /* @__PURE__ */ Y(
|
|
4514
|
+
function Gc({ features: e, minRows: n = 2, maxRows: r = 8, toolbar: o = !0, look: s = "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 }) {
|
|
4515
|
+
let { t: x } = M(), S = W(oc, []), ee = uc(l, u), C = cc(f, p), w = !!c || !!b.characterLimit;
|
|
4516
|
+
return /* @__PURE__ */ Y(i, {
|
|
4516
4517
|
...b,
|
|
4517
|
-
look:
|
|
4518
|
+
look: s,
|
|
4518
4519
|
features: Rc({
|
|
4519
4520
|
features: e,
|
|
4520
4521
|
mentions: b.mentions,
|
|
4521
|
-
extra: [
|
|
4522
|
+
extra: [ee, C]
|
|
4522
4523
|
}),
|
|
4523
|
-
defaults:
|
|
4524
|
+
defaults: S,
|
|
4524
4525
|
attributes: {
|
|
4525
4526
|
class: t("nxgt-prose text-[0.9375rem] leading-relaxed focus:outline-none", Wc(n, r)),
|
|
4526
4527
|
"aria-label": x("material.editor.comment", "Comment"),
|
|
4527
4528
|
...y
|
|
4528
4529
|
},
|
|
4529
4530
|
children: [
|
|
4530
|
-
/* @__PURE__ */ J(
|
|
4531
|
+
/* @__PURE__ */ J(te, {
|
|
4531
4532
|
label: m,
|
|
4532
4533
|
helperText: h,
|
|
4533
4534
|
error: g,
|
|
@@ -4536,18 +4537,18 @@ function Gc({ features: e, minRows: n = 2, maxRows: r = 8, toolbar: i = !0, look
|
|
|
4536
4537
|
children: /* @__PURE__ */ Y("div", {
|
|
4537
4538
|
"data-slot": "compact-editor",
|
|
4538
4539
|
"data-invalid": g || void 0,
|
|
4539
|
-
"data-look":
|
|
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(
|
|
4540
|
+
"data-look": s,
|
|
4541
|
+
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(s, g)),
|
|
4541
4542
|
children: [
|
|
4542
|
-
|
|
4543
|
-
/* @__PURE__ */ J(
|
|
4544
|
-
w && /* @__PURE__ */ J(Lc, { actions:
|
|
4543
|
+
o && /* @__PURE__ */ J(Ic, { look: s }),
|
|
4544
|
+
/* @__PURE__ */ J(a, { className: "px-3 py-2.5" }),
|
|
4545
|
+
w && /* @__PURE__ */ J(Lc, { actions: c })
|
|
4545
4546
|
]
|
|
4546
4547
|
})
|
|
4547
4548
|
}),
|
|
4548
4549
|
l && /* @__PURE__ */ J(lc, { onChange: d }),
|
|
4549
|
-
/* @__PURE__ */ J(
|
|
4550
|
-
/* @__PURE__ */ J(
|
|
4550
|
+
/* @__PURE__ */ J(O, {}),
|
|
4551
|
+
/* @__PURE__ */ J(Me, {}),
|
|
4551
4552
|
/* @__PURE__ */ J(or, {})
|
|
4552
4553
|
]
|
|
4553
4554
|
});
|
|
@@ -4555,16 +4556,16 @@ function Gc({ features: e, minRows: n = 2, maxRows: r = 8, toolbar: i = !0, look
|
|
|
4555
4556
|
//#endregion
|
|
4556
4557
|
//#region lib/components/ui/widgets/editor/presets/compact-editor-form-field.tsx
|
|
4557
4558
|
function Kc({ control: e, name: n, ...r }) {
|
|
4558
|
-
return /* @__PURE__ */ J(
|
|
4559
|
+
return /* @__PURE__ */ J(ft, {
|
|
4559
4560
|
control: e,
|
|
4560
4561
|
name: n,
|
|
4561
|
-
render: ({ field: e, fieldState: n }) => /* @__PURE__ */ J(
|
|
4562
|
+
render: ({ field: e, fieldState: n }) => /* @__PURE__ */ J(pt, {
|
|
4562
4563
|
onBlur: e.onBlur,
|
|
4563
4564
|
focusRef: e.ref,
|
|
4564
4565
|
children: /* @__PURE__ */ J(Gc, {
|
|
4565
4566
|
...r,
|
|
4566
4567
|
className: t(r.className, e.disabled && "nxgt-editor-disabled"),
|
|
4567
|
-
value: e.value ??
|
|
4568
|
+
value: e.value ?? re(r.format ?? "html"),
|
|
4568
4569
|
onChange: (t) => e.onChange(t),
|
|
4569
4570
|
editable: (r.editable ?? !0) && !e.disabled,
|
|
4570
4571
|
error: n.invalid,
|
|
@@ -4577,7 +4578,7 @@ function Kc({ control: e, name: n, ...r }) {
|
|
|
4577
4578
|
//#region lib/components/ui/widgets/editor/partials/page-mode-switch.tsx
|
|
4578
4579
|
function qc({ value: e, onChange: t }) {
|
|
4579
4580
|
let { t: n } = M();
|
|
4580
|
-
return /* @__PURE__ */ Y(
|
|
4581
|
+
return /* @__PURE__ */ Y(Ze, {
|
|
4581
4582
|
type: "single",
|
|
4582
4583
|
variant: "segmented",
|
|
4583
4584
|
size: "sm",
|
|
@@ -4586,15 +4587,15 @@ function qc({ value: e, onChange: t }) {
|
|
|
4586
4587
|
"aria-label": n("material.editor.page.mode", "View"),
|
|
4587
4588
|
"data-slot": "editor-page-mode",
|
|
4588
4589
|
children: [
|
|
4589
|
-
/* @__PURE__ */ J(
|
|
4590
|
+
/* @__PURE__ */ J(Xe, {
|
|
4590
4591
|
value: "write",
|
|
4591
4592
|
children: n("material.editor.page.write", "Write")
|
|
4592
4593
|
}),
|
|
4593
|
-
/* @__PURE__ */ J(
|
|
4594
|
+
/* @__PURE__ */ J(Xe, {
|
|
4594
4595
|
value: "preview",
|
|
4595
4596
|
children: n("material.editor.page.preview", "Preview")
|
|
4596
4597
|
}),
|
|
4597
|
-
/* @__PURE__ */ J(
|
|
4598
|
+
/* @__PURE__ */ J(Xe, {
|
|
4598
4599
|
value: "markdown",
|
|
4599
4600
|
children: n("material.editor.page.markdown", "Markdown")
|
|
4600
4601
|
})
|
|
@@ -4605,7 +4606,7 @@ function qc({ value: e, onChange: t }) {
|
|
|
4605
4606
|
//#region lib/components/ui/widgets/editor/partials/page-mode-views.tsx
|
|
4606
4607
|
var Jc = Dt(() => import("./rich-text-viewer-CXJp584B.js").then((e) => e.n).then((e) => ({ default: e.RichTextViewer })));
|
|
4607
4608
|
function Yc() {
|
|
4608
|
-
let { handle: e } =
|
|
4609
|
+
let { handle: e } = f(), { editor: t } = e, n = P({
|
|
4609
4610
|
editor: t,
|
|
4610
4611
|
selector: (e) => e.editor?.state.doc ?? null,
|
|
4611
4612
|
equalityFn: (e, t) => e === t
|
|
@@ -4624,7 +4625,7 @@ function Xc({ children: e }) {
|
|
|
4624
4625
|
});
|
|
4625
4626
|
}
|
|
4626
4627
|
function Zc({ json: e, components: t }) {
|
|
4627
|
-
let { t: n } = M(), { look: r } =
|
|
4628
|
+
let { t: n } = M(), { look: r } = f(), i = n("material.editor.page.empty", "Nothing to show yet.");
|
|
4628
4629
|
return e ? /* @__PURE__ */ J(Et, {
|
|
4629
4630
|
fallback: /* @__PURE__ */ J(Xc, { children: n("material.editor.page.loading", "Loading…") }),
|
|
4630
4631
|
children: /* @__PURE__ */ J(Jc, {
|
|
@@ -4636,7 +4637,7 @@ function Zc({ json: e, components: t }) {
|
|
|
4636
4637
|
}) : /* @__PURE__ */ J(Xc, { children: i });
|
|
4637
4638
|
}
|
|
4638
4639
|
function Qc({ json: e }) {
|
|
4639
|
-
let { t } = M(), { handle: n } =
|
|
4640
|
+
let { t } = M(), { handle: n } = f(), [r, i] = K(null), a = n.editor?.extensionManager.extensions;
|
|
4640
4641
|
return U(() => {
|
|
4641
4642
|
let t = !0;
|
|
4642
4643
|
if (!e) {
|
|
@@ -4751,26 +4752,26 @@ function sl({ children: e }) {
|
|
|
4751
4752
|
children: e
|
|
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:
|
|
4755
|
-
let { chrome:
|
|
4755
|
+
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: p, children: m }) {
|
|
4756
|
+
let { chrome: h, handle: g, look: _ } = f(), v = _ === "expressive", y = g.features.some((e) => e.key === "dragHandle"), b = h.state.focusMode, x = G(null), [S, ee] = K("write"), C = S === "write", w = pc(x, 64), te = pc(x, 72), T = C && !b, E = T && w && r, ne = !!(n && T && !E), re = c && T && te, ie = l && T && w;
|
|
4756
4757
|
return /* @__PURE__ */ Y("div", {
|
|
4757
|
-
ref:
|
|
4758
|
+
ref: x,
|
|
4758
4759
|
"data-slot": "document-editor",
|
|
4759
|
-
"data-look":
|
|
4760
|
+
"data-look": _,
|
|
4760
4761
|
"data-layout": "page",
|
|
4761
|
-
"data-mode":
|
|
4762
|
-
className: t(el(
|
|
4762
|
+
"data-mode": S,
|
|
4763
|
+
className: t(el(v, ne), p),
|
|
4763
4764
|
children: [
|
|
4764
4765
|
/* @__PURE__ */ J(nl, {
|
|
4765
|
-
mode:
|
|
4766
|
+
mode: S,
|
|
4766
4767
|
onModeChange: ee,
|
|
4767
|
-
showSwitch: !
|
|
4768
|
+
showSwitch: !b,
|
|
4768
4769
|
presence: u,
|
|
4769
|
-
panels:
|
|
4770
|
+
panels: C && o,
|
|
4770
4771
|
children: T && !E && e
|
|
4771
4772
|
}),
|
|
4772
4773
|
/* @__PURE__ */ J(va, { className: "absolute end-3 top-3 z-20" }),
|
|
4773
|
-
|
|
4774
|
+
ne && n,
|
|
4774
4775
|
/* @__PURE__ */ Y("div", {
|
|
4775
4776
|
className: "flex items-start gap-4 px-2 pb-6 @2xl:gap-6 @2xl:px-6",
|
|
4776
4777
|
children: [
|
|
@@ -4778,29 +4779,29 @@ function cl({ toolbar: e, bar: n, rail: r, railFab: i, previewComponents: a, pan
|
|
|
4778
4779
|
fab: i,
|
|
4779
4780
|
children: r
|
|
4780
4781
|
}),
|
|
4781
|
-
|
|
4782
|
+
re && d === "start" && /* @__PURE__ */ J(ol, {
|
|
4782
4783
|
side: "start",
|
|
4783
4784
|
children: c
|
|
4784
4785
|
}),
|
|
4785
4786
|
/* @__PURE__ */ J("div", {
|
|
4786
4787
|
className: "min-w-0 flex-1",
|
|
4787
4788
|
children: /* @__PURE__ */ J(rl, {
|
|
4788
|
-
expressive:
|
|
4789
|
-
handleGutter:
|
|
4790
|
-
mode:
|
|
4789
|
+
expressive: v,
|
|
4790
|
+
handleGutter: y,
|
|
4791
|
+
mode: S,
|
|
4791
4792
|
previewComponents: a,
|
|
4792
|
-
children:
|
|
4793
|
+
children: m
|
|
4793
4794
|
})
|
|
4794
4795
|
}),
|
|
4795
|
-
|
|
4796
|
+
re && d === "end" && /* @__PURE__ */ J(ol, {
|
|
4796
4797
|
side: "end",
|
|
4797
4798
|
children: c
|
|
4798
4799
|
}),
|
|
4799
|
-
|
|
4800
|
+
ie && /* @__PURE__ */ J(sl, { children: l })
|
|
4800
4801
|
]
|
|
4801
4802
|
}),
|
|
4802
4803
|
s && /* @__PURE__ */ J(il, {
|
|
4803
|
-
floating:
|
|
4804
|
+
floating: ne,
|
|
4804
4805
|
children: s
|
|
4805
4806
|
})
|
|
4806
4807
|
]
|
|
@@ -4830,7 +4831,7 @@ var ll = {
|
|
|
4830
4831
|
history: 50
|
|
4831
4832
|
};
|
|
4832
4833
|
function dl(e) {
|
|
4833
|
-
return e.some((e) => e.name === "slash") ?
|
|
4834
|
+
return e.some((e) => e.name === "slash") ? ee(e.flatMap((e) => e.slash ?? [])) : [];
|
|
4834
4835
|
}
|
|
4835
4836
|
function fl(e, t) {
|
|
4836
4837
|
let n = new Set(t.map((e) => e.id));
|
|
@@ -4840,14 +4841,14 @@ function fl(e, t) {
|
|
|
4840
4841
|
});
|
|
4841
4842
|
}
|
|
4842
4843
|
function pl(e, t) {
|
|
4843
|
-
return fl(e, t).flatMap((e) => e.id === "marks" && e.render ===
|
|
4844
|
+
return fl(e, t).flatMap((e) => e.id === "marks" && e.render === p ? [{
|
|
4844
4845
|
...e,
|
|
4845
|
-
render:
|
|
4846
|
+
render: oe
|
|
4846
4847
|
}, {
|
|
4847
4848
|
...e,
|
|
4848
4849
|
id: "marks-extra",
|
|
4849
4850
|
order: e.order + .5,
|
|
4850
|
-
render:
|
|
4851
|
+
render: ne
|
|
4851
4852
|
}] : [e]).map((e) => ({
|
|
4852
4853
|
...e,
|
|
4853
4854
|
priority: ul[e.id] ?? e.priority
|
|
@@ -4856,25 +4857,25 @@ function pl(e, t) {
|
|
|
4856
4857
|
//#endregion
|
|
4857
4858
|
//#region lib/components/ui/widgets/editor/partials/use-toolbar-shown.ts
|
|
4858
4859
|
function ml() {
|
|
4859
|
-
let { handle: e, chrome: t } =
|
|
4860
|
+
let { handle: e, chrome: t } = f();
|
|
4860
4861
|
return !!P({
|
|
4861
4862
|
editor: e.editor,
|
|
4862
|
-
selector: (e) => !!(e.editor?.isEditable &&
|
|
4863
|
+
selector: (e) => !!(e.editor?.isEditable && ae.selectShowToolbar(t.state))
|
|
4863
4864
|
});
|
|
4864
4865
|
}
|
|
4865
4866
|
//#endregion
|
|
4866
4867
|
//#region lib/components/ui/widgets/editor/partials/editor-insert-fab.tsx
|
|
4867
4868
|
function hl() {
|
|
4868
|
-
let { t: e } = M(), { handle: t } =
|
|
4869
|
-
return !n || !
|
|
4869
|
+
let { t: e } = M(), { handle: t } = f(), { editor: n, features: r } = t, i = G(!1), a = W(() => Ce(dl(r), "", e), [r, e]), o = ml();
|
|
4870
|
+
return !n || !o || a.length === 0 ? null : /* @__PURE__ */ J(g, {
|
|
4870
4871
|
"data-slot": "editor-insert-fab",
|
|
4871
4872
|
label: e("material.editor.insert", "Insert"),
|
|
4872
|
-
items:
|
|
4873
|
+
items: a.map((e) => ({
|
|
4873
4874
|
id: e.id,
|
|
4874
4875
|
icon: /* @__PURE__ */ J(e.icon, {}),
|
|
4875
4876
|
label: e.title,
|
|
4876
4877
|
onSelect: () => {
|
|
4877
|
-
|
|
4878
|
+
i.current = !0;
|
|
4878
4879
|
let t = n.state.selection.from;
|
|
4879
4880
|
e.run({
|
|
4880
4881
|
editor: n,
|
|
@@ -4886,18 +4887,18 @@ function hl() {
|
|
|
4886
4887
|
}
|
|
4887
4888
|
})),
|
|
4888
4889
|
onCloseAutoFocus: (e) => {
|
|
4889
|
-
|
|
4890
|
+
i.current && (i.current = !1, e.preventDefault(), n.isDestroyed || n.commands.focus());
|
|
4890
4891
|
}
|
|
4891
4892
|
});
|
|
4892
4893
|
}
|
|
4893
4894
|
//#endregion
|
|
4894
4895
|
//#region lib/components/ui/widgets/editor/partials/editor-floating-bar.tsx
|
|
4895
4896
|
function gl({ className: e }) {
|
|
4896
|
-
let { handle: t } =
|
|
4897
|
+
let { handle: t } = f(), n = W(() => dl(t.features), [t.features]), r = H((e) => pl(e, n), [n]);
|
|
4897
4898
|
return ml() ? /* @__PURE__ */ J("div", {
|
|
4898
4899
|
"data-slot": "editor-floating-bar",
|
|
4899
4900
|
className: "nxgt-editor-bar",
|
|
4900
|
-
children: /* @__PURE__ */ Y(
|
|
4901
|
+
children: /* @__PURE__ */ Y(C, { children: [/* @__PURE__ */ J(D, {
|
|
4901
4902
|
variant: "floating",
|
|
4902
4903
|
dividers: !1,
|
|
4903
4904
|
className: e,
|
|
@@ -4908,8 +4909,8 @@ function gl({ className: e }) {
|
|
|
4908
4909
|
//#endregion
|
|
4909
4910
|
//#region lib/components/ui/widgets/editor/partials/editor-rail-toolbar.tsx
|
|
4910
4911
|
function _l({ floating: e, className: t }) {
|
|
4911
|
-
let { handle: n } =
|
|
4912
|
-
return /* @__PURE__ */ J(
|
|
4912
|
+
let { handle: n } = f(), r = W(() => e ? dl(n.features) : [], [e, n.features]), i = H((e) => fl(e, r), [r]);
|
|
4913
|
+
return /* @__PURE__ */ J(D, {
|
|
4913
4914
|
orientation: "vertical",
|
|
4914
4915
|
variant: e ? "floating" : void 0,
|
|
4915
4916
|
className: t,
|
|
@@ -4921,7 +4922,7 @@ function _l({ floating: e, className: t }) {
|
|
|
4921
4922
|
function vl({ look: e, layout: t, previewComponents: n, outline: r, comments: i, collaboration: a, collaborationStatus: o, footer: s, status: c, actions: l }) {
|
|
4922
4923
|
let u = t === "page", d = Nc(e), f = e === "expressive";
|
|
4923
4924
|
return {
|
|
4924
|
-
toolbar: f ? void 0 : /* @__PURE__ */ J(
|
|
4925
|
+
toolbar: f ? void 0 : /* @__PURE__ */ J(D, {
|
|
4925
4926
|
dividers: !1,
|
|
4926
4927
|
className: u ? d.docked : Mc(e, Cc)
|
|
4927
4928
|
}),
|
|
@@ -4948,13 +4949,13 @@ function vl({ look: e, layout: t, previewComponents: n, outline: r, comments: i,
|
|
|
4948
4949
|
function yl(e) {
|
|
4949
4950
|
return /* @__PURE__ */ J(e.layout === "page" ? cl : Tc, {
|
|
4950
4951
|
...vl(e),
|
|
4951
|
-
children: /* @__PURE__ */ J(Ui, { children: /* @__PURE__ */ J(
|
|
4952
|
+
children: /* @__PURE__ */ J(Ui, { children: /* @__PURE__ */ J(a, {}) })
|
|
4952
4953
|
});
|
|
4953
4954
|
}
|
|
4954
4955
|
//#endregion
|
|
4955
4956
|
//#region lib/components/ui/widgets/editor/extensions/comments/comments-adapter-sync.tsx
|
|
4956
4957
|
function bl({ adapter: e }) {
|
|
4957
|
-
let { handle: t } =
|
|
4958
|
+
let { handle: t } = f(), n = Sr(t.editor);
|
|
4958
4959
|
return U(() => n?.checkAdapter(), [n, e]), null;
|
|
4959
4960
|
}
|
|
4960
4961
|
//#endregion
|
|
@@ -4962,8 +4963,8 @@ function bl({ adapter: e }) {
|
|
|
4962
4963
|
function xl({ onUpload: e, onUploadingChange: t, withComments: n, commentsAdapter: r }) {
|
|
4963
4964
|
return /* @__PURE__ */ Y(q, { children: [
|
|
4964
4965
|
e && /* @__PURE__ */ J(lc, { onChange: t }),
|
|
4965
|
-
/* @__PURE__ */ J(
|
|
4966
|
-
/* @__PURE__ */ J(
|
|
4966
|
+
/* @__PURE__ */ J(O, {}),
|
|
4967
|
+
/* @__PURE__ */ J(Me, {}),
|
|
4967
4968
|
/* @__PURE__ */ J(or, {}),
|
|
4968
4969
|
/* @__PURE__ */ J(vi, {}),
|
|
4969
4970
|
/* @__PURE__ */ J(Er, {}),
|
|
@@ -5017,66 +5018,66 @@ function Cl({ features: e, mentions: t, outline: n, onUpload: r, uploadOptions:
|
|
|
5017
5018
|
}
|
|
5018
5019
|
//#endregion
|
|
5019
5020
|
//#region lib/components/ui/widgets/editor/presets/document-editor.tsx
|
|
5020
|
-
function wl({ features: e, layout: n = "docked", look: r = "expressive", previewComponents:
|
|
5021
|
-
let { defaults:
|
|
5021
|
+
function wl({ features: e, layout: n = "docked", look: r = "expressive", previewComponents: a, status: o, actions: s, footer: c = !0, outline: l = !1, onUpload: u, uploadOptions: d, onUploadingChange: f, onAssist: p, assistOptions: m, comments: h, collaboration: g, collaborationStatus: _, label: v, helperText: y, error: b, required: x, className: S, attributes: ee, ...C }) {
|
|
5022
|
+
let { defaults: w, commentsFeature: T, editorFeatures: E } = Cl({
|
|
5022
5023
|
features: e,
|
|
5023
|
-
mentions:
|
|
5024
|
-
outline:
|
|
5025
|
-
onUpload:
|
|
5026
|
-
uploadOptions:
|
|
5027
|
-
onAssist:
|
|
5028
|
-
assistOptions:
|
|
5029
|
-
comments:
|
|
5030
|
-
collaboration:
|
|
5024
|
+
mentions: C.mentions,
|
|
5025
|
+
outline: l,
|
|
5026
|
+
onUpload: u,
|
|
5027
|
+
uploadOptions: d,
|
|
5028
|
+
onAssist: p,
|
|
5029
|
+
assistOptions: m,
|
|
5030
|
+
comments: h,
|
|
5031
|
+
collaboration: g
|
|
5031
5032
|
});
|
|
5032
|
-
return /* @__PURE__ */ Y(
|
|
5033
|
-
...
|
|
5033
|
+
return /* @__PURE__ */ Y(i, {
|
|
5034
|
+
...C,
|
|
5034
5035
|
look: r,
|
|
5035
|
-
features:
|
|
5036
|
-
defaults:
|
|
5036
|
+
features: E,
|
|
5037
|
+
defaults: w,
|
|
5037
5038
|
attributes: {
|
|
5038
5039
|
class: t("nxgt-prose min-h-64 focus:outline-none"),
|
|
5039
5040
|
...ee
|
|
5040
5041
|
},
|
|
5041
|
-
children: [/* @__PURE__ */ J(
|
|
5042
|
-
label:
|
|
5043
|
-
helperText:
|
|
5044
|
-
error:
|
|
5045
|
-
required:
|
|
5046
|
-
className:
|
|
5042
|
+
children: [/* @__PURE__ */ J(te, {
|
|
5043
|
+
label: v,
|
|
5044
|
+
helperText: y,
|
|
5045
|
+
error: b,
|
|
5046
|
+
required: x,
|
|
5047
|
+
className: S,
|
|
5047
5048
|
children: /* @__PURE__ */ J(yl, {
|
|
5048
5049
|
layout: n,
|
|
5049
5050
|
look: r,
|
|
5050
|
-
previewComponents:
|
|
5051
|
-
outline:
|
|
5052
|
-
comments: !!
|
|
5053
|
-
collaboration: !!
|
|
5054
|
-
collaborationStatus:
|
|
5055
|
-
footer:
|
|
5056
|
-
status:
|
|
5057
|
-
actions:
|
|
5051
|
+
previewComponents: a,
|
|
5052
|
+
outline: l,
|
|
5053
|
+
comments: !!T,
|
|
5054
|
+
collaboration: !!g,
|
|
5055
|
+
collaborationStatus: _,
|
|
5056
|
+
footer: c,
|
|
5057
|
+
status: o,
|
|
5058
|
+
actions: s
|
|
5058
5059
|
})
|
|
5059
5060
|
}), /* @__PURE__ */ J(xl, {
|
|
5060
|
-
onUpload:
|
|
5061
|
-
onUploadingChange:
|
|
5062
|
-
commentsAdapter:
|
|
5063
|
-
withComments: !!
|
|
5061
|
+
onUpload: u,
|
|
5062
|
+
onUploadingChange: f,
|
|
5063
|
+
commentsAdapter: T ? h?.adapter : void 0,
|
|
5064
|
+
withComments: !!T
|
|
5064
5065
|
})]
|
|
5065
5066
|
});
|
|
5066
5067
|
}
|
|
5067
5068
|
//#endregion
|
|
5068
5069
|
//#region lib/components/ui/widgets/editor/presets/document-editor-form-field.tsx
|
|
5069
5070
|
function Tl({ control: e, name: n, ...r }) {
|
|
5070
|
-
return /* @__PURE__ */ J(
|
|
5071
|
+
return /* @__PURE__ */ J(ft, {
|
|
5071
5072
|
control: e,
|
|
5072
5073
|
name: n,
|
|
5073
|
-
render: ({ field: e, fieldState: n }) => /* @__PURE__ */ J(
|
|
5074
|
+
render: ({ field: e, fieldState: n }) => /* @__PURE__ */ J(pt, {
|
|
5074
5075
|
onBlur: e.onBlur,
|
|
5075
5076
|
focusRef: e.ref,
|
|
5076
5077
|
children: /* @__PURE__ */ J(wl, {
|
|
5077
5078
|
...r,
|
|
5078
5079
|
className: t(r.className, e.disabled && "nxgt-editor-disabled"),
|
|
5079
|
-
value: e.value ??
|
|
5080
|
+
value: e.value ?? re(r.format ?? "html"),
|
|
5080
5081
|
onChange: (t) => e.onChange(t),
|
|
5081
5082
|
editable: (r.editable ?? !0) && !e.disabled,
|
|
5082
5083
|
error: n.invalid,
|
|
@@ -5101,12 +5102,12 @@ function Dl({ error: e, replyTo: t, onCancelReply: n, attachments: r, isDisabled
|
|
|
5101
5102
|
}),
|
|
5102
5103
|
t && /* @__PURE__ */ J("div", {
|
|
5103
5104
|
className: "w-full",
|
|
5104
|
-
children: /* @__PURE__ */ J(
|
|
5105
|
+
children: /* @__PURE__ */ J(ue, {
|
|
5105
5106
|
replyTo: t,
|
|
5106
5107
|
onCancel: n
|
|
5107
5108
|
})
|
|
5108
5109
|
}),
|
|
5109
|
-
/* @__PURE__ */ J(
|
|
5110
|
+
/* @__PURE__ */ J(fe, {
|
|
5110
5111
|
attachments: r,
|
|
5111
5112
|
isDisabled: i,
|
|
5112
5113
|
onAttachmentsChange: a,
|
|
@@ -5121,7 +5122,7 @@ function Ol({ id: e, look: t }) {
|
|
|
5121
5122
|
id: e,
|
|
5122
5123
|
"data-slot": "rich-chat-composer-toolbar",
|
|
5123
5124
|
className: "w-full px-1",
|
|
5124
|
-
children: /* @__PURE__ */ J(
|
|
5125
|
+
children: /* @__PURE__ */ J(D, {
|
|
5125
5126
|
dividers: !1,
|
|
5126
5127
|
density: "compact",
|
|
5127
5128
|
className: Mc(t, Cc)
|
|
@@ -5132,14 +5133,14 @@ function Ol({ id: e, look: t }) {
|
|
|
5132
5133
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/partials/send-control.tsx
|
|
5133
5134
|
function kl({ sendLabel: e, stopLabel: t, disabled: n, empty: r, onStop: i, onSchedule: a, squircle: o }) {
|
|
5134
5135
|
let { t: s } = M();
|
|
5135
|
-
return !a || i ? /* @__PURE__ */ J(
|
|
5136
|
+
return !a || i ? /* @__PURE__ */ J(Oe, {
|
|
5136
5137
|
sendLabel: e,
|
|
5137
5138
|
stopLabel: t,
|
|
5138
5139
|
isDisabled: n,
|
|
5139
5140
|
isEmpty: r,
|
|
5140
5141
|
onStop: i,
|
|
5141
5142
|
shape: o ? "squircle" : "round"
|
|
5142
|
-
}) : /* @__PURE__ */ J(
|
|
5143
|
+
}) : /* @__PURE__ */ J(u, {
|
|
5143
5144
|
type: "submit",
|
|
5144
5145
|
disabled: n || r,
|
|
5145
5146
|
menuLabel: s("material.editor.send-options", "Send options"),
|
|
@@ -5153,10 +5154,10 @@ function kl({ sendLabel: e, stopLabel: t, disabled: n, empty: r, onStop: i, onSc
|
|
|
5153
5154
|
//#endregion
|
|
5154
5155
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/partials/send-on-enter.tsx
|
|
5155
5156
|
function Al(e, t) {
|
|
5156
|
-
return e.nativeEvent.keyCode !== 229 &&
|
|
5157
|
+
return e.nativeEvent.keyCode !== 229 && Ae(e, t);
|
|
5157
5158
|
}
|
|
5158
5159
|
function jl({ onSend: e, sendOnEnter: t, disabled: n, onFocus: r, className: i, children: a }) {
|
|
5159
|
-
let { handle: o } =
|
|
5160
|
+
let { handle: o } = f();
|
|
5160
5161
|
return /* @__PURE__ */ J("div", {
|
|
5161
5162
|
"data-slot": "rich-chat-composer-input",
|
|
5162
5163
|
className: i,
|
|
@@ -5170,7 +5171,7 @@ function jl({ onSend: e, sendOnEnter: t, disabled: n, onFocus: r, className: i,
|
|
|
5170
5171
|
//#endregion
|
|
5171
5172
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/partials/format-buttons.tsx
|
|
5172
5173
|
function Ml({ formatOpen: e, toolbarId: t, onFormatToggle: n, mentionable: r }) {
|
|
5173
|
-
let { t: i } = M(), { editor: a } =
|
|
5174
|
+
let { t: i } = M(), { editor: a } = f().handle, o = i("material.editor.formatting-toggle", "Text formatting"), s = i("material.editor.mention", "Mention someone");
|
|
5174
5175
|
return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(N, {
|
|
5175
5176
|
variant: "ghost",
|
|
5176
5177
|
color: "default",
|
|
@@ -5195,13 +5196,13 @@ function Ml({ formatOpen: e, toolbarId: t, onFormatToggle: n, mentionable: r })
|
|
|
5195
5196
|
//#endregion
|
|
5196
5197
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/partials/tools-row.tsx
|
|
5197
5198
|
function Nl({ pill: e, formatOpen: n, toolbarId: r, onFormatToggle: i, mentionable: a, attach: o, actions: s }) {
|
|
5198
|
-
let { handle: c } =
|
|
5199
|
+
let { handle: c } = f(), { editor: l } = c;
|
|
5199
5200
|
return /* @__PURE__ */ Y("div", {
|
|
5200
5201
|
"data-slot": "rich-chat-composer-tools",
|
|
5201
5202
|
className: t("flex min-w-0 items-end gap-1", e ? "order-1" : "flex-1"),
|
|
5202
|
-
children: [/* @__PURE__ */ J(
|
|
5203
|
+
children: [/* @__PURE__ */ J(we, {
|
|
5203
5204
|
...o,
|
|
5204
|
-
actions: /* @__PURE__ */ Y(q, { children: [l?.storage.emoji && /* @__PURE__ */ J(
|
|
5205
|
+
actions: /* @__PURE__ */ Y(q, { children: [l?.storage.emoji && /* @__PURE__ */ J(ke, { editor: l }), !e && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(Ml, {
|
|
5205
5206
|
formatOpen: n,
|
|
5206
5207
|
toolbarId: r,
|
|
5207
5208
|
onFormatToggle: i,
|
|
@@ -5217,7 +5218,7 @@ function Pl({ features: e, minRows: n = 1, maxRows: r = 8, placeholder: i, attri
|
|
|
5217
5218
|
...e,
|
|
5218
5219
|
toolbar: void 0
|
|
5219
5220
|
} : e), []);
|
|
5220
|
-
return
|
|
5221
|
+
return m({
|
|
5221
5222
|
...o,
|
|
5222
5223
|
features: e ?? c,
|
|
5223
5224
|
defaults: c,
|
|
@@ -5312,7 +5313,7 @@ function zl({ handle: e, attachments: t, blocked: n, clear: r, onSend: i, onSche
|
|
|
5312
5313
|
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
5314
|
let [u, d] = K([]), f = c ?? u, p = (e) => {
|
|
5314
5315
|
c === void 0 && d(e), l?.(e);
|
|
5315
|
-
}, m = G(null), h =
|
|
5316
|
+
}, m = G(null), h = ye({
|
|
5316
5317
|
attachments: f,
|
|
5317
5318
|
accept: o,
|
|
5318
5319
|
maxFiles: s,
|
|
@@ -5379,7 +5380,7 @@ function Vl(e) {
|
|
|
5379
5380
|
//#endregion
|
|
5380
5381
|
//#region lib/components/ui/widgets/editor/presets/rich-chat-composer/rich-chat-composer.tsx
|
|
5381
5382
|
function Hl(e) {
|
|
5382
|
-
let { t: n } = M(), { mentions: r, replyTo:
|
|
5383
|
+
let { t: n } = M(), { mentions: r, replyTo: o, onCancelReply: s, 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
5384
|
return /* @__PURE__ */ J("form", {
|
|
5384
5385
|
"data-slot": "rich-chat-composer",
|
|
5385
5386
|
"data-look": p,
|
|
@@ -5392,15 +5393,15 @@ function Hl(e) {
|
|
|
5392
5393
|
editable: h,
|
|
5393
5394
|
className: l
|
|
5394
5395
|
}),
|
|
5395
|
-
children: /* @__PURE__ */ Y(
|
|
5396
|
+
children: /* @__PURE__ */ Y(i, {
|
|
5396
5397
|
editor: m,
|
|
5397
5398
|
className: "contents",
|
|
5398
5399
|
look: p,
|
|
5399
5400
|
children: [
|
|
5400
5401
|
/* @__PURE__ */ J(Dl, {
|
|
5401
5402
|
error: y.errorMessage ?? g.sendError,
|
|
5402
|
-
replyTo:
|
|
5403
|
-
onCancelReply:
|
|
5403
|
+
replyTo: o,
|
|
5404
|
+
onCancelReply: s,
|
|
5404
5405
|
attachments: b,
|
|
5405
5406
|
isDisabled: y.isDisabled,
|
|
5406
5407
|
onAttachmentsChange: g.setAttachments
|
|
@@ -5411,7 +5412,7 @@ function Hl(e) {
|
|
|
5411
5412
|
onSend: () => void g.send(),
|
|
5412
5413
|
sendOnEnter: u,
|
|
5413
5414
|
disabled: !h,
|
|
5414
|
-
children: /* @__PURE__ */ J(
|
|
5415
|
+
children: /* @__PURE__ */ J(a, {})
|
|
5415
5416
|
}),
|
|
5416
5417
|
_.formatOpen && !x && /* @__PURE__ */ J(Ol, {
|
|
5417
5418
|
id: _.toolbarId,
|
|
@@ -5423,7 +5424,7 @@ function Hl(e) {
|
|
|
5423
5424
|
toolbarId: _.toolbarId,
|
|
5424
5425
|
onFormatToggle: _.toggleFormat,
|
|
5425
5426
|
mentionable: !!r?.length,
|
|
5426
|
-
actions:
|
|
5427
|
+
actions: c,
|
|
5427
5428
|
attach: v
|
|
5428
5429
|
}),
|
|
5429
5430
|
/* @__PURE__ */ J("div", {
|
|
@@ -5438,8 +5439,8 @@ function Hl(e) {
|
|
|
5438
5439
|
squircle: p === "expressive"
|
|
5439
5440
|
})
|
|
5440
5441
|
}),
|
|
5441
|
-
/* @__PURE__ */ J(
|
|
5442
|
-
/* @__PURE__ */ J(
|
|
5442
|
+
/* @__PURE__ */ J(O, {}),
|
|
5443
|
+
/* @__PURE__ */ J(Me, {})
|
|
5443
5444
|
]
|
|
5444
5445
|
})
|
|
5445
5446
|
});
|
|
@@ -5447,24 +5448,24 @@ function Hl(e) {
|
|
|
5447
5448
|
//#endregion
|
|
5448
5449
|
//#region lib/components/ui/widgets/editor/index.ts
|
|
5449
5450
|
var Ul = {
|
|
5450
|
-
Root:
|
|
5451
|
-
Content:
|
|
5452
|
-
Toolbar:
|
|
5451
|
+
Root: i,
|
|
5452
|
+
Content: a,
|
|
5453
|
+
Toolbar: D,
|
|
5453
5454
|
Panel: Ar,
|
|
5454
5455
|
AssistantPanel: or,
|
|
5455
|
-
BubbleMenu:
|
|
5456
|
+
BubbleMenu: O,
|
|
5456
5457
|
CommentsRail: Di,
|
|
5457
5458
|
CommentsPanel: vi,
|
|
5458
5459
|
CommentComposer: Er,
|
|
5459
|
-
SuggestionList:
|
|
5460
|
+
SuggestionList: Me,
|
|
5460
5461
|
Footer: wa,
|
|
5461
5462
|
Outline: Ma,
|
|
5462
5463
|
OutlinePanel: Pa,
|
|
5463
5464
|
FindPanel: ha,
|
|
5464
5465
|
BlockHandle: Ui,
|
|
5465
5466
|
FocusExit: va,
|
|
5466
|
-
Field:
|
|
5467
|
+
Field: te,
|
|
5467
5468
|
Presence: mr
|
|
5468
5469
|
};
|
|
5469
5470
|
//#endregion
|
|
5470
|
-
export { Gc as CompactEditor, Kc as CompactEditorFormField, wl as DocumentEditor, Tl as DocumentEditorFormField, Ul as Editor, or as EditorAssistantPanel, Ui as EditorBlockHandle,
|
|
5471
|
+
export { Gc as CompactEditor, Kc as CompactEditorFormField, wl as DocumentEditor, Tl as DocumentEditorFormField, Ul as Editor, or as EditorAssistantPanel, Ui as EditorBlockHandle, O as EditorBubbleMenu, Er as EditorCommentComposer, vi as EditorCommentsPanel, Di as EditorCommentsRail, a as EditorContent, te as EditorField, ha as EditorFindPanel, va as EditorFocusExit, wa as EditorFooter, Ma as EditorOutline, Pa as EditorOutlinePanel, Ar as EditorPanel, mr as EditorPresence, i as EditorRoot, Me as EditorSuggestionList, D as EditorToolbar, Hl as RichChatComposer, sc as chatKit, oc as compactKit, V as defineFeature, ac as documentKit, tc as editorFeatures, ic as formNodesKit, _t as fromMarkdown, Va as looksLikeMarkdown, vt as toHtml, gt as toJson, ht as toMarkdown, m as useEditor, f as useEditorContext, ur as useEditorPresence, xa as useEditorStats, La as useEditorUploads, nc as withFeatures, rc as withoutFeatures };
|