@shipfox/client-shell 2.0.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/assets/apple-touch-icon.png +0 -0
  2. package/assets/favicon-96x96.png +0 -0
  3. package/assets/favicon.ico +0 -0
  4. package/assets/favicon.svg +1 -0
  5. package/assets/site.webmanifest +22 -0
  6. package/assets/web-app-manifest-192x192.png +0 -0
  7. package/assets/web-app-manifest-512x512.png +0 -0
  8. package/dist/runtime/auth.d.ts +4 -0
  9. package/dist/runtime/auth.d.ts.map +1 -1
  10. package/dist/runtime/auth.js +64 -19
  11. package/dist/runtime/auth.js.map +1 -1
  12. package/dist/runtime/last-workspace.d.ts +1 -1
  13. package/dist/runtime/last-workspace.d.ts.map +1 -1
  14. package/dist/runtime/last-workspace.js +33 -14
  15. package/dist/runtime/last-workspace.js.map +1 -1
  16. package/dist/tsconfig.test.tsbuildinfo +1 -1
  17. package/dist/vite/index.d.ts +1 -0
  18. package/dist/vite/index.d.ts.map +1 -1
  19. package/dist/vite/index.js +1 -0
  20. package/dist/vite/index.js.map +1 -1
  21. package/dist/vite/manifest.d.ts +3 -0
  22. package/dist/vite/manifest.d.ts.map +1 -0
  23. package/dist/vite/manifest.js +140 -0
  24. package/dist/vite/manifest.js.map +1 -0
  25. package/package.json +11 -27
  26. package/.turbo/turbo-build.log +0 -2
  27. package/.turbo/turbo-type$colon$emit.log +0 -1
  28. package/.turbo/turbo-type.log +0 -1
  29. package/CHANGELOG.md +0 -59
  30. package/src/components/main-layout.tsx +0 -45
  31. package/src/components/nav-bar.tsx +0 -41
  32. package/src/components/nav-tabs.test.tsx +0 -60
  33. package/src/components/nav-tabs.tsx +0 -47
  34. package/src/components/not-found-page.tsx +0 -14
  35. package/src/components/settings-nav.tsx +0 -35
  36. package/src/components/user-menu.tsx +0 -59
  37. package/src/components/workspace-crumb.tsx +0 -43
  38. package/src/components/workspace-switcher.tsx +0 -75
  39. package/src/compose/compose-routes.test.ts +0 -112
  40. package/src/compose/compose-routes.ts +0 -60
  41. package/src/compose/errors.ts +0 -54
  42. package/src/compose/merge-config.test.ts +0 -26
  43. package/src/compose/merge-config.ts +0 -27
  44. package/src/compose/normalize-route-path.ts +0 -6
  45. package/src/compose/validate-providers.test.ts +0 -31
  46. package/src/compose/validate-providers.ts +0 -36
  47. package/src/compose/validate-registries.test.ts +0 -92
  48. package/src/compose/validate-registries.ts +0 -61
  49. package/src/config/config-screen.test.tsx +0 -37
  50. package/src/config/shell-config.ts +0 -10
  51. package/src/contract.ts +0 -47
  52. package/src/index.ts +0 -1
  53. package/src/runtime/active-workspace.ts +0 -13
  54. package/src/runtime/anchor-paths.ts +0 -18
  55. package/src/runtime/anchors.tsx +0 -106
  56. package/src/runtime/assemble-route-tree.ts +0 -42
  57. package/src/runtime/auth.tsx +0 -213
  58. package/src/runtime/chrome-context.tsx +0 -22
  59. package/src/runtime/compose-client-app.tsx +0 -122
  60. package/src/runtime/define-route.test.ts +0 -15
  61. package/src/runtime/define-route.ts +0 -33
  62. package/src/runtime/index.ts +0 -19
  63. package/src/runtime/last-workspace.ts +0 -22
  64. package/src/runtime/nav-order.ts +0 -1
  65. package/src/runtime/provider-stack.tsx +0 -39
  66. package/src/runtime/providers.test.tsx +0 -51
  67. package/src/runtime/registries.test.tsx +0 -100
  68. package/src/runtime/registries.ts +0 -42
  69. package/src/runtime/router-context.ts +0 -9
  70. package/src/runtime/routes.test.tsx +0 -48
  71. package/src/runtime/workspace-setup.tsx +0 -61
  72. package/src/testing/index.test.tsx +0 -57
  73. package/src/testing/index.tsx +0 -51
  74. package/src/vite/evaluate-features.test.ts +0 -89
  75. package/src/vite/evaluate-features.ts +0 -114
  76. package/src/vite/generate.test.ts +0 -22
  77. package/src/vite/generate.ts +0 -99
  78. package/src/vite/generated-router.test.tsx +0 -58
  79. package/src/vite/index.ts +0 -1
  80. package/src/vite/plugin.test.ts +0 -231
  81. package/src/vite/plugin.ts +0 -101
  82. package/src/vite/validate.test.ts +0 -166
  83. package/test/default-route-impl.tsx +0 -3
  84. package/test/external/FINDINGS.md +0 -41
  85. package/test/external/README.md +0 -37
  86. package/test/external/fixture/index.html +0 -12
  87. package/test/external/fixture/package.json +0 -31
  88. package/test/external/fixture/src/app.fixture.tsx +0 -104
  89. package/test/external/fixture/src/features/external-settings.tsx +0 -19
  90. package/test/external/fixture/src/features/login-override.tsx +0 -9
  91. package/test/external/fixture/src/features.collision.ts +0 -15
  92. package/test/external/fixture/src/features.ts +0 -50
  93. package/test/external/fixture/src/link-typecheck.tsx +0 -10
  94. package/test/external/fixture/src/main.tsx +0 -86
  95. package/test/external/fixture/src/provider.ts +0 -45
  96. package/test/external/fixture/tsconfig.json +0 -15
  97. package/test/external/fixture/vite.config.ts +0 -21
  98. package/test/external/fixture/vitest.config.ts +0 -17
  99. package/test/external/verify.mjs +0 -488
  100. package/test/fixtures/features.ts +0 -56
  101. package/test/named-route-impl.tsx +0 -3
  102. package/test/render.tsx +0 -67
  103. package/test/search-route-impl.tsx +0 -7
  104. package/test/setup.ts +0 -3
  105. package/test/typecheck/shipfox-app.gen.ts +0 -85
  106. package/test/typecheck/types.tsx +0 -23
  107. package/tsconfig.build.json +0 -10
  108. package/tsconfig.build.tsbuildinfo +0 -1
  109. package/tsconfig.json +0 -1
  110. package/tsconfig.test.json +0 -12
  111. package/vitest.config.ts +0 -22
