@contractspec/bundle.library 3.9.6 → 3.9.8

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 (153) hide show
  1. package/.turbo/turbo-build.log +238 -230
  2. package/CHANGELOG.md +88 -0
  3. package/dist/components/docs/DocsIndexPage.js +2 -2
  4. package/dist/components/docs/docsManifest.js +1 -1
  5. package/dist/components/docs/getting-started/DataViewTutorialPage.js +40 -4
  6. package/dist/components/docs/getting-started/index.js +46 -10
  7. package/dist/components/docs/guides/GuideContractDrivenFormsPage.content.d.ts +3 -0
  8. package/dist/components/docs/guides/GuideContractDrivenFormsPage.content.js +95 -0
  9. package/dist/components/docs/guides/GuideContractDrivenFormsPage.d.ts +1 -0
  10. package/dist/components/docs/guides/GuideContractDrivenFormsPage.js +95 -0
  11. package/dist/components/docs/guides/GuideSpecValidationTypingPage.js +1 -1
  12. package/dist/components/docs/guides/GuidesIndexPage.js +2 -2
  13. package/dist/components/docs/guides/guides.docblocks.js +3 -1
  14. package/dist/components/docs/guides/index.d.ts +1 -0
  15. package/dist/components/docs/guides/index.js +139 -44
  16. package/dist/components/docs/index.js +586 -266
  17. package/dist/components/docs/libraries/LibrariesApplicationShellPage.content.d.ts +16 -0
  18. package/dist/components/docs/libraries/LibrariesApplicationShellPage.content.js +148 -0
  19. package/dist/components/docs/libraries/LibrariesApplicationShellPage.d.ts +1 -0
  20. package/dist/components/docs/libraries/LibrariesApplicationShellPage.js +148 -0
  21. package/dist/components/docs/libraries/LibrariesDataViewsPage.js +13 -6
  22. package/dist/components/docs/libraries/LibrariesDesignSystemPage.js +3 -3
  23. package/dist/components/docs/libraries/LibrariesOverviewPage.js +1 -1
  24. package/dist/components/docs/libraries/index.d.ts +1 -0
  25. package/dist/components/docs/libraries/index.js +217 -64
  26. package/dist/components/docs/specs/SpecsDataViewsPage.js +37 -1
  27. package/dist/components/docs/specs/index.js +37 -1
  28. package/dist/index.js +597 -277
  29. package/dist/libs/posthog/client.js +1 -1
  30. package/dist/node/components/docs/DocsIndexPage.js +2 -2
  31. package/dist/node/components/docs/docsManifest.js +1 -1
  32. package/dist/node/components/docs/getting-started/DataViewTutorialPage.js +40 -4
  33. package/dist/node/components/docs/getting-started/index.js +46 -10
  34. package/dist/node/components/docs/guides/GuideContractDrivenFormsPage.content.js +94 -0
  35. package/dist/node/components/docs/guides/GuideContractDrivenFormsPage.js +94 -0
  36. package/dist/node/components/docs/guides/GuideSpecValidationTypingPage.js +1 -1
  37. package/dist/node/components/docs/guides/GuidesIndexPage.js +2 -2
  38. package/dist/node/components/docs/guides/guides.docblocks.js +3 -1
  39. package/dist/node/components/docs/guides/index.js +139 -44
  40. package/dist/node/components/docs/index.js +586 -266
  41. package/dist/node/components/docs/libraries/LibrariesApplicationShellPage.content.js +147 -0
  42. package/dist/node/components/docs/libraries/LibrariesApplicationShellPage.js +147 -0
  43. package/dist/node/components/docs/libraries/LibrariesDataViewsPage.js +13 -6
  44. package/dist/node/components/docs/libraries/LibrariesDesignSystemPage.js +3 -3
  45. package/dist/node/components/docs/libraries/LibrariesOverviewPage.js +1 -1
  46. package/dist/node/components/docs/libraries/index.js +217 -64
  47. package/dist/node/components/docs/specs/SpecsDataViewsPage.js +37 -1
  48. package/dist/node/components/docs/specs/index.js +37 -1
  49. package/dist/node/index.js +597 -277
  50. package/dist/node/libs/posthog/client.js +1 -1
  51. package/package.json +71 -23
  52. package/src/components/docs/docsManifest.ts +22 -0
  53. package/src/components/docs/generated/docs-index._common.json +2008 -1699
  54. package/src/components/docs/generated/docs-index.agent-console.json +377 -377
  55. package/src/components/docs/generated/docs-index.ai-chat-assistant.json +17 -17
  56. package/src/components/docs/generated/docs-index.ai-chat.json +105 -105
  57. package/src/components/docs/generated/docs-index.ai-support-bot.json +9 -9
  58. package/src/components/docs/generated/docs-index.analytics-dashboard.json +169 -169
  59. package/src/components/docs/generated/docs-index.app-config.json +137 -137
  60. package/src/components/docs/generated/docs-index.artisan-knowledge-product.json +17 -17
  61. package/src/components/docs/generated/docs-index.artisan-payments-stripe.json +33 -33
  62. package/src/components/docs/generated/docs-index.audit-trail.json +49 -49
  63. package/src/components/docs/generated/docs-index.calendar-google.json +9 -9
  64. package/src/components/docs/generated/docs-index.content-generation.json +9 -9
  65. package/src/components/docs/generated/docs-index.control-plane.json +17 -17
  66. package/src/components/docs/generated/docs-index.crm-pipeline.json +161 -161
  67. package/src/components/docs/generated/docs-index.data-grid-showcase.json +25 -25
  68. package/src/components/docs/generated/docs-index.defineExample.json +9 -9
  69. package/src/components/docs/generated/docs-index.email-gmail.json +9 -9
  70. package/src/components/docs/generated/docs-index.feature-flags.json +217 -217
  71. package/src/components/docs/generated/docs-index.files.json +177 -177
  72. package/src/components/docs/generated/docs-index.generated.ts +20 -20
  73. package/src/components/docs/generated/docs-index.harness-lab.json +9 -9
  74. package/src/components/docs/generated/docs-index.health.json +97 -97
  75. package/src/components/docs/generated/docs-index.identity-rbac.json +313 -313
  76. package/src/components/docs/generated/docs-index.in-app-docs.json +9 -9
  77. package/src/components/docs/generated/docs-index.integration-hub.json +265 -265
  78. package/src/components/docs/generated/docs-index.integration-posthog.json +9 -9
  79. package/src/components/docs/generated/docs-index.integration-stripe.json +9 -9
  80. package/src/components/docs/generated/docs-index.integration-supabase.json +9 -9
  81. package/src/components/docs/generated/docs-index.jobs.json +137 -137
  82. package/src/components/docs/generated/docs-index.kb-update-pipeline.json +129 -129
  83. package/src/components/docs/generated/docs-index.knowledge-canon.json +9 -9
  84. package/src/components/docs/generated/docs-index.learning-journey-ambient-coach.json +9 -9
  85. package/src/components/docs/generated/docs-index.learning-journey-crm-onboarding.json +49 -49
  86. package/src/components/docs/generated/docs-index.learning-journey-duo-drills.json +9 -9
  87. package/src/components/docs/generated/docs-index.learning-journey-platform-tour.json +49 -49
  88. package/src/components/docs/generated/docs-index.learning-journey-quest-challenges.json +9 -9
  89. package/src/components/docs/generated/docs-index.learning-journey-registry.json +33 -33
  90. package/src/components/docs/generated/docs-index.learning-journey-studio-onboarding.json +49 -49
  91. package/src/components/docs/generated/docs-index.learning-journey-ui-coaching.json +9 -9
  92. package/src/components/docs/generated/docs-index.learning-journey-ui-gamified.json +9 -9
  93. package/src/components/docs/generated/docs-index.learning-journey-ui-onboarding.json +9 -9
  94. package/src/components/docs/generated/docs-index.learning-journey-ui-shared.json +9 -9
  95. package/src/components/docs/generated/docs-index.learning-journey.json +241 -241
  96. package/src/components/docs/generated/docs-index.learning-patterns.json +9 -9
  97. package/src/components/docs/generated/docs-index.lifecycle-cli.json +9 -9
  98. package/src/components/docs/generated/docs-index.lifecycle-dashboard.json +9 -9
  99. package/src/components/docs/generated/docs-index.locale-jurisdiction-gate.json +65 -65
  100. package/src/components/docs/generated/docs-index.marketplace.json +337 -337
  101. package/src/components/docs/generated/docs-index.meeting-recorder-providers.json +9 -9
  102. package/src/components/docs/generated/docs-index.meeting-recorder.json +49 -49
  103. package/src/components/docs/generated/docs-index.messaging-agent-actions.json +17 -17
  104. package/src/components/docs/generated/docs-index.metrics.json +201 -201
  105. package/src/components/docs/generated/docs-index.minimal.json +17 -17
  106. package/src/components/docs/generated/docs-index.mobile-demo-landing.json +41 -41
  107. package/src/components/docs/generated/docs-index.notifications.json +65 -65
  108. package/src/components/docs/generated/docs-index.openbanking-powens.json +9 -9
  109. package/src/components/docs/generated/docs-index.openbanking.json +65 -65
  110. package/src/components/docs/generated/docs-index.opencode-cli.json +17 -17
  111. package/src/components/docs/generated/docs-index.personalization.json +9 -9
  112. package/src/components/docs/generated/docs-index.platform-acp.json +137 -137
  113. package/src/components/docs/generated/docs-index.platform-agent.json +201 -201
  114. package/src/components/docs/generated/docs-index.platform-context.json +121 -121
  115. package/src/components/docs/generated/docs-index.platform-control-plane.json +321 -321
  116. package/src/components/docs/generated/docs-index.platform-database.json +89 -89
  117. package/src/components/docs/generated/docs-index.platform-docs.json +161 -161
  118. package/src/components/docs/generated/docs-index.platform-harness.json +177 -177
  119. package/src/components/docs/generated/docs-index.platform-integrations.json +329 -329
  120. package/src/components/docs/generated/docs-index.platform-knowledge.json +57 -57
  121. package/src/components/docs/generated/docs-index.platform-provider-ranking.json +217 -217
  122. package/src/components/docs/generated/docs-index.pocket-family-office.json +129 -129
  123. package/src/components/docs/generated/docs-index.policy-safe-knowledge-assistant.json +9 -9
  124. package/src/components/docs/generated/docs-index.product-intent.json +9 -9
  125. package/src/components/docs/generated/docs-index.project-management-sync.json +9 -9
  126. package/src/components/docs/generated/docs-index.saas-boilerplate.json +209 -209
  127. package/src/components/docs/generated/docs-index.service-business-os.json +193 -193
  128. package/src/components/docs/generated/docs-index.team-hub.json +185 -185
  129. package/src/components/docs/generated/docs-index.unknown.json +521 -521
  130. package/src/components/docs/generated/docs-index.versioned-knowledge-base.json +81 -81
  131. package/src/components/docs/generated/docs-index.video-api-showcase.json +33 -33
  132. package/src/components/docs/generated/docs-index.video-docs-terminal.json +9 -9
  133. package/src/components/docs/generated/docs-index.video-marketing-clip.json +9 -9
  134. package/src/components/docs/generated/docs-index.visualization-showcase.json +17 -17
  135. package/src/components/docs/generated/docs-index.voice-providers.json +9 -9
  136. package/src/components/docs/generated/docs-index.wealth-snapshot.json +153 -153
  137. package/src/components/docs/generated/docs-index.workflow-system.json +433 -433
  138. package/src/components/docs/generated/docs-index.workspace-cli.json +9 -9
  139. package/src/components/docs/getting-started/DataViewTutorialPage.tsx +40 -1
  140. package/src/components/docs/guides/GuideContractDrivenFormsPage.content.ts +98 -0
  141. package/src/components/docs/guides/GuideContractDrivenFormsPage.tsx +143 -0
  142. package/src/components/docs/guides/GuideSpecValidationTypingPage.tsx +2 -2
  143. package/src/components/docs/guides/GuidesIndexPage.tsx +7 -0
  144. package/src/components/docs/guides/guides.docblocks.ts +12 -0
  145. package/src/components/docs/guides/index.ts +1 -0
  146. package/src/components/docs/libraries/LibrariesApplicationShellPage.content.ts +170 -0
  147. package/src/components/docs/libraries/LibrariesApplicationShellPage.tsx +112 -0
  148. package/src/components/docs/libraries/LibrariesDataViewsPage.tsx +26 -5
  149. package/src/components/docs/libraries/LibrariesDesignSystemPage.tsx +9 -0
  150. package/src/components/docs/libraries/LibrariesOverviewPage.tsx +6 -0
  151. package/src/components/docs/libraries/index.ts +1 -0
  152. package/src/components/docs/specs/SpecsDataViewsPage.tsx +39 -3
  153. package/src/libs/posthog/client.ts +11 -9
