@alepha/ui 0.25.2 → 0.26.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 +136 -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 +41 -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 +53 -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 +214 -0
- package/dist/components/account/account-router.d.ts.map +1 -0
- package/dist/components/account/account-router.js +216 -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 +108 -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-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 +200 -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 +101 -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 +135 -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 +54 -0
- package/dist/components/admin/admin-router-page.d.ts.map +1 -0
- package/dist/components/admin/admin-router-page.js +66 -0
- package/dist/components/admin/admin-router-page.js.map +1 -0
- package/dist/components/admin/admin-router.d.ts +169 -0
- package/dist/components/admin/admin-router.d.ts.map +1 -0
- package/dist/components/admin/admin-router.js +346 -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 +124 -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 +14 -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 +162 -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 +386 -0
- package/dist/components/admin/admin-user-detail.js.map +1 -0
- package/dist/components/admin/admin-users-roles-picker.d.ts +23 -0
- package/dist/components/admin/admin-users-roles-picker.d.ts.map +1 -0
- package/dist/components/admin/admin-users-roles-picker.js +77 -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 +325 -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 +153 -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 +218 -0
- package/dist/components/alepha-table/alepha-table.d.ts.map +1 -0
- package/dist/components/alepha-table/alepha-table.js +565 -0
- package/dist/components/alepha-table/alepha-table.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 +135 -0
- package/dist/components/app-shell/app-shell.d.ts.map +1 -0
- package/dist/components/app-shell/app-shell.js +276 -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 +237 -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 +478 -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 +283 -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/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 +147 -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 +97 -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 +300 -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 +444 -0
- package/dist/components/control-array/control-array.js.map +1 -0
- package/dist/components/control-base/field-i18n.d.ts +30 -0
- package/dist/components/control-base/field-i18n.d.ts.map +1 -0
- package/dist/components/control-base/field-i18n.js +27 -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 +111 -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 +45 -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 +65 -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/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/markdown-view.css +114 -0
- package/dist/components/markdown-view/markdown-view.d.ts +21 -0
- package/dist/components/markdown-view/markdown-view.d.ts.map +1 -0
- package/dist/components/markdown-view/markdown-view.js +104 -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 +45 -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-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 +42 -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 +36 -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 +8 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +31 -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 +134 -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 +151 -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 +54 -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 +7 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +43 -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 +139 -0
- package/dist/components/use-dialog/use-dialog.js.map +1 -0
- package/dist/components/use-toast/use-toast.d.ts +37 -0
- package/dist/components/use-toast/use-toast.d.ts.map +1 -0
- package/dist/components/use-toast/use-toast.js +32 -0
- package/dist/components/use-toast/use-toast.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +20 -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 +505 -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 +46 -15
- package/src/components/account/account-connections.tsx +9 -1
- package/src/components/account/account-keys.tsx +1 -1
- package/src/components/account/account-layout.tsx +6 -3
- package/src/components/account/account-profile.tsx +238 -125
- package/src/components/account/account-router-options.tsx +14 -0
- package/src/components/account/account-router.tsx +20 -1
- package/src/components/account/account-security.tsx +1 -1
- package/src/components/admin/admin-router-options.tsx +20 -0
- package/src/components/alepha-table/alepha-table.tsx +23 -7
- package/src/components/app-actions/app-actions.tsx +7 -2
- package/src/components/auth/auth-register.tsx +55 -17
- package/src/components/auto-form/__tests__/auto-form-settings-card.browser.spec.tsx +237 -0
- package/src/components/auto-form/auto-form.tsx +113 -27
- package/src/components/button-user/button-user.tsx +76 -17
- package/src/components/control/control.tsx +33 -8
- package/src/components/control-base/form-field.tsx +60 -3
- package/src/components/markdown-view/__tests__/markdown-view-raw-html.browser.spec.tsx +48 -0
- package/src/components/markdown-view/markdown-view.tsx +14 -6
- package/src/components/nav-shell/__tests__/nav-tree-util.spec.ts +88 -0
- package/src/components/nav-shell/nav-tree-util.ts +48 -0
- package/src/components/nav-shell/use-nav-entries.ts +11 -2
- package/src/components/settings/settings-heading.tsx +55 -0
- package/src/components/settings/settings-layout.tsx +66 -7
- package/src/components/settings/settings-nav.tsx +48 -4
- package/src/components/settings/settings-section.tsx +2 -14
- package/src/components/ui/segmented.tsx +19 -2
- package/src/lib/__tests__/rehype-safe-img.spec.ts +0 -121
- package/src/lib/rehype-safe-img.ts +0 -150
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bounds and encoding for a browser-side downscale.
|
|
3
|
+
*/
|
|
4
|
+
export interface ResizeImageOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Widest the result may be, in pixels.
|
|
7
|
+
*/
|
|
8
|
+
maxWidth: number;
|
|
9
|
+
/**
|
|
10
|
+
* Tallest the result may be. Defaults to `maxWidth`.
|
|
11
|
+
*/
|
|
12
|
+
maxHeight?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Output MIME type. WebP by default: the browser's encoder is **lossy** and
|
|
15
|
+
* keeps the alpha channel, which no wasm build available to the server can
|
|
16
|
+
* do — a transparent logo at 128px is a few kilobytes here and roughly five
|
|
17
|
+
* times that server-side.
|
|
18
|
+
*
|
|
19
|
+
* @default "image/webp"
|
|
20
|
+
*/
|
|
21
|
+
type?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Encoder quality, 0-1.
|
|
24
|
+
*
|
|
25
|
+
* @default 0.82
|
|
26
|
+
*/
|
|
27
|
+
quality?: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Downscales an image in the browser before it is uploaded.
|
|
31
|
+
*
|
|
32
|
+
* Worth doing even though the server enforces the same bounds: this is what
|
|
33
|
+
* stops the megabytes leaving the machine at all. Production project icons
|
|
34
|
+
* averaged 667 KB and reached the full 2 MB cap to fill a 32px box, so the
|
|
35
|
+
* upload itself was the slow part of setting one.
|
|
36
|
+
*
|
|
37
|
+
* **Returns the input untouched** when it is not a raster image, when it
|
|
38
|
+
* already fits, or when the browser lacks `OffscreenCanvas`/`createImageBitmap`
|
|
39
|
+
* — including SVG, which has no pixels to resample and would be rasterised into
|
|
40
|
+
* something worse than it started. So this is a best-effort downscale, not a
|
|
41
|
+
* gate: the storage's `maxSize` is what bounds the pathological case.
|
|
42
|
+
*
|
|
43
|
+
* The browser is also the *better* encoder here, which is why the work belongs
|
|
44
|
+
* on this side. `convertToBlob` produces lossy WebP with an alpha channel;
|
|
45
|
+
* the wasm codecs available to an edge runtime offer lossless WebP (roughly
|
|
46
|
+
* five times the bytes) or JPEG, which has no alpha at all and turns a
|
|
47
|
+
* transparent logo's background black.
|
|
48
|
+
*/
|
|
49
|
+
export declare const resizeImage: (file: File, options: ResizeImageOptions) => Promise<File>;
|
|
50
|
+
//# sourceMappingURL=resize-image.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resize-image.d.ts","sourceRoot":"","sources":["../../src/lib/resize-image.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,WAAW,SAChB,IAAI,WACD,kBAAkB,KAC1B,OAAO,CAAC,IAAI,CAoEd,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
//#region src/lib/resize-image.ts
|
|
2
|
+
/**
|
|
3
|
+
* Downscales an image in the browser before it is uploaded.
|
|
4
|
+
*
|
|
5
|
+
* Worth doing even though the server enforces the same bounds: this is what
|
|
6
|
+
* stops the megabytes leaving the machine at all. Production project icons
|
|
7
|
+
* averaged 667 KB and reached the full 2 MB cap to fill a 32px box, so the
|
|
8
|
+
* upload itself was the slow part of setting one.
|
|
9
|
+
*
|
|
10
|
+
* **Returns the input untouched** when it is not a raster image, when it
|
|
11
|
+
* already fits, or when the browser lacks `OffscreenCanvas`/`createImageBitmap`
|
|
12
|
+
* — including SVG, which has no pixels to resample and would be rasterised into
|
|
13
|
+
* something worse than it started. So this is a best-effort downscale, not a
|
|
14
|
+
* gate: the storage's `maxSize` is what bounds the pathological case.
|
|
15
|
+
*
|
|
16
|
+
* The browser is also the *better* encoder here, which is why the work belongs
|
|
17
|
+
* on this side. `convertToBlob` produces lossy WebP with an alpha channel;
|
|
18
|
+
* the wasm codecs available to an edge runtime offer lossless WebP (roughly
|
|
19
|
+
* five times the bytes) or JPEG, which has no alpha at all and turns a
|
|
20
|
+
* transparent logo's background black.
|
|
21
|
+
*/
|
|
22
|
+
const resizeImage = async (file, options) => {
|
|
23
|
+
if (!file.type.startsWith("image/") || file.type === "image/svg+xml") return file;
|
|
24
|
+
if (typeof createImageBitmap !== "function" || typeof OffscreenCanvas !== "function") return file;
|
|
25
|
+
const maxWidth = options.maxWidth;
|
|
26
|
+
const maxHeight = options.maxHeight ?? options.maxWidth;
|
|
27
|
+
const type = options.type ?? "image/webp";
|
|
28
|
+
let bitmap;
|
|
29
|
+
try {
|
|
30
|
+
bitmap = await createImageBitmap(file);
|
|
31
|
+
const scale = Math.min(1, maxWidth / bitmap.width, maxHeight / bitmap.height);
|
|
32
|
+
if (scale === 1) return file;
|
|
33
|
+
const width = Math.max(1, Math.round(bitmap.width * scale));
|
|
34
|
+
const height = Math.max(1, Math.round(bitmap.height * scale));
|
|
35
|
+
const canvas = new OffscreenCanvas(width, height);
|
|
36
|
+
const context = canvas.getContext("2d");
|
|
37
|
+
if (!context) return file;
|
|
38
|
+
context.imageSmoothingEnabled = true;
|
|
39
|
+
context.imageSmoothingQuality = "high";
|
|
40
|
+
context.drawImage(bitmap, 0, 0, width, height);
|
|
41
|
+
const blob = await canvas.convertToBlob({
|
|
42
|
+
type,
|
|
43
|
+
quality: options.quality ?? .82
|
|
44
|
+
});
|
|
45
|
+
if (blob.type !== type || blob.size >= file.size) return file;
|
|
46
|
+
return new File([blob], renameFor(file.name, blob.type), {
|
|
47
|
+
type: blob.type,
|
|
48
|
+
lastModified: file.lastModified
|
|
49
|
+
});
|
|
50
|
+
} catch {
|
|
51
|
+
return file;
|
|
52
|
+
} finally {
|
|
53
|
+
bitmap?.close();
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Swaps the extension so the name matches the bytes. A file still called
|
|
58
|
+
* `.png` that is really WebP confuses everything downstream that trusts it.
|
|
59
|
+
*/
|
|
60
|
+
const renameFor = (name, type) => {
|
|
61
|
+
const extension = type.split("/")[1]?.replace("jpeg", "jpg") ?? "bin";
|
|
62
|
+
const dot = name.lastIndexOf(".");
|
|
63
|
+
return `${dot > 0 ? name.slice(0, dot) : name}.${extension}`;
|
|
64
|
+
};
|
|
65
|
+
//#endregion
|
|
66
|
+
export { resizeImage };
|
|
67
|
+
|
|
68
|
+
//# sourceMappingURL=resize-image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resize-image.js","names":[],"sources":["../../src/lib/resize-image.ts"],"sourcesContent":["/**\n * Bounds and encoding for a browser-side downscale.\n */\nexport interface ResizeImageOptions {\n /**\n * Widest the result may be, in pixels.\n */\n maxWidth: number;\n\n /**\n * Tallest the result may be. Defaults to `maxWidth`.\n */\n maxHeight?: number;\n\n /**\n * Output MIME type. WebP by default: the browser's encoder is **lossy** and\n * keeps the alpha channel, which no wasm build available to the server can\n * do — a transparent logo at 128px is a few kilobytes here and roughly five\n * times that server-side.\n *\n * @default \"image/webp\"\n */\n type?: string;\n\n /**\n * Encoder quality, 0-1.\n *\n * @default 0.82\n */\n quality?: number;\n}\n\n/**\n * Downscales an image in the browser before it is uploaded.\n *\n * Worth doing even though the server enforces the same bounds: this is what\n * stops the megabytes leaving the machine at all. Production project icons\n * averaged 667 KB and reached the full 2 MB cap to fill a 32px box, so the\n * upload itself was the slow part of setting one.\n *\n * **Returns the input untouched** when it is not a raster image, when it\n * already fits, or when the browser lacks `OffscreenCanvas`/`createImageBitmap`\n * — including SVG, which has no pixels to resample and would be rasterised into\n * something worse than it started. So this is a best-effort downscale, not a\n * gate: the storage's `maxSize` is what bounds the pathological case.\n *\n * The browser is also the *better* encoder here, which is why the work belongs\n * on this side. `convertToBlob` produces lossy WebP with an alpha channel;\n * the wasm codecs available to an edge runtime offer lossless WebP (roughly\n * five times the bytes) or JPEG, which has no alpha at all and turns a\n * transparent logo's background black.\n */\nexport const resizeImage = async (\n file: File,\n options: ResizeImageOptions,\n): Promise<File> => {\n if (!file.type.startsWith(\"image/\") || file.type === \"image/svg+xml\") {\n return file;\n }\n\n if (\n typeof createImageBitmap !== \"function\" ||\n typeof OffscreenCanvas !== \"function\"\n ) {\n return file;\n }\n\n const maxWidth = options.maxWidth;\n const maxHeight = options.maxHeight ?? options.maxWidth;\n const type = options.type ?? \"image/webp\";\n\n let bitmap: ImageBitmap | undefined;\n\n try {\n bitmap = await createImageBitmap(file);\n\n const scale = Math.min(\n 1,\n maxWidth / bitmap.width,\n maxHeight / bitmap.height,\n );\n if (scale === 1) {\n return file;\n }\n\n // A dimension can round to 0 on an extreme aspect ratio, and a\n // zero-pixel canvas throws.\n const width = Math.max(1, Math.round(bitmap.width * scale));\n const height = Math.max(1, Math.round(bitmap.height * scale));\n\n const canvas = new OffscreenCanvas(width, height);\n const context = canvas.getContext(\"2d\");\n if (!context) {\n return file;\n }\n\n context.imageSmoothingEnabled = true;\n context.imageSmoothingQuality = \"high\";\n context.drawImage(bitmap, 0, 0, width, height);\n\n const blob = await canvas.convertToBlob({\n type,\n quality: options.quality ?? 0.82,\n });\n\n // A browser that does not support the requested encoder silently falls\n // back to PNG, which on a photo is bigger than the JPEG it came from.\n // Handing back the original is the honest outcome.\n if (blob.type !== type || blob.size >= file.size) {\n return file;\n }\n\n return new File([blob], renameFor(file.name, blob.type), {\n type: blob.type,\n lastModified: file.lastModified,\n });\n } catch {\n // A corrupt or unsupported image must not cost the user their upload —\n // let the server have its say about the original.\n return file;\n } finally {\n bitmap?.close();\n }\n};\n\n/**\n * Swaps the extension so the name matches the bytes. A file still called\n * `.png` that is really WebP confuses everything downstream that trusts it.\n */\nconst renameFor = (name: string, type: string): string => {\n const extension = type.split(\"/\")[1]?.replace(\"jpeg\", \"jpg\") ?? \"bin\";\n const dot = name.lastIndexOf(\".\");\n const stem = dot > 0 ? name.slice(0, dot) : name;\n return `${stem}.${extension}`;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAoDA,MAAa,cAAc,OACzB,MACA,YACkB;CAClB,IAAI,CAAC,KAAK,KAAK,WAAW,QAAQ,KAAK,KAAK,SAAS,iBACnD,OAAO;CAGT,IACE,OAAO,sBAAsB,cAC7B,OAAO,oBAAoB,YAE3B,OAAO;CAGT,MAAM,WAAW,QAAQ;CACzB,MAAM,YAAY,QAAQ,aAAa,QAAQ;CAC/C,MAAM,OAAO,QAAQ,QAAQ;CAE7B,IAAI;CAEJ,IAAI;EACF,SAAS,MAAM,kBAAkB,IAAI;EAErC,MAAM,QAAQ,KAAK,IACjB,GACA,WAAW,OAAO,OAClB,YAAY,OAAO,MACrB;EACA,IAAI,UAAU,GACZ,OAAO;EAKT,MAAM,QAAQ,KAAK,IAAI,GAAG,KAAK,MAAM,OAAO,QAAQ,KAAK,CAAC;EAC1D,MAAM,SAAS,KAAK,IAAI,GAAG,KAAK,MAAM,OAAO,SAAS,KAAK,CAAC;EAE5D,MAAM,SAAS,IAAI,gBAAgB,OAAO,MAAM;EAChD,MAAM,UAAU,OAAO,WAAW,IAAI;EACtC,IAAI,CAAC,SACH,OAAO;EAGT,QAAQ,wBAAwB;EAChC,QAAQ,wBAAwB;EAChC,QAAQ,UAAU,QAAQ,GAAG,GAAG,OAAO,MAAM;EAE7C,MAAM,OAAO,MAAM,OAAO,cAAc;GACtC;GACA,SAAS,QAAQ,WAAW;EAC9B,CAAC;EAKD,IAAI,KAAK,SAAS,QAAQ,KAAK,QAAQ,KAAK,MAC1C,OAAO;EAGT,OAAO,IAAI,KAAK,CAAC,IAAI,GAAG,UAAU,KAAK,MAAM,KAAK,IAAI,GAAG;GACvD,MAAM,KAAK;GACX,cAAc,KAAK;EACrB,CAAC;CACH,QAAQ;EAGN,OAAO;CACT,UAAU;EACR,QAAQ,MAAM;CAChB;AACF;;;;;AAMA,MAAM,aAAa,MAAc,SAAyB;CACxD,MAAM,YAAY,KAAK,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,QAAQ,QAAQ,KAAK,KAAK;CAChE,MAAM,MAAM,KAAK,YAAY,GAAG;CAEhC,OAAO,GADM,MAAM,IAAI,KAAK,MAAM,GAAG,GAAG,IAAI,KAC7B,GAAG;AACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAG7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../src/lib/utils.ts"],"sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";;;AAGA,SAAgB,GAAG,GAAG,QAAsB;CAC1C,OAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B"}
|
package/dist/styles.css
ADDED
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "tw-animate-css";
|
|
3
|
+
@import "shadcn/tailwind.css";
|
|
4
|
+
|
|
5
|
+
@import "@fontsource-variable/inter/index.css";
|
|
6
|
+
@import "@fontsource-variable/jetbrains-mono/index.css";
|
|
7
|
+
|
|
8
|
+
@source "../**/*.{ts,tsx}";
|
|
9
|
+
@custom-variant dark (&:is(.dark *));
|
|
10
|
+
|
|
11
|
+
@theme inline {
|
|
12
|
+
--color-background: var(--background);
|
|
13
|
+
--color-foreground: var(--foreground);
|
|
14
|
+
--color-card: var(--card);
|
|
15
|
+
--color-card-foreground: var(--card-foreground);
|
|
16
|
+
--color-popover: var(--popover);
|
|
17
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
18
|
+
--color-primary: var(--primary);
|
|
19
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
20
|
+
--color-secondary: var(--secondary);
|
|
21
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
22
|
+
--color-muted: var(--muted);
|
|
23
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
24
|
+
--color-accent: var(--accent);
|
|
25
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
26
|
+
--color-destructive: var(--destructive);
|
|
27
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
28
|
+
--color-border: var(--border);
|
|
29
|
+
--color-input: var(--input);
|
|
30
|
+
--color-ring: var(--ring);
|
|
31
|
+
--color-chart-1: var(--chart-1);
|
|
32
|
+
--color-chart-2: var(--chart-2);
|
|
33
|
+
--color-chart-3: var(--chart-3);
|
|
34
|
+
--color-chart-4: var(--chart-4);
|
|
35
|
+
--color-chart-5: var(--chart-5);
|
|
36
|
+
--color-sidebar: var(--sidebar);
|
|
37
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
38
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
39
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
40
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
41
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
42
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
43
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
44
|
+
--radius-sm: calc(var(--radius) * 0.6);
|
|
45
|
+
--radius-md: calc(var(--radius) * 0.8);
|
|
46
|
+
--radius-lg: var(--radius);
|
|
47
|
+
--radius-xl: calc(var(--radius) * 1.4);
|
|
48
|
+
--radius-2xl: calc(var(--radius) * 1.8);
|
|
49
|
+
--radius-3xl: calc(var(--radius) * 2.2);
|
|
50
|
+
--radius-4xl: calc(var(--radius) * 2.6);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:root {
|
|
54
|
+
--radius: 0.625rem;
|
|
55
|
+
--background: oklch(1 0 0);
|
|
56
|
+
--foreground: oklch(0.145 0 0);
|
|
57
|
+
--card: oklch(1 0 0);
|
|
58
|
+
--card-foreground: oklch(0.145 0 0);
|
|
59
|
+
--popover: oklch(1 0 0);
|
|
60
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
61
|
+
--primary: oklch(0.205 0 0);
|
|
62
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
63
|
+
--secondary: oklch(0.97 0 0);
|
|
64
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
65
|
+
--muted: oklch(0.97 0 0);
|
|
66
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
67
|
+
--accent: oklch(0.97 0 0);
|
|
68
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
69
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
70
|
+
--destructive-foreground: oklch(0.985 0 0);
|
|
71
|
+
--border: oklch(0.922 0 0);
|
|
72
|
+
--input: oklch(0.922 0 0);
|
|
73
|
+
--ring: oklch(0.708 0 0);
|
|
74
|
+
--chart-1: oklch(0.646 0.222 41.116);
|
|
75
|
+
--chart-2: oklch(0.6 0.118 184.704);
|
|
76
|
+
--chart-3: oklch(0.398 0.07 227.392);
|
|
77
|
+
--chart-4: oklch(0.828 0.189 84.429);
|
|
78
|
+
--chart-5: oklch(0.769 0.188 70.08);
|
|
79
|
+
--sidebar: oklch(0.985 0 0);
|
|
80
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
81
|
+
--sidebar-primary: oklch(0.205 0 0);
|
|
82
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
83
|
+
--sidebar-accent: oklch(0.97 0 0);
|
|
84
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
85
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
86
|
+
--sidebar-ring: oklch(0.708 0 0);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.dark {
|
|
90
|
+
--background: oklch(0.145 0 0);
|
|
91
|
+
--foreground: oklch(0.985 0 0);
|
|
92
|
+
--card: oklch(0.205 0 0);
|
|
93
|
+
--card-foreground: oklch(0.985 0 0);
|
|
94
|
+
--popover: oklch(0.205 0 0);
|
|
95
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
96
|
+
--primary: oklch(0.922 0 0);
|
|
97
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
98
|
+
--secondary: oklch(0.269 0 0);
|
|
99
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
100
|
+
--muted: oklch(0.269 0 0);
|
|
101
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
102
|
+
--accent: oklch(0.269 0 0);
|
|
103
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
104
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
105
|
+
--destructive-foreground: oklch(0.985 0 0);
|
|
106
|
+
--border: oklch(1 0 0 / 10%);
|
|
107
|
+
--input: oklch(1 0 0 / 15%);
|
|
108
|
+
--ring: oklch(0.556 0 0);
|
|
109
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
|
110
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
|
111
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
|
112
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
|
113
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
|
114
|
+
--sidebar: oklch(0.205 0 0);
|
|
115
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
116
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
117
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
118
|
+
--sidebar-accent: oklch(0.308 0 0);
|
|
119
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
120
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
121
|
+
--sidebar-ring: oklch(0.556 0 0);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@layer base {
|
|
125
|
+
* {
|
|
126
|
+
@apply border-border outline-ring/50;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
body {
|
|
130
|
+
@apply bg-background text-foreground;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* ────────────────────────────────────────────────────────────────────────
|
|
135
|
+
* Interaction state layer — light mode.
|
|
136
|
+
*
|
|
137
|
+
* shadcn spends ABSOLUTE colors on interaction states: `--accent`, `--muted`
|
|
138
|
+
* and `--sidebar-accent` are all `oklch(0.97 0 0)`, i.e. 3% off white. Dark
|
|
139
|
+
* mode gets a 12% step (0.145 → 0.269), which is why only light mode reads as
|
|
140
|
+
* broken — this whole block is scoped to light and leaves dark bit-for-bit.
|
|
141
|
+
*
|
|
142
|
+
* An absolute fill cannot track a surface that varies, so the step shrinks to
|
|
143
|
+
* nothing as the surface darkens: on `--sidebar` (0.985) it is 1.5%, and a
|
|
144
|
+
* `hover:bg-muted` child sitting on a `bg-muted` panel is a 0% step — the
|
|
145
|
+
* state is literally invisible. Below 0.97 it inverts and hovering BRIGHTENS.
|
|
146
|
+
*
|
|
147
|
+
* So the state fill is an ALPHA WASH rather than a color. Alpha composites
|
|
148
|
+
* over whatever it lands on, which turns the step into a constant ratio of the
|
|
149
|
+
* surface instead of a fixed color: the same weight on white, on a card, on
|
|
150
|
+
* the sidebar and on every Lore theme, and never lighter than its own
|
|
151
|
+
* background. Same idiom the stock `secondary` button variant already uses
|
|
152
|
+
* (`color-mix(in oklch, var(--secondary), var(--foreground) 5%)`).
|
|
153
|
+
*
|
|
154
|
+
* ⚠️ This file is the durable place for it. `src/components/ui/` is
|
|
155
|
+
* overwritten wholesale by `yarn w @alepha/ui sync`, so the same fix written
|
|
156
|
+
* into a primitive's classes would not survive the next sync. This file is not
|
|
157
|
+
* sync-managed.
|
|
158
|
+
* ──────────────────────────────────────────────────────────────────────── */
|
|
159
|
+
|
|
160
|
+
:root:not(.dark) {
|
|
161
|
+
--state-layer: color-mix(in oklch, var(--foreground) 10%, transparent);
|
|
162
|
+
--state-layer-weak: color-mix(in oklch, var(--foreground) 5%, transparent);
|
|
163
|
+
|
|
164
|
+
/* `--accent` and `--sidebar-accent` are PURE interaction tokens across this
|
|
165
|
+
* package and apps/lore — every single use is hover/focus/open/selected,
|
|
166
|
+
* never an opaque surface (verified by grep, incl. the bare `bg-accent`
|
|
167
|
+
* selected-state uses). So the wash goes on the token itself and reaches
|
|
168
|
+
* every state variant at once — hover, focus, data-open, data-highlighted,
|
|
169
|
+
* data-active, aria-expanded — with no selector list to keep in sync.
|
|
170
|
+
*
|
|
171
|
+
* This deliberately overrides the per-theme `--accent` values in Lore's
|
|
172
|
+
* main.css: those were hand-tuned per surface, which is exactly the approach
|
|
173
|
+
* that does not scale. Specificity (0,2,0) beats a bare `.theme-*` (0,1,0). */
|
|
174
|
+
--accent: var(--state-layer);
|
|
175
|
+
--sidebar-accent: var(--state-layer);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* `--muted` is the exception: it is BOTH a state fill and an opaque surface
|
|
179
|
+
* (progress track, tabs list, kbd, card footer, slider). It must stay opaque,
|
|
180
|
+
* so its state variants are reached by selector instead of via the token.
|
|
181
|
+
*
|
|
182
|
+
* Unlayered on purpose — Tailwind's utilities live in `@layer utilities`, and
|
|
183
|
+
* unlayered styles beat layered ones whatever the specificity, so this wins
|
|
184
|
+
* without `!important` and without racing selector counts.
|
|
185
|
+
*
|
|
186
|
+
* Every match is `[class~=]`, the exact space-separated token — never
|
|
187
|
+
* `[class*=]`. A substring match looks equivalent and is not: it also matches
|
|
188
|
+
* `dark:hover:bg-muted/50`, so a ghost button rendered in LIGHT mode picked up
|
|
189
|
+
* the weak layer off its dark-mode class and came out at half strength. Exact
|
|
190
|
+
* tokens cannot do that. The cost is that the fractional list below is
|
|
191
|
+
* enumerated rather than wildcarded — a fraction nobody listed keeps today's
|
|
192
|
+
* behaviour, which is a no-op, not a wrong result. */
|
|
193
|
+
:root:not(.dark)
|
|
194
|
+
:is(
|
|
195
|
+
[class~="hover:bg-muted"]:hover,
|
|
196
|
+
[class~="focus:bg-muted"]:focus,
|
|
197
|
+
[class~="aria-expanded:bg-muted"][aria-expanded="true"]
|
|
198
|
+
) {
|
|
199
|
+
background-color: var(--state-layer);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
:root:not(.dark)
|
|
203
|
+
:is(
|
|
204
|
+
[class~="hover:bg-muted/30"]:hover,
|
|
205
|
+
[class~="hover:bg-muted/40"]:hover,
|
|
206
|
+
[class~="hover:bg-muted/50"]:hover,
|
|
207
|
+
[class~="hover:bg-muted/60"]:hover,
|
|
208
|
+
[class~="hover:bg-muted/70"]:hover,
|
|
209
|
+
[class~="data-open:bg-muted/50"][data-open],
|
|
210
|
+
[class~="data-active:bg-muted/50"][data-active],
|
|
211
|
+
[class~="data-popup-open:bg-muted/50"][data-popup-open],
|
|
212
|
+
[class~="aria-expanded:bg-muted/50"][aria-expanded="true"]
|
|
213
|
+
) {
|
|
214
|
+
background-color: var(--state-layer-weak);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/* ────────────────────────────────────────────────────────────────────────
|
|
218
|
+
* Sidebar active item — a left bar, not a heavier fill.
|
|
219
|
+
*
|
|
220
|
+
* The state layer above deliberately gives the active item the SAME weight as
|
|
221
|
+
* a hovered one, because shadcn spends one token on both. That leaves two
|
|
222
|
+
* adjacent rows — the current page and the one under the pointer — rendering
|
|
223
|
+
* as a single merged shape with no way to tell them apart.
|
|
224
|
+
*
|
|
225
|
+
* The bar resolves it without touching the fill. Presence/absence of a shape
|
|
226
|
+
* is not a color distinction, so it survives where two fills never would: low
|
|
227
|
+
* vision, a bad display, or any theme whose surface drifts. Hover stays purely
|
|
228
|
+
* a fill, so the two states never encode the same way.
|
|
229
|
+
*
|
|
230
|
+
* Both modes, unlike the state layer above: the collision it fixes is
|
|
231
|
+
* shadcn's one-token design, which is present in dark too — dark just happens
|
|
232
|
+
* to render both at `oklch(0.308 0 0)` instead of both at a 10% wash.
|
|
233
|
+
*
|
|
234
|
+
* `--sidebar-primary` rather than a fixed color, so every Lore theme carries
|
|
235
|
+
* its own hue with no per-theme values. Lives here rather than in
|
|
236
|
+
* `sidebar.tsx`, which `yarn w @alepha/ui sync` overwrites wholesale.
|
|
237
|
+
* ──────────────────────────────────────────────────────────────────────── */
|
|
238
|
+
|
|
239
|
+
[data-slot="sidebar-menu-button"][data-active],
|
|
240
|
+
[data-slot="sidebar-menu-sub-button"][data-active] {
|
|
241
|
+
position: relative;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
[data-slot="sidebar-menu-button"][data-active]::after,
|
|
245
|
+
[data-slot="sidebar-menu-sub-button"][data-active]::after {
|
|
246
|
+
content: "";
|
|
247
|
+
position: absolute;
|
|
248
|
+
top: 0.25rem;
|
|
249
|
+
bottom: 0.25rem;
|
|
250
|
+
left: 0;
|
|
251
|
+
width: 3px;
|
|
252
|
+
border-radius: 9999px;
|
|
253
|
+
background-color: var(--sidebar-primary);
|
|
254
|
+
}
|
package/package.json
CHANGED
|
@@ -7,36 +7,49 @@
|
|
|
7
7
|
"shadcn",
|
|
8
8
|
"base-ui",
|
|
9
9
|
"react",
|
|
10
|
-
"tailwind"
|
|
10
|
+
"tailwind",
|
|
11
|
+
"typescript"
|
|
11
12
|
],
|
|
12
|
-
"author": "
|
|
13
|
-
"version": "0.
|
|
13
|
+
"author": "Nicolas Foures",
|
|
14
|
+
"version": "0.26.0",
|
|
14
15
|
"type": "module",
|
|
15
16
|
"engines": {
|
|
16
17
|
"node": ">=22.0.0"
|
|
17
18
|
},
|
|
18
19
|
"license": "MIT",
|
|
19
|
-
"homepage": "https://
|
|
20
|
+
"homepage": "https://alepha.dev",
|
|
21
|
+
"llms": "https://alepha.dev/llms.txt",
|
|
20
22
|
"repository": {
|
|
21
23
|
"type": "git",
|
|
22
24
|
"url": "git+https://github.com/feunard/alepha.git"
|
|
23
25
|
},
|
|
24
26
|
"files": [
|
|
27
|
+
"dist",
|
|
25
28
|
"src",
|
|
26
29
|
"components.json"
|
|
27
30
|
],
|
|
28
31
|
"scripts": {
|
|
29
32
|
"sync": "node scripts/sync.mjs",
|
|
33
|
+
"build": "tsdown && tsc -p tsconfig.build.json && node scripts/copy-css.mjs",
|
|
30
34
|
"typecheck": "tsc --noEmit"
|
|
31
35
|
},
|
|
32
36
|
"exports": {
|
|
33
|
-
"./components/*":
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
"./components/*": {
|
|
38
|
+
"types": "./dist/components/*.d.ts",
|
|
39
|
+
"default": "./dist/components/*.js"
|
|
40
|
+
},
|
|
41
|
+
"./hooks/*": {
|
|
42
|
+
"types": "./dist/hooks/*.d.ts",
|
|
43
|
+
"default": "./dist/hooks/*.js"
|
|
44
|
+
},
|
|
45
|
+
"./lib/*": {
|
|
46
|
+
"types": "./dist/lib/*.d.ts",
|
|
47
|
+
"default": "./dist/lib/*.js"
|
|
48
|
+
},
|
|
36
49
|
"./styles.css": "./src/styles.css"
|
|
37
50
|
},
|
|
38
51
|
"dependencies": {
|
|
39
|
-
"@base-ui/react": "^1.
|
|
52
|
+
"@base-ui/react": "^1.7.0",
|
|
40
53
|
"@fontsource-variable/inter": "^5.3.0",
|
|
41
54
|
"@fontsource-variable/jetbrains-mono": "^5.3.0",
|
|
42
55
|
"class-variance-authority": "^0.7.1",
|
|
@@ -44,9 +57,9 @@
|
|
|
44
57
|
"cmdk": "^1.1.1",
|
|
45
58
|
"date-fns": "^4.4.0",
|
|
46
59
|
"embla-carousel-react": "^8.6.0",
|
|
47
|
-
"highlight.js": "^11.
|
|
60
|
+
"highlight.js": "^11.12.0",
|
|
48
61
|
"input-otp": "^1.4.2",
|
|
49
|
-
"lucide-react": "^1.
|
|
62
|
+
"lucide-react": "^1.31.0",
|
|
50
63
|
"react-day-picker": "^10.0.1",
|
|
51
64
|
"react-is": "^19.2.8",
|
|
52
65
|
"react-markdown": "^10.1.0",
|
|
@@ -54,13 +67,13 @@
|
|
|
54
67
|
"recharts": "3.10.1",
|
|
55
68
|
"rehype-highlight": "^7.0.2",
|
|
56
69
|
"remark-gfm": "^4.0.1",
|
|
57
|
-
"shadcn": "^4.
|
|
58
|
-
"sonner": "^2.0.
|
|
70
|
+
"shadcn": "^4.18.0",
|
|
71
|
+
"sonner": "^2.0.8",
|
|
59
72
|
"tailwind-merge": "^3.6.0",
|
|
60
73
|
"tw-animate-css": "^1.4.0"
|
|
61
74
|
},
|
|
62
75
|
"peerDependencies": {
|
|
63
|
-
"alepha": "0.
|
|
76
|
+
"alepha": "^0.26.0",
|
|
64
77
|
"react": "*",
|
|
65
78
|
"react-dom": "*",
|
|
66
79
|
"recharts": "^3",
|
|
@@ -72,13 +85,31 @@
|
|
|
72
85
|
}
|
|
73
86
|
},
|
|
74
87
|
"devDependencies": {
|
|
75
|
-
"@biomejs/biome": "^2.5.
|
|
88
|
+
"@biomejs/biome": "^2.5.8",
|
|
76
89
|
"@testing-library/dom": "^10.4.1",
|
|
77
90
|
"@testing-library/react": "^16.3.2",
|
|
78
91
|
"@types/react": "^19.2.18",
|
|
79
|
-
"alepha": "0.
|
|
92
|
+
"alepha": "0.26.0",
|
|
80
93
|
"react": "^19.2.8",
|
|
81
94
|
"react-dom": "^19.2.8",
|
|
95
|
+
"tsdown": "^0.22.14",
|
|
82
96
|
"typescript": "^7.0.2"
|
|
97
|
+
},
|
|
98
|
+
"publishConfig": {
|
|
99
|
+
"exports": {
|
|
100
|
+
"./components/*": {
|
|
101
|
+
"types": "./dist/components/*.d.ts",
|
|
102
|
+
"default": "./dist/components/*.js"
|
|
103
|
+
},
|
|
104
|
+
"./hooks/*": {
|
|
105
|
+
"types": "./dist/hooks/*.d.ts",
|
|
106
|
+
"default": "./dist/hooks/*.js"
|
|
107
|
+
},
|
|
108
|
+
"./lib/*": {
|
|
109
|
+
"types": "./dist/lib/*.d.ts",
|
|
110
|
+
"default": "./dist/lib/*.js"
|
|
111
|
+
},
|
|
112
|
+
"./styles.css": "./src/styles.css"
|
|
113
|
+
}
|
|
83
114
|
}
|
|
84
115
|
}
|
|
@@ -52,8 +52,16 @@ const AccountConnections = (props: AccountConnectionsProps) => {
|
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
if (connections.length === 0) {
|
|
55
|
+
/*
|
|
56
|
+
Same title AND description as the populated branch below. An empty page
|
|
57
|
+
that drops its description reads as a different page, and the sentence is
|
|
58
|
+
exactly what a reader with nothing on screen needs.
|
|
59
|
+
*/
|
|
55
60
|
return (
|
|
56
|
-
<SettingsSection
|
|
61
|
+
<SettingsSection
|
|
62
|
+
title="Connected apps"
|
|
63
|
+
description="Applications that can act on your behalf."
|
|
64
|
+
>
|
|
57
65
|
<SettingsRow
|
|
58
66
|
label={
|
|
59
67
|
<span className="flex items-center gap-2 text-muted-foreground">
|
|
@@ -125,7 +125,7 @@ const AccountKeys = (props: AccountKeysProps) => {
|
|
|
125
125
|
|
|
126
126
|
<SettingsRow
|
|
127
127
|
label="Create a key"
|
|
128
|
-
description="Shown once, at creation
|
|
128
|
+
description="Shown once, at creation. It cannot be recovered afterwards."
|
|
129
129
|
>
|
|
130
130
|
<Button
|
|
131
131
|
variant="secondary"
|
|
@@ -23,9 +23,11 @@ import { accountRouterOptionsAtom } from "./account-router-options.tsx";
|
|
|
23
23
|
* an application mounting it standalone is already supplying `header` and
|
|
24
24
|
* owns its chrome. A second component writing to `<html>` would be the
|
|
25
25
|
* surprise, not the service.
|
|
26
|
-
* - **No scroll container.** The page scrolls
|
|
27
|
-
*
|
|
28
|
-
*
|
|
26
|
+
* - **No scroll container by default.** The page scrolls, and a nested
|
|
27
|
+
* `overflow-auto` would strand the sticky rail against the wrong scroll
|
|
28
|
+
* root. An application whose own shell has already taken the viewport
|
|
29
|
+
* height and hidden its overflow has no page scroll to lend, and opts in
|
|
30
|
+
* with `fill` on the options atom — see `SettingsLayout`.
|
|
29
31
|
*
|
|
30
32
|
* `useNavEntries` returns entries already filtered by `can` and permission,
|
|
31
33
|
* and sorted by group then order — and its `NavEntry` is structurally a
|
|
@@ -40,6 +42,7 @@ export const AccountLayout = () => {
|
|
|
40
42
|
return (
|
|
41
43
|
<SettingsLayout
|
|
42
44
|
className={options.className}
|
|
45
|
+
fill={options.fill}
|
|
43
46
|
/*
|
|
44
47
|
`!== undefined`, not `??`. `null ?? x` yields `x`, so nullish
|
|
45
48
|
coalescing would silently ignore `header: null` — the documented way
|