@contractspec/bundle.library 3.8.11 → 3.9.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 (202) hide show
  1. package/.turbo/turbo-build.log +290 -282
  2. package/CHANGELOG.md +68 -0
  3. package/dist/application/index.js +11 -11
  4. package/dist/application/mcp/cliMcp.js +6 -6
  5. package/dist/application/mcp/cliMcp.onboarding.d.ts +4 -0
  6. package/dist/application/mcp/cliMcp.onboarding.js +2 -0
  7. package/dist/application/mcp/cliMcp.test.d.ts +1 -0
  8. package/dist/application/mcp/contractsMcp.js +2 -2
  9. package/dist/application/mcp/contractsMcp.test.d.ts +1 -0
  10. package/dist/application/mcp/contractsMcpAdoptionTools.d.ts +3 -0
  11. package/dist/application/mcp/contractsMcpAdoptionTools.js +2 -0
  12. package/dist/application/mcp/contractsMcpResources.js +1 -1
  13. package/dist/application/mcp/contractsMcpTools.js +1 -1
  14. package/dist/application/mcp/contractsMcpTypes.d.ts +16 -0
  15. package/dist/application/mcp/index.js +11 -11
  16. package/dist/components/docs/DocsIndexPage.js +1 -1
  17. package/dist/components/docs/docsManifest.js +1 -1
  18. package/dist/components/docs/examples/DocsExamplesPage.js +1 -17
  19. package/dist/components/docs/examples/ExampleShowcasePage.d.ts +1 -1
  20. package/dist/components/docs/examples/ExampleShowcasePage.js +2 -17
  21. package/dist/components/docs/examples/exampleShowcaseData.d.ts +2 -2
  22. package/dist/components/docs/examples/exampleShowcaseData.js +2 -17
  23. package/dist/components/docs/examples/exampleShowcaseData.test.d.ts +1 -0
  24. package/dist/components/docs/examples/index.js +2 -17
  25. package/dist/components/docs/getting-started/CLIPage.js +5 -4
  26. package/dist/components/docs/getting-started/DataViewTutorialPage.js +44 -67
  27. package/dist/components/docs/getting-started/StartHerePage.js +4 -2
  28. package/dist/components/docs/getting-started/index.js +56 -76
  29. package/dist/components/docs/guides/GuideConnectInRepoPage.js +29 -4
  30. package/dist/components/docs/guides/GuideHostBuilderWorkbenchPage.js +21 -6
  31. package/dist/components/docs/guides/GuideReleaseCapsulesPage.d.ts +1 -0
  32. package/dist/components/docs/guides/GuideReleaseCapsulesPage.js +16 -0
  33. package/dist/components/docs/guides/GuidesIndexPage.js +1 -1
  34. package/dist/components/docs/guides/index.d.ts +1 -0
  35. package/dist/components/docs/guides/index.js +93 -39
  36. package/dist/components/docs/index.js +572 -421
  37. package/dist/components/docs/libraries/LibrariesContractsPage.js +43 -18
  38. package/dist/components/docs/libraries/LibrariesDesignSystemPage.js +43 -31
  39. package/dist/components/docs/libraries/LibrariesOverviewPage.js +1 -1
  40. package/dist/components/docs/libraries/LibrariesUIKitPage.js +42 -16
  41. package/dist/components/docs/libraries/LibrariesUIKitWebPage.d.ts +1 -0
  42. package/dist/components/docs/libraries/LibrariesUIKitWebPage.js +47 -0
  43. package/dist/components/docs/libraries/index.d.ts +1 -0
  44. package/dist/components/docs/libraries/index.js +221 -113
  45. package/dist/components/docs/specs/SpecsBuilderControlPlanePage.js +18 -3
  46. package/dist/components/docs/specs/SpecsConnectPage.js +4 -2
  47. package/dist/components/docs/specs/SpecsDataViewsPage.js +39 -32
  48. package/dist/components/docs/specs/index.js +65 -41
  49. package/dist/index.js +583 -432
  50. package/dist/node/application/index.js +11 -11
  51. package/dist/node/application/mcp/cliMcp.js +6 -6
  52. package/dist/node/application/mcp/cliMcp.onboarding.js +1 -0
  53. package/dist/node/application/mcp/contractsMcp.js +2 -2
  54. package/dist/node/application/mcp/contractsMcpAdoptionTools.js +1 -0
  55. package/dist/node/application/mcp/contractsMcpResources.js +1 -1
  56. package/dist/node/application/mcp/contractsMcpTools.js +1 -1
  57. package/dist/node/application/mcp/index.js +11 -11
  58. package/dist/node/components/docs/DocsIndexPage.js +1 -1
  59. package/dist/node/components/docs/docsManifest.js +1 -1
  60. package/dist/node/components/docs/examples/DocsExamplesPage.js +1 -17
  61. package/dist/node/components/docs/examples/ExampleShowcasePage.js +2 -17
  62. package/dist/node/components/docs/examples/exampleShowcaseData.js +2 -17
  63. package/dist/node/components/docs/examples/index.js +2 -17
  64. package/dist/node/components/docs/getting-started/CLIPage.js +5 -4
  65. package/dist/node/components/docs/getting-started/DataViewTutorialPage.js +44 -67
  66. package/dist/node/components/docs/getting-started/StartHerePage.js +4 -2
  67. package/dist/node/components/docs/getting-started/index.js +56 -76
  68. package/dist/node/components/docs/guides/GuideConnectInRepoPage.js +29 -4
  69. package/dist/node/components/docs/guides/GuideHostBuilderWorkbenchPage.js +21 -6
  70. package/dist/node/components/docs/guides/GuideReleaseCapsulesPage.js +15 -0
  71. package/dist/node/components/docs/guides/GuidesIndexPage.js +1 -1
  72. package/dist/node/components/docs/guides/index.js +93 -39
  73. package/dist/node/components/docs/index.js +572 -421
  74. package/dist/node/components/docs/libraries/LibrariesContractsPage.js +43 -18
  75. package/dist/node/components/docs/libraries/LibrariesDesignSystemPage.js +43 -31
  76. package/dist/node/components/docs/libraries/LibrariesOverviewPage.js +1 -1
  77. package/dist/node/components/docs/libraries/LibrariesUIKitPage.js +42 -16
  78. package/dist/node/components/docs/libraries/LibrariesUIKitWebPage.js +46 -0
  79. package/dist/node/components/docs/libraries/index.js +221 -113
  80. package/dist/node/components/docs/specs/SpecsBuilderControlPlanePage.js +18 -3
  81. package/dist/node/components/docs/specs/SpecsConnectPage.js +4 -2
  82. package/dist/node/components/docs/specs/SpecsDataViewsPage.js +39 -32
  83. package/dist/node/components/docs/specs/index.js +65 -41
  84. package/dist/node/index.js +583 -432
  85. package/package.json +66 -17
  86. package/src/application/mcp/cliMcp.onboarding.ts +297 -0
  87. package/src/application/mcp/cliMcp.test.ts +99 -0
  88. package/src/application/mcp/cliMcp.ts +30 -3
  89. package/src/application/mcp/contractsMcp.test.ts +65 -0
  90. package/src/application/mcp/contractsMcpAdoptionTools.ts +131 -0
  91. package/src/application/mcp/contractsMcpResources.ts +49 -0
  92. package/src/application/mcp/contractsMcpTools.ts +2 -0
  93. package/src/application/mcp/contractsMcpTypes.ts +16 -0
  94. package/src/components/docs/docsManifest.ts +12 -0
  95. package/src/components/docs/examples/DocsExamplesPage.tsx +6 -14
  96. package/src/components/docs/examples/ExampleShowcasePage.tsx +22 -18
  97. package/src/components/docs/examples/exampleShowcaseData.test.ts +22 -0
  98. package/src/components/docs/examples/exampleShowcaseData.ts +75 -50
  99. package/src/components/docs/generated/docs-index._common.json +2008 -1691
  100. package/src/components/docs/generated/docs-index.agent-console.json +377 -377
  101. package/src/components/docs/generated/docs-index.ai-chat-assistant.json +17 -17
  102. package/src/components/docs/generated/docs-index.ai-chat.json +105 -105
  103. package/src/components/docs/generated/docs-index.ai-support-bot.json +9 -9
  104. package/src/components/docs/generated/docs-index.analytics-dashboard.json +169 -169
  105. package/src/components/docs/generated/docs-index.app-config.json +137 -137
  106. package/src/components/docs/generated/docs-index.artisan-knowledge-product.json +17 -17
  107. package/src/components/docs/generated/docs-index.artisan-payments-stripe.json +33 -33
  108. package/src/components/docs/generated/docs-index.audit-trail.json +49 -49
  109. package/src/components/docs/generated/docs-index.calendar-google.json +9 -9
  110. package/src/components/docs/generated/docs-index.content-generation.json +9 -9
  111. package/src/components/docs/generated/docs-index.control-plane.json +17 -17
  112. package/src/components/docs/generated/docs-index.crm-pipeline.json +161 -161
  113. package/src/components/docs/generated/docs-index.data-grid-showcase.json +25 -17
  114. package/src/components/docs/generated/docs-index.defineExample.json +9 -9
  115. package/src/components/docs/generated/docs-index.email-gmail.json +9 -9
  116. package/src/components/docs/generated/docs-index.feature-flags.json +217 -217
  117. package/src/components/docs/generated/docs-index.files.json +177 -177
  118. package/src/components/docs/generated/docs-index.generated.ts +20 -20
  119. package/src/components/docs/generated/docs-index.harness-lab.json +9 -9
  120. package/src/components/docs/generated/docs-index.health.json +97 -97
  121. package/src/components/docs/generated/docs-index.identity-rbac.json +313 -313
  122. package/src/components/docs/generated/docs-index.in-app-docs.json +9 -9
  123. package/src/components/docs/generated/docs-index.integration-hub.json +265 -265
  124. package/src/components/docs/generated/docs-index.integration-posthog.json +9 -9
  125. package/src/components/docs/generated/docs-index.integration-stripe.json +9 -9
  126. package/src/components/docs/generated/docs-index.integration-supabase.json +9 -9
  127. package/src/components/docs/generated/docs-index.jobs.json +137 -137
  128. package/src/components/docs/generated/docs-index.kb-update-pipeline.json +129 -129
  129. package/src/components/docs/generated/docs-index.knowledge-canon.json +9 -9
  130. package/src/components/docs/generated/docs-index.learning-journey-ambient-coach.json +9 -9
  131. package/src/components/docs/generated/docs-index.learning-journey-crm-onboarding.json +49 -49
  132. package/src/components/docs/generated/docs-index.learning-journey-duo-drills.json +9 -9
  133. package/src/components/docs/generated/docs-index.learning-journey-platform-tour.json +49 -49
  134. package/src/components/docs/generated/docs-index.learning-journey-quest-challenges.json +9 -9
  135. package/src/components/docs/generated/docs-index.learning-journey-registry.json +33 -33
  136. package/src/components/docs/generated/docs-index.learning-journey-studio-onboarding.json +49 -49
  137. package/src/components/docs/generated/docs-index.learning-journey-ui-coaching.json +9 -9
  138. package/src/components/docs/generated/docs-index.learning-journey-ui-gamified.json +9 -9
  139. package/src/components/docs/generated/docs-index.learning-journey-ui-onboarding.json +9 -9
  140. package/src/components/docs/generated/docs-index.learning-journey-ui-shared.json +9 -9
  141. package/src/components/docs/generated/docs-index.learning-journey.json +241 -217
  142. package/src/components/docs/generated/docs-index.learning-patterns.json +9 -9
  143. package/src/components/docs/generated/docs-index.lifecycle-cli.json +9 -9
  144. package/src/components/docs/generated/docs-index.lifecycle-dashboard.json +9 -9
  145. package/src/components/docs/generated/docs-index.locale-jurisdiction-gate.json +65 -57
  146. package/src/components/docs/generated/docs-index.manifest.json +432 -432
  147. package/src/components/docs/generated/docs-index.marketplace.json +337 -337
  148. package/src/components/docs/generated/docs-index.meeting-recorder-providers.json +9 -9
  149. package/src/components/docs/generated/docs-index.meeting-recorder.json +49 -49
  150. package/src/components/docs/generated/docs-index.messaging-agent-actions.json +17 -17
  151. package/src/components/docs/generated/docs-index.metrics.json +201 -201
  152. package/src/components/docs/generated/docs-index.minimal.json +17 -17
  153. package/src/components/docs/generated/docs-index.mobile-demo-tasks.json +33 -33
  154. package/src/components/docs/generated/docs-index.notifications.json +65 -65
  155. package/src/components/docs/generated/docs-index.openbanking-powens.json +9 -9
  156. package/src/components/docs/generated/docs-index.openbanking.json +65 -65
  157. package/src/components/docs/generated/docs-index.opencode-cli.json +17 -17
  158. package/src/components/docs/generated/docs-index.personalization.json +9 -9
  159. package/src/components/docs/generated/docs-index.platform-acp.json +137 -137
  160. package/src/components/docs/generated/docs-index.platform-agent.json +201 -185
  161. package/src/components/docs/generated/docs-index.platform-context.json +121 -105
  162. package/src/components/docs/generated/docs-index.platform-control-plane.json +321 -321
  163. package/src/components/docs/generated/docs-index.platform-database.json +89 -89
  164. package/src/components/docs/generated/docs-index.platform-docs.json +161 -153
  165. package/src/components/docs/generated/docs-index.platform-harness.json +177 -177
  166. package/src/components/docs/generated/docs-index.platform-integrations.json +329 -329
  167. package/src/components/docs/generated/docs-index.platform-knowledge.json +57 -57
  168. package/src/components/docs/generated/docs-index.platform-provider-ranking.json +217 -185
  169. package/src/components/docs/generated/docs-index.pocket-family-office.json +129 -129
  170. package/src/components/docs/generated/docs-index.policy-safe-knowledge-assistant.json +9 -9
  171. package/src/components/docs/generated/docs-index.product-intent.json +9 -9
  172. package/src/components/docs/generated/docs-index.project-management-sync.json +9 -9
  173. package/src/components/docs/generated/docs-index.saas-boilerplate.json +209 -209
  174. package/src/components/docs/generated/docs-index.service-business-os.json +193 -193
  175. package/src/components/docs/generated/docs-index.team-hub.json +185 -185
  176. package/src/components/docs/generated/docs-index.unknown.json +521 -521
  177. package/src/components/docs/generated/docs-index.versioned-knowledge-base.json +81 -81
  178. package/src/components/docs/generated/docs-index.video-api-showcase.json +33 -33
  179. package/src/components/docs/generated/docs-index.video-docs-terminal.json +9 -9
  180. package/src/components/docs/generated/docs-index.video-marketing-clip.json +9 -9
  181. package/src/components/docs/generated/docs-index.visualization-showcase.json +17 -17
  182. package/src/components/docs/generated/docs-index.voice-providers.json +9 -9
  183. package/src/components/docs/generated/docs-index.wealth-snapshot.json +153 -153
  184. package/src/components/docs/generated/docs-index.workflow-system.json +433 -433
  185. package/src/components/docs/generated/docs-index.workspace-cli.json +9 -9
  186. package/src/components/docs/getting-started/CLIPage.tsx +10 -2
  187. package/src/components/docs/getting-started/DataViewTutorialPage.tsx +63 -70
  188. package/src/components/docs/getting-started/StartHerePage.tsx +10 -9
  189. package/src/components/docs/guides/GuideConnectInRepoPage.tsx +52 -3
  190. package/src/components/docs/guides/GuideHostBuilderWorkbenchPage.tsx +55 -6
  191. package/src/components/docs/guides/GuideReleaseCapsulesPage.tsx +147 -0
  192. package/src/components/docs/guides/GuidesIndexPage.tsx +7 -0
  193. package/src/components/docs/guides/index.ts +1 -0
  194. package/src/components/docs/libraries/LibrariesContractsPage.tsx +72 -27
  195. package/src/components/docs/libraries/LibrariesDesignSystemPage.tsx +67 -61
  196. package/src/components/docs/libraries/LibrariesOverviewPage.tsx +7 -1
  197. package/src/components/docs/libraries/LibrariesUIKitPage.tsx +63 -25
  198. package/src/components/docs/libraries/LibrariesUIKitWebPage.tsx +115 -0
  199. package/src/components/docs/libraries/index.ts +1 -0
  200. package/src/components/docs/specs/SpecsBuilderControlPlanePage.tsx +58 -3
  201. package/src/components/docs/specs/SpecsConnectPage.tsx +30 -0
  202. package/src/components/docs/specs/SpecsDataViewsPage.tsx +63 -42
