@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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Nicolas Foures
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -4,9 +4,217 @@ Shared shadcn Base UI Nova components for Alepha apps. Edited directly; bugfixes
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Part of the Alepha framework, published on its own:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install alepha
|
|
10
|
+
npm install @alepha/ui
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
`@alepha/ui` is the shared component library for Alepha applications: a
|
|
16
|
+
[shadcn](https://ui.shadcn.com) collection in the `base-nova` style, built on
|
|
17
|
+
Base UI and Tailwind, with [lucide](https://lucide.dev) icons.
|
|
18
|
+
|
|
19
|
+
Unlike the rest of the framework, these components are **meant to be edited
|
|
20
|
+
directly**: `src/` ships alongside the built `dist/`, so you can copy a
|
|
21
|
+
component into your app and change it, or depend on the package and let
|
|
22
|
+
bugfixes arrive through normal dependency updates.
|
|
23
|
+
|
|
24
|
+
## Import paths
|
|
25
|
+
|
|
26
|
+
Every component lives in its own directory, so the import path repeats the
|
|
27
|
+
name:
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import { Button } from "@alepha/ui/components/ui/button";
|
|
31
|
+
import { AutoForm } from "@alepha/ui/components/auto-form/auto-form";
|
|
32
|
+
import { useToast } from "@alepha/ui/components/use-toast/use-toast";
|
|
33
|
+
import { cn } from "@alepha/ui/lib/utils";
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Load the stylesheet once, at your app's entry point:
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
import "@alepha/ui/styles.css";
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## What's inside
|
|
43
|
+
|
|
44
|
+
**`components/ui/*`** - the shadcn primitives, unmodified in spirit: `button`,
|
|
45
|
+
`input`, `card`, `badge`, `dialog`, `sheet`, `tooltip`, `label`, `accordion`,
|
|
46
|
+
`avatar`, and the rest. Reach for these first.
|
|
47
|
+
|
|
48
|
+
**Schema-driven forms** - `auto-form` renders a complete form from a `z.object()`
|
|
49
|
+
schema, driven by the `$control` metadata on each field. `control`,
|
|
50
|
+
`control-array`, `control-object`, `control-date`, `control-number`,
|
|
51
|
+
`control-select`, `control-password`, and `control-upload` are the per-type
|
|
52
|
+
field renderers it dispatches to; use them directly when you want to lay a form
|
|
53
|
+
out by hand.
|
|
54
|
+
|
|
55
|
+
**`alepha-table`** - data table wired for server-side pagination, sorting and
|
|
56
|
+
filtering.
|
|
57
|
+
|
|
58
|
+
**Application shells** - `app-shell` and `nav-shell` for page scaffolding,
|
|
59
|
+
`app-actions` for toolbars, plus ready-made `auth`, `account`, `settings`, and
|
|
60
|
+
`admin` screens.
|
|
61
|
+
|
|
62
|
+
**`markdown-view`** - renders markdown as prose, with diagrams. See the section
|
|
63
|
+
below.
|
|
64
|
+
|
|
65
|
+
**Hooks** - `use-toast` and `use-dialog` (imperative toasts and modals) live
|
|
66
|
+
under `components/`; `use-mobile` lives under `hooks/`.
|
|
67
|
+
|
|
68
|
+
**`lib/*`** - `utils` exports `cn()`, the `clsx` + `tailwind-merge` helper every
|
|
69
|
+
component uses. Also `resize-image` and `i18n-fr`.
|
|
70
|
+
|
|
71
|
+
## Example
|
|
72
|
+
|
|
73
|
+
`AutoForm` pairs with `useForm` from `alepha/react/form`. The schema is the
|
|
74
|
+
single source of truth - field types, validation, and layout hints all come
|
|
75
|
+
from it:
|
|
76
|
+
|
|
77
|
+
```tsx
|
|
78
|
+
import { AutoForm } from "@alepha/ui/components/auto-form/auto-form";
|
|
79
|
+
import { z } from "alepha";
|
|
80
|
+
import { useForm } from "alepha/react/form";
|
|
81
|
+
|
|
82
|
+
const profileSchema = z.object({
|
|
83
|
+
username: z
|
|
84
|
+
.string()
|
|
85
|
+
.min(2)
|
|
86
|
+
.max(32)
|
|
87
|
+
.meta({ $control: { icon: "user" } }),
|
|
88
|
+
email: z.string(),
|
|
89
|
+
newsletter: z.boolean(),
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
export const ProfilePage = () => {
|
|
93
|
+
const form = useForm({
|
|
94
|
+
schema: profileSchema,
|
|
95
|
+
initialValues: { username: "", email: "", newsletter: false },
|
|
96
|
+
handler: (values) => save(values),
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
return (
|
|
100
|
+
<AutoForm
|
|
101
|
+
form={form}
|
|
102
|
+
icon="cog"
|
|
103
|
+
title="Account profile"
|
|
104
|
+
autoGroup
|
|
105
|
+
disabledIfPristine
|
|
106
|
+
/>
|
|
107
|
+
);
|
|
108
|
+
};
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
`autoGroup` derives field groups from the schema shape; pass `groups` instead to
|
|
112
|
+
lay them out yourself.
|
|
113
|
+
|
|
114
|
+
### Settings cards
|
|
115
|
+
|
|
116
|
+
`layout="row"` renders the same shape as the `SettingsSection` / `SettingsRow`
|
|
117
|
+
kit rather than an approximation of it: each group becomes a bordered card of
|
|
118
|
+
divided rows, label and help on the left, control on the right, and the action
|
|
119
|
+
bar is the card's own last row. Each group carries its own `title` and
|
|
120
|
+
`description`, rendered through the same `SettingsHeading` the kit uses.
|
|
121
|
+
|
|
122
|
+
```tsx
|
|
123
|
+
<AutoForm
|
|
124
|
+
form={form}
|
|
125
|
+
layout="row"
|
|
126
|
+
disabledIfPristine
|
|
127
|
+
groups={[
|
|
128
|
+
{
|
|
129
|
+
title: "Name",
|
|
130
|
+
description: "How you are identified to other people.",
|
|
131
|
+
fields: ["username", "firstName", "lastName"],
|
|
132
|
+
},
|
|
133
|
+
]}
|
|
134
|
+
/>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
So a settings card whose rows are all form fields should be an `AutoForm`.
|
|
138
|
+
Reach for `SettingsSection` directly for the rows that are _not_ fields - an
|
|
139
|
+
avatar picker, a read-only value, a lone button.
|
|
140
|
+
|
|
141
|
+
Add `autoSave` to commit on change instead, which hides the action bar. Text
|
|
142
|
+
fields still never commit on keystroke: they commit on Enter, or on the inline
|
|
143
|
+
tick that appears in the input once the field is dirty.
|
|
144
|
+
|
|
145
|
+
## Markdown, and diagrams in it
|
|
146
|
+
|
|
147
|
+
`MarkdownView` renders markdown as formatted prose. Raw HTML is always escaped
|
|
148
|
+
to text, never promoted to markup: it renders content authored by one user to
|
|
149
|
+
another, so a live raw tag would be an injection point on every surface built on
|
|
150
|
+
this package.
|
|
151
|
+
|
|
152
|
+
A ` ```mermaid ` fence containing a **`flowchart`** is drawn as an SVG diagram
|
|
153
|
+
instead of a code block. The renderer is in-house rather than mermaid itself:
|
|
154
|
+
mermaid is roughly 500-900 kB gzip in a browser and cannot run without a DOM,
|
|
155
|
+
because it measures text in a hidden element. Here the only imported piece is
|
|
156
|
+
`graphre` (dagre in TypeScript, ~15.5 kB gzip) for layout; parsing, text
|
|
157
|
+
measurement and drawing are ours. The whole thing is one lazy chunk of about
|
|
158
|
+
18 kB gzip, imported only when a document actually contains a fence, so a
|
|
159
|
+
document with no diagram pays nothing.
|
|
160
|
+
|
|
161
|
+
Drawing it ourselves is what makes the diagram look like the app: the SVG uses
|
|
162
|
+
`--card`, `--border`, `--muted-foreground` and `--muted`, so dark mode works
|
|
163
|
+
with no second palette and no theme prop.
|
|
164
|
+
|
|
165
|
+
The syntax is mermaid's so a document stays portable to GitHub, Obsidian and
|
|
166
|
+
anywhere else, but only a subset is drawn:
|
|
167
|
+
|
|
168
|
+
| | |
|
|
169
|
+
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
170
|
+
| Header | `flowchart` / `graph`, `TD` `TB` `LR` `RL` `BT` |
|
|
171
|
+
| Nodes | `[rect]` `(rounded)` `{diamond}` `((circle))`; `([ ])` `[[ ]]` `[( )]` `{{ }}` `> ]` `[/ /]` `[\ \]` `((( )))` are consumed and mapped onto those four |
|
|
172
|
+
| Edges | `-->` `---` `-.->` `==>` `<-->`; `--o` and `--x` parse, but the emitter has one end marker, so they draw the same arrowhead as `-->` rather than mermaid's circle and cross |
|
|
173
|
+
| Edge labels | both `-->\|text\|` and `-- text -->` |
|
|
174
|
+
| Structure | chains `A --> B --> C`, fans `A & B --> C`, nested `subgraph` |
|
|
175
|
+
| Text | `<br/>` becomes a line break; quoted and backtick-quoted labels |
|
|
176
|
+
|
|
177
|
+
Everything else degrades to the code block it renders as today, silently:
|
|
178
|
+
`sequenceDiagram`, `classDiagram`, `gantt` and mindmaps are not drawn, `style`
|
|
179
|
+
and `classDef` are ignored (the theme picks the colours), and a malformed
|
|
180
|
+
diagram, a parse failure or a graph past the 200-node / 400-edge cap all render
|
|
181
|
+
the plain fence rather than an error.
|
|
182
|
+
|
|
183
|
+
⚠️ **A node label must not contain a link operator.** The statement is scanned
|
|
184
|
+
for links before anything knows where the labels are, so a `--`, `==` or `-.`
|
|
185
|
+
sequence inside `[...]` is read as an edge and the label is cut. `A[--o]` yields
|
|
186
|
+
an empty `A` and a bogus node named `]`; `A[pre--post]` truncates to `pre`.
|
|
187
|
+
Quoting does NOT protect it - `A["-->"]` is damaged identically, because
|
|
188
|
+
`splitOnLinks` runs with no quote awareness. A single hyphen (`A[well-known]`)
|
|
189
|
+
is safe. There is no escape that works today, and the failure is silent: the
|
|
190
|
+
graph still draws, with the wrong text.
|
|
191
|
+
|
|
192
|
+
The font is pinned rather than inherited. Layout needs node sizes before it can
|
|
193
|
+
place anything, and node width comes from a generated per-character width table
|
|
194
|
+
measured against Inter at one size; inheriting the surrounding face would make
|
|
195
|
+
text and box disagree, differently on every surface.
|
|
196
|
+
|
|
197
|
+
## Adding a shadcn component
|
|
198
|
+
|
|
199
|
+
`components.json` is configured for this package, so the shadcn CLI drops new
|
|
200
|
+
components in the right place with the right aliases:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
npx shadcn@latest add <component>
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## Refreshing stock primitives
|
|
207
|
+
|
|
208
|
+
`yarn w @alepha/ui sync` re-fetches the stock `components/ui/*` primitives from
|
|
209
|
+
the public `ui.shadcn.com/r/styles/base-nova` registry and rewrites their
|
|
210
|
+
`@/registry/...` imports to `@alepha/ui/...`. It touches only the stock
|
|
211
|
+
primitives - the hand-maintained blocks (controls, admin, auth, app-shell,
|
|
212
|
+
alepha-table, …) are never overwritten. After a sync, diff for removed
|
|
213
|
+
`from "alepha/` imports before committing: the registry copy does not know
|
|
214
|
+
about local patches.
|
|
215
|
+
|
|
216
|
+
## API Reference
|
|
217
|
+
|
|
218
|
+
### React Hooks
|
|
219
|
+
|
|
220
|
+
- [`useIsMobile`](https://alepha.dev/docs/reference-react-hooks-useismobile) - Upstream's version seeds `undefined` and fills it in from an effect, which
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { MyConnection } from "alepha/api/users";
|
|
2
|
+
export interface AccountConnectionsProps {
|
|
3
|
+
connections?: MyConnection[];
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Applications holding access to this account through OAuth — an MCP client,
|
|
7
|
+
* a CLI, a third-party integration.
|
|
8
|
+
*
|
|
9
|
+
* Confirmed on revoke, unlike a plain session. A session comes back by
|
|
10
|
+
* signing in again; a connection comes back only by re-running whatever
|
|
11
|
+
* authorization flow created it, which for an MCP client means the person has
|
|
12
|
+
* to go and reconnect it from the other side.
|
|
13
|
+
*/
|
|
14
|
+
declare const AccountConnections: (props: AccountConnectionsProps) => import("react").JSX.Element;
|
|
15
|
+
export default AccountConnections;
|
|
16
|
+
//# sourceMappingURL=account-connections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-connections.d.ts","sourceRoot":"","sources":["../../../src/components/account/account-connections.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAA0B,MAAM,kBAAkB,CAAC;AAM7E,MAAM,WAAW,uBAAuB;IACtC,WAAW,CAAC,EAAE,YAAY,EAAE,CAAC;CAC9B;AAED;;;;;;;;GAQG;AACH,QAAA,MAAM,kBAAkB,UAAW,uBAAuB,gCAoFzD,CAAC;eAEa,kBAAkB"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { SettingsRow } from "../settings/settings-row.js";
|
|
2
|
+
import { SettingsSection } from "../settings/settings-section.js";
|
|
3
|
+
import { Button } from "../ui/button.js";
|
|
4
|
+
import { useDialog } from "../use-dialog/use-dialog.js";
|
|
5
|
+
import { useToast } from "../use-toast/use-toast.js";
|
|
6
|
+
import { useState } from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { Plug } from "lucide-react";
|
|
9
|
+
import { DateTimeProvider } from "alepha/datetime";
|
|
10
|
+
import { useClient, useInject } from "alepha/react";
|
|
11
|
+
//#region src/components/account/account-connections.tsx
|
|
12
|
+
/**
|
|
13
|
+
* Applications holding access to this account through OAuth — an MCP client,
|
|
14
|
+
* a CLI, a third-party integration.
|
|
15
|
+
*
|
|
16
|
+
* Confirmed on revoke, unlike a plain session. A session comes back by
|
|
17
|
+
* signing in again; a connection comes back only by re-running whatever
|
|
18
|
+
* authorization flow created it, which for an MCP client means the person has
|
|
19
|
+
* to go and reconnect it from the other side.
|
|
20
|
+
*/
|
|
21
|
+
const AccountConnections = (props) => {
|
|
22
|
+
const api = useClient();
|
|
23
|
+
const dt = useInject(DateTimeProvider);
|
|
24
|
+
const dialog = useDialog();
|
|
25
|
+
const toaster = useToast();
|
|
26
|
+
const [connections, setConnections] = useState(props.connections ?? []);
|
|
27
|
+
const revoke = async (connection) => {
|
|
28
|
+
if (!await dialog.confirm({
|
|
29
|
+
title: `Disconnect ${connection.clientName}?`,
|
|
30
|
+
description: "It loses access immediately and has to be authorized again to come back.",
|
|
31
|
+
confirmLabel: "Disconnect",
|
|
32
|
+
destructive: true
|
|
33
|
+
})) return;
|
|
34
|
+
try {
|
|
35
|
+
await api.revokeMyConnection({ params: { id: connection.id } });
|
|
36
|
+
setConnections((prev) => prev.filter((it) => it.id !== connection.id));
|
|
37
|
+
} catch (error) {
|
|
38
|
+
toaster.show(error?.message ?? "Could not disconnect it", "danger");
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
if (connections.length === 0) return /* @__PURE__ */ jsx(SettingsSection, {
|
|
42
|
+
title: "Connected apps",
|
|
43
|
+
description: "Applications that can act on your behalf.",
|
|
44
|
+
children: /* @__PURE__ */ jsx(SettingsRow, {
|
|
45
|
+
label: /* @__PURE__ */ jsxs("span", {
|
|
46
|
+
className: "text-muted-foreground flex items-center gap-2",
|
|
47
|
+
children: [/* @__PURE__ */ jsx(Plug, { className: "size-4" }), "Nothing is connected"]
|
|
48
|
+
}),
|
|
49
|
+
description: "Applications you authorize will appear here."
|
|
50
|
+
})
|
|
51
|
+
});
|
|
52
|
+
return /* @__PURE__ */ jsx(SettingsSection, {
|
|
53
|
+
title: "Connected apps",
|
|
54
|
+
description: "Applications that can act on your behalf.",
|
|
55
|
+
children: connections.map((connection) => /* @__PURE__ */ jsx(SettingsRow, {
|
|
56
|
+
label: /* @__PURE__ */ jsxs("span", {
|
|
57
|
+
className: "flex items-center gap-2",
|
|
58
|
+
children: [connection.clientName, connection.current ? /* @__PURE__ */ jsx("span", {
|
|
59
|
+
className: "text-muted-foreground text-xs",
|
|
60
|
+
children: "(this one)"
|
|
61
|
+
}) : null]
|
|
62
|
+
}),
|
|
63
|
+
description: `Connected ${dt.of(connection.createdAt).fromNow()}${connection.lastUsedAt ? ` · last used ${dt.of(connection.lastUsedAt).fromNow()}` : " · never used"}`,
|
|
64
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
65
|
+
variant: "ghost",
|
|
66
|
+
size: "sm",
|
|
67
|
+
onClick: () => revoke(connection),
|
|
68
|
+
children: "Disconnect"
|
|
69
|
+
})
|
|
70
|
+
}, connection.id))
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
//#endregion
|
|
74
|
+
export { AccountConnections as default };
|
|
75
|
+
|
|
76
|
+
//# sourceMappingURL=account-connections.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-connections.js","names":[],"sources":["../../../src/components/account/account-connections.tsx"],"sourcesContent":["import { SettingsRow } from \"@alepha/ui/components/settings/settings-row\";\nimport { SettingsSection } from \"@alepha/ui/components/settings/settings-section\";\nimport { Button } from \"@alepha/ui/components/ui/button\";\nimport { useDialog } from \"@alepha/ui/components/use-dialog/use-dialog\";\nimport { useToast } from \"@alepha/ui/components/use-toast/use-toast\";\nimport type { MyConnection, MyConnectionController } from \"alepha/api/users\";\nimport { DateTimeProvider } from \"alepha/datetime\";\nimport { useClient, useInject } from \"alepha/react\";\nimport { Plug } from \"lucide-react\";\nimport { useState } from \"react\";\n\nexport interface AccountConnectionsProps {\n connections?: MyConnection[];\n}\n\n/**\n * Applications holding access to this account through OAuth — an MCP client,\n * a CLI, a third-party integration.\n *\n * Confirmed on revoke, unlike a plain session. A session comes back by\n * signing in again; a connection comes back only by re-running whatever\n * authorization flow created it, which for an MCP client means the person has\n * to go and reconnect it from the other side.\n */\nconst AccountConnections = (props: AccountConnectionsProps) => {\n const api = useClient<MyConnectionController>();\n const dt = useInject(DateTimeProvider);\n const dialog = useDialog();\n const toaster = useToast();\n\n const [connections, setConnections] = useState<MyConnection[]>(\n props.connections ?? [],\n );\n\n const revoke = async (connection: MyConnection) => {\n const ok = await dialog.confirm({\n title: `Disconnect ${connection.clientName}?`,\n description:\n \"It loses access immediately and has to be authorized again to come back.\",\n confirmLabel: \"Disconnect\",\n destructive: true,\n });\n if (!ok) {\n return;\n }\n try {\n await api.revokeMyConnection({ params: { id: connection.id } });\n setConnections((prev) => prev.filter((it) => it.id !== connection.id));\n } catch (error: any) {\n toaster.show(error?.message ?? \"Could not disconnect it\", \"danger\");\n }\n };\n\n if (connections.length === 0) {\n /*\n Same title AND description as the populated branch below. An empty page\n that drops its description reads as a different page, and the sentence is\n exactly what a reader with nothing on screen needs.\n */\n return (\n <SettingsSection\n title=\"Connected apps\"\n description=\"Applications that can act on your behalf.\"\n >\n <SettingsRow\n label={\n <span className=\"text-muted-foreground flex items-center gap-2\">\n <Plug className=\"size-4\" />\n Nothing is connected\n </span>\n }\n description=\"Applications you authorize will appear here.\"\n />\n </SettingsSection>\n );\n }\n\n return (\n <SettingsSection\n title=\"Connected apps\"\n description=\"Applications that can act on your behalf.\"\n >\n {connections.map((connection) => (\n <SettingsRow\n key={connection.id}\n label={\n <span className=\"flex items-center gap-2\">\n {connection.clientName}\n {connection.current ? (\n <span className=\"text-muted-foreground text-xs\">\n (this one)\n </span>\n ) : null}\n </span>\n }\n description={`Connected ${dt.of(connection.createdAt).fromNow()}${\n connection.lastUsedAt\n ? ` · last used ${dt.of(connection.lastUsedAt).fromNow()}`\n : \" · never used\"\n }`}\n >\n <Button variant=\"ghost\" size=\"sm\" onClick={() => revoke(connection)}>\n Disconnect\n </Button>\n </SettingsRow>\n ))}\n </SettingsSection>\n );\n};\n\nexport default AccountConnections;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAwBA,MAAM,sBAAsB,UAAmC;CAC7D,MAAM,MAAM,UAAkC;CAC9C,MAAM,KAAK,UAAU,gBAAgB;CACrC,MAAM,SAAS,UAAU;CACzB,MAAM,UAAU,SAAS;CAEzB,MAAM,CAAC,aAAa,kBAAkB,SACpC,MAAM,eAAe,CAAC,CACxB;CAEA,MAAM,SAAS,OAAO,eAA6B;EAQjD,IAAI,CAAC,MAPY,OAAO,QAAQ;GAC9B,OAAO,cAAc,WAAW,WAAW;GAC3C,aACE;GACF,cAAc;GACd,aAAa;EACf,CAAC,GAEC;EAEF,IAAI;GACF,MAAM,IAAI,mBAAmB,EAAE,QAAQ,EAAE,IAAI,WAAW,GAAG,EAAE,CAAC;GAC9D,gBAAgB,SAAS,KAAK,QAAQ,OAAO,GAAG,OAAO,WAAW,EAAE,CAAC;EACvE,SAAS,OAAY;GACnB,QAAQ,KAAK,OAAO,WAAW,2BAA2B,QAAQ;EACpE;CACF;CAEA,IAAI,YAAY,WAAW,GAMzB,OACE,oBAAC,iBAAD;EACE,OAAM;EACN,aAAY;EAEZ,UAAA,oBAAC,aAAD;GACE,OACE,qBAAC,QAAD;IAAM,WAAU;IAAhB,UAAA,CACE,oBAAC,MAAD,EAAM,WAAU,SAAU,CAAA,GAAC,sBAEvB;;GAER,aAAY;EACb,CAAA;CACc,CAAA;CAIrB,OACE,oBAAC,iBAAD;EACE,OAAM;EACN,aAAY;EAEX,UAAA,YAAY,KAAK,eAChB,oBAAC,aAAD;GAEE,OACE,qBAAC,QAAD;IAAM,WAAU;IAAhB,UAAA,CACG,WAAW,YACX,WAAW,UACV,oBAAC,QAAD;KAAM,WAAU;KAAgC,UAAA;IAE1C,CAAA,IACJ,IACA;;GAER,aAAa,aAAa,GAAG,GAAG,WAAW,SAAS,CAAC,CAAC,QAAQ,IAC5D,WAAW,aACP,gBAAgB,GAAG,GAAG,WAAW,UAAU,CAAC,CAAC,QAAQ,MACrD;GAGN,UAAA,oBAAC,QAAD;IAAQ,SAAQ;IAAQ,MAAK;IAAK,eAAe,OAAO,UAAU;IAAG,UAAA;GAE7D,CAAA;EACG,GApBN,WAAW,EAoBL,CACd;CACc,CAAA;AAErB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface AccountDeleteDialogProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Whether the account has a `credentials` identity. An OAuth-only account
|
|
6
|
+
* has no password to prove knowledge of, so the field is not shown — and
|
|
7
|
+
* the server agrees, accepting the confirmation phrase alone.
|
|
8
|
+
*/
|
|
9
|
+
hasPassword: boolean;
|
|
10
|
+
onOpenChange: (open: boolean) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Application-supplied consequences, rendered above the confirmation field.
|
|
13
|
+
*
|
|
14
|
+
* The framework can say what deleting an *account* does; it cannot say what
|
|
15
|
+
* that costs inside your data. An application whose foreign keys cascade —
|
|
16
|
+
* rows the account authored inside other people's projects, say — puts the
|
|
17
|
+
* count here so the person reads it *before* confirming rather than
|
|
18
|
+
* discovering it afterwards.
|
|
19
|
+
*
|
|
20
|
+
* A `ReactNode` rather than a string because the honest version of this is
|
|
21
|
+
* usually a live count, which means a component that fetches one.
|
|
22
|
+
*/
|
|
23
|
+
warning?: ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Called once the account is gone. The caller signs the (now orphaned)
|
|
26
|
+
* session out.
|
|
27
|
+
*/
|
|
28
|
+
onDeleted: () => void | Promise<void>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Permanently delete your own account.
|
|
32
|
+
*
|
|
33
|
+
* Asks for two independent things because the two failure modes are different
|
|
34
|
+
* people: the password proves it is *you* (against someone at your unlocked
|
|
35
|
+
* laptop), and typing the confirmation phrase proves you *meant it* (against
|
|
36
|
+
* you, five seconds from now).
|
|
37
|
+
*
|
|
38
|
+
* The phrase is fetched rather than guessed. The server accepts the account's
|
|
39
|
+
* email, falling back to username and then the literal `DELETE`, and this
|
|
40
|
+
* dialog must ask for exactly what the server will accept — a hardcoded
|
|
41
|
+
* "type DELETE" would be refused for every account that has an email.
|
|
42
|
+
*/
|
|
43
|
+
export declare const AccountDeleteDialog: (props: AccountDeleteDialogProps) => import("react").JSX.Element;
|
|
44
|
+
//# sourceMappingURL=account-delete-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-delete-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/account/account-delete-dialog.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAkB,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAC;AAE5E,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,OAAO,CAAC;IAEd;;;;OAIG;IACH,WAAW,EAAE,OAAO,CAAC;IAErB,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAEtC;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;;OAGG;IACH,SAAS,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB,UAAW,wBAAwB,gCAuHlE,CAAC"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { Button } from "../ui/button.js";
|
|
2
|
+
import { Input } from "../ui/input.js";
|
|
3
|
+
import { useToast } from "../use-toast/use-toast.js";
|
|
4
|
+
import { Label } from "../ui/label.js";
|
|
5
|
+
import { ControlPassword } from "../control-password/control-password.js";
|
|
6
|
+
import { Dialog, DialogContent, DialogHeader, DialogTitle } from "../ui/dialog.js";
|
|
7
|
+
import { useEffect, useState } from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { useClient } from "alepha/react";
|
|
10
|
+
//#region src/components/account/account-delete-dialog.tsx
|
|
11
|
+
/**
|
|
12
|
+
* Permanently delete your own account.
|
|
13
|
+
*
|
|
14
|
+
* Asks for two independent things because the two failure modes are different
|
|
15
|
+
* people: the password proves it is *you* (against someone at your unlocked
|
|
16
|
+
* laptop), and typing the confirmation phrase proves you *meant it* (against
|
|
17
|
+
* you, five seconds from now).
|
|
18
|
+
*
|
|
19
|
+
* The phrase is fetched rather than guessed. The server accepts the account's
|
|
20
|
+
* email, falling back to username and then the literal `DELETE`, and this
|
|
21
|
+
* dialog must ask for exactly what the server will accept — a hardcoded
|
|
22
|
+
* "type DELETE" would be refused for every account that has an email.
|
|
23
|
+
*/
|
|
24
|
+
const AccountDeleteDialog = (props) => {
|
|
25
|
+
const accountApi = useClient();
|
|
26
|
+
const profileApi = useClient();
|
|
27
|
+
const toaster = useToast();
|
|
28
|
+
const [expected, setExpected] = useState();
|
|
29
|
+
const [confirm, setConfirm] = useState("");
|
|
30
|
+
const [currentPassword, setCurrentPassword] = useState("");
|
|
31
|
+
const [submitting, setSubmitting] = useState(false);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (!props.open) return;
|
|
34
|
+
let cancelled = false;
|
|
35
|
+
profileApi.getMyProfile().then((profile) => {
|
|
36
|
+
if (!cancelled) setExpected(profile.email ?? profile.username ?? "DELETE");
|
|
37
|
+
}).catch(() => {
|
|
38
|
+
if (!cancelled) setExpected("DELETE");
|
|
39
|
+
});
|
|
40
|
+
return () => {
|
|
41
|
+
cancelled = true;
|
|
42
|
+
};
|
|
43
|
+
}, [props.open, profileApi]);
|
|
44
|
+
const close = () => {
|
|
45
|
+
setConfirm("");
|
|
46
|
+
setCurrentPassword("");
|
|
47
|
+
props.onOpenChange(false);
|
|
48
|
+
};
|
|
49
|
+
const submit = async (event) => {
|
|
50
|
+
event.preventDefault();
|
|
51
|
+
setSubmitting(true);
|
|
52
|
+
try {
|
|
53
|
+
await accountApi.deleteMyAccount({ body: {
|
|
54
|
+
confirm,
|
|
55
|
+
currentPassword: props.hasPassword ? currentPassword : void 0
|
|
56
|
+
} });
|
|
57
|
+
await props.onDeleted();
|
|
58
|
+
} catch (error) {
|
|
59
|
+
toaster.show(error?.message ?? "Could not delete your account", "danger");
|
|
60
|
+
} finally {
|
|
61
|
+
setSubmitting(false);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const ready = expected !== void 0 && confirm === expected;
|
|
65
|
+
return /* @__PURE__ */ jsx(Dialog, {
|
|
66
|
+
open: props.open,
|
|
67
|
+
onOpenChange: (next) => !next && close(),
|
|
68
|
+
children: /* @__PURE__ */ jsxs(DialogContent, { children: [/* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { children: "Delete your account" }) }), /* @__PURE__ */ jsxs("form", {
|
|
69
|
+
onSubmit: submit,
|
|
70
|
+
className: "flex flex-col gap-4",
|
|
71
|
+
children: [
|
|
72
|
+
/* @__PURE__ */ jsx("span", {
|
|
73
|
+
className: "text-muted-foreground text-sm",
|
|
74
|
+
children: "This permanently removes your account, its sign-in methods and every session. It cannot be undone."
|
|
75
|
+
}),
|
|
76
|
+
props.warning,
|
|
77
|
+
props.hasPassword ? /* @__PURE__ */ jsx(ControlPassword, {
|
|
78
|
+
id: "deleteCurrentPassword",
|
|
79
|
+
label: "Current password",
|
|
80
|
+
value: currentPassword,
|
|
81
|
+
onChange: setCurrentPassword,
|
|
82
|
+
autoComplete: "current-password",
|
|
83
|
+
required: true
|
|
84
|
+
}) : null,
|
|
85
|
+
/* @__PURE__ */ jsxs("div", {
|
|
86
|
+
className: "flex flex-col gap-1.5",
|
|
87
|
+
children: [/* @__PURE__ */ jsxs(Label, {
|
|
88
|
+
htmlFor: "deleteConfirm",
|
|
89
|
+
children: [
|
|
90
|
+
"Type ",
|
|
91
|
+
/* @__PURE__ */ jsx("span", {
|
|
92
|
+
className: "font-mono",
|
|
93
|
+
children: expected ?? "…"
|
|
94
|
+
}),
|
|
95
|
+
" to confirm"
|
|
96
|
+
]
|
|
97
|
+
}), /* @__PURE__ */ jsx(Input, {
|
|
98
|
+
id: "deleteConfirm",
|
|
99
|
+
value: confirm,
|
|
100
|
+
onChange: (event) => setConfirm(event.target.value),
|
|
101
|
+
autoComplete: "off",
|
|
102
|
+
required: true
|
|
103
|
+
})]
|
|
104
|
+
}),
|
|
105
|
+
/* @__PURE__ */ jsxs("div", {
|
|
106
|
+
className: "flex justify-end gap-2",
|
|
107
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
108
|
+
type: "button",
|
|
109
|
+
variant: "ghost",
|
|
110
|
+
onClick: close,
|
|
111
|
+
children: "Cancel"
|
|
112
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
113
|
+
type: "submit",
|
|
114
|
+
variant: "destructive",
|
|
115
|
+
disabled: submitting || !ready,
|
|
116
|
+
children: "Delete account"
|
|
117
|
+
})]
|
|
118
|
+
})
|
|
119
|
+
]
|
|
120
|
+
})] })
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
//#endregion
|
|
124
|
+
export { AccountDeleteDialog };
|
|
125
|
+
|
|
126
|
+
//# sourceMappingURL=account-delete-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-delete-dialog.js","names":[],"sources":["../../../src/components/account/account-delete-dialog.tsx"],"sourcesContent":["import { ControlPassword } from \"@alepha/ui/components/control-password/control-password\";\nimport { Button } from \"@alepha/ui/components/ui/button\";\nimport {\n Dialog,\n DialogContent,\n DialogHeader,\n DialogTitle,\n} from \"@alepha/ui/components/ui/dialog\";\nimport { Input } from \"@alepha/ui/components/ui/input\";\nimport { Label } from \"@alepha/ui/components/ui/label\";\nimport { useToast } from \"@alepha/ui/components/use-toast/use-toast\";\nimport type {\n MyAccountController,\n MyProfileController,\n} from \"alepha/api/users\";\nimport { useClient } from \"alepha/react\";\nimport { type FormEvent, type ReactNode, useEffect, useState } from \"react\";\n\nexport interface AccountDeleteDialogProps {\n open: boolean;\n\n /**\n * Whether the account has a `credentials` identity. An OAuth-only account\n * has no password to prove knowledge of, so the field is not shown — and\n * the server agrees, accepting the confirmation phrase alone.\n */\n hasPassword: boolean;\n\n onOpenChange: (open: boolean) => void;\n\n /**\n * Application-supplied consequences, rendered above the confirmation field.\n *\n * The framework can say what deleting an *account* does; it cannot say what\n * that costs inside your data. An application whose foreign keys cascade —\n * rows the account authored inside other people's projects, say — puts the\n * count here so the person reads it *before* confirming rather than\n * discovering it afterwards.\n *\n * A `ReactNode` rather than a string because the honest version of this is\n * usually a live count, which means a component that fetches one.\n */\n warning?: ReactNode;\n\n /**\n * Called once the account is gone. The caller signs the (now orphaned)\n * session out.\n */\n onDeleted: () => void | Promise<void>;\n}\n\n/**\n * Permanently delete your own account.\n *\n * Asks for two independent things because the two failure modes are different\n * people: the password proves it is *you* (against someone at your unlocked\n * laptop), and typing the confirmation phrase proves you *meant it* (against\n * you, five seconds from now).\n *\n * The phrase is fetched rather than guessed. The server accepts the account's\n * email, falling back to username and then the literal `DELETE`, and this\n * dialog must ask for exactly what the server will accept — a hardcoded\n * \"type DELETE\" would be refused for every account that has an email.\n */\nexport const AccountDeleteDialog = (props: AccountDeleteDialogProps) => {\n const accountApi = useClient<MyAccountController>();\n const profileApi = useClient<MyProfileController>();\n const toaster = useToast();\n\n const [expected, setExpected] = useState<string | undefined>();\n const [confirm, setConfirm] = useState(\"\");\n const [currentPassword, setCurrentPassword] = useState(\"\");\n const [submitting, setSubmitting] = useState(false);\n\n useEffect(() => {\n if (!props.open) {\n return;\n }\n let cancelled = false;\n profileApi\n .getMyProfile()\n .then((profile) => {\n if (!cancelled) {\n setExpected(profile.email ?? profile.username ?? \"DELETE\");\n }\n })\n .catch(() => {\n if (!cancelled) {\n setExpected(\"DELETE\");\n }\n });\n return () => {\n cancelled = true;\n };\n }, [props.open, profileApi]);\n\n const close = () => {\n setConfirm(\"\");\n setCurrentPassword(\"\");\n props.onOpenChange(false);\n };\n\n const submit = async (event: FormEvent) => {\n event.preventDefault();\n setSubmitting(true);\n try {\n await accountApi.deleteMyAccount({\n body: {\n confirm,\n currentPassword: props.hasPassword ? currentPassword : undefined,\n },\n });\n await props.onDeleted();\n } catch (error: any) {\n /*\n An application's `user:delete:before` hook refuses here — \"You still\n own 3 projects\" — and the framework's fast-path emit delivers that\n message unwrapped. Showing it verbatim is the entire reason the emit\n avoids `{ log: true }`; a generic \"could not delete\" would waste it.\n */\n toaster.show(error?.message ?? \"Could not delete your account\", \"danger\");\n } finally {\n setSubmitting(false);\n }\n };\n\n const ready = expected !== undefined && confirm === expected;\n\n return (\n <Dialog open={props.open} onOpenChange={(next) => !next && close()}>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Delete your account</DialogTitle>\n </DialogHeader>\n <form onSubmit={submit} className=\"flex flex-col gap-4\">\n <span className=\"text-muted-foreground text-sm\">\n This permanently removes your account, its sign-in methods and every\n session. It cannot be undone.\n </span>\n\n {props.warning}\n\n {props.hasPassword ? (\n <ControlPassword\n id=\"deleteCurrentPassword\"\n label=\"Current password\"\n value={currentPassword}\n onChange={setCurrentPassword}\n autoComplete=\"current-password\"\n required\n />\n ) : null}\n\n <div className=\"flex flex-col gap-1.5\">\n <Label htmlFor=\"deleteConfirm\">\n Type <span className=\"font-mono\">{expected ?? \"…\"}</span> to\n confirm\n </Label>\n <Input\n id=\"deleteConfirm\"\n value={confirm}\n onChange={(event) => setConfirm(event.target.value)}\n autoComplete=\"off\"\n required\n />\n </div>\n\n <div className=\"flex justify-end gap-2\">\n <Button type=\"button\" variant=\"ghost\" onClick={close}>\n Cancel\n </Button>\n <Button\n type=\"submit\"\n variant=\"destructive\"\n disabled={submitting || !ready}\n >\n Delete account\n </Button>\n </div>\n </form>\n </DialogContent>\n </Dialog>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAgEA,MAAa,uBAAuB,UAAoC;CACtE,MAAM,aAAa,UAA+B;CAClD,MAAM,aAAa,UAA+B;CAClD,MAAM,UAAU,SAAS;CAEzB,MAAM,CAAC,UAAU,eAAe,SAA6B;CAC7D,MAAM,CAAC,SAAS,cAAc,SAAS,EAAE;CACzC,MAAM,CAAC,iBAAiB,sBAAsB,SAAS,EAAE;CACzD,MAAM,CAAC,YAAY,iBAAiB,SAAS,KAAK;CAElD,gBAAgB;EACd,IAAI,CAAC,MAAM,MACT;EAEF,IAAI,YAAY;EAChB,WACG,aAAa,CAAC,CACd,MAAM,YAAY;GACjB,IAAI,CAAC,WACH,YAAY,QAAQ,SAAS,QAAQ,YAAY,QAAQ;EAE7D,CAAC,CAAC,CACD,YAAY;GACX,IAAI,CAAC,WACH,YAAY,QAAQ;EAExB,CAAC;EACH,aAAa;GACX,YAAY;EACd;CACF,GAAG,CAAC,MAAM,MAAM,UAAU,CAAC;CAE3B,MAAM,cAAc;EAClB,WAAW,EAAE;EACb,mBAAmB,EAAE;EACrB,MAAM,aAAa,KAAK;CAC1B;CAEA,MAAM,SAAS,OAAO,UAAqB;EACzC,MAAM,eAAe;EACrB,cAAc,IAAI;EAClB,IAAI;GACF,MAAM,WAAW,gBAAgB,EAC/B,MAAM;IACJ;IACA,iBAAiB,MAAM,cAAc,kBAAkB,KAAA;GACzD,EACF,CAAC;GACD,MAAM,MAAM,UAAU;EACxB,SAAS,OAAY;GAOnB,QAAQ,KAAK,OAAO,WAAW,iCAAiC,QAAQ;EAC1E,UAAU;GACR,cAAc,KAAK;EACrB;CACF;CAEA,MAAM,QAAQ,aAAa,KAAA,KAAa,YAAY;CAEpD,OACE,oBAAC,QAAD;EAAQ,MAAM,MAAM;EAAM,eAAe,SAAS,CAAC,QAAQ,MAAM;EAC/D,UAAA,qBAAC,eAAD,EAAA,UAAA,CACE,oBAAC,cAAD,EAAA,UACE,oBAAC,aAAD,EAAA,UAAa,sBAAgC,CAAA,EACjC,CAAA,GACd,qBAAC,QAAD;GAAM,UAAU;GAAQ,WAAU;GAAlC,UAAA;IACE,oBAAC,QAAD;KAAM,WAAU;KAAgC,UAAA;IAG1C,CAAA;IAEL,MAAM;IAEN,MAAM,cACL,oBAAC,iBAAD;KACE,IAAG;KACH,OAAM;KACN,OAAO;KACP,UAAU;KACV,cAAa;KACb,UAAA;IACD,CAAA,IACC;IAEJ,qBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACE,qBAAC,OAAD;MAAO,SAAQ;MAAf,UAAA;OAA+B;OACxB,oBAAC,QAAD;QAAM,WAAU;QAAa,UAAA,YAAY;OAAU,CAAA;OAAC;MAEpD;KACP,CAAA,GAAA,oBAAC,OAAD;MACE,IAAG;MACH,OAAO;MACP,WAAW,UAAU,WAAW,MAAM,OAAO,KAAK;MAClD,cAAa;MACb,UAAA;KACD,CAAA,CACE;;IAEL,qBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACE,oBAAC,QAAD;MAAQ,MAAK;MAAS,SAAQ;MAAQ,SAAS;MAAO,UAAA;KAE9C,CAAA,GACR,oBAAC,QAAD;MACE,MAAK;MACL,SAAQ;MACR,UAAU,cAAc,CAAC;MAC1B,UAAA;KAEO,CAAA,CACL;;GACD;EACO,CAAA,CAAA,EAAA,CAAA;CACT,CAAA;AAEZ"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface AccountHeaderProps {
|
|
2
|
+
/**
|
|
3
|
+
* Route name the back link points at.
|
|
4
|
+
*
|
|
5
|
+
* @default "home"
|
|
6
|
+
*/
|
|
7
|
+
homeRouteName?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Label for the back link.
|
|
10
|
+
*
|
|
11
|
+
* @default "Back to site"
|
|
12
|
+
*/
|
|
13
|
+
backLabel?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The account area's top bar: a way out on the left, the ambient controls on
|
|
17
|
+
* the right.
|
|
18
|
+
*
|
|
19
|
+
* The way out is the point. `/account` is a destination you arrive at from
|
|
20
|
+
* somewhere else and leave again, and unlike `/admin` it has no sidebar to
|
|
21
|
+
* carry a brand or a home affordance — without this the only exit is the
|
|
22
|
+
* browser's back button.
|
|
23
|
+
*
|
|
24
|
+
* It is a real `<Link href>`, not a button that calls `router.push`, so the
|
|
25
|
+
* middle-click / open-in-new-tab / copy-link behaviours all work and the
|
|
26
|
+
* destination is visible in the status bar on hover.
|
|
27
|
+
*
|
|
28
|
+
* Replaceable wholesale: `AccountRouterOptions.header` overrides this, for an
|
|
29
|
+
* application whose account area sits inside its own chrome and needs no
|
|
30
|
+
* second header.
|
|
31
|
+
*/
|
|
32
|
+
export declare const AccountHeader: (props: AccountHeaderProps) => import("react").JSX.Element;
|
|
33
|
+
//# sourceMappingURL=account-header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-header.d.ts","sourceRoot":"","sources":["../../../src/components/account/account-header.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,aAAa,UAAW,kBAAkB,gCAuBtD,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Button } from "../ui/button.js";
|
|
2
|
+
import { AppActions } from "../app-actions/app-actions.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { ArrowLeft } from "lucide-react";
|
|
5
|
+
import { Link as Link$1, useRouter } from "alepha/react/router";
|
|
6
|
+
//#region src/components/account/account-header.tsx
|
|
7
|
+
/**
|
|
8
|
+
* The account area's top bar: a way out on the left, the ambient controls on
|
|
9
|
+
* the right.
|
|
10
|
+
*
|
|
11
|
+
* The way out is the point. `/account` is a destination you arrive at from
|
|
12
|
+
* somewhere else and leave again, and unlike `/admin` it has no sidebar to
|
|
13
|
+
* carry a brand or a home affordance — without this the only exit is the
|
|
14
|
+
* browser's back button.
|
|
15
|
+
*
|
|
16
|
+
* It is a real `<Link href>`, not a button that calls `router.push`, so the
|
|
17
|
+
* middle-click / open-in-new-tab / copy-link behaviours all work and the
|
|
18
|
+
* destination is visible in the status bar on hover.
|
|
19
|
+
*
|
|
20
|
+
* Replaceable wholesale: `AccountRouterOptions.header` overrides this, for an
|
|
21
|
+
* application whose account area sits inside its own chrome and needs no
|
|
22
|
+
* second header.
|
|
23
|
+
*/
|
|
24
|
+
const AccountHeader = (props) => {
|
|
25
|
+
const router = useRouter();
|
|
26
|
+
const home = props.homeRouteName ?? "home";
|
|
27
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
28
|
+
className: "flex items-center justify-between gap-4 border-b pb-3",
|
|
29
|
+
children: [/* @__PURE__ */ jsxs(Button, {
|
|
30
|
+
variant: "ghost",
|
|
31
|
+
size: "sm",
|
|
32
|
+
className: "text-muted-foreground hover:text-foreground -ml-2",
|
|
33
|
+
render: /* @__PURE__ */ jsx(Link$1, { href: router.path(home) }),
|
|
34
|
+
nativeButton: false,
|
|
35
|
+
role: "link",
|
|
36
|
+
children: [/* @__PURE__ */ jsx(ArrowLeft, { className: "size-4" }), props.backLabel ?? "Back to site"]
|
|
37
|
+
}), /* @__PURE__ */ jsx(AppActions, {})]
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
41
|
+
export { AccountHeader };
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=account-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-header.js","names":["Link"],"sources":["../../../src/components/account/account-header.tsx"],"sourcesContent":["import { AppActions } from \"@alepha/ui/components/app-actions/app-actions\";\nimport { Button } from \"@alepha/ui/components/ui/button\";\nimport { Link, useRouter } from \"alepha/react/router\";\nimport { ArrowLeft } from \"lucide-react\";\n\nexport interface AccountHeaderProps {\n /**\n * Route name the back link points at.\n *\n * @default \"home\"\n */\n homeRouteName?: string;\n\n /**\n * Label for the back link.\n *\n * @default \"Back to site\"\n */\n backLabel?: string;\n}\n\n/**\n * The account area's top bar: a way out on the left, the ambient controls on\n * the right.\n *\n * The way out is the point. `/account` is a destination you arrive at from\n * somewhere else and leave again, and unlike `/admin` it has no sidebar to\n * carry a brand or a home affordance — without this the only exit is the\n * browser's back button.\n *\n * It is a real `<Link href>`, not a button that calls `router.push`, so the\n * middle-click / open-in-new-tab / copy-link behaviours all work and the\n * destination is visible in the status bar on hover.\n *\n * Replaceable wholesale: `AccountRouterOptions.header` overrides this, for an\n * application whose account area sits inside its own chrome and needs no\n * second header.\n */\nexport const AccountHeader = (props: AccountHeaderProps) => {\n const router = useRouter<any>();\n const home = props.homeRouteName ?? \"home\";\n\n return (\n <div className=\"flex items-center justify-between gap-4 border-b pb-3\">\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"text-muted-foreground hover:text-foreground -ml-2\"\n render={<Link href={router.path(home)} />}\n // A link wearing a button's clothes: `nativeButton={false}` stops Base UI\n // assuming a native <button> (it warns otherwise), and `role` puts back the\n // link semantics its non-native branch would overwrite with `role=\"button\"`.\n nativeButton={false}\n role=\"link\"\n >\n <ArrowLeft className=\"size-4\" />\n {props.backLabel ?? \"Back to site\"}\n </Button>\n <AppActions />\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAsCA,MAAa,iBAAiB,UAA8B;CAC1D,MAAM,SAAS,UAAe;CAC9B,MAAM,OAAO,MAAM,iBAAiB;CAEpC,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,qBAAC,QAAD;GACE,SAAQ;GACR,MAAK;GACL,WAAU;GACV,QAAQ,oBAACA,QAAD,EAAM,MAAM,OAAO,KAAK,IAAI,EAAI,CAAA;GAIxC,cAAc;GACd,MAAK;GATP,UAAA,CAWE,oBAAC,WAAD,EAAW,WAAU,SAAU,CAAA,GAC9B,MAAM,aAAa,cACd;EACR,CAAA,GAAA,oBAAC,YAAD,CAAa,CAAA,CACV;;AAET"}
|