@wildo-ai/saas-frontend-lib 1.1.17 → 1.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +114 -26
- package/LICENSE.enterprise +129 -0
- package/dist/esm/companion-exports.d.ts +5 -2
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/companion-exports.js +4 -2
- package/dist/esm/companion-exports.js.map +1 -1
- package/dist/esm/components/actions/action-bar.d.ts +16 -1
- package/dist/esm/components/actions/action-bar.d.ts.map +1 -1
- package/dist/esm/components/actions/action-bar.js.map +1 -1
- package/dist/esm/components/app/AppLayout_AuthenticatedRoute.d.ts.map +1 -1
- package/dist/esm/components/app/AppLayout_AuthenticatedRoute.js +6 -14
- package/dist/esm/components/app/AppLayout_AuthenticatedRoute.js.map +1 -1
- package/dist/esm/components/app/AppLayout_DecisionInbox.d.ts.map +1 -1
- package/dist/esm/components/app/AppLayout_DecisionInbox.js +2 -4
- package/dist/esm/components/app/AppLayout_DecisionInbox.js.map +1 -1
- package/dist/esm/components/app/AppLayout_Home.d.ts.map +1 -1
- package/dist/esm/components/app/AppLayout_Home.js +14 -7
- package/dist/esm/components/app/AppLayout_Home.js.map +1 -1
- package/dist/esm/components/app/AppLayout_IdentityPortalContainer.d.ts +13 -0
- package/dist/esm/components/app/AppLayout_IdentityPortalContainer.d.ts.map +1 -0
- package/dist/esm/components/app/AppLayout_IdentityPortalContainer.js +16 -0
- package/dist/esm/components/app/AppLayout_IdentityPortalContainer.js.map +1 -0
- package/dist/esm/components/app/DecisionInboxSection.d.ts +10 -0
- package/dist/esm/components/app/DecisionInboxSection.d.ts.map +1 -0
- package/dist/esm/components/app/DecisionInboxSection.js +15 -0
- package/dist/esm/components/app/DecisionInboxSection.js.map +1 -0
- package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.d.ts +13 -0
- package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.d.ts.map +1 -0
- package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.js +28 -0
- package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.js.map +1 -0
- package/dist/esm/components/app/IdentityPortalPage_Home.d.ts +10 -0
- package/dist/esm/components/app/IdentityPortalPage_Home.d.ts.map +1 -0
- package/dist/esm/components/app/IdentityPortalPage_Home.js +40 -0
- package/dist/esm/components/app/IdentityPortalPage_Home.js.map +1 -0
- package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.d.ts +16 -0
- package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.d.ts.map +1 -0
- package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.js +41 -0
- package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.js.map +1 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.d.ts +15 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.d.ts.map +1 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.js +268 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.js.map +1 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.d.ts +3 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.d.ts.map +1 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.js +35 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.js.map +1 -0
- package/dist/esm/components/auth/Auth_Main.d.ts.map +1 -1
- package/dist/esm/components/auth/Auth_Main.js +5 -0
- package/dist/esm/components/auth/Auth_Main.js.map +1 -1
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.d.ts +19 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.d.ts.map +1 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.js +156 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.js.map +1 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.d.ts +3 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.d.ts.map +1 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.js +107 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.js.map +1 -0
- package/dist/esm/components/auth/StepUpAuthDialog.d.ts +31 -10
- package/dist/esm/components/auth/StepUpAuthDialog.d.ts.map +1 -1
- package/dist/esm/components/auth/StepUpAuthDialog.js +81 -17
- package/dist/esm/components/auth/StepUpAuthDialog.js.map +1 -1
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.d.ts.map +1 -1
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.js +19 -0
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.js.map +1 -1
- package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.d.ts +11 -0
- package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.d.ts.map +1 -0
- package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.js +25 -0
- package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.js.map +1 -0
- package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.d.ts +11 -0
- package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.d.ts.map +1 -0
- package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.js +25 -0
- package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.js.map +1 -0
- package/dist/esm/components/billing/billing-pricing-table.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-pricing-table.js +40 -7
- package/dist/esm/components/billing/billing-pricing-table.js.map +1 -1
- package/dist/esm/components/billing/billing-subscription-status.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-subscription-status.js +9 -1
- package/dist/esm/components/billing/billing-subscription-status.js.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.js +3 -2
- package/dist/esm/components/billing/billing-usage-dashboard.js.map +1 -1
- package/dist/esm/components/data-display/AutomaticDisplayer.d.ts.map +1 -1
- package/dist/esm/components/data-display/AutomaticDisplayer.js +7 -2
- package/dist/esm/components/data-display/AutomaticDisplayer.js.map +1 -1
- package/dist/esm/components/data-display/DisplayField.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayField.js +67 -45
- package/dist/esm/components/data-display/DisplayField.js.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldEditable.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldEditable.js +4 -1
- package/dist/esm/components/data-display/DisplayFieldEditable.js.map +1 -1
- package/dist/esm/components/data-display/DisplayValueDispatcher.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayValueDispatcher.js +16 -6
- package/dist/esm/components/data-display/DisplayValueDispatcher.js.map +1 -1
- package/dist/esm/components/data-display/ResourceAutomaticDisplayer.d.ts.map +1 -1
- package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js +3 -1
- package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js.map +1 -1
- package/dist/esm/components/feedback/empty-state-marker.d.ts +16 -0
- package/dist/esm/components/feedback/empty-state-marker.d.ts.map +1 -0
- package/dist/esm/components/feedback/empty-state-marker.js +16 -0
- package/dist/esm/components/feedback/empty-state-marker.js.map +1 -0
- package/dist/esm/components/feedback/empty-state.d.ts.map +1 -1
- package/dist/esm/components/feedback/empty-state.js +2 -1
- package/dist/esm/components/feedback/empty-state.js.map +1 -1
- package/dist/esm/components/feedback/features/feature-unavailable-prompt.d.ts +7 -1
- package/dist/esm/components/feedback/features/feature-unavailable-prompt.d.ts.map +1 -1
- package/dist/esm/components/feedback/features/feature-unavailable-prompt.js +8 -2
- package/dist/esm/components/feedback/features/feature-unavailable-prompt.js.map +1 -1
- package/dist/esm/components/feedback/resource-empty-state.d.ts.map +1 -1
- package/dist/esm/components/feedback/resource-empty-state.js +2 -1
- package/dist/esm/components/feedback/resource-empty-state.js.map +1 -1
- package/dist/esm/components/flows-actors/approval.d.ts +25 -1
- package/dist/esm/components/flows-actors/approval.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/approval.js +14 -9
- package/dist/esm/components/flows-actors/approval.js.map +1 -1
- package/dist/esm/components/flows-actors/approval.labels.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/approval.labels.js +30 -0
- package/dist/esm/components/flows-actors/approval.labels.js.map +1 -1
- package/dist/esm/components/flows-actors/flow-node.labels.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/flow-node.labels.js +4 -1
- package/dist/esm/components/flows-actors/flow-node.labels.js.map +1 -1
- package/dist/esm/components/flows-actors/flow-step-visuals.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/flow-step-visuals.js +8 -2
- package/dist/esm/components/flows-actors/flow-step-visuals.js.map +1 -1
- package/dist/esm/components/flows-actors/human-decision-form.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/human-decision-form.js +4 -1
- package/dist/esm/components/flows-actors/human-decision-form.js.map +1 -1
- package/dist/esm/components/form/Form.d.ts +2 -0
- package/dist/esm/components/form/Form.d.ts.map +1 -1
- package/dist/esm/components/form/Form.js +1 -0
- package/dist/esm/components/form/Form.js.map +1 -1
- package/dist/esm/components/form/automated/AutomatedArrayField.d.ts.map +1 -1
- package/dist/esm/components/form/automated/AutomatedArrayField.js +7 -4
- package/dist/esm/components/form/automated/AutomatedArrayField.js.map +1 -1
- package/dist/esm/components/form/automated/AutosaveContext.d.ts.map +1 -1
- package/dist/esm/components/form/automated/AutosaveContext.js +8 -0
- package/dist/esm/components/form/automated/AutosaveContext.js.map +1 -1
- package/dist/esm/components/form/automated/FormField.d.ts +5 -3
- package/dist/esm/components/form/automated/FormField.d.ts.map +1 -1
- package/dist/esm/components/form/automated/FormField.js +38 -13
- package/dist/esm/components/form/automated/FormField.js.map +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts.map +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.js +31 -18
- package/dist/esm/components/form/automated/ResourceAutomatedForm.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.d.ts +1 -1
- package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.js +1 -1
- package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.js.map +1 -1
- package/dist/esm/components/form/validation-errors/form-validation.d.ts +5 -7
- package/dist/esm/components/form/validation-errors/form-validation.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/form-validation.js +7 -22
- package/dist/esm/components/form/validation-errors/form-validation.js.map +1 -1
- package/dist/esm/components/form/validation-errors/getFieldError.d.ts +25 -2
- package/dist/esm/components/form/validation-errors/getFieldError.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/getFieldError.js +29 -2
- package/dist/esm/components/form/validation-errors/getFieldError.js.map +1 -1
- package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.d.ts +5 -0
- package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.js +3 -0
- package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.js.map +1 -1
- package/dist/esm/components/form/validation-errors/save-attempt.d.ts +9 -0
- package/dist/esm/components/form/validation-errors/save-attempt.d.ts.map +1 -0
- package/dist/esm/components/form/validation-errors/save-attempt.js +42 -0
- package/dist/esm/components/form/validation-errors/save-attempt.js.map +1 -0
- package/dist/esm/components/form/validation-errors/unstarted-field-visit.d.ts +3 -1
- package/dist/esm/components/form/validation-errors/unstarted-field-visit.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/unstarted-field-visit.js +3 -1
- package/dist/esm/components/form/validation-errors/unstarted-field-visit.js.map +1 -1
- package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.d.ts +2 -2
- package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.js +3 -0
- package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js +5 -3
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts +19 -0
- package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_DangerZone.js +47 -11
- package/dist/esm/components/resources/ResourceLayout_DangerZone.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_InsertedViews.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_InsertedViews.js +17 -7
- package/dist/esm/components/resources/ResourceLayout_InsertedViews.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_List.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_List.js +13 -6
- package/dist/esm/components/resources/ResourceLayout_List.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.d.ts +1 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Search.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Search.js +12 -8
- package/dist/esm/components/resources/ResourceLayout_Search.js.map +1 -1
- package/dist/esm/components/resources/ResourceOwnedViewEmbeds.d.ts +1 -1
- package/dist/esm/components/resources/ResourceOwnedViewEmbeds.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceOwnedViewEmbeds.js +11 -4
- package/dist/esm/components/resources/ResourceOwnedViewEmbeds.js.map +1 -1
- package/dist/esm/components/resources/embeds/RelatedResourceSections.d.ts +1 -1
- package/dist/esm/components/resources/embeds/RelatedResourceSections.js.map +1 -1
- package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts +5 -5
- package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts.map +1 -1
- package/dist/esm/components/resources/embeds/ResourceEmbeds.js +21 -14
- package/dist/esm/components/resources/embeds/ResourceEmbeds.js.map +1 -1
- package/dist/esm/components/resources/skeleton/DisplayLayout.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/DisplayLayout.js +40 -4
- package/dist/esm/components/resources/skeleton/DisplayLayout.js.map +1 -1
- package/dist/esm/components/resources/skeleton/FormLayout.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/FormLayout.js +22 -6
- package/dist/esm/components/resources/skeleton/FormLayout.js.map +1 -1
- package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.d.ts +1 -1
- package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.js +1 -1
- package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.js.map +1 -1
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.d.ts +21 -1
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.js +53 -9
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.js.map +1 -1
- package/dist/esm/components/settings/SettingsHub.d.ts +15 -0
- package/dist/esm/components/settings/SettingsHub.d.ts.map +1 -1
- package/dist/esm/components/settings/SettingsHub.js +14 -4
- package/dist/esm/components/settings/SettingsHub.js.map +1 -1
- package/dist/esm/components/views/chart-dashboard/ChartDashboard.d.ts +3 -2
- package/dist/esm/components/views/chart-dashboard/ChartDashboard.d.ts.map +1 -1
- package/dist/esm/components/views/chart-dashboard/ChartDashboard.js +4 -3
- package/dist/esm/components/views/chart-dashboard/ChartDashboard.js.map +1 -1
- package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.d.ts +1 -1
- package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.d.ts.map +1 -1
- package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.js.map +1 -1
- package/dist/esm/components/views/chart-view/ChartKpiFigure.d.ts +33 -0
- package/dist/esm/components/views/chart-view/ChartKpiFigure.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartKpiFigure.js +63 -4
- package/dist/esm/components/views/chart-view/ChartKpiFigure.js.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.js +33 -7
- package/dist/esm/components/views/chart-view/ChartView.js.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.labels.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.labels.js +69 -3
- package/dist/esm/components/views/chart-view/ChartView.labels.js.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.lazy.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.lazy.js +2 -1
- package/dist/esm/components/views/chart-view/ChartView.lazy.js.map +1 -1
- package/dist/esm/components/views/chart-view/ChartWidget.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartWidget.js +12 -4
- package/dist/esm/components/views/chart-view/ChartWidget.js.map +1 -1
- package/dist/esm/components/views/chart-view/chart-export.utils.d.ts +8 -0
- package/dist/esm/components/views/chart-view/chart-export.utils.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/chart-export.utils.js +15 -25
- package/dist/esm/components/views/chart-view/chart-export.utils.js.map +1 -1
- package/dist/esm/components/views/chart-view/chart-view-defaults.d.ts +6 -0
- package/dist/esm/components/views/chart-view/chart-view-defaults.d.ts.map +1 -0
- package/dist/esm/components/views/chart-view/chart-view-defaults.js +6 -0
- package/dist/esm/components/views/chart-view/chart-view-defaults.js.map +1 -0
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.d.ts +35 -9
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.js +69 -21
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.js +6 -7
- package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/composed.builder.js +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/composed.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.js +2 -2
- package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.d.ts +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.js +7 -7
- package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.d.ts +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.js +6 -8
- package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.js +4 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.js +13 -13
- package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/useResourceChartData.d.ts +1 -1
- package/dist/esm/components/views/chart-view/useResourceChartData.js +1 -1
- package/dist/esm/components/views/chart-view/useResourceChartData.js.map +1 -1
- package/dist/esm/components/views/composite-view/CompositeView.d.ts +6 -0
- package/dist/esm/components/views/composite-view/CompositeView.d.ts.map +1 -1
- package/dist/esm/components/views/composite-view/CompositeView.js +6 -2
- package/dist/esm/components/views/composite-view/CompositeView.js.map +1 -1
- package/dist/esm/components/views/execution-view/ExecutionView.d.ts +7 -0
- package/dist/esm/components/views/execution-view/ExecutionView.d.ts.map +1 -1
- package/dist/esm/components/views/execution-view/ExecutionView.js +11 -1
- package/dist/esm/components/views/execution-view/ExecutionView.js.map +1 -1
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.d.ts +7 -0
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.d.ts.map +1 -1
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.js +6 -2
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.js.map +1 -1
- package/dist/esm/components/views/full-custom-view/FullCustomView.d.ts +7 -0
- package/dist/esm/components/views/full-custom-view/FullCustomView.d.ts.map +1 -1
- package/dist/esm/components/views/full-custom-view/FullCustomView.js +8 -3
- package/dist/esm/components/views/full-custom-view/FullCustomView.js.map +1 -1
- package/dist/esm/components/views/onboarding-view/OnboardingView.d.ts +7 -0
- package/dist/esm/components/views/onboarding-view/OnboardingView.d.ts.map +1 -1
- package/dist/esm/components/views/onboarding-view/OnboardingView.js +11 -1
- package/dist/esm/components/views/onboarding-view/OnboardingView.js.map +1 -1
- package/dist/esm/core/app-shell/AppShellBuildingBlocks.d.ts +2 -2
- package/dist/esm/core/app-shell/AppShellBuildingBlocks.js +2 -2
- package/dist/esm/core/app-shell/AppShellBuildingBlocks.js.map +1 -1
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.d.ts +4 -4
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js +3 -3
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js.map +1 -1
- package/dist/esm/core/app-shell/useIdentityPortalShellLayout.d.ts +45 -0
- package/dist/esm/core/app-shell/useIdentityPortalShellLayout.d.ts.map +1 -0
- package/dist/esm/core/app-shell/useIdentityPortalShellLayout.js +72 -0
- package/dist/esm/core/app-shell/useIdentityPortalShellLayout.js.map +1 -0
- package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.d.ts +4 -3
- package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.js +4 -3
- package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.js.map +1 -1
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.d.ts +15 -8
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.js +22 -21
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.js.map +1 -1
- package/dist/esm/core/billing/BillingContext.d.ts +27 -4
- package/dist/esm/core/billing/BillingContext.d.ts.map +1 -1
- package/dist/esm/core/billing/BillingContext.js +61 -2
- package/dist/esm/core/billing/BillingContext.js.map +1 -1
- package/dist/esm/core/billing/useBillingAction.d.ts.map +1 -1
- package/dist/esm/core/billing/useBillingAction.js +3 -2
- package/dist/esm/core/billing/useBillingAction.js.map +1 -1
- package/dist/esm/core/components-registry/RegisteredComponentRoot.d.ts +19 -0
- package/dist/esm/core/components-registry/RegisteredComponentRoot.d.ts.map +1 -0
- package/dist/esm/core/components-registry/RegisteredComponentRoot.js +23 -0
- package/dist/esm/core/components-registry/RegisteredComponentRoot.js.map +1 -0
- package/dist/esm/core/components-registry/register-framework-layouts.d.ts.map +1 -1
- package/dist/esm/core/components-registry/register-framework-layouts.js +4 -0
- package/dist/esm/core/components-registry/register-framework-layouts.js.map +1 -1
- package/dist/esm/core/config/app-configuration-frontend.schemas.d.ts +159 -0
- package/dist/esm/core/config/app-configuration-frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/app-configuration-frontend.schemas.js +68 -3
- package/dist/esm/core/config/app-configuration-frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/app-level-components.frontend.schemas.d.ts +2 -2
- package/dist/esm/core/config/app-level-components.frontend.schemas.js +2 -2
- package/dist/esm/core/config/app-level-components.frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/chart-view.frontend.schemas.d.ts +59 -18
- package/dist/esm/core/config/chart-view.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/chart-view.frontend.schemas.js +42 -7
- package/dist/esm/core/config/chart-view.frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/composite-view.schemas.d.ts +8 -1
- package/dist/esm/core/config/composite-view.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/composite-view.schemas.js +1 -0
- package/dist/esm/core/config/composite-view.schemas.js.map +1 -1
- package/dist/esm/core/config/decision-inbox-capability.frontend.utils.d.ts +1 -1
- package/dist/esm/core/config/decision-inbox-capability.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/config/decision-inbox-capability.frontend.utils.js +1 -1
- package/dist/esm/core/config/decision-inbox-capability.frontend.utils.js.map +1 -1
- package/dist/esm/core/config/engine-settings-destinations.d.ts +6 -0
- package/dist/esm/core/config/engine-settings-destinations.d.ts.map +1 -1
- package/dist/esm/core/config/engine-settings-destinations.js +12 -0
- package/dist/esm/core/config/engine-settings-destinations.js.map +1 -1
- package/dist/esm/core/config/execution-view.schemas.d.ts +1 -1
- package/dist/esm/core/config/execution-view.schemas.js.map +1 -1
- package/dist/esm/core/config/identity-portal-settings.frontend.d.ts +17 -0
- package/dist/esm/core/config/identity-portal-settings.frontend.d.ts.map +1 -0
- package/dist/esm/core/config/identity-portal-settings.frontend.js +64 -0
- package/dist/esm/core/config/identity-portal-settings.frontend.js.map +1 -0
- package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts +8 -8
- package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/launcher-items.frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/settings-hub-gating.frontend.utils.d.ts +1 -1
- package/dist/esm/core/config/settings-hub-gating.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/config/settings-hub-gating.frontend.utils.js +1 -1
- package/dist/esm/core/config/settings-hub-gating.frontend.utils.js.map +1 -1
- package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts +17 -6
- package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/settings-hub.frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/useSettingsHubConfig.d.ts.map +1 -1
- package/dist/esm/core/config/useSettingsHubConfig.js +1 -0
- package/dist/esm/core/config/useSettingsHubConfig.js.map +1 -1
- package/dist/esm/core/config/useVisibleSettingsHubConfig.d.ts +7 -0
- package/dist/esm/core/config/useVisibleSettingsHubConfig.d.ts.map +1 -1
- package/dist/esm/core/config/useVisibleSettingsHubConfig.js +9 -1
- package/dist/esm/core/config/useVisibleSettingsHubConfig.js.map +1 -1
- package/dist/esm/core/config/verify-launcher-content.d.ts +7 -1
- package/dist/esm/core/config/verify-launcher-content.d.ts.map +1 -1
- package/dist/esm/core/config/verify-launcher-content.js +31 -0
- package/dist/esm/core/config/verify-launcher-content.js.map +1 -1
- package/dist/esm/core/errors/GlobalErrorHandler.d.ts.map +1 -1
- package/dist/esm/core/errors/GlobalErrorHandler.js +10 -0
- package/dist/esm/core/errors/GlobalErrorHandler.js.map +1 -1
- package/dist/esm/core/errors/backend-refusal.frontend.d.ts +1 -1
- package/dist/esm/core/errors/backend-refusal.frontend.d.ts.map +1 -1
- package/dist/esm/core/errors/backend-refusal.frontend.js.map +1 -1
- package/dist/esm/core/events/NotificationContext.d.ts.map +1 -1
- package/dist/esm/core/events/NotificationContext.js +19 -2
- package/dist/esm/core/events/NotificationContext.js.map +1 -1
- package/dist/esm/core/events/notification-display-policy.frontend.schemas.d.ts +21 -2
- package/dist/esm/core/events/notification-display-policy.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/events/notification-display-policy.frontend.schemas.js +25 -4
- package/dist/esm/core/events/notification-display-policy.frontend.schemas.js.map +1 -1
- package/dist/esm/core/execution/useExecution.d.ts +3 -3
- package/dist/esm/core/execution/useExecution.js.map +1 -1
- package/dist/esm/core/external-providers/ConsentBasedProviderSdks.d.ts +1 -1
- package/dist/esm/core/external-providers/ConsentBasedProviderSdks.js +1 -1
- package/dist/esm/core/external-providers/ConsentBasedProviderSdks.js.map +1 -1
- package/dist/esm/core/features/FeatureGate.d.ts +13 -1
- package/dist/esm/core/features/FeatureGate.d.ts.map +1 -1
- package/dist/esm/core/features/FeatureGate.js +6 -1
- package/dist/esm/core/features/FeatureGate.js.map +1 -1
- package/dist/esm/core/features/InPlaceFeatureLock.d.ts +28 -0
- package/dist/esm/core/features/InPlaceFeatureLock.d.ts.map +1 -0
- package/dist/esm/core/features/InPlaceFeatureLock.js +49 -0
- package/dist/esm/core/features/InPlaceFeatureLock.js.map +1 -0
- package/dist/esm/core/features/PlanRefusalPrompt.d.ts +12 -0
- package/dist/esm/core/features/PlanRefusalPrompt.d.ts.map +1 -0
- package/dist/esm/core/features/PlanRefusalPrompt.js +90 -0
- package/dist/esm/core/features/PlanRefusalPrompt.js.map +1 -0
- package/dist/esm/core/features/RequiredFeaturesGate.d.ts +39 -0
- package/dist/esm/core/features/RequiredFeaturesGate.d.ts.map +1 -0
- package/dist/esm/core/features/RequiredFeaturesGate.js +51 -0
- package/dist/esm/core/features/RequiredFeaturesGate.js.map +1 -0
- package/dist/esm/core/features/feature-unavailability.frontend.utils.d.ts +6 -0
- package/dist/esm/core/features/feature-unavailability.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/features/feature-unavailability.frontend.utils.js +27 -10
- package/dist/esm/core/features/feature-unavailability.frontend.utils.js.map +1 -1
- package/dist/esm/core/features/plan-refusal.frontend.d.ts +43 -0
- package/dist/esm/core/features/plan-refusal.frontend.d.ts.map +1 -0
- package/dist/esm/core/features/plan-refusal.frontend.js +67 -0
- package/dist/esm/core/features/plan-refusal.frontend.js.map +1 -0
- package/dist/esm/core/features/required-features-gate-presentation.d.ts +21 -0
- package/dist/esm/core/features/required-features-gate-presentation.d.ts.map +1 -0
- package/dist/esm/core/features/required-features-gate-presentation.js +26 -0
- package/dist/esm/core/features/required-features-gate-presentation.js.map +1 -0
- package/dist/esm/core/features/useFeatureAvailability.d.ts.map +1 -1
- package/dist/esm/core/features/useFeatureAvailability.js +4 -0
- package/dist/esm/core/features/useFeatureAvailability.js.map +1 -1
- package/dist/esm/core/features/useOperationFeatureAvailability.d.ts +2 -0
- package/dist/esm/core/features/useOperationFeatureAvailability.d.ts.map +1 -1
- package/dist/esm/core/features/useOperationFeatureAvailability.js +6 -1
- package/dist/esm/core/features/useOperationFeatureAvailability.js.map +1 -1
- package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts +11 -0
- package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts.map +1 -1
- package/dist/esm/core/flows-actors/FlowsActorsContext.js +117 -3
- package/dist/esm/core/flows-actors/FlowsActorsContext.js.map +1 -1
- package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.d.ts.map +1 -1
- package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.js +3 -1
- package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.js.map +1 -1
- package/dist/esm/core/navigation/NavigationContentAreas.d.ts.map +1 -1
- package/dist/esm/core/navigation/NavigationContentAreas.js +28 -9
- package/dist/esm/core/navigation/NavigationContentAreas.js.map +1 -1
- package/dist/esm/{components/views/chart-dashboard/chart-dashboard.utils.d.ts → core/navigation/chart-read-gate.d.ts} +11 -7
- package/dist/esm/core/navigation/chart-read-gate.d.ts.map +1 -0
- package/dist/esm/{components/views/chart-dashboard/chart-dashboard.utils.js → core/navigation/chart-read-gate.js} +27 -11
- package/dist/esm/core/navigation/chart-read-gate.js.map +1 -0
- package/dist/esm/core/navigation/home-resolution.d.ts +36 -0
- package/dist/esm/core/navigation/home-resolution.d.ts.map +1 -0
- package/dist/esm/core/navigation/home-resolution.js +46 -0
- package/dist/esm/core/navigation/home-resolution.js.map +1 -0
- package/dist/esm/core/navigation/launcher-resolution.d.ts +2 -34
- package/dist/esm/core/navigation/launcher-resolution.d.ts.map +1 -1
- package/dist/esm/core/navigation/launcher-resolution.js +13 -18
- package/dist/esm/core/navigation/launcher-resolution.js.map +1 -1
- package/dist/esm/core/navigation/launcher-runtime-availability.d.ts +1 -1
- package/dist/esm/core/navigation/launcher-runtime-availability.d.ts.map +1 -1
- package/dist/esm/core/navigation/launcher-runtime-availability.js +7 -2
- package/dist/esm/core/navigation/launcher-runtime-availability.js.map +1 -1
- package/dist/esm/core/navigation/primary-destination-layout.d.ts +2 -2
- package/dist/esm/core/navigation/primary-destination-layout.d.ts.map +1 -1
- package/dist/esm/core/navigation/primary-destination-layout.js +1 -1
- package/dist/esm/core/navigation/primary-destination-layout.js.map +1 -1
- package/dist/esm/core/navigation/useChartReadDecision.d.ts +26 -0
- package/dist/esm/core/navigation/useChartReadDecision.d.ts.map +1 -0
- package/dist/esm/core/navigation/useChartReadDecision.js +58 -0
- package/dist/esm/core/navigation/useChartReadDecision.js.map +1 -0
- package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.d.ts +1 -1
- package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.d.ts.map +1 -1
- package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.js.map +1 -1
- package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.d.ts +1 -1
- package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.d.ts.map +1 -1
- package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.js.map +1 -1
- package/dist/esm/core/navigation/view-title-resolution.d.ts +21 -0
- package/dist/esm/core/navigation/view-title-resolution.d.ts.map +1 -1
- package/dist/esm/core/navigation/view-title-resolution.js +25 -0
- package/dist/esm/core/navigation/view-title-resolution.js.map +1 -1
- package/dist/esm/core/navigation/viewer-field-reader.d.ts +81 -0
- package/dist/esm/core/navigation/viewer-field-reader.d.ts.map +1 -0
- package/dist/esm/core/navigation/viewer-field-reader.js +113 -0
- package/dist/esm/core/navigation/viewer-field-reader.js.map +1 -0
- package/dist/esm/core/navigation/viewer-roles.d.ts +40 -0
- package/dist/esm/core/navigation/viewer-roles.d.ts.map +1 -0
- package/dist/esm/core/navigation/viewer-roles.js +26 -0
- package/dist/esm/core/navigation/viewer-roles.js.map +1 -0
- package/dist/esm/core/requests/user-interaction-clock.d.ts +32 -0
- package/dist/esm/core/requests/user-interaction-clock.d.ts.map +1 -0
- package/dist/esm/core/requests/user-interaction-clock.js +47 -0
- package/dist/esm/core/requests/user-interaction-clock.js.map +1 -0
- package/dist/esm/core/requests/websockets/WebSocketEventBridge.d.ts.map +1 -1
- package/dist/esm/core/requests/websockets/WebSocketEventBridge.js +2 -0
- package/dist/esm/core/requests/websockets/WebSocketEventBridge.js.map +1 -1
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts +27 -6
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js +30 -7
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js.map +1 -1
- package/dist/esm/core/requests/wildo-http-client.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/requests/wildo-http-client.frontend.service.js +13 -0
- package/dist/esm/core/requests/wildo-http-client.frontend.service.js.map +1 -1
- package/dist/esm/core/resources/hooks/useOperationEnabled.d.ts.map +1 -1
- package/dist/esm/core/resources/hooks/useOperationEnabled.js +4 -0
- package/dist/esm/core/resources/hooks/useOperationEnabled.js.map +1 -1
- package/dist/esm/core/resources/resource-addressability.frontend.utils.d.ts +1 -1
- package/dist/esm/core/resources/resource-addressability.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/resources/resource-addressability.frontend.utils.js.map +1 -1
- package/dist/esm/core/resources/resources-repository.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/resources/resources-repository.frontend.service.js +2 -0
- package/dist/esm/core/resources/resources-repository.frontend.service.js.map +1 -1
- package/dist/esm/core/resources/resources.frontend.schemas.d.ts +29 -23
- package/dist/esm/core/resources/resources.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/resources/resources.frontend.schemas.js +20 -20
- package/dist/esm/core/resources/resources.frontend.schemas.js.map +1 -1
- package/dist/esm/core/resources/rmm/ResourceMutationManager.d.ts.map +1 -1
- package/dist/esm/core/resources/rmm/ResourceMutationManager.js +4 -0
- package/dist/esm/core/resources/rmm/ResourceMutationManager.js.map +1 -1
- package/dist/esm/core/resources/useResourceOperationActions.d.ts.map +1 -1
- package/dist/esm/core/resources/useResourceOperationActions.js +7 -7
- package/dist/esm/core/resources/useResourceOperationActions.js.map +1 -1
- package/dist/esm/core/runtime/AppRouter.d.ts.map +1 -1
- package/dist/esm/core/runtime/AppRouter.js +11 -33
- package/dist/esm/core/runtime/AppRouter.js.map +1 -1
- package/dist/esm/core/runtime/ApplicationMainContext.d.ts +15 -1
- package/dist/esm/core/runtime/ApplicationMainContext.d.ts.map +1 -1
- package/dist/esm/core/runtime/ApplicationMainContext.js +41 -23
- package/dist/esm/core/runtime/ApplicationMainContext.js.map +1 -1
- package/dist/esm/core/runtime/IdentityPortalRouter.d.ts +20 -0
- package/dist/esm/core/runtime/IdentityPortalRouter.d.ts.map +1 -0
- package/dist/esm/core/runtime/IdentityPortalRouter.js +31 -0
- package/dist/esm/core/runtime/IdentityPortalRouter.js.map +1 -0
- package/dist/esm/core/runtime/domain-module.frontend.definitions.d.ts +9 -0
- package/dist/esm/core/runtime/domain-module.frontend.definitions.d.ts.map +1 -1
- package/dist/esm/core/runtime/domain-module.frontend.definitions.js +3 -2
- package/dist/esm/core/runtime/domain-module.frontend.definitions.js.map +1 -1
- package/dist/esm/core/runtime/frontend-companion-resource-inputs.d.ts +21 -0
- package/dist/esm/core/runtime/frontend-companion-resource-inputs.d.ts.map +1 -1
- package/dist/esm/core/runtime/frontend-companion-resource-inputs.js +19 -1
- package/dist/esm/core/runtime/frontend-companion-resource-inputs.js.map +1 -1
- package/dist/esm/core/runtime/identity-routes.d.ts +13 -0
- package/dist/esm/core/runtime/identity-routes.d.ts.map +1 -0
- package/dist/esm/core/runtime/identity-routes.js +50 -0
- package/dist/esm/core/runtime/identity-routes.js.map +1 -0
- package/dist/esm/core/runtime/routes.frontend.definitions.d.ts +19 -0
- package/dist/esm/core/runtime/routes.frontend.definitions.d.ts.map +1 -1
- package/dist/esm/core/runtime/routes.frontend.definitions.js +20 -1
- package/dist/esm/core/runtime/routes.frontend.definitions.js.map +1 -1
- package/dist/esm/core/runtime/runtime.frontend.schemas.d.ts +3 -1
- package/dist/esm/core/runtime/runtime.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/runtime/runtime.frontend.schemas.js +2 -0
- package/dist/esm/core/runtime/runtime.frontend.schemas.js.map +1 -1
- package/dist/esm/core/runtime/start-application.frontend.service.d.ts +7 -0
- package/dist/esm/core/runtime/start-application.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/runtime/start-application.frontend.service.js +4 -2
- package/dist/esm/core/runtime/start-application.frontend.service.js.map +1 -1
- package/dist/esm/core/security/AuthSessionContext.d.ts.map +1 -1
- package/dist/esm/core/security/AuthSessionContext.js +4 -0
- package/dist/esm/core/security/AuthSessionContext.js.map +1 -1
- package/dist/esm/core/security/StepUpAuthContext.d.ts +3 -2
- package/dist/esm/core/security/StepUpAuthContext.d.ts.map +1 -1
- package/dist/esm/core/security/StepUpAuthContext.js +7 -2
- package/dist/esm/core/security/StepUpAuthContext.js.map +1 -1
- package/dist/esm/core/security/federated-reauthentication.frontend.d.ts +13 -2
- package/dist/esm/core/security/federated-reauthentication.frontend.d.ts.map +1 -1
- package/dist/esm/core/security/federated-reauthentication.frontend.js +21 -1
- package/dist/esm/core/security/federated-reauthentication.frontend.js.map +1 -1
- package/dist/esm/core/security/useAuthenticatedRouteEntry.d.ts +24 -0
- package/dist/esm/core/security/useAuthenticatedRouteEntry.d.ts.map +1 -0
- package/dist/esm/core/security/useAuthenticatedRouteEntry.js +37 -0
- package/dist/esm/core/security/useAuthenticatedRouteEntry.js.map +1 -0
- package/dist/esm/core/ui/design-token.utils.d.ts +9 -0
- package/dist/esm/core/ui/design-token.utils.d.ts.map +1 -1
- package/dist/esm/core/ui/design-token.utils.js +24 -3
- package/dist/esm/core/ui/design-token.utils.js.map +1 -1
- package/dist/esm/core/ui/themes/focus-indicator.d.ts +1 -1
- package/dist/esm/core/ui/themes/focus-indicator.js +1 -1
- package/dist/esm/core/ui/themes/focus-indicator.js.map +1 -1
- package/dist/esm/core/ui/ui.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/index.d.ts +14 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +17 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/testing/mock-builders.d.ts +1 -1
- package/dist/esm/testing/mock-builders.d.ts.map +1 -1
- package/dist/esm/testing/mock-builders.js +1 -0
- package/dist/esm/testing/mock-builders.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +9 -6
- package/dist/esm/components/views/chart-dashboard/chart-dashboard.utils.d.ts.map +0 -1
- package/dist/esm/components/views/chart-dashboard/chart-dashboard.utils.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OnboardingView.js","sourceRoot":"","sources":["../../../../../src/components/views/onboarding-view/OnboardingView.tsx"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;AAEH,OAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAChF,OAAO,EAEL,gBAAgB,EAChB,0BAA0B,EAC1B,yCAAyC,GAI1C,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAC/F,OAAO,EAAE,QAAQ,EAAE,MAAM,kDA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;4BACH,KAAC,MAAM,IAAC,OAAO,EAAE,sBAAsB,CAAC,KAAK,EAAE,IAAI,EAAE,UAAU,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,YACpF,UAAU,CAAC,qBAAqB,CAAC,wBAAwB,EAAE,MAAM,CAAC,GAC5D,CACV,EAED,KAAC,MAAM,IAAC,OAAO,EAAE,sBAAsB,CAAC,OAAO,EAAE,IAAI,EAAE,UAAU,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,YACtF,gBAAgB,KAAK,UAAU,GAAG,CAAC;oCAClC,CAAC,CAAC,UAAU,CAAC,qBAAqB,CAAC,wBAAwB,EAAE,UAAU,CAAC;oCACxE,CAAC,CAAC,UAAU,CAAC,qBAAqB,CAAC,wBAAwB,EAAE,MAAM,CAAC,GAC/D,IACL,IACF,CACP,EAGA,UAAU,KAAK,CAAC,IAAI,CACnB,eAAK,SAAS,EAAC,wCAAwC,aACpD,aAAa,CAAC,YAAY,IAAI,CAC7B,KAAC,MAAM,IACL,OAAO,EAAE,sBAAsB,CAAC,KAAK,EACrC,IAAI,EAAE,UAAU,CAAC,EAAE,EACnB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,cAAc,CAAC,GAAG,CAAC,YAE/C,UAAU,CAAC,qBAAqB,CAAC,wBAAwB,EAAE,SAAS,CAAC,GAC/D,CACV,EAED,KAAC,MAAM,IAAC,OAAO,EAAE,sBAAsB,CAAC,OAAO,EAAE,IAAI,EAAE,UAAU,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,YACtF,UAAU,CAAC,qBAAqB,CAAC,wBAAwB,EAAE,UAAU,CAAC,GAChE,IACL,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n * OnboardingView — Wizard-style onboarding view.\n *\n * Renders a sequence of guidance elements (checklist, tour, survey, etc.)\n * with step progression, progress bar, and navigation controls.\n * Integrates with GuidanceContext only when a matching `guidanceFlowRef` is\n * provided and falls back to local transient state when the view is rendered\n * directly from a static onboarding document.\n */\n\nimport React, { useState, useMemo, useCallback, useEffect, useId } from 'react';\nimport {\n OnboardingElementType,\n OnboardingStatus,\n isTerminalOnboardingStatus,\n resolveGuidanceElementRequiredLabelFields,\n type OnboardingElement,\n type OnboardingViewOptions,\n type GuidanceFlowState,\n} from '@wildo-ai/saas-models';\nimport type { OnboardingViewDefinition } from '~wildo-frontend-lib/core/config/onboarding-view.frontend.schemas';\nimport type { GuidanceElementState } from '@wildo-ai/saas-models';\nimport { ButtonSize, FrontendComponentType } from '@wildo-ai/presets-components-models';\nimport { Button, ButtonVariants_Variant } from '~wildo-frontend-lib/components/actions/button';\nimport { Progress } from '~wildo-frontend-lib/components/feedback/progress';\nimport { useGuidance } from '~wildo-frontend-lib/core/guidance/useGuidance';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { resolveGuidanceElementRenderer } from '~wildo-frontend-lib/core/guidance/GuidanceRenderer';\n\n// ─── Props ───────────────────────────────────────────────────\n\nexport interface OnboardingViewProps {\n /** Onboarding document with elements */\n document: OnboardingViewDefinition;\n /** Additional options to override document options */\n options?: Partial<OnboardingViewOptions>;\n /** Custom class name */\n className?: string;\n /** Callback when element status changes */\n onStatusChange?: (elementRef: string, status: OnboardingStatus) => void;\n /** Callback when action is triggered */\n onAction?: (elementRef: string, actionRef?: string) => void;\n /** View reference for i18n/view identity when rendered from a larger document */\n viewRef?: string;\n /**\n * Connects this view to a persisted guidance flow.\n *\n * When provided, dismiss / complete / skip actions are forwarded to\n * `GuidanceContext` and persisted to the backend. Must match a\n * `GuidanceFlowDefinition.ref` registered in the app's guidance config.\n *\n * When omitted, the view operates in local-only mode — all state is\n * transient and resets on unmount. A console warning is emitted to\n * flag the non-persisted mode.\n */\n guidanceFlowRef?: string;\n}\n\n// ─── Component ───────────────────────────────────────────────\n\nexport const OnboardingView: React.FC<OnboardingViewProps> = ({\n document: doc,\n options: optionsOverride = {},\n className = '',\n onStatusChange,\n onAction,\n viewRef: viewRefProp,\n guidanceFlowRef: guidanceFlowRefProp,\n}) => {\n const { flowStates, completeElement, completeFlow, dismissFlow, skipFlow, isFlowPersistable, isLoading: guidanceIsLoading } = useGuidance();\n const localFlowId = useId();\n const guidanceFlowRef = guidanceFlowRefProp;\n /**\n * Persistence identity follows CONTENT: default to the document's own ref when\n * no explicit `guidanceFlowRef` override is given (mirrors `translationRef`).\n * Dismiss / complete / skip then persist under `doc.ref` for a first-class\n * onboarding view registered in app config — no parallel guidance flow needed.\n */\n const persistenceFlowRef = guidanceFlowRef ?? doc.ref;\n /**\n * Whether persistence will actually happen — `persistenceFlowRef` resolves to a\n * registered guidance flow OR an app-config onboarding view. When false the view\n * is a transient local-only embed (ad-hoc inline document not in config).\n */\n const isPersisted = isFlowPersistable(persistenceFlowRef);\n const flowRef = persistenceFlowRef ?? `onboarding-local-${localFlowId}`;\n /**\n * i18n namespace for this view's element labels. Element labels are read as\n * `guidance.{translationRef}.elements.{el}.{key}` (see `makeTrGuidanceElement`\n * below and `tGuidanceElement` in `core/i18n/I18nContext`).\n *\n * Translation identity follows CONTENT, not persistence. The elements this\n * view renders are `doc.elements`, so their labels belong under the document's\n * OWN ref — symmetric with `GuidanceRenderer`, which scopes a flow's elements\n * under `flow.ref`. `guidanceFlowRef` is a SEPARATE, persistence-only identity\n * (it drives complete/dismiss/skip + the `flowStates` lookup) and may name a\n * flow whose element set differs entirely from `doc.elements` — e.g. a 3-step\n * wizard document (`focus-hub-step-*`) persisted through a single-card flow\n * (`focus-hub-guide-card`). Namespacing the document's element refs under that\n * foreign flow ref resolves keys that were never generated for them: the\n * footgun this precedence closes.\n *\n * Precedence:\n * 1. `viewRefProp` — explicit override; caller knows the canonical ref\n * (e.g. this view is one surface of a larger document).\n * 2. `doc.ref` — the document's own content identity (the normal\n * case; `OnboardingViewDefinition.ref` is\n * `z.string().min(1)`, so it is present and non-empty\n * for every well-formed document).\n * 3. `guidanceFlowRef` — last-resort identity ONLY when `doc.ref` is absent\n * (untyped/malformed callers); preserves the prior\n * persisted-flow lookup instead of collapsing to (4).\n * 4. `'onboarding'` — generic terminal fallback.\n *\n * Rejected `viewRefProp || guidanceFlowRef || doc.ref || 'onboarding'`: that\n * keeps PERSISTENCE ahead of CONTENT, so any caller passing a divergent\n * `guidanceFlowRef` without a `viewRef` would re-open the exact footgun above.\n * It is also behaviorally identical to this ordering for every current\n * consumer (the only `guidanceFlowRef` caller also passes `viewRef`), so the\n * \"smaller diff\" argument buys no safety — only the wrong default semantics.\n */\n const translationRef = viewRefProp || doc.ref || guidanceFlowRef || 'onboarding';\n const guidanceKeys = useMemo(() => [`guidance.${translationRef}`], [translationRef]);\n const { makeTrGuidanceElement, tComponent, isReady } = useI18n({\n component: FrontendComponentType.GUIDANCE_ONBOARDING_VIEW,\n keys: guidanceKeys,\n });\n\n useEffect(() => {\n if (!isPersisted) {\n const elementRefs = doc.elements.map(el => el.ref).join(', ');\n console.warn(\n `[OnboardingView] Mounted with no persistable identity (ref=\"${persistenceFlowRef ?? '(none)'}\", ` +\n `viewRef=\"${viewRefProp ?? '(none)'}\", elements=[${elementRefs}]). Dismiss, complete, and skip ` +\n 'actions will only affect local component state and will NOT be persisted to the backend. To ' +\n 'persist, either declare this onboarding view (by ref) in the app frontend config so it is ' +\n 'registered, or pass the guidanceFlowRef prop matching a registered GuidanceFlowDefinition.',\n );\n }\n }, []); // eslint-disable-line react-hooks/exhaustive-deps -- intentional mount-only check\n\n const mergedOptions = useMemo<OnboardingViewOptions>(\n () => ({ ...doc.options, ...optionsOverride }),\n [doc.options, optionsOverride],\n );\n\n // Sort elements by order\n const sortedElements = useMemo<OnboardingElement[]>(\n () => [...doc.elements].sort((a, b) => a.order - b.order),\n [doc.elements],\n );\n\n // Step tracking for wizard mode\n const [currentStepIndex, setCurrentStepIndex] = useState(0);\n const [localFlowState, setLocalFlowState] = useState<GuidanceFlowState>({\n status: OnboardingStatus.IN_PROGRESS,\n elements: {},\n triggerCount: 1,\n });\n const totalSteps = sortedElements.length;\n\n useEffect(() => {\n setCurrentStepIndex(0);\n setLocalFlowState({\n status: OnboardingStatus.IN_PROGRESS,\n elements: {},\n triggerCount: 1,\n });\n }, [flowRef]);\n\n // Derive flow state from GuidanceContext when persistable; else local transient.\n const flowState = isPersisted ? (flowStates[persistenceFlowRef] ?? localFlowState) : localFlowState;\n\n const getElementState = useCallback(\n (elementRef: string): GuidanceElementState | undefined =>\n flowState?.elements?.[elementRef],\n [flowState],\n );\n\n // Count completed elements\n const completedCount = useMemo(() => {\n if (!flowState?.elements) return 0;\n return Object.values(flowState.elements).filter(\n s => s.status === OnboardingStatus.COMPLETED,\n ).length;\n }, [flowState]);\n\n // ─── Handlers ────────────────────────────────────────────\n\n const setLocalElementStatus = useCallback((\n elementRef: string,\n status: OnboardingStatus,\n data?: { surveyAnswers?: GuidanceElementState['surveyAnswers']; lastStepIndex?: number },\n ) => {\n const completedAt = status === OnboardingStatus.COMPLETED ? new Date() : undefined;\n setLocalFlowState(prev => ({\n ...prev,\n elements: {\n ...prev.elements,\n [elementRef]: {\n ...prev.elements[elementRef],\n status,\n completedAt,\n surveyAnswers: data?.surveyAnswers ?? prev.elements[elementRef]?.surveyAnswers,\n lastStepIndex: data?.lastStepIndex ?? prev.elements[elementRef]?.lastStepIndex,\n },\n },\n }));\n }, []);\n\n const setLocalFlowStatus = useCallback((status: OnboardingStatus) => {\n const now = new Date();\n setLocalFlowState(prev => ({\n ...prev,\n status,\n completedAt: status === OnboardingStatus.COMPLETED ? now : prev.completedAt,\n dismissedAt: status === OnboardingStatus.DISMISSED ? now : prev.dismissedAt,\n }));\n }, []);\n\n /*\n * `async` to satisfy the shared renderer contract, which became promise-returning when a guidance\n * survey gained resource binding (#1372). This surface is NOT bound: it owns its element state\n * locally and only mirrors it into guidance persistence, so its completion cannot be refused and\n * there is nothing here to await. The `void` on the mirrored call is deliberate — it keeps this\n * view's own state authoritative, exactly as before, rather than making a local step wait on a\n * persistence round trip.\n */\n const handleComplete = useCallback(\n async (elementRef: string, data?: { surveyAnswers?: GuidanceElementState['surveyAnswers']; lastStepIndex?: number }): Promise<void> => {\n setLocalElementStatus(elementRef, OnboardingStatus.COMPLETED, data);\n if (isPersisted) {\n void completeElement(persistenceFlowRef, elementRef, data);\n }\n onStatusChange?.(elementRef, OnboardingStatus.COMPLETED);\n\n // Auto-advance to next step if not on last\n if (currentStepIndex < totalSteps - 1) {\n setCurrentStepIndex(prev => prev + 1);\n } else {\n setLocalFlowStatus(OnboardingStatus.COMPLETED);\n if (isPersisted) {\n completeFlow(persistenceFlowRef);\n }\n }\n },\n [completeElement, completeFlow, currentStepIndex, isPersisted, persistenceFlowRef, onStatusChange, setLocalElementStatus, setLocalFlowStatus, totalSteps],\n );\n\n const handleDismiss = useCallback(\n (elementRef: string) => {\n setLocalElementStatus(elementRef, OnboardingStatus.DISMISSED);\n onStatusChange?.(elementRef, OnboardingStatus.DISMISSED);\n if (mergedOptions.allowDismiss) {\n setLocalFlowStatus(OnboardingStatus.DISMISSED);\n if (isPersisted) {\n dismissFlow(persistenceFlowRef);\n }\n }\n },\n [dismissFlow, isPersisted, persistenceFlowRef, mergedOptions.allowDismiss, onStatusChange, setLocalElementStatus, setLocalFlowStatus],\n );\n\n const handleAction = useCallback(\n (actionRef: string) => {\n const currentElement = sortedElements[currentStepIndex];\n onAction?.(currentElement?.ref ?? '', actionRef);\n },\n [onAction, sortedElements, currentStepIndex],\n );\n\n const handleNext = useCallback(() => {\n if (currentStepIndex < totalSteps - 1) {\n setCurrentStepIndex(prev => prev + 1);\n return;\n }\n\n const currentElement = sortedElements[currentStepIndex];\n if (!currentElement) {\n setLocalFlowStatus(OnboardingStatus.COMPLETED);\n if (isPersisted) {\n completeFlow(persistenceFlowRef);\n }\n return;\n }\n\n handleComplete(currentElement.ref);\n }, [currentStepIndex, totalSteps, sortedElements, handleComplete, completeFlow, isPersisted, persistenceFlowRef, setLocalFlowStatus]);\n\n const handleBack = useCallback(() => {\n if (currentStepIndex > 0) {\n setCurrentStepIndex(prev => prev - 1);\n }\n }, [currentStepIndex]);\n\n const handleSkip = useCallback(() => {\n setLocalFlowStatus(OnboardingStatus.SKIPPED);\n if (isPersisted) {\n skipFlow(persistenceFlowRef);\n }\n }, [isPersisted, persistenceFlowRef, setLocalFlowStatus, skipFlow]);\n\n // ─── Render ──────────────────────────────────────────────\n\n if (!isReady) return null;\n\n // Hydration-flash guard: a PERSISTED onboarding view must not paint its\n // default (IN_PROGRESS) content before the backend-persisted flow state has\n // loaded — otherwise a view the user already dismissed / completed / skipped\n // flashes in and then vanishes once `flowStates` hydrates. Local-only\n // (non-persisted) views have no backend state to wait for, so they render\n // immediately. Once loading settles, `flowState` reflects the true status\n // (terminal → stays hidden; otherwise renders).\n if (isPersisted && guidanceIsLoading) return null;\n\n if (sortedElements.length === 0) {\n return (\n <div className={cn('p-container-xl text-center text-muted-foreground', className)}>\n {tComponent(FrontendComponentType.GUIDANCE_ONBOARDING_VIEW, 'empty')}\n </div>\n );\n }\n\n // A terminal flow status closes the view: the onboarding sequence is over.\n // COMPLETED (last step finished), DISMISSED (user closed), and SKIPPED (user\n // skipped) all mean \"stop rendering\". COMPLETED was previously missing from\n // this gate, so finishing the last step persisted the completion + called\n // `completeFlow(...)` but left the final modal on screen (\"not dismissed at\n // the end\"): the view kept rendering `currentElement` (still the last step).\n // Use the canonical `isTerminalOnboardingStatus` helper so this gate can never\n // drift from the lifecycle status set again (mirrors the GuidanceContext\n // complete/dismiss/skip guards).\n if (isTerminalOnboardingStatus(flowState?.status)) {\n return null;\n }\n\n const currentElement = sortedElements[currentStepIndex];\n if (!currentElement) return null;\n\n /**\n * The SAME resolution `GuidanceRenderer` uses — custom renderer, then a registered preset, then\n * the engine built-in.\n *\n * This file kept a private, hard-coded copy of the built-in map and never consulted the registry,\n * so an application that registered a `GUIDANCE_CARD` preset got its component inside a guidance\n * flow and the engine's built-in inside an onboarding VIEW: one element type, two components,\n * decided by which surface happened to show it. The completeness deny-list asserts every guidance\n * slot is swappable, and this was the site at which that stopped being true.\n */\n const Renderer = resolveGuidanceElementRenderer(currentElement.type);\n const elementState = getElementState(currentElement.ref);\n // A missing REQUIRED label renders its key rather than an empty element (#539) — the same\n // translator contract GuidanceRenderer uses, so a view and a flow show a gap identically.\n const scopedT = makeTrGuidanceElement(translationRef, currentElement.ref, resolveGuidanceElementRequiredLabelFields(currentElement));\n\n return (\n <div className={cn('flex flex-col gap-element', className)}>\n {/* Progress bar */}\n {mergedOptions.showProgress && totalSteps > 1 && (\n <div className=\"flex flex-col gap-item-xs\">\n <div className=\"flex justify-between items-center text-[0.8125rem] text-muted-foreground font-medium\">\n <span>\n {tComponent(FrontendComponentType.GUIDANCE_ONBOARDING_VIEW, 'stepOf', {\n current: currentStepIndex + 1,\n total: totalSteps,\n })}\n </span>\n <span className=\"text-xs\">\n {completedCount}/{totalSteps}\n </span>\n </div>\n\n {/*\n The engine `Progress`, not a hand-rolled track and fill.\n This was a `bg-muted` div wrapping a `bg-primary` div sized by an inline width — the\n THIRD progress bar in this subsystem and the second implementation of one, while\n `GuidanceChecklist` and `ProgressionMilestoneTracker` both used the component. A\n rebrand or a token change reached those two and left this behind.\n\n The accessible name reuses the `stepOf` string rendered directly above: it already says\n exactly what this bar measures, so a second key saying the same thing would be one more\n place for the two to drift apart.\n */}\n <Progress\n value={totalSteps > 0 ? ((currentStepIndex + 1) / totalSteps) * 100 : 0}\n className=\"h-1\"\n aria-label={tComponent(FrontendComponentType.GUIDANCE_ONBOARDING_VIEW, 'stepOf', {\n current: currentStepIndex + 1,\n total: totalSteps,\n })}\n aria-valuenow={currentStepIndex + 1}\n aria-valuemin={1}\n aria-valuemax={totalSteps}\n />\n </div>\n )}\n\n {/* Current element renderer */}\n {Renderer && (\n <Renderer\n element={currentElement}\n flowRef={flowRef}\n state={elementState}\n onComplete={handleComplete}\n onDismiss={handleDismiss}\n onAction={handleAction}\n t={scopedT}\n />\n )}\n\n {/* Navigation controls */}\n {totalSteps > 1 && (\n <div className=\"flex justify-between items-center pt-item\">\n {/* Left: Back */}\n <div>\n {currentStepIndex > 0 && (\n <Button variant={ButtonVariants_Variant.OUTLINE} size={ButtonSize.SM} onClick={handleBack}>\n {tComponent(FrontendComponentType.GUIDANCE_ONBOARDING_VIEW, 'back')}\n </Button>\n )}\n </div>\n\n {/* Right: Skip / Next / Complete */}\n <div className=\"flex gap-item items-center\">\n {mergedOptions.allowSkip && (\n /*\n * GHOST, and do NOT reach for a dimmer treatment here. A previous hand-rolled version\n * used `text-muted-foreground/70`, which composited to #7d899b on the light theme's\n * #f8fafc — 3.38:1 where 4.5:1 is required (axe, live stack, 2026-09-09, #533). The\n * ghost recipe is already visibly secondary to the primary action beside it and is\n * held to the contrast floor by the design system rather than by a comment.\n */\n <Button variant={ButtonVariants_Variant.GHOST} size={ButtonSize.SM} onClick={handleSkip}>\n {tComponent(FrontendComponentType.GUIDANCE_ONBOARDING_VIEW, 'skip')}\n </Button>\n )}\n\n <Button variant={ButtonVariants_Variant.DEFAULT} size={ButtonSize.SM} onClick={handleNext}>\n {currentStepIndex === totalSteps - 1\n ? tComponent(FrontendComponentType.GUIDANCE_ONBOARDING_VIEW, 'complete')\n : tComponent(FrontendComponentType.GUIDANCE_ONBOARDING_VIEW, 'next')}\n </Button>\n </div>\n </div>\n )}\n\n {/* Single-step footer fallback: some renderers do not expose their own completion action. */}\n {totalSteps === 1 && (\n <div className=\"flex justify-end gap-item items-center\">\n {mergedOptions.allowDismiss && (\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n onClick={() => handleDismiss(currentElement.ref)}\n >\n {tComponent(FrontendComponentType.GUIDANCE_ONBOARDING_VIEW, 'dismiss')}\n </Button>\n )}\n\n <Button variant={ButtonVariants_Variant.DEFAULT} size={ButtonSize.SM} onClick={handleNext}>\n {tComponent(FrontendComponentType.GUIDANCE_ONBOARDING_VIEW, 'complete')}\n </Button>\n </div>\n )}\n </div>\n );\n};\n"]}
|
|
1
|
+
{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E,UAAU,CAAC,EAAE,EACnB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,cAAc,CAAC,GAAG,CAAC,YAE/C,UAAU,CAAC,qBAAqB,CAAC,wBAAwB,EAAE,SAAS,CAAC,GAC/D,CACV,EAED,KAAC,MAAM,IAAC,OAAO,EAAE,sBAAsB,CAAC,OAAO,EAAE,IAAI,EAAE,UAAU,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,YACtF,UAAU,CAAC,qBAAqB,CAAC,wBAAwB,EAAE,UAAU,CAAC,GAChE,IACL,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkC,CAAC,KAAK,EAAE,EAAE,CAAC,CACtE,KAAC,oBAAoB,IAAC,gBAAgB,EAAE,KAAK,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,QAAC,YAAY,EAAE,gCAAgC,CAAC,IAAI,YAC3I,KAAC,kBAAkB,OAAK,KAAK,GAAI,GACZ,CACxB,CAAC","sourcesContent":["/**\n * OnboardingView — Wizard-style onboarding view.\n *\n * Renders a sequence of guidance elements (checklist, tour, survey, etc.)\n * with step progression, progress bar, and navigation controls.\n * Integrates with GuidanceContext only when a matching `guidanceFlowRef` is\n * provided and falls back to local transient state when the view is rendered\n * directly from a static onboarding document.\n */\n\nimport React, { useState, useMemo, useCallback, useEffect, useId } from 'react';\nimport { RequiredFeaturesGate } from '~wildo-frontend-lib/core/features/RequiredFeaturesGate';\nimport { RequiredFeaturesGatePresentation } from '~wildo-frontend-lib/core/features/required-features-gate-presentation';\nimport {\n OnboardingElementType,\n OnboardingStatus,\n isTerminalOnboardingStatus,\n resolveGuidanceElementRequiredLabelFields,\n type OnboardingElement,\n type OnboardingViewOptions,\n type GuidanceFlowState,\n} from '@wildo-ai/saas-models';\nimport type { OnboardingViewDefinition } from '~wildo-frontend-lib/core/config/onboarding-view.frontend.schemas';\nimport type { GuidanceElementState } from '@wildo-ai/saas-models';\nimport { ButtonSize, FrontendComponentType } from '@wildo-ai/presets-components-models';\nimport { Button, ButtonVariants_Variant } from '~wildo-frontend-lib/components/actions/button';\nimport { Progress } from '~wildo-frontend-lib/components/feedback/progress';\nimport { useGuidance } from '~wildo-frontend-lib/core/guidance/useGuidance';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { resolveGuidanceElementRenderer } from '~wildo-frontend-lib/core/guidance/GuidanceRenderer';\n\n// ─── Props ───────────────────────────────────────────────────\n\nexport interface OnboardingViewProps {\n /** Onboarding document with elements */\n document: OnboardingViewDefinition;\n /** Additional options to override document options */\n options?: Partial<OnboardingViewOptions>;\n /** Custom class name */\n className?: string;\n /** Callback when element status changes */\n onStatusChange?: (elementRef: string, status: OnboardingStatus) => void;\n /** Callback when action is triggered */\n onAction?: (elementRef: string, actionRef?: string) => void;\n /** View reference for i18n/view identity when rendered from a larger document */\n viewRef?: string;\n /**\n * Connects this view to a persisted guidance flow.\n *\n * When provided, dismiss / complete / skip actions are forwarded to\n * `GuidanceContext` and persisted to the backend. Must match a\n * `GuidanceFlowDefinition.ref` registered in the app's guidance config.\n *\n * When omitted, the view operates in local-only mode — all state is\n * transient and resets on unmount. A console warning is emitted to\n * flag the non-persisted mode.\n */\n guidanceFlowRef?: string;\n}\n\n// ─── Component ───────────────────────────────────────────────\n\nconst OnboardingViewBody: React.FC<OnboardingViewProps> = ({\n document: doc,\n options: optionsOverride = {},\n className = '',\n onStatusChange,\n onAction,\n viewRef: viewRefProp,\n guidanceFlowRef: guidanceFlowRefProp,\n}) => {\n const { flowStates, completeElement, completeFlow, dismissFlow, skipFlow, isFlowPersistable, isLoading: guidanceIsLoading } = useGuidance();\n const localFlowId = useId();\n const guidanceFlowRef = guidanceFlowRefProp;\n /**\n * Persistence identity follows CONTENT: default to the document's own ref when\n * no explicit `guidanceFlowRef` override is given (mirrors `translationRef`).\n * Dismiss / complete / skip then persist under `doc.ref` for a first-class\n * onboarding view registered in app config — no parallel guidance flow needed.\n */\n const persistenceFlowRef = guidanceFlowRef ?? doc.ref;\n /**\n * Whether persistence will actually happen — `persistenceFlowRef` resolves to a\n * registered guidance flow OR an app-config onboarding view. When false the view\n * is a transient local-only embed (ad-hoc inline document not in config).\n */\n const isPersisted = isFlowPersistable(persistenceFlowRef);\n const flowRef = persistenceFlowRef ?? `onboarding-local-${localFlowId}`;\n /**\n * i18n namespace for this view's element labels. Element labels are read as\n * `guidance.{translationRef}.elements.{el}.{key}` (see `makeTrGuidanceElement`\n * below and `tGuidanceElement` in `core/i18n/I18nContext`).\n *\n * Translation identity follows CONTENT, not persistence. The elements this\n * view renders are `doc.elements`, so their labels belong under the document's\n * OWN ref — symmetric with `GuidanceRenderer`, which scopes a flow's elements\n * under `flow.ref`. `guidanceFlowRef` is a SEPARATE, persistence-only identity\n * (it drives complete/dismiss/skip + the `flowStates` lookup) and may name a\n * flow whose element set differs entirely from `doc.elements` — e.g. a 3-step\n * wizard document (`focus-hub-step-*`) persisted through a single-card flow\n * (`focus-hub-guide-card`). Namespacing the document's element refs under that\n * foreign flow ref resolves keys that were never generated for them: the\n * footgun this precedence closes.\n *\n * Precedence:\n * 1. `viewRefProp` — explicit override; caller knows the canonical ref\n * (e.g. this view is one surface of a larger document).\n * 2. `doc.ref` — the document's own content identity (the normal\n * case; `OnboardingViewDefinition.ref` is\n * `z.string().min(1)`, so it is present and non-empty\n * for every well-formed document).\n * 3. `guidanceFlowRef` — last-resort identity ONLY when `doc.ref` is absent\n * (untyped/malformed callers); preserves the prior\n * persisted-flow lookup instead of collapsing to (4).\n * 4. `'onboarding'` — generic terminal fallback.\n *\n * Rejected `viewRefProp || guidanceFlowRef || doc.ref || 'onboarding'`: that\n * keeps PERSISTENCE ahead of CONTENT, so any caller passing a divergent\n * `guidanceFlowRef` without a `viewRef` would re-open the exact footgun above.\n * It is also behaviorally identical to this ordering for every current\n * consumer (the only `guidanceFlowRef` caller also passes `viewRef`), so the\n * \"smaller diff\" argument buys no safety — only the wrong default semantics.\n */\n const translationRef = viewRefProp || doc.ref || guidanceFlowRef || 'onboarding';\n const guidanceKeys = useMemo(() => [`guidance.${translationRef}`], [translationRef]);\n const { makeTrGuidanceElement, tComponent, isReady } = useI18n({\n component: FrontendComponentType.GUIDANCE_ONBOARDING_VIEW,\n keys: guidanceKeys,\n });\n\n useEffect(() => {\n if (!isPersisted) {\n const elementRefs = doc.elements.map(el => el.ref).join(', ');\n console.warn(\n `[OnboardingView] Mounted with no persistable identity (ref=\"${persistenceFlowRef ?? '(none)'}\", ` +\n `viewRef=\"${viewRefProp ?? '(none)'}\", elements=[${elementRefs}]). Dismiss, complete, and skip ` +\n 'actions will only affect local component state and will NOT be persisted to the backend. To ' +\n 'persist, either declare this onboarding view (by ref) in the app frontend config so it is ' +\n 'registered, or pass the guidanceFlowRef prop matching a registered GuidanceFlowDefinition.',\n );\n }\n }, []); // eslint-disable-line react-hooks/exhaustive-deps -- intentional mount-only check\n\n const mergedOptions = useMemo<OnboardingViewOptions>(\n () => ({ ...doc.options, ...optionsOverride }),\n [doc.options, optionsOverride],\n );\n\n // Sort elements by order\n const sortedElements = useMemo<OnboardingElement[]>(\n () => [...doc.elements].sort((a, b) => a.order - b.order),\n [doc.elements],\n );\n\n // Step tracking for wizard mode\n const [currentStepIndex, setCurrentStepIndex] = useState(0);\n const [localFlowState, setLocalFlowState] = useState<GuidanceFlowState>({\n status: OnboardingStatus.IN_PROGRESS,\n elements: {},\n triggerCount: 1,\n });\n const totalSteps = sortedElements.length;\n\n useEffect(() => {\n setCurrentStepIndex(0);\n setLocalFlowState({\n status: OnboardingStatus.IN_PROGRESS,\n elements: {},\n triggerCount: 1,\n });\n }, [flowRef]);\n\n // Derive flow state from GuidanceContext when persistable; else local transient.\n const flowState = isPersisted ? (flowStates[persistenceFlowRef] ?? localFlowState) : localFlowState;\n\n const getElementState = useCallback(\n (elementRef: string): GuidanceElementState | undefined =>\n flowState?.elements?.[elementRef],\n [flowState],\n );\n\n // Count completed elements\n const completedCount = useMemo(() => {\n if (!flowState?.elements) return 0;\n return Object.values(flowState.elements).filter(\n s => s.status === OnboardingStatus.COMPLETED,\n ).length;\n }, [flowState]);\n\n // ─── Handlers ────────────────────────────────────────────\n\n const setLocalElementStatus = useCallback((\n elementRef: string,\n status: OnboardingStatus,\n data?: { surveyAnswers?: GuidanceElementState['surveyAnswers']; lastStepIndex?: number },\n ) => {\n const completedAt = status === OnboardingStatus.COMPLETED ? new Date() : undefined;\n setLocalFlowState(prev => ({\n ...prev,\n elements: {\n ...prev.elements,\n [elementRef]: {\n ...prev.elements[elementRef],\n status,\n completedAt,\n surveyAnswers: data?.surveyAnswers ?? prev.elements[elementRef]?.surveyAnswers,\n lastStepIndex: data?.lastStepIndex ?? prev.elements[elementRef]?.lastStepIndex,\n },\n },\n }));\n }, []);\n\n const setLocalFlowStatus = useCallback((status: OnboardingStatus) => {\n const now = new Date();\n setLocalFlowState(prev => ({\n ...prev,\n status,\n completedAt: status === OnboardingStatus.COMPLETED ? now : prev.completedAt,\n dismissedAt: status === OnboardingStatus.DISMISSED ? now : prev.dismissedAt,\n }));\n }, []);\n\n /*\n * `async` to satisfy the shared renderer contract, which became promise-returning when a guidance\n * survey gained resource binding (#1372). This surface is NOT bound: it owns its element state\n * locally and only mirrors it into guidance persistence, so its completion cannot be refused and\n * there is nothing here to await. The `void` on the mirrored call is deliberate — it keeps this\n * view's own state authoritative, exactly as before, rather than making a local step wait on a\n * persistence round trip.\n */\n const handleComplete = useCallback(\n async (elementRef: string, data?: { surveyAnswers?: GuidanceElementState['surveyAnswers']; lastStepIndex?: number }): Promise<void> => {\n setLocalElementStatus(elementRef, OnboardingStatus.COMPLETED, data);\n if (isPersisted) {\n void completeElement(persistenceFlowRef, elementRef, data);\n }\n onStatusChange?.(elementRef, OnboardingStatus.COMPLETED);\n\n // Auto-advance to next step if not on last\n if (currentStepIndex < totalSteps - 1) {\n setCurrentStepIndex(prev => prev + 1);\n } else {\n setLocalFlowStatus(OnboardingStatus.COMPLETED);\n if (isPersisted) {\n completeFlow(persistenceFlowRef);\n }\n }\n },\n [completeElement, completeFlow, currentStepIndex, isPersisted, persistenceFlowRef, onStatusChange, setLocalElementStatus, setLocalFlowStatus, totalSteps],\n );\n\n const handleDismiss = useCallback(\n (elementRef: string) => {\n setLocalElementStatus(elementRef, OnboardingStatus.DISMISSED);\n onStatusChange?.(elementRef, OnboardingStatus.DISMISSED);\n if (mergedOptions.allowDismiss) {\n setLocalFlowStatus(OnboardingStatus.DISMISSED);\n if (isPersisted) {\n dismissFlow(persistenceFlowRef);\n }\n }\n },\n [dismissFlow, isPersisted, persistenceFlowRef, mergedOptions.allowDismiss, onStatusChange, setLocalElementStatus, setLocalFlowStatus],\n );\n\n const handleAction = useCallback(\n (actionRef: string) => {\n const currentElement = sortedElements[currentStepIndex];\n onAction?.(currentElement?.ref ?? '', actionRef);\n },\n [onAction, sortedElements, currentStepIndex],\n );\n\n const handleNext = useCallback(() => {\n if (currentStepIndex < totalSteps - 1) {\n setCurrentStepIndex(prev => prev + 1);\n return;\n }\n\n const currentElement = sortedElements[currentStepIndex];\n if (!currentElement) {\n setLocalFlowStatus(OnboardingStatus.COMPLETED);\n if (isPersisted) {\n completeFlow(persistenceFlowRef);\n }\n return;\n }\n\n handleComplete(currentElement.ref);\n }, [currentStepIndex, totalSteps, sortedElements, handleComplete, completeFlow, isPersisted, persistenceFlowRef, setLocalFlowStatus]);\n\n const handleBack = useCallback(() => {\n if (currentStepIndex > 0) {\n setCurrentStepIndex(prev => prev - 1);\n }\n }, [currentStepIndex]);\n\n const handleSkip = useCallback(() => {\n setLocalFlowStatus(OnboardingStatus.SKIPPED);\n if (isPersisted) {\n skipFlow(persistenceFlowRef);\n }\n }, [isPersisted, persistenceFlowRef, setLocalFlowStatus, skipFlow]);\n\n // ─── Render ──────────────────────────────────────────────\n\n if (!isReady) return null;\n\n // Hydration-flash guard: a PERSISTED onboarding view must not paint its\n // default (IN_PROGRESS) content before the backend-persisted flow state has\n // loaded — otherwise a view the user already dismissed / completed / skipped\n // flashes in and then vanishes once `flowStates` hydrates. Local-only\n // (non-persisted) views have no backend state to wait for, so they render\n // immediately. Once loading settles, `flowState` reflects the true status\n // (terminal → stays hidden; otherwise renders).\n if (isPersisted && guidanceIsLoading) return null;\n\n if (sortedElements.length === 0) {\n return (\n <div className={cn('p-container-xl text-center text-muted-foreground', className)}>\n {tComponent(FrontendComponentType.GUIDANCE_ONBOARDING_VIEW, 'empty')}\n </div>\n );\n }\n\n // A terminal flow status closes the view: the onboarding sequence is over.\n // COMPLETED (last step finished), DISMISSED (user closed), and SKIPPED (user\n // skipped) all mean \"stop rendering\". COMPLETED was previously missing from\n // this gate, so finishing the last step persisted the completion + called\n // `completeFlow(...)` but left the final modal on screen (\"not dismissed at\n // the end\"): the view kept rendering `currentElement` (still the last step).\n // Use the canonical `isTerminalOnboardingStatus` helper so this gate can never\n // drift from the lifecycle status set again (mirrors the GuidanceContext\n // complete/dismiss/skip guards).\n if (isTerminalOnboardingStatus(flowState?.status)) {\n return null;\n }\n\n const currentElement = sortedElements[currentStepIndex];\n if (!currentElement) return null;\n\n /**\n * The SAME resolution `GuidanceRenderer` uses — custom renderer, then a registered preset, then\n * the engine built-in.\n *\n * This file kept a private, hard-coded copy of the built-in map and never consulted the registry,\n * so an application that registered a `GUIDANCE_CARD` preset got its component inside a guidance\n * flow and the engine's built-in inside an onboarding VIEW: one element type, two components,\n * decided by which surface happened to show it. The completeness deny-list asserts every guidance\n * slot is swappable, and this was the site at which that stopped being true.\n */\n const Renderer = resolveGuidanceElementRenderer(currentElement.type);\n const elementState = getElementState(currentElement.ref);\n // A missing REQUIRED label renders its key rather than an empty element (#539) — the same\n // translator contract GuidanceRenderer uses, so a view and a flow show a gap identically.\n const scopedT = makeTrGuidanceElement(translationRef, currentElement.ref, resolveGuidanceElementRequiredLabelFields(currentElement));\n\n return (\n <div className={cn('flex flex-col gap-element', className)}>\n {/* Progress bar */}\n {mergedOptions.showProgress && totalSteps > 1 && (\n <div className=\"flex flex-col gap-item-xs\">\n <div className=\"flex justify-between items-center text-[0.8125rem] text-muted-foreground font-medium\">\n <span>\n {tComponent(FrontendComponentType.GUIDANCE_ONBOARDING_VIEW, 'stepOf', {\n current: currentStepIndex + 1,\n total: totalSteps,\n })}\n </span>\n <span className=\"text-xs\">\n {completedCount}/{totalSteps}\n </span>\n </div>\n\n {/*\n The engine `Progress`, not a hand-rolled track and fill.\n This was a `bg-muted` div wrapping a `bg-primary` div sized by an inline width — the\n THIRD progress bar in this subsystem and the second implementation of one, while\n `GuidanceChecklist` and `ProgressionMilestoneTracker` both used the component. A\n rebrand or a token change reached those two and left this behind.\n\n The accessible name reuses the `stepOf` string rendered directly above: it already says\n exactly what this bar measures, so a second key saying the same thing would be one more\n place for the two to drift apart.\n */}\n <Progress\n value={totalSteps > 0 ? ((currentStepIndex + 1) / totalSteps) * 100 : 0}\n className=\"h-1\"\n aria-label={tComponent(FrontendComponentType.GUIDANCE_ONBOARDING_VIEW, 'stepOf', {\n current: currentStepIndex + 1,\n total: totalSteps,\n })}\n aria-valuenow={currentStepIndex + 1}\n aria-valuemin={1}\n aria-valuemax={totalSteps}\n />\n </div>\n )}\n\n {/* Current element renderer */}\n {Renderer && (\n <Renderer\n element={currentElement}\n flowRef={flowRef}\n state={elementState}\n onComplete={handleComplete}\n onDismiss={handleDismiss}\n onAction={handleAction}\n t={scopedT}\n />\n )}\n\n {/* Navigation controls */}\n {totalSteps > 1 && (\n <div className=\"flex justify-between items-center pt-item\">\n {/* Left: Back */}\n <div>\n {currentStepIndex > 0 && (\n <Button variant={ButtonVariants_Variant.OUTLINE} size={ButtonSize.SM} onClick={handleBack}>\n {tComponent(FrontendComponentType.GUIDANCE_ONBOARDING_VIEW, 'back')}\n </Button>\n )}\n </div>\n\n {/* Right: Skip / Next / Complete */}\n <div className=\"flex gap-item items-center\">\n {mergedOptions.allowSkip && (\n /*\n * GHOST, and do NOT reach for a dimmer treatment here. A previous hand-rolled version\n * used `text-muted-foreground/70`, which composited to #7d899b on the light theme's\n * #f8fafc — 3.38:1 where 4.5:1 is required (axe, live stack, 2026-09-09, #533). The\n * ghost recipe is already visibly secondary to the primary action beside it and is\n * held to the contrast floor by the design system rather than by a comment.\n */\n <Button variant={ButtonVariants_Variant.GHOST} size={ButtonSize.SM} onClick={handleSkip}>\n {tComponent(FrontendComponentType.GUIDANCE_ONBOARDING_VIEW, 'skip')}\n </Button>\n )}\n\n <Button variant={ButtonVariants_Variant.DEFAULT} size={ButtonSize.SM} onClick={handleNext}>\n {currentStepIndex === totalSteps - 1\n ? tComponent(FrontendComponentType.GUIDANCE_ONBOARDING_VIEW, 'complete')\n : tComponent(FrontendComponentType.GUIDANCE_ONBOARDING_VIEW, 'next')}\n </Button>\n </div>\n </div>\n )}\n\n {/* Single-step footer fallback: some renderers do not expose their own completion action. */}\n {totalSteps === 1 && (\n <div className=\"flex justify-end gap-item items-center\">\n {mergedOptions.allowDismiss && (\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.SM}\n onClick={() => handleDismiss(currentElement.ref)}\n >\n {tComponent(FrontendComponentType.GUIDANCE_ONBOARDING_VIEW, 'dismiss')}\n </Button>\n )}\n\n <Button variant={ButtonVariants_Variant.DEFAULT} size={ButtonSize.SM} onClick={handleNext}>\n {tComponent(FrontendComponentType.GUIDANCE_ONBOARDING_VIEW, 'complete')}\n </Button>\n </div>\n )}\n </div>\n );\n};\n\n/**\n * The onboarding view, behind its document's plan fence. An onboarding view has no route: it is shown where a page embeds\n * it, so its `requiredFeatures` is enforced here, with the in-page gate (a hidden wizard is simply not on the page, and\n * the person is not navigated away). Without this wrapper the requirement the document declares was never read. It waits\n * for the features before showing a wizard that declares one, so a person on a plan without it never sees it flash in. A\n * locked wizard is a tile in its place, never the page-sized prompt.\n */\nexport const OnboardingView: React.FC<OnboardingViewProps> = (props) => (\n <RequiredFeaturesGate requiredFeatures={props.document.requiredFeatures} holdWhileLoading presentation={RequiredFeaturesGatePresentation.TILE}>\n <OnboardingViewBody {...props} />\n </RequiredFeaturesGate>\n);\n"]}
|
|
@@ -40,8 +40,8 @@ export declare function AppShellProviders({ layout, children }: AppShellProvider
|
|
|
40
40
|
*
|
|
41
41
|
* It is a zero-size, untransformed box at the shell root's origin (the root fills the viewport), with NO z-index and
|
|
42
42
|
* NOT `position: fixed`: either would make it a stacking context and cap every overlay inside it below anything
|
|
43
|
-
* positioned outside the shell — a consent prompt would paint over the shell's own dialogs (
|
|
44
|
-
*
|
|
43
|
+
* positioned outside the shell — a consent prompt would paint over the shell's own dialogs (a reordering measured
|
|
44
|
+
* and avoided when the theme's background layer hid the status bar). So each overlay keeps its own global z-index. An overlay positioned `fixed` still resolves
|
|
45
45
|
* against the viewport (nothing between it and the viewport is transformed), one positioned `absolute` against the
|
|
46
46
|
* root's origin, so floating content lands where its trigger is on screen. The layout's root must be positioned.
|
|
47
47
|
*/
|
|
@@ -127,8 +127,8 @@ export function AppShellProviders({ layout, children }) {
|
|
|
127
127
|
*
|
|
128
128
|
* It is a zero-size, untransformed box at the shell root's origin (the root fills the viewport), with NO z-index and
|
|
129
129
|
* NOT `position: fixed`: either would make it a stacking context and cap every overlay inside it below anything
|
|
130
|
-
* positioned outside the shell — a consent prompt would paint over the shell's own dialogs (
|
|
131
|
-
*
|
|
130
|
+
* positioned outside the shell — a consent prompt would paint over the shell's own dialogs (a reordering measured
|
|
131
|
+
* and avoided when the theme's background layer hid the status bar). So each overlay keeps its own global z-index. An overlay positioned `fixed` still resolves
|
|
132
132
|
* against the viewport (nothing between it and the viewport is transformed), one positioned `absolute` against the
|
|
133
133
|
* root's origin, so floating content lands where its trigger is on screen. The layout's root must be positioned.
|
|
134
134
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShellBuildingBlocks.js","sourceRoot":"","sources":["../../../../src/core/app-shell/AppShellBuildingBlocks.tsx"],"names":[],"mappings":";AAAA,OAA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,CAAC,CAAC,IAAI,CAAC;QAC1H,CAAC;QACD,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,SAAS,GAAU,MAAM,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,qDAAqD,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC9F,CAAC;IACH,CAAC;AACH,CAAC;AASD;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAA8B;IACvF,MAAM,MAAM,GAAG,wBAAwB,CAAC,uBAAuB,CAAC,CAAC;IACjE,MAAM,oBAAoB,GAAG,UAAU,CAAC,2BAA2B,CAAC,CAAC;IACrE,OAAO,CACL,gBAAM,GAAG,EAAE,oBAAoB,IAAI,SAAS,yBAAuB,WAAW,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,aAC1G,KAAC,sBAAsB,IAAC,cAAc,EAAE,QAAQ,GAAI,EAGnD,MAAM,CAAC,oBAAoB,IAAI,CAAC,MAAM,CAAC,+BAA+B,IAAI,KAAC,kCAAkC,IAAC,SAAS,EAAC,UAAU,GAAG,IACjI,CACR,CAAC;AACJ,CAAC;AAED,6GAA6G;AAC7G,MAAM,UAAU,sBAAsB;IACpC,OAAO,CACL,8BACE,KAAC,kBAAkB,KAAG,EACtB,KAAC,gBAAgB,KAAG,IACnB,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import React, { createContext, useCallback, useContext, useEffect, useState } from 'react';\n\nimport { HorizontalPlacement, ShellRegion, SurfaceVariant, VerticalPlacement } from '@wildo-ai/presets-components-models';\nimport { LoadingSpinner } from '~wildo-frontend-lib/components/feedback/loading-spinner';\nimport { Surface } from '~wildo-frontend-lib/components/sections/surface';\nimport { NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE } from '~wildo-frontend-lib/core/ui/surface-a11y.utils';\nimport { ApplicationLevel_ActivityBar } from '~wildo-frontend-lib/components/navigation/app-level/ApplicationLevel_ActivityBar';\nimport { ApplicationLevel_MenuBar } from '~wildo-frontend-lib/components/navigation/app-level/ApplicationLevel_MenuBar';\nimport { ApplicationLevel_QuickActionButton } from '~wildo-frontend-lib/components/navigation/app-level/ApplicationLevel_QuickActionButton';\nimport { ApplicationLevel_Sidebar } from '~wildo-frontend-lib/components/navigation/app-level/ApplicationLevel_Sidebar';\nimport { ApplicationLevel_StatusBar } from '~wildo-frontend-lib/components/navigation/app-level/ApplicationLevel_StatusBar';\nimport { ApplicationLevel_Toolbar } from '~wildo-frontend-lib/components/navigation/app-level/ApplicationLevel_Toolbar';\nimport { ApplicationLevel_UtilityPanel } from '~wildo-frontend-lib/components/navigation/app-level/ApplicationLevel_UtilityPanel';\nimport { HostedComponentInteractionsProvider } from '~wildo-frontend-lib/components/navigation/app-level/HostedComponentInteractionsProvider';\nimport { GuidanceRenderer } from '~wildo-frontend-lib/core/guidance/GuidanceRenderer';\nimport { NavigationContentAreas, NavigationOverlays } from '~wildo-frontend-lib/core/navigation/NavigationContentAreas';\n\nimport type { StatusBarPlacement } from '~wildo-frontend-lib/core/config/app-level-components.frontend.schemas';\n\nimport type { AppShellLayoutInfo } from './app-shell.schemas';\nimport { PortalContainerContext } from './PortalContainerContext';\n\n/** @wildo_source:part:start saas.frontend.app-shell.building-blocks facet:layer:frontend facet:family:app-shell facet:audience:app-developer */\n/**\n * # App shell building blocks\n *\n * The signed-in shell is a LAYOUT — where the regions sit — over parts that do not depend on the layout: the\n * region components themselves (each resolved from the component registry by its wrapper), the content area,\n * the overlays, and two providers every region reads. These building blocks are those parts, so a layout\n * preset only decides the ARRANGEMENT. `AppLayoutPreset_MainContainer_Default` is composed from them, and any\n * other layout container an application registers should be too — a different arrangement of the same regions,\n * or, later, an alternative rendering that draws decoration around them.\n *\n * A layout preset uses them like this:\n *\n * ```tsx\n * const layout = useAppShellLayout();\n * const hasBeenReady = useAppShellFirstReady(layout.isLayoutReady);\n * if (!layout.isLayoutReady && !hasBeenReady) return <AppShellLoadingState />;\n * return (\n * <AppShellProviders layout={layout}>\n * <div className=\"my-arrangement\">\n * <AppShellRegionOutlet region={ShellRegion.SIDEBAR} placement={HorizontalPlacement.START} />\n * <AppShellRegionOutlet region={ShellRegion.MENUBAR} />\n * <AppShellContentOutlet className=\"flex-1 relative min-w-0\">{children}</AppShellContentOutlet>\n * <AppShellOverlaysOutlet />\n * </div>\n * </AppShellProviders>\n * );\n * ```\n *\n * Four rules keep a custom layout correct:\n *\n * - **Render `AppShellProviders` exactly once, around the whole shell.** It owns the single open state and the\n * single hotkey registration of the command menu, notification center and quick switcher; two copies would\n * make one shortcut open two dialogs.\n * - **Place every region the application configures.** An outlet renders nothing when its region is not\n * configured, so placing an outlet is always safe; leaving one out silently drops a region.\n * - **Render `AppShellContentOutlet` exactly once.** It is the `<main>` landmark, and overlays portal into it —\n * unless the layout also renders `AppShellOverlayPortalLayer`, which then takes the overlays instead. A layout that\n * transforms its regions (a 3D placement) must render that layer OUTSIDE the transformed subtree: a transformed\n * ancestor is the containing block of every `position: fixed` descendant, so a dialog in `<main>` would be confined\n * to the pane and a menu would be placed in the wrong coordinates.\n * - **Give the root `position: relative`, not `isolation: isolate`,** when the theme may declare a background\n * layer. That layer is painted in its own stacking context above ordinary in-flow content, so shell text with\n * no positioned ancestor is painted UNDER it; positioning the root lifts the whole shell above it. `isolate`\n * would also lift it, but would make the shell one stacking context, so an overlay outside the shell with a\n * lower z-index (a consent prompt) would paint over the shell's own dialogs.\n */\n\n/** The layout decisions `useAppShellLayout()` computed, shared with every outlet below the providers. */\nconst AppShellLayoutContext = createContext<AppShellLayoutInfo | null>(null);\n\n/** Lets the content outlet hand its `<main>` element to the providers, which expose it as the portal container. */\nconst AppShellPortalTargetContext = createContext<((node: HTMLElement | null) => void) | null>(null);\n\n/** Lets `AppShellOverlayPortalLayer` hand its element to the providers, which then prefer it over `<main>`. */\nconst AppShellOverlayLayerTargetContext = createContext<((node: HTMLElement | null) => void) | null>(null);\n\nfunction useAppShellLayoutContext(consumer: string): AppShellLayoutInfo {\n const layout = useContext(AppShellLayoutContext);\n if (!layout) {\n throw new Error(`${consumer} must be rendered inside <AppShellProviders>, which supplies the layout it places regions from.`);\n }\n return layout;\n}\n\n/**\n * Latches the FIRST time the shell becomes ready.\n *\n * `isLayoutReady` derives from configuration presence and can drop transiently after bootstrap (an\n * organization switch reloading config, for example). Replacing the mounted shell with a loading state on such\n * a drop would unmount every provider and zone below it and destroy navigation state — the failure mode\n * `AppLoadingGate` documents. So a layout shows its loading state only while this returns `false`.\n */\nexport function useAppShellFirstReady(isLayoutReady: boolean): boolean {\n const [hasLayoutBeenReady, setHasLayoutBeenReady] = useState(false);\n useEffect(() => {\n if (isLayoutReady) setHasLayoutBeenReady(true);\n }, [isLayoutReady]);\n return hasLayoutBeenReady;\n}\n\n/**\n * The shell's loading state: a centred spinner on the page background, announced politely. What every layout\n * shows while `useAppShellFirstReady` says the shell has never been ready — one component rather than a copy per\n * layout, so the loading state is the same whatever the disposal.\n */\nexport function AppShellLoadingState(): React.JSX.Element {\n return (\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.SHELL} policyOverride={NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE}>\n <div className=\"h-screen w-screen bg-background flex items-center justify-center\" role=\"status\" aria-live=\"polite\">\n <div className=\"text-center\">\n <LoadingSpinner size={32} className=\"text-primary mx-auto mb-field\" aria-hidden=\"true\" />\n </div>\n </div>\n </Surface>\n );\n}\n\nexport interface AppShellProvidersProps {\n /** The result of `useAppShellLayout()`, computed once by the layout and shared with every outlet. */\n layout: AppShellLayoutInfo;\n children: React.ReactNode;\n}\n\n/**\n * The providers every shell region reads, and nothing else — they render no DOM of their own:\n *\n * - `PortalContainerContext`, holding the `<main>` element `AppShellContentOutlet` registers, so overlays opened\n * from any region portal into the content area — or, when the layout renders `AppShellOverlayPortalLayer`, that\n * layer instead;\n * - `HostedComponentInteractionsProvider`, the single owner of the open state and the open hotkey of the\n * interactive hosted components (command menu, notification center, quick switcher), which may be hosted in the\n * menubar and the sidebar at once.\n */\nexport function AppShellProviders({ layout, children }: AppShellProvidersProps): React.JSX.Element {\n const [portalContainer, setPortalContainer] = useState<HTMLElement | null>(null);\n const [overlayLayer, setOverlayLayer] = useState<HTMLElement | null>(null);\n const registerPortalTarget = useCallback((node: HTMLElement | null) => {\n setPortalContainer(node);\n }, []);\n const registerOverlayLayer = useCallback((node: HTMLElement | null) => {\n setOverlayLayer(node);\n }, []);\n return (\n <AppShellLayoutContext.Provider value={layout}>\n <AppShellPortalTargetContext.Provider value={registerPortalTarget}>\n <AppShellOverlayLayerTargetContext.Provider value={registerOverlayLayer}>\n {/* The dedicated overlay layer wins when a layout renders one; otherwise overlays stay in `<main>`. */}\n <PortalContainerContext.Provider value={overlayLayer ?? portalContainer}>\n <HostedComponentInteractionsProvider>{children}</HostedComponentInteractionsProvider>\n </PortalContainerContext.Provider>\n </AppShellOverlayLayerTargetContext.Provider>\n </AppShellPortalTargetContext.Provider>\n </AppShellLayoutContext.Provider>\n );\n}\n\n/**\n * A dedicated layer every overlay (dialog, sheet, menu, popover, tooltip) portals into, for a layout whose regions\n * are TRANSFORMED — a 3D placement. Render it once, inside the providers but OUTSIDE the transformed subtree; the\n * providers then prefer it to `<main>`. A layout that transforms nothing does not need it.\n *\n * It is a zero-size, untransformed box at the shell root's origin (the root fills the viewport), with NO z-index and\n * NOT `position: fixed`: either would make it a stacking context and cap every overlay inside it below anything\n * positioned outside the shell — a consent prompt would paint over the shell's own dialogs (the reordering #1830\n * measured and avoided). So each overlay keeps its own global z-index. An overlay positioned `fixed` still resolves\n * against the viewport (nothing between it and the viewport is transformed), one positioned `absolute` against the\n * root's origin, so floating content lands where its trigger is on screen. The layout's root must be positioned.\n */\nexport function AppShellOverlayPortalLayer(): React.JSX.Element {\n const register = useContext(AppShellOverlayLayerTargetContext);\n if (!register) {\n throw new Error('AppShellOverlayPortalLayer must be rendered inside <AppShellProviders>, which exposes it as the portal container.');\n }\n return <div ref={register} data-shell-overlay-layer=\"\" className=\"absolute left-0 top-0 h-0 w-0\" />;\n}\n\n/**\n * Which region to render, and — for a region that sits at an edge — at which edge. The content area is not\n * among them: it has its own outlet, because it owns `<main>` and the page.\n *\n * `placement` renders the region only when the application configured THAT placement. A layout that places the\n * same region at two positions — as the default layout does for the sidebar's start and end edges — renders one\n * outlet per edge. Omitted, the region renders at whatever placement is configured. The type admits only the\n * placement axis the region has, so a sidebar cannot be asked for a vertical edge and render nothing.\n */\nexport type AppShellRegionOutletProps =\n | { region: ShellRegion.SIDEBAR | ShellRegion.UTILITY_PANEL; placement?: HorizontalPlacement.START | HorizontalPlacement.END }\n | { region: ShellRegion.STATUS_BAR; placement?: StatusBarPlacement }\n | { region: ShellRegion.ACTIVITY_BAR | ShellRegion.MENUBAR | ShellRegion.TOOLBAR; placement?: never };\n\n/**\n * Renders one shell region's component — the registry-resolved wrapper, with its placement prop — when the\n * application configures that region (and, if `placement` is given, at that placement). Renders nothing\n * otherwise, so placing an outlet for every region is always safe.\n */\nexport function AppShellRegionOutlet(props: AppShellRegionOutletProps): React.JSX.Element | null {\n const layout = useAppShellLayoutContext('AppShellRegionOutlet');\n const { region, placement } = props;\n const at = <T extends HorizontalPlacement | VerticalPlacement>(configured: T): T | null =>\n placement === undefined || placement === configured ? configured : null;\n\n switch (region) {\n case ShellRegion.ACTIVITY_BAR:\n return layout.hasActivityBar ? <ApplicationLevel_ActivityBar /> : null;\n case ShellRegion.MENUBAR:\n return layout.hasMenubar ? <ApplicationLevel_MenuBar /> : null;\n case ShellRegion.TOOLBAR:\n return layout.hasToolbar ? <ApplicationLevel_Toolbar /> : null;\n case ShellRegion.SIDEBAR: {\n const sidebarPlacement = at(layout.sidebarPlacement);\n return layout.hasSidebar && sidebarPlacement ? <ApplicationLevel_Sidebar placement={sidebarPlacement} /> : null;\n }\n case ShellRegion.UTILITY_PANEL: {\n const utilityPanelPlacement = at(layout.utilityPanelPlacement);\n // A panel whose trigger the menubar or the sidebar hosts is mounted THERE, as one of that chrome's controls;\n // drawn here as well it would show two triggers. Otherwise it keeps its own place at the shell edge.\n return layout.hasUtilityPanel && utilityPanelPlacement && !layout.utilityPanelHostedInChrome\n ? <ApplicationLevel_UtilityPanel position={utilityPanelPlacement} />\n : null;\n }\n case ShellRegion.STATUS_BAR: {\n const statusBarPlacement = at(layout.statusBarPlacement);\n return layout.hasStatusBar && statusBarPlacement ? <ApplicationLevel_StatusBar placement={statusBarPlacement} /> : null;\n }\n default: {\n const unhandled: never = region;\n throw new Error(`AppShellRegionOutlet has no rendering for region \"${String(unhandled)}\".`);\n }\n }\n}\n\nexport interface AppShellContentOutletProps {\n /** Classes for the `<main>` element — the layout decides how the content area sizes within its arrangement. */\n className?: string;\n /** The route outlet the layout container receives; rendered by the navigation zones while their stack is empty. */\n children?: React.ReactNode;\n}\n\n/**\n * The content area: the `<main>` landmark carrying `ShellRegion.CONTENT`, the navigation zones, and the floating\n * quick-action button when configured. Its element is registered with `AppShellProviders` as the portal\n * container, so it must be rendered exactly once, inside the providers.\n */\nexport function AppShellContentOutlet({ className, children }: AppShellContentOutletProps): React.JSX.Element {\n const layout = useAppShellLayoutContext('AppShellContentOutlet');\n const registerPortalTarget = useContext(AppShellPortalTargetContext);\n return (\n <main ref={registerPortalTarget ?? undefined} data-component-area={ShellRegion.CONTENT} className={className}>\n <NavigationContentAreas routerChildren={children} />\n\n {/* Floating Quick Action Button — unless the chrome already hosts it at this breakpoint. */}\n {layout.hasQuickActionButton && !layout.quickActionButtonHostedInChrome && <ApplicationLevel_QuickActionButton placement=\"floating\" />}\n </main>\n );\n}\n\n/** The shell's overlay layer: navigation dialogs and sheets, then guidance (tours, tooltips, highlights). */\nexport function AppShellOverlaysOutlet(): React.JSX.Element {\n return (\n <>\n <NavigationOverlays />\n <GuidanceRenderer />\n </>\n );\n}\n/** @wildo_source:part:end saas.frontend.app-shell.building-blocks */\n"]}
|
|
1
|
+
{"version":3,"file":"AppShellBuildingBlocks.js","sourceRoot":"","sources":["../../../../src/core/app-shell/AppShellBuildingBlocks.ts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,EAAE,kBAAkB,GAAI,CAAC,CAAC,CAAC,IAAI,CAAC;QAC1H,CAAC;QACD,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,SAAS,GAAU,MAAM,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,qDAAqD,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC9F,CAAC;IACH,CAAC;AACH,CAAC;AASD;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAA8B;IACvF,MAAM,MAAM,GAAG,wBAAwB,CAAC,uBAAuB,CAAC,CAAC;IACjE,MAAM,oBAAoB,GAAG,UAAU,CAAC,2BAA2B,CAAC,CAAC;IACrE,OAAO,CACL,gBAAM,GAAG,EAAE,oBAAoB,IAAI,SAAS,yBAAuB,WAAW,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,aAC1G,KAAC,sBAAsB,IAAC,cAAc,EAAE,QAAQ,GAAI,EAGnD,MAAM,CAAC,oBAAoB,IAAI,CAAC,MAAM,CAAC,+BAA+B,IAAI,KAAC,kCAAkC,IAAC,SAAS,EAAC,UAAU,GAAG,IACjI,CACR,CAAC;AACJ,CAAC;AAED,6GAA6G;AAC7G,MAAM,UAAU,sBAAsB;IACpC,OAAO,CACL,8BACE,KAAC,kBAAkB,KAAG,EACtB,KAAC,gBAAgB,KAAG,IACnB,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import React, { createContext, useCallback, useContext, useEffect, useState } from 'react';\n\nimport { HorizontalPlacement, ShellRegion, SurfaceVariant, VerticalPlacement } from '@wildo-ai/presets-components-models';\nimport { LoadingSpinner } from '~wildo-frontend-lib/components/feedback/loading-spinner';\nimport { Surface } from '~wildo-frontend-lib/components/sections/surface';\nimport { NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE } from '~wildo-frontend-lib/core/ui/surface-a11y.utils';\nimport { ApplicationLevel_ActivityBar } from '~wildo-frontend-lib/components/navigation/app-level/ApplicationLevel_ActivityBar';\nimport { ApplicationLevel_MenuBar } from '~wildo-frontend-lib/components/navigation/app-level/ApplicationLevel_MenuBar';\nimport { ApplicationLevel_QuickActionButton } from '~wildo-frontend-lib/components/navigation/app-level/ApplicationLevel_QuickActionButton';\nimport { ApplicationLevel_Sidebar } from '~wildo-frontend-lib/components/navigation/app-level/ApplicationLevel_Sidebar';\nimport { ApplicationLevel_StatusBar } from '~wildo-frontend-lib/components/navigation/app-level/ApplicationLevel_StatusBar';\nimport { ApplicationLevel_Toolbar } from '~wildo-frontend-lib/components/navigation/app-level/ApplicationLevel_Toolbar';\nimport { ApplicationLevel_UtilityPanel } from '~wildo-frontend-lib/components/navigation/app-level/ApplicationLevel_UtilityPanel';\nimport { HostedComponentInteractionsProvider } from '~wildo-frontend-lib/components/navigation/app-level/HostedComponentInteractionsProvider';\nimport { GuidanceRenderer } from '~wildo-frontend-lib/core/guidance/GuidanceRenderer';\nimport { NavigationContentAreas, NavigationOverlays } from '~wildo-frontend-lib/core/navigation/NavigationContentAreas';\n\nimport type { StatusBarPlacement } from '~wildo-frontend-lib/core/config/app-level-components.frontend.schemas';\n\nimport type { AppShellLayoutInfo } from './app-shell.schemas';\nimport { PortalContainerContext } from './PortalContainerContext';\n\n/** @wildo_source:part:start saas.frontend.app-shell.building-blocks facet:layer:frontend facet:family:app-shell facet:audience:app-developer */\n/**\n * # App shell building blocks\n *\n * The signed-in shell is a LAYOUT — where the regions sit — over parts that do not depend on the layout: the\n * region components themselves (each resolved from the component registry by its wrapper), the content area,\n * the overlays, and two providers every region reads. These building blocks are those parts, so a layout\n * preset only decides the ARRANGEMENT. `AppLayoutPreset_MainContainer_Default` is composed from them, and any\n * other layout container an application registers should be too — a different arrangement of the same regions,\n * or, later, an alternative rendering that draws decoration around them.\n *\n * A layout preset uses them like this:\n *\n * ```tsx\n * const layout = useAppShellLayout();\n * const hasBeenReady = useAppShellFirstReady(layout.isLayoutReady);\n * if (!layout.isLayoutReady && !hasBeenReady) return <AppShellLoadingState />;\n * return (\n * <AppShellProviders layout={layout}>\n * <div className=\"my-arrangement\">\n * <AppShellRegionOutlet region={ShellRegion.SIDEBAR} placement={HorizontalPlacement.START} />\n * <AppShellRegionOutlet region={ShellRegion.MENUBAR} />\n * <AppShellContentOutlet className=\"flex-1 relative min-w-0\">{children}</AppShellContentOutlet>\n * <AppShellOverlaysOutlet />\n * </div>\n * </AppShellProviders>\n * );\n * ```\n *\n * Four rules keep a custom layout correct:\n *\n * - **Render `AppShellProviders` exactly once, around the whole shell.** It owns the single open state and the\n * single hotkey registration of the command menu, notification center and quick switcher; two copies would\n * make one shortcut open two dialogs.\n * - **Place every region the application configures.** An outlet renders nothing when its region is not\n * configured, so placing an outlet is always safe; leaving one out silently drops a region.\n * - **Render `AppShellContentOutlet` exactly once.** It is the `<main>` landmark, and overlays portal into it —\n * unless the layout also renders `AppShellOverlayPortalLayer`, which then takes the overlays instead. A layout that\n * transforms its regions (a 3D placement) must render that layer OUTSIDE the transformed subtree: a transformed\n * ancestor is the containing block of every `position: fixed` descendant, so a dialog in `<main>` would be confined\n * to the pane and a menu would be placed in the wrong coordinates.\n * - **Give the root `position: relative`, not `isolation: isolate`,** when the theme may declare a background\n * layer. That layer is painted in its own stacking context above ordinary in-flow content, so shell text with\n * no positioned ancestor is painted UNDER it; positioning the root lifts the whole shell above it. `isolate`\n * would also lift it, but would make the shell one stacking context, so an overlay outside the shell with a\n * lower z-index (a consent prompt) would paint over the shell's own dialogs.\n */\n\n/** The layout decisions `useAppShellLayout()` computed, shared with every outlet below the providers. */\nconst AppShellLayoutContext = createContext<AppShellLayoutInfo | null>(null);\n\n/** Lets the content outlet hand its `<main>` element to the providers, which expose it as the portal container. */\nconst AppShellPortalTargetContext = createContext<((node: HTMLElement | null) => void) | null>(null);\n\n/** Lets `AppShellOverlayPortalLayer` hand its element to the providers, which then prefer it over `<main>`. */\nconst AppShellOverlayLayerTargetContext = createContext<((node: HTMLElement | null) => void) | null>(null);\n\nfunction useAppShellLayoutContext(consumer: string): AppShellLayoutInfo {\n const layout = useContext(AppShellLayoutContext);\n if (!layout) {\n throw new Error(`${consumer} must be rendered inside <AppShellProviders>, which supplies the layout it places regions from.`);\n }\n return layout;\n}\n\n/**\n * Latches the FIRST time the shell becomes ready.\n *\n * `isLayoutReady` derives from configuration presence and can drop transiently after bootstrap (an\n * organization switch reloading config, for example). Replacing the mounted shell with a loading state on such\n * a drop would unmount every provider and zone below it and destroy navigation state — the failure mode\n * `AppLoadingGate` documents. So a layout shows its loading state only while this returns `false`.\n */\nexport function useAppShellFirstReady(isLayoutReady: boolean): boolean {\n const [hasLayoutBeenReady, setHasLayoutBeenReady] = useState(false);\n useEffect(() => {\n if (isLayoutReady) setHasLayoutBeenReady(true);\n }, [isLayoutReady]);\n return hasLayoutBeenReady;\n}\n\n/**\n * The shell's loading state: a centred spinner on the page background, announced politely. What every layout\n * shows while `useAppShellFirstReady` says the shell has never been ready — one component rather than a copy per\n * layout, so the loading state is the same whatever the disposal.\n */\nexport function AppShellLoadingState(): React.JSX.Element {\n return (\n <Surface asChild emitPolicyVars={false} variant={SurfaceVariant.SHELL} policyOverride={NON_CANONICAL_SHELL_SURFACE_POLICY_OVERRIDE}>\n <div className=\"h-screen w-screen bg-background flex items-center justify-center\" role=\"status\" aria-live=\"polite\">\n <div className=\"text-center\">\n <LoadingSpinner size={32} className=\"text-primary mx-auto mb-field\" aria-hidden=\"true\" />\n </div>\n </div>\n </Surface>\n );\n}\n\nexport interface AppShellProvidersProps {\n /** The result of `useAppShellLayout()`, computed once by the layout and shared with every outlet. */\n layout: AppShellLayoutInfo;\n children: React.ReactNode;\n}\n\n/**\n * The providers every shell region reads, and nothing else — they render no DOM of their own:\n *\n * - `PortalContainerContext`, holding the `<main>` element `AppShellContentOutlet` registers, so overlays opened\n * from any region portal into the content area — or, when the layout renders `AppShellOverlayPortalLayer`, that\n * layer instead;\n * - `HostedComponentInteractionsProvider`, the single owner of the open state and the open hotkey of the\n * interactive hosted components (command menu, notification center, quick switcher), which may be hosted in the\n * menubar and the sidebar at once.\n */\nexport function AppShellProviders({ layout, children }: AppShellProvidersProps): React.JSX.Element {\n const [portalContainer, setPortalContainer] = useState<HTMLElement | null>(null);\n const [overlayLayer, setOverlayLayer] = useState<HTMLElement | null>(null);\n const registerPortalTarget = useCallback((node: HTMLElement | null) => {\n setPortalContainer(node);\n }, []);\n const registerOverlayLayer = useCallback((node: HTMLElement | null) => {\n setOverlayLayer(node);\n }, []);\n return (\n <AppShellLayoutContext.Provider value={layout}>\n <AppShellPortalTargetContext.Provider value={registerPortalTarget}>\n <AppShellOverlayLayerTargetContext.Provider value={registerOverlayLayer}>\n {/* The dedicated overlay layer wins when a layout renders one; otherwise overlays stay in `<main>`. */}\n <PortalContainerContext.Provider value={overlayLayer ?? portalContainer}>\n <HostedComponentInteractionsProvider>{children}</HostedComponentInteractionsProvider>\n </PortalContainerContext.Provider>\n </AppShellOverlayLayerTargetContext.Provider>\n </AppShellPortalTargetContext.Provider>\n </AppShellLayoutContext.Provider>\n );\n}\n\n/**\n * A dedicated layer every overlay (dialog, sheet, menu, popover, tooltip) portals into, for a layout whose regions\n * are TRANSFORMED — a 3D placement. Render it once, inside the providers but OUTSIDE the transformed subtree; the\n * providers then prefer it to `<main>`. A layout that transforms nothing does not need it.\n *\n * It is a zero-size, untransformed box at the shell root's origin (the root fills the viewport), with NO z-index and\n * NOT `position: fixed`: either would make it a stacking context and cap every overlay inside it below anything\n * positioned outside the shell — a consent prompt would paint over the shell's own dialogs (a reordering measured\n * and avoided when the theme's background layer hid the status bar). So each overlay keeps its own global z-index. An overlay positioned `fixed` still resolves\n * against the viewport (nothing between it and the viewport is transformed), one positioned `absolute` against the\n * root's origin, so floating content lands where its trigger is on screen. The layout's root must be positioned.\n */\nexport function AppShellOverlayPortalLayer(): React.JSX.Element {\n const register = useContext(AppShellOverlayLayerTargetContext);\n if (!register) {\n throw new Error('AppShellOverlayPortalLayer must be rendered inside <AppShellProviders>, which exposes it as the portal container.');\n }\n return <div ref={register} data-shell-overlay-layer=\"\" className=\"absolute left-0 top-0 h-0 w-0\" />;\n}\n\n/**\n * Which region to render, and — for a region that sits at an edge — at which edge. The content area is not\n * among them: it has its own outlet, because it owns `<main>` and the page.\n *\n * `placement` renders the region only when the application configured THAT placement. A layout that places the\n * same region at two positions — as the default layout does for the sidebar's start and end edges — renders one\n * outlet per edge. Omitted, the region renders at whatever placement is configured. The type admits only the\n * placement axis the region has, so a sidebar cannot be asked for a vertical edge and render nothing.\n */\nexport type AppShellRegionOutletProps =\n | { region: ShellRegion.SIDEBAR | ShellRegion.UTILITY_PANEL; placement?: HorizontalPlacement.START | HorizontalPlacement.END }\n | { region: ShellRegion.STATUS_BAR; placement?: StatusBarPlacement }\n | { region: ShellRegion.ACTIVITY_BAR | ShellRegion.MENUBAR | ShellRegion.TOOLBAR; placement?: never };\n\n/**\n * Renders one shell region's component — the registry-resolved wrapper, with its placement prop — when the\n * application configures that region (and, if `placement` is given, at that placement). Renders nothing\n * otherwise, so placing an outlet for every region is always safe.\n */\nexport function AppShellRegionOutlet(props: AppShellRegionOutletProps): React.JSX.Element | null {\n const layout = useAppShellLayoutContext('AppShellRegionOutlet');\n const { region, placement } = props;\n const at = <T extends HorizontalPlacement | VerticalPlacement>(configured: T): T | null =>\n placement === undefined || placement === configured ? configured : null;\n\n switch (region) {\n case ShellRegion.ACTIVITY_BAR:\n return layout.hasActivityBar ? <ApplicationLevel_ActivityBar /> : null;\n case ShellRegion.MENUBAR:\n return layout.hasMenubar ? <ApplicationLevel_MenuBar /> : null;\n case ShellRegion.TOOLBAR:\n return layout.hasToolbar ? <ApplicationLevel_Toolbar /> : null;\n case ShellRegion.SIDEBAR: {\n const sidebarPlacement = at(layout.sidebarPlacement);\n return layout.hasSidebar && sidebarPlacement ? <ApplicationLevel_Sidebar placement={sidebarPlacement} /> : null;\n }\n case ShellRegion.UTILITY_PANEL: {\n const utilityPanelPlacement = at(layout.utilityPanelPlacement);\n // A panel whose trigger the menubar or the sidebar hosts is mounted THERE, as one of that chrome's controls;\n // drawn here as well it would show two triggers. Otherwise it keeps its own place at the shell edge.\n return layout.hasUtilityPanel && utilityPanelPlacement && !layout.utilityPanelHostedInChrome\n ? <ApplicationLevel_UtilityPanel position={utilityPanelPlacement} />\n : null;\n }\n case ShellRegion.STATUS_BAR: {\n const statusBarPlacement = at(layout.statusBarPlacement);\n return layout.hasStatusBar && statusBarPlacement ? <ApplicationLevel_StatusBar placement={statusBarPlacement} /> : null;\n }\n default: {\n const unhandled: never = region;\n throw new Error(`AppShellRegionOutlet has no rendering for region \"${String(unhandled)}\".`);\n }\n }\n}\n\nexport interface AppShellContentOutletProps {\n /** Classes for the `<main>` element — the layout decides how the content area sizes within its arrangement. */\n className?: string;\n /** The route outlet the layout container receives; rendered by the navigation zones while their stack is empty. */\n children?: React.ReactNode;\n}\n\n/**\n * The content area: the `<main>` landmark carrying `ShellRegion.CONTENT`, the navigation zones, and the floating\n * quick-action button when configured. Its element is registered with `AppShellProviders` as the portal\n * container, so it must be rendered exactly once, inside the providers.\n */\nexport function AppShellContentOutlet({ className, children }: AppShellContentOutletProps): React.JSX.Element {\n const layout = useAppShellLayoutContext('AppShellContentOutlet');\n const registerPortalTarget = useContext(AppShellPortalTargetContext);\n return (\n <main ref={registerPortalTarget ?? undefined} data-component-area={ShellRegion.CONTENT} className={className}>\n <NavigationContentAreas routerChildren={children} />\n\n {/* Floating Quick Action Button — unless the chrome already hosts it at this breakpoint. */}\n {layout.hasQuickActionButton && !layout.quickActionButtonHostedInChrome && <ApplicationLevel_QuickActionButton placement=\"floating\" />}\n </main>\n );\n}\n\n/** The shell's overlay layer: navigation dialogs and sheets, then guidance (tours, tooltips, highlights). */\nexport function AppShellOverlaysOutlet(): React.JSX.Element {\n return (\n <>\n <NavigationOverlays />\n <GuidanceRenderer />\n </>\n );\n}\n/** @wildo_source:part:end saas.frontend.app-shell.building-blocks */\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ShellRegion } from '@wildo-ai/presets-components-models';
|
|
2
2
|
/** @wildo_source:part:start saas.frontend.app-shell.shell-motion-contract facet:layer:frontend facet:family:app-shell facet:audience:app-developer */
|
|
3
3
|
/**
|
|
4
|
-
* The motion building blocks a layout composes
|
|
4
|
+
* The motion building blocks a layout composes. They are the MECHANICS every animated layout needs — which
|
|
5
5
|
* pane is in front, which zone just opened or changed place, the picture a dismissed or hidden pane leaves behind, the
|
|
6
6
|
* dip a pane or a column makes while it changes — and none of them knows which way things move. That is the axis's
|
|
7
7
|
* (`ShellMotionAxis`): a depth axis moves along z (the focal-plane 3D layout), a flat axis slides, scales and fades.
|
|
@@ -101,7 +101,7 @@ export interface ShellMotionAxis {
|
|
|
101
101
|
* With `FROM_PRESSED_ELEMENT`: carry the arrival out as a browser VIEW TRANSITION where the browser has one
|
|
102
102
|
* (`document.startViewTransition`) — the navigation's commit runs inside it, and the browser morphs the pressed row
|
|
103
103
|
* into the pane from pictures of the screen before and after. Where it has none, or nothing was pressed, the proxy
|
|
104
|
-
* flies as usual, so the arrival never depends on it. Absent means no.
|
|
104
|
+
* flies as usual, so the arrival never depends on it. Absent means no.
|
|
105
105
|
*/
|
|
106
106
|
paneArrivalByViewTransition?: boolean;
|
|
107
107
|
/** How an emphasized pane changes size (`ShellPaneResize`). */
|
|
@@ -146,8 +146,8 @@ export declare const SHELL_GHOST_ATTRIBUTE = "data-shell-ghost";
|
|
|
146
146
|
* that kept these was found by those queries as though it were the thing it shows.
|
|
147
147
|
*
|
|
148
148
|
* Measured 2026-11-14 on Wonder Todos (morph layout): a closed todo pane's picture kept `data-navigation-back` for the
|
|
149
|
-
* ~650ms it took to leave, so a lookup of the pane's back control found the picture's (
|
|
150
|
-
*
|
|
149
|
+
* ~650ms it took to leave, so a lookup of the pane's back control found the picture's (a browser test of the navigation
|
|
150
|
+
* zones had to wait it out). It never took a click (inert, `pointer-events: none`: the point under it hit the list), but
|
|
151
151
|
* the zone's own back control is identified by that attribute, and a picture must not answer to it.
|
|
152
152
|
*
|
|
153
153
|
* Styling hooks (`data-slot`, `data-state`) are NOT here: a picture keeps the look of what it shows. A caller that
|
|
@@ -2,7 +2,7 @@ import { ShellRegion } from '@wildo-ai/presets-components-models';
|
|
|
2
2
|
import { NavigationZoneName } from '@wildo-ai/saas-models';
|
|
3
3
|
/** @wildo_source:part:start saas.frontend.app-shell.shell-motion-contract facet:layer:frontend facet:family:app-shell facet:audience:app-developer */
|
|
4
4
|
/**
|
|
5
|
-
* The motion building blocks a layout composes
|
|
5
|
+
* The motion building blocks a layout composes. They are the MECHANICS every animated layout needs — which
|
|
6
6
|
* pane is in front, which zone just opened or changed place, the picture a dismissed or hidden pane leaves behind, the
|
|
7
7
|
* dip a pane or a column makes while it changes — and none of them knows which way things move. That is the axis's
|
|
8
8
|
* (`ShellMotionAxis`): a depth axis moves along z (the focal-plane 3D layout), a flat axis slides, scales and fades.
|
|
@@ -95,8 +95,8 @@ export const SHELL_GHOST_ATTRIBUTE = 'data-shell-ghost';
|
|
|
95
95
|
* that kept these was found by those queries as though it were the thing it shows.
|
|
96
96
|
*
|
|
97
97
|
* Measured 2026-11-14 on Wonder Todos (morph layout): a closed todo pane's picture kept `data-navigation-back` for the
|
|
98
|
-
* ~650ms it took to leave, so a lookup of the pane's back control found the picture's (
|
|
99
|
-
*
|
|
98
|
+
* ~650ms it took to leave, so a lookup of the pane's back control found the picture's (a browser test of the navigation
|
|
99
|
+
* zones had to wait it out). It never took a click (inert, `pointer-events: none`: the point under it hit the list), but
|
|
100
100
|
* the zone's own back control is identified by that attribute, and a picture must not answer to it.
|
|
101
101
|
*
|
|
102
102
|
* Styling hooks (`data-slot`, `data-state`) are NOT here: a picture keeps the look of what it shows. A caller that
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell-motion-vocabulary.js","sourceRoot":"","sources":["../../../../../src/core/app-shell/shell-motion/shell-motion-vocabulary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC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cAAc,CAAC,aAAa,CAAC,EAAE,gDAAgD;IAChF,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,gDAAgD;IACpF,CAAC,cAAc,CAAC,YAAY,CAAC,EAAE,+CAA+C;IAC9E,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,+CAA+C;IAClF,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,0CAA0C;IACpE,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,6CAA6C;IAC1E,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,0CAA0C;IACpE,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,yCAAyC;IAClE,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,0CAA0C;IACpE,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,0CAA0C;CACzE,CAAC;AAEF,8EAA8E;AAC9E,MAAM,CAAC,MAAM,yBAAyB,GAA8B,CAAC,cAAc,CAAC,MAAM,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;AAEzH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAA8B,CAAC,cAAc,CAAC,MAAM,EAAE,cAAc,CAAC,YAAY,EAAE,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;AAEpK,0HAA0H;AAC1H,MAAM,CAAC,MAAM,uBAAuB,GAAsB,CAAC,MAAM,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC;AAEnG;;;;GAIG;AACH,MAAM,UAAU,oBAAoB;IAClC,OAAO,uCAAuC,uBAAuB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC;AACjJ,CAAC;AACD,2EAA2E","sourcesContent":["import { ShellRegion } from '@wildo-ai/presets-components-models';\nimport { NavigationZoneName } from '@wildo-ai/saas-models';\n\n/** @wildo_source:part:start saas.frontend.app-shell.shell-motion-contract facet:layer:frontend facet:family:app-shell facet:audience:app-developer */\n/**\n * The motion building blocks a layout composes (#2052). They are the MECHANICS every animated layout needs — which\n * pane is in front, which zone just opened or changed place, the picture a dismissed or hidden pane leaves behind, the\n * dip a pane or a column makes while it changes — and none of them knows which way things move. That is the axis's\n * (`ShellMotionAxis`): a depth axis moves along z (the focal-plane 3D layout), a flat axis slides, scales and fades.\n *\n * Nothing here writes on a region the engine renders. Ghosts are pictures in the layout's own layers, dips play\n * through the Web Animations API (nothing is left on the element when they finish), and objects are the layout's own\n * wrappers plus the navigation panes found by the engine's markers.\n */\n\n/** How a navigation zone's place moved between two renders. */\nexport enum ShellPlaceChange {\n /** The zone held nothing and now holds a place: a pane opened. */\n APPEARED = 'appeared',\n /** The zone showed one place and now shows another, in the same pane. */\n CHANGED = 'changed',\n}\n\n/** Where a ghost — the picture of a pane that was dismissed or hidden — stands. */\nexport enum ShellGhostPose {\n /** Where the pane stood: a ghost starts here, and a picture left behind returns here before it goes. */\n REST = 'rest',\n /** Stepped back behind an expanded pane, dimmed: the picture of a pane the expansion hid. */\n BEHIND = 'behind',\n /** Gone: where a dismissed pane flies to as it fades. */\n DISCARDED = 'discarded',\n}\n\n/** What a dip — a brief move away and back — acknowledges. */\nexport enum ShellMotionDip {\n /** A pane's content changed in place (the same zone shows another place). */\n PANE_SWAP = 'pane-swap',\n /** A side column (the sidebar or a utility panel) changed width, and the panes re-arranged. */\n COLUMN_RESIZE = 'column-resize',\n}\n\n/** How a side pane arrives when it opens. */\nexport enum ShellPaneArrival {\n /** The layout's stylesheet animates the pane as it mounts (a keyframe on the pane). */\n STYLESHEET = 'stylesheet',\n /**\n * The pane GROWS OUT OF the element that was pressed to open it: a proxy box flies from the pressed row to the\n * pane's box, and the core reveals the pane on the flight's own clock (hidden for `SHELL_PROXY_FLIGHT_SHARE` of the\n * motion, then faded in). A layout's stylesheet MAY also hold the arriving pane for that share — only as the fallback\n * when there is nothing to fly from (a pane opened by URL), where the pane then simply appears when the hold ends.\n * An axis may ask the browser to carry it out instead, as a view transition (`paneArrivalByViewTransition`).\n */\n FROM_PRESSED_ELEMENT = 'from-pressed-element',\n}\n\n/** How a pane changes size when it is emphasized (takes the width) or given back its place. */\nexport enum ShellPaneResize {\n /** At once, as the engine lays it out. */\n INSTANT = 'instant',\n /** The emphasized pane grows from the box it had to the width it takes; given back its place, it slides home. */\n GROW = 'grow',\n}\n\n/** How a modal popup (a dialog, a sheet) arrives. */\nexport enum ShellDialogArrival {\n /** The layout's stylesheet animates it (a keyframe on its content slot). */\n STYLESHEET = 'stylesheet',\n /**\n * It GROWS OUT OF its trigger: a proxy flies from the pressed control to the dialog's box, and the core reveals the\n * dialog on the flight's own clock. A stylesheet hold is optional, the fallback when no control was pressed.\n */\n FROM_PRESSED_ELEMENT = 'from-pressed-element',\n}\n\n/**\n * The share of the motion a proxy flies before the element it stands for appears (the rest of the motion reveals\n * it). The core reveals the arriving element on the SAME clock as the flight (a script animation that sits above any\n * stylesheet animation), so the two can never drift apart; a layout's stylesheet may also hold the element for this\n * share, as the fallback when there is nothing to fly from (a pane opened by URL).\n */\nexport const SHELL_PROXY_FLIGHT_SHARE = 0.55;\n\n/** The attribute on a proxy the core flies. A layout may restyle it (the core paints it from theme tokens inline). */\nexport const SHELL_PROXY_ATTRIBUTE = 'data-shell-proxy';\n\n/** An element's laid-out box in the stage (untransformed), as last measured. */\nexport interface ShellStageRect {\n left: number;\n top: number;\n width: number;\n height: number;\n}\n\n/**\n * Which way a layout moves things. The building blocks decide WHEN something moves and WHAT; the axis decides only\n * the pose it moves to. A layout builds one from its settings and memoizes it: the hooks re-arm when it changes.\n */\nexport interface ShellMotionAxis {\n /** How long every motion lasts, in milliseconds. `0` turns the motion building blocks off (reduced motion). */\n durationMs: number;\n /** The timing function of the dips (a CSS easing). */\n easing: string;\n /**\n * Whether a pane an expansion hides leaves a still picture of itself behind the expanded pane. Only an axis whose\n * panes are SEEN THROUGH should say yes (the focal plane's glass windows). Where panes paint nothing of their own\n * — a 2D shell under a CONTINUOUS theme — the picture shows through the expanded pane and its text overlaps the\n * expanded pane's text (measured on the glide layout, 2026-09-30).\n */\n drawsHiddenPanePicture: boolean;\n /** How a side pane arrives (`ShellPaneArrival`). */\n paneArrival: ShellPaneArrival;\n /**\n * With `FROM_PRESSED_ELEMENT`: carry the arrival out as a browser VIEW TRANSITION where the browser has one\n * (`document.startViewTransition`) — the navigation's commit runs inside it, and the browser morphs the pressed row\n * into the pane from pictures of the screen before and after. Where it has none, or nothing was pressed, the proxy\n * flies as usual, so the arrival never depends on it. Absent means no. Evaluated on #2055.\n */\n paneArrivalByViewTransition?: boolean;\n /** How an emphasized pane changes size (`ShellPaneResize`). */\n paneResize: ShellPaneResize;\n /** How a modal popup arrives (`ShellDialogArrival`). */\n dialogArrival: ShellDialogArrival;\n /**\n * Whether the rows of a pane cascade in when the pane opens or shows another place. Rows are recognised by shape\n * (the largest group of wide, row-high siblings in the pane), so it holds for tables, card lists and custom rows.\n */\n cascadesRows: boolean;\n /**\n * The style properties a ghost takes at a pose — standard or custom properties, kebab-case (`transform`,\n * `--fp-z`). Opacity is not the axis's: a ghost always fades as it goes and appears as it steps back. The layout's\n * stylesheet transitions these properties on `[data-shell-ghost]`.\n */\n ghostPose(pose: ShellGhostPose, placement: { rect: ShellStageRect; stage: HTMLElement }): Readonly<Record<string, string>>;\n /**\n * The peak keyframe of a dip. The first and last keyframes are implicit: the element leaves and returns to its rest.\n * `stage` is the layout's stage, for a dip that travels sideways and must mirror right to left.\n */\n dipPeak(dip: ShellMotionDip, placement: { stage: HTMLElement }): Keyframe;\n}\n\n/**\n * The attribute a layout container puts on each wrapper it draws a region in. Wrappers are the layout's own\n * elements, so they may be moved; the region inside keeps the engine's markup untouched.\n */\nexport const SHELL_OBJECT_ATTRIBUTE = 'data-shell-object';\n/** The attribute of the layout's two ghost layers: `back` (under the regions) and `front` (above them). */\nexport const SHELL_GHOST_LAYER_ATTRIBUTE = 'data-shell-ghost-layer';\n/** The attribute every ghost carries, with its kind (`ShellGhostKind`). */\nexport const SHELL_GHOST_ATTRIBUTE = 'data-shell-ghost';\n\n/**\n * The markers a still picture of an engine element must NOT carry: everything a query for the real element, or for a\n * control inside it, finds it by. A picture (a discarded pane leaving, an image behind an expanded pane, a pressed row\n * flying into its pane) is inert and takes no pointer, but it is still in the document while it fades, and a picture\n * that kept these was found by those queries as though it were the thing it shows.\n *\n * Measured 2026-11-14 on Wonder Todos (morph layout): a closed todo pane's picture kept `data-navigation-back` for the\n * ~650ms it took to leave, so a lookup of the pane's back control found the picture's (#3764 had to wait it out in\n * `browser-nav-zones`). It never took a click (inert, `pointer-events: none`: the point under it hit the list), but\n * the zone's own back control is identified by that attribute, and a picture must not answer to it.\n *\n * Styling hooks (`data-slot`, `data-state`) are NOT here: a picture keeps the look of what it shows. A caller that\n * needs a narrower picture strips more on its own.\n */\nexport const SHELL_PICTURE_STRIPPED_ATTRIBUTES: readonly string[] = [\n 'id',\n // The engine's pane and region markers.\n 'data-content-area',\n 'data-panel-id',\n 'data-zone-hidden',\n 'data-zone-emphasized',\n 'data-component-area',\n SHELL_OBJECT_ATTRIBUTE,\n // The engine's control hooks: a zone's back control, an operation's trigger, a navigation item, a rail entry.\n 'data-navigation-back',\n 'data-operation-id',\n 'data-nav-item-id',\n 'data-ref',\n];\n\n/** The two kinds of ghost. */\nexport enum ShellGhostKind {\n /** A dismissed side pane, flying away. */\n DISCARDED = 'discarded',\n /** A still image of a pane an expansion hid. */\n BEHIND = 'behind',\n}\n\n/** The two ghost layers. */\nexport enum ShellGhostLayer {\n BACK = 'back',\n FRONT = 'front',\n}\n\n/**\n * The selector of one shell region, by the marker its preset writes (`data-component-area`, from `ShellRegion`). The\n * one place a layout spells it, so a region is always found by the enum and never by a literal.\n */\nexport function shellRegionSelector(region: ShellRegion): string {\n return `[data-component-area=\"${region}\"]`;\n}\n\nconst CONTENT = shellRegionSelector(ShellRegion.CONTENT);\n\n/**\n * The navigation panes inside the content region, by the engine's own markers: the zone itself in the static and\n * single-zone branches (`[data-content-area]`), the panel in the resizable branch (`[data-panel-id^=\"nav-\"]`) — never\n * the zone INSIDE a panel, which would be moved twice and clipped by the panel's `overflow: hidden`.\n */\nexport const SHELL_PANE_SELECTOR = `${CONTENT} [data-content-area]:not([data-panel-id] *), ${CONTENT} [data-panel-id^=\"nav-\"]`;\n\n/** The pane of one zone, in either branch (a plain selector list: `:not()` nested in `:is()` is beyond some engines). */\nexport function shellPaneSelectorForZone(zone: string): string {\n return `${CONTENT} [data-content-area=\"${zone}\"]:not([data-panel-id] *), ${CONTENT} [data-panel-id=\"nav-${zone}\"]`;\n}\n\n/** The zone a pane element shows, read from the engine's markers; `undefined` for anything else. */\nexport function shellPaneZone(element: Element): string | undefined {\n if (!(element instanceof HTMLElement)) return undefined;\n return element.dataset.contentArea ?? element.dataset.panelId?.replace(/^nav-/, '');\n}\n\nconst SIDE_ZONES: ReadonlySet<string> = new Set([NavigationZoneName.SECONDARY, NavigationZoneName.COMPANION]);\n\n/** Whether a pane shows a SIDE zone — the only kind a person dismisses (the primary pane leaves only on a remount). */\nexport function isShellSidePane(element: Element): boolean {\n const zone = shellPaneZone(element);\n return zone !== undefined && SIDE_ZONES.has(zone);\n}\n\n/** Whether a zone is a SIDE zone (secondary, companion): the panes that open beside the list. */\nexport function isShellSideZone(zone: string): boolean {\n return SIDE_ZONES.has(zone);\n}\n\n/**\n * The portalled popups a layout may move, by the `data-slot` their content element carries (the presets write these\n * values; Radix writes `data-state` on the same element). A closed list: a layout keys its popup motion on it, never\n * on a role or a class.\n */\nexport enum ShellPopupSlot {\n DROPDOWN_MENU = 'dropdown-menu-content',\n DROPDOWN_MENU_SUB = 'dropdown-menu-sub-content',\n CONTEXT_MENU = 'context-menu-content',\n CONTEXT_MENU_SUB = 'context-menu-sub-content',\n POPOVER = 'popover-content',\n HOVER_CARD = 'hover-card-content',\n TOOLTIP = 'tooltip-content',\n SELECT = 'select-content',\n MENUBAR = 'menubar-content',\n MENUBAR_SUB = 'menubar-sub-content',\n DIALOG = 'dialog-content',\n ALERT_DIALOG = 'alert-dialog-content',\n SHEET = 'sheet-content',\n DRAWER = 'drawer-content',\n}\n\n/**\n * The popups anchored to a trigger, each with the CSS variable Radix publishes as its trigger-relative origin: the\n * point a layout lifts or scales such a popup from.\n */\nexport const SHELL_ANCHORED_POPUP_ORIGINS: Readonly<Partial<Record<ShellPopupSlot, string>>> = {\n [ShellPopupSlot.DROPDOWN_MENU]: '--radix-dropdown-menu-content-transform-origin',\n [ShellPopupSlot.DROPDOWN_MENU_SUB]: '--radix-dropdown-menu-content-transform-origin',\n [ShellPopupSlot.CONTEXT_MENU]: '--radix-context-menu-content-transform-origin',\n [ShellPopupSlot.CONTEXT_MENU_SUB]: '--radix-context-menu-content-transform-origin',\n [ShellPopupSlot.POPOVER]: '--radix-popover-content-transform-origin',\n [ShellPopupSlot.HOVER_CARD]: '--radix-hover-card-content-transform-origin',\n [ShellPopupSlot.TOOLTIP]: '--radix-tooltip-content-transform-origin',\n [ShellPopupSlot.SELECT]: '--radix-select-content-transform-origin',\n [ShellPopupSlot.MENUBAR]: '--radix-menubar-content-transform-origin',\n [ShellPopupSlot.MENUBAR_SUB]: '--radix-menubar-content-transform-origin',\n};\n\n/** The centred dialogs: no trigger origin, they open over the whole shell. */\nexport const SHELL_CENTRED_POPUP_SLOTS: readonly ShellPopupSlot[] = [ShellPopupSlot.DIALOG, ShellPopupSlot.ALERT_DIALOG];\n\n/**\n * The MODAL popups: while one is open the rest of the shell is not what the person works in. Keyed on the content\n * slot, deliberately never on `role=\"dialog\"` — a Radix popover carries that role too (date pickers, record pickers,\n * the notification centre), and treating it as modal steps back the form being edited — nor on\n * `body[data-scroll-locked]`, which dropdown and context menus also set.\n */\nexport const SHELL_MODAL_POPUP_SLOTS: readonly ShellPopupSlot[] = [ShellPopupSlot.DIALOG, ShellPopupSlot.ALERT_DIALOG, ShellPopupSlot.SHEET, ShellPopupSlot.DRAWER];\n\n/** The `data-state` values of an OPEN popup. A tooltip is never `open`: Radix writes `delayed-open` or `instant-open`. */\nexport const SHELL_POPUP_OPEN_STATES: readonly string[] = ['open', 'delayed-open', 'instant-open'];\n\n/**\n * A `:has()` clause that matches a layout root while a modal popup is open in its overlay layer\n * (`AppShellOverlayPortalLayer`, `[data-shell-overlay-layer]`). Append it to the root selector:\n * `[data-my-layout]${shellModalOpenClause()} [data-shell-object] { … }`.\n */\nexport function shellModalOpenClause(): string {\n return `:has([data-shell-overlay-layer] :is(${SHELL_MODAL_POPUP_SLOTS.map((slot) => `[data-slot=\"${slot}\"]`).join(', ')})[data-state=\"open\"])`;\n}\n/** @wildo_source:part:end saas.frontend.app-shell.shell-motion-contract */\n"]}
|
|
1
|
+
{"version":3,"file":"shell-motion-vocabulary.js","sourceRoot":"","sources":["../../../../../src/core/app-shell/shell-motion/shell-motion-vocabulary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,sJAAsJ;AACtJ;;;;;;;;;GASG;AAEH,+DAA+D;AAC/D,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,kEAAkE;IAClE,yCAAqB,CAAA;IACrB,yEAAyE;IACzE,uCAAmB,CAAA;AACrB,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,QAK3B;AAED,mFAAmF;AACnF,MAAM,CAAN,IAAY,cAOX;AAPD,WAAY,cAAc;IACxB,wGAAwG;IACxG,+BAAa,CAAA;IACb,6FAA6F;IAC7F,mCAAiB,CAAA;IACjB,yDAAyD;IACzD,yCAAuB,CAAA;AACzB,CAAC,EAPW,cAAc,KAAd,cAAc,QAOzB;AAED,8DAA8D;AAC9D,MAAM,CAAN,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,6EAA6E;IAC7E,yCAAuB,CAAA;IACvB,+FAA+F;IAC/F,iDAA+B,CAAA;AACjC,CAAC,EALW,cAAc,KAA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AAM,CAAC,MAAM,uBAAuB,GAA8B,CAAC,cAAc,CAAC,MAAM,EAAE,cAAc,CAAC,YAAY,EAAE,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;AAEpK,0HAA0H;AAC1H,MAAM,CAAC,MAAM,uBAAuB,GAAsB,CAAC,MAAM,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC;AAEnG;;;;GAIG;AACH,MAAM,UAAU,oBAAoB;IAClC,OAAO,uCAAuC,uBAAuB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC;AACjJ,CAAC;AACD,2EAA2E","sourcesContent":["import { ShellRegion } from '@wildo-ai/presets-components-models';\nimport { NavigationZoneName } from '@wildo-ai/saas-models';\n\n/** @wildo_source:part:start saas.frontend.app-shell.shell-motion-contract facet:layer:frontend facet:family:app-shell facet:audience:app-developer */\n/**\n * The motion building blocks a layout composes. They are the MECHANICS every animated layout needs — which\n * pane is in front, which zone just opened or changed place, the picture a dismissed or hidden pane leaves behind, the\n * dip a pane or a column makes while it changes — and none of them knows which way things move. That is the axis's\n * (`ShellMotionAxis`): a depth axis moves along z (the focal-plane 3D layout), a flat axis slides, scales and fades.\n *\n * Nothing here writes on a region the engine renders. Ghosts are pictures in the layout's own layers, dips play\n * through the Web Animations API (nothing is left on the element when they finish), and objects are the layout's own\n * wrappers plus the navigation panes found by the engine's markers.\n */\n\n/** How a navigation zone's place moved between two renders. */\nexport enum ShellPlaceChange {\n /** The zone held nothing and now holds a place: a pane opened. */\n APPEARED = 'appeared',\n /** The zone showed one place and now shows another, in the same pane. */\n CHANGED = 'changed',\n}\n\n/** Where a ghost — the picture of a pane that was dismissed or hidden — stands. */\nexport enum ShellGhostPose {\n /** Where the pane stood: a ghost starts here, and a picture left behind returns here before it goes. */\n REST = 'rest',\n /** Stepped back behind an expanded pane, dimmed: the picture of a pane the expansion hid. */\n BEHIND = 'behind',\n /** Gone: where a dismissed pane flies to as it fades. */\n DISCARDED = 'discarded',\n}\n\n/** What a dip — a brief move away and back — acknowledges. */\nexport enum ShellMotionDip {\n /** A pane's content changed in place (the same zone shows another place). */\n PANE_SWAP = 'pane-swap',\n /** A side column (the sidebar or a utility panel) changed width, and the panes re-arranged. */\n COLUMN_RESIZE = 'column-resize',\n}\n\n/** How a side pane arrives when it opens. */\nexport enum ShellPaneArrival {\n /** The layout's stylesheet animates the pane as it mounts (a keyframe on the pane). */\n STYLESHEET = 'stylesheet',\n /**\n * The pane GROWS OUT OF the element that was pressed to open it: a proxy box flies from the pressed row to the\n * pane's box, and the core reveals the pane on the flight's own clock (hidden for `SHELL_PROXY_FLIGHT_SHARE` of the\n * motion, then faded in). A layout's stylesheet MAY also hold the arriving pane for that share — only as the fallback\n * when there is nothing to fly from (a pane opened by URL), where the pane then simply appears when the hold ends.\n * An axis may ask the browser to carry it out instead, as a view transition (`paneArrivalByViewTransition`).\n */\n FROM_PRESSED_ELEMENT = 'from-pressed-element',\n}\n\n/** How a pane changes size when it is emphasized (takes the width) or given back its place. */\nexport enum ShellPaneResize {\n /** At once, as the engine lays it out. */\n INSTANT = 'instant',\n /** The emphasized pane grows from the box it had to the width it takes; given back its place, it slides home. */\n GROW = 'grow',\n}\n\n/** How a modal popup (a dialog, a sheet) arrives. */\nexport enum ShellDialogArrival {\n /** The layout's stylesheet animates it (a keyframe on its content slot). */\n STYLESHEET = 'stylesheet',\n /**\n * It GROWS OUT OF its trigger: a proxy flies from the pressed control to the dialog's box, and the core reveals the\n * dialog on the flight's own clock. A stylesheet hold is optional, the fallback when no control was pressed.\n */\n FROM_PRESSED_ELEMENT = 'from-pressed-element',\n}\n\n/**\n * The share of the motion a proxy flies before the element it stands for appears (the rest of the motion reveals\n * it). The core reveals the arriving element on the SAME clock as the flight (a script animation that sits above any\n * stylesheet animation), so the two can never drift apart; a layout's stylesheet may also hold the element for this\n * share, as the fallback when there is nothing to fly from (a pane opened by URL).\n */\nexport const SHELL_PROXY_FLIGHT_SHARE = 0.55;\n\n/** The attribute on a proxy the core flies. A layout may restyle it (the core paints it from theme tokens inline). */\nexport const SHELL_PROXY_ATTRIBUTE = 'data-shell-proxy';\n\n/** An element's laid-out box in the stage (untransformed), as last measured. */\nexport interface ShellStageRect {\n left: number;\n top: number;\n width: number;\n height: number;\n}\n\n/**\n * Which way a layout moves things. The building blocks decide WHEN something moves and WHAT; the axis decides only\n * the pose it moves to. A layout builds one from its settings and memoizes it: the hooks re-arm when it changes.\n */\nexport interface ShellMotionAxis {\n /** How long every motion lasts, in milliseconds. `0` turns the motion building blocks off (reduced motion). */\n durationMs: number;\n /** The timing function of the dips (a CSS easing). */\n easing: string;\n /**\n * Whether a pane an expansion hides leaves a still picture of itself behind the expanded pane. Only an axis whose\n * panes are SEEN THROUGH should say yes (the focal plane's glass windows). Where panes paint nothing of their own\n * — a 2D shell under a CONTINUOUS theme — the picture shows through the expanded pane and its text overlaps the\n * expanded pane's text (measured on the glide layout, 2026-09-30).\n */\n drawsHiddenPanePicture: boolean;\n /** How a side pane arrives (`ShellPaneArrival`). */\n paneArrival: ShellPaneArrival;\n /**\n * With `FROM_PRESSED_ELEMENT`: carry the arrival out as a browser VIEW TRANSITION where the browser has one\n * (`document.startViewTransition`) — the navigation's commit runs inside it, and the browser morphs the pressed row\n * into the pane from pictures of the screen before and after. Where it has none, or nothing was pressed, the proxy\n * flies as usual, so the arrival never depends on it. Absent means no.\n */\n paneArrivalByViewTransition?: boolean;\n /** How an emphasized pane changes size (`ShellPaneResize`). */\n paneResize: ShellPaneResize;\n /** How a modal popup arrives (`ShellDialogArrival`). */\n dialogArrival: ShellDialogArrival;\n /**\n * Whether the rows of a pane cascade in when the pane opens or shows another place. Rows are recognised by shape\n * (the largest group of wide, row-high siblings in the pane), so it holds for tables, card lists and custom rows.\n */\n cascadesRows: boolean;\n /**\n * The style properties a ghost takes at a pose — standard or custom properties, kebab-case (`transform`,\n * `--fp-z`). Opacity is not the axis's: a ghost always fades as it goes and appears as it steps back. The layout's\n * stylesheet transitions these properties on `[data-shell-ghost]`.\n */\n ghostPose(pose: ShellGhostPose, placement: { rect: ShellStageRect; stage: HTMLElement }): Readonly<Record<string, string>>;\n /**\n * The peak keyframe of a dip. The first and last keyframes are implicit: the element leaves and returns to its rest.\n * `stage` is the layout's stage, for a dip that travels sideways and must mirror right to left.\n */\n dipPeak(dip: ShellMotionDip, placement: { stage: HTMLElement }): Keyframe;\n}\n\n/**\n * The attribute a layout container puts on each wrapper it draws a region in. Wrappers are the layout's own\n * elements, so they may be moved; the region inside keeps the engine's markup untouched.\n */\nexport const SHELL_OBJECT_ATTRIBUTE = 'data-shell-object';\n/** The attribute of the layout's two ghost layers: `back` (under the regions) and `front` (above them). */\nexport const SHELL_GHOST_LAYER_ATTRIBUTE = 'data-shell-ghost-layer';\n/** The attribute every ghost carries, with its kind (`ShellGhostKind`). */\nexport const SHELL_GHOST_ATTRIBUTE = 'data-shell-ghost';\n\n/**\n * The markers a still picture of an engine element must NOT carry: everything a query for the real element, or for a\n * control inside it, finds it by. A picture (a discarded pane leaving, an image behind an expanded pane, a pressed row\n * flying into its pane) is inert and takes no pointer, but it is still in the document while it fades, and a picture\n * that kept these was found by those queries as though it were the thing it shows.\n *\n * Measured 2026-11-14 on Wonder Todos (morph layout): a closed todo pane's picture kept `data-navigation-back` for the\n * ~650ms it took to leave, so a lookup of the pane's back control found the picture's (a browser test of the navigation\n * zones had to wait it out). It never took a click (inert, `pointer-events: none`: the point under it hit the list), but\n * the zone's own back control is identified by that attribute, and a picture must not answer to it.\n *\n * Styling hooks (`data-slot`, `data-state`) are NOT here: a picture keeps the look of what it shows. A caller that\n * needs a narrower picture strips more on its own.\n */\nexport const SHELL_PICTURE_STRIPPED_ATTRIBUTES: readonly string[] = [\n 'id',\n // The engine's pane and region markers.\n 'data-content-area',\n 'data-panel-id',\n 'data-zone-hidden',\n 'data-zone-emphasized',\n 'data-component-area',\n SHELL_OBJECT_ATTRIBUTE,\n // The engine's control hooks: a zone's back control, an operation's trigger, a navigation item, a rail entry.\n 'data-navigation-back',\n 'data-operation-id',\n 'data-nav-item-id',\n 'data-ref',\n];\n\n/** The two kinds of ghost. */\nexport enum ShellGhostKind {\n /** A dismissed side pane, flying away. */\n DISCARDED = 'discarded',\n /** A still image of a pane an expansion hid. */\n BEHIND = 'behind',\n}\n\n/** The two ghost layers. */\nexport enum ShellGhostLayer {\n BACK = 'back',\n FRONT = 'front',\n}\n\n/**\n * The selector of one shell region, by the marker its preset writes (`data-component-area`, from `ShellRegion`). The\n * one place a layout spells it, so a region is always found by the enum and never by a literal.\n */\nexport function shellRegionSelector(region: ShellRegion): string {\n return `[data-component-area=\"${region}\"]`;\n}\n\nconst CONTENT = shellRegionSelector(ShellRegion.CONTENT);\n\n/**\n * The navigation panes inside the content region, by the engine's own markers: the zone itself in the static and\n * single-zone branches (`[data-content-area]`), the panel in the resizable branch (`[data-panel-id^=\"nav-\"]`) — never\n * the zone INSIDE a panel, which would be moved twice and clipped by the panel's `overflow: hidden`.\n */\nexport const SHELL_PANE_SELECTOR = `${CONTENT} [data-content-area]:not([data-panel-id] *), ${CONTENT} [data-panel-id^=\"nav-\"]`;\n\n/** The pane of one zone, in either branch (a plain selector list: `:not()` nested in `:is()` is beyond some engines). */\nexport function shellPaneSelectorForZone(zone: string): string {\n return `${CONTENT} [data-content-area=\"${zone}\"]:not([data-panel-id] *), ${CONTENT} [data-panel-id=\"nav-${zone}\"]`;\n}\n\n/** The zone a pane element shows, read from the engine's markers; `undefined` for anything else. */\nexport function shellPaneZone(element: Element): string | undefined {\n if (!(element instanceof HTMLElement)) return undefined;\n return element.dataset.contentArea ?? element.dataset.panelId?.replace(/^nav-/, '');\n}\n\nconst SIDE_ZONES: ReadonlySet<string> = new Set([NavigationZoneName.SECONDARY, NavigationZoneName.COMPANION]);\n\n/** Whether a pane shows a SIDE zone — the only kind a person dismisses (the primary pane leaves only on a remount). */\nexport function isShellSidePane(element: Element): boolean {\n const zone = shellPaneZone(element);\n return zone !== undefined && SIDE_ZONES.has(zone);\n}\n\n/** Whether a zone is a SIDE zone (secondary, companion): the panes that open beside the list. */\nexport function isShellSideZone(zone: string): boolean {\n return SIDE_ZONES.has(zone);\n}\n\n/**\n * The portalled popups a layout may move, by the `data-slot` their content element carries (the presets write these\n * values; Radix writes `data-state` on the same element). A closed list: a layout keys its popup motion on it, never\n * on a role or a class.\n */\nexport enum ShellPopupSlot {\n DROPDOWN_MENU = 'dropdown-menu-content',\n DROPDOWN_MENU_SUB = 'dropdown-menu-sub-content',\n CONTEXT_MENU = 'context-menu-content',\n CONTEXT_MENU_SUB = 'context-menu-sub-content',\n POPOVER = 'popover-content',\n HOVER_CARD = 'hover-card-content',\n TOOLTIP = 'tooltip-content',\n SELECT = 'select-content',\n MENUBAR = 'menubar-content',\n MENUBAR_SUB = 'menubar-sub-content',\n DIALOG = 'dialog-content',\n ALERT_DIALOG = 'alert-dialog-content',\n SHEET = 'sheet-content',\n DRAWER = 'drawer-content',\n}\n\n/**\n * The popups anchored to a trigger, each with the CSS variable Radix publishes as its trigger-relative origin: the\n * point a layout lifts or scales such a popup from.\n */\nexport const SHELL_ANCHORED_POPUP_ORIGINS: Readonly<Partial<Record<ShellPopupSlot, string>>> = {\n [ShellPopupSlot.DROPDOWN_MENU]: '--radix-dropdown-menu-content-transform-origin',\n [ShellPopupSlot.DROPDOWN_MENU_SUB]: '--radix-dropdown-menu-content-transform-origin',\n [ShellPopupSlot.CONTEXT_MENU]: '--radix-context-menu-content-transform-origin',\n [ShellPopupSlot.CONTEXT_MENU_SUB]: '--radix-context-menu-content-transform-origin',\n [ShellPopupSlot.POPOVER]: '--radix-popover-content-transform-origin',\n [ShellPopupSlot.HOVER_CARD]: '--radix-hover-card-content-transform-origin',\n [ShellPopupSlot.TOOLTIP]: '--radix-tooltip-content-transform-origin',\n [ShellPopupSlot.SELECT]: '--radix-select-content-transform-origin',\n [ShellPopupSlot.MENUBAR]: '--radix-menubar-content-transform-origin',\n [ShellPopupSlot.MENUBAR_SUB]: '--radix-menubar-content-transform-origin',\n};\n\n/** The centred dialogs: no trigger origin, they open over the whole shell. */\nexport const SHELL_CENTRED_POPUP_SLOTS: readonly ShellPopupSlot[] = [ShellPopupSlot.DIALOG, ShellPopupSlot.ALERT_DIALOG];\n\n/**\n * The MODAL popups: while one is open the rest of the shell is not what the person works in. Keyed on the content\n * slot, deliberately never on `role=\"dialog\"` — a Radix popover carries that role too (date pickers, record pickers,\n * the notification centre), and treating it as modal steps back the form being edited — nor on\n * `body[data-scroll-locked]`, which dropdown and context menus also set.\n */\nexport const SHELL_MODAL_POPUP_SLOTS: readonly ShellPopupSlot[] = [ShellPopupSlot.DIALOG, ShellPopupSlot.ALERT_DIALOG, ShellPopupSlot.SHEET, ShellPopupSlot.DRAWER];\n\n/** The `data-state` values of an OPEN popup. A tooltip is never `open`: Radix writes `delayed-open` or `instant-open`. */\nexport const SHELL_POPUP_OPEN_STATES: readonly string[] = ['open', 'delayed-open', 'instant-open'];\n\n/**\n * A `:has()` clause that matches a layout root while a modal popup is open in its overlay layer\n * (`AppShellOverlayPortalLayer`, `[data-shell-overlay-layer]`). Append it to the root selector:\n * `[data-my-layout]${shellModalOpenClause()} [data-shell-object] { … }`.\n */\nexport function shellModalOpenClause(): string {\n return `:has([data-shell-overlay-layer] :is(${SHELL_MODAL_POPUP_SLOTS.map((slot) => `[data-slot=\"${slot}\"]`).join(', ')})[data-state=\"open\"])`;\n}\n/** @wildo_source:part:end saas.frontend.app-shell.shell-motion-contract */\n"]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type BrandIdentity } from '../../core/branding/useBrandIdentity';
|
|
2
|
+
/** The pages of an identity portal's signed-in area: what its shell links to, and what its home page leads to. */
|
|
3
|
+
export declare enum IdentityPortalPageRef {
|
|
4
|
+
HOME = "home",
|
|
5
|
+
/** The decision inbox, offered only when the application declares something a decision can wait on. */
|
|
6
|
+
DECISIONS = "decisions",
|
|
7
|
+
ACCOUNT_SECURITY = "account-security"
|
|
8
|
+
}
|
|
9
|
+
/** The path each portal page answers on: the product's own paths, so a link the backend builds works on both surfaces. */
|
|
10
|
+
export declare const IDENTITY_PORTAL_PAGE_PATHS: Readonly<Record<IdentityPortalPageRef, string>>;
|
|
11
|
+
/** One page of the portal, as its shell and home page present it. */
|
|
12
|
+
export interface IdentityPortalPageLink {
|
|
13
|
+
readonly ref: IdentityPortalPageRef;
|
|
14
|
+
readonly path: string;
|
|
15
|
+
/** The page's name in the reader's words. */
|
|
16
|
+
readonly label: string;
|
|
17
|
+
/** The page on screen now; its link carries `aria-current="page"`. */
|
|
18
|
+
readonly current: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface IdentityPortalShellLayoutInfo {
|
|
21
|
+
/** The application's identity, as the signed-in product shell presents it. */
|
|
22
|
+
readonly brand: BrandIdentity;
|
|
23
|
+
/** The portal's pages, in the order the shell lists them. */
|
|
24
|
+
readonly pages: readonly IdentityPortalPageLink[];
|
|
25
|
+
/** Names the portal's navigation for screen readers. */
|
|
26
|
+
readonly navigationLabel: string;
|
|
27
|
+
readonly signOutLabel: string;
|
|
28
|
+
/** Signs the person out of this application, as the product shell's sign-out does. */
|
|
29
|
+
readonly signOut: () => void;
|
|
30
|
+
/** The portal's words are loaded; a preset waits on this rather than showing keys. */
|
|
31
|
+
readonly isReady: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The pages a signed-in person reaches on this portal. Decisions are offered only when the application declares
|
|
35
|
+
* something a decision can wait on (`appConfig.decisionInbox`), the declaration the product's sidebar row reads; the
|
|
36
|
+
* page itself shows only the decisions the server routes to the caller, so offering it never shows anyone else's.
|
|
37
|
+
*/
|
|
38
|
+
export declare function useIdentityPortalPages(): readonly IdentityPortalPageLink[];
|
|
39
|
+
/**
|
|
40
|
+
* Behaviour of the identity portal's signed-in shell (`APP_LAYOUTS_IDENTITY_PORTAL_CONTAINER`): the application's
|
|
41
|
+
* identity, the portal's pages and sign-out, for a preset to draw. Reports the container as initialized, in place of
|
|
42
|
+
* the product shell's report, which a portal never renders.
|
|
43
|
+
*/
|
|
44
|
+
export declare function useIdentityPortalShellLayout(): IdentityPortalShellLayoutInfo;
|
|
45
|
+
//# sourceMappingURL=useIdentityPortalShellLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIdentityPortalShellLayout.d.ts","sourceRoot":"","sources":["../../../../src/core/app-shell/useIdentityPortalShellLayout.ts"],"names":[],"mappings":"AASA,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,oDAAoD,CAAC;AAE1G,kHAAkH;AAClH,oBAAY,qBAAqB;IAC/B,IAAI,SAAS;IACb,uGAAuG;IACvG,SAAS,cAAc;IACvB,gBAAgB,qBAAqB;CACtC;AAED,0HAA0H;AAC1H,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAItF,CAAC;AAQF,qEAAqE;AACrE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,GAAG,EAAE,qBAAqB,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,6CAA6C;IAC7C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,sEAAsE;IACtE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,6BAA6B;IAC5C,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,6DAA6D;IAC7D,QAAQ,CAAC,KAAK,EAAE,SAAS,sBAAsB,EAAE,CAAC;IAClD,wDAAwD;IACxD,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,sFAAsF;IACtF,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAC7B,sFAAsF;IACtF,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,SAAS,sBAAsB,EAAE,CAa1E;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,IAAI,6BAA6B,CAqB5E"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { useCallback, useEffect, useMemo } from 'react';
|
|
2
|
+
import { useLocation } from 'react-router';
|
|
3
|
+
import { FrontendComponentType, IdentityPortalLabel } from '@wildo-ai/presets-components-models';
|
|
4
|
+
import { useApplication } from '../../core/runtime/useApplication.js';
|
|
5
|
+
import { MainContextInitComponents } from '../../core/runtime/runtime.frontend.schemas.js';
|
|
6
|
+
import { CommonRoutePaths } from '../../core/runtime/routes.frontend.definitions.js';
|
|
7
|
+
import { useI18n } from '../../core/i18n/useI18n.js';
|
|
8
|
+
import { useUserOrgs } from '../../core/security/useUserOrgs.js';
|
|
9
|
+
import { useBrandIdentity } from '../../core/branding/useBrandIdentity.js';
|
|
10
|
+
/** The pages of an identity portal's signed-in area: what its shell links to, and what its home page leads to. */
|
|
11
|
+
export var IdentityPortalPageRef;
|
|
12
|
+
(function (IdentityPortalPageRef) {
|
|
13
|
+
IdentityPortalPageRef["HOME"] = "home";
|
|
14
|
+
/** The decision inbox, offered only when the application declares something a decision can wait on. */
|
|
15
|
+
IdentityPortalPageRef["DECISIONS"] = "decisions";
|
|
16
|
+
IdentityPortalPageRef["ACCOUNT_SECURITY"] = "account-security";
|
|
17
|
+
})(IdentityPortalPageRef || (IdentityPortalPageRef = {}));
|
|
18
|
+
/** The path each portal page answers on: the product's own paths, so a link the backend builds works on both surfaces. */
|
|
19
|
+
export const IDENTITY_PORTAL_PAGE_PATHS = {
|
|
20
|
+
[IdentityPortalPageRef.HOME]: CommonRoutePaths.home,
|
|
21
|
+
[IdentityPortalPageRef.DECISIONS]: CommonRoutePaths.decisions,
|
|
22
|
+
[IdentityPortalPageRef.ACCOUNT_SECURITY]: CommonRoutePaths.accountSecurity,
|
|
23
|
+
};
|
|
24
|
+
const PAGE_LABELS = {
|
|
25
|
+
[IdentityPortalPageRef.HOME]: IdentityPortalLabel.NAV_HOME,
|
|
26
|
+
[IdentityPortalPageRef.DECISIONS]: IdentityPortalLabel.NAV_DECISIONS,
|
|
27
|
+
[IdentityPortalPageRef.ACCOUNT_SECURITY]: IdentityPortalLabel.NAV_ACCOUNT_SECURITY,
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* The pages a signed-in person reaches on this portal. Decisions are offered only when the application declares
|
|
31
|
+
* something a decision can wait on (`appConfig.decisionInbox`), the declaration the product's sidebar row reads; the
|
|
32
|
+
* page itself shows only the decisions the server routes to the caller, so offering it never shows anyone else's.
|
|
33
|
+
*/
|
|
34
|
+
export function useIdentityPortalPages() {
|
|
35
|
+
const { appConfig } = useApplication();
|
|
36
|
+
const { pathname } = useLocation();
|
|
37
|
+
const { tComponent } = useI18n({ component: FrontendComponentType.APP_LAYOUTS_IDENTITY_PORTAL_CONTAINER });
|
|
38
|
+
const offersDecisions = Boolean(appConfig?.decisionInbox);
|
|
39
|
+
return useMemo(() => Object.values(IdentityPortalPageRef)
|
|
40
|
+
.filter((ref) => ref !== IdentityPortalPageRef.DECISIONS || offersDecisions)
|
|
41
|
+
.map((ref) => ({
|
|
42
|
+
ref,
|
|
43
|
+
path: IDENTITY_PORTAL_PAGE_PATHS[ref],
|
|
44
|
+
label: tComponent(FrontendComponentType.APP_LAYOUTS_IDENTITY_PORTAL_CONTAINER, PAGE_LABELS[ref]),
|
|
45
|
+
current: pathname === IDENTITY_PORTAL_PAGE_PATHS[ref],
|
|
46
|
+
})), [offersDecisions, pathname, tComponent]);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Behaviour of the identity portal's signed-in shell (`APP_LAYOUTS_IDENTITY_PORTAL_CONTAINER`): the application's
|
|
50
|
+
* identity, the portal's pages and sign-out, for a preset to draw. Reports the container as initialized, in place of
|
|
51
|
+
* the product shell's report, which a portal never renders.
|
|
52
|
+
*/
|
|
53
|
+
export function useIdentityPortalShellLayout() {
|
|
54
|
+
const { markComponentInitialized } = useApplication();
|
|
55
|
+
const { logout } = useUserOrgs();
|
|
56
|
+
const brand = useBrandIdentity();
|
|
57
|
+
const pages = useIdentityPortalPages();
|
|
58
|
+
const { tComponent, isReady } = useI18n({ component: FrontendComponentType.APP_LAYOUTS_IDENTITY_PORTAL_CONTAINER });
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
markComponentInitialized(MainContextInitComponents.IDENTITY_PORTAL_CONTAINER);
|
|
61
|
+
}, [markComponentInitialized]);
|
|
62
|
+
const signOut = useCallback(() => { logout(); }, [logout]);
|
|
63
|
+
return {
|
|
64
|
+
brand,
|
|
65
|
+
pages,
|
|
66
|
+
navigationLabel: tComponent(FrontendComponentType.APP_LAYOUTS_IDENTITY_PORTAL_CONTAINER, IdentityPortalLabel.NAVIGATION),
|
|
67
|
+
signOutLabel: tComponent(FrontendComponentType.APP_LAYOUTS_IDENTITY_PORTAL_CONTAINER, IdentityPortalLabel.SIGN_OUT),
|
|
68
|
+
signOut,
|
|
69
|
+
isReady,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=useIdentityPortalShellLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIdentityPortalShellLayout.js","sourceRoot":"","sources":["../../../../src/core/app-shell/useIdentityPortalShellLayout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAEjG,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,2DAA2D,CAAC;AACtG,OAAO,EAAE,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AAU,CAAC;QACxH,YAAY,EAAE,UAAU,CAAC,qBAAqB,CAAC,qCAAqC,EAAE,mBAAmB,CAAC,QAAQ,CAAC;QACnH,OAAO;QACP,OAAO;KACR,CAAC;AACJ,CAAC","sourcesContent":["import { useCallback, useEffect, useMemo } from 'react';\nimport { useLocation } from 'react-router';\nimport { FrontendComponentType, IdentityPortalLabel } from '@wildo-ai/presets-components-models';\n\nimport { useApplication } from '~wildo-frontend-lib/core/runtime/useApplication';\nimport { MainContextInitComponents } from '~wildo-frontend-lib/core/runtime/runtime.frontend.schemas';\nimport { CommonRoutePaths } from '~wildo-frontend-lib/core/runtime/routes.frontend.definitions';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { useUserOrgs } from '~wildo-frontend-lib/core/security/useUserOrgs';\nimport { useBrandIdentity, type BrandIdentity } from '~wildo-frontend-lib/core/branding/useBrandIdentity';\n\n/** The pages of an identity portal's signed-in area: what its shell links to, and what its home page leads to. */\nexport enum IdentityPortalPageRef {\n HOME = 'home',\n /** The decision inbox, offered only when the application declares something a decision can wait on. */\n DECISIONS = 'decisions',\n ACCOUNT_SECURITY = 'account-security',\n}\n\n/** The path each portal page answers on: the product's own paths, so a link the backend builds works on both surfaces. */\nexport const IDENTITY_PORTAL_PAGE_PATHS: Readonly<Record<IdentityPortalPageRef, string>> = {\n [IdentityPortalPageRef.HOME]: CommonRoutePaths.home,\n [IdentityPortalPageRef.DECISIONS]: CommonRoutePaths.decisions,\n [IdentityPortalPageRef.ACCOUNT_SECURITY]: CommonRoutePaths.accountSecurity,\n};\n\nconst PAGE_LABELS: Readonly<Record<IdentityPortalPageRef, IdentityPortalLabel>> = {\n [IdentityPortalPageRef.HOME]: IdentityPortalLabel.NAV_HOME,\n [IdentityPortalPageRef.DECISIONS]: IdentityPortalLabel.NAV_DECISIONS,\n [IdentityPortalPageRef.ACCOUNT_SECURITY]: IdentityPortalLabel.NAV_ACCOUNT_SECURITY,\n};\n\n/** One page of the portal, as its shell and home page present it. */\nexport interface IdentityPortalPageLink {\n readonly ref: IdentityPortalPageRef;\n readonly path: string;\n /** The page's name in the reader's words. */\n readonly label: string;\n /** The page on screen now; its link carries `aria-current=\"page\"`. */\n readonly current: boolean;\n}\n\nexport interface IdentityPortalShellLayoutInfo {\n /** The application's identity, as the signed-in product shell presents it. */\n readonly brand: BrandIdentity;\n /** The portal's pages, in the order the shell lists them. */\n readonly pages: readonly IdentityPortalPageLink[];\n /** Names the portal's navigation for screen readers. */\n readonly navigationLabel: string;\n readonly signOutLabel: string;\n /** Signs the person out of this application, as the product shell's sign-out does. */\n readonly signOut: () => void;\n /** The portal's words are loaded; a preset waits on this rather than showing keys. */\n readonly isReady: boolean;\n}\n\n/**\n * The pages a signed-in person reaches on this portal. Decisions are offered only when the application declares\n * something a decision can wait on (`appConfig.decisionInbox`), the declaration the product's sidebar row reads; the\n * page itself shows only the decisions the server routes to the caller, so offering it never shows anyone else's.\n */\nexport function useIdentityPortalPages(): readonly IdentityPortalPageLink[] {\n const { appConfig } = useApplication();\n const { pathname } = useLocation();\n const { tComponent } = useI18n({ component: FrontendComponentType.APP_LAYOUTS_IDENTITY_PORTAL_CONTAINER });\n const offersDecisions = Boolean(appConfig?.decisionInbox);\n return useMemo(() => Object.values(IdentityPortalPageRef)\n .filter((ref) => ref !== IdentityPortalPageRef.DECISIONS || offersDecisions)\n .map((ref) => ({\n ref,\n path: IDENTITY_PORTAL_PAGE_PATHS[ref],\n label: tComponent(FrontendComponentType.APP_LAYOUTS_IDENTITY_PORTAL_CONTAINER, PAGE_LABELS[ref]),\n current: pathname === IDENTITY_PORTAL_PAGE_PATHS[ref],\n })), [offersDecisions, pathname, tComponent]);\n}\n\n/**\n * Behaviour of the identity portal's signed-in shell (`APP_LAYOUTS_IDENTITY_PORTAL_CONTAINER`): the application's\n * identity, the portal's pages and sign-out, for a preset to draw. Reports the container as initialized, in place of\n * the product shell's report, which a portal never renders.\n */\nexport function useIdentityPortalShellLayout(): IdentityPortalShellLayoutInfo {\n const { markComponentInitialized } = useApplication();\n const { logout } = useUserOrgs();\n const brand = useBrandIdentity();\n const pages = useIdentityPortalPages();\n const { tComponent, isReady } = useI18n({ component: FrontendComponentType.APP_LAYOUTS_IDENTITY_PORTAL_CONTAINER });\n\n useEffect(() => {\n markComponentInitialized(MainContextInitComponents.IDENTITY_PORTAL_CONTAINER);\n }, [markComponentInitialized]);\n\n const signOut = useCallback(() => { logout(); }, [logout]);\n\n return {\n brand,\n pages,\n navigationLabel: tComponent(FrontendComponentType.APP_LAYOUTS_IDENTITY_PORTAL_CONTAINER, IdentityPortalLabel.NAVIGATION),\n signOutLabel: tComponent(FrontendComponentType.APP_LAYOUTS_IDENTITY_PORTAL_CONTAINER, IdentityPortalLabel.SIGN_OUT),\n signOut,\n isReady,\n };\n}\n"]}
|