spine-framework 0.4.3 → 0.5.0-rc.4
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/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-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/agent-runner.ts +1000 -81
- package/.framework/functions/_shared/cil.ts +2 -1
- package/.framework/functions/_shared/db.ts +3 -6
- package/.framework/functions/_shared/hash-api-key.ts +183 -79
- package/.framework/functions/_shared/kb.ts +61 -7
- package/.framework/functions/_shared/logging.ts +562 -224
- package/.framework/functions/_shared/message-sequence.ts +53 -0
- package/.framework/functions/_shared/middleware.ts +47 -44
- package/.framework/functions/_shared/pipeline-runner.ts +150 -37
- package/.framework/functions/_shared/principal.ts +9 -6
- package/.framework/functions/_shared/trigger-engine.ts +149 -40
- package/.framework/functions/admin-data.ts +48 -31
- package/.framework/functions/ai-agents.ts +103 -33
- package/.framework/functions/api-keys.ts +301 -122
- package/.framework/functions/apps.ts +43 -26
- 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 +145 -76
- 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 +277 -147
- package/.framework/functions/pipeline-executions.ts +1 -1
- package/.framework/functions/pipeline-runner-background.ts +120 -0
- 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 +250 -128
- package/.framework/functions/tests.ts +7 -6
- package/.framework/functions/timers.ts +310 -107
- package/.framework/functions/trigger-scheduler.ts +65 -5
- package/.framework/functions/triggers.ts +28 -13
- package/.framework/functions/types.ts +13 -10
- package/.framework/migrations/064_episode_leases.sql +196 -0
- package/.framework/migrations/065_execution_tables_updated_at.sql +20 -0
- package/.framework/migrations/066_episode_steal_thread_merge.sql +148 -0
- package/.framework/migrations/067_episode_lease_stale_steal.sql +93 -0
- package/.framework/migrations/068_cron_schedule_timer_rpcs.sql +251 -0
- 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/schemas/spine.config.schema.json +62 -0
- package/.framework/src/App.tsx +3 -1
- 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 +92 -81
- package/.framework/src/components/admin/EntitySelect.tsx +181 -0
- package/.framework/src/components/admin/PageInstructions.tsx +86 -127
- package/.framework/src/components/app-shell/GenericAppShell.tsx +3 -1
- package/.framework/src/components/app-shell/GenericDetailPage.tsx +37 -13
- package/.framework/src/components/app-shell/GenericListPage.tsx +28 -32
- package/.framework/src/components/auth/TurnstileWidget.tsx +9 -6
- package/.framework/src/components/kb/KBArticleEditor.tsx +49 -6
- package/.framework/src/components/layout/Layout.tsx +4 -2
- package/.framework/src/components/layout/Sidebar.tsx +304 -179
- 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/hooks/useBranding.ts +47 -0
- package/.framework/src/hooks/useEntityList.ts +12 -9
- package/.framework/src/hooks/useListSchema.ts +108 -58
- package/.framework/src/instructions/README.md +57 -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 +162 -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/invites.md +60 -0
- package/.framework/src/instructions/kb.md +80 -0
- package/.framework/src/instructions/logs.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 +148 -0
- package/.framework/src/instructions/operations/troubleshooting.md +170 -0
- package/.framework/src/instructions/operations/upgrade.md +116 -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 +150 -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/functions/account-nodes.md +75 -0
- package/.framework/src/instructions/reference/functions/admin-data.md +195 -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-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/package-and-install-an-app.md +127 -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 +82 -0
- package/.framework/src/instructions/triggers.md +69 -0
- package/.framework/src/instructions/types.md +93 -0
- package/.framework/src/lib/branding.ts +128 -0
- package/.framework/src/pages/NoAppPage.tsx +3 -1
- package/.framework/src/pages/NotFoundPage.tsx +62 -31
- package/.framework/src/pages/SetupPage.tsx +5 -2
- 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/AuthConfirmPage.tsx +3 -1
- package/.framework/src/pages/auth/ForgotPasswordPage.tsx +3 -1
- package/.framework/src/pages/auth/LoginPage.tsx +4 -2
- package/.framework/src/pages/auth/RegisterPage.tsx +3 -1
- package/.framework/templates/agent/AGENTS.md +150 -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 +72 -0
- package/.framework/templates/agent/skills/spine-migration/SKILL.md +75 -0
- package/.framework/templates/agent/skills/spine-new-app/SKILL.md +67 -0
- package/.framework/templates/agent/skills/spine-new-function/SKILL.md +65 -0
- package/.framework/templates/agent/skills/spine-new-type/SKILL.md +65 -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 +5 -1
- package/.framework/tests/unit/account-scoping-gates.test.ts +392 -0
- package/.framework/tests/unit/agent-files.test.ts +355 -0
- package/.framework/tests/unit/agent-runner.test.ts +496 -47
- 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/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/episode-lease.test.ts +695 -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/kb-ingest-lease.test.ts +19 -0
- package/.framework/tests/unit/logging-app-id.test.ts +75 -0
- package/.framework/tests/unit/pipeline-runner-background.test.ts +120 -0
- package/.framework/tests/unit/pipeline-runner.test.ts +153 -1
- package/.framework/tests/unit/principal-cache.test.ts +15 -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/.framework/tests/unit/trigger-engine.test.ts +278 -91
- package/.framework/tests/unit/trigger-scheduler.test.ts +78 -0
- package/README.md +125 -166
- package/config/tsconfig.cli.json +2 -2
- package/netlify.toml +5 -0
- 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
|
+
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// CIL[BEGIN stable_id="~/.framework/src/hooks/useBranding.ts:module_header:module_header" type="module_header" identity="module_header" parent="~/.framework/src/hooks/useBranding.ts"]
|
|
2
|
+
// CIL[DOC-MACRO purpose="React hook exposing resolved instance branding and applying it to the document"]
|
|
3
|
+
// CIL[DOC-RESPONSIBILITY responsibility="Give framework components the instance brand (name, logo, favicon, title) and keep document.title/favicon in sync"]
|
|
4
|
+
// CIL[DOC-CONTEXT module="framework-hooks" layer="hook" related_files=".framework/src/lib/branding.ts,spine.config.json"]
|
|
5
|
+
// CIL[DOC-CONTRACT inputs="none" outputs="SpineBranding" errors="load failures resolve to defaults" side_effects="document.title and favicon mutation via applyBrandingToDocument"]
|
|
6
|
+
// CIL[DOC-MICRO logic_summary="Seeds state from the module cache, kicks the shared loadBranding fetch, updates state when it resolves, and applies document effects on every change" notable_decisions="every consumer applies document effects — idempotent, so pages that render a logo also fix the tab title/favicon"]
|
|
7
|
+
// CIL[DOC-CONFIDENCE pass="first" score="0.9" flags="none"]
|
|
8
|
+
// CIL[DOC-STABILITY stability="experimental"]
|
|
9
|
+
// CIL[DOC-AUDIENCE audience="framework developers"]
|
|
10
|
+
|
|
11
|
+
import { useEffect, useState } from 'react'
|
|
12
|
+
import {
|
|
13
|
+
applyBrandingToDocument,
|
|
14
|
+
getCachedBranding,
|
|
15
|
+
loadBranding,
|
|
16
|
+
type SpineBranding,
|
|
17
|
+
} from '../lib/branding'
|
|
18
|
+
// CIL[END stable_id="~/.framework/src/hooks/useBranding.ts:module_header:module_header"]
|
|
19
|
+
|
|
20
|
+
// CIL[BEGIN stable_id="~/.framework/src/hooks/useBranding.ts:usebranding:hook" type="hook" identity="useBranding" parent="~/.framework/src/hooks/useBranding.ts"]
|
|
21
|
+
// CIL[DOC-MACRO purpose="Return the resolved SpineBranding and sync document.title/favicon"]
|
|
22
|
+
// CIL[DOC-RESPONSIBILITY responsibility="Bridge the cached branding loader into React state"]
|
|
23
|
+
// CIL[DOC-CONTEXT module="framework-hooks" layer="hook" related_files=".framework/src/lib/branding.ts"]
|
|
24
|
+
// CIL[DOC-CONTRACT inputs="none" outputs="SpineBranding (defaults until fetch resolves)" errors="none" side_effects="triggers shared /spine.config.json fetch; mutates document head"]
|
|
25
|
+
// CIL[DOC-MICRO logic_summary="useState seeded by getCachedBranding; effect calls loadBranding then setBranding; second effect applies branding to the document whenever it changes" notable_decisions="[]"]
|
|
26
|
+
// CIL[DOC-CONFIDENCE pass="first" score="0.9" flags="none"]
|
|
27
|
+
// CIL[DOC-STABILITY stability="experimental"]
|
|
28
|
+
export function useBranding(): SpineBranding {
|
|
29
|
+
const [branding, setBranding] = useState<SpineBranding>(getCachedBranding)
|
|
30
|
+
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
let active = true
|
|
33
|
+
loadBranding().then(resolved => {
|
|
34
|
+
if (active) setBranding(resolved)
|
|
35
|
+
})
|
|
36
|
+
return () => {
|
|
37
|
+
active = false
|
|
38
|
+
}
|
|
39
|
+
}, [])
|
|
40
|
+
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
applyBrandingToDocument(branding)
|
|
43
|
+
}, [branding])
|
|
44
|
+
|
|
45
|
+
return branding
|
|
46
|
+
}
|
|
47
|
+
// CIL[END stable_id="~/.framework/src/hooks/useBranding.ts:usebranding:hook"]
|
|
@@ -13,16 +13,15 @@
|
|
|
13
13
|
import { useState, useEffect, useCallback } from 'react'
|
|
14
14
|
import { useApi } from './useApi'
|
|
15
15
|
import { apiFetch } from '../lib/api'
|
|
16
|
+
// CIL[END stable_id="~/.framework/src/hooks/useEntityList.ts:module_header:module_header"]
|
|
16
17
|
// CIL[DOC-VECTOR type="context" content="purpose='Provide React and API imports for the useEntityList hook'; No verified external callers; imports: .framework/src/hooks/useApi.ts,.framework/src/lib/api.ts"]
|
|
17
18
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
18
19
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
19
20
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
20
21
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
21
22
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
22
|
-
// CIL[END stable_id="~/.framework/src/hooks/useEntityList.ts:module_header:module_header"]
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
// CIL[BEGIN stable_id="~/.framework/src/hooks/useEntityList.ts:MinimalEntityListConfig:interface" type="interface" identity="MinimalEntityListConfig" parent="~/.framework/src/hooks/useEntityList.ts"]
|
|
26
25
|
// CIL[DOC-AUDIENCE audience="internal"]
|
|
27
26
|
// CIL[DOC-MACRO purpose="Define the minimal configuration shape for useEntityList"]
|
|
28
27
|
// CIL[DOC-RESPONSIBILITY responsibility="Describe required and optional list configuration fields"]
|
|
@@ -31,6 +30,7 @@ import { apiFetch } from '../lib/api'
|
|
|
31
30
|
// CIL[DOC-MICRO logic_summary="Declares entity, optional typeSlug, API endpoint/listAction, and default sort settings" notable_decisions="list.defaultSort is required"]
|
|
32
31
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
33
32
|
// CIL[DOC-STABILITY stable]
|
|
33
|
+
// CIL[BEGIN stable_id="~/.framework/src/hooks/useEntityList.ts:MinimalEntityListConfig:interface" type="interface" identity="MinimalEntityListConfig" parent="~/.framework/src/hooks/useEntityList.ts"]
|
|
34
34
|
interface MinimalEntityListConfig {
|
|
35
35
|
entity: string
|
|
36
36
|
typeSlug?: string
|
|
@@ -42,16 +42,15 @@ interface MinimalEntityListConfig {
|
|
|
42
42
|
defaultSort: { field: string; direction: 'asc' | 'desc' }
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
+
// CIL[END stable_id="~/.framework/src/hooks/useEntityList.ts:MinimalEntityListConfig:interface"]
|
|
45
46
|
// CIL[DOC-VECTOR type="context" content="purpose='Define the minimal configuration shape for useEntityList'; No verified external callers; imports: .framework/src/hooks/useApi.ts,.framework/src/lib/api.ts"]
|
|
46
47
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
47
48
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
48
49
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
49
50
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
50
51
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
51
|
-
// CIL[END stable_id="~/.framework/src/hooks/useEntityList.ts:MinimalEntityListConfig:interface"]
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
// CIL[BEGIN stable_id="~/.framework/src/hooks/useEntityList.ts:UseEntityListReturn:interface" type="interface" identity="UseEntityListReturn" parent="~/.framework/src/hooks/useEntityList.ts"]
|
|
55
54
|
// CIL[DOC-AUDIENCE audience="internal"]
|
|
56
55
|
// CIL[DOC-MACRO purpose="Define the return shape for useEntityList"]
|
|
57
56
|
// CIL[DOC-RESPONSIBILITY responsibility="Expose state and controls returned by the useEntityList hook"]
|
|
@@ -60,6 +59,7 @@ interface MinimalEntityListConfig {
|
|
|
60
59
|
// CIL[DOC-MICRO logic_summary="Declares data, loading, error, refetch, filters, sort, and pagination state accessors" notable_decisions=""]
|
|
61
60
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
62
61
|
// CIL[DOC-STABILITY stable]
|
|
62
|
+
// CIL[BEGIN stable_id="~/.framework/src/hooks/useEntityList.ts:UseEntityListReturn:interface" type="interface" identity="UseEntityListReturn" parent="~/.framework/src/hooks/useEntityList.ts"]
|
|
63
63
|
interface UseEntityListReturn {
|
|
64
64
|
data: any[]
|
|
65
65
|
loading: boolean
|
|
@@ -77,15 +77,14 @@ interface UseEntityListReturn {
|
|
|
77
77
|
total: number
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
+
// CIL[END stable_id="~/.framework/src/hooks/useEntityList.ts:UseEntityListReturn:interface"]
|
|
80
81
|
// CIL[DOC-VECTOR type="context" content="purpose='Define the return shape for useEntityList'; No verified external callers; imports: .framework/src/hooks/useApi.ts,.framework/src/lib/api.ts"]
|
|
81
82
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
82
83
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
83
84
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
84
85
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
85
86
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
86
|
-
// CIL[END stable_id="~/.framework/src/hooks/useEntityList.ts:UseEntityListReturn:interface"]
|
|
87
87
|
|
|
88
|
-
// CIL[BEGIN stable_id="~/.framework/src/hooks/useEntityList.ts:useEntityList:hook" type="hook" identity="useEntityList" parent="~/.framework/src/hooks/useEntityList.ts"]
|
|
89
88
|
// CIL[DOC-AUDIENCE audience="internal"]
|
|
90
89
|
// CIL[DOC-MACRO purpose="Fetch and manage a paginated, sortable, filterable list of entities"]
|
|
91
90
|
// CIL[DOC-RESPONSIBILITY responsibility="Manage list state, build API query parameters, and expose list controls"]
|
|
@@ -94,6 +93,7 @@ interface UseEntityListReturn {
|
|
|
94
93
|
// CIL[DOC-MICRO logic_summary="Computes URL parameters from filters, sort, and pagination; fetches via apiFetch; resets page on filter changes" notable_decisions="Defaults sort to created_at descending; resets page to 1 when filters change"]
|
|
95
94
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
96
95
|
// CIL[DOC-STABILITY stable]
|
|
96
|
+
// CIL[BEGIN stable_id="~/.framework/src/hooks/useEntityList.ts:useEntityList:hook" type="hook" identity="useEntityList" parent="~/.framework/src/hooks/useEntityList.ts"]
|
|
97
97
|
export function useEntityList(
|
|
98
98
|
entity: string,
|
|
99
99
|
config: MinimalEntityListConfig | null
|
|
@@ -122,7 +122,10 @@ export function useEntityList(
|
|
|
122
122
|
|
|
123
123
|
Object.entries(filters).forEach(([key, value]) => {
|
|
124
124
|
if (value !== undefined && value !== '' && value !== 'all') {
|
|
125
|
-
|
|
125
|
+
// data.<field> is the documented way to filter on non-system fields;
|
|
126
|
+
// PostgREST needs the ->> operator form.
|
|
127
|
+
const paramKey = key.startsWith('data.') ? `data->>${key.slice(5)}` : key
|
|
128
|
+
params.append(paramKey, value.toString())
|
|
126
129
|
}
|
|
127
130
|
})
|
|
128
131
|
|
|
@@ -172,10 +175,10 @@ export function useEntityList(
|
|
|
172
175
|
}
|
|
173
176
|
}
|
|
174
177
|
}
|
|
178
|
+
// CIL[END stable_id="~/.framework/src/hooks/useEntityList.ts:useEntityList:hook"]
|
|
175
179
|
// CIL[DOC-VECTOR type="context" content="purpose='Fetch and manage a paginated, sortable, filterable list of entities'; No verified external callers; imports: .framework/src/hooks/useApi.ts,.framework/src/lib/api.ts"]
|
|
176
180
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
177
181
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
178
182
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
179
183
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
180
|
-
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
181
|
-
// CIL[END stable_id="~/.framework/src/hooks/useEntityList.ts:useEntityList:hook"]
|
|
184
|
+
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|