@@ -0,0 +1,147 @@
1
+ var n=Object.defineProperty;var o=(e)=>e;function i(e,t){this[e]=o.bind(null,t)}var s=(e,t)=>{for(var a in t)n(e,a,{get:t[a],enumerable:!0,configurable:!0,set:i.bind(t,a)})};var r=(e,t)=>()=>(e&&(t=e(e=0)),t);var c=`import {
2
+ AppShell,
3
+ PageOutline,
4
+ type AppShellNavigationSection,
5
+ type PageOutlineItem,
6
+ } from "@contractspec/lib.design-system/shell";
7
+
8
+ const navigation: AppShellNavigationSection[] = [
9
+ {
10
+ title: "Workspace",
11
+ items: [
12
+ { label: "Dashboard", href: "/dashboard" },
13
+ {
14
+ label: "Contracts",
15
+ href: "/contracts",
16
+ children: [
17
+ { label: "Operations", href: "/contracts/operations" },
18
+ { label: "Events", href: "/contracts/events" },
19
+ ],
20
+ },
21
+ ],
22
+ },
23
+ ];
24
+
25
+ const outline: PageOutlineItem[] = [
26
+ {
27
+ id: "architecture",
28
+ label: "Architecture",
29
+ level: 1,
30
+ children: [
31
+ { id: "desktop", label: "Desktop shell", level: 2 },
32
+ { id: "mobile", label: "Mobile adaptation", level: 2 },
33
+ ],
34
+ },
35
+ ];
36
+
37
+ export function WorkspacePage() {
38
+ return (
39
+ <AppShell
40
+ brand={{ label: "ContractSpec", href: "/dashboard" }}
41
+ navigation={navigation}
42
+ breadcrumbs={[
43
+ { label: "Workspace", href: "/dashboard" },
44
+ { label: "Contracts" },
45
+ ]}
46
+ command={{
47
+ placeholder: "Search contracts or run an action",
48
+ groups: [
49
+ {
50
+ title: "Quick actions",
51
+ actions: [
52
+ { id: "new-contract", label: "New contract" },
53
+ { id: "import", label: "Import existing app" },
54
+ ],
55
+ },
56
+ ],
57
+ }}
58
+ user={{
59
+ name: "Ada Lovelace",
60
+ email: "ada@example.com",
61
+ actions: [{ label: "Sign out", onSelect: () => signOut() }],
62
+ }}
63
+ pageOutline={<PageOutline items={outline} activeId="desktop" />}
64
+ >
65
+ <main>{/* route content */}</main>
66
+ </AppShell>
67
+ );
68
+ }`,d=`You are implementing a modern application shell from scratch.
69
+
70
+ Goal:
71
+ Build a reusable application shell for a React/Next.js web app and an Expo React Native app. The shell must provide a desktop sidebar, desktop topbar, command search, breadcrumbs, nested navigation, user/auth actions, and an in-page section navigator called PageOutline.
72
+
73
+ Use this architecture:
74
+ - Keep route content independent from navigation chrome.
75
+ - Create a typed navigation model with sections, items, active state, optional children, badges, icons, disabled items, and href/onSelect support.
76
+ - Create a command model with search input, grouped suggestions, quick actions, keyboard shortcut labels, empty state, and loading state.
77
+ - Create a breadcrumb model for the topbar.
78
+ - Create a PageOutline model for right-side in-page navigation with exactly three supported levels. It should render anchors, support active section state, and degrade gracefully when no sections exist.
79
+ - Expose the system from the design system or a dedicated shell module, not from a single app route.
80
+
81
+ Desktop behavior:
82
+ - Persistent left sidebar with app logo/title, command trigger, grouped navigation, nested submenus, and current user/auth/logout area.
83
+ - Topbar with breadcrumbs and an optional command trigger.
84
+ - Content area with optional right PageOutline.
85
+ - Keep dimensions stable. Navigation labels must not resize layout on hover or active state.
86
+
87
+ Mobile web behavior:
88
+ - Use bottom navigation for the primary destinations.
89
+ - Put deeper navigation, command search, auth actions, and secondary actions behind a menu or drawer.
90
+ - Keep route content first and make the shell controls reachable without covering important content.
91
+
92
+ Native behavior:
93
+ - Add .native.tsx entrypoints for Expo/React Native.
94
+ - Prefer bottom tabs for primary destinations and a menu/sheet for deeper navigation and account actions.
95
+ - Keep the same typed navigation, command, breadcrumb, and PageOutline data contracts across web and native.
96
+
97
+ Implementation constraints:
98
+ - Reuse the existing design-system primitives, tokens, icons, and accessibility patterns.
99
+ - Do not hardcode app-specific routes in the shell component.
100
+ - Do not introduce a new dependency unless the repo already uses it for dialogs, menus, icons, or navigation.
101
+ - Include tests for navigation rendering, nested items, command filtering, breadcrumbs, PageOutline level handling, active section state, and mobile/native adaptation contracts.
102
+ - Update docs and exports so developers can import the shell from a stable public API.
103
+
104
+ Deliverables:
105
+ - Typed shell models.
106
+ - Web shell components.
107
+ - Native shell components or adapters.
108
+ - PageOutline component with three-level support.
109
+ - Usage example.
110
+ - Focused tests and typecheck/build evidence.`,p=`You are refactoring an existing application to use the shared application shell system.
111
+
112
+ Goal:
113
+ Replace app-specific sidebar, topbar, breadcrumb, command palette, account menu, mobile navigation, and in-page table-of-contents code with the shared AppShell and PageOutline system.
114
+
115
+ Start by auditing:
116
+ - Current layout wrappers and route groups.
117
+ - Sidebar, topbar, breadcrumb, command/search, auth menu, and mobile navigation implementations.
118
+ - Any duplicated navigation arrays, route labels, icon maps, access-control checks, and active-state logic.
119
+ - Any in-page summary/table-of-contents components that should become PageOutline data.
120
+ - Web-only assumptions that would block Expo/React Native adaptation.
121
+
122
+ Refactor plan:
123
+ 1. Define a single typed navigation source for primary nav, grouped sidebar nav, nested children, labels, icons, badges, disabled states, and permissions.
124
+ 2. Map existing command/search behavior into grouped command actions with search text and quick actions.
125
+ 3. Map existing route metadata into breadcrumbs.
126
+ 4. Convert page table-of-contents or section summary data into PageOutline items with a maximum of three levels.
127
+ 5. Wrap app routes in AppShell while keeping page content components route-local.
128
+ 6. Move primary mobile destinations into bottom navigation and deeper/account actions into a menu or drawer.
129
+ 7. Add or preserve .native.tsx adapters when the app targets Expo.
130
+
131
+ Preserve behavior:
132
+ - Existing route URLs and access rules.
133
+ - Existing keyboard shortcuts where they are public behavior.
134
+ - Existing analytics or telemetry events on navigation and command actions.
135
+ - Existing auth/logout behavior.
136
+ - Existing responsive breakpoints unless there is a documented design-system breakpoint to adopt.
137
+
138
+ Quality gates:
139
+ - Add regression tests around current visible navigation before removing old shell code when coverage is missing.
140
+ - Test active nav state, nested nav expansion, command search/action invocation, breadcrumbs, auth menu, mobile bottom navigation, and PageOutline anchor behavior.
141
+ - Run lint, typecheck, and the app's relevant test/build command.
142
+ - Remove dead app-specific shell components only after the shared shell path is verified.
143
+
144
+ Output:
145
+ - List old shell files removed or simplified.
146
+ - List new shared shell integration points.
147
+ - Include before/after route coverage and verification commands.`,m=[{title:"Sidebar",body:"Desktop owns brand, command entry, grouped navigation, nested items, and account actions in one persistent scanning area."},{title:"Topbar",body:"Breadcrumbs stay visible while the current route changes. The command trigger can live here when the sidebar is collapsed or hidden."},{title:"PageOutline",body:"The right-side in-page navigator replaces ad hoc tables of contents. It supports three levels of section anchors and active state."},{title:"Mobile adapters",body:"Small web and native surfaces move primary destinations to bottom navigation and reserve drawers or menus for deep navigation and account actions."}];export{c as shellUsageExample,m as shellParts,d as scratchPrompt,p as refactorPrompt};
@@ -0,0 +1,147 @@
1
+ var v=Object.defineProperty;var f=(t)=>t;function y(t,n){this[t]=f.bind(null,n)}var k=(t,n)=>{for(var s in n)v(t,s,{get:n[s],enumerable:!0,configurable:!0,set:y.bind(n,s)})};var N=(t,n)=>()=>(t&&(n=t(t=0)),n);var d=`import {
2
+ AppShell,
3
+ PageOutline,
4
+ type AppShellNavigationSection,
5
+ type PageOutlineItem,
6
+ } from "@contractspec/lib.design-system/shell";
7
+
8
+ const navigation: AppShellNavigationSection[] = [
9
+ {
10
+ title: "Workspace",
11
+ items: [
12
+ { label: "Dashboard", href: "/dashboard" },
13
+ {
14
+ label: "Contracts",
15
+ href: "/contracts",
16
+ children: [
17
+ { label: "Operations", href: "/contracts/operations" },
18
+ { label: "Events", href: "/contracts/events" },
19
+ ],
20
+ },
21
+ ],
22
+ },
23
+ ];
24
+
25
+ const outline: PageOutlineItem[] = [
26
+ {
27
+ id: "architecture",
28
+ label: "Architecture",
29
+ level: 1,
30
+ children: [
31
+ { id: "desktop", label: "Desktop shell", level: 2 },
32
+ { id: "mobile", label: "Mobile adaptation", level: 2 },
33
+ ],
34
+ },
35
+ ];
36
+
37
+ export function WorkspacePage() {
38
+ return (
39
+ <AppShell
40
+ brand={{ label: "ContractSpec", href: "/dashboard" }}
41
+ navigation={navigation}
42
+ breadcrumbs={[
43
+ { label: "Workspace", href: "/dashboard" },
44
+ { label: "Contracts" },
45
+ ]}
46
+ command={{
47
+ placeholder: "Search contracts or run an action",
48
+ groups: [
49
+ {
50
+ title: "Quick actions",
51
+ actions: [
52
+ { id: "new-contract", label: "New contract" },
53
+ { id: "import", label: "Import existing app" },
54
+ ],
55
+ },
56
+ ],
57
+ }}
58
+ user={{
59
+ name: "Ada Lovelace",
60
+ email: "ada@example.com",
61
+ actions: [{ label: "Sign out", onSelect: () => signOut() }],
62
+ }}
63
+ pageOutline={<PageOutline items={outline} activeId="desktop" />}
64
+ >
65
+ <main>{/* route content */}</main>
66
+ </AppShell>
67
+ );
68
+ }`,p=`You are implementing a modern application shell from scratch.
69
+
70
+ Goal:
71
+ Build a reusable application shell for a React/Next.js web app and an Expo React Native app. The shell must provide a desktop sidebar, desktop topbar, command search, breadcrumbs, nested navigation, user/auth actions, and an in-page section navigator called PageOutline.
72
+
73
+ Use this architecture:
74
+ - Keep route content independent from navigation chrome.
75
+ - Create a typed navigation model with sections, items, active state, optional children, badges, icons, disabled items, and href/onSelect support.
76
+ - Create a command model with search input, grouped suggestions, quick actions, keyboard shortcut labels, empty state, and loading state.
77
+ - Create a breadcrumb model for the topbar.
78
+ - Create a PageOutline model for right-side in-page navigation with exactly three supported levels. It should render anchors, support active section state, and degrade gracefully when no sections exist.
79
+ - Expose the system from the design system or a dedicated shell module, not from a single app route.
80
+
81
+ Desktop behavior:
82
+ - Persistent left sidebar with app logo/title, command trigger, grouped navigation, nested submenus, and current user/auth/logout area.
83
+ - Topbar with breadcrumbs and an optional command trigger.
84
+ - Content area with optional right PageOutline.
85
+ - Keep dimensions stable. Navigation labels must not resize layout on hover or active state.
86
+
87
+ Mobile web behavior:
88
+ - Use bottom navigation for the primary destinations.
89
+ - Put deeper navigation, command search, auth actions, and secondary actions behind a menu or drawer.
90
+ - Keep route content first and make the shell controls reachable without covering important content.
91
+
92
+ Native behavior:
93
+ - Add .native.tsx entrypoints for Expo/React Native.
94
+ - Prefer bottom tabs for primary destinations and a menu/sheet for deeper navigation and account actions.
95
+ - Keep the same typed navigation, command, breadcrumb, and PageOutline data contracts across web and native.
96
+
97
+ Implementation constraints:
98
+ - Reuse the existing design-system primitives, tokens, icons, and accessibility patterns.
99
+ - Do not hardcode app-specific routes in the shell component.
100
+ - Do not introduce a new dependency unless the repo already uses it for dialogs, menus, icons, or navigation.
101
+ - Include tests for navigation rendering, nested items, command filtering, breadcrumbs, PageOutline level handling, active section state, and mobile/native adaptation contracts.
102
+ - Update docs and exports so developers can import the shell from a stable public API.
103
+
104
+ Deliverables:
105
+ - Typed shell models.
106
+ - Web shell components.
107
+ - Native shell components or adapters.
108
+ - PageOutline component with three-level support.
109
+ - Usage example.
110
+ - Focused tests and typecheck/build evidence.`,m=`You are refactoring an existing application to use the shared application shell system.
111
+
112
+ Goal:
113
+ Replace app-specific sidebar, topbar, breadcrumb, command palette, account menu, mobile navigation, and in-page table-of-contents code with the shared AppShell and PageOutline system.
114
+
115
+ Start by auditing:
116
+ - Current layout wrappers and route groups.
117
+ - Sidebar, topbar, breadcrumb, command/search, auth menu, and mobile navigation implementations.
118
+ - Any duplicated navigation arrays, route labels, icon maps, access-control checks, and active-state logic.
119
+ - Any in-page summary/table-of-contents components that should become PageOutline data.
120
+ - Web-only assumptions that would block Expo/React Native adaptation.
121
+
122
+ Refactor plan:
123
+ 1. Define a single typed navigation source for primary nav, grouped sidebar nav, nested children, labels, icons, badges, disabled states, and permissions.
124
+ 2. Map existing command/search behavior into grouped command actions with search text and quick actions.
125
+ 3. Map existing route metadata into breadcrumbs.
126
+ 4. Convert page table-of-contents or section summary data into PageOutline items with a maximum of three levels.
127
+ 5. Wrap app routes in AppShell while keeping page content components route-local.
128
+ 6. Move primary mobile destinations into bottom navigation and deeper/account actions into a menu or drawer.
129
+ 7. Add or preserve .native.tsx adapters when the app targets Expo.
130
+
131
+ Preserve behavior:
132
+ - Existing route URLs and access rules.
133
+ - Existing keyboard shortcuts where they are public behavior.
134
+ - Existing analytics or telemetry events on navigation and command actions.
135
+ - Existing auth/logout behavior.
136
+ - Existing responsive breakpoints unless there is a documented design-system breakpoint to adopt.
137
+
138
+ Quality gates:
139
+ - Add regression tests around current visible navigation before removing old shell code when coverage is missing.
140
+ - Test active nav state, nested nav expansion, command search/action invocation, breadcrumbs, auth menu, mobile bottom navigation, and PageOutline anchor behavior.
141
+ - Run lint, typecheck, and the app's relevant test/build command.
142
+ - Remove dead app-specific shell components only after the shared shell path is verified.
143
+
144
+ Output:
145
+ - List old shell files removed or simplified.
146
+ - List new shared shell integration points.
147
+ - Include before/after route coverage and verification commands.`,u=[{title:"Sidebar",body:"Desktop owns brand, command entry, grouped navigation, nested items, and account actions in one persistent scanning area."},{title:"Topbar",body:"Breadcrumbs stay visible while the current route changes. The command trigger can live here when the sidebar is collapsed or hidden."},{title:"PageOutline",body:"The right-side in-page navigator replaces ad hoc tables of contents. It supports three levels of section anchors and active state."},{title:"Mobile adapters",body:"Small web and native surfaces move primary destinations to bottom navigation and reserve drawers or menus for deep navigation and account actions."}];import{CodeBlock as l,InstallCommand as w}from"@contractspec/lib.design-system";import{Box as h,HStack as O,VStack as o}from"@contractspec/lib.design-system/layout";import{Code as c,H1 as A,H2 as i,H3 as P,P as r,Text as b}from"@contractspec/lib.design-system/typography";import g from"@contractspec/lib.ui-link";import{ChevronRight as E}from"lucide-react";import{jsx as e,jsxs as a}from"react/jsx-runtime";function K(){return a(o,{className:"space-y-8",children:[a(o,{className:"space-y-4",children:[e(A,{className:"font-bold text-4xl",children:"Application shell"}),a(r,{className:"text-lg text-muted-foreground",children:["A reusable navigation system for product apps: desktop sidebar, topbar breadcrumbs, command search, account actions, mobile adapters, and a Notion-style ",e(c,{children:"PageOutline"})," for page sections."]})]}),a(o,{className:"space-y-4",children:[e(i,{className:"font-bold text-2xl",children:"Installation"}),e(w,{package:"@contractspec/lib.design-system"})]}),a(o,{className:"space-y-4",children:[e(i,{className:"font-bold text-2xl",children:"What It Standardizes"}),e(h,{className:"grid gap-4 md:grid-cols-2",children:u.map((t)=>a(h,{className:"card-subtle p-4",children:[e(P,{className:"font-semibold",children:t.title}),e(r,{className:"mt-2 text-muted-foreground text-sm leading-7",children:t.body})]},t.title))})]}),a(o,{className:"space-y-4",children:[e(i,{className:"font-bold text-2xl",children:"Import Surface"}),e(r,{className:"text-muted-foreground",children:"The shell is exposed as a focused design-system subpath so apps can adopt navigation chrome without pulling unrelated documentation or marketing helpers."}),e(l,{language:"tsx",filename:"app-shell-example.tsx",code:d})]}),a(o,{className:"space-y-4",children:[e(i,{className:"font-bold text-2xl",children:"AI Prompt: Build From Scratch"}),e(r,{className:"text-muted-foreground",children:"Use this prompt when the app does not already have a shell or when the design-system package needs the reusable primitive first."}),e(l,{language:"markdown",filename:"implement-application-shell.md",code:p})]}),a(o,{className:"space-y-4",children:[e(i,{className:"font-bold text-2xl",children:"AI Prompt: Refactor An App"}),e(r,{className:"text-muted-foreground",children:"Use this prompt when an app already has custom navigation chrome and needs to migrate without breaking route behavior."}),e(l,{language:"markdown",filename:"refactor-to-application-shell.md",code:m})]}),a(o,{className:"card-subtle space-y-3 p-6",children:[e(i,{className:"font-bold text-2xl",children:"Naming"}),a(r,{className:"text-muted-foreground",children:["Use ",e(c,{children:"AppShell"})," for the whole navigation frame and"," ",e(c,{children:"PageOutline"})," for the in-page navigation helper. The latter is the product-app equivalent of a table of contents, but it is intentionally named for live page sections rather than static documentation."]})]}),a(O,{className:"flex flex-wrap items-center gap-3 pt-2",children:[e(g,{href:"/docs/libraries/cross-platform-ui",className:"btn-ghost",children:e(b,{children:"Cross-platform UI"})}),a(g,{href:"/docs/libraries/design-system",className:"btn-primary",children:[e(b,{children:"Design System"})," ",e(E,{size:16})]})]})]})}export{K as LibrariesApplicationShellPage};
@@ -1,4 +1,4 @@
1
- var n=Object.defineProperty;var l=(t)=>t;function d(t,i){this[t]=l.bind(null,i)}var m=(t,i)=>{for(var o in i)n(t,o,{get:i[o],enumerable:!0,configurable:!0,set:d.bind(i,o)})};var g=(t,i)=>()=>(t&&(i=t(t=0)),i);import{CodeBlock as r,InstallCommand as s}from"@contractspec/lib.design-system";import c from"@contractspec/lib.ui-link";import{ChevronRight as p}from"lucide-react";import{jsx as e,jsxs as a}from"react/jsx-runtime";function b(){return a("div",{className:"space-y-8",children:[a("div",{className:"space-y-4",children:[e("h1",{className:"font-bold text-4xl",children:"DataViews Runtime Library"}),a("p",{className:"text-lg text-muted-foreground",children:["The ",e("code",{children:"@contractspec/lib.contracts-spec/data-views"})," and"," ",e("code",{children:"@contractspec/lib.design-system"})," libraries provide the runtime logic and UI components to render DataViews in your application."]})]}),a("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Installation"}),e(s,{package:["@contractspec/lib.contracts-spec","@contractspec/lib.design-system"]})]}),a("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"DataViewRenderer"}),e("p",{className:"text-muted-foreground",children:"The primary component for rendering any DataView. It automatically selects the correct layout (List, Table, Grid, Detail) based on the spec."}),e(r,{language:"tsx",code:`import { DataViewRenderer } from '@contractspec/lib.design-system';
1
+ var n=Object.defineProperty;var d=(t)=>t;function l(t,o){this[t]=d.bind(null,o)}var m=(t,o)=>{for(var i in o)n(t,i,{get:o[i],enumerable:!0,configurable:!0,set:l.bind(o,i)})};var g=(t,o)=>()=>(t&&(o=t(t=0)),o);import{CodeBlock as r,InstallCommand as s}from"@contractspec/lib.design-system";import c from"@contractspec/lib.ui-link";import{ChevronRight as p}from"lucide-react";import{jsx as e,jsxs as a}from"react/jsx-runtime";function b(){return a("div",{className:"space-y-8",children:[a("div",{className:"space-y-4",children:[e("h1",{className:"font-bold text-4xl",children:"DataViews Runtime Library"}),a("p",{className:"text-lg text-muted-foreground",children:["The ",e("code",{children:"@contractspec/lib.contracts-spec/data-views"})," and"," ",e("code",{children:"@contractspec/lib.design-system"})," libraries provide the runtime logic and UI components to render DataViews in your application."]})]}),a("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Installation"}),e(s,{package:["@contractspec/lib.contracts-spec","@contractspec/lib.design-system"]})]}),a("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"DataViewRenderer"}),e("p",{className:"text-muted-foreground",children:"The primary component for rendering any DataView. It automatically selects the correct layout (List, Table, Grid, Detail) based on the spec."}),e(r,{language:"tsx",code:`import { DataViewRenderer } from '@contractspec/lib.design-system';
2
2
  import { MyUserList } from './specs/users.data-view';
3
3
 
4
4
  export function UserPage() {
@@ -10,12 +10,19 @@ export function UserPage() {
10
10
  onPageChange={(page) => fetchPage(page)}
11
11
  />
12
12
  );
13
- }`}),e("h3",{className:"font-semibold text-xl",children:"Props"}),a("ul",{className:"list-disc space-y-2 pl-6 text-muted-foreground",children:[a("li",{children:[e("code",{children:"spec"}),": The DataViewSpec definition."]}),a("li",{children:[e("code",{children:"items"}),": Array of data items to render."]}),a("li",{children:[e("code",{children:"filters"}),": Current filter state object."]}),a("li",{children:[e("code",{children:"onFilterChange"}),": Callback when filters change."]}),a("li",{children:[e("code",{children:"pagination"}),": Object with ",e("code",{children:"page"}),","," ",e("code",{children:"pageSize"}),", ",e("code",{children:"total"}),"."]}),a("li",{children:[e("code",{children:"onPageChange"}),": Callback when page changes."]})]})]}),a("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Query Generation"}),a("p",{className:"text-muted-foreground",children:["The ",e("code",{children:"DataViewQueryGenerator"})," utility helps translate DataView parameters (filters, sorting, pagination) into query arguments for your backend."]}),e(r,{language:"typescript",code:`import { DataViewQueryGenerator } from '@contractspec/lib.contracts-spec/data-views/query-generator';
13
+ }`}),e("h3",{className:"font-semibold text-xl",children:"Props"}),a("ul",{className:"list-disc space-y-2 pl-6 text-muted-foreground",children:[a("li",{children:[e("code",{children:"spec"}),": The DataViewSpec definition."]}),a("li",{children:[e("code",{children:"items"}),": Array of data items to render."]}),a("li",{children:[e("code",{children:"filters"}),": Current filter state object."]}),a("li",{children:[e("code",{children:"onFilterChange"}),": Callback when typed filters change. Renderers emit ",e("code",{children:"DataViewFilterValue"})," objects for numeric, percent, currency, temporal, duration, and boolean filters."]}),a("li",{children:[e("code",{children:"pagination"}),": Object with ",e("code",{children:"page"}),","," ",e("code",{children:"pageSize"}),", ",e("code",{children:"total"}),"."]}),a("li",{children:[e("code",{children:"onPageChange"}),": Callback when page changes."]}),a("li",{children:[e("code",{children:"viewMode"})," / ",e("code",{children:"defaultViewMode"}),": Controlled or initial collection mode for specs that allow ",e("code",{children:"list"}),","," ",e("code",{children:"grid"}),", or ",e("code",{children:"table"})," projections through"," ",e("code",{children:"view.collection.viewModes"}),"."]}),a("li",{children:[e("code",{children:"density"})," / ",e("code",{children:"defaultDensity"}),": Controlled or initial density for collection renderers, seeded by"," ",e("code",{children:"view.collection.density"})," and table"," ",e("code",{children:"view.density"}),"."]})]})]}),a("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Query Generation"}),a("p",{className:"text-muted-foreground",children:["The ",e("code",{children:"DataViewQueryGenerator"})," utility helps translate DataView parameters (filters, sorting, pagination) into query arguments for your backend."]}),e(r,{language:"typescript",code:`import { DataViewQueryGenerator } from '@contractspec/lib.contracts-spec/data-views/query-generator';
14
14
 
15
15
  const generator = new DataViewQueryGenerator(MyUserList);
16
- const query = generator.generate({
16
+ const params = {
17
17
  pagination: { page: 1, pageSize: 20 },
18
- filters: { role: 'admin' }
19
- });
18
+ filters: {
19
+ role: { kind: 'single', value: 'admin' },
20
+ revenue: { kind: 'range', from: 1000, to: 5000 },
21
+ lastSeenAt: { kind: 'single', value: '2026-04-28T08:30:00Z' }
22
+ }
23
+ };
20
24
 
21
- // query.input contains { skip: 0, take: 20, role: 'admin' }`})]}),a("div",{className:"flex items-center gap-4 pt-4",children:[e(c,{href:"/docs/libraries",className:"btn-ghost",children:"Back to Libraries"}),a(c,{href:"/docs/libraries/data-backend",className:"btn-primary",children:["Next: Data & Backend ",e(p,{size:16})]})]})]})}export{b as LibrariesDataViewsPage};
25
+ const errors = generator.validateParams(params);
26
+ const query = generator.generate(params);
27
+
28
+ // query.input contains skip/take plus the typed filter payloads.`})]}),a("div",{className:"flex items-center gap-4 pt-4",children:[e(c,{href:"/docs/libraries",className:"btn-ghost",children:"Back to Libraries"}),a(c,{href:"/docs/libraries/data-backend",className:"btn-primary",children:["Next: Data & Backend ",e(p,{size:16})]})]})]})}export{b as LibrariesDataViewsPage};
@@ -1,4 +1,4 @@
1
- var s=Object.defineProperty;var n=(a)=>a;function c(a,o){this[a]=n.bind(null,o)}var h=(a,o)=>{for(var r in o)s(a,r,{get:o[r],enumerable:!0,configurable:!0,set:c.bind(o,r)})};var f=(a,o)=>()=>(a&&(o=a(a=0)),o);import{CodeBlock as l,InstallCommand as d}from"@contractspec/lib.design-system";import i from"@contractspec/lib.ui-link";import{ChevronRight as m}from"lucide-react";import{jsx as e,jsxs as t}from"react/jsx-runtime";var p=`import { Button, DataTable } from '@contractspec/lib.design-system';
1
+ var s=Object.defineProperty;var n=(a)=>a;function c(a,o){this[a]=n.bind(null,o)}var g=(a,o)=>{for(var l in o)s(a,l,{get:o[l],enumerable:!0,configurable:!0,set:c.bind(o,l)})};var f=(a,o)=>()=>(a&&(o=a(a=0)),o);import{CodeBlock as r,InstallCommand as d}from"@contractspec/lib.design-system";import i from"@contractspec/lib.ui-link";import{ChevronRight as m}from"lucide-react";import{jsx as e,jsxs as t}from"react/jsx-runtime";var p=`import { Button, DataTable } from '@contractspec/lib.design-system';
2
2
  import { useContractTable } from '@contractspec/lib.presentation-runtime-react';
3
3
 
4
4
  import { SHOWCASE_ROWS } from '@contractspec/example.data-grid-showcase/ui/data-grid-showcase.data';
@@ -76,10 +76,10 @@ export function TenantSurface({ children }: { children: React.ReactNode }) {
76
76
  {children}
77
77
  </DesignSystemThemeProvider>
78
78
  );
79
- }`,g=`import { themeSpecToTailwindPreset } from '@contractspec/lib.design-system/theme';
79
+ }`,h=`import { themeSpecToTailwindPreset } from '@contractspec/lib.design-system/theme';
80
80
  import { Select } from '@contractspec/lib.design-system/controls';
