@alepha/ui 0.26.0 → 0.27.1
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 +127 -12
- package/dist/components/account/account-connections.d.ts.map +1 -1
- package/dist/components/account/account-connections.js +29 -18
- package/dist/components/account/account-connections.js.map +1 -1
- package/dist/components/account/account-delete-dialog.d.ts.map +1 -1
- package/dist/components/account/account-delete-dialog.js +16 -12
- package/dist/components/account/account-delete-dialog.js.map +1 -1
- package/dist/components/account/account-header.d.ts.map +1 -1
- package/dist/components/account/account-header.js +6 -2
- package/dist/components/account/account-header.js.map +1 -1
- package/dist/components/account/account-keys.d.ts.map +1 -1
- package/dist/components/account/account-keys.js +42 -28
- package/dist/components/account/account-keys.js.map +1 -1
- package/dist/components/account/account-layout.d.ts.map +1 -1
- package/dist/components/account/account-layout.js +7 -4
- package/dist/components/account/account-layout.js.map +1 -1
- package/dist/components/account/account-mfa-dialog.d.ts +20 -0
- package/dist/components/account/account-mfa-dialog.d.ts.map +1 -0
- package/dist/components/account/account-mfa-dialog.js +149 -0
- package/dist/components/account/account-mfa-dialog.js.map +1 -0
- package/dist/components/account/account-password-dialog.d.ts.map +1 -1
- package/dist/components/account/account-password-dialog.js +18 -13
- package/dist/components/account/account-password-dialog.js.map +1 -1
- package/dist/components/account/account-profile.d.ts.map +1 -1
- package/dist/components/account/account-profile.js +33 -33
- package/dist/components/account/account-profile.js.map +1 -1
- package/dist/components/account/account-router-options.d.ts.map +1 -1
- package/dist/components/account/account-router-options.js.map +1 -1
- package/dist/components/account/account-router-page.d.ts.map +1 -1
- package/dist/components/account/account-router-page.js.map +1 -1
- package/dist/components/account/account-router.d.ts +79 -4
- package/dist/components/account/account-router.d.ts.map +1 -1
- package/dist/components/account/account-router.js +48 -7
- package/dist/components/account/account-router.js.map +1 -1
- package/dist/components/account/account-security.d.ts +11 -1
- package/dist/components/account/account-security.d.ts.map +1 -1
- package/dist/components/account/account-security.js +124 -37
- package/dist/components/account/account-security.js.map +1 -1
- package/dist/components/account/account-sessions.d.ts.map +1 -1
- package/dist/components/account/account-sessions.js +63 -28
- package/dist/components/account/account-sessions.js.map +1 -1
- package/dist/components/admin/admin-analytics-query-panel.d.ts +1 -1
- package/dist/components/admin/admin-analytics-query-panel.d.ts.map +1 -1
- package/dist/components/admin/admin-analytics-query-panel.js +5 -5
- package/dist/components/admin/admin-analytics-query-panel.js.map +1 -1
- package/dist/components/admin/admin-analytics-results.d.ts +1 -1
- package/dist/components/admin/admin-analytics-results.d.ts.map +1 -1
- package/dist/components/admin/admin-analytics-results.js +2 -2
- package/dist/components/admin/admin-analytics-results.js.map +1 -1
- package/dist/components/admin/admin-analytics.d.ts +1 -1
- package/dist/components/admin/admin-analytics.d.ts.map +1 -1
- package/dist/components/admin/admin-analytics.js +3 -3
- package/dist/components/admin/admin-analytics.js.map +1 -1
- package/dist/components/admin/admin-audits.d.ts +1 -1
- package/dist/components/admin/admin-audits.d.ts.map +1 -1
- package/dist/components/admin/admin-audits.js +4 -4
- package/dist/components/admin/admin-audits.js.map +1 -1
- package/dist/components/admin/admin-dashboard-card.d.ts +42 -0
- package/dist/components/admin/admin-dashboard-card.d.ts.map +1 -0
- package/dist/components/admin/admin-dashboard-card.js +0 -0
- package/dist/components/admin/admin-dashboard-count-card.d.ts +34 -0
- package/dist/components/admin/admin-dashboard-count-card.d.ts.map +1 -0
- package/dist/components/admin/admin-dashboard-count-card.js +42 -0
- package/dist/components/admin/admin-dashboard-count-card.js.map +1 -0
- package/dist/components/admin/admin-dashboard.d.ts +20 -0
- package/dist/components/admin/admin-dashboard.d.ts.map +1 -0
- package/dist/components/admin/admin-dashboard.js +32 -0
- package/dist/components/admin/admin-dashboard.js.map +1 -0
- package/dist/components/admin/admin-files.d.ts +1 -1
- package/dist/components/admin/admin-files.d.ts.map +1 -1
- package/dist/components/admin/admin-files.js +3 -3
- package/dist/components/admin/admin-files.js.map +1 -1
- package/dist/components/admin/admin-jobs-executions-panel.d.ts +2 -2
- package/dist/components/admin/admin-jobs-executions-panel.d.ts.map +1 -1
- package/dist/components/admin/admin-jobs-executions-panel.js +12 -32
- package/dist/components/admin/admin-jobs-executions-panel.js.map +1 -1
- package/dist/components/admin/admin-jobs-status-badge.d.ts +2 -2
- package/dist/components/admin/admin-jobs-status-badge.d.ts.map +1 -1
- package/dist/components/admin/admin-jobs-status-badge.js +5 -5
- package/dist/components/admin/admin-jobs-status-badge.js.map +1 -1
- package/dist/components/admin/admin-jobs-status-labels.d.ts +26 -0
- package/dist/components/admin/admin-jobs-status-labels.d.ts.map +1 -0
- package/dist/components/admin/admin-jobs-status-labels.js +46 -0
- package/dist/components/admin/admin-jobs-status-labels.js.map +1 -0
- package/dist/components/admin/admin-jobs.d.ts +1 -1
- package/dist/components/admin/admin-jobs.d.ts.map +1 -1
- package/dist/components/admin/admin-jobs.js +5 -5
- package/dist/components/admin/admin-jobs.js.map +1 -1
- package/dist/components/admin/admin-keys-token-dialog.js +3 -3
- package/dist/components/admin/admin-keys-token-dialog.js.map +1 -1
- package/dist/components/admin/admin-keys.d.ts +1 -1
- package/dist/components/admin/admin-keys.d.ts.map +1 -1
- package/dist/components/admin/admin-keys.js +4 -4
- package/dist/components/admin/admin-keys.js.map +1 -1
- package/dist/components/admin/admin-layout.d.ts.map +1 -1
- package/dist/components/admin/admin-layout.js +6 -6
- package/dist/components/admin/admin-layout.js.map +1 -1
- package/dist/components/admin/admin-notifications-detail-tabs.d.ts +21 -0
- package/dist/components/admin/admin-notifications-detail-tabs.d.ts.map +1 -0
- package/dist/components/admin/admin-notifications-detail-tabs.js +122 -0
- package/dist/components/admin/admin-notifications-detail-tabs.js.map +1 -0
- package/dist/components/admin/admin-notifications-detail.d.ts +23 -0
- package/dist/components/admin/admin-notifications-detail.d.ts.map +1 -0
- package/dist/components/admin/admin-notifications-detail.js +48 -0
- package/dist/components/admin/admin-notifications-detail.js.map +1 -0
- package/dist/components/admin/admin-notifications-preview-body.d.ts +13 -0
- package/dist/components/admin/admin-notifications-preview-body.d.ts.map +1 -0
- package/dist/components/admin/admin-notifications-preview-body.js +64 -0
- package/dist/components/admin/admin-notifications-preview-body.js.map +1 -0
- package/dist/components/admin/admin-notifications-preview-tab.d.ts +24 -0
- package/dist/components/admin/admin-notifications-preview-tab.d.ts.map +1 -0
- package/dist/components/admin/admin-notifications-preview-tab.js +35 -0
- package/dist/components/admin/admin-notifications-preview-tab.js.map +1 -0
- package/dist/components/admin/admin-notifications-raw-tab.d.ts +18 -0
- package/dist/components/admin/admin-notifications-raw-tab.d.ts.map +1 -0
- package/dist/components/admin/admin-notifications-raw-tab.js +53 -0
- package/dist/components/admin/admin-notifications-raw-tab.js.map +1 -0
- package/dist/components/admin/admin-notifications-status-badge.d.ts +17 -0
- package/dist/components/admin/admin-notifications-status-badge.d.ts.map +1 -0
- package/dist/components/admin/admin-notifications-status-badge.js +32 -0
- package/dist/components/admin/admin-notifications-status-badge.js.map +1 -0
- package/dist/components/admin/admin-notifications-status-labels.d.ts +17 -0
- package/dist/components/admin/admin-notifications-status-labels.d.ts.map +1 -0
- package/dist/components/admin/admin-notifications-status-labels.js +33 -0
- package/dist/components/admin/admin-notifications-status-labels.js.map +1 -0
- package/dist/components/admin/admin-notifications-status-tones.d.ts +44 -0
- package/dist/components/admin/admin-notifications-status-tones.d.ts.map +1 -0
- package/dist/components/admin/admin-notifications-status-tones.js +64 -0
- package/dist/components/admin/admin-notifications-status-tones.js.map +1 -0
- package/dist/components/admin/admin-notifications-template-label.d.ts +16 -0
- package/dist/components/admin/admin-notifications-template-label.d.ts.map +1 -0
- package/dist/components/admin/admin-notifications-template-label.js +24 -0
- package/dist/components/admin/admin-notifications-template-label.js.map +1 -0
- package/dist/components/admin/admin-notifications.d.ts +13 -2
- package/dist/components/admin/admin-notifications.d.ts.map +1 -1
- package/dist/components/admin/admin-notifications.js +266 -31
- package/dist/components/admin/admin-notifications.js.map +1 -1
- package/dist/components/admin/admin-parameters.d.ts +1 -1
- package/dist/components/admin/admin-parameters.d.ts.map +1 -1
- package/dist/components/admin/admin-parameters.js +10 -10
- package/dist/components/admin/admin-parameters.js.map +1 -1
- package/dist/components/admin/admin-payments.d.ts +1 -1
- package/dist/components/admin/admin-payments.d.ts.map +1 -1
- package/dist/components/admin/admin-payments.js +3 -3
- package/dist/components/admin/admin-payments.js.map +1 -1
- package/dist/components/admin/admin-router-options.d.ts +13 -10
- package/dist/components/admin/admin-router-options.d.ts.map +1 -1
- package/dist/components/admin/admin-router-options.js.map +1 -1
- package/dist/components/admin/admin-router-page.d.ts +7 -5
- package/dist/components/admin/admin-router-page.d.ts.map +1 -1
- package/dist/components/admin/admin-router-page.js +7 -5
- package/dist/components/admin/admin-router-page.js.map +1 -1
- package/dist/components/admin/admin-router.d.ts +101 -29
- package/dist/components/admin/admin-router.d.ts.map +1 -1
- package/dist/components/admin/admin-router.js +168 -45
- package/dist/components/admin/admin-router.js.map +1 -1
- package/dist/components/admin/admin-sessions.d.ts +1 -1
- package/dist/components/admin/admin-sessions.d.ts.map +1 -1
- package/dist/components/admin/admin-sessions.js +13 -5
- package/dist/components/admin/admin-sessions.js.map +1 -1
- package/dist/components/admin/admin-user-detail-audits-tab.d.ts +2 -2
- package/dist/components/admin/admin-user-detail-audits-tab.d.ts.map +1 -1
- package/dist/components/admin/admin-user-detail-audits-tab.js.map +1 -1
- package/dist/components/admin/admin-user-detail-identity-aside.d.ts +4 -3
- package/dist/components/admin/admin-user-detail-identity-aside.d.ts.map +1 -1
- package/dist/components/admin/admin-user-detail-identity-aside.js +13 -69
- package/dist/components/admin/admin-user-detail-identity-aside.js.map +1 -1
- package/dist/components/admin/admin-user-detail-overview-tab.d.ts.map +1 -1
- package/dist/components/admin/admin-user-detail-overview-tab.js.map +1 -1
- package/dist/components/admin/admin-user-detail-password-dialog.d.ts.map +1 -1
- package/dist/components/admin/admin-user-detail-password-dialog.js.map +1 -1
- package/dist/components/admin/admin-user-detail-profile-policy.d.ts.map +1 -1
- package/dist/components/admin/admin-user-detail-profile-policy.js.map +1 -1
- package/dist/components/admin/admin-user-detail-security-tab.d.ts +12 -2
- package/dist/components/admin/admin-user-detail-security-tab.d.ts.map +1 -1
- package/dist/components/admin/admin-user-detail-security-tab.js +65 -46
- package/dist/components/admin/admin-user-detail-security-tab.js.map +1 -1
- package/dist/components/admin/admin-user-detail-sessions-tab.d.ts +2 -2
- package/dist/components/admin/admin-user-detail-sessions-tab.d.ts.map +1 -1
- package/dist/components/admin/admin-user-detail-sessions-tab.js +1 -1
- package/dist/components/admin/admin-user-detail-sessions-tab.js.map +1 -1
- package/dist/components/admin/admin-user-detail.d.ts.map +1 -1
- package/dist/components/admin/admin-user-detail.js +88 -126
- package/dist/components/admin/admin-user-detail.js.map +1 -1
- package/dist/components/admin/admin-users-roles-picker.d.ts +6 -1
- package/dist/components/admin/admin-users-roles-picker.d.ts.map +1 -1
- package/dist/components/admin/admin-users-roles-picker.js +11 -8
- package/dist/components/admin/admin-users-roles-picker.js.map +1 -1
- package/dist/components/admin/admin-users.d.ts.map +1 -1
- package/dist/components/admin/admin-users.js +10 -13
- package/dist/components/admin/admin-users.js.map +1 -1
- package/dist/components/admin/admin-workflows-execution-sheet.d.ts +2 -2
- package/dist/components/admin/admin-workflows-execution-sheet.d.ts.map +1 -1
- package/dist/components/admin/admin-workflows-execution-sheet.js +10 -10
- package/dist/components/admin/admin-workflows-execution-sheet.js.map +1 -1
- package/dist/components/admin/admin-workflows-executions-panel.d.ts +2 -2
- package/dist/components/admin/admin-workflows-executions-panel.d.ts.map +1 -1
- package/dist/components/admin/admin-workflows-executions-panel.js +13 -45
- package/dist/components/admin/admin-workflows-executions-panel.js.map +1 -1
- package/dist/components/admin/admin-workflows-status-badge.d.ts +2 -2
- package/dist/components/admin/admin-workflows-status-badge.d.ts.map +1 -1
- package/dist/components/admin/admin-workflows-status-badge.js +5 -5
- package/dist/components/admin/admin-workflows-status-badge.js.map +1 -1
- package/dist/components/admin/admin-workflows-status-labels.d.ts +19 -0
- package/dist/components/admin/admin-workflows-status-labels.d.ts.map +1 -0
- package/dist/components/admin/admin-workflows-status-labels.js +48 -0
- package/dist/components/admin/admin-workflows-status-labels.js.map +1 -0
- package/dist/components/admin/admin-workflows.d.ts +1 -1
- package/dist/components/admin/admin-workflows.d.ts.map +1 -1
- package/dist/components/admin/admin-workflows.js +5 -5
- package/dist/components/admin/admin-workflows.js.map +1 -1
- package/dist/components/admin/diff-lines.js +1 -1
- package/dist/components/admin/diff-lines.js.map +1 -1
- package/dist/components/admin/parameter-diff-dialog.d.ts.map +1 -1
- package/dist/components/admin/parameter-diff-dialog.js +1 -1
- package/dist/components/admin/parameter-diff-dialog.js.map +1 -1
- package/dist/components/admin/parameter-history-item.d.ts.map +1 -1
- package/dist/components/admin/parameter-history-item.js +4 -4
- package/dist/components/admin/parameter-history-item.js.map +1 -1
- package/dist/components/admin/parameter-json-dialog.js +1 -1
- package/dist/components/admin/parameter-save-dialog.js +2 -2
- package/dist/components/admin/use-confirmed-action.js +1 -1
- package/dist/components/alepha-table/alepha-table.d.ts +109 -8
- package/dist/components/alepha-table/alepha-table.d.ts.map +1 -1
- package/dist/components/alepha-table/alepha-table.js +161 -31
- package/dist/components/alepha-table/alepha-table.js.map +1 -1
- package/dist/components/alepha-table/paginate-local.d.ts +43 -0
- package/dist/components/alepha-table/paginate-local.d.ts.map +1 -0
- package/dist/components/alepha-table/paginate-local.js +84 -0
- package/dist/components/alepha-table/paginate-local.js.map +1 -0
- package/dist/components/app-actions/app-actions.js +1 -1
- package/dist/components/app-shell/app-shell.d.ts +10 -1
- package/dist/components/app-shell/app-shell.d.ts.map +1 -1
- package/dist/components/app-shell/app-shell.js +27 -20
- package/dist/components/app-shell/app-shell.js.map +1 -1
- package/dist/components/auth/auth-login.d.ts +1 -1
- package/dist/components/auth/auth-login.d.ts.map +1 -1
- package/dist/components/auth/auth-login.js +33 -34
- package/dist/components/auth/auth-login.js.map +1 -1
- package/dist/components/auth/auth-mfa-step.d.ts +25 -0
- package/dist/components/auth/auth-mfa-step.d.ts.map +1 -0
- package/dist/components/auth/auth-mfa-step.js +122 -0
- package/dist/components/auth/auth-mfa-step.js.map +1 -0
- package/dist/components/auth/auth-register.d.ts +1 -1
- package/dist/components/auth/auth-register.d.ts.map +1 -1
- package/dist/components/auth/auth-register.js +22 -23
- package/dist/components/auth/auth-register.js.map +1 -1
- package/dist/components/auth/auth-reset-password.d.ts +1 -1
- package/dist/components/auth/auth-reset-password.d.ts.map +1 -1
- package/dist/components/auth/auth-reset-password.js +18 -15
- package/dist/components/auth/auth-reset-password.js.map +1 -1
- package/dist/components/auth/auth-router.d.ts +23 -3
- package/dist/components/auth/auth-router.d.ts.map +1 -1
- package/dist/components/auth/auth-router.js +3 -3
- package/dist/components/auth/auth-router.js.map +1 -1
- package/dist/components/auth/auth-verify-email.d.ts +1 -1
- package/dist/components/auth/auth-verify-email.d.ts.map +1 -1
- package/dist/components/auth/auth-verify-email.js +8 -8
- package/dist/components/auth/auth-verify-email.js.map +1 -1
- package/dist/components/auth/provider-labels.d.ts.map +1 -1
- package/dist/components/auth/provider-labels.js +1 -0
- package/dist/components/auth/provider-labels.js.map +1 -1
- package/dist/components/auth/safe-redirect.d.ts +9 -0
- package/dist/components/auth/safe-redirect.d.ts.map +1 -0
- package/dist/components/auth/safe-redirect.js +19 -0
- package/dist/components/auth/safe-redirect.js.map +1 -0
- package/dist/components/auto-form/auto-form.d.ts.map +1 -1
- package/dist/components/auto-form/auto-form.js +32 -32
- package/dist/components/auto-form/auto-form.js.map +1 -1
- package/dist/components/brand-icon/brand-icon.d.ts +1 -1
- package/dist/components/brand-icon/brand-icon.d.ts.map +1 -1
- package/dist/components/brand-icon/brand-icon.js +2 -2
- package/dist/components/brand-icon/brand-icon.js.map +1 -1
- package/dist/components/button-dark/button-dark.d.ts +1 -1
- package/dist/components/button-dark/button-dark.d.ts.map +1 -1
- package/dist/components/button-dark/button-dark.js +2 -2
- package/dist/components/button-dark/button-dark.js.map +1 -1
- package/dist/components/button-language/button-language.d.ts +1 -1
- package/dist/components/button-language/button-language.d.ts.map +1 -1
- package/dist/components/button-language/button-language.js +2 -2
- package/dist/components/button-language/button-language.js.map +1 -1
- package/dist/components/button-theme/button-theme.d.ts +1 -1
- package/dist/components/button-theme/button-theme.d.ts.map +1 -1
- package/dist/components/button-theme/button-theme.js +3 -3
- package/dist/components/button-theme/button-theme.js.map +1 -1
- package/dist/components/button-user/button-user.d.ts +2 -20
- package/dist/components/button-user/button-user.d.ts.map +1 -1
- package/dist/components/button-user/button-user.js +3 -3
- package/dist/components/button-user/button-user.js.map +1 -1
- package/dist/components/captcha/turnstile-widget.d.ts +2 -2
- package/dist/components/captcha/turnstile-widget.d.ts.map +1 -1
- package/dist/components/captcha/turnstile-widget.js +5 -4
- package/dist/components/captcha/turnstile-widget.js.map +1 -1
- package/dist/components/control/control.d.ts +12 -3
- package/dist/components/control/control.d.ts.map +1 -1
- package/dist/components/control/control.js +12 -10
- package/dist/components/control/control.js.map +1 -1
- package/dist/components/control-array/control-array.d.ts +1 -1
- package/dist/components/control-array/control-array.d.ts.map +1 -1
- package/dist/components/control-array/control-array.js +78 -26
- package/dist/components/control-array/control-array.js.map +1 -1
- package/dist/components/control-base/field-i18n.d.ts +5 -3
- package/dist/components/control-base/field-i18n.d.ts.map +1 -1
- package/dist/components/control-base/field-i18n.js +4 -2
- package/dist/components/control-base/field-i18n.js.map +1 -1
- package/dist/components/control-base/form-field.d.ts +7 -7
- package/dist/components/control-base/form-field.d.ts.map +1 -1
- package/dist/components/control-base/form-field.js +10 -10
- package/dist/components/control-base/form-field.js.map +1 -1
- package/dist/components/control-base/icon-hint.d.ts +1 -1
- package/dist/components/control-base/icon-hint.d.ts.map +1 -1
- package/dist/components/control-base/icon-hint.js.map +1 -1
- package/dist/components/control-date/control-date.d.ts +1 -1
- package/dist/components/control-date/control-date.d.ts.map +1 -1
- package/dist/components/control-date/control-date.js +23 -7
- package/dist/components/control-date/control-date.js.map +1 -1
- package/dist/components/control-number/control-number.d.ts +7 -2
- package/dist/components/control-number/control-number.d.ts.map +1 -1
- package/dist/components/control-number/control-number.js +4 -3
- package/dist/components/control-number/control-number.js.map +1 -1
- package/dist/components/control-object/control-object.d.ts +16 -3
- package/dist/components/control-object/control-object.d.ts.map +1 -1
- package/dist/components/control-object/control-object.js +10 -9
- package/dist/components/control-object/control-object.js.map +1 -1
- package/dist/components/control-password/control-password.d.ts.map +1 -1
- package/dist/components/control-password/control-password.js +2 -2
- package/dist/components/control-password/control-password.js.map +1 -1
- package/dist/components/control-select/control-select.d.ts +2 -2
- package/dist/components/control-select/control-select.d.ts.map +1 -1
- package/dist/components/control-select/control-select.js +17 -17
- package/dist/components/control-select/control-select.js.map +1 -1
- package/dist/components/control-upload/control-upload.d.ts +1 -1
- package/dist/components/control-upload/control-upload.d.ts.map +1 -1
- package/dist/components/control-upload/control-upload.js +11 -11
- package/dist/components/control-upload/control-upload.js.map +1 -1
- package/dist/components/detail/detail-aside.d.ts +58 -0
- package/dist/components/detail/detail-aside.d.ts.map +1 -0
- package/dist/components/detail/detail-aside.js +95 -0
- package/dist/components/detail/detail-aside.js.map +1 -0
- package/dist/components/detail/detail-layout.d.ts +96 -0
- package/dist/components/detail/detail-layout.d.ts.map +1 -0
- package/dist/components/detail/detail-layout.js +103 -0
- package/dist/components/detail/detail-layout.js.map +1 -0
- package/dist/components/detail/use-detail-tab.d.ts +15 -0
- package/dist/components/detail/use-detail-tab.d.ts.map +1 -0
- package/dist/components/detail/use-detail-tab.js +37 -0
- package/dist/components/detail/use-detail-tab.js.map +1 -0
- package/dist/components/email-body-frame/email-body-frame.d.ts +37 -0
- package/dist/components/email-body-frame/email-body-frame.d.ts.map +1 -0
- package/dist/components/email-body-frame/email-body-frame.js +44 -0
- package/dist/components/email-body-frame/email-body-frame.js.map +1 -0
- package/dist/components/file-image/file-image.d.ts.map +1 -1
- package/dist/components/file-image/file-image.js.map +1 -1
- package/dist/components/markdown-view/diagram/DiagramErrorBoundary.d.ts +28 -0
- package/dist/components/markdown-view/diagram/DiagramErrorBoundary.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/DiagramErrorBoundary.js +25 -0
- package/dist/components/markdown-view/diagram/DiagramErrorBoundary.js.map +1 -0
- package/dist/components/markdown-view/diagram/DiagramLabel.d.ts +33 -0
- package/dist/components/markdown-view/diagram/DiagramLabel.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/DiagramLabel.js +43 -0
- package/dist/components/markdown-view/diagram/DiagramLabel.js.map +1 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagram.d.ts +39 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagram.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagram.js +94 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagram.js.map +1 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.d.ts +14 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.js +45 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.js.map +1 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.d.ts +19 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.js +68 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.js.map +1 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramNode.d.ts +17 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramNode.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramNode.js +62 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramNode.js.map +1 -0
- package/dist/components/markdown-view/diagram/MermaidFence.d.ts +39 -0
- package/dist/components/markdown-view/diagram/MermaidFence.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/MermaidFence.js +65 -0
- package/dist/components/markdown-view/diagram/MermaidFence.js.map +1 -0
- package/dist/components/markdown-view/diagram/SequenceDiagram.d.ts +50 -0
- package/dist/components/markdown-view/diagram/SequenceDiagram.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/SequenceDiagram.js +141 -0
- package/dist/components/markdown-view/diagram/SequenceDiagram.js.map +1 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramFragment.d.ts +23 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramFragment.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramFragment.js +101 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramFragment.js.map +1 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramMessage.d.ts +23 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramMessage.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramMessage.js +77 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramMessage.js.map +1 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramNote.d.ts +16 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramNote.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramNote.js +39 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramNote.js.map +1 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.d.ts +20 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.js +61 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.js.map +1 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.d.ts +27 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.js +65 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.js.map +1 -0
- package/dist/components/markdown-view/diagram/flowchartParser.d.ts +18 -0
- package/dist/components/markdown-view/diagram/flowchartParser.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/flowchartParser.js +370 -0
- package/dist/components/markdown-view/diagram/flowchartParser.js.map +1 -0
- package/dist/components/markdown-view/diagram/graphModel.d.ts +67 -0
- package/dist/components/markdown-view/diagram/graphModel.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/graphModel.js +0 -0
- package/dist/components/markdown-view/diagram/layoutFlowchart.d.ts +109 -0
- package/dist/components/markdown-view/diagram/layoutFlowchart.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/layoutFlowchart.js +185 -0
- package/dist/components/markdown-view/diagram/layoutFlowchart.js.map +1 -0
- package/dist/components/markdown-view/diagram/layoutSequence.d.ts +155 -0
- package/dist/components/markdown-view/diagram/layoutSequence.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/layoutSequence.js +478 -0
- package/dist/components/markdown-view/diagram/layoutSequence.js.map +1 -0
- package/dist/components/markdown-view/diagram/sequenceModel.d.ts +132 -0
- package/dist/components/markdown-view/diagram/sequenceModel.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/sequenceModel.js +0 -0
- package/dist/components/markdown-view/diagram/sequenceParser.d.ts +32 -0
- package/dist/components/markdown-view/diagram/sequenceParser.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/sequenceParser.js +312 -0
- package/dist/components/markdown-view/diagram/sequenceParser.js.map +1 -0
- package/dist/components/markdown-view/diagram/textMetrics.d.ts +63 -0
- package/dist/components/markdown-view/diagram/textMetrics.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/textMetrics.js +228 -0
- package/dist/components/markdown-view/diagram/textMetrics.js.map +1 -0
- package/dist/components/markdown-view/markdown-view.css +65 -0
- package/dist/components/markdown-view/markdown-view.d.ts +39 -0
- package/dist/components/markdown-view/markdown-view.d.ts.map +1 -1
- package/dist/components/markdown-view/markdown-view.js +99 -9
- package/dist/components/markdown-view/markdown-view.js.map +1 -1
- package/dist/components/nav-shell/nav-page.d.ts +7 -0
- package/dist/components/nav-shell/nav-page.d.ts.map +1 -1
- package/dist/components/nav-shell/nav-page.js.map +1 -1
- package/dist/components/nav-shell/nav-shell.d.ts +1 -1
- package/dist/components/nav-shell/nav-shell.d.ts.map +1 -1
- package/dist/components/nav-shell/nav-shell.js +1 -1
- package/dist/components/nav-shell/nav-shell.js.map +1 -1
- package/dist/components/nav-shell/nav-tree-util.d.ts +64 -2
- package/dist/components/nav-shell/nav-tree-util.d.ts.map +1 -1
- package/dist/components/nav-shell/nav-tree-util.js +29 -6
- package/dist/components/nav-shell/nav-tree-util.js.map +1 -1
- package/dist/components/nav-shell/spotlight.d.ts +3 -2
- package/dist/components/nav-shell/spotlight.d.ts.map +1 -1
- package/dist/components/nav-shell/spotlight.js +9 -6
- package/dist/components/nav-shell/spotlight.js.map +1 -1
- package/dist/components/nav-shell/use-nav-breadcrumbs.d.ts.map +1 -1
- package/dist/components/nav-shell/use-nav-breadcrumbs.js +9 -2
- package/dist/components/nav-shell/use-nav-breadcrumbs.js.map +1 -1
- package/dist/components/nav-shell/use-nav-entries.d.ts +21 -5
- package/dist/components/nav-shell/use-nav-entries.d.ts.map +1 -1
- package/dist/components/nav-shell/use-nav-entries.js +9 -4
- package/dist/components/nav-shell/use-nav-entries.js.map +1 -1
- package/dist/components/nav-shell/use-nav-tree.d.ts.map +1 -1
- package/dist/components/nav-shell/use-nav-tree.js +1 -1
- package/dist/components/nav-shell/use-nav-tree.js.map +1 -1
- package/dist/components/settings/settings-card-edge.d.ts +25 -0
- package/dist/components/settings/settings-card-edge.d.ts.map +1 -0
- package/dist/components/settings/settings-card-edge.js +29 -0
- package/dist/components/settings/settings-card-edge.js.map +1 -0
- package/dist/components/settings/settings-danger-section.d.ts.map +1 -1
- package/dist/components/settings/settings-danger-section.js +2 -1
- package/dist/components/settings/settings-danger-section.js.map +1 -1
- package/dist/components/settings/settings-layout.d.ts.map +1 -1
- package/dist/components/settings/settings-layout.js +1 -1
- package/dist/components/settings/settings-layout.js.map +1 -1
- package/dist/components/settings/settings-nav.d.ts.map +1 -1
- package/dist/components/settings/settings-nav.js +3 -3
- package/dist/components/settings/settings-nav.js.map +1 -1
- package/dist/components/settings/settings-row.js +2 -2
- package/dist/components/settings/settings-row.js.map +1 -1
- package/dist/components/settings/settings-section.d.ts.map +1 -1
- package/dist/components/settings/settings-section.js +3 -2
- package/dist/components/settings/settings-section.js.map +1 -1
- package/dist/components/ui/alert-dialog.d.ts +1 -1
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +6 -5
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.d.ts +2 -2
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +3 -2
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/avatar.d.ts +2 -2
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js +6 -5
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/badge.d.ts +13 -2
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js +51 -12
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts +2 -2
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.js +4 -3
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/button-group.js +2 -2
- package/dist/components/ui/button-group.js.map +1 -1
- package/dist/components/ui/button.js +2 -2
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/calendar.js +8 -8
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/card.d.ts +2 -2
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/card.js +4 -3
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/chart.js +7 -6
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/checkbox.js +1 -1
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/combobox.d.ts +1 -1
- package/dist/components/ui/combobox.d.ts.map +1 -1
- package/dist/components/ui/combobox.js +8 -8
- package/dist/components/ui/combobox.js.map +1 -1
- package/dist/components/ui/command.d.ts +2 -2
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +7 -6
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts +2 -2
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js +9 -8
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/dialog.d.ts +1 -1
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +5 -4
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/drawer.d.ts +1 -1
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/drawer.js +4 -4
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +2 -2
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +10 -9
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/empty.d.ts +1 -1
- package/dist/components/ui/empty.d.ts.map +1 -1
- package/dist/components/ui/empty.js +2 -2
- package/dist/components/ui/empty.js.map +1 -1
- package/dist/components/ui/hover-card.d.ts +1 -1
- package/dist/components/ui/hover-card.js +1 -1
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/input-group.d.ts +2 -2
- package/dist/components/ui/input-group.d.ts.map +1 -1
- package/dist/components/ui/input-group.js +4 -3
- package/dist/components/ui/input-group.js.map +1 -1
- package/dist/components/ui/input-otp.d.ts +1 -1
- package/dist/components/ui/input-otp.d.ts.map +1 -1
- package/dist/components/ui/input-otp.js +3 -3
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input.d.ts +1 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/input.js +2 -1
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/kbd.js +1 -1
- package/dist/components/ui/kbd.js.map +1 -1
- package/dist/components/ui/label.d.ts +1 -1
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/label.js +1 -0
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/menubar.d.ts +2 -2
- package/dist/components/ui/menubar.d.ts.map +1 -1
- package/dist/components/ui/menubar.js +10 -9
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/pagination.d.ts +1 -1
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination.js +1 -0
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/popover.d.ts +1 -1
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +2 -1
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/progress.d.ts +1 -1
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/progress.js +3 -3
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/resizable.js +2 -2
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/segmented.d.ts +11 -0
- package/dist/components/ui/segmented.d.ts.map +1 -1
- package/dist/components/ui/segmented.js +7 -3
- package/dist/components/ui/segmented.js.map +1 -1
- package/dist/components/ui/select.d.ts +1 -1
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +9 -8
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/separator.js +1 -1
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/sheet.d.ts +2 -2
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +4 -3
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sidebar.js +17 -17
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/skeleton.js +1 -1
- package/dist/components/ui/skeleton.js.map +1 -1
- package/dist/components/ui/slider.js +2 -2
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/sonner.js +1 -1
- package/dist/components/ui/switch.js +2 -2
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/table.d.ts +2 -2
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +6 -5
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/tabs.d.ts +1 -1
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/tabs.js +2 -2
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/textarea.d.ts +1 -1
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/textarea.js +2 -1
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/tooltip.d.ts +1 -1
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +3 -3
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/components/use-dialog/use-dialog.d.ts +2 -2
- package/dist/components/use-dialog/use-dialog.d.ts.map +1 -1
- package/dist/components/use-dialog/use-dialog.js +10 -6
- package/dist/components/use-dialog/use-dialog.js.map +1 -1
- package/dist/components/use-toast/use-toast.d.ts +9 -3
- package/dist/components/use-toast/use-toast.d.ts.map +1 -1
- package/dist/components/use-toast/use-toast.js +23 -22
- package/dist/components/use-toast/use-toast.js.map +1 -1
- package/dist/hooks/use-mobile.d.ts +10 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -1
- package/dist/hooks/use-mobile.js +19 -12
- package/dist/hooks/use-mobile.js.map +1 -1
- package/dist/lib/i18n-fr.d.ts +3 -3
- package/dist/lib/i18n-fr.d.ts.map +1 -1
- package/dist/lib/i18n-fr.js +265 -10
- package/dist/lib/i18n-fr.js.map +1 -1
- package/dist/styles.css +5 -5
- package/package.json +48 -47
- package/src/components/account/__tests__/account-router.spec.ts +29 -2
- package/src/components/account/__tests__/account-security-mfa-gate.browser.spec.tsx +76 -0
- package/src/components/account/account-connections.tsx +51 -19
- package/src/components/account/account-delete-dialog.tsx +24 -9
- package/src/components/account/account-header.tsx +10 -2
- package/src/components/account/account-keys.tsx +74 -30
- package/src/components/account/account-layout.tsx +8 -1
- package/src/components/account/account-mfa-dialog.tsx +233 -0
- package/src/components/account/account-password-dialog.tsx +42 -12
- package/src/components/account/account-profile.tsx +69 -28
- package/src/components/account/account-router-options.tsx +1 -0
- package/src/components/account/account-router-page.tsx +1 -0
- package/src/components/account/account-router.tsx +51 -8
- package/src/components/account/account-security.tsx +210 -22
- package/src/components/account/account-sessions.tsx +105 -23
- package/src/components/action-error-toaster/__tests__/action-error-toaster.browser.spec.tsx +114 -0
- package/src/components/admin/__tests__/admin-keys-token-dialog.browser.spec.tsx +1 -0
- package/src/components/admin/__tests__/admin-layout.browser.spec.tsx +2 -1
- package/src/components/admin/__tests__/admin-nav-i18n.browser.spec.tsx +152 -0
- package/src/components/admin/__tests__/admin-notifications-preview-body.browser.spec.tsx +128 -0
- package/src/components/admin/__tests__/admin-notifications-raw-tab.browser.spec.tsx +76 -0
- package/src/components/admin/__tests__/admin-notifications-status-badge.browser.spec.tsx +121 -0
- package/src/components/admin/__tests__/admin-router-page.spec.ts +2 -1
- package/src/components/admin/__tests__/admin-router.spec.ts +84 -1
- package/src/components/admin/__tests__/admin-status-labels.browser.spec.tsx +152 -0
- package/src/components/admin/__tests__/admin-user-cell.browser.spec.tsx +1 -0
- package/src/components/admin/__tests__/admin-user-detail-security-tab.browser.spec.tsx +92 -0
- package/src/components/admin/__tests__/admin-user-detail.spec.ts +1 -0
- package/src/components/admin/admin-analytics-query-panel.tsx +4 -3
- package/src/components/admin/admin-analytics-results.tsx +2 -2
- package/src/components/admin/admin-analytics.tsx +3 -3
- package/src/components/admin/admin-audits.tsx +3 -3
- package/src/components/admin/admin-dashboard-card.tsx +45 -0
- package/src/components/admin/admin-dashboard-count-card.tsx +89 -0
- package/src/components/admin/admin-dashboard.tsx +60 -0
- package/src/components/admin/admin-files.tsx +2 -2
- package/src/components/admin/admin-jobs-executions-panel.tsx +17 -13
- package/src/components/admin/admin-jobs-status-badge.tsx +6 -7
- package/src/components/admin/admin-jobs-status-labels.ts +46 -0
- package/src/components/admin/admin-jobs.tsx +4 -4
- package/src/components/admin/admin-keys-token-dialog.tsx +2 -2
- package/src/components/admin/admin-keys.tsx +2 -2
- package/src/components/admin/admin-layout.tsx +10 -5
- package/src/components/admin/admin-notifications-detail-tabs.tsx +167 -0
- package/src/components/admin/admin-notifications-detail.tsx +100 -0
- package/src/components/admin/admin-notifications-preview-body.tsx +104 -0
- package/src/components/admin/admin-notifications-preview-tab.tsx +55 -0
- package/src/components/admin/admin-notifications-raw-tab.tsx +76 -0
- package/src/components/admin/admin-notifications-status-badge.tsx +44 -0
- package/src/components/admin/admin-notifications-status-labels.ts +42 -0
- package/src/components/admin/admin-notifications-status-tones.ts +85 -0
- package/src/components/admin/admin-notifications-template-label.ts +22 -0
- package/src/components/admin/admin-notifications.tsx +400 -33
- package/src/components/admin/admin-parameters.tsx +16 -9
- package/src/components/admin/admin-payments.tsx +2 -2
- package/src/components/admin/admin-router-options.tsx +14 -10
- package/src/components/admin/admin-router-page.tsx +8 -5
- package/src/components/admin/admin-router.tsx +175 -46
- package/src/components/admin/admin-sessions.tsx +23 -5
- package/src/components/admin/admin-user-detail-audits-tab.tsx +5 -2
- package/src/components/admin/admin-user-detail-identity-aside.tsx +16 -93
- package/src/components/admin/admin-user-detail-overview-tab.tsx +1 -0
- package/src/components/admin/admin-user-detail-password-dialog.tsx +1 -0
- package/src/components/admin/admin-user-detail-profile-policy.spec.ts +1 -0
- package/src/components/admin/admin-user-detail-profile-policy.ts +1 -0
- package/src/components/admin/admin-user-detail-security-tab.tsx +71 -5
- package/src/components/admin/admin-user-detail-sessions-tab.tsx +15 -5
- package/src/components/admin/admin-user-detail.tsx +141 -110
- package/src/components/admin/admin-users-roles-picker.tsx +22 -15
- package/src/components/admin/admin-users.tsx +9 -15
- package/src/components/admin/admin-workflows-execution-sheet.tsx +18 -10
- package/src/components/admin/admin-workflows-executions-panel.tsx +17 -18
- package/src/components/admin/admin-workflows-status-badge.tsx +8 -7
- package/src/components/admin/admin-workflows-status-labels.ts +51 -0
- package/src/components/admin/admin-workflows.tsx +6 -4
- package/src/components/admin/diff-lines.spec.ts +1 -0
- package/src/components/admin/diff-lines.ts +1 -1
- package/src/components/admin/parameter-diff-dialog.tsx +3 -2
- package/src/components/admin/parameter-history-item.tsx +6 -5
- package/src/components/alepha-table/__tests__/alepha-table-row-key.browser.spec.tsx +106 -0
- package/src/components/alepha-table/__tests__/alepha-table-static.browser.spec.tsx +190 -0
- package/src/components/alepha-table/__tests__/paginate-local.spec.ts +286 -0
- package/src/components/alepha-table/__tests__/use-table-selection.browser.spec.tsx +1 -0
- package/src/components/alepha-table/alepha-table.tsx +408 -85
- package/src/components/alepha-table/paginate-local.ts +174 -0
- package/src/components/app-actions/__tests__/app-actions.browser.spec.tsx +1 -0
- package/src/components/app-shell/app-shell.tsx +42 -19
- package/src/components/auth/__tests__/auth-router.spec.ts +2 -1
- package/src/components/auth/auth-login.tsx +42 -34
- package/src/components/auth/auth-mfa-step.tsx +177 -0
- package/src/components/auth/auth-register.tsx +27 -26
- package/src/components/auth/auth-reset-password.tsx +24 -17
- package/src/components/auth/auth-router.tsx +4 -3
- package/src/components/auth/auth-verify-email.tsx +7 -7
- package/src/components/auth/provider-labels.ts +4 -0
- package/src/components/auth/safe-redirect.ts +14 -0
- package/src/components/auto-form/__tests__/auto-form-settings-card.browser.spec.tsx +1 -0
- package/src/components/auto-form/auto-form.tsx +60 -39
- package/src/components/brand-icon/brand-icon.tsx +2 -2
- package/src/components/button-dark/button-dark.tsx +2 -2
- package/src/components/button-language/button-language.tsx +2 -2
- package/src/components/button-theme/button-theme.tsx +2 -2
- package/src/components/button-user/button-user.tsx +4 -4
- package/src/components/captcha/turnstile-widget.tsx +6 -5
- package/src/components/control/__tests__/control-autofocus.browser.spec.tsx +107 -0
- package/src/components/control/control.tsx +20 -5
- package/src/components/control-array/__tests__/control-array-child-change.browser.spec.tsx +90 -0
- package/src/components/control-array/control-array.tsx +113 -28
- package/src/components/control-base/__tests__/form-field-a11y.browser.spec.tsx +1 -0
- package/src/components/control-base/field-i18n.ts +5 -3
- package/src/components/control-base/form-field.tsx +13 -13
- package/src/components/control-base/icon-hint.tsx +1 -1
- package/src/components/control-date/control-date.tsx +29 -6
- package/src/components/control-number/control-number.tsx +10 -3
- package/src/components/control-object/__tests__/control-object-clear.browser.spec.tsx +100 -0
- package/src/components/control-object/control-object.tsx +32 -10
- package/src/components/control-password/control-password.tsx +2 -1
- package/src/components/control-select/__tests__/control-select-clear-label.browser.spec.tsx +1 -0
- package/src/components/control-select/__tests__/control-select-deselect.browser.spec.tsx +1 -0
- package/src/components/control-select/__tests__/control-select-searchable.browser.spec.tsx +1 -0
- package/src/components/control-select/control-select.tsx +32 -18
- package/src/components/control-upload/control-upload.tsx +16 -10
- package/src/components/detail/__tests__/detail-aside.browser.spec.tsx +135 -0
- package/src/components/detail/__tests__/detail-layout.browser.spec.tsx +187 -0
- package/src/components/detail/detail-aside.tsx +198 -0
- package/src/components/detail/detail-layout.tsx +200 -0
- package/src/components/detail/use-detail-tab.tsx +41 -0
- package/src/components/email-body-frame/__tests__/email-body-frame.browser.spec.tsx +52 -0
- package/src/components/email-body-frame/email-body-frame.tsx +81 -0
- package/src/components/file-image/file-image.tsx +4 -2
- package/src/components/markdown-view/__tests__/markdown-view-mermaid.browser.spec.tsx +211 -0
- package/src/components/markdown-view/__tests__/markdown-view-raw-html.browser.spec.tsx +1 -0
- package/src/components/markdown-view/diagram/DiagramErrorBoundary.tsx +42 -0
- package/src/components/markdown-view/diagram/DiagramLabel.tsx +68 -0
- package/src/components/markdown-view/diagram/FlowchartDiagram.tsx +131 -0
- package/src/components/markdown-view/diagram/FlowchartDiagramCluster.tsx +59 -0
- package/src/components/markdown-view/diagram/FlowchartDiagramEdge.tsx +94 -0
- package/src/components/markdown-view/diagram/FlowchartDiagramNode.tsx +77 -0
- package/src/components/markdown-view/diagram/MermaidFence.tsx +96 -0
- package/src/components/markdown-view/diagram/SequenceDiagram.tsx +203 -0
- package/src/components/markdown-view/diagram/SequenceDiagramFragment.tsx +120 -0
- package/src/components/markdown-view/diagram/SequenceDiagramMessage.tsx +100 -0
- package/src/components/markdown-view/diagram/SequenceDiagramNote.tsx +46 -0
- package/src/components/markdown-view/diagram/SequenceDiagramParticipant.tsx +80 -0
- package/src/components/markdown-view/diagram/SequenceDiagramParticipantActor.tsx +74 -0
- package/src/components/markdown-view/diagram/__tests__/flowchart-diagram.browser.spec.tsx +210 -0
- package/src/components/markdown-view/diagram/__tests__/sequence-diagram.browser.spec.tsx +267 -0
- package/src/components/markdown-view/diagram/flowchartParser.spec.ts +379 -0
- package/src/components/markdown-view/diagram/flowchartParser.ts +475 -0
- package/src/components/markdown-view/diagram/graphModel.ts +72 -0
- package/src/components/markdown-view/diagram/layoutFlowchart.spec.ts +235 -0
- package/src/components/markdown-view/diagram/layoutFlowchart.ts +324 -0
- package/src/components/markdown-view/diagram/layoutSequence.spec.ts +535 -0
- package/src/components/markdown-view/diagram/layoutSequence.ts +764 -0
- package/src/components/markdown-view/diagram/sequenceModel.ts +141 -0
- package/src/components/markdown-view/diagram/sequenceParser.spec.ts +495 -0
- package/src/components/markdown-view/diagram/sequenceParser.ts +443 -0
- package/src/components/markdown-view/diagram/textMetrics.spec.ts +128 -0
- package/src/components/markdown-view/diagram/textMetrics.ts +296 -0
- package/src/components/markdown-view/markdown-view.css +65 -0
- package/src/components/markdown-view/markdown-view.tsx +146 -9
- package/src/components/nav-shell/__tests__/nav-tree-util.spec.ts +108 -1
- package/src/components/nav-shell/nav-page.tsx +8 -0
- package/src/components/nav-shell/nav-shell.tsx +6 -3
- package/src/components/nav-shell/nav-tree-util.ts +95 -2
- package/src/components/nav-shell/spotlight.tsx +24 -9
- package/src/components/nav-shell/use-nav-breadcrumbs.ts +10 -2
- package/src/components/nav-shell/use-nav-entries.ts +34 -7
- package/src/components/nav-shell/use-nav-tree.ts +5 -1
- package/src/components/settings/__tests__/settings-nav.browser.spec.tsx +1 -0
- package/src/components/settings/__tests__/settings-section.browser.spec.tsx +1 -0
- package/src/components/settings/settings-card-edge.ts +24 -0
- package/src/components/settings/settings-danger-section.tsx +7 -1
- package/src/components/settings/settings-layout.tsx +16 -1
- package/src/components/settings/settings-nav.tsx +12 -3
- package/src/components/settings/settings-row.tsx +2 -2
- package/src/components/settings/settings-section.tsx +2 -1
- package/src/components/ui/alert-dialog.tsx +6 -6
- package/src/components/ui/alert.tsx +4 -4
- package/src/components/ui/avatar.tsx +8 -8
- package/src/components/ui/badge.tsx +48 -2
- package/src/components/ui/breadcrumb.tsx +6 -6
- package/src/components/ui/button-group.tsx +2 -2
- package/src/components/ui/button.tsx +2 -2
- package/src/components/ui/calendar.tsx +8 -8
- package/src/components/ui/card.tsx +8 -8
- package/src/components/ui/chart.tsx +18 -6
- package/src/components/ui/checkbox.tsx +1 -1
- package/src/components/ui/combobox.tsx +16 -17
- package/src/components/ui/command.tsx +10 -11
- package/src/components/ui/context-menu.tsx +15 -15
- package/src/components/ui/dialog.tsx +5 -5
- package/src/components/ui/drawer.tsx +10 -10
- package/src/components/ui/dropdown-menu.tsx +17 -23
- package/src/components/ui/empty.tsx +5 -5
- package/src/components/ui/hover-card.tsx +2 -2
- package/src/components/ui/input-group.tsx +8 -5
- package/src/components/ui/input-otp.tsx +4 -4
- package/src/components/ui/input.tsx +2 -2
- package/src/components/ui/kbd.tsx +1 -1
- package/src/components/ui/label.tsx +4 -1
- package/src/components/ui/menubar.tsx +18 -18
- package/src/components/ui/pagination.tsx +1 -2
- package/src/components/ui/popover.tsx +2 -2
- package/src/components/ui/progress.tsx +4 -4
- package/src/components/ui/resizable.tsx +2 -2
- package/src/components/ui/segmented.tsx +36 -3
- package/src/components/ui/select.tsx +9 -9
- package/src/components/ui/separator.tsx +1 -1
- package/src/components/ui/sheet.tsx +7 -7
- package/src/components/ui/sidebar.tsx +20 -20
- package/src/components/ui/skeleton.tsx +1 -1
- package/src/components/ui/slider.tsx +2 -2
- package/src/components/ui/switch.tsx +2 -2
- package/src/components/ui/table.tsx +11 -9
- package/src/components/ui/tabs.tsx +4 -4
- package/src/components/ui/textarea.tsx +2 -2
- package/src/components/ui/tooltip.tsx +6 -4
- package/src/components/use-dialog/__tests__/use-dialog-providers.browser.spec.tsx +61 -0
- package/src/components/use-dialog/use-dialog.tsx +19 -6
- package/src/components/use-toast/__tests__/use-toast.browser.spec.tsx +19 -0
- package/src/components/use-toast/use-toast.tsx +38 -26
- package/src/hooks/use-mobile.ts +27 -14
- package/src/lib/__tests__/i18n-fr.spec.ts +31 -5
- package/src/lib/i18n-fr.ts +326 -11
- package/src/styles.css +5 -5
- package/dist/components/language-toggle/language-toggle.d.ts +0 -8
- package/dist/components/language-toggle/language-toggle.d.ts.map +0 -1
- package/dist/components/language-toggle/language-toggle.js +0 -49
- package/dist/components/language-toggle/language-toggle.js.map +0 -1
- package/dist/components/ui/accordion.d.ts +0 -7
- package/dist/components/ui/accordion.d.ts.map +0 -1
- package/dist/components/ui/accordion.js +0 -55
- package/dist/components/ui/accordion.js.map +0 -1
- package/dist/components/ui/aspect-ratio.d.ts +0 -5
- package/dist/components/ui/aspect-ratio.d.ts.map +0 -1
- package/dist/components/ui/aspect-ratio.js +0 -15
- package/dist/components/ui/aspect-ratio.js.map +0 -1
- package/dist/components/ui/carousel.d.ts +0 -29
- package/dist/components/ui/carousel.d.ts.map +0 -1
- package/dist/components/ui/carousel.js +0 -134
- package/dist/components/ui/carousel.js.map +0 -1
- package/dist/components/ui/collapsible.d.ts +0 -6
- package/dist/components/ui/collapsible.d.ts.map +0 -1
- package/dist/components/ui/collapsible.js +0 -26
- package/dist/components/ui/collapsible.js.map +0 -1
- package/dist/components/ui/direction.d.ts +0 -2
- package/dist/components/ui/direction.d.ts.map +0 -1
- package/dist/components/ui/direction.js +0 -3
- package/dist/components/ui/item.d.ts +0 -23
- package/dist/components/ui/item.d.ts.map +0 -1
- package/dist/components/ui/item.js +0 -122
- package/dist/components/ui/item.js.map +0 -1
- package/dist/components/ui/navigation-menu.d.ts +0 -12
- package/dist/components/ui/navigation-menu.d.ts.map +0 -1
- package/dist/components/ui/navigation-menu.js +0 -84
- package/dist/components/ui/navigation-menu.js.map +0 -1
- package/dist/components/ui/radio-group.d.ts +0 -6
- package/dist/components/ui/radio-group.d.ts.map +0 -1
- package/dist/components/ui/radio-group.js +0 -29
- package/dist/components/ui/radio-group.js.map +0 -1
- package/dist/components/ui/scroll-area.d.ts +0 -5
- package/dist/components/ui/scroll-area.d.ts.map +0 -1
- package/dist/components/ui/scroll-area.js +0 -38
- package/dist/components/ui/scroll-area.js.map +0 -1
- package/dist/components/ui/toggle-group.d.ts +0 -12
- package/dist/components/ui/toggle-group.d.ts.map +0 -1
- package/dist/components/ui/toggle-group.js +0 -54
- package/dist/components/ui/toggle-group.js.map +0 -1
- package/dist/components/ui/toggle.d.ts +0 -9
- package/dist/components/ui/toggle.d.ts.map +0 -1
- package/dist/components/ui/toggle.js +0 -38
- package/dist/components/ui/toggle.js.map +0 -1
- package/src/components/language-toggle/language-toggle.tsx +0 -66
- package/src/components/ui/accordion.tsx +0 -77
- package/src/components/ui/aspect-ratio.tsx +0 -22
- package/src/components/ui/carousel.tsx +0 -241
- package/src/components/ui/collapsible.tsx +0 -21
- package/src/components/ui/direction.tsx +0 -6
- package/src/components/ui/item.tsx +0 -200
- package/src/components/ui/navigation-menu.tsx +0 -170
- package/src/components/ui/radio-group.tsx +0 -37
- package/src/components/ui/scroll-area.tsx +0 -53
- package/src/components/ui/toggle-group.tsx +0 -88
- package/src/components/ui/toggle.tsx +0 -44
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Button } from "../ui/button.js";
|
|
2
|
+
import { Avatar, AvatarFallback, AvatarImage } from "../ui/avatar.js";
|
|
3
|
+
import { useEffect, useRef, useState } from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Check, Copy } from "lucide-react";
|
|
6
|
+
import { useI18n } from "alepha/react/i18n";
|
|
7
|
+
//#region src/components/detail/detail-aside.tsx
|
|
8
|
+
/**
|
|
9
|
+
* The identity panel of a detail page: a thumbnail and title above a dense
|
|
10
|
+
* label/value list.
|
|
11
|
+
*
|
|
12
|
+
* Dense rather than a marketing hero — the list is what a reader scans, so it
|
|
13
|
+
* is a `<dl>` of small caps labels over their values, and a row with nothing
|
|
14
|
+
* to say is left out by the caller rather than rendered empty.
|
|
15
|
+
*
|
|
16
|
+
* Extracted from the admin user detail page and shared by every detail page
|
|
17
|
+
* since, which is why the clipboard behaviour lives here: each of them wants
|
|
18
|
+
* a copyable id, and each of them had reimplemented it. It moved out of
|
|
19
|
+
* `components/admin/` alongside {@link DetailLayout} once a non-admin page
|
|
20
|
+
* (Lore's Epic view) became a consumer.
|
|
21
|
+
*/
|
|
22
|
+
const DetailAside = (props) => {
|
|
23
|
+
const { tr } = useI18n();
|
|
24
|
+
const [copiedLabel, setCopiedLabel] = useState();
|
|
25
|
+
const timer = useRef(void 0);
|
|
26
|
+
useEffect(() => () => {
|
|
27
|
+
if (timer.current) clearTimeout(timer.current);
|
|
28
|
+
}, []);
|
|
29
|
+
const copy = async (row) => {
|
|
30
|
+
if (!row.copy) return;
|
|
31
|
+
try {
|
|
32
|
+
await navigator.clipboard.writeText(row.copy);
|
|
33
|
+
setCopiedLabel(row.label);
|
|
34
|
+
if (timer.current) clearTimeout(timer.current);
|
|
35
|
+
timer.current = setTimeout(() => setCopiedLabel(void 0), 1500);
|
|
36
|
+
} catch {}
|
|
37
|
+
};
|
|
38
|
+
const initial = (props.fallback ?? props.title ?? "?").charAt(0).toUpperCase();
|
|
39
|
+
const showAvatar = props.avatar !== false;
|
|
40
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
41
|
+
className: "flex flex-col gap-4",
|
|
42
|
+
children: [showAvatar || props.title ? /* @__PURE__ */ jsxs("div", {
|
|
43
|
+
className: "flex items-center gap-3",
|
|
44
|
+
children: [showAvatar && /* @__PURE__ */ jsxs(Avatar, {
|
|
45
|
+
className: "size-10 rounded-md after:rounded-md",
|
|
46
|
+
children: [props.image && /* @__PURE__ */ jsx(AvatarImage, {
|
|
47
|
+
src: props.image,
|
|
48
|
+
alt: props.title ?? "",
|
|
49
|
+
className: "rounded-md"
|
|
50
|
+
}), /* @__PURE__ */ jsx(AvatarFallback, {
|
|
51
|
+
className: "rounded-md",
|
|
52
|
+
children: initial
|
|
53
|
+
})]
|
|
54
|
+
}), props.title ? /* @__PURE__ */ jsx("span", {
|
|
55
|
+
className: "min-w-0 flex-1 truncate text-sm font-semibold tracking-tight",
|
|
56
|
+
title: props.title,
|
|
57
|
+
children: props.title
|
|
58
|
+
}) : null]
|
|
59
|
+
}) : null, /* @__PURE__ */ jsx("dl", {
|
|
60
|
+
className: "flex flex-col divide-y overflow-hidden rounded-lg border text-sm",
|
|
61
|
+
children: props.rows.map((row) => /* @__PURE__ */ jsxs("div", {
|
|
62
|
+
className: "flex flex-col gap-0.5 px-3 py-2.5",
|
|
63
|
+
children: [/* @__PURE__ */ jsx("dt", {
|
|
64
|
+
className: "text-muted-foreground text-[11px] font-medium tracking-wide uppercase",
|
|
65
|
+
children: row.label
|
|
66
|
+
}), /* @__PURE__ */ jsx("dd", {
|
|
67
|
+
className: "min-w-0",
|
|
68
|
+
children: row.copy ? /* @__PURE__ */ jsxs("div", {
|
|
69
|
+
className: "flex items-center gap-1",
|
|
70
|
+
children: [row.value ?? /* @__PURE__ */ jsx("code", {
|
|
71
|
+
className: "text-muted-foreground min-w-0 flex-1 truncate font-mono text-xs",
|
|
72
|
+
title: row.copy,
|
|
73
|
+
children: row.copy
|
|
74
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
75
|
+
type: "button",
|
|
76
|
+
variant: "ghost",
|
|
77
|
+
size: "icon-xs",
|
|
78
|
+
onClick: () => copy(row),
|
|
79
|
+
"aria-label": String(tr("admin.detail.copyValue", {
|
|
80
|
+
default: `Copy ${row.label}`,
|
|
81
|
+
args: [row.label]
|
|
82
|
+
})),
|
|
83
|
+
className: "text-muted-foreground hover:text-foreground shrink-0",
|
|
84
|
+
children: copiedLabel === row.label ? /* @__PURE__ */ jsx(Check, { className: "size-3.5" }) : /* @__PURE__ */ jsx(Copy, { className: "size-3.5" })
|
|
85
|
+
})]
|
|
86
|
+
}) : row.value
|
|
87
|
+
})]
|
|
88
|
+
}, row.label))
|
|
89
|
+
})]
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
//#endregion
|
|
93
|
+
export { DetailAside };
|
|
94
|
+
|
|
95
|
+
//# sourceMappingURL=detail-aside.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detail-aside.js","names":[],"sources":["../../../src/components/detail/detail-aside.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@alepha/ui/components/ui/avatar\";\nimport { Button } from \"@alepha/ui/components/ui/button\";\nimport { useI18n } from \"alepha/react/i18n\";\nimport { Check, Copy } from \"lucide-react\";\nimport { useEffect, useRef, useState } from \"react\";\n\nexport interface DetailAsideRow {\n /**\n * Doubles as the React key, so two rows in one aside must not share a label.\n */\n label: string;\n value?: React.ReactNode;\n /**\n * Renders a copy-to-clipboard button beside the value. When `value` is\n * omitted the row renders this text as the value, in mono — the shape an id\n * row wants.\n */\n copy?: string;\n}\n\nexport interface DetailAsideProps {\n /**\n * Omit when something else on screen already names the thing — a\n * breadcrumb leaf, most often. With no title and no avatar the header\n * block is not rendered at all and the list starts at the top edge.\n */\n title?: string;\n /**\n * Thumbnail or avatar source. Falls back to {@link fallback}.\n */\n image?: string;\n /**\n * Shown in place of a missing image. Defaults to the title's initial.\n */\n fallback?: string;\n /**\n * Set `false` for an entity that has no avatar concept at all, and the\n * title stands alone.\n *\n * The letter fallback earns its place when the thing *has* a picture and\n * happens to be missing one — a user without an uploaded photo is still a\n * face-shaped hole. For something that could never have had one, a large\n * square holding the first letter of a title printed beside it is the same\n * character twice at two sizes.\n */\n avatar?: boolean;\n rows: DetailAsideRow[];\n}\n\n/**\n * The identity panel of a detail page: a thumbnail and title above a dense\n * label/value list.\n *\n * Dense rather than a marketing hero — the list is what a reader scans, so it\n * is a `<dl>` of small caps labels over their values, and a row with nothing\n * to say is left out by the caller rather than rendered empty.\n *\n * Extracted from the admin user detail page and shared by every detail page\n * since, which is why the clipboard behaviour lives here: each of them wants\n * a copyable id, and each of them had reimplemented it. It moved out of\n * `components/admin/` alongside {@link DetailLayout} once a non-admin page\n * (Lore's Epic view) became a consumer.\n */\nexport const DetailAside = (props: DetailAsideProps) => {\n const { tr } = useI18n();\n\n // Which row last had its value copied, so only that row shows the tick.\n const [copiedLabel, setCopiedLabel] = useState<string>();\n const timer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n useEffect(\n () => () => {\n if (timer.current) clearTimeout(timer.current);\n },\n [],\n );\n\n const copy = async (row: DetailAsideRow) => {\n if (!row.copy) return;\n try {\n await navigator.clipboard.writeText(row.copy);\n setCopiedLabel(row.label);\n if (timer.current) clearTimeout(timer.current);\n timer.current = setTimeout(() => setCopiedLabel(undefined), 1_500);\n } catch {\n // clipboard may be unavailable (insecure context); ignore\n }\n };\n\n const initial = (props.fallback ?? props.title ?? \"?\")\n .charAt(0)\n .toUpperCase();\n\n const showAvatar = props.avatar !== false;\n const header = showAvatar || props.title;\n\n return (\n <div className=\"flex flex-col gap-4\">\n {header ? (\n <div className=\"flex items-center gap-3\">\n {showAvatar && (\n <Avatar className=\"size-10 rounded-md after:rounded-md\">\n {props.image && (\n <AvatarImage\n src={props.image}\n alt={props.title ?? \"\"}\n className=\"rounded-md\"\n />\n )}\n <AvatarFallback className=\"rounded-md\">{initial}</AvatarFallback>\n </Avatar>\n )}\n {props.title ? (\n <span\n className=\"min-w-0 flex-1 truncate text-sm font-semibold tracking-tight\"\n title={props.title}\n >\n {props.title}\n </span>\n ) : null}\n </div>\n ) : null}\n {/* The list is a bordered card whose rows are divided from each other,\n rather than a run of rows separated by whitespace.\n\n It replaced a single `border-t` above the list, which existed only\n to separate it from the header and had to be dropped when there was\n no header to separate it from (a top border with empty space above\n it reads as a clipped element). The card's own border does that job\n on every side, so the conditional is gone: the panel looks the same\n whether or not a title sits above it.\n\n `divide-y` instead of a border on each row: a border-bottom on all\n of them doubles up against the card's own bottom edge, and skipping\n the last one by hand is the rule `divide-y` already encodes.\n\n `gap-3` had to go with it. Rows that are spaced apart AND ruled show\n the rule floating in the gap rather than meeting the rows it\n divides; `py-2.5` inside each row is what carries the rhythm now.\n\n `overflow-hidden` for the corners: with nothing painting a\n background today the radius is only on the border, but the first\n and last rows sit in the rounded corners and anything they gain\n later (a hover tint, a status band) would square them off. */}\n <dl className=\"flex flex-col divide-y overflow-hidden rounded-lg border text-sm\">\n {props.rows.map((row) => (\n <div key={row.label} className=\"flex flex-col gap-0.5 px-3 py-2.5\">\n <dt className=\"text-muted-foreground text-[11px] font-medium tracking-wide uppercase\">\n {row.label}\n </dt>\n <dd className=\"min-w-0\">\n {row.copy ? (\n <div className=\"flex items-center gap-1\">\n {row.value ?? (\n <code\n className=\"text-muted-foreground min-w-0 flex-1 truncate font-mono text-xs\"\n title={row.copy}\n >\n {row.copy}\n </code>\n )}\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-xs\"\n onClick={() => copy(row)}\n aria-label={String(\n tr(\"admin.detail.copyValue\", {\n default: `Copy ${row.label}`,\n args: [row.label],\n }),\n )}\n className=\"text-muted-foreground hover:text-foreground shrink-0\"\n >\n {copiedLabel === row.label ? (\n <Check className=\"size-3.5\" />\n ) : (\n <Copy className=\"size-3.5\" />\n )}\n </Button>\n </div>\n ) : (\n row.value\n )}\n </dd>\n </div>\n ))}\n </dl>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAuEA,MAAa,eAAe,UAA4B;CACtD,MAAM,EAAE,OAAO,QAAQ;CAGvB,MAAM,CAAC,aAAa,kBAAkB,SAAiB;CACvD,MAAM,QAAQ,OAAkD,KAAA,CAAS;CACzE,sBACc;EACV,IAAI,MAAM,SAAS,aAAa,MAAM,OAAO;CAC/C,GACA,CAAC,CACH;CAEA,MAAM,OAAO,OAAO,QAAwB;EAC1C,IAAI,CAAC,IAAI,MAAM;EACf,IAAI;GACF,MAAM,UAAU,UAAU,UAAU,IAAI,IAAI;GAC5C,eAAe,IAAI,KAAK;GACxB,IAAI,MAAM,SAAS,aAAa,MAAM,OAAO;GAC7C,MAAM,UAAU,iBAAiB,eAAe,KAAA,CAAS,GAAG,IAAK;EACnE,QAAQ,CAER;CACF;CAEA,MAAM,WAAW,MAAM,YAAY,MAAM,SAAS,IAAA,CAC/C,OAAO,CAAC,CAAC,CACT,YAAY;CAEf,MAAM,aAAa,MAAM,WAAW;CAGpC,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CAHa,cAAc,MAAM,QAK7B,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACG,cACC,qBAAC,QAAD;IAAQ,WAAU;IAAlB,UAAA,CACG,MAAM,SACL,oBAAC,aAAD;KACE,KAAK,MAAM;KACX,KAAK,MAAM,SAAS;KACpB,WAAU;IACX,CAAA,GAEH,oBAAC,gBAAD;KAAgB,WAAU;KAAc,UAAA;IAAwB,CAAA,CAC1D;GAET,CAAA,GAAA,MAAM,QACL,oBAAC,QAAD;IACE,WAAU;IACV,OAAO,MAAM;IAEZ,UAAA,MAAM;GACH,CAAA,IACJ,IACD;EACH,CAAA,IAAA,MAuBJ,oBAAC,MAAD;GAAI,WAAU;GACX,UAAA,MAAM,KAAK,KAAK,QACf,qBAAC,OAAD;IAAqB,WAAU;IAA/B,UAAA,CACE,oBAAC,MAAD;KAAI,WAAU;KACX,UAAA,IAAI;IACH,CAAA,GACJ,oBAAC,MAAD;KAAI,WAAU;KACX,UAAA,IAAI,OACH,qBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACG,IAAI,SACH,oBAAC,QAAD;OACE,WAAU;OACV,OAAO,IAAI;OAEV,UAAA,IAAI;MACD,CAAA,GAER,oBAAC,QAAD;OACE,MAAK;OACL,SAAQ;OACR,MAAK;OACL,eAAe,KAAK,GAAG;OACvB,cAAY,OACV,GAAG,0BAA0B;QAC3B,SAAS,QAAQ,IAAI;QACrB,MAAM,CAAC,IAAI,KAAK;OAClB,CAAC,CACH;OACA,WAAU;OAET,UAAA,gBAAgB,IAAI,QACnB,oBAAC,OAAD,EAAO,WAAU,WAAY,CAAA,IAE7B,oBAAC,MAAD,EAAM,WAAU,WAAY,CAAA;MAExB,CAAA,CACL;KAEL,CAAA,IAAA,IAAI;IAEJ,CAAA,CACD;GAvCK,GAAA,IAAI,KAuCT,CACN;EACC,CAAA,CACD;;AAET"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { ComponentType, SVGProps } from "react";
|
|
3
|
+
type IconType = ComponentType<SVGProps<SVGSVGElement>>;
|
|
4
|
+
export interface DetailTab {
|
|
5
|
+
value: string;
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* A trailing count. Passed through to `Segmented`, which colours it from
|
|
9
|
+
* the segment's own state — see {@link SegmentedOption.count} for why a
|
|
10
|
+
* count folded into `label` cannot be read on the active tab.
|
|
11
|
+
*/
|
|
12
|
+
count?: React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Rendered at `size-4` before the label. Passed as a component rather than
|
|
15
|
+
* an element so callers hand over data — every detail page used to repeat
|
|
16
|
+
* the same `inline-flex items-center gap-1.5` wrapper by hand.
|
|
17
|
+
*/
|
|
18
|
+
icon?: IconType;
|
|
19
|
+
}
|
|
20
|
+
export interface DetailNotFound {
|
|
21
|
+
message: string;
|
|
22
|
+
backLabel: string;
|
|
23
|
+
onBack: () => void;
|
|
24
|
+
}
|
|
25
|
+
export interface DetailLayoutProps {
|
|
26
|
+
/**
|
|
27
|
+
* The identity panel. Usually an {@link DetailAside}.
|
|
28
|
+
*/
|
|
29
|
+
aside: React.ReactNode;
|
|
30
|
+
tabs: DetailTab[];
|
|
31
|
+
tab: string;
|
|
32
|
+
onTabChange: (value: string) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Buttons for the right end of the toolbar.
|
|
35
|
+
*
|
|
36
|
+
* Size them `lg`. `Segmented`'s size tokens are cut to match a `<Button>`
|
|
37
|
+
* of the same token exactly, the tab selector on the left of this bar is
|
|
38
|
+
* `lg`, and nothing here can size what a caller passes: a `sm` button
|
|
39
|
+
* beside it is 28px against 36px, both centred in a 56px bar, and the two
|
|
40
|
+
* ends of the toolbar stop lining up.
|
|
41
|
+
*/
|
|
42
|
+
actions?: React.ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* Replaces the whole shell with a skeleton. Pass it only for the first load —
|
|
45
|
+
* a refetch that blanks the page an operator is reading is a regression, so
|
|
46
|
+
* a caller should gate this on "loading **and** no data yet".
|
|
47
|
+
*/
|
|
48
|
+
loading?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Replaces the whole shell with a message and a way back.
|
|
51
|
+
*/
|
|
52
|
+
notFound?: DetailNotFound;
|
|
53
|
+
children?: React.ReactNode;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The shell every detail page shares: a full-height identity aside, and a
|
|
57
|
+
* right column whose toolbar carries tab selection on the left and actions on
|
|
58
|
+
* the right.
|
|
59
|
+
*
|
|
60
|
+
* It lived at `components/admin/admin-detail-layout` while admin pages were
|
|
61
|
+
* its only consumers, and moved here when Lore's Epic page became the first
|
|
62
|
+
* one outside admin. Nothing about it was ever admin-specific — it imports a
|
|
63
|
+
* button, a segmented control and a skeleton — so the old name described the
|
|
64
|
+
* callers rather than the component. There is deliberately **no re-export
|
|
65
|
+
* left behind at the old path**: an alias nobody is forced to notice is an
|
|
66
|
+
* alias nobody removes.
|
|
67
|
+
*
|
|
68
|
+
* It owns the chrome and nothing else. Data, forms and mutations stay in the
|
|
69
|
+
* page that composes it, and each tab body is its own component that renders
|
|
70
|
+
* what it is given — the split that keeps a detail page from growing into one
|
|
71
|
+
* unreadable file.
|
|
72
|
+
*
|
|
73
|
+
* The aside is hidden below `md`. A phone gets the tabs full width rather than
|
|
74
|
+
* a 288px column and a sliver of content; the same facts are reachable from
|
|
75
|
+
* the tab bodies.
|
|
76
|
+
*
|
|
77
|
+
* ```tsx
|
|
78
|
+
* const [tab, setTab] = useDetailTab<"overview" | "stock">("overview");
|
|
79
|
+
*
|
|
80
|
+
* <DetailLayout
|
|
81
|
+
* aside={<DetailAside title={product.name} rows={rows} />}
|
|
82
|
+
* tabs={[{ value: "overview", label: "Overview", icon: Package }]}
|
|
83
|
+
* tab={tab}
|
|
84
|
+
* onTabChange={(v) => setTab(v as typeof tab)}
|
|
85
|
+
* actions={<Button size="sm">Publish</Button>}
|
|
86
|
+
* >
|
|
87
|
+
* {tab === "overview" && <OverviewTab product={product} />}
|
|
88
|
+
* </DetailLayout>
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
91
|
+
* Dialogs belong beside it, not inside `children` — they portal out anyway,
|
|
92
|
+
* and nesting them in the tab body unmounts them on a tab switch.
|
|
93
|
+
*/
|
|
94
|
+
export declare const DetailLayout: (props: DetailLayoutProps) => React.JSX.Element;
|
|
95
|
+
export {};
|
|
96
|
+
//# sourceMappingURL=detail-layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detail-layout.d.ts","sourceRoot":"","sources":["../../../src/components/detail/detail-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErD,KAAK,QAAQ,GAAG,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AAEvD,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;;;OAIG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;;;OAIG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,YAAY,UAAW,iBAAiB,sBA8FpD,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Button } from "../ui/button.js";
|
|
2
|
+
import { Segmented } from "../ui/segmented.js";
|
|
3
|
+
import { Skeleton } from "../ui/skeleton.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { ArrowLeft } from "lucide-react";
|
|
7
|
+
//#region src/components/detail/detail-layout.tsx
|
|
8
|
+
/**
|
|
9
|
+
* The shell every detail page shares: a full-height identity aside, and a
|
|
10
|
+
* right column whose toolbar carries tab selection on the left and actions on
|
|
11
|
+
* the right.
|
|
12
|
+
*
|
|
13
|
+
* It lived at `components/admin/admin-detail-layout` while admin pages were
|
|
14
|
+
* its only consumers, and moved here when Lore's Epic page became the first
|
|
15
|
+
* one outside admin. Nothing about it was ever admin-specific — it imports a
|
|
16
|
+
* button, a segmented control and a skeleton — so the old name described the
|
|
17
|
+
* callers rather than the component. There is deliberately **no re-export
|
|
18
|
+
* left behind at the old path**: an alias nobody is forced to notice is an
|
|
19
|
+
* alias nobody removes.
|
|
20
|
+
*
|
|
21
|
+
* It owns the chrome and nothing else. Data, forms and mutations stay in the
|
|
22
|
+
* page that composes it, and each tab body is its own component that renders
|
|
23
|
+
* what it is given — the split that keeps a detail page from growing into one
|
|
24
|
+
* unreadable file.
|
|
25
|
+
*
|
|
26
|
+
* The aside is hidden below `md`. A phone gets the tabs full width rather than
|
|
27
|
+
* a 288px column and a sliver of content; the same facts are reachable from
|
|
28
|
+
* the tab bodies.
|
|
29
|
+
*
|
|
30
|
+
* ```tsx
|
|
31
|
+
* const [tab, setTab] = useDetailTab<"overview" | "stock">("overview");
|
|
32
|
+
*
|
|
33
|
+
* <DetailLayout
|
|
34
|
+
* aside={<DetailAside title={product.name} rows={rows} />}
|
|
35
|
+
* tabs={[{ value: "overview", label: "Overview", icon: Package }]}
|
|
36
|
+
* tab={tab}
|
|
37
|
+
* onTabChange={(v) => setTab(v as typeof tab)}
|
|
38
|
+
* actions={<Button size="sm">Publish</Button>}
|
|
39
|
+
* >
|
|
40
|
+
* {tab === "overview" && <OverviewTab product={product} />}
|
|
41
|
+
* </DetailLayout>
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* Dialogs belong beside it, not inside `children` — they portal out anyway,
|
|
45
|
+
* and nesting them in the tab body unmounts them on a tab switch.
|
|
46
|
+
*/
|
|
47
|
+
const DetailLayout = (props) => {
|
|
48
|
+
if (props.loading) return /* @__PURE__ */ jsxs("div", {
|
|
49
|
+
className: "flex flex-col gap-4 p-6",
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-72" }),
|
|
52
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-40 w-full" }),
|
|
53
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-40 w-full" })
|
|
54
|
+
]
|
|
55
|
+
});
|
|
56
|
+
if (props.notFound) return /* @__PURE__ */ jsxs("div", {
|
|
57
|
+
className: "flex flex-col items-start gap-3 p-6",
|
|
58
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
59
|
+
className: "text-muted-foreground text-sm",
|
|
60
|
+
children: props.notFound.message
|
|
61
|
+
}), /* @__PURE__ */ jsxs(Button, {
|
|
62
|
+
variant: "outline",
|
|
63
|
+
onClick: props.notFound.onBack,
|
|
64
|
+
children: [/* @__PURE__ */ jsx(ArrowLeft, { className: "size-4" }), props.notFound.backLabel]
|
|
65
|
+
})]
|
|
66
|
+
});
|
|
67
|
+
const options = props.tabs.map((entry) => {
|
|
68
|
+
const Icon = entry.icon;
|
|
69
|
+
return {
|
|
70
|
+
value: entry.value,
|
|
71
|
+
count: entry.count,
|
|
72
|
+
label: Icon ? /* @__PURE__ */ jsxs("span", {
|
|
73
|
+
className: "inline-flex items-center gap-1.5",
|
|
74
|
+
children: [/* @__PURE__ */ jsx(Icon, { className: "size-4" }), entry.label]
|
|
75
|
+
}) : entry.label
|
|
76
|
+
};
|
|
77
|
+
});
|
|
78
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
79
|
+
className: "flex h-full min-h-0 flex-1 overflow-hidden",
|
|
80
|
+
children: [/* @__PURE__ */ jsx("aside", {
|
|
81
|
+
className: "border-border bg-background hidden w-72 shrink-0 flex-col gap-4 overflow-auto border-r p-4 md:flex",
|
|
82
|
+
children: props.aside
|
|
83
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
84
|
+
className: "flex min-h-0 min-w-0 flex-1 flex-col",
|
|
85
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
86
|
+
className: "bg-background flex h-14 shrink-0 items-center gap-2 border-b px-4",
|
|
87
|
+
children: [/* @__PURE__ */ jsx(Segmented, {
|
|
88
|
+
size: "lg",
|
|
89
|
+
options,
|
|
90
|
+
value: props.tab,
|
|
91
|
+
onChange: props.onTabChange
|
|
92
|
+
}), props.actions ? /* @__PURE__ */ jsx("div", {
|
|
93
|
+
className: "ml-auto flex items-center gap-2",
|
|
94
|
+
children: props.actions
|
|
95
|
+
}) : null]
|
|
96
|
+
}), props.children]
|
|
97
|
+
})]
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
//#endregion
|
|
101
|
+
export { DetailLayout };
|
|
102
|
+
|
|
103
|
+
//# sourceMappingURL=detail-layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detail-layout.js","names":[],"sources":["../../../src/components/detail/detail-layout.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { Button } from \"@alepha/ui/components/ui/button\";\nimport { Segmented } from \"@alepha/ui/components/ui/segmented\";\nimport { Skeleton } from \"@alepha/ui/components/ui/skeleton\";\nimport { ArrowLeft } from \"lucide-react\";\nimport type { ComponentType, SVGProps } from \"react\";\n\ntype IconType = ComponentType<SVGProps<SVGSVGElement>>;\n\nexport interface DetailTab {\n value: string;\n label: React.ReactNode;\n /**\n * A trailing count. Passed through to `Segmented`, which colours it from\n * the segment's own state — see {@link SegmentedOption.count} for why a\n * count folded into `label` cannot be read on the active tab.\n */\n count?: React.ReactNode;\n /**\n * Rendered at `size-4` before the label. Passed as a component rather than\n * an element so callers hand over data — every detail page used to repeat\n * the same `inline-flex items-center gap-1.5` wrapper by hand.\n */\n icon?: IconType;\n}\n\nexport interface DetailNotFound {\n message: string;\n backLabel: string;\n onBack: () => void;\n}\n\nexport interface DetailLayoutProps {\n /**\n * The identity panel. Usually an {@link DetailAside}.\n */\n aside: React.ReactNode;\n tabs: DetailTab[];\n tab: string;\n onTabChange: (value: string) => void;\n /**\n * Buttons for the right end of the toolbar.\n *\n * Size them `lg`. `Segmented`'s size tokens are cut to match a `<Button>`\n * of the same token exactly, the tab selector on the left of this bar is\n * `lg`, and nothing here can size what a caller passes: a `sm` button\n * beside it is 28px against 36px, both centred in a 56px bar, and the two\n * ends of the toolbar stop lining up.\n */\n actions?: React.ReactNode;\n /**\n * Replaces the whole shell with a skeleton. Pass it only for the first load —\n * a refetch that blanks the page an operator is reading is a regression, so\n * a caller should gate this on \"loading **and** no data yet\".\n */\n loading?: boolean;\n /**\n * Replaces the whole shell with a message and a way back.\n */\n notFound?: DetailNotFound;\n children?: React.ReactNode;\n}\n\n/**\n * The shell every detail page shares: a full-height identity aside, and a\n * right column whose toolbar carries tab selection on the left and actions on\n * the right.\n *\n * It lived at `components/admin/admin-detail-layout` while admin pages were\n * its only consumers, and moved here when Lore's Epic page became the first\n * one outside admin. Nothing about it was ever admin-specific — it imports a\n * button, a segmented control and a skeleton — so the old name described the\n * callers rather than the component. There is deliberately **no re-export\n * left behind at the old path**: an alias nobody is forced to notice is an\n * alias nobody removes.\n *\n * It owns the chrome and nothing else. Data, forms and mutations stay in the\n * page that composes it, and each tab body is its own component that renders\n * what it is given — the split that keeps a detail page from growing into one\n * unreadable file.\n *\n * The aside is hidden below `md`. A phone gets the tabs full width rather than\n * a 288px column and a sliver of content; the same facts are reachable from\n * the tab bodies.\n *\n * ```tsx\n * const [tab, setTab] = useDetailTab<\"overview\" | \"stock\">(\"overview\");\n *\n * <DetailLayout\n * aside={<DetailAside title={product.name} rows={rows} />}\n * tabs={[{ value: \"overview\", label: \"Overview\", icon: Package }]}\n * tab={tab}\n * onTabChange={(v) => setTab(v as typeof tab)}\n * actions={<Button size=\"sm\">Publish</Button>}\n * >\n * {tab === \"overview\" && <OverviewTab product={product} />}\n * </DetailLayout>\n * ```\n *\n * Dialogs belong beside it, not inside `children` — they portal out anyway,\n * and nesting them in the tab body unmounts them on a tab switch.\n */\nexport const DetailLayout = (props: DetailLayoutProps) => {\n if (props.loading) {\n return (\n <div className=\"flex flex-col gap-4 p-6\">\n <Skeleton className=\"h-10 w-72\" />\n <Skeleton className=\"h-40 w-full\" />\n <Skeleton className=\"h-40 w-full\" />\n </div>\n );\n }\n\n if (props.notFound) {\n return (\n <div className=\"flex flex-col items-start gap-3 p-6\">\n <p className=\"text-muted-foreground text-sm\">\n {props.notFound.message}\n </p>\n <Button variant=\"outline\" onClick={props.notFound.onBack}>\n <ArrowLeft className=\"size-4\" />\n {props.notFound.backLabel}\n </Button>\n </div>\n );\n }\n\n const options = props.tabs.map((entry) => {\n const Icon = entry.icon;\n return {\n value: entry.value,\n count: entry.count,\n label: Icon ? (\n <span className=\"inline-flex items-center gap-1.5\">\n <Icon className=\"size-4\" />\n {entry.label}\n </span>\n ) : (\n entry.label\n ),\n };\n });\n\n return (\n <div className=\"flex h-full min-h-0 flex-1 overflow-hidden\">\n {/* `p-4`, not `p-6`. The aside is a fixed 288px, so its padding comes\n straight out of the identity panel's width: at 24px a side the\n `DetailAside` card had 240px to fit a label, a value and sometimes\n a copy button, and read as undersized in a column that had room to\n spare. 16px gives it back 16px of card without letting the content\n touch the border. */}\n <aside className=\"border-border bg-background hidden w-72 shrink-0 flex-col gap-4 overflow-auto border-r p-4 md:flex\">\n {props.aside}\n </aside>\n\n {/* `min-w-0` is not decoration, and it is the horizontal twin of the\n `min-h-0` beside it. This column is a flex item on the row's\n horizontal main axis, so `min-width: auto` resolves to its content's\n min-content width and it refuses to shrink below it. A tab body\n wider than the viewport (the Questline board is `w-max`) then\n stretches this column past the viewport instead of overflowing\n inside it: the body's own `overflow-auto` sees a box as wide as its\n content and never scrolls, and the row's `overflow-hidden` simply\n clips whatever is past the edge, with no scrollbar to reach it.\n Measured on a 1276px viewport with a 16-card questline: without it\n the column is 3160px and `scrollWidth === clientWidth`; with it the\n column is 988px and the body scrolls 2172px. */}\n <div className=\"flex min-h-0 min-w-0 flex-1 flex-col\">\n <div className=\"bg-background flex h-14 shrink-0 items-center gap-2 border-b px-4\">\n {/* `lg` (h-9), not the `sm` (h-7) this started on. The toolbar is\n `h-14`, so at 28px the control filled exactly half of it and\n read as a small thing floating in a tall bar.\n\n This does give up the pixel-for-pixel match with the toolbar's\n action buttons: all three consumers pass `size=\"sm\"`, so the\n two were the same 28px before and are 28 vs 36 now. The match\n only ever held because both happened to pick the same token,\n and `actions` is caller JSX this component cannot size, so any\n increase here breaks it. Both are centred in a 56px bar, which\n is why 8px of difference does not show. */}\n <Segmented\n size=\"lg\"\n options={options}\n value={props.tab}\n onChange={props.onTabChange}\n />\n {props.actions ? (\n <div className=\"ml-auto flex items-center gap-2\">\n {props.actions}\n </div>\n ) : null}\n </div>\n {props.children}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyGA,MAAa,gBAAgB,UAA6B;CACxD,IAAI,MAAM,SACR,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA;GACE,oBAAC,UAAD,EAAU,WAAU,YAAa,CAAA;GACjC,oBAAC,UAAD,EAAU,WAAU,cAAe,CAAA;GACnC,oBAAC,UAAD,EAAU,WAAU,cAAe,CAAA;EAChC;;CAIT,IAAI,MAAM,UACR,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,oBAAC,KAAD;GAAG,WAAU;GACV,UAAA,MAAM,SAAS;EACf,CAAA,GACH,qBAAC,QAAD;GAAQ,SAAQ;GAAU,SAAS,MAAM,SAAS;GAAlD,UAAA,CACE,oBAAC,WAAD,EAAW,WAAU,SAAU,CAAA,GAC9B,MAAM,SAAS,SACV;EACL,CAAA,CAAA;;CAIT,MAAM,UAAU,MAAM,KAAK,KAAK,UAAU;EACxC,MAAM,OAAO,MAAM;EACnB,OAAO;GACL,OAAO,MAAM;GACb,OAAO,MAAM;GACb,OAAO,OACL,qBAAC,QAAD;IAAM,WAAU;IAAhB,UAAA,CACE,oBAAC,MAAD,EAAM,WAAU,SAAU,CAAA,GACzB,MAAM,KACH;GAEN,CAAA,IAAA,MAAM;EAEV;CACF,CAAC;CAED,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CAOE,oBAAC,SAAD;GAAO,WAAU;GACd,UAAA,MAAM;EACF,CAAA,GAcP,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CAYE,oBAAC,WAAD;KACE,MAAK;KACI;KACT,OAAO,MAAM;KACb,UAAU,MAAM;IACjB,CAAA,GACA,MAAM,UACL,oBAAC,OAAD;KAAK,WAAU;KACZ,UAAA,MAAM;IACJ,CAAA,IACH,IACD;GACJ,CAAA,GAAA,MAAM,QACJ;EACF,CAAA,CAAA;;AAET"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Binds a detail page's selected tab to `?tab=<key>`.
|
|
3
|
+
*
|
|
4
|
+
* `format: "querystring"` makes `useQueryParams` write with `replaceState`, so
|
|
5
|
+
* clicking through four tabs does not bury the page the operator arrived from
|
|
6
|
+
* under four history entries. The URL still carries the tab, which is what
|
|
7
|
+
* makes a deep link to "that user's sessions" shareable.
|
|
8
|
+
*
|
|
9
|
+
* The generic is the union of valid keys, so a caller gets `"overview" |
|
|
10
|
+
* "stock"` back rather than `string`. An unknown `?tab=` value in the URL is
|
|
11
|
+
* not validated here — it falls through to whatever the page renders for an
|
|
12
|
+
* unmatched key, the same way a hand-edited query param always could.
|
|
13
|
+
*/
|
|
14
|
+
export declare const useDetailTab: <T extends string>(defaultTab: T) => [T, (next: T) => void];
|
|
15
|
+
//# sourceMappingURL=use-detail-tab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-detail-tab.d.ts","sourceRoot":"","sources":["../../../src/components/detail/use-detail-tab.tsx"],"names":[],"mappings":"AAiBA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,MAAM,cAC/B,CAAC,KACZ,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAQvB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
import { z } from "alepha";
|
|
3
|
+
import { useQueryParams } from "alepha/react/router";
|
|
4
|
+
//#region src/components/detail/use-detail-tab.tsx
|
|
5
|
+
/**
|
|
6
|
+
* `.tsx` despite holding no JSX, like `use-confirmed-action.tsx` beside it.
|
|
7
|
+
* This package's `exports` map resolves `./components/*` to `*.tsx` only, so a
|
|
8
|
+
* `.ts` file here is reachable by a relative import within `@alepha/ui` and by
|
|
9
|
+
* nothing outside it — and `@alepha/commerce` imports this hook.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Module scope so its identity stays stable across renders — `useQueryParams`
|
|
13
|
+
* anchors on it, and a fresh reference each render would re-decode for nothing.
|
|
14
|
+
*/
|
|
15
|
+
const tabSchema = z.object({ tab: z.string().optional() });
|
|
16
|
+
/**
|
|
17
|
+
* Binds a detail page's selected tab to `?tab=<key>`.
|
|
18
|
+
*
|
|
19
|
+
* `format: "querystring"` makes `useQueryParams` write with `replaceState`, so
|
|
20
|
+
* clicking through four tabs does not bury the page the operator arrived from
|
|
21
|
+
* under four history entries. The URL still carries the tab, which is what
|
|
22
|
+
* makes a deep link to "that user's sessions" shareable.
|
|
23
|
+
*
|
|
24
|
+
* The generic is the union of valid keys, so a caller gets `"overview" |
|
|
25
|
+
* "stock"` back rather than `string`. An unknown `?tab=` value in the URL is
|
|
26
|
+
* not validated here — it falls through to whatever the page renders for an
|
|
27
|
+
* unmatched key, the same way a hand-edited query param always could.
|
|
28
|
+
*/
|
|
29
|
+
const useDetailTab = (defaultTab) => {
|
|
30
|
+
const [query, setQuery] = useQueryParams(tabSchema, { format: "querystring" });
|
|
31
|
+
const setTab = useCallback((next) => setQuery({ tab: next }), [setQuery]);
|
|
32
|
+
return [query.tab ?? defaultTab, setTab];
|
|
33
|
+
};
|
|
34
|
+
//#endregion
|
|
35
|
+
export { useDetailTab };
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=use-detail-tab.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-detail-tab.js","names":[],"sources":["../../../src/components/detail/use-detail-tab.tsx"],"sourcesContent":["import { z } from \"alepha\";\nimport { useQueryParams } from \"alepha/react/router\";\nimport { useCallback } from \"react\";\n\n/**\n * `.tsx` despite holding no JSX, like `use-confirmed-action.tsx` beside it.\n * This package's `exports` map resolves `./components/*` to `*.tsx` only, so a\n * `.ts` file here is reachable by a relative import within `@alepha/ui` and by\n * nothing outside it — and `@alepha/commerce` imports this hook.\n */\n\n/**\n * Module scope so its identity stays stable across renders — `useQueryParams`\n * anchors on it, and a fresh reference each render would re-decode for nothing.\n */\nconst tabSchema = z.object({ tab: z.string().optional() });\n\n/**\n * Binds a detail page's selected tab to `?tab=<key>`.\n *\n * `format: \"querystring\"` makes `useQueryParams` write with `replaceState`, so\n * clicking through four tabs does not bury the page the operator arrived from\n * under four history entries. The URL still carries the tab, which is what\n * makes a deep link to \"that user's sessions\" shareable.\n *\n * The generic is the union of valid keys, so a caller gets `\"overview\" |\n * \"stock\"` back rather than `string`. An unknown `?tab=` value in the URL is\n * not validated here — it falls through to whatever the page renders for an\n * unmatched key, the same way a hand-edited query param always could.\n */\nexport const useDetailTab = <T extends string>(\n defaultTab: T,\n): [T, (next: T) => void] => {\n const [query, setQuery] = useQueryParams(tabSchema, {\n format: \"querystring\",\n });\n\n const setTab = useCallback((next: T) => setQuery({ tab: next }), [setQuery]);\n\n return [(query.tab as T | undefined) ?? defaultTab, setTab];\n};\n"],"mappings":";;;;;;;;;;;;;;AAeA,MAAM,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC;;;;;;;;;;;;;;AAezD,MAAa,gBACX,eAC2B;CAC3B,MAAM,CAAC,OAAO,YAAY,eAAe,WAAW,EAClD,QAAQ,cACV,CAAC;CAED,MAAM,SAAS,aAAa,SAAY,SAAS,EAAE,KAAK,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC;CAE3E,OAAO,CAAE,MAAM,OAAyB,YAAY,MAAM;AAC5D"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface EmailBodyFrameProps {
|
|
3
|
+
/**
|
|
4
|
+
* Raw email HTML. May be a full document (`<html dir="rtl">…`) or a bare
|
|
5
|
+
* fragment.
|
|
6
|
+
*/
|
|
7
|
+
html: string;
|
|
8
|
+
/**
|
|
9
|
+
* Direction applied only when `html` is a bare fragment. A full document
|
|
10
|
+
* keeps whatever `dir` it declares for itself.
|
|
11
|
+
*/
|
|
12
|
+
dir?: "ltr" | "rtl";
|
|
13
|
+
/**
|
|
14
|
+
* Inline style overrides, mainly for sizing.
|
|
15
|
+
*/
|
|
16
|
+
style?: React.CSSProperties;
|
|
17
|
+
title?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Render email HTML inside a sandboxed `<iframe srcDoc>`, so the email's own
|
|
21
|
+
* document stays scoped to the preview.
|
|
22
|
+
*
|
|
23
|
+
* ⚠️ **Never swap this for `dangerouslySetInnerHTML`.** The HTML fragment
|
|
24
|
+
* parser hoists a body's `<html>` / `<body>` attributes onto the real page,
|
|
25
|
+
* so an email carrying `dir="rtl"` flips the entire admin UI to RTL. An
|
|
26
|
+
* iframe gives it a document of its own.
|
|
27
|
+
*
|
|
28
|
+
* The sandbox is empty on purpose, and it does three jobs:
|
|
29
|
+
*
|
|
30
|
+
* - blocks scripts in a body nobody has reviewed,
|
|
31
|
+
* - keeps the email's CSS out of the admin's,
|
|
32
|
+
* - blocks top-level navigation, which is what makes the **live** one-click
|
|
33
|
+
* unsubscribe link the notification renderer mints inert. Clicking it in a
|
|
34
|
+
* preview would otherwise unsubscribe the recipient.
|
|
35
|
+
*/
|
|
36
|
+
export declare const EmailBodyFrame: (props: EmailBodyFrameProps) => React.JSX.Element;
|
|
37
|
+
//# sourceMappingURL=email-body-frame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-body-frame.d.ts","sourceRoot":"","sources":["../../../src/components/email-body-frame/email-body-frame.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,cAAc,UAAW,mBAAmB,sBAuCxD,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/email-body-frame/email-body-frame.tsx
|
|
4
|
+
/**
|
|
5
|
+
* Render email HTML inside a sandboxed `<iframe srcDoc>`, so the email's own
|
|
6
|
+
* document stays scoped to the preview.
|
|
7
|
+
*
|
|
8
|
+
* ⚠️ **Never swap this for `dangerouslySetInnerHTML`.** The HTML fragment
|
|
9
|
+
* parser hoists a body's `<html>` / `<body>` attributes onto the real page,
|
|
10
|
+
* so an email carrying `dir="rtl"` flips the entire admin UI to RTL. An
|
|
11
|
+
* iframe gives it a document of its own.
|
|
12
|
+
*
|
|
13
|
+
* The sandbox is empty on purpose, and it does three jobs:
|
|
14
|
+
*
|
|
15
|
+
* - blocks scripts in a body nobody has reviewed,
|
|
16
|
+
* - keeps the email's CSS out of the admin's,
|
|
17
|
+
* - blocks top-level navigation, which is what makes the **live** one-click
|
|
18
|
+
* unsubscribe link the notification renderer mints inert. Clicking it in a
|
|
19
|
+
* preview would otherwise unsubscribe the recipient.
|
|
20
|
+
*/
|
|
21
|
+
const EmailBodyFrame = (props) => {
|
|
22
|
+
const dir = props.dir ?? "ltr";
|
|
23
|
+
const srcDoc = useMemo(() => {
|
|
24
|
+
const content = props.html ?? "";
|
|
25
|
+
if (/<html[\s>]/i.test(content)) return content;
|
|
26
|
+
return `<!DOCTYPE html><html dir="${dir}"><head><meta charset="utf-8"><base target="_blank"><style>html,body{margin:0}body{padding:24px 28px;font-family:-apple-system,system-ui,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;font-size:14px;color:#1b2540;line-height:1.5}</style></head><body dir="${dir}">${content}</body></html>`;
|
|
27
|
+
}, [props.html, dir]);
|
|
28
|
+
return /* @__PURE__ */ jsx("iframe", {
|
|
29
|
+
title: props.title ?? "Email preview",
|
|
30
|
+
srcDoc,
|
|
31
|
+
sandbox: "",
|
|
32
|
+
style: {
|
|
33
|
+
width: "100%",
|
|
34
|
+
height: "100%",
|
|
35
|
+
border: "none",
|
|
36
|
+
background: "#fff",
|
|
37
|
+
...props.style
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { EmailBodyFrame };
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=email-body-frame.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-body-frame.js","names":[],"sources":["../../../src/components/email-body-frame/email-body-frame.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { useMemo } from \"react\";\n\nexport interface EmailBodyFrameProps {\n /**\n * Raw email HTML. May be a full document (`<html dir=\"rtl\">…`) or a bare\n * fragment.\n */\n html: string;\n /**\n * Direction applied only when `html` is a bare fragment. A full document\n * keeps whatever `dir` it declares for itself.\n */\n dir?: \"ltr\" | \"rtl\";\n /**\n * Inline style overrides, mainly for sizing.\n */\n style?: React.CSSProperties;\n title?: string;\n}\n\n/**\n * Render email HTML inside a sandboxed `<iframe srcDoc>`, so the email's own\n * document stays scoped to the preview.\n *\n * ⚠️ **Never swap this for `dangerouslySetInnerHTML`.** The HTML fragment\n * parser hoists a body's `<html>` / `<body>` attributes onto the real page,\n * so an email carrying `dir=\"rtl\"` flips the entire admin UI to RTL. An\n * iframe gives it a document of its own.\n *\n * The sandbox is empty on purpose, and it does three jobs:\n *\n * - blocks scripts in a body nobody has reviewed,\n * - keeps the email's CSS out of the admin's,\n * - blocks top-level navigation, which is what makes the **live** one-click\n * unsubscribe link the notification renderer mints inert. Clicking it in a\n * preview would otherwise unsubscribe the recipient.\n */\nexport const EmailBodyFrame = (props: EmailBodyFrameProps) => {\n const dir = props.dir ?? \"ltr\";\n\n const srcDoc = useMemo(() => {\n const content = props.html ?? \"\";\n // Already a complete document: render it untouched rather than nesting\n // <html> inside <html>. It sets its own direction.\n if (/<html[\\s>]/i.test(content)) {\n return content;\n }\n // A fragment gets a minimal document so it renders with the requested\n // direction and readable defaults, still fully isolated.\n return (\n `<!DOCTYPE html><html dir=\"${dir}\"><head><meta charset=\"utf-8\">` +\n `<base target=\"_blank\">` +\n \"<style>html,body{margin:0}body{padding:24px 28px;\" +\n \"font-family:-apple-system,system-ui,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;\" +\n \"font-size:14px;color:#1b2540;line-height:1.5}</style></head>\" +\n `<body dir=\"${dir}\">${content}</body></html>`\n );\n }, [props.html, dir]);\n\n return (\n <iframe\n title={props.title ?? \"Email preview\"}\n srcDoc={srcDoc}\n sandbox=\"\"\n style={{\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n // An email is authored against a white ground. Painting it with the\n // admin's surface colour would misrepresent what the recipient saw,\n // and in dark mode it would hide dark text entirely.\n background: \"#fff\",\n ...props.style,\n }}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAyCA,MAAa,kBAAkB,UAA+B;CAC5D,MAAM,MAAM,MAAM,OAAO;CAEzB,MAAM,SAAS,cAAc;EAC3B,MAAM,UAAU,MAAM,QAAQ;EAG9B,IAAI,cAAc,KAAK,OAAO,GAC5B,OAAO;EAIT,OACE,6BAA6B,IAAI,+PAKnB,IAAI,IAAI,QAAQ;CAElC,GAAG,CAAC,MAAM,MAAM,GAAG,CAAC;CAEpB,OACE,oBAAC,UAAD;EACE,OAAO,MAAM,SAAS;EACd;EACR,SAAQ;EACR,OAAO;GACL,OAAO;GACP,QAAQ;GACR,QAAQ;GAIR,YAAY;GACZ,GAAG,MAAM;EACX;CACD,CAAA;AAEL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-image.d.ts","sourceRoot":"","sources":["../../../src/components/file-image/file-image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAEtE,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"file-image.d.ts","sourceRoot":"","sources":["../../../src/components/file-image/file-image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAEtE,MAAM,WAAW,cAAe,SAAQ,IAAI,CAC1C,cAAc,CAAC,KAAK,CAAC,EACrB,KAAK,GAAG,IAAI,CACb;IACC;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,UAAW,cAAc,gCAmB9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-image.js","names":[],"sources":["../../../src/components/file-image/file-image.tsx"],"sourcesContent":["import { type ComponentProps, type ReactNode, useState } from \"react\";\n\nexport interface FileImageProps
|
|
1
|
+
{"version":3,"file":"file-image.js","names":[],"sources":["../../../src/components/file-image/file-image.tsx"],"sourcesContent":["import { type ComponentProps, type ReactNode, useState } from \"react\";\n\nexport interface FileImageProps extends Omit<\n ComponentProps<\"img\">,\n \"src\" | \"id\"\n> {\n /**\n * File id (uuid) served by the Alepha files module. Absent → renders\n * `fallback`. (Repurposes the `id` slot — the raw HTML `id` attribute\n * isn't forwarded.)\n */\n id?: string | null;\n /**\n * Serve via the anonymous, edge-cacheable `/api/public/files/:id` route\n * instead of the authenticated `/api/files/:id`. Only valid for files the\n * server opts into (`FileAccessProvider.assertPublic`). Default:\n * authenticated.\n */\n public?: boolean;\n /**\n * Rendered when `id` is missing OR the image fails to load (deleted, 404,\n * forbidden) — a placeholder icon/initials instead of a broken-image glyph.\n */\n fallback?: ReactNode;\n}\n\n/**\n * `<img>` for a file served by the Alepha files module, addressed by uuid.\n *\n * Resolves the src from `id` (`public` picks the anonymous edge-cacheable\n * route vs the authenticated one), lazy-loads, and renders `fallback` when\n * the id is missing or the image fails to load — so a deleted/forbidden\n * file shows a placeholder instead of a broken-image glyph.\n */\nexport const FileImage = (props: FileImageProps) => {\n const { id, public: isPublic, fallback = null, ...imgProps } = props;\n // Track the id that failed so a later id change re-attempts the load.\n const [erroredId, setErroredId] = useState<string | null>(null);\n\n if (!id || erroredId === id) {\n return <>{fallback}</>;\n }\n\n const src = isPublic ? `/api/public/files/${id}` : `/api/files/${id}`;\n return (\n <img\n alt=\"\"\n src={src}\n loading=\"lazy\"\n onError={() => setErroredId(id)}\n {...imgProps}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;AAkCA,MAAa,aAAa,UAA0B;CAClD,MAAM,EAAE,IAAI,QAAQ,UAAU,WAAW,MAAM,GAAG,aAAa;CAE/D,MAAM,CAAC,WAAW,gBAAgB,SAAwB,IAAI;CAE9D,IAAI,CAAC,MAAM,cAAc,IACvB,OAAO,oBAAA,YAAA,EAAA,UAAG,SAAW,CAAA;CAIvB,OACE,oBAAC,OAAD;EACE,KAAI;EACJ,KAJQ,WAAW,qBAAqB,OAAO,cAAc;EAK7D,SAAQ;EACR,eAAe,aAAa,EAAE;EAC9B,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Component, type ReactNode } from "react";
|
|
2
|
+
export interface DiagramErrorBoundaryProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
/**
|
|
5
|
+
* Rendered instead of the children once anything below has thrown.
|
|
6
|
+
*/
|
|
7
|
+
fallback: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
interface DiagramErrorBoundaryState {
|
|
10
|
+
failed: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Renders the code block instead of the diagram if anything below throws.
|
|
14
|
+
*
|
|
15
|
+
* The three layers all refuse rather than throw, so this should never fire,
|
|
16
|
+
* which is exactly why it exists. `MarkdownView` is mounted on every quest,
|
|
17
|
+
* epic, comment and folio in the app, and a bug in the emitter must cost the
|
|
18
|
+
* one fence it is drawing, never the page it sits on.
|
|
19
|
+
*
|
|
20
|
+
* A class is not a style choice here: `componentDidCatch` has no hook.
|
|
21
|
+
*/
|
|
22
|
+
export declare class DiagramErrorBoundary extends Component<DiagramErrorBoundaryProps, DiagramErrorBoundaryState> {
|
|
23
|
+
state: DiagramErrorBoundaryState;
|
|
24
|
+
static getDerivedStateFromError(): DiagramErrorBoundaryState;
|
|
25
|
+
render(): ReactNode;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=DiagramErrorBoundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DiagramErrorBoundary.d.ts","sourceRoot":"","sources":["../../../../src/components/markdown-view/diagram/DiagramErrorBoundary.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAElD,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,UAAU,yBAAyB;IACjC,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;GASG;AACH,qBAAa,oBAAqB,SAAQ,SAAS,CACjD,yBAAyB,EACzB,yBAAyB,CAC1B;IACC,KAAK,EAAE,yBAAyB,CAAqB;IAErD,MAAM,CAAC,wBAAwB,IAAI,yBAAyB,CAE3D;IAED,MAAM,cAEL;CACF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Component } from "react";
|
|
2
|
+
//#region src/components/markdown-view/diagram/DiagramErrorBoundary.tsx
|
|
3
|
+
/**
|
|
4
|
+
* Renders the code block instead of the diagram if anything below throws.
|
|
5
|
+
*
|
|
6
|
+
* The three layers all refuse rather than throw, so this should never fire,
|
|
7
|
+
* which is exactly why it exists. `MarkdownView` is mounted on every quest,
|
|
8
|
+
* epic, comment and folio in the app, and a bug in the emitter must cost the
|
|
9
|
+
* one fence it is drawing, never the page it sits on.
|
|
10
|
+
*
|
|
11
|
+
* A class is not a style choice here: `componentDidCatch` has no hook.
|
|
12
|
+
*/
|
|
13
|
+
var DiagramErrorBoundary = class extends Component {
|
|
14
|
+
state = { failed: false };
|
|
15
|
+
static getDerivedStateFromError() {
|
|
16
|
+
return { failed: true };
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
return this.state.failed ? this.props.fallback : this.props.children;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { DiagramErrorBoundary };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=DiagramErrorBoundary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DiagramErrorBoundary.js","names":[],"sources":["../../../../src/components/markdown-view/diagram/DiagramErrorBoundary.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { Component, type ReactNode } from \"react\";\n\nexport interface DiagramErrorBoundaryProps {\n children: ReactNode;\n /**\n * Rendered instead of the children once anything below has thrown.\n */\n fallback: ReactNode;\n}\n\ninterface DiagramErrorBoundaryState {\n failed: boolean;\n}\n\n/**\n * Renders the code block instead of the diagram if anything below throws.\n *\n * The three layers all refuse rather than throw, so this should never fire,\n * which is exactly why it exists. `MarkdownView` is mounted on every quest,\n * epic, comment and folio in the app, and a bug in the emitter must cost the\n * one fence it is drawing, never the page it sits on.\n *\n * A class is not a style choice here: `componentDidCatch` has no hook.\n */\nexport class DiagramErrorBoundary extends Component<\n DiagramErrorBoundaryProps,\n DiagramErrorBoundaryState\n> {\n state: DiagramErrorBoundaryState = { failed: false };\n\n static getDerivedStateFromError(): DiagramErrorBoundaryState {\n return { failed: true };\n }\n\n render() {\n return this.state.failed ? this.props.fallback : this.props.children;\n }\n}\n"],"mappings":";;;;;;;;;;;;AA4BA,IAAa,uBAAb,cAA0C,UAGxC;CACA,QAAmC,EAAE,QAAQ,MAAM;CAEnD,OAAO,2BAAsD;EAC3D,OAAO,EAAE,QAAQ,KAAK;CACxB;CAEA,SAAS;EACP,OAAO,KAAK,MAAM,SAAS,KAAK,MAAM,WAAW,KAAK,MAAM;CAC9D;AACF"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Two decimals is plenty for a diagram and keeps the emitted attributes
|
|
4
|
+
* readable; a layout's raw coordinates carry a dozen.
|
|
5
|
+
*
|
|
6
|
+
* It lives here rather than in either emitter because both of them draw
|
|
7
|
+
* with it, the same way both measure with `textMetrics.ts`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const round: (value: number) => number;
|
|
10
|
+
export interface DiagramLabelProps {
|
|
11
|
+
/**
|
|
12
|
+
* Already wrapped and capped by `measureLabel` - draw exactly these.
|
|
13
|
+
*/
|
|
14
|
+
lines: string[];
|
|
15
|
+
centerX: number;
|
|
16
|
+
centerY: number;
|
|
17
|
+
fontSize: number;
|
|
18
|
+
fill: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A centred, multi-line label, one `tspan` per line. Shared by both
|
|
22
|
+
* diagram pipelines: a flowchart node label and a sequence message label
|
|
23
|
+
* are the same drawing problem.
|
|
24
|
+
*
|
|
25
|
+
* The line box has to match `DIAGRAM_LINE_HEIGHT`, which is what
|
|
26
|
+
* `measureLabel` sized the box with: text and box disagreeing is the
|
|
27
|
+
* failure mode this whole metrics path exists to avoid.
|
|
28
|
+
*
|
|
29
|
+
* `dominant-baseline` is not used: jsdom and older Safari disagree about it,
|
|
30
|
+
* and shifting the first line by hand is arithmetic that works everywhere.
|
|
31
|
+
*/
|
|
32
|
+
export declare const DiagramLabel: (props: DiagramLabelProps) => React.JSX.Element;
|
|
33
|
+
//# sourceMappingURL=DiagramLabel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DiagramLabel.d.ts","sourceRoot":"","sources":["../../../../src/components/markdown-view/diagram/DiagramLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,UAAW,MAAM,KAAG,MAAuC,CAAC;AAE9E,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,UAAW,iBAAiB,sBA6BpD,CAAC"}
|