@alfadocs/ui-kit-debug 1.55.0 → 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/{alia-sidebar-DS0b54Mv.js → alia-sidebar-DOei4Iyu.js} +2 -2
- package/dist/_chunks/{alia-sidebar-DS0b54Mv.js.map → alia-sidebar-DOei4Iyu.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-rows-Dtw5Hpg4.js → anamnesis-summary-rows-CQ-XGr0T.js} +3 -3
- package/dist/_chunks/{anamnesis-summary-rows-Dtw5Hpg4.js.map → anamnesis-summary-rows-CQ-XGr0T.js.map} +1 -1
- package/dist/_chunks/{balance-badge-cell-zP-iN-Pd.js → balance-badge-cell-DmDcXw0c.js} +3 -3
- package/dist/_chunks/{balance-badge-cell-zP-iN-Pd.js.map → balance-badge-cell-DmDcXw0c.js.map} +1 -1
- package/dist/_chunks/{bmi-calculator-DTZhRhXe.js → bmi-calculator-C0UTxB7R.js} +2 -2
- package/dist/_chunks/{bmi-calculator-DTZhRhXe.js.map → bmi-calculator-C0UTxB7R.js.map} +1 -1
- package/dist/_chunks/{booking-uZO10TLK.js → booking-WyNGKPE2.js} +2 -2
- package/dist/_chunks/{booking-uZO10TLK.js.map → booking-WyNGKPE2.js.map} +1 -1
- package/dist/_chunks/{breadcrumb-xgVpPH2H.js → breadcrumb-Boan-5n8.js} +39 -39
- package/dist/_chunks/breadcrumb-Boan-5n8.js.map +1 -0
- package/dist/_chunks/{calculator-dialog-BRjZMWuE.js → calculator-dialog-pCPWta7h.js} +2 -2
- package/dist/_chunks/{calculator-dialog-BRjZMWuE.js.map → calculator-dialog-pCPWta7h.js.map} +1 -1
- package/dist/_chunks/{calendar-workspace-DVajSkKA.js → calendar-workspace-Du2ryaI-.js} +8 -8
- package/dist/_chunks/{calendar-workspace-DVajSkKA.js.map → calendar-workspace-Du2ryaI-.js.map} +1 -1
- package/dist/_chunks/{care-plan-header-BeMYMiI7.js → care-plan-header-DUX_SVvF.js} +2 -2
- package/dist/_chunks/{care-plan-header-BeMYMiI7.js.map → care-plan-header-DUX_SVvF.js.map} +1 -1
- package/dist/_chunks/chart-HsF1KHbx.js +909 -0
- package/dist/_chunks/chart-HsF1KHbx.js.map +1 -0
- package/dist/_chunks/{contact-profile-card-C5DbP_X3.js → contact-profile-card-Ci8lBQ6a.js} +2 -2
- package/dist/_chunks/{contact-profile-card-C5DbP_X3.js.map → contact-profile-card-Ci8lBQ6a.js.map} +1 -1
- package/dist/_chunks/dashboard-grid-DfEY2qci.js +844 -0
- package/dist/_chunks/dashboard-grid-DfEY2qci.js.map +1 -0
- package/dist/_chunks/{data-table-C6T31E33.js → data-table-D8fuhqO1.js} +1 -1
- package/dist/_chunks/{data-table-C6T31E33.js.map → data-table-D8fuhqO1.js.map} +1 -1
- package/dist/_chunks/{date-range-picker-BOvHwWO5.js → date-range-picker-CtUOI38x.js} +188 -182
- package/dist/_chunks/date-range-picker-CtUOI38x.js.map +1 -0
- package/dist/_chunks/{dependent-selector-Bet3XAFj.js → dependent-selector-DgaAQc-c.js} +91 -86
- package/dist/_chunks/dependent-selector-DgaAQc-c.js.map +1 -0
- package/dist/_chunks/{dialog-D52AI4nF.js → dialog-CUzbnKLw.js} +86 -69
- package/dist/_chunks/dialog-CUzbnKLw.js.map +1 -0
- package/dist/_chunks/{due-date-calculator-DXDJbUzo.js → due-date-calculator-CSjklbyw.js} +2 -2
- package/dist/_chunks/{due-date-calculator-DXDJbUzo.js.map → due-date-calculator-CSjklbyw.js.map} +1 -1
- package/dist/_chunks/{file-manager-dIJQUZvq.js → file-manager-Cc_uO8r2.js} +4 -4
- package/dist/_chunks/{file-manager-dIJQUZvq.js.map → file-manager-Cc_uO8r2.js.map} +1 -1
- package/dist/_chunks/{freemium-paywall-B6ojVXq7.js → freemium-paywall-DIKuhX8b.js} +90 -86
- package/dist/_chunks/freemium-paywall-DIKuhX8b.js.map +1 -0
- package/dist/_chunks/{gestational-age-calculator-BfGpt3du.js → gestational-age-calculator-DqVeJke2.js} +2 -2
- package/dist/_chunks/{gestational-age-calculator-BfGpt3du.js.map → gestational-age-calculator-DqVeJke2.js.map} +1 -1
- package/dist/_chunks/{heatmap-BARGZZt2.js → heatmap-Gf9r7Tn1.js} +2 -2
- package/dist/_chunks/{heatmap-BARGZZt2.js.map → heatmap-Gf9r7Tn1.js.map} +1 -1
- package/dist/_chunks/{help-me-write-templates-B7L3zGsE.js → help-me-write-templates-fV-Apf72.js} +2 -2
- package/dist/_chunks/help-me-write-templates-fV-Apf72.js.map +1 -0
- package/dist/_chunks/{key-value-pair-Ax8IJr1M.js → key-value-pair-BNNITp6S.js} +25 -19
- package/dist/_chunks/key-value-pair-BNNITp6S.js.map +1 -0
- package/dist/_chunks/{kit-extensions-C9-v8Dih.js → kit-extensions-Byfxy6sy.js} +4 -4
- package/dist/_chunks/{kit-extensions-C9-v8Dih.js.map → kit-extensions-Byfxy6sy.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-DlBVPMTi.js → link-cell-renderer-TeJNvymP.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-DlBVPMTi.js.map → link-cell-renderer-TeJNvymP.js.map} +1 -1
- package/dist/_chunks/non-modal-tab-exit-D2Bd93Bq.js +65 -0
- package/dist/_chunks/non-modal-tab-exit-D2Bd93Bq.js.map +1 -0
- package/dist/_chunks/{notes-panel-I8ntrrUW.js → notes-panel-DceRhthG.js} +3 -3
- package/dist/_chunks/{notes-panel-I8ntrrUW.js.map → notes-panel-DceRhthG.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-3dspc2tR.js → patient-summary-card-9nQWTQf6.js} +7 -3
- package/dist/_chunks/{patient-summary-card-3dspc2tR.js.map → patient-summary-card-9nQWTQf6.js.map} +1 -1
- package/dist/_chunks/{payment-automation-upsell-DEUfM7EU.js → payment-automation-upsell-DiHovmUL.js} +2 -2
- package/dist/_chunks/{payment-automation-upsell-DEUfM7EU.js.map → payment-automation-upsell-DiHovmUL.js.map} +1 -1
- package/dist/_chunks/{payment-request-card-DAGqh9Yx.js → payment-request-card-CwDpwXUC.js} +2 -2
- package/dist/_chunks/{payment-request-card-DAGqh9Yx.js.map → payment-request-card-CwDpwXUC.js.map} +1 -1
- package/dist/_chunks/{periodontal-chart-BqwLxy2m.js → periodontal-chart-DD5C0M3l.js} +2 -2
- package/dist/_chunks/{periodontal-chart-BqwLxy2m.js.map → periodontal-chart-DD5C0M3l.js.map} +1 -1
- package/dist/_chunks/{periodontal-chart-card-CWZ1YM1h.js → periodontal-chart-card-CxdXvsPU.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card-CWZ1YM1h.js.map → periodontal-chart-card-CxdXvsPU.js.map} +1 -1
- package/dist/_chunks/{periodontal-diagnosis-C9IuvLId.js → periodontal-diagnosis-D-PJv7KS.js} +2 -2
- package/dist/_chunks/{periodontal-diagnosis-C9IuvLId.js.map → periodontal-diagnosis-D-PJv7KS.js.map} +1 -1
- package/dist/_chunks/{position-grid-D2D5_Tze.js → position-grid-CBB88EaH.js} +38 -36
- package/dist/_chunks/position-grid-CBB88EaH.js.map +1 -0
- package/dist/_chunks/{practice-results-DxOgbPDy.js → practice-results-Dhbo-fc_.js} +2 -2
- package/dist/_chunks/{practice-results-DxOgbPDy.js.map → practice-results-Dhbo-fc_.js.map} +1 -1
- package/dist/_chunks/{pregnancy-dating-R3q5n1Wh.js → pregnancy-dating-Bfu0Cq4H.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-R3q5n1Wh.js.map → pregnancy-dating-Bfu0Cq4H.js.map} +1 -1
- package/dist/_chunks/{pregnancy-weight-gain-DwmNklDU.js → pregnancy-weight-gain-CUUrBTBo.js} +2 -2
- package/dist/_chunks/{pregnancy-weight-gain-DwmNklDU.js.map → pregnancy-weight-gain-CUUrBTBo.js.map} +1 -1
- package/dist/_chunks/{public-header.agent-BWusjxY8.js → public-header.agent-pr2hyiND.js} +2 -2
- package/dist/_chunks/{public-header.agent-BWusjxY8.js.map → public-header.agent-pr2hyiND.js.map} +1 -1
- package/dist/_chunks/{radio-group-BT97ty7o.js → radio-group-DicxWJXP.js} +111 -106
- package/dist/_chunks/radio-group-DicxWJXP.js.map +1 -0
- package/dist/_chunks/{radiograph-panel.agent-BA90I3Mu.js → radiograph-panel.agent-DkUokbEa.js} +3 -3
- package/dist/_chunks/{radiograph-panel.agent-BA90I3Mu.js.map → radiograph-panel.agent-DkUokbEa.js.map} +1 -1
- package/dist/_chunks/{rich-text-editor-Blp4smUr.js → rich-text-editor-CkFfmA3v.js} +2 -2
- package/dist/_chunks/{rich-text-editor-Blp4smUr.js.map → rich-text-editor-CkFfmA3v.js.map} +1 -1
- package/dist/_chunks/{sheet-CNFW8mYZ.js → sheet-C7SwIxwB.js} +95 -79
- package/dist/_chunks/sheet-C7SwIxwB.js.map +1 -0
- package/dist/_chunks/{signature-request-rgMsgo-C.js → signature-request-DhbpB9N9.js} +2 -2
- package/dist/_chunks/{signature-request-rgMsgo-C.js.map → signature-request-DhbpB9N9.js.map} +1 -1
- package/dist/_chunks/{stat-51CDL4au.js → stat-DmjGfXND.js} +117 -108
- package/dist/_chunks/stat-DmjGfXND.js.map +1 -0
- package/dist/_chunks/{stepper-accordion-D7lnBGh2.js → stepper-accordion-DDTSOUHc.js} +17 -6
- package/dist/_chunks/stepper-accordion-DDTSOUHc.js.map +1 -0
- package/dist/_chunks/{task-editor-Ctxsa1BY.js → task-editor-ByyRu29Y.js} +3 -3
- package/dist/_chunks/{task-editor-Ctxsa1BY.js.map → task-editor-ByyRu29Y.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-DinTrRIW.js → use-appointment-details-read-JsDM48tf.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-DinTrRIW.js.map → use-appointment-details-read-JsDM48tf.js.map} +1 -1
- package/dist/_chunks/use-select-on-arrow-Cr4iBuW5.js +26 -0
- package/dist/_chunks/use-select-on-arrow-Cr4iBuW5.js.map +1 -0
- package/dist/_chunks/{widget-picker-D8RiWrJd.js → widget-picker-DXYBMTfe.js} +2 -2
- package/dist/_chunks/{widget-picker-D8RiWrJd.js.map → widget-picker-DXYBMTfe.js.map} +1 -1
- package/dist/_chunks/{workflow-map-D3mezmGB.js → workflow-map-Demlpy39.js} +2 -2
- package/dist/_chunks/{workflow-map-D3mezmGB.js.map → workflow-map-Demlpy39.js.map} +1 -1
- package/dist/agent-catalog.json +27 -10
- package/dist/agent-i18n/en.json +8 -7
- package/dist/components/_shared/non-modal-tab-exit.d.ts +8 -0
- package/dist/components/_shared/non-modal-tab-exit.d.ts.map +1 -0
- package/dist/components/_shared/use-apex-chart-semantics.d.ts +6 -0
- package/dist/components/_shared/use-apex-chart-semantics.d.ts.map +1 -0
- package/dist/components/_shared/use-select-on-arrow.d.ts +20 -0
- package/dist/components/_shared/use-select-on-arrow.d.ts.map +1 -0
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/chart/chart.d.ts +10 -5
- package/dist/components/chart/chart.d.ts.map +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/dashboard-grid/dashboard-grid-engine.d.ts +22 -0
- package/dist/components/dashboard-grid/dashboard-grid-engine.d.ts.map +1 -1
- package/dist/components/dashboard-grid/dashboard-grid.agent.d.ts.map +1 -1
- package/dist/components/dashboard-grid/dashboard-grid.d.ts +48 -4
- package/dist/components/dashboard-grid/dashboard-grid.d.ts.map +1 -1
- package/dist/components/dashboard-grid/index.js +1 -1
- package/dist/components/data-table/index.js +2 -2
- 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/dependent-selector/dependent-selector.d.ts.map +1 -1
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/dialog/dialog.d.ts +2 -2
- package/dist/components/dialog/dialog.d.ts.map +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/freemium-paywall/freemium-paywall.d.ts.map +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/key-value-pair/key-value-pair.d.ts.map +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-summary-card/patient-summary-card.d.ts.map +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/periodontal-chart/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/periodontal-diagnosis/index.js +1 -1
- package/dist/components/position-grid/index.js +1 -1
- package/dist/components/position-grid/position-grid.d.ts.map +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/public-header/index.js +1 -1
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +2 -2
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sheet/sheet.d.ts +2 -2
- package/dist/components/sheet/sheet.d.ts.map +1 -1
- package/dist/components/stat/index.d.ts +1 -1
- package/dist/components/stat/index.d.ts.map +1 -1
- package/dist/components/stat/index.js +1 -1
- package/dist/components/stat/stat.d.ts +9 -0
- package/dist/components/stat/stat.d.ts.map +1 -1
- package/dist/components/stepper-accordion/index.js +1 -1
- package/dist/components/stepper-accordion/stepper-accordion.d.ts.map +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/widget-picker/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/host-legacy.css +13 -2
- package/dist/i18n/locales/ar.d.ts +3 -2
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +5 -4
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +3 -2
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +5 -4
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +3 -2
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +5 -4
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +3 -2
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +5 -4
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +3 -2
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +5 -4
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +3 -2
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +5 -4
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +3 -2
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +5 -4
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +3 -2
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +5 -4
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +3 -2
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +5 -4
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +3 -2
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +5 -4
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +3 -2
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +5 -4
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +3 -2
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +5 -4
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +3 -2
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +5 -4
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +3 -2
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +5 -4
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +3 -2
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +5 -4
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +3 -2
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +5 -4
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +3 -2
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +5 -4
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +3 -2
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +5 -4
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +48 -48
- package/dist/locales/ar.json +5 -4
- package/dist/locales/de.json +5 -4
- package/dist/locales/el.json +5 -4
- package/dist/locales/en.json +5 -4
- package/dist/locales/es.json +5 -4
- package/dist/locales/fr.json +5 -4
- package/dist/locales/hi.json +5 -4
- package/dist/locales/it.json +5 -4
- package/dist/locales/ja.json +5 -4
- package/dist/locales/nl.json +5 -4
- package/dist/locales/pl.json +5 -4
- package/dist/locales/pt.json +5 -4
- package/dist/locales/ro.json +5 -4
- package/dist/locales/ru.json +5 -4
- package/dist/locales/sq.json +5 -4
- package/dist/locales/sv.json +5 -4
- package/dist/locales/tr.json +5 -4
- package/dist/locales/zh.json +5 -4
- 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/help-me-write-templates/help-me-write-templates.d.ts +2 -2
- package/dist/patterns/help-me-write-templates/help-me-write-templates.d.ts.map +1 -1
- package/dist/patterns/help-me-write-templates/index.js +1 -1
- package/dist/patterns/payment-automation-upsell/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/tokens.css +13 -2
- package/package.json +1 -1
- package/dist/_chunks/breadcrumb-xgVpPH2H.js.map +0 -1
- package/dist/_chunks/chart-C2RBJERE.js +0 -705
- package/dist/_chunks/chart-C2RBJERE.js.map +0 -1
- package/dist/_chunks/dashboard-grid-SAGoyCtL.js +0 -691
- package/dist/_chunks/dashboard-grid-SAGoyCtL.js.map +0 -1
- package/dist/_chunks/date-range-picker-BOvHwWO5.js.map +0 -1
- package/dist/_chunks/dependent-selector-Bet3XAFj.js.map +0 -1
- package/dist/_chunks/dialog-D52AI4nF.js.map +0 -1
- package/dist/_chunks/freemium-paywall-B6ojVXq7.js.map +0 -1
- package/dist/_chunks/help-me-write-templates-B7L3zGsE.js.map +0 -1
- package/dist/_chunks/key-value-pair-Ax8IJr1M.js.map +0 -1
- package/dist/_chunks/position-grid-D2D5_Tze.js.map +0 -1
- package/dist/_chunks/radio-group-BT97ty7o.js.map +0 -1
- package/dist/_chunks/sheet-CNFW8mYZ.js.map +0 -1
- package/dist/_chunks/stat-51CDL4au.js.map +0 -1
- package/dist/_chunks/stepper-accordion-D7lnBGh2.js.map +0 -1
package/dist/_chunks/{help-me-write-templates-B7L3zGsE.js → help-me-write-templates-fV-Apf72.js}
RENAMED
|
@@ -5,7 +5,7 @@ import { c as ce } from "./index-D2ZczOXr.js";
|
|
|
5
5
|
import { A as O } from "./alert-BhCstf2h.js";
|
|
6
6
|
import { B as N } from "./button-Bn16lcFM.js";
|
|
7
7
|
import { I as B } from "./icon-button-COX76Jdj.js";
|
|
8
|
-
import { D as x } from "./dialog-
|
|
8
|
+
import { D as x } from "./dialog-CUzbnKLw.js";
|
|
9
9
|
import { E as de } from "./editor-overlay-NMxzcO6J.js";
|
|
10
10
|
import { E as me } from "./empty-state-gNG3qYCX.js";
|
|
11
11
|
import { F as Z } from "./form-field-Ani72sVY.js";
|
|
@@ -744,4 +744,4 @@ export {
|
|
|
744
744
|
Le as c,
|
|
745
745
|
mr as u
|
|
746
746
|
};
|
|
747
|
-
//# sourceMappingURL=help-me-write-templates-
|
|
747
|
+
//# sourceMappingURL=help-me-write-templates-fV-Apf72.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help-me-write-templates-fV-Apf72.js","sources":["../../src/patterns/help-me-write-templates/help-me-write-templates.tsx"],"sourcesContent":["/**\n * Help me write templates (HTP-6383) — practice-shared AI templates in the\n * RichTextEditor.\n *\n * Runtime pattern: real consuming apps mount this in production (surfaced via\n * `src/patterns/index.ts` and the `./patterns/help-me-write-templates`\n * subpath). Templates are an AI action of the editor itself, next to\n * spelling and auto-format: a Templates segment in the AI pill and in the\n * selection bubble (`aiTemplates`). Picking one rewrites the selection, else\n * the whole note, then this pattern offers Undo. The editor keeps the\n * patient AI-consent gate and resume-after-grant for all of it.\n *\n * Parts, usable on their own or wired together by `useHelpMeWriteTemplates`:\n * - `HelpMeWriteTemplatesBar` — the Help-me-write bar (`renderHelpMeWrite`):\n * a free prompt with an optional mic, the draft and Insert.\n * - `AiTemplateManager` — the dialog to list, create, edit, delete and\n * reorder templates.\n * - `AiCreditsExhaustedNotice` — the out-of-credits state the bar shows when\n * an AI call rejects with `AiCreditsExhaustedError`, from the bar or the pill.\n * - `HelpMeWriteUndoNotice` — the success notice with Undo after a template\n * rewrote the note.\n *\n * The host owns the templates (list + persistence) and the AI call. The kit\n * never talks to a backend.\n */\nimport {\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type DragEvent,\n type KeyboardEvent,\n type ReactNode,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { cva } from 'class-variance-authority';\nimport {\n ArrowLeft,\n Astroid,\n GripVertical,\n Mic,\n Pencil,\n Plus,\n RotateCcw,\n Send,\n Square,\n Trash2,\n TrendingUp,\n X,\n} from 'lucide-react';\n\nimport { Alert } from '../../components/alert';\nimport { Button, IconButton } from '../../components/button';\nimport { Dialog } from '../../components/dialog';\nimport { EditorOverlay } from '../../components/editor-overlay';\nimport { EmptyState } from '../../components/empty-state';\nimport { FormField } from '../../components/form-field';\nimport { Progress } from '../../components/progress';\nimport type {\n HelpMeWriteRenderContext,\n RichTextEditorAiApplied,\n RichTextEditorAiTemplates,\n RichTextEditorProps,\n} from '../../components/rich-text-editor';\nimport { Spinner } from '../../components/spinner';\nimport { TextArea } from '../../components/text-area';\nimport { StateBackedTextInput } from '../../components/_shared/state-backed-text-input';\nimport { SafeHtml } from '../../components/_shared/safe-html';\n\n/* ------------------------------------------------------------------ */\n/* Types */\n/* ------------------------------------------------------------------ */\n\n/** A practice-shared AI template. */\nexport interface AiTemplate {\n id: string;\n /** Up to 100 characters, unique within the practice. */\n name: string;\n /** One line under the name in the Templates menu. */\n description?: string;\n /** The instructions sent to the AI, up to 4000 characters. */\n prompt: string;\n /**\n * @deprecated The list order is the menu order: the first template is the\n * one most people use. Ignored; reorder with `onReorderTemplates`.\n */\n isDefault?: boolean;\n}\n\n/** What the manager hands `onSaveTemplate`: `id` is absent for a new one. */\nexport type AiTemplateDraft = Omit<AiTemplate, 'id'> & { id?: string };\n\n/** One Help-me-write request. `template` is absent for a free prompt. */\nexport interface HelpMeWriteRequest {\n template?: AiTemplate;\n /** The free prompt, or extra instructions for a template. May be ''. */\n prompt: string;\n /**\n * The context, as plain text. For a template, the text it rewrites. For\n * the free prompt, what the draft is about. From the AI pill it is the\n * whole note; from the selection bubble, the selected text.\n */\n sourceText: string;\n /** Where `sourceText` came from. */\n scope?: 'document' | 'selection';\n signal: AbortSignal;\n}\n\n/**\n * Throw (or reject with) this from `onGenerate` when the practice is out of\n * AI credits (the platform endpoint's 402), and the bar shows the\n * out-of-credits notice instead of a generic error.\n */\nexport class AiCreditsExhaustedError extends Error {\n constructor(message = 'AI credits exhausted') {\n super(message);\n this.name = 'AiCreditsExhaustedError';\n }\n}\n\n/** The practice's allowance, for the out-of-credits notice. All optional. */\nexport interface AiCreditsInfo {\n remaining?: number;\n limit?: number;\n /** When the monthly allowance returns. */\n resetsOn?: Date;\n /**\n * Shows a \"Buy AI credits\" button and \"add credits\" wording. Omit while\n * credits cannot be bought: the notice then only says when AI returns.\n */\n onBuyCredits?: () => void;\n /** Shows a \"See what each action costs\" link. */\n onSeeCosts?: () => void;\n}\n\nexport type HelpMeWriteApplyMode = 'replace' | 'below' | 'insert';\n\n/** Fired after a draft lands in the editor. */\nexport interface HelpMeWriteApplied {\n mode: HelpMeWriteApplyMode;\n template?: AiTemplate;\n /** The editor's HTML before the change. */\n previousHtml: string;\n /** Puts `previousHtml` back in the editor (what Undo does). */\n undo: () => void;\n}\n\n/* ------------------------------------------------------------------ */\n/* Shared classes */\n/* ------------------------------------------------------------------ */\n\n// Match the composer's input height (--min-target-size), like the kit bar.\nconst ACTION_SIZE = 'ds:!size-[var(--min-target-size)]';\nconst BRAND_ACTION = `${ACTION_SIZE} ds:bg-[image:var(--gradient-brand)] ds:rounded-full`;\n// The recording mic goes solid destructive, as in the kit's own bar.\nconst RECORDING_MIC =\n 'ds:aria-pressed:!bg-[var(--destructive)] ds:aria-pressed:!text-[var(--destructive-foreground)]';\nconst metaClass =\n 'ds:m-0 ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]';\nconst eyebrowClass =\n 'type-eyebrow ds:m-0 ds:text-[color:var(--muted-foreground)]';\nconst previewClass = [\n 'ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]',\n 'ds:bg-[color-mix(in_srgb,var(--background)_70%,transparent)]',\n 'ds:p-[var(--spacing-sm)] ds:[max-block-size:14rem] ds:overflow-y-auto',\n 'ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--foreground)]',\n 'ds:[&_ul]:list-disc ds:[&_ul]:ps-[var(--spacing-md)]',\n 'ds:[&_h3]:font-medium ds:[&_h3]:[margin-block-start:var(--spacing-xs)]',\n 'ds:[&_p]:[margin-block-end:var(--spacing-xs)]',\n 'ds:[&>:first-child]:[margin-block-start:0]',\n].join(' ');\n\n/* ------------------------------------------------------------------ */\n/* Helpers */\n/* ------------------------------------------------------------------ */\n\n// Join dictated text onto the prompt with a single space.\nfunction joinWith(base: string, extra: string): string {\n if (!extra) return base;\n if (!base) return extra;\n return /\\s$/.test(base) ? `${base}${extra}` : `${base} ${extra}`;\n}\n\nfunction isAbort(err: unknown): boolean {\n return (\n typeof err === 'object' &&\n err !== null &&\n 'name' in err &&\n (err as { name?: string }).name === 'AbortError'\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* AiCreditsExhaustedNotice */\n/* ------------------------------------------------------------------ */\n\nexport interface AiCreditsExhaustedNoticeProps {\n credits?: AiCreditsInfo;\n /** Shows a Back button (the bar uses it to return to the prompt). */\n onBack?: () => void;\n}\n\n/** The out-of-credits state: what happened, the allowance, and the ways on. */\nexport function AiCreditsExhaustedNotice({\n credits,\n onBack,\n}: AiCreditsExhaustedNoticeProps): React.JSX.Element {\n const { t, i18n } = useTranslation('ui');\n const limit = credits?.limit;\n const remaining = credits?.remaining ?? 0;\n const remainingText =\n limit !== undefined\n ? t('helpMeWriteTemplates.credits.remaining', { remaining, limit })\n : undefined;\n const resetsOn = credits?.resetsOn\n ? new Intl.DateTimeFormat(i18n.language, {\n day: 'numeric',\n month: 'long',\n }).format(credits.resetsOn)\n : undefined;\n return (\n <div\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\"\n data-component=\"ai-credits-exhausted-notice\"\n >\n <Alert variant=\"promo\" icon={<Astroid aria-hidden=\"true\" />}>\n <Alert.Title as=\"h2\">\n {t('helpMeWriteTemplates.credits.title')}\n </Alert.Title>\n <Alert.Description>\n {/* Without a way to buy credits, only say when AI comes back. */}\n {credits?.onBuyCredits\n ? resetsOn\n ? t('helpMeWriteTemplates.credits.bodyResets', { date: resetsOn })\n : t('helpMeWriteTemplates.credits.body')\n : resetsOn\n ? t('helpMeWriteTemplates.credits.bodyWaitResets', {\n date: resetsOn,\n })\n : t('helpMeWriteTemplates.credits.bodyWait')}\n </Alert.Description>\n {limit !== undefined && remainingText ? (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:[margin-block-start:var(--spacing-sm)]\">\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <span className=\"type-label\">\n {t('helpMeWriteTemplates.credits.meterLabel')}\n </span>\n <span className=\"type-label ds:ms-auto ds:tabular-nums\">\n {remainingText}\n </span>\n </div>\n <Progress\n value={Math.max(0, limit - remaining)}\n max={limit}\n size=\"sm\"\n ariaLabel={t('helpMeWriteTemplates.credits.meterLabel')}\n ariaValueText={remainingText}\n />\n </div>\n ) : null}\n {credits?.onBuyCredits || credits?.onSeeCosts ? (\n <Alert.Action>\n {credits.onBuyCredits ? (\n <Button\n intent=\"tonal\"\n size=\"sm\"\n startIcon={<TrendingUp aria-hidden=\"true\" />}\n onClick={credits.onBuyCredits}\n >\n {t('helpMeWriteTemplates.credits.cta')}\n </Button>\n ) : null}\n {credits.onSeeCosts ? (\n <Button intent=\"link\" size=\"sm\" onClick={credits.onSeeCosts}>\n {t('helpMeWriteTemplates.credits.secondary')}\n </Button>\n ) : null}\n </Alert.Action>\n ) : null}\n </Alert>\n <div className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]\">\n {onBack ? (\n <Button intent=\"ghost\" startIcon={<ArrowLeft />} onClick={onBack}>\n {t('helpMeWriteTemplates.credits.back')}\n </Button>\n ) : null}\n <p className={metaClass}>{t('helpMeWriteTemplates.credits.kept')}</p>\n </div>\n </div>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* HelpMeWriteTemplatesBar */\n/* ------------------------------------------------------------------ */\n\nexport interface HelpMeWriteTemplatesBarProps {\n /** What `RichTextEditor`'s `renderHelpMeWrite` hands its host. */\n context: HelpMeWriteRenderContext;\n /**\n * @deprecated Templates run from the editor's AI pill (`aiTemplates`),\n * not from this bar. Ignored.\n */\n templates?: AiTemplate[];\n /** The AI call. Reject with `AiCreditsExhaustedError` when out of credits. */\n onGenerate: (request: HelpMeWriteRequest) => Promise<string>;\n /** @deprecated The manager opens from the pill's Templates menu. Ignored. */\n onManageTemplates?: (mode: 'list' | 'create') => void;\n /** After a draft lands. */\n onApplied?: (applied: HelpMeWriteApplied) => void;\n /** Shown in the out-of-credits notice. */\n credits?: AiCreditsInfo;\n /** Show the mic in the prompt when the editor has `onDictate`. Default true. */\n enableDictation?: boolean;\n /** Ignore Escape (e.g. while the manager dialog above it is open). */\n suspendClose?: boolean;\n}\n\n/**\n * The Help-me-write bar, docked in the editor's AI slot: a free prompt with\n * an optional mic, then the draft and Insert. It also shows the\n * out-of-credits notice, including when a pill action ran out.\n */\nexport function HelpMeWriteTemplatesBar({\n context,\n onGenerate,\n onApplied,\n credits,\n enableDictation = true,\n suspendClose = false,\n}: HelpMeWriteTemplatesBarProps): React.JSX.Element {\n const { t } = useTranslation('ui');\n const { open } = context;\n const draftId = useId();\n const errorId = useId();\n const [prompt, setPrompt] = useState('');\n const [loading, setLoading] = useState(false);\n const [errored, setErrored] = useState(false);\n const [outOfCredits, setOutOfCredits] = useState(false);\n const [draft, setDraft] = useState<string | null>(null);\n const abortRef = useRef<AbortController | null>(null);\n const onDictate = enableDictation ? context.onDictate : undefined;\n\n /* ---- Mic in the prompt (the editor's own dictation seam) ---- */\n const [isDictating, setIsDictating] = useState(false);\n const [interim, setInterim] = useState('');\n const [announcement, setAnnouncement] = useState('');\n const dictateAbortRef = useRef<AbortController | null>(null);\n const stopDictation = useCallback(() => dictateAbortRef.current?.abort(), []);\n const toggleDictation = useCallback(() => {\n if (isDictating) {\n stopDictation();\n return;\n }\n if (!onDictate) return;\n const controller = new AbortController();\n dictateAbortRef.current = controller;\n setIsDictating(true);\n setAnnouncement(t('helpMeWriteTemplates.bar.listening'));\n onDictate({\n signal: controller.signal,\n onPartialTranscript: (text) => {\n if (!controller.signal.aborted) setInterim(text);\n },\n onFinalTranscript: (text) => {\n if (controller.signal.aborted) return;\n setInterim('');\n const trimmed = text.trim();\n if (trimmed) {\n setPrompt((p) => joinWith(p, trimmed));\n setAnnouncement(trimmed);\n }\n },\n })\n .catch((err: unknown) => {\n // Out of credits shows the notice; other dictation errors are\n // non-fatal (the user can type instead).\n if (err instanceof AiCreditsExhaustedError) setOutOfCredits(true);\n })\n .finally(() => {\n setInterim('');\n if (dictateAbortRef.current === controller) {\n dictateAbortRef.current = null;\n setIsDictating(false);\n setAnnouncement('');\n }\n });\n }, [isDictating, onDictate, stopDictation, t]);\n\n // Each open starts fresh.\n useEffect(() => {\n if (open) {\n setPrompt('');\n setLoading(false);\n setErrored(false);\n // Opened because an AI call ran out of credits: start on the notice.\n setOutOfCredits(context.creditsExhausted);\n setDraft(null);\n } else {\n abortRef.current?.abort();\n dictateAbortRef.current?.abort();\n }\n // Only on open/close; `context` is a fresh object every editor render.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n\n useEffect(\n () => () => {\n abortRef.current?.abort();\n dictateAbortRef.current?.abort();\n },\n [],\n );\n\n const run = useCallback(() => {\n if (loading || !prompt.trim()) return;\n stopDictation();\n abortRef.current?.abort();\n const controller = new AbortController();\n abortRef.current = controller;\n setErrored(false);\n setLoading(true);\n const onSelection = context.scope === 'selection';\n onGenerate({\n prompt: prompt.trim(),\n sourceText: onSelection ? context.selectionText : context.getText(),\n scope: onSelection ? 'selection' : 'document',\n signal: controller.signal,\n })\n .then((result) => {\n if (controller.signal.aborted) return;\n setDraft(result);\n setLoading(false);\n })\n .catch((err: unknown) => {\n if (controller.signal.aborted || isAbort(err)) return;\n if (err instanceof AiCreditsExhaustedError) setOutOfCredits(true);\n else setErrored(true);\n setLoading(false);\n });\n // `context` is a fresh object every editor render; read it at call time.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [loading, prompt, onGenerate, stopDictation]);\n\n const { onClose: contextClose } = context;\n const close = useCallback(() => {\n if (suspendClose) return;\n contextClose();\n }, [suspendClose, contextClose]);\n\n const insert = () => {\n if (draft === null) return;\n const previousHtml = context.getHTML();\n context.insertAtSelection(draft);\n context.onClose();\n const { setContent } = context;\n onApplied?.({\n mode: context.scope === 'selection' ? 'replace' : 'insert',\n previousHtml,\n undo: () => setContent(previousHtml),\n });\n };\n\n let body: ReactNode;\n if (outOfCredits) {\n body = (\n <AiCreditsExhaustedNotice\n credits={credits}\n onBack={() => setOutOfCredits(false)}\n />\n );\n } else if (draft !== null) {\n body = (\n <>\n <section\n aria-labelledby={draftId}\n className=\"ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-2xs)]\"\n >\n <h2 id={draftId} className={eyebrowClass}>\n {t('helpMeWriteTemplates.bar.after')}\n </h2>\n <SafeHtml\n html={draft}\n profile=\"rich-text\"\n className={previewClass}\n tabIndex={0}\n />\n </section>\n <div className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]\">\n <Button intent=\"ghost\" startIcon={<X />} onClick={context.onClose}>\n {t('helpMeWriteTemplates.bar.discard')}\n </Button>\n <Button\n intent=\"ghost\"\n startIcon={<RotateCcw />}\n onClick={() => {\n setDraft(null);\n run();\n }}\n >\n {t('helpMeWriteTemplates.bar.retry')}\n </Button>\n <span className=\"ds:flex-1\" aria-hidden=\"true\" />\n <Button intent=\"primary\" onClick={insert}>\n {context.scope === 'selection'\n ? t('helpMeWriteTemplates.bar.replace')\n : t('helpMeWriteTemplates.bar.insert')}\n </Button>\n </div>\n </>\n );\n } else {\n // While dictating the field shows the committed prompt plus live interim\n // text, read-only so the stream is not fought over by typing.\n const fieldValue = isDictating ? joinWith(prompt, interim) : prompt;\n body = (\n <>\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]\">\n <IconButton\n size=\"md\"\n intent=\"outline\"\n className={ACTION_SIZE}\n icon={<X />}\n aria-label={t('helpMeWriteTemplates.bar.close')}\n onClick={context.onClose}\n />\n <div className=\"ds:min-w-0 ds:flex-1\">\n <TextArea\n size=\"md\"\n value={fieldValue}\n onChange={(event) => setPrompt(event.target.value)}\n placeholder={t('editor.ai.promptPlaceholder')}\n aria-label={t('editor.ai.promptLabel')}\n autoResize\n minRows={1}\n maxRows={3}\n readOnly={loading || isDictating}\n tone={errored ? 'error' : 'default'}\n aria-describedby={errored ? errorId : undefined}\n />\n </div>\n {onDictate ? (\n <IconButton\n size=\"md\"\n intent=\"outline\"\n className={\n isDictating ? `${ACTION_SIZE} ${RECORDING_MIC}` : ACTION_SIZE\n }\n icon={\n isDictating ? <Square className=\"ds:fill-current\" /> : <Mic />\n }\n aria-pressed={isDictating}\n aria-label={\n isDictating\n ? t('helpMeWriteTemplates.bar.dictateStop')\n : t('helpMeWriteTemplates.bar.dictateStart')\n }\n disabled={loading}\n onClick={toggleDictation}\n />\n ) : null}\n <IconButton\n size=\"md\"\n intent=\"primary\"\n className={BRAND_ACTION}\n icon={loading ? <Spinner size=\"sm\" variant=\"pulse\" /> : <Send />}\n disabled={loading || !prompt.trim()}\n aria-busy={loading || undefined}\n aria-label={t('helpMeWriteTemplates.bar.write')}\n onClick={run}\n />\n </div>\n {onDictate ? (\n <p className=\"ds:sr-only\" role=\"status\" aria-live=\"polite\">\n {announcement}\n </p>\n ) : null}\n {errored ? (\n <p id={errorId} role=\"alert\" className={metaClass}>\n {t('helpMeWriteTemplates.bar.error')}\n </p>\n ) : null}\n <p className={metaClass}>\n {context.scope === 'selection'\n ? t('helpMeWriteTemplates.bar.contextSelection')\n : t('helpMeWriteTemplates.bar.contextDocument')}{' '}\n {context.privacyNotice}\n </p>\n </>\n );\n }\n\n return (\n <EditorOverlay\n open={open}\n onClose={close}\n ariaLabel={t('editor.ai.helpMeWrite')}\n >\n <div className=\"ds:contents\" data-component=\"help-me-write-templates-bar\">\n {body}\n </div>\n </EditorOverlay>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* AiTemplateManager */\n/* ------------------------------------------------------------------ */\n\n/* The kit's list-reorder idiom (Sidebar favourites, anamnesis): HTML5 drag\n on the row, a grip handle that also moves with Alt+Arrow / Alt+Home /\n Alt+End, and a polite announcement of every move. Rows are keyed, so the\n moved row's handle keeps focus. */\nconst reorderRowClass = cva('', {\n variants: {\n dragging: { true: 'ds:opacity-60', false: '' },\n dropTarget: {\n true: 'ds:outline-[length:var(--focus-ring-width)] ds:outline-dashed ds:outline-[var(--primary)] ds:outline-offset-[-2px]',\n false: '',\n },\n },\n defaultVariants: { dragging: false, dropTarget: false },\n});\n\nfunction useReorder(\n templates: AiTemplate[],\n onReorder: ((orderedIds: string[]) => void | Promise<void>) | undefined,\n) {\n const { t } = useTranslation('ui');\n const [dragSource, setDragSource] = useState<number | null>(null);\n const [dropTarget, setDropTarget] = useState<number | null>(null);\n const [message, setMessage] = useState('');\n // Toggle an invisible suffix so a repeated move is announced again.\n const toggle = useRef(false);\n\n const move = (from: number, to: number): void => {\n const target = Math.max(0, Math.min(templates.length - 1, to));\n if (!onReorder || target === from) return;\n const ids = templates.map((tpl) => tpl.id);\n const [moved] = ids.splice(from, 1);\n ids.splice(target, 0, moved);\n void onReorder(ids);\n toggle.current = !toggle.current;\n const text = t('helpMeWriteTemplates.manager.reorderAnnounce', {\n label: templates[from].name,\n to: target + 1,\n total: templates.length,\n });\n setMessage(toggle.current ? text : `${text}\\u200b`);\n };\n\n const rowProps = (index: number) =>\n onReorder\n ? {\n draggable: true as const,\n onDragStart: (event: DragEvent<HTMLElement>) => {\n setDragSource(index);\n event.dataTransfer.effectAllowed = 'move';\n // Firefox needs data to start a drag.\n event.dataTransfer.setData('text/plain', String(index));\n },\n onDragEnd: () => {\n setDragSource(null);\n setDropTarget(null);\n },\n onDragOver: (event: DragEvent<HTMLElement>) => {\n if (dragSource === null) return;\n event.preventDefault();\n event.dataTransfer.dropEffect = 'move';\n setDropTarget(index);\n },\n onDragLeave: () => setDropTarget(null),\n onDrop: (event: DragEvent<HTMLElement>) => {\n event.preventDefault();\n const source = dragSource;\n setDragSource(null);\n setDropTarget(null);\n if (source !== null) move(source, index);\n },\n }\n : {};\n\n const rowClass = (index: number): string =>\n reorderRowClass({\n dragging: dragSource === index,\n dropTarget: dropTarget === index && dragSource !== index,\n });\n\n const handle = (index: number, name: string): ReactNode => (\n <IconButton\n size=\"sm\"\n intent=\"ghost\"\n icon={<GripVertical aria-hidden=\"true\" />}\n aria-label={t('helpMeWriteTemplates.manager.reorderHandle', {\n label: name,\n })}\n className=\"ds:cursor-grab ds:active:cursor-grabbing\"\n onKeyDown={(event: KeyboardEvent<HTMLButtonElement>) => {\n if (!event.altKey) return;\n const to =\n event.key === 'ArrowUp'\n ? index - 1\n : event.key === 'ArrowDown'\n ? index + 1\n : event.key === 'Home'\n ? 0\n : event.key === 'End'\n ? templates.length - 1\n : null;\n if (to === null) return;\n event.preventDefault();\n move(index, to);\n }}\n />\n );\n\n const liveRegion = (\n <span role=\"status\" aria-live=\"polite\" className=\"ds:sr-only\">\n {message}\n </span>\n );\n\n return { rowProps, rowClass, handle, liveRegion };\n}\n\nexport interface AiTemplateManagerProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n /** Open on the list (default) or straight on a new-template form. */\n initialMode?: 'list' | 'create';\n templates: AiTemplate[];\n /** Persist a new (no `id`) or edited template. A rejection keeps the form open. */\n onSaveTemplate: (draft: AiTemplateDraft) => void | Promise<void>;\n /** Omit to hide Delete. */\n onDeleteTemplate?: (id: string) => void | Promise<void>;\n /**\n * Persist a new order (every template id, first to last): the order of\n * the Templates menu. Omit to hide the drag handles.\n */\n onReorderTemplates?: (orderedIds: string[]) => void | Promise<void>;\n}\n\ninterface FormState {\n id?: string;\n name: string;\n description: string;\n prompt: string;\n submitted: boolean;\n}\n\nconst EMPTY_FORM: FormState = {\n name: '',\n description: '',\n prompt: '',\n submitted: false,\n};\n\n/** List, create, edit and delete the practice's templates. */\nexport function AiTemplateManager({\n open,\n onOpenChange,\n initialMode = 'list',\n templates,\n onSaveTemplate,\n onDeleteTemplate,\n onReorderTemplates,\n}: AiTemplateManagerProps): React.JSX.Element {\n const { t } = useTranslation('ui');\n const reorder = useReorder(templates, onReorderTemplates);\n const [form, setForm] = useState<FormState | null>(null);\n const [saving, setSaving] = useState(false);\n const [saveFailed, setSaveFailed] = useState(false);\n const [pendingDelete, setPendingDelete] = useState<AiTemplate | null>(null);\n const [deleting, setDeleting] = useState(false);\n const [deleteFailed, setDeleteFailed] = useState(false);\n\n // Wait for the host: the confirmation stays open (busy) until the delete\n // settles, and shows an error if it fails.\n const confirmDelete = async () => {\n if (!pendingDelete || deleting) return;\n setDeleting(true);\n setDeleteFailed(false);\n try {\n await onDeleteTemplate?.(pendingDelete.id);\n setPendingDelete(null);\n } catch {\n setDeleteFailed(true);\n } finally {\n setDeleting(false);\n }\n };\n\n useEffect(() => {\n if (open) {\n setSaveFailed(false);\n setForm(initialMode === 'create' ? { ...EMPTY_FORM } : null);\n }\n // Only when it opens; `templates` changing mid-edit keeps the form.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n\n const nameTaken = (name: string, id?: string): boolean =>\n templates.some(\n (tpl) => tpl.id !== id && tpl.name.toLowerCase() === name.toLowerCase(),\n );\n\n const nameError = (() => {\n if (!form?.submitted) return undefined;\n const name = form.name.trim();\n if (!name) return t('helpMeWriteTemplates.manager.nameRequired');\n return nameTaken(name, form.id)\n ? t('helpMeWriteTemplates.manager.nameTaken')\n : undefined;\n })();\n const promptError =\n form?.submitted && !form.prompt.trim()\n ? t('helpMeWriteTemplates.manager.promptRequired')\n : undefined;\n\n const save = async () => {\n if (!form || saving) return;\n const next = { ...form, submitted: true };\n setForm(next);\n const name = next.name.trim();\n const prompt = next.prompt.trim();\n if (!name || !prompt || nameTaken(name, next.id)) return;\n setSaving(true);\n setSaveFailed(false);\n try {\n await onSaveTemplate({\n id: next.id,\n name,\n description: next.description.trim() || undefined,\n prompt,\n });\n setForm(null);\n } catch {\n setSaveFailed(true);\n } finally {\n setSaving(false);\n }\n };\n\n const title = form\n ? form.id\n ? t('helpMeWriteTemplates.manager.formEdit')\n : t('helpMeWriteTemplates.manager.formNew')\n : t('helpMeWriteTemplates.manager.title');\n\n return (\n <>\n <Dialog open={open} onOpenChange={onOpenChange}>\n <Dialog.Content size=\"lg\">\n <div className=\"ds:contents\" data-component=\"ai-template-manager\">\n <Dialog.Header>\n <Dialog.Title>{title}</Dialog.Title>\n <Dialog.Description>\n {t('helpMeWriteTemplates.manager.description')}\n </Dialog.Description>\n </Dialog.Header>\n <Dialog.Body>\n {form ? (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {saveFailed ? (\n <Alert variant=\"error\">\n {t('helpMeWriteTemplates.manager.saveError')}\n </Alert>\n ) : null}\n <FormField\n label={t('helpMeWriteTemplates.manager.name')}\n error={nameError}\n required\n >\n <StateBackedTextInput\n value={form.name}\n maxLength={100}\n placeholder={t(\n 'helpMeWriteTemplates.manager.namePlaceholder',\n )}\n onChange={(event) =>\n setForm({ ...form, name: event.target.value })\n }\n />\n </FormField>\n <FormField\n label={t('helpMeWriteTemplates.manager.descLabel')}\n description={t('helpMeWriteTemplates.manager.descHint')}\n optional\n >\n <StateBackedTextInput\n value={form.description}\n maxLength={120}\n onChange={(event) =>\n setForm({ ...form, description: event.target.value })\n }\n />\n </FormField>\n <FormField\n label={t('helpMeWriteTemplates.manager.prompt')}\n description={t(\n 'helpMeWriteTemplates.manager.promptDescription',\n )}\n error={promptError}\n required\n >\n <TextArea\n value={form.prompt}\n maxLength={4000}\n autoResize\n minRows={4}\n maxRows={10}\n onChange={(event) =>\n setForm({ ...form, prompt: event.target.value })\n }\n />\n </FormField>\n </div>\n ) : templates.length === 0 ? (\n <EmptyState\n variant=\"first-use\"\n size=\"sm\"\n title={t('helpMeWriteTemplates.manager.emptyTitle')}\n description={t(\n 'helpMeWriteTemplates.manager.emptyDescription',\n )}\n primaryAction={{\n label: t('helpMeWriteTemplates.manager.new'),\n onClick: () => setForm({ ...EMPTY_FORM }),\n }}\n />\n ) : (\n <ul\n aria-label={t('helpMeWriteTemplates.manager.listLabel')}\n className=\"ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0\"\n >\n {templates.map((tpl, index) => (\n <li\n key={tpl.id}\n {...reorder.rowProps(index)}\n className={`ds:flex ds:items-start ds:gap-[var(--spacing-sm)] ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)] ds:p-[var(--spacing-sm)] ${reorder.rowClass(index)}`}\n >\n {onReorderTemplates\n ? reorder.handle(index, tpl.name)\n : null}\n <div className=\"ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <div className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]\">\n <span className=\"type-title-item ds:text-[color:var(--foreground)]\">\n {tpl.name}\n </span>\n </div>\n <p className={`${metaClass} ds:line-clamp-2`}>\n {tpl.description || tpl.prompt}\n </p>\n </div>\n <IconButton\n size=\"sm\"\n intent=\"ghost\"\n icon={<Pencil />}\n aria-label={t('helpMeWriteTemplates.manager.edit', {\n name: tpl.name,\n })}\n onClick={() =>\n setForm({\n id: tpl.id,\n name: tpl.name,\n description: tpl.description ?? '',\n prompt: tpl.prompt,\n submitted: false,\n })\n }\n />\n {onDeleteTemplate ? (\n <IconButton\n size=\"sm\"\n intent=\"ghost\"\n icon={<Trash2 />}\n aria-label={t('helpMeWriteTemplates.manager.delete', {\n name: tpl.name,\n })}\n onClick={() => setPendingDelete(tpl)}\n />\n ) : null}\n </li>\n ))}\n </ul>\n )}\n {reorder.liveRegion}\n </Dialog.Body>\n <Dialog.Footer>\n {form ? (\n <>\n <Button intent=\"secondary\" onClick={() => setForm(null)}>\n {t('helpMeWriteTemplates.manager.cancel')}\n </Button>\n <Button\n intent=\"primary\"\n loading={saving}\n onClick={() => void save()}\n >\n {t('helpMeWriteTemplates.manager.save')}\n </Button>\n </>\n ) : (\n <>\n {templates.length > 0 ? (\n <Button\n intent=\"outline\"\n startIcon={<Plus />}\n onClick={() => setForm({ ...EMPTY_FORM })}\n >\n {t('helpMeWriteTemplates.manager.new')}\n </Button>\n ) : null}\n <Dialog.Close asChild>\n <Button intent=\"primary\">\n {t('helpMeWriteTemplates.manager.done')}\n </Button>\n </Dialog.Close>\n </>\n )}\n </Dialog.Footer>\n </div>\n </Dialog.Content>\n </Dialog>\n <Dialog\n open={pendingDelete != null}\n onOpenChange={(next) => {\n if (!next && !deleting) {\n setPendingDelete(null);\n setDeleteFailed(false);\n }\n }}\n >\n <Dialog.Content size=\"sm\" variant=\"alert\">\n <Dialog.Header>\n <Dialog.Title>\n {t('helpMeWriteTemplates.manager.deleteTitle', {\n name: pendingDelete?.name ?? '',\n })}\n </Dialog.Title>\n <Dialog.Description>\n {t('helpMeWriteTemplates.manager.deleteDescription')}\n </Dialog.Description>\n </Dialog.Header>\n {deleteFailed ? (\n <Dialog.Body>\n <Alert variant=\"error\">\n {t('helpMeWriteTemplates.manager.deleteError')}\n </Alert>\n </Dialog.Body>\n ) : null}\n <Dialog.Footer>\n <Dialog.Close asChild>\n <Button intent=\"secondary\" disabled={deleting}>\n {t('helpMeWriteTemplates.manager.cancel')}\n </Button>\n </Dialog.Close>\n <Button\n intent=\"destructive\"\n loading={deleting}\n onClick={() => void confirmDelete()}\n >\n {t('helpMeWriteTemplates.manager.deleteConfirm')}\n </Button>\n </Dialog.Footer>\n </Dialog.Content>\n </Dialog>\n </>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* HelpMeWriteUndoNotice */\n/* ------------------------------------------------------------------ */\n\nexport interface HelpMeWriteUndoNoticeProps {\n /** The change to offer Undo for; `null` hides the notice. */\n applied: HelpMeWriteApplied | null;\n onUndo: () => void;\n onDismiss: () => void;\n}\n\n/** \"Note rewritten with …\" plus Undo; takes focus when it appears. */\nexport function HelpMeWriteUndoNotice({\n applied,\n onUndo,\n onDismiss,\n}: HelpMeWriteUndoNoticeProps): React.JSX.Element | null {\n const { t } = useTranslation('ui');\n const undoRef = useRef<HTMLButtonElement>(null);\n useEffect(() => {\n if (applied) undoRef.current?.focus();\n }, [applied]);\n if (!applied?.template) return null;\n const name = applied.template.name;\n return (\n <Alert\n variant=\"success\"\n dismissible\n onOpenChange={(isOpen) => {\n if (!isOpen) onDismiss();\n }}\n data-component=\"help-me-write-undo-notice\"\n >\n <div className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]\">\n <span>\n {applied.mode === 'below'\n ? t('helpMeWriteTemplates.undo.addedBelow', { name })\n : t('helpMeWriteTemplates.undo.replaced', { name })}\n </span>\n <Button ref={undoRef} intent=\"outline\" size=\"sm\" onClick={onUndo}>\n {t('helpMeWriteTemplates.undo.undo')}\n </Button>\n </div>\n </Alert>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* useHelpMeWriteTemplates — the whole thing in one call */\n/* ------------------------------------------------------------------ */\n\nexport interface UseHelpMeWriteTemplatesOptions {\n templates: AiTemplate[];\n /** The AI call, for both templates (from the pill) and the free prompt. */\n onGenerate: HelpMeWriteTemplatesBarProps['onGenerate'];\n /** Enables the manager (create / edit). Omit for read-only template users. */\n onSaveTemplate?: AiTemplateManagerProps['onSaveTemplate'];\n /** Enables Delete in the manager. */\n onDeleteTemplate?: AiTemplateManagerProps['onDeleteTemplate'];\n /** Enables drag-and-drop reordering in the manager (the menu order). */\n onReorderTemplates?: AiTemplateManagerProps['onReorderTemplates'];\n credits?: AiCreditsInfo;\n /** Mic in the bar's prompt when the editor has `onDictate`. Default true. */\n enableDictation?: boolean;\n /** Also told about every applied draft (e.g. for analytics). */\n onApplied?: (applied: HelpMeWriteApplied) => void;\n /**\n * Shows the AI-credits/bundles hover card on every AI trigger the editor\n * has (this bar's own segment included, via `editorProps`). One wiring\n * covers both the bar's existing out-of-credits notice (`credits`, shown\n * only once the practice actually runs out) and this always-available\n * hover preview.\n */\n creditsNotice?: RichTextEditorProps['aiCreditsNotice'];\n}\n\n/** The `RichTextEditor` props the hook drives; spread them on the editor. */\nexport interface HelpMeWriteTemplatesEditorProps {\n renderHelpMeWrite: (context: HelpMeWriteRenderContext) => ReactNode;\n aiTemplates: RichTextEditorAiTemplates;\n onAiApplied: (applied: RichTextEditorAiApplied) => void;\n aiCreditsNotice?: RichTextEditorProps['aiCreditsNotice'];\n}\n\nexport interface UseHelpMeWriteTemplatesResult extends HelpMeWriteTemplatesEditorProps {\n /** All three editor props at once: `<RichTextEditor {...hmw.editorProps} />`. */\n editorProps: HelpMeWriteTemplatesEditorProps;\n /** Mount once, anywhere (a portalled dialog); `null` without `onSaveTemplate`. */\n manager: ReactNode;\n /** Place where the Undo notice should show, e.g. above the editor. */\n undoNotice: ReactNode;\n openManager: (mode?: 'list' | 'create') => void;\n}\n\n/**\n * Wires templates, the Help-me-write bar, the manager and Undo into the\n * editor. Templates run from the editor's AI pill and selection bubble;\n * the bar is the free prompt. Usage:\n *\n * const hmw = useHelpMeWriteTemplates({ templates, onGenerate, onSaveTemplate });\n * {hmw.undoNotice}\n * <RichTextEditor {...hmw.editorProps} … />\n * {hmw.manager}\n */\nexport function useHelpMeWriteTemplates({\n templates,\n onGenerate,\n onSaveTemplate,\n onDeleteTemplate,\n onReorderTemplates,\n credits,\n enableDictation,\n onApplied,\n creditsNotice,\n}: UseHelpMeWriteTemplatesOptions): UseHelpMeWriteTemplatesResult {\n const [manager, setManager] = useState<{\n open: boolean;\n mode: 'list' | 'create';\n }>({ open: false, mode: 'list' });\n const [applied, setApplied] = useState<HelpMeWriteApplied | null>(null);\n const openManager = useCallback(\n (mode: 'list' | 'create' = 'list') => setManager({ open: true, mode }),\n [],\n );\n\n const renderHelpMeWrite = useCallback(\n (context: HelpMeWriteRenderContext): ReactNode => (\n <HelpMeWriteTemplatesBar\n context={context}\n onGenerate={onGenerate}\n credits={credits}\n enableDictation={enableDictation}\n suspendClose={manager.open}\n onApplied={onApplied}\n />\n ),\n [onGenerate, credits, enableDictation, manager.open, onApplied],\n );\n\n // The editor runs templates; the host's full template (with its prompt)\n // goes to `onGenerate`, looked up by id.\n const aiTemplates = useMemo<RichTextEditorAiTemplates>(() => {\n const byId = new Map(templates.map((tpl) => [tpl.id, tpl]));\n return {\n templates,\n onRun: ({ template, text, scope, signal }): Promise<string> => {\n const full = byId.get(template.id);\n if (!full) return Promise.reject(new Error('Unknown template'));\n return onGenerate({\n template: full,\n prompt: '',\n sourceText: text,\n scope,\n signal,\n });\n },\n onManage: onSaveTemplate ? openManager : undefined,\n };\n }, [templates, onGenerate, onSaveTemplate, openManager]);\n\n const onAiApplied = useCallback(\n (event: RichTextEditorAiApplied): void => {\n if (event.action !== 'template' || !event.template) return;\n const template = templates.find((tpl) => tpl.id === event.template?.id);\n const change: HelpMeWriteApplied = {\n mode: 'replace',\n template,\n previousHtml: event.previousHtml,\n undo: event.undo,\n };\n setApplied(template ? change : null);\n onApplied?.(change);\n },\n [templates, onApplied],\n );\n\n const managerNode = useMemo(\n () =>\n onSaveTemplate ? (\n <AiTemplateManager\n open={manager.open}\n initialMode={manager.mode}\n onOpenChange={(isOpen) => setManager((m) => ({ ...m, open: isOpen }))}\n templates={templates}\n onSaveTemplate={onSaveTemplate}\n onDeleteTemplate={onDeleteTemplate}\n onReorderTemplates={onReorderTemplates}\n />\n ) : null,\n [manager, templates, onSaveTemplate, onDeleteTemplate, onReorderTemplates],\n );\n\n const undoNotice = (\n <HelpMeWriteUndoNotice\n applied={applied}\n onUndo={() => {\n applied?.undo();\n setApplied(null);\n }}\n onDismiss={() => setApplied(null)}\n />\n );\n\n const editorProps = useMemo<HelpMeWriteTemplatesEditorProps>(\n () => ({\n renderHelpMeWrite,\n aiTemplates,\n onAiApplied,\n aiCreditsNotice: creditsNotice,\n }),\n [renderHelpMeWrite, aiTemplates, onAiApplied, creditsNotice],\n );\n\n return {\n ...editorProps,\n editorProps,\n manager: managerNode,\n undoNotice,\n openManager,\n };\n}\n"],"names":["AiCreditsExhaustedError","message","ACTION_SIZE","BRAND_ACTION","RECORDING_MIC","metaClass","eyebrowClass","previewClass","joinWith","base","extra","isAbort","err","AiCreditsExhaustedNotice","credits","onBack","t","i18n","useTranslation","limit","remaining","remainingText","resetsOn","jsxs","Alert","Astroid","jsx","Progress","Button","TrendingUp","ArrowLeft","HelpMeWriteTemplatesBar","context","onGenerate","onApplied","enableDictation","suspendClose","open","draftId","useId","errorId","prompt","setPrompt","useState","loading","setLoading","errored","setErrored","outOfCredits","setOutOfCredits","draft","setDraft","abortRef","useRef","onDictate","isDictating","setIsDictating","interim","setInterim","announcement","setAnnouncement","dictateAbortRef","stopDictation","useCallback","_a","toggleDictation","controller","text","trimmed","p","useEffect","_b","run","onSelection","result","contextClose","close","insert","previousHtml","setContent","body","Fragment","SafeHtml","X","RotateCcw","fieldValue","IconButton","TextArea","event","Square","Mic","Spinner","Send","EditorOverlay","reorderRowClass","cva","useReorder","templates","onReorder","dragSource","setDragSource","dropTarget","setDropTarget","setMessage","toggle","move","from","to","target","ids","tpl","moved","index","source","name","GripVertical","EMPTY_FORM","AiTemplateManager","onOpenChange","initialMode","onSaveTemplate","onDeleteTemplate","onReorderTemplates","reorder","form","setForm","saving","setSaving","saveFailed","setSaveFailed","pendingDelete","setPendingDelete","deleting","setDeleting","deleteFailed","setDeleteFailed","confirmDelete","nameTaken","id","nameError","promptError","save","next","title","Dialog","FormField","StateBackedTextInput","EmptyState","Pencil","Trash2","Plus","HelpMeWriteUndoNotice","applied","onUndo","onDismiss","undoRef","isOpen","useHelpMeWriteTemplates","creditsNotice","manager","setManager","setApplied","openManager","mode","renderHelpMeWrite","aiTemplates","useMemo","byId","template","scope","signal","full","onAiApplied","change","managerNode","m","undoNotice","editorProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmHO,MAAMA,WAAgC,MAAM;AAAA,EACjD,YAAYC,IAAU,wBAAwB;AAC5C,UAAMA,CAAO,GACb,KAAK,OAAO;AAAA,EACd;AACF;AAkCA,MAAMC,IAAc,qCACdC,KAAe,GAAGD,CAAW,wDAE7BE,KACJ,kGACIC,IACJ,uFACIC,KACJ,+DACIC,KAAe;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,EAAE,KAAK,GAAG;AAOV,SAASC,GAASC,GAAcC,GAAuB;AACrD,SAAKA,IACAD,IACE,MAAM,KAAKA,CAAI,IAAI,GAAGA,CAAI,GAAGC,CAAK,KAAK,GAAGD,CAAI,IAAIC,CAAK,KAD5CA,IADCD;AAGrB;AAEA,SAASE,GAAQC,GAAuB;AACtC,SACE,OAAOA,KAAQ,YACfA,MAAQ,QACR,UAAUA,KACTA,EAA0B,SAAS;AAExC;AAaO,SAASC,GAAyB;AAAA,EACvC,SAAAC;AAAA,EACA,QAAAC;AACF,GAAqD;AACnD,QAAM,EAAE,GAAAC,GAAG,MAAAC,MAASC,EAAe,IAAI,GACjCC,IAAQL,KAAA,gBAAAA,EAAS,OACjBM,KAAYN,KAAA,gBAAAA,EAAS,cAAa,GAClCO,IACJF,MAAU,SACNH,EAAE,0CAA0C,EAAE,WAAAI,GAAW,OAAAD,EAAA,CAAO,IAChE,QACAG,IAAWR,KAAA,QAAAA,EAAS,WACtB,IAAI,KAAK,eAAeG,EAAK,UAAU;AAAA,IACrC,KAAK;AAAA,IACL,OAAO;AAAA,EAAA,CACR,EAAE,OAAOH,EAA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AAaA,EAAQ;AAAA,QACrB,cAAc,CAACH,MAAWI,EAAW,CAACe,OAAO,EAAE,GAAGA,GAAG,MAAMnB,EAAA,EAAS;AAAA,QACpE,WAAA3D;AAAA,QACA,gBAAAuB;AAAA,QACA,kBAAAC;AAAA,QACA,oBAAAC;AAAA,MAAA;AAAA,IAAA,IAEA;AAAA,IACN,CAACqC,GAAS9D,GAAWuB,GAAgBC,GAAkBC,CAAkB;AAAA,EAAA,GAGrEsD,IACJ,gBAAAtJ;AAAA,IAAC6H;AAAA,IAAA;AAAA,MACC,SAAAC;AAAA,MACA,QAAQ,MAAM;AACZ,QAAAA,KAAA,QAAAA,EAAS,QACTS,EAAW,IAAI;AAAA,MACjB;AAAA,MACA,WAAW,MAAMA,EAAW,IAAI;AAAA,IAAA;AAAA,EAAA,GAI9BgB,IAAcX;AAAA,IAClB,OAAO;AAAA,MACL,mBAAAF;AAAA,MACA,aAAAC;AAAA,MACA,aAAAO;AAAA,MACA,iBAAiBd;AAAA,IAAA;AAAA,IAEnB,CAACM,GAAmBC,GAAaO,GAAad,CAAa;AAAA,EAAA;AAG7D,SAAO;AAAA,IACL,GAAGmB;AAAA,IACH,aAAAA;AAAA,IACA,SAASH;AAAA,IACT,YAAAE;AAAA,IACA,aAAAd;AAAA,EAAA;AAEJ;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as a, jsxs as i, Fragment as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
1
|
+
import { jsx as a, jsxs as i, Fragment as f } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as h, useState as y, useCallback as K } from "react";
|
|
3
|
+
import { c as v } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as T } from "react-i18next";
|
|
5
5
|
import { I as j } from "./icon-button-COX76Jdj.js";
|
|
6
6
|
import { C as _ } from "./check-DrFSN__t.js";
|
|
7
7
|
import { C as A } from "./copy-vRpqqHtY.js";
|
|
8
|
-
const B =
|
|
8
|
+
const B = v(
|
|
9
9
|
"type-body ds:text-foreground ds:min-w-0 ds:[unicode-bidi:isolate]",
|
|
10
10
|
{
|
|
11
11
|
variants: {
|
|
@@ -47,7 +47,7 @@ const B = h(
|
|
|
47
47
|
mono: !1
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
), L =
|
|
50
|
+
), L = v("ds:flex", {
|
|
51
51
|
variants: {
|
|
52
52
|
layout: {
|
|
53
53
|
horizontal: "ds:flex-row ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
@@ -66,25 +66,25 @@ const B = h(
|
|
|
66
66
|
layout: "horizontal",
|
|
67
67
|
hasIcon: !1
|
|
68
68
|
}
|
|
69
|
-
}), S =
|
|
69
|
+
}), S = h(
|
|
70
70
|
({
|
|
71
71
|
label: t,
|
|
72
72
|
labelNode: l,
|
|
73
73
|
value: e,
|
|
74
74
|
layout: s = "horizontal",
|
|
75
75
|
alignValue: n = "start",
|
|
76
|
-
mono:
|
|
76
|
+
mono: g = !1,
|
|
77
77
|
copyable: k = !1,
|
|
78
78
|
copyText: x,
|
|
79
79
|
icon: d,
|
|
80
80
|
className: V,
|
|
81
81
|
...C
|
|
82
82
|
}, z) => {
|
|
83
|
-
const { t: o } = T("ui"), [N,
|
|
83
|
+
const { t: o } = T("ui"), [N, u] = y(!1), [b, r] = y(""), c = x ?? (typeof e == "string" ? e : void 0), w = K(async () => {
|
|
84
84
|
if (c)
|
|
85
85
|
try {
|
|
86
|
-
await navigator.clipboard.writeText(c),
|
|
87
|
-
|
|
86
|
+
await navigator.clipboard.writeText(c), u(!0), r(o("keyValuePair.copied")), setTimeout(() => {
|
|
87
|
+
u(!1), r("");
|
|
88
88
|
}, 2e3);
|
|
89
89
|
} catch {
|
|
90
90
|
r(o("keyValuePair.notAvailable")), setTimeout(() => r(""), 3e3);
|
|
@@ -92,8 +92,8 @@ const B = h(
|
|
|
92
92
|
}, [c, o]), P = B({
|
|
93
93
|
layout: s,
|
|
94
94
|
alignValue: n,
|
|
95
|
-
mono:
|
|
96
|
-
}),
|
|
95
|
+
mono: g
|
|
96
|
+
}), m = d != null, I = "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:min-w-0 ds:flex-1", p = /* @__PURE__ */ i(f, { children: [
|
|
97
97
|
/* @__PURE__ */ i("span", { className: "type-label ds:text-muted-foreground ds:shrink-0", children: [
|
|
98
98
|
l ?? t,
|
|
99
99
|
/* @__PURE__ */ a("span", { className: "ds:sr-only", children: ": " })
|
|
@@ -122,11 +122,12 @@ const B = h(
|
|
|
122
122
|
"div",
|
|
123
123
|
{
|
|
124
124
|
ref: z,
|
|
125
|
-
className: L({ layout: s, hasIcon:
|
|
125
|
+
className: L({ layout: s, hasIcon: m, className: V }),
|
|
126
126
|
"data-component": "key-value-pair",
|
|
127
|
+
"data-has-icon": m ? "" : void 0,
|
|
127
128
|
...C,
|
|
128
129
|
children: [
|
|
129
|
-
|
|
130
|
+
m ? /* @__PURE__ */ i(f, { children: [
|
|
130
131
|
/* @__PURE__ */ a(
|
|
131
132
|
"span",
|
|
132
133
|
{
|
|
@@ -135,8 +136,8 @@ const B = h(
|
|
|
135
136
|
children: d
|
|
136
137
|
}
|
|
137
138
|
),
|
|
138
|
-
s === "horizontal" ?
|
|
139
|
-
] }) :
|
|
139
|
+
s === "horizontal" ? p : /* @__PURE__ */ a("div", { className: I, children: p })
|
|
140
|
+
] }) : p,
|
|
140
141
|
/* @__PURE__ */ a("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: b })
|
|
141
142
|
]
|
|
142
143
|
}
|
|
@@ -148,14 +149,19 @@ const F = {
|
|
|
148
149
|
sm: "ds:gap-y-[var(--spacing-sm)]",
|
|
149
150
|
md: "ds:gap-y-[var(--spacing-md)]",
|
|
150
151
|
lg: "ds:gap-y-[var(--spacing-lg)]"
|
|
151
|
-
}, G =
|
|
152
|
+
}, G = h(
|
|
152
153
|
({ children: t, className: l, rowGap: e = "md", ...s }, n) => /* @__PURE__ */ a(
|
|
153
154
|
"div",
|
|
154
155
|
{
|
|
155
156
|
ref: n,
|
|
156
157
|
"data-component": "key-value-list",
|
|
157
158
|
className: [
|
|
158
|
-
|
|
159
|
+
// The label track reads a custom property, and an icon list only
|
|
160
|
+
// sets that property: it never re-declares the template, so a
|
|
161
|
+
// host's own column layout (PatientSummaryCard's two fields per
|
|
162
|
+
// row from 672px) still wins exactly as before.
|
|
163
|
+
"ds:grid ds:grid-cols-[auto_var(--kvl-label-track,auto)_minmax(0,1fr)]",
|
|
164
|
+
"ds:has-[>[data-has-icon]]:[--kvl-label-track:fit-content(40%)]",
|
|
159
165
|
"ds:gap-x-[var(--spacing-md)]",
|
|
160
166
|
F[e],
|
|
161
167
|
// Each direct `data-component="key-value-pair"` child becomes
|
|
@@ -186,4 +192,4 @@ export {
|
|
|
186
192
|
G as K,
|
|
187
193
|
S as a
|
|
188
194
|
};
|
|
189
|
-
//# sourceMappingURL=key-value-pair-
|
|
195
|
+
//# sourceMappingURL=key-value-pair-BNNITp6S.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"key-value-pair-BNNITp6S.js","sources":["../../src/components/key-value-pair/key-value-pair.tsx"],"sourcesContent":["import { forwardRef, useState, useCallback, type HTMLAttributes } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Copy, Check } from 'lucide-react';\nimport { IconButton } from '../button/icon-button';\n\n/* ------------------------------------------------------------------ */\n/* CVA — root wrapper */\n/* */\n/* The layout variants below describe the LOGICAL flow of label/value. */\n/* When an `icon` prop is supplied, the root flips to `flex-row` and */\n/* renders the icon at the leading edge regardless of the chosen */\n/* layout — the layout then governs the inner label/value stack. Cap- */\n/* height alignment is handled by `items-start` + a small `mt` offset */\n/* on the icon wrapper so a wrapping value doesn't push the icon */\n/* downward. */\n/* ------------------------------------------------------------------ */\n\n/* ------------------------------------------------------------------ */\n/* CVA — value cell */\n/* */\n/* `alignValue` decides whether the value starts beside the label or */\n/* is pinned to the inline-end of the row. Pinning matters when a */\n/* column of rows carries one comparable figure (a price, a count): */\n/* left where it falls, its position shifts with the label width and */\n/* the eye can't run down it. */\n/* */\n/* Standalone, the value is a flex sibling — `start` lets it absorb */\n/* the free space, `end` pushes it over with an auto inline margin. */\n/* Inside a `<KeyValueList>` the value is a grid item in the third */\n/* track (`minmax(0,1fr)`), where the same auto margin pins it to the */\n/* track's end. One pair of classes covers both. */\n/* */\n/* Horizontal only. In `vertical` the value already sits below the */\n/* label with nothing to pin against, so `alignValue` is a documented */\n/* no-op there rather than a surprise. */\n/* ------------------------------------------------------------------ */\n\nconst keyValuePairValueVariants = cva(\n 'type-body ds:text-foreground ds:min-w-0 ds:[unicode-bidi:isolate]',\n {\n variants: {\n layout: {\n horizontal: '',\n vertical: 'ds:shrink',\n },\n alignValue: {\n start: '',\n end: '',\n },\n mono: {\n true: 'ds:font-[family-name:var(--font-mono)]',\n false: '',\n },\n },\n compoundVariants: [\n // `flex-1` lets the value absorb the remaining inline space when\n // the KVP root flexes icon / label / value as direct siblings.\n // Without it the value shrinks to its content width and the row\n // leaves inline-end whitespace.\n {\n layout: 'horizontal',\n alignValue: 'start',\n class: 'ds:flex-1 ds:shrink',\n },\n // Pinned: drop `flex-1` so the cell is content-width, then let an\n // auto inline-start margin eat the slack. `ms-*` is the logical\n // spelling, so this flips correctly in a right-to-left locale.\n {\n layout: 'horizontal',\n alignValue: 'end',\n class: 'ds:ms-auto ds:shrink-0',\n },\n ],\n defaultVariants: {\n layout: 'horizontal',\n alignValue: 'start',\n mono: false,\n },\n },\n);\n\nconst keyValuePairVariants = cva('ds:flex', {\n variants: {\n layout: {\n horizontal: 'ds:flex-row ds:items-center ds:gap-[var(--spacing-sm)]',\n vertical: 'ds:flex-col ds:gap-[var(--spacing-xs)]',\n },\n /** Internal — flips the root to a horizontal flex when an icon\n is present so the icon can sit at the leading edge of both\n horizontal and vertical inner stacks. `items-start` keeps the\n icon anchored to the label row even when the value wraps. */\n hasIcon: {\n true: 'ds:flex-row ds:items-start ds:gap-[var(--spacing-sm)]',\n false: '',\n },\n },\n defaultVariants: {\n layout: 'horizontal',\n hasIcon: false,\n },\n});\n\n/* ------------------------------------------------------------------ */\n/* KeyValuePairProps */\n/* ------------------------------------------------------------------ */\n\nexport interface KeyValuePairProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n Omit<VariantProps<typeof keyValuePairVariants>, 'hasIcon'> {\n /** The label (term). Stays a string: it is interpolated into the copy\n * button's accessible name, where a node would render \"[object Object]\". */\n label: string;\n /**\n * Display-only override for the rendered label — a node when the term needs\n * more than text (a PHI lock beside it, a badge). `label` is still required\n * and remains the string every accessible name is built from.\n */\n labelNode?: React.ReactNode;\n /** The value — accepts plain text, Badge, Tag, monospace code, any ReactNode */\n value: React.ReactNode;\n /** Layout direction */\n layout?: 'horizontal' | 'vertical';\n /** Render value in monospace font */\n mono?: boolean;\n /**\n * Where the value sits on the row.\n *\n * `start` (default) keeps the existing behaviour — the value begins\n * immediately after the label and absorbs the remaining width.\n *\n * `end` pins the value to the inline-end of the row, so its position\n * no longer moves with the label's length. Use it for the one\n * comparable figure in a list of rows — a price, a count, a score —\n * where a reader wants to scan down a column rather than read each\n * line. Pinning every row defeats the point.\n *\n * Horizontal layout only: in `vertical` the value already sits below\n * the label, so there is nothing to pin against and this is ignored.\n */\n alignValue?: 'start' | 'end';\n /** Show a copy-to-clipboard IconButton beside the value */\n copyable?: boolean;\n /** The text to copy — defaults to `value` if value is a string */\n copyText?: string;\n /**\n * Optional decorative icon rendered at the leading edge of the pair.\n * Pass a `lucide-react` icon (or any single React element) for\n * visual consistency. The wrapper applies `aria-hidden=\"true\"` and\n * paints the icon with `var(--key-value-pair-icon-color)` (defaults\n * to `--muted-foreground`); consumers can recolour the slot via\n * that token without forking the component.\n *\n * Cap-height alignment with the label is automatic — the wrapper\n * uses `mt-0.5` so the glyph rides the label row, not the\n * geometric centre of a wrapping value.\n *\n * Type is `ReactElement` (not the broader `ReactNode`) so the\n * intent is clear at the call site: this slot is for a single\n * SVG/icon, not arbitrary fragments, strings, or numbers.\n */\n icon?: React.ReactElement | null;\n}\n\n/* ------------------------------------------------------------------ */\n/* KeyValuePair */\n/* ------------------------------------------------------------------ */\n\nexport const KeyValuePair = forwardRef<HTMLDivElement, KeyValuePairProps>(\n (\n {\n label,\n labelNode,\n value,\n layout = 'horizontal',\n alignValue = 'start',\n mono = false,\n copyable = false,\n copyText,\n icon,\n className,\n ...props\n },\n ref,\n ) => {\n const { t } = useTranslation('ui');\n const [copied, setCopied] = useState(false);\n const [announcement, setAnnouncement] = useState('');\n\n const textToCopy =\n copyText ?? (typeof value === 'string' ? value : undefined);\n\n const handleCopy = useCallback(async () => {\n if (!textToCopy) {\n if (import.meta.env.DEV) {\n console.warn(\n 'KeyValuePair: copyable is true but no copyText was provided and value is not a string. Copy no-op.',\n );\n }\n return;\n }\n\n try {\n await navigator.clipboard.writeText(textToCopy);\n setCopied(true);\n setAnnouncement(t('keyValuePair.copied'));\n setTimeout(() => {\n setCopied(false);\n setAnnouncement('');\n }, 2000);\n } catch {\n setAnnouncement(t('keyValuePair.notAvailable'));\n setTimeout(() => setAnnouncement(''), 3000);\n }\n }, [textToCopy, t]);\n\n const valueClasses = keyValuePairValueVariants({\n layout,\n alignValue,\n mono,\n });\n\n const hasIcon = icon !== undefined && icon !== null;\n\n // Inner stack — used ONLY for `layout=\"vertical\"` when an icon is\n // present (icon on the leading edge, label-on-top-of-value stacked\n // next to it). For `layout=\"horizontal\"` we render the icon /\n // label / value as direct flex children of the root — wrapping\n // them in a single `<div>` would break the KeyValueList subgrid\n // (the subgrid's 3 tracks would collapse to 2: the wrapper +\n // icon). See the conditional below.\n const innerStackClass =\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:min-w-0 ds:flex-1';\n\n const stack = (\n <>\n <span className=\"type-label ds:text-muted-foreground ds:shrink-0\">\n {labelNode ?? label}\n <span className=\"ds:sr-only\">: </span>\n </span>\n <span className={valueClasses}>{value}</span>\n {copyable && (\n <IconButton\n icon={copied ? <Check /> : <Copy />}\n size=\"sm\"\n aria-label={t('keyValuePair.copy', { label })}\n onClick={handleCopy}\n intent=\"ghost\"\n className={\n layout === 'horizontal'\n ? // Only one element on the row may claim the slack. When\n // the value is pinned it has already taken it with its\n // own `ms-auto`; a second auto margin here would split\n // the free space between them and strand the value in\n // the middle of the row instead of at its end.\n alignValue === 'end'\n ? 'ds:shrink-0'\n : 'ds:ms-auto ds:shrink-0'\n : 'ds:self-start'\n }\n />\n )}\n </>\n );\n\n return (\n <div\n ref={ref}\n className={keyValuePairVariants({ layout, hasIcon, className })}\n data-component=\"key-value-pair\"\n data-has-icon={hasIcon ? '' : undefined}\n {...props}\n >\n {hasIcon ? (\n <>\n {/* Decorative icon wrapper. `aria-hidden` so SR users only\n hear \"<label>: <value>\" — the icon is brand polish,\n not semantic content.\n\n `translate-y` shifts the icon down by 2px visually so\n its centre lines up with the label's x-height centre.\n In a baseline-aligned subgrid row, the icon's margin-\n box bottom pins to the label's text baseline — that\n leaves the 16px SVG sitting visually 3-4px above the\n label's centre. `translate-y` adjusts only the paint\n position; the underlying baseline math still holds,\n so multi-line value cells (e.g. address + map link)\n stay correctly aligned with the FIRST line of the\n value. */}\n <span\n aria-hidden=\"true\"\n className=\"ds:inline-flex ds:shrink-0 ds:translate-y-0.5 ds:text-[color:var(--key-value-pair-icon-color)] ds:[&_svg]:size-4\"\n >\n {icon}\n </span>\n {/* `horizontal` layout: render label / value / copy as\n direct flex children of the root so each piece falls\n into its own track when this KVP is promoted to a\n subgrid row by `<KeyValueList>`. Wrapping them in a\n `<div>` here would collapse the subgrid's 3 tracks\n (icon | label | value) to 2 (icon | wrapper) and labels\n across rows would no longer share a column. The root's\n `flex flex-row` + `gap-sm` keeps the standalone visual\n identical.\n\n `vertical` layout still needs the wrapper because the\n stack is column-flow — label-on-top-of-value next to\n the icon. */}\n {layout === 'horizontal' ? (\n stack\n ) : (\n <div className={innerStackClass}>{stack}</div>\n )}\n </>\n ) : (\n stack\n )}\n <span role=\"status\" aria-live=\"polite\" className=\"ds:sr-only\">\n {announcement}\n </span>\n </div>\n );\n },\n);\n\nKeyValuePair.displayName = 'KeyValuePair';\n\n/* ------------------------------------------------------------------ */\n/* KeyValueList — subgrid alignment for a column of KVP rows */\n/* */\n/* When several `<KeyValuePair>` rows live in the same card (practice */\n/* profile, settings panel, contact card, etc.), the per-row flex */\n/* layout means each row's label column has a different width. The */\n/* values end up zigzagged. Wrapping in `<KeyValueList>` puts all rows */\n/* into a single 3-column CSS subgrid (icon | label | value), so */\n/* labels share a column across rows and values start at the same */\n/* inline-start edge. */\n/* */\n/* Standalone `<KeyValuePair>` instances outside a `<KeyValueList>` */\n/* keep their existing per-row flex layout — no behaviour change for */\n/* consumers that didn't opt in. */\n/* ------------------------------------------------------------------ */\n\nexport interface KeyValueListProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Gap between rows. Maps to spacing tokens — defaults to `md`.\n * Smaller gaps suit dense settings panels; larger gaps suit\n * profile cards.\n */\n rowGap?: 'sm' | 'md' | 'lg';\n}\n\nconst rowGapClassMap: Record<\n NonNullable<KeyValueListProps['rowGap']>,\n string\n> = {\n sm: 'ds:gap-y-[var(--spacing-sm)]',\n md: 'ds:gap-y-[var(--spacing-md)]',\n lg: 'ds:gap-y-[var(--spacing-lg)]',\n};\n\nexport const KeyValueList = forwardRef<HTMLDivElement, KeyValueListProps>(\n ({ children, className, rowGap = 'md', ...props }, ref) => {\n // Three-column subgrid: icon | label | value.\n // - col 1: `auto` — width of the widest icon (or 0 if no rows have icons)\n // - col 2: `auto` — width of the widest label, shared across all rows.\n // When rows have icons the label sits here, beside a `1fr` value,\n // so a long one-line label (Albanian \"Me përvojë me pacientët e\n // ankthshëm\") took the whole width and left the value about 3px\n // on a phone. A list with icon rows caps it at `fit-content(40%)`\n // so the label wraps instead. Without icons the label and value\n // share the two `auto` tracks, which shrink together, so nothing\n // changes there.\n // - col 3: `minmax(0, 1fr)` — value flexes; `minmax` prevents the\n // value from forcing the grid wider than its container when the\n // value contains a long unbroken string (e.g. an email or URL).\n //\n // Each child `<KeyValuePair>` (which renders as a `<div>` with a\n // `data-component=\"key-value-pair\"` marker) is promoted into a\n // subgrid row by the CSS below — the cell boundaries align across\n // every direct child.\n //\n // We render as `<div>` (not `<dl>`): axe enforces \"dl can only\n // contain dt/dd\" and the inner KVP renders as a `<div>`. The KVP's\n // own SR markup (label + `<span class=\"sr-only\">: </span>` + value)\n // already conveys term-value semantics — wrapping in a `<dl>`\n // doesn't add anything the screen reader doesn't already get.\n return (\n <div\n ref={ref}\n data-component=\"key-value-list\"\n className={[\n // The label track reads a custom property, and an icon list only\n // sets that property: it never re-declares the template, so a\n // host's own column layout (PatientSummaryCard's two fields per\n // row from 672px) still wins exactly as before.\n 'ds:grid ds:grid-cols-[auto_var(--kvl-label-track,auto)_minmax(0,1fr)]',\n 'ds:has-[>[data-has-icon]]:[--kvl-label-track:fit-content(40%)]',\n 'ds:gap-x-[var(--spacing-md)]',\n rowGapClassMap[rowGap],\n // Each direct `data-component=\"key-value-pair\"` child becomes\n // a subgrid row spanning all three columns. The KVP's own\n // flex layout still works inside the cell (icon shrinks-0,\n // label shrinks-0, value flexes) — subgrid just aligns the\n // boundaries between siblings.\n 'ds:[&>[data-component=\"key-value-pair\"]]:grid',\n 'ds:[&>[data-component=\"key-value-pair\"]]:grid-cols-subgrid',\n 'ds:[&>[data-component=\"key-value-pair\"]]:col-span-3',\n 'ds:[&>[data-component=\"key-value-pair\"]]:items-baseline',\n // Unset the KVP's intra-row `gap-sm` so the subgrid inherits\n // the parent KeyValueList's `gap-x-md` for every track gap\n // (icon→label and label→value). `gap-0` here would override\n // the parent's gap and crowd the icon against the label;\n // `[gap:normal]` is the subgrid-spec way to defer to the\n // parent.\n 'ds:[&>[data-component=\"key-value-pair\"]]:[gap:normal]',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nKeyValueList.displayName = 'KeyValueList';\n"],"names":["keyValuePairValueVariants","cva","keyValuePairVariants","KeyValuePair","forwardRef","label","labelNode","value","layout","alignValue","mono","copyable","copyText","icon","className","props","ref","t","useTranslation","copied","setCopied","useState","announcement","setAnnouncement","textToCopy","handleCopy","useCallback","valueClasses","hasIcon","innerStackClass","stack","jsxs","Fragment","jsx","IconButton","Check","Copy","rowGapClassMap","KeyValueList","children","rowGap"],"mappings":";;;;;;;AAsCA,MAAMA,IAA4BC;AAAA,EAChC;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,QAAQ;AAAA,QACN,YAAY;AAAA,QACZ,UAAU;AAAA,MAAA;AAAA,MAEZ,YAAY;AAAA,QACV,OAAO;AAAA,QACP,KAAK;AAAA,MAAA;AAAA,MAEP,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAEF,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA,MAKhB;AAAA,QACE,QAAQ;AAAA,QACR,YAAY;AAAA,QACZ,OAAO;AAAA,MAAA;AAAA;AAAA;AAAA;AAAA,MAKT;AAAA,QACE,QAAQ;AAAA,QACR,YAAY;AAAA,QACZ,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAEF,iBAAiB;AAAA,MACf,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ,GAEMC,IAAuBD,EAAI,WAAW;AAAA,EAC1C,UAAU;AAAA,IACR,QAAQ;AAAA,MACN,YAAY;AAAA,MACZ,UAAU;AAAA,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMZ,SAAS;AAAA,MACP,MAAM;AAAA,MACN,OAAO;AAAA,IAAA;AAAA,EACT;AAAA,EAEF,iBAAiB;AAAA,IACf,QAAQ;AAAA,IACR,SAAS;AAAA,EAAA;AAEb,CAAC,GAoEYE,IAAeC;AAAA,EAC1B,CACE;AAAA,IACE,OAAAC;AAAA,I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AA,MACC,KAAAjB;AAAA,MACA,kBAAe;AAAA,MACf,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA,QAKT;AAAA,QACA;AAAA,QACA;AAAA,QACAqB,EAAeG,CAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAMrB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAOA;AAAA,QACA1B;AAAA,MAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,MACV,GAAGC;AAAA,MAEH,UAAAwB;AAAA,IAAA;AAAA,EAAA;AAIT;AAEAD,EAAa,cAAc;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createElement as e } from "react";
|
|
2
|
-
import { P as i } from "./pregnancy-dating-
|
|
3
|
-
import { P as o } from "./pregnancy-weight-gain-
|
|
4
|
-
import { G as r } from "./gestational-age-calculator-
|
|
2
|
+
import { P as i } from "./pregnancy-dating-Bfu0Cq4H.js";
|
|
3
|
+
import { P as o } from "./pregnancy-weight-gain-CUUrBTBo.js";
|
|
4
|
+
import { G as r } from "./gestational-age-calculator-DqVeJke2.js";
|
|
5
5
|
import { C as c } from "./cycle-calculator-Dgfqr4Q4.js";
|
|
6
6
|
import { F as s } from "./fetal-weight-BWaqqjea.js";
|
|
7
7
|
import { c as a } from "./createLucideIcon-DhHxpK9K.js";
|
|
@@ -91,4 +91,4 @@ const k = [
|
|
|
91
91
|
export {
|
|
92
92
|
I as k
|
|
93
93
|
};
|
|
94
|
-
//# sourceMappingURL=kit-extensions-
|
|
94
|
+
//# sourceMappingURL=kit-extensions-Byfxy6sy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kit-extensions-
|
|
1
|
+
{"version":3,"file":"kit-extensions-Byfxy6sy.js","sources":["../../node_modules/lucide-react/dist/esm/icons/calendar-heart.mjs","../../node_modules/lucide-react/dist/esm/icons/scale.mjs","../../src/components/rich-text-editor/kit-extensions.ts"],"sourcesContent":["/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\n \"path\",\n { d: \"M12.127 22H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v5.125\", key: \"vxdnp4\" }\n ],\n [\n \"path\",\n {\n d: \"M14.62 18.8A2.25 2.25 0 1 1 18 15.836a2.25 2.25 0 1 1 3.38 2.966l-2.626 2.856a.998.998 0 0 1-1.507 0z\",\n key: \"15cy7q\"\n }\n ],\n [\"path\", { d: \"M16 2v4\", key: \"4m81vk\" }],\n [\"path\", { d: \"M3 10h18\", key: \"8toen8\" }],\n [\"path\", { d: \"M8 2v4\", key: \"1cmpym\" }]\n];\nconst CalendarHeart = createLucideIcon(\"calendar-heart\", __iconNode);\n\nexport { __iconNode, CalendarHeart as default };\n//# sourceMappingURL=calendar-heart.mjs.map\n","/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M12 3v18\", key: \"108xh3\" }],\n [\"path\", { d: \"m19 8 3 8a5 5 0 0 1-6 0zV7\", key: \"zcdpyk\" }],\n [\"path\", { d: \"M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1\", key: \"1yorad\" }],\n [\"path\", { d: \"m5 8 3 8a5 5 0 0 1-6 0zV7\", key: \"eua70x\" }],\n [\"path\", { d: \"M7 21h10\", key: \"1b0cd5\" }]\n];\nconst Scale = createLucideIcon(\"scale\", __iconNode);\n\nexport { __iconNode, Scale as default };\n//# sourceMappingURL=scale.mjs.map\n","import { createElement } from 'react';\nimport { Baby, CalendarHeart, Heart, Scale } from 'lucide-react';\nimport { PregnancyDating } from '../pregnancy-dating';\nimport { PregnancyWeightGain } from '../pregnancy-weight-gain';\nimport { GestationalAgeCalculator } from '../gestational-age-calculator';\nimport { CycleCalculator } from '../cycle-calculator';\nimport { FetalWeight } from '../fetal-weight';\nimport type { EditorExtension } from './editor-extensions';\n\n/** Labels are resolved by the editor's useTranslation, including live locale changes. */\nexport const kitEditorExtensions: EditorExtension[] = [\n {\n id: 'pregnancy-dating',\n label: 'insert.title.pregnancyDating',\n icon: createElement(CalendarHeart),\n kind: 'panel',\n contexts: ['note', 'diagnosis'],\n source: { kind: 'kit' },\n render: ({ insert }) =>\n createElement(PregnancyDating, { onInsert: insert }),\n },\n {\n id: 'pregnancy-weight-gain',\n label: 'insert.title.weightGain',\n icon: createElement(Baby),\n kind: 'panel',\n contexts: ['note', 'diagnosis'],\n source: { kind: 'kit' },\n render: ({ insert }) =>\n createElement(PregnancyWeightGain, { onInsert: insert }),\n },\n {\n id: 'gestational-age-calculator',\n label: 'insert.title.gestationalAge',\n icon: createElement(Baby),\n kind: 'panel',\n contexts: ['note', 'diagnosis'],\n source: { kind: 'kit' },\n render: ({ insert }) =>\n createElement(GestationalAgeCalculator, { onInsert: insert }),\n },\n {\n id: 'cycle-calculator',\n label: 'insert.title.cycle',\n icon: createElement(Heart),\n kind: 'panel',\n contexts: ['note', 'diagnosis'],\n source: { kind: 'kit' },\n render: ({ insert }) =>\n createElement(CycleCalculator, { onInsert: insert }),\n },\n {\n id: 'fetal-weight',\n label: 'insert.title.fetalWeight',\n icon: createElement(Scale),\n kind: 'panel',\n contexts: ['note', 'diagnosis'],\n source: { kind: 'kit' },\n render: ({ insert }) => createElement(FetalWeight, { onInsert: insert }),\n },\n];\n"],"names":["__iconNode","CalendarHeart","createLucideIcon","Scale","kitEditorExtensions","createElement","insert","PregnancyDating","Baby","PregnancyWeightGain","GestationalAgeCalculator","Heart","CycleCalculator","FetalWeight"],"mappings":";;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa;AAAA,EACjB;AA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,IAC9B,QAAQ,EAAE,MAAM,MAAA;AAAA,IAChB,QAAQ,CAAC,EAAE,QAAAF,EAAA,MACTD,EAAcI,GAAqB,EAAE,UAAUH,EAAA,CAAQ;AAAA,EAAA;AAAA,EAE3D;AAAA,IACE,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,MAAMD,EAAcG,CAAI;AAAA,IACxB,MAAM;AAAA,IACN,UAAU,CAAC,QAAQ,WAAW;AAAA,IAC9B,QAAQ,EAAE,MAAM,MAAA;AAAA,IAChB,QAAQ,CAAC,EAAE,QAAAF,EAAA,MACTD,EAAcK,GAA0B,EAAE,UAAUJ,EAAA,CAAQ;AAAA,EAAA;AAAA,EAEhE;AAAA,IACE,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,MAAMD,EAAcM,CAAK;AAAA,IACzB,MAAM;AAAA,IACN,UAAU,CAAC,QAAQ,WAAW;AAAA,IAC9B,QAAQ,EAAE,MAAM,MAAA;AAAA,IAChB,QAAQ,CAAC,EAAE,QAAAL,EAAA,MACTD,EAAcO,GAAiB,EAAE,UAAUN,EAAA,CAAQ;AAAA,EAAA;AAAA,EAEvD;AAAA,IACE,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,MAAMD,EAAcF,CAAK;AAAA,IACzB,MAAM;AAAA,IACN,UAAU,CAAC,QAAQ,WAAW;AAAA,IAC9B,QAAQ,EAAE,MAAM,MAAA;AAAA,IAChB,QAAQ,CAAC,EAAE,QAAAG,EAAA,MAAaD,EAAcQ,GAAa,EAAE,UAAUP,EAAA,CAAQ;AAAA,EAAA;AAE3E;","x_google_ignoreList":[0,1]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as u, jsxs as R } from "react/jsx-runtime";
|
|
2
2
|
import { useState as x, useEffect as w, useCallback as W, useMemo as E, useRef as ee } from "react";
|
|
3
3
|
import { useGridFilter as V } from "ag-grid-react";
|
|
4
|
-
import { D as te } from "./date-range-picker-
|
|
4
|
+
import { D as te } from "./date-range-picker-CtUOI38x.js";
|
|
5
5
|
import { useTranslation as M } from "react-i18next";
|
|
6
6
|
import { C as le } from "./checkbox--ndmyokr.js";
|
|
7
7
|
import { B as j } from "./button-Bn16lcFM.js";
|
|
@@ -864,4 +864,4 @@ export {
|
|
|
864
864
|
Ke as g,
|
|
865
865
|
k as h
|
|
866
866
|
};
|
|
867
|
-
//# sourceMappingURL=link-cell-renderer-
|
|
867
|
+
//# sourceMappingURL=link-cell-renderer-TeJNvymP.js.map
|