@eifi1/ui-kit 0.33.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +445 -283
- package/dist/account/account-parts.d.ts +6 -8
- package/dist/account/account-parts.js +1 -2
- package/dist/account/account-parts.js.map +1 -1
- package/dist/{components → account}/account-settings-labels.d.ts +16 -10
- package/dist/{components → account}/account-settings-labels.js +3 -1
- package/dist/account/account-settings-labels.js.map +1 -0
- package/dist/{components → account}/account-settings.d.ts +53 -23
- package/dist/{components → account}/account-settings.js +97 -26
- package/dist/account/account-settings.js.map +1 -0
- package/dist/account/data-export-setting-labels.d.ts +2 -0
- package/dist/account/data-export-setting-labels.js +15 -0
- package/dist/account/data-export-setting-labels.js.map +1 -0
- package/dist/account/data-export-setting.d.ts +9 -11
- package/dist/account/data-export-setting.js +11 -27
- package/dist/account/data-export-setting.js.map +1 -1
- package/dist/account/delete-account-setting-labels.d.ts +2 -0
- package/dist/account/delete-account-setting-labels.js +23 -0
- package/dist/account/delete-account-setting-labels.js.map +1 -0
- package/dist/account/delete-account-setting.d.ts +132 -100
- package/dist/account/delete-account-setting.js +7 -23
- package/dist/account/delete-account-setting.js.map +1 -1
- package/dist/account/email-change-setting-labels.d.ts +2 -0
- package/dist/account/email-change-setting-labels.js +28 -0
- package/dist/account/email-change-setting-labels.js.map +1 -0
- package/dist/account/email-change-setting.d.ts +10 -12
- package/dist/account/email-change-setting.js +11 -30
- package/dist/account/email-change-setting.js.map +1 -1
- package/dist/{components → account}/passkeys-setting.d.ts +9 -12
- package/dist/{components → account}/passkeys-setting.js +10 -7
- package/dist/account/passkeys-setting.js.map +1 -0
- package/dist/account/sessions-setting-labels.d.ts +2 -0
- package/dist/account/sessions-setting-labels.js +22 -0
- package/dist/account/sessions-setting-labels.js.map +1 -0
- package/dist/account/sessions-setting.d.ts +12 -14
- package/dist/account/sessions-setting.js +8 -23
- package/dist/account/sessions-setting.js.map +1 -1
- package/dist/admin/admin-action-confirm-labels.d.ts +2 -0
- package/dist/admin/admin-action-confirm-labels.js +16 -0
- package/dist/admin/admin-action-confirm-labels.js.map +1 -0
- package/dist/admin/admin-action-confirm.d.ts +156 -100
- package/dist/admin/admin-action-confirm.js +17 -22
- package/dist/admin/admin-action-confirm.js.map +1 -1
- package/dist/admin/admin-action-log-labels.d.ts +2 -0
- package/dist/admin/admin-action-log-labels.js +73 -0
- package/dist/admin/admin-action-log-labels.js.map +1 -0
- package/dist/admin/admin-action-log.d.ts +98 -22
- package/dist/admin/admin-action-log.js +48 -45
- package/dist/admin/admin-action-log.js.map +1 -1
- package/dist/admin/admin-parts.d.ts +7 -14
- package/dist/admin/admin-parts.js +0 -4
- package/dist/admin/admin-parts.js.map +1 -1
- package/dist/admin/invitations-panel-labels.d.ts +2 -0
- package/dist/admin/invitations-panel-labels.js +29 -0
- package/dist/admin/invitations-panel-labels.js.map +1 -0
- package/dist/admin/invitations-panel.d.ts +167 -100
- package/dist/admin/invitations-panel.js +12 -31
- package/dist/admin/invitations-panel.js.map +1 -1
- package/dist/admin/plan-change-labels.d.ts +2 -0
- package/dist/admin/plan-change-labels.js +22 -0
- package/dist/admin/plan-change-labels.js.map +1 -0
- package/dist/admin/plan-change.d.ts +244 -100
- package/dist/admin/plan-change.js +17 -23
- package/dist/admin/plan-change.js.map +1 -1
- package/dist/admin/reviewer-scope-editor-labels.d.ts +2 -0
- package/dist/admin/reviewer-scope-editor-labels.js +14 -0
- package/dist/admin/reviewer-scope-editor-labels.js.map +1 -0
- package/dist/admin/reviewer-scope-editor.d.ts +95 -100
- package/dist/admin/reviewer-scope-editor.js +5 -13
- package/dist/admin/reviewer-scope-editor.js.map +1 -1
- package/dist/admin/role-select-labels.d.ts +2 -0
- package/dist/admin/role-select-labels.js +15 -0
- package/dist/admin/role-select-labels.js.map +1 -0
- package/dist/admin/role-select.d.ts +136 -100
- package/dist/admin/role-select.js +7 -18
- package/dist/admin/role-select.js.map +1 -1
- package/dist/admin/transfer-ownership-dialog-labels.d.ts +2 -0
- package/dist/admin/transfer-ownership-dialog-labels.js +18 -0
- package/dist/admin/transfer-ownership-dialog-labels.js.map +1 -0
- package/dist/admin/transfer-ownership-dialog.d.ts +81 -100
- package/dist/admin/transfer-ownership-dialog.js +3 -15
- package/dist/admin/transfer-ownership-dialog.js.map +1 -1
- package/dist/admin/user-roster-labels.d.ts +2 -0
- package/dist/admin/user-roster-labels.js +16 -0
- package/dist/admin/user-roster-labels.js.map +1 -0
- package/dist/admin/user-roster.d.ts +225 -100
- package/dist/admin/user-roster.js +4 -14
- package/dist/admin/user-roster.js.map +1 -1
- package/dist/auth/accept-invitation-labels.d.ts +2 -0
- package/dist/auth/accept-invitation-labels.js +20 -0
- package/dist/auth/accept-invitation-labels.js.map +1 -0
- package/dist/auth/accept-invitation.d.ts +11 -13
- package/dist/auth/accept-invitation.js +3 -16
- package/dist/auth/accept-invitation.js.map +1 -1
- package/dist/auth/auth-errors.d.ts +34 -23
- package/dist/auth/auth-errors.js +8 -4
- package/dist/auth/auth-errors.js.map +1 -1
- package/dist/auth/complete-name-dialog-labels.d.ts +2 -0
- package/dist/auth/complete-name-dialog-labels.js +14 -0
- package/dist/auth/complete-name-dialog-labels.js.map +1 -0
- package/dist/auth/complete-name-dialog.d.ts +9 -11
- package/dist/auth/complete-name-dialog.js +4 -11
- package/dist/auth/complete-name-dialog.js.map +1 -1
- package/dist/auth/email-tag.d.ts +2 -4
- package/dist/auth/forgot-password-form-labels.d.ts +3 -0
- package/dist/auth/forgot-password-form-labels.js +17 -0
- package/dist/auth/forgot-password-form-labels.js.map +1 -0
- package/dist/auth/forgot-password-form.d.ts +9 -12
- package/dist/auth/forgot-password-form.js +6 -15
- package/dist/auth/forgot-password-form.js.map +1 -1
- package/dist/auth/form-rules.d.ts +5 -7
- package/dist/auth/new-password-fields.d.ts +4 -8
- package/dist/auth/new-password-fields.js +1 -1
- package/dist/auth/new-password-fields.js.map +1 -1
- package/dist/auth/not-found-page-labels.d.ts +2 -0
- package/dist/auth/not-found-page-labels.js +11 -0
- package/dist/auth/not-found-page-labels.js.map +1 -0
- package/dist/auth/not-found-page.d.ts +9 -11
- package/dist/auth/not-found-page.js +5 -10
- package/dist/auth/not-found-page.js.map +1 -1
- package/dist/auth/register-form-labels.d.ts +3 -0
- package/dist/auth/register-form-labels.js +28 -0
- package/dist/auth/register-form-labels.js.map +1 -0
- package/dist/auth/register-form.d.ts +174 -100
- package/dist/auth/register-form.js +11 -31
- package/dist/auth/register-form.js.map +1 -1
- package/dist/auth/reset-password-form-labels.d.ts +3 -0
- package/dist/auth/reset-password-form-labels.js +24 -0
- package/dist/auth/reset-password-form-labels.js.map +1 -0
- package/dist/auth/reset-password-form.d.ts +12 -15
- package/dist/auth/reset-password-form.js +6 -22
- package/dist/auth/reset-password-form.js.map +1 -1
- package/dist/auth/sign-in-form-labels.d.ts +3 -0
- package/dist/auth/sign-in-form-labels.js +42 -0
- package/dist/auth/sign-in-form-labels.js.map +1 -0
- package/dist/auth/sign-in-form.d.ts +15 -19
- package/dist/auth/sign-in-form.js +12 -46
- package/dist/auth/sign-in-form.js.map +1 -1
- package/dist/auth/status-parts.d.ts +13 -17
- package/dist/auth/status-parts.js +3 -3
- package/dist/auth/status-parts.js.map +1 -1
- package/dist/auth/verify-email-labels.d.ts +2 -0
- package/dist/auth/verify-email-labels.js +25 -0
- package/dist/auth/verify-email-labels.js.map +1 -0
- package/dist/auth/verify-email.d.ts +15 -17
- package/dist/auth/verify-email.js +4 -21
- package/dist/auth/verify-email.js.map +1 -1
- package/dist/billing/billing-banner.d.ts +8 -108
- package/dist/billing/billing-banner.js +2 -1
- package/dist/billing/billing-banner.js.map +1 -1
- package/dist/billing/billing-labels.d.ts +168 -100
- package/dist/billing/billing-labels.js.map +1 -1
- package/dist/billing/billing-lock.d.ts +10 -109
- package/dist/billing/billing-overview.d.ts +7 -108
- package/dist/billing/billing-standing.d.ts +6 -107
- package/dist/billing/checkout-processing.d.ts +8 -110
- package/dist/billing/checkout-processing.js +2 -9
- package/dist/billing/checkout-processing.js.map +1 -1
- package/dist/billing/checkout-return.d.ts +5 -7
- package/dist/billing/pay-page.d.ts +22 -119
- package/dist/billing/pay-page.js.map +1 -1
- package/dist/billing/plan-card.d.ts +14 -114
- package/dist/billing/plan-card.js +15 -13
- package/dist/billing/plan-card.js.map +1 -1
- package/dist/billing/plan-limit-notice.d.ts +8 -108
- package/dist/billing/plan-limit-notice.js +1 -1
- package/dist/billing/plan-limit-notice.js.map +1 -1
- package/dist/billing/plan-limit-toast.d.ts +6 -106
- package/dist/billing/plan-limit.d.ts +2 -4
- package/dist/billing/plan-price.d.ts +10 -12
- package/dist/billing/subscription-actions.d.ts +6 -108
- package/dist/billing/subscription-actions.js +2 -2
- package/dist/billing/subscription-actions.js.map +1 -1
- package/dist/billing/subscription-status-chip.d.ts +7 -107
- package/dist/chart.d.ts +12 -112
- package/dist/chart.js +4 -0
- package/dist/chart.js.map +1 -1
- package/dist/components/account-chips-labels.d.ts +10 -0
- package/dist/components/account-chips-labels.js +15 -0
- package/dist/components/account-chips-labels.js.map +1 -0
- package/dist/components/account-chips.d.ts +22 -44
- package/dist/components/account-chips.js +9 -14
- package/dist/components/account-chips.js.map +1 -1
- package/dist/components/alert-banner.d.ts +15 -11
- package/dist/components/alert-banner.js +28 -18
- package/dist/components/alert-banner.js.map +1 -1
- package/dist/components/amount-input.d.ts +66 -109
- package/dist/components/amount-input.js +259 -283
- package/dist/components/amount-input.js.map +1 -1
- package/dist/components/appearance-labels.d.ts +6 -10
- package/dist/components/appearance-labels.js.map +1 -1
- package/dist/components/authed-image-labels.d.ts +2 -0
- package/dist/components/authed-image-labels.js +10 -0
- package/dist/components/authed-image-labels.js.map +1 -0
- package/dist/components/authed-image.d.ts +11 -13
- package/dist/components/authed-image.js +2 -6
- package/dist/components/authed-image.js.map +1 -1
- package/dist/components/autocomplete.d.ts +13 -11
- package/dist/components/autocomplete.js +35 -30
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/breadcrumbs-labels.d.ts +2 -0
- package/dist/components/breadcrumbs-labels.js +9 -0
- package/dist/components/breadcrumbs-labels.js.map +1 -0
- package/dist/components/breadcrumbs.d.ts +10 -12
- package/dist/components/breadcrumbs.js +7 -10
- package/dist/components/breadcrumbs.js.map +1 -1
- package/dist/components/bulk-action-bar-labels.d.ts +2 -0
- package/dist/components/bulk-action-bar-labels.js +10 -0
- package/dist/components/bulk-action-bar-labels.js.map +1 -0
- package/dist/components/bulk-action-bar.d.ts +10 -12
- package/dist/components/bulk-action-bar.js +9 -12
- package/dist/components/bulk-action-bar.js.map +1 -1
- package/dist/components/button-group.d.ts +7 -109
- package/dist/components/button-group.js +5 -5
- package/dist/components/button-group.js.map +1 -1
- package/dist/components/button-look.d.ts +88 -0
- package/dist/components/button-look.js +91 -0
- package/dist/components/button-look.js.map +1 -0
- package/dist/components/button.d.ts +153 -0
- package/dist/components/button.js +165 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/calculator.d.ts +8 -106
- package/dist/components/calculator.js +10 -7
- package/dist/components/calculator.js.map +1 -1
- package/dist/components/calendar-heatmap-labels.d.ts +3 -0
- package/dist/components/calendar-heatmap-labels.js +12 -0
- package/dist/components/calendar-heatmap-labels.js.map +1 -0
- package/dist/components/calendar-heatmap.d.ts +13 -16
- package/dist/components/calendar-heatmap.js +7 -13
- package/dist/components/calendar-heatmap.js.map +1 -1
- package/dist/components/card.d.ts +145 -0
- package/dist/components/card.js +186 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/chart-height.d.ts +4 -7
- package/dist/components/chart-zoom-core.d.ts +202 -0
- package/dist/components/chart-zoom-core.js +334 -0
- package/dist/components/chart-zoom-core.js.map +1 -0
- package/dist/components/chart-zoom.d.ts +39 -205
- package/dist/components/chart-zoom.js +15 -316
- package/dist/components/chart-zoom.js.map +1 -1
- package/dist/components/chart.d.ts +11 -15
- package/dist/components/chart.js +11 -11
- package/dist/components/chart.js.map +1 -1
- package/dist/components/checkbox-group.d.ts +6 -10
- package/dist/components/checkbox-group.js +10 -9
- package/dist/components/checkbox-group.js.map +1 -1
- package/dist/components/checkbox.d.ts +8 -12
- package/dist/components/checkbox.js +20 -18
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/chip-input.d.ts +73 -0
- package/dist/components/chip-input.js +224 -0
- package/dist/components/chip-input.js.map +1 -0
- package/dist/components/chip-labels.d.ts +2 -0
- package/dist/components/chip-labels.js +12 -0
- package/dist/components/chip-labels.js.map +1 -0
- package/dist/components/chip.d.ts +18 -93
- package/dist/components/chip.js +74 -426
- package/dist/components/chip.js.map +1 -1
- package/dist/components/choice-card.d.ts +21 -18
- package/dist/components/choice-card.js +45 -45
- package/dist/components/choice-card.js.map +1 -1
- package/dist/components/column-mapper-labels.d.ts +5 -0
- package/dist/components/column-mapper-labels.js +34 -0
- package/dist/components/column-mapper-labels.js.map +1 -0
- package/dist/components/column-mapper.d.ts +15 -17
- package/dist/components/column-mapper.js +11 -37
- package/dist/components/column-mapper.js.map +1 -1
- package/dist/components/combobox-core.d.ts +79 -40
- package/dist/components/combobox-core.js +189 -122
- package/dist/components/combobox-core.js.map +1 -1
- package/dist/components/combobox-suggestions.d.ts +76 -0
- package/dist/components/combobox-suggestions.js +56 -0
- package/dist/components/combobox-suggestions.js.map +1 -0
- package/dist/components/combobox.d.ts +14 -159
- package/dist/components/combobox.js +40 -507
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/confirm-dialog-labels.d.ts +7 -0
- package/dist/components/confirm-dialog-labels.js +10 -0
- package/dist/components/confirm-dialog-labels.js.map +1 -0
- package/dist/components/confirm-dialog.d.ts +165 -100
- package/dist/components/confirm-dialog.js +2 -6
- package/dist/components/confirm-dialog.js.map +1 -1
- package/dist/components/copy-button-labels.d.ts +2 -0
- package/dist/components/copy-button-labels.js +12 -0
- package/dist/components/copy-button-labels.js.map +1 -0
- package/dist/components/copy-button.d.ts +70 -100
- package/dist/components/copy-button.js +4 -9
- package/dist/components/copy-button.js.map +1 -1
- package/dist/components/country-select-labels.d.ts +2 -0
- package/dist/components/country-select-labels.js +10 -0
- package/dist/components/country-select-labels.js.map +1 -0
- package/dist/components/country-select.d.ts +18 -15
- package/dist/components/country-select.js +49 -64
- package/dist/components/country-select.js.map +1 -1
- package/dist/components/currency-option-list.d.ts +63 -0
- package/dist/components/currency-option-list.js +135 -0
- package/dist/components/currency-option-list.js.map +1 -0
- package/dist/components/currency-select.d.ts +10 -30
- package/dist/components/currency-select.js +50 -133
- package/dist/components/currency-select.js.map +1 -1
- package/dist/components/danger-confirm-labels.d.ts +14 -0
- package/dist/components/danger-confirm-labels.js +17 -0
- package/dist/components/danger-confirm-labels.js.map +1 -0
- package/dist/components/danger-confirm.d.ts +448 -100
- package/dist/components/danger-confirm.js +40 -46
- package/dist/components/danger-confirm.js.map +1 -1
- package/dist/components/data-table-cells.d.ts +9 -24
- package/dist/components/data-table-cells.js +1 -1
- package/dist/components/data-table-cells.js.map +1 -1
- package/dist/components/data-table-column-settings.d.ts +16 -0
- package/dist/components/data-table-column-settings.js +119 -0
- package/dist/components/data-table-column-settings.js.map +1 -0
- package/dist/components/data-table-filter-popover.d.ts +5 -19
- package/dist/components/data-table-filter-popover.js +39 -22
- package/dist/components/data-table-filter-popover.js.map +1 -1
- package/dist/components/data-table-filters.d.ts +93 -15
- package/dist/components/data-table-filters.js +22 -7
- package/dist/components/data-table-filters.js.map +1 -1
- package/dist/components/data-table-head.d.ts +36 -0
- package/dist/components/data-table-head.js +190 -0
- package/dist/components/data-table-head.js.map +1 -0
- package/dist/components/data-table-labels.d.ts +124 -15
- package/dist/components/data-table-labels.js +9 -5
- package/dist/components/data-table-labels.js.map +1 -1
- package/dist/components/data-table-mobile.d.ts +106 -0
- package/dist/components/data-table-mobile.js +412 -0
- package/dist/components/data-table-mobile.js.map +1 -0
- package/dist/components/data-table-pagination.d.ts +6 -21
- package/dist/components/data-table-pagination.js +7 -7
- package/dist/components/data-table-pagination.js.map +1 -1
- package/dist/components/data-table-resize.d.ts +37 -0
- package/dist/components/data-table-resize.js +103 -0
- package/dist/components/data-table-resize.js.map +1 -0
- package/dist/components/data-table-row-actions.d.ts +24 -0
- package/dist/components/data-table-row-actions.js +95 -0
- package/dist/components/data-table-row-actions.js.map +1 -0
- package/dist/components/data-table-selection.d.ts +21 -0
- package/dist/components/data-table-selection.js +30 -0
- package/dist/components/data-table-selection.js.map +1 -0
- package/dist/components/data-table-shared.d.ts +77 -0
- package/dist/components/data-table-shared.js +77 -0
- package/dist/components/data-table-shared.js.map +1 -0
- package/dist/components/data-table-sort.d.ts +8 -10
- package/dist/components/data-table.d.ts +603 -15
- package/dist/components/data-table.js +134 -927
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/date-field.d.ts +203 -0
- package/dist/components/date-field.js +270 -0
- package/dist/components/date-field.js.map +1 -0
- package/dist/components/date-picker.d.ts +6 -261
- package/dist/components/date-picker.js +24 -760
- package/dist/components/date-picker.js.map +1 -1
- package/dist/components/date-range-picker.d.ts +125 -0
- package/dist/components/date-range-picker.js +261 -0
- package/dist/components/date-range-picker.js.map +1 -0
- package/dist/components/description-list-labels.d.ts +2 -0
- package/dist/components/description-list-labels.js +8 -0
- package/dist/components/description-list-labels.js.map +1 -0
- package/dist/components/description-list.d.ts +13 -15
- package/dist/components/description-list.js +17 -11
- package/dist/components/description-list.js.map +1 -1
- package/dist/components/dialog-frame-labels.d.ts +2 -0
- package/dist/components/dialog-frame-labels.js +6 -0
- package/dist/components/dialog-frame-labels.js.map +1 -0
- package/dist/components/dialog-frame.d.ts +7 -11
- package/dist/components/dialog-frame.js +6 -6
- package/dist/components/dialog-frame.js.map +1 -1
- package/dist/components/disclosure.d.ts +6 -10
- package/dist/components/disclosure.js +11 -11
- package/dist/components/disclosure.js.map +1 -1
- package/dist/components/dropdown.d.ts +55 -27
- package/dist/components/dropdown.js +62 -31
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/empty-state.d.ts +64 -0
- package/dist/components/empty-state.js +70 -0
- package/dist/components/empty-state.js.map +1 -0
- package/dist/components/entity-combobox.d.ts +10 -11
- package/dist/components/entity-combobox.js +14 -13
- package/dist/components/entity-combobox.js.map +1 -1
- package/dist/components/error-boundary-labels.d.ts +2 -0
- package/dist/components/error-boundary-labels.js +19 -0
- package/dist/components/error-boundary-labels.js.map +1 -0
- package/dist/components/error-boundary.d.ts +17 -17
- package/dist/components/error-boundary.js +5 -17
- package/dist/components/error-boundary.js.map +1 -1
- package/dist/components/facing-pair.d.ts +7 -115
- package/dist/components/facing-pair.js +1 -1
- package/dist/components/facing-pair.js.map +1 -1
- package/dist/components/field-base.d.ts +260 -0
- package/dist/components/field-base.js +228 -0
- package/dist/components/field-base.js.map +1 -0
- package/dist/components/field-parts.d.ts +188 -87
- package/dist/components/field-parts.js +60 -33
- package/dist/components/field-parts.js.map +1 -1
- package/dist/components/field-strip.d.ts +19 -28
- package/dist/components/field-strip.js +2 -2
- package/dist/components/field-strip.js.map +1 -1
- package/dist/components/field-sync-labels.d.ts +2 -0
- package/dist/components/field-sync-labels.js +12 -0
- package/dist/components/field-sync-labels.js.map +1 -0
- package/dist/components/field-sync.d.ts +20 -19
- package/dist/components/field-sync.js +4 -10
- package/dist/components/field-sync.js.map +1 -1
- package/dist/components/field.d.ts +45 -10
- package/dist/components/field.js +10 -8
- package/dist/components/field.js.map +1 -1
- package/dist/components/file-button.d.ts +85 -100
- package/dist/components/file-button.js +23 -169
- package/dist/components/file-button.js.map +1 -1
- package/dist/components/file-dropzone.d.ts +9 -109
- package/dist/components/file-dropzone.js +22 -22
- package/dist/components/file-dropzone.js.map +1 -1
- package/dist/components/floating-panel-labels.d.ts +2 -0
- package/dist/components/floating-panel-labels.js +9 -0
- package/dist/components/floating-panel-labels.js.map +1 -0
- package/dist/components/floating-panel.d.ts +17 -21
- package/dist/components/floating-panel.js +19 -18
- package/dist/components/floating-panel.js.map +1 -1
- package/dist/components/focus-ring.d.ts +9 -6
- package/dist/components/focus-ring.js +2 -2
- package/dist/components/focus-ring.js.map +1 -1
- package/dist/components/form-actions-labels.d.ts +2 -0
- package/dist/components/form-actions-labels.js +10 -0
- package/dist/components/form-actions-labels.js.map +1 -0
- package/dist/components/form-actions.d.ts +280 -100
- package/dist/components/form-actions.js +10 -20
- package/dist/components/form-actions.js.map +1 -1
- package/dist/components/full-bleed-dialog.d.ts +7 -8
- package/dist/components/full-bleed-dialog.js +14 -13
- package/dist/components/full-bleed-dialog.js.map +1 -1
- package/dist/components/grouped-picker.d.ts +21 -16
- package/dist/components/grouped-picker.js +76 -62
- package/dist/components/grouped-picker.js.map +1 -1
- package/dist/components/help-popover.d.ts +60 -0
- package/dist/components/help-popover.js +48 -0
- package/dist/components/help-popover.js.map +1 -0
- package/dist/components/hover-menu.d.ts +17 -16
- package/dist/components/hover-menu.js +18 -17
- package/dist/components/hover-menu.js.map +1 -1
- package/dist/components/iban-input-labels.d.ts +2 -0
- package/dist/components/iban-input-labels.js +13 -0
- package/dist/components/iban-input-labels.js.map +1 -0
- package/dist/components/iban-input.d.ts +73 -100
- package/dist/components/iban-input.js +22 -15
- package/dist/components/iban-input.js.map +1 -1
- package/dist/components/icon-button.d.ts +300 -0
- package/dist/components/icon-button.js +465 -0
- package/dist/components/icon-button.js.map +1 -0
- package/dist/components/icon-picker-labels.d.ts +2 -0
- package/dist/components/icon-picker-labels.js +12 -0
- package/dist/components/icon-picker-labels.js.map +1 -0
- package/dist/components/icon-picker.d.ts +13 -13
- package/dist/components/icon-picker.js +18 -17
- package/dist/components/icon-picker.js.map +1 -1
- package/dist/components/image-grid-labels.d.ts +2 -0
- package/dist/components/image-grid-labels.js +10 -0
- package/dist/components/image-grid-labels.js.map +1 -0
- package/dist/components/image-grid.d.ts +12 -14
- package/dist/components/image-grid.js +6 -10
- package/dist/components/image-grid.js.map +1 -1
- package/dist/components/inline-edit-field-labels.d.ts +2 -0
- package/dist/components/inline-edit-field-labels.js +10 -0
- package/dist/components/inline-edit-field-labels.js.map +1 -0
- package/dist/components/inline-edit-field.d.ts +11 -13
- package/dist/components/inline-edit-field.js +11 -13
- package/dist/components/inline-edit-field.js.map +1 -1
- package/dist/components/inline-entity-combobox.d.ts +155 -0
- package/dist/components/inline-entity-combobox.js +467 -0
- package/dist/components/inline-entity-combobox.js.map +1 -0
- package/dist/components/input.d.ts +98 -0
- package/dist/components/input.js +219 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/jump-calendar.d.ts +8 -0
- package/dist/components/jump-calendar.js +274 -0
- package/dist/components/jump-calendar.js.map +1 -0
- package/dist/components/language-select.d.ts +20 -110
- package/dist/components/language-select.js +12 -7
- package/dist/components/language-select.js.map +1 -1
- package/dist/components/legal-labels.d.ts +2 -0
- package/dist/components/legal-labels.js +100 -0
- package/dist/components/legal-labels.js.map +1 -0
- package/dist/components/legal-page.d.ts +17 -117
- package/dist/components/legal-page.js +2 -2
- package/dist/components/legal-page.js.map +1 -1
- package/dist/components/legal.d.ts +353 -100
- package/dist/components/legal.js +7 -101
- package/dist/components/legal.js.map +1 -1
- package/dist/components/lightbox-labels.d.ts +2 -0
- package/dist/components/lightbox-labels.js +17 -0
- package/dist/components/lightbox-labels.js.map +1 -0
- package/dist/components/lightbox.d.ts +12 -14
- package/dist/components/lightbox.js +9 -19
- package/dist/components/lightbox.js.map +1 -1
- package/dist/components/line-items-labels.d.ts +2 -0
- package/dist/components/line-items-labels.js +13 -0
- package/dist/components/line-items-labels.js.map +1 -0
- package/dist/components/line-items.d.ts +16 -18
- package/dist/components/line-items.js +18 -26
- package/dist/components/line-items.js.map +1 -1
- package/dist/components/list-labels.d.ts +2 -0
- package/dist/components/list-labels.js +9 -0
- package/dist/components/list-labels.js.map +1 -0
- package/dist/components/list.d.ts +32 -21
- package/dist/components/list.js +41 -25
- package/dist/components/list.js.map +1 -1
- package/dist/components/loading-state.d.ts +5 -9
- package/dist/components/loading-state.js +2 -2
- package/dist/components/loading-state.js.map +1 -1
- package/dist/components/measured-grid-labels.d.ts +4 -0
- package/dist/components/measured-grid-labels.js +21 -0
- package/dist/components/measured-grid-labels.js.map +1 -0
- package/dist/components/measured-grid.d.ts +13 -17
- package/dist/components/measured-grid.js +31 -50
- package/dist/components/measured-grid.js.map +1 -1
- package/dist/components/menu-item.d.ts +10 -10
- package/dist/components/menu-item.js +9 -9
- package/dist/components/menu-item.js.map +1 -1
- package/dist/components/mini-calendar-labels.d.ts +4 -0
- package/dist/components/mini-calendar-labels.js +14 -0
- package/dist/components/mini-calendar-labels.js.map +1 -0
- package/dist/components/mini-calendar.d.ts +10 -14
- package/dist/components/mini-calendar.js +22 -29
- package/dist/components/mini-calendar.js.map +1 -1
- package/dist/components/modal.d.ts +26 -18
- package/dist/components/modal.js +8 -11
- package/dist/components/modal.js.map +1 -1
- package/dist/components/money-draft.d.ts +34 -0
- package/dist/components/money-draft.js +39 -0
- package/dist/components/money-draft.js.map +1 -0
- package/dist/components/money-field.d.ts +13 -110
- package/dist/components/money-field.js +6 -22
- package/dist/components/money-field.js.map +1 -1
- package/dist/components/month-picker-labels.d.ts +5 -0
- package/dist/components/month-picker-labels.js +18 -0
- package/dist/components/month-picker-labels.js.map +1 -0
- package/dist/components/month-picker.d.ts +15 -13
- package/dist/components/month-picker.js +34 -32
- package/dist/components/month-picker.js.map +1 -1
- package/dist/components/multi-entity-combobox.d.ts +9 -11
- package/dist/components/multi-entity-combobox.js +14 -13
- package/dist/components/multi-entity-combobox.js.map +1 -1
- package/dist/components/multi-select.d.ts +81 -21
- package/dist/components/multi-select.js +171 -197
- package/dist/components/multi-select.js.map +1 -1
- package/dist/components/nav-pills.d.ts +9 -10
- package/dist/components/nav-pills.js +53 -42
- package/dist/components/nav-pills.js.map +1 -1
- package/dist/components/number-field.d.ts +13 -110
- package/dist/components/number-field.js +2 -3
- package/dist/components/number-field.js.map +1 -1
- package/dist/components/number-input.d.ts +55 -109
- package/dist/components/number-input.js +50 -67
- package/dist/components/number-input.js.map +1 -1
- package/dist/components/numeric-field.d.ts +85 -0
- package/dist/components/numeric-field.js +71 -0
- package/dist/components/numeric-field.js.map +1 -0
- package/dist/components/numpad-sheet.d.ts +5 -107
- package/dist/components/numpad-sheet.js +7 -7
- package/dist/components/numpad-sheet.js.map +1 -1
- package/dist/components/one-time-code-input.d.ts +6 -7
- package/dist/components/one-time-code-input.js +119 -124
- package/dist/components/one-time-code-input.js.map +1 -1
- package/dist/components/page-contents-labels.d.ts +2 -0
- package/dist/components/page-contents-labels.js +8 -0
- package/dist/components/page-contents-labels.js.map +1 -0
- package/dist/components/page-contents.d.ts +13 -15
- package/dist/components/page-contents.js +7 -9
- package/dist/components/page-contents.js.map +1 -1
- package/dist/components/page-header.d.ts +10 -10
- package/dist/components/page-header.js +3 -3
- package/dist/components/page-header.js.map +1 -1
- package/dist/components/password-strength-labels.d.ts +2 -0
- package/dist/components/password-strength-labels.js +21 -0
- package/dist/components/password-strength-labels.js.map +1 -0
- package/dist/components/password-strength.d.ts +15 -17
- package/dist/components/password-strength.js +7 -22
- package/dist/components/password-strength.js.map +1 -1
- package/dist/components/phone-input-labels.d.ts +2 -0
- package/dist/components/phone-input-labels.js +9 -0
- package/dist/components/phone-input-labels.js.map +1 -0
- package/dist/components/phone-input.d.ts +75 -100
- package/dist/components/phone-input.js +20 -23
- package/dist/components/phone-input.js.map +1 -1
- package/dist/components/picker-sheet.d.ts +20 -8
- package/dist/components/picker-sheet.js +22 -11
- package/dist/components/picker-sheet.js.map +1 -1
- package/dist/components/pie-chart-labels.d.ts +2 -4
- package/dist/components/pie-chart.d.ts +8 -11
- package/dist/components/pie-chart.js +5 -5
- package/dist/components/pie-chart.js.map +1 -1
- package/dist/components/popover-labels.d.ts +2 -0
- package/dist/components/popover-labels.js +11 -0
- package/dist/components/popover-labels.js.map +1 -0
- package/dist/components/popover.d.ts +13 -11
- package/dist/components/popover.js +21 -23
- package/dist/components/popover.js.map +1 -1
- package/dist/components/progress-bar-labels.d.ts +2 -0
- package/dist/components/progress-bar-labels.js +9 -0
- package/dist/components/progress-bar-labels.js.map +1 -0
- package/dist/components/progress-bar.d.ts +16 -15
- package/dist/components/progress-bar.js +22 -20
- package/dist/components/progress-bar.js.map +1 -1
- package/dist/components/qr-code.d.ts +4 -8
- package/dist/components/qr-code.js.map +1 -1
- package/dist/components/reauth-dialog-labels.d.ts +2 -0
- package/dist/components/reauth-dialog-labels.js +12 -0
- package/dist/components/reauth-dialog-labels.js.map +1 -0
- package/dist/components/reauth-dialog.d.ts +8 -10
- package/dist/components/reauth-dialog.js +3 -8
- package/dist/components/reauth-dialog.js.map +1 -1
- package/dist/components/row-actions-labels.d.ts +2 -0
- package/dist/components/row-actions-labels.js +9 -0
- package/dist/components/row-actions-labels.js.map +1 -0
- package/dist/components/row-actions.d.ts +224 -100
- package/dist/components/row-actions.js +4 -5
- package/dist/components/row-actions.js.map +1 -1
- package/dist/components/scroll-area.d.ts +6 -9
- package/dist/components/scroll-area.js +4 -10
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/search-field.d.ts +12 -27
- package/dist/components/search-field.js +13 -16
- package/dist/components/search-field.js.map +1 -1
- package/dist/components/select.d.ts +69 -0
- package/dist/components/select.js +164 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.d.ts +3 -7
- package/dist/components/separator.js.map +1 -1
- package/dist/components/series-chart-axes.d.ts +120 -0
- package/dist/components/series-chart-axes.js +164 -0
- package/dist/components/series-chart-axes.js.map +1 -0
- package/dist/components/series-chart-budget.d.ts +8 -9
- package/dist/components/series-chart-labels.d.ts +2 -4
- package/dist/components/series-chart-thin.d.ts +34 -0
- package/dist/components/series-chart-thin.js +103 -0
- package/dist/components/series-chart-thin.js.map +1 -0
- package/dist/components/series-chart-ticks.d.ts +9 -11
- package/dist/components/series-chart.d.ts +64 -213
- package/dist/components/series-chart.js +69 -160
- package/dist/components/series-chart.js.map +1 -1
- package/dist/components/server-wake-labels.d.ts +2 -0
- package/dist/components/server-wake-labels.js +9 -0
- package/dist/components/server-wake-labels.js.map +1 -0
- package/dist/components/server-wake.d.ts +32 -23
- package/dist/components/server-wake.js +15 -35
- package/dist/components/server-wake.js.map +1 -1
- package/dist/components/settings-fields.d.ts +46 -117
- package/dist/components/settings-fields.js +13 -3
- package/dist/components/settings-fields.js.map +1 -1
- package/dist/components/share-card-labels.d.ts +2 -0
- package/dist/components/share-card-labels.js +29 -0
- package/dist/components/share-card-labels.js.map +1 -0
- package/dist/components/share-card.d.ts +188 -100
- package/dist/components/share-card.js +16 -34
- package/dist/components/share-card.js.map +1 -1
- package/dist/components/sign-chip-labels.d.ts +2 -0
- package/dist/components/sign-chip-labels.js +11 -0
- package/dist/components/sign-chip-labels.js.map +1 -0
- package/dist/components/sign-chip.d.ts +7 -9
- package/dist/components/sign-chip.js +2 -7
- package/dist/components/sign-chip.js.map +1 -1
- package/dist/components/signature-pad-labels.d.ts +2 -0
- package/dist/components/signature-pad-labels.js +23 -0
- package/dist/components/signature-pad-labels.js.map +1 -0
- package/dist/components/signature-pad.d.ts +16 -15
- package/dist/components/signature-pad.js +22 -35
- package/dist/components/signature-pad.js.map +1 -1
- package/dist/components/signed-amount-labels.d.ts +2 -0
- package/dist/components/signed-amount-labels.js +9 -0
- package/dist/components/signed-amount-labels.js.map +1 -0
- package/dist/components/signed-amount.d.ts +19 -21
- package/dist/components/signed-amount.js +12 -15
- package/dist/components/signed-amount.js.map +1 -1
- package/dist/components/skeleton.d.ts +13 -9
- package/dist/components/skeleton.js +1 -1
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/slider.d.ts +16 -11
- package/dist/components/slider.js +23 -18
- package/dist/components/slider.js.map +1 -1
- package/dist/components/sparkline-labels.d.ts +2 -0
- package/dist/components/sparkline-labels.js +13 -0
- package/dist/components/sparkline-labels.js.map +1 -0
- package/dist/components/sparkline.d.ts +10 -12
- package/dist/components/sparkline.js +10 -17
- package/dist/components/sparkline.js.map +1 -1
- package/dist/components/spinner.d.ts +45 -0
- package/dist/components/spinner.js +39 -0
- package/dist/components/spinner.js.map +1 -0
- package/dist/components/stat-tile-labels.d.ts +2 -0
- package/dist/components/stat-tile-labels.js +14 -0
- package/dist/components/stat-tile-labels.js.map +1 -0
- package/dist/components/stat-tile.d.ts +15 -17
- package/dist/components/stat-tile.js +25 -32
- package/dist/components/stat-tile.js.map +1 -1
- package/dist/components/status-dot.d.ts +8 -20
- package/dist/components/status-dot.js +13 -12
- package/dist/components/status-dot.js.map +1 -1
- package/dist/components/swatch-picker-labels.d.ts +2 -0
- package/dist/components/swatch-picker-labels.js +9 -0
- package/dist/components/swatch-picker-labels.js.map +1 -0
- package/dist/components/swatch-picker.d.ts +14 -14
- package/dist/components/swatch-picker.js +14 -8
- package/dist/components/swatch-picker.js.map +1 -1
- package/dist/components/swipeable-row.d.ts +14 -27
- package/dist/components/swipeable-row.js +2 -2
- package/dist/components/swipeable-row.js.map +1 -1
- package/dist/components/switch.d.ts +10 -13
- package/dist/components/switch.js +13 -12
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.d.ts +28 -31
- package/dist/components/table.js +15 -15
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.d.ts +182 -0
- package/dist/components/tabs.js +312 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/text-link.d.ts +17 -118
- package/dist/components/text-link.js +7 -7
- package/dist/components/text-link.js.map +1 -1
- package/dist/components/text.d.ts +14 -13
- package/dist/components/text.js +5 -5
- package/dist/components/text.js.map +1 -1
- package/dist/components/textarea.d.ts +20 -0
- package/dist/components/textarea.js +161 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/tile-radio.d.ts +6 -10
- package/dist/components/tile-radio.js +6 -6
- package/dist/components/tile-radio.js.map +1 -1
- package/dist/components/time-input.d.ts +5 -107
- package/dist/components/time-input.js +14 -5
- package/dist/components/time-input.js.map +1 -1
- package/dist/components/toast-labels.d.ts +2 -0
- package/dist/components/toast-labels.js +11 -0
- package/dist/components/toast-labels.js.map +1 -0
- package/dist/components/toast.d.ts +21 -23
- package/dist/components/toast.js +1 -6
- package/dist/components/toast.js.map +1 -1
- package/dist/components/toggle-group.d.ts +26 -26
- package/dist/components/toggle-group.js +43 -19
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/toggle-legend.d.ts +18 -21
- package/dist/components/toggle-legend.js +3 -3
- package/dist/components/toggle-legend.js.map +1 -1
- package/dist/components/tooltip.d.ts +16 -15
- package/dist/components/tooltip.js +4 -9
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/translation-review-editor.d.ts +8 -10
- package/dist/components/translation-review-editor.js +6 -5
- package/dist/components/translation-review-editor.js.map +1 -1
- package/dist/components/translation-review-labels.d.ts +4 -7
- package/dist/components/translation-review-parts.d.ts +19 -28
- package/dist/components/translation-review-parts.js +4 -7
- package/dist/components/translation-review-parts.js.map +1 -1
- package/dist/components/translation-review.d.ts +26 -24
- package/dist/components/translation-review.js +13 -10
- package/dist/components/translation-review.js.map +1 -1
- package/dist/components/tree-view.d.ts +7 -11
- package/dist/components/tree-view.js +8 -8
- package/dist/components/tree-view.js.map +1 -1
- package/dist/components/treemap.d.ts +9 -13
- package/dist/components/trigger-aria.d.ts +2 -4
- package/dist/components/ui-labels.d.ts +5 -0
- package/dist/components/ui-labels.js +20 -0
- package/dist/components/ui-labels.js.map +1 -0
- package/dist/components/use-anchor-dir.d.ts +3 -6
- package/dist/components/use-mobile-reveal.d.ts +2 -6
- package/dist/components/use-table-state.d.ts +154 -15
- package/dist/components/user-avatar.d.ts +8 -21
- package/dist/components/user-avatar.js +1 -1
- package/dist/components/user-avatar.js.map +1 -1
- package/dist/components/wizard-stepper.d.ts +6 -6
- package/dist/components/wizard-stepper.js +4 -3
- package/dist/components/wizard-stepper.js.map +1 -1
- package/dist/components/write-lock-labels.d.ts +2 -0
- package/dist/components/write-lock-labels.js +8 -0
- package/dist/components/write-lock-labels.js.map +1 -0
- package/dist/components/write-lock.d.ts +16 -18
- package/dist/components/write-lock.js +4 -8
- package/dist/components/write-lock.js.map +1 -1
- package/dist/data-table.d.ts +10 -18
- package/dist/data-table.js.map +1 -1
- package/dist/demo/demo-banner.d.ts +10 -13
- package/dist/demo/demo-banner.js +5 -19
- package/dist/demo/demo-banner.js.map +1 -1
- package/dist/demo/demo-countdown.d.ts +7 -9
- package/dist/demo/demo-ended.d.ts +10 -13
- package/dist/demo/demo-ended.js +4 -4
- package/dist/demo/demo-ended.js.map +1 -1
- package/dist/demo/demo-labels.d.ts +4 -5
- package/dist/demo/demo-labels.js.map +1 -1
- package/dist/demo/demo-session.d.ts +3 -5
- package/dist/demo/demo-start.d.ts +8 -11
- package/dist/demo/demo-start.js +3 -2
- package/dist/demo/demo-start.js.map +1 -1
- package/dist/feedback/feedback-attachment-labels.d.ts +16 -0
- package/dist/feedback/feedback-attachment-labels.js +17 -0
- package/dist/feedback/feedback-attachment-labels.js.map +1 -0
- package/dist/feedback/feedback-attachment.d.ts +312 -100
- package/dist/feedback/feedback-attachment.js +31 -42
- package/dist/feedback/feedback-attachment.js.map +1 -1
- package/dist/feedback/feedback-capture.d.ts +2 -4
- package/dist/feedback/feedback-context-labels.d.ts +2 -0
- package/dist/feedback/feedback-context-labels.js +9 -0
- package/dist/feedback/feedback-context-labels.js.map +1 -0
- package/dist/feedback/feedback-context.d.ts +110 -100
- package/dist/feedback/feedback-context.js +4 -7
- package/dist/feedback/feedback-context.js.map +1 -1
- package/dist/feedback/feedback-crash.d.ts +8 -109
- package/dist/feedback/feedback-dialog-labels.d.ts +12 -0
- package/dist/feedback/feedback-dialog-labels.js +17 -0
- package/dist/feedback/feedback-dialog-labels.js.map +1 -0
- package/dist/feedback/feedback-dialog.d.ts +186 -100
- package/dist/feedback/feedback-dialog.js +8 -18
- package/dist/feedback/feedback-dialog.js.map +1 -1
- package/dist/feedback/feedback-inbox.d.ts +236 -100
- package/dist/feedback/feedback-inbox.js +31 -141
- package/dist/feedback/feedback-inbox.js.map +1 -1
- package/dist/feedback/feedback-labels.d.ts +83 -100
- package/dist/feedback/feedback-labels.js.map +1 -1
- package/dist/feedback/feedback-menu-labels.d.ts +2 -0
- package/dist/feedback/feedback-menu-labels.js +10 -0
- package/dist/feedback/feedback-menu-labels.js.map +1 -0
- package/dist/feedback/feedback-menu.d.ts +83 -100
- package/dist/feedback/feedback-menu.js +3 -7
- package/dist/feedback/feedback-menu.js.map +1 -1
- package/dist/feedback/feedback-record.d.ts +239 -100
- package/dist/feedback/feedback-record.js +7 -2
- package/dist/feedback/feedback-record.js.map +1 -1
- package/dist/feedback/feedback-row-detail-labels.d.ts +2 -0
- package/dist/feedback/feedback-row-detail-labels.js +31 -0
- package/dist/feedback/feedback-row-detail-labels.js.map +1 -0
- package/dist/feedback/feedback-row-detail.d.ts +315 -100
- package/dist/feedback/feedback-row-detail.js +11 -37
- package/dist/feedback/feedback-row-detail.js.map +1 -1
- package/dist/feedback/feedback-status-undo.d.ts +66 -100
- package/dist/feedback/feedback-status-undo.js.map +1 -1
- package/dist/feedback/feedback-submit-dialog.d.ts +39 -0
- package/dist/feedback/feedback-submit-dialog.js +66 -0
- package/dist/feedback/feedback-submit-dialog.js.map +1 -0
- package/dist/feedback/feedback-submit.d.ts +13 -108
- package/dist/feedback/feedback-submit.js +19 -40
- package/dist/feedback/feedback-submit.js.map +1 -1
- package/dist/feedback/feedback-swipe.d.ts +9 -109
- package/dist/feedback/feedback-swipe.js +1 -1
- package/dist/feedback/feedback-swipe.js.map +1 -1
- package/dist/feedback/feedback-table-labels.d.ts +2 -0
- package/dist/feedback/feedback-table-labels.js +26 -0
- package/dist/feedback/feedback-table-labels.js.map +1 -0
- package/dist/feedback/feedback-table.d.ts +314 -100
- package/dist/feedback/feedback-table.js +11 -31
- package/dist/feedback/feedback-table.js.map +1 -1
- package/dist/feedback/feedback-thread-labels.d.ts +3 -0
- package/dist/feedback/feedback-thread-labels.js +21 -0
- package/dist/feedback/feedback-thread-labels.js.map +1 -0
- package/dist/feedback/feedback-thread.d.ts +378 -100
- package/dist/feedback/feedback-thread.js +32 -35
- package/dist/feedback/feedback-thread.js.map +1 -1
- package/dist/feedback/feedback-vocabulary.d.ts +98 -0
- package/dist/feedback/feedback-vocabulary.js +143 -0
- package/dist/feedback/feedback-vocabulary.js.map +1 -0
- package/dist/feedback.d.ts +15 -104
- package/dist/hooks/use-anchored-panel.d.ts +109 -17
- package/dist/hooks/use-anchored-panel.js +38 -6
- package/dist/hooks/use-anchored-panel.js.map +1 -1
- package/dist/hooks/use-anchored-rect.d.ts +15 -6
- package/dist/hooks/use-anchored-rect.js +2 -1
- package/dist/hooks/use-anchored-rect.js.map +1 -1
- package/dist/hooks/use-announce.d.ts +4 -6
- package/dist/hooks/use-authed-src.d.ts +5 -7
- package/dist/hooks/use-authed-src.js +3 -7
- package/dist/hooks/use-authed-src.js.map +1 -1
- package/dist/hooks/use-body-scroll-lock.d.ts +1 -3
- package/dist/hooks/use-breakpoint.d.ts +16 -17
- package/dist/hooks/use-breakpoint.js.map +1 -1
- package/dist/hooks/use-close-transition.d.ts +8 -8
- package/dist/hooks/use-close-transition.js +5 -4
- package/dist/hooks/use-close-transition.js.map +1 -1
- package/dist/hooks/use-copy-to-clipboard.d.ts +5 -7
- package/dist/hooks/use-debounce.d.ts +13 -6
- package/dist/hooks/use-debounce.js.map +1 -1
- package/dist/hooks/use-dismiss.d.ts +37 -11
- package/dist/hooks/use-dismiss.js +69 -10
- package/dist/hooks/use-dismiss.js.map +1 -1
- package/dist/hooks/use-file-drop.d.ts +8 -109
- package/dist/hooks/use-file-drop.js +1 -1
- package/dist/hooks/use-file-drop.js.map +1 -1
- package/dist/hooks/use-file-picker-labels.d.ts +2 -0
- package/dist/hooks/use-file-picker-labels.js +25 -0
- package/dist/hooks/use-file-picker-labels.js.map +1 -0
- package/dist/hooks/use-file-picker.d.ts +164 -0
- package/dist/hooks/use-file-picker.js +149 -0
- package/dist/hooks/use-file-picker.js.map +1 -0
- package/dist/hooks/use-focus-trap.d.ts +10 -4
- package/dist/hooks/use-focus-trap.js +19 -12
- package/dist/hooks/use-focus-trap.js.map +1 -1
- package/dist/hooks/use-hotkey.d.ts +7 -9
- package/dist/hooks/use-large-text.d.ts +3 -5
- package/dist/hooks/use-media-query.d.ts +1 -3
- package/dist/hooks/use-noindex.d.ts +1 -3
- package/dist/hooks/use-overlay-history.d.ts +1 -3
- package/dist/hooks/use-row-swipe.d.ts +5 -8
- package/dist/hooks/use-search-param-state.d.ts +10 -11
- package/dist/hooks/use-windowed-rows.d.ts +4 -7
- package/dist/i18n/defaults.d.ts +11 -104
- package/dist/i18n/defaults.js +82 -82
- package/dist/i18n/defaults.js.map +1 -1
- package/dist/i18n/german.d.ts +2 -104
- package/dist/i18n/german.js +56 -9
- package/dist/i18n/german.js.map +1 -1
- package/dist/i18n/kit-labels.d.ts +609 -100
- package/dist/i18n/kit-labels.js +22 -97
- package/dist/i18n/kit-labels.js.map +1 -1
- package/dist/i18n/languages.d.ts +197 -100
- package/dist/i18n/locales/de-CH.d.ts +3 -105
- package/dist/i18n/locales/en.d.ts +4 -104
- package/dist/i18n/locales/en.js +1834 -4
- package/dist/i18n/locales/en.js.map +7 -1
- package/dist/i18n/locales/es.d.ts +3 -105
- package/dist/i18n/locales/es.js +54 -9
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +3 -105
- package/dist/i18n/locales/fr.js +56 -9
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hu.d.ts +3 -105
- package/dist/i18n/locales/hu.js +56 -10
- package/dist/i18n/locales/hu.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +3 -105
- package/dist/i18n/locales/it.js +55 -9
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +3 -105
- package/dist/i18n/locales/zh.js +52 -8
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/i18n/plurals.d.ts +20 -3
- package/dist/i18n/plurals.js +11 -0
- package/dist/i18n/plurals.js.map +1 -1
- package/dist/i18n/review.d.ts +5 -106
- package/dist/i18n/review.js +4 -0
- package/dist/i18n/review.js.map +1 -1
- package/dist/i18n/shared-labels.d.ts +17 -0
- package/dist/i18n/shared-labels.js +111 -0
- package/dist/i18n/shared-labels.js.map +1 -0
- package/dist/i18n/swiss.d.ts +1 -3
- package/dist/index.d.ts +329 -249
- package/dist/index.js +188 -215
- package/dist/index.js.map +1 -1
- package/dist/landing/access.d.ts +7 -9
- package/dist/landing/access.js.map +1 -1
- package/dist/landing/landing-actions.d.ts +9 -108
- package/dist/landing/landing-actions.js +1 -1
- package/dist/landing/landing-actions.js.map +1 -1
- package/dist/landing/landing-labels.d.ts +4 -5
- package/dist/landing/landing-labels.js.map +1 -1
- package/dist/landing/landing-sections.d.ts +21 -120
- package/dist/landing/landing-sections.js +15 -15
- package/dist/landing/landing-sections.js.map +1 -1
- package/dist/landing/page-seo.d.ts +7 -9
- package/dist/landing/public-header.d.ts +10 -110
- package/dist/landing/public-header.js +1 -1
- package/dist/landing/public-header.js.map +1 -1
- package/dist/landing/routing.d.ts +16 -119
- package/dist/landing/routing.js +2 -6
- package/dist/landing/routing.js.map +1 -1
- package/dist/lib/calc.d.ts +7 -9
- package/dist/lib/chip-edge-snap.d.ts +10 -0
- package/dist/lib/chip-edge-snap.js +131 -0
- package/dist/lib/chip-edge-snap.js.map +1 -0
- package/dist/lib/clipping.d.ts +2 -4
- package/dist/lib/cn.d.ts +2 -5
- package/dist/lib/cn.js +6 -1
- package/dist/lib/cn.js.map +1 -1
- package/dist/lib/column-mapping.d.ts +10 -13
- package/dist/lib/countries.d.ts +3 -5
- package/dist/lib/dates.d.ts +25 -25
- package/dist/lib/dates.js.map +1 -1
- package/dist/lib/decimal-marks.d.ts +8 -8
- package/dist/lib/decimal-marks.js +1 -1
- package/dist/lib/decimal-marks.js.map +1 -1
- package/dist/lib/direction.d.ts +4 -6
- package/dist/lib/document-navigation.d.ts +1 -3
- package/dist/lib/download.d.ts +67 -0
- package/dist/lib/download.js +89 -0
- package/dist/lib/download.js.map +1 -0
- package/dist/lib/floating-stack.d.ts +8 -6
- package/dist/lib/floating-stack.js.map +1 -1
- package/dist/lib/format.d.ts +24 -23
- package/dist/lib/format.js +3 -3
- package/dist/lib/format.js.map +1 -1
- package/dist/lib/iban.d.ts +9 -11
- package/dist/lib/ime.d.ts +17 -0
- package/dist/lib/ime.js +13 -0
- package/dist/lib/ime.js.map +1 -0
- package/dist/lib/isin.d.ts +3 -5
- package/dist/lib/logger.d.ts +4 -6
- package/dist/lib/person-name.d.ts +3 -5
- package/dist/lib/phone.d.ts +9 -11
- package/dist/lib/presence.d.ts +15 -0
- package/dist/lib/presence.js +8 -0
- package/dist/lib/presence.js.map +1 -0
- package/dist/lib/qr-encode.d.ts +4 -6
- package/dist/lib/reduced-motion.d.ts +18 -0
- package/dist/lib/reduced-motion.js +9 -0
- package/dist/lib/reduced-motion.js.map +1 -0
- package/dist/lib/round.d.ts +22 -0
- package/dist/lib/round.js +15 -0
- package/dist/lib/round.js.map +1 -0
- package/dist/lib/safe-storage.d.ts +14 -4
- package/dist/lib/safe-storage.js +24 -9
- package/dist/lib/safe-storage.js.map +1 -1
- package/dist/lib/server-wake.d.ts +13 -14
- package/dist/lib/session-refresh.d.ts +200 -0
- package/dist/lib/session-refresh.js +187 -0
- package/dist/lib/session-refresh.js.map +1 -0
- package/dist/lib/strip-fade.d.ts +10 -13
- package/dist/lib/table-text.d.ts +14 -16
- package/dist/lib/text-match.d.ts +41 -0
- package/dist/lib/text-match.js +23 -0
- package/dist/lib/text-match.js.map +1 -0
- package/dist/lib/translation-review.d.ts +44 -45
- package/dist/lib/translation-review.js +3 -2
- package/dist/lib/translation-review.js.map +1 -1
- package/dist/rhf/fields.d.ts +123 -188
- package/dist/rhf/fields.js +46 -54
- package/dist/rhf/fields.js.map +1 -1
- package/dist/rhf/form-core.d.ts +153 -0
- package/dist/rhf/form-core.js +143 -0
- package/dist/rhf/form-core.js.map +1 -0
- package/dist/rhf/form.d.ts +38 -174
- package/dist/rhf/form.js +9 -131
- package/dist/rhf/form.js.map +1 -1
- package/dist/rhf/line-items.d.ts +40 -11
- package/dist/rhf/line-items.js.map +1 -1
- package/dist/rhf/use-rhf-wizard-step.d.ts +3 -6
- package/dist/rhf.d.ts +4 -117
- package/dist/rhf.js.map +1 -1
- package/dist/search/command-palette-labels.d.ts +2 -0
- package/dist/search/command-palette-labels.js +15 -0
- package/dist/search/command-palette-labels.js.map +1 -0
- package/dist/search/command-palette.d.ts +10 -13
- package/dist/search/command-palette.js +25 -44
- package/dist/search/command-palette.js.map +1 -1
- package/dist/search/global-search-labels.d.ts +2 -0
- package/dist/search/global-search-labels.js +12 -0
- package/dist/search/global-search-labels.js.map +1 -0
- package/dist/search/global-search.d.ts +17 -16
- package/dist/search/global-search.js +12 -12
- package/dist/search/global-search.js.map +1 -1
- package/dist/search/search-index.d.ts +13 -14
- package/dist/search/search-index.js +2 -1
- package/dist/search/search-index.js.map +1 -1
- package/dist/search/use-command-key.d.ts +9 -0
- package/dist/search/use-command-key.js +18 -0
- package/dist/search/use-command-key.js.map +1 -0
- package/dist/search.d.ts +3 -4
- package/dist/settings/settings-card-classes.d.ts +11 -0
- package/dist/settings/settings-card-classes.js +8 -0
- package/dist/settings/settings-card-classes.js.map +1 -0
- package/dist/settings/settings-catalogue.d.ts +11 -14
- package/dist/settings/settings-context.d.ts +4 -8
- package/dist/settings/settings-heading.d.ts +8 -12
- package/dist/settings/settings-heading.js +1 -1
- package/dist/settings/settings-heading.js.map +1 -1
- package/dist/settings/settings-labels.d.ts +6 -7
- package/dist/settings/settings-labels.js.map +1 -1
- package/dist/settings/settings-layout.d.ts +36 -13
- package/dist/settings/settings-layout.js +25 -4
- package/dist/settings/settings-layout.js.map +1 -1
- package/dist/settings/settings-section.d.ts +4 -106
- package/dist/settings/settings-section.js +2 -2
- package/dist/settings/settings-section.js.map +1 -1
- package/dist/settings/use-account-appearance.d.ts +11 -16
- package/dist/settings/use-account-language.d.ts +8 -10
- package/dist/settings/use-settings-focus.d.ts +3 -5
- package/dist/settings/use-settings-focus.js +2 -4
- package/dist/settings/use-settings-focus.js.map +1 -1
- package/dist/settings/use-settings-route.d.ts +11 -16
- package/dist/shell/app-shell-labels.d.ts +2 -0
- package/dist/shell/app-shell-labels.js +9 -0
- package/dist/shell/app-shell-labels.js.map +1 -0
- package/dist/shell/app-shell.d.ts +216 -100
- package/dist/shell/app-shell.js +51 -35
- package/dist/shell/app-shell.js.map +1 -1
- package/dist/shell/auth-layout.d.ts +6 -9
- package/dist/shell/auth-layout.js +6 -6
- package/dist/shell/auth-layout.js.map +1 -1
- package/dist/shell/company-switcher-labels.d.ts +2 -0
- package/dist/shell/company-switcher-labels.js +12 -0
- package/dist/shell/company-switcher-labels.js.map +1 -0
- package/dist/shell/company-switcher.d.ts +9 -11
- package/dist/shell/company-switcher.js +3 -9
- package/dist/shell/company-switcher.js.map +1 -1
- package/dist/shell/option-switcher-menu.d.ts +19 -9
- package/dist/shell/option-switcher-menu.js +6 -4
- package/dist/shell/option-switcher-menu.js.map +1 -1
- package/dist/shell/role-switcher.d.ts +5 -6
- package/dist/shell/role-switcher.js +4 -3
- package/dist/shell/role-switcher.js.map +1 -1
- package/dist/shell/top-bar-brand.d.ts +4 -106
- package/dist/shell/top-bar-brand.js +1 -1
- package/dist/shell/top-bar-brand.js.map +1 -1
- package/dist/shell/top-bar.d.ts +6 -9
- package/dist/shell/top-bar.js +1 -1
- package/dist/shell/top-bar.js.map +1 -1
- package/dist/shell/topbar-action-menu.d.ts +30 -31
- package/dist/shell/topbar-action-menu.js +12 -10
- package/dist/shell/topbar-action-menu.js.map +1 -1
- package/dist/shell/topbar-controls.d.ts +20 -18
- package/dist/shell/topbar-controls.js +14 -11
- package/dist/shell/topbar-controls.js.map +1 -1
- package/dist/shell.d.ts +25 -115
- package/dist/shell.js.map +1 -1
- package/dist/table-text.d.ts +1 -1
- package/dist/testing/css-variables.d.ts +4 -6
- package/dist/testing/css-variables.generated.d.ts +2 -4
- package/dist/testing/index.d.ts +2 -1
- package/dist/testing/index.js +9 -1
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/viewport.d.ts +93 -0
- package/dist/testing/viewport.js +152 -0
- package/dist/testing/viewport.js.map +1 -0
- package/dist/theme/chart-palette.d.ts +7 -9
- package/dist/theme/color.d.ts +14 -16
- package/dist/theme/color.js +2 -1
- package/dist/theme/color.js.map +1 -1
- package/dist/theme/contrast-tokens.d.ts +13 -17
- package/dist/theme/contrast.d.ts +22 -27
- package/dist/theme/palette-derive.d.ts +16 -22
- package/dist/theme/palette-derive.js +15 -7
- package/dist/theme/palette-derive.js.map +1 -1
- package/dist/theme/palette-presets.d.ts +25 -15
- package/dist/theme/palette-presets.js +66 -66
- package/dist/theme/palette-presets.js.map +1 -1
- package/dist/theme/palette-store.d.ts +10 -13
- package/dist/theme/text-size.d.ts +21 -26
- package/dist/theme/theme-store.d.ts +9 -14
- package/dist/tour/tour-labels.d.ts +2 -0
- package/dist/tour/tour-labels.js +13 -0
- package/dist/tour/tour-labels.js.map +1 -0
- package/dist/tour/tour.d.ts +12 -14
- package/dist/tour/tour.js +9 -20
- package/dist/tour/tour.js.map +1 -1
- package/dist/tour.d.ts +1 -2
- package/dist/wizard/stepper-nav.d.ts +8 -107
- package/dist/wizard/stepper-nav.js +15 -14
- package/dist/wizard/stepper-nav.js.map +1 -1
- package/dist/wizard/types.d.ts +18 -18
- package/dist/wizard/types.js +1 -19
- package/dist/wizard/types.js.map +1 -1
- package/dist/wizard/use-wizard.d.ts +2 -6
- package/dist/wizard/validation.d.ts +3 -7
- package/dist/wizard/wizard-context.d.ts +7 -11
- package/dist/wizard/wizard-labels.d.ts +4 -0
- package/dist/wizard/wizard-labels.js +24 -0
- package/dist/wizard/wizard-labels.js.map +1 -0
- package/dist/wizard/wizard-step.d.ts +3 -7
- package/dist/wizard/wizard-step.js +2 -2
- package/dist/wizard/wizard-step.js.map +1 -1
- package/dist/wizard/wizard-summary.d.ts +5 -8
- package/dist/wizard/wizard-summary.js +6 -5
- package/dist/wizard/wizard-summary.js.map +1 -1
- package/dist/wizard.d.ts +7 -106
- package/package.json +9 -6
- package/src/account/account-parts.ts +3 -3
- package/src/{components → account}/account-settings-labels.ts +11 -1
- package/src/{components → account}/account-settings.tsx +145 -34
- package/src/account/data-export-setting-labels.ts +20 -0
- package/src/account/data-export-setting.tsx +19 -38
- package/src/account/delete-account-setting-labels.ts +33 -0
- package/src/account/delete-account-setting.tsx +13 -35
- package/src/account/email-change-setting-labels.ts +32 -0
- package/src/account/email-change-setting.tsx +17 -36
- package/src/{components → account}/passkeys-setting.tsx +14 -9
- package/src/account/sessions-setting-labels.ts +24 -0
- package/src/account/sessions-setting.tsx +14 -28
- package/src/admin/admin-action-confirm-labels.ts +19 -0
- package/src/admin/admin-action-confirm.tsx +59 -38
- package/src/admin/admin-action-log-labels.ts +74 -0
- package/src/admin/admin-action-log.tsx +180 -54
- package/src/admin/admin-parts.ts +0 -7
- package/src/admin/invitations-panel-labels.ts +31 -0
- package/src/admin/invitations-panel.tsx +16 -34
- package/src/admin/plan-change-labels.ts +23 -0
- package/src/admin/plan-change.tsx +89 -37
- package/src/admin/reviewer-scope-editor-labels.ts +16 -0
- package/src/admin/reviewer-scope-editor.tsx +9 -15
- package/src/admin/role-select-labels.ts +16 -0
- package/src/admin/role-select.tsx +13 -23
- package/src/admin/transfer-ownership-dialog-labels.ts +20 -0
- package/src/admin/transfer-ownership-dialog.tsx +7 -17
- package/src/admin/user-roster-labels.ts +17 -0
- package/src/admin/user-roster.tsx +9 -17
- package/src/auth/accept-invitation-labels.ts +21 -0
- package/src/auth/accept-invitation.tsx +9 -20
- package/src/auth/auth-errors.ts +29 -13
- package/src/auth/complete-name-dialog-labels.ts +16 -0
- package/src/auth/complete-name-dialog.tsx +8 -13
- package/src/auth/forgot-password-form-labels.ts +20 -0
- package/src/auth/forgot-password-form.tsx +12 -20
- package/src/auth/new-password-fields.tsx +1 -1
- package/src/auth/not-found-page-labels.ts +12 -0
- package/src/auth/not-found-page.tsx +11 -14
- package/src/auth/register-form-labels.ts +31 -0
- package/src/auth/register-form.tsx +18 -38
- package/src/auth/reset-password-form-labels.ts +27 -0
- package/src/auth/reset-password-form.tsx +12 -27
- package/src/auth/sign-in-form-labels.ts +44 -0
- package/src/auth/sign-in-form.tsx +18 -51
- package/src/auth/status-parts.tsx +3 -3
- package/src/auth/verify-email-labels.ts +26 -0
- package/src/auth/verify-email.tsx +15 -30
- package/src/billing/billing-banner.tsx +2 -1
- package/src/billing/billing-labels.ts +1 -1
- package/src/billing/checkout-processing.ts +2 -12
- package/src/billing/pay-page.ts +9 -5
- package/src/billing/plan-card.tsx +26 -27
- package/src/billing/plan-limit-notice.tsx +1 -1
- package/src/billing/subscription-actions.tsx +4 -4
- package/src/chart.ts +7 -1
- package/src/components/account-chips-labels.ts +16 -0
- package/src/components/account-chips.tsx +13 -16
- package/src/components/alert-banner.tsx +39 -19
- package/src/components/amount-input.tsx +461 -405
- package/src/components/appearance-labels.ts +2 -2
- package/src/components/authed-image-labels.ts +11 -0
- package/src/components/authed-image.tsx +6 -8
- package/src/components/autocomplete.tsx +84 -80
- package/src/components/breadcrumbs-labels.ts +10 -0
- package/src/components/breadcrumbs.tsx +17 -14
- package/src/components/bulk-action-bar-labels.ts +11 -0
- package/src/components/bulk-action-bar.tsx +15 -16
- package/src/components/button-group.tsx +7 -7
- package/src/components/button-look.ts +230 -0
- package/src/components/button.tsx +339 -0
- package/src/components/calculator.tsx +18 -11
- package/src/components/calendar-heatmap-labels.ts +15 -0
- package/src/components/calendar-heatmap.tsx +13 -19
- package/src/components/card.tsx +381 -0
- package/src/components/chart-zoom-core.tsx +653 -0
- package/src/components/chart-zoom.tsx +64 -648
- package/src/components/chart.tsx +11 -11
- package/src/components/checkbox-group.tsx +13 -10
- package/src/components/checkbox.tsx +43 -42
- package/src/components/chip-input.tsx +377 -0
- package/src/components/chip-labels.ts +13 -0
- package/src/components/chip.tsx +115 -711
- package/src/components/choice-card.tsx +83 -85
- package/src/components/column-mapper-labels.ts +45 -0
- package/src/components/column-mapper.tsx +16 -51
- package/src/components/combobox-core.tsx +351 -196
- package/src/components/combobox-suggestions.tsx +129 -0
- package/src/components/combobox.tsx +69 -893
- package/src/components/confirm-dialog-labels.ts +13 -0
- package/src/components/confirm-dialog.tsx +4 -8
- package/src/components/copy-button-labels.ts +13 -0
- package/src/components/copy-button.tsx +10 -12
- package/src/components/country-select-labels.ts +11 -0
- package/src/components/country-select.tsx +74 -89
- package/src/components/currency-option-list.tsx +216 -0
- package/src/components/currency-select.tsx +85 -196
- package/src/components/danger-confirm-labels.ts +20 -0
- package/src/components/danger-confirm.tsx +69 -77
- package/src/components/data-table-cells.tsx +5 -5
- package/src/components/data-table-column-settings.tsx +137 -0
- package/src/components/data-table-filter-popover.tsx +49 -24
- package/src/components/data-table-filters.ts +48 -11
- package/src/components/data-table-head.tsx +258 -0
- package/src/components/data-table-labels.ts +43 -11
- package/src/components/data-table-mobile.tsx +594 -0
- package/src/components/data-table-pagination.tsx +11 -10
- package/src/components/data-table-resize.ts +187 -0
- package/src/components/data-table-row-actions.tsx +152 -0
- package/src/components/data-table-selection.ts +55 -0
- package/src/components/data-table-shared.tsx +172 -0
- package/src/components/data-table.tsx +178 -1300
- package/src/components/date-field.tsx +627 -0
- package/src/components/date-picker.tsx +58 -1446
- package/src/components/date-range-picker.tsx +490 -0
- package/src/components/description-list-labels.ts +9 -0
- package/src/components/description-list.tsx +31 -15
- package/src/components/dialog-frame-labels.ts +7 -0
- package/src/components/dialog-frame.tsx +8 -6
- package/src/components/disclosure.tsx +14 -14
- package/src/components/dropdown.tsx +114 -42
- package/src/components/empty-state.tsx +137 -0
- package/src/components/entity-combobox.tsx +17 -12
- package/src/components/error-boundary-labels.ts +20 -0
- package/src/components/error-boundary.tsx +10 -20
- package/src/components/facing-pair.ts +1 -1
- package/src/components/field-base.tsx +615 -0
- package/src/components/field-parts.tsx +206 -77
- package/src/components/field-strip.tsx +16 -21
- package/src/components/field-sync-labels.ts +13 -0
- package/src/components/field-sync.tsx +11 -12
- package/src/components/field.tsx +13 -11
- package/src/components/file-button.tsx +64 -412
- package/src/components/file-dropzone.tsx +36 -33
- package/src/components/floating-panel-labels.ts +10 -0
- package/src/components/floating-panel.tsx +32 -21
- package/src/components/focus-ring.ts +9 -4
- package/src/components/form-actions-labels.ts +11 -0
- package/src/components/form-actions.tsx +17 -21
- package/src/components/full-bleed-dialog.tsx +33 -25
- package/src/components/grouped-picker.tsx +118 -96
- package/src/components/help-popover.tsx +115 -0
- package/src/components/hover-menu.tsx +46 -35
- package/src/components/iban-input-labels.ts +15 -0
- package/src/components/iban-input.tsx +25 -20
- package/src/components/icon-button.tsx +945 -0
- package/src/components/icon-picker-labels.ts +13 -0
- package/src/components/icon-picker.tsx +27 -24
- package/src/components/image-grid-labels.ts +11 -0
- package/src/components/image-grid.tsx +13 -15
- package/src/components/inline-edit-field-labels.ts +11 -0
- package/src/components/inline-edit-field.tsx +20 -19
- package/src/components/inline-entity-combobox.tsx +789 -0
- package/src/components/input.tsx +380 -0
- package/src/components/jump-calendar.tsx +385 -0
- package/src/components/language-select.tsx +31 -16
- package/src/components/legal-labels.ts +99 -0
- package/src/components/legal-page.tsx +2 -2
- package/src/components/legal.tsx +11 -101
- package/src/components/lightbox-labels.ts +18 -0
- package/src/components/lightbox.tsx +13 -21
- package/src/components/line-items-labels.ts +14 -0
- package/src/components/line-items.tsx +24 -31
- package/src/components/list-labels.ts +10 -0
- package/src/components/list.tsx +98 -75
- package/src/components/loading-state.tsx +4 -4
- package/src/components/measured-grid-labels.ts +25 -0
- package/src/components/measured-grid.tsx +39 -62
- package/src/components/menu-item.tsx +29 -26
- package/src/components/mini-calendar-labels.ts +17 -0
- package/src/components/mini-calendar.tsx +38 -45
- package/src/components/modal.tsx +36 -18
- package/src/components/money-draft.ts +72 -0
- package/src/components/money-field.tsx +16 -30
- package/src/components/month-picker-labels.ts +22 -0
- package/src/components/month-picker.tsx +59 -45
- package/src/components/multi-entity-combobox.tsx +17 -12
- package/src/components/multi-select.tsx +313 -288
- package/src/components/nav-pills.tsx +19 -8
- package/src/components/number-field.tsx +14 -5
- package/src/components/number-input.tsx +125 -90
- package/src/components/numeric-field.ts +161 -0
- package/src/components/numpad-sheet.tsx +16 -16
- package/src/components/one-time-code-input.tsx +154 -169
- package/src/components/page-contents-labels.ts +9 -0
- package/src/components/page-contents.tsx +15 -15
- package/src/components/page-header.tsx +9 -5
- package/src/components/password-strength-labels.ts +23 -0
- package/src/components/password-strength.tsx +13 -27
- package/src/components/phone-input-labels.ts +10 -0
- package/src/components/phone-input.tsx +42 -57
- package/src/components/picker-sheet.tsx +47 -18
- package/src/components/pie-chart.tsx +11 -9
- package/src/components/popover-labels.ts +14 -0
- package/src/components/popover.tsx +40 -39
- package/src/components/progress-bar-labels.ts +10 -0
- package/src/components/progress-bar.tsx +32 -23
- package/src/components/qr-code.tsx +2 -2
- package/src/components/reauth-dialog-labels.ts +13 -0
- package/src/components/reauth-dialog.tsx +7 -10
- package/src/components/row-actions-labels.ts +10 -0
- package/src/components/row-actions.tsx +11 -10
- package/src/components/scroll-area.tsx +4 -10
- package/src/components/search-field.tsx +35 -49
- package/src/components/select.tsx +302 -0
- package/src/components/separator.tsx +2 -2
- package/src/components/series-chart-axes.ts +329 -0
- package/src/components/series-chart-thin.ts +180 -0
- package/src/components/series-chart.tsx +124 -325
- package/src/components/server-wake-labels.ts +11 -0
- package/src/components/server-wake.tsx +42 -63
- package/src/components/settings-fields.tsx +46 -17
- package/src/components/share-card-labels.ts +30 -0
- package/src/components/share-card.tsx +22 -37
- package/src/components/sign-chip-labels.ts +12 -0
- package/src/components/sign-chip.tsx +6 -9
- package/src/components/signature-pad-labels.ts +24 -0
- package/src/components/signature-pad.tsx +48 -57
- package/src/components/signed-amount-labels.ts +10 -0
- package/src/components/signed-amount.tsx +21 -22
- package/src/components/skeleton.tsx +11 -3
- package/src/components/slider.tsx +51 -39
- package/src/components/sparkline-labels.ts +14 -0
- package/src/components/sparkline.tsx +16 -21
- package/src/components/spinner.tsx +81 -0
- package/src/components/stat-tile-labels.ts +15 -0
- package/src/components/stat-tile.tsx +32 -37
- package/src/components/status-dot.tsx +17 -14
- package/src/components/swatch-picker-labels.ts +10 -0
- package/src/components/swatch-picker.tsx +23 -16
- package/src/components/swipeable-row.tsx +7 -7
- package/src/components/switch.tsx +33 -32
- package/src/components/table.tsx +15 -15
- package/src/components/tabs.tsx +660 -0
- package/src/components/text-link.tsx +7 -7
- package/src/components/text.tsx +10 -6
- package/src/components/textarea.tsx +323 -0
- package/src/components/tile-radio.tsx +6 -6
- package/src/components/time-input.tsx +15 -7
- package/src/components/toast-labels.ts +12 -0
- package/src/components/toast.tsx +5 -8
- package/src/components/toggle-group.tsx +105 -42
- package/src/components/toggle-legend.tsx +6 -6
- package/src/components/tooltip.tsx +10 -21
- package/src/components/translation-review-editor.tsx +8 -7
- package/src/components/translation-review-parts.tsx +9 -13
- package/src/components/translation-review.tsx +26 -14
- package/src/components/tree-view.tsx +14 -12
- package/src/components/ui-labels.ts +22 -0
- package/src/components/user-avatar.tsx +3 -3
- package/src/components/wizard-stepper.tsx +10 -5
- package/src/components/write-lock-labels.ts +9 -0
- package/src/components/write-lock.tsx +10 -12
- package/src/data-table.ts +4 -0
- package/src/demo/demo-banner.tsx +9 -25
- package/src/demo/demo-ended.tsx +8 -7
- package/src/demo/demo-labels.ts +2 -2
- package/src/demo/demo-start.tsx +7 -5
- package/src/feedback/feedback-attachment-labels.ts +36 -0
- package/src/feedback/feedback-attachment.tsx +42 -66
- package/src/feedback/feedback-context-labels.ts +10 -0
- package/src/feedback/feedback-context.tsx +8 -9
- package/src/feedback/feedback-dialog-labels.ts +28 -0
- package/src/feedback/feedback-dialog.tsx +14 -44
- package/src/feedback/feedback-inbox.tsx +49 -252
- package/src/feedback/feedback-labels.ts +5 -5
- package/src/feedback/feedback-menu-labels.ts +11 -0
- package/src/feedback/feedback-menu.tsx +13 -11
- package/src/feedback/feedback-record.ts +21 -7
- package/src/feedback/feedback-row-detail-labels.ts +33 -0
- package/src/feedback/feedback-row-detail.tsx +30 -43
- package/src/feedback/feedback-status-undo.ts +3 -2
- package/src/feedback/feedback-submit-dialog.tsx +109 -0
- package/src/feedback/feedback-submit.tsx +45 -55
- package/src/feedback/feedback-swipe.tsx +1 -1
- package/src/feedback/feedback-table-labels.ts +27 -0
- package/src/feedback/feedback-table.tsx +24 -40
- package/src/feedback/feedback-thread-labels.ts +22 -0
- package/src/feedback/feedback-thread.tsx +68 -48
- package/src/feedback/feedback-vocabulary.ts +252 -0
- package/src/hooks/use-anchored-panel.ts +155 -9
- package/src/hooks/use-anchored-rect.ts +11 -9
- package/src/hooks/use-authed-src.ts +13 -7
- package/src/hooks/use-breakpoint.ts +5 -4
- package/src/hooks/use-close-transition.ts +9 -10
- package/src/hooks/use-debounce.ts +9 -0
- package/src/hooks/use-dismiss.ts +176 -19
- package/src/hooks/use-file-drop.ts +2 -2
- package/src/hooks/use-file-picker-labels.ts +29 -0
- package/src/hooks/use-file-picker.tsx +363 -0
- package/src/hooks/use-focus-trap.ts +74 -18
- package/src/i18n/defaults.ts +91 -82
- package/src/i18n/german.ts +54 -7
- package/src/i18n/kit-labels.tsx +70 -119
- package/src/i18n/locales/en.ts +46 -0
- package/src/i18n/locales/es.ts +52 -7
- package/src/i18n/locales/fr.ts +55 -8
- package/src/i18n/locales/hu.ts +54 -8
- package/src/i18n/locales/it.ts +53 -7
- package/src/i18n/locales/zh.ts +50 -6
- package/src/i18n/plurals.ts +29 -0
- package/src/i18n/review.ts +4 -0
- package/src/i18n/shared-labels.ts +135 -0
- package/src/index.ts +412 -402
- package/src/landing/access.ts +2 -1
- package/src/landing/landing-actions.tsx +6 -5
- package/src/landing/landing-labels.ts +2 -2
- package/src/landing/landing-sections.tsx +24 -23
- package/src/landing/public-header.tsx +3 -2
- package/src/landing/routing.tsx +2 -7
- package/src/lib/chip-edge-snap.ts +212 -0
- package/src/lib/cn.ts +13 -1
- package/src/lib/dates.ts +4 -2
- package/src/lib/decimal-marks.ts +4 -2
- package/src/lib/download.ts +172 -0
- package/src/lib/floating-stack.ts +5 -1
- package/src/lib/format.ts +5 -3
- package/src/lib/ime.ts +24 -0
- package/src/lib/presence.ts +18 -0
- package/src/lib/reduced-motion.ts +21 -0
- package/src/lib/round.ts +38 -0
- package/src/lib/safe-storage.ts +35 -11
- package/src/lib/session-refresh.ts +473 -0
- package/src/lib/text-match.ts +60 -0
- package/src/lib/translation-review.ts +7 -6
- package/src/rhf/fields.tsx +131 -179
- package/src/rhf/form-core.tsx +327 -0
- package/src/rhf/form.tsx +46 -321
- package/src/rhf/line-items.tsx +1 -1
- package/src/rhf.ts +3 -2
- package/src/search/command-palette-labels.ts +16 -0
- package/src/search/command-palette.tsx +37 -50
- package/src/search/global-search-labels.ts +13 -0
- package/src/search/global-search.tsx +50 -24
- package/src/search/search-index.ts +5 -6
- package/src/search/use-command-key.ts +22 -0
- package/src/settings/settings-card-classes.ts +11 -0
- package/src/settings/settings-heading.tsx +1 -1
- package/src/settings/settings-labels.ts +2 -2
- package/src/settings/settings-layout.tsx +65 -6
- package/src/settings/settings-section.tsx +5 -5
- package/src/settings/use-settings-focus.ts +2 -5
- package/src/shell/app-shell-labels.ts +10 -0
- package/src/shell/app-shell.tsx +79 -53
- package/src/shell/auth-layout.tsx +11 -10
- package/src/shell/company-switcher-labels.ts +13 -0
- package/src/shell/company-switcher.tsx +7 -11
- package/src/shell/option-switcher-menu.tsx +25 -6
- package/src/shell/role-switcher.tsx +7 -3
- package/src/shell/top-bar-brand.tsx +1 -1
- package/src/shell/top-bar.tsx +6 -5
- package/src/shell/topbar-action-menu.tsx +39 -20
- package/src/shell/topbar-controls.tsx +24 -12
- package/src/shell.ts +1 -1
- package/src/testing/index.ts +11 -0
- package/src/testing/viewport.ts +251 -0
- package/src/theme/color.ts +7 -1
- package/src/theme/palette-derive.ts +29 -7
- package/src/theme/palette-presets.ts +81 -68
- package/src/tour/tour-labels.ts +14 -0
- package/src/tour/tour.tsx +13 -23
- package/src/wizard/stepper-nav.tsx +19 -18
- package/src/wizard/types.ts +7 -22
- package/src/wizard/wizard-labels.ts +29 -0
- package/src/wizard/wizard-step.tsx +2 -2
- package/src/wizard/wizard-summary.tsx +8 -7
- package/tokens.css +63 -14
- package/dist/components/account-settings-labels.js.map +0 -1
- package/dist/components/account-settings.js.map +0 -1
- package/dist/components/choice-parts.d.ts +0 -24
- package/dist/components/choice-parts.js +0 -18
- package/dist/components/choice-parts.js.map +0 -1
- package/dist/components/passkeys-setting.js.map +0 -1
- package/dist/components/ui.d.ts +0 -100
- package/dist/components/ui.js +0 -1955
- package/dist/components/ui.js.map +0 -1
- package/dist/data-table-labels-BJ5JE_X2.d.ts +0 -923
- package/dist/delete-account-setting-DiPX4Vue.d.ts +0 -8130
- package/src/components/choice-parts.ts +0 -33
- package/src/components/ui.tsx +0 -4233
|
@@ -1,105 +1,5 @@
|
|
|
1
|
-
import { DateInput } from
|
|
2
|
-
import { BillingStanding } from
|
|
3
|
-
import '../delete-account-setting-DiPX4Vue.js';
|
|
4
|
-
import 'react';
|
|
5
|
-
import '../components/tooltip.js';
|
|
6
|
-
import '../hooks/use-anchored-rect.js';
|
|
7
|
-
import '../lib/clipping.js';
|
|
8
|
-
import '../data-table-labels-BJ5JE_X2.js';
|
|
9
|
-
import '../components/data-table-sort.js';
|
|
10
|
-
import '../components/swipeable-row.js';
|
|
11
|
-
import '../components/status-dot.js';
|
|
12
|
-
import '../components/progress-bar.js';
|
|
13
|
-
import '../components/signed-amount.js';
|
|
14
|
-
import '../components/stat-tile.js';
|
|
15
|
-
import '../components/chip.js';
|
|
16
|
-
import 'lucide-react';
|
|
17
|
-
import '../components/field-parts.js';
|
|
18
|
-
import '../components/write-lock.js';
|
|
19
|
-
import '../components/mini-calendar.js';
|
|
20
|
-
import '../components/calendar-heatmap.js';
|
|
21
|
-
import '../components/popover.js';
|
|
22
|
-
import '../hooks/use-breakpoint.js';
|
|
23
|
-
import '../components/field-sync.js';
|
|
24
|
-
import '../wizard/types.js';
|
|
25
|
-
import '../tour/tour.js';
|
|
26
|
-
import '../search/command-palette.js';
|
|
27
|
-
import '../search/global-search.js';
|
|
28
|
-
import '../search/search-index.js';
|
|
29
|
-
import '../components/month-picker.js';
|
|
30
|
-
import '../components/page-contents.js';
|
|
31
|
-
import '../components/series-chart-labels.js';
|
|
32
|
-
import '../components/pie-chart-labels.js';
|
|
33
|
-
import '../components/sparkline.js';
|
|
34
|
-
import '../components/signature-pad.js';
|
|
35
|
-
import '../components/password-strength.js';
|
|
36
|
-
import '../components/swatch-picker.js';
|
|
37
|
-
import '../components/tile-radio.js';
|
|
38
|
-
import '../components/icon-picker.js';
|
|
39
|
-
import '../components/dialog-frame.js';
|
|
40
|
-
import '../components/modal.js';
|
|
41
|
-
import '../hooks/use-search-param-state.js';
|
|
42
|
-
import '../components/measured-grid.js';
|
|
43
|
-
import '../components/user-avatar.js';
|
|
44
|
-
import '../lib/person-name.js';
|
|
45
|
-
import '../shell/topbar-action-menu.js';
|
|
46
|
-
import '../components/menu-item.js';
|
|
47
|
-
import '../components/floating-panel.js';
|
|
48
|
-
import '../hooks/use-authed-src.js';
|
|
49
|
-
import '../components/account-settings-labels.js';
|
|
50
|
-
import '../components/bulk-action-bar.js';
|
|
51
|
-
import '../components/list.js';
|
|
52
|
-
import '../components/breadcrumbs.js';
|
|
53
|
-
import '../components/toast.js';
|
|
54
|
-
import '../components/description-list.js';
|
|
55
|
-
import '../components/line-items.js';
|
|
56
|
-
import '../components/error-boundary.js';
|
|
57
|
-
import '../components/authed-image.js';
|
|
58
|
-
import '../components/image-grid.js';
|
|
59
|
-
import '../components/lightbox.js';
|
|
60
|
-
import '../auth/sign-in-form.js';
|
|
61
|
-
import '../landing/access.js';
|
|
62
|
-
import '../landing/landing-labels.js';
|
|
63
|
-
import '../shell/topbar-controls.js';
|
|
64
|
-
import '../theme/palette-presets.js';
|
|
65
|
-
import '../theme/chart-palette.js';
|
|
66
|
-
import '../theme/theme-store.js';
|
|
67
|
-
import 'zustand/middleware';
|
|
68
|
-
import 'zustand';
|
|
69
|
-
import '../auth/complete-name-dialog.js';
|
|
70
|
-
import '../auth/forgot-password-form.js';
|
|
71
|
-
import '../auth/status-parts.js';
|
|
72
|
-
import '../auth/reset-password-form.js';
|
|
73
|
-
import '../auth/verify-email.js';
|
|
74
|
-
import '../auth/not-found-page.js';
|
|
75
|
-
import '../auth/accept-invitation.js';
|
|
76
|
-
import '../shell/company-switcher.js';
|
|
77
|
-
import '../account/email-change-setting.js';
|
|
78
|
-
import '../account/sessions-setting.js';
|
|
79
|
-
import '../account/data-export-setting.js';
|
|
80
|
-
import '../components/account-chips.js';
|
|
81
|
-
import '../admin/admin-parts.js';
|
|
82
|
-
import '../admin/admin-action-log.js';
|
|
83
|
-
import '../settings/settings-labels.js';
|
|
84
|
-
import '../demo/demo-labels.js';
|
|
85
|
-
import '../components/appearance-labels.js';
|
|
86
|
-
import '../theme/contrast.js';
|
|
87
|
-
import '../theme/text-size.js';
|
|
88
|
-
import '../components/reauth-dialog.js';
|
|
89
|
-
import '../components/server-wake.js';
|
|
90
|
-
import '../lib/server-wake.js';
|
|
91
|
-
import '../components/translation-review-labels.js';
|
|
92
|
-
import '../lib/translation-review.js';
|
|
93
|
-
import '../components/country-select.js';
|
|
94
|
-
import '../components/inline-edit-field.js';
|
|
95
|
-
import '../lib/iban.js';
|
|
96
|
-
import '../lib/phone.js';
|
|
97
|
-
import '../components/sign-chip.js';
|
|
98
|
-
import '../components/column-mapper.js';
|
|
99
|
-
import '../lib/column-mapping.js';
|
|
100
|
-
import '../lib/table-text.js';
|
|
101
|
-
import '../components/focus-ring.js';
|
|
102
|
-
|
|
1
|
+
import type { DateInput } from "../lib/format.js";
|
|
2
|
+
import type { BillingStanding } from "./billing-standing.js";
|
|
103
3
|
/**
|
|
104
4
|
* "Payment processing" after the way back from a checkout (docs/billing-harmonization.md
|
|
105
5
|
* §12.21, §14.4; keksdose's `features/billing/checkout-return.ts`, made router-agnostic).
|
|
@@ -133,7 +33,7 @@ import '../components/focus-ring.js';
|
|
|
133
33
|
*/
|
|
134
34
|
/** The overview fields a completed checkout changes (wire names, `GET /billing/overview`).
|
|
135
35
|
* Pass the overview as it came; the other fields are ignored. */
|
|
136
|
-
type CheckoutOverview = Pick<BillingStanding, "status" | "in_good_standing"> & {
|
|
36
|
+
export type CheckoutOverview = Pick<BillingStanding, "status" | "in_good_standing"> & {
|
|
137
37
|
plan: string;
|
|
138
38
|
source: string;
|
|
139
39
|
current_period_end?: DateInput;
|
|
@@ -143,12 +43,12 @@ type CheckoutOverview = Pick<BillingStanding, "status" | "in_good_standing"> & {
|
|
|
143
43
|
* without case, §12.16), the status, the source, the standing and the period's end (read
|
|
144
44
|
* as an instant, so `…Z` and `…+00:00` agree).
|
|
145
45
|
*/
|
|
146
|
-
declare function checkoutFingerprint(o: CheckoutOverview): string;
|
|
46
|
+
export declare function checkoutFingerprint(o: CheckoutOverview): string;
|
|
147
47
|
/**
|
|
148
48
|
* Whether the overview `now` shows the checkout: it differs from the fingerprint taken
|
|
149
49
|
* at departure (`before`), or — with no departure on record — it is `active`.
|
|
150
50
|
*/
|
|
151
|
-
declare function checkoutLanded(before: string | null, now: CheckoutOverview): boolean;
|
|
51
|
+
export declare function checkoutLanded(before: string | null, now: CheckoutOverview): boolean;
|
|
152
52
|
/**
|
|
153
53
|
* Note the departure for a checkout — just before the page leaves for the provider (or
|
|
154
54
|
* for the pay page, `payPageUrl(url, locale)`):
|
|
@@ -160,10 +60,10 @@ declare function checkoutLanded(before: string | null, now: CheckoutOverview): b
|
|
|
160
60
|
* `overview` is what the page shows now; left out, the return waits for `active`. Pass
|
|
161
61
|
* the same `storageKey` as the hook's.
|
|
162
62
|
*/
|
|
163
|
-
declare function noteCheckoutStarted(payer: string | number, overview?: CheckoutOverview, opts?: {
|
|
63
|
+
export declare function noteCheckoutStarted(payer: string | number, overview?: CheckoutOverview, opts?: {
|
|
164
64
|
storageKey?: string;
|
|
165
65
|
}): void;
|
|
166
|
-
interface CheckoutProcessingOptions {
|
|
66
|
+
export interface CheckoutProcessingOptions {
|
|
167
67
|
/** The signed-in payer — the user's or the company's id; null while unknown (the
|
|
168
68
|
* marker then waits in the URL). */
|
|
169
69
|
payer: string | number | null;
|
|
@@ -209,9 +109,7 @@ interface CheckoutProcessingOptions {
|
|
|
209
109
|
* one timer polls, and `onLanded` runs once. The app's `refetchOnWindowFocus` doesn't
|
|
210
110
|
* matter.
|
|
211
111
|
*/
|
|
212
|
-
declare function useCheckoutProcessing(options: CheckoutProcessingOptions): {
|
|
112
|
+
export declare function useCheckoutProcessing(options: CheckoutProcessingOptions): {
|
|
213
113
|
processing: boolean;
|
|
214
114
|
checkAgain: () => void;
|
|
215
115
|
};
|
|
216
|
-
|
|
217
|
-
export { type CheckoutOverview, type CheckoutProcessingOptions, checkoutFingerprint, checkoutLanded, noteCheckoutStarted, useCheckoutProcessing };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useCallback, useEffect, useEffectEvent, useLayoutEffect, useRef, useSyncExternalStore } from "react";
|
|
3
3
|
import { toDate } from "../lib/format.js";
|
|
4
|
-
import { readStored, writeStored } from "../lib/safe-storage.js";
|
|
4
|
+
import { readStored, removeStored, writeStored } from "../lib/safe-storage.js";
|
|
5
5
|
const PROCESSING_FOR = 10 * 6e4;
|
|
6
6
|
const POLL_EVERY = 4e3;
|
|
7
7
|
const STORAGE_KEY = "eifi1-billing-checkout";
|
|
@@ -31,13 +31,6 @@ function readPending(key) {
|
|
|
31
31
|
}
|
|
32
32
|
return null;
|
|
33
33
|
}
|
|
34
|
-
function forget(key) {
|
|
35
|
-
if (typeof window === "undefined") return;
|
|
36
|
-
try {
|
|
37
|
-
window.localStorage.removeItem(key);
|
|
38
|
-
} catch {
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
34
|
function storeOf(key) {
|
|
42
35
|
let store = stores.get(key);
|
|
43
36
|
if (!store) {
|
|
@@ -59,7 +52,7 @@ function storeOf(key) {
|
|
|
59
52
|
function setPending(store, next) {
|
|
60
53
|
store.pending = next;
|
|
61
54
|
if (next) writeStored(store.key, JSON.stringify(next));
|
|
62
|
-
else
|
|
55
|
+
else removeStored(store.key);
|
|
63
56
|
for (const listener of store.listeners) listener();
|
|
64
57
|
sync(store);
|
|
65
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/billing/checkout-processing.ts"],"sourcesContent":["import { useCallback, useEffect, useEffectEvent, useLayoutEffect, useRef, useSyncExternalStore } from \"react\";\n\nimport { toDate } from \"../lib/format\";\nimport type { DateInput } from \"../lib/format\";\nimport { readStored, writeStored } from \"../lib/safe-storage\";\nimport type { BillingStanding } from \"./billing-standing\";\n\n/**\n * \"Payment processing\" after the way back from a checkout (docs/billing-harmonization.md\n * §12.21, §14.4; keksdose's `features/billing/checkout-return.ts`, made router-agnostic).\n *\n * The provider tells the app about a payment by WEBHOOK, and the webhook may land after\n * the buyer is back: Cloud Run scales to zero, and a cold start can outlast the\n * provider's redirect. Without this, someone who has just paid comes back to a page that\n * still says their trial has ended. So the return is recognised (`?checkout=done`,\n * `isCheckoutReturn`), the page says \"your payment is being processed\"\n * (`BillingBanner kind=\"processing\"`), and the overview is asked again every few seconds\n * until it has moved.\n *\n * **\"Landed\" is judged against the overview at departure** ({@link checkoutFingerprint},\n * noted by {@link noteCheckoutStarted}), not by \"is it `active` yet\": a trial and a beta\n * grant can both buy, and a running free grant keeps its status whatever the provider\n * says (§12.11) — only its period end moves — so \"active\" alone would wait for ever on\n * one of them. A return with no departure on record (another tab, another device) waits\n * for `active`. kastlan's 60-second poll for `source === \"provider\"` is the case this\n * replaces: a payer who bought under a grant never matched it.\n *\n * **Bounded:** after `timeoutMs` (10 minutes) the device stops asking, and the page says\n * what the overview says, whatever that is — a checkout abandoned at the provider must\n * not leave \"processing\" up for good.\n *\n * **Remembered across the whole-page return, per payer.** The departure goes into the\n * browser's storage through the kit's safe storage (a throwing storage — Safari's\n * private mode — keeps it in memory for this page instead), under `storageKey`; a mark\n * names its payer, so it never speaks for another account on a shared device. It is a\n * browser entry on the app's origin: an app whose privacy text lists its entries names\n * it (Kurvenschmiede passes its own key).\n */\n\n/** The overview fields a completed checkout changes (wire names, `GET /billing/overview`).\n * Pass the overview as it came; the other fields are ignored. */\nexport type CheckoutOverview = Pick<BillingStanding, \"status\" | \"in_good_standing\"> & {\n plan: string;\n source: string;\n current_period_end?: DateInput;\n};\n\n/** How long a return keeps the page in \"processing\" before it trusts the overview. */\nconst PROCESSING_FOR = 10 * 60_000;\n/** How often the overview is asked meanwhile. */\nconst POLL_EVERY = 4_000;\n/** The browser entry, unless the app names its own. */\nconst STORAGE_KEY = \"eifi1-billing-checkout\";\n\n/**\n * What of the overview a completed checkout changes, as one string: the plan (read\n * without case, §12.16), the status, the source, the standing and the period's end (read\n * as an instant, so `…Z` and `…+00:00` agree).\n */\nexport function checkoutFingerprint(o: CheckoutOverview): string {\n const end = toDate(o.current_period_end ?? null);\n return [\n String(o.plan ?? \"\").toLowerCase(),\n o.status,\n o.source,\n String(o.in_good_standing),\n end ? end.toISOString() : \"\",\n ].join(\"|\");\n}\n\n/**\n * Whether the overview `now` shows the checkout: it differs from the fingerprint taken\n * at departure (`before`), or — with no departure on record — it is `active`.\n */\nexport function checkoutLanded(before: string | null, now: CheckoutOverview): boolean {\n return before === null ? now.status === \"active\" : checkoutFingerprint(now) !== before;\n}\n\n/* ── The store: one per storage key, shared by every mounted instance ─────── */\n\ninterface PendingCheckout {\n /** Whose checkout: a user's or a company's id, as a string. */\n payer: string;\n /** The overview's fingerprint at departure, or null when it was not known. */\n before: string | null;\n /** When the buyer came back; null while they are (or were) at the provider. */\n returnedAt: number | null;\n}\n\n/** One mounted hook: what the shared timers call, kept current on every render. */\ninterface Instance {\n payer: string | null;\n refetch: () => unknown;\n onLanded: (() => void) | undefined;\n timeoutMs: number;\n pollMs: number;\n}\n\ninterface CheckoutStore {\n key: string;\n pending: PendingCheckout | null;\n listeners: Set<() => void>;\n /** The mounted instances, in mount order: the last is the latest. */\n instances: Instance[];\n poll: ReturnType<typeof setInterval> | null;\n pollEvery: number;\n expiry: ReturnType<typeof setTimeout> | null;\n expiryAt: number | null;\n /** An instance consumed the marker in this commit; the others leave it be. */\n consuming: boolean;\n}\n\n/** Module-level, so the banner's instance and the subscription page's share one state,\n * one poll and one landing (keksdose mounts the hook twice, §14.4). */\nconst stores = new Map<string, CheckoutStore>();\n\nfunction readPending(key: string): PendingCheckout | null {\n const raw = readStored(key);\n if (raw === null) return null;\n try {\n const value = JSON.parse(raw) as Partial<PendingCheckout> | null;\n if (\n value &&\n typeof value.payer === \"string\" &&\n (value.before === null || typeof value.before === \"string\") &&\n (value.returnedAt === null || typeof value.returnedAt === \"number\")\n ) {\n return { payer: value.payer, before: value.before, returnedAt: value.returnedAt };\n }\n } catch {\n // Not ours, or damaged: as if nothing was noted.\n }\n return null;\n}\n\n/** Drop the browser entry. lib/safe-storage reads and writes; removing needs the same\n * guard (a blocked storage throws on access). */\nfunction forget(key: string): void {\n if (typeof window === \"undefined\") return;\n try {\n window.localStorage.removeItem(key);\n } catch {\n // ignore (private mode, partitioned storage)\n }\n}\n\nfunction storeOf(key: string): CheckoutStore {\n let store = stores.get(key);\n if (!store) {\n store = {\n key,\n pending: readPending(key),\n listeners: new Set(),\n instances: [],\n poll: null,\n pollEvery: 0,\n expiry: null,\n expiryAt: null,\n consuming: false,\n };\n stores.set(key, store);\n }\n return store;\n}\n\nfunction setPending(store: CheckoutStore, next: PendingCheckout | null): void {\n store.pending = next;\n if (next) writeStored(store.key, JSON.stringify(next));\n else forget(store.key);\n for (const listener of store.listeners) listener();\n sync(store);\n}\n\n/** The latest mounted instance's refetch, failures swallowed: a poll that fails is\n * simply asked again at the next tick. */\nfunction refetchLatest(store: CheckoutStore): void {\n const latest = store.instances.at(-1);\n if (!latest) return;\n try {\n const result = latest.refetch() as PromiseLike<unknown> | undefined;\n if (result && typeof result.then === \"function\") result.then(undefined, () => {});\n } catch {\n // as above\n }\n}\n\n/** Arms or stops the store's two timers — the bound and the poll — for its state. */\nfunction sync(store: CheckoutStore): void {\n const pending = store.pending;\n const latest = store.instances.at(-1);\n const returnedAt = pending?.returnedAt ?? null;\n\n if (returnedAt === null) {\n if (store.expiry) clearTimeout(store.expiry);\n store.expiry = null;\n store.expiryAt = null;\n } else {\n const at = returnedAt + (latest?.timeoutMs ?? PROCESSING_FOR);\n if (at <= Date.now()) {\n setPending(store, null);\n return;\n }\n if (store.expiryAt !== at) {\n if (store.expiry) clearTimeout(store.expiry);\n store.expiryAt = at;\n store.expiry = setTimeout(() => {\n store.expiry = null;\n store.expiryAt = null;\n if (store.pending === pending) setPending(store, null);\n }, at - Date.now());\n }\n }\n\n // One poll for every instance, while a mounted one is the mark's payer.\n const watching = returnedAt !== null && store.instances.some((i) => i.payer === pending!.payer);\n const every = latest?.pollMs ?? POLL_EVERY;\n if (!watching) {\n if (store.poll) clearInterval(store.poll);\n store.poll = null;\n } else if (!store.poll || store.pollEvery !== every) {\n if (store.poll) clearInterval(store.poll);\n store.pollEvery = every;\n store.poll = setInterval(() => refetchLatest(store), every);\n }\n}\n\n/** A mounted instance joins the store's timers; the latest is the one they call. */\nfunction register(store: CheckoutStore, instance: Instance): () => void {\n store.instances.push(instance);\n return () => {\n store.instances = store.instances.filter((i) => i !== instance);\n sync(store);\n };\n}\n\n/**\n * Whether this instance is the one to consume a return marker: the first in a commit is.\n * Another instance in the same commit sees the same marker and leaves it be; the claim\n * lapses once the commit's effects have run.\n */\nfunction claimReturn(store: CheckoutStore): boolean {\n if (store.consuming) return false;\n store.consuming = true;\n void Promise.resolve().then(() => {\n store.consuming = false;\n });\n return true;\n}\n\n/**\n * Note the departure for a checkout — just before the page leaves for the provider (or\n * for the pay page, `payPageUrl(url, locale)`):\n *\n * noteCheckoutStarted(user.id, overview.data);\n * window.location.assign(payPageUrl(url, i18n.language));\n *\n * `payer` is the user's or the company's id: a mark never speaks for another payer.\n * `overview` is what the page shows now; left out, the return waits for `active`. Pass\n * the same `storageKey` as the hook's.\n */\nexport function noteCheckoutStarted(\n payer: string | number,\n overview?: CheckoutOverview,\n opts: { storageKey?: string } = {},\n): void {\n const store = storeOf(opts.storageKey ?? STORAGE_KEY);\n setPending(store, {\n payer: String(payer),\n before: overview ? checkoutFingerprint(overview) : null,\n returnedAt: null,\n });\n}\n\nexport interface CheckoutProcessingOptions {\n /** The signed-in payer — the user's or the company's id; null while unknown (the\n * marker then waits in the URL). */\n payer: string | number | null;\n /** The page was reached as the way back: `isCheckoutReturn(location.search)`. */\n returned: boolean;\n /** Drop the marker, with replace — `setSearchParams((p) => withoutCheckoutReturn(p),\n * { replace: true })`. Called once per return, by the first instance that sees it. */\n onConsumed: () => void;\n /** The overview query's data, judged here against the departure. */\n overview: CheckoutOverview | undefined;\n /** The overview query's refetch: the hook polls with it — one timer for every\n * instance, with the latest mounted one's — and \"Check again\" calls it. */\n refetch: () => unknown;\n /** Once per landing: refresh what a new standing changes — the plans, the items whose\n * `locked` may have lifted. The overview itself is already fresh. */\n onLanded?: () => void;\n /** How long a return keeps \"processing\". Default 600 000 (10 minutes). */\n timeoutMs?: number;\n /** How often the overview is asked meanwhile. Default 4 000. */\n pollMs?: number;\n /** The browser entry. Default `\"eifi1-billing-checkout\"`. */\n storageKey?: string;\n}\n\n/**\n * Whether this payer is back from a checkout whose payment the overview has not shown\n * yet — and the \"Check again\" for the banner that says so:\n *\n * const [params, setParams] = useSearchParams();\n * const overview = useQuery(billingOverviewQuery);\n * const { processing, checkAgain } = useCheckoutProcessing({\n * payer: user?.id ?? null,\n * returned: isCheckoutReturn(params),\n * onConsumed: () => setParams((p) => withoutCheckoutReturn(p), { replace: true }),\n * overview: overview.data,\n * refetch: overview.refetch,\n * onLanded: () => void qc.invalidateQueries({ queryKey: [\"budgets\"] }),\n * });\n * processing && <BillingBanner kind=\"processing\" onAction={checkAgain} />\n *\n * The kit has no router: the app says whether the URL returned and how to drop the\n * marker. Mount it wherever the return lands and the banner shows — every instance with\n * the same `storageKey` shares one state: the first that sees the marker consumes it,\n * one timer polls, and `onLanded` runs once. The app's `refetchOnWindowFocus` doesn't\n * matter.\n */\nexport function useCheckoutProcessing(options: CheckoutProcessingOptions): {\n processing: boolean;\n checkAgain: () => void;\n} {\n const {\n payer,\n returned,\n onConsumed,\n overview,\n refetch,\n onLanded,\n timeoutMs = PROCESSING_FOR,\n pollMs = POLL_EVERY,\n storageKey = STORAGE_KEY,\n } = options;\n const payerKey = payer === null || payer === undefined ? null : String(payer);\n const store = storeOf(storageKey);\n const subscribe = useCallback(\n (notify: () => void) => {\n store.listeners.add(notify);\n return () => {\n store.listeners.delete(notify);\n };\n },\n [store],\n );\n const snapshot = () => store.pending;\n const pending = useSyncExternalStore(subscribe, snapshot, snapshot);\n const processing = payerKey !== null && pending?.payer === payerKey && pending.returnedAt !== null;\n\n // This instance, as the shared timers see it. Registered before paint, so a mark that\n // ran out while the page was closed is dropped before \"processing\" can flash.\n const instanceRef = useRef<Instance>({ payer: payerKey, refetch, onLanded, timeoutMs, pollMs });\n useLayoutEffect(() => register(store, instanceRef.current), [store]);\n useLayoutEffect(() => {\n Object.assign(instanceRef.current, { payer: payerKey, refetch, onLanded, timeoutMs, pollMs });\n sync(store);\n });\n\n // The return: note it, then drop the marker so a reload does not count it twice.\n const consumed = useEffectEvent(() => onConsumed());\n useEffect(() => {\n if (!returned || payerKey === null || !claimReturn(store)) return;\n const before = store.pending?.payer === payerKey ? store.pending.before : null;\n setPending(store, { payer: payerKey, before, returnedAt: Date.now() });\n consumed();\n }, [returned, payerKey, store]);\n\n // Caught up: the overview has moved since the departure. Judged against the store as\n // it is NOW, so a second instance in the same commit finds the mark gone.\n useEffect(() => {\n if (!processing || !overview) return;\n const live = store.pending;\n if (!live || live.payer !== payerKey || live.returnedAt === null) return;\n if (!checkoutLanded(live.before, overview)) return;\n setPending(store, null);\n const latest = [...store.instances].reverse().find((i) => i.onLanded);\n latest?.onLanded?.();\n }, [processing, overview, payerKey, store]);\n\n const checkAgain = useCallback(() => {\n try {\n const result = instanceRef.current.refetch() as PromiseLike<unknown> | undefined;\n if (result && typeof result.then === \"function\") result.then(undefined, () => {});\n } catch {\n // The banner stays; the next poll asks again.\n }\n }, []);\n\n return { processing, checkAgain };\n}\n"],"mappings":";AAAA,SAAS,aAAa,WAAW,gBAAgB,iBAAiB,QAAQ,4BAA4B;AAEtG,SAAS,cAAc;AAEvB,SAAS,YAAY,mBAAmB;AA4CxC,MAAM,iBAAiB,KAAK;AAE5B,MAAM,aAAa;AAEnB,MAAM,cAAc;AAOb,SAAS,oBAAoB,GAA6B;AAC/D,QAAM,MAAM,OAAO,EAAE,sBAAsB,IAAI;AAC/C,SAAO;AAAA,IACL,OAAO,EAAE,QAAQ,EAAE,EAAE,YAAY;AAAA,IACjC,EAAE;AAAA,IACF,EAAE;AAAA,IACF,OAAO,EAAE,gBAAgB;AAAA,IACzB,MAAM,IAAI,YAAY,IAAI;AAAA,EAC5B,EAAE,KAAK,GAAG;AACZ;AAMO,SAAS,eAAe,QAAuB,KAAgC;AACpF,SAAO,WAAW,OAAO,IAAI,WAAW,WAAW,oBAAoB,GAAG,MAAM;AAClF;AAsCA,MAAM,SAAS,oBAAI,IAA2B;AAE9C,SAAS,YAAY,KAAqC;AACxD,QAAM,MAAM,WAAW,GAAG;AAC1B,MAAI,QAAQ,KAAM,QAAO;AACzB,MAAI;AACF,UAAM,QAAQ,KAAK,MAAM,GAAG;AAC5B,QACE,SACA,OAAO,MAAM,UAAU,aACtB,MAAM,WAAW,QAAQ,OAAO,MAAM,WAAW,cACjD,MAAM,eAAe,QAAQ,OAAO,MAAM,eAAe,WAC1D;AACA,aAAO,EAAE,OAAO,MAAM,OAAO,QAAQ,MAAM,QAAQ,YAAY,MAAM,WAAW;AAAA,IAClF;AAAA,EACF,QAAQ;AAAA,EAER;AACA,SAAO;AACT;AAIA,SAAS,OAAO,KAAmB;AACjC,MAAI,OAAO,WAAW,YAAa;AACnC,MAAI;AACF,WAAO,aAAa,WAAW,GAAG;AAAA,EACpC,QAAQ;AAAA,EAER;AACF;AAEA,SAAS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Y,KAAK,eAAe,KAAM;AAClE,QAAI,CAAC,eAAe,KAAK,QAAQ,QAAQ,EAAG;AAC5C,eAAW,OAAO,IAAI;AACtB,UAAM,SAAS,CAAC,GAAG,MAAM,SAAS,EAAE,QAAQ,EAAE,KAAK,CAAC,MAAM,EAAE,QAAQ;AACpE,YAAQ,WAAW;AAAA,EACrB,GAAG,CAAC,YAAY,UAAU,UAAU,KAAK,CAAC;AAE1C,QAAM,aAAa,YAAY,MAAM;AACnC,QAAI;AACF,YAAM,SAAS,YAAY,QAAQ,QAAQ;AAC3C,UAAI,UAAU,OAAO,OAAO,SAAS,WAAY,QAAO,KAAK,QAAW,MAAM;AAAA,MAAC,CAAC;AAAA,IAClF,QAAQ;AAAA,IAER;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,SAAO,EAAE,YAAY,WAAW;AAClC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/billing/checkout-processing.ts"],"sourcesContent":["import { useCallback, useEffect, useEffectEvent, useLayoutEffect, useRef, useSyncExternalStore } from \"react\";\n\nimport { toDate } from \"../lib/format\";\nimport type { DateInput } from \"../lib/format\";\nimport { readStored, removeStored, writeStored } from \"../lib/safe-storage\";\nimport type { BillingStanding } from \"./billing-standing\";\n\n/**\n * \"Payment processing\" after the way back from a checkout (docs/billing-harmonization.md\n * §12.21, §14.4; keksdose's `features/billing/checkout-return.ts`, made router-agnostic).\n *\n * The provider tells the app about a payment by WEBHOOK, and the webhook may land after\n * the buyer is back: Cloud Run scales to zero, and a cold start can outlast the\n * provider's redirect. Without this, someone who has just paid comes back to a page that\n * still says their trial has ended. So the return is recognised (`?checkout=done`,\n * `isCheckoutReturn`), the page says \"your payment is being processed\"\n * (`BillingBanner kind=\"processing\"`), and the overview is asked again every few seconds\n * until it has moved.\n *\n * **\"Landed\" is judged against the overview at departure** ({@link checkoutFingerprint},\n * noted by {@link noteCheckoutStarted}), not by \"is it `active` yet\": a trial and a beta\n * grant can both buy, and a running free grant keeps its status whatever the provider\n * says (§12.11) — only its period end moves — so \"active\" alone would wait for ever on\n * one of them. A return with no departure on record (another tab, another device) waits\n * for `active`. kastlan's 60-second poll for `source === \"provider\"` is the case this\n * replaces: a payer who bought under a grant never matched it.\n *\n * **Bounded:** after `timeoutMs` (10 minutes) the device stops asking, and the page says\n * what the overview says, whatever that is — a checkout abandoned at the provider must\n * not leave \"processing\" up for good.\n *\n * **Remembered across the whole-page return, per payer.** The departure goes into the\n * browser's storage through the kit's safe storage (a throwing storage — Safari's\n * private mode — keeps it in memory for this page instead), under `storageKey`; a mark\n * names its payer, so it never speaks for another account on a shared device. It is a\n * browser entry on the app's origin: an app whose privacy text lists its entries names\n * it (Kurvenschmiede passes its own key).\n */\n\n/** The overview fields a completed checkout changes (wire names, `GET /billing/overview`).\n * Pass the overview as it came; the other fields are ignored. */\nexport type CheckoutOverview = Pick<BillingStanding, \"status\" | \"in_good_standing\"> & {\n plan: string;\n source: string;\n current_period_end?: DateInput;\n};\n\n/** How long a return keeps the page in \"processing\" before it trusts the overview. */\nconst PROCESSING_FOR = 10 * 60_000;\n/** How often the overview is asked meanwhile. */\nconst POLL_EVERY = 4_000;\n/** The browser entry, unless the app names its own. */\nconst STORAGE_KEY = \"eifi1-billing-checkout\";\n\n/**\n * What of the overview a completed checkout changes, as one string: the plan (read\n * without case, §12.16), the status, the source, the standing and the period's end (read\n * as an instant, so `…Z` and `…+00:00` agree).\n */\nexport function checkoutFingerprint(o: CheckoutOverview): string {\n const end = toDate(o.current_period_end ?? null);\n return [\n String(o.plan ?? \"\").toLowerCase(),\n o.status,\n o.source,\n String(o.in_good_standing),\n end ? end.toISOString() : \"\",\n ].join(\"|\");\n}\n\n/**\n * Whether the overview `now` shows the checkout: it differs from the fingerprint taken\n * at departure (`before`), or — with no departure on record — it is `active`.\n */\nexport function checkoutLanded(before: string | null, now: CheckoutOverview): boolean {\n return before === null ? now.status === \"active\" : checkoutFingerprint(now) !== before;\n}\n\n/* ── The store: one per storage key, shared by every mounted instance ─────── */\n\ninterface PendingCheckout {\n /** Whose checkout: a user's or a company's id, as a string. */\n payer: string;\n /** The overview's fingerprint at departure, or null when it was not known. */\n before: string | null;\n /** When the buyer came back; null while they are (or were) at the provider. */\n returnedAt: number | null;\n}\n\n/** One mounted hook: what the shared timers call, kept current on every render. */\ninterface Instance {\n payer: string | null;\n refetch: () => unknown;\n onLanded: (() => void) | undefined;\n timeoutMs: number;\n pollMs: number;\n}\n\ninterface CheckoutStore {\n key: string;\n pending: PendingCheckout | null;\n listeners: Set<() => void>;\n /** The mounted instances, in mount order: the last is the latest. */\n instances: Instance[];\n poll: ReturnType<typeof setInterval> | null;\n pollEvery: number;\n expiry: ReturnType<typeof setTimeout> | null;\n expiryAt: number | null;\n /** An instance consumed the marker in this commit; the others leave it be. */\n consuming: boolean;\n}\n\n/** Module-level, so the banner's instance and the subscription page's share one state,\n * one poll and one landing (keksdose mounts the hook twice, §14.4). */\nconst stores = new Map<string, CheckoutStore>();\n\nfunction readPending(key: string): PendingCheckout | null {\n const raw = readStored(key);\n if (raw === null) return null;\n try {\n const value = JSON.parse(raw) as Partial<PendingCheckout> | null;\n if (\n value &&\n typeof value.payer === \"string\" &&\n (value.before === null || typeof value.before === \"string\") &&\n (value.returnedAt === null || typeof value.returnedAt === \"number\")\n ) {\n return { payer: value.payer, before: value.before, returnedAt: value.returnedAt };\n }\n } catch {\n // Not ours, or damaged: as if nothing was noted.\n }\n return null;\n}\n\n\nfunction storeOf(key: string): CheckoutStore {\n let store = stores.get(key);\n if (!store) {\n store = {\n key,\n pending: readPending(key),\n listeners: new Set(),\n instances: [],\n poll: null,\n pollEvery: 0,\n expiry: null,\n expiryAt: null,\n consuming: false,\n };\n stores.set(key, store);\n }\n return store;\n}\n\nfunction setPending(store: CheckoutStore, next: PendingCheckout | null): void {\n store.pending = next;\n if (next) writeStored(store.key, JSON.stringify(next));\n else removeStored(store.key);\n for (const listener of store.listeners) listener();\n sync(store);\n}\n\n/** The latest mounted instance's refetch, failures swallowed: a poll that fails is\n * simply asked again at the next tick. */\nfunction refetchLatest(store: CheckoutStore): void {\n const latest = store.instances.at(-1);\n if (!latest) return;\n try {\n const result = latest.refetch() as PromiseLike<unknown> | undefined;\n if (result && typeof result.then === \"function\") result.then(undefined, () => {});\n } catch {\n // as above\n }\n}\n\n/** Arms or stops the store's two timers — the bound and the poll — for its state. */\nfunction sync(store: CheckoutStore): void {\n const pending = store.pending;\n const latest = store.instances.at(-1);\n const returnedAt = pending?.returnedAt ?? null;\n\n if (returnedAt === null) {\n if (store.expiry) clearTimeout(store.expiry);\n store.expiry = null;\n store.expiryAt = null;\n } else {\n const at = returnedAt + (latest?.timeoutMs ?? PROCESSING_FOR);\n if (at <= Date.now()) {\n setPending(store, null);\n return;\n }\n if (store.expiryAt !== at) {\n if (store.expiry) clearTimeout(store.expiry);\n store.expiryAt = at;\n store.expiry = setTimeout(() => {\n store.expiry = null;\n store.expiryAt = null;\n if (store.pending === pending) setPending(store, null);\n }, at - Date.now());\n }\n }\n\n // One poll for every instance, while a mounted one is the mark's payer.\n const watching = returnedAt !== null && store.instances.some((i) => i.payer === pending!.payer);\n const every = latest?.pollMs ?? POLL_EVERY;\n if (!watching) {\n if (store.poll) clearInterval(store.poll);\n store.poll = null;\n } else if (!store.poll || store.pollEvery !== every) {\n if (store.poll) clearInterval(store.poll);\n store.pollEvery = every;\n store.poll = setInterval(() => refetchLatest(store), every);\n }\n}\n\n/** A mounted instance joins the store's timers; the latest is the one they call. */\nfunction register(store: CheckoutStore, instance: Instance): () => void {\n store.instances.push(instance);\n return () => {\n store.instances = store.instances.filter((i) => i !== instance);\n sync(store);\n };\n}\n\n/**\n * Whether this instance is the one to consume a return marker: the first in a commit is.\n * Another instance in the same commit sees the same marker and leaves it be; the claim\n * lapses once the commit's effects have run.\n */\nfunction claimReturn(store: CheckoutStore): boolean {\n if (store.consuming) return false;\n store.consuming = true;\n void Promise.resolve().then(() => {\n store.consuming = false;\n });\n return true;\n}\n\n/**\n * Note the departure for a checkout — just before the page leaves for the provider (or\n * for the pay page, `payPageUrl(url, locale)`):\n *\n * noteCheckoutStarted(user.id, overview.data);\n * window.location.assign(payPageUrl(url, i18n.language));\n *\n * `payer` is the user's or the company's id: a mark never speaks for another payer.\n * `overview` is what the page shows now; left out, the return waits for `active`. Pass\n * the same `storageKey` as the hook's.\n */\nexport function noteCheckoutStarted(\n payer: string | number,\n overview?: CheckoutOverview,\n opts: { storageKey?: string } = {},\n): void {\n const store = storeOf(opts.storageKey ?? STORAGE_KEY);\n setPending(store, {\n payer: String(payer),\n before: overview ? checkoutFingerprint(overview) : null,\n returnedAt: null,\n });\n}\n\nexport interface CheckoutProcessingOptions {\n /** The signed-in payer — the user's or the company's id; null while unknown (the\n * marker then waits in the URL). */\n payer: string | number | null;\n /** The page was reached as the way back: `isCheckoutReturn(location.search)`. */\n returned: boolean;\n /** Drop the marker, with replace — `setSearchParams((p) => withoutCheckoutReturn(p),\n * { replace: true })`. Called once per return, by the first instance that sees it. */\n onConsumed: () => void;\n /** The overview query's data, judged here against the departure. */\n overview: CheckoutOverview | undefined;\n /** The overview query's refetch: the hook polls with it — one timer for every\n * instance, with the latest mounted one's — and \"Check again\" calls it. */\n refetch: () => unknown;\n /** Once per landing: refresh what a new standing changes — the plans, the items whose\n * `locked` may have lifted. The overview itself is already fresh. */\n onLanded?: () => void;\n /** How long a return keeps \"processing\". Default 600 000 (10 minutes). */\n timeoutMs?: number;\n /** How often the overview is asked meanwhile. Default 4 000. */\n pollMs?: number;\n /** The browser entry. Default `\"eifi1-billing-checkout\"`. */\n storageKey?: string;\n}\n\n/**\n * Whether this payer is back from a checkout whose payment the overview has not shown\n * yet — and the \"Check again\" for the banner that says so:\n *\n * const [params, setParams] = useSearchParams();\n * const overview = useQuery(billingOverviewQuery);\n * const { processing, checkAgain } = useCheckoutProcessing({\n * payer: user?.id ?? null,\n * returned: isCheckoutReturn(params),\n * onConsumed: () => setParams((p) => withoutCheckoutReturn(p), { replace: true }),\n * overview: overview.data,\n * refetch: overview.refetch,\n * onLanded: () => void qc.invalidateQueries({ queryKey: [\"budgets\"] }),\n * });\n * processing && <BillingBanner kind=\"processing\" onAction={checkAgain} />\n *\n * The kit has no router: the app says whether the URL returned and how to drop the\n * marker. Mount it wherever the return lands and the banner shows — every instance with\n * the same `storageKey` shares one state: the first that sees the marker consumes it,\n * one timer polls, and `onLanded` runs once. The app's `refetchOnWindowFocus` doesn't\n * matter.\n */\nexport function useCheckoutProcessing(options: CheckoutProcessingOptions): {\n processing: boolean;\n checkAgain: () => void;\n} {\n const {\n payer,\n returned,\n onConsumed,\n overview,\n refetch,\n onLanded,\n timeoutMs = PROCESSING_FOR,\n pollMs = POLL_EVERY,\n storageKey = STORAGE_KEY,\n } = options;\n const payerKey = payer === null || payer === undefined ? null : String(payer);\n const store = storeOf(storageKey);\n const subscribe = useCallback(\n (notify: () => void) => {\n store.listeners.add(notify);\n return () => {\n store.listeners.delete(notify);\n };\n },\n [store],\n );\n const snapshot = () => store.pending;\n const pending = useSyncExternalStore(subscribe, snapshot, snapshot);\n const processing = payerKey !== null && pending?.payer === payerKey && pending.returnedAt !== null;\n\n // This instance, as the shared timers see it. Registered before paint, so a mark that\n // ran out while the page was closed is dropped before \"processing\" can flash.\n const instanceRef = useRef<Instance>({ payer: payerKey, refetch, onLanded, timeoutMs, pollMs });\n useLayoutEffect(() => register(store, instanceRef.current), [store]);\n useLayoutEffect(() => {\n Object.assign(instanceRef.current, { payer: payerKey, refetch, onLanded, timeoutMs, pollMs });\n sync(store);\n });\n\n // The return: note it, then drop the marker so a reload does not count it twice.\n const consumed = useEffectEvent(() => onConsumed());\n useEffect(() => {\n if (!returned || payerKey === null || !claimReturn(store)) return;\n const before = store.pending?.payer === payerKey ? store.pending.before : null;\n setPending(store, { payer: payerKey, before, returnedAt: Date.now() });\n consumed();\n }, [returned, payerKey, store]);\n\n // Caught up: the overview has moved since the departure. Judged against the store as\n // it is NOW, so a second instance in the same commit finds the mark gone.\n useEffect(() => {\n if (!processing || !overview) return;\n const live = store.pending;\n if (!live || live.payer !== payerKey || live.returnedAt === null) return;\n if (!checkoutLanded(live.before, overview)) return;\n setPending(store, null);\n const latest = [...store.instances].reverse().find((i) => i.onLanded);\n latest?.onLanded?.();\n }, [processing, overview, payerKey, store]);\n\n const checkAgain = useCallback(() => {\n try {\n const result = instanceRef.current.refetch() as PromiseLike<unknown> | undefined;\n if (result && typeof result.then === \"function\") result.then(undefined, () => {});\n } catch {\n // The banner stays; the next poll asks again.\n }\n }, []);\n\n return { processing, checkAgain };\n}\n"],"mappings":";AAAA,SAAS,aAAa,WAAW,gBAAgB,iBAAiB,QAAQ,4BAA4B;AAEtG,SAAS,cAAc;AAEvB,SAAS,YAAY,cAAc,mBAAmB;AA4CtD,MAAM,iBAAiB,KAAK;AAE5B,MAAM,aAAa;AAEnB,MAAM,cAAc;AAOb,SAAS,oBAAoB,GAA6B;AAC/D,QAAM,MAAM,OAAO,EAAE,sBAAsB,IAAI;AAC/C,SAAO;AAAA,IACL,OAAO,EAAE,QAAQ,EAAE,EAAE,YAAY;AAAA,IACjC,EAAE;AAAA,IACF,EAAE;AAAA,IACF,OAAO,EAAE,gBAAgB;AAAA,IACzB,MAAM,IAAI,YAAY,IAAI;AAAA,EAC5B,EAAE,KAAK,GAAG;AACZ;AAMO,SAAS,eAAe,QAAuB,KAAgC;AACpF,SAAO,WAAW,OAAO,IAAI,WAAW,WAAW,oBAAoB,GAAG,MAAM;AAClF;AAsCA,MAAM,SAAS,oBAAI,IAA2B;AAE9C,SAAS,YAAY,KAAqC;AACxD,QAAM,MAAM,WAAW,GAAG;AAC1B,MAAI,QAAQ,KAAM,QAAO;AACzB,MAAI;AACF,UAAM,QAAQ,KAAK,MAAM,GAAG;AAC5B,QACE,SACA,OAAO,MAAM,UAAU,aACtB,MAAM,WAAW,QAAQ,OAAO,MAAM,WAAW,cACjD,MAAM,eAAe,QAAQ,OAAO,MAAM,eAAe,WAC1D;AACA,aAAO,EAAE,OAAO,MAAM,OAAO,Q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AAM;AACd,QAAI,CAAC,cAAc,CAAC,SAAU;AAC9B,UAAM,OAAO,MAAM;AACnB,QAAI,CAAC,QAAQ,KAAK,UAAU,YAAY,KAAK,eAAe,KAAM;AAClE,QAAI,CAAC,eAAe,KAAK,QAAQ,QAAQ,EAAG;AAC5C,eAAW,OAAO,IAAI;AACtB,UAAM,SAAS,CAAC,GAAG,MAAM,SAAS,EAAE,QAAQ,EAAE,KAAK,CAAC,MAAM,EAAE,QAAQ;AACpE,YAAQ,WAAW;AAAA,EACrB,GAAG,CAAC,YAAY,UAAU,UAAU,KAAK,CAAC;AAE1C,QAAM,aAAa,YAAY,MAAM;AACnC,QAAI;AACF,YAAM,SAAS,YAAY,QAAQ,QAAQ;AAC3C,UAAI,UAAU,OAAO,OAAO,SAAS,WAAY,QAAO,KAAK,QAAW,MAAM;AAAA,MAAC,CAAC;AAAA,IAClF,QAAQ;AAAA,IAER;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,SAAO,EAAE,YAAY,WAAW;AAClC;","names":[]}
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
* deploy notes and its tests.
|
|
17
17
|
*/
|
|
18
18
|
/** The query parameter of the way back. */
|
|
19
|
-
declare const CHECKOUT_RETURN_PARAM = "checkout";
|
|
19
|
+
export declare const CHECKOUT_RETURN_PARAM = "checkout";
|
|
20
20
|
/** Its one value: the buyer came back from a completed checkout. */
|
|
21
|
-
declare const CHECKOUT_RETURN_VALUE = "done";
|
|
21
|
+
export declare const CHECKOUT_RETURN_VALUE = "done";
|
|
22
22
|
/**
|
|
23
23
|
* Whether the page was reached as the way back from a checkout: `?checkout=done`.
|
|
24
24
|
*
|
|
25
25
|
* const returned = isCheckoutReturn(location.search); // react-router's useLocation()
|
|
26
26
|
* const returned = isCheckoutReturn(searchParams); // useSearchParams()[0]
|
|
27
27
|
*/
|
|
28
|
-
declare function isCheckoutReturn(where: string | URLSearchParams | {
|
|
28
|
+
export declare function isCheckoutReturn(where: string | URLSearchParams | {
|
|
29
29
|
search: string;
|
|
30
30
|
}): boolean;
|
|
31
31
|
/**
|
|
@@ -34,7 +34,7 @@ declare function isCheckoutReturn(where: string | URLSearchParams | {
|
|
|
34
34
|
*
|
|
35
35
|
* setSearchParams((p) => withoutCheckoutReturn(p), { replace: true });
|
|
36
36
|
*/
|
|
37
|
-
declare function withoutCheckoutReturn(params: URLSearchParams): URLSearchParams;
|
|
37
|
+
export declare function withoutCheckoutReturn(params: URLSearchParams): URLSearchParams;
|
|
38
38
|
/**
|
|
39
39
|
* The subscription page's way-back URL: `page` with `checkout=done` in its query —
|
|
40
40
|
* after any query it already has, before its hash. A marker already there is replaced,
|
|
@@ -46,6 +46,4 @@ declare function withoutCheckoutReturn(params: URLSearchParams): URLSearchParams
|
|
|
46
46
|
* What the pay page hands Paddle.js as `successUrl`, and what a hosted checkout's
|
|
47
47
|
* redirect is set to in Paddle's dashboard.
|
|
48
48
|
*/
|
|
49
|
-
declare function checkoutReturnUrl(page: string): string;
|
|
50
|
-
|
|
51
|
-
export { CHECKOUT_RETURN_PARAM, CHECKOUT_RETURN_VALUE, checkoutReturnUrl, isCheckoutReturn, withoutCheckoutReturn };
|
|
49
|
+
export declare function checkoutReturnUrl(page: string): string;
|
|
@@ -1,104 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import 'react';
|
|
3
|
-
import '../components/tooltip.js';
|
|
4
|
-
import '../hooks/use-anchored-rect.js';
|
|
5
|
-
import '../lib/clipping.js';
|
|
6
|
-
import '../data-table-labels-BJ5JE_X2.js';
|
|
7
|
-
import '../components/data-table-sort.js';
|
|
8
|
-
import '../components/swipeable-row.js';
|
|
9
|
-
import '../components/status-dot.js';
|
|
10
|
-
import '../components/progress-bar.js';
|
|
11
|
-
import '../components/signed-amount.js';
|
|
12
|
-
import '../components/stat-tile.js';
|
|
13
|
-
import '../components/chip.js';
|
|
14
|
-
import 'lucide-react';
|
|
15
|
-
import '../components/field-parts.js';
|
|
16
|
-
import '../components/write-lock.js';
|
|
17
|
-
import '../components/mini-calendar.js';
|
|
18
|
-
import '../components/calendar-heatmap.js';
|
|
19
|
-
import '../components/popover.js';
|
|
20
|
-
import '../hooks/use-breakpoint.js';
|
|
21
|
-
import '../components/field-sync.js';
|
|
22
|
-
import '../wizard/types.js';
|
|
23
|
-
import '../tour/tour.js';
|
|
24
|
-
import '../search/command-palette.js';
|
|
25
|
-
import '../search/global-search.js';
|
|
26
|
-
import '../search/search-index.js';
|
|
27
|
-
import '../components/month-picker.js';
|
|
28
|
-
import '../components/page-contents.js';
|
|
29
|
-
import '../components/series-chart-labels.js';
|
|
30
|
-
import '../components/pie-chart-labels.js';
|
|
31
|
-
import '../components/sparkline.js';
|
|
32
|
-
import '../components/signature-pad.js';
|
|
33
|
-
import '../components/password-strength.js';
|
|
34
|
-
import '../components/swatch-picker.js';
|
|
35
|
-
import '../components/tile-radio.js';
|
|
36
|
-
import '../components/icon-picker.js';
|
|
37
|
-
import '../components/dialog-frame.js';
|
|
38
|
-
import '../components/modal.js';
|
|
39
|
-
import '../hooks/use-search-param-state.js';
|
|
40
|
-
import '../components/measured-grid.js';
|
|
41
|
-
import '../components/user-avatar.js';
|
|
42
|
-
import '../lib/person-name.js';
|
|
43
|
-
import '../shell/topbar-action-menu.js';
|
|
44
|
-
import '../components/menu-item.js';
|
|
45
|
-
import '../components/floating-panel.js';
|
|
46
|
-
import '../hooks/use-authed-src.js';
|
|
47
|
-
import '../components/account-settings-labels.js';
|
|
48
|
-
import '../components/bulk-action-bar.js';
|
|
49
|
-
import '../components/list.js';
|
|
50
|
-
import '../components/breadcrumbs.js';
|
|
51
|
-
import '../components/toast.js';
|
|
52
|
-
import '../components/description-list.js';
|
|
53
|
-
import '../components/line-items.js';
|
|
54
|
-
import '../components/error-boundary.js';
|
|
55
|
-
import '../components/authed-image.js';
|
|
56
|
-
import '../components/image-grid.js';
|
|
57
|
-
import '../components/lightbox.js';
|
|
58
|
-
import '../auth/sign-in-form.js';
|
|
59
|
-
import '../landing/access.js';
|
|
60
|
-
import '../landing/landing-labels.js';
|
|
61
|
-
import '../shell/topbar-controls.js';
|
|
62
|
-
import '../theme/palette-presets.js';
|
|
63
|
-
import '../theme/chart-palette.js';
|
|
64
|
-
import '../theme/theme-store.js';
|
|
65
|
-
import 'zustand/middleware';
|
|
66
|
-
import 'zustand';
|
|
67
|
-
import '../auth/complete-name-dialog.js';
|
|
68
|
-
import '../auth/forgot-password-form.js';
|
|
69
|
-
import '../auth/status-parts.js';
|
|
70
|
-
import '../auth/reset-password-form.js';
|
|
71
|
-
import '../auth/verify-email.js';
|
|
72
|
-
import '../auth/not-found-page.js';
|
|
73
|
-
import '../auth/accept-invitation.js';
|
|
74
|
-
import '../shell/company-switcher.js';
|
|
75
|
-
import '../account/email-change-setting.js';
|
|
76
|
-
import '../account/sessions-setting.js';
|
|
77
|
-
import '../lib/format.js';
|
|
78
|
-
import '../account/data-export-setting.js';
|
|
79
|
-
import '../components/account-chips.js';
|
|
80
|
-
import '../admin/admin-parts.js';
|
|
81
|
-
import '../admin/admin-action-log.js';
|
|
82
|
-
import '../settings/settings-labels.js';
|
|
83
|
-
import '../demo/demo-labels.js';
|
|
84
|
-
import '../components/appearance-labels.js';
|
|
85
|
-
import '../theme/contrast.js';
|
|
86
|
-
import '../theme/text-size.js';
|
|
87
|
-
import '../components/reauth-dialog.js';
|
|
88
|
-
import '../components/server-wake.js';
|
|
89
|
-
import '../lib/server-wake.js';
|
|
90
|
-
import '../components/translation-review-labels.js';
|
|
91
|
-
import '../lib/translation-review.js';
|
|
92
|
-
import '../components/country-select.js';
|
|
93
|
-
import '../components/inline-edit-field.js';
|
|
94
|
-
import '../lib/iban.js';
|
|
95
|
-
import '../lib/phone.js';
|
|
96
|
-
import '../components/sign-chip.js';
|
|
97
|
-
import '../components/column-mapper.js';
|
|
98
|
-
import '../lib/column-mapping.js';
|
|
99
|
-
import '../lib/table-text.js';
|
|
100
|
-
import '../components/focus-ring.js';
|
|
101
|
-
|
|
1
|
+
import type { UiKitLabels } from "../i18n/kit-labels.js";
|
|
102
2
|
/**
|
|
103
3
|
* The kit's pay page (docs/billing-harmonization.md §14.4, decision 19 as amended): a
|
|
104
4
|
* standalone static page that ui-kit ships as `dist/pay/`, and that each app serves on
|
|
@@ -117,22 +17,23 @@ import '../components/focus-ring.js';
|
|
|
117
17
|
*/
|
|
118
18
|
/** Paddle's two environments: the sandbox's client-side tokens start `test_`, live
|
|
119
19
|
* ones `live_`. */
|
|
120
|
-
type PaddleEnvironment = "sandbox" | "live";
|
|
20
|
+
export type PaddleEnvironment = "sandbox" | "live";
|
|
121
21
|
/** The pay page's language parameter: `?lang=<kit locale>`. */
|
|
122
|
-
declare const PAY_PAGE_LANG_PARAM = "lang";
|
|
22
|
+
export declare const PAY_PAGE_LANG_PARAM = "lang";
|
|
123
23
|
/** The kit's seven languages (`KitLanguageCode`), as the page reads them. */
|
|
124
24
|
declare const PAY_PAGE_LANGUAGES: readonly ["de-CH", "en", "es", "fr", "it", "hu", "zh"];
|
|
125
25
|
/** One of the kit's languages, as the page speaks it. */
|
|
126
|
-
type PayPageLanguage = (typeof PAY_PAGE_LANGUAGES)[number];
|
|
26
|
+
export type PayPageLanguage = (typeof PAY_PAGE_LANGUAGES)[number];
|
|
127
27
|
/** Paddle's transaction parameter on a pay page link. @internal */
|
|
128
|
-
declare const PAY_PAGE_TRANSACTION_PARAM = "_ptxn";
|
|
28
|
+
export declare const PAY_PAGE_TRANSACTION_PARAM = "_ptxn";
|
|
129
29
|
/**
|
|
130
30
|
* The kit's locale → Paddle's checkout locale: `de-CH` → `de`, `zh` → `zh-Hans`, `hu` →
|
|
131
31
|
* `en` (Paddle has no Hungarian), the others as they are. Any tag is read as the kit
|
|
132
32
|
* reads it (`de-AT` is the one German, `zh-TW` the one Chinese); one the kit doesn't
|
|
133
|
-
* ship is English.
|
|
33
|
+
* ship is English, and so is `undefined` (0.33.1) — `useKitLocale()` with no provider
|
|
34
|
+
* locale.
|
|
134
35
|
*/
|
|
135
|
-
declare function paddleLocale(kitLocale: string): string;
|
|
36
|
+
export declare function paddleLocale(kitLocale: string | undefined): string;
|
|
136
37
|
/**
|
|
137
38
|
* The checkout's `{url}` with the buyer's language: `lang=<kit locale>` on a pay page
|
|
138
39
|
* link (one that carries `_ptxn`); any other URL — a hosted checkout's, which takes its
|
|
@@ -140,21 +41,24 @@ declare function paddleLocale(kitLocale: string): string;
|
|
|
140
41
|
*
|
|
141
42
|
* const { url } = await api.checkout({ plan, interval, currency });
|
|
142
43
|
* noteCheckoutStarted(user.id, overview);
|
|
143
|
-
* window.location.assign(payPageUrl(url,
|
|
44
|
+
* window.location.assign(payPageUrl(url, locale)); // locale = useKitLocale()
|
|
144
45
|
*
|
|
145
|
-
*
|
|
46
|
+
* `locale` may be `undefined` (0.33.1, keksdose): `useKitLocale()` answers that with no
|
|
47
|
+
* provider locale, the runtime's language. The link then goes without `lang`, and the
|
|
48
|
+
* page speaks the browser's language, else English — what a missing or wrong `lang`
|
|
49
|
+
* already did: it costs nothing but the language.
|
|
146
50
|
*/
|
|
147
|
-
declare function payPageUrl(checkoutUrl: string, locale: string): string;
|
|
51
|
+
export declare function payPageUrl(checkoutUrl: string, locale: string | undefined): string;
|
|
148
52
|
/**
|
|
149
53
|
* The language the page speaks: its `lang` parameter, else the browser's languages in
|
|
150
54
|
* their order, each matched to the kit's; else English. @internal
|
|
151
55
|
*/
|
|
152
|
-
declare function payPageLanguage(lang: string | null | undefined, browserLanguages?: readonly string[]): PayPageLanguage;
|
|
56
|
+
export declare function payPageLanguage(lang: string | null | undefined, browserLanguages?: readonly string[]): PayPageLanguage;
|
|
153
57
|
/**
|
|
154
58
|
* The page's words in one language — built into `pay.js` at the kit's build from the
|
|
155
59
|
* seven catalogues, since the page has no React and no provider. @internal
|
|
156
60
|
*/
|
|
157
|
-
interface PayPageStrings {
|
|
61
|
+
export interface PayPageStrings {
|
|
158
62
|
/** `billing.payOpening`, while the checkout opens. */
|
|
159
63
|
opening: string;
|
|
160
64
|
/** `billing.payNothing`: no `_ptxn`, or no token (billing off). */
|
|
@@ -172,16 +76,16 @@ interface PayPageStrings {
|
|
|
172
76
|
legal: string;
|
|
173
77
|
}
|
|
174
78
|
/** The page's words, read from one of the kit's catalogues. @internal */
|
|
175
|
-
declare function payPageStrings(labels: UiKitLabels): PayPageStrings;
|
|
79
|
+
export declare function payPageStrings(labels: UiKitLabels): PayPageStrings;
|
|
176
80
|
/** The configuration file beside the page, written at each app's web build. @internal */
|
|
177
|
-
declare const PAY_CONFIG_FILE = "pay-config.json";
|
|
81
|
+
export declare const PAY_CONFIG_FILE = "pay-config.json";
|
|
178
82
|
/**
|
|
179
83
|
* `pay-config.json`: what the page needs that differs per app and deployment. Read by
|
|
180
84
|
* the page from its own origin — never from the query, where Paddle's own links (it
|
|
181
85
|
* puts only `_ptxn` there) would lack it and a return URL would be an open redirect on
|
|
182
86
|
* an approved payment domain. @internal
|
|
183
87
|
*/
|
|
184
|
-
interface PayPageConfig {
|
|
88
|
+
export interface PayPageConfig {
|
|
185
89
|
/** Paddle's client-side token (`test_…` for the sandbox, `live_…` for live); null
|
|
186
90
|
* while billing is off, and the page says `payNothing`. */
|
|
187
91
|
token: string | null;
|
|
@@ -203,8 +107,7 @@ interface PayPageConfig {
|
|
|
203
107
|
* - a return, terms or privacy URL that isn't `https://` (`http://` for localhost only);
|
|
204
108
|
* - no app name. @internal
|
|
205
109
|
*/
|
|
206
|
-
declare function payPageConfigProblems(config: unknown): string[];
|
|
110
|
+
export declare function payPageConfigProblems(config: unknown): string[];
|
|
207
111
|
/** Paddle.js's `successUrl` for a configuration: the way back, `?checkout=done`. @internal */
|
|
208
|
-
declare function paySuccessUrl(config: Pick<PayPageConfig, "returnUrl">): string;
|
|
209
|
-
|
|
210
|
-
export { PAY_CONFIG_FILE, PAY_PAGE_LANG_PARAM, PAY_PAGE_TRANSACTION_PARAM, type PaddleEnvironment, type PayPageConfig, type PayPageLanguage, type PayPageStrings, paddleLocale, payPageConfigProblems, payPageLanguage, payPageStrings, payPageUrl, paySuccessUrl };
|
|
112
|
+
export declare function paySuccessUrl(config: Pick<PayPageConfig, "returnUrl">): string;
|
|
113
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/billing/pay-page.ts"],"sourcesContent":["import type { UiKitLabels } from \"../i18n/kit-labels\";\nimport { checkoutReturnUrl } from \"./checkout-return\";\n\n/**\n * The kit's pay page (docs/billing-harmonization.md §14.4, decision 19 as amended): a\n * standalone static page that ui-kit ships as `dist/pay/`, and that each app serves on\n * its own pay host, `pay.<app domain>` — a separate origin, approved in Paddle, where\n * Paddle.js shares the origin with nothing: no sign-in, no app code, no storage.\n *\n * Paddle's create-transaction answers `checkout.url`: the pay page's URL plus\n * `?_ptxn=<txn>`, and Paddle.js on that page opens the transaction by itself. The app\n * sends the buyer there with {@link payPageUrl}, which adds the buyer's language; the\n * page maps it to Paddle's checkout locale ({@link paddleLocale}). Everything else the\n * page needs — the client-side token, sandbox or live, the way back — is the app's\n * `pay-config.json`, written at its web build by the `eifi1-pay-page` script.\n *\n * Pure, and React-free: the page's own script (`pay-page/pay.ts`) and that build script\n * bundle this module. The exports below the barrel's four are theirs.\n */\n\n/** Paddle's two environments: the sandbox's client-side tokens start `test_`, live\n * ones `live_`. */\nexport type PaddleEnvironment = \"sandbox\" | \"live\";\n\n/** The pay page's language parameter: `?lang=<kit locale>`. */\nexport const PAY_PAGE_LANG_PARAM = \"lang\";\n\n/** The kit's seven languages (`KitLanguageCode`), as the page reads them. */\nconst PAY_PAGE_LANGUAGES = [\"de-CH\", \"en\", \"es\", \"fr\", \"it\", \"hu\", \"zh\"] as const;\n\n/** One of the kit's languages, as the page speaks it. */\nexport type PayPageLanguage = (typeof PAY_PAGE_LANGUAGES)[number];\n\n/**\n * The kit's language → Paddle's checkout locale (`Paddle.Checkout.open`,\n * `settings.locale`, read 2026-10-09: ar, zh-Hans, zh-TW, da, nl, en, fr, de, it, ja, ko,\n * no, pl, pt, pt-BR, tr, ru, es, sv). Paddle has no Hungarian: a Hungarian buyer gets\n * English always, not Paddle's guess from the browser. The page's own lines stay in the\n * kit's language, Hungarian included.\n */\nconst PADDLE_LOCALES: Readonly<Record<PayPageLanguage, string>> = {\n en: \"en\",\n \"de-CH\": \"de\",\n fr: \"fr\",\n it: \"it\",\n es: \"es\",\n zh: \"zh-Hans\",\n hu: \"en\",\n};\n\n/** Paddle's transaction parameter on a pay page link. @internal */\nexport const PAY_PAGE_TRANSACTION_PARAM = \"_ptxn\";\n\n/**\n * The kit language one tag names, or undefined — `resolveLanguage`'s rule\n * (src/i18n/languages.ts), restated here because that module loads the seven catalogues\n * and the page must stay a few kilobytes: exact first, ignoring case and reading `_` as\n * `-`; then by language, so every German is `de-CH`, every Chinese `zh` (Simplified),\n * and any regional form its base (`fr-CA` → `fr`).\n */\nfunction kitLanguageOf(tag: unknown): PayPageLanguage | undefined {\n if (typeof tag !== \"string\") return undefined;\n const clean = tag.trim().replace(/_/g, \"-\");\n if (!clean) return undefined;\n const lower = clean.toLowerCase();\n const exact = PAY_PAGE_LANGUAGES.find((code) => code.toLowerCase() === lower);\n if (exact) return exact;\n const language = lower.split(\"-\")[0];\n return PAY_PAGE_LANGUAGES.find((code) => code.split(\"-\")[0].toLowerCase() === language);\n}\n\n/**\n * The kit's locale → Paddle's checkout locale: `de-CH` → `de`, `zh` → `zh-Hans`, `hu` →\n * `en` (Paddle has no Hungarian), the others as they are. Any tag is read as the kit\n * reads it (`de-AT` is the one German, `zh-TW` the one Chinese); one the kit doesn't\n * ship is English.\n */\nexport function paddleLocale(kitLocale: string): string {\n return PADDLE_LOCALES[kitLanguageOf(kitLocale) ?? \"en\"];\n}\n\n/**\n * The checkout's `{url}` with the buyer's language: `lang=<kit locale>` on a pay page\n * link (one that carries `_ptxn`); any other URL — a hosted checkout's, which takes its\n * own `locale` — unchanged, as is a locale the kit doesn't ship.\n *\n * const { url } = await api.checkout({ plan, interval, currency });\n * noteCheckoutStarted(user.id, overview);\n * window.location.assign(payPageUrl(url, i18n.language));\n *\n * A wrong `lang` costs nothing but the language: the page falls back to the browser's.\n */\nexport function payPageUrl(checkoutUrl: string, locale: string): string {\n const language = kitLanguageOf(locale);\n if (!language) return checkoutUrl;\n let url: URL;\n try {\n url = new URL(checkoutUrl);\n } catch {\n return checkoutUrl;\n }\n if (!url.searchParams.has(PAY_PAGE_TRANSACTION_PARAM)) return checkoutUrl;\n url.searchParams.set(PAY_PAGE_LANG_PARAM, language);\n return url.toString();\n}\n\n/**\n * The language the page speaks: its `lang` parameter, else the browser's languages in\n * their order, each matched to the kit's; else English. @internal\n */\nexport function payPageLanguage(\n lang: string | null | undefined,\n browserLanguages: readonly string[] = [],\n): PayPageLanguage {\n for (const candidate of [lang, ...browserLanguages]) {\n const found = kitLanguageOf(candidate);\n if (found) return found;\n }\n return \"en\";\n}\n\n/* ── The page's words ──────────────────────────────────────────────────────── */\n\n/**\n * The page's words in one language — built into `pay.js` at the kit's build from the\n * seven catalogues, since the page has no React and no provider. @internal\n */\nexport interface PayPageStrings {\n /** `billing.payOpening`, while the checkout opens. */\n opening: string;\n /** `billing.payNothing`: no `_ptxn`, or no token (billing off). */\n nothing: string;\n /** `billing.payFailed`: Paddle.js didn't load, or the configuration is wrong. */\n failed: string;\n /** `billing.payBack`: the buyer closed the checkout. */\n closed: string;\n /** `common.back`: the link to the app's subscription page. */\n back: string;\n /** `legal.links.terms` and `legal.links.privacy`: the footer's links. */\n terms: string;\n privacy: string;\n /** `legal.navLabel`: the footer's `<nav>`. */\n legal: string;\n}\n\n/** The page's words, read from one of the kit's catalogues. @internal */\nexport function payPageStrings(labels: UiKitLabels): PayPageStrings {\n return {\n opening: labels.billing.payOpening,\n nothing: labels.billing.payNothing,\n failed: labels.billing.payFailed,\n closed: labels.billing.payBack,\n back: labels.common.back,\n terms: labels.legal.links.terms,\n privacy: labels.legal.links.privacy,\n legal: labels.legal.navLabel,\n };\n}\n\n/* ── pay-config.json ───────────────────────────────────────────────────────── */\n\n/** The configuration file beside the page, written at each app's web build. @internal */\nexport const PAY_CONFIG_FILE = \"pay-config.json\";\n\n/**\n * `pay-config.json`: what the page needs that differs per app and deployment. Read by\n * the page from its own origin — never from the query, where Paddle's own links (it\n * puts only `_ptxn` there) would lack it and a return URL would be an open redirect on\n * an approved payment domain. @internal\n */\nexport interface PayPageConfig {\n /** Paddle's client-side token (`test_…` for the sandbox, `live_…` for live); null\n * while billing is off, and the page says `payNothing`. */\n token: string | null;\n environment: PaddleEnvironment | null;\n /** The app's subscription page. Paddle.js's `successUrl` is\n * `checkoutReturnUrl(returnUrl)`; \"Back\" goes here. */\n returnUrl: string;\n appName: string;\n termsUrl: string;\n privacyUrl: string;\n}\n\n/** Paddle's client-side token prefixes, per environment. */\nconst TOKEN_PREFIX: Readonly<Record<PaddleEnvironment, string>> = { sandbox: \"test_\", live: \"live_\" };\n\n/** `https://`, or `http://` on this machine only (`localhost`, `127.0.0.1`, `[::1]`). */\nfunction isPageUrl(value: unknown): boolean {\n if (typeof value !== \"string\") return false;\n let url: URL;\n try {\n url = new URL(value);\n } catch {\n return false;\n }\n if (url.protocol === \"https:\") return true;\n return url.protocol === \"http:\" && [\"localhost\", \"127.0.0.1\", \"[::1]\"].includes(url.hostname);\n}\n\n/**\n * What is wrong with a `pay-config.json`, one line each — `[]` when nothing is. The\n * build script refuses to write a file with any (so a wrong pairing fails the build,\n * not a buyer), and the page says `payFailed` for one it reads:\n *\n * - a token whose prefix disagrees with the environment (`test_` ↔ sandbox, `live_` ↔\n * live), or a token without an environment;\n * - a return, terms or privacy URL that isn't `https://` (`http://` for localhost only);\n * - no app name. @internal\n */\nexport function payPageConfigProblems(config: unknown): string[] {\n if (typeof config !== \"object\" || config === null) return [\"the configuration is not an object\"];\n const c = config as Record<string, unknown>;\n const problems: string[] = [];\n const { token, environment } = c;\n if (environment !== null && environment !== undefined && environment !== \"sandbox\" && environment !== \"live\") {\n problems.push(`environment must be \"sandbox\" or \"live\", not ${JSON.stringify(environment)}`);\n }\n if (token !== null && token !== undefined) {\n if (typeof token !== \"string\" || token === \"\") {\n problems.push(\"token must be Paddle's client-side token, or null while billing is off\");\n } else if (environment !== \"sandbox\" && environment !== \"live\") {\n problems.push(\"a token needs its environment: sandbox or live\");\n } else if (!token.startsWith(TOKEN_PREFIX[environment]) || token.length === TOKEN_PREFIX[environment].length) {\n const other = environment === \"sandbox\" ? \"live\" : \"sandbox\";\n problems.push(\n token.startsWith(TOKEN_PREFIX[other])\n ? `the token is a ${other} token (${TOKEN_PREFIX[other]}…), but the environment is ${environment}`\n : `a ${environment} token starts with ${TOKEN_PREFIX[environment]}`,\n );\n }\n }\n for (const key of [\"returnUrl\", \"termsUrl\", \"privacyUrl\"] as const) {\n if (!isPageUrl(c[key])) problems.push(`${key} must be an https:// URL (http:// for localhost only)`);\n }\n if (typeof c.appName !== \"string\" || c.appName.trim() === \"\") problems.push(\"appName is missing\");\n return problems;\n}\n\n/** Paddle.js's `successUrl` for a configuration: the way back, `?checkout=done`. @internal */\nexport function paySuccessUrl(config: Pick<PayPageConfig, \"returnUrl\">): string {\n return checkoutReturnUrl(config.returnUrl);\n}\n"],"mappings":";AACA,SAAS,yBAAyB;AAwB3B,MAAM,sBAAsB;AAGnC,MAAM,qBAAqB,CAAC,SAAS,MAAM,MAAM,MAAM,MAAM,MAAM,IAAI;AAYvE,MAAM,iBAA4D;AAAA,EAChE,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAGO,MAAM,6BAA6B;AAS1C,SAAS,cAAc,KAA2C;AAChE,MAAI,OAAO,QAAQ,SAAU,QAAO;AACpC,QAAM,QAAQ,IAAI,KAAK,EAAE,QAAQ,MAAM,GAAG;AAC1C,MAAI,CAAC,MAAO,QAAO;AACnB,QAAM,QAAQ,MAAM,YAAY;AAChC,QAAM,QAAQ,mBAAmB,KAAK,CAAC,SAAS,KAAK,YAAY,M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BAAoB;AAChG,SAAO;AACT;AAGO,SAAS,cAAc,QAAkD;AAC9E,SAAO,kBAAkB,OAAO,SAAS;AAC3C;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/billing/pay-page.ts"],"sourcesContent":["import type { UiKitLabels } from \"../i18n/kit-labels\";\nimport { checkoutReturnUrl } from \"./checkout-return\";\n\n/**\n * The kit's pay page (docs/billing-harmonization.md §14.4, decision 19 as amended): a\n * standalone static page that ui-kit ships as `dist/pay/`, and that each app serves on\n * its own pay host, `pay.<app domain>` — a separate origin, approved in Paddle, where\n * Paddle.js shares the origin with nothing: no sign-in, no app code, no storage.\n *\n * Paddle's create-transaction answers `checkout.url`: the pay page's URL plus\n * `?_ptxn=<txn>`, and Paddle.js on that page opens the transaction by itself. The app\n * sends the buyer there with {@link payPageUrl}, which adds the buyer's language; the\n * page maps it to Paddle's checkout locale ({@link paddleLocale}). Everything else the\n * page needs — the client-side token, sandbox or live, the way back — is the app's\n * `pay-config.json`, written at its web build by the `eifi1-pay-page` script.\n *\n * Pure, and React-free: the page's own script (`pay-page/pay.ts`) and that build script\n * bundle this module. The exports below the barrel's four are theirs.\n */\n\n/** Paddle's two environments: the sandbox's client-side tokens start `test_`, live\n * ones `live_`. */\nexport type PaddleEnvironment = \"sandbox\" | \"live\";\n\n/** The pay page's language parameter: `?lang=<kit locale>`. */\nexport const PAY_PAGE_LANG_PARAM = \"lang\";\n\n/** The kit's seven languages (`KitLanguageCode`), as the page reads them. */\nconst PAY_PAGE_LANGUAGES = [\"de-CH\", \"en\", \"es\", \"fr\", \"it\", \"hu\", \"zh\"] as const;\n\n/** One of the kit's languages, as the page speaks it. */\nexport type PayPageLanguage = (typeof PAY_PAGE_LANGUAGES)[number];\n\n/**\n * The kit's language → Paddle's checkout locale (`Paddle.Checkout.open`,\n * `settings.locale`, read 2026-10-09: ar, zh-Hans, zh-TW, da, nl, en, fr, de, it, ja, ko,\n * no, pl, pt, pt-BR, tr, ru, es, sv). Paddle has no Hungarian: a Hungarian buyer gets\n * English always, not Paddle's guess from the browser. The page's own lines stay in the\n * kit's language, Hungarian included.\n */\nconst PADDLE_LOCALES: Readonly<Record<PayPageLanguage, string>> = {\n en: \"en\",\n \"de-CH\": \"de\",\n fr: \"fr\",\n it: \"it\",\n es: \"es\",\n zh: \"zh-Hans\",\n hu: \"en\",\n};\n\n/** Paddle's transaction parameter on a pay page link. @internal */\nexport const PAY_PAGE_TRANSACTION_PARAM = \"_ptxn\";\n\n/**\n * The kit language one tag names, or undefined — `resolveLanguage`'s rule\n * (src/i18n/languages.ts), restated here because that module loads the seven catalogues\n * and the page must stay a few kilobytes: exact first, ignoring case and reading `_` as\n * `-`; then by language, so every German is `de-CH`, every Chinese `zh` (Simplified),\n * and any regional form its base (`fr-CA` → `fr`).\n */\nfunction kitLanguageOf(tag: unknown): PayPageLanguage | undefined {\n if (typeof tag !== \"string\") return undefined;\n const clean = tag.trim().replace(/_/g, \"-\");\n if (!clean) return undefined;\n const lower = clean.toLowerCase();\n const exact = PAY_PAGE_LANGUAGES.find((code) => code.toLowerCase() === lower);\n if (exact) return exact;\n const language = lower.split(\"-\")[0];\n return PAY_PAGE_LANGUAGES.find((code) => code.split(\"-\")[0].toLowerCase() === language);\n}\n\n/**\n * The kit's locale → Paddle's checkout locale: `de-CH` → `de`, `zh` → `zh-Hans`, `hu` →\n * `en` (Paddle has no Hungarian), the others as they are. Any tag is read as the kit\n * reads it (`de-AT` is the one German, `zh-TW` the one Chinese); one the kit doesn't\n * ship is English, and so is `undefined` (0.33.1) — `useKitLocale()` with no provider\n * locale.\n */\nexport function paddleLocale(kitLocale: string | undefined): string {\n return PADDLE_LOCALES[kitLanguageOf(kitLocale) ?? \"en\"];\n}\n\n/**\n * The checkout's `{url}` with the buyer's language: `lang=<kit locale>` on a pay page\n * link (one that carries `_ptxn`); any other URL — a hosted checkout's, which takes its\n * own `locale` — unchanged, as is a locale the kit doesn't ship.\n *\n * const { url } = await api.checkout({ plan, interval, currency });\n * noteCheckoutStarted(user.id, overview);\n * window.location.assign(payPageUrl(url, locale)); // locale = useKitLocale()\n *\n * `locale` may be `undefined` (0.33.1, keksdose): `useKitLocale()` answers that with no\n * provider locale, the runtime's language. The link then goes without `lang`, and the\n * page speaks the browser's language, else English — what a missing or wrong `lang`\n * already did: it costs nothing but the language.\n */\nexport function payPageUrl(checkoutUrl: string, locale: string | undefined): string {\n const language = kitLanguageOf(locale);\n if (!language) return checkoutUrl;\n let url: URL;\n try {\n url = new URL(checkoutUrl);\n } catch {\n return checkoutUrl;\n }\n if (!url.searchParams.has(PAY_PAGE_TRANSACTION_PARAM)) return checkoutUrl;\n url.searchParams.set(PAY_PAGE_LANG_PARAM, language);\n return url.toString();\n}\n\n/**\n * The language the page speaks: its `lang` parameter, else the browser's languages in\n * their order, each matched to the kit's; else English. @internal\n */\nexport function payPageLanguage(\n lang: string | null | undefined,\n browserLanguages: readonly string[] = [],\n): PayPageLanguage {\n for (const candidate of [lang, ...browserLanguages]) {\n const found = kitLanguageOf(candidate);\n if (found) return found;\n }\n return \"en\";\n}\n\n/* ── The page's words ──────────────────────────────────────────────────────── */\n\n/**\n * The page's words in one language — built into `pay.js` at the kit's build from the\n * seven catalogues, since the page has no React and no provider. @internal\n */\nexport interface PayPageStrings {\n /** `billing.payOpening`, while the checkout opens. */\n opening: string;\n /** `billing.payNothing`: no `_ptxn`, or no token (billing off). */\n nothing: string;\n /** `billing.payFailed`: Paddle.js didn't load, or the configuration is wrong. */\n failed: string;\n /** `billing.payBack`: the buyer closed the checkout. */\n closed: string;\n /** `common.back`: the link to the app's subscription page. */\n back: string;\n /** `legal.links.terms` and `legal.links.privacy`: the footer's links. */\n terms: string;\n privacy: string;\n /** `legal.navLabel`: the footer's `<nav>`. */\n legal: string;\n}\n\n/** The page's words, read from one of the kit's catalogues. @internal */\nexport function payPageStrings(labels: UiKitLabels): PayPageStrings {\n return {\n opening: labels.billing.payOpening,\n nothing: labels.billing.payNothing,\n failed: labels.billing.payFailed,\n closed: labels.billing.payBack,\n back: labels.common.back,\n terms: labels.legal.links.terms,\n privacy: labels.legal.links.privacy,\n legal: labels.legal.navLabel,\n };\n}\n\n/* ── pay-config.json ───────────────────────────────────────────────────────── */\n\n/** The configuration file beside the page, written at each app's web build. @internal */\nexport const PAY_CONFIG_FILE = \"pay-config.json\";\n\n/**\n * `pay-config.json`: what the page needs that differs per app and deployment. Read by\n * the page from its own origin — never from the query, where Paddle's own links (it\n * puts only `_ptxn` there) would lack it and a return URL would be an open redirect on\n * an approved payment domain. @internal\n */\nexport interface PayPageConfig {\n /** Paddle's client-side token (`test_…` for the sandbox, `live_…` for live); null\n * while billing is off, and the page says `payNothing`. */\n token: string | null;\n environment: PaddleEnvironment | null;\n /** The app's subscription page. Paddle.js's `successUrl` is\n * `checkoutReturnUrl(returnUrl)`; \"Back\" goes here. */\n returnUrl: string;\n appName: string;\n termsUrl: string;\n privacyUrl: string;\n}\n\n/** Paddle's client-side token prefixes, per environment. */\nconst TOKEN_PREFIX: Readonly<Record<PaddleEnvironment, string>> = { sandbox: \"test_\", live: \"live_\" };\n\n/** `https://`, or `http://` on this machine only (`localhost`, `127.0.0.1`, `[::1]`). */\nfunction isPageUrl(value: unknown): boolean {\n if (typeof value !== \"string\") return false;\n let url: URL;\n try {\n url = new URL(value);\n } catch {\n return false;\n }\n if (url.protocol === \"https:\") return true;\n return url.protocol === \"http:\" && [\"localhost\", \"127.0.0.1\", \"[::1]\"].includes(url.hostname);\n}\n\n/**\n * What is wrong with a `pay-config.json`, one line each — `[]` when nothing is. The\n * build script refuses to write a file with any (so a wrong pairing fails the build,\n * not a buyer), and the page says `payFailed` for one it reads:\n *\n * - a token whose prefix disagrees with the environment (`test_` ↔ sandbox, `live_` ↔\n * live), or a token without an environment;\n * - a return, terms or privacy URL that isn't `https://` (`http://` for localhost only);\n * - no app name. @internal\n */\nexport function payPageConfigProblems(config: unknown): string[] {\n if (typeof config !== \"object\" || config === null) return [\"the configuration is not an object\"];\n const c = config as Record<string, unknown>;\n const problems: string[] = [];\n const { token, environment } = c;\n if (environment !== null && environment !== undefined && environment !== \"sandbox\" && environment !== \"live\") {\n problems.push(`environment must be \"sandbox\" or \"live\", not ${JSON.stringify(environment)}`);\n }\n if (token !== null && token !== undefined) {\n if (typeof token !== \"string\" || token === \"\") {\n problems.push(\"token must be Paddle's client-side token, or null while billing is off\");\n } else if (environment !== \"sandbox\" && environment !== \"live\") {\n problems.push(\"a token needs its environment: sandbox or live\");\n } else if (!token.startsWith(TOKEN_PREFIX[environment]) || token.length === TOKEN_PREFIX[environment].length) {\n const other = environment === \"sandbox\" ? \"live\" : \"sandbox\";\n problems.push(\n token.startsWith(TOKEN_PREFIX[other])\n ? `the token is a ${other} token (${TOKEN_PREFIX[other]}…), but the environment is ${environment}`\n : `a ${environment} token starts with ${TOKEN_PREFIX[environment]}`,\n );\n }\n }\n for (const key of [\"returnUrl\", \"termsUrl\", \"privacyUrl\"] as const) {\n if (!isPageUrl(c[key])) problems.push(`${key} must be an https:// URL (http:// for localhost only)`);\n }\n if (typeof c.appName !== \"string\" || c.appName.trim() === \"\") problems.push(\"appName is missing\");\n return problems;\n}\n\n/** Paddle.js's `successUrl` for a configuration: the way back, `?checkout=done`. @internal */\nexport function paySuccessUrl(config: Pick<PayPageConfig, \"returnUrl\">): string {\n return checkoutReturnUrl(config.returnUrl);\n}\n"],"mappings":";AACA,SAAS,yBAAyB;AAwB3B,MAAM,sBAAsB;AAGnC,MAAM,qBAAqB,CAAC,SAAS,MAAM,MAAM,MAAM,MAAM,MAAM,IAAI;AAYvE,MAAM,iBAA4D;AAAA,EAChE,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAGO,MAAM,6BAA6B;AAS1C,SAAS,cAAc,KAA2C;AAChE,MAAI,OAAO,QAAQ,SAAU,QAAO;AACpC,QAAM,QAAQ,IAAI,KAAK,EAAE,QAA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