veryfront 0.1.1237 → 0.1.1239
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/esm/cli/auth/login.d.ts +24 -2
- package/esm/cli/auth/login.d.ts.map +1 -1
- package/esm/cli/auth/login.js +444 -35
- package/esm/cli/commands/build/error-handler.d.ts.map +1 -1
- package/esm/cli/commands/build/error-handler.js +41 -3
- package/esm/cli/commands/build/handler.d.ts.map +1 -1
- package/esm/cli/commands/build/handler.js +1 -1
- package/esm/cli/commands/dev/command.d.ts.map +1 -1
- package/esm/cli/commands/dev/command.js +14 -1
- package/esm/cli/commands/dev/inference-status.d.ts +6 -0
- package/esm/cli/commands/dev/inference-status.d.ts.map +1 -1
- package/esm/cli/commands/dev/inference-status.js +14 -2
- package/esm/cli/commands/generate/command.d.ts.map +1 -1
- package/esm/cli/commands/generate/command.js +61 -0
- package/esm/cli/commands/init/init-command.d.ts.map +1 -1
- package/esm/cli/commands/init/init-command.js +23 -31
- package/esm/cli/commands/install/registry.d.ts.map +1 -1
- package/esm/cli/commands/install/registry.js +6 -9
- package/esm/cli/commands/login/command-help.d.ts.map +1 -1
- package/esm/cli/commands/login/command-help.js +3 -1
- package/esm/cli/commands/pull/command.d.ts +1 -0
- package/esm/cli/commands/pull/command.d.ts.map +1 -1
- package/esm/cli/commands/pull/command.js +49 -6
- package/esm/cli/commands/push/command-help.d.ts.map +1 -1
- package/esm/cli/commands/push/command-help.js +7 -0
- package/esm/cli/commands/push/command.d.ts +23 -12
- package/esm/cli/commands/push/command.d.ts.map +1 -1
- package/esm/cli/commands/push/command.js +461 -44
- package/esm/cli/commands/push/plan.d.ts +35 -0
- package/esm/cli/commands/push/plan.d.ts.map +1 -0
- package/esm/cli/commands/push/plan.js +96 -0
- package/esm/cli/commands/schedule/handler.d.ts +21 -2
- package/esm/cli/commands/schedule/handler.d.ts.map +1 -1
- package/esm/cli/commands/schedule/handler.js +74 -27
- package/esm/cli/commands/schema/command-help.js +1 -1
- package/esm/cli/commands/up/command.js +1 -1
- package/esm/cli/commands/webhook/handler.d.ts.map +1 -1
- package/esm/cli/commands/webhook/handler.js +3 -1
- package/esm/cli/router.d.ts.map +1 -1
- package/esm/cli/router.js +27 -5
- package/esm/cli/shared/args.d.ts +15 -1
- package/esm/cli/shared/args.d.ts.map +1 -1
- package/esm/cli/shared/args.js +56 -3
- package/esm/cli/shared/config.d.ts +11 -2
- package/esm/cli/shared/config.d.ts.map +1 -1
- package/esm/cli/shared/config.js +72 -27
- package/esm/cli/shared/project-creation.js +1 -1
- package/esm/cli/sync/state.d.ts +20 -0
- package/esm/cli/sync/state.d.ts.map +1 -0
- package/esm/cli/sync/state.js +193 -0
- package/esm/deno.js +2 -2
- package/esm/extensions/ext-llm-anthropic/src/anthropic-request-builder.d.ts.map +1 -1
- package/esm/extensions/ext-llm-anthropic/src/anthropic-request-builder.js +852 -21
- package/esm/extensions/ext-observability-sentry/src/policy.d.ts +2 -0
- package/esm/extensions/ext-observability-sentry/src/policy.d.ts.map +1 -1
- package/esm/extensions/ext-observability-sentry/src/policy.js +214 -3
- package/esm/src/agent/conversation/delegation-policy.d.ts +2 -0
- package/esm/src/agent/conversation/delegation-policy.d.ts.map +1 -1
- package/esm/src/agent/conversation/delegation-policy.js +13 -3
- package/esm/src/agent/conversation/hosted-terminal.d.ts.map +1 -1
- package/esm/src/agent/conversation/hosted-terminal.js +6 -2
- package/esm/src/agent/conversation/run-chunk-mirror.d.ts.map +1 -1
- package/esm/src/agent/conversation/run-chunk-mirror.js +14 -2
- package/esm/src/agent/factory.d.ts.map +1 -1
- package/esm/src/agent/factory.js +22 -11
- package/esm/src/agent/hosted/chat-runtime-tool-assembly.d.ts +2 -0
- package/esm/src/agent/hosted/chat-runtime-tool-assembly.d.ts.map +1 -1
- package/esm/src/agent/hosted/chat-runtime-tool-assembly.js +6 -1
- package/esm/src/agent/hosted/child-fork-execution-runner.d.ts +2 -1
- package/esm/src/agent/hosted/child-fork-execution-runner.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-fork-execution-runner.js +6 -3
- package/esm/src/agent/hosted/child-fork-step-message-preparation.d.ts +12 -3
- package/esm/src/agent/hosted/child-fork-step-message-preparation.d.ts.map +1 -1
- package/esm/src/agent/hosted/child-fork-step-message-preparation.js +16 -3
- package/esm/src/agent/hosted/cloud-agent-chat-execution.d.ts +1 -1
- package/esm/src/agent/hosted/cloud-agent-chat-execution.d.ts.map +1 -1
- package/esm/src/agent/hosted/cloud-agent-chat-execution.js +3 -3
- package/esm/src/agent/hosted/cloud-agent-child-tools.d.ts +11 -0
- package/esm/src/agent/hosted/cloud-agent-child-tools.d.ts.map +1 -1
- package/esm/src/agent/hosted/cloud-agent-child-tools.js +2 -3
- package/esm/src/agent/hosted/cloud-agent-config.d.ts +1 -0
- package/esm/src/agent/hosted/cloud-agent-config.d.ts.map +1 -1
- package/esm/src/agent/hosted/cloud-runtime-system-messages.d.ts +16 -1
- package/esm/src/agent/hosted/cloud-runtime-system-messages.d.ts.map +1 -1
- package/esm/src/agent/hosted/cloud-runtime-system-messages.js +13 -3
- package/esm/src/agent/hosted/default-chat-runtime.d.ts +2 -1
- package/esm/src/agent/hosted/default-chat-runtime.d.ts.map +1 -1
- package/esm/src/agent/hosted/default-chat-runtime.js +18 -7
- package/esm/src/agent/hosted/default-invoke-agent-tool.d.ts +2 -1
- package/esm/src/agent/hosted/default-invoke-agent-tool.d.ts.map +1 -1
- package/esm/src/agent/hosted/default-invoke-agent-tool.js +11 -3
- package/esm/src/agent/hosted/default-project-steering-refresh.d.ts +2 -1
- package/esm/src/agent/hosted/default-project-steering-refresh.d.ts.map +1 -1
- package/esm/src/agent/hosted/default-project-steering-refresh.js +4 -1
- package/esm/src/agent/hosted/runtime-state-resolver.d.ts +6 -4
- package/esm/src/agent/hosted/runtime-state-resolver.d.ts.map +1 -1
- package/esm/src/agent/hosted/runtime-state-resolver.js +8 -11
- package/esm/src/agent/index.d.ts +3 -3
- package/esm/src/agent/index.d.ts.map +1 -1
- package/esm/src/agent/project/agent-runtime.d.ts.map +1 -1
- package/esm/src/agent/project/agent-runtime.js +6 -3
- package/esm/src/agent/runtime/agent-definition.d.ts +68 -66
- package/esm/src/agent/runtime/agent-definition.d.ts.map +1 -1
- package/esm/src/agent/runtime/agent-definition.js +15 -2
- package/esm/src/agent/runtime/agent-invocation-contract.d.ts +2 -0
- package/esm/src/agent/runtime/agent-invocation-contract.d.ts.map +1 -1
- package/esm/src/agent/runtime/agent-markdown-adapter.js +1 -1
- package/esm/src/agent/runtime/agent-runtime-step.d.ts +11 -5
- package/esm/src/agent/runtime/agent-runtime-step.d.ts.map +1 -1
- package/esm/src/agent/runtime/agent-runtime-step.js +23 -6
- package/esm/src/agent/runtime/call-context.d.ts +42 -11
- package/esm/src/agent/runtime/call-context.d.ts.map +1 -1
- package/esm/src/agent/runtime/call-context.js +480 -42
- package/esm/src/agent/runtime/chat-stream-handler.d.ts +18 -0
- package/esm/src/agent/runtime/chat-stream-handler.d.ts.map +1 -1
- package/esm/src/agent/runtime/chat-stream-handler.js +38 -18
- package/esm/src/agent/runtime/effective-agent-system.d.ts +13 -4
- package/esm/src/agent/runtime/effective-agent-system.d.ts.map +1 -1
- package/esm/src/agent/runtime/effective-agent-system.js +29 -0
- package/esm/src/agent/runtime/index.d.ts +1 -0
- package/esm/src/agent/runtime/index.d.ts.map +1 -1
- package/esm/src/agent/runtime/index.js +638 -53
- package/esm/src/agent/runtime/load-skill-tool.d.ts +33 -3
- package/esm/src/agent/runtime/load-skill-tool.d.ts.map +1 -1
- package/esm/src/agent/runtime/load-skill-tool.js +152 -21
- package/esm/src/agent/runtime/model-resolution.d.ts +3 -0
- package/esm/src/agent/runtime/model-resolution.d.ts.map +1 -1
- package/esm/src/agent/runtime/model-resolution.js +14 -0
- package/esm/src/agent/runtime/model-transport.d.ts +1 -0
- package/esm/src/agent/runtime/model-transport.d.ts.map +1 -1
- package/esm/src/agent/runtime/model-transport.js +5 -2
- package/esm/src/agent/runtime/run-runtime-context.d.ts +4 -0
- package/esm/src/agent/runtime/run-runtime-context.d.ts.map +1 -1
- package/esm/src/agent/runtime/run-runtime-context.js +9 -3
- package/esm/src/agent/runtime/runtime-tool-config.d.ts +1 -0
- package/esm/src/agent/runtime/runtime-tool-config.d.ts.map +1 -1
- package/esm/src/agent/runtime/skill-prompt.d.ts +3 -0
- package/esm/src/agent/runtime/skill-prompt.d.ts.map +1 -1
- package/esm/src/agent/runtime/skill-prompt.js +113 -25
- package/esm/src/agent/runtime/streamed-assistant-message.d.ts +22 -2
- package/esm/src/agent/runtime/streamed-assistant-message.d.ts.map +1 -1
- package/esm/src/agent/runtime/streamed-assistant-message.js +26 -5
- package/esm/src/agent/runtime/tool-inventory.d.ts.map +1 -1
- package/esm/src/agent/runtime/tool-inventory.js +13 -9
- package/esm/src/agent/runtime/tool-result-continuation.d.ts +4 -2
- package/esm/src/agent/runtime/tool-result-continuation.d.ts.map +1 -1
- package/esm/src/agent/runtime/tool-result-continuation.js +24 -20
- package/esm/src/agent/schemas/agent.schema.d.ts +2 -2
- package/esm/src/agent/service/runtime.js +1 -1
- package/esm/src/agent/streaming/fork-runtime-stream.d.ts +5 -4
- package/esm/src/agent/streaming/fork-runtime-stream.d.ts.map +1 -1
- package/esm/src/agent/types.d.ts +14 -1
- package/esm/src/agent/types.d.ts.map +1 -1
- package/esm/src/chat/chat-ui-message-helpers.d.ts.map +1 -1
- package/esm/src/chat/chat-ui-message-helpers.js +75 -16
- package/esm/src/config/loader.d.ts.map +1 -1
- package/esm/src/config/loader.js +37 -1
- package/esm/src/errors/catalog/build-errors.d.ts.map +1 -1
- package/esm/src/errors/catalog/build-errors.js +14 -0
- package/esm/src/errors/error-registry/build.d.ts +2 -0
- package/esm/src/errors/error-registry/build.d.ts.map +1 -1
- package/esm/src/errors/error-registry/build.js +8 -0
- package/esm/src/errors/error-registry/deploy.d.ts +4 -0
- package/esm/src/errors/error-registry/deploy.d.ts.map +1 -1
- package/esm/src/errors/error-registry/deploy.js +16 -0
- package/esm/src/errors/error-registry.d.ts +3 -0
- package/esm/src/errors/error-registry.d.ts.map +1 -1
- package/esm/src/errors/index.d.ts +2 -1
- package/esm/src/errors/index.d.ts.map +1 -1
- package/esm/src/errors/index.js +4 -3
- package/esm/src/errors/tenant-classification.d.ts +25 -0
- package/esm/src/errors/tenant-classification.d.ts.map +1 -0
- package/esm/src/errors/tenant-classification.js +61 -0
- package/esm/src/extensions/builtin-extensions.d.ts +10 -15
- package/esm/src/extensions/builtin-extensions.d.ts.map +1 -1
- package/esm/src/extensions/builtin-extensions.js +32 -26
- package/esm/src/extensions/deferred-extension.d.ts +4 -4
- package/esm/src/extensions/deferred-extension.js +4 -4
- package/esm/src/extensions/index.d.ts +1 -0
- package/esm/src/extensions/index.d.ts.map +1 -1
- package/esm/src/extensions/index.js +1 -0
- package/esm/src/html/hydration-script-builder/hydration-runtime.generated.js +1 -1
- package/esm/src/integrations/_data.d.ts.map +1 -1
- package/esm/src/integrations/_data.js +6 -0
- package/esm/src/integrations/schema.d.ts +8 -0
- package/esm/src/integrations/schema.d.ts.map +1 -1
- package/esm/src/integrations/schema.js +3 -0
- package/esm/src/integrations/types.d.ts +2 -0
- package/esm/src/integrations/types.d.ts.map +1 -1
- package/esm/src/internal-agents/run-stream.d.ts.map +1 -1
- package/esm/src/internal-agents/run-stream.js +35 -20
- package/esm/src/internal-agents/run-system-prompt.d.ts +7 -2
- package/esm/src/internal-agents/run-system-prompt.d.ts.map +1 -1
- package/esm/src/internal-agents/run-system-prompt.js +19 -13
- package/esm/src/internal-agents/schema.d.ts +2 -0
- package/esm/src/internal-agents/schema.d.ts.map +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts.map +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/loader.js +2 -18
- package/esm/src/modules/react-loader/ssr-module-loader/ssr-dependency-validator.d.ts +11 -0
- package/esm/src/modules/react-loader/ssr-module-loader/ssr-dependency-validator.d.ts.map +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/ssr-dependency-validator.js +53 -6
- package/esm/src/observability/application-error-contract.d.ts +4 -0
- package/esm/src/observability/application-error-contract.d.ts.map +1 -1
- package/esm/src/observability/application-errors.d.ts.map +1 -1
- package/esm/src/observability/application-errors.js +64 -3
- package/esm/src/platform/adapters/runtime/deno/http-server.d.ts.map +1 -1
- package/esm/src/platform/adapters/runtime/deno/http-server.js +2 -10
- package/esm/src/platform/adapters/runtime/shared/request-peer.d.ts +14 -0
- package/esm/src/platform/adapters/runtime/shared/request-peer.d.ts.map +1 -1
- package/esm/src/platform/adapters/runtime/shared/request-peer.js +82 -0
- package/esm/src/platform/compat/http/pinned-fetch.d.ts +1 -1
- package/esm/src/provider/runtime-loader/provider-http.d.ts +5 -1
- package/esm/src/provider/runtime-loader/provider-http.d.ts.map +1 -1
- package/esm/src/provider/runtime-loader/provider-http.js +55 -17
- package/esm/src/provider/shared/index.d.ts +1 -0
- package/esm/src/provider/shared/index.d.ts.map +1 -1
- package/esm/src/provider/shared/index.js +2 -0
- package/esm/src/provider/types.d.ts +1 -0
- package/esm/src/provider/types.d.ts.map +1 -1
- package/esm/src/react/components/ui/adapter/builtin/combobox.d.ts +3 -0
- package/esm/src/react/components/ui/adapter/builtin/combobox.d.ts.map +1 -0
- package/esm/src/react/components/ui/adapter/builtin/combobox.js +204 -0
- package/esm/src/react/components/ui/adapter/builtin/dialog.d.ts +3 -0
- package/esm/src/react/components/ui/adapter/builtin/dialog.d.ts.map +1 -0
- package/esm/src/react/components/ui/adapter/builtin/dialog.js +20 -0
- package/esm/src/react/components/ui/adapter/builtin/drawer.d.ts +3 -0
- package/esm/src/react/components/ui/adapter/builtin/drawer.d.ts.map +1 -0
- package/esm/src/react/components/ui/adapter/builtin/drawer.js +21 -0
- package/esm/src/react/components/ui/adapter/builtin/index.d.ts.map +1 -1
- package/esm/src/react/components/ui/adapter/builtin/index.js +10 -0
- package/esm/src/react/components/ui/adapter/builtin/popover.d.ts +3 -0
- package/esm/src/react/components/ui/adapter/builtin/popover.d.ts.map +1 -0
- package/esm/src/react/components/ui/adapter/builtin/popover.js +28 -0
- package/esm/src/react/components/ui/adapter/builtin/tabs.d.ts +3 -0
- package/esm/src/react/components/ui/adapter/builtin/tabs.d.ts.map +1 -0
- package/esm/src/react/components/ui/adapter/builtin/tabs.js +73 -0
- package/esm/src/react/components/ui/adapter/context.d.ts.map +1 -1
- package/esm/src/react/components/ui/adapter/context.js +10 -0
- package/esm/src/react/components/ui/adapter/contract.d.ts +212 -0
- package/esm/src/react/components/ui/adapter/contract.d.ts.map +1 -1
- package/esm/src/react/components/ui/adapter/token-scope.d.ts +24 -0
- package/esm/src/react/components/ui/adapter/token-scope.d.ts.map +1 -0
- package/esm/src/react/components/ui/adapter/token-scope.js +26 -0
- package/esm/src/react/components/ui/alert-dialog.d.ts +101 -0
- package/esm/src/react/components/ui/alert-dialog.d.ts.map +1 -0
- package/esm/src/react/components/ui/alert-dialog.js +181 -0
- package/esm/src/react/components/ui/aspect-ratio.d.ts +18 -0
- package/esm/src/react/components/ui/aspect-ratio.d.ts.map +1 -0
- package/esm/src/react/components/ui/aspect-ratio.js +13 -0
- package/esm/src/react/components/ui/autocomplete.d.ts +67 -0
- package/esm/src/react/components/ui/autocomplete.d.ts.map +1 -0
- package/esm/src/react/components/ui/autocomplete.js +59 -0
- package/esm/src/react/components/ui/breadcrumb.d.ts +86 -0
- package/esm/src/react/components/ui/breadcrumb.d.ts.map +1 -0
- package/esm/src/react/components/ui/breadcrumb.js +67 -0
- package/esm/src/react/components/ui/calendar.d.ts +40 -0
- package/esm/src/react/components/ui/calendar.d.ts.map +1 -0
- package/esm/src/react/components/ui/calendar.js +170 -0
- package/esm/src/react/components/ui/combobox.d.ts +74 -0
- package/esm/src/react/components/ui/combobox.d.ts.map +1 -0
- package/esm/src/react/components/ui/combobox.js +100 -0
- package/esm/src/react/components/ui/context-menu.d.ts +116 -0
- package/esm/src/react/components/ui/context-menu.d.ts.map +1 -0
- package/esm/src/react/components/ui/context-menu.js +168 -0
- package/esm/src/react/components/ui/date-picker.d.ts +69 -0
- package/esm/src/react/components/ui/date-picker.d.ts.map +1 -0
- package/esm/src/react/components/ui/date-picker.js +96 -0
- package/esm/src/react/components/ui/dialog.d.ts +41 -11
- package/esm/src/react/components/ui/dialog.d.ts.map +1 -1
- package/esm/src/react/components/ui/dialog.js +47 -28
- package/esm/src/react/components/ui/drawer.d.ts +31 -8
- package/esm/src/react/components/ui/drawer.d.ts.map +1 -1
- package/esm/src/react/components/ui/drawer.js +33 -22
- package/esm/src/react/components/ui/dropdown-menu.d.ts.map +1 -1
- package/esm/src/react/components/ui/dropdown-menu.js +7 -75
- package/esm/src/react/components/ui/field.d.ts +70 -0
- package/esm/src/react/components/ui/field.d.ts.map +1 -0
- package/esm/src/react/components/ui/field.js +161 -0
- package/esm/src/react/components/ui/file-type.d.ts +9 -8
- package/esm/src/react/components/ui/file-type.d.ts.map +1 -1
- package/esm/src/react/components/ui/file-type.js +8 -8
- package/esm/src/react/components/ui/hover-card.d.ts +82 -0
- package/esm/src/react/components/ui/hover-card.d.ts.map +1 -0
- package/esm/src/react/components/ui/hover-card.js +140 -0
- package/esm/src/react/components/ui/index.d.ts +23 -2
- package/esm/src/react/components/ui/index.d.ts.map +1 -1
- package/esm/src/react/components/ui/index.js +21 -0
- package/esm/src/react/components/ui/input-otp.d.ts +37 -0
- package/esm/src/react/components/ui/input-otp.d.ts.map +1 -0
- package/esm/src/react/components/ui/input-otp.js +42 -0
- package/esm/src/react/components/ui/menu-keyboard.d.ts +8 -0
- package/esm/src/react/components/ui/menu-keyboard.d.ts.map +1 -0
- package/esm/src/react/components/ui/menu-keyboard.js +76 -0
- package/esm/src/react/components/ui/menubar.d.ts +98 -0
- package/esm/src/react/components/ui/menubar.d.ts.map +1 -0
- package/esm/src/react/components/ui/menubar.js +173 -0
- package/esm/src/react/components/ui/meter.d.ts +45 -0
- package/esm/src/react/components/ui/meter.d.ts.map +1 -0
- package/esm/src/react/components/ui/meter.js +59 -0
- package/esm/src/react/components/ui/modal-surface.d.ts +7 -1
- package/esm/src/react/components/ui/modal-surface.d.ts.map +1 -1
- package/esm/src/react/components/ui/modal-surface.js +23 -6
- package/esm/src/react/components/ui/navigation-menu.d.ts +101 -0
- package/esm/src/react/components/ui/navigation-menu.d.ts.map +1 -0
- package/esm/src/react/components/ui/navigation-menu.js +195 -0
- package/esm/src/react/components/ui/number-field.d.ts +46 -0
- package/esm/src/react/components/ui/number-field.d.ts.map +1 -0
- package/esm/src/react/components/ui/number-field.js +121 -0
- package/esm/src/react/components/ui/pagination.d.ts +77 -0
- package/esm/src/react/components/ui/pagination.d.ts.map +1 -0
- package/esm/src/react/components/ui/pagination.js +62 -0
- package/esm/src/react/components/ui/popover.d.ts +42 -13
- package/esm/src/react/components/ui/popover.d.ts.map +1 -1
- package/esm/src/react/components/ui/popover.js +25 -12
- package/esm/src/react/components/ui/scroll-area.d.ts +38 -0
- package/esm/src/react/components/ui/scroll-area.d.ts.map +1 -0
- package/esm/src/react/components/ui/scroll-area.js +35 -0
- package/esm/src/react/components/ui/separator.d.ts +20 -0
- package/esm/src/react/components/ui/separator.d.ts.map +1 -0
- package/esm/src/react/components/ui/separator.js +13 -0
- package/esm/src/react/components/ui/slider.d.ts +44 -0
- package/esm/src/react/components/ui/slider.d.ts.map +1 -0
- package/esm/src/react/components/ui/slider.js +46 -0
- package/esm/src/react/components/ui/status.d.ts +6 -5
- package/esm/src/react/components/ui/status.d.ts.map +1 -1
- package/esm/src/react/components/ui/status.js +4 -4
- package/esm/src/react/components/ui/tabs.d.ts +32 -9
- package/esm/src/react/components/ui/tabs.d.ts.map +1 -1
- package/esm/src/react/components/ui/tabs.js +46 -22
- package/esm/src/react/components/ui/toggle.d.ts +26 -0
- package/esm/src/react/components/ui/toggle.d.ts.map +1 -0
- package/esm/src/react/components/ui/toggle.js +29 -0
- package/esm/src/react/components/ui/use-isomorphic-layout-effect.d.ts +2 -1
- package/esm/src/react/components/ui/use-isomorphic-layout-effect.d.ts.map +1 -1
- package/esm/src/react/components/ui/use-isomorphic-layout-effect.js +6 -3
- package/esm/src/rendering/chunk-optimizer/source-imports.d.ts.map +1 -1
- package/esm/src/rendering/chunk-optimizer/source-imports.js +4 -114
- package/esm/src/rendering/orchestrator/css-candidate-manifest.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/css-candidate-manifest.js +30 -1
- package/esm/src/rendering/orchestrator/module-loader/build-failure.d.ts +10 -0
- package/esm/src/rendering/orchestrator/module-loader/build-failure.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/build-failure.js +50 -3
- package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.d.ts +2 -0
- package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/dependency-resolver.js +21 -6
- package/esm/src/rendering/orchestrator/module-loader/index.d.ts +2 -1
- package/esm/src/rendering/orchestrator/module-loader/index.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/index.js +190 -7
- package/esm/src/rendering/orchestrator/module-loader/module-persistence.d.ts +4 -0
- package/esm/src/rendering/orchestrator/module-loader/module-persistence.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/module-persistence.js +374 -7
- package/esm/src/rendering/orchestrator/pipeline.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/pipeline.js +12 -1
- package/esm/src/runs/runs-client.d.ts +2 -4
- package/esm/src/runs/runs-client.d.ts.map +1 -1
- package/esm/src/runs/schemas.d.ts +18 -8
- package/esm/src/runs/schemas.d.ts.map +1 -1
- package/esm/src/runs/schemas.js +26 -0
- package/esm/src/runtime/model-call-context.d.ts +6 -1
- package/esm/src/runtime/model-call-context.d.ts.map +1 -1
- package/esm/src/runtime/runtime-bridge.d.ts.map +1 -1
- package/esm/src/runtime/runtime-bridge.js +133 -15
- package/esm/src/schedule/factory.d.ts +8 -2
- package/esm/src/schedule/factory.d.ts.map +1 -1
- package/esm/src/schedule/factory.js +0 -8
- package/esm/src/schedule/index.d.ts +10 -1
- package/esm/src/schedule/index.d.ts.map +1 -1
- package/esm/src/schedule/index.js +9 -0
- package/esm/src/schedule/types.d.ts +30 -11
- package/esm/src/schedule/types.d.ts.map +1 -1
- package/esm/src/schedule/validation.d.ts +17 -0
- package/esm/src/schedule/validation.d.ts.map +1 -1
- package/esm/src/schedule/validation.js +93 -5
- package/esm/src/security/sandbox/worker-pool.d.ts.map +1 -1
- package/esm/src/security/sandbox/worker-pool.js +6 -1
- package/esm/src/server/bootstrap.d.ts.map +1 -1
- package/esm/src/server/bootstrap.js +6 -0
- package/esm/src/server/dev-server/index.d.ts +1 -1
- package/esm/src/server/dev-server/index.d.ts.map +1 -1
- package/esm/src/server/dev-server/server.d.ts +7 -3
- package/esm/src/server/dev-server/server.d.ts.map +1 -1
- package/esm/src/server/dev-server/server.js +12 -3
- package/esm/src/server/dev-server/types.d.ts +7 -1
- package/esm/src/server/dev-server/types.d.ts.map +1 -1
- package/esm/src/server/dev-server.d.ts +1 -1
- package/esm/src/server/dev-server.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.js +2509 -34
- package/esm/src/server/handlers/dev/projects/index.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/projects/index.js +3 -0
- package/esm/src/server/handlers/request/agent-stream.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/agent-stream.handler.js +29 -24
- package/esm/src/server/index.d.ts +3 -3
- package/esm/src/server/index.d.ts.map +1 -1
- package/esm/src/server/index.js +10 -5
- package/esm/src/server/node-handler.d.ts.map +1 -1
- package/esm/src/server/node-handler.js +4 -1
- package/esm/src/server/production-server.d.ts.map +1 -1
- package/esm/src/server/production-server.js +2 -1
- package/esm/src/server/project-env/cache.d.ts +17 -0
- package/esm/src/server/project-env/cache.d.ts.map +1 -1
- package/esm/src/server/project-env/cache.js +78 -2
- package/esm/src/server/project-env/fetcher.d.ts.map +1 -1
- package/esm/src/server/project-env/fetcher.js +24 -14
- package/esm/src/server/project-env/index.d.ts +1 -1
- package/esm/src/server/project-env/index.d.ts.map +1 -1
- package/esm/src/server/project-env/index.js +1 -1
- package/esm/src/server/project-env/internal-authorization.d.ts +7 -0
- package/esm/src/server/project-env/internal-authorization.d.ts.map +1 -0
- package/esm/src/server/project-env/internal-authorization.js +32 -0
- package/esm/src/server/runtime-handler/index.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/index.js +1 -1
- package/esm/src/server/runtime-handler/projects-handler.d.ts +1 -1
- package/esm/src/server/runtime-handler/projects-handler.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/projects-handler.js +4 -2
- package/esm/src/transforms/esm/http-bundler.d.ts.map +1 -1
- package/esm/src/transforms/esm/http-bundler.js +6 -5
- package/esm/src/transforms/esm/http-cache-helpers.d.ts +11 -0
- package/esm/src/transforms/esm/http-cache-helpers.d.ts.map +1 -1
- package/esm/src/transforms/esm/http-cache-helpers.js +35 -0
- package/esm/src/transforms/esm/http-cache.d.ts.map +1 -1
- package/esm/src/transforms/esm/http-cache.js +16 -10
- package/esm/src/transforms/esm/specifier-resolver.d.ts.map +1 -1
- package/esm/src/transforms/esm/specifier-resolver.js +87 -7
- package/esm/src/transforms/import-rewriter/strategies/alias-strategy.d.ts +2 -0
- package/esm/src/transforms/import-rewriter/strategies/alias-strategy.d.ts.map +1 -1
- package/esm/src/transforms/import-rewriter/strategies/alias-strategy.js +11 -6
- package/esm/src/transforms/md/compiler/md-compiler.d.ts.map +1 -1
- package/esm/src/transforms/md/compiler/md-compiler.js +12 -5
- package/esm/src/transforms/mdx/compiler/frontmatter-extractor.d.ts +2 -0
- package/esm/src/transforms/mdx/compiler/frontmatter-extractor.d.ts.map +1 -1
- package/esm/src/transforms/mdx/compiler/frontmatter-extractor.js +33 -1
- package/esm/src/transforms/mdx/compiler/mdx-compiler.d.ts.map +1 -1
- package/esm/src/transforms/mdx/compiler/mdx-compiler.js +46 -7
- package/esm/src/transforms/mdx/esm-module-loader/cache/index.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/cache/index.js +8 -2
- package/esm/src/transforms/mdx/esm-module-loader/cache-format.d.ts +1 -0
- package/esm/src/transforms/mdx/esm-module-loader/cache-format.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/cache-format.js +3 -0
- package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.d.ts +4 -0
- package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/loader-helpers.js +44 -8
- package/esm/src/transforms/mdx/esm-module-loader/missing-module.d.ts +2 -0
- package/esm/src/transforms/mdx/esm-module-loader/missing-module.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/missing-module.js +4 -0
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.js +5 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.d.ts +2 -0
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fetcher.js +50 -11
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/nested-imports.d.ts +24 -12
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/nested-imports.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/nested-imports.js +201 -18
- package/esm/src/transforms/mdx/esm-module-loader/types.d.ts +5 -0
- package/esm/src/transforms/mdx/esm-module-loader/types.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/utils/source-spans.d.ts +22 -2
- package/esm/src/transforms/mdx/esm-module-loader/utils/source-spans.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/utils/source-spans.js +2080 -129
- package/esm/src/transforms/mdx/esm-module-loader/utils/stub-module.d.ts +11 -1
- package/esm/src/transforms/mdx/esm-module-loader/utils/stub-module.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/utils/stub-module.js +32 -15
- package/esm/src/transforms/pipeline/stages/compile.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/stages/compile.js +44 -0
- package/esm/src/transforms/shared/specifier-suffix.d.ts +25 -0
- package/esm/src/transforms/shared/specifier-suffix.d.ts.map +1 -0
- package/esm/src/transforms/shared/specifier-suffix.js +43 -0
- package/esm/src/trigger/index.d.ts +2 -2
- package/esm/src/trigger/index.d.ts.map +1 -1
- package/esm/src/trigger/index.js +1 -1
- package/esm/src/trigger/local-runner.d.ts +2 -2
- package/esm/src/trigger/local-runner.d.ts.map +1 -1
- package/esm/src/trigger/local-runner.js +11 -4
- package/esm/src/trigger/target.d.ts +97 -5
- package/esm/src/trigger/target.d.ts.map +1 -1
- package/esm/src/trigger/target.js +175 -5
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/esm/src/webhook/types.d.ts +21 -6
- package/esm/src/webhook/types.d.ts.map +1 -1
- package/esm/src/webhook/validation.d.ts.map +1 -1
- package/esm/src/webhook/validation.js +27 -39
- package/esm/templates/index.d.ts +1 -1
- package/esm/templates/index.d.ts.map +1 -1
- package/esm/templates/loader.d.ts +6 -6
- package/esm/templates/loader.d.ts.map +1 -1
- package/esm/templates/loader.js +34 -18
- package/esm/templates/manifest.generated.d.ts +3 -0
- package/esm/templates/manifest.generated.d.ts.map +1 -0
- package/esm/templates/manifest.generated.js +2 -0
- package/package.json +8 -8
- package/esm/templates/manifest.d.ts +0 -664
- package/esm/templates/manifest.d.ts.map +0 -1
- package/esm/templates/manifest.js +0 -662
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DatePicker: a button that opens a {@link Popover} holding a {@link Calendar};
|
|
3
|
+
* picking a day sets the value and closes the surface. Composition-only: all
|
|
4
|
+
* overlay behaviour (portal into the token scope, positioning, outside-click /
|
|
5
|
+
* `Escape` dismiss) is reused from Popover, and the month grid is the shared
|
|
6
|
+
* Calendar: nothing is re-implemented here. Both the selected `value` and the
|
|
7
|
+
* `open` state support controlled and uncontrolled use; the parts share
|
|
8
|
+
* value/open/format through context. Skinned with the veryfront theme tokens.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import { DatePicker, DatePickerContent, DatePickerTrigger } from "veryfront/ui";
|
|
13
|
+
*
|
|
14
|
+
* function Example() {
|
|
15
|
+
* const [date, setDate] = React.useState<Date>();
|
|
16
|
+
* return (
|
|
17
|
+
* <DatePicker value={date} onChange={setDate}>
|
|
18
|
+
* <DatePickerTrigger />
|
|
19
|
+
* <DatePickerContent />
|
|
20
|
+
* </DatePicker>
|
|
21
|
+
* );
|
|
22
|
+
* }
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @module react/components/ui/date-picker
|
|
26
|
+
*/
|
|
27
|
+
import * as React from "react";
|
|
28
|
+
/** Props accepted by `<DatePicker>`. */
|
|
29
|
+
export interface DatePickerProps {
|
|
30
|
+
/** The trigger and content parts to compose. */
|
|
31
|
+
children: React.ReactNode;
|
|
32
|
+
/** Controlled selected day (pair with `onChange`). @default undefined */
|
|
33
|
+
value?: Date;
|
|
34
|
+
/** Initial selected day when uncontrolled. @default undefined */
|
|
35
|
+
defaultValue?: Date;
|
|
36
|
+
/** Fires with the picked day. @default undefined */
|
|
37
|
+
onChange?: (date: Date) => void;
|
|
38
|
+
/** Controlled open state (pair with `onOpenChange`). @default undefined */
|
|
39
|
+
open?: boolean;
|
|
40
|
+
/** Initial open state when uncontrolled. @default false */
|
|
41
|
+
defaultOpen?: boolean;
|
|
42
|
+
/** Fires when the popover open state changes. @default undefined */
|
|
43
|
+
onOpenChange?: (open: boolean) => void;
|
|
44
|
+
/** Trigger label shown when no value is selected. @default "Pick a date" */
|
|
45
|
+
placeholder?: string;
|
|
46
|
+
/** Formats the selected day into the trigger's label. @default (d) => d.toLocaleDateString() */
|
|
47
|
+
format?: (date: Date) => string;
|
|
48
|
+
/** Month the calendar shows initially; moved internally by its prev/next buttons. @default value ?? today */
|
|
49
|
+
defaultMonth?: Date;
|
|
50
|
+
}
|
|
51
|
+
/** Root: owns `{ value, open }`, provides context, and renders the Popover. */
|
|
52
|
+
export declare function DatePicker({ children, value, defaultValue, onChange, open, defaultOpen, onOpenChange, placeholder, format, defaultMonth, }: DatePickerProps): React.ReactElement;
|
|
53
|
+
/** Props accepted by `<DatePickerTrigger>`. */
|
|
54
|
+
export interface DatePickerTriggerProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
55
|
+
/** React 19: ref is a regular prop. */
|
|
56
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
57
|
+
}
|
|
58
|
+
/** The field-styled button that shows the formatted value (or placeholder) and opens the popover. */
|
|
59
|
+
export declare function DatePickerTrigger({ className, ref, ...props }: DatePickerTriggerProps): React.ReactElement;
|
|
60
|
+
/** Props accepted by `<DatePickerContent>`. */
|
|
61
|
+
export interface DatePickerContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
62
|
+
/** Horizontal alignment of the surface relative to the trigger. @default "start" */
|
|
63
|
+
align?: "start" | "end";
|
|
64
|
+
/** React 19: ref is a regular prop. */
|
|
65
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
66
|
+
}
|
|
67
|
+
/** The Popover surface wrapping the {@link Calendar}; picking a day commits it and closes. */
|
|
68
|
+
export declare function DatePickerContent({ className, align, ref, ...props }: DatePickerContentProps): React.ReactElement;
|
|
69
|
+
//# sourceMappingURL=date-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/ui/date-picker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;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G,KAAK,CAAC,YAAY,CA6B7C;AAED,+CAA+C;AAC/C,MAAM,WAAW,sBAAuB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAClF,oFAAoF;IACpF,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACxB,uCAAuC;IACvC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC;AAED,8FAA8F;AAC9F,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,KAAe,EACf,GAAG,EACH,GAAG,KAAK,EACT,EAAE,sBAAsB,GAAG,KAAK,CAAC,YAAY,CAoB7C"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DatePicker: a button that opens a {@link Popover} holding a {@link Calendar};
|
|
3
|
+
* picking a day sets the value and closes the surface. Composition-only: all
|
|
4
|
+
* overlay behaviour (portal into the token scope, positioning, outside-click /
|
|
5
|
+
* `Escape` dismiss) is reused from Popover, and the month grid is the shared
|
|
6
|
+
* Calendar: nothing is re-implemented here. Both the selected `value` and the
|
|
7
|
+
* `open` state support controlled and uncontrolled use; the parts share
|
|
8
|
+
* value/open/format through context. Skinned with the veryfront theme tokens.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import { DatePicker, DatePickerContent, DatePickerTrigger } from "veryfront/ui";
|
|
13
|
+
*
|
|
14
|
+
* function Example() {
|
|
15
|
+
* const [date, setDate] = React.useState<Date>();
|
|
16
|
+
* return (
|
|
17
|
+
* <DatePicker value={date} onChange={setDate}>
|
|
18
|
+
* <DatePickerTrigger />
|
|
19
|
+
* <DatePickerContent />
|
|
20
|
+
* </DatePicker>
|
|
21
|
+
* );
|
|
22
|
+
* }
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @module react/components/ui/date-picker
|
|
26
|
+
*/
|
|
27
|
+
import * as React from "react";
|
|
28
|
+
import { cx as cn } from "./cva.js";
|
|
29
|
+
import { Calendar } from "./calendar.js";
|
|
30
|
+
import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
|
|
31
|
+
import { composeRefs } from "./slot.js";
|
|
32
|
+
const DatePickerContext = React.createContext(null);
|
|
33
|
+
function useDatePickerContext(part) {
|
|
34
|
+
const ctx = React.useContext(DatePickerContext);
|
|
35
|
+
if (!ctx)
|
|
36
|
+
throw new Error(`<${part}> must be used within <DatePicker>`);
|
|
37
|
+
return ctx;
|
|
38
|
+
}
|
|
39
|
+
/** Root: owns `{ value, open }`, provides context, and renders the Popover. */
|
|
40
|
+
export function DatePicker({ children, value, defaultValue, onChange, open, defaultOpen, onOpenChange, placeholder = "Pick a date", format = (date) => date.toLocaleDateString(), defaultMonth, }) {
|
|
41
|
+
const valueControlled = value !== undefined;
|
|
42
|
+
const [internalValue, setInternalValue] = React.useState(defaultValue);
|
|
43
|
+
const currentValue = valueControlled ? value : internalValue;
|
|
44
|
+
const openControlled = open !== undefined;
|
|
45
|
+
const [internalOpen, setInternalOpen] = React.useState(defaultOpen ?? false);
|
|
46
|
+
const currentOpen = openControlled ? open : internalOpen;
|
|
47
|
+
const triggerRef = React.useRef(null);
|
|
48
|
+
const setValue = React.useCallback((date) => {
|
|
49
|
+
if (!valueControlled)
|
|
50
|
+
setInternalValue(date);
|
|
51
|
+
onChange?.(date);
|
|
52
|
+
}, [valueControlled, onChange]);
|
|
53
|
+
const setOpen = React.useCallback((next) => {
|
|
54
|
+
if (!openControlled)
|
|
55
|
+
setInternalOpen(next);
|
|
56
|
+
onOpenChange?.(next);
|
|
57
|
+
}, [openControlled, onOpenChange]);
|
|
58
|
+
const ctx = React.useMemo(() => ({
|
|
59
|
+
value: currentValue,
|
|
60
|
+
setValue,
|
|
61
|
+
open: currentOpen,
|
|
62
|
+
setOpen,
|
|
63
|
+
placeholder,
|
|
64
|
+
format,
|
|
65
|
+
defaultMonth,
|
|
66
|
+
triggerRef,
|
|
67
|
+
}), [currentValue, setValue, currentOpen, setOpen, placeholder, format, defaultMonth, triggerRef]);
|
|
68
|
+
return (React.createElement(DatePickerContext.Provider, { value: ctx },
|
|
69
|
+
React.createElement(Popover, { open: currentOpen, onOpenChange: setOpen }, children)));
|
|
70
|
+
}
|
|
71
|
+
/** A calendar glyph rendered at the trailing edge of the trigger. */
|
|
72
|
+
function CalendarIcon() {
|
|
73
|
+
return (React.createElement("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", className: "size-4 shrink-0 text-[var(--muted-foreground)]" },
|
|
74
|
+
React.createElement("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2" }),
|
|
75
|
+
React.createElement("path", { d: "M16 2v4M8 2v4M3 10h18" })));
|
|
76
|
+
}
|
|
77
|
+
/** The field-styled button that shows the formatted value (or placeholder) and opens the popover. */
|
|
78
|
+
export function DatePickerTrigger({ className, ref, ...props }) {
|
|
79
|
+
const ctx = useDatePickerContext("DatePickerTrigger");
|
|
80
|
+
const empty = ctx.value == null;
|
|
81
|
+
const composedRef = React.useMemo(() => composeRefs(ctx.triggerRef, ref), [ctx.triggerRef, ref]);
|
|
82
|
+
return (React.createElement(PopoverTrigger, { asChild: true },
|
|
83
|
+
React.createElement("button", { ref: composedRef, type: "button", "data-empty": empty ? "true" : undefined, className: cn("inline-flex h-[42px] w-full items-center justify-between gap-2 rounded-md px-3 text-base", "border border-[var(--input)] bg-[var(--background)] text-[var(--foreground)]", "transition-[background-color,color] duration-150 ease-in", "hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)]", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]", "data-[empty=true]:text-[var(--muted-foreground)]", className), ...props },
|
|
84
|
+
React.createElement("span", { className: "truncate" }, empty ? ctx.placeholder : ctx.format(ctx.value)),
|
|
85
|
+
React.createElement(CalendarIcon, null))));
|
|
86
|
+
}
|
|
87
|
+
/** The Popover surface wrapping the {@link Calendar}; picking a day commits it and closes. */
|
|
88
|
+
export function DatePickerContent({ className, align = "start", ref, ...props }) {
|
|
89
|
+
const ctx = useDatePickerContext("DatePickerContent");
|
|
90
|
+
return (React.createElement(PopoverContent, { ref: ref, align: align, className: cn("w-auto min-w-0 p-0", className), ...props },
|
|
91
|
+
React.createElement(Calendar, { value: ctx.value, defaultMonth: ctx.defaultMonth, onChange: (date) => {
|
|
92
|
+
ctx.setValue(date);
|
|
93
|
+
ctx.setOpen(false);
|
|
94
|
+
ctx.triggerRef.current?.focus();
|
|
95
|
+
} })));
|
|
96
|
+
}
|
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* Dialog - BASIC fork of @radix-ui/react-dialog with the same API shape (Root /
|
|
3
|
+
* Trigger / Content + Header / Title / Description / Body / Footer / Action /
|
|
4
|
+
* Cancel / Close / Form). Classes ported 1:1 from Studio's `Dialog` (tokens
|
|
5
|
+
* remapped; `Heading` level 2 + `Text` inlined). Modal overlay + centered panel;
|
|
6
|
+
* dismisses on `Escape` and overlay click. A11y work tracked in modal-surface.tsx.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* import { Button, Dialog, DialogAction, DialogCancel, DialogContent, DialogFooter, DialogTitle, DialogTrigger } from "veryfront/ui";
|
|
11
|
+
*
|
|
12
|
+
* <Dialog>
|
|
13
|
+
* <DialogTrigger asChild><Button variant="destructive">Delete</Button></DialogTrigger>
|
|
14
|
+
* <DialogContent>
|
|
15
|
+
* <DialogTitle>Delete project?</DialogTitle>
|
|
16
|
+
* <DialogFooter>
|
|
17
|
+
* <DialogCancel>Cancel</DialogCancel>
|
|
18
|
+
* <DialogAction onClick={remove}>Delete</DialogAction>
|
|
19
|
+
* </DialogFooter>
|
|
20
|
+
* </DialogContent>
|
|
21
|
+
* </Dialog>;
|
|
22
|
+
* ```
|
|
5
23
|
*
|
|
6
24
|
* @module react/components/ui/dialog
|
|
7
25
|
*/
|
|
@@ -9,35 +27,47 @@ import * as React from "react";
|
|
|
9
27
|
import { type ButtonProps } from "./button.js";
|
|
10
28
|
/** Props accepted by `<Dialog>`. */
|
|
11
29
|
export interface DialogProps {
|
|
30
|
+
/** The trigger and content parts to compose. */
|
|
12
31
|
children: React.ReactNode;
|
|
32
|
+
/** Controlled open state (pair with `onOpenChange`). */
|
|
13
33
|
open?: boolean;
|
|
34
|
+
/** Initial open state when uncontrolled. */
|
|
14
35
|
defaultOpen?: boolean;
|
|
36
|
+
/** Fires when the open state changes. */
|
|
15
37
|
onOpenChange?: (open: boolean) => void;
|
|
16
38
|
}
|
|
17
|
-
/** Dialog root
|
|
39
|
+
/** Dialog root - owns open state. */
|
|
18
40
|
export declare function Dialog(props: DialogProps): React.ReactElement;
|
|
19
|
-
/** Trigger
|
|
41
|
+
/** Trigger - opens the dialog. `asChild` merges onto the child element. */
|
|
20
42
|
export declare function DialogTrigger(props: React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
21
43
|
asChild?: boolean;
|
|
22
44
|
ref?: React.Ref<HTMLButtonElement>;
|
|
23
45
|
}): React.ReactElement;
|
|
24
|
-
/**
|
|
25
|
-
export
|
|
46
|
+
/** Props accepted by `<DialogContent>`. */
|
|
47
|
+
export interface DialogContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
48
|
+
/** React 19: ref is a regular prop, forwarded to the dialog panel. */
|
|
49
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
50
|
+
}
|
|
51
|
+
/** Modal surface - overlay + centered panel, rendered while open. */
|
|
52
|
+
export declare function DialogContent({ className, children, "aria-describedby": describedBy, ...props }: DialogContentProps): React.ReactElement | null;
|
|
26
53
|
/** Left-aligned title + description block. */
|
|
27
54
|
export declare function DialogHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.ReactElement;
|
|
28
|
-
/** Dialog title
|
|
29
|
-
* Studio's medium-on-Söhne weight (workbench heading convention).
|
|
55
|
+
/** Dialog title - Studio Heading level 2 (20px). Semibold so Inter reads at
|
|
56
|
+
* Studio's medium-on-Söhne weight (workbench heading convention). Registers its
|
|
57
|
+
* id with the adapter so the panel adopts `aria-labelledby`. */
|
|
30
58
|
export declare function DialogTitle({ className, id, ...props }: React.HTMLAttributes<HTMLHeadingElement>): React.ReactElement;
|
|
31
|
-
/** Dialog description
|
|
59
|
+
/** Dialog description - body text, left-aligned. Registers its id with the
|
|
60
|
+
* adapter so the panel adopts `aria-describedby`. */
|
|
32
61
|
export declare function DialogDescription({ className, id, ...props }: React.HTMLAttributes<HTMLParagraphElement>): React.ReactElement;
|
|
33
62
|
/** Scrollable body area with a bottom edge-fade. */
|
|
34
63
|
export declare function DialogBody({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>): React.ReactElement;
|
|
35
|
-
/** Sticky footer row
|
|
64
|
+
/** Sticky footer row - action left, cancel right. */
|
|
36
65
|
export declare function DialogFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.ReactElement;
|
|
37
66
|
/** Layout-neutral `<form>` shell (`display: contents`) wrapping header/body/footer. */
|
|
38
67
|
export declare function DialogForm({ className, ...props }: React.FormHTMLAttributes<HTMLFormElement>): React.ReactElement;
|
|
39
68
|
/** Props accepted by `<DialogAction>`. */
|
|
40
69
|
export interface DialogActionProps extends ButtonProps {
|
|
70
|
+
/** Show the pending/pulsing state and block double-submits. */
|
|
41
71
|
isLoading?: boolean;
|
|
42
72
|
}
|
|
43
73
|
/** Recommended action button (primary, default size). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/ui/dialog.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/ui/dialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,KAAK,KAAK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AAC,oBAAoB,CAAC,iBAAiB,CAAC,GAC7C;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;CAAE,GAC5D,KAAK,CAAC,YAAY,CAGpB"}
|
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* Dialog - BASIC fork of @radix-ui/react-dialog with the same API shape (Root /
|
|
3
|
+
* Trigger / Content + Header / Title / Description / Body / Footer / Action /
|
|
4
|
+
* Cancel / Close / Form). Classes ported 1:1 from Studio's `Dialog` (tokens
|
|
5
|
+
* remapped; `Heading` level 2 + `Text` inlined). Modal overlay + centered panel;
|
|
6
|
+
* dismisses on `Escape` and overlay click. A11y work tracked in modal-surface.tsx.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* import { Button, Dialog, DialogAction, DialogCancel, DialogContent, DialogFooter, DialogTitle, DialogTrigger } from "veryfront/ui";
|
|
11
|
+
*
|
|
12
|
+
* <Dialog>
|
|
13
|
+
* <DialogTrigger asChild><Button variant="destructive">Delete</Button></DialogTrigger>
|
|
14
|
+
* <DialogContent>
|
|
15
|
+
* <DialogTitle>Delete project?</DialogTitle>
|
|
16
|
+
* <DialogFooter>
|
|
17
|
+
* <DialogCancel>Cancel</DialogCancel>
|
|
18
|
+
* <DialogAction onClick={remove}>Delete</DialogAction>
|
|
19
|
+
* </DialogFooter>
|
|
20
|
+
* </DialogContent>
|
|
21
|
+
* </Dialog>;
|
|
22
|
+
* ```
|
|
5
23
|
*
|
|
6
24
|
* @module react/components/ui/dialog
|
|
7
25
|
*/
|
|
@@ -9,32 +27,34 @@ import * as React from "react";
|
|
|
9
27
|
import { cx as cn } from "./cva.js";
|
|
10
28
|
import { ScrollFade } from "./scroll-fade.js";
|
|
11
29
|
import { Button, LoadingButton } from "./button.js";
|
|
12
|
-
import {
|
|
30
|
+
import { useAdapter } from "./adapter/context.js";
|
|
13
31
|
import { useIsomorphicLayoutEffect } from "./use-isomorphic-layout-effect.js";
|
|
14
|
-
|
|
15
|
-
// DrawerClose nested inside a Dialog cannot accidentally close the Dialog.
|
|
16
|
-
const { ModalRoot: _Root, useModal: _hook, ModalTrigger: _Trigger, ModalClose: _Close, ModalContent: _Content, } = createModalSurfaceParts("Dialog");
|
|
17
|
-
/** Dialog root — owns open state. */
|
|
32
|
+
/** Dialog root - owns open state. */
|
|
18
33
|
export function Dialog(props) {
|
|
19
|
-
|
|
34
|
+
const { dialog } = useAdapter();
|
|
35
|
+
return React.createElement(dialog.Root, { ...props });
|
|
20
36
|
}
|
|
21
|
-
/** Trigger
|
|
37
|
+
/** Trigger - opens the dialog. `asChild` merges onto the child element. */
|
|
22
38
|
export function DialogTrigger(props) {
|
|
23
|
-
|
|
39
|
+
const { dialog } = useAdapter();
|
|
40
|
+
return React.createElement(dialog.Trigger, { ...props });
|
|
24
41
|
}
|
|
25
|
-
/** Modal surface
|
|
42
|
+
/** Modal surface - overlay + centered panel, rendered while open. */
|
|
26
43
|
export function DialogContent({ className, children, "aria-describedby": describedBy, ...props }) {
|
|
27
|
-
const
|
|
28
|
-
|
|
44
|
+
const { dialog } = useAdapter();
|
|
45
|
+
const modal = dialog.useDialog();
|
|
46
|
+
return (React.createElement(dialog.Content, { "aria-describedby": describedBy ?? (modal.descriptionPresent ? modal.descriptionId : undefined), className: cn("fixed left-1/2 top-1/2 z-50 w-[calc(100%_-_3rem)] max-w-xl max-h-[85vh] -translate-x-1/2 -translate-y-1/2", "rounded-xl bg-[var(--dialog)] text-[var(--foreground)] shadow-lg outline-none overflow-hidden flex flex-col", className), ...props }, children));
|
|
29
47
|
}
|
|
30
48
|
/** Left-aligned title + description block. */
|
|
31
49
|
export function DialogHeader({ className, ...props }) {
|
|
32
50
|
return React.createElement("div", { className: cn("flex flex-col px-6 pt-6 shrink-0", className), ...props });
|
|
33
51
|
}
|
|
34
|
-
/** Dialog title
|
|
35
|
-
* Studio's medium-on-Söhne weight (workbench heading convention).
|
|
52
|
+
/** Dialog title - Studio Heading level 2 (20px). Semibold so Inter reads at
|
|
53
|
+
* Studio's medium-on-Söhne weight (workbench heading convention). Registers its
|
|
54
|
+
* id with the adapter so the panel adopts `aria-labelledby`. */
|
|
36
55
|
export function DialogTitle({ className, id, ...props }) {
|
|
37
|
-
const
|
|
56
|
+
const { dialog } = useAdapter();
|
|
57
|
+
const modal = dialog.useDialog();
|
|
38
58
|
const resolvedId = id ?? modal.defaultTitleId;
|
|
39
59
|
useIsomorphicLayoutEffect(() => {
|
|
40
60
|
modal.setTitleId(resolvedId);
|
|
@@ -43,17 +63,14 @@ export function DialogTitle({ className, id, ...props }) {
|
|
|
43
63
|
modal.setTitlePresent(false);
|
|
44
64
|
modal.setTitleId((current) => current === resolvedId ? modal.defaultTitleId : current);
|
|
45
65
|
};
|
|
46
|
-
}, [
|
|
47
|
-
modal.defaultTitleId,
|
|
48
|
-
modal.setTitleId,
|
|
49
|
-
modal.setTitlePresent,
|
|
50
|
-
resolvedId,
|
|
51
|
-
]);
|
|
66
|
+
}, [modal.defaultTitleId, modal.setTitleId, modal.setTitlePresent, resolvedId]);
|
|
52
67
|
return (React.createElement("h2", { id: resolvedId, className: cn("text-xl font-semibold text-[var(--foreground)]", className), ...props }));
|
|
53
68
|
}
|
|
54
|
-
/** Dialog description
|
|
69
|
+
/** Dialog description - body text, left-aligned. Registers its id with the
|
|
70
|
+
* adapter so the panel adopts `aria-describedby`. */
|
|
55
71
|
export function DialogDescription({ className, id, ...props }) {
|
|
56
|
-
const
|
|
72
|
+
const { dialog } = useAdapter();
|
|
73
|
+
const modal = dialog.useDialog();
|
|
57
74
|
const resolvedId = id ?? modal.defaultDescriptionId;
|
|
58
75
|
useIsomorphicLayoutEffect(() => {
|
|
59
76
|
modal.setDescriptionId(resolvedId);
|
|
@@ -74,7 +91,7 @@ export function DialogDescription({ className, id, ...props }) {
|
|
|
74
91
|
export function DialogBody({ className, children, ...props }) {
|
|
75
92
|
return (React.createElement(ScrollFade, { edges: "bottom", className: cn("px-6 mt-6 pb-1 min-h-0 flex flex-col gap-4 text-left", className), ...props }, children));
|
|
76
93
|
}
|
|
77
|
-
/** Sticky footer row
|
|
94
|
+
/** Sticky footer row - action left, cancel right. */
|
|
78
95
|
export function DialogFooter({ className, ...props }) {
|
|
79
96
|
return React.createElement("div", { className: cn("p-6 flex justify-start gap-3 shrink-0", className), ...props });
|
|
80
97
|
}
|
|
@@ -88,7 +105,8 @@ export function DialogAction({ isLoading, variant = "primary", size = "default",
|
|
|
88
105
|
}
|
|
89
106
|
/** Alternate button (secondary, default size) that closes the dialog. */
|
|
90
107
|
export function DialogCancel({ className, variant = "secondary", size = "default", onClick, ...props }) {
|
|
91
|
-
const
|
|
108
|
+
const { dialog } = useAdapter();
|
|
109
|
+
const ctx = dialog.useDialog();
|
|
92
110
|
return (React.createElement(Button, { variant: variant, size: size, className: className, onClick: (e) => {
|
|
93
111
|
onClick?.(e);
|
|
94
112
|
if (!e.defaultPrevented)
|
|
@@ -97,5 +115,6 @@ export function DialogCancel({ className, variant = "secondary", size = "default
|
|
|
97
115
|
}
|
|
98
116
|
/** Closes the dialog. `asChild` merges onto the child element. */
|
|
99
117
|
export function DialogClose(props) {
|
|
100
|
-
|
|
118
|
+
const { dialog } = useAdapter();
|
|
119
|
+
return React.createElement(dialog.Close, { ...props });
|
|
101
120
|
}
|
|
@@ -1,28 +1,51 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* Drawer - BASIC bottom-sheet fork of Studio's `Drawer` (which is a large
|
|
3
|
+
* Vaul-style component). Same API shape for the parts we need: Root / Trigger /
|
|
4
|
+
* Content (overlay + sheet + drag handle) / Title / Header / Body / Footer /
|
|
5
|
+
* Close. Surface classes ported 1:1 from Studio (tokens remapped). Slides up
|
|
6
|
+
* from the bottom; dismisses on `Escape` and overlay click. A11y work tracked
|
|
7
|
+
* in modal-surface.tsx.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* import { Button, Drawer, DrawerContent, DrawerTitle, DrawerTrigger } from "veryfront/ui";
|
|
12
|
+
*
|
|
13
|
+
* <Drawer>
|
|
14
|
+
* <DrawerTrigger asChild><Button>Edit</Button></DrawerTrigger>
|
|
15
|
+
* <DrawerContent><DrawerTitle>Edit profile</DrawerTitle></DrawerContent>
|
|
16
|
+
* </Drawer>;
|
|
17
|
+
* ```
|
|
5
18
|
*
|
|
6
19
|
* @module react/components/ui/drawer
|
|
7
20
|
*/
|
|
8
21
|
import * as React from "react";
|
|
9
22
|
/** Props accepted by `<Drawer>`. */
|
|
10
23
|
export interface DrawerProps {
|
|
24
|
+
/** The trigger and content parts to compose. */
|
|
11
25
|
children: React.ReactNode;
|
|
26
|
+
/** Controlled open state (pair with `onOpenChange`). */
|
|
12
27
|
open?: boolean;
|
|
28
|
+
/** Initial open state when uncontrolled. */
|
|
13
29
|
defaultOpen?: boolean;
|
|
30
|
+
/** Fires when the open state changes. */
|
|
14
31
|
onOpenChange?: (open: boolean) => void;
|
|
15
32
|
}
|
|
16
|
-
/** Drawer root
|
|
33
|
+
/** Drawer root - owns open state (via the adapter's drawer engine). */
|
|
17
34
|
export declare function Drawer(props: DrawerProps): React.ReactElement;
|
|
18
|
-
/** Trigger
|
|
35
|
+
/** Trigger - opens the drawer. `asChild` merges onto the child element. */
|
|
19
36
|
export declare function DrawerTrigger(props: React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
20
37
|
asChild?: boolean;
|
|
21
38
|
ref?: React.Ref<HTMLButtonElement>;
|
|
22
39
|
}): React.ReactElement;
|
|
23
|
-
/**
|
|
24
|
-
export
|
|
25
|
-
/**
|
|
40
|
+
/** Props accepted by `<DrawerContent>`. */
|
|
41
|
+
export interface DrawerContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
42
|
+
/** React 19: ref is a regular prop, forwarded to the drawer panel. */
|
|
43
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
44
|
+
}
|
|
45
|
+
/** Bottom sheet - overlay + sliding surface with a drag handle. */
|
|
46
|
+
export declare function DrawerContent({ children, className, ...props }: DrawerContentProps): React.ReactElement | null;
|
|
47
|
+
/** Drawer title - 18px medium (Studio Heading-ish). Add `sr-only` to hide.
|
|
48
|
+
* Registers its id with the adapter so the sheet adopts `aria-labelledby`. */
|
|
26
49
|
export declare function DrawerTitle({ className, id, ...props }: React.HTMLAttributes<HTMLHeadingElement>): React.ReactElement;
|
|
27
50
|
/** Header column wrapper. */
|
|
28
51
|
export declare function DrawerHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.ReactElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/ui/drawer.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/ui/drawer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,oCAAoC;AACpC,MAAM,WAAW,WAAW;IAC1B,gDAAgD;IAChD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,wDAAwD;IACxD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,4CAA4C;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,yCAAyC;IACzC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC;AAED,uEAAuE;AACvE,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,KAAK,CAAC,YAAY,CAG7D;AAED,2EAA2E;AAC3E,wBAAgB,aAAa,CAC3B,KAAK,EACD,KAAK,CAAC,oBAAoB,CAAC,i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AC;IAAC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;CAAE,GAC5D,KAAK,CAAC,YAAY,CAGpB"}
|
|
@@ -1,32 +1,47 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* Drawer - BASIC bottom-sheet fork of Studio's `Drawer` (which is a large
|
|
3
|
+
* Vaul-style component). Same API shape for the parts we need: Root / Trigger /
|
|
4
|
+
* Content (overlay + sheet + drag handle) / Title / Header / Body / Footer /
|
|
5
|
+
* Close. Surface classes ported 1:1 from Studio (tokens remapped). Slides up
|
|
6
|
+
* from the bottom; dismisses on `Escape` and overlay click. A11y work tracked
|
|
7
|
+
* in modal-surface.tsx.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* import { Button, Drawer, DrawerContent, DrawerTitle, DrawerTrigger } from "veryfront/ui";
|
|
12
|
+
*
|
|
13
|
+
* <Drawer>
|
|
14
|
+
* <DrawerTrigger asChild><Button>Edit</Button></DrawerTrigger>
|
|
15
|
+
* <DrawerContent><DrawerTitle>Edit profile</DrawerTitle></DrawerContent>
|
|
16
|
+
* </Drawer>;
|
|
17
|
+
* ```
|
|
5
18
|
*
|
|
6
19
|
* @module react/components/ui/drawer
|
|
7
20
|
*/
|
|
8
21
|
import * as React from "react";
|
|
9
22
|
import { cx as cn } from "./cva.js";
|
|
10
|
-
import {
|
|
23
|
+
import { useAdapter } from "./adapter/context.js";
|
|
11
24
|
import { useIsomorphicLayoutEffect } from "./use-isomorphic-layout-effect.js";
|
|
12
|
-
|
|
13
|
-
// DialogClose nested inside a Drawer cannot accidentally close the Drawer.
|
|
14
|
-
const { ModalRoot: _Root, useModal: _hook, ModalTrigger: _Trigger, ModalClose: _Close, ModalContent: _Content, } = createModalSurfaceParts("Drawer");
|
|
15
|
-
/** Drawer root — owns open state. */
|
|
25
|
+
/** Drawer root - owns open state (via the adapter's drawer engine). */
|
|
16
26
|
export function Drawer(props) {
|
|
17
|
-
|
|
27
|
+
const { drawer } = useAdapter();
|
|
28
|
+
return React.createElement(drawer.Root, { ...props });
|
|
18
29
|
}
|
|
19
|
-
/** Trigger
|
|
30
|
+
/** Trigger - opens the drawer. `asChild` merges onto the child element. */
|
|
20
31
|
export function DrawerTrigger(props) {
|
|
21
|
-
|
|
32
|
+
const { drawer } = useAdapter();
|
|
33
|
+
return React.createElement(drawer.Trigger, { ...props });
|
|
22
34
|
}
|
|
23
|
-
/** Bottom sheet
|
|
35
|
+
/** Bottom sheet - overlay + sliding surface with a drag handle. */
|
|
24
36
|
export function DrawerContent({ children, className, ...props }) {
|
|
25
|
-
|
|
37
|
+
const { drawer } = useAdapter();
|
|
38
|
+
return (React.createElement(drawer.Content, { className: cn("fixed inset-x-0 bottom-0 z-50 flex flex-col max-h-[85vh] w-full rounded-t-xl bg-[var(--drawer)] text-[var(--foreground)] outline-none", className), lead: React.createElement("div", { "aria-hidden": "true", className: "mx-auto mt-3 h-[3px] w-[30px] shrink-0 rounded-full bg-[var(--outline-border)]" }), ...props }, children));
|
|
26
39
|
}
|
|
27
|
-
/** Drawer title
|
|
40
|
+
/** Drawer title - 18px medium (Studio Heading-ish). Add `sr-only` to hide.
|
|
41
|
+
* Registers its id with the adapter so the sheet adopts `aria-labelledby`. */
|
|
28
42
|
export function DrawerTitle({ className, id, ...props }) {
|
|
29
|
-
const
|
|
43
|
+
const { drawer } = useAdapter();
|
|
44
|
+
const modal = drawer.useDrawer();
|
|
30
45
|
const resolvedId = id ?? modal.defaultTitleId;
|
|
31
46
|
useIsomorphicLayoutEffect(() => {
|
|
32
47
|
modal.setTitleId(resolvedId);
|
|
@@ -35,12 +50,7 @@ export function DrawerTitle({ className, id, ...props }) {
|
|
|
35
50
|
modal.setTitlePresent(false);
|
|
36
51
|
modal.setTitleId((current) => current === resolvedId ? modal.defaultTitleId : current);
|
|
37
52
|
};
|
|
38
|
-
}, [
|
|
39
|
-
modal.defaultTitleId,
|
|
40
|
-
modal.setTitleId,
|
|
41
|
-
modal.setTitlePresent,
|
|
42
|
-
resolvedId,
|
|
43
|
-
]);
|
|
53
|
+
}, [modal.defaultTitleId, modal.setTitleId, modal.setTitlePresent, resolvedId]);
|
|
44
54
|
return (React.createElement("h2", { id: resolvedId, className: cn("text-lg font-medium text-[var(--foreground)]", className), ...props }));
|
|
45
55
|
}
|
|
46
56
|
/** Header column wrapper. */
|
|
@@ -57,5 +67,6 @@ export function DrawerFooter({ className, ...props }) {
|
|
|
57
67
|
}
|
|
58
68
|
/** Closes the drawer. `asChild` merges onto the child element. */
|
|
59
69
|
export function DrawerClose(props) {
|
|
60
|
-
|
|
70
|
+
const { drawer } = useAdapter();
|
|
71
|
+
return React.createElement(drawer.Close, { ...props });
|
|
61
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/ui/dropdown-menu.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAA4B,KAAK,2BAA2B,EAAQ,MAAM,WAAW,CAAC;AAC7F,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAEhC,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/ui/dropdown-menu.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAA4B,KAAK,2BAA2B,EAAQ,MAAM,WAAW,CAAC;AAC7F,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAEhC,MAAM,uBAAuB,CAAC;AAS/B,0CAA0C;AAC1C,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC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