@alfadocs/ui-kit 0.69.0 → 0.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{agenda-card-BxSFkqgY.js → agenda-card-BQ-IKAru.js} +2 -2
- package/dist/_chunks/{agenda-tray-g0kg7HwB.js → agenda-tray-CGXRk58j.js} +2 -2
- package/dist/_chunks/{ai-consent-banner-CXlsNX1c.js → ai-consent-banner-Be-h9mRI.js} +3 -3
- package/dist/_chunks/ai-tools-rail-B5NEghsp.js +511 -0
- package/dist/_chunks/{alert-_mUKLmwA.js → alert-CHYZ96tR.js} +150 -96
- package/dist/_chunks/{anamnesis-card-DRmE24OQ.js → anamnesis-card-DvYCa16e.js} +2 -2
- package/dist/_chunks/anatomy-scheme-CJB6dI6p.js +2445 -0
- package/dist/_chunks/annotation-marker-qt5R9WZX.js +120 -0
- package/dist/_chunks/{antenatal-schedule-timeline-35ebkcZT.js → antenatal-schedule-timeline-CwXrQRm1.js} +2 -2
- package/dist/_chunks/appointment-card-C06aZqA7.js +310 -0
- package/dist/_chunks/appointment-timeline-BJM0S_Fg.js +386 -0
- package/dist/_chunks/appointment-tray-DRRw5ROi.js +193 -0
- package/dist/_chunks/{audio-recorder-DYXXnGug.js → audio-recorder-Cpdk5qpQ.js} +2 -2
- package/dist/_chunks/{badge-CqGsX32l.js → badge-DCOqV9mI.js} +32 -27
- package/dist/_chunks/{bishop-score-PJI3AXzA.js → bishop-score-DnYWtZa_.js} +2 -2
- package/dist/_chunks/{bmi-calculator-BZtIJ53x.js → bmi-calculator-zjeY4E7J.js} +2 -2
- package/dist/_chunks/{booking-C3VqFReX.js → booking-DUBI0oqt.js} +4 -4
- package/dist/_chunks/{care-plan-card-CvFGXa2z.js → care-plan-card-C5sTfY9G.js} +5 -5
- package/dist/_chunks/{care-plan-entry-card-C3E_gClk.js → care-plan-entry-card-CXnxGCWA.js} +5 -5
- package/dist/_chunks/care-plan-header-BUwqDTtz.js +206 -0
- package/dist/_chunks/clinical-note-card-BUvNMNGL.js +436 -0
- package/dist/_chunks/{contact-profile-card-Dramqa9C.js → contact-profile-card-DDPwRFiP.js} +2 -2
- package/dist/_chunks/control-room-rail-Y8ryLYsP.js +229 -0
- package/dist/_chunks/{cycle-calculator-DmRGJNaT.js → cycle-calculator-CCmPwcBl.js} +2 -2
- package/dist/_chunks/{dependent-selector-CG_FOHya.js → dependent-selector-DUV4thxX.js} +2 -2
- package/dist/_chunks/{document-scanner-CTubA0-N.js → document-scanner-C_AxLooF.js} +3 -3
- package/dist/_chunks/{due-date-calculator-BTmsIQqD.js → due-date-calculator-Brdj-euS.js} +3 -3
- package/dist/_chunks/editable-currency-cell-renderer-C9twtALM.js +328 -0
- package/dist/_chunks/email-input-DJ7EXklP.js +397 -0
- package/dist/_chunks/{entity-card-COhmqHly.js → entity-card-9_62gY7l.js} +38 -20
- package/dist/_chunks/entity-summary-BxRjFh_4.js +138 -0
- package/dist/_chunks/{fetal-weight-CRz7KE2D.js → fetal-weight-DNCkyeVo.js} +2 -2
- package/dist/_chunks/field-value-NXYczdpO.js +415 -0
- package/dist/_chunks/{file-upload-5ScQd4fE.js → file-upload-DwZcAK8D.js} +2 -1
- package/dist/_chunks/{freemium-paywall-DZ2mBS3w.js → freemium-paywall-WYlNO7yT.js} +2 -2
- package/dist/_chunks/{gestational-age-calculator-BleUdhbI.js → gestational-age-calculator-CF2ISaYQ.js} +3 -3
- package/dist/_chunks/hash-CysBBS_N.js +17 -0
- package/dist/_chunks/{hcg-doubling-CnjDXX6U.js → hcg-doubling-C7bmuaU3.js} +2 -2
- package/dist/_chunks/{actions-cell-renderer-DrcaxB0w.js → link-cell-renderer-CTXqtXV-.js} +715 -592
- package/dist/_chunks/lock-CKOIn0IK.js +15 -0
- package/dist/_chunks/{marketplace-app-shell-6T9W4Knl.js → marketplace-app-shell-Skhfp6vK.js} +3 -3
- package/dist/_chunks/notes-panel-ay8_lPrA.js +158 -0
- package/dist/_chunks/{notification-card-BiESdm8q.js → notification-card-D2jiKSJJ.js} +27 -23
- package/dist/_chunks/{notification-tray-Btb9oQeZ.js → notification-tray-AEun6DN2.js} +2 -2
- package/dist/_chunks/{operator-hero-CP2Nhupm.js → operator-hero-CR0Rqh4-.js} +3 -3
- package/dist/_chunks/patient-details-Dlhqb5ig.js +675 -0
- package/dist/_chunks/{patient-search-CBC_ySF6.js → patient-search-Be6cLrHR.js} +2 -2
- package/dist/_chunks/patient-summary-card-WySCMwwA.js +437 -0
- package/dist/_chunks/patient-table-CHxf3Oqk.js +1110 -0
- package/dist/_chunks/{payment-form-DvjwYVIT.js → payment-form-CxqIXqw7.js} +2 -2
- package/dist/_chunks/{payment-request-card-DioWKBUq.js → payment-request-card-BcZJwu9z.js} +125 -136
- package/dist/_chunks/{pdf-viewer-D6BPfW2D.js → pdf-viewer-QfebdLOd.js} +192 -214
- package/dist/_chunks/{periodontal-chart-card-BuDEMbHE.js → periodontal-chart-card-hRRJY1NN.js} +2 -2
- package/dist/_chunks/{practice-results-KrTHqZua.js → practice-results-C6qDfxos.js} +3 -3
- package/dist/_chunks/{pregnancy-dating-DORUAOHB.js → pregnancy-dating-CRVWswD-.js} +3 -3
- package/dist/_chunks/{pregnancy-weight-gain-DVz4rr7-.js → pregnancy-weight-gain-BUNpTsH-.js} +2 -2
- package/dist/_chunks/radiograph-panel.agent-CAX-C3g3.js +558 -0
- package/dist/_chunks/{rich-text-editor-BsV7zUdg.js → rich-text-editor-DlCqPixb.js} +410 -394
- package/dist/_chunks/{sign-document-B4DeRhTe.js → sign-document-By6hMOra.js} +2 -2
- package/dist/_chunks/{stepper-accordion-Dki6r9ZE.js → stepper-accordion-DC-H-8v4.js} +38 -48
- package/dist/_chunks/tab-bar-Bv9nGNdO.js +262 -0
- package/dist/_chunks/tooth-scheme-BhQoPNBD.js +2131 -0
- package/dist/_chunks/{transaction-chip-DK84XCBU.js → transaction-chip-CscoQbxF.js} +88 -61
- package/dist/_chunks/use-clamp-overflow-DQE2kwZ9.js +20 -0
- package/dist/_chunks/use-overflow-collapse-BIOzKbni.js +32 -0
- package/dist/_chunks/use-persistent-state-nZwZAnE9.js +24 -0
- package/dist/_chunks/{warning-stack-BsgaEbL8.js → warning-stack--sTrrBDA.js} +86 -101
- package/dist/_chunks/{workflow-map-Bdam9pGp.js → workflow-map-Dy8mLCqF.js} +3 -3
- package/dist/_chunks/zoom-out-CgVtf2Wx.js +29 -0
- package/dist/agent/index.js +5 -4
- package/dist/agent/types.d.ts +19 -2
- package/dist/agent-catalog.json +1253 -86
- package/dist/agent-i18n/en.json +108 -6
- package/dist/components/_shared/entity-card/entity-card.d.ts +6 -0
- package/dist/components/_shared/entity-card/index.d.ts +1 -1
- package/dist/components/_shared/field-value.d.ts +21 -0
- package/dist/components/_shared/field-visibility-cog.d.ts +20 -0
- package/dist/components/_shared/field-visibility.d.ts +36 -0
- package/dist/components/_shared/patient-fields.d.ts +119 -0
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/ai-tools-rail/ai-tools-rail.d.ts +75 -0
- package/dist/components/ai-tools-rail/index.js +1 -1
- package/dist/components/alert/alert.d.ts +5 -0
- package/dist/components/alert/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/anatomy-scheme/anatomy-face-paths.d.ts +15 -0
- package/dist/components/anatomy-scheme/anatomy-muscle-paths.d.ts +20 -0
- package/dist/components/anatomy-scheme/anatomy-scheme-data.d.ts +121 -0
- package/dist/components/anatomy-scheme/anatomy-scheme.agent.d.ts +6 -0
- package/dist/components/anatomy-scheme/anatomy-scheme.d.ts +69 -0
- package/dist/components/anatomy-scheme/index.d.ts +6 -0
- package/dist/components/anatomy-scheme/index.js +17 -0
- package/dist/components/annotation-marker/annotation-marker.d.ts +33 -0
- package/dist/components/annotation-marker/index.d.ts +3 -0
- package/dist/components/annotation-marker/index.js +7 -0
- package/dist/components/appointment-card/appointment-card.d.ts +25 -1
- package/dist/components/appointment-card/index.js +6 -5
- package/dist/components/appointment-timeline/appointment-timeline.agent.d.ts +4 -0
- package/dist/components/appointment-timeline/appointment-timeline.d.ts +66 -0
- package/dist/components/appointment-timeline/index.d.ts +4 -0
- package/dist/components/appointment-timeline/index.js +6 -0
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/badge/badge.d.ts +6 -2
- package/dist/components/badge/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/care-plan-header/care-plan-header.agent.d.ts +4 -0
- package/dist/components/care-plan-header/care-plan-header.d.ts +100 -0
- package/dist/components/care-plan-header/index.d.ts +4 -0
- package/dist/components/care-plan-header/index.js +6 -0
- package/dist/components/clinical-note-card/clinical-note-card.d.ts +21 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/control-room-rail/control-room-context.d.ts +53 -0
- package/dist/components/control-room-rail/control-room-rail.d.ts +35 -0
- package/dist/components/control-room-rail/index.d.ts +5 -0
- package/dist/components/control-room-rail/index.js +9 -0
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/cell-renderers/actions-cell-renderer.d.ts +18 -0
- package/dist/components/data-table/index.d.ts +1 -1
- package/dist/components/data-table/index.js +32 -31
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/email-input/index.js +1 -1
- package/dist/components/entity-summary/entity-summary.d.ts +43 -0
- package/dist/components/entity-summary/index.d.ts +3 -0
- package/dist/components/entity-summary/index.js +5 -0
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/index.d.ts +9 -0
- package/dist/components/notes-panel/index.d.ts +3 -0
- package/dist/components/notes-panel/index.js +5 -0
- package/dist/components/notes-panel/notes-panel.d.ts +64 -0
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/patient-details/index.d.ts +5 -0
- package/dist/components/patient-details/index.js +6 -0
- package/dist/components/patient-details/patient-details.agent.d.ts +4 -0
- package/dist/components/patient-details/patient-details.d.ts +96 -0
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-summary-card/patient-summary-card.d.ts +40 -1
- package/dist/components/patient-table/columns.d.ts +69 -40
- package/dist/components/patient-table/index.d.ts +2 -6
- package/dist/components/patient-table/index.js +8 -9
- package/dist/components/patient-table/patient-table.d.ts +38 -4
- package/dist/components/patient-table/types.d.ts +52 -2
- package/dist/components/patient-table/use-responsive-columns.d.ts +8 -6
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/radiograph-panel/index.d.ts +4 -0
- package/dist/components/radiograph-panel/index.js +7 -0
- package/dist/components/radiograph-panel/radiograph-panel.agent.d.ts +13 -0
- package/dist/components/radiograph-panel/radiograph-panel.d.ts +36 -0
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/stepper-accordion/index.js +1 -1
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tab-bar/tab-bar.d.ts +18 -1
- package/dist/components/tooth-scheme/index.d.ts +2 -2
- package/dist/components/tooth-scheme/index.js +30 -23
- package/dist/components/tooth-scheme/tooth-data.d.ts +112 -1
- package/dist/components/tooth-scheme/tooth-scheme.agent.d.ts +2 -2
- package/dist/components/tooth-scheme/tooth-scheme.d.ts +75 -11
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/components/transaction-chip/transaction-chip.d.ts +2 -2
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/warning-stack/warning-stack.d.ts +10 -7
- package/dist/components/workflow/index.js +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +24 -22
- package/dist/hooks/use-clamp-overflow.d.ts +19 -0
- package/dist/hooks/use-overflow-collapse.d.ts +46 -0
- package/dist/hooks/use-persistent-state.d.ts +7 -1
- package/dist/hooks/use-scroll-overflow.d.ts +36 -0
- package/dist/i18n/locales/ar.d.ts +308 -24
- package/dist/i18n/locales/ar.js +322 -27
- package/dist/i18n/locales/de.d.ts +308 -24
- package/dist/i18n/locales/de.js +322 -27
- package/dist/i18n/locales/el.d.ts +308 -24
- package/dist/i18n/locales/el.js +322 -27
- package/dist/i18n/locales/en.d.ts +309 -32
- package/dist/i18n/locales/en.js +323 -35
- package/dist/i18n/locales/es.d.ts +308 -24
- package/dist/i18n/locales/es.js +322 -27
- package/dist/i18n/locales/fr.d.ts +308 -24
- package/dist/i18n/locales/fr.js +322 -27
- package/dist/i18n/locales/hi.d.ts +308 -24
- package/dist/i18n/locales/hi.js +322 -27
- package/dist/i18n/locales/it.d.ts +308 -24
- package/dist/i18n/locales/it.js +322 -27
- package/dist/i18n/locales/ja.d.ts +308 -24
- package/dist/i18n/locales/ja.js +322 -27
- package/dist/i18n/locales/nl.d.ts +308 -24
- package/dist/i18n/locales/nl.js +322 -27
- package/dist/i18n/locales/pl.d.ts +308 -24
- package/dist/i18n/locales/pl.js +322 -27
- package/dist/i18n/locales/pt.d.ts +308 -24
- package/dist/i18n/locales/pt.js +322 -27
- package/dist/i18n/locales/ro.d.ts +308 -24
- package/dist/i18n/locales/ro.js +322 -27
- package/dist/i18n/locales/ru.d.ts +308 -24
- package/dist/i18n/locales/ru.js +322 -27
- package/dist/i18n/locales/sq.d.ts +308 -24
- package/dist/i18n/locales/sq.js +322 -27
- package/dist/i18n/locales/sv.d.ts +308 -24
- package/dist/i18n/locales/sv.js +322 -27
- package/dist/i18n/locales/tr.d.ts +308 -24
- package/dist/i18n/locales/tr.js +322 -27
- package/dist/i18n/locales/zh.d.ts +308 -24
- package/dist/i18n/locales/zh.js +322 -27
- package/dist/index.js +672 -623
- package/dist/locales/ar.json +311 -27
- package/dist/locales/de.json +311 -27
- package/dist/locales/el.json +311 -27
- package/dist/locales/en.json +311 -27
- package/dist/locales/es.json +311 -27
- package/dist/locales/fr.json +311 -27
- package/dist/locales/hi.json +311 -27
- package/dist/locales/it.json +311 -27
- package/dist/locales/ja.json +311 -27
- package/dist/locales/nl.json +311 -27
- package/dist/locales/pl.json +311 -27
- package/dist/locales/pt.json +311 -27
- package/dist/locales/ro.json +311 -27
- package/dist/locales/ru.json +311 -27
- package/dist/locales/sq.json +311 -27
- package/dist/locales/sv.json +311 -27
- package/dist/locales/tr.json +311 -27
- package/dist/locales/zh.json +311 -27
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +37 -1
- package/dist/_chunks/ai-tools-rail-BA_sqy1A.js +0 -373
- package/dist/_chunks/appointment-tray-CZtvtaH-.js +0 -431
- package/dist/_chunks/clinical-note-card-DqQYf_D4.js +0 -333
- package/dist/_chunks/editable-currency-cell-renderer-kgqp_mIw.js +0 -448
- package/dist/_chunks/email-input-B_Y55f5G.js +0 -396
- package/dist/_chunks/patient-summary-card-B836_fDB.js +0 -435
- package/dist/_chunks/patient-table-CDuosVru.js +0 -889
- package/dist/_chunks/tab-bar-B1ovILzh.js +0 -105
- package/dist/_chunks/tooth-scheme-yBr53cvv.js +0 -1330
- package/dist/_chunks/use-persistent-state-i23OWy6G.js +0 -24
- package/dist/components/patient-table/cell-renderers/contact-cell.d.ts +0 -45
- package/dist/components/patient-table/cell-renderers/patient-identity-cell.d.ts +0 -26
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { jsx as e, jsxs as y, Fragment as De } from "react/jsx-runtime";
|
|
2
|
-
import { useId as de, useState as T, useRef as $, useCallback as C, useEffect as
|
|
3
|
-
import { c as
|
|
2
|
+
import { useId as de, useState as T, useRef as $, useCallback as C, useEffect as W, Fragment as at, forwardRef as Tt, useMemo as et, useImperativeHandle as zt } from "react";
|
|
3
|
+
import { c as je } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as Z } from "react-i18next";
|
|
5
5
|
import { SafeHtml as Mt, sanitiseHtml as _t } from "../safe-html/index.js";
|
|
6
6
|
import { u as Rt } from "./registry-DvAUVLHh.js";
|
|
7
|
-
import { S as
|
|
8
|
-
import { I as
|
|
7
|
+
import { S as it } from "./spinner-hbwuKwMf.js";
|
|
8
|
+
import { I as B } from "./icon-button-LqoiKcUN.js";
|
|
9
9
|
import { T as St } from "./text-area-Bt3p7Pt0.js";
|
|
10
|
-
import { E as
|
|
11
|
-
import { X as
|
|
12
|
-
import { R as
|
|
10
|
+
import { E as At } from "./editor-overlay-wYm22wZK.js";
|
|
11
|
+
import { X as tt } from "./x-CCcI3eJp.js";
|
|
12
|
+
import { R as Et } from "./rotate-ccw-BWANpitO.js";
|
|
13
13
|
import { C as Ht } from "./check-DPdL_Sm7.js";
|
|
14
|
-
import { S as
|
|
15
|
-
import { M as
|
|
14
|
+
import { S as _e } from "./square-CZoGU14v.js";
|
|
15
|
+
import { M as lt } from "./mic-B4Gog3Gi.js";
|
|
16
16
|
import { S as It } from "./send-CySZIRPJ.js";
|
|
17
17
|
import { B as oe } from "./button-DD_0Xdmr.js";
|
|
18
18
|
import { a as Lt } from "./tooltip-DvmfrNvB.js";
|
|
19
|
-
import { P as
|
|
20
|
-
import { D as
|
|
21
|
-
import { D as
|
|
22
|
-
import { C as
|
|
23
|
-
import { T as
|
|
19
|
+
import { P as F } from "./popover-B2qCDhJC.js";
|
|
20
|
+
import { D as ze } from "./dropdown-menu-qrxjymfw.js";
|
|
21
|
+
import { D as P } from "./dialog-ZNuboNmy.js";
|
|
22
|
+
import { C as Pe } from "./color-picker-C_fZl6sA.js";
|
|
23
|
+
import { T as Re } from "./text-input-B-OWQ1Je.js";
|
|
24
24
|
import { C as $t } from "./checkbox-BuZ1u__2.js";
|
|
25
|
-
import { F as Ot } from "./file-upload-
|
|
25
|
+
import { F as Ot } from "./file-upload-DwZcAK8D.js";
|
|
26
26
|
import { c as M } from "./createLucideIcon-CrFbzy84.js";
|
|
27
|
-
import { C as
|
|
28
|
-
import { I as
|
|
27
|
+
import { C as qt } from "./chevron-down-BX_NP2Yh.js";
|
|
28
|
+
import { I as Dt } from "./image-C6RM5hfF.js";
|
|
29
29
|
import { C as jt } from "./columns-2-BTOBZbep.js";
|
|
30
30
|
import { T as Pt } from "./trash-2-rPAKaRgB.js";
|
|
31
31
|
import { S as Bt } from "./sparkles-CuYXqQLg.js";
|
|
@@ -137,10 +137,10 @@ const ar = [
|
|
|
137
137
|
* This source code is licensed under the ISC license.
|
|
138
138
|
* See the LICENSE file in the root directory of this source tree.
|
|
139
139
|
*/
|
|
140
|
-
const
|
|
140
|
+
const lr = [
|
|
141
141
|
["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }],
|
|
142
142
|
["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
|
|
143
|
-
],
|
|
143
|
+
], sr = M("link", lr);
|
|
144
144
|
/**
|
|
145
145
|
* @license lucide-react v1.8.0 - ISC
|
|
146
146
|
*
|
|
@@ -306,11 +306,11 @@ const Rr = [
|
|
|
306
306
|
* This source code is licensed under the ISC license.
|
|
307
307
|
* See the LICENSE file in the root directory of this source tree.
|
|
308
308
|
*/
|
|
309
|
-
const
|
|
309
|
+
const Ar = [
|
|
310
310
|
["path", { d: "M16 4H9a3 3 0 0 0-2.83 4", key: "43sutm" }],
|
|
311
311
|
["path", { d: "M14 12a4 4 0 0 1 0 8H6", key: "nlfj13" }],
|
|
312
312
|
["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }]
|
|
313
|
-
],
|
|
313
|
+
], Er = M("strikethrough", Ar);
|
|
314
314
|
/**
|
|
315
315
|
* @license lucide-react v1.8.0 - ISC
|
|
316
316
|
*
|
|
@@ -354,14 +354,14 @@ const Or = [
|
|
|
354
354
|
["path", { d: "M7 8H3", key: "zfb6yr" }],
|
|
355
355
|
["path", { d: "M21 16h-4", key: "1cnmox" }],
|
|
356
356
|
["path", { d: "M11 3H9", key: "1obp7u" }]
|
|
357
|
-
],
|
|
357
|
+
], qr = M("wand-sparkles", Or);
|
|
358
358
|
/**
|
|
359
359
|
* @license lucide-react v1.8.0 - ISC
|
|
360
360
|
*
|
|
361
361
|
* This source code is licensed under the ISC license.
|
|
362
362
|
* See the LICENSE file in the root directory of this source tree.
|
|
363
363
|
*/
|
|
364
|
-
const
|
|
364
|
+
const Dr = [
|
|
365
365
|
[
|
|
366
366
|
"path",
|
|
367
367
|
{
|
|
@@ -369,7 +369,7 @@ const qr = [
|
|
|
369
369
|
key: "1ngwbx"
|
|
370
370
|
}
|
|
371
371
|
]
|
|
372
|
-
], jr = M("wrench",
|
|
372
|
+
], jr = M("wrench", Dr), Pr = {
|
|
373
373
|
id: "rich-text-editor",
|
|
374
374
|
capabilities: ["edit_inline"],
|
|
375
375
|
state: {
|
|
@@ -503,86 +503,86 @@ const qr = [
|
|
|
503
503
|
description: "Sourced from the id prop."
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
|
-
}, Br = "ds:aria-pressed:!bg-[var(--destructive)] ds:aria-pressed:!text-[var(--destructive-foreground)]",
|
|
506
|
+
}, Br = "ds:aria-pressed:!bg-[var(--destructive)] ds:aria-pressed:!text-[var(--destructive-foreground)]", se = "ds:!size-[var(--min-target-size)]", Fr = "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", Vr = "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--destructive)]", rt = [
|
|
507
507
|
"ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
|
|
508
508
|
"ds:bg-[color-mix(in_srgb,var(--background)_70%,transparent)]",
|
|
509
509
|
"ds:p-[var(--spacing-sm)] ds:[max-block-size:10rem] ds:overflow-y-auto",
|
|
510
510
|
"ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--foreground)]"
|
|
511
511
|
].join(" ");
|
|
512
|
-
function
|
|
512
|
+
function nt(o, a) {
|
|
513
513
|
return a ? o ? /\s$/.test(o) ? `${o}${a}` : `${o} ${a}` : a : o;
|
|
514
514
|
}
|
|
515
515
|
function Kr({
|
|
516
516
|
open: o,
|
|
517
517
|
onClose: a,
|
|
518
518
|
onRequestAiDraft: c,
|
|
519
|
-
onInsert:
|
|
519
|
+
onInsert: s,
|
|
520
520
|
previewAsHtml: d = !0,
|
|
521
521
|
privacyNotice: g,
|
|
522
522
|
onDictate: p
|
|
523
523
|
}) {
|
|
524
|
-
const { t:
|
|
525
|
-
var
|
|
526
|
-
(
|
|
524
|
+
const { t: l } = Z(), b = de(), v = de(), [z, I] = T(""), [S, x] = T(!1), [O, m] = T(!1), [f, k] = T(null), A = $(null), [_, E] = T(!1), [Y, L] = T(""), [q, H] = T(""), J = $(null), ee = C(() => {
|
|
525
|
+
var w;
|
|
526
|
+
(w = J.current) == null || w.abort();
|
|
527
527
|
}, []), me = C(() => {
|
|
528
528
|
if (!p) return;
|
|
529
|
-
const
|
|
530
|
-
J.current =
|
|
531
|
-
signal:
|
|
532
|
-
onPartialTranscript: (
|
|
533
|
-
|
|
529
|
+
const w = new AbortController();
|
|
530
|
+
J.current = w, E(!0), L(""), H(l("editor.ai.listening")), p({
|
|
531
|
+
signal: w.signal,
|
|
532
|
+
onPartialTranscript: (D) => {
|
|
533
|
+
w.signal.aborted || L(D);
|
|
534
534
|
},
|
|
535
|
-
onFinalTranscript: (
|
|
536
|
-
if (
|
|
537
|
-
const
|
|
538
|
-
L(""),
|
|
535
|
+
onFinalTranscript: (D) => {
|
|
536
|
+
if (w.signal.aborted) return;
|
|
537
|
+
const j = D.trim();
|
|
538
|
+
L(""), j && (I((U) => nt(U, j)), H(j));
|
|
539
539
|
}
|
|
540
540
|
}).catch(() => {
|
|
541
541
|
}).finally(() => {
|
|
542
|
-
L(""), J.current ===
|
|
542
|
+
L(""), J.current === w && (J.current = null, E(!1), H(""));
|
|
543
543
|
});
|
|
544
|
-
}, [p,
|
|
544
|
+
}, [p, l]), R = C(() => {
|
|
545
545
|
_ ? ee() : me();
|
|
546
546
|
}, [_, me, ee]);
|
|
547
|
-
|
|
548
|
-
var
|
|
549
|
-
o ? (I(""),
|
|
550
|
-
}, [o]),
|
|
547
|
+
W(() => {
|
|
548
|
+
var w, D;
|
|
549
|
+
o ? (I(""), x(!1), m(!1), k(null), L(""), H("")) : ((w = A.current) == null || w.abort(), A.current = null, (D = J.current) == null || D.abort());
|
|
550
|
+
}, [o]), W(
|
|
551
551
|
() => () => {
|
|
552
|
-
var
|
|
553
|
-
(
|
|
552
|
+
var w, D;
|
|
553
|
+
(w = A.current) == null || w.abort(), (D = J.current) == null || D.abort();
|
|
554
554
|
},
|
|
555
555
|
[]
|
|
556
556
|
);
|
|
557
557
|
const G = C(() => {
|
|
558
|
-
var
|
|
559
|
-
const
|
|
560
|
-
if (!
|
|
561
|
-
ee(), (
|
|
562
|
-
const
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
}).catch((
|
|
566
|
-
|
|
558
|
+
var j;
|
|
559
|
+
const w = z.trim();
|
|
560
|
+
if (!w || S) return;
|
|
561
|
+
ee(), (j = A.current) == null || j.abort();
|
|
562
|
+
const D = new AbortController();
|
|
563
|
+
A.current = D, m(!1), x(!0), c({ prompt: w, signal: D.signal }).then((U) => {
|
|
564
|
+
D.signal.aborted || (k(U), x(!1));
|
|
565
|
+
}).catch((U) => {
|
|
566
|
+
D.signal.aborted || U && typeof U == "object" && "name" in U && U.name === "AbortError" || (m(!0), x(!1));
|
|
567
567
|
});
|
|
568
568
|
}, [z, S, c, ee]), K = C(() => {
|
|
569
|
-
f != null && (
|
|
570
|
-
}, [f,
|
|
569
|
+
f != null && (s(f), a());
|
|
570
|
+
}, [f, s, a]), he = f != null, fe = _ ? nt(z, Y) : z;
|
|
571
571
|
return /* @__PURE__ */ e(
|
|
572
|
-
|
|
572
|
+
At,
|
|
573
573
|
{
|
|
574
574
|
open: o,
|
|
575
575
|
onClose: a,
|
|
576
|
-
ariaLabel:
|
|
576
|
+
ariaLabel: l("editor.ai.dialogTitle"),
|
|
577
577
|
children: he ? /* @__PURE__ */ y("div", { className: "ds:flex ds:items-end ds:gap-[var(--spacing-sm)]", children: [
|
|
578
578
|
/* @__PURE__ */ e(
|
|
579
|
-
|
|
579
|
+
B,
|
|
580
580
|
{
|
|
581
581
|
size: "md",
|
|
582
582
|
intent: "outline",
|
|
583
|
-
className:
|
|
584
|
-
icon: /* @__PURE__ */ e(
|
|
585
|
-
"aria-label":
|
|
583
|
+
className: se,
|
|
584
|
+
icon: /* @__PURE__ */ e(tt, {}),
|
|
585
|
+
"aria-label": l("common.close"),
|
|
586
586
|
onClick: a
|
|
587
587
|
}
|
|
588
588
|
),
|
|
@@ -591,9 +591,9 @@ function Kr({
|
|
|
591
591
|
{
|
|
592
592
|
html: f,
|
|
593
593
|
profile: "rich-text",
|
|
594
|
-
className:
|
|
594
|
+
className: rt,
|
|
595
595
|
tabIndex: 0,
|
|
596
|
-
"aria-label":
|
|
596
|
+
"aria-label": l("editor.ai.dialogTitle")
|
|
597
597
|
}
|
|
598
598
|
) : (
|
|
599
599
|
// Focusable so a keyboard user can scroll a long draft preview
|
|
@@ -601,40 +601,40 @@ function Kr({
|
|
|
601
601
|
// tabIndex allowlist doesn't cover a scrollable, non-interactive
|
|
602
602
|
// text region.
|
|
603
603
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
604
|
-
/* @__PURE__ */ e("p", { className:
|
|
604
|
+
/* @__PURE__ */ e("p", { className: rt, tabIndex: 0, children: f })
|
|
605
605
|
) }),
|
|
606
606
|
/* @__PURE__ */ e(
|
|
607
|
-
|
|
607
|
+
B,
|
|
608
608
|
{
|
|
609
609
|
size: "md",
|
|
610
610
|
intent: "outline",
|
|
611
|
-
className: `${
|
|
612
|
-
icon: /* @__PURE__ */ e(
|
|
613
|
-
"aria-label":
|
|
611
|
+
className: `${se} ds:rounded-full`,
|
|
612
|
+
icon: /* @__PURE__ */ e(Et, {}),
|
|
613
|
+
"aria-label": l("editor.ai.retry"),
|
|
614
614
|
onClick: () => k(null)
|
|
615
615
|
}
|
|
616
616
|
),
|
|
617
617
|
/* @__PURE__ */ e(
|
|
618
|
-
|
|
618
|
+
B,
|
|
619
619
|
{
|
|
620
620
|
size: "md",
|
|
621
621
|
intent: "primary",
|
|
622
|
-
className: `${
|
|
622
|
+
className: `${se} ds:bg-[image:var(--gradient-brand)] ds:rounded-full`,
|
|
623
623
|
icon: /* @__PURE__ */ e(Ht, {}),
|
|
624
|
-
"aria-label":
|
|
624
|
+
"aria-label": l("common.confirm"),
|
|
625
625
|
onClick: K
|
|
626
626
|
}
|
|
627
627
|
)
|
|
628
628
|
] }) : /* @__PURE__ */ y(De, { children: [
|
|
629
629
|
/* @__PURE__ */ y("div", { className: "ds:flex ds:items-end ds:gap-[var(--spacing-sm)]", children: [
|
|
630
630
|
/* @__PURE__ */ e(
|
|
631
|
-
|
|
631
|
+
B,
|
|
632
632
|
{
|
|
633
633
|
size: "md",
|
|
634
634
|
intent: "outline",
|
|
635
|
-
className:
|
|
636
|
-
icon: /* @__PURE__ */ e(
|
|
637
|
-
"aria-label":
|
|
635
|
+
className: se,
|
|
636
|
+
icon: /* @__PURE__ */ e(tt, {}),
|
|
637
|
+
"aria-label": l("common.close"),
|
|
638
638
|
onClick: a
|
|
639
639
|
}
|
|
640
640
|
),
|
|
@@ -645,9 +645,9 @@ function Kr({
|
|
|
645
645
|
size: "md",
|
|
646
646
|
className: "ds:content-center",
|
|
647
647
|
value: fe,
|
|
648
|
-
onChange: (
|
|
649
|
-
placeholder:
|
|
650
|
-
"aria-label":
|
|
648
|
+
onChange: (w) => I(w.target.value),
|
|
649
|
+
placeholder: l("editor.ai.promptPlaceholder"),
|
|
650
|
+
"aria-label": l("editor.ai.promptLabel"),
|
|
651
651
|
autoResize: !0,
|
|
652
652
|
minRows: 1,
|
|
653
653
|
maxRows: 3,
|
|
@@ -657,33 +657,33 @@ function Kr({
|
|
|
657
657
|
}
|
|
658
658
|
) }),
|
|
659
659
|
p ? /* @__PURE__ */ e(
|
|
660
|
-
|
|
660
|
+
B,
|
|
661
661
|
{
|
|
662
662
|
size: "md",
|
|
663
663
|
intent: "outline",
|
|
664
|
-
className: _ ? `${
|
|
665
|
-
icon: _ ? /* @__PURE__ */ e(
|
|
664
|
+
className: _ ? `${se} ${Br}` : se,
|
|
665
|
+
icon: _ ? /* @__PURE__ */ e(_e, { className: "ds:fill-current" }) : /* @__PURE__ */ e(lt, {}),
|
|
666
666
|
"aria-pressed": _,
|
|
667
|
-
"aria-label":
|
|
667
|
+
"aria-label": l(_ ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
|
|
668
668
|
onClick: R
|
|
669
669
|
}
|
|
670
670
|
) : null,
|
|
671
671
|
/* @__PURE__ */ e(
|
|
672
|
-
|
|
672
|
+
B,
|
|
673
673
|
{
|
|
674
674
|
size: "md",
|
|
675
675
|
intent: "primary",
|
|
676
|
-
icon: S ? /* @__PURE__ */ e(
|
|
677
|
-
className: `${
|
|
676
|
+
icon: S ? /* @__PURE__ */ e(it, { size: "sm", variant: "pulse" }) : /* @__PURE__ */ e(It, {}),
|
|
677
|
+
className: `${se} ds:bg-[image:var(--gradient-brand)] ds:rounded-full`,
|
|
678
678
|
disabled: S || !z.trim(),
|
|
679
679
|
"aria-busy": S || void 0,
|
|
680
|
-
"aria-label":
|
|
680
|
+
"aria-label": l("editor.ai.generate"),
|
|
681
681
|
onClick: G
|
|
682
682
|
}
|
|
683
683
|
)
|
|
684
684
|
] }),
|
|
685
|
-
p ? /* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children:
|
|
686
|
-
O ? /* @__PURE__ */ e("p", { id: v, role: "alert", className: Vr, children:
|
|
685
|
+
p ? /* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: q }) : null,
|
|
686
|
+
O ? /* @__PURE__ */ e("p", { id: v, role: "alert", className: Vr, children: l("editor.ai.error") }) : g ? /* @__PURE__ */ e("p", { className: Fr, children: g }) : null
|
|
687
687
|
] })
|
|
688
688
|
}
|
|
689
689
|
);
|
|
@@ -712,7 +712,7 @@ const Gr = {
|
|
|
712
712
|
},
|
|
713
713
|
strike: {
|
|
714
714
|
id: "strike",
|
|
715
|
-
icon: /* @__PURE__ */ e(
|
|
715
|
+
icon: /* @__PURE__ */ e(Er, {}),
|
|
716
716
|
label: ["editor.strike", "Strikethrough"],
|
|
717
717
|
command: ["module.inline.format", { tag: "del" }],
|
|
718
718
|
toggle: "strike"
|
|
@@ -731,7 +731,7 @@ const Gr = {
|
|
|
731
731
|
command: ["module.list.toggle", "ol"],
|
|
732
732
|
toggle: "ol"
|
|
733
733
|
}
|
|
734
|
-
},
|
|
734
|
+
}, Oe = [
|
|
735
735
|
{
|
|
736
736
|
id: "paragraph",
|
|
737
737
|
tag: "p",
|
|
@@ -824,15 +824,15 @@ const Gr = {
|
|
|
824
824
|
icon: /* @__PURE__ */ e(Pt, {}),
|
|
825
825
|
label: ["editor.table.deleteTable", "Delete table"]
|
|
826
826
|
}
|
|
827
|
-
],
|
|
827
|
+
], Me = 6, Ur = je(
|
|
828
828
|
[
|
|
829
829
|
"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
830
830
|
"ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
|
|
831
831
|
"ds:bg-[var(--background)] ds:p-[var(--spacing-xs)]",
|
|
832
832
|
"ds:shadow-[var(--shadow-md)]"
|
|
833
833
|
].join(" ")
|
|
834
|
-
),
|
|
835
|
-
function
|
|
834
|
+
), dt = "ds:self-stretch ds:[inline-size:var(--border-width-sm)] ds:bg-[var(--border)] ds:[margin-inline:var(--spacing-2xs)]", ve = "ds:text-[length:var(--font-size-sm)] ds:font-medium ds:text-[color:var(--foreground)]";
|
|
835
|
+
function Se(o) {
|
|
836
836
|
return o.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
837
837
|
}
|
|
838
838
|
function Xr({
|
|
@@ -840,26 +840,26 @@ function Xr({
|
|
|
840
840
|
active: a,
|
|
841
841
|
onTriggerDown: c
|
|
842
842
|
}) {
|
|
843
|
-
const { t:
|
|
844
|
-
return /* @__PURE__ */ y(
|
|
845
|
-
/* @__PURE__ */ e(
|
|
843
|
+
const { t: s } = Z(), d = Oe.find((g) => a.has(g.id)) ?? Oe[0];
|
|
844
|
+
return /* @__PURE__ */ y(ze.Root, { children: [
|
|
845
|
+
/* @__PURE__ */ e(ze.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
|
|
846
846
|
oe,
|
|
847
847
|
{
|
|
848
848
|
size: "sm",
|
|
849
849
|
intent: "ghost",
|
|
850
850
|
startIcon: d.icon,
|
|
851
|
-
endIcon: /* @__PURE__ */ e(
|
|
852
|
-
"aria-label":
|
|
851
|
+
endIcon: /* @__PURE__ */ e(qt, {}),
|
|
852
|
+
"aria-label": s("editor.format", "Paragraph style"),
|
|
853
853
|
onMouseDown: c,
|
|
854
|
-
children:
|
|
854
|
+
children: s(d.label[0], d.label[1])
|
|
855
855
|
}
|
|
856
856
|
) }),
|
|
857
|
-
/* @__PURE__ */ e(
|
|
858
|
-
|
|
857
|
+
/* @__PURE__ */ e(ze.Content, { align: "start", children: Oe.map((g) => /* @__PURE__ */ e(
|
|
858
|
+
ze.Item,
|
|
859
859
|
{
|
|
860
860
|
startIcon: g.icon,
|
|
861
861
|
onSelect: () => o("module.block.format", { tag: g.tag }),
|
|
862
|
-
children:
|
|
862
|
+
children: s(g.label[0], g.label[1])
|
|
863
863
|
},
|
|
864
864
|
g.id
|
|
865
865
|
)) })
|
|
@@ -869,42 +869,42 @@ function Qr({
|
|
|
869
869
|
insertHtml: o,
|
|
870
870
|
saveSelection: a,
|
|
871
871
|
restoreSelection: c,
|
|
872
|
-
getSelectedText:
|
|
872
|
+
getSelectedText: s
|
|
873
873
|
}) {
|
|
874
|
-
const { t: d } = Z(), [g, p] = T(!1), [
|
|
874
|
+
const { t: d } = Z(), [g, p] = T(!1), [l, b] = T(""), [v, z] = T(""), [I, S] = T(!1), x = de(), O = de(), m = () => {
|
|
875
875
|
b(""), z(""), S(!1);
|
|
876
876
|
}, f = () => {
|
|
877
|
-
const k =
|
|
877
|
+
const k = l.trim();
|
|
878
878
|
if (!k) return;
|
|
879
|
-
const
|
|
879
|
+
const A = v.trim() || k, _ = I ? ' target="_blank" rel="noopener noreferrer"' : "", E = `<a href="${Se(k)}"${_}>${Se(A)}</a>`;
|
|
880
880
|
p(!1), m(), window.requestAnimationFrame(() => {
|
|
881
|
-
c(), o(
|
|
881
|
+
c(), o(E);
|
|
882
882
|
});
|
|
883
883
|
};
|
|
884
|
-
return /* @__PURE__ */ y(
|
|
885
|
-
/* @__PURE__ */ e(
|
|
886
|
-
|
|
884
|
+
return /* @__PURE__ */ y(P.Root, { open: g, onOpenChange: p, children: [
|
|
885
|
+
/* @__PURE__ */ e(P.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
|
|
886
|
+
B,
|
|
887
887
|
{
|
|
888
888
|
size: "sm",
|
|
889
889
|
intent: "ghost",
|
|
890
|
-
icon: /* @__PURE__ */ e(
|
|
890
|
+
icon: /* @__PURE__ */ e(sr, {}),
|
|
891
891
|
"aria-label": d("editor.link.insert", "Insert link"),
|
|
892
892
|
onMouseDown: () => {
|
|
893
|
-
a(), z(
|
|
893
|
+
a(), z(s());
|
|
894
894
|
}
|
|
895
895
|
}
|
|
896
896
|
) }),
|
|
897
|
-
/* @__PURE__ */ y(
|
|
898
|
-
/* @__PURE__ */ e(
|
|
899
|
-
/* @__PURE__ */ y(
|
|
897
|
+
/* @__PURE__ */ y(P.Content, { children: [
|
|
898
|
+
/* @__PURE__ */ e(P.Header, { children: /* @__PURE__ */ e(P.Title, { children: d("editor.link.insert", "Insert link") }) }),
|
|
899
|
+
/* @__PURE__ */ y(P.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
900
900
|
/* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
901
|
-
/* @__PURE__ */ e("label", { htmlFor:
|
|
901
|
+
/* @__PURE__ */ e("label", { htmlFor: x, className: ve, children: d("editor.link.url", "URL") }),
|
|
902
902
|
/* @__PURE__ */ e(
|
|
903
|
-
|
|
903
|
+
Re,
|
|
904
904
|
{
|
|
905
|
-
id:
|
|
905
|
+
id: x,
|
|
906
906
|
type: "url",
|
|
907
|
-
value:
|
|
907
|
+
value: l,
|
|
908
908
|
onChange: (k) => b(k.target.value),
|
|
909
909
|
placeholder: "https://…"
|
|
910
910
|
}
|
|
@@ -913,7 +913,7 @@ function Qr({
|
|
|
913
913
|
/* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
914
914
|
/* @__PURE__ */ e("label", { htmlFor: O, className: ve, children: d("editor.link.text", "Text to display") }),
|
|
915
915
|
/* @__PURE__ */ e(
|
|
916
|
-
|
|
916
|
+
Re,
|
|
917
917
|
{
|
|
918
918
|
id: O,
|
|
919
919
|
value: v,
|
|
@@ -931,9 +931,9 @@ function Qr({
|
|
|
931
931
|
}
|
|
932
932
|
)
|
|
933
933
|
] }),
|
|
934
|
-
/* @__PURE__ */ y(
|
|
935
|
-
/* @__PURE__ */ e(
|
|
936
|
-
/* @__PURE__ */ e(oe, { onClick: f, disabled: !
|
|
934
|
+
/* @__PURE__ */ y(P.Footer, { children: [
|
|
935
|
+
/* @__PURE__ */ e(P.Close, { asChild: !0, children: /* @__PURE__ */ e(oe, { intent: "secondary", children: d("common.cancel") }) }),
|
|
936
|
+
/* @__PURE__ */ e(oe, { onClick: f, disabled: !l.trim(), children: d("editor.link.insertAction", "Insert") })
|
|
937
937
|
] })
|
|
938
938
|
] })
|
|
939
939
|
] });
|
|
@@ -942,32 +942,32 @@ function Zr({
|
|
|
942
942
|
insertHtml: o,
|
|
943
943
|
saveSelection: a,
|
|
944
944
|
restoreSelection: c,
|
|
945
|
-
uploadImage:
|
|
945
|
+
uploadImage: s
|
|
946
946
|
}) {
|
|
947
|
-
const { t: d } = Z(), [g, p] = T(!1), [
|
|
948
|
-
const k = `<img src="${
|
|
947
|
+
const { t: d } = Z(), [g, p] = T(!1), [l, b] = T(""), [v, z] = T(""), I = de(), S = de(), x = (m, f) => {
|
|
948
|
+
const k = `<img src="${Se(m)}" alt="${Se(f)}" loading="lazy">`;
|
|
949
949
|
p(!1), b(""), z(""), window.requestAnimationFrame(() => {
|
|
950
950
|
c(), o(k);
|
|
951
951
|
});
|
|
952
952
|
}, O = () => {
|
|
953
|
-
const m =
|
|
954
|
-
m &&
|
|
953
|
+
const m = l.trim();
|
|
954
|
+
m && x(m, v.trim());
|
|
955
955
|
};
|
|
956
|
-
return /* @__PURE__ */ y(
|
|
957
|
-
/* @__PURE__ */ e(
|
|
958
|
-
|
|
956
|
+
return /* @__PURE__ */ y(P.Root, { open: g, onOpenChange: p, children: [
|
|
957
|
+
/* @__PURE__ */ e(P.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
|
|
958
|
+
B,
|
|
959
959
|
{
|
|
960
960
|
size: "sm",
|
|
961
961
|
intent: "ghost",
|
|
962
|
-
icon: /* @__PURE__ */ e(
|
|
962
|
+
icon: /* @__PURE__ */ e(Dt, {}),
|
|
963
963
|
"aria-label": d("editor.image.insert", "Insert image"),
|
|
964
964
|
onMouseDown: () => a()
|
|
965
965
|
}
|
|
966
966
|
) }),
|
|
967
|
-
/* @__PURE__ */ y(
|
|
968
|
-
/* @__PURE__ */ e(
|
|
969
|
-
/* @__PURE__ */ y(
|
|
970
|
-
|
|
967
|
+
/* @__PURE__ */ y(P.Content, { children: [
|
|
968
|
+
/* @__PURE__ */ e(P.Header, { children: /* @__PURE__ */ e(P.Title, { children: d("editor.image.insert", "Insert image") }) }),
|
|
969
|
+
/* @__PURE__ */ y(P.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
970
|
+
s ? /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
971
971
|
/* @__PURE__ */ e("span", { className: ve, children: d("editor.image.upload", "Upload") }),
|
|
972
972
|
/* @__PURE__ */ e(
|
|
973
973
|
Ot,
|
|
@@ -978,8 +978,8 @@ function Zr({
|
|
|
978
978
|
},
|
|
979
979
|
maxFiles: 1,
|
|
980
980
|
onUpload: async (m, { signal: f }) => {
|
|
981
|
-
const k = await
|
|
982
|
-
|
|
981
|
+
const k = await s(m, f);
|
|
982
|
+
x(k, m.name);
|
|
983
983
|
}
|
|
984
984
|
}
|
|
985
985
|
),
|
|
@@ -988,11 +988,11 @@ function Zr({
|
|
|
988
988
|
/* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
989
989
|
/* @__PURE__ */ e("label", { htmlFor: I, className: ve, children: d("editor.image.url", "Image URL") }),
|
|
990
990
|
/* @__PURE__ */ e(
|
|
991
|
-
|
|
991
|
+
Re,
|
|
992
992
|
{
|
|
993
993
|
id: I,
|
|
994
994
|
type: "url",
|
|
995
|
-
value:
|
|
995
|
+
value: l,
|
|
996
996
|
onChange: (m) => b(m.target.value),
|
|
997
997
|
placeholder: "https://…"
|
|
998
998
|
}
|
|
@@ -1001,7 +1001,7 @@ function Zr({
|
|
|
1001
1001
|
/* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
1002
1002
|
/* @__PURE__ */ e("label", { htmlFor: S, className: ve, children: d("editor.image.alt", "Alt text") }),
|
|
1003
1003
|
/* @__PURE__ */ e(
|
|
1004
|
-
|
|
1004
|
+
Re,
|
|
1005
1005
|
{
|
|
1006
1006
|
id: S,
|
|
1007
1007
|
value: v,
|
|
@@ -1014,9 +1014,9 @@ function Zr({
|
|
|
1014
1014
|
)
|
|
1015
1015
|
] })
|
|
1016
1016
|
] }),
|
|
1017
|
-
/* @__PURE__ */ y(
|
|
1018
|
-
/* @__PURE__ */ e(
|
|
1019
|
-
/* @__PURE__ */ e(oe, { onClick: O, disabled: !
|
|
1017
|
+
/* @__PURE__ */ y(P.Footer, { children: [
|
|
1018
|
+
/* @__PURE__ */ e(P.Close, { asChild: !0, children: /* @__PURE__ */ e(oe, { intent: "secondary", children: d("common.cancel") }) }),
|
|
1019
|
+
/* @__PURE__ */ e(oe, { onClick: O, disabled: !l.trim(), children: d("editor.image.insertAction", "Insert") })
|
|
1020
1020
|
] })
|
|
1021
1021
|
] })
|
|
1022
1022
|
] });
|
|
@@ -1026,32 +1026,32 @@ function Yr({
|
|
|
1026
1026
|
saveSelection: a,
|
|
1027
1027
|
restoreSelection: c
|
|
1028
1028
|
}) {
|
|
1029
|
-
const { t:
|
|
1029
|
+
const { t: s } = Z(), [d, g] = T("#1f2a5c"), p = (b) => {
|
|
1030
1030
|
g(b), c(), o("module.inline.format", {
|
|
1031
1031
|
tag: "span",
|
|
1032
1032
|
style: { color: b },
|
|
1033
1033
|
type: "toggle"
|
|
1034
1034
|
});
|
|
1035
|
-
},
|
|
1035
|
+
}, l = () => {
|
|
1036
1036
|
c(), o("module.inline.remove", { style: "color" });
|
|
1037
1037
|
};
|
|
1038
|
-
return /* @__PURE__ */ y(
|
|
1039
|
-
/* @__PURE__ */ e(
|
|
1040
|
-
|
|
1038
|
+
return /* @__PURE__ */ y(F, { onOpenChange: (b) => b && a(), children: [
|
|
1039
|
+
/* @__PURE__ */ e(F.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1040
|
+
B,
|
|
1041
1041
|
{
|
|
1042
1042
|
size: "sm",
|
|
1043
1043
|
intent: "ghost",
|
|
1044
1044
|
icon: /* @__PURE__ */ e(yr, {}),
|
|
1045
|
-
"aria-label":
|
|
1045
|
+
"aria-label": s("editor.textColor", "Text colour"),
|
|
1046
1046
|
onMouseDown: (b) => {
|
|
1047
1047
|
b.preventDefault(), a();
|
|
1048
1048
|
}
|
|
1049
1049
|
}
|
|
1050
1050
|
) }),
|
|
1051
|
-
/* @__PURE__ */ y(
|
|
1052
|
-
/* @__PURE__ */ e(
|
|
1051
|
+
/* @__PURE__ */ y(F.Content, { side: "bottom", align: "start", children: [
|
|
1052
|
+
/* @__PURE__ */ e(F.Heading, { children: s("editor.textColor", "Text colour") }),
|
|
1053
1053
|
/* @__PURE__ */ e("div", { className: "ds:pt-[var(--spacing-sm)]", children: /* @__PURE__ */ e(
|
|
1054
|
-
|
|
1054
|
+
Pe,
|
|
1055
1055
|
{
|
|
1056
1056
|
variant: "inline",
|
|
1057
1057
|
size: "sm",
|
|
@@ -1059,7 +1059,7 @@ function Yr({
|
|
|
1059
1059
|
onChange: p
|
|
1060
1060
|
}
|
|
1061
1061
|
) }),
|
|
1062
|
-
/* @__PURE__ */ e("div", { className: "ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:justify-end", children: /* @__PURE__ */ e(oe, { size: "sm", intent: "secondary", onClick:
|
|
1062
|
+
/* @__PURE__ */ e("div", { className: "ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:justify-end", children: /* @__PURE__ */ e(oe, { size: "sm", intent: "secondary", onClick: l, children: s("editor.color.remove", "Remove colour") }) })
|
|
1063
1063
|
] })
|
|
1064
1064
|
] });
|
|
1065
1065
|
}
|
|
@@ -1068,32 +1068,32 @@ function Jr({
|
|
|
1068
1068
|
saveSelection: a,
|
|
1069
1069
|
restoreSelection: c
|
|
1070
1070
|
}) {
|
|
1071
|
-
const { t:
|
|
1071
|
+
const { t: s } = Z(), [d, g] = T("#fff3a3"), p = (b) => {
|
|
1072
1072
|
g(b), c(), o("module.inline.format", {
|
|
1073
1073
|
tag: "span",
|
|
1074
1074
|
style: { "background-color": b },
|
|
1075
1075
|
type: "toggle"
|
|
1076
1076
|
});
|
|
1077
|
-
},
|
|
1077
|
+
}, l = () => {
|
|
1078
1078
|
c(), o("module.inline.remove", { style: "background-color" });
|
|
1079
1079
|
};
|
|
1080
|
-
return /* @__PURE__ */ y(
|
|
1081
|
-
/* @__PURE__ */ e(
|
|
1082
|
-
|
|
1080
|
+
return /* @__PURE__ */ y(F, { onOpenChange: (b) => b && a(), children: [
|
|
1081
|
+
/* @__PURE__ */ e(F.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1082
|
+
B,
|
|
1083
1083
|
{
|
|
1084
1084
|
size: "sm",
|
|
1085
1085
|
intent: "ghost",
|
|
1086
1086
|
icon: /* @__PURE__ */ e(or, {}),
|
|
1087
|
-
"aria-label":
|
|
1087
|
+
"aria-label": s("editor.highlightColor", "Highlight"),
|
|
1088
1088
|
onMouseDown: (b) => {
|
|
1089
1089
|
b.preventDefault(), a();
|
|
1090
1090
|
}
|
|
1091
1091
|
}
|
|
1092
1092
|
) }),
|
|
1093
|
-
/* @__PURE__ */ y(
|
|
1094
|
-
/* @__PURE__ */ e(
|
|
1093
|
+
/* @__PURE__ */ y(F.Content, { side: "bottom", align: "start", children: [
|
|
1094
|
+
/* @__PURE__ */ e(F.Heading, { children: s("editor.highlightColor", "Highlight") }),
|
|
1095
1095
|
/* @__PURE__ */ e("div", { className: "ds:pt-[var(--spacing-sm)]", children: /* @__PURE__ */ e(
|
|
1096
|
-
|
|
1096
|
+
Pe,
|
|
1097
1097
|
{
|
|
1098
1098
|
variant: "inline",
|
|
1099
1099
|
size: "sm",
|
|
@@ -1101,7 +1101,7 @@ function Jr({
|
|
|
1101
1101
|
onChange: p
|
|
1102
1102
|
}
|
|
1103
1103
|
) }),
|
|
1104
|
-
/* @__PURE__ */ e("div", { className: "ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:justify-end", children: /* @__PURE__ */ e(oe, { size: "sm", intent: "secondary", onClick:
|
|
1104
|
+
/* @__PURE__ */ e("div", { className: "ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:justify-end", children: /* @__PURE__ */ e(oe, { size: "sm", intent: "secondary", onClick: l, children: s("editor.highlight.remove", "Remove highlight") }) })
|
|
1105
1105
|
] })
|
|
1106
1106
|
] });
|
|
1107
1107
|
}
|
|
@@ -1114,27 +1114,27 @@ function tn({
|
|
|
1114
1114
|
insertTable: a,
|
|
1115
1115
|
active: c
|
|
1116
1116
|
}) {
|
|
1117
|
-
const { t:
|
|
1118
|
-
return /* @__PURE__ */ y(
|
|
1119
|
-
/* @__PURE__ */ e(
|
|
1120
|
-
|
|
1117
|
+
const { t: s } = Z(), [d, g] = T({ r: 0, c: 0 }), p = c.has("table");
|
|
1118
|
+
return /* @__PURE__ */ y(F, { onOpenChange: (l) => !l && g({ r: 0, c: 0 }), children: [
|
|
1119
|
+
/* @__PURE__ */ e(F.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1120
|
+
B,
|
|
1121
1121
|
{
|
|
1122
1122
|
size: "sm",
|
|
1123
1123
|
intent: "ghost",
|
|
1124
1124
|
icon: /* @__PURE__ */ e(Ir, {}),
|
|
1125
|
-
"aria-label":
|
|
1126
|
-
onMouseDown: (
|
|
1125
|
+
"aria-label": s("editor.table.insert", "Insert table"),
|
|
1126
|
+
onMouseDown: (l) => l.preventDefault()
|
|
1127
1127
|
}
|
|
1128
1128
|
) }),
|
|
1129
|
-
/* @__PURE__ */ e(
|
|
1129
|
+
/* @__PURE__ */ e(F.Content, { side: "bottom", align: "start", children: p ? (
|
|
1130
1130
|
// Caret is already inside a table — offer the manage ops only, never
|
|
1131
1131
|
// a nested-table insert (mirrors Redactor's native dropdown, which
|
|
1132
1132
|
// disables "insert table" while the caret is in a table).
|
|
1133
|
-
/* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: st.map((
|
|
1133
|
+
/* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: st.map((l) => /* @__PURE__ */ y(
|
|
1134
1134
|
"button",
|
|
1135
1135
|
{
|
|
1136
1136
|
type: "button",
|
|
1137
|
-
onClick: () => o(
|
|
1137
|
+
onClick: () => o(l.command),
|
|
1138
1138
|
className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)] ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-2xs)] ds:text-start ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--foreground)] ds:hover:bg-[var(--muted)]",
|
|
1139
1139
|
children: [
|
|
1140
1140
|
/* @__PURE__ */ e(
|
|
@@ -1142,30 +1142,30 @@ function tn({
|
|
|
1142
1142
|
{
|
|
1143
1143
|
"aria-hidden": "true",
|
|
1144
1144
|
className: "ds:inline-flex ds:size-4 ds:shrink-0 ds:items-center ds:justify-center ds:text-[color:var(--muted-foreground)]",
|
|
1145
|
-
children:
|
|
1145
|
+
children: l.icon
|
|
1146
1146
|
}
|
|
1147
1147
|
),
|
|
1148
|
-
l
|
|
1148
|
+
s(l.label[0], l.label[1])
|
|
1149
1149
|
]
|
|
1150
1150
|
},
|
|
1151
|
-
|
|
1151
|
+
l.id
|
|
1152
1152
|
)) })
|
|
1153
1153
|
) : /* @__PURE__ */ y(De, { children: [
|
|
1154
|
-
/* @__PURE__ */ e(
|
|
1154
|
+
/* @__PURE__ */ e(F.Heading, { children: s("editor.table.insert", "Insert table") }),
|
|
1155
1155
|
/* @__PURE__ */ e(
|
|
1156
1156
|
"div",
|
|
1157
1157
|
{
|
|
1158
1158
|
role: "group",
|
|
1159
|
-
"aria-label":
|
|
1159
|
+
"aria-label": s("editor.table.sizePicker", "Table size"),
|
|
1160
1160
|
className: "ds:mt-[var(--spacing-sm)] ds:grid ds:w-fit ds:grid-cols-6 ds:gap-[var(--spacing-2xs)]",
|
|
1161
1161
|
onMouseLeave: () => g({ r: 0, c: 0 }),
|
|
1162
|
-
children: Array.from({ length:
|
|
1163
|
-
const v = Math.floor(b /
|
|
1162
|
+
children: Array.from({ length: Me * Me }, (l, b) => {
|
|
1163
|
+
const v = Math.floor(b / Me) + 1, z = b % Me + 1, I = v <= d.r && z <= d.c;
|
|
1164
1164
|
return /* @__PURE__ */ e(
|
|
1165
1165
|
"button",
|
|
1166
1166
|
{
|
|
1167
1167
|
type: "button",
|
|
1168
|
-
"aria-label":
|
|
1168
|
+
"aria-label": s("editor.table.sizeCell", "{{r}}×{{c}}", {
|
|
1169
1169
|
r: v,
|
|
1170
1170
|
c: z
|
|
1171
1171
|
}),
|
|
@@ -1178,10 +1178,10 @@ function tn({
|
|
|
1178
1178
|
})
|
|
1179
1179
|
}
|
|
1180
1180
|
),
|
|
1181
|
-
/* @__PURE__ */ e("p", { className: "ds:mt-[var(--spacing-xs)] ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", children: d.r > 0 ?
|
|
1181
|
+
/* @__PURE__ */ e("p", { className: "ds:mt-[var(--spacing-xs)] ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", children: d.r > 0 ? s("editor.table.sizeCell", "{{r}}×{{c}}", {
|
|
1182
1182
|
r: d.r,
|
|
1183
1183
|
c: d.c
|
|
1184
|
-
}) :
|
|
1184
|
+
}) : s("editor.table.sizeHint", "Pick a size") })
|
|
1185
1185
|
] }) })
|
|
1186
1186
|
] });
|
|
1187
1187
|
}
|
|
@@ -1191,24 +1191,24 @@ const rn = Object.fromEntries(st.map((o) => [o.id, o])), nn = [
|
|
|
1191
1191
|
"ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
|
|
1192
1192
|
"ds:bg-[var(--popover)] ds:p-[var(--spacing-2xs)] ds:shadow-[var(--shadow-lg)]"
|
|
1193
1193
|
].join(" "), on = "#fde68a";
|
|
1194
|
-
function
|
|
1194
|
+
function ot({
|
|
1195
1195
|
scope: o,
|
|
1196
1196
|
icon: a,
|
|
1197
1197
|
label: c,
|
|
1198
|
-
onOpenChange:
|
|
1198
|
+
onOpenChange: s,
|
|
1199
1199
|
saveTableCell: d,
|
|
1200
1200
|
applyTableBackground: g
|
|
1201
1201
|
}) {
|
|
1202
|
-
const { t: p } = Z(), [
|
|
1202
|
+
const { t: p } = Z(), [l, b] = T(on);
|
|
1203
1203
|
return /* @__PURE__ */ y(
|
|
1204
|
-
|
|
1204
|
+
F,
|
|
1205
1205
|
{
|
|
1206
1206
|
onOpenChange: (v) => {
|
|
1207
|
-
|
|
1207
|
+
s(v), v && d();
|
|
1208
1208
|
},
|
|
1209
1209
|
children: [
|
|
1210
|
-
/* @__PURE__ */ e(
|
|
1211
|
-
|
|
1210
|
+
/* @__PURE__ */ e(F.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1211
|
+
B,
|
|
1212
1212
|
{
|
|
1213
1213
|
size: "sm",
|
|
1214
1214
|
intent: "ghost",
|
|
@@ -1217,13 +1217,13 @@ function nt({
|
|
|
1217
1217
|
onMouseDown: (v) => v.preventDefault()
|
|
1218
1218
|
}
|
|
1219
1219
|
) }),
|
|
1220
|
-
/* @__PURE__ */ y(
|
|
1220
|
+
/* @__PURE__ */ y(F.Content, { side: "bottom", align: "center", children: [
|
|
1221
1221
|
/* @__PURE__ */ e(
|
|
1222
|
-
|
|
1222
|
+
Pe,
|
|
1223
1223
|
{
|
|
1224
1224
|
variant: "inline",
|
|
1225
1225
|
size: "sm",
|
|
1226
|
-
value:
|
|
1226
|
+
value: l,
|
|
1227
1227
|
onChange: (v) => {
|
|
1228
1228
|
b(v), g(o, v);
|
|
1229
1229
|
}
|
|
@@ -1248,38 +1248,38 @@ function an({
|
|
|
1248
1248
|
active: o,
|
|
1249
1249
|
run: a,
|
|
1250
1250
|
areaRef: c,
|
|
1251
|
-
getActiveTableEl:
|
|
1251
|
+
getActiveTableEl: s,
|
|
1252
1252
|
enableColor: d = !1,
|
|
1253
1253
|
saveTableCell: g,
|
|
1254
1254
|
applyTableBackground: p
|
|
1255
1255
|
}) {
|
|
1256
|
-
const { t:
|
|
1256
|
+
const { t: l } = Z(), b = o.has("table"), [v, z] = T(null), I = $(0), [S, x] = T(!1), O = C((f) => {
|
|
1257
1257
|
I.current = Math.max(
|
|
1258
1258
|
0,
|
|
1259
1259
|
I.current + (f ? 1 : -1)
|
|
1260
|
-
),
|
|
1260
|
+
), x(I.current > 0);
|
|
1261
1261
|
}, []);
|
|
1262
|
-
if (
|
|
1262
|
+
if (W(() => {
|
|
1263
1263
|
if (S) return;
|
|
1264
1264
|
if (!b || typeof window > "u") {
|
|
1265
1265
|
z(null);
|
|
1266
1266
|
return;
|
|
1267
1267
|
}
|
|
1268
1268
|
const f = () => {
|
|
1269
|
-
const
|
|
1270
|
-
if (!
|
|
1269
|
+
const E = c.current, Y = s();
|
|
1270
|
+
if (!E || !Y) {
|
|
1271
1271
|
z(null);
|
|
1272
1272
|
return;
|
|
1273
1273
|
}
|
|
1274
|
-
const L =
|
|
1274
|
+
const L = E.getBoundingClientRect(), q = Y.getBoundingClientRect(), H = getComputedStyle(E).direction === "rtl", J = Math.max(0, q.top - L.top - 44), ee = H ? L.right - q.right + q.width / 2 : q.left - L.left + q.width / 2;
|
|
1275
1275
|
z({ top: J, start: Math.max(0, ee), rtl: H });
|
|
1276
1276
|
};
|
|
1277
1277
|
f();
|
|
1278
|
-
const k = new ResizeObserver(f),
|
|
1279
|
-
return
|
|
1278
|
+
const k = new ResizeObserver(f), A = c.current, _ = s();
|
|
1279
|
+
return A && k.observe(A), _ && k.observe(_), window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
|
|
1280
1280
|
k.disconnect(), window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
|
|
1281
1281
|
};
|
|
1282
|
-
}, [b, S, c,
|
|
1282
|
+
}, [b, S, c, s]), !b && !S || !v) return null;
|
|
1283
1283
|
const m = [
|
|
1284
1284
|
["rowAbove", "rowBelow"],
|
|
1285
1285
|
["colLeft", "colRight"],
|
|
@@ -1296,50 +1296,50 @@ function an({
|
|
|
1296
1296
|
"div",
|
|
1297
1297
|
{
|
|
1298
1298
|
role: "group",
|
|
1299
|
-
"aria-label":
|
|
1299
|
+
"aria-label": l("editor.table.toolbar", "Table tools"),
|
|
1300
1300
|
className: `${nn} ${v.rtl ? "ds:translate-x-1/2" : "ds:-translate-x-1/2"}`,
|
|
1301
1301
|
style: {
|
|
1302
1302
|
"--rte-tt-top": `${v.top}px`,
|
|
1303
1303
|
"--rte-tt-start": `${v.start}px`
|
|
1304
1304
|
},
|
|
1305
|
-
children: m.map((f, k) => /* @__PURE__ */ y(
|
|
1306
|
-
k > 0 ? /* @__PURE__ */ e("span", { "aria-hidden": "true", className:
|
|
1305
|
+
children: m.map((f, k) => /* @__PURE__ */ y(at, { children: [
|
|
1306
|
+
k > 0 ? /* @__PURE__ */ e("span", { "aria-hidden": "true", className: dt }) : null,
|
|
1307
1307
|
f === "colour" ? /* @__PURE__ */ y(De, { children: [
|
|
1308
1308
|
/* @__PURE__ */ e(
|
|
1309
|
-
|
|
1309
|
+
ot,
|
|
1310
1310
|
{
|
|
1311
1311
|
scope: "cell",
|
|
1312
1312
|
icon: /* @__PURE__ */ e(fr, {}),
|
|
1313
|
-
label:
|
|
1313
|
+
label: l("editor.table.cellColor", "Cell colour"),
|
|
1314
1314
|
onOpenChange: O,
|
|
1315
1315
|
saveTableCell: g,
|
|
1316
1316
|
applyTableBackground: p
|
|
1317
1317
|
}
|
|
1318
1318
|
),
|
|
1319
1319
|
/* @__PURE__ */ e(
|
|
1320
|
-
|
|
1320
|
+
ot,
|
|
1321
1321
|
{
|
|
1322
1322
|
scope: "row",
|
|
1323
1323
|
icon: /* @__PURE__ */ e(pr, {}),
|
|
1324
|
-
label:
|
|
1324
|
+
label: l("editor.table.rowColor", "Row colour"),
|
|
1325
1325
|
onOpenChange: O,
|
|
1326
1326
|
saveTableCell: g,
|
|
1327
1327
|
applyTableBackground: p
|
|
1328
1328
|
}
|
|
1329
1329
|
)
|
|
1330
|
-
] }) : f.map((
|
|
1331
|
-
const _ = rn[
|
|
1330
|
+
] }) : f.map((A) => {
|
|
1331
|
+
const _ = rn[A];
|
|
1332
1332
|
return /* @__PURE__ */ e(
|
|
1333
|
-
|
|
1333
|
+
B,
|
|
1334
1334
|
{
|
|
1335
1335
|
size: "sm",
|
|
1336
1336
|
intent: "ghost",
|
|
1337
1337
|
icon: _.icon,
|
|
1338
|
-
tooltip:
|
|
1339
|
-
onMouseDown: (
|
|
1338
|
+
tooltip: l(_.label[0], _.label[1]),
|
|
1339
|
+
onMouseDown: (E) => E.preventDefault(),
|
|
1340
1340
|
onClick: () => a(_.command)
|
|
1341
1341
|
},
|
|
1342
|
-
|
|
1342
|
+
A
|
|
1343
1343
|
);
|
|
1344
1344
|
})
|
|
1345
1345
|
] }, f === "colour" ? "colour" : f[0]))
|
|
@@ -1347,48 +1347,48 @@ function an({
|
|
|
1347
1347
|
) })
|
|
1348
1348
|
);
|
|
1349
1349
|
}
|
|
1350
|
-
function
|
|
1350
|
+
function ln({
|
|
1351
1351
|
run: o,
|
|
1352
1352
|
active: a,
|
|
1353
1353
|
preset: c,
|
|
1354
|
-
insertHtml:
|
|
1354
|
+
insertHtml: s,
|
|
1355
1355
|
insertTable: d,
|
|
1356
1356
|
saveSelection: g,
|
|
1357
1357
|
restoreSelection: p,
|
|
1358
|
-
getSelectedText:
|
|
1358
|
+
getSelectedText: l,
|
|
1359
1359
|
uploadImage: b,
|
|
1360
1360
|
enableColor: v = !1,
|
|
1361
1361
|
enableImage: z = !1,
|
|
1362
1362
|
enableTable: I = !1,
|
|
1363
1363
|
showExtensions: S = !1
|
|
1364
1364
|
}) {
|
|
1365
|
-
const { t:
|
|
1365
|
+
const { t: x } = Z(), O = (L) => L.preventDefault(), m = (L) => Wr[c].includes(L), f = (L) => {
|
|
1366
1366
|
if (!m(L)) return null;
|
|
1367
|
-
const
|
|
1367
|
+
const q = Gr[L];
|
|
1368
1368
|
return /* @__PURE__ */ e(
|
|
1369
|
-
|
|
1369
|
+
B,
|
|
1370
1370
|
{
|
|
1371
1371
|
size: "sm",
|
|
1372
1372
|
intent: "ghost",
|
|
1373
|
-
icon:
|
|
1374
|
-
"aria-label":
|
|
1375
|
-
"aria-pressed":
|
|
1373
|
+
icon: q.icon,
|
|
1374
|
+
"aria-label": x(q.label[0], q.label[1]),
|
|
1375
|
+
"aria-pressed": q.toggle ? a.has(q.toggle) : void 0,
|
|
1376
1376
|
onMouseDown: O,
|
|
1377
|
-
onClick: () => o(...
|
|
1377
|
+
onClick: () => o(...q.command)
|
|
1378
1378
|
},
|
|
1379
|
-
|
|
1379
|
+
q.id
|
|
1380
1380
|
);
|
|
1381
|
-
}, k = () => /* @__PURE__ */ e("span", { "aria-hidden": "true", className:
|
|
1381
|
+
}, k = () => /* @__PURE__ */ e("span", { "aria-hidden": "true", className: dt }), A = m("format"), _ = m("bold") || m("italic") || m("underline") || m("strike") || v, E = m("ul") || m("ol"), Y = m("link") || z || I;
|
|
1382
1382
|
return /* @__PURE__ */ y(
|
|
1383
1383
|
"div",
|
|
1384
1384
|
{
|
|
1385
1385
|
role: "group",
|
|
1386
|
-
"aria-label":
|
|
1386
|
+
"aria-label": x("editor.toolbarLabel"),
|
|
1387
1387
|
className: Ur(),
|
|
1388
1388
|
"data-component": "editor-toolbar",
|
|
1389
1389
|
children: [
|
|
1390
|
-
|
|
1391
|
-
|
|
1390
|
+
A ? /* @__PURE__ */ e(Xr, { run: o, active: a, onTriggerDown: O }) : null,
|
|
1391
|
+
A && _ ? /* @__PURE__ */ e(k, {}) : null,
|
|
1392
1392
|
f("bold"),
|
|
1393
1393
|
f("italic"),
|
|
1394
1394
|
f("underline"),
|
|
@@ -1409,37 +1409,37 @@ function sn({
|
|
|
1409
1409
|
restoreSelection: p
|
|
1410
1410
|
}
|
|
1411
1411
|
) : null,
|
|
1412
|
-
(
|
|
1412
|
+
(A || _) && E ? /* @__PURE__ */ e(k, {}) : null,
|
|
1413
1413
|
f("ul"),
|
|
1414
1414
|
f("ol"),
|
|
1415
|
-
(
|
|
1415
|
+
(A || _ || E) && Y ? /* @__PURE__ */ e(k, {}) : null,
|
|
1416
1416
|
m("link") ? /* @__PURE__ */ e(
|
|
1417
1417
|
Qr,
|
|
1418
1418
|
{
|
|
1419
|
-
insertHtml:
|
|
1419
|
+
insertHtml: s,
|
|
1420
1420
|
saveSelection: g,
|
|
1421
1421
|
restoreSelection: p,
|
|
1422
|
-
getSelectedText:
|
|
1422
|
+
getSelectedText: l
|
|
1423
1423
|
}
|
|
1424
1424
|
) : null,
|
|
1425
1425
|
z ? /* @__PURE__ */ e(
|
|
1426
1426
|
Zr,
|
|
1427
1427
|
{
|
|
1428
|
-
insertHtml:
|
|
1428
|
+
insertHtml: s,
|
|
1429
1429
|
saveSelection: g,
|
|
1430
1430
|
restoreSelection: p,
|
|
1431
1431
|
uploadImage: b
|
|
1432
1432
|
}
|
|
1433
1433
|
) : null,
|
|
1434
1434
|
I ? /* @__PURE__ */ e(tn, { run: o, insertTable: d, active: a }) : null,
|
|
1435
|
-
S && (
|
|
1435
|
+
S && (A || _ || E || Y) ? /* @__PURE__ */ e(k, {}) : null,
|
|
1436
1436
|
S ? /* @__PURE__ */ e(
|
|
1437
|
-
|
|
1437
|
+
B,
|
|
1438
1438
|
{
|
|
1439
1439
|
size: "sm",
|
|
1440
1440
|
intent: "ghost",
|
|
1441
1441
|
icon: /* @__PURE__ */ e(jr, {}),
|
|
1442
|
-
"aria-label":
|
|
1442
|
+
"aria-label": x("editor.extensions", "Editor extensions"),
|
|
1443
1443
|
disabled: !0,
|
|
1444
1444
|
onMouseDown: O
|
|
1445
1445
|
}
|
|
@@ -1451,14 +1451,14 @@ function sn({
|
|
|
1451
1451
|
function re(o) {
|
|
1452
1452
|
return _t(o, "rich-text");
|
|
1453
1453
|
}
|
|
1454
|
-
function
|
|
1454
|
+
function qe(o = "") {
|
|
1455
1455
|
const a = String(o).trim();
|
|
1456
1456
|
if (a === "" || a === "<p><br></p>" || a === "<p> </p>")
|
|
1457
1457
|
return "";
|
|
1458
1458
|
const c = a.replace(/<br\s*\/?>/gi, "").replace(/ /gi, "").replace(/<[^>]+>/g, "").trim();
|
|
1459
1459
|
return c === "" && /<img\b[^>]*>/i.test(a) ? a : c === "" ? "" : a;
|
|
1460
1460
|
}
|
|
1461
|
-
function
|
|
1461
|
+
function sn(o) {
|
|
1462
1462
|
return o.replace(
|
|
1463
1463
|
/<img(?![^>]*\sloading=)([^>]*)>/gi,
|
|
1464
1464
|
'<img loading="lazy"$1>'
|
|
@@ -1466,9 +1466,9 @@ function ln(o) {
|
|
|
1466
1466
|
}
|
|
1467
1467
|
function dn(o) {
|
|
1468
1468
|
if (!o || typeof o != "object") return;
|
|
1469
|
-
const a = o, c = (
|
|
1470
|
-
if (
|
|
1471
|
-
const d =
|
|
1469
|
+
const a = o, c = (s) => {
|
|
1470
|
+
if (s && typeof s == "object" && "url" in s) {
|
|
1471
|
+
const d = s.url;
|
|
1472
1472
|
return typeof d == "string" ? d : void 0;
|
|
1473
1473
|
}
|
|
1474
1474
|
};
|
|
@@ -1497,9 +1497,9 @@ function hn(o) {
|
|
|
1497
1497
|
const a = o.split("-")[0];
|
|
1498
1498
|
return mn[a] ?? a ?? "en";
|
|
1499
1499
|
}
|
|
1500
|
-
const fn =
|
|
1500
|
+
const fn = je(
|
|
1501
1501
|
"redactor-theme-alfadocs ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"
|
|
1502
|
-
), gn =
|
|
1502
|
+
), gn = je(
|
|
1503
1503
|
[
|
|
1504
1504
|
"ds:block ds:[inline-size:100%]",
|
|
1505
1505
|
"ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
|
|
@@ -1513,7 +1513,7 @@ const fn = qe(
|
|
|
1513
1513
|
"ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
1514
1514
|
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
1515
1515
|
].join(" ")
|
|
1516
|
-
),
|
|
1516
|
+
), ct = [
|
|
1517
1517
|
"ds:inline-flex ds:items-center ds:justify-center",
|
|
1518
1518
|
"ds:[min-block-size:var(--min-target-size)] ds:[min-inline-size:var(--min-target-size)]",
|
|
1519
1519
|
"ds:text-[color:var(--primary-foreground)]",
|
|
@@ -1522,42 +1522,42 @@ const fn = qe(
|
|
|
1522
1522
|
"ds:focus-visible:outline-solid",
|
|
1523
1523
|
"ds:focus-visible:outline-[var(--primary-foreground)]",
|
|
1524
1524
|
"ds:focus-visible:[outline-offset:calc(var(--focus-ring-width)*-1)]"
|
|
1525
|
-
].join(" "), pn = `${
|
|
1525
|
+
].join(" "), pn = `${ct} ds:hover:bg-[color-mix(in_srgb,var(--primary-foreground)_15%,transparent)]`, bn = `${ct} ds:bg-[var(--destructive)] ds:hover:bg-[color-mix(in_srgb,var(--destructive)_88%,var(--primary-foreground))]`, yn = Tt(
|
|
1526
1526
|
({
|
|
1527
1527
|
id: o,
|
|
1528
1528
|
defaultValue: a,
|
|
1529
1529
|
value: c,
|
|
1530
|
-
onChange:
|
|
1530
|
+
onChange: s,
|
|
1531
1531
|
toolbar: d = "standard",
|
|
1532
1532
|
placeholder: g,
|
|
1533
1533
|
readOnly: p = !1,
|
|
1534
|
-
ariaLabel:
|
|
1534
|
+
ariaLabel: l,
|
|
1535
1535
|
minHeight: b,
|
|
1536
1536
|
showExtensions: v,
|
|
1537
1537
|
className: z,
|
|
1538
1538
|
redactor: I,
|
|
1539
1539
|
options: S,
|
|
1540
|
-
plugins:
|
|
1540
|
+
plugins: x,
|
|
1541
1541
|
lang: O,
|
|
1542
1542
|
imageUploadUrl: m,
|
|
1543
1543
|
onKeyDown: f,
|
|
1544
1544
|
onRequestAiDraft: k,
|
|
1545
|
-
aiDraftFormat:
|
|
1545
|
+
aiDraftFormat: A = "html",
|
|
1546
1546
|
aiPrivacyNotice: _,
|
|
1547
|
-
onDictate:
|
|
1547
|
+
onDictate: E,
|
|
1548
1548
|
onProofread: Y,
|
|
1549
1549
|
onAutoFormat: L
|
|
1550
|
-
},
|
|
1551
|
-
const { t: H, i18n: J } = Z(), ee = de(), me =
|
|
1550
|
+
}, q) => {
|
|
1551
|
+
const { t: H, i18n: J } = Z(), ee = de(), me = et(
|
|
1552
1552
|
() => `rte-${ee.replace(/[^a-zA-Z0-9-_]/g, "")}`,
|
|
1553
1553
|
[ee]
|
|
1554
|
-
), R = `#${me}`, G = $(null), K = $(null), he = $(!1), fe = $(p),
|
|
1554
|
+
), R = `#${me}`, G = $(null), K = $(null), he = $(!1), fe = $(p), w = $(null), D = $(null), [j, U] = T(!1), [ut, Be] = T(!1), [Fe, mt] = T(
|
|
1555
1555
|
() => /* @__PURE__ */ new Set()
|
|
1556
|
-
), ge = $(null), V = $(
|
|
1557
|
-
|
|
1558
|
-
V.current =
|
|
1559
|
-
}, [
|
|
1560
|
-
const
|
|
1556
|
+
), ge = $(null), V = $(s), ke = $(f);
|
|
1557
|
+
W(() => {
|
|
1558
|
+
V.current = s, ke.current = f;
|
|
1559
|
+
}, [s, f]);
|
|
1560
|
+
const ht = $(
|
|
1561
1561
|
(() => {
|
|
1562
1562
|
const t = c ?? a ?? "";
|
|
1563
1563
|
return t ? re(t) : "";
|
|
@@ -1572,7 +1572,7 @@ const fn = qe(
|
|
|
1572
1572
|
} catch {
|
|
1573
1573
|
}
|
|
1574
1574
|
return ((r = G.current) == null ? void 0 : r.value) ?? "";
|
|
1575
|
-
}, [R]),
|
|
1575
|
+
}, [R]), X = C(
|
|
1576
1576
|
(t, ...r) => {
|
|
1577
1577
|
const n = K.current;
|
|
1578
1578
|
if (!n) return !1;
|
|
@@ -1599,24 +1599,24 @@ const fn = qe(
|
|
|
1599
1599
|
(t, r) => {
|
|
1600
1600
|
var ye;
|
|
1601
1601
|
const n = (r == null ? void 0 : r.asHtml) ?? !0, i = n ? re(t) : t;
|
|
1602
|
-
if (
|
|
1602
|
+
if (X(n ? "insertion.insertHtml" : "insertion.insertText", i)) return;
|
|
1603
1603
|
const h = G.current;
|
|
1604
1604
|
if (!h) return;
|
|
1605
|
-
const N = h.selectionStart ?? h.value.length,
|
|
1606
|
-
h.value = h.value.slice(0, N) + i + h.value.slice(
|
|
1607
|
-
const
|
|
1605
|
+
const N = h.selectionStart ?? h.value.length, Q = h.selectionEnd ?? h.value.length;
|
|
1606
|
+
h.value = h.value.slice(0, N) + i + h.value.slice(Q);
|
|
1607
|
+
const Te = N + i.length;
|
|
1608
1608
|
try {
|
|
1609
|
-
h.setSelectionRange(
|
|
1609
|
+
h.setSelectionRange(Te, Te);
|
|
1610
1610
|
} catch {
|
|
1611
1611
|
}
|
|
1612
1612
|
(ye = V.current) == null || ye.call(V, { html: re(h.value), markdown: "" });
|
|
1613
1613
|
},
|
|
1614
|
-
[
|
|
1615
|
-
),
|
|
1614
|
+
[X]
|
|
1615
|
+
), Ae = $(null), ne = C(() => {
|
|
1616
1616
|
var i;
|
|
1617
|
-
const t = (i =
|
|
1617
|
+
const t = (i = w.current) == null ? void 0 : i.querySelector(".redactor-in"), r = typeof window < "u" ? window.getSelection() : null, n = /* @__PURE__ */ new Set();
|
|
1618
1618
|
if (t && r && r.anchorNode && t.contains(r.anchorNode) && typeof document.queryCommandState == "function") {
|
|
1619
|
-
r.rangeCount > 0 && (
|
|
1619
|
+
r.rangeCount > 0 && (Ae.current = r.getRangeAt(0).cloneRange());
|
|
1620
1620
|
try {
|
|
1621
1621
|
document.queryCommandState("bold") && n.add("bold"), document.queryCommandState("italic") && n.add("italic"), document.queryCommandState("underline") && n.add("underline"), document.queryCommandState("strikeThrough") && n.add("strike"), document.queryCommandState("insertUnorderedList") && n.add("ul"), document.queryCommandState("insertOrderedList") && n.add("ol");
|
|
1622
1622
|
const u = String(
|
|
@@ -1628,17 +1628,17 @@ const fn = qe(
|
|
|
1628
1628
|
} catch {
|
|
1629
1629
|
}
|
|
1630
1630
|
}
|
|
1631
|
-
|
|
1631
|
+
mt(
|
|
1632
1632
|
(u) => u.size === n.size && [...n].every((h) => u.has(h)) ? u : n
|
|
1633
1633
|
);
|
|
1634
1634
|
}, []), ce = C(
|
|
1635
1635
|
(t, ...r) => {
|
|
1636
|
-
|
|
1636
|
+
X(t, ...r), typeof window < "u" ? window.requestAnimationFrame(() => ne()) : ne();
|
|
1637
1637
|
},
|
|
1638
|
-
[
|
|
1638
|
+
[X, ne]
|
|
1639
1639
|
);
|
|
1640
|
-
|
|
1641
|
-
const t =
|
|
1640
|
+
W(() => {
|
|
1641
|
+
const t = w.current;
|
|
1642
1642
|
if (!t) return;
|
|
1643
1643
|
const r = {
|
|
1644
1644
|
b: ["module.inline.format", { tag: "b" }],
|
|
@@ -1658,11 +1658,11 @@ const fn = qe(
|
|
|
1658
1658
|
ie(t, { asHtml: !0 }), typeof window < "u" && window.requestAnimationFrame(() => ne());
|
|
1659
1659
|
},
|
|
1660
1660
|
[ie, ne]
|
|
1661
|
-
),
|
|
1661
|
+
), Ve = C(() => {
|
|
1662
1662
|
var r;
|
|
1663
1663
|
if (typeof window < "u") {
|
|
1664
|
-
const n = (r =
|
|
1665
|
-
n && i && i.rangeCount > 0 && i.anchorNode && n.contains(i.anchorNode) && (
|
|
1664
|
+
const n = (r = w.current) == null ? void 0 : r.querySelector(".redactor-in"), i = window.getSelection();
|
|
1665
|
+
n && i && i.rangeCount > 0 && i.anchorNode && n.contains(i.anchorNode) && (Ae.current = i.getRangeAt(0).cloneRange());
|
|
1666
1666
|
}
|
|
1667
1667
|
const t = K.current;
|
|
1668
1668
|
if (t)
|
|
@@ -1670,10 +1670,10 @@ const fn = qe(
|
|
|
1670
1670
|
t(R, "selection.save");
|
|
1671
1671
|
} catch {
|
|
1672
1672
|
}
|
|
1673
|
-
}, [R]),
|
|
1673
|
+
}, [R]), Ke = C(() => {
|
|
1674
1674
|
const t = K.current;
|
|
1675
1675
|
if (!t) return;
|
|
1676
|
-
const r =
|
|
1676
|
+
const r = Ae.current;
|
|
1677
1677
|
try {
|
|
1678
1678
|
t(R, "editor.focus");
|
|
1679
1679
|
} catch {
|
|
@@ -1691,31 +1691,31 @@ const fn = qe(
|
|
|
1691
1691
|
t(R, "selection.restore");
|
|
1692
1692
|
} catch {
|
|
1693
1693
|
}
|
|
1694
|
-
}, [R]),
|
|
1694
|
+
}, [R]), ft = C(() => {
|
|
1695
1695
|
var n;
|
|
1696
1696
|
if (typeof window > "u") return "";
|
|
1697
|
-
const t = (n =
|
|
1697
|
+
const t = (n = w.current) == null ? void 0 : n.querySelector(".redactor-in"), r = window.getSelection();
|
|
1698
1698
|
return !t || !r || !r.anchorNode || !t.contains(r.anchorNode) ? "" : r.toString();
|
|
1699
|
-
}, []),
|
|
1699
|
+
}, []), gt = C(() => {
|
|
1700
1700
|
var u;
|
|
1701
1701
|
if (typeof window > "u") return null;
|
|
1702
|
-
const t = (u =
|
|
1702
|
+
const t = (u = w.current) == null ? void 0 : u.querySelector(".redactor-in"), r = window.getSelection();
|
|
1703
1703
|
if (!t || !r || r.rangeCount === 0) return null;
|
|
1704
1704
|
const n = r.anchorNode, i = n && n.nodeType === Node.TEXT_NODE ? n.parentElement : n;
|
|
1705
1705
|
return !i || !t.contains(i) ? null : i.closest("table");
|
|
1706
|
-
}, []),
|
|
1706
|
+
}, []), Ge = $(null), we = C(() => {
|
|
1707
1707
|
var u;
|
|
1708
1708
|
if (typeof window > "u") return null;
|
|
1709
|
-
const t = (u =
|
|
1709
|
+
const t = (u = w.current) == null ? void 0 : u.querySelector(".redactor-in"), r = window.getSelection();
|
|
1710
1710
|
if (!t || !r || r.rangeCount === 0) return null;
|
|
1711
1711
|
const n = r.anchorNode, i = n && n.nodeType === Node.TEXT_NODE ? n.parentElement : n;
|
|
1712
1712
|
return !i || !t.contains(i) ? null : i.closest("td,th");
|
|
1713
|
-
}, []),
|
|
1714
|
-
|
|
1715
|
-
}, [we]),
|
|
1713
|
+
}, []), pt = C(() => {
|
|
1714
|
+
Ge.current = we();
|
|
1715
|
+
}, [we]), bt = C(
|
|
1716
1716
|
(t, r) => {
|
|
1717
1717
|
var h;
|
|
1718
|
-
const n =
|
|
1718
|
+
const n = Ge.current ?? we();
|
|
1719
1719
|
if (!n) return;
|
|
1720
1720
|
const i = t === "row" ? Array.from(((h = n.closest("tr")) == null ? void 0 : h.children) ?? [n]).filter(
|
|
1721
1721
|
(N) => N instanceof HTMLElement && (N.tagName === "TD" || N.tagName === "TH")
|
|
@@ -1735,32 +1735,32 @@ const fn = qe(
|
|
|
1735
1735
|
typeof window < "u" && window.requestAnimationFrame(() => ne());
|
|
1736
1736
|
},
|
|
1737
1737
|
[we, R, ne]
|
|
1738
|
-
),
|
|
1738
|
+
), yt = C(
|
|
1739
1739
|
(t) => {
|
|
1740
1740
|
var n;
|
|
1741
1741
|
const r = K.current;
|
|
1742
1742
|
if (r && typeof window < "u") {
|
|
1743
|
-
const i = (n =
|
|
1744
|
-
if (
|
|
1743
|
+
const i = (n = w.current) == null ? void 0 : n.querySelector(".redactor-in"), u = window.getSelection(), h = u == null ? void 0 : u.anchorNode, N = h && h.nodeType === Node.TEXT_NODE ? h.parentElement : h, Q = N && (i != null && i.contains(N)) ? N.closest("ul,ol") : null;
|
|
1744
|
+
if (Q)
|
|
1745
1745
|
try {
|
|
1746
|
-
r(R, "caret.setAfter",
|
|
1746
|
+
r(R, "caret.setAfter", Q);
|
|
1747
1747
|
} catch {
|
|
1748
1748
|
}
|
|
1749
1749
|
}
|
|
1750
1750
|
Ee(t), typeof window < "u" && window.requestAnimationFrame(() => {
|
|
1751
1751
|
var u;
|
|
1752
|
-
const i = (u =
|
|
1752
|
+
const i = (u = w.current) == null ? void 0 : u.querySelector(".redactor-in");
|
|
1753
1753
|
i == null || i.querySelectorAll("table td, table th").forEach((h) => {
|
|
1754
1754
|
let N = h.lastChild;
|
|
1755
1755
|
for (; N && N.nodeType === Node.TEXT_NODE && !(N.textContent ?? "").trim(); ) {
|
|
1756
|
-
const
|
|
1757
|
-
h.removeChild(N), N =
|
|
1756
|
+
const Q = N.previousSibling;
|
|
1757
|
+
h.removeChild(N), N = Q;
|
|
1758
1758
|
}
|
|
1759
1759
|
});
|
|
1760
1760
|
});
|
|
1761
1761
|
},
|
|
1762
1762
|
[Ee, R]
|
|
1763
|
-
),
|
|
1763
|
+
), vt = C(
|
|
1764
1764
|
async (t, r) => {
|
|
1765
1765
|
if (!m) throw new Error("No image upload URL configured.");
|
|
1766
1766
|
const n = new FormData();
|
|
@@ -1777,12 +1777,12 @@ const fn = qe(
|
|
|
1777
1777
|
return u;
|
|
1778
1778
|
},
|
|
1779
1779
|
[m]
|
|
1780
|
-
), pe = $(null), xe = $(null), [be,
|
|
1780
|
+
), pe = $(null), xe = $(null), [be, We] = T(!1), [kt, Ue] = T(!1), [wt, He] = T(""), Ce = C(() => {
|
|
1781
1781
|
const t = xe.current;
|
|
1782
1782
|
t != null && t.parentNode && t.parentNode.removeChild(t), xe.current = null;
|
|
1783
|
-
}, []),
|
|
1783
|
+
}, []), Xe = C((t) => {
|
|
1784
1784
|
var i;
|
|
1785
|
-
const r = (i =
|
|
1785
|
+
const r = (i = w.current) == null ? void 0 : i.querySelector(
|
|
1786
1786
|
".redactor-in"
|
|
1787
1787
|
);
|
|
1788
1788
|
if (!r) return;
|
|
@@ -1798,68 +1798,68 @@ const fn = qe(
|
|
|
1798
1798
|
xe.current = n;
|
|
1799
1799
|
}
|
|
1800
1800
|
n.textContent = t;
|
|
1801
|
-
}, []),
|
|
1801
|
+
}, []), Qe = C(() => {
|
|
1802
1802
|
var t;
|
|
1803
1803
|
(t = pe.current) == null || t.abort();
|
|
1804
|
-
}, []),
|
|
1805
|
-
if (!
|
|
1804
|
+
}, []), Ze = C(() => {
|
|
1805
|
+
if (!E) return;
|
|
1806
1806
|
const t = new AbortController();
|
|
1807
|
-
pe.current = t,
|
|
1807
|
+
pe.current = t, Ue(!1), We(!0), He(H("editor.ai.listening")), Ce(), E({
|
|
1808
1808
|
signal: t.signal,
|
|
1809
1809
|
// Interim text shows live in the editor (grey + caret); each final
|
|
1810
1810
|
// replaces it with committed text at the caret.
|
|
1811
1811
|
onPartialTranscript: (r) => {
|
|
1812
|
-
t.signal.aborted ||
|
|
1812
|
+
t.signal.aborted || Xe(r);
|
|
1813
1813
|
},
|
|
1814
1814
|
onFinalTranscript: (r) => {
|
|
1815
1815
|
if (t.signal.aborted) return;
|
|
1816
1816
|
Ce();
|
|
1817
1817
|
const n = r.trim();
|
|
1818
|
-
n && (ie(`${n} `, { asHtml: !1 }),
|
|
1818
|
+
n && (ie(`${n} `, { asHtml: !1 }), He(n));
|
|
1819
1819
|
}
|
|
1820
1820
|
}).catch((r) => {
|
|
1821
|
-
t.signal.aborted || r && typeof r == "object" && "name" in r && r.name === "AbortError" ||
|
|
1821
|
+
t.signal.aborted || r && typeof r == "object" && "name" in r && r.name === "AbortError" || Ue(!0);
|
|
1822
1822
|
}).finally(() => {
|
|
1823
|
-
Ce(), pe.current === t && (pe.current = null,
|
|
1823
|
+
Ce(), pe.current === t && (pe.current = null, We(!1), He(""));
|
|
1824
1824
|
});
|
|
1825
|
-
}, [
|
|
1826
|
-
be ?
|
|
1827
|
-
}, [be,
|
|
1828
|
-
|
|
1825
|
+
}, [E, ie, Ce, Xe, H]), xt = C(() => {
|
|
1826
|
+
be ? Qe() : Ze();
|
|
1827
|
+
}, [be, Ze, Qe]);
|
|
1828
|
+
W(() => () => {
|
|
1829
1829
|
var t;
|
|
1830
1830
|
return (t = pe.current) == null ? void 0 : t.abort();
|
|
1831
1831
|
}, []);
|
|
1832
|
-
const [te,
|
|
1832
|
+
const [te, Ie] = T(null), le = $(null), Ye = C(
|
|
1833
1833
|
(t, r) => {
|
|
1834
|
-
if (
|
|
1834
|
+
if (le.current) return;
|
|
1835
1835
|
const n = new AbortController();
|
|
1836
|
-
|
|
1836
|
+
le.current = n, Ie(t);
|
|
1837
1837
|
const i = ae();
|
|
1838
1838
|
Promise.resolve(r({ html: i, signal: n.signal })).then((u) => {
|
|
1839
1839
|
var N;
|
|
1840
1840
|
if (n.signal.aborted) return;
|
|
1841
1841
|
const h = re(String(u ?? ""));
|
|
1842
|
-
|
|
1842
|
+
X("source.setCode", h), (N = V.current) == null || N.call(V, { html: h, markdown: "" });
|
|
1843
1843
|
}).catch(() => {
|
|
1844
1844
|
}).finally(() => {
|
|
1845
|
-
|
|
1845
|
+
le.current === n && (le.current = null, Ie(null));
|
|
1846
1846
|
});
|
|
1847
1847
|
},
|
|
1848
|
-
[ae,
|
|
1849
|
-
),
|
|
1848
|
+
[ae, X]
|
|
1849
|
+
), Je = C(() => {
|
|
1850
1850
|
var t;
|
|
1851
|
-
(t =
|
|
1851
|
+
(t = le.current) == null || t.abort(), le.current = null, Ie(null);
|
|
1852
1852
|
}, []);
|
|
1853
|
-
|
|
1853
|
+
W(() => () => {
|
|
1854
1854
|
var t;
|
|
1855
|
-
return (t =
|
|
1856
|
-
}, []),
|
|
1855
|
+
return (t = le.current) == null ? void 0 : t.abort();
|
|
1856
|
+
}, []), W(() => {
|
|
1857
1857
|
const t = G.current;
|
|
1858
1858
|
if (!t) return;
|
|
1859
|
-
t.value =
|
|
1859
|
+
t.value = ht.current;
|
|
1860
1860
|
const r = cn(I);
|
|
1861
1861
|
if (!r) {
|
|
1862
|
-
|
|
1862
|
+
U(!0);
|
|
1863
1863
|
return;
|
|
1864
1864
|
}
|
|
1865
1865
|
K.current = r;
|
|
@@ -1868,7 +1868,7 @@ const fn = qe(
|
|
|
1868
1868
|
// The kit renders its OWN toolbar (EditorToolbar) and drives Redactor
|
|
1869
1869
|
// via the command API, so Redactor's native toolbar is suppressed.
|
|
1870
1870
|
toolbar: !1,
|
|
1871
|
-
plugins:
|
|
1871
|
+
plugins: x ?? [],
|
|
1872
1872
|
placeholder: g ?? H("editor.placeholder"),
|
|
1873
1873
|
toolbarFixed: !1,
|
|
1874
1874
|
// Platform parity (RedactorWysiwyg.js:84): no inline shortcode expansion.
|
|
@@ -1887,15 +1887,15 @@ const fn = qe(
|
|
|
1887
1887
|
callbacks: {
|
|
1888
1888
|
...u,
|
|
1889
1889
|
changed(N) {
|
|
1890
|
-
const
|
|
1890
|
+
const Q = qe(sn(N)), Te = re(Q);
|
|
1891
1891
|
he.current = !0, V.current && (ge.current && clearTimeout(ge.current), ge.current = setTimeout(() => {
|
|
1892
1892
|
var ye;
|
|
1893
|
-
(ye = V.current) == null || ye.call(V, { html:
|
|
1893
|
+
(ye = V.current) == null || ye.call(V, { html: Te, markdown: "" });
|
|
1894
1894
|
}, 100));
|
|
1895
1895
|
},
|
|
1896
1896
|
keydown(N) {
|
|
1897
|
-
var
|
|
1898
|
-
(
|
|
1897
|
+
var Q;
|
|
1898
|
+
(Q = ke.current) == null || Q.call(ke, N);
|
|
1899
1899
|
},
|
|
1900
1900
|
observe() {
|
|
1901
1901
|
ne();
|
|
@@ -1909,7 +1909,7 @@ const fn = qe(
|
|
|
1909
1909
|
} catch {
|
|
1910
1910
|
}
|
|
1911
1911
|
} catch {
|
|
1912
|
-
|
|
1912
|
+
U(!0);
|
|
1913
1913
|
}
|
|
1914
1914
|
return () => {
|
|
1915
1915
|
ge.current && clearTimeout(ge.current);
|
|
@@ -1919,15 +1919,15 @@ const fn = qe(
|
|
|
1919
1919
|
}
|
|
1920
1920
|
K.current = null;
|
|
1921
1921
|
};
|
|
1922
|
-
}, []),
|
|
1922
|
+
}, []), W(() => {
|
|
1923
1923
|
if (!K.current || c === void 0) return;
|
|
1924
1924
|
if (he.current) {
|
|
1925
1925
|
he.current = !1;
|
|
1926
1926
|
return;
|
|
1927
1927
|
}
|
|
1928
|
-
const t = re(
|
|
1929
|
-
|
|
1930
|
-
}, [c, ae,
|
|
1928
|
+
const t = re(qe(c));
|
|
1929
|
+
qe(ae()) !== t && X("source.setCode", t);
|
|
1930
|
+
}, [c, ae, X]), W(() => {
|
|
1931
1931
|
fe.current = p;
|
|
1932
1932
|
const t = K.current;
|
|
1933
1933
|
if (t)
|
|
@@ -1935,14 +1935,14 @@ const fn = qe(
|
|
|
1935
1935
|
t(R, p ? "enableReadOnly" : "disableReadOnly");
|
|
1936
1936
|
} catch {
|
|
1937
1937
|
}
|
|
1938
|
-
}, [p, R]),
|
|
1939
|
-
if (!
|
|
1938
|
+
}, [p, R]), W(() => {
|
|
1939
|
+
if (!j || c === void 0) return;
|
|
1940
1940
|
const t = G.current;
|
|
1941
1941
|
if (!t) return;
|
|
1942
1942
|
const r = re(c);
|
|
1943
1943
|
t.value !== r && document.activeElement !== t && (t.value = r);
|
|
1944
|
-
}, [
|
|
1945
|
-
const
|
|
1944
|
+
}, [j, c]);
|
|
1945
|
+
const Le = et(
|
|
1946
1946
|
() => ({
|
|
1947
1947
|
getHTML() {
|
|
1948
1948
|
return ae();
|
|
@@ -1955,7 +1955,7 @@ const fn = qe(
|
|
|
1955
1955
|
},
|
|
1956
1956
|
setContent(t) {
|
|
1957
1957
|
const r = re(t);
|
|
1958
|
-
|
|
1958
|
+
X("source.setCode", r) || G.current && (G.current.value = r);
|
|
1959
1959
|
},
|
|
1960
1960
|
insertAtCursor: ie,
|
|
1961
1961
|
applyFormat(t) {
|
|
@@ -1974,13 +1974,13 @@ const fn = qe(
|
|
|
1974
1974
|
(r = G.current) == null || r.focus();
|
|
1975
1975
|
},
|
|
1976
1976
|
clear() {
|
|
1977
|
-
|
|
1977
|
+
X("source.setCode", "") || G.current && (G.current.value = "");
|
|
1978
1978
|
}
|
|
1979
1979
|
}),
|
|
1980
|
-
[R, ae,
|
|
1980
|
+
[R, ae, X, ie, ce]
|
|
1981
1981
|
);
|
|
1982
|
-
zt(
|
|
1983
|
-
const
|
|
1982
|
+
zt(q, () => Le, [Le]), Rt(Pr, Le, o);
|
|
1983
|
+
const Ct = C(
|
|
1984
1984
|
(t) => {
|
|
1985
1985
|
var r;
|
|
1986
1986
|
(r = V.current) == null || r.call(V, {
|
|
@@ -1989,86 +1989,102 @@ const fn = qe(
|
|
|
1989
1989
|
});
|
|
1990
1990
|
},
|
|
1991
1991
|
[]
|
|
1992
|
-
),
|
|
1993
|
-
|
|
1992
|
+
), Ne = l ?? H("editor.regionLabel"), Nt = g ?? H("editor.placeholder");
|
|
1993
|
+
W(() => {
|
|
1994
|
+
var i;
|
|
1995
|
+
if (j) return;
|
|
1996
|
+
const t = (i = w.current) == null ? void 0 : i.querySelector(".redactor-in");
|
|
1997
|
+
if (!t) return;
|
|
1998
|
+
const r = () => {
|
|
1999
|
+
t.getAttribute("role") !== "textbox" && t.setAttribute("role", "textbox"), t.getAttribute("aria-multiline") !== "true" && t.setAttribute("aria-multiline", "true"), t.getAttribute("aria-label") !== Ne && t.setAttribute("aria-label", Ne), t.hasAttribute("aria-labelledby") && t.removeAttribute("aria-labelledby");
|
|
2000
|
+
};
|
|
2001
|
+
r();
|
|
2002
|
+
const n = new MutationObserver(r);
|
|
2003
|
+
return n.observe(t, {
|
|
2004
|
+
attributes: !0,
|
|
2005
|
+
attributeFilter: ["role", "aria-labelledby"]
|
|
2006
|
+
}), () => n.disconnect();
|
|
2007
|
+
}, [j, Ne]);
|
|
2008
|
+
const $e = te !== null, ue = [];
|
|
2009
|
+
return E && ue.push({
|
|
1994
2010
|
key: "dictate",
|
|
1995
|
-
icon: be ? /* @__PURE__ */ e(
|
|
2011
|
+
icon: be ? /* @__PURE__ */ e(_e, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : /* @__PURE__ */ e(lt, { "aria-hidden": "true", className: "ds:size-5" }),
|
|
1996
2012
|
label: H(be ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
|
|
1997
|
-
onClick:
|
|
2013
|
+
onClick: xt,
|
|
1998
2014
|
recording: be
|
|
1999
2015
|
}), Y && ue.push({
|
|
2000
2016
|
key: "proofread",
|
|
2001
2017
|
// While running, the segment becomes a STOP/cancel button (progress is
|
|
2002
2018
|
// shown by the scrim spinner).
|
|
2003
|
-
icon: te === "proofread" ? /* @__PURE__ */ e(
|
|
2019
|
+
icon: te === "proofread" ? /* @__PURE__ */ e(_e, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : /* @__PURE__ */ e(Sr, { "aria-hidden": "true", className: "ds:size-5" }),
|
|
2004
2020
|
label: te === "proofread" ? H("common.cancel") : H("editor.ai.proofread", "Check spelling & grammar"),
|
|
2005
|
-
onClick: te === "proofread" ?
|
|
2021
|
+
onClick: te === "proofread" ? Je : () => Ye("proofread", Y),
|
|
2006
2022
|
running: te === "proofread"
|
|
2007
2023
|
}), L && ue.push({
|
|
2008
2024
|
key: "format",
|
|
2009
|
-
icon: te === "format" ? /* @__PURE__ */ e(
|
|
2025
|
+
icon: te === "format" ? /* @__PURE__ */ e(_e, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : /* @__PURE__ */ e(qr, { "aria-hidden": "true", className: "ds:size-5" }),
|
|
2010
2026
|
label: te === "format" ? H("common.cancel") : H("editor.ai.autoFormat", "Auto-format document"),
|
|
2011
|
-
onClick: te === "format" ?
|
|
2027
|
+
onClick: te === "format" ? Je : () => Ye("format", L),
|
|
2012
2028
|
running: te === "format"
|
|
2013
2029
|
}), k && ue.push({
|
|
2014
2030
|
key: "write",
|
|
2015
2031
|
icon: /* @__PURE__ */ e(Bt, { "aria-hidden": "true", className: "ds:size-5" }),
|
|
2016
2032
|
label: H("editor.ai.helpMeWrite"),
|
|
2017
2033
|
onClick: () => {
|
|
2018
|
-
|
|
2034
|
+
Ve(), Be(!0);
|
|
2019
2035
|
}
|
|
2020
2036
|
}), /* @__PURE__ */ y(
|
|
2021
2037
|
"div",
|
|
2022
2038
|
{
|
|
2023
|
-
ref:
|
|
2039
|
+
ref: w,
|
|
2024
2040
|
className: [fn(), z].filter(Boolean).join(" "),
|
|
2025
2041
|
"data-component": "rich-text-editor",
|
|
2026
2042
|
"data-component-id": o,
|
|
2027
2043
|
"data-min-height": b,
|
|
2028
2044
|
children: [
|
|
2029
|
-
!
|
|
2030
|
-
|
|
2045
|
+
!j && !p ? /* @__PURE__ */ e(
|
|
2046
|
+
ln,
|
|
2031
2047
|
{
|
|
2032
2048
|
run: ce,
|
|
2033
|
-
active:
|
|
2049
|
+
active: Fe,
|
|
2034
2050
|
preset: d,
|
|
2035
2051
|
insertHtml: Ee,
|
|
2036
|
-
insertTable:
|
|
2037
|
-
saveSelection:
|
|
2038
|
-
restoreSelection:
|
|
2039
|
-
getSelectedText:
|
|
2040
|
-
uploadImage: m ?
|
|
2041
|
-
enableColor: (
|
|
2052
|
+
insertTable: yt,
|
|
2053
|
+
saveSelection: Ve,
|
|
2054
|
+
restoreSelection: Ke,
|
|
2055
|
+
getSelectedText: ft,
|
|
2056
|
+
uploadImage: m ? vt : void 0,
|
|
2057
|
+
enableColor: (x == null ? void 0 : x.includes("fontcolor")) ?? !1,
|
|
2042
2058
|
enableImage: !!m,
|
|
2043
|
-
enableTable: (
|
|
2059
|
+
enableTable: (x == null ? void 0 : x.includes("table")) ?? !1,
|
|
2044
2060
|
showExtensions: v
|
|
2045
2061
|
}
|
|
2046
2062
|
) : null,
|
|
2047
|
-
/* @__PURE__ */ y("div", { className: "ds:relative", ref:
|
|
2063
|
+
/* @__PURE__ */ y("div", { className: "ds:relative", ref: D, children: [
|
|
2048
2064
|
/* @__PURE__ */ e(
|
|
2049
2065
|
"textarea",
|
|
2050
2066
|
{
|
|
2051
2067
|
ref: G,
|
|
2052
2068
|
id: me,
|
|
2053
|
-
"aria-label":
|
|
2069
|
+
"aria-label": Ne,
|
|
2054
2070
|
"aria-multiline": "true",
|
|
2055
|
-
"aria-busy":
|
|
2071
|
+
"aria-busy": $e || void 0,
|
|
2056
2072
|
placeholder: Nt,
|
|
2057
|
-
onChange:
|
|
2058
|
-
readOnly:
|
|
2059
|
-
className:
|
|
2073
|
+
onChange: j ? Ct : void 0,
|
|
2074
|
+
readOnly: j ? p : void 0,
|
|
2075
|
+
className: j ? gn() : void 0
|
|
2060
2076
|
}
|
|
2061
2077
|
),
|
|
2062
|
-
|
|
2078
|
+
$e ? /* @__PURE__ */ e(
|
|
2063
2079
|
"div",
|
|
2064
2080
|
{
|
|
2065
2081
|
"aria-hidden": "true",
|
|
2066
2082
|
className: "ds:absolute ds:inset-0 ds:z-[5] ds:flex ds:items-center ds:justify-center ds:cursor-wait ds:rounded-[var(--radius-md)] ds:bg-[color-mix(in_srgb,var(--background)_40%,transparent)]",
|
|
2067
|
-
children: /* @__PURE__ */ e(
|
|
2083
|
+
children: /* @__PURE__ */ e(it, { size: "lg", variant: "prism" })
|
|
2068
2084
|
}
|
|
2069
2085
|
) : null,
|
|
2070
2086
|
/* @__PURE__ */ y("div", { className: "ds:sticky ds:bottom-0 ds:z-10", children: [
|
|
2071
|
-
ue.length > 0 ? /* @__PURE__ */ e("div", { className: "ds:absolute ds:[inset-block-end:var(--spacing-md)] ds:[inset-inline-end:var(--spacing-md)] ds:z-10 ds:flex ds:items-center ds:overflow-hidden ds:rounded-full ds:bg-[var(--primary)] ds:bg-[image:var(--gradient-brand)] ds:shadow-[0_8px_24px_color-mix(in_srgb,var(--primary)_35%,transparent)]", children: ue.map((t, r) => /* @__PURE__ */ y(
|
|
2087
|
+
ue.length > 0 ? /* @__PURE__ */ e("div", { className: "ds:absolute ds:[inset-block-end:var(--spacing-md)] ds:[inset-inline-end:var(--spacing-md)] ds:z-10 ds:flex ds:items-center ds:overflow-hidden ds:rounded-full ds:bg-[var(--primary)] ds:bg-[image:var(--gradient-brand)] ds:shadow-[0_8px_24px_color-mix(in_srgb,var(--primary)_35%,transparent)]", children: ue.map((t, r) => /* @__PURE__ */ y(at, { children: [
|
|
2072
2088
|
r > 0 ? /* @__PURE__ */ e(
|
|
2073
2089
|
"span",
|
|
2074
2090
|
{
|
|
@@ -2083,7 +2099,7 @@ const fn = qe(
|
|
|
2083
2099
|
onClick: t.onClick,
|
|
2084
2100
|
"aria-pressed": t.recording || void 0,
|
|
2085
2101
|
"aria-busy": t.running || void 0,
|
|
2086
|
-
disabled:
|
|
2102
|
+
disabled: $e && !t.running || void 0,
|
|
2087
2103
|
"aria-label": t.label,
|
|
2088
2104
|
title: t.label,
|
|
2089
2105
|
className: t.recording ? bn : pn,
|
|
@@ -2094,33 +2110,33 @@ const fn = qe(
|
|
|
2094
2110
|
k ? /* @__PURE__ */ e(
|
|
2095
2111
|
Kr,
|
|
2096
2112
|
{
|
|
2097
|
-
open:
|
|
2098
|
-
onClose: () =>
|
|
2113
|
+
open: ut,
|
|
2114
|
+
onClose: () => Be(!1),
|
|
2099
2115
|
onRequestAiDraft: k,
|
|
2100
2116
|
onInsert: (t) => {
|
|
2101
|
-
|
|
2117
|
+
Ke(), ie(t, { asHtml: A !== "text" });
|
|
2102
2118
|
},
|
|
2103
|
-
previewAsHtml:
|
|
2119
|
+
previewAsHtml: A !== "text",
|
|
2104
2120
|
privacyNotice: _,
|
|
2105
|
-
onDictate:
|
|
2121
|
+
onDictate: E
|
|
2106
2122
|
}
|
|
2107
2123
|
) : null
|
|
2108
2124
|
] }),
|
|
2109
|
-
!
|
|
2125
|
+
!j && !p && ((x == null ? void 0 : x.includes("table")) ?? !1) ? /* @__PURE__ */ e(
|
|
2110
2126
|
an,
|
|
2111
2127
|
{
|
|
2112
|
-
active:
|
|
2128
|
+
active: Fe,
|
|
2113
2129
|
run: ce,
|
|
2114
|
-
areaRef:
|
|
2115
|
-
getActiveTableEl:
|
|
2116
|
-
enableColor: (
|
|
2117
|
-
saveTableCell:
|
|
2118
|
-
applyTableBackground:
|
|
2130
|
+
areaRef: D,
|
|
2131
|
+
getActiveTableEl: gt,
|
|
2132
|
+
enableColor: (x == null ? void 0 : x.includes("fontcolor")) ?? !1,
|
|
2133
|
+
saveTableCell: pt,
|
|
2134
|
+
applyTableBackground: bt
|
|
2119
2135
|
}
|
|
2120
2136
|
) : null
|
|
2121
2137
|
] }),
|
|
2122
|
-
|
|
2123
|
-
|
|
2138
|
+
E ? /* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: wt }) : null,
|
|
2139
|
+
E && kt ? /* @__PURE__ */ e(
|
|
2124
2140
|
"p",
|
|
2125
2141
|
{
|
|
2126
2142
|
role: "alert",
|
|
@@ -2139,4 +2155,4 @@ export {
|
|
|
2139
2155
|
Pr as r,
|
|
2140
2156
|
fn as w
|
|
2141
2157
|
};
|
|
2142
|
-
//# sourceMappingURL=rich-text-editor-
|
|
2158
|
+
//# sourceMappingURL=rich-text-editor-DlCqPixb.js.map
|