veryfront 0.1.1238 → 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.js +1 -1
- package/esm/cli/commands/generate/command.d.ts.map +1 -1
- package/esm/cli/commands/generate/command.js +2 -3
- 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 +10 -0
- package/esm/cli/shared/args.d.ts.map +1 -1
- package/esm/cli/shared/args.js +15 -2
- 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/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/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 +55 -2
- 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/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/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 +13 -3
- 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/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
|
@@ -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,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAU,KAAK,WAAW,EAAiB,MAAM,aAAa,CAAC;AAQtE,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,qCAAqC;AACrC,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,KAAK,CAAC,YAAY,CAG7D;AAED,2EAA2E;AAC3E,wBAAgB,aAAa,CAC3B,KAAK,EACD,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,GAC7C;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;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Y,CAEpB;AAED,uFAAuF;AACvF,wBAAgB,UAAU,CACxB,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,kBAAkB,CAAC,eAAe,CAAC,GACjE,KAAK,CAAC,YAAY,CAEpB;AAED,0CAA0C;AAC1C,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,+DAA+D;IAC/D,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,yDAAyD;AACzD,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,IAAe,EACf,GAAG,KAAK,EACT,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,CAUxC;AAED,yEAAyE;AACzE,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,OAAqB,EACrB,IAAgB,EAChB,OAAO,EACP,GAAG,KAAK,EACT,EAAE,WAAW,GAAG,KAAK,CAAC,YAAY,CAelC;AAED,kEAAkE;AAClE,wBAAgB,WAAW,CACzB,KAAK,EACD,KAAK,CAAC,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":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c,CAAC,kBAAkB,CAAC,GAAG,KAAK,CAAC,YAAY,CAmB/D;AAED,6BAA6B;AAC7B,wBAAgB,YAAY,CAC1B,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAC5D,KAAK,CAAC,YAAY,CAEpB;AAED,4BAA4B;AAC5B,wBAAgB,UAAU,CACxB,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAC5D,KAAK,CAAC,YAAY,CAOpB;AAED,iDAAiD;AACjD,wBAAgB,YAAY,CAC1B,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAC5D,KAAK,CAAC,YAAY,CAUpB;AAED,kEAAkE;AAClE,wBAAgB,WAAW,CACzB,KAAK,EACD,KAAK,CAAC,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,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;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC;AAED,sEAAsE;AACtE,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,CAEzE;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAyB,SAAQ,0BAA0B;CAAG;AAE/E,qEAAqE;AACrE,MAAM,MAAM,+BAA+B,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,IAC7E,2BAA2B,CAAC,CAAC,CAAC,CAAC;AAEjC,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EACrE,KAAK,EAAE,+BAA+B,CAAC,CAAC,CAAC,GACxC,KAAK,CAAC,YAAY,CAAC;AACtB,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBA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
|
import { getPolymorphicButtonType, Slot } from "./slot.js";
|
|
11
11
|
import { createAnchoredSurfaceParts, } from "./anchored-surface.js";
|
|
12
|
-
import { focusWithoutScroll
|
|
13
|
-
|
|
12
|
+
import { focusWithoutScroll } from "./focus-management.js";
|
|
13
|
+
import { useMenuContentKeyboard } from "./menu-keyboard.js";
|
|
14
14
|
// Per-skin context + machinery -- distinct from Popover's instance so a
|
|
15
15
|
// Popover nested inside a DropdownMenu cannot accidentally close the menu.
|
|
16
16
|
const { Context: _ctx, AnchoredRoot: _Root, AnchoredTrigger: _Trigger, AnchoredContent: _Content } = createAnchoredSurfaceParts();
|
|
@@ -27,79 +27,11 @@ export function DropdownMenuContent({ children, className, align = "start", onKe
|
|
|
27
27
|
if (!ctx) {
|
|
28
28
|
throw new Error("DropdownMenuContent must be used within <DropdownMenu>");
|
|
29
29
|
}
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
event.nativeEvent.keyCode === 229) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
const items = [...event.currentTarget.querySelectorAll("[role='menuitem']:not([aria-disabled='true'])")];
|
|
39
|
-
const activeIndex = items.indexOf(event.currentTarget.ownerDocument.activeElement);
|
|
40
|
-
const focusAt = (index) => {
|
|
41
|
-
const item = items[(index + items.length) % items.length];
|
|
42
|
-
if (item)
|
|
43
|
-
focusWithoutScroll(item);
|
|
44
|
-
};
|
|
45
|
-
switch (event.key) {
|
|
46
|
-
case "ArrowDown":
|
|
47
|
-
event.preventDefault();
|
|
48
|
-
focusAt(activeIndex + 1);
|
|
49
|
-
return;
|
|
50
|
-
case "ArrowUp":
|
|
51
|
-
event.preventDefault();
|
|
52
|
-
focusAt(activeIndex < 0 ? items.length - 1 : activeIndex - 1);
|
|
53
|
-
return;
|
|
54
|
-
case "Home":
|
|
55
|
-
event.preventDefault();
|
|
56
|
-
focusAt(0);
|
|
57
|
-
return;
|
|
58
|
-
case "End":
|
|
59
|
-
event.preventDefault();
|
|
60
|
-
focusAt(items.length - 1);
|
|
61
|
-
return;
|
|
62
|
-
case "Tab": {
|
|
63
|
-
event.preventDefault();
|
|
64
|
-
const trigger = ctx.triggerRef.current;
|
|
65
|
-
const document = event.currentTarget.ownerDocument;
|
|
66
|
-
const candidates = getFocusableElements(document.body).filter((element) => !event.currentTarget.contains(element));
|
|
67
|
-
const triggerIndex = trigger ? candidates.indexOf(trigger) : -1;
|
|
68
|
-
const next = event.shiftKey ? candidates[triggerIndex - 1] : candidates[triggerIndex + 1];
|
|
69
|
-
ctx.setOpen(false);
|
|
70
|
-
queueMicrotask(() => {
|
|
71
|
-
if (next?.isConnected)
|
|
72
|
-
focusWithoutScroll(next);
|
|
73
|
-
else if (trigger?.isConnected)
|
|
74
|
-
focusWithoutScroll(trigger);
|
|
75
|
-
});
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
if (event.key.length !== 1 || event.altKey || event.ctrlKey ||
|
|
80
|
-
event.metaKey) {
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
const now = Date.now();
|
|
84
|
-
const previous = typeaheadRef.current;
|
|
85
|
-
const buffer = now - previous.lastTypedAt > TYPEAHEAD_RESET_MS
|
|
86
|
-
? event.key
|
|
87
|
-
: previous.buffer + event.key;
|
|
88
|
-
typeaheadRef.current = { buffer, lastTypedAt: now };
|
|
89
|
-
const normalizedBuffer = buffer.normalize("NFKC").toLocaleLowerCase();
|
|
90
|
-
const repeatedCharacter = [...normalizedBuffer].every((character) => character === normalizedBuffer[0]);
|
|
91
|
-
const query = repeatedCharacter ? normalizedBuffer[0] : normalizedBuffer;
|
|
92
|
-
for (let offset = 1; offset <= items.length; offset += 1) {
|
|
93
|
-
const item = items[(activeIndex + offset + items.length) % items.length];
|
|
94
|
-
const text = item?.textContent?.normalize("NFKC").trim()
|
|
95
|
-
.replace(/\s+/g, " ").toLocaleLowerCase();
|
|
96
|
-
if (item && text?.startsWith(query)) {
|
|
97
|
-
event.preventDefault();
|
|
98
|
-
focusWithoutScroll(item);
|
|
99
|
-
break;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
};
|
|
30
|
+
const handleKeyDown = useMenuContentKeyboard({
|
|
31
|
+
onKeyDown,
|
|
32
|
+
setOpen: ctx.setOpen,
|
|
33
|
+
triggerRef: ctx.triggerRef,
|
|
34
|
+
});
|
|
103
35
|
return (React.createElement(_Content, { ...props, role: "menu", "aria-orientation": "vertical", align: align, initialFocus: "[role='menuitem']:not([aria-disabled='true'])", onKeyDown: handleKeyDown, className: cn("min-w-[260px] p-2.5", className) }, children));
|
|
104
36
|
}
|
|
105
37
|
/** Groups related items with a tight inner gap (Studio: `gap-px p-0.5`). */
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Field: a form-field wrapper that wires a label, description, and error to a
|
|
3
|
+
* single control for accessibility. `<Field>` derives a stable base id with
|
|
4
|
+
* `React.useId()` and shares it (plus derived description/error ids and the
|
|
5
|
+
* `invalid` flag) through context, so `<FieldLabel>` targets the control via
|
|
6
|
+
* `htmlFor`, `<FieldControl>` clones its child with the matching `id` +
|
|
7
|
+
* `aria-describedby` + `aria-invalid`, and `<FieldDescription>` / `<FieldError>`
|
|
8
|
+
* expose the referenced ids. Self-contained; skinned with the veryfront theme
|
|
9
|
+
* tokens.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* import { Field, FieldLabel, FieldControl, FieldDescription, FieldError } from "veryfront/ui";
|
|
14
|
+
* import { Input } from "veryfront/ui";
|
|
15
|
+
*
|
|
16
|
+
* <Field invalid>
|
|
17
|
+
* <FieldLabel>Email</FieldLabel>
|
|
18
|
+
* <FieldControl><Input type="email" /></FieldControl>
|
|
19
|
+
* <FieldDescription>Veryfront never shares it.</FieldDescription>
|
|
20
|
+
* <FieldError>Enter a valid email.</FieldError>
|
|
21
|
+
* </Field>;
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @module react/components/ui/field
|
|
25
|
+
*/
|
|
26
|
+
import * as React from "react";
|
|
27
|
+
/** Props accepted by `<Field>`. */
|
|
28
|
+
export interface FieldProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
29
|
+
/** Mark the field invalid: flags the label/control/error via context. @default false */
|
|
30
|
+
invalid?: boolean;
|
|
31
|
+
/** React 19: ref is a regular prop. */
|
|
32
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
33
|
+
}
|
|
34
|
+
/** The field wrapper: derives ids and provides them to its sub-parts. */
|
|
35
|
+
export declare function Field({ invalid, className, children, ref, ...props }: FieldProps): React.ReactElement;
|
|
36
|
+
/** Props accepted by `<FieldLabel>`. */
|
|
37
|
+
export interface FieldLabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
38
|
+
/** React 19: ref is a regular prop. */
|
|
39
|
+
ref?: React.Ref<HTMLLabelElement>;
|
|
40
|
+
}
|
|
41
|
+
/** The field's label: wired to the control with `htmlFor`. */
|
|
42
|
+
export declare function FieldLabel({ className, children, ref, ...props }: FieldLabelProps): React.ReactElement;
|
|
43
|
+
/** Props accepted by `<FieldControl>`. */
|
|
44
|
+
export interface FieldControlProps {
|
|
45
|
+
/** The single form control element to wire: its `id`/`aria-*` are set for you. */
|
|
46
|
+
children: React.ReactElement;
|
|
47
|
+
/** React 19: ref is forwarded onto the cloned child control (not a wrapper node). */
|
|
48
|
+
ref?: React.Ref<HTMLElement>;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Wiring wrapper: renders no node of its own; clones its single child control
|
|
52
|
+
* with the shared `id`, `aria-describedby` (the description, plus the error id
|
|
53
|
+
* when invalid), and `aria-invalid`.
|
|
54
|
+
*/
|
|
55
|
+
export declare function FieldControl({ children, ref }: FieldControlProps): React.ReactElement;
|
|
56
|
+
/** Props accepted by `<FieldDescription>`. */
|
|
57
|
+
export interface FieldDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
58
|
+
/** React 19: ref is a regular prop. */
|
|
59
|
+
ref?: React.Ref<HTMLParagraphElement>;
|
|
60
|
+
}
|
|
61
|
+
/** Helper text describing the field: referenced by the control's `aria-describedby`. */
|
|
62
|
+
export declare function FieldDescription({ className, children, id, ref, ...props }: FieldDescriptionProps): React.ReactElement;
|
|
63
|
+
/** Props accepted by `<FieldError>`. */
|
|
64
|
+
export interface FieldErrorProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
65
|
+
/** React 19: ref is a regular prop. */
|
|
66
|
+
ref?: React.Ref<HTMLParagraphElement>;
|
|
67
|
+
}
|
|
68
|
+
/** The field's error message: a live `role="alert"`; renders nothing when empty. */
|
|
69
|
+
export declare function FieldError({ className, children, id, ref, ...props }: FieldErrorProps): React.ReactElement | null;
|
|
70
|
+
//# sourceMappingURL=field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/ui/field.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmE/B,mCAAmC;AACnC,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACtE,wFAAwF;IACxF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uCAAuC;IACvC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC;AAED,yEAAyE;AACzE,wBAAgB,KAAK,CAAC,EACpB,OAAe,EACf,SAAS,EACT,QAAQ,EACR,GAAG,EACH,GAAG,KAAK,EACT,EAAE,UAAU,GAAG,KAAK,CAAC,YAAY,CAoDjC;AAED,wCAAwC;AACxC,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC;IAClF,uCAAuC;IACvC,GAAG,CAAC,EAAE,KAA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