@contractspec/bundle.library 3.8.9 → 3.8.11
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 +606 -594
- package/CHANGELOG.md +68 -0
- package/dist/application/context-storage/index.js +1 -28
- package/dist/application/index.js +13 -2133
- package/dist/application/mcp/cliMcp.js +4 -452
- package/dist/application/mcp/common.js +1 -193
- package/dist/application/mcp/contractsMcp.js +2 -549
- package/dist/application/mcp/contractsMcpResources.js +2 -123
- package/dist/application/mcp/contractsMcpTools.js +1 -199
- package/dist/application/mcp/docsMcp.catalog.js +3 -381
- package/dist/application/mcp/docsMcp.data.js +1 -147
- package/dist/application/mcp/docsMcp.js +6 -1039
- package/dist/application/mcp/docsMcp.prompts.js +6 -521
- package/dist/application/mcp/docsMcp.reference.js +3 -235
- package/dist/application/mcp/docsMcp.resources.js +3 -519
- package/dist/application/mcp/docsMcp.tools.js +3 -518
- package/dist/application/mcp/index.js +13 -2106
- package/dist/application/mcp/internalMcp.js +2 -410
- package/dist/application/mcp/normalizeMcpRequest.js +1 -21
- package/dist/application/mcp/providerRankingMcp.js +1 -530
- package/dist/bundles/LibraryBundle.js +1 -138
- package/dist/bundles/index.js +1 -138
- package/dist/components/docs/DocsIndexPage.js +2 -912
- package/dist/components/docs/advanced/AdvancedMCPPage.js +4 -271
- package/dist/components/docs/advanced/AdvancedOverlayEditorPage.js +1 -107
- package/dist/components/docs/advanced/AdvancedRenderersPage.js +2 -118
- package/dist/components/docs/advanced/AdvancedSpecExperimentsPage.js +4 -92
- package/dist/components/docs/advanced/AdvancedTelemetryPage.js +2 -373
- package/dist/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +2 -99
- package/dist/components/docs/advanced/index.js +10 -1055
- package/dist/components/docs/architecture/ArchitectureAppConfigPage.js +6 -243
- package/dist/components/docs/architecture/ArchitectureControlPlanePage.js +3 -160
- package/dist/components/docs/architecture/ArchitectureIntegrationBindingPage.js +7 -259
- package/dist/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +6 -374
- package/dist/components/docs/architecture/ArchitectureMultiTenancyPage.js +2 -166
- package/dist/components/docs/architecture/ArchitectureOverviewPage.js +1 -143
- package/dist/components/docs/architecture/index.js +20 -1340
- package/dist/components/docs/comparison/ComparisonAutomationPlatformsPage.js +1 -245
- package/dist/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +1 -230
- package/dist/components/docs/comparison/ComparisonInternalToolBuildersPage.js +1 -245
- package/dist/components/docs/comparison/ComparisonOverviewPage.js +1 -202
- package/dist/components/docs/comparison/ComparisonWindmillPage.js +1 -254
- package/dist/components/docs/comparison/ComparisonWorkflowEnginesPage.js +1 -339
- package/dist/components/docs/comparison/index.js +1 -1510
- package/dist/components/docs/docsManifest.js +1 -611
- package/dist/components/docs/docsManifest.test.d.ts +1 -0
- package/dist/components/docs/ecosystem/IntegrationsPage.js +2 -103
- package/dist/components/docs/ecosystem/PluginsPage.js +13 -179
- package/dist/components/docs/ecosystem/RegistryPage.js +7 -100
- package/dist/components/docs/ecosystem/TemplatesPage.js +3 -141
- package/dist/components/docs/ecosystem/ecosystem.docblocks.js +2 -48
- package/dist/components/docs/ecosystem/index.js +23 -569
- package/dist/components/docs/examples/DocsExamplesPage.js +4 -124
- package/dist/components/docs/examples/ExampleShowcasePage.js +4 -244
- package/dist/components/docs/examples/exampleShowcaseData.js +4 -39
- package/dist/components/docs/examples/index.js +4 -330
- package/dist/components/docs/generated/docs-index.generated.js +1 -5
- package/dist/components/docs/generated/index.js +1 -74
- package/dist/components/docs/generated/loader.js +1 -74
- package/dist/components/docs/getting-started/CLIPage.js +4 -271
- package/dist/components/docs/getting-started/CompatibilityPage.js +1 -173
- package/dist/components/docs/getting-started/DataViewTutorialPage.js +4 -134
- package/dist/components/docs/getting-started/DeveloperToolsPage.js +1 -194
- package/dist/components/docs/getting-started/HelloWorldPage.js +5 -183
- package/dist/components/docs/getting-started/InstallationPage.js +3 -154
- package/dist/components/docs/getting-started/StartHerePage.js +2 -129
- package/dist/components/docs/getting-started/TroubleshootingPage.js +2 -168
- package/dist/components/docs/getting-started/VSCodeExtensionPage.js +1 -432
- package/dist/components/docs/getting-started/getting-started.docblocks.js +4 -41
- package/dist/components/docs/getting-started/index.js +18 -1869
- package/dist/components/docs/guides/GuideCIDiffGatingPage.js +2 -196
- package/dist/components/docs/guides/GuideConnectInRepoPage.d.ts +1 -0
- package/dist/components/docs/guides/GuideConnectInRepoPage.js +44 -0
- package/dist/components/docs/guides/GuideContractTypesPage.js +6 -541
- package/dist/components/docs/guides/GuideDocsPipelinePage.js +3 -207
- package/dist/components/docs/guides/GuideFirstModuleBundlePage.d.ts +1 -0
- package/dist/components/docs/guides/GuideFirstModuleBundlePage.js +76 -0
- package/dist/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +2 -209
- package/dist/components/docs/guides/GuideHostBuilderWorkbenchPage.d.ts +1 -0
- package/dist/components/docs/guides/GuideHostBuilderWorkbenchPage.js +70 -0
- package/dist/components/docs/guides/GuideImportExistingCodebasesPage.js +8 -754
- package/dist/components/docs/guides/GuideNextjsOneEndpointPage.js +6 -268
- package/dist/components/docs/guides/GuideSpecValidationTypingPage.js +4 -196
- package/dist/components/docs/guides/GuidesIndexPage.js +2 -169
- package/dist/components/docs/guides/guides.docblocks.js +11 -75
- package/dist/components/docs/guides/index.d.ts +3 -0
- package/dist/components/docs/guides/index.js +213 -2428
- package/dist/components/docs/index.js +542 -24297
- package/dist/components/docs/integrations/IntegrationsCircuitBreakersPage.js +2 -42
- package/dist/components/docs/integrations/IntegrationsElevenLabsPage.js +3 -105
- package/dist/components/docs/integrations/IntegrationsGithubPage.js +3 -142
- package/dist/components/docs/integrations/IntegrationsGmailPage.js +3 -109
- package/dist/components/docs/integrations/IntegrationsGoogleCalendarPage.js +3 -79
- package/dist/components/docs/integrations/IntegrationsHealthRoutingPage.js +3 -146
- package/dist/components/docs/integrations/IntegrationsMistralPage.js +5 -150
- package/dist/components/docs/integrations/IntegrationsOpenAIPage.js +5 -140
- package/dist/components/docs/integrations/IntegrationsOverviewPage.js +1 -160
- package/dist/components/docs/integrations/IntegrationsPostmarkPage.js +4 -218
- package/dist/components/docs/integrations/IntegrationsPowensPage.js +4 -300
- package/dist/components/docs/integrations/IntegrationsQdrantPage.js +5 -111
- package/dist/components/docs/integrations/IntegrationsResendPage.js +3 -102
- package/dist/components/docs/integrations/IntegrationsS3Page.js +4 -124
- package/dist/components/docs/integrations/IntegrationsSlackPage.js +3 -144
- package/dist/components/docs/integrations/IntegrationsSpecModelPage.js +7 -290
- package/dist/components/docs/integrations/IntegrationsStripePage.js +6 -327
- package/dist/components/docs/integrations/IntegrationsTwilioPage.js +3 -128
- package/dist/components/docs/integrations/IntegrationsWhatsappMetaPage.js +2 -146
- package/dist/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +2 -156
- package/dist/components/docs/integrations/index.js +52 -3100
- package/dist/components/docs/intent/ContractFirstApiPage.js +2 -126
- package/dist/components/docs/intent/DeterministicCodegenPage.js +2 -148
- package/dist/components/docs/intent/GenerateClientFromSchemaPage.js +7 -207
- package/dist/components/docs/intent/OpenapiAlternativePage.js +3 -201
- package/dist/components/docs/intent/SchemaValidationTypescriptPage.js +4 -144
- package/dist/components/docs/intent/SpecDrivenDevelopmentPage.js +2 -126
- package/dist/components/docs/intent/index.js +15 -1135
- package/dist/components/docs/intent/intent-pages.docblocks.js +1 -201
- package/dist/components/docs/knowledge/KnowledgeCategoriesPage.js +6 -750
- package/dist/components/docs/knowledge/KnowledgeExamplesPage.js +4 -175
- package/dist/components/docs/knowledge/KnowledgeOverviewPage.js +1 -116
- package/dist/components/docs/knowledge/KnowledgeSourcesPage.js +8 -391
- package/dist/components/docs/knowledge/KnowledgeSpacesPage.js +6 -302
- package/dist/components/docs/knowledge/index.js +21 -1730
- package/dist/components/docs/libraries/LibrariesAccessibilityPage.js +3 -198
- package/dist/components/docs/libraries/LibrariesAiAgentPage.js +3 -141
- package/dist/components/docs/libraries/LibrariesAnalyticsPage.js +4 -80
- package/dist/components/docs/libraries/LibrariesContentGenPage.js +2 -100
- package/dist/components/docs/libraries/LibrariesContractsPage.js +2 -284
- package/dist/components/docs/libraries/LibrariesCostTrackingPage.js +3 -112
- package/dist/components/docs/libraries/LibrariesDataBackendPage.js +2 -166
- package/dist/components/docs/libraries/LibrariesDataViewsPage.js +3 -186
- package/dist/components/docs/libraries/LibrariesDesignSystemPage.js +4 -279
- package/dist/components/docs/libraries/LibrariesEvolutionPage.js +4 -127
- package/dist/components/docs/libraries/LibrariesGraphQLPage.js +2 -173
- package/dist/components/docs/libraries/LibrariesGrowthPage.js +3 -88
- package/dist/components/docs/libraries/LibrariesMultiTenancyPage.js +3 -108
- package/dist/components/docs/libraries/LibrariesObservabilityPage.js +5 -130
- package/dist/components/docs/libraries/LibrariesOverlayEnginePage.js +4 -110
- package/dist/components/docs/libraries/LibrariesOverviewPage.js +1 -170
- package/dist/components/docs/libraries/LibrariesPersonalizationPage.js +4 -114
- package/dist/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +3 -132
- package/dist/components/docs/libraries/LibrariesResiliencePage.js +4 -120
- package/dist/components/docs/libraries/LibrariesRuntimePage.js +2 -200
- package/dist/components/docs/libraries/LibrariesSLOPage.js +3 -116
- package/dist/components/docs/libraries/LibrariesSchemaPage.js +3 -273
- package/dist/components/docs/libraries/LibrariesSupportBotPage.js +3 -134
- package/dist/components/docs/libraries/LibrariesTestingPage.js +3 -133
- package/dist/components/docs/libraries/LibrariesUIKitPage.js +2 -230
- package/dist/components/docs/libraries/LibrariesWorkflowComposerPage.js +3 -88
- package/dist/components/docs/libraries/LibrariesWorkflowsPage.js +2 -181
- package/dist/components/docs/libraries/index.js +54 -4147
- package/dist/components/docs/manifesto/ManifestoPage.js +1 -86
- package/dist/components/docs/ops/AutoEvolutionOpsPage.js +2 -132
- package/dist/components/docs/ops/DistributedTracingOpsPage.js +2 -71
- package/dist/components/docs/ops/index.js +3 -202
- package/dist/components/docs/ops/ops-lifecycle.docblocks.js +3 -38
- package/dist/components/docs/ops/ops-runbooks-a.docblocks.js +3 -94
- package/dist/components/docs/ops/ops-runbooks-b.docblocks.js +3 -76
- package/dist/components/docs/ops/ops-slo-tenant.docblocks.js +3 -76
- package/dist/components/docs/ops/ops-top.docs.js +2 -17
- package/dist/components/docs/ops/ops.docs.js +10 -302
- package/dist/components/docs/product/product.docblocks.js +5 -72
- package/dist/components/docs/reference/DocsMarkdownContent.js +2 -196
- package/dist/components/docs/reference/DocsReferenceContent.js +3 -256
- package/dist/components/docs/reference/DocsReferenceIndexClient.js +2 -127
- package/dist/components/docs/reference/DocsReferenceIndexPage.js +2 -206
- package/dist/components/docs/reference/DocsReferencePage.js +3 -265
- package/dist/components/docs/reference/docsMarkdownParser.js +2 -92
- package/dist/components/docs/reference/index.js +4 -470
- package/dist/components/docs/safety/SafetyAuditingPage.js +2 -350
- package/dist/components/docs/safety/SafetyMigrationsPage.js +2 -359
- package/dist/components/docs/safety/SafetyOverviewPage.js +1 -101
- package/dist/components/docs/safety/SafetyPDPPage.js +2 -301
- package/dist/components/docs/safety/SafetySecurityTrustPage.js +1 -206
- package/dist/components/docs/safety/SafetySigningPage.js +3 -90
- package/dist/components/docs/safety/SafetyTenantIsolationPage.js +2 -79
- package/dist/components/docs/safety/index.js +7 -1480
- package/dist/components/docs/shared/StudioPrompt.js +1 -31
- package/dist/components/docs/specs/SpecsBuilderControlPlanePage.d.ts +1 -0
- package/dist/components/docs/specs/SpecsBuilderControlPlanePage.js +34 -0
- package/dist/components/docs/specs/SpecsCapabilitiesPage.js +2 -158
- package/dist/components/docs/specs/SpecsConnectPage.d.ts +1 -0
- package/dist/components/docs/specs/SpecsConnectPage.js +8 -0
- package/dist/components/docs/specs/SpecsDataViewsPage.js +2 -260
- package/dist/components/docs/specs/SpecsModuleBundlesPage.d.ts +1 -0
- package/dist/components/docs/specs/SpecsModuleBundlesPage.js +67 -0
- package/dist/components/docs/specs/SpecsOverlaysPage.js +2 -372
- package/dist/components/docs/specs/SpecsOverviewPage.js +1 -186
- package/dist/components/docs/specs/SpecsPolicyPage.js +3 -420
- package/dist/components/docs/specs/SpecsWorkflowsPage.js +2 -312
- package/dist/components/docs/specs/index.d.ts +3 -0
- package/dist/components/docs/specs/index.js +109 -1702
- package/dist/components/docs/studio/StudioBYOKPage.js +1 -26
- package/dist/components/docs/studio/StudioDeploymentsPage.js +1 -26
- package/dist/components/docs/studio/StudioGettingStartedPage.js +1 -26
- package/dist/components/docs/studio/StudioIntegrationsPage.js +1 -26
- package/dist/components/docs/studio/StudioOverviewPage.js +1 -157
- package/dist/components/docs/studio/StudioVisualBuilderPage.js +1 -26
- package/dist/components/docs/studio/index.js +1 -282
- package/dist/components/docs/tech/contracts/tech-docs.docblocks.js +2 -19
- package/dist/components/integrations/index.js +2 -600
- package/dist/components/integrations/molecules/IntegrationCard.js +1 -100
- package/dist/components/integrations/organisms/IntegrationMarketplace.js +1 -214
- package/dist/components/integrations/organisms/IntegrationSettings.js +2 -284
- package/dist/components/integrations/organisms/KnowledgeSourceList.js +1 -103
- package/dist/components/legal/PrivacyTemplate.js +1 -1025
- package/dist/components/legal/TermsTemplate.js +1 -941
- package/dist/components/legal/index.js +1 -1963
- package/dist/components/shared/FeatureGateNotice.js +1 -38
- package/dist/components/shared/index.js +1 -38
- package/dist/components/shell/WorkspaceHeader.js +1 -100
- package/dist/components/shell/WorkspaceProjectShellLayout.js +1 -222
- package/dist/components/shell/WorkspaceShellRenderer.js +1 -228
- package/dist/components/shell/WorkspaceSidebar.js +1 -68
- package/dist/components/shell/index.js +1 -287
- package/dist/components/templates/engine/index.js +1 -39
- package/dist/components/templates/index.js +11 -965
- package/dist/components/templates/messaging/ConversationList.js +2 -83
- package/dist/components/templates/messaging/MessageComposer.js +4 -150
- package/dist/components/templates/messaging/MessageThread.js +3 -83
- package/dist/components/templates/messaging/MessagingWorkspace.js +5 -265
- package/dist/components/templates/messaging/index.js +5 -269
- package/dist/components/templates/recipes/LanguageSwitcher.js +1 -16
- package/dist/components/templates/recipes/RecipeCard.js +1 -80
- package/dist/components/templates/recipes/RecipeDetail.js +1 -74
- package/dist/components/templates/recipes/RecipeList.js +3 -245
- package/dist/components/templates/recipes/index.js +3 -248
- package/dist/components/templates/todos/FilterBar.js +1 -107
- package/dist/components/templates/todos/TaskForm.js +2 -158
- package/dist/components/templates/todos/TaskItem.js +1 -77
- package/dist/components/templates/todos/TaskList.js +5 -449
- package/dist/components/templates/todos/index.js +5 -452
- package/dist/config/contractspec-blueprint.js +1 -123
- package/dist/config/contractspec-branding.js +1 -44
- package/dist/config/contractspec-routes.js +1 -24
- package/dist/config/index.js +1 -126
- package/dist/features/contracts-registry.js +1 -178
- package/dist/features/docs/docs.contracts.js +1 -17
- package/dist/features/docs/index.js +1 -17
- package/dist/features/docs.feature.js +1 -33
- package/dist/features/index.js +1 -315
- package/dist/features/mcp.feature.js +1 -30
- package/dist/features/presentations.feature.js +1 -33
- package/dist/features/registry.js +1 -116
- package/dist/index.js +556 -28580
- package/dist/infrastructure/elysia/index.js +1 -35
- package/dist/infrastructure/elysia/logger.js +1 -35
- package/dist/infrastructure/index.js +1 -35
- package/dist/libs/email/client.js +1 -114
- package/dist/libs/email/contact.js +12 -165
- package/dist/libs/email/newsletter.js +6 -167
- package/dist/libs/email/types.js +0 -2
- package/dist/libs/email/utils.js +2 -8
- package/dist/libs/email/waitlist-application.js +28 -209
- package/dist/libs/email/waitlist.js +6 -167
- package/dist/libs/email.js +46 -363
- package/dist/libs/posthog/client.js +1 -63
- package/dist/libs/posthog/native.js +1 -23
- package/dist/libs/posthog/server.js +1 -13
- package/dist/libs/pricing-examples.js +1 -18
- package/dist/node/application/context-storage/index.js +1 -28
- package/dist/node/application/index.js +13 -2133
- package/dist/node/application/mcp/cliMcp.js +4 -452
- package/dist/node/application/mcp/common.js +1 -193
- package/dist/node/application/mcp/contractsMcp.js +2 -549
- package/dist/node/application/mcp/contractsMcpResources.js +2 -123
- package/dist/node/application/mcp/contractsMcpTools.js +1 -199
- package/dist/node/application/mcp/docsMcp.catalog.js +3 -381
- package/dist/node/application/mcp/docsMcp.data.js +1 -147
- package/dist/node/application/mcp/docsMcp.js +6 -1039
- package/dist/node/application/mcp/docsMcp.prompts.js +6 -521
- package/dist/node/application/mcp/docsMcp.reference.js +3 -235
- package/dist/node/application/mcp/docsMcp.resources.js +3 -519
- package/dist/node/application/mcp/docsMcp.tools.js +3 -518
- package/dist/node/application/mcp/index.js +13 -2106
- package/dist/node/application/mcp/internalMcp.js +2 -410
- package/dist/node/application/mcp/normalizeMcpRequest.js +1 -21
- package/dist/node/application/mcp/providerRankingMcp.js +1 -530
- package/dist/node/bundles/LibraryBundle.js +1 -138
- package/dist/node/bundles/index.js +1 -138
- package/dist/node/components/docs/DocsIndexPage.js +2 -912
- package/dist/node/components/docs/advanced/AdvancedMCPPage.js +4 -271
- package/dist/node/components/docs/advanced/AdvancedOverlayEditorPage.js +1 -107
- package/dist/node/components/docs/advanced/AdvancedRenderersPage.js +2 -118
- package/dist/node/components/docs/advanced/AdvancedSpecExperimentsPage.js +4 -92
- package/dist/node/components/docs/advanced/AdvancedTelemetryPage.js +2 -373
- package/dist/node/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +2 -99
- package/dist/node/components/docs/advanced/index.js +10 -1055
- package/dist/node/components/docs/architecture/ArchitectureAppConfigPage.js +6 -243
- package/dist/node/components/docs/architecture/ArchitectureControlPlanePage.js +3 -160
- package/dist/node/components/docs/architecture/ArchitectureIntegrationBindingPage.js +7 -259
- package/dist/node/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +6 -374
- package/dist/node/components/docs/architecture/ArchitectureMultiTenancyPage.js +2 -166
- package/dist/node/components/docs/architecture/ArchitectureOverviewPage.js +1 -143
- package/dist/node/components/docs/architecture/index.js +20 -1340
- package/dist/node/components/docs/comparison/ComparisonAutomationPlatformsPage.js +1 -245
- package/dist/node/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +1 -230
- package/dist/node/components/docs/comparison/ComparisonInternalToolBuildersPage.js +1 -245
- package/dist/node/components/docs/comparison/ComparisonOverviewPage.js +1 -202
- package/dist/node/components/docs/comparison/ComparisonWindmillPage.js +1 -254
- package/dist/node/components/docs/comparison/ComparisonWorkflowEnginesPage.js +1 -339
- package/dist/node/components/docs/comparison/index.js +1 -1510
- package/dist/node/components/docs/docsManifest.js +1 -611
- package/dist/node/components/docs/ecosystem/IntegrationsPage.js +2 -103
- package/dist/node/components/docs/ecosystem/PluginsPage.js +13 -179
- package/dist/node/components/docs/ecosystem/RegistryPage.js +7 -100
- package/dist/node/components/docs/ecosystem/TemplatesPage.js +3 -141
- package/dist/node/components/docs/ecosystem/ecosystem.docblocks.js +2 -48
- package/dist/node/components/docs/ecosystem/index.js +23 -569
- package/dist/node/components/docs/examples/DocsExamplesPage.js +4 -124
- package/dist/node/components/docs/examples/ExampleShowcasePage.js +4 -244
- package/dist/node/components/docs/examples/exampleShowcaseData.js +4 -39
- package/dist/node/components/docs/examples/index.js +4 -330
- package/dist/node/components/docs/generated/docs-index.generated.js +1 -5
- package/dist/node/components/docs/generated/index.js +1 -74
- package/dist/node/components/docs/generated/loader.js +1 -74
- package/dist/node/components/docs/getting-started/CLIPage.js +4 -271
- package/dist/node/components/docs/getting-started/CompatibilityPage.js +1 -173
- package/dist/node/components/docs/getting-started/DataViewTutorialPage.js +4 -134
- package/dist/node/components/docs/getting-started/DeveloperToolsPage.js +1 -194
- package/dist/node/components/docs/getting-started/HelloWorldPage.js +5 -183
- package/dist/node/components/docs/getting-started/InstallationPage.js +3 -154
- package/dist/node/components/docs/getting-started/StartHerePage.js +2 -129
- package/dist/node/components/docs/getting-started/TroubleshootingPage.js +2 -168
- package/dist/node/components/docs/getting-started/VSCodeExtensionPage.js +1 -432
- package/dist/node/components/docs/getting-started/getting-started.docblocks.js +4 -41
- package/dist/node/components/docs/getting-started/index.js +18 -1869
- package/dist/node/components/docs/guides/GuideCIDiffGatingPage.js +2 -196
- package/dist/node/components/docs/guides/GuideConnectInRepoPage.js +43 -0
- package/dist/node/components/docs/guides/GuideContractTypesPage.js +6 -541
- package/dist/node/components/docs/guides/GuideDocsPipelinePage.js +3 -207
- package/dist/node/components/docs/guides/GuideFirstModuleBundlePage.js +75 -0
- package/dist/node/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +2 -209
- package/dist/node/components/docs/guides/GuideHostBuilderWorkbenchPage.js +69 -0
- package/dist/node/components/docs/guides/GuideImportExistingCodebasesPage.js +8 -754
- package/dist/node/components/docs/guides/GuideNextjsOneEndpointPage.js +6 -268
- package/dist/node/components/docs/guides/GuideSpecValidationTypingPage.js +4 -196
- package/dist/node/components/docs/guides/GuidesIndexPage.js +2 -169
- package/dist/node/components/docs/guides/guides.docblocks.js +11 -75
- package/dist/node/components/docs/guides/index.js +213 -2428
- package/dist/node/components/docs/index.js +542 -24297
- package/dist/node/components/docs/integrations/IntegrationsCircuitBreakersPage.js +2 -42
- package/dist/node/components/docs/integrations/IntegrationsElevenLabsPage.js +3 -105
- package/dist/node/components/docs/integrations/IntegrationsGithubPage.js +3 -142
- package/dist/node/components/docs/integrations/IntegrationsGmailPage.js +3 -109
- package/dist/node/components/docs/integrations/IntegrationsGoogleCalendarPage.js +3 -79
- package/dist/node/components/docs/integrations/IntegrationsHealthRoutingPage.js +3 -146
- package/dist/node/components/docs/integrations/IntegrationsMistralPage.js +5 -150
- package/dist/node/components/docs/integrations/IntegrationsOpenAIPage.js +5 -140
- package/dist/node/components/docs/integrations/IntegrationsOverviewPage.js +1 -160
- package/dist/node/components/docs/integrations/IntegrationsPostmarkPage.js +4 -218
- package/dist/node/components/docs/integrations/IntegrationsPowensPage.js +4 -300
- package/dist/node/components/docs/integrations/IntegrationsQdrantPage.js +5 -111
- package/dist/node/components/docs/integrations/IntegrationsResendPage.js +3 -102
- package/dist/node/components/docs/integrations/IntegrationsS3Page.js +4 -124
- package/dist/node/components/docs/integrations/IntegrationsSlackPage.js +3 -144
- package/dist/node/components/docs/integrations/IntegrationsSpecModelPage.js +7 -290
- package/dist/node/components/docs/integrations/IntegrationsStripePage.js +6 -327
- package/dist/node/components/docs/integrations/IntegrationsTwilioPage.js +3 -128
- package/dist/node/components/docs/integrations/IntegrationsWhatsappMetaPage.js +2 -146
- package/dist/node/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +2 -156
- package/dist/node/components/docs/integrations/index.js +52 -3100
- package/dist/node/components/docs/intent/ContractFirstApiPage.js +2 -126
- package/dist/node/components/docs/intent/DeterministicCodegenPage.js +2 -148
- package/dist/node/components/docs/intent/GenerateClientFromSchemaPage.js +7 -207
- package/dist/node/components/docs/intent/OpenapiAlternativePage.js +3 -201
- package/dist/node/components/docs/intent/SchemaValidationTypescriptPage.js +4 -144
- package/dist/node/components/docs/intent/SpecDrivenDevelopmentPage.js +2 -126
- package/dist/node/components/docs/intent/index.js +15 -1135
- package/dist/node/components/docs/intent/intent-pages.docblocks.js +1 -201
- package/dist/node/components/docs/knowledge/KnowledgeCategoriesPage.js +6 -750
- package/dist/node/components/docs/knowledge/KnowledgeExamplesPage.js +4 -175
- package/dist/node/components/docs/knowledge/KnowledgeOverviewPage.js +1 -116
- package/dist/node/components/docs/knowledge/KnowledgeSourcesPage.js +8 -391
- package/dist/node/components/docs/knowledge/KnowledgeSpacesPage.js +6 -302
- package/dist/node/components/docs/knowledge/index.js +21 -1730
- package/dist/node/components/docs/libraries/LibrariesAccessibilityPage.js +3 -198
- package/dist/node/components/docs/libraries/LibrariesAiAgentPage.js +3 -141
- package/dist/node/components/docs/libraries/LibrariesAnalyticsPage.js +4 -80
- package/dist/node/components/docs/libraries/LibrariesContentGenPage.js +2 -100
- package/dist/node/components/docs/libraries/LibrariesContractsPage.js +2 -284
- package/dist/node/components/docs/libraries/LibrariesCostTrackingPage.js +3 -112
- package/dist/node/components/docs/libraries/LibrariesDataBackendPage.js +2 -166
- package/dist/node/components/docs/libraries/LibrariesDataViewsPage.js +3 -186
- package/dist/node/components/docs/libraries/LibrariesDesignSystemPage.js +4 -279
- package/dist/node/components/docs/libraries/LibrariesEvolutionPage.js +4 -127
- package/dist/node/components/docs/libraries/LibrariesGraphQLPage.js +2 -173
- package/dist/node/components/docs/libraries/LibrariesGrowthPage.js +3 -88
- package/dist/node/components/docs/libraries/LibrariesMultiTenancyPage.js +3 -108
- package/dist/node/components/docs/libraries/LibrariesObservabilityPage.js +5 -130
- package/dist/node/components/docs/libraries/LibrariesOverlayEnginePage.js +4 -110
- package/dist/node/components/docs/libraries/LibrariesOverviewPage.js +1 -170
- package/dist/node/components/docs/libraries/LibrariesPersonalizationPage.js +4 -114
- package/dist/node/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +3 -132
- package/dist/node/components/docs/libraries/LibrariesResiliencePage.js +4 -120
- package/dist/node/components/docs/libraries/LibrariesRuntimePage.js +2 -200
- package/dist/node/components/docs/libraries/LibrariesSLOPage.js +3 -116
- package/dist/node/components/docs/libraries/LibrariesSchemaPage.js +3 -273
- package/dist/node/components/docs/libraries/LibrariesSupportBotPage.js +3 -134
- package/dist/node/components/docs/libraries/LibrariesTestingPage.js +3 -133
- package/dist/node/components/docs/libraries/LibrariesUIKitPage.js +2 -230
- package/dist/node/components/docs/libraries/LibrariesWorkflowComposerPage.js +3 -88
- package/dist/node/components/docs/libraries/LibrariesWorkflowsPage.js +2 -181
- package/dist/node/components/docs/libraries/index.js +54 -4147
- package/dist/node/components/docs/manifesto/ManifestoPage.js +1 -86
- package/dist/node/components/docs/ops/AutoEvolutionOpsPage.js +2 -132
- package/dist/node/components/docs/ops/DistributedTracingOpsPage.js +2 -71
- package/dist/node/components/docs/ops/index.js +3 -202
- package/dist/node/components/docs/ops/ops-lifecycle.docblocks.js +3 -38
- package/dist/node/components/docs/ops/ops-runbooks-a.docblocks.js +3 -94
- package/dist/node/components/docs/ops/ops-runbooks-b.docblocks.js +3 -76
- package/dist/node/components/docs/ops/ops-slo-tenant.docblocks.js +3 -76
- package/dist/node/components/docs/ops/ops-top.docs.js +2 -17
- package/dist/node/components/docs/ops/ops.docs.js +10 -302
- package/dist/node/components/docs/product/product.docblocks.js +5 -72
- package/dist/node/components/docs/reference/DocsMarkdownContent.js +2 -196
- package/dist/node/components/docs/reference/DocsReferenceContent.js +3 -256
- package/dist/node/components/docs/reference/DocsReferenceIndexClient.js +2 -127
- package/dist/node/components/docs/reference/DocsReferenceIndexPage.js +2 -206
- package/dist/node/components/docs/reference/DocsReferencePage.js +3 -265
- package/dist/node/components/docs/reference/docsMarkdownParser.js +2 -92
- package/dist/node/components/docs/reference/index.js +4 -470
- package/dist/node/components/docs/safety/SafetyAuditingPage.js +2 -350
- package/dist/node/components/docs/safety/SafetyMigrationsPage.js +2 -359
- package/dist/node/components/docs/safety/SafetyOverviewPage.js +1 -101
- package/dist/node/components/docs/safety/SafetyPDPPage.js +2 -301
- package/dist/node/components/docs/safety/SafetySecurityTrustPage.js +1 -206
- package/dist/node/components/docs/safety/SafetySigningPage.js +3 -90
- package/dist/node/components/docs/safety/SafetyTenantIsolationPage.js +2 -79
- package/dist/node/components/docs/safety/index.js +7 -1480
- package/dist/node/components/docs/shared/StudioPrompt.js +1 -31
- package/dist/node/components/docs/specs/SpecsBuilderControlPlanePage.js +33 -0
- package/dist/node/components/docs/specs/SpecsCapabilitiesPage.js +2 -158
- package/dist/node/components/docs/specs/SpecsConnectPage.js +7 -0
- package/dist/node/components/docs/specs/SpecsDataViewsPage.js +2 -260
- package/dist/node/components/docs/specs/SpecsModuleBundlesPage.js +66 -0
- package/dist/node/components/docs/specs/SpecsOverlaysPage.js +2 -372
- package/dist/node/components/docs/specs/SpecsOverviewPage.js +1 -186
- package/dist/node/components/docs/specs/SpecsPolicyPage.js +3 -420
- package/dist/node/components/docs/specs/SpecsWorkflowsPage.js +2 -312
- package/dist/node/components/docs/specs/index.js +109 -1702
- package/dist/node/components/docs/studio/StudioBYOKPage.js +1 -26
- package/dist/node/components/docs/studio/StudioDeploymentsPage.js +1 -26
- package/dist/node/components/docs/studio/StudioGettingStartedPage.js +1 -26
- package/dist/node/components/docs/studio/StudioIntegrationsPage.js +1 -26
- package/dist/node/components/docs/studio/StudioOverviewPage.js +1 -157
- package/dist/node/components/docs/studio/StudioVisualBuilderPage.js +1 -26
- package/dist/node/components/docs/studio/index.js +1 -282
- package/dist/node/components/docs/tech/contracts/tech-docs.docblocks.js +2 -19
- package/dist/node/components/integrations/index.js +2 -600
- package/dist/node/components/integrations/molecules/IntegrationCard.js +1 -100
- package/dist/node/components/integrations/organisms/IntegrationMarketplace.js +1 -214
- package/dist/node/components/integrations/organisms/IntegrationSettings.js +2 -284
- package/dist/node/components/integrations/organisms/KnowledgeSourceList.js +1 -103
- package/dist/node/components/legal/PrivacyTemplate.js +1 -1025
- package/dist/node/components/legal/TermsTemplate.js +1 -941
- package/dist/node/components/legal/index.js +1 -1963
- package/dist/node/components/shared/FeatureGateNotice.js +1 -38
- package/dist/node/components/shared/index.js +1 -38
- package/dist/node/components/shell/WorkspaceHeader.js +1 -100
- package/dist/node/components/shell/WorkspaceProjectShellLayout.js +1 -222
- package/dist/node/components/shell/WorkspaceShellRenderer.js +1 -228
- package/dist/node/components/shell/WorkspaceSidebar.js +1 -68
- package/dist/node/components/shell/index.js +1 -287
- package/dist/node/components/templates/engine/index.js +1 -39
- package/dist/node/components/templates/index.js +11 -965
- package/dist/node/components/templates/messaging/ConversationList.js +2 -83
- package/dist/node/components/templates/messaging/MessageComposer.js +4 -150
- package/dist/node/components/templates/messaging/MessageThread.js +3 -83
- package/dist/node/components/templates/messaging/MessagingWorkspace.js +5 -265
- package/dist/node/components/templates/messaging/index.js +5 -269
- package/dist/node/components/templates/recipes/LanguageSwitcher.js +1 -16
- package/dist/node/components/templates/recipes/RecipeCard.js +1 -80
- package/dist/node/components/templates/recipes/RecipeDetail.js +1 -74
- package/dist/node/components/templates/recipes/RecipeList.js +3 -245
- package/dist/node/components/templates/recipes/index.js +3 -248
- package/dist/node/components/templates/todos/FilterBar.js +1 -107
- package/dist/node/components/templates/todos/TaskForm.js +2 -158
- package/dist/node/components/templates/todos/TaskItem.js +1 -77
- package/dist/node/components/templates/todos/TaskList.js +5 -449
- package/dist/node/components/templates/todos/index.js +5 -452
- package/dist/node/config/contractspec-blueprint.js +1 -123
- package/dist/node/config/contractspec-branding.js +1 -44
- package/dist/node/config/contractspec-routes.js +1 -24
- package/dist/node/config/index.js +1 -126
- package/dist/node/features/contracts-registry.js +1 -178
- package/dist/node/features/docs/docs.contracts.js +1 -17
- package/dist/node/features/docs/index.js +1 -17
- package/dist/node/features/docs.feature.js +1 -33
- package/dist/node/features/index.js +1 -315
- package/dist/node/features/mcp.feature.js +1 -30
- package/dist/node/features/presentations.feature.js +1 -33
- package/dist/node/features/registry.js +1 -116
- package/dist/node/index.js +556 -28580
- package/dist/node/infrastructure/elysia/index.js +1 -35
- package/dist/node/infrastructure/elysia/logger.js +1 -35
- package/dist/node/infrastructure/index.js +1 -35
- package/dist/node/libs/email/client.js +1 -114
- package/dist/node/libs/email/contact.js +12 -165
- package/dist/node/libs/email/newsletter.js +6 -167
- package/dist/node/libs/email/types.js +0 -2
- package/dist/node/libs/email/utils.js +2 -8
- package/dist/node/libs/email/waitlist-application.js +28 -209
- package/dist/node/libs/email/waitlist.js +6 -167
- package/dist/node/libs/email.js +46 -363
- package/dist/node/libs/posthog/client.js +1 -63
- package/dist/node/libs/posthog/native.js +1 -23
- package/dist/node/libs/posthog/server.js +1 -13
- package/dist/node/libs/pricing-examples.js +1 -18
- package/dist/node/presentation/features/atoms/FeatureIcon/FeatureIcon.js +1 -97
- package/dist/node/presentation/features/atoms/FeatureIcon/index.js +1 -97
- package/dist/node/presentation/features/atoms/index.js +1 -97
- package/dist/node/presentation/features/hooks/index.js +1 -397
- package/dist/node/presentation/features/hooks/useContractsRegistry.js +1 -289
- package/dist/node/presentation/features/hooks/useFeatureFilters.js +1 -75
- package/dist/node/presentation/features/hooks/useFeatureRegistry.js +1 -147
- package/dist/node/presentation/features/hooks/useRelatedDocs.js +1 -28
- package/dist/node/presentation/features/index.js +1 -3063
- package/dist/node/presentation/features/molecules/FeatureCard/FeatureCard.js +1 -366
- package/dist/node/presentation/features/molecules/FeatureCard/index.js +1 -366
- package/dist/node/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +1 -50
- package/dist/node/presentation/features/molecules/FeatureCategoryHeader/index.js +1 -50
- package/dist/node/presentation/features/molecules/FeatureFilters/FeatureFilters.js +1 -92
- package/dist/node/presentation/features/molecules/FeatureFilters/index.js +1 -92
- package/dist/node/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +1 -176
- package/dist/node/presentation/features/molecules/FeatureHoverPreview/index.js +1 -176
- package/dist/node/presentation/features/molecules/index.js +1 -505
- package/dist/node/presentation/features/organisms/FeatureDataViewsList.js +1 -304
- package/dist/node/presentation/features/organisms/FeatureDetail/FeatureDetail.js +1 -154
- package/dist/node/presentation/features/organisms/FeatureDetail/index.js +1 -154
- package/dist/node/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +1 -909
- package/dist/node/presentation/features/organisms/FeatureDiscovery/index.js +1 -909
- package/dist/node/presentation/features/organisms/FeatureEventsList.js +1 -302
- package/dist/node/presentation/features/organisms/FeatureFormsList.js +1 -302
- package/dist/node/presentation/features/organisms/FeatureOperationsList.js +1 -180
- package/dist/node/presentation/features/organisms/FeaturePresentationsList.js +1 -304
- package/dist/node/presentation/features/organisms/index.js +1 -1359
- package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +1 -332
- package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +1 -332
- package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +1 -342
- package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/index.js +1 -342
- package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +1 -303
- package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/index.js +1 -303
- package/dist/node/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +1 -340
- package/dist/node/presentation/features/templates/FeatureEventsTemplate/index.js +1 -340
- package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +1 -329
- package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/index.js +1 -329
- package/dist/node/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +1 -340
- package/dist/node/presentation/features/templates/FeatureFormsTemplate/index.js +1 -340
- package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +1 -302
- package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/index.js +1 -302
- package/dist/node/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +1 -218
- package/dist/node/presentation/features/templates/FeatureOperationsTemplate/index.js +1 -218
- package/dist/node/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +1 -187
- package/dist/node/presentation/features/templates/FeatureOverviewTemplate/index.js +1 -187
- package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +1 -306
- package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +1 -306
- package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +1 -342
- package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/index.js +1 -342
- package/dist/presentation/features/atoms/FeatureIcon/FeatureIcon.js +1 -97
- package/dist/presentation/features/atoms/FeatureIcon/index.js +1 -97
- package/dist/presentation/features/atoms/index.js +1 -97
- package/dist/presentation/features/hooks/index.js +1 -397
- package/dist/presentation/features/hooks/useContractsRegistry.js +1 -289
- package/dist/presentation/features/hooks/useFeatureFilters.js +1 -75
- package/dist/presentation/features/hooks/useFeatureRegistry.js +1 -147
- package/dist/presentation/features/hooks/useRelatedDocs.js +1 -28
- package/dist/presentation/features/index.js +1 -3063
- package/dist/presentation/features/molecules/FeatureCard/FeatureCard.js +1 -366
- package/dist/presentation/features/molecules/FeatureCard/index.js +1 -366
- package/dist/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +1 -50
- package/dist/presentation/features/molecules/FeatureCategoryHeader/index.js +1 -50
- package/dist/presentation/features/molecules/FeatureFilters/FeatureFilters.js +1 -92
- package/dist/presentation/features/molecules/FeatureFilters/index.js +1 -92
- package/dist/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +1 -176
- package/dist/presentation/features/molecules/FeatureHoverPreview/index.js +1 -176
- package/dist/presentation/features/molecules/index.js +1 -505
- package/dist/presentation/features/organisms/FeatureDataViewsList.js +1 -304
- package/dist/presentation/features/organisms/FeatureDetail/FeatureDetail.js +1 -154
- package/dist/presentation/features/organisms/FeatureDetail/index.js +1 -154
- package/dist/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +1 -909
- package/dist/presentation/features/organisms/FeatureDiscovery/index.js +1 -909
- package/dist/presentation/features/organisms/FeatureEventsList.js +1 -302
- package/dist/presentation/features/organisms/FeatureFormsList.js +1 -302
- package/dist/presentation/features/organisms/FeatureOperationsList.js +1 -180
- package/dist/presentation/features/organisms/FeaturePresentationsList.js +1 -304
- package/dist/presentation/features/organisms/index.js +1 -1359
- package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +1 -332
- package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +1 -332
- package/dist/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +1 -342
- package/dist/presentation/features/templates/FeatureDataViewsTemplate/index.js +1 -342
- package/dist/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +1 -303
- package/dist/presentation/features/templates/FeatureEventDetailTemplate/index.js +1 -303
- package/dist/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +1 -340
- package/dist/presentation/features/templates/FeatureEventsTemplate/index.js +1 -340
- package/dist/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +1 -329
- package/dist/presentation/features/templates/FeatureFormDetailTemplate/index.js +1 -329
- package/dist/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +1 -340
- package/dist/presentation/features/templates/FeatureFormsTemplate/index.js +1 -340
- package/dist/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +1 -302
- package/dist/presentation/features/templates/FeatureOperationDetailTemplate/index.js +1 -302
- package/dist/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +1 -218
- package/dist/presentation/features/templates/FeatureOperationsTemplate/index.js +1 -218
- package/dist/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +1 -187
- package/dist/presentation/features/templates/FeatureOverviewTemplate/index.js +1 -187
- package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +1 -306
- package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +1 -306
- package/dist/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +1 -342
- package/dist/presentation/features/templates/FeaturePresentationsTemplate/index.js +1 -342
- package/package.json +109 -37
- package/src/components/docs/DocsIndexPage.tsx +55 -0
- package/src/components/docs/architecture/ArchitectureControlPlanePage.tsx +19 -0
- package/src/components/docs/architecture/ArchitectureOverviewPage.tsx +34 -0
- package/src/components/docs/docsManifest.test.ts +70 -0
- package/src/components/docs/docsManifest.ts +71 -1
- package/src/components/docs/ecosystem/PluginsPage.tsx +24 -10
- package/src/components/docs/ecosystem/RegistryPage.tsx +11 -6
- package/src/components/docs/generated/docs-index._common.json +206 -273
- package/src/components/docs/generated/docs-index.control-plane.json +18 -0
- package/src/components/docs/generated/docs-index.defineExample.json +10 -0
- package/src/components/docs/generated/docs-index.manifest.json +22 -12
- package/src/components/docs/generated/docs-index.platform-acp.json +64 -0
- package/src/components/docs/generated/docs-index.platform-agent.json +89 -1
- package/src/components/docs/generated/docs-index.platform-context.json +48 -0
- package/src/components/docs/generated/docs-index.platform-control-plane.json +72 -0
- package/src/components/docs/generated/docs-index.platform-database.json +40 -0
- package/src/components/docs/generated/docs-index.platform-docs.json +64 -0
- package/src/components/docs/generated/docs-index.platform-provider-ranking.json +89 -1
- package/src/components/docs/generated/docs-index.pocket-family-office.json +8 -0
- package/src/components/docs/generated/docs-index.unknown.json +8 -0
- package/src/components/docs/guides/GuideConnectInRepoPage.tsx +184 -0
- package/src/components/docs/guides/GuideFirstModuleBundlePage.tsx +182 -0
- package/src/components/docs/guides/GuideHostBuilderWorkbenchPage.tsx +230 -0
- package/src/components/docs/guides/GuidesIndexPage.tsx +21 -0
- package/src/components/docs/guides/index.ts +3 -0
- package/src/components/docs/specs/SpecsBuilderControlPlanePage.tsx +210 -0
- package/src/components/docs/specs/SpecsConnectPage.tsx +162 -0
- package/src/components/docs/specs/SpecsModuleBundlesPage.tsx +223 -0
- package/src/components/docs/specs/SpecsOverlaysPage.tsx +20 -0
- package/src/components/docs/specs/SpecsOverviewPage.tsx +44 -0
- package/src/components/docs/specs/SpecsWorkflowsPage.tsx +9 -1
- package/src/components/docs/specs/index.ts +3 -0
- package/src/components/docs/studio/StudioOverviewPage.tsx +26 -0
- package/src/infrastructure/elysia/logger.ts +11 -3
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { gql } from "@apollo/client";
|
|
3
|
-
import { useQuery } from "@apollo/client/react";
|
|
4
|
-
import { useTemplateRuntime } from "@contractspec/lib.example-shared-ui";
|
|
5
|
-
import { MessageCircle, Users } from "lucide-react";
|
|
6
|
-
import { useMemo } from "react";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
var CONVERSATIONS_QUERY = gql`
|
|
1
|
+
import{gql as to}from"@apollo/client";import{useQuery as po}from"@apollo/client/react";import{useTemplateRuntime as mo}from"@contractspec/lib.example-shared-ui";import{MessageCircle as bo,Users as uo}from"lucide-react";import{useMemo as eo}from"react";import{jsx as P,jsxs as B}from"react/jsx-runtime";var fo=to`
|
|
9
2
|
query Conversations($projectId: ID!) {
|
|
10
3
|
conversations(projectId: $projectId) {
|
|
11
4
|
id
|
|
@@ -19,87 +12,7 @@ var CONVERSATIONS_QUERY = gql`
|
|
|
19
12
|
}
|
|
20
13
|
}
|
|
21
14
|
}
|
|
22
|
-
`;
|
|
23
|
-
function ConversationList({
|
|
24
|
-
selectedId,
|
|
25
|
-
onSelect
|
|
26
|
-
}) {
|
|
27
|
-
const { projectId } = useTemplateRuntime();
|
|
28
|
-
const { data, loading } = useQuery(CONVERSATIONS_QUERY, {
|
|
29
|
-
variables: { projectId },
|
|
30
|
-
fetchPolicy: "cache-and-network"
|
|
31
|
-
});
|
|
32
|
-
const conversations = useMemo(() => data?.conversations ?? [], [data]);
|
|
33
|
-
return /* @__PURE__ */ jsxs("aside", {
|
|
34
|
-
className: "h-full overflow-y-auto rounded-2xl border border-border bg-card",
|
|
35
|
-
children: [
|
|
36
|
-
/* @__PURE__ */ jsxs("header", {
|
|
37
|
-
className: "px -4 flex items-center justify-between border-border border-b px-4 py-3",
|
|
38
|
-
children: [
|
|
39
|
-
/* @__PURE__ */ jsxs("div", {
|
|
40
|
-
children: [
|
|
41
|
-
/* @__PURE__ */ jsx("p", {
|
|
42
|
-
className: "font-semibold text-sm",
|
|
43
|
-
children: "Conversations"
|
|
44
|
-
}),
|
|
45
|
-
/* @__PURE__ */ jsx("p", {
|
|
46
|
-
className: "text-muted-foreground text-xs",
|
|
47
|
-
children: loading ? "Loading…" : `${conversations.length} active`
|
|
48
|
-
})
|
|
49
|
-
]
|
|
50
|
-
}),
|
|
51
|
-
/* @__PURE__ */ jsx(Users, {
|
|
52
|
-
className: "h-4 w-4 text-muted-foreground"
|
|
53
|
-
})
|
|
54
|
-
]
|
|
55
|
-
}),
|
|
56
|
-
/* @__PURE__ */ jsxs("div", {
|
|
57
|
-
className: "divide-y divide-border/70",
|
|
58
|
-
children: [
|
|
59
|
-
conversations.map((conversation) => {
|
|
60
|
-
const isSelected = selectedId === conversation.id;
|
|
61
|
-
return /* @__PURE__ */ jsxs("button", {
|
|
62
|
-
type: "button",
|
|
63
|
-
className: `flex w-full flex-col items-start gap-1 px-4 py-3 text-left transition ${isSelected ? "bg-violet-500/10 text-foreground" : "hover:bg-muted/40"}`,
|
|
64
|
-
onClick: () => onSelect?.(conversation.id),
|
|
65
|
-
children: [
|
|
66
|
-
/* @__PURE__ */ jsxs("div", {
|
|
67
|
-
className: "flex items-center gap-2",
|
|
68
|
-
children: [
|
|
69
|
-
/* @__PURE__ */ jsx(MessageCircle, {
|
|
70
|
-
className: "h-4 w-4 text-muted-foreground"
|
|
71
|
-
}),
|
|
72
|
-
/* @__PURE__ */ jsx("span", {
|
|
73
|
-
className: "font-medium text-sm",
|
|
74
|
-
children: conversation.name || "Untitled conversation"
|
|
75
|
-
})
|
|
76
|
-
]
|
|
77
|
-
}),
|
|
78
|
-
/* @__PURE__ */ jsx("p", {
|
|
79
|
-
className: "text-muted-foreground text-xs",
|
|
80
|
-
children: conversation.participants.map((participant) => participant.displayName || participant.userId).join(" · ")
|
|
81
|
-
})
|
|
82
|
-
]
|
|
83
|
-
}, conversation.id);
|
|
84
|
-
}),
|
|
85
|
-
!loading && conversations.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
86
|
-
className: "p-4 text-center text-muted-foreground text-xs",
|
|
87
|
-
children: "No conversations yet."
|
|
88
|
-
}) : null
|
|
89
|
-
]
|
|
90
|
-
})
|
|
91
|
-
]
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// src/components/templates/messaging/MessageThread.tsx
|
|
96
|
-
import { gql as gql2 } from "@apollo/client";
|
|
97
|
-
import { useMutation, useQuery as useQuery2 } from "@apollo/client/react";
|
|
98
|
-
import { useTemplateRuntime as useTemplateRuntime2 } from "@contractspec/lib.example-shared-ui";
|
|
99
|
-
import { useEffect, useRef } from "react";
|
|
100
|
-
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
101
|
-
"use client";
|
|
102
|
-
var MESSAGES_QUERY = gql2`
|
|
15
|
+
`;function q({selectedId:o,onSelect:r}){let{projectId:d}=mo(),{data:t,loading:l}=po(fo,{variables:{projectId:d},fetchPolicy:"cache-and-network"}),u=eo(()=>t?.conversations??[],[t]);return B("aside",{className:"h-full overflow-y-auto rounded-2xl border border-border bg-card",children:[B("header",{className:"px -4 flex items-center justify-between border-border border-b px-4 py-3",children:[B("div",{children:[P("p",{className:"font-semibold text-sm",children:"Conversations"}),P("p",{className:"text-muted-foreground text-xs",children:l?"Loading…":`${u.length} active`})]}),P(uo,{className:"h-4 w-4 text-muted-foreground"})]}),B("div",{className:"divide-y divide-border/70",children:[u.map((e)=>{let y=o===e.id;return B("button",{type:"button",className:`flex w-full flex-col items-start gap-1 px-4 py-3 text-left transition ${y?"bg-violet-500/10 text-foreground":"hover:bg-muted/40"}`,onClick:()=>r?.(e.id),children:[B("div",{className:"flex items-center gap-2",children:[P(bo,{className:"h-4 w-4 text-muted-foreground"}),P("span",{className:"font-medium text-sm",children:e.name||"Untitled conversation"})]}),P("p",{className:"text-muted-foreground text-xs",children:e.participants.map((N)=>N.displayName||N.userId).join(" · ")})]},e.id)}),!l&&u.length===0?P("p",{className:"p-4 text-center text-muted-foreground text-xs",children:"No conversations yet."}):null]})]})}import{gql as _}from"@apollo/client";import{useMutation as No,useQuery as yo}from"@apollo/client/react";import{useTemplateRuntime as ho}from"@contractspec/lib.example-shared-ui";import{useEffect as v,useRef as ao}from"react";import{jsx as F,jsxs as Q}from"react/jsx-runtime";var Z=_`
|
|
103
16
|
query Messages($conversationId: ID!) {
|
|
104
17
|
messages(conversationId: $conversationId, limit: 50) {
|
|
105
18
|
id
|
|
@@ -110,362 +23,17 @@ var MESSAGES_QUERY = gql2`
|
|
|
110
23
|
status
|
|
111
24
|
}
|
|
112
25
|
}
|
|
113
|
-
|
|
114
|
-
var SET_READ = gql2`
|
|
26
|
+
`,io=_`
|
|
115
27
|
mutation SetMessagesRead($conversationId: ID!, $userId: String!) {
|
|
116
28
|
setMessagesRead(conversationId: $conversationId, userId: $userId)
|
|
117
29
|
}
|
|
118
|
-
`;
|
|
119
|
-
function MessageThread({
|
|
120
|
-
conversationId,
|
|
121
|
-
viewerId = "local-user"
|
|
122
|
-
}) {
|
|
123
|
-
const scrollRef = useRef(null);
|
|
124
|
-
const enabled = Boolean(conversationId);
|
|
125
|
-
const { data, loading } = useQuery2(MESSAGES_QUERY, {
|
|
126
|
-
variables: { conversationId },
|
|
127
|
-
skip: !enabled,
|
|
128
|
-
fetchPolicy: "cache-and-network"
|
|
129
|
-
});
|
|
130
|
-
const [setRead] = useMutation(SET_READ);
|
|
131
|
-
const { projectId } = useTemplateRuntime2();
|
|
132
|
-
const messages = data?.messages ?? [];
|
|
133
|
-
useEffect(() => {
|
|
134
|
-
if (!enabled || !conversationId)
|
|
135
|
-
return;
|
|
136
|
-
setRead({ variables: { conversationId, userId: viewerId } }).catch(() => {});
|
|
137
|
-
}, [conversationId, enabled, setRead, viewerId]);
|
|
138
|
-
useEffect(() => {
|
|
139
|
-
const container = scrollRef.current;
|
|
140
|
-
if (!container)
|
|
141
|
-
return;
|
|
142
|
-
container.scrollTop = container.scrollHeight;
|
|
143
|
-
}, [messages]);
|
|
144
|
-
if (!conversationId) {
|
|
145
|
-
return /* @__PURE__ */ jsx2("div", {
|
|
146
|
-
className: "flex flex-1 items-center justify-center rounded-2xl border border-border border-dashed",
|
|
147
|
-
children: /* @__PURE__ */ jsx2("p", {
|
|
148
|
-
className: "text-muted-foreground text-sm",
|
|
149
|
-
children: "Select a conversation"
|
|
150
|
-
})
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
return /* @__PURE__ */ jsx2("div", {
|
|
154
|
-
className: "flex flex-1 flex-col rounded-2xl border border-border bg-card",
|
|
155
|
-
children: /* @__PURE__ */ jsx2("div", {
|
|
156
|
-
ref: scrollRef,
|
|
157
|
-
className: "flex-1 space-y-3 overflow-y-auto p-4",
|
|
158
|
-
children: loading ? /* @__PURE__ */ jsx2("p", {
|
|
159
|
-
className: "text-center text-muted-foreground text-sm",
|
|
160
|
-
children: "Loading…"
|
|
161
|
-
}) : messages.slice().reverse().map((message) => /* @__PURE__ */ jsxs2("div", {
|
|
162
|
-
className: `flex flex-col ${message.senderId === viewerId ? "items-end" : "items-start"}`,
|
|
163
|
-
children: [
|
|
164
|
-
/* @__PURE__ */ jsx2("div", {
|
|
165
|
-
className: `max-w-xs rounded-2xl px-3 py-2 text-sm ${message.senderId === viewerId ? "bg-violet-500 text-white" : "bg-muted text-foreground"}`,
|
|
166
|
-
children: /* @__PURE__ */ jsx2("p", {
|
|
167
|
-
children: message.content
|
|
168
|
-
})
|
|
169
|
-
}),
|
|
170
|
-
/* @__PURE__ */ jsxs2("span", {
|
|
171
|
-
className: "mt-1 text-muted-foreground text-xs",
|
|
172
|
-
children: [
|
|
173
|
-
message.senderName || message.senderId,
|
|
174
|
-
" ·",
|
|
175
|
-
" ",
|
|
176
|
-
new Date(message.createdAt).toLocaleTimeString([], {
|
|
177
|
-
hour: "2-digit",
|
|
178
|
-
minute: "2-digit"
|
|
179
|
-
})
|
|
180
|
-
]
|
|
181
|
-
})
|
|
182
|
-
]
|
|
183
|
-
}, message.id))
|
|
184
|
-
})
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
// src/components/templates/messaging/MessageComposer.tsx
|
|
189
|
-
import { gql as gql3 } from "@apollo/client";
|
|
190
|
-
import { useMutation as useMutation2 } from "@apollo/client/react";
|
|
191
|
-
import { useTemplateRuntime as useTemplateRuntime3 } from "@contractspec/lib.example-shared-ui";
|
|
192
|
-
import { Send } from "lucide-react";
|
|
193
|
-
import { useState } from "react";
|
|
194
|
-
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
195
|
-
"use client";
|
|
196
|
-
var SEND_MESSAGE = gql3`
|
|
30
|
+
`;function G({conversationId:o,viewerId:r="local-user"}){let d=ao(null),t=Boolean(o),{data:l,loading:u}=yo(Z,{variables:{conversationId:o},skip:!t,fetchPolicy:"cache-and-network"}),[e]=No(io),{projectId:y}=ho(),N=l?.messages??[];if(v(()=>{if(!t||!o)return;e({variables:{conversationId:o,userId:r}}).catch(()=>{})},[o,t,e,r]),v(()=>{let p=d.current;if(!p)return;p.scrollTop=p.scrollHeight},[N]),!o)return F("div",{className:"flex flex-1 items-center justify-center rounded-2xl border border-border border-dashed",children:F("p",{className:"text-muted-foreground text-sm",children:"Select a conversation"})});return F("div",{className:"flex flex-1 flex-col rounded-2xl border border-border bg-card",children:F("div",{ref:d,className:"flex-1 space-y-3 overflow-y-auto p-4",children:u?F("p",{className:"text-center text-muted-foreground text-sm",children:"Loading…"}):N.slice().reverse().map((p)=>Q("div",{className:`flex flex-col ${p.senderId===r?"items-end":"items-start"}`,children:[F("div",{className:`max-w-xs rounded-2xl px-3 py-2 text-sm ${p.senderId===r?"bg-violet-500 text-white":"bg-muted text-foreground"}`,children:F("p",{children:p.content})}),Q("span",{className:"mt-1 text-muted-foreground text-xs",children:[p.senderName||p.senderId," ·"," ",new Date(p.createdAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})]})]},p.id))})})}import{gql as no}from"@apollo/client";import{useMutation as go}from"@apollo/client/react";import{useTemplateRuntime as wo}from"@contractspec/lib.example-shared-ui";import{Send as Po}from"lucide-react";import{useState as Fo}from"react";import{jsx as R,jsxs as M}from"react/jsx-runtime";var Ho=no`
|
|
197
31
|
mutation SendMessage($input: SendMessageInput!) {
|
|
198
32
|
sendMessage(input: $input) {
|
|
199
33
|
id
|
|
200
34
|
}
|
|
201
35
|
}
|
|
202
|
-
`;
|
|
203
|
-
function MessageComposer({
|
|
204
|
-
conversationId,
|
|
205
|
-
viewerId = "local-user",
|
|
206
|
-
viewerName = "You"
|
|
207
|
-
}) {
|
|
208
|
-
const { projectId } = useTemplateRuntime3();
|
|
209
|
-
const [content, setContent] = useState("");
|
|
210
|
-
const [sendMessage, { loading }] = useMutation2(SEND_MESSAGE);
|
|
211
|
-
const handleSubmit = async (event) => {
|
|
212
|
-
event.preventDefault();
|
|
213
|
-
if (!conversationId || !content.trim())
|
|
214
|
-
return;
|
|
215
|
-
await sendMessage({
|
|
216
|
-
variables: {
|
|
217
|
-
input: {
|
|
218
|
-
projectId,
|
|
219
|
-
conversationId,
|
|
220
|
-
senderId: viewerId,
|
|
221
|
-
senderName: viewerName,
|
|
222
|
-
content: content.trim()
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
refetchQueries: [
|
|
226
|
-
{
|
|
227
|
-
query: MESSAGES_QUERY,
|
|
228
|
-
variables: { conversationId }
|
|
229
|
-
}
|
|
230
|
-
]
|
|
231
|
-
});
|
|
232
|
-
setContent("");
|
|
233
|
-
};
|
|
234
|
-
return /* @__PURE__ */ jsxs3("form", {
|
|
235
|
-
onSubmit: handleSubmit,
|
|
236
|
-
className: "mt-3 flex items-center gap-2 rounded-2xl border border-border bg-card px-4 py-3",
|
|
237
|
-
children: [
|
|
238
|
-
/* @__PURE__ */ jsx3("input", {
|
|
239
|
-
type: "text",
|
|
240
|
-
className: "flex-1 bg-transparent text-foreground text-sm outline-none",
|
|
241
|
-
placeholder: conversationId ? "Type a message…" : "Select a conversation to start",
|
|
242
|
-
disabled: !conversationId || loading,
|
|
243
|
-
value: content,
|
|
244
|
-
onChange: (event) => setContent(event.target.value)
|
|
245
|
-
}),
|
|
246
|
-
/* @__PURE__ */ jsxs3("button", {
|
|
247
|
-
type: "submit",
|
|
248
|
-
className: "btn-primary inline-flex items-center gap-1 text-sm",
|
|
249
|
-
disabled: !conversationId || loading || !content.trim(),
|
|
250
|
-
children: [
|
|
251
|
-
/* @__PURE__ */ jsx3(Send, {
|
|
252
|
-
className: "h-4 w-4"
|
|
253
|
-
}),
|
|
254
|
-
"Send"
|
|
255
|
-
]
|
|
256
|
-
})
|
|
257
|
-
]
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
// src/components/templates/messaging/MessagingWorkspace.tsx
|
|
262
|
-
import { registerTemplateComponents } from "@contractspec/lib.example-shared-ui";
|
|
263
|
-
import { useState as useState2 } from "react";
|
|
264
|
-
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
265
|
-
"use client";
|
|
266
|
-
function MessagingWorkspace() {
|
|
267
|
-
const [conversationId, setConversationId] = useState2();
|
|
268
|
-
return /* @__PURE__ */ jsxs4("div", {
|
|
269
|
-
className: "grid gap-4 md:grid-cols-[280px,1fr]",
|
|
270
|
-
children: [
|
|
271
|
-
/* @__PURE__ */ jsx4(ConversationList, {
|
|
272
|
-
selectedId: conversationId,
|
|
273
|
-
onSelect: setConversationId
|
|
274
|
-
}),
|
|
275
|
-
/* @__PURE__ */ jsxs4("div", {
|
|
276
|
-
className: "flex flex-col gap-3",
|
|
277
|
-
children: [
|
|
278
|
-
/* @__PURE__ */ jsx4(MessageThread, {
|
|
279
|
-
conversationId
|
|
280
|
-
}),
|
|
281
|
-
/* @__PURE__ */ jsx4(MessageComposer, {
|
|
282
|
-
conversationId
|
|
283
|
-
})
|
|
284
|
-
]
|
|
285
|
-
})
|
|
286
|
-
]
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
registerTemplateComponents("messaging-app", {
|
|
290
|
-
list: MessagingWorkspace,
|
|
291
|
-
detail: MessageThread,
|
|
292
|
-
form: MessageComposer
|
|
293
|
-
});
|
|
294
|
-
// src/components/templates/recipes/LanguageSwitcher.tsx
|
|
295
|
-
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
296
|
-
function LanguageSwitcher({ locale, onChange }) {
|
|
297
|
-
return /* @__PURE__ */ jsx5("div", {
|
|
298
|
-
className: "inline-flex rounded-full border border-border bg-card p-1 font-semibold text-muted-foreground text-xs",
|
|
299
|
-
children: ["EN", "FR"].map((language) => /* @__PURE__ */ jsx5("button", {
|
|
300
|
-
type: "button",
|
|
301
|
-
className: `rounded-full px-3 py-1 transition ${locale === language ? "bg-violet-500 text-white" : "hover:text-foreground"}`,
|
|
302
|
-
onClick: () => onChange(language),
|
|
303
|
-
children: language === "EN" ? "English" : "Français"
|
|
304
|
-
}, language))
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
// src/components/templates/recipes/RecipeCard.tsx
|
|
309
|
-
import { Heart } from "lucide-react";
|
|
310
|
-
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
311
|
-
function RecipeCard({
|
|
312
|
-
recipe,
|
|
313
|
-
onSelect,
|
|
314
|
-
onToggleFavorite
|
|
315
|
-
}) {
|
|
316
|
-
return /* @__PURE__ */ jsxs5("button", {
|
|
317
|
-
type: "button",
|
|
318
|
-
onClick: () => onSelect?.(recipe),
|
|
319
|
-
className: "flex flex-col gap-3 rounded-2xl border border-border bg-card text-left transition hover:border-violet-400",
|
|
320
|
-
children: [
|
|
321
|
-
recipe.heroImageUrl ? /* @__PURE__ */ jsx6("img", {
|
|
322
|
-
src: recipe.heroImageUrl,
|
|
323
|
-
alt: recipe.name,
|
|
324
|
-
className: "h-40 w-full rounded-t-2xl object-cover"
|
|
325
|
-
}) : /* @__PURE__ */ jsx6("div", {
|
|
326
|
-
className: "h-40 rounded-t-2xl bg-muted"
|
|
327
|
-
}),
|
|
328
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
329
|
-
className: "space-y-2 p-4",
|
|
330
|
-
children: [
|
|
331
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
332
|
-
className: "flex items-center justify-between",
|
|
333
|
-
children: [
|
|
334
|
-
/* @__PURE__ */ jsx6("p", {
|
|
335
|
-
className: "font-semibold text-base",
|
|
336
|
-
children: recipe.name
|
|
337
|
-
}),
|
|
338
|
-
/* @__PURE__ */ jsx6("button", {
|
|
339
|
-
type: "button",
|
|
340
|
-
className: `inline-flex items-center justify-center rounded-full border border-transparent p-2 ${recipe.isFavorite ? "text-red-400" : "text-muted-foreground hover:text-red-400"}`,
|
|
341
|
-
onClick: (event) => {
|
|
342
|
-
event.stopPropagation();
|
|
343
|
-
onToggleFavorite?.(recipe);
|
|
344
|
-
},
|
|
345
|
-
children: /* @__PURE__ */ jsx6(Heart, {
|
|
346
|
-
className: `h-4 w-4 ${recipe.isFavorite ? "fill-red-400" : ""}`
|
|
347
|
-
})
|
|
348
|
-
})
|
|
349
|
-
]
|
|
350
|
-
}),
|
|
351
|
-
/* @__PURE__ */ jsx6("p", {
|
|
352
|
-
className: "line-clamp-2 text-muted-foreground text-sm",
|
|
353
|
-
children: recipe.description
|
|
354
|
-
}),
|
|
355
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
356
|
-
className: "flex flex-wrap gap-3 text-muted-foreground text-xs",
|
|
357
|
-
children: [
|
|
358
|
-
recipe.prepTimeMinutes ? /* @__PURE__ */ jsxs5("span", {
|
|
359
|
-
children: [
|
|
360
|
-
"Prep ",
|
|
361
|
-
recipe.prepTimeMinutes,
|
|
362
|
-
"m"
|
|
363
|
-
]
|
|
364
|
-
}) : null,
|
|
365
|
-
recipe.cookTimeMinutes ? /* @__PURE__ */ jsxs5("span", {
|
|
366
|
-
children: [
|
|
367
|
-
"Cook ",
|
|
368
|
-
recipe.cookTimeMinutes,
|
|
369
|
-
"m"
|
|
370
|
-
]
|
|
371
|
-
}) : null,
|
|
372
|
-
recipe.servings ? /* @__PURE__ */ jsxs5("span", {
|
|
373
|
-
children: [
|
|
374
|
-
recipe.servings,
|
|
375
|
-
" servings"
|
|
376
|
-
]
|
|
377
|
-
}) : null
|
|
378
|
-
]
|
|
379
|
-
})
|
|
380
|
-
]
|
|
381
|
-
})
|
|
382
|
-
]
|
|
383
|
-
});
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
// src/components/templates/recipes/RecipeDetail.tsx
|
|
387
|
-
import { BookOpen } from "lucide-react";
|
|
388
|
-
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
389
|
-
function RecipeDetail({ recipe }) {
|
|
390
|
-
if (!recipe) {
|
|
391
|
-
return /* @__PURE__ */ jsx7("div", {
|
|
392
|
-
className: "flex flex-1 items-center justify-center rounded-2xl border border-border border-dashed",
|
|
393
|
-
children: /* @__PURE__ */ jsx7("p", {
|
|
394
|
-
className: "text-muted-foreground text-sm",
|
|
395
|
-
children: "Select a recipe to view details."
|
|
396
|
-
})
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
return /* @__PURE__ */ jsxs6("article", {
|
|
400
|
-
className: "space-y-4 rounded-2xl border border-border bg-card p-6",
|
|
401
|
-
children: [
|
|
402
|
-
/* @__PURE__ */ jsxs6("header", {
|
|
403
|
-
className: "flex flex-wrap items-center gap-3",
|
|
404
|
-
children: [
|
|
405
|
-
/* @__PURE__ */ jsx7(BookOpen, {
|
|
406
|
-
className: "h-5 w-5 text-muted-foreground"
|
|
407
|
-
}),
|
|
408
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
409
|
-
children: [
|
|
410
|
-
/* @__PURE__ */ jsx7("h2", {
|
|
411
|
-
className: "font-semibold text-xl",
|
|
412
|
-
children: recipe.name
|
|
413
|
-
}),
|
|
414
|
-
/* @__PURE__ */ jsx7("p", {
|
|
415
|
-
className: "text-muted-foreground text-sm",
|
|
416
|
-
children: recipe.description
|
|
417
|
-
})
|
|
418
|
-
]
|
|
419
|
-
})
|
|
420
|
-
]
|
|
421
|
-
}),
|
|
422
|
-
/* @__PURE__ */ jsxs6("section", {
|
|
423
|
-
children: [
|
|
424
|
-
/* @__PURE__ */ jsx7("h3", {
|
|
425
|
-
className: "font-semibold text-muted-foreground text-sm uppercase tracking-wide",
|
|
426
|
-
children: "Ingredients"
|
|
427
|
-
}),
|
|
428
|
-
/* @__PURE__ */ jsx7("ul", {
|
|
429
|
-
className: "mt-2 list-disc space-y-1 pl-6 text-foreground text-sm",
|
|
430
|
-
children: recipe.ingredients.map((ingredient) => /* @__PURE__ */ jsxs6("li", {
|
|
431
|
-
children: [
|
|
432
|
-
ingredient.name,
|
|
433
|
-
" – ",
|
|
434
|
-
ingredient.quantity
|
|
435
|
-
]
|
|
436
|
-
}, ingredient.id))
|
|
437
|
-
})
|
|
438
|
-
]
|
|
439
|
-
}),
|
|
440
|
-
/* @__PURE__ */ jsxs6("section", {
|
|
441
|
-
children: [
|
|
442
|
-
/* @__PURE__ */ jsx7("h3", {
|
|
443
|
-
className: "font-semibold text-muted-foreground text-sm uppercase tracking-wide",
|
|
444
|
-
children: "Instructions"
|
|
445
|
-
}),
|
|
446
|
-
/* @__PURE__ */ jsx7("ol", {
|
|
447
|
-
className: "mt-2 list-decimal space-y-2 pl-6 text-foreground text-sm",
|
|
448
|
-
children: recipe.instructions.map((instruction) => /* @__PURE__ */ jsx7("li", {
|
|
449
|
-
children: instruction.content
|
|
450
|
-
}, instruction.id))
|
|
451
|
-
})
|
|
452
|
-
]
|
|
453
|
-
})
|
|
454
|
-
]
|
|
455
|
-
});
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
// src/components/templates/recipes/RecipeList.tsx
|
|
459
|
-
import { gql as gql4 } from "@apollo/client";
|
|
460
|
-
import { useMutation as useMutation3, useQuery as useQuery3 } from "@apollo/client/react";
|
|
461
|
-
import {
|
|
462
|
-
registerTemplateComponents as registerTemplateComponents2,
|
|
463
|
-
useTemplateRuntime as useTemplateRuntime4
|
|
464
|
-
} from "@contractspec/lib.example-shared-ui";
|
|
465
|
-
import { useState as useState3 } from "react";
|
|
466
|
-
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
467
|
-
"use client";
|
|
468
|
-
var RECIPES_QUERY = gql4`
|
|
36
|
+
`;function O({conversationId:o,viewerId:r="local-user",viewerName:d="You"}){let{projectId:t}=wo(),[l,u]=Fo(""),[e,{loading:y}]=go(Ho);return M("form",{onSubmit:async(p)=>{if(p.preventDefault(),!o||!l.trim())return;await e({variables:{input:{projectId:t,conversationId:o,senderId:r,senderName:d,content:l.trim()}},refetchQueries:[{query:Z,variables:{conversationId:o}}]}),u("")},className:"mt-3 flex items-center gap-2 rounded-2xl border border-border bg-card px-4 py-3",children:[R("input",{type:"text",className:"flex-1 bg-transparent text-foreground text-sm outline-none",placeholder:o?"Type a message…":"Select a conversation to start",disabled:!o||y,value:l,onChange:(p)=>u(p.target.value)}),M("button",{type:"submit",className:"btn-primary inline-flex items-center gap-1 text-sm",disabled:!o||y||!l.trim(),children:[R(Po,{className:"h-4 w-4"}),"Send"]})]})}import{registerTemplateComponents as $o}from"@contractspec/lib.example-shared-ui";import{useState as Co}from"react";import{jsx as U,jsxs as x}from"react/jsx-runtime";function Bo(){let[o,r]=Co();return x("div",{className:"grid gap-4 md:grid-cols-[280px,1fr]",children:[U(q,{selectedId:o,onSelect:r}),x("div",{className:"flex flex-col gap-3",children:[U(G,{conversationId:o}),U(O,{conversationId:o})]})]})}$o("messaging-app",{list:Bo,detail:G,form:O});import{jsx as T}from"react/jsx-runtime";function k({locale:o,onChange:r}){return T("div",{className:"inline-flex rounded-full border border-border bg-card p-1 font-semibold text-muted-foreground text-xs",children:["EN","FR"].map((d)=>T("button",{type:"button",className:`rounded-full px-3 py-1 transition ${o===d?"bg-violet-500 text-white":"hover:text-foreground"}`,onClick:()=>r(d),children:d==="EN"?"English":"Français"},d))})}import{Heart as Do}from"lucide-react";import{jsx as D,jsxs as H}from"react/jsx-runtime";function E({recipe:o,onSelect:r,onToggleFavorite:d}){return H("button",{type:"button",onClick:()=>r?.(o),className:"flex flex-col gap-3 rounded-2xl border border-border bg-card text-left transition hover:border-violet-400",children:[o.heroImageUrl?D("img",{src:o.heroImageUrl,alt:o.name,className:"h-40 w-full rounded-t-2xl object-cover"}):D("div",{className:"h-40 rounded-t-2xl bg-muted"}),H("div",{className:"space-y-2 p-4",children:[H("div",{className:"flex items-center justify-between",children:[D("p",{className:"font-semibold text-base",children:o.name}),D("button",{type:"button",className:`inline-flex items-center justify-center rounded-full border border-transparent p-2 ${o.isFavorite?"text-red-400":"text-muted-foreground hover:text-red-400"}`,onClick:(t)=>{t.stopPropagation(),d?.(o)},children:D(Do,{className:`h-4 w-4 ${o.isFavorite?"fill-red-400":""}`})})]}),D("p",{className:"line-clamp-2 text-muted-foreground text-sm",children:o.description}),H("div",{className:"flex flex-wrap gap-3 text-muted-foreground text-xs",children:[o.prepTimeMinutes?H("span",{children:["Prep ",o.prepTimeMinutes,"m"]}):null,o.cookTimeMinutes?H("span",{children:["Cook ",o.cookTimeMinutes,"m"]}):null,o.servings?H("span",{children:[o.servings," servings"]}):null]})]})]})}import{BookOpen as Wo}from"lucide-react";import{jsx as i,jsxs as W}from"react/jsx-runtime";function K({recipe:o}){if(!o)return i("div",{className:"flex flex-1 items-center justify-center rounded-2xl border border-border border-dashed",children:i("p",{className:"text-muted-foreground text-sm",children:"Select a recipe to view details."})});return W("article",{className:"space-y-4 rounded-2xl border border-border bg-card p-6",children:[W("header",{className:"flex flex-wrap items-center gap-3",children:[i(Wo,{className:"h-5 w-5 text-muted-foreground"}),W("div",{children:[i("h2",{className:"font-semibold text-xl",children:o.name}),i("p",{className:"text-muted-foreground text-sm",children:o.description})]})]}),W("section",{children:[i("h3",{className:"font-semibold text-muted-foreground text-sm uppercase tracking-wide",children:"Ingredients"}),i("ul",{className:"mt-2 list-disc space-y-1 pl-6 text-foreground text-sm",children:o.ingredients.map((r)=>W("li",{children:[r.name," – ",r.quantity]},r.id))})]}),W("section",{children:[i("h3",{className:"font-semibold text-muted-foreground text-sm uppercase tracking-wide",children:"Instructions"}),i("ol",{className:"mt-2 list-decimal space-y-2 pl-6 text-foreground text-sm",children:o.instructions.map((r)=>i("li",{children:r.content},r.id))})]})]})}import{gql as I}from"@apollo/client";import{useMutation as zo,useQuery as Jo}from"@apollo/client/react";import{registerTemplateComponents as Vo,useTemplateRuntime as Xo}from"@contractspec/lib.example-shared-ui";import{useState as L}from"react";import{jsx as z,jsxs as S}from"react/jsx-runtime";var Zo=I`
|
|
469
37
|
query Recipes($projectId: ID!, $locale: RecipeLocale!) {
|
|
470
38
|
recipes(projectId: $projectId, locale: $locale) {
|
|
471
39
|
id
|
|
@@ -494,432 +62,21 @@ var RECIPES_QUERY = gql4`
|
|
|
494
62
|
}
|
|
495
63
|
}
|
|
496
64
|
}
|
|
497
|
-
|
|
498
|
-
var FAVORITE_RECIPE = gql4`
|
|
65
|
+
`,Go=I`
|
|
499
66
|
mutation FavoriteRecipe($id: ID!, $isFavorite: Boolean!) {
|
|
500
67
|
favoriteRecipe(id: $id, isFavorite: $isFavorite) {
|
|
501
68
|
id
|
|
502
69
|
isFavorite
|
|
503
70
|
}
|
|
504
71
|
}
|
|
505
|
-
`;
|
|
506
|
-
function RecipeList() {
|
|
507
|
-
const { projectId } = useTemplateRuntime4();
|
|
508
|
-
const [locale, setLocale] = useState3("EN");
|
|
509
|
-
const [selected, setSelected] = useState3();
|
|
510
|
-
const [search, setSearch] = useState3("");
|
|
511
|
-
const { data, loading } = useQuery3(RECIPES_QUERY, {
|
|
512
|
-
variables: { projectId, locale },
|
|
513
|
-
fetchPolicy: "cache-and-network"
|
|
514
|
-
});
|
|
515
|
-
const [favoriteRecipe] = useMutation3(FAVORITE_RECIPE);
|
|
516
|
-
const recipes = data?.recipes ?? [];
|
|
517
|
-
const filtered = recipes.filter((recipe) => recipe.name.toLowerCase().includes(search.toLowerCase()));
|
|
518
|
-
const handleToggleFavorite = async (recipe) => {
|
|
519
|
-
await favoriteRecipe({
|
|
520
|
-
variables: { id: recipe.id, isFavorite: !recipe.isFavorite },
|
|
521
|
-
optimisticResponse: {
|
|
522
|
-
favoriteRecipe: {
|
|
523
|
-
__typename: "Recipe",
|
|
524
|
-
id: recipe.id,
|
|
525
|
-
isFavorite: !recipe.isFavorite
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
});
|
|
529
|
-
};
|
|
530
|
-
return /* @__PURE__ */ jsxs7("div", {
|
|
531
|
-
className: "space-y-4",
|
|
532
|
-
children: [
|
|
533
|
-
/* @__PURE__ */ jsxs7("div", {
|
|
534
|
-
className: "flex flex-wrap items-center gap-3",
|
|
535
|
-
children: [
|
|
536
|
-
/* @__PURE__ */ jsx8(LanguageSwitcher, {
|
|
537
|
-
locale,
|
|
538
|
-
onChange: setLocale
|
|
539
|
-
}),
|
|
540
|
-
/* @__PURE__ */ jsx8("input", {
|
|
541
|
-
type: "search",
|
|
542
|
-
placeholder: locale === "EN" ? "Search recipes" : "Rechercher des recettes",
|
|
543
|
-
className: "flex-1 rounded-full border border-border bg-card px-4 py-2 text-sm",
|
|
544
|
-
value: search,
|
|
545
|
-
onChange: (event) => setSearch(event.target.value)
|
|
546
|
-
})
|
|
547
|
-
]
|
|
548
|
-
}),
|
|
549
|
-
loading ? /* @__PURE__ */ jsx8("p", {
|
|
550
|
-
className: "text-muted-foreground text-sm",
|
|
551
|
-
children: "Loading recipes…"
|
|
552
|
-
}) : /* @__PURE__ */ jsx8("div", {
|
|
553
|
-
className: "grid gap-4 md:grid-cols-3",
|
|
554
|
-
children: filtered.map((recipe) => /* @__PURE__ */ jsx8(RecipeCard, {
|
|
555
|
-
recipe,
|
|
556
|
-
onSelect: setSelected,
|
|
557
|
-
onToggleFavorite: handleToggleFavorite
|
|
558
|
-
}, recipe.id))
|
|
559
|
-
}),
|
|
560
|
-
/* @__PURE__ */ jsx8(RecipeDetail, {
|
|
561
|
-
recipe: selected
|
|
562
|
-
})
|
|
563
|
-
]
|
|
564
|
-
});
|
|
565
|
-
}
|
|
566
|
-
registerTemplateComponents2("recipe-app-i18n", {
|
|
567
|
-
list: RecipeList,
|
|
568
|
-
detail: RecipeDetail
|
|
569
|
-
});
|
|
570
|
-
// src/components/templates/todos/FilterBar.tsx
|
|
571
|
-
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
572
|
-
function FilterBar({ value, onChange, categories }) {
|
|
573
|
-
const handleChange = (key, nextValue) => {
|
|
574
|
-
onChange({ ...value, [key]: nextValue });
|
|
575
|
-
};
|
|
576
|
-
return /* @__PURE__ */ jsxs8("div", {
|
|
577
|
-
className: "grid gap-3 rounded-2xl border border-border bg-card p-4 md:grid-cols-4",
|
|
578
|
-
children: [
|
|
579
|
-
/* @__PURE__ */ jsxs8("label", {
|
|
580
|
-
className: "flex flex-col text-muted-foreground text-xs uppercase tracking-wide",
|
|
581
|
-
children: [
|
|
582
|
-
"Status",
|
|
583
|
-
/* @__PURE__ */ jsxs8("select", {
|
|
584
|
-
className: "mt-1 rounded-md border border-border bg-background px-3 py-2 text-foreground text-sm",
|
|
585
|
-
value: value.status,
|
|
586
|
-
onChange: (event) => handleChange("status", event.target.value),
|
|
587
|
-
children: [
|
|
588
|
-
/* @__PURE__ */ jsx9("option", {
|
|
589
|
-
value: "all",
|
|
590
|
-
children: "All tasks"
|
|
591
|
-
}),
|
|
592
|
-
/* @__PURE__ */ jsx9("option", {
|
|
593
|
-
value: "active",
|
|
594
|
-
children: "Active"
|
|
595
|
-
}),
|
|
596
|
-
/* @__PURE__ */ jsx9("option", {
|
|
597
|
-
value: "completed",
|
|
598
|
-
children: "Completed"
|
|
599
|
-
})
|
|
600
|
-
]
|
|
601
|
-
})
|
|
602
|
-
]
|
|
603
|
-
}),
|
|
604
|
-
/* @__PURE__ */ jsxs8("label", {
|
|
605
|
-
className: "flex flex-col text-muted-foreground text-xs uppercase tracking-wide",
|
|
606
|
-
children: [
|
|
607
|
-
"Priority",
|
|
608
|
-
/* @__PURE__ */ jsxs8("select", {
|
|
609
|
-
className: "mt-1 rounded-md border border-border bg-background px-3 py-2 text-foreground text-sm",
|
|
610
|
-
value: value.priority,
|
|
611
|
-
onChange: (event) => handleChange("priority", event.target.value),
|
|
612
|
-
children: [
|
|
613
|
-
/* @__PURE__ */ jsx9("option", {
|
|
614
|
-
value: "all",
|
|
615
|
-
children: "All"
|
|
616
|
-
}),
|
|
617
|
-
/* @__PURE__ */ jsx9("option", {
|
|
618
|
-
value: "LOW",
|
|
619
|
-
children: "Low"
|
|
620
|
-
}),
|
|
621
|
-
/* @__PURE__ */ jsx9("option", {
|
|
622
|
-
value: "MEDIUM",
|
|
623
|
-
children: "Medium"
|
|
624
|
-
}),
|
|
625
|
-
/* @__PURE__ */ jsx9("option", {
|
|
626
|
-
value: "HIGH",
|
|
627
|
-
children: "High"
|
|
628
|
-
}),
|
|
629
|
-
/* @__PURE__ */ jsx9("option", {
|
|
630
|
-
value: "URGENT",
|
|
631
|
-
children: "Urgent"
|
|
632
|
-
})
|
|
633
|
-
]
|
|
634
|
-
})
|
|
635
|
-
]
|
|
636
|
-
}),
|
|
637
|
-
/* @__PURE__ */ jsxs8("label", {
|
|
638
|
-
className: "flex flex-col text-muted-foreground text-xs uppercase tracking-wide",
|
|
639
|
-
children: [
|
|
640
|
-
"Category",
|
|
641
|
-
/* @__PURE__ */ jsxs8("select", {
|
|
642
|
-
className: "mt-1 rounded-md border border-border bg-background px-3 py-2 text-foreground text-sm",
|
|
643
|
-
value: value.categoryId,
|
|
644
|
-
onChange: (event) => handleChange("categoryId", event.target.value),
|
|
645
|
-
children: [
|
|
646
|
-
/* @__PURE__ */ jsx9("option", {
|
|
647
|
-
value: "all",
|
|
648
|
-
children: "All categories"
|
|
649
|
-
}),
|
|
650
|
-
categories.map((category) => /* @__PURE__ */ jsx9("option", {
|
|
651
|
-
value: category.id,
|
|
652
|
-
children: category.name
|
|
653
|
-
}, category.id))
|
|
654
|
-
]
|
|
655
|
-
})
|
|
656
|
-
]
|
|
657
|
-
}),
|
|
658
|
-
/* @__PURE__ */ jsxs8("label", {
|
|
659
|
-
className: "flex flex-col text-muted-foreground text-xs uppercase tracking-wide",
|
|
660
|
-
children: [
|
|
661
|
-
"Search",
|
|
662
|
-
/* @__PURE__ */ jsx9("input", {
|
|
663
|
-
type: "search",
|
|
664
|
-
className: "mt-1 rounded-md border border-border bg-background px-3 py-2 text-foreground text-sm",
|
|
665
|
-
placeholder: "Search by title",
|
|
666
|
-
value: value.search,
|
|
667
|
-
onChange: (event) => handleChange("search", event.target.value)
|
|
668
|
-
})
|
|
669
|
-
]
|
|
670
|
-
})
|
|
671
|
-
]
|
|
672
|
-
});
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
// src/components/templates/todos/TaskForm.tsx
|
|
676
|
-
import { gql as gql5 } from "@apollo/client";
|
|
677
|
-
import { useMutation as useMutation4 } from "@apollo/client/react";
|
|
678
|
-
import { useTemplateRuntime as useTemplateRuntime5 } from "@contractspec/lib.example-shared-ui";
|
|
679
|
-
import { useState as useState4 } from "react";
|
|
680
|
-
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
681
|
-
"use client";
|
|
682
|
-
var CREATE_TASK = gql5`
|
|
72
|
+
`;function Oo(){let{projectId:o}=Xo(),[r,d]=L("EN"),[t,l]=L(),[u,e]=L(""),{data:y,loading:N}=Jo(Zo,{variables:{projectId:o,locale:r},fetchPolicy:"cache-and-network"}),[p]=zo(Go),C=(y?.recipes??[]).filter((f)=>f.name.toLowerCase().includes(u.toLowerCase())),m=async(f)=>{await p({variables:{id:f.id,isFavorite:!f.isFavorite},optimisticResponse:{favoriteRecipe:{__typename:"Recipe",id:f.id,isFavorite:!f.isFavorite}}})};return S("div",{className:"space-y-4",children:[S("div",{className:"flex flex-wrap items-center gap-3",children:[z(k,{locale:r,onChange:d}),z("input",{type:"search",placeholder:r==="EN"?"Search recipes":"Rechercher des recettes",className:"flex-1 rounded-full border border-border bg-card px-4 py-2 text-sm",value:u,onChange:(f)=>e(f.target.value)})]}),N?z("p",{className:"text-muted-foreground text-sm",children:"Loading recipes…"}):z("div",{className:"grid gap-4 md:grid-cols-3",children:C.map((f)=>z(E,{recipe:f,onSelect:l,onToggleFavorite:m},f.id))}),z(K,{recipe:t})]})}Vo("recipe-app-i18n",{list:Oo,detail:K});import{jsx as a,jsxs as w}from"react/jsx-runtime";function j({value:o,onChange:r,categories:d}){let t=(l,u)=>{r({...o,[l]:u})};return w("div",{className:"grid gap-3 rounded-2xl border border-border bg-card p-4 md:grid-cols-4",children:[w("label",{className:"flex flex-col text-muted-foreground text-xs uppercase tracking-wide",children:["Status",w("select",{className:"mt-1 rounded-md border border-border bg-background px-3 py-2 text-foreground text-sm",value:o.status,onChange:(l)=>t("status",l.target.value),children:[a("option",{value:"all",children:"All tasks"}),a("option",{value:"active",children:"Active"}),a("option",{value:"completed",children:"Completed"})]})]}),w("label",{className:"flex flex-col text-muted-foreground text-xs uppercase tracking-wide",children:["Priority",w("select",{className:"mt-1 rounded-md border border-border bg-background px-3 py-2 text-foreground text-sm",value:o.priority,onChange:(l)=>t("priority",l.target.value),children:[a("option",{value:"all",children:"All"}),a("option",{value:"LOW",children:"Low"}),a("option",{value:"MEDIUM",children:"Medium"}),a("option",{value:"HIGH",children:"High"}),a("option",{value:"URGENT",children:"Urgent"})]})]}),w("label",{className:"flex flex-col text-muted-foreground text-xs uppercase tracking-wide",children:["Category",w("select",{className:"mt-1 rounded-md border border-border bg-background px-3 py-2 text-foreground text-sm",value:o.categoryId,onChange:(l)=>t("categoryId",l.target.value),children:[a("option",{value:"all",children:"All categories"}),d.map((l)=>a("option",{value:l.id,children:l.name},l.id))]})]}),w("label",{className:"flex flex-col text-muted-foreground text-xs uppercase tracking-wide",children:["Search",a("input",{type:"search",className:"mt-1 rounded-md border border-border bg-background px-3 py-2 text-foreground text-sm",placeholder:"Search by title",value:o.search,onChange:(l)=>t("search",l.target.value)})]})]})}import{gql as Uo}from"@apollo/client";import{useMutation as Ko}from"@apollo/client/react";import{useTemplateRuntime as Lo}from"@contractspec/lib.example-shared-ui";import{useState as V}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";var Yo=Uo`
|
|
683
73
|
mutation CreateTask($input: CreateTaskInput!) {
|
|
684
74
|
createTask(input: $input) {
|
|
685
75
|
id
|
|
686
76
|
title
|
|
687
77
|
}
|
|
688
78
|
}
|
|
689
|
-
`;
|
|
690
|
-
function TaskForm({ categories }) {
|
|
691
|
-
const { projectId } = useTemplateRuntime5();
|
|
692
|
-
const [title, setTitle] = useState4("");
|
|
693
|
-
const [description, setDescription] = useState4("");
|
|
694
|
-
const [priority, setPriority] = useState4("MEDIUM");
|
|
695
|
-
const [categoryId, setCategoryId] = useState4("none");
|
|
696
|
-
const [tagsInput, setTagsInput] = useState4("");
|
|
697
|
-
const [createTask, { loading }] = useMutation4(CREATE_TASK);
|
|
698
|
-
const handleSubmit = async (event) => {
|
|
699
|
-
event.preventDefault();
|
|
700
|
-
if (!title.trim())
|
|
701
|
-
return;
|
|
702
|
-
await createTask({
|
|
703
|
-
variables: {
|
|
704
|
-
input: {
|
|
705
|
-
projectId,
|
|
706
|
-
title: title.trim(),
|
|
707
|
-
description: description.trim() || undefined,
|
|
708
|
-
priority,
|
|
709
|
-
categoryId: categoryId === "none" ? undefined : categoryId,
|
|
710
|
-
tags: parseTags(tagsInput)
|
|
711
|
-
}
|
|
712
|
-
},
|
|
713
|
-
refetchQueries: ["Tasks"],
|
|
714
|
-
awaitRefetchQueries: true
|
|
715
|
-
});
|
|
716
|
-
setTitle("");
|
|
717
|
-
setDescription("");
|
|
718
|
-
setPriority("MEDIUM");
|
|
719
|
-
setCategoryId("none");
|
|
720
|
-
setTagsInput("");
|
|
721
|
-
};
|
|
722
|
-
return /* @__PURE__ */ jsxs9("form", {
|
|
723
|
-
onSubmit: handleSubmit,
|
|
724
|
-
className: "space-y-3 rounded-2xl border border-border bg-background/60 p-4",
|
|
725
|
-
children: [
|
|
726
|
-
/* @__PURE__ */ jsx10("div", {
|
|
727
|
-
children: /* @__PURE__ */ jsxs9("label", {
|
|
728
|
-
className: "font-semibold text-muted-foreground text-xs uppercase",
|
|
729
|
-
children: [
|
|
730
|
-
"Title",
|
|
731
|
-
/* @__PURE__ */ jsx10("input", {
|
|
732
|
-
type: "text",
|
|
733
|
-
className: "mt-1 w-full rounded-md border border-border bg-card px-3 py-2 text-sm",
|
|
734
|
-
placeholder: "What needs to get done?",
|
|
735
|
-
value: title,
|
|
736
|
-
onChange: (event) => setTitle(event.target.value),
|
|
737
|
-
required: true
|
|
738
|
-
})
|
|
739
|
-
]
|
|
740
|
-
})
|
|
741
|
-
}),
|
|
742
|
-
/* @__PURE__ */ jsx10("div", {
|
|
743
|
-
children: /* @__PURE__ */ jsxs9("label", {
|
|
744
|
-
className: "font-semibold text-muted-foreground text-xs uppercase",
|
|
745
|
-
children: [
|
|
746
|
-
"Description",
|
|
747
|
-
/* @__PURE__ */ jsx10("textarea", {
|
|
748
|
-
className: "mt-1 w-full rounded-md border border-border bg-card px-3 py-2 text-sm",
|
|
749
|
-
rows: 3,
|
|
750
|
-
placeholder: "Add context or policy notes",
|
|
751
|
-
value: description,
|
|
752
|
-
onChange: (event) => setDescription(event.target.value)
|
|
753
|
-
})
|
|
754
|
-
]
|
|
755
|
-
})
|
|
756
|
-
}),
|
|
757
|
-
/* @__PURE__ */ jsxs9("div", {
|
|
758
|
-
className: "grid gap-3 md:grid-cols-3",
|
|
759
|
-
children: [
|
|
760
|
-
/* @__PURE__ */ jsxs9("label", {
|
|
761
|
-
className: "font-semibold text-muted-foreground text-xs uppercase",
|
|
762
|
-
children: [
|
|
763
|
-
"Priority",
|
|
764
|
-
/* @__PURE__ */ jsxs9("select", {
|
|
765
|
-
className: "mt-1 w-full rounded-md border border-border bg-card px-3 py-2 text-sm",
|
|
766
|
-
value: priority,
|
|
767
|
-
onChange: (event) => setPriority(event.target.value),
|
|
768
|
-
children: [
|
|
769
|
-
/* @__PURE__ */ jsx10("option", {
|
|
770
|
-
value: "LOW",
|
|
771
|
-
children: "Low"
|
|
772
|
-
}),
|
|
773
|
-
/* @__PURE__ */ jsx10("option", {
|
|
774
|
-
value: "MEDIUM",
|
|
775
|
-
children: "Medium"
|
|
776
|
-
}),
|
|
777
|
-
/* @__PURE__ */ jsx10("option", {
|
|
778
|
-
value: "HIGH",
|
|
779
|
-
children: "High"
|
|
780
|
-
}),
|
|
781
|
-
/* @__PURE__ */ jsx10("option", {
|
|
782
|
-
value: "URGENT",
|
|
783
|
-
children: "Urgent"
|
|
784
|
-
})
|
|
785
|
-
]
|
|
786
|
-
})
|
|
787
|
-
]
|
|
788
|
-
}),
|
|
789
|
-
/* @__PURE__ */ jsxs9("label", {
|
|
790
|
-
className: "font-semibold text-muted-foreground text-xs uppercase",
|
|
791
|
-
children: [
|
|
792
|
-
"Category",
|
|
793
|
-
/* @__PURE__ */ jsxs9("select", {
|
|
794
|
-
className: "mt-1 w-full rounded-md border border-border bg-card px-3 py-2 text-sm",
|
|
795
|
-
value: categoryId,
|
|
796
|
-
onChange: (event) => setCategoryId(event.target.value),
|
|
797
|
-
children: [
|
|
798
|
-
/* @__PURE__ */ jsx10("option", {
|
|
799
|
-
value: "none",
|
|
800
|
-
children: "None"
|
|
801
|
-
}),
|
|
802
|
-
categories.map((category) => /* @__PURE__ */ jsx10("option", {
|
|
803
|
-
value: category.id,
|
|
804
|
-
children: category.name
|
|
805
|
-
}, category.id))
|
|
806
|
-
]
|
|
807
|
-
})
|
|
808
|
-
]
|
|
809
|
-
}),
|
|
810
|
-
/* @__PURE__ */ jsxs9("label", {
|
|
811
|
-
className: "font-semibold text-muted-foreground text-xs uppercase",
|
|
812
|
-
children: [
|
|
813
|
-
"Tags",
|
|
814
|
-
/* @__PURE__ */ jsx10("input", {
|
|
815
|
-
className: "mt-1 w-full rounded-md border border-border bg-card px-3 py-2 text-sm",
|
|
816
|
-
placeholder: "Comma separated (optional)",
|
|
817
|
-
value: tagsInput,
|
|
818
|
-
onChange: (event) => setTagsInput(event.target.value)
|
|
819
|
-
})
|
|
820
|
-
]
|
|
821
|
-
})
|
|
822
|
-
]
|
|
823
|
-
}),
|
|
824
|
-
/* @__PURE__ */ jsx10("button", {
|
|
825
|
-
type: "submit",
|
|
826
|
-
className: "btn-primary w-full py-2 font-semibold text-sm",
|
|
827
|
-
disabled: loading,
|
|
828
|
-
children: loading ? "Saving..." : "Add task"
|
|
829
|
-
})
|
|
830
|
-
]
|
|
831
|
-
});
|
|
832
|
-
}
|
|
833
|
-
function parseTags(input) {
|
|
834
|
-
return input.split(",").map((tag) => tag.trim()).filter(Boolean);
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
// src/components/templates/todos/TaskItem.tsx
|
|
838
|
-
import { Check, Circle, Trash2 } from "lucide-react";
|
|
839
|
-
import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
840
|
-
function TaskItem({ task, onToggle, onDelete }) {
|
|
841
|
-
const badgeColor = task.priority === "URGENT" ? "text-red-200 bg-red-500/10 border-red-500/40" : task.priority === "HIGH" ? "text-amber-200 bg-amber-500/10 border-amber-500/40" : task.priority === "LOW" ? "text-emerald-200 bg-emerald-500/10 border-emerald-500/40" : "text-violet-200 bg-violet-500/10 border-violet-500/40";
|
|
842
|
-
return /* @__PURE__ */ jsxs10("div", {
|
|
843
|
-
className: "flex items-start gap-4 rounded-2xl border border-border/70 bg-card/60 p-4 transition hover:border-border",
|
|
844
|
-
children: [
|
|
845
|
-
/* @__PURE__ */ jsx11("button", {
|
|
846
|
-
type: "button",
|
|
847
|
-
className: "rounded-full border border-border p-2 text-muted-foreground hover:bg-muted/40",
|
|
848
|
-
"aria-pressed": task.completed,
|
|
849
|
-
onClick: () => onToggle?.(task),
|
|
850
|
-
children: task.completed ? /* @__PURE__ */ jsx11(Check, {
|
|
851
|
-
className: "h-4 w-4 text-emerald-400"
|
|
852
|
-
}) : /* @__PURE__ */ jsx11(Circle, {
|
|
853
|
-
className: "h-4 w-4"
|
|
854
|
-
})
|
|
855
|
-
}),
|
|
856
|
-
/* @__PURE__ */ jsxs10("div", {
|
|
857
|
-
className: "flex-1 space-y-2",
|
|
858
|
-
children: [
|
|
859
|
-
/* @__PURE__ */ jsxs10("div", {
|
|
860
|
-
className: "flex flex-wrap items-center gap-2",
|
|
861
|
-
children: [
|
|
862
|
-
/* @__PURE__ */ jsx11("p", {
|
|
863
|
-
className: `font-medium ${task.completed ? "text-muted-foreground line-through" : "text-foreground"}`,
|
|
864
|
-
children: task.title
|
|
865
|
-
}),
|
|
866
|
-
/* @__PURE__ */ jsx11("span", {
|
|
867
|
-
className: `rounded-full border px-2 py-0.5 text-xs ${badgeColor}`,
|
|
868
|
-
children: task.priority.charAt(0) + task.priority.slice(1).toLowerCase()
|
|
869
|
-
}),
|
|
870
|
-
task.category ? /* @__PURE__ */ jsx11("span", {
|
|
871
|
-
className: "rounded-full bg-muted/40 px-2 py-0.5 text-muted-foreground text-xs",
|
|
872
|
-
children: task.category.name
|
|
873
|
-
}) : null,
|
|
874
|
-
task.dueDate ? /* @__PURE__ */ jsxs10("span", {
|
|
875
|
-
className: "text-muted-foreground text-xs",
|
|
876
|
-
children: [
|
|
877
|
-
"Due ",
|
|
878
|
-
new Date(task.dueDate).toLocaleDateString()
|
|
879
|
-
]
|
|
880
|
-
}) : null
|
|
881
|
-
]
|
|
882
|
-
}),
|
|
883
|
-
task.description ? /* @__PURE__ */ jsx11("p", {
|
|
884
|
-
className: "text-muted-foreground text-sm",
|
|
885
|
-
children: task.description
|
|
886
|
-
}) : null,
|
|
887
|
-
task.tags.length ? /* @__PURE__ */ jsx11("div", {
|
|
888
|
-
className: "flex flex-wrap gap-1",
|
|
889
|
-
children: task.tags.map((tag) => /* @__PURE__ */ jsxs10("span", {
|
|
890
|
-
className: "rounded-full bg-muted/40 px-2 py-0.5 text-muted-foreground text-xs",
|
|
891
|
-
children: [
|
|
892
|
-
"#",
|
|
893
|
-
tag
|
|
894
|
-
]
|
|
895
|
-
}, tag))
|
|
896
|
-
}) : null
|
|
897
|
-
]
|
|
898
|
-
}),
|
|
899
|
-
/* @__PURE__ */ jsx11("button", {
|
|
900
|
-
type: "button",
|
|
901
|
-
className: "text-muted-foreground hover:text-destructive",
|
|
902
|
-
"aria-label": `Delete ${task.title}`,
|
|
903
|
-
onClick: () => onDelete?.(task),
|
|
904
|
-
children: /* @__PURE__ */ jsx11(Trash2, {
|
|
905
|
-
className: "h-4 w-4"
|
|
906
|
-
})
|
|
907
|
-
})
|
|
908
|
-
]
|
|
909
|
-
});
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
// src/components/templates/todos/TaskList.tsx
|
|
913
|
-
import { gql as gql6 } from "@apollo/client";
|
|
914
|
-
import { useMutation as useMutation5, useQuery as useQuery4 } from "@apollo/client/react";
|
|
915
|
-
import {
|
|
916
|
-
registerTemplateComponents as registerTemplateComponents3,
|
|
917
|
-
useTemplateRuntime as useTemplateRuntime6
|
|
918
|
-
} from "@contractspec/lib.example-shared-ui";
|
|
919
|
-
import { useMemo as useMemo2, useState as useState5 } from "react";
|
|
920
|
-
import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
921
|
-
"use client";
|
|
922
|
-
var TASKS_QUERY = gql6`
|
|
79
|
+
`;function Y({categories:o}){let{projectId:r}=Lo(),[d,t]=V(""),[l,u]=V(""),[e,y]=V("MEDIUM"),[N,p]=V("none"),[J,C]=V(""),[m,{loading:f}]=Ko(Yo);return g("form",{onSubmit:async(b)=>{if(b.preventDefault(),!d.trim())return;await m({variables:{input:{projectId:r,title:d.trim(),description:l.trim()||void 0,priority:e,categoryId:N==="none"?void 0:N,tags:Ao(J)}},refetchQueries:["Tasks"],awaitRefetchQueries:!0}),t(""),u(""),y("MEDIUM"),p("none"),C("")},className:"space-y-3 rounded-2xl border border-border bg-background/60 p-4",children:[h("div",{children:g("label",{className:"font-semibold text-muted-foreground text-xs uppercase",children:["Title",h("input",{type:"text",className:"mt-1 w-full rounded-md border border-border bg-card px-3 py-2 text-sm",placeholder:"What needs to get done?",value:d,onChange:(b)=>t(b.target.value),required:!0})]})}),h("div",{children:g("label",{className:"font-semibold text-muted-foreground text-xs uppercase",children:["Description",h("textarea",{className:"mt-1 w-full rounded-md border border-border bg-card px-3 py-2 text-sm",rows:3,placeholder:"Add context or policy notes",value:l,onChange:(b)=>u(b.target.value)})]})}),g("div",{className:"grid gap-3 md:grid-cols-3",children:[g("label",{className:"font-semibold text-muted-foreground text-xs uppercase",children:["Priority",g("select",{className:"mt-1 w-full rounded-md border border-border bg-card px-3 py-2 text-sm",value:e,onChange:(b)=>y(b.target.value),children:[h("option",{value:"LOW",children:"Low"}),h("option",{value:"MEDIUM",children:"Medium"}),h("option",{value:"HIGH",children:"High"}),h("option",{value:"URGENT",children:"Urgent"})]})]}),g("label",{className:"font-semibold text-muted-foreground text-xs uppercase",children:["Category",g("select",{className:"mt-1 w-full rounded-md border border-border bg-card px-3 py-2 text-sm",value:N,onChange:(b)=>p(b.target.value),children:[h("option",{value:"none",children:"None"}),o.map((b)=>h("option",{value:b.id,children:b.name},b.id))]})]}),g("label",{className:"font-semibold text-muted-foreground text-xs uppercase",children:["Tags",h("input",{className:"mt-1 w-full rounded-md border border-border bg-card px-3 py-2 text-sm",placeholder:"Comma separated (optional)",value:J,onChange:(b)=>C(b.target.value)})]})]}),h("button",{type:"submit",className:"btn-primary w-full py-2 font-semibold text-sm",disabled:f,children:f?"Saving...":"Add task"})]})}function Ao(o){return o.split(",").map((r)=>r.trim()).filter(Boolean)}import{Check as co,Circle as qo,Trash2 as vo}from"lucide-react";import{jsx as n,jsxs as X}from"react/jsx-runtime";function s({task:o,onToggle:r,onDelete:d}){let t=o.priority==="URGENT"?"text-red-200 bg-red-500/10 border-red-500/40":o.priority==="HIGH"?"text-amber-200 bg-amber-500/10 border-amber-500/40":o.priority==="LOW"?"text-emerald-200 bg-emerald-500/10 border-emerald-500/40":"text-violet-200 bg-violet-500/10 border-violet-500/40";return X("div",{className:"flex items-start gap-4 rounded-2xl border border-border/70 bg-card/60 p-4 transition hover:border-border",children:[n("button",{type:"button",className:"rounded-full border border-border p-2 text-muted-foreground hover:bg-muted/40","aria-pressed":o.completed,onClick:()=>r?.(o),children:o.completed?n(co,{className:"h-4 w-4 text-emerald-400"}):n(qo,{className:"h-4 w-4"})}),X("div",{className:"flex-1 space-y-2",children:[X("div",{className:"flex flex-wrap items-center gap-2",children:[n("p",{className:`font-medium ${o.completed?"text-muted-foreground line-through":"text-foreground"}`,children:o.title}),n("span",{className:`rounded-full border px-2 py-0.5 text-xs ${t}`,children:o.priority.charAt(0)+o.priority.slice(1).toLowerCase()}),o.category?n("span",{className:"rounded-full bg-muted/40 px-2 py-0.5 text-muted-foreground text-xs",children:o.category.name}):null,o.dueDate?X("span",{className:"text-muted-foreground text-xs",children:["Due ",new Date(o.dueDate).toLocaleDateString()]}):null]}),o.description?n("p",{className:"text-muted-foreground text-sm",children:o.description}):null,o.tags.length?n("div",{className:"flex flex-wrap gap-1",children:o.tags.map((l)=>X("span",{className:"rounded-full bg-muted/40 px-2 py-0.5 text-muted-foreground text-xs",children:["#",l]},l))}):null]}),n("button",{type:"button",className:"text-muted-foreground hover:text-destructive","aria-label":`Delete ${o.title}`,onClick:()=>d?.(o),children:n(vo,{className:"h-4 w-4"})})]})}import{gql as A}from"@apollo/client";import{useMutation as oo,useQuery as Qo}from"@apollo/client/react";import{registerTemplateComponents as _o,useTemplateRuntime as Ro}from"@contractspec/lib.example-shared-ui";import{useMemo as Mo,useState as xo}from"react";import{jsx as $,jsxs as Eo}from"react/jsx-runtime";var ro=A`
|
|
923
80
|
query Tasks($projectId: ID!) {
|
|
924
81
|
taskCategories(projectId: $projectId) {
|
|
925
82
|
id
|
|
@@ -941,126 +98,15 @@ var TASKS_QUERY = gql6`
|
|
|
941
98
|
}
|
|
942
99
|
}
|
|
943
100
|
}
|
|
944
|
-
|
|
945
|
-
var TOGGLE_TASK = gql6`
|
|
101
|
+
`,To=A`
|
|
946
102
|
mutation ToggleTask($id: ID!, $completed: Boolean!) {
|
|
947
103
|
toggleTask(id: $id, completed: $completed) {
|
|
948
104
|
id
|
|
949
105
|
completed
|
|
950
106
|
}
|
|
951
107
|
}
|
|
952
|
-
|
|
953
|
-
var DELETE_TASK = gql6`
|
|
108
|
+
`,ko=A`
|
|
954
109
|
mutation DeleteTask($id: ID!) {
|
|
955
110
|
deleteTask(id: $id)
|
|
956
111
|
}
|
|
957
|
-
`;
|
|
958
|
-
function TaskList() {
|
|
959
|
-
const { projectId } = useTemplateRuntime6();
|
|
960
|
-
const [filters, setFilters] = useState5({
|
|
961
|
-
status: "all",
|
|
962
|
-
priority: "all",
|
|
963
|
-
categoryId: "all",
|
|
964
|
-
search: ""
|
|
965
|
-
});
|
|
966
|
-
const { data, loading } = useQuery4(TASKS_QUERY, {
|
|
967
|
-
variables: { projectId },
|
|
968
|
-
fetchPolicy: "cache-and-network"
|
|
969
|
-
});
|
|
970
|
-
const [toggleTask] = useMutation5(TOGGLE_TASK);
|
|
971
|
-
const [deleteTask] = useMutation5(DELETE_TASK);
|
|
972
|
-
const categories = data?.taskCategories ?? [];
|
|
973
|
-
const tasks = data?.tasks ?? [];
|
|
974
|
-
const filtered = useMemo2(() => {
|
|
975
|
-
return tasks.filter((task) => {
|
|
976
|
-
if (filters.status === "active" && task.completed)
|
|
977
|
-
return false;
|
|
978
|
-
if (filters.status === "completed" && !task.completed)
|
|
979
|
-
return false;
|
|
980
|
-
if (filters.priority !== "all" && task.priority !== filters.priority)
|
|
981
|
-
return false;
|
|
982
|
-
if (filters.categoryId !== "all" && task.category?.id !== filters.categoryId)
|
|
983
|
-
return false;
|
|
984
|
-
if (filters.search && !task.title.toLowerCase().includes(filters.search.toLowerCase()))
|
|
985
|
-
return false;
|
|
986
|
-
return true;
|
|
987
|
-
});
|
|
988
|
-
}, [tasks, filters]);
|
|
989
|
-
const handleToggle = async (task) => {
|
|
990
|
-
await toggleTask({
|
|
991
|
-
variables: { id: task.id, completed: !task.completed },
|
|
992
|
-
optimisticResponse: {
|
|
993
|
-
toggleTask: {
|
|
994
|
-
__typename: "Task",
|
|
995
|
-
id: task.id,
|
|
996
|
-
completed: !task.completed
|
|
997
|
-
}
|
|
998
|
-
},
|
|
999
|
-
update(cache) {
|
|
1000
|
-
cache.modify({
|
|
1001
|
-
fields: {
|
|
1002
|
-
tasks(existing = []) {
|
|
1003
|
-
return existing.map((ref) => ref.__ref?.endsWith(task.id) ? { ...ref, completed: !task.completed } : ref);
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
|
-
});
|
|
1007
|
-
}
|
|
1008
|
-
});
|
|
1009
|
-
};
|
|
1010
|
-
const handleDelete = async (task) => {
|
|
1011
|
-
await deleteTask({
|
|
1012
|
-
variables: { id: task.id },
|
|
1013
|
-
refetchQueries: [{ query: TASKS_QUERY, variables: { projectId } }]
|
|
1014
|
-
});
|
|
1015
|
-
};
|
|
1016
|
-
return /* @__PURE__ */ jsxs11("div", {
|
|
1017
|
-
className: "space-y-6",
|
|
1018
|
-
children: [
|
|
1019
|
-
/* @__PURE__ */ jsx12(FilterBar, {
|
|
1020
|
-
value: filters,
|
|
1021
|
-
onChange: setFilters,
|
|
1022
|
-
categories
|
|
1023
|
-
}),
|
|
1024
|
-
/* @__PURE__ */ jsx12(TaskForm, {
|
|
1025
|
-
categories
|
|
1026
|
-
}),
|
|
1027
|
-
loading ? /* @__PURE__ */ jsx12("p", {
|
|
1028
|
-
className: "text-muted-foreground text-sm",
|
|
1029
|
-
children: "Loading tasks…"
|
|
1030
|
-
}) : filtered.length ? /* @__PURE__ */ jsx12("div", {
|
|
1031
|
-
className: "space-y-3",
|
|
1032
|
-
children: filtered.map((task) => /* @__PURE__ */ jsx12(TaskItem, {
|
|
1033
|
-
task,
|
|
1034
|
-
onToggle: handleToggle,
|
|
1035
|
-
onDelete: handleDelete
|
|
1036
|
-
}, task.id))
|
|
1037
|
-
}) : /* @__PURE__ */ jsx12("div", {
|
|
1038
|
-
className: "rounded-2xl border border-border border-dashed p-8 text-center",
|
|
1039
|
-
children: /* @__PURE__ */ jsx12("p", {
|
|
1040
|
-
className: "text-muted-foreground",
|
|
1041
|
-
children: "No tasks match your filters. Create one above."
|
|
1042
|
-
})
|
|
1043
|
-
})
|
|
1044
|
-
]
|
|
1045
|
-
});
|
|
1046
|
-
}
|
|
1047
|
-
registerTemplateComponents3("todos-app", {
|
|
1048
|
-
list: TaskList,
|
|
1049
|
-
detail: TaskList,
|
|
1050
|
-
form: TaskForm
|
|
1051
|
-
});
|
|
1052
|
-
export {
|
|
1053
|
-
TaskList,
|
|
1054
|
-
TaskItem,
|
|
1055
|
-
TaskForm,
|
|
1056
|
-
RecipeList,
|
|
1057
|
-
RecipeDetail,
|
|
1058
|
-
RecipeCard,
|
|
1059
|
-
MessagingWorkspace,
|
|
1060
|
-
MessageThread,
|
|
1061
|
-
MessageComposer,
|
|
1062
|
-
MESSAGES_QUERY,
|
|
1063
|
-
LanguageSwitcher,
|
|
1064
|
-
FilterBar,
|
|
1065
|
-
ConversationList
|
|
1066
|
-
};
|
|
112
|
+
`;function lo(){let{projectId:o}=Ro(),[r,d]=xo({status:"all",priority:"all",categoryId:"all",search:""}),{data:t,loading:l}=Qo(ro,{variables:{projectId:o},fetchPolicy:"cache-and-network"}),[u]=oo(To),[e]=oo(ko),y=t?.taskCategories??[],N=t?.tasks??[],p=Mo(()=>{return N.filter((m)=>{if(r.status==="active"&&m.completed)return!1;if(r.status==="completed"&&!m.completed)return!1;if(r.priority!=="all"&&m.priority!==r.priority)return!1;if(r.categoryId!=="all"&&m.category?.id!==r.categoryId)return!1;if(r.search&&!m.title.toLowerCase().includes(r.search.toLowerCase()))return!1;return!0})},[N,r]),J=async(m)=>{await u({variables:{id:m.id,completed:!m.completed},optimisticResponse:{toggleTask:{__typename:"Task",id:m.id,completed:!m.completed}},update(f){f.modify({fields:{tasks(c=[]){return c.map((b)=>b.__ref?.endsWith(m.id)?{...b,completed:!m.completed}:b)}}})}})},C=async(m)=>{await e({variables:{id:m.id},refetchQueries:[{query:ro,variables:{projectId:o}}]})};return Eo("div",{className:"space-y-6",children:[$(j,{value:r,onChange:d,categories:y}),$(Y,{categories:y}),l?$("p",{className:"text-muted-foreground text-sm",children:"Loading tasks…"}):p.length?$("div",{className:"space-y-3",children:p.map((m)=>$(s,{task:m,onToggle:J,onDelete:C},m.id))}):$("div",{className:"rounded-2xl border border-border border-dashed p-8 text-center",children:$("p",{className:"text-muted-foreground",children:"No tasks match your filters. Create one above."})})]})}_o("todos-app",{list:lo,detail:lo,form:Y});export{lo as TaskList,s as TaskItem,Y as TaskForm,Oo as RecipeList,K as RecipeDetail,E as RecipeCard,Bo as MessagingWorkspace,G as MessageThread,O as MessageComposer,Z as MESSAGES_QUERY,k as LanguageSwitcher,j as FilterBar,q as ConversationList};
|