@kuckit/app-web 3.0.0 → 3.0.2

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/dist/index.d.ts CHANGED
@@ -809,4 +809,5 @@ declare function mergeRouteTrees<TStaticRoutes extends object>(staticRouteTree:
809
809
  */
810
810
  declare function KuckitModuleRoute(): react_jsx_runtime0.JSX.Element | null;
811
811
  //#endregion
812
- export { type AuthClient, type ClientModuleSpec, type CreateKuckitWebProviderOptions, type CreateServicesOptions, KuckitModuleRoute, type KuckitRouterContext, type KuckitWebConfig, type KuckitWebContext, type KuckitWebProviderProps, type KuckitWebRouterProps, type KuckitWebServices, type ModuleRoute, type NavItem, type ORPCUtils, type RouteDefinition, buildModuleRoutes, createAuthClientService, createKuckitWebProvider, createKuckitWebServices, createORPCUtils, createQueryClient, createRPCClient, createRPCLink, mergeRouteTrees, useAuth, useKuckitWeb, useOrpc, useQueryClient, useRpc, useServices, withKuckitWeb };
812
+ export { type AuthClient, type ClientModuleSpec, type CreateKuckitWebProviderOptions, type CreateServicesOptions, KuckitModuleRoute, type KuckitRouterContext, type KuckitWebConfig, type KuckitWebContext, type KuckitWebProviderProps, type KuckitWebRouterProps, type KuckitWebServices, type ModuleRoute, type NavItem, type ORPCUtils, type RouteDefinition, buildModuleRoutes, createAuthClientService, createKuckitWebProvider, createKuckitWebServices, createORPCUtils, createQueryClient, createRPCClient, createRPCLink, mergeRouteTrees, useAuth, useKuckitWeb, useOrpc, useQueryClient, useRpc, useServices, withKuckitWeb };
813
+ //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -179,16 +179,7 @@ function InternalKuckitWebProvider({ config, routeTree, rootRoute, children }) {
179
179
  services,
180
180
  isLoaded: true
181
181
  };
182
- return createElement(ServicesContext.Provider, { value: services }, createElement(QueryClientProvider, { client: services.queryClient }, createElement(KuckitWebContext.Provider, { value: contextValue }, createElement(KuckitRpcProvider, {
183
- client: services.rpcClient,
184
- children: null
185
- }, createElement(KuckitNavProvider, {
186
- registry: loadResult.navRegistry,
187
- children: null
188
- }, createElement(KuckitSlotProvider, {
189
- registry: loadResult.slotRegistry,
190
- children: null
191
- }, createElement(RouterProvider, { router }), children))))));
182
+ return createElement(ServicesContext.Provider, { value: services }, createElement(QueryClientProvider, { client: services.queryClient }, createElement(KuckitWebContext.Provider, { value: contextValue }, createElement(KuckitRpcProvider, { client: services.rpcClient }, createElement(KuckitNavProvider, { registry: loadResult.navRegistry }, createElement(KuckitSlotProvider, { registry: loadResult.slotRegistry }, createElement(RouterProvider, { router }), children))))));
192
183
  }
