@alfadocs/ui-kit 1.54.3 → 1.56.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-C11v9ouP.js → accordion-Ch3xp0mX.js} +9 -9
- package/dist/_chunks/{actions-cell-renderer-CjzSqMgn.js → actions-cell-renderer-Dj1ZkvJj.js} +4 -4
- package/dist/_chunks/{address-autocomplete-BBZ0u_U1.js → address-autocomplete-bPR2mNBt.js} +2 -2
- package/dist/_chunks/address-fields-BfjxS05Z.js +298 -0
- package/dist/_chunks/{agenda-card-CakEvwnM.js → agenda-card-DauvvKX6.js} +2 -2
- package/dist/_chunks/{agenda-tray-B8vuZKjH.js → agenda-tray-ZKhDxlfw.js} +24 -24
- package/dist/_chunks/{ai-credits-notice-D9_qP2xc.js → ai-credits-notice-BoNJtOuE.js} +4 -4
- package/dist/_chunks/ai-fab-pill-BOu96kCx.js +30 -0
- package/dist/_chunks/{ai-permission-notice-Cr6o1f0f.js → ai-permission-notice-5vpblPCx.js} +3 -3
- package/dist/_chunks/{ai-prompt-input-DkL8W-nt.js → ai-prompt-input-Beh-O_rJ.js} +4 -4
- package/dist/_chunks/{alia-sidebar-DSUQ2RpK.js → alia-sidebar-DOei4Iyu.js} +12 -12
- package/dist/_chunks/{anamnesis-card-BT1tMt5O.js → anamnesis-card-BSlAhaoG.js} +4 -4
- package/dist/_chunks/{anamnesis-summary-card-Bv0CZ-mk.js → anamnesis-summary-card-2YfIYY2j.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-Brru7JrH.js → anamnesis-summary-rows-CQ-XGr0T.js} +427 -426
- package/dist/_chunks/{antenatal-schedule-timeline-BZzgjfyd.js → antenatal-schedule-timeline-Kf2Yg8uo.js} +4 -4
- package/dist/_chunks/{app-frame-Cos-GSfw.js → app-frame-B-0O9CrU.js} +40 -38
- package/dist/_chunks/{appointment-card-CA2ynsmN.js → appointment-card-Dh3fAcyf.js} +12 -12
- package/dist/_chunks/{appointment-peek-Cbrg36wj.js → appointment-peek-BIZaDeCi.js} +6 -6
- package/dist/_chunks/{appointment-timeline-CssAJLpL.js → appointment-timeline-DmqYEIT9.js} +32 -33
- package/dist/_chunks/{appointment-tray-EQUjllVy.js → appointment-tray-CyI_p3zU.js} +28 -28
- package/dist/_chunks/{appointment-workflow-status-DrWCNLbB.js → appointment-workflow-status-DMjuIK90.js} +2 -2
- package/dist/_chunks/{audio-recorder-BM68r6fe.js → audio-recorder-DWKKjGPt.js} +5 -6
- package/dist/_chunks/{auth-form-parts-Celi-TLV.js → auth-form-parts-CravOf0L.js} +6 -5
- package/dist/_chunks/{autocomplete-BXm1rnT0.js → autocomplete-DosDnGie.js} +3 -3
- package/dist/_chunks/{avatar-DYtwj1-R.js → avatar-WZY3eGE7.js} +10 -10
- package/dist/_chunks/{balance-badge-cell-C5hmahoB.js → balance-badge-cell-DmDcXw0c.js} +5 -5
- package/dist/_chunks/{benefit-card-DB1Kdrmc.js → benefit-card-BWBClvdF.js} +46 -45
- package/dist/_chunks/{bishop-score-BzvVol-u.js → bishop-score-BxA20j9T.js} +5 -5
- package/dist/_chunks/{bmi-calculator-CDmQk0b5.js → bmi-calculator-C0UTxB7R.js} +6 -6
- package/dist/_chunks/{booking-BGY3LUi8.js → booking-WyNGKPE2.js} +1553 -1458
- package/dist/_chunks/{breadcrumb-xgVpPH2H.js → breadcrumb-Boan-5n8.js} +39 -39
- package/dist/_chunks/{button-CYPx2xFq.js → button-Bn16lcFM.js} +10 -7
- package/dist/_chunks/{button-group-CpEycMps.js → button-group-CWlwR-A5.js} +3 -3
- package/dist/_chunks/{calculator-dialog-BRjZMWuE.js → calculator-dialog-pCPWta7h.js} +2 -2
- package/dist/_chunks/{calendar-BwF5nQuW.js → calendar-6-24PQ1u.js} +4 -4
- package/dist/_chunks/{calendar-workspace-BJPhMb2c.js → calendar-workspace-Du2ryaI-.js} +870 -885
- package/dist/_chunks/{card-DPmk26CL.js → card-DMO2nkt4.js} +45 -42
- package/dist/_chunks/{care-plan-card-BqI-_B4T.js → care-plan-card-Ddjh5Doc.js} +5 -5
- package/dist/_chunks/{care-plan-entry-card-CbsZmfQM.js → care-plan-entry-card-0rpR-4Te.js} +5 -5
- package/dist/_chunks/{care-plan-header-BIS4CGcp.js → care-plan-header-DUX_SVvF.js} +3 -3
- package/dist/_chunks/{carousel.agent-DW9iPLdy.js → carousel.agent-D3xthzTf.js} +44 -45
- package/dist/_chunks/chart-HsF1KHbx.js +909 -0
- package/dist/_chunks/{chat-container-CAfyTxat.js → chat-container-baxzy8k8.js} +21 -22
- package/dist/_chunks/{chat-input-Bg99kcl3.js → chat-input-PtrSu1ZC.js} +27 -27
- package/dist/_chunks/{chat-message-D4rvLoIJ.js → chat-message-CmGUcajG.js} +4 -4
- package/dist/_chunks/city-input-BC_nYINn.js +185 -0
- package/dist/_chunks/{clinical-note-card-gmWXEwSu.js → clinical-note-card-14JIoUR0.js} +3 -3
- package/dist/_chunks/{code-block-CRVa-Thh.js → code-block-BQgK70mO.js} +2 -2
- package/dist/_chunks/{collapsible-CTjxzGuF.js → collapsible-DVPM46bq.js} +27 -27
- package/dist/_chunks/{color-picker-Bu0wM8xv.js → color-picker-BRQ4Y9SO.js} +3 -3
- package/dist/_chunks/{combobox-DppVSuUm.js → combobox-U5yfO6o0.js} +262 -218
- package/dist/_chunks/{connection-status-BwTnjnUj.js → connection-status-ncTjUPt6.js} +4 -4
- package/dist/_chunks/{contact-card-CIVCcicP.js → contact-card-CmK05vNb.js} +2 -2
- package/dist/_chunks/{contact-profile-card-B-HzocbB.js → contact-profile-card-Ci8lBQ6a.js} +4 -4
- package/dist/_chunks/{control-room-rail-g4vNSPFi.js → control-room-rail-Tx2jW250.js} +3 -3
- package/dist/_chunks/{copy-field-CiIuVbKe.js → copy-field-CvTIuA_p.js} +3 -3
- package/dist/_chunks/{country-select-r3QC7cVA.js → country-select-DF5Bd_mn.js} +2 -2
- package/dist/_chunks/{cycle-calculator-LjsQd9Gl.js → cycle-calculator-Dgfqr4Q4.js} +7 -7
- package/dist/_chunks/dashboard-grid-DfEY2qci.js +844 -0
- package/dist/_chunks/{data-table-BErtJzaT.js → data-table-D8fuhqO1.js} +244 -240
- package/dist/_chunks/{data-table-tabs-D5nFZKxg.js → data-table-tabs-Xhg5G0gU.js} +4 -4
- package/dist/_chunks/{date-picker-variants-B3AFKDSu.js → date-picker-variants-BnF-sHzq.js} +19 -10
- package/dist/_chunks/{date-picker-BnhBmcH6.js → date-picker-wRAcq2lt.js} +49 -49
- package/dist/_chunks/{date-range-picker-Dg050N1d.js → date-range-picker-CtUOI38x.js} +189 -183
- package/dist/_chunks/{date-time-picker-Ckl6ezCL.js → date-time-picker-CLeLKuv9.js} +5 -5
- package/dist/_chunks/{dependent-selector-CPiolWiw.js → dependent-selector-DgaAQc-c.js} +91 -86
- package/dist/_chunks/{description-list-BKQMUiXv.js → description-list-DkLeHiew.js} +2 -2
- package/dist/_chunks/{dev-bypass-button-Y1s7gPSD.js → dev-bypass-button-BhGn6evf.js} +2 -2
- package/dist/_chunks/{dialog-D52AI4nF.js → dialog-CUzbnKLw.js} +86 -69
- package/dist/_chunks/{document-preview-C_6R_VZK.js → document-preview-uoTekVR7.js} +5 -5
- package/dist/_chunks/{document-scanner-pADVX447.js → document-scanner-CQS9kv84.js} +17 -17
- package/dist/_chunks/{dropdown-menu-B5mgV1kV.js → dropdown-menu-BQSNVp4x.js} +2 -2
- package/dist/_chunks/{due-date-calculator-mDvGKmRV.js → due-date-calculator-CSjklbyw.js} +9 -9
- package/dist/_chunks/{editable-currency-cell-renderer-CfFp_1hI.js → editable-currency-cell-renderer-CmYcMuwi.js} +4 -4
- package/dist/_chunks/{editable-description-CCrAEJMq.js → editable-description-DuJlvltc.js} +3 -3
- package/dist/_chunks/editor-overlay-NMxzcO6J.js +90 -0
- package/dist/_chunks/{email-input-DQixfopu.js → email-input-C7THAwh2.js} +3 -3
- package/dist/_chunks/{empty-state-CgvmPPvW.js → empty-state-gNG3qYCX.js} +2 -2
- package/dist/_chunks/{entity-card-D1Yrh9wf.js → entity-card-fpm-KUKc.js} +26 -27
- package/dist/_chunks/{entity-summary-C3E4JKVr.js → entity-summary-DcB0fIiv.js} +5 -5
- package/dist/_chunks/{error-boundary-Bzjk9Q2l.js → error-boundary-ChowhO6w.js} +2 -2
- package/dist/_chunks/error-page-CpuYbpOB.js +344 -0
- package/dist/_chunks/{error-page-illustration-bFti0VEc.js → error-page-illustration-BdJLuMdV.js} +12 -12
- package/dist/_chunks/error-summary-BhM8FEkl.js +101 -0
- package/dist/_chunks/{face-scheme-Doodi6A6.js → face-scheme-BicuUA2K.js} +8 -8
- package/dist/_chunks/{fetal-weight-DBgEaMoJ.js → fetal-weight-BWaqqjea.js} +5 -5
- package/dist/_chunks/{field-array-DGiIHCdy.js → field-array-BO-kaKFK.js} +3 -3
- package/dist/_chunks/{file-manager-BDNSnr7f.js → file-manager-Cc_uO8r2.js} +54 -54
- package/dist/_chunks/{finished-terminal-BguGAUdg.js → finished-terminal-CPSDrIMB.js} +3 -3
- package/dist/_chunks/{fiscal-code-input-DNA_SbQx.js → fiscal-code-input-DesSQ6Fh.js} +168 -168
- package/dist/_chunks/floating-clearance-nIx9fFLy.js +20 -0
- package/dist/_chunks/forgot-password-form-DEx-M_QR.js +234 -0
- package/dist/_chunks/{form-field-Db0liyI8.js → form-field-Ani72sVY.js} +46 -44
- package/dist/_chunks/format-price-BKle6Xwt.js +52 -0
- package/dist/_chunks/{freemium-paywall-CtUCj-ND.js → freemium-paywall-DIKuhX8b.js} +88 -82
- package/dist/_chunks/{gestational-age-calculator-BVBz_5dm.js → gestational-age-calculator-DqVeJke2.js} +10 -10
- package/dist/_chunks/glass-surface-CPok0jEe.js +20 -0
- package/dist/_chunks/{hcg-doubling-BECrAUu3.js → hcg-doubling-BIYyI2Yo.js} +7 -7
- package/dist/_chunks/{header--a4ZTiM5.js → header-B9552pLh.js} +15 -14
- package/dist/_chunks/{header-settings-kkVm9VP3.js → header-settings-ge_3gYEq.js} +4 -4
- package/dist/_chunks/heatmap-Gf9r7Tn1.js +2865 -0
- package/dist/_chunks/{help-me-write-templates-B4Y8dBv1.js → help-me-write-templates-fV-Apf72.js} +29 -29
- package/dist/_chunks/{hover-card-CcRSI4gy.js → hover-card-BnTueNS2.js} +2 -2
- package/dist/_chunks/{iban-input-CpOUMMR-.js → iban-input-B9L2QDHh.js} +2 -2
- package/dist/_chunks/{icon-button-mKIvw90h.js → icon-button-COX76Jdj.js} +2 -2
- package/dist/_chunks/{icon-button-group-BsQkbCX4.js → icon-button-group-C5hhI-R5.js} +3 -3
- package/dist/_chunks/{icon-picker-JZzs1ol_.js → icon-picker-DWrqmI1c.js} +20 -20
- package/dist/_chunks/{image-cropper-CNBGkG7P.js → image-cropper-D0kkQ4lG.js} +2 -2
- package/dist/_chunks/{info-tip-Czh1izZ6.js → info-tip-B0jmIt6M.js} +2 -2
- package/dist/_chunks/{input-surface-xyERuLU_.js → input-surface-iBmxVBfr.js} +11 -12
- package/dist/_chunks/{insert-result-BuWQl11Z.js → insert-result-C1C2OCc3.js} +2 -2
- package/dist/_chunks/intl-locale-ySteXlDD.js +23 -0
- package/dist/_chunks/{kbd-BLovyx1R.js → kbd-Bx7eQv9f.js} +70 -66
- package/dist/_chunks/{key-value-pair-BkXjt88Z.js → key-value-pair-BNNITp6S.js} +26 -20
- package/dist/_chunks/{kit-extensions-GQHKTLWI.js → kit-extensions-Byfxy6sy.js} +6 -6
- package/dist/_chunks/{link-cell-renderer-D-xv2HMS.js → link-cell-renderer-TeJNvymP.js} +9 -9
- package/dist/_chunks/{locale-picker-BhNIgeXA.js → locale-picker-DfNSdOpy.js} +4 -4
- package/dist/_chunks/login-dev-card-DmZ1B0lB.js +309 -0
- package/dist/_chunks/{logo-CuaqxTGK.js → logo-hIsyVE96.js} +19 -19
- package/dist/_chunks/{map-view-CQmqQJwK.js → map-view-CO2v0hfp.js} +9 -9
- package/dist/_chunks/{marketplace-app-shell-DbEfoNxe.js → marketplace-app-shell-Dcx-JEjg.js} +11 -11
- package/dist/_chunks/{message-card-C1buKlzM.js → message-card-DVo8-dOm.js} +36 -28
- package/dist/_chunks/{message-tray-DyBVqlGj.js → message-tray-BB95DA82.js} +5 -5
- package/dist/_chunks/{money-GypsuFk2.js → money-CeClE1nH.js} +2 -2
- package/dist/_chunks/multi-select-BT23EnSA.js +688 -0
- package/dist/_chunks/{muscle-scheme-DfYQ0Z3v.js → muscle-scheme-BDgIaGeW.js} +2 -2
- package/dist/_chunks/{nav-grid-BPbmzHY0.js → nav-grid-BqCPH8sm.js} +16 -17
- package/dist/_chunks/non-modal-tab-exit-D2Bd93Bq.js +65 -0
- package/dist/_chunks/{notes-panel-DWJY3WV8.js → notes-panel-DceRhthG.js} +54 -53
- package/dist/_chunks/{notification-card-DubeUbVJ.js → notification-card-BGCIL6Mu.js} +56 -48
- package/dist/_chunks/{notification-tray-DJ0gtfu6.js → notification-tray-__sJXnsz.js} +5 -5
- package/dist/_chunks/{number-input-DRDRYZJg.js → number-input-CVwI1ltI.js} +2 -2
- package/dist/_chunks/{operator-hero-BnBPxwOi.js → operator-hero-Dyd2IGbR.js} +4 -4
- package/dist/_chunks/{optical-prescription-DBvebioV.js → optical-prescription-Do6e3wfs.js} +5 -5
- package/dist/_chunks/option-row-Dc7BrbK8.js +37 -0
- package/dist/_chunks/{otp-input-BedEqmIV.js → otp-input-CGMu30_e.js} +2 -2
- package/dist/_chunks/{pagination-CzEkpfti.js → pagination-BR1_GfD_.js} +2 -2
- package/dist/_chunks/{panel-subview-D8HGXaUa.js → panel-subview-BT-Apwgb.js} +3 -3
- package/dist/_chunks/{parse-DeDYl04y.js → parse-jZ-i8Xgj.js} +2 -2
- package/dist/_chunks/{password-input-6Yl6x1IO.js → password-input-BokZ_rnT.js} +162 -140
- package/dist/_chunks/{patient-details-D7QlsGK1.js → patient-details-DsTtjpuX.js} +6 -6
- package/dist/_chunks/{patient-field-row-Dr-ndtG8.js → patient-field-row-BvZ9luz-.js} +212 -211
- package/dist/_chunks/{patient-search-Dm3w0jWw.js → patient-search-D5xlXmd2.js} +5 -5
- package/dist/_chunks/{patient-summary-card-A3WhxFwp.js → patient-summary-card-9nQWTQf6.js} +12 -8
- package/dist/_chunks/{payment-automation-upsell-DNiraNhF.js → payment-automation-upsell-DiHovmUL.js} +5 -5
- package/dist/_chunks/{payment-form-B08gHZIY.js → payment-form-v6zZuV1_.js} +60 -56
- package/dist/_chunks/{payment-request-card-CR7SjsRs.js → payment-request-card-CwDpwXUC.js} +5 -5
- package/dist/_chunks/{pdf-viewer-zv7pkUPA.js → pdf-viewer-C3minW5b.js} +5 -5
- package/dist/_chunks/periodontal-chart-DD5C0M3l.js +1413 -0
- package/dist/_chunks/{periodontal-chart-card-Djr3en8Q.js → periodontal-chart-card-CxdXvsPU.js} +3 -3
- package/dist/_chunks/{periodontal-diagnosis-DmVIqXtC.js → periodontal-diagnosis-D-PJv7KS.js} +3 -3
- package/dist/_chunks/{periodontal-risk-chart-C1Y5f-md.js → periodontal-risk-chart-D3DjIymT.js} +2 -2
- package/dist/_chunks/{phone-input-BzeUr49H.js → phone-input-DxkHMYmu.js} +139 -139
- package/dist/_chunks/{popover-9_v-7fJc.js → popover-BI3oV3eY.js} +2 -2
- package/dist/_chunks/{position-grid-D2D5_Tze.js → position-grid-CBB88EaH.js} +38 -36
- package/dist/_chunks/{postal-code-input-lCk8me6K.js → postal-code-input-CfZOnIkW.js} +2 -2
- package/dist/_chunks/{practice-profile-hero-Bc3AyBiM.js → practice-profile-hero-C8RPACCi.js} +3 -3
- package/dist/_chunks/{practice-results-D3liWOz1.js → practice-results-Dhbo-fc_.js} +9 -9
- package/dist/_chunks/{pregnancy-dating-BEmsMys4.js → pregnancy-dating-Bfu0Cq4H.js} +11 -11
- package/dist/_chunks/{pregnancy-weight-gain-DMVPvM3a.js → pregnancy-weight-gain-CUUrBTBo.js} +6 -6
- package/dist/_chunks/{privacy-lock-KDPKiTpH.js → privacy-lock-WkUgwIj_.js} +4 -4
- package/dist/_chunks/{privacy-mask-H8yYwgIb.js → privacy-mask-ChIjELJC.js} +3 -3
- package/dist/_chunks/{product-hub-panel-M5X3TYzq.js → product-hub-panel-BSSiGGG4.js} +49 -49
- package/dist/_chunks/{progress-TIAsNHQW.js → progress-D_g_Sl2g.js} +3 -5
- package/dist/_chunks/{province-select-DtF2ukoC.js → province-select-Bd20Z9Br.js} +2 -2
- package/dist/_chunks/{public-footer-Bfs81Qzp.js → public-footer-CxpG6J1M.js} +93 -90
- package/dist/_chunks/{public-header.agent-CrXkGtTF.js → public-header.agent-pr2hyiND.js} +3 -3
- package/dist/_chunks/{qr-code-Ofx7ryyu.js → qr-code-DHEma21c.js} +47 -48
- package/dist/_chunks/{radio-group-BT97ty7o.js → radio-group-DicxWJXP.js} +111 -106
- package/dist/_chunks/{radiograph-panel.agent-rS3Tegx6.js → radiograph-panel.agent-DkUokbEa.js} +9 -9
- package/dist/_chunks/registration-form-D7iNqMBF.js +819 -0
- package/dist/_chunks/{reviews-panel-CyxZ0VmZ.js → reviews-panel-CDcK6W3b.js} +6 -6
- package/dist/_chunks/{rich-text-editor-DmnWavgl.js → rich-text-editor-CkFfmA3v.js} +791 -799
- package/dist/_chunks/{scroll-area-BZOvUhwQ.js → scroll-area-ZtFCv9K7.js} +56 -46
- package/dist/_chunks/{search-bar-ORcfuK9A.js → search-bar-DQJS0wJN.js} +209 -199
- package/dist/_chunks/search-input-BAlDd05M.js +246 -0
- package/dist/_chunks/{section-card-XR2bW1Ie.js → section-card-ChJdOlBU.js} +2 -2
- package/dist/_chunks/{select-DHPmASkG.js → select-Ce5RMk93.js} +274 -236
- package/dist/_chunks/{session-countdown-DWUVDDox.js → session-countdown-CBINYw8H.js} +3 -3
- package/dist/_chunks/{sheet-BTgxkDJS.js → sheet-C7SwIxwB.js} +95 -79
- package/dist/_chunks/{sidebar-2GBc0ZUa.js → sidebar-DLsG2AIk.js} +123 -124
- package/dist/_chunks/{sign-document-B_3U-S6g.js → sign-document-B6HlyCGV.js} +22 -22
- package/dist/_chunks/{sign-in-with-alfadocs-button-DFmgQuDo.js → sign-in-with-alfadocs-button-D91_x8DX.js} +4 -4
- package/dist/_chunks/{signature-capture-F6KViBF_.js → signature-capture-Chqh62Pc.js} +19 -20
- package/dist/_chunks/{signature-field-DLDznGnB.js → signature-field-Y01UB5DA.js} +2 -2
- package/dist/_chunks/{signature-request-BdolmJk4.js → signature-request-DhbpB9N9.js} +9 -9
- package/dist/_chunks/{signed-out-frame-dz1rLJ65.js → signed-out-frame-B2GTIeqA.js} +51 -51
- package/dist/_chunks/sliders-horizontal-D-F97cnE.js +22 -0
- package/dist/_chunks/{slot-grid-kCDoV3k4.js → slot-grid-sVZriOiQ.js} +4 -4
- package/dist/_chunks/{social-sign-in-button-BMGNlUWs.js → social-sign-in-button-yUqwhnPZ.js} +2 -2
- package/dist/_chunks/{spinner-a0FTYX9Q.js → spinner-CoflYlEx.js} +2 -2
- package/dist/_chunks/{stat-Ce9ymEKm.js → stat-DmjGfXND.js} +116 -108
- package/dist/_chunks/state-backed-text-input-DECQy5aA.js +12 -0
- package/dist/_chunks/{stepper-accordion-BPNS6J6B.js → stepper-accordion-DDTSOUHc.js} +63 -52
- package/dist/_chunks/{streaming-text-BAPn_sZs.js → streaming-text-BKZmbW1Q.js} +31 -32
- package/dist/_chunks/subDays-DlMw8Xng.js +8 -0
- package/dist/_chunks/{tab-bar-DRKiomgj.js → tab-bar-Bm-rJB7Y.js} +7 -8
- package/dist/_chunks/{tabs-yIY-RySP.js → tabs-I2wf_nC7.js} +3 -3
- package/dist/_chunks/{task-card-C02Km4Gb.js → task-card-BMXMh3uE.js} +9 -9
- package/dist/_chunks/{task-editor-i-juLk76.js → task-editor-ByyRu29Y.js} +157 -159
- package/dist/_chunks/{task-tray-By6DPwbT.js → task-tray-DsBO-AaP.js} +31 -31
- package/dist/_chunks/{tasks-panel-BkN9sROF.js → tasks-panel-CdgZQQgG.js} +130 -131
- package/dist/_chunks/{text-area-CDuItrvL.js → text-area-COMVJ1yE.js} +106 -96
- package/dist/_chunks/text-input-CaG9ApoE.js +333 -0
- package/dist/_chunks/{theme-toggle-BAHz3itd.js → theme-toggle-PpFcFoYK.js} +4 -4
- package/dist/_chunks/time-picker-DVfyAR81.js +871 -0
- package/dist/_chunks/{timeline-CVLjybJ3.js → timeline-DG8wAlAx.js} +3 -3
- package/dist/_chunks/{toast-UMUvXFsA.js → toast-CPqguP7G.js} +2 -2
- package/dist/_chunks/{token-insert-menu-DgtBIbNu.js → token-insert-menu-B-pWFDKX.js} +3 -3
- package/dist/_chunks/{tool-rail-CwXN-sDC.js → tool-rail-Bwyuw_Ot.js} +113 -110
- package/dist/_chunks/{tooth-scheme-BAMhwCZe.js → tooth-scheme-BAO_voUO.js} +97 -97
- package/dist/_chunks/{transcript-panel-jOCW4Ycl.js → transcript-panel-CjsiDB1K.js} +4 -4
- package/dist/_chunks/{treatment-receipt-DF2Slh-x.js → treatment-receipt-BSVOfStA.js} +2 -2
- package/dist/_chunks/{typing-indicator-BmwMQSxw.js → typing-indicator-B1RkE8jD.js} +16 -15
- package/dist/_chunks/{unit-converter-Bvhj9r3m.js → unit-converter-DS4UB_59.js} +5 -5
- package/dist/_chunks/{use-appointment-details-read-B6dBBgDa.js → use-appointment-details-read-JsDM48tf.js} +214 -214
- package/dist/_chunks/use-dom-value-DTxHhQAN.js +16 -0
- package/dist/_chunks/{use-prism-DaspP8w-.js → use-prism-DBOiELx7.js} +9 -9
- package/dist/_chunks/use-registration-submit-eWAECgUC.js +171 -0
- package/dist/_chunks/use-select-on-arrow-Cr4iBuW5.js +26 -0
- package/dist/_chunks/use-state-backed-input-C7ESmxKB.js +59 -0
- package/dist/_chunks/voice-control-panel-Bg1eklL0.js +1009 -0
- package/dist/_chunks/{wallet-pay-button-Dew8Pmgq.js → wallet-pay-button-DFP5FW0D.js} +2 -2
- package/dist/_chunks/{warning-stack-B_v_qMBI.js → warning-stack-ubD0IZCy.js} +25 -25
- package/dist/_chunks/{widget-picker-Ck8HTsil.js → widget-picker-DXYBMTfe.js} +39 -39
- package/dist/_chunks/{workflow-map-PzamnfJK.js → workflow-map-Demlpy39.js} +8 -8
- package/dist/_chunks/{workflow-status-DDnsIrLt.js → workflow-status-BT27_fQp.js} +3 -3
- package/dist/agent-catalog.json +610 -23
- package/dist/agent-i18n/en.json +59 -17
- package/dist/components/_shared/ai-fab-pill.d.ts +18 -0
- package/dist/components/_shared/floating-clearance.d.ts +12 -0
- package/dist/components/_shared/glass-surface.d.ts +22 -0
- package/dist/components/_shared/input-surface.d.ts +1 -1
- package/dist/components/_shared/intl-locale.d.ts +7 -0
- package/dist/components/_shared/non-modal-tab-exit.d.ts +8 -0
- package/dist/components/_shared/option-row.d.ts +30 -0
- package/dist/components/_shared/option.d.ts +2 -0
- package/dist/components/_shared/state-backed-text-input.d.ts +16 -0
- package/dist/components/_shared/use-apex-chart-semantics.d.ts +6 -0
- package/dist/components/_shared/use-dom-value.d.ts +20 -0
- package/dist/components/_shared/use-select-on-arrow.d.ts +20 -0
- package/dist/components/_shared/use-state-backed-input.d.ts +31 -0
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/address-autocomplete/index.js +1 -1
- package/dist/components/address-fields/address-fields.d.ts +4 -0
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-credits-notice/index.js +1 -1
- package/dist/components/ai-permission-notice/ai-permission-notice.d.ts +34 -0
- package/dist/components/ai-permission-notice/index.d.ts +1 -1
- package/dist/components/ai-permission-notice/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/anamnesis-summary-card/index.js +1 -1
- package/dist/components/app-frame/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/benefit-card/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/booking-types.d.ts +10 -5
- package/dist/components/booking/index.js +1 -1
- package/dist/components/booking/payment.d.ts +19 -0
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/button/index.js +2 -2
- package/dist/components/button-group/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/card/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/chart/chart.d.ts +10 -5
- 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/chat-message/index.js +1 -1
- package/dist/components/city-input/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/combobox.d.ts +6 -0
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/connection-status/index.js +1 -1
- package/dist/components/contact-card/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/copy-field/index.js +1 -1
- package/dist/components/country-select/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/dashboard-grid/dashboard-grid-engine.d.ts +22 -0
- package/dist/components/dashboard-grid/dashboard-grid.d.ts +48 -4
- package/dist/components/dashboard-grid/index.js +1 -1
- package/dist/components/data-table/index.js +4 -4
- package/dist/components/data-table-tabs/index.js +1 -1
- package/dist/components/date-picker/date-picker.d.ts +3 -3
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/date-range-picker.d.ts +3 -3
- 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/description-list/index.js +1 -1
- package/dist/components/dev-bypass-button/index.js +1 -1
- package/dist/components/dialog/dialog.d.ts +2 -2
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/document-preview/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 +2 -2
- package/dist/components/editable-description/index.js +1 -1
- package/dist/components/editor-overlay/index.js +1 -1
- package/dist/components/email-input/email-input.d.ts +1 -1
- package/dist/components/email-input/index.js +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/error-boundary/index.js +1 -1
- package/dist/components/error-summary/error-summary.d.ts +50 -0
- package/dist/components/error-summary/index.d.ts +2 -0
- package/dist/components/error-summary/index.js +5 -0
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/field-array/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/finished-terminal/index.js +1 -1
- package/dist/components/fiscal-code-input/index.js +1 -1
- package/dist/components/form-field/form-field.d.ts +9 -0
- package/dist/components/form-field/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/header/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/heatmap/heatmap-context.d.ts +21 -0
- package/dist/components/heatmap/heatmap-format.d.ts +59 -0
- package/dist/components/heatmap/heatmap-grid.d.ts +66 -0
- package/dist/components/heatmap/heatmap-legend.d.ts +36 -0
- package/dist/components/heatmap/heatmap-model.d.ts +152 -0
- package/dist/components/heatmap/heatmap-scale.d.ts +125 -0
- package/dist/components/heatmap/heatmap-table-view.d.ts +35 -0
- package/dist/components/heatmap/heatmap-tooltip.d.ts +40 -0
- package/dist/components/heatmap/heatmap-variants.d.ts +87 -0
- package/dist/components/heatmap/heatmap-window.d.ts +54 -0
- package/dist/components/heatmap/heatmap.agent.d.ts +4 -0
- package/dist/components/heatmap/heatmap.d.ts +186 -0
- package/dist/components/heatmap/index.d.ts +8 -0
- package/dist/components/heatmap/index.js +8 -0
- package/dist/components/hover-card/index.js +1 -1
- package/dist/components/iban-input/index.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/icon-button-group/index.js +1 -1
- package/dist/components/icon-picker/index.js +1 -1
- package/dist/components/image-cropper/index.js +1 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/components/info-tip/index.js +1 -1
- package/dist/components/kbd/index.js +1 -1
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/logo/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/money/index.js +1 -1
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/multi-select/multi-select.d.ts +6 -0
- package/dist/components/muscle-scheme/index.js +1 -1
- package/dist/components/nav-grid/index.js +1 -1
- package/dist/components/notes-panel/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/optical-prescription/index.js +1 -1
- package/dist/components/otp-input/index.js +1 -1
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/panel-subview/index.js +1 -1
- package/dist/components/password-input/index.js +1 -1
- package/dist/components/patient-details/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/index.js +1 -1
- 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/index.d.ts +1 -1
- package/dist/components/periodontal-chart/index.js +1 -1
- package/dist/components/periodontal-chart/periodontal-chart.d.ts +44 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/periodontal-diagnosis/index.js +1 -1
- package/dist/components/periodontal-risk-chart/index.js +1 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/position-grid/index.js +1 -1
- package/dist/components/postal-code-input/index.js +1 -1
- package/dist/components/practice-profile-hero/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/province-select/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/radiograph-panel/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +2 -2
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +5 -20
- package/dist/components/scroll-area/index.js +1 -1
- package/dist/components/scroll-area/scroll-area.d.ts +17 -1
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/search-input/index.js +1 -1
- package/dist/components/section-card/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/select.d.ts +41 -0
- package/dist/components/session-countdown/index.js +1 -1
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sheet/sheet.d.ts +2 -2
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
- package/dist/components/signature-capture/index.js +1 -1
- package/dist/components/signature-field/index.js +1 -1
- package/dist/components/skeleton-scheme/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/social-sign-in-button/index.js +1 -1
- package/dist/components/spinner/index.js +1 -1
- package/dist/components/stat/index.d.ts +1 -1
- package/dist/components/stat/index.js +1 -1
- package/dist/components/stat/stat.d.ts +9 -0
- package/dist/components/stepper-accordion/index.js +1 -1
- package/dist/components/streaming-text/index.js +1 -1
- package/dist/components/tab-bar/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-editor/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/tasks-panel/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/time-picker/time-picker.d.ts +26 -5
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/token-insert-menu/index.js +1 -1
- package/dist/components/tool-rail/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/treatment-receipt/index.js +1 -1
- package/dist/components/typing-indicator/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/voice-control-panel/index.d.ts +5 -0
- package/dist/components/voice-control-panel/index.js +6 -0
- package/dist/components/voice-control-panel/voice-control-panel.agent.d.ts +4 -0
- package/dist/components/voice-control-panel/voice-control-panel.d.ts +179 -0
- package/dist/components/wallet-pay-button/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/widget-picker/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/components/workflow-status/index.js +2 -2
- package/dist/error-pages/400.ar.html +1 -1
- package/dist/error-pages/400.de.html +1 -1
- package/dist/error-pages/400.el.html +1 -1
- package/dist/error-pages/400.en.html +1 -1
- package/dist/error-pages/400.es.html +1 -1
- package/dist/error-pages/400.fr.html +1 -1
- package/dist/error-pages/400.hi.html +1 -1
- package/dist/error-pages/400.html +1 -1
- package/dist/error-pages/400.it.html +1 -1
- package/dist/error-pages/400.ja.html +1 -1
- package/dist/error-pages/400.nl.html +1 -1
- package/dist/error-pages/400.pl.html +1 -1
- package/dist/error-pages/400.pt.html +1 -1
- package/dist/error-pages/400.ro.html +1 -1
- package/dist/error-pages/400.ru.html +1 -1
- package/dist/error-pages/400.sq.html +1 -1
- package/dist/error-pages/400.sv.html +1 -1
- package/dist/error-pages/400.tr.html +1 -1
- package/dist/error-pages/400.zh.html +1 -1
- package/dist/error-pages/410.ar.html +1 -1
- package/dist/error-pages/410.de.html +1 -1
- package/dist/error-pages/410.el.html +1 -1
- package/dist/error-pages/410.en.html +1 -1
- package/dist/error-pages/410.es.html +1 -1
- package/dist/error-pages/410.fr.html +1 -1
- package/dist/error-pages/410.hi.html +1 -1
- package/dist/error-pages/410.html +1 -1
- package/dist/error-pages/410.it.html +1 -1
- package/dist/error-pages/410.ja.html +1 -1
- package/dist/error-pages/410.nl.html +1 -1
- package/dist/error-pages/410.pl.html +1 -1
- package/dist/error-pages/410.pt.html +1 -1
- package/dist/error-pages/410.ro.html +1 -1
- package/dist/error-pages/410.ru.html +1 -1
- package/dist/error-pages/410.sq.html +1 -1
- package/dist/error-pages/410.sv.html +1 -1
- package/dist/error-pages/410.tr.html +1 -1
- package/dist/error-pages/410.zh.html +1 -1
- package/dist/error-pages/419.ar.html +1 -1
- package/dist/error-pages/419.de.html +1 -1
- package/dist/error-pages/419.el.html +1 -1
- package/dist/error-pages/419.en.html +1 -1
- package/dist/error-pages/419.es.html +1 -1
- package/dist/error-pages/419.fr.html +1 -1
- package/dist/error-pages/419.hi.html +1 -1
- package/dist/error-pages/419.html +1 -1
- package/dist/error-pages/419.it.html +1 -1
- package/dist/error-pages/419.ja.html +1 -1
- package/dist/error-pages/419.nl.html +1 -1
- package/dist/error-pages/419.pl.html +1 -1
- package/dist/error-pages/419.pt.html +1 -1
- package/dist/error-pages/419.ro.html +1 -1
- package/dist/error-pages/419.ru.html +1 -1
- package/dist/error-pages/419.sq.html +1 -1
- package/dist/error-pages/419.sv.html +1 -1
- package/dist/error-pages/419.tr.html +1 -1
- package/dist/error-pages/419.zh.html +1 -1
- package/dist/error-pages/429.ar.html +1 -1
- package/dist/error-pages/429.de.html +1 -1
- package/dist/error-pages/429.el.html +1 -1
- package/dist/error-pages/429.en.html +1 -1
- package/dist/error-pages/429.es.html +1 -1
- package/dist/error-pages/429.fr.html +1 -1
- package/dist/error-pages/429.hi.html +1 -1
- package/dist/error-pages/429.html +1 -1
- package/dist/error-pages/429.it.html +1 -1
- package/dist/error-pages/429.ja.html +1 -1
- package/dist/error-pages/429.nl.html +1 -1
- package/dist/error-pages/429.pl.html +1 -1
- package/dist/error-pages/429.pt.html +1 -1
- package/dist/error-pages/429.ro.html +1 -1
- package/dist/error-pages/429.ru.html +1 -1
- package/dist/error-pages/429.sq.html +1 -1
- package/dist/error-pages/429.sv.html +1 -1
- package/dist/error-pages/429.tr.html +1 -1
- package/dist/error-pages/429.zh.html +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/host-compat.css +9 -2
- package/dist/host-legacy.css +97 -0
- package/dist/i18n/locales/ar.d.ts +120 -3
- package/dist/i18n/locales/ar.js +123 -6
- package/dist/i18n/locales/de.d.ts +120 -3
- package/dist/i18n/locales/de.js +123 -6
- package/dist/i18n/locales/el.d.ts +120 -3
- package/dist/i18n/locales/el.js +123 -6
- package/dist/i18n/locales/en.d.ts +120 -3
- package/dist/i18n/locales/en.js +123 -6
- package/dist/i18n/locales/es.d.ts +120 -3
- package/dist/i18n/locales/es.js +123 -6
- package/dist/i18n/locales/fr.d.ts +120 -3
- package/dist/i18n/locales/fr.js +123 -6
- package/dist/i18n/locales/hi.d.ts +120 -3
- package/dist/i18n/locales/hi.js +123 -6
- package/dist/i18n/locales/it.d.ts +120 -3
- package/dist/i18n/locales/it.js +123 -6
- package/dist/i18n/locales/ja.d.ts +120 -3
- package/dist/i18n/locales/ja.js +123 -6
- package/dist/i18n/locales/nl.d.ts +120 -3
- package/dist/i18n/locales/nl.js +123 -6
- package/dist/i18n/locales/pl.d.ts +120 -3
- package/dist/i18n/locales/pl.js +123 -6
- package/dist/i18n/locales/pt.d.ts +120 -3
- package/dist/i18n/locales/pt.js +123 -6
- package/dist/i18n/locales/ro.d.ts +120 -3
- package/dist/i18n/locales/ro.js +123 -6
- package/dist/i18n/locales/ru.d.ts +120 -3
- package/dist/i18n/locales/ru.js +123 -6
- package/dist/i18n/locales/sq.d.ts +120 -3
- package/dist/i18n/locales/sq.js +123 -6
- package/dist/i18n/locales/sv.d.ts +120 -3
- package/dist/i18n/locales/sv.js +123 -6
- package/dist/i18n/locales/tr.d.ts +120 -3
- package/dist/i18n/locales/tr.js +123 -6
- package/dist/i18n/locales/zh.d.ts +120 -3
- package/dist/i18n/locales/zh.js +123 -6
- package/dist/index.js +766 -756
- package/dist/locales/ar.json +123 -6
- package/dist/locales/de.json +123 -6
- package/dist/locales/el.json +123 -6
- package/dist/locales/en.json +123 -6
- package/dist/locales/es.json +123 -6
- package/dist/locales/fr.json +123 -6
- package/dist/locales/hi.json +123 -6
- package/dist/locales/it.json +123 -6
- package/dist/locales/ja.json +123 -6
- package/dist/locales/nl.json +123 -6
- package/dist/locales/pl.json +123 -6
- package/dist/locales/pt.json +123 -6
- package/dist/locales/ro.json +123 -6
- package/dist/locales/ru.json +123 -6
- package/dist/locales/sq.json +123 -6
- package/dist/locales/sv.json +123 -6
- package/dist/locales/tr.json +123 -6
- package/dist/locales/zh.json +123 -6
- package/dist/patterns/_shared/auth-form-parts.d.ts +4 -0
- package/dist/patterns/_shared/use-error-summary.d.ts +34 -0
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/error-page/error-page.d.ts +29 -5
- package/dist/patterns/error-page/index.js +2 -2
- package/dist/patterns/forgot-password-form/forgot-password-form.d.ts +3 -2
- package/dist/patterns/forgot-password-form/index.js +1 -1
- package/dist/patterns/help-me-write-templates/help-me-write-templates.d.ts +2 -2
- package/dist/patterns/help-me-write-templates/index.js +1 -1
- package/dist/patterns/login-form/index.js +1 -1
- package/dist/patterns/login-form/login-form.d.ts +5 -4
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/payment-automation-upsell/index.js +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/registration-form/registration-form.d.ts +3 -2
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/signed-out-frame/index.js +1 -1
- package/dist/tokens.css +22 -14
- package/package.json +19 -2
- package/dist/_chunks/address-fields-BaClzQLM.js +0 -292
- package/dist/_chunks/chart-C134Ibwm.js +0 -705
- package/dist/_chunks/city-input-BL5WsGJ3.js +0 -170
- package/dist/_chunks/dashboard-grid--rkojX6m.js +0 -691
- package/dist/_chunks/editor-overlay-CWV0chPV.js +0 -93
- package/dist/_chunks/error-page-C15GfNEj.js +0 -312
- package/dist/_chunks/forgot-password-form-Duu3pZDU.js +0 -203
- package/dist/_chunks/format-price-DAbh61Lz.js +0 -51
- package/dist/_chunks/intl-locale-CXM-B8EP.js +0 -16
- package/dist/_chunks/login-dev-card-DletSsX3.js +0 -275
- package/dist/_chunks/multi-select-CVb6PJOK.js +0 -638
- package/dist/_chunks/periodontal-chart-5nLsSuRM.js +0 -1305
- package/dist/_chunks/registration-form-Lz9iKrKo.js +0 -759
- package/dist/_chunks/search-input-6SoR2Rf4.js +0 -237
- package/dist/_chunks/subDays-XBMBTVOO.js +0 -8
- package/dist/_chunks/text-input-rzLEKhRU.js +0 -331
- package/dist/_chunks/time-picker-DKKmpFh3.js +0 -425
- package/dist/_chunks/use-registration-submit-DxCWic5_.js +0 -141
|
@@ -1,105 +1,106 @@
|
|
|
1
1
|
import { jsx as t, jsxs as A, Fragment as Ie } from "react/jsx-runtime";
|
|
2
|
-
import { useId as qe, useState as N, useRef as C, useCallback as v, useEffect as
|
|
2
|
+
import { useId as qe, useState as N, useRef as C, useCallback as v, useEffect as S, Fragment as ht, forwardRef as Zo, useMemo as tt, useImperativeHandle as Qo } from "react";
|
|
3
3
|
import { c as Bn } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as re } from "react-i18next";
|
|
5
5
|
import { SafeHtml as Yo, sanitiseHtml as Jo } from "../safe-html/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import { u as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
6
|
+
import { a as ea, c as ta, d as na, b as Xr } from "./ai-fab-pill-BOu96kCx.js";
|
|
7
|
+
import { u as ra } from "./registry-DvAUVLHh.js";
|
|
8
|
+
import { u as oa } from "./use-ai-sparkle-Cf4yVTLB.js";
|
|
9
|
+
import { S as Pn } from "./spinner-CoflYlEx.js";
|
|
10
|
+
import { A as aa } from "./ai-sparkle-D23NT8Z_.js";
|
|
11
|
+
import { B as Ee } from "./button-Bn16lcFM.js";
|
|
12
|
+
import { I as j } from "./icon-button-COX76Jdj.js";
|
|
13
|
+
import { A as ia } from "./ai-permission-notice-5vpblPCx.js";
|
|
14
|
+
import { T as sa } from "./text-area-COMVJ1yE.js";
|
|
15
|
+
import { E as Ln } from "./editor-overlay-NMxzcO6J.js";
|
|
16
|
+
import { X as Lr } from "./x-B5YnXwCz.js";
|
|
17
|
+
import { R as la } from "./rotate-ccw-BBQnIVTr.js";
|
|
18
|
+
import { C as ca } from "./check-DrFSN__t.js";
|
|
18
19
|
import { S as Tt } from "./square-DASBRZ0U.js";
|
|
19
|
-
import { M as
|
|
20
|
-
import { S as
|
|
21
|
-
import { D as X } from "./dropdown-menu-
|
|
20
|
+
import { M as _n } from "./mic-CUklMZGF.js";
|
|
21
|
+
import { S as da } from "./send-C5kDJ-Mz.js";
|
|
22
|
+
import { D as X } from "./dropdown-menu-BQSNVp4x.js";
|
|
22
23
|
import * as Zt from "@radix-ui/react-popover";
|
|
23
|
-
import { V as
|
|
24
|
+
import { V as Ur } from "./variables-menu-DQl8H4Gh.js";
|
|
24
25
|
import { a as Fn } from "./tooltip-Cp-PLePW.js";
|
|
25
|
-
import { P as ne } from "./popover-
|
|
26
|
-
import { D as
|
|
27
|
-
import { C as jn } from "./color-picker-
|
|
28
|
-
import {
|
|
29
|
-
import { C as
|
|
30
|
-
import { F as
|
|
26
|
+
import { P as ne } from "./popover-BI3oV3eY.js";
|
|
27
|
+
import { D as ie } from "./dialog-CUzbnKLw.js";
|
|
28
|
+
import { C as jn } from "./color-picker-BRQ4Y9SO.js";
|
|
29
|
+
import { S as en } from "./state-backed-text-input-DECQy5aA.js";
|
|
30
|
+
import { C as ua } from "./checkbox--ndmyokr.js";
|
|
31
|
+
import { F as ma } from "./file-upload-CxjCs7TX.js";
|
|
31
32
|
import { c as I } from "./createLucideIcon-DhHxpK9K.js";
|
|
32
|
-
import { E as
|
|
33
|
-
import { H as
|
|
34
|
-
import { I as
|
|
35
|
-
import { C as
|
|
36
|
-
import { P as
|
|
37
|
-
import { S as
|
|
38
|
-
import { T as
|
|
39
|
-
import { H as Hn, u as
|
|
40
|
-
import { A as
|
|
33
|
+
import { E as fa } from "./ellipsis-dRo9ouSU.js";
|
|
34
|
+
import { H as ha, U as ga } from "./undo-2-CYNAzclj.js";
|
|
35
|
+
import { I as pa } from "./image-B_5MNK0x.js";
|
|
36
|
+
import { C as Zr } from "./chevron-down-DWE7GSq9.js";
|
|
37
|
+
import { P as ba } from "./plus-DzMQ_c6b.js";
|
|
38
|
+
import { S as va } from "./settings-d25ju_6L.js";
|
|
39
|
+
import { T as ya } from "./trash-2-uumy3fy1.js";
|
|
40
|
+
import { H as Hn, u as wa } from "./hover-card-BnTueNS2.js";
|
|
41
|
+
import { A as ka } from "./ai-credits-notice-BoNJtOuE.js";
|
|
41
42
|
/**
|
|
42
43
|
* @license lucide-react v1.22.0 - ISC
|
|
43
44
|
*
|
|
44
45
|
* This source code is licensed under the ISC license.
|
|
45
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
47
|
*/
|
|
47
|
-
const
|
|
48
|
+
const xa = [
|
|
48
49
|
["path", { d: "M4 20h16", key: "14thso" }],
|
|
49
50
|
["path", { d: "m6 16 6-12 6 12", key: "1b4byz" }],
|
|
50
51
|
["path", { d: "M8 12h8", key: "1wcyev" }]
|
|
51
|
-
],
|
|
52
|
+
], Ca = I("baseline", xa);
|
|
52
53
|
/**
|
|
53
54
|
* @license lucide-react v1.22.0 - ISC
|
|
54
55
|
*
|
|
55
56
|
* This source code is licensed under the ISC license.
|
|
56
57
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
58
|
*/
|
|
58
|
-
const
|
|
59
|
+
const Aa = [
|
|
59
60
|
["rect", { width: "13", height: "7", x: "3", y: "3", rx: "1", key: "11xb64" }],
|
|
60
61
|
["path", { d: "m22 15-3-3 3-3", key: "26chmm" }],
|
|
61
62
|
["rect", { width: "13", height: "7", x: "3", y: "14", rx: "1", key: "k6ky7n" }]
|
|
62
|
-
],
|
|
63
|
+
], Ta = I("between-horizontal-end", Aa);
|
|
63
64
|
/**
|
|
64
65
|
* @license lucide-react v1.22.0 - ISC
|
|
65
66
|
*
|
|
66
67
|
* This source code is licensed under the ISC license.
|
|
67
68
|
* See the LICENSE file in the root directory of this source tree.
|
|
68
69
|
*/
|
|
69
|
-
const
|
|
70
|
+
const Ea = [
|
|
70
71
|
["rect", { width: "13", height: "7", x: "8", y: "3", rx: "1", key: "pkso9a" }],
|
|
71
72
|
["path", { d: "m2 9 3 3-3 3", key: "1agib5" }],
|
|
72
73
|
["rect", { width: "13", height: "7", x: "8", y: "14", rx: "1", key: "1q5fc1" }]
|
|
73
|
-
],
|
|
74
|
+
], Na = I("between-horizontal-start", Ea);
|
|
74
75
|
/**
|
|
75
76
|
* @license lucide-react v1.22.0 - ISC
|
|
76
77
|
*
|
|
77
78
|
* This source code is licensed under the ISC license.
|
|
78
79
|
* See the LICENSE file in the root directory of this source tree.
|
|
79
80
|
*/
|
|
80
|
-
const
|
|
81
|
+
const Ma = [
|
|
81
82
|
["rect", { width: "7", height: "13", x: "3", y: "3", rx: "1", key: "1fdu0f" }],
|
|
82
83
|
["path", { d: "m9 22 3-3 3 3", key: "17z65a" }],
|
|
83
84
|
["rect", { width: "7", height: "13", x: "14", y: "3", rx: "1", key: "1squn4" }]
|
|
84
|
-
],
|
|
85
|
+
], Ra = I("between-vertical-end", Ma);
|
|
85
86
|
/**
|
|
86
87
|
* @license lucide-react v1.22.0 - ISC
|
|
87
88
|
*
|
|
88
89
|
* This source code is licensed under the ISC license.
|
|
89
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
90
91
|
*/
|
|
91
|
-
const
|
|
92
|
+
const za = [
|
|
92
93
|
["rect", { width: "7", height: "13", x: "3", y: "8", rx: "1", key: "1fjrkv" }],
|
|
93
94
|
["path", { d: "m15 2-3 3-3-3", key: "1uh6eb" }],
|
|
94
95
|
["rect", { width: "7", height: "13", x: "14", y: "8", rx: "1", key: "w3fjg8" }]
|
|
95
|
-
],
|
|
96
|
+
], Sa = I("between-vertical-start", za);
|
|
96
97
|
/**
|
|
97
98
|
* @license lucide-react v1.22.0 - ISC
|
|
98
99
|
*
|
|
99
100
|
* This source code is licensed under the ISC license.
|
|
100
101
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
102
|
*/
|
|
102
|
-
const
|
|
103
|
+
const La = [
|
|
103
104
|
[
|
|
104
105
|
"path",
|
|
105
106
|
{
|
|
@@ -108,26 +109,26 @@ const Ri = [
|
|
|
108
109
|
}
|
|
109
110
|
],
|
|
110
111
|
["rect", { x: "14", y: "2", width: "8", height: "8", rx: "1", key: "88lufb" }]
|
|
111
|
-
], In = I("blocks",
|
|
112
|
+
], In = I("blocks", La);
|
|
112
113
|
/**
|
|
113
114
|
* @license lucide-react v1.22.0 - ISC
|
|
114
115
|
*
|
|
115
116
|
* This source code is licensed under the ISC license.
|
|
116
117
|
* See the LICENSE file in the root directory of this source tree.
|
|
117
118
|
*/
|
|
118
|
-
const
|
|
119
|
+
const _a = [
|
|
119
120
|
[
|
|
120
121
|
"path",
|
|
121
122
|
{ 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" }
|
|
122
123
|
]
|
|
123
|
-
],
|
|
124
|
+
], Ha = I("bold", _a);
|
|
124
125
|
/**
|
|
125
126
|
* @license lucide-react v1.22.0 - ISC
|
|
126
127
|
*
|
|
127
128
|
* This source code is licensed under the ISC license.
|
|
128
129
|
* See the LICENSE file in the root directory of this source tree.
|
|
129
130
|
*/
|
|
130
|
-
const
|
|
131
|
+
const Ia = [
|
|
131
132
|
[
|
|
132
133
|
"path",
|
|
133
134
|
{ d: "M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1", key: "ezmyqa" }
|
|
@@ -139,98 +140,98 @@ const Si = [
|
|
|
139
140
|
key: "e1hn23"
|
|
140
141
|
}
|
|
141
142
|
]
|
|
142
|
-
],
|
|
143
|
+
], $a = I("braces", Ia);
|
|
143
144
|
/**
|
|
144
145
|
* @license lucide-react v1.22.0 - ISC
|
|
145
146
|
*
|
|
146
147
|
* This source code is licensed under the ISC license.
|
|
147
148
|
* See the LICENSE file in the root directory of this source tree.
|
|
148
149
|
*/
|
|
149
|
-
const
|
|
150
|
+
const Da = [
|
|
150
151
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
151
152
|
["path", { d: "M12 3v18", key: "108xh3" }]
|
|
152
|
-
],
|
|
153
|
+
], Oa = I("columns-2", Da);
|
|
153
154
|
/**
|
|
154
155
|
* @license lucide-react v1.22.0 - ISC
|
|
155
156
|
*
|
|
156
157
|
* This source code is licensed under the ISC license.
|
|
157
158
|
* See the LICENSE file in the root directory of this source tree.
|
|
158
159
|
*/
|
|
159
|
-
const
|
|
160
|
+
const qa = [
|
|
160
161
|
["path", { d: "M4 12h8", key: "17cfdx" }],
|
|
161
162
|
["path", { d: "M4 18V6", key: "1rz3zl" }],
|
|
162
163
|
["path", { d: "M12 18V6", key: "zqpxq5" }],
|
|
163
164
|
["path", { d: "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1", key: "9jr5yi" }]
|
|
164
|
-
],
|
|
165
|
+
], Ba = I("heading-2", qa);
|
|
165
166
|
/**
|
|
166
167
|
* @license lucide-react v1.22.0 - ISC
|
|
167
168
|
*
|
|
168
169
|
* This source code is licensed under the ISC license.
|
|
169
170
|
* See the LICENSE file in the root directory of this source tree.
|
|
170
171
|
*/
|
|
171
|
-
const
|
|
172
|
+
const Pa = [
|
|
172
173
|
["path", { d: "M4 12h8", key: "17cfdx" }],
|
|
173
174
|
["path", { d: "M4 18V6", key: "1rz3zl" }],
|
|
174
175
|
["path", { d: "M12 18V6", key: "zqpxq5" }],
|
|
175
176
|
["path", { d: "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2", key: "68ncm8" }],
|
|
176
177
|
["path", { d: "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2", key: "1ejuhz" }]
|
|
177
|
-
],
|
|
178
|
+
], Fa = I("heading-3", Pa);
|
|
178
179
|
/**
|
|
179
180
|
* @license lucide-react v1.22.0 - ISC
|
|
180
181
|
*
|
|
181
182
|
* This source code is licensed under the ISC license.
|
|
182
183
|
* See the LICENSE file in the root directory of this source tree.
|
|
183
184
|
*/
|
|
184
|
-
const
|
|
185
|
+
const ja = [
|
|
185
186
|
["line", { x1: "19", x2: "10", y1: "4", y2: "4", key: "15jd3p" }],
|
|
186
187
|
["line", { x1: "14", x2: "5", y1: "20", y2: "20", key: "bu0au3" }],
|
|
187
188
|
["line", { x1: "15", x2: "9", y1: "4", y2: "20", key: "uljnxc" }]
|
|
188
|
-
],
|
|
189
|
+
], Ga = I("italic", ja);
|
|
189
190
|
/**
|
|
190
191
|
* @license lucide-react v1.22.0 - ISC
|
|
191
192
|
*
|
|
192
193
|
* This source code is licensed under the ISC license.
|
|
193
194
|
* See the LICENSE file in the root directory of this source tree.
|
|
194
195
|
*/
|
|
195
|
-
const
|
|
196
|
+
const Ka = [
|
|
196
197
|
["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" }],
|
|
197
198
|
["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" }]
|
|
198
|
-
],
|
|
199
|
+
], Va = I("link", Ka);
|
|
199
200
|
/**
|
|
200
201
|
* @license lucide-react v1.22.0 - ISC
|
|
201
202
|
*
|
|
202
203
|
* This source code is licensed under the ISC license.
|
|
203
204
|
* See the LICENSE file in the root directory of this source tree.
|
|
204
205
|
*/
|
|
205
|
-
const
|
|
206
|
+
const Wa = [
|
|
206
207
|
["path", { d: "M11 5h10", key: "1cz7ny" }],
|
|
207
208
|
["path", { d: "M11 12h10", key: "1438ji" }],
|
|
208
209
|
["path", { d: "M11 19h10", key: "11t30w" }],
|
|
209
210
|
["path", { d: "M4 4h1v5", key: "10yrso" }],
|
|
210
211
|
["path", { d: "M4 9h2", key: "r1h2o0" }],
|
|
211
212
|
["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" }]
|
|
212
|
-
],
|
|
213
|
+
], Xa = I("list-ordered", Wa);
|
|
213
214
|
/**
|
|
214
215
|
* @license lucide-react v1.22.0 - ISC
|
|
215
216
|
*
|
|
216
217
|
* This source code is licensed under the ISC license.
|
|
217
218
|
* See the LICENSE file in the root directory of this source tree.
|
|
218
219
|
*/
|
|
219
|
-
const
|
|
220
|
+
const Ua = [
|
|
220
221
|
["path", { d: "M3 5h.01", key: "18ugdj" }],
|
|
221
222
|
["path", { d: "M3 12h.01", key: "nlz23k" }],
|
|
222
223
|
["path", { d: "M3 19h.01", key: "noohij" }],
|
|
223
224
|
["path", { d: "M8 5h13", key: "1pao27" }],
|
|
224
225
|
["path", { d: "M8 12h13", key: "1za7za" }],
|
|
225
226
|
["path", { d: "M8 19h13", key: "m83p4d" }]
|
|
226
|
-
],
|
|
227
|
+
], Za = I("list", Ua);
|
|
227
228
|
/**
|
|
228
229
|
* @license lucide-react v1.22.0 - ISC
|
|
229
230
|
*
|
|
230
231
|
* This source code is licensed under the ISC license.
|
|
231
232
|
* See the LICENSE file in the root directory of this source tree.
|
|
232
233
|
*/
|
|
233
|
-
const
|
|
234
|
+
const Qa = [
|
|
234
235
|
["path", { d: "M11 7 6 2", key: "1jwth8" }],
|
|
235
236
|
["path", { d: "M18.992 12H2.041", key: "xw1gg" }],
|
|
236
237
|
[
|
|
@@ -247,25 +248,25 @@ const Xi = [
|
|
|
247
248
|
key: "1nk1rd"
|
|
248
249
|
}
|
|
249
250
|
]
|
|
250
|
-
],
|
|
251
|
+
], Ya = I("paint-bucket", Qa);
|
|
251
252
|
/**
|
|
252
253
|
* @license lucide-react v1.22.0 - ISC
|
|
253
254
|
*
|
|
254
255
|
* This source code is licensed under the ISC license.
|
|
255
256
|
* See the LICENSE file in the root directory of this source tree.
|
|
256
257
|
*/
|
|
257
|
-
const
|
|
258
|
+
const Ja = [
|
|
258
259
|
["rect", { width: "16", height: "6", x: "2", y: "2", rx: "2", key: "jcyz7m" }],
|
|
259
260
|
["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" }],
|
|
260
261
|
["rect", { width: "4", height: "6", x: "8", y: "16", rx: "1", key: "d6e7yl" }]
|
|
261
|
-
],
|
|
262
|
+
], ei = I("paint-roller", Ja);
|
|
262
263
|
/**
|
|
263
264
|
* @license lucide-react v1.22.0 - ISC
|
|
264
265
|
*
|
|
265
266
|
* This source code is licensed under the ISC license.
|
|
266
267
|
* See the LICENSE file in the root directory of this source tree.
|
|
267
268
|
*/
|
|
268
|
-
const
|
|
269
|
+
const ti = [
|
|
269
270
|
[
|
|
270
271
|
"path",
|
|
271
272
|
{
|
|
@@ -277,57 +278,57 @@ const Yi = [
|
|
|
277
278
|
["circle", { cx: "17.5", cy: "10.5", r: ".5", fill: "currentColor", key: "f64h9f" }],
|
|
278
279
|
["circle", { cx: "6.5", cy: "12.5", r: ".5", fill: "currentColor", key: "qy21gx" }],
|
|
279
280
|
["circle", { cx: "8.5", cy: "7.5", r: ".5", fill: "currentColor", key: "fotxhn" }]
|
|
280
|
-
],
|
|
281
|
+
], ni = I("palette", ti);
|
|
281
282
|
/**
|
|
282
283
|
* @license lucide-react v1.22.0 - ISC
|
|
283
284
|
*
|
|
284
285
|
* This source code is licensed under the ISC license.
|
|
285
286
|
* See the LICENSE file in the root directory of this source tree.
|
|
286
287
|
*/
|
|
287
|
-
const
|
|
288
|
+
const ri = [
|
|
288
289
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
289
290
|
["path", { d: "M9 3v18", key: "fh3hqa" }]
|
|
290
|
-
],
|
|
291
|
+
], oi = I("panel-left", ri);
|
|
291
292
|
/**
|
|
292
293
|
* @license lucide-react v1.22.0 - ISC
|
|
293
294
|
*
|
|
294
295
|
* This source code is licensed under the ISC license.
|
|
295
296
|
* See the LICENSE file in the root directory of this source tree.
|
|
296
297
|
*/
|
|
297
|
-
const
|
|
298
|
+
const ai = [
|
|
298
299
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
299
300
|
["path", { d: "M15 3v18", key: "14nvp0" }]
|
|
300
|
-
],
|
|
301
|
+
], ii = I("panel-right", ai);
|
|
301
302
|
/**
|
|
302
303
|
* @license lucide-react v1.22.0 - ISC
|
|
303
304
|
*
|
|
304
305
|
* This source code is licensed under the ISC license.
|
|
305
306
|
* See the LICENSE file in the root directory of this source tree.
|
|
306
307
|
*/
|
|
307
|
-
const
|
|
308
|
+
const si = [
|
|
308
309
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
309
310
|
["path", { d: "M14 9h1", key: "l0svgy" }],
|
|
310
311
|
["path", { d: "M19 9h2", key: "te2zfg" }],
|
|
311
312
|
["path", { d: "M3 9h2", key: "1h4ldw" }],
|
|
312
313
|
["path", { d: "M9 9h1", key: "15jzuz" }]
|
|
313
|
-
],
|
|
314
|
+
], li = I("panel-top-dashed", si);
|
|
314
315
|
/**
|
|
315
316
|
* @license lucide-react v1.22.0 - ISC
|
|
316
317
|
*
|
|
317
318
|
* This source code is licensed under the ISC license.
|
|
318
319
|
* See the LICENSE file in the root directory of this source tree.
|
|
319
320
|
*/
|
|
320
|
-
const
|
|
321
|
+
const ci = [
|
|
321
322
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
322
323
|
["path", { d: "M3 9h18", key: "1pudct" }]
|
|
323
|
-
],
|
|
324
|
+
], di = I("panel-top", ci);
|
|
324
325
|
/**
|
|
325
326
|
* @license lucide-react v1.22.0 - ISC
|
|
326
327
|
*
|
|
327
328
|
* This source code is licensed under the ISC license.
|
|
328
329
|
* See the LICENSE file in the root directory of this source tree.
|
|
329
330
|
*/
|
|
330
|
-
const
|
|
331
|
+
const ui = [
|
|
331
332
|
["path", { d: "M10 3H8", key: "mzdi2d" }],
|
|
332
333
|
["path", { d: "m15.007 5.008 3.987 3.986", key: "1scubj" }],
|
|
333
334
|
["path", { d: "M20 15v4", key: "nmhudv" }],
|
|
@@ -342,25 +343,25 @@ const la = [
|
|
|
342
343
|
["path", { d: "M4 5v4", key: "13jjxc" }],
|
|
343
344
|
["path", { d: "M6 7H2", key: "8zbtv0" }],
|
|
344
345
|
["path", { d: "M9 2v2", key: "165o2o" }]
|
|
345
|
-
],
|
|
346
|
+
], _r = I("pencil-sparkles", ui);
|
|
346
347
|
/**
|
|
347
348
|
* @license lucide-react v1.22.0 - ISC
|
|
348
349
|
*
|
|
349
350
|
* This source code is licensed under the ISC license.
|
|
350
351
|
* See the LICENSE file in the root directory of this source tree.
|
|
351
352
|
*/
|
|
352
|
-
const
|
|
353
|
+
const mi = [
|
|
353
354
|
["path", { d: "M13 4v16", key: "8vvj80" }],
|
|
354
355
|
["path", { d: "M17 4v16", key: "7dpous" }],
|
|
355
356
|
["path", { d: "M19 4H9.5a4.5 4.5 0 0 0 0 9H13", key: "sh4n9v" }]
|
|
356
|
-
],
|
|
357
|
+
], fi = I("pilcrow", mi);
|
|
357
358
|
/**
|
|
358
359
|
* @license lucide-react v1.22.0 - ISC
|
|
359
360
|
*
|
|
360
361
|
* This source code is licensed under the ISC license.
|
|
361
362
|
* See the LICENSE file in the root directory of this source tree.
|
|
362
363
|
*/
|
|
363
|
-
const
|
|
364
|
+
const hi = [
|
|
364
365
|
[
|
|
365
366
|
"path",
|
|
366
367
|
{
|
|
@@ -375,122 +376,122 @@ const ua = [
|
|
|
375
376
|
key: "1ymkrd"
|
|
376
377
|
}
|
|
377
378
|
]
|
|
378
|
-
],
|
|
379
|
+
], gi = I("quote", hi);
|
|
379
380
|
/**
|
|
380
381
|
* @license lucide-react v1.22.0 - ISC
|
|
381
382
|
*
|
|
382
383
|
* This source code is licensed under the ISC license.
|
|
383
384
|
* See the LICENSE file in the root directory of this source tree.
|
|
384
385
|
*/
|
|
385
|
-
const
|
|
386
|
+
const pi = [
|
|
386
387
|
["path", { d: "m15 14 5-5-5-5", key: "12vg1m" }],
|
|
387
388
|
["path", { d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13", key: "6uklza" }]
|
|
388
|
-
],
|
|
389
|
+
], bi = I("redo-2", pi);
|
|
389
390
|
/**
|
|
390
391
|
* @license lucide-react v1.22.0 - ISC
|
|
391
392
|
*
|
|
392
393
|
* This source code is licensed under the ISC license.
|
|
393
394
|
* See the LICENSE file in the root directory of this source tree.
|
|
394
395
|
*/
|
|
395
|
-
const
|
|
396
|
+
const vi = [
|
|
396
397
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
397
398
|
["path", { d: "M3 12h18", key: "1i2n21" }]
|
|
398
|
-
],
|
|
399
|
+
], yi = I("rows-2", vi);
|
|
399
400
|
/**
|
|
400
401
|
* @license lucide-react v1.22.0 - ISC
|
|
401
402
|
*
|
|
402
403
|
* This source code is licensed under the ISC license.
|
|
403
404
|
* See the LICENSE file in the root directory of this source tree.
|
|
404
405
|
*/
|
|
405
|
-
const
|
|
406
|
+
const wi = [
|
|
406
407
|
["path", { d: "m6 16 6-12 6 12", key: "1b4byz" }],
|
|
407
408
|
["path", { d: "M8 12h8", key: "1wcyev" }],
|
|
408
409
|
["path", { d: "m16 20 2 2 4-4", key: "13tcca" }]
|
|
409
|
-
], Hr = I("spell-check",
|
|
410
|
+
], Hr = I("spell-check", wi);
|
|
410
411
|
/**
|
|
411
412
|
* @license lucide-react v1.22.0 - ISC
|
|
412
413
|
*
|
|
413
414
|
* This source code is licensed under the ISC license.
|
|
414
415
|
* See the LICENSE file in the root directory of this source tree.
|
|
415
416
|
*/
|
|
416
|
-
const
|
|
417
|
+
const ki = [
|
|
417
418
|
["path", { d: "M16 4H9a3 3 0 0 0-2.83 4", key: "43sutm" }],
|
|
418
419
|
["path", { d: "M14 12a4 4 0 0 1 0 8H6", key: "nlfj13" }],
|
|
419
420
|
["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }]
|
|
420
|
-
],
|
|
421
|
+
], xi = I("strikethrough", ki);
|
|
421
422
|
/**
|
|
422
423
|
* @license lucide-react v1.22.0 - ISC
|
|
423
424
|
*
|
|
424
425
|
* This source code is licensed under the ISC license.
|
|
425
426
|
* See the LICENSE file in the root directory of this source tree.
|
|
426
427
|
*/
|
|
427
|
-
const
|
|
428
|
+
const Ci = [
|
|
428
429
|
["path", { d: "M12 3v18", key: "108xh3" }],
|
|
429
430
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
430
431
|
["path", { d: "M3 9h18", key: "1pudct" }],
|
|
431
432
|
["path", { d: "M3 15h18", key: "5xshup" }]
|
|
432
|
-
],
|
|
433
|
+
], Ai = I("table", Ci);
|
|
433
434
|
/**
|
|
434
435
|
* @license lucide-react v1.22.0 - ISC
|
|
435
436
|
*
|
|
436
437
|
* This source code is licensed under the ISC license.
|
|
437
438
|
* See the LICENSE file in the root directory of this source tree.
|
|
438
439
|
*/
|
|
439
|
-
const
|
|
440
|
+
const Ti = [
|
|
440
441
|
["path", { d: "M21 5H3", key: "1fi0y6" }],
|
|
441
442
|
["path", { d: "M17 12H7", key: "16if0g" }],
|
|
442
443
|
["path", { d: "M19 19H5", key: "vjpgq2" }]
|
|
443
|
-
],
|
|
444
|
+
], Ei = I("text-align-center", Ti);
|
|
444
445
|
/**
|
|
445
446
|
* @license lucide-react v1.22.0 - ISC
|
|
446
447
|
*
|
|
447
448
|
* This source code is licensed under the ISC license.
|
|
448
449
|
* See the LICENSE file in the root directory of this source tree.
|
|
449
450
|
*/
|
|
450
|
-
const
|
|
451
|
+
const Ni = [
|
|
451
452
|
["path", { d: "M21 5H3", key: "1fi0y6" }],
|
|
452
453
|
["path", { d: "M21 12H9", key: "dn1m92" }],
|
|
453
454
|
["path", { d: "M21 19H7", key: "4cu937" }]
|
|
454
|
-
],
|
|
455
|
+
], Mi = I("text-align-end", Ni);
|
|
455
456
|
/**
|
|
456
457
|
* @license lucide-react v1.22.0 - ISC
|
|
457
458
|
*
|
|
458
459
|
* This source code is licensed under the ISC license.
|
|
459
460
|
* See the LICENSE file in the root directory of this source tree.
|
|
460
461
|
*/
|
|
461
|
-
const
|
|
462
|
+
const Ri = [
|
|
462
463
|
["path", { d: "M21 5H3", key: "1fi0y6" }],
|
|
463
464
|
["path", { d: "M15 12H3", key: "6jk70r" }],
|
|
464
465
|
["path", { d: "M17 19H3", key: "z6ezky" }]
|
|
465
|
-
],
|
|
466
|
+
], zi = I("text-align-start", Ri);
|
|
466
467
|
/**
|
|
467
468
|
* @license lucide-react v1.22.0 - ISC
|
|
468
469
|
*
|
|
469
470
|
* This source code is licensed under the ISC license.
|
|
470
471
|
* See the LICENSE file in the root directory of this source tree.
|
|
471
472
|
*/
|
|
472
|
-
const
|
|
473
|
+
const Si = [
|
|
473
474
|
["rect", { width: "18", height: "12", x: "3", y: "8", rx: "1", key: "158fvp" }],
|
|
474
475
|
["path", { d: "M10 8V5c0-.6-.4-1-1-1H6a1 1 0 0 0-1 1v3", key: "s0042v" }],
|
|
475
476
|
["path", { d: "M19 8V5c0-.6-.4-1-1-1h-3a1 1 0 0 0-1 1v3", key: "9wmeh2" }]
|
|
476
|
-
], $n = I("toy-brick",
|
|
477
|
+
], $n = I("toy-brick", Si);
|
|
477
478
|
/**
|
|
478
479
|
* @license lucide-react v1.22.0 - ISC
|
|
479
480
|
*
|
|
480
481
|
* This source code is licensed under the ISC license.
|
|
481
482
|
* See the LICENSE file in the root directory of this source tree.
|
|
482
483
|
*/
|
|
483
|
-
const
|
|
484
|
+
const Li = [
|
|
484
485
|
["path", { d: "M6 4v6a6 6 0 0 0 12 0V4", key: "9kb039" }],
|
|
485
486
|
["line", { x1: "4", x2: "20", y1: "20", y2: "20", key: "nun2al" }]
|
|
486
|
-
],
|
|
487
|
+
], _i = I("underline", Li);
|
|
487
488
|
/**
|
|
488
489
|
* @license lucide-react v1.22.0 - ISC
|
|
489
490
|
*
|
|
490
491
|
* This source code is licensed under the ISC license.
|
|
491
492
|
* See the LICENSE file in the root directory of this source tree.
|
|
492
493
|
*/
|
|
493
|
-
const
|
|
494
|
+
const Hi = [
|
|
494
495
|
[
|
|
495
496
|
"path",
|
|
496
497
|
{
|
|
@@ -505,7 +506,7 @@ const _a = [
|
|
|
505
506
|
["path", { d: "M7 8H3", key: "zfb6yr" }],
|
|
506
507
|
["path", { d: "M21 16h-4", key: "1cnmox" }],
|
|
507
508
|
["path", { d: "M11 3H9", key: "1obp7u" }]
|
|
508
|
-
], Ir = I("wand-sparkles",
|
|
509
|
+
], Ir = I("wand-sparkles", Hi);
|
|
509
510
|
function $r(n) {
|
|
510
511
|
return {
|
|
511
512
|
format: n("editor.vendor.format"),
|
|
@@ -583,7 +584,7 @@ function $r(n) {
|
|
|
583
584
|
"delete-table": n("editor.table.deleteTable")
|
|
584
585
|
};
|
|
585
586
|
}
|
|
586
|
-
const
|
|
587
|
+
const Ii = {
|
|
587
588
|
id: "rich-text-editor",
|
|
588
589
|
capabilities: ["edit_inline"],
|
|
589
590
|
state: {
|
|
@@ -633,8 +634,8 @@ const Sa = {
|
|
|
633
634
|
idempotent: !0,
|
|
634
635
|
descriptionKey: "ui.agent.richTextEditor.actions.setContent",
|
|
635
636
|
description: "Replace the editor content. Loses unsaved input.",
|
|
636
|
-
invoke: (n,
|
|
637
|
-
n.setContent(
|
|
637
|
+
invoke: (n, i) => {
|
|
638
|
+
n.setContent(i.html);
|
|
638
639
|
}
|
|
639
640
|
},
|
|
640
641
|
insert_at_cursor: {
|
|
@@ -663,8 +664,8 @@ const Sa = {
|
|
|
663
664
|
note: "Insert a merge variable as plain text."
|
|
664
665
|
}
|
|
665
666
|
],
|
|
666
|
-
invoke: (n,
|
|
667
|
-
n.insertAtCursor(
|
|
667
|
+
invoke: (n, i) => {
|
|
668
|
+
n.insertAtCursor(i.content, { asHtml: i.asHtml });
|
|
668
669
|
}
|
|
669
670
|
},
|
|
670
671
|
apply_format: {
|
|
@@ -694,8 +695,8 @@ const Sa = {
|
|
|
694
695
|
descriptionKey: "ui.agent.richTextEditor.actions.applyFormat",
|
|
695
696
|
description: "Toggle/apply a block or inline format on the current selection (bold, italic, strikethrough, bulleted/numbered list, heading, quote, paragraph).",
|
|
696
697
|
examples: [{ args: { format: "bold" }, note: "Bold the selection." }],
|
|
697
|
-
invoke: (n,
|
|
698
|
-
n.applyFormat(
|
|
698
|
+
invoke: (n, i) => {
|
|
699
|
+
n.applyFormat(i.format);
|
|
699
700
|
}
|
|
700
701
|
},
|
|
701
702
|
clear: {
|
|
@@ -726,17 +727,17 @@ const Sa = {
|
|
|
726
727
|
description: "Sourced from the id prop."
|
|
727
728
|
}
|
|
728
729
|
}
|
|
729
|
-
},
|
|
730
|
-
function
|
|
731
|
-
const { t:
|
|
730
|
+
}, $i = "ds:aria-pressed:!bg-[var(--destructive)] ds:aria-pressed:!text-[var(--destructive-foreground)]", nt = "ds:!size-[var(--min-target-size)]", Di = "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", Oi = "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--destructive)]";
|
|
731
|
+
function Qr({ id: n }) {
|
|
732
|
+
const { t: i } = re("ui");
|
|
732
733
|
return /* @__PURE__ */ t(
|
|
733
734
|
"p",
|
|
734
735
|
{
|
|
735
736
|
"data-component": "editor-request-error",
|
|
736
737
|
id: n,
|
|
737
738
|
role: "alert",
|
|
738
|
-
className:
|
|
739
|
-
children:
|
|
739
|
+
className: Oi,
|
|
740
|
+
children: i("editor.ai.error")
|
|
740
741
|
}
|
|
741
742
|
);
|
|
742
743
|
}
|
|
@@ -754,19 +755,19 @@ const Dr = [
|
|
|
754
755
|
"ds:[&_ul]:list-disc ds:[&_ol]:list-decimal",
|
|
755
756
|
"ds:[&_ul]:ps-[var(--spacing-md)] ds:[&_ol]:ps-[var(--spacing-md)]"
|
|
756
757
|
].join(" ");
|
|
757
|
-
function Or(n,
|
|
758
|
-
return
|
|
758
|
+
function Or(n, i) {
|
|
759
|
+
return i ? n ? /\s$/.test(n) ? `${n}${i}` : `${n} ${i}` : i : n;
|
|
759
760
|
}
|
|
760
|
-
function
|
|
761
|
+
function qi({
|
|
761
762
|
open: n,
|
|
762
|
-
onClose:
|
|
763
|
+
onClose: i,
|
|
763
764
|
onRequestAiDraft: c,
|
|
764
765
|
onInsert: s,
|
|
765
|
-
previewAsHtml:
|
|
766
|
+
previewAsHtml: g = !0,
|
|
766
767
|
privacyNotice: u,
|
|
767
768
|
onDictate: m
|
|
768
769
|
}) {
|
|
769
|
-
const { t: p } = re("ui"), y = qe(), k = qe(), [w,
|
|
770
|
+
const { t: p } = re("ui"), y = qe(), k = qe(), [w, L] = N(""), [T, _] = N(!1), [q, f] = N(!1), [d, h] = N(null), z = C(null), [M, B] = N(!1), [V, O] = N(""), [P, E] = N(""), U = C(null), F = v(() => {
|
|
770
771
|
var R;
|
|
771
772
|
(R = U.current) == null || R.abort();
|
|
772
773
|
}, []), Q = v(() => {
|
|
@@ -780,7 +781,7 @@ function $a({
|
|
|
780
781
|
onFinalTranscript: (K) => {
|
|
781
782
|
if (R.signal.aborted) return;
|
|
782
783
|
const J = K.trim();
|
|
783
|
-
O(""), J && (
|
|
784
|
+
O(""), J && (L((se) => Or(se, J)), E(J));
|
|
784
785
|
}
|
|
785
786
|
}).catch(() => {
|
|
786
787
|
}).finally(() => {
|
|
@@ -789,10 +790,10 @@ function $a({
|
|
|
789
790
|
}, [m, p]), pe = v(() => {
|
|
790
791
|
M ? F() : Q();
|
|
791
792
|
}, [M, Q, F]);
|
|
792
|
-
|
|
793
|
+
S(() => {
|
|
793
794
|
var R, K;
|
|
794
|
-
n ? (
|
|
795
|
-
}, [n]),
|
|
795
|
+
n ? (L(""), _(!1), f(!1), h(null), O(""), E("")) : ((R = z.current) == null || R.abort(), z.current = null, (K = U.current) == null || K.abort());
|
|
796
|
+
}, [n]), S(
|
|
796
797
|
() => () => {
|
|
797
798
|
var R, K;
|
|
798
799
|
(R = z.current) == null || R.abort(), (K = U.current) == null || K.abort();
|
|
@@ -805,19 +806,19 @@ function $a({
|
|
|
805
806
|
if (!R || T) return;
|
|
806
807
|
F(), (J = z.current) == null || J.abort();
|
|
807
808
|
const K = new AbortController();
|
|
808
|
-
z.current = K, f(!1),
|
|
809
|
-
K.signal.aborted || (
|
|
809
|
+
z.current = K, f(!1), _(!0), c({ prompt: R, signal: K.signal }).then((se) => {
|
|
810
|
+
K.signal.aborted || (h(se), _(!1));
|
|
810
811
|
}).catch((se) => {
|
|
811
|
-
K.signal.aborted || se && typeof se == "object" && "name" in se && se.name === "AbortError" || (f(!0),
|
|
812
|
+
K.signal.aborted || se && typeof se == "object" && "name" in se && se.name === "AbortError" || (f(!0), _(!1));
|
|
812
813
|
});
|
|
813
814
|
}, [w, T, c, F]), Ne = v(() => {
|
|
814
|
-
d != null && (s(d),
|
|
815
|
-
}, [d, s,
|
|
815
|
+
d != null && (s(d), i());
|
|
816
|
+
}, [d, s, i]), G = d != null, oe = M ? Or(w, V) : w;
|
|
816
817
|
return /* @__PURE__ */ t(
|
|
817
|
-
|
|
818
|
+
Ln,
|
|
818
819
|
{
|
|
819
820
|
open: n,
|
|
820
|
-
onClose:
|
|
821
|
+
onClose: i,
|
|
821
822
|
ariaLabel: p("editor.ai.dialogTitle"),
|
|
822
823
|
children: G ? /* @__PURE__ */ A("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
823
824
|
/* @__PURE__ */ t(
|
|
@@ -826,12 +827,12 @@ function $a({
|
|
|
826
827
|
size: "md",
|
|
827
828
|
intent: "outline",
|
|
828
829
|
className: nt,
|
|
829
|
-
icon: /* @__PURE__ */ t(
|
|
830
|
+
icon: /* @__PURE__ */ t(Lr, {}),
|
|
830
831
|
"aria-label": p("common.close"),
|
|
831
|
-
onClick:
|
|
832
|
+
onClick: i
|
|
832
833
|
}
|
|
833
834
|
),
|
|
834
|
-
/* @__PURE__ */ t("div", { className: "ds:min-w-0 ds:flex-1", children:
|
|
835
|
+
/* @__PURE__ */ t("div", { className: "ds:min-w-0 ds:flex-1", children: g ? /* @__PURE__ */ t(
|
|
835
836
|
Yo,
|
|
836
837
|
{
|
|
837
838
|
html: d,
|
|
@@ -854,9 +855,9 @@ function $a({
|
|
|
854
855
|
size: "md",
|
|
855
856
|
intent: "outline",
|
|
856
857
|
className: `${nt} ds:rounded-full`,
|
|
857
|
-
icon: /* @__PURE__ */ t(
|
|
858
|
+
icon: /* @__PURE__ */ t(la, {}),
|
|
858
859
|
"aria-label": p("editor.ai.retry"),
|
|
859
|
-
onClick: () =>
|
|
860
|
+
onClick: () => h(null)
|
|
860
861
|
}
|
|
861
862
|
),
|
|
862
863
|
/* @__PURE__ */ t(
|
|
@@ -865,7 +866,7 @@ function $a({
|
|
|
865
866
|
size: "md",
|
|
866
867
|
intent: "primary",
|
|
867
868
|
className: `${nt} ds:bg-[image:var(--gradient-brand)] ds:rounded-full`,
|
|
868
|
-
icon: /* @__PURE__ */ t(
|
|
869
|
+
icon: /* @__PURE__ */ t(ca, {}),
|
|
869
870
|
"aria-label": p("common.confirm"),
|
|
870
871
|
onClick: Ne
|
|
871
872
|
}
|
|
@@ -878,18 +879,18 @@ function $a({
|
|
|
878
879
|
size: "md",
|
|
879
880
|
intent: "outline",
|
|
880
881
|
className: nt,
|
|
881
|
-
icon: /* @__PURE__ */ t(
|
|
882
|
+
icon: /* @__PURE__ */ t(Lr, {}),
|
|
882
883
|
"aria-label": p("common.close"),
|
|
883
|
-
onClick:
|
|
884
|
+
onClick: i
|
|
884
885
|
}
|
|
885
886
|
),
|
|
886
887
|
/* @__PURE__ */ t("div", { className: "ds:min-w-0 ds:flex-1", children: /* @__PURE__ */ t(
|
|
887
|
-
|
|
888
|
+
sa,
|
|
888
889
|
{
|
|
889
890
|
id: y,
|
|
890
891
|
size: "md",
|
|
891
892
|
value: oe,
|
|
892
|
-
onChange: (R) =>
|
|
893
|
+
onChange: (R) => L(R.target.value),
|
|
893
894
|
placeholder: p("editor.ai.promptPlaceholder"),
|
|
894
895
|
"aria-label": p("editor.ai.promptLabel"),
|
|
895
896
|
autoResize: !0,
|
|
@@ -905,8 +906,8 @@ function $a({
|
|
|
905
906
|
{
|
|
906
907
|
size: "md",
|
|
907
908
|
intent: "outline",
|
|
908
|
-
className: M ? `${nt} ${
|
|
909
|
-
icon: M ? /* @__PURE__ */ t(Tt, { className: "ds:fill-current" }) : /* @__PURE__ */ t(
|
|
909
|
+
className: M ? `${nt} ${$i}` : nt,
|
|
910
|
+
icon: M ? /* @__PURE__ */ t(Tt, { className: "ds:fill-current" }) : /* @__PURE__ */ t(_n, {}),
|
|
910
911
|
"aria-pressed": M,
|
|
911
912
|
"aria-label": p(M ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
|
|
912
913
|
onClick: pe
|
|
@@ -917,7 +918,7 @@ function $a({
|
|
|
917
918
|
{
|
|
918
919
|
size: "md",
|
|
919
920
|
intent: "primary",
|
|
920
|
-
icon: T ? /* @__PURE__ */ t(Pn, { size: "sm", variant: "pulse" }) : /* @__PURE__ */ t(
|
|
921
|
+
icon: T ? /* @__PURE__ */ t(Pn, { size: "sm", variant: "pulse" }) : /* @__PURE__ */ t(da, {}),
|
|
921
922
|
className: `${nt} ds:bg-[image:var(--gradient-brand)] ds:rounded-full`,
|
|
922
923
|
disabled: T || !w.trim(),
|
|
923
924
|
"aria-busy": T || void 0,
|
|
@@ -927,67 +928,67 @@ function $a({
|
|
|
927
928
|
)
|
|
928
929
|
] }),
|
|
929
930
|
m ? /* @__PURE__ */ t("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: P }) : null,
|
|
930
|
-
q ? /* @__PURE__ */ t(
|
|
931
|
+
q ? /* @__PURE__ */ t(Qr, { id: k }) : u ? /* @__PURE__ */ t("p", { className: Di, children: u }) : null
|
|
931
932
|
] })
|
|
932
933
|
}
|
|
933
934
|
);
|
|
934
935
|
}
|
|
935
|
-
function
|
|
936
|
-
return n(
|
|
936
|
+
function Yr(n, i) {
|
|
937
|
+
return n(i, { nsSeparator: !1, defaultValue: i });
|
|
937
938
|
}
|
|
938
|
-
const
|
|
939
|
+
const Jr = {
|
|
939
940
|
// Redactor's own history. AI rewrites push onto it too (see
|
|
940
941
|
// `pushUndoState` in rich-text-editor.tsx), so Undo steps back over them.
|
|
941
942
|
undo: {
|
|
942
943
|
id: "undo",
|
|
943
|
-
icon: /* @__PURE__ */ t(
|
|
944
|
+
icon: /* @__PURE__ */ t(ga, {}),
|
|
944
945
|
label: ["editor.undo", "Undo"],
|
|
945
946
|
command: ["module.buffer.undo"]
|
|
946
947
|
},
|
|
947
948
|
redo: {
|
|
948
949
|
id: "redo",
|
|
949
|
-
icon: /* @__PURE__ */ t(
|
|
950
|
+
icon: /* @__PURE__ */ t(bi, {}),
|
|
950
951
|
label: ["editor.redo", "Redo"],
|
|
951
952
|
command: ["module.buffer.redo"]
|
|
952
953
|
},
|
|
953
954
|
bold: {
|
|
954
955
|
id: "bold",
|
|
955
|
-
icon: /* @__PURE__ */ t(
|
|
956
|
+
icon: /* @__PURE__ */ t(Ha, {}),
|
|
956
957
|
label: ["editor.bold", "Bold"],
|
|
957
958
|
command: ["module.inline.format", { tag: "b" }],
|
|
958
959
|
toggle: "bold"
|
|
959
960
|
},
|
|
960
961
|
italic: {
|
|
961
962
|
id: "italic",
|
|
962
|
-
icon: /* @__PURE__ */ t(
|
|
963
|
+
icon: /* @__PURE__ */ t(Ga, {}),
|
|
963
964
|
label: ["editor.italic", "Italic"],
|
|
964
965
|
command: ["module.inline.format", { tag: "i" }],
|
|
965
966
|
toggle: "italic"
|
|
966
967
|
},
|
|
967
968
|
underline: {
|
|
968
969
|
id: "underline",
|
|
969
|
-
icon: /* @__PURE__ */ t(
|
|
970
|
+
icon: /* @__PURE__ */ t(_i, {}),
|
|
970
971
|
label: ["editor.underline", "Underline"],
|
|
971
972
|
command: ["module.inline.format", { tag: "u" }],
|
|
972
973
|
toggle: "underline"
|
|
973
974
|
},
|
|
974
975
|
strike: {
|
|
975
976
|
id: "strike",
|
|
976
|
-
icon: /* @__PURE__ */ t(
|
|
977
|
+
icon: /* @__PURE__ */ t(xi, {}),
|
|
977
978
|
label: ["editor.strike", "Strikethrough"],
|
|
978
979
|
command: ["module.inline.format", { tag: "del" }],
|
|
979
980
|
toggle: "strike"
|
|
980
981
|
},
|
|
981
982
|
ul: {
|
|
982
983
|
id: "ul",
|
|
983
|
-
icon: /* @__PURE__ */ t(
|
|
984
|
+
icon: /* @__PURE__ */ t(Za, {}),
|
|
984
985
|
label: ["editor.list.bullet", "Bulleted list"],
|
|
985
986
|
command: ["module.list.toggle", "ul"],
|
|
986
987
|
toggle: "ul"
|
|
987
988
|
},
|
|
988
989
|
ol: {
|
|
989
990
|
id: "ol",
|
|
990
|
-
icon: /* @__PURE__ */ t(
|
|
991
|
+
icon: /* @__PURE__ */ t(Xa, {}),
|
|
991
992
|
label: ["editor.list.ordered", "Numbered list"],
|
|
992
993
|
command: ["module.list.toggle", "ol"],
|
|
993
994
|
toggle: "ol"
|
|
@@ -996,28 +997,28 @@ const Yr = {
|
|
|
996
997
|
{
|
|
997
998
|
id: "paragraph",
|
|
998
999
|
tag: "p",
|
|
999
|
-
icon: /* @__PURE__ */ t(
|
|
1000
|
+
icon: /* @__PURE__ */ t(fi, {}),
|
|
1000
1001
|
label: ["editor.paragraph", "Paragraph"]
|
|
1001
1002
|
},
|
|
1002
1003
|
{
|
|
1003
1004
|
id: "h2",
|
|
1004
1005
|
tag: "h2",
|
|
1005
|
-
icon: /* @__PURE__ */ t(
|
|
1006
|
+
icon: /* @__PURE__ */ t(Ba, {}),
|
|
1006
1007
|
label: ["editor.heading2", "Heading 2"]
|
|
1007
1008
|
},
|
|
1008
1009
|
{
|
|
1009
1010
|
id: "h3",
|
|
1010
1011
|
tag: "h3",
|
|
1011
|
-
icon: /* @__PURE__ */ t(
|
|
1012
|
+
icon: /* @__PURE__ */ t(Fa, {}),
|
|
1012
1013
|
label: ["editor.heading3", "Heading 3"]
|
|
1013
1014
|
},
|
|
1014
1015
|
{
|
|
1015
1016
|
id: "quote",
|
|
1016
1017
|
tag: "blockquote",
|
|
1017
|
-
icon: /* @__PURE__ */ t(
|
|
1018
|
+
icon: /* @__PURE__ */ t(gi, {}),
|
|
1018
1019
|
label: ["editor.quote", "Quote"]
|
|
1019
1020
|
}
|
|
1020
|
-
],
|
|
1021
|
+
], Bi = {
|
|
1021
1022
|
minimal: ["bold", "italic", "underline", "link"],
|
|
1022
1023
|
standard: [
|
|
1023
1024
|
"undo",
|
|
@@ -1043,80 +1044,80 @@ const Yr = {
|
|
|
1043
1044
|
"ol",
|
|
1044
1045
|
"link"
|
|
1045
1046
|
]
|
|
1046
|
-
},
|
|
1047
|
+
}, eo = [
|
|
1047
1048
|
{
|
|
1048
1049
|
id: "rowAbove",
|
|
1049
1050
|
command: "plugin.table.addRowAbove",
|
|
1050
|
-
icon: /* @__PURE__ */ t(
|
|
1051
|
+
icon: /* @__PURE__ */ t(Na, {}),
|
|
1051
1052
|
label: ["editor.table.rowAbove", "Add row above"]
|
|
1052
1053
|
},
|
|
1053
1054
|
{
|
|
1054
1055
|
id: "rowBelow",
|
|
1055
1056
|
command: "plugin.table.addRowBelow",
|
|
1056
|
-
icon: /* @__PURE__ */ t(
|
|
1057
|
+
icon: /* @__PURE__ */ t(Ta, {}),
|
|
1057
1058
|
label: ["editor.table.rowBelow", "Add row below"]
|
|
1058
1059
|
},
|
|
1059
1060
|
{
|
|
1060
1061
|
id: "colLeft",
|
|
1061
1062
|
command: "plugin.table.addColumnLeft",
|
|
1062
|
-
icon: /* @__PURE__ */ t(
|
|
1063
|
+
icon: /* @__PURE__ */ t(Sa, {}),
|
|
1063
1064
|
label: ["editor.table.columnLeft", "Add column left"]
|
|
1064
1065
|
},
|
|
1065
1066
|
{
|
|
1066
1067
|
id: "colRight",
|
|
1067
1068
|
command: "plugin.table.addColumnRight",
|
|
1068
|
-
icon: /* @__PURE__ */ t(
|
|
1069
|
+
icon: /* @__PURE__ */ t(Ra, {}),
|
|
1069
1070
|
label: ["editor.table.columnRight", "Add column right"]
|
|
1070
1071
|
},
|
|
1071
1072
|
{
|
|
1072
1073
|
id: "addHead",
|
|
1073
1074
|
command: "plugin.table.addHead",
|
|
1074
|
-
icon: /* @__PURE__ */ t(
|
|
1075
|
+
icon: /* @__PURE__ */ t(di, {}),
|
|
1075
1076
|
label: ["editor.table.addHeader", "Add header row"]
|
|
1076
1077
|
},
|
|
1077
1078
|
{
|
|
1078
1079
|
id: "deleteHead",
|
|
1079
1080
|
command: "plugin.table.deleteHead",
|
|
1080
|
-
icon: /* @__PURE__ */ t(
|
|
1081
|
+
icon: /* @__PURE__ */ t(li, {}),
|
|
1081
1082
|
label: ["editor.table.deleteHeader", "Remove header row"]
|
|
1082
1083
|
},
|
|
1083
1084
|
{
|
|
1084
1085
|
id: "deleteRow",
|
|
1085
1086
|
command: "plugin.table.deleteRow",
|
|
1086
|
-
icon: /* @__PURE__ */ t(
|
|
1087
|
+
icon: /* @__PURE__ */ t(yi, {}),
|
|
1087
1088
|
label: ["editor.table.deleteRow", "Delete row"]
|
|
1088
1089
|
},
|
|
1089
1090
|
{
|
|
1090
1091
|
id: "deleteColumn",
|
|
1091
1092
|
command: "plugin.table.deleteColumn",
|
|
1092
|
-
icon: /* @__PURE__ */ t(
|
|
1093
|
+
icon: /* @__PURE__ */ t(Oa, {}),
|
|
1093
1094
|
label: ["editor.table.deleteColumn", "Delete column"]
|
|
1094
1095
|
},
|
|
1095
1096
|
{
|
|
1096
1097
|
id: "deleteTable",
|
|
1097
1098
|
command: "plugin.table.deleteTable",
|
|
1098
|
-
icon: /* @__PURE__ */ t(
|
|
1099
|
+
icon: /* @__PURE__ */ t(ya, {}),
|
|
1099
1100
|
label: ["editor.table.deleteTable", "Delete table"]
|
|
1100
1101
|
}
|
|
1101
|
-
], Qt = 6,
|
|
1102
|
+
], Qt = 6, to = "ds:[&_[data-intent=ghost]:hover]:bg-[color-mix(in_srgb,var(--accent)_12%,transparent)] ds:[&_[data-intent=ghost]:hover]:text-[color:var(--accent)]", Pi = Bn(
|
|
1102
1103
|
[
|
|
1103
1104
|
"ds:@container/toolbar",
|
|
1104
1105
|
"ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
|
|
1105
1106
|
"ds:bg-[var(--background)] ds:p-[var(--spacing-xs)]",
|
|
1106
1107
|
"ds:shadow-[var(--shadow-md)]",
|
|
1107
|
-
|
|
1108
|
+
to
|
|
1108
1109
|
].join(" ")
|
|
1109
|
-
),
|
|
1110
|
+
), Fi = "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", nn = "ds:self-stretch ds:[inline-size:var(--border-width-sm)] ds:bg-[var(--border)] ds:[margin-inline:var(--spacing-2xs)]", Et = "ds:text-[length:var(--font-size-sm)] ds:font-medium ds:text-[color:var(--foreground)]";
|
|
1110
1111
|
function tn(n) {
|
|
1111
1112
|
return n.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
1112
1113
|
}
|
|
1113
|
-
function
|
|
1114
|
+
function ji({
|
|
1114
1115
|
variables: n,
|
|
1115
|
-
recentVariableTokens:
|
|
1116
|
+
recentVariableTokens: i,
|
|
1116
1117
|
insertVariable: c,
|
|
1117
1118
|
saveSelection: s
|
|
1118
1119
|
}) {
|
|
1119
|
-
const { t:
|
|
1120
|
+
const { t: g } = re("ui"), [u, m] = N(!1), [p, y] = N(""), k = C(null), w = C(!1), L = n;
|
|
1120
1121
|
return /* @__PURE__ */ A(
|
|
1121
1122
|
Zt.Root,
|
|
1122
1123
|
{
|
|
@@ -1131,8 +1132,8 @@ function Ba({
|
|
|
1131
1132
|
ref: k,
|
|
1132
1133
|
size: "sm",
|
|
1133
1134
|
intent: "ghost",
|
|
1134
|
-
icon: /* @__PURE__ */ t(
|
|
1135
|
-
"aria-label":
|
|
1135
|
+
icon: /* @__PURE__ */ t($a, {}),
|
|
1136
|
+
"aria-label": g("editor.insertVariable", "Insert variable")
|
|
1136
1137
|
}
|
|
1137
1138
|
) }),
|
|
1138
1139
|
/* @__PURE__ */ t(Zt.Portal, { children: /* @__PURE__ */ t(
|
|
@@ -1145,14 +1146,14 @@ function Ba({
|
|
|
1145
1146
|
w.current && (T.preventDefault(), w.current = !1);
|
|
1146
1147
|
},
|
|
1147
1148
|
children: /* @__PURE__ */ t(
|
|
1148
|
-
|
|
1149
|
+
Ur,
|
|
1149
1150
|
{
|
|
1150
|
-
variables:
|
|
1151
|
-
recentTokens:
|
|
1151
|
+
variables: L,
|
|
1152
|
+
recentTokens: i,
|
|
1152
1153
|
query: p,
|
|
1153
1154
|
onQueryChange: y,
|
|
1154
1155
|
searchFocusable: !0,
|
|
1155
|
-
"aria-label":
|
|
1156
|
+
"aria-label": g("editor.insertVariable", "Insert variable"),
|
|
1156
1157
|
onSelect: (T) => {
|
|
1157
1158
|
w.current = !0, c(T.token), m(!1);
|
|
1158
1159
|
},
|
|
@@ -1165,26 +1166,26 @@ function Ba({
|
|
|
1165
1166
|
}
|
|
1166
1167
|
);
|
|
1167
1168
|
}
|
|
1168
|
-
function
|
|
1169
|
+
function Gi({
|
|
1169
1170
|
run: n,
|
|
1170
|
-
active:
|
|
1171
|
+
active: i,
|
|
1171
1172
|
onTriggerDown: c
|
|
1172
1173
|
}) {
|
|
1173
|
-
const { t: s } = re("ui"),
|
|
1174
|
+
const { t: s } = re("ui"), g = zn.find((u) => i.has(u.id)) ?? zn[0];
|
|
1174
1175
|
return /* @__PURE__ */ A(X.Root, { children: [
|
|
1175
1176
|
/* @__PURE__ */ t(X.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
|
|
1176
1177
|
Ee,
|
|
1177
1178
|
{
|
|
1178
1179
|
size: "sm",
|
|
1179
1180
|
intent: "ghost",
|
|
1180
|
-
startIcon:
|
|
1181
|
-
endIcon: /* @__PURE__ */ t(
|
|
1181
|
+
startIcon: g.icon,
|
|
1182
|
+
endIcon: /* @__PURE__ */ t(Zr, {}),
|
|
1182
1183
|
"aria-label": `${s("editor.format", "Paragraph style")}: ${s(
|
|
1183
|
-
|
|
1184
|
-
|
|
1184
|
+
g.label[0],
|
|
1185
|
+
g.label[1]
|
|
1185
1186
|
)}`,
|
|
1186
1187
|
onMouseDown: c,
|
|
1187
|
-
children: /* @__PURE__ */ t("span", { className: "ds:hidden ds:@[448px]/toolbar:inline", children: s(
|
|
1188
|
+
children: /* @__PURE__ */ t("span", { className: "ds:hidden ds:@[448px]/toolbar:inline", children: s(g.label[0], g.label[1]) })
|
|
1188
1189
|
}
|
|
1189
1190
|
) }),
|
|
1190
1191
|
/* @__PURE__ */ t(X.Content, { align: "start", children: zn.map((u) => /* @__PURE__ */ t(
|
|
@@ -1198,112 +1199,112 @@ function Pa({
|
|
|
1198
1199
|
)) })
|
|
1199
1200
|
] });
|
|
1200
1201
|
}
|
|
1201
|
-
function
|
|
1202
|
+
function Ki({
|
|
1202
1203
|
insertHtml: n,
|
|
1203
|
-
saveSelection:
|
|
1204
|
+
saveSelection: i,
|
|
1204
1205
|
restoreSelection: c,
|
|
1205
1206
|
getSelectedText: s
|
|
1206
1207
|
}) {
|
|
1207
|
-
const { t:
|
|
1208
|
+
const { t: g } = re("ui"), [u, m] = N(!1), [p, y] = N(""), [k, w] = N(""), [L, T] = N(!1), _ = qe(), q = qe(), f = () => {
|
|
1208
1209
|
y(""), w(""), T(!1);
|
|
1209
1210
|
}, d = () => {
|
|
1210
|
-
const
|
|
1211
|
-
if (!
|
|
1212
|
-
const z = k.trim() ||
|
|
1211
|
+
const h = p.trim();
|
|
1212
|
+
if (!h) return;
|
|
1213
|
+
const z = k.trim() || h, M = L ? ' target="_blank" rel="noopener noreferrer"' : "", B = `<a href="${tn(h)}"${M}>${tn(z)}</a>`;
|
|
1213
1214
|
m(!1), f(), window.requestAnimationFrame(() => {
|
|
1214
1215
|
c(), n(B);
|
|
1215
1216
|
});
|
|
1216
1217
|
};
|
|
1217
|
-
return /* @__PURE__ */ A(
|
|
1218
|
-
/* @__PURE__ */ t(
|
|
1218
|
+
return /* @__PURE__ */ A(ie.Root, { open: u, onOpenChange: m, children: [
|
|
1219
|
+
/* @__PURE__ */ t(ie.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
|
|
1219
1220
|
j,
|
|
1220
1221
|
{
|
|
1221
1222
|
size: "sm",
|
|
1222
1223
|
intent: "ghost",
|
|
1223
|
-
icon: /* @__PURE__ */ t(
|
|
1224
|
-
"aria-label":
|
|
1224
|
+
icon: /* @__PURE__ */ t(Va, {}),
|
|
1225
|
+
"aria-label": g("editor.link.insert", "Insert link"),
|
|
1225
1226
|
onMouseDown: () => {
|
|
1226
|
-
|
|
1227
|
+
i(), w(s());
|
|
1227
1228
|
}
|
|
1228
1229
|
}
|
|
1229
1230
|
) }),
|
|
1230
|
-
/* @__PURE__ */ A(
|
|
1231
|
-
/* @__PURE__ */ t(
|
|
1232
|
-
/* @__PURE__ */ A(
|
|
1231
|
+
/* @__PURE__ */ A(ie.Content, { children: [
|
|
1232
|
+
/* @__PURE__ */ t(ie.Header, { children: /* @__PURE__ */ t(ie.Title, { children: g("editor.link.insert", "Insert link") }) }),
|
|
1233
|
+
/* @__PURE__ */ A(ie.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1233
1234
|
/* @__PURE__ */ A("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
1234
|
-
/* @__PURE__ */ t("label", { htmlFor:
|
|
1235
|
+
/* @__PURE__ */ t("label", { htmlFor: _, className: Et, children: g("editor.link.url", "URL") }),
|
|
1235
1236
|
/* @__PURE__ */ t(
|
|
1236
1237
|
en,
|
|
1237
1238
|
{
|
|
1238
|
-
id:
|
|
1239
|
+
id: _,
|
|
1239
1240
|
type: "url",
|
|
1240
1241
|
value: p,
|
|
1241
|
-
onChange: (
|
|
1242
|
+
onChange: (h) => y(h.target.value),
|
|
1242
1243
|
placeholder: "https://…"
|
|
1243
1244
|
}
|
|
1244
1245
|
)
|
|
1245
1246
|
] }),
|
|
1246
1247
|
/* @__PURE__ */ A("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
1247
|
-
/* @__PURE__ */ t("label", { htmlFor: q, className: Et, children:
|
|
1248
|
+
/* @__PURE__ */ t("label", { htmlFor: q, className: Et, children: g("editor.link.text", "Text to display") }),
|
|
1248
1249
|
/* @__PURE__ */ t(
|
|
1249
1250
|
en,
|
|
1250
1251
|
{
|
|
1251
1252
|
id: q,
|
|
1252
1253
|
value: k,
|
|
1253
|
-
onChange: (
|
|
1254
|
-
placeholder:
|
|
1254
|
+
onChange: (h) => w(h.target.value),
|
|
1255
|
+
placeholder: g("editor.link.textPlaceholder", "Link text")
|
|
1255
1256
|
}
|
|
1256
1257
|
)
|
|
1257
1258
|
] }),
|
|
1258
1259
|
/* @__PURE__ */ t(
|
|
1259
|
-
|
|
1260
|
+
ua,
|
|
1260
1261
|
{
|
|
1261
|
-
checked:
|
|
1262
|
-
onCheckedChange: (
|
|
1263
|
-
label:
|
|
1262
|
+
checked: L,
|
|
1263
|
+
onCheckedChange: (h) => T(h === !0),
|
|
1264
|
+
label: g("editor.link.newTab", "Open in new tab")
|
|
1264
1265
|
}
|
|
1265
1266
|
)
|
|
1266
1267
|
] }),
|
|
1267
|
-
/* @__PURE__ */ A(
|
|
1268
|
-
/* @__PURE__ */ t(
|
|
1269
|
-
/* @__PURE__ */ t(Ee, { onClick: d, disabled: !p.trim(), children:
|
|
1268
|
+
/* @__PURE__ */ A(ie.Footer, { children: [
|
|
1269
|
+
/* @__PURE__ */ t(ie.Close, { asChild: !0, children: /* @__PURE__ */ t(Ee, { intent: "secondary", children: g("common.cancel") }) }),
|
|
1270
|
+
/* @__PURE__ */ t(Ee, { onClick: d, disabled: !p.trim(), children: g("editor.link.insertAction", "Insert") })
|
|
1270
1271
|
] })
|
|
1271
1272
|
] })
|
|
1272
1273
|
] });
|
|
1273
1274
|
}
|
|
1274
|
-
function
|
|
1275
|
+
function Vi({
|
|
1275
1276
|
insertHtml: n,
|
|
1276
|
-
saveSelection:
|
|
1277
|
+
saveSelection: i,
|
|
1277
1278
|
restoreSelection: c,
|
|
1278
1279
|
uploadImage: s
|
|
1279
1280
|
}) {
|
|
1280
|
-
const { t:
|
|
1281
|
-
const
|
|
1281
|
+
const { t: g } = re("ui"), [u, m] = N(!1), [p, y] = N(""), [k, w] = N(""), L = qe(), T = qe(), _ = (f, d) => {
|
|
1282
|
+
const h = `<img src="${tn(f)}" alt="${tn(d)}" loading="lazy">`;
|
|
1282
1283
|
m(!1), y(""), w(""), window.requestAnimationFrame(() => {
|
|
1283
|
-
c(), n(
|
|
1284
|
+
c(), n(h);
|
|
1284
1285
|
});
|
|
1285
1286
|
}, q = () => {
|
|
1286
1287
|
const f = p.trim();
|
|
1287
|
-
f &&
|
|
1288
|
+
f && _(f, k.trim());
|
|
1288
1289
|
};
|
|
1289
|
-
return /* @__PURE__ */ A(
|
|
1290
|
-
/* @__PURE__ */ t(
|
|
1290
|
+
return /* @__PURE__ */ A(ie.Root, { open: u, onOpenChange: m, children: [
|
|
1291
|
+
/* @__PURE__ */ t(ie.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
|
|
1291
1292
|
j,
|
|
1292
1293
|
{
|
|
1293
1294
|
size: "sm",
|
|
1294
1295
|
intent: "ghost",
|
|
1295
|
-
icon: /* @__PURE__ */ t(
|
|
1296
|
-
"aria-label":
|
|
1297
|
-
onMouseDown: () =>
|
|
1296
|
+
icon: /* @__PURE__ */ t(pa, {}),
|
|
1297
|
+
"aria-label": g("editor.image.insert", "Insert image"),
|
|
1298
|
+
onMouseDown: () => i()
|
|
1298
1299
|
}
|
|
1299
1300
|
) }),
|
|
1300
|
-
/* @__PURE__ */ A(
|
|
1301
|
-
/* @__PURE__ */ t(
|
|
1302
|
-
/* @__PURE__ */ A(
|
|
1301
|
+
/* @__PURE__ */ A(ie.Content, { children: [
|
|
1302
|
+
/* @__PURE__ */ t(ie.Header, { children: /* @__PURE__ */ t(ie.Title, { children: g("editor.image.insert", "Insert image") }) }),
|
|
1303
|
+
/* @__PURE__ */ A(ie.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1303
1304
|
s ? /* @__PURE__ */ A("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
1304
|
-
/* @__PURE__ */ t("span", { className: Et, children:
|
|
1305
|
+
/* @__PURE__ */ t("span", { className: Et, children: g("editor.image.upload", "Upload") }),
|
|
1305
1306
|
/* @__PURE__ */ t(
|
|
1306
|
-
|
|
1307
|
+
ma,
|
|
1307
1308
|
{
|
|
1308
1309
|
variant: "dropzone",
|
|
1309
1310
|
accept: {
|
|
@@ -1311,19 +1312,19 @@ function ja({
|
|
|
1311
1312
|
},
|
|
1312
1313
|
maxFiles: 1,
|
|
1313
1314
|
onUpload: async (f, { signal: d }) => {
|
|
1314
|
-
const
|
|
1315
|
-
|
|
1315
|
+
const h = await s(f, d);
|
|
1316
|
+
_(h, f.name);
|
|
1316
1317
|
}
|
|
1317
1318
|
}
|
|
1318
1319
|
),
|
|
1319
|
-
/* @__PURE__ */ t("span", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", children:
|
|
1320
|
+
/* @__PURE__ */ t("span", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", children: g("editor.image.orUrl", "Or paste an image URL") })
|
|
1320
1321
|
] }) : null,
|
|
1321
1322
|
/* @__PURE__ */ A("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
1322
|
-
/* @__PURE__ */ t("label", { htmlFor:
|
|
1323
|
+
/* @__PURE__ */ t("label", { htmlFor: L, className: Et, children: g("editor.image.url", "Image URL") }),
|
|
1323
1324
|
/* @__PURE__ */ t(
|
|
1324
1325
|
en,
|
|
1325
1326
|
{
|
|
1326
|
-
id:
|
|
1327
|
+
id: L,
|
|
1327
1328
|
type: "url",
|
|
1328
1329
|
value: p,
|
|
1329
1330
|
onChange: (f) => y(f.target.value),
|
|
@@ -1332,14 +1333,14 @@ function ja({
|
|
|
1332
1333
|
)
|
|
1333
1334
|
] }),
|
|
1334
1335
|
/* @__PURE__ */ A("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
1335
|
-
/* @__PURE__ */ t("label", { htmlFor: T, className: Et, children:
|
|
1336
|
+
/* @__PURE__ */ t("label", { htmlFor: T, className: Et, children: g("editor.image.alt", "Alt text") }),
|
|
1336
1337
|
/* @__PURE__ */ t(
|
|
1337
1338
|
en,
|
|
1338
1339
|
{
|
|
1339
1340
|
id: T,
|
|
1340
1341
|
value: k,
|
|
1341
1342
|
onChange: (f) => w(f.target.value),
|
|
1342
|
-
placeholder:
|
|
1343
|
+
placeholder: g(
|
|
1343
1344
|
"editor.image.altPlaceholder",
|
|
1344
1345
|
"Describe the image"
|
|
1345
1346
|
)
|
|
@@ -1347,19 +1348,19 @@ function ja({
|
|
|
1347
1348
|
)
|
|
1348
1349
|
] })
|
|
1349
1350
|
] }),
|
|
1350
|
-
/* @__PURE__ */ A(
|
|
1351
|
-
/* @__PURE__ */ t(
|
|
1352
|
-
/* @__PURE__ */ t(Ee, { onClick: q, disabled: !p.trim(), children:
|
|
1351
|
+
/* @__PURE__ */ A(ie.Footer, { children: [
|
|
1352
|
+
/* @__PURE__ */ t(ie.Close, { asChild: !0, children: /* @__PURE__ */ t(Ee, { intent: "secondary", children: g("common.cancel") }) }),
|
|
1353
|
+
/* @__PURE__ */ t(Ee, { onClick: q, disabled: !p.trim(), children: g("editor.image.insertAction", "Insert") })
|
|
1353
1354
|
] })
|
|
1354
1355
|
] })
|
|
1355
1356
|
] });
|
|
1356
1357
|
}
|
|
1357
|
-
function
|
|
1358
|
+
function Wi({
|
|
1358
1359
|
run: n,
|
|
1359
|
-
saveSelection:
|
|
1360
|
+
saveSelection: i,
|
|
1360
1361
|
restoreSelection: c
|
|
1361
1362
|
}) {
|
|
1362
|
-
const { t: s } = re("ui"), [
|
|
1363
|
+
const { t: s } = re("ui"), [g, u] = N("#1f2a5c"), m = (y) => {
|
|
1363
1364
|
u(y), c(), n("module.inline.format", {
|
|
1364
1365
|
tag: "span",
|
|
1365
1366
|
style: { color: y },
|
|
@@ -1368,16 +1369,16 @@ function Ga({
|
|
|
1368
1369
|
}, p = () => {
|
|
1369
1370
|
c(), n("module.inline.remove", { style: "color" });
|
|
1370
1371
|
};
|
|
1371
|
-
return /* @__PURE__ */ A(ne, { onOpenChange: (y) => y &&
|
|
1372
|
+
return /* @__PURE__ */ A(ne, { onOpenChange: (y) => y && i(), children: [
|
|
1372
1373
|
/* @__PURE__ */ t(ne.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
|
|
1373
1374
|
j,
|
|
1374
1375
|
{
|
|
1375
1376
|
size: "sm",
|
|
1376
1377
|
intent: "ghost",
|
|
1377
|
-
icon: /* @__PURE__ */ t(
|
|
1378
|
+
icon: /* @__PURE__ */ t(ni, {}),
|
|
1378
1379
|
"aria-label": s("editor.textColor", "Text colour"),
|
|
1379
1380
|
onMouseDown: (y) => {
|
|
1380
|
-
y.preventDefault(),
|
|
1381
|
+
y.preventDefault(), i();
|
|
1381
1382
|
}
|
|
1382
1383
|
}
|
|
1383
1384
|
) }),
|
|
@@ -1388,7 +1389,7 @@ function Ga({
|
|
|
1388
1389
|
{
|
|
1389
1390
|
variant: "inline",
|
|
1390
1391
|
size: "sm",
|
|
1391
|
-
value:
|
|
1392
|
+
value: g,
|
|
1392
1393
|
onChange: m
|
|
1393
1394
|
}
|
|
1394
1395
|
) }),
|
|
@@ -1396,12 +1397,12 @@ function Ga({
|
|
|
1396
1397
|
] })
|
|
1397
1398
|
] });
|
|
1398
1399
|
}
|
|
1399
|
-
function
|
|
1400
|
+
function Xi({
|
|
1400
1401
|
run: n,
|
|
1401
|
-
saveSelection:
|
|
1402
|
+
saveSelection: i,
|
|
1402
1403
|
restoreSelection: c
|
|
1403
1404
|
}) {
|
|
1404
|
-
const { t: s } = re("ui"), [
|
|
1405
|
+
const { t: s } = re("ui"), [g, u] = N("#fff3a3"), m = (y) => {
|
|
1405
1406
|
u(y), c(), n("module.inline.format", {
|
|
1406
1407
|
tag: "span",
|
|
1407
1408
|
style: { "background-color": y },
|
|
@@ -1410,16 +1411,16 @@ function Ka({
|
|
|
1410
1411
|
}, p = () => {
|
|
1411
1412
|
c(), n("module.inline.remove", { style: "background-color" });
|
|
1412
1413
|
};
|
|
1413
|
-
return /* @__PURE__ */ A(ne, { onOpenChange: (y) => y &&
|
|
1414
|
+
return /* @__PURE__ */ A(ne, { onOpenChange: (y) => y && i(), children: [
|
|
1414
1415
|
/* @__PURE__ */ t(ne.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
|
|
1415
1416
|
j,
|
|
1416
1417
|
{
|
|
1417
1418
|
size: "sm",
|
|
1418
1419
|
intent: "ghost",
|
|
1419
|
-
icon: /* @__PURE__ */ t(
|
|
1420
|
+
icon: /* @__PURE__ */ t(ha, {}),
|
|
1420
1421
|
"aria-label": s("editor.highlightColor", "Highlight"),
|
|
1421
1422
|
onMouseDown: (y) => {
|
|
1422
|
-
y.preventDefault(),
|
|
1423
|
+
y.preventDefault(), i();
|
|
1423
1424
|
}
|
|
1424
1425
|
}
|
|
1425
1426
|
) }),
|
|
@@ -1430,7 +1431,7 @@ function Ka({
|
|
|
1430
1431
|
{
|
|
1431
1432
|
variant: "inline",
|
|
1432
1433
|
size: "sm",
|
|
1433
|
-
value:
|
|
1434
|
+
value: g,
|
|
1434
1435
|
onChange: m
|
|
1435
1436
|
}
|
|
1436
1437
|
) }),
|
|
@@ -1438,28 +1439,28 @@ function Ka({
|
|
|
1438
1439
|
] })
|
|
1439
1440
|
] });
|
|
1440
1441
|
}
|
|
1441
|
-
function
|
|
1442
|
-
const c = Array.from({ length:
|
|
1442
|
+
function Ui(n, i) {
|
|
1443
|
+
const c = Array.from({ length: i }, () => "<td><br></td>").join("");
|
|
1443
1444
|
return `<table><tbody>${Array.from({ length: n }, () => `<tr>${c}</tr>`).join("")}</tbody></table>`;
|
|
1444
1445
|
}
|
|
1445
|
-
function
|
|
1446
|
+
function Zi({
|
|
1446
1447
|
run: n,
|
|
1447
|
-
insertTable:
|
|
1448
|
+
insertTable: i,
|
|
1448
1449
|
active: c
|
|
1449
1450
|
}) {
|
|
1450
|
-
const { t: s } = re("ui"), [
|
|
1451
|
+
const { t: s } = re("ui"), [g, u] = N({ r: 0, c: 0 }), [m, p] = N(!1), y = c.has("table") || m, k = /* @__PURE__ */ t(
|
|
1451
1452
|
j,
|
|
1452
1453
|
{
|
|
1453
1454
|
size: "sm",
|
|
1454
1455
|
intent: "ghost",
|
|
1455
|
-
icon: /* @__PURE__ */ t(
|
|
1456
|
+
icon: /* @__PURE__ */ t(Ai, {}),
|
|
1456
1457
|
"aria-label": s("editor.table.insert", "Insert table"),
|
|
1457
1458
|
onMouseDown: (w) => w.preventDefault()
|
|
1458
1459
|
}
|
|
1459
1460
|
);
|
|
1460
1461
|
return y ? /* @__PURE__ */ A(X.Root, { open: m, onOpenChange: p, children: [
|
|
1461
1462
|
/* @__PURE__ */ t(X.Trigger, { asChild: !0, children: k }),
|
|
1462
|
-
/* @__PURE__ */ t(X.Content, { side: "bottom", align: "start", children:
|
|
1463
|
+
/* @__PURE__ */ t(X.Content, { side: "bottom", align: "start", children: eo.map((w) => /* @__PURE__ */ t(
|
|
1463
1464
|
X.Item,
|
|
1464
1465
|
{
|
|
1465
1466
|
startIcon: w.icon,
|
|
@@ -1479,52 +1480,52 @@ function Wa({
|
|
|
1479
1480
|
"aria-label": s("editor.table.sizePicker", "Table size"),
|
|
1480
1481
|
className: "ds:mt-[var(--spacing-sm)] ds:grid ds:w-fit ds:grid-cols-6 ds:gap-[var(--spacing-2xs)]",
|
|
1481
1482
|
onMouseLeave: () => u({ r: 0, c: 0 }),
|
|
1482
|
-
children: Array.from({ length: Qt * Qt }, (w,
|
|
1483
|
-
const T = Math.floor(
|
|
1483
|
+
children: Array.from({ length: Qt * Qt }, (w, L) => {
|
|
1484
|
+
const T = Math.floor(L / Qt) + 1, _ = L % Qt + 1, q = T <= g.r && _ <= g.c;
|
|
1484
1485
|
return /* @__PURE__ */ t(
|
|
1485
1486
|
"button",
|
|
1486
1487
|
{
|
|
1487
1488
|
type: "button",
|
|
1488
1489
|
"aria-label": s("editor.table.sizeCell", "{{r}}×{{c}}", {
|
|
1489
1490
|
r: T,
|
|
1490
|
-
c:
|
|
1491
|
+
c: _
|
|
1491
1492
|
}),
|
|
1492
|
-
onMouseEnter: () => u({ r: T, c:
|
|
1493
|
-
onClick: () =>
|
|
1493
|
+
onMouseEnter: () => u({ r: T, c: _ }),
|
|
1494
|
+
onClick: () => i(Ui(T, _)),
|
|
1494
1495
|
className: `ds:size-5 ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--border)] ${q ? "ds:bg-[var(--primary)]" : "ds:bg-[var(--muted)]"}`
|
|
1495
1496
|
},
|
|
1496
|
-
|
|
1497
|
+
L
|
|
1497
1498
|
);
|
|
1498
1499
|
})
|
|
1499
1500
|
}
|
|
1500
1501
|
),
|
|
1501
|
-
/* @__PURE__ */ t("p", { className: "ds:mt-[var(--spacing-xs)] ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", children:
|
|
1502
|
-
r:
|
|
1503
|
-
c:
|
|
1502
|
+
/* @__PURE__ */ t("p", { className: "ds:mt-[var(--spacing-xs)] ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", children: g.r > 0 ? s("editor.table.sizeCell", "{{r}}×{{c}}", {
|
|
1503
|
+
r: g.r,
|
|
1504
|
+
c: g.c
|
|
1504
1505
|
}) : s("editor.table.sizeHint", "Pick a size") })
|
|
1505
1506
|
] })
|
|
1506
1507
|
] });
|
|
1507
1508
|
}
|
|
1508
|
-
const
|
|
1509
|
+
const Qi = Object.fromEntries(eo.map((n) => [n.id, n])), Yi = [
|
|
1509
1510
|
"ds:absolute ds:z-20 ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]",
|
|
1510
1511
|
"ds:[inset-block-start:var(--rte-tt-top)] ds:[inset-inline-start:var(--rte-tt-start)]",
|
|
1511
1512
|
"ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
|
|
1512
1513
|
"ds:bg-[var(--popover)] ds:p-[var(--spacing-2xs)] ds:shadow-[var(--shadow-lg)]"
|
|
1513
|
-
].join(" "),
|
|
1514
|
+
].join(" "), Ji = "#fde68a";
|
|
1514
1515
|
function qr({
|
|
1515
1516
|
scope: n,
|
|
1516
|
-
icon:
|
|
1517
|
+
icon: i,
|
|
1517
1518
|
label: c,
|
|
1518
1519
|
onOpenChange: s,
|
|
1519
|
-
saveTableCell:
|
|
1520
|
+
saveTableCell: g,
|
|
1520
1521
|
applyTableBackground: u
|
|
1521
1522
|
}) {
|
|
1522
|
-
const { t: m } = re("ui"), [p, y] = N(
|
|
1523
|
+
const { t: m } = re("ui"), [p, y] = N(Ji);
|
|
1523
1524
|
return /* @__PURE__ */ A(
|
|
1524
1525
|
ne,
|
|
1525
1526
|
{
|
|
1526
1527
|
onOpenChange: (k) => {
|
|
1527
|
-
s(k), k &&
|
|
1528
|
+
s(k), k && g();
|
|
1528
1529
|
},
|
|
1529
1530
|
children: [
|
|
1530
1531
|
/* @__PURE__ */ t(ne.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
|
|
@@ -1532,7 +1533,7 @@ function qr({
|
|
|
1532
1533
|
{
|
|
1533
1534
|
size: "sm",
|
|
1534
1535
|
intent: "ghost",
|
|
1535
|
-
icon:
|
|
1536
|
+
icon: i,
|
|
1536
1537
|
tooltip: c,
|
|
1537
1538
|
onMouseDown: (k) => k.preventDefault()
|
|
1538
1539
|
}
|
|
@@ -1564,22 +1565,22 @@ function qr({
|
|
|
1564
1565
|
}
|
|
1565
1566
|
);
|
|
1566
1567
|
}
|
|
1567
|
-
function
|
|
1568
|
+
function es({
|
|
1568
1569
|
active: n,
|
|
1569
|
-
run:
|
|
1570
|
+
run: i,
|
|
1570
1571
|
areaRef: c,
|
|
1571
1572
|
getActiveTableEl: s,
|
|
1572
|
-
enableColor:
|
|
1573
|
+
enableColor: g = !1,
|
|
1573
1574
|
saveTableCell: u,
|
|
1574
1575
|
applyTableBackground: m
|
|
1575
1576
|
}) {
|
|
1576
|
-
const { t: p } = re("ui"), y = n.has("table"), [k, w] = N(null),
|
|
1577
|
-
|
|
1577
|
+
const { t: p } = re("ui"), y = n.has("table"), [k, w] = N(null), L = C(0), [T, _] = N(!1), q = v((d) => {
|
|
1578
|
+
L.current = Math.max(
|
|
1578
1579
|
0,
|
|
1579
|
-
|
|
1580
|
-
), L
|
|
1580
|
+
L.current + (d ? 1 : -1)
|
|
1581
|
+
), _(L.current > 0);
|
|
1581
1582
|
}, []);
|
|
1582
|
-
if (
|
|
1583
|
+
if (S(() => {
|
|
1583
1584
|
if (T) return;
|
|
1584
1585
|
if (!y || typeof window > "u") {
|
|
1585
1586
|
w(null);
|
|
@@ -1595,16 +1596,16 @@ function Qa({
|
|
|
1595
1596
|
w({ top: U, start: Math.max(0, F), rtl: E });
|
|
1596
1597
|
};
|
|
1597
1598
|
d();
|
|
1598
|
-
const
|
|
1599
|
-
return z &&
|
|
1600
|
-
|
|
1599
|
+
const h = new ResizeObserver(d), z = c.current, M = s();
|
|
1600
|
+
return z && h.observe(z), M && h.observe(M), window.addEventListener("scroll", d, !0), window.addEventListener("resize", d), () => {
|
|
1601
|
+
h.disconnect(), window.removeEventListener("scroll", d, !0), window.removeEventListener("resize", d);
|
|
1601
1602
|
};
|
|
1602
1603
|
}, [y, T, c, s]), !y && !T || !k) return null;
|
|
1603
1604
|
const f = [
|
|
1604
1605
|
["rowAbove", "rowBelow"],
|
|
1605
1606
|
["colLeft", "colRight"],
|
|
1606
1607
|
["addHead"],
|
|
1607
|
-
...
|
|
1608
|
+
...g ? ["colour"] : [],
|
|
1608
1609
|
["deleteRow", "deleteColumn"],
|
|
1609
1610
|
["deleteTable"]
|
|
1610
1611
|
];
|
|
@@ -1617,19 +1618,19 @@ function Qa({
|
|
|
1617
1618
|
{
|
|
1618
1619
|
role: "group",
|
|
1619
1620
|
"aria-label": p("editor.table.toolbar", "Table tools"),
|
|
1620
|
-
className: `${
|
|
1621
|
+
className: `${Yi} ${k.rtl ? "ds:translate-x-1/2" : "ds:-translate-x-1/2"}`,
|
|
1621
1622
|
style: {
|
|
1622
1623
|
"--rte-tt-top": `${k.top}px`,
|
|
1623
1624
|
"--rte-tt-start": `${k.start}px`
|
|
1624
1625
|
},
|
|
1625
|
-
children: f.map((d,
|
|
1626
|
-
|
|
1626
|
+
children: f.map((d, h) => /* @__PURE__ */ A(ht, { children: [
|
|
1627
|
+
h > 0 ? /* @__PURE__ */ t("span", { "aria-hidden": "true", className: nn }) : null,
|
|
1627
1628
|
d === "colour" ? /* @__PURE__ */ A(Ie, { children: [
|
|
1628
1629
|
/* @__PURE__ */ t(
|
|
1629
1630
|
qr,
|
|
1630
1631
|
{
|
|
1631
1632
|
scope: "cell",
|
|
1632
|
-
icon: /* @__PURE__ */ t(
|
|
1633
|
+
icon: /* @__PURE__ */ t(Ya, {}),
|
|
1633
1634
|
label: p("editor.table.cellColor", "Cell colour"),
|
|
1634
1635
|
onOpenChange: q,
|
|
1635
1636
|
saveTableCell: u,
|
|
@@ -1640,7 +1641,7 @@ function Qa({
|
|
|
1640
1641
|
qr,
|
|
1641
1642
|
{
|
|
1642
1643
|
scope: "row",
|
|
1643
|
-
icon: /* @__PURE__ */ t(
|
|
1644
|
+
icon: /* @__PURE__ */ t(ei, {}),
|
|
1644
1645
|
label: p("editor.table.rowColor", "Row colour"),
|
|
1645
1646
|
onOpenChange: q,
|
|
1646
1647
|
saveTableCell: u,
|
|
@@ -1648,7 +1649,7 @@ function Qa({
|
|
|
1648
1649
|
}
|
|
1649
1650
|
)
|
|
1650
1651
|
] }) : d.map((z) => {
|
|
1651
|
-
const M =
|
|
1652
|
+
const M = Qi[z];
|
|
1652
1653
|
return /* @__PURE__ */ t(
|
|
1653
1654
|
j,
|
|
1654
1655
|
{
|
|
@@ -1657,7 +1658,7 @@ function Qa({
|
|
|
1657
1658
|
icon: M.icon,
|
|
1658
1659
|
tooltip: p(M.label[0], M.label[1]),
|
|
1659
1660
|
onMouseDown: (B) => B.preventDefault(),
|
|
1660
|
-
onClick: () =>
|
|
1661
|
+
onClick: () => i(M.command)
|
|
1661
1662
|
},
|
|
1662
1663
|
z
|
|
1663
1664
|
);
|
|
@@ -1671,51 +1672,51 @@ const Dn = [
|
|
|
1671
1672
|
"wysiwyg-img-inline",
|
|
1672
1673
|
"wysiwyg-img-wrap-left",
|
|
1673
1674
|
"wysiwyg-img-wrap-right"
|
|
1674
|
-
],
|
|
1675
|
+
], no = [
|
|
1675
1676
|
"wysiwyg-img-align-left",
|
|
1676
1677
|
"wysiwyg-img-align-center",
|
|
1677
1678
|
"wysiwyg-img-align-right"
|
|
1678
1679
|
];
|
|
1679
|
-
function Br(n,
|
|
1680
|
-
return
|
|
1680
|
+
function Br(n, i) {
|
|
1681
|
+
return i.find((c) => n.classList.contains(c)) ?? "";
|
|
1681
1682
|
}
|
|
1682
|
-
function
|
|
1683
|
-
const
|
|
1683
|
+
function ts(n) {
|
|
1684
|
+
const i = n.closest(".redactor-in"), c = i instanceof HTMLElement ? i.clientWidth : 0, s = n.getBoundingClientRect().width;
|
|
1684
1685
|
return c <= 0 || s <= 0 ? Nt : Math.round(Math.min(Nt, s / c * 100));
|
|
1685
1686
|
}
|
|
1686
|
-
const On = 10, Nt = 100,
|
|
1687
|
+
const On = 10, Nt = 100, ns = 5, rs = 10, Pr = (n) => Math.min(Nt, Math.max(On, Math.round(n))), os = [
|
|
1687
1688
|
{
|
|
1688
1689
|
id: "wysiwyg-img-inline",
|
|
1689
|
-
icon: /* @__PURE__ */ t(
|
|
1690
|
+
icon: /* @__PURE__ */ t(Ca, {}),
|
|
1690
1691
|
label: ["editor.image.inline", "Inline with text"]
|
|
1691
1692
|
},
|
|
1692
1693
|
{
|
|
1693
1694
|
id: "wysiwyg-img-wrap-left",
|
|
1694
|
-
icon: /* @__PURE__ */ t(
|
|
1695
|
+
icon: /* @__PURE__ */ t(oi, {}),
|
|
1695
1696
|
label: ["editor.image.wrapLeft", "Wrap left"]
|
|
1696
1697
|
},
|
|
1697
1698
|
{
|
|
1698
1699
|
id: "wysiwyg-img-wrap-right",
|
|
1699
|
-
icon: /* @__PURE__ */ t(
|
|
1700
|
+
icon: /* @__PURE__ */ t(ii, {}),
|
|
1700
1701
|
label: ["editor.image.wrapRight", "Wrap right"]
|
|
1701
1702
|
}
|
|
1702
|
-
],
|
|
1703
|
+
], as = [
|
|
1703
1704
|
{
|
|
1704
1705
|
id: "wysiwyg-img-align-left",
|
|
1705
|
-
icon: /* @__PURE__ */ t(
|
|
1706
|
+
icon: /* @__PURE__ */ t(zi, {}),
|
|
1706
1707
|
label: ["editor.image.alignLeft", "Align left"]
|
|
1707
1708
|
},
|
|
1708
1709
|
{
|
|
1709
1710
|
id: "wysiwyg-img-align-center",
|
|
1710
|
-
icon: /* @__PURE__ */ t(
|
|
1711
|
+
icon: /* @__PURE__ */ t(Ei, {}),
|
|
1711
1712
|
label: ["editor.image.alignCenter", "Align centre"]
|
|
1712
1713
|
},
|
|
1713
1714
|
{
|
|
1714
1715
|
id: "wysiwyg-img-align-right",
|
|
1715
|
-
icon: /* @__PURE__ */ t(
|
|
1716
|
+
icon: /* @__PURE__ */ t(Mi, {}),
|
|
1716
1717
|
label: ["editor.image.alignRight", "Align right"]
|
|
1717
1718
|
}
|
|
1718
|
-
],
|
|
1719
|
+
], is = [
|
|
1719
1720
|
{
|
|
1720
1721
|
id: "tl",
|
|
1721
1722
|
pos: "ds:[inset-block-start:calc(var(--spacing-md)*-0.5)] ds:[inset-inline-start:calc(var(--spacing-md)*-0.5)]",
|
|
@@ -1748,14 +1749,14 @@ const On = 10, Nt = 100, Ja = 5, es = 10, Pr = (n) => Math.min(Nt, Math.max(On,
|
|
|
1748
1749
|
labelKey: "editor.image.resizeBottomEnd",
|
|
1749
1750
|
labelFallback: "Resize image, bottom-end corner"
|
|
1750
1751
|
}
|
|
1751
|
-
],
|
|
1752
|
+
], ss = [
|
|
1752
1753
|
"ds:absolute ds:z-20 ds:pointer-events-none",
|
|
1753
1754
|
"ds:[inset-block-start:var(--rte-img-top)] ds:[inset-inline-start:var(--rte-img-start)]",
|
|
1754
1755
|
"ds:[inline-size:var(--rte-img-width)] ds:[block-size:var(--rte-img-height)]",
|
|
1755
1756
|
"ds:rounded-[var(--radius-2xs)]",
|
|
1756
1757
|
"ds:[outline-style:solid] ds:[outline-width:var(--border-width-md)]",
|
|
1757
1758
|
"ds:[outline-color:var(--accent)] ds:[outline-offset:var(--focus-ring-offset)]"
|
|
1758
|
-
].join(" "),
|
|
1759
|
+
].join(" "), ls = [
|
|
1759
1760
|
"ds:absolute ds:pointer-events-auto ds:touch-none",
|
|
1760
1761
|
"ds:[inline-size:var(--spacing-md)] ds:[block-size:var(--spacing-md)]",
|
|
1761
1762
|
"ds:rounded-[var(--radius-2xs)] ds:shadow-[var(--shadow-sm)]",
|
|
@@ -1764,21 +1765,21 @@ const On = 10, Nt = 100, Ja = 5, es = 10, Pr = (n) => Math.min(Nt, Math.max(On,
|
|
|
1764
1765
|
"ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)]",
|
|
1765
1766
|
"ds:focus-visible:[outline-offset:var(--focus-ring-offset)]",
|
|
1766
1767
|
"ds:forced-colors:bg-[CanvasText]"
|
|
1767
|
-
].join(" "),
|
|
1768
|
+
].join(" "), cs = [
|
|
1768
1769
|
"ds:absolute ds:z-20 ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]",
|
|
1769
1770
|
"ds:[inset-block-start:var(--rte-img-bar-top)] ds:[inset-inline-start:var(--rte-img-center)]",
|
|
1770
1771
|
"ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
|
|
1771
1772
|
"ds:bg-[var(--popover)] ds:p-[var(--spacing-2xs)] ds:shadow-[var(--shadow-lg)]"
|
|
1772
1773
|
].join(" ");
|
|
1773
|
-
function
|
|
1774
|
+
function ds({
|
|
1774
1775
|
areaRef: n,
|
|
1775
|
-
activeImageEl:
|
|
1776
|
+
activeImageEl: i,
|
|
1776
1777
|
applyImageClass: c,
|
|
1777
1778
|
setImageWidth: s
|
|
1778
1779
|
}) {
|
|
1779
|
-
const { t:
|
|
1780
|
-
|
|
1781
|
-
if (!
|
|
1780
|
+
const { t: g } = re("ui"), [u, m] = N(null), p = C(null);
|
|
1781
|
+
S(() => {
|
|
1782
|
+
if (!i || typeof window > "u") {
|
|
1782
1783
|
m(null);
|
|
1783
1784
|
return;
|
|
1784
1785
|
}
|
|
@@ -1788,7 +1789,7 @@ function ss({
|
|
|
1788
1789
|
m(null);
|
|
1789
1790
|
return;
|
|
1790
1791
|
}
|
|
1791
|
-
const V = B.getBoundingClientRect(), O =
|
|
1792
|
+
const V = B.getBoundingClientRect(), O = i.getBoundingClientRect(), P = getComputedStyle(B).direction === "rtl", E = O.top - V.top, U = P ? V.right - O.right : O.left - V.left, F = U + O.width / 2, Q = Math.max(0, E - 44);
|
|
1792
1793
|
m({
|
|
1793
1794
|
top: E,
|
|
1794
1795
|
start: Math.max(0, U),
|
|
@@ -1796,16 +1797,16 @@ function ss({
|
|
|
1796
1797
|
height: O.height,
|
|
1797
1798
|
center: Math.max(0, F),
|
|
1798
1799
|
barTop: Q,
|
|
1799
|
-
pct:
|
|
1800
|
+
pct: ts(i),
|
|
1800
1801
|
rtl: P
|
|
1801
1802
|
});
|
|
1802
1803
|
};
|
|
1803
1804
|
f();
|
|
1804
1805
|
const d = new ResizeObserver(f);
|
|
1805
|
-
d.observe(
|
|
1806
|
-
const
|
|
1807
|
-
|
|
1808
|
-
const z =
|
|
1806
|
+
d.observe(i);
|
|
1807
|
+
const h = n.current;
|
|
1808
|
+
h && d.observe(h);
|
|
1809
|
+
const z = i.closest(".redactor-in");
|
|
1809
1810
|
let M = null;
|
|
1810
1811
|
return z && (M = new MutationObserver(f), M.observe(z, {
|
|
1811
1812
|
subtree: !0,
|
|
@@ -1816,7 +1817,7 @@ function ss({
|
|
|
1816
1817
|
})), window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
|
|
1817
1818
|
d.disconnect(), M == null || M.disconnect(), window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
|
|
1818
1819
|
};
|
|
1819
|
-
}, [
|
|
1820
|
+
}, [i, n]);
|
|
1820
1821
|
const y = v(
|
|
1821
1822
|
(f) => (d) => {
|
|
1822
1823
|
!d.isPrimary || !u || (d.preventDefault(), d.currentTarget.setPointerCapture(d.pointerId), p.current = {
|
|
@@ -1830,34 +1831,34 @@ function ss({
|
|
|
1830
1831
|
), k = v(
|
|
1831
1832
|
(f) => {
|
|
1832
1833
|
const d = p.current;
|
|
1833
|
-
if (!d || f.pointerId !== d.pointerId || !
|
|
1834
|
-
const
|
|
1834
|
+
if (!d || f.pointerId !== d.pointerId || !i) return;
|
|
1835
|
+
const h = i.closest(".redactor-in"), z = h instanceof HTMLElement ? h.clientWidth : 0;
|
|
1835
1836
|
if (z <= 0) return;
|
|
1836
1837
|
const M = d.sign * (f.clientX - d.startX) / z * 100;
|
|
1837
1838
|
s(Pr(d.startPct + M));
|
|
1838
1839
|
},
|
|
1839
|
-
[
|
|
1840
|
+
[i, s]
|
|
1840
1841
|
), w = v(
|
|
1841
1842
|
(f) => {
|
|
1842
1843
|
const d = p.current;
|
|
1843
1844
|
!d || f.pointerId !== d.pointerId || (f.currentTarget.releasePointerCapture(f.pointerId), p.current = null);
|
|
1844
1845
|
},
|
|
1845
1846
|
[]
|
|
1846
|
-
),
|
|
1847
|
+
), L = v(
|
|
1847
1848
|
(f) => {
|
|
1848
1849
|
if (!u) return;
|
|
1849
1850
|
let d = null;
|
|
1850
|
-
const
|
|
1851
|
+
const h = f.shiftKey ? rs : ns;
|
|
1851
1852
|
switch (f.key) {
|
|
1852
1853
|
// Up / right always grow; down / left always shrink — independent of
|
|
1853
1854
|
// which corner has focus, so the gesture reads the same everywhere.
|
|
1854
1855
|
case "ArrowRight":
|
|
1855
1856
|
case "ArrowUp":
|
|
1856
|
-
d = u.pct +
|
|
1857
|
+
d = u.pct + h;
|
|
1857
1858
|
break;
|
|
1858
1859
|
case "ArrowLeft":
|
|
1859
1860
|
case "ArrowDown":
|
|
1860
|
-
d = u.pct -
|
|
1861
|
+
d = u.pct - h;
|
|
1861
1862
|
break;
|
|
1862
1863
|
case "Home":
|
|
1863
1864
|
d = On;
|
|
@@ -1872,8 +1873,8 @@ function ss({
|
|
|
1872
1873
|
},
|
|
1873
1874
|
[u, s]
|
|
1874
1875
|
);
|
|
1875
|
-
if (!
|
|
1876
|
-
const T = Br(
|
|
1876
|
+
if (!i || !u) return null;
|
|
1877
|
+
const T = Br(i, Dn), _ = Br(i, no), q = g("editor.image.widthAnnounce", {
|
|
1877
1878
|
width: u.pct,
|
|
1878
1879
|
defaultValue: "{{width}} percent"
|
|
1879
1880
|
});
|
|
@@ -1881,30 +1882,30 @@ function ss({
|
|
|
1881
1882
|
/* @__PURE__ */ t(
|
|
1882
1883
|
"div",
|
|
1883
1884
|
{
|
|
1884
|
-
className:
|
|
1885
|
+
className: ss,
|
|
1885
1886
|
style: {
|
|
1886
1887
|
"--rte-img-top": `${u.top}px`,
|
|
1887
1888
|
"--rte-img-start": `${u.start}px`,
|
|
1888
1889
|
"--rte-img-width": `${u.width}px`,
|
|
1889
1890
|
"--rte-img-height": `${u.height}px`
|
|
1890
1891
|
},
|
|
1891
|
-
children:
|
|
1892
|
+
children: is.map((f) => /* @__PURE__ */ t(
|
|
1892
1893
|
"div",
|
|
1893
1894
|
{
|
|
1894
1895
|
role: "slider",
|
|
1895
1896
|
tabIndex: 0,
|
|
1896
|
-
"aria-label":
|
|
1897
|
+
"aria-label": g(f.labelKey, f.labelFallback),
|
|
1897
1898
|
"aria-orientation": "horizontal",
|
|
1898
1899
|
"aria-valuemin": On,
|
|
1899
1900
|
"aria-valuemax": Nt,
|
|
1900
1901
|
"aria-valuenow": u.pct,
|
|
1901
1902
|
"aria-valuetext": q,
|
|
1902
|
-
className: `${
|
|
1903
|
+
className: `${ls} ${f.pos} ${f.cursor}`,
|
|
1903
1904
|
onPointerDown: y(f),
|
|
1904
1905
|
onPointerMove: k,
|
|
1905
1906
|
onPointerUp: w,
|
|
1906
1907
|
onPointerCancel: w,
|
|
1907
|
-
onKeyDown:
|
|
1908
|
+
onKeyDown: L
|
|
1908
1909
|
},
|
|
1909
1910
|
f.id
|
|
1910
1911
|
))
|
|
@@ -1914,28 +1915,28 @@ function ss({
|
|
|
1914
1915
|
"div",
|
|
1915
1916
|
{
|
|
1916
1917
|
role: "group",
|
|
1917
|
-
"aria-label":
|
|
1918
|
-
className: `${
|
|
1918
|
+
"aria-label": g("editor.image.toolbar", "Image tools"),
|
|
1919
|
+
className: `${cs} ${u.rtl ? "ds:translate-x-1/2" : "ds:-translate-x-1/2"}`,
|
|
1919
1920
|
style: {
|
|
1920
1921
|
"--rte-img-bar-top": `${u.barTop}px`,
|
|
1921
1922
|
"--rte-img-center": `${u.center}px`
|
|
1922
1923
|
},
|
|
1923
|
-
children: [
|
|
1924
|
+
children: [os, as].map((f, d) => /* @__PURE__ */ A(ht, { children: [
|
|
1924
1925
|
d > 0 ? /* @__PURE__ */ t("span", { "aria-hidden": "true", className: nn }) : null,
|
|
1925
|
-
f.map((
|
|
1926
|
-
const z = d === 0 ? T ===
|
|
1926
|
+
f.map((h) => {
|
|
1927
|
+
const z = d === 0 ? T === h.id : _ === h.id;
|
|
1927
1928
|
return /* @__PURE__ */ t(
|
|
1928
1929
|
j,
|
|
1929
1930
|
{
|
|
1930
1931
|
size: "sm",
|
|
1931
1932
|
intent: "ghost",
|
|
1932
|
-
icon:
|
|
1933
|
+
icon: h.icon,
|
|
1933
1934
|
"aria-pressed": z,
|
|
1934
|
-
tooltip: h
|
|
1935
|
+
tooltip: g(h.label[0], h.label[1]),
|
|
1935
1936
|
onMouseDown: (M) => M.preventDefault(),
|
|
1936
|
-
onClick: () => c(
|
|
1937
|
+
onClick: () => c(h.id)
|
|
1937
1938
|
},
|
|
1938
|
-
|
|
1939
|
+
h.id
|
|
1939
1940
|
);
|
|
1940
1941
|
})
|
|
1941
1942
|
] }, d === 0 ? "flow" : "align"))
|
|
@@ -1943,17 +1944,17 @@ function ss({
|
|
|
1943
1944
|
) })
|
|
1944
1945
|
] });
|
|
1945
1946
|
}
|
|
1946
|
-
function
|
|
1947
|
+
function us({
|
|
1947
1948
|
templates: n,
|
|
1948
|
-
onPick:
|
|
1949
|
+
onPick: i,
|
|
1949
1950
|
onManage: c,
|
|
1950
1951
|
noteEmpty: s,
|
|
1951
|
-
onOpenChange:
|
|
1952
|
+
onOpenChange: g,
|
|
1952
1953
|
trigger: u,
|
|
1953
1954
|
side: m = "top"
|
|
1954
1955
|
}) {
|
|
1955
1956
|
const { t: p } = re("ui"), y = qe();
|
|
1956
|
-
return /* @__PURE__ */ A(X.Root, { onOpenChange:
|
|
1957
|
+
return /* @__PURE__ */ A(X.Root, { onOpenChange: g, children: [
|
|
1957
1958
|
/* @__PURE__ */ t(X.Trigger, { asChild: !0, children: u }),
|
|
1958
1959
|
/* @__PURE__ */ A(X.Content, { side: m, align: "end", sideOffset: 8, children: [
|
|
1959
1960
|
/* @__PURE__ */ t(X.Label, { children: n.length > 0 ? p("editor.ai.templatesGroup") : p("editor.ai.noTemplates") }),
|
|
@@ -1970,7 +1971,7 @@ function ls({
|
|
|
1970
1971
|
w.preventDefault();
|
|
1971
1972
|
return;
|
|
1972
1973
|
}
|
|
1973
|
-
|
|
1974
|
+
i(k);
|
|
1974
1975
|
},
|
|
1975
1976
|
children: k.name
|
|
1976
1977
|
},
|
|
@@ -1987,7 +1988,7 @@ function ls({
|
|
|
1987
1988
|
c && n.length === 0 ? /* @__PURE__ */ t(
|
|
1988
1989
|
X.Item,
|
|
1989
1990
|
{
|
|
1990
|
-
startIcon: /* @__PURE__ */ t(
|
|
1991
|
+
startIcon: /* @__PURE__ */ t(ba, {}),
|
|
1991
1992
|
onSelect: () => c("create"),
|
|
1992
1993
|
children: p("editor.ai.createFirstTemplate")
|
|
1993
1994
|
}
|
|
@@ -1997,7 +1998,7 @@ function ls({
|
|
|
1997
1998
|
/* @__PURE__ */ t(
|
|
1998
1999
|
X.Item,
|
|
1999
2000
|
{
|
|
2000
|
-
startIcon: /* @__PURE__ */ t(
|
|
2001
|
+
startIcon: /* @__PURE__ */ t(va, {}),
|
|
2001
2002
|
onSelect: () => c("list"),
|
|
2002
2003
|
children: p("editor.ai.manageTemplates")
|
|
2003
2004
|
}
|
|
@@ -2006,34 +2007,34 @@ function ls({
|
|
|
2006
2007
|
] })
|
|
2007
2008
|
] });
|
|
2008
2009
|
}
|
|
2009
|
-
const
|
|
2010
|
+
const ms = [
|
|
2010
2011
|
"ds:absolute ds:z-20 ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]",
|
|
2011
2012
|
"ds:[inset-block-start:var(--rte-sel-top)] ds:[inset-inline-start:var(--rte-sel-start)]",
|
|
2012
2013
|
"ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
|
|
2013
2014
|
"ds:bg-[var(--popover)] ds:p-[var(--spacing-2xs)] ds:shadow-[var(--shadow-lg)]",
|
|
2014
|
-
|
|
2015
|
-
].join(" "),
|
|
2016
|
-
function
|
|
2015
|
+
to
|
|
2016
|
+
].join(" "), fs = ["bold", "italic", "underline", "strike"];
|
|
2017
|
+
function hs({
|
|
2017
2018
|
active: n,
|
|
2018
|
-
run:
|
|
2019
|
+
run: i,
|
|
2019
2020
|
areaRef: c,
|
|
2020
2021
|
getEditorRoot: s,
|
|
2021
|
-
suppressed:
|
|
2022
|
+
suppressed: g = !1,
|
|
2022
2023
|
holdOpen: u = !1,
|
|
2023
2024
|
children: m
|
|
2024
2025
|
}) {
|
|
2025
|
-
const { t: p } = re("ui"), y = C(null), [k, w] = N(null),
|
|
2026
|
-
return
|
|
2027
|
-
|
|
2028
|
-
}, [u]),
|
|
2029
|
-
if (
|
|
2026
|
+
const { t: p } = re("ui"), y = C(null), [k, w] = N(null), L = C(u);
|
|
2027
|
+
return S(() => {
|
|
2028
|
+
L.current = u;
|
|
2029
|
+
}, [u]), S(() => {
|
|
2030
|
+
if (g || typeof window > "u") {
|
|
2030
2031
|
w(null);
|
|
2031
2032
|
return;
|
|
2032
2033
|
}
|
|
2033
|
-
let T = !1,
|
|
2034
|
+
let T = !1, _ = 0, q = !1, f = !1;
|
|
2034
2035
|
const d = () => {
|
|
2035
2036
|
var J;
|
|
2036
|
-
if (
|
|
2037
|
+
if (L.current || T) return;
|
|
2037
2038
|
if (f) {
|
|
2038
2039
|
w(null);
|
|
2039
2040
|
return;
|
|
@@ -2056,49 +2057,49 @@ function us({
|
|
|
2056
2057
|
Math.max(oe, R),
|
|
2057
2058
|
Math.max(R, F.width - R)
|
|
2058
2059
|
);
|
|
2059
|
-
w({ top: Ne, start: K, rtl: pe }), G === 0 && !q && (q = !0,
|
|
2060
|
-
},
|
|
2061
|
-
cancelAnimationFrame(
|
|
2060
|
+
w({ top: Ne, start: K, rtl: pe }), G === 0 && !q && (q = !0, _ = requestAnimationFrame(d));
|
|
2061
|
+
}, h = () => {
|
|
2062
|
+
cancelAnimationFrame(_), _ = requestAnimationFrame(d);
|
|
2062
2063
|
}, z = (O) => {
|
|
2063
2064
|
const P = s();
|
|
2064
2065
|
P && O.target instanceof Node && P.contains(O.target) && (T = !0, w(null));
|
|
2065
2066
|
}, M = () => {
|
|
2066
|
-
T && (T = !1,
|
|
2067
|
+
T && (T = !1, h());
|
|
2067
2068
|
}, B = (O) => {
|
|
2068
2069
|
if (O.key !== "Escape") return;
|
|
2069
2070
|
const P = c.current;
|
|
2070
2071
|
!P || !P.contains(document.activeElement) || (f = !0, w(null));
|
|
2071
2072
|
}, V = () => {
|
|
2072
|
-
f = !1,
|
|
2073
|
+
f = !1, h();
|
|
2073
2074
|
};
|
|
2074
|
-
return document.addEventListener("selectionchange", V), document.addEventListener("focusin",
|
|
2075
|
-
cancelAnimationFrame(
|
|
2075
|
+
return document.addEventListener("selectionchange", V), document.addEventListener("focusin", h), document.addEventListener("keydown", B, !0), document.addEventListener("pointerdown", z, !0), document.addEventListener("pointerup", M, !0), document.addEventListener("pointercancel", M, !0), window.addEventListener("scroll", h, !0), window.addEventListener("resize", h), h(), () => {
|
|
2076
|
+
cancelAnimationFrame(_), document.removeEventListener("selectionchange", V), document.removeEventListener("focusin", h), document.removeEventListener("keydown", B, !0), document.removeEventListener("pointerdown", z, !0), document.removeEventListener("pointerup", M, !0), document.removeEventListener("pointercancel", M, !0), window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", h);
|
|
2076
2077
|
};
|
|
2077
|
-
}, [
|
|
2078
|
+
}, [g, c, s]), g || !k ? null : /* @__PURE__ */ t(Fn, { children: /* @__PURE__ */ A(
|
|
2078
2079
|
"div",
|
|
2079
2080
|
{
|
|
2080
2081
|
ref: y,
|
|
2081
2082
|
role: "group",
|
|
2082
2083
|
"aria-label": p("editor.ai.selectionTools"),
|
|
2083
2084
|
"data-component-part": "selection-toolbar",
|
|
2084
|
-
className: `${
|
|
2085
|
+
className: `${ms} ${k.rtl ? "ds:translate-x-1/2" : "ds:-translate-x-1/2"}`,
|
|
2085
2086
|
style: {
|
|
2086
2087
|
"--rte-sel-top": `${k.top}px`,
|
|
2087
2088
|
"--rte-sel-start": `${k.start}px`
|
|
2088
2089
|
},
|
|
2089
2090
|
children: [
|
|
2090
|
-
|
|
2091
|
-
const
|
|
2091
|
+
fs.map((T) => {
|
|
2092
|
+
const _ = Jr[T];
|
|
2092
2093
|
return /* @__PURE__ */ t(
|
|
2093
2094
|
j,
|
|
2094
2095
|
{
|
|
2095
2096
|
size: "sm",
|
|
2096
2097
|
intent: "ghost",
|
|
2097
|
-
icon:
|
|
2098
|
-
tooltip: p(
|
|
2099
|
-
"aria-pressed":
|
|
2098
|
+
icon: _.icon,
|
|
2099
|
+
tooltip: p(_.label[0], _.label[1]),
|
|
2100
|
+
"aria-pressed": _.toggle ? n.has(_.toggle) : void 0,
|
|
2100
2101
|
onMouseDown: (q) => q.preventDefault(),
|
|
2101
|
-
onClick: () =>
|
|
2102
|
+
onClick: () => i(..._.command)
|
|
2102
2103
|
},
|
|
2103
2104
|
T
|
|
2104
2105
|
);
|
|
@@ -2111,36 +2112,36 @@ function us({
|
|
|
2111
2112
|
}
|
|
2112
2113
|
) });
|
|
2113
2114
|
}
|
|
2114
|
-
function
|
|
2115
|
+
function gs({
|
|
2115
2116
|
run: n,
|
|
2116
|
-
active:
|
|
2117
|
+
active: i,
|
|
2117
2118
|
preset: c,
|
|
2118
2119
|
insertHtml: s,
|
|
2119
|
-
insertTable:
|
|
2120
|
+
insertTable: g,
|
|
2120
2121
|
saveSelection: u,
|
|
2121
2122
|
restoreSelection: m,
|
|
2122
2123
|
getSelectedText: p,
|
|
2123
2124
|
uploadImage: y,
|
|
2124
2125
|
enableColor: k = !1,
|
|
2125
2126
|
enableImage: w = !1,
|
|
2126
|
-
enableTable:
|
|
2127
|
+
enableTable: L = !1,
|
|
2127
2128
|
showExtensions: T = !1,
|
|
2128
|
-
extensionControl:
|
|
2129
|
+
extensionControl: _,
|
|
2129
2130
|
variables: q,
|
|
2130
2131
|
recentVariableTokens: f,
|
|
2131
2132
|
insertVariable: d
|
|
2132
2133
|
}) {
|
|
2133
|
-
const { t:
|
|
2134
|
+
const { t: h } = re("ui"), z = (oe) => oe.preventDefault(), M = (oe) => Bi[c].includes(oe), B = (oe) => {
|
|
2134
2135
|
if (!M(oe)) return null;
|
|
2135
|
-
const R =
|
|
2136
|
+
const R = Jr[oe];
|
|
2136
2137
|
return /* @__PURE__ */ t(
|
|
2137
2138
|
j,
|
|
2138
2139
|
{
|
|
2139
2140
|
size: "sm",
|
|
2140
2141
|
intent: "ghost",
|
|
2141
2142
|
icon: R.icon,
|
|
2142
|
-
"aria-label":
|
|
2143
|
-
"aria-pressed": R.toggle ?
|
|
2143
|
+
"aria-label": h(R.label[0], R.label[1]),
|
|
2144
|
+
"aria-pressed": R.toggle ? i.has(R.toggle) : void 0,
|
|
2144
2145
|
onMouseDown: z,
|
|
2145
2146
|
onClick: () => n(...R.command)
|
|
2146
2147
|
},
|
|
@@ -2152,7 +2153,7 @@ function ms({
|
|
|
2152
2153
|
B("underline"),
|
|
2153
2154
|
B("strike"),
|
|
2154
2155
|
k ? /* @__PURE__ */ t(
|
|
2155
|
-
|
|
2156
|
+
Wi,
|
|
2156
2157
|
{
|
|
2157
2158
|
run: n,
|
|
2158
2159
|
saveSelection: u,
|
|
@@ -2161,7 +2162,7 @@ function ms({
|
|
|
2161
2162
|
"colour"
|
|
2162
2163
|
) : null,
|
|
2163
2164
|
k ? /* @__PURE__ */ t(
|
|
2164
|
-
|
|
2165
|
+
Xi,
|
|
2165
2166
|
{
|
|
2166
2167
|
run: n,
|
|
2167
2168
|
saveSelection: u,
|
|
@@ -2171,7 +2172,7 @@ function ms({
|
|
|
2171
2172
|
) : null
|
|
2172
2173
|
].filter(Boolean), U = P.length > 0 || O || E.length > 0, F = [B("ul"), B("ol")].filter(Boolean), Q = [
|
|
2173
2174
|
M("link") ? /* @__PURE__ */ t(
|
|
2174
|
-
|
|
2175
|
+
Ki,
|
|
2175
2176
|
{
|
|
2176
2177
|
insertHtml: s,
|
|
2177
2178
|
saveSelection: u,
|
|
@@ -2181,7 +2182,7 @@ function ms({
|
|
|
2181
2182
|
"link"
|
|
2182
2183
|
) : null,
|
|
2183
2184
|
w ? /* @__PURE__ */ t(
|
|
2184
|
-
|
|
2185
|
+
Vi,
|
|
2185
2186
|
{
|
|
2186
2187
|
insertHtml: s,
|
|
2187
2188
|
saveSelection: u,
|
|
@@ -2190,17 +2191,17 @@ function ms({
|
|
|
2190
2191
|
},
|
|
2191
2192
|
"image"
|
|
2192
2193
|
) : null,
|
|
2193
|
-
|
|
2194
|
-
|
|
2194
|
+
L ? /* @__PURE__ */ t(
|
|
2195
|
+
Zi,
|
|
2195
2196
|
{
|
|
2196
2197
|
run: n,
|
|
2197
|
-
insertTable:
|
|
2198
|
-
active:
|
|
2198
|
+
insertTable: g,
|
|
2199
|
+
active: i
|
|
2199
2200
|
},
|
|
2200
2201
|
"table"
|
|
2201
2202
|
) : null,
|
|
2202
2203
|
q && q.length > 0 && d ? /* @__PURE__ */ t(
|
|
2203
|
-
|
|
2204
|
+
ji,
|
|
2204
2205
|
{
|
|
2205
2206
|
variables: q,
|
|
2206
2207
|
recentVariableTokens: f,
|
|
@@ -2209,14 +2210,14 @@ function ms({
|
|
|
2209
2210
|
},
|
|
2210
2211
|
"variables"
|
|
2211
2212
|
) : null
|
|
2212
|
-
].filter(Boolean), pe =
|
|
2213
|
+
].filter(Boolean), pe = _ ? [/* @__PURE__ */ t(ht, { children: _ }, "extensions")] : T ? [
|
|
2213
2214
|
/* @__PURE__ */ t(
|
|
2214
2215
|
j,
|
|
2215
2216
|
{
|
|
2216
2217
|
size: "sm",
|
|
2217
2218
|
intent: "ghost",
|
|
2218
2219
|
icon: /* @__PURE__ */ t($n, {}),
|
|
2219
|
-
"aria-label":
|
|
2220
|
+
"aria-label": h("editor.extensions", "Editor extensions"),
|
|
2220
2221
|
disabled: !0,
|
|
2221
2222
|
onMouseDown: z
|
|
2222
2223
|
},
|
|
@@ -2224,7 +2225,7 @@ function ms({
|
|
|
2224
2225
|
)
|
|
2225
2226
|
] : [], Y = [F, Q, pe].filter(
|
|
2226
2227
|
(oe) => oe.length > 0
|
|
2227
|
-
), Ne = Y.length > 0, G = (oe) => Y.map((R, K) => /* @__PURE__ */ A(
|
|
2228
|
+
), Ne = Y.length > 0, G = (oe) => Y.map((R, K) => /* @__PURE__ */ A(ht, { children: [
|
|
2228
2229
|
K > 0 || oe ? /* @__PURE__ */ t(V, {}) : null,
|
|
2229
2230
|
R
|
|
2230
2231
|
] }, K));
|
|
@@ -2232,16 +2233,16 @@ function ms({
|
|
|
2232
2233
|
// Outer element is the query container + visual chrome; the flex row is an
|
|
2233
2234
|
// inner child so `container-type` never lands on the flex parent (which
|
|
2234
2235
|
// would blockify the inline controls).
|
|
2235
|
-
/* @__PURE__ */ t("div", { className:
|
|
2236
|
+
/* @__PURE__ */ t("div", { className: Pi(), "data-component": "editor-toolbar", children: /* @__PURE__ */ A(
|
|
2236
2237
|
"div",
|
|
2237
2238
|
{
|
|
2238
2239
|
role: "group",
|
|
2239
|
-
"aria-label":
|
|
2240
|
-
className:
|
|
2240
|
+
"aria-label": h("editor.toolbarLabel"),
|
|
2241
|
+
className: Fi,
|
|
2241
2242
|
children: [
|
|
2242
2243
|
P,
|
|
2243
2244
|
P.length > 0 && (O || E.length > 0) ? /* @__PURE__ */ t(V, {}) : null,
|
|
2244
|
-
O ? /* @__PURE__ */ t(
|
|
2245
|
+
O ? /* @__PURE__ */ t(Gi, { run: n, active: i, onTriggerDown: z }) : null,
|
|
2245
2246
|
O && E.length > 0 ? /* @__PURE__ */ t(V, {}) : null,
|
|
2246
2247
|
E,
|
|
2247
2248
|
Ne ? /* @__PURE__ */ A(Ie, { children: [
|
|
@@ -2254,8 +2255,8 @@ function ms({
|
|
|
2254
2255
|
{
|
|
2255
2256
|
size: "sm",
|
|
2256
2257
|
intent: "ghost",
|
|
2257
|
-
icon: /* @__PURE__ */ t(
|
|
2258
|
-
"aria-label":
|
|
2258
|
+
icon: /* @__PURE__ */ t(fa, {}),
|
|
2259
|
+
"aria-label": h("editor.more", "More options"),
|
|
2259
2260
|
onMouseDown: z
|
|
2260
2261
|
}
|
|
2261
2262
|
) }),
|
|
@@ -2272,11 +2273,11 @@ function xe(n) {
|
|
|
2272
2273
|
return Jo(n, "rich-text");
|
|
2273
2274
|
}
|
|
2274
2275
|
function Yt(n = "") {
|
|
2275
|
-
const
|
|
2276
|
-
if (
|
|
2276
|
+
const i = String(n).trim();
|
|
2277
|
+
if (i === "" || i === "<p><br></p>" || i === "<p> </p>")
|
|
2277
2278
|
return "";
|
|
2278
|
-
const c =
|
|
2279
|
-
return c === "" && /<img\b[^>]*>/i.test(
|
|
2279
|
+
const c = i.replace(/<br\s*\/?>/gi, "").replace(/ /gi, "").replace(/<[^>]+>/g, "").trim();
|
|
2280
|
+
return c === "" && /<img\b[^>]*>/i.test(i) ? i : c === "" ? "" : i;
|
|
2280
2281
|
}
|
|
2281
2282
|
function Fr(n) {
|
|
2282
2283
|
return n.replace(
|
|
@@ -2284,110 +2285,110 @@ function Fr(n) {
|
|
|
2284
2285
|
'<img loading="lazy"$1>'
|
|
2285
2286
|
);
|
|
2286
2287
|
}
|
|
2287
|
-
const
|
|
2288
|
+
const Sn = /^[A-Za-z0-9_]+$/, ro = /\[\[([A-Za-z0-9_]+)\]\]/g, qn = "rte-variable-invalid", ps = new RegExp(
|
|
2288
2289
|
`\\s*\\b${qn}\\b`,
|
|
2289
2290
|
"g"
|
|
2290
2291
|
);
|
|
2291
2292
|
function jr(n) {
|
|
2292
2293
|
return n.includes('data-redactor-type="variable"') ? n.replace(
|
|
2293
2294
|
/<span\b[^>]*data-redactor-type="variable"[^>]*>/g,
|
|
2294
|
-
(
|
|
2295
|
+
(i) => i.replace(/\s(?:data-label|title)="[^"]*"/g, "").replace(ps, "").replace(/\sclass=""/g, "")
|
|
2295
2296
|
) : n;
|
|
2296
2297
|
}
|
|
2297
|
-
function
|
|
2298
|
-
const
|
|
2299
|
-
return Array.from(
|
|
2298
|
+
function bs(n) {
|
|
2299
|
+
const i = n.replace(/<[^>]*>/g, " ");
|
|
2300
|
+
return Array.from(i.matchAll(ro), (c) => c[1]);
|
|
2300
2301
|
}
|
|
2301
2302
|
function Gr(n) {
|
|
2302
2303
|
return typeof n == "object" && n !== null && "name" in n && n.name === "AiCreditsExhaustedError";
|
|
2303
2304
|
}
|
|
2304
|
-
function
|
|
2305
|
+
function vs(n) {
|
|
2305
2306
|
return typeof n == "object" && n !== null && "name" in n && n.name === "AbortError";
|
|
2306
2307
|
}
|
|
2307
|
-
function
|
|
2308
|
-
const
|
|
2309
|
-
return
|
|
2308
|
+
function ys(n) {
|
|
2309
|
+
const i = document.createElement("template");
|
|
2310
|
+
return i.content.appendChild(n), i.innerHTML;
|
|
2310
2311
|
}
|
|
2311
2312
|
function Kr(n) {
|
|
2312
|
-
const
|
|
2313
|
-
return
|
|
2313
|
+
const i = document.createElement("template");
|
|
2314
|
+
return i.innerHTML = n, (i.content.textContent ?? "").replace(/\s+/g, " ").trim();
|
|
2314
2315
|
}
|
|
2315
2316
|
function Vr(n) {
|
|
2316
2317
|
return n.replace(/<[^>]*>/g, "").replace(/ /gi, "").replace(/[\s\u200B\uFEFF]+/g, "");
|
|
2317
2318
|
}
|
|
2318
|
-
function
|
|
2319
|
-
const
|
|
2320
|
-
if (!
|
|
2321
|
-
const c =
|
|
2319
|
+
function ws(n) {
|
|
2320
|
+
const i = window.getSelection();
|
|
2321
|
+
if (!i || i.rangeCount === 0) return null;
|
|
2322
|
+
const c = i.getRangeAt(0);
|
|
2322
2323
|
if (!n.contains(c.startContainer)) return null;
|
|
2323
2324
|
const s = document.createRange();
|
|
2324
2325
|
return s.selectNodeContents(n), s.setEnd(c.startContainer, c.startOffset), s.toString().length;
|
|
2325
2326
|
}
|
|
2326
|
-
function
|
|
2327
|
+
function ks(n, i) {
|
|
2327
2328
|
var u;
|
|
2328
2329
|
const c = window.getSelection();
|
|
2329
2330
|
if (!c) return;
|
|
2330
2331
|
const s = document.createTreeWalker(n, NodeFilter.SHOW_TEXT);
|
|
2331
|
-
let
|
|
2332
|
+
let g = 0;
|
|
2332
2333
|
for (let m = s.nextNode(); m; m = s.nextNode()) {
|
|
2333
2334
|
const p = m;
|
|
2334
|
-
if (
|
|
2335
|
+
if (g + p.data.length >= i) {
|
|
2335
2336
|
const y = document.createRange(), k = (u = p.parentElement) == null ? void 0 : u.closest(
|
|
2336
2337
|
'[data-redactor-type="variable"]'
|
|
2337
2338
|
);
|
|
2338
|
-
k ? y.setStartAfter(k) : y.setStart(p,
|
|
2339
|
+
k ? y.setStartAfter(k) : y.setStart(p, i - g), y.collapse(!0), c.removeAllRanges(), c.addRange(y);
|
|
2339
2340
|
return;
|
|
2340
2341
|
}
|
|
2341
|
-
|
|
2342
|
+
g += p.data.length;
|
|
2342
2343
|
}
|
|
2343
2344
|
}
|
|
2344
2345
|
function Wr(n) {
|
|
2345
2346
|
return `<span data-redactor-type="variable">[[${n}]]</span>`;
|
|
2346
2347
|
}
|
|
2347
|
-
function mt(n,
|
|
2348
|
+
function mt(n, i) {
|
|
2348
2349
|
var m;
|
|
2349
|
-
if (
|
|
2350
|
+
if (i.size === 0 || !n.includes("[[") || typeof DOMParser > "u")
|
|
2350
2351
|
return n;
|
|
2351
2352
|
const c = new DOMParser().parseFromString(
|
|
2352
2353
|
`<body>${n}</body>`,
|
|
2353
2354
|
"text/html"
|
|
2354
|
-
), s = c.createTreeWalker(c.body, NodeFilter.SHOW_TEXT),
|
|
2355
|
+
), s = c.createTreeWalker(c.body, NodeFilter.SHOW_TEXT), g = [];
|
|
2355
2356
|
for (let p = s.nextNode(); p; p = s.nextNode()) {
|
|
2356
2357
|
const y = p;
|
|
2357
|
-
(m = y.parentElement) != null && m.closest('[data-redactor-type="variable"]') || y.data.includes("[[") &&
|
|
2358
|
+
(m = y.parentElement) != null && m.closest('[data-redactor-type="variable"]') || y.data.includes("[[") && g.push(y);
|
|
2358
2359
|
}
|
|
2359
2360
|
let u = !1;
|
|
2360
|
-
for (const p of
|
|
2361
|
+
for (const p of g) {
|
|
2361
2362
|
const y = c.createDocumentFragment();
|
|
2362
2363
|
let k = 0;
|
|
2363
|
-
for (const w of p.data.matchAll(
|
|
2364
|
-
const
|
|
2365
|
-
if (!
|
|
2364
|
+
for (const w of p.data.matchAll(ro)) {
|
|
2365
|
+
const L = i.get(w[1].toLowerCase());
|
|
2366
|
+
if (!L || w.index === void 0) continue;
|
|
2366
2367
|
y.append(p.data.slice(k, w.index));
|
|
2367
2368
|
const T = c.createElement("span");
|
|
2368
|
-
T.setAttribute("data-redactor-type", "variable"), T.textContent = `[[${
|
|
2369
|
+
T.setAttribute("data-redactor-type", "variable"), T.textContent = `[[${L}]]`, y.append(T), k = w.index + w[0].length;
|
|
2369
2370
|
}
|
|
2370
2371
|
k !== 0 && (y.append(p.data.slice(k)), p.replaceWith(y), u = !0);
|
|
2371
2372
|
}
|
|
2372
2373
|
return u ? c.body.innerHTML : n;
|
|
2373
2374
|
}
|
|
2374
|
-
function
|
|
2375
|
+
function xs(n) {
|
|
2375
2376
|
if (!n || typeof n != "object") return;
|
|
2376
|
-
const
|
|
2377
|
+
const i = n, c = (s) => {
|
|
2377
2378
|
if (s && typeof s == "object" && "url" in s) {
|
|
2378
|
-
const
|
|
2379
|
-
return typeof
|
|
2379
|
+
const g = s.url;
|
|
2380
|
+
return typeof g == "string" ? g : void 0;
|
|
2380
2381
|
}
|
|
2381
2382
|
};
|
|
2382
|
-
return typeof
|
|
2383
|
+
return typeof i.url == "string" ? i.url : c(i.file) ?? c(i.data) ?? Object.values(i).map(c).find(Boolean);
|
|
2383
2384
|
}
|
|
2384
|
-
function
|
|
2385
|
+
function Cs(n) {
|
|
2385
2386
|
if (n) return n;
|
|
2386
2387
|
if (typeof window > "u") return null;
|
|
2387
|
-
const
|
|
2388
|
-
return
|
|
2388
|
+
const i = window;
|
|
2389
|
+
return i.$R ?? i.Redactor ?? null;
|
|
2389
2390
|
}
|
|
2390
|
-
const
|
|
2391
|
+
const As = {
|
|
2391
2392
|
bold: ["module.inline.format", { tag: "b" }],
|
|
2392
2393
|
italic: ["module.inline.format", { tag: "i" }],
|
|
2393
2394
|
strikethrough: ["module.inline.format", { tag: "del" }],
|
|
@@ -2396,23 +2397,23 @@ const ks = {
|
|
|
2396
2397
|
heading: ["module.block.format", { tag: "h2" }],
|
|
2397
2398
|
quote: ["module.block.format", { tag: "blockquote" }],
|
|
2398
2399
|
paragraph: ["module.block.format", { tag: "p" }]
|
|
2399
|
-
},
|
|
2400
|
+
}, Ts = {
|
|
2400
2401
|
zh: "zh_cn",
|
|
2401
2402
|
pt: "pt_br"
|
|
2402
2403
|
};
|
|
2403
|
-
function
|
|
2404
|
-
const
|
|
2405
|
-
return
|
|
2404
|
+
function Es(n) {
|
|
2405
|
+
const i = n.split("-")[0];
|
|
2406
|
+
return Ts[i] ?? i ?? "en";
|
|
2406
2407
|
}
|
|
2407
|
-
const
|
|
2408
|
+
const Ns = Bn(
|
|
2408
2409
|
"redactor-theme-alfadocs ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"
|
|
2409
|
-
),
|
|
2410
|
+
), Ms = [
|
|
2410
2411
|
"ds:absolute ds:z-30",
|
|
2411
2412
|
"ds:[inset-inline-start:var(--rte-typeahead-x)] ds:[inset-block-start:var(--rte-typeahead-y)]"
|
|
2412
|
-
].join(" "),
|
|
2413
|
+
].join(" "), Rs = Bn(
|
|
2413
2414
|
[
|
|
2414
2415
|
"ds:block ds:[inline-size:100%]",
|
|
2415
|
-
"ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
|
|
2416
|
+
"ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--control-border)]",
|
|
2416
2417
|
"ds:bg-[var(--background)] ds:text-[var(--foreground)]",
|
|
2417
2418
|
"ds:shadow-[var(--shadow-md)]",
|
|
2418
2419
|
"ds:font-[family-name:var(--font-sans)] ds:text-[length:var(--font-size-base)]",
|
|
@@ -2423,28 +2424,19 @@ const As = Bn(
|
|
|
2423
2424
|
"ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
2424
2425
|
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
2425
2426
|
].join(" ")
|
|
2426
|
-
),
|
|
2427
|
-
|
|
2428
|
-
"ds:[min-block-size:var(--min-target-size)] ds:[min-inline-size:var(--min-target-size)]",
|
|
2429
|
-
"ds:text-[color:var(--primary-foreground)]",
|
|
2430
|
-
"ds:transition-colors",
|
|
2431
|
-
"ds:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
2432
|
-
"ds:focus-visible:outline-solid",
|
|
2433
|
-
"ds:focus-visible:outline-[var(--primary-foreground)]",
|
|
2434
|
-
"ds:focus-visible:[outline-offset:calc(var(--focus-ring-width)*-1)]"
|
|
2435
|
-
].join(" "), Ns = `${ro} ds:hover:bg-[color-mix(in_srgb,var(--primary-foreground)_15%,transparent)]`, Ms = `${ro} ds:bg-[var(--destructive)] ds:hover:bg-[color-mix(in_srgb,var(--destructive)_88%,var(--primary-foreground))]`;
|
|
2436
|
-
function Rs({
|
|
2427
|
+
), zs = Xr({ recording: !1 }), Ss = Xr({ recording: !0 });
|
|
2428
|
+
function Ls({
|
|
2437
2429
|
notice: n,
|
|
2438
|
-
children:
|
|
2430
|
+
children: i
|
|
2439
2431
|
}) {
|
|
2440
2432
|
const [c, s] = N(!1);
|
|
2441
2433
|
return /* @__PURE__ */ A(Hn, { open: c, onOpenChange: s, children: [
|
|
2442
2434
|
/* @__PURE__ */ t(
|
|
2443
|
-
|
|
2435
|
+
_s,
|
|
2444
2436
|
{
|
|
2445
2437
|
onOpen: () => s(!0),
|
|
2446
2438
|
onPress: () => s(!1),
|
|
2447
|
-
children:
|
|
2439
|
+
children: i
|
|
2448
2440
|
}
|
|
2449
2441
|
),
|
|
2450
2442
|
/* @__PURE__ */ t(
|
|
@@ -2454,34 +2446,34 @@ function Rs({
|
|
|
2454
2446
|
align: "start",
|
|
2455
2447
|
size: "sm",
|
|
2456
2448
|
collisionPadding: 8,
|
|
2457
|
-
children: /* @__PURE__ */ t(
|
|
2449
|
+
children: /* @__PURE__ */ t(ka, { ...n })
|
|
2458
2450
|
}
|
|
2459
2451
|
)
|
|
2460
2452
|
] });
|
|
2461
2453
|
}
|
|
2462
|
-
function
|
|
2454
|
+
function _s({
|
|
2463
2455
|
onOpen: n,
|
|
2464
|
-
onPress:
|
|
2456
|
+
onPress: i,
|
|
2465
2457
|
children: c
|
|
2466
2458
|
}) {
|
|
2467
|
-
const { cancelClose: s, closeWithDelay:
|
|
2459
|
+
const { cancelClose: s, closeWithDelay: g } = wa(), u = C(null), m = v(() => {
|
|
2468
2460
|
u.current && (clearTimeout(u.current), u.current = null);
|
|
2469
2461
|
}, []);
|
|
2470
|
-
|
|
2462
|
+
S(() => m, [m]);
|
|
2471
2463
|
const p = v(() => {
|
|
2472
2464
|
m(), s(), u.current = setTimeout(n, 300);
|
|
2473
2465
|
}, [m, s, n]), y = v(() => {
|
|
2474
|
-
m(),
|
|
2475
|
-
}, [m,
|
|
2476
|
-
k.current = !0, m(),
|
|
2477
|
-
}, [m,
|
|
2478
|
-
|
|
2466
|
+
m(), g();
|
|
2467
|
+
}, [m, g]), k = C(!1), w = v(() => {
|
|
2468
|
+
k.current = !0, m(), i();
|
|
2469
|
+
}, [m, i]);
|
|
2470
|
+
S(() => {
|
|
2479
2471
|
const T = () => {
|
|
2480
2472
|
k.current = !1;
|
|
2481
2473
|
};
|
|
2482
2474
|
return document.addEventListener("keydown", T), () => document.removeEventListener("keydown", T);
|
|
2483
2475
|
}, []);
|
|
2484
|
-
const
|
|
2476
|
+
const L = v(() => {
|
|
2485
2477
|
if (k.current) {
|
|
2486
2478
|
k.current = !1;
|
|
2487
2479
|
return;
|
|
@@ -2502,44 +2494,44 @@ function zs({
|
|
|
2502
2494
|
onMouseEnter: p,
|
|
2503
2495
|
onMouseLeave: y,
|
|
2504
2496
|
onPointerDown: w,
|
|
2505
|
-
onFocusCapture:
|
|
2497
|
+
onFocusCapture: L,
|
|
2506
2498
|
onBlurCapture: y,
|
|
2507
2499
|
children: c
|
|
2508
2500
|
}
|
|
2509
2501
|
) })
|
|
2510
2502
|
);
|
|
2511
2503
|
}
|
|
2512
|
-
function ft(n,
|
|
2513
|
-
return
|
|
2504
|
+
function ft(n, i) {
|
|
2505
|
+
return i ? /* @__PURE__ */ t(Ls, { notice: i, children: n }) : n;
|
|
2514
2506
|
}
|
|
2515
|
-
function Jt(n,
|
|
2516
|
-
return
|
|
2507
|
+
function Jt(n, i) {
|
|
2508
|
+
return i ? { "aria-label": n } : { tooltip: n };
|
|
2517
2509
|
}
|
|
2518
2510
|
const oo = ["kit", "marketplace"];
|
|
2519
|
-
function
|
|
2511
|
+
function Hs({
|
|
2520
2512
|
groupedExtensions: n,
|
|
2521
|
-
showExtensionGroups:
|
|
2513
|
+
showExtensionGroups: i,
|
|
2522
2514
|
extensionPending: c,
|
|
2523
2515
|
extensionSession: s,
|
|
2524
|
-
extensionError:
|
|
2516
|
+
extensionError: g,
|
|
2525
2517
|
openExtension: u,
|
|
2526
2518
|
closeExtension: m,
|
|
2527
2519
|
saveSelection: p,
|
|
2528
2520
|
closeSignal: y,
|
|
2529
2521
|
restoreFocusOnCloseRef: k
|
|
2530
2522
|
}) {
|
|
2531
|
-
const { t: w } = re("ui"), [
|
|
2532
|
-
return
|
|
2523
|
+
const { t: w } = re("ui"), [L, T] = N(!1), _ = C(null), q = C(!1);
|
|
2524
|
+
return S(() => {
|
|
2533
2525
|
T(!1);
|
|
2534
|
-
}, [y]),
|
|
2526
|
+
}, [y]), S(() => {
|
|
2535
2527
|
q.current && !s && (q.current = !1, k.current && window.requestAnimationFrame(() => {
|
|
2536
2528
|
var f;
|
|
2537
|
-
return (f =
|
|
2529
|
+
return (f = _.current) == null ? void 0 : f.focus();
|
|
2538
2530
|
}));
|
|
2539
2531
|
}, [s, k]), /* @__PURE__ */ A(
|
|
2540
2532
|
X.Root,
|
|
2541
2533
|
{
|
|
2542
|
-
open:
|
|
2534
|
+
open: L,
|
|
2543
2535
|
onOpenChange: (f) => {
|
|
2544
2536
|
f ? (p(), T(!0)) : (T(!1), c && m());
|
|
2545
2537
|
},
|
|
@@ -2547,7 +2539,7 @@ function _s({
|
|
|
2547
2539
|
/* @__PURE__ */ t(X.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
|
|
2548
2540
|
j,
|
|
2549
2541
|
{
|
|
2550
|
-
ref:
|
|
2542
|
+
ref: _,
|
|
2551
2543
|
"data-component-part": "extensions-trigger",
|
|
2552
2544
|
size: "sm",
|
|
2553
2545
|
intent: "ghost",
|
|
@@ -2561,44 +2553,44 @@ function _s({
|
|
|
2561
2553
|
{
|
|
2562
2554
|
align: "end",
|
|
2563
2555
|
onCloseAutoFocus: (f) => {
|
|
2564
|
-
(s == null ? void 0 : s.extension.kind) === "panel" && !
|
|
2556
|
+
(s == null ? void 0 : s.extension.kind) === "panel" && !g && f.preventDefault();
|
|
2565
2557
|
},
|
|
2566
2558
|
children: n.map(
|
|
2567
|
-
(f, d) => f.length > 0 ? /* @__PURE__ */ A(
|
|
2568
|
-
|
|
2559
|
+
(f, d) => f.length > 0 ? /* @__PURE__ */ A(ht, { children: [
|
|
2560
|
+
i ? /* @__PURE__ */ t(X.Label, { children: w(
|
|
2569
2561
|
d === 0 ? "editor.extensionsKit" : "editor.extensionsMarketplace"
|
|
2570
2562
|
) }) : null,
|
|
2571
|
-
f.map((
|
|
2563
|
+
f.map((h) => {
|
|
2572
2564
|
var z;
|
|
2573
2565
|
return /* @__PURE__ */ A(
|
|
2574
2566
|
X.Item,
|
|
2575
2567
|
{
|
|
2576
|
-
"data-extension-id":
|
|
2577
|
-
disabled: c && (s == null ? void 0 : s.extension.id) !==
|
|
2578
|
-
"aria-busy": c && (s == null ? void 0 : s.extension.id) ===
|
|
2568
|
+
"data-extension-id": h.id,
|
|
2569
|
+
disabled: c && (s == null ? void 0 : s.extension.id) !== h.id,
|
|
2570
|
+
"aria-busy": c && (s == null ? void 0 : s.extension.id) === h.id || void 0,
|
|
2579
2571
|
onSelect: (M) => {
|
|
2580
|
-
|
|
2572
|
+
h.kind === "action" && M.preventDefault(), q.current = !0, u(h);
|
|
2581
2573
|
},
|
|
2582
2574
|
children: [
|
|
2583
|
-
c && (s == null ? void 0 : s.extension.id) ===
|
|
2575
|
+
c && (s == null ? void 0 : s.extension.id) === h.id ? /* @__PURE__ */ t(Pn, { size: "sm" }) : h.icon ?? /* @__PURE__ */ t($n, {}),
|
|
2584
2576
|
/* @__PURE__ */ A("span", { className: "ds:flex ds:min-w-0 ds:flex-col ds:text-start", children: [
|
|
2585
|
-
/* @__PURE__ */ t("span", { children:
|
|
2586
|
-
|
|
2587
|
-
((z =
|
|
2588
|
-
|
|
2577
|
+
/* @__PURE__ */ t("span", { children: Yr(w, h.label) }),
|
|
2578
|
+
h.description ? /* @__PURE__ */ t("span", { className: "type-meta ds:text-muted-foreground", children: h.description }) : null,
|
|
2579
|
+
((z = h.source) == null ? void 0 : z.kind) === "marketplace" ? /* @__PURE__ */ A("span", { className: "type-meta ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-muted-foreground", children: [
|
|
2580
|
+
h.source.appIconUrl ? /* @__PURE__ */ t(
|
|
2589
2581
|
"img",
|
|
2590
2582
|
{
|
|
2591
|
-
src:
|
|
2583
|
+
src: h.source.appIconUrl,
|
|
2592
2584
|
alt: "",
|
|
2593
2585
|
className: "ds:size-[var(--spacing-md)]"
|
|
2594
2586
|
}
|
|
2595
2587
|
) : null,
|
|
2596
|
-
|
|
2588
|
+
h.source.appName
|
|
2597
2589
|
] }) : null
|
|
2598
2590
|
] })
|
|
2599
2591
|
]
|
|
2600
2592
|
},
|
|
2601
|
-
|
|
2593
|
+
h.id
|
|
2602
2594
|
);
|
|
2603
2595
|
})
|
|
2604
2596
|
] }, oo[d]) : null
|
|
@@ -2609,26 +2601,26 @@ function _s({
|
|
|
2609
2601
|
}
|
|
2610
2602
|
);
|
|
2611
2603
|
}
|
|
2612
|
-
const
|
|
2604
|
+
const Is = Zo(
|
|
2613
2605
|
({
|
|
2614
2606
|
id: n,
|
|
2615
|
-
defaultValue:
|
|
2607
|
+
defaultValue: i,
|
|
2616
2608
|
value: c,
|
|
2617
2609
|
onChange: s,
|
|
2618
|
-
toolbar:
|
|
2610
|
+
toolbar: g = "standard",
|
|
2619
2611
|
placeholder: u,
|
|
2620
2612
|
readOnly: m = !1,
|
|
2621
2613
|
ariaLabel: p,
|
|
2622
2614
|
minHeight: y,
|
|
2623
2615
|
showExtensions: k,
|
|
2624
2616
|
extensions: w,
|
|
2625
|
-
extensionContext:
|
|
2617
|
+
extensionContext: L,
|
|
2626
2618
|
onExtensionRun: T,
|
|
2627
|
-
className:
|
|
2619
|
+
className: _,
|
|
2628
2620
|
redactor: q,
|
|
2629
2621
|
options: f,
|
|
2630
2622
|
plugins: d,
|
|
2631
|
-
lang:
|
|
2623
|
+
lang: h,
|
|
2632
2624
|
imageUploadUrl: z,
|
|
2633
2625
|
onUploadImage: M,
|
|
2634
2626
|
onKeyDown: B,
|
|
@@ -2652,14 +2644,14 @@ const Ss = Zo(
|
|
|
2652
2644
|
renderHelpMeWrite: Be,
|
|
2653
2645
|
onAiCreditsExhausted: on,
|
|
2654
2646
|
aiCreditsNotice: $e
|
|
2655
|
-
},
|
|
2656
|
-
var zr,
|
|
2647
|
+
}, ao) => {
|
|
2648
|
+
var zr, Sr;
|
|
2657
2649
|
const { t: $, i18n: Gn } = re("ui"), Kn = qe(), Pe = tt(
|
|
2658
2650
|
() => `rte-${Kn.replace(/[^a-zA-Z0-9-_]/g, "")}`,
|
|
2659
2651
|
[Kn]
|
|
2660
|
-
), D = `#${Pe}`, ee = C(null), te = C(null), Me = C(null), an = C(!1), Mt = C(m), W = C(null),
|
|
2652
|
+
), D = `#${Pe}`, ee = C(null), te = C(null), Me = C(null), an = C(!1), Mt = C(m), W = C(null), gt = C(null), [ue, Vn] = N(!1), [pt, De] = N(!1), [be, Wn] = N(null), [sn, Xn] = N(!1), [ln, cn] = N(!1), bt = C(null), Rt = C(T);
|
|
2661
2653
|
Rt.current = T;
|
|
2662
|
-
const Fe = C(null), [
|
|
2654
|
+
const Fe = C(null), [io, so] = N(0), Un = C(!0), dn = v((e = !0) => {
|
|
2663
2655
|
Un.current = e, so((r) => r + 1);
|
|
2664
2656
|
}, []), un = v(() => {
|
|
2665
2657
|
var e, r;
|
|
@@ -2670,7 +2662,7 @@ const Ss = Zo(
|
|
|
2670
2662
|
},
|
|
2671
2663
|
[un, dn]
|
|
2672
2664
|
);
|
|
2673
|
-
|
|
2665
|
+
S(
|
|
2674
2666
|
() => () => {
|
|
2675
2667
|
var e, r;
|
|
2676
2668
|
(e = bt.current) == null || e.abort(), (r = Fe.current) == null || r.call(Fe, { status: "aborted" });
|
|
@@ -2680,12 +2672,12 @@ const Ss = Zo(
|
|
|
2680
2672
|
const [lo, co] = N(""), [uo, mo] = N(
|
|
2681
2673
|
"document"
|
|
2682
2674
|
), [fo, mn] = N(!1), je = C(on), fn = C(Be);
|
|
2683
|
-
|
|
2675
|
+
S(() => {
|
|
2684
2676
|
je.current = on, fn.current = Be;
|
|
2685
2677
|
}, [on, Be]);
|
|
2686
2678
|
const zt = C(null), me = tt(
|
|
2687
2679
|
() => new Map(
|
|
2688
|
-
(R ?? []).map((e) => e.token).filter((e) =>
|
|
2680
|
+
(R ?? []).map((e) => e.token).filter((e) => Sn.test(e)).map((e) => [e.toLowerCase(), e])
|
|
2689
2681
|
),
|
|
2690
2682
|
[R]
|
|
2691
2683
|
), Zn = tt(
|
|
@@ -2696,37 +2688,37 @@ const Ss = Zo(
|
|
|
2696
2688
|
),
|
|
2697
2689
|
[R]
|
|
2698
2690
|
), rt = C(me);
|
|
2699
|
-
|
|
2691
|
+
S(() => {
|
|
2700
2692
|
rt.current = me;
|
|
2701
2693
|
}, [me]);
|
|
2702
2694
|
const Qn = tt(
|
|
2703
|
-
() => (R ?? []).filter((e) =>
|
|
2695
|
+
() => (R ?? []).filter((e) => Sn.test(e.token)),
|
|
2704
2696
|
[R]
|
|
2705
|
-
),
|
|
2706
|
-
|
|
2707
|
-
|
|
2697
|
+
), hn = C(se);
|
|
2698
|
+
S(() => {
|
|
2699
|
+
hn.current = se;
|
|
2708
2700
|
}, [se]);
|
|
2709
|
-
const
|
|
2710
|
-
(e) =>
|
|
2711
|
-
[
|
|
2712
|
-
), ot = me.size > 0 ||
|
|
2713
|
-
|
|
2701
|
+
const gn = se !== void 0, pn = v(
|
|
2702
|
+
(e) => gn && hn.current ? hn.current(e) : me.has(e.toLowerCase()),
|
|
2703
|
+
[gn, me]
|
|
2704
|
+
), ot = me.size > 0 || gn, [at, Yn] = N([]), Ge = C(rn);
|
|
2705
|
+
S(() => {
|
|
2714
2706
|
Ge.current = rn;
|
|
2715
2707
|
}, [rn]);
|
|
2716
2708
|
const ze = C(() => {
|
|
2717
|
-
}), [bn,
|
|
2709
|
+
}), [bn, ho] = N(
|
|
2718
2710
|
() => /* @__PURE__ */ new Set()
|
|
2719
|
-
),
|
|
2711
|
+
), St = C(null), [go, po] = N(
|
|
2720
2712
|
null
|
|
2721
|
-
),
|
|
2722
|
-
|
|
2723
|
-
}, []), vt = C(null),
|
|
2724
|
-
|
|
2713
|
+
), Lt = v((e) => {
|
|
2714
|
+
St.current = e, po(e);
|
|
2715
|
+
}, []), vt = C(null), _t = C(null), fe = C(s), Ht = C(B);
|
|
2716
|
+
S(() => {
|
|
2725
2717
|
fe.current = s, Ht.current = B;
|
|
2726
2718
|
}, [s, B]);
|
|
2727
2719
|
const bo = C(
|
|
2728
2720
|
(() => {
|
|
2729
|
-
const e = c ??
|
|
2721
|
+
const e = c ?? i ?? "";
|
|
2730
2722
|
return e ? xe(e) : "";
|
|
2731
2723
|
})()
|
|
2732
2724
|
), le = v(() => {
|
|
@@ -2740,53 +2732,53 @@ const Ss = Zo(
|
|
|
2740
2732
|
}
|
|
2741
2733
|
return ((r = ee.current) == null ? void 0 : r.value) ?? "";
|
|
2742
2734
|
}, [D]);
|
|
2743
|
-
|
|
2735
|
+
S(() => {
|
|
2744
2736
|
ze.current = () => {
|
|
2745
2737
|
var o;
|
|
2746
2738
|
if (!ot) {
|
|
2747
|
-
Yn((
|
|
2739
|
+
Yn((a) => a.length ? [] : a);
|
|
2748
2740
|
return;
|
|
2749
2741
|
}
|
|
2750
2742
|
const e = (o = W.current) == null ? void 0 : o.querySelector(".redactor-in");
|
|
2751
|
-
e == null || e.querySelectorAll('[data-redactor-type="variable"]').forEach((
|
|
2743
|
+
e == null || e.querySelectorAll('[data-redactor-type="variable"]').forEach((a) => {
|
|
2752
2744
|
const l = /^\[\[([A-Za-z0-9_]+)\]\]$/.exec(
|
|
2753
|
-
|
|
2745
|
+
a.textContent ?? ""
|
|
2754
2746
|
), b = !l || !pn(l[1]);
|
|
2755
|
-
|
|
2756
|
-
const x = l ? Zn.get(l[1].toLowerCase()) ?? l[1] :
|
|
2757
|
-
|
|
2758
|
-
const H =
|
|
2759
|
-
|
|
2747
|
+
a.classList.contains(qn) !== b && a.classList.toggle(qn, b);
|
|
2748
|
+
const x = l ? Zn.get(l[1].toLowerCase()) ?? l[1] : a.textContent ?? "";
|
|
2749
|
+
a.getAttribute("data-label") !== x && a.setAttribute("data-label", x);
|
|
2750
|
+
const H = a.textContent ?? "";
|
|
2751
|
+
a.getAttribute("title") !== H && a.setAttribute("title", H);
|
|
2760
2752
|
});
|
|
2761
2753
|
const r = Array.from(
|
|
2762
2754
|
new Set(
|
|
2763
|
-
|
|
2764
|
-
(
|
|
2755
|
+
bs(le()).filter(
|
|
2756
|
+
(a) => !pn(a)
|
|
2765
2757
|
)
|
|
2766
2758
|
)
|
|
2767
2759
|
);
|
|
2768
2760
|
Yn(
|
|
2769
|
-
(
|
|
2761
|
+
(a) => a.length === r.length && a.every((l, b) => l === r[b]) ? a : r
|
|
2770
2762
|
);
|
|
2771
2763
|
}, ze.current();
|
|
2772
|
-
}, [ot, pn, Zn, le]),
|
|
2764
|
+
}, [ot, pn, Zn, le]), S(() => {
|
|
2773
2765
|
var o;
|
|
2774
2766
|
const r = ((o = W.current) == null ? void 0 : o.querySelector(".redactor-in")) ?? ee.current;
|
|
2775
|
-
r && (
|
|
2776
|
-
}, [
|
|
2767
|
+
r && (at.length > 0 ? (r.setAttribute("aria-invalid", "true"), r.setAttribute("aria-describedby", `${Pe}-variables-error`)) : (r.removeAttribute("aria-invalid"), r.removeAttribute("aria-describedby")));
|
|
2768
|
+
}, [at, Pe, ue]);
|
|
2777
2769
|
const vn = C(!1);
|
|
2778
|
-
|
|
2770
|
+
S(() => {
|
|
2779
2771
|
var e, r;
|
|
2780
|
-
ot ? (vn.current = !0, (e = Ge.current) == null || e.call(Ge,
|
|
2781
|
-
}, [
|
|
2772
|
+
ot ? (vn.current = !0, (e = Ge.current) == null || e.call(Ge, at)) : vn.current && (vn.current = !1, (r = Ge.current) == null || r.call(Ge, []));
|
|
2773
|
+
}, [at, ot]), S(() => {
|
|
2782
2774
|
se && ze.current();
|
|
2783
2775
|
}, [se]);
|
|
2784
2776
|
const ce = v(
|
|
2785
2777
|
(e, ...r) => {
|
|
2786
2778
|
const o = te.current;
|
|
2787
2779
|
if (!o) return !1;
|
|
2788
|
-
const
|
|
2789
|
-
if (
|
|
2780
|
+
const a = Mt.current;
|
|
2781
|
+
if (a)
|
|
2790
2782
|
try {
|
|
2791
2783
|
o(D, "disableReadOnly");
|
|
2792
2784
|
} catch {
|
|
@@ -2796,7 +2788,7 @@ const Ss = Zo(
|
|
|
2796
2788
|
} catch {
|
|
2797
2789
|
return !1;
|
|
2798
2790
|
} finally {
|
|
2799
|
-
if (
|
|
2791
|
+
if (a)
|
|
2800
2792
|
try {
|
|
2801
2793
|
o(D, "enableReadOnly");
|
|
2802
2794
|
} catch {
|
|
@@ -2806,24 +2798,24 @@ const Ss = Zo(
|
|
|
2806
2798
|
[D]
|
|
2807
2799
|
), de = v(
|
|
2808
2800
|
(e, r) => {
|
|
2809
|
-
var
|
|
2810
|
-
const o = (r == null ? void 0 : r.asHtml) ?? !0,
|
|
2811
|
-
if (ce(o ? "insertion.insertHtml" : "insertion.insertText",
|
|
2801
|
+
var he;
|
|
2802
|
+
const o = (r == null ? void 0 : r.asHtml) ?? !0, a = o ? xe(e) : e;
|
|
2803
|
+
if (ce(o ? "insertion.insertHtml" : "insertion.insertText", a)) return;
|
|
2812
2804
|
const b = ee.current;
|
|
2813
2805
|
if (!b) return;
|
|
2814
2806
|
const x = b.selectionStart ?? b.value.length, H = b.selectionEnd ?? b.value.length;
|
|
2815
|
-
b.value = b.value.slice(0, x) +
|
|
2816
|
-
const Z = x +
|
|
2807
|
+
b.value = b.value.slice(0, x) + a + b.value.slice(H);
|
|
2808
|
+
const Z = x + a.length;
|
|
2817
2809
|
try {
|
|
2818
2810
|
b.setSelectionRange(Z, Z);
|
|
2819
2811
|
} catch {
|
|
2820
2812
|
}
|
|
2821
|
-
(
|
|
2813
|
+
(he = fe.current) == null || he.call(fe, { html: xe(b.value), markdown: "" });
|
|
2822
2814
|
},
|
|
2823
2815
|
[ce]
|
|
2824
2816
|
), ve = C(null), ye = v(() => {
|
|
2825
|
-
var
|
|
2826
|
-
const e = (
|
|
2817
|
+
var a;
|
|
2818
|
+
const e = (a = W.current) == null ? void 0 : a.querySelector(".redactor-in"), r = typeof window < "u" ? window.getSelection() : null, o = /* @__PURE__ */ new Set();
|
|
2827
2819
|
if (e && r && r.anchorNode && e.contains(r.anchorNode) && typeof document.queryCommandState == "function") {
|
|
2828
2820
|
r.rangeCount > 0 && (ve.current = r.getRangeAt(0).cloneRange());
|
|
2829
2821
|
try {
|
|
@@ -2837,7 +2829,7 @@ const Ss = Zo(
|
|
|
2837
2829
|
} catch {
|
|
2838
2830
|
}
|
|
2839
2831
|
}
|
|
2840
|
-
|
|
2832
|
+
ho(
|
|
2841
2833
|
(l) => l.size === o.size && [...o].every((b) => l.has(b)) ? l : o
|
|
2842
2834
|
);
|
|
2843
2835
|
}, []), Ke = v(
|
|
@@ -2846,19 +2838,19 @@ const Ss = Zo(
|
|
|
2846
2838
|
},
|
|
2847
2839
|
[ce, ye]
|
|
2848
2840
|
);
|
|
2849
|
-
|
|
2841
|
+
S(() => {
|
|
2850
2842
|
const e = W.current;
|
|
2851
2843
|
if (!e) return;
|
|
2852
2844
|
const r = {
|
|
2853
2845
|
b: ["module.inline.format", { tag: "b" }],
|
|
2854
2846
|
i: ["module.inline.format", { tag: "i" }],
|
|
2855
2847
|
u: ["module.inline.format", { tag: "u" }]
|
|
2856
|
-
}, o = (
|
|
2857
|
-
if (!(
|
|
2858
|
-
const l = r[
|
|
2848
|
+
}, o = (a) => {
|
|
2849
|
+
if (!(a.metaKey || a.ctrlKey) || a.altKey || a.shiftKey || a.isComposing) return;
|
|
2850
|
+
const l = r[a.key.toLowerCase()];
|
|
2859
2851
|
if (!l) return;
|
|
2860
2852
|
const b = e.querySelector(".redactor-in");
|
|
2861
|
-
!b || !(
|
|
2853
|
+
!b || !(a.target instanceof Node) || !b.contains(a.target) || Mt.current || (a.preventDefault(), a.stopImmediatePropagation(), Ke(...l));
|
|
2862
2854
|
};
|
|
2863
2855
|
return e.addEventListener("keydown", o, !0), () => e.removeEventListener("keydown", o, !0);
|
|
2864
2856
|
}, [Ke]);
|
|
@@ -2867,18 +2859,18 @@ const Ss = Zo(
|
|
|
2867
2859
|
de(e, { asHtml: !0 }), typeof window < "u" && window.requestAnimationFrame(() => ye());
|
|
2868
2860
|
},
|
|
2869
2861
|
[de, ye]
|
|
2870
|
-
), [
|
|
2862
|
+
), [it, yn] = N(null), It = C(null), wn = `${Pe}-variables`, Jn = C(null), [kn, vo] = N(void 0), Ce = v(() => {
|
|
2871
2863
|
It.current = null, yn(null);
|
|
2872
2864
|
}, []), $t = v(
|
|
2873
2865
|
(e, r) => {
|
|
2874
2866
|
const o = window.getSelection();
|
|
2875
2867
|
if (!o) return;
|
|
2876
|
-
const
|
|
2877
|
-
|
|
2868
|
+
const a = document.createRange();
|
|
2869
|
+
a.setStart(r.node, r.start), a.setEnd(r.node, r.end), o.removeAllRanges(), o.addRange(a), Ve(Wr(e)), window.requestAnimationFrame(() => ze.current());
|
|
2878
2870
|
},
|
|
2879
2871
|
[Ve]
|
|
2880
2872
|
);
|
|
2881
|
-
|
|
2873
|
+
S(() => {
|
|
2882
2874
|
const e = W.current;
|
|
2883
2875
|
if (!e || !ot) return;
|
|
2884
2876
|
const r = () => {
|
|
@@ -2895,7 +2887,7 @@ const Ss = Zo(
|
|
|
2895
2887
|
Ce();
|
|
2896
2888
|
return;
|
|
2897
2889
|
}
|
|
2898
|
-
const Z = x,
|
|
2890
|
+
const Z = x, he = Z.data.slice(0, H), Te = /\[\[([A-Za-z0-9_]+)\]\]$/.exec(he);
|
|
2899
2891
|
if (Te) {
|
|
2900
2892
|
Ce(), $t(
|
|
2901
2893
|
me.get(Te[1].toLowerCase()) ?? Te[1],
|
|
@@ -2903,20 +2895,20 @@ const Ss = Zo(
|
|
|
2903
2895
|
);
|
|
2904
2896
|
return;
|
|
2905
2897
|
}
|
|
2906
|
-
const dt = /\[\[([A-Za-z0-9_ ]{0,40})$/.exec(
|
|
2907
|
-
if (!dt || !
|
|
2898
|
+
const dt = /\[\[([A-Za-z0-9_ ]{0,40})$/.exec(he), ae = gt.current;
|
|
2899
|
+
if (!dt || !ae || (R ?? []).length === 0) {
|
|
2908
2900
|
Ce();
|
|
2909
2901
|
return;
|
|
2910
2902
|
}
|
|
2911
|
-
const
|
|
2903
|
+
const _e = {
|
|
2912
2904
|
node: Z,
|
|
2913
2905
|
start: H - dt[0].length,
|
|
2914
2906
|
end: H
|
|
2915
2907
|
};
|
|
2916
|
-
It.current =
|
|
2908
|
+
It.current = _e;
|
|
2917
2909
|
const ut = document.createRange();
|
|
2918
|
-
ut.setStart(Z,
|
|
2919
|
-
const et = ut.getBoundingClientRect(), At =
|
|
2910
|
+
ut.setStart(Z, _e.start), ut.setEnd(Z, _e.end);
|
|
2911
|
+
const et = ut.getBoundingClientRect(), At = ae.getBoundingClientRect(), Rn = getComputedStyle(ae).direction === "rtl";
|
|
2920
2912
|
yn({
|
|
2921
2913
|
query: dt[1],
|
|
2922
2914
|
left: Rn ? At.right - et.right : et.left - At.left,
|
|
@@ -2929,9 +2921,9 @@ const Ss = Zo(
|
|
|
2929
2921
|
))
|
|
2930
2922
|
return;
|
|
2931
2923
|
(((x = Jn.current) == null ? void 0 : x.handleKeyDown(l)) ?? !1) && (l.preventDefault(), l.stopImmediatePropagation());
|
|
2932
|
-
},
|
|
2933
|
-
return e.addEventListener("input", r), e.addEventListener("keydown", o, !0), e.addEventListener("focusout",
|
|
2934
|
-
e.removeEventListener("input", r), e.removeEventListener("keydown", o, !0), e.removeEventListener("focusout",
|
|
2924
|
+
}, a = () => Ce();
|
|
2925
|
+
return e.addEventListener("input", r), e.addEventListener("keydown", o, !0), e.addEventListener("focusout", a), () => {
|
|
2926
|
+
e.removeEventListener("input", r), e.removeEventListener("keydown", o, !0), e.removeEventListener("focusout", a);
|
|
2935
2927
|
};
|
|
2936
2928
|
}, [
|
|
2937
2929
|
ot,
|
|
@@ -2939,11 +2931,11 @@ const Ss = Zo(
|
|
|
2939
2931
|
R,
|
|
2940
2932
|
$t,
|
|
2941
2933
|
Ce
|
|
2942
|
-
]),
|
|
2934
|
+
]), S(() => {
|
|
2943
2935
|
var r;
|
|
2944
2936
|
const e = (r = W.current) == null ? void 0 : r.querySelector(".redactor-in");
|
|
2945
|
-
e && (
|
|
2946
|
-
}, [
|
|
2937
|
+
e && (it ? (e.setAttribute("aria-expanded", "true"), e.setAttribute("aria-controls", `${wn}-list`), kn ? e.setAttribute("aria-activedescendant", kn) : e.removeAttribute("aria-activedescendant")) : (e.removeAttribute("aria-expanded"), e.removeAttribute("aria-controls"), e.removeAttribute("aria-activedescendant")));
|
|
2938
|
+
}, [it, wn, kn]);
|
|
2947
2939
|
const yo = v(
|
|
2948
2940
|
(e) => {
|
|
2949
2941
|
const r = It.current;
|
|
@@ -2957,8 +2949,8 @@ const Ss = Zo(
|
|
|
2957
2949
|
}, []), st = v(() => {
|
|
2958
2950
|
var r;
|
|
2959
2951
|
if (typeof window < "u") {
|
|
2960
|
-
const o = (r = W.current) == null ? void 0 : r.querySelector(".redactor-in"),
|
|
2961
|
-
o &&
|
|
2952
|
+
const o = (r = W.current) == null ? void 0 : r.querySelector(".redactor-in"), a = window.getSelection();
|
|
2953
|
+
o && a && a.rangeCount > 0 && a.anchorNode && o.contains(a.anchorNode) && (ve.current = a.getRangeAt(0).cloneRange());
|
|
2962
2954
|
}
|
|
2963
2955
|
const e = te.current;
|
|
2964
2956
|
if (e)
|
|
@@ -2966,7 +2958,7 @@ const Ss = Zo(
|
|
|
2966
2958
|
e(D, "selection.save");
|
|
2967
2959
|
} catch {
|
|
2968
2960
|
}
|
|
2969
|
-
}, [D]),
|
|
2961
|
+
}, [D]), ge = v(() => {
|
|
2970
2962
|
const e = te.current;
|
|
2971
2963
|
if (!e) return;
|
|
2972
2964
|
const r = ve.current;
|
|
@@ -2997,15 +2989,15 @@ const Ss = Zo(
|
|
|
2997
2989
|
if (typeof window > "u") return null;
|
|
2998
2990
|
const e = (l = W.current) == null ? void 0 : l.querySelector(".redactor-in"), r = window.getSelection();
|
|
2999
2991
|
if (!e || !r || r.rangeCount === 0) return null;
|
|
3000
|
-
const o = r.anchorNode,
|
|
3001
|
-
return !
|
|
2992
|
+
const o = r.anchorNode, a = o && o.nodeType === Node.TEXT_NODE ? o.parentElement : o;
|
|
2993
|
+
return !a || !e.contains(a) ? null : a.closest("table");
|
|
3002
2994
|
}, []), er = C(null), Dt = v(() => {
|
|
3003
2995
|
var l;
|
|
3004
2996
|
if (typeof window > "u") return null;
|
|
3005
2997
|
const e = (l = W.current) == null ? void 0 : l.querySelector(".redactor-in"), r = window.getSelection();
|
|
3006
2998
|
if (!e || !r || r.rangeCount === 0) return null;
|
|
3007
|
-
const o = r.anchorNode,
|
|
3008
|
-
return !
|
|
2999
|
+
const o = r.anchorNode, a = o && o.nodeType === Node.TEXT_NODE ? o.parentElement : o;
|
|
3000
|
+
return !a || !e.contains(a) ? null : a.closest("td,th");
|
|
3009
3001
|
}, []), Ao = v(() => {
|
|
3010
3002
|
er.current = Dt();
|
|
3011
3003
|
}, [Dt]), To = v(
|
|
@@ -3013,7 +3005,7 @@ const Ss = Zo(
|
|
|
3013
3005
|
var b;
|
|
3014
3006
|
const o = er.current ?? Dt();
|
|
3015
3007
|
if (!o) return;
|
|
3016
|
-
const
|
|
3008
|
+
const a = e === "row" ? Array.from(((b = o.closest("tr")) == null ? void 0 : b.children) ?? [o]).filter(
|
|
3017
3009
|
(x) => x instanceof HTMLElement && (x.tagName === "TD" || x.tagName === "TH")
|
|
3018
3010
|
) : [o], l = te.current;
|
|
3019
3011
|
if (l)
|
|
@@ -3021,7 +3013,7 @@ const Ss = Zo(
|
|
|
3021
3013
|
l(D, "module.buffer.trigger");
|
|
3022
3014
|
} catch {
|
|
3023
3015
|
}
|
|
3024
|
-
for (const x of
|
|
3016
|
+
for (const x of a)
|
|
3025
3017
|
r ? x.style.setProperty("background-color", r) : x.style.removeProperty("background-color");
|
|
3026
3018
|
if (l)
|
|
3027
3019
|
try {
|
|
@@ -3032,7 +3024,7 @@ const Ss = Zo(
|
|
|
3032
3024
|
},
|
|
3033
3025
|
[Dt, D, ye]
|
|
3034
3026
|
);
|
|
3035
|
-
|
|
3027
|
+
S(() => {
|
|
3036
3028
|
const e = W.current;
|
|
3037
3029
|
if (typeof window > "u" || !e) return;
|
|
3038
3030
|
const r = (l) => {
|
|
@@ -3040,33 +3032,33 @@ const Ss = Zo(
|
|
|
3040
3032
|
if (!b || !(x instanceof Node) || !b.contains(x))
|
|
3041
3033
|
return;
|
|
3042
3034
|
const H = x instanceof Element ? x.closest("img") : null;
|
|
3043
|
-
|
|
3035
|
+
Lt(H && b.contains(H) ? H : null);
|
|
3044
3036
|
}, o = (l) => {
|
|
3045
|
-
l.key === "Escape" &&
|
|
3046
|
-
},
|
|
3037
|
+
l.key === "Escape" && St.current && Lt(null);
|
|
3038
|
+
}, a = (l) => {
|
|
3047
3039
|
const b = l.relatedTarget;
|
|
3048
|
-
(!(b instanceof Node) || !e.contains(b)) &&
|
|
3040
|
+
(!(b instanceof Node) || !e.contains(b)) && Lt(null);
|
|
3049
3041
|
};
|
|
3050
|
-
return e.addEventListener("click", r), e.addEventListener("keydown", o), e.addEventListener("focusout",
|
|
3051
|
-
e.removeEventListener("click", r), e.removeEventListener("keydown", o), e.removeEventListener("focusout",
|
|
3042
|
+
return e.addEventListener("click", r), e.addEventListener("keydown", o), e.addEventListener("focusout", a), () => {
|
|
3043
|
+
e.removeEventListener("click", r), e.removeEventListener("keydown", o), e.removeEventListener("focusout", a);
|
|
3052
3044
|
};
|
|
3053
|
-
}, [
|
|
3045
|
+
}, [Lt]);
|
|
3054
3046
|
const Eo = v(
|
|
3055
3047
|
(e) => {
|
|
3056
|
-
const r =
|
|
3048
|
+
const r = St.current;
|
|
3057
3049
|
if (!r) return;
|
|
3058
3050
|
const o = Dn.includes(
|
|
3059
3051
|
e
|
|
3060
|
-
) ? Dn :
|
|
3061
|
-
if (
|
|
3052
|
+
) ? Dn : no, a = te.current;
|
|
3053
|
+
if (a)
|
|
3062
3054
|
try {
|
|
3063
|
-
|
|
3055
|
+
a(D, "module.buffer.trigger");
|
|
3064
3056
|
} catch {
|
|
3065
3057
|
}
|
|
3066
3058
|
for (const l of o) r.classList.remove(l);
|
|
3067
|
-
if (r.classList.add(e),
|
|
3059
|
+
if (r.classList.add(e), a)
|
|
3068
3060
|
try {
|
|
3069
|
-
|
|
3061
|
+
a(D, "broadcast", "hardsync");
|
|
3070
3062
|
} catch {
|
|
3071
3063
|
}
|
|
3072
3064
|
typeof window < "u" && window.requestAnimationFrame(() => ye());
|
|
@@ -3074,7 +3066,7 @@ const Ss = Zo(
|
|
|
3074
3066
|
[D, ye]
|
|
3075
3067
|
), No = v(
|
|
3076
3068
|
(e) => {
|
|
3077
|
-
const r =
|
|
3069
|
+
const r = St.current;
|
|
3078
3070
|
if (!r) return;
|
|
3079
3071
|
const o = te.current;
|
|
3080
3072
|
if (o)
|
|
@@ -3095,7 +3087,7 @@ const Ss = Zo(
|
|
|
3095
3087
|
var o;
|
|
3096
3088
|
const r = te.current;
|
|
3097
3089
|
if (r && typeof window < "u") {
|
|
3098
|
-
const
|
|
3090
|
+
const a = (o = W.current) == null ? void 0 : o.querySelector(".redactor-in"), l = window.getSelection(), b = l == null ? void 0 : l.anchorNode, x = b && b.nodeType === Node.TEXT_NODE ? b.parentElement : b, H = x && (a != null && a.contains(x)) ? x.closest("ul,ol") : null;
|
|
3099
3091
|
if (H)
|
|
3100
3092
|
try {
|
|
3101
3093
|
r(D, "caret.setAfter", H);
|
|
@@ -3104,8 +3096,8 @@ const Ss = Zo(
|
|
|
3104
3096
|
}
|
|
3105
3097
|
Ve(e), typeof window < "u" && window.requestAnimationFrame(() => {
|
|
3106
3098
|
var l;
|
|
3107
|
-
const
|
|
3108
|
-
|
|
3099
|
+
const a = (l = W.current) == null ? void 0 : l.querySelector(".redactor-in");
|
|
3100
|
+
a == null || a.querySelectorAll("table td, table th").forEach((b) => {
|
|
3109
3101
|
let x = b.lastChild;
|
|
3110
3102
|
for (; x && x.nodeType === Node.TEXT_NODE && !(x.textContent ?? "").trim(); ) {
|
|
3111
3103
|
const H = x.previousSibling;
|
|
@@ -3121,28 +3113,28 @@ const Ss = Zo(
|
|
|
3121
3113
|
if (!z) throw new Error("No image upload URL configured.");
|
|
3122
3114
|
const o = new FormData();
|
|
3123
3115
|
o.append("file", e);
|
|
3124
|
-
const
|
|
3116
|
+
const a = await fetch(z, {
|
|
3125
3117
|
method: "POST",
|
|
3126
3118
|
body: o,
|
|
3127
3119
|
credentials: "same-origin",
|
|
3128
3120
|
signal: r
|
|
3129
3121
|
});
|
|
3130
|
-
if (!
|
|
3131
|
-
const l =
|
|
3122
|
+
if (!a.ok) throw new Error(`Image upload failed (${a.status}).`);
|
|
3123
|
+
const l = xs(await a.json());
|
|
3132
3124
|
if (!l) throw new Error("Image upload response contained no URL.");
|
|
3133
3125
|
return l;
|
|
3134
3126
|
},
|
|
3135
3127
|
[z, M]
|
|
3136
|
-
), We =
|
|
3128
|
+
), We = oa({ enabled: G }), {
|
|
3137
3129
|
start: lt,
|
|
3138
|
-
land:
|
|
3130
|
+
land: Se,
|
|
3139
3131
|
reset: ct
|
|
3140
3132
|
} = We, yt = C(null), Ot = C(null), [we, nr] = N(!1), [Ro, rr] = N(!1), [zo, qt] = N(""), Bt = v(() => {
|
|
3141
3133
|
const e = Ot.current;
|
|
3142
3134
|
e != null && e.parentNode && e.parentNode.removeChild(e), Ot.current = null;
|
|
3143
3135
|
}, []), or = v((e) => {
|
|
3144
|
-
var
|
|
3145
|
-
const r = (
|
|
3136
|
+
var a;
|
|
3137
|
+
const r = (a = W.current) == null ? void 0 : a.querySelector(
|
|
3146
3138
|
".redactor-in"
|
|
3147
3139
|
);
|
|
3148
3140
|
if (!r) return;
|
|
@@ -3161,15 +3153,15 @@ const Ss = Zo(
|
|
|
3161
3153
|
}, []), Pt = v(() => {
|
|
3162
3154
|
var e;
|
|
3163
3155
|
(e = yt.current) == null || e.abort();
|
|
3164
|
-
}, []),
|
|
3156
|
+
}, []), ar = v(() => {
|
|
3165
3157
|
var b;
|
|
3166
3158
|
if (typeof window > "u") return !1;
|
|
3167
3159
|
const e = window.getSelection(), r = (b = W.current) == null ? void 0 : b.querySelector(".redactor-in");
|
|
3168
3160
|
if (!e || e.rangeCount === 0 || !r) return !1;
|
|
3169
|
-
const { startContainer: o, startOffset:
|
|
3170
|
-
if (!r.contains(o) || o.nodeType !== Node.TEXT_NODE ||
|
|
3161
|
+
const { startContainer: o, startOffset: a } = e.getRangeAt(0);
|
|
3162
|
+
if (!r.contains(o) || o.nodeType !== Node.TEXT_NODE || a === 0)
|
|
3171
3163
|
return !1;
|
|
3172
|
-
const l = o.data.charAt(
|
|
3164
|
+
const l = o.data.charAt(a - 1);
|
|
3173
3165
|
return /\S/.test(l) && l !== " ";
|
|
3174
3166
|
}, []), ke = E !== void 0 && !E.granted, xn = C(null), Ft = v(() => {
|
|
3175
3167
|
if (!F || ke) return;
|
|
@@ -3186,13 +3178,13 @@ const Ss = Zo(
|
|
|
3186
3178
|
Bt();
|
|
3187
3179
|
const o = r.trim();
|
|
3188
3180
|
if (o) {
|
|
3189
|
-
const
|
|
3190
|
-
if (
|
|
3191
|
-
xn.current = null, ve.current =
|
|
3181
|
+
const a = xn.current;
|
|
3182
|
+
if (a) {
|
|
3183
|
+
xn.current = null, ve.current = a, ge(), de(`${o} `, { asHtml: !1 }), G && Se(), qt(o);
|
|
3192
3184
|
return;
|
|
3193
3185
|
}
|
|
3194
|
-
const l =
|
|
3195
|
-
de(`${l}${o} `, { asHtml: !1 }), G &&
|
|
3186
|
+
const l = ar() ? " " : "";
|
|
3187
|
+
de(`${l}${o} `, { asHtml: !1 }), G && Se(), qt(o);
|
|
3196
3188
|
}
|
|
3197
3189
|
}
|
|
3198
3190
|
}).catch((r) => {
|
|
@@ -3205,45 +3197,45 @@ const Ss = Zo(
|
|
|
3205
3197
|
rr(!0);
|
|
3206
3198
|
}
|
|
3207
3199
|
}).finally(() => {
|
|
3208
|
-
Bt(), yt.current === e && (yt.current = null, nr(!1), qt(""), G && !
|
|
3200
|
+
Bt(), yt.current === e && (yt.current = null, nr(!1), qt(""), G && !Le.current && ct());
|
|
3209
3201
|
});
|
|
3210
3202
|
}, [
|
|
3211
3203
|
F,
|
|
3212
3204
|
ke,
|
|
3213
3205
|
de,
|
|
3214
|
-
|
|
3206
|
+
ge,
|
|
3215
3207
|
Bt,
|
|
3216
3208
|
or,
|
|
3217
|
-
|
|
3209
|
+
ar,
|
|
3218
3210
|
G,
|
|
3219
3211
|
lt,
|
|
3220
|
-
|
|
3212
|
+
Se,
|
|
3221
3213
|
ct,
|
|
3222
3214
|
$
|
|
3223
3215
|
]);
|
|
3224
|
-
|
|
3216
|
+
S(() => () => {
|
|
3225
3217
|
var e;
|
|
3226
3218
|
return (e = yt.current) == null ? void 0 : e.abort();
|
|
3227
3219
|
}, []);
|
|
3228
|
-
const [jt, wt] = N(null), Xe = C(null), Gt = C(null), [
|
|
3220
|
+
const [jt, wt] = N(null), Xe = C(null), Gt = C(null), [So, ir] = N(!1), Lo = ((E == null ? void 0 : E.pending) ?? !1) || So, Kt = C(!1), Cn = v(() => {
|
|
3229
3221
|
Xe.current = null, Gt.current = null, Kt.current = !1, wt(null);
|
|
3230
|
-
}, []),
|
|
3222
|
+
}, []), _o = v(() => {
|
|
3231
3223
|
var r;
|
|
3232
3224
|
Kt.current = !0;
|
|
3233
3225
|
const e = (r = E == null ? void 0 : E.onGrant) == null ? void 0 : r.call(E);
|
|
3234
|
-
e && typeof e.then == "function" && (
|
|
3235
|
-
}).finally(() =>
|
|
3226
|
+
e && typeof e.then == "function" && (ir(!0), Promise.resolve(e).catch(() => {
|
|
3227
|
+
}).finally(() => ir(!1)));
|
|
3236
3228
|
}, [E]), sr = C((E == null ? void 0 : E.granted) ?? !0);
|
|
3237
|
-
|
|
3229
|
+
S(() => {
|
|
3238
3230
|
const e = sr.current;
|
|
3239
3231
|
if (sr.current = (E == null ? void 0 : E.granted) ?? !0, !e && (E != null && E.granted) && Xe.current) {
|
|
3240
3232
|
const r = Xe.current, o = Kt.current;
|
|
3241
3233
|
Xe.current = null, Kt.current = !1, wt(null);
|
|
3242
|
-
const
|
|
3234
|
+
const a = Gt.current;
|
|
3243
3235
|
if (Gt.current = null, !o) return;
|
|
3244
|
-
r === "write" ? De(!0) : r === "action" ?
|
|
3236
|
+
r === "write" ? De(!0) : r === "action" ? a == null || a() : (ge(), Ft());
|
|
3245
3237
|
}
|
|
3246
|
-
}, [E == null ? void 0 : E.granted,
|
|
3238
|
+
}, [E == null ? void 0 : E.granted, ge, Ft]), S(() => {
|
|
3247
3239
|
ke && (De(!1), we && Pt());
|
|
3248
3240
|
}, [ke, we, Pt]);
|
|
3249
3241
|
const lr = v(
|
|
@@ -3264,8 +3256,8 @@ const Ss = Zo(
|
|
|
3264
3256
|
), cr = v(
|
|
3265
3257
|
(e = "document") => {
|
|
3266
3258
|
st();
|
|
3267
|
-
const r = ve.current, o = r ? r.cloneRange() : null,
|
|
3268
|
-
if (o && !
|
|
3259
|
+
const r = ve.current, o = r ? r.cloneRange() : null, a = e === "selection" && !!(o && !o.collapsed);
|
|
3260
|
+
if (o && !a && o.collapse(!1), zt.current = o, mo(a ? "selection" : "document"), co(a && o ? o.toString() : ""), ke) {
|
|
3269
3261
|
Xe.current = "write", wt("write");
|
|
3270
3262
|
return;
|
|
3271
3263
|
}
|
|
@@ -3281,29 +3273,29 @@ const Ss = Zo(
|
|
|
3281
3273
|
" ",
|
|
3282
3274
|
P
|
|
3283
3275
|
] }) : null
|
|
3284
|
-
] }) : P, [E, P, $]), [Ue, An] = N(null), [Ho, Vt] = N(!1), [ur, mr] = N(!1), [Io, Ze] = N(""), fr = C(null),
|
|
3285
|
-
|
|
3276
|
+
] }) : P, [E, P, $]), [Ue, An] = N(null), [Ho, Vt] = N(!1), [ur, mr] = N(!1), [Io, Ze] = N(""), fr = C(null), Le = C(null), Wt = C(Ne);
|
|
3277
|
+
S(() => {
|
|
3286
3278
|
Wt.current = Ne;
|
|
3287
|
-
}, [Ne]),
|
|
3279
|
+
}, [Ne]), S(() => {
|
|
3288
3280
|
G && (!we && Ue === null || We.state === null && lt());
|
|
3289
3281
|
}, [G, we, Ue, We.state, lt]);
|
|
3290
|
-
const kt = (e) => e.preventDefault(),
|
|
3282
|
+
const kt = (e) => e.preventDefault(), hr = v(
|
|
3291
3283
|
(e) => {
|
|
3292
3284
|
var o;
|
|
3293
3285
|
const r = te.current;
|
|
3294
3286
|
if (r)
|
|
3295
3287
|
try {
|
|
3296
|
-
const
|
|
3297
|
-
(o =
|
|
3288
|
+
const a = r(D);
|
|
3289
|
+
(o = a == null ? void 0 : a.broadcast) == null || o.call(a, "state", !1, e);
|
|
3298
3290
|
} catch {
|
|
3299
3291
|
}
|
|
3300
3292
|
},
|
|
3301
3293
|
[D]
|
|
3302
|
-
),
|
|
3294
|
+
), gr = C(!1), Qe = v(
|
|
3303
3295
|
(e) => {
|
|
3304
3296
|
const r = te.current;
|
|
3305
|
-
if (!r ||
|
|
3306
|
-
|
|
3297
|
+
if (!r || gr.current === e) return;
|
|
3298
|
+
gr.current = e;
|
|
3307
3299
|
const o = e || m;
|
|
3308
3300
|
Mt.current = o;
|
|
3309
3301
|
try {
|
|
@@ -3334,20 +3326,20 @@ const Ss = Zo(
|
|
|
3334
3326
|
return {
|
|
3335
3327
|
scope: "selection",
|
|
3336
3328
|
range: b.cloneRange(),
|
|
3337
|
-
html:
|
|
3329
|
+
html: ys(b.cloneContents()),
|
|
3338
3330
|
text: x
|
|
3339
3331
|
};
|
|
3340
3332
|
}
|
|
3341
3333
|
}
|
|
3342
|
-
const
|
|
3343
|
-
return { scope: "document", range: null, html:
|
|
3334
|
+
const a = le();
|
|
3335
|
+
return { scope: "document", range: null, html: a, text: Kr(a) };
|
|
3344
3336
|
},
|
|
3345
3337
|
[le]
|
|
3346
3338
|
), En = v(
|
|
3347
|
-
(e, r, o,
|
|
3348
|
-
if (
|
|
3339
|
+
(e, r, o, a) => {
|
|
3340
|
+
if (Le.current || !o.text.trim()) return;
|
|
3349
3341
|
const l = new AbortController();
|
|
3350
|
-
|
|
3342
|
+
Le.current = l, An(e), mr(!1), fr.current = e, Ze($("editor.ai.generating")), Vt(!1), G && lt();
|
|
3351
3343
|
const b = le();
|
|
3352
3344
|
Qe(!0), Promise.resolve(
|
|
3353
3345
|
r({
|
|
@@ -3369,29 +3361,29 @@ const Ss = Zo(
|
|
|
3369
3361
|
Vt(!0), Ze("");
|
|
3370
3362
|
return;
|
|
3371
3363
|
}
|
|
3372
|
-
if (
|
|
3364
|
+
if (hr(b), o.scope === "selection" && o.range) {
|
|
3373
3365
|
if (!o.range.startContainer.isConnected) {
|
|
3374
3366
|
Vt(!0), Ze("");
|
|
3375
3367
|
return;
|
|
3376
3368
|
}
|
|
3377
|
-
ve.current = o.range,
|
|
3378
|
-
const
|
|
3369
|
+
ve.current = o.range, ge();
|
|
3370
|
+
const he = mt(
|
|
3379
3371
|
xe(H),
|
|
3380
3372
|
rt.current
|
|
3381
3373
|
);
|
|
3382
|
-
ce("insertion.insertHtml",
|
|
3374
|
+
ce("insertion.insertHtml", he) || de(H, { asHtml: !0 });
|
|
3383
3375
|
} else
|
|
3384
3376
|
Tn(H);
|
|
3385
|
-
G &&
|
|
3377
|
+
G && Se(), Ze($("editor.ai.actionDone")), (Z = Wt.current) == null || Z.call(Wt, {
|
|
3386
3378
|
action: e,
|
|
3387
|
-
template:
|
|
3379
|
+
template: a,
|
|
3388
3380
|
scope: o.scope,
|
|
3389
3381
|
previousHtml: b,
|
|
3390
3382
|
undo: () => Tn(b)
|
|
3391
3383
|
});
|
|
3392
3384
|
}).catch((x) => {
|
|
3393
3385
|
var H;
|
|
3394
|
-
if (Qe(!1), !(l.signal.aborted ||
|
|
3386
|
+
if (Qe(!1), !(l.signal.aborted || vs(x))) {
|
|
3395
3387
|
if (Gr(x) && ((H = je.current) == null || H.call(je), fn.current)) {
|
|
3396
3388
|
mn(!0), De(!0);
|
|
3397
3389
|
return;
|
|
@@ -3399,30 +3391,30 @@ const Ss = Zo(
|
|
|
3399
3391
|
Vt(!0), Ze("");
|
|
3400
3392
|
}
|
|
3401
3393
|
}).finally(() => {
|
|
3402
|
-
|
|
3394
|
+
Le.current === l && (Le.current = null, Qe(!1), An(null), ct());
|
|
3403
3395
|
});
|
|
3404
3396
|
},
|
|
3405
3397
|
[
|
|
3406
3398
|
G,
|
|
3407
3399
|
lt,
|
|
3408
|
-
|
|
3400
|
+
Se,
|
|
3409
3401
|
ct,
|
|
3410
3402
|
Qe,
|
|
3411
3403
|
le,
|
|
3412
|
-
|
|
3404
|
+
ge,
|
|
3413
3405
|
ce,
|
|
3414
3406
|
de,
|
|
3415
3407
|
Tn,
|
|
3416
|
-
|
|
3408
|
+
hr,
|
|
3417
3409
|
$
|
|
3418
3410
|
]
|
|
3419
3411
|
), xt = v(
|
|
3420
|
-
(e, r, o,
|
|
3412
|
+
(e, r, o, a) => {
|
|
3421
3413
|
if (ke) {
|
|
3422
|
-
Gt.current = () => En(e, r, o,
|
|
3414
|
+
Gt.current = () => En(e, r, o, a), Xe.current = "action", wt("action");
|
|
3423
3415
|
return;
|
|
3424
3416
|
}
|
|
3425
|
-
En(e, r, o,
|
|
3417
|
+
En(e, r, o, a);
|
|
3426
3418
|
},
|
|
3427
3419
|
[ke, En]
|
|
3428
3420
|
), pr = v(
|
|
@@ -3430,7 +3422,7 @@ const Ss = Zo(
|
|
|
3430
3422
|
const o = Y == null ? void 0 : Y.onRun;
|
|
3431
3423
|
o && xt(
|
|
3432
3424
|
"template",
|
|
3433
|
-
(
|
|
3425
|
+
(a) => o({ ...a, template: e }),
|
|
3434
3426
|
r,
|
|
3435
3427
|
e
|
|
3436
3428
|
);
|
|
@@ -3438,35 +3430,35 @@ const Ss = Zo(
|
|
|
3438
3430
|
[Y, xt]
|
|
3439
3431
|
), br = v(() => {
|
|
3440
3432
|
var e;
|
|
3441
|
-
(e =
|
|
3433
|
+
(e = Le.current) == null || e.abort(), Le.current = null, Qe(!1), An(null), Ze(""), ct();
|
|
3442
3434
|
}, [Qe, ct]), vr = C(null);
|
|
3443
|
-
|
|
3435
|
+
S(() => {
|
|
3444
3436
|
const e = Ue ?? fr.current;
|
|
3445
3437
|
if (!e) return;
|
|
3446
3438
|
const r = e === "template" ? "ai-templates" : `ai-${e}`, o = requestAnimationFrame(() => {
|
|
3447
3439
|
var l, b;
|
|
3448
|
-
const
|
|
3449
|
-
|
|
3440
|
+
const a = document.activeElement;
|
|
3441
|
+
a && a !== document.body && a.isConnected || (b = (l = vr.current) == null ? void 0 : l.querySelector(`[data-component-part="${r}"]`)) == null || b.focus();
|
|
3450
3442
|
});
|
|
3451
3443
|
return () => cancelAnimationFrame(o);
|
|
3452
|
-
}, [Ue]),
|
|
3444
|
+
}, [Ue]), S(() => () => {
|
|
3453
3445
|
var e;
|
|
3454
|
-
return (e =
|
|
3455
|
-
}, []),
|
|
3446
|
+
return (e = Le.current) == null ? void 0 : e.abort();
|
|
3447
|
+
}, []), S(() => {
|
|
3456
3448
|
const e = ee.current;
|
|
3457
3449
|
if (!e) return;
|
|
3458
3450
|
e.value = bo.current, ze.current();
|
|
3459
|
-
const r =
|
|
3451
|
+
const r = Cs(q);
|
|
3460
3452
|
if (!r) {
|
|
3461
3453
|
Vn(!0);
|
|
3462
3454
|
return;
|
|
3463
3455
|
}
|
|
3464
|
-
if (te.current = r, e.value = mt(e.value, rt.current),
|
|
3456
|
+
if (te.current = r, e.value = mt(e.value, rt.current), h === void 0 && (f == null ? void 0 : f.lang) === void 0 && r.addLang && r.lang) {
|
|
3465
3457
|
const x = `alfadocs-${Pe}`;
|
|
3466
3458
|
r.addLang(x, $r($)), Me.current = x;
|
|
3467
3459
|
}
|
|
3468
3460
|
const o = {
|
|
3469
|
-
lang: Me.current ??
|
|
3461
|
+
lang: Me.current ?? h ?? Es(Gn.language || "en"),
|
|
3470
3462
|
// The kit renders its OWN toolbar (EditorToolbar) and drives Redactor
|
|
3471
3463
|
// via the command API, so Redactor's native toolbar is suppressed.
|
|
3472
3464
|
toolbar: !1,
|
|
@@ -3481,9 +3473,9 @@ const Ss = Zo(
|
|
|
3481
3473
|
// second, untokenised, mouse-only UI competing with ours.
|
|
3482
3474
|
imageEditable: !1,
|
|
3483
3475
|
imageResizable: !1
|
|
3484
|
-
},
|
|
3476
|
+
}, a = z ? { imageUpload: z } : {}, l = (f == null ? void 0 : f.callbacks) ?? {}, b = {
|
|
3485
3477
|
...o,
|
|
3486
|
-
...
|
|
3478
|
+
...a,
|
|
3487
3479
|
...f ?? {},
|
|
3488
3480
|
// Re-pin safety-critical keys LAST so consumer `options` can't override
|
|
3489
3481
|
// the sanitising change handler or re-enable Redactor's native image UI
|
|
@@ -3496,12 +3488,12 @@ const Ss = Zo(
|
|
|
3496
3488
|
ze.current();
|
|
3497
3489
|
const H = Yt(
|
|
3498
3490
|
Fr(jr(x))
|
|
3499
|
-
), Z = xe(H),
|
|
3500
|
-
if (
|
|
3501
|
-
|
|
3491
|
+
), Z = xe(H), he = wr.current;
|
|
3492
|
+
if (he && Date.now() < he.until && Vr(Z) === he.text) {
|
|
3493
|
+
_t.current = Z;
|
|
3502
3494
|
return;
|
|
3503
3495
|
}
|
|
3504
|
-
Z !==
|
|
3496
|
+
Z !== _t.current && (_t.current = Z, an.current = !0, fe.current && (vt.current && clearTimeout(vt.current), vt.current = setTimeout(() => {
|
|
3505
3497
|
var Te;
|
|
3506
3498
|
(Te = fe.current) == null || Te.call(fe, { html: Z, markdown: "" });
|
|
3507
3499
|
}, 100)));
|
|
@@ -3516,7 +3508,7 @@ const Ss = Zo(
|
|
|
3516
3508
|
}
|
|
3517
3509
|
};
|
|
3518
3510
|
try {
|
|
3519
|
-
if (r(D, b),
|
|
3511
|
+
if (r(D, b), _t.current = xe(
|
|
3520
3512
|
Yt(Fr(le()))
|
|
3521
3513
|
), ze.current(), m)
|
|
3522
3514
|
try {
|
|
@@ -3534,7 +3526,7 @@ const Ss = Zo(
|
|
|
3534
3526
|
}
|
|
3535
3527
|
Me.current && r.lang && delete r.lang[Me.current], Me.current = null, te.current = null;
|
|
3536
3528
|
};
|
|
3537
|
-
}, []),
|
|
3529
|
+
}, []), S(() => {
|
|
3538
3530
|
const e = te.current, r = Me.current;
|
|
3539
3531
|
if (!(!(e != null && e.addLang) || !r)) {
|
|
3540
3532
|
e.addLang(r, $r($));
|
|
@@ -3547,21 +3539,21 @@ const Ss = Zo(
|
|
|
3547
3539
|
const yr = C(me), wr = C(
|
|
3548
3540
|
null
|
|
3549
3541
|
);
|
|
3550
|
-
|
|
3551
|
-
var o,
|
|
3542
|
+
S(() => {
|
|
3543
|
+
var o, a;
|
|
3552
3544
|
if (yr.current === me || (yr.current = me, !te.current || me.size === 0)) return;
|
|
3553
3545
|
const e = le(), r = mt(e, me);
|
|
3554
3546
|
if (r !== e) {
|
|
3555
|
-
const l = (o = W.current) == null ? void 0 : o.querySelector(".redactor-in"), x = l != null && l.contains(document.activeElement) && l ?
|
|
3547
|
+
const l = (o = W.current) == null ? void 0 : o.querySelector(".redactor-in"), x = l != null && l.contains(document.activeElement) && l ? ws(l) : null;
|
|
3556
3548
|
wr.current = {
|
|
3557
3549
|
text: Vr(e),
|
|
3558
3550
|
until: Date.now() + 1e3
|
|
3559
3551
|
}, ce("source.setCode", r);
|
|
3560
|
-
const H = (
|
|
3561
|
-
x !== null && H &&
|
|
3552
|
+
const H = (a = W.current) == null ? void 0 : a.querySelector(".redactor-in");
|
|
3553
|
+
x !== null && H && ks(H, x);
|
|
3562
3554
|
}
|
|
3563
3555
|
window.requestAnimationFrame(() => ze.current());
|
|
3564
|
-
}, [me, le, ce]),
|
|
3556
|
+
}, [me, le, ce]), S(() => {
|
|
3565
3557
|
if (!te.current || c === void 0) return;
|
|
3566
3558
|
if (an.current) {
|
|
3567
3559
|
an.current = !1;
|
|
@@ -3572,7 +3564,7 @@ const Ss = Zo(
|
|
|
3572
3564
|
rt.current
|
|
3573
3565
|
);
|
|
3574
3566
|
Yt(le()) !== e && ce("source.setCode", e);
|
|
3575
|
-
}, [c, le, ce]),
|
|
3567
|
+
}, [c, le, ce]), S(() => {
|
|
3576
3568
|
Mt.current = m;
|
|
3577
3569
|
const e = te.current;
|
|
3578
3570
|
if (e)
|
|
@@ -3580,7 +3572,7 @@ const Ss = Zo(
|
|
|
3580
3572
|
e(D, m ? "enableReadOnly" : "disableReadOnly");
|
|
3581
3573
|
} catch {
|
|
3582
3574
|
}
|
|
3583
|
-
}, [m, D]),
|
|
3575
|
+
}, [m, D]), S(() => {
|
|
3584
3576
|
if (!ue || c === void 0) return;
|
|
3585
3577
|
const e = ee.current;
|
|
3586
3578
|
if (!e) return;
|
|
@@ -3599,7 +3591,7 @@ const Ss = Zo(
|
|
|
3599
3591
|
return "";
|
|
3600
3592
|
},
|
|
3601
3593
|
isAiBusy() {
|
|
3602
|
-
return
|
|
3594
|
+
return Le.current !== null;
|
|
3603
3595
|
},
|
|
3604
3596
|
setContent(e) {
|
|
3605
3597
|
const r = xe(e);
|
|
@@ -3610,7 +3602,7 @@ const Ss = Zo(
|
|
|
3610
3602
|
},
|
|
3611
3603
|
insertAtCursor: de,
|
|
3612
3604
|
applyFormat(e) {
|
|
3613
|
-
const r =
|
|
3605
|
+
const r = As[e];
|
|
3614
3606
|
r && Ke(...r);
|
|
3615
3607
|
},
|
|
3616
3608
|
focus() {
|
|
@@ -3630,7 +3622,7 @@ const Ss = Zo(
|
|
|
3630
3622
|
}),
|
|
3631
3623
|
[D, le, ce, de, Ke]
|
|
3632
3624
|
);
|
|
3633
|
-
Qo(
|
|
3625
|
+
Qo(ao, () => Oe, [Oe]), ra(Ii, Oe, n);
|
|
3634
3626
|
const $o = v(
|
|
3635
3627
|
(e) => {
|
|
3636
3628
|
var r;
|
|
@@ -3641,10 +3633,10 @@ const Ss = Zo(
|
|
|
3641
3633
|
},
|
|
3642
3634
|
[]
|
|
3643
3635
|
), Xt = p ?? $("editor.regionLabel"), Nn = f == null ? void 0 : f.placeholder, Ct = typeof Nn == "string" || Nn === !1 ? Nn : u ?? $("editor.placeholder");
|
|
3644
|
-
|
|
3645
|
-
var
|
|
3636
|
+
S(() => {
|
|
3637
|
+
var a;
|
|
3646
3638
|
if (ue) return;
|
|
3647
|
-
const e = (
|
|
3639
|
+
const e = (a = W.current) == null ? void 0 : a.querySelector(".redactor-in");
|
|
3648
3640
|
if (!e) return;
|
|
3649
3641
|
const r = () => {
|
|
3650
3642
|
e.getAttribute("role") !== "textbox" && e.setAttribute("role", "textbox"), e.getAttribute("aria-multiline") !== "true" && e.setAttribute("aria-multiline", "true"), e.getAttribute("aria-label") !== Xt && e.setAttribute("aria-label", Xt), Ct === !1 ? e.hasAttribute("placeholder") && e.removeAttribute("placeholder") : e.getAttribute("placeholder") !== Ct && e.setAttribute("placeholder", Ct), e.hasAttribute("aria-labelledby") && e.removeAttribute("aria-labelledby");
|
|
@@ -3658,12 +3650,12 @@ const Ss = Zo(
|
|
|
3658
3650
|
}, [ue, Xt, Ct]);
|
|
3659
3651
|
const Ut = Ue !== null, Do = v(
|
|
3660
3652
|
(e) => {
|
|
3661
|
-
|
|
3653
|
+
Sn.test(e) && (ue ? de(`[[${e}]]`, { asHtml: !1 }) : (ge(), Ve(Wr(e))), J == null || J(e));
|
|
3662
3654
|
},
|
|
3663
3655
|
[
|
|
3664
3656
|
ue,
|
|
3665
3657
|
de,
|
|
3666
|
-
|
|
3658
|
+
ge,
|
|
3667
3659
|
Ve,
|
|
3668
3660
|
J
|
|
3669
3661
|
]
|
|
@@ -3705,7 +3697,7 @@ const Ss = Zo(
|
|
|
3705
3697
|
}, [$e, xr]), Je = [];
|
|
3706
3698
|
if (F && Je.push({
|
|
3707
3699
|
key: "dictate",
|
|
3708
|
-
icon: we ? /* @__PURE__ */ t(Tt, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : /* @__PURE__ */ t(
|
|
3700
|
+
icon: we ? /* @__PURE__ */ t(Tt, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : /* @__PURE__ */ t(_n, { "aria-hidden": "true", className: "ds:size-5" }),
|
|
3709
3701
|
label: $(we ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
|
|
3710
3702
|
onClick: () => lr("document"),
|
|
3711
3703
|
recording: we
|
|
@@ -3725,12 +3717,12 @@ const Ss = Zo(
|
|
|
3725
3717
|
const Ar = kr("format", pe);
|
|
3726
3718
|
Ar && Je.push(Ar), (V || Be) && Je.push({
|
|
3727
3719
|
key: "write",
|
|
3728
|
-
icon: /* @__PURE__ */ t(
|
|
3720
|
+
icon: /* @__PURE__ */ t(_r, { "aria-hidden": "true", className: "ds:size-5" }),
|
|
3729
3721
|
label: $("editor.ai.helpMeWrite"),
|
|
3730
3722
|
onClick: () => cr("document")
|
|
3731
3723
|
});
|
|
3732
3724
|
const Tr = (e, r) => Y ? /* @__PURE__ */ t(
|
|
3733
|
-
|
|
3725
|
+
us,
|
|
3734
3726
|
{
|
|
3735
3727
|
side: r === "document" ? "top" : "bottom",
|
|
3736
3728
|
templates: Y.templates,
|
|
@@ -3741,39 +3733,39 @@ const Ss = Zo(
|
|
|
3741
3733
|
trigger: e
|
|
3742
3734
|
}
|
|
3743
3735
|
) : null, Er = (w ?? []).filter(
|
|
3744
|
-
(e) => !e.contexts ||
|
|
3736
|
+
(e) => !e.contexts || L !== void 0 && e.contexts.includes(L)
|
|
3745
3737
|
);
|
|
3746
|
-
|
|
3738
|
+
S(() => {
|
|
3747
3739
|
(pt || jt !== null || m) && Re(!1);
|
|
3748
|
-
}, [pt, jt, m, Re]),
|
|
3740
|
+
}, [pt, jt, m, Re]), S(() => {
|
|
3749
3741
|
be && !(w ?? []).some(
|
|
3750
|
-
(e) => e.id === be.extension.id && (!e.contexts ||
|
|
3742
|
+
(e) => e.id === be.extension.id && (!e.contexts || L !== void 0 && e.contexts.includes(L))
|
|
3751
3743
|
) && Re();
|
|
3752
|
-
}, [w,
|
|
3744
|
+
}, [w, L, be, Re]);
|
|
3753
3745
|
const Ko = (e) => {
|
|
3754
3746
|
var Te, dt;
|
|
3755
3747
|
if (ln) return;
|
|
3756
3748
|
un(), De(!1), Cn();
|
|
3757
3749
|
const r = new AbortController();
|
|
3758
3750
|
bt.current = r;
|
|
3759
|
-
const o = (Te = ve.current) == null ? void 0 : Te.cloneRange(),
|
|
3751
|
+
const o = (Te = ve.current) == null ? void 0 : Te.cloneRange(), a = ee.current ? [
|
|
3760
3752
|
ee.current.selectionStart,
|
|
3761
3753
|
ee.current.selectionEnd
|
|
3762
|
-
] : null, l = (o == null ? void 0 : o.toString()) ?? (
|
|
3754
|
+
] : null, l = (o == null ? void 0 : o.toString()) ?? (a ? (((dt = ee.current) == null ? void 0 : dt.value) ?? "").slice(...a) : "");
|
|
3763
3755
|
let b = !1;
|
|
3764
|
-
const x = (
|
|
3765
|
-
var
|
|
3766
|
-
b || (b = !0, (
|
|
3756
|
+
const x = (ae) => {
|
|
3757
|
+
var _e;
|
|
3758
|
+
b || (b = !0, (_e = Rt.current) == null || _e.call(Rt, e.id, ae));
|
|
3767
3759
|
};
|
|
3768
3760
|
Fe.current = x;
|
|
3769
3761
|
const H = () => {
|
|
3770
3762
|
r.signal.aborted || (x({ status: "error" }), r.abort(), cn(!1), Xn(!0), dn());
|
|
3771
|
-
}, Z = async (
|
|
3763
|
+
}, Z = async (ae) => {
|
|
3772
3764
|
var ut;
|
|
3773
3765
|
if (r.signal.aborted) return;
|
|
3774
|
-
let
|
|
3775
|
-
if (
|
|
3776
|
-
const et = await
|
|
3766
|
+
let _e = ae.mode === "image" ? "" : ae.html;
|
|
3767
|
+
if (ae.mode !== "text") {
|
|
3768
|
+
const et = await ae.pngDataUri();
|
|
3777
3769
|
if (r.signal.aborted) return;
|
|
3778
3770
|
const At = await (await fetch(et.dataUri, { signal: r.signal })).blob(), Rn = await tr(
|
|
3779
3771
|
new File([At], "extension-result.png", { type: "image/png" }),
|
|
@@ -3781,10 +3773,10 @@ const Ss = Zo(
|
|
|
3781
3773
|
);
|
|
3782
3774
|
if (r.signal.aborted) return;
|
|
3783
3775
|
const He = document.createElement("img");
|
|
3784
|
-
He.src = Rn, He.alt =
|
|
3776
|
+
He.src = Rn, He.alt = ae.text, He.width = et.width, He.height = et.height, He.loading = "lazy", _e += He.outerHTML;
|
|
3785
3777
|
}
|
|
3786
|
-
r.signal.aborted || (o && (ve.current = o.cloneRange()),
|
|
3787
|
-
},
|
|
3778
|
+
r.signal.aborted || (o && (ve.current = o.cloneRange()), a && ((ut = ee.current) == null || ut.setSelectionRange(...a)), ge(), de(_e, { asHtml: !0 }), x({ status: "success" }), Re());
|
|
3779
|
+
}, he = {
|
|
3788
3780
|
html: Oe.getHTML(),
|
|
3789
3781
|
text: Oe.getText(),
|
|
3790
3782
|
selectionText: l,
|
|
@@ -3793,20 +3785,20 @@ const Ss = Zo(
|
|
|
3793
3785
|
close: () => {
|
|
3794
3786
|
bt.current === r && Re();
|
|
3795
3787
|
},
|
|
3796
|
-
insert: async (
|
|
3788
|
+
insert: async (ae) => {
|
|
3797
3789
|
try {
|
|
3798
|
-
await Z(
|
|
3790
|
+
await Z(ae);
|
|
3799
3791
|
} catch {
|
|
3800
3792
|
H();
|
|
3801
3793
|
}
|
|
3802
3794
|
}
|
|
3803
3795
|
};
|
|
3804
|
-
Wn({ extension: e, context:
|
|
3796
|
+
Wn({ extension: e, context: he }), e.kind === "action" && (cn(!0), (async () => {
|
|
3805
3797
|
try {
|
|
3806
3798
|
if (!e.run) throw new Error("Missing extension run");
|
|
3807
|
-
const
|
|
3799
|
+
const ae = await e.run(he);
|
|
3808
3800
|
if (r.signal.aborted) return;
|
|
3809
|
-
|
|
3801
|
+
ae ? await Z(ae) : (x({ status: "success" }), Re());
|
|
3810
3802
|
} catch {
|
|
3811
3803
|
H();
|
|
3812
3804
|
}
|
|
@@ -3821,7 +3813,7 @@ const Ss = Zo(
|
|
|
3821
3813
|
), Vo = Nr.every(
|
|
3822
3814
|
(e) => e.length > 0
|
|
3823
3815
|
), Wo = Er.length > 0 ? /* @__PURE__ */ t(
|
|
3824
|
-
|
|
3816
|
+
Hs,
|
|
3825
3817
|
{
|
|
3826
3818
|
groupedExtensions: Nr,
|
|
3827
3819
|
showExtensionGroups: Vo,
|
|
@@ -3831,7 +3823,7 @@ const Ss = Zo(
|
|
|
3831
3823
|
openExtension: Ko,
|
|
3832
3824
|
closeExtension: Re,
|
|
3833
3825
|
saveSelection: st,
|
|
3834
|
-
closeSignal:
|
|
3826
|
+
closeSignal: io,
|
|
3835
3827
|
restoreFocusOnCloseRef: Un
|
|
3836
3828
|
}
|
|
3837
3829
|
) : void 0, Mr = !!(V || Be), Rr = !!(Y || Q || pe || Mr || F), Xo = !ue && !m && (oe ?? Rr), Uo = v(
|
|
@@ -3845,21 +3837,21 @@ const Ss = Zo(
|
|
|
3845
3837
|
"div",
|
|
3846
3838
|
{
|
|
3847
3839
|
ref: W,
|
|
3848
|
-
className: [
|
|
3840
|
+
className: [Ns(), _].filter(Boolean).join(" "),
|
|
3849
3841
|
"data-component": "rich-text-editor",
|
|
3850
3842
|
"data-component-id": n,
|
|
3851
3843
|
"data-min-height": y,
|
|
3852
3844
|
children: [
|
|
3853
3845
|
!ue && !m ? /* @__PURE__ */ t(
|
|
3854
|
-
|
|
3846
|
+
gs,
|
|
3855
3847
|
{
|
|
3856
3848
|
run: Ke,
|
|
3857
3849
|
active: bn,
|
|
3858
|
-
preset:
|
|
3850
|
+
preset: g,
|
|
3859
3851
|
insertHtml: Ve,
|
|
3860
3852
|
insertTable: Mo,
|
|
3861
3853
|
saveSelection: st,
|
|
3862
|
-
restoreSelection:
|
|
3854
|
+
restoreSelection: ge,
|
|
3863
3855
|
getSelectedText: xo,
|
|
3864
3856
|
uploadImage: z || M ? tr : void 0,
|
|
3865
3857
|
enableColor: (d == null ? void 0 : d.includes("fontcolor")) ?? !1,
|
|
@@ -3872,7 +3864,7 @@ const Ss = Zo(
|
|
|
3872
3864
|
insertVariable: Do
|
|
3873
3865
|
}
|
|
3874
3866
|
) : null,
|
|
3875
|
-
/* @__PURE__ */ A("div", { className: "ds:relative", ref:
|
|
3867
|
+
/* @__PURE__ */ A("div", { className: "ds:relative", ref: gt, children: [
|
|
3876
3868
|
/* @__PURE__ */ t(
|
|
3877
3869
|
"textarea",
|
|
3878
3870
|
{
|
|
@@ -3884,7 +3876,7 @@ const Ss = Zo(
|
|
|
3884
3876
|
placeholder: Ct || void 0,
|
|
3885
3877
|
onChange: ue ? $o : void 0,
|
|
3886
3878
|
readOnly: ue ? m : void 0,
|
|
3887
|
-
className: ue ?
|
|
3879
|
+
className: ue ? Rs() : void 0
|
|
3888
3880
|
}
|
|
3889
3881
|
),
|
|
3890
3882
|
Ut ? /* @__PURE__ */ t(
|
|
@@ -3903,7 +3895,7 @@ const Ss = Zo(
|
|
|
3903
3895
|
className: "ds:absolute ds:[inset-block-end:var(--spacing-md)] ds:[inset-inline-end:var(--spacing-md)] ds:z-10",
|
|
3904
3896
|
"data-ai-sparkle": We.props["data-ai-sparkle"],
|
|
3905
3897
|
children: [
|
|
3906
|
-
/* @__PURE__ */ A("div", { className:
|
|
3898
|
+
/* @__PURE__ */ A("div", { className: ea, children: [
|
|
3907
3899
|
Je.map((e, r) => {
|
|
3908
3900
|
const o = /* @__PURE__ */ t(
|
|
3909
3901
|
"button",
|
|
@@ -3916,16 +3908,16 @@ const Ss = Zo(
|
|
|
3916
3908
|
"data-component-part": `ai-${e.key}`,
|
|
3917
3909
|
disabled: Ut && !e.running || void 0,
|
|
3918
3910
|
"aria-label": e.label,
|
|
3919
|
-
className: e.recording ?
|
|
3911
|
+
className: e.recording ? Ss : zs,
|
|
3920
3912
|
children: e.icon
|
|
3921
3913
|
}
|
|
3922
3914
|
);
|
|
3923
|
-
return /* @__PURE__ */ A(
|
|
3915
|
+
return /* @__PURE__ */ A(ht, { children: [
|
|
3924
3916
|
r > 0 ? /* @__PURE__ */ t(
|
|
3925
3917
|
"span",
|
|
3926
3918
|
{
|
|
3927
3919
|
"aria-hidden": "true",
|
|
3928
|
-
className:
|
|
3920
|
+
className: ta
|
|
3929
3921
|
}
|
|
3930
3922
|
) : null,
|
|
3931
3923
|
ft(
|
|
@@ -3938,21 +3930,21 @@ const Ss = Zo(
|
|
|
3938
3930
|
"span",
|
|
3939
3931
|
{
|
|
3940
3932
|
"aria-hidden": "true",
|
|
3941
|
-
className:
|
|
3933
|
+
className: `${na} ${We.props.className}`
|
|
3942
3934
|
}
|
|
3943
3935
|
) : null
|
|
3944
3936
|
] }),
|
|
3945
|
-
/* @__PURE__ */ t(
|
|
3937
|
+
/* @__PURE__ */ t(aa, { state: We.state })
|
|
3946
3938
|
]
|
|
3947
3939
|
}
|
|
3948
3940
|
) : null,
|
|
3949
3941
|
/* @__PURE__ */ t(
|
|
3950
|
-
|
|
3942
|
+
Ln,
|
|
3951
3943
|
{
|
|
3952
3944
|
open: !!(be && (!ln || sn)),
|
|
3953
3945
|
onClose: Re,
|
|
3954
|
-
title: be ?
|
|
3955
|
-
children: sn ? /* @__PURE__ */ t(
|
|
3946
|
+
title: be ? Yr($, be.extension.label) : void 0,
|
|
3947
|
+
children: sn ? /* @__PURE__ */ t(Qr, {}) : /* @__PURE__ */ t("div", { className: "ds:overflow-y-auto ds:[max-block-size:min(60dvh,calc(var(--rich-text-editor-min-block-size)*3))]", children: (Sr = be == null ? void 0 : (zr = be.extension).render) == null ? void 0 : Sr.call(
|
|
3956
3948
|
zr,
|
|
3957
3949
|
be.context
|
|
3958
3950
|
) })
|
|
@@ -3971,7 +3963,7 @@ const Ss = Zo(
|
|
|
3971
3963
|
// All three write seams put AI output into the note, so
|
|
3972
3964
|
// each one is an action landing and sparkles the pill.
|
|
3973
3965
|
insertAtSelection: (e) => {
|
|
3974
|
-
zt.current && (ve.current = zt.current.cloneRange()),
|
|
3966
|
+
zt.current && (ve.current = zt.current.cloneRange()), ge(), de(e, { asHtml: !0 }), G && Se();
|
|
3975
3967
|
},
|
|
3976
3968
|
insertAfterSelection: (e) => {
|
|
3977
3969
|
const r = zt.current ?? ve.current;
|
|
@@ -3979,21 +3971,21 @@ const Ss = Zo(
|
|
|
3979
3971
|
const o = r.cloneRange();
|
|
3980
3972
|
o.collapse(!1), ve.current = o;
|
|
3981
3973
|
}
|
|
3982
|
-
|
|
3974
|
+
ge(), de(e, { asHtml: !0 }), G && Se();
|
|
3983
3975
|
},
|
|
3984
3976
|
setContent: (e) => {
|
|
3985
|
-
Oe.setContent(e), G &&
|
|
3977
|
+
Oe.setContent(e), G && Se();
|
|
3986
3978
|
},
|
|
3987
3979
|
onDictate: F,
|
|
3988
3980
|
privacyNotice: dr
|
|
3989
3981
|
}) : V ? /* @__PURE__ */ t(
|
|
3990
|
-
|
|
3982
|
+
qi,
|
|
3991
3983
|
{
|
|
3992
3984
|
open: pt && !ke,
|
|
3993
3985
|
onClose: () => De(!1),
|
|
3994
3986
|
onRequestAiDraft: V,
|
|
3995
3987
|
onInsert: (e) => {
|
|
3996
|
-
|
|
3988
|
+
ge(), de(e, { asHtml: O !== "text" }), G && Se();
|
|
3997
3989
|
},
|
|
3998
3990
|
previewAsHtml: O !== "text",
|
|
3999
3991
|
privacyNotice: dr,
|
|
@@ -4001,7 +3993,7 @@ const Ss = Zo(
|
|
|
4001
3993
|
}
|
|
4002
3994
|
) : null,
|
|
4003
3995
|
E ? /* @__PURE__ */ t(
|
|
4004
|
-
|
|
3996
|
+
Ln,
|
|
4005
3997
|
{
|
|
4006
3998
|
open: jt !== null,
|
|
4007
3999
|
onClose: Cn,
|
|
@@ -4011,14 +4003,14 @@ const Ss = Zo(
|
|
|
4011
4003
|
),
|
|
4012
4004
|
footer: /* @__PURE__ */ t(Ee, { intent: "ghost", size: "sm", onClick: Cn, children: $("common.close") }),
|
|
4013
4005
|
children: /* @__PURE__ */ t(
|
|
4014
|
-
|
|
4006
|
+
ia,
|
|
4015
4007
|
{
|
|
4016
4008
|
granted: E.granted,
|
|
4017
4009
|
grantedAt: E.grantedAt,
|
|
4018
4010
|
grantedBy: E.grantedBy,
|
|
4019
4011
|
canGrant: (E.canGrant ?? !0) && E.onGrant !== void 0,
|
|
4020
|
-
pending:
|
|
4021
|
-
onGrantConsent:
|
|
4012
|
+
pending: Lo,
|
|
4013
|
+
onGrantConsent: _o,
|
|
4022
4014
|
headingLevel: U,
|
|
4023
4015
|
"aria-label": $(
|
|
4024
4016
|
"editor.ai.consentRegionLabel",
|
|
@@ -4030,11 +4022,11 @@ const Ss = Zo(
|
|
|
4030
4022
|
) : null
|
|
4031
4023
|
] }),
|
|
4032
4024
|
!ue && !m && ((d == null ? void 0 : d.includes("table")) ?? !1) ? /* @__PURE__ */ t(
|
|
4033
|
-
|
|
4025
|
+
es,
|
|
4034
4026
|
{
|
|
4035
4027
|
active: bn,
|
|
4036
4028
|
run: Ke,
|
|
4037
|
-
areaRef:
|
|
4029
|
+
areaRef: gt,
|
|
4038
4030
|
getActiveTableEl: Co,
|
|
4039
4031
|
enableColor: (d == null ? void 0 : d.includes("fontcolor")) ?? !1,
|
|
4040
4032
|
saveTableCell: Ao,
|
|
@@ -4042,20 +4034,20 @@ const Ss = Zo(
|
|
|
4042
4034
|
}
|
|
4043
4035
|
) : null,
|
|
4044
4036
|
!ue && !m ? /* @__PURE__ */ t(
|
|
4045
|
-
|
|
4037
|
+
ds,
|
|
4046
4038
|
{
|
|
4047
|
-
areaRef:
|
|
4048
|
-
activeImageEl:
|
|
4039
|
+
areaRef: gt,
|
|
4040
|
+
activeImageEl: go,
|
|
4049
4041
|
applyImageClass: Eo,
|
|
4050
4042
|
setImageWidth: No
|
|
4051
4043
|
}
|
|
4052
4044
|
) : null,
|
|
4053
4045
|
Xo ? /* @__PURE__ */ t(
|
|
4054
|
-
|
|
4046
|
+
hs,
|
|
4055
4047
|
{
|
|
4056
4048
|
active: bn,
|
|
4057
4049
|
run: Ke,
|
|
4058
|
-
areaRef:
|
|
4050
|
+
areaRef: gt,
|
|
4059
4051
|
getEditorRoot: Uo,
|
|
4060
4052
|
suppressed: Ut || pt || jt !== null || be !== null,
|
|
4061
4053
|
holdOpen: Bo,
|
|
@@ -4068,7 +4060,7 @@ const Ss = Zo(
|
|
|
4068
4060
|
intent: "ghost",
|
|
4069
4061
|
"data-component-part": "selection-ai-dictate",
|
|
4070
4062
|
onMouseDown: kt,
|
|
4071
|
-
icon: we ? /* @__PURE__ */ t(Tt, {}) : /* @__PURE__ */ t(
|
|
4063
|
+
icon: we ? /* @__PURE__ */ t(Tt, {}) : /* @__PURE__ */ t(_n, {}),
|
|
4072
4064
|
"aria-pressed": we,
|
|
4073
4065
|
...Jt(
|
|
4074
4066
|
$(we ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
|
|
@@ -4089,7 +4081,7 @@ const Ss = Zo(
|
|
|
4089
4081
|
"data-component-part": "selection-ai-templates",
|
|
4090
4082
|
onMouseDown: kt,
|
|
4091
4083
|
startIcon: /* @__PURE__ */ t(In, {}),
|
|
4092
|
-
endIcon: /* @__PURE__ */ t(
|
|
4084
|
+
endIcon: /* @__PURE__ */ t(Zr, {}),
|
|
4093
4085
|
children: $("editor.ai.templates")
|
|
4094
4086
|
}
|
|
4095
4087
|
),
|
|
@@ -4149,7 +4141,7 @@ const Ss = Zo(
|
|
|
4149
4141
|
intent: "ghost",
|
|
4150
4142
|
"data-component-part": "selection-ai-write",
|
|
4151
4143
|
onMouseDown: kt,
|
|
4152
|
-
icon: /* @__PURE__ */ t(
|
|
4144
|
+
icon: /* @__PURE__ */ t(_r, {}),
|
|
4153
4145
|
...Jt(
|
|
4154
4146
|
$("editor.ai.helpMeWrite"),
|
|
4155
4147
|
!!Ae
|
|
@@ -4162,22 +4154,22 @@ const Ss = Zo(
|
|
|
4162
4154
|
] }) : null
|
|
4163
4155
|
}
|
|
4164
4156
|
) : null,
|
|
4165
|
-
|
|
4157
|
+
it ? /* @__PURE__ */ t(
|
|
4166
4158
|
"div",
|
|
4167
4159
|
{
|
|
4168
|
-
className:
|
|
4160
|
+
className: Ms,
|
|
4169
4161
|
style: {
|
|
4170
|
-
"--rte-typeahead-x": `${
|
|
4171
|
-
"--rte-typeahead-y": `${
|
|
4162
|
+
"--rte-typeahead-x": `${it.left}px`,
|
|
4163
|
+
"--rte-typeahead-y": `${it.top}px`
|
|
4172
4164
|
},
|
|
4173
4165
|
children: /* @__PURE__ */ t(
|
|
4174
|
-
|
|
4166
|
+
Ur,
|
|
4175
4167
|
{
|
|
4176
4168
|
ref: Jn,
|
|
4177
4169
|
id: wn,
|
|
4178
4170
|
variables: Qn,
|
|
4179
4171
|
recentTokens: K,
|
|
4180
|
-
query:
|
|
4172
|
+
query: it.query,
|
|
4181
4173
|
onQueryChange: ko,
|
|
4182
4174
|
onSelect: yo,
|
|
4183
4175
|
onClose: wo,
|
|
@@ -4189,14 +4181,14 @@ const Ss = Zo(
|
|
|
4189
4181
|
) : null
|
|
4190
4182
|
] }),
|
|
4191
4183
|
F ? /* @__PURE__ */ t("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: zo }) : null,
|
|
4192
|
-
|
|
4184
|
+
at.length > 0 ? /* @__PURE__ */ t(
|
|
4193
4185
|
"p",
|
|
4194
4186
|
{
|
|
4195
4187
|
id: `${Pe}-variables-error`,
|
|
4196
4188
|
role: "alert",
|
|
4197
4189
|
className: "ds:m-0 ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--destructive)]",
|
|
4198
4190
|
children: $("editor.variableInvalid", {
|
|
4199
|
-
tokens:
|
|
4191
|
+
tokens: at.map((e) => `[[${e}]]`).join(", ")
|
|
4200
4192
|
})
|
|
4201
4193
|
}
|
|
4202
4194
|
) : null,
|
|
@@ -4222,10 +4214,10 @@ const Ss = Zo(
|
|
|
4222
4214
|
);
|
|
4223
4215
|
}
|
|
4224
4216
|
);
|
|
4225
|
-
|
|
4217
|
+
Is.displayName = "RichTextEditor";
|
|
4226
4218
|
export {
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4219
|
+
Is as R,
|
|
4220
|
+
Ii as r,
|
|
4221
|
+
Ns as w
|
|
4230
4222
|
};
|
|
4231
|
-
//# sourceMappingURL=rich-text-editor-
|
|
4223
|
+
//# sourceMappingURL=rich-text-editor-CkFfmA3v.js.map
|