@vertesia/ui 1.5.0-dev.20260910.052912Z → 1.6.0-dev.20260912.110338Z
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +125 -0
- package/lib/boot/branding.d.ts +58 -0
- package/lib/boot/branding.d.ts.map +1 -0
- package/lib/boot/branding.js +62 -0
- package/lib/boot/branding.js.map +1 -0
- package/lib/boot/index.d.ts +27 -0
- package/lib/boot/index.d.ts.map +1 -0
- package/lib/boot/index.js +325 -0
- package/lib/boot/index.js.map +1 -0
- package/lib/boot/vite.d.ts +63 -0
- package/lib/boot/vite.d.ts.map +1 -0
- package/lib/boot/vite.js +108 -0
- package/lib/boot/vite.js.map +1 -0
- package/lib/core/components/Link.js +1 -1
- package/lib/core/components/Link.js.map +1 -1
- package/lib/core/components/Spinner.js +1 -1
- package/lib/core/components/Spinner.js.map +1 -1
- package/lib/core/components/TagsInput.js +7 -7
- package/lib/core/components/TagsInput.js.map +1 -1
- package/lib/core/components/shadcn/badge.js +1 -1
- package/lib/core/components/shadcn/badge.js.map +1 -1
- package/lib/core/components/shadcn/button.d.ts.map +1 -1
- package/lib/core/components/shadcn/button.js +3 -4
- package/lib/core/components/shadcn/button.js.map +1 -1
- package/lib/core/components/shadcn/filters/comboBox/DateCombobox.js +2 -2
- package/lib/core/components/shadcn/filters/comboBox/DateCombobox.js.map +1 -1
- package/lib/core/components/shadcn/filters/comboBox/SelectCombobox.js +1 -1
- package/lib/core/components/shadcn/filters/comboBox/SelectCombobox.js.map +1 -1
- package/lib/core/components/shadcn/filters/comboBox/StringListCombobox.js +1 -1
- package/lib/core/components/shadcn/filters/comboBox/StringListCombobox.js.map +1 -1
- package/lib/core/components/shadcn/filters/comboBox/TextCombobox.js +1 -1
- package/lib/core/components/shadcn/filters/comboBox/TextCombobox.js.map +1 -1
- package/lib/core/components/shadcn/filters/filter/dateFilter.js +1 -1
- package/lib/core/components/shadcn/filters/filter/dateFilter.js.map +1 -1
- package/lib/core/components/shadcn/filters/filter-styles.d.ts +1 -1
- package/lib/core/components/shadcn/filters/filter-styles.d.ts.map +1 -1
- package/lib/core/components/shadcn/filters/filter-styles.js +4 -4
- package/lib/core/components/shadcn/filters/filters.js +1 -1
- package/lib/core/components/shadcn/filters/filters.js.map +1 -1
- package/lib/core/components/shadcn/label.js +1 -1
- package/lib/core/components/shadcn/label.js.map +1 -1
- package/lib/core/components/shadcn/overflowTabs.js +2 -2
- package/lib/core/components/shadcn/overflowTabs.js.map +1 -1
- package/lib/core/components/shadcn/tabs.js +1 -1
- package/lib/core/components/shadcn/tabs.js.map +1 -1
- package/lib/env/index.d.ts +28 -1
- package/lib/env/index.d.ts.map +1 -1
- package/lib/env/index.js +51 -3
- package/lib/env/index.js.map +1 -1
- package/lib/features/activity-doc/ActivityDoc.js +1 -1
- package/lib/features/activity-doc/ActivityDoc.js.map +1 -1
- package/lib/features/agent/PayloadBuilder.d.ts +4 -0
- package/lib/features/agent/PayloadBuilder.d.ts.map +1 -1
- package/lib/features/agent/PayloadBuilder.js.map +1 -1
- package/lib/features/agent/chat/AgentRunFeedback.d.ts +59 -0
- package/lib/features/agent/chat/AgentRunFeedback.d.ts.map +1 -0
- package/lib/features/agent/chat/AgentRunFeedback.js +286 -0
- package/lib/features/agent/chat/AgentRunFeedback.js.map +1 -0
- package/lib/features/agent/chat/AskUserWidget.d.ts +1 -0
- package/lib/features/agent/chat/AskUserWidget.d.ts.map +1 -1
- package/lib/features/agent/chat/AskUserWidget.js +15 -4
- package/lib/features/agent/chat/AskUserWidget.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentConversation.js +3 -2
- package/lib/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +3 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +16 -13
- package/lib/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/Header.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/Header.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.d.ts +3 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js +30 -8
- package/lib/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.d.ts.map +1 -1
- package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.js +2 -0
- package/lib/features/agent/chat/ModernAgentOutput/SummaryConversation.js.map +1 -1
- package/lib/features/agent/chat/index.d.ts +1 -0
- package/lib/features/agent/chat/index.d.ts.map +1 -1
- package/lib/features/agent/chat/index.js +1 -0
- package/lib/features/agent/chat/index.js.map +1 -1
- package/lib/features/facets/AgentRunnerFacetsNav.d.ts +8 -0
- package/lib/features/facets/AgentRunnerFacetsNav.d.ts.map +1 -1
- package/lib/features/facets/AgentRunnerFacetsNav.js +12 -0
- package/lib/features/facets/AgentRunnerFacetsNav.js.map +1 -1
- package/lib/features/layout/GenericPageNavHeader.js +1 -1
- package/lib/features/layout/GenericPageNavHeader.js.map +1 -1
- package/lib/features/magic-pdf/AnnotatedImageSlider.js +1 -1
- package/lib/features/magic-pdf/AnnotatedImageSlider.js.map +1 -1
- package/lib/features/magic-pdf/GroundedExtractionView.js +3 -3
- package/lib/features/magic-pdf/GroundedExtractionView.js.map +1 -1
- package/lib/features/permissions/UserPermissionsProvider.d.ts +15 -1
- package/lib/features/permissions/UserPermissionsProvider.d.ts.map +1 -1
- package/lib/features/permissions/UserPermissionsProvider.js +20 -12
- package/lib/features/permissions/UserPermissionsProvider.js.map +1 -1
- package/lib/features/store/objects/DocumentPreviewPanel.js +5 -5
- package/lib/features/store/objects/DocumentPreviewPanel.js.map +1 -1
- package/lib/features/store/objects/components/DocumentInput.js +1 -1
- package/lib/features/store/objects/components/DocumentInput.js.map +1 -1
- package/lib/features/store/objects/selection/SelectionActions.js +1 -1
- package/lib/features/store/objects/selection/SelectionActions.js.map +1 -1
- package/lib/features/store/objects/upload/DocumentUploadModal.js +1 -1
- package/lib/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
- package/lib/features/store/types/TypeRegistry.d.ts +130 -0
- package/lib/features/store/types/TypeRegistry.d.ts.map +1 -1
- package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts +130 -0
- package/lib/features/store/types/search/ObjectTypeSearchContext.d.ts.map +1 -1
- package/lib/features/user/UserInfo.js +1 -1
- package/lib/features/user/UserInfo.js.map +1 -1
- package/lib/i18n/index.d.ts +5 -4
- package/lib/i18n/index.d.ts.map +1 -1
- package/lib/i18n/index.js +16 -2
- package/lib/i18n/index.js.map +1 -1
- package/lib/i18n/locales/ar.json +30 -0
- package/lib/i18n/locales/de.json +30 -0
- package/lib/i18n/locales/en.json +30 -0
- package/lib/i18n/locales/es.json +30 -0
- package/lib/i18n/locales/fr.json +30 -0
- package/lib/i18n/locales/it.json +30 -0
- package/lib/i18n/locales/ja.json +30 -0
- package/lib/i18n/locales/ko.json +30 -0
- package/lib/i18n/locales/pt.json +30 -0
- package/lib/i18n/locales/ru.json +30 -0
- package/lib/i18n/locales/tr.json +30 -0
- package/lib/i18n/locales/zh-TW.json +30 -0
- package/lib/i18n/locales/zh.json +30 -0
- package/lib/layout/ErrorPage.js +1 -1
- package/lib/layout/ErrorPage.js.map +1 -1
- package/lib/layout/Navbar.d.ts.map +1 -1
- package/lib/layout/Navbar.js +3 -2
- package/lib/layout/Navbar.js.map +1 -1
- package/lib/router/RouteComponent.d.ts.map +1 -1
- package/lib/router/RouteComponent.js +15 -12
- package/lib/router/RouteComponent.js.map +1 -1
- package/lib/session/UserSession.d.ts.map +1 -1
- package/lib/session/UserSession.js +6 -3
- package/lib/session/UserSession.js.map +1 -1
- package/lib/session/UserSessionProvider.d.ts +2 -1
- package/lib/session/UserSessionProvider.d.ts.map +1 -1
- package/lib/session/UserSessionProvider.js +10 -1
- package/lib/session/UserSessionProvider.js.map +1 -1
- package/lib/session/auth/composable.d.ts.map +1 -1
- package/lib/session/auth/composable.js +88 -3
- package/lib/session/auth/composable.js.map +1 -1
- package/lib/session/auth/domainRouting.d.ts +22 -12
- package/lib/session/auth/domainRouting.d.ts.map +1 -1
- package/lib/session/auth/domainRouting.js +35 -21
- package/lib/session/auth/domainRouting.js.map +1 -1
- package/lib/session/auth/useAuthState.d.ts +9 -4
- package/lib/session/auth/useAuthState.d.ts.map +1 -1
- package/lib/session/auth/useAuthState.js +9 -4
- package/lib/session/auth/useAuthState.js.map +1 -1
- package/lib/session/index.d.ts.map +1 -1
- package/lib/session/index.js +3 -1
- package/lib/session/index.js.map +1 -1
- package/lib/shell/AuthScreenPreview.d.ts +12 -0
- package/lib/shell/AuthScreenPreview.d.ts.map +1 -0
- package/lib/shell/AuthScreenPreview.js +140 -0
- package/lib/shell/AuthScreenPreview.js.map +1 -0
- package/lib/shell/BrandedAuthScreens.d.ts +19 -0
- package/lib/shell/BrandedAuthScreens.d.ts.map +1 -0
- package/lib/shell/BrandedAuthScreens.js +64 -0
- package/lib/shell/BrandedAuthScreens.js.map +1 -0
- package/lib/shell/SplashScreen.d.ts +13 -2
- package/lib/shell/SplashScreen.d.ts.map +1 -1
- package/lib/shell/SplashScreen.js +21 -20
- package/lib/shell/SplashScreen.js.map +1 -1
- package/lib/shell/VertesiaShell.d.ts +15 -4
- package/lib/shell/VertesiaShell.d.ts.map +1 -1
- package/lib/shell/VertesiaShell.js +8 -3
- package/lib/shell/VertesiaShell.js.map +1 -1
- package/lib/shell/apps/StandaloneApp.js +5 -1
- package/lib/shell/apps/StandaloneApp.js.map +1 -1
- package/lib/shell/index.d.ts +6 -0
- package/lib/shell/index.d.ts.map +1 -1
- package/lib/shell/index.js +5 -0
- package/lib/shell/index.js.map +1 -1
- package/lib/shell/login/SignInFlow.d.ts +68 -0
- package/lib/shell/login/SignInFlow.d.ts.map +1 -0
- package/lib/shell/login/SignInFlow.js +108 -0
- package/lib/shell/login/SignInFlow.js.map +1 -0
- package/lib/shell/login/SignInPageShell.d.ts +13 -0
- package/lib/shell/login/SignInPageShell.d.ts.map +1 -0
- package/lib/shell/login/SignInPageShell.js +14 -0
- package/lib/shell/login/SignInPageShell.js.map +1 -0
- package/lib/shell/login/SignInPrimitives.d.ts +3 -3
- package/lib/shell/login/SignInPrimitives.d.ts.map +1 -1
- package/lib/shell/login/SignInPrimitives.js +13 -11
- package/lib/shell/login/SignInPrimitives.js.map +1 -1
- package/lib/shell/login/SignInRestrictedEnvStep.d.ts +5 -0
- package/lib/shell/login/SignInRestrictedEnvStep.d.ts.map +1 -1
- package/lib/shell/login/SignInRestrictedEnvStep.js +8 -4
- package/lib/shell/login/SignInRestrictedEnvStep.js.map +1 -1
- package/lib/shell/login/SigninScreen.d.ts +38 -3
- package/lib/shell/login/SigninScreen.d.ts.map +1 -1
- package/lib/shell/login/SigninScreen.js +33 -86
- package/lib/shell/login/SigninScreen.js.map +1 -1
- package/lib/shell/login/SignupForm.d.ts +3 -1
- package/lib/shell/login/SignupForm.d.ts.map +1 -1
- package/lib/shell/login/SignupForm.js +7 -3
- package/lib/shell/login/SignupForm.js.map +1 -1
- package/lib/shell/login/signInUtils.d.ts +11 -0
- package/lib/shell/login/signInUtils.d.ts.map +1 -1
- package/lib/shell/login/signInUtils.js +29 -5
- package/lib/shell/login/signInUtils.js.map +1 -1
- package/lib/vertesia-ui-boot.js +237 -0
- package/lib/vertesia-ui-boot.js.map +1 -0
- package/lib/vertesia-ui-core.js +46 -46
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-env.js +1 -1
- package/lib/vertesia-ui-env.js.map +1 -1
- package/lib/vertesia-ui-features.js +222 -208
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-i18n.B3NFclwl.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.B3NFclwl.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.BWSrNIxc.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.BWSrNIxc.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.BWvWeB1p.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.BWvWeB1p.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.BZCXvTC1.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.BZCXvTC1.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.BbJMvFZW.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.BbJMvFZW.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.CE5ldwpt.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.CE5ldwpt.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.CMC0IShY.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.CMC0IShY.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.CkcRqBKU.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.CkcRqBKU.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.D-Mq1sw_.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.D-Mq1sw_.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.DkK68-A-.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.DkK68-A-.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.XE_dcCg6.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.XE_dcCg6.chunk.js.map +1 -0
- package/lib/vertesia-ui-i18n.js +2 -2
- package/lib/vertesia-ui-i18n.js.map +1 -1
- package/lib/vertesia-ui-i18n.qgNqMPvK.chunk.js +5 -0
- package/lib/vertesia-ui-i18n.qgNqMPvK.chunk.js.map +1 -0
- package/lib/vertesia-ui-layout.js +13 -13
- package/lib/vertesia-ui-layout.js.map +1 -1
- package/lib/vertesia-ui-rich-text.js +68 -68
- package/lib/vertesia-ui-rich-text.js.map +1 -1
- package/lib/vertesia-ui-router.js +1 -1
- package/lib/vertesia-ui-router.js.map +1 -1
- package/lib/vertesia-ui-session.js +1 -1
- package/lib/vertesia-ui-session.js.map +1 -1
- package/lib/vertesia-ui-shell.js +58 -33
- package/lib/vertesia-ui-shell.js.map +1 -1
- package/lib/vertesia-ui-widgets.js +94 -94
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/lib/widgets/json-view/JSONCode.js +1 -1
- package/lib/widgets/json-view/JSONCode.js.map +1 -1
- package/lib/widgets/upload/DropZone.d.ts.map +1 -1
- package/lib/widgets/upload/DropZone.js +1 -1
- package/lib/widgets/upload/DropZone.js.map +1 -1
- package/llms.txt +6 -2
- package/package.json +44 -35
- package/src/__tests__/a11y.test.tsx +25 -0
- package/src/__tests__/theme.test.ts +91 -0
- package/src/boot/branding.test.ts +72 -0
- package/src/boot/branding.ts +108 -0
- package/src/boot/index.test.ts +216 -0
- package/src/boot/index.ts +356 -0
- package/src/boot/vite.test.ts +93 -0
- package/src/boot/vite.ts +118 -0
- package/src/core/components/Link.tsx +1 -1
- package/src/core/components/Spinner.tsx +1 -1
- package/src/core/components/TagsInput.tsx +7 -7
- package/src/core/components/shadcn/badge.tsx +1 -1
- package/src/core/components/shadcn/button.tsx +3 -5
- package/src/core/components/shadcn/filters/comboBox/DateCombobox.tsx +2 -2
- package/src/core/components/shadcn/filters/comboBox/SelectCombobox.tsx +1 -1
- package/src/core/components/shadcn/filters/comboBox/StringListCombobox.tsx +1 -1
- package/src/core/components/shadcn/filters/comboBox/TextCombobox.tsx +1 -1
- package/src/core/components/shadcn/filters/filter/dateFilter.tsx +1 -1
- package/src/core/components/shadcn/filters/filter-styles.ts +4 -4
- package/src/core/components/shadcn/filters/filters.tsx +1 -1
- package/src/core/components/shadcn/label.tsx +1 -1
- package/src/core/components/shadcn/overflowTabs.tsx +2 -2
- package/src/core/components/shadcn/tabs.tsx +1 -1
- package/src/css/utilities.css +7 -0
- package/src/env/index.test.ts +100 -0
- package/src/env/index.ts +66 -3
- package/src/features/activity-doc/ActivityDoc.tsx +1 -1
- package/src/features/agent/PayloadBuilder.tsx +4 -0
- package/src/features/agent/chat/AgentRunFeedback.test.tsx +330 -0
- package/src/features/agent/chat/AgentRunFeedback.tsx +452 -0
- package/src/features/agent/chat/AskUserWidget.test.tsx +24 -2
- package/src/features/agent/chat/AskUserWidget.tsx +19 -4
- package/src/features/agent/chat/ModernAgentConversation.tsx +46 -42
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.test.tsx +207 -0
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +50 -31
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +4 -0
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +42 -8
- package/src/features/agent/chat/ModernAgentOutput/SummaryConversation.ts +2 -0
- package/src/features/agent/chat/ModernAgentOutput/utils.test.ts +14 -0
- package/src/features/agent/chat/hooks/useFileProcessing.test.tsx +0 -5
- package/src/features/agent/chat/index.ts +6 -0
- package/src/features/facets/AgentRunnerFacetsNav.tsx +26 -0
- package/src/features/layout/GenericPageNavHeader.test.tsx +36 -0
- package/src/features/layout/GenericPageNavHeader.tsx +1 -1
- package/src/features/magic-pdf/AnnotatedImageSlider.tsx +1 -1
- package/src/features/magic-pdf/GroundedExtractionView.tsx +3 -3
- package/src/features/permissions/UserPermissionsProvider.test.tsx +50 -1
- package/src/features/permissions/UserPermissionsProvider.tsx +82 -44
- package/src/features/store/objects/DocumentPreviewPanel.tsx +10 -10
- package/src/features/store/objects/components/DocumentInput.tsx +1 -1
- package/src/features/store/objects/selection/SelectionActions.tsx +4 -1
- package/src/features/store/objects/upload/DocumentUploadModal.tsx +1 -1
- package/src/features/user/UserInfo.tsx +1 -1
- package/src/i18n/index.tsx +25 -2
- package/src/i18n/locales/ar.json +30 -0
- package/src/i18n/locales/de.json +30 -0
- package/src/i18n/locales/en.json +30 -0
- package/src/i18n/locales/es.json +30 -0
- package/src/i18n/locales/fr.json +30 -0
- package/src/i18n/locales/it.json +30 -0
- package/src/i18n/locales/ja.json +30 -0
- package/src/i18n/locales/ko.json +30 -0
- package/src/i18n/locales/pt.json +30 -0
- package/src/i18n/locales/ru.json +30 -0
- package/src/i18n/locales/tr.json +30 -0
- package/src/i18n/locales/zh-TW.json +30 -0
- package/src/i18n/locales/zh.json +30 -0
- package/src/layout/ErrorPage.tsx +1 -1
- package/src/layout/Navbar.test.tsx +58 -0
- package/src/layout/Navbar.tsx +5 -2
- package/src/router/RouteComponent.test.tsx +65 -1
- package/src/router/RouteComponent.tsx +18 -15
- package/src/session/UserSession.test.ts +65 -0
- package/src/session/UserSession.ts +6 -4
- package/src/session/UserSessionProvider.strict-mode.test.tsx +44 -0
- package/src/session/UserSessionProvider.test.ts +62 -1
- package/src/session/UserSessionProvider.tsx +9 -1
- package/src/session/auth/composable.renewal.test.ts +170 -0
- package/src/session/auth/composable.test.ts +23 -1
- package/src/session/auth/composable.ts +101 -2
- package/src/session/auth/domainRouting.test.ts +35 -65
- package/src/session/auth/domainRouting.ts +51 -34
- package/src/session/auth/useAuthState.ts +11 -4
- package/src/session/index.ts +3 -1
- package/src/shell/AuthScreenPreview.test.tsx +44 -0
- package/src/shell/AuthScreenPreview.tsx +228 -0
- package/src/shell/BrandedAuthScreens.test.tsx +181 -0
- package/src/shell/BrandedAuthScreens.tsx +117 -0
- package/src/shell/SplashScreen.test.tsx +37 -0
- package/src/shell/SplashScreen.tsx +45 -40
- package/src/shell/VertesiaShell.tsx +49 -22
- package/src/shell/apps/StandaloneApp.tsx +5 -1
- package/src/shell/index.tsx +6 -0
- package/src/shell/login/SignInFlow.tsx +213 -0
- package/src/shell/login/SignInPageShell.tsx +62 -0
- package/src/shell/login/SignInPrimitives.tsx +14 -11
- package/src/shell/login/SignInRestrictedEnvStep.tsx +19 -7
- package/src/shell/login/SigninScreen.test.tsx +104 -0
- package/src/shell/login/SigninScreen.tsx +115 -145
- package/src/shell/login/SignupForm.tsx +8 -3
- package/src/shell/login/signInUtils.ts +30 -5
- package/src/widgets/json-view/JSONCode.test.tsx +2 -2
- package/src/widgets/json-view/JSONCode.tsx +1 -1
- package/src/widgets/markdown/markdown.css +21 -21
- package/src/widgets/upload/DropZone.tsx +2 -4
- package/lib/vertesia-ui-i18n.BfN7iOHb.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.BfN7iOHb.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.BjH2zEZw.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.BjH2zEZw.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.BjSwAZXl.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.BjSwAZXl.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.C7PUm5Au.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.C7PUm5Au.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.CF_1mUS5.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.CF_1mUS5.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.ChfUl3_-.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.ChfUl3_-.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.D-Sk-5d1.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.D-Sk-5d1.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.D4rnu1_S.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.D4rnu1_S.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.DDf0-laK.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.DDf0-laK.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.DN79y06J.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.DN79y06J.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.DWLIciYQ.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.DWLIciYQ.chunk.js.map +0 -1
- package/lib/vertesia-ui-i18n.DvF_YaAJ.chunk.js +0 -5
- package/lib/vertesia-ui-i18n.DvF_YaAJ.chunk.js.map +0 -1
- package/src/session/auth/authState.test.ts +0 -35
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
function e(e){return e}function t(e){return e.replace(/[&<>"']/g,e=>({"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`})[e]??e)}function n(e){return JSON.stringify(e).replace(/</g,`\\3c `)}function r(e){let t={background:[`--background`,`--color-background`,`--vb-bg`],foreground:[`--foreground`,`--color-foreground`,`--vb-fg`],accent:[`--info`,`--info-foreground`,`--color-info`,`--color-info-foreground`],button:[`--primary`,`--color-primary`,`--vb-primary`,`--auth-button`],buttonText:[`--primary-foreground`,`--color-primary-foreground`,`--vb-primary-fg`,`--auth-button-text`]};return Object.entries(e??{}).map(([e,n])=>{if(!Object.hasOwn(t,e)||/[;{}<>]/.test(n))throw Error(`Invalid branding color: ${e}`);return t[e].map(e=>`${e}:${n};`).join(``)}).join(``)}function i(e,t=`.vbrand`){let i=e.loadingIcon?.animation,a=e.loadingIcon?.keyframes??``;if(i!==void 0&&/[;{}<>]/.test(i))throw Error(`Invalid loading icon animation`);if(/[<>]/.test(a))throw Error(`Invalid loading icon keyframes`);let o=i===void 0?``:`--vertesia-loading-animation:${i};--vertesia-loading-pulse-animation:none;`,s=e.font;return`${s?`@font-face { font-family:${n(s.family)};src:url(${n(s.regular)});font-weight:400;font-display:swap; }
|
|
2
|
+
${s.bold?`@font-face { font-family:${n(s.family)};src:url(${n(s.bold)});font-weight:700;font-display:swap; }`:``}`:``}
|
|
3
|
+
${a}
|
|
4
|
+
${t} { ${o}${r(e.colors?.light)}${s?`font-family:${n(s.family)};`:``} }
|
|
5
|
+
.dark ${t},${t}.vboot-dark { ${r(e.colors?.dark)} }
|
|
6
|
+
`}function a(e){return{iconSrc:e.loadingIcon?.light,darkIconSrc:e.loadingIcon?.dark,loadingLabel:e.copy?.loading,slowLoadingLabel:e.copy?.slowLoading,reloadLabel:e.copy?.reload,html:e.boot?.html,styles:`${i(e,`#loading-indicator`)}
|
|
7
|
+
${e.colors?.light?.background?`:root{--vertesia-boot-background:${e.colors.light.background}}`:``}
|
|
8
|
+
${e.colors?.dark?.background?`:root.dark{--vertesia-boot-background:${e.colors.dark.background}}`:``}
|
|
9
|
+
${e.boot?.styles??``}`}}const o=`
|
|
10
|
+
.vboot {
|
|
11
|
+
--vb-bg: #ffffff;
|
|
12
|
+
--vb-fg: #0a0a0a;
|
|
13
|
+
--vb-muted: #636363;
|
|
14
|
+
--vb-muted-bg: #f5f5f5;
|
|
15
|
+
--vb-border: #e5e5e5;
|
|
16
|
+
--vb-primary: #0048bd;
|
|
17
|
+
--vb-primary-fg: #ffffff;
|
|
18
|
+
--vb-glow: rgba(50, 49, 189, 0.12);
|
|
19
|
+
font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
20
|
+
color: var(--vb-fg);
|
|
21
|
+
}
|
|
22
|
+
.vboot.vboot-dark {
|
|
23
|
+
--vb-bg: #0a0a0a;
|
|
24
|
+
--vb-fg: #fafafa;
|
|
25
|
+
--vb-muted: #a1a1a1;
|
|
26
|
+
--vb-muted-bg: #262626;
|
|
27
|
+
--vb-border: rgba(255, 255, 255, 0.1);
|
|
28
|
+
--vb-primary: #2b69d1;
|
|
29
|
+
--vb-primary-fg: #fafafa;
|
|
30
|
+
--vb-glow: rgba(79, 70, 229, 0.2);
|
|
31
|
+
}
|
|
32
|
+
@keyframes vboot-spin {
|
|
33
|
+
from { transform: rotate(0deg); }
|
|
34
|
+
to { transform: rotate(360deg); }
|
|
35
|
+
}
|
|
36
|
+
.vboot-overlay {
|
|
37
|
+
position: absolute !important;
|
|
38
|
+
inset: 0 !important;
|
|
39
|
+
box-sizing: border-box !important;
|
|
40
|
+
width: 100% !important;
|
|
41
|
+
height: 100% !important;
|
|
42
|
+
margin: 0 !important;
|
|
43
|
+
padding: 0 !important;
|
|
44
|
+
display: flex !important;
|
|
45
|
+
flex-direction: column !important;
|
|
46
|
+
align-items: center !important;
|
|
47
|
+
justify-content: center !important;
|
|
48
|
+
gap: 1.5rem !important;
|
|
49
|
+
transform: none !important;
|
|
50
|
+
background: var(--vb-bg) !important;
|
|
51
|
+
}
|
|
52
|
+
#loading-indicator {
|
|
53
|
+
position: fixed !important;
|
|
54
|
+
inset: 0 !important;
|
|
55
|
+
z-index: 2147483647 !important;
|
|
56
|
+
box-sizing: border-box !important;
|
|
57
|
+
width: 100vw !important;
|
|
58
|
+
height: 100vh !important;
|
|
59
|
+
margin: 0 !important;
|
|
60
|
+
padding: 0 !important;
|
|
61
|
+
transform: none !important;
|
|
62
|
+
}
|
|
63
|
+
.vboot-spinner {
|
|
64
|
+
width: 2.5rem !important;
|
|
65
|
+
min-width: 2.5rem !important;
|
|
66
|
+
max-width: 2.5rem !important;
|
|
67
|
+
height: 2.5rem !important;
|
|
68
|
+
min-height: 2.5rem !important;
|
|
69
|
+
max-height: 2.5rem !important;
|
|
70
|
+
margin: 0 !important;
|
|
71
|
+
padding: 0 !important;
|
|
72
|
+
object-fit: contain !important;
|
|
73
|
+
flex: none !important;
|
|
74
|
+
border-radius: 100% !important;
|
|
75
|
+
animation: var(--vertesia-loading-animation, vboot-spin 2s linear infinite) !important;
|
|
76
|
+
}
|
|
77
|
+
.vboot-icon-dark { display: none; }
|
|
78
|
+
.vboot-dark .vboot-icon-light { display: none; }
|
|
79
|
+
.vboot-dark .vboot-icon-dark { display: block; }
|
|
80
|
+
.vboot-slow {
|
|
81
|
+
text-align: center;
|
|
82
|
+
}
|
|
83
|
+
.vboot-slow p {
|
|
84
|
+
color: var(--vb-muted);
|
|
85
|
+
font-size: 0.875rem;
|
|
86
|
+
margin: 0 0 0.75rem;
|
|
87
|
+
}
|
|
88
|
+
.vboot-btn {
|
|
89
|
+
display: inline-block;
|
|
90
|
+
padding: 0.5rem 1rem;
|
|
91
|
+
background: var(--vb-primary);
|
|
92
|
+
color: var(--vb-primary-fg);
|
|
93
|
+
border: none;
|
|
94
|
+
border-radius: 0.375rem;
|
|
95
|
+
font: inherit;
|
|
96
|
+
font-size: 0.875rem;
|
|
97
|
+
font-weight: 500;
|
|
98
|
+
cursor: pointer;
|
|
99
|
+
}
|
|
100
|
+
.vboot-btn:hover {
|
|
101
|
+
opacity: 0.9;
|
|
102
|
+
}
|
|
103
|
+
@media (prefers-reduced-motion: reduce) {
|
|
104
|
+
.vboot-spinner { animation: none !important; }
|
|
105
|
+
}
|
|
106
|
+
`;function s(e){return JSON.stringify(e).replaceAll(`<`,`\\u003c`)}function c(e){return{storageKey:e.storageKey??`vite-ui-theme`,iconSrc:e.iconSrc??`/icon.svg`,loadingLabel:e.loadingLabel??`Loading`,autoStart:e.autoStart??!0,html:e.html,styles:e.styles}}function l(e={}){let t=e=>e.replace(/[&<>"']/g,e=>({"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`})[e]??e),{iconSrc:n,loadingLabel:r}=c(e),i=(e,n=``)=>`<img class="vboot-spinner ${n}" width="40" height="40" src="${t(e)}" alt="${t(r)}" />`;return`<div class="vboot-overlay" role="status" aria-live="polite">${e.darkIconSrc?i(n,`vboot-icon-light`)+i(e.darkIconSrc,`vboot-icon-dark`):i(n)}
|
|
107
|
+
<div id="loading-slow-notice" class="vboot-slow" style="display: none;">
|
|
108
|
+
<p>${t(e.slowLoadingLabel??`Still loading — this is taking longer than usual.`)}</p>
|
|
109
|
+
<div id="loading-slow-reload" style="display: none;"><button type="button" class="vboot-btn" data-boot-reload>${t(e.reloadLabel??`Reload page`)}</button></div></div></div>`}function u(e={}){let{storageKey:t,html:n}=c(e),r=l(e);return`(() => {
|
|
110
|
+
const storageKey = ${s(t)};
|
|
111
|
+
|
|
112
|
+
const customHtml = ${n===void 0?`undefined`:s(n)};
|
|
113
|
+
let slowNoticeTimer;
|
|
114
|
+
let slowReloadTimer;
|
|
115
|
+
const previewTheme = (() => {
|
|
116
|
+
try {
|
|
117
|
+
const value = new URL(window.location.href).searchParams.get('__vertesia_boot_theme');
|
|
118
|
+
return value === 'dark' || value === 'light' ? value : null;
|
|
119
|
+
} catch (_error) {
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
})();
|
|
123
|
+
const prefersDarkTheme = () => {
|
|
124
|
+
if (previewTheme) return previewTheme === 'dark';
|
|
125
|
+
try {
|
|
126
|
+
const stored = window.localStorage.getItem(storageKey);
|
|
127
|
+
if (stored === 'dark') return true;
|
|
128
|
+
if (stored === 'light') return false;
|
|
129
|
+
} catch (_error) {
|
|
130
|
+
// Storage can be unavailable in private or restricted browsing contexts.
|
|
131
|
+
}
|
|
132
|
+
try {
|
|
133
|
+
return typeof window.matchMedia === 'function' && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
134
|
+
} catch (_error) {
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
const applyTheme = () => {
|
|
139
|
+
const dark = prefersDarkTheme();
|
|
140
|
+
const root = document.documentElement;
|
|
141
|
+
root.classList.remove('light', 'dark');
|
|
142
|
+
root.classList.add(dark ? 'dark' : 'light');
|
|
143
|
+
return dark;
|
|
144
|
+
};
|
|
145
|
+
const paintDocumentBackground = () => {
|
|
146
|
+
const dark = applyTheme();
|
|
147
|
+
const root = document.documentElement;
|
|
148
|
+
const background = window.getComputedStyle(root).getPropertyValue('--vertesia-boot-background').trim()
|
|
149
|
+
|| (dark ? '#0a0a0a' : '#ffffff');
|
|
150
|
+
root.style.backgroundColor = background;
|
|
151
|
+
root.style.colorScheme = dark ? 'dark' : 'light';
|
|
152
|
+
if (document.body) document.body.style.backgroundColor = background;
|
|
153
|
+
};
|
|
154
|
+
const restoreDocumentBackground = () => {
|
|
155
|
+
applyTheme();
|
|
156
|
+
const root = document.documentElement;
|
|
157
|
+
root.style.removeProperty('background-color');
|
|
158
|
+
root.style.removeProperty('color-scheme');
|
|
159
|
+
if (document.body) document.body.style.removeProperty('background-color');
|
|
160
|
+
};
|
|
161
|
+
const bootThemeClass = () => prefersDarkTheme() ? 'vboot vboot-dark' : 'vboot';
|
|
162
|
+
const ensureLoadingIndicator = () => {
|
|
163
|
+
if (document.getElementById('loading-indicator') || !document.body) return;
|
|
164
|
+
paintDocumentBackground();
|
|
165
|
+
const loading = document.createElement('div');
|
|
166
|
+
loading.id = 'loading-indicator';
|
|
167
|
+
loading.className = bootThemeClass();
|
|
168
|
+
loading.innerHTML = customHtml ?? ${s(r)};
|
|
169
|
+
loading.querySelectorAll('[data-boot-title]').forEach((heading) => {
|
|
170
|
+
if (document.title) heading.textContent = document.title;
|
|
171
|
+
});
|
|
172
|
+
loading.querySelectorAll('[data-boot-reload]').forEach((button) => {
|
|
173
|
+
button.addEventListener('click', () => window.location.reload());
|
|
174
|
+
});
|
|
175
|
+
// Custom landmarks and controls must stay in body to enter the accessibility tree.
|
|
176
|
+
const loadingParent = customHtml === undefined && typeof document.documentElement.appendChild === 'function'
|
|
177
|
+
? document.documentElement
|
|
178
|
+
: document.body;
|
|
179
|
+
loadingParent.appendChild(loading);
|
|
180
|
+
};
|
|
181
|
+
const hideLoadingIndicator = () => {
|
|
182
|
+
clearTimeout(slowNoticeTimer);
|
|
183
|
+
clearTimeout(slowReloadTimer);
|
|
184
|
+
const loading = document.getElementById('loading-indicator');
|
|
185
|
+
if (loading) loading.style.display = 'none';
|
|
186
|
+
};
|
|
187
|
+
const hasAppRendered = (rootId = 'root') => {
|
|
188
|
+
const root = document.getElementById(rootId);
|
|
189
|
+
return Boolean(root && root.innerHTML && root.innerHTML.trim() !== '');
|
|
190
|
+
};
|
|
191
|
+
const hideLoadingIndicatorOnFirstRender = (rootId = 'root') => {
|
|
192
|
+
if (typeof MutationObserver !== 'function') return;
|
|
193
|
+
const root = document.getElementById(rootId);
|
|
194
|
+
if (!root) return;
|
|
195
|
+
if (hasAppRendered(rootId)) {
|
|
196
|
+
hideLoadingIndicator();
|
|
197
|
+
restoreDocumentBackground();
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
const observer = new MutationObserver(() => {
|
|
201
|
+
if (!hasAppRendered(rootId)) return;
|
|
202
|
+
hideLoadingIndicator();
|
|
203
|
+
restoreDocumentBackground();
|
|
204
|
+
observer.disconnect();
|
|
205
|
+
});
|
|
206
|
+
observer.observe(root, { childList: true });
|
|
207
|
+
};
|
|
208
|
+
// Used by standalone apps. Hosts with their own error handler keep autoStart disabled.
|
|
209
|
+
const scheduleSlowLoadingNotice = () => {
|
|
210
|
+
clearTimeout(slowNoticeTimer);
|
|
211
|
+
clearTimeout(slowReloadTimer);
|
|
212
|
+
if (hasAppRendered()) return;
|
|
213
|
+
slowNoticeTimer = setTimeout(() => {
|
|
214
|
+
const notice = document.getElementById('loading-slow-notice');
|
|
215
|
+
if (notice) notice.style.display = '';
|
|
216
|
+
}, 10000);
|
|
217
|
+
slowReloadTimer = setTimeout(() => {
|
|
218
|
+
const reload = document.getElementById('loading-slow-reload');
|
|
219
|
+
if (reload) reload.style.display = '';
|
|
220
|
+
}, 30000);
|
|
221
|
+
};
|
|
222
|
+
window.__vertesiaBoot = {
|
|
223
|
+
scheduleSlowLoadingNotice,
|
|
224
|
+
applyTheme,
|
|
225
|
+
bootThemeClass,
|
|
226
|
+
ensureLoadingIndicator,
|
|
227
|
+
hasAppRendered,
|
|
228
|
+
hideLoadingIndicator,
|
|
229
|
+
hideLoadingIndicatorOnFirstRender,
|
|
230
|
+
paintDocumentBackground,
|
|
231
|
+
prefersDarkTheme,
|
|
232
|
+
restoreDocumentBackground,
|
|
233
|
+
};
|
|
234
|
+
paintDocumentBackground();
|
|
235
|
+
})();`}function d(e={}){return`<style id="vertesia-boot-styles">${o}\n${e.styles??``}</style>\n<script>${u(e)}<\/script>`}function f(){return`<script>window.__vertesiaBoot.ensureLoadingIndicator(); window.__vertesiaBoot.hideLoadingIndicatorOnFirstRender(); window.__vertesiaBoot.scheduleSlowLoadingNotice();<\/script>`}function p(e){return e===` `||e===` `||e===`
|
|
236
|
+
`||e===`\r`||e===`\f`}function m(e,t){let n=e.toLowerCase(),r=0;for(;r<n.length;){let e=n.indexOf(t,r);if(e===-1)return!1;let i=n[e-1],a=e+t.length;for(;p(n[a]);)a+=1;if(p(i)&&n[a]===`=`)return!0;r=e+t.length}return!1}function h(e,t,n){let r=e.toLowerCase(),i=`<${t}`,a=0;for(;a<r.length;){let e=r.indexOf(i,a);if(e===-1)return;let t=r[e+i.length];if(t===`>`||p(t)){let t=r.indexOf(`>`,e+i.length);if(t===-1)return;if(!n||m(r.slice(e,t+1),n))return t+1;a=t+1}else a=e+i.length}}function g(e,t,n){return`${e.slice(0,t)}${n}${e.slice(t)}`}function _(e,t={}){let n=c(t),r=d(n),i=h(e,`meta`,`charset`)??h(e,`head`),a=i===void 0?e:g(e,i,`\n${r}`);if(!n.autoStart)return a;let o=a.toLowerCase().indexOf(`</body>`);return o===-1?a:g(a,o,`${f()}\n`)}function v(e={}){return{name:`vertesia-boot-screen`,transformIndexHtml:t=>_(t,e)}}export{o as BOOT_SCREEN_STYLES,a as brandedBootOptions,v as createBootScreenVitePlugin,e as defineAppBranding,t as escapeBrandHtml,_ as injectBootScreenHtml,d as renderBootScreenHead,f as renderBootScreenInitializer,u as renderBootScreenRuntime,i as renderBrandStyles,l as renderDefaultBootContent};
|
|
237
|
+
//# sourceMappingURL=vertesia-ui-boot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vertesia-ui-boot.js","names":[],"sources":["boot/branding.js","boot/index.js"],"sourcesContent":["export function defineAppBranding(branding) {\n return branding;\n}\nexport function escapeBrandHtml(value) {\n return value.replace(/[&<>\"']/g, (char) => ({ '&': '&', '<': '<', '>': '>', '\"': '"', \"'\": ''' })[char] ?? char);\n}\nfunction cssString(value) {\n return JSON.stringify(value).replace(/</g, '\\\\3c ');\n}\nfunction colorDeclarations(colors) {\n const variables = {\n background: ['--background', '--color-background', '--vb-bg'],\n foreground: ['--foreground', '--color-foreground', '--vb-fg'],\n accent: ['--info', '--info-foreground', '--color-info', '--color-info-foreground'],\n button: ['--primary', '--color-primary', '--vb-primary', '--auth-button'],\n buttonText: ['--primary-foreground', '--color-primary-foreground', '--vb-primary-fg', '--auth-button-text'],\n };\n return Object.entries(colors ?? {})\n .map(([key, value]) => {\n if (!Object.hasOwn(variables, key) || /[;{}<>]/.test(value))\n throw new Error(`Invalid branding color: ${key}`);\n return variables[key].map((name) => `${name}:${value};`).join('');\n })\n .join('');\n}\n/** Theme tokens only: branding must never replace the shared page layout. */\nexport function renderBrandStyles(brand, selector = '.vbrand') {\n const animation = brand.loadingIcon?.animation;\n const keyframes = brand.loadingIcon?.keyframes ?? '';\n if (animation !== undefined && /[;{}<>]/.test(animation))\n throw new Error('Invalid loading icon animation');\n if (/[<>]/.test(keyframes))\n throw new Error('Invalid loading icon keyframes');\n const motion = animation === undefined\n ? ''\n : `--vertesia-loading-animation:${animation};--vertesia-loading-pulse-animation:none;`;\n const font = brand.font;\n const faces = font\n ? `@font-face { font-family:${cssString(font.family)};src:url(${cssString(font.regular)});font-weight:400;font-display:swap; }\n${font.bold ? `@font-face { font-family:${cssString(font.family)};src:url(${cssString(font.bold)});font-weight:700;font-display:swap; }` : ''}`\n : '';\n return `${faces}\n${keyframes}\n${selector} { ${motion}${colorDeclarations(brand.colors?.light)}${font ? `font-family:${cssString(font.family)};` : ''} }\n.dark ${selector},${selector}.vboot-dark { ${colorDeclarations(brand.colors?.dark)} }\n`;\n}\nexport function brandedBootOptions(brand) {\n return {\n iconSrc: brand.loadingIcon?.light,\n darkIconSrc: brand.loadingIcon?.dark,\n loadingLabel: brand.copy?.loading,\n slowLoadingLabel: brand.copy?.slowLoading,\n reloadLabel: brand.copy?.reload,\n html: brand.boot?.html,\n styles: `${renderBrandStyles(brand, '#loading-indicator')}\n${brand.colors?.light?.background ? `:root{--vertesia-boot-background:${brand.colors.light.background}}` : ''}\n${brand.colors?.dark?.background ? `:root.dark{--vertesia-boot-background:${brand.colors.dark.background}}` : ''}\n${brand.boot?.styles ?? ''}`,\n };\n}\n//# sourceMappingURL=branding.js.map","const DEFAULT_STORAGE_KEY = 'vite-ui-theme';\nconst DEFAULT_ICON_SRC = '/icon.svg';\nconst DEFAULT_LOADING_LABEL = 'Loading';\nexport const BOOT_SCREEN_STYLES = `\n .vboot {\n --vb-bg: #ffffff;\n --vb-fg: #0a0a0a;\n --vb-muted: #636363;\n --vb-muted-bg: #f5f5f5;\n --vb-border: #e5e5e5;\n --vb-primary: #0048bd;\n --vb-primary-fg: #ffffff;\n --vb-glow: rgba(50, 49, 189, 0.12);\n font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;\n color: var(--vb-fg);\n }\n .vboot.vboot-dark {\n --vb-bg: #0a0a0a;\n --vb-fg: #fafafa;\n --vb-muted: #a1a1a1;\n --vb-muted-bg: #262626;\n --vb-border: rgba(255, 255, 255, 0.1);\n --vb-primary: #2b69d1;\n --vb-primary-fg: #fafafa;\n --vb-glow: rgba(79, 70, 229, 0.2);\n }\n @keyframes vboot-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n .vboot-overlay {\n position: absolute !important;\n inset: 0 !important;\n box-sizing: border-box !important;\n width: 100% !important;\n height: 100% !important;\n margin: 0 !important;\n padding: 0 !important;\n display: flex !important;\n flex-direction: column !important;\n align-items: center !important;\n justify-content: center !important;\n gap: 1.5rem !important;\n transform: none !important;\n background: var(--vb-bg) !important;\n }\n #loading-indicator {\n position: fixed !important;\n inset: 0 !important;\n z-index: 2147483647 !important;\n box-sizing: border-box !important;\n width: 100vw !important;\n height: 100vh !important;\n margin: 0 !important;\n padding: 0 !important;\n transform: none !important;\n }\n .vboot-spinner {\n width: 2.5rem !important;\n min-width: 2.5rem !important;\n max-width: 2.5rem !important;\n height: 2.5rem !important;\n min-height: 2.5rem !important;\n max-height: 2.5rem !important;\n margin: 0 !important;\n padding: 0 !important;\n object-fit: contain !important;\n flex: none !important;\n border-radius: 100% !important;\n animation: var(--vertesia-loading-animation, vboot-spin 2s linear infinite) !important;\n }\n .vboot-icon-dark { display: none; }\n .vboot-dark .vboot-icon-light { display: none; }\n .vboot-dark .vboot-icon-dark { display: block; }\n .vboot-slow {\n text-align: center;\n }\n .vboot-slow p {\n color: var(--vb-muted);\n font-size: 0.875rem;\n margin: 0 0 0.75rem;\n }\n .vboot-btn {\n display: inline-block;\n padding: 0.5rem 1rem;\n background: var(--vb-primary);\n color: var(--vb-primary-fg);\n border: none;\n border-radius: 0.375rem;\n font: inherit;\n font-size: 0.875rem;\n font-weight: 500;\n cursor: pointer;\n }\n .vboot-btn:hover {\n opacity: 0.9;\n }\n @media (prefers-reduced-motion: reduce) {\n .vboot-spinner { animation: none !important; }\n }\n`;\nfunction inlineJson(value) {\n return JSON.stringify(value).replaceAll('<', '\\\\u003c');\n}\nfunction normalizedOptions(options) {\n return {\n storageKey: options.storageKey ?? DEFAULT_STORAGE_KEY,\n iconSrc: options.iconSrc ?? DEFAULT_ICON_SRC,\n loadingLabel: options.loadingLabel ?? DEFAULT_LOADING_LABEL,\n autoStart: options.autoStart ?? true,\n html: options.html,\n styles: options.styles,\n };\n}\n/** Default markup shared by Studio and configurable applications. */\nexport function renderDefaultBootContent(options = {}) {\n const escapeMarkup = (value) => value.replace(/[&<>\"']/g, (char) => ({ '&': '&', '<': '<', '>': '>', '\"': '"', \"'\": ''' })[char] ?? char);\n const { iconSrc, loadingLabel } = normalizedOptions(options);\n const icon = (src, className = '') => `<img class=\"vboot-spinner ${className}\" width=\"40\" height=\"40\" src=\"${escapeMarkup(src)}\" alt=\"${escapeMarkup(loadingLabel)}\" />`;\n return `<div class=\"vboot-overlay\" role=\"status\" aria-live=\"polite\">${options.darkIconSrc ? icon(iconSrc, 'vboot-icon-light') + icon(options.darkIconSrc, 'vboot-icon-dark') : icon(iconSrc)}\n<div id=\"loading-slow-notice\" class=\"vboot-slow\" style=\"display: none;\">\n<p>${escapeMarkup(options.slowLoadingLabel ?? 'Still loading — this is taking longer than usual.')}</p>\n<div id=\"loading-slow-reload\" style=\"display: none;\"><button type=\"button\" class=\"vboot-btn\" data-boot-reload>${escapeMarkup(options.reloadLabel ?? 'Reload page')}</button></div></div></div>`;\n}\nexport function renderBootScreenRuntime(options = {}) {\n const { storageKey, html } = normalizedOptions(options);\n const defaultHtml = renderDefaultBootContent(options);\n return `(() => {\n const storageKey = ${inlineJson(storageKey)};\n\n const customHtml = ${html === undefined ? 'undefined' : inlineJson(html)};\n let slowNoticeTimer;\n let slowReloadTimer;\n const previewTheme = (() => {\n try {\n const value = new URL(window.location.href).searchParams.get('__vertesia_boot_theme');\n return value === 'dark' || value === 'light' ? value : null;\n } catch (_error) {\n return null;\n }\n })();\n const prefersDarkTheme = () => {\n if (previewTheme) return previewTheme === 'dark';\n try {\n const stored = window.localStorage.getItem(storageKey);\n if (stored === 'dark') return true;\n if (stored === 'light') return false;\n } catch (_error) {\n // Storage can be unavailable in private or restricted browsing contexts.\n }\n try {\n return typeof window.matchMedia === 'function' && window.matchMedia('(prefers-color-scheme: dark)').matches;\n } catch (_error) {\n return false;\n }\n };\n const applyTheme = () => {\n const dark = prefersDarkTheme();\n const root = document.documentElement;\n root.classList.remove('light', 'dark');\n root.classList.add(dark ? 'dark' : 'light');\n return dark;\n };\n const paintDocumentBackground = () => {\n const dark = applyTheme();\n const root = document.documentElement;\n const background = window.getComputedStyle(root).getPropertyValue('--vertesia-boot-background').trim()\n || (dark ? '#0a0a0a' : '#ffffff');\n root.style.backgroundColor = background;\n root.style.colorScheme = dark ? 'dark' : 'light';\n if (document.body) document.body.style.backgroundColor = background;\n };\n const restoreDocumentBackground = () => {\n applyTheme();\n const root = document.documentElement;\n root.style.removeProperty('background-color');\n root.style.removeProperty('color-scheme');\n if (document.body) document.body.style.removeProperty('background-color');\n };\n const bootThemeClass = () => prefersDarkTheme() ? 'vboot vboot-dark' : 'vboot';\n const ensureLoadingIndicator = () => {\n if (document.getElementById('loading-indicator') || !document.body) return;\n paintDocumentBackground();\n const loading = document.createElement('div');\n loading.id = 'loading-indicator';\n loading.className = bootThemeClass();\n loading.innerHTML = customHtml ?? ${inlineJson(defaultHtml)};\n loading.querySelectorAll('[data-boot-title]').forEach((heading) => {\n if (document.title) heading.textContent = document.title;\n });\n loading.querySelectorAll('[data-boot-reload]').forEach((button) => {\n button.addEventListener('click', () => window.location.reload());\n });\n // Custom landmarks and controls must stay in body to enter the accessibility tree.\n const loadingParent = customHtml === undefined && typeof document.documentElement.appendChild === 'function'\n ? document.documentElement\n : document.body;\n loadingParent.appendChild(loading);\n };\n const hideLoadingIndicator = () => {\n clearTimeout(slowNoticeTimer);\n clearTimeout(slowReloadTimer);\n const loading = document.getElementById('loading-indicator');\n if (loading) loading.style.display = 'none';\n };\n const hasAppRendered = (rootId = 'root') => {\n const root = document.getElementById(rootId);\n return Boolean(root && root.innerHTML && root.innerHTML.trim() !== '');\n };\n const hideLoadingIndicatorOnFirstRender = (rootId = 'root') => {\n if (typeof MutationObserver !== 'function') return;\n const root = document.getElementById(rootId);\n if (!root) return;\n if (hasAppRendered(rootId)) {\n hideLoadingIndicator();\n restoreDocumentBackground();\n return;\n }\n const observer = new MutationObserver(() => {\n if (!hasAppRendered(rootId)) return;\n hideLoadingIndicator();\n restoreDocumentBackground();\n observer.disconnect();\n });\n observer.observe(root, { childList: true });\n };\n // Used by standalone apps. Hosts with their own error handler keep autoStart disabled.\n const scheduleSlowLoadingNotice = () => {\n clearTimeout(slowNoticeTimer);\n clearTimeout(slowReloadTimer);\n if (hasAppRendered()) return;\n slowNoticeTimer = setTimeout(() => {\n const notice = document.getElementById('loading-slow-notice');\n if (notice) notice.style.display = '';\n }, 10000);\n slowReloadTimer = setTimeout(() => {\n const reload = document.getElementById('loading-slow-reload');\n if (reload) reload.style.display = '';\n }, 30000);\n };\n window.__vertesiaBoot = {\n scheduleSlowLoadingNotice,\n applyTheme,\n bootThemeClass,\n ensureLoadingIndicator,\n hasAppRendered,\n hideLoadingIndicator,\n hideLoadingIndicatorOnFirstRender,\n paintDocumentBackground,\n prefersDarkTheme,\n restoreDocumentBackground,\n };\n paintDocumentBackground();\n})();`;\n}\nexport function renderBootScreenHead(options = {}) {\n return `<style id=\"vertesia-boot-styles\">${BOOT_SCREEN_STYLES}\\n${options.styles ?? ''}</style>\\n<script>${renderBootScreenRuntime(options)}</script>`;\n}\nexport function renderBootScreenInitializer() {\n return `<script>window.__vertesiaBoot.ensureLoadingIndicator(); window.__vertesiaBoot.hideLoadingIndicatorOnFirstRender(); window.__vertesiaBoot.scheduleSlowLoadingNotice();</script>`;\n}\nfunction isHtmlWhitespace(character) {\n return character === ' ' || character === '\\t' || character === '\\n' || character === '\\r' || character === '\\f';\n}\nfunction hasAttribute(openingTag, attributeName) {\n const lowerTag = openingTag.toLowerCase();\n let searchFrom = 0;\n while (searchFrom < lowerTag.length) {\n const attributeIndex = lowerTag.indexOf(attributeName, searchFrom);\n if (attributeIndex === -1)\n return false;\n const before = lowerTag[attributeIndex - 1];\n let afterIndex = attributeIndex + attributeName.length;\n while (isHtmlWhitespace(lowerTag[afterIndex]))\n afterIndex += 1;\n if (isHtmlWhitespace(before) && lowerTag[afterIndex] === '=')\n return true;\n searchFrom = attributeIndex + attributeName.length;\n }\n return false;\n}\nfunction findOpeningTagEnd(html, tagName, attributeName) {\n const lowerHtml = html.toLowerCase();\n const tagStart = `<${tagName}`;\n let searchFrom = 0;\n while (searchFrom < lowerHtml.length) {\n const start = lowerHtml.indexOf(tagStart, searchFrom);\n if (start === -1)\n return undefined;\n const boundary = lowerHtml[start + tagStart.length];\n if (boundary === '>' || isHtmlWhitespace(boundary)) {\n const end = lowerHtml.indexOf('>', start + tagStart.length);\n if (end === -1)\n return undefined;\n if (!attributeName || hasAttribute(lowerHtml.slice(start, end + 1), attributeName))\n return end + 1;\n searchFrom = end + 1;\n }\n else {\n searchFrom = start + tagStart.length;\n }\n }\n return undefined;\n}\nfunction insertAt(html, index, content) {\n return `${html.slice(0, index)}${content}${html.slice(index)}`;\n}\nexport function injectBootScreenHtml(html, options = {}) {\n const normalized = normalizedOptions(options);\n const head = renderBootScreenHead(normalized);\n const insertionPoint = findOpeningTagEnd(html, 'meta', 'charset') ?? findOpeningTagEnd(html, 'head');\n const withHead = insertionPoint === undefined ? html : insertAt(html, insertionPoint, `\\n${head}`);\n if (!normalized.autoStart)\n return withHead;\n const bodyEnd = withHead.toLowerCase().indexOf('</body>');\n return bodyEnd === -1 ? withHead : insertAt(withHead, bodyEnd, `${renderBootScreenInitializer()}\\n`);\n}\nexport function createBootScreenVitePlugin(options = {}) {\n return {\n name: 'vertesia-boot-screen',\n transformIndexHtml: (html) => injectBootScreenHtml(html, options),\n };\n}\nexport * from './branding.js';\n//# sourceMappingURL=index.js.map"],"mappings":"AAAA,SAAgB,EAAkB,EAAU,CACxC,OAAO,CACX,CACA,SAAgB,EAAgB,EAAO,CACnC,OAAO,EAAM,QAAQ,WAAa,IAAU,CAAE,IAAK,QAAS,IAAK,OAAQ,IAAK,OAAQ,IAAK,SAAU,IAAK,OAAQ,EAAA,CAAG,IAAS,CAAI,CACtI,CACA,SAAS,EAAU,EAAO,CACtB,OAAO,KAAK,UAAU,CAAK,CAAC,CAAC,QAAQ,KAAM,OAAO,CACtD,CACA,SAAS,EAAkB,EAAQ,CAC/B,IAAM,EAAY,CACd,WAAY,CAAC,eAAgB,qBAAsB,SAAS,EAC5D,WAAY,CAAC,eAAgB,qBAAsB,SAAS,EAC5D,OAAQ,CAAC,SAAU,oBAAqB,eAAgB,yBAAyB,EACjF,OAAQ,CAAC,YAAa,kBAAmB,eAAgB,eAAe,EACxE,WAAY,CAAC,uBAAwB,6BAA8B,kBAAmB,oBAAoB,CAC9G,EACA,OAAO,OAAO,QAAQ,GAAU,CAAC,CAAC,CAAC,CAC9B,KAAK,CAAC,EAAK,KAAW,CACvB,GAAI,CAAC,OAAO,OAAO,EAAW,CAAG,GAAK,UAAU,KAAK,CAAK,EACtD,MAAU,MAAM,2BAA2B,GAAK,EACpD,OAAO,EAAU,EAAI,CAA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