veryfront 0.1.47 → 0.1.49
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/app/components/inline-input.d.ts +1 -4
- package/esm/cli/app/components/inline-input.d.ts.map +1 -1
- package/esm/cli/app/components/inline-input.js +1 -1
- package/esm/cli/app/components/list-select.d.ts +0 -8
- package/esm/cli/app/components/list-select.d.ts.map +1 -1
- package/esm/cli/app/components/list-select.js +0 -13
- package/esm/cli/app/operations/project-creation.d.ts +2 -14
- package/esm/cli/app/operations/project-creation.d.ts.map +1 -1
- package/esm/cli/app/operations/project-creation.js +3 -68
- package/esm/cli/app/shell.js +2 -2
- package/esm/cli/app/utils.d.ts +1 -2
- package/esm/cli/app/utils.d.ts.map +1 -1
- package/esm/cli/app/utils.js +1 -17
- package/esm/cli/app/views/dashboard.d.ts +0 -4
- package/esm/cli/app/views/dashboard.d.ts.map +1 -1
- package/esm/cli/app/views/dashboard.js +0 -15
- package/esm/cli/app/views/startup.d.ts +0 -4
- package/esm/cli/app/views/startup.d.ts.map +1 -1
- package/esm/cli/app/views/startup.js +0 -7
- package/esm/cli/auth/login.d.ts.map +1 -1
- package/esm/cli/auth/login.js +1 -2
- package/esm/cli/auth/token-store.js +1 -1
- package/esm/cli/auth/utils.d.ts +2 -1
- package/esm/cli/auth/utils.d.ts.map +1 -1
- package/esm/cli/commands/build/handler.d.ts +1 -1
- package/esm/cli/commands/generate/integration-generator.js +1 -1
- package/esm/cli/commands/init/catalog.js +3 -3
- package/esm/cli/commands/init/command-help.js +2 -2
- package/esm/cli/commands/init/config-generator.d.ts.map +1 -1
- package/esm/cli/commands/init/config-generator.js +8 -0
- package/esm/cli/commands/init/types.d.ts +1 -1
- package/esm/cli/commands/init/types.d.ts.map +1 -1
- package/esm/cli/commands/install/types.d.ts +2 -2
- package/esm/cli/commands/merge/command.d.ts +1 -1
- package/esm/cli/help/formatters.d.ts +1 -1
- package/esm/cli/help/formatters.d.ts.map +1 -1
- package/esm/cli/help/formatters.js +8 -4
- package/esm/cli/help/main-help.d.ts.map +1 -1
- package/esm/cli/help/main-help.js +2 -2
- package/esm/cli/help/tips.js +1 -1
- package/esm/cli/mcp/remote-file-tools.js +1 -1
- package/esm/cli/mcp/server.d.ts +0 -1
- package/esm/cli/mcp/server.d.ts.map +1 -1
- package/esm/cli/mcp/server.js +2 -5
- package/esm/cli/mcp/tools/catalog-tools.d.ts +3 -3
- package/esm/cli/mcp/tools/catalog-tools.js +3 -3
- package/esm/cli/mcp/tools/dev-tools.d.ts +1 -1
- package/esm/cli/mcp/tools/dev-tools.d.ts.map +1 -1
- package/esm/cli/mcp/tools/dev-tools.js +1 -2
- package/esm/cli/mcp/tools/scaffold-tools.d.ts +2 -2
- package/esm/cli/mcp/tools.d.ts +1 -2
- package/esm/cli/mcp/tools.d.ts.map +1 -1
- package/esm/cli/mcp/tools.js +1 -2
- package/esm/cli/shared/reserve-slug.d.ts.map +1 -1
- package/esm/cli/shared/reserve-slug.js +1 -3
- package/esm/cli/sync/ignore.d.ts +1 -1
- package/esm/cli/sync/ignore.d.ts.map +1 -1
- package/esm/cli/sync/ignore.js +22 -18
- package/esm/cli/templates/index.js +2 -2
- package/esm/cli/templates/manifest.d.ts +10 -8
- package/esm/cli/templates/manifest.js +15 -13
- package/esm/cli/templates/types.d.ts +1 -1
- package/esm/cli/templates/types.d.ts.map +1 -1
- package/esm/cli/ui/colors.d.ts +0 -1
- package/esm/cli/ui/colors.d.ts.map +1 -1
- package/esm/cli/ui/colors.js +0 -10
- package/esm/cli/ui/dot-matrix.d.ts.map +1 -1
- package/esm/cli/ui/dot-matrix.js +2 -5
- package/esm/cli/ui/tui.js +2 -3
- package/esm/cli/utils/index.js +1 -2
- package/esm/cli/utils/package-manager.d.ts.map +1 -1
- package/esm/cli/utils/package-manager.js +3 -4
- package/esm/deno.d.ts +10 -0
- package/esm/deno.js +30 -20
- package/esm/src/agent/chat-handler.d.ts +22 -0
- package/esm/src/agent/chat-handler.d.ts.map +1 -1
- package/esm/src/agent/chat-handler.js +88 -28
- package/esm/src/agent/factory.d.ts +0 -8
- package/esm/src/agent/factory.d.ts.map +1 -1
- package/esm/src/agent/factory.js +50 -1
- package/esm/src/agent/index.d.ts +17 -2
- package/esm/src/agent/index.d.ts.map +1 -1
- package/esm/src/agent/index.js +17 -2
- package/esm/src/agent/memory/memory.d.ts +2 -2
- package/esm/src/agent/memory/memory.d.ts.map +1 -1
- package/esm/src/agent/memory/memory.js +0 -1
- package/esm/src/agent/react/index.d.ts +1 -1
- package/esm/src/agent/react/index.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/index.d.ts +1 -1
- package/esm/src/agent/react/use-chat/index.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/streaming/handler.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/streaming/handler.js +42 -4
- package/esm/src/agent/react/use-chat/streaming/parts-builder.d.ts +2 -2
- package/esm/src/agent/react/use-chat/streaming/parts-builder.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/streaming/parts-builder.js +14 -1
- package/esm/src/agent/react/use-chat/streaming/types.d.ts +5 -0
- package/esm/src/agent/react/use-chat/streaming/types.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/types.d.ts +23 -1
- package/esm/src/agent/react/use-chat/types.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.d.ts +15 -1
- package/esm/src/agent/react/use-chat/use-chat.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.js +187 -35
- package/esm/src/agent/runtime/index.d.ts +18 -0
- package/esm/src/agent/runtime/index.d.ts.map +1 -1
- package/esm/src/agent/runtime/index.js +167 -36
- package/esm/src/agent/runtime/tool-helpers.d.ts +6 -1
- package/esm/src/agent/runtime/tool-helpers.d.ts.map +1 -1
- package/esm/src/agent/runtime/tool-helpers.js +10 -1
- package/esm/src/agent/schemas/agent.schema.d.ts +4 -4
- package/esm/src/agent/types.d.ts +10 -0
- package/esm/src/agent/types.d.ts.map +1 -1
- package/esm/src/ai/registry-manager.d.ts.map +1 -1
- package/esm/src/ai/registry-manager.js +2 -1
- package/esm/src/build/bundler/code-splitter/manifest-builder.d.ts +0 -2
- package/esm/src/build/bundler/code-splitter/manifest-builder.d.ts.map +1 -1
- package/esm/src/build/bundler/code-splitter/manifest-builder.js +1 -1
- package/esm/src/build/compiler/mdx-compiler/validator.d.ts.map +1 -1
- package/esm/src/build/compiler/mdx-compiler/validator.js +2 -3
- package/esm/src/build/compiler/mdx-to-js.d.ts +0 -2
- package/esm/src/build/compiler/mdx-to-js.d.ts.map +1 -1
- package/esm/src/build/compiler/mdx-to-js.js +0 -81
- package/esm/src/build/index.d.ts +0 -6
- package/esm/src/build/index.d.ts.map +1 -1
- package/esm/src/build/index.js +0 -1
- package/esm/src/build/production-build/build/route-collector.d.ts.map +1 -1
- package/esm/src/build/production-build/build/route-collector.js +2 -3
- package/esm/src/build/production-build/client-runtime.d.ts +7 -3
- package/esm/src/build/production-build/client-runtime.d.ts.map +1 -1
- package/esm/src/build/production-build/client-runtime.js +9 -9
- package/esm/src/build/production-build/templates.d.ts +5 -9
- package/esm/src/build/production-build/templates.d.ts.map +1 -1
- package/esm/src/build/production-build/templates.js +6 -18
- package/esm/src/build/vendor-cache.d.ts.map +1 -1
- package/esm/src/build/vendor-cache.js +0 -5
- package/esm/src/cache/tokenizing-gateway.d.ts +0 -2
- package/esm/src/cache/tokenizing-gateway.d.ts.map +1 -1
- package/esm/src/cache/tokenizing-gateway.js +1 -3
- package/esm/src/chat/index.d.ts +33 -24
- package/esm/src/chat/index.d.ts.map +1 -1
- package/esm/src/chat/index.js +40 -26
- package/esm/src/config/define-config.d.ts.map +1 -1
- package/esm/src/config/define-config.js +28 -25
- package/esm/src/config/loader.d.ts.map +1 -1
- package/esm/src/config/loader.js +10 -7
- package/esm/src/config/schemas/config.schema.d.ts +58 -12
- package/esm/src/config/schemas/config.schema.d.ts.map +1 -1
- package/esm/src/config/schemas/config.schema.js +12 -0
- package/esm/src/data/data-fetcher.d.ts +1 -2
- package/esm/src/data/data-fetcher.d.ts.map +1 -1
- package/esm/src/data/data-fetcher.js +14 -15
- package/esm/src/data/server-data-fetcher.d.ts +0 -3
- package/esm/src/data/server-data-fetcher.d.ts.map +1 -1
- package/esm/src/data/server-data-fetcher.js +1 -8
- package/esm/src/data/static-data-fetcher.d.ts +1 -3
- package/esm/src/data/static-data-fetcher.d.ts.map +1 -1
- package/esm/src/data/static-data-fetcher.js +1 -3
- package/esm/src/discovery/discovery-engine.d.ts.map +1 -1
- package/esm/src/discovery/discovery-engine.js +19 -1
- package/esm/src/discovery/discovery-utils.d.ts +0 -4
- package/esm/src/discovery/discovery-utils.d.ts.map +1 -1
- package/esm/src/discovery/discovery-utils.js +0 -6
- package/esm/src/discovery/file-discovery.d.ts +3 -1
- package/esm/src/discovery/file-discovery.d.ts.map +1 -1
- package/esm/src/discovery/file-discovery.js +3 -8
- package/esm/src/discovery/handlers/index.d.ts +1 -0
- package/esm/src/discovery/handlers/index.d.ts.map +1 -1
- package/esm/src/discovery/handlers/index.js +1 -0
- package/esm/src/discovery/handlers/skill-handler.d.ts +26 -0
- package/esm/src/discovery/handlers/skill-handler.d.ts.map +1 -0
- package/esm/src/discovery/handlers/skill-handler.js +87 -0
- package/esm/src/discovery/handlers/task-handler.d.ts.map +1 -1
- package/esm/src/discovery/handlers/task-handler.js +1 -5
- package/esm/src/discovery/transpiler.d.ts.map +1 -1
- package/esm/src/discovery/transpiler.js +7 -2
- package/esm/src/discovery/types.d.ts +3 -0
- package/esm/src/discovery/types.d.ts.map +1 -1
- package/esm/src/embedding/chunk.d.ts +18 -0
- package/esm/src/embedding/chunk.d.ts.map +1 -0
- package/esm/src/embedding/chunk.js +48 -0
- package/esm/src/embedding/embedding.d.ts +23 -0
- package/esm/src/embedding/embedding.d.ts.map +1 -0
- package/esm/src/embedding/embedding.js +54 -0
- package/esm/src/embedding/index.d.ts +29 -0
- package/esm/src/embedding/index.d.ts.map +1 -0
- package/esm/src/embedding/index.js +26 -0
- package/esm/src/embedding/react/use-uploads.d.ts +31 -0
- package/esm/src/embedding/react/use-uploads.d.ts.map +1 -0
- package/esm/src/embedding/react/use-uploads.js +71 -0
- package/esm/src/embedding/resolve.d.ts +27 -0
- package/esm/src/embedding/resolve.d.ts.map +1 -0
- package/esm/src/embedding/resolve.js +94 -0
- package/esm/src/embedding/types.d.ts +90 -0
- package/esm/src/embedding/types.d.ts.map +1 -0
- package/esm/src/embedding/types.js +1 -0
- package/esm/src/embedding/upload-handler.d.ts +43 -0
- package/esm/src/embedding/upload-handler.d.ts.map +1 -0
- package/esm/src/embedding/upload-handler.js +144 -0
- package/esm/src/embedding/upload-loader.d.ts +14 -0
- package/esm/src/embedding/upload-loader.d.ts.map +1 -0
- package/esm/src/embedding/upload-loader.js +70 -0
- package/esm/src/embedding/upload-store.d.ts +27 -0
- package/esm/src/embedding/upload-store.d.ts.map +1 -0
- package/esm/src/embedding/upload-store.js +244 -0
- package/esm/src/embedding/vector-store.d.ts +33 -0
- package/esm/src/embedding/vector-store.d.ts.map +1 -0
- package/esm/src/embedding/vector-store.js +215 -0
- package/esm/src/errors/error-registry.d.ts +2 -1
- package/esm/src/errors/error-registry.d.ts.map +1 -1
- package/esm/src/errors/http-error.d.ts +1 -2
- package/esm/src/errors/http-error.d.ts.map +1 -1
- package/esm/src/errors/http-error.js +2 -2
- package/esm/src/errors/middleware/cli-error-boundary.d.ts.map +1 -1
- package/esm/src/errors/middleware/cli-error-boundary.js +13 -2
- package/esm/src/errors/middleware/wrap-unknown.d.ts +0 -7
- package/esm/src/errors/middleware/wrap-unknown.d.ts.map +1 -1
- package/esm/src/errors/middleware/wrap-unknown.js +0 -9
- package/esm/src/errors/veryfront-error.d.ts +0 -3
- package/esm/src/errors/veryfront-error.d.ts.map +1 -1
- package/esm/src/errors/veryfront-error.js +0 -5
- package/esm/src/html/schemas/html.schema.d.ts +2 -2
- package/esm/src/html/styles-builder/css-hash-cache.d.ts.map +1 -1
- package/esm/src/html/styles-builder/css-hash-cache.js +1 -2
- package/esm/src/html/styles-builder/plugin-loader.d.ts.map +1 -1
- package/esm/src/html/styles-builder/plugin-loader.js +50 -21
- package/esm/src/html/styles-builder/tailwind-compiler-cache.d.ts.map +1 -1
- package/esm/src/html/styles-builder/tailwind-compiler-cache.js +12 -4
- package/esm/src/html/utils.d.ts +0 -7
- package/esm/src/html/utils.d.ts.map +1 -1
- package/esm/src/html/utils.js +0 -25
- package/esm/src/modules/component-registry/registry.d.ts +0 -3
- package/esm/src/modules/component-registry/registry.d.ts.map +1 -1
- package/esm/src/modules/component-registry/registry.js +0 -3
- package/esm/src/modules/import-map/default-import-map.d.ts.map +1 -1
- package/esm/src/modules/import-map/default-import-map.js +8 -0
- package/esm/src/modules/react-loader/component-loader.d.ts.map +1 -1
- package/esm/src/modules/react-loader/component-loader.js +1 -0
- 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 +10 -1
- package/esm/src/modules/react-loader/ssr-module-loader/types.d.ts +2 -0
- package/esm/src/modules/react-loader/ssr-module-loader/types.d.ts.map +1 -1
- package/esm/src/modules/react-loader/types.d.ts +2 -0
- package/esm/src/modules/react-loader/types.d.ts.map +1 -1
- package/esm/src/modules/server/module-server.d.ts +2 -0
- package/esm/src/modules/server/module-server.d.ts.map +1 -1
- package/esm/src/modules/server/module-server.js +2 -1
- package/esm/src/oauth/handlers/callback-handler.d.ts +2 -0
- package/esm/src/oauth/handlers/callback-handler.d.ts.map +1 -1
- package/esm/src/oauth/handlers/callback-handler.js +10 -4
- package/esm/src/oauth/providers/common.d.ts.map +1 -1
- package/esm/src/oauth/providers/common.js +0 -23
- package/esm/src/observability/auto-instrument/react-instrumentation.js +2 -1
- package/esm/src/observability/instruments/instruments-factory.d.ts +1 -1
- package/esm/src/observability/instruments/instruments-factory.d.ts.map +1 -1
- package/esm/src/observability/instruments/instruments-factory.js +5 -4
- package/esm/src/observability/metrics/config.js +5 -4
- package/esm/src/observability/metrics/manager.js +1 -1
- package/esm/src/observability/tracing/span-operations.d.ts.map +1 -1
- package/esm/src/observability/tracing/span-operations.js +14 -8
- package/esm/src/platform/compat/console/node.d.ts +0 -1
- package/esm/src/platform/compat/console/node.d.ts.map +1 -1
- package/esm/src/platform/compat/console/node.js +4 -11
- package/esm/src/platform/compat/fs.d.ts.map +1 -1
- package/esm/src/platform/compat/fs.js +4 -2
- package/esm/src/platform/compat/opaque-deps.d.ts +18 -2
- package/esm/src/platform/compat/opaque-deps.d.ts.map +1 -1
- package/esm/src/platform/compat/opaque-deps.js +19 -0
- package/esm/src/platform/compat/path/basic-operations.d.ts.map +1 -1
- package/esm/src/platform/compat/path/basic-operations.js +17 -10
- package/esm/src/platform/compat/path/resolution.d.ts.map +1 -1
- package/esm/src/platform/compat/path/resolution.js +65 -20
- package/esm/src/platform/compat/path/url-conversion.d.ts.map +1 -1
- package/esm/src/platform/compat/path/url-conversion.js +3 -2
- package/esm/src/platform/compat/process.d.ts +2 -14
- package/esm/src/platform/compat/process.d.ts.map +1 -1
- package/esm/src/platform/compat/process.js +92 -70
- package/esm/src/provider/index.d.ts +1 -1
- package/esm/src/provider/index.d.ts.map +1 -1
- package/esm/src/provider/index.js +1 -1
- package/esm/src/provider/local/ai-sdk-adapter.d.ts.map +1 -1
- package/esm/src/provider/local/ai-sdk-adapter.js +18 -18
- package/esm/src/provider/local/env.d.ts.map +1 -1
- package/esm/src/provider/local/env.js +2 -1
- package/esm/src/provider/local/local-embedding-adapter.d.ts +19 -0
- package/esm/src/provider/local/local-embedding-adapter.d.ts.map +1 -0
- package/esm/src/provider/local/local-embedding-adapter.js +32 -0
- package/esm/src/provider/local/local-embedding-engine.d.ts +17 -0
- package/esm/src/provider/local/local-embedding-engine.d.ts.map +1 -0
- package/esm/src/provider/local/local-embedding-engine.js +63 -0
- package/esm/src/provider/local/local-engine.d.ts +7 -0
- package/esm/src/provider/local/local-engine.d.ts.map +1 -1
- package/esm/src/provider/local/local-engine.js +1 -1
- package/esm/src/provider/local/model-catalog.d.ts +10 -1
- package/esm/src/provider/local/model-catalog.d.ts.map +1 -1
- package/esm/src/provider/local/model-catalog.js +61 -0
- package/esm/src/provider/model-registry.d.ts +10 -0
- package/esm/src/provider/model-registry.d.ts.map +1 -1
- package/esm/src/provider/model-registry.js +43 -0
- package/esm/src/proxy/retry.d.ts +3 -3
- package/esm/src/proxy/retry.d.ts.map +1 -1
- package/esm/src/proxy/retry.js +0 -7
- package/esm/src/proxy/tracing.d.ts +1 -5
- package/esm/src/proxy/tracing.d.ts.map +1 -1
- package/esm/src/proxy/tracing.js +1 -7
- package/esm/src/react/components/ai/agent-card.js +13 -13
- package/esm/src/react/components/ai/chat/components/animations.d.ts +5 -0
- package/esm/src/react/components/ai/chat/components/animations.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/components/animations.js +13 -1
- package/esm/src/react/components/ai/chat/components/attachment-pill.d.ts +15 -0
- package/esm/src/react/components/ai/chat/components/attachment-pill.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/attachment-pill.js +40 -0
- package/esm/src/react/components/ai/chat/components/branch-picker.d.ts +9 -0
- package/esm/src/react/components/ai/chat/components/branch-picker.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/branch-picker.js +17 -0
- package/esm/src/react/components/ai/chat/components/code-block.d.ts +8 -0
- package/esm/src/react/components/ai/chat/components/code-block.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/code-block.js +38 -0
- package/esm/src/react/components/ai/chat/components/drop-zone.d.ts +7 -0
- package/esm/src/react/components/ai/chat/components/drop-zone.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/drop-zone.js +14 -0
- package/esm/src/react/components/ai/chat/components/empty-state.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/components/empty-state.js +10 -8
- package/esm/src/react/components/ai/chat/components/inference-badge.js +1 -1
- package/esm/src/react/components/ai/chat/components/inline-citation.d.ts +10 -0
- package/esm/src/react/components/ai/chat/components/inline-citation.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/inline-citation.js +59 -0
- package/esm/src/react/components/ai/chat/components/message-actions.d.ts +3 -2
- package/esm/src/react/components/ai/chat/components/message-actions.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/components/message-actions.js +10 -10
- package/esm/src/react/components/ai/chat/components/message-edit-form.d.ts +8 -0
- package/esm/src/react/components/ai/chat/components/message-edit-form.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/message-edit-form.js +46 -0
- package/esm/src/react/components/ai/chat/components/message-feedback.d.ts +9 -0
- package/esm/src/react/components/ai/chat/components/message-feedback.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/message-feedback.js +19 -0
- package/esm/src/react/components/ai/chat/components/quick-actions.d.ts +14 -0
- package/esm/src/react/components/ai/chat/components/quick-actions.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/quick-actions.js +7 -0
- package/esm/src/react/components/ai/chat/components/reasoning.d.ts +3 -4
- package/esm/src/react/components/ai/chat/components/reasoning.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/components/reasoning.js +11 -6
- package/esm/src/react/components/ai/chat/components/sidebar.d.ts +14 -0
- package/esm/src/react/components/ai/chat/components/sidebar.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/sidebar.js +92 -0
- package/esm/src/react/components/ai/chat/components/skill-badge.d.ts +12 -0
- package/esm/src/react/components/ai/chat/components/skill-badge.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/skill-badge.js +34 -0
- package/esm/src/react/components/ai/chat/components/sources.d.ts +13 -0
- package/esm/src/react/components/ai/chat/components/sources.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/sources.js +28 -0
- package/esm/src/react/components/ai/chat/components/step-indicator.d.ts +8 -0
- package/esm/src/react/components/ai/chat/components/step-indicator.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/step-indicator.js +15 -0
- package/esm/src/react/components/ai/chat/components/tab-switcher.d.ts +16 -0
- package/esm/src/react/components/ai/chat/components/tab-switcher.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/tab-switcher.js +28 -0
- package/esm/src/react/components/ai/chat/components/tool-ui.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/components/tool-ui.js +23 -21
- package/esm/src/react/components/ai/chat/components/upgrade-cta.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/components/upgrade-cta.js +3 -3
- package/esm/src/react/components/ai/chat/components/uploads-panel.d.ts +16 -0
- package/esm/src/react/components/ai/chat/components/uploads-panel.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/uploads-panel.js +46 -0
- package/esm/src/react/components/ai/chat/composition/api.d.ts +10 -5
- package/esm/src/react/components/ai/chat/composition/api.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/composition/api.js +12 -20
- package/esm/src/react/components/ai/chat/composition/chat-composer.d.ts +35 -0
- package/esm/src/react/components/ai/chat/composition/chat-composer.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/composition/chat-composer.js +53 -0
- package/esm/src/react/components/ai/chat/composition/chat-empty.d.ts +20 -0
- package/esm/src/react/components/ai/chat/composition/chat-empty.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/composition/chat-empty.js +23 -0
- package/esm/src/react/components/ai/chat/composition/chat-if.d.ts +14 -0
- package/esm/src/react/components/ai/chat/composition/chat-if.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/composition/chat-if.js +11 -0
- package/esm/src/react/components/ai/chat/composition/chat-message-list.d.ts +36 -0
- package/esm/src/react/components/ai/chat/composition/chat-message-list.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/composition/chat-message-list.js +113 -0
- package/esm/src/react/components/ai/chat/composition/chat-root.d.ts +43 -0
- package/esm/src/react/components/ai/chat/composition/chat-root.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/composition/chat-root.js +78 -0
- package/esm/src/react/components/ai/chat/composition/error-banner.d.ts +12 -0
- package/esm/src/react/components/ai/chat/composition/error-banner.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/composition/error-banner.js +17 -0
- package/esm/src/react/components/ai/chat/composition/message.d.ts +54 -0
- package/esm/src/react/components/ai/chat/composition/message.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/composition/message.js +175 -0
- package/esm/src/react/components/ai/chat/composition/model-avatar.d.ts +14 -0
- package/esm/src/react/components/ai/chat/composition/model-avatar.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/composition/model-avatar.js +60 -0
- package/esm/src/react/components/ai/chat/contexts/chat-context.d.ts +45 -0
- package/esm/src/react/components/ai/chat/contexts/chat-context.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/contexts/chat-context.js +20 -0
- package/esm/src/react/components/ai/chat/contexts/composer-context.d.ts +34 -0
- package/esm/src/react/components/ai/chat/contexts/composer-context.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/contexts/composer-context.js +21 -0
- package/esm/src/react/components/ai/chat/contexts/index.d.ts +13 -0
- package/esm/src/react/components/ai/chat/contexts/index.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/contexts/index.js +12 -0
- package/esm/src/react/components/ai/chat/contexts/message-context.d.ts +30 -0
- package/esm/src/react/components/ai/chat/contexts/message-context.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/contexts/message-context.js +21 -0
- package/esm/src/react/components/ai/chat/contexts/thread-list-context.d.ts +23 -0
- package/esm/src/react/components/ai/chat/contexts/thread-list-context.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/contexts/thread-list-context.js +21 -0
- package/esm/src/react/components/ai/chat/hooks/use-threads.d.ts +24 -0
- package/esm/src/react/components/ai/chat/hooks/use-threads.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/hooks/use-threads.js +151 -0
- package/esm/src/react/components/ai/chat/index.d.ts +102 -17
- package/esm/src/react/components/ai/chat/index.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/index.js +164 -95
- package/esm/src/react/components/ai/chat/utils/export.d.ts +10 -0
- package/esm/src/react/components/ai/chat/utils/export.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/utils/export.js +64 -0
- package/esm/src/react/components/ai/chat/utils/message-parts.d.ts +12 -0
- package/esm/src/react/components/ai/chat/utils/message-parts.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/utils/message-parts.js +55 -0
- package/esm/src/react/components/ai/chat-with-sidebar.d.ts +98 -0
- package/esm/src/react/components/ai/chat-with-sidebar.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat-with-sidebar.js +165 -0
- package/esm/src/react/components/ai/chat.d.ts +10 -1
- package/esm/src/react/components/ai/chat.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat.js +25 -1
- package/esm/src/react/components/ai/error-boundary.js +6 -6
- package/esm/src/react/components/ai/icons/index.d.ts +9 -0
- package/esm/src/react/components/ai/icons/index.d.ts.map +1 -1
- package/esm/src/react/components/ai/icons/index.js +82 -0
- package/esm/src/react/components/ai/markdown.d.ts.map +1 -1
- package/esm/src/react/components/ai/markdown.js +12 -12
- package/esm/src/react/components/ai/model-selector.d.ts +10 -2
- package/esm/src/react/components/ai/model-selector.d.ts.map +1 -1
- package/esm/src/react/components/ai/model-selector.js +138 -4
- package/esm/src/react/components/ai/theme.d.ts +96 -13
- package/esm/src/react/components/ai/theme.d.ts.map +1 -1
- package/esm/src/react/components/ai/theme.js +177 -21
- package/esm/src/react/primitives/input-box.d.ts.map +1 -1
- package/esm/src/react/primitives/input-box.js +16 -3
- package/esm/src/rendering/cache/index.d.ts +1 -5
- package/esm/src/rendering/cache/index.d.ts.map +1 -1
- package/esm/src/rendering/cache/index.js +1 -5
- package/esm/src/rendering/component-handling.d.ts +2 -0
- package/esm/src/rendering/component-handling.d.ts.map +1 -1
- package/esm/src/rendering/component-handling.js +7 -9
- package/esm/src/rendering/orchestrator/pipeline.d.ts +11 -2
- package/esm/src/rendering/orchestrator/pipeline.d.ts.map +1 -1
- package/esm/src/rendering/page-renderer.d.ts.map +1 -1
- package/esm/src/rendering/page-renderer.js +1 -0
- package/esm/src/rendering/shared/context-aware-cache.d.ts.map +1 -1
- package/esm/src/rendering/shared/context-aware-cache.js +0 -4
- package/esm/src/repositories/schemas/index.d.ts +1 -1
- package/esm/src/repositories/schemas/index.d.ts.map +1 -1
- package/esm/src/repositories/schemas/index.js +1 -1
- package/esm/src/repositories/schemas/repository.schema.d.ts +0 -11
- package/esm/src/repositories/schemas/repository.schema.d.ts.map +1 -1
- package/esm/src/repositories/schemas/repository.schema.js +0 -13
- package/esm/src/repositories/types.d.ts +1 -1
- package/esm/src/repositories/types.d.ts.map +1 -1
- package/esm/src/routing/api/module-loader/esbuild-plugin.d.ts.map +1 -1
- package/esm/src/routing/api/module-loader/esbuild-plugin.js +11 -24
- package/esm/src/routing/api/module-loader/loader.d.ts +1 -0
- package/esm/src/routing/api/module-loader/loader.d.ts.map +1 -1
- package/esm/src/routing/api/module-loader/loader.js +347 -27
- package/esm/src/routing/api/openapi/path-utils.d.ts +0 -19
- package/esm/src/routing/api/openapi/path-utils.d.ts.map +1 -1
- package/esm/src/routing/api/openapi/path-utils.js +0 -34
- package/esm/src/routing/api/openapi/spec-generator.d.ts.map +1 -1
- package/esm/src/routing/api/openapi/spec-generator.js +1 -19
- package/esm/src/routing/api/openapi/types.d.ts +1 -0
- package/esm/src/routing/api/openapi/types.d.ts.map +1 -1
- package/esm/src/routing/api/openapi/types.js +18 -0
- package/esm/src/sandbox/sandbox.d.ts +1 -0
- package/esm/src/sandbox/sandbox.d.ts.map +1 -1
- package/esm/src/sandbox/sandbox.js +7 -8
- package/esm/src/security/http/cors/constants.d.ts +0 -2
- package/esm/src/security/http/cors/constants.d.ts.map +1 -1
- package/esm/src/security/http/cors/constants.js +0 -2
- package/esm/src/security/http/response/index.d.ts +3 -4
- package/esm/src/security/http/response/index.d.ts.map +1 -1
- package/esm/src/security/http/response/index.js +2 -3
- package/esm/src/server/context/enriched-context.d.ts +0 -8
- package/esm/src/server/context/enriched-context.d.ts.map +1 -1
- package/esm/src/server/context/enriched-context.js +1 -12
- package/esm/src/server/dev-server/server.d.ts.map +1 -1
- package/esm/src/server/dev-server/server.js +11 -4
- package/esm/src/server/dev-ui/manifest.d.ts +20 -20
- package/esm/src/server/dev-ui/manifest.js +20 -20
- package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts +9 -0
- package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -0
- package/esm/src/server/handlers/dev/framework-candidates.generated.js +5187 -0
- package/esm/src/server/handlers/dev/styles-candidate-scanner.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/styles-candidate-scanner.js +3 -190
- package/esm/src/server/handlers/request/module/module-server-handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/module/module-server-handler.js +1 -0
- package/esm/src/server/runtime-handler/index.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/index.js +14 -24
- package/esm/src/server/shared/renderer/memory/pressure.d.ts +0 -7
- package/esm/src/server/shared/renderer/memory/pressure.d.ts.map +1 -1
- package/esm/src/server/shared/renderer/memory/pressure.js +1 -13
- package/esm/src/server/utils/domain-lookup.d.ts +0 -4
- package/esm/src/server/utils/domain-lookup.d.ts.map +1 -1
- package/esm/src/server/utils/domain-lookup.js +0 -3
- package/esm/src/skill/allowed-tools.d.ts +54 -0
- package/esm/src/skill/allowed-tools.d.ts.map +1 -0
- package/esm/src/skill/allowed-tools.js +87 -0
- package/esm/src/skill/executor.d.ts +28 -0
- package/esm/src/skill/executor.d.ts.map +1 -0
- package/esm/src/skill/executor.js +187 -0
- package/esm/src/skill/index.d.ts +19 -0
- package/esm/src/skill/index.d.ts.map +1 -0
- package/esm/src/skill/index.js +24 -0
- package/esm/src/skill/parser.d.ts +30 -0
- package/esm/src/skill/parser.d.ts.map +1 -0
- package/esm/src/skill/parser.js +162 -0
- package/esm/src/skill/path-safety.d.ts +22 -0
- package/esm/src/skill/path-safety.d.ts.map +1 -0
- package/esm/src/skill/path-safety.js +156 -0
- package/esm/src/skill/prompt-augmentation.d.ts +19 -0
- package/esm/src/skill/prompt-augmentation.d.ts.map +1 -0
- package/esm/src/skill/prompt-augmentation.js +36 -0
- package/esm/src/skill/registry.d.ts +25 -0
- package/esm/src/skill/registry.d.ts.map +1 -0
- package/esm/src/skill/registry.js +42 -0
- package/esm/src/skill/tools.d.ts +27 -0
- package/esm/src/skill/tools.d.ts.map +1 -0
- package/esm/src/skill/tools.js +149 -0
- package/esm/src/skill/types.d.ts +85 -0
- package/esm/src/skill/types.d.ts.map +1 -0
- package/esm/src/skill/types.js +27 -0
- package/esm/src/studio/bridge/bridge-bundle.generated.d.ts +1 -1
- package/esm/src/studio/bridge/bridge-bundle.generated.d.ts.map +1 -1
- package/esm/src/studio/bridge/bridge-bundle.generated.js +1 -1
- package/esm/src/studio/element-selector-injector.d.ts +0 -2
- package/esm/src/studio/element-selector-injector.d.ts.map +1 -1
- package/esm/src/task/runner.d.ts +6 -0
- package/esm/src/task/runner.d.ts.map +1 -1
- package/esm/src/task/runner.js +8 -8
- package/esm/src/tool/factory.js +31 -39
- package/esm/src/transforms/esm/http-cache-helpers.d.ts +0 -8
- package/esm/src/transforms/esm/http-cache-helpers.d.ts.map +1 -1
- package/esm/src/transforms/esm/http-cache-helpers.js +0 -20
- package/esm/src/transforms/esm/path-resolver.d.ts +0 -14
- package/esm/src/transforms/esm/path-resolver.d.ts.map +1 -1
- package/esm/src/transforms/esm/path-resolver.js +1 -92
- package/esm/src/transforms/esm/source-url-embed.d.ts +0 -14
- package/esm/src/transforms/esm/source-url-embed.d.ts.map +1 -1
- package/esm/src/transforms/esm/source-url-embed.js +0 -47
- package/esm/src/transforms/esm/transform-cache.d.ts.map +1 -1
- package/esm/src/transforms/esm/transform-cache.js +2 -6
- package/esm/src/transforms/mdx/index.d.ts +0 -1
- package/esm/src/transforms/mdx/index.d.ts.map +1 -1
- package/esm/src/transforms/mdx/index.js +0 -4
- package/esm/src/transforms/pipeline/context.d.ts +0 -1
- package/esm/src/transforms/pipeline/context.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/context.js +0 -1
- package/esm/src/transforms/pipeline/index.d.ts +1 -2
- package/esm/src/transforms/pipeline/index.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/index.js +0 -3
- package/esm/src/transforms/pipeline/stages/ssr-http-cache.d.ts.map +1 -1
- package/esm/src/transforms/pipeline/stages/ssr-http-cache.js +0 -1
- package/esm/src/transforms/plugins/rehype-node-positions.d.ts.map +1 -1
- package/esm/src/transforms/plugins/rehype-node-positions.js +1 -0
- package/esm/src/types/entities/getEntityInfo.js +1 -1
- package/esm/src/types/index.d.ts +2 -13
- package/esm/src/types/index.d.ts.map +1 -1
- package/esm/src/types/server.d.ts +2 -1
- package/esm/src/types/server.d.ts.map +1 -1
- package/esm/src/utils/cache-file-ops.d.ts +1 -1
- package/esm/src/utils/cache-file-ops.d.ts.map +1 -1
- package/esm/src/utils/cache-file-ops.js +5 -6
- package/esm/src/utils/lru-wrapper.d.ts.map +1 -1
- package/esm/src/utils/lru-wrapper.js +2 -4
- package/esm/src/workflow/claude-code/event-publisher.d.ts +0 -4
- package/esm/src/workflow/claude-code/event-publisher.d.ts.map +1 -1
- package/esm/src/workflow/claude-code/event-publisher.js +2 -6
- package/esm/src/workflow/executor/workflow-executor.d.ts.map +1 -1
- package/esm/src/workflow/executor/workflow-executor.js +6 -1
- package/esm/src/workflow/react/use-workflow-list.d.ts.map +1 -1
- package/esm/src/workflow/react/use-workflow-list.js +2 -1
- package/esm/src/workflow/schemas/workflow.schema.d.ts +8 -8
- package/package.json +10 -3
- package/src/cli/app/components/inline-input.ts +0 -5
- package/src/cli/app/components/list-select.ts +0 -21
- package/src/cli/app/operations/project-creation.ts +4 -109
- package/src/cli/app/shell.ts +2 -2
- package/src/cli/app/utils.ts +0 -22
- package/src/cli/app/views/dashboard.ts +0 -17
- package/src/cli/app/views/startup.ts +0 -13
- package/src/cli/auth/login.ts +1 -2
- package/src/cli/auth/token-store.ts +1 -1
- package/src/cli/auth/utils.ts +2 -1
- package/src/cli/commands/generate/integration-generator.ts +1 -1
- package/src/cli/commands/init/catalog.ts +3 -3
- package/src/cli/commands/init/command-help.ts +2 -2
- package/src/cli/commands/init/config-generator.ts +9 -0
- package/src/cli/commands/init/types.ts +1 -1
- package/src/cli/help/formatters.ts +11 -4
- package/src/cli/help/main-help.ts +2 -3
- package/src/cli/help/tips.ts +1 -1
- package/src/cli/mcp/remote-file-tools.ts +1 -1
- package/src/cli/mcp/server.ts +2 -5
- package/src/cli/mcp/tools/catalog-tools.ts +3 -3
- package/src/cli/mcp/tools/dev-tools.ts +1 -2
- package/src/cli/mcp/tools.ts +8 -2
- package/src/cli/shared/reserve-slug.ts +1 -4
- package/src/cli/sync/ignore.ts +26 -21
- package/src/cli/templates/index.ts +2 -2
- package/src/cli/templates/manifest.js +15 -13
- package/src/cli/templates/types.ts +1 -1
- package/src/cli/ui/colors.ts +0 -12
- package/src/cli/ui/dot-matrix.ts +3 -6
- package/src/cli/ui/tui.ts +3 -3
- package/src/cli/utils/index.ts +1 -1
- package/src/cli/utils/package-manager.ts +3 -4
- package/src/deno.js +30 -20
- package/src/src/agent/chat-handler.ts +138 -28
- package/src/src/agent/factory.ts +58 -9
- package/src/src/agent/index.ts +24 -2
- package/src/src/agent/memory/memory.ts +0 -9
- package/src/src/agent/react/index.ts +2 -0
- package/src/src/agent/react/use-chat/index.ts +2 -0
- package/src/src/agent/react/use-chat/streaming/handler.ts +66 -5
- package/src/src/agent/react/use-chat/streaming/parts-builder.ts +18 -1
- package/src/src/agent/react/use-chat/streaming/types.ts +6 -0
- package/src/src/agent/react/use-chat/types.ts +26 -1
- package/src/src/agent/react/use-chat/use-chat.ts +245 -36
- package/src/src/agent/runtime/index.ts +213 -35
- package/src/src/agent/runtime/tool-helpers.ts +9 -0
- package/src/src/agent/types.ts +10 -0
- package/src/src/ai/registry-manager.ts +2 -1
- package/src/src/build/bundler/code-splitter/manifest-builder.ts +1 -1
- package/src/src/build/compiler/mdx-compiler/validator.ts +3 -7
- package/src/src/build/compiler/mdx-to-js.ts +0 -101
- package/src/src/build/index.ts +0 -8
- package/src/src/build/production-build/build/route-collector.ts +2 -4
- package/src/src/build/production-build/client-runtime.ts +21 -5
- package/src/src/build/production-build/templates.ts +9 -18
- package/src/src/build/vendor-cache.ts +0 -6
- package/src/src/cache/tokenizing-gateway.ts +1 -9
- package/src/src/chat/index.ts +169 -34
- package/src/src/config/define-config.ts +30 -29
- package/src/src/config/loader.ts +10 -9
- package/src/src/config/schemas/config.schema.ts +12 -0
- package/src/src/data/data-fetcher.ts +15 -21
- package/src/src/data/server-data-fetcher.ts +1 -8
- package/src/src/data/static-data-fetcher.ts +1 -6
- package/src/src/discovery/discovery-engine.ts +27 -0
- package/src/src/discovery/discovery-utils.ts +0 -7
- package/src/src/discovery/file-discovery.ts +3 -9
- package/src/src/discovery/handlers/index.ts +1 -0
- package/src/src/discovery/handlers/skill-handler.ts +123 -0
- package/src/src/discovery/handlers/task-handler.ts +1 -5
- package/src/src/discovery/transpiler.ts +7 -2
- package/src/src/discovery/types.ts +3 -0
- package/src/src/embedding/chunk.ts +60 -0
- package/src/src/embedding/embedding.ts +62 -0
- package/src/src/embedding/index.ts +49 -0
- package/src/src/embedding/react/use-uploads.ts +101 -0
- package/src/src/embedding/resolve.ts +126 -0
- package/src/src/embedding/types.ts +103 -0
- package/src/src/embedding/upload-handler.ts +180 -0
- package/src/src/embedding/upload-loader.ts +76 -0
- package/src/src/embedding/upload-store.ts +299 -0
- package/src/src/embedding/vector-store.ts +282 -0
- package/src/src/errors/error-registry.ts +2 -2
- package/src/src/errors/http-error.ts +7 -3
- package/src/src/errors/middleware/cli-error-boundary.ts +28 -2
- package/src/src/errors/middleware/wrap-unknown.ts +0 -10
- package/src/src/errors/veryfront-error.ts +0 -9
- package/src/src/html/styles-builder/css-hash-cache.ts +5 -2
- package/src/src/html/styles-builder/plugin-loader.ts +58 -21
- package/src/src/html/styles-builder/tailwind-compiler-cache.ts +11 -4
- package/src/src/html/utils.ts +0 -33
- package/src/src/modules/component-registry/registry.ts +0 -3
- package/src/src/modules/import-map/default-import-map.ts +10 -0
- package/src/src/modules/react-loader/component-loader.ts +1 -0
- package/src/src/modules/react-loader/ssr-module-loader/loader.ts +12 -1
- package/src/src/modules/react-loader/ssr-module-loader/types.ts +2 -0
- package/src/src/modules/react-loader/types.ts +2 -0
- package/src/src/modules/server/module-server.ts +4 -1
- package/src/src/modules/server/websocket-handler.ts +1 -1
- package/src/src/oauth/handlers/callback-handler.ts +17 -5
- package/src/src/oauth/providers/base.ts +3 -3
- package/src/src/oauth/providers/common.ts +0 -23
- package/src/src/observability/auto-instrument/react-instrumentation.ts +2 -2
- package/src/src/observability/instruments/instruments-factory.ts +6 -6
- package/src/src/observability/metrics/config.ts +5 -5
- package/src/src/observability/metrics/manager.ts +1 -1
- package/src/src/observability/tracing/span-operations.ts +14 -9
- package/src/src/platform/compat/console/node.ts +4 -14
- package/src/src/platform/compat/fs.ts +14 -3
- package/src/src/platform/compat/opaque-deps.ts +32 -2
- package/src/src/platform/compat/path/basic-operations.ts +19 -10
- package/src/src/platform/compat/path/resolution.ts +69 -18
- package/src/src/platform/compat/path/url-conversion.ts +10 -6
- package/src/src/platform/compat/process.ts +133 -76
- package/src/src/provider/index.ts +1 -0
- package/src/src/provider/local/ai-sdk-adapter.ts +40 -37
- package/src/src/provider/local/env.ts +4 -1
- package/src/src/provider/local/local-embedding-adapter.ts +37 -0
- package/src/src/provider/local/local-embedding-engine.ts +88 -0
- package/src/src/provider/local/local-engine.ts +1 -1
- package/src/src/provider/local/model-catalog.ts +67 -1
- package/src/src/provider/model-registry.ts +47 -0
- package/src/src/proxy/retry.ts +0 -9
- package/src/src/proxy/tracing.ts +1 -9
- package/src/src/react/components/ai/agent-card.tsx +13 -13
- package/src/src/react/components/ai/chat/components/animations.tsx +31 -1
- package/src/src/react/components/ai/chat/components/attachment-pill.tsx +110 -0
- package/src/src/react/components/ai/chat/components/branch-picker.tsx +70 -0
- package/src/src/react/components/ai/chat/components/code-block.tsx +82 -0
- package/src/src/react/components/ai/chat/components/drop-zone.tsx +49 -0
- package/src/src/react/components/ai/chat/components/empty-state.tsx +20 -8
- package/src/src/react/components/ai/chat/components/inference-badge.tsx +1 -1
- package/src/src/react/components/ai/chat/components/inline-citation.tsx +150 -0
- package/src/src/react/components/ai/chat/components/message-actions.tsx +73 -51
- package/src/src/react/components/ai/chat/components/message-edit-form.tsx +95 -0
- package/src/src/react/components/ai/chat/components/message-feedback.tsx +72 -0
- package/src/src/react/components/ai/chat/components/quick-actions.tsx +38 -0
- package/src/src/react/components/ai/chat/components/reasoning.tsx +40 -35
- package/src/src/react/components/ai/chat/components/sidebar.tsx +204 -0
- package/src/src/react/components/ai/chat/components/skill-badge.tsx +51 -0
- package/src/src/react/components/ai/chat/components/sources.tsx +99 -0
- package/src/src/react/components/ai/chat/components/step-indicator.tsx +33 -0
- package/src/src/react/components/ai/chat/components/tab-switcher.tsx +69 -0
- package/src/src/react/components/ai/chat/components/tool-ui.tsx +31 -29
- package/src/src/react/components/ai/chat/components/upgrade-cta.tsx +3 -4
- package/src/src/react/components/ai/chat/components/uploads-panel.tsx +129 -0
- package/src/src/react/components/ai/chat/composition/api.tsx +12 -62
- package/src/src/react/components/ai/chat/composition/chat-composer.tsx +205 -0
- package/src/src/react/components/ai/chat/composition/chat-empty.tsx +77 -0
- package/src/src/react/components/ai/chat/composition/chat-if.tsx +25 -0
- package/src/src/react/components/ai/chat/composition/chat-message-list.tsx +356 -0
- package/src/src/react/components/ai/chat/composition/chat-root.tsx +181 -0
- package/src/src/react/components/ai/chat/composition/error-banner.tsx +38 -0
- package/src/src/react/components/ai/chat/composition/message.tsx +337 -0
- package/src/src/react/components/ai/chat/composition/model-avatar.tsx +103 -0
- package/src/src/react/components/ai/chat/contexts/chat-context.tsx +78 -0
- package/src/src/react/components/ai/chat/contexts/composer-context.tsx +59 -0
- package/src/src/react/components/ai/chat/contexts/index.ts +36 -0
- package/src/src/react/components/ai/chat/contexts/message-context.tsx +49 -0
- package/src/src/react/components/ai/chat/contexts/thread-list-context.tsx +40 -0
- package/src/src/react/components/ai/chat/hooks/use-threads.ts +208 -0
- package/src/src/react/components/ai/chat/index.tsx +389 -230
- package/src/src/react/components/ai/chat/utils/export.ts +77 -0
- package/src/src/react/components/ai/chat/utils/message-parts.ts +63 -1
- package/src/src/react/components/ai/chat-with-sidebar.tsx +371 -0
- package/src/src/react/components/ai/chat.tsx +122 -7
- package/src/src/react/components/ai/error-boundary.tsx +6 -6
- package/src/src/react/components/ai/icons/index.ts +100 -0
- package/src/src/react/components/ai/markdown.tsx +12 -15
- package/src/src/react/components/ai/model-selector.tsx +223 -15
- package/src/src/react/components/ai/theme.ts +205 -39
- package/src/src/react/primitives/input-box.tsx +27 -4
- package/src/src/rendering/cache/index.ts +12 -5
- package/src/src/rendering/component-handling.ts +9 -9
- package/src/src/rendering/orchestrator/pipeline.ts +12 -2
- package/src/src/rendering/page-renderer.ts +1 -0
- package/src/src/rendering/renderer.ts +1 -1
- package/src/src/rendering/shared/context-aware-cache.ts +0 -5
- package/src/src/repositories/schemas/index.ts +0 -2
- package/src/src/repositories/schemas/repository.schema.ts +0 -15
- package/src/src/repositories/types.ts +1 -6
- package/src/src/routing/api/module-loader/esbuild-plugin.ts +11 -25
- package/src/src/routing/api/module-loader/loader.ts +421 -17
- package/src/src/routing/api/openapi/path-utils.ts +0 -39
- package/src/src/routing/api/openapi/spec-generator.ts +1 -20
- package/src/src/routing/api/openapi/types.ts +20 -0
- package/src/src/sandbox/sandbox.ts +8 -8
- package/src/src/security/http/cors/constants.ts +0 -4
- package/src/src/security/http/response/index.ts +3 -9
- package/src/src/server/context/enriched-context.ts +1 -19
- package/src/src/server/dev-server/server.ts +11 -4
- package/src/src/server/dev-ui/manifest.js +20 -20
- package/src/src/server/handlers/dev/framework-candidates.generated.ts +5188 -0
- package/src/src/server/handlers/dev/styles-candidate-scanner.ts +3 -191
- package/src/src/server/handlers/request/module/module-server-handler.ts +1 -0
- package/src/src/server/runtime-handler/index.ts +17 -28
- package/src/src/server/shared/renderer/memory/pressure.ts +2 -15
- package/src/src/server/utils/domain-lookup.ts +0 -4
- package/src/src/skill/allowed-tools.ts +107 -0
- package/src/src/skill/executor.ts +215 -0
- package/src/src/skill/index.ts +60 -0
- package/src/src/skill/parser.ts +214 -0
- package/src/src/skill/path-safety.ts +203 -0
- package/src/src/skill/prompt-augmentation.ts +48 -0
- package/src/src/skill/registry.ts +51 -0
- package/src/src/skill/tools.ts +197 -0
- package/src/src/skill/types.ts +107 -0
- package/src/src/studio/bridge/bridge-bundle.generated.ts +1 -1
- package/src/src/studio/element-selector-injector.ts +0 -2
- package/src/src/task/runner.ts +10 -8
- package/src/src/tool/factory.ts +54 -54
- package/src/src/transforms/esm/http-cache-helpers.ts +0 -20
- package/src/src/transforms/esm/path-resolver.ts +1 -140
- package/src/src/transforms/esm/source-url-embed.ts +0 -53
- package/src/src/transforms/esm/transform-cache.ts +3 -7
- package/src/src/transforms/mdx/index.ts +0 -5
- package/src/src/transforms/pipeline/context.ts +0 -2
- package/src/src/transforms/pipeline/index.ts +0 -4
- package/src/src/transforms/pipeline/stages/ssr-http-cache.ts +0 -1
- package/src/src/transforms/plugins/rehype-node-positions.ts +1 -0
- package/src/src/types/entities/getEntityInfo.ts +1 -1
- package/src/src/types/index.ts +1 -20
- package/src/src/types/server.ts +1 -1
- package/src/src/utils/cache-file-ops.ts +5 -5
- package/src/src/utils/logger/logger.ts +2 -2
- package/src/src/utils/lru-wrapper.ts +2 -8
- package/src/src/workflow/claude-code/event-publisher.ts +13 -4
- package/src/src/workflow/executor/workflow-executor.ts +7 -2
- package/src/src/workflow/react/use-workflow-list.ts +3 -2
- package/esm/src/transforms/mdx/parser.d.ts +0 -4
- package/esm/src/transforms/mdx/parser.d.ts.map +0 -1
- package/esm/src/transforms/mdx/parser.js +0 -49
- package/src/src/transforms/mdx/parser.ts +0 -65
|
@@ -44,11 +44,6 @@ export function fromError(error) {
|
|
|
44
44
|
return null;
|
|
45
45
|
return context;
|
|
46
46
|
}
|
|
47
|
-
export function logError(error, logger) {
|
|
48
|
-
const log = logger ?? console;
|
|
49
|
-
const context = "context" in error ? error.context : undefined;
|
|
50
|
-
log.error(`[${error.type}] ${error.message}`, context ?? {});
|
|
51
|
-
}
|
|
52
47
|
/**
|
|
53
48
|
* Extract error message from any error type
|
|
54
49
|
*/
|
|
@@ -135,23 +135,23 @@ export declare const HydrationDataSchema: z.ZodObject<{
|
|
|
135
135
|
appPath: z.ZodOptional<z.ZodString>;
|
|
136
136
|
pagePath: z.ZodOptional<z.ZodString>;
|
|
137
137
|
}, "strip", z.ZodTypeAny, {
|
|
138
|
-
props: Record<string, unknown>;
|
|
139
138
|
params: Record<string, string | string[]>;
|
|
140
139
|
slug: string;
|
|
141
140
|
layouts: {
|
|
142
141
|
kind: string;
|
|
143
142
|
path?: string | undefined;
|
|
144
143
|
}[];
|
|
144
|
+
props: Record<string, unknown>;
|
|
145
145
|
appPath?: string | undefined;
|
|
146
146
|
pagePath?: string | undefined;
|
|
147
147
|
}, {
|
|
148
|
-
props: Record<string, unknown>;
|
|
149
148
|
params: Record<string, string | string[]>;
|
|
150
149
|
slug: string;
|
|
151
150
|
layouts: {
|
|
152
151
|
kind: string;
|
|
153
152
|
path?: string | undefined;
|
|
154
153
|
}[];
|
|
154
|
+
props: Record<string, unknown>;
|
|
155
155
|
appPath?: string | undefined;
|
|
156
156
|
pagePath?: string | undefined;
|
|
157
157
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css-hash-cache.d.ts","sourceRoot":"","sources":["../../../../src/src/html/styles-builder/css-hash-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"css-hash-cache.d.ts","sourceRoot":"","sources":["../../../../src/src/html/styles-builder/css-hash-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAuBH;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB;AAMD,eAAO,MAAM,kBAAkB,qKAE8D,CAAC;AA6I9F;;;;GAIG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,MAAM,EACb,MAAM,CAAC,EAAE;IAAE,UAAU,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAClE,OAAO,CAAC,MAAM,CAAC,CAiBjB;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAO7D;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CA2BjF;AAED,wBAAgB,aAAa,IAAI,IAAI,CAGpC;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE;IAAE,UAAU,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACjE,OAAO,CAAC,IAAI,CAAC,CAiBf;AA8DD;;;;GAIG;AACH,wBAAsB,yBAAyB,CAC7C,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC,CAS1C;AAED;;GAEG;AACH,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,aAAa,GACnB,OAAO,CAAC,IAAI,CAAC,CAYf"}
|
|
@@ -12,8 +12,7 @@ import { serverLogger } from "../../utils/index.js";
|
|
|
12
12
|
import { withSpan } from "../../observability/tracing/otlp-setup.js";
|
|
13
13
|
import { SpanNames } from "../../observability/tracing/span-names.js";
|
|
14
14
|
import { hashCSS } from "./candidate-extractor.js";
|
|
15
|
-
import { buildCSSCacheEntry, parseCSSCacheEntry } from "./tailwind-compiler-utils.js";
|
|
16
|
-
import { resolveStylesheet } from "./tailwind-compiler-utils.js";
|
|
15
|
+
import { buildCSSCacheEntry, parseCSSCacheEntry, resolveStylesheet, } from "./tailwind-compiler-utils.js";
|
|
17
16
|
const logger = serverLogger.component("tailwind");
|
|
18
17
|
// ============================================================================
|
|
19
18
|
// Constants
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-loader.d.ts","sourceRoot":"","sources":["../../../../src/src/html/styles-builder/plugin-loader.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-loader.d.ts","sourceRoot":"","sources":["../../../../src/src/html/styles-builder/plugin-loader.ts"],"names":[],"mappings":"AAiGA;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAsD/E;AAED,wBAAsB,UAAU,CAC9B,EAAE,EAAE,MAAM,EACV,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAChC,OAAO,CAAC,OAAO,CAAC,CA+ClB"}
|
|
@@ -47,6 +47,40 @@ dntShim.dntGlobalThis.__tailwindColorsShim = {
|
|
|
47
47
|
default: colors,
|
|
48
48
|
__esModule: true,
|
|
49
49
|
};
|
|
50
|
+
function isRealDenoRuntime() {
|
|
51
|
+
return typeof dntShim.Deno !== "undefined" && typeof dntShim.Deno.version === "object";
|
|
52
|
+
}
|
|
53
|
+
function encodeToBase64(source) {
|
|
54
|
+
const bufferCtor = dntShim.dntGlobalThis.Buffer;
|
|
55
|
+
if (bufferCtor?.from) {
|
|
56
|
+
return bufferCtor.from(source, "utf8").toString("base64");
|
|
57
|
+
}
|
|
58
|
+
const bytes = new TextEncoder().encode(source);
|
|
59
|
+
let binary = "";
|
|
60
|
+
for (const byte of bytes)
|
|
61
|
+
binary += String.fromCharCode(byte);
|
|
62
|
+
return btoa(binary);
|
|
63
|
+
}
|
|
64
|
+
async function importBundledModule(code) {
|
|
65
|
+
if (!isRealDenoRuntime()) {
|
|
66
|
+
const dataUrl = `data:text/javascript;base64,${encodeToBase64(code)}`;
|
|
67
|
+
return await import(dataUrl);
|
|
68
|
+
}
|
|
69
|
+
const tempPath = await dntShim.Deno.makeTempFile({ prefix: "vf_tw_plugin_", suffix: ".mjs" });
|
|
70
|
+
await dntShim.Deno.writeTextFile(tempPath, code);
|
|
71
|
+
logger.debug("Wrote plugin to temp file", { path: tempPath });
|
|
72
|
+
try {
|
|
73
|
+
return await import(`file://${tempPath}`);
|
|
74
|
+
}
|
|
75
|
+
finally {
|
|
76
|
+
await dntShim.Deno.remove(tempPath).catch((error) => {
|
|
77
|
+
logger.error("Failed to clean up temp plugin file", {
|
|
78
|
+
path: tempPath,
|
|
79
|
+
error: error instanceof Error ? error.message : String(error),
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
50
84
|
/**
|
|
51
85
|
* Dynamically load a module from esm.sh in a compiled Deno binary.
|
|
52
86
|
*
|
|
@@ -91,21 +125,7 @@ export async function loadModuleFromEsmSh(packageName) {
|
|
|
91
125
|
}
|
|
92
126
|
// Step 4b: Patch out localStorage access from util-deprecate
|
|
93
127
|
code = code.replace(/globalThis\.localStorage/g, "(globalThis.__localStorageShim||(globalThis.__localStorageShim={getItem:()=>null,setItem:()=>{},length:0}))");
|
|
94
|
-
|
|
95
|
-
const tempPath = `/tmp/tw_plugin_${dntShim.crypto.randomUUID()}.mjs`;
|
|
96
|
-
await dntShim.Deno.writeTextFile(tempPath, code);
|
|
97
|
-
logger.debug("Wrote plugin to temp file", { path: tempPath });
|
|
98
|
-
try {
|
|
99
|
-
return await import(`file://${tempPath}`);
|
|
100
|
-
}
|
|
101
|
-
finally {
|
|
102
|
-
await dntShim.Deno.remove(tempPath).catch((error) => {
|
|
103
|
-
logger.error("Failed to clean up temp plugin file", {
|
|
104
|
-
path: tempPath,
|
|
105
|
-
error: error instanceof Error ? error.message : String(error),
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
}
|
|
128
|
+
return await importBundledModule(code);
|
|
109
129
|
}
|
|
110
130
|
export async function loadPlugin(id, pluginCache, pluginErrors) {
|
|
111
131
|
if (pluginCache.has(id)) {
|
|
@@ -126,12 +146,21 @@ export async function loadPlugin(id, pluginCache, pluginErrors) {
|
|
|
126
146
|
try {
|
|
127
147
|
mod = await import(id);
|
|
128
148
|
}
|
|
129
|
-
catch {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
149
|
+
catch (importError) {
|
|
150
|
+
logger.debug("Plugin not found in node_modules, falling back to esm.sh", { id });
|
|
151
|
+
try {
|
|
152
|
+
mod = await loadModuleFromEsmSh(id);
|
|
153
|
+
}
|
|
154
|
+
catch {
|
|
155
|
+
const errorMsg = `Failed to load plugin "${id}": plugin not installed`;
|
|
156
|
+
logger.warn("Plugin not installed", {
|
|
157
|
+
id,
|
|
158
|
+
error: importError instanceof Error ? importError.message : String(importError),
|
|
159
|
+
});
|
|
160
|
+
pluginErrors.set(id, errorMsg);
|
|
161
|
+
pluginCache.set(id, null);
|
|
162
|
+
throw new Error(errorMsg);
|
|
163
|
+
}
|
|
135
164
|
}
|
|
136
165
|
}
|
|
137
166
|
const pluginExport = mod.default ?? mod;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind-compiler-cache.d.ts","sourceRoot":"","sources":["../../../../src/src/html/styles-builder/tailwind-compiler-cache.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"tailwind-compiler-cache.d.ts","sourceRoot":"","sources":["../../../../src/src/html/styles-builder/tailwind-compiler-cache.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAwEtC,wBAAsB,WAAW,CAC/B,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,CA0C9C;AAED,wBAAgB,kBAAkB,IAAI,IAAI,CAGzC;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC1E,CAQA;AAED,wBAAgB,gBAAgB,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAalD"}
|
|
@@ -28,11 +28,19 @@ async function getTailwindBaseCSS() {
|
|
|
28
28
|
return tailwindBaseCSS;
|
|
29
29
|
const url = getTailwindCSSUrl();
|
|
30
30
|
logger.debug("Fetching base CSS", { url });
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
try {
|
|
32
|
+
const response = await dntShim.fetch(url);
|
|
33
|
+
if (!response.ok) {
|
|
34
|
+
throw new Error(`Failed to fetch Tailwind CSS: ${response.status} ${response.statusText}`);
|
|
35
|
+
}
|
|
36
|
+
tailwindBaseCSS = await response.text();
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
logger.warn("Failed to fetch Tailwind base CSS, using empty fallback", {
|
|
40
|
+
error: error instanceof Error ? error.message : String(error),
|
|
41
|
+
});
|
|
42
|
+
tailwindBaseCSS = "";
|
|
34
43
|
}
|
|
35
|
-
tailwindBaseCSS = await response.text();
|
|
36
44
|
return tailwindBaseCSS;
|
|
37
45
|
}
|
|
38
46
|
function evictOldestCompiler() {
|
package/esm/src/html/utils.d.ts
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import type { VeryfrontConfig } from "../config/index.js";
|
|
2
2
|
export declare function buildRootAttributes(slug: string, mode: string, noLayout: boolean, ssrHash?: string): string;
|
|
3
|
-
interface DetectedVersions {
|
|
4
|
-
react: string;
|
|
5
|
-
veryfront: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function detectVersions(projectDir: string): Promise<DetectedVersions>;
|
|
8
3
|
export interface BuildImportMapOptions {
|
|
9
4
|
projectDir?: string;
|
|
10
5
|
config?: VeryfrontConfig;
|
|
11
6
|
customImports?: Record<string, string>;
|
|
12
7
|
}
|
|
13
8
|
export declare function buildImportMapJson(options?: BuildImportMapOptions | Record<string, string>): Promise<string>;
|
|
14
|
-
export declare function buildImportMapJsonSync(importMap?: Record<string, string>): string;
|
|
15
9
|
export declare function shouldDisableLayout(frontmatter?: Record<string, unknown>): boolean;
|
|
16
|
-
export {};
|
|
17
10
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/src/html/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAa1D,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,OAAO,EACjB,OAAO,CAAC,EAAE,MAAM,GACf,MAAM,CAQR;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/src/html/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAa1D,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,OAAO,EACjB,OAAO,CAAC,EAAE,MAAM,GACf,MAAM,CAQR;AA6MD,MAAM,WAAW,qBAAqB;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACxC;AAQD,wBAAsB,kBAAkB,CACtC,OAAO,CAAC,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACvD,OAAO,CAAC,MAAM,CAAC,CAwCjB;AAED,wBAAgB,mBAAmB,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAElF"}
|
package/esm/src/html/utils.js
CHANGED
|
@@ -17,24 +17,6 @@ const DEFAULT_VERSIONS = {
|
|
|
17
17
|
react: DEFAULT_REACT_VERSION,
|
|
18
18
|
veryfront: VERYFRONT_VERSION,
|
|
19
19
|
};
|
|
20
|
-
export async function detectVersions(projectDir) {
|
|
21
|
-
try {
|
|
22
|
-
const { createFileSystem } = await import("../platform/compat/fs.js");
|
|
23
|
-
const fs = createFileSystem();
|
|
24
|
-
const content = await fs.readTextFile(`${projectDir}/package.json`);
|
|
25
|
-
const pkg = JSON.parse(content);
|
|
26
|
-
const deps = { ...pkg.dependencies, ...pkg.devDependencies };
|
|
27
|
-
// Use shared resolver for React version (ensures consistency with module server)
|
|
28
|
-
const reactVersion = await resolveProjectReactVersion({ projectDir });
|
|
29
|
-
return {
|
|
30
|
-
react: reactVersion,
|
|
31
|
-
veryfront: deps.veryfront ? stripSemverRange(deps.veryfront) : DEFAULT_VERSIONS.veryfront,
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
catch {
|
|
35
|
-
return DEFAULT_VERSIONS;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
20
|
// Platform utilities served from local module server to match SSR behavior.
|
|
39
21
|
// This ensures hydration matches (same code on server and client).
|
|
40
22
|
// CRITICAL: veryfront/context must use local module to share React context with SSR.
|
|
@@ -154,9 +136,6 @@ const CDN_IMPORT_MAP_FACTORIES = {
|
|
|
154
136
|
function getCdnImportMap(versions, provider = "esm.sh") {
|
|
155
137
|
return (CDN_IMPORT_MAP_FACTORIES[provider] ?? getEsmShImportMap)(versions);
|
|
156
138
|
}
|
|
157
|
-
function getDefaultHTMLImportMap() {
|
|
158
|
-
return getEsmShImportMap(DEFAULT_VERSIONS);
|
|
159
|
-
}
|
|
160
139
|
async function resolveVersions(projectDir, config) {
|
|
161
140
|
// Use shared resolver for React (handles config override + package.json + fallback)
|
|
162
141
|
const reactVersion = await resolveProjectReactVersion({ projectDir, config });
|
|
@@ -221,10 +200,6 @@ export async function buildImportMapJson(options) {
|
|
|
221
200
|
}
|
|
222
201
|
return JSON.stringify({ imports }, null, 2);
|
|
223
202
|
}
|
|
224
|
-
export function buildImportMapJsonSync(importMap) {
|
|
225
|
-
const imports = importMap ?? getDefaultHTMLImportMap();
|
|
226
|
-
return JSON.stringify({ imports }, null, 2);
|
|
227
|
-
}
|
|
228
203
|
export function shouldDisableLayout(frontmatter) {
|
|
229
204
|
return frontmatter?.layout === false || frontmatter?.layout === "false";
|
|
230
205
|
}
|
|
@@ -37,9 +37,6 @@ export declare class ComponentRegistry {
|
|
|
37
37
|
loadAll(): Promise<void>;
|
|
38
38
|
get(name: string): ComponentInfo | undefined;
|
|
39
39
|
getAll(): Map<string, ComponentInfo>;
|
|
40
|
-
/**
|
|
41
|
-
* Loader accessor for compatibility with older tests; loader is not used in this registry.
|
|
42
|
-
*/
|
|
43
40
|
getLoader(): ComponentLoader | undefined;
|
|
44
41
|
getAllAsComponents(): Record<string, React.ComponentType<unknown>>;
|
|
45
42
|
has(name: string): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/component-registry/registry.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,OAAO,EAAE,cAAc,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,aAAa,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/F,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF,qBAAa,iBAAiB;IAOhB,OAAO,CAAC,OAAO;IAN3B,OAAO,CAAC,UAAU,CAAoC;IACtD,OAAO,CAAC,aAAa,CAAW;IAChC,OAAO,CAAC,kBAAkB,CAA8B;IACxD,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,WAAW,CAAS;gBAER,OAAO,EAAE,wBAAwB;IAUrD,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;YAcX,iBAAiB;YAsBjB,aAAa;IAmC3B,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IA4B1D,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAUxB,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAI5C,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC;IAIpC
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/component-registry/registry.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,OAAO,EAAE,cAAc,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,aAAa,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/F,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF,qBAAa,iBAAiB;IAOhB,OAAO,CAAC,OAAO;IAN3B,OAAO,CAAC,UAAU,CAAoC;IACtD,OAAO,CAAC,aAAa,CAAW;IAChC,OAAO,CAAC,kBAAkB,CAA8B;IACxD,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,WAAW,CAAS;gBAER,OAAO,EAAE,wBAAwB;IAUrD,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;YAcX,iBAAiB;YAsBjB,aAAa;IAmC3B,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IA4B1D,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAUxB,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAI5C,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC;IAIpC,SAAS,IAAI,eAAe,GAAG,SAAS;IAIxC,kBAAkB,IAAI,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAWlE,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI1B,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI;IAUrD,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI1B,KAAK,IAAI,IAAI;IAMb,iBAAiB,IAAI,MAAM,EAAE;IAIvB,cAAc,IAAI,OAAO,CAC7B,KAAK,CAAC;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CACH;CA0BF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-import-map.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/import-map/default-import-map.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"default-import-map.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/import-map/default-import-map.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAwDlD,wBAAgB,mBAAmB,IAAI,eAAe,CAIrD"}
|
|
@@ -22,7 +22,14 @@ function getVeryfrontSsrImportMap() {
|
|
|
22
22
|
// that fails to transform and produces unresolved relative imports. SSR only needs
|
|
23
23
|
// the React hooks (useWorkflowStart, useWorkflowList, useWorkflow, useApproval).
|
|
24
24
|
const workflowReact = `${base}/workflow/react/index.js${ssr}`;
|
|
25
|
+
// veryfront/react is a barrel that re-exports all browser-side modules.
|
|
26
|
+
const react = `${base}/react/public.js${ssr}`;
|
|
27
|
+
// Map veryfront/embedding to the React hooks submodule for SSR.
|
|
28
|
+
// The full embedding/index.ts imports heavy server-side code (vectorStore, uploadStore,
|
|
29
|
+
// AI SDK) that fails to transform. SSR only needs the React hook (useUploads).
|
|
30
|
+
const embedding = `${base}/embedding/react/index.js${ssr}`;
|
|
25
31
|
return {
|
|
32
|
+
"veryfront/react": react,
|
|
26
33
|
"veryfront/head": head,
|
|
27
34
|
"veryfront/router": router,
|
|
28
35
|
"veryfront/context": context,
|
|
@@ -30,6 +37,7 @@ function getVeryfrontSsrImportMap() {
|
|
|
30
37
|
"veryfront/markdown": markdown,
|
|
31
38
|
"veryfront/chat": chat,
|
|
32
39
|
"veryfront/mdx": mdx,
|
|
40
|
+
"veryfront/embedding": embedding,
|
|
33
41
|
"veryfront/workflow": workflowReact,
|
|
34
42
|
"veryfront/react/head": head,
|
|
35
43
|
"veryfront/react/router": router,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-loader.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/react-loader/component-loader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAKtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAMvD,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,cAAc,EACvB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"component-loader.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/react-loader/component-loader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAKtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAMvD,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,cAAc,EACvB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CA4DvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../../src/src/modules/react-loader/ssr-module-loader/loader.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAiCpC,OAAO,KAAK,EAAoB,sBAAsB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../../src/src/modules/react-loader/ssr-module-loader/loader.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAiCpC,OAAO,KAAK,EAAoB,sBAAsB,EAAE,MAAM,YAAY,CAAC;AA0B3E;;;;;GAKG;AACH,qBAAa,eAAe;IAKd,OAAO,CAAC,OAAO;IAJ3B,OAAO,CAAC,KAAK,CAAkB;IAC/B,OAAO,CAAC,cAAc,CAA2B;IACjD,OAAO,CAAC,YAAY,CAAyB;gBAEzB,OAAO,EAAE,sBAAsB;IAWnD,OAAO,CAAC,mBAAmB;IAY3B,OAAO,CAAC,4BAA4B;YAetB,qBAAqB;YAuCrB,0BAA0B;IA2FxC,UAAU,CACR,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;YA+C1C,2BAA2B;IAYzC,OAAO,CAAC,yBAAyB;YAiBnB,2BAA2B;CAqV1C"}
|
|
@@ -31,6 +31,7 @@ import { SSRDependencyValidator } from "./ssr-dependency-validator.js";
|
|
|
31
31
|
import { preflightLocalImports } from "./preflight-imports.js";
|
|
32
32
|
import { resolveVfModuleImports } from "./vf-module-resolver.js";
|
|
33
33
|
import { registerCSSImport } from "../css-import-collector.js";
|
|
34
|
+
import { injectNodePositions } from "../../../transforms/plugins/babel-node-positions.js";
|
|
34
35
|
const logger = rendererLogger.component("ssr-module-loader");
|
|
35
36
|
const MISSING_HTTP_BUNDLE_PATTERN = /veryfront-http-bundle\/http-([a-f0-9]+)\.mjs/;
|
|
36
37
|
/**
|
|
@@ -216,7 +217,15 @@ export class SSRModuleLoader {
|
|
|
216
217
|
context: { file: filePath, phase: "transform" },
|
|
217
218
|
}));
|
|
218
219
|
}
|
|
219
|
-
|
|
220
|
+
let code = source ?? (await this.options.adapter.fs.readFile(filePath));
|
|
221
|
+
// Inject node positions for JSX files in dev or preview mode
|
|
222
|
+
const shouldInjectPositions = this.options.dev || this.options.mode === "preview";
|
|
223
|
+
if (shouldInjectPositions && /\.(tsx|jsx)$/i.test(filePath)) {
|
|
224
|
+
const relativeFilePath = filePath.startsWith(this.options.projectDir)
|
|
225
|
+
? filePath.slice(this.options.projectDir.length).replace(/^\/+/, "")
|
|
226
|
+
: filePath;
|
|
227
|
+
code = injectNodePositions(code, { filePath: relativeFilePath });
|
|
228
|
+
}
|
|
220
229
|
const contentHash = await this.cache.hashContentAsync(code);
|
|
221
230
|
const contentCacheKey = this.cache.getCacheKey(`${filePath}:${contentHash}`);
|
|
222
231
|
const filePathCacheKey = this.cache.getCacheKey(filePath);
|
|
@@ -18,6 +18,8 @@ export interface SSRModuleLoaderOptions {
|
|
|
18
18
|
contentSourceId?: string;
|
|
19
19
|
/** React version for transforms (defaults to DEFAULT_REACT_VERSION) */
|
|
20
20
|
reactVersion?: string;
|
|
21
|
+
/** Request mode ("preview" | "production") for studio features */
|
|
22
|
+
mode?: string;
|
|
21
23
|
}
|
|
22
24
|
export interface ModuleCacheEntry {
|
|
23
25
|
tempPath: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/src/modules/react-loader/ssr-module-loader/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzE,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,cAAc,CAAC;IACxB,GAAG,EAAE,OAAO,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wEAAwE;IACxE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/src/modules/react-loader/ssr-module-loader/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzE,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,cAAc,CAAC;IACxB,GAAG,EAAE,OAAO,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wEAAwE;IACxE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,uBAAuB,EAAE,OAAO,CAAC;CAClC"}
|
|
@@ -12,6 +12,8 @@ export interface LoadComponentOptions {
|
|
|
12
12
|
contentSourceId?: string;
|
|
13
13
|
/** React version for transforms (from project config) */
|
|
14
14
|
reactVersion?: string;
|
|
15
|
+
/** Request mode ("preview" | "production") for studio features */
|
|
16
|
+
mode?: string;
|
|
15
17
|
}
|
|
16
18
|
export interface ComponentSource {
|
|
17
19
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/react-loader/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mFAAmF;IACnF,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,wEAAwE;IACxE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/react-loader/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mFAAmF;IACnF,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,wEAAwE;IACxE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -43,6 +43,8 @@ export interface ModuleServerOptions {
|
|
|
43
43
|
allowedImportDirs?: string[];
|
|
44
44
|
/** React version for transforms (from project config) */
|
|
45
45
|
reactVersion?: string;
|
|
46
|
+
/** Request mode ("preview" | "production") for studio features like node positions */
|
|
47
|
+
mode?: string;
|
|
46
48
|
}
|
|
47
49
|
/** Serve transformed module at /_vf_modules/* path */
|
|
48
50
|
export declare function serveModule(req: dntShim.Request, options: ModuleServerOptions): Promise<dntShim.Response>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-server.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/server/module-server.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAC;AAIlD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAmBtE;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkDrD,CAAC;AAEF;;;;;GAKG;AACH,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,IAAI,CAAC,CAuB/D;AASD,MAAM,WAAW,mBAAmB;IAClC,yDAAyD;IACzD,SAAS,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,OAAO,EAAE,cAAc,CAAC;IACxB,uBAAuB;IACvB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gFAAgF;IAChF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"module-server.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/server/module-server.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAC;AAIlD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAmBtE;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkDrD,CAAC;AAEF;;;;;GAKG;AACH,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,IAAI,CAAC,CAuB/D;AASD,MAAM,WAAW,mBAAmB;IAClC,yDAAyD;IACzD,SAAS,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,OAAO,EAAE,cAAc,CAAC;IACxB,uBAAuB;IACvB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gFAAgF;IAChF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sFAAsF;IACtF,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,sDAAsD;AACtD,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAqTzG;AAmND;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,CAAC,OAAO,GAAG,OAAO,CAG7D"}
|
|
@@ -299,8 +299,9 @@ export function serveModule(req, options) {
|
|
|
299
299
|
const userAgent = req.headers.get("user-agent") ?? "";
|
|
300
300
|
const isSSR = url.searchParams.get("ssr") === "true" || userAgent.startsWith("Deno/");
|
|
301
301
|
const studioEmbed = url.searchParams.get("studio_embed") === "true";
|
|
302
|
+
const shouldInjectPositions = dev || options.mode === "preview";
|
|
302
303
|
const isJsxFile = /\.(tsx|jsx)$/i.test(sourceFile);
|
|
303
|
-
if (
|
|
304
|
+
if (shouldInjectPositions && !isFrameworkFile && isJsxFile) {
|
|
304
305
|
const relativeFilePath = sourceFile.startsWith(projectDir)
|
|
305
306
|
? sourceFile.slice(projectDir.length).replace(/^\/+/, "")
|
|
306
307
|
: sourceFile;
|
|
@@ -20,6 +20,8 @@ export interface OAuthCallbackHandlerOptions {
|
|
|
20
20
|
onSuccess?: (serviceId: string, tokens: unknown) => void | Promise<void>;
|
|
21
21
|
/** Custom error callback */
|
|
22
22
|
onError?: (serviceId: string, error: string) => void | Promise<void>;
|
|
23
|
+
/** Skip state validation for providers that don't return state */
|
|
24
|
+
skipStateValidation?: boolean;
|
|
23
25
|
/** EnvironmentConfig for test isolation (defaults to getEnvironmentConfig()) */
|
|
24
26
|
env?: EnvironmentConfig;
|
|
25
27
|
/** EnvReader for dynamic env vars (defaults to getEnv) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callback-handler.d.ts","sourceRoot":"","sources":["../../../../src/src/oauth/handlers/callback-handler.ts"],"names":[],"mappings":"AAAA;;;;oDAIoD;AACpD,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAC;AAKlD,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,KAAK,SAAS,EAAgB,MAAM,sBAAsB,CAAC;AAEpE,OAAO,KAAK,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"callback-handler.d.ts","sourceRoot":"","sources":["../../../../src/src/oauth/handlers/callback-handler.ts"],"names":[],"mappings":"AAAA;;;;oDAIoD;AACpD,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAC;AAKlD,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,KAAK,SAAS,EAAgB,MAAM,sBAAsB,CAAC;AAEpE,OAAO,KAAK,EAAE,kBAAkB,EAAc,UAAU,EAAE,MAAM,aAAa,CAAC;AAI9E,MAAM,WAAW,2BAA2B;IAC1C,oDAAoD;IACpD,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,4BAA4B;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,0BAA0B;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzE,4BAA4B;IAC5B,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErE,kEAAkE;IAClE,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B,gFAAgF;IAChF,GAAG,CAAC,EAAE,iBAAiB,CAAC;IAExB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,kBAAkB,EAC1B,OAAO,GAAE,2BAAgC,GACxC,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAkHzD"}
|
|
@@ -11,7 +11,7 @@ import { OAuthService } from "../providers/base.js";
|
|
|
11
11
|
import { memoryTokenStore } from "../token-store/memory.js";
|
|
12
12
|
const logger = baseLogger.component("o-auth");
|
|
13
13
|
export function createOAuthCallbackHandler(config, options = {}) {
|
|
14
|
-
const { tokenStore = memoryTokenStore, baseUrl, successRedirect = "/", errorRedirect = "/", onSuccess, onError, env = getEnvironmentConfig(), envReader = getEnv, } = options;
|
|
14
|
+
const { tokenStore = memoryTokenStore, baseUrl, successRedirect = "/", errorRedirect = "/", onSuccess, onError, skipStateValidation = false, env = getEnvironmentConfig(), envReader = getEnv, } = options;
|
|
15
15
|
function getAppUrl() {
|
|
16
16
|
return baseUrl ?? env.appUrl ?? "http://localhost:3000";
|
|
17
17
|
}
|
|
@@ -47,11 +47,17 @@ export function createOAuthCallbackHandler(config, options = {}) {
|
|
|
47
47
|
if (!code)
|
|
48
48
|
return handleError(appUrl, "no_code");
|
|
49
49
|
let oauthState = null;
|
|
50
|
+
if (!skipStateValidation && !state) {
|
|
51
|
+
return handleError(appUrl, "invalid_state", "Missing state parameter", {
|
|
52
|
+
serviceId: config.serviceId,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
50
55
|
if (state) {
|
|
51
56
|
oauthState = await tokenStore.getState(state);
|
|
52
|
-
if (!oauthState) {
|
|
53
|
-
|
|
54
|
-
|
|
57
|
+
if (!skipStateValidation && !oauthState) {
|
|
58
|
+
return handleError(appUrl, "invalid_state", "Invalid or expired state", {
|
|
59
|
+
serviceId: config.serviceId,
|
|
60
|
+
});
|
|
55
61
|
}
|
|
56
62
|
}
|
|
57
63
|
const service = new OAuthService(config, tokenStore, envReader);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/src/oauth/providers/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD,eAAO,MAAM,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/src/oauth/providers/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD,eAAO,MAAM,YAAY,EAAE,kBAU1B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,kBAUzB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,kBAc1B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,kBAUzB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,kBAU3B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,kBAU1B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,kBAU1B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,kBAW5B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,kBAa3B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,kBAU3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,kBAU9B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,kBAW3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,kBAUzB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,kBAU1B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,kBAWxB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,kBAU5B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,kBAU7B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,kBAU7B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,kBAU3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,kBAU9B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,kBAgBxB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,kBAUvB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,kBAUzB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,kBAa1B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,kBAU3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,kBAU7B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2B1B,CAAC"}
|