@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,612 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { CaughtFailureSchema, settleNow, settle, type CaughtFailure } from '@vibesdotdev/kernel';
|
|
3
|
+
import { tick, untrack } from 'svelte';
|
|
4
|
+
import type { EditorClient, EditorContextRef, EditorTransaction } from '@vibesdotdev/editor';
|
|
5
|
+
import type { WorkspaceDocumentRef } from '@vibesdotdev/workspace-schemas/document';
|
|
6
|
+
import { getRuntimeSvelteContext } from '@vibesdotdev/surface-sveltekit/svelte';
|
|
7
|
+
import type { EditorContextActionClient } from '../editor-context-actions.js';
|
|
8
|
+
import { Button } from '@vibesdotdev/kit/components/ui/button';
|
|
9
|
+
import { Skeleton } from '@vibesdotdev/kit/components/ui/skeleton';
|
|
10
|
+
import {
|
|
11
|
+
createEditorController,
|
|
12
|
+
invokeEditorSurfaceObserver,
|
|
13
|
+
type EditorController,
|
|
14
|
+
type EditorControllerState,
|
|
15
|
+
type EditorSurfaceVariant
|
|
16
|
+
} from '../controller.js';
|
|
17
|
+
import EditorConflictState from './EditorConflictState.svelte';
|
|
18
|
+
import EditorDocumentPane from './EditorDocumentPane.svelte';
|
|
19
|
+
import EditorResourceTrail from './EditorResourceTrail.svelte';
|
|
20
|
+
import EditorUnsupportedState from './EditorUnsupportedState.svelte';
|
|
21
|
+
import EditorAgentSpotlight from './EditorAgentSpotlight.svelte';
|
|
22
|
+
import EditorProposalReview from './EditorProposalReview.svelte';
|
|
23
|
+
import EditorPreviewPane from './EditorPreviewPane.svelte';
|
|
24
|
+
import { surfaceReporterOn } from '../surface-reporter.js';
|
|
25
|
+
|
|
26
|
+
let {
|
|
27
|
+
controller: providedController,
|
|
28
|
+
transaction,
|
|
29
|
+
client,
|
|
30
|
+
context,
|
|
31
|
+
document,
|
|
32
|
+
documentId,
|
|
33
|
+
variant = 'embedded',
|
|
34
|
+
reviewOnly = false,
|
|
35
|
+
narrow = false,
|
|
36
|
+
height,
|
|
37
|
+
ariaLabel,
|
|
38
|
+
class: className = '',
|
|
39
|
+
oncontrollerready,
|
|
40
|
+
onstatechange,
|
|
41
|
+
onoperationerror,
|
|
42
|
+
contextActionClient
|
|
43
|
+
}: {
|
|
44
|
+
controller?: EditorController;
|
|
45
|
+
transaction?: EditorTransaction;
|
|
46
|
+
client?: EditorClient;
|
|
47
|
+
context?: EditorContextRef;
|
|
48
|
+
document?: WorkspaceDocumentRef;
|
|
49
|
+
documentId?: string;
|
|
50
|
+
variant?: EditorSurfaceVariant;
|
|
51
|
+
reviewOnly?: boolean;
|
|
52
|
+
narrow?: boolean;
|
|
53
|
+
height?: string | number;
|
|
54
|
+
ariaLabel?: string;
|
|
55
|
+
class?: string;
|
|
56
|
+
oncontrollerready?: (controller: EditorController) => void;
|
|
57
|
+
onstatechange?: (state: EditorControllerState) => void;
|
|
58
|
+
onoperationerror?: (error: CaughtFailure) => void;
|
|
59
|
+
contextActionClient?: EditorContextActionClient;
|
|
60
|
+
} = $props();
|
|
61
|
+
|
|
62
|
+
// Captured at component init: Svelte context is unavailable after mount.
|
|
63
|
+
const runtimeStore = getRuntimeSvelteContext();
|
|
64
|
+
const surfaceReporter = $derived(surfaceReporterOn(client ? { load: () => Promise.resolve(client.runtime) } : runtimeStore, 'editor.svelte'));
|
|
65
|
+
|
|
66
|
+
const surfaceId = $props.id();
|
|
67
|
+
let activeController = $state<EditorController | undefined>();
|
|
68
|
+
let surfaceState = $state<EditorControllerState | undefined>();
|
|
69
|
+
let openError = $state<string | undefined>();
|
|
70
|
+
let surfaceElement = $state<HTMLElement | null>(null);
|
|
71
|
+
let showProposals = $state<boolean>(true);
|
|
72
|
+
const pendingProposals = $derived(
|
|
73
|
+
surfaceState?.proposals.filter((p) => p.status === 'pending') ?? []
|
|
74
|
+
);
|
|
75
|
+
const surfaceLabel = $derived(
|
|
76
|
+
ariaLabel ?? (surfaceState ? `Vibes Editor — ${surfaceState.base.ref.path}` : 'Vibes Editor')
|
|
77
|
+
);
|
|
78
|
+
// Host layout updates replace spread props and reference objects. Reopen only
|
|
79
|
+
// when the document's source or reference values actually change.
|
|
80
|
+
const controllerSource = $derived(providedController);
|
|
81
|
+
const transactionSource = $derived(transaction);
|
|
82
|
+
const clientSource = $derived(client);
|
|
83
|
+
const documentRequest = $derived(JSON.stringify([
|
|
84
|
+
context?.workspaceSessionId, context?.projectId, context?.developerSessionId,
|
|
85
|
+
context?.codeSessionId, document?.workspaceSessionId, document?.path, documentId
|
|
86
|
+
]));
|
|
87
|
+
|
|
88
|
+
$effect(() => {
|
|
89
|
+
const providedController = controllerSource;
|
|
90
|
+
const transaction = transactionSource;
|
|
91
|
+
const client = clientSource;
|
|
92
|
+
// Subscribe to scalar request identity, not newly allocated reference props.
|
|
93
|
+
void documentRequest;
|
|
94
|
+
const request = untrack(() => ({ context, document, documentId }));
|
|
95
|
+
const { context: requestedContext, document: requestedDocument, documentId: requestedDocumentId } = request;
|
|
96
|
+
let cancelled = false;
|
|
97
|
+
let surfaceController: EditorController | undefined;
|
|
98
|
+
let ownedTransaction: EditorTransaction | undefined;
|
|
99
|
+
let openAbort: AbortController | undefined;
|
|
100
|
+
openError = undefined;
|
|
101
|
+
activeController = undefined;
|
|
102
|
+
|
|
103
|
+
function accept(next: EditorController) {
|
|
104
|
+
if (cancelled) {
|
|
105
|
+
next.dispose();
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
surfaceController = next;
|
|
109
|
+
activeController = next;
|
|
110
|
+
notifyControllerReady(next);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const hasClient = client !== undefined;
|
|
114
|
+
const hasDocument = requestedDocument !== undefined;
|
|
115
|
+
if (hasClient !== hasDocument) {
|
|
116
|
+
openError = 'This editor is missing its file source. Open the file again to continue.';
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
const ownershipForms =
|
|
120
|
+
Number(providedController !== undefined) +
|
|
121
|
+
Number(transaction !== undefined) +
|
|
122
|
+
Number(hasClient && hasDocument);
|
|
123
|
+
if (ownershipForms !== 1) {
|
|
124
|
+
openError = 'This editor has an invalid configuration. Provide one document source.';
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (providedController) {
|
|
129
|
+
if (providedController.state().disposed) {
|
|
130
|
+
openError = 'This editor is closed. Open the file again to continue.';
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
activeController = providedController;
|
|
134
|
+
notifyControllerReady(providedController);
|
|
135
|
+
return () => {
|
|
136
|
+
cancelled = true;
|
|
137
|
+
activeController = undefined;
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (transaction) {
|
|
142
|
+
const created = settleNow(() => accept(createEditorController(transaction, { reporter: surfaceReporter })));
|
|
143
|
+
if (!created.ok) {
|
|
144
|
+
openError = 'This file could not be opened for editing.';
|
|
145
|
+
notifyOperationError(created.cause);
|
|
146
|
+
}
|
|
147
|
+
} else if (client && requestedDocument) {
|
|
148
|
+
const resolvedContext = requestedContext ?? { workspaceSessionId: requestedDocument.workspaceSessionId };
|
|
149
|
+
const opening = new AbortController();
|
|
150
|
+
openAbort = opening;
|
|
151
|
+
void settle(() => client.open({
|
|
152
|
+
context: resolvedContext, document: requestedDocument, documentId: requestedDocumentId
|
|
153
|
+
}, opening.signal)).then((opened) => {
|
|
154
|
+
if (!opened.ok) {
|
|
155
|
+
if (!cancelled) {
|
|
156
|
+
openError = 'This file could not be opened for editing.';
|
|
157
|
+
notifyOperationError(opened.cause);
|
|
158
|
+
} else surfaceReporter.error('Editor open ended after cancellation', { cause: opened.cause });
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
if (cancelled) { opened.value.dispose(); return; }
|
|
162
|
+
ownedTransaction = opened.value;
|
|
163
|
+
const created = settleNow(() => accept(createEditorController(opened.value, { reporter: surfaceReporter })));
|
|
164
|
+
if (!created.ok) {
|
|
165
|
+
opened.value.dispose();
|
|
166
|
+
ownedTransaction = undefined;
|
|
167
|
+
openError = 'This file could not be opened for editing.';
|
|
168
|
+
notifyOperationError(created.cause);
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return () => {
|
|
174
|
+
cancelled = true;
|
|
175
|
+
openAbort?.abort();
|
|
176
|
+
surfaceController?.dispose();
|
|
177
|
+
ownedTransaction?.dispose();
|
|
178
|
+
activeController = undefined;
|
|
179
|
+
};
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
$effect(() => {
|
|
183
|
+
if (!activeController) return;
|
|
184
|
+
if (activeController.state().disposed) return;
|
|
185
|
+
activeController.setVariant(variant);
|
|
186
|
+
activeController.setReviewMode({ reviewOnly, narrow });
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
$effect(() => {
|
|
190
|
+
const current = activeController;
|
|
191
|
+
if (!current) {
|
|
192
|
+
surfaceState = undefined;
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
if (current.state().disposed) {
|
|
196
|
+
surfaceState = current.state();
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
return current.subscribe((next) => {
|
|
200
|
+
surfaceState = next;
|
|
201
|
+
notifyStateChange(next);
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
const publicationAvailable = $derived(
|
|
206
|
+
Boolean(
|
|
207
|
+
surfaceState &&
|
|
208
|
+
!surfaceState.readOnly &&
|
|
209
|
+
surfaceState.dirty &&
|
|
210
|
+
!surfaceState.conflict &&
|
|
211
|
+
surfaceState.phase !== 'publishing' &&
|
|
212
|
+
surfaceState.phase !== 'reloading'
|
|
213
|
+
)
|
|
214
|
+
);
|
|
215
|
+
|
|
216
|
+
function notifyControllerReady(readyController: EditorController) {
|
|
217
|
+
untrack(() =>
|
|
218
|
+
invokeEditorSurfaceObserver(oncontrollerready, readyController, {
|
|
219
|
+
boundary: 'host.controller-ready',
|
|
220
|
+
transactionId: readyController.state().transactionId,
|
|
221
|
+
resourceUri: readyController.state().resourceUri,
|
|
222
|
+
phase: readyController.state().phase
|
|
223
|
+
}, surfaceReporter)
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
function notifyStateChange(next: EditorControllerState) {
|
|
228
|
+
untrack(() =>
|
|
229
|
+
invokeEditorSurfaceObserver(onstatechange, next, {
|
|
230
|
+
boundary: 'host.state-change',
|
|
231
|
+
transactionId: next.transactionId,
|
|
232
|
+
resourceUri: next.resourceUri,
|
|
233
|
+
phase: next.phase
|
|
234
|
+
}, surfaceReporter)
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
function notifyOperationError(error: CaughtFailure) {
|
|
239
|
+
surfaceReporter.error('Editor surface operation failed', { cause: error });
|
|
240
|
+
untrack(() => {
|
|
241
|
+
const current = activeController?.state();
|
|
242
|
+
invokeEditorSurfaceObserver(onoperationerror, error, {
|
|
243
|
+
boundary: 'host.operation-error',
|
|
244
|
+
transactionId: current?.transactionId,
|
|
245
|
+
resourceUri: current?.resourceUri,
|
|
246
|
+
phase: current?.phase
|
|
247
|
+
}, surfaceReporter);
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
async function publish() {
|
|
252
|
+
const controller = activeController;
|
|
253
|
+
if (!controller || !publicationAvailable) return;
|
|
254
|
+
const result = await settle(() => controller.publish());
|
|
255
|
+
if (!result.ok) notifyOperationError(result.cause);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
async function reload() {
|
|
259
|
+
const controller = activeController;
|
|
260
|
+
if (!controller || !surfaceState?.conflict) return;
|
|
261
|
+
const result = await settle(() => controller.reload());
|
|
262
|
+
if (!result.ok) { notifyOperationError(result.cause); return; }
|
|
263
|
+
await tick();
|
|
264
|
+
focusDocument();
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
function focusDocument() {
|
|
268
|
+
const editorInput =
|
|
269
|
+
surfaceElement?.querySelector<HTMLElement>('.monaco-editor textarea') ??
|
|
270
|
+
surfaceElement?.querySelector<HTMLElement>('[data-editor-document] [role="textbox"]');
|
|
271
|
+
(editorInput ?? surfaceElement)?.focus();
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
function handleKeydown(event: KeyboardEvent) {
|
|
275
|
+
if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === 's') {
|
|
276
|
+
event.preventDefault();
|
|
277
|
+
void publish();
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
function localKeyboardShortcuts(node: HTMLElement) {
|
|
282
|
+
node.addEventListener('keydown', handleKeydown);
|
|
283
|
+
return {
|
|
284
|
+
destroy() {
|
|
285
|
+
node.removeEventListener('keydown', handleKeydown);
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
</script>
|
|
290
|
+
|
|
291
|
+
<section
|
|
292
|
+
bind:this={surfaceElement}
|
|
293
|
+
id={surfaceId}
|
|
294
|
+
class="vibes-editor {className}"
|
|
295
|
+
class:vibes-editor--embedded={(surfaceState?.variant ?? variant) === 'embedded'}
|
|
296
|
+
class:vibes-editor--focused={(surfaceState?.variant ?? variant) === 'focused'}
|
|
297
|
+
aria-labelledby={`${surfaceId}-label`}
|
|
298
|
+
aria-busy={(!surfaceState && !openError) ||
|
|
299
|
+
surfaceState?.phase === 'publishing' ||
|
|
300
|
+
surfaceState?.phase === 'reloading'}
|
|
301
|
+
tabindex="-1"
|
|
302
|
+
data-editor-transaction={surfaceState?.transactionId}
|
|
303
|
+
data-editor-state={surfaceState?.phase ?? (openError ? 'unavailable' : 'opening')}
|
|
304
|
+
data-editor-variant={surfaceState?.variant ?? variant}
|
|
305
|
+
use:localKeyboardShortcuts
|
|
306
|
+
>
|
|
307
|
+
<h2 id={`${surfaceId}-label`} class="vibes-editor__a11y-label">{surfaceLabel}</h2>
|
|
308
|
+
{#if openError}
|
|
309
|
+
<EditorUnsupportedState title="Editor unavailable" reason={openError} code="open-unavailable" />
|
|
310
|
+
{:else if !surfaceState || !activeController}
|
|
311
|
+
<div class="vibes-editor__loading" aria-label="Opening editor">
|
|
312
|
+
<Skeleton class="h-5 w-2/3" />
|
|
313
|
+
<Skeleton class="h-4 w-full" />
|
|
314
|
+
<Skeleton class="h-64 w-full" />
|
|
315
|
+
</div>
|
|
316
|
+
{:else if surfaceState.disposed}
|
|
317
|
+
<EditorUnsupportedState
|
|
318
|
+
title="Editor closed"
|
|
319
|
+
reason="Open the file again to continue."
|
|
320
|
+
code="transaction-disposed"
|
|
321
|
+
/>
|
|
322
|
+
{:else}
|
|
323
|
+
<header class="vibes-editor__header">
|
|
324
|
+
<EditorResourceTrail state={surfaceState} statusId={`${surfaceId}-status`} />
|
|
325
|
+
<div class="vibes-editor__header-actions">
|
|
326
|
+
{#if pendingProposals.length > 0}
|
|
327
|
+
<Button
|
|
328
|
+
type="button"
|
|
329
|
+
variant={showProposals ? 'secondary' : 'outline'}
|
|
330
|
+
size="sm"
|
|
331
|
+
class="vibes-editor__toolbar-btn"
|
|
332
|
+
onclick={() => (showProposals = !showProposals)}
|
|
333
|
+
aria-label={`Toggle proposals review (${pendingProposals.length} pending)`}
|
|
334
|
+
>
|
|
335
|
+
Proposals ({pendingProposals.length})
|
|
336
|
+
</Button>
|
|
337
|
+
{/if}
|
|
338
|
+
<Button
|
|
339
|
+
type="button"
|
|
340
|
+
variant={surfaceState.previewState.open ? 'secondary' : 'ghost'}
|
|
341
|
+
size="sm"
|
|
342
|
+
class="vibes-editor__toolbar-btn"
|
|
343
|
+
onclick={() => activeController?.togglePreview()}
|
|
344
|
+
aria-label="Toggle live preview"
|
|
345
|
+
title="Toggle live preview"
|
|
346
|
+
>
|
|
347
|
+
Preview
|
|
348
|
+
</Button>
|
|
349
|
+
<Button
|
|
350
|
+
id={`${surfaceId}-save`}
|
|
351
|
+
type="button"
|
|
352
|
+
variant={surfaceState.variant === 'focused' ? 'ghost' : 'default'}
|
|
353
|
+
size="sm"
|
|
354
|
+
class={surfaceState.variant === 'focused' ? 'vibes-editor__save--focused' : undefined}
|
|
355
|
+
disabled={!publicationAvailable}
|
|
356
|
+
aria-label={`Save ${surfaceState.base.ref.path}`}
|
|
357
|
+
aria-describedby={`${surfaceId}-status`}
|
|
358
|
+
title="Save (Mod+S)"
|
|
359
|
+
onclick={publish}
|
|
360
|
+
>
|
|
361
|
+
Save
|
|
362
|
+
</Button>
|
|
363
|
+
</div>
|
|
364
|
+
</header>
|
|
365
|
+
|
|
366
|
+
<div class="vibes-editor__notices">
|
|
367
|
+
{#if surfaceState.agentPresences.length > 0}
|
|
368
|
+
<EditorAgentSpotlight
|
|
369
|
+
presences={surfaceState.agentPresences}
|
|
370
|
+
followAgent={surfaceState.followAgent}
|
|
371
|
+
ontogglefollow={(follow) => activeController?.setFollowAgent(follow)}
|
|
372
|
+
/>
|
|
373
|
+
{/if}
|
|
374
|
+
|
|
375
|
+
{#if pendingProposals.length > 0 && showProposals}
|
|
376
|
+
<EditorProposalReview
|
|
377
|
+
proposals={surfaceState.proposals}
|
|
378
|
+
onapprove={async (id) => {
|
|
379
|
+
const result = await settle(async () => { await activeController?.approveProposal(id); });
|
|
380
|
+
if (!result.ok) notifyOperationError(result.cause);
|
|
381
|
+
}}
|
|
382
|
+
onreject={(id, reason) => {
|
|
383
|
+
const result = settleNow(() => activeController?.rejectProposal(id, reason));
|
|
384
|
+
if (!result.ok) notifyOperationError(result.cause);
|
|
385
|
+
}}
|
|
386
|
+
/>
|
|
387
|
+
{/if}
|
|
388
|
+
|
|
389
|
+
{#if surfaceState.readOnlyReason}
|
|
390
|
+
<EditorUnsupportedState
|
|
391
|
+
title="View only"
|
|
392
|
+
reason={surfaceState.narrow
|
|
393
|
+
? 'Editing is available in a larger window. You can still review and copy this file.'
|
|
394
|
+
: 'You can review and copy this file, but changes cannot be saved here.'}
|
|
395
|
+
code={surfaceState.narrow ? 'narrow-review' : 'read-only'}
|
|
396
|
+
/>
|
|
397
|
+
{/if}
|
|
398
|
+
|
|
399
|
+
{#if surfaceState.conflict}
|
|
400
|
+
<EditorConflictState
|
|
401
|
+
current={surfaceState.conflict}
|
|
402
|
+
draft={surfaceState.draft}
|
|
403
|
+
filename={surfaceState.base.ref.path}
|
|
404
|
+
dirty={surfaceState.dirty}
|
|
405
|
+
focused={surfaceState.variant === 'focused'}
|
|
406
|
+
onreload={reload}
|
|
407
|
+
onstay={focusDocument}
|
|
408
|
+
busy={surfaceState.phase === 'reloading'}
|
|
409
|
+
/>
|
|
410
|
+
{/if}
|
|
411
|
+
|
|
412
|
+
{#if surfaceState.error}
|
|
413
|
+
<EditorUnsupportedState
|
|
414
|
+
title={surfaceState.conflict
|
|
415
|
+
? "Couldn't load the newer version"
|
|
416
|
+
: surfaceState.dirty
|
|
417
|
+
? "Couldn't save"
|
|
418
|
+
: 'Editing unavailable'}
|
|
419
|
+
reason={surfaceState.conflict || surfaceState.dirty
|
|
420
|
+
? 'Your changes are still here. Check your connection, then try again.'
|
|
421
|
+
: 'This file is not available right now. Your current view has not been replaced.'}
|
|
422
|
+
code="operation-error"
|
|
423
|
+
/>
|
|
424
|
+
{/if}
|
|
425
|
+
</div>
|
|
426
|
+
|
|
427
|
+
<div class="vibes-editor__main" class:vibes-editor__main--split={surfaceState.previewState.open}>
|
|
428
|
+
<div class="vibes-editor__document">
|
|
429
|
+
<EditorDocumentPane
|
|
430
|
+
controller={activeController}
|
|
431
|
+
state={surfaceState}
|
|
432
|
+
{height}
|
|
433
|
+
ariaLabel={`${surfaceLabel} document`}
|
|
434
|
+
{contextActionClient}
|
|
435
|
+
oncontextactionerror={notifyOperationError}
|
|
436
|
+
/>
|
|
437
|
+
</div>
|
|
438
|
+
{#if surfaceState.previewState.open}
|
|
439
|
+
<div class="vibes-editor__preview">
|
|
440
|
+
<EditorPreviewPane
|
|
441
|
+
previewState={surfaceState.previewState}
|
|
442
|
+
onmodechange={(mode) => activeController?.togglePreview(true, mode)}
|
|
443
|
+
onurlchange={(url) =>
|
|
444
|
+
activeController?.togglePreview(true, surfaceState?.previewState.mode, url)}
|
|
445
|
+
onclose={() => activeController?.togglePreview(false)}
|
|
446
|
+
/>
|
|
447
|
+
</div>
|
|
448
|
+
{/if}
|
|
449
|
+
</div>
|
|
450
|
+
{/if}
|
|
451
|
+
</section>
|
|
452
|
+
|
|
453
|
+
<style>
|
|
454
|
+
.vibes-editor {
|
|
455
|
+
container-name: vibes-editor;
|
|
456
|
+
container-type: inline-size;
|
|
457
|
+
display: grid;
|
|
458
|
+
width: 100%;
|
|
459
|
+
min-width: 0;
|
|
460
|
+
box-sizing: border-box;
|
|
461
|
+
background: var(--background);
|
|
462
|
+
color: var(--foreground);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.vibes-editor--embedded {
|
|
466
|
+
gap: 0.75rem;
|
|
467
|
+
padding: 0.75rem;
|
|
468
|
+
border: 1px solid var(--border);
|
|
469
|
+
border-radius: 0.75rem;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.vibes-editor--focused {
|
|
473
|
+
grid-template-rows: auto auto minmax(0, 1fr);
|
|
474
|
+
gap: 0;
|
|
475
|
+
height: 100%;
|
|
476
|
+
min-height: 0;
|
|
477
|
+
padding: 0;
|
|
478
|
+
border: 0;
|
|
479
|
+
border-radius: 0;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.vibes-editor__a11y-label {
|
|
483
|
+
position: absolute;
|
|
484
|
+
width: 1px;
|
|
485
|
+
height: 1px;
|
|
486
|
+
padding: 0;
|
|
487
|
+
margin: -1px;
|
|
488
|
+
overflow: hidden;
|
|
489
|
+
clip: rect(0, 0, 0, 0);
|
|
490
|
+
white-space: nowrap;
|
|
491
|
+
border: 0;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.vibes-editor__header {
|
|
495
|
+
display: flex;
|
|
496
|
+
align-items: center;
|
|
497
|
+
justify-content: space-between;
|
|
498
|
+
flex-wrap: wrap;
|
|
499
|
+
min-width: 0;
|
|
500
|
+
gap: 0.75rem;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.vibes-editor__header :global(.resource-trail) {
|
|
504
|
+
min-width: 0;
|
|
505
|
+
flex: 1;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.vibes-editor--focused .vibes-editor__header {
|
|
509
|
+
min-height: var(--vibes-workbench-chrome-height, 2rem);
|
|
510
|
+
padding-inline: var(--vibes-workbench-chrome-inset, 0.5rem);
|
|
511
|
+
border-bottom: 1px solid var(--vibes-workbench-hairline, var(--border));
|
|
512
|
+
background: color-mix(in oklab, var(--card) 72%, var(--background));
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.vibes-editor__save--focused {
|
|
516
|
+
height: 1.75rem;
|
|
517
|
+
flex: none;
|
|
518
|
+
padding-inline: 0.625rem;
|
|
519
|
+
color: var(--muted-foreground);
|
|
520
|
+
font-size: 0.75rem;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.vibes-editor__save--focused:not(:disabled) {
|
|
524
|
+
color: var(--foreground);
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
.vibes-editor__loading {
|
|
528
|
+
display: grid;
|
|
529
|
+
gap: 0.65rem;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.vibes-editor--focused .vibes-editor__loading {
|
|
533
|
+
padding: 0.75rem;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
.vibes-editor__notices {
|
|
537
|
+
display: grid;
|
|
538
|
+
gap: 0.5rem;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
.vibes-editor__notices:empty {
|
|
542
|
+
display: none;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
.vibes-editor__header-actions {
|
|
546
|
+
display: flex;
|
|
547
|
+
align-items: center;
|
|
548
|
+
gap: 0.375rem;
|
|
549
|
+
flex-shrink: 0;
|
|
550
|
+
min-width: 0;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
.vibes-editor__toolbar-btn {
|
|
554
|
+
height: 1.75rem;
|
|
555
|
+
padding-inline: 0.5rem;
|
|
556
|
+
font-size: 0.75rem;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.vibes-editor__document {
|
|
560
|
+
min-width: 0;
|
|
561
|
+
min-height: 0;
|
|
562
|
+
height: 100%;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
.vibes-editor__main {
|
|
566
|
+
display: grid;
|
|
567
|
+
grid-template-columns: minmax(0, 1fr);
|
|
568
|
+
min-width: 0;
|
|
569
|
+
min-height: 0;
|
|
570
|
+
height: 100%;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
.vibes-editor__main--split {
|
|
574
|
+
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
.vibes-editor__preview {
|
|
578
|
+
min-width: 0;
|
|
579
|
+
min-height: 0;
|
|
580
|
+
height: 100%;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
.vibes-editor--focused .vibes-editor__header {
|
|
584
|
+
grid-row: 1;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
.vibes-editor--focused .vibes-editor__notices {
|
|
588
|
+
grid-row: 2;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
.vibes-editor--focused .vibes-editor__main {
|
|
592
|
+
grid-row: 3;
|
|
593
|
+
height: 100%;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
.vibes-editor--focused :global([data-editor-unsupported]) {
|
|
597
|
+
border-inline: 0;
|
|
598
|
+
border-radius: 0;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
@container vibes-editor (max-width: 22rem) {
|
|
602
|
+
.vibes-editor--embedded .vibes-editor__header {
|
|
603
|
+
align-items: stretch;
|
|
604
|
+
flex-direction: column;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
.vibes-editor--embedded .vibes-editor__header :global(button) {
|
|
608
|
+
align-self: stretch;
|
|
609
|
+
width: 100%;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
</style>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type CaughtFailure } from '@vibesdotdev/kernel';
|
|
2
|
+
import type { EditorClient, EditorContextRef, EditorTransaction } from '@vibesdotdev/editor';
|
|
3
|
+
import type { WorkspaceDocumentRef } from '@vibesdotdev/workspace-schemas/document';
|
|
4
|
+
import type { EditorContextActionClient } from '../editor-context-actions.ts';
|
|
5
|
+
import { type EditorController, type EditorControllerState, type EditorSurfaceVariant } from '../controller.ts';
|
|
6
|
+
type $$ComponentProps = {
|
|
7
|
+
controller?: EditorController;
|
|
8
|
+
transaction?: EditorTransaction;
|
|
9
|
+
client?: EditorClient;
|
|
10
|
+
context?: EditorContextRef;
|
|
11
|
+
document?: WorkspaceDocumentRef;
|
|
12
|
+
documentId?: string;
|
|
13
|
+
variant?: EditorSurfaceVariant;
|
|
14
|
+
reviewOnly?: boolean;
|
|
15
|
+
narrow?: boolean;
|
|
16
|
+
height?: string | number;
|
|
17
|
+
ariaLabel?: string;
|
|
18
|
+
class?: string;
|
|
19
|
+
oncontrollerready?: (controller: EditorController) => void;
|
|
20
|
+
onstatechange?: (state: EditorControllerState) => void;
|
|
21
|
+
onoperationerror?: (error: CaughtFailure) => void;
|
|
22
|
+
contextActionClient?: EditorContextActionClient;
|
|
23
|
+
};
|
|
24
|
+
declare const VibesEditor: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
25
|
+
type VibesEditor = ReturnType<typeof VibesEditor>;
|
|
26
|
+
export default VibesEditor;
|
|
27
|
+
//# sourceMappingURL=VibesEditor.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VibesEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/VibesEditor.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAA0C,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEjG,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAEpF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAG9E,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,MAAM,kBAAkB,CAAC;AAU1B,KAAK,gBAAgB,GAAI;IACxB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC3D,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACvD,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAClD,mBAAmB,CAAC,EAAE,yBAAyB,CAAC;CAChD,CAAC;AAkWH,QAAA,MAAM,WAAW,sDAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
|