@alepha/ui 0.25.2 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +210 -2
- package/dist/components/account/account-connections.d.ts +16 -0
- package/dist/components/account/account-connections.d.ts.map +1 -0
- package/dist/components/account/account-connections.js +76 -0
- package/dist/components/account/account-connections.js.map +1 -0
- package/dist/components/account/account-delete-dialog.d.ts +44 -0
- package/dist/components/account/account-delete-dialog.d.ts.map +1 -0
- package/dist/components/account/account-delete-dialog.js +126 -0
- package/dist/components/account/account-delete-dialog.js.map +1 -0
- package/dist/components/account/account-header.d.ts +33 -0
- package/dist/components/account/account-header.d.ts.map +1 -0
- package/dist/components/account/account-header.js +43 -0
- package/dist/components/account/account-header.js.map +1 -0
- package/dist/components/account/account-keys.d.ts +23 -0
- package/dist/components/account/account-keys.d.ts.map +1 -0
- package/dist/components/account/account-keys.js +168 -0
- package/dist/components/account/account-keys.js.map +1 -0
- package/dist/components/account/account-layout.d.ts +32 -0
- package/dist/components/account/account-layout.d.ts.map +1 -0
- package/dist/components/account/account-layout.js +56 -0
- package/dist/components/account/account-layout.js.map +1 -0
- package/dist/components/account/account-password-dialog.d.ts +31 -0
- package/dist/components/account/account-password-dialog.d.ts.map +1 -0
- package/dist/components/account/account-password-dialog.js +120 -0
- package/dist/components/account/account-password-dialog.js.map +1 -0
- package/dist/components/account/account-profile.d.ts +27 -0
- package/dist/components/account/account-profile.d.ts.map +1 -0
- package/dist/components/account/account-profile.js +217 -0
- package/dist/components/account/account-profile.js.map +1 -0
- package/dist/components/account/account-router-options.d.ts +77 -0
- package/dist/components/account/account-router-options.d.ts.map +1 -0
- package/dist/components/account/account-router-options.js +22 -0
- package/dist/components/account/account-router-options.js.map +1 -0
- package/dist/components/account/account-router-page.d.ts +49 -0
- package/dist/components/account/account-router-page.d.ts.map +1 -0
- package/dist/components/account/account-router-page.js +61 -0
- package/dist/components/account/account-router-page.js.map +1 -0
- package/dist/components/account/account-router.d.ts +215 -0
- package/dist/components/account/account-router.d.ts.map +1 -0
- package/dist/components/account/account-router.js +217 -0
- package/dist/components/account/account-router.js.map +1 -0
- package/dist/components/account/account-security.d.ts +22 -0
- package/dist/components/account/account-security.d.ts.map +1 -0
- package/dist/components/account/account-security.js +107 -0
- package/dist/components/account/account-security.js.map +1 -0
- package/dist/components/account/account-sessions.d.ts +17 -0
- package/dist/components/account/account-sessions.d.ts.map +1 -0
- package/dist/components/account/account-sessions.js +121 -0
- package/dist/components/account/account-sessions.js.map +1 -0
- package/dist/components/action-error-toaster/action-error-toaster.d.ts +39 -0
- package/dist/components/action-error-toaster/action-error-toaster.d.ts.map +1 -0
- package/dist/components/action-error-toaster/action-error-toaster.js +40 -0
- package/dist/components/action-error-toaster/action-error-toaster.js.map +1 -0
- package/dist/components/admin/admin-analytics-query-panel.d.ts +16 -0
- package/dist/components/admin/admin-analytics-query-panel.d.ts.map +1 -0
- package/dist/components/admin/admin-analytics-query-panel.js +117 -0
- package/dist/components/admin/admin-analytics-query-panel.js.map +1 -0
- package/dist/components/admin/admin-analytics-results.d.ts +15 -0
- package/dist/components/admin/admin-analytics-results.d.ts.map +1 -0
- package/dist/components/admin/admin-analytics-results.js +56 -0
- package/dist/components/admin/admin-analytics-results.js.map +1 -0
- package/dist/components/admin/admin-analytics.d.ts +9 -0
- package/dist/components/admin/admin-analytics.d.ts.map +1 -0
- package/dist/components/admin/admin-analytics.js +66 -0
- package/dist/components/admin/admin-analytics.js.map +1 -0
- package/dist/components/admin/admin-audits.d.ts +4 -0
- package/dist/components/admin/admin-audits.d.ts.map +1 -0
- package/dist/components/admin/admin-audits.js +173 -0
- package/dist/components/admin/admin-audits.js.map +1 -0
- 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 +4 -0
- package/dist/components/admin/admin-files.d.ts.map +1 -0
- package/dist/components/admin/admin-files.js +237 -0
- package/dist/components/admin/admin-files.js.map +1 -0
- package/dist/components/admin/admin-jobs-executions-panel.d.ts +11 -0
- package/dist/components/admin/admin-jobs-executions-panel.d.ts.map +1 -0
- package/dist/components/admin/admin-jobs-executions-panel.js +185 -0
- package/dist/components/admin/admin-jobs-executions-panel.js.map +1 -0
- package/dist/components/admin/admin-jobs-status-badge.d.ts +9 -0
- package/dist/components/admin/admin-jobs-status-badge.d.ts.map +1 -0
- package/dist/components/admin/admin-jobs-status-badge.js +26 -0
- package/dist/components/admin/admin-jobs-status-badge.js.map +1 -0
- package/dist/components/admin/admin-jobs.d.ts +4 -0
- package/dist/components/admin/admin-jobs.d.ts.map +1 -0
- package/dist/components/admin/admin-jobs.js +248 -0
- package/dist/components/admin/admin-jobs.js.map +1 -0
- package/dist/components/admin/admin-keys-token-dialog.d.ts +15 -0
- package/dist/components/admin/admin-keys-token-dialog.d.ts.map +1 -0
- package/dist/components/admin/admin-keys-token-dialog.js +66 -0
- package/dist/components/admin/admin-keys-token-dialog.js.map +1 -0
- package/dist/components/admin/admin-keys.d.ts +4 -0
- package/dist/components/admin/admin-keys.d.ts.map +1 -0
- package/dist/components/admin/admin-keys.js +161 -0
- package/dist/components/admin/admin-keys.js.map +1 -0
- package/dist/components/admin/admin-layout.d.ts +33 -0
- package/dist/components/admin/admin-layout.d.ts.map +1 -0
- package/dist/components/admin/admin-layout.js +99 -0
- package/dist/components/admin/admin-layout.js.map +1 -0
- package/dist/components/admin/admin-notifications.d.ts +4 -0
- package/dist/components/admin/admin-notifications.d.ts.map +1 -0
- package/dist/components/admin/admin-notifications.js +99 -0
- package/dist/components/admin/admin-notifications.js.map +1 -0
- package/dist/components/admin/admin-page.d.ts +16 -0
- package/dist/components/admin/admin-page.d.ts.map +1 -0
- package/dist/components/admin/admin-page.js +15 -0
- package/dist/components/admin/admin-page.js.map +1 -0
- package/dist/components/admin/admin-parameters.d.ts +26 -0
- package/dist/components/admin/admin-parameters.d.ts.map +1 -0
- package/dist/components/admin/admin-parameters.js +560 -0
- package/dist/components/admin/admin-parameters.js.map +1 -0
- package/dist/components/admin/admin-payments.d.ts +4 -0
- package/dist/components/admin/admin-payments.d.ts.map +1 -0
- package/dist/components/admin/admin-payments.js +72 -0
- package/dist/components/admin/admin-payments.js.map +1 -0
- package/dist/components/admin/admin-router-options.d.ts +138 -0
- package/dist/components/admin/admin-router-options.d.ts.map +1 -0
- package/dist/components/admin/admin-router-options.js +29 -0
- package/dist/components/admin/admin-router-options.js.map +1 -0
- package/dist/components/admin/admin-router-page.d.ts +56 -0
- package/dist/components/admin/admin-router-page.d.ts.map +1 -0
- package/dist/components/admin/admin-router-page.js +68 -0
- package/dist/components/admin/admin-router-page.js.map +1 -0
- package/dist/components/admin/admin-router.d.ts +214 -0
- package/dist/components/admin/admin-router.d.ts.map +1 -0
- package/dist/components/admin/admin-router.js +409 -0
- package/dist/components/admin/admin-router.js.map +1 -0
- package/dist/components/admin/admin-sessions.d.ts +4 -0
- package/dist/components/admin/admin-sessions.d.ts.map +1 -0
- package/dist/components/admin/admin-sessions.js +132 -0
- package/dist/components/admin/admin-sessions.js.map +1 -0
- package/dist/components/admin/admin-user-cell.d.ts +37 -0
- package/dist/components/admin/admin-user-cell.d.ts.map +1 -0
- package/dist/components/admin/admin-user-cell.js +35 -0
- package/dist/components/admin/admin-user-cell.js.map +1 -0
- package/dist/components/admin/admin-user-detail-audits-tab.d.ts +15 -0
- package/dist/components/admin/admin-user-detail-audits-tab.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-audits-tab.js +55 -0
- package/dist/components/admin/admin-user-detail-audits-tab.js.map +1 -0
- package/dist/components/admin/admin-user-detail-identity-aside.d.ts +15 -0
- package/dist/components/admin/admin-user-detail-identity-aside.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-identity-aside.js +106 -0
- package/dist/components/admin/admin-user-detail-identity-aside.js.map +1 -0
- package/dist/components/admin/admin-user-detail-overview-tab.d.ts +26 -0
- package/dist/components/admin/admin-user-detail-overview-tab.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-overview-tab.js +60 -0
- package/dist/components/admin/admin-user-detail-overview-tab.js.map +1 -0
- package/dist/components/admin/admin-user-detail-password-dialog.d.ts +15 -0
- package/dist/components/admin/admin-user-detail-password-dialog.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-password-dialog.js +47 -0
- package/dist/components/admin/admin-user-detail-password-dialog.js.map +1 -0
- package/dist/components/admin/admin-user-detail-password-schema.d.ts +10 -0
- package/dist/components/admin/admin-user-detail-password-schema.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-password-schema.js +13 -0
- package/dist/components/admin/admin-user-detail-password-schema.js.map +1 -0
- package/dist/components/admin/admin-user-detail-profile-policy.d.ts +56 -0
- package/dist/components/admin/admin-user-detail-profile-policy.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-profile-policy.js +73 -0
- package/dist/components/admin/admin-user-detail-profile-policy.js.map +1 -0
- package/dist/components/admin/admin-user-detail-profile-schema.d.ts +18 -0
- package/dist/components/admin/admin-user-detail-profile-schema.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-profile-schema.js +21 -0
- package/dist/components/admin/admin-user-detail-profile-schema.js.map +1 -0
- package/dist/components/admin/admin-user-detail-security-tab.d.ts +20 -0
- package/dist/components/admin/admin-user-detail-security-tab.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-security-tab.js +70 -0
- package/dist/components/admin/admin-user-detail-security-tab.js.map +1 -0
- package/dist/components/admin/admin-user-detail-sessions-tab.d.ts +25 -0
- package/dist/components/admin/admin-user-detail-sessions-tab.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-sessions-tab.js +64 -0
- package/dist/components/admin/admin-user-detail-sessions-tab.js.map +1 -0
- package/dist/components/admin/admin-user-detail.d.ts +39 -0
- package/dist/components/admin/admin-user-detail.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail.js +343 -0
- package/dist/components/admin/admin-user-detail.js.map +1 -0
- package/dist/components/admin/admin-users-roles-picker.d.ts +28 -0
- package/dist/components/admin/admin-users-roles-picker.d.ts.map +1 -0
- package/dist/components/admin/admin-users-roles-picker.js +80 -0
- package/dist/components/admin/admin-users-roles-picker.js.map +1 -0
- package/dist/components/admin/admin-users-status-filter.d.ts +13 -0
- package/dist/components/admin/admin-users-status-filter.d.ts.map +1 -0
- package/dist/components/admin/admin-users-status-filter.js +41 -0
- package/dist/components/admin/admin-users-status-filter.js.map +1 -0
- package/dist/components/admin/admin-users.d.ts +16 -0
- package/dist/components/admin/admin-users.d.ts.map +1 -0
- package/dist/components/admin/admin-users.js +322 -0
- package/dist/components/admin/admin-users.js.map +1 -0
- package/dist/components/admin/admin-workflows-execution-sheet.d.ts +11 -0
- package/dist/components/admin/admin-workflows-execution-sheet.d.ts.map +1 -0
- package/dist/components/admin/admin-workflows-execution-sheet.js +190 -0
- package/dist/components/admin/admin-workflows-execution-sheet.js.map +1 -0
- package/dist/components/admin/admin-workflows-executions-panel.d.ts +9 -0
- package/dist/components/admin/admin-workflows-executions-panel.d.ts.map +1 -0
- package/dist/components/admin/admin-workflows-executions-panel.js +129 -0
- package/dist/components/admin/admin-workflows-executions-panel.js.map +1 -0
- package/dist/components/admin/admin-workflows-status-badge.d.ts +12 -0
- package/dist/components/admin/admin-workflows-status-badge.d.ts.map +1 -0
- package/dist/components/admin/admin-workflows-status-badge.js +30 -0
- package/dist/components/admin/admin-workflows-status-badge.js.map +1 -0
- package/dist/components/admin/admin-workflows.d.ts +4 -0
- package/dist/components/admin/admin-workflows.d.ts.map +1 -0
- package/dist/components/admin/admin-workflows.js +145 -0
- package/dist/components/admin/admin-workflows.js.map +1 -0
- package/dist/components/admin/diff-lines.d.ts +13 -0
- package/dist/components/admin/diff-lines.d.ts.map +1 -0
- package/dist/components/admin/diff-lines.js +57 -0
- package/dist/components/admin/diff-lines.js.map +1 -0
- package/dist/components/admin/parameter-diff-dialog.d.ts +36 -0
- package/dist/components/admin/parameter-diff-dialog.d.ts.map +1 -0
- package/dist/components/admin/parameter-diff-dialog.js +58 -0
- package/dist/components/admin/parameter-diff-dialog.js.map +1 -0
- package/dist/components/admin/parameter-history-item.d.ts +17 -0
- package/dist/components/admin/parameter-history-item.d.ts.map +1 -0
- package/dist/components/admin/parameter-history-item.js +177 -0
- package/dist/components/admin/parameter-history-item.js.map +1 -0
- package/dist/components/admin/parameter-json-dialog.d.ts +13 -0
- package/dist/components/admin/parameter-json-dialog.d.ts.map +1 -0
- package/dist/components/admin/parameter-json-dialog.js +63 -0
- package/dist/components/admin/parameter-json-dialog.js.map +1 -0
- package/dist/components/admin/parameter-save-dialog.d.ts +26 -0
- package/dist/components/admin/parameter-save-dialog.d.ts.map +1 -0
- package/dist/components/admin/parameter-save-dialog.js +74 -0
- package/dist/components/admin/parameter-save-dialog.js.map +1 -0
- package/dist/components/admin/use-confirmed-action.d.ts +53 -0
- package/dist/components/admin/use-confirmed-action.d.ts.map +1 -0
- package/dist/components/admin/use-confirmed-action.js +50 -0
- package/dist/components/admin/use-confirmed-action.js.map +1 -0
- package/dist/components/alepha-table/alepha-table.d.ts +313 -0
- package/dist/components/alepha-table/alepha-table.d.ts.map +1 -0
- package/dist/components/alepha-table/alepha-table.js +667 -0
- package/dist/components/alepha-table/alepha-table.js.map +1 -0
- 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/alepha-table/use-table-selection.d.ts +34 -0
- package/dist/components/alepha-table/use-table-selection.d.ts.map +1 -0
- package/dist/components/alepha-table/use-table-selection.js +45 -0
- package/dist/components/alepha-table/use-table-selection.js.map +1 -0
- package/dist/components/app-actions/app-actions.d.ts +74 -0
- package/dist/components/app-actions/app-actions.d.ts.map +1 -0
- package/dist/components/app-actions/app-actions.js +77 -0
- package/dist/components/app-actions/app-actions.js.map +1 -0
- package/dist/components/app-shell/app-shell.d.ts +144 -0
- package/dist/components/app-shell/app-shell.d.ts.map +1 -0
- package/dist/components/app-shell/app-shell.js +283 -0
- package/dist/components/app-shell/app-shell.js.map +1 -0
- package/dist/components/auth/auth-login.d.ts +40 -0
- package/dist/components/auth/auth-login.d.ts.map +1 -0
- package/dist/components/auth/auth-login.js +226 -0
- package/dist/components/auth/auth-login.js.map +1 -0
- package/dist/components/auth/auth-register.d.ts +35 -0
- package/dist/components/auth/auth-register.d.ts.map +1 -0
- package/dist/components/auth/auth-register.js +477 -0
- package/dist/components/auth/auth-register.js.map +1 -0
- package/dist/components/auth/auth-reset-password.d.ts +21 -0
- package/dist/components/auth/auth-reset-password.d.ts.map +1 -0
- package/dist/components/auth/auth-reset-password.js +286 -0
- package/dist/components/auth/auth-reset-password.js.map +1 -0
- package/dist/components/auth/auth-router.d.ts +245 -0
- package/dist/components/auth/auth-router.d.ts.map +1 -0
- package/dist/components/auth/auth-router.js +117 -0
- package/dist/components/auth/auth-router.js.map +1 -0
- package/dist/components/auth/auth-verify-email.d.ts +19 -0
- package/dist/components/auth/auth-verify-email.d.ts.map +1 -0
- package/dist/components/auth/auth-verify-email.js +124 -0
- package/dist/components/auth/auth-verify-email.js.map +1 -0
- package/dist/components/auth/provider-labels.d.ts +9 -0
- package/dist/components/auth/provider-labels.d.ts.map +1 -0
- package/dist/components/auth/provider-labels.js +20 -0
- package/dist/components/auth/provider-labels.js.map +1 -0
- 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 +219 -0
- package/dist/components/auto-form/auto-form.d.ts.map +1 -0
- package/dist/components/auto-form/auto-form.js +412 -0
- package/dist/components/auto-form/auto-form.js.map +1 -0
- package/dist/components/brand-icon/brand-icon.d.ts +18 -0
- package/dist/components/brand-icon/brand-icon.d.ts.map +1 -0
- package/dist/components/brand-icon/brand-icon.js +84 -0
- package/dist/components/brand-icon/brand-icon.js.map +1 -0
- package/dist/components/button-dark/button-dark.d.ts +25 -0
- package/dist/components/button-dark/button-dark.d.ts.map +1 -0
- package/dist/components/button-dark/button-dark.js +44 -0
- package/dist/components/button-dark/button-dark.js.map +1 -0
- package/dist/components/button-language/button-language.d.ts +24 -0
- package/dist/components/button-language/button-language.d.ts.map +1 -0
- package/dist/components/button-language/button-language.js +50 -0
- package/dist/components/button-language/button-language.js.map +1 -0
- package/dist/components/button-theme/button-theme.d.ts +33 -0
- package/dist/components/button-theme/button-theme.d.ts.map +1 -0
- package/dist/components/button-theme/button-theme.js +90 -0
- package/dist/components/button-theme/button-theme.js.map +1 -0
- package/dist/components/button-user/button-user.d.ts +129 -0
- package/dist/components/button-user/button-user.d.ts.map +1 -0
- package/dist/components/button-user/button-user.js +147 -0
- package/dist/components/button-user/button-user.js.map +1 -0
- package/dist/components/captcha/turnstile-widget.d.ts +59 -0
- package/dist/components/captcha/turnstile-widget.d.ts.map +1 -0
- package/dist/components/captcha/turnstile-widget.js +98 -0
- package/dist/components/captcha/turnstile-widget.js.map +1 -0
- package/dist/components/control/control.d.ts +200 -0
- package/dist/components/control/control.d.ts.map +1 -0
- package/dist/components/control/control.js +297 -0
- package/dist/components/control/control.js.map +1 -0
- package/dist/components/control-array/control-array.d.ts +77 -0
- package/dist/components/control-array/control-array.d.ts.map +1 -0
- package/dist/components/control-array/control-array.js +451 -0
- package/dist/components/control-array/control-array.js.map +1 -0
- package/dist/components/control-base/field-i18n.d.ts +32 -0
- package/dist/components/control-base/field-i18n.d.ts.map +1 -0
- package/dist/components/control-base/field-i18n.js +29 -0
- package/dist/components/control-base/field-i18n.js.map +1 -0
- package/dist/components/control-base/form-field.d.ts +128 -0
- package/dist/components/control-base/form-field.d.ts.map +1 -0
- package/dist/components/control-base/form-field.js +208 -0
- package/dist/components/control-base/form-field.js.map +1 -0
- package/dist/components/control-base/grid.d.ts +18 -0
- package/dist/components/control-base/grid.d.ts.map +1 -0
- package/dist/components/control-base/grid.js +46 -0
- package/dist/components/control-base/grid.js.map +1 -0
- package/dist/components/control-base/icon-hint.d.ts +9 -0
- package/dist/components/control-base/icon-hint.d.ts.map +1 -0
- package/dist/components/control-base/icon-hint.js +35 -0
- package/dist/components/control-base/icon-hint.js.map +1 -0
- package/dist/components/control-date/control-date.d.ts +34 -0
- package/dist/components/control-date/control-date.d.ts.map +1 -0
- package/dist/components/control-date/control-date.js +127 -0
- package/dist/components/control-date/control-date.js.map +1 -0
- package/dist/components/control-number/control-number.d.ts +38 -0
- package/dist/components/control-number/control-number.d.ts.map +1 -0
- package/dist/components/control-number/control-number.js +77 -0
- package/dist/components/control-number/control-number.js.map +1 -0
- package/dist/components/control-object/control-object.d.ts +47 -0
- package/dist/components/control-object/control-object.d.ts.map +1 -0
- package/dist/components/control-object/control-object.js +110 -0
- package/dist/components/control-object/control-object.js.map +1 -0
- package/dist/components/control-password/control-password.d.ts +28 -0
- package/dist/components/control-password/control-password.d.ts.map +1 -0
- package/dist/components/control-password/control-password.js +64 -0
- package/dist/components/control-password/control-password.js.map +1 -0
- package/dist/components/control-select/control-select.d.ts +128 -0
- package/dist/components/control-select/control-select.d.ts.map +1 -0
- package/dist/components/control-select/control-select.js +363 -0
- package/dist/components/control-select/control-select.js.map +1 -0
- package/dist/components/control-upload/control-upload.d.ts +67 -0
- package/dist/components/control-upload/control-upload.d.ts.map +1 -0
- package/dist/components/control-upload/control-upload.js +294 -0
- package/dist/components/control-upload/control-upload.js.map +1 -0
- 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 +90 -0
- package/dist/components/detail/detail-layout.d.ts.map +1 -0
- package/dist/components/detail/detail-layout.js +102 -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/file-image/file-image.d.ts +31 -0
- package/dist/components/file-image/file-image.d.ts.map +1 -0
- package/dist/components/file-image/file-image.js +27 -0
- package/dist/components/file-image/file-image.js.map +1 -0
- package/dist/components/language-toggle/language-toggle.d.ts +8 -0
- package/dist/components/language-toggle/language-toggle.d.ts.map +1 -0
- package/dist/components/language-toggle/language-toggle.js +49 -0
- package/dist/components/language-toggle/language-toggle.js.map +1 -0
- 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/FlowchartDiagram.d.ts +44 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagram.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagram.js +98 -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 +69 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.js.map +1 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.d.ts +23 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.js +34 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.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 +63 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramNode.js.map +1 -0
- package/dist/components/markdown-view/diagram/MermaidFence.d.ts +30 -0
- package/dist/components/markdown-view/diagram/MermaidFence.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/MermaidFence.js +30 -0
- package/dist/components/markdown-view/diagram/MermaidFence.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/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 +114 -0
- package/dist/components/markdown-view/markdown-view.d.ts +53 -0
- package/dist/components/markdown-view/markdown-view.d.ts.map +1 -0
- package/dist/components/markdown-view/markdown-view.js +180 -0
- package/dist/components/markdown-view/markdown-view.js.map +1 -0
- package/dist/components/nav-shell/nav-page.d.ts +24 -0
- package/dist/components/nav-shell/nav-page.d.ts.map +1 -0
- package/dist/components/nav-shell/nav-page.js +28 -0
- package/dist/components/nav-shell/nav-page.js.map +1 -0
- package/dist/components/nav-shell/nav-shell.d.ts +26 -0
- package/dist/components/nav-shell/nav-shell.d.ts.map +1 -0
- package/dist/components/nav-shell/nav-shell.js +53 -0
- package/dist/components/nav-shell/nav-shell.js.map +1 -0
- package/dist/components/nav-shell/nav-tree-util.d.ts +65 -0
- package/dist/components/nav-shell/nav-tree-util.d.ts.map +1 -0
- package/dist/components/nav-shell/nav-tree-util.js +87 -0
- package/dist/components/nav-shell/nav-tree-util.js.map +1 -0
- package/dist/components/nav-shell/spotlight.d.ts +37 -0
- package/dist/components/nav-shell/spotlight.d.ts.map +1 -0
- package/dist/components/nav-shell/spotlight.js +102 -0
- package/dist/components/nav-shell/spotlight.js.map +1 -0
- package/dist/components/nav-shell/use-nav-breadcrumbs.d.ts +24 -0
- package/dist/components/nav-shell/use-nav-breadcrumbs.d.ts.map +1 -0
- package/dist/components/nav-shell/use-nav-breadcrumbs.js +36 -0
- package/dist/components/nav-shell/use-nav-breadcrumbs.js.map +1 -0
- package/dist/components/nav-shell/use-nav-entries.d.ts +55 -0
- package/dist/components/nav-shell/use-nav-entries.d.ts.map +1 -0
- package/dist/components/nav-shell/use-nav-entries.js +60 -0
- package/dist/components/nav-shell/use-nav-entries.js.map +1 -0
- package/dist/components/nav-shell/use-nav-tree.d.ts +21 -0
- package/dist/components/nav-shell/use-nav-tree.d.ts.map +1 -0
- package/dist/components/nav-shell/use-nav-tree.js +48 -0
- package/dist/components/nav-shell/use-nav-tree.js.map +1 -0
- 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 +35 -0
- package/dist/components/settings/settings-danger-section.d.ts.map +1 -0
- package/dist/components/settings/settings-danger-section.js +43 -0
- package/dist/components/settings/settings-danger-section.js.map +1 -0
- package/dist/components/settings/settings-heading.d.ts +36 -0
- package/dist/components/settings/settings-heading.d.ts.map +1 -0
- package/dist/components/settings/settings-heading.js +39 -0
- package/dist/components/settings/settings-heading.js.map +1 -0
- package/dist/components/settings/settings-layout.d.ts +81 -0
- package/dist/components/settings/settings-layout.d.ts.map +1 -0
- package/dist/components/settings/settings-layout.js +56 -0
- package/dist/components/settings/settings-layout.js.map +1 -0
- package/dist/components/settings/settings-nav.d.ts +85 -0
- package/dist/components/settings/settings-nav.d.ts.map +1 -0
- package/dist/components/settings/settings-nav.js +91 -0
- package/dist/components/settings/settings-nav.js.map +1 -0
- package/dist/components/settings/settings-row.d.ts +45 -0
- package/dist/components/settings/settings-row.d.ts.map +1 -0
- package/dist/components/settings/settings-row.js +44 -0
- package/dist/components/settings/settings-row.js.map +1 -0
- package/dist/components/settings/settings-section.d.ts +36 -0
- package/dist/components/settings/settings-section.d.ts.map +1 -0
- package/dist/components/settings/settings-section.js +37 -0
- package/dist/components/settings/settings-section.js.map +1 -0
- package/dist/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion.js +55 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +19 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.js +96 -0
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/alert.d.ts +11 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.js +44 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +5 -0
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio.js +15 -0
- package/dist/components/ui/aspect-ratio.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +12 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +52 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.d.ts +19 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +70 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +11 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.js +73 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/button-group.d.ts +11 -0
- package/dist/components/ui/button-group.d.ts.map +1 -0
- package/dist/components/ui/button-group.js +43 -0
- package/dist/components/ui/button-group.js.map +1 -0
- package/dist/components/ui/button.d.ts +18 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +60 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +11 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +119 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.d.ts +12 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +57 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/carousel.d.ts +29 -0
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/components/ui/carousel.js +144 -0
- package/dist/components/ui/carousel.js.map +1 -0
- package/dist/components/ui/chart.d.ts +45 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/chart.js +152 -0
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +22 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.js +26 -0
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/combobox.d.ts +25 -0
- package/dist/components/ui/combobox.d.ts.map +1 -0
- package/dist/components/ui/combobox.js +164 -0
- package/dist/components/ui/combobox.js.map +1 -0
- package/dist/components/ui/command.d.ts +20 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/command.js +89 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/context-menu.d.ts +30 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/context-menu.js +134 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +18 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +93 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/direction.d.ts +2 -0
- package/dist/components/ui/direction.d.ts.map +1 -0
- package/dist/components/ui/direction.js +3 -0
- package/dist/components/ui/drawer.d.ts +17 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer.js +125 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +30 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +138 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/empty.d.ts +12 -0
- package/dist/components/ui/empty.d.ts.map +1 -0
- package/dist/components/ui/empty.js +61 -0
- package/dist/components/ui/empty.js.map +1 -0
- package/dist/components/ui/hover-card.d.ts +6 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/hover-card.js +38 -0
- package/dist/components/ui/hover-card.js.map +1 -0
- package/dist/components/ui/input-group.d.ts +19 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/input-group.js +80 -0
- package/dist/components/ui/input-group.js.map +1 -0
- package/dist/components/ui/input-otp.d.ts +12 -0
- package/dist/components/ui/input-otp.d.ts.map +1 -0
- package/dist/components/ui/input-otp.js +49 -0
- package/dist/components/ui/input-otp.js.map +1 -0
- package/dist/components/ui/input.d.ts +4 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +16 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/item.d.ts +23 -0
- package/dist/components/ui/item.d.ts.map +1 -0
- package/dist/components/ui/item.js +122 -0
- package/dist/components/ui/item.js.map +1 -0
- package/dist/components/ui/kbd.d.ts +4 -0
- package/dist/components/ui/kbd.d.ts.map +1 -0
- package/dist/components/ui/kbd.js +21 -0
- package/dist/components/ui/kbd.js.map +1 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +15 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/menubar.d.ts +30 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/menubar.js +137 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +12 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.js +84 -0
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/pagination.d.ts +18 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/pagination.js +87 -0
- package/dist/components/ui/pagination.js.map +1 -0
- package/dist/components/ui/popover.d.ts +10 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +56 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +8 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +46 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/radio-group.d.ts +6 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/radio-group.js +29 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/resizable.d.ts +8 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/resizable.js +30 -0
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +38 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/segmented.d.ts +46 -0
- package/dist/components/ui/segmented.d.ts.map +1 -0
- package/dist/components/ui/segmented.js +119 -0
- package/dist/components/ui/segmented.js.map +1 -0
- package/dist/components/ui/select.d.ts +16 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +99 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +17 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.d.ts +15 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +90 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/sidebar.d.ts +64 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/sidebar.js +388 -0
- package/dist/components/ui/sidebar.js.map +1 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +14 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/slider.js +35 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/sonner.d.ts +4 -0
- package/dist/components/ui/sonner.d.ts.map +1 -0
- package/dist/components/ui/sonner.js +33 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/spinner.d.ts +3 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +17 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +6 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +21 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/table.d.ts +11 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +68 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +11 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +47 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +4 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +14 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +12 -0
- package/dist/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/components/ui/toggle-group.js +60 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle.d.ts +9 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/toggle.js +38 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +17 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +53 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/use-dialog/use-dialog.d.ts +61 -0
- package/dist/components/use-dialog/use-dialog.d.ts.map +1 -0
- package/dist/components/use-dialog/use-dialog.js +143 -0
- package/dist/components/use-dialog/use-dialog.js.map +1 -0
- package/dist/components/use-toast/use-toast.d.ts +43 -0
- package/dist/components/use-toast/use-toast.d.ts.map +1 -0
- package/dist/components/use-toast/use-toast.js +33 -0
- package/dist/components/use-toast/use-toast.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +12 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +27 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/lib/i18n-fr.d.ts +46 -0
- package/dist/lib/i18n-fr.d.ts.map +1 -0
- package/dist/lib/i18n-fr.js +510 -0
- package/dist/lib/i18n-fr.js.map +1 -0
- package/dist/lib/resize-image.d.ts +50 -0
- package/dist/lib/resize-image.d.ts.map +1 -0
- package/dist/lib/resize-image.js +68 -0
- package/dist/lib/resize-image.js.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +10 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/styles.css +254 -0
- package/package.json +65 -33
- package/src/components/account/__tests__/account-router.spec.ts +4 -2
- package/src/components/account/account-connections.tsx +10 -2
- package/src/components/account/account-header.tsx +6 -1
- package/src/components/account/account-keys.tsx +2 -2
- package/src/components/account/account-layout.tsx +14 -4
- package/src/components/account/account-profile.tsx +238 -125
- package/src/components/account/account-router-options.tsx +15 -0
- package/src/components/account/account-router-page.tsx +1 -0
- package/src/components/account/account-router.tsx +24 -3
- package/src/components/account/account-security.tsx +2 -1
- package/src/components/account/account-sessions.tsx +21 -4
- 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-router-page.spec.ts +2 -1
- package/src/components/admin/__tests__/admin-router.spec.ts +57 -1
- package/src/components/admin/__tests__/admin-user-cell.browser.spec.tsx +1 -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 +19 -12
- package/src/components/admin/admin-jobs-status-badge.tsx +2 -2
- 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 +1 -2
- package/src/components/admin/admin-notifications.tsx +2 -2
- 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 +34 -10
- package/src/components/admin/admin-router-page.tsx +8 -5
- package/src/components/admin/admin-router.tsx +112 -40
- package/src/components/admin/admin-sessions.tsx +13 -2
- 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 +1 -0
- package/src/components/admin/admin-user-detail-sessions-tab.tsx +5 -2
- package/src/components/admin/admin-user-detail.tsx +49 -87
- package/src/components/admin/admin-users-roles-picker.tsx +22 -15
- package/src/components/admin/admin-users.tsx +8 -14
- package/src/components/admin/admin-workflows-execution-sheet.tsx +18 -10
- package/src/components/admin/admin-workflows-executions-panel.tsx +24 -17
- package/src/components/admin/admin-workflows-status-badge.tsx +4 -2
- 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-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 +385 -86
- 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-actions/app-actions.tsx +7 -2
- 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 +5 -16
- package/src/components/auth/auth-register.tsx +81 -42
- 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/safe-redirect.ts +14 -0
- package/src/components/auto-form/__tests__/auto-form-settings-card.browser.spec.tsx +238 -0
- package/src/components/auto-form/auto-form.tsx +173 -66
- 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 +80 -21
- package/src/components/captcha/turnstile-widget.tsx +6 -5
- package/src/components/control/control.tsx +39 -14
- package/src/components/control-array/control-array.tsx +28 -15
- 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 +69 -12
- 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 +3 -3
- package/src/components/control-object/control-object.tsx +11 -8
- package/src/components/control-password/control-password.tsx +2 -2
- 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 +151 -0
- package/src/components/detail/detail-aside.tsx +198 -0
- package/src/components/detail/detail-layout.tsx +181 -0
- package/src/components/detail/use-detail-tab.tsx +41 -0
- package/src/components/file-image/file-image.tsx +4 -2
- package/src/components/language-toggle/language-toggle.tsx +2 -2
- package/src/components/markdown-view/__tests__/markdown-view-mermaid.browser.spec.tsx +148 -0
- package/src/components/markdown-view/__tests__/markdown-view-raw-html.browser.spec.tsx +49 -0
- package/src/components/markdown-view/diagram/DiagramErrorBoundary.tsx +42 -0
- package/src/components/markdown-view/diagram/FlowchartDiagram.tsx +136 -0
- package/src/components/markdown-view/diagram/FlowchartDiagramCluster.tsx +59 -0
- package/src/components/markdown-view/diagram/FlowchartDiagramEdge.tsx +95 -0
- package/src/components/markdown-view/diagram/FlowchartDiagramLabel.tsx +58 -0
- package/src/components/markdown-view/diagram/FlowchartDiagramNode.tsx +78 -0
- package/src/components/markdown-view/diagram/MermaidFence.tsx +46 -0
- package/src/components/markdown-view/diagram/__tests__/flowchart-diagram.browser.spec.tsx +210 -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/textMetrics.spec.ts +128 -0
- package/src/components/markdown-view/diagram/textMetrics.ts +296 -0
- package/src/components/markdown-view/markdown-view.tsx +142 -15
- package/src/components/nav-shell/__tests__/nav-tree-util.spec.ts +89 -0
- package/src/components/nav-shell/nav-shell.tsx +6 -3
- package/src/components/nav-shell/nav-tree-util.ts +48 -0
- package/src/components/nav-shell/spotlight.tsx +2 -1
- package/src/components/nav-shell/use-nav-breadcrumbs.ts +1 -0
- package/src/components/nav-shell/use-nav-entries.ts +27 -7
- package/src/components/nav-shell/use-nav-tree.ts +1 -0
- 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-heading.tsx +55 -0
- package/src/components/settings/settings-layout.tsx +81 -7
- package/src/components/settings/settings-nav.tsx +58 -5
- package/src/components/settings/settings-row.tsx +2 -2
- package/src/components/settings/settings-section.tsx +4 -15
- package/src/components/ui/accordion.tsx +3 -3
- package/src/components/ui/alert-dialog.tsx +5 -5
- package/src/components/ui/alert.tsx +2 -2
- package/src/components/ui/avatar.tsx +5 -5
- package/src/components/ui/badge.tsx +48 -2
- package/src/components/ui/breadcrumb.tsx +3 -3
- 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 +3 -3
- package/src/components/ui/carousel.tsx +30 -13
- package/src/components/ui/chart.tsx +18 -6
- package/src/components/ui/checkbox.tsx +1 -1
- package/src/components/ui/combobox.tsx +8 -9
- package/src/components/ui/command.tsx +6 -7
- package/src/components/ui/context-menu.tsx +8 -8
- package/src/components/ui/dialog.tsx +4 -4
- package/src/components/ui/drawer.tsx +4 -4
- package/src/components/ui/dropdown-menu.tsx +9 -9
- package/src/components/ui/empty.tsx +2 -2
- package/src/components/ui/hover-card.tsx +1 -1
- package/src/components/ui/input-group.tsx +6 -3
- package/src/components/ui/input-otp.tsx +3 -3
- package/src/components/ui/input.tsx +1 -1
- package/src/components/ui/item.tsx +3 -3
- package/src/components/ui/kbd.tsx +1 -1
- package/src/components/ui/label.tsx +3 -0
- package/src/components/ui/menubar.tsx +9 -9
- package/src/components/ui/navigation-menu.tsx +7 -7
- package/src/components/ui/pagination.tsx +0 -1
- package/src/components/ui/popover.tsx +1 -1
- package/src/components/ui/progress.tsx +3 -3
- package/src/components/ui/radio-group.tsx +2 -2
- package/src/components/ui/resizable.tsx +2 -2
- package/src/components/ui/scroll-area.tsx +2 -2
- package/src/components/ui/segmented.tsx +27 -5
- package/src/components/ui/select.tsx +8 -8
- package/src/components/ui/separator.tsx +1 -1
- package/src/components/ui/sheet.tsx +3 -3
- 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 +10 -5
- package/src/components/ui/tabs.tsx +3 -3
- package/src/components/ui/textarea.tsx +1 -1
- package/src/components/ui/toggle-group.tsx +9 -4
- package/src/components/ui/toggle.tsx +2 -2
- package/src/components/ui/tooltip.tsx +13 -3
- 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 +5 -1
- package/src/lib/i18n-fr.ts +18 -10
- package/src/styles.css +5 -5
- package/src/lib/__tests__/rehype-safe-img.spec.ts +0 -121
- package/src/lib/rehype-safe-img.ts +0 -150
|
@@ -0,0 +1,102 @@
|
|
|
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
|
+
label: Icon ? /* @__PURE__ */ jsxs("span", {
|
|
72
|
+
className: "inline-flex items-center gap-1.5",
|
|
73
|
+
children: [/* @__PURE__ */ jsx(Icon, { className: "size-4" }), entry.label]
|
|
74
|
+
}) : entry.label
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
78
|
+
className: "flex h-full min-h-0 flex-1 overflow-hidden",
|
|
79
|
+
children: [/* @__PURE__ */ jsx("aside", {
|
|
80
|
+
className: "border-border bg-background hidden w-72 shrink-0 flex-col gap-4 overflow-auto border-r p-4 md:flex",
|
|
81
|
+
children: props.aside
|
|
82
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
83
|
+
className: "flex min-h-0 flex-1 flex-col",
|
|
84
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
85
|
+
className: "bg-background flex h-14 shrink-0 items-center gap-2 border-b px-4",
|
|
86
|
+
children: [/* @__PURE__ */ jsx(Segmented, {
|
|
87
|
+
size: "lg",
|
|
88
|
+
options,
|
|
89
|
+
value: props.tab,
|
|
90
|
+
onChange: props.onTabChange
|
|
91
|
+
}), props.actions ? /* @__PURE__ */ jsx("div", {
|
|
92
|
+
className: "ml-auto flex items-center gap-2",
|
|
93
|
+
children: props.actions
|
|
94
|
+
}) : null]
|
|
95
|
+
}), props.children]
|
|
96
|
+
})]
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
//#endregion
|
|
100
|
+
export { DetailLayout };
|
|
101
|
+
|
|
102
|
+
//# 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 * 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 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 <div className=\"flex min-h-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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmGA,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,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,GAEP,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,31 @@
|
|
|
1
|
+
import { type ComponentProps, type ReactNode } from "react";
|
|
2
|
+
export interface FileImageProps extends Omit<ComponentProps<"img">, "src" | "id"> {
|
|
3
|
+
/**
|
|
4
|
+
* File id (uuid) served by the Alepha files module. Absent → renders
|
|
5
|
+
* `fallback`. (Repurposes the `id` slot — the raw HTML `id` attribute
|
|
6
|
+
* isn't forwarded.)
|
|
7
|
+
*/
|
|
8
|
+
id?: string | null;
|
|
9
|
+
/**
|
|
10
|
+
* Serve via the anonymous, edge-cacheable `/api/public/files/:id` route
|
|
11
|
+
* instead of the authenticated `/api/files/:id`. Only valid for files the
|
|
12
|
+
* server opts into (`FileAccessProvider.assertPublic`). Default:
|
|
13
|
+
* authenticated.
|
|
14
|
+
*/
|
|
15
|
+
public?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Rendered when `id` is missing OR the image fails to load (deleted, 404,
|
|
18
|
+
* forbidden) — a placeholder icon/initials instead of a broken-image glyph.
|
|
19
|
+
*/
|
|
20
|
+
fallback?: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* `<img>` for a file served by the Alepha files module, addressed by uuid.
|
|
24
|
+
*
|
|
25
|
+
* Resolves the src from `id` (`public` picks the anonymous edge-cacheable
|
|
26
|
+
* route vs the authenticated one), lazy-loads, and renders `fallback` when
|
|
27
|
+
* the id is missing or the image fails to load — so a deleted/forbidden
|
|
28
|
+
* file shows a placeholder instead of a broken-image glyph.
|
|
29
|
+
*/
|
|
30
|
+
export declare const FileImage: (props: FileImageProps) => import("react").JSX.Element;
|
|
31
|
+
//# sourceMappingURL=file-image.d.ts.map
|
|
@@ -0,0 +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,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"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/file-image/file-image.tsx
|
|
4
|
+
/**
|
|
5
|
+
* `<img>` for a file served by the Alepha files module, addressed by uuid.
|
|
6
|
+
*
|
|
7
|
+
* Resolves the src from `id` (`public` picks the anonymous edge-cacheable
|
|
8
|
+
* route vs the authenticated one), lazy-loads, and renders `fallback` when
|
|
9
|
+
* the id is missing or the image fails to load — so a deleted/forbidden
|
|
10
|
+
* file shows a placeholder instead of a broken-image glyph.
|
|
11
|
+
*/
|
|
12
|
+
const FileImage = (props) => {
|
|
13
|
+
const { id, public: isPublic, fallback = null, ...imgProps } = props;
|
|
14
|
+
const [erroredId, setErroredId] = useState(null);
|
|
15
|
+
if (!id || erroredId === id) return /* @__PURE__ */ jsx(Fragment$1, { children: fallback });
|
|
16
|
+
return /* @__PURE__ */ jsx("img", {
|
|
17
|
+
alt: "",
|
|
18
|
+
src: isPublic ? `/api/public/files/${id}` : `/api/files/${id}`,
|
|
19
|
+
loading: "lazy",
|
|
20
|
+
onError: () => setErroredId(id),
|
|
21
|
+
...imgProps
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { FileImage };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=file-image.js.map
|
|
@@ -0,0 +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 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,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Dropdown that lists every language registered via `$dictionary` and lets the
|
|
4
|
+
* user switch. Reads the active language and the registered list directly from
|
|
5
|
+
* `useI18n()`, so it stays in sync without extra wiring.
|
|
6
|
+
*/
|
|
7
|
+
export declare const LanguageToggle: () => React.JSX.Element | null;
|
|
8
|
+
//# sourceMappingURL=language-toggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language-toggle.d.ts","sourceRoot":"","sources":["../../../src/components/language-toggle/language-toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA4B/B;;;;GAIG;AACH,eAAO,MAAM,cAAc,gCAgC1B,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Button } from "../ui/button.js";
|
|
2
|
+
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuTrigger } from "../ui/dropdown-menu.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Languages } from "lucide-react";
|
|
6
|
+
import { useI18n } from "alepha/react/i18n";
|
|
7
|
+
//#region src/components/language-toggle/language-toggle.tsx
|
|
8
|
+
const LABELS = {
|
|
9
|
+
en: "English",
|
|
10
|
+
fr: "Français",
|
|
11
|
+
es: "Español",
|
|
12
|
+
de: "Deutsch",
|
|
13
|
+
it: "Italiano",
|
|
14
|
+
pt: "Português",
|
|
15
|
+
ja: "日本語",
|
|
16
|
+
zh: "中文"
|
|
17
|
+
};
|
|
18
|
+
const labelFor = (code) => LABELS[code] ?? LABELS[code.split("-")[0]] ?? code.toUpperCase();
|
|
19
|
+
/**
|
|
20
|
+
* Dropdown that lists every language registered via `$dictionary` and lets the
|
|
21
|
+
* user switch. Reads the active language and the registered list directly from
|
|
22
|
+
* `useI18n()`, so it stays in sync without extra wiring.
|
|
23
|
+
*/
|
|
24
|
+
const LanguageToggle = () => {
|
|
25
|
+
const i18n = useI18n();
|
|
26
|
+
const languages = i18n.languages;
|
|
27
|
+
if (languages.length <= 1) return null;
|
|
28
|
+
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
|
|
29
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
30
|
+
variant: "ghost",
|
|
31
|
+
size: "icon",
|
|
32
|
+
"aria-label": "Switch language"
|
|
33
|
+
}),
|
|
34
|
+
children: /* @__PURE__ */ jsx(Languages, { className: "size-4" })
|
|
35
|
+
}), /* @__PURE__ */ jsx(DropdownMenuContent, {
|
|
36
|
+
align: "end",
|
|
37
|
+
children: languages.map((code) => /* @__PURE__ */ jsx(DropdownMenuCheckboxItem, {
|
|
38
|
+
checked: i18n.lang === code,
|
|
39
|
+
onCheckedChange: () => {
|
|
40
|
+
i18n.setLang(code);
|
|
41
|
+
},
|
|
42
|
+
children: labelFor(code)
|
|
43
|
+
}, code))
|
|
44
|
+
})] });
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
export { LanguageToggle };
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=language-toggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language-toggle.js","names":[],"sources":["../../../src/components/language-toggle/language-toggle.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { Button } from \"@alepha/ui/components/ui/button\";\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuTrigger,\n} from \"@alepha/ui/components/ui/dropdown-menu\";\nimport { useI18n } from \"alepha/react/i18n\";\nimport { Languages } from \"lucide-react\";\n\nconst LABELS: Record<string, string> = {\n en: \"English\",\n fr: \"Français\",\n es: \"Español\",\n de: \"Deutsch\",\n it: \"Italiano\",\n pt: \"Português\",\n ja: \"日本語\",\n zh: \"中文\",\n};\n\nconst labelFor = (code: string) =>\n LABELS[code] ?? LABELS[code.split(\"-\")[0]] ?? code.toUpperCase();\n\n/**\n * Dropdown that lists every language registered via `$dictionary` and lets the\n * user switch. Reads the active language and the registered list directly from\n * `useI18n()`, so it stays in sync without extra wiring.\n */\nexport const LanguageToggle = () => {\n const i18n = useI18n();\n const languages = i18n.languages;\n\n if (languages.length <= 1) {\n return null;\n }\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger\n render={\n <Button variant=\"ghost\" size=\"icon\" aria-label=\"Switch language\" />\n }\n >\n <Languages className=\"size-4\" />\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n {languages.map((code) => (\n <DropdownMenuCheckboxItem\n key={code}\n checked={i18n.lang === code}\n onCheckedChange={() => {\n void i18n.setLang(code);\n }}\n >\n {labelFor(code)}\n </DropdownMenuCheckboxItem>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n};\n"],"mappings":";;;;;;;AAcA,MAAM,SAAiC;CACrC,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;AAEA,MAAM,YAAY,SAChB,OAAO,SAAS,OAAO,KAAK,MAAM,GAAG,CAAC,CAAC,OAAO,KAAK,YAAY;;;;;;AAOjE,MAAa,uBAAuB;CAClC,MAAM,OAAO,QAAQ;CACrB,MAAM,YAAY,KAAK;CAEvB,IAAI,UAAU,UAAU,GACtB,OAAO;CAGT,OACE,qBAAC,cAAD,EAAA,UAAA,CACE,oBAAC,qBAAD;EACE,QACE,oBAAC,QAAD;GAAQ,SAAQ;GAAQ,MAAK;GAAO,cAAW;EAAmB,CAAA;EAGpE,UAAA,oBAAC,WAAD,EAAW,WAAU,SAAU,CAAA;CACZ,CAAA,GACrB,oBAAC,qBAAD;EAAqB,OAAM;EACxB,UAAA,UAAU,KAAK,SACd,oBAAC,0BAAD;GAEE,SAAS,KAAK,SAAS;GACvB,uBAAuB;IACrB,KAAU,QAAQ,IAAI;GACxB;GAEC,UAAA,SAAS,IAAI;EACU,GAPnB,IAOmB,CAC3B;CACkB,CAAA,CACT,EAAA,CAAA;AAElB"}
|
|
@@ -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,44 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { PositionedGraph } from "./layoutFlowchart.ts";
|
|
3
|
+
export interface FlowchartDiagramProps {
|
|
4
|
+
graph: PositionedGraph;
|
|
5
|
+
/**
|
|
6
|
+
* Read out to assistive technology as the diagram's name.
|
|
7
|
+
*/
|
|
8
|
+
title?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Draw a laid-out flowchart as themed SVG.
|
|
12
|
+
*
|
|
13
|
+
* ## React elements, not an HTML string, and this is not negotiable
|
|
14
|
+
*
|
|
15
|
+
* `markdown-view.tsx` carries an explicit rule that no raw HTML is ever
|
|
16
|
+
* promoted to markup, because it renders one user's content to another and
|
|
17
|
+
* every raw tag would turn every markdown surface in every app into an
|
|
18
|
+
* injection point. Emitting React elements means labels are escaped by React
|
|
19
|
+
* itself and `dangerouslySetInnerHTML` never appears on this path. Read that
|
|
20
|
+
* comment before "optimising" this into a string.
|
|
21
|
+
*
|
|
22
|
+
* ## Theming is the point
|
|
23
|
+
*
|
|
24
|
+
* Colours come from `--primary`, `--border`, `--muted-foreground`, `--card`
|
|
25
|
+
* and `--muted` through `var(...)`, so dark mode works with no second
|
|
26
|
+
* palette and no theme prop. That is the thing mermaid can structurally
|
|
27
|
+
* never give us, and the whole reason drawing is our own code rather than a
|
|
28
|
+
* cost.
|
|
29
|
+
*
|
|
30
|
+
* ## The font is pinned, never inherited
|
|
31
|
+
*
|
|
32
|
+
* Folio view mode and the quest description set prose in Literata at 16.5px,
|
|
33
|
+
* lazy-loaded after first paint; every other surface is Inter. The width
|
|
34
|
+
* table in `textMetrics.ts` is generated against Inter at
|
|
35
|
+
* `DIAGRAM_FONT_SIZE`, so inheriting would make text and box disagree per
|
|
36
|
+
* surface and shift when the serif arrives.
|
|
37
|
+
*/
|
|
38
|
+
export declare const FlowchartDiagram: (props: FlowchartDiagramProps) => React.JSX.Element;
|
|
39
|
+
/**
|
|
40
|
+
* Two decimals is plenty for a diagram and keeps the emitted attributes
|
|
41
|
+
* readable; graphre's raw coordinates carry a dozen.
|
|
42
|
+
*/
|
|
43
|
+
export declare const round: (value: number) => number;
|
|
44
|
+
//# sourceMappingURL=FlowchartDiagram.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlowchartDiagram.d.ts","sourceRoot":"","sources":["../../../../src/components/markdown-view/diagram/FlowchartDiagram.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAG5D,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,eAAe,CAAC;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,gBAAgB,UAAW,qBAAqB,sBAiF5D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,KAAK,UAAW,MAAM,KAAG,MAAuC,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { DIAGRAM_FONT_FAMILY } from "./textMetrics.js";
|
|
2
|
+
import { FlowchartDiagramCluster } from "./FlowchartDiagramCluster.js";
|
|
3
|
+
import { FlowchartDiagramEdge } from "./FlowchartDiagramEdge.js";
|
|
4
|
+
import { FlowchartDiagramNode } from "./FlowchartDiagramNode.js";
|
|
5
|
+
import { useId } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/markdown-view/diagram/FlowchartDiagram.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Draw a laid-out flowchart as themed SVG.
|
|
10
|
+
*
|
|
11
|
+
* ## React elements, not an HTML string, and this is not negotiable
|
|
12
|
+
*
|
|
13
|
+
* `markdown-view.tsx` carries an explicit rule that no raw HTML is ever
|
|
14
|
+
* promoted to markup, because it renders one user's content to another and
|
|
15
|
+
* every raw tag would turn every markdown surface in every app into an
|
|
16
|
+
* injection point. Emitting React elements means labels are escaped by React
|
|
17
|
+
* itself and `dangerouslySetInnerHTML` never appears on this path. Read that
|
|
18
|
+
* comment before "optimising" this into a string.
|
|
19
|
+
*
|
|
20
|
+
* ## Theming is the point
|
|
21
|
+
*
|
|
22
|
+
* Colours come from `--primary`, `--border`, `--muted-foreground`, `--card`
|
|
23
|
+
* and `--muted` through `var(...)`, so dark mode works with no second
|
|
24
|
+
* palette and no theme prop. That is the thing mermaid can structurally
|
|
25
|
+
* never give us, and the whole reason drawing is our own code rather than a
|
|
26
|
+
* cost.
|
|
27
|
+
*
|
|
28
|
+
* ## The font is pinned, never inherited
|
|
29
|
+
*
|
|
30
|
+
* Folio view mode and the quest description set prose in Literata at 16.5px,
|
|
31
|
+
* lazy-loaded after first paint; every other surface is Inter. The width
|
|
32
|
+
* table in `textMetrics.ts` is generated against Inter at
|
|
33
|
+
* `DIAGRAM_FONT_SIZE`, so inheriting would make text and box disagree per
|
|
34
|
+
* surface and shift when the serif arrives.
|
|
35
|
+
*/
|
|
36
|
+
const FlowchartDiagram = (props) => {
|
|
37
|
+
const graph = props.graph;
|
|
38
|
+
const scope = useId().replace(/[^\w-]/g, "");
|
|
39
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
40
|
+
role: "img",
|
|
41
|
+
viewBox: `0 0 ${round(graph.width)} ${round(graph.height)}`,
|
|
42
|
+
style: {
|
|
43
|
+
maxWidth: `${round(graph.width)}px`,
|
|
44
|
+
height: "auto"
|
|
45
|
+
},
|
|
46
|
+
className: "my-4 block w-full",
|
|
47
|
+
fontFamily: DIAGRAM_FONT_FAMILY,
|
|
48
|
+
fontSize: graph.fontSize,
|
|
49
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ jsx("title", { children: props.title ?? "Flowchart diagram" }),
|
|
52
|
+
/* @__PURE__ */ jsxs("defs", { children: [/* @__PURE__ */ jsx("marker", {
|
|
53
|
+
id: `${scope}-arrow-end`,
|
|
54
|
+
markerWidth: "9",
|
|
55
|
+
markerHeight: "7",
|
|
56
|
+
refX: "8",
|
|
57
|
+
refY: "3.5",
|
|
58
|
+
orient: "auto",
|
|
59
|
+
markerUnits: "userSpaceOnUse",
|
|
60
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
61
|
+
d: "M0,0 L9,3.5 L0,7 z",
|
|
62
|
+
fill: "context-stroke"
|
|
63
|
+
})
|
|
64
|
+
}), /* @__PURE__ */ jsx("marker", {
|
|
65
|
+
id: `${scope}-arrow-start`,
|
|
66
|
+
markerWidth: "9",
|
|
67
|
+
markerHeight: "7",
|
|
68
|
+
refX: "1",
|
|
69
|
+
refY: "3.5",
|
|
70
|
+
orient: "auto-start-reverse",
|
|
71
|
+
markerUnits: "userSpaceOnUse",
|
|
72
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
73
|
+
d: "M0,0 L9,3.5 L0,7 z",
|
|
74
|
+
fill: "context-stroke"
|
|
75
|
+
})
|
|
76
|
+
})] }),
|
|
77
|
+
graph.clusters.map((cluster) => /* @__PURE__ */ jsx(FlowchartDiagramCluster, { cluster }, cluster.id)),
|
|
78
|
+
graph.edges.map((edge, index) => /* @__PURE__ */ jsx(FlowchartDiagramEdge, {
|
|
79
|
+
edge,
|
|
80
|
+
scope,
|
|
81
|
+
fontSize: graph.fontSize
|
|
82
|
+
}, `${edge.from}->${edge.to}#${index}`)),
|
|
83
|
+
graph.nodes.map((node) => /* @__PURE__ */ jsx(FlowchartDiagramNode, {
|
|
84
|
+
node,
|
|
85
|
+
fontSize: graph.fontSize
|
|
86
|
+
}, node.id))
|
|
87
|
+
]
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Two decimals is plenty for a diagram and keeps the emitted attributes
|
|
92
|
+
* readable; graphre's raw coordinates carry a dozen.
|
|
93
|
+
*/
|
|
94
|
+
const round = (value) => Math.round(value * 100) / 100;
|
|
95
|
+
//#endregion
|
|
96
|
+
export { FlowchartDiagram, round };
|
|
97
|
+
|
|
98
|
+
//# sourceMappingURL=FlowchartDiagram.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlowchartDiagram.js","names":[],"sources":["../../../../src/components/markdown-view/diagram/FlowchartDiagram.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { useId } from \"react\";\n\nimport { FlowchartDiagramCluster } from \"./FlowchartDiagramCluster.tsx\";\nimport { FlowchartDiagramEdge } from \"./FlowchartDiagramEdge.tsx\";\nimport { FlowchartDiagramNode } from \"./FlowchartDiagramNode.tsx\";\nimport type { PositionedGraph } from \"./layoutFlowchart.ts\";\nimport { DIAGRAM_FONT_FAMILY } from \"./textMetrics.ts\";\n\nexport interface FlowchartDiagramProps {\n graph: PositionedGraph;\n /**\n * Read out to assistive technology as the diagram's name.\n */\n title?: string;\n}\n\n/**\n * Draw a laid-out flowchart as themed SVG.\n *\n * ## React elements, not an HTML string, and this is not negotiable\n *\n * `markdown-view.tsx` carries an explicit rule that no raw HTML is ever\n * promoted to markup, because it renders one user's content to another and\n * every raw tag would turn every markdown surface in every app into an\n * injection point. Emitting React elements means labels are escaped by React\n * itself and `dangerouslySetInnerHTML` never appears on this path. Read that\n * comment before \"optimising\" this into a string.\n *\n * ## Theming is the point\n *\n * Colours come from `--primary`, `--border`, `--muted-foreground`, `--card`\n * and `--muted` through `var(...)`, so dark mode works with no second\n * palette and no theme prop. That is the thing mermaid can structurally\n * never give us, and the whole reason drawing is our own code rather than a\n * cost.\n *\n * ## The font is pinned, never inherited\n *\n * Folio view mode and the quest description set prose in Literata at 16.5px,\n * lazy-loaded after first paint; every other surface is Inter. The width\n * table in `textMetrics.ts` is generated against Inter at\n * `DIAGRAM_FONT_SIZE`, so inheriting would make text and box disagree per\n * surface and shift when the serif arrives.\n */\nexport const FlowchartDiagram = (props: FlowchartDiagramProps) => {\n const graph = props.graph;\n // SVG marker ids are global to the document: two diagrams on one page with\n // the same arrowhead id fight, and the loser's arrows vanish.\n const scope = useId().replace(/[^\\w-]/g, \"\");\n\n return (\n <svg\n role=\"img\"\n viewBox={`0 0 ${round(graph.width)} ${round(graph.height)}`}\n // No `width`: the diagram scales to its container, and `max-width`\n // stops a two-node graph being blown up to the full column.\n style={{ maxWidth: `${round(graph.width)}px`, height: \"auto\" }}\n className=\"my-4 block w-full\"\n // camelCase, not `font-family` / `font-size`: React renders these as\n // the hyphenated SVG presentation attributes either way, but the\n // hyphenated spelling is an \"Invalid DOM property\" warning on every\n // render - noise in a component mounted on every markdown surface in\n // the app.\n fontFamily={DIAGRAM_FONT_FAMILY}\n fontSize={graph.fontSize}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <title>{props.title ?? \"Flowchart diagram\"}</title>\n <defs>\n <marker\n id={`${scope}-arrow-end`}\n markerWidth=\"9\"\n markerHeight=\"7\"\n refX=\"8\"\n refY=\"3.5\"\n orient=\"auto\"\n markerUnits=\"userSpaceOnUse\"\n >\n {/*\n `context-stroke`, not `currentColor`. A marker lives in `<defs>`,\n so `currentColor` resolves against the MARKER's inherited colour,\n not the edge's - the arrowhead came out `--foreground` while its\n line was `--muted-foreground`, and in a differently-themed\n container it was the wrong colour outright.\n */}\n <path d=\"M0,0 L9,3.5 L0,7 z\" fill=\"context-stroke\" />\n </marker>\n <marker\n id={`${scope}-arrow-start`}\n markerWidth=\"9\"\n markerHeight=\"7\"\n refX=\"1\"\n refY=\"3.5\"\n orient=\"auto-start-reverse\"\n markerUnits=\"userSpaceOnUse\"\n >\n <path d=\"M0,0 L9,3.5 L0,7 z\" fill=\"context-stroke\" />\n </marker>\n </defs>\n\n {/*\n Order IS z-order in SVG, so clusters (sorted outermost first by the\n layout adapter) go down first, then edges, then nodes on top. No\n z-index anywhere, and nothing to keep in sync.\n */}\n {graph.clusters.map((cluster) => (\n <FlowchartDiagramCluster key={cluster.id} cluster={cluster} />\n ))}\n {graph.edges.map((edge, index) => (\n <FlowchartDiagramEdge\n key={`${edge.from}->${edge.to}#${index}`}\n edge={edge}\n scope={scope}\n fontSize={graph.fontSize}\n />\n ))}\n {graph.nodes.map((node) => (\n <FlowchartDiagramNode\n key={node.id}\n node={node}\n fontSize={graph.fontSize}\n />\n ))}\n </svg>\n );\n};\n\n/**\n * Two decimals is plenty for a diagram and keeps the emitted attributes\n * readable; graphre's raw coordinates carry a dozen.\n */\nexport const round = (value: number): number => Math.round(value * 100) / 100;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,MAAa,oBAAoB,UAAiC;CAChE,MAAM,QAAQ,MAAM;CAGpB,MAAM,QAAQ,MAAM,CAAC,CAAC,QAAQ,WAAW,EAAE;CAE3C,OACE,qBAAC,OAAD;EACE,MAAK;EACL,SAAS,OAAO,MAAM,MAAM,KAAK,EAAE,GAAG,MAAM,MAAM,MAAM;EAGxD,OAAO;GAAE,UAAU,GAAG,MAAM,MAAM,KAAK,EAAE;GAAK,QAAQ;EAAO;EAC7D,WAAU;EAMV,YAAY;EACZ,UAAU,MAAM;EAChB,OAAM;EAdR,UAAA;GAgBE,oBAAC,SAAD,EAAA,UAAQ,MAAM,SAAS,oBAA2B,CAAA;GAClD,qBAAC,QAAD,EAAA,UAAA,CACE,oBAAC,UAAD;IACE,IAAI,GAAG,MAAM;IACb,aAAY;IACZ,cAAa;IACb,MAAK;IACL,MAAK;IACL,QAAO;IACP,aAAY;IASZ,UAAA,oBAAC,QAAD;KAAM,GAAE;KAAqB,MAAK;IAAkB,CAAA;GAC9C,CAAA,GACR,oBAAC,UAAD;IACE,IAAI,GAAG,MAAM;IACb,aAAY;IACZ,cAAa;IACb,MAAK;IACL,MAAK;IACL,QAAO;IACP,aAAY;IAEZ,UAAA,oBAAC,QAAD;KAAM,GAAE;KAAqB,MAAK;IAAkB,CAAA;GAC9C,CAAA,CACJ,EAAA,CAAA;GAOL,MAAM,SAAS,KAAK,YACnB,oBAAC,yBAAD,EAAmD,QAAU,GAA/B,QAAQ,EAAuB,CAC9D;GACA,MAAM,MAAM,KAAK,MAAM,UACtB,oBAAC,sBAAD;IAEQ;IACC;IACP,UAAU,MAAM;GACjB,GAJM,GAAG,KAAK,KAAK,IAAI,KAAK,GAAG,GAAG,OAIlC,CACF;GACA,MAAM,MAAM,KAAK,SAChB,oBAAC,sBAAD;IAEQ;IACN,UAAU,MAAM;GACjB,GAHM,KAAK,EAGX,CACF;EACE;;AAET;;;;;AAMA,MAAa,SAAS,UAA0B,KAAK,MAAM,QAAQ,GAAG,IAAI"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { PositionedCluster } from "./layoutFlowchart.ts";
|
|
3
|
+
export interface FlowchartDiagramClusterProps {
|
|
4
|
+
cluster: PositionedCluster;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* One `subgraph` box, drawn behind its members.
|
|
8
|
+
*
|
|
9
|
+
* The fill alpha grows with nesting depth so an inner cluster reads as
|
|
10
|
+
* inside its parent rather than beside it. `--muted` at a low alpha is dark
|
|
11
|
+
* on light and light on dark, so one value works in both themes.
|
|
12
|
+
*/
|
|
13
|
+
export declare const FlowchartDiagramCluster: (props: FlowchartDiagramClusterProps) => React.JSX.Element;
|
|
14
|
+
//# sourceMappingURL=FlowchartDiagramCluster.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlowchartDiagramCluster.d.ts","sourceRoot":"","sources":["../../../../src/components/markdown-view/diagram/FlowchartDiagramCluster.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,UAC3B,4BAA4B,sBAsCpC,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import "./textMetrics.js";
|
|
2
|
+
import { round } from "./FlowchartDiagram.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/markdown-view/diagram/FlowchartDiagramCluster.tsx
|
|
6
|
+
/**
|
|
7
|
+
* One `subgraph` box, drawn behind its members.
|
|
8
|
+
*
|
|
9
|
+
* The fill alpha grows with nesting depth so an inner cluster reads as
|
|
10
|
+
* inside its parent rather than beside it. `--muted` at a low alpha is dark
|
|
11
|
+
* on light and light on dark, so one value works in both themes.
|
|
12
|
+
*/
|
|
13
|
+
const FlowchartDiagramCluster = (props) => {
|
|
14
|
+
const cluster = props.cluster;
|
|
15
|
+
const x = round(cluster.x);
|
|
16
|
+
const y = round(cluster.y);
|
|
17
|
+
return /* @__PURE__ */ jsxs("g", {
|
|
18
|
+
"data-cluster": cluster.id,
|
|
19
|
+
children: [/* @__PURE__ */ jsx("rect", {
|
|
20
|
+
"data-cluster": cluster.id,
|
|
21
|
+
x,
|
|
22
|
+
y,
|
|
23
|
+
width: round(cluster.width),
|
|
24
|
+
height: round(cluster.height),
|
|
25
|
+
rx: 8,
|
|
26
|
+
ry: 8,
|
|
27
|
+
fill: "var(--muted)",
|
|
28
|
+
fillOpacity: Math.min(.35 + cluster.depth * .2, .8),
|
|
29
|
+
stroke: "var(--border)",
|
|
30
|
+
strokeWidth: 1,
|
|
31
|
+
strokeDasharray: "4 3"
|
|
32
|
+
}), /* @__PURE__ */ jsx("text", {
|
|
33
|
+
x: round(x + 10),
|
|
34
|
+
y: round(y + 13 + 4),
|
|
35
|
+
fill: "var(--muted-foreground)",
|
|
36
|
+
fontSize: 13 * .9,
|
|
37
|
+
fontWeight: 500,
|
|
38
|
+
children: cluster.label
|
|
39
|
+
})]
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
//#endregion
|
|
43
|
+
export { FlowchartDiagramCluster };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=FlowchartDiagramCluster.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlowchartDiagramCluster.js","names":[],"sources":["../../../../src/components/markdown-view/diagram/FlowchartDiagramCluster.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { round } from \"./FlowchartDiagram.tsx\";\nimport type { PositionedCluster } from \"./layoutFlowchart.ts\";\nimport { DIAGRAM_FONT_SIZE } from \"./textMetrics.ts\";\n\nexport interface FlowchartDiagramClusterProps {\n cluster: PositionedCluster;\n}\n\n/**\n * One `subgraph` box, drawn behind its members.\n *\n * The fill alpha grows with nesting depth so an inner cluster reads as\n * inside its parent rather than beside it. `--muted` at a low alpha is dark\n * on light and light on dark, so one value works in both themes.\n */\nexport const FlowchartDiagramCluster = (\n props: FlowchartDiagramClusterProps,\n) => {\n const cluster = props.cluster;\n const x = round(cluster.x);\n const y = round(cluster.y);\n\n return (\n <g data-cluster={cluster.id}>\n <rect\n data-cluster={cluster.id}\n x={x}\n y={y}\n width={round(cluster.width)}\n height={round(cluster.height)}\n rx={8}\n ry={8}\n fill=\"var(--muted)\"\n fillOpacity={Math.min(0.35 + cluster.depth * 0.2, 0.8)}\n stroke=\"var(--border)\"\n strokeWidth={1}\n strokeDasharray=\"4 3\"\n />\n {/*\n Top-left, just inside the box, on the same baseline arithmetic the\n node labels use. A cluster title is a single line by construction:\n the parser never splits it.\n */}\n <text\n x={round(x + 10)}\n y={round(y + DIAGRAM_FONT_SIZE + 4)}\n fill=\"var(--muted-foreground)\"\n fontSize={DIAGRAM_FONT_SIZE * 0.9}\n fontWeight={500}\n >\n {cluster.label}\n </text>\n </g>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAmBA,MAAa,2BACX,UACG;CACH,MAAM,UAAU,MAAM;CACtB,MAAM,IAAI,MAAM,QAAQ,CAAC;CACzB,MAAM,IAAI,MAAM,QAAQ,CAAC;CAEzB,OACE,qBAAC,KAAD;EAAG,gBAAc,QAAQ;EAAzB,UAAA,CACE,oBAAC,QAAD;GACE,gBAAc,QAAQ;GACnB;GACA;GACH,OAAO,MAAM,QAAQ,KAAK;GAC1B,QAAQ,MAAM,QAAQ,MAAM;GAC5B,IAAI;GACJ,IAAI;GACJ,MAAK;GACL,aAAa,KAAK,IAAI,MAAO,QAAQ,QAAQ,IAAK,EAAG;GACrD,QAAO;GACP,aAAa;GACb,iBAAgB;EACjB,CAAA,GAMD,oBAAC,QAAD;GACE,GAAG,MAAM,IAAI,EAAE;GACf,GAAG,MAAM,IAAA,KAAwB,CAAC;GAClC,MAAK;GACL,UAAA,KAA8B;GAC9B,YAAY;GAEX,UAAA,QAAQ;EACL,CAAA,CACL;;AAEP"}
|