@vibesdotdev/editor 0.0.0-stage → 1.0.0-rc.2
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/LICENSE +18 -0
- package/README.md +36 -2
- package/dist/capabilities/editor-document-capabilities.d.ts +6 -0
- package/dist/capabilities/editor-document-capabilities.d.ts.map +1 -0
- package/dist/capabilities/editor-document-capabilities.js +47 -0
- package/dist/capabilities/editor-document-capabilities.js.map +1 -0
- package/dist/cli/editor.cli-command.descriptor.d.ts +3 -0
- package/dist/cli/editor.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/editor.cli-command.descriptor.js +27 -0
- package/dist/cli/editor.cli-command.descriptor.js.map +1 -0
- package/dist/cli/editor.impl.d.ts +10 -0
- package/dist/cli/editor.impl.d.ts.map +1 -0
- package/dist/cli/editor.impl.js +96 -0
- package/dist/cli/editor.impl.js.map +1 -0
- package/dist/cli/host-environment.context.descriptor.d.ts +35 -0
- package/dist/cli/host-environment.context.descriptor.d.ts.map +1 -0
- package/dist/cli/host-environment.context.descriptor.js +13 -0
- package/dist/cli/host-environment.context.descriptor.js.map +1 -0
- package/dist/cli/host-environment.context.impl.d.ts +8 -0
- package/dist/cli/host-environment.context.impl.d.ts.map +1 -0
- package/dist/cli/host-environment.context.impl.js +4 -0
- package/dist/cli/host-environment.context.impl.js.map +1 -0
- package/dist/cli/nvim/dev.nvim.cli-command.descriptor.d.ts +12 -0
- package/dist/cli/nvim/dev.nvim.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/nvim/dev.nvim.cli-command.descriptor.js +12 -0
- package/dist/cli/nvim/dev.nvim.cli-command.descriptor.js.map +1 -0
- package/dist/cli/nvim/doctor.cli-command.descriptor.d.ts +17 -0
- package/dist/cli/nvim/doctor.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/nvim/doctor.cli-command.descriptor.js +15 -0
- package/dist/cli/nvim/doctor.cli-command.descriptor.js.map +1 -0
- package/dist/cli/nvim/doctor.impl.d.ts +10 -0
- package/dist/cli/nvim/doctor.impl.d.ts.map +1 -0
- package/dist/cli/nvim/doctor.impl.js +31 -0
- package/dist/cli/nvim/doctor.impl.js.map +1 -0
- package/dist/cli/nvim/install-target.d.ts +7 -0
- package/dist/cli/nvim/install-target.d.ts.map +1 -0
- package/dist/cli/nvim/install-target.js +10 -0
- package/dist/cli/nvim/install-target.js.map +1 -0
- package/dist/cli/nvim/install.cli-command.descriptor.d.ts +29 -0
- package/dist/cli/nvim/install.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/nvim/install.cli-command.descriptor.js +19 -0
- package/dist/cli/nvim/install.cli-command.descriptor.js.map +1 -0
- package/dist/cli/nvim/install.impl.d.ts +15 -0
- package/dist/cli/nvim/install.impl.d.ts.map +1 -0
- package/dist/cli/nvim/install.impl.js +75 -0
- package/dist/cli/nvim/install.impl.js.map +1 -0
- package/dist/cli/nvim/sidecar.cli-command.descriptor.d.ts +17 -0
- package/dist/cli/nvim/sidecar.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/nvim/sidecar.cli-command.descriptor.js +16 -0
- package/dist/cli/nvim/sidecar.cli-command.descriptor.js.map +1 -0
- package/dist/cli/nvim/sidecar.impl.d.ts +7 -0
- package/dist/cli/nvim/sidecar.impl.d.ts.map +1 -0
- package/dist/cli/nvim/sidecar.impl.js +42 -0
- package/dist/cli/nvim/sidecar.impl.js.map +1 -0
- package/dist/cli/nvim/uninstall.cli-command.descriptor.d.ts +20 -0
- package/dist/cli/nvim/uninstall.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/nvim/uninstall.cli-command.descriptor.js +16 -0
- package/dist/cli/nvim/uninstall.cli-command.descriptor.js.map +1 -0
- package/dist/cli/nvim/uninstall.impl.d.ts +8 -0
- package/dist/cli/nvim/uninstall.impl.d.ts.map +1 -0
- package/dist/cli/nvim/uninstall.impl.js +18 -0
- package/dist/cli/nvim/uninstall.impl.js.map +1 -0
- package/dist/cli/plugin.d.ts +3 -0
- package/dist/cli/plugin.d.ts.map +1 -0
- package/dist/cli/plugin.js +15 -0
- package/dist/cli/plugin.js.map +1 -0
- package/dist/client/editor-client.contract.d.ts +30 -0
- package/dist/client/editor-client.contract.d.ts.map +1 -0
- package/dist/client/editor-client.contract.js +2 -0
- package/dist/client/editor-client.contract.js.map +1 -0
- package/dist/client/editor-client.descriptor.d.ts +9 -0
- package/dist/client/editor-client.descriptor.d.ts.map +1 -0
- package/dist/client/editor-client.descriptor.js +10 -0
- package/dist/client/editor-client.descriptor.js.map +1 -0
- package/dist/client/editor-client.error.d.ts +7 -0
- package/dist/client/editor-client.error.d.ts.map +1 -0
- package/dist/client/editor-client.error.js +24 -0
- package/dist/client/editor-client.error.js.map +1 -0
- package/dist/client/editor-runtime-client.d.ts +18 -0
- package/dist/client/editor-runtime-client.d.ts.map +1 -0
- package/dist/client/editor-runtime-client.js +144 -0
- package/dist/client/editor-runtime-client.js.map +1 -0
- package/dist/client/editor-transaction.d.ts +72 -0
- package/dist/client/editor-transaction.d.ts.map +1 -0
- package/dist/client/editor-transaction.js +487 -0
- package/dist/client/editor-transaction.js.map +1 -0
- package/dist/client/get-vibes-editor-client.d.ts +4 -0
- package/dist/client/get-vibes-editor-client.d.ts.map +1 -0
- package/dist/client/get-vibes-editor-client.js +5 -0
- package/dist/client/get-vibes-editor-client.js.map +1 -0
- package/dist/client/index.d.ts +5 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +5 -0
- package/dist/client/index.js.map +1 -0
- package/dist/code-atlas/atlas.consumer.plugin.d.ts +7 -0
- package/dist/code-atlas/atlas.consumer.plugin.d.ts.map +1 -0
- package/dist/code-atlas/atlas.consumer.plugin.js +23 -0
- package/dist/code-atlas/atlas.consumer.plugin.js.map +1 -0
- package/dist/code-atlas/cloud.plugin.d.ts +3 -0
- package/dist/code-atlas/cloud.plugin.d.ts.map +1 -0
- package/dist/code-atlas/cloud.plugin.js +13 -0
- package/dist/code-atlas/cloud.plugin.js.map +1 -0
- package/dist/code-atlas/code-atlas.plugin.d.ts +2 -0
- package/dist/code-atlas/code-atlas.plugin.d.ts.map +1 -0
- package/dist/code-atlas/code-atlas.plugin.js +2 -0
- package/dist/code-atlas/code-atlas.plugin.js.map +1 -0
- package/dist/code-atlas/consumer.d.ts +3 -0
- package/dist/code-atlas/consumer.d.ts.map +1 -0
- package/dist/code-atlas/consumer.js +3 -0
- package/dist/code-atlas/consumer.js.map +1 -0
- package/dist/code-atlas/index.d.ts +4 -0
- package/dist/code-atlas/index.d.ts.map +1 -0
- package/dist/code-atlas/index.js +4 -0
- package/dist/code-atlas/index.js.map +1 -0
- package/dist/code-atlas/plugin.d.ts +3 -0
- package/dist/code-atlas/plugin.d.ts.map +1 -0
- package/dist/code-atlas/plugin.js +3 -0
- package/dist/code-atlas/plugin.js.map +1 -0
- package/dist/code-atlas/tools/aliases.d.ts +16 -0
- package/dist/code-atlas/tools/aliases.d.ts.map +1 -0
- package/dist/code-atlas/tools/aliases.js +47 -0
- package/dist/code-atlas/tools/aliases.js.map +1 -0
- package/dist/code-atlas/tools/aliases.storage.descriptor.d.ts +18 -0
- package/dist/code-atlas/tools/aliases.storage.descriptor.d.ts.map +1 -0
- package/dist/code-atlas/tools/aliases.storage.descriptor.js +37 -0
- package/dist/code-atlas/tools/aliases.storage.descriptor.js.map +1 -0
- package/dist/code-atlas/tools/code-atlas.impl.consumer.d.ts +466 -0
- package/dist/code-atlas/tools/code-atlas.impl.consumer.d.ts.map +1 -0
- package/dist/code-atlas/tools/code-atlas.impl.consumer.js +83 -0
- package/dist/code-atlas/tools/code-atlas.impl.consumer.js.map +1 -0
- package/dist/code-atlas/tools/diagnostics/implementation.d.ts +20 -0
- package/dist/code-atlas/tools/diagnostics/implementation.d.ts.map +1 -0
- package/dist/code-atlas/tools/diagnostics/implementation.js +32 -0
- package/dist/code-atlas/tools/diagnostics/implementation.js.map +1 -0
- package/dist/code-atlas/tools/graph/cycles.d.ts +39 -0
- package/dist/code-atlas/tools/graph/cycles.d.ts.map +1 -0
- package/dist/code-atlas/tools/graph/cycles.js +24 -0
- package/dist/code-atlas/tools/graph/cycles.js.map +1 -0
- package/dist/code-atlas/tools/graph/implementation.d.ts +4 -0
- package/dist/code-atlas/tools/graph/implementation.d.ts.map +1 -0
- package/dist/code-atlas/tools/graph/implementation.js +131 -0
- package/dist/code-atlas/tools/graph/implementation.js.map +1 -0
- package/dist/code-atlas/tools/graph/schemas.d.ts +62 -0
- package/dist/code-atlas/tools/graph/schemas.d.ts.map +1 -0
- package/dist/code-atlas/tools/graph/schemas.js +51 -0
- package/dist/code-atlas/tools/graph/schemas.js.map +1 -0
- package/dist/code-atlas/tools/helpers.d.ts +60 -0
- package/dist/code-atlas/tools/helpers.d.ts.map +1 -0
- package/dist/code-atlas/tools/helpers.js +78 -0
- package/dist/code-atlas/tools/helpers.js.map +1 -0
- package/dist/code-atlas/tools/hooks/on-tool-error.impl.d.ts +14 -0
- package/dist/code-atlas/tools/hooks/on-tool-error.impl.d.ts.map +1 -0
- package/dist/code-atlas/tools/hooks/on-tool-error.impl.js +57 -0
- package/dist/code-atlas/tools/hooks/on-tool-error.impl.js.map +1 -0
- package/dist/code-atlas/tools/hooks/on-tool-error.subscription.codegraph.descriptor.d.ts +21 -0
- package/dist/code-atlas/tools/hooks/on-tool-error.subscription.codegraph.descriptor.d.ts.map +1 -0
- package/dist/code-atlas/tools/hooks/on-tool-error.subscription.codegraph.descriptor.js +19 -0
- package/dist/code-atlas/tools/hooks/on-tool-error.subscription.codegraph.descriptor.js.map +1 -0
- package/dist/code-atlas/tools/index-management/alias/implementation.d.ts +15 -0
- package/dist/code-atlas/tools/index-management/alias/implementation.d.ts.map +1 -0
- package/dist/code-atlas/tools/index-management/alias/implementation.js +51 -0
- package/dist/code-atlas/tools/index-management/alias/implementation.js.map +1 -0
- package/dist/code-atlas/tools/index-management/alias/schemas.d.ts +37 -0
- package/dist/code-atlas/tools/index-management/alias/schemas.d.ts.map +1 -0
- package/dist/code-atlas/tools/index-management/alias/schemas.js +31 -0
- package/dist/code-atlas/tools/index-management/alias/schemas.js.map +1 -0
- package/dist/code-atlas/tools/index-management/create/implementation.d.ts +4 -0
- package/dist/code-atlas/tools/index-management/create/implementation.d.ts.map +1 -0
- package/dist/code-atlas/tools/index-management/create/implementation.js +57 -0
- package/dist/code-atlas/tools/index-management/create/implementation.js.map +1 -0
- package/dist/code-atlas/tools/index-management/create/schemas.d.ts +38 -0
- package/dist/code-atlas/tools/index-management/create/schemas.d.ts.map +1 -0
- package/dist/code-atlas/tools/index-management/create/schemas.js +32 -0
- package/dist/code-atlas/tools/index-management/create/schemas.js.map +1 -0
- package/dist/code-atlas/tools/index-management/delete/implementation.d.ts +4 -0
- package/dist/code-atlas/tools/index-management/delete/implementation.d.ts.map +1 -0
- package/dist/code-atlas/tools/index-management/delete/implementation.js +43 -0
- package/dist/code-atlas/tools/index-management/delete/implementation.js.map +1 -0
- package/dist/code-atlas/tools/index-management/delete/schemas.d.ts +20 -0
- package/dist/code-atlas/tools/index-management/delete/schemas.d.ts.map +1 -0
- package/dist/code-atlas/tools/index-management/delete/schemas.js +18 -0
- package/dist/code-atlas/tools/index-management/delete/schemas.js.map +1 -0
- package/dist/code-atlas/tools/index-management/incremental/implementation.d.ts +4 -0
- package/dist/code-atlas/tools/index-management/incremental/implementation.d.ts.map +1 -0
- package/dist/code-atlas/tools/index-management/incremental/implementation.js +21 -0
- package/dist/code-atlas/tools/index-management/incremental/implementation.js.map +1 -0
- package/dist/code-atlas/tools/index-management/incremental/schemas.d.ts +14 -0
- package/dist/code-atlas/tools/index-management/incremental/schemas.d.ts.map +1 -0
- package/dist/code-atlas/tools/index-management/incremental/schemas.js +12 -0
- package/dist/code-atlas/tools/index-management/incremental/schemas.js.map +1 -0
- package/dist/code-atlas/tools/index-management/index.d.ts +17 -0
- package/dist/code-atlas/tools/index-management/index.d.ts.map +1 -0
- package/dist/code-atlas/tools/index-management/index.js +9 -0
- package/dist/code-atlas/tools/index-management/index.js.map +1 -0
- package/dist/code-atlas/tools/index-management/job-status/implementation.d.ts +4 -0
- package/dist/code-atlas/tools/index-management/job-status/implementation.d.ts.map +1 -0
- package/dist/code-atlas/tools/index-management/job-status/implementation.js +108 -0
- package/dist/code-atlas/tools/index-management/job-status/implementation.js.map +1 -0
- package/dist/code-atlas/tools/index-management/job-status/schemas.d.ts +109 -0
- package/dist/code-atlas/tools/index-management/job-status/schemas.d.ts.map +1 -0
- package/dist/code-atlas/tools/index-management/job-status/schemas.js +55 -0
- package/dist/code-atlas/tools/index-management/job-status/schemas.js.map +1 -0
- package/dist/code-atlas/tools/index-management/list/implementation.d.ts +4 -0
- package/dist/code-atlas/tools/index-management/list/implementation.d.ts.map +1 -0
- package/dist/code-atlas/tools/index-management/list/implementation.js +48 -0
- package/dist/code-atlas/tools/index-management/list/implementation.js.map +1 -0
- package/dist/code-atlas/tools/index-management/list/schemas.d.ts +16 -0
- package/dist/code-atlas/tools/index-management/list/schemas.d.ts.map +1 -0
- package/dist/code-atlas/tools/index-management/list/schemas.js +14 -0
- package/dist/code-atlas/tools/index-management/list/schemas.js.map +1 -0
- package/dist/code-atlas/tools/index-management/status/implementation.d.ts +4 -0
- package/dist/code-atlas/tools/index-management/status/implementation.d.ts.map +1 -0
- package/dist/code-atlas/tools/index-management/status/implementation.js +70 -0
- package/dist/code-atlas/tools/index-management/status/implementation.js.map +1 -0
- package/dist/code-atlas/tools/index-management/status/schemas.d.ts +44 -0
- package/dist/code-atlas/tools/index-management/status/schemas.d.ts.map +1 -0
- package/dist/code-atlas/tools/index-management/status/schemas.js +45 -0
- package/dist/code-atlas/tools/index-management/status/schemas.js.map +1 -0
- package/dist/code-atlas/tools/index-management/update/implementation.d.ts +4 -0
- package/dist/code-atlas/tools/index-management/update/implementation.d.ts.map +1 -0
- package/dist/code-atlas/tools/index-management/update/implementation.js +100 -0
- package/dist/code-atlas/tools/index-management/update/implementation.js.map +1 -0
- package/dist/code-atlas/tools/index-management/update/schemas.d.ts +36 -0
- package/dist/code-atlas/tools/index-management/update/schemas.d.ts.map +1 -0
- package/dist/code-atlas/tools/index-management/update/schemas.js +33 -0
- package/dist/code-atlas/tools/index-management/update/schemas.js.map +1 -0
- package/dist/code-atlas/tools/index.d.ts +13 -0
- package/dist/code-atlas/tools/index.d.ts.map +1 -0
- package/dist/code-atlas/tools/index.js +13 -0
- package/dist/code-atlas/tools/index.js.map +1 -0
- package/dist/code-atlas/tools/rename/implementation.d.ts +15 -0
- package/dist/code-atlas/tools/rename/implementation.d.ts.map +1 -0
- package/dist/code-atlas/tools/rename/implementation.js +181 -0
- package/dist/code-atlas/tools/rename/implementation.js.map +1 -0
- package/dist/code-atlas/tools/rename/schemas.d.ts +34 -0
- package/dist/code-atlas/tools/rename/schemas.d.ts.map +1 -0
- package/dist/code-atlas/tools/rename/schemas.js +27 -0
- package/dist/code-atlas/tools/rename/schemas.js.map +1 -0
- package/dist/code-atlas/tools/schemas/helpers.d.ts +3 -0
- package/dist/code-atlas/tools/schemas/helpers.d.ts.map +1 -0
- package/dist/code-atlas/tools/schemas/helpers.js +2 -0
- package/dist/code-atlas/tools/schemas/helpers.js.map +1 -0
- package/dist/code-atlas/tools/schemas-actions.d.ts +172 -0
- package/dist/code-atlas/tools/schemas-actions.d.ts.map +1 -0
- package/dist/code-atlas/tools/schemas-actions.js +46 -0
- package/dist/code-atlas/tools/schemas-actions.js.map +1 -0
- package/dist/code-atlas/tools/schemas-base.d.ts +153 -0
- package/dist/code-atlas/tools/schemas-base.d.ts.map +1 -0
- package/dist/code-atlas/tools/schemas-base.js +89 -0
- package/dist/code-atlas/tools/schemas-base.js.map +1 -0
- package/dist/code-atlas/tools/schemas.d.ts +159 -0
- package/dist/code-atlas/tools/schemas.d.ts.map +1 -0
- package/dist/code-atlas/tools/schemas.js +41 -0
- package/dist/code-atlas/tools/schemas.js.map +1 -0
- package/dist/code-atlas/tools/search/implementation.d.ts +4 -0
- package/dist/code-atlas/tools/search/implementation.d.ts.map +1 -0
- package/dist/code-atlas/tools/search/implementation.js +184 -0
- package/dist/code-atlas/tools/search/implementation.js.map +1 -0
- package/dist/code-atlas/tools/search/schemas.d.ts +65 -0
- package/dist/code-atlas/tools/search/schemas.d.ts.map +1 -0
- package/dist/code-atlas/tools/search/schemas.js +38 -0
- package/dist/code-atlas/tools/search/schemas.js.map +1 -0
- package/dist/code-atlas/tools/symbol/implementation.d.ts +4 -0
- package/dist/code-atlas/tools/symbol/implementation.d.ts.map +1 -0
- package/dist/code-atlas/tools/symbol/implementation.js +83 -0
- package/dist/code-atlas/tools/symbol/implementation.js.map +1 -0
- package/dist/code-atlas/tools/symbol/schemas.d.ts +51 -0
- package/dist/code-atlas/tools/symbol/schemas.d.ts.map +1 -0
- package/dist/code-atlas/tools/symbol/schemas.js +53 -0
- package/dist/code-atlas/tools/symbol/schemas.js.map +1 -0
- package/dist/code-atlas/tools/workspace-atlas.descriptor.d.ts +149 -0
- package/dist/code-atlas/tools/workspace-atlas.descriptor.d.ts.map +1 -0
- package/dist/code-atlas/tools/workspace-atlas.descriptor.js +35 -0
- package/dist/code-atlas/tools/workspace-atlas.descriptor.js.map +1 -0
- package/dist/code-atlas/tools/workspace-atlas.impl.consumer.d.ts +231 -0
- package/dist/code-atlas/tools/workspace-atlas.impl.consumer.d.ts.map +1 -0
- package/dist/code-atlas/tools/workspace-atlas.impl.consumer.js +16 -0
- package/dist/code-atlas/tools/workspace-atlas.impl.consumer.js.map +1 -0
- package/dist/code-atlas/tools/workspace-atlas.schemas.d.ts +118 -0
- package/dist/code-atlas/tools/workspace-atlas.schemas.d.ts.map +1 -0
- package/dist/code-atlas/tools/workspace-atlas.schemas.js +9 -0
- package/dist/code-atlas/tools/workspace-atlas.schemas.js.map +1 -0
- package/dist/code-atlas/tools/workspace-search.descriptor.d.ts +168 -0
- package/dist/code-atlas/tools/workspace-search.descriptor.d.ts.map +1 -0
- package/dist/code-atlas/tools/workspace-search.descriptor.js +56 -0
- package/dist/code-atlas/tools/workspace-search.descriptor.js.map +1 -0
- package/dist/code-atlas/tools/workspace-search.impl.consumer.d.ts +244 -0
- package/dist/code-atlas/tools/workspace-search.impl.consumer.d.ts.map +1 -0
- package/dist/code-atlas/tools/workspace-search.impl.consumer.js +23 -0
- package/dist/code-atlas/tools/workspace-search.impl.consumer.js.map +1 -0
- package/dist/code-atlas/tools/workspace-search.schemas.d.ts +115 -0
- package/dist/code-atlas/tools/workspace-search.schemas.d.ts.map +1 -0
- package/dist/code-atlas/tools/workspace-search.schemas.js +86 -0
- package/dist/code-atlas/tools/workspace-search.schemas.js.map +1 -0
- package/dist/code-atlas/tools/workspace-sync-status/schemas.d.ts +22 -0
- package/dist/code-atlas/tools/workspace-sync-status/schemas.d.ts.map +1 -0
- package/dist/code-atlas/tools/workspace-sync-status/schemas.js +22 -0
- package/dist/code-atlas/tools/workspace-sync-status/schemas.js.map +1 -0
- package/dist/code-atlas/tools/workspace-sync-status/workspace-sync-status.impl.consumer.d.ts +8 -0
- package/dist/code-atlas/tools/workspace-sync-status/workspace-sync-status.impl.consumer.d.ts.map +1 -0
- package/dist/code-atlas/tools/workspace-sync-status/workspace-sync-status.impl.consumer.js +49 -0
- package/dist/code-atlas/tools/workspace-sync-status/workspace-sync-status.impl.consumer.js.map +1 -0
- package/dist/config/editor.config.descriptor.d.ts +46 -0
- package/dist/config/editor.config.descriptor.d.ts.map +1 -0
- package/dist/config/editor.config.descriptor.js +35 -0
- package/dist/config/editor.config.descriptor.js.map +1 -0
- package/dist/config/load.d.ts +4 -0
- package/dist/config/load.d.ts.map +1 -0
- package/dist/config/load.js +12 -0
- package/dist/config/load.js.map +1 -0
- package/dist/docs/editor.transactions.docs.descriptor.d.ts +4 -0
- package/dist/docs/editor.transactions.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/editor.transactions.docs.descriptor.js +52 -0
- package/dist/docs/editor.transactions.docs.descriptor.js.map +1 -0
- package/dist/editor.plugin.d.ts +3 -0
- package/dist/editor.plugin.d.ts.map +1 -0
- package/dist/editor.plugin.js +16 -0
- package/dist/editor.plugin.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/nvim/index.d.ts +3 -0
- package/dist/nvim/index.d.ts.map +1 -0
- package/dist/nvim/index.js +3 -0
- package/dist/nvim/index.js.map +1 -0
- package/dist/nvim/nvim.consumer.plugin.d.ts +3 -0
- package/dist/nvim/nvim.consumer.plugin.d.ts.map +1 -0
- package/dist/nvim/nvim.consumer.plugin.js +21 -0
- package/dist/nvim/nvim.consumer.plugin.js.map +1 -0
- package/dist/nvim/nvim.plugin.d.ts +2 -0
- package/dist/nvim/nvim.plugin.d.ts.map +1 -0
- package/dist/nvim/nvim.plugin.js +2 -0
- package/dist/nvim/nvim.plugin.js.map +1 -0
- package/dist/nvim/schemas/clients.d.ts +40 -0
- package/dist/nvim/schemas/clients.d.ts.map +1 -0
- package/dist/nvim/schemas/clients.js +12 -0
- package/dist/nvim/schemas/clients.js.map +1 -0
- package/dist/nvim/schemas/index.d.ts +210 -0
- package/dist/nvim/schemas/index.d.ts.map +1 -0
- package/dist/nvim/schemas/index.js +94 -0
- package/dist/nvim/schemas/index.js.map +1 -0
- package/dist/nvim/sidecar/index.d.ts +6 -0
- package/dist/nvim/sidecar/index.d.ts.map +1 -0
- package/dist/nvim/sidecar/index.js +20 -0
- package/dist/nvim/sidecar/index.js.map +1 -0
- package/dist/nvim/sidecar/methods.d.ts +45 -0
- package/dist/nvim/sidecar/methods.d.ts.map +1 -0
- package/dist/nvim/sidecar/methods.js +381 -0
- package/dist/nvim/sidecar/methods.js.map +1 -0
- package/dist/nvim/sidecar/server.d.ts +12 -0
- package/dist/nvim/sidecar/server.d.ts.map +1 -0
- package/dist/nvim/sidecar/server.js +95 -0
- package/dist/nvim/sidecar/server.js.map +1 -0
- package/dist/nvim/sidecar/streams.d.ts +22 -0
- package/dist/nvim/sidecar/streams.d.ts.map +1 -0
- package/dist/nvim/sidecar/streams.js +63 -0
- package/dist/nvim/sidecar/streams.js.map +1 -0
- package/dist/schemas/editor-cli.d.ts +10 -0
- package/dist/schemas/editor-cli.d.ts.map +1 -0
- package/dist/schemas/editor-cli.js +7 -0
- package/dist/schemas/editor-cli.js.map +1 -0
- package/dist/schemas/editor-surface.d.ts +9 -0
- package/dist/schemas/editor-surface.d.ts.map +1 -0
- package/dist/schemas/editor-surface.js +5 -0
- package/dist/schemas/editor-surface.js.map +1 -0
- package/dist/schemas/editor-transaction.schema.d.ts +675 -0
- package/dist/schemas/editor-transaction.schema.d.ts.map +1 -0
- package/dist/schemas/editor-transaction.schema.js +210 -0
- package/dist/schemas/editor-transaction.schema.js.map +1 -0
- package/dist/schemas/index.d.ts +3 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +3 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/nvim-install.d.ts +64 -0
- package/dist/schemas/nvim-install.d.ts.map +1 -0
- package/dist/schemas/nvim-install.js +26 -0
- package/dist/schemas/nvim-install.js.map +1 -0
- package/dist/schemas/search-card.d.ts +322 -0
- package/dist/schemas/search-card.d.ts.map +1 -0
- package/dist/schemas/search-card.js +46 -0
- package/dist/schemas/search-card.js.map +1 -0
- package/dist/svelte/DOM-TREE.md +168 -0
- package/dist/svelte/components/EditorAgentSpotlight.svelte +143 -0
- package/dist/svelte/components/EditorAgentSpotlight.svelte.d.ts +10 -0
- package/dist/svelte/components/EditorAgentSpotlight.svelte.d.ts.map +1 -0
- package/dist/svelte/components/EditorCapabilityRow.svelte +146 -0
- package/dist/svelte/components/EditorCapabilityRow.svelte.d.ts +10 -0
- package/dist/svelte/components/EditorCapabilityRow.svelte.d.ts.map +1 -0
- package/dist/svelte/components/EditorConflictState.svelte +230 -0
- package/dist/svelte/components/EditorConflictState.svelte.d.ts +16 -0
- package/dist/svelte/components/EditorConflictState.svelte.d.ts.map +1 -0
- package/dist/svelte/components/EditorDocumentPane.svelte +176 -0
- package/dist/svelte/components/EditorDocumentPane.svelte.d.ts +15 -0
- package/dist/svelte/components/EditorDocumentPane.svelte.d.ts.map +1 -0
- package/dist/svelte/components/EditorPreviewPane.svelte +323 -0
- package/dist/svelte/components/EditorPreviewPane.svelte.d.ts +11 -0
- package/dist/svelte/components/EditorPreviewPane.svelte.d.ts.map +1 -0
- package/dist/svelte/components/EditorProposalReview.svelte +326 -0
- package/dist/svelte/components/EditorProposalReview.svelte.d.ts +10 -0
- package/dist/svelte/components/EditorProposalReview.svelte.d.ts.map +1 -0
- package/dist/svelte/components/EditorResourceTrail.svelte +150 -0
- package/dist/svelte/components/EditorResourceTrail.svelte.d.ts +9 -0
- package/dist/svelte/components/EditorResourceTrail.svelte.d.ts.map +1 -0
- package/dist/svelte/components/EditorUnsupportedState.svelte +14 -0
- package/dist/svelte/components/EditorUnsupportedState.svelte.d.ts +9 -0
- package/dist/svelte/components/EditorUnsupportedState.svelte.d.ts.map +1 -0
- package/dist/svelte/components/EditorWorkspace.svelte +137 -0
- package/dist/svelte/components/EditorWorkspace.svelte.d.ts +11 -0
- package/dist/svelte/components/EditorWorkspace.svelte.d.ts.map +1 -0
- package/dist/svelte/components/VibesEditor.svelte +612 -0
- package/dist/svelte/components/VibesEditor.svelte.d.ts +27 -0
- package/dist/svelte/components/VibesEditor.svelte.d.ts.map +1 -0
- package/dist/svelte/controller.d.ts +86 -0
- package/dist/svelte/controller.d.ts.map +1 -0
- package/dist/svelte/controller.js +438 -0
- package/dist/svelte/editor-context-actions.d.ts +7 -0
- package/dist/svelte/editor-context-actions.d.ts.map +1 -0
- package/dist/svelte/editor-context-actions.js +41 -0
- package/dist/svelte/editor-exit.d.ts +11 -0
- package/dist/svelte/editor-exit.d.ts.map +1 -0
- package/dist/svelte/editor-exit.js +11 -0
- package/dist/svelte/editor-status.d.ts +19 -0
- package/dist/svelte/editor-status.d.ts.map +1 -0
- package/dist/svelte/editor-status.js +19 -0
- package/dist/svelte/editor-svelte.plugin.d.ts +38 -0
- package/dist/svelte/editor-svelte.plugin.d.ts.map +1 -0
- package/dist/svelte/editor-svelte.plugin.js +26 -0
- package/dist/svelte/editor-svelte.vessel.plugin.d.ts +309 -0
- package/dist/svelte/editor-svelte.vessel.plugin.d.ts.map +1 -0
- package/dist/svelte/editor-svelte.vessel.plugin.js +130 -0
- package/dist/svelte/editor-workspace-state.d.ts +8 -0
- package/dist/svelte/editor-workspace-state.d.ts.map +1 -0
- package/dist/svelte/editor-workspace-state.js +7 -0
- package/dist/svelte/editor-workspace.d.ts +41 -0
- package/dist/svelte/editor-workspace.d.ts.map +1 -0
- package/dist/svelte/editor-workspace.js +21 -0
- package/dist/svelte/index.d.ts +16 -0
- package/dist/svelte/index.d.ts.map +1 -0
- package/dist/svelte/index.js +15 -0
- package/dist/svelte/styles.css +1 -0
- package/dist/svelte/surface-reporter.d.ts +13 -0
- package/dist/svelte/surface-reporter.d.ts.map +1 -0
- package/dist/svelte/surface-reporter.js +30 -0
- package/dist/svelte/tool-widgets/WorkspaceSearchToolCard.svelte +276 -0
- package/dist/svelte/tool-widgets/WorkspaceSearchToolCard.svelte.d.ts +9 -0
- package/dist/svelte/tool-widgets/WorkspaceSearchToolCard.svelte.d.ts.map +1 -0
- package/dist/svelte/tool-widgets/index.d.ts +3 -0
- package/dist/svelte/tool-widgets/index.d.ts.map +1 -0
- package/dist/svelte/tool-widgets/index.js +2 -0
- package/dist/svelte/tool-widgets/workspace-search-card.d.ts +127 -0
- package/dist/svelte/tool-widgets/workspace-search-card.d.ts.map +1 -0
- package/dist/svelte/tool-widgets/workspace-search-card.js +428 -0
- package/package.json +320 -4
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { EditorPreviewState } from '../controller.js';
|
|
3
|
+
import { Badge } from '@vibesdotdev/kit/components/ui/badge';
|
|
4
|
+
import { Button } from '@vibesdotdev/kit/components/ui/button';
|
|
5
|
+
import { getLogger } from '@vibesdotdev/logging';
|
|
6
|
+
import { CaughtFailureSchema, valueFreeFailure, settle } from '@vibesdotdev/kernel';
|
|
7
|
+
import { getRuntimeSvelteContext } from '@vibesdotdev/surface-sveltekit/svelte';
|
|
8
|
+
import { EditorConfigSchema } from '../../config/editor.config.descriptor.js';
|
|
9
|
+
import { loadEditorConfig } from '../../config/load.js';
|
|
10
|
+
|
|
11
|
+
let {
|
|
12
|
+
previewState,
|
|
13
|
+
onmodechange,
|
|
14
|
+
onurlchange,
|
|
15
|
+
onclose
|
|
16
|
+
}: {
|
|
17
|
+
previewState: EditorPreviewState;
|
|
18
|
+
onmodechange?: (mode: 'webapp' | 'applet' | 'genui') => void;
|
|
19
|
+
onurlchange?: (url: string) => void;
|
|
20
|
+
onclose?: () => void;
|
|
21
|
+
} = $props();
|
|
22
|
+
|
|
23
|
+
type DevicePreset = 'mobile' | 'tablet' | 'desktop';
|
|
24
|
+
let devicePreset = $state<DevicePreset>('desktop');
|
|
25
|
+
let iframeRef = $state<HTMLIFrameElement | null>(null);
|
|
26
|
+
let reloadKey = $state(0);
|
|
27
|
+
let inputUrl = $state<string>(EditorConfigSchema.parse({}).previewUrl);
|
|
28
|
+
const runtimeStore = getRuntimeSvelteContext();
|
|
29
|
+
|
|
30
|
+
$effect(() => {
|
|
31
|
+
if (previewState.targetUri) {
|
|
32
|
+
inputUrl = previewState.targetUri;
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const runtime = runtimeStore.runtime;
|
|
36
|
+
if (!runtime) {
|
|
37
|
+
// A failed load stays on `runtimeStore.error`; with no runtime there is no logger to bind,
|
|
38
|
+
// and the preview keeps its schema default.
|
|
39
|
+
void runtimeStore.load().then(
|
|
40
|
+
() => undefined,
|
|
41
|
+
(error) => valueFreeFailure(CaughtFailureSchema.parse(error))
|
|
42
|
+
);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
let cancelled = false;
|
|
46
|
+
const logger = getLogger('editor.preview-pane', runtime);
|
|
47
|
+
void settle(() => loadEditorConfig(runtime)).then((result) => {
|
|
48
|
+
if (result.ok) {
|
|
49
|
+
if (!cancelled && !previewState.targetUri) inputUrl = result.value.previewUrl;
|
|
50
|
+
} else {
|
|
51
|
+
logger.error('Editor preview configuration failed', { cause: result.cause });
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
return () => {
|
|
55
|
+
cancelled = true;
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
function handleReload() {
|
|
60
|
+
if (iframeRef) {
|
|
61
|
+
reloadKey += 1;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function handleUrlSubmit(e: SubmitEvent) {
|
|
66
|
+
e.preventDefault();
|
|
67
|
+
onurlchange?.(inputUrl);
|
|
68
|
+
if (iframeRef) {
|
|
69
|
+
iframeRef.src = inputUrl;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
</script>
|
|
73
|
+
|
|
74
|
+
{#if previewState.open}
|
|
75
|
+
<div
|
|
76
|
+
class="editor-preview-pane"
|
|
77
|
+
role="complementary"
|
|
78
|
+
aria-label="Live preview pane"
|
|
79
|
+
data-preview-mode={previewState.mode}
|
|
80
|
+
data-device-preset={devicePreset}
|
|
81
|
+
>
|
|
82
|
+
<header class="editor-preview-pane__toolbar">
|
|
83
|
+
<div class="editor-preview-pane__mode-group">
|
|
84
|
+
<Button
|
|
85
|
+
type="button"
|
|
86
|
+
variant={previewState.mode === 'webapp' ? 'secondary' : 'ghost'}
|
|
87
|
+
size="sm"
|
|
88
|
+
class="editor-preview-pane__btn"
|
|
89
|
+
onclick={() => onmodechange?.('webapp')}
|
|
90
|
+
>
|
|
91
|
+
Web App
|
|
92
|
+
</Button>
|
|
93
|
+
<Button
|
|
94
|
+
type="button"
|
|
95
|
+
variant={previewState.mode === 'applet' ? 'secondary' : 'ghost'}
|
|
96
|
+
size="sm"
|
|
97
|
+
class="editor-preview-pane__btn"
|
|
98
|
+
onclick={() => onmodechange?.('applet')}
|
|
99
|
+
>
|
|
100
|
+
Applet
|
|
101
|
+
</Button>
|
|
102
|
+
<Button
|
|
103
|
+
type="button"
|
|
104
|
+
variant={previewState.mode === 'genui' ? 'secondary' : 'ghost'}
|
|
105
|
+
size="sm"
|
|
106
|
+
class="editor-preview-pane__btn"
|
|
107
|
+
onclick={() => onmodechange?.('genui')}
|
|
108
|
+
>
|
|
109
|
+
Generative UI
|
|
110
|
+
</Button>
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
{#if previewState.mode === 'webapp'}
|
|
114
|
+
<div class="editor-preview-pane__device-group">
|
|
115
|
+
<Button
|
|
116
|
+
type="button"
|
|
117
|
+
variant={devicePreset === 'mobile' ? 'secondary' : 'ghost'}
|
|
118
|
+
size="sm"
|
|
119
|
+
class="editor-preview-pane__btn"
|
|
120
|
+
onclick={() => (devicePreset = 'mobile')}
|
|
121
|
+
title="Mobile (375px)"
|
|
122
|
+
>
|
|
123
|
+
Mobile
|
|
124
|
+
</Button>
|
|
125
|
+
<Button
|
|
126
|
+
type="button"
|
|
127
|
+
variant={devicePreset === 'tablet' ? 'secondary' : 'ghost'}
|
|
128
|
+
size="sm"
|
|
129
|
+
class="editor-preview-pane__btn"
|
|
130
|
+
onclick={() => (devicePreset = 'tablet')}
|
|
131
|
+
title="Tablet (768px)"
|
|
132
|
+
>
|
|
133
|
+
Tablet
|
|
134
|
+
</Button>
|
|
135
|
+
<Button
|
|
136
|
+
type="button"
|
|
137
|
+
variant={devicePreset === 'desktop' ? 'secondary' : 'ghost'}
|
|
138
|
+
size="sm"
|
|
139
|
+
class="editor-preview-pane__btn"
|
|
140
|
+
onclick={() => (devicePreset = 'desktop')}
|
|
141
|
+
title="Desktop (Full)"
|
|
142
|
+
>
|
|
143
|
+
Desktop
|
|
144
|
+
</Button>
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
<form class="editor-preview-pane__url-form" onsubmit={handleUrlSubmit}>
|
|
148
|
+
<input
|
|
149
|
+
type="text"
|
|
150
|
+
bind:value={inputUrl}
|
|
151
|
+
class="editor-preview-pane__url-input"
|
|
152
|
+
placeholder="Preview URL"
|
|
153
|
+
/>
|
|
154
|
+
<Button
|
|
155
|
+
type="button"
|
|
156
|
+
variant="ghost"
|
|
157
|
+
size="sm"
|
|
158
|
+
class="editor-preview-pane__btn"
|
|
159
|
+
onclick={handleReload}
|
|
160
|
+
title="Reload preview"
|
|
161
|
+
>
|
|
162
|
+
Reload
|
|
163
|
+
</Button>
|
|
164
|
+
</form>
|
|
165
|
+
{/if}
|
|
166
|
+
|
|
167
|
+
<Button
|
|
168
|
+
type="button"
|
|
169
|
+
variant="ghost"
|
|
170
|
+
size="sm"
|
|
171
|
+
class="editor-preview-pane__btn editor-preview-pane__close-btn"
|
|
172
|
+
onclick={onclose}
|
|
173
|
+
title="Close preview"
|
|
174
|
+
>
|
|
175
|
+
✕
|
|
176
|
+
</Button>
|
|
177
|
+
</header>
|
|
178
|
+
|
|
179
|
+
<div class="editor-preview-pane__viewport-wrapper">
|
|
180
|
+
<div
|
|
181
|
+
class="editor-preview-pane__viewport"
|
|
182
|
+
class:editor-preview-pane__viewport--mobile={devicePreset === 'mobile'}
|
|
183
|
+
class:editor-preview-pane__viewport--tablet={devicePreset === 'tablet'}
|
|
184
|
+
class:editor-preview-pane__viewport--desktop={devicePreset === 'desktop'}
|
|
185
|
+
>
|
|
186
|
+
{#if previewState.mode === 'webapp'}
|
|
187
|
+
{#key reloadKey}
|
|
188
|
+
<iframe
|
|
189
|
+
bind:this={iframeRef}
|
|
190
|
+
src={inputUrl}
|
|
191
|
+
title="Live application preview"
|
|
192
|
+
class="editor-preview-pane__iframe"
|
|
193
|
+
sandbox="allow-scripts allow-same-origin allow-forms allow-modals"
|
|
194
|
+
></iframe>
|
|
195
|
+
{/key}
|
|
196
|
+
{:else if previewState.mode === 'applet'}
|
|
197
|
+
<div class="editor-preview-pane__placeholder">
|
|
198
|
+
<Badge variant="outline">Applet Runner</Badge>
|
|
199
|
+
<p>Mounting applet bundle for active component...</p>
|
|
200
|
+
</div>
|
|
201
|
+
{:else}
|
|
202
|
+
<div class="editor-preview-pane__placeholder">
|
|
203
|
+
<Badge variant="outline">Generative UI Canvas</Badge>
|
|
204
|
+
<p>Ready to render agent-generated UI widgets.</p>
|
|
205
|
+
</div>
|
|
206
|
+
{/if}
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
</div>
|
|
210
|
+
{/if}
|
|
211
|
+
|
|
212
|
+
<style>
|
|
213
|
+
.editor-preview-pane {
|
|
214
|
+
display: flex;
|
|
215
|
+
flex-direction: column;
|
|
216
|
+
height: 100%;
|
|
217
|
+
min-width: 0;
|
|
218
|
+
background: var(--background);
|
|
219
|
+
border-left: 1px solid var(--border);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.editor-preview-pane__toolbar {
|
|
223
|
+
display: flex;
|
|
224
|
+
align-items: center;
|
|
225
|
+
gap: 0.5rem;
|
|
226
|
+
padding: 0.375rem 0.5rem;
|
|
227
|
+
background: color-mix(in oklab, var(--card) 75%, var(--background));
|
|
228
|
+
border-bottom: 1px solid var(--border);
|
|
229
|
+
flex-shrink: 0;
|
|
230
|
+
font-size: 0.75rem;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.editor-preview-pane__mode-group,
|
|
234
|
+
.editor-preview-pane__device-group {
|
|
235
|
+
display: flex;
|
|
236
|
+
align-items: center;
|
|
237
|
+
gap: 0.25rem;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
:global(.editor-preview-pane__btn) {
|
|
241
|
+
height: 1.5rem;
|
|
242
|
+
padding: 0 0.5rem;
|
|
243
|
+
font-size: 0.6875rem;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
:global(.editor-preview-pane__close-btn) {
|
|
247
|
+
margin-left: auto;
|
|
248
|
+
width: 1.5rem;
|
|
249
|
+
padding: 0;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.editor-preview-pane__url-form {
|
|
253
|
+
display: flex;
|
|
254
|
+
align-items: center;
|
|
255
|
+
gap: 0.25rem;
|
|
256
|
+
flex: 1;
|
|
257
|
+
min-width: 0;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.editor-preview-pane__url-input {
|
|
261
|
+
flex: 1;
|
|
262
|
+
min-width: 0;
|
|
263
|
+
height: 1.5rem;
|
|
264
|
+
padding: 0 0.375rem;
|
|
265
|
+
font-size: 0.6875rem;
|
|
266
|
+
font-family: var(--font-mono, monospace);
|
|
267
|
+
background: var(--background);
|
|
268
|
+
border: 1px solid var(--border);
|
|
269
|
+
border-radius: 0.25rem;
|
|
270
|
+
color: var(--foreground);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.editor-preview-pane__viewport-wrapper {
|
|
274
|
+
flex: 1;
|
|
275
|
+
min-height: 0;
|
|
276
|
+
overflow: auto;
|
|
277
|
+
background: color-mix(in oklab, var(--muted) 20%, var(--background));
|
|
278
|
+
display: flex;
|
|
279
|
+
align-items: center;
|
|
280
|
+
justify-content: center;
|
|
281
|
+
padding: 0.5rem;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.editor-preview-pane__viewport {
|
|
285
|
+
height: 100%;
|
|
286
|
+
background: #ffffff;
|
|
287
|
+
border-radius: 0.375rem;
|
|
288
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
289
|
+
overflow: hidden;
|
|
290
|
+
transition: width 0.2s ease;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.editor-preview-pane__viewport--desktop {
|
|
294
|
+
width: 100%;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.editor-preview-pane__viewport--tablet {
|
|
298
|
+
width: 768px;
|
|
299
|
+
max-width: 100%;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.editor-preview-pane__viewport--mobile {
|
|
303
|
+
width: 375px;
|
|
304
|
+
max-width: 100%;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.editor-preview-pane__iframe {
|
|
308
|
+
width: 100%;
|
|
309
|
+
height: 100%;
|
|
310
|
+
border: 0;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.editor-preview-pane__placeholder {
|
|
314
|
+
display: flex;
|
|
315
|
+
flex-direction: column;
|
|
316
|
+
align-items: center;
|
|
317
|
+
justify-content: center;
|
|
318
|
+
height: 100%;
|
|
319
|
+
gap: 0.5rem;
|
|
320
|
+
color: var(--muted-foreground);
|
|
321
|
+
font-size: 0.8125rem;
|
|
322
|
+
}
|
|
323
|
+
</style>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { EditorPreviewState } from '../controller.ts';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
previewState: EditorPreviewState;
|
|
4
|
+
onmodechange?: (mode: 'webapp' | 'applet' | 'genui') => void;
|
|
5
|
+
onurlchange?: (url: string) => void;
|
|
6
|
+
onclose?: () => void;
|
|
7
|
+
};
|
|
8
|
+
declare const EditorPreviewPane: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
9
|
+
type EditorPreviewPane = ReturnType<typeof EditorPreviewPane>;
|
|
10
|
+
export default EditorPreviewPane;
|
|
11
|
+
//# sourceMappingURL=EditorPreviewPane.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorPreviewPane.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/EditorPreviewPane.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAW1D,KAAK,gBAAgB,GAAI;IACxB,YAAY,EAAE,kBAAkB,CAAC;IACjC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,KAAK,IAAI,CAAC;IAC7D,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAuIH,QAAA,MAAM,iBAAiB,sDAAwC,CAAC;AAChE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { EditorProposal } from '@vibesdotdev/editor';
|
|
3
|
+
import { Alert, AlertDescription, AlertTitle } from '@vibesdotdev/kit/components/ui/alert';
|
|
4
|
+
import { Badge } from '@vibesdotdev/kit/components/ui/badge';
|
|
5
|
+
import { Button } from '@vibesdotdev/kit/components/ui/button';
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
proposals = [],
|
|
9
|
+
onapprove,
|
|
10
|
+
onreject
|
|
11
|
+
}: {
|
|
12
|
+
proposals?: readonly EditorProposal[];
|
|
13
|
+
onapprove?: (proposalId: string) => Promise<void> | void;
|
|
14
|
+
onreject?: (proposalId: string, reason?: string) => void;
|
|
15
|
+
} = $props();
|
|
16
|
+
|
|
17
|
+
let selectedProposalId = $state<string | undefined>();
|
|
18
|
+
let constitutionalConfirmed = $state<boolean>(false);
|
|
19
|
+
let isApproving = $state<boolean>(false);
|
|
20
|
+
|
|
21
|
+
const pendingProposals = $derived(proposals.filter((p) => p.status === 'pending'));
|
|
22
|
+
const activeProposal = $derived(
|
|
23
|
+
proposals.find((p) => p.proposalId === selectedProposalId) ?? pendingProposals[0] ?? proposals[0]
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
const diffLines = $derived.by(() => {
|
|
27
|
+
if (!activeProposal?.patch) return [];
|
|
28
|
+
return activeProposal.patch.split('\n').map((line, index) => {
|
|
29
|
+
let type: 'header' | 'add' | 'del' | 'context' | 'info' = 'context';
|
|
30
|
+
if (line.startsWith('---') || line.startsWith('+++')) {
|
|
31
|
+
type = 'header';
|
|
32
|
+
} else if (line.startsWith('@@')) {
|
|
33
|
+
type = 'info';
|
|
34
|
+
} else if (line.startsWith('+')) {
|
|
35
|
+
type = 'add';
|
|
36
|
+
} else if (line.startsWith('-')) {
|
|
37
|
+
type = 'del';
|
|
38
|
+
}
|
|
39
|
+
return { id: index, raw: line, type };
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
async function handleApprove() {
|
|
44
|
+
if (!activeProposal || isApproving) return;
|
|
45
|
+
isApproving = true;
|
|
46
|
+
try {
|
|
47
|
+
await onapprove?.(activeProposal.proposalId);
|
|
48
|
+
} finally {
|
|
49
|
+
isApproving = false;
|
|
50
|
+
constitutionalConfirmed = false;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function handleReject() {
|
|
55
|
+
if (!activeProposal) return;
|
|
56
|
+
onreject?.(activeProposal.proposalId);
|
|
57
|
+
constitutionalConfirmed = false;
|
|
58
|
+
}
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
{#if activeProposal}
|
|
62
|
+
<div
|
|
63
|
+
class="proposal-review"
|
|
64
|
+
role="region"
|
|
65
|
+
aria-label="Agent change proposal review"
|
|
66
|
+
data-proposal-id={activeProposal.proposalId}
|
|
67
|
+
data-proposal-status={activeProposal.status}
|
|
68
|
+
>
|
|
69
|
+
<header class="proposal-review__header">
|
|
70
|
+
<div class="proposal-review__agent-meta">
|
|
71
|
+
<div class="proposal-review__title-row">
|
|
72
|
+
<strong class="proposal-review__intent">{activeProposal.intent}</strong>
|
|
73
|
+
<Badge
|
|
74
|
+
variant={activeProposal.status === 'pending'
|
|
75
|
+
? 'secondary'
|
|
76
|
+
: activeProposal.status === 'approved'
|
|
77
|
+
? 'default'
|
|
78
|
+
: 'outline'}
|
|
79
|
+
>
|
|
80
|
+
{activeProposal.status}
|
|
81
|
+
</Badge>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="proposal-review__subline">
|
|
84
|
+
<span>Proposed by <strong>{activeProposal.authorName ?? activeProposal.agentId}</strong></span>
|
|
85
|
+
{#if proposals.length > 1}
|
|
86
|
+
<div class="proposal-review__switcher">
|
|
87
|
+
{#each proposals as p (p.proposalId)}
|
|
88
|
+
<button
|
|
89
|
+
type="button"
|
|
90
|
+
class="proposal-review__tab"
|
|
91
|
+
class:proposal-review__tab--active={p.proposalId === activeProposal.proposalId}
|
|
92
|
+
onclick={() => {
|
|
93
|
+
selectedProposalId = p.proposalId;
|
|
94
|
+
constitutionalConfirmed = false;
|
|
95
|
+
}}
|
|
96
|
+
>
|
|
97
|
+
{p.intent.slice(0, 20)}...
|
|
98
|
+
</button>
|
|
99
|
+
{/each}
|
|
100
|
+
</div>
|
|
101
|
+
{/if}
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
</header>
|
|
105
|
+
|
|
106
|
+
{#if activeProposal.rationale}
|
|
107
|
+
<p class="proposal-review__rationale">{activeProposal.rationale}</p>
|
|
108
|
+
{/if}
|
|
109
|
+
|
|
110
|
+
{#if activeProposal.isConstitutional}
|
|
111
|
+
<Alert variant="destructive" class="proposal-review__constitutional-alert">
|
|
112
|
+
<AlertTitle>Constitutional Governance Document Review</AlertTitle>
|
|
113
|
+
<AlertDescription>
|
|
114
|
+
This change modifies a constitutional authority document (such as Constitution, SPEC, or AGENTS.md).
|
|
115
|
+
Explicit human review and confirmation is required to proceed.
|
|
116
|
+
</AlertDescription>
|
|
117
|
+
</Alert>
|
|
118
|
+
{/if}
|
|
119
|
+
|
|
120
|
+
<div class="proposal-review__diff-container">
|
|
121
|
+
<div class="proposal-review__diff-header">
|
|
122
|
+
<span>Proposed Diff</span>
|
|
123
|
+
</div>
|
|
124
|
+
<div class="proposal-review__diff-body">
|
|
125
|
+
{#each diffLines as line (line.id)}
|
|
126
|
+
<div
|
|
127
|
+
class="proposal-review__diff-line"
|
|
128
|
+
class:proposal-review__diff-line--add={line.type === 'add'}
|
|
129
|
+
class:proposal-review__diff-line--del={line.type === 'del'}
|
|
130
|
+
class:proposal-review__diff-line--info={line.type === 'info'}
|
|
131
|
+
class:proposal-review__diff-line--header={line.type === 'header'}
|
|
132
|
+
>
|
|
133
|
+
<code>{line.raw}</code>
|
|
134
|
+
</div>
|
|
135
|
+
{/each}
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
{#if activeProposal.status === 'pending'}
|
|
140
|
+
<footer class="proposal-review__footer">
|
|
141
|
+
{#if activeProposal.isConstitutional}
|
|
142
|
+
<label class="proposal-review__confirm-checkbox">
|
|
143
|
+
<input
|
|
144
|
+
type="checkbox"
|
|
145
|
+
bind:checked={constitutionalConfirmed}
|
|
146
|
+
/>
|
|
147
|
+
<span>I confirm this constitutional policy update</span>
|
|
148
|
+
</label>
|
|
149
|
+
{/if}
|
|
150
|
+
|
|
151
|
+
<div class="proposal-review__buttons">
|
|
152
|
+
<Button
|
|
153
|
+
type="button"
|
|
154
|
+
variant="outline"
|
|
155
|
+
size="sm"
|
|
156
|
+
onclick={handleReject}
|
|
157
|
+
>
|
|
158
|
+
Reject
|
|
159
|
+
</Button>
|
|
160
|
+
<Button
|
|
161
|
+
type="button"
|
|
162
|
+
variant="default"
|
|
163
|
+
size="sm"
|
|
164
|
+
disabled={isApproving || (activeProposal.isConstitutional && !constitutionalConfirmed)}
|
|
165
|
+
onclick={handleApprove}
|
|
166
|
+
>
|
|
167
|
+
{isApproving ? 'Applying...' : 'Approve & Apply'}
|
|
168
|
+
</Button>
|
|
169
|
+
</div>
|
|
170
|
+
</footer>
|
|
171
|
+
{/if}
|
|
172
|
+
</div>
|
|
173
|
+
{/if}
|
|
174
|
+
|
|
175
|
+
<style>
|
|
176
|
+
.proposal-review {
|
|
177
|
+
display: grid;
|
|
178
|
+
gap: 0.75rem;
|
|
179
|
+
padding: 0.875rem;
|
|
180
|
+
background: color-mix(in oklab, var(--card) 95%, var(--background));
|
|
181
|
+
border: 1px solid var(--border);
|
|
182
|
+
border-radius: 0.75rem;
|
|
183
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.proposal-review__header {
|
|
187
|
+
display: flex;
|
|
188
|
+
flex-direction: column;
|
|
189
|
+
gap: 0.25rem;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.proposal-review__agent-meta {
|
|
193
|
+
display: flex;
|
|
194
|
+
flex-direction: column;
|
|
195
|
+
gap: 0.25rem;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.proposal-review__title-row {
|
|
199
|
+
display: flex;
|
|
200
|
+
align-items: center;
|
|
201
|
+
justify-content: space-between;
|
|
202
|
+
gap: 0.5rem;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.proposal-review__intent {
|
|
206
|
+
font-size: 0.875rem;
|
|
207
|
+
color: var(--foreground);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.proposal-review__subline {
|
|
211
|
+
display: flex;
|
|
212
|
+
align-items: center;
|
|
213
|
+
justify-content: space-between;
|
|
214
|
+
font-size: 0.75rem;
|
|
215
|
+
color: var(--muted-foreground);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.proposal-review__switcher {
|
|
219
|
+
display: flex;
|
|
220
|
+
gap: 0.25rem;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.proposal-review__tab {
|
|
224
|
+
background: none;
|
|
225
|
+
border: 1px solid var(--border);
|
|
226
|
+
border-radius: 0.25rem;
|
|
227
|
+
padding: 0.125rem 0.375rem;
|
|
228
|
+
font-size: 0.6875rem;
|
|
229
|
+
color: var(--muted-foreground);
|
|
230
|
+
cursor: pointer;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.proposal-review__tab--active {
|
|
234
|
+
background: var(--secondary);
|
|
235
|
+
color: var(--secondary-foreground);
|
|
236
|
+
font-weight: 600;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.proposal-review__rationale {
|
|
240
|
+
margin: 0;
|
|
241
|
+
font-size: 0.75rem;
|
|
242
|
+
color: var(--muted-foreground);
|
|
243
|
+
line-height: 1.4;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
:global(.proposal-review__constitutional-alert) {
|
|
247
|
+
margin-top: 0.25rem;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.proposal-review__diff-container {
|
|
251
|
+
border: 1px solid var(--border);
|
|
252
|
+
border-radius: 0.375rem;
|
|
253
|
+
overflow: hidden;
|
|
254
|
+
background: var(--background);
|
|
255
|
+
max-height: 16rem;
|
|
256
|
+
display: flex;
|
|
257
|
+
flex-direction: column;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.proposal-review__diff-header {
|
|
261
|
+
padding: 0.25rem 0.5rem;
|
|
262
|
+
background: color-mix(in oklab, var(--muted) 40%, var(--background));
|
|
263
|
+
border-bottom: 1px solid var(--border);
|
|
264
|
+
font-size: 0.6875rem;
|
|
265
|
+
font-weight: 600;
|
|
266
|
+
color: var(--muted-foreground);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.proposal-review__diff-body {
|
|
270
|
+
overflow-y: auto;
|
|
271
|
+
font-family: var(--font-mono, monospace);
|
|
272
|
+
font-size: 0.75rem;
|
|
273
|
+
line-height: 1.35;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.proposal-review__diff-line {
|
|
277
|
+
padding: 0.125rem 0.5rem;
|
|
278
|
+
white-space: pre-wrap;
|
|
279
|
+
word-break: break-all;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.proposal-review__diff-line--add {
|
|
283
|
+
background: rgba(16, 185, 129, 0.15);
|
|
284
|
+
color: #059669;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.proposal-review__diff-line--del {
|
|
288
|
+
background: rgba(239, 68, 68, 0.15);
|
|
289
|
+
color: #dc2626;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.proposal-review__diff-line--info {
|
|
293
|
+
background: rgba(59, 130, 246, 0.1);
|
|
294
|
+
color: #2563eb;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.proposal-review__diff-line--header {
|
|
298
|
+
color: var(--muted-foreground);
|
|
299
|
+
font-weight: 600;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.proposal-review__footer {
|
|
303
|
+
display: flex;
|
|
304
|
+
align-items: center;
|
|
305
|
+
justify-content: space-between;
|
|
306
|
+
gap: 0.75rem;
|
|
307
|
+
padding-top: 0.5rem;
|
|
308
|
+
border-top: 1px solid var(--border);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.proposal-review__confirm-checkbox {
|
|
312
|
+
display: flex;
|
|
313
|
+
align-items: center;
|
|
314
|
+
gap: 0.375rem;
|
|
315
|
+
font-size: 0.75rem;
|
|
316
|
+
color: var(--foreground);
|
|
317
|
+
cursor: pointer;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.proposal-review__buttons {
|
|
321
|
+
display: flex;
|
|
322
|
+
align-items: center;
|
|
323
|
+
gap: 0.5rem;
|
|
324
|
+
margin-left: auto;
|
|
325
|
+
}
|
|
326
|
+
</style>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { EditorProposal } from '@vibesdotdev/editor';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
proposals?: readonly EditorProposal[];
|
|
4
|
+
onapprove?: (proposalId: string) => Promise<void> | void;
|
|
5
|
+
onreject?: (proposalId: string, reason?: string) => void;
|
|
6
|
+
};
|
|
7
|
+
declare const EditorProposalReview: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
8
|
+
type EditorProposalReview = ReturnType<typeof EditorProposalReview>;
|
|
9
|
+
export default EditorProposalReview;
|
|
10
|
+
//# sourceMappingURL=EditorProposalReview.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorProposalReview.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/EditorProposalReview.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAKzD,KAAK,gBAAgB,GAAI;IACxB,SAAS,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;IACtC,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACzD,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACzD,CAAC;AA8IH,QAAA,MAAM,oBAAoB,sDAAwC,CAAC;AACnE,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACpE,eAAe,oBAAoB,CAAC"}
|