@contractspec/bundle.library 3.4.2 → 3.5.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.
- package/.turbo/turbo-build.log +494 -488
- package/CHANGELOG.md +61 -0
- package/dist/application/index.js +8 -8
- package/dist/application/mcp/cliMcp.js +8 -8
- package/dist/application/mcp/contractsMcp.js +8 -8
- package/dist/application/mcp/docsMcp.js +8 -8
- package/dist/application/mcp/index.js +8 -8
- package/dist/application/mcp/internalMcp.js +8 -8
- package/dist/application/mcp/providerRankingMcp.js +8 -8
- package/dist/bundles/LibraryBundle.d.ts +126 -0
- package/dist/bundles/LibraryBundle.js +139 -0
- package/dist/bundles/index.d.ts +1 -0
- package/dist/bundles/index.js +139 -0
- package/dist/components/docs/DocsIndexPage.js +91 -91
- package/dist/components/docs/advanced/AdvancedMCPPage.js +125 -125
- package/dist/components/docs/advanced/AdvancedOverlayEditorPage.js +49 -49
- package/dist/components/docs/advanced/AdvancedRenderersPage.js +51 -51
- package/dist/components/docs/advanced/AdvancedSpecExperimentsPage.js +35 -35
- package/dist/components/docs/advanced/AdvancedTelemetryPage.js +177 -177
- package/dist/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +45 -45
- package/dist/components/docs/advanced/index.js +482 -482
- package/dist/components/docs/architecture/ArchitectureAppConfigPage.js +107 -107
- package/dist/components/docs/architecture/ArchitectureControlPlanePage.js +73 -73
- package/dist/components/docs/architecture/ArchitectureIntegrationBindingPage.js +117 -117
- package/dist/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +175 -175
- package/dist/components/docs/architecture/ArchitectureMultiTenancyPage.js +71 -71
- package/dist/components/docs/architecture/ArchitectureOverviewPage.js +205 -205
- package/dist/components/docs/architecture/index.js +748 -748
- package/dist/components/docs/comparison/ComparisonAutomationPlatformsPage.js +117 -117
- package/dist/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +111 -111
- package/dist/components/docs/comparison/ComparisonInternalToolBuildersPage.js +117 -117
- package/dist/components/docs/comparison/ComparisonOverviewPage.js +97 -97
- package/dist/components/docs/comparison/ComparisonWindmillPage.js +125 -125
- package/dist/components/docs/comparison/ComparisonWorkflowEnginesPage.js +171 -171
- package/dist/components/docs/comparison/index.js +738 -738
- package/dist/components/docs/ecosystem/IntegrationsPage.js +45 -45
- package/dist/components/docs/ecosystem/PluginsPage.js +73 -73
- package/dist/components/docs/ecosystem/RegistryPage.js +37 -37
- package/dist/components/docs/ecosystem/TemplatesPage.js +56 -56
- package/dist/components/docs/ecosystem/index.js +211 -211
- package/dist/components/docs/examples/DocsExamplesPage.js +21 -21
- package/dist/components/docs/examples/index.js +21 -21
- package/dist/components/docs/getting-started/CLIPage.js +95 -95
- package/dist/components/docs/getting-started/CompatibilityPage.js +81 -81
- package/dist/components/docs/getting-started/DataViewTutorialPage.js +57 -57
- package/dist/components/docs/getting-started/DeveloperToolsPage.js +61 -61
- package/dist/components/docs/getting-started/HelloWorldPage.js +77 -77
- package/dist/components/docs/getting-started/InstallationPage.js +65 -65
- package/dist/components/docs/getting-started/StartHerePage.js +51 -51
- package/dist/components/docs/getting-started/TroubleshootingPage.js +73 -73
- package/dist/components/docs/getting-started/VSCodeExtensionPage.js +171 -171
- package/dist/components/docs/getting-started/index.js +731 -731
- package/dist/components/docs/guides/GuideCIDiffGatingPage.js +80 -80
- package/dist/components/docs/guides/GuideContractTypesPage.js +232 -232
- package/dist/components/docs/guides/GuideDocsPipelinePage.js +82 -82
- package/dist/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +84 -84
- package/dist/components/docs/guides/GuideImportExistingCodebasesPage.js +324 -324
- package/dist/components/docs/guides/GuideNextjsOneEndpointPage.js +106 -106
- package/dist/components/docs/guides/GuideSpecValidationTypingPage.js +78 -78
- package/dist/components/docs/guides/GuidesIndexPage.js +43 -43
- package/dist/components/docs/guides/index.js +975 -975
- package/dist/components/docs/index.js +10791 -10791
- package/dist/components/docs/integrations/IntegrationsCircuitBreakersPage.js +17 -17
- package/dist/components/docs/integrations/IntegrationsElevenLabsPage.js +47 -47
- package/dist/components/docs/integrations/IntegrationsGithubPage.js +61 -61
- package/dist/components/docs/integrations/IntegrationsGmailPage.js +49 -49
- package/dist/components/docs/integrations/IntegrationsGoogleCalendarPage.js +33 -33
- package/dist/components/docs/integrations/IntegrationsHealthRoutingPage.js +65 -65
- package/dist/components/docs/integrations/IntegrationsMistralPage.js +69 -69
- package/dist/components/docs/integrations/IntegrationsOpenAIPage.js +65 -65
- package/dist/components/docs/integrations/IntegrationsOverviewPage.js +313 -313
- package/dist/components/docs/integrations/IntegrationsPostmarkPage.js +101 -101
- package/dist/components/docs/integrations/IntegrationsPowensPage.js +121 -121
- package/dist/components/docs/integrations/IntegrationsQdrantPage.js +49 -49
- package/dist/components/docs/integrations/IntegrationsResendPage.js +45 -45
- package/dist/components/docs/integrations/IntegrationsS3Page.js +57 -57
- package/dist/components/docs/integrations/IntegrationsSlackPage.js +63 -63
- package/dist/components/docs/integrations/IntegrationsSpecModelPage.js +139 -139
- package/dist/components/docs/integrations/IntegrationsStripePage.js +159 -159
- package/dist/components/docs/integrations/IntegrationsTwilioPage.js +61 -61
- package/dist/components/docs/integrations/IntegrationsWhatsappMetaPage.js +63 -63
- package/dist/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +65 -65
- package/dist/components/docs/integrations/index.js +1642 -1642
- package/dist/components/docs/intent/ContractFirstApiPage.js +51 -51
- package/dist/components/docs/intent/DeterministicCodegenPage.js +59 -59
- package/dist/components/docs/intent/GenerateClientFromSchemaPage.js +85 -85
- package/dist/components/docs/intent/OpenapiAlternativePage.js +91 -91
- package/dist/components/docs/intent/SchemaValidationTypescriptPage.js +59 -59
- package/dist/components/docs/intent/SpecDrivenDevelopmentPage.js +51 -51
- package/dist/components/docs/intent/index.js +396 -396
- package/dist/components/docs/knowledge/KnowledgeCategoriesPage.js +371 -371
- package/dist/components/docs/knowledge/KnowledgeExamplesPage.js +79 -79
- package/dist/components/docs/knowledge/KnowledgeOverviewPage.js +185 -185
- package/dist/components/docs/knowledge/KnowledgeSourcesPage.js +187 -187
- package/dist/components/docs/knowledge/KnowledgeSpacesPage.js +141 -141
- package/dist/components/docs/knowledge/index.js +963 -963
- package/dist/components/docs/libraries/LibrariesAccessibilityPage.js +85 -85
- package/dist/components/docs/libraries/LibrariesAiAgentPage.js +63 -63
- package/dist/components/docs/libraries/LibrariesAnalyticsPage.js +33 -33
- package/dist/components/docs/libraries/LibrariesContentGenPage.js +43 -43
- package/dist/components/docs/libraries/LibrariesContractsPage.js +125 -125
- package/dist/components/docs/libraries/LibrariesCostTrackingPage.js +45 -45
- package/dist/components/docs/libraries/LibrariesDataBackendPage.js +69 -69
- package/dist/components/docs/libraries/LibrariesDataViewsPage.js +79 -79
- package/dist/components/docs/libraries/LibrariesDesignSystemPage.js +129 -129
- package/dist/components/docs/libraries/LibrariesEvolutionPage.js +49 -49
- package/dist/components/docs/libraries/LibrariesGraphQLPage.js +73 -73
- package/dist/components/docs/libraries/LibrariesGrowthPage.js +35 -35
- package/dist/components/docs/libraries/LibrariesMultiTenancyPage.js +43 -43
- package/dist/components/docs/libraries/LibrariesObservabilityPage.js +53 -53
- package/dist/components/docs/libraries/LibrariesOverlayEnginePage.js +45 -45
- package/dist/components/docs/libraries/LibrariesOverviewPage.js +191 -191
- package/dist/components/docs/libraries/LibrariesPersonalizationPage.js +47 -47
- package/dist/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +53 -53
- package/dist/components/docs/libraries/LibrariesResiliencePage.js +49 -49
- package/dist/components/docs/libraries/LibrariesRuntimePage.js +87 -87
- package/dist/components/docs/libraries/LibrariesSLOPage.js +47 -47
- package/dist/components/docs/libraries/LibrariesSchemaPage.js +139 -139
- package/dist/components/docs/libraries/LibrariesSupportBotPage.js +57 -57
- package/dist/components/docs/libraries/LibrariesTestingPage.js +49 -49
- package/dist/components/docs/libraries/LibrariesUIKitPage.js +107 -107
- package/dist/components/docs/libraries/LibrariesWorkflowComposerPage.js +35 -35
- package/dist/components/docs/libraries/LibrariesWorkflowsPage.js +89 -89
- package/dist/components/docs/libraries/index.js +1919 -1919
- package/dist/components/docs/manifesto/ManifestoPage.js +79 -79
- package/dist/components/docs/ops/AutoEvolutionOpsPage.js +59 -59
- package/dist/components/docs/ops/DistributedTracingOpsPage.js +33 -33
- package/dist/components/docs/ops/index.js +92 -92
- package/dist/components/docs/reference/DocsMarkdownContent.js +27 -27
- package/dist/components/docs/reference/DocsReferenceContent.js +34 -34
- package/dist/components/docs/reference/DocsReferenceIndexClient.js +23 -23
- package/dist/components/docs/reference/DocsReferenceIndexPage.js +26 -26
- package/dist/components/docs/reference/DocsReferencePage.js +37 -37
- package/dist/components/docs/reference/index.js +63 -63
- package/dist/components/docs/safety/SafetyAuditingPage.js +161 -161
- package/dist/components/docs/safety/SafetyMigrationsPage.js +169 -169
- package/dist/components/docs/safety/SafetyOverviewPage.js +99 -99
- package/dist/components/docs/safety/SafetyPDPPage.js +137 -137
- package/dist/components/docs/safety/SafetySecurityTrustPage.js +95 -95
- package/dist/components/docs/safety/SafetySigningPage.js +39 -39
- package/dist/components/docs/safety/SafetyTenantIsolationPage.js +33 -33
- package/dist/components/docs/safety/index.js +733 -733
- package/dist/components/docs/shared/StudioPrompt.js +9 -9
- package/dist/components/docs/specs/SpecsCapabilitiesPage.js +61 -61
- package/dist/components/docs/specs/SpecsDataViewsPage.js +119 -119
- package/dist/components/docs/specs/SpecsOverlaysPage.js +171 -171
- package/dist/components/docs/specs/SpecsOverviewPage.js +167 -167
- package/dist/components/docs/specs/SpecsPolicyPage.js +179 -179
- package/dist/components/docs/specs/SpecsWorkflowsPage.js +141 -141
- package/dist/components/docs/specs/index.js +838 -838
- package/dist/components/docs/studio/StudioBYOKPage.js +9 -9
- package/dist/components/docs/studio/StudioDeploymentsPage.js +9 -9
- package/dist/components/docs/studio/StudioGettingStartedPage.js +9 -9
- package/dist/components/docs/studio/StudioIntegrationsPage.js +9 -9
- package/dist/components/docs/studio/StudioOverviewPage.js +33 -33
- package/dist/components/docs/studio/StudioVisualBuilderPage.js +9 -9
- package/dist/components/docs/studio/index.js +78 -78
- package/dist/components/integrations/index.js +209 -209
- package/dist/components/integrations/molecules/IntegrationCard.js +33 -33
- package/dist/components/integrations/organisms/IntegrationMarketplace.js +71 -71
- package/dist/components/integrations/organisms/IntegrationSettings.js +98 -98
- package/dist/components/integrations/organisms/KnowledgeSourceList.js +40 -40
- package/dist/components/legal/PrivacyTemplate.js +477 -477
- package/dist/components/legal/TermsTemplate.js +421 -421
- package/dist/components/legal/index.js +898 -898
- package/dist/components/shared/FeatureGateNotice.js +13 -13
- package/dist/components/shared/index.js +13 -13
- package/dist/components/shell/WorkspaceHeader.js +37 -37
- package/dist/components/shell/WorkspaceProjectShellLayout.js +77 -77
- package/dist/components/shell/WorkspaceShellRenderer.d.ts +17 -0
- package/dist/components/shell/WorkspaceShellRenderer.js +229 -0
- package/dist/components/shell/WorkspaceSidebar.js +27 -27
- package/dist/components/shell/index.d.ts +1 -0
- package/dist/components/shell/index.js +140 -77
- package/dist/components/templates/index.js +272 -272
- package/dist/components/templates/messaging/ConversationList.js +27 -27
- package/dist/components/templates/messaging/MessageComposer.js +27 -27
- package/dist/components/templates/messaging/MessageThread.js +18 -18
- package/dist/components/templates/messaging/MessagingWorkspace.js +65 -65
- package/dist/components/templates/messaging/index.js +65 -65
- package/dist/components/templates/recipes/LanguageSwitcher.js +5 -5
- package/dist/components/templates/recipes/RecipeCard.js +26 -26
- package/dist/components/templates/recipes/RecipeDetail.js +33 -33
- package/dist/components/templates/recipes/RecipeList.js +80 -80
- package/dist/components/templates/recipes/index.js +80 -80
- package/dist/components/templates/todos/FilterBar.js +39 -39
- package/dist/components/templates/todos/TaskForm.js +43 -43
- package/dist/components/templates/todos/TaskItem.js +30 -30
- package/dist/components/templates/todos/TaskList.js +127 -127
- package/dist/components/templates/todos/index.js +127 -127
- package/dist/index.js +12323 -12260
- package/dist/infrastructure/elysia/index.js +8 -8
- package/dist/infrastructure/elysia/logger.js +8 -8
- package/dist/infrastructure/index.js +8 -8
- package/dist/libs/posthog/client.js +2 -2
- package/dist/node/application/index.js +8 -8
- package/dist/node/application/mcp/cliMcp.js +8 -8
- package/dist/node/application/mcp/contractsMcp.js +8 -8
- package/dist/node/application/mcp/docsMcp.js +8 -8
- package/dist/node/application/mcp/index.js +8 -8
- package/dist/node/application/mcp/internalMcp.js +8 -8
- package/dist/node/application/mcp/providerRankingMcp.js +8 -8
- package/dist/node/bundles/LibraryBundle.js +138 -0
- package/dist/node/bundles/index.js +138 -0
- package/dist/node/components/docs/DocsIndexPage.js +91 -91
- package/dist/node/components/docs/advanced/AdvancedMCPPage.js +125 -125
- package/dist/node/components/docs/advanced/AdvancedOverlayEditorPage.js +49 -49
- package/dist/node/components/docs/advanced/AdvancedRenderersPage.js +51 -51
- package/dist/node/components/docs/advanced/AdvancedSpecExperimentsPage.js +35 -35
- package/dist/node/components/docs/advanced/AdvancedTelemetryPage.js +177 -177
- package/dist/node/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +45 -45
- package/dist/node/components/docs/advanced/index.js +482 -482
- package/dist/node/components/docs/architecture/ArchitectureAppConfigPage.js +107 -107
- package/dist/node/components/docs/architecture/ArchitectureControlPlanePage.js +73 -73
- package/dist/node/components/docs/architecture/ArchitectureIntegrationBindingPage.js +117 -117
- package/dist/node/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +175 -175
- package/dist/node/components/docs/architecture/ArchitectureMultiTenancyPage.js +71 -71
- package/dist/node/components/docs/architecture/ArchitectureOverviewPage.js +205 -205
- package/dist/node/components/docs/architecture/index.js +748 -748
- package/dist/node/components/docs/comparison/ComparisonAutomationPlatformsPage.js +117 -117
- package/dist/node/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +111 -111
- package/dist/node/components/docs/comparison/ComparisonInternalToolBuildersPage.js +117 -117
- package/dist/node/components/docs/comparison/ComparisonOverviewPage.js +97 -97
- package/dist/node/components/docs/comparison/ComparisonWindmillPage.js +125 -125
- package/dist/node/components/docs/comparison/ComparisonWorkflowEnginesPage.js +171 -171
- package/dist/node/components/docs/comparison/index.js +738 -738
- package/dist/node/components/docs/ecosystem/IntegrationsPage.js +45 -45
- package/dist/node/components/docs/ecosystem/PluginsPage.js +73 -73
- package/dist/node/components/docs/ecosystem/RegistryPage.js +37 -37
- package/dist/node/components/docs/ecosystem/TemplatesPage.js +56 -56
- package/dist/node/components/docs/ecosystem/index.js +211 -211
- package/dist/node/components/docs/examples/DocsExamplesPage.js +21 -21
- package/dist/node/components/docs/examples/index.js +21 -21
- package/dist/node/components/docs/getting-started/CLIPage.js +95 -95
- package/dist/node/components/docs/getting-started/CompatibilityPage.js +81 -81
- package/dist/node/components/docs/getting-started/DataViewTutorialPage.js +57 -57
- package/dist/node/components/docs/getting-started/DeveloperToolsPage.js +61 -61
- package/dist/node/components/docs/getting-started/HelloWorldPage.js +77 -77
- package/dist/node/components/docs/getting-started/InstallationPage.js +65 -65
- package/dist/node/components/docs/getting-started/StartHerePage.js +51 -51
- package/dist/node/components/docs/getting-started/TroubleshootingPage.js +73 -73
- package/dist/node/components/docs/getting-started/VSCodeExtensionPage.js +171 -171
- package/dist/node/components/docs/getting-started/index.js +731 -731
- package/dist/node/components/docs/guides/GuideCIDiffGatingPage.js +80 -80
- package/dist/node/components/docs/guides/GuideContractTypesPage.js +232 -232
- package/dist/node/components/docs/guides/GuideDocsPipelinePage.js +82 -82
- package/dist/node/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +84 -84
- package/dist/node/components/docs/guides/GuideImportExistingCodebasesPage.js +324 -324
- package/dist/node/components/docs/guides/GuideNextjsOneEndpointPage.js +106 -106
- package/dist/node/components/docs/guides/GuideSpecValidationTypingPage.js +78 -78
- package/dist/node/components/docs/guides/GuidesIndexPage.js +43 -43
- package/dist/node/components/docs/guides/index.js +975 -975
- package/dist/node/components/docs/index.js +10791 -10791
- package/dist/node/components/docs/integrations/IntegrationsCircuitBreakersPage.js +17 -17
- package/dist/node/components/docs/integrations/IntegrationsElevenLabsPage.js +47 -47
- package/dist/node/components/docs/integrations/IntegrationsGithubPage.js +61 -61
- package/dist/node/components/docs/integrations/IntegrationsGmailPage.js +49 -49
- package/dist/node/components/docs/integrations/IntegrationsGoogleCalendarPage.js +33 -33
- package/dist/node/components/docs/integrations/IntegrationsHealthRoutingPage.js +65 -65
- package/dist/node/components/docs/integrations/IntegrationsMistralPage.js +69 -69
- package/dist/node/components/docs/integrations/IntegrationsOpenAIPage.js +65 -65
- package/dist/node/components/docs/integrations/IntegrationsOverviewPage.js +313 -313
- package/dist/node/components/docs/integrations/IntegrationsPostmarkPage.js +101 -101
- package/dist/node/components/docs/integrations/IntegrationsPowensPage.js +121 -121
- package/dist/node/components/docs/integrations/IntegrationsQdrantPage.js +49 -49
- package/dist/node/components/docs/integrations/IntegrationsResendPage.js +45 -45
- package/dist/node/components/docs/integrations/IntegrationsS3Page.js +57 -57
- package/dist/node/components/docs/integrations/IntegrationsSlackPage.js +63 -63
- package/dist/node/components/docs/integrations/IntegrationsSpecModelPage.js +139 -139
- package/dist/node/components/docs/integrations/IntegrationsStripePage.js +159 -159
- package/dist/node/components/docs/integrations/IntegrationsTwilioPage.js +61 -61
- package/dist/node/components/docs/integrations/IntegrationsWhatsappMetaPage.js +63 -63
- package/dist/node/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +65 -65
- package/dist/node/components/docs/integrations/index.js +1642 -1642
- package/dist/node/components/docs/intent/ContractFirstApiPage.js +51 -51
- package/dist/node/components/docs/intent/DeterministicCodegenPage.js +59 -59
- package/dist/node/components/docs/intent/GenerateClientFromSchemaPage.js +85 -85
- package/dist/node/components/docs/intent/OpenapiAlternativePage.js +91 -91
- package/dist/node/components/docs/intent/SchemaValidationTypescriptPage.js +59 -59
- package/dist/node/components/docs/intent/SpecDrivenDevelopmentPage.js +51 -51
- package/dist/node/components/docs/intent/index.js +396 -396
- package/dist/node/components/docs/knowledge/KnowledgeCategoriesPage.js +371 -371
- package/dist/node/components/docs/knowledge/KnowledgeExamplesPage.js +79 -79
- package/dist/node/components/docs/knowledge/KnowledgeOverviewPage.js +185 -185
- package/dist/node/components/docs/knowledge/KnowledgeSourcesPage.js +187 -187
- package/dist/node/components/docs/knowledge/KnowledgeSpacesPage.js +141 -141
- package/dist/node/components/docs/knowledge/index.js +963 -963
- package/dist/node/components/docs/libraries/LibrariesAccessibilityPage.js +85 -85
- package/dist/node/components/docs/libraries/LibrariesAiAgentPage.js +63 -63
- package/dist/node/components/docs/libraries/LibrariesAnalyticsPage.js +33 -33
- package/dist/node/components/docs/libraries/LibrariesContentGenPage.js +43 -43
- package/dist/node/components/docs/libraries/LibrariesContractsPage.js +125 -125
- package/dist/node/components/docs/libraries/LibrariesCostTrackingPage.js +45 -45
- package/dist/node/components/docs/libraries/LibrariesDataBackendPage.js +69 -69
- package/dist/node/components/docs/libraries/LibrariesDataViewsPage.js +79 -79
- package/dist/node/components/docs/libraries/LibrariesDesignSystemPage.js +129 -129
- package/dist/node/components/docs/libraries/LibrariesEvolutionPage.js +49 -49
- package/dist/node/components/docs/libraries/LibrariesGraphQLPage.js +73 -73
- package/dist/node/components/docs/libraries/LibrariesGrowthPage.js +35 -35
- package/dist/node/components/docs/libraries/LibrariesMultiTenancyPage.js +43 -43
- package/dist/node/components/docs/libraries/LibrariesObservabilityPage.js +53 -53
- package/dist/node/components/docs/libraries/LibrariesOverlayEnginePage.js +45 -45
- package/dist/node/components/docs/libraries/LibrariesOverviewPage.js +191 -191
- package/dist/node/components/docs/libraries/LibrariesPersonalizationPage.js +47 -47
- package/dist/node/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +53 -53
- package/dist/node/components/docs/libraries/LibrariesResiliencePage.js +49 -49
- package/dist/node/components/docs/libraries/LibrariesRuntimePage.js +87 -87
- package/dist/node/components/docs/libraries/LibrariesSLOPage.js +47 -47
- package/dist/node/components/docs/libraries/LibrariesSchemaPage.js +139 -139
- package/dist/node/components/docs/libraries/LibrariesSupportBotPage.js +57 -57
- package/dist/node/components/docs/libraries/LibrariesTestingPage.js +49 -49
- package/dist/node/components/docs/libraries/LibrariesUIKitPage.js +107 -107
- package/dist/node/components/docs/libraries/LibrariesWorkflowComposerPage.js +35 -35
- package/dist/node/components/docs/libraries/LibrariesWorkflowsPage.js +89 -89
- package/dist/node/components/docs/libraries/index.js +1919 -1919
- package/dist/node/components/docs/manifesto/ManifestoPage.js +79 -79
- package/dist/node/components/docs/ops/AutoEvolutionOpsPage.js +59 -59
- package/dist/node/components/docs/ops/DistributedTracingOpsPage.js +33 -33
- package/dist/node/components/docs/ops/index.js +92 -92
- package/dist/node/components/docs/reference/DocsMarkdownContent.js +27 -27
- package/dist/node/components/docs/reference/DocsReferenceContent.js +34 -34
- package/dist/node/components/docs/reference/DocsReferenceIndexClient.js +23 -23
- package/dist/node/components/docs/reference/DocsReferenceIndexPage.js +26 -26
- package/dist/node/components/docs/reference/DocsReferencePage.js +37 -37
- package/dist/node/components/docs/reference/index.js +63 -63
- package/dist/node/components/docs/safety/SafetyAuditingPage.js +161 -161
- package/dist/node/components/docs/safety/SafetyMigrationsPage.js +169 -169
- package/dist/node/components/docs/safety/SafetyOverviewPage.js +99 -99
- package/dist/node/components/docs/safety/SafetyPDPPage.js +137 -137
- package/dist/node/components/docs/safety/SafetySecurityTrustPage.js +95 -95
- package/dist/node/components/docs/safety/SafetySigningPage.js +39 -39
- package/dist/node/components/docs/safety/SafetyTenantIsolationPage.js +33 -33
- package/dist/node/components/docs/safety/index.js +733 -733
- package/dist/node/components/docs/shared/StudioPrompt.js +9 -9
- package/dist/node/components/docs/specs/SpecsCapabilitiesPage.js +61 -61
- package/dist/node/components/docs/specs/SpecsDataViewsPage.js +119 -119
- package/dist/node/components/docs/specs/SpecsOverlaysPage.js +171 -171
- package/dist/node/components/docs/specs/SpecsOverviewPage.js +167 -167
- package/dist/node/components/docs/specs/SpecsPolicyPage.js +179 -179
- package/dist/node/components/docs/specs/SpecsWorkflowsPage.js +141 -141
- package/dist/node/components/docs/specs/index.js +838 -838
- package/dist/node/components/docs/studio/StudioBYOKPage.js +9 -9
- package/dist/node/components/docs/studio/StudioDeploymentsPage.js +9 -9
- package/dist/node/components/docs/studio/StudioGettingStartedPage.js +9 -9
- package/dist/node/components/docs/studio/StudioIntegrationsPage.js +9 -9
- package/dist/node/components/docs/studio/StudioOverviewPage.js +33 -33
- package/dist/node/components/docs/studio/StudioVisualBuilderPage.js +9 -9
- package/dist/node/components/docs/studio/index.js +78 -78
- package/dist/node/components/integrations/index.js +209 -209
- package/dist/node/components/integrations/molecules/IntegrationCard.js +33 -33
- package/dist/node/components/integrations/organisms/IntegrationMarketplace.js +71 -71
- package/dist/node/components/integrations/organisms/IntegrationSettings.js +98 -98
- package/dist/node/components/integrations/organisms/KnowledgeSourceList.js +40 -40
- package/dist/node/components/legal/PrivacyTemplate.js +477 -477
- package/dist/node/components/legal/TermsTemplate.js +421 -421
- package/dist/node/components/legal/index.js +898 -898
- package/dist/node/components/shared/FeatureGateNotice.js +13 -13
- package/dist/node/components/shared/index.js +13 -13
- package/dist/node/components/shell/WorkspaceHeader.js +37 -37
- package/dist/node/components/shell/WorkspaceProjectShellLayout.js +77 -77
- package/dist/node/components/shell/WorkspaceShellRenderer.js +228 -0
- package/dist/node/components/shell/WorkspaceSidebar.js +27 -27
- package/dist/node/components/shell/index.js +140 -77
- package/dist/node/components/templates/index.js +272 -272
- package/dist/node/components/templates/messaging/ConversationList.js +27 -27
- package/dist/node/components/templates/messaging/MessageComposer.js +27 -27
- package/dist/node/components/templates/messaging/MessageThread.js +18 -18
- package/dist/node/components/templates/messaging/MessagingWorkspace.js +65 -65
- package/dist/node/components/templates/messaging/index.js +65 -65
- package/dist/node/components/templates/recipes/LanguageSwitcher.js +5 -5
- package/dist/node/components/templates/recipes/RecipeCard.js +26 -26
- package/dist/node/components/templates/recipes/RecipeDetail.js +33 -33
- package/dist/node/components/templates/recipes/RecipeList.js +80 -80
- package/dist/node/components/templates/recipes/index.js +80 -80
- package/dist/node/components/templates/todos/FilterBar.js +39 -39
- package/dist/node/components/templates/todos/TaskForm.js +43 -43
- package/dist/node/components/templates/todos/TaskItem.js +30 -30
- package/dist/node/components/templates/todos/TaskList.js +127 -127
- package/dist/node/components/templates/todos/index.js +127 -127
- package/dist/node/index.js +12323 -12260
- package/dist/node/infrastructure/elysia/index.js +8 -8
- package/dist/node/infrastructure/elysia/logger.js +8 -8
- package/dist/node/infrastructure/index.js +8 -8
- package/dist/node/libs/posthog/client.js +2 -2
- package/dist/node/presentation/features/atoms/FeatureIcon/FeatureIcon.js +3 -3
- package/dist/node/presentation/features/atoms/FeatureIcon/index.js +3 -3
- package/dist/node/presentation/features/atoms/index.js +3 -3
- package/dist/node/presentation/features/index.js +915 -915
- package/dist/node/presentation/features/molecules/FeatureCard/FeatureCard.js +101 -101
- package/dist/node/presentation/features/molecules/FeatureCard/index.js +101 -101
- package/dist/node/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +15 -15
- package/dist/node/presentation/features/molecules/FeatureCategoryHeader/index.js +15 -15
- package/dist/node/presentation/features/molecules/FeatureFilters/FeatureFilters.js +23 -23
- package/dist/node/presentation/features/molecules/FeatureFilters/index.js +23 -23
- package/dist/node/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +67 -67
- package/dist/node/presentation/features/molecules/FeatureHoverPreview/index.js +67 -67
- package/dist/node/presentation/features/molecules/index.js +139 -139
- package/dist/node/presentation/features/organisms/FeatureDataViewsList.js +7 -7
- package/dist/node/presentation/features/organisms/FeatureDetail/FeatureDetail.js +57 -57
- package/dist/node/presentation/features/organisms/FeatureDetail/index.js +57 -57
- package/dist/node/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +183 -183
- package/dist/node/presentation/features/organisms/FeatureDiscovery/index.js +183 -183
- package/dist/node/presentation/features/organisms/FeatureEventsList.js +7 -7
- package/dist/node/presentation/features/organisms/FeatureFormsList.js +7 -7
- package/dist/node/presentation/features/organisms/FeatureOperationsList.js +7 -7
- package/dist/node/presentation/features/organisms/FeaturePresentationsList.js +7 -7
- package/dist/node/presentation/features/organisms/index.js +275 -275
- package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +126 -126
- package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +126 -126
- package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +16 -16
- package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/index.js +16 -16
- package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +112 -112
- package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/index.js +112 -112
- package/dist/node/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +16 -16
- package/dist/node/presentation/features/templates/FeatureEventsTemplate/index.js +16 -16
- package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +126 -126
- package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/index.js +126 -126
- package/dist/node/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +16 -16
- package/dist/node/presentation/features/templates/FeatureFormsTemplate/index.js +16 -16
- package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +110 -110
- package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/index.js +110 -110
- package/dist/node/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +16 -16
- package/dist/node/presentation/features/templates/FeatureOperationsTemplate/index.js +16 -16
- package/dist/node/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +66 -66
- package/dist/node/presentation/features/templates/FeatureOverviewTemplate/index.js +66 -66
- package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +112 -112
- package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +112 -112
- package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +16 -16
- package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/index.js +16 -16
- package/dist/presentation/features/atoms/FeatureIcon/FeatureIcon.js +3 -3
- package/dist/presentation/features/atoms/FeatureIcon/index.js +3 -3
- package/dist/presentation/features/atoms/index.js +3 -3
- package/dist/presentation/features/index.js +915 -915
- package/dist/presentation/features/molecules/FeatureCard/FeatureCard.js +101 -101
- package/dist/presentation/features/molecules/FeatureCard/index.js +101 -101
- package/dist/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +15 -15
- package/dist/presentation/features/molecules/FeatureCategoryHeader/index.js +15 -15
- package/dist/presentation/features/molecules/FeatureFilters/FeatureFilters.js +23 -23
- package/dist/presentation/features/molecules/FeatureFilters/index.js +23 -23
- package/dist/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +67 -67
- package/dist/presentation/features/molecules/FeatureHoverPreview/index.js +67 -67
- package/dist/presentation/features/molecules/index.js +139 -139
- package/dist/presentation/features/organisms/FeatureDataViewsList.js +7 -7
- package/dist/presentation/features/organisms/FeatureDetail/FeatureDetail.js +57 -57
- package/dist/presentation/features/organisms/FeatureDetail/index.js +57 -57
- package/dist/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +183 -183
- package/dist/presentation/features/organisms/FeatureDiscovery/index.js +183 -183
- package/dist/presentation/features/organisms/FeatureEventsList.js +7 -7
- package/dist/presentation/features/organisms/FeatureFormsList.js +7 -7
- package/dist/presentation/features/organisms/FeatureOperationsList.js +7 -7
- package/dist/presentation/features/organisms/FeaturePresentationsList.js +7 -7
- package/dist/presentation/features/organisms/index.js +275 -275
- package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +126 -126
- package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +126 -126
- package/dist/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +16 -16
- package/dist/presentation/features/templates/FeatureDataViewsTemplate/index.js +16 -16
- package/dist/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +112 -112
- package/dist/presentation/features/templates/FeatureEventDetailTemplate/index.js +112 -112
- package/dist/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +16 -16
- package/dist/presentation/features/templates/FeatureEventsTemplate/index.js +16 -16
- package/dist/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +126 -126
- package/dist/presentation/features/templates/FeatureFormDetailTemplate/index.js +126 -126
- package/dist/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +16 -16
- package/dist/presentation/features/templates/FeatureFormsTemplate/index.js +16 -16
- package/dist/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +110 -110
- package/dist/presentation/features/templates/FeatureOperationDetailTemplate/index.js +110 -110
- package/dist/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +16 -16
- package/dist/presentation/features/templates/FeatureOperationsTemplate/index.js +16 -16
- package/dist/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +66 -66
- package/dist/presentation/features/templates/FeatureOverviewTemplate/index.js +66 -66
- package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +112 -112
- package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +112 -112
- package/dist/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +16 -16
- package/dist/presentation/features/templates/FeaturePresentationsTemplate/index.js +16 -16
- package/package.json +71 -22
- package/src/bundles/LibraryBundle.ts +152 -0
- package/src/bundles/index.ts +1 -0
- package/src/components/shell/WorkspaceShellRenderer.tsx +90 -0
- package/src/components/shell/index.ts +1 -0
|
@@ -1,203 +1,203 @@
|
|
|
1
1
|
// src/components/docs/shared/StudioPrompt.tsx
|
|
2
2
|
import Link from "@contractspec/lib.ui-link";
|
|
3
|
-
import {
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
function StudioPrompt({
|
|
5
5
|
title = "Want to turn product signals into spec-first deliverables?",
|
|
6
6
|
body = "ContractSpec Studio ingests evidence from meetings, support, analytics, docs, and code, then compiles decisions into spec diffs and task packs.",
|
|
7
7
|
ctaLabel = "Try Studio",
|
|
8
8
|
href = "https://www.contractspec.studio"
|
|
9
9
|
}) {
|
|
10
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
11
11
|
className: "card-subtle space-y-3 p-6",
|
|
12
12
|
children: [
|
|
13
|
-
/* @__PURE__ */
|
|
13
|
+
/* @__PURE__ */ jsx("h3", {
|
|
14
14
|
className: "text-lg font-semibold",
|
|
15
15
|
children: title
|
|
16
|
-
}
|
|
17
|
-
/* @__PURE__ */
|
|
16
|
+
}),
|
|
17
|
+
/* @__PURE__ */ jsx("p", {
|
|
18
18
|
className: "text-muted-foreground text-sm",
|
|
19
19
|
children: body
|
|
20
|
-
}
|
|
21
|
-
/* @__PURE__ */
|
|
20
|
+
}),
|
|
21
|
+
/* @__PURE__ */ jsx(Link, {
|
|
22
22
|
href,
|
|
23
23
|
className: "btn-primary",
|
|
24
24
|
children: ctaLabel
|
|
25
|
-
}
|
|
25
|
+
})
|
|
26
26
|
]
|
|
27
|
-
}
|
|
27
|
+
});
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
// src/components/docs/guides/GuideCIDiffGatingPage.tsx
|
|
31
31
|
import { CodeBlock } from "@contractspec/lib.design-system";
|
|
32
32
|
import Link2 from "@contractspec/lib.ui-link";
|
|
33
33
|
import { ChevronRight } from "lucide-react";
|
|
34
|
-
import {
|
|
34
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
35
35
|
function GuideCIDiffGatingPage() {
|
|
36
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
37
37
|
className: "space-y-8",
|
|
38
38
|
children: [
|
|
39
|
-
/* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
40
40
|
className: "space-y-3",
|
|
41
41
|
children: [
|
|
42
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ jsx2("h1", {
|
|
43
43
|
className: "text-4xl font-bold",
|
|
44
44
|
children: "CI gating with deterministic diffs"
|
|
45
|
-
}
|
|
46
|
-
/* @__PURE__ */
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ jsx2("p", {
|
|
47
47
|
className: "text-muted-foreground text-lg",
|
|
48
48
|
children: "Add ContractSpec CI checks that validate specs, detect drift, and gate breaking changes before merge."
|
|
49
|
-
}
|
|
49
|
+
})
|
|
50
50
|
]
|
|
51
|
-
}
|
|
52
|
-
/* @__PURE__ */
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
53
53
|
className: "card-subtle space-y-4 p-6",
|
|
54
54
|
children: [
|
|
55
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
56
56
|
className: "text-2xl font-bold",
|
|
57
57
|
children: "What you'll build"
|
|
58
|
-
}
|
|
59
|
-
/* @__PURE__ */
|
|
58
|
+
}),
|
|
59
|
+
/* @__PURE__ */ jsxs2("ul", {
|
|
60
60
|
className: "text-muted-foreground space-y-2 text-sm",
|
|
61
61
|
children: [
|
|
62
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ jsx2("li", {
|
|
63
63
|
children: "CI workflow running ContractSpec validation and drift checks."
|
|
64
|
-
}
|
|
65
|
-
/* @__PURE__ */
|
|
64
|
+
}),
|
|
65
|
+
/* @__PURE__ */ jsx2("li", {
|
|
66
66
|
children: "Machine-readable output for PR annotations."
|
|
67
|
-
}
|
|
68
|
-
/* @__PURE__ */
|
|
67
|
+
}),
|
|
68
|
+
/* @__PURE__ */ jsx2("li", {
|
|
69
69
|
children: "Deterministic contract diffs in review."
|
|
70
|
-
}
|
|
70
|
+
})
|
|
71
71
|
]
|
|
72
|
-
}
|
|
72
|
+
})
|
|
73
73
|
]
|
|
74
|
-
}
|
|
75
|
-
/* @__PURE__ */
|
|
74
|
+
}),
|
|
75
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
76
76
|
className: "space-y-6",
|
|
77
77
|
children: [
|
|
78
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
79
79
|
className: "space-y-3",
|
|
80
80
|
children: [
|
|
81
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
82
82
|
className: "text-2xl font-bold",
|
|
83
83
|
children: "1) Add the CI workflow"
|
|
84
|
-
}
|
|
85
|
-
/* @__PURE__ */
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ jsx2("p", {
|
|
86
86
|
className: "text-muted-foreground text-sm",
|
|
87
87
|
children: "Copy the template from the CLI package."
|
|
88
|
-
}
|
|
89
|
-
/* @__PURE__ */
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ jsx2(CodeBlock, {
|
|
90
90
|
language: "bash",
|
|
91
91
|
filename: "ci-copy",
|
|
92
92
|
code: `cp node_modules/@contractspec/app.cli-contractspec/templates/github-action.yml .github/workflows/contractspec.yml`
|
|
93
|
-
}
|
|
94
|
-
/* @__PURE__ */
|
|
93
|
+
}),
|
|
94
|
+
/* @__PURE__ */ jsxs2("p", {
|
|
95
95
|
className: "text-muted-foreground text-sm",
|
|
96
96
|
children: [
|
|
97
97
|
"Expected output: new workflow file in ",
|
|
98
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ jsx2("code", {
|
|
99
99
|
children: ".github/workflows"
|
|
100
|
-
}
|
|
100
|
+
}),
|
|
101
101
|
"."
|
|
102
102
|
]
|
|
103
|
-
}
|
|
103
|
+
})
|
|
104
104
|
]
|
|
105
|
-
}
|
|
106
|
-
/* @__PURE__ */
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
107
107
|
className: "space-y-3",
|
|
108
108
|
children: [
|
|
109
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
110
110
|
className: "text-2xl font-bold",
|
|
111
111
|
children: "2) Run CI locally"
|
|
112
|
-
}
|
|
113
|
-
/* @__PURE__ */
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ jsx2(CodeBlock, {
|
|
114
114
|
language: "bash",
|
|
115
115
|
filename: "ci-local",
|
|
116
116
|
code: `contractspec ci --format json --check-drift`
|
|
117
|
-
}
|
|
118
|
-
/* @__PURE__ */
|
|
117
|
+
}),
|
|
118
|
+
/* @__PURE__ */ jsx2("p", {
|
|
119
119
|
className: "text-muted-foreground text-sm",
|
|
120
120
|
children: "Expected output: JSON summary including pass/fail counts and drift status (if configured)."
|
|
121
|
-
}
|
|
121
|
+
})
|
|
122
122
|
]
|
|
123
|
-
}
|
|
124
|
-
/* @__PURE__ */
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
125
125
|
className: "space-y-3",
|
|
126
126
|
children: [
|
|
127
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
128
128
|
className: "text-2xl font-bold",
|
|
129
129
|
children: "3) Add a diff check"
|
|
130
|
-
}
|
|
131
|
-
/* @__PURE__ */
|
|
130
|
+
}),
|
|
131
|
+
/* @__PURE__ */ jsx2("p", {
|
|
132
132
|
className: "text-muted-foreground text-sm",
|
|
133
133
|
children: "Use the diff command to inspect breaking changes in PRs."
|
|
134
|
-
}
|
|
135
|
-
/* @__PURE__ */
|
|
134
|
+
}),
|
|
135
|
+
/* @__PURE__ */ jsx2(CodeBlock, {
|
|
136
136
|
language: "bash",
|
|
137
137
|
filename: "ci-diff",
|
|
138
138
|
code: `contractspec diff src/contracts/spec-v1.ts src/contracts/spec-v2.ts --breaking`
|
|
139
|
-
}
|
|
140
|
-
/* @__PURE__ */
|
|
139
|
+
}),
|
|
140
|
+
/* @__PURE__ */ jsx2("p", {
|
|
141
141
|
className: "text-muted-foreground text-sm",
|
|
142
142
|
children: "Expected output: deterministic diff with breaking change hints."
|
|
143
|
-
}
|
|
143
|
+
})
|
|
144
144
|
]
|
|
145
|
-
}
|
|
146
|
-
/* @__PURE__ */
|
|
145
|
+
}),
|
|
146
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
147
147
|
className: "card-subtle space-y-3 p-6",
|
|
148
148
|
children: [
|
|
149
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ jsx2("h3", {
|
|
150
150
|
className: "text-lg font-semibold",
|
|
151
151
|
children: "Example package"
|
|
152
|
-
}
|
|
153
|
-
/* @__PURE__ */
|
|
152
|
+
}),
|
|
153
|
+
/* @__PURE__ */ jsx2("p", {
|
|
154
154
|
className: "text-muted-foreground text-sm",
|
|
155
155
|
children: "The CRM pipeline example is already wired in the quickstart smoke test. Use it as a CI-ready template."
|
|
156
|
-
}
|
|
157
|
-
/* @__PURE__ */
|
|
156
|
+
}),
|
|
157
|
+
/* @__PURE__ */ jsx2(CodeBlock, {
|
|
158
158
|
language: "bash",
|
|
159
159
|
filename: "crm-ci",
|
|
160
160
|
code: `cd packages/examples/crm-pipeline
|
|
161
161
|
bun run build
|
|
162
162
|
bun run validate`
|
|
163
|
-
}
|
|
163
|
+
})
|
|
164
164
|
]
|
|
165
|
-
}
|
|
166
|
-
/* @__PURE__ */
|
|
165
|
+
}),
|
|
166
|
+
/* @__PURE__ */ jsx2(StudioPrompt, {
|
|
167
167
|
title: "Need continuous checks tied to outcomes?",
|
|
168
168
|
body: "Studio closes the loop with post-change verification and learning dividends that improve future decisions."
|
|
169
|
-
}
|
|
169
|
+
})
|
|
170
170
|
]
|
|
171
|
-
}
|
|
172
|
-
/* @__PURE__ */
|
|
171
|
+
}),
|
|
172
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
173
173
|
className: "flex items-center gap-4 pt-4",
|
|
174
174
|
children: [
|
|
175
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ jsxs2(Link2, {
|
|
176
176
|
href: "/docs/guides",
|
|
177
177
|
className: "btn-primary",
|
|
178
178
|
children: [
|
|
179
179
|
"Back to guides ",
|
|
180
|
-
/* @__PURE__ */
|
|
180
|
+
/* @__PURE__ */ jsx2(ChevronRight, {
|
|
181
181
|
size: 16
|
|
182
|
-
}
|
|
182
|
+
})
|
|
183
183
|
]
|
|
184
|
-
}
|
|
185
|
-
/* @__PURE__ */
|
|
184
|
+
}),
|
|
185
|
+
/* @__PURE__ */ jsx2(Link2, {
|
|
186
186
|
href: "/docs",
|
|
187
187
|
className: "btn-ghost",
|
|
188
188
|
children: "Docs home"
|
|
189
|
-
}
|
|
189
|
+
})
|
|
190
190
|
]
|
|
191
|
-
}
|
|
191
|
+
})
|
|
192
192
|
]
|
|
193
|
-
}
|
|
193
|
+
});
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
// src/components/docs/guides/GuideContractTypesPage.tsx
|
|
197
197
|
import { CodeBlock as CodeBlock2 } from "@contractspec/lib.design-system";
|
|
198
198
|
import Link3 from "@contractspec/lib.ui-link";
|
|
199
199
|
import { ChevronRight as ChevronRight2, Layers, Zap, Shield, Globe } from "lucide-react";
|
|
200
|
-
import {
|
|
200
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
201
201
|
var contractTypes = [
|
|
202
202
|
{
|
|
203
203
|
name: "Operations",
|
|
@@ -229,75 +229,75 @@ var contractTypes = [
|
|
|
229
229
|
}
|
|
230
230
|
];
|
|
231
231
|
function GuideContractTypesPage() {
|
|
232
|
-
return /* @__PURE__ */
|
|
232
|
+
return /* @__PURE__ */ jsxs3("div", {
|
|
233
233
|
className: "space-y-8",
|
|
234
234
|
children: [
|
|
235
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
236
236
|
className: "space-y-3",
|
|
237
237
|
children: [
|
|
238
|
-
/* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ jsx3("h1", {
|
|
239
239
|
className: "text-4xl font-bold",
|
|
240
240
|
children: "Contract Types Overview"
|
|
241
|
-
}
|
|
242
|
-
/* @__PURE__ */
|
|
241
|
+
}),
|
|
242
|
+
/* @__PURE__ */ jsx3("p", {
|
|
243
243
|
className: "text-muted-foreground text-lg",
|
|
244
244
|
children: "Learn about the different contract types in ContractSpec and when to use each one for spec-first development."
|
|
245
|
-
}
|
|
245
|
+
})
|
|
246
246
|
]
|
|
247
|
-
}
|
|
248
|
-
/* @__PURE__ */
|
|
247
|
+
}),
|
|
248
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
249
249
|
className: "card-subtle space-y-4 p-6",
|
|
250
250
|
children: [
|
|
251
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
252
252
|
className: "text-2xl font-bold",
|
|
253
253
|
children: "Core Contract Types"
|
|
254
|
-
}
|
|
255
|
-
/* @__PURE__ */
|
|
254
|
+
}),
|
|
255
|
+
/* @__PURE__ */ jsx3("div", {
|
|
256
256
|
className: "grid gap-3 md:grid-cols-2",
|
|
257
|
-
children: contractTypes.map((type) => /* @__PURE__ */
|
|
257
|
+
children: contractTypes.map((type) => /* @__PURE__ */ jsxs3("div", {
|
|
258
258
|
className: "flex items-start gap-3 rounded-lg border border-white/10 p-4",
|
|
259
259
|
children: [
|
|
260
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ jsx3(type.icon, {
|
|
261
261
|
className: type.color,
|
|
262
262
|
size: 20
|
|
263
|
-
}
|
|
264
|
-
/* @__PURE__ */
|
|
263
|
+
}),
|
|
264
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
265
265
|
className: "space-y-1",
|
|
266
266
|
children: [
|
|
267
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
268
268
|
className: "font-semibold",
|
|
269
269
|
children: type.name
|
|
270
|
-
}
|
|
271
|
-
/* @__PURE__ */
|
|
270
|
+
}),
|
|
271
|
+
/* @__PURE__ */ jsx3("p", {
|
|
272
272
|
className: "text-muted-foreground text-xs",
|
|
273
273
|
children: type.description
|
|
274
|
-
}
|
|
275
|
-
/* @__PURE__ */
|
|
274
|
+
}),
|
|
275
|
+
/* @__PURE__ */ jsx3("code", {
|
|
276
276
|
className: "text-xs text-violet-400",
|
|
277
277
|
children: type.factory
|
|
278
|
-
}
|
|
278
|
+
})
|
|
279
279
|
]
|
|
280
|
-
}
|
|
280
|
+
})
|
|
281
281
|
]
|
|
282
|
-
}, type.name
|
|
283
|
-
}
|
|
282
|
+
}, type.name))
|
|
283
|
+
})
|
|
284
284
|
]
|
|
285
|
-
}
|
|
286
|
-
/* @__PURE__ */
|
|
285
|
+
}),
|
|
286
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
287
287
|
className: "space-y-6",
|
|
288
288
|
children: [
|
|
289
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
290
290
|
className: "space-y-3",
|
|
291
291
|
children: [
|
|
292
|
-
/* @__PURE__ */
|
|
292
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
293
293
|
className: "text-2xl font-bold",
|
|
294
294
|
children: "1) Operations (Commands & Queries)"
|
|
295
|
-
}
|
|
296
|
-
/* @__PURE__ */
|
|
295
|
+
}),
|
|
296
|
+
/* @__PURE__ */ jsx3("p", {
|
|
297
297
|
className: "text-muted-foreground text-sm",
|
|
298
298
|
children: "Operations are the backbone of your API. Commands mutate state, queries read state. Both have typed input/output schemas."
|
|
299
|
-
}
|
|
300
|
-
/* @__PURE__ */
|
|
299
|
+
}),
|
|
300
|
+
/* @__PURE__ */ jsx3(CodeBlock2, {
|
|
301
301
|
language: "typescript",
|
|
302
302
|
filename: "src/contracts/user.operation.ts",
|
|
303
303
|
code: `import { defineCommand, defineQuery } from "@contractspec/lib.contracts-spec";
|
|
@@ -367,21 +367,21 @@ export const GetUserQuery = defineQuery({
|
|
|
367
367
|
},
|
|
368
368
|
policy: { auth: "user" },
|
|
369
369
|
});`
|
|
370
|
-
}
|
|
370
|
+
})
|
|
371
371
|
]
|
|
372
|
-
}
|
|
373
|
-
/* @__PURE__ */
|
|
372
|
+
}),
|
|
373
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
374
374
|
className: "space-y-3",
|
|
375
375
|
children: [
|
|
376
|
-
/* @__PURE__ */
|
|
376
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
377
377
|
className: "text-2xl font-bold",
|
|
378
378
|
children: "2) Events"
|
|
379
|
-
}
|
|
380
|
-
/* @__PURE__ */
|
|
379
|
+
}),
|
|
380
|
+
/* @__PURE__ */ jsx3("p", {
|
|
381
381
|
className: "text-muted-foreground text-sm",
|
|
382
382
|
children: "Events represent domain occurrences. They have typed payloads with PII field marking for compliance."
|
|
383
|
-
}
|
|
384
|
-
/* @__PURE__ */
|
|
383
|
+
}),
|
|
384
|
+
/* @__PURE__ */ jsx3(CodeBlock2, {
|
|
385
385
|
language: "typescript",
|
|
386
386
|
filename: "src/contracts/user.event.ts",
|
|
387
387
|
code: `import { defineEvent } from "@contractspec/lib.contracts-spec";
|
|
@@ -426,21 +426,21 @@ export const UserDeletedEvent = defineEvent({
|
|
|
426
426
|
},
|
|
427
427
|
}),
|
|
428
428
|
});`
|
|
429
|
-
}
|
|
429
|
+
})
|
|
430
430
|
]
|
|
431
|
-
}
|
|
432
|
-
/* @__PURE__ */
|
|
431
|
+
}),
|
|
432
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
433
433
|
className: "space-y-3",
|
|
434
434
|
children: [
|
|
435
|
-
/* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
436
436
|
className: "text-2xl font-bold",
|
|
437
437
|
children: "3) Capabilities"
|
|
438
|
-
}
|
|
439
|
-
/* @__PURE__ */
|
|
438
|
+
}),
|
|
439
|
+
/* @__PURE__ */ jsx3("p", {
|
|
440
440
|
className: "text-muted-foreground text-sm",
|
|
441
441
|
children: "Capabilities group related operations, events, and presentations. They define feature boundaries and dependencies."
|
|
442
|
-
}
|
|
443
|
-
/* @__PURE__ */
|
|
442
|
+
}),
|
|
443
|
+
/* @__PURE__ */ jsx3(CodeBlock2, {
|
|
444
444
|
language: "typescript",
|
|
445
445
|
filename: "src/contracts/user-management.capability.ts",
|
|
446
446
|
code: `import { defineCapability } from "@contractspec/lib.contracts-spec";
|
|
@@ -487,21 +487,21 @@ export const AdminUserCapability = defineCapability({
|
|
|
487
487
|
{ surface: "operation", key: "user.impersonate", version: "1.0.0" },
|
|
488
488
|
],
|
|
489
489
|
});`
|
|
490
|
-
}
|
|
490
|
+
})
|
|
491
491
|
]
|
|
492
|
-
}
|
|
493
|
-
/* @__PURE__ */
|
|
492
|
+
}),
|
|
493
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
494
494
|
className: "space-y-3",
|
|
495
495
|
children: [
|
|
496
|
-
/* @__PURE__ */
|
|
496
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
497
497
|
className: "text-2xl font-bold",
|
|
498
498
|
children: "4) Presentations"
|
|
499
|
-
}
|
|
500
|
-
/* @__PURE__ */
|
|
499
|
+
}),
|
|
500
|
+
/* @__PURE__ */ jsx3("p", {
|
|
501
501
|
className: "text-muted-foreground text-sm",
|
|
502
502
|
children: "Presentations define UI specifications. They link to capabilities and specify how data should be displayed."
|
|
503
|
-
}
|
|
504
|
-
/* @__PURE__ */
|
|
503
|
+
}),
|
|
504
|
+
/* @__PURE__ */ jsx3(CodeBlock2, {
|
|
505
505
|
language: "typescript",
|
|
506
506
|
filename: "src/contracts/user-list.presentation.ts",
|
|
507
507
|
code: `import { definePresentation } from "@contractspec/lib.contracts-spec";
|
|
@@ -527,175 +527,175 @@ export const UserListPresentation = definePresentation({
|
|
|
527
527
|
search: { fields: ["name", "email"] },
|
|
528
528
|
},
|
|
529
529
|
});`
|
|
530
|
-
}
|
|
530
|
+
})
|
|
531
531
|
]
|
|
532
|
-
}
|
|
533
|
-
/* @__PURE__ */
|
|
532
|
+
}),
|
|
533
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
534
534
|
className: "space-y-3",
|
|
535
535
|
children: [
|
|
536
|
-
/* @__PURE__ */
|
|
536
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
537
537
|
className: "text-2xl font-bold",
|
|
538
538
|
children: "5) Additional Contract Types"
|
|
539
|
-
}
|
|
540
|
-
/* @__PURE__ */
|
|
539
|
+
}),
|
|
540
|
+
/* @__PURE__ */ jsx3("p", {
|
|
541
541
|
className: "text-muted-foreground text-sm",
|
|
542
542
|
children: "ContractSpec provides specialized contracts for different concerns:"
|
|
543
|
-
}
|
|
544
|
-
/* @__PURE__ */
|
|
543
|
+
}),
|
|
544
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
545
545
|
className: "grid gap-4 md:grid-cols-2",
|
|
546
546
|
children: [
|
|
547
|
-
/* @__PURE__ */
|
|
547
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
548
548
|
className: "card-subtle space-y-2 p-4",
|
|
549
549
|
children: [
|
|
550
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
551
551
|
className: "font-semibold",
|
|
552
552
|
children: "Policy"
|
|
553
|
-
}
|
|
554
|
-
/* @__PURE__ */
|
|
553
|
+
}),
|
|
554
|
+
/* @__PURE__ */ jsx3("code", {
|
|
555
555
|
className: "text-xs text-violet-400",
|
|
556
556
|
children: "definePolicy"
|
|
557
|
-
}
|
|
558
|
-
/* @__PURE__ */
|
|
557
|
+
}),
|
|
558
|
+
/* @__PURE__ */ jsx3("p", {
|
|
559
559
|
className: "text-muted-foreground text-xs",
|
|
560
560
|
children: "RBAC/ABAC rules, rate limits, and access control."
|
|
561
|
-
}
|
|
561
|
+
})
|
|
562
562
|
]
|
|
563
|
-
}
|
|
564
|
-
/* @__PURE__ */
|
|
563
|
+
}),
|
|
564
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
565
565
|
className: "card-subtle space-y-2 p-4",
|
|
566
566
|
children: [
|
|
567
|
-
/* @__PURE__ */
|
|
567
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
568
568
|
className: "font-semibold",
|
|
569
569
|
children: "Workflow"
|
|
570
|
-
}
|
|
571
|
-
/* @__PURE__ */
|
|
570
|
+
}),
|
|
571
|
+
/* @__PURE__ */ jsx3("code", {
|
|
572
572
|
className: "text-xs text-violet-400",
|
|
573
573
|
children: "defineWorkflow"
|
|
574
|
-
}
|
|
575
|
-
/* @__PURE__ */
|
|
574
|
+
}),
|
|
575
|
+
/* @__PURE__ */ jsx3("p", {
|
|
576
576
|
className: "text-muted-foreground text-xs",
|
|
577
577
|
children: "Multi-step processes with states, transitions, and SLAs."
|
|
578
|
-
}
|
|
578
|
+
})
|
|
579
579
|
]
|
|
580
|
-
}
|
|
581
|
-
/* @__PURE__ */
|
|
580
|
+
}),
|
|
581
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
582
582
|
className: "card-subtle space-y-2 p-4",
|
|
583
583
|
children: [
|
|
584
|
-
/* @__PURE__ */
|
|
584
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
585
585
|
className: "font-semibold",
|
|
586
586
|
children: "Translation"
|
|
587
|
-
}
|
|
588
|
-
/* @__PURE__ */
|
|
587
|
+
}),
|
|
588
|
+
/* @__PURE__ */ jsx3("code", {
|
|
589
589
|
className: "text-xs text-violet-400",
|
|
590
590
|
children: "defineTranslation"
|
|
591
|
-
}
|
|
592
|
-
/* @__PURE__ */
|
|
591
|
+
}),
|
|
592
|
+
/* @__PURE__ */ jsx3("p", {
|
|
593
593
|
className: "text-muted-foreground text-xs",
|
|
594
594
|
children: "i18n messages with ICU format and locale fallbacks."
|
|
595
|
-
}
|
|
595
|
+
})
|
|
596
596
|
]
|
|
597
|
-
}
|
|
598
|
-
/* @__PURE__ */
|
|
597
|
+
}),
|
|
598
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
599
599
|
className: "card-subtle space-y-2 p-4",
|
|
600
600
|
children: [
|
|
601
|
-
/* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
602
602
|
className: "font-semibold",
|
|
603
603
|
children: "Integration"
|
|
604
|
-
}
|
|
605
|
-
/* @__PURE__ */
|
|
604
|
+
}),
|
|
605
|
+
/* @__PURE__ */ jsx3("code", {
|
|
606
606
|
className: "text-xs text-violet-400",
|
|
607
607
|
children: "defineIntegration"
|
|
608
|
-
}
|
|
609
|
-
/* @__PURE__ */
|
|
608
|
+
}),
|
|
609
|
+
/* @__PURE__ */ jsx3("p", {
|
|
610
610
|
className: "text-muted-foreground text-xs",
|
|
611
611
|
children: "External service connections and API adapters."
|
|
612
|
-
}
|
|
612
|
+
})
|
|
613
613
|
]
|
|
614
|
-
}
|
|
615
|
-
/* @__PURE__ */
|
|
614
|
+
}),
|
|
615
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
616
616
|
className: "card-subtle space-y-2 p-4",
|
|
617
617
|
children: [
|
|
618
|
-
/* @__PURE__ */
|
|
618
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
619
619
|
className: "font-semibold",
|
|
620
620
|
children: "Form"
|
|
621
|
-
}
|
|
622
|
-
/* @__PURE__ */
|
|
621
|
+
}),
|
|
622
|
+
/* @__PURE__ */ jsx3("code", {
|
|
623
623
|
className: "text-xs text-violet-400",
|
|
624
624
|
children: "defineFormSpec"
|
|
625
|
-
}
|
|
626
|
-
/* @__PURE__ */
|
|
625
|
+
}),
|
|
626
|
+
/* @__PURE__ */ jsx3("p", {
|
|
627
627
|
className: "text-muted-foreground text-xs",
|
|
628
628
|
children: "Form definitions with fields, validation, and layouts."
|
|
629
|
-
}
|
|
629
|
+
})
|
|
630
630
|
]
|
|
631
|
-
}
|
|
632
|
-
/* @__PURE__ */
|
|
631
|
+
}),
|
|
632
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
633
633
|
className: "card-subtle space-y-2 p-4",
|
|
634
634
|
children: [
|
|
635
|
-
/* @__PURE__ */
|
|
635
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
636
636
|
className: "font-semibold",
|
|
637
637
|
children: "Data View"
|
|
638
|
-
}
|
|
639
|
-
/* @__PURE__ */
|
|
638
|
+
}),
|
|
639
|
+
/* @__PURE__ */ jsx3("code", {
|
|
640
640
|
className: "text-xs text-violet-400",
|
|
641
641
|
children: "defineDataView"
|
|
642
|
-
}
|
|
643
|
-
/* @__PURE__ */
|
|
642
|
+
}),
|
|
643
|
+
/* @__PURE__ */ jsx3("p", {
|
|
644
644
|
className: "text-muted-foreground text-xs",
|
|
645
645
|
children: "Read-only data projections and aggregations."
|
|
646
|
-
}
|
|
646
|
+
})
|
|
647
647
|
]
|
|
648
|
-
}
|
|
649
|
-
/* @__PURE__ */
|
|
648
|
+
}),
|
|
649
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
650
650
|
className: "card-subtle space-y-2 p-4",
|
|
651
651
|
children: [
|
|
652
|
-
/* @__PURE__ */
|
|
652
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
653
653
|
className: "font-semibold",
|
|
654
654
|
children: "Feature"
|
|
655
|
-
}
|
|
656
|
-
/* @__PURE__ */
|
|
655
|
+
}),
|
|
656
|
+
/* @__PURE__ */ jsx3("code", {
|
|
657
657
|
className: "text-xs text-violet-400",
|
|
658
658
|
children: "defineFeature"
|
|
659
|
-
}
|
|
660
|
-
/* @__PURE__ */
|
|
659
|
+
}),
|
|
660
|
+
/* @__PURE__ */ jsx3("p", {
|
|
661
661
|
className: "text-muted-foreground text-xs",
|
|
662
662
|
children: "Feature flags and progressive rollout configurations."
|
|
663
|
-
}
|
|
663
|
+
})
|
|
664
664
|
]
|
|
665
|
-
}
|
|
666
|
-
/* @__PURE__ */
|
|
665
|
+
}),
|
|
666
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
667
667
|
className: "card-subtle space-y-2 p-4",
|
|
668
668
|
children: [
|
|
669
|
-
/* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
670
670
|
className: "font-semibold",
|
|
671
671
|
children: "Test"
|
|
672
|
-
}
|
|
673
|
-
/* @__PURE__ */
|
|
672
|
+
}),
|
|
673
|
+
/* @__PURE__ */ jsx3("code", {
|
|
674
674
|
className: "text-xs text-violet-400",
|
|
675
675
|
children: "defineTestSpec"
|
|
676
|
-
}
|
|
677
|
-
/* @__PURE__ */
|
|
676
|
+
}),
|
|
677
|
+
/* @__PURE__ */ jsx3("p", {
|
|
678
678
|
className: "text-muted-foreground text-xs",
|
|
679
679
|
children: "Contract-driven test scenarios and fixtures."
|
|
680
|
-
}
|
|
680
|
+
})
|
|
681
681
|
]
|
|
682
|
-
}
|
|
682
|
+
})
|
|
683
683
|
]
|
|
684
|
-
}
|
|
684
|
+
})
|
|
685
685
|
]
|
|
686
|
-
}
|
|
687
|
-
/* @__PURE__ */
|
|
686
|
+
}),
|
|
687
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
688
688
|
className: "space-y-3",
|
|
689
689
|
children: [
|
|
690
|
-
/* @__PURE__ */
|
|
690
|
+
/* @__PURE__ */ jsx3("h2", {
|
|
691
691
|
className: "text-2xl font-bold",
|
|
692
692
|
children: "6) Registering Contracts"
|
|
693
|
-
}
|
|
694
|
-
/* @__PURE__ */
|
|
693
|
+
}),
|
|
694
|
+
/* @__PURE__ */ jsx3("p", {
|
|
695
695
|
className: "text-muted-foreground text-sm",
|
|
696
696
|
children: "Each contract type has a registry for lookup and validation."
|
|
697
|
-
}
|
|
698
|
-
/* @__PURE__ */
|
|
697
|
+
}),
|
|
698
|
+
/* @__PURE__ */ jsx3(CodeBlock2, {
|
|
699
699
|
language: "typescript",
|
|
700
700
|
filename: "src/contracts/registry.ts",
|
|
701
701
|
code: `import {
|
|
@@ -729,287 +729,287 @@ installOp(operationRegistry, GetUserQuery, async (input) => {
|
|
|
729
729
|
// Register events and capabilities
|
|
730
730
|
eventRegistry.register(UserCreatedEvent);
|
|
731
731
|
capabilityRegistry.register(UserManagementCapability);`
|
|
732
|
-
}
|
|
732
|
+
})
|
|
733
733
|
]
|
|
734
|
-
}
|
|
735
|
-
/* @__PURE__ */
|
|
734
|
+
}),
|
|
735
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
736
736
|
className: "card-subtle space-y-3 p-6",
|
|
737
737
|
children: [
|
|
738
|
-
/* @__PURE__ */
|
|
738
|
+
/* @__PURE__ */ jsx3("h3", {
|
|
739
739
|
className: "text-lg font-semibold",
|
|
740
740
|
children: "Contract Type Decision Guide"
|
|
741
|
-
}
|
|
742
|
-
/* @__PURE__ */
|
|
741
|
+
}),
|
|
742
|
+
/* @__PURE__ */ jsxs3("table", {
|
|
743
743
|
className: "w-full text-sm",
|
|
744
744
|
children: [
|
|
745
|
-
/* @__PURE__ */
|
|
746
|
-
children: /* @__PURE__ */
|
|
745
|
+
/* @__PURE__ */ jsx3("thead", {
|
|
746
|
+
children: /* @__PURE__ */ jsxs3("tr", {
|
|
747
747
|
className: "border-b border-white/10",
|
|
748
748
|
children: [
|
|
749
|
-
/* @__PURE__ */
|
|
749
|
+
/* @__PURE__ */ jsx3("th", {
|
|
750
750
|
className: "py-2 text-left",
|
|
751
751
|
children: "When you need..."
|
|
752
|
-
}
|
|
753
|
-
/* @__PURE__ */
|
|
752
|
+
}),
|
|
753
|
+
/* @__PURE__ */ jsx3("th", {
|
|
754
754
|
className: "py-2 text-left",
|
|
755
755
|
children: "Use this contract"
|
|
756
|
-
}
|
|
756
|
+
})
|
|
757
757
|
]
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
/* @__PURE__ */
|
|
758
|
+
})
|
|
759
|
+
}),
|
|
760
|
+
/* @__PURE__ */ jsxs3("tbody", {
|
|
761
761
|
className: "text-muted-foreground",
|
|
762
762
|
children: [
|
|
763
|
-
/* @__PURE__ */
|
|
763
|
+
/* @__PURE__ */ jsxs3("tr", {
|
|
764
764
|
className: "border-b border-white/5",
|
|
765
765
|
children: [
|
|
766
|
-
/* @__PURE__ */
|
|
766
|
+
/* @__PURE__ */ jsx3("td", {
|
|
767
767
|
className: "py-2",
|
|
768
768
|
children: "An API endpoint that changes data"
|
|
769
|
-
}
|
|
770
|
-
/* @__PURE__ */
|
|
769
|
+
}),
|
|
770
|
+
/* @__PURE__ */ jsx3("td", {
|
|
771
771
|
className: "py-2",
|
|
772
|
-
children: /* @__PURE__ */
|
|
772
|
+
children: /* @__PURE__ */ jsx3("code", {
|
|
773
773
|
children: "defineCommand"
|
|
774
|
-
}
|
|
775
|
-
}
|
|
774
|
+
})
|
|
775
|
+
})
|
|
776
776
|
]
|
|
777
|
-
}
|
|
778
|
-
/* @__PURE__ */
|
|
777
|
+
}),
|
|
778
|
+
/* @__PURE__ */ jsxs3("tr", {
|
|
779
779
|
className: "border-b border-white/5",
|
|
780
780
|
children: [
|
|
781
|
-
/* @__PURE__ */
|
|
781
|
+
/* @__PURE__ */ jsx3("td", {
|
|
782
782
|
className: "py-2",
|
|
783
783
|
children: "An API endpoint that reads data"
|
|
784
|
-
}
|
|
785
|
-
/* @__PURE__ */
|
|
784
|
+
}),
|
|
785
|
+
/* @__PURE__ */ jsx3("td", {
|
|
786
786
|
className: "py-2",
|
|
787
|
-
children: /* @__PURE__ */
|
|
787
|
+
children: /* @__PURE__ */ jsx3("code", {
|
|
788
788
|
children: "defineQuery"
|
|
789
|
-
}
|
|
790
|
-
}
|
|
789
|
+
})
|
|
790
|
+
})
|
|
791
791
|
]
|
|
792
|
-
}
|
|
793
|
-
/* @__PURE__ */
|
|
792
|
+
}),
|
|
793
|
+
/* @__PURE__ */ jsxs3("tr", {
|
|
794
794
|
className: "border-b border-white/5",
|
|
795
795
|
children: [
|
|
796
|
-
/* @__PURE__ */
|
|
796
|
+
/* @__PURE__ */ jsx3("td", {
|
|
797
797
|
className: "py-2",
|
|
798
798
|
children: "Async notification of something that happened"
|
|
799
|
-
}
|
|
800
|
-
/* @__PURE__ */
|
|
799
|
+
}),
|
|
800
|
+
/* @__PURE__ */ jsx3("td", {
|
|
801
801
|
className: "py-2",
|
|
802
|
-
children: /* @__PURE__ */
|
|
802
|
+
children: /* @__PURE__ */ jsx3("code", {
|
|
803
803
|
children: "defineEvent"
|
|
804
|
-
}
|
|
805
|
-
}
|
|
804
|
+
})
|
|
805
|
+
})
|
|
806
806
|
]
|
|
807
|
-
}
|
|
808
|
-
/* @__PURE__ */
|
|
807
|
+
}),
|
|
808
|
+
/* @__PURE__ */ jsxs3("tr", {
|
|
809
809
|
className: "border-b border-white/5",
|
|
810
810
|
children: [
|
|
811
|
-
/* @__PURE__ */
|
|
811
|
+
/* @__PURE__ */ jsx3("td", {
|
|
812
812
|
className: "py-2",
|
|
813
813
|
children: "Group related specs under a feature"
|
|
814
|
-
}
|
|
815
|
-
/* @__PURE__ */
|
|
814
|
+
}),
|
|
815
|
+
/* @__PURE__ */ jsx3("td", {
|
|
816
816
|
className: "py-2",
|
|
817
|
-
children: /* @__PURE__ */
|
|
817
|
+
children: /* @__PURE__ */ jsx3("code", {
|
|
818
818
|
children: "defineCapability"
|
|
819
|
-
}
|
|
820
|
-
}
|
|
819
|
+
})
|
|
820
|
+
})
|
|
821
821
|
]
|
|
822
|
-
}
|
|
823
|
-
/* @__PURE__ */
|
|
822
|
+
}),
|
|
823
|
+
/* @__PURE__ */ jsxs3("tr", {
|
|
824
824
|
className: "border-b border-white/5",
|
|
825
825
|
children: [
|
|
826
|
-
/* @__PURE__ */
|
|
826
|
+
/* @__PURE__ */ jsx3("td", {
|
|
827
827
|
className: "py-2",
|
|
828
828
|
children: "Define UI rendering specifications"
|
|
829
|
-
}
|
|
830
|
-
/* @__PURE__ */
|
|
829
|
+
}),
|
|
830
|
+
/* @__PURE__ */ jsx3("td", {
|
|
831
831
|
className: "py-2",
|
|
832
|
-
children: /* @__PURE__ */
|
|
832
|
+
children: /* @__PURE__ */ jsx3("code", {
|
|
833
833
|
children: "definePresentation"
|
|
834
|
-
}
|
|
835
|
-
}
|
|
834
|
+
})
|
|
835
|
+
})
|
|
836
836
|
]
|
|
837
|
-
}
|
|
838
|
-
/* @__PURE__ */
|
|
837
|
+
}),
|
|
838
|
+
/* @__PURE__ */ jsxs3("tr", {
|
|
839
839
|
className: "border-b border-white/5",
|
|
840
840
|
children: [
|
|
841
|
-
/* @__PURE__ */
|
|
841
|
+
/* @__PURE__ */ jsx3("td", {
|
|
842
842
|
className: "py-2",
|
|
843
843
|
children: "Access control and rate limiting"
|
|
844
|
-
}
|
|
845
|
-
/* @__PURE__ */
|
|
844
|
+
}),
|
|
845
|
+
/* @__PURE__ */ jsx3("td", {
|
|
846
846
|
className: "py-2",
|
|
847
|
-
children: /* @__PURE__ */
|
|
847
|
+
children: /* @__PURE__ */ jsx3("code", {
|
|
848
848
|
children: "definePolicy"
|
|
849
|
-
}
|
|
850
|
-
}
|
|
849
|
+
})
|
|
850
|
+
})
|
|
851
851
|
]
|
|
852
|
-
}
|
|
853
|
-
/* @__PURE__ */
|
|
852
|
+
}),
|
|
853
|
+
/* @__PURE__ */ jsxs3("tr", {
|
|
854
854
|
children: [
|
|
855
|
-
/* @__PURE__ */
|
|
855
|
+
/* @__PURE__ */ jsx3("td", {
|
|
856
856
|
className: "py-2",
|
|
857
857
|
children: "Multi-step business processes"
|
|
858
|
-
}
|
|
859
|
-
/* @__PURE__ */
|
|
858
|
+
}),
|
|
859
|
+
/* @__PURE__ */ jsx3("td", {
|
|
860
860
|
className: "py-2",
|
|
861
|
-
children: /* @__PURE__ */
|
|
861
|
+
children: /* @__PURE__ */ jsx3("code", {
|
|
862
862
|
children: "defineWorkflow"
|
|
863
|
-
}
|
|
864
|
-
}
|
|
863
|
+
})
|
|
864
|
+
})
|
|
865
865
|
]
|
|
866
|
-
}
|
|
866
|
+
})
|
|
867
867
|
]
|
|
868
|
-
}
|
|
868
|
+
})
|
|
869
869
|
]
|
|
870
|
-
}
|
|
870
|
+
})
|
|
871
871
|
]
|
|
872
|
-
}
|
|
873
|
-
/* @__PURE__ */
|
|
872
|
+
}),
|
|
873
|
+
/* @__PURE__ */ jsx3(StudioPrompt, {
|
|
874
874
|
title: "Need to decide which contract should change next?",
|
|
875
875
|
body: "Studio uses evidence and focus constraints to generate decision briefs, patch intents, and execution-ready task packs."
|
|
876
|
-
}
|
|
876
|
+
})
|
|
877
877
|
]
|
|
878
|
-
}
|
|
879
|
-
/* @__PURE__ */
|
|
878
|
+
}),
|
|
879
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
880
880
|
className: "flex items-center gap-4 pt-4",
|
|
881
881
|
children: [
|
|
882
|
-
/* @__PURE__ */
|
|
882
|
+
/* @__PURE__ */ jsxs3(Link3, {
|
|
883
883
|
href: "/docs/guides/nextjs-one-endpoint",
|
|
884
884
|
className: "btn-primary",
|
|
885
885
|
children: [
|
|
886
886
|
"Next: Add your first endpoint ",
|
|
887
|
-
/* @__PURE__ */
|
|
887
|
+
/* @__PURE__ */ jsx3(ChevronRight2, {
|
|
888
888
|
size: 16
|
|
889
|
-
}
|
|
889
|
+
})
|
|
890
890
|
]
|
|
891
|
-
}
|
|
892
|
-
/* @__PURE__ */
|
|
891
|
+
}),
|
|
892
|
+
/* @__PURE__ */ jsx3(Link3, {
|
|
893
893
|
href: "/docs/guides",
|
|
894
894
|
className: "btn-ghost",
|
|
895
895
|
children: "Back to guides"
|
|
896
|
-
}
|
|
896
|
+
})
|
|
897
897
|
]
|
|
898
|
-
}
|
|
898
|
+
})
|
|
899
899
|
]
|
|
900
|
-
}
|
|
900
|
+
});
|
|
901
901
|
}
|
|
902
902
|
|
|
903
903
|
// src/components/docs/guides/GuideDocsPipelinePage.tsx
|
|
904
904
|
import { CodeBlock as CodeBlock3 } from "@contractspec/lib.design-system";
|
|
905
905
|
import Link4 from "@contractspec/lib.ui-link";
|
|
906
906
|
import { ChevronRight as ChevronRight3 } from "lucide-react";
|
|
907
|
-
import {
|
|
907
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
908
908
|
function GuideDocsPipelinePage() {
|
|
909
|
-
return /* @__PURE__ */
|
|
909
|
+
return /* @__PURE__ */ jsxs4("div", {
|
|
910
910
|
className: "space-y-8",
|
|
911
911
|
children: [
|
|
912
|
-
/* @__PURE__ */
|
|
912
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
913
913
|
className: "space-y-3",
|
|
914
914
|
children: [
|
|
915
|
-
/* @__PURE__ */
|
|
915
|
+
/* @__PURE__ */ jsx4("h1", {
|
|
916
916
|
className: "text-4xl font-bold",
|
|
917
917
|
children: "Build the docs pipeline"
|
|
918
|
-
}
|
|
919
|
-
/* @__PURE__ */
|
|
918
|
+
}),
|
|
919
|
+
/* @__PURE__ */ jsx4("p", {
|
|
920
920
|
className: "text-muted-foreground text-lg",
|
|
921
921
|
children: "Generate reference docs, chunk the index, and wire the docs pages the same way this repo does."
|
|
922
|
-
}
|
|
922
|
+
})
|
|
923
923
|
]
|
|
924
|
-
}
|
|
925
|
-
/* @__PURE__ */
|
|
924
|
+
}),
|
|
925
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
926
926
|
className: "card-subtle space-y-4 p-6",
|
|
927
927
|
children: [
|
|
928
|
-
/* @__PURE__ */
|
|
928
|
+
/* @__PURE__ */ jsx4("h2", {
|
|
929
929
|
className: "text-2xl font-bold",
|
|
930
930
|
children: "What you'll build"
|
|
931
|
-
}
|
|
932
|
-
/* @__PURE__ */
|
|
931
|
+
}),
|
|
932
|
+
/* @__PURE__ */ jsxs4("ul", {
|
|
933
933
|
className: "text-muted-foreground space-y-2 text-sm",
|
|
934
934
|
children: [
|
|
935
|
-
/* @__PURE__ */
|
|
935
|
+
/* @__PURE__ */ jsx4("li", {
|
|
936
936
|
children: "Generated Markdown and a chunked index manifest."
|
|
937
|
-
}
|
|
938
|
-
/* @__PURE__ */
|
|
937
|
+
}),
|
|
938
|
+
/* @__PURE__ */ jsx4("li", {
|
|
939
939
|
children: "Reference routes powered by the docs loader."
|
|
940
|
-
}
|
|
941
|
-
/* @__PURE__ */
|
|
940
|
+
}),
|
|
941
|
+
/* @__PURE__ */ jsx4("li", {
|
|
942
942
|
children: "Versioned outputs you can publish per release."
|
|
943
|
-
}
|
|
943
|
+
})
|
|
944
944
|
]
|
|
945
|
-
}
|
|
945
|
+
})
|
|
946
946
|
]
|
|
947
|
-
}
|
|
948
|
-
/* @__PURE__ */
|
|
947
|
+
}),
|
|
948
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
949
949
|
className: "space-y-6",
|
|
950
950
|
children: [
|
|
951
|
-
/* @__PURE__ */
|
|
951
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
952
952
|
className: "space-y-3",
|
|
953
953
|
children: [
|
|
954
|
-
/* @__PURE__ */
|
|
954
|
+
/* @__PURE__ */ jsx4("h2", {
|
|
955
955
|
className: "text-2xl font-bold",
|
|
956
956
|
children: "1) Generate contract docs"
|
|
957
|
-
}
|
|
958
|
-
/* @__PURE__ */
|
|
957
|
+
}),
|
|
958
|
+
/* @__PURE__ */ jsx4(CodeBlock3, {
|
|
959
959
|
language: "bash",
|
|
960
960
|
filename: "generate-contract-docs",
|
|
961
961
|
code: `contractspec generate`
|
|
962
|
-
}
|
|
963
|
-
/* @__PURE__ */
|
|
962
|
+
}),
|
|
963
|
+
/* @__PURE__ */ jsxs4("p", {
|
|
964
964
|
className: "text-muted-foreground text-sm",
|
|
965
965
|
children: [
|
|
966
966
|
"Expected output: Markdown in ",
|
|
967
|
-
/* @__PURE__ */
|
|
967
|
+
/* @__PURE__ */ jsx4("code", {
|
|
968
968
|
children: "generated/docs"
|
|
969
|
-
}
|
|
969
|
+
}),
|
|
970
970
|
"."
|
|
971
971
|
]
|
|
972
|
-
}
|
|
972
|
+
})
|
|
973
973
|
]
|
|
974
|
-
}
|
|
975
|
-
/* @__PURE__ */
|
|
974
|
+
}),
|
|
975
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
976
976
|
className: "space-y-3",
|
|
977
977
|
children: [
|
|
978
|
-
/* @__PURE__ */
|
|
978
|
+
/* @__PURE__ */ jsx4("h2", {
|
|
979
979
|
className: "text-2xl font-bold",
|
|
980
980
|
children: "2) Build the docs index"
|
|
981
|
-
}
|
|
982
|
-
/* @__PURE__ */
|
|
981
|
+
}),
|
|
982
|
+
/* @__PURE__ */ jsx4(CodeBlock3, {
|
|
983
983
|
language: "bash",
|
|
984
984
|
filename: "docs-generate",
|
|
985
985
|
code: `bun docs:generate
|
|
986
986
|
# versioned output
|
|
987
987
|
bun docs:generate -- --version v1.0.0`
|
|
988
|
-
}
|
|
989
|
-
/* @__PURE__ */
|
|
988
|
+
}),
|
|
989
|
+
/* @__PURE__ */ jsxs4("p", {
|
|
990
990
|
className: "text-muted-foreground text-sm",
|
|
991
991
|
children: [
|
|
992
992
|
"This writes ",
|
|
993
|
-
/* @__PURE__ */
|
|
993
|
+
/* @__PURE__ */ jsx4("code", {
|
|
994
994
|
children: "docs-index.manifest.json"
|
|
995
|
-
}
|
|
995
|
+
}),
|
|
996
996
|
" and chunked",
|
|
997
|
-
/* @__PURE__ */
|
|
997
|
+
/* @__PURE__ */ jsx4("code", {
|
|
998
998
|
children: "docs-index.*.json"
|
|
999
|
-
}
|
|
999
|
+
}),
|
|
1000
1000
|
" files in the generated docs bundle."
|
|
1001
1001
|
]
|
|
1002
|
-
}
|
|
1002
|
+
})
|
|
1003
1003
|
]
|
|
1004
|
-
}
|
|
1005
|
-
/* @__PURE__ */
|
|
1004
|
+
}),
|
|
1005
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1006
1006
|
className: "space-y-3",
|
|
1007
1007
|
children: [
|
|
1008
|
-
/* @__PURE__ */
|
|
1008
|
+
/* @__PURE__ */ jsx4("h2", {
|
|
1009
1009
|
className: "text-2xl font-bold",
|
|
1010
1010
|
children: "3) Wire reference routes"
|
|
1011
|
-
}
|
|
1012
|
-
/* @__PURE__ */
|
|
1011
|
+
}),
|
|
1012
|
+
/* @__PURE__ */ jsx4(CodeBlock3, {
|
|
1013
1013
|
language: "tsx",
|
|
1014
1014
|
filename: "docs-reference-route",
|
|
1015
1015
|
code: `import { notFound } from "next/navigation";
|
|
@@ -1031,247 +1031,247 @@ export default async function Page({ params }: { params: { slug?: string[] } })
|
|
|
1031
1031
|
if (!doc) notFound();
|
|
1032
1032
|
return <DocsReferencePage entry={doc.entry} content={doc.content} />;
|
|
1033
1033
|
}`
|
|
1034
|
-
}
|
|
1035
|
-
/* @__PURE__ */
|
|
1034
|
+
}),
|
|
1035
|
+
/* @__PURE__ */ jsxs4("p", {
|
|
1036
1036
|
className: "text-muted-foreground text-sm",
|
|
1037
1037
|
children: [
|
|
1038
1038
|
"Use the index page on ",
|
|
1039
|
-
/* @__PURE__ */
|
|
1039
|
+
/* @__PURE__ */ jsx4("code", {
|
|
1040
1040
|
children: "/docs/reference"
|
|
1041
|
-
}
|
|
1041
|
+
}),
|
|
1042
1042
|
" to render the searchable list."
|
|
1043
1043
|
]
|
|
1044
|
-
}
|
|
1044
|
+
})
|
|
1045
1045
|
]
|
|
1046
|
-
}
|
|
1047
|
-
/* @__PURE__ */
|
|
1046
|
+
}),
|
|
1047
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1048
1048
|
className: "card-subtle space-y-3 p-6",
|
|
1049
1049
|
children: [
|
|
1050
|
-
/* @__PURE__ */
|
|
1050
|
+
/* @__PURE__ */ jsx4("h3", {
|
|
1051
1051
|
className: "text-lg font-semibold",
|
|
1052
1052
|
children: "Repo reference"
|
|
1053
|
-
}
|
|
1054
|
-
/* @__PURE__ */
|
|
1053
|
+
}),
|
|
1054
|
+
/* @__PURE__ */ jsxs4("p", {
|
|
1055
1055
|
className: "text-muted-foreground text-sm",
|
|
1056
1056
|
children: [
|
|
1057
1057
|
"This repo wires docs under",
|
|
1058
1058
|
" ",
|
|
1059
|
-
/* @__PURE__ */
|
|
1059
|
+
/* @__PURE__ */ jsx4("code", {
|
|
1060
1060
|
children: "packages/apps/web-landing/src/app/docs/reference"
|
|
1061
|
-
}
|
|
1061
|
+
}),
|
|
1062
1062
|
"."
|
|
1063
1063
|
]
|
|
1064
|
-
}
|
|
1064
|
+
})
|
|
1065
1065
|
]
|
|
1066
|
-
}
|
|
1067
|
-
/* @__PURE__ */
|
|
1066
|
+
}),
|
|
1067
|
+
/* @__PURE__ */ jsx4(StudioPrompt, {
|
|
1068
1068
|
title: "Need decision-to-export automation?",
|
|
1069
1069
|
body: "Studio exports evidence-backed spec changes and task packs to Linear, Jira, Notion, and GitHub."
|
|
1070
|
-
}
|
|
1070
|
+
})
|
|
1071
1071
|
]
|
|
1072
|
-
}
|
|
1073
|
-
/* @__PURE__ */
|
|
1072
|
+
}),
|
|
1073
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1074
1074
|
className: "flex items-center gap-4 pt-4",
|
|
1075
1075
|
children: [
|
|
1076
|
-
/* @__PURE__ */
|
|
1076
|
+
/* @__PURE__ */ jsxs4(Link4, {
|
|
1077
1077
|
href: "/docs/guides/ci-contract-diff-gating",
|
|
1078
1078
|
className: "btn-primary",
|
|
1079
1079
|
children: [
|
|
1080
1080
|
"Next: CI gating ",
|
|
1081
|
-
/* @__PURE__ */
|
|
1081
|
+
/* @__PURE__ */ jsx4(ChevronRight3, {
|
|
1082
1082
|
size: 16
|
|
1083
|
-
}
|
|
1083
|
+
})
|
|
1084
1084
|
]
|
|
1085
|
-
}
|
|
1086
|
-
/* @__PURE__ */
|
|
1085
|
+
}),
|
|
1086
|
+
/* @__PURE__ */ jsx4(Link4, {
|
|
1087
1087
|
href: "/docs/guides",
|
|
1088
1088
|
className: "btn-ghost",
|
|
1089
1089
|
children: "Back to guides"
|
|
1090
|
-
}
|
|
1090
|
+
})
|
|
1091
1091
|
]
|
|
1092
|
-
}
|
|
1092
|
+
})
|
|
1093
1093
|
]
|
|
1094
|
-
}
|
|
1094
|
+
});
|
|
1095
1095
|
}
|
|
1096
1096
|
|
|
1097
1097
|
// src/components/docs/guides/GuideGenerateDocsClientsSchemasPage.tsx
|
|
1098
1098
|
import { CodeBlock as CodeBlock4 } from "@contractspec/lib.design-system";
|
|
1099
1099
|
import Link5 from "@contractspec/lib.ui-link";
|
|
1100
1100
|
import { ChevronRight as ChevronRight4 } from "lucide-react";
|
|
1101
|
-
import {
|
|
1101
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1102
1102
|
function GuideGenerateDocsClientsSchemasPage() {
|
|
1103
|
-
return /* @__PURE__ */
|
|
1103
|
+
return /* @__PURE__ */ jsxs5("div", {
|
|
1104
1104
|
className: "space-y-8",
|
|
1105
1105
|
children: [
|
|
1106
|
-
/* @__PURE__ */
|
|
1106
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1107
1107
|
className: "space-y-3",
|
|
1108
1108
|
children: [
|
|
1109
|
-
/* @__PURE__ */
|
|
1109
|
+
/* @__PURE__ */ jsx5("h1", {
|
|
1110
1110
|
className: "text-4xl font-bold",
|
|
1111
1111
|
children: "Generate docs + client schemas"
|
|
1112
|
-
}
|
|
1113
|
-
/* @__PURE__ */
|
|
1112
|
+
}),
|
|
1113
|
+
/* @__PURE__ */ jsx5("p", {
|
|
1114
1114
|
className: "text-muted-foreground text-lg",
|
|
1115
1115
|
children: "Generate docs and OpenAPI output from ContractSpec operations to power SDKs, docs sites, and tooling."
|
|
1116
|
-
}
|
|
1116
|
+
})
|
|
1117
1117
|
]
|
|
1118
|
-
}
|
|
1119
|
-
/* @__PURE__ */
|
|
1118
|
+
}),
|
|
1119
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1120
1120
|
className: "card-subtle space-y-4 p-6",
|
|
1121
1121
|
children: [
|
|
1122
|
-
/* @__PURE__ */
|
|
1122
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
1123
1123
|
className: "text-2xl font-bold",
|
|
1124
1124
|
children: "What you'll build"
|
|
1125
|
-
}
|
|
1126
|
-
/* @__PURE__ */
|
|
1125
|
+
}),
|
|
1126
|
+
/* @__PURE__ */ jsxs5("ul", {
|
|
1127
1127
|
className: "text-muted-foreground space-y-2 text-sm",
|
|
1128
1128
|
children: [
|
|
1129
|
-
/* @__PURE__ */
|
|
1129
|
+
/* @__PURE__ */ jsx5("li", {
|
|
1130
1130
|
children: "Export docs from your specs."
|
|
1131
|
-
}
|
|
1132
|
-
/* @__PURE__ */
|
|
1131
|
+
}),
|
|
1132
|
+
/* @__PURE__ */ jsx5("li", {
|
|
1133
1133
|
children: "Emit OpenAPI 3.1 for client SDK generation."
|
|
1134
|
-
}
|
|
1135
|
-
/* @__PURE__ */
|
|
1134
|
+
}),
|
|
1135
|
+
/* @__PURE__ */ jsx5("li", {
|
|
1136
1136
|
children: "Keep outputs deterministic with CI validation."
|
|
1137
|
-
}
|
|
1137
|
+
})
|
|
1138
1138
|
]
|
|
1139
|
-
}
|
|
1139
|
+
})
|
|
1140
1140
|
]
|
|
1141
|
-
}
|
|
1142
|
-
/* @__PURE__ */
|
|
1141
|
+
}),
|
|
1142
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1143
1143
|
className: "space-y-6",
|
|
1144
1144
|
children: [
|
|
1145
|
-
/* @__PURE__ */
|
|
1145
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1146
1146
|
className: "space-y-3",
|
|
1147
1147
|
children: [
|
|
1148
|
-
/* @__PURE__ */
|
|
1148
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
1149
1149
|
className: "text-2xl font-bold",
|
|
1150
1150
|
children: "1) Generate docs"
|
|
1151
|
-
}
|
|
1152
|
-
/* @__PURE__ */
|
|
1151
|
+
}),
|
|
1152
|
+
/* @__PURE__ */ jsx5("p", {
|
|
1153
1153
|
className: "text-muted-foreground text-sm",
|
|
1154
1154
|
children: "Use the generator to emit docs from your contracts."
|
|
1155
|
-
}
|
|
1156
|
-
/* @__PURE__ */
|
|
1155
|
+
}),
|
|
1156
|
+
/* @__PURE__ */ jsx5(CodeBlock4, {
|
|
1157
1157
|
language: "bash",
|
|
1158
1158
|
filename: "generate-docs",
|
|
1159
1159
|
code: `contractspec generate`
|
|
1160
|
-
}
|
|
1161
|
-
/* @__PURE__ */
|
|
1160
|
+
}),
|
|
1161
|
+
/* @__PURE__ */ jsxs5("p", {
|
|
1162
1162
|
className: "text-muted-foreground text-sm",
|
|
1163
1163
|
children: [
|
|
1164
1164
|
"Expected output: ",
|
|
1165
|
-
/* @__PURE__ */
|
|
1165
|
+
/* @__PURE__ */ jsx5("code", {
|
|
1166
1166
|
children: "Generate X doc files in generated/docs"
|
|
1167
|
-
}
|
|
1167
|
+
}),
|
|
1168
1168
|
"."
|
|
1169
1169
|
]
|
|
1170
|
-
}
|
|
1170
|
+
})
|
|
1171
1171
|
]
|
|
1172
|
-
}
|
|
1173
|
-
/* @__PURE__ */
|
|
1172
|
+
}),
|
|
1173
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1174
1174
|
className: "space-y-3",
|
|
1175
1175
|
children: [
|
|
1176
|
-
/* @__PURE__ */
|
|
1176
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
1177
1177
|
className: "text-2xl font-bold",
|
|
1178
1178
|
children: "2) Export OpenAPI"
|
|
1179
|
-
}
|
|
1180
|
-
/* @__PURE__ */
|
|
1179
|
+
}),
|
|
1180
|
+
/* @__PURE__ */ jsx5("p", {
|
|
1181
1181
|
className: "text-muted-foreground text-sm",
|
|
1182
1182
|
children: "Export an OpenAPI document from your registry module."
|
|
1183
|
-
}
|
|
1184
|
-
/* @__PURE__ */
|
|
1183
|
+
}),
|
|
1184
|
+
/* @__PURE__ */ jsx5(CodeBlock4, {
|
|
1185
1185
|
language: "bash",
|
|
1186
1186
|
filename: "openapi-export",
|
|
1187
1187
|
code: `contractspec openapi export --registry ./src/contracts/registry.ts --out ./generated/openapi.json`
|
|
1188
|
-
}
|
|
1189
|
-
/* @__PURE__ */
|
|
1188
|
+
}),
|
|
1189
|
+
/* @__PURE__ */ jsxs5("p", {
|
|
1190
1190
|
className: "text-muted-foreground text-sm",
|
|
1191
1191
|
children: [
|
|
1192
1192
|
"Expected output:",
|
|
1193
1193
|
" ",
|
|
1194
|
-
/* @__PURE__ */
|
|
1194
|
+
/* @__PURE__ */ jsx5("code", {
|
|
1195
1195
|
children: "OpenAPI written to .../generated/openapi.json"
|
|
1196
|
-
}
|
|
1196
|
+
}),
|
|
1197
1197
|
"."
|
|
1198
1198
|
]
|
|
1199
|
-
}
|
|
1199
|
+
})
|
|
1200
1200
|
]
|
|
1201
|
-
}
|
|
1202
|
-
/* @__PURE__ */
|
|
1201
|
+
}),
|
|
1202
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1203
1203
|
className: "space-y-3",
|
|
1204
1204
|
children: [
|
|
1205
|
-
/* @__PURE__ */
|
|
1205
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
1206
1206
|
className: "text-2xl font-bold",
|
|
1207
1207
|
children: "3) Validate specs"
|
|
1208
|
-
}
|
|
1209
|
-
/* @__PURE__ */
|
|
1208
|
+
}),
|
|
1209
|
+
/* @__PURE__ */ jsx5(CodeBlock4, {
|
|
1210
1210
|
language: "bash",
|
|
1211
1211
|
filename: "validate-specs",
|
|
1212
1212
|
code: `contractspec validate`
|
|
1213
|
-
}
|
|
1214
|
-
/* @__PURE__ */
|
|
1213
|
+
}),
|
|
1214
|
+
/* @__PURE__ */ jsxs5("p", {
|
|
1215
1215
|
className: "text-muted-foreground text-sm",
|
|
1216
1216
|
children: [
|
|
1217
1217
|
"Expected output: ",
|
|
1218
|
-
/* @__PURE__ */
|
|
1218
|
+
/* @__PURE__ */ jsx5("code", {
|
|
1219
1219
|
children: "Validation passed"
|
|
1220
|
-
}
|
|
1220
|
+
}),
|
|
1221
1221
|
"."
|
|
1222
1222
|
]
|
|
1223
|
-
}
|
|
1223
|
+
})
|
|
1224
1224
|
]
|
|
1225
|
-
}
|
|
1226
|
-
/* @__PURE__ */
|
|
1225
|
+
}),
|
|
1226
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1227
1227
|
className: "card-subtle space-y-3 p-6",
|
|
1228
1228
|
children: [
|
|
1229
|
-
/* @__PURE__ */
|
|
1229
|
+
/* @__PURE__ */ jsx5("h3", {
|
|
1230
1230
|
className: "text-lg font-semibold",
|
|
1231
1231
|
children: "Example package"
|
|
1232
|
-
}
|
|
1233
|
-
/* @__PURE__ */
|
|
1232
|
+
}),
|
|
1233
|
+
/* @__PURE__ */ jsx5("p", {
|
|
1234
1234
|
className: "text-muted-foreground text-sm",
|
|
1235
1235
|
children: "The Integration Hub example provides a full registry of operations and is a good source for OpenAPI exports."
|
|
1236
|
-
}
|
|
1237
|
-
/* @__PURE__ */
|
|
1236
|
+
}),
|
|
1237
|
+
/* @__PURE__ */ jsx5(CodeBlock4, {
|
|
1238
1238
|
language: "bash",
|
|
1239
1239
|
filename: "integration-hub-example",
|
|
1240
1240
|
code: `contractspec examples show integration-hub
|
|
1241
1241
|
|
|
1242
1242
|
# openapi export against your registry module
|
|
1243
1243
|
contractspec openapi export --registry ./src/contracts/registry.ts --out ./generated/openapi.json`
|
|
1244
|
-
}
|
|
1244
|
+
})
|
|
1245
1245
|
]
|
|
1246
|
-
}
|
|
1247
|
-
/* @__PURE__ */
|
|
1246
|
+
}),
|
|
1247
|
+
/* @__PURE__ */ jsx5(StudioPrompt, {
|
|
1248
1248
|
title: "Want exports tied to product decisions?",
|
|
1249
1249
|
body: "Studio compiles approved changes into deliverables and pushes them to your execution stack with full evidence context."
|
|
1250
|
-
}
|
|
1250
|
+
})
|
|
1251
1251
|
]
|
|
1252
|
-
}
|
|
1253
|
-
/* @__PURE__ */
|
|
1252
|
+
}),
|
|
1253
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
1254
1254
|
className: "flex items-center gap-4 pt-4",
|
|
1255
1255
|
children: [
|
|
1256
|
-
/* @__PURE__ */
|
|
1256
|
+
/* @__PURE__ */ jsxs5(Link5, {
|
|
1257
1257
|
href: "/docs/guides/docs-generation-pipeline",
|
|
1258
1258
|
className: "btn-primary",
|
|
1259
1259
|
children: [
|
|
1260
1260
|
"Next: Docs pipeline ",
|
|
1261
|
-
/* @__PURE__ */
|
|
1261
|
+
/* @__PURE__ */ jsx5(ChevronRight4, {
|
|
1262
1262
|
size: 16
|
|
1263
|
-
}
|
|
1263
|
+
})
|
|
1264
1264
|
]
|
|
1265
|
-
}
|
|
1266
|
-
/* @__PURE__ */
|
|
1265
|
+
}),
|
|
1266
|
+
/* @__PURE__ */ jsx5(Link5, {
|
|
1267
1267
|
href: "/docs/guides",
|
|
1268
1268
|
className: "btn-ghost",
|
|
1269
1269
|
children: "Back to guides"
|
|
1270
|
-
}
|
|
1270
|
+
})
|
|
1271
1271
|
]
|
|
1272
|
-
}
|
|
1272
|
+
})
|
|
1273
1273
|
]
|
|
1274
|
-
}
|
|
1274
|
+
});
|
|
1275
1275
|
}
|
|
1276
1276
|
|
|
1277
1277
|
// src/components/docs/guides/GuideImportExistingCodebasesPage.tsx
|
|
@@ -1284,7 +1284,7 @@ import {
|
|
|
1284
1284
|
Settings,
|
|
1285
1285
|
AlertCircle
|
|
1286
1286
|
} from "lucide-react";
|
|
1287
|
-
import {
|
|
1287
|
+
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1288
1288
|
var supportedFrameworks = [
|
|
1289
1289
|
{
|
|
1290
1290
|
name: "NestJS",
|
|
@@ -1323,134 +1323,134 @@ var supportedFrameworks = [
|
|
|
1323
1323
|
}
|
|
1324
1324
|
];
|
|
1325
1325
|
function GuideImportExistingCodebasesPage() {
|
|
1326
|
-
return /* @__PURE__ */
|
|
1326
|
+
return /* @__PURE__ */ jsxs6("div", {
|
|
1327
1327
|
className: "space-y-8",
|
|
1328
1328
|
children: [
|
|
1329
|
-
/* @__PURE__ */
|
|
1329
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1330
1330
|
className: "space-y-3",
|
|
1331
1331
|
children: [
|
|
1332
|
-
/* @__PURE__ */
|
|
1332
|
+
/* @__PURE__ */ jsx6("h1", {
|
|
1333
1333
|
className: "text-4xl font-bold",
|
|
1334
1334
|
children: "Import Existing Codebases"
|
|
1335
|
-
}
|
|
1336
|
-
/* @__PURE__ */
|
|
1335
|
+
}),
|
|
1336
|
+
/* @__PURE__ */ jsx6("p", {
|
|
1337
1337
|
className: "text-muted-foreground text-lg",
|
|
1338
1338
|
children: "Convert your existing API endpoints into ContractSpec contracts. Auto-detect frameworks, extract schemas, and generate spec-first definitions from your code."
|
|
1339
|
-
}
|
|
1339
|
+
})
|
|
1340
1340
|
]
|
|
1341
|
-
}
|
|
1342
|
-
/* @__PURE__ */
|
|
1341
|
+
}),
|
|
1342
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1343
1343
|
className: "card-subtle space-y-4 p-6",
|
|
1344
1344
|
children: [
|
|
1345
|
-
/* @__PURE__ */
|
|
1345
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1346
1346
|
className: "text-2xl font-bold",
|
|
1347
1347
|
children: "What you'll learn"
|
|
1348
|
-
}
|
|
1349
|
-
/* @__PURE__ */
|
|
1348
|
+
}),
|
|
1349
|
+
/* @__PURE__ */ jsxs6("ul", {
|
|
1350
1350
|
className: "text-muted-foreground space-y-2 text-sm",
|
|
1351
1351
|
children: [
|
|
1352
|
-
/* @__PURE__ */
|
|
1352
|
+
/* @__PURE__ */ jsx6("li", {
|
|
1353
1353
|
children: "How to import existing API endpoints as ContractSpec contracts."
|
|
1354
|
-
}
|
|
1355
|
-
/* @__PURE__ */
|
|
1354
|
+
}),
|
|
1355
|
+
/* @__PURE__ */ jsx6("li", {
|
|
1356
1356
|
children: "Framework-specific patterns and auto-detection."
|
|
1357
|
-
}
|
|
1358
|
-
/* @__PURE__ */
|
|
1357
|
+
}),
|
|
1358
|
+
/* @__PURE__ */ jsx6("li", {
|
|
1359
1359
|
children: "Customizing imports with scopes, dry-run, and output options."
|
|
1360
|
-
}
|
|
1361
|
-
/* @__PURE__ */
|
|
1360
|
+
}),
|
|
1361
|
+
/* @__PURE__ */ jsx6("li", {
|
|
1362
1362
|
children: "Registering imported contracts and adding handlers."
|
|
1363
|
-
}
|
|
1363
|
+
})
|
|
1364
1364
|
]
|
|
1365
|
-
}
|
|
1365
|
+
})
|
|
1366
1366
|
]
|
|
1367
|
-
}
|
|
1368
|
-
/* @__PURE__ */
|
|
1367
|
+
}),
|
|
1368
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1369
1369
|
className: "space-y-6",
|
|
1370
1370
|
children: [
|
|
1371
|
-
/* @__PURE__ */
|
|
1371
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1372
1372
|
className: "space-y-3",
|
|
1373
1373
|
children: [
|
|
1374
|
-
/* @__PURE__ */
|
|
1374
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1375
1375
|
className: "text-2xl font-bold",
|
|
1376
1376
|
children: "Why import existing code?"
|
|
1377
|
-
}
|
|
1378
|
-
/* @__PURE__ */
|
|
1377
|
+
}),
|
|
1378
|
+
/* @__PURE__ */ jsx6("p", {
|
|
1379
1379
|
className: "text-muted-foreground text-sm",
|
|
1380
1380
|
children: "Instead of writing contracts from scratch, the import command extracts endpoint patterns from your existing codebase. This gives you:"
|
|
1381
|
-
}
|
|
1382
|
-
/* @__PURE__ */
|
|
1381
|
+
}),
|
|
1382
|
+
/* @__PURE__ */ jsxs6("ul", {
|
|
1383
1383
|
className: "text-muted-foreground list-disc space-y-1 pl-5 text-sm",
|
|
1384
1384
|
children: [
|
|
1385
|
-
/* @__PURE__ */
|
|
1385
|
+
/* @__PURE__ */ jsx6("li", {
|
|
1386
1386
|
children: "Instant spec coverage for existing APIs"
|
|
1387
|
-
}
|
|
1388
|
-
/* @__PURE__ */
|
|
1387
|
+
}),
|
|
1388
|
+
/* @__PURE__ */ jsx6("li", {
|
|
1389
1389
|
children: "Type-safe schemas derived from your existing types"
|
|
1390
|
-
}
|
|
1391
|
-
/* @__PURE__ */
|
|
1390
|
+
}),
|
|
1391
|
+
/* @__PURE__ */ jsx6("li", {
|
|
1392
1392
|
children: "A foundation to iterate and refine contracts"
|
|
1393
|
-
}
|
|
1394
|
-
/* @__PURE__ */
|
|
1393
|
+
}),
|
|
1394
|
+
/* @__PURE__ */ jsx6("li", {
|
|
1395
1395
|
children: "Gradual adoption without rewriting code"
|
|
1396
|
-
}
|
|
1396
|
+
})
|
|
1397
1397
|
]
|
|
1398
|
-
}
|
|
1398
|
+
})
|
|
1399
1399
|
]
|
|
1400
|
-
}
|
|
1401
|
-
/* @__PURE__ */
|
|
1400
|
+
}),
|
|
1401
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1402
1402
|
className: "space-y-3",
|
|
1403
1403
|
children: [
|
|
1404
|
-
/* @__PURE__ */
|
|
1404
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1405
1405
|
className: "text-2xl font-bold",
|
|
1406
1406
|
children: "Supported frameworks"
|
|
1407
|
-
}
|
|
1408
|
-
/* @__PURE__ */
|
|
1407
|
+
}),
|
|
1408
|
+
/* @__PURE__ */ jsx6("div", {
|
|
1409
1409
|
className: "grid gap-3 md:grid-cols-2 lg:grid-cols-3",
|
|
1410
|
-
children: supportedFrameworks.map((fw) => /* @__PURE__ */
|
|
1410
|
+
children: supportedFrameworks.map((fw) => /* @__PURE__ */ jsxs6("div", {
|
|
1411
1411
|
className: "flex items-start gap-3 rounded-lg border border-white/10 p-4",
|
|
1412
1412
|
children: [
|
|
1413
|
-
/* @__PURE__ */
|
|
1413
|
+
/* @__PURE__ */ jsx6(FileCode, {
|
|
1414
1414
|
className: "text-violet-400",
|
|
1415
1415
|
size: 18
|
|
1416
|
-
}
|
|
1417
|
-
/* @__PURE__ */
|
|
1416
|
+
}),
|
|
1417
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1418
1418
|
className: "space-y-1",
|
|
1419
1419
|
children: [
|
|
1420
|
-
/* @__PURE__ */
|
|
1420
|
+
/* @__PURE__ */ jsx6("h3", {
|
|
1421
1421
|
className: "font-semibold",
|
|
1422
1422
|
children: fw.name
|
|
1423
|
-
}
|
|
1424
|
-
/* @__PURE__ */
|
|
1423
|
+
}),
|
|
1424
|
+
/* @__PURE__ */ jsx6("p", {
|
|
1425
1425
|
className: "text-muted-foreground text-xs",
|
|
1426
1426
|
children: fw.description
|
|
1427
|
-
}
|
|
1428
|
-
/* @__PURE__ */
|
|
1427
|
+
}),
|
|
1428
|
+
/* @__PURE__ */ jsxs6("code", {
|
|
1429
1429
|
className: "text-xs text-violet-400",
|
|
1430
1430
|
children: [
|
|
1431
1431
|
"--framework ",
|
|
1432
1432
|
fw.flag
|
|
1433
1433
|
]
|
|
1434
|
-
}
|
|
1434
|
+
})
|
|
1435
1435
|
]
|
|
1436
|
-
}
|
|
1436
|
+
})
|
|
1437
1437
|
]
|
|
1438
|
-
}, fw.flag
|
|
1439
|
-
}
|
|
1438
|
+
}, fw.flag))
|
|
1439
|
+
})
|
|
1440
1440
|
]
|
|
1441
|
-
}
|
|
1442
|
-
/* @__PURE__ */
|
|
1441
|
+
}),
|
|
1442
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1443
1443
|
className: "space-y-3",
|
|
1444
1444
|
children: [
|
|
1445
|
-
/* @__PURE__ */
|
|
1445
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1446
1446
|
className: "text-2xl font-bold",
|
|
1447
1447
|
children: "1) Quick start"
|
|
1448
|
-
}
|
|
1449
|
-
/* @__PURE__ */
|
|
1448
|
+
}),
|
|
1449
|
+
/* @__PURE__ */ jsx6("p", {
|
|
1450
1450
|
className: "text-muted-foreground text-sm",
|
|
1451
1451
|
children: "Run the import command to auto-detect your framework and extract endpoints:"
|
|
1452
|
-
}
|
|
1453
|
-
/* @__PURE__ */
|
|
1452
|
+
}),
|
|
1453
|
+
/* @__PURE__ */ jsx6(CodeBlock5, {
|
|
1454
1454
|
language: "bash",
|
|
1455
1455
|
filename: "import-quickstart",
|
|
1456
1456
|
code: `# Auto-detect framework and import all endpoints
|
|
@@ -1461,40 +1461,40 @@ contractspec import ./src --dry-run
|
|
|
1461
1461
|
|
|
1462
1462
|
# Force a specific framework
|
|
1463
1463
|
contractspec import ./src --framework nestjs`
|
|
1464
|
-
}
|
|
1465
|
-
/* @__PURE__ */
|
|
1464
|
+
}),
|
|
1465
|
+
/* @__PURE__ */ jsx6("p", {
|
|
1466
1466
|
className: "text-muted-foreground text-sm",
|
|
1467
1467
|
children: "Expected output: A summary of endpoints found, schemas extracted, and files generated."
|
|
1468
|
-
}
|
|
1468
|
+
})
|
|
1469
1469
|
]
|
|
1470
|
-
}
|
|
1471
|
-
/* @__PURE__ */
|
|
1470
|
+
}),
|
|
1471
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1472
1472
|
className: "space-y-3",
|
|
1473
1473
|
children: [
|
|
1474
|
-
/* @__PURE__ */
|
|
1474
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1475
1475
|
className: "text-2xl font-bold",
|
|
1476
1476
|
children: "2) Framework-specific patterns"
|
|
1477
|
-
}
|
|
1478
|
-
/* @__PURE__ */
|
|
1477
|
+
}),
|
|
1478
|
+
/* @__PURE__ */ jsx6("p", {
|
|
1479
1479
|
className: "text-muted-foreground text-sm",
|
|
1480
1480
|
children: "The import command recognizes these patterns in each framework:"
|
|
1481
|
-
}
|
|
1481
|
+
})
|
|
1482
1482
|
]
|
|
1483
|
-
}
|
|
1484
|
-
/* @__PURE__ */
|
|
1483
|
+
}),
|
|
1484
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1485
1485
|
className: "space-y-3",
|
|
1486
1486
|
children: [
|
|
1487
|
-
/* @__PURE__ */
|
|
1487
|
+
/* @__PURE__ */ jsxs6("h3", {
|
|
1488
1488
|
className: "flex items-center gap-2 text-xl font-semibold",
|
|
1489
1489
|
children: [
|
|
1490
|
-
/* @__PURE__ */
|
|
1490
|
+
/* @__PURE__ */ jsx6(Scan, {
|
|
1491
1491
|
size: 18,
|
|
1492
1492
|
className: "text-blue-400"
|
|
1493
|
-
}
|
|
1493
|
+
}),
|
|
1494
1494
|
"NestJS"
|
|
1495
1495
|
]
|
|
1496
|
-
}
|
|
1497
|
-
/* @__PURE__ */
|
|
1496
|
+
}),
|
|
1497
|
+
/* @__PURE__ */ jsx6(CodeBlock5, {
|
|
1498
1498
|
language: "typescript",
|
|
1499
1499
|
filename: "src/users/users.controller.ts (before)",
|
|
1500
1500
|
code: `@Controller('users')
|
|
@@ -1510,55 +1510,55 @@ export class UsersController {
|
|
|
1510
1510
|
return this.usersService.create(dto);
|
|
1511
1511
|
}
|
|
1512
1512
|
}`
|
|
1513
|
-
}
|
|
1514
|
-
/* @__PURE__ */
|
|
1513
|
+
}),
|
|
1514
|
+
/* @__PURE__ */ jsxs6("p", {
|
|
1515
1515
|
className: "text-muted-foreground text-sm",
|
|
1516
1516
|
children: [
|
|
1517
1517
|
"Detected: ",
|
|
1518
|
-
/* @__PURE__ */
|
|
1518
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1519
1519
|
children: "@Controller"
|
|
1520
|
-
}
|
|
1520
|
+
}),
|
|
1521
1521
|
", ",
|
|
1522
|
-
/* @__PURE__ */
|
|
1522
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1523
1523
|
children: "@Get"
|
|
1524
|
-
}
|
|
1524
|
+
}),
|
|
1525
1525
|
",",
|
|
1526
1526
|
" ",
|
|
1527
|
-
/* @__PURE__ */
|
|
1527
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1528
1528
|
children: "@Post"
|
|
1529
|
-
}
|
|
1529
|
+
}),
|
|
1530
1530
|
", ",
|
|
1531
|
-
/* @__PURE__ */
|
|
1531
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1532
1532
|
children: "@Body"
|
|
1533
|
-
}
|
|
1533
|
+
}),
|
|
1534
1534
|
", ",
|
|
1535
|
-
/* @__PURE__ */
|
|
1535
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1536
1536
|
children: "@Param"
|
|
1537
|
-
}
|
|
1537
|
+
}),
|
|
1538
1538
|
",",
|
|
1539
1539
|
" ",
|
|
1540
|
-
/* @__PURE__ */
|
|
1540
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1541
1541
|
children: "@UseGuards"
|
|
1542
|
-
}
|
|
1542
|
+
}),
|
|
1543
1543
|
" decorators."
|
|
1544
1544
|
]
|
|
1545
|
-
}
|
|
1545
|
+
})
|
|
1546
1546
|
]
|
|
1547
|
-
}
|
|
1548
|
-
/* @__PURE__ */
|
|
1547
|
+
}),
|
|
1548
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1549
1549
|
className: "space-y-3",
|
|
1550
1550
|
children: [
|
|
1551
|
-
/* @__PURE__ */
|
|
1551
|
+
/* @__PURE__ */ jsxs6("h3", {
|
|
1552
1552
|
className: "flex items-center gap-2 text-xl font-semibold",
|
|
1553
1553
|
children: [
|
|
1554
|
-
/* @__PURE__ */
|
|
1554
|
+
/* @__PURE__ */ jsx6(Scan, {
|
|
1555
1555
|
size: 18,
|
|
1556
1556
|
className: "text-green-400"
|
|
1557
|
-
}
|
|
1557
|
+
}),
|
|
1558
1558
|
"Express"
|
|
1559
1559
|
]
|
|
1560
|
-
}
|
|
1561
|
-
/* @__PURE__ */
|
|
1560
|
+
}),
|
|
1561
|
+
/* @__PURE__ */ jsx6(CodeBlock5, {
|
|
1562
1562
|
language: "typescript",
|
|
1563
1563
|
filename: "src/routes/users.ts (before)",
|
|
1564
1564
|
code: `const router = express.Router();
|
|
@@ -1572,37 +1572,37 @@ router.post('/users', validateBody(CreateUserSchema), async (req, res) => {
|
|
|
1572
1572
|
const user = await createUser(req.body);
|
|
1573
1573
|
res.status(201).json(user);
|
|
1574
1574
|
});`
|
|
1575
|
-
}
|
|
1576
|
-
/* @__PURE__ */
|
|
1575
|
+
}),
|
|
1576
|
+
/* @__PURE__ */ jsxs6("p", {
|
|
1577
1577
|
className: "text-muted-foreground text-sm",
|
|
1578
1578
|
children: [
|
|
1579
1579
|
"Detected: ",
|
|
1580
|
-
/* @__PURE__ */
|
|
1580
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1581
1581
|
children: "router.get"
|
|
1582
|
-
}
|
|
1582
|
+
}),
|
|
1583
1583
|
", ",
|
|
1584
|
-
/* @__PURE__ */
|
|
1584
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1585
1585
|
children: "router.post"
|
|
1586
|
-
}
|
|
1586
|
+
}),
|
|
1587
1587
|
", validation middleware, Zod schemas."
|
|
1588
1588
|
]
|
|
1589
|
-
}
|
|
1589
|
+
})
|
|
1590
1590
|
]
|
|
1591
|
-
}
|
|
1592
|
-
/* @__PURE__ */
|
|
1591
|
+
}),
|
|
1592
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1593
1593
|
className: "space-y-3",
|
|
1594
1594
|
children: [
|
|
1595
|
-
/* @__PURE__ */
|
|
1595
|
+
/* @__PURE__ */ jsxs6("h3", {
|
|
1596
1596
|
className: "flex items-center gap-2 text-xl font-semibold",
|
|
1597
1597
|
children: [
|
|
1598
|
-
/* @__PURE__ */
|
|
1598
|
+
/* @__PURE__ */ jsx6(Scan, {
|
|
1599
1599
|
size: 18,
|
|
1600
1600
|
className: "text-purple-400"
|
|
1601
|
-
}
|
|
1601
|
+
}),
|
|
1602
1602
|
"Next.js API Routes"
|
|
1603
1603
|
]
|
|
1604
|
-
}
|
|
1605
|
-
/* @__PURE__ */
|
|
1604
|
+
}),
|
|
1605
|
+
/* @__PURE__ */ jsx6(CodeBlock5, {
|
|
1606
1606
|
language: "typescript",
|
|
1607
1607
|
filename: "app/api/users/[id]/route.ts (before)",
|
|
1608
1608
|
code: `export async function GET(
|
|
@@ -1618,44 +1618,44 @@ export async function POST(request: Request) {
|
|
|
1618
1618
|
const user = await createUser(body);
|
|
1619
1619
|
return Response.json(user, { status: 201 });
|
|
1620
1620
|
}`
|
|
1621
|
-
}
|
|
1622
|
-
/* @__PURE__ */
|
|
1621
|
+
}),
|
|
1622
|
+
/* @__PURE__ */ jsxs6("p", {
|
|
1623
1623
|
className: "text-muted-foreground text-sm",
|
|
1624
1624
|
children: [
|
|
1625
1625
|
"Detected: ",
|
|
1626
|
-
/* @__PURE__ */
|
|
1626
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1627
1627
|
children: "GET"
|
|
1628
|
-
}
|
|
1628
|
+
}),
|
|
1629
1629
|
", ",
|
|
1630
|
-
/* @__PURE__ */
|
|
1630
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1631
1631
|
children: "POST"
|
|
1632
|
-
}
|
|
1632
|
+
}),
|
|
1633
1633
|
" exports in",
|
|
1634
1634
|
" ",
|
|
1635
|
-
/* @__PURE__ */
|
|
1635
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1636
1636
|
children: "app/api/**/route.ts"
|
|
1637
|
-
}
|
|
1637
|
+
}),
|
|
1638
1638
|
" and ",
|
|
1639
|
-
/* @__PURE__ */
|
|
1639
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1640
1640
|
children: "pages/api/**/*.ts"
|
|
1641
|
-
}
|
|
1641
|
+
}),
|
|
1642
1642
|
"."
|
|
1643
1643
|
]
|
|
1644
|
-
}
|
|
1644
|
+
})
|
|
1645
1645
|
]
|
|
1646
|
-
}
|
|
1647
|
-
/* @__PURE__ */
|
|
1646
|
+
}),
|
|
1647
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1648
1648
|
className: "space-y-3",
|
|
1649
1649
|
children: [
|
|
1650
|
-
/* @__PURE__ */
|
|
1650
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1651
1651
|
className: "text-2xl font-bold",
|
|
1652
1652
|
children: "3) Understanding generated contracts"
|
|
1653
|
-
}
|
|
1654
|
-
/* @__PURE__ */
|
|
1653
|
+
}),
|
|
1654
|
+
/* @__PURE__ */ jsx6("p", {
|
|
1655
1655
|
className: "text-muted-foreground text-sm",
|
|
1656
1656
|
children: "The import command generates ContractSpec operations with TODO placeholders for fields it cannot infer:"
|
|
1657
|
-
}
|
|
1658
|
-
/* @__PURE__ */
|
|
1657
|
+
}),
|
|
1658
|
+
/* @__PURE__ */ jsx6(CodeBlock5, {
|
|
1659
1659
|
language: "typescript",
|
|
1660
1660
|
filename: ".contractspec/generated/users.operation.ts",
|
|
1661
1661
|
code: `import { defineQuery, defineCommand } from "@contractspec/lib.contracts-spec";
|
|
@@ -1719,187 +1719,187 @@ export const CreateUserCommand = defineCommand({
|
|
|
1719
1719
|
rest: { method: "POST", path: "/users" },
|
|
1720
1720
|
},
|
|
1721
1721
|
});`
|
|
1722
|
-
}
|
|
1722
|
+
})
|
|
1723
1723
|
]
|
|
1724
|
-
}
|
|
1725
|
-
/* @__PURE__ */
|
|
1724
|
+
}),
|
|
1725
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1726
1726
|
className: "space-y-3",
|
|
1727
1727
|
children: [
|
|
1728
|
-
/* @__PURE__ */
|
|
1728
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1729
1729
|
className: "text-2xl font-bold",
|
|
1730
1730
|
children: "4) Customizing imports"
|
|
1731
|
-
}
|
|
1732
|
-
/* @__PURE__ */
|
|
1731
|
+
}),
|
|
1732
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1733
1733
|
className: "flex items-center gap-2",
|
|
1734
1734
|
children: [
|
|
1735
|
-
/* @__PURE__ */
|
|
1735
|
+
/* @__PURE__ */ jsx6(Settings, {
|
|
1736
1736
|
size: 18,
|
|
1737
1737
|
className: "text-violet-400"
|
|
1738
|
-
}
|
|
1739
|
-
/* @__PURE__ */
|
|
1738
|
+
}),
|
|
1739
|
+
/* @__PURE__ */ jsx6("h3", {
|
|
1740
1740
|
className: "text-lg font-semibold",
|
|
1741
1741
|
children: "Available options"
|
|
1742
|
-
}
|
|
1742
|
+
})
|
|
1743
1743
|
]
|
|
1744
|
-
}
|
|
1745
|
-
/* @__PURE__ */
|
|
1744
|
+
}),
|
|
1745
|
+
/* @__PURE__ */ jsx6("div", {
|
|
1746
1746
|
className: "overflow-x-auto",
|
|
1747
|
-
children: /* @__PURE__ */
|
|
1747
|
+
children: /* @__PURE__ */ jsxs6("table", {
|
|
1748
1748
|
className: "w-full text-sm",
|
|
1749
1749
|
children: [
|
|
1750
|
-
/* @__PURE__ */
|
|
1751
|
-
children: /* @__PURE__ */
|
|
1750
|
+
/* @__PURE__ */ jsx6("thead", {
|
|
1751
|
+
children: /* @__PURE__ */ jsxs6("tr", {
|
|
1752
1752
|
className: "border-b border-white/10",
|
|
1753
1753
|
children: [
|
|
1754
|
-
/* @__PURE__ */
|
|
1754
|
+
/* @__PURE__ */ jsx6("th", {
|
|
1755
1755
|
className: "py-2 pr-4 text-left",
|
|
1756
1756
|
children: "Option"
|
|
1757
|
-
}
|
|
1758
|
-
/* @__PURE__ */
|
|
1757
|
+
}),
|
|
1758
|
+
/* @__PURE__ */ jsx6("th", {
|
|
1759
1759
|
className: "py-2 pr-4 text-left",
|
|
1760
1760
|
children: "Description"
|
|
1761
|
-
}
|
|
1762
|
-
/* @__PURE__ */
|
|
1761
|
+
}),
|
|
1762
|
+
/* @__PURE__ */ jsx6("th", {
|
|
1763
1763
|
className: "py-2 text-left",
|
|
1764
1764
|
children: "Example"
|
|
1765
|
-
}
|
|
1765
|
+
})
|
|
1766
1766
|
]
|
|
1767
|
-
}
|
|
1768
|
-
}
|
|
1769
|
-
/* @__PURE__ */
|
|
1767
|
+
})
|
|
1768
|
+
}),
|
|
1769
|
+
/* @__PURE__ */ jsxs6("tbody", {
|
|
1770
1770
|
className: "text-muted-foreground",
|
|
1771
1771
|
children: [
|
|
1772
|
-
/* @__PURE__ */
|
|
1772
|
+
/* @__PURE__ */ jsxs6("tr", {
|
|
1773
1773
|
className: "border-b border-white/5",
|
|
1774
1774
|
children: [
|
|
1775
|
-
/* @__PURE__ */
|
|
1775
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1776
1776
|
className: "py-2 pr-4",
|
|
1777
|
-
children: /* @__PURE__ */
|
|
1777
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1778
1778
|
children: "--scope"
|
|
1779
|
-
}
|
|
1780
|
-
}
|
|
1781
|
-
/* @__PURE__ */
|
|
1779
|
+
})
|
|
1780
|
+
}),
|
|
1781
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1782
1782
|
className: "py-2 pr-4",
|
|
1783
1783
|
children: "Limit to specific directories"
|
|
1784
|
-
}
|
|
1785
|
-
/* @__PURE__ */
|
|
1784
|
+
}),
|
|
1785
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1786
1786
|
className: "py-2",
|
|
1787
|
-
children: /* @__PURE__ */
|
|
1787
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1788
1788
|
children: "--scope src/users src/auth"
|
|
1789
|
-
}
|
|
1790
|
-
}
|
|
1789
|
+
})
|
|
1790
|
+
})
|
|
1791
1791
|
]
|
|
1792
|
-
}
|
|
1793
|
-
/* @__PURE__ */
|
|
1792
|
+
}),
|
|
1793
|
+
/* @__PURE__ */ jsxs6("tr", {
|
|
1794
1794
|
className: "border-b border-white/5",
|
|
1795
1795
|
children: [
|
|
1796
|
-
/* @__PURE__ */
|
|
1796
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1797
1797
|
className: "py-2 pr-4",
|
|
1798
|
-
children: /* @__PURE__ */
|
|
1798
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1799
1799
|
children: "--framework"
|
|
1800
|
-
}
|
|
1801
|
-
}
|
|
1802
|
-
/* @__PURE__ */
|
|
1800
|
+
})
|
|
1801
|
+
}),
|
|
1802
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1803
1803
|
className: "py-2 pr-4",
|
|
1804
1804
|
children: "Force a specific framework"
|
|
1805
|
-
}
|
|
1806
|
-
/* @__PURE__ */
|
|
1805
|
+
}),
|
|
1806
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1807
1807
|
className: "py-2",
|
|
1808
|
-
children: /* @__PURE__ */
|
|
1808
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1809
1809
|
children: "--framework express"
|
|
1810
|
-
}
|
|
1811
|
-
}
|
|
1810
|
+
})
|
|
1811
|
+
})
|
|
1812
1812
|
]
|
|
1813
|
-
}
|
|
1814
|
-
/* @__PURE__ */
|
|
1813
|
+
}),
|
|
1814
|
+
/* @__PURE__ */ jsxs6("tr", {
|
|
1815
1815
|
className: "border-b border-white/5",
|
|
1816
1816
|
children: [
|
|
1817
|
-
/* @__PURE__ */
|
|
1817
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1818
1818
|
className: "py-2 pr-4",
|
|
1819
|
-
children: /* @__PURE__ */
|
|
1819
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1820
1820
|
children: "--output"
|
|
1821
|
-
}
|
|
1822
|
-
}
|
|
1823
|
-
/* @__PURE__ */
|
|
1821
|
+
})
|
|
1822
|
+
}),
|
|
1823
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1824
1824
|
className: "py-2 pr-4",
|
|
1825
1825
|
children: "Output directory"
|
|
1826
|
-
}
|
|
1827
|
-
/* @__PURE__ */
|
|
1826
|
+
}),
|
|
1827
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1828
1828
|
className: "py-2",
|
|
1829
|
-
children: /* @__PURE__ */
|
|
1829
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1830
1830
|
children: "--output ./contracts"
|
|
1831
|
-
}
|
|
1832
|
-
}
|
|
1831
|
+
})
|
|
1832
|
+
})
|
|
1833
1833
|
]
|
|
1834
|
-
}
|
|
1835
|
-
/* @__PURE__ */
|
|
1834
|
+
}),
|
|
1835
|
+
/* @__PURE__ */ jsxs6("tr", {
|
|
1836
1836
|
className: "border-b border-white/5",
|
|
1837
1837
|
children: [
|
|
1838
|
-
/* @__PURE__ */
|
|
1838
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1839
1839
|
className: "py-2 pr-4",
|
|
1840
|
-
children: /* @__PURE__ */
|
|
1840
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1841
1841
|
children: "--dry-run"
|
|
1842
|
-
}
|
|
1843
|
-
}
|
|
1844
|
-
/* @__PURE__ */
|
|
1842
|
+
})
|
|
1843
|
+
}),
|
|
1844
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1845
1845
|
className: "py-2 pr-4",
|
|
1846
1846
|
children: "Preview without writing files"
|
|
1847
|
-
}
|
|
1848
|
-
/* @__PURE__ */
|
|
1847
|
+
}),
|
|
1848
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1849
1849
|
className: "py-2",
|
|
1850
|
-
children: /* @__PURE__ */
|
|
1850
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1851
1851
|
children: "--dry-run"
|
|
1852
|
-
}
|
|
1853
|
-
}
|
|
1852
|
+
})
|
|
1853
|
+
})
|
|
1854
1854
|
]
|
|
1855
|
-
}
|
|
1856
|
-
/* @__PURE__ */
|
|
1855
|
+
}),
|
|
1856
|
+
/* @__PURE__ */ jsxs6("tr", {
|
|
1857
1857
|
className: "border-b border-white/5",
|
|
1858
1858
|
children: [
|
|
1859
|
-
/* @__PURE__ */
|
|
1859
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1860
1860
|
className: "py-2 pr-4",
|
|
1861
|
-
children: /* @__PURE__ */
|
|
1861
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1862
1862
|
children: "--analyze"
|
|
1863
|
-
}
|
|
1864
|
-
}
|
|
1865
|
-
/* @__PURE__ */
|
|
1863
|
+
})
|
|
1864
|
+
}),
|
|
1865
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1866
1866
|
className: "py-2 pr-4",
|
|
1867
1867
|
children: "Analysis only, no code generation"
|
|
1868
|
-
}
|
|
1869
|
-
/* @__PURE__ */
|
|
1868
|
+
}),
|
|
1869
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1870
1870
|
className: "py-2",
|
|
1871
|
-
children: /* @__PURE__ */
|
|
1871
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1872
1872
|
children: "--analyze"
|
|
1873
|
-
}
|
|
1874
|
-
}
|
|
1873
|
+
})
|
|
1874
|
+
})
|
|
1875
1875
|
]
|
|
1876
|
-
}
|
|
1877
|
-
/* @__PURE__ */
|
|
1876
|
+
}),
|
|
1877
|
+
/* @__PURE__ */ jsxs6("tr", {
|
|
1878
1878
|
children: [
|
|
1879
|
-
/* @__PURE__ */
|
|
1879
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1880
1880
|
className: "py-2 pr-4",
|
|
1881
|
-
children: /* @__PURE__ */
|
|
1881
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1882
1882
|
children: "--json"
|
|
1883
|
-
}
|
|
1884
|
-
}
|
|
1885
|
-
/* @__PURE__ */
|
|
1883
|
+
})
|
|
1884
|
+
}),
|
|
1885
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1886
1886
|
className: "py-2 pr-4",
|
|
1887
1887
|
children: "Output as JSON for scripting"
|
|
1888
|
-
}
|
|
1889
|
-
/* @__PURE__ */
|
|
1888
|
+
}),
|
|
1889
|
+
/* @__PURE__ */ jsx6("td", {
|
|
1890
1890
|
className: "py-2",
|
|
1891
|
-
children: /* @__PURE__ */
|
|
1891
|
+
children: /* @__PURE__ */ jsx6("code", {
|
|
1892
1892
|
children: "--json"
|
|
1893
|
-
}
|
|
1894
|
-
}
|
|
1893
|
+
})
|
|
1894
|
+
})
|
|
1895
1895
|
]
|
|
1896
|
-
}
|
|
1896
|
+
})
|
|
1897
1897
|
]
|
|
1898
|
-
}
|
|
1898
|
+
})
|
|
1899
1899
|
]
|
|
1900
|
-
}
|
|
1901
|
-
}
|
|
1902
|
-
/* @__PURE__ */
|
|
1900
|
+
})
|
|
1901
|
+
}),
|
|
1902
|
+
/* @__PURE__ */ jsx6(CodeBlock5, {
|
|
1903
1903
|
language: "bash",
|
|
1904
1904
|
filename: "import-options",
|
|
1905
1905
|
code: `# Import only specific modules
|
|
@@ -1913,21 +1913,21 @@ contractspec import ./src --output ./src/contracts/generated
|
|
|
1913
1913
|
|
|
1914
1914
|
# Get JSON for CI/scripting
|
|
1915
1915
|
contractspec import ./src --json > import-result.json`
|
|
1916
|
-
}
|
|
1916
|
+
})
|
|
1917
1917
|
]
|
|
1918
|
-
}
|
|
1919
|
-
/* @__PURE__ */
|
|
1918
|
+
}),
|
|
1919
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1920
1920
|
className: "space-y-3",
|
|
1921
1921
|
children: [
|
|
1922
|
-
/* @__PURE__ */
|
|
1922
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1923
1923
|
className: "text-2xl font-bold",
|
|
1924
1924
|
children: "5) Registering imported contracts"
|
|
1925
|
-
}
|
|
1926
|
-
/* @__PURE__ */
|
|
1925
|
+
}),
|
|
1926
|
+
/* @__PURE__ */ jsx6("p", {
|
|
1927
1927
|
className: "text-muted-foreground text-sm",
|
|
1928
1928
|
children: "After import, register contracts and add handlers:"
|
|
1929
|
-
}
|
|
1930
|
-
/* @__PURE__ */
|
|
1929
|
+
}),
|
|
1930
|
+
/* @__PURE__ */ jsx6(CodeBlock5, {
|
|
1931
1931
|
language: "typescript",
|
|
1932
1932
|
filename: "src/contracts/registry.ts",
|
|
1933
1933
|
code: `import {
|
|
@@ -1951,267 +1951,267 @@ installOp(registry, CreateUserCommand, async (input) => {
|
|
|
1951
1951
|
const user = await db.user.create({ data: input });
|
|
1952
1952
|
return { id: user.id };
|
|
1953
1953
|
});`
|
|
1954
|
-
}
|
|
1954
|
+
})
|
|
1955
1955
|
]
|
|
1956
|
-
}
|
|
1957
|
-
/* @__PURE__ */
|
|
1956
|
+
}),
|
|
1957
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1958
1958
|
className: "space-y-3",
|
|
1959
1959
|
children: [
|
|
1960
|
-
/* @__PURE__ */
|
|
1960
|
+
/* @__PURE__ */ jsx6("h2", {
|
|
1961
1961
|
className: "text-2xl font-bold",
|
|
1962
1962
|
children: "6) After importing"
|
|
1963
|
-
}
|
|
1964
|
-
/* @__PURE__ */
|
|
1963
|
+
}),
|
|
1964
|
+
/* @__PURE__ */ jsxs6("ol", {
|
|
1965
1965
|
className: "text-muted-foreground list-decimal space-y-2 pl-5 text-sm",
|
|
1966
1966
|
children: [
|
|
1967
|
-
/* @__PURE__ */
|
|
1967
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1968
1968
|
children: [
|
|
1969
|
-
/* @__PURE__ */
|
|
1969
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1970
1970
|
children: "Review generated contracts"
|
|
1971
|
-
}
|
|
1971
|
+
}),
|
|
1972
1972
|
" — Check the TODO placeholders and fill in descriptions, owners, and tags."
|
|
1973
1973
|
]
|
|
1974
|
-
}
|
|
1975
|
-
/* @__PURE__ */
|
|
1974
|
+
}),
|
|
1975
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1976
1976
|
children: [
|
|
1977
|
-
/* @__PURE__ */
|
|
1977
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1978
1978
|
children: "Refine schemas"
|
|
1979
|
-
}
|
|
1979
|
+
}),
|
|
1980
1980
|
" — Add proper types, validation rules, and error definitions."
|
|
1981
1981
|
]
|
|
1982
|
-
}
|
|
1983
|
-
/* @__PURE__ */
|
|
1982
|
+
}),
|
|
1983
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1984
1984
|
children: [
|
|
1985
|
-
/* @__PURE__ */
|
|
1985
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1986
1986
|
children: "Run validation"
|
|
1987
|
-
}
|
|
1987
|
+
}),
|
|
1988
1988
|
" —",
|
|
1989
1989
|
" ",
|
|
1990
|
-
/* @__PURE__ */
|
|
1990
|
+
/* @__PURE__ */ jsx6("code", {
|
|
1991
1991
|
children: "contractspec validate"
|
|
1992
|
-
}
|
|
1992
|
+
}),
|
|
1993
1993
|
" to ensure contracts are valid."
|
|
1994
1994
|
]
|
|
1995
|
-
}
|
|
1996
|
-
/* @__PURE__ */
|
|
1995
|
+
}),
|
|
1996
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
1997
1997
|
children: [
|
|
1998
|
-
/* @__PURE__ */
|
|
1998
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
1999
1999
|
children: "Register and wire handlers"
|
|
2000
|
-
}
|
|
2000
|
+
}),
|
|
2001
2001
|
" — Connect contracts to your existing business logic."
|
|
2002
2002
|
]
|
|
2003
|
-
}
|
|
2004
|
-
/* @__PURE__ */
|
|
2003
|
+
}),
|
|
2004
|
+
/* @__PURE__ */ jsxs6("li", {
|
|
2005
2005
|
children: [
|
|
2006
|
-
/* @__PURE__ */
|
|
2006
|
+
/* @__PURE__ */ jsx6("strong", {
|
|
2007
2007
|
children: "Iterate"
|
|
2008
|
-
}
|
|
2008
|
+
}),
|
|
2009
2009
|
" — The imported contracts are a starting point. Refine them as your spec matures."
|
|
2010
2010
|
]
|
|
2011
|
-
}
|
|
2011
|
+
})
|
|
2012
2012
|
]
|
|
2013
|
-
}
|
|
2013
|
+
})
|
|
2014
2014
|
]
|
|
2015
|
-
}
|
|
2016
|
-
/* @__PURE__ */
|
|
2015
|
+
}),
|
|
2016
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
2017
2017
|
className: "space-y-3",
|
|
2018
2018
|
children: [
|
|
2019
|
-
/* @__PURE__ */
|
|
2019
|
+
/* @__PURE__ */ jsxs6("h2", {
|
|
2020
2020
|
className: "flex items-center gap-2 text-2xl font-bold",
|
|
2021
2021
|
children: [
|
|
2022
|
-
/* @__PURE__ */
|
|
2022
|
+
/* @__PURE__ */ jsx6(AlertCircle, {
|
|
2023
2023
|
size: 20,
|
|
2024
2024
|
className: "text-yellow-400"
|
|
2025
|
-
}
|
|
2025
|
+
}),
|
|
2026
2026
|
"Troubleshooting"
|
|
2027
2027
|
]
|
|
2028
|
-
}
|
|
2029
|
-
/* @__PURE__ */
|
|
2028
|
+
}),
|
|
2029
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
2030
2030
|
className: "space-y-4",
|
|
2031
2031
|
children: [
|
|
2032
|
-
/* @__PURE__ */
|
|
2032
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
2033
2033
|
className: "card-subtle space-y-2 p-4",
|
|
2034
2034
|
children: [
|
|
2035
|
-
/* @__PURE__ */
|
|
2035
|
+
/* @__PURE__ */ jsx6("h3", {
|
|
2036
2036
|
className: "font-semibold",
|
|
2037
2037
|
children: "Framework not detected"
|
|
2038
|
-
}
|
|
2039
|
-
/* @__PURE__ */
|
|
2038
|
+
}),
|
|
2039
|
+
/* @__PURE__ */ jsxs6("p", {
|
|
2040
2040
|
className: "text-muted-foreground text-sm",
|
|
2041
2041
|
children: [
|
|
2042
2042
|
"Use ",
|
|
2043
|
-
/* @__PURE__ */
|
|
2043
|
+
/* @__PURE__ */ jsx6("code", {
|
|
2044
2044
|
children: "--framework <name>"
|
|
2045
|
-
}
|
|
2045
|
+
}),
|
|
2046
2046
|
" to force a specific framework. Check that your entry files follow standard patterns."
|
|
2047
2047
|
]
|
|
2048
|
-
}
|
|
2048
|
+
})
|
|
2049
2049
|
]
|
|
2050
|
-
}
|
|
2051
|
-
/* @__PURE__ */
|
|
2050
|
+
}),
|
|
2051
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
2052
2052
|
className: "card-subtle space-y-2 p-4",
|
|
2053
2053
|
children: [
|
|
2054
|
-
/* @__PURE__ */
|
|
2054
|
+
/* @__PURE__ */ jsx6("h3", {
|
|
2055
2055
|
className: "font-semibold",
|
|
2056
2056
|
children: "Missing schemas"
|
|
2057
|
-
}
|
|
2058
|
-
/* @__PURE__ */
|
|
2057
|
+
}),
|
|
2058
|
+
/* @__PURE__ */ jsxs6("p", {
|
|
2059
2059
|
className: "text-muted-foreground text-sm",
|
|
2060
2060
|
children: [
|
|
2061
2061
|
"Schema inference works best with explicit types. If using",
|
|
2062
2062
|
" ",
|
|
2063
|
-
/* @__PURE__ */
|
|
2063
|
+
/* @__PURE__ */ jsx6("code", {
|
|
2064
2064
|
children: "any"
|
|
2065
|
-
}
|
|
2065
|
+
}),
|
|
2066
2066
|
" or dynamic types, you'll see TODO placeholders. Fill them in manually."
|
|
2067
2067
|
]
|
|
2068
|
-
}
|
|
2068
|
+
})
|
|
2069
2069
|
]
|
|
2070
|
-
}
|
|
2071
|
-
/* @__PURE__ */
|
|
2070
|
+
}),
|
|
2071
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
2072
2072
|
className: "card-subtle space-y-2 p-4",
|
|
2073
2073
|
children: [
|
|
2074
|
-
/* @__PURE__ */
|
|
2074
|
+
/* @__PURE__ */ jsx6("h3", {
|
|
2075
2075
|
className: "font-semibold",
|
|
2076
2076
|
children: "Partial imports"
|
|
2077
|
-
}
|
|
2078
|
-
/* @__PURE__ */
|
|
2077
|
+
}),
|
|
2078
|
+
/* @__PURE__ */ jsxs6("p", {
|
|
2079
2079
|
className: "text-muted-foreground text-sm",
|
|
2080
2080
|
children: [
|
|
2081
2081
|
"Some endpoints may not be detected if they use unconventional patterns. Use ",
|
|
2082
|
-
/* @__PURE__ */
|
|
2082
|
+
/* @__PURE__ */ jsx6("code", {
|
|
2083
2083
|
children: "--analyze"
|
|
2084
|
-
}
|
|
2084
|
+
}),
|
|
2085
2085
|
" to see what was found, then add missing contracts manually."
|
|
2086
2086
|
]
|
|
2087
|
-
}
|
|
2087
|
+
})
|
|
2088
2088
|
]
|
|
2089
|
-
}
|
|
2089
|
+
})
|
|
2090
2090
|
]
|
|
2091
|
-
}
|
|
2091
|
+
})
|
|
2092
2092
|
]
|
|
2093
|
-
}
|
|
2094
|
-
/* @__PURE__ */
|
|
2093
|
+
}),
|
|
2094
|
+
/* @__PURE__ */ jsx6(StudioPrompt, {
|
|
2095
2095
|
title: "Want evidence-driven migration priorities?",
|
|
2096
2096
|
body: "Studio clusters product signals into scored patterns, then proposes spec-first change cards for the highest-impact areas."
|
|
2097
|
-
}
|
|
2097
|
+
})
|
|
2098
2098
|
]
|
|
2099
|
-
}
|
|
2100
|
-
/* @__PURE__ */
|
|
2099
|
+
}),
|
|
2100
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
2101
2101
|
className: "flex items-center gap-4 pt-4",
|
|
2102
2102
|
children: [
|
|
2103
|
-
/* @__PURE__ */
|
|
2103
|
+
/* @__PURE__ */ jsxs6(Link6, {
|
|
2104
2104
|
href: "/docs/guides/spec-validation-and-typing",
|
|
2105
2105
|
className: "btn-primary",
|
|
2106
2106
|
children: [
|
|
2107
2107
|
"Next: Spec validation + typing ",
|
|
2108
|
-
/* @__PURE__ */
|
|
2108
|
+
/* @__PURE__ */ jsx6(ChevronRight5, {
|
|
2109
2109
|
size: 16
|
|
2110
|
-
}
|
|
2110
|
+
})
|
|
2111
2111
|
]
|
|
2112
|
-
}
|
|
2113
|
-
/* @__PURE__ */
|
|
2112
|
+
}),
|
|
2113
|
+
/* @__PURE__ */ jsx6(Link6, {
|
|
2114
2114
|
href: "/docs/guides",
|
|
2115
2115
|
className: "btn-ghost",
|
|
2116
2116
|
children: "Back to guides"
|
|
2117
|
-
}
|
|
2117
|
+
})
|
|
2118
2118
|
]
|
|
2119
|
-
}
|
|
2119
|
+
})
|
|
2120
2120
|
]
|
|
2121
|
-
}
|
|
2121
|
+
});
|
|
2122
2122
|
}
|
|
2123
2123
|
|
|
2124
2124
|
// src/components/docs/guides/GuideNextjsOneEndpointPage.tsx
|
|
2125
2125
|
import { CodeBlock as CodeBlock6 } from "@contractspec/lib.design-system";
|
|
2126
2126
|
import Link7 from "@contractspec/lib.ui-link";
|
|
2127
2127
|
import { ChevronRight as ChevronRight6 } from "lucide-react";
|
|
2128
|
-
import {
|
|
2128
|
+
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2129
2129
|
function GuideNextjsOneEndpointPage() {
|
|
2130
|
-
return /* @__PURE__ */
|
|
2130
|
+
return /* @__PURE__ */ jsxs7("div", {
|
|
2131
2131
|
className: "space-y-8",
|
|
2132
2132
|
children: [
|
|
2133
|
-
/* @__PURE__ */
|
|
2133
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
2134
2134
|
className: "space-y-3",
|
|
2135
2135
|
children: [
|
|
2136
|
-
/* @__PURE__ */
|
|
2136
|
+
/* @__PURE__ */ jsx7("h1", {
|
|
2137
2137
|
className: "text-4xl font-bold",
|
|
2138
2138
|
children: "Next.js: add one endpoint"
|
|
2139
|
-
}
|
|
2140
|
-
/* @__PURE__ */
|
|
2139
|
+
}),
|
|
2140
|
+
/* @__PURE__ */ jsx7("p", {
|
|
2141
2141
|
className: "text-muted-foreground text-lg",
|
|
2142
2142
|
children: "Add ContractSpec to an existing Next.js App Router project by wiring a single operation end-to-end with validation and types."
|
|
2143
|
-
}
|
|
2143
|
+
})
|
|
2144
2144
|
]
|
|
2145
|
-
}
|
|
2146
|
-
/* @__PURE__ */
|
|
2145
|
+
}),
|
|
2146
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
2147
2147
|
className: "card-subtle space-y-4 p-6",
|
|
2148
2148
|
children: [
|
|
2149
|
-
/* @__PURE__ */
|
|
2149
|
+
/* @__PURE__ */ jsx7("h2", {
|
|
2150
2150
|
className: "text-2xl font-bold",
|
|
2151
2151
|
children: "What you'll build"
|
|
2152
|
-
}
|
|
2153
|
-
/* @__PURE__ */
|
|
2152
|
+
}),
|
|
2153
|
+
/* @__PURE__ */ jsxs7("ul", {
|
|
2154
2154
|
className: "text-muted-foreground space-y-2 text-sm",
|
|
2155
2155
|
children: [
|
|
2156
|
-
/* @__PURE__ */
|
|
2156
|
+
/* @__PURE__ */ jsx7("li", {
|
|
2157
2157
|
children: "One OperationSpec with SchemaModel validation."
|
|
2158
|
-
}
|
|
2159
|
-
/* @__PURE__ */
|
|
2158
|
+
}),
|
|
2159
|
+
/* @__PURE__ */ jsx7("li", {
|
|
2160
2160
|
children: "A registry wiring the operation to its handler."
|
|
2161
|
-
}
|
|
2162
|
-
/* @__PURE__ */
|
|
2161
|
+
}),
|
|
2162
|
+
/* @__PURE__ */ jsx7("li", {
|
|
2163
2163
|
children: "A Next.js route handler that exposes the operation."
|
|
2164
|
-
}
|
|
2164
|
+
})
|
|
2165
2165
|
]
|
|
2166
|
-
}
|
|
2166
|
+
})
|
|
2167
2167
|
]
|
|
2168
|
-
}
|
|
2169
|
-
/* @__PURE__ */
|
|
2168
|
+
}),
|
|
2169
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
2170
2170
|
className: "space-y-6",
|
|
2171
2171
|
children: [
|
|
2172
|
-
/* @__PURE__ */
|
|
2172
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
2173
2173
|
className: "space-y-3",
|
|
2174
2174
|
children: [
|
|
2175
|
-
/* @__PURE__ */
|
|
2175
|
+
/* @__PURE__ */ jsx7("h2", {
|
|
2176
2176
|
className: "text-2xl font-bold",
|
|
2177
2177
|
children: "1) Install core packages"
|
|
2178
|
-
}
|
|
2179
|
-
/* @__PURE__ */
|
|
2178
|
+
}),
|
|
2179
|
+
/* @__PURE__ */ jsx7(CodeBlock6, {
|
|
2180
2180
|
language: "bash",
|
|
2181
2181
|
filename: "nextjs-install",
|
|
2182
2182
|
code: `bun add -D contractspec
|
|
2183
2183
|
bun add @contractspec/lib.contracts-spec @contractspec/lib.contracts-runtime-server-rest @contractspec/lib.schema`
|
|
2184
|
-
}
|
|
2185
|
-
/* @__PURE__ */
|
|
2184
|
+
}),
|
|
2185
|
+
/* @__PURE__ */ jsxs7("p", {
|
|
2186
2186
|
className: "text-muted-foreground text-sm",
|
|
2187
2187
|
children: [
|
|
2188
2188
|
"Expected output: ",
|
|
2189
|
-
/* @__PURE__ */
|
|
2189
|
+
/* @__PURE__ */ jsx7("code", {
|
|
2190
2190
|
children: "added 3 packages"
|
|
2191
|
-
}
|
|
2191
|
+
}),
|
|
2192
2192
|
" and a lockfile update."
|
|
2193
2193
|
]
|
|
2194
|
-
}
|
|
2194
|
+
})
|
|
2195
2195
|
]
|
|
2196
|
-
}
|
|
2197
|
-
/* @__PURE__ */
|
|
2196
|
+
}),
|
|
2197
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
2198
2198
|
className: "space-y-3",
|
|
2199
2199
|
children: [
|
|
2200
|
-
/* @__PURE__ */
|
|
2200
|
+
/* @__PURE__ */ jsx7("h2", {
|
|
2201
2201
|
className: "text-2xl font-bold",
|
|
2202
2202
|
children: "2) Define the operation spec"
|
|
2203
|
-
}
|
|
2204
|
-
/* @__PURE__ */
|
|
2203
|
+
}),
|
|
2204
|
+
/* @__PURE__ */ jsxs7("p", {
|
|
2205
2205
|
className: "text-muted-foreground text-sm",
|
|
2206
2206
|
children: [
|
|
2207
2207
|
"Create ",
|
|
2208
|
-
/* @__PURE__ */
|
|
2208
|
+
/* @__PURE__ */ jsx7("code", {
|
|
2209
2209
|
children: "src/contracts/healthcheck.operation.ts"
|
|
2210
|
-
}
|
|
2210
|
+
}),
|
|
2211
2211
|
":"
|
|
2212
2212
|
]
|
|
2213
|
-
}
|
|
2214
|
-
/* @__PURE__ */
|
|
2213
|
+
}),
|
|
2214
|
+
/* @__PURE__ */ jsx7(CodeBlock6, {
|
|
2215
2215
|
language: "typescript",
|
|
2216
2216
|
filename: "src/contracts/healthcheck.operation.ts",
|
|
2217
2217
|
code: `import { defineQuery } from "@contractspec/lib.contracts-spec/operations";
|
|
@@ -2246,27 +2246,27 @@ export const HealthcheckQuery = defineQuery({
|
|
|
2246
2246
|
mcp: { toolName: "healthcheck.get.v1" },
|
|
2247
2247
|
},
|
|
2248
2248
|
});`
|
|
2249
|
-
}
|
|
2249
|
+
})
|
|
2250
2250
|
]
|
|
2251
|
-
}
|
|
2252
|
-
/* @__PURE__ */
|
|
2251
|
+
}),
|
|
2252
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
2253
2253
|
className: "space-y-3",
|
|
2254
2254
|
children: [
|
|
2255
|
-
/* @__PURE__ */
|
|
2255
|
+
/* @__PURE__ */ jsx7("h2", {
|
|
2256
2256
|
className: "text-2xl font-bold",
|
|
2257
2257
|
children: "3) Register the operation"
|
|
2258
|
-
}
|
|
2259
|
-
/* @__PURE__ */
|
|
2258
|
+
}),
|
|
2259
|
+
/* @__PURE__ */ jsxs7("p", {
|
|
2260
2260
|
className: "text-muted-foreground text-sm",
|
|
2261
2261
|
children: [
|
|
2262
2262
|
"Create ",
|
|
2263
|
-
/* @__PURE__ */
|
|
2263
|
+
/* @__PURE__ */ jsx7("code", {
|
|
2264
2264
|
children: "src/contracts/registry.ts"
|
|
2265
|
-
}
|
|
2265
|
+
}),
|
|
2266
2266
|
":"
|
|
2267
2267
|
]
|
|
2268
|
-
}
|
|
2269
|
-
/* @__PURE__ */
|
|
2268
|
+
}),
|
|
2269
|
+
/* @__PURE__ */ jsx7(CodeBlock6, {
|
|
2270
2270
|
language: "typescript",
|
|
2271
2271
|
filename: "src/contracts/registry.ts",
|
|
2272
2272
|
code: `import {
|
|
@@ -2281,27 +2281,27 @@ installOp(registry, HealthcheckQuery, async () => ({
|
|
|
2281
2281
|
status: "ok",
|
|
2282
2282
|
checkedAt: new Date().toISOString(),
|
|
2283
2283
|
}));`
|
|
2284
|
-
}
|
|
2284
|
+
})
|
|
2285
2285
|
]
|
|
2286
|
-
}
|
|
2287
|
-
/* @__PURE__ */
|
|
2286
|
+
}),
|
|
2287
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
2288
2288
|
className: "space-y-3",
|
|
2289
2289
|
children: [
|
|
2290
|
-
/* @__PURE__ */
|
|
2290
|
+
/* @__PURE__ */ jsx7("h2", {
|
|
2291
2291
|
className: "text-2xl font-bold",
|
|
2292
2292
|
children: "4) Add the Next.js handler"
|
|
2293
|
-
}
|
|
2294
|
-
/* @__PURE__ */
|
|
2293
|
+
}),
|
|
2294
|
+
/* @__PURE__ */ jsxs7("p", {
|
|
2295
2295
|
className: "text-muted-foreground text-sm",
|
|
2296
2296
|
children: [
|
|
2297
2297
|
"Create ",
|
|
2298
|
-
/* @__PURE__ */
|
|
2298
|
+
/* @__PURE__ */ jsx7("code", {
|
|
2299
2299
|
children: "app/api/ops/[...route]/route.ts"
|
|
2300
|
-
}
|
|
2300
|
+
}),
|
|
2301
2301
|
":"
|
|
2302
2302
|
]
|
|
2303
|
-
}
|
|
2304
|
-
/* @__PURE__ */
|
|
2303
|
+
}),
|
|
2304
|
+
/* @__PURE__ */ jsx7(CodeBlock6, {
|
|
2305
2305
|
language: "typescript",
|
|
2306
2306
|
filename: "app/api/ops/[...route]/route.ts",
|
|
2307
2307
|
code: `import { makeNextAppHandler } from "@contractspec/lib.contracts-runtime-server-rest/rest-next-app";
|
|
@@ -2313,61 +2313,61 @@ const handler = makeNextAppHandler(registry, async () => ({
|
|
|
2313
2313
|
}));
|
|
2314
2314
|
|
|
2315
2315
|
export { handler as GET, handler as POST };`
|
|
2316
|
-
}
|
|
2317
|
-
/* @__PURE__ */
|
|
2316
|
+
}),
|
|
2317
|
+
/* @__PURE__ */ jsxs7("p", {
|
|
2318
2318
|
className: "text-muted-foreground text-sm",
|
|
2319
2319
|
children: [
|
|
2320
2320
|
"Expected output: the route responds at",
|
|
2321
|
-
/* @__PURE__ */
|
|
2321
|
+
/* @__PURE__ */ jsx7("code", {
|
|
2322
2322
|
children: " /api/ops/healthcheck.get"
|
|
2323
|
-
}
|
|
2323
|
+
}),
|
|
2324
2324
|
"."
|
|
2325
2325
|
]
|
|
2326
|
-
}
|
|
2326
|
+
})
|
|
2327
2327
|
]
|
|
2328
|
-
}
|
|
2329
|
-
/* @__PURE__ */
|
|
2328
|
+
}),
|
|
2329
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
2330
2330
|
className: "space-y-3",
|
|
2331
2331
|
children: [
|
|
2332
|
-
/* @__PURE__ */
|
|
2332
|
+
/* @__PURE__ */ jsx7("h2", {
|
|
2333
2333
|
className: "text-2xl font-bold",
|
|
2334
2334
|
children: "5) Validate the spec"
|
|
2335
|
-
}
|
|
2336
|
-
/* @__PURE__ */
|
|
2335
|
+
}),
|
|
2336
|
+
/* @__PURE__ */ jsx7(CodeBlock6, {
|
|
2337
2337
|
language: "bash",
|
|
2338
2338
|
filename: "nextjs-validate",
|
|
2339
2339
|
code: `contractspec validate src/contracts/healthcheck.operation.ts`
|
|
2340
|
-
}
|
|
2341
|
-
/* @__PURE__ */
|
|
2340
|
+
}),
|
|
2341
|
+
/* @__PURE__ */ jsxs7("p", {
|
|
2342
2342
|
className: "text-muted-foreground text-sm",
|
|
2343
2343
|
children: [
|
|
2344
2344
|
"Expected output: ",
|
|
2345
|
-
/* @__PURE__ */
|
|
2345
|
+
/* @__PURE__ */ jsx7("code", {
|
|
2346
2346
|
children: "Validation passed"
|
|
2347
|
-
}
|
|
2347
|
+
}),
|
|
2348
2348
|
"."
|
|
2349
2349
|
]
|
|
2350
|
-
}
|
|
2350
|
+
})
|
|
2351
2351
|
]
|
|
2352
|
-
}
|
|
2353
|
-
/* @__PURE__ */
|
|
2352
|
+
}),
|
|
2353
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
2354
2354
|
className: "card-subtle space-y-3 p-6",
|
|
2355
2355
|
children: [
|
|
2356
|
-
/* @__PURE__ */
|
|
2356
|
+
/* @__PURE__ */ jsx7("h3", {
|
|
2357
2357
|
className: "text-lg font-semibold",
|
|
2358
2358
|
children: "Example package"
|
|
2359
|
-
}
|
|
2360
|
-
/* @__PURE__ */
|
|
2359
|
+
}),
|
|
2360
|
+
/* @__PURE__ */ jsxs7("p", {
|
|
2361
2361
|
className: "text-muted-foreground text-sm",
|
|
2362
2362
|
children: [
|
|
2363
2363
|
"Use ",
|
|
2364
|
-
/* @__PURE__ */
|
|
2364
|
+
/* @__PURE__ */ jsx7("code", {
|
|
2365
2365
|
children: "@contractspec/example.lifecycle-dashboard"
|
|
2366
|
-
}
|
|
2366
|
+
}),
|
|
2367
2367
|
" as a lightweight Next.js snippet reference."
|
|
2368
2368
|
]
|
|
2369
|
-
}
|
|
2370
|
-
/* @__PURE__ */
|
|
2369
|
+
}),
|
|
2370
|
+
/* @__PURE__ */ jsx7(CodeBlock6, {
|
|
2371
2371
|
language: "bash",
|
|
2372
2372
|
filename: "nextjs-example",
|
|
2373
2373
|
code: `# Inspect the example docs
|
|
@@ -2375,105 +2375,105 @@ contractspec examples show lifecycle-dashboard
|
|
|
2375
2375
|
|
|
2376
2376
|
# Validate all example manifests in this repo
|
|
2377
2377
|
contractspec examples validate --repo-root .`
|
|
2378
|
-
}
|
|
2378
|
+
})
|
|
2379
2379
|
]
|
|
2380
|
-
}
|
|
2381
|
-
/* @__PURE__ */
|
|
2380
|
+
}),
|
|
2381
|
+
/* @__PURE__ */ jsx7(StudioPrompt, {
|
|
2382
2382
|
title: "Want real product evidence behind endpoint changes?",
|
|
2383
2383
|
body: "Studio correlates meetings, support, analytics, and code signals before compiling endpoint decisions into spec diffs."
|
|
2384
|
-
}
|
|
2384
|
+
})
|
|
2385
2385
|
]
|
|
2386
|
-
}
|
|
2387
|
-
/* @__PURE__ */
|
|
2386
|
+
}),
|
|
2387
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
2388
2388
|
className: "flex items-center gap-4 pt-4",
|
|
2389
2389
|
children: [
|
|
2390
|
-
/* @__PURE__ */
|
|
2390
|
+
/* @__PURE__ */ jsxs7(Link7, {
|
|
2391
2391
|
href: "/docs/guides/spec-validation-and-typing",
|
|
2392
2392
|
className: "btn-primary",
|
|
2393
2393
|
children: [
|
|
2394
2394
|
"Next: Spec validation + typing ",
|
|
2395
|
-
/* @__PURE__ */
|
|
2395
|
+
/* @__PURE__ */ jsx7(ChevronRight6, {
|
|
2396
2396
|
size: 16
|
|
2397
|
-
}
|
|
2397
|
+
})
|
|
2398
2398
|
]
|
|
2399
|
-
}
|
|
2400
|
-
/* @__PURE__ */
|
|
2399
|
+
}),
|
|
2400
|
+
/* @__PURE__ */ jsx7(Link7, {
|
|
2401
2401
|
href: "/docs/guides",
|
|
2402
2402
|
className: "btn-ghost",
|
|
2403
2403
|
children: "Back to guides"
|
|
2404
|
-
}
|
|
2404
|
+
})
|
|
2405
2405
|
]
|
|
2406
|
-
}
|
|
2406
|
+
})
|
|
2407
2407
|
]
|
|
2408
|
-
}
|
|
2408
|
+
});
|
|
2409
2409
|
}
|
|
2410
2410
|
|
|
2411
2411
|
// src/components/docs/guides/GuideSpecValidationTypingPage.tsx
|
|
2412
2412
|
import { CodeBlock as CodeBlock7 } from "@contractspec/lib.design-system";
|
|
2413
2413
|
import Link8 from "@contractspec/lib.ui-link";
|
|
2414
2414
|
import { ChevronRight as ChevronRight7 } from "lucide-react";
|
|
2415
|
-
import {
|
|
2415
|
+
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2416
2416
|
function GuideSpecValidationTypingPage() {
|
|
2417
|
-
return /* @__PURE__ */
|
|
2417
|
+
return /* @__PURE__ */ jsxs8("div", {
|
|
2418
2418
|
className: "space-y-8",
|
|
2419
2419
|
children: [
|
|
2420
|
-
/* @__PURE__ */
|
|
2420
|
+
/* @__PURE__ */ jsxs8("div", {
|
|
2421
2421
|
className: "space-y-3",
|
|
2422
2422
|
children: [
|
|
2423
|
-
/* @__PURE__ */
|
|
2423
|
+
/* @__PURE__ */ jsx8("h1", {
|
|
2424
2424
|
className: "text-4xl font-bold",
|
|
2425
2425
|
children: "Spec-driven validation + typing"
|
|
2426
|
-
}
|
|
2427
|
-
/* @__PURE__ */
|
|
2426
|
+
}),
|
|
2427
|
+
/* @__PURE__ */ jsx8("p", {
|
|
2428
2428
|
className: "text-muted-foreground text-lg",
|
|
2429
2429
|
children: "Define a single operation with SchemaModel, generate validation, and keep your existing handler logic."
|
|
2430
|
-
}
|
|
2430
|
+
})
|
|
2431
2431
|
]
|
|
2432
|
-
}
|
|
2433
|
-
/* @__PURE__ */
|
|
2432
|
+
}),
|
|
2433
|
+
/* @__PURE__ */ jsxs8("div", {
|
|
2434
2434
|
className: "card-subtle space-y-4 p-6",
|
|
2435
2435
|
children: [
|
|
2436
|
-
/* @__PURE__ */
|
|
2436
|
+
/* @__PURE__ */ jsx8("h2", {
|
|
2437
2437
|
className: "text-2xl font-bold",
|
|
2438
2438
|
children: "What you'll build"
|
|
2439
|
-
}
|
|
2440
|
-
/* @__PURE__ */
|
|
2439
|
+
}),
|
|
2440
|
+
/* @__PURE__ */ jsxs8("ul", {
|
|
2441
2441
|
className: "text-muted-foreground space-y-2 text-sm",
|
|
2442
2442
|
children: [
|
|
2443
|
-
/* @__PURE__ */
|
|
2443
|
+
/* @__PURE__ */ jsx8("li", {
|
|
2444
2444
|
children: "One command spec with explicit input/output models."
|
|
2445
|
-
}
|
|
2446
|
-
/* @__PURE__ */
|
|
2445
|
+
}),
|
|
2446
|
+
/* @__PURE__ */ jsx8("li", {
|
|
2447
2447
|
children: "Validation + typing without rewriting your service layer."
|
|
2448
|
-
}
|
|
2449
|
-
/* @__PURE__ */
|
|
2448
|
+
}),
|
|
2449
|
+
/* @__PURE__ */ jsx8("li", {
|
|
2450
2450
|
children: "Clear acceptance scenarios for regression safety."
|
|
2451
|
-
}
|
|
2451
|
+
})
|
|
2452
2452
|
]
|
|
2453
|
-
}
|
|
2453
|
+
})
|
|
2454
2454
|
]
|
|
2455
|
-
}
|
|
2456
|
-
/* @__PURE__ */
|
|
2455
|
+
}),
|
|
2456
|
+
/* @__PURE__ */ jsxs8("div", {
|
|
2457
2457
|
className: "space-y-6",
|
|
2458
2458
|
children: [
|
|
2459
|
-
/* @__PURE__ */
|
|
2459
|
+
/* @__PURE__ */ jsxs8("div", {
|
|
2460
2460
|
className: "space-y-3",
|
|
2461
2461
|
children: [
|
|
2462
|
-
/* @__PURE__ */
|
|
2462
|
+
/* @__PURE__ */ jsx8("h2", {
|
|
2463
2463
|
className: "text-2xl font-bold",
|
|
2464
2464
|
children: "1) Define the spec"
|
|
2465
|
-
}
|
|
2466
|
-
/* @__PURE__ */
|
|
2465
|
+
}),
|
|
2466
|
+
/* @__PURE__ */ jsxs8("p", {
|
|
2467
2467
|
className: "text-muted-foreground text-sm",
|
|
2468
2468
|
children: [
|
|
2469
2469
|
"Create ",
|
|
2470
|
-
/* @__PURE__ */
|
|
2470
|
+
/* @__PURE__ */ jsx8("code", {
|
|
2471
2471
|
children: "src/contracts/contact-create.operation.ts"
|
|
2472
|
-
}
|
|
2472
|
+
}),
|
|
2473
2473
|
":"
|
|
2474
2474
|
]
|
|
2475
|
-
}
|
|
2476
|
-
/* @__PURE__ */
|
|
2475
|
+
}),
|
|
2476
|
+
/* @__PURE__ */ jsx8(CodeBlock7, {
|
|
2477
2477
|
language: "typescript",
|
|
2478
2478
|
filename: "src/contracts/contact-create.operation.ts",
|
|
2479
2479
|
code: `import { defineCommand } from "@contractspec/lib.contracts-spec/operations";
|
|
@@ -2523,21 +2523,21 @@ export const ContactCreateCommand = defineCommand({
|
|
|
2523
2523
|
],
|
|
2524
2524
|
},
|
|
2525
2525
|
});`
|
|
2526
|
-
}
|
|
2526
|
+
})
|
|
2527
2527
|
]
|
|
2528
|
-
}
|
|
2529
|
-
/* @__PURE__ */
|
|
2528
|
+
}),
|
|
2529
|
+
/* @__PURE__ */ jsxs8("div", {
|
|
2530
2530
|
className: "space-y-3",
|
|
2531
2531
|
children: [
|
|
2532
|
-
/* @__PURE__ */
|
|
2532
|
+
/* @__PURE__ */ jsx8("h2", {
|
|
2533
2533
|
className: "text-2xl font-bold",
|
|
2534
2534
|
children: "2) Wire the handler"
|
|
2535
|
-
}
|
|
2536
|
-
/* @__PURE__ */
|
|
2535
|
+
}),
|
|
2536
|
+
/* @__PURE__ */ jsx8("p", {
|
|
2537
2537
|
className: "text-muted-foreground text-sm",
|
|
2538
2538
|
children: "Keep your existing code. Just ensure the handler returns the output shape defined above."
|
|
2539
|
-
}
|
|
2540
|
-
/* @__PURE__ */
|
|
2539
|
+
}),
|
|
2540
|
+
/* @__PURE__ */ jsx8(CodeBlock7, {
|
|
2541
2541
|
language: "typescript",
|
|
2542
2542
|
filename: "src/handlers/contact-create.ts",
|
|
2543
2543
|
code: `import { ContactCreateCommand } from "@/contracts/contact-create.operation";
|
|
@@ -2553,45 +2553,45 @@ export const ContactCreateCommand = defineCommand({
|
|
|
2553
2553
|
createdAt: new Date().toISOString(),
|
|
2554
2554
|
};
|
|
2555
2555
|
}`
|
|
2556
|
-
}
|
|
2556
|
+
})
|
|
2557
2557
|
]
|
|
2558
|
-
}
|
|
2559
|
-
/* @__PURE__ */
|
|
2558
|
+
}),
|
|
2559
|
+
/* @__PURE__ */ jsxs8("div", {
|
|
2560
2560
|
className: "space-y-3",
|
|
2561
2561
|
children: [
|
|
2562
|
-
/* @__PURE__ */
|
|
2562
|
+
/* @__PURE__ */ jsx8("h2", {
|
|
2563
2563
|
className: "text-2xl font-bold",
|
|
2564
2564
|
children: "3) Validate"
|
|
2565
|
-
}
|
|
2566
|
-
/* @__PURE__ */
|
|
2565
|
+
}),
|
|
2566
|
+
/* @__PURE__ */ jsx8(CodeBlock7, {
|
|
2567
2567
|
language: "bash",
|
|
2568
2568
|
filename: "spec-validation",
|
|
2569
2569
|
code: `contractspec validate src/contracts/contact-create.operation.ts`
|
|
2570
|
-
}
|
|
2571
|
-
/* @__PURE__ */
|
|
2570
|
+
}),
|
|
2571
|
+
/* @__PURE__ */ jsxs8("p", {
|
|
2572
2572
|
className: "text-muted-foreground text-sm",
|
|
2573
2573
|
children: [
|
|
2574
2574
|
"Expected output: ",
|
|
2575
|
-
/* @__PURE__ */
|
|
2575
|
+
/* @__PURE__ */ jsx8("code", {
|
|
2576
2576
|
children: "Validation passed"
|
|
2577
|
-
}
|
|
2577
|
+
}),
|
|
2578
2578
|
"."
|
|
2579
2579
|
]
|
|
2580
|
-
}
|
|
2580
|
+
})
|
|
2581
2581
|
]
|
|
2582
|
-
}
|
|
2583
|
-
/* @__PURE__ */
|
|
2582
|
+
}),
|
|
2583
|
+
/* @__PURE__ */ jsxs8("div", {
|
|
2584
2584
|
className: "card-subtle space-y-3 p-6",
|
|
2585
2585
|
children: [
|
|
2586
|
-
/* @__PURE__ */
|
|
2586
|
+
/* @__PURE__ */ jsx8("h3", {
|
|
2587
2587
|
className: "text-lg font-semibold",
|
|
2588
2588
|
children: "Example package"
|
|
2589
|
-
}
|
|
2590
|
-
/* @__PURE__ */
|
|
2589
|
+
}),
|
|
2590
|
+
/* @__PURE__ */ jsx8("p", {
|
|
2591
2591
|
className: "text-muted-foreground text-sm",
|
|
2592
2592
|
children: "The CRM Pipeline example includes real specs, handlers, and presentations for contact + deal flows."
|
|
2593
|
-
}
|
|
2594
|
-
/* @__PURE__ */
|
|
2593
|
+
}),
|
|
2594
|
+
/* @__PURE__ */ jsx8(CodeBlock7, {
|
|
2595
2595
|
language: "bash",
|
|
2596
2596
|
filename: "crm-example",
|
|
2597
2597
|
code: `# Build + validate the CRM pipeline example
|
|
@@ -2599,44 +2599,44 @@ cd packages/examples/crm-pipeline
|
|
|
2599
2599
|
bun install
|
|
2600
2600
|
bun run build
|
|
2601
2601
|
bun run validate`
|
|
2602
|
-
}
|
|
2602
|
+
})
|
|
2603
2603
|
]
|
|
2604
|
-
}
|
|
2605
|
-
/* @__PURE__ */
|
|
2604
|
+
}),
|
|
2605
|
+
/* @__PURE__ */ jsx8(StudioPrompt, {
|
|
2606
2606
|
title: "Need validation tied to real outcomes?",
|
|
2607
2607
|
body: "Studio links checks to evidence, focus decisions, and post-release verification so specs evolve with product truth."
|
|
2608
|
-
}
|
|
2608
|
+
})
|
|
2609
2609
|
]
|
|
2610
|
-
}
|
|
2611
|
-
/* @__PURE__ */
|
|
2610
|
+
}),
|
|
2611
|
+
/* @__PURE__ */ jsxs8("div", {
|
|
2612
2612
|
className: "flex items-center gap-4 pt-4",
|
|
2613
2613
|
children: [
|
|
2614
|
-
/* @__PURE__ */
|
|
2614
|
+
/* @__PURE__ */ jsxs8(Link8, {
|
|
2615
2615
|
href: "/docs/guides/generate-docs-clients-schemas",
|
|
2616
2616
|
className: "btn-primary",
|
|
2617
2617
|
children: [
|
|
2618
2618
|
"Next: Generate docs + clients ",
|
|
2619
|
-
/* @__PURE__ */
|
|
2619
|
+
/* @__PURE__ */ jsx8(ChevronRight7, {
|
|
2620
2620
|
size: 16
|
|
2621
|
-
}
|
|
2621
|
+
})
|
|
2622
2622
|
]
|
|
2623
|
-
}
|
|
2624
|
-
/* @__PURE__ */
|
|
2623
|
+
}),
|
|
2624
|
+
/* @__PURE__ */ jsx8(Link8, {
|
|
2625
2625
|
href: "/docs/guides",
|
|
2626
2626
|
className: "btn-ghost",
|
|
2627
2627
|
children: "Back to guides"
|
|
2628
|
-
}
|
|
2628
|
+
})
|
|
2629
2629
|
]
|
|
2630
|
-
}
|
|
2630
|
+
})
|
|
2631
2631
|
]
|
|
2632
|
-
}
|
|
2632
|
+
});
|
|
2633
2633
|
}
|
|
2634
2634
|
|
|
2635
2635
|
// src/components/docs/guides/GuidesIndexPage.tsx
|
|
2636
2636
|
import { CodeBlock as CodeBlock8 } from "@contractspec/lib.design-system";
|
|
2637
2637
|
import Link9 from "@contractspec/lib.ui-link";
|
|
2638
2638
|
import { ArrowRight, BookOpen, CheckCircle2 } from "lucide-react";
|
|
2639
|
-
import {
|
|
2639
|
+
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2640
2640
|
var guides = [
|
|
2641
2641
|
{
|
|
2642
2642
|
title: "Contract types overview",
|
|
@@ -2682,89 +2682,89 @@ var guides = [
|
|
|
2682
2682
|
}
|
|
2683
2683
|
];
|
|
2684
2684
|
function GuidesIndexPage() {
|
|
2685
|
-
return /* @__PURE__ */
|
|
2685
|
+
return /* @__PURE__ */ jsxs9("div", {
|
|
2686
2686
|
className: "space-y-10",
|
|
2687
2687
|
children: [
|
|
2688
|
-
/* @__PURE__ */
|
|
2688
|
+
/* @__PURE__ */ jsxs9("div", {
|
|
2689
2689
|
className: "space-y-3",
|
|
2690
2690
|
children: [
|
|
2691
|
-
/* @__PURE__ */
|
|
2691
|
+
/* @__PURE__ */ jsx9("h1", {
|
|
2692
2692
|
className: "text-4xl font-bold",
|
|
2693
2693
|
children: "Guides"
|
|
2694
|
-
}
|
|
2695
|
-
/* @__PURE__ */
|
|
2694
|
+
}),
|
|
2695
|
+
/* @__PURE__ */ jsx9("p", {
|
|
2696
2696
|
className: "text-muted-foreground text-lg",
|
|
2697
2697
|
children: "Hands-on guides with commands, expected output, and CI-verified example packages."
|
|
2698
|
-
}
|
|
2698
|
+
})
|
|
2699
2699
|
]
|
|
2700
|
-
}
|
|
2701
|
-
/* @__PURE__ */
|
|
2700
|
+
}),
|
|
2701
|
+
/* @__PURE__ */ jsx9("div", {
|
|
2702
2702
|
className: "grid gap-4 md:grid-cols-2",
|
|
2703
|
-
children: guides.map((guide) => /* @__PURE__ */
|
|
2703
|
+
children: guides.map((guide) => /* @__PURE__ */ jsxs9(Link9, {
|
|
2704
2704
|
href: guide.href,
|
|
2705
2705
|
className: "card-subtle group space-y-3 p-6 transition-colors hover:border-violet-500/50",
|
|
2706
2706
|
children: [
|
|
2707
|
-
/* @__PURE__ */
|
|
2707
|
+
/* @__PURE__ */ jsxs9("div", {
|
|
2708
2708
|
className: "flex items-center justify-between",
|
|
2709
2709
|
children: [
|
|
2710
|
-
/* @__PURE__ */
|
|
2710
|
+
/* @__PURE__ */ jsx9("h2", {
|
|
2711
2711
|
className: "text-xl font-semibold transition-colors group-hover:text-violet-400",
|
|
2712
2712
|
children: guide.title
|
|
2713
|
-
}
|
|
2714
|
-
/* @__PURE__ */
|
|
2713
|
+
}),
|
|
2714
|
+
/* @__PURE__ */ jsx9(ArrowRight, {
|
|
2715
2715
|
className: "text-violet-400",
|
|
2716
2716
|
size: 18
|
|
2717
|
-
}
|
|
2717
|
+
})
|
|
2718
2718
|
]
|
|
2719
|
-
}
|
|
2720
|
-
/* @__PURE__ */
|
|
2719
|
+
}),
|
|
2720
|
+
/* @__PURE__ */ jsx9("p", {
|
|
2721
2721
|
className: "text-muted-foreground text-sm",
|
|
2722
2722
|
children: guide.description
|
|
2723
|
-
}
|
|
2724
|
-
/* @__PURE__ */
|
|
2723
|
+
}),
|
|
2724
|
+
/* @__PURE__ */ jsxs9("div", {
|
|
2725
2725
|
className: "text-muted-foreground flex items-center gap-2 text-xs",
|
|
2726
2726
|
children: [
|
|
2727
|
-
/* @__PURE__ */
|
|
2727
|
+
/* @__PURE__ */ jsx9(CheckCircle2, {
|
|
2728
2728
|
size: 14
|
|
2729
|
-
}
|
|
2730
|
-
/* @__PURE__ */
|
|
2729
|
+
}),
|
|
2730
|
+
/* @__PURE__ */ jsxs9("span", {
|
|
2731
2731
|
children: [
|
|
2732
2732
|
"Target time: ",
|
|
2733
2733
|
guide.time
|
|
2734
2734
|
]
|
|
2735
|
-
}
|
|
2735
|
+
})
|
|
2736
2736
|
]
|
|
2737
|
-
}
|
|
2737
|
+
})
|
|
2738
2738
|
]
|
|
2739
|
-
}, guide.href
|
|
2740
|
-
}
|
|
2741
|
-
/* @__PURE__ */
|
|
2739
|
+
}, guide.href))
|
|
2740
|
+
}),
|
|
2741
|
+
/* @__PURE__ */ jsxs9("div", {
|
|
2742
2742
|
className: "card-subtle space-y-4 p-6",
|
|
2743
2743
|
children: [
|
|
2744
|
-
/* @__PURE__ */
|
|
2744
|
+
/* @__PURE__ */ jsxs9("div", {
|
|
2745
2745
|
className: "flex items-center gap-2 text-sm font-semibold tracking-[0.2em] text-violet-400 uppercase",
|
|
2746
2746
|
children: [
|
|
2747
|
-
/* @__PURE__ */
|
|
2747
|
+
/* @__PURE__ */ jsx9(BookOpen, {
|
|
2748
2748
|
size: 16
|
|
2749
|
-
}
|
|
2749
|
+
}),
|
|
2750
2750
|
"How to use the guides"
|
|
2751
2751
|
]
|
|
2752
|
-
}
|
|
2753
|
-
/* @__PURE__ */
|
|
2752
|
+
}),
|
|
2753
|
+
/* @__PURE__ */ jsxs9("ul", {
|
|
2754
2754
|
className: "text-muted-foreground space-y-2 text-sm",
|
|
2755
2755
|
children: [
|
|
2756
|
-
/* @__PURE__ */
|
|
2756
|
+
/* @__PURE__ */ jsx9("li", {
|
|
2757
2757
|
children: "Run each guide in a fresh branch or sandbox workspace."
|
|
2758
|
-
}
|
|
2759
|
-
/* @__PURE__ */
|
|
2758
|
+
}),
|
|
2759
|
+
/* @__PURE__ */ jsx9("li", {
|
|
2760
2760
|
children: "Use the linked example package to validate end-to-end."
|
|
2761
|
-
}
|
|
2762
|
-
/* @__PURE__ */
|
|
2761
|
+
}),
|
|
2762
|
+
/* @__PURE__ */ jsx9("li", {
|
|
2763
2763
|
children: "Keep the commands as written to match CI expectations."
|
|
2764
|
-
}
|
|
2764
|
+
})
|
|
2765
2765
|
]
|
|
2766
|
-
}
|
|
2767
|
-
/* @__PURE__ */
|
|
2766
|
+
}),
|
|
2767
|
+
/* @__PURE__ */ jsx9(CodeBlock8, {
|
|
2768
2768
|
language: "bash",
|
|
2769
2769
|
filename: "guides-quickstart",
|
|
2770
2770
|
code: `# list all examples
|
|
@@ -2772,11 +2772,11 @@ contractspec examples list
|
|
|
2772
2772
|
|
|
2773
2773
|
# validate example packages in this repo
|
|
2774
2774
|
contractspec examples validate --repo-root .`
|
|
2775
|
-
}
|
|
2775
|
+
})
|
|
2776
2776
|
]
|
|
2777
|
-
}
|
|
2777
|
+
})
|
|
2778
2778
|
]
|
|
2779
|
-
}
|
|
2779
|
+
});
|
|
2780
2780
|
}
|
|
2781
2781
|
|
|
2782
2782
|
// src/components/docs/guides/guides.docblocks.ts
|