81
81
  import { FormDialog } from '@contractspec/lib.design-system/forms';
82
82
  import { HStack } from '@contractspec/lib.design-system/layout';
83
83
 
84
84
  // Root imports remain supported:
85
- import { Button, DataTable } from '@contractspec/lib.design-system';`;function T(){return t("div",{className:"space-y-8",children:[t("div",{className:"space-y-4",children:[e("h1",{className:"font-bold text-4xl",children:"@contractspec/lib.design-system"}),t("p",{className:"text-muted-foreground",children:["High-level design system components, patterns, and layouts for LSSM applications. Built on top of ",e("code",{children:"@contractspec/lib.ui-kit"}),"."]})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Installation"}),e(d,{package:"@contractspec/lib.design-system"})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"What It Provides"}),t("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[t("li",{children:[e("strong",{children:"Composite Components"}),": Molecules and Organisms that solve common UI problems"]}),t("li",{children:[e("strong",{children:"Layouts"}),": Ready-to-use page structures for dashboards, marketing sites, and lists"]}),t("li",{children:[e("strong",{children:"Data Views"}),": Standardized renderers for lists, tables, and detail views"]}),t("li",{children:[e("strong",{children:"Forms"}),": Zod-integrated form layouts and components"]}),t("li",{children:[e("strong",{children:"Code Display"}),": Syntax-highlighted code blocks with package manager tabs"]}),t("li",{children:[e("strong",{children:"Platform Utilities"}),": Hooks for responsive and adaptive design"]}),t("li",{children:[e("strong",{children:"Theme Bridge"}),": ThemeSpec to Tailwind variables, presets, CSS text, and runtime light/dark mode"]}),t("li",{children:[e("strong",{children:"Legal Templates"}),": Compliant templates for Terms, Privacy, and GDPR"]})]})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"ThemeSpec to Tailwind"}),t("p",{className:"text-muted-foreground",children:["The theme bridge keeps ",e("code",{children:"ThemeSpec"})," as the source of truth and exposes no-generation Tailwind helpers, optional CSS text serialization, runtime CSS variables, light/dark modes, and OKLCH color pass-through."]}),e(l,{language:"tsx",code:u})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Focused import surfaces"}),e("p",{className:"text-muted-foreground",children:"New code can use focused subpaths for theme, controls, forms, and layout while existing root imports remain compatible."}),e(l,{language:"tsx",code:g})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Data table example"}),t("p",{className:"text-muted-foreground",children:["This is the composed lane from the canonical"," ",e(i,{href:"/docs/examples/data-grid-showcase",className:"text-[color:var(--rust)] underline underline-offset-4",children:"Data Grid Showcase"}),". The design-system wrapper owns title, description, header actions, and the opinionated card shell on top of the raw web primitive."]}),e(l,{language:"tsx",code:p})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Key Exports"}),t("div",{className:"grid gap-4 md:grid-cols-2",children:[t("div",{className:"card-subtle p-4",children:[e("h3",{className:"mb-2 font-semibold",children:"Organisms"}),t("ul",{className:"space-y-1 text-muted-foreground text-sm",children:[e("li",{children:"AppLayout, AppHeader, AppSidebar"}),e("li",{children:"MarketingLayout, HeroSection"}),e("li",{children:"ListCardPage, ListTablePage"})]})]}),t("div",{className:"card-subtle p-4",children:[e("h3",{className:"mb-2 font-semibold",children:"Data & Forms"}),t("ul",{className:"space-y-1 text-muted-foreground text-sm",children:[e("li",{children:"DataTable"}),e("li",{children:"DataViewTable"}),e("li",{children:"DataViewRenderer"}),e("li",{children:"ZodForm"}),e("li",{children:"FormLayout, FormDialog"})]})]}),t("div",{className:"card-subtle p-4",children:[e("h3",{className:"mb-2 font-semibold",children:"Code Display"}),t("ul",{className:"space-y-1 text-muted-foreground text-sm",children:[e("li",{children:"CodeBlock (syntax highlighting)"}),e("li",{children:"CommandTabs (package manager tabs)"}),e("li",{children:"InstallCommand (convenience wrapper)"}),e("li",{children:"CopyButton"})]})]}),t("div",{className:"card-subtle p-4",children:[e("h3",{className:"mb-2 font-semibold",children:"Providers"}),e("ul",{className:"space-y-1 text-muted-foreground text-sm",children:e("li",{children:"PackageManagerProvider"})})]})]})]}),t("div",{className:"card-subtle space-y-3 p-6",children:[e("h2",{className:"font-bold text-2xl",children:"Where this layer fits"}),t("p",{className:"text-muted-foreground",children:["Read"," ",e(i,{href:"/docs/libraries/cross-platform-ui",className:"text-[color:var(--rust)] underline underline-offset-4",children:"Cross-platform UI"})," ","for the package split between shared runtime controllers, leaf platform primitives, and this composed design-system layer."]})]}),t("div",{className:"flex items-center gap-4 pt-4",children:[e(i,{href:"/docs/libraries/ui-kit-web",className:"btn-ghost",children:"Previous: UI Kit Web"}),t(i,{href:"/docs/libraries/accessibility",className:"btn-primary",children:["Next: Accessibility ",e(m,{size:16})]})]})]})}export{T as LibrariesDesignSystemPage};
85
+ import { Button, DataTable } from '@contractspec/lib.design-system';`;function T(){return t("div",{className:"space-y-8",children:[t("div",{className:"space-y-4",children:[e("h1",{className:"font-bold text-4xl",children:"@contractspec/lib.design-system"}),t("p",{className:"text-muted-foreground",children:["High-level design system components, patterns, and layouts for LSSM applications. Built on top of ",e("code",{children:"@contractspec/lib.ui-kit"}),"."]})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Installation"}),e(d,{package:"@contractspec/lib.design-system"})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"What It Provides"}),t("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[t("li",{children:[e("strong",{children:"Composite Components"}),": Molecules and Organisms that solve common UI problems"]}),t("li",{children:[e("strong",{children:"Layouts"}),": Ready-to-use page structures for dashboards, marketing sites, and lists"]}),t("li",{children:[e("strong",{children:"Data Views"}),": Standardized renderers for lists, tables, and detail views"]}),t("li",{children:[e("strong",{children:"Forms"}),": Zod-integrated form layouts and components"]}),t("li",{children:[e("strong",{children:"Code Display"}),": Syntax-highlighted code blocks with package manager tabs"]}),t("li",{children:[e("strong",{children:"Platform Utilities"}),": Hooks for responsive and adaptive design"]}),t("li",{children:[e("strong",{children:"Theme Bridge"}),": ThemeSpec to Tailwind variables, presets, CSS text, and runtime light/dark mode"]}),t("li",{children:[e("strong",{children:"Legal Templates"}),": Compliant templates for Terms, Privacy, and GDPR"]})]})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"ThemeSpec to Tailwind"}),t("p",{className:"text-muted-foreground",children:["The theme bridge keeps ",e("code",{children:"ThemeSpec"})," as the source of truth and exposes no-generation Tailwind helpers, optional CSS text serialization, runtime CSS variables, light/dark modes, and OKLCH color pass-through."]}),e(r,{language:"tsx",code:u})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Focused import surfaces"}),e("p",{className:"text-muted-foreground",children:"New code can use focused subpaths for theme, controls, forms, and layout while existing root imports remain compatible."}),e(r,{language:"tsx",code:h})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Data table example"}),t("p",{className:"text-muted-foreground",children:["This is the composed lane from the canonical"," ",e(i,{href:"/docs/examples/data-grid-showcase",className:"text-[color:var(--rust)] underline underline-offset-4",children:"Data Grid Showcase"}),". The design-system wrapper owns title, description, header actions, and the opinionated card shell on top of the raw web primitive."]}),e(r,{language:"tsx",code:p})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Key Exports"}),t("div",{className:"grid gap-4 md:grid-cols-2",children:[t("div",{className:"card-subtle p-4",children:[e("h3",{className:"mb-2 font-semibold",children:"Organisms"}),t("ul",{className:"space-y-1 text-muted-foreground text-sm",children:[e("li",{children:"AppShell, PageOutline"}),e("li",{children:"AppLayout, AppHeader, AppSidebar"}),e("li",{children:"MarketingLayout, HeroSection"}),e("li",{children:"ListCardPage, ListTablePage"})]})]}),t("div",{className:"card-subtle p-4",children:[e("h3",{className:"mb-2 font-semibold",children:"Data & Forms"}),t("ul",{className:"space-y-1 text-muted-foreground text-sm",children:[e("li",{children:"DataTable"}),e("li",{children:"DataViewTable"}),e("li",{children:"DataViewRenderer"}),e("li",{children:"ZodForm"}),e("li",{children:"FormLayout, FormDialog"})]})]}),t("div",{className:"card-subtle p-4",children:[e("h3",{className:"mb-2 font-semibold",children:"Code Display"}),t("ul",{className:"space-y-1 text-muted-foreground text-sm",children:[e("li",{children:"CodeBlock (syntax highlighting)"}),e("li",{children:"CommandTabs (package manager tabs)"}),e("li",{children:"InstallCommand (convenience wrapper)"}),e("li",{children:"CopyButton"})]})]}),t("div",{className:"card-subtle p-4",children:[e("h3",{className:"mb-2 font-semibold",children:"Providers"}),e("ul",{className:"space-y-1 text-muted-foreground text-sm",children:e("li",{children:"PackageManagerProvider"})})]})]})]}),t("div",{className:"card-subtle space-y-3 p-6",children:[e("h2",{className:"font-bold text-2xl",children:"Where this layer fits"}),t("p",{className:"text-muted-foreground",children:["Read"," ",e(i,{href:"/docs/libraries/application-shell",className:"text-[color:var(--rust)] underline underline-offset-4",children:"Application shell"})," ","for the shared sidebar, topbar, command search, mobile navigation, and"," ",e("code",{children:"PageOutline"})," pattern. Read"," ",e(i,{href:"/docs/libraries/cross-platform-ui",className:"text-[color:var(--rust)] underline underline-offset-4",children:"Cross-platform UI"})," ","for the package split between shared runtime controllers, leaf platform primitives, and this composed design-system layer."]})]}),t("div",{className:"flex items-center gap-4 pt-4",children:[e(i,{href:"/docs/libraries/ui-kit-web",className:"btn-ghost",children:"Previous: UI Kit Web"}),t(i,{href:"/docs/libraries/accessibility",className:"btn-primary",children:["Next: Accessibility ",e(m,{size:16})]})]})]})}export{T as LibrariesDesignSystemPage};
@@ -1 +1 @@
1
- var s=Object.defineProperty;var o=(e)=>e;function c(e,t){this[e]=o.bind(null,t)}var p=(e,t)=>{for(var r in t)s(e,r,{get:t[r],enumerable:!0,configurable:!0,set:c.bind(t,r)})};var m=(e,t)=>()=>(e&&(t=e(e=0)),t);import n from"@contractspec/lib.ui-link";import{ChevronRight as l}from"lucide-react";import{jsx as i,jsxs as a}from"react/jsx-runtime";var d=[{title:"Contract and schema foundation",body:"Use these packages to define explicit contracts, schemas, and generated artifacts without inventing a new platform-specific language.",items:[{title:"@contractspec/lib.contracts-spec",description:"Define operations, events, policies, and generated surfaces in TypeScript.",href:"/docs/libraries/contracts"},{title:"@contractspec/lib.schema",description:"Share type-safe schema definitions across validation, clients, and runtime adapters.",href:"/docs/libraries/schema"}]},{title:"Runtime and surface libraries",body:"These packages execute the contract model across UI, data, observability, workflows, and generated runtime behavior.",items:[{title:"@contractspec/lib.runtime",description:"Run typed capability surfaces, execute policies, and connect runtime adapters.",href:"/docs/libraries/runtime"},{title:"@contractspec/lib.ui-kit",description:"Render shared surfaces across web and React Native without forking the contract layer.",href:"/docs/libraries/ui-kit"},{title:"@contractspec/lib.ui-kit-web",description:"Use the raw web primitive layer directly when you want the browser table, accessibility, and interaction model without the design-system shell.",href:"/docs/libraries/ui-kit-web"},{title:"@contractspec/lib.design-system",description:"Build higher-level product surfaces and documented marketing/docs primitives on top of the web and native UI packages.",href:"/docs/libraries/design-system"},{title:"Cross-platform UI",description:"See how the presentation runtimes, ui-kit-web, ui-kit, and design-system stay compatible across React and React Native.",href:"/docs/libraries/cross-platform-ui"},{title:"@contractspec/lib.data-views",description:"Generate and render list/detail style surfaces that stay aligned with data contracts.",href:"/docs/libraries/data-views"}]},{title:"Operator and system packages",body:"These packages matter once the system is live and you need governance, resilience, and observability.",items:[{title:"@contractspec/lib.observability",description:"Trace, log, and measure contract execution using the same system boundaries.",href:"/docs/libraries/observability"},{title:"@contractspec/lib.resilience",description:"Add circuit breakers, retries, and failure controls without hiding the integration model.",href:"/docs/libraries/resilience"},{title:"@contractspec/lib.multi-tenancy",description:"Keep tenant-specific config, policy, and surface resolution explicit.",href:"/docs/libraries/multi-tenancy"},{title:"@contractspec/lib.workflow-composer",description:"Compose and extend workflows without smearing orchestration concerns across apps.",href:"/docs/libraries/workflow-composer"}]}];function f(){return a("div",{className:"space-y-10",children:[a("div",{className:"space-y-3",children:[i("p",{className:"editorial-kicker",children:"Build"}),i("h1",{className:"font-serif text-4xl tracking-[-0.04em] md:text-5xl",children:"The OSS foundation is a library system, not a closed platform."}),i("p",{className:"max-w-3xl text-lg text-muted-foreground leading-8",children:"ContractSpec is assembled from libraries that remain useful on their own and stronger together. Start with the contract and schema foundation, then add runtime, UI, integration, and operator packages as your system grows."})]}),a("div",{className:"editorial-proof-strip",children:[a("div",{className:"editorial-stat",children:[i("span",{className:"editorial-label",children:"Layering rule"}),i("span",{className:"editorial-stat-value",children:"libs → bundles → apps"})]}),i("p",{className:"max-w-2xl text-muted-foreground text-sm leading-7",children:"Keep reusable behavior in libraries, compose it into bundle-level surfaces, and reserve app packages for concrete delivery shells."})]}),i("div",{className:"space-y-6",children:d.map((e)=>a("section",{className:"editorial-panel space-y-5",children:[a("div",{className:"space-y-2",children:[i("h2",{className:"font-serif text-3xl tracking-[-0.03em]",children:e.title}),i("p",{className:"text-muted-foreground text-sm leading-7",children:e.body})]}),i("div",{className:"grid gap-4 md:grid-cols-2",children:e.items.map((t)=>a(n,{href:t.href,className:"rounded-[24px] border border-border/75 bg-background/70 p-5 transition-colors hover:border-[color:rgb(162_79_42_/_0.45)]",children:[i("h3",{className:"font-semibold text-lg",children:t.title}),i("p",{className:"mt-2 text-muted-foreground text-sm leading-7",children:t.description}),a("div",{className:"mt-3 flex items-center gap-2 text-[color:var(--rust)] text-sm",children:["Learn more ",i(l,{size:14})]})]},t.title))})]},e.title))})]})}export{f as LibrariesOverviewPage};
1
+ var s=Object.defineProperty;var o=(e)=>e;function c(e,t){this[e]=o.bind(null,t)}var p=(e,t)=>{for(var r in t)s(e,r,{get:t[r],enumerable:!0,configurable:!0,set:c.bind(t,r)})};var m=(e,t)=>()=>(e&&(t=e(e=0)),t);import n from"@contractspec/lib.ui-link";import{ChevronRight as l}from"lucide-react";import{jsx as i,jsxs as a}from"react/jsx-runtime";var d=[{title:"Contract and schema foundation",body:"Use these packages to define explicit contracts, schemas, and generated artifacts without inventing a new platform-specific language.",items:[{title:"@contractspec/lib.contracts-spec",description:"Define operations, events, policies, and generated surfaces in TypeScript.",href:"/docs/libraries/contracts"},{title:"@contractspec/lib.schema",description:"Share type-safe schema definitions across validation, clients, and runtime adapters.",href:"/docs/libraries/schema"}]},{title:"Runtime and surface libraries",body:"These packages execute the contract model across UI, data, observability, workflows, and generated runtime behavior.",items:[{title:"@contractspec/lib.runtime",description:"Run typed capability surfaces, execute policies, and connect runtime adapters.",href:"/docs/libraries/runtime"},{title:"@contractspec/lib.ui-kit",description:"Render shared surfaces across web and React Native without forking the contract layer.",href:"/docs/libraries/ui-kit"},{title:"@contractspec/lib.ui-kit-web",description:"Use the raw web primitive layer directly when you want the browser table, accessibility, and interaction model without the design-system shell.",href:"/docs/libraries/ui-kit-web"},{title:"@contractspec/lib.design-system",description:"Build higher-level product surfaces and documented marketing/docs primitives on top of the web and native UI packages.",href:"/docs/libraries/design-system"},{title:"Application shell",description:"Adopt the shared sidebar, topbar, command search, mobile navigation, and PageOutline patterns for product apps.",href:"/docs/libraries/application-shell"},{title:"Cross-platform UI",description:"See how the presentation runtimes, ui-kit-web, ui-kit, and design-system stay compatible across React and React Native.",href:"/docs/libraries/cross-platform-ui"},{title:"@contractspec/lib.data-views",description:"Generate and render list/detail style surfaces that stay aligned with data contracts.",href:"/docs/libraries/data-views"}]},{title:"Operator and system packages",body:"These packages matter once the system is live and you need governance, resilience, and observability.",items:[{title:"@contractspec/lib.observability",description:"Trace, log, and measure contract execution using the same system boundaries.",href:"/docs/libraries/observability"},{title:"@contractspec/lib.resilience",description:"Add circuit breakers, retries, and failure controls without hiding the integration model.",href:"/docs/libraries/resilience"},{title:"@contractspec/lib.multi-tenancy",description:"Keep tenant-specific config, policy, and surface resolution explicit.",href:"/docs/libraries/multi-tenancy"},{title:"@contractspec/lib.workflow-composer",description:"Compose and extend workflows without smearing orchestration concerns across apps.",href:"/docs/libraries/workflow-composer"}]}];function f(){return a("div",{className:"space-y-10",children:[a("div",{className:"space-y-3",children:[i("p",{className:"editorial-kicker",children:"Build"}),i("h1",{className:"font-serif text-4xl tracking-[-0.04em] md:text-5xl",children:"The OSS foundation is a library system, not a closed platform."}),i("p",{className:"max-w-3xl text-lg text-muted-foreground leading-8",children:"ContractSpec is assembled from libraries that remain useful on their own and stronger together. Start with the contract and schema foundation, then add runtime, UI, integration, and operator packages as your system grows."})]}),a("div",{className:"editorial-proof-strip",children:[a("div",{className:"editorial-stat",children:[i("span",{className:"editorial-label",children:"Layering rule"}),i("span",{className:"editorial-stat-value",children:"libs → bundles → apps"})]}),i("p",{className:"max-w-2xl text-muted-foreground text-sm leading-7",children:"Keep reusable behavior in libraries, compose it into bundle-level surfaces, and reserve app packages for concrete delivery shells."})]}),i("div",{className:"space-y-6",children:d.map((e)=>a("section",{className:"editorial-panel space-y-5",children:[a("div",{className:"space-y-2",children:[i("h2",{className:"font-serif text-3xl tracking-[-0.03em]",children:e.title}),i("p",{className:"text-muted-foreground text-sm leading-7",children:e.body})]}),i("div",{className:"grid gap-4 md:grid-cols-2",children:e.items.map((t)=>a(n,{href:t.href,className:"rounded-[24px] border border-border/75 bg-background/70 p-5 transition-colors hover:border-[color:rgb(162_79_42_/_0.45)]",children:[i("h3",{className:"font-semibold text-lg",children:t.title}),i("p",{className:"mt-2 text-muted-foreground text-sm leading-7",children:t.description}),a("div",{className:"mt-3 flex items-center gap-2 text-[color:var(--rust)] text-sm",children:["Learn more ",i(l,{size:14})]})]},t.title))})]},e.title))})]})}export{f as LibrariesOverviewPage};