@eifi1/ui-kit 0.51.7 → 0.53.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/README.md +178 -67
- package/dist/account/account-parts.d.ts +10 -8
- package/dist/account/account-parts.js +1 -18
- package/dist/account/account-parts.js.map +1 -1
- package/dist/account/data-export-setting-labels.js +1 -1
- package/dist/account/data-export-setting-labels.js.map +1 -1
- package/dist/account/delete-account-setting-labels.js +1 -1
- package/dist/account/delete-account-setting-labels.js.map +1 -1
- package/dist/account/email-change-setting-labels.js +1 -1
- package/dist/account/email-change-setting-labels.js.map +1 -1
- package/dist/account/passkeys-setting.d.ts +9 -2
- package/dist/account/passkeys-setting.js +41 -29
- package/dist/account/passkeys-setting.js.map +1 -1
- package/dist/account/sessions-setting.d.ts +3 -2
- package/dist/account/sessions-setting.js +10 -8
- package/dist/account/sessions-setting.js.map +1 -1
- package/dist/admin/admin-action-confirm.js +1 -3
- package/dist/admin/admin-action-confirm.js.map +1 -1
- package/dist/admin/admin-parts.d.ts +6 -3
- package/dist/admin/admin-parts.js +6 -21
- package/dist/admin/admin-parts.js.map +1 -1
- package/dist/admin/mail-test-card-labels.js +1 -1
- package/dist/admin/mail-test-card-labels.js.map +1 -1
- package/dist/admin/plan-change-labels.d.ts +2 -2
- package/dist/admin/plan-change-labels.js +1 -17
- package/dist/admin/plan-change-labels.js.map +1 -1
- package/dist/admin/plan-change.d.ts +3 -42
- package/dist/admin/plan-change.js +1 -1
- package/dist/admin/plan-change.js.map +1 -1
- package/dist/admin/reviewer-scope-editor.js +3 -3
- package/dist/admin/reviewer-scope-editor.js.map +1 -1
- package/dist/auth/auth-errors-labels.d.ts +11 -0
- package/dist/auth/auth-errors-labels.js +13 -0
- package/dist/auth/auth-errors-labels.js.map +1 -0
- package/dist/auth/auth-errors.d.ts +7 -23
- package/dist/auth/auth-errors.js +2 -15
- package/dist/auth/auth-errors.js.map +1 -1
- package/dist/auth/complete-name-dialog.js +2 -1
- package/dist/auth/complete-name-dialog.js.map +1 -1
- package/dist/auth/forgot-password-form-labels.js +1 -1
- package/dist/auth/forgot-password-form-labels.js.map +1 -1
- package/dist/auth/forgot-password-form.js +7 -2
- package/dist/auth/forgot-password-form.js.map +1 -1
- package/dist/auth/register-form-labels.js +1 -1
- package/dist/auth/register-form-labels.js.map +1 -1
- package/dist/auth/reset-password-form-labels.js +1 -1
- package/dist/auth/reset-password-form-labels.js.map +1 -1
- package/dist/auth/reset-password-form.js +5 -1
- package/dist/auth/reset-password-form.js.map +1 -1
- package/dist/auth/sign-in-form-labels.js +1 -1
- package/dist/auth/sign-in-form-labels.js.map +1 -1
- package/dist/auth/status-parts.d.ts +0 -3
- package/dist/auth/status-parts.js +0 -4
- package/dist/auth/status-parts.js.map +1 -1
- package/dist/auth/verify-email-labels.js +1 -1
- package/dist/auth/verify-email-labels.js.map +1 -1
- package/dist/auth/verify-email.js +7 -2
- package/dist/auth/verify-email.js.map +1 -1
- package/dist/billing/cancel-subscription.d.ts +10 -7
- package/dist/billing/cancel-subscription.js +6 -6
- package/dist/billing/cancel-subscription.js.map +1 -1
- package/dist/billing/plan-card.d.ts +5 -3
- package/dist/billing/plan-card.js +7 -8
- package/dist/billing/plan-card.js.map +1 -1
- package/dist/billing/plan-change-labels.d.ts +42 -0
- package/dist/billing/plan-change-labels.js +22 -0
- package/dist/billing/plan-change-labels.js.map +1 -0
- package/dist/billing/plan-switch.d.ts +9 -6
- package/dist/billing/plan-switch.js +7 -5
- package/dist/billing/plan-switch.js.map +1 -1
- package/dist/chart.d.ts +4 -3
- package/dist/chart.js +72 -4
- package/dist/chart.js.map +1 -1
- package/dist/components/account-chips.d.ts +5 -5
- package/dist/components/account-chips.js +11 -13
- package/dist/components/account-chips.js.map +1 -1
- package/dist/components/alert-banner.d.ts +16 -5
- package/dist/components/alert-banner.js +46 -1
- package/dist/components/alert-banner.js.map +1 -1
- package/dist/components/amount-input.d.ts +13 -0
- package/dist/components/amount-input.js +1 -0
- package/dist/components/amount-input.js.map +1 -1
- package/dist/components/autocomplete.js +57 -65
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/bulk-action-bar.d.ts +12 -2
- package/dist/components/bulk-action-bar.js +65 -21
- package/dist/components/bulk-action-bar.js.map +1 -1
- package/dist/components/button-look.d.ts +5 -5
- package/dist/components/button-look.js.map +1 -1
- package/dist/components/button.d.ts +2 -2
- package/dist/components/button.js.map +1 -1
- package/dist/components/chart-edge.d.ts +16 -0
- package/dist/components/chart-edge.js +14 -1
- package/dist/components/chart-edge.js.map +1 -1
- package/dist/components/chart-figure.d.ts +13 -0
- package/dist/components/chart-figure.js +15 -0
- package/dist/components/chart-figure.js.map +1 -0
- package/dist/components/chart-zoom-core.js +1 -4
- package/dist/components/chart-zoom-core.js.map +1 -1
- package/dist/components/chart.d.ts +8 -1
- package/dist/components/chart.js +19 -10
- package/dist/components/chart.js.map +1 -1
- package/dist/components/combobox-core.d.ts +111 -2
- package/dist/components/combobox-core.js +148 -42
- package/dist/components/combobox-core.js.map +1 -1
- package/dist/components/combobox.d.ts +1 -1
- package/dist/components/combobox.js +141 -130
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/copy-button.d.ts +6 -5
- package/dist/components/copy-button.js +5 -3
- package/dist/components/copy-button.js.map +1 -1
- package/dist/components/country-select.js +2 -2
- package/dist/components/country-select.js.map +1 -1
- package/dist/components/data-table-column-settings.d.ts +1 -1
- package/dist/components/data-table-column-settings.js +33 -7
- package/dist/components/data-table-column-settings.js.map +1 -1
- package/dist/components/data-table-filters.d.ts +4 -2
- package/dist/components/data-table-filters.js +2 -2
- package/dist/components/data-table-filters.js.map +1 -1
- package/dist/components/data-table-fit.d.ts +6 -4
- package/dist/components/data-table-fit.js +4 -1
- package/dist/components/data-table-fit.js.map +1 -1
- package/dist/components/data-table-groups.d.ts +1 -1
- package/dist/components/data-table-groups.js.map +1 -1
- package/dist/components/data-table-head.d.ts +1 -1
- package/dist/components/data-table-head.js +15 -12
- package/dist/components/data-table-head.js.map +1 -1
- package/dist/components/data-table-mobile.d.ts +12 -7
- package/dist/components/data-table-mobile.js +43 -30
- package/dist/components/data-table-mobile.js.map +1 -1
- package/dist/components/data-table-pagination.js +11 -6
- package/dist/components/data-table-pagination.js.map +1 -1
- package/dist/components/data-table-resize.d.ts +1 -1
- package/dist/components/data-table-resize.js.map +1 -1
- package/dist/components/data-table-row-actions.d.ts +2 -2
- package/dist/components/data-table-row-actions.js.map +1 -1
- package/dist/components/data-table-row.d.ts +6 -2
- package/dist/components/data-table-row.js +17 -10
- package/dist/components/data-table-row.js.map +1 -1
- package/dist/components/data-table-selection.d.ts +1 -1
- package/dist/components/data-table-selection.js.map +1 -1
- package/dist/components/data-table-shared.d.ts +10 -2
- package/dist/components/data-table-shared.js +18 -0
- package/dist/components/data-table-shared.js.map +1 -1
- package/dist/components/data-table-sort.d.ts +21 -2
- package/dist/components/data-table-sort.js +24 -0
- package/dist/components/data-table-sort.js.map +1 -1
- package/dist/components/data-table-virtual.d.ts +1 -1
- package/dist/components/data-table-virtual.js +18 -6
- package/dist/components/data-table-virtual.js.map +1 -1
- package/dist/components/data-table.d.ts +13 -4
- package/dist/components/data-table.js +139 -36
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/date-field.d.ts +25 -3
- package/dist/components/date-field.js +33 -8
- package/dist/components/date-field.js.map +1 -1
- package/dist/components/date-picker.d.ts +16 -3
- package/dist/components/date-picker.js +55 -26
- package/dist/components/date-picker.js.map +1 -1
- package/dist/components/date-range-picker.d.ts +38 -24
- package/dist/components/date-range-picker.js +23 -7
- package/dist/components/date-range-picker.js.map +1 -1
- package/dist/components/error-boundary.js +37 -30
- package/dist/components/error-boundary.js.map +1 -1
- package/dist/components/{ui-labels.d.ts → field-base-labels.d.ts} +0 -2
- package/dist/components/{ui-labels.js → field-base-labels.js} +2 -9
- package/dist/components/field-base-labels.js.map +1 -0
- package/dist/components/field-base.d.ts +4 -3
- package/dist/components/field-base.js +3 -3
- package/dist/components/field-base.js.map +1 -1
- package/dist/components/form-actions.js +11 -5
- package/dist/components/form-actions.js.map +1 -1
- package/dist/components/hover-menu.d.ts +3 -0
- package/dist/components/hover-menu.js +5 -3
- package/dist/components/hover-menu.js.map +1 -1
- package/dist/components/icon-button.js +14 -9
- package/dist/components/icon-button.js.map +1 -1
- package/dist/components/inline-confirm.d.ts +43 -0
- package/dist/components/inline-confirm.js +67 -0
- package/dist/components/inline-confirm.js.map +1 -0
- package/dist/components/inline-entity-combobox.d.ts +4 -3
- package/dist/components/inline-entity-combobox.js +148 -140
- package/dist/components/inline-entity-combobox.js.map +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/input.js.map +1 -1
- package/dist/components/jump-calendar.js +28 -112
- package/dist/components/jump-calendar.js.map +1 -1
- package/dist/components/legal-page.d.ts +3 -1
- package/dist/components/legal-page.js +3 -2
- package/dist/components/legal-page.js.map +1 -1
- package/dist/components/legal.d.ts +4 -2
- package/dist/components/legal.js.map +1 -1
- package/dist/components/lightbox.d.ts +2 -2
- package/dist/components/lightbox.js +17 -6
- package/dist/components/lightbox.js.map +1 -1
- package/dist/components/list.d.ts +6 -2
- package/dist/components/list.js +3 -2
- package/dist/components/list.js.map +1 -1
- package/dist/components/measured-grid.d.ts +1 -1
- package/dist/components/measured-grid.js +2 -1
- package/dist/components/measured-grid.js.map +1 -1
- package/dist/components/mini-calendar.js +3 -5
- package/dist/components/mini-calendar.js.map +1 -1
- package/dist/components/modal.js +3 -1
- package/dist/components/modal.js.map +1 -1
- package/dist/components/month-grid.d.ts +55 -0
- package/dist/components/month-grid.js +148 -0
- package/dist/components/month-grid.js.map +1 -0
- package/dist/components/month-picker.d.ts +36 -4
- package/dist/components/month-picker.js +123 -146
- package/dist/components/month-picker.js.map +1 -1
- package/dist/components/multi-select.d.ts +2 -2
- package/dist/components/multi-select.js +11 -6
- package/dist/components/multi-select.js.map +1 -1
- package/dist/components/nav-pills.d.ts +1 -1
- package/dist/components/nav-pills.js.map +1 -1
- package/dist/components/picker-sheet.js +2 -1
- package/dist/components/picker-sheet.js.map +1 -1
- package/dist/components/pie-chart-labels.d.ts +7 -0
- package/dist/components/pie-chart-labels.js +1 -0
- package/dist/components/pie-chart-labels.js.map +1 -1
- package/dist/components/pie-chart.d.ts +5 -3
- package/dist/components/pie-chart.js +7 -22
- package/dist/components/pie-chart.js.map +1 -1
- package/dist/components/popover.d.ts +3 -0
- package/dist/components/popover.js +7 -1
- package/dist/components/popover.js.map +1 -1
- package/dist/components/row-actions.js +2 -1
- package/dist/components/row-actions.js.map +1 -1
- package/dist/components/series-chart-axes.d.ts +4 -4
- package/dist/components/series-chart-axes.js.map +1 -1
- package/dist/components/series-chart-labels.d.ts +7 -4
- package/dist/components/series-chart-labels.js.map +1 -1
- package/dist/components/series-chart.d.ts +92 -23
- package/dist/components/series-chart.js +74 -30
- package/dist/components/series-chart.js.map +1 -1
- package/dist/components/share-card.js +3 -3
- package/dist/components/share-card.js.map +1 -1
- package/dist/components/tabs-labels.d.ts +2 -0
- package/dist/components/tabs-labels.js +11 -0
- package/dist/components/tabs-labels.js.map +1 -0
- package/dist/components/tabs.d.ts +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/toggle-legend.d.ts +2 -2
- package/dist/components/toggle-legend.js +6 -6
- package/dist/components/toggle-legend.js.map +1 -1
- package/dist/components/translation-review-editor.d.ts +4 -2
- package/dist/components/translation-review-editor.js +2 -3
- package/dist/components/translation-review-editor.js.map +1 -1
- package/dist/components/translation-review.d.ts +2 -1
- package/dist/components/translation-review.js +2 -2
- package/dist/components/translation-review.js.map +1 -1
- package/dist/components/treemap-labels.d.ts +31 -0
- package/dist/components/treemap-labels.js +10 -0
- package/dist/components/treemap-labels.js.map +1 -0
- package/dist/components/treemap-layout.d.ts +62 -0
- package/dist/components/treemap-layout.js +126 -0
- package/dist/components/treemap-layout.js.map +1 -0
- package/dist/components/treemap.d.ts +167 -19
- package/dist/components/treemap.js +340 -100
- package/dist/components/treemap.js.map +1 -1
- package/dist/components/use-table-state.d.ts +5 -5
- package/dist/components/use-table-state.js +4 -1
- package/dist/components/use-table-state.js.map +1 -1
- package/dist/data-table.d.ts +1 -2
- package/dist/data-table.js +1 -4
- package/dist/data-table.js.map +1 -1
- package/dist/demo/demo-countdown.d.ts +0 -5
- package/dist/demo/demo-countdown.js +0 -4
- package/dist/demo/demo-countdown.js.map +1 -1
- package/dist/eslint/index.js +1 -1
- package/dist/eslint/role-utilities.d.ts +36 -7
- package/dist/eslint/role-utilities.js +42 -9
- package/dist/eslint/role-utilities.js.map +1 -1
- package/dist/feedback/feedback-dialog.d.ts +25 -16
- package/dist/feedback/feedback-dialog.js +6 -2
- package/dist/feedback/feedback-dialog.js.map +1 -1
- package/dist/feedback/feedback-mutation.d.ts +18 -0
- package/dist/feedback/feedback-mutation.js +8 -0
- package/dist/feedback/feedback-mutation.js.map +1 -0
- package/dist/feedback/feedback-page-link.d.ts +53 -0
- package/dist/feedback/feedback-page-link.js +37 -0
- package/dist/feedback/feedback-page-link.js.map +1 -0
- package/dist/feedback/feedback-public-list.d.ts +8 -4
- package/dist/feedback/feedback-public-list.js +2 -2
- package/dist/feedback/feedback-public-list.js.map +1 -1
- package/dist/feedback/feedback-replies.d.ts +3 -1
- package/dist/feedback/feedback-replies.js +5 -4
- package/dist/feedback/feedback-replies.js.map +1 -1
- package/dist/feedback/feedback-row-detail-labels.js +0 -3
- package/dist/feedback/feedback-row-detail-labels.js.map +1 -1
- package/dist/feedback/feedback-row-detail.d.ts +33 -44
- package/dist/feedback/feedback-row-detail.js +28 -34
- package/dist/feedback/feedback-row-detail.js.map +1 -1
- package/dist/feedback/feedback-status-undo.d.ts +17 -14
- package/dist/feedback/feedback-status-undo.js +10 -15
- package/dist/feedback/feedback-status-undo.js.map +1 -1
- package/dist/feedback/feedback-submit-dialog.d.ts +1 -1
- package/dist/feedback/feedback-submit-dialog.js +1 -1
- package/dist/feedback/feedback-submit-dialog.js.map +1 -1
- package/dist/feedback/feedback-submit.js +9 -3
- package/dist/feedback/feedback-submit.js.map +1 -1
- package/dist/feedback/feedback-swipe.d.ts +1 -1
- package/dist/feedback/feedback-swipe.js.map +1 -1
- package/dist/feedback/feedback-table.d.ts +21 -9
- package/dist/feedback/feedback-table.js +45 -25
- package/dist/feedback/feedback-table.js.map +1 -1
- package/dist/feedback/feedback-thread-labels.d.ts +2 -2
- package/dist/feedback/feedback-thread-labels.js.map +1 -1
- package/dist/feedback/feedback-thread.d.ts +15 -23
- package/dist/feedback/feedback-thread.js +2 -1
- package/dist/feedback/feedback-thread.js.map +1 -1
- package/dist/feedback.d.ts +6 -6
- package/dist/feedback.js +90 -6
- package/dist/feedback.js.map +1 -1
- package/dist/hooks/use-focus-trap.d.ts +35 -0
- package/dist/hooks/use-focus-trap.js +6 -4
- package/dist/hooks/use-focus-trap.js.map +1 -1
- package/dist/hooks/use-hotkey.d.ts +5 -2
- package/dist/hooks/use-hotkey.js +5 -4
- package/dist/hooks/use-hotkey.js.map +1 -1
- package/dist/hooks/use-long-press.d.ts +7 -4
- package/dist/hooks/use-long-press.js +3 -0
- package/dist/hooks/use-long-press.js.map +1 -1
- package/dist/hooks/use-media-query.js +12 -4
- package/dist/hooks/use-media-query.js.map +1 -1
- package/dist/hooks/use-mounted.d.ts +22 -0
- package/dist/hooks/use-mounted.js +24 -0
- package/dist/hooks/use-mounted.js.map +1 -0
- package/dist/hooks/use-overlay-history.js +19 -3
- package/dist/hooks/use-overlay-history.js.map +1 -1
- package/dist/i18n/defaults.js +4 -9
- package/dist/i18n/defaults.js.map +1 -1
- package/dist/i18n/german.js +7 -18
- package/dist/i18n/german.js.map +1 -1
- package/dist/i18n/kit-labels.d.ts +9 -11
- package/dist/i18n/kit-labels.js.map +1 -1
- package/dist/i18n/locales/en.js +15 -64
- package/dist/i18n/locales/en.js.map +3 -3
- package/dist/i18n/locales/es.js +7 -18
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.js +20 -27
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hu.js +9 -18
- package/dist/i18n/locales/hu.js.map +1 -1
- package/dist/i18n/locales/it.js +7 -19
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/zh.js +8 -18
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/i18n/review.js +12 -2
- package/dist/i18n/review.js.map +1 -1
- package/dist/i18n/shared-labels.js +0 -1
- package/dist/i18n/shared-labels.js.map +1 -1
- package/dist/index.d.ts +21 -23
- package/dist/index.js +50 -65
- package/dist/index.js.map +1 -1
- package/dist/landing/routing.d.ts +3 -1
- package/dist/landing/routing.js +4 -7
- package/dist/landing/routing.js.map +1 -1
- package/dist/lib/broadcast.d.ts +17 -0
- package/dist/lib/broadcast.js +30 -0
- package/dist/lib/broadcast.js.map +1 -0
- package/dist/lib/date-format.d.ts +37 -2
- package/dist/lib/date-format.js +34 -8
- package/dist/lib/date-format.js.map +1 -1
- package/dist/lib/day-format.d.ts +46 -0
- package/dist/lib/day-format.js +46 -0
- package/dist/lib/day-format.js.map +1 -0
- package/dist/lib/describe-failure.d.ts +14 -0
- package/dist/lib/describe-failure.js +9 -0
- package/dist/lib/describe-failure.js.map +1 -0
- package/dist/lib/direction.d.ts +16 -0
- package/dist/lib/direction.js +9 -1
- package/dist/lib/direction.js.map +1 -1
- package/dist/lib/focus-left.d.ts +63 -0
- package/dist/lib/focus-left.js +67 -0
- package/dist/lib/focus-left.js.map +1 -0
- package/dist/lib/format.js +5 -14
- package/dist/lib/format.js.map +1 -1
- package/dist/lib/http-status.d.ts +24 -0
- package/dist/lib/http-status.js +14 -0
- package/dist/lib/http-status.js.map +1 -0
- package/dist/lib/intl-cache.d.ts +14 -0
- package/dist/lib/intl-cache.js +15 -0
- package/dist/lib/intl-cache.js.map +1 -0
- package/dist/lib/iso-day.d.ts +11 -0
- package/dist/lib/iso-day.js +8 -0
- package/dist/lib/iso-day.js.map +1 -0
- package/dist/lib/lazy-with-fallback.d.ts +31 -0
- package/dist/lib/lazy-with-fallback.js +40 -0
- package/dist/lib/lazy-with-fallback.js.map +1 -0
- package/dist/lib/path-pattern.d.ts +34 -0
- package/dist/lib/path-pattern.js +24 -0
- package/dist/lib/path-pattern.js.map +1 -0
- package/dist/lib/reduced-motion.d.ts +2 -1
- package/dist/lib/reduced-motion.js.map +1 -1
- package/dist/lib/round.d.ts +2 -1
- package/dist/lib/round.js +2 -1
- package/dist/lib/round.js.map +1 -1
- package/dist/lib/safe-storage.d.ts +24 -5
- package/dist/lib/safe-storage.js +27 -2
- package/dist/lib/safe-storage.js.map +1 -1
- package/dist/lib/session-refresh.js +1 -1
- package/dist/lib/session-refresh.js.map +1 -1
- package/dist/lib/share-format.d.ts +13 -0
- package/dist/lib/share-format.js +10 -0
- package/dist/lib/share-format.js.map +1 -0
- package/dist/lib/text-case.d.ts +17 -0
- package/dist/lib/text-case.js +8 -0
- package/dist/lib/text-case.js.map +1 -0
- package/dist/lib/text-match.d.ts +29 -0
- package/dist/lib/text-match.js +20 -2
- package/dist/lib/text-match.js.map +1 -1
- package/dist/lib/thenable.d.ts +13 -0
- package/dist/lib/thenable.js +8 -0
- package/dist/lib/thenable.js.map +1 -0
- package/dist/lib/translation-review.d.ts +7 -2
- package/dist/lib/translation-review.js +4 -4
- package/dist/lib/translation-review.js.map +1 -1
- package/dist/notifications/device-zone-report.js +1 -1
- package/dist/notifications/device-zone-report.js.map +1 -1
- package/dist/notifications/notification-bell.d.ts +2 -1
- package/dist/notifications/notification-bell.js +3 -3
- package/dist/notifications/notification-bell.js.map +1 -1
- package/dist/notifications/notification-inbox.d.ts +10 -6
- package/dist/notifications/notification-inbox.js +26 -48
- package/dist/notifications/notification-inbox.js.map +1 -1
- package/dist/notifications/notification-parts.d.ts +3 -2
- package/dist/notifications/notification-parts.js +1 -3
- package/dist/notifications/notification-parts.js.map +1 -1
- package/dist/notifications/notification-types-setting.js +1 -1
- package/dist/notifications/notification-types-setting.js.map +1 -1
- package/dist/notifications/notifications-labels.d.ts +6 -0
- package/dist/notifications/notifications-labels.js +1 -0
- package/dist/notifications/notifications-labels.js.map +1 -1
- package/dist/notifications/push-device-setting.js +1 -1
- package/dist/notifications/push-device-setting.js.map +1 -1
- package/dist/notifications/push-devices-setting.d.ts +2 -1
- package/dist/notifications/push-devices-setting.js +27 -49
- package/dist/notifications/push-devices-setting.js.map +1 -1
- package/dist/notifications/quiet-hours-setting.d.ts +10 -3
- package/dist/notifications/quiet-hours-setting.js +65 -26
- package/dist/notifications/quiet-hours-setting.js.map +1 -1
- package/dist/notifications/unsubscribe-panel.js +4 -7
- package/dist/notifications/unsubscribe-panel.js.map +1 -1
- package/dist/notifications/use-push-device.d.ts +39 -1
- package/dist/notifications/use-push-device.js +28 -7
- package/dist/notifications/use-push-device.js.map +1 -1
- package/dist/offline/query-persistence.d.ts +3 -1
- package/dist/offline/query-persistence.js +19 -2
- package/dist/offline/query-persistence.js.map +1 -1
- package/dist/rhf/fields.d.ts +11 -4
- package/dist/rhf/fields.js.map +1 -1
- package/dist/search/command-palette.js +1 -1
- package/dist/search/command-palette.js.map +1 -1
- package/dist/search/global-search.js +19 -9
- package/dist/search/global-search.js.map +1 -1
- package/dist/search/search-index.d.ts +0 -6
- package/dist/search/search-index.js +0 -4
- package/dist/search/search-index.js.map +1 -1
- package/dist/search/use-command-key.d.ts +12 -1
- package/dist/search/use-command-key.js +3 -12
- package/dist/search/use-command-key.js.map +1 -1
- package/dist/search.d.ts +1 -1
- package/dist/search.js +6 -1
- package/dist/search.js.map +1 -1
- package/dist/settings/use-settings-focus.js +1 -0
- package/dist/settings/use-settings-focus.js.map +1 -1
- package/dist/shell/account-menu-language.d.ts +5 -3
- package/dist/shell/account-menu-language.js +2 -2
- package/dist/shell/account-menu-language.js.map +1 -1
- package/dist/shell/account-menu-text-size.d.ts +9 -6
- package/dist/shell/account-menu-text-size.js +2 -2
- package/dist/shell/account-menu-text-size.js.map +1 -1
- package/dist/shell/app-shell.d.ts +0 -10
- package/dist/shell/app-shell.js +1 -7
- package/dist/shell/app-shell.js.map +1 -1
- package/dist/shell/company-switcher.d.ts +1 -1
- package/dist/shell/company-switcher.js.map +1 -1
- package/dist/shell/dev-menu.d.ts +1 -1
- package/dist/shell/dev-menu.js +5 -18
- package/dist/shell/dev-menu.js.map +1 -1
- package/dist/shell/top-bar-actions.d.ts +1 -1
- package/dist/shell/top-bar-actions.js.map +1 -1
- package/dist/shell/top-bar-parts-labels.d.ts +1 -3
- package/dist/shell/top-bar-parts-labels.js +0 -1
- package/dist/shell/top-bar-parts-labels.js.map +1 -1
- package/dist/shell.d.ts +7 -10
- package/dist/shell.js +14 -23
- package/dist/shell.js.map +1 -1
- package/dist/sync/engine.d.ts +30 -4
- package/dist/sync/engine.js +172 -52
- package/dist/sync/engine.js.map +1 -1
- package/dist/sync.d.ts +2 -2
- package/dist/sync.js +2 -10
- package/dist/sync.js.map +1 -1
- package/dist/testing/css-variables.js +3 -8
- package/dist/testing/css-variables.js.map +1 -1
- package/dist/theme/chart-palette.d.ts +0 -5
- package/dist/theme/chart-palette.js +0 -2
- package/dist/theme/chart-palette.js.map +1 -1
- package/dist/theme/contrast.d.ts +2 -1
- package/dist/theme/contrast.js +3 -8
- package/dist/theme/contrast.js.map +1 -1
- package/dist/theme/palette-store.js +6 -6
- package/dist/theme/palette-store.js.map +1 -1
- package/dist/theme/text-size.js +3 -8
- package/dist/theme/text-size.js.map +1 -1
- package/dist/theme/theme-store.js +3 -6
- package/dist/theme/theme-store.js.map +1 -1
- package/dist/tour/tour-catalogue.d.ts +7 -4
- package/dist/tour/tour-catalogue.js +12 -10
- package/dist/tour/tour-catalogue.js.map +1 -1
- package/dist/tour/tour-dock.d.ts +0 -2
- package/dist/tour/tour-dock.js +0 -2
- package/dist/tour/tour-dock.js.map +1 -1
- package/dist/tour/tour-gates.d.ts +4 -0
- package/dist/tour/tour-gates.js +14 -0
- package/dist/tour/tour-gates.js.map +1 -1
- package/dist/tour/tour-overlay.d.ts +27 -0
- package/dist/tour/tour-overlay.js +741 -0
- package/dist/tour/tour-overlay.js.map +1 -0
- package/dist/tour/tour.d.ts +13 -3
- package/dist/tour/tour.js +59 -781
- package/dist/tour/tour.js.map +1 -1
- package/dist/tour/use-tour-progress.js +1 -1
- package/dist/tour/use-tour-progress.js.map +1 -1
- package/dist/wizard/stepper-nav.d.ts +5 -1
- package/dist/wizard/stepper-nav.js.map +1 -1
- package/dist/wizard/types.d.ts +6 -2
- package/dist/wizard/types.js.map +1 -1
- package/dist/wizard/use-wizard.d.ts +3 -1
- package/dist/wizard/use-wizard.js.map +1 -1
- package/dist/wizard/validation.d.ts +3 -1
- package/dist/wizard/validation.js.map +1 -1
- package/package.json +10 -6
- package/src/account/account-parts.ts +5 -25
- package/src/account/data-export-setting-labels.ts +1 -1
- package/src/account/delete-account-setting-labels.ts +1 -1
- package/src/account/email-change-setting-labels.ts +1 -1
- package/src/account/passkeys-setting.tsx +60 -38
- package/src/account/sessions-setting.tsx +18 -12
- package/src/admin/admin-action-confirm.tsx +1 -5
- package/src/admin/admin-parts.ts +11 -25
- package/src/admin/mail-test-card-labels.ts +1 -1
- package/src/admin/plan-change-labels.ts +5 -23
- package/src/admin/plan-change.tsx +7 -44
- package/src/admin/reviewer-scope-editor.tsx +3 -3
- package/src/auth/auth-errors-labels.ts +23 -0
- package/src/auth/auth-errors.ts +11 -38
- package/src/auth/complete-name-dialog.tsx +4 -1
- package/src/auth/forgot-password-form-labels.ts +1 -1
- package/src/auth/forgot-password-form.tsx +11 -6
- package/src/auth/register-form-labels.ts +1 -1
- package/src/auth/reset-password-form-labels.ts +1 -1
- package/src/auth/reset-password-form.tsx +8 -4
- package/src/auth/sign-in-form-labels.ts +1 -1
- package/src/auth/status-parts.tsx +0 -6
- package/src/auth/verify-email-labels.ts +1 -1
- package/src/auth/verify-email.tsx +11 -6
- package/src/billing/cancel-subscription.tsx +15 -12
- package/src/billing/plan-card.tsx +18 -10
- package/src/billing/plan-change-labels.ts +66 -0
- package/src/billing/plan-switch.tsx +15 -12
- package/src/chart.ts +73 -6
- package/src/components/account-chips.tsx +20 -23
- package/src/components/alert-banner.tsx +82 -5
- package/src/components/amount-input.tsx +18 -7
- package/src/components/autocomplete.tsx +64 -70
- package/src/components/bulk-action-bar.tsx +70 -2
- package/src/components/button-look.ts +5 -5
- package/src/components/button.tsx +2 -2
- package/src/components/chart-edge.ts +34 -1
- package/src/components/chart-figure.tsx +35 -0
- package/src/components/chart-zoom-core.tsx +6 -5
- package/src/components/chart.tsx +26 -5
- package/src/components/combobox-core.tsx +293 -62
- package/src/components/combobox.tsx +183 -153
- package/src/components/copy-button.tsx +34 -23
- package/src/components/country-select.tsx +16 -11
- package/src/components/data-table-column-settings.tsx +52 -10
- package/src/components/data-table-filters.ts +6 -4
- package/src/components/data-table-fit.ts +19 -5
- package/src/components/data-table-groups.tsx +1 -1
- package/src/components/data-table-head.tsx +32 -22
- package/src/components/data-table-mobile.tsx +61 -26
- package/src/components/data-table-pagination.tsx +21 -6
- package/src/components/data-table-resize.ts +1 -1
- package/src/components/data-table-row-actions.tsx +3 -3
- package/src/components/data-table-row.tsx +25 -14
- package/src/components/data-table-selection.ts +1 -1
- package/src/components/data-table-shared.tsx +33 -1
- package/src/components/data-table-sort.ts +57 -2
- package/src/components/data-table-virtual.ts +32 -8
- package/src/components/data-table.tsx +239 -68
- package/src/components/date-field.tsx +66 -9
- package/src/components/date-picker.tsx +125 -49
- package/src/components/date-range-picker.tsx +71 -36
- package/src/components/error-boundary.tsx +53 -39
- package/src/components/field-base-labels.ts +20 -0
- package/src/components/field-base.tsx +13 -7
- package/src/components/form-actions.tsx +20 -5
- package/src/components/hover-menu.tsx +18 -8
- package/src/components/icon-button.tsx +14 -9
- package/src/components/inline-confirm.tsx +116 -0
- package/src/components/inline-entity-combobox.tsx +197 -153
- package/src/components/input.tsx +1 -1
- package/src/components/jump-calendar.tsx +30 -146
- package/src/components/legal-page.tsx +10 -7
- package/src/components/legal.tsx +4 -2
- package/src/components/lightbox.tsx +21 -8
- package/src/components/list.tsx +10 -4
- package/src/components/measured-grid.tsx +8 -4
- package/src/components/mini-calendar.tsx +6 -5
- package/src/components/modal.tsx +6 -1
- package/src/components/month-grid.tsx +229 -0
- package/src/components/month-picker.tsx +192 -200
- package/src/components/multi-select.tsx +21 -9
- package/src/components/nav-pills.tsx +1 -1
- package/src/components/picker-sheet.tsx +12 -9
- package/src/components/pie-chart-labels.ts +8 -0
- package/src/components/pie-chart.tsx +22 -28
- package/src/components/popover.tsx +18 -1
- package/src/components/row-actions.tsx +2 -1
- package/src/components/series-chart-axes.ts +9 -4
- package/src/components/series-chart-labels.ts +7 -4
- package/src/components/series-chart.tsx +253 -87
- package/src/components/share-card.tsx +6 -6
- package/src/components/tabs-labels.ts +13 -0
- package/src/components/tabs.tsx +2 -2
- package/src/components/toggle-legend.tsx +16 -11
- package/src/components/translation-review-editor.tsx +6 -5
- package/src/components/translation-review.tsx +4 -3
- package/src/components/treemap-labels.ts +47 -0
- package/src/components/treemap-layout.ts +210 -0
- package/src/components/treemap.tsx +780 -138
- package/src/components/use-table-state.ts +12 -9
- package/src/data-table.ts +1 -4
- package/src/demo/demo-countdown.ts +3 -8
- package/src/eslint/role-utilities.ts +97 -19
- package/src/feedback/feedback-dialog.tsx +30 -19
- package/src/feedback/feedback-mutation.ts +20 -0
- package/src/feedback/feedback-page-link.ts +90 -0
- package/src/feedback/feedback-public-list.tsx +13 -7
- package/src/feedback/feedback-replies.tsx +13 -6
- package/src/feedback/feedback-row-detail-labels.ts +0 -3
- package/src/feedback/feedback-row-detail.tsx +70 -84
- package/src/feedback/feedback-status-undo.ts +28 -28
- package/src/feedback/feedback-submit-dialog.tsx +2 -2
- package/src/feedback/feedback-submit.tsx +21 -7
- package/src/feedback/feedback-swipe.tsx +1 -1
- package/src/feedback/feedback-table.tsx +86 -38
- package/src/feedback/feedback-thread-labels.ts +2 -2
- package/src/feedback/feedback-thread.tsx +18 -26
- package/src/feedback.ts +89 -6
- package/src/hooks/use-focus-trap.ts +8 -24
- package/src/hooks/use-hotkey.ts +24 -7
- package/src/hooks/use-long-press.ts +16 -2
- package/src/hooks/use-media-query.ts +20 -4
- package/src/hooks/use-mounted.ts +39 -0
- package/src/hooks/use-overlay-history.ts +32 -3
- package/src/i18n/defaults.ts +4 -9
- package/src/i18n/german.ts +8 -19
- package/src/i18n/kit-labels.tsx +9 -11
- package/src/i18n/locales/es.ts +8 -19
- package/src/i18n/locales/fr.ts +21 -30
- package/src/i18n/locales/hu.ts +10 -19
- package/src/i18n/locales/it.ts +8 -20
- package/src/i18n/locales/zh.ts +9 -19
- package/src/i18n/review.ts +12 -2
- package/src/i18n/shared-labels.ts +0 -1
- package/src/index.ts +57 -49
- package/src/landing/routing.tsx +14 -10
- package/src/lib/broadcast.ts +52 -0
- package/src/lib/date-format.ts +89 -13
- package/src/lib/day-format.ts +96 -0
- package/src/lib/describe-failure.ts +18 -0
- package/src/lib/direction.ts +39 -0
- package/src/lib/focus-left.ts +156 -0
- package/src/lib/format.ts +5 -17
- package/src/lib/http-status.ts +38 -0
- package/src/lib/intl-cache.ts +25 -0
- package/src/lib/iso-day.ts +13 -0
- package/src/lib/lazy-with-fallback.ts +82 -0
- package/src/lib/path-pattern.ts +55 -0
- package/src/lib/reduced-motion.ts +2 -1
- package/src/lib/round.ts +7 -2
- package/src/lib/safe-storage.ts +48 -6
- package/src/lib/session-refresh.ts +1 -1
- package/src/lib/share-format.ts +18 -0
- package/src/lib/text-case.ts +19 -0
- package/src/lib/text-match.ts +57 -2
- package/src/lib/thenable.ts +19 -0
- package/src/lib/translation-review.ts +13 -5
- package/src/notifications/device-zone-report.ts +1 -1
- package/src/notifications/notification-bell.tsx +7 -4
- package/src/notifications/notification-inbox.tsx +40 -58
- package/src/notifications/notification-parts.tsx +3 -4
- package/src/notifications/notification-types-setting.tsx +1 -1
- package/src/notifications/notifications-labels.ts +7 -0
- package/src/notifications/push-device-setting.tsx +1 -1
- package/src/notifications/push-devices-setting.tsx +30 -55
- package/src/notifications/quiet-hours-setting.tsx +93 -31
- package/src/notifications/unsubscribe-panel.tsx +4 -7
- package/src/notifications/use-push-device.ts +76 -10
- package/src/offline/query-persistence.ts +35 -3
- package/src/rhf/fields.tsx +11 -4
- package/src/search/command-palette.tsx +2 -4
- package/src/search/global-search.tsx +36 -15
- package/src/search/search-index.ts +0 -15
- package/src/search/use-command-key.ts +13 -12
- package/src/search.ts +10 -1
- package/src/settings/use-settings-focus.ts +3 -0
- package/src/shell/account-menu-language.tsx +6 -4
- package/src/shell/account-menu-text-size.tsx +10 -7
- package/src/shell/app-shell.tsx +0 -13
- package/src/shell/company-switcher.tsx +1 -1
- package/src/shell/dev-menu.tsx +8 -22
- package/src/shell/top-bar-actions.tsx +1 -1
- package/src/shell/top-bar-parts-labels.ts +1 -4
- package/src/shell.ts +21 -17
- package/src/sync/engine.ts +339 -61
- package/src/sync.ts +2 -8
- package/src/testing/css-variables.ts +8 -9
- package/src/theme/chart-palette.ts +0 -2
- package/src/theme/contrast.ts +8 -9
- package/src/theme/palette-store.ts +9 -9
- package/src/theme/text-size.ts +6 -8
- package/src/theme/theme-store.ts +7 -9
- package/src/tour/tour-catalogue.tsx +26 -15
- package/src/tour/tour-dock.ts +0 -2
- package/src/tour/tour-gates.ts +23 -0
- package/src/tour/tour-overlay.tsx +1170 -0
- package/src/tour/tour.tsx +108 -1202
- package/src/tour/use-tour-progress.ts +1 -1
- package/src/wizard/stepper-nav.tsx +3 -1
- package/src/wizard/types.ts +11 -2
- package/src/wizard/use-wizard.ts +2 -1
- package/src/wizard/validation.ts +8 -2
- package/tokens.css +6 -5
- package/dist/components/field-sync-labels.d.ts +0 -2
- package/dist/components/field-sync-labels.js +0 -12
- package/dist/components/field-sync-labels.js.map +0 -1
- package/dist/components/field-sync.d.ts +0 -164
- package/dist/components/field-sync.js +0 -269
- package/dist/components/field-sync.js.map +0 -1
- package/dist/components/section-nav.d.ts +0 -37
- package/dist/components/section-nav.js +0 -33
- package/dist/components/section-nav.js.map +0 -1
- package/dist/components/sign-chip-labels.d.ts +0 -2
- package/dist/components/sign-chip-labels.js +0 -11
- package/dist/components/sign-chip-labels.js.map +0 -1
- package/dist/components/sign-chip.d.ts +0 -68
- package/dist/components/sign-chip.js +0 -47
- package/dist/components/sign-chip.js.map +0 -1
- package/dist/components/ui-labels.js.map +0 -1
- package/dist/lib/isin.d.ts +0 -28
- package/dist/lib/isin.js +0 -36
- package/dist/lib/isin.js.map +0 -1
- package/dist/shell/dev-switchers.d.ts +0 -6
- package/dist/shell/dev-switchers.js +0 -12
- package/dist/shell/dev-switchers.js.map +0 -1
- package/dist/shell/role-switcher.d.ts +0 -21
- package/dist/shell/role-switcher.js +0 -31
- package/dist/shell/role-switcher.js.map +0 -1
- package/src/components/field-sync-labels.ts +0 -13
- package/src/components/field-sync.tsx +0 -482
- package/src/components/section-nav.tsx +0 -65
- package/src/components/sign-chip-labels.ts +0 -12
- package/src/components/sign-chip.tsx +0 -124
- package/src/components/ui-labels.ts +0 -24
- package/src/lib/isin.ts +0 -62
- package/src/shell/dev-switchers.tsx +0 -18
- package/src/shell/role-switcher.tsx +0 -46
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/feedback/feedback-thread-labels.ts"],"sourcesContent":["// The English words of ./feedback-thread, in a module with no component code: the English\n// catalogue (src/i18n/defaults.ts) imports them without the component, so `en` loads as one\n// chunk like the other languages (0.34, KS U8). ./feedback-thread re-exports them.\n\nimport type {
|
|
1
|
+
{"version":3,"sources":["../../src/feedback/feedback-thread-labels.ts"],"sourcesContent":["// The English words of ./feedback-thread, in a module with no component code: the English\n// catalogue (src/i18n/defaults.ts) imports them without the component, so `en` loads as one\n// chunk like the other languages (0.34, KS U8). ./feedback-thread re-exports them.\n\nimport type { ChatComposerLabels, FeedbackThreadLabels } from \"./feedback-thread\";\n\nexport const DEFAULT_FEEDBACK_THREAD_LABELS: FeedbackThreadLabels = {\n thread: \"Comments\",\n empty: \"No comments yet\",\n loading: \"Loading comments…\",\n you: \"You\",\n staff: \"Staff\",\n attachments: \"Attachments\",\n};\n\nexport const DEFAULT_FEEDBACK_COMPOSER_LABELS: ChatComposerLabels = {\n field: \"Write a comment\",\n placeholder: \"Write a comment…\",\n send: \"Send\",\n sendHint: (modifier) => `${modifier} + Enter to send`,\n sendHintEnter: \"Enter to send, Shift + Enter for a new line\",\n};\n"],"mappings":";AAMO,MAAM,iCAAuD;AAAA,EAClE,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,SAAS;AAAA,EACT,KAAK;AAAA,EACL,OAAO;AAAA,EACP,aAAa;AACf;AAEO,MAAM,mCAAuD;AAAA,EAClE,OAAO;AAAA,EACP,aAAa;AAAA,EACb,MAAM;AAAA,EACN,UAAU,CAAC,aAAa,GAAG,QAAQ;AAAA,EACnC,eAAe;AACjB;","names":[]}
|
|
@@ -54,7 +54,7 @@ export interface FeedbackThreadLabels {
|
|
|
54
54
|
export { DEFAULT_FEEDBACK_THREAD_LABELS };
|
|
55
55
|
/** The `feedbackComposer` namespace of `<UiKitProvider labels>`. The attach buttons'
|
|
56
56
|
* words are `feedbackAttachment`'s, shared with the dialog and the note editor. */
|
|
57
|
-
export interface
|
|
57
|
+
export interface ChatComposerLabels {
|
|
58
58
|
/** Accessible name of the text box. */
|
|
59
59
|
field: string;
|
|
60
60
|
placeholder: string;
|
|
@@ -171,7 +171,7 @@ export type FeedbackComposerAttachment = Omit<FeedbackNoteAttachment, "labels" |
|
|
|
171
171
|
onError?: FeedbackAttachmentFieldSingleProps["onError"];
|
|
172
172
|
} & Pick<FeedbackAttachmentFieldSingleProps, "buttonVariant" | "buttonSize">;
|
|
173
173
|
/**
|
|
174
|
-
* What a render-prop {@link
|
|
174
|
+
* What a render-prop {@link ChatComposerProps.attachmentSlot} is handed (0.24.0,
|
|
175
175
|
* keksdose).
|
|
176
176
|
*
|
|
177
177
|
* keksdose's support chat put `<FeedbackAttachmentField refs>` in the slot and a
|
|
@@ -181,7 +181,7 @@ export type FeedbackComposerAttachment = Omit<FeedbackNoteAttachment, "labels" |
|
|
|
181
181
|
* to itself, so keksdose wrapped the whole composer in a ref'd `<div>` of its own just
|
|
182
182
|
* to have an element to hand over.
|
|
183
183
|
*/
|
|
184
|
-
export interface
|
|
184
|
+
export interface ChatComposerSlotContext {
|
|
185
185
|
/**
|
|
186
186
|
* The composer's root, round the text box and this slot — the field's `pasteFrom`,
|
|
187
187
|
* as it is: `pasteFrom={slot.root}`.
|
|
@@ -202,7 +202,7 @@ export interface FeedbackComposerSlotContext {
|
|
|
202
202
|
* (keksdose G5b): the message carries the attachments as they were at the press. */
|
|
203
203
|
pending: boolean;
|
|
204
204
|
}
|
|
205
|
-
export interface
|
|
205
|
+
export interface ChatComposerProps {
|
|
206
206
|
/**
|
|
207
207
|
* Send the comment. Return the promise: the box clears when it RESOLVES, and only of
|
|
208
208
|
* what was sent — text typed while it was in flight stays. A rejection keeps
|
|
@@ -226,7 +226,7 @@ export interface FeedbackComposerProps {
|
|
|
226
226
|
* refs and clearing them once `onSend` resolves stay with the host. Pair it with
|
|
227
227
|
* `canSend`.
|
|
228
228
|
*
|
|
229
|
-
* A node, or (0.24.0) a function of {@link
|
|
229
|
+
* A node, or (0.24.0) a function of {@link ChatComposerSlotContext} that returns
|
|
230
230
|
* one — for a field that wants the composer's root as its `pasteFrom`, so a
|
|
231
231
|
* screenshot pasted into the box reaches it, and `pending` for its `disabled`:
|
|
232
232
|
*
|
|
@@ -239,7 +239,7 @@ export interface FeedbackComposerProps {
|
|
|
239
239
|
* Called once per render of the composer, and not at all while `disabledReason`
|
|
240
240
|
* stands in for it.
|
|
241
241
|
*/
|
|
242
|
-
attachmentSlot?: ReactNode | ((slot:
|
|
242
|
+
attachmentSlot?: ReactNode | ((slot: ChatComposerSlotContext) => ReactNode);
|
|
243
243
|
/**
|
|
244
244
|
* Whether Send is enabled, over the composer's own rule (some text in the box) —
|
|
245
245
|
* for state the composer cannot see, i.e. `attachmentSlot`'s (keksdose G5): `true`
|
|
@@ -280,7 +280,7 @@ export interface FeedbackComposerProps {
|
|
|
280
280
|
* Textarea's `maxLength` + `showCount` since 0.22; the reply box, a composer, could
|
|
281
281
|
* not). The box's own `maxLength`, so typing and pasting stop at it.
|
|
282
282
|
*
|
|
283
|
-
* {@link
|
|
283
|
+
* {@link ChatComposerHandle.insertText} is not stopped by it — the browser limits
|
|
284
284
|
* typing, not a script — and a canned reply is not cut mid-sentence to fit. A draft
|
|
285
285
|
* past the limit therefore holds Send back (whatever `canSend` says, as `pending`
|
|
286
286
|
* does) until it is trimmed; with `showCount` the counter, red at the limit, says by
|
|
@@ -311,13 +311,13 @@ export interface FeedbackComposerProps {
|
|
|
311
311
|
* is still the one that went out.
|
|
312
312
|
*/
|
|
313
313
|
value?: string;
|
|
314
|
-
/** Every change to the draft — typing, {@link
|
|
314
|
+
/** Every change to the draft — typing, {@link ChatComposerHandle.insertText}, the
|
|
315
315
|
* clear after a send. Required to change a controlled `value`. */
|
|
316
316
|
onValueChange?: (value: string) => void;
|
|
317
|
-
/** {@link
|
|
317
|
+
/** {@link ChatComposerHandle}: put text into the draft from outside (canned-reply
|
|
318
318
|
* chips) or focus the box. */
|
|
319
|
-
ref?: Ref<
|
|
320
|
-
labels?: LabelOverride<
|
|
319
|
+
ref?: Ref<ChatComposerHandle>;
|
|
320
|
+
labels?: LabelOverride<ChatComposerLabels>;
|
|
321
321
|
className?: string;
|
|
322
322
|
/**
|
|
323
323
|
* `"sm"` for a narrow host — keksdose's assistant launcher, a small floating panel
|
|
@@ -346,7 +346,7 @@ export interface FeedbackComposerProps {
|
|
|
346
346
|
* the string, not the caret, so it could only append — so the composer, which owns
|
|
347
347
|
* the textarea, does the splice.
|
|
348
348
|
*/
|
|
349
|
-
export interface
|
|
349
|
+
export interface ChatComposerHandle {
|
|
350
350
|
/**
|
|
351
351
|
* Insert `text` at the caret, replacing any selection (the caret the box last had:
|
|
352
352
|
* a click on a chip blurs it, and the selection survives the blur), then focus the
|
|
@@ -367,15 +367,7 @@ export interface FeedbackComposerHandle {
|
|
|
367
367
|
* feedback-specific — a textarea, an optional picture or a host's upload slot, Send,
|
|
368
368
|
* `sendOn="enter"` for the chat way — and keksdose's assistant and support chat are
|
|
369
369
|
* chats, not reports. `FeedbackComposer`, its old name, was removed in 0.35 (refactor
|
|
370
|
-
* audit 2026-10, API-6d; deprecated in 0.34); its types
|
|
370
|
+
* audit 2026-10, API-6d; deprecated in 0.34); its types are `ChatComposer*` too since 0.52
|
|
371
|
+
* (refactor audit 2026-10-30, API-6), the `FeedbackComposer*` names deprecated aliases.
|
|
371
372
|
*/
|
|
372
|
-
export declare function ChatComposer({ onSend, pending, attachment, attachmentSlot, canSend: canSendProp, sendOn, disabledReason, commit, rows, maxLength, showCount, countLabels, placeholder, value, onValueChange, ref, labels: labelsProp, className, id, size, ...rest }:
|
|
373
|
-
/** {@link FeedbackComposerProps}, for {@link ChatComposer}. */
|
|
374
|
-
export type ChatComposerProps = FeedbackComposerProps;
|
|
375
|
-
/** {@link FeedbackComposerHandle}, for {@link ChatComposer}. */
|
|
376
|
-
export type ChatComposerHandle = FeedbackComposerHandle;
|
|
377
|
-
/** {@link FeedbackComposerLabels}, for {@link ChatComposer} — still the `feedbackComposer`
|
|
378
|
-
* namespace of the provider. */
|
|
379
|
-
export type ChatComposerLabels = FeedbackComposerLabels;
|
|
380
|
-
/** {@link FeedbackComposerSlotContext}, for {@link ChatComposer}'s `attachmentSlot`. */
|
|
381
|
-
export type ChatComposerSlotContext = FeedbackComposerSlotContext;
|
|
373
|
+
export declare function ChatComposer({ onSend, pending, attachment, attachmentSlot, canSend: canSendProp, sendOn, disabledReason, commit, rows, maxLength, showCount, countLabels, placeholder, value, onValueChange, ref, labels: labelsProp, className, id, size, ...rest }: ChatComposerProps): import("react").JSX.Element;
|
|
@@ -4,6 +4,7 @@ import { useEffect, useId, useImperativeHandle, useLayoutEffect, useRef, useStat
|
|
|
4
4
|
import { ImageIcon, ImageOff, Paperclip, Send } from "lucide-react";
|
|
5
5
|
import { cn } from "../lib/cn.js";
|
|
6
6
|
import { formatDate, formatRelativeTime } from "../lib/format.js";
|
|
7
|
+
import { upperFirst } from "../lib/text-case.js";
|
|
7
8
|
import { hasContent } from "../lib/presence.js";
|
|
8
9
|
import { Button } from "../components/button.js";
|
|
9
10
|
import { EmptyState } from "../components/empty-state.js";
|
|
@@ -187,7 +188,7 @@ function DaySeparator({ date, now, locale }) {
|
|
|
187
188
|
let label;
|
|
188
189
|
if (days === 0 || days === -1) {
|
|
189
190
|
const word = new Intl.RelativeTimeFormat(locale, { numeric: "auto" }).format(days + 0, "day");
|
|
190
|
-
label = word
|
|
191
|
+
label = upperFirst(word, locale);
|
|
191
192
|
} else {
|
|
192
193
|
label = formatDate(
|
|
193
194
|
date,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/feedback/feedback-thread.tsx"],"sourcesContent":["import { useEffect, useId, useImperativeHandle, useLayoutEffect, useRef, useState, useSyncExternalStore } from \"react\";\nimport type { ReactNode, Ref, RefObject } from \"react\";\nimport { ImageIcon, ImageOff, Paperclip, Send } from \"lucide-react\";\nimport { cn } from \"../lib/cn\";\nimport { formatDate, formatRelativeTime } from \"../lib/format\";\nimport { hasContent } from \"../lib/presence\";\nimport { Button } from \"../components/button\";\nimport { EmptyState } from \"../components/empty-state\";\nimport { Spinner } from \"../components/spinner\";\nimport { Textarea } from \"../components/textarea\";\nimport type { CharacterCountLabels } from \"../components/field-base\";\nimport { Skeleton } from \"../components/skeleton\";\nimport { Tooltip } from \"../components/tooltip\";\nimport { useWriteLock } from \"../components/write-lock\";\nimport type { CommitScope } from \"../components/write-lock\";\nimport { useKitFileLabels, useKitLabels, useKitLocale, type LabelOverride } from \"../i18n/kit-labels\";\nimport { FeedbackAttachmentField } from \"./feedback-attachment\";\nimport type { FeedbackAttachmentFieldSingleProps } from \"./feedback-attachment\";\nimport type { FeedbackNoteAttachment } from \"./feedback-inbox\";\nimport type { FeedbackAttachmentLabels } from \"./feedback-dialog\";\nimport { DEFAULT_FEEDBACK_COMPOSER_LABELS, DEFAULT_FEEDBACK_THREAD_LABELS } from \"./feedback-thread-labels\";\n\n/**\n * The conversation under a report: who said what, when, with what attached — and the\n * box to answer in.\n *\n * Both apps had written it by hand. kastlan's feedback page grew a comment list of\n * bordered boxes with `slate-*` literals (feedback-page.tsx, \"keksdose left this\n * unbuilt\"), and keksdose built the same thing a second time for support\n * (support-thread.tsx) with sides, bubbles and a composer that clears only what it\n * sent. This is that second one, generalised: the kit owns the look and the\n * behaviour, the app owns the data, the upload and every word it does not share.\n *\n * **Own vs other** is the caller's per message (`own`), not a comparison the kit makes\n * against a user id: whose message sits at the END side depends on who is reading,\n * and only the app knows that (keksdose's support thread labelled a member's question\n * \"Du\" in the admin panel the first time round, by reading the wrong field).\n *\n * **Redaction.** A thread is somebody's words about their own data — exactly what a\n * host's demo / screen-share mode blurs. Bodies, authors and attachments carry\n * `data-private` (the attribute `Tooltip redact` and `StatTile sensitive` use) unless\n * `redact={false}`.\n *\n * **RTL.** Sides are logical — `justify-end` is the reading end, and the bubble's\n * tucked corner is `rounded-ee` / `rounded-es` — and each body is `dir=\"auto\"`, so a\n * Hebrew reply in an English thread (or the reverse) lays out as its own language.\n *\n * **A chat, too** (keksdose G4/G5). keksdose's support chat is the same conversation\n * read the chat way: status lines between the messages (\"Closed automatically\",\n * \"Reopened\"), a day line where the date changes, clock times under it, Enter to send\n * and several files uploaded ahead of the send. Each of those is an opt-in here\n * (`kind: \"event\"`, `daySeparators`, `timeFormat=\"clock\"`, `sendOn=\"enter\"`,\n * `attachmentSlot` + `canSend`), so the feedback thread's defaults stay as they were.\n */\n\n/* ── Labels ───────────────────────────────────────────────────────────────── */\n\n/** The `feedbackThread` namespace of `<UiKitProvider labels>`. */\nexport interface FeedbackThreadLabels {\n /** Accessible name of the message list. */\n thread: string;\n empty: string;\n loading: string;\n /** Author line of an `own` message that has no `author` of its own. */\n you: string;\n /** The badge beside a `staff` author. */\n staff: string;\n /** Accessible name of a message's attachment list. */\n attachments: string;\n}\n\n// Defined in ./feedback-thread-labels, which holds no component code (0.34, KS U8).\nexport { DEFAULT_FEEDBACK_THREAD_LABELS };\n\n/** The `feedbackComposer` namespace of `<UiKitProvider labels>`. The attach buttons'\n * words are `feedbackAttachment`'s, shared with the dialog and the note editor. */\nexport interface FeedbackComposerLabels {\n /** Accessible name of the text box. */\n field: string;\n placeholder: string;\n send: string;\n /** The shortcut line, given the platform's modifier (\"Ctrl\" or \"⌘\"). */\n sendHint: (modifier: string) => string;\n /** The shortcut line under `sendOn=\"enter\"` (keksdose G5): Enter sends, so say how a\n * new line is made. */\n sendHintEnter: string;\n}\n\n// Defined in ./feedback-thread-labels, which holds no component code (0.34, KS U8).\nexport { DEFAULT_FEEDBACK_COMPOSER_LABELS };\n\n/* ── Thread ───────────────────────────────────────────────────────────────── */\n\nexport interface FeedbackThreadAttachment {\n id?: string | number;\n name: string;\n /** Where to open it. Left out, the attachment is listed by name only. */\n url?: string;\n /** MIME type; an `image/*` with a `url` is shown as a thumbnail. */\n type?: string;\n /** Bytes, shown beside a non-image. */\n size?: number;\n}\n\nexport interface FeedbackThreadMessage {\n /** Leave out, or `\"message\"`. `\"event\"` is a {@link FeedbackThreadEvent}. */\n kind?: \"message\";\n id: string | number;\n /** Who wrote it. Left out on an `own` message, it reads \"You\". */\n author?: ReactNode;\n /** A `Date`, an ISO string or epoch ms. */\n createdAt: Date | string | number;\n body: string;\n attachments?: readonly FeedbackThreadAttachment[];\n /** Written by whoever is reading: sits at the end side, in the brand tint. */\n own?: boolean;\n /** Written by the team rather than a user: gets the \"Staff\" badge. */\n staff?: boolean;\n /** 0.38: beside the author and time — a reply's \"→ Done\" status chip. Not\n * `data-private`: it is the app's, not somebody's words. */\n badge?: ReactNode;\n /** 0.38: the body struck through and muted — a hidden comment as its admin sees it. */\n struck?: boolean;\n /** 0.38: under the body — a note (\"Hidden by an admin\") and the message's actions\n * (Hide, Delete). Not `data-private`. */\n footer?: ReactNode;\n}\n\n/**\n * A line in the thread that nobody wrote — \"Closed automatically\", \"Marked as\n * resolved\", \"Reopened\" — drawn centred and muted with its time, no author, no side,\n * no bubble.\n *\n * keksdose G4: its support chat interleaves these with the messages, and as a message\n * they came out as a bubble from nobody at the start side, which reads as the member\n * having said \"resolved\". Word it for the READER, as with `own`: the app knows whether\n * \"you reopened it\" or \"Anna reopened it\" is true for the person looking.\n *\n * The text is the app's, not somebody's words about their data, so it is NOT tagged\n * `data-private`; one that names a person can wrap the name in its own\n * `<span data-private>` (`body` is a node for that reason).\n */\nexport interface FeedbackThreadEvent {\n kind: \"event\";\n id: string | number;\n /** A `Date`, an ISO string or epoch ms. */\n createdAt: Date | string | number;\n body: ReactNode;\n}\n\n/** One row of a {@link FeedbackThread}: a message, or an event line between them. */\nexport type FeedbackThreadItem = FeedbackThreadMessage | FeedbackThreadEvent;\n\nexport interface FeedbackThreadProps {\n /** Oldest first. Event lines ({@link FeedbackThreadEvent}) sit among the messages. */\n messages: readonly FeedbackThreadItem[];\n loading?: boolean;\n /** Replaces the default \"No comments yet\". */\n empty?: ReactNode;\n /**\n * Draw one attachment yourself — for files behind auth, which a plain `<img src>`\n * cannot fetch (kastlan's `AuthedImage`), or a lightbox. The default is a thumbnail\n * link for an image with a `url`, a file link otherwise.\n */\n renderAttachment?: (attachment: FeedbackThreadAttachment, message: FeedbackThreadMessage) => ReactNode;\n /** Tag bodies, authors and attachments `data-private`. Default true. */\n redact?: boolean;\n /**\n * How a row's time reads. `\"relative\"` (default): \"5 minutes ago\", a date past six\n * days — right for a report's comments, read days apart. `\"clock\"`: the time of day\n * in the locale (\"14:05\", \"2:05 PM\") — the chat look, keksdose G4; pair it with\n * `daySeparators`, which say which day that clock time is on. Either way the full\n * date and time is in the Tooltip.\n */\n timeFormat?: \"relative\" | \"clock\";\n /**\n * A centred day line before the first row and wherever the next row is on another\n * calendar day (the device's zone): \"Today\", \"Yesterday\", else the date — keksdose\n * G4. \"Today\" / \"Yesterday\" are `Intl.RelativeTimeFormat`'s own words in the kit\n * locale, so there is no label to translate. Default false.\n */\n daySeparators?: boolean;\n /** \"Now\" for the relative times and the day lines — pin it in tests and stories.\n * Default: the clock. */\n now?: Date | number;\n /** Overrides the provider's locale for the times. */\n locale?: string;\n labels?: LabelOverride<FeedbackThreadLabels>;\n className?: string;\n}\n\nexport function FeedbackThread({\n messages,\n loading = false,\n empty,\n renderAttachment,\n redact = true,\n now,\n locale: localeProp,\n timeFormat = \"relative\",\n daySeparators = false,\n labels: labelsProp,\n className,\n}: FeedbackThreadProps) {\n const labels = useKitLabels(\"feedbackThread\", DEFAULT_FEEDBACK_THREAD_LABELS, labelsProp);\n const locale = useKitLocale(localeProp);\n const file = useKitFileLabels();\n const priv = redact ? \"\" : undefined;\n const clock = useMinuteClock(now === undefined);\n const reference = now === undefined ? clock : +now;\n\n if (loading && messages.length === 0) {\n return <Skeleton lines={3} label={labels.loading} className={className} />;\n }\n if (messages.length === 0) {\n return (\n <EmptyState variant=\"inline\" size=\"sm\" title={empty ?? labels.empty} className={cn(\"justify-start\", className)} />\n );\n }\n\n // Per row, the calendar day of the last readable date up to it — what a day line\n // compares against.\n const days: (number | null)[] = [];\n for (const message of messages) {\n const date = toDate(message.createdAt);\n days.push(date ? dayNumber(date) : (days.at(-1) ?? null));\n }\n\n return (\n <ol aria-label={labels.thread} aria-busy={loading || undefined} className={cn(\"space-y-3\", className)}>\n {messages.flatMap((message, index) => {\n const date = toDate(message.createdAt);\n const time = date && (\n // The kit's Tooltip, not a native title: one tooltip look app-wide\n // (keksdose F0 / dev#523).\n <Tooltip label={new Intl.DateTimeFormat(locale, { dateStyle: \"full\", timeStyle: \"short\" }).format(date)}>\n <time dateTime={date.toISOString()} className=\"tabular-nums\">\n {timeFormat === \"clock\"\n ? formatDate(date, \"time\", { locale })\n : formatRelativeTime(date, {\n now: reference,\n locale,\n // Past the kit's day steps it is a date: \"2 weeks ago\" makes\n // the reader do arithmetic the date already did.\n absoluteAfterDays: 6.5,\n })}\n </time>\n </Tooltip>\n );\n const rows: ReactNode[] = [];\n const day = date && dayNumber(date);\n // Against the last row WITH a readable date: an unparseable one neither starts\n // a day nor hides the next change.\n if (daySeparators && date && day !== days[index - 1]) {\n rows.push(<DaySeparator key={`day-${message.id}`} date={date} now={reference} locale={locale} />);\n }\n if (message.kind === \"event\") {\n // A list item like the rest, so \"Reopened\" is read in its place, but not an\n // article: an article is somebody's post, and this has no author.\n rows.push(\n <li\n key={message.id}\n data-event=\"\"\n className=\"flex flex-wrap items-baseline justify-center gap-x-2 px-4 text-center text-xs text-muted\"\n >\n <span>{message.body}</span>\n {time && <span className=\"text-caption\">{time}</span>}\n </li>,\n );\n return rows;\n }\n const author = message.author ?? (message.own ? labels.you : null);\n const attachments = message.attachments ?? [];\n rows.push(\n <li\n key={message.id}\n className={cn(\"flex\", message.own ? \"justify-end\" : \"justify-start\")}\n data-own={message.own ? \"\" : undefined}\n >\n <article\n className={cn(\n \"max-w-[85%] min-w-0 rounded-lg px-3 py-2 text-sm\",\n message.own ? \"rounded-ee-sm bg-brand-soft\" : \"rounded-es-sm bg-surface-2\",\n )}\n >\n <header className=\"mb-0.5 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-caption text-muted\">\n {author != null && (\n <span data-private={priv} className=\"font-medium text-secondary\">\n {author}\n </span>\n )}\n {message.staff && (\n <span className=\"rounded border border-subtle bg-surface px-1 text-micro font-medium uppercase tracking-wide text-secondary\">\n {labels.staff}\n </span>\n )}\n {message.badge}\n {time}\n </header>\n {message.body && (\n <p\n data-private={priv}\n dir=\"auto\"\n className={cn(\n \"whitespace-pre-wrap break-words text-start\",\n message.struck ? \"text-muted line-through\" : \"text-primary\",\n )}\n >\n {message.body}\n </p>\n )}\n {attachments.length > 0 && (\n <ul aria-label={labels.attachments} data-private={priv} className=\"mt-2 flex flex-wrap gap-2\">\n {attachments.map((attachment, index) => (\n <li key={attachment.id ?? `${index}-${attachment.name}`} className=\"min-w-0\">\n {renderAttachment ? (\n renderAttachment(attachment, message)\n ) : (\n <DefaultAttachment attachment={attachment} size={file.size} />\n )}\n </li>\n ))}\n </ul>\n )}\n {message.footer != null && (\n <div className=\"mt-1.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-caption text-muted\">\n {message.footer}\n </div>\n )}\n </article>\n </li>,\n );\n return rows;\n })}\n </ol>\n );\n}\n\nfunction DefaultAttachment({\n attachment,\n size,\n}: {\n attachment: FeedbackThreadAttachment;\n size: (bytes: number) => string;\n}) {\n const { name, url, type } = attachment;\n if (url && type?.startsWith(\"image/\")) return <ImageThumbnail url={url} name={name} />;\n const content = (\n <>\n <Paperclip className=\"size-3.5 shrink-0\" aria-hidden />\n {/* A file name wraps from Large up, as the attachments of the composer do (text\n size §10.17; round 0.34 T1: the sweep read \"export-20…\"). */}\n <span className=\"min-w-0 truncate-until-large\">{name}</span>\n {attachment.size !== undefined && <span className=\"shrink-0 text-muted\">{size(attachment.size)}</span>}\n </>\n );\n const chip =\n \"inline-flex max-w-full items-center gap-1 rounded border border-subtle bg-surface px-2 py-1 text-xs text-secondary\";\n return url ? (\n <a href={url} target=\"_blank\" rel=\"noopener noreferrer\" className={cn(chip, \"hover:bg-hover\")}>\n {content}\n </a>\n ) : (\n <span className={chip}>{content}</span>\n );\n}\n\n/** An image attachment's thumbnail. The box is drawn before the picture arrives —\n * `loading=\"lazy\"` leaves it empty until it nears the viewport, and a URL that has\n * expired never fills it — and an empty bordered square read as a broken layout, not\n * as a picture. So the box carries an image glyph underneath until the picture\n * covers it, and swaps it for a broken-image glyph when the load fails. */\nfunction ImageThumbnail({ url, name }: { url: string; name: string }) {\n // Keyed on the URL, so a message whose attachment is replaced tries the new one.\n const [failedUrl, setFailedUrl] = useState<string | null>(null);\n const failed = failedUrl === url;\n const Glyph = failed ? ImageOff : ImageIcon;\n return (\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"relative block h-20 w-20 overflow-hidden rounded border border-subtle bg-surface-2\"\n >\n <Glyph aria-hidden className=\"absolute inset-0 m-auto size-6 text-muted\" />\n {!failed && (\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- load/error are resource events, not interactions\n <img\n src={url}\n alt={name}\n loading=\"lazy\"\n onError={() => setFailedUrl(url)}\n className=\"relative h-full w-full object-cover\"\n />\n )}\n {/* The <img> and its alt are gone once it failed; the link still needs a name. */}\n {failed && <span className=\"sr-only\">{name}</span>}\n </a>\n );\n}\n\n/** The time, refreshed once a minute while `active`, so \"2 minutes ago\" does not stay\n * \"just now\" on a page left open. Read in state rather than in render, which must be\n * pure. */\nfunction useMinuteClock(active: boolean): number {\n const [time, setTime] = useState(() => Date.now());\n useEffect(() => {\n if (!active) return;\n const id = setInterval(() => setTime(Date.now()), 60_000);\n return () => clearInterval(id);\n }, [active]);\n return time;\n}\n\n/** The local calendar day as one number (20260926), for \"same day?\" and keys. */\nfunction dayNumber(date: Date): number {\n return date.getFullYear() * 10_000 + (date.getMonth() + 1) * 100 + date.getDate();\n}\n\n/**\n * The day line of `daySeparators` (keksdose G4): \"Today\" / \"Yesterday\" from\n * `Intl.RelativeTimeFormat` (`numeric: \"auto\"`) — the locale's own words, capitalised\n * for a line that stands alone (\"heute\" → \"Heute\"; a script without case is left as\n * is) — else the weekday and date, with the year only when it is not this one.\n *\n * Counted in calendar days, not 24-hour spans: 23:50 yesterday is \"Yesterday\" at\n * 00:10 today.\n */\nfunction DaySeparator({ date, now, locale }: { date: Date; now: number; locale: string | undefined }) {\n const today = new Date(now);\n const days = Math.round(\n (Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) -\n Date.UTC(today.getFullYear(), today.getMonth(), today.getDate())) /\n 86_400_000,\n );\n let label: string;\n if (days === 0 || days === -1) {\n const word = new Intl.RelativeTimeFormat(locale, { numeric: \"auto\" }).format(days + 0, \"day\");\n label = word.charAt(0).toLocaleUpperCase(locale) + word.slice(1);\n } else {\n label = formatDate(\n date,\n {\n weekday: \"long\",\n day: \"numeric\",\n month: \"long\",\n ...(date.getFullYear() === today.getFullYear() ? null : { year: \"numeric\" }),\n },\n { locale },\n );\n }\n const y = String(date.getFullYear()).padStart(4, \"0\");\n const m = String(date.getMonth() + 1).padStart(2, \"0\");\n const d = String(date.getDate()).padStart(2, \"0\");\n return (\n <li data-day-separator=\"\" className=\"flex items-center gap-3 py-1 text-xs text-muted\">\n <span aria-hidden className=\"h-px flex-1 bg-[var(--border)]\" />\n <time dateTime={`${y}-${m}-${d}`} className=\"font-medium\">\n {label}\n </time>\n <span aria-hidden className=\"h-px flex-1 bg-[var(--border)]\" />\n </li>\n );\n}\n\nfunction toDate(value: Date | string | number): Date | null {\n const date = value instanceof Date ? value : new Date(value);\n return Number.isNaN(date.getTime()) ? null : date;\n}\n\n/* ── Composer ─────────────────────────────────────────────────────────────── */\n\n/** What the composer's attach control takes — {@link FeedbackNoteAttachment} with the\n * labels optional, since the field reads `feedbackAttachment` from the provider, and\n * `onError` the field's own (0.23.0): it is handed the refused file and the limit too\n * (`FeedbackAttachmentErrorInfo`), and a `(kind) => …` handler still fits. Since\n * 0.24.0 also the field's `buttonVariant` / `buttonSize`, for a composer whose row\n * wants smaller or quieter attach buttons than the bordered `md` default. */\nexport type FeedbackComposerAttachment = Omit<FeedbackNoteAttachment, \"labels\" | \"onError\"> & {\n labels?: LabelOverride<FeedbackAttachmentLabels>;\n onError?: FeedbackAttachmentFieldSingleProps[\"onError\"];\n} & Pick<FeedbackAttachmentFieldSingleProps, \"buttonVariant\" | \"buttonSize\">;\n\n/**\n * What a render-prop {@link FeedbackComposerProps.attachmentSlot} is handed (0.24.0,\n * keksdose).\n *\n * keksdose's support chat put `<FeedbackAttachmentField refs>` in the slot and a\n * screenshot pasted into the reply box never reached it: the box is the field's\n * sibling, so the paste bubbles to their common parent — the composer's root — and the\n * field hears it only through `pasteFrom`, which needs that root. The composer kept it\n * to itself, so keksdose wrapped the whole composer in a ref'd `<div>` of its own just\n * to have an element to hand over.\n */\nexport interface FeedbackComposerSlotContext {\n /**\n * The composer's root, round the text box and this slot — the field's `pasteFrom`,\n * as it is: `pasteFrom={slot.root}`.\n *\n * A ref, not the element, because `pasteFrom` is one: the field reads `.current` in\n * an effect, and the slot renders INSIDE this root, so the two are committed together\n * and React attaches the root before any effect of the slot's runs — the first paste\n * after the first paint already lands. The element itself would be `null` on the\n * first render (it does not exist yet) and could only arrive by a second render\n * through state; the ref is the same object every render, so the field's listener is\n * added once and never re-added.\n *\n * With the built-in `attachment` on as well, it listens on this root too: hand the\n * root to one field only, or an image pasted once is attached twice.\n */\n root: RefObject<HTMLElement | null>;\n /** The composer's `pending` — a send is in flight. For the field's `disabled`\n * (keksdose G5b): the message carries the attachments as they were at the press. */\n pending: boolean;\n}\n\nexport interface FeedbackComposerProps {\n /**\n * Send the comment. Return the promise: the box clears when it RESOLVES, and only of\n * what was sent — text typed while it was in flight stays. A rejection keeps\n * everything for a retry (surface the error yourself; the composer stays quiet).\n *\n * `attachment` is the built-in field's one picture. Files the host uploaded ahead\n * (`attachmentSlot`) are the host's state, read by the host here — and `body` may be\n * `\"\"` when `canSend` let an attachments-only message go.\n */\n onSend: (body: string, attachment: File | null) => void | Promise<unknown>;\n /** The send is in flight: a spinner on the button and no second send. */\n pending?: boolean;\n /** Offer one picture with the comment (file, paste or `onCaptureScreenshot`).\n * `true` for the defaults. Left out, the composer is text only. */\n attachment?: boolean | FeedbackComposerAttachment;\n /**\n * The host's own attach control, in the row with Send where the built-in field sits\n * (after it, if both are on) — keksdose G5: its support chat uploads up to N files\n * AHEAD of the send and sends their refs, which one `File` in `onSend` cannot carry.\n * The slot is the host's picker plus the chips of what is uploaded; the upload, the\n * refs and clearing them once `onSend` resolves stay with the host. Pair it with\n * `canSend`.\n *\n * A node, or (0.24.0) a function of {@link FeedbackComposerSlotContext} that returns\n * one — for a field that wants the composer's root as its `pasteFrom`, so a\n * screenshot pasted into the box reaches it, and `pending` for its `disabled`:\n *\n * ```tsx\n * attachmentSlot={({ root, pending }) => (\n * <FeedbackAttachmentField refs pasteFrom={root} disabled={pending} … />\n * )}\n * ```\n *\n * Called once per render of the composer, and not at all while `disabledReason`\n * stands in for it.\n */\n attachmentSlot?: ReactNode | ((slot: FeedbackComposerSlotContext) => ReactNode);\n /**\n * Whether Send is enabled, over the composer's own rule (some text in the box) —\n * for state the composer cannot see, i.e. `attachmentSlot`'s (keksdose G5): `true`\n * with files ready makes an empty draft sendable (`onSend(\"\", null)`), `false` while\n * an upload is still running holds even a written reply back. Left out, the text\n * decides. `pending` blocks a send either way, as does a draft past `maxLength`.\n */\n canSend?: boolean;\n /**\n * Which key sends. `\"mod-enter\"` (default): Ctrl/⌘+Enter, the report dialog's and\n * note editor's shortcut, with plain Enter a new line — feedback is written in\n * paragraphs. `\"enter\"`: the chat way (keksdose G5) — Enter sends, Shift+Enter is a\n * new line, Ctrl/⌘+Enter still sends; an Enter that confirms an IME composition\n * (Japanese, Chinese input) is the IME's, never a send.\n */\n sendOn?: \"mod-enter\" | \"enter\";\n /** Rendered INSTEAD of the composer — the thread is closed, or read-only for this\n * reader. */\n disabledReason?: ReactNode;\n /**\n * Send COMMITS (0.33.1, kastlan's assistant): under a locked {@link WriteLockProvider}\n * Send is disabled the `disabledReason` way — focusable, the lock's reason in its\n * tooltip and description, as on {@link Button}'s `commit` — and neither Enter nor\n * Ctrl/⌘+Enter sends. The box stays editable and the draft stays: nothing in it\n * reaches the server until Send, and the lock may lift. No provider, or an unlocked\n * one: no effect. A {@link CommitScope}: kastlan's assistant answers under the demo\n * and not under a lapsed plan (its backend's 402), so it passes\n * `commit={{ except: [\"demo\"] }}` where it read `useWriteLock` and fed `canSend` and a\n * reason by hand. Not the prop above: that one replaces the box, this one keeps it.\n */\n commit?: CommitScope;\n rows?: number;\n /**\n * The longest draft the box takes, in UTF-16 code units as the browser counts — the\n * server's limit, so a reply too long for it is cut off while it is typed rather than\n * refused by a 422 after the press (keksdose G6: its support replies are capped at\n * 4,000 on the server, and its other text fields already count against that with\n * Textarea's `maxLength` + `showCount` since 0.22; the reply box, a composer, could\n * not). The box's own `maxLength`, so typing and pasting stop at it.\n *\n * {@link FeedbackComposerHandle.insertText} is not stopped by it — the browser limits\n * typing, not a script — and a canned reply is not cut mid-sentence to fit. A draft\n * past the limit therefore holds Send back (whatever `canSend` says, as `pending`\n * does) until it is trimmed; with `showCount` the counter, red at the limit, says by\n * how much.\n */\n maxLength?: number;\n /**\n * A live \"12/4000\" under the box, with `maxLength` — Textarea's `showCount`, the same\n * counter (keksdose G6): the count is part of the box's description, read with it on\n * focus, and a polite live region speaks only on entering the last stretch and at the\n * limit, never per keystroke. Under `size=\"sm\"` the hidden send hint stays the box's\n * description too, before the count. Ignored without `maxLength`.\n */\n showCount?: boolean;\n /** The counter's words — the `characterCount` namespace, as on Textarea. */\n countLabels?: Partial<CharacterCountLabels>;\n /**\n * The box's hint, over the `placeholder` label — keksdose F9: an admin answering a\n * support ticket is asked something else (\"Reply to Anna…\") than a member adding to\n * their own report, and one provider-wide label cannot say both.\n */\n placeholder?: string;\n /**\n * The draft, controlled — for a host that keeps it itself (saves it per ticket,\n * prefills a template). Left out, the composer keeps its own. Either way a send\n * that resolves clears only what was sent: controlled, that is an\n * `onValueChange(\"\")` the host receives like any keystroke, and only if the draft\n * is still the one that went out.\n */\n value?: string;\n /** Every change to the draft — typing, {@link FeedbackComposerHandle.insertText}, the\n * clear after a send. Required to change a controlled `value`. */\n onValueChange?: (value: string) => void;\n /** {@link FeedbackComposerHandle}: put text into the draft from outside (canned-reply\n * chips) or focus the box. */\n ref?: Ref<FeedbackComposerHandle>;\n labels?: LabelOverride<FeedbackComposerLabels>;\n className?: string;\n /**\n * `\"sm\"` for a narrow host — keksdose's assistant launcher, a small floating panel\n * (0.22): a small Send button, and the send hint (\"Enter to send, Shift + Enter for a\n * new line\") hidden from view but kept as the box's description, so a keyboard or\n * screen-reader user still learns the shortcut. Default `\"md\"`.\n */\n size?: \"md\" | \"sm\";\n /**\n * On the composer's root — the box, or the `disabledReason` line in its place —\n * with any `data-*` attribute beside it (keksdose K17). keksdose's assistant tour\n * points at the chat box with `[data-tour=\"assistant-ask\"]`, and a composer that\n * dropped every attribute it was not told about left the anchor nowhere: the\n * assistant kept its hand-built box rather than lose the tour step.\n */\n id?: string;\n /** `data-*` attributes for the root, as `id` — a tour anchor, a test id. */\n [dataAttribute: `data-${string}`]: string | number | boolean | undefined;\n}\n\n/**\n * What a {@link ChatComposer} `ref` holds.\n *\n * keksdose F9: the support admin answers the same five questions all day and wants\n * chips above the box (\"Thanks, fixed in the next release\") that drop their text in\n * where the caret is. A controlled `value` alone cannot do that well — the host sees\n * the string, not the caret, so it could only append — so the composer, which owns\n * the textarea, does the splice.\n */\nexport interface FeedbackComposerHandle {\n /**\n * Insert `text` at the caret, replacing any selection (the caret the box last had:\n * a click on a chip blurs it, and the selection survives the blur), then focus the\n * box with the caret after the inserted text so the reply can go on. Nothing is\n * added around it — put a space or a newline in `text` if the reply needs one. A\n * no-op while `disabledReason` replaces the box.\n */\n insertText: (text: string) => void;\n focus: () => void;\n}\n\nconst noSubscribe = () => () => {};\nconst isApple = () =>\n typeof navigator !== \"undefined\" && /Mac|iPhone|iPad|iPod/i.test(navigator.platform || navigator.userAgent);\n\n/**\n * The answer box under a {@link FeedbackThread}: a textarea, an optional picture,\n * and Send — Ctrl/⌘+Enter sends, the shortcut the report dialog and the note editor\n * use, so the habit carries across the feature. Plain Enter is a new line: feedback is\n * written in paragraphs, unlike a chat — which `sendOn=\"enter\"` is for (keksdose G5).\n *\n * Named for what it is since 0.22 (keksdose K17): the component was never\n * feedback-specific — a textarea, an optional picture or a host's upload slot, Send,\n * `sendOn=\"enter\"` for the chat way — and keksdose's assistant and support chat are\n * chats, not reports. `FeedbackComposer`, its old name, was removed in 0.35 (refactor\n * audit 2026-10, API-6d; deprecated in 0.34); its types keep theirs.\n */\nexport function ChatComposer({\n onSend,\n pending = false,\n attachment,\n attachmentSlot,\n canSend: canSendProp,\n sendOn = \"mod-enter\",\n disabledReason,\n commit,\n rows = 3,\n maxLength,\n showCount,\n countLabels,\n placeholder,\n value,\n onValueChange,\n ref,\n labels: labelsProp,\n className,\n id,\n size = \"md\",\n ...rest\n}: FeedbackComposerProps) {\n const labels = useKitLabels(\"feedbackComposer\", DEFAULT_FEEDBACK_COMPOSER_LABELS, labelsProp);\n // The lock as Send sees it, with its scope (§12.36). Send's Button reads the same\n // through its own `commit`; this holds the keyboard's send back with it.\n const lock = useWriteLock(commit ?? false);\n const rootAttributes = { id, ...dataAttributes(rest) };\n const hintId = useId();\n const [ownDraft, setOwnDraft] = useState(\"\");\n const controlled = value !== undefined;\n const draft = controlled ? value : ownDraft;\n const [file, setFile] = useState<File | null>(null);\n const root = useRef<HTMLDivElement>(null);\n const box = useRef<HTMLTextAreaElement>(null);\n // The draft as of the last commit. The send's `.then` and `insertText` run after\n // renders their closure did not see — text typed while the send was in flight, a\n // second chip clicked before the first one's render — and must not act on a stale\n // string (for a controlled draft there is no updater function to lean on).\n const latest = useRef(draft);\n useLayoutEffect(() => {\n latest.current = draft;\n });\n // Where the caret goes once an inserted text has rendered.\n const caret = useRef<number | null>(null);\n useLayoutEffect(() => {\n const el = box.current;\n if (caret.current === null || !el) return;\n el.focus();\n el.setSelectionRange(caret.current, caret.current);\n caret.current = null;\n });\n\n const setDraft = (next: string) => {\n latest.current = next;\n if (!controlled) setOwnDraft(next);\n onValueChange?.(next);\n };\n\n useImperativeHandle(ref, () => ({\n insertText: (text) => {\n const el = box.current;\n if (!el) return;\n const current = latest.current;\n // A second insert before the first has rendered goes after the first, not at the\n // textarea's not-yet-moved caret. Otherwise the textarea's selection, which may\n // be past the end of a controlled value the host has just shortened: clamp it.\n const pending = caret.current;\n const start = Math.min(pending ?? el.selectionStart ?? current.length, current.length);\n const end = pending ?? Math.max(start, Math.min(el.selectionEnd ?? start, current.length));\n caret.current = start + text.length;\n setDraft(current.slice(0, start) + text + current.slice(end));\n },\n focus: () => box.current?.focus(),\n }));\n // The server snapshot is \"Ctrl\"; the client corrects it after hydration.\n const modifier = useSyncExternalStore(\n noSubscribe,\n () => (isApple() ? \"⌘\" : \"Ctrl\"),\n () => \"Ctrl\",\n );\n\n // The kit's one presence rule (DUP-11): `\"\"` is no reason either, so it keeps the box.\n if (hasContent(disabledReason)) {\n return (\n <p {...rootAttributes} className={cn(\"text-xs text-muted\", className)}>\n {disabledReason}\n </p>\n );\n }\n\n // Longer than `maxLength` only through `insertText` or a controlled value (typing\n // stops at it): the server would refuse it, so it does not go.\n const tooLong = maxLength !== undefined && draft.length > maxLength;\n const canSend = (canSendProp ?? draft.trim().length > 0) && !pending && !tooLong && !lock.locked;\n const send = () => {\n if (!canSend) return;\n const sentDraft = draft;\n const sentFile = file;\n Promise.resolve(onSend(draft.trim(), file))\n .then(() => {\n if (latest.current === sentDraft) setDraft(\"\");\n setFile((current) => (current === sentFile ? null : current));\n })\n .catch(() => {});\n };\n\n const config = attachment === true ? {} : attachment || null;\n // The slot is handed the ref OBJECT, for a field's `pasteFrom`, which reads `.current`\n // in an effect once the root is attached — nothing reads it during this render (see\n // FeedbackComposerSlotContext.root).\n const slot =\n typeof attachmentSlot === \"function\"\n ? // eslint-disable-next-line react-hooks/refs -- handed on for an effect, not read here\n attachmentSlot({ root, pending })\n : attachmentSlot;\n\n return (\n <div {...rootAttributes} ref={root} className={cn(\"space-y-2\", className)}>\n <Textarea\n rows={rows}\n dir=\"auto\"\n aria-label={labels.field}\n // Textarea puts the counter's description after this one, so under \"sm\" the box\n // reads \"Enter to send… 12 of 4000 characters\".\n aria-describedby={size === \"sm\" ? hintId : undefined}\n maxLength={maxLength}\n // Passed only when given: Textarea keeps a wrapper for a `showCount` it was\n // handed at all, and a composer without one keeps the DOM it had.\n {...(showCount !== undefined ? { showCount } : null)}\n countLabels={countLabels}\n ref={box}\n placeholder={placeholder ?? labels.placeholder}\n value={draft}\n onChange={(event) => setDraft(event.target.value)}\n onKeyDown={(event) => {\n if (event.key !== \"Enter\") return;\n const mod = event.ctrlKey || event.metaKey;\n // Under \"enter\": plain Enter sends, Shift+Enter falls through to the\n // textarea's new line, and an Enter that ends an IME composition is the\n // IME's (keyCode 229 is how Safari reports it after the composition ended).\n const chat =\n sendOn === \"enter\" &&\n !event.shiftKey &&\n !event.altKey &&\n !event.nativeEvent.isComposing &&\n event.keyCode !== 229;\n if (mod || chat) {\n event.preventDefault();\n send();\n }\n }}\n />\n {/* The `data-chat-composer-*` marks are for a host that lines its slot up with the\n send button — FeedbackReplyComposer's status Select (#417). */}\n <div data-chat-composer-actions=\"\" className=\"flex flex-wrap items-end justify-between gap-2\">\n {config || slot != null ? (\n <div className=\"flex min-w-0 flex-wrap items-end gap-2\">\n {config && (\n <FeedbackAttachmentField\n value={file}\n onChange={setFile}\n labels={config.labels}\n accept={config.accept}\n maxBytes={config.maxBytes}\n onError={config.onError}\n onCaptureScreenshot={config.onCaptureScreenshot}\n buttonVariant={config.buttonVariant}\n buttonSize={config.buttonSize}\n // The box is this field's sibling; a paste in it bubbles to `root`.\n pasteFrom={root}\n />\n )}\n {slot}\n </div>\n ) : (\n <span />\n )}\n <div className=\"ms-auto flex items-center gap-2\">\n <span\n id={hintId}\n data-chat-composer-hint=\"\"\n className={size === \"sm\" ? \"sr-only\" : \"text-xs text-placeholder\"}\n >\n {sendOn === \"enter\" ? labels.sendHintEnter : labels.sendHint(modifier)}\n </span>\n <Button\n data-chat-composer-send=\"\"\n onClick={send}\n disabled={!canSend}\n commit={commit}\n aria-busy={pending || undefined}\n size={size === \"sm\" ? \"sm\" : undefined}\n >\n {pending ? (\n <Spinner label={null} className=\"size-4\" />\n ) : (\n <Send className=\"size-4 rtl:-scale-x-100\" aria-hidden />\n )}\n {labels.send}\n </Button>\n </div>\n </div>\n </div>\n );\n}\n\n/** The `data-*` entries of a rest-props object, and nothing else: whatever a caller\n * spread in that the composer does not know is not the root's to receive. */\nfunction dataAttributes(props: object): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(props)) if (key.startsWith(\"data-\")) out[key] = value;\n return out;\n}\n\n/** {@link FeedbackComposerProps}, for {@link ChatComposer}. */\nexport type ChatComposerProps = FeedbackComposerProps;\n/** {@link FeedbackComposerHandle}, for {@link ChatComposer}. */\nexport type ChatComposerHandle = FeedbackComposerHandle;\n/** {@link FeedbackComposerLabels}, for {@link ChatComposer} — still the `feedbackComposer`\n * namespace of the provider. */\nexport type ChatComposerLabels = FeedbackComposerLabels;\n/** {@link FeedbackComposerSlotContext}, for {@link ChatComposer}'s `attachmentSlot`. */\nexport type ChatComposerSlotContext = FeedbackComposerSlotContext;\n"],"mappings":";AAoNW,SAwIP,UAxIO,KAgDC,YAhDD;AApNX,SAAS,WAAW,OAAO,qBAAqB,iBAAiB,QAAQ,UAAU,4BAA4B;AAE/G,SAAS,WAAW,UAAU,WAAW,YAAY;AACrD,SAAS,UAAU;AACnB,SAAS,YAAY,0BAA0B;AAC/C,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AACvB,SAAS,kBAAkB;AAC3B,SAAS,eAAe;AACxB,SAAS,gBAAgB;AAEzB,SAAS,gBAAgB;AACzB,SAAS,eAAe;AACxB,SAAS,oBAAoB;AAE7B,SAAS,kBAAkB,cAAc,oBAAwC;AACjF,SAAS,+BAA+B;AAIxC,SAAS,kCAAkC,sCAAsC;AA2K1E,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA,SAAS;AAAA,EACT;AAAA,EACA,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,QAAQ;AAAA,EACR;AACF,GAAwB;AACtB,QAAM,SAAS,aAAa,kBAAkB,gCAAgC,UAAU;AACxF,QAAM,SAAS,aAAa,UAAU;AACtC,QAAM,OAAO,iBAAiB;AAC9B,QAAM,OAAO,SAAS,KAAK;AAC3B,QAAM,QAAQ,eAAe,QAAQ,MAAS;AAC9C,QAAM,YAAY,QAAQ,SAAY,QAAQ,CAAC;AAE/C,MAAI,WAAW,SAAS,WAAW,GAAG;AACpC,WAAO,oB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AAG,KAAI,GAAG,IAAI;AAC1F,SAAO;AACT;","names":["index","pending"]}
|
|
1
|
+
{"version":3,"sources":["../../src/feedback/feedback-thread.tsx"],"sourcesContent":["import { useEffect, useId, useImperativeHandle, useLayoutEffect, useRef, useState, useSyncExternalStore } from \"react\";\nimport type { ReactNode, Ref, RefObject } from \"react\";\nimport { ImageIcon, ImageOff, Paperclip, Send } from \"lucide-react\";\nimport { cn } from \"../lib/cn\";\nimport { formatDate, formatRelativeTime } from \"../lib/format\";\nimport { upperFirst } from \"../lib/text-case\";\nimport { hasContent } from \"../lib/presence\";\nimport { Button } from \"../components/button\";\nimport { EmptyState } from \"../components/empty-state\";\nimport { Spinner } from \"../components/spinner\";\nimport { Textarea } from \"../components/textarea\";\nimport type { CharacterCountLabels } from \"../components/field-base\";\nimport { Skeleton } from \"../components/skeleton\";\nimport { Tooltip } from \"../components/tooltip\";\nimport { useWriteLock } from \"../components/write-lock\";\nimport type { CommitScope } from \"../components/write-lock\";\nimport { useKitFileLabels, useKitLabels, useKitLocale, type LabelOverride } from \"../i18n/kit-labels\";\nimport { FeedbackAttachmentField } from \"./feedback-attachment\";\nimport type { FeedbackAttachmentFieldSingleProps } from \"./feedback-attachment\";\nimport type { FeedbackNoteAttachment } from \"./feedback-inbox\";\nimport type { FeedbackAttachmentLabels } from \"./feedback-dialog\";\nimport { DEFAULT_FEEDBACK_COMPOSER_LABELS, DEFAULT_FEEDBACK_THREAD_LABELS } from \"./feedback-thread-labels\";\n\n/**\n * The conversation under a report: who said what, when, with what attached — and the\n * box to answer in.\n *\n * Both apps had written it by hand. kastlan's feedback page grew a comment list of\n * bordered boxes with `slate-*` literals (feedback-page.tsx, \"keksdose left this\n * unbuilt\"), and keksdose built the same thing a second time for support\n * (support-thread.tsx) with sides, bubbles and a composer that clears only what it\n * sent. This is that second one, generalised: the kit owns the look and the\n * behaviour, the app owns the data, the upload and every word it does not share.\n *\n * **Own vs other** is the caller's per message (`own`), not a comparison the kit makes\n * against a user id: whose message sits at the END side depends on who is reading,\n * and only the app knows that (keksdose's support thread labelled a member's question\n * \"Du\" in the admin panel the first time round, by reading the wrong field).\n *\n * **Redaction.** A thread is somebody's words about their own data — exactly what a\n * host's demo / screen-share mode blurs. Bodies, authors and attachments carry\n * `data-private` (the attribute `Tooltip redact` and `StatTile sensitive` use) unless\n * `redact={false}`.\n *\n * **RTL.** Sides are logical — `justify-end` is the reading end, and the bubble's\n * tucked corner is `rounded-ee` / `rounded-es` — and each body is `dir=\"auto\"`, so a\n * Hebrew reply in an English thread (or the reverse) lays out as its own language.\n *\n * **A chat, too** (keksdose G4/G5). keksdose's support chat is the same conversation\n * read the chat way: status lines between the messages (\"Closed automatically\",\n * \"Reopened\"), a day line where the date changes, clock times under it, Enter to send\n * and several files uploaded ahead of the send. Each of those is an opt-in here\n * (`kind: \"event\"`, `daySeparators`, `timeFormat=\"clock\"`, `sendOn=\"enter\"`,\n * `attachmentSlot` + `canSend`), so the feedback thread's defaults stay as they were.\n */\n\n/* ── Labels ───────────────────────────────────────────────────────────────── */\n\n/** The `feedbackThread` namespace of `<UiKitProvider labels>`. */\nexport interface FeedbackThreadLabels {\n /** Accessible name of the message list. */\n thread: string;\n empty: string;\n loading: string;\n /** Author line of an `own` message that has no `author` of its own. */\n you: string;\n /** The badge beside a `staff` author. */\n staff: string;\n /** Accessible name of a message's attachment list. */\n attachments: string;\n}\n\n// Defined in ./feedback-thread-labels, which holds no component code (0.34, KS U8).\nexport { DEFAULT_FEEDBACK_THREAD_LABELS };\n\n/** The `feedbackComposer` namespace of `<UiKitProvider labels>`. The attach buttons'\n * words are `feedbackAttachment`'s, shared with the dialog and the note editor. */\nexport interface ChatComposerLabels {\n /** Accessible name of the text box. */\n field: string;\n placeholder: string;\n send: string;\n /** The shortcut line, given the platform's modifier (\"Ctrl\" or \"⌘\"). */\n sendHint: (modifier: string) => string;\n /** The shortcut line under `sendOn=\"enter\"` (keksdose G5): Enter sends, so say how a\n * new line is made. */\n sendHintEnter: string;\n}\n\n// Defined in ./feedback-thread-labels, which holds no component code (0.34, KS U8).\nexport { DEFAULT_FEEDBACK_COMPOSER_LABELS };\n\n/* ── Thread ───────────────────────────────────────────────────────────────── */\n\nexport interface FeedbackThreadAttachment {\n id?: string | number;\n name: string;\n /** Where to open it. Left out, the attachment is listed by name only. */\n url?: string;\n /** MIME type; an `image/*` with a `url` is shown as a thumbnail. */\n type?: string;\n /** Bytes, shown beside a non-image. */\n size?: number;\n}\n\nexport interface FeedbackThreadMessage {\n /** Leave out, or `\"message\"`. `\"event\"` is a {@link FeedbackThreadEvent}. */\n kind?: \"message\";\n id: string | number;\n /** Who wrote it. Left out on an `own` message, it reads \"You\". */\n author?: ReactNode;\n /** A `Date`, an ISO string or epoch ms. */\n createdAt: Date | string | number;\n body: string;\n attachments?: readonly FeedbackThreadAttachment[];\n /** Written by whoever is reading: sits at the end side, in the brand tint. */\n own?: boolean;\n /** Written by the team rather than a user: gets the \"Staff\" badge. */\n staff?: boolean;\n /** 0.38: beside the author and time — a reply's \"→ Done\" status chip. Not\n * `data-private`: it is the app's, not somebody's words. */\n badge?: ReactNode;\n /** 0.38: the body struck through and muted — a hidden comment as its admin sees it. */\n struck?: boolean;\n /** 0.38: under the body — a note (\"Hidden by an admin\") and the message's actions\n * (Hide, Delete). Not `data-private`. */\n footer?: ReactNode;\n}\n\n/**\n * A line in the thread that nobody wrote — \"Closed automatically\", \"Marked as\n * resolved\", \"Reopened\" — drawn centred and muted with its time, no author, no side,\n * no bubble.\n *\n * keksdose G4: its support chat interleaves these with the messages, and as a message\n * they came out as a bubble from nobody at the start side, which reads as the member\n * having said \"resolved\". Word it for the READER, as with `own`: the app knows whether\n * \"you reopened it\" or \"Anna reopened it\" is true for the person looking.\n *\n * The text is the app's, not somebody's words about their data, so it is NOT tagged\n * `data-private`; one that names a person can wrap the name in its own\n * `<span data-private>` (`body` is a node for that reason).\n */\nexport interface FeedbackThreadEvent {\n kind: \"event\";\n id: string | number;\n /** A `Date`, an ISO string or epoch ms. */\n createdAt: Date | string | number;\n body: ReactNode;\n}\n\n/** One row of a {@link FeedbackThread}: a message, or an event line between them. */\nexport type FeedbackThreadItem = FeedbackThreadMessage | FeedbackThreadEvent;\n\nexport interface FeedbackThreadProps {\n /** Oldest first. Event lines ({@link FeedbackThreadEvent}) sit among the messages. */\n messages: readonly FeedbackThreadItem[];\n loading?: boolean;\n /** Replaces the default \"No comments yet\". */\n empty?: ReactNode;\n /**\n * Draw one attachment yourself — for files behind auth, which a plain `<img src>`\n * cannot fetch (kastlan's `AuthedImage`), or a lightbox. The default is a thumbnail\n * link for an image with a `url`, a file link otherwise.\n */\n renderAttachment?: (attachment: FeedbackThreadAttachment, message: FeedbackThreadMessage) => ReactNode;\n /** Tag bodies, authors and attachments `data-private`. Default true. */\n redact?: boolean;\n /**\n * How a row's time reads. `\"relative\"` (default): \"5 minutes ago\", a date past six\n * days — right for a report's comments, read days apart. `\"clock\"`: the time of day\n * in the locale (\"14:05\", \"2:05 PM\") — the chat look, keksdose G4; pair it with\n * `daySeparators`, which say which day that clock time is on. Either way the full\n * date and time is in the Tooltip.\n */\n timeFormat?: \"relative\" | \"clock\";\n /**\n * A centred day line before the first row and wherever the next row is on another\n * calendar day (the device's zone): \"Today\", \"Yesterday\", else the date — keksdose\n * G4. \"Today\" / \"Yesterday\" are `Intl.RelativeTimeFormat`'s own words in the kit\n * locale, so there is no label to translate. Default false.\n */\n daySeparators?: boolean;\n /** \"Now\" for the relative times and the day lines — pin it in tests and stories.\n * Default: the clock. */\n now?: Date | number;\n /** Overrides the provider's locale for the times. */\n locale?: string;\n labels?: LabelOverride<FeedbackThreadLabels>;\n className?: string;\n}\n\nexport function FeedbackThread({\n messages,\n loading = false,\n empty,\n renderAttachment,\n redact = true,\n now,\n locale: localeProp,\n timeFormat = \"relative\",\n daySeparators = false,\n labels: labelsProp,\n className,\n}: FeedbackThreadProps) {\n const labels = useKitLabels(\"feedbackThread\", DEFAULT_FEEDBACK_THREAD_LABELS, labelsProp);\n const locale = useKitLocale(localeProp);\n const file = useKitFileLabels();\n const priv = redact ? \"\" : undefined;\n const clock = useMinuteClock(now === undefined);\n const reference = now === undefined ? clock : +now;\n\n if (loading && messages.length === 0) {\n return <Skeleton lines={3} label={labels.loading} className={className} />;\n }\n if (messages.length === 0) {\n return (\n <EmptyState variant=\"inline\" size=\"sm\" title={empty ?? labels.empty} className={cn(\"justify-start\", className)} />\n );\n }\n\n // Per row, the calendar day of the last readable date up to it — what a day line\n // compares against.\n const days: (number | null)[] = [];\n for (const message of messages) {\n const date = toDate(message.createdAt);\n days.push(date ? dayNumber(date) : (days.at(-1) ?? null));\n }\n\n return (\n <ol aria-label={labels.thread} aria-busy={loading || undefined} className={cn(\"space-y-3\", className)}>\n {messages.flatMap((message, index) => {\n const date = toDate(message.createdAt);\n const time = date && (\n // The kit's Tooltip, not a native title: one tooltip look app-wide\n // (keksdose F0 / dev#523).\n <Tooltip label={new Intl.DateTimeFormat(locale, { dateStyle: \"full\", timeStyle: \"short\" }).format(date)}>\n <time dateTime={date.toISOString()} className=\"tabular-nums\">\n {timeFormat === \"clock\"\n ? formatDate(date, \"time\", { locale })\n : formatRelativeTime(date, {\n now: reference,\n locale,\n // Past the kit's day steps it is a date: \"2 weeks ago\" makes\n // the reader do arithmetic the date already did.\n absoluteAfterDays: 6.5,\n })}\n </time>\n </Tooltip>\n );\n const rows: ReactNode[] = [];\n const day = date && dayNumber(date);\n // Against the last row WITH a readable date: an unparseable one neither starts\n // a day nor hides the next change.\n if (daySeparators && date && day !== days[index - 1]) {\n rows.push(<DaySeparator key={`day-${message.id}`} date={date} now={reference} locale={locale} />);\n }\n if (message.kind === \"event\") {\n // A list item like the rest, so \"Reopened\" is read in its place, but not an\n // article: an article is somebody's post, and this has no author.\n rows.push(\n <li\n key={message.id}\n data-event=\"\"\n className=\"flex flex-wrap items-baseline justify-center gap-x-2 px-4 text-center text-xs text-muted\"\n >\n <span>{message.body}</span>\n {time && <span className=\"text-caption\">{time}</span>}\n </li>,\n );\n return rows;\n }\n const author = message.author ?? (message.own ? labels.you : null);\n const attachments = message.attachments ?? [];\n rows.push(\n <li\n key={message.id}\n className={cn(\"flex\", message.own ? \"justify-end\" : \"justify-start\")}\n data-own={message.own ? \"\" : undefined}\n >\n <article\n className={cn(\n \"max-w-[85%] min-w-0 rounded-lg px-3 py-2 text-sm\",\n message.own ? \"rounded-ee-sm bg-brand-soft\" : \"rounded-es-sm bg-surface-2\",\n )}\n >\n <header className=\"mb-0.5 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-caption text-muted\">\n {author != null && (\n <span data-private={priv} className=\"font-medium text-secondary\">\n {author}\n </span>\n )}\n {message.staff && (\n <span className=\"rounded border border-subtle bg-surface px-1 text-micro font-medium uppercase tracking-wide text-secondary\">\n {labels.staff}\n </span>\n )}\n {message.badge}\n {time}\n </header>\n {message.body && (\n <p\n data-private={priv}\n dir=\"auto\"\n className={cn(\n \"whitespace-pre-wrap break-words text-start\",\n message.struck ? \"text-muted line-through\" : \"text-primary\",\n )}\n >\n {message.body}\n </p>\n )}\n {attachments.length > 0 && (\n <ul aria-label={labels.attachments} data-private={priv} className=\"mt-2 flex flex-wrap gap-2\">\n {attachments.map((attachment, index) => (\n <li key={attachment.id ?? `${index}-${attachment.name}`} className=\"min-w-0\">\n {renderAttachment ? (\n renderAttachment(attachment, message)\n ) : (\n <DefaultAttachment attachment={attachment} size={file.size} />\n )}\n </li>\n ))}\n </ul>\n )}\n {message.footer != null && (\n <div className=\"mt-1.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-caption text-muted\">\n {message.footer}\n </div>\n )}\n </article>\n </li>,\n );\n return rows;\n })}\n </ol>\n );\n}\n\nfunction DefaultAttachment({\n attachment,\n size,\n}: {\n attachment: FeedbackThreadAttachment;\n size: (bytes: number) => string;\n}) {\n const { name, url, type } = attachment;\n if (url && type?.startsWith(\"image/\")) return <ImageThumbnail url={url} name={name} />;\n const content = (\n <>\n <Paperclip className=\"size-3.5 shrink-0\" aria-hidden />\n {/* A file name wraps from Large up, as the attachments of the composer do (text\n size §10.17; round 0.34 T1: the sweep read \"export-20…\"). */}\n <span className=\"min-w-0 truncate-until-large\">{name}</span>\n {attachment.size !== undefined && <span className=\"shrink-0 text-muted\">{size(attachment.size)}</span>}\n </>\n );\n const chip =\n \"inline-flex max-w-full items-center gap-1 rounded border border-subtle bg-surface px-2 py-1 text-xs text-secondary\";\n return url ? (\n <a href={url} target=\"_blank\" rel=\"noopener noreferrer\" className={cn(chip, \"hover:bg-hover\")}>\n {content}\n </a>\n ) : (\n <span className={chip}>{content}</span>\n );\n}\n\n/** An image attachment's thumbnail. The box is drawn before the picture arrives —\n * `loading=\"lazy\"` leaves it empty until it nears the viewport, and a URL that has\n * expired never fills it — and an empty bordered square read as a broken layout, not\n * as a picture. So the box carries an image glyph underneath until the picture\n * covers it, and swaps it for a broken-image glyph when the load fails. */\nfunction ImageThumbnail({ url, name }: { url: string; name: string }) {\n // Keyed on the URL, so a message whose attachment is replaced tries the new one.\n const [failedUrl, setFailedUrl] = useState<string | null>(null);\n const failed = failedUrl === url;\n const Glyph = failed ? ImageOff : ImageIcon;\n return (\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"relative block h-20 w-20 overflow-hidden rounded border border-subtle bg-surface-2\"\n >\n <Glyph aria-hidden className=\"absolute inset-0 m-auto size-6 text-muted\" />\n {!failed && (\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- load/error are resource events, not interactions\n <img\n src={url}\n alt={name}\n loading=\"lazy\"\n onError={() => setFailedUrl(url)}\n className=\"relative h-full w-full object-cover\"\n />\n )}\n {/* The <img> and its alt are gone once it failed; the link still needs a name. */}\n {failed && <span className=\"sr-only\">{name}</span>}\n </a>\n );\n}\n\n/** The time, refreshed once a minute while `active`, so \"2 minutes ago\" does not stay\n * \"just now\" on a page left open. Read in state rather than in render, which must be\n * pure. */\nfunction useMinuteClock(active: boolean): number {\n const [time, setTime] = useState(() => Date.now());\n useEffect(() => {\n if (!active) return;\n const id = setInterval(() => setTime(Date.now()), 60_000);\n return () => clearInterval(id);\n }, [active]);\n return time;\n}\n\n/** The local calendar day as one number (20260926), for \"same day?\" and keys. */\nfunction dayNumber(date: Date): number {\n return date.getFullYear() * 10_000 + (date.getMonth() + 1) * 100 + date.getDate();\n}\n\n/**\n * The day line of `daySeparators` (keksdose G4): \"Today\" / \"Yesterday\" from\n * `Intl.RelativeTimeFormat` (`numeric: \"auto\"`) — the locale's own words, capitalised\n * for a line that stands alone (\"heute\" → \"Heute\"; a script without case is left as\n * is) — else the weekday and date, with the year only when it is not this one.\n *\n * Counted in calendar days, not 24-hour spans: 23:50 yesterday is \"Yesterday\" at\n * 00:10 today.\n */\nfunction DaySeparator({ date, now, locale }: { date: Date; now: number; locale: string | undefined }) {\n const today = new Date(now);\n const days = Math.round(\n (Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) -\n Date.UTC(today.getFullYear(), today.getMonth(), today.getDate())) /\n 86_400_000,\n );\n let label: string;\n if (days === 0 || days === -1) {\n const word = new Intl.RelativeTimeFormat(locale, { numeric: \"auto\" }).format(days + 0, \"day\");\n label = upperFirst(word, locale);\n } else {\n label = formatDate(\n date,\n {\n weekday: \"long\",\n day: \"numeric\",\n month: \"long\",\n ...(date.getFullYear() === today.getFullYear() ? null : { year: \"numeric\" }),\n },\n { locale },\n );\n }\n const y = String(date.getFullYear()).padStart(4, \"0\");\n const m = String(date.getMonth() + 1).padStart(2, \"0\");\n const d = String(date.getDate()).padStart(2, \"0\");\n return (\n <li data-day-separator=\"\" className=\"flex items-center gap-3 py-1 text-xs text-muted\">\n <span aria-hidden className=\"h-px flex-1 bg-[var(--border)]\" />\n <time dateTime={`${y}-${m}-${d}`} className=\"font-medium\">\n {label}\n </time>\n <span aria-hidden className=\"h-px flex-1 bg-[var(--border)]\" />\n </li>\n );\n}\n\nfunction toDate(value: Date | string | number): Date | null {\n const date = value instanceof Date ? value : new Date(value);\n return Number.isNaN(date.getTime()) ? null : date;\n}\n\n/* ── Composer ─────────────────────────────────────────────────────────────── */\n\n/** What the composer's attach control takes — {@link FeedbackNoteAttachment} with the\n * labels optional, since the field reads `feedbackAttachment` from the provider, and\n * `onError` the field's own (0.23.0): it is handed the refused file and the limit too\n * (`FeedbackAttachmentErrorInfo`), and a `(kind) => …` handler still fits. Since\n * 0.24.0 also the field's `buttonVariant` / `buttonSize`, for a composer whose row\n * wants smaller or quieter attach buttons than the bordered `md` default. */\nexport type FeedbackComposerAttachment = Omit<FeedbackNoteAttachment, \"labels\" | \"onError\"> & {\n labels?: LabelOverride<FeedbackAttachmentLabels>;\n onError?: FeedbackAttachmentFieldSingleProps[\"onError\"];\n} & Pick<FeedbackAttachmentFieldSingleProps, \"buttonVariant\" | \"buttonSize\">;\n\n/**\n * What a render-prop {@link ChatComposerProps.attachmentSlot} is handed (0.24.0,\n * keksdose).\n *\n * keksdose's support chat put `<FeedbackAttachmentField refs>` in the slot and a\n * screenshot pasted into the reply box never reached it: the box is the field's\n * sibling, so the paste bubbles to their common parent — the composer's root — and the\n * field hears it only through `pasteFrom`, which needs that root. The composer kept it\n * to itself, so keksdose wrapped the whole composer in a ref'd `<div>` of its own just\n * to have an element to hand over.\n */\nexport interface ChatComposerSlotContext {\n /**\n * The composer's root, round the text box and this slot — the field's `pasteFrom`,\n * as it is: `pasteFrom={slot.root}`.\n *\n * A ref, not the element, because `pasteFrom` is one: the field reads `.current` in\n * an effect, and the slot renders INSIDE this root, so the two are committed together\n * and React attaches the root before any effect of the slot's runs — the first paste\n * after the first paint already lands. The element itself would be `null` on the\n * first render (it does not exist yet) and could only arrive by a second render\n * through state; the ref is the same object every render, so the field's listener is\n * added once and never re-added.\n *\n * With the built-in `attachment` on as well, it listens on this root too: hand the\n * root to one field only, or an image pasted once is attached twice.\n */\n root: RefObject<HTMLElement | null>;\n /** The composer's `pending` — a send is in flight. For the field's `disabled`\n * (keksdose G5b): the message carries the attachments as they were at the press. */\n pending: boolean;\n}\n\nexport interface ChatComposerProps {\n /**\n * Send the comment. Return the promise: the box clears when it RESOLVES, and only of\n * what was sent — text typed while it was in flight stays. A rejection keeps\n * everything for a retry (surface the error yourself; the composer stays quiet).\n *\n * `attachment` is the built-in field's one picture. Files the host uploaded ahead\n * (`attachmentSlot`) are the host's state, read by the host here — and `body` may be\n * `\"\"` when `canSend` let an attachments-only message go.\n */\n onSend: (body: string, attachment: File | null) => void | Promise<unknown>;\n /** The send is in flight: a spinner on the button and no second send. */\n pending?: boolean;\n /** Offer one picture with the comment (file, paste or `onCaptureScreenshot`).\n * `true` for the defaults. Left out, the composer is text only. */\n attachment?: boolean | FeedbackComposerAttachment;\n /**\n * The host's own attach control, in the row with Send where the built-in field sits\n * (after it, if both are on) — keksdose G5: its support chat uploads up to N files\n * AHEAD of the send and sends their refs, which one `File` in `onSend` cannot carry.\n * The slot is the host's picker plus the chips of what is uploaded; the upload, the\n * refs and clearing them once `onSend` resolves stay with the host. Pair it with\n * `canSend`.\n *\n * A node, or (0.24.0) a function of {@link ChatComposerSlotContext} that returns\n * one — for a field that wants the composer's root as its `pasteFrom`, so a\n * screenshot pasted into the box reaches it, and `pending` for its `disabled`:\n *\n * ```tsx\n * attachmentSlot={({ root, pending }) => (\n * <FeedbackAttachmentField refs pasteFrom={root} disabled={pending} … />\n * )}\n * ```\n *\n * Called once per render of the composer, and not at all while `disabledReason`\n * stands in for it.\n */\n attachmentSlot?: ReactNode | ((slot: ChatComposerSlotContext) => ReactNode);\n /**\n * Whether Send is enabled, over the composer's own rule (some text in the box) —\n * for state the composer cannot see, i.e. `attachmentSlot`'s (keksdose G5): `true`\n * with files ready makes an empty draft sendable (`onSend(\"\", null)`), `false` while\n * an upload is still running holds even a written reply back. Left out, the text\n * decides. `pending` blocks a send either way, as does a draft past `maxLength`.\n */\n canSend?: boolean;\n /**\n * Which key sends. `\"mod-enter\"` (default): Ctrl/⌘+Enter, the report dialog's and\n * note editor's shortcut, with plain Enter a new line — feedback is written in\n * paragraphs. `\"enter\"`: the chat way (keksdose G5) — Enter sends, Shift+Enter is a\n * new line, Ctrl/⌘+Enter still sends; an Enter that confirms an IME composition\n * (Japanese, Chinese input) is the IME's, never a send.\n */\n sendOn?: \"mod-enter\" | \"enter\";\n /** Rendered INSTEAD of the composer — the thread is closed, or read-only for this\n * reader. */\n disabledReason?: ReactNode;\n /**\n * Send COMMITS (0.33.1, kastlan's assistant): under a locked {@link WriteLockProvider}\n * Send is disabled the `disabledReason` way — focusable, the lock's reason in its\n * tooltip and description, as on {@link Button}'s `commit` — and neither Enter nor\n * Ctrl/⌘+Enter sends. The box stays editable and the draft stays: nothing in it\n * reaches the server until Send, and the lock may lift. No provider, or an unlocked\n * one: no effect. A {@link CommitScope}: kastlan's assistant answers under the demo\n * and not under a lapsed plan (its backend's 402), so it passes\n * `commit={{ except: [\"demo\"] }}` where it read `useWriteLock` and fed `canSend` and a\n * reason by hand. Not the prop above: that one replaces the box, this one keeps it.\n */\n commit?: CommitScope;\n rows?: number;\n /**\n * The longest draft the box takes, in UTF-16 code units as the browser counts — the\n * server's limit, so a reply too long for it is cut off while it is typed rather than\n * refused by a 422 after the press (keksdose G6: its support replies are capped at\n * 4,000 on the server, and its other text fields already count against that with\n * Textarea's `maxLength` + `showCount` since 0.22; the reply box, a composer, could\n * not). The box's own `maxLength`, so typing and pasting stop at it.\n *\n * {@link ChatComposerHandle.insertText} is not stopped by it — the browser limits\n * typing, not a script — and a canned reply is not cut mid-sentence to fit. A draft\n * past the limit therefore holds Send back (whatever `canSend` says, as `pending`\n * does) until it is trimmed; with `showCount` the counter, red at the limit, says by\n * how much.\n */\n maxLength?: number;\n /**\n * A live \"12/4000\" under the box, with `maxLength` — Textarea's `showCount`, the same\n * counter (keksdose G6): the count is part of the box's description, read with it on\n * focus, and a polite live region speaks only on entering the last stretch and at the\n * limit, never per keystroke. Under `size=\"sm\"` the hidden send hint stays the box's\n * description too, before the count. Ignored without `maxLength`.\n */\n showCount?: boolean;\n /** The counter's words — the `characterCount` namespace, as on Textarea. */\n countLabels?: Partial<CharacterCountLabels>;\n /**\n * The box's hint, over the `placeholder` label — keksdose F9: an admin answering a\n * support ticket is asked something else (\"Reply to Anna…\") than a member adding to\n * their own report, and one provider-wide label cannot say both.\n */\n placeholder?: string;\n /**\n * The draft, controlled — for a host that keeps it itself (saves it per ticket,\n * prefills a template). Left out, the composer keeps its own. Either way a send\n * that resolves clears only what was sent: controlled, that is an\n * `onValueChange(\"\")` the host receives like any keystroke, and only if the draft\n * is still the one that went out.\n */\n value?: string;\n /** Every change to the draft — typing, {@link ChatComposerHandle.insertText}, the\n * clear after a send. Required to change a controlled `value`. */\n onValueChange?: (value: string) => void;\n /** {@link ChatComposerHandle}: put text into the draft from outside (canned-reply\n * chips) or focus the box. */\n ref?: Ref<ChatComposerHandle>;\n labels?: LabelOverride<ChatComposerLabels>;\n className?: string;\n /**\n * `\"sm\"` for a narrow host — keksdose's assistant launcher, a small floating panel\n * (0.22): a small Send button, and the send hint (\"Enter to send, Shift + Enter for a\n * new line\") hidden from view but kept as the box's description, so a keyboard or\n * screen-reader user still learns the shortcut. Default `\"md\"`.\n */\n size?: \"md\" | \"sm\";\n /**\n * On the composer's root — the box, or the `disabledReason` line in its place —\n * with any `data-*` attribute beside it (keksdose K17). keksdose's assistant tour\n * points at the chat box with `[data-tour=\"assistant-ask\"]`, and a composer that\n * dropped every attribute it was not told about left the anchor nowhere: the\n * assistant kept its hand-built box rather than lose the tour step.\n */\n id?: string;\n /** `data-*` attributes for the root, as `id` — a tour anchor, a test id. */\n [dataAttribute: `data-${string}`]: string | number | boolean | undefined;\n}\n\n/**\n * What a {@link ChatComposer} `ref` holds.\n *\n * keksdose F9: the support admin answers the same five questions all day and wants\n * chips above the box (\"Thanks, fixed in the next release\") that drop their text in\n * where the caret is. A controlled `value` alone cannot do that well — the host sees\n * the string, not the caret, so it could only append — so the composer, which owns\n * the textarea, does the splice.\n */\nexport interface ChatComposerHandle {\n /**\n * Insert `text` at the caret, replacing any selection (the caret the box last had:\n * a click on a chip blurs it, and the selection survives the blur), then focus the\n * box with the caret after the inserted text so the reply can go on. Nothing is\n * added around it — put a space or a newline in `text` if the reply needs one. A\n * no-op while `disabledReason` replaces the box.\n */\n insertText: (text: string) => void;\n focus: () => void;\n}\n\nconst noSubscribe = () => () => {};\nconst isApple = () =>\n typeof navigator !== \"undefined\" && /Mac|iPhone|iPad|iPod/i.test(navigator.platform || navigator.userAgent);\n\n/**\n * The answer box under a {@link FeedbackThread}: a textarea, an optional picture,\n * and Send — Ctrl/⌘+Enter sends, the shortcut the report dialog and the note editor\n * use, so the habit carries across the feature. Plain Enter is a new line: feedback is\n * written in paragraphs, unlike a chat — which `sendOn=\"enter\"` is for (keksdose G5).\n *\n * Named for what it is since 0.22 (keksdose K17): the component was never\n * feedback-specific — a textarea, an optional picture or a host's upload slot, Send,\n * `sendOn=\"enter\"` for the chat way — and keksdose's assistant and support chat are\n * chats, not reports. `FeedbackComposer`, its old name, was removed in 0.35 (refactor\n * audit 2026-10, API-6d; deprecated in 0.34); its types are `ChatComposer*` too since 0.52\n * (refactor audit 2026-10-30, API-6), the `FeedbackComposer*` names deprecated aliases.\n */\nexport function ChatComposer({\n onSend,\n pending = false,\n attachment,\n attachmentSlot,\n canSend: canSendProp,\n sendOn = \"mod-enter\",\n disabledReason,\n commit,\n rows = 3,\n maxLength,\n showCount,\n countLabels,\n placeholder,\n value,\n onValueChange,\n ref,\n labels: labelsProp,\n className,\n id,\n size = \"md\",\n ...rest\n}: ChatComposerProps) {\n const labels = useKitLabels(\"feedbackComposer\", DEFAULT_FEEDBACK_COMPOSER_LABELS, labelsProp);\n // The lock as Send sees it, with its scope (§12.36). Send's Button reads the same\n // through its own `commit`; this holds the keyboard's send back with it.\n const lock = useWriteLock(commit ?? false);\n const rootAttributes = { id, ...dataAttributes(rest) };\n const hintId = useId();\n const [ownDraft, setOwnDraft] = useState(\"\");\n const controlled = value !== undefined;\n const draft = controlled ? value : ownDraft;\n const [file, setFile] = useState<File | null>(null);\n const root = useRef<HTMLDivElement>(null);\n const box = useRef<HTMLTextAreaElement>(null);\n // The draft as of the last commit. The send's `.then` and `insertText` run after\n // renders their closure did not see — text typed while the send was in flight, a\n // second chip clicked before the first one's render — and must not act on a stale\n // string (for a controlled draft there is no updater function to lean on).\n const latest = useRef(draft);\n useLayoutEffect(() => {\n latest.current = draft;\n });\n // Where the caret goes once an inserted text has rendered.\n const caret = useRef<number | null>(null);\n useLayoutEffect(() => {\n const el = box.current;\n if (caret.current === null || !el) return;\n el.focus();\n el.setSelectionRange(caret.current, caret.current);\n caret.current = null;\n });\n\n const setDraft = (next: string) => {\n latest.current = next;\n if (!controlled) setOwnDraft(next);\n onValueChange?.(next);\n };\n\n useImperativeHandle(ref, () => ({\n insertText: (text) => {\n const el = box.current;\n if (!el) return;\n const current = latest.current;\n // A second insert before the first has rendered goes after the first, not at the\n // textarea's not-yet-moved caret. Otherwise the textarea's selection, which may\n // be past the end of a controlled value the host has just shortened: clamp it.\n const pending = caret.current;\n const start = Math.min(pending ?? el.selectionStart ?? current.length, current.length);\n const end = pending ?? Math.max(start, Math.min(el.selectionEnd ?? start, current.length));\n caret.current = start + text.length;\n setDraft(current.slice(0, start) + text + current.slice(end));\n },\n focus: () => box.current?.focus(),\n }));\n // The server snapshot is \"Ctrl\"; the client corrects it after hydration.\n const modifier = useSyncExternalStore(\n noSubscribe,\n () => (isApple() ? \"⌘\" : \"Ctrl\"),\n () => \"Ctrl\",\n );\n\n // The kit's one presence rule (DUP-11): `\"\"` is no reason either, so it keeps the box.\n if (hasContent(disabledReason)) {\n return (\n <p {...rootAttributes} className={cn(\"text-xs text-muted\", className)}>\n {disabledReason}\n </p>\n );\n }\n\n // Longer than `maxLength` only through `insertText` or a controlled value (typing\n // stops at it): the server would refuse it, so it does not go.\n const tooLong = maxLength !== undefined && draft.length > maxLength;\n const canSend = (canSendProp ?? draft.trim().length > 0) && !pending && !tooLong && !lock.locked;\n const send = () => {\n if (!canSend) return;\n const sentDraft = draft;\n const sentFile = file;\n Promise.resolve(onSend(draft.trim(), file))\n .then(() => {\n if (latest.current === sentDraft) setDraft(\"\");\n setFile((current) => (current === sentFile ? null : current));\n })\n .catch(() => {});\n };\n\n const config = attachment === true ? {} : attachment || null;\n // The slot is handed the ref OBJECT, for a field's `pasteFrom`, which reads `.current`\n // in an effect once the root is attached — nothing reads it during this render (see\n // ChatComposerSlotContext.root).\n const slot =\n typeof attachmentSlot === \"function\"\n ? // eslint-disable-next-line react-hooks/refs -- handed on for an effect, not read here\n attachmentSlot({ root, pending })\n : attachmentSlot;\n\n return (\n <div {...rootAttributes} ref={root} className={cn(\"space-y-2\", className)}>\n <Textarea\n rows={rows}\n dir=\"auto\"\n aria-label={labels.field}\n // Textarea puts the counter's description after this one, so under \"sm\" the box\n // reads \"Enter to send… 12 of 4000 characters\".\n aria-describedby={size === \"sm\" ? hintId : undefined}\n maxLength={maxLength}\n // Passed only when given: Textarea keeps a wrapper for a `showCount` it was\n // handed at all, and a composer without one keeps the DOM it had.\n {...(showCount !== undefined ? { showCount } : null)}\n countLabels={countLabels}\n ref={box}\n placeholder={placeholder ?? labels.placeholder}\n value={draft}\n onChange={(event) => setDraft(event.target.value)}\n onKeyDown={(event) => {\n if (event.key !== \"Enter\") return;\n const mod = event.ctrlKey || event.metaKey;\n // Under \"enter\": plain Enter sends, Shift+Enter falls through to the\n // textarea's new line, and an Enter that ends an IME composition is the\n // IME's (keyCode 229 is how Safari reports it after the composition ended).\n const chat =\n sendOn === \"enter\" &&\n !event.shiftKey &&\n !event.altKey &&\n !event.nativeEvent.isComposing &&\n event.keyCode !== 229;\n if (mod || chat) {\n event.preventDefault();\n send();\n }\n }}\n />\n {/* The `data-chat-composer-*` marks are for a host that lines its slot up with the\n send button — FeedbackReplyComposer's status Select (#417). */}\n <div data-chat-composer-actions=\"\" className=\"flex flex-wrap items-end justify-between gap-2\">\n {config || slot != null ? (\n <div className=\"flex min-w-0 flex-wrap items-end gap-2\">\n {config && (\n <FeedbackAttachmentField\n value={file}\n onChange={setFile}\n labels={config.labels}\n accept={config.accept}\n maxBytes={config.maxBytes}\n onError={config.onError}\n onCaptureScreenshot={config.onCaptureScreenshot}\n buttonVariant={config.buttonVariant}\n buttonSize={config.buttonSize}\n // The box is this field's sibling; a paste in it bubbles to `root`.\n pasteFrom={root}\n />\n )}\n {slot}\n </div>\n ) : (\n <span />\n )}\n <div className=\"ms-auto flex items-center gap-2\">\n <span\n id={hintId}\n data-chat-composer-hint=\"\"\n className={size === \"sm\" ? \"sr-only\" : \"text-xs text-placeholder\"}\n >\n {sendOn === \"enter\" ? labels.sendHintEnter : labels.sendHint(modifier)}\n </span>\n <Button\n data-chat-composer-send=\"\"\n onClick={send}\n disabled={!canSend}\n commit={commit}\n aria-busy={pending || undefined}\n size={size === \"sm\" ? \"sm\" : undefined}\n >\n {pending ? (\n <Spinner label={null} className=\"size-4\" />\n ) : (\n <Send className=\"size-4 rtl:-scale-x-100\" aria-hidden />\n )}\n {labels.send}\n </Button>\n </div>\n </div>\n </div>\n );\n}\n\n/** The `data-*` entries of a rest-props object, and nothing else: whatever a caller\n * spread in that the composer does not know is not the root's to receive. */\nfunction dataAttributes(props: object): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(props)) if (key.startsWith(\"data-\")) out[key] = value;\n return out;\n}\n"],"mappings":";AAqNW,SAwIP,UAxIO,KAgDC,YAhDD;AArNX,SAAS,WAAW,OAAO,qBAAqB,iBAAiB,QAAQ,UAAU,4BAA4B;AAE/G,SAAS,WAAW,UAAU,WAAW,YAAY;AACrD,SAAS,UAAU;AACnB,SAAS,YAAY,0BAA0B;AAC/C,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AACvB,SAAS,kBAAkB;AAC3B,SAAS,eAAe;AACxB,SAAS,gBAAgB;AAEzB,SAAS,gBAAgB;AACzB,SAAS,eAAe;AACxB,SAAS,oBAAoB;AAE7B,SAAS,kBAAkB,cAAc,oBAA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AA,UAAC;AAAA;AAAA,YACC,2BAAwB;AAAA,YACxB,SAAS;AAAA,YACT,UAAU,CAAC;AAAA,YACX;AAAA,YACA,aAAW,WAAW;AAAA,YACtB,MAAM,SAAS,OAAO,OAAO;AAAA,YAE5B;AAAA,wBACC,oBAAC,WAAQ,OAAO,MAAM,WAAU,UAAS,IAEzC,oBAAC,QAAK,WAAU,2BAA0B,eAAW,MAAC;AAAA,cAEvD,OAAO;AAAA;AAAA;AAAA,QACV;AAAA,SACF;AAAA,OACF;AAAA,KACF;AAEJ;AAIA,SAAS,eAAe,OAAwC;AAC9D,QAAM,MAA+B,CAAC;AACtC,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,KAAK,EAAG,KAAI,IAAI,WAAW,OAAO,EAAG,KAAI,GAAG,IAAI;AAC1F,SAAO;AACT;","names":["index","pending"]}
|
package/dist/feedback.d.ts
CHANGED
|
@@ -2,18 +2,18 @@ export * from "./feedback/feedback-attachment.js";
|
|
|
2
2
|
export * from "./feedback/feedback-dialog.js";
|
|
3
3
|
export * from "./feedback/feedback-inbox.js";
|
|
4
4
|
export * from "./feedback/feedback-thread.js";
|
|
5
|
-
export
|
|
5
|
+
export { DEFAULT_ATTACHMENT_ACCEPT, DEFAULT_MAX_ATTACHMENT_BYTES, DEFAULT_MAX_ATTACHMENTS, FEEDBACK_ATTACHMENT_ACCEPT, FEEDBACK_PICKABLE_CATEGORIES, FEEDBACK_REWORKABLE_STATUSES, FEEDBACK_QUEUE_STATUSES, FEEDBACK_AUTHOR_EDITABLE_STATUSES, FEEDBACK_AWAITING_STATUSES, FEEDBACK_DECIDED_STATUSES, FEEDBACK_COMMENT_MAX, FEEDBACK_REPLY_MAX, appendRework, reworkCount, feedbackReworkCount, splitBodyAttachments, splitDescription, replaceDescription, isImageAttachment, attachmentName, type FeedbackEnvironment, type FeedbackContext, type FeedbackRecord, } from "./feedback/feedback-record.js";
|
|
6
6
|
export * from "./feedback/feedback-labels.js";
|
|
7
|
-
export
|
|
8
|
-
export
|
|
7
|
+
export { useFeedbackStatusUndo, type FeedbackStatusPatch, type FeedbackStatusMutateAsync, type FeedbackStatusRow, type FeedbackStatusChange, type FeedbackStatusUndoOptions, } from "./feedback/feedback-status-undo.js";
|
|
8
|
+
export { DEFAULT_FEEDBACK_SWIPE, feedbackSwipePlan, feedbackSwipeOmitShown, type FeedbackSwipeAction, type FeedbackSwipeBinding, type FeedbackSwipeOptions, } from "./feedback/feedback-swipe.js";
|
|
9
9
|
export * from "./feedback/feedback-menu.js";
|
|
10
10
|
export * from "./feedback/feedback-context.js";
|
|
11
11
|
export * from "./feedback/feedback-capture.js";
|
|
12
12
|
export * from "./feedback/feedback-submit.js";
|
|
13
|
-
export
|
|
14
|
-
export
|
|
13
|
+
export { DEFAULT_FEEDBACK_PAGE_LABELS, useFeedbackPageLabels, isFeedbackAwaiting, useFeedbackRenderDate, FeedbackSubject, useFeedbackColumns, feedbackMobileGroupBy, FeedbackMobileCard, FeedbackAwaitingToggle, FeedbackEmptyState, type FeedbackPageLabels, type FeedbackTableRow, type FeedbackRenderDate, type FeedbackSubjectProps, type FeedbackColumnsOptions, type UseFeedbackColumnsOptions, type FeedbackMobileCardProps, type FeedbackAwaitingToggleProps, type FeedbackEmptyStateProps, } from "./feedback/feedback-table.js";
|
|
14
|
+
export { DEFAULT_FEEDBACK_DETAIL_LABELS, FeedbackReworkSection, FeedbackRowDetail, type FeedbackDetailLabels, type FeedbackRowAccess, type FeedbackDetailPatch, type FeedbackDetailUpdateAsync, type FeedbackUpload, type FeedbackReworkSend, type FeedbackReworkSectionProps, type FeedbackRowDetailProps, } from "./feedback/feedback-row-detail.js";
|
|
15
15
|
export * from "./feedback/feedback-crash.js";
|
|
16
|
-
export
|
|
16
|
+
export { FeedbackPublicSwitch, type FeedbackPublicSwitchRow, type FeedbackPublicSwitchViewer, type FeedbackPublicSwitchProps, } from "./feedback/feedback-public-switch.js";
|
|
17
17
|
export * from "./feedback/feedback-public-list.js";
|
|
18
18
|
export * from "./feedback/feedback-public-types.js";
|
|
19
19
|
export * from "./feedback/feedback-vote-button.js";
|
package/dist/feedback.js
CHANGED
|
@@ -3,22 +3,106 @@ export * from "./feedback/feedback-attachment.js";
|
|
|
3
3
|
export * from "./feedback/feedback-dialog.js";
|
|
4
4
|
export * from "./feedback/feedback-inbox.js";
|
|
5
5
|
export * from "./feedback/feedback-thread.js";
|
|
6
|
-
|
|
6
|
+
import {
|
|
7
|
+
DEFAULT_ATTACHMENT_ACCEPT,
|
|
8
|
+
DEFAULT_MAX_ATTACHMENT_BYTES,
|
|
9
|
+
DEFAULT_MAX_ATTACHMENTS,
|
|
10
|
+
FEEDBACK_ATTACHMENT_ACCEPT,
|
|
11
|
+
FEEDBACK_PICKABLE_CATEGORIES,
|
|
12
|
+
FEEDBACK_REWORKABLE_STATUSES,
|
|
13
|
+
FEEDBACK_QUEUE_STATUSES,
|
|
14
|
+
FEEDBACK_AUTHOR_EDITABLE_STATUSES,
|
|
15
|
+
FEEDBACK_AWAITING_STATUSES,
|
|
16
|
+
FEEDBACK_DECIDED_STATUSES,
|
|
17
|
+
FEEDBACK_COMMENT_MAX,
|
|
18
|
+
FEEDBACK_REPLY_MAX,
|
|
19
|
+
appendRework,
|
|
20
|
+
reworkCount,
|
|
21
|
+
feedbackReworkCount,
|
|
22
|
+
splitBodyAttachments,
|
|
23
|
+
splitDescription,
|
|
24
|
+
replaceDescription,
|
|
25
|
+
isImageAttachment,
|
|
26
|
+
attachmentName
|
|
27
|
+
} from "./feedback/feedback-record.js";
|
|
7
28
|
export * from "./feedback/feedback-labels.js";
|
|
8
|
-
|
|
9
|
-
|
|
29
|
+
import {
|
|
30
|
+
useFeedbackStatusUndo
|
|
31
|
+
} from "./feedback/feedback-status-undo.js";
|
|
32
|
+
import {
|
|
33
|
+
DEFAULT_FEEDBACK_SWIPE,
|
|
34
|
+
feedbackSwipePlan,
|
|
35
|
+
feedbackSwipeOmitShown
|
|
36
|
+
} from "./feedback/feedback-swipe.js";
|
|
10
37
|
export * from "./feedback/feedback-menu.js";
|
|
11
38
|
export * from "./feedback/feedback-context.js";
|
|
12
39
|
export * from "./feedback/feedback-capture.js";
|
|
13
40
|
export * from "./feedback/feedback-submit.js";
|
|
14
|
-
|
|
15
|
-
|
|
41
|
+
import {
|
|
42
|
+
DEFAULT_FEEDBACK_PAGE_LABELS,
|
|
43
|
+
useFeedbackPageLabels,
|
|
44
|
+
isFeedbackAwaiting,
|
|
45
|
+
useFeedbackRenderDate,
|
|
46
|
+
FeedbackSubject,
|
|
47
|
+
useFeedbackColumns,
|
|
48
|
+
feedbackMobileGroupBy,
|
|
49
|
+
FeedbackMobileCard,
|
|
50
|
+
FeedbackAwaitingToggle,
|
|
51
|
+
FeedbackEmptyState
|
|
52
|
+
} from "./feedback/feedback-table.js";
|
|
53
|
+
import {
|
|
54
|
+
DEFAULT_FEEDBACK_DETAIL_LABELS,
|
|
55
|
+
FeedbackReworkSection,
|
|
56
|
+
FeedbackRowDetail
|
|
57
|
+
} from "./feedback/feedback-row-detail.js";
|
|
16
58
|
export * from "./feedback/feedback-crash.js";
|
|
17
|
-
|
|
59
|
+
import {
|
|
60
|
+
FeedbackPublicSwitch
|
|
61
|
+
} from "./feedback/feedback-public-switch.js";
|
|
18
62
|
export * from "./feedback/feedback-public-list.js";
|
|
19
63
|
export * from "./feedback/feedback-public-types.js";
|
|
20
64
|
export * from "./feedback/feedback-vote-button.js";
|
|
21
65
|
export * from "./feedback/feedback-comment-thread.js";
|
|
22
66
|
export * from "./feedback/feedback-replies.js";
|
|
23
67
|
export * from "./feedback/feedback-entry-file.js";
|
|
68
|
+
export {
|
|
69
|
+
DEFAULT_ATTACHMENT_ACCEPT,
|
|
70
|
+
DEFAULT_FEEDBACK_DETAIL_LABELS,
|
|
71
|
+
DEFAULT_FEEDBACK_PAGE_LABELS,
|
|
72
|
+
DEFAULT_FEEDBACK_SWIPE,
|
|
73
|
+
DEFAULT_MAX_ATTACHMENTS,
|
|
74
|
+
DEFAULT_MAX_ATTACHMENT_BYTES,
|
|
75
|
+
FEEDBACK_ATTACHMENT_ACCEPT,
|
|
76
|
+
FEEDBACK_AUTHOR_EDITABLE_STATUSES,
|
|
77
|
+
FEEDBACK_AWAITING_STATUSES,
|
|
78
|
+
FEEDBACK_COMMENT_MAX,
|
|
79
|
+
FEEDBACK_DECIDED_STATUSES,
|
|
80
|
+
FEEDBACK_PICKABLE_CATEGORIES,
|
|
81
|
+
FEEDBACK_QUEUE_STATUSES,
|
|
82
|
+
FEEDBACK_REPLY_MAX,
|
|
83
|
+
FEEDBACK_REWORKABLE_STATUSES,
|
|
84
|
+
FeedbackAwaitingToggle,
|
|
85
|
+
FeedbackEmptyState,
|
|
86
|
+
FeedbackMobileCard,
|
|
87
|
+
FeedbackPublicSwitch,
|
|
88
|
+
FeedbackReworkSection,
|
|
89
|
+
FeedbackRowDetail,
|
|
90
|
+
FeedbackSubject,
|
|
91
|
+
appendRework,
|
|
92
|
+
attachmentName,
|
|
93
|
+
feedbackMobileGroupBy,
|
|
94
|
+
feedbackReworkCount,
|
|
95
|
+
feedbackSwipeOmitShown,
|
|
96
|
+
feedbackSwipePlan,
|
|
97
|
+
isFeedbackAwaiting,
|
|
98
|
+
isImageAttachment,
|
|
99
|
+
replaceDescription,
|
|
100
|
+
reworkCount,
|
|
101
|
+
splitBodyAttachments,
|
|
102
|
+
splitDescription,
|
|
103
|
+
useFeedbackColumns,
|
|
104
|
+
useFeedbackPageLabels,
|
|
105
|
+
useFeedbackRenderDate,
|
|
106
|
+
useFeedbackStatusUndo
|
|
107
|
+
};
|
|
24
108
|
//# sourceMappingURL=feedback.js.map
|
package/dist/feedback.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/feedback.ts"],"sourcesContent":["// `@eifi1/ui-kit/feedback` — the report form and the parts an inbox is built from.\n//\n// A re-slicing of the main barrel, not a new API. The kit owns the status vocabulary,\n// the transition policy and the look; each app still wires its own API, columns,\n// strings and permissions — see the note at the top of feedback/feedback-inbox.tsx.\nexport * from \"./feedback/feedback-attachment\";\nexport * from \"./feedback/feedback-dialog\";\nexport * from \"./feedback/feedback-inbox\";\nexport * from \"./feedback/feedback-thread\";\n// 0.27.0: the feedback harmonization (docs/feedback-harmonization.md) — one record,\n// one menu, dialog, table, detail and crash reporter for keksdose, kastlan, Kurvenschmiede.\nexport
|
|
1
|
+
{"version":3,"sources":["../src/feedback.ts"],"sourcesContent":["// `@eifi1/ui-kit/feedback` — the report form and the parts an inbox is built from.\n//\n// A re-slicing of the main barrel, not a new API. The kit owns the status vocabulary,\n// the transition policy and the look; each app still wires its own API, columns,\n// strings and permissions — see the note at the top of feedback/feedback-inbox.tsx.\nexport * from \"./feedback/feedback-attachment\";\nexport * from \"./feedback/feedback-dialog\";\nexport * from \"./feedback/feedback-inbox\";\nexport * from \"./feedback/feedback-thread\";\n// 0.27.0: the feedback harmonization (docs/feedback-harmonization.md) — one record,\n// one menu, dialog, table, detail and crash reporter for keksdose, kastlan, Kurvenschmiede.\n//\n// Named, not `*`, for six of its modules: 0.53 took the slice's share of the 55 names no app\n// reads off the surface (deprecated in 0.52, refactor audit 2026-10-30, API-4) —\n// `feedbackAttachmentLine`, `FEEDBACK_UNDO_DURATION`, `FEEDBACK_SWIPE_ACTIONS`,\n// `feedbackColumns`, `feedbackSubmitter`, `feedbackSubmitterEmail`, `feedbackEnvironment`,\n// `feedbackPagePath`, `feedbackAttachmentUrls`, `feedbackRowAccess`, `useFeedbackDetailLabels`\n// and `feedbackPublicSwitchAllowed`, which their modules keep for the kit's own use.\n// `feedbackPageHref` and `feedbackPageUrl` went whole: nothing read them.\nexport {\n DEFAULT_ATTACHMENT_ACCEPT,\n DEFAULT_MAX_ATTACHMENT_BYTES,\n DEFAULT_MAX_ATTACHMENTS,\n FEEDBACK_ATTACHMENT_ACCEPT,\n FEEDBACK_PICKABLE_CATEGORIES,\n FEEDBACK_REWORKABLE_STATUSES,\n FEEDBACK_QUEUE_STATUSES,\n FEEDBACK_AUTHOR_EDITABLE_STATUSES,\n FEEDBACK_AWAITING_STATUSES,\n FEEDBACK_DECIDED_STATUSES,\n FEEDBACK_COMMENT_MAX,\n FEEDBACK_REPLY_MAX,\n appendRework,\n reworkCount,\n feedbackReworkCount,\n splitBodyAttachments,\n splitDescription,\n replaceDescription,\n isImageAttachment,\n attachmentName,\n type FeedbackEnvironment,\n type FeedbackContext,\n type FeedbackRecord,\n} from \"./feedback/feedback-record\";\nexport * from \"./feedback/feedback-labels\";\nexport {\n useFeedbackStatusUndo,\n type FeedbackStatusPatch,\n type FeedbackStatusMutateAsync,\n type FeedbackStatusRow,\n type FeedbackStatusChange,\n type FeedbackStatusUndoOptions,\n} from \"./feedback/feedback-status-undo\";\nexport {\n DEFAULT_FEEDBACK_SWIPE,\n feedbackSwipePlan,\n feedbackSwipeOmitShown,\n type FeedbackSwipeAction,\n type FeedbackSwipeBinding,\n type FeedbackSwipeOptions,\n} from \"./feedback/feedback-swipe\";\nexport * from \"./feedback/feedback-menu\";\nexport * from \"./feedback/feedback-context\";\nexport * from \"./feedback/feedback-capture\";\nexport * from \"./feedback/feedback-submit\";\nexport {\n DEFAULT_FEEDBACK_PAGE_LABELS,\n useFeedbackPageLabels,\n isFeedbackAwaiting,\n useFeedbackRenderDate,\n FeedbackSubject,\n useFeedbackColumns,\n feedbackMobileGroupBy,\n FeedbackMobileCard,\n FeedbackAwaitingToggle,\n FeedbackEmptyState,\n type FeedbackPageLabels,\n type FeedbackTableRow,\n type FeedbackRenderDate,\n type FeedbackSubjectProps,\n type FeedbackColumnsOptions,\n type UseFeedbackColumnsOptions,\n type FeedbackMobileCardProps,\n type FeedbackAwaitingToggleProps,\n type FeedbackEmptyStateProps,\n} from \"./feedback/feedback-table\";\nexport {\n DEFAULT_FEEDBACK_DETAIL_LABELS,\n FeedbackReworkSection,\n FeedbackRowDetail,\n type FeedbackDetailLabels,\n type FeedbackRowAccess,\n type FeedbackDetailPatch,\n type FeedbackDetailUpdateAsync,\n type FeedbackUpload,\n type FeedbackReworkSend,\n type FeedbackReworkSectionProps,\n type FeedbackRowDetailProps,\n} from \"./feedback/feedback-row-detail\";\nexport * from \"./feedback/feedback-crash\";\n// 0.38.0: the public pages (§9.15) — the \"Visible to others\" switch, the list every user\n// reads and one report opened.\nexport {\n FeedbackPublicSwitch,\n type FeedbackPublicSwitchRow,\n type FeedbackPublicSwitchViewer,\n type FeedbackPublicSwitchProps,\n} from \"./feedback/feedback-public-switch\";\nexport * from \"./feedback/feedback-public-list\";\n// 0.38.0: public feedback (docs/feedback-harmonization.md §9) — the shapes, the vote, the\n// comment thread, the replies' timeline and composer.\nexport * from \"./feedback/feedback-public-types\";\nexport * from \"./feedback/feedback-vote-button\";\nexport * from \"./feedback/feedback-comment-thread\";\nexport * from \"./feedback/feedback-replies\";\nexport * from \"./feedback/feedback-entry-file\";\n"],"mappings":";AAKA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAWd;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AACP,cAAc;AACd;AAAA,EACE;AAAA,OAMK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AACP,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAUK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OASK;AACP,cAAc;AAGd;AAAA,EACE;AAAA,OAIK;AACP,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -1,3 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keep keyboard focus inside an open overlay, and give it back when it closes.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from `Modal`, which was the ONLY component in this package that did any of
|
|
5
|
+
* this. Every other overlay — the full-bleed dialog a phone's row editor opens, the
|
|
6
|
+
* picker sheet, the numpad, the tour card — declared `role="dialog" aria-modal="true"`
|
|
7
|
+
* and then left focus on the page behind it. That is the worst of the two possible
|
|
8
|
+
* bugs: assistive technology hides the page because of `aria-modal`, while the user's
|
|
9
|
+
* focus is still down there in the part that is now hidden, so Tab walks through
|
|
10
|
+
* controls the screen reader refuses to describe.
|
|
11
|
+
*
|
|
12
|
+
* What this does beyond Modal's original copy:
|
|
13
|
+
*
|
|
14
|
+
* - **Recomputes the tabbable list on every Tab**, not once when the overlay opens.
|
|
15
|
+
* These panels have conditionally-rendered contents — a search box that appears
|
|
16
|
+
* once options load, a "clear" button that exists only while a filter is set — and
|
|
17
|
+
* a list captured at open time traps focus against elements that have since gone.
|
|
18
|
+
* - **Guards the restore target.** The element focused before opening may have left
|
|
19
|
+
* the DOM by the time the overlay closes (the row that owned the button was
|
|
20
|
+
* filtered away). Calling `.focus()` on a detached node silently drops focus to
|
|
21
|
+
* `<body>`, which for a keyboard user means losing their place in the page
|
|
22
|
+
* entirely. When the target is gone, focus falls back to the nearest thing that
|
|
23
|
+
* still exists rather than to nothing.
|
|
24
|
+
* - **Leaves an app's own autofocus alone** (0.33.1). React honours a child's
|
|
25
|
+
* `autoFocus` while it commits, and this hook's effect runs AFTER that commit, so
|
|
26
|
+
* focusing the container there took focus straight back off the field the app had
|
|
27
|
+
* asked for. See `initialFocus`.
|
|
28
|
+
* - **Nests.** An overlay can open another — a picker inside a dialog. Only the
|
|
29
|
+
* innermost trap handles a keystroke, and closing it hands control back to the one
|
|
30
|
+
* underneath. Innermost is decided by DOM containment rather than by mount order;
|
|
31
|
+
* see the note on `TRAP_ATTR` for why the obvious stack is wrong.
|
|
32
|
+
* `use-overlay-history.ts` reasons about the same nesting problem for the back
|
|
33
|
+
* button; this is the focus half of it.
|
|
34
|
+
*/
|
|
35
|
+
export { firstTabStop, tabStops } from "../lib/focus-left.js";
|
|
1
36
|
export interface FocusTrapOptions {
|
|
2
37
|
/** Trap only while this is true. Mount-time `true` is the common case. */
|
|
3
38
|
active?: boolean;
|