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