spine-framework 0.4.4 → 0.5.0-rc.5
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/.env.example +13 -3
- package/.framework/cli/commands/bootstrap.ts +392 -0
- package/.framework/cli/commands/dev.ts +91 -218
- package/.framework/cli/commands/doctor.ts +132 -26
- package/.framework/cli/commands/generate.ts +38 -298
- package/.framework/cli/commands/init.ts +20 -1
- package/.framework/cli/commands/install-app.ts +183 -13
- package/.framework/cli/commands/migrate.ts +36 -30
- package/.framework/cli/commands/migrations.ts +16 -56
- package/.framework/cli/commands/upgrade.ts +35 -0
- package/.framework/cli/commands/validate-app.ts +127 -1
- package/.framework/cli/commands/validate-schema.ts +147 -0
- package/.framework/cli/context.ts +223 -110
- package/.framework/cli/index.ts +6 -0
- package/.framework/cli/lib/project-files.ts +241 -1
- package/.framework/functions/_shared/app-manifest.ts +2 -0
- package/.framework/functions/_shared/hash-api-key.ts +183 -79
- package/.framework/functions/_shared/logging.ts +562 -224
- package/.framework/functions/_shared/middleware.ts +47 -44
- package/.framework/functions/_shared/permissions.ts +4 -0
- package/.framework/functions/admin-data.ts +51 -28
- package/.framework/functions/ai-agents.ts +10 -6
- package/.framework/functions/api-keys.ts +301 -122
- package/.framework/functions/apps.ts +63 -29
- package/.framework/functions/cil-ingest.ts +48 -15
- package/.framework/functions/debug-auth.ts +14 -8
- package/.framework/functions/deliveries.ts +39 -12
- package/.framework/functions/embeddings.ts +149 -78
- package/.framework/functions/integration-outbound.ts +67 -27
- package/.framework/functions/integrations.ts +254 -127
- package/.framework/functions/logs.ts +273 -133
- package/.framework/functions/observability.ts +278 -148
- package/.framework/functions/pipeline-executions.ts +1 -1
- package/.framework/functions/pipelines.ts +14 -9
- package/.framework/functions/prompt-configs.ts +7 -4
- package/.framework/functions/roles.ts +8 -5
- package/.framework/functions/security.ts +30 -17
- package/.framework/functions/system-cron.ts +240 -127
- package/.framework/functions/tests.ts +7 -6
- package/.framework/functions/timers.ts +310 -107
- package/.framework/functions/triggers.ts +28 -13
- package/.framework/functions/types.ts +13 -10
- package/.framework/migrations/069_log_stats_window.sql +54 -0
- package/.framework/migrations/070_app_type_schema_rpcs.sql +166 -0
- package/.framework/migrations/071_timer_interval_keys.sql +96 -0
- package/.framework/migrations/072_slug_autofill.sql +77 -0
- package/.framework/migrations/073_seed_member_roles.sql +26 -0
- package/.framework/migrations/074_app_route_prefix_domains.sql +168 -0
- package/.framework/migrations/075_security_definer_grants.sql +157 -0
- package/.framework/src/apps/admin/index.tsx +1141 -775
- package/.framework/src/components/ErrorBoundary.tsx +136 -0
- package/.framework/src/components/admin/AdminListPage.tsx +81 -73
- package/.framework/src/components/admin/AdminSidebar.tsx +88 -79
- package/.framework/src/components/admin/EntitySelect.tsx +181 -0
- package/.framework/src/components/admin/PageInstructions.tsx +86 -127
- package/.framework/src/components/app-shell/GenericDetailPage.tsx +37 -13
- package/.framework/src/components/app-shell/GenericListPage.tsx +28 -32
- package/.framework/src/components/layout/Sidebar.tsx +300 -177
- package/.framework/src/components/runtime/DataDetailPage.tsx +67 -35
- package/.framework/src/components/runtime/DataHeader.tsx +96 -48
- package/.framework/src/components/runtime/DataListPage.tsx +3 -26
- package/.framework/src/components/runtime/DataStats.tsx +10 -10
- package/.framework/src/components/runtime/DataTable.tsx +12 -10
- package/.framework/src/components/ui/sheet.tsx +24 -26
- package/.framework/src/components/ui/textarea.tsx +74 -48
- package/.framework/src/contexts/AppContext.tsx +5 -12
- package/.framework/src/contexts/AuthContext.tsx +17 -9
- package/.framework/src/hooks/useApps.ts +18 -22
- package/.framework/src/hooks/useEntityList.ts +12 -9
- package/.framework/src/hooks/useListSchema.ts +108 -58
- package/.framework/src/instructions/README.md +74 -0
- package/.framework/src/instructions/accounts.md +97 -0
- package/.framework/src/instructions/ai-agents.md +69 -0
- package/.framework/src/instructions/alerts.md +80 -0
- package/.framework/src/instructions/api-keys.md +87 -0
- package/.framework/src/instructions/apps.md +77 -0
- package/.framework/src/instructions/concepts/ai-and-prompts.md +150 -0
- package/.framework/src/instructions/concepts/apps-and-renderers.md +228 -0
- package/.framework/src/instructions/concepts/auth-and-api-keys.md +133 -0
- package/.framework/src/instructions/concepts/automation.md +186 -0
- package/.framework/src/instructions/concepts/concurrency-and-idempotency.md +125 -0
- package/.framework/src/instructions/concepts/core-vs-custom.md +124 -0
- package/.framework/src/instructions/concepts/design-schema.md +152 -0
- package/.framework/src/instructions/concepts/integrations-and-webhooks.md +127 -0
- package/.framework/src/instructions/concepts/observability.md +116 -0
- package/.framework/src/instructions/concepts/permissions.md +150 -0
- package/.framework/src/instructions/concepts/runtime-records.md +111 -0
- package/.framework/src/instructions/concepts/scope-and-accounts.md +112 -0
- package/.framework/src/instructions/concepts/spine-way.md +172 -0
- package/.framework/src/instructions/deliveries.md +59 -0
- package/.framework/src/instructions/guide/00-orientation.md +106 -0
- package/.framework/src/instructions/guide/01-install-and-first-run.md +253 -0
- package/.framework/src/instructions/guide/02-project-map.md +147 -0
- package/.framework/src/instructions/guide/03-domain-model.md +223 -0
- package/.framework/src/instructions/guide/04-first-app.md +227 -0
- package/.framework/src/instructions/guide/05-glossary.md +183 -0
- package/.framework/src/instructions/integrations.md +96 -0
- package/.framework/src/instructions/internal/cil-markers.md +83 -0
- package/.framework/src/instructions/internal/docs-contract.md +158 -0
- package/.framework/src/instructions/invites.md +60 -0
- package/.framework/src/instructions/kb.md +80 -0
- package/.framework/src/instructions/logs.md +77 -0
- package/.framework/src/instructions/notifications.md +77 -0
- package/.framework/src/instructions/observability.md +61 -0
- package/.framework/src/instructions/operations/deployment.md +115 -0
- package/.framework/src/instructions/operations/migrations.md +125 -0
- package/.framework/src/instructions/operations/security-checklist.md +170 -0
- package/.framework/src/instructions/operations/troubleshooting.md +170 -0
- package/.framework/src/instructions/operations/upgrade.md +116 -0
- package/.framework/src/instructions/people.md +91 -0
- package/.framework/src/instructions/pipeline-executions.md +62 -0
- package/.framework/src/instructions/pipelines.md +78 -0
- package/.framework/src/instructions/prompts.md +95 -0
- package/.framework/src/instructions/reference/api/admin-data.md +162 -0
- package/.framework/src/instructions/reference/api/auth.md +113 -0
- package/.framework/src/instructions/reference/api/errors-and-envelopes.md +113 -0
- package/.framework/src/instructions/reference/app-manifest.md +184 -0
- package/.framework/src/instructions/reference/cli.md +124 -0
- package/.framework/src/instructions/reference/database.md +132 -0
- package/.framework/src/instructions/reference/design-schema.md +280 -0
- package/.framework/src/instructions/reference/env-vars.md +133 -0
- package/.framework/src/instructions/reference/frontend-sdk.md +207 -0
- package/.framework/src/instructions/reference/functions/account-nodes.md +75 -0
- package/.framework/src/instructions/reference/functions/admin-data.md +197 -0
- package/.framework/src/instructions/reference/functions/admin-funnel.md +90 -0
- package/.framework/src/instructions/reference/functions/admin-install-funnel.md +107 -0
- package/.framework/src/instructions/reference/functions/admin-signals.md +102 -0
- package/.framework/src/instructions/reference/functions/ai-agents.md +148 -0
- package/.framework/src/instructions/reference/functions/ai-interactions.md +156 -0
- package/.framework/src/instructions/reference/functions/api-keys.md +130 -0
- package/.framework/src/instructions/reference/functions/apps.md +140 -0
- package/.framework/src/instructions/reference/functions/auth.md +99 -0
- package/.framework/src/instructions/reference/functions/debug-auth.md +91 -0
- package/.framework/src/instructions/reference/functions/deliveries.md +110 -0
- package/.framework/src/instructions/reference/functions/embeddings.md +166 -0
- package/.framework/src/instructions/reference/functions/eval-harness.md +149 -0
- package/.framework/src/instructions/reference/functions/index.md +103 -0
- package/.framework/src/instructions/reference/functions/integration-outbound.md +200 -0
- package/.framework/src/instructions/reference/functions/integration-routes.md +151 -0
- package/.framework/src/instructions/reference/functions/integrations.md +130 -0
- package/.framework/src/instructions/reference/functions/invites.md +182 -0
- package/.framework/src/instructions/reference/functions/item-progress.md +107 -0
- package/.framework/src/instructions/reference/functions/kb.md +166 -0
- package/.framework/src/instructions/reference/functions/logs.md +141 -0
- package/.framework/src/instructions/reference/functions/observability.md +105 -0
- package/.framework/src/instructions/reference/functions/pipeline-executions.md +132 -0
- package/.framework/src/instructions/reference/functions/pipeline-runner-background.md +121 -0
- package/.framework/src/instructions/reference/functions/pipelines.md +136 -0
- package/.framework/src/instructions/reference/functions/prompt-configs.md +121 -0
- package/.framework/src/instructions/reference/functions/roles.md +121 -0
- package/.framework/src/instructions/reference/functions/security.md +140 -0
- package/.framework/src/instructions/reference/functions/system-cron.md +136 -0
- package/.framework/src/instructions/reference/functions/system.md +106 -0
- package/.framework/src/instructions/reference/functions/tests.md +97 -0
- package/.framework/src/instructions/reference/functions/timers.md +117 -0
- package/.framework/src/instructions/reference/functions/trigger-scheduler.md +102 -0
- package/.framework/src/instructions/reference/functions/triggers.md +140 -0
- package/.framework/src/instructions/reference/functions/types.md +146 -0
- package/.framework/src/instructions/reference/seeds.md +126 -0
- package/.framework/src/instructions/reference/shared-modules.md +127 -0
- package/.framework/src/instructions/reference/spine-config.md +114 -0
- package/.framework/src/instructions/roles.md +80 -0
- package/.framework/src/instructions/runtime-collaboration.md +106 -0
- package/.framework/src/instructions/runtime-detail.md +70 -0
- package/.framework/src/instructions/runtime-list.md +77 -0
- package/.framework/src/instructions/security.md +67 -0
- package/.framework/src/instructions/tasks/add-a-pipeline.md +110 -0
- package/.framework/src/instructions/tasks/add-a-role.md +96 -0
- package/.framework/src/instructions/tasks/add-a-timer.md +114 -0
- package/.framework/src/instructions/tasks/add-a-trigger.md +106 -0
- package/.framework/src/instructions/tasks/add-a-type.md +151 -0
- package/.framework/src/instructions/tasks/add-a-webhook.md +108 -0
- package/.framework/src/instructions/tasks/add-an-ai-agent.md +108 -0
- package/.framework/src/instructions/tasks/add-an-integration.md +124 -0
- package/.framework/src/instructions/tasks/build-a-custom-page.md +118 -0
- package/.framework/src/instructions/tasks/document-your-app.md +117 -0
- package/.framework/src/instructions/tasks/package-and-install-an-app.md +136 -0
- package/.framework/src/instructions/tasks/register-an-app.md +137 -0
- package/.framework/src/instructions/tasks/test-your-code.md +108 -0
- package/.framework/src/instructions/tasks/write-a-function.md +132 -0
- package/.framework/src/instructions/tasks/write-a-migration.md +110 -0
- package/.framework/src/instructions/testing.md +59 -0
- package/.framework/src/instructions/timers.md +84 -0
- package/.framework/src/instructions/triggers.md +69 -0
- package/.framework/src/instructions/types.md +93 -0
- package/.framework/src/lib/app-mount.ts +88 -0
- package/.framework/src/pages/NotFoundPage.tsx +62 -31
- package/.framework/src/pages/admin/AIAgentDetailPage.tsx +117 -106
- package/.framework/src/pages/admin/AIAgentsPage.tsx +86 -48
- package/.framework/src/pages/admin/APIKeyDetailPage.tsx +153 -152
- package/.framework/src/pages/admin/APIKeysPage.tsx +91 -90
- package/.framework/src/pages/admin/AlertsConfigPage.tsx +29 -18
- package/.framework/src/pages/admin/AppDetailPage.tsx +6 -60
- package/.framework/src/pages/admin/AppsPage.tsx +104 -66
- package/.framework/src/pages/admin/DeliveriesPage.tsx +5 -5
- package/.framework/src/pages/admin/EmbeddingDetailPage.tsx +5 -23
- package/.framework/src/pages/admin/EmbeddingsPage.tsx +5 -26
- package/.framework/src/pages/admin/IntegrationDetailPage.tsx +7 -7
- package/.framework/src/pages/admin/IntegrationsPage.tsx +85 -43
- package/.framework/src/pages/admin/LogsPage.tsx +144 -76
- package/.framework/src/pages/admin/ObservabilityDashboard.tsx +223 -140
- package/.framework/src/pages/admin/PipelineDetailPage.tsx +134 -113
- package/.framework/src/pages/admin/PipelineExecutionsPage.tsx +108 -45
- package/.framework/src/pages/admin/PipelinesPage.tsx +160 -115
- package/.framework/src/pages/admin/PromptConfigDetailPage.tsx +96 -98
- package/.framework/src/pages/admin/PromptConfigsPage.tsx +101 -59
- package/.framework/src/pages/admin/RoleDetailPage.tsx +90 -79
- package/.framework/src/pages/admin/RolesPage.tsx +86 -43
- package/.framework/src/pages/admin/SecurityPage.tsx +1 -1
- package/.framework/src/pages/admin/TestingDashboard.tsx +16 -28
- package/.framework/src/pages/admin/TimerDetailPage.tsx +117 -100
- package/.framework/src/pages/admin/TimersPage.tsx +90 -62
- package/.framework/src/pages/admin/TriggerDetailPage.tsx +90 -83
- package/.framework/src/pages/admin/TriggersPage.tsx +124 -99
- package/.framework/src/pages/admin/TypeDetailPage.tsx +152 -138
- package/.framework/src/pages/admin/TypesPage.tsx +90 -48
- package/.framework/src/pages/admin/cil/CILAgentPage.tsx +17 -25
- package/.framework/src/pages/admin/cil/CILChunkDetailPage.tsx +17 -27
- package/.framework/src/pages/admin/cil/CILDashboardPage.tsx +72 -40
- package/.framework/src/pages/admin/cil/CILFileListPage.tsx +321 -129
- package/.framework/src/pages/admin/cil/CILFileSelectPage.tsx +18 -29
- package/.framework/src/pages/admin/cil/CILGraphPage.tsx +26 -38
- package/.framework/src/pages/admin/cil/CILIngestionPage.tsx +34 -46
- package/.framework/src/pages/admin/cil/CILProjectsPage.tsx +189 -103
- package/.framework/src/pages/admin/cil/CILSearchPage.tsx +246 -136
- package/.framework/src/pages/admin/cil/CILSuggestionsPage.tsx +11 -22
- package/.framework/src/pages/admin/cil/CILVersionsPage.tsx +9 -20
- package/.framework/src/pages/admin/cil/FlexiblePipelinePage.tsx +26 -38
- package/.framework/src/pages/admin/kb/KBAdminPage.tsx +7 -26
- package/.framework/src/pages/auth/LoginPage.tsx +3 -2
- package/.framework/src/pages/auth/RegisterPage.tsx +16 -8
- package/.framework/templates/agent/AGENTS.md +167 -0
- package/.framework/templates/agent/skills/spine-add-ai-agent/SKILL.md +58 -0
- package/.framework/templates/agent/skills/spine-add-automation/SKILL.md +62 -0
- package/.framework/templates/agent/skills/spine-add-integration/SKILL.md +63 -0
- package/.framework/templates/agent/skills/spine-architect/SKILL.md +86 -0
- package/.framework/templates/agent/skills/spine-install-app/SKILL.md +79 -0
- package/.framework/templates/agent/skills/spine-migration/SKILL.md +75 -0
- package/.framework/templates/agent/skills/spine-new-app/SKILL.md +79 -0
- package/.framework/templates/agent/skills/spine-new-function/SKILL.md +71 -0
- package/.framework/templates/agent/skills/spine-new-type/SKILL.md +72 -0
- package/.framework/templates/agent/skills/spine-schema/SKILL.md +77 -0
- package/.framework/templates/agent/skills/spine-test/SKILL.md +67 -0
- package/.framework/templates/agent/skills/spine-troubleshoot/SKILL.md +74 -0
- package/.framework/templates/agent/skills/spine-upgrade/SKILL.md +69 -0
- package/.framework/templates/project.json +4 -1
- package/.framework/tests/unit/account-scoping-gates.test.ts +394 -0
- package/.framework/tests/unit/agent-files.test.ts +355 -0
- package/.framework/tests/unit/agent-runner.test.ts +479 -44
- package/.framework/tests/unit/api-keys-create-scope-gate.test.ts +160 -0
- package/.framework/tests/unit/api-keys-omit-secret-fields.test.ts +38 -0
- package/.framework/tests/unit/app-mount.test.ts +80 -0
- package/.framework/tests/unit/bootstrap.test.ts +242 -0
- package/.framework/tests/unit/cli-context-api-key.test.ts +114 -0
- package/.framework/tests/unit/debug-auth.test.ts +38 -0
- package/.framework/tests/unit/deliveries-account-scoping.test.ts +185 -0
- package/.framework/tests/unit/integration-outbound-credentials.test.ts +167 -0
- package/.framework/tests/unit/integrations-audit-redaction.test.ts +130 -0
- package/.framework/tests/unit/logging-app-id.test.ts +75 -0
- package/.framework/tests/unit/security-definer-grants.test.ts +154 -0
- package/.framework/tests/unit/system-context-denial.test.ts +145 -0
- package/.framework/tests/unit/system-cron.test.ts +240 -0
- package/.framework/tests/unit/timers.test.ts +159 -0
- package/README.md +125 -166
- package/config/tsconfig.cli.json +2 -2
- package/package.json +15 -4
- package/templates/project/package-lock.json +2 -2
- package/.framework/docs/admin-routes.md +0 -76
- package/.framework/docs/api-docs-progress.md +0 -38
- package/.framework/docs/api-governance.md +0 -146
- package/.framework/docs/api-testing-results.md +0 -212
- package/.framework/docs/assembly-launch-guide.md +0 -138
- package/.framework/docs/audit-results.md +0 -590
- package/.framework/docs/db-api-inventory.md +0 -95
- package/.framework/docs/gap-remediation-backlog.md +0 -103
- package/.framework/docs/ui-adoption-verification.md +0 -111
- package/.framework/docs/ui-api-coverage.md +0 -84
- package/.framework/docs/v2-compatibility-audit.md +0 -228
- package/.framework/mcp/index.ts +0 -133
- package/.framework/mcp/load-env.ts +0 -60
- package/.framework/mcp/shared/app-manifest.ts +0 -275
- package/.framework/mcp/shared/db.ts +0 -477
- package/.framework/mcp/shared/kb.ts +0 -118
- package/.framework/mcp/tools/architect.ts +0 -431
- package/.framework/mcp/tools/cil/context.ts +0 -345
- package/.framework/mcp/tools/cil/graph.ts +0 -242
- package/.framework/mcp/tools/cil/ingest.ts +0 -1217
- package/.framework/mcp/tools/cil/pipeline-orchestrator.ts +0 -693
- package/.framework/mcp/tools/cil/pipeline.ts +0 -767
- package/.framework/mcp/tools/cil/project.ts +0 -791
- package/.framework/mcp/tools/cil/retrieval.ts +0 -336
- package/.framework/mcp/tools/cil/search-core.ts +0 -454
- package/.framework/mcp/tools/cil/search.ts +0 -97
- package/.framework/mcp/tools/cil/suggest.ts +0 -186
- package/.framework/mcp/tools/cil/validate.ts +0 -1369
- package/.framework/mcp/tools/kb/delete.ts +0 -139
- package/.framework/mcp/tools/kb/index.ts +0 -52
- package/.framework/mcp/tools/kb/ingest.ts +0 -84
- package/.framework/mcp/tools/kb/list-types.ts +0 -102
- package/.framework/mcp/tools/kb/publish.ts +0 -100
- package/.framework/mcp/tools/kb/reindex.ts +0 -86
- package/.framework/mcp/tools/kb/revoke.ts +0 -85
- package/.framework/mcp/tools/kb/search.ts +0 -101
- package/.framework/mcp/tools/kb/upsert.ts +0 -125
- package/.framework/mcp/tools/observability.ts +0 -510
|
@@ -26,15 +26,14 @@ import { Dialog as SheetPrimitive } from "radix-ui"
|
|
|
26
26
|
import { cn } from "@/lib/utils"
|
|
27
27
|
import { Button } from "@/components/ui/button"
|
|
28
28
|
import { XIcon } from "lucide-react"
|
|
29
|
+
// CIL[END stable_id="~/.framework/src/components/ui/sheet.tsx:module_header:module_header"]
|
|
29
30
|
// CIL[DOC-VECTOR type="context" content="purpose='shadcn/ui Sheet component module built on Radix UI Dialog primitives'; No verified external callers; imports: .framework/src/lib/utils.ts,.framework/src/components/ui/button.tsx"]
|
|
30
31
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
31
32
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
32
33
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
33
34
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
34
35
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
35
|
-
// CIL[END stable_id="~/.framework/src/components/ui/sheet.tsx:module_header:module_header"]
|
|
36
36
|
|
|
37
|
-
// CIL[BEGIN stable_id="~/.framework/src/components/ui/sheet.tsx:Sheet:component" type="component" identity="Sheet" parent="~/.framework/src/components/ui/sheet.tsx"]
|
|
38
37
|
// CIL[DOC-MACRO purpose="Renders a styled Radix Sheet root wrapper"]
|
|
39
38
|
// CIL[DOC-RESPONSIBILITY responsibility="Renders the sheet root wrapper that controls the dialog open state"]
|
|
40
39
|
// CIL[DOC-CONTEXT module="components/ui" layer="ui" related_files=".framework/src/components/ui/button.tsx,.framework/src/components/ui/sheet.tsx,.framework/src/lib/utils.ts"]
|
|
@@ -42,18 +41,18 @@ import { XIcon } from "lucide-react"
|
|
|
42
41
|
// CIL[DOC-MICRO logic_summary="Spreads props onto SheetPrimitive.Root with a data-slot attribute for styling hooks" notable_decisions="Uses React.ComponentProps to inherit the Radix Dialog root prop types"]
|
|
43
42
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
44
43
|
// CIL[DOC-STABILITY stability="stable"]
|
|
44
|
+
// CIL[BEGIN stable_id="~/.framework/src/components/ui/sheet.tsx:Sheet:component" type="component" identity="Sheet" parent="~/.framework/src/components/ui/sheet.tsx"]
|
|
45
45
|
function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {
|
|
46
46
|
return <SheetPrimitive.Root data-slot="sheet" {...props} />
|
|
47
47
|
}
|
|
48
|
+
// CIL[END stable_id="~/.framework/src/components/ui/sheet.tsx:Sheet:component"]
|
|
48
49
|
// CIL[DOC-VECTOR type="context" content="purpose='Renders a styled Radix Sheet root wrapper'; No verified external callers; imports: .framework/src/lib/utils.ts,.framework/src/components/ui/button.tsx"]
|
|
49
50
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
50
51
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
51
52
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
52
53
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
53
54
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
54
|
-
// CIL[END stable_id="~/.framework/src/components/ui/sheet.tsx:Sheet:component"]
|
|
55
55
|
|
|
56
|
-
// CIL[BEGIN stable_id="~/.framework/src/components/ui/sheet.tsx:SheetTrigger:component" type="component" identity="SheetTrigger" parent="~/.framework/src/components/ui/sheet.tsx"]
|
|
57
56
|
// CIL[DOC-MACRO purpose="Renders the trigger that opens the sheet"]
|
|
58
57
|
// CIL[DOC-RESPONSIBILITY responsibility="Renders the trigger element that opens the sheet"]
|
|
59
58
|
// CIL[DOC-CONTEXT module="components/ui" layer="ui" related_files=".framework/src/components/ui/button.tsx,.framework/src/components/ui/sheet.tsx,.framework/src/lib/utils.ts"]
|
|
@@ -61,20 +60,20 @@ function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {
|
|
|
61
60
|
// CIL[DOC-MICRO logic_summary="Spreads props onto SheetPrimitive.Trigger with a data-slot attribute for styling hooks" notable_decisions="[]"]
|
|
62
61
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
63
62
|
// CIL[DOC-STABILITY stability="stable"]
|
|
63
|
+
// CIL[BEGIN stable_id="~/.framework/src/components/ui/sheet.tsx:SheetTrigger:component" type="component" identity="SheetTrigger" parent="~/.framework/src/components/ui/sheet.tsx"]
|
|
64
64
|
function SheetTrigger({
|
|
65
65
|
...props
|
|
66
66
|
}: React.ComponentProps<typeof SheetPrimitive.Trigger>) {
|
|
67
67
|
return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />
|
|
68
68
|
}
|
|
69
|
+
// CIL[END stable_id="~/.framework/src/components/ui/sheet.tsx:SheetTrigger:component"]
|
|
69
70
|
// CIL[DOC-VECTOR type="context" content="purpose='Renders the trigger that opens the sheet'; No verified external callers; imports: .framework/src/lib/utils.ts,.framework/src/components/ui/button.tsx"]
|
|
70
71
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
71
72
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
72
73
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
73
74
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
74
75
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
75
|
-
// CIL[END stable_id="~/.framework/src/components/ui/sheet.tsx:SheetTrigger:component"]
|
|
76
76
|
|
|
77
|
-
// CIL[BEGIN stable_id="~/.framework/src/components/ui/sheet.tsx:SheetClose:component" type="component" identity="SheetClose" parent="~/.framework/src/components/ui/sheet.tsx"]
|
|
78
77
|
// CIL[DOC-MACRO purpose="Renders the close button that dismisses the sheet"]
|
|
79
78
|
// CIL[DOC-RESPONSIBILITY responsibility="Renders the close button that dismisses the sheet"]
|
|
80
79
|
// CIL[DOC-CONTEXT module="components/ui" layer="ui" related_files=".framework/src/components/ui/button.tsx,.framework/src/components/ui/sheet.tsx,.framework/src/lib/utils.ts"]
|
|
@@ -82,20 +81,20 @@ function SheetTrigger({
|
|
|
82
81
|
// CIL[DOC-MICRO logic_summary="Spreads props onto SheetPrimitive.Close with a data-slot attribute for styling hooks" notable_decisions="[]"]
|
|
83
82
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
84
83
|
// CIL[DOC-STABILITY stability="stable"]
|
|
84
|
+
// CIL[BEGIN stable_id="~/.framework/src/components/ui/sheet.tsx:SheetClose:component" type="component" identity="SheetClose" parent="~/.framework/src/components/ui/sheet.tsx"]
|
|
85
85
|
function SheetClose({
|
|
86
86
|
...props
|
|
87
87
|
}: React.ComponentProps<typeof SheetPrimitive.Close>) {
|
|
88
88
|
return <SheetPrimitive.Close data-slot="sheet-close" {...props} />
|
|
89
89
|
}
|
|
90
|
+
// CIL[END stable_id="~/.framework/src/components/ui/sheet.tsx:SheetClose:component"]
|
|
90
91
|
// CIL[DOC-VECTOR type="context" content="purpose='Renders the close button that dismisses the sheet'; No verified external callers; imports: .framework/src/lib/utils.ts,.framework/src/components/ui/button.tsx"]
|
|
91
92
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
92
93
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
93
94
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
94
95
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
95
96
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
96
|
-
// CIL[END stable_id="~/.framework/src/components/ui/sheet.tsx:SheetClose:component"]
|
|
97
97
|
|
|
98
|
-
// CIL[BEGIN stable_id="~/.framework/src/components/ui/sheet.tsx:SheetPortal:component" type="component" identity="SheetPortal" parent="~/.framework/src/components/ui/sheet.tsx"]
|
|
99
98
|
// CIL[DOC-MACRO purpose="Renders the portal that mounts sheet content in the document body"]
|
|
100
99
|
// CIL[DOC-RESPONSIBILITY responsibility="Renders the portal that mounts sheet content in the document body"]
|
|
101
100
|
// CIL[DOC-CONTEXT module="components/ui" layer="ui" related_files=".framework/src/components/ui/button.tsx,.framework/src/components/ui/sheet.tsx,.framework/src/lib/utils.ts"]
|
|
@@ -103,20 +102,20 @@ function SheetClose({
|
|
|
103
102
|
// CIL[DOC-MICRO logic_summary="Spreads props onto SheetPrimitive.Portal with a data-slot attribute for styling hooks" notable_decisions="[]"]
|
|
104
103
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
105
104
|
// CIL[DOC-STABILITY stability="stable"]
|
|
105
|
+
// CIL[BEGIN stable_id="~/.framework/src/components/ui/sheet.tsx:SheetPortal:component" type="component" identity="SheetPortal" parent="~/.framework/src/components/ui/sheet.tsx"]
|
|
106
106
|
function SheetPortal({
|
|
107
107
|
...props
|
|
108
108
|
}: React.ComponentProps<typeof SheetPrimitive.Portal>) {
|
|
109
109
|
return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />
|
|
110
110
|
}
|
|
111
|
+
// CIL[END stable_id="~/.framework/src/components/ui/sheet.tsx:SheetPortal:component"]
|
|
111
112
|
// CIL[DOC-VECTOR type="context" content="purpose='Renders the portal that mounts sheet content in the document body'; No verified external callers; imports: .framework/src/lib/utils.ts,.framework/src/components/ui/button.tsx"]
|
|
112
113
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
113
114
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
114
115
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
115
116
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
116
117
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
117
|
-
// CIL[END stable_id="~/.framework/src/components/ui/sheet.tsx:SheetPortal:component"]
|
|
118
118
|
|
|
119
|
-
// CIL[BEGIN stable_id="~/.framework/src/components/ui/sheet.tsx:SheetOverlay:component" type="component" identity="SheetOverlay" parent="~/.framework/src/components/ui/sheet.tsx"]
|
|
120
119
|
// CIL[DOC-MACRO purpose="Renders the backdrop overlay behind the sheet"]
|
|
121
120
|
// CIL[DOC-RESPONSIBILITY responsibility="Renders the backdrop overlay behind the sheet"]
|
|
122
121
|
// CIL[DOC-CONTEXT module="components/ui" layer="ui" related_files=".framework/src/components/ui/button.tsx,.framework/src/components/ui/sheet.tsx,.framework/src/lib/utils.ts"]
|
|
@@ -124,6 +123,7 @@ function SheetPortal({
|
|
|
124
123
|
// CIL[DOC-MICRO logic_summary="Wraps SheetPrimitive.Overlay and applies a fixed black/80 backdrop with optional blur and open/close animations" notable_decisions="Uses cn to merge the provided className with Tailwind backdrop and animation utilities"]
|
|
125
124
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
126
125
|
// CIL[DOC-STABILITY stability="stable"]
|
|
126
|
+
// CIL[BEGIN stable_id="~/.framework/src/components/ui/sheet.tsx:SheetOverlay:component" type="component" identity="SheetOverlay" parent="~/.framework/src/components/ui/sheet.tsx"]
|
|
127
127
|
function SheetOverlay({
|
|
128
128
|
className,
|
|
129
129
|
...props
|
|
@@ -132,22 +132,21 @@ function SheetOverlay({
|
|
|
132
132
|
<SheetPrimitive.Overlay
|
|
133
133
|
data-slot="sheet-overlay"
|
|
134
134
|
className={cn(
|
|
135
|
-
"fixed inset-0 z-50 bg-black/80 duration-
|
|
135
|
+
"fixed inset-0 z-50 bg-black/80 duration-[250ms] supports-backdrop-filter:backdrop-blur-xs data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
136
136
|
className
|
|
137
137
|
)}
|
|
138
138
|
{...props}
|
|
139
139
|
/>
|
|
140
140
|
)
|
|
141
141
|
}
|
|
142
|
+
// CIL[END stable_id="~/.framework/src/components/ui/sheet.tsx:SheetOverlay:component"]
|
|
142
143
|
// CIL[DOC-VECTOR type="context" content="purpose='Renders the backdrop overlay behind the sheet'; No verified external callers; imports: .framework/src/lib/utils.ts,.framework/src/components/ui/button.tsx"]
|
|
143
144
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
144
145
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
145
146
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
146
147
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
147
148
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
148
|
-
// CIL[END stable_id="~/.framework/src/components/ui/sheet.tsx:SheetOverlay:component"]
|
|
149
149
|
|
|
150
|
-
// CIL[BEGIN stable_id="~/.framework/src/components/ui/sheet.tsx:SheetContent:component" type="component" identity="SheetContent" parent="~/.framework/src/components/ui/sheet.tsx"]
|
|
151
150
|
// CIL[DOC-MACRO purpose="Renders the main sheet panel with side positioning and an optional close button"]
|
|
152
151
|
// CIL[DOC-RESPONSIBILITY responsibility="Renders the main sheet panel with side positioning and an optional close button"]
|
|
153
152
|
// CIL[DOC-CONTEXT module="components/ui" layer="ui" related_files=".framework/src/components/ui/button.tsx,.framework/src/components/ui/sheet.tsx,.framework/src/lib/utils.ts"]
|
|
@@ -155,6 +154,7 @@ function SheetOverlay({
|
|
|
155
154
|
// CIL[DOC-MICRO logic_summary="Composes SheetPortal and SheetOverlay then renders SheetPrimitive.Content with side-aware Tailwind classes and an internal close button" notable_decisions="Defaults side to right and showCloseButton to true; uses data-side and data-open/data-closed attributes for animation hooks"]
|
|
156
155
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
157
156
|
// CIL[DOC-STABILITY stability="stable"]
|
|
157
|
+
// CIL[BEGIN stable_id="~/.framework/src/components/ui/sheet.tsx:SheetContent:component" type="component" identity="SheetContent" parent="~/.framework/src/components/ui/sheet.tsx"]
|
|
158
158
|
function SheetContent({
|
|
159
159
|
className,
|
|
160
160
|
children,
|
|
@@ -172,7 +172,7 @@ function SheetContent({
|
|
|
172
172
|
data-slot="sheet-content"
|
|
173
173
|
data-side={side}
|
|
174
174
|
className={cn(
|
|
175
|
-
"fixed z-50 flex flex-col bg-popover bg-clip-padding text-xs/relaxed text-popover-foreground shadow-lg transition duration-
|
|
175
|
+
"fixed z-50 flex flex-col bg-popover bg-clip-padding text-xs/relaxed text-popover-foreground shadow-lg transition duration-[250ms] ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[side=bottom]:data-[state=open]:slide-in-from-bottom-10 data-[side=left]:data-[state=open]:slide-in-from-left-10 data-[side=right]:data-[state=open]:slide-in-from-right-10 data-[side=top]:data-[state=open]:slide-in-from-top-10 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[side=bottom]:data-[state=closed]:slide-out-to-bottom-10 data-[side=left]:data-[state=closed]:slide-out-to-left-10 data-[side=right]:data-[state=closed]:slide-out-to-right-10 data-[side=top]:data-[state=closed]:slide-out-to-top-10",
|
|
176
176
|
className
|
|
177
177
|
)}
|
|
178
178
|
{...props}
|
|
@@ -195,15 +195,14 @@ function SheetContent({
|
|
|
195
195
|
</SheetPortal>
|
|
196
196
|
)
|
|
197
197
|
}
|
|
198
|
+
// CIL[END stable_id="~/.framework/src/components/ui/sheet.tsx:SheetContent:component"]
|
|
198
199
|
// CIL[DOC-VECTOR type="context" content="purpose='Renders the main sheet panel with side positioning and an optional close button'; No verified external callers; imports: .framework/src/lib/utils.ts,.framework/src/components/ui/button.tsx"]
|
|
199
200
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
200
201
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
201
202
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
202
203
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
203
204
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
204
|
-
// CIL[END stable_id="~/.framework/src/components/ui/sheet.tsx:SheetContent:component"]
|
|
205
205
|
|
|
206
|
-
// CIL[BEGIN stable_id="~/.framework/src/components/ui/sheet.tsx:SheetHeader:component" type="component" identity="SheetHeader" parent="~/.framework/src/components/ui/sheet.tsx"]
|
|
207
206
|
// CIL[DOC-MACRO purpose="Renders the header area of a sheet panel"]
|
|
208
207
|
// CIL[DOC-RESPONSIBILITY responsibility="Renders the header area of a sheet panel"]
|
|
209
208
|
// CIL[DOC-CONTEXT module="components/ui" layer="ui" related_files=".framework/src/components/ui/button.tsx,.framework/src/components/ui/sheet.tsx,.framework/src/lib/utils.ts"]
|
|
@@ -211,6 +210,7 @@ function SheetContent({
|
|
|
211
210
|
// CIL[DOC-MICRO logic_summary="Renders a div with the sheet-header data slot and vertical flex gap padding" notable_decisions="Merges an optional className with base layout classes via cn"]
|
|
212
211
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
213
212
|
// CIL[DOC-STABILITY stability="stable"]
|
|
213
|
+
// CIL[BEGIN stable_id="~/.framework/src/components/ui/sheet.tsx:SheetHeader:component" type="component" identity="SheetHeader" parent="~/.framework/src/components/ui/sheet.tsx"]
|
|
214
214
|
function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
215
215
|
return (
|
|
216
216
|
<div
|
|
@@ -220,15 +220,14 @@ function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
220
220
|
/>
|
|
221
221
|
)
|
|
222
222
|
}
|
|
223
|
+
// CIL[END stable_id="~/.framework/src/components/ui/sheet.tsx:SheetHeader:component"]
|
|
223
224
|
// CIL[DOC-VECTOR type="context" content="purpose='Renders the header area of a sheet panel'; No verified external callers; imports: .framework/src/lib/utils.ts,.framework/src/components/ui/button.tsx"]
|
|
224
225
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
225
226
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
226
227
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
227
228
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
228
229
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
229
|
-
// CIL[END stable_id="~/.framework/src/components/ui/sheet.tsx:SheetHeader:component"]
|
|
230
230
|
|
|
231
|
-
// CIL[BEGIN stable_id="~/.framework/src/components/ui/sheet.tsx:SheetFooter:component" type="component" identity="SheetFooter" parent="~/.framework/src/components/ui/sheet.tsx"]
|
|
232
231
|
// CIL[DOC-MACRO purpose="Renders the footer area of a sheet panel"]
|
|
233
232
|
// CIL[DOC-RESPONSIBILITY responsibility="Renders the footer area of a sheet panel"]
|
|
234
233
|
// CIL[DOC-CONTEXT module="components/ui" layer="ui" related_files=".framework/src/components/ui/button.tsx,.framework/src/components/ui/sheet.tsx,.framework/src/lib/utils.ts"]
|
|
@@ -236,6 +235,7 @@ function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
236
235
|
// CIL[DOC-MICRO logic_summary="Renders a div with the sheet-footer data slot and bottom auto-margin padding" notable_decisions="Merges an optional className with base layout classes via cn"]
|
|
237
236
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
238
237
|
// CIL[DOC-STABILITY stability="stable"]
|
|
238
|
+
// CIL[BEGIN stable_id="~/.framework/src/components/ui/sheet.tsx:SheetFooter:component" type="component" identity="SheetFooter" parent="~/.framework/src/components/ui/sheet.tsx"]
|
|
239
239
|
function SheetFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
240
240
|
return (
|
|
241
241
|
<div
|
|
@@ -245,15 +245,14 @@ function SheetFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
245
245
|
/>
|
|
246
246
|
)
|
|
247
247
|
}
|
|
248
|
+
// CIL[END stable_id="~/.framework/src/components/ui/sheet.tsx:SheetFooter:component"]
|
|
248
249
|
// CIL[DOC-VECTOR type="context" content="purpose='Renders the footer area of a sheet panel'; No verified external callers; imports: .framework/src/lib/utils.ts,.framework/src/components/ui/button.tsx"]
|
|
249
250
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
250
251
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
251
252
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
252
253
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
253
254
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
254
|
-
// CIL[END stable_id="~/.framework/src/components/ui/sheet.tsx:SheetFooter:component"]
|
|
255
255
|
|
|
256
|
-
// CIL[BEGIN stable_id="~/.framework/src/components/ui/sheet.tsx:SheetTitle:component" type="component" identity="SheetTitle" parent="~/.framework/src/components/ui/sheet.tsx"]
|
|
257
256
|
// CIL[DOC-MACRO purpose="Renders the accessible title inside a sheet"]
|
|
258
257
|
// CIL[DOC-RESPONSIBILITY responsibility="Renders the accessible title inside a sheet"]
|
|
259
258
|
// CIL[DOC-CONTEXT module="components/ui" layer="ui" related_files=".framework/src/components/ui/button.tsx,.framework/src/components/ui/sheet.tsx,.framework/src/lib/utils.ts"]
|
|
@@ -261,6 +260,7 @@ function SheetFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
261
260
|
// CIL[DOC-MICRO logic_summary="Wraps SheetPrimitive.Title with a heading font and data-slot attribute" notable_decisions="Merges an optional className with base typography classes"]
|
|
262
261
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
263
262
|
// CIL[DOC-STABILITY stability="stable"]
|
|
263
|
+
// CIL[BEGIN stable_id="~/.framework/src/components/ui/sheet.tsx:SheetTitle:component" type="component" identity="SheetTitle" parent="~/.framework/src/components/ui/sheet.tsx"]
|
|
264
264
|
function SheetTitle({
|
|
265
265
|
className,
|
|
266
266
|
...props
|
|
@@ -276,15 +276,14 @@ function SheetTitle({
|
|
|
276
276
|
/>
|
|
277
277
|
)
|
|
278
278
|
}
|
|
279
|
+
// CIL[END stable_id="~/.framework/src/components/ui/sheet.tsx:SheetTitle:component"]
|
|
279
280
|
// CIL[DOC-VECTOR type="context" content="purpose='Renders the accessible title inside a sheet'; No verified external callers; imports: .framework/src/lib/utils.ts,.framework/src/components/ui/button.tsx"]
|
|
280
281
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
281
282
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
282
283
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
283
284
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
284
285
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
285
|
-
// CIL[END stable_id="~/.framework/src/components/ui/sheet.tsx:SheetTitle:component"]
|
|
286
286
|
|
|
287
|
-
// CIL[BEGIN stable_id="~/.framework/src/components/ui/sheet.tsx:SheetDescription:component" type="component" identity="SheetDescription" parent="~/.framework/src/components/ui/sheet.tsx"]
|
|
288
287
|
// CIL[DOC-MACRO purpose="Renders the accessible description inside a sheet"]
|
|
289
288
|
// CIL[DOC-RESPONSIBILITY responsibility="Renders the accessible description inside a sheet"]
|
|
290
289
|
// CIL[DOC-CONTEXT module="components/ui" layer="ui" related_files=".framework/src/components/ui/button.tsx,.framework/src/components/ui/sheet.tsx,.framework/src/lib/utils.ts"]
|
|
@@ -292,6 +291,7 @@ function SheetTitle({
|
|
|
292
291
|
// CIL[DOC-MICRO logic_summary="Wraps SheetPrimitive.Description with muted-foreground text styling" notable_decisions="Merges an optional className with base text classes"]
|
|
293
292
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
294
293
|
// CIL[DOC-STABILITY stability="stable"]
|
|
294
|
+
// CIL[BEGIN stable_id="~/.framework/src/components/ui/sheet.tsx:SheetDescription:component" type="component" identity="SheetDescription" parent="~/.framework/src/components/ui/sheet.tsx"]
|
|
295
295
|
function SheetDescription({
|
|
296
296
|
className,
|
|
297
297
|
...props
|
|
@@ -304,14 +304,13 @@ function SheetDescription({
|
|
|
304
304
|
/>
|
|
305
305
|
)
|
|
306
306
|
}
|
|
307
|
+
// CIL[END stable_id="~/.framework/src/components/ui/sheet.tsx:SheetDescription:component"]
|
|
307
308
|
// CIL[DOC-VECTOR type="context" content="purpose='Renders the accessible description inside a sheet'; No verified external callers; imports: .framework/src/lib/utils.ts,.framework/src/components/ui/button.tsx"]
|
|
308
309
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
309
310
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
310
311
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
311
312
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
312
313
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
313
|
-
// CIL[END stable_id="~/.framework/src/components/ui/sheet.tsx:SheetDescription:component"]
|
|
314
|
-
// CIL[BEGIN stable_id="~/.framework/src/components/ui/sheet.tsx:exports:variable" type="variable" identity="exports" parent="~/.framework/src/components/ui/sheet.tsx"]
|
|
315
314
|
// CIL[DOC-MACRO purpose="Re-exports the Sheet subcomponents as the public API of the module"]
|
|
316
315
|
// CIL[DOC-RESPONSIBILITY responsibility="Re-exports the Sheet subcomponents as the public API of the module"]
|
|
317
316
|
// CIL[DOC-CONTEXT module="components/ui" layer="ui" related_files=".framework/src/components/ui/button.tsx,.framework/src/components/ui/sheet.tsx,.framework/src/lib/utils.ts"]
|
|
@@ -334,5 +333,4 @@ export {
|
|
|
334
333
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
335
334
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
336
335
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
337
|
-
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
338
|
-
// CIL[END stable_id="~/.framework/src/components/ui/sheet.tsx:exports:variable"]
|
|
336
|
+
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
@@ -1,34 +1,58 @@
|
|
|
1
1
|
// CIL[BEGIN stable_id="~/.framework/src/components/ui/textarea.tsx:module_header:module_header" type="module_header" identity="module_header" parent="~/.framework/src/components/ui/textarea.tsx"]
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @module textarea
|
|
4
|
+
* @audience both
|
|
5
|
+
* @layer shared-core
|
|
6
|
+
* @stability stable
|
|
7
|
+
*
|
|
8
|
+
* This module provides a React component for a customizable textarea, allowing for flexible user input within forms. It integrates utility functions for class name management to ensure consistent styling. INVARIANT: The component must always receive valid props to function correctly.
|
|
9
|
+
*
|
|
10
|
+
* @seeAlso utils.ts (provides utility functions for class name management).
|
|
11
|
+
*
|
|
12
|
+
* @cil-generated
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
10
23
|
import * as React from "react"
|
|
11
24
|
|
|
12
25
|
import { cn } from "@/lib/utils"
|
|
13
|
-
// CIL[DOC-VECTOR type="context" content="purpose='Provides the Textarea UI component for the design system'; No verified external callers; imports: .framework/src/lib/utils.ts"]
|
|
14
|
-
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
15
|
-
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
16
|
-
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
17
|
-
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
18
|
-
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
19
26
|
// CIL[END stable_id="~/.framework/src/components/ui/textarea.tsx:module_header:module_header"]
|
|
20
27
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
// CIL[BEGIN stable_id="~/.framework/src/components/ui/textarea.tsx:Textarea:constant" type="constant" identity="Textarea" parent="~/.framework/src/components/ui/textarea.tsx"]
|
|
44
|
+
/**
|
|
45
|
+
* Textarea is a React component that renders a styled HTML textarea element, providing a flexible and customizable input area for user text input within a form.
|
|
46
|
+
*
|
|
47
|
+
* @sideEffects none
|
|
48
|
+
* @stability internal
|
|
49
|
+
* @calls cn
|
|
50
|
+
* @cil-generated
|
|
51
|
+
*/
|
|
52
|
+
const Textarea = React.forwardRef<HTMLTextAreaElement, React.ComponentProps<"textarea">>(
|
|
53
|
+
({ className, ...props }, ref) => (
|
|
31
54
|
<textarea
|
|
55
|
+
ref={ref}
|
|
32
56
|
data-slot="textarea"
|
|
33
57
|
className={cn(
|
|
34
58
|
"flex field-sizing-content min-h-16 w-full resize-none rounded-md border border-input bg-input/20 px-2 py-2 text-sm transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
@@ -37,28 +61,30 @@ function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
|
|
|
37
61
|
{...props}
|
|
38
62
|
/>
|
|
39
63
|
)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
64
|
+
// CIL[END stable_id="~/.framework/src/components/ui/textarea.tsx:Textarea:constant"]
|
|
65
|
+
)
|
|
66
|
+
Textarea.displayName = "Textarea"
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
57
83
|
export { Textarea }
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import React, { createContext, useContext, useState, useEffect, useRef, useCallback } from 'react'
|
|
12
12
|
import { AppRecord } from '../hooks/useApps'
|
|
13
13
|
import { apiFetch } from '../lib/api'
|
|
14
|
+
import { resolveAppMount } from '../lib/app-mount'
|
|
14
15
|
import { useAuth } from './AuthContext'
|
|
15
16
|
// CIL[DOC-VECTOR type="context" content="purpose='Defines React contexts and hooks for the current app and app registry'; No verified external callers; imports: .framework/src/hooks/useApps.ts,.framework/src/lib/api.ts,.framework/src/contexts/AuthContext.tsx"]
|
|
16
17
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
@@ -248,7 +249,9 @@ export function AppsRegistryProvider({ children }: AppsRegistryProviderProps) {
|
|
|
248
249
|
if (data.error) throw new Error(data.error)
|
|
249
250
|
|
|
250
251
|
const allApps: AppRecord[] = data.data || data || []
|
|
251
|
-
|
|
252
|
+
// Resolve the host-keyed mount up front so every consumer sees the
|
|
253
|
+
// effective route_prefix ('/' on the app's own prod/preview domain).
|
|
254
|
+
setApps(allApps.map(app => ({ ...app, route_prefix: resolveAppMount(app).route_prefix })))
|
|
252
255
|
loadedForUserRef.current = user.id
|
|
253
256
|
} catch (err) {
|
|
254
257
|
if (err instanceof DOMException && err.name === 'AbortError') return
|
|
@@ -272,18 +275,8 @@ export function AppsRegistryProvider({ children }: AppsRegistryProviderProps) {
|
|
|
272
275
|
|
|
273
276
|
const effectiveLoading = loading || (!!user && loadedForUserRef.current !== user.id)
|
|
274
277
|
|
|
275
|
-
const environment = (import.meta.env.VITE_ENVIRONMENT as string) || 'prod'
|
|
276
|
-
const currentHost = typeof window !== 'undefined' ? window.location.hostname : ''
|
|
277
|
-
|
|
278
|
-
const appMatchesDomain = (app: AppRecord): boolean => {
|
|
279
|
-
const domain = environment === 'preview' ? app.preview_domain : app.prod_domain
|
|
280
|
-
if (!domain) return true
|
|
281
|
-
const hostname = domain.includes('://') ? new URL(domain).hostname : domain.split(':')[0]
|
|
282
|
-
return currentHost === hostname
|
|
283
|
-
}
|
|
284
|
-
|
|
285
278
|
const routableApps = apps.filter(
|
|
286
|
-
app => app.route_prefix != null && app.renderer !== 'none' &&
|
|
279
|
+
app => app.route_prefix != null && app.renderer !== 'none' && resolveAppMount(app).routable
|
|
287
280
|
)
|
|
288
281
|
|
|
289
282
|
const refetch = useCallback(() => {
|
|
@@ -348,6 +348,7 @@ async function fetchUserContext(maxRetries = 2): Promise<User | null> {
|
|
|
348
348
|
// CIL[DOC-CONTEXT module="AuthContext" layer="context" related_files=".framework/src/contexts/AuthContext.tsx,.framework/src/lib/api.ts,.framework/src/lib/supabase.ts,.framework/src/types/auth.ts"]
|
|
349
349
|
// CIL[DOC-CONTRACT inputs="children: React.ReactNode" outputs="AuthContext.Provider with value { user, isLoading, login, logout, refreshUser }" errors="login may propagate Supabase error; useAuth throws outside provider" side_effects="updates localStorage, Supabase auth session, account id, and window storage listener"]
|
|
350
350
|
// CIL[DOC-MICRO logic_summary="Initializes from cache, fetches/refresh session on mount, exposes callbacks, and listens to auth/storage events." notable_decisions="[]"]
|
|
351
|
+
// CIL[DOC-NOTE type="caution" content="onAuthStateChange callbacks must not await Supabase calls — auth-js awaits listener callbacks inside initializePromise, so fetchUserContext→apiFetch→getAuthHeaders→getSession deadlocks on expired sessions until SESSION_TIMEOUT_MS (15s spinner before login mounts). Work is deferred via setTimeout."]
|
|
351
352
|
// CIL[DOC-CONFIDENCE pass="second" score="0.85" flags="none"]
|
|
352
353
|
// CIL[DOC-STABILITY stability="stable"]
|
|
353
354
|
export function AuthProvider({ children }: AuthProviderProps) {
|
|
@@ -501,7 +502,7 @@ export function AuthProvider({ children }: AuthProviderProps) {
|
|
|
501
502
|
checkAuth()
|
|
502
503
|
|
|
503
504
|
const { data: { subscription } } = supabase.auth.onAuthStateChange(
|
|
504
|
-
|
|
505
|
+
(event, session) => {
|
|
505
506
|
if (cancelled) return
|
|
506
507
|
|
|
507
508
|
if (isLoggingInRef.current) return
|
|
@@ -510,14 +511,21 @@ export function AuthProvider({ children }: AuthProviderProps) {
|
|
|
510
511
|
if (!session?.user) return
|
|
511
512
|
if (userRef.current) return
|
|
512
513
|
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
514
|
+
// auth-js awaits listener callbacks inside initializePromise —
|
|
515
|
+
// awaiting fetchUserContext here deadlocks it via
|
|
516
|
+
// apiFetch → getAuthHeaders → getSession → initializePromise.
|
|
517
|
+
setTimeout(async () => {
|
|
518
|
+
if (cancelled) return
|
|
519
|
+
|
|
520
|
+
const userContext = await fetchUserContext()
|
|
521
|
+
if (cancelled) return
|
|
522
|
+
|
|
523
|
+
if (userContext) {
|
|
524
|
+
applyUserContext(userContext)
|
|
525
|
+
} else {
|
|
526
|
+
clearUser()
|
|
527
|
+
}
|
|
528
|
+
}, 0)
|
|
521
529
|
} else if (event === 'SIGNED_OUT') {
|
|
522
530
|
clearUser()
|
|
523
531
|
}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
import { useState, useEffect } from 'react'
|
|
15
15
|
import { apiFetch } from '../lib/api'
|
|
16
|
+
import { resolveAppMount } from '../lib/app-mount'
|
|
16
17
|
import { useAuth } from '../contexts/AuthContext'
|
|
17
18
|
// CIL[DOC-VECTOR type="context" content="purpose='Module setup and imports for useApps.ts'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/contexts/AuthContext.tsx"]
|
|
18
19
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
@@ -51,6 +52,8 @@ export interface AppRecord {
|
|
|
51
52
|
renderer: 'generic' | 'custom' | 'none'
|
|
52
53
|
preview_domain?: string | null
|
|
53
54
|
prod_domain?: string | null
|
|
55
|
+
preview_route_prefix?: string | null
|
|
56
|
+
prod_route_prefix?: string | null
|
|
54
57
|
}
|
|
55
58
|
// CIL[DOC-VECTOR type="context" content="purpose='Define the AppRecord shape'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/contexts/AuthContext.tsx"]
|
|
56
59
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
@@ -122,30 +125,23 @@ export function useApps(): UseAppsResult {
|
|
|
122
125
|
|
|
123
126
|
const allApps: AppRecord[] = data.data || data || []
|
|
124
127
|
|
|
125
|
-
const
|
|
126
|
-
|
|
128
|
+
const accessible = allApps
|
|
129
|
+
.map(app => ({ app, mount: resolveAppMount(app) }))
|
|
130
|
+
.filter(({ app, mount }) => {
|
|
131
|
+
if (!app.is_active) return false
|
|
132
|
+
if (!mount.routable) return false
|
|
127
133
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
+
const requiredRoles = app.required_roles || (app.min_role ? [app.min_role] : [])
|
|
135
|
+
|
|
136
|
+
if (requiredRoles.length === 0) return true
|
|
137
|
+
|
|
138
|
+
if (!user.roles || user.roles.length === 0) return false
|
|
139
|
+
|
|
140
|
+
if (user.roles.includes('system_admin')) return true
|
|
134
141
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
const requiredRoles = app.required_roles || (app.min_role ? [app.min_role] : [])
|
|
140
|
-
|
|
141
|
-
if (requiredRoles.length === 0) return true
|
|
142
|
-
|
|
143
|
-
if (!user.roles || user.roles.length === 0) return false
|
|
144
|
-
|
|
145
|
-
if (user.roles.includes('system_admin')) return true
|
|
146
|
-
|
|
147
|
-
return requiredRoles.some(role => user.roles!.includes(role))
|
|
148
|
-
})
|
|
142
|
+
return requiredRoles.some(role => user.roles!.includes(role))
|
|
143
|
+
})
|
|
144
|
+
.map(({ app, mount }) => ({ ...app, route_prefix: mount.route_prefix }))
|
|
149
145
|
|
|
150
146
|
setApps(accessible)
|
|
151
147
|
} catch (err) {
|