@ydtb/tk-scope-app 0.14.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +48 -0
- package/dist/src/auth/AuthStrategyGate.d.ts +27 -0
- package/dist/src/auth/AuthStrategyGate.d.ts.map +1 -0
- package/dist/src/auth/AuthStrategyGate.js +58 -0
- package/dist/src/auth/AuthStrategyGate.js.map +1 -0
- package/dist/src/auth/components/DefaultDeviceLogin.d.ts +7 -0
- package/dist/src/auth/components/DefaultDeviceLogin.d.ts.map +1 -0
- package/dist/src/auth/components/DefaultDeviceLogin.js +21 -0
- package/dist/src/auth/components/DefaultDeviceLogin.js.map +1 -0
- package/dist/src/auth/components/DefaultPinLogin.d.ts +8 -0
- package/dist/src/auth/components/DefaultPinLogin.d.ts.map +1 -0
- package/dist/src/auth/components/DefaultPinLogin.js +85 -0
- package/dist/src/auth/components/DefaultPinLogin.js.map +1 -0
- package/dist/src/auth/components/DefaultSessionLogin.d.ts +7 -0
- package/dist/src/auth/components/DefaultSessionLogin.d.ts.map +1 -0
- package/dist/src/auth/components/DefaultSessionLogin.js +21 -0
- package/dist/src/auth/components/DefaultSessionLogin.js.map +1 -0
- package/dist/src/auth/components/index.d.ts +12 -0
- package/dist/src/auth/components/index.d.ts.map +1 -0
- package/dist/src/auth/components/index.js +21 -0
- package/dist/src/auth/components/index.js.map +1 -0
- package/dist/src/auth/index.d.ts +8 -0
- package/dist/src/auth/index.d.ts.map +1 -0
- package/dist/src/auth/index.js +7 -0
- package/dist/src/auth/index.js.map +1 -0
- package/dist/src/auth/persistence/pin-storage.d.ts +19 -0
- package/dist/src/auth/persistence/pin-storage.d.ts.map +1 -0
- package/dist/src/auth/persistence/pin-storage.js +80 -0
- package/dist/src/auth/persistence/pin-storage.js.map +1 -0
- package/dist/src/auth/strategies/device.d.ts +16 -0
- package/dist/src/auth/strategies/device.d.ts.map +1 -0
- package/dist/src/auth/strategies/device.js +51 -0
- package/dist/src/auth/strategies/device.js.map +1 -0
- package/dist/src/auth/strategies/index.d.ts +13 -0
- package/dist/src/auth/strategies/index.d.ts.map +1 -0
- package/dist/src/auth/strategies/index.js +24 -0
- package/dist/src/auth/strategies/index.js.map +1 -0
- package/dist/src/auth/strategies/none.d.ts +9 -0
- package/dist/src/auth/strategies/none.d.ts.map +1 -0
- package/dist/src/auth/strategies/none.js +10 -0
- package/dist/src/auth/strategies/none.js.map +1 -0
- package/dist/src/auth/strategies/pin.d.ts +9 -0
- package/dist/src/auth/strategies/pin.d.ts.map +1 -0
- package/dist/src/auth/strategies/pin.js +48 -0
- package/dist/src/auth/strategies/pin.js.map +1 -0
- package/dist/src/auth/strategies/session.d.ts +9 -0
- package/dist/src/auth/strategies/session.d.ts.map +1 -0
- package/dist/src/auth/strategies/session.js +42 -0
- package/dist/src/auth/strategies/session.js.map +1 -0
- package/dist/src/auth/types.d.ts +2 -0
- package/dist/src/auth/types.d.ts.map +1 -0
- package/dist/src/auth/types.js +2 -0
- package/dist/src/auth/types.js.map +1 -0
- package/dist/src/client.d.ts +63 -0
- package/dist/src/client.d.ts.map +1 -0
- package/dist/src/client.js +81 -0
- package/dist/src/client.js.map +1 -0
- package/dist/src/components/BackendErrorGate.d.ts +10 -0
- package/dist/src/components/BackendErrorGate.d.ts.map +1 -0
- package/dist/src/components/BackendErrorGate.js +19 -0
- package/dist/src/components/BackendErrorGate.js.map +1 -0
- package/dist/src/components/ErrorBoundary.d.ts +17 -0
- package/dist/src/components/ErrorBoundary.d.ts.map +1 -0
- package/dist/src/components/ErrorBoundary.js +23 -0
- package/dist/src/components/ErrorBoundary.js.map +1 -0
- package/dist/src/components/NotificationPanel.d.ts +9 -0
- package/dist/src/components/NotificationPanel.d.ts.map +1 -0
- package/dist/src/components/NotificationPanel.js +146 -0
- package/dist/src/components/NotificationPanel.js.map +1 -0
- package/dist/src/components/scope/ChildScopeDetailPage.d.ts +8 -0
- package/dist/src/components/scope/ChildScopeDetailPage.d.ts.map +1 -0
- package/dist/src/components/scope/ChildScopeDetailPage.js +79 -0
- package/dist/src/components/scope/ChildScopeDetailPage.js.map +1 -0
- package/dist/src/components/scope/ChildScopeListPage.d.ts +6 -0
- package/dist/src/components/scope/ChildScopeListPage.d.ts.map +1 -0
- package/dist/src/components/scope/ChildScopeListPage.js +111 -0
- package/dist/src/components/scope/ChildScopeListPage.js.map +1 -0
- package/dist/src/components/scope/CreateChildScopeButton.d.ts +14 -0
- package/dist/src/components/scope/CreateChildScopeButton.d.ts.map +1 -0
- package/dist/src/components/scope/CreateChildScopeButton.js +18 -0
- package/dist/src/components/scope/CreateChildScopeButton.js.map +1 -0
- package/dist/src/components/scope/CreateScopeDialog.d.ts +9 -0
- package/dist/src/components/scope/CreateScopeDialog.d.ts.map +1 -0
- package/dist/src/components/scope/CreateScopeDialog.js +137 -0
- package/dist/src/components/scope/CreateScopeDialog.js.map +1 -0
- package/dist/src/components/scope/JoinScopeDialog.d.ts +8 -0
- package/dist/src/components/scope/JoinScopeDialog.d.ts.map +1 -0
- package/dist/src/components/scope/JoinScopeDialog.js +115 -0
- package/dist/src/components/scope/JoinScopeDialog.js.map +1 -0
- package/dist/src/components/scope/ProfileScopeSection.d.ts +11 -0
- package/dist/src/components/scope/ProfileScopeSection.d.ts.map +1 -0
- package/dist/src/components/scope/ProfileScopeSection.js +63 -0
- package/dist/src/components/scope/ProfileScopeSection.js.map +1 -0
- package/dist/src/components/scope/ScopeSwitcher.d.ts +14 -0
- package/dist/src/components/scope/ScopeSwitcher.d.ts.map +1 -0
- package/dist/src/components/scope/ScopeSwitcher.js +131 -0
- package/dist/src/components/scope/ScopeSwitcher.js.map +1 -0
- package/dist/src/components/scope/SwitchScopeDialog.d.ts +8 -0
- package/dist/src/components/scope/SwitchScopeDialog.d.ts.map +1 -0
- package/dist/src/components/scope/SwitchScopeDialog.js +60 -0
- package/dist/src/components/scope/SwitchScopeDialog.js.map +1 -0
- package/dist/src/components/scope/useChildScopePermissions.d.ts +7 -0
- package/dist/src/components/scope/useChildScopePermissions.d.ts.map +1 -0
- package/dist/src/components/scope/useChildScopePermissions.js +34 -0
- package/dist/src/components/scope/useChildScopePermissions.js.map +1 -0
- package/dist/src/contexts/auth/AuthContext.d.ts +13 -0
- package/dist/src/contexts/auth/AuthContext.d.ts.map +1 -0
- package/dist/src/contexts/auth/AuthContext.js +23 -0
- package/dist/src/contexts/auth/AuthContext.js.map +1 -0
- package/dist/src/contexts/backend/BackendStatusContext.d.ts +21 -0
- package/dist/src/contexts/backend/BackendStatusContext.d.ts.map +1 -0
- package/dist/src/contexts/backend/BackendStatusContext.js +36 -0
- package/dist/src/contexts/backend/BackendStatusContext.js.map +1 -0
- package/dist/src/contexts/command/CommandContext.d.ts +30 -0
- package/dist/src/contexts/command/CommandContext.d.ts.map +1 -0
- package/dist/src/contexts/command/CommandContext.js +75 -0
- package/dist/src/contexts/command/CommandContext.js.map +1 -0
- package/dist/src/contexts/command/PanelSlotsContext.d.ts +2 -0
- package/dist/src/contexts/command/PanelSlotsContext.d.ts.map +1 -0
- package/dist/src/contexts/command/PanelSlotsContext.js +2 -0
- package/dist/src/contexts/command/PanelSlotsContext.js.map +1 -0
- package/dist/src/contexts/command/PanelStackContext.d.ts +2 -0
- package/dist/src/contexts/command/PanelStackContext.d.ts.map +1 -0
- package/dist/src/contexts/command/PanelStackContext.js +2 -0
- package/dist/src/contexts/command/PanelStackContext.js.map +1 -0
- package/dist/src/contexts/command/SearchPanelContext.d.ts +55 -0
- package/dist/src/contexts/command/SearchPanelContext.d.ts.map +1 -0
- package/dist/src/contexts/command/SearchPanelContext.js +327 -0
- package/dist/src/contexts/command/SearchPanelContext.js.map +1 -0
- package/dist/src/contexts/config/AppConfigContext.d.ts +8 -0
- package/dist/src/contexts/config/AppConfigContext.d.ts.map +1 -0
- package/dist/src/contexts/config/AppConfigContext.js +21 -0
- package/dist/src/contexts/config/AppConfigContext.js.map +1 -0
- package/dist/src/contexts/help/HelpContext.d.ts +30 -0
- package/dist/src/contexts/help/HelpContext.d.ts.map +1 -0
- package/dist/src/contexts/help/HelpContext.js +73 -0
- package/dist/src/contexts/help/HelpContext.js.map +1 -0
- package/dist/src/contexts/index.d.ts +10 -0
- package/dist/src/contexts/index.d.ts.map +1 -0
- package/dist/src/contexts/index.js +10 -0
- package/dist/src/contexts/index.js.map +1 -0
- package/dist/src/contexts/navigation/NavigationContext.d.ts +23 -0
- package/dist/src/contexts/navigation/NavigationContext.d.ts.map +1 -0
- package/dist/src/contexts/navigation/NavigationContext.js +294 -0
- package/dist/src/contexts/navigation/NavigationContext.js.map +1 -0
- package/dist/src/contexts/navigation/NavigationRegistryContext.d.ts +9 -0
- package/dist/src/contexts/navigation/NavigationRegistryContext.d.ts.map +1 -0
- package/dist/src/contexts/navigation/NavigationRegistryContext.js +17 -0
- package/dist/src/contexts/navigation/NavigationRegistryContext.js.map +1 -0
- package/dist/src/contexts/scope/ScopeContext.d.ts +40 -0
- package/dist/src/contexts/scope/ScopeContext.d.ts.map +1 -0
- package/dist/src/contexts/scope/ScopeContext.js +141 -0
- package/dist/src/contexts/scope/ScopeContext.js.map +1 -0
- package/dist/src/contexts/scope/index.d.ts +3 -0
- package/dist/src/contexts/scope/index.d.ts.map +1 -0
- package/dist/src/contexts/scope/index.js +3 -0
- package/dist/src/contexts/scope/index.js.map +1 -0
- package/dist/src/contexts/scope/scopeRef.d.ts +10 -0
- package/dist/src/contexts/scope/scopeRef.d.ts.map +1 -0
- package/dist/src/contexts/scope/scopeRef.js +10 -0
- package/dist/src/contexts/scope/scopeRef.js.map +1 -0
- package/dist/src/contexts/sidebar/use-sidebar.d.ts +2 -0
- package/dist/src/contexts/sidebar/use-sidebar.d.ts.map +1 -0
- package/dist/src/contexts/sidebar/use-sidebar.js +2 -0
- package/dist/src/contexts/sidebar/use-sidebar.js.map +1 -0
- package/dist/src/contexts/theme/ThemeContext.d.ts +21 -0
- package/dist/src/contexts/theme/ThemeContext.d.ts.map +1 -0
- package/dist/src/contexts/theme/ThemeContext.js +79 -0
- package/dist/src/contexts/theme/ThemeContext.js.map +1 -0
- package/dist/src/create-app.d.ts +47 -0
- package/dist/src/create-app.d.ts.map +1 -0
- package/dist/src/create-app.js +242 -0
- package/dist/src/create-app.js.map +1 -0
- package/dist/src/dashboard/command/CommandDialog.d.ts +2 -0
- package/dist/src/dashboard/command/CommandDialog.d.ts.map +1 -0
- package/dist/src/dashboard/command/CommandDialog.js +18 -0
- package/dist/src/dashboard/command/CommandDialog.js.map +1 -0
- package/dist/src/dashboard/command/SearchPanelBody.d.ts +2 -0
- package/dist/src/dashboard/command/SearchPanelBody.d.ts.map +1 -0
- package/dist/src/dashboard/command/SearchPanelBody.js +178 -0
- package/dist/src/dashboard/command/SearchPanelBody.js.map +1 -0
- package/dist/src/dashboard/command/SearchPanelHeader.d.ts +2 -0
- package/dist/src/dashboard/command/SearchPanelHeader.d.ts.map +1 -0
- package/dist/src/dashboard/command/SearchPanelHeader.js +13 -0
- package/dist/src/dashboard/command/SearchPanelHeader.js.map +1 -0
- package/dist/src/dashboard/command/panels/GeneralPanel.d.ts +9 -0
- package/dist/src/dashboard/command/panels/GeneralPanel.d.ts.map +1 -0
- package/dist/src/dashboard/command/panels/GeneralPanel.js +12 -0
- package/dist/src/dashboard/command/panels/GeneralPanel.js.map +1 -0
- package/dist/src/dashboard/command/panels/NavigationPanel.d.ts +2 -0
- package/dist/src/dashboard/command/panels/NavigationPanel.d.ts.map +1 -0
- package/dist/src/dashboard/command/panels/NavigationPanel.js +74 -0
- package/dist/src/dashboard/command/panels/NavigationPanel.js.map +1 -0
- package/dist/src/dashboard/command/panels/PlaceholderPanel.d.ts +9 -0
- package/dist/src/dashboard/command/panels/PlaceholderPanel.d.ts.map +1 -0
- package/dist/src/dashboard/command/panels/PlaceholderPanel.js +12 -0
- package/dist/src/dashboard/command/panels/PlaceholderPanel.js.map +1 -0
- package/dist/src/dashboard/command/panels/ProfilePanel.d.ts +2 -0
- package/dist/src/dashboard/command/panels/ProfilePanel.d.ts.map +1 -0
- package/dist/src/dashboard/command/panels/ProfilePanel.js +133 -0
- package/dist/src/dashboard/command/panels/ProfilePanel.js.map +1 -0
- package/dist/src/dashboard/command/panels/SecurityPanel.d.ts +2 -0
- package/dist/src/dashboard/command/panels/SecurityPanel.d.ts.map +1 -0
- package/dist/src/dashboard/command/panels/SecurityPanel.js +237 -0
- package/dist/src/dashboard/command/panels/SecurityPanel.js.map +1 -0
- package/dist/src/dashboard/command/panels/ThemePanel.d.ts +2 -0
- package/dist/src/dashboard/command/panels/ThemePanel.d.ts.map +1 -0
- package/dist/src/dashboard/command/panels/ThemePanel.js +11 -0
- package/dist/src/dashboard/command/panels/ThemePanel.js.map +1 -0
- package/dist/src/dashboard/headers/MainHeader.d.ts +16 -0
- package/dist/src/dashboard/headers/MainHeader.d.ts.map +1 -0
- package/dist/src/dashboard/headers/MainHeader.js +16 -0
- package/dist/src/dashboard/headers/MainHeader.js.map +1 -0
- package/dist/src/dashboard/headers/MainHeaderDesktop.d.ts +4 -0
- package/dist/src/dashboard/headers/MainHeaderDesktop.d.ts.map +1 -0
- package/dist/src/dashboard/headers/MainHeaderDesktop.js +120 -0
- package/dist/src/dashboard/headers/MainHeaderDesktop.js.map +1 -0
- package/dist/src/dashboard/headers/MainHeaderMobile.d.ts +4 -0
- package/dist/src/dashboard/headers/MainHeaderMobile.d.ts.map +1 -0
- package/dist/src/dashboard/headers/MainHeaderMobile.js +14 -0
- package/dist/src/dashboard/headers/MainHeaderMobile.js.map +1 -0
- package/dist/src/dashboard/headers/NotificationsPopover.d.ts +2 -0
- package/dist/src/dashboard/headers/NotificationsPopover.d.ts.map +1 -0
- package/dist/src/dashboard/headers/NotificationsPopover.js +14 -0
- package/dist/src/dashboard/headers/NotificationsPopover.js.map +1 -0
- package/dist/src/dashboard/headers/ProfilePopover.d.ts +2 -0
- package/dist/src/dashboard/headers/ProfilePopover.d.ts.map +1 -0
- package/dist/src/dashboard/headers/ProfilePopover.js +83 -0
- package/dist/src/dashboard/headers/ProfilePopover.js.map +1 -0
- package/dist/src/dashboard/headers/ToolHeader.d.ts +2 -0
- package/dist/src/dashboard/headers/ToolHeader.d.ts.map +1 -0
- package/dist/src/dashboard/headers/ToolHeader.js +16 -0
- package/dist/src/dashboard/headers/ToolHeader.js.map +1 -0
- package/dist/src/dashboard/help/HelpPanel.d.ts +3 -0
- package/dist/src/dashboard/help/HelpPanel.d.ts.map +1 -0
- package/dist/src/dashboard/help/HelpPanel.js +451 -0
- package/dist/src/dashboard/help/HelpPanel.js.map +1 -0
- package/dist/src/dashboard/index.d.ts +16 -0
- package/dist/src/dashboard/index.d.ts.map +1 -0
- package/dist/src/dashboard/index.js +16 -0
- package/dist/src/dashboard/index.js.map +1 -0
- package/dist/src/dashboard/layout/DashboardLayout.d.ts +23 -0
- package/dist/src/dashboard/layout/DashboardLayout.d.ts.map +1 -0
- package/dist/src/dashboard/layout/DashboardLayout.js +15 -0
- package/dist/src/dashboard/layout/DashboardLayout.js.map +1 -0
- package/dist/src/dashboard/layout/DashboardSidebarContent.d.ts +2 -0
- package/dist/src/dashboard/layout/DashboardSidebarContent.d.ts.map +1 -0
- package/dist/src/dashboard/layout/DashboardSidebarContent.js +33 -0
- package/dist/src/dashboard/layout/DashboardSidebarContent.js.map +1 -0
- package/dist/src/dashboard/layout/SidebarDrawer.d.ts +2 -0
- package/dist/src/dashboard/layout/SidebarDrawer.d.ts.map +1 -0
- package/dist/src/dashboard/layout/SidebarDrawer.js +33 -0
- package/dist/src/dashboard/layout/SidebarDrawer.js.map +1 -0
- package/dist/src/dashboard/layout/ToolSidebar.d.ts +9 -0
- package/dist/src/dashboard/layout/ToolSidebar.d.ts.map +1 -0
- package/dist/src/dashboard/layout/ToolSidebar.js +11 -0
- package/dist/src/dashboard/layout/ToolSidebar.js.map +1 -0
- package/dist/src/dashboard/navigation/IconRail.d.ts +11 -0
- package/dist/src/dashboard/navigation/IconRail.d.ts.map +1 -0
- package/dist/src/dashboard/navigation/IconRail.js +47 -0
- package/dist/src/dashboard/navigation/IconRail.js.map +1 -0
- package/dist/src/dashboard/navigation/MoreToolsPopover.d.ts +2 -0
- package/dist/src/dashboard/navigation/MoreToolsPopover.d.ts.map +1 -0
- package/dist/src/dashboard/navigation/MoreToolsPopover.js +22 -0
- package/dist/src/dashboard/navigation/MoreToolsPopover.js.map +1 -0
- package/dist/src/dashboard/navigation/icon-rail.d.ts +8 -0
- package/dist/src/dashboard/navigation/icon-rail.d.ts.map +1 -0
- package/dist/src/dashboard/navigation/icon-rail.js +36 -0
- package/dist/src/dashboard/navigation/icon-rail.js.map +1 -0
- package/dist/src/dashboard/navigation/use-active-tool.d.ts +2 -0
- package/dist/src/dashboard/navigation/use-active-tool.d.ts.map +1 -0
- package/dist/src/dashboard/navigation/use-active-tool.js +41 -0
- package/dist/src/dashboard/navigation/use-active-tool.js.map +1 -0
- package/dist/src/dashboard/settings/ThemeSettings.d.ts +2 -0
- package/dist/src/dashboard/settings/ThemeSettings.d.ts.map +1 -0
- package/dist/src/dashboard/settings/ThemeSettings.js +49 -0
- package/dist/src/dashboard/settings/ThemeSettings.js.map +1 -0
- package/dist/src/guards/SetupGate.d.ts +9 -0
- package/dist/src/guards/SetupGate.d.ts.map +1 -0
- package/dist/src/guards/SetupGate.js +30 -0
- package/dist/src/guards/SetupGate.js.map +1 -0
- package/dist/src/guards/UnifiedGuard.d.ts +32 -0
- package/dist/src/guards/UnifiedGuard.d.ts.map +1 -0
- package/dist/src/guards/UnifiedGuard.js +258 -0
- package/dist/src/guards/UnifiedGuard.js.map +1 -0
- package/dist/src/guards/index.d.ts +3 -0
- package/dist/src/guards/index.d.ts.map +1 -0
- package/dist/src/guards/index.js +3 -0
- package/dist/src/guards/index.js.map +1 -0
- package/dist/src/hooks/index.d.ts +9 -0
- package/dist/src/hooks/index.d.ts.map +1 -0
- package/dist/src/hooks/index.js +9 -0
- package/dist/src/hooks/index.js.map +1 -0
- package/dist/src/hooks/useCheckAccess.d.ts +16 -0
- package/dist/src/hooks/useCheckAccess.d.ts.map +1 -0
- package/dist/src/hooks/useCheckAccess.js +25 -0
- package/dist/src/hooks/useCheckAccess.js.map +1 -0
- package/dist/src/hooks/useCreateScope.d.ts +42 -0
- package/dist/src/hooks/useCreateScope.d.ts.map +1 -0
- package/dist/src/hooks/useCreateScope.js +28 -0
- package/dist/src/hooks/useCreateScope.js.map +1 -0
- package/dist/src/hooks/useInvitations.d.ts +82 -0
- package/dist/src/hooks/useInvitations.d.ts.map +1 -0
- package/dist/src/hooks/useInvitations.js +39 -0
- package/dist/src/hooks/useInvitations.js.map +1 -0
- package/dist/src/hooks/useJoinCode.d.ts +52 -0
- package/dist/src/hooks/useJoinCode.d.ts.map +1 -0
- package/dist/src/hooks/useJoinCode.js +37 -0
- package/dist/src/hooks/useJoinCode.js.map +1 -0
- package/dist/src/hooks/usePreference.d.ts +20 -0
- package/dist/src/hooks/usePreference.d.ts.map +1 -0
- package/dist/src/hooks/usePreference.js +132 -0
- package/dist/src/hooks/usePreference.js.map +1 -0
- package/dist/src/hooks/useScopeList.d.ts +32 -0
- package/dist/src/hooks/useScopeList.d.ts.map +1 -0
- package/dist/src/hooks/useScopeList.js +24 -0
- package/dist/src/hooks/useScopeList.js.map +1 -0
- package/dist/src/hooks/useScopeMenuPolicy.d.ts +23 -0
- package/dist/src/hooks/useScopeMenuPolicy.d.ts.map +1 -0
- package/dist/src/hooks/useScopeMenuPolicy.js +59 -0
- package/dist/src/hooks/useScopeMenuPolicy.js.map +1 -0
- package/dist/src/hooks/useScopePermissions.d.ts +9 -0
- package/dist/src/hooks/useScopePermissions.d.ts.map +1 -0
- package/dist/src/hooks/useScopePermissions.js +84 -0
- package/dist/src/hooks/useScopePermissions.js.map +1 -0
- package/dist/src/lib/api-client.d.ts +27 -0
- package/dist/src/lib/api-client.d.ts.map +1 -0
- package/dist/src/lib/api-client.js +45 -0
- package/dist/src/lib/api-client.js.map +1 -0
- package/dist/src/lib/backend-status.d.ts +14 -0
- package/dist/src/lib/backend-status.d.ts.map +1 -0
- package/dist/src/lib/backend-status.js +27 -0
- package/dist/src/lib/backend-status.js.map +1 -0
- package/dist/src/lib/config.d.ts +71 -0
- package/dist/src/lib/config.d.ts.map +1 -0
- package/dist/src/lib/config.js +7 -0
- package/dist/src/lib/config.js.map +1 -0
- package/dist/src/lib/icon-resolver.d.ts +2 -0
- package/dist/src/lib/icon-resolver.d.ts.map +1 -0
- package/dist/src/lib/icon-resolver.js +2 -0
- package/dist/src/lib/icon-resolver.js.map +1 -0
- package/dist/src/lib/index.d.ts +13 -0
- package/dist/src/lib/index.d.ts.map +1 -0
- package/dist/src/lib/index.js +13 -0
- package/dist/src/lib/index.js.map +1 -0
- package/dist/src/lib/navigation-tools.d.ts +27 -0
- package/dist/src/lib/navigation-tools.d.ts.map +1 -0
- package/dist/src/lib/navigation-tools.js +49 -0
- package/dist/src/lib/navigation-tools.js.map +1 -0
- package/dist/src/lib/onboarding-registry.d.ts +14 -0
- package/dist/src/lib/onboarding-registry.d.ts.map +1 -0
- package/dist/src/lib/onboarding-registry.js +12 -0
- package/dist/src/lib/onboarding-registry.js.map +1 -0
- package/dist/src/lib/permissions-store.d.ts +12 -0
- package/dist/src/lib/permissions-store.d.ts.map +1 -0
- package/dist/src/lib/permissions-store.js +12 -0
- package/dist/src/lib/permissions-store.js.map +1 -0
- package/dist/src/lib/platform-api.d.ts +3527 -0
- package/dist/src/lib/platform-api.d.ts.map +1 -0
- package/dist/src/lib/platform-api.js +26 -0
- package/dist/src/lib/platform-api.js.map +1 -0
- package/dist/src/lib/resolve-redirect.d.ts +36 -0
- package/dist/src/lib/resolve-redirect.d.ts.map +1 -0
- package/dist/src/lib/resolve-redirect.js +91 -0
- package/dist/src/lib/resolve-redirect.js.map +1 -0
- package/dist/src/lib/scope-menu-policy.d.ts +13 -0
- package/dist/src/lib/scope-menu-policy.d.ts.map +1 -0
- package/dist/src/lib/scope-menu-policy.js +15 -0
- package/dist/src/lib/scope-menu-policy.js.map +1 -0
- package/dist/src/lib/scope-query-keys.d.ts +38 -0
- package/dist/src/lib/scope-query-keys.d.ts.map +1 -0
- package/dist/src/lib/scope-query-keys.js +35 -0
- package/dist/src/lib/scope-query-keys.js.map +1 -0
- package/dist/src/lib/scopeLink.d.ts +24 -0
- package/dist/src/lib/scopeLink.d.ts.map +1 -0
- package/dist/src/lib/scopeLink.js +57 -0
- package/dist/src/lib/scopeLink.js.map +1 -0
- package/dist/src/lib/tool-api-types.d.ts +40 -0
- package/dist/src/lib/tool-api-types.d.ts.map +1 -0
- package/dist/src/lib/tool-api-types.js +23 -0
- package/dist/src/lib/tool-api-types.js.map +1 -0
- package/dist/src/lib/types.d.ts +122 -0
- package/dist/src/lib/types.d.ts.map +1 -0
- package/dist/src/lib/types.js +47 -0
- package/dist/src/lib/types.js.map +1 -0
- package/dist/src/lib/withDashboardChrome.d.ts +18 -0
- package/dist/src/lib/withDashboardChrome.d.ts.map +1 -0
- package/dist/src/lib/withDashboardChrome.js +46 -0
- package/dist/src/lib/withDashboardChrome.js.map +1 -0
- package/dist/src/onboarding/CreateScopeWizardStep.d.ts +14 -0
- package/dist/src/onboarding/CreateScopeWizardStep.d.ts.map +1 -0
- package/dist/src/onboarding/CreateScopeWizardStep.js +109 -0
- package/dist/src/onboarding/CreateScopeWizardStep.js.map +1 -0
- package/dist/src/onboarding/ResolveStep.d.ts +17 -0
- package/dist/src/onboarding/ResolveStep.d.ts.map +1 -0
- package/dist/src/onboarding/ResolveStep.js +101 -0
- package/dist/src/onboarding/ResolveStep.js.map +1 -0
- package/dist/src/onboarding/StepProps.d.ts +10 -0
- package/dist/src/onboarding/StepProps.d.ts.map +1 -0
- package/dist/src/onboarding/StepProps.js +2 -0
- package/dist/src/onboarding/StepProps.js.map +1 -0
- package/dist/src/onboarding/WizardContext.d.ts +20 -0
- package/dist/src/onboarding/WizardContext.d.ts.map +1 -0
- package/dist/src/onboarding/WizardContext.js +17 -0
- package/dist/src/onboarding/WizardContext.js.map +1 -0
- package/dist/src/onboarding/WizardPage.d.ts +18 -0
- package/dist/src/onboarding/WizardPage.d.ts.map +1 -0
- package/dist/src/onboarding/WizardPage.js +9 -0
- package/dist/src/onboarding/WizardPage.js.map +1 -0
- package/dist/src/onboarding/WizardShell.d.ts +43 -0
- package/dist/src/onboarding/WizardShell.d.ts.map +1 -0
- package/dist/src/onboarding/WizardShell.js +162 -0
- package/dist/src/onboarding/WizardShell.js.map +1 -0
- package/dist/src/onboarding/index.d.ts +11 -0
- package/dist/src/onboarding/index.d.ts.map +1 -0
- package/dist/src/onboarding/index.js +8 -0
- package/dist/src/onboarding/index.js.map +1 -0
- package/dist/src/onboarding/sortSteps.d.ts +15 -0
- package/dist/src/onboarding/sortSteps.d.ts.map +1 -0
- package/dist/src/onboarding/sortSteps.js +93 -0
- package/dist/src/onboarding/sortSteps.js.map +1 -0
- package/dist/src/onboarding/steps/AddPasskeyStep.d.ts +3 -0
- package/dist/src/onboarding/steps/AddPasskeyStep.d.ts.map +1 -0
- package/dist/src/onboarding/steps/AddPasskeyStep.js +54 -0
- package/dist/src/onboarding/steps/AddPasskeyStep.js.map +1 -0
- package/dist/src/onboarding/steps/SetupWizardPage.d.ts +2 -0
- package/dist/src/onboarding/steps/SetupWizardPage.d.ts.map +1 -0
- package/dist/src/onboarding/steps/SetupWizardPage.js +93 -0
- package/dist/src/onboarding/steps/SetupWizardPage.js.map +1 -0
- package/dist/src/onboarding/steps/setup-steps.d.ts +6 -0
- package/dist/src/onboarding/steps/setup-steps.d.ts.map +1 -0
- package/dist/src/onboarding/steps/setup-steps.js +75 -0
- package/dist/src/onboarding/steps/setup-steps.js.map +1 -0
- package/dist/src/pages/AcceptInvitePage.d.ts +2 -0
- package/dist/src/pages/AcceptInvitePage.d.ts.map +1 -0
- package/dist/src/pages/AcceptInvitePage.js +103 -0
- package/dist/src/pages/AcceptInvitePage.js.map +1 -0
- package/dist/src/pages/BackendErrorPage.d.ts +6 -0
- package/dist/src/pages/BackendErrorPage.d.ts.map +1 -0
- package/dist/src/pages/BackendErrorPage.js +6 -0
- package/dist/src/pages/BackendErrorPage.js.map +1 -0
- package/dist/src/pages/ContextSelectionPage.d.ts +2 -0
- package/dist/src/pages/ContextSelectionPage.d.ts.map +1 -0
- package/dist/src/pages/ContextSelectionPage.js +166 -0
- package/dist/src/pages/ContextSelectionPage.js.map +1 -0
- package/dist/src/pages/DefaultCreateScopePage.d.ts +17 -0
- package/dist/src/pages/DefaultCreateScopePage.d.ts.map +1 -0
- package/dist/src/pages/DefaultCreateScopePage.js +50 -0
- package/dist/src/pages/DefaultCreateScopePage.js.map +1 -0
- package/dist/src/pages/ForgotPasswordPage.d.ts +2 -0
- package/dist/src/pages/ForgotPasswordPage.d.ts.map +1 -0
- package/dist/src/pages/ForgotPasswordPage.js +44 -0
- package/dist/src/pages/ForgotPasswordPage.js.map +1 -0
- package/dist/src/pages/GetStartedPage.d.ts +6 -0
- package/dist/src/pages/GetStartedPage.d.ts.map +1 -0
- package/dist/src/pages/GetStartedPage.js +49 -0
- package/dist/src/pages/GetStartedPage.js.map +1 -0
- package/dist/src/pages/InviteErrorPage.d.ts +2 -0
- package/dist/src/pages/InviteErrorPage.d.ts.map +1 -0
- package/dist/src/pages/InviteErrorPage.js +42 -0
- package/dist/src/pages/InviteErrorPage.js.map +1 -0
- package/dist/src/pages/LoginPage.d.ts +2 -0
- package/dist/src/pages/LoginPage.d.ts.map +1 -0
- package/dist/src/pages/LoginPage.js +63 -0
- package/dist/src/pages/LoginPage.js.map +1 -0
- package/dist/src/pages/NoAccessPage.d.ts +2 -0
- package/dist/src/pages/NoAccessPage.d.ts.map +1 -0
- package/dist/src/pages/NoAccessPage.js +35 -0
- package/dist/src/pages/NoAccessPage.js.map +1 -0
- package/dist/src/pages/NotFoundPage.d.ts +2 -0
- package/dist/src/pages/NotFoundPage.d.ts.map +1 -0
- package/dist/src/pages/NotFoundPage.js +8 -0
- package/dist/src/pages/NotFoundPage.js.map +1 -0
- package/dist/src/pages/PostLoginResolver.d.ts +9 -0
- package/dist/src/pages/PostLoginResolver.d.ts.map +1 -0
- package/dist/src/pages/PostLoginResolver.js +50 -0
- package/dist/src/pages/PostLoginResolver.js.map +1 -0
- package/dist/src/pages/ProfilePage.d.ts +2 -0
- package/dist/src/pages/ProfilePage.d.ts.map +1 -0
- package/dist/src/pages/ProfilePage.js +353 -0
- package/dist/src/pages/ProfilePage.js.map +1 -0
- package/dist/src/pages/ResetPasswordPage.d.ts +2 -0
- package/dist/src/pages/ResetPasswordPage.d.ts.map +1 -0
- package/dist/src/pages/ResetPasswordPage.js +55 -0
- package/dist/src/pages/ResetPasswordPage.js.map +1 -0
- package/dist/src/pages/SignupPage.d.ts +2 -0
- package/dist/src/pages/SignupPage.d.ts.map +1 -0
- package/dist/src/pages/SignupPage.js +54 -0
- package/dist/src/pages/SignupPage.js.map +1 -0
- package/dist/src/pages/index.d.ts +15 -0
- package/dist/src/pages/index.d.ts.map +1 -0
- package/dist/src/pages/index.js +15 -0
- package/dist/src/pages/index.js.map +1 -0
- package/dist/src/platform-surface.d.ts +26 -0
- package/dist/src/platform-surface.d.ts.map +1 -0
- package/dist/src/platform-surface.js +302 -0
- package/dist/src/platform-surface.js.map +1 -0
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +2 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +119 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-api.d.ts","sourceRoot":"","sources":["../../../src/lib/platform-api.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAmD,CAAA;AAC7E,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAqD,CAAA;AAIhF,eAAO,MAAM,SAAS;;;;;;;;;;;;kBAxBL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA6BuQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAA+lD,CAAC;;;;;;;;;;;;;;;;;;;;;;EALzzD,CAAA;AAIjE,eAAO,MAAM,SAAS;;EAAwC,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed oRPC clients for platform infrastructure routers.
|
|
3
|
+
*
|
|
4
|
+
* Uses @ydtb/api-client for the client factory and imports router types
|
|
5
|
+
* from client-safe /types paths.
|
|
6
|
+
*/
|
|
7
|
+
import { createToolClient } from "@ydtb/tk-scope-api-client";
|
|
8
|
+
// Scope extension routers
|
|
9
|
+
export const scopeApi = createToolClient("scope");
|
|
10
|
+
export const membersApi = createToolClient("members");
|
|
11
|
+
export const rolesApi = createToolClient("roles");
|
|
12
|
+
export const invitationsApi = createToolClient("invitations");
|
|
13
|
+
export const joinCodesApi = createToolClient("join-codes");
|
|
14
|
+
// Platform routers
|
|
15
|
+
export const userApi = createToolClient("user");
|
|
16
|
+
export const platformApi = createToolClient("platform");
|
|
17
|
+
export const permissionsApi = createToolClient("permissions");
|
|
18
|
+
export const scopeChildrenApi = createToolClient("scopeChildren");
|
|
19
|
+
// Onboarding extension
|
|
20
|
+
export const onboardingApi = createToolClient("onboarding");
|
|
21
|
+
export const preferencesApi = createToolClient("preferences");
|
|
22
|
+
export const searchApi = createToolClient("search");
|
|
23
|
+
// Tokens extension — no concrete oRPC router yet, so expose the widest router
|
|
24
|
+
// surface the client factory accepts until the tokens router exists.
|
|
25
|
+
export const tokensApi = createToolClient("tokens");
|
|
26
|
+
//# sourceMappingURL=platform-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-api.js","sourceRoot":"","sources":["../../../src/lib/platform-api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAkB5D,0BAA0B;AAC1B,MAAM,CAAC,MAAM,QAAQ,GAAG,gBAAgB,CAAc,OAAO,CAAC,CAAA;AAC9D,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAgB,SAAS,CAAC,CAAA;AACpE,MAAM,CAAC,MAAM,QAAQ,GAAG,gBAAgB,CAAc,OAAO,CAAC,CAAA;AAC9D,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAoB,aAAa,CAAC,CAAA;AAChF,MAAM,CAAC,MAAM,YAAY,GAAG,gBAAgB,CAAkB,YAAY,CAAC,CAAA;AAE3E,mBAAmB;AACnB,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAgB,CAAa,MAAM,CAAC,CAAA;AAC3D,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAiB,UAAU,CAAC,CAAA;AACvE,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAoB,aAAa,CAAC,CAAA;AAChF,MAAM,CAAC,MAAM,gBAAgB,GAAG,gBAAgB,CAAsB,eAAe,CAAC,CAAA;AAEtF,uBAAuB;AACvB,MAAM,CAAC,MAAM,aAAa,GAAG,gBAAgB,CAAmB,YAAY,CAAC,CAAA;AAC7E,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAoB,aAAa,CAAC,CAAA;AAIhF,MAAM,CAAC,MAAM,SAAS,GAAG,gBAAgB,CAAe,QAAQ,CAAC,CAAA;AAEjE,8EAA8E;AAC9E,qEAAqE;AACrE,MAAM,CAAC,MAAM,SAAS,GAAG,gBAAgB,CAAY,QAAQ,CAAC,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type ScopeTypeInfo } from "@ydtb/tk-scope/client";
|
|
2
|
+
export interface LastVisitedScope {
|
|
3
|
+
scopeId: string;
|
|
4
|
+
scopeType: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function getLastVisitedScope(): LastVisitedScope | null;
|
|
7
|
+
export declare function saveLastVisitedScope(scopeId: string, scopeType: string): void;
|
|
8
|
+
export interface Membership {
|
|
9
|
+
type: string;
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ResolveRedirectOptions {
|
|
14
|
+
/** Deep link URL from ?redirect= query param */
|
|
15
|
+
deepLink?: string;
|
|
16
|
+
/** Last visited scope from localStorage or server-side lastActiveContext */
|
|
17
|
+
lastVisited?: {
|
|
18
|
+
scopeId: string;
|
|
19
|
+
scopeType: string;
|
|
20
|
+
};
|
|
21
|
+
/** Current path (unused for now, reserved for future logic) */
|
|
22
|
+
currentPath?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Pure redirect resolver that replaces PostLoginRedirect, ScopedRedirect,
|
|
26
|
+
* and /select-context decision logic.
|
|
27
|
+
*
|
|
28
|
+
* Decision tree:
|
|
29
|
+
* 1. Deep link (?redirect=) → validate access → go there or fall through
|
|
30
|
+
* 2. No memberships → /get-started
|
|
31
|
+
* 3. Single membership → scope dashboard via scopeLink()
|
|
32
|
+
* 4. Multiple same-type memberships → scope picker for that type
|
|
33
|
+
* 5. Multiple different types → lastVisited (if valid) → /select-context
|
|
34
|
+
*/
|
|
35
|
+
export declare function resolveRedirect(memberships: Membership[], scopeConfigs: readonly ScopeTypeInfo[], options?: ResolveRedirectOptions): string;
|
|
36
|
+
//# sourceMappingURL=resolve-redirect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-redirect.d.ts","sourceRoot":"","sources":["../../../src/lib/resolve-redirect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAkC,MAAM,uBAAuB,CAAA;AAQ1F,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,wBAAgB,mBAAmB,IAAI,gBAAgB,GAAG,IAAI,CAU7D;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAM7E;AAMD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,sBAAsB;IACrC,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,4EAA4E;IAC5E,WAAW,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAA;IACpD,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,UAAU,EAAE,EACzB,YAAY,EAAE,SAAS,aAAa,EAAE,EACtC,OAAO,CAAC,EAAE,sBAAsB,GAC/B,MAAM,CA2DR"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { scopeLink, detectScopeFromPath } from "@ydtb/tk-scope/client";
|
|
2
|
+
// ---------------------------------------------------------------------------
|
|
3
|
+
// localStorage helpers (internalized from lastVisitedScope.ts)
|
|
4
|
+
// ---------------------------------------------------------------------------
|
|
5
|
+
const STORAGE_KEY = "ydtb:lastVisitedScope";
|
|
6
|
+
export function getLastVisitedScope() {
|
|
7
|
+
try {
|
|
8
|
+
const raw = localStorage.getItem(STORAGE_KEY);
|
|
9
|
+
if (!raw)
|
|
10
|
+
return null;
|
|
11
|
+
const parsed = JSON.parse(raw);
|
|
12
|
+
if (parsed?.scopeId && parsed?.scopeType)
|
|
13
|
+
return parsed;
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export function saveLastVisitedScope(scopeId, scopeType) {
|
|
21
|
+
try {
|
|
22
|
+
localStorage.setItem(STORAGE_KEY, JSON.stringify({ scopeId, scopeType }));
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
// localStorage unavailable — silently ignore
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
// ---------------------------------------------------------------------------
|
|
29
|
+
// resolveRedirect()
|
|
30
|
+
// ---------------------------------------------------------------------------
|
|
31
|
+
/**
|
|
32
|
+
* Pure redirect resolver that replaces PostLoginRedirect, ScopedRedirect,
|
|
33
|
+
* and /select-context decision logic.
|
|
34
|
+
*
|
|
35
|
+
* Decision tree:
|
|
36
|
+
* 1. Deep link (?redirect=) → validate access → go there or fall through
|
|
37
|
+
* 2. No memberships → /get-started
|
|
38
|
+
* 3. Single membership → scope dashboard via scopeLink()
|
|
39
|
+
* 4. Multiple same-type memberships → scope picker for that type
|
|
40
|
+
* 5. Multiple different types → lastVisited (if valid) → /select-context
|
|
41
|
+
*/
|
|
42
|
+
export function resolveRedirect(memberships, scopeConfigs, options) {
|
|
43
|
+
const { deepLink, lastVisited } = options ?? {};
|
|
44
|
+
// Build a map of known scope type IDs → config for validation and defaultRoute lookup
|
|
45
|
+
const knownScopes = new Set(scopeConfigs.map((c) => c.type));
|
|
46
|
+
const configByType = new Map(scopeConfigs.map((c) => [c.type, c]));
|
|
47
|
+
// 1. Deep link → validate the user has access to that scope
|
|
48
|
+
if (deepLink) {
|
|
49
|
+
const detected = detectScopeFromPath(deepLink);
|
|
50
|
+
if (detected && knownScopes.has(detected.scope)) {
|
|
51
|
+
const hasAccess = memberships.some((m) => m.type === detected.scope && (!detected.scopeId || m.id === detected.scopeId));
|
|
52
|
+
if (hasAccess)
|
|
53
|
+
return deepLink;
|
|
54
|
+
}
|
|
55
|
+
// Deep link invalid or no access — fall through
|
|
56
|
+
}
|
|
57
|
+
// 2. No memberships → get-started page
|
|
58
|
+
if (memberships.length === 0) {
|
|
59
|
+
return "/get-started";
|
|
60
|
+
}
|
|
61
|
+
// 3. Single membership → go to the scope's configured default route
|
|
62
|
+
if (memberships.length === 1) {
|
|
63
|
+
const m = memberships[0];
|
|
64
|
+
if (m) {
|
|
65
|
+
const defaultRoute = configByType.get(m.type)?.defaultRoute ?? "/";
|
|
66
|
+
return scopeLink(defaultRoute, { scope: m.type, scopeId: m.id });
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
// 4+5. Multiple memberships
|
|
70
|
+
const types = new Set(memberships.map((m) => m.type));
|
|
71
|
+
if (types.size === 1) {
|
|
72
|
+
// 4. All same type → scope picker filtered to that type
|
|
73
|
+
const first = memberships[0];
|
|
74
|
+
if (first) {
|
|
75
|
+
return `/select-context?type=${first.type}`;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// 5. Multiple different types → try lastVisited, then fall back
|
|
79
|
+
if (lastVisited) {
|
|
80
|
+
const exists = memberships.some((m) => m.id === lastVisited.scopeId && m.type === lastVisited.scopeType);
|
|
81
|
+
if (exists) {
|
|
82
|
+
const defaultRoute = configByType.get(lastVisited.scopeType)?.defaultRoute ?? "/";
|
|
83
|
+
return scopeLink(defaultRoute, {
|
|
84
|
+
scope: lastVisited.scopeType,
|
|
85
|
+
scopeId: lastVisited.scopeId,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return "/select-context";
|
|
90
|
+
}
|
|
91
|
+
//# sourceMapping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,4BAA4B;IAC5B,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;IAErD,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;QACrB,wDAAwD;QACxD,MAAM,KAAK,GAAG,WAAW,CAAC,CAAC,CAAC,CAAA;QAC5B,IAAI,KAAK,EAAE,CAAC;YACV,OAAO,wBAAwB,KAAK,CAAC,IAAI,EAAE,CAAA;QAC7C,CAAC;IACH,CAAC;IAED,gEAAgE;IAChE,IAAI,WAAW,EAAE,CAAC;QAChB,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI,CAC7B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,WAAW,CAAC,OAAO,IAAI,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,SAAS,CACxE,CAAA;QACD,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,YAAY,GAAG,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,YAAY,IAAI,GAAG,CAAA;YACjF,OAAO,SAAS,CAAC,YAAY,EAAE;gBAC7B,KAAK,EAAE,WAAW,CAAC,SAAS;gBAC5B,OAAO,EAAE,WAAW,CAAC,OAAO;aAC7B,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;IAED,OAAO,iBAAiB,CAAA;AAC1B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ScopeMenuMode } from "@ydtb/tk-scope/client";
|
|
2
|
+
export interface ScopeMenuVisibilityInput {
|
|
3
|
+
mode: ScopeMenuMode;
|
|
4
|
+
canSwitchScopes: boolean;
|
|
5
|
+
hasSwitchTarget: boolean;
|
|
6
|
+
canViewChildScopes: boolean;
|
|
7
|
+
hasChildScopes: boolean;
|
|
8
|
+
canCreateChildScopes: boolean;
|
|
9
|
+
hasCreateChildAction: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function getScopeMenuVisibility({ mode, canSwitchScopes, hasSwitchTarget, canViewChildScopes, hasChildScopes, canCreateChildScopes, hasCreateChildAction, }: ScopeMenuVisibilityInput): boolean;
|
|
12
|
+
export declare function canCreateChildScopeAction(selfCreate: string | boolean | undefined, hasChildScopeType: boolean): boolean;
|
|
13
|
+
//# sourceMappingURL=scope-menu-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-menu-policy.d.ts","sourceRoot":"","sources":["../../../src/lib/scope-menu-policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAE1D,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,aAAa,CAAA;IACnB,eAAe,EAAE,OAAO,CAAA;IACxB,eAAe,EAAE,OAAO,CAAA;IACxB,kBAAkB,EAAE,OAAO,CAAA;IAC3B,cAAc,EAAE,OAAO,CAAA;IACvB,oBAAoB,EAAE,OAAO,CAAA;IAC7B,oBAAoB,EAAE,OAAO,CAAA;CAC9B;AAED,wBAAgB,sBAAsB,CAAC,EACrC,IAAI,EACJ,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,oBAAoB,GACrB,EAAE,wBAAwB,GAAG,OAAO,CASpC;AAED,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,EACxC,iBAAiB,EAAE,OAAO,GACzB,OAAO,CAGT"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function getScopeMenuVisibility({ mode, canSwitchScopes, hasSwitchTarget, canViewChildScopes, hasChildScopes, canCreateChildScopes, hasCreateChildAction, }) {
|
|
2
|
+
if (mode === "hidden")
|
|
3
|
+
return false;
|
|
4
|
+
if (mode === "always")
|
|
5
|
+
return true;
|
|
6
|
+
return ((canSwitchScopes && hasSwitchTarget) ||
|
|
7
|
+
(canViewChildScopes && hasChildScopes) ||
|
|
8
|
+
(canCreateChildScopes && hasCreateChildAction));
|
|
9
|
+
}
|
|
10
|
+
export function canCreateChildScopeAction(selfCreate, hasChildScopeType) {
|
|
11
|
+
if (!hasChildScopeType)
|
|
12
|
+
return false;
|
|
13
|
+
return selfCreate !== false && selfCreate !== "initial";
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=scope-menu-policy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-menu-policy.js","sourceRoot":"","sources":["../../../src/lib/scope-menu-policy.ts"],"names":[],"mappings":"AAYA,MAAM,UAAU,sBAAsB,CAAC,EACrC,IAAI,EACJ,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,oBAAoB,GACK;IACzB,IAAI,IAAI,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IACnC,IAAI,IAAI,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAA;IAElC,OAAO,CACL,CAAC,eAAe,IAAI,eAAe,CAAC;QACpC,CAAC,kBAAkB,IAAI,cAAc,CAAC;QACtC,CAAC,oBAAoB,IAAI,oBAAoB,CAAC,CAC/C,CAAA;AACH,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,UAAwC,EACxC,iBAA0B;IAE1B,IAAI,CAAC,iBAAiB;QAAE,OAAO,KAAK,CAAA;IACpC,OAAO,UAAU,KAAK,KAAK,IAAI,UAAU,KAAK,SAAS,CAAA;AACzD,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized query key factory for auth/scope operations.
|
|
3
|
+
*
|
|
4
|
+
* These queries use the better-auth SDK client (not oRPC), so there are
|
|
5
|
+
* no auto-generated query keys. This factory prevents key duplication
|
|
6
|
+
* and makes cache invalidation reliable.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* import { scopeQueryKeys } from '@ydtb/app'
|
|
10
|
+
* queryKey: scopeQueryKeys.entity(scopeId)
|
|
11
|
+
* queryClient.invalidateQueries({ queryKey: scopeQueryKeys.list(scopeType) })
|
|
12
|
+
*/
|
|
13
|
+
export declare const scopeQueryKeys: {
|
|
14
|
+
/** Fetch a single scope entity by ID */
|
|
15
|
+
readonly entity: (scopeId: string | null) => readonly ["scope-entity", string | null];
|
|
16
|
+
/** Check access (membership) for a scope */
|
|
17
|
+
readonly checkAccess: (scopeId: string) => readonly ["scope", "checkAccess", string];
|
|
18
|
+
/** List all scopes the user belongs to (no type filter) */
|
|
19
|
+
readonly all: () => readonly ["scopes"];
|
|
20
|
+
/** List scopes by type */
|
|
21
|
+
readonly list: (scopeType: string) => readonly ["scope-list", string];
|
|
22
|
+
/** Scope switcher list (by type) */
|
|
23
|
+
readonly switcher: (scopeType: string) => readonly ["scope-switcher", string];
|
|
24
|
+
/** Invitations base key — use for broad invalidation */
|
|
25
|
+
readonly invitationsBase: () => readonly ["scope", "invitations"];
|
|
26
|
+
/** Invitations for a specific scope */
|
|
27
|
+
readonly invitations: (scopeId: string, status?: string) => readonly ["scope", "invitations", string, string];
|
|
28
|
+
/** Invitations by scope type (profile section) */
|
|
29
|
+
readonly invitationsByType: (scopeType: string) => readonly ["scope-invitations", string];
|
|
30
|
+
/** Portal scopes list */
|
|
31
|
+
readonly portalScopes: () => readonly ["portal-scopes"];
|
|
32
|
+
/** API keys list for a scope */
|
|
33
|
+
readonly apiKeys: (scope: string, scopeId: string) => readonly ["apiKeys", "list", {
|
|
34
|
+
readonly scope: string;
|
|
35
|
+
readonly scopeId: string;
|
|
36
|
+
}];
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=scope-query-keys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-query-keys.d.ts","sourceRoot":"","sources":["../../../src/lib/scope-query-keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,cAAc;IACzB,wCAAwC;+BACtB,MAAM,GAAG,IAAI;IAE/B,4CAA4C;oCACrB,MAAM;IAE7B,2DAA2D;;IAG3D,0BAA0B;+BACR,MAAM;IAExB,oCAAoC;mCACd,MAAM;IAE5B,wDAAwD;;IAGxD,uCAAuC;oCAChB,MAAM,WAAW,MAAM;IAG9C,kDAAkD;4CACnB,MAAM;IAErC,yBAAyB;;IAGzB,gCAAgC;8BACf,MAAM,WAAW,MAAM;;;;CAChC,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized query key factory for auth/scope operations.
|
|
3
|
+
*
|
|
4
|
+
* These queries use the better-auth SDK client (not oRPC), so there are
|
|
5
|
+
* no auto-generated query keys. This factory prevents key duplication
|
|
6
|
+
* and makes cache invalidation reliable.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* import { scopeQueryKeys } from '@ydtb/app'
|
|
10
|
+
* queryKey: scopeQueryKeys.entity(scopeId)
|
|
11
|
+
* queryClient.invalidateQueries({ queryKey: scopeQueryKeys.list(scopeType) })
|
|
12
|
+
*/
|
|
13
|
+
export const scopeQueryKeys = {
|
|
14
|
+
/** Fetch a single scope entity by ID */
|
|
15
|
+
entity: (scopeId) => ["scope-entity", scopeId],
|
|
16
|
+
/** Check access (membership) for a scope */
|
|
17
|
+
checkAccess: (scopeId) => ["scope", "checkAccess", scopeId],
|
|
18
|
+
/** List all scopes the user belongs to (no type filter) */
|
|
19
|
+
all: () => ["scopes"],
|
|
20
|
+
/** List scopes by type */
|
|
21
|
+
list: (scopeType) => ["scope-list", scopeType],
|
|
22
|
+
/** Scope switcher list (by type) */
|
|
23
|
+
switcher: (scopeType) => ["scope-switcher", scopeType],
|
|
24
|
+
/** Invitations base key — use for broad invalidation */
|
|
25
|
+
invitationsBase: () => ["scope", "invitations"],
|
|
26
|
+
/** Invitations for a specific scope */
|
|
27
|
+
invitations: (scopeId, status) => ["scope", "invitations", scopeId, status ?? "all"],
|
|
28
|
+
/** Invitations by scope type (profile section) */
|
|
29
|
+
invitationsByType: (scopeType) => ["scope-invitations", scopeType],
|
|
30
|
+
/** Portal scopes list */
|
|
31
|
+
portalScopes: () => ["portal-scopes"],
|
|
32
|
+
/** API keys list for a scope */
|
|
33
|
+
apiKeys: (scope, scopeId) => ["apiKeys", "list", { scope, scopeId }],
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=scope-query-keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-query-keys.js","sourceRoot":"","sources":["../../../src/lib/scope-query-keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,wCAAwC;IACxC,MAAM,EAAE,CAAC,OAAsB,EAAE,EAAE,CAAC,CAAC,cAAc,EAAE,OAAO,CAAU;IAEtE,4CAA4C;IAC5C,WAAW,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,CAAU;IAE5E,2DAA2D;IAC3D,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAU;IAE9B,0BAA0B;IAC1B,IAAI,EAAE,CAAC,SAAiB,EAAE,EAAE,CAAC,CAAC,YAAY,EAAE,SAAS,CAAU;IAE/D,oCAAoC;IACpC,QAAQ,EAAE,CAAC,SAAiB,EAAE,EAAE,CAAC,CAAC,gBAAgB,EAAE,SAAS,CAAU;IAEvE,wDAAwD;IACxD,eAAe,EAAE,GAAG,EAAE,CAAC,CAAC,OAAO,EAAE,aAAa,CAAU;IAExD,uCAAuC;IACvC,WAAW,EAAE,CAAC,OAAe,EAAE,MAAe,EAAE,EAAE,CAChD,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,IAAI,KAAK,CAAU;IAE7D,kDAAkD;IAClD,iBAAiB,EAAE,CAAC,SAAiB,EAAE,EAAE,CAAC,CAAC,mBAAmB,EAAE,SAAS,CAAU;IAEnF,yBAAyB;IACzB,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,eAAe,CAAU;IAE9C,gCAAgC;IAChC,OAAO,EAAE,CAAC,KAAa,EAAE,OAAe,EAAE,EAAE,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAU;CACrF,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { scopeLink, detectScopeFromPath, getUrlPrefixes } from "@ydtb/tk-scope/client";
|
|
2
|
+
export { scopeLink, detectScopeFromPath, getUrlPrefixes };
|
|
3
|
+
export interface ScopeLinkOptions {
|
|
4
|
+
/** Which scope to target. Defaults to auto-detection. */
|
|
5
|
+
scope?: string;
|
|
6
|
+
/** Explicit scope ID to use. Defaults to current context. */
|
|
7
|
+
scopeId?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* React hook that returns a scoped link builder bound to the current scope context.
|
|
11
|
+
*
|
|
12
|
+
* Usage:
|
|
13
|
+
* const sl = useScopeLink()
|
|
14
|
+
* <Link to={sl('/offers')}>Offers</Link>
|
|
15
|
+
* navigate({ to: sl('/team/members') })
|
|
16
|
+
*
|
|
17
|
+
* The returned function automatically detects the current scope from the URL
|
|
18
|
+
* ($scopeId param) and ScopeContext.
|
|
19
|
+
*
|
|
20
|
+
* You can override the scope/scopeId for cross-scope navigation:
|
|
21
|
+
* sl('/dashboard', { scope: 'parent', scopeId: parentScopeId })
|
|
22
|
+
*/
|
|
23
|
+
export declare function useScopeLink(): (path: string, opts?: ScopeLinkOptions) => string;
|
|
24
|
+
//# sourceMappingURL=scopeLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scopeLink.d.ts","sourceRoot":"","sources":["../../../src/lib/scopeLink.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAItF,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,cAAc,EAAE,CAAA;AAEzD,MAAM,WAAW,gBAAgB;IAC/B,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,6DAA6D;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,gBAAgB,KAAK,MAAM,CA2ChF"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { useParams } from "@tanstack/react-router";
|
|
2
|
+
import { scopeLink, detectScopeFromPath, getUrlPrefixes } from "@ydtb/tk-scope/client";
|
|
3
|
+
import { useScopeId } from "../contexts/scope/ScopeContext.js";
|
|
4
|
+
// Re-export pure functions from tk-scope canonical source
|
|
5
|
+
export { scopeLink, detectScopeFromPath, getUrlPrefixes };
|
|
6
|
+
/**
|
|
7
|
+
* React hook that returns a scoped link builder bound to the current scope context.
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* const sl = useScopeLink()
|
|
11
|
+
* <Link to={sl('/offers')}>Offers</Link>
|
|
12
|
+
* navigate({ to: sl('/team/members') })
|
|
13
|
+
*
|
|
14
|
+
* The returned function automatically detects the current scope from the URL
|
|
15
|
+
* ($scopeId param) and ScopeContext.
|
|
16
|
+
*
|
|
17
|
+
* You can override the scope/scopeId for cross-scope navigation:
|
|
18
|
+
* sl('/dashboard', { scope: 'parent', scopeId: parentScopeId })
|
|
19
|
+
*/
|
|
20
|
+
export function useScopeLink() {
|
|
21
|
+
// Get scopeId from URL params for scopes whose URL prefix includes $scopeId.
|
|
22
|
+
const params = useParams({ strict: false });
|
|
23
|
+
// Context fallbacks: if not in a scoped route, use context-based IDs
|
|
24
|
+
const contextScopeId = useScopeId();
|
|
25
|
+
// Detect current scope from URL pathname
|
|
26
|
+
const urlScopeId = params.scopeId;
|
|
27
|
+
return (path, opts) => {
|
|
28
|
+
// If explicit scope is provided, use it directly
|
|
29
|
+
if (opts?.scope) {
|
|
30
|
+
return scopeLink(path, {
|
|
31
|
+
scope: opts.scope,
|
|
32
|
+
scopeId: opts.scopeId,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
// Auto-detect current scope from URL
|
|
36
|
+
const currentPath = typeof window !== "undefined" ? window.location.pathname : "/";
|
|
37
|
+
const detected = detectScopeFromPath(currentPath);
|
|
38
|
+
if (detected) {
|
|
39
|
+
return scopeLink(path, {
|
|
40
|
+
scope: detected.scope,
|
|
41
|
+
scopeId: opts?.scopeId ?? urlScopeId ?? contextScopeId ?? undefined,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
// Fallback: try to build a scoped link with first available scope
|
|
45
|
+
// that has a scopeId pattern
|
|
46
|
+
const prefixes = getUrlPrefixes();
|
|
47
|
+
const scopedEntry = Object.entries(prefixes).find(([, p]) => p.includes("$scopeId"));
|
|
48
|
+
if (scopedEntry) {
|
|
49
|
+
return scopeLink(path, {
|
|
50
|
+
scope: scopedEntry[0],
|
|
51
|
+
scopeId: opts?.scopeId ?? urlScopeId ?? contextScopeId ?? undefined,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
return path;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=scopeLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scopeLink.js","sourceRoot":"","sources":["../../../src/lib/scopeLink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAoC,CAAA;AAE/D,0DAA0D;AAC1D,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,cAAc,EAAE,CAAA;AASzD;;;;;;;;;;;;;GAaG;AACH,MAAM,U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,CAAC,CAAC;gBACrB,OAAO,EAAE,IAAI,EAAE,OAAO,IAAI,UAAU,IAAI,cAAc,IAAI,SAAS;aACpE,CAAC,CAAA;QACJ,CAAC;QAED,OAAO,IAAI,CAAA;IACb,CAAC,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lightweight API interfaces for tool APIs consumed by the platform shell.
|
|
3
|
+
*
|
|
4
|
+
* The platform shell doesn't import typed routers from specific tools
|
|
5
|
+
* to avoid coupling. These interfaces define the minimum query/mutation
|
|
6
|
+
* shapes needed for type-safe usage without `as any` casts.
|
|
7
|
+
*
|
|
8
|
+
* We define the *client-side* shape (what createToolClient returns after
|
|
9
|
+
* oRPC's TanStack Query integration wraps the router) rather than the
|
|
10
|
+
* router type itself, because our lightweight interfaces can't satisfy
|
|
11
|
+
* oRPC's AnyRouter constraint.
|
|
12
|
+
*/
|
|
13
|
+
import { type ToolClient } from "@ydtb/tk-scope-api-client";
|
|
14
|
+
import type { DashboardRouter } from "@ydtb/tk-scope-dashboard/api/router";
|
|
15
|
+
import type { NotificationsRouter } from "@ydtb/tk-scope-notifications/api/router";
|
|
16
|
+
type DashboardApiClient = ToolClient<DashboardRouter>;
|
|
17
|
+
type NotificationsApiClient = ToolClient<NotificationsRouter>;
|
|
18
|
+
/** Rail item returned by dashboard.listRail */
|
|
19
|
+
export type DashboardRailItem = Awaited<ReturnType<DashboardApiClient["$client"]["listRail"]>>[number];
|
|
20
|
+
/** Client-side shape for the dashboard tool API. */
|
|
21
|
+
export type DashboardToolClient = Pick<ToolClient<DashboardRouter>, "listRail">;
|
|
22
|
+
export declare function createDashboardClient(): DashboardToolClient;
|
|
23
|
+
/** A single notification item. */
|
|
24
|
+
export type NotificationItem = Awaited<ReturnType<NotificationsApiClient["$client"]["list"]>>["data"][number];
|
|
25
|
+
/** Client-side shape for the notifications tool API (panel usage). */
|
|
26
|
+
export type NotificationsToolClient = Pick<ToolClient<NotificationsRouter>, "list" | "unreadCount" | "markRead" | "markAllRead" | "key">;
|
|
27
|
+
export declare function createNotificationsClient(): NotificationsToolClient;
|
|
28
|
+
/** Notification provider group returned by notifications.getProviders. */
|
|
29
|
+
export type NotificationProviderGroup = Awaited<ReturnType<NotificationsApiClient["$client"]["getProviders"]>>[number];
|
|
30
|
+
/** Flattened event provider descriptor used by the profile page UI. */
|
|
31
|
+
export type NotificationProvider = NotificationProviderGroup["events"][number];
|
|
32
|
+
/** Per-event/channel preference. */
|
|
33
|
+
export type NotificationPreference = Awaited<ReturnType<NotificationsApiClient["$client"]["getPreferences"]>>[number];
|
|
34
|
+
/** Entity subscription. */
|
|
35
|
+
export type NotificationSubscription = Awaited<ReturnType<NotificationsApiClient["$client"]["listSubscriptions"]>>[number];
|
|
36
|
+
/** Client-side shape for notification preferences (profile page). */
|
|
37
|
+
export type NotificationPreferencesClient = Pick<ToolClient<NotificationsRouter>, "getProviders" | "getPreferences" | "setPreference" | "listSubscriptions" | "unsubscribe">;
|
|
38
|
+
export declare function createNotificationPreferencesClient(): NotificationPreferencesClient;
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=tool-api-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-api-types.d.ts","sourceRoot":"","sources":["../../../src/lib/tool-api-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAC1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAA;AAElF,KAAK,kBAAkB,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA;AACrD,KAAK,sBAAsB,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAA;AAI7D,+CAA+C;AAC/C,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,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AU,CAAC,mBAAmB,CAAC,EAC/B,cAAc,GAAG,gBAAgB,GAAG,eAAe,GAAG,mBAAmB,GAAG,aAAa,CAC1F,CAAA;AAED,wBAAgB,mCAAmC,IAAI,6BAA6B,CAEnF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lightweight API interfaces for tool APIs consumed by the platform shell.
|
|
3
|
+
*
|
|
4
|
+
* The platform shell doesn't import typed routers from specific tools
|
|
5
|
+
* to avoid coupling. These interfaces define the minimum query/mutation
|
|
6
|
+
* shapes needed for type-safe usage without `as any` casts.
|
|
7
|
+
*
|
|
8
|
+
* We define the *client-side* shape (what createToolClient returns after
|
|
9
|
+
* oRPC's TanStack Query integration wraps the router) rather than the
|
|
10
|
+
* router type itself, because our lightweight interfaces can't satisfy
|
|
11
|
+
* oRPC's AnyRouter constraint.
|
|
12
|
+
*/
|
|
13
|
+
import { createToolClient } from "@ydtb/tk-scope-api-client";
|
|
14
|
+
export function createDashboardClient() {
|
|
15
|
+
return createToolClient("dashboard");
|
|
16
|
+
}
|
|
17
|
+
export function createNotificationsClient() {
|
|
18
|
+
return createToolClient("notifications");
|
|
19
|
+
}
|
|
20
|
+
export function createNotificationPreferencesClient() {
|
|
21
|
+
return createToolClient("notifications");
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=tool-api-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-api-types.js","sourceRoot":"","sources":["../../../src/lib/tool-api-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,gBAAgB,EAAmB,MAAM,2BAA2B,CAAA;AAe7E,MAAM,UAAU,qBAAqB;IACnC,OAAO,gBAAgB,CAAkB,WAAW,CAAC,CAAA;AACvD,CAAC;AAeD,MAAM,UAAU,yBAAyB;IACvC,OAAO,gBAAgB,CAAsB,eAAe,CAAC,CAAA;AAC/D,CAAC;AA4BD,MAAM,UAAU,mCAAmC;IACjD,OAAO,gBAAgB,CAAsB,eAAe,CAAC,CAAA;AAC/D,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* App-owned type definitions — replaces type-only imports from @ydtb/plugin-sdk.
|
|
3
|
+
*
|
|
4
|
+
* These are simple interfaces that the YDTB app owns. They were previously
|
|
5
|
+
* imported from plugin-sdk but are now inlined here to remove the dependency.
|
|
6
|
+
*
|
|
7
|
+
* @see migration/audit/AUDIT_003_post-m7-pre-m8-gate.md — Category B remediation
|
|
8
|
+
*/
|
|
9
|
+
import type { ComponentType } from "react";
|
|
10
|
+
export interface StepProps {
|
|
11
|
+
onNext: () => void;
|
|
12
|
+
onBack?: () => void;
|
|
13
|
+
stepIndex?: number;
|
|
14
|
+
totalSteps?: number;
|
|
15
|
+
}
|
|
16
|
+
export type StepPriority = "required" | "suggested";
|
|
17
|
+
export type StepGate = "scope" | "tool";
|
|
18
|
+
export interface OnboardingStepDefinition {
|
|
19
|
+
/** Unique step identifier */
|
|
20
|
+
id: string;
|
|
21
|
+
/** React component to render for this step */
|
|
22
|
+
component: ComponentType<StepProps>;
|
|
23
|
+
/** Sort order — lower numbers render first */
|
|
24
|
+
order: number;
|
|
25
|
+
/** Step IDs that must display/resolve before this one */
|
|
26
|
+
dependsOn?: string[];
|
|
27
|
+
/** Optional context key to scope when this step appears */
|
|
28
|
+
context?: string;
|
|
29
|
+
/** Whether this step tracks completion per-user or per-scope */
|
|
30
|
+
level?: "scope" | "user";
|
|
31
|
+
/** Optional predicate — return false to skip this step */
|
|
32
|
+
condition?: (ctx: {
|
|
33
|
+
previouslyCompletedSteps: string[];
|
|
34
|
+
wizardMetadata: Record<string, unknown>;
|
|
35
|
+
scope: string;
|
|
36
|
+
scopeId: string;
|
|
37
|
+
userId: string;
|
|
38
|
+
}) => boolean;
|
|
39
|
+
/** Runs during the resolve step to perform side-effects */
|
|
40
|
+
resolve?: (metadata: Record<string, unknown>) => Promise<Record<string, unknown> | void>;
|
|
41
|
+
/** Step priority — required steps block progress, suggested steps can be skipped */
|
|
42
|
+
priority?: StepPriority;
|
|
43
|
+
/** Gate type — scope gates block shell access, tool gates block tool access */
|
|
44
|
+
gate?: StepGate;
|
|
45
|
+
/** Tool that owns this step (for tool-gated steps) */
|
|
46
|
+
toolId?: string;
|
|
47
|
+
/** Human-readable label */
|
|
48
|
+
label?: string;
|
|
49
|
+
/** Human-readable description */
|
|
50
|
+
description?: string;
|
|
51
|
+
/** Icon identifier */
|
|
52
|
+
icon?: string;
|
|
53
|
+
/** URL to navigate to for this step */
|
|
54
|
+
href?: string;
|
|
55
|
+
/** URL to navigate to after step is completed */
|
|
56
|
+
completedHref?: string;
|
|
57
|
+
/** Label to show after step is completed */
|
|
58
|
+
completedLabel?: string;
|
|
59
|
+
}
|
|
60
|
+
export type OnboardingStepsByScope = Partial<Record<string, OnboardingStepDefinition[]>>;
|
|
61
|
+
declare module "@ydtb/tk-scope/core" {
|
|
62
|
+
interface ClientContributions {
|
|
63
|
+
onboarding?: {
|
|
64
|
+
stepsByScope?: OnboardingStepsByScope;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export interface AuthResult {
|
|
69
|
+
success: boolean;
|
|
70
|
+
error?: string;
|
|
71
|
+
/** Optional user/session data returned on successful auth */
|
|
72
|
+
data?: Record<string, unknown>;
|
|
73
|
+
}
|
|
74
|
+
export interface BrandingConfig {
|
|
75
|
+
/** Business or scope name */
|
|
76
|
+
name?: string;
|
|
77
|
+
/** URL to logo image */
|
|
78
|
+
logoUrl?: string | null;
|
|
79
|
+
/** Primary brand color (CSS value) */
|
|
80
|
+
primaryColor?: string;
|
|
81
|
+
/** Powered-by footer text */
|
|
82
|
+
poweredByText?: string | null;
|
|
83
|
+
}
|
|
84
|
+
export interface AuthComponentProps {
|
|
85
|
+
/** Callback to submit credentials for validation */
|
|
86
|
+
onAuthenticate: (credentials: unknown) => Promise<AuthResult>;
|
|
87
|
+
/** Branding configuration for visual customization */
|
|
88
|
+
branding: BrandingConfig;
|
|
89
|
+
/** Error message to display */
|
|
90
|
+
error: string | null;
|
|
91
|
+
/** Whether authentication is in progress */
|
|
92
|
+
loading: boolean;
|
|
93
|
+
}
|
|
94
|
+
export interface GuardConfig {
|
|
95
|
+
auth: "session" | "pin" | "device" | "none" | string;
|
|
96
|
+
scope: string | null;
|
|
97
|
+
permissions: "auto" | "none";
|
|
98
|
+
onboarding: boolean;
|
|
99
|
+
}
|
|
100
|
+
/** Public routes — no auth, no scope, no permissions, no onboarding. */
|
|
101
|
+
declare function publicGuard(): GuardConfig;
|
|
102
|
+
/** Auth shell routes (login/signup) — no gates applied. */
|
|
103
|
+
declare function authOnly(): GuardConfig;
|
|
104
|
+
/** Authenticated routes — session required, but no scope or permissions. */
|
|
105
|
+
declare function authenticated(): GuardConfig;
|
|
106
|
+
/** Scoped routes — session + scope resolution, but no permission checks or onboarding. */
|
|
107
|
+
declare function scoped(type: string): GuardConfig;
|
|
108
|
+
/** Fully guarded routes — session + scope + auto permissions + onboarding. */
|
|
109
|
+
declare function guarded(type: string): GuardConfig;
|
|
110
|
+
/** Custom auth strategy with optional scope. */
|
|
111
|
+
declare function custom(strategy: string, type?: string): GuardConfig;
|
|
112
|
+
/** Guard preset functions for declarative route shell configuration. */
|
|
113
|
+
export declare const guardPresets: {
|
|
114
|
+
readonly public: typeof publicGuard;
|
|
115
|
+
readonly authOnly: typeof authOnly;
|
|
116
|
+
readonly authenticated: typeof authenticated;
|
|
117
|
+
readonly scoped: typeof scoped;
|
|
118
|
+
readonly guarded: typeof guarded;
|
|
119
|
+
readonly custom: typeof custom;
|
|
120
|
+
};
|
|
121
|
+
export {};
|
|
122
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,E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