@alfadocs/ui-kit-debug 0.64.0 → 0.66.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{agenda-tray-DA6qj8BL.js → agenda-tray-Bh1KfEOG.js} +2 -2
- package/dist/_chunks/{agenda-tray-DA6qj8BL.js.map → agenda-tray-Bh1KfEOG.js.map} +1 -1
- package/dist/_chunks/{ai-consent-banner-DBKV27je.js → ai-consent-banner-Btzmk8OH.js} +3 -2
- package/dist/_chunks/{ai-consent-banner-DBKV27je.js.map → ai-consent-banner-Btzmk8OH.js.map} +1 -1
- package/dist/_chunks/{ai-prompt-input-Dx8eXoPm.js → ai-prompt-input-BwEACCPm.js} +2 -2
- package/dist/_chunks/{ai-prompt-input-Dx8eXoPm.js.map → ai-prompt-input-BwEACCPm.js.map} +1 -1
- package/dist/_chunks/{ai-tools-rail-7tC3GT4h.js → ai-tools-rail-DAfaW8eA.js} +65 -56
- package/dist/_chunks/ai-tools-rail-DAfaW8eA.js.map +1 -0
- package/dist/_chunks/{alia-sidebar-DlvyXgVC.js → alia-sidebar-CN8pA6c-.js} +7 -7
- package/dist/_chunks/{alia-sidebar-DlvyXgVC.js.map → alia-sidebar-CN8pA6c-.js.map} +1 -1
- package/dist/_chunks/{anamnesis-card-CmkBVAln.js → anamnesis-card-qeLYRG79.js} +2 -2
- package/dist/_chunks/{anamnesis-card-CmkBVAln.js.map → anamnesis-card-qeLYRG79.js.map} +1 -1
- package/dist/_chunks/{antenatal-schedule-timeline-CdiqkF05.js → antenatal-schedule-timeline-BfzFjEyb.js} +3 -3
- package/dist/_chunks/{antenatal-schedule-timeline-CdiqkF05.js.map → antenatal-schedule-timeline-BfzFjEyb.js.map} +1 -1
- package/dist/_chunks/{appointment-tray-BwDHhWWC.js → appointment-tray-BQnJEora.js} +2 -2
- package/dist/_chunks/{appointment-tray-BwDHhWWC.js.map → appointment-tray-BQnJEora.js.map} +1 -1
- package/dist/_chunks/{ar-C68WKG5a.js → ar-Cn5Fq48Z.js} +2 -2
- package/dist/_chunks/{ar-C68WKG5a.js.map → ar-Cn5Fq48Z.js.map} +1 -1
- package/dist/_chunks/{audio-recorder-CdXuT9ln.js → audio-recorder-DjXLP4aF.js} +2 -2
- package/dist/_chunks/{audio-recorder-CdXuT9ln.js.map → audio-recorder-DjXLP4aF.js.map} +1 -1
- package/dist/_chunks/{autocomplete-CDqxB68B.js → autocomplete-CcCFlVf-.js} +4 -4
- package/dist/_chunks/{autocomplete-CDqxB68B.js.map → autocomplete-CcCFlVf-.js.map} +1 -1
- package/dist/_chunks/{bishop-score-CzjSx-dm.js → bishop-score-DPN4Ched.js} +2 -2
- package/dist/_chunks/{bishop-score-CzjSx-dm.js.map → bishop-score-DPN4Ched.js.map} +1 -1
- package/dist/_chunks/{bmi-calculator-DA2NGmVK.js → bmi-calculator-DuUneHuZ.js} +2 -2
- package/dist/_chunks/{bmi-calculator-DA2NGmVK.js.map → bmi-calculator-DuUneHuZ.js.map} +1 -1
- package/dist/_chunks/{booking-ChfvWy3P.js → booking-L8-YP8BJ.js} +148 -148
- package/dist/_chunks/booking-L8-YP8BJ.js.map +1 -0
- package/dist/_chunks/calendar-B6soK1Yb.js +17 -0
- package/dist/_chunks/calendar-B6soK1Yb.js.map +1 -0
- package/dist/_chunks/{calendar-CkuJIg3s.js → calendar-oYWOCrnf.js} +1 -1
- package/dist/_chunks/{calendar-CkuJIg3s.js.map → calendar-oYWOCrnf.js.map} +1 -1
- package/dist/_chunks/{care-plan-card-DhZNoXs4.js → care-plan-card-D42WD4-T.js} +2 -2
- package/dist/_chunks/{care-plan-card-DhZNoXs4.js.map → care-plan-card-D42WD4-T.js.map} +1 -1
- package/dist/_chunks/{care-plan-entry-card-DW70yBOD.js → care-plan-entry-card-BukNI7Uy.js} +2 -2
- package/dist/_chunks/{care-plan-entry-card-DW70yBOD.js.map → care-plan-entry-card-BukNI7Uy.js.map} +1 -1
- package/dist/_chunks/{carousel.agent-DrX96W-1.js → carousel.agent-vt21A_el.js} +2 -2
- package/dist/_chunks/{carousel.agent-DrX96W-1.js.map → carousel.agent-vt21A_el.js.map} +1 -1
- package/dist/_chunks/{chat-input-CFwc7JxL.js → chat-input-B5zjNEUN.js} +2 -2
- package/dist/_chunks/{chat-input-CFwc7JxL.js.map → chat-input-B5zjNEUN.js.map} +1 -1
- package/dist/_chunks/{chat-message-Dm8U2RY1.js → chat-message-3V54YipB.js} +2 -2
- package/dist/_chunks/{chat-message-Dm8U2RY1.js.map → chat-message-3V54YipB.js.map} +1 -1
- package/dist/_chunks/{code-block-HoddNOKJ.js → code-block-BBWHhIc8.js} +2 -2
- package/dist/_chunks/{code-block-HoddNOKJ.js.map → code-block-BBWHhIc8.js.map} +1 -1
- package/dist/_chunks/columns-2-BTOBZbep.js +15 -0
- package/dist/_chunks/columns-2-BTOBZbep.js.map +1 -0
- package/dist/_chunks/{contact-profile-card-DvvVfAA2.js → contact-profile-card-CCeJmjbd.js} +2 -2
- package/dist/_chunks/{contact-profile-card-DvvVfAA2.js.map → contact-profile-card-CCeJmjbd.js.map} +1 -1
- package/dist/_chunks/{cycle-calculator-C_t1Hs8V.js → cycle-calculator-D6LTmtQt.js} +4 -4
- package/dist/_chunks/{cycle-calculator-C_t1Hs8V.js.map → cycle-calculator-D6LTmtQt.js.map} +1 -1
- package/dist/_chunks/{date-picker-BfHblqwA.js → date-picker-oGg5BnXL.js} +12 -11
- package/dist/_chunks/{date-picker-BfHblqwA.js.map → date-picker-oGg5BnXL.js.map} +1 -1
- package/dist/_chunks/{date-picker-variants-CXEAx3O_.js → date-picker-variants-DAcSLTua.js} +358 -372
- package/dist/_chunks/date-picker-variants-DAcSLTua.js.map +1 -0
- package/dist/_chunks/{date-range-picker-hcAMs1wO.js → date-range-picker-C5BWfH_T.js} +34 -25
- package/dist/_chunks/{date-range-picker-hcAMs1wO.js.map → date-range-picker-C5BWfH_T.js.map} +1 -1
- package/dist/_chunks/{date-time-picker-H-3Pwqlb.js → date-time-picker-Ze1My59T.js} +18 -17
- package/dist/_chunks/{date-time-picker-H-3Pwqlb.js.map → date-time-picker-Ze1My59T.js.map} +1 -1
- package/dist/_chunks/{de-DK4A9_a8.js → de-CrJs4ZsX.js} +2 -2
- package/dist/_chunks/{de-DK4A9_a8.js.map → de-CrJs4ZsX.js.map} +1 -1
- package/dist/_chunks/{description-list-BEbK2g93.js → description-list-gkNGWk5G.js} +2 -2
- package/dist/_chunks/{description-list-BEbK2g93.js.map → description-list-gkNGWk5G.js.map} +1 -1
- package/dist/_chunks/{due-date-calculator-Q8MIwEVV.js → due-date-calculator-CIG194vq.js} +4 -4
- package/dist/_chunks/{due-date-calculator-Q8MIwEVV.js.map → due-date-calculator-CIG194vq.js.map} +1 -1
- package/dist/_chunks/{editable-currency-cell-renderer-BQgaKFCz.js → editable-currency-cell-renderer-f3d0Rhue.js} +535 -535
- package/dist/_chunks/editable-currency-cell-renderer-f3d0Rhue.js.map +1 -0
- package/dist/_chunks/editor-overlay-wYm22wZK.js +88 -0
- package/dist/_chunks/editor-overlay-wYm22wZK.js.map +1 -0
- package/dist/_chunks/{el-B29HXhG5.js → el-DHdMOIhL.js} +6 -6
- package/dist/_chunks/{el-B29HXhG5.js.map → el-DHdMOIhL.js.map} +1 -1
- package/dist/_chunks/{es-BOwPVwWn.js → es-DCATCfqo.js} +2 -2
- package/dist/_chunks/{es-BOwPVwWn.js.map → es-DCATCfqo.js.map} +1 -1
- package/dist/_chunks/{fetal-weight-D1a6BmM-.js → fetal-weight-Xf8-ZoDy.js} +2 -2
- package/dist/_chunks/{fetal-weight-D1a6BmM-.js.map → fetal-weight-Xf8-ZoDy.js.map} +1 -1
- package/dist/_chunks/{fiscal-code-input-BZ0FxwUl.js → fiscal-code-input-DPtqluVb.js} +2 -2
- package/dist/_chunks/{fiscal-code-input-BZ0FxwUl.js.map → fiscal-code-input-DPtqluVb.js.map} +1 -1
- package/dist/_chunks/{fr-DoDBtn0T.js → fr-BfGEMshF.js} +2 -2
- package/dist/_chunks/{fr-DoDBtn0T.js.map → fr-BfGEMshF.js.map} +1 -1
- package/dist/_chunks/{freemium-paywall-gHGA44dW.js → freemium-paywall-CkWjv3o6.js} +2 -2
- package/dist/_chunks/{freemium-paywall-gHGA44dW.js.map → freemium-paywall-CkWjv3o6.js.map} +1 -1
- package/dist/_chunks/{gestational-age-calculator-D85E8lGN.js → gestational-age-calculator-BGsZaWXW.js} +6 -6
- package/dist/_chunks/{gestational-age-calculator-D85E8lGN.js.map → gestational-age-calculator-BGsZaWXW.js.map} +1 -1
- package/dist/_chunks/{hcg-doubling-Dg0Hr7ey.js → hcg-doubling-LH5i6oM7.js} +3 -3
- package/dist/_chunks/{hcg-doubling-Dg0Hr7ey.js.map → hcg-doubling-LH5i6oM7.js.map} +1 -1
- package/dist/_chunks/{header-Ce1Br27u.js → header-CNszv2WQ.js} +2 -2
- package/dist/_chunks/{header-Ce1Br27u.js.map → header-CNszv2WQ.js.map} +1 -1
- package/dist/_chunks/{header-settings-D5Z2B_Yz.js → header-settings-CNOqIhoW.js} +3 -3
- package/dist/_chunks/{header-settings-D5Z2B_Yz.js.map → header-settings-CNOqIhoW.js.map} +1 -1
- package/dist/_chunks/{hi-DGByrKby.js → hi-CBFRXEIm.js} +2 -2
- package/dist/_chunks/{hi-DGByrKby.js.map → hi-CBFRXEIm.js.map} +1 -1
- package/dist/_chunks/icon-button-LqoiKcUN.js +78 -0
- package/dist/_chunks/icon-button-LqoiKcUN.js.map +1 -0
- package/dist/_chunks/image-C6RM5hfF.js +16 -0
- package/dist/_chunks/image-C6RM5hfF.js.map +1 -0
- package/dist/_chunks/{insert-result-C1SYdueh.js → insert-result-njqBthzT.js} +115 -125
- package/dist/_chunks/insert-result-njqBthzT.js.map +1 -0
- package/dist/_chunks/{isSameWeek-B1odL2vR.js → isSameWeek-I3DfXUp1.js} +2 -2
- package/dist/_chunks/{isSameWeek-B1odL2vR.js.map → isSameWeek-I3DfXUp1.js.map} +1 -1
- package/dist/_chunks/{it-B16rEecm.js → it-nz6vAKwG.js} +7 -7
- package/dist/_chunks/{it-B16rEecm.js.map → it-nz6vAKwG.js.map} +1 -1
- package/dist/_chunks/{ja-B0viOgft.js → ja-DQcqdAEJ.js} +2 -2
- package/dist/_chunks/{ja-B0viOgft.js.map → ja-DQcqdAEJ.js.map} +1 -1
- package/dist/_chunks/{key-value-pair-CkQIb9EG.js → key-value-pair-BrgbMfbF.js} +2 -2
- package/dist/_chunks/{key-value-pair-CkQIb9EG.js.map → key-value-pair-BrgbMfbF.js.map} +1 -1
- package/dist/_chunks/{locale-picker-D99UyZVJ.js → locale-picker-C9JmBht3.js} +3 -3
- package/dist/_chunks/{locale-picker-D99UyZVJ.js.map → locale-picker-C9JmBht3.js.map} +1 -1
- package/dist/_chunks/{marketplace-app-shell-C4OYAC22.js → marketplace-app-shell-Cou6XnMJ.js} +5 -5
- package/dist/_chunks/{marketplace-app-shell-C4OYAC22.js.map → marketplace-app-shell-Cou6XnMJ.js.map} +1 -1
- package/dist/_chunks/{message-card-Dvl1TgaN.js → message-card-Bgcvfj6-.js} +2 -2
- package/dist/_chunks/{message-card-Dvl1TgaN.js.map → message-card-Bgcvfj6-.js.map} +1 -1
- package/dist/_chunks/{message-tray-Dl6GQaaV.js → message-tray-saAVMeHP.js} +3 -3
- package/dist/_chunks/{message-tray-Dl6GQaaV.js.map → message-tray-saAVMeHP.js.map} +1 -1
- package/dist/_chunks/{multi-select-DOLO3K_z.js → multi-select-BcPylvHR.js} +100 -90
- package/dist/_chunks/multi-select-BcPylvHR.js.map +1 -0
- package/dist/_chunks/{nl-cBxEX2QU.js → nl-L5SuDjyl.js} +2 -2
- package/dist/_chunks/{nl-cBxEX2QU.js.map → nl-L5SuDjyl.js.map} +1 -1
- package/dist/_chunks/{notification-card-CObnGdJu.js → notification-card-BiESdm8q.js} +2 -2
- package/dist/_chunks/{notification-card-CObnGdJu.js.map → notification-card-BiESdm8q.js.map} +1 -1
- package/dist/_chunks/{notification-tray-BWHDIjgd.js → notification-tray-DlgenTEe.js} +3 -3
- package/dist/_chunks/{notification-tray-BWHDIjgd.js.map → notification-tray-DlgenTEe.js.map} +1 -1
- package/dist/_chunks/{patient-search-CArmRKeg.js → patient-search-Bw9ONucF.js} +2 -2
- package/dist/_chunks/{patient-search-CArmRKeg.js.map → patient-search-Bw9ONucF.js.map} +1 -1
- package/dist/_chunks/{patient-shell-Coarf346.js → patient-shell-Tgpv0HND.js} +4 -4
- package/dist/_chunks/{patient-shell-Coarf346.js.map → patient-shell-Tgpv0HND.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-BnTqxcTr.js → patient-summary-card-Bgso0p_l.js} +2 -2
- package/dist/_chunks/{patient-summary-card-BnTqxcTr.js.map → patient-summary-card-Bgso0p_l.js.map} +1 -1
- package/dist/_chunks/{payment-form-DJ9vnzrT.js → payment-form-nXocS_MX.js} +11 -4
- package/dist/_chunks/{payment-form-DJ9vnzrT.js.map → payment-form-nXocS_MX.js.map} +1 -1
- package/dist/_chunks/{payment-request-card-B_lyobd0.js → payment-request-card-DBz3hVDz.js} +3 -3
- package/dist/_chunks/{payment-request-card-B_lyobd0.js.map → payment-request-card-DBz3hVDz.js.map} +1 -1
- package/dist/_chunks/{pdf-viewer-chMpwpA4.js → pdf-viewer-GsfNqeeT.js} +3 -3
- package/dist/_chunks/pdf-viewer-GsfNqeeT.js.map +1 -0
- package/dist/_chunks/{periodontal-chart-card-BYs9hax1.js → periodontal-chart-card-AYyHtU9K.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card-BYs9hax1.js.map → periodontal-chart-card-AYyHtU9K.js.map} +1 -1
- package/dist/_chunks/phone-input-DVXhNlIl.js +563 -0
- package/dist/_chunks/phone-input-DVXhNlIl.js.map +1 -0
- package/dist/_chunks/{pl-DtS08ioY.js → pl-YAn5z2wR.js} +3 -3
- package/dist/_chunks/{pl-DtS08ioY.js.map → pl-YAn5z2wR.js.map} +1 -1
- package/dist/_chunks/{popover-Devce-tT.js → popover-DTbfAuR0.js} +2 -2
- package/dist/_chunks/{popover-Devce-tT.js.map → popover-DTbfAuR0.js.map} +1 -1
- package/dist/_chunks/{practice-results-CtfciF2v.js → practice-results-CVAgY2RZ.js} +3 -3
- package/dist/_chunks/{practice-results-CtfciF2v.js.map → practice-results-CVAgY2RZ.js.map} +1 -1
- package/dist/_chunks/{pregnancy-dating-7NUaAfob.js → pregnancy-dating-f9aJbiAk.js} +6 -6
- package/dist/_chunks/{pregnancy-dating-7NUaAfob.js.map → pregnancy-dating-f9aJbiAk.js.map} +1 -1
- package/dist/_chunks/{pregnancy-weight-gain-DI7X-0JX.js → pregnancy-weight-gain-BMRBeA8V.js} +2 -2
- package/dist/_chunks/{pregnancy-weight-gain-DI7X-0JX.js.map → pregnancy-weight-gain-BMRBeA8V.js.map} +1 -1
- package/dist/_chunks/{privacy-lock-BN3L-alb.js → privacy-lock-C7JyMf0y.js} +2 -2
- package/dist/_chunks/{privacy-lock-BN3L-alb.js.map → privacy-lock-C7JyMf0y.js.map} +1 -1
- package/dist/_chunks/{product-hub-panel-CkfZBA3t.js → product-hub-panel-CAXDFeGP.js} +2 -2
- package/dist/_chunks/{product-hub-panel-CkfZBA3t.js.map → product-hub-panel-CAXDFeGP.js.map} +1 -1
- package/dist/_chunks/{pt-yFXs1VvH.js → pt-D9xdT5KQ.js} +6 -6
- package/dist/_chunks/{pt-yFXs1VvH.js.map → pt-D9xdT5KQ.js.map} +1 -1
- package/dist/_chunks/{public-header.agent-CYQK6T6F.js → public-header.agent-BOhJgZEU.js} +3 -3
- package/dist/_chunks/{public-header.agent-CYQK6T6F.js.map → public-header.agent-BOhJgZEU.js.map} +1 -1
- package/dist/_chunks/{reviews-panel-CPrXu5TX.js → reviews-panel-DBktKm7i.js} +2 -2
- package/dist/_chunks/{reviews-panel-CPrXu5TX.js.map → reviews-panel-DBktKm7i.js.map} +1 -1
- package/dist/_chunks/rich-text-editor-B5XQNxe8.js +1586 -0
- package/dist/_chunks/rich-text-editor-B5XQNxe8.js.map +1 -0
- package/dist/_chunks/{ro-DsCzSrzR.js → ro-Cp--52bT.js} +2 -2
- package/dist/_chunks/{ro-DsCzSrzR.js.map → ro-Cp--52bT.js.map} +1 -1
- package/dist/_chunks/{ru-DgDxL0pc.js → ru-BM8eX_Zz.js} +3 -3
- package/dist/_chunks/{ru-DgDxL0pc.js.map → ru-BM8eX_Zz.js.map} +1 -1
- package/dist/_chunks/{search-bar-CvN_S0jW.js → search-bar-SY2BcV2N.js} +2 -2
- package/dist/_chunks/{search-bar-CvN_S0jW.js.map → search-bar-SY2BcV2N.js.map} +1 -1
- package/dist/_chunks/{search-input-D3aMvi4l.js → search-input-DbxrnHkW.js} +3 -3
- package/dist/_chunks/{search-input-D3aMvi4l.js.map → search-input-DbxrnHkW.js.map} +1 -1
- package/dist/_chunks/{sheet-xbzu4YiY.js → sheet-taJer-Ha.js} +2 -2
- package/dist/_chunks/{sheet-xbzu4YiY.js.map → sheet-taJer-Ha.js.map} +1 -1
- package/dist/_chunks/{sidebar-DPEHzxLZ.js → sidebar-BFwbx74W.js} +12 -1
- package/dist/_chunks/sidebar-BFwbx74W.js.map +1 -0
- package/dist/_chunks/{sign-document--nr5cxsB.js → sign-document-CdAiHiCh.js} +2 -2
- package/dist/_chunks/{sign-document--nr5cxsB.js.map → sign-document-CdAiHiCh.js.map} +1 -1
- package/dist/_chunks/{sign-in-with-alfadocs-button-BpAjVmsI.js → sign-in-with-alfadocs-button-LppxjlFt.js} +2 -2
- package/dist/_chunks/{sign-in-with-alfadocs-button-BpAjVmsI.js.map → sign-in-with-alfadocs-button-LppxjlFt.js.map} +1 -1
- package/dist/_chunks/{signature-field-DbhbpLha.js → signature-field-Dy1JRjzE.js} +10 -3
- package/dist/_chunks/{signature-field-DbhbpLha.js.map → signature-field-Dy1JRjzE.js.map} +1 -1
- package/dist/_chunks/{slot-grid-BlHHP9Qy.js → slot-grid-FsqumOaS.js} +2 -2
- package/dist/_chunks/{slot-grid-BlHHP9Qy.js.map → slot-grid-FsqumOaS.js.map} +1 -1
- package/dist/_chunks/smart-date-CWikAqZx.js +114 -0
- package/dist/_chunks/smart-date-CWikAqZx.js.map +1 -0
- package/dist/_chunks/{social-sign-in-button-uJYLM366.js → social-sign-in-button-dlpPI5l7.js} +2 -2
- package/dist/_chunks/{social-sign-in-button-uJYLM366.js.map → social-sign-in-button-dlpPI5l7.js.map} +1 -1
- package/dist/_chunks/{spinner-OjQNn8oN.js → spinner-hbwuKwMf.js} +10 -10
- package/dist/_chunks/{spinner-OjQNn8oN.js.map → spinner-hbwuKwMf.js.map} +1 -1
- package/dist/_chunks/{sq-DHlCYN67.js → sq-XRpr0r49.js} +6 -6
- package/dist/_chunks/{sq-DHlCYN67.js.map → sq-XRpr0r49.js.map} +1 -1
- package/dist/_chunks/{streaming-text-CfhDqtIT.js → streaming-text-BB9mvK4m.js} +2 -2
- package/dist/_chunks/{streaming-text-CfhDqtIT.js.map → streaming-text-BB9mvK4m.js.map} +1 -1
- package/dist/_chunks/subDays-BcYv1Lxi.js +8 -0
- package/dist/_chunks/{subDays-Bs00akhK.js.map → subDays-BcYv1Lxi.js.map} +1 -1
- package/dist/_chunks/{sv-O0QaQs_s.js → sv-Z3APomE8.js} +2 -2
- package/dist/_chunks/{sv-O0QaQs_s.js.map → sv-Z3APomE8.js.map} +1 -1
- package/dist/_chunks/{task-tray-Cb_hK4yb.js → task-tray-CAncV-QQ.js} +2 -2
- package/dist/_chunks/{task-tray-Cb_hK4yb.js.map → task-tray-CAncV-QQ.js.map} +1 -1
- package/dist/_chunks/{theme-toggle-DAW7uC0B.js → theme-toggle-DETmSu_h.js} +2 -2
- package/dist/_chunks/{theme-toggle-DAW7uC0B.js.map → theme-toggle-DETmSu_h.js.map} +1 -1
- package/dist/_chunks/{toast.agent-B0MCsvdZ.js → toast.agent-vuLRRn2a.js} +2 -2
- package/dist/_chunks/{toast.agent-B0MCsvdZ.js.map → toast.agent-vuLRRn2a.js.map} +1 -1
- package/dist/_chunks/{tooth-scheme-CiphQaON.js → tooth-scheme-BIx1O2aJ.js} +3 -3
- package/dist/_chunks/{tooth-scheme-CiphQaON.js.map → tooth-scheme-BIx1O2aJ.js.map} +1 -1
- package/dist/_chunks/{tr-BmNDRuio.js → tr-e0-P4FON.js} +2 -2
- package/dist/_chunks/{tr-BmNDRuio.js.map → tr-e0-P4FON.js.map} +1 -1
- package/dist/_chunks/{transcript-panel-B4HiC7ed.js → transcript-panel-CLHmv83g.js} +2 -2
- package/dist/_chunks/{transcript-panel-B4HiC7ed.js.map → transcript-panel-CLHmv83g.js.map} +1 -1
- package/dist/_chunks/trash-2-rPAKaRgB.js +18 -0
- package/dist/_chunks/trash-2-rPAKaRgB.js.map +1 -0
- package/dist/_chunks/{unit-converter-BIbXHIQA.js → unit-converter-C1V3ACM9.js} +2 -2
- package/dist/_chunks/{unit-converter-BIbXHIQA.js.map → unit-converter-C1V3ACM9.js.map} +1 -1
- package/dist/_chunks/{wallet-pay-button-DuDPBlCO.js → wallet-pay-button--dnR6NfJ.js} +2 -2
- package/dist/_chunks/{wallet-pay-button-DuDPBlCO.js.map → wallet-pay-button--dnR6NfJ.js.map} +1 -1
- package/dist/_chunks/{workflow-map-BJDUNYlX.js → workflow-map-Bt4Of5dT.js} +137 -149
- package/dist/_chunks/workflow-map-Bt4Of5dT.js.map +1 -0
- package/dist/_chunks/{zh-CN-CgVJZEzz.js → zh-CN-B-igM5gY.js} +3 -3
- package/dist/_chunks/{zh-CN-CgVJZEzz.js.map → zh-CN-B-igM5gY.js.map} +1 -1
- package/dist/agent-catalog.json +32 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/ai-consent-banner.d.ts.map +1 -1
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/ai-tools-rail/ai-tools-rail.d.ts.map +1 -1
- package/dist/components/ai-tools-rail/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/appointment-card/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/details-form.d.ts.map +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/button/icon-button.d.ts.map +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/filters/date-range-filter.d.ts.map +1 -1
- package/dist/components/data-table/filters/select-filter.d.ts.map +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/date-range-picker.d.ts.map +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/editor-overlay/editor-overlay.d.ts +19 -0
- package/dist/components/editor-overlay/editor-overlay.d.ts.map +1 -0
- package/dist/components/editor-overlay/index.d.ts +3 -0
- package/dist/components/editor-overlay/index.d.ts.map +1 -0
- package/dist/components/editor-overlay/index.js +5 -0
- package/dist/components/editor-overlay/index.js.map +1 -0
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/fiscal-code-input/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/icon-button/index.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/multi-select/multi-select.d.ts.map +1 -1
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/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/payment-card/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/payment-form/payment-form.d.ts.map +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/phone-input/phone-input.d.ts +9 -0
- package/dist/components/phone-input/phone-input.d.ts.map +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/privacy-lock/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/editor-toolbar.d.ts +26 -0
- package/dist/components/rich-text-editor/editor-toolbar.d.ts.map +1 -0
- package/dist/components/rich-text-editor/help-me-write-overlay.d.ts +25 -0
- package/dist/components/rich-text-editor/help-me-write-overlay.d.ts.map +1 -0
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.agent.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +43 -0
- package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/search-input/index.js +1 -1
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sidebar/sidebar.d.ts.map +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-field/index.js +1 -1
- package/dist/components/signature-field/signature-field.d.ts.map +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/smart-date/index.d.ts +3 -0
- package/dist/components/smart-date/index.d.ts.map +1 -0
- package/dist/components/smart-date/index.js +5 -0
- package/dist/components/smart-date/index.js.map +1 -0
- package/dist/components/smart-date/smart-date.d.ts +32 -0
- package/dist/components/smart-date/smart-date.d.ts.map +1 -0
- package/dist/components/social-sign-in-button/index.js +1 -1
- package/dist/components/spinner/index.js +1 -1
- package/dist/components/streaming-text/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/wallet-pay-button/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +60 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +61 -1
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +60 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +61 -1
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +60 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +61 -1
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +60 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +65 -1
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +60 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +61 -1
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +60 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +61 -1
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +60 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +61 -1
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +60 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +61 -1
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +60 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +61 -1
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +60 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +61 -1
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +60 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +61 -1
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +60 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +61 -1
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +60 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +61 -1
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +60 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +61 -1
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +60 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +61 -1
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +60 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +61 -1
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +60 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +61 -1
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +60 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +61 -1
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +494 -490
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +61 -1
- package/dist/locales/de.json +61 -1
- package/dist/locales/el.json +61 -1
- package/dist/locales/en.json +61 -1
- package/dist/locales/es.json +61 -1
- package/dist/locales/fr.json +61 -1
- package/dist/locales/hi.json +61 -1
- package/dist/locales/it.json +61 -1
- package/dist/locales/ja.json +61 -1
- package/dist/locales/nl.json +61 -1
- package/dist/locales/pl.json +61 -1
- package/dist/locales/pt.json +61 -1
- package/dist/locales/ro.json +61 -1
- package/dist/locales/ru.json +61 -1
- package/dist/locales/sq.json +61 -1
- package/dist/locales/sv.json +61 -1
- package/dist/locales/tr.json +61 -1
- package/dist/locales/zh.json +61 -1
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +36 -22
- package/package.json +10 -1
- package/dist/_chunks/ai-tools-rail-7tC3GT4h.js.map +0 -1
- package/dist/_chunks/booking-ChfvWy3P.js.map +0 -1
- package/dist/_chunks/date-picker-variants-CXEAx3O_.js.map +0 -1
- package/dist/_chunks/editable-currency-cell-renderer-BQgaKFCz.js.map +0 -1
- package/dist/_chunks/icon-button-CKEOrN37.js +0 -70
- package/dist/_chunks/icon-button-CKEOrN37.js.map +0 -1
- package/dist/_chunks/insert-result-C1SYdueh.js.map +0 -1
- package/dist/_chunks/multi-select-DOLO3K_z.js.map +0 -1
- package/dist/_chunks/pdf-viewer-chMpwpA4.js.map +0 -1
- package/dist/_chunks/phone-input-DfZbPPvh.js +0 -525
- package/dist/_chunks/phone-input-DfZbPPvh.js.map +0 -1
- package/dist/_chunks/rich-text-editor-B03qM22-.js +0 -334
- package/dist/_chunks/rich-text-editor-B03qM22-.js.map +0 -1
- package/dist/_chunks/sidebar-DPEHzxLZ.js.map +0 -1
- package/dist/_chunks/subDays-Bs00akhK.js +0 -8
- package/dist/_chunks/workflow-map-BJDUNYlX.js.map +0 -1
|
@@ -1,334 +0,0 @@
|
|
|
1
|
-
import { jsx as S } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as Y, useId as K, useMemo as N, useRef as l, useState as ee, useEffect as p, useImperativeHandle as te, useCallback as re } from "react";
|
|
3
|
-
import { c as A } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as ne } from "react-i18next";
|
|
5
|
-
import { sanitiseHtml as oe } from "../safe-html/index.js";
|
|
6
|
-
import { u as ie } from "./registry-nPAVE19X.js";
|
|
7
|
-
const se = {
|
|
8
|
-
id: "rich-text-editor",
|
|
9
|
-
capabilities: ["edit_inline"],
|
|
10
|
-
state: {
|
|
11
|
-
html: {
|
|
12
|
-
type: "string",
|
|
13
|
-
description: "Sanitised HTML representation of the editor content.",
|
|
14
|
-
read: (t) => t.getHTML()
|
|
15
|
-
},
|
|
16
|
-
markdown: {
|
|
17
|
-
type: "string",
|
|
18
|
-
description: "Markdown representation of the editor content. The Redactor engine has no native Markdown serialiser, so this is always empty — read `html` instead.",
|
|
19
|
-
read: (t) => t.getMarkdown()
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
actions: {
|
|
23
|
-
set_content: {
|
|
24
|
-
safety: "destructive",
|
|
25
|
-
argsType: "{ html: string }",
|
|
26
|
-
description: "Replace the editor content. Loses unsaved input.",
|
|
27
|
-
invoke: (t, n) => {
|
|
28
|
-
t.setContent(n.html);
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
clear: {
|
|
32
|
-
safety: "destructive",
|
|
33
|
-
description: "Empty the editor. Loses unsaved input.",
|
|
34
|
-
invoke: (t) => {
|
|
35
|
-
t.clear();
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
focus: {
|
|
39
|
-
safety: "read",
|
|
40
|
-
description: "Move keyboard focus to the editor surface.",
|
|
41
|
-
invoke: (t) => {
|
|
42
|
-
t.focus();
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
domHooks: {
|
|
47
|
-
root: { attr: "data-component", value: "rich-text-editor" },
|
|
48
|
-
instanceId: {
|
|
49
|
-
attr: "data-component-id",
|
|
50
|
-
sourceProp: "id",
|
|
51
|
-
description: "Sourced from the id prop."
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
function u(t) {
|
|
56
|
-
return oe(t, "rich-text");
|
|
57
|
-
}
|
|
58
|
-
function z(t = "") {
|
|
59
|
-
const n = String(t).trim();
|
|
60
|
-
if (n === "" || n === "<p><br></p>" || n === "<p> </p>")
|
|
61
|
-
return "";
|
|
62
|
-
const i = n.replace(/<br\s*\/?>/gi, "").replace(/ /gi, "").replace(/<[^>]+>/g, "").trim();
|
|
63
|
-
return i === "" && /<img\b[^>]*>/i.test(n) ? n : i === "" ? "" : n;
|
|
64
|
-
}
|
|
65
|
-
function ae(t) {
|
|
66
|
-
return t.replace(
|
|
67
|
-
/<img(?![^>]*\sloading=)([^>]*)>/gi,
|
|
68
|
-
'<img loading="lazy"$1>'
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
function ce(t) {
|
|
72
|
-
if (t) return t;
|
|
73
|
-
if (typeof window > "u") return null;
|
|
74
|
-
const n = window;
|
|
75
|
-
return n.$R ?? n.Redactor ?? null;
|
|
76
|
-
}
|
|
77
|
-
const de = {
|
|
78
|
-
minimal: ["bold", "italic", "link"],
|
|
79
|
-
standard: ["format", "bold", "italic", "link", "lists"],
|
|
80
|
-
full: [
|
|
81
|
-
"format",
|
|
82
|
-
"bold",
|
|
83
|
-
"italic",
|
|
84
|
-
"deleted",
|
|
85
|
-
"link",
|
|
86
|
-
"lists",
|
|
87
|
-
"image",
|
|
88
|
-
"table",
|
|
89
|
-
"line"
|
|
90
|
-
]
|
|
91
|
-
}, le = {
|
|
92
|
-
sm: "8rem",
|
|
93
|
-
md: "16rem",
|
|
94
|
-
lg: "24rem"
|
|
95
|
-
}, ue = {
|
|
96
|
-
zh: "zh_cn",
|
|
97
|
-
pt: "pt_br"
|
|
98
|
-
};
|
|
99
|
-
function fe(t) {
|
|
100
|
-
const n = t.split("-")[0];
|
|
101
|
-
return ue[n] ?? n ?? "en";
|
|
102
|
-
}
|
|
103
|
-
const me = A(
|
|
104
|
-
"redactor-theme-alfadocs ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"
|
|
105
|
-
), pe = A(
|
|
106
|
-
[
|
|
107
|
-
"ds:block ds:[inline-size:100%]",
|
|
108
|
-
"ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
|
|
109
|
-
"ds:bg-[var(--background)] ds:text-[var(--foreground)]",
|
|
110
|
-
"ds:font-[family-name:var(--font-sans)] ds:text-[length:var(--font-size-base)]",
|
|
111
|
-
"ds:p-[var(--spacing-md)] ds:[min-block-size:10rem]",
|
|
112
|
-
"ds:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
113
|
-
"ds:focus-visible:outline-solid",
|
|
114
|
-
"ds:focus-visible:outline-[var(--ring)]",
|
|
115
|
-
"ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
116
|
-
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
117
|
-
].join(" ")
|
|
118
|
-
), ge = Y(
|
|
119
|
-
({
|
|
120
|
-
id: t,
|
|
121
|
-
defaultValue: n,
|
|
122
|
-
value: i,
|
|
123
|
-
onChange: R,
|
|
124
|
-
toolbar: $ = "standard",
|
|
125
|
-
placeholder: E,
|
|
126
|
-
readOnly: g = !1,
|
|
127
|
-
ariaLabel: O,
|
|
128
|
-
minHeight: H,
|
|
129
|
-
className: B,
|
|
130
|
-
redactor: P,
|
|
131
|
-
options: h,
|
|
132
|
-
plugins: V,
|
|
133
|
-
lang: j,
|
|
134
|
-
imageUploadUrl: L,
|
|
135
|
-
onKeyDown: y
|
|
136
|
-
}, G) => {
|
|
137
|
-
const { t: k, i18n: D } = ne(), M = K(), C = N(
|
|
138
|
-
() => `rte-${M.replace(/[^a-zA-Z0-9-_]/g, "")}`,
|
|
139
|
-
[M]
|
|
140
|
-
), o = `#${C}`, s = l(null), a = l(null), T = l(!1), [f, _] = ee(!1), m = l(null), c = l(R), b = l(y);
|
|
141
|
-
p(() => {
|
|
142
|
-
c.current = R, b.current = y;
|
|
143
|
-
}, [R, y]);
|
|
144
|
-
const F = l(
|
|
145
|
-
(() => {
|
|
146
|
-
const e = i ?? n ?? "";
|
|
147
|
-
return e ? u(e) : "";
|
|
148
|
-
})()
|
|
149
|
-
);
|
|
150
|
-
p(() => {
|
|
151
|
-
const e = s.current;
|
|
152
|
-
if (!e) return;
|
|
153
|
-
e.value = F.current;
|
|
154
|
-
const r = ce(P);
|
|
155
|
-
if (!r) {
|
|
156
|
-
_(!0);
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
a.current = r;
|
|
160
|
-
const d = {
|
|
161
|
-
lang: j ?? fe(D.language || "en"),
|
|
162
|
-
buttons: de[$],
|
|
163
|
-
buttonsHide: ["html"],
|
|
164
|
-
plugins: V ?? [],
|
|
165
|
-
placeholder: E ?? k("editor.placeholder"),
|
|
166
|
-
toolbarFixed: !1,
|
|
167
|
-
imageEditable: !1,
|
|
168
|
-
imageResizable: !0
|
|
169
|
-
};
|
|
170
|
-
H && (d.minHeight = le[H]);
|
|
171
|
-
const q = L ? { imageUpload: L } : {}, J = (h == null ? void 0 : h.callbacks) ?? {}, Q = {
|
|
172
|
-
...d,
|
|
173
|
-
...q,
|
|
174
|
-
...h ?? {},
|
|
175
|
-
// Re-pin safety-critical keys LAST so consumer `options` can't override
|
|
176
|
-
// the sanitising change handler or re-enable image editing.
|
|
177
|
-
imageEditable: !1,
|
|
178
|
-
callbacks: {
|
|
179
|
-
...J,
|
|
180
|
-
changed(w) {
|
|
181
|
-
const v = z(ae(w)), X = u(v);
|
|
182
|
-
T.current = !0, c.current && (m.current && clearTimeout(m.current), m.current = setTimeout(() => {
|
|
183
|
-
var I;
|
|
184
|
-
(I = c.current) == null || I.call(c, { html: X, markdown: "" });
|
|
185
|
-
}, 100));
|
|
186
|
-
},
|
|
187
|
-
keydown(w) {
|
|
188
|
-
var v;
|
|
189
|
-
(v = b.current) == null || v.call(b, w);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
try {
|
|
194
|
-
if (r(o, Q), g)
|
|
195
|
-
try {
|
|
196
|
-
r(o, "enableReadonly");
|
|
197
|
-
} catch {
|
|
198
|
-
}
|
|
199
|
-
} catch {
|
|
200
|
-
_(!0);
|
|
201
|
-
}
|
|
202
|
-
return () => {
|
|
203
|
-
m.current && clearTimeout(m.current);
|
|
204
|
-
try {
|
|
205
|
-
r(o, "destroy");
|
|
206
|
-
} catch {
|
|
207
|
-
}
|
|
208
|
-
a.current = null;
|
|
209
|
-
};
|
|
210
|
-
}, []), p(() => {
|
|
211
|
-
const e = a.current;
|
|
212
|
-
if (!e || i === void 0) return;
|
|
213
|
-
if (T.current) {
|
|
214
|
-
T.current = !1;
|
|
215
|
-
return;
|
|
216
|
-
}
|
|
217
|
-
const r = u(z(i));
|
|
218
|
-
let d = "";
|
|
219
|
-
try {
|
|
220
|
-
d = z(
|
|
221
|
-
String(e(o, "source.getCode") ?? "")
|
|
222
|
-
);
|
|
223
|
-
} catch {
|
|
224
|
-
return;
|
|
225
|
-
}
|
|
226
|
-
if (d !== r)
|
|
227
|
-
try {
|
|
228
|
-
e(o, "source.setCode", r);
|
|
229
|
-
} catch {
|
|
230
|
-
}
|
|
231
|
-
}, [i, o]), p(() => {
|
|
232
|
-
const e = a.current;
|
|
233
|
-
if (e)
|
|
234
|
-
try {
|
|
235
|
-
e(o, g ? "enableReadonly" : "disableReadonly");
|
|
236
|
-
} catch {
|
|
237
|
-
}
|
|
238
|
-
}, [g, o]), p(() => {
|
|
239
|
-
if (!f || i === void 0) return;
|
|
240
|
-
const e = s.current;
|
|
241
|
-
if (!e) return;
|
|
242
|
-
const r = u(i);
|
|
243
|
-
e.value !== r && document.activeElement !== e && (e.value = r);
|
|
244
|
-
}, [f, i]);
|
|
245
|
-
const x = N(
|
|
246
|
-
() => ({
|
|
247
|
-
getHTML() {
|
|
248
|
-
var r;
|
|
249
|
-
const e = a.current;
|
|
250
|
-
if (e)
|
|
251
|
-
try {
|
|
252
|
-
return String(e(o, "source.getCode") ?? "");
|
|
253
|
-
} catch {
|
|
254
|
-
}
|
|
255
|
-
return ((r = s.current) == null ? void 0 : r.value) ?? "";
|
|
256
|
-
},
|
|
257
|
-
getMarkdown() {
|
|
258
|
-
return "";
|
|
259
|
-
},
|
|
260
|
-
setContent(e) {
|
|
261
|
-
const r = u(e), d = a.current;
|
|
262
|
-
if (d)
|
|
263
|
-
try {
|
|
264
|
-
d(o, "source.setCode", r);
|
|
265
|
-
return;
|
|
266
|
-
} catch {
|
|
267
|
-
}
|
|
268
|
-
s.current && (s.current.value = r);
|
|
269
|
-
},
|
|
270
|
-
focus() {
|
|
271
|
-
var r;
|
|
272
|
-
const e = a.current;
|
|
273
|
-
if (e)
|
|
274
|
-
try {
|
|
275
|
-
e(o, "editor.focus");
|
|
276
|
-
return;
|
|
277
|
-
} catch {
|
|
278
|
-
}
|
|
279
|
-
(r = s.current) == null || r.focus();
|
|
280
|
-
},
|
|
281
|
-
clear() {
|
|
282
|
-
const e = a.current;
|
|
283
|
-
if (e)
|
|
284
|
-
try {
|
|
285
|
-
e(o, "source.setCode", "");
|
|
286
|
-
return;
|
|
287
|
-
} catch {
|
|
288
|
-
}
|
|
289
|
-
s.current && (s.current.value = "");
|
|
290
|
-
}
|
|
291
|
-
}),
|
|
292
|
-
[o]
|
|
293
|
-
);
|
|
294
|
-
te(G, () => x, [x]), ie(se, x, t);
|
|
295
|
-
const U = re(
|
|
296
|
-
(e) => {
|
|
297
|
-
var r;
|
|
298
|
-
(r = c.current) == null || r.call(c, {
|
|
299
|
-
html: u(e.target.value),
|
|
300
|
-
markdown: ""
|
|
301
|
-
});
|
|
302
|
-
},
|
|
303
|
-
[]
|
|
304
|
-
), W = O ?? k("editor.regionLabel"), Z = E ?? k("editor.placeholder");
|
|
305
|
-
return /* @__PURE__ */ S(
|
|
306
|
-
"div",
|
|
307
|
-
{
|
|
308
|
-
className: [me(), B].filter(Boolean).join(" "),
|
|
309
|
-
"data-component": "rich-text-editor",
|
|
310
|
-
"data-component-id": t,
|
|
311
|
-
children: /* @__PURE__ */ S(
|
|
312
|
-
"textarea",
|
|
313
|
-
{
|
|
314
|
-
ref: s,
|
|
315
|
-
id: C,
|
|
316
|
-
"aria-label": W,
|
|
317
|
-
"aria-multiline": "true",
|
|
318
|
-
placeholder: Z,
|
|
319
|
-
onChange: f ? U : void 0,
|
|
320
|
-
readOnly: f ? g : void 0,
|
|
321
|
-
className: f ? pe() : void 0
|
|
322
|
-
}
|
|
323
|
-
)
|
|
324
|
-
}
|
|
325
|
-
);
|
|
326
|
-
}
|
|
327
|
-
);
|
|
328
|
-
ge.displayName = "RichTextEditor";
|
|
329
|
-
export {
|
|
330
|
-
ge as R,
|
|
331
|
-
se as r,
|
|
332
|
-
me as w
|
|
333
|
-
};
|
|
334
|
-
//# sourceMappingURL=rich-text-editor-B03qM22-.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rich-text-editor-B03qM22-.js","sources":["../../src/components/rich-text-editor/rich-text-editor.agent.ts","../../src/components/rich-text-editor/rich-text-editor.tsx"],"sourcesContent":["import type { AgentAdapter } from '../../agent/types';\nimport type { RichTextEditorHandle } from './rich-text-editor';\n\nexport const richTextEditorAgent: AgentAdapter<RichTextEditorHandle> = {\n id: 'rich-text-editor',\n capabilities: ['edit_inline'],\n state: {\n html: {\n type: 'string',\n description: 'Sanitised HTML representation of the editor content.',\n read: (handle) => handle.getHTML(),\n },\n markdown: {\n type: 'string',\n description:\n 'Markdown representation of the editor content. The Redactor engine has no native Markdown serialiser, so this is always empty — read `html` instead.',\n read: (handle) => handle.getMarkdown(),\n },\n },\n actions: {\n set_content: {\n safety: 'destructive',\n argsType: '{ html: string }',\n description: 'Replace the editor content. Loses unsaved input.',\n invoke: (handle, args: { html: string }) => {\n handle.setContent(args.html);\n },\n },\n clear: {\n safety: 'destructive',\n description: 'Empty the editor. Loses unsaved input.',\n invoke: (handle) => {\n handle.clear();\n },\n },\n focus: {\n safety: 'read',\n description: 'Move keyboard focus to the editor surface.',\n invoke: (handle) => {\n handle.focus();\n },\n },\n },\n domHooks: {\n root: { attr: 'data-component', value: 'rich-text-editor' },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","/* ------------------------------------------------------------------ */\n/* RichTextEditor — thin, secure wrapper over Redactor (Imperavi). */\n/* */\n/* LICENCE-SAFETY MODEL (read first): */\n/* Redactor is a COMMERCIAL editor and `@alfadocs/ui-kit` publishes */\n/* to PUBLIC npm — so redactor.js bytes MUST NOT enter `dist/`. This */\n/* wrapper never imports Redactor; it resolves a Redactor factory at */\n/* runtime from a `redactor` prop or the UMD globals `window.$R` / */\n/* `window.Redactor` that the CONSUMER's licensed build sets */\n/* (platform ships `web/static/redactor/redactor.js`). With no */\n/* factory found, the editor renders a graceful plain <textarea>. */\n/* Storybook loads a vendored dev-only build via preview-head.html. */\n/* */\n/* - Toolbar/buttons/dropdowns/shortcuts are owned entirely by Redactor */\n/* itself. The kit only skins them via `redactor-theme.css` and feeds */\n/* button presets + lang strings. */\n/* - Security: all inbound HTML (value/defaultValue/setContent) and the */\n/* editor's outbound `changed` HTML run through DOMPurify with an */\n/* explicit FORBID list. Outbound HTML also gets `loading=\"lazy\"` on */\n/* images and platform's empty-placeholder normalisation. */\n/* - Backend-coupled features (image upload, help-me-write, */\n/* voice-recording) are CONSUMER-PROVIDED via `imageUploadUrl` / */\n/* `plugins` / `options`; the kit never bakes a backend route in. */\n/* - i18n: placeholder/aria via `t('editor.placeholder')`; Redactor's */\n/* own `lang` is derived from the active locale (not hardcoded). */\n/* ------------------------------------------------------------------ */\n\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type ChangeEvent,\n} from 'react';\nimport { cva } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\n\nimport '../../tokens/themes/bridges/redactor-theme.css';\n\nimport { sanitiseHtml as sanitiseShared } from '../_shared/safe-html';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { richTextEditorAgent } from './rich-text-editor.agent';\n\n/* ------------------------------------------------------------------ */\n/* Sanitisation */\n/* ------------------------------------------------------------------ */\n\n// Single sanitiser surface (constraints §8): the editor routes every inbound\n// and outbound HTML string through the shared `rich-text` DOMPurify profile in\n// `_shared/safe-html.tsx`, so one audit covers the whole kit. The wrapper adds\n// only editor-specific shaping (normalizeEditorValue + withLazyImages) around it.\nfunction sanitiseHtml(input: string): string {\n return sanitiseShared(input, 'rich-text');\n}\n\n// Mirror platform's RedactorWysiwyg `normalizeEditorValue` (RedactorWysiwyg.js\n// :26-44): map Redactor's empty placeholders to '' for the emptiness test, but\n// preserve image-only HTML so embedded-image notes aren't dropped on save.\nfunction normalizeEditorValue(html = ''): string {\n const normalized = String(html).trim();\n if (\n normalized === '' ||\n normalized === '<p><br></p>' ||\n normalized === '<p> </p>'\n ) {\n return '';\n }\n const contentWithoutTags = normalized\n .replace(/<br\\s*\\/?>/gi, '')\n .replace(/ /gi, '')\n .replace(/<[^>]+>/g, '')\n .trim();\n if (contentWithoutTags === '' && /<img\\b[^>]*>/i.test(normalized)) {\n return normalized;\n }\n return contentWithoutTags === '' ? '' : normalized;\n}\n\n// Inject `loading=\"lazy\"` on any <img> lacking it (platform parity).\nfunction withLazyImages(html: string): string {\n return html.replace(\n /<img(?![^>]*\\sloading=)([^>]*)>/gi,\n '<img loading=\"lazy\"$1>',\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Redactor factory resolution (external — never bundled) */\n/* ------------------------------------------------------------------ */\n\nexport type RedactorFactory = (\n selector: string | HTMLElement,\n command?: unknown,\n ...args: unknown[]\n) => unknown;\n\nfunction resolveRedactor(injected?: RedactorFactory): RedactorFactory | null {\n if (injected) return injected;\n if (typeof window === 'undefined') return null;\n const w = window as unknown as {\n $R?: RedactorFactory;\n Redactor?: RedactorFactory;\n };\n return w.$R ?? w.Redactor ?? null;\n}\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport type RichTextEditorToolbar = 'minimal' | 'standard' | 'full';\n\nexport interface RichTextEditorProps {\n /** Opaque instance id — emitted as `data-component-id` for the agent registry. */\n id?: string;\n /** HTML initial value (uncontrolled). Runs through DOMPurify. */\n defaultValue?: string;\n /** Controlled value (HTML). Sanitised; synced with a skip-once caret guard. */\n value?: string;\n /** Emits on every change — debounced 100ms. `markdown` is '' (Redactor has no serializer). */\n onChange?: (payload: { html: string; markdown: string }) => void;\n /** Toolbar preset → Redactor `buttons`. */\n toolbar?: RichTextEditorToolbar;\n /** Placeholder text — translates via useTranslation if omitted. */\n placeholder?: string;\n /** Read-only mode. */\n readOnly?: boolean;\n /** Accessible name for the editing region. */\n ariaLabel?: string;\n /** Size variant for the minimum block-size of the editing region. */\n minHeight?: 'sm' | 'md' | 'lg';\n /** Extra class names on the wrapper. */\n className?: string;\n\n /* --- Redactor-specific seams (all CONSUMER-PROVIDED) --- */\n /** Inject the Redactor factory explicitly; else `window.$R` / `window.Redactor`. */\n redactor?: RedactorFactory;\n /** Raw Redactor options, deep-merged LAST over the kit defaults (callbacks reserved). */\n options?: Record<string, unknown>;\n /** Redactor plugin names to enable (the consumer must register/load them). */\n plugins?: string[];\n /** Redactor lang code; default derived from the active i18n locale. */\n lang?: string;\n /** Consumer image-upload endpoint → Redactor `imageUpload`. Omitted if absent. */\n imageUploadUrl?: string;\n /** App keyboard-shortcut seam (e.g. Ctrl/Cmd+Enter to save). */\n onKeyDown?: (event: KeyboardEvent) => void;\n}\n\nexport interface RichTextEditorHandle {\n getHTML: () => string;\n /** Always '' — Redactor has no native Markdown serializer (see MDX). */\n getMarkdown: () => string;\n /** HTML goes through DOMPurify before reaching Redactor. */\n setContent: (html: string) => void;\n focus: () => void;\n clear: () => void;\n}\n\n/* ------------------------------------------------------------------ */\n/* Toolbar presets → Redactor buttons (UI-only; backend buttons are */\n/* consumer-supplied via `plugins` + `options`, never in a preset). */\n/* ------------------------------------------------------------------ */\n\nconst TOOLBAR_BUTTONS: Record<RichTextEditorToolbar, string[]> = {\n minimal: ['bold', 'italic', 'link'],\n standard: ['format', 'bold', 'italic', 'link', 'lists'],\n full: [\n 'format',\n 'bold',\n 'italic',\n 'deleted',\n 'link',\n 'lists',\n 'image',\n 'table',\n 'line',\n ],\n};\n\nconst MIN_HEIGHT_REM: Record<\n NonNullable<RichTextEditorProps['minHeight']>,\n string\n> = {\n sm: '8rem',\n md: '16rem',\n lg: '24rem',\n};\n\n// Map the kit's locale codes to Redactor's lang-file codes where they differ\n// (Redactor ships zh_cn / zh_tw / pt_br; the kit uses zh / pt). RTL (ar/fa/he)\n// pass through — direction is handled by the document dir, not the lang code.\nconst REDACTOR_LANG: Record<string, string> = {\n zh: 'zh_cn',\n pt: 'pt_br',\n};\n\nfunction toRedactorLang(locale: string): string {\n const base = locale.split('-')[0];\n return REDACTOR_LANG[base] ?? base ?? 'en';\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst wrapperVariants = cva(\n 'redactor-theme-alfadocs ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]',\n);\n\n// Degraded-mode plain textarea (Redactor not found) — looks like a kit field.\nconst degradedTextareaVariants = cva(\n [\n 'ds:block ds:[inline-size:100%]',\n 'ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]',\n 'ds:bg-[var(--background)] ds:text-[var(--foreground)]',\n 'ds:font-[family-name:var(--font-sans)] ds:text-[length:var(--font-size-base)]',\n 'ds:p-[var(--spacing-md)] ds:[min-block-size:10rem]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)]',\n 'ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[var(--ring)]',\n 'ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n ].join(' '),\n);\n\n/* ------------------------------------------------------------------ */\n/* RichTextEditor */\n/* ------------------------------------------------------------------ */\n\nexport const RichTextEditor = forwardRef<\n RichTextEditorHandle,\n RichTextEditorProps\n>(\n (\n {\n id,\n defaultValue,\n value,\n onChange,\n toolbar = 'standard',\n placeholder,\n readOnly = false,\n ariaLabel,\n minHeight,\n className,\n redactor,\n options,\n plugins,\n lang,\n imageUploadUrl,\n onKeyDown,\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const rawId = useId();\n const editorId = useMemo(\n () => `rte-${rawId.replace(/[^a-zA-Z0-9-_]/g, '')}`,\n [rawId],\n );\n const selector = `#${editorId}`;\n\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n const redactorRef = useRef<RedactorFactory | null>(null);\n // Skip-once guard: Redactor's `changed` already pushed this value out via\n // onChange, so the controlled-value effect must not echo it back with\n // setCode (which resets the caret to position 0). Mirrors platform.\n const skipNextPropSyncRef = useRef(false);\n const [degraded, setDegraded] = useState(false);\n\n const debounceRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const onChangeRef = useRef<RichTextEditorProps['onChange']>(onChange);\n const onKeyDownRef = useRef<RichTextEditorProps['onKeyDown']>(onKeyDown);\n useEffect(() => {\n onChangeRef.current = onChange;\n onKeyDownRef.current = onKeyDown;\n }, [onChange, onKeyDown]);\n\n // Initial content is computed once (controlled `value` is then synced by\n // the effect below). Sanitised before it ever reaches Redactor.\n const initialContentRef = useRef<string>(\n (() => {\n const raw = value ?? defaultValue ?? '';\n return raw ? sanitiseHtml(raw) : '';\n })(),\n );\n\n /* ---- Init Redactor once (or degrade gracefully) -------------- */\n useEffect(() => {\n const ta = textareaRef.current;\n if (!ta) return undefined;\n // Seed the host textarea imperatively: Redactor reads it on init, and in\n // degraded mode it stays as the textarea's shown value. (Done here, not\n // via `defaultValue`, because `degraded` flips after mount so a\n // `defaultValue` prop would never apply.)\n ta.value = initialContentRef.current;\n const R = resolveRedactor(redactor);\n if (!R) {\n setDegraded(true);\n if (import.meta.env.DEV) {\n console.warn(\n '[RichTextEditor] Redactor not found on window.$R / window.Redactor and no `redactor` prop supplied; rendering a plain textarea.',\n );\n }\n return undefined;\n }\n redactorRef.current = R;\n\n const kitDefaults: Record<string, unknown> = {\n lang: lang ?? toRedactorLang(i18n.language || 'en'),\n buttons: TOOLBAR_BUTTONS[toolbar],\n buttonsHide: ['html'],\n plugins: plugins ?? [],\n placeholder: placeholder ?? t('editor.placeholder'),\n toolbarFixed: false,\n imageEditable: false,\n imageResizable: true,\n };\n if (minHeight) kitDefaults.minHeight = MIN_HEIGHT_REM[minHeight];\n const imageUploadOption = imageUploadUrl\n ? { imageUpload: imageUploadUrl }\n : {};\n\n const consumerCallbacks =\n (options?.callbacks as Record<string, unknown> | undefined) ?? {};\n\n const finalOptions: Record<string, unknown> = {\n ...kitDefaults,\n ...imageUploadOption,\n ...(options ?? {}),\n // Re-pin safety-critical keys LAST so consumer `options` can't override\n // the sanitising change handler or re-enable image editing.\n imageEditable: false,\n callbacks: {\n ...consumerCallbacks,\n changed(html: string): void {\n const normalized = normalizeEditorValue(withLazyImages(html));\n const safe = sanitiseHtml(normalized);\n skipNextPropSyncRef.current = true;\n if (!onChangeRef.current) return;\n if (debounceRef.current) clearTimeout(debounceRef.current);\n debounceRef.current = setTimeout(() => {\n onChangeRef.current?.({ html: safe, markdown: '' });\n }, 100);\n },\n keydown(event: KeyboardEvent): void {\n onKeyDownRef.current?.(event);\n },\n },\n };\n\n try {\n R(selector, finalOptions);\n // Redactor renders its own toolbar; readonly is a best-effort command\n // (engine-version dependent) — guarded so an unknown command is inert.\n if (readOnly) {\n try {\n R(selector, 'enableReadonly');\n } catch {\n /* readonly command unsupported in this Redactor build */\n }\n }\n } catch {\n setDegraded(true);\n }\n\n return () => {\n if (debounceRef.current) clearTimeout(debounceRef.current);\n try {\n // Platform forgets to destroy and leaks; we clean up on unmount.\n R(selector, 'destroy');\n } catch {\n /* already torn down */\n }\n redactorRef.current = null;\n };\n // Init once — option changes after mount are not re-applied (matches the\n // editor's uncontrolled-internals model); value/readOnly sync below.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n /* ---- Keep controlled `value` in sync (skip-once caret guard) - */\n useEffect(() => {\n const R = redactorRef.current;\n if (!R || value === undefined) return;\n if (skipNextPropSyncRef.current) {\n skipNextPropSyncRef.current = false;\n return;\n }\n const safe = sanitiseHtml(normalizeEditorValue(value));\n let current = '';\n try {\n current = normalizeEditorValue(\n String(R(selector, 'source.getCode') ?? ''),\n );\n } catch {\n return;\n }\n if (current !== safe) {\n try {\n R(selector, 'source.setCode', safe);\n } catch {\n /* ignore */\n }\n }\n }, [value, selector]);\n\n /* ---- Keep readOnly in sync ----------------------------------- */\n useEffect(() => {\n const R = redactorRef.current;\n if (!R) return;\n try {\n R(selector, readOnly ? 'enableReadonly' : 'disableReadonly');\n } catch {\n /* readonly command unsupported in this Redactor build */\n }\n }, [readOnly, selector]);\n\n /* ---- Degraded fallback: reflect controlled `value` ----------- */\n // Without Redactor the host textarea is uncontrolled (seeded once on init),\n // so it would otherwise ignore external `value` updates. Sync imperatively\n // (a controlled `value=` would warn when `degraded` flips after mount), and\n // skip while focused so we never reset the user's caret mid-type.\n useEffect(() => {\n if (!degraded || value === undefined) return;\n const ta = textareaRef.current;\n if (!ta) return;\n const safe = sanitiseHtml(value);\n if (ta.value !== safe && document.activeElement !== ta) {\n ta.value = safe;\n }\n }, [degraded, value]);\n\n /* ---- Imperative handle --------------------------------------- */\n const handle = useMemo<RichTextEditorHandle>(\n () => ({\n getHTML(): string {\n const R = redactorRef.current;\n if (R) {\n try {\n return String(R(selector, 'source.getCode') ?? '');\n } catch {\n /* fall through */\n }\n }\n return textareaRef.current?.value ?? '';\n },\n getMarkdown(): string {\n return '';\n },\n setContent(html: string): void {\n const safe = sanitiseHtml(html);\n const R = redactorRef.current;\n if (R) {\n try {\n R(selector, 'source.setCode', safe);\n return;\n } catch {\n /* fall through */\n }\n }\n if (textareaRef.current) textareaRef.current.value = safe;\n },\n focus(): void {\n const R = redactorRef.current;\n if (R) {\n try {\n R(selector, 'editor.focus');\n return;\n } catch {\n /* fall through */\n }\n }\n textareaRef.current?.focus();\n },\n clear(): void {\n const R = redactorRef.current;\n if (R) {\n try {\n R(selector, 'source.setCode', '');\n return;\n } catch {\n /* fall through */\n }\n }\n if (textareaRef.current) textareaRef.current.value = '';\n },\n }),\n [selector],\n );\n useImperativeHandle(ref, () => handle, [handle]);\n useAgentRegistration(richTextEditorAgent, handle, id);\n\n /* ---- Degraded-mode change handler ---------------------------- */\n const handleDegradedChange = useCallback(\n (event: ChangeEvent<HTMLTextAreaElement>): void => {\n onChangeRef.current?.({\n html: sanitiseHtml(event.target.value),\n markdown: '',\n });\n },\n [],\n );\n\n // Accessible name for the editing region — a dedicated label, not the\n // placeholder, so the region's name and its placeholder hint don't collide.\n const resolvedLabel = ariaLabel ?? t('editor.regionLabel');\n const resolvedPlaceholder = placeholder ?? t('editor.placeholder');\n\n return (\n <div\n className={[wrapperVariants(), className].filter(Boolean).join(' ')}\n data-component=\"rich-text-editor\"\n data-component-id={id}\n >\n <textarea\n ref={textareaRef}\n id={editorId}\n aria-label={resolvedLabel}\n aria-multiline=\"true\"\n placeholder={resolvedPlaceholder}\n onChange={degraded ? handleDegradedChange : undefined}\n readOnly={degraded ? readOnly : undefined}\n className={degraded ? degradedTextareaVariants() : undefined}\n />\n </div>\n );\n },\n);\n\nRichTextEditor.displayName = 'RichTextEditor';\n\nexport { wrapperVariants };\n"],"names":["richTextEditorAgent","handle","args","sanitiseHtml","input","sanitiseShared","normalizeEditorValue","html","normalized","contentWithoutTags","withLazyImages","resolveRedactor","injected","w","TOOLBAR_BUTTONS","MIN_HEIGHT_REM","REDACTOR_LANG","toRedactorLang","locale","base","wrapperVariants","cva","degradedTextareaVariants","RichTextEditor","forwardRef","id","defaultValue","value","onChange","toolbar","placeholder","readOnly","ariaLabel","minHeight","className","redactor","options","plugins","lang","imageUploadUrl","onKeyDown","ref","t","i18n","useTranslation","rawId","useId","editorId","useMemo","selector","textareaRef","useRef","redactorRef","skipNextPropSyncRef","degraded","setDegraded","useState","debounceRef","onChangeRef","onKeyDownRef","useEffect","initialContentRef","raw","ta","R","kitDefaults","imageUploadOption","consumerCallbacks","finalOptions","safe","_a","event","current","useImperativeHandle","useAgentRegistration","handleDegradedChange","useCallback","resolvedLabel","resolvedPlaceholder","jsx"],"mappings":";;;;;;AAGO,MAAMA,KAA0D;AAAA,EACrE,IAAI;AAAA,EACJ,cAAc,CAAC,aAAa;AAAA,EAC5B,OAAO;AAAA,IACL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,aAAa;AAAA,MACb,MAAM,CAACC,MAAWA,EAAO,QAAA;AAAA,IAAQ;AAAA,IAEnC,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,YAAA;AAAA,IAAY;AAAA,EACvC;AAAA,EAEF,SAAS;AAAA,IACP,aAAa;AAAA,MACX,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,aAAa;AAAA,MACb,QAAQ,CAACA,GAAQC,MAA2B;AAC1C,QAAAD,EAAO,WAAWC,EAAK,IAAI;AAAA,MAC7B;AAAA,IAAA;AAAA,IA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