@@ -1,85 +0,0 @@
1
- // GENERATED by @shipfox/client-shell/vite. Do not edit.
2
- // biome-ignore-all format: generated code has stable, reviewable output.
3
- // biome-ignore-all assist/source/organizeImports: generated imports follow route order.
4
- import {createRoute, createRouter} from '@tanstack/react-router';
5
- import {buildAnchorSkeleton, isRouteImpl, type RouteImpl, type RouterContext} from '@shipfox/client-shell/runtime';
6
- import * as route0Module from "#test/search-route-impl.js";
7
- import * as route1Module from "#test/default-route-impl.js";
8
- import * as route2Module from "#test/named-route-impl.js";
9
-
10
- function routeOptions<T extends RouteImpl>(routeImpl: T, impl: string, path: string): T['options'] {
11
- if (!isRouteImpl(routeImpl)) {
12
- throw new TypeError(`Route implementation "${impl}" for "${path}" must export default defineRoute(...).`);
13
- }
14
- return routeImpl.options;
15
- }
16
-
17
- const skeleton = buildAnchorSkeleton({
18
- navigation: [
19
- {
20
- "id": "projects",
21
- "scope": "workspace",
22
- "label": "Projects",
23
- "to": "/workspaces/$wid/projects/$pid/overview",
24
- "order": 100
25
- },
26
- {
27
- "id": "insights",
28
- "scope": "workspace",
29
- "label": "Insights",
30
- "to": "/workspaces/$wid/insights",
31
- "order": 200
32
- }
33
- ],
34
- settingsSections: [
35
- {
36
- "id": "members",
37
- "pathSegment": "members",
38
- "label": "Members",
39
- "icon": "users",
40
- "order": 100
41
- }
42
- ],
43
- });
44
-
45
- const route0 = createRoute({
46
- getParentRoute: () => skeleton.projectLayout,
47
- path: "/overview",
48
- ...routeOptions(route0Module.default, "#test/search-route-impl.js", "/workspaces/$wid/projects/$pid/overview"),
49
- });
50
-
51
- const route1 = createRoute({
52
- getParentRoute: () => skeleton.workspaceSettings,
53
- path: "/members",
54
- ...routeOptions(route1Module.default, "#test/default-route-impl.js", "/workspaces/$wid/settings/members"),
55
- });
56
-
57
- const route2 = createRoute({
58
- getParentRoute: () => skeleton.workspaceLayout,
59
- path: "/insights",
60
- ...routeOptions(route2Module.default, "#test/named-route-impl.js", "/workspaces/$wid/insights"),
61
- });
62
-
63
- const projectLayout = skeleton.projectLayout.addChildren([route0]);
64
- const workspaceSettings = skeleton.workspaceSettings.addChildren([route1]);
65
- const workspaceLayout = skeleton.workspaceLayout.addChildren([
66
- route2,
67
- projectLayout,
68
- workspaceSettings,
69
- ]);
70
-
71
- export const routeTree = skeleton.rootRoute.addChildren([
72
- workspaceLayout,
73
- ]);
74
-
75
- export const router = createRouter({
76
- routeTree,
77
- context: {auth: undefined, queryClient: undefined} satisfies RouterContext,
78
- scrollRestoration: true,
79
- });
80
-
81
- declare module '@tanstack/react-router' {
82
- interface Register {
83
- router: typeof router;
84
- }
85
- }
@@ -1,23 +0,0 @@
1
- import {getRouteApi, Link, useSearch} from '@tanstack/react-router';
2
- import './shipfox-app.gen.js';
3
-
4
- export function CompositionTypes(): React.ReactNode {
5
- const search = useSearch({from: '/workspaces/$wid/projects/$pid/overview'});
6
- const tab: 'activity' | 'overview' = search.tab;
7
-
8
- getRouteApi('/workspaces/$wid/projects/$pid/overview');
9
-
10
- // @ts-expect-error The generated route tree rejects unknown route ids.
11
- getRouteApi('/not-a-route');
12
-
13
- return (
14
- <>
15
- <Link to="/workspaces/$wid/insights" params={{wid: 'workspace'}}>
16
- Insights
17
- </Link>
18
- <span>{tab}</span>
19
- {/* @ts-expect-error The generated route tree rejects unknown paths. */}
20
- <Link to="/not-a-route">Missing route</Link>
21
- </>
22
- );
23
- }
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "@shipfox/ts-config/react",
3
- "compilerOptions": {
4
- "rootDir": "src",
5
- "outDir": "dist",
6
- "customConditions": ["workspace-source"]
7
- },
8
- "include": ["src"],
9
- "exclude": ["**/*.test.tsx", "**/*.test.ts"]
10
- }