@alfadocs/ui-kit 0.68.0 → 0.69.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/{accordion-9lJSMMsZ.js → accordion-DnIa7OHX.js} +69 -47
- package/dist/_chunks/actions-cell-renderer-DrcaxB0w.js +2061 -0
- package/dist/_chunks/address-autocomplete-BEX9PXty.js +496 -0
- package/dist/_chunks/{agenda-card.agent-B_R47-c9.js → agenda-card.agent-mTCrkKSZ.js} +6 -1
- package/dist/_chunks/{agenda-tray-T-BumlGZ.js → agenda-tray-g0kg7HwB.js} +36 -24
- package/dist/_chunks/{ai-consent-banner-Dxtx_WAh.js → ai-consent-banner-CXlsNX1c.js} +3 -3
- package/dist/_chunks/{ai-prompt-input-BwEACCPm.js → ai-prompt-input-CuhTo9mh.js} +80 -61
- package/dist/_chunks/{ai-tools-rail-CInA_1-E.js → ai-tools-rail-BA_sqy1A.js} +87 -70
- package/dist/_chunks/{alia-sidebar-Ckv0yCKi.js → alia-sidebar-B47qRQb5.js} +5 -5
- package/dist/_chunks/{anamnesis-card-N8pIKWuS.js → anamnesis-card-DRmE24OQ.js} +2 -2
- package/dist/_chunks/{appointment-tray-BMl89NPW.js → appointment-tray-CZtvtaH-.js} +32 -20
- package/dist/_chunks/{audio-recorder-DjXLP4aF.js → audio-recorder-DYXXnGug.js} +59 -56
- package/dist/_chunks/{autocomplete-CcCFlVf-.js → autocomplete-DOeGouCL.js} +157 -132
- package/dist/_chunks/bishop-score-PJI3AXzA.js +304 -0
- package/dist/_chunks/bmi-calculator-BZtIJ53x.js +434 -0
- package/dist/_chunks/{booking-L8-YP8BJ.js → booking-C3VqFReX.js} +420 -397
- package/dist/_chunks/{breadcrumb-OTbaY70e.js → breadcrumb-CchdeG7d.js} +42 -28
- package/dist/_chunks/{calculator-dialog-CFk4I91b.js → calculator-dialog-BR5iU0kf.js} +2 -2
- package/dist/_chunks/{calendar-oYWOCrnf.js → calendar-CZUjL8SZ.js} +258 -201
- package/dist/_chunks/{care-plan-card-BwVUyUBb.js → care-plan-card-CvFGXa2z.js} +10 -6
- package/dist/_chunks/{care-plan-entry-card-VzdQHcOL.js → care-plan-entry-card-C3E_gClk.js} +17 -13
- package/dist/_chunks/{carousel.agent-vt21A_el.js → carousel.agent-4v8Emr9E.js} +219 -198
- package/dist/_chunks/{chart-Cg3e9EH9.js → chart-CMr3eW62.js} +150 -109
- package/dist/_chunks/{chat-container-ogB4OskO.js → chat-container-DWho5hPR.js} +47 -34
- package/dist/_chunks/{chat-input-B5zjNEUN.js → chat-input-BcXTetgM.js} +57 -41
- package/dist/_chunks/{checkbox-DRcOdmXv.js → checkbox-BuZ1u__2.js} +41 -27
- package/dist/_chunks/{checkbox-group-CpUwlHug.js → checkbox-group-PqNmQ-cE.js} +3 -3
- package/dist/_chunks/{clinical-note-card-gtrxv6zn.js → clinical-note-card-DqQYf_D4.js} +2 -2
- package/dist/_chunks/{collapsible-X3oaLPU3.js → collapsible-BrnRiCC6.js} +26 -23
- package/dist/_chunks/{color-picker-FXpItIaF.js → color-picker-C_fZl6sA.js} +124 -112
- package/dist/_chunks/{combobox-BC-DFx8G.js → combobox-Clum7gJ1.js} +165 -128
- package/dist/_chunks/{command-palette-BiPAAno-.js → command-palette-CJzmc5pC.js} +87 -64
- package/dist/_chunks/{contact-profile-card-7BMB85T6.js → contact-profile-card-Dramqa9C.js} +13 -11
- package/dist/_chunks/{copy-field-CCq7j6Zc.js → copy-field-Bjw9u2cV.js} +42 -35
- package/dist/_chunks/counter-dRlTNC_y.js +55 -0
- package/dist/_chunks/{cycle-calculator-BF0ointe.js → cycle-calculator-DmRGJNaT.js} +3 -3
- package/dist/_chunks/{date-picker-oGg5BnXL.js → date-picker-Dl9RKxaV.js} +76 -57
- package/dist/_chunks/{date-range-picker-C5BWfH_T.js → date-range-picker-CTUeR6Bj.js} +73 -46
- package/dist/_chunks/{date-time-picker-Ze1My59T.js → date-time-picker-BhoogS5Q.js} +64 -40
- package/dist/_chunks/{dependent-selector-DpzGtr_J.js → dependent-selector-CG_FOHya.js} +44 -30
- package/dist/_chunks/{dialog-DMGnSelc.js → dialog-ZNuboNmy.js} +35 -28
- package/dist/_chunks/{document-scanner-D2qehl3-.js → document-scanner-CTubA0-N.js} +12 -4
- package/dist/_chunks/{dropdown-menu-DwwPovMZ.js → dropdown-menu-qrxjymfw.js} +94 -93
- package/dist/_chunks/{due-date-calculator-DU9AEWNy.js → due-date-calculator-BTmsIQqD.js} +4 -4
- package/dist/_chunks/editable-currency-cell-renderer-kgqp_mIw.js +448 -0
- package/dist/_chunks/{email-input-lQivsFrw.js → email-input-B_Y55f5G.js} +3 -3
- package/dist/_chunks/{fetal-weight-BVSzOhuR.js → fetal-weight-CRz7KE2D.js} +2 -2
- package/dist/_chunks/{file-upload-BosbPDb1.js → file-upload-5ScQd4fE.js} +118 -100
- package/dist/_chunks/{fiscal-code-input-DPtqluVb.js → fiscal-code-input-Cf-8O4Fj.js} +76 -63
- package/dist/_chunks/{freemium-paywall-CkWjv3o6.js → freemium-paywall-DZ2mBS3w.js} +78 -71
- package/dist/_chunks/{gestational-age-calculator-DBlFdoiP.js → gestational-age-calculator-BleUdhbI.js} +5 -5
- package/dist/_chunks/{hcg-doubling-if4Q8aSX.js → hcg-doubling-CnjDXX6U.js} +3 -3
- package/dist/_chunks/{header-settings-CNOqIhoW.js → header-settings-DJqoAl5m.js} +86 -46
- package/dist/_chunks/{index.modern-D2LGACWg.js → index.modern-Zta-A4Jm.js} +3 -3
- package/dist/_chunks/{list-BOwqwy03.js → list-DgE1xWBM.js} +99 -84
- package/dist/_chunks/{locale-picker-C9JmBht3.js → locale-picker-ChYYSX2N.js} +47 -35
- package/dist/_chunks/{map-view-Tb5VfK9Y.js → map-view-BkOoGoX2.js} +160 -115
- package/dist/_chunks/{marketplace-app-shell-D4-T9Qzz.js → marketplace-app-shell-6T9W4Knl.js} +4 -4
- package/dist/_chunks/{message-card.agent-4IeIgrnJ.js → message-card.agent-ZLhx3Bs5.js} +6 -1
- package/dist/_chunks/{message-tray-CVyJajVJ.js → message-tray-DwrBLJlf.js} +90 -48
- package/dist/_chunks/{multi-select-BcPylvHR.js → multi-select-BdHHDrRN.js} +196 -153
- package/dist/_chunks/{navigation-menu-C6lBYVv9.js → navigation-menu-DRUi6sSj.js} +75 -42
- package/dist/_chunks/{notification-card.agent-Rqt3ofk9.js → notification-card.agent-DxGBZb8T.js} +5 -1
- package/dist/_chunks/{notification-tray-DlgenTEe.js → notification-tray-Btb9oQeZ.js} +112 -97
- package/dist/_chunks/{number-input-Dj5L3pXK.js → number-input-DxphVG_A.js} +36 -27
- package/dist/_chunks/{operator-hero-f_KaRhw5.js → operator-hero-CP2Nhupm.js} +12 -8
- package/dist/_chunks/{otp-input-xQ4Ps5VY.js → otp-input-DzBQ-CpE.js} +52 -33
- package/dist/_chunks/{pagination-DQOgnxxw.js → pagination-D58kglCr.js} +181 -162
- package/dist/_chunks/{patient-search-DR9XUYRQ.js → patient-search-CBC_ySF6.js} +69 -60
- package/dist/_chunks/{patient-shell-BfgufL_q.js → patient-shell-DV3XEtIB.js} +3 -3
- package/dist/_chunks/{patient-summary-card-hEmr4eTW.js → patient-summary-card-B836_fDB.js} +95 -103
- package/dist/_chunks/patient-table-CDuosVru.js +889 -0
- package/dist/_chunks/{payment-form-nXocS_MX.js → payment-form-DvjwYVIT.js} +56 -44
- package/dist/_chunks/{payment-request-card-CYE5vhZ0.js → payment-request-card-DioWKBUq.js} +2 -2
- package/dist/_chunks/{pdf-viewer-GsfNqeeT.js → pdf-viewer-D6BPfW2D.js} +205 -157
- package/dist/_chunks/{periodontal-chart-card-Dh3KgvYG.js → periodontal-chart-card-BuDEMbHE.js} +2 -2
- package/dist/_chunks/{phone-input-DVXhNlIl.js → phone-input-DjU-XmO_.js} +64 -47
- package/dist/_chunks/{popover-DTbfAuR0.js → popover-B2qCDhJC.js} +37 -32
- package/dist/_chunks/{practice-results-DND2SAt7.js → practice-results-KrTHqZua.js} +278 -242
- package/dist/_chunks/{pregnancy-dating-QY-sqpvj.js → pregnancy-dating-DORUAOHB.js} +6 -6
- package/dist/_chunks/{pregnancy-weight-gain-DOJXXNYP.js → pregnancy-weight-gain-DVz4rr7-.js} +3 -3
- package/dist/_chunks/{privacy-lock-C7JyMf0y.js → privacy-lock-BzMLQu-j.js} +32 -28
- package/dist/_chunks/{product-hub-panel-CAXDFeGP.js → product-hub-panel-e6pW220e.js} +45 -27
- package/dist/_chunks/{progress-kzIRcdaq.js → progress-DA413-zn.js} +2 -2
- package/dist/_chunks/{public-footer.agent-CfXuW1x6.js → public-footer.agent-D0cFbjWl.js} +151 -146
- package/dist/_chunks/{public-header.agent-BOhJgZEU.js → public-header.agent-DqkqA-ca.js} +107 -102
- package/dist/_chunks/{qr-code-DNXhi6se.js → qr-code-CPkEs5mG.js} +52 -46
- package/dist/_chunks/{radio-group-CLjK-SlK.js → radio-group-BPt7pKZW.js} +5 -5
- package/dist/_chunks/{recaptcha-widget-BCNHsgqt.js → recaptcha-widget-BC-4To9b.js} +9 -2
- package/dist/_chunks/registry-DvAUVLHh.js +51 -0
- package/dist/_chunks/{resizable-3vzqDlg6.js → resizable-DVGcfOrk.js} +193 -173
- package/dist/_chunks/{reviews-panel-DBktKm7i.js → reviews-panel-Dq7LMDcH.js} +87 -68
- package/dist/_chunks/{rich-text-editor-VawKN1FI.js → rich-text-editor-BsV7zUdg.js} +736 -647
- package/dist/_chunks/{search-bar-SY2BcV2N.js → search-bar-C_T3pBJn.js} +105 -78
- package/dist/_chunks/{search-input-DbxrnHkW.js → search-input-DQvGxR74.js} +2 -2
- package/dist/_chunks/{search-input.agent-CfZvViOd.js → search-input.agent-DRH54coT.js} +19 -4
- package/dist/_chunks/{select-CEtRcon5.js → select-DMLG44F5.js} +72 -56
- package/dist/_chunks/{session-countdown-LPnhTHjn.js → session-countdown-X1Ki6i0M.js} +3 -3
- package/dist/_chunks/{sheet-taJer-Ha.js → sheet-BxsE7eQm.js} +59 -45
- package/dist/_chunks/{sidebar-DaB4ulxH.js → sidebar-DY9jGjgt.js} +254 -248
- package/dist/_chunks/{sign-document-CdAiHiCh.js → sign-document-B4DeRhTe.js} +75 -49
- package/dist/_chunks/{signature-capture-COi0Uiqu.js → signature-capture-Ct_4Md4e.js} +138 -104
- package/dist/_chunks/{slider-BHWzXdjt.js → slider-DN1CWkKB.js} +85 -65
- package/dist/_chunks/{sparkline-DGhCSw8M.js → sparkline-iOXYgvJe.js} +75 -53
- package/dist/_chunks/{stepper-accordion.agent-C4quJ-MD.js → stepper-accordion.agent-cmEguIdx.js} +7 -1
- package/dist/_chunks/{stepper-progress-DDjq5nei.js → stepper-progress-Bv0njx4g.js} +30 -24
- package/dist/_chunks/{suggestion-chip.agent-6sNWFj7m.js → suggestion-chip.agent-Brn3CiFE.js} +9 -8
- package/dist/_chunks/{switch-BJ6HD3Mn.js → switch-OILsBLWo.js} +25 -19
- package/dist/_chunks/{tabs-BIQ0ew1T.js → tabs-BxcOziCo.js} +67 -58
- package/dist/_chunks/{task-card.agent-CUPKYd7w.js → task-card.agent-Bt14CzUd.js} +4 -1
- package/dist/_chunks/{task-tray-CAncV-QQ.js → task-tray-qOEQflu4.js} +74 -57
- package/dist/_chunks/{text-area-BIx0tZ05.js → text-area-Bt3p7Pt0.js} +41 -34
- package/dist/_chunks/{text-input-BaClJL8Y.js → text-input-B-OWQ1Je.js} +15 -8
- package/dist/_chunks/{theme-toggle-DETmSu_h.js → theme-toggle-XB6o_lgs.js} +38 -26
- package/dist/_chunks/{time-picker-B5umYwfv.js → time-picker-BPlJWm8w.js} +41 -31
- package/dist/_chunks/{timeline-DQa5Tyz4.js → timeline-CqA4nKTI.js} +33 -25
- package/dist/_chunks/{toast.agent-vuLRRn2a.js → toast.agent-57UzyR9U.js} +62 -45
- package/dist/_chunks/{tooth-scheme-BIx1O2aJ.js → tooth-scheme-yBr53cvv.js} +421 -348
- package/dist/_chunks/{transcript-panel-CLHmv83g.js → transcript-panel-3THQX6nJ.js} +47 -33
- package/dist/_chunks/unit-converter-YEpD9evj.js +337 -0
- package/dist/_chunks/{use-password-requirements-DsgduV1x.js → use-password-requirements-BXvS2MBS.js} +131 -117
- package/dist/_chunks/users-MBVtUzwd.js +17 -0
- package/dist/_chunks/warning-stack-BsgaEbL8.js +283 -0
- package/dist/_chunks/{whatsapp-button-DUjlWGKf.js → whatsapp-button-BIy6NaJK.js} +6 -3
- package/dist/_chunks/{workflow-map-JAZryZJr.js → workflow-map-Bdam9pGp.js} +99 -88
- package/dist/agent/index.d.ts +4 -4
- package/dist/agent/index.js +36 -0
- package/dist/agent/registry.d.ts +33 -0
- package/dist/agent/types.d.ts +78 -2
- package/dist/agent-catalog.json +6905 -509
- package/dist/agent-i18n/en.json +1175 -0
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/address-autocomplete/address-autocomplete.agent.d.ts +4 -0
- package/dist/components/address-autocomplete/address-autocomplete.d.ts +18 -0
- package/dist/components/address-autocomplete/index.d.ts +2 -1
- package/dist/components/address-autocomplete/index.js +3 -2
- 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-prompt-input/index.js +1 -1
- package/dist/components/ai-tools-rail/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/appointment-card/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/bishop-score/bishop-score.agent.d.ts +4 -0
- package/dist/components/bishop-score/bishop-score.d.ts +17 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/bmi-calculator.agent.d.ts +4 -0
- package/dist/components/bmi-calculator/bmi-calculator.d.ts +26 -0
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/calendar/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/carousel/index.js +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/chat-container/index.js +1 -1
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/command-palette/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/copy-field/index.js +1 -1
- package/dist/components/counter/counter.d.ts +22 -0
- package/dist/components/counter/index.d.ts +3 -0
- package/dist/components/counter/index.js +5 -0
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +31 -30
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/dropdown-menu/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +1 -1
- package/dist/components/email-input/index.js +1 -1
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/fiscal-code-input/index.js +1 -1
- package/dist/components/freemium-paywall/freemium-paywall.d.ts +6 -0
- 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/header-settings/index.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/list/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/navigation-menu/index.js +1 -1
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/otp-input/index.js +1 -1
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/password-input/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/cell-renderers/balance-badge-cell.d.ts +13 -0
- package/dist/components/patient-table/cell-renderers/care-plan-status-cell.d.ts +43 -0
- package/dist/components/patient-table/cell-renderers/contact-cell.d.ts +45 -0
- package/dist/components/patient-table/cell-renderers/next-appointment-cell.d.ts +24 -0
- package/dist/components/patient-table/cell-renderers/patient-identity-cell.d.ts +26 -0
- package/dist/components/patient-table/columns.d.ts +102 -0
- package/dist/components/patient-table/index.d.ts +24 -0
- package/dist/components/patient-table/index.js +13 -0
- package/dist/components/patient-table/patient-table.d.ts +138 -0
- package/dist/components/patient-table/types.d.ts +172 -0
- package/dist/components/patient-table/use-responsive-columns.d.ts +109 -0
- 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/phone-input/index.js +1 -1
- package/dist/components/popover/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/privacy-lock/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/progress/index.js +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/qr-code/index.js +1 -1
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/recaptcha-widget/index.js +1 -1
- package/dist/components/resizable/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/search-input/index.js +2 -2
- package/dist/components/select/index.js +1 -1
- package/dist/components/session-countdown/index.js +1 -1
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sidebar/sidebar.d.ts +7 -0
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/signature-capture/index.js +1 -1
- package/dist/components/slider/index.js +1 -1
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/stepper-accordion/index.js +1 -1
- package/dist/components/stepper-progress/index.js +1 -1
- package/dist/components/suggestion-chip/index.js +1 -1
- package/dist/components/switch/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/text-area/index.js +1 -1
- package/dist/components/text-input/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/time-picker/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/unit-converter/unit-converter.agent.d.ts +4 -0
- package/dist/components/unit-converter/unit-converter.d.ts +27 -0
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/warning-stack/warning-stack.d.ts +9 -0
- package/dist/components/whatsapp-button/index.d.ts +1 -1
- package/dist/components/whatsapp-button/index.js +3 -2
- package/dist/components/whatsapp-button/whatsapp-button.d.ts +3 -0
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +72 -0
- package/dist/i18n/locales/ar.js +73 -1
- package/dist/i18n/locales/de.d.ts +72 -0
- package/dist/i18n/locales/de.js +73 -1
- package/dist/i18n/locales/el.d.ts +72 -0
- package/dist/i18n/locales/el.js +73 -1
- package/dist/i18n/locales/en.d.ts +90 -0
- package/dist/i18n/locales/en.js +91 -1
- package/dist/i18n/locales/es.d.ts +72 -0
- package/dist/i18n/locales/es.js +73 -1
- package/dist/i18n/locales/fr.d.ts +72 -0
- package/dist/i18n/locales/fr.js +73 -1
- package/dist/i18n/locales/hi.d.ts +72 -0
- package/dist/i18n/locales/hi.js +73 -1
- package/dist/i18n/locales/it.d.ts +72 -0
- package/dist/i18n/locales/it.js +73 -1
- package/dist/i18n/locales/ja.d.ts +72 -0
- package/dist/i18n/locales/ja.js +73 -1
- package/dist/i18n/locales/nl.d.ts +72 -0
- package/dist/i18n/locales/nl.js +73 -1
- package/dist/i18n/locales/pl.d.ts +72 -0
- package/dist/i18n/locales/pl.js +73 -1
- package/dist/i18n/locales/pt.d.ts +72 -0
- package/dist/i18n/locales/pt.js +73 -1
- package/dist/i18n/locales/ro.d.ts +72 -0
- package/dist/i18n/locales/ro.js +73 -1
- package/dist/i18n/locales/ru.d.ts +72 -0
- package/dist/i18n/locales/ru.js +73 -1
- package/dist/i18n/locales/sq.d.ts +72 -0
- package/dist/i18n/locales/sq.js +73 -1
- package/dist/i18n/locales/sv.d.ts +72 -0
- package/dist/i18n/locales/sv.js +73 -1
- package/dist/i18n/locales/tr.d.ts +72 -0
- package/dist/i18n/locales/tr.js +73 -1
- package/dist/i18n/locales/zh.d.ts +72 -0
- package/dist/i18n/locales/zh.js +73 -1
- package/dist/index.js +688 -673
- package/dist/locales/ar.json +73 -1
- package/dist/locales/de.json +73 -1
- package/dist/locales/el.json +73 -1
- package/dist/locales/en.json +73 -1
- package/dist/locales/es.json +73 -1
- package/dist/locales/fr.json +73 -1
- package/dist/locales/hi.json +73 -1
- package/dist/locales/it.json +73 -1
- package/dist/locales/ja.json +73 -1
- package/dist/locales/nl.json +73 -1
- package/dist/locales/pl.json +73 -1
- package/dist/locales/pt.json +73 -1
- package/dist/locales/ro.json +73 -1
- package/dist/locales/ru.json +73 -1
- package/dist/locales/sq.json +73 -1
- package/dist/locales/sv.json +73 -1
- package/dist/locales/tr.json +73 -1
- package/dist/locales/zh.json +73 -1
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +3 -2
- package/package.json +14 -1
- package/dist/_chunks/address-autocomplete-CT-9AOli.js +0 -358
- package/dist/_chunks/bishop-score-CjsB9bM-.js +0 -185
- package/dist/_chunks/bmi-calculator-n-823_1V.js +0 -258
- package/dist/_chunks/editable-currency-cell-renderer-DHOspPee.js +0 -2409
- package/dist/_chunks/registry-nPAVE19X.js +0 -21
- package/dist/_chunks/unit-converter-C1V3ACM9.js +0 -196
- package/dist/_chunks/warning-stack-Cv4fr5zo.js +0 -220
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { jsx as e, jsxs as y, Fragment as
|
|
2
|
-
import { useId as
|
|
3
|
-
import { c as
|
|
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 Q, Fragment as ot, forwardRef as Tt, useMemo as Je, useImperativeHandle as zt } from "react";
|
|
3
|
+
import { c as qe } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as Z } from "react-i18next";
|
|
5
|
-
import { SafeHtml as
|
|
6
|
-
import { u as
|
|
7
|
-
import { S as
|
|
5
|
+
import { SafeHtml as Mt, sanitiseHtml as _t } from "../safe-html/index.js";
|
|
6
|
+
import { u as Rt } from "./registry-DvAUVLHh.js";
|
|
7
|
+
import { S as at } from "./spinner-hbwuKwMf.js";
|
|
8
8
|
import { I as P } from "./icon-button-LqoiKcUN.js";
|
|
9
|
-
import { T as
|
|
10
|
-
import { E as
|
|
11
|
-
import { X as
|
|
9
|
+
import { T as St } from "./text-area-Bt3p7Pt0.js";
|
|
10
|
+
import { E as Et } from "./editor-overlay-wYm22wZK.js";
|
|
11
|
+
import { X as et } from "./x-CCcI3eJp.js";
|
|
12
12
|
import { R as At } from "./rotate-ccw-BWANpitO.js";
|
|
13
|
-
import { C as
|
|
14
|
-
import { S as
|
|
15
|
-
import { M as
|
|
16
|
-
import { S as
|
|
17
|
-
import { B as
|
|
18
|
-
import { a as
|
|
19
|
-
import { P as B } from "./popover-
|
|
20
|
-
import { D as
|
|
21
|
-
import { D as j } from "./dialog-
|
|
22
|
-
import { C as
|
|
23
|
-
import { T as _e } from "./text-input-
|
|
24
|
-
import { C as
|
|
25
|
-
import { F as
|
|
26
|
-
import { c as
|
|
27
|
-
import { C as
|
|
28
|
-
import { I as
|
|
29
|
-
import { C as
|
|
30
|
-
import { T as
|
|
31
|
-
import { S as
|
|
13
|
+
import { C as Ht } from "./check-DPdL_Sm7.js";
|
|
14
|
+
import { S as Me } from "./square-CZoGU14v.js";
|
|
15
|
+
import { M as it } from "./mic-B4Gog3Gi.js";
|
|
16
|
+
import { S as It } from "./send-CySZIRPJ.js";
|
|
17
|
+
import { B as oe } from "./button-DD_0Xdmr.js";
|
|
18
|
+
import { a as Lt } from "./tooltip-DvmfrNvB.js";
|
|
19
|
+
import { P as B } from "./popover-B2qCDhJC.js";
|
|
20
|
+
import { D as Te } from "./dropdown-menu-qrxjymfw.js";
|
|
21
|
+
import { D as j } from "./dialog-ZNuboNmy.js";
|
|
22
|
+
import { C as je } from "./color-picker-C_fZl6sA.js";
|
|
23
|
+
import { T as _e } from "./text-input-B-OWQ1Je.js";
|
|
24
|
+
import { C as $t } from "./checkbox-BuZ1u__2.js";
|
|
25
|
+
import { F as Ot } from "./file-upload-5ScQd4fE.js";
|
|
26
|
+
import { c as M } from "./createLucideIcon-CrFbzy84.js";
|
|
27
|
+
import { C as Dt } from "./chevron-down-BX_NP2Yh.js";
|
|
28
|
+
import { I as qt } from "./image-C6RM5hfF.js";
|
|
29
|
+
import { C as jt } from "./columns-2-BTOBZbep.js";
|
|
30
|
+
import { T as Pt } from "./trash-2-rPAKaRgB.js";
|
|
31
|
+
import { S as Bt } from "./sparkles-CuYXqQLg.js";
|
|
32
32
|
/**
|
|
33
33
|
* @license lucide-react v1.8.0 - ISC
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the ISC license.
|
|
36
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
37
37
|
*/
|
|
38
|
-
const
|
|
38
|
+
const Ft = [
|
|
39
39
|
["rect", { width: "13", height: "7", x: "3", y: "3", rx: "1", key: "11xb64" }],
|
|
40
40
|
["path", { d: "m22 15-3-3 3-3", key: "26chmm" }],
|
|
41
41
|
["rect", { width: "13", height: "7", x: "3", y: "14", rx: "1", key: "k6ky7n" }]
|
|
42
|
-
],
|
|
42
|
+
], Vt = M("between-horizontal-end", Ft);
|
|
43
43
|
/**
|
|
44
44
|
* @license lucide-react v1.8.0 - ISC
|
|
45
45
|
*
|
|
46
46
|
* This source code is licensed under the ISC license.
|
|
47
47
|
* See the LICENSE file in the root directory of this source tree.
|
|
48
48
|
*/
|
|
49
|
-
const
|
|
49
|
+
const Kt = [
|
|
50
50
|
["rect", { width: "13", height: "7", x: "8", y: "3", rx: "1", key: "pkso9a" }],
|
|
51
51
|
["path", { d: "m2 9 3 3-3 3", key: "1agib5" }],
|
|
52
52
|
["rect", { width: "13", height: "7", x: "8", y: "14", rx: "1", key: "1q5fc1" }]
|
|
53
|
-
], Gt =
|
|
53
|
+
], Gt = M("between-horizontal-start", Kt);
|
|
54
54
|
/**
|
|
55
55
|
* @license lucide-react v1.8.0 - ISC
|
|
56
56
|
*
|
|
@@ -61,18 +61,18 @@ const Wt = [
|
|
|
61
61
|
["rect", { width: "7", height: "13", x: "3", y: "3", rx: "1", key: "1fdu0f" }],
|
|
62
62
|
["path", { d: "m9 22 3-3 3 3", key: "17z65a" }],
|
|
63
63
|
["rect", { width: "7", height: "13", x: "14", y: "3", rx: "1", key: "1squn4" }]
|
|
64
|
-
],
|
|
64
|
+
], Ut = M("between-vertical-end", Wt);
|
|
65
65
|
/**
|
|
66
66
|
* @license lucide-react v1.8.0 - ISC
|
|
67
67
|
*
|
|
68
68
|
* This source code is licensed under the ISC license.
|
|
69
69
|
* See the LICENSE file in the root directory of this source tree.
|
|
70
70
|
*/
|
|
71
|
-
const
|
|
71
|
+
const Xt = [
|
|
72
72
|
["rect", { width: "7", height: "13", x: "3", y: "8", rx: "1", key: "1fjrkv" }],
|
|
73
73
|
["path", { d: "m15 2-3 3-3-3", key: "1uh6eb" }],
|
|
74
74
|
["rect", { width: "7", height: "13", x: "14", y: "8", rx: "1", key: "w3fjg8" }]
|
|
75
|
-
], Qt =
|
|
75
|
+
], Qt = M("between-vertical-start", Xt);
|
|
76
76
|
/**
|
|
77
77
|
* @license lucide-react v1.8.0 - ISC
|
|
78
78
|
*
|
|
@@ -84,7 +84,7 @@ const Zt = [
|
|
|
84
84
|
"path",
|
|
85
85
|
{ d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8", key: "mg9rjx" }
|
|
86
86
|
]
|
|
87
|
-
], Yt =
|
|
87
|
+
], Yt = M("bold", Zt);
|
|
88
88
|
/**
|
|
89
89
|
* @license lucide-react v1.8.0 - ISC
|
|
90
90
|
*
|
|
@@ -96,86 +96,86 @@ const Jt = [
|
|
|
96
96
|
["path", { d: "M4 18V6", key: "1rz3zl" }],
|
|
97
97
|
["path", { d: "M12 18V6", key: "zqpxq5" }],
|
|
98
98
|
["path", { d: "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1", key: "9jr5yi" }]
|
|
99
|
-
],
|
|
99
|
+
], er = M("heading-2", Jt);
|
|
100
100
|
/**
|
|
101
101
|
* @license lucide-react v1.8.0 - ISC
|
|
102
102
|
*
|
|
103
103
|
* This source code is licensed under the ISC license.
|
|
104
104
|
* See the LICENSE file in the root directory of this source tree.
|
|
105
105
|
*/
|
|
106
|
-
const
|
|
106
|
+
const tr = [
|
|
107
107
|
["path", { d: "M4 12h8", key: "17cfdx" }],
|
|
108
108
|
["path", { d: "M4 18V6", key: "1rz3zl" }],
|
|
109
109
|
["path", { d: "M12 18V6", key: "zqpxq5" }],
|
|
110
110
|
["path", { d: "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2", key: "68ncm8" }],
|
|
111
111
|
["path", { d: "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2", key: "1ejuhz" }]
|
|
112
|
-
],
|
|
112
|
+
], rr = M("heading-3", tr);
|
|
113
113
|
/**
|
|
114
114
|
* @license lucide-react v1.8.0 - ISC
|
|
115
115
|
*
|
|
116
116
|
* This source code is licensed under the ISC license.
|
|
117
117
|
* See the LICENSE file in the root directory of this source tree.
|
|
118
118
|
*/
|
|
119
|
-
const
|
|
119
|
+
const nr = [
|
|
120
120
|
["path", { d: "m9 11-6 6v3h9l3-3", key: "1a3l36" }],
|
|
121
121
|
["path", { d: "m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4", key: "14a9rk" }]
|
|
122
|
-
],
|
|
122
|
+
], or = M("highlighter", nr);
|
|
123
123
|
/**
|
|
124
124
|
* @license lucide-react v1.8.0 - ISC
|
|
125
125
|
*
|
|
126
126
|
* This source code is licensed under the ISC license.
|
|
127
127
|
* See the LICENSE file in the root directory of this source tree.
|
|
128
128
|
*/
|
|
129
|
-
const
|
|
129
|
+
const ar = [
|
|
130
130
|
["line", { x1: "19", x2: "10", y1: "4", y2: "4", key: "15jd3p" }],
|
|
131
131
|
["line", { x1: "14", x2: "5", y1: "20", y2: "20", key: "bu0au3" }],
|
|
132
132
|
["line", { x1: "15", x2: "9", y1: "4", y2: "20", key: "uljnxc" }]
|
|
133
|
-
],
|
|
133
|
+
], ir = M("italic", ar);
|
|
134
134
|
/**
|
|
135
135
|
* @license lucide-react v1.8.0 - ISC
|
|
136
136
|
*
|
|
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 sr = [
|
|
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
|
-
], lr =
|
|
143
|
+
], lr = M("link", sr);
|
|
144
144
|
/**
|
|
145
145
|
* @license lucide-react v1.8.0 - ISC
|
|
146
146
|
*
|
|
147
147
|
* This source code is licensed under the ISC license.
|
|
148
148
|
* See the LICENSE file in the root directory of this source tree.
|
|
149
149
|
*/
|
|
150
|
-
const
|
|
150
|
+
const dr = [
|
|
151
151
|
["path", { d: "M11 5h10", key: "1cz7ny" }],
|
|
152
152
|
["path", { d: "M11 12h10", key: "1438ji" }],
|
|
153
153
|
["path", { d: "M11 19h10", key: "11t30w" }],
|
|
154
154
|
["path", { d: "M4 4h1v5", key: "10yrso" }],
|
|
155
155
|
["path", { d: "M4 9h2", key: "r1h2o0" }],
|
|
156
156
|
["path", { d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02", key: "xtkcd5" }]
|
|
157
|
-
],
|
|
157
|
+
], cr = M("list-ordered", dr);
|
|
158
158
|
/**
|
|
159
159
|
* @license lucide-react v1.8.0 - ISC
|
|
160
160
|
*
|
|
161
161
|
* This source code is licensed under the ISC license.
|
|
162
162
|
* See the LICENSE file in the root directory of this source tree.
|
|
163
163
|
*/
|
|
164
|
-
const
|
|
164
|
+
const ur = [
|
|
165
165
|
["path", { d: "M3 5h.01", key: "18ugdj" }],
|
|
166
166
|
["path", { d: "M3 12h.01", key: "nlz23k" }],
|
|
167
167
|
["path", { d: "M3 19h.01", key: "noohij" }],
|
|
168
168
|
["path", { d: "M8 5h13", key: "1pao27" }],
|
|
169
169
|
["path", { d: "M8 12h13", key: "1za7za" }],
|
|
170
170
|
["path", { d: "M8 19h13", key: "m83p4d" }]
|
|
171
|
-
],
|
|
171
|
+
], mr = M("list", ur);
|
|
172
172
|
/**
|
|
173
173
|
* @license lucide-react v1.8.0 - ISC
|
|
174
174
|
*
|
|
175
175
|
* This source code is licensed under the ISC license.
|
|
176
176
|
* See the LICENSE file in the root directory of this source tree.
|
|
177
177
|
*/
|
|
178
|
-
const
|
|
178
|
+
const hr = [
|
|
179
179
|
["path", { d: "M11 7 6 2", key: "1jwth8" }],
|
|
180
180
|
["path", { d: "M18.992 12H2.041", key: "xw1gg" }],
|
|
181
181
|
[
|
|
@@ -192,25 +192,25 @@ const mr = [
|
|
|
192
192
|
key: "1nk1rd"
|
|
193
193
|
}
|
|
194
194
|
]
|
|
195
|
-
],
|
|
195
|
+
], fr = M("paint-bucket", hr);
|
|
196
196
|
/**
|
|
197
197
|
* @license lucide-react v1.8.0 - ISC
|
|
198
198
|
*
|
|
199
199
|
* This source code is licensed under the ISC license.
|
|
200
200
|
* See the LICENSE file in the root directory of this source tree.
|
|
201
201
|
*/
|
|
202
|
-
const
|
|
202
|
+
const gr = [
|
|
203
203
|
["rect", { width: "16", height: "6", x: "2", y: "2", rx: "2", key: "jcyz7m" }],
|
|
204
204
|
["path", { d: "M10 16v-2a2 2 0 0 1 2-2h8a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2", key: "1b9h7c" }],
|
|
205
205
|
["rect", { width: "4", height: "6", x: "8", y: "16", rx: "1", key: "d6e7yl" }]
|
|
206
|
-
],
|
|
206
|
+
], pr = M("paint-roller", gr);
|
|
207
207
|
/**
|
|
208
208
|
* @license lucide-react v1.8.0 - ISC
|
|
209
209
|
*
|
|
210
210
|
* This source code is licensed under the ISC license.
|
|
211
211
|
* See the LICENSE file in the root directory of this source tree.
|
|
212
212
|
*/
|
|
213
|
-
const
|
|
213
|
+
const br = [
|
|
214
214
|
[
|
|
215
215
|
"path",
|
|
216
216
|
{
|
|
@@ -222,48 +222,48 @@ const pr = [
|
|
|
222
222
|
["circle", { cx: "17.5", cy: "10.5", r: ".5", fill: "currentColor", key: "f64h9f" }],
|
|
223
223
|
["circle", { cx: "6.5", cy: "12.5", r: ".5", fill: "currentColor", key: "qy21gx" }],
|
|
224
224
|
["circle", { cx: "8.5", cy: "7.5", r: ".5", fill: "currentColor", key: "fotxhn" }]
|
|
225
|
-
],
|
|
225
|
+
], yr = M("palette", br);
|
|
226
226
|
/**
|
|
227
227
|
* @license lucide-react v1.8.0 - ISC
|
|
228
228
|
*
|
|
229
229
|
* This source code is licensed under the ISC license.
|
|
230
230
|
* See the LICENSE file in the root directory of this source tree.
|
|
231
231
|
*/
|
|
232
|
-
const
|
|
232
|
+
const vr = [
|
|
233
233
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
234
234
|
["path", { d: "M14 9h1", key: "l0svgy" }],
|
|
235
235
|
["path", { d: "M19 9h2", key: "te2zfg" }],
|
|
236
236
|
["path", { d: "M3 9h2", key: "1h4ldw" }],
|
|
237
237
|
["path", { d: "M9 9h1", key: "15jzuz" }]
|
|
238
|
-
],
|
|
238
|
+
], kr = M("panel-top-dashed", vr);
|
|
239
239
|
/**
|
|
240
240
|
* @license lucide-react v1.8.0 - ISC
|
|
241
241
|
*
|
|
242
242
|
* This source code is licensed under the ISC license.
|
|
243
243
|
* See the LICENSE file in the root directory of this source tree.
|
|
244
244
|
*/
|
|
245
|
-
const
|
|
245
|
+
const wr = [
|
|
246
246
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
247
247
|
["path", { d: "M3 9h18", key: "1pudct" }]
|
|
248
|
-
],
|
|
248
|
+
], xr = M("panel-top", wr);
|
|
249
249
|
/**
|
|
250
250
|
* @license lucide-react v1.8.0 - ISC
|
|
251
251
|
*
|
|
252
252
|
* This source code is licensed under the ISC license.
|
|
253
253
|
* See the LICENSE file in the root directory of this source tree.
|
|
254
254
|
*/
|
|
255
|
-
const
|
|
255
|
+
const Cr = [
|
|
256
256
|
["path", { d: "M13 4v16", key: "8vvj80" }],
|
|
257
257
|
["path", { d: "M17 4v16", key: "7dpous" }],
|
|
258
258
|
["path", { d: "M19 4H9.5a4.5 4.5 0 0 0 0 9H13", key: "sh4n9v" }]
|
|
259
|
-
],
|
|
259
|
+
], Nr = M("pilcrow", Cr);
|
|
260
260
|
/**
|
|
261
261
|
* @license lucide-react v1.8.0 - ISC
|
|
262
262
|
*
|
|
263
263
|
* This source code is licensed under the ISC license.
|
|
264
264
|
* See the LICENSE file in the root directory of this source tree.
|
|
265
265
|
*/
|
|
266
|
-
const
|
|
266
|
+
const Tr = [
|
|
267
267
|
[
|
|
268
268
|
"path",
|
|
269
269
|
{
|
|
@@ -278,68 +278,68 @@ const Nr = [
|
|
|
278
278
|
key: "1ymkrd"
|
|
279
279
|
}
|
|
280
280
|
]
|
|
281
|
-
], zr =
|
|
281
|
+
], zr = M("quote", Tr);
|
|
282
282
|
/**
|
|
283
283
|
* @license lucide-react v1.8.0 - ISC
|
|
284
284
|
*
|
|
285
285
|
* This source code is licensed under the ISC license.
|
|
286
286
|
* See the LICENSE file in the root directory of this source tree.
|
|
287
287
|
*/
|
|
288
|
-
const
|
|
288
|
+
const Mr = [
|
|
289
289
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
290
290
|
["path", { d: "M3 12h18", key: "1i2n21" }]
|
|
291
|
-
], _r =
|
|
291
|
+
], _r = M("rows-2", Mr);
|
|
292
292
|
/**
|
|
293
293
|
* @license lucide-react v1.8.0 - ISC
|
|
294
294
|
*
|
|
295
295
|
* This source code is licensed under the ISC license.
|
|
296
296
|
* See the LICENSE file in the root directory of this source tree.
|
|
297
297
|
*/
|
|
298
|
-
const
|
|
298
|
+
const Rr = [
|
|
299
299
|
["path", { d: "m6 16 6-12 6 12", key: "1b4byz" }],
|
|
300
300
|
["path", { d: "M8 12h8", key: "1wcyev" }],
|
|
301
301
|
["path", { d: "m16 20 2 2 4-4", key: "13tcca" }]
|
|
302
|
-
],
|
|
302
|
+
], Sr = M("spell-check", Rr);
|
|
303
303
|
/**
|
|
304
304
|
* @license lucide-react v1.8.0 - ISC
|
|
305
305
|
*
|
|
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 Er = [
|
|
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
|
-
], Ar =
|
|
313
|
+
], Ar = M("strikethrough", Er);
|
|
314
314
|
/**
|
|
315
315
|
* @license lucide-react v1.8.0 - ISC
|
|
316
316
|
*
|
|
317
317
|
* This source code is licensed under the ISC license.
|
|
318
318
|
* See the LICENSE file in the root directory of this source tree.
|
|
319
319
|
*/
|
|
320
|
-
const
|
|
320
|
+
const Hr = [
|
|
321
321
|
["path", { d: "M12 3v18", key: "108xh3" }],
|
|
322
322
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
323
323
|
["path", { d: "M3 9h18", key: "1pudct" }],
|
|
324
324
|
["path", { d: "M3 15h18", key: "5xshup" }]
|
|
325
|
-
],
|
|
325
|
+
], Ir = M("table", Hr);
|
|
326
326
|
/**
|
|
327
327
|
* @license lucide-react v1.8.0 - ISC
|
|
328
328
|
*
|
|
329
329
|
* This source code is licensed under the ISC license.
|
|
330
330
|
* See the LICENSE file in the root directory of this source tree.
|
|
331
331
|
*/
|
|
332
|
-
const
|
|
332
|
+
const Lr = [
|
|
333
333
|
["path", { d: "M6 4v6a6 6 0 0 0 12 0V4", key: "9kb039" }],
|
|
334
334
|
["line", { x1: "4", x2: "20", y1: "20", y2: "20", key: "nun2al" }]
|
|
335
|
-
],
|
|
335
|
+
], $r = M("underline", Lr);
|
|
336
336
|
/**
|
|
337
337
|
* @license lucide-react v1.8.0 - ISC
|
|
338
338
|
*
|
|
339
339
|
* This source code is licensed under the ISC license.
|
|
340
340
|
* See the LICENSE file in the root directory of this source tree.
|
|
341
341
|
*/
|
|
342
|
-
const
|
|
342
|
+
const Or = [
|
|
343
343
|
[
|
|
344
344
|
"path",
|
|
345
345
|
{
|
|
@@ -354,14 +354,14 @@ const Lr = [
|
|
|
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
|
+
], Dr = 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 qr = [
|
|
365
365
|
[
|
|
366
366
|
"path",
|
|
367
367
|
{
|
|
@@ -369,53 +369,117 @@ const Dr = [
|
|
|
369
369
|
key: "1ngwbx"
|
|
370
370
|
}
|
|
371
371
|
]
|
|
372
|
-
],
|
|
372
|
+
], jr = M("wrench", qr), Pr = {
|
|
373
373
|
id: "rich-text-editor",
|
|
374
374
|
capabilities: ["edit_inline"],
|
|
375
375
|
state: {
|
|
376
376
|
html: {
|
|
377
377
|
type: "string",
|
|
378
|
+
descriptionKey: "ui.agent.richTextEditor.state.html",
|
|
378
379
|
description: "Sanitised HTML representation of the editor content.",
|
|
379
380
|
read: (o) => o.getHTML()
|
|
380
381
|
},
|
|
381
382
|
text: {
|
|
382
383
|
type: "string",
|
|
384
|
+
descriptionKey: "ui.agent.richTextEditor.state.text",
|
|
383
385
|
description: "Plain-text content of the editor (tags stripped).",
|
|
384
386
|
read: (o) => o.getText()
|
|
385
387
|
},
|
|
386
388
|
markdown: {
|
|
387
389
|
type: "string",
|
|
390
|
+
descriptionKey: "ui.agent.richTextEditor.state.markdown",
|
|
388
391
|
description: "Markdown representation of the editor content. The Redactor engine has no native Markdown serialiser, so this is always empty — read `html` instead.",
|
|
389
392
|
read: (o) => o.getMarkdown()
|
|
390
393
|
}
|
|
391
394
|
},
|
|
392
395
|
actions: {
|
|
393
396
|
set_content: {
|
|
397
|
+
// Replaces the whole document — discards whatever the user had typed.
|
|
394
398
|
safety: "destructive",
|
|
395
399
|
argsType: "{ html: string }",
|
|
400
|
+
argsSchema: {
|
|
401
|
+
type: "object",
|
|
402
|
+
properties: {
|
|
403
|
+
html: {
|
|
404
|
+
type: "string",
|
|
405
|
+
description: "Replacement HTML (sanitised via DOMPurify)."
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
required: ["html"]
|
|
409
|
+
},
|
|
410
|
+
idempotent: !0,
|
|
411
|
+
descriptionKey: "ui.agent.richTextEditor.actions.setContent",
|
|
396
412
|
description: "Replace the editor content. Loses unsaved input.",
|
|
397
413
|
invoke: (o, a) => {
|
|
398
414
|
o.setContent(a.html);
|
|
399
415
|
}
|
|
400
416
|
},
|
|
401
417
|
insert_at_cursor: {
|
|
402
|
-
|
|
418
|
+
// Reversible via the editor's own undo stack — write, not destructive.
|
|
419
|
+
safety: "write",
|
|
403
420
|
argsType: "{ content: string; asHtml?: boolean }",
|
|
421
|
+
argsSchema: {
|
|
422
|
+
type: "object",
|
|
423
|
+
properties: {
|
|
424
|
+
content: {
|
|
425
|
+
type: "string",
|
|
426
|
+
description: "Content to insert at the caret."
|
|
427
|
+
},
|
|
428
|
+
asHtml: {
|
|
429
|
+
type: "boolean",
|
|
430
|
+
description: "Treat content as HTML (sanitised). Pass false for plain text. Defaults to true."
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
required: ["content"]
|
|
434
|
+
},
|
|
435
|
+
descriptionKey: "ui.agent.richTextEditor.actions.insertAtCursor",
|
|
404
436
|
description: "Insert content at the caret (replacing any selection). HTML is sanitised; pass asHtml:false for plain text. Seam for merge/template variables and AI-generated drafts.",
|
|
437
|
+
examples: [
|
|
438
|
+
{
|
|
439
|
+
args: { content: "{{patient.firstName}}", asHtml: !1 },
|
|
440
|
+
note: "Insert a merge variable as plain text."
|
|
441
|
+
}
|
|
442
|
+
],
|
|
405
443
|
invoke: (o, a) => {
|
|
406
444
|
o.insertAtCursor(a.content, { asHtml: a.asHtml });
|
|
407
445
|
}
|
|
408
446
|
},
|
|
409
447
|
apply_format: {
|
|
410
|
-
|
|
448
|
+
// Reversible via undo — write, not destructive.
|
|
449
|
+
safety: "write",
|
|
411
450
|
argsType: "{ format: 'bold' | 'italic' | 'strikethrough' | 'bulletedList' | 'numberedList' | 'heading' | 'quote' | 'paragraph' }",
|
|
451
|
+
argsSchema: {
|
|
452
|
+
type: "object",
|
|
453
|
+
properties: {
|
|
454
|
+
format: {
|
|
455
|
+
type: "string",
|
|
456
|
+
enum: [
|
|
457
|
+
"bold",
|
|
458
|
+
"italic",
|
|
459
|
+
"strikethrough",
|
|
460
|
+
"bulletedList",
|
|
461
|
+
"numberedList",
|
|
462
|
+
"heading",
|
|
463
|
+
"quote",
|
|
464
|
+
"paragraph"
|
|
465
|
+
],
|
|
466
|
+
description: "Block or inline format to toggle/apply."
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
required: ["format"]
|
|
470
|
+
},
|
|
471
|
+
descriptionKey: "ui.agent.richTextEditor.actions.applyFormat",
|
|
412
472
|
description: "Toggle/apply a block or inline format on the current selection (bold, italic, strikethrough, bulleted/numbered list, heading, quote, paragraph).",
|
|
473
|
+
examples: [{ args: { format: "bold" }, note: "Bold the selection." }],
|
|
413
474
|
invoke: (o, a) => {
|
|
414
475
|
o.applyFormat(a.format);
|
|
415
476
|
}
|
|
416
477
|
},
|
|
417
478
|
clear: {
|
|
479
|
+
// Empties the document — loses unsaved input.
|
|
418
480
|
safety: "destructive",
|
|
481
|
+
idempotent: !0,
|
|
482
|
+
descriptionKey: "ui.agent.richTextEditor.actions.clear",
|
|
419
483
|
description: "Empty the editor. Loses unsaved input.",
|
|
420
484
|
invoke: (o) => {
|
|
421
485
|
o.clear();
|
|
@@ -423,6 +487,8 @@ const Dr = [
|
|
|
423
487
|
},
|
|
424
488
|
focus: {
|
|
425
489
|
safety: "read",
|
|
490
|
+
idempotent: !0,
|
|
491
|
+
descriptionKey: "ui.agent.richTextEditor.actions.focus",
|
|
426
492
|
description: "Move keyboard focus to the editor surface.",
|
|
427
493
|
invoke: (o) => {
|
|
428
494
|
o.focus();
|
|
@@ -437,97 +503,97 @@ const Dr = [
|
|
|
437
503
|
description: "Sourced from the id prop."
|
|
438
504
|
}
|
|
439
505
|
}
|
|
440
|
-
},
|
|
506
|
+
}, Br = "ds:aria-pressed:!bg-[var(--destructive)] ds:aria-pressed:!text-[var(--destructive-foreground)]", le = "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)]", tt = [
|
|
441
507
|
"ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
|
|
442
508
|
"ds:bg-[color-mix(in_srgb,var(--background)_70%,transparent)]",
|
|
443
509
|
"ds:p-[var(--spacing-sm)] ds:[max-block-size:10rem] ds:overflow-y-auto",
|
|
444
510
|
"ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--foreground)]"
|
|
445
511
|
].join(" ");
|
|
446
|
-
function
|
|
512
|
+
function rt(o, a) {
|
|
447
513
|
return a ? o ? /\s$/.test(o) ? `${o}${a}` : `${o} ${a}` : a : o;
|
|
448
514
|
}
|
|
449
|
-
function
|
|
515
|
+
function Kr({
|
|
450
516
|
open: o,
|
|
451
517
|
onClose: a,
|
|
452
518
|
onRequestAiDraft: c,
|
|
453
519
|
onInsert: l,
|
|
454
|
-
previewAsHtml:
|
|
455
|
-
privacyNotice:
|
|
456
|
-
onDictate:
|
|
520
|
+
previewAsHtml: d = !0,
|
|
521
|
+
privacyNotice: g,
|
|
522
|
+
onDictate: p
|
|
457
523
|
}) {
|
|
458
|
-
const { t:
|
|
524
|
+
const { t: s } = Z(), b = de(), v = de(), [z, I] = T(""), [S, w] = T(!1), [O, m] = T(!1), [f, k] = T(null), E = $(null), [_, A] = T(!1), [Y, L] = T(""), [D, H] = T(""), J = $(null), ee = C(() => {
|
|
459
525
|
var x;
|
|
460
526
|
(x = J.current) == null || x.abort();
|
|
461
|
-
}, []),
|
|
462
|
-
if (!
|
|
527
|
+
}, []), me = C(() => {
|
|
528
|
+
if (!p) return;
|
|
463
529
|
const x = new AbortController();
|
|
464
|
-
J.current = x,
|
|
530
|
+
J.current = x, A(!0), L(""), H(s("editor.ai.listening")), p({
|
|
465
531
|
signal: x.signal,
|
|
466
532
|
onPartialTranscript: (q) => {
|
|
467
|
-
x.signal.aborted ||
|
|
533
|
+
x.signal.aborted || L(q);
|
|
468
534
|
},
|
|
469
535
|
onFinalTranscript: (q) => {
|
|
470
536
|
if (x.signal.aborted) return;
|
|
471
537
|
const F = q.trim();
|
|
472
|
-
|
|
538
|
+
L(""), F && (I((W) => rt(W, F)), H(F));
|
|
473
539
|
}
|
|
474
540
|
}).catch(() => {
|
|
475
541
|
}).finally(() => {
|
|
476
|
-
|
|
542
|
+
L(""), J.current === x && (J.current = null, A(!1), H(""));
|
|
477
543
|
});
|
|
478
|
-
}, [
|
|
479
|
-
|
|
480
|
-
}, [
|
|
481
|
-
|
|
544
|
+
}, [p, s]), R = C(() => {
|
|
545
|
+
_ ? ee() : me();
|
|
546
|
+
}, [_, me, ee]);
|
|
547
|
+
Q(() => {
|
|
482
548
|
var x, q;
|
|
483
|
-
o ? (
|
|
484
|
-
}, [o]),
|
|
549
|
+
o ? (I(""), w(!1), m(!1), k(null), L(""), H("")) : ((x = E.current) == null || x.abort(), E.current = null, (q = J.current) == null || q.abort());
|
|
550
|
+
}, [o]), Q(
|
|
485
551
|
() => () => {
|
|
486
552
|
var x, q;
|
|
487
|
-
(x =
|
|
553
|
+
(x = E.current) == null || x.abort(), (q = J.current) == null || q.abort();
|
|
488
554
|
},
|
|
489
555
|
[]
|
|
490
556
|
);
|
|
491
|
-
const
|
|
557
|
+
const G = C(() => {
|
|
492
558
|
var F;
|
|
493
|
-
const x =
|
|
559
|
+
const x = z.trim();
|
|
494
560
|
if (!x || S) return;
|
|
495
|
-
ee(), (F =
|
|
561
|
+
ee(), (F = E.current) == null || F.abort();
|
|
496
562
|
const q = new AbortController();
|
|
497
|
-
|
|
498
|
-
q.signal.aborted || (k(
|
|
499
|
-
}).catch((
|
|
500
|
-
q.signal.aborted ||
|
|
563
|
+
E.current = q, m(!1), w(!0), c({ prompt: x, signal: q.signal }).then((W) => {
|
|
564
|
+
q.signal.aborted || (k(W), w(!1));
|
|
565
|
+
}).catch((W) => {
|
|
566
|
+
q.signal.aborted || W && typeof W == "object" && "name" in W && W.name === "AbortError" || (m(!0), w(!1));
|
|
501
567
|
});
|
|
502
|
-
}, [
|
|
503
|
-
|
|
504
|
-
}, [
|
|
568
|
+
}, [z, S, c, ee]), K = C(() => {
|
|
569
|
+
f != null && (l(f), a());
|
|
570
|
+
}, [f, l, a]), he = f != null, fe = _ ? rt(z, Y) : z;
|
|
505
571
|
return /* @__PURE__ */ e(
|
|
506
|
-
|
|
572
|
+
Et,
|
|
507
573
|
{
|
|
508
574
|
open: o,
|
|
509
575
|
onClose: a,
|
|
510
|
-
ariaLabel:
|
|
511
|
-
children:
|
|
576
|
+
ariaLabel: s("editor.ai.dialogTitle"),
|
|
577
|
+
children: he ? /* @__PURE__ */ y("div", { className: "ds:flex ds:items-end ds:gap-[var(--spacing-sm)]", children: [
|
|
512
578
|
/* @__PURE__ */ e(
|
|
513
579
|
P,
|
|
514
580
|
{
|
|
515
581
|
size: "md",
|
|
516
582
|
intent: "outline",
|
|
517
|
-
className:
|
|
518
|
-
icon: /* @__PURE__ */ e(
|
|
519
|
-
"aria-label":
|
|
583
|
+
className: le,
|
|
584
|
+
icon: /* @__PURE__ */ e(et, {}),
|
|
585
|
+
"aria-label": s("common.close"),
|
|
520
586
|
onClick: a
|
|
521
587
|
}
|
|
522
588
|
),
|
|
523
|
-
/* @__PURE__ */ e("div", { className: "ds:min-w-0 ds:flex-1", children:
|
|
524
|
-
|
|
589
|
+
/* @__PURE__ */ e("div", { className: "ds:min-w-0 ds:flex-1", children: d ? /* @__PURE__ */ e(
|
|
590
|
+
Mt,
|
|
525
591
|
{
|
|
526
|
-
html:
|
|
592
|
+
html: f,
|
|
527
593
|
profile: "rich-text",
|
|
528
|
-
className:
|
|
594
|
+
className: tt,
|
|
529
595
|
tabIndex: 0,
|
|
530
|
-
"aria-label":
|
|
596
|
+
"aria-label": s("editor.ai.dialogTitle")
|
|
531
597
|
}
|
|
532
598
|
) : (
|
|
533
599
|
// Focusable so a keyboard user can scroll a long draft preview
|
|
@@ -535,16 +601,16 @@ function Vr({
|
|
|
535
601
|
// tabIndex allowlist doesn't cover a scrollable, non-interactive
|
|
536
602
|
// text region.
|
|
537
603
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
538
|
-
/* @__PURE__ */ e("p", { className:
|
|
604
|
+
/* @__PURE__ */ e("p", { className: tt, tabIndex: 0, children: f })
|
|
539
605
|
) }),
|
|
540
606
|
/* @__PURE__ */ e(
|
|
541
607
|
P,
|
|
542
608
|
{
|
|
543
609
|
size: "md",
|
|
544
610
|
intent: "outline",
|
|
545
|
-
className: `${
|
|
611
|
+
className: `${le} ds:rounded-full`,
|
|
546
612
|
icon: /* @__PURE__ */ e(At, {}),
|
|
547
|
-
"aria-label":
|
|
613
|
+
"aria-label": s("editor.ai.retry"),
|
|
548
614
|
onClick: () => k(null)
|
|
549
615
|
}
|
|
550
616
|
),
|
|
@@ -553,52 +619,52 @@ function Vr({
|
|
|
553
619
|
{
|
|
554
620
|
size: "md",
|
|
555
621
|
intent: "primary",
|
|
556
|
-
className: `${
|
|
557
|
-
icon: /* @__PURE__ */ e(
|
|
558
|
-
"aria-label":
|
|
559
|
-
onClick:
|
|
622
|
+
className: `${le} ds:bg-[image:var(--gradient-brand)] ds:rounded-full`,
|
|
623
|
+
icon: /* @__PURE__ */ e(Ht, {}),
|
|
624
|
+
"aria-label": s("common.confirm"),
|
|
625
|
+
onClick: K
|
|
560
626
|
}
|
|
561
627
|
)
|
|
562
|
-
] }) : /* @__PURE__ */ y(
|
|
628
|
+
] }) : /* @__PURE__ */ y(De, { children: [
|
|
563
629
|
/* @__PURE__ */ y("div", { className: "ds:flex ds:items-end ds:gap-[var(--spacing-sm)]", children: [
|
|
564
630
|
/* @__PURE__ */ e(
|
|
565
631
|
P,
|
|
566
632
|
{
|
|
567
633
|
size: "md",
|
|
568
634
|
intent: "outline",
|
|
569
|
-
className:
|
|
570
|
-
icon: /* @__PURE__ */ e(
|
|
571
|
-
"aria-label":
|
|
635
|
+
className: le,
|
|
636
|
+
icon: /* @__PURE__ */ e(et, {}),
|
|
637
|
+
"aria-label": s("common.close"),
|
|
572
638
|
onClick: a
|
|
573
639
|
}
|
|
574
640
|
),
|
|
575
641
|
/* @__PURE__ */ e("div", { className: "ds:min-w-0 ds:flex-1", children: /* @__PURE__ */ e(
|
|
576
|
-
|
|
642
|
+
St,
|
|
577
643
|
{
|
|
578
|
-
id:
|
|
644
|
+
id: b,
|
|
579
645
|
size: "md",
|
|
580
646
|
className: "ds:content-center",
|
|
581
|
-
value:
|
|
582
|
-
onChange: (x) =>
|
|
583
|
-
placeholder:
|
|
584
|
-
"aria-label":
|
|
647
|
+
value: fe,
|
|
648
|
+
onChange: (x) => I(x.target.value),
|
|
649
|
+
placeholder: s("editor.ai.promptPlaceholder"),
|
|
650
|
+
"aria-label": s("editor.ai.promptLabel"),
|
|
585
651
|
autoResize: !0,
|
|
586
652
|
minRows: 1,
|
|
587
653
|
maxRows: 3,
|
|
588
|
-
readOnly:
|
|
654
|
+
readOnly: _,
|
|
589
655
|
tone: O ? "error" : "default",
|
|
590
656
|
"aria-describedby": O ? v : void 0
|
|
591
657
|
}
|
|
592
658
|
) }),
|
|
593
|
-
|
|
659
|
+
p ? /* @__PURE__ */ e(
|
|
594
660
|
P,
|
|
595
661
|
{
|
|
596
662
|
size: "md",
|
|
597
663
|
intent: "outline",
|
|
598
|
-
className:
|
|
599
|
-
icon:
|
|
600
|
-
"aria-pressed":
|
|
601
|
-
"aria-label":
|
|
664
|
+
className: _ ? `${le} ${Br}` : le,
|
|
665
|
+
icon: _ ? /* @__PURE__ */ e(Me, { className: "ds:fill-current" }) : /* @__PURE__ */ e(it, {}),
|
|
666
|
+
"aria-pressed": _,
|
|
667
|
+
"aria-label": s(_ ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
|
|
602
668
|
onClick: R
|
|
603
669
|
}
|
|
604
670
|
) : null,
|
|
@@ -607,17 +673,17 @@ function Vr({
|
|
|
607
673
|
{
|
|
608
674
|
size: "md",
|
|
609
675
|
intent: "primary",
|
|
610
|
-
icon: S ? /* @__PURE__ */ e(
|
|
611
|
-
className: `${
|
|
612
|
-
disabled: S || !
|
|
676
|
+
icon: S ? /* @__PURE__ */ e(at, { size: "sm", variant: "pulse" }) : /* @__PURE__ */ e(It, {}),
|
|
677
|
+
className: `${le} ds:bg-[image:var(--gradient-brand)] ds:rounded-full`,
|
|
678
|
+
disabled: S || !z.trim(),
|
|
613
679
|
"aria-busy": S || void 0,
|
|
614
|
-
"aria-label":
|
|
615
|
-
onClick:
|
|
680
|
+
"aria-label": s("editor.ai.generate"),
|
|
681
|
+
onClick: G
|
|
616
682
|
}
|
|
617
683
|
)
|
|
618
684
|
] }),
|
|
619
|
-
|
|
620
|
-
O ? /* @__PURE__ */ e("p", { id: v, role: "alert", className:
|
|
685
|
+
p ? /* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: D }) : null,
|
|
686
|
+
O ? /* @__PURE__ */ e("p", { id: v, role: "alert", className: Vr, children: s("editor.ai.error") }) : g ? /* @__PURE__ */ e("p", { className: Fr, children: g }) : null
|
|
621
687
|
] })
|
|
622
688
|
}
|
|
623
689
|
);
|
|
@@ -632,14 +698,14 @@ const Gr = {
|
|
|
632
698
|
},
|
|
633
699
|
italic: {
|
|
634
700
|
id: "italic",
|
|
635
|
-
icon: /* @__PURE__ */ e(
|
|
701
|
+
icon: /* @__PURE__ */ e(ir, {}),
|
|
636
702
|
label: ["editor.italic", "Italic"],
|
|
637
703
|
command: ["module.inline.format", { tag: "i" }],
|
|
638
704
|
toggle: "italic"
|
|
639
705
|
},
|
|
640
706
|
underline: {
|
|
641
707
|
id: "underline",
|
|
642
|
-
icon: /* @__PURE__ */ e(
|
|
708
|
+
icon: /* @__PURE__ */ e($r, {}),
|
|
643
709
|
label: ["editor.underline", "Underline"],
|
|
644
710
|
command: ["module.inline.format", { tag: "u" }],
|
|
645
711
|
toggle: "underline"
|
|
@@ -653,14 +719,14 @@ const Gr = {
|
|
|
653
719
|
},
|
|
654
720
|
ul: {
|
|
655
721
|
id: "ul",
|
|
656
|
-
icon: /* @__PURE__ */ e(
|
|
722
|
+
icon: /* @__PURE__ */ e(mr, {}),
|
|
657
723
|
label: ["editor.list.bullet", "Bulleted list"],
|
|
658
724
|
command: ["module.list.toggle", "ul"],
|
|
659
725
|
toggle: "ul"
|
|
660
726
|
},
|
|
661
727
|
ol: {
|
|
662
728
|
id: "ol",
|
|
663
|
-
icon: /* @__PURE__ */ e(
|
|
729
|
+
icon: /* @__PURE__ */ e(cr, {}),
|
|
664
730
|
label: ["editor.list.ordered", "Numbered list"],
|
|
665
731
|
command: ["module.list.toggle", "ol"],
|
|
666
732
|
toggle: "ol"
|
|
@@ -669,19 +735,19 @@ const Gr = {
|
|
|
669
735
|
{
|
|
670
736
|
id: "paragraph",
|
|
671
737
|
tag: "p",
|
|
672
|
-
icon: /* @__PURE__ */ e(
|
|
738
|
+
icon: /* @__PURE__ */ e(Nr, {}),
|
|
673
739
|
label: ["editor.paragraph", "Paragraph"]
|
|
674
740
|
},
|
|
675
741
|
{
|
|
676
742
|
id: "h2",
|
|
677
743
|
tag: "h2",
|
|
678
|
-
icon: /* @__PURE__ */ e(
|
|
744
|
+
icon: /* @__PURE__ */ e(er, {}),
|
|
679
745
|
label: ["editor.heading2", "Heading 2"]
|
|
680
746
|
},
|
|
681
747
|
{
|
|
682
748
|
id: "h3",
|
|
683
749
|
tag: "h3",
|
|
684
|
-
icon: /* @__PURE__ */ e(
|
|
750
|
+
icon: /* @__PURE__ */ e(rr, {}),
|
|
685
751
|
label: ["editor.heading3", "Heading 3"]
|
|
686
752
|
},
|
|
687
753
|
{
|
|
@@ -691,7 +757,7 @@ const Gr = {
|
|
|
691
757
|
label: ["editor.quote", "Quote"]
|
|
692
758
|
}
|
|
693
759
|
], Wr = {
|
|
694
|
-
minimal: ["bold", "italic", "link"],
|
|
760
|
+
minimal: ["bold", "italic", "underline", "link"],
|
|
695
761
|
standard: [
|
|
696
762
|
"format",
|
|
697
763
|
"bold",
|
|
@@ -703,7 +769,7 @@ const Gr = {
|
|
|
703
769
|
"link"
|
|
704
770
|
],
|
|
705
771
|
full: ["format", "bold", "italic", "underline", "strike", "ul", "ol", "link"]
|
|
706
|
-
},
|
|
772
|
+
}, st = [
|
|
707
773
|
{
|
|
708
774
|
id: "rowAbove",
|
|
709
775
|
command: "plugin.table.addRowAbove",
|
|
@@ -713,7 +779,7 @@ const Gr = {
|
|
|
713
779
|
{
|
|
714
780
|
id: "rowBelow",
|
|
715
781
|
command: "plugin.table.addRowBelow",
|
|
716
|
-
icon: /* @__PURE__ */ e(
|
|
782
|
+
icon: /* @__PURE__ */ e(Vt, {}),
|
|
717
783
|
label: ["editor.table.rowBelow", "Add row below"]
|
|
718
784
|
},
|
|
719
785
|
{
|
|
@@ -725,19 +791,19 @@ const Gr = {
|
|
|
725
791
|
{
|
|
726
792
|
id: "colRight",
|
|
727
793
|
command: "plugin.table.addColumnRight",
|
|
728
|
-
icon: /* @__PURE__ */ e(
|
|
794
|
+
icon: /* @__PURE__ */ e(Ut, {}),
|
|
729
795
|
label: ["editor.table.columnRight", "Add column right"]
|
|
730
796
|
},
|
|
731
797
|
{
|
|
732
798
|
id: "addHead",
|
|
733
799
|
command: "plugin.table.addHead",
|
|
734
|
-
icon: /* @__PURE__ */ e(
|
|
800
|
+
icon: /* @__PURE__ */ e(xr, {}),
|
|
735
801
|
label: ["editor.table.addHeader", "Add header row"]
|
|
736
802
|
},
|
|
737
803
|
{
|
|
738
804
|
id: "deleteHead",
|
|
739
805
|
command: "plugin.table.deleteHead",
|
|
740
|
-
icon: /* @__PURE__ */ e(
|
|
806
|
+
icon: /* @__PURE__ */ e(kr, {}),
|
|
741
807
|
label: ["editor.table.deleteHeader", "Remove header row"]
|
|
742
808
|
},
|
|
743
809
|
{
|
|
@@ -749,53 +815,53 @@ const Gr = {
|
|
|
749
815
|
{
|
|
750
816
|
id: "deleteColumn",
|
|
751
817
|
command: "plugin.table.deleteColumn",
|
|
752
|
-
icon: /* @__PURE__ */ e(
|
|
818
|
+
icon: /* @__PURE__ */ e(jt, {}),
|
|
753
819
|
label: ["editor.table.deleteColumn", "Delete column"]
|
|
754
820
|
},
|
|
755
821
|
{
|
|
756
822
|
id: "deleteTable",
|
|
757
823
|
command: "plugin.table.deleteTable",
|
|
758
|
-
icon: /* @__PURE__ */ e(
|
|
824
|
+
icon: /* @__PURE__ */ e(Pt, {}),
|
|
759
825
|
label: ["editor.table.deleteTable", "Delete table"]
|
|
760
826
|
}
|
|
761
|
-
],
|
|
827
|
+
], ze = 6, Ur = qe(
|
|
762
828
|
[
|
|
763
829
|
"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
764
830
|
"ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
|
|
765
831
|
"ds:bg-[var(--background)] ds:p-[var(--spacing-xs)]",
|
|
766
832
|
"ds:shadow-[var(--shadow-md)]"
|
|
767
833
|
].join(" ")
|
|
768
|
-
), lt = "ds:self-stretch ds:[inline-size:var(--border-width-sm)] ds:bg-[var(--border)] ds:[margin-inline:var(--spacing-2xs)]",
|
|
769
|
-
function
|
|
834
|
+
), lt = "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 Re(o) {
|
|
770
836
|
return o.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
771
837
|
}
|
|
772
|
-
function
|
|
838
|
+
function Xr({
|
|
773
839
|
run: o,
|
|
774
840
|
active: a,
|
|
775
841
|
onTriggerDown: c
|
|
776
842
|
}) {
|
|
777
|
-
const { t: l } = Z(),
|
|
778
|
-
return /* @__PURE__ */ y(
|
|
779
|
-
/* @__PURE__ */ e(
|
|
780
|
-
|
|
843
|
+
const { t: l } = Z(), d = $e.find((g) => a.has(g.id)) ?? $e[0];
|
|
844
|
+
return /* @__PURE__ */ y(Te.Root, { children: [
|
|
845
|
+
/* @__PURE__ */ e(Te.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
|
|
846
|
+
oe,
|
|
781
847
|
{
|
|
782
848
|
size: "sm",
|
|
783
849
|
intent: "ghost",
|
|
784
|
-
startIcon:
|
|
785
|
-
endIcon: /* @__PURE__ */ e(
|
|
850
|
+
startIcon: d.icon,
|
|
851
|
+
endIcon: /* @__PURE__ */ e(Dt, {}),
|
|
786
852
|
"aria-label": l("editor.format", "Paragraph style"),
|
|
787
853
|
onMouseDown: c,
|
|
788
|
-
children: l(
|
|
854
|
+
children: l(d.label[0], d.label[1])
|
|
789
855
|
}
|
|
790
856
|
) }),
|
|
791
|
-
/* @__PURE__ */ e(
|
|
792
|
-
|
|
857
|
+
/* @__PURE__ */ e(Te.Content, { align: "start", children: $e.map((g) => /* @__PURE__ */ e(
|
|
858
|
+
Te.Item,
|
|
793
859
|
{
|
|
794
|
-
startIcon:
|
|
795
|
-
onSelect: () => o("module.block.format", { tag:
|
|
796
|
-
children: l(
|
|
860
|
+
startIcon: g.icon,
|
|
861
|
+
onSelect: () => o("module.block.format", { tag: g.tag }),
|
|
862
|
+
children: l(g.label[0], g.label[1])
|
|
797
863
|
},
|
|
798
|
-
|
|
864
|
+
g.id
|
|
799
865
|
)) })
|
|
800
866
|
] });
|
|
801
867
|
}
|
|
@@ -805,69 +871,69 @@ function Qr({
|
|
|
805
871
|
restoreSelection: c,
|
|
806
872
|
getSelectedText: l
|
|
807
873
|
}) {
|
|
808
|
-
const { t:
|
|
809
|
-
|
|
810
|
-
},
|
|
811
|
-
const k =
|
|
874
|
+
const { t: d } = Z(), [g, p] = T(!1), [s, b] = T(""), [v, z] = T(""), [I, S] = T(!1), w = de(), O = de(), m = () => {
|
|
875
|
+
b(""), z(""), S(!1);
|
|
876
|
+
}, f = () => {
|
|
877
|
+
const k = s.trim();
|
|
812
878
|
if (!k) return;
|
|
813
|
-
const
|
|
814
|
-
|
|
815
|
-
c(), o(
|
|
879
|
+
const E = v.trim() || k, _ = I ? ' target="_blank" rel="noopener noreferrer"' : "", A = `<a href="${Re(k)}"${_}>${Re(E)}</a>`;
|
|
880
|
+
p(!1), m(), window.requestAnimationFrame(() => {
|
|
881
|
+
c(), o(A);
|
|
816
882
|
});
|
|
817
883
|
};
|
|
818
|
-
return /* @__PURE__ */ y(j.Root, { open:
|
|
884
|
+
return /* @__PURE__ */ y(j.Root, { open: g, onOpenChange: p, children: [
|
|
819
885
|
/* @__PURE__ */ e(j.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
|
|
820
886
|
P,
|
|
821
887
|
{
|
|
822
888
|
size: "sm",
|
|
823
889
|
intent: "ghost",
|
|
824
890
|
icon: /* @__PURE__ */ e(lr, {}),
|
|
825
|
-
"aria-label":
|
|
891
|
+
"aria-label": d("editor.link.insert", "Insert link"),
|
|
826
892
|
onMouseDown: () => {
|
|
827
|
-
a(),
|
|
893
|
+
a(), z(l());
|
|
828
894
|
}
|
|
829
895
|
}
|
|
830
896
|
) }),
|
|
831
897
|
/* @__PURE__ */ y(j.Content, { children: [
|
|
832
|
-
/* @__PURE__ */ e(j.Header, { children: /* @__PURE__ */ e(j.Title, { children:
|
|
898
|
+
/* @__PURE__ */ e(j.Header, { children: /* @__PURE__ */ e(j.Title, { children: d("editor.link.insert", "Insert link") }) }),
|
|
833
899
|
/* @__PURE__ */ y(j.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
834
900
|
/* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
835
|
-
/* @__PURE__ */ e("label", { htmlFor: w, className:
|
|
901
|
+
/* @__PURE__ */ e("label", { htmlFor: w, className: ve, children: d("editor.link.url", "URL") }),
|
|
836
902
|
/* @__PURE__ */ e(
|
|
837
903
|
_e,
|
|
838
904
|
{
|
|
839
905
|
id: w,
|
|
840
906
|
type: "url",
|
|
841
|
-
value:
|
|
842
|
-
onChange: (k) =>
|
|
907
|
+
value: s,
|
|
908
|
+
onChange: (k) => b(k.target.value),
|
|
843
909
|
placeholder: "https://…"
|
|
844
910
|
}
|
|
845
911
|
)
|
|
846
912
|
] }),
|
|
847
913
|
/* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
848
|
-
/* @__PURE__ */ e("label", { htmlFor: O, className:
|
|
914
|
+
/* @__PURE__ */ e("label", { htmlFor: O, className: ve, children: d("editor.link.text", "Text to display") }),
|
|
849
915
|
/* @__PURE__ */ e(
|
|
850
916
|
_e,
|
|
851
917
|
{
|
|
852
918
|
id: O,
|
|
853
919
|
value: v,
|
|
854
|
-
onChange: (k) =>
|
|
855
|
-
placeholder:
|
|
920
|
+
onChange: (k) => z(k.target.value),
|
|
921
|
+
placeholder: d("editor.link.textPlaceholder", "Link text")
|
|
856
922
|
}
|
|
857
923
|
)
|
|
858
924
|
] }),
|
|
859
925
|
/* @__PURE__ */ e(
|
|
860
|
-
|
|
926
|
+
$t,
|
|
861
927
|
{
|
|
862
|
-
checked:
|
|
928
|
+
checked: I,
|
|
863
929
|
onCheckedChange: (k) => S(k === !0),
|
|
864
|
-
label:
|
|
930
|
+
label: d("editor.link.newTab", "Open in new tab")
|
|
865
931
|
}
|
|
866
932
|
)
|
|
867
933
|
] }),
|
|
868
934
|
/* @__PURE__ */ y(j.Footer, { children: [
|
|
869
|
-
/* @__PURE__ */ e(j.Close, { asChild: !0, children: /* @__PURE__ */ e(
|
|
870
|
-
/* @__PURE__ */ e(
|
|
935
|
+
/* @__PURE__ */ e(j.Close, { asChild: !0, children: /* @__PURE__ */ e(oe, { intent: "secondary", children: d("common.cancel") }) }),
|
|
936
|
+
/* @__PURE__ */ e(oe, { onClick: f, disabled: !s.trim(), children: d("editor.link.insertAction", "Insert") })
|
|
871
937
|
] })
|
|
872
938
|
] })
|
|
873
939
|
] });
|
|
@@ -878,69 +944,69 @@ function Zr({
|
|
|
878
944
|
restoreSelection: c,
|
|
879
945
|
uploadImage: l
|
|
880
946
|
}) {
|
|
881
|
-
const { t:
|
|
882
|
-
const k = `<img src="${
|
|
883
|
-
|
|
947
|
+
const { t: d } = Z(), [g, p] = T(!1), [s, b] = T(""), [v, z] = T(""), I = de(), S = de(), w = (m, f) => {
|
|
948
|
+
const k = `<img src="${Re(m)}" alt="${Re(f)}" loading="lazy">`;
|
|
949
|
+
p(!1), b(""), z(""), window.requestAnimationFrame(() => {
|
|
884
950
|
c(), o(k);
|
|
885
951
|
});
|
|
886
952
|
}, O = () => {
|
|
887
|
-
const
|
|
888
|
-
|
|
953
|
+
const m = s.trim();
|
|
954
|
+
m && w(m, v.trim());
|
|
889
955
|
};
|
|
890
|
-
return /* @__PURE__ */ y(j.Root, { open:
|
|
956
|
+
return /* @__PURE__ */ y(j.Root, { open: g, onOpenChange: p, children: [
|
|
891
957
|
/* @__PURE__ */ e(j.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
|
|
892
958
|
P,
|
|
893
959
|
{
|
|
894
960
|
size: "sm",
|
|
895
961
|
intent: "ghost",
|
|
896
|
-
icon: /* @__PURE__ */ e(
|
|
897
|
-
"aria-label":
|
|
962
|
+
icon: /* @__PURE__ */ e(qt, {}),
|
|
963
|
+
"aria-label": d("editor.image.insert", "Insert image"),
|
|
898
964
|
onMouseDown: () => a()
|
|
899
965
|
}
|
|
900
966
|
) }),
|
|
901
967
|
/* @__PURE__ */ y(j.Content, { children: [
|
|
902
|
-
/* @__PURE__ */ e(j.Header, { children: /* @__PURE__ */ e(j.Title, { children:
|
|
968
|
+
/* @__PURE__ */ e(j.Header, { children: /* @__PURE__ */ e(j.Title, { children: d("editor.image.insert", "Insert image") }) }),
|
|
903
969
|
/* @__PURE__ */ y(j.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
904
970
|
l ? /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
905
|
-
/* @__PURE__ */ e("span", { className:
|
|
971
|
+
/* @__PURE__ */ e("span", { className: ve, children: d("editor.image.upload", "Upload") }),
|
|
906
972
|
/* @__PURE__ */ e(
|
|
907
|
-
|
|
973
|
+
Ot,
|
|
908
974
|
{
|
|
909
975
|
variant: "dropzone",
|
|
910
976
|
accept: {
|
|
911
977
|
"image/*": [".png", ".jpg", ".jpeg", ".gif", ".webp", ".svg"]
|
|
912
978
|
},
|
|
913
979
|
maxFiles: 1,
|
|
914
|
-
onUpload: async (
|
|
915
|
-
const k = await l(
|
|
916
|
-
w(k,
|
|
980
|
+
onUpload: async (m, { signal: f }) => {
|
|
981
|
+
const k = await l(m, f);
|
|
982
|
+
w(k, m.name);
|
|
917
983
|
}
|
|
918
984
|
}
|
|
919
985
|
),
|
|
920
|
-
/* @__PURE__ */ e("span", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", children:
|
|
986
|
+
/* @__PURE__ */ e("span", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", children: d("editor.image.orUrl", "Or paste an image URL") })
|
|
921
987
|
] }) : null,
|
|
922
988
|
/* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
923
|
-
/* @__PURE__ */ e("label", { htmlFor:
|
|
989
|
+
/* @__PURE__ */ e("label", { htmlFor: I, className: ve, children: d("editor.image.url", "Image URL") }),
|
|
924
990
|
/* @__PURE__ */ e(
|
|
925
991
|
_e,
|
|
926
992
|
{
|
|
927
|
-
id:
|
|
993
|
+
id: I,
|
|
928
994
|
type: "url",
|
|
929
|
-
value:
|
|
930
|
-
onChange: (
|
|
995
|
+
value: s,
|
|
996
|
+
onChange: (m) => b(m.target.value),
|
|
931
997
|
placeholder: "https://…"
|
|
932
998
|
}
|
|
933
999
|
)
|
|
934
1000
|
] }),
|
|
935
1001
|
/* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
936
|
-
/* @__PURE__ */ e("label", { htmlFor: S, className:
|
|
1002
|
+
/* @__PURE__ */ e("label", { htmlFor: S, className: ve, children: d("editor.image.alt", "Alt text") }),
|
|
937
1003
|
/* @__PURE__ */ e(
|
|
938
1004
|
_e,
|
|
939
1005
|
{
|
|
940
1006
|
id: S,
|
|
941
1007
|
value: v,
|
|
942
|
-
onChange: (
|
|
943
|
-
placeholder:
|
|
1008
|
+
onChange: (m) => z(m.target.value),
|
|
1009
|
+
placeholder: d(
|
|
944
1010
|
"editor.image.altPlaceholder",
|
|
945
1011
|
"Describe the image"
|
|
946
1012
|
)
|
|
@@ -949,8 +1015,8 @@ function Zr({
|
|
|
949
1015
|
] })
|
|
950
1016
|
] }),
|
|
951
1017
|
/* @__PURE__ */ y(j.Footer, { children: [
|
|
952
|
-
/* @__PURE__ */ e(j.Close, { asChild: !0, children: /* @__PURE__ */ e(
|
|
953
|
-
/* @__PURE__ */ e(
|
|
1018
|
+
/* @__PURE__ */ e(j.Close, { asChild: !0, children: /* @__PURE__ */ e(oe, { intent: "secondary", children: d("common.cancel") }) }),
|
|
1019
|
+
/* @__PURE__ */ e(oe, { onClick: O, disabled: !s.trim(), children: d("editor.image.insertAction", "Insert") })
|
|
954
1020
|
] })
|
|
955
1021
|
] })
|
|
956
1022
|
] });
|
|
@@ -960,40 +1026,40 @@ function Yr({
|
|
|
960
1026
|
saveSelection: a,
|
|
961
1027
|
restoreSelection: c
|
|
962
1028
|
}) {
|
|
963
|
-
const { t: l } = Z(), [
|
|
964
|
-
|
|
1029
|
+
const { t: l } = Z(), [d, g] = T("#1f2a5c"), p = (b) => {
|
|
1030
|
+
g(b), c(), o("module.inline.format", {
|
|
965
1031
|
tag: "span",
|
|
966
|
-
style: { color:
|
|
1032
|
+
style: { color: b },
|
|
967
1033
|
type: "toggle"
|
|
968
1034
|
});
|
|
969
|
-
},
|
|
1035
|
+
}, s = () => {
|
|
970
1036
|
c(), o("module.inline.remove", { style: "color" });
|
|
971
1037
|
};
|
|
972
|
-
return /* @__PURE__ */ y(B, { onOpenChange: (
|
|
1038
|
+
return /* @__PURE__ */ y(B, { onOpenChange: (b) => b && a(), children: [
|
|
973
1039
|
/* @__PURE__ */ e(B.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
|
|
974
1040
|
P,
|
|
975
1041
|
{
|
|
976
1042
|
size: "sm",
|
|
977
1043
|
intent: "ghost",
|
|
978
|
-
icon: /* @__PURE__ */ e(
|
|
1044
|
+
icon: /* @__PURE__ */ e(yr, {}),
|
|
979
1045
|
"aria-label": l("editor.textColor", "Text colour"),
|
|
980
|
-
onMouseDown: (
|
|
981
|
-
|
|
1046
|
+
onMouseDown: (b) => {
|
|
1047
|
+
b.preventDefault(), a();
|
|
982
1048
|
}
|
|
983
1049
|
}
|
|
984
1050
|
) }),
|
|
985
1051
|
/* @__PURE__ */ y(B.Content, { side: "bottom", align: "start", children: [
|
|
986
1052
|
/* @__PURE__ */ e(B.Heading, { children: l("editor.textColor", "Text colour") }),
|
|
987
1053
|
/* @__PURE__ */ e("div", { className: "ds:pt-[var(--spacing-sm)]", children: /* @__PURE__ */ e(
|
|
988
|
-
|
|
1054
|
+
je,
|
|
989
1055
|
{
|
|
990
1056
|
variant: "inline",
|
|
991
1057
|
size: "sm",
|
|
992
|
-
value:
|
|
993
|
-
onChange:
|
|
1058
|
+
value: d,
|
|
1059
|
+
onChange: p
|
|
994
1060
|
}
|
|
995
1061
|
) }),
|
|
996
|
-
/* @__PURE__ */ e("div", { className: "ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:justify-end", children: /* @__PURE__ */ e(
|
|
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: s, children: l("editor.color.remove", "Remove colour") }) })
|
|
997
1063
|
] })
|
|
998
1064
|
] });
|
|
999
1065
|
}
|
|
@@ -1002,73 +1068,73 @@ function Jr({
|
|
|
1002
1068
|
saveSelection: a,
|
|
1003
1069
|
restoreSelection: c
|
|
1004
1070
|
}) {
|
|
1005
|
-
const { t: l } = Z(), [
|
|
1006
|
-
|
|
1071
|
+
const { t: l } = Z(), [d, g] = T("#fff3a3"), p = (b) => {
|
|
1072
|
+
g(b), c(), o("module.inline.format", {
|
|
1007
1073
|
tag: "span",
|
|
1008
|
-
style: { "background-color":
|
|
1074
|
+
style: { "background-color": b },
|
|
1009
1075
|
type: "toggle"
|
|
1010
1076
|
});
|
|
1011
|
-
},
|
|
1077
|
+
}, s = () => {
|
|
1012
1078
|
c(), o("module.inline.remove", { style: "background-color" });
|
|
1013
1079
|
};
|
|
1014
|
-
return /* @__PURE__ */ y(B, { onOpenChange: (
|
|
1080
|
+
return /* @__PURE__ */ y(B, { onOpenChange: (b) => b && a(), children: [
|
|
1015
1081
|
/* @__PURE__ */ e(B.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1016
1082
|
P,
|
|
1017
1083
|
{
|
|
1018
1084
|
size: "sm",
|
|
1019
1085
|
intent: "ghost",
|
|
1020
|
-
icon: /* @__PURE__ */ e(
|
|
1086
|
+
icon: /* @__PURE__ */ e(or, {}),
|
|
1021
1087
|
"aria-label": l("editor.highlightColor", "Highlight"),
|
|
1022
|
-
onMouseDown: (
|
|
1023
|
-
|
|
1088
|
+
onMouseDown: (b) => {
|
|
1089
|
+
b.preventDefault(), a();
|
|
1024
1090
|
}
|
|
1025
1091
|
}
|
|
1026
1092
|
) }),
|
|
1027
1093
|
/* @__PURE__ */ y(B.Content, { side: "bottom", align: "start", children: [
|
|
1028
1094
|
/* @__PURE__ */ e(B.Heading, { children: l("editor.highlightColor", "Highlight") }),
|
|
1029
1095
|
/* @__PURE__ */ e("div", { className: "ds:pt-[var(--spacing-sm)]", children: /* @__PURE__ */ e(
|
|
1030
|
-
|
|
1096
|
+
je,
|
|
1031
1097
|
{
|
|
1032
1098
|
variant: "inline",
|
|
1033
1099
|
size: "sm",
|
|
1034
|
-
value:
|
|
1035
|
-
onChange:
|
|
1100
|
+
value: d,
|
|
1101
|
+
onChange: p
|
|
1036
1102
|
}
|
|
1037
1103
|
) }),
|
|
1038
|
-
/* @__PURE__ */ e("div", { className: "ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:justify-end", children: /* @__PURE__ */ e(
|
|
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: s, children: l("editor.highlight.remove", "Remove highlight") }) })
|
|
1039
1105
|
] })
|
|
1040
1106
|
] });
|
|
1041
1107
|
}
|
|
1042
|
-
function
|
|
1108
|
+
function en(o, a) {
|
|
1043
1109
|
const c = Array.from({ length: a }, () => "<td><br></td>").join("");
|
|
1044
1110
|
return `<table><tbody>${Array.from({ length: o }, () => `<tr>${c}</tr>`).join("")}</tbody></table>`;
|
|
1045
1111
|
}
|
|
1046
|
-
function
|
|
1112
|
+
function tn({
|
|
1047
1113
|
run: o,
|
|
1048
1114
|
insertTable: a,
|
|
1049
1115
|
active: c
|
|
1050
1116
|
}) {
|
|
1051
|
-
const { t: l } = Z(), [
|
|
1052
|
-
return /* @__PURE__ */ y(B, { onOpenChange: (
|
|
1117
|
+
const { t: l } = Z(), [d, g] = T({ r: 0, c: 0 }), p = c.has("table");
|
|
1118
|
+
return /* @__PURE__ */ y(B, { onOpenChange: (s) => !s && g({ r: 0, c: 0 }), children: [
|
|
1053
1119
|
/* @__PURE__ */ e(B.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1054
1120
|
P,
|
|
1055
1121
|
{
|
|
1056
1122
|
size: "sm",
|
|
1057
1123
|
intent: "ghost",
|
|
1058
|
-
icon: /* @__PURE__ */ e(
|
|
1124
|
+
icon: /* @__PURE__ */ e(Ir, {}),
|
|
1059
1125
|
"aria-label": l("editor.table.insert", "Insert table"),
|
|
1060
|
-
onMouseDown: (
|
|
1126
|
+
onMouseDown: (s) => s.preventDefault()
|
|
1061
1127
|
}
|
|
1062
1128
|
) }),
|
|
1063
|
-
/* @__PURE__ */ e(B.Content, { side: "bottom", align: "start", children:
|
|
1129
|
+
/* @__PURE__ */ e(B.Content, { side: "bottom", align: "start", children: p ? (
|
|
1064
1130
|
// Caret is already inside a table — offer the manage ops only, never
|
|
1065
1131
|
// a nested-table insert (mirrors Redactor's native dropdown, which
|
|
1066
1132
|
// disables "insert table" while the caret is in a table).
|
|
1067
|
-
/* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children:
|
|
1133
|
+
/* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: st.map((s) => /* @__PURE__ */ y(
|
|
1068
1134
|
"button",
|
|
1069
1135
|
{
|
|
1070
1136
|
type: "button",
|
|
1071
|
-
onClick: () => o(
|
|
1137
|
+
onClick: () => o(s.command),
|
|
1072
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)]",
|
|
1073
1139
|
children: [
|
|
1074
1140
|
/* @__PURE__ */ e(
|
|
@@ -1076,15 +1142,15 @@ function en({
|
|
|
1076
1142
|
{
|
|
1077
1143
|
"aria-hidden": "true",
|
|
1078
1144
|
className: "ds:inline-flex ds:size-4 ds:shrink-0 ds:items-center ds:justify-center ds:text-[color:var(--muted-foreground)]",
|
|
1079
|
-
children:
|
|
1145
|
+
children: s.icon
|
|
1080
1146
|
}
|
|
1081
1147
|
),
|
|
1082
|
-
l(
|
|
1148
|
+
l(s.label[0], s.label[1])
|
|
1083
1149
|
]
|
|
1084
1150
|
},
|
|
1085
|
-
|
|
1151
|
+
s.id
|
|
1086
1152
|
)) })
|
|
1087
|
-
) : /* @__PURE__ */ y(
|
|
1153
|
+
) : /* @__PURE__ */ y(De, { children: [
|
|
1088
1154
|
/* @__PURE__ */ e(B.Heading, { children: l("editor.table.insert", "Insert table") }),
|
|
1089
1155
|
/* @__PURE__ */ e(
|
|
1090
1156
|
"div",
|
|
@@ -1092,53 +1158,53 @@ function en({
|
|
|
1092
1158
|
role: "group",
|
|
1093
1159
|
"aria-label": l("editor.table.sizePicker", "Table size"),
|
|
1094
1160
|
className: "ds:mt-[var(--spacing-sm)] ds:grid ds:w-fit ds:grid-cols-6 ds:gap-[var(--spacing-2xs)]",
|
|
1095
|
-
onMouseLeave: () =>
|
|
1096
|
-
children: Array.from({ length:
|
|
1097
|
-
const v = Math.floor(
|
|
1161
|
+
onMouseLeave: () => g({ r: 0, c: 0 }),
|
|
1162
|
+
children: Array.from({ length: ze * ze }, (s, b) => {
|
|
1163
|
+
const v = Math.floor(b / ze) + 1, z = b % ze + 1, I = v <= d.r && z <= d.c;
|
|
1098
1164
|
return /* @__PURE__ */ e(
|
|
1099
1165
|
"button",
|
|
1100
1166
|
{
|
|
1101
1167
|
type: "button",
|
|
1102
1168
|
"aria-label": l("editor.table.sizeCell", "{{r}}×{{c}}", {
|
|
1103
1169
|
r: v,
|
|
1104
|
-
c:
|
|
1170
|
+
c: z
|
|
1105
1171
|
}),
|
|
1106
|
-
onMouseEnter: () =>
|
|
1107
|
-
onClick: () => a(
|
|
1108
|
-
className: `ds:size-5 ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--border)] ${
|
|
1172
|
+
onMouseEnter: () => g({ r: v, c: z }),
|
|
1173
|
+
onClick: () => a(en(v, z)),
|
|
1174
|
+
className: `ds:size-5 ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--border)] ${I ? "ds:bg-[var(--primary)]" : "ds:bg-[var(--muted)]"}`
|
|
1109
1175
|
},
|
|
1110
|
-
|
|
1176
|
+
b
|
|
1111
1177
|
);
|
|
1112
1178
|
})
|
|
1113
1179
|
}
|
|
1114
1180
|
),
|
|
1115
|
-
/* @__PURE__ */ e("p", { className: "ds:mt-[var(--spacing-xs)] ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", children:
|
|
1116
|
-
r:
|
|
1117
|
-
c:
|
|
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 ? l("editor.table.sizeCell", "{{r}}×{{c}}", {
|
|
1182
|
+
r: d.r,
|
|
1183
|
+
c: d.c
|
|
1118
1184
|
}) : l("editor.table.sizeHint", "Pick a size") })
|
|
1119
1185
|
] }) })
|
|
1120
1186
|
] });
|
|
1121
1187
|
}
|
|
1122
|
-
const
|
|
1188
|
+
const rn = Object.fromEntries(st.map((o) => [o.id, o])), nn = [
|
|
1123
1189
|
"ds:absolute ds:z-20 ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]",
|
|
1124
1190
|
"ds:[inset-block-start:var(--rte-tt-top)] ds:[inset-inline-start:var(--rte-tt-start)]",
|
|
1125
1191
|
"ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
|
|
1126
1192
|
"ds:bg-[var(--popover)] ds:p-[var(--spacing-2xs)] ds:shadow-[var(--shadow-lg)]"
|
|
1127
|
-
].join(" "),
|
|
1128
|
-
function
|
|
1193
|
+
].join(" "), on = "#fde68a";
|
|
1194
|
+
function nt({
|
|
1129
1195
|
scope: o,
|
|
1130
1196
|
icon: a,
|
|
1131
1197
|
label: c,
|
|
1132
1198
|
onOpenChange: l,
|
|
1133
|
-
saveTableCell:
|
|
1134
|
-
applyTableBackground:
|
|
1199
|
+
saveTableCell: d,
|
|
1200
|
+
applyTableBackground: g
|
|
1135
1201
|
}) {
|
|
1136
|
-
const { t:
|
|
1202
|
+
const { t: p } = Z(), [s, b] = T(on);
|
|
1137
1203
|
return /* @__PURE__ */ y(
|
|
1138
1204
|
B,
|
|
1139
1205
|
{
|
|
1140
1206
|
onOpenChange: (v) => {
|
|
1141
|
-
l(v), v &&
|
|
1207
|
+
l(v), v && d();
|
|
1142
1208
|
},
|
|
1143
1209
|
children: [
|
|
1144
1210
|
/* @__PURE__ */ e(B.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
|
|
@@ -1153,24 +1219,24 @@ function rt({
|
|
|
1153
1219
|
) }),
|
|
1154
1220
|
/* @__PURE__ */ y(B.Content, { side: "bottom", align: "center", children: [
|
|
1155
1221
|
/* @__PURE__ */ e(
|
|
1156
|
-
|
|
1222
|
+
je,
|
|
1157
1223
|
{
|
|
1158
1224
|
variant: "inline",
|
|
1159
1225
|
size: "sm",
|
|
1160
|
-
value:
|
|
1226
|
+
value: s,
|
|
1161
1227
|
onChange: (v) => {
|
|
1162
|
-
|
|
1228
|
+
b(v), g(o, v);
|
|
1163
1229
|
}
|
|
1164
1230
|
}
|
|
1165
1231
|
),
|
|
1166
1232
|
/* @__PURE__ */ e(
|
|
1167
|
-
|
|
1233
|
+
oe,
|
|
1168
1234
|
{
|
|
1169
1235
|
size: "sm",
|
|
1170
1236
|
intent: "ghost",
|
|
1171
1237
|
className: "ds:mt-[var(--spacing-xs)] ds:w-full",
|
|
1172
|
-
onClick: () =>
|
|
1173
|
-
children:
|
|
1238
|
+
onClick: () => g(o, null),
|
|
1239
|
+
children: p("editor.table.clearColor", "Clear colour")
|
|
1174
1240
|
}
|
|
1175
1241
|
)
|
|
1176
1242
|
] })
|
|
@@ -1178,47 +1244,47 @@ function rt({
|
|
|
1178
1244
|
}
|
|
1179
1245
|
);
|
|
1180
1246
|
}
|
|
1181
|
-
function
|
|
1247
|
+
function an({
|
|
1182
1248
|
active: o,
|
|
1183
1249
|
run: a,
|
|
1184
1250
|
areaRef: c,
|
|
1185
1251
|
getActiveTableEl: l,
|
|
1186
|
-
enableColor:
|
|
1187
|
-
saveTableCell:
|
|
1188
|
-
applyTableBackground:
|
|
1252
|
+
enableColor: d = !1,
|
|
1253
|
+
saveTableCell: g,
|
|
1254
|
+
applyTableBackground: p
|
|
1189
1255
|
}) {
|
|
1190
|
-
const { t:
|
|
1191
|
-
|
|
1256
|
+
const { t: s } = Z(), b = o.has("table"), [v, z] = T(null), I = $(0), [S, w] = T(!1), O = C((f) => {
|
|
1257
|
+
I.current = Math.max(
|
|
1192
1258
|
0,
|
|
1193
|
-
|
|
1194
|
-
), w(
|
|
1259
|
+
I.current + (f ? 1 : -1)
|
|
1260
|
+
), w(I.current > 0);
|
|
1195
1261
|
}, []);
|
|
1196
|
-
if (
|
|
1262
|
+
if (Q(() => {
|
|
1197
1263
|
if (S) return;
|
|
1198
|
-
if (!
|
|
1199
|
-
|
|
1264
|
+
if (!b || typeof window > "u") {
|
|
1265
|
+
z(null);
|
|
1200
1266
|
return;
|
|
1201
1267
|
}
|
|
1202
|
-
const
|
|
1203
|
-
const
|
|
1204
|
-
if (!
|
|
1205
|
-
|
|
1268
|
+
const f = () => {
|
|
1269
|
+
const A = c.current, Y = l();
|
|
1270
|
+
if (!A || !Y) {
|
|
1271
|
+
z(null);
|
|
1206
1272
|
return;
|
|
1207
1273
|
}
|
|
1208
|
-
const
|
|
1209
|
-
|
|
1274
|
+
const L = A.getBoundingClientRect(), D = Y.getBoundingClientRect(), H = getComputedStyle(A).direction === "rtl", J = Math.max(0, D.top - L.top - 44), ee = H ? L.right - D.right + D.width / 2 : D.left - L.left + D.width / 2;
|
|
1275
|
+
z({ top: J, start: Math.max(0, ee), rtl: H });
|
|
1210
1276
|
};
|
|
1211
|
-
|
|
1212
|
-
const k = new ResizeObserver(
|
|
1213
|
-
return
|
|
1214
|
-
k.disconnect(), window.removeEventListener("scroll",
|
|
1277
|
+
f();
|
|
1278
|
+
const k = new ResizeObserver(f), E = c.current, _ = l();
|
|
1279
|
+
return E && k.observe(E), _ && k.observe(_), window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
|
|
1280
|
+
k.disconnect(), window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
|
|
1215
1281
|
};
|
|
1216
|
-
}, [
|
|
1217
|
-
const
|
|
1282
|
+
}, [b, S, c, l]), !b && !S || !v) return null;
|
|
1283
|
+
const m = [
|
|
1218
1284
|
["rowAbove", "rowBelow"],
|
|
1219
1285
|
["colLeft", "colRight"],
|
|
1220
1286
|
["addHead"],
|
|
1221
|
-
...
|
|
1287
|
+
...d ? ["colour"] : [],
|
|
1222
1288
|
["deleteRow", "deleteColumn"],
|
|
1223
1289
|
["deleteTable"]
|
|
1224
1290
|
];
|
|
@@ -1226,79 +1292,79 @@ function on({
|
|
|
1226
1292
|
// Tooltips disambiguate the icon-only ops on hover (and provide each
|
|
1227
1293
|
// button's accessible name via IconButton's `tooltip` prop). Radix Tooltip
|
|
1228
1294
|
// needs a provider ancestor, so scope one to the bar.
|
|
1229
|
-
/* @__PURE__ */ e(
|
|
1295
|
+
/* @__PURE__ */ e(Lt, { children: /* @__PURE__ */ e(
|
|
1230
1296
|
"div",
|
|
1231
1297
|
{
|
|
1232
1298
|
role: "group",
|
|
1233
|
-
"aria-label":
|
|
1234
|
-
className: `${
|
|
1299
|
+
"aria-label": s("editor.table.toolbar", "Table tools"),
|
|
1300
|
+
className: `${nn} ${v.rtl ? "ds:translate-x-1/2" : "ds:-translate-x-1/2"}`,
|
|
1235
1301
|
style: {
|
|
1236
1302
|
"--rte-tt-top": `${v.top}px`,
|
|
1237
1303
|
"--rte-tt-start": `${v.start}px`
|
|
1238
1304
|
},
|
|
1239
|
-
children:
|
|
1305
|
+
children: m.map((f, k) => /* @__PURE__ */ y(ot, { children: [
|
|
1240
1306
|
k > 0 ? /* @__PURE__ */ e("span", { "aria-hidden": "true", className: lt }) : null,
|
|
1241
|
-
|
|
1307
|
+
f === "colour" ? /* @__PURE__ */ y(De, { children: [
|
|
1242
1308
|
/* @__PURE__ */ e(
|
|
1243
|
-
|
|
1309
|
+
nt,
|
|
1244
1310
|
{
|
|
1245
1311
|
scope: "cell",
|
|
1246
|
-
icon: /* @__PURE__ */ e(
|
|
1247
|
-
label:
|
|
1312
|
+
icon: /* @__PURE__ */ e(fr, {}),
|
|
1313
|
+
label: s("editor.table.cellColor", "Cell colour"),
|
|
1248
1314
|
onOpenChange: O,
|
|
1249
|
-
saveTableCell:
|
|
1250
|
-
applyTableBackground:
|
|
1315
|
+
saveTableCell: g,
|
|
1316
|
+
applyTableBackground: p
|
|
1251
1317
|
}
|
|
1252
1318
|
),
|
|
1253
1319
|
/* @__PURE__ */ e(
|
|
1254
|
-
|
|
1320
|
+
nt,
|
|
1255
1321
|
{
|
|
1256
1322
|
scope: "row",
|
|
1257
|
-
icon: /* @__PURE__ */ e(
|
|
1258
|
-
label:
|
|
1323
|
+
icon: /* @__PURE__ */ e(pr, {}),
|
|
1324
|
+
label: s("editor.table.rowColor", "Row colour"),
|
|
1259
1325
|
onOpenChange: O,
|
|
1260
|
-
saveTableCell:
|
|
1261
|
-
applyTableBackground:
|
|
1326
|
+
saveTableCell: g,
|
|
1327
|
+
applyTableBackground: p
|
|
1262
1328
|
}
|
|
1263
1329
|
)
|
|
1264
|
-
] }) :
|
|
1265
|
-
const
|
|
1330
|
+
] }) : f.map((E) => {
|
|
1331
|
+
const _ = rn[E];
|
|
1266
1332
|
return /* @__PURE__ */ e(
|
|
1267
1333
|
P,
|
|
1268
1334
|
{
|
|
1269
1335
|
size: "sm",
|
|
1270
1336
|
intent: "ghost",
|
|
1271
|
-
icon:
|
|
1272
|
-
tooltip:
|
|
1273
|
-
onMouseDown: (
|
|
1274
|
-
onClick: () => a(
|
|
1337
|
+
icon: _.icon,
|
|
1338
|
+
tooltip: s(_.label[0], _.label[1]),
|
|
1339
|
+
onMouseDown: (A) => A.preventDefault(),
|
|
1340
|
+
onClick: () => a(_.command)
|
|
1275
1341
|
},
|
|
1276
|
-
|
|
1342
|
+
E
|
|
1277
1343
|
);
|
|
1278
1344
|
})
|
|
1279
|
-
] },
|
|
1345
|
+
] }, f === "colour" ? "colour" : f[0]))
|
|
1280
1346
|
}
|
|
1281
1347
|
) })
|
|
1282
1348
|
);
|
|
1283
1349
|
}
|
|
1284
|
-
function
|
|
1350
|
+
function sn({
|
|
1285
1351
|
run: o,
|
|
1286
1352
|
active: a,
|
|
1287
1353
|
preset: c,
|
|
1288
1354
|
insertHtml: l,
|
|
1289
|
-
insertTable:
|
|
1290
|
-
saveSelection:
|
|
1291
|
-
restoreSelection:
|
|
1292
|
-
getSelectedText:
|
|
1293
|
-
uploadImage:
|
|
1355
|
+
insertTable: d,
|
|
1356
|
+
saveSelection: g,
|
|
1357
|
+
restoreSelection: p,
|
|
1358
|
+
getSelectedText: s,
|
|
1359
|
+
uploadImage: b,
|
|
1294
1360
|
enableColor: v = !1,
|
|
1295
|
-
enableImage:
|
|
1296
|
-
enableTable:
|
|
1361
|
+
enableImage: z = !1,
|
|
1362
|
+
enableTable: I = !1,
|
|
1297
1363
|
showExtensions: S = !1
|
|
1298
1364
|
}) {
|
|
1299
|
-
const { t: w } = Z(), O = (
|
|
1300
|
-
if (!
|
|
1301
|
-
const D = Gr[
|
|
1365
|
+
const { t: w } = Z(), O = (L) => L.preventDefault(), m = (L) => Wr[c].includes(L), f = (L) => {
|
|
1366
|
+
if (!m(L)) return null;
|
|
1367
|
+
const D = Gr[L];
|
|
1302
1368
|
return /* @__PURE__ */ e(
|
|
1303
1369
|
P,
|
|
1304
1370
|
{
|
|
@@ -1312,67 +1378,67 @@ function an({
|
|
|
1312
1378
|
},
|
|
1313
1379
|
D.id
|
|
1314
1380
|
);
|
|
1315
|
-
}, k = () => /* @__PURE__ */ e("span", { "aria-hidden": "true", className: lt }),
|
|
1381
|
+
}, k = () => /* @__PURE__ */ e("span", { "aria-hidden": "true", className: lt }), E = m("format"), _ = m("bold") || m("italic") || m("underline") || m("strike") || v, A = m("ul") || m("ol"), Y = m("link") || z || I;
|
|
1316
1382
|
return /* @__PURE__ */ y(
|
|
1317
1383
|
"div",
|
|
1318
1384
|
{
|
|
1319
1385
|
role: "group",
|
|
1320
1386
|
"aria-label": w("editor.toolbarLabel"),
|
|
1321
|
-
className:
|
|
1387
|
+
className: Ur(),
|
|
1322
1388
|
"data-component": "editor-toolbar",
|
|
1323
1389
|
children: [
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1390
|
+
E ? /* @__PURE__ */ e(Xr, { run: o, active: a, onTriggerDown: O }) : null,
|
|
1391
|
+
E && _ ? /* @__PURE__ */ e(k, {}) : null,
|
|
1392
|
+
f("bold"),
|
|
1393
|
+
f("italic"),
|
|
1394
|
+
f("underline"),
|
|
1395
|
+
f("strike"),
|
|
1330
1396
|
v ? /* @__PURE__ */ e(
|
|
1331
1397
|
Yr,
|
|
1332
1398
|
{
|
|
1333
1399
|
run: o,
|
|
1334
|
-
saveSelection:
|
|
1335
|
-
restoreSelection:
|
|
1400
|
+
saveSelection: g,
|
|
1401
|
+
restoreSelection: p
|
|
1336
1402
|
}
|
|
1337
1403
|
) : null,
|
|
1338
1404
|
v ? /* @__PURE__ */ e(
|
|
1339
1405
|
Jr,
|
|
1340
1406
|
{
|
|
1341
1407
|
run: o,
|
|
1342
|
-
saveSelection:
|
|
1343
|
-
restoreSelection:
|
|
1408
|
+
saveSelection: g,
|
|
1409
|
+
restoreSelection: p
|
|
1344
1410
|
}
|
|
1345
1411
|
) : null,
|
|
1346
|
-
(
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
(
|
|
1350
|
-
|
|
1412
|
+
(E || _) && A ? /* @__PURE__ */ e(k, {}) : null,
|
|
1413
|
+
f("ul"),
|
|
1414
|
+
f("ol"),
|
|
1415
|
+
(E || _ || A) && Y ? /* @__PURE__ */ e(k, {}) : null,
|
|
1416
|
+
m("link") ? /* @__PURE__ */ e(
|
|
1351
1417
|
Qr,
|
|
1352
1418
|
{
|
|
1353
1419
|
insertHtml: l,
|
|
1354
|
-
saveSelection:
|
|
1355
|
-
restoreSelection:
|
|
1356
|
-
getSelectedText:
|
|
1420
|
+
saveSelection: g,
|
|
1421
|
+
restoreSelection: p,
|
|
1422
|
+
getSelectedText: s
|
|
1357
1423
|
}
|
|
1358
1424
|
) : null,
|
|
1359
|
-
|
|
1425
|
+
z ? /* @__PURE__ */ e(
|
|
1360
1426
|
Zr,
|
|
1361
1427
|
{
|
|
1362
1428
|
insertHtml: l,
|
|
1363
|
-
saveSelection:
|
|
1364
|
-
restoreSelection:
|
|
1365
|
-
uploadImage:
|
|
1429
|
+
saveSelection: g,
|
|
1430
|
+
restoreSelection: p,
|
|
1431
|
+
uploadImage: b
|
|
1366
1432
|
}
|
|
1367
1433
|
) : null,
|
|
1368
|
-
|
|
1369
|
-
S && (
|
|
1434
|
+
I ? /* @__PURE__ */ e(tn, { run: o, insertTable: d, active: a }) : null,
|
|
1435
|
+
S && (E || _ || A || Y) ? /* @__PURE__ */ e(k, {}) : null,
|
|
1370
1436
|
S ? /* @__PURE__ */ e(
|
|
1371
1437
|
P,
|
|
1372
1438
|
{
|
|
1373
1439
|
size: "sm",
|
|
1374
1440
|
intent: "ghost",
|
|
1375
|
-
icon: /* @__PURE__ */ e(
|
|
1441
|
+
icon: /* @__PURE__ */ e(jr, {}),
|
|
1376
1442
|
"aria-label": w("editor.extensions", "Editor extensions"),
|
|
1377
1443
|
disabled: !0,
|
|
1378
1444
|
onMouseDown: O
|
|
@@ -1382,10 +1448,10 @@ function an({
|
|
|
1382
1448
|
}
|
|
1383
1449
|
);
|
|
1384
1450
|
}
|
|
1385
|
-
function
|
|
1451
|
+
function re(o) {
|
|
1386
1452
|
return _t(o, "rich-text");
|
|
1387
1453
|
}
|
|
1388
|
-
function
|
|
1454
|
+
function Oe(o = "") {
|
|
1389
1455
|
const a = String(o).trim();
|
|
1390
1456
|
if (a === "" || a === "<p><br></p>" || a === "<p> </p>")
|
|
1391
1457
|
return "";
|
|
@@ -1398,23 +1464,23 @@ function ln(o) {
|
|
|
1398
1464
|
'<img loading="lazy"$1>'
|
|
1399
1465
|
);
|
|
1400
1466
|
}
|
|
1401
|
-
function
|
|
1467
|
+
function dn(o) {
|
|
1402
1468
|
if (!o || typeof o != "object") return;
|
|
1403
1469
|
const a = o, c = (l) => {
|
|
1404
1470
|
if (l && typeof l == "object" && "url" in l) {
|
|
1405
|
-
const
|
|
1406
|
-
return typeof
|
|
1471
|
+
const d = l.url;
|
|
1472
|
+
return typeof d == "string" ? d : void 0;
|
|
1407
1473
|
}
|
|
1408
1474
|
};
|
|
1409
1475
|
return typeof a.url == "string" ? a.url : c(a.file) ?? c(a.data) ?? Object.values(a).map(c).find(Boolean);
|
|
1410
1476
|
}
|
|
1411
|
-
function
|
|
1477
|
+
function cn(o) {
|
|
1412
1478
|
if (o) return o;
|
|
1413
1479
|
if (typeof window > "u") return null;
|
|
1414
1480
|
const a = window;
|
|
1415
1481
|
return a.$R ?? a.Redactor ?? null;
|
|
1416
1482
|
}
|
|
1417
|
-
const
|
|
1483
|
+
const un = {
|
|
1418
1484
|
bold: ["module.inline.format", { tag: "b" }],
|
|
1419
1485
|
italic: ["module.inline.format", { tag: "i" }],
|
|
1420
1486
|
strikethrough: ["module.inline.format", { tag: "del" }],
|
|
@@ -1423,17 +1489,17 @@ const cn = {
|
|
|
1423
1489
|
heading: ["module.block.format", { tag: "h2" }],
|
|
1424
1490
|
quote: ["module.block.format", { tag: "blockquote" }],
|
|
1425
1491
|
paragraph: ["module.block.format", { tag: "p" }]
|
|
1426
|
-
},
|
|
1492
|
+
}, mn = {
|
|
1427
1493
|
zh: "zh_cn",
|
|
1428
1494
|
pt: "pt_br"
|
|
1429
1495
|
};
|
|
1430
|
-
function
|
|
1496
|
+
function hn(o) {
|
|
1431
1497
|
const a = o.split("-")[0];
|
|
1432
|
-
return
|
|
1498
|
+
return mn[a] ?? a ?? "en";
|
|
1433
1499
|
}
|
|
1434
|
-
const
|
|
1500
|
+
const fn = qe(
|
|
1435
1501
|
"redactor-theme-alfadocs ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"
|
|
1436
|
-
),
|
|
1502
|
+
), gn = qe(
|
|
1437
1503
|
[
|
|
1438
1504
|
"ds:block ds:[inline-size:100%]",
|
|
1439
1505
|
"ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
|
|
@@ -1447,7 +1513,7 @@ const hn = De(
|
|
|
1447
1513
|
"ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
1448
1514
|
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
1449
1515
|
].join(" ")
|
|
1450
|
-
),
|
|
1516
|
+
), dt = [
|
|
1451
1517
|
"ds:inline-flex ds:items-center ds:justify-center",
|
|
1452
1518
|
"ds:[min-block-size:var(--min-target-size)] ds:[min-inline-size:var(--min-target-size)]",
|
|
1453
1519
|
"ds:text-[color:var(--primary-foreground)]",
|
|
@@ -1456,62 +1522,62 @@ const hn = De(
|
|
|
1456
1522
|
"ds:focus-visible:outline-solid",
|
|
1457
1523
|
"ds:focus-visible:outline-[var(--primary-foreground)]",
|
|
1458
1524
|
"ds:focus-visible:[outline-offset:calc(var(--focus-ring-width)*-1)]"
|
|
1459
|
-
].join(" "),
|
|
1525
|
+
].join(" "), pn = `${dt} ds:hover:bg-[color-mix(in_srgb,var(--primary-foreground)_15%,transparent)]`, bn = `${dt} ds:bg-[var(--destructive)] ds:hover:bg-[color-mix(in_srgb,var(--destructive)_88%,var(--primary-foreground))]`, yn = Tt(
|
|
1460
1526
|
({
|
|
1461
1527
|
id: o,
|
|
1462
1528
|
defaultValue: a,
|
|
1463
1529
|
value: c,
|
|
1464
1530
|
onChange: l,
|
|
1465
|
-
toolbar:
|
|
1466
|
-
placeholder:
|
|
1467
|
-
readOnly:
|
|
1468
|
-
ariaLabel:
|
|
1469
|
-
minHeight:
|
|
1531
|
+
toolbar: d = "standard",
|
|
1532
|
+
placeholder: g,
|
|
1533
|
+
readOnly: p = !1,
|
|
1534
|
+
ariaLabel: s,
|
|
1535
|
+
minHeight: b,
|
|
1470
1536
|
showExtensions: v,
|
|
1471
|
-
className:
|
|
1472
|
-
redactor:
|
|
1537
|
+
className: z,
|
|
1538
|
+
redactor: I,
|
|
1473
1539
|
options: S,
|
|
1474
1540
|
plugins: w,
|
|
1475
1541
|
lang: O,
|
|
1476
|
-
imageUploadUrl:
|
|
1477
|
-
onKeyDown:
|
|
1542
|
+
imageUploadUrl: m,
|
|
1543
|
+
onKeyDown: f,
|
|
1478
1544
|
onRequestAiDraft: k,
|
|
1479
|
-
aiDraftFormat:
|
|
1480
|
-
aiPrivacyNotice:
|
|
1481
|
-
onDictate:
|
|
1545
|
+
aiDraftFormat: E = "html",
|
|
1546
|
+
aiPrivacyNotice: _,
|
|
1547
|
+
onDictate: A,
|
|
1482
1548
|
onProofread: Y,
|
|
1483
|
-
onAutoFormat:
|
|
1549
|
+
onAutoFormat: L
|
|
1484
1550
|
}, D) => {
|
|
1485
|
-
const { t:
|
|
1551
|
+
const { t: H, i18n: J } = Z(), ee = de(), me = Je(
|
|
1486
1552
|
() => `rte-${ee.replace(/[^a-zA-Z0-9-_]/g, "")}`,
|
|
1487
1553
|
[ee]
|
|
1488
|
-
), R = `#${
|
|
1554
|
+
), R = `#${me}`, G = $(null), K = $(null), he = $(!1), fe = $(p), x = $(null), q = $(null), [F, W] = T(!1), [ct, Pe] = T(!1), [Be, ut] = T(
|
|
1489
1555
|
() => /* @__PURE__ */ new Set()
|
|
1490
|
-
),
|
|
1491
|
-
|
|
1492
|
-
V.current = l,
|
|
1493
|
-
}, [l,
|
|
1494
|
-
const
|
|
1556
|
+
), ge = $(null), V = $(l), ke = $(f);
|
|
1557
|
+
Q(() => {
|
|
1558
|
+
V.current = l, ke.current = f;
|
|
1559
|
+
}, [l, f]);
|
|
1560
|
+
const mt = $(
|
|
1495
1561
|
(() => {
|
|
1496
1562
|
const t = c ?? a ?? "";
|
|
1497
|
-
return t ?
|
|
1563
|
+
return t ? re(t) : "";
|
|
1498
1564
|
})()
|
|
1499
|
-
),
|
|
1565
|
+
), ae = C(() => {
|
|
1500
1566
|
var r;
|
|
1501
|
-
const t =
|
|
1567
|
+
const t = K.current;
|
|
1502
1568
|
if (t)
|
|
1503
1569
|
try {
|
|
1504
1570
|
const n = t(R, "source.getCode");
|
|
1505
1571
|
if (typeof n == "string") return n;
|
|
1506
1572
|
} catch {
|
|
1507
1573
|
}
|
|
1508
|
-
return ((r =
|
|
1574
|
+
return ((r = G.current) == null ? void 0 : r.value) ?? "";
|
|
1509
1575
|
}, [R]), U = C(
|
|
1510
1576
|
(t, ...r) => {
|
|
1511
|
-
const n =
|
|
1577
|
+
const n = K.current;
|
|
1512
1578
|
if (!n) return !1;
|
|
1513
|
-
const
|
|
1514
|
-
if (
|
|
1579
|
+
const i = fe.current;
|
|
1580
|
+
if (i)
|
|
1515
1581
|
try {
|
|
1516
1582
|
n(R, "disableReadOnly");
|
|
1517
1583
|
} catch {
|
|
@@ -1521,7 +1587,7 @@ const hn = De(
|
|
|
1521
1587
|
} catch {
|
|
1522
1588
|
return !1;
|
|
1523
1589
|
} finally {
|
|
1524
|
-
if (
|
|
1590
|
+
if (i)
|
|
1525
1591
|
try {
|
|
1526
1592
|
n(R, "enableReadOnly");
|
|
1527
1593
|
} catch {
|
|
@@ -1529,68 +1595,85 @@ const hn = De(
|
|
|
1529
1595
|
}
|
|
1530
1596
|
},
|
|
1531
1597
|
[R]
|
|
1532
|
-
),
|
|
1598
|
+
), ie = C(
|
|
1533
1599
|
(t, r) => {
|
|
1534
|
-
var
|
|
1535
|
-
const n = (r == null ? void 0 : r.asHtml) ?? !0,
|
|
1536
|
-
if (U(n ? "insertion.insertHtml" : "insertion.insertText",
|
|
1537
|
-
const
|
|
1538
|
-
if (!
|
|
1539
|
-
const N =
|
|
1540
|
-
|
|
1541
|
-
const Ne = N +
|
|
1600
|
+
var ye;
|
|
1601
|
+
const n = (r == null ? void 0 : r.asHtml) ?? !0, i = n ? re(t) : t;
|
|
1602
|
+
if (U(n ? "insertion.insertHtml" : "insertion.insertText", i)) return;
|
|
1603
|
+
const h = G.current;
|
|
1604
|
+
if (!h) return;
|
|
1605
|
+
const N = h.selectionStart ?? h.value.length, X = h.selectionEnd ?? h.value.length;
|
|
1606
|
+
h.value = h.value.slice(0, N) + i + h.value.slice(X);
|
|
1607
|
+
const Ne = N + i.length;
|
|
1542
1608
|
try {
|
|
1543
|
-
|
|
1609
|
+
h.setSelectionRange(Ne, Ne);
|
|
1544
1610
|
} catch {
|
|
1545
1611
|
}
|
|
1546
|
-
(
|
|
1612
|
+
(ye = V.current) == null || ye.call(V, { html: re(h.value), markdown: "" });
|
|
1547
1613
|
},
|
|
1548
1614
|
[U]
|
|
1549
|
-
),
|
|
1550
|
-
var
|
|
1551
|
-
const t = (
|
|
1615
|
+
), Se = $(null), ne = C(() => {
|
|
1616
|
+
var i;
|
|
1617
|
+
const t = (i = x.current) == null ? void 0 : i.querySelector(".redactor-in"), r = typeof window < "u" ? window.getSelection() : null, n = /* @__PURE__ */ new Set();
|
|
1552
1618
|
if (t && r && r.anchorNode && t.contains(r.anchorNode) && typeof document.queryCommandState == "function") {
|
|
1553
|
-
r.rangeCount > 0 && (
|
|
1619
|
+
r.rangeCount > 0 && (Se.current = r.getRangeAt(0).cloneRange());
|
|
1554
1620
|
try {
|
|
1555
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");
|
|
1556
|
-
const
|
|
1622
|
+
const u = String(
|
|
1557
1623
|
document.queryCommandValue("formatBlock") || ""
|
|
1558
1624
|
).toLowerCase();
|
|
1559
|
-
/^h[1-6]$/.test(
|
|
1560
|
-
const
|
|
1561
|
-
|
|
1625
|
+
/^h[1-6]$/.test(u) ? (n.add("heading"), n.add(u)) : u === "blockquote" ? n.add("quote") : n.add("paragraph");
|
|
1626
|
+
const h = r.anchorNode.nodeType === Node.TEXT_NODE ? r.anchorNode.parentElement : r.anchorNode;
|
|
1627
|
+
h && t.contains(h) && h.closest("table") && n.add("table");
|
|
1562
1628
|
} catch {
|
|
1563
1629
|
}
|
|
1564
1630
|
}
|
|
1565
|
-
|
|
1566
|
-
(
|
|
1631
|
+
ut(
|
|
1632
|
+
(u) => u.size === n.size && [...n].every((h) => u.has(h)) ? u : n
|
|
1567
1633
|
);
|
|
1568
|
-
}, []),
|
|
1634
|
+
}, []), ce = C(
|
|
1569
1635
|
(t, ...r) => {
|
|
1570
|
-
U(t, ...r), typeof window < "u" ? window.requestAnimationFrame(() =>
|
|
1636
|
+
U(t, ...r), typeof window < "u" ? window.requestAnimationFrame(() => ne()) : ne();
|
|
1571
1637
|
},
|
|
1572
|
-
[U,
|
|
1573
|
-
)
|
|
1638
|
+
[U, ne]
|
|
1639
|
+
);
|
|
1640
|
+
Q(() => {
|
|
1641
|
+
const t = x.current;
|
|
1642
|
+
if (!t) return;
|
|
1643
|
+
const r = {
|
|
1644
|
+
b: ["module.inline.format", { tag: "b" }],
|
|
1645
|
+
i: ["module.inline.format", { tag: "i" }],
|
|
1646
|
+
u: ["module.inline.format", { tag: "u" }]
|
|
1647
|
+
}, n = (i) => {
|
|
1648
|
+
if (!(i.metaKey || i.ctrlKey) || i.altKey || i.shiftKey || i.isComposing) return;
|
|
1649
|
+
const u = r[i.key.toLowerCase()];
|
|
1650
|
+
if (!u) return;
|
|
1651
|
+
const h = t.querySelector(".redactor-in");
|
|
1652
|
+
!h || !(i.target instanceof Node) || !h.contains(i.target) || fe.current || (i.preventDefault(), i.stopImmediatePropagation(), ce(...u));
|
|
1653
|
+
};
|
|
1654
|
+
return t.addEventListener("keydown", n, !0), () => t.removeEventListener("keydown", n, !0);
|
|
1655
|
+
}, [ce]);
|
|
1656
|
+
const Ee = C(
|
|
1574
1657
|
(t) => {
|
|
1575
|
-
|
|
1658
|
+
ie(t, { asHtml: !0 }), typeof window < "u" && window.requestAnimationFrame(() => ne());
|
|
1576
1659
|
},
|
|
1577
|
-
[
|
|
1578
|
-
),
|
|
1660
|
+
[ie, ne]
|
|
1661
|
+
), Fe = C(() => {
|
|
1579
1662
|
var r;
|
|
1580
1663
|
if (typeof window < "u") {
|
|
1581
|
-
const n = (r = x.current) == null ? void 0 : r.querySelector(".redactor-in"),
|
|
1582
|
-
n &&
|
|
1664
|
+
const n = (r = x.current) == null ? void 0 : r.querySelector(".redactor-in"), i = window.getSelection();
|
|
1665
|
+
n && i && i.rangeCount > 0 && i.anchorNode && n.contains(i.anchorNode) && (Se.current = i.getRangeAt(0).cloneRange());
|
|
1583
1666
|
}
|
|
1584
|
-
const t =
|
|
1667
|
+
const t = K.current;
|
|
1585
1668
|
if (t)
|
|
1586
1669
|
try {
|
|
1587
1670
|
t(R, "selection.save");
|
|
1588
1671
|
} catch {
|
|
1589
1672
|
}
|
|
1590
|
-
}, [R]),
|
|
1591
|
-
const t =
|
|
1673
|
+
}, [R]), Ve = C(() => {
|
|
1674
|
+
const t = K.current;
|
|
1592
1675
|
if (!t) return;
|
|
1593
|
-
const r =
|
|
1676
|
+
const r = Se.current;
|
|
1594
1677
|
try {
|
|
1595
1678
|
t(R, "editor.focus");
|
|
1596
1679
|
} catch {
|
|
@@ -1608,190 +1691,193 @@ const hn = De(
|
|
|
1608
1691
|
t(R, "selection.restore");
|
|
1609
1692
|
} catch {
|
|
1610
1693
|
}
|
|
1611
|
-
}, [R]),
|
|
1694
|
+
}, [R]), ht = C(() => {
|
|
1612
1695
|
var n;
|
|
1613
1696
|
if (typeof window > "u") return "";
|
|
1614
1697
|
const t = (n = x.current) == null ? void 0 : n.querySelector(".redactor-in"), r = window.getSelection();
|
|
1615
1698
|
return !t || !r || !r.anchorNode || !t.contains(r.anchorNode) ? "" : r.toString();
|
|
1616
|
-
}, []),
|
|
1617
|
-
var
|
|
1699
|
+
}, []), ft = C(() => {
|
|
1700
|
+
var u;
|
|
1618
1701
|
if (typeof window > "u") return null;
|
|
1619
|
-
const t = (
|
|
1702
|
+
const t = (u = x.current) == null ? void 0 : u.querySelector(".redactor-in"), r = window.getSelection();
|
|
1620
1703
|
if (!t || !r || r.rangeCount === 0) return null;
|
|
1621
|
-
const n = r.anchorNode,
|
|
1622
|
-
return !
|
|
1623
|
-
}, []),
|
|
1624
|
-
var
|
|
1704
|
+
const n = r.anchorNode, i = n && n.nodeType === Node.TEXT_NODE ? n.parentElement : n;
|
|
1705
|
+
return !i || !t.contains(i) ? null : i.closest("table");
|
|
1706
|
+
}, []), Ke = $(null), we = C(() => {
|
|
1707
|
+
var u;
|
|
1625
1708
|
if (typeof window > "u") return null;
|
|
1626
|
-
const t = (
|
|
1709
|
+
const t = (u = x.current) == null ? void 0 : u.querySelector(".redactor-in"), r = window.getSelection();
|
|
1627
1710
|
if (!t || !r || r.rangeCount === 0) return null;
|
|
1628
|
-
const n = r.anchorNode,
|
|
1629
|
-
return !
|
|
1630
|
-
}, []),
|
|
1631
|
-
|
|
1632
|
-
}, [we]),
|
|
1711
|
+
const n = r.anchorNode, i = n && n.nodeType === Node.TEXT_NODE ? n.parentElement : n;
|
|
1712
|
+
return !i || !t.contains(i) ? null : i.closest("td,th");
|
|
1713
|
+
}, []), gt = C(() => {
|
|
1714
|
+
Ke.current = we();
|
|
1715
|
+
}, [we]), pt = C(
|
|
1633
1716
|
(t, r) => {
|
|
1634
|
-
var
|
|
1635
|
-
const n =
|
|
1717
|
+
var h;
|
|
1718
|
+
const n = Ke.current ?? we();
|
|
1636
1719
|
if (!n) return;
|
|
1637
|
-
const
|
|
1720
|
+
const i = t === "row" ? Array.from(((h = n.closest("tr")) == null ? void 0 : h.children) ?? [n]).filter(
|
|
1638
1721
|
(N) => N instanceof HTMLElement && (N.tagName === "TD" || N.tagName === "TH")
|
|
1639
|
-
) : [n],
|
|
1640
|
-
if (
|
|
1722
|
+
) : [n], u = K.current;
|
|
1723
|
+
if (u)
|
|
1641
1724
|
try {
|
|
1642
|
-
|
|
1725
|
+
u(R, "module.buffer.trigger");
|
|
1643
1726
|
} catch {
|
|
1644
1727
|
}
|
|
1645
|
-
for (const N of
|
|
1728
|
+
for (const N of i)
|
|
1646
1729
|
r ? N.style.setProperty("background-color", r) : N.style.removeProperty("background-color");
|
|
1647
|
-
if (
|
|
1730
|
+
if (u)
|
|
1648
1731
|
try {
|
|
1649
|
-
|
|
1732
|
+
u(R, "broadcast", "hardsync");
|
|
1650
1733
|
} catch {
|
|
1651
1734
|
}
|
|
1652
|
-
typeof window < "u" && window.requestAnimationFrame(() =>
|
|
1735
|
+
typeof window < "u" && window.requestAnimationFrame(() => ne());
|
|
1653
1736
|
},
|
|
1654
|
-
[we, R,
|
|
1655
|
-
),
|
|
1737
|
+
[we, R, ne]
|
|
1738
|
+
), bt = C(
|
|
1656
1739
|
(t) => {
|
|
1657
1740
|
var n;
|
|
1658
|
-
const r =
|
|
1741
|
+
const r = K.current;
|
|
1659
1742
|
if (r && typeof window < "u") {
|
|
1660
|
-
const
|
|
1661
|
-
if (
|
|
1743
|
+
const i = (n = x.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, X = N && (i != null && i.contains(N)) ? N.closest("ul,ol") : null;
|
|
1744
|
+
if (X)
|
|
1662
1745
|
try {
|
|
1663
|
-
r(R, "caret.setAfter",
|
|
1746
|
+
r(R, "caret.setAfter", X);
|
|
1664
1747
|
} catch {
|
|
1665
1748
|
}
|
|
1666
1749
|
}
|
|
1667
|
-
|
|
1668
|
-
var
|
|
1669
|
-
const
|
|
1670
|
-
|
|
1671
|
-
let N =
|
|
1750
|
+
Ee(t), typeof window < "u" && window.requestAnimationFrame(() => {
|
|
1751
|
+
var u;
|
|
1752
|
+
const i = (u = x.current) == null ? void 0 : u.querySelector(".redactor-in");
|
|
1753
|
+
i == null || i.querySelectorAll("table td, table th").forEach((h) => {
|
|
1754
|
+
let N = h.lastChild;
|
|
1672
1755
|
for (; N && N.nodeType === Node.TEXT_NODE && !(N.textContent ?? "").trim(); ) {
|
|
1673
|
-
const
|
|
1674
|
-
|
|
1756
|
+
const X = N.previousSibling;
|
|
1757
|
+
h.removeChild(N), N = X;
|
|
1675
1758
|
}
|
|
1676
1759
|
});
|
|
1677
1760
|
});
|
|
1678
1761
|
},
|
|
1679
|
-
[
|
|
1680
|
-
),
|
|
1762
|
+
[Ee, R]
|
|
1763
|
+
), yt = C(
|
|
1681
1764
|
async (t, r) => {
|
|
1682
|
-
if (!
|
|
1765
|
+
if (!m) throw new Error("No image upload URL configured.");
|
|
1683
1766
|
const n = new FormData();
|
|
1684
1767
|
n.append("file", t);
|
|
1685
|
-
const
|
|
1768
|
+
const i = await fetch(m, {
|
|
1686
1769
|
method: "POST",
|
|
1687
1770
|
body: n,
|
|
1688
1771
|
credentials: "same-origin",
|
|
1689
1772
|
signal: r
|
|
1690
1773
|
});
|
|
1691
|
-
if (!
|
|
1692
|
-
const
|
|
1693
|
-
if (!
|
|
1694
|
-
return
|
|
1774
|
+
if (!i.ok) throw new Error(`Image upload failed (${i.status}).`);
|
|
1775
|
+
const u = dn(await i.json());
|
|
1776
|
+
if (!u) throw new Error("Image upload response contained no URL.");
|
|
1777
|
+
return u;
|
|
1695
1778
|
},
|
|
1696
|
-
[
|
|
1697
|
-
),
|
|
1779
|
+
[m]
|
|
1780
|
+
), pe = $(null), xe = $(null), [be, Ge] = T(!1), [vt, We] = T(!1), [kt, Ae] = T(""), Ce = C(() => {
|
|
1698
1781
|
const t = xe.current;
|
|
1699
1782
|
t != null && t.parentNode && t.parentNode.removeChild(t), xe.current = null;
|
|
1700
|
-
}, []),
|
|
1701
|
-
var
|
|
1702
|
-
const r = (
|
|
1783
|
+
}, []), Ue = C((t) => {
|
|
1784
|
+
var i;
|
|
1785
|
+
const r = (i = x.current) == null ? void 0 : i.querySelector(
|
|
1703
1786
|
".redactor-in"
|
|
1704
1787
|
);
|
|
1705
1788
|
if (!r) return;
|
|
1706
1789
|
let n = xe.current;
|
|
1707
1790
|
if (!n || !r.contains(n)) {
|
|
1708
1791
|
n = document.createElement("span"), n.setAttribute("data-rte-interim", ""), n.setAttribute("contenteditable", "false");
|
|
1709
|
-
const
|
|
1710
|
-
if (
|
|
1711
|
-
const
|
|
1712
|
-
|
|
1792
|
+
const u = window.getSelection();
|
|
1793
|
+
if (u && u.rangeCount > 0 && r.contains(u.anchorNode)) {
|
|
1794
|
+
const h = u.getRangeAt(0);
|
|
1795
|
+
h.collapse(!1), h.insertNode(n);
|
|
1713
1796
|
} else
|
|
1714
1797
|
r.appendChild(n);
|
|
1715
1798
|
xe.current = n;
|
|
1716
1799
|
}
|
|
1717
1800
|
n.textContent = t;
|
|
1718
|
-
}, []),
|
|
1801
|
+
}, []), Xe = C(() => {
|
|
1719
1802
|
var t;
|
|
1720
|
-
(t =
|
|
1803
|
+
(t = pe.current) == null || t.abort();
|
|
1721
1804
|
}, []), Qe = C(() => {
|
|
1722
|
-
if (!
|
|
1805
|
+
if (!A) return;
|
|
1723
1806
|
const t = new AbortController();
|
|
1724
|
-
|
|
1807
|
+
pe.current = t, We(!1), Ge(!0), Ae(H("editor.ai.listening")), Ce(), A({
|
|
1725
1808
|
signal: t.signal,
|
|
1726
1809
|
// Interim text shows live in the editor (grey + caret); each final
|
|
1727
1810
|
// replaces it with committed text at the caret.
|
|
1728
1811
|
onPartialTranscript: (r) => {
|
|
1729
|
-
t.signal.aborted ||
|
|
1812
|
+
t.signal.aborted || Ue(r);
|
|
1730
1813
|
},
|
|
1731
1814
|
onFinalTranscript: (r) => {
|
|
1732
1815
|
if (t.signal.aborted) return;
|
|
1733
1816
|
Ce();
|
|
1734
1817
|
const n = r.trim();
|
|
1735
|
-
n && (
|
|
1818
|
+
n && (ie(`${n} `, { asHtml: !1 }), Ae(n));
|
|
1736
1819
|
}
|
|
1737
1820
|
}).catch((r) => {
|
|
1738
1821
|
t.signal.aborted || r && typeof r == "object" && "name" in r && r.name === "AbortError" || We(!0);
|
|
1739
1822
|
}).finally(() => {
|
|
1740
|
-
Ce(),
|
|
1823
|
+
Ce(), pe.current === t && (pe.current = null, Ge(!1), Ae(""));
|
|
1741
1824
|
});
|
|
1742
|
-
}, [
|
|
1743
|
-
|
|
1744
|
-
}, [
|
|
1745
|
-
|
|
1825
|
+
}, [A, ie, Ce, Ue, H]), wt = C(() => {
|
|
1826
|
+
be ? Xe() : Qe();
|
|
1827
|
+
}, [be, Qe, Xe]);
|
|
1828
|
+
Q(() => () => {
|
|
1746
1829
|
var t;
|
|
1747
|
-
return (t =
|
|
1830
|
+
return (t = pe.current) == null ? void 0 : t.abort();
|
|
1748
1831
|
}, []);
|
|
1749
|
-
const [
|
|
1832
|
+
const [te, He] = T(null), se = $(null), Ze = C(
|
|
1750
1833
|
(t, r) => {
|
|
1751
|
-
if (
|
|
1834
|
+
if (se.current) return;
|
|
1752
1835
|
const n = new AbortController();
|
|
1753
|
-
|
|
1754
|
-
const
|
|
1755
|
-
Promise.resolve(r({ html:
|
|
1836
|
+
se.current = n, He(t);
|
|
1837
|
+
const i = ae();
|
|
1838
|
+
Promise.resolve(r({ html: i, signal: n.signal })).then((u) => {
|
|
1756
1839
|
var N;
|
|
1757
1840
|
if (n.signal.aborted) return;
|
|
1758
|
-
const
|
|
1759
|
-
U("source.setCode",
|
|
1841
|
+
const h = re(String(u ?? ""));
|
|
1842
|
+
U("source.setCode", h), (N = V.current) == null || N.call(V, { html: h, markdown: "" });
|
|
1760
1843
|
}).catch(() => {
|
|
1761
1844
|
}).finally(() => {
|
|
1762
|
-
|
|
1845
|
+
se.current === n && (se.current = null, He(null));
|
|
1763
1846
|
});
|
|
1764
1847
|
},
|
|
1765
|
-
[
|
|
1766
|
-
)
|
|
1767
|
-
|
|
1848
|
+
[ae, U]
|
|
1849
|
+
), Ye = C(() => {
|
|
1850
|
+
var t;
|
|
1851
|
+
(t = se.current) == null || t.abort(), se.current = null, He(null);
|
|
1852
|
+
}, []);
|
|
1853
|
+
Q(() => () => {
|
|
1768
1854
|
var t;
|
|
1769
|
-
return (t =
|
|
1770
|
-
}, []),
|
|
1771
|
-
const t =
|
|
1855
|
+
return (t = se.current) == null ? void 0 : t.abort();
|
|
1856
|
+
}, []), Q(() => {
|
|
1857
|
+
const t = G.current;
|
|
1772
1858
|
if (!t) return;
|
|
1773
|
-
t.value =
|
|
1774
|
-
const r =
|
|
1859
|
+
t.value = mt.current;
|
|
1860
|
+
const r = cn(I);
|
|
1775
1861
|
if (!r) {
|
|
1776
|
-
|
|
1862
|
+
W(!0);
|
|
1777
1863
|
return;
|
|
1778
1864
|
}
|
|
1779
|
-
|
|
1865
|
+
K.current = r;
|
|
1780
1866
|
const n = {
|
|
1781
|
-
lang: O ??
|
|
1867
|
+
lang: O ?? hn(J.language || "en"),
|
|
1782
1868
|
// The kit renders its OWN toolbar (EditorToolbar) and drives Redactor
|
|
1783
1869
|
// via the command API, so Redactor's native toolbar is suppressed.
|
|
1784
1870
|
toolbar: !1,
|
|
1785
1871
|
plugins: w ?? [],
|
|
1786
|
-
placeholder:
|
|
1872
|
+
placeholder: g ?? H("editor.placeholder"),
|
|
1787
1873
|
toolbarFixed: !1,
|
|
1788
1874
|
// Platform parity (RedactorWysiwyg.js:84): no inline shortcode expansion.
|
|
1789
1875
|
shortcodes: !1,
|
|
1790
1876
|
imageEditable: !1,
|
|
1791
1877
|
imageResizable: !0
|
|
1792
|
-
},
|
|
1878
|
+
}, i = m ? { imageUpload: m } : {}, u = (S == null ? void 0 : S.callbacks) ?? {}, h = {
|
|
1793
1879
|
...n,
|
|
1794
|
-
...
|
|
1880
|
+
...i,
|
|
1795
1881
|
...S ?? {},
|
|
1796
1882
|
// Re-pin safety-critical keys LAST so consumer `options` can't override
|
|
1797
1883
|
// the sanitising change handler, re-enable image editing, or turn off
|
|
@@ -1799,159 +1885,161 @@ const hn = De(
|
|
|
1799
1885
|
imageEditable: !1,
|
|
1800
1886
|
imageResizable: !0,
|
|
1801
1887
|
callbacks: {
|
|
1802
|
-
...
|
|
1888
|
+
...u,
|
|
1803
1889
|
changed(N) {
|
|
1804
|
-
const
|
|
1805
|
-
|
|
1806
|
-
var
|
|
1807
|
-
(
|
|
1890
|
+
const X = Oe(ln(N)), Ne = re(X);
|
|
1891
|
+
he.current = !0, V.current && (ge.current && clearTimeout(ge.current), ge.current = setTimeout(() => {
|
|
1892
|
+
var ye;
|
|
1893
|
+
(ye = V.current) == null || ye.call(V, { html: Ne, markdown: "" });
|
|
1808
1894
|
}, 100));
|
|
1809
1895
|
},
|
|
1810
1896
|
keydown(N) {
|
|
1811
|
-
var
|
|
1812
|
-
(
|
|
1897
|
+
var X;
|
|
1898
|
+
(X = ke.current) == null || X.call(ke, N);
|
|
1813
1899
|
},
|
|
1814
1900
|
observe() {
|
|
1815
|
-
|
|
1901
|
+
ne();
|
|
1816
1902
|
}
|
|
1817
1903
|
}
|
|
1818
1904
|
};
|
|
1819
1905
|
try {
|
|
1820
|
-
if (r(R,
|
|
1906
|
+
if (r(R, h), p)
|
|
1821
1907
|
try {
|
|
1822
1908
|
r(R, "enableReadOnly");
|
|
1823
1909
|
} catch {
|
|
1824
1910
|
}
|
|
1825
1911
|
} catch {
|
|
1826
|
-
|
|
1912
|
+
W(!0);
|
|
1827
1913
|
}
|
|
1828
1914
|
return () => {
|
|
1829
|
-
|
|
1915
|
+
ge.current && clearTimeout(ge.current);
|
|
1830
1916
|
try {
|
|
1831
1917
|
r(R, "destroy");
|
|
1832
1918
|
} catch {
|
|
1833
1919
|
}
|
|
1834
|
-
|
|
1920
|
+
K.current = null;
|
|
1835
1921
|
};
|
|
1836
|
-
}, []),
|
|
1837
|
-
if (!
|
|
1838
|
-
if (
|
|
1839
|
-
|
|
1922
|
+
}, []), Q(() => {
|
|
1923
|
+
if (!K.current || c === void 0) return;
|
|
1924
|
+
if (he.current) {
|
|
1925
|
+
he.current = !1;
|
|
1840
1926
|
return;
|
|
1841
1927
|
}
|
|
1842
|
-
const t =
|
|
1843
|
-
|
|
1844
|
-
}, [c,
|
|
1845
|
-
|
|
1846
|
-
const t =
|
|
1928
|
+
const t = re(Oe(c));
|
|
1929
|
+
Oe(ae()) !== t && U("source.setCode", t);
|
|
1930
|
+
}, [c, ae, U]), Q(() => {
|
|
1931
|
+
fe.current = p;
|
|
1932
|
+
const t = K.current;
|
|
1847
1933
|
if (t)
|
|
1848
1934
|
try {
|
|
1849
|
-
t(R,
|
|
1935
|
+
t(R, p ? "enableReadOnly" : "disableReadOnly");
|
|
1850
1936
|
} catch {
|
|
1851
1937
|
}
|
|
1852
|
-
}, [
|
|
1938
|
+
}, [p, R]), Q(() => {
|
|
1853
1939
|
if (!F || c === void 0) return;
|
|
1854
|
-
const t =
|
|
1940
|
+
const t = G.current;
|
|
1855
1941
|
if (!t) return;
|
|
1856
|
-
const r =
|
|
1942
|
+
const r = re(c);
|
|
1857
1943
|
t.value !== r && document.activeElement !== t && (t.value = r);
|
|
1858
1944
|
}, [F, c]);
|
|
1859
|
-
const
|
|
1945
|
+
const Ie = Je(
|
|
1860
1946
|
() => ({
|
|
1861
1947
|
getHTML() {
|
|
1862
|
-
return
|
|
1948
|
+
return ae();
|
|
1863
1949
|
},
|
|
1864
1950
|
getText() {
|
|
1865
|
-
return
|
|
1951
|
+
return ae().replace(/<[^>]*>/g, " ").replace(/ /gi, " ").replace(/\s+/g, " ").trim();
|
|
1866
1952
|
},
|
|
1867
1953
|
getMarkdown() {
|
|
1868
1954
|
return "";
|
|
1869
1955
|
},
|
|
1870
1956
|
setContent(t) {
|
|
1871
|
-
const r =
|
|
1872
|
-
U("source.setCode", r) ||
|
|
1957
|
+
const r = re(t);
|
|
1958
|
+
U("source.setCode", r) || G.current && (G.current.value = r);
|
|
1873
1959
|
},
|
|
1874
|
-
insertAtCursor:
|
|
1960
|
+
insertAtCursor: ie,
|
|
1875
1961
|
applyFormat(t) {
|
|
1876
|
-
const r =
|
|
1877
|
-
r &&
|
|
1962
|
+
const r = un[t];
|
|
1963
|
+
r && ce(...r);
|
|
1878
1964
|
},
|
|
1879
1965
|
focus() {
|
|
1880
1966
|
var r;
|
|
1881
|
-
const t =
|
|
1967
|
+
const t = K.current;
|
|
1882
1968
|
if (t)
|
|
1883
1969
|
try {
|
|
1884
1970
|
t(R, "editor.focus");
|
|
1885
1971
|
return;
|
|
1886
1972
|
} catch {
|
|
1887
1973
|
}
|
|
1888
|
-
(r =
|
|
1974
|
+
(r = G.current) == null || r.focus();
|
|
1889
1975
|
},
|
|
1890
1976
|
clear() {
|
|
1891
|
-
U("source.setCode", "") ||
|
|
1977
|
+
U("source.setCode", "") || G.current && (G.current.value = "");
|
|
1892
1978
|
}
|
|
1893
1979
|
}),
|
|
1894
|
-
[R,
|
|
1980
|
+
[R, ae, U, ie, ce]
|
|
1895
1981
|
);
|
|
1896
|
-
zt(D, () =>
|
|
1897
|
-
const
|
|
1982
|
+
zt(D, () => Ie, [Ie]), Rt(Pr, Ie, o);
|
|
1983
|
+
const xt = C(
|
|
1898
1984
|
(t) => {
|
|
1899
1985
|
var r;
|
|
1900
1986
|
(r = V.current) == null || r.call(V, {
|
|
1901
|
-
html:
|
|
1987
|
+
html: re(t.target.value),
|
|
1902
1988
|
markdown: ""
|
|
1903
1989
|
});
|
|
1904
1990
|
},
|
|
1905
1991
|
[]
|
|
1906
|
-
),
|
|
1907
|
-
return
|
|
1992
|
+
), Ct = s ?? H("editor.regionLabel"), Nt = g ?? H("editor.placeholder"), Le = te !== null, ue = [];
|
|
1993
|
+
return A && ue.push({
|
|
1908
1994
|
key: "dictate",
|
|
1909
|
-
icon:
|
|
1910
|
-
label:
|
|
1911
|
-
onClick:
|
|
1912
|
-
recording:
|
|
1913
|
-
}), Y &&
|
|
1995
|
+
icon: be ? /* @__PURE__ */ e(Me, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : /* @__PURE__ */ e(it, { "aria-hidden": "true", className: "ds:size-5" }),
|
|
1996
|
+
label: H(be ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
|
|
1997
|
+
onClick: wt,
|
|
1998
|
+
recording: be
|
|
1999
|
+
}), Y && ue.push({
|
|
1914
2000
|
key: "proofread",
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
2001
|
+
// While running, the segment becomes a STOP/cancel button (progress is
|
|
2002
|
+
// shown by the scrim spinner).
|
|
2003
|
+
icon: te === "proofread" ? /* @__PURE__ */ e(Me, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : /* @__PURE__ */ e(Sr, { "aria-hidden": "true", className: "ds:size-5" }),
|
|
2004
|
+
label: te === "proofread" ? H("common.cancel") : H("editor.ai.proofread", "Check spelling & grammar"),
|
|
2005
|
+
onClick: te === "proofread" ? Ye : () => Ze("proofread", Y),
|
|
2006
|
+
running: te === "proofread"
|
|
2007
|
+
}), L && ue.push({
|
|
1920
2008
|
key: "format",
|
|
1921
|
-
icon:
|
|
1922
|
-
label:
|
|
1923
|
-
onClick: () =>
|
|
1924
|
-
running:
|
|
1925
|
-
}), k &&
|
|
2009
|
+
icon: te === "format" ? /* @__PURE__ */ e(Me, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : /* @__PURE__ */ e(Dr, { "aria-hidden": "true", className: "ds:size-5" }),
|
|
2010
|
+
label: te === "format" ? H("common.cancel") : H("editor.ai.autoFormat", "Auto-format document"),
|
|
2011
|
+
onClick: te === "format" ? Ye : () => Ze("format", L),
|
|
2012
|
+
running: te === "format"
|
|
2013
|
+
}), k && ue.push({
|
|
1926
2014
|
key: "write",
|
|
1927
|
-
icon: /* @__PURE__ */ e(
|
|
1928
|
-
label:
|
|
2015
|
+
icon: /* @__PURE__ */ e(Bt, { "aria-hidden": "true", className: "ds:size-5" }),
|
|
2016
|
+
label: H("editor.ai.helpMeWrite"),
|
|
1929
2017
|
onClick: () => {
|
|
1930
|
-
|
|
2018
|
+
Fe(), Pe(!0);
|
|
1931
2019
|
}
|
|
1932
2020
|
}), /* @__PURE__ */ y(
|
|
1933
2021
|
"div",
|
|
1934
2022
|
{
|
|
1935
2023
|
ref: x,
|
|
1936
|
-
className: [
|
|
2024
|
+
className: [fn(), z].filter(Boolean).join(" "),
|
|
1937
2025
|
"data-component": "rich-text-editor",
|
|
1938
2026
|
"data-component-id": o,
|
|
1939
|
-
"data-min-height":
|
|
2027
|
+
"data-min-height": b,
|
|
1940
2028
|
children: [
|
|
1941
|
-
!F && !
|
|
1942
|
-
|
|
2029
|
+
!F && !p ? /* @__PURE__ */ e(
|
|
2030
|
+
sn,
|
|
1943
2031
|
{
|
|
1944
|
-
run:
|
|
1945
|
-
active:
|
|
1946
|
-
preset:
|
|
1947
|
-
insertHtml:
|
|
1948
|
-
insertTable:
|
|
1949
|
-
saveSelection:
|
|
1950
|
-
restoreSelection:
|
|
1951
|
-
getSelectedText:
|
|
1952
|
-
uploadImage:
|
|
2032
|
+
run: ce,
|
|
2033
|
+
active: Be,
|
|
2034
|
+
preset: d,
|
|
2035
|
+
insertHtml: Ee,
|
|
2036
|
+
insertTable: bt,
|
|
2037
|
+
saveSelection: Fe,
|
|
2038
|
+
restoreSelection: Ve,
|
|
2039
|
+
getSelectedText: ht,
|
|
2040
|
+
uploadImage: m ? yt : void 0,
|
|
1953
2041
|
enableColor: (w == null ? void 0 : w.includes("fontcolor")) ?? !1,
|
|
1954
|
-
enableImage: !!
|
|
2042
|
+
enableImage: !!m,
|
|
1955
2043
|
enableTable: (w == null ? void 0 : w.includes("table")) ?? !1,
|
|
1956
2044
|
showExtensions: v
|
|
1957
2045
|
}
|
|
@@ -1960,26 +2048,27 @@ const hn = De(
|
|
|
1960
2048
|
/* @__PURE__ */ e(
|
|
1961
2049
|
"textarea",
|
|
1962
2050
|
{
|
|
1963
|
-
ref:
|
|
1964
|
-
id:
|
|
1965
|
-
"aria-label":
|
|
2051
|
+
ref: G,
|
|
2052
|
+
id: me,
|
|
2053
|
+
"aria-label": Ct,
|
|
1966
2054
|
"aria-multiline": "true",
|
|
1967
|
-
"aria-busy":
|
|
1968
|
-
placeholder:
|
|
1969
|
-
onChange: F ?
|
|
1970
|
-
readOnly: F ?
|
|
1971
|
-
className: F ?
|
|
2055
|
+
"aria-busy": Le || void 0,
|
|
2056
|
+
placeholder: Nt,
|
|
2057
|
+
onChange: F ? xt : void 0,
|
|
2058
|
+
readOnly: F ? p : void 0,
|
|
2059
|
+
className: F ? gn() : void 0
|
|
1972
2060
|
}
|
|
1973
2061
|
),
|
|
1974
|
-
|
|
2062
|
+
Le ? /* @__PURE__ */ e(
|
|
1975
2063
|
"div",
|
|
1976
2064
|
{
|
|
1977
2065
|
"aria-hidden": "true",
|
|
1978
|
-
className: "ds:absolute ds:inset-0 ds:z-[5] ds:cursor-wait ds:rounded-[var(--radius-md)] ds:bg-[color-mix(in_srgb,var(--background)_40%,transparent)]"
|
|
2066
|
+
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(at, { size: "lg", variant: "prism" })
|
|
1979
2068
|
}
|
|
1980
2069
|
) : null,
|
|
1981
2070
|
/* @__PURE__ */ y("div", { className: "ds:sticky ds:bottom-0 ds:z-10", children: [
|
|
1982
|
-
|
|
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(ot, { children: [
|
|
1983
2072
|
r > 0 ? /* @__PURE__ */ e(
|
|
1984
2073
|
"span",
|
|
1985
2074
|
{
|
|
@@ -1994,49 +2083,49 @@ const hn = De(
|
|
|
1994
2083
|
onClick: t.onClick,
|
|
1995
2084
|
"aria-pressed": t.recording || void 0,
|
|
1996
2085
|
"aria-busy": t.running || void 0,
|
|
1997
|
-
disabled:
|
|
2086
|
+
disabled: Le && !t.running || void 0,
|
|
1998
2087
|
"aria-label": t.label,
|
|
1999
2088
|
title: t.label,
|
|
2000
|
-
className: t.recording ?
|
|
2089
|
+
className: t.recording ? bn : pn,
|
|
2001
2090
|
children: t.icon
|
|
2002
2091
|
}
|
|
2003
2092
|
)
|
|
2004
2093
|
] }, t.key)) }) : null,
|
|
2005
2094
|
k ? /* @__PURE__ */ e(
|
|
2006
|
-
|
|
2095
|
+
Kr,
|
|
2007
2096
|
{
|
|
2008
|
-
open:
|
|
2009
|
-
onClose: () =>
|
|
2097
|
+
open: ct,
|
|
2098
|
+
onClose: () => Pe(!1),
|
|
2010
2099
|
onRequestAiDraft: k,
|
|
2011
2100
|
onInsert: (t) => {
|
|
2012
|
-
|
|
2101
|
+
Ve(), ie(t, { asHtml: E !== "text" });
|
|
2013
2102
|
},
|
|
2014
|
-
previewAsHtml:
|
|
2015
|
-
privacyNotice:
|
|
2016
|
-
onDictate:
|
|
2103
|
+
previewAsHtml: E !== "text",
|
|
2104
|
+
privacyNotice: _,
|
|
2105
|
+
onDictate: A
|
|
2017
2106
|
}
|
|
2018
2107
|
) : null
|
|
2019
2108
|
] }),
|
|
2020
|
-
!F && !
|
|
2021
|
-
|
|
2109
|
+
!F && !p && ((w == null ? void 0 : w.includes("table")) ?? !1) ? /* @__PURE__ */ e(
|
|
2110
|
+
an,
|
|
2022
2111
|
{
|
|
2023
|
-
active:
|
|
2024
|
-
run:
|
|
2112
|
+
active: Be,
|
|
2113
|
+
run: ce,
|
|
2025
2114
|
areaRef: q,
|
|
2026
|
-
getActiveTableEl:
|
|
2115
|
+
getActiveTableEl: ft,
|
|
2027
2116
|
enableColor: (w == null ? void 0 : w.includes("fontcolor")) ?? !1,
|
|
2028
|
-
saveTableCell:
|
|
2029
|
-
applyTableBackground:
|
|
2117
|
+
saveTableCell: gt,
|
|
2118
|
+
applyTableBackground: pt
|
|
2030
2119
|
}
|
|
2031
2120
|
) : null
|
|
2032
2121
|
] }),
|
|
2033
|
-
|
|
2034
|
-
|
|
2122
|
+
A ? /* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: kt }) : null,
|
|
2123
|
+
A && vt ? /* @__PURE__ */ e(
|
|
2035
2124
|
"p",
|
|
2036
2125
|
{
|
|
2037
2126
|
role: "alert",
|
|
2038
2127
|
className: "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--destructive)]",
|
|
2039
|
-
children:
|
|
2128
|
+
children: H("editor.ai.dictationError")
|
|
2040
2129
|
}
|
|
2041
2130
|
) : null
|
|
2042
2131
|
]
|
|
@@ -2044,10 +2133,10 @@ const hn = De(
|
|
|
2044
2133
|
);
|
|
2045
2134
|
}
|
|
2046
2135
|
);
|
|
2047
|
-
|
|
2136
|
+
yn.displayName = "RichTextEditor";
|
|
2048
2137
|
export {
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2138
|
+
yn as R,
|
|
2139
|
+
Pr as r,
|
|
2140
|
+
fn as w
|
|
2052
2141
|
};
|
|
2053
|
-
//# sourceMappingURL=rich-text-editor-
|
|
2142
|
+
//# sourceMappingURL=rich-text-editor-BsV7zUdg.js.map
|