193
184
  function createKuckitWebProvider(options) {
194
185
  const { routeTree, rootRoute,...config } = options;
@@ -363,4 +354,5 @@ function KuckitModuleRoute() {
363
354
  }
364
355
 
365
356
  //#endregion
366
- export { KuckitModuleRoute, buildModuleRoutes, createAuthClientService, createKuckitWebProvider, createKuckitWebServices, createORPCUtils, createQueryClient, createRPCClient, createRPCLink, mergeRouteTrees, useAuth, useKuckitWeb, useOrpc, useQueryClient, useRpc, useServices, withKuckitWeb };
357
+ export { KuckitModuleRoute, buildModuleRoutes, createAuthClientService, createKuckitWebProvider, createKuckitWebServices, createORPCUtils, createQueryClient, createRPCClient, createRPCLink, mergeRouteTrees, useAuth, useKuckitWeb, useOrpc, useQueryClient, useRpc, useServices, withKuckitWeb };
358
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["contextValue: KuckitWebContext","pathname"],"sources":["../src/services.ts","../src/provider.tsx","../src/router.ts","../src/components/KuckitModuleRoute.tsx"],"sourcesContent":["import { createORPCClient } from '@orpc/client'\nimport { RPCLink } from '@orpc/client/fetch'\nimport { createTanstackQueryUtils } from '@orpc/tanstack-query'\nimport { QueryCache, QueryClient } from '@tanstack/react-query'\nimport { createAuthClient } from 'better-auth/react'\nimport { inferAdditionalFields } from 'better-auth/client/plugins'\nimport type { AppRouterClient } from '@kuckit/api/routers/index'\nimport type { Auth } from '@kuckit/auth'\nimport type { KuckitWebServices, ORPCUtils } from './types'\n\nexport interface CreateServicesOptions {\n\tserverUrl?: string\n\tonQueryError?: (error: Error) => void\n}\n\nexport function createQueryClient(onError?: (error: Error) => void): QueryClient {\n\tconst queryClient = new QueryClient({\n\t\tqueryCache: new QueryCache({\n\t\t\tonError: (error) => {\n\t\t\t\tonError?.(error)\n\t\t\t},\n\t\t}),\n\t})\n\treturn queryClient\n}\n\nexport function createRPCLink(serverUrl: string) {\n\treturn new RPCLink({\n\t\turl: `${serverUrl}/rpc`,\n\t\tfetch(url, options) {\n\t\t\treturn fetch(url, {\n\t\t\t\t...options,\n\t\t\t\tcredentials: 'include',\n\t\t\t})\n\t\t},\n\t})\n}\n\nexport function createRPCClient(link: ReturnType<typeof createRPCLink>): AppRouterClient {\n\treturn createORPCClient(link)\n}\n\nexport function createORPCUtils(client: AppRouterClient): ORPCUtils {\n\treturn createTanstackQueryUtils(client)\n}\n\nexport function createAuthClientService(serverUrl: string) {\n\treturn createAuthClient({\n\t\tbaseURL: serverUrl,\n\t\tplugins: [inferAdditionalFields<Auth>()],\n\t})\n}\n\nexport function createKuckitWebServices(options: CreateServicesOptions = {}): KuckitWebServices {\n\tconst serverUrl =\n\t\toptions.serverUrl ||\n\t\t(typeof globalThis !== 'undefined' && 'location' in globalThis\n\t\t\t? (globalThis as unknown as { location: { origin: string } }).location.origin\n\t\t\t: '')\n\n\tconst queryClient = createQueryClient(options.onQueryError)\n\tconst link = createRPCLink(serverUrl)\n\tconst rpcClient = createRPCClient(link)\n\tconst orpc = createORPCUtils(rpcClient)\n\tconst authClient = createAuthClientService(serverUrl)\n\n\treturn {\n\t\tqueryClient,\n\t\trpcClient,\n\t\torpc,\n\t\tauthClient,\n\t}\n}\n","import {\n\tcreateContext,\n\tuseContext,\n\tuseEffect,\n\tuseState,\n\tuseMemo,\n\tcreateElement,\n\ttype ReactNode,\n\ttype ComponentType,\n\ttype FC,\n} from 'react'\nimport { QueryClientProvider } from '@tanstack/react-query'\nimport {\n\tRouterProvider,\n\tcreateRouter,\n\tcreateRoute,\n\ttype RouteComponent,\n} from '@tanstack/react-router'\nimport {\n\tloadKuckitClientModules,\n\tKuckitNavProvider,\n\tKuckitSlotProvider,\n\tKuckitRpcProvider,\n\ttype LoadClientModulesResult,\n} from '@kuckit/sdk-react'\nimport { createKuckitWebServices } from './services'\nimport type {\n\tKuckitWebConfig,\n\tKuckitWebContext,\n\tKuckitWebServices,\n\tCreateKuckitWebProviderOptions,\n} from './types'\n\nconst KuckitWebContext = createContext<KuckitWebContext | null>(null)\nconst ServicesContext = createContext<KuckitWebServices | null>(null)\n\nfunction DefaultLoader() {\n\treturn createElement('div', {\n\t\tstyle: { display: 'flex', alignItems: 'center', justifyContent: 'center', height: '100vh' },\n\t\tchildren: 'Loading...',\n\t})\n}\n\nfunction DefaultError({ error }: { error: Error }) {\n\treturn createElement('div', {\n\t\tstyle: {\n\t\t\tdisplay: 'flex',\n\t\t\talignItems: 'center',\n\t\t\tjustifyContent: 'center',\n\t\t\theight: '100vh',\n\t\t\tflexDirection: 'column',\n\t\t},\n\t\tchildren: [\n\t\t\tcreateElement('h2', { key: 'title', style: { color: 'red' } }, 'Failed to load modules'),\n\t\t\tcreateElement('p', { key: 'message' }, error.message),\n\t\t],\n\t})\n}\n\nexport function useKuckitWeb(): KuckitWebContext {\n\tconst ctx = useContext(KuckitWebContext)\n\tif (!ctx) {\n\t\tthrow new Error('useKuckitWeb must be used within a KuckitWebProvider')\n\t}\n\treturn ctx\n}\n\nexport function useServices(): KuckitWebServices {\n\tconst ctx = useContext(ServicesContext)\n\tif (!ctx) {\n\t\tthrow new Error('useServices must be used within a KuckitWebProvider')\n\t}\n\treturn ctx\n}\n\nexport function useRpc() {\n\tconst { rpcClient } = useServices()\n\treturn rpcClient\n}\n\nexport function useOrpc() {\n\tconst { orpc } = useServices()\n\treturn orpc\n}\n\nexport function useAuth() {\n\tconst { authClient } = useServices()\n\treturn authClient\n}\n\nexport function useQueryClient() {\n\tconst { queryClient } = useServices()\n\treturn queryClient\n}\n\ninterface InternalProviderProps {\n\tconfig: KuckitWebConfig\n\trouteTree: unknown\n\trootRoute: unknown\n\tchildren?: ReactNode\n}\n\nfunction InternalKuckitWebProvider({\n\tconfig,\n\trouteTree,\n\trootRoute,\n\tchildren,\n}: InternalProviderProps) {\n\tconst { services, Loader, ErrorComponent } = useMemo(() => {\n\t\tconst svc = createKuckitWebServices({ serverUrl: config.serverUrl })\n\t\treturn {\n\t\t\tservices: svc,\n\t\t\tLoader: config.loaderComponent || DefaultLoader,\n\t\t\tErrorComponent: config.errorComponent || DefaultError,\n\t\t}\n\t}, [config.serverUrl, config.loaderComponent, config.errorComponent])\n\n\tconst [loadResult, setLoadResult] = useState<LoadClientModulesResult | null>(null)\n\tconst [error, setError] = useState<Error | null>(null)\n\n\tuseEffect(() => {\n\t\tlet cancelled = false\n\n\t\tconst loadModules = async () => {\n\t\t\ttry {\n\t\t\t\tconst result = await loadKuckitClientModules({\n\t\t\t\t\torpc: services.orpc,\n\t\t\t\t\tqueryClient: services.queryClient,\n\t\t\t\t\tenv: config.env || 'production',\n\t\t\t\t\tmodules: config.modules,\n\t\t\t\t})\n\n\t\t\t\tif (!cancelled) {\n\t\t\t\t\tsetLoadResult(result)\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\tif (!cancelled) {\n\t\t\t\t\tsetError(err instanceof Error ? err : new Error(String(err)))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tloadModules()\n\n\t\treturn () => {\n\t\t\tcancelled = true\n\t\t}\n\t}, [services, config.modules, config.env])\n\n\tconst router = useMemo(() => {\n\t\tif (!loadResult) return null\n\n\t\tconst moduleRouteDefs = loadResult.routeRegistry.getAll()\n\t\tconst moduleRoutes = moduleRouteDefs.map((routeDef) =>\n\t\t\tcreateRoute({\n\t\t\t\tgetParentRoute: () => rootRoute as ReturnType<typeof createRoute>,\n\t\t\t\tpath: routeDef.path,\n\t\t\t\tcomponent: routeDef.component as RouteComponent,\n\t\t\t})\n\t\t)\n\n\t\tif (moduleRoutes.length > 0) {\n\t\t\tconsole.log(\n\t\t\t\t`[kuckit/app-web] Loaded ${moduleRoutes.length} module routes:`,\n\t\t\t\tmoduleRouteDefs.map((r) => r.path)\n\t\t\t)\n\t\t}\n\n\t\treturn createRouter({\n\t\t\trouteTree: routeTree as Parameters<typeof createRouter>[0]['routeTree'],\n\t\t\tdefaultPreload: 'intent',\n\t\t\tdefaultPendingComponent: Loader as FC,\n\t\t\tcontext: {\n\t\t\t\torpc: services.orpc,\n\t\t\t\tqueryClient: services.queryClient,\n\t\t\t\tauthClient: services.authClient,\n\t\t\t},\n\t\t})\n\t}, [loadResult, routeTree, rootRoute, services, Loader])\n\n\tif (error) {\n\t\treturn createElement(ErrorComponent, { error })\n\t}\n\n\tif (!loadResult || !router) {\n\t\treturn createElement(Loader)\n\t}\n\n\tconst contextValue: KuckitWebContext = {\n\t\trouteRegistry: loadResult.routeRegistry,\n\t\tnavRegistry: loadResult.navRegistry,\n\t\tslotRegistry: loadResult.slotRegistry,\n\t\tservices,\n\t\tisLoaded: true,\n\t}\n\n\treturn createElement(\n\t\tServicesContext.Provider,\n\t\t{ value: services },\n\t\tcreateElement(\n\t\t\tQueryClientProvider,\n\t\t\t{ client: services.queryClient },\n\t\t\tcreateElement(\n\t\t\t\tKuckitWebContext.Provider,\n\t\t\t\t{ value: contextValue },\n\t\t\t\tcreateElement(\n\t\t\t\t\tKuckitRpcProvider,\n\t\t\t\t\t{ client: services.rpcClient },\n\t\t\t\t\tcreateElement(\n\t\t\t\t\t\tKuckitNavProvider,\n\t\t\t\t\t\t{ registry: loadResult.navRegistry },\n\t\t\t\t\t\tcreateElement(\n\t\t\t\t\t\t\tKuckitSlotProvider,\n\t\t\t\t\t\t\t{ registry: loadResult.slotRegistry },\n\t\t\t\t\t\t\tcreateElement(RouterProvider, { router }),\n\t\t\t\t\t\t\tchildren\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t)\n\t)\n}\n\nexport function createKuckitWebProvider(\n\toptions: CreateKuckitWebProviderOptions\n): ComponentType<{ children?: ReactNode }> {\n\tconst { routeTree, rootRoute, ...config } = options\n\n\treturn function KuckitWebProvider({ children }: { children?: ReactNode }) {\n\t\treturn createElement(InternalKuckitWebProvider, {\n\t\t\tconfig,\n\t\t\trouteTree,\n\t\t\trootRoute,\n\t\t\tchildren,\n\t\t})\n\t}\n}\n\nexport function withKuckitWeb<P extends object>(\n\tComponent: ComponentType<P>,\n\toptions: CreateKuckitWebProviderOptions\n): ComponentType<P> {\n\tconst Provider = createKuckitWebProvider(options)\n\n\treturn function WrappedWithKuckit(props: P) {\n\t\treturn createElement(Provider, null, createElement(Component, props))\n\t}\n}\n","import { createRoute, type AnyRoute, type RouteComponent } from '@tanstack/react-router'\nimport type { QueryClient } from '@tanstack/react-query'\nimport type { RouteRegistry, RouteDefinition } from '@kuckit/sdk-react'\nimport type { ORPCUtils, AuthClient } from './types'\n\n/**\n * Context type for TanStack Router integration with Kuckit.\n * This is passed via router context to enable oRPC access in route loaders.\n */\nexport interface KuckitRouterContext {\n\torpc: ORPCUtils\n\tqueryClient: QueryClient\n\tauthClient: AuthClient\n}\n\n/**\n * Build TanStack Router routes from a RouteRegistry\n *\n * This function converts module-registered routes into TanStack Router\n * route objects that can be added to the route tree.\n *\n * @param routeRegistry - Registry containing module routes\n * @param rootRoute - The root route to attach module routes to\n * @returns Array of TanStack route objects\n */\nexport function buildModuleRoutes(routeRegistry: RouteRegistry, rootRoute: AnyRoute): AnyRoute[] {\n\tconst routes = routeRegistry.getAll()\n\tconst routeMap = new Map<string, AnyRoute>()\n\n\t// First pass: create all routes\n\tfor (const routeDef of routes) {\n\t\tconst route = createModuleRoute(routeDef, rootRoute)\n\t\trouteMap.set(routeDef.id, route)\n\t}\n\n\t// Second pass: handle parent-child relationships\n\t// Note: For now we attach all to root. Nested routes would need\n\t// the parent route to be created first.\n\tconst topLevelRoutes = routes\n\t\t.filter((r) => !r.parentRouteId || r.parentRouteId === '__root__')\n\t\t.map((r) => routeMap.get(r.id)!)\n\t\t.filter(Boolean)\n\n\treturn topLevelRoutes\n}\n\n/**\n * Create a single TanStack route from a RouteDefinition\n */\nfunction createModuleRoute(routeDef: RouteDefinition, parentRoute: AnyRoute): AnyRoute {\n\treturn createRoute({\n\t\tgetParentRoute: () => parentRoute,\n\t\tpath: routeDef.path,\n\t\tcomponent: routeDef.component as RouteComponent,\n\t\t// Add head metadata if provided\n\t\t...(routeDef.meta?.title && {\n\t\t\thead: () => ({\n\t\t\t\tmeta: [{ title: routeDef.meta!.title }],\n\t\t\t}),\n\t\t}),\n\t})\n}\n\n/**\n * Merge static routes with module routes\n *\n * This is used to combine the codegen route tree with dynamic module routes.\n */\nexport function mergeRouteTrees<TStaticRoutes extends object>(\n\tstaticRouteTree: TStaticRoutes,\n\t_moduleRoutes: AnyRoute[]\n): TStaticRoutes {\n\t// TanStack Router's route tree is built via _addFileChildren\n\t// For dynamic routes, we need to add them to the root route's children\n\t// This is a simplified approach - in practice you may need to patch\n\t// the root route to include new children\n\n\t// For now, return the static tree as-is\n\t// The module routes can be rendered via a catch-all pattern\n\t// or by using the router's addRoute API if available\n\n\treturn staticRouteTree\n}\n","import { useRouterState, Link, useNavigate } from '@tanstack/react-router'\nimport { useEffect, useState } from 'react'\nimport { useKuckitWeb, useAuth } from '../provider'\n\n/**\n * Helper to determine if a route path is a root-level route (outside dashboard).\n * Root routes start with '/' but NOT '/dashboard'.\n */\nfunction isRootLevelRoute(path: string): boolean {\n\treturn path.startsWith('/') && !path.startsWith('/dashboard')\n}\n\n/**\n * Dynamic route renderer for Kuckit module routes.\n *\n * This component looks up the current path in the RouteRegistry\n * and renders the corresponding module component if found.\n *\n * Route resolution is context-aware:\n * - When rendered under /dashboard/*: matches dashboard routes\n * - When rendered at root level: matches root-level routes (paths starting with '/' but not '/dashboard/')\n *\n * For root routes with meta.requiresAuth: true, redirects to /login if not authenticated.\n */\nexport function KuckitModuleRoute() {\n\tconst { routeRegistry } = useKuckitWeb()\n\tconst authClient = useAuth()\n\tconst { location } = useRouterState()\n\tconst navigate = useNavigate()\n\tconst pathname = location.pathname\n\n\tconst [authChecked, setAuthChecked] = useState(false)\n\tconst [isAuthenticated, setIsAuthenticated] = useState(false)\n\n\t// Determine if we're in dashboard context\n\tconst isDashboardContext = pathname.startsWith('/dashboard')\n\n\t// Filter routes based on context\n\tconst contextRoutes = routeRegistry.getAll().filter((r) => {\n\t\tconst isRoot = isRootLevelRoute(r.path)\n\t\t// In dashboard context: show non-root routes\n\t\t// In root context: show root routes\n\t\treturn isDashboardContext ? !isRoot : isRoot\n\t})\n\n\t// For dashboard context, also try matching with /dashboard prefix stripped\n\tconst modulePathname = isDashboardContext ? pathname.replace('/dashboard', '') || '/' : pathname\n\n\t// Match route path against pathname, supporting catch-all patterns like /docs/$\n\tfunction matchRoute(routePath: string, pathname: string): boolean {\n\t\t// Exact match\n\t\tif (routePath === pathname) return true\n\n\t\t// Catch-all pattern: /docs/$ matches /docs/anything/here\n\t\tif (routePath.endsWith('/$')) {\n\t\t\tconst base = routePath.slice(0, -1) // Remove trailing $\n\t\t\treturn pathname.startsWith(base)\n\t\t}\n\n\t\treturn false\n\t}\n\n\t// Find matching route - prefer exact matches over catch-all\n\tconst exactMatch = contextRoutes.find((r) => r.path === pathname)\n\tconst catchAllMatch = contextRoutes.find(\n\t\t(r) => r.path.endsWith('/$') && matchRoute(r.path, pathname)\n\t)\n\tlet routeDef = exactMatch || catchAllMatch\n\n\tif (!routeDef && isDashboardContext) {\n\t\t// For dashboard routes, also try matching stripped path\n\t\tconst exactDash = contextRoutes.find((r) => r.path === modulePathname)\n\t\tconst catchAllDash = contextRoutes.find(\n\t\t\t(r) => r.path.endsWith('/$') && matchRoute(r.path, modulePathname)\n\t\t)\n\t\trouteDef = exactDash || catchAllDash\n\t}\n\n\t// Check auth for root routes with requiresAuth\n\tuseEffect(() => {\n\t\tasync function checkAuth() {\n\t\t\tif (!routeDef) {\n\t\t\t\tsetAuthChecked(true)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Dashboard routes are already protected by the dashboard layout\n\t\t\tif (isDashboardContext) {\n\t\t\t\tsetAuthChecked(true)\n\t\t\t\tsetIsAuthenticated(true)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// For root routes, check if auth is required\n\t\t\tif (routeDef.meta?.requiresAuth) {\n\t\t\t\tconst session = await authClient.getSession()\n\t\t\t\tif (!session.data) {\n\t\t\t\t\t// Redirect to login with return URL\n\t\t\t\t\tnavigate({\n\t\t\t\t\t\tto: '/login',\n\t\t\t\t\t\tsearch: { redirect: pathname },\n\t\t\t\t\t})\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tsetIsAuthenticated(true)\n\t\t\t}\n\t\t\tsetAuthChecked(true)\n\t\t}\n\n\t\tcheckAuth()\n\t}, [routeDef, isDashboardContext, pathname, navigate, authClient])\n\n\t// Show loading while checking auth for protected root routes\n\tif (!isDashboardContext && routeDef?.meta?.requiresAuth && !authChecked) {\n\t\treturn (\n\t\t\t<div className=\"flex items-center justify-center min-h-screen\">\n\t\t\t\t<div className=\"animate-spin rounded-full h-8 w-8 border-b-2 border-primary\" />\n\t\t\t</div>\n\t\t)\n\t}\n\n\t// Protected root route - waiting for redirect\n\tif (!isDashboardContext && routeDef?.meta?.requiresAuth && !isAuthenticated) {\n\t\treturn null\n\t}\n\n\tif (!routeDef) {\n\t\treturn (\n\t\t\t<div className=\"flex flex-col items-center justify-center min-h-[50vh] gap-4\">\n\t\t\t\t<h1 className=\"text-2xl font-bold\">Page Not Found</h1>\n\t\t\t\t<p className=\"text-muted-foreground\">The page \"{pathname}\" could not be found.</p>\n\t\t\t\t<Link to=\"/\" className=\"text-primary hover:underline\">\n\t\t\t\t\tGo Home\n\t\t\t\t</Link>\n\t\t\t</div>\n\t\t)\n\t}\n\n\tconst Component = routeDef.component as React.ComponentType\n\treturn <Component />\n}\n"],"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AGrB,aAAW;IACT;EAAC;EAAU;EAAoB;EAAU;EAAU;EAAW,CAAC;AAGlE,KAAI,CAAC,sBAAsB,UAAU,MAAM,gBAAgB,CAAC,YAC3D,QACC,oBAAC;EAAI,WAAU;YACd,oBAAC,SAAI,WAAU,gEAAgE;GAC1E;AAKR,KAAI,CAAC,sBAAsB,UAAU,MAAM,gBAAgB,CAAC,gBAC3D,QAAO;AAGR,KAAI,CAAC,SACJ,QACC,qBAAC;EAAI,WAAU;;GACd,oBAAC;IAAG,WAAU;cAAqB;KAAmB;GACtD,qBAAC;IAAE,WAAU;;KAAwB;KAAW;KAAS;;KAAyB;GAClF,oBAAC;IAAK,IAAG;IAAI,WAAU;cAA+B;KAE/C;;GACF;CAIR,MAAM,YAAY,SAAS;AAC3B,QAAO,oBAAC,cAAY"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kuckit/app-web",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -23,9 +23,9 @@
23
23
  "prepublishOnly": "npm run build && node ../../scripts/resolve-workspace-protocols.cjs && node ../../scripts/check-no-workspace-protocol.cjs"
24
24
  },
25
25
  "dependencies": {
26
- "@kuckit/sdk-react": "^3.0.0",
27
- "@kuckit/api": "^3.0.0",
28
- "@kuckit/auth": "^3.0.0",
26
+ "@kuckit/sdk-react": "^3.0.2",
27
+ "@kuckit/api": "^3.0.2",
28
+ "@kuckit/auth": "^3.0.2",
29
29
  "@tanstack/react-query": "^5.85.5",
30
30
  "@tanstack/react-router": "^1.114.25",
31
31
  "@orpc/client": "^1.10.0",