@@ -2,6 +2,55 @@ import { CodeBlock, InstallCommand } from '@contractspec/lib.design-system';
2
2
  import Link from '@contractspec/lib.ui-link';
3
3
  import { ChevronRight } from 'lucide-react';
4
4
 
5
+ const DATA_TABLE_CONTRACT_EXAMPLE = `import { defineDataView } from '@contractspec/lib.contracts-spec/data-views';
6
+ import { ListDataGridShowcaseRowsQuery } from '@contractspec/example.data-grid-showcase/contracts/data-grid-showcase.operation';
7
+
8
+ export const DataGridShowcaseDataView = defineDataView({
9
+ meta: {
10
+ key: 'examples.data-grid-showcase.table',
11
+ version: '1.0.0',
12
+ entity: 'account',
13
+ title: 'Data Grid Showcase Table',
14
+ description:
15
+ 'Declarative DataViewSpec for the ContractSpec table showcase.',
16
+ domain: 'examples',
17
+ owners: ['@platform.core'],
18
+ tags: ['examples', 'table', 'data-grid'],
19
+ stability: 'experimental',
20
+ },
21
+ source: {
22
+ primary: {
23
+ key: ListDataGridShowcaseRowsQuery.meta.key,
24
+ version: ListDataGridShowcaseRowsQuery.meta.version,
25
+ },
26
+ },
27
+ view: {
28
+ kind: 'table',
29
+ executionMode: 'client',
30
+ selection: 'multiple',
31
+ columnVisibility: true,
32
+ columnResizing: true,
33
+ columnPinning: true,
34
+ rowExpansion: {
35
+ fields: ['notes', 'renewalDate', 'lastActivityAt'],
36
+ },
37
+ initialState: {
38
+ pageSize: 4,
39
+ hiddenColumns: ['notes'],
40
+ pinnedColumns: {
41
+ left: ['account'],
42
+ },
43
+ sorting: [{ field: 'arr', desc: true }],
44
+ },
45
+ fields: [
46
+ { key: 'account', label: 'Account', dataPath: 'account', sortable: true },
47
+ { key: 'owner', label: 'Owner', dataPath: 'owner', sortable: true },
48
+ { key: 'status', label: 'Status', dataPath: 'status', sortable: true },
49
+ { key: 'notes', label: 'Notes', dataPath: 'notes' },
50
+ ],
51
+ },
52
+ });`;
53
+
5
54
  export function LibrariesContractsPage() {
6
55
  return (
7
56
  <div className="space-y-8">
@@ -47,33 +96,24 @@ export function LibrariesContractsPage() {
47
96
  </div>
48
97
 
49
98
  <div className="space-y-4">
50
- <h2 className="font-bold text-2xl">Quick Example</h2>
51
- <CodeBlock
52
- language="typescript"
53
- code={`import { defineCommand } from '@contractspec/lib.contracts-spec';
54
- import { SchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
55
-
56
- const CreateUserInput = new SchemaModel({
57
- name: 'CreateUserInput',
58
- fields: {
59
- email: { type: ScalarTypeEnum.Email(), isOptional: false },
60
- name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
61
- },
62
- });
63
-
64
- export const CreateUser = defineCommand({
65
- meta: {
66
- key: 'users.createUser',
67
- version: '1.0.0',
68
- description: 'Create a new user account',
69
- },
70
- io: {
71
- input: CreateUserInput,
72
- output: /* ... */,
73
- },
74
- policy: { auth: 'admin' },
75
- });`}
76
- />
99
+ <h2 className="font-bold text-2xl">Data table contract example</h2>
100
+ <p className="text-muted-foreground">
101
+ The canonical account-grid example starts here in{' '}
102
+ <code>@contractspec/lib.contracts-spec</code>. The contract declares
103
+ table execution mode, selection, pinning, resizing, row expansion, and
104
+ initial state before any renderer is chosen.
105
+ </p>
106
+ <CodeBlock language="typescript" code={DATA_TABLE_CONTRACT_EXAMPLE} />
107
+ <p className="text-muted-foreground text-sm">
108
+ See the live version in{' '}
109
+ <Link
110
+ href="/docs/examples/data-grid-showcase"
111
+ className="text-[color:var(--rust)] underline underline-offset-4"
112
+ >
113
+ /docs/examples/data-grid-showcase
114
+ </Link>
115
+ .
116
+ </p>
77
117
  </div>
78
118
 
79
119
  <div className="space-y-4">
@@ -104,6 +144,11 @@ export const CreateUser = defineCommand({
104
144
  <strong>PresentationSpec (V2)</strong>: Describes how data is
105
145
  rendered (Web Components, Markdown, Data).
106
146
  </li>
147
+ <li>
148
+ <strong>DataViewSpec</strong>: Declarative list, table, grid, and
149
+ detail contracts that the table showcase uses as its canonical
150
+ account-grid example.
151
+ </li>
107
152
  </ul>
108
153
  </div>
109
154
 
@@ -2,6 +2,56 @@ import { CodeBlock, InstallCommand } from '@contractspec/lib.design-system';
2
2
  import Link from '@contractspec/lib.ui-link';
3
3
  import { ChevronRight } from 'lucide-react';
4
4
 
5
+ const DESIGN_SYSTEM_TABLE_EXAMPLE = `import { Button, DataTable } from '@contractspec/lib.design-system';
6
+ import { useContractTable } from '@contractspec/lib.presentation-runtime-react';
7
+
8
+ import { SHOWCASE_ROWS } from '@contractspec/example.data-grid-showcase/ui/data-grid-showcase.data';
9
+ import { useShowcaseColumns } from '@contractspec/example.data-grid-showcase/ui/data-grid-showcase.columns';
10
+ import {
11
+ ExpandedRowContent,
12
+ ShowcaseToolbar,
13
+ } from '@contractspec/example.data-grid-showcase/ui/data-grid-showcase.parts';
14
+
15
+ export function AccountHealthTable() {
16
+ const columns = useShowcaseColumns();
17
+
18
+ const controller = useContractTable({
19
+ data: SHOWCASE_ROWS,
20
+ columns,
21
+ selectionMode: 'multiple',
22
+ initialState: {
23
+ sorting: [{ id: 'arr', desc: true }],
24
+ pagination: { pageIndex: 0, pageSize: 4 },
25
+ columnVisibility: { notes: false },
26
+ columnPinning: { left: ['account'], right: [] },
27
+ },
28
+ renderExpandedContent: (row) => <ExpandedRowContent row={row} />,
29
+ getCanExpand: () => true,
30
+ });
31
+
32
+ return (
33
+ <DataTable
34
+ controller={controller}
35
+ title="Account health"
36
+ description="Composed table surface for the canonical account grid."
37
+ headerActions={<Button variant="outline">Reset</Button>}
38
+ toolbar={
39
+ <ShowcaseToolbar
40
+ controller={controller}
41
+ label="Client mode"
42
+ primaryColumnId="account"
43
+ toggleColumnId="notes"
44
+ pinColumnId="owner"
45
+ sortColumnIds={['arr', 'renewalDate']}
46
+ />
47
+ }
48
+ loading={false}
49
+ emptyState={<div>No rows available.</div>}
50
+ footer={\`Page \${controller.pageIndex + 1} of \${controller.pageCount}\`}
51
+ />
52
+ );
53
+ }`;
54
+
5
55
  export function LibrariesDesignSystemPage() {
6
56
  return (
7
57
  <div className="space-y-8">
@@ -52,65 +102,19 @@ export function LibrariesDesignSystemPage() {
52
102
  </div>
53
103
 
54
104
  <div className="space-y-4">
55
- <h2 className="font-bold text-2xl">Example: App Layout</h2>
56
- <CodeBlock
57
- language="tsx"
58
- code={`import { AppLayout } from '@contractspec/lib.design-system';
59
- import { AppSidebar } from '@contractspec/lib.design-system';
60
-
61
- export function Layout({ children }) {
62
- return (
63
- <AppLayout sidebar={<AppSidebar />}>
64
- {children}
65
- </AppLayout>
66
- );
67
- }`}
68
- />
69
- </div>
70
-
71
- <div className="space-y-4">
72
- <h2 className="font-bold text-2xl">Example: Zod Form</h2>
73
- <CodeBlock
74
- language="tsx"
75
- code={`import { ZodForm } from '@contractspec/lib.design-system';
76
- import * as z from "zod";
77
-
78
- const schema = z.object({
79
- name: z.string().min(1),
80
- email: z.string().email(),
81
- });
82
-
83
- export function SignupForm() {
84
- return (
85
- <ZodForm
86
- schema={schema}
87
- onSubmit={(data) => console.log(data)}
88
- submitLabel="Submit"
89
- />
90
- );
91
- }`}
92
- />
93
- </div>
94
-
95
- <div className="space-y-4">
96
- <h2 className="font-bold text-2xl">
97
- Example: Code Block with Package Manager Tabs
98
- </h2>
99
- <CodeBlock
100
- language="tsx"
101
- code={`import { CodeBlock, InstallCommand } from '@contractspec/lib.design-system';
102
-
103
- // For installation commands with package manager tabs
104
- <InstallCommand package="my-package" />
105
- <InstallCommand package={["react", "react-dom"]} dev />
106
-
107
- // For code examples with syntax highlighting
108
- <CodeBlock
109
- language="typescript"
110
- code={\`const hello = "world";\`}
111
- filename="example.ts"
112
- />`}
113
- />
105
+ <h2 className="font-bold text-2xl">Data table example</h2>
106
+ <p className="text-muted-foreground">
107
+ This is the composed lane from the canonical{' '}
108
+ <Link
109
+ href="/docs/examples/data-grid-showcase"
110
+ className="text-[color:var(--rust)] underline underline-offset-4"
111
+ >
112
+ Data Grid Showcase
113
+ </Link>
114
+ . The design-system wrapper owns title, description, header actions,
115
+ and the opinionated card shell on top of the raw web primitive.
116
+ </p>
117
+ <CodeBlock language="tsx" code={DESIGN_SYSTEM_TABLE_EXAMPLE} />
114
118
  </div>
115
119
 
116
120
  <div className="space-y-4">
@@ -127,6 +131,8 @@ export function SignupForm() {
127
131
  <div className="card-subtle p-4">
128
132
  <h3 className="mb-2 font-semibold">Data & Forms</h3>
129
133
  <ul className="space-y-1 text-muted-foreground text-sm">
134
+ <li>DataTable</li>
135
+ <li>DataViewTable</li>
130
136
  <li>DataViewRenderer</li>
131
137
  <li>ZodForm</li>
132
138
  <li>FormLayout, FormDialog</li>
@@ -151,8 +157,8 @@ export function SignupForm() {
151
157
  </div>
152
158
 
153
159
  <div className="flex items-center gap-4 pt-4">
154
- <Link href="/docs/libraries/ui-kit" className="btn-ghost">
155
- Previous: UI Kit
160
+ <Link href="/docs/libraries/ui-kit-web" className="btn-ghost">
161
+ Previous: UI Kit Web
156
162
  </Link>
157
163
  <Link href="/docs/libraries/accessibility" className="btn-primary">
158
164
  Next: Accessibility <ChevronRight size={16} />
@@ -36,10 +36,16 @@ const libraryGroups = [
36
36
  'Render shared surfaces across web and React Native without forking the contract layer.',
37
37
  href: '/docs/libraries/ui-kit',
38
38
  },
39
+ {
40
+ title: '@contractspec/lib.ui-kit-web',
41
+ description:
42
+ 'Use the raw web primitive layer directly when you want the browser table, accessibility, and interaction model without the design-system shell.',
43
+ href: '/docs/libraries/ui-kit-web',
44
+ },
39
45
  {
40
46
  title: '@contractspec/lib.design-system',
41
47
  description:
42
- 'Build higher-level product surfaces and documented marketing/docs primitives on top of the UI kit.',
48
+ 'Build higher-level product surfaces and documented marketing/docs primitives on top of the web and native UI packages.',
43
49
  href: '/docs/libraries/design-system',
44
50
  },
45
51
  {
@@ -2,6 +2,52 @@ import { CodeBlock, InstallCommand } from '@contractspec/lib.design-system';
2
2
  import Link from '@contractspec/lib.ui-link';
3
3
  import { ChevronRight } from 'lucide-react';
4
4
 
5
+ const NATIVE_TABLE_EXAMPLE = `import { DataTable } from '@contractspec/lib.ui-kit/ui/data-table';
6
+ import { useContractTable } from '@contractspec/lib.presentation-runtime-react';
7
+
8
+ import { SHOWCASE_ROWS } from '@contractspec/example.data-grid-showcase/ui/data-grid-showcase.data';
9
+ import { useShowcaseColumns } from '@contractspec/example.data-grid-showcase/ui/data-grid-showcase.columns';
10
+ import {
11
+ ExpandedRowContent,
12
+ ShowcaseToolbar,
13
+ } from '@contractspec/example.data-grid-showcase/ui/data-grid-showcase.parts';
14
+
15
+ export function NativeAccountGrid() {
16
+ const columns = useShowcaseColumns();
17
+
18
+ const controller = useContractTable({
19
+ data: SHOWCASE_ROWS,
20
+ columns,
21
+ selectionMode: 'single',
22
+ initialState: {
23
+ sorting: [{ id: 'arr', desc: true }],
24
+ pagination: { pageIndex: 0, pageSize: 4 },
25
+ columnVisibility: { notes: false },
26
+ columnPinning: { left: ['account'], right: [] },
27
+ },
28
+ renderExpandedContent: (row) => <ExpandedRowContent row={row} />,
29
+ getCanExpand: () => true,
30
+ });
31
+
32
+ return (
33
+ <DataTable
34
+ controller={controller}
35
+ toolbar={
36
+ <ShowcaseToolbar
37
+ controller={controller}
38
+ label="Native primitive"
39
+ primaryColumnId="account"
40
+ toggleColumnId="notes"
41
+ pinColumnId="owner"
42
+ sortColumnIds={['arr', 'renewalDate']}
43
+ />
44
+ }
45
+ loading={false}
46
+ footer={\`Rows \${controller.rows.length}\`}
47
+ />
48
+ );
49
+ }`;
50
+
5
51
  export function LibrariesUIKitPage() {
6
52
  return (
7
53
  <div className="space-y-8">
@@ -41,29 +87,21 @@ export function LibrariesUIKitPage() {
41
87
  </div>
42
88
 
43
89
  <div className="space-y-4">
44
- <h2 className="font-bold text-2xl">Example Usage</h2>
45
- <CodeBlock
46
- language="tsx"
47
- code={`import { Button } from '@contractspec/lib.ui-kit/ui/button';
48
- import { Text } from '@contractspec/lib.ui-kit/ui/text';
49
- import { Card, CardHeader, CardTitle, CardContent } from '@contractspec/lib.ui-kit/ui/card';
50
-
51
- export function MyComponent() {
52
- return (
53
- <Card className="w-full max-w-md">
54
- <CardHeader>
55
- <CardTitle>Welcome</CardTitle>
56
- </CardHeader>
57
- <CardContent className="gap-4">
58
- <Text>This works on Web and Native.</Text>
59
- <Button onPress={() => console.log('Clicked!')}>
60
- Click me
61
- </Button>
62
- </CardContent>
63
- </Card>
64
- );
65
- }`}
66
- />
90
+ <h2 className="font-bold text-2xl">Data table example</h2>
91
+ <p className="text-muted-foreground">
92
+ The canonical{' '}
93
+ <Link
94
+ href="/docs/examples/data-grid-showcase"
95
+ className="text-[color:var(--rust)] underline underline-offset-4"
96
+ >
97
+ Data Grid Showcase
98
+ </Link>{' '}
99
+ uses <code>@contractspec/lib.ui-kit/ui/data-table</code> as the
100
+ native-first primitive lane. It shares the same controller model as
101
+ the web renderer while keeping the React Native / Expo surface
102
+ explicit.
103
+ </p>
104
+ <CodeBlock language="tsx" code={NATIVE_TABLE_EXAMPLE} />
67
105
  </div>
68
106
 
69
107
  <div className="space-y-4">
@@ -104,8 +142,8 @@ export function MyComponent() {
104
142
  <Link href="/docs/libraries/schema" className="btn-ghost">
105
143
  Previous: Schema
106
144
  </Link>
107
- <Link href="/docs/libraries/design-system" className="btn-primary">
108
- Next: Design System <ChevronRight size={16} />
145
+ <Link href="/docs/libraries/ui-kit-web" className="btn-primary">
146
+ Next: UI Kit Web <ChevronRight size={16} />
109
147
  </Link>
110
148
  </div>
111
149
  </div>
@@ -0,0 +1,115 @@
1
+ import { CodeBlock, InstallCommand } from '@contractspec/lib.design-system';
2
+ import Link from '@contractspec/lib.ui-link';
3
+ import { ChevronRight } from 'lucide-react';
4
+
5
+ const WEB_PRIMITIVE_EXAMPLE = `import { DataTable } from '@contractspec/lib.ui-kit-web/ui/data-table';
6
+ import { useContractTable } from '@contractspec/lib.presentation-runtime-react';
7
+
8
+ import { SHOWCASE_ROWS } from '@contractspec/example.data-grid-showcase/ui/data-grid-showcase.data';
9
+ import { useShowcaseColumns } from '@contractspec/example.data-grid-showcase/ui/data-grid-showcase.columns';
10
+ import {
11
+ ExpandedRowContent,
12
+ ShowcaseToolbar,
13
+ } from '@contractspec/example.data-grid-showcase/ui/data-grid-showcase.parts';
14
+
15
+ export function WebAccountGrid() {
16
+ const columns = useShowcaseColumns();
17
+
18
+ const controller = useContractTable({
19
+ data: SHOWCASE_ROWS,
20
+ columns,
21
+ selectionMode: 'single',
22
+ initialState: {
23
+ sorting: [{ id: 'lastActivityAt', desc: true }],
24
+ pagination: { pageIndex: 0, pageSize: 4 },
25
+ columnVisibility: { notes: false },
26
+ columnPinning: { left: ['account'], right: [] },
27
+ },
28
+ renderExpandedContent: (row) => <ExpandedRowContent row={row} />,
29
+ getCanExpand: () => true,
30
+ });
31
+
32
+ return (
33
+ <DataTable
34
+ controller={controller}
35
+ toolbar={
36
+ <ShowcaseToolbar
37
+ controller={controller}
38
+ label="Web primitive"
39
+ primaryColumnId="account"
40
+ toggleColumnId="notes"
41
+ pinColumnId="owner"
42
+ sortColumnIds={['arr', 'renewalDate']}
43
+ />
44
+ }
45
+ loading={false}
46
+ emptyState={<div>No rows available.</div>}
47
+ footer={\`Rows \${controller.totalItems}\`}
48
+ />
49
+ );
50
+ }`;
51
+
52
+ export function LibrariesUIKitWebPage() {
53
+ return (
54
+ <div className="space-y-8">
55
+ <div className="space-y-4">
56
+ <h1 className="font-bold text-4xl">@contractspec/lib.ui-kit-web</h1>
57
+ <p className="text-muted-foreground">
58
+ Web-first React and Next primitives for ContractSpec. The canonical
59
+ data-table example uses this package to render the raw browser table
60
+ layer directly, without the design-system shell on top.
61
+ </p>
62
+ </div>
63
+
64
+ <div className="space-y-4">
65
+ <h2 className="font-bold text-2xl">Installation</h2>
66
+ <InstallCommand package="@contractspec/lib.ui-kit-web" />
67
+ </div>
68
+
69
+ <div className="space-y-4">
70
+ <h2 className="font-bold text-2xl">Data table example</h2>
71
+ <p className="text-muted-foreground">
72
+ This is the raw browser lane from the canonical{' '}
73
+ <Link
74
+ href="/docs/examples/data-grid-showcase"
75
+ className="text-[color:var(--rust)] underline underline-offset-4"
76
+ >
77
+ Data Grid Showcase
78
+ </Link>
79
+ . It demonstrates the primitive renderer with sorting, pagination,
80
+ single selection, column visibility, column resizing, left/right
81
+ pinning, row expansion, loading, and empty-state slots.
82
+ </p>
83
+ <CodeBlock
84
+ language="tsx"
85
+ filename="web-account-grid.tsx"
86
+ code={WEB_PRIMITIVE_EXAMPLE}
87
+ />
88
+ </div>
89
+
90
+ <div className="space-y-4">
91
+ <h2 className="font-bold text-2xl">What this layer owns</h2>
92
+ <ul className="list-inside list-disc space-y-2 text-muted-foreground">
93
+ <li>The raw table renderer and browser interaction model.</li>
94
+ <li>
95
+ Pagination, column visibility menus, pin menus, resize handles, and
96
+ empty/loading states.
97
+ </li>
98
+ <li>
99
+ Accessibility helpers and other web-specific primitives that stay
100
+ outside the native-first package.
101
+ </li>
102
+ </ul>
103
+ </div>
104
+
105
+ <div className="flex items-center gap-4 pt-4">
106
+ <Link href="/docs/libraries/ui-kit" className="btn-ghost">
107
+ Previous: UI Kit
108
+ </Link>
109
+ <Link href="/docs/libraries/design-system" className="btn-primary">
110
+ Next: Design System <ChevronRight size={16} />
111
+ </Link>
112
+ </div>
113
+ </div>
114
+ );
115
+ }
@@ -23,5 +23,6 @@ export { LibrariesSLOPage } from './LibrariesSLOPage';
23
23
  export { LibrariesSupportBotPage } from './LibrariesSupportBotPage';
24
24
  export { LibrariesTestingPage } from './LibrariesTestingPage';
25
25
  export { LibrariesUIKitPage } from './LibrariesUIKitPage';
26
+ export { LibrariesUIKitWebPage } from './LibrariesUIKitWebPage';
26
27
  export { LibrariesWorkflowComposerPage } from './LibrariesWorkflowComposerPage';
27
28
  export { LibrariesWorkflowsPage } from './LibrariesWorkflowsPage';
@@ -4,19 +4,20 @@ import Link from '@contractspec/lib.ui-link';
4
4
  const runtimeModes = [
5
5
  {
6
6
  title: 'Managed',
7
- body: 'Best when the team wants the platform to own setup, routing, readiness, and mobile-safe defaults.',
7
+ body: 'Best when the team wants the platform to own setup, routing, readiness, API defaults, and mobile-safe operator flows.',
8
8
  },
9
9
  {
10
10
  title: 'Local',
11
- body: 'Best for power users who want tenant-local execution providers and tighter data-locality control.',
11
+ body: 'Best for power users who want local-daemon registration, tenant-local execution providers, and tighter data-locality control.',
12
12
  },
13
13
  {
14
14
  title: 'Hybrid',
15
- body: 'Best when some work should stay local while preview, review, or export flows still use managed coordination.',
15
+ body: 'Best when some work should stay local while preview, review, export, or mobile operator flows still use managed coordination.',
16
16
  },
17
17
  ];
18
18
 
19
19
  const builderLoop = [
20
+ 'Bootstrap managed, local-daemon, or hybrid presets explicitly instead of inventing provider posture ad hoc per host.',
20
21
  'Capture prompts, files, voice, and other inbound sources into a typed workspace instead of relying on a single chat transcript.',
21
22
  'Fuse the sources into decisions, assumptions, and blueprint updates with provenance and approval memory.',
22
23
  'Compile authoring work into execution lanes, then route the work to explicit provider profiles and runtime targets.',
@@ -24,6 +25,12 @@ const builderLoop = [
24
25
  'Keep mobile review parity so approvals, incidents, and patch proposals can be inspected away from the desktop workbench.',
25
26
  ];
26
27
 
28
+ const operatorSignals = [
29
+ 'local trust and lease posture for registered local runtimes',
30
+ 'channel-action and comparison posture data in the shared Builder snapshot',
31
+ 'preview, readiness, export, and mobile-review state derived from the same workspace snapshot',
32
+ ];
33
+
27
34
  export function SpecsBuilderControlPlanePage() {
28
35
  return (
29
36
  <div className="space-y-10">
@@ -151,6 +158,54 @@ Operate API proxy
151
158
  </article>
152
159
  </section>
153
160
 
161
+ <section className="editorial-panel space-y-5">
162
+ <div className="space-y-2">
163
+ <h2 className="font-serif text-3xl tracking-[-0.03em]">
164
+ Workspace config carries the current Builder defaults
165
+ </h2>
166
+ <p className="text-muted-foreground text-sm leading-7">
167
+ Builder setup is no longer just an app-shell concern. The shared
168
+ workspace config now carries runtime mode, bootstrap preset, control
169
+ plane API defaults, and local runtime registration metadata so the
170
+ CLI, editors, and web shells resolve the same posture.
171
+ </p>
172
+ </div>
173
+ <CodeBlock
174
+ language="json"
175
+ filename=".contractsrc.json"
176
+ code={`{
177
+ "builder": {
178
+ "enabled": true,
179
+ "runtimeMode": "local",
180
+ "bootstrapPreset": "local_daemon_mvp",
181
+ "api": {
182
+ "baseUrl": "https://api.contractspec.io",
183
+ "controlPlaneTokenEnvVar": "CONTROL_PLANE_API_TOKEN"
184
+ },
185
+ "localRuntime": {
186
+ "runtimeId": "rt_local_daemon",
187
+ "grantedTo": "local:operator",
188
+ "providerIds": ["provider.codex", "provider.local.model"]
189
+ }
190
+ }
191
+ }`}
192
+ />
193
+ </section>
194
+
195
+ <section className="editorial-panel space-y-4">
196
+ <h2 className="font-serif text-3xl tracking-[-0.03em]">
197
+ Operator posture stays visible
198
+ </h2>
199
+ <ul className="editorial-list">
200
+ {operatorSignals.map((item) => (
201
+ <li key={item}>
202
+ <span className="editorial-list-marker" />
203
+ <span>{item}</span>
204
+ </li>
205
+ ))}
206
+ </ul>
207
+ </section>
208
+
154
209
  <section className="editorial-panel space-y-5">
155
210
  <div className="space-y-2">
156
211
  <h2 className="font-serif text-3xl tracking-[-0.03em]">
@@ -20,6 +20,12 @@ const artifacts = [
20
20
  },
21
21
  ];
22
22
 
23
+ const adoptionOutputs = [
24
+ '`.contractspec/adoption/catalog.json` mirrored from the bundled ContractSpec catalog',
25
+ 'family-aware reuse recommendations for `ui`, `contracts`, `integrations`, `runtime`, `sharedLibs`, and `solutions`',
26
+ 'verdict thresholds that can prefer workspace reuse, ContractSpec reuse, review, or explicit denial before a new implementation starts',
27
+ ];
28
+
23
29
  const adoptionSteps = [
24
30
  'Enable `connect` in `.contractsrc.json` and keep your protected, immutable, generated, and smoke-check policies explicit.',
25
31
  'Run `contractspec connect context` and `contractspec connect plan` before risky work so the agent is operating on task-scoped evidence, not ambient repo assumptions.',
@@ -81,6 +87,8 @@ export function SpecsConnectPage() {
81
87
  language="bash"
82
88
  filename="contractspec-connect"
83
89
  code={`contractspec connect init --scope workspace
90
+ contractspec connect adoption sync --json
91
+ printf '{"goal":"Prefer an existing release helper before adding a new one"}' | contractspec connect adoption resolve --family sharedLibs --stdin --json
84
92
  contractspec connect context --task refactor-docs --paths packages/libs/contracts-spec/src/control-plane/contracts.ts --json
85
93
  printf '{"objective":"Document the control-plane contract surface","commands":["bun run typecheck"]}' | contractspec connect plan --task refactor-docs --stdin --json
86
94
  printf '{"operation":"edit","path":"packages/libs/contracts-spec/src/control-plane/contracts.ts"}' | contractspec connect verify --task refactor-docs --tool acp.fs.access --stdin --json
@@ -112,6 +120,28 @@ contractspec connect replay <decisionId> --json`}
112
120
  </div>
113
121
  </section>
114
122
 
123
+ <section className="editorial-panel space-y-5">
124
+ <div className="space-y-2">
125
+ <h2 className="font-serif text-3xl tracking-[-0.03em]">
126
+ Reuse-first adoption is part of the workflow
127
+ </h2>
128
+ <p className="text-muted-foreground text-sm leading-7">
129
+ Connect adoption keeps reuse guidance in the same local control
130
+ surface. Before a new contract family, helper, or runtime
131
+ abstraction lands, Connect can mirror the bundled catalog and
132
+ resolve the best reuse candidate by family.
133
+ </p>
134
+ </div>
135
+ <ul className="editorial-list">
136
+ {adoptionOutputs.map((item) => (
137
+ <li key={item}>
138
+ <span className="editorial-list-marker" />
139
+ <span>{item}</span>
140
+ </li>
141
+ ))}
142
+ </ul>
143
+ </section>
144
+
115
145
  <section className="grid gap-5 lg:grid-cols-2">
116
146
  <article className="editorial-panel space-y-4">
117
147
  <h2 className="font-serif text-3xl tracking-[-0.03em]">