@carbon/ai-chat-components 0.7.0 → 0.7.1
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/custom-elements.json +1 -1
- package/es/components/code-snippet/src/codemirror/base-setup.js +3 -3
- package/es/components/code-snippet/src/codemirror/codemirror-runtime.d.ts +1 -1
- package/es/components/code-snippet/src/codemirror/codemirror-runtime.js +1 -1
- package/es/components/code-snippet/src/codemirror/content-sync.d.ts +1 -1
- package/es/components/code-snippet/src/codemirror/editor-manager.d.ts +1 -1
- package/es/components/code-snippet/src/codemirror/editor-manager.js +1 -1
- package/es/components/code-snippet/src/codemirror/language-controller.d.ts +1 -1
- package/es/components/code-snippet/src/codemirror/theme.js +1 -1
- package/es-custom/components/card/index.d.ts +11 -0
- package/es-custom/components/card/index.js +11 -0
- package/es-custom/components/card/index.js.map +1 -0
- package/es-custom/components/card/src/card-footer.d.ts +43 -0
- package/es-custom/components/card/src/card-footer.js +141 -0
- package/es-custom/components/card/src/card-footer.js.map +1 -0
- package/es-custom/components/card/src/card-footer.scss.js +13 -0
- package/es-custom/components/card/src/card-footer.scss.js.map +1 -0
- package/es-custom/components/card/src/card-steps.d.ts +28 -0
- package/es-custom/components/card/src/card-steps.js +91 -0
- package/es-custom/components/card/src/card-steps.js.map +1 -0
- package/es-custom/components/card/src/card-steps.scss.js +13 -0
- package/es-custom/components/card/src/card-steps.scss.js.map +1 -0
- package/es-custom/components/card/src/card.d.ts +27 -0
- package/es-custom/components/card/src/card.js +65 -0
- package/es-custom/components/card/src/card.js.map +1 -0
- package/es-custom/components/card/src/card.scss.js +13 -0
- package/es-custom/components/card/src/card.scss.js.map +1 -0
- package/es-custom/components/chain-of-thought/defs.d.ts +54 -0
- package/es-custom/components/chain-of-thought/defs.js +38 -0
- package/es-custom/components/chain-of-thought/defs.js.map +1 -0
- package/es-custom/components/chain-of-thought/index.d.ts +10 -0
- package/es-custom/components/chain-of-thought/index.js +13 -0
- package/es-custom/components/chain-of-thought/index.js.map +1 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought-step.d.ts +43 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought-step.js +351 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought-step.js.map +1 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought-step.scss.js +13 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought-step.scss.js.map +1 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.d.ts +33 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.js +107 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.js.map +1 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.scss.js +13 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.scss.js.map +1 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought.d.ts +41 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought.js +132 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought.js.map +1 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought.scss.js +13 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought.scss.js.map +1 -0
- package/es-custom/components/chain-of-thought/src/tool-call-data.d.ts +33 -0
- package/es-custom/components/chain-of-thought/src/tool-call-data.js +179 -0
- package/es-custom/components/chain-of-thought/src/tool-call-data.js.map +1 -0
- package/es-custom/components/chain-of-thought/src/tool-call-data.scss.js +13 -0
- package/es-custom/components/chain-of-thought/src/tool-call-data.scss.js.map +1 -0
- package/es-custom/components/chat-button/defs.d.ts +25 -0
- package/es-custom/components/chat-button/defs.js +36 -0
- package/es-custom/components/chat-button/defs.js.map +1 -0
- package/es-custom/components/chat-button/index.d.ts +9 -0
- package/es-custom/components/chat-button/index.js +9 -0
- package/es-custom/components/chat-button/index.js.map +1 -0
- package/es-custom/components/chat-button/src/chat-button.d.ts +40 -0
- package/es-custom/components/chat-button/src/chat-button.js +78 -0
- package/es-custom/components/chat-button/src/chat-button.js.map +1 -0
- package/es-custom/components/chat-button/src/chat-button.scss.js +13 -0
- package/es-custom/components/chat-button/src/chat-button.scss.js.map +1 -0
- package/es-custom/components/code-snippet/index.d.ts +3 -0
- package/es-custom/components/code-snippet/index.js +10 -0
- package/es-custom/components/code-snippet/index.js.map +1 -0
- package/es-custom/components/code-snippet/src/code-snippet-card.d.ts +63 -0
- package/es-custom/components/code-snippet/src/code-snippet-card.js +186 -0
- package/es-custom/components/code-snippet/src/code-snippet-card.js.map +1 -0
- package/es-custom/components/code-snippet/src/code-snippet.d.ts +461 -0
- package/es-custom/components/code-snippet/src/code-snippet.js +678 -0
- package/es-custom/components/code-snippet/src/code-snippet.js.map +1 -0
- package/es-custom/components/code-snippet/src/code-snippet.scss.js +13 -0
- package/es-custom/components/code-snippet/src/code-snippet.scss.js.map +1 -0
- package/es-custom/components/code-snippet/src/codemirror/base-setup.d.ts +12 -0
- package/es-custom/components/code-snippet/src/codemirror/base-setup.js +65 -0
- package/es-custom/components/code-snippet/src/codemirror/base-setup.js.map +1 -0
- package/es-custom/components/code-snippet/src/codemirror/codemirror-loader.d.ts +12 -0
- package/es-custom/components/code-snippet/src/codemirror/codemirror-loader.js +36 -0
- package/es-custom/components/code-snippet/src/codemirror/codemirror-loader.js.map +1 -0
- package/es-custom/components/code-snippet/src/codemirror/codemirror-runtime.d.ts +7 -0
- package/es-custom/components/code-snippet/src/codemirror/codemirror-runtime.js +13 -0
- package/es-custom/components/code-snippet/src/codemirror/codemirror-runtime.js.map +1 -0
- package/es-custom/components/code-snippet/src/codemirror/content-sync.d.ts +12 -0
- package/es-custom/components/code-snippet/src/codemirror/content-sync.js +72 -0
- package/es-custom/components/code-snippet/src/codemirror/content-sync.js.map +1 -0
- package/es-custom/components/code-snippet/src/codemirror/editor-manager.d.ts +28 -0
- package/es-custom/components/code-snippet/src/codemirror/editor-manager.js +75 -0
- package/es-custom/components/code-snippet/src/codemirror/editor-manager.js.map +1 -0
- package/es-custom/components/code-snippet/src/codemirror/language-controller.d.ts +38 -0
- package/es-custom/components/code-snippet/src/codemirror/language-controller.js +220 -0
- package/es-custom/components/code-snippet/src/codemirror/language-controller.js.map +1 -0
- package/es-custom/components/code-snippet/src/codemirror/language-data.d.ts +6 -0
- package/es-custom/components/code-snippet/src/codemirror/language-data.js +1043 -0
- package/es-custom/components/code-snippet/src/codemirror/language-data.js.map +1 -0
- package/es-custom/components/code-snippet/src/codemirror/language-utils.d.ts +79 -0
- package/es-custom/components/code-snippet/src/codemirror/language-utils.js +219 -0
- package/es-custom/components/code-snippet/src/codemirror/language-utils.js.map +1 -0
- package/es-custom/components/code-snippet/src/codemirror/marker-utils.d.ts +123 -0
- package/es-custom/components/code-snippet/src/codemirror/marker-utils.js +183 -0
- package/es-custom/components/code-snippet/src/codemirror/marker-utils.js.map +1 -0
- package/es-custom/components/code-snippet/src/codemirror/theme.d.ts +54 -0
- package/es-custom/components/code-snippet/src/codemirror/theme.js +320 -0
- package/es-custom/components/code-snippet/src/codemirror/theme.js.map +1 -0
- package/es-custom/components/code-snippet/src/dom-utils.d.ts +24 -0
- package/es-custom/components/code-snippet/src/dom-utils.js +63 -0
- package/es-custom/components/code-snippet/src/dom-utils.js.map +1 -0
- package/es-custom/components/code-snippet/src/formatters.d.ts +4 -0
- package/es-custom/components/code-snippet/src/formatters.js +19 -0
- package/es-custom/components/code-snippet/src/formatters.js.map +1 -0
- package/es-custom/components/code-snippet/src/layout-utils.d.ts +22 -0
- package/es-custom/components/code-snippet/src/layout-utils.js +63 -0
- package/es-custom/components/code-snippet/src/layout-utils.js.map +1 -0
- package/es-custom/components/code-snippet/src/streaming-manager.d.ts +24 -0
- package/es-custom/components/code-snippet/src/streaming-manager.js +120 -0
- package/es-custom/components/code-snippet/src/streaming-manager.js.map +1 -0
- package/es-custom/components/feedback/index.d.ts +4 -0
- package/es-custom/components/feedback/index.js +10 -0
- package/es-custom/components/feedback/index.js.map +1 -0
- package/es-custom/components/feedback/src/feedback-buttons.d.ts +63 -0
- package/es-custom/components/feedback/src/feedback-buttons.js +113 -0
- package/es-custom/components/feedback/src/feedback-buttons.js.map +1 -0
- package/es-custom/components/feedback/src/feedback-buttons.scss.js +13 -0
- package/es-custom/components/feedback/src/feedback-buttons.scss.js.map +1 -0
- package/es-custom/components/feedback/src/feedback-buttons.template.d.ts +4 -0
- package/es-custom/components/feedback/src/feedback-buttons.template.js +79 -0
- package/es-custom/components/feedback/src/feedback-buttons.template.js.map +1 -0
- package/es-custom/components/feedback/src/feedback.d.ts +113 -0
- package/es-custom/components/feedback/src/feedback.js +195 -0
- package/es-custom/components/feedback/src/feedback.js.map +1 -0
- package/es-custom/components/feedback/src/feedback.scss.js +13 -0
- package/es-custom/components/feedback/src/feedback.scss.js.map +1 -0
- package/es-custom/components/feedback/src/feedback.template.d.ts +12 -0
- package/es-custom/components/feedback/src/feedback.template.js +115 -0
- package/es-custom/components/feedback/src/feedback.template.js.map +1 -0
- package/es-custom/components/markdown/index.d.ts +2 -0
- package/es-custom/components/markdown/index.js +9 -0
- package/es-custom/components/markdown/index.js.map +1 -0
- package/es-custom/components/markdown/src/markdown-renderer.d.ts +66 -0
- package/es-custom/components/markdown/src/markdown-renderer.js +359 -0
- package/es-custom/components/markdown/src/markdown-renderer.js.map +1 -0
- package/es-custom/components/markdown/src/markdown-token-tree.d.ts +32 -0
- package/es-custom/components/markdown/src/markdown-token-tree.js +180 -0
- package/es-custom/components/markdown/src/markdown-token-tree.js.map +1 -0
- package/es-custom/components/markdown/src/markdown.d.ts +72 -0
- package/es-custom/components/markdown/src/markdown.js +342 -0
- package/es-custom/components/markdown/src/markdown.js.map +1 -0
- package/es-custom/components/markdown/src/markdown.scss.js +13 -0
- package/es-custom/components/markdown/src/markdown.scss.js.map +1 -0
- package/es-custom/components/markdown/src/markdown.template.d.ts +6 -0
- package/es-custom/components/markdown/src/markdown.template.js +29 -0
- package/es-custom/components/markdown/src/markdown.template.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdown-it-attrs.d.ts +7 -0
- package/es-custom/components/markdown/src/plugins/markdown-it-attrs.js +84 -0
- package/es-custom/components/markdown/src/plugins/markdown-it-attrs.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdown-it-highlight.d.ts +7 -0
- package/es-custom/components/markdown/src/plugins/markdown-it-highlight.js +59 -0
- package/es-custom/components/markdown/src/plugins/markdown-it-highlight.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdown-it-task-lists.d.ts +12 -0
- package/es-custom/components/markdown/src/plugins/markdown-it-task-lists.js +73 -0
- package/es-custom/components/markdown/src/plugins/markdown-it-task-lists.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/core.d.ts +26 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/core.js +330 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/core.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/blocks.d.ts +6 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/blocks.js +63 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/blocks.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/code.d.ts +6 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/code.js +43 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/code.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/index.d.ts +5 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/index.js +55 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/index.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/inline.d.ts +19 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/inline.js +210 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/inline.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/lists.d.ts +13 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/lists.js +156 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/lists.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/tables.d.ts +13 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/tables.js +216 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/tables.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/types.d.ts +34 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/types.js +8 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/types.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/utils.d.ts +25 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/utils.js +62 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/utils.js.map +1 -0
- package/es-custom/components/markdown/src/utils/html-helpers.d.ts +2 -0
- package/es-custom/components/markdown/src/utils/html-helpers.js +204 -0
- package/es-custom/components/markdown/src/utils/html-helpers.js.map +1 -0
- package/es-custom/components/markdown/src/utils/table-helpers.d.ts +31 -0
- package/es-custom/components/markdown/src/utils/table-helpers.js +106 -0
- package/es-custom/components/markdown/src/utils/table-helpers.js.map +1 -0
- package/es-custom/components/markdown/src/utils.d.ts +8 -0
- package/es-custom/components/markdown/src/utils.js +31 -0
- package/es-custom/components/markdown/src/utils.js.map +1 -0
- package/es-custom/components/processing/index.d.ts +1 -0
- package/es-custom/components/processing/index.js +9 -0
- package/es-custom/components/processing/index.js.map +1 -0
- package/es-custom/components/processing/src/processing.d.ts +16 -0
- package/es-custom/components/processing/src/processing.js +59 -0
- package/es-custom/components/processing/src/processing.js.map +1 -0
- package/es-custom/components/processing/src/processing.scss.js +13 -0
- package/es-custom/components/processing/src/processing.scss.js.map +1 -0
- package/es-custom/components/reasoning-steps/index.d.ts +4 -0
- package/es-custom/components/reasoning-steps/index.js +11 -0
- package/es-custom/components/reasoning-steps/index.js.map +1 -0
- package/es-custom/components/reasoning-steps/src/reasoning-step.d.ts +33 -0
- package/es-custom/components/reasoning-steps/src/reasoning-step.js +251 -0
- package/es-custom/components/reasoning-steps/src/reasoning-step.js.map +1 -0
- package/es-custom/components/reasoning-steps/src/reasoning-step.scss.js +13 -0
- package/es-custom/components/reasoning-steps/src/reasoning-step.scss.js.map +1 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.d.ts +36 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.js +81 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.js.map +1 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.scss.js +13 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.scss.js.map +1 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.template.d.ts +3 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.template.js +43 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.template.js.map +1 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps.d.ts +19 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps.js +112 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps.js.map +1 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps.scss.js +13 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps.scss.js.map +1 -0
- package/es-custom/components/table/index.d.ts +3 -0
- package/es-custom/components/table/index.js +9 -0
- package/es-custom/components/table/index.js.map +1 -0
- package/es-custom/components/table/src/table-loader.d.ts +4 -0
- package/es-custom/components/table/src/table-loader.js +28 -0
- package/es-custom/components/table/src/table-loader.js.map +1 -0
- package/es-custom/components/table/src/table-pagination.template.d.ts +27 -0
- package/es-custom/components/table/src/table-pagination.template.js +55 -0
- package/es-custom/components/table/src/table-pagination.template.js.map +1 -0
- package/es-custom/components/table/src/table-runtime.d.ts +2 -0
- package/es-custom/components/table/src/table-runtime.js +10 -0
- package/es-custom/components/table/src/table-runtime.js.map +1 -0
- package/es-custom/components/table/src/table-skeleton.template.d.ts +6 -0
- package/es-custom/components/table/src/table-skeleton.template.js +34 -0
- package/es-custom/components/table/src/table-skeleton.template.js.map +1 -0
- package/es-custom/components/table/src/table.d.ts +184 -0
- package/es-custom/components/table/src/table.js +543 -0
- package/es-custom/components/table/src/table.js.map +1 -0
- package/es-custom/components/table/src/table.scss.js +13 -0
- package/es-custom/components/table/src/table.scss.js.map +1 -0
- package/es-custom/components/table/src/table.template.d.ts +10 -0
- package/es-custom/components/table/src/table.template.js +89 -0
- package/es-custom/components/table/src/table.template.js.map +1 -0
- package/es-custom/components/table/src/types.d.ts +13 -0
- package/es-custom/components/table/src/types.js +8 -0
- package/es-custom/components/table/src/types.js.map +1 -0
- package/es-custom/components/toolbar/index.d.ts +1 -0
- package/es-custom/components/toolbar/index.js +9 -0
- package/es-custom/components/toolbar/index.js.map +1 -0
- package/es-custom/components/toolbar/src/toolbar.d.ts +38 -0
- package/es-custom/components/toolbar/src/toolbar.js +191 -0
- package/es-custom/components/toolbar/src/toolbar.js.map +1 -0
- package/es-custom/components/toolbar/src/toolbar.scss.js +13 -0
- package/es-custom/components/toolbar/src/toolbar.scss.js.map +1 -0
- package/es-custom/components/workspace-shell/index.d.ts +4 -0
- package/es-custom/components/workspace-shell/index.js +12 -0
- package/es-custom/components/workspace-shell/index.js.map +1 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-body.d.ts +17 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-body.js +50 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-body.js.map +1 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.d.ts +40 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.js +144 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.js.map +1 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.scss.js +13 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.scss.js.map +1 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-header.d.ts +28 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-header.js +78 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-header.js.map +1 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-header.scss.js +13 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-header.scss.js.map +1 -0
- package/es-custom/components/workspace-shell/src/workspace-shell.d.ts +19 -0
- package/es-custom/components/workspace-shell/src/workspace-shell.js +56 -0
- package/es-custom/components/workspace-shell/src/workspace-shell.js.map +1 -0
- package/es-custom/components/workspace-shell/src/workspace-shell.scss.js +13 -0
- package/es-custom/components/workspace-shell/src/workspace-shell.scss.js.map +1 -0
- package/es-custom/globals/decorators/carbon-element.d.ts +37 -0
- package/es-custom/globals/decorators/carbon-element.js +68 -0
- package/es-custom/globals/decorators/carbon-element.js.map +1 -0
- package/es-custom/globals/decorators/index.d.ts +1 -0
- package/es-custom/globals/decorators/index.js +9 -0
- package/es-custom/globals/decorators/index.js.map +1 -0
- package/es-custom/globals/settings.d.ts +2 -0
- package/es-custom/globals/settings.js +20 -0
- package/es-custom/globals/settings.js.map +1 -0
- package/es-custom/globals/utils/uuid.d.ts +5 -0
- package/es-custom/globals/utils/uuid.js +32 -0
- package/es-custom/globals/utils/uuid.js.map +1 -0
- package/es-custom/node_modules/@carbon/utilities/es/documentLang/documentLang.js +9 -0
- package/es-custom/node_modules/@carbon/utilities/es/documentLang/documentLang.js.map +1 -0
- package/es-custom/node_modules/@carbon/utilities/es/overflowHandler/overflowHandler.js +11 -0
- package/es-custom/node_modules/@carbon/utilities/es/overflowHandler/overflowHandler.js.map +1 -0
- package/es-custom/react/ai-label.d.ts +4 -0
- package/es-custom/react/ai-label.js +28 -0
- package/es-custom/react/ai-label.js.map +1 -0
- package/es-custom/react/button.d.ts +6 -0
- package/es-custom/react/button.js +29 -0
- package/es-custom/react/button.js.map +1 -0
- package/es-custom/react/card.d.ts +9 -0
- package/es-custom/react/card.js +43 -0
- package/es-custom/react/card.js.map +1 -0
- package/es-custom/react/chain-of-thought-step.d.ts +4 -0
- package/es-custom/react/chain-of-thought-step.js +32 -0
- package/es-custom/react/chain-of-thought-step.js.map +1 -0
- package/es-custom/react/chain-of-thought-toggle.d.ts +6 -0
- package/es-custom/react/chain-of-thought-toggle.js +31 -0
- package/es-custom/react/chain-of-thought-toggle.js.map +1 -0
- package/es-custom/react/chain-of-thought.d.ts +7 -0
- package/es-custom/react/chain-of-thought.js +33 -0
- package/es-custom/react/chain-of-thought.js.map +1 -0
- package/es-custom/react/chat-button.d.ts +13 -0
- package/es-custom/react/chat-button.js +30 -0
- package/es-custom/react/chat-button.js.map +1 -0
- package/es-custom/react/code-snippet-card.d.ts +4 -0
- package/es-custom/react/code-snippet-card.js +31 -0
- package/es-custom/react/code-snippet-card.js.map +1 -0
- package/es-custom/react/code-snippet.d.ts +4 -0
- package/es-custom/react/code-snippet.js +31 -0
- package/es-custom/react/code-snippet.js.map +1 -0
- package/es-custom/react/content-switcher.d.ts +7 -0
- package/es-custom/react/content-switcher.js +37 -0
- package/es-custom/react/content-switcher.js.map +1 -0
- package/es-custom/react/feedback-buttons.d.ts +4 -0
- package/es-custom/react/feedback-buttons.js +31 -0
- package/es-custom/react/feedback-buttons.js.map +1 -0
- package/es-custom/react/feedback.d.ts +6 -0
- package/es-custom/react/feedback.js +32 -0
- package/es-custom/react/feedback.js.map +1 -0
- package/es-custom/react/icon-button.d.ts +4 -0
- package/es-custom/react/icon-button.js +28 -0
- package/es-custom/react/icon-button.js.map +1 -0
- package/es-custom/react/icon.d.ts +4 -0
- package/es-custom/react/icon.js +28 -0
- package/es-custom/react/icon.js.map +1 -0
- package/es-custom/react/inline-notification.d.ts +4 -0
- package/es-custom/react/inline-notification.js +28 -0
- package/es-custom/react/inline-notification.js.map +1 -0
- package/es-custom/react/markdown.d.ts +4 -0
- package/es-custom/react/markdown.js +28 -0
- package/es-custom/react/markdown.js.map +1 -0
- package/es-custom/react/overflow-menu.d.ts +9 -0
- package/es-custom/react/overflow-menu.js +40 -0
- package/es-custom/react/overflow-menu.js.map +1 -0
- package/es-custom/react/processing.d.ts +4 -0
- package/es-custom/react/processing.js +28 -0
- package/es-custom/react/processing.js.map +1 -0
- package/es-custom/react/reasoning-step.d.ts +4 -0
- package/es-custom/react/reasoning-step.js +32 -0
- package/es-custom/react/reasoning-step.js.map +1 -0
- package/es-custom/react/reasoning-steps-toggle.d.ts +6 -0
- package/es-custom/react/reasoning-steps-toggle.js +31 -0
- package/es-custom/react/reasoning-steps-toggle.js.map +1 -0
- package/es-custom/react/reasoning-steps.d.ts +4 -0
- package/es-custom/react/reasoning-steps.js +28 -0
- package/es-custom/react/reasoning-steps.js.map +1 -0
- package/es-custom/react/tag.d.ts +4 -0
- package/es-custom/react/tag.js +28 -0
- package/es-custom/react/tag.js.map +1 -0
- package/es-custom/react/tile.d.ts +7 -0
- package/es-custom/react/tile.js +34 -0
- package/es-custom/react/tile.js.map +1 -0
- package/es-custom/react/tool-call-data.d.ts +4 -0
- package/es-custom/react/tool-call-data.js +28 -0
- package/es-custom/react/tool-call-data.js.map +1 -0
- package/es-custom/react/toolbar.d.ts +4 -0
- package/es-custom/react/toolbar.js +28 -0
- package/es-custom/react/toolbar.js.map +1 -0
- package/es-custom/react/utils/withWebComponentBridge.d.ts +15 -0
- package/es-custom/react/utils/withWebComponentBridge.js +95 -0
- package/es-custom/react/utils/withWebComponentBridge.js.map +1 -0
- package/es-custom/react/workspace-shell.d.ts +11 -0
- package/es-custom/react/workspace-shell.js +49 -0
- package/es-custom/react/workspace-shell.js.map +1 -0
- package/es-custom/testing/load-all-lazy-deps.d.ts +10 -0
- package/es-custom/testing/load-all-lazy-deps.js +30 -0
- package/es-custom/testing/load-all-lazy-deps.js.map +1 -0
- package/package.json +8 -6
- package/dist/16-C9Ph5740.js +0 -91
- package/dist/16-Dw0Ci4Fd.js +0 -91
- package/dist/16-FH37w-8T.js +0 -91
- package/dist/apl-ugs9-gp6.js +0 -91
- package/dist/asciiarmor-BsIYfA6P.js +0 -91
- package/dist/asn1-HkF5z2_O.js +0 -91
- package/dist/asterisk-CAIjKZq6.js +0 -91
- package/dist/button-Bc3tNCYN.js +0 -157
- package/dist/button-skeleton-DH50p4bH.js +0 -131
- package/dist/carbon-element-C38isbCs.js +0 -91
- package/dist/card.min.js +0 -193
- package/dist/chain-of-thought.min.js +0 -294
- package/dist/chat-button.min.js +0 -107
- package/dist/checkbox-skeleton-CS3inOnf.js +0 -166
- package/dist/class-map-BE4cOc2X.js +0 -128
- package/dist/clike-BIFB3b_k.js +0 -91
- package/dist/clojure-CXNiCqqB.js +0 -91
- package/dist/cmake-CR9NkLsk.js +0 -91
- package/dist/cobol-Ck90O_9v.js +0 -91
- package/dist/code-snippet.min.js +0 -91
- package/dist/codemirror-runtime-D8qZsrKE.js +0 -173
- package/dist/coffeescript-C0nvD2I-.js +0 -91
- package/dist/collection-helpers-BqatNkHh.js +0 -91
- package/dist/commonlisp-BROP4IME.js +0 -91
- package/dist/crystal-D6K96_U-.js +0 -91
- package/dist/css-CdH_tvvW.js +0 -91
- package/dist/cypher-CtHiEXsa.js +0 -91
- package/dist/d-Dcs18F9P.js +0 -91
- package/dist/diff-Bp64yuxL.js +0 -91
- package/dist/dockerfile-1DOwDLks.js +0 -91
- package/dist/dtd-DBKuh-AW.js +0 -91
- package/dist/dylan-ZUYgifRI.js +0 -91
- package/dist/ebnf-CEelJcGq.js +0 -91
- package/dist/ecl-CphVX9Cq.js +0 -91
- package/dist/eiffel-BQPneqZH.js +0 -91
- package/dist/elm-DSPAgqOt.js +0 -91
- package/dist/erlang-D_rMo9WA.js +0 -91
- package/dist/factor-CMTQjKbR.js +0 -91
- package/dist/fcl-BX3Rw6-t.js +0 -91
- package/dist/feedback.min.js +0 -281
- package/dist/forth-BGhjMNd3.js +0 -91
- package/dist/fortran-AEBjaYMh.js +0 -91
- package/dist/gas-DZXAjJGb.js +0 -91
- package/dist/gherkin-DxJx7fVg.js +0 -91
- package/dist/groovy-dfLbXlDy.js +0 -91
- package/dist/haskell-DyZ9y283.js +0 -91
- package/dist/haxe-D47ScCJn.js +0 -91
- package/dist/http-CQ5YdFwi.js +0 -91
- package/dist/icon-button-jLtiwRb4.js +0 -143
- package/dist/icon-loader-BKTEuybf.js +0 -101
- package/dist/idl-DMLd56tu.js +0 -91
- package/dist/if-defined-Dk7gHH6I.js +0 -96
- package/dist/index--CctdwCC.js +0 -91
- package/dist/index--ktPsmev.js +0 -168
- package/dist/index-BHiWR-3B.js +0 -91
- package/dist/index-BI8bnAEd.js +0 -91
- package/dist/index-BbGF94cg.js +0 -91
- package/dist/index-BnQBLEPx.js +0 -91
- package/dist/index-BsUuLdXD.js +0 -91
- package/dist/index-C2xfmTPp.js +0 -91
- package/dist/index-C3BN0MYy.js +0 -91
- package/dist/index-CD4di8Cf.js +0 -91
- package/dist/index-CVyUt3LQ.js +0 -91
- package/dist/index-Cg7m4sg1.js +0 -91
- package/dist/index-ClimwzxW.js +0 -91
- package/dist/index-CrevYuI-.js +0 -91
- package/dist/index-D5kcnwm2.js +0 -91
- package/dist/index-DCbIO0Hl.js +0 -91
- package/dist/index-Db-BDibx.js +0 -91
- package/dist/index-DmpHBiKi.js +0 -91
- package/dist/index-DzPjFlOn.js +0 -91
- package/dist/index-MgVf_8OP.js +0 -91
- package/dist/index-WHfhssUV.js +0 -91
- package/dist/index-rdaURAlB.js +0 -91
- package/dist/index-tFrMu4B_.js +0 -278
- package/dist/index-yLnmvqXN.js +0 -91
- package/dist/javascript-CB_5CYW7.js +0 -91
- package/dist/julia-DmOIk9mc.js +0 -91
- package/dist/livescript-BkgLC0lL.js +0 -91
- package/dist/loading-icon-CmnM4I_H.js +0 -106
- package/dist/lua-CWM_r9JC.js +0 -91
- package/dist/markdown.min.js +0 -298
- package/dist/mathematica-BSatVfC1.js +0 -91
- package/dist/mbox-4am1R8hd.js +0 -91
- package/dist/mirc-pdtTGW9l.js +0 -91
- package/dist/mllike-C0YFsE1U.js +0 -91
- package/dist/modelica-DVTWSHR-.js +0 -91
- package/dist/mscgen-ByAgrjGx.js +0 -91
- package/dist/mumps-X97p0_h_.js +0 -91
- package/dist/nginx-CqUadVPT.js +0 -91
- package/dist/nsis-Urp7BrWk.js +0 -91
- package/dist/ntriples-CToxeTsT.js +0 -91
- package/dist/octave-Dc4mpp8A.js +0 -91
- package/dist/oz-DX2Pk_mI.js +0 -91
- package/dist/pascal-B9GL_nqz.js +0 -91
- package/dist/perl-BvZFpXKD.js +0 -91
- package/dist/pig-BxFxDHBk.js +0 -91
- package/dist/powershell-CwCLRM7O.js +0 -91
- package/dist/processing.min.js +0 -105
- package/dist/properties-3nFD-Vnh.js +0 -91
- package/dist/protobuf-RqEyuWlw.js +0 -91
- package/dist/pug-1L6dEUb3.js +0 -91
- package/dist/puppet-C-gxR1ON.js +0 -91
- package/dist/python-BSbm1-vO.js +0 -91
- package/dist/q-4yAbTbi2.js +0 -91
- package/dist/r-BxfoMXlJ.js +0 -91
- package/dist/reasoning-steps.min.js +0 -202
- package/dist/rpm-DOp6MTEb.js +0 -91
- package/dist/ruby-DD6QCAKT.js +0 -91
- package/dist/sas-Cb-4sFOe.js +0 -91
- package/dist/scheme-CZsCl8E_.js +0 -91
- package/dist/settings-e2aItLYn.js +0 -99
- package/dist/shell-Bba6ETw_.js +0 -91
- package/dist/sieve-DZz1QovM.js +0 -91
- package/dist/simple-mode-DAyX7kcU.js +0 -91
- package/dist/smalltalk-BVigbKw-.js +0 -91
- package/dist/solr-BRh8QRgo.js +0 -91
- package/dist/sparql-DPq9GGqu.js +0 -91
- package/dist/spreadsheet-DWXWohNi.js +0 -91
- package/dist/sql-HgNux1Fi.js +0 -91
- package/dist/state-Bv4FM_9B.js +0 -96
- package/dist/stex-DB306cTl.js +0 -91
- package/dist/stylus-BVbE3BhF.js +0 -91
- package/dist/swift-k2z0otOi.js +0 -91
- package/dist/sync-D3qEZKNY.js +0 -91
- package/dist/table-runtime-Q-ak_IZE.js +0 -510
- package/dist/table.min.js +0 -91
- package/dist/tcl-BJwoeXra.js +0 -91
- package/dist/text-input-BlCqTf_p.js +0 -158
- package/dist/textile-9DAvWy-Y.js +0 -91
- package/dist/throttle-Bst9TagJ.js +0 -91
- package/dist/tiddlywiki-CDJdAycW.js +0 -91
- package/dist/tiki-Dlg5DFIR.js +0 -91
- package/dist/toml-DGqt7oU6.js +0 -91
- package/dist/toolbar.min.js +0 -178
- package/dist/troff-xJv1Y_X_.js +0 -91
- package/dist/ttcn-cfg-CrKiCUlI.js +0 -91
- package/dist/ttcn-dBogkyiy.js +0 -91
- package/dist/turtle-qtDt5E0f.js +0 -91
- package/dist/vb-h5NatM2n.js +0 -91
- package/dist/vbscript-BnXXn72l.js +0 -91
- package/dist/velocity-C_ZqzMiT.js +0 -91
- package/dist/verilog-s8oM517K.js +0 -91
- package/dist/vhdl-BgZd0MBH.js +0 -91
- package/dist/webidl-CDRn4bGa.js +0 -91
- package/dist/workspace-shell.min.js +0 -157
- package/dist/xquery-DTfjYCD7.js +0 -91
- package/dist/yacas-DxV9-gAO.js +0 -91
- package/dist/z80-PFwavMao.js +0 -91
- package/es/node_modules/@codemirror/autocomplete/dist/index.js +0 -258
- package/es/node_modules/@codemirror/autocomplete/dist/index.js.map +0 -1
- package/es/node_modules/@codemirror/commands/dist/index.js +0 -1140
- package/es/node_modules/@codemirror/commands/dist/index.js.map +0 -1
- package/es/node_modules/@codemirror/lint/dist/index.js +0 -636
- package/es/node_modules/@codemirror/lint/dist/index.js.map +0 -1
- package/es/node_modules/@lezer/common/dist/index.js +0 -253
- package/es/node_modules/@lezer/common/dist/index.js.map +0 -1
- package/es/node_modules/crelt/index.js +0 -37
- package/es/node_modules/crelt/index.js.map +0 -1
|
@@ -1,636 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2025
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { getPanel, showPanel, EditorView, Decoration, hoverTooltip, WidgetType } from '@codemirror/view';
|
|
9
|
-
import { StateField, StateEffect, Facet, combineConfig, RangeSetBuilder } from '@codemirror/state';
|
|
10
|
-
import crelt from '../../../crelt/index.js';
|
|
11
|
-
|
|
12
|
-
class SelectedDiagnostic {
|
|
13
|
-
constructor(from, to, diagnostic) {
|
|
14
|
-
this.from = from;
|
|
15
|
-
this.to = to;
|
|
16
|
-
this.diagnostic = diagnostic;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
class LintState {
|
|
20
|
-
constructor(diagnostics, panel, selected) {
|
|
21
|
-
this.diagnostics = diagnostics;
|
|
22
|
-
this.panel = panel;
|
|
23
|
-
this.selected = selected;
|
|
24
|
-
}
|
|
25
|
-
static init(diagnostics, panel, state) {
|
|
26
|
-
// Filter the list of diagnostics for which to create markers
|
|
27
|
-
let diagnosticFilter = state.facet(lintConfig).markerFilter;
|
|
28
|
-
if (diagnosticFilter)
|
|
29
|
-
diagnostics = diagnosticFilter(diagnostics, state);
|
|
30
|
-
let sorted = diagnostics.slice().sort((a, b) => a.from - b.from || a.to - b.to);
|
|
31
|
-
let deco = new RangeSetBuilder(), active = [], pos = 0;
|
|
32
|
-
let scan = state.doc.iter(), scanPos = 0, docLen = state.doc.length;
|
|
33
|
-
for (let i = 0;;) {
|
|
34
|
-
let next = i == sorted.length ? null : sorted[i];
|
|
35
|
-
if (!next && !active.length)
|
|
36
|
-
break;
|
|
37
|
-
let from, to;
|
|
38
|
-
if (active.length) {
|
|
39
|
-
from = pos;
|
|
40
|
-
to = active.reduce((p, d) => Math.min(p, d.to), next && next.from > from ? next.from : 1e8);
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
from = next.from;
|
|
44
|
-
if (from > docLen)
|
|
45
|
-
break;
|
|
46
|
-
to = next.to;
|
|
47
|
-
active.push(next);
|
|
48
|
-
i++;
|
|
49
|
-
}
|
|
50
|
-
while (i < sorted.length) {
|
|
51
|
-
let next = sorted[i];
|
|
52
|
-
if (next.from == from && (next.to > next.from || next.to == from)) {
|
|
53
|
-
active.push(next);
|
|
54
|
-
i++;
|
|
55
|
-
to = Math.min(next.to, to);
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
to = Math.min(next.from, to);
|
|
59
|
-
break;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
to = Math.min(to, docLen);
|
|
63
|
-
let widget = false;
|
|
64
|
-
if (active.some(d => d.from == from && (d.to == to || to == docLen))) {
|
|
65
|
-
widget = from == to;
|
|
66
|
-
if (!widget && to - from < 10) {
|
|
67
|
-
let behind = from - (scanPos + scan.value.length);
|
|
68
|
-
if (behind > 0) {
|
|
69
|
-
scan.next(behind);
|
|
70
|
-
scanPos = from;
|
|
71
|
-
}
|
|
72
|
-
for (let check = from;;) {
|
|
73
|
-
if (check >= to) {
|
|
74
|
-
widget = true;
|
|
75
|
-
break;
|
|
76
|
-
}
|
|
77
|
-
if (!scan.lineBreak && scanPos + scan.value.length > check)
|
|
78
|
-
break;
|
|
79
|
-
check = scanPos + scan.value.length;
|
|
80
|
-
scanPos += scan.value.length;
|
|
81
|
-
scan.next();
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
let sev = maxSeverity(active);
|
|
86
|
-
if (widget) {
|
|
87
|
-
deco.add(from, from, Decoration.widget({
|
|
88
|
-
widget: new DiagnosticWidget(sev),
|
|
89
|
-
diagnostics: active.slice()
|
|
90
|
-
}));
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
let markClass = active.reduce((c, d) => d.markClass ? c + " " + d.markClass : c, "");
|
|
94
|
-
deco.add(from, to, Decoration.mark({
|
|
95
|
-
class: "cm-lintRange cm-lintRange-" + sev + markClass,
|
|
96
|
-
diagnostics: active.slice(),
|
|
97
|
-
inclusiveEnd: active.some(a => a.to > to)
|
|
98
|
-
}));
|
|
99
|
-
}
|
|
100
|
-
pos = to;
|
|
101
|
-
if (pos == docLen)
|
|
102
|
-
break;
|
|
103
|
-
for (let i = 0; i < active.length; i++)
|
|
104
|
-
if (active[i].to <= pos)
|
|
105
|
-
active.splice(i--, 1);
|
|
106
|
-
}
|
|
107
|
-
let set = deco.finish();
|
|
108
|
-
return new LintState(set, panel, findDiagnostic(set));
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
function findDiagnostic(diagnostics, diagnostic = null, after = 0) {
|
|
112
|
-
let found = null;
|
|
113
|
-
diagnostics.between(after, 1e9, (from, to, { spec }) => {
|
|
114
|
-
if (diagnostic && spec.diagnostics.indexOf(diagnostic) < 0)
|
|
115
|
-
return;
|
|
116
|
-
if (!found)
|
|
117
|
-
found = new SelectedDiagnostic(from, to, diagnostic || spec.diagnostics[0]);
|
|
118
|
-
else if (spec.diagnostics.indexOf(found.diagnostic) < 0)
|
|
119
|
-
return false;
|
|
120
|
-
else
|
|
121
|
-
found = new SelectedDiagnostic(found.from, to, found.diagnostic);
|
|
122
|
-
});
|
|
123
|
-
return found;
|
|
124
|
-
}
|
|
125
|
-
function hideTooltip(tr, tooltip) {
|
|
126
|
-
let from = tooltip.pos, to = tooltip.end || from;
|
|
127
|
-
let result = tr.state.facet(lintConfig).hideOn(tr, from, to);
|
|
128
|
-
if (result != null)
|
|
129
|
-
return result;
|
|
130
|
-
let line = tr.startState.doc.lineAt(tooltip.pos);
|
|
131
|
-
return !!(tr.effects.some(e => e.is(setDiagnosticsEffect)) || tr.changes.touchesRange(line.from, Math.max(line.to, to)));
|
|
132
|
-
}
|
|
133
|
-
function maybeEnableLint(state, effects) {
|
|
134
|
-
return state.field(lintState, false) ? effects : effects.concat(StateEffect.appendConfig.of(lintExtensions));
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
The state effect that updates the set of active diagnostics. Can
|
|
138
|
-
be useful when writing an extension that needs to track these.
|
|
139
|
-
*/
|
|
140
|
-
const setDiagnosticsEffect = /*@__PURE__*/StateEffect.define();
|
|
141
|
-
const togglePanel = /*@__PURE__*/StateEffect.define();
|
|
142
|
-
const movePanelSelection = /*@__PURE__*/StateEffect.define();
|
|
143
|
-
const lintState = /*@__PURE__*/StateField.define({
|
|
144
|
-
create() {
|
|
145
|
-
return new LintState(Decoration.none, null, null);
|
|
146
|
-
},
|
|
147
|
-
update(value, tr) {
|
|
148
|
-
if (tr.docChanged && value.diagnostics.size) {
|
|
149
|
-
let mapped = value.diagnostics.map(tr.changes), selected = null, panel = value.panel;
|
|
150
|
-
if (value.selected) {
|
|
151
|
-
let selPos = tr.changes.mapPos(value.selected.from, 1);
|
|
152
|
-
selected = findDiagnostic(mapped, value.selected.diagnostic, selPos) || findDiagnostic(mapped, null, selPos);
|
|
153
|
-
}
|
|
154
|
-
if (!mapped.size && panel && tr.state.facet(lintConfig).autoPanel)
|
|
155
|
-
panel = null;
|
|
156
|
-
value = new LintState(mapped, panel, selected);
|
|
157
|
-
}
|
|
158
|
-
for (let effect of tr.effects) {
|
|
159
|
-
if (effect.is(setDiagnosticsEffect)) {
|
|
160
|
-
let panel = !tr.state.facet(lintConfig).autoPanel ? value.panel : effect.value.length ? LintPanel.open : null;
|
|
161
|
-
value = LintState.init(effect.value, panel, tr.state);
|
|
162
|
-
}
|
|
163
|
-
else if (effect.is(togglePanel)) {
|
|
164
|
-
value = new LintState(value.diagnostics, effect.value ? LintPanel.open : null, value.selected);
|
|
165
|
-
}
|
|
166
|
-
else if (effect.is(movePanelSelection)) {
|
|
167
|
-
value = new LintState(value.diagnostics, value.panel, effect.value);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
return value;
|
|
171
|
-
},
|
|
172
|
-
provide: f => [showPanel.from(f, val => val.panel),
|
|
173
|
-
EditorView.decorations.from(f, s => s.diagnostics)]
|
|
174
|
-
});
|
|
175
|
-
const activeMark = /*@__PURE__*/Decoration.mark({ class: "cm-lintRange cm-lintRange-active" });
|
|
176
|
-
function lintTooltip(view, pos, side) {
|
|
177
|
-
let { diagnostics } = view.state.field(lintState);
|
|
178
|
-
let found, start = -1, end = -1;
|
|
179
|
-
diagnostics.between(pos - (side < 0 ? 1 : 0), pos + (side > 0 ? 1 : 0), (from, to, { spec }) => {
|
|
180
|
-
if (pos >= from && pos <= to &&
|
|
181
|
-
(from == to || ((pos > from || side > 0) && (pos < to || side < 0)))) {
|
|
182
|
-
found = spec.diagnostics;
|
|
183
|
-
start = from;
|
|
184
|
-
end = to;
|
|
185
|
-
return false;
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
let diagnosticFilter = view.state.facet(lintConfig).tooltipFilter;
|
|
189
|
-
if (found && diagnosticFilter)
|
|
190
|
-
found = diagnosticFilter(found, view.state);
|
|
191
|
-
if (!found)
|
|
192
|
-
return null;
|
|
193
|
-
return {
|
|
194
|
-
pos: start,
|
|
195
|
-
end: end,
|
|
196
|
-
above: view.state.doc.lineAt(start).to < end,
|
|
197
|
-
create() {
|
|
198
|
-
return { dom: diagnosticsTooltip(view, found) };
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
function diagnosticsTooltip(view, diagnostics) {
|
|
203
|
-
return crelt("ul", { class: "cm-tooltip-lint" }, diagnostics.map(d => renderDiagnostic(view, d, false)));
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
Command to open and focus the lint panel.
|
|
207
|
-
*/
|
|
208
|
-
const openLintPanel = (view) => {
|
|
209
|
-
let field = view.state.field(lintState, false);
|
|
210
|
-
if (!field || !field.panel)
|
|
211
|
-
view.dispatch({ effects: maybeEnableLint(view.state, [togglePanel.of(true)]) });
|
|
212
|
-
let panel = getPanel(view, LintPanel.open);
|
|
213
|
-
if (panel)
|
|
214
|
-
panel.dom.querySelector(".cm-panel-lint ul").focus();
|
|
215
|
-
return true;
|
|
216
|
-
};
|
|
217
|
-
/**
|
|
218
|
-
Command to close the lint panel, when open.
|
|
219
|
-
*/
|
|
220
|
-
const closeLintPanel = (view) => {
|
|
221
|
-
let field = view.state.field(lintState, false);
|
|
222
|
-
if (!field || !field.panel)
|
|
223
|
-
return false;
|
|
224
|
-
view.dispatch({ effects: togglePanel.of(false) });
|
|
225
|
-
return true;
|
|
226
|
-
};
|
|
227
|
-
/**
|
|
228
|
-
Move the selection to the next diagnostic.
|
|
229
|
-
*/
|
|
230
|
-
const nextDiagnostic = (view) => {
|
|
231
|
-
let field = view.state.field(lintState, false);
|
|
232
|
-
if (!field)
|
|
233
|
-
return false;
|
|
234
|
-
let sel = view.state.selection.main, next = field.diagnostics.iter(sel.to + 1);
|
|
235
|
-
if (!next.value) {
|
|
236
|
-
next = field.diagnostics.iter(0);
|
|
237
|
-
if (!next.value || next.from == sel.from && next.to == sel.to)
|
|
238
|
-
return false;
|
|
239
|
-
}
|
|
240
|
-
view.dispatch({ selection: { anchor: next.from, head: next.to }, scrollIntoView: true });
|
|
241
|
-
return true;
|
|
242
|
-
};
|
|
243
|
-
/**
|
|
244
|
-
A set of default key bindings for the lint functionality.
|
|
245
|
-
|
|
246
|
-
- Ctrl-Shift-m (Cmd-Shift-m on macOS): [`openLintPanel`](https://codemirror.net/6/docs/ref/#lint.openLintPanel)
|
|
247
|
-
- F8: [`nextDiagnostic`](https://codemirror.net/6/docs/ref/#lint.nextDiagnostic)
|
|
248
|
-
*/
|
|
249
|
-
const lintKeymap = [
|
|
250
|
-
{ key: "Mod-Shift-m", run: openLintPanel, preventDefault: true },
|
|
251
|
-
{ key: "F8", run: nextDiagnostic }
|
|
252
|
-
];
|
|
253
|
-
const lintConfig = /*@__PURE__*/Facet.define({
|
|
254
|
-
combine(input) {
|
|
255
|
-
return {
|
|
256
|
-
sources: input.map(i => i.source).filter(x => x != null),
|
|
257
|
-
...combineConfig(input.map(i => i.config), {
|
|
258
|
-
delay: 750,
|
|
259
|
-
markerFilter: null,
|
|
260
|
-
tooltipFilter: null,
|
|
261
|
-
needsRefresh: null,
|
|
262
|
-
hideOn: () => null,
|
|
263
|
-
}, {
|
|
264
|
-
delay: Math.max,
|
|
265
|
-
markerFilter: combineFilter,
|
|
266
|
-
tooltipFilter: combineFilter,
|
|
267
|
-
needsRefresh: (a, b) => !a ? b : !b ? a : u => a(u) || b(u),
|
|
268
|
-
hideOn: (a, b) => !a ? b : !b ? a : (t, x, y) => a(t, x, y) || b(t, x, y),
|
|
269
|
-
autoPanel: (a, b) => a || b
|
|
270
|
-
})
|
|
271
|
-
};
|
|
272
|
-
}
|
|
273
|
-
});
|
|
274
|
-
function combineFilter(a, b) {
|
|
275
|
-
return !a ? b : !b ? a : (d, s) => b(a(d, s), s);
|
|
276
|
-
}
|
|
277
|
-
function assignKeys(actions) {
|
|
278
|
-
let assigned = [];
|
|
279
|
-
if (actions)
|
|
280
|
-
actions: for (let { name } of actions) {
|
|
281
|
-
for (let i = 0; i < name.length; i++) {
|
|
282
|
-
let ch = name[i];
|
|
283
|
-
if (/[a-zA-Z]/.test(ch) && !assigned.some(c => c.toLowerCase() == ch.toLowerCase())) {
|
|
284
|
-
assigned.push(ch);
|
|
285
|
-
continue actions;
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
assigned.push("");
|
|
289
|
-
}
|
|
290
|
-
return assigned;
|
|
291
|
-
}
|
|
292
|
-
function renderDiagnostic(view, diagnostic, inPanel) {
|
|
293
|
-
var _a;
|
|
294
|
-
let keys = inPanel ? assignKeys(diagnostic.actions) : [];
|
|
295
|
-
return crelt("li", { class: "cm-diagnostic cm-diagnostic-" + diagnostic.severity }, crelt("span", { class: "cm-diagnosticText" }, diagnostic.renderMessage ? diagnostic.renderMessage(view) : diagnostic.message), (_a = diagnostic.actions) === null || _a === void 0 ? void 0 : _a.map((action, i) => {
|
|
296
|
-
let fired = false, click = (e) => {
|
|
297
|
-
e.preventDefault();
|
|
298
|
-
if (fired)
|
|
299
|
-
return;
|
|
300
|
-
fired = true;
|
|
301
|
-
let found = findDiagnostic(view.state.field(lintState).diagnostics, diagnostic);
|
|
302
|
-
if (found)
|
|
303
|
-
action.apply(view, found.from, found.to);
|
|
304
|
-
};
|
|
305
|
-
let { name } = action, keyIndex = keys[i] ? name.indexOf(keys[i]) : -1;
|
|
306
|
-
let nameElt = keyIndex < 0 ? name : [name.slice(0, keyIndex),
|
|
307
|
-
crelt("u", name.slice(keyIndex, keyIndex + 1)),
|
|
308
|
-
name.slice(keyIndex + 1)];
|
|
309
|
-
let markClass = action.markClass ? " " + action.markClass : "";
|
|
310
|
-
return crelt("button", {
|
|
311
|
-
type: "button",
|
|
312
|
-
class: "cm-diagnosticAction" + markClass,
|
|
313
|
-
onclick: click,
|
|
314
|
-
onmousedown: click,
|
|
315
|
-
"aria-label": ` Action: ${name}${keyIndex < 0 ? "" : ` (access key "${keys[i]})"`}.`
|
|
316
|
-
}, nameElt);
|
|
317
|
-
}), diagnostic.source && crelt("div", { class: "cm-diagnosticSource" }, diagnostic.source));
|
|
318
|
-
}
|
|
319
|
-
class DiagnosticWidget extends WidgetType {
|
|
320
|
-
constructor(sev) {
|
|
321
|
-
super();
|
|
322
|
-
this.sev = sev;
|
|
323
|
-
}
|
|
324
|
-
eq(other) { return other.sev == this.sev; }
|
|
325
|
-
toDOM() {
|
|
326
|
-
return crelt("span", { class: "cm-lintPoint cm-lintPoint-" + this.sev });
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
class PanelItem {
|
|
330
|
-
constructor(view, diagnostic) {
|
|
331
|
-
this.diagnostic = diagnostic;
|
|
332
|
-
this.id = "item_" + Math.floor(Math.random() * 0xffffffff).toString(16);
|
|
333
|
-
this.dom = renderDiagnostic(view, diagnostic, true);
|
|
334
|
-
this.dom.id = this.id;
|
|
335
|
-
this.dom.setAttribute("role", "option");
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
class LintPanel {
|
|
339
|
-
constructor(view) {
|
|
340
|
-
this.view = view;
|
|
341
|
-
this.items = [];
|
|
342
|
-
let onkeydown = (event) => {
|
|
343
|
-
if (event.keyCode == 27) { // Escape
|
|
344
|
-
closeLintPanel(this.view);
|
|
345
|
-
this.view.focus();
|
|
346
|
-
}
|
|
347
|
-
else if (event.keyCode == 38 || event.keyCode == 33) { // ArrowUp, PageUp
|
|
348
|
-
this.moveSelection((this.selectedIndex - 1 + this.items.length) % this.items.length);
|
|
349
|
-
}
|
|
350
|
-
else if (event.keyCode == 40 || event.keyCode == 34) { // ArrowDown, PageDown
|
|
351
|
-
this.moveSelection((this.selectedIndex + 1) % this.items.length);
|
|
352
|
-
}
|
|
353
|
-
else if (event.keyCode == 36) { // Home
|
|
354
|
-
this.moveSelection(0);
|
|
355
|
-
}
|
|
356
|
-
else if (event.keyCode == 35) { // End
|
|
357
|
-
this.moveSelection(this.items.length - 1);
|
|
358
|
-
}
|
|
359
|
-
else if (event.keyCode == 13) { // Enter
|
|
360
|
-
this.view.focus();
|
|
361
|
-
}
|
|
362
|
-
else if (event.keyCode >= 65 && event.keyCode <= 90 && this.selectedIndex >= 0) { // A-Z
|
|
363
|
-
let { diagnostic } = this.items[this.selectedIndex], keys = assignKeys(diagnostic.actions);
|
|
364
|
-
for (let i = 0; i < keys.length; i++)
|
|
365
|
-
if (keys[i].toUpperCase().charCodeAt(0) == event.keyCode) {
|
|
366
|
-
let found = findDiagnostic(this.view.state.field(lintState).diagnostics, diagnostic);
|
|
367
|
-
if (found)
|
|
368
|
-
diagnostic.actions[i].apply(view, found.from, found.to);
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
else {
|
|
372
|
-
return;
|
|
373
|
-
}
|
|
374
|
-
event.preventDefault();
|
|
375
|
-
};
|
|
376
|
-
let onclick = (event) => {
|
|
377
|
-
for (let i = 0; i < this.items.length; i++) {
|
|
378
|
-
if (this.items[i].dom.contains(event.target))
|
|
379
|
-
this.moveSelection(i);
|
|
380
|
-
}
|
|
381
|
-
};
|
|
382
|
-
this.list = crelt("ul", {
|
|
383
|
-
tabIndex: 0,
|
|
384
|
-
role: "listbox",
|
|
385
|
-
"aria-label": this.view.state.phrase("Diagnostics"),
|
|
386
|
-
onkeydown,
|
|
387
|
-
onclick
|
|
388
|
-
});
|
|
389
|
-
this.dom = crelt("div", { class: "cm-panel-lint" }, this.list, crelt("button", {
|
|
390
|
-
type: "button",
|
|
391
|
-
name: "close",
|
|
392
|
-
"aria-label": this.view.state.phrase("close"),
|
|
393
|
-
onclick: () => closeLintPanel(this.view)
|
|
394
|
-
}, "×"));
|
|
395
|
-
this.update();
|
|
396
|
-
}
|
|
397
|
-
get selectedIndex() {
|
|
398
|
-
let selected = this.view.state.field(lintState).selected;
|
|
399
|
-
if (!selected)
|
|
400
|
-
return -1;
|
|
401
|
-
for (let i = 0; i < this.items.length; i++)
|
|
402
|
-
if (this.items[i].diagnostic == selected.diagnostic)
|
|
403
|
-
return i;
|
|
404
|
-
return -1;
|
|
405
|
-
}
|
|
406
|
-
update() {
|
|
407
|
-
let { diagnostics, selected } = this.view.state.field(lintState);
|
|
408
|
-
let i = 0, needsSync = false, newSelectedItem = null;
|
|
409
|
-
let seen = new Set();
|
|
410
|
-
diagnostics.between(0, this.view.state.doc.length, (_start, _end, { spec }) => {
|
|
411
|
-
for (let diagnostic of spec.diagnostics) {
|
|
412
|
-
if (seen.has(diagnostic))
|
|
413
|
-
continue;
|
|
414
|
-
seen.add(diagnostic);
|
|
415
|
-
let found = -1, item;
|
|
416
|
-
for (let j = i; j < this.items.length; j++)
|
|
417
|
-
if (this.items[j].diagnostic == diagnostic) {
|
|
418
|
-
found = j;
|
|
419
|
-
break;
|
|
420
|
-
}
|
|
421
|
-
if (found < 0) {
|
|
422
|
-
item = new PanelItem(this.view, diagnostic);
|
|
423
|
-
this.items.splice(i, 0, item);
|
|
424
|
-
needsSync = true;
|
|
425
|
-
}
|
|
426
|
-
else {
|
|
427
|
-
item = this.items[found];
|
|
428
|
-
if (found > i) {
|
|
429
|
-
this.items.splice(i, found - i);
|
|
430
|
-
needsSync = true;
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
if (selected && item.diagnostic == selected.diagnostic) {
|
|
434
|
-
if (!item.dom.hasAttribute("aria-selected")) {
|
|
435
|
-
item.dom.setAttribute("aria-selected", "true");
|
|
436
|
-
newSelectedItem = item;
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
else if (item.dom.hasAttribute("aria-selected")) {
|
|
440
|
-
item.dom.removeAttribute("aria-selected");
|
|
441
|
-
}
|
|
442
|
-
i++;
|
|
443
|
-
}
|
|
444
|
-
});
|
|
445
|
-
while (i < this.items.length && !(this.items.length == 1 && this.items[0].diagnostic.from < 0)) {
|
|
446
|
-
needsSync = true;
|
|
447
|
-
this.items.pop();
|
|
448
|
-
}
|
|
449
|
-
if (this.items.length == 0) {
|
|
450
|
-
this.items.push(new PanelItem(this.view, {
|
|
451
|
-
from: -1, to: -1,
|
|
452
|
-
severity: "info",
|
|
453
|
-
message: this.view.state.phrase("No diagnostics")
|
|
454
|
-
}));
|
|
455
|
-
needsSync = true;
|
|
456
|
-
}
|
|
457
|
-
if (newSelectedItem) {
|
|
458
|
-
this.list.setAttribute("aria-activedescendant", newSelectedItem.id);
|
|
459
|
-
this.view.requestMeasure({
|
|
460
|
-
key: this,
|
|
461
|
-
read: () => ({ sel: newSelectedItem.dom.getBoundingClientRect(), panel: this.list.getBoundingClientRect() }),
|
|
462
|
-
write: ({ sel, panel }) => {
|
|
463
|
-
let scaleY = panel.height / this.list.offsetHeight;
|
|
464
|
-
if (sel.top < panel.top)
|
|
465
|
-
this.list.scrollTop -= (panel.top - sel.top) / scaleY;
|
|
466
|
-
else if (sel.bottom > panel.bottom)
|
|
467
|
-
this.list.scrollTop += (sel.bottom - panel.bottom) / scaleY;
|
|
468
|
-
}
|
|
469
|
-
});
|
|
470
|
-
}
|
|
471
|
-
else if (this.selectedIndex < 0) {
|
|
472
|
-
this.list.removeAttribute("aria-activedescendant");
|
|
473
|
-
}
|
|
474
|
-
if (needsSync)
|
|
475
|
-
this.sync();
|
|
476
|
-
}
|
|
477
|
-
sync() {
|
|
478
|
-
let domPos = this.list.firstChild;
|
|
479
|
-
function rm() {
|
|
480
|
-
let prev = domPos;
|
|
481
|
-
domPos = prev.nextSibling;
|
|
482
|
-
prev.remove();
|
|
483
|
-
}
|
|
484
|
-
for (let item of this.items) {
|
|
485
|
-
if (item.dom.parentNode == this.list) {
|
|
486
|
-
while (domPos != item.dom)
|
|
487
|
-
rm();
|
|
488
|
-
domPos = item.dom.nextSibling;
|
|
489
|
-
}
|
|
490
|
-
else {
|
|
491
|
-
this.list.insertBefore(item.dom, domPos);
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
while (domPos)
|
|
495
|
-
rm();
|
|
496
|
-
}
|
|
497
|
-
moveSelection(selectedIndex) {
|
|
498
|
-
if (this.selectedIndex < 0)
|
|
499
|
-
return;
|
|
500
|
-
let field = this.view.state.field(lintState);
|
|
501
|
-
let selection = findDiagnostic(field.diagnostics, this.items[selectedIndex].diagnostic);
|
|
502
|
-
if (!selection)
|
|
503
|
-
return;
|
|
504
|
-
this.view.dispatch({
|
|
505
|
-
selection: { anchor: selection.from, head: selection.to },
|
|
506
|
-
scrollIntoView: true,
|
|
507
|
-
effects: movePanelSelection.of(selection)
|
|
508
|
-
});
|
|
509
|
-
}
|
|
510
|
-
static open(view) { return new LintPanel(view); }
|
|
511
|
-
}
|
|
512
|
-
function svg(content, attrs = `viewBox="0 0 40 40"`) {
|
|
513
|
-
return `url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${attrs}>${encodeURIComponent(content)}</svg>')`;
|
|
514
|
-
}
|
|
515
|
-
function underline(color) {
|
|
516
|
-
return svg(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${color}" fill="none" stroke-width=".7"/>`, `width="6" height="3"`);
|
|
517
|
-
}
|
|
518
|
-
const baseTheme = /*@__PURE__*/EditorView.baseTheme({
|
|
519
|
-
".cm-diagnostic": {
|
|
520
|
-
padding: "3px 6px 3px 8px",
|
|
521
|
-
marginLeft: "-1px",
|
|
522
|
-
display: "block",
|
|
523
|
-
whiteSpace: "pre-wrap"
|
|
524
|
-
},
|
|
525
|
-
".cm-diagnostic-error": { borderLeft: "5px solid #d11" },
|
|
526
|
-
".cm-diagnostic-warning": { borderLeft: "5px solid orange" },
|
|
527
|
-
".cm-diagnostic-info": { borderLeft: "5px solid #999" },
|
|
528
|
-
".cm-diagnostic-hint": { borderLeft: "5px solid #66d" },
|
|
529
|
-
".cm-diagnosticAction": {
|
|
530
|
-
font: "inherit",
|
|
531
|
-
border: "none",
|
|
532
|
-
padding: "2px 4px",
|
|
533
|
-
backgroundColor: "#444",
|
|
534
|
-
color: "white",
|
|
535
|
-
borderRadius: "3px",
|
|
536
|
-
marginLeft: "8px",
|
|
537
|
-
cursor: "pointer"
|
|
538
|
-
},
|
|
539
|
-
".cm-diagnosticSource": {
|
|
540
|
-
fontSize: "70%",
|
|
541
|
-
opacity: .7
|
|
542
|
-
},
|
|
543
|
-
".cm-lintRange": {
|
|
544
|
-
backgroundPosition: "left bottom",
|
|
545
|
-
backgroundRepeat: "repeat-x",
|
|
546
|
-
paddingBottom: "0.7px",
|
|
547
|
-
},
|
|
548
|
-
".cm-lintRange-error": { backgroundImage: /*@__PURE__*/underline("#d11") },
|
|
549
|
-
".cm-lintRange-warning": { backgroundImage: /*@__PURE__*/underline("orange") },
|
|
550
|
-
".cm-lintRange-info": { backgroundImage: /*@__PURE__*/underline("#999") },
|
|
551
|
-
".cm-lintRange-hint": { backgroundImage: /*@__PURE__*/underline("#66d") },
|
|
552
|
-
".cm-lintRange-active": { backgroundColor: "#ffdd9980" },
|
|
553
|
-
".cm-tooltip-lint": {
|
|
554
|
-
padding: 0,
|
|
555
|
-
margin: 0
|
|
556
|
-
},
|
|
557
|
-
".cm-lintPoint": {
|
|
558
|
-
position: "relative",
|
|
559
|
-
"&:after": {
|
|
560
|
-
content: '""',
|
|
561
|
-
position: "absolute",
|
|
562
|
-
bottom: 0,
|
|
563
|
-
left: "-2px",
|
|
564
|
-
borderLeft: "3px solid transparent",
|
|
565
|
-
borderRight: "3px solid transparent",
|
|
566
|
-
borderBottom: "4px solid #d11"
|
|
567
|
-
}
|
|
568
|
-
},
|
|
569
|
-
".cm-lintPoint-warning": {
|
|
570
|
-
"&:after": { borderBottomColor: "orange" }
|
|
571
|
-
},
|
|
572
|
-
".cm-lintPoint-info": {
|
|
573
|
-
"&:after": { borderBottomColor: "#999" }
|
|
574
|
-
},
|
|
575
|
-
".cm-lintPoint-hint": {
|
|
576
|
-
"&:after": { borderBottomColor: "#66d" }
|
|
577
|
-
},
|
|
578
|
-
".cm-panel.cm-panel-lint": {
|
|
579
|
-
position: "relative",
|
|
580
|
-
"& ul": {
|
|
581
|
-
maxHeight: "100px",
|
|
582
|
-
overflowY: "auto",
|
|
583
|
-
"& [aria-selected]": {
|
|
584
|
-
backgroundColor: "#ddd",
|
|
585
|
-
"& u": { textDecoration: "underline" }
|
|
586
|
-
},
|
|
587
|
-
"&:focus [aria-selected]": {
|
|
588
|
-
background_fallback: "#bdf",
|
|
589
|
-
backgroundColor: "Highlight",
|
|
590
|
-
color_fallback: "white",
|
|
591
|
-
color: "HighlightText"
|
|
592
|
-
},
|
|
593
|
-
"& u": { textDecoration: "none" },
|
|
594
|
-
padding: 0,
|
|
595
|
-
margin: 0
|
|
596
|
-
},
|
|
597
|
-
"& [name=close]": {
|
|
598
|
-
position: "absolute",
|
|
599
|
-
top: "0",
|
|
600
|
-
right: "2px",
|
|
601
|
-
background: "inherit",
|
|
602
|
-
border: "none",
|
|
603
|
-
font: "inherit",
|
|
604
|
-
padding: 0,
|
|
605
|
-
margin: 0
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
});
|
|
609
|
-
function severityWeight(sev) {
|
|
610
|
-
return sev == "error" ? 4 : sev == "warning" ? 3 : sev == "info" ? 2 : 1;
|
|
611
|
-
}
|
|
612
|
-
function maxSeverity(diagnostics) {
|
|
613
|
-
let sev = "hint", weight = 1;
|
|
614
|
-
for (let d of diagnostics) {
|
|
615
|
-
let w = severityWeight(d.severity);
|
|
616
|
-
if (w > weight) {
|
|
617
|
-
weight = w;
|
|
618
|
-
sev = d.severity;
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
return sev;
|
|
622
|
-
}
|
|
623
|
-
const lintExtensions = [
|
|
624
|
-
lintState,
|
|
625
|
-
/*@__PURE__*/EditorView.decorations.compute([lintState], state => {
|
|
626
|
-
let { selected, panel } = state.field(lintState);
|
|
627
|
-
return !selected || !panel || selected.from == selected.to ? Decoration.none : Decoration.set([
|
|
628
|
-
activeMark.range(selected.from, selected.to)
|
|
629
|
-
]);
|
|
630
|
-
}),
|
|
631
|
-
/*@__PURE__*/hoverTooltip(lintTooltip, { hideOn: hideTooltip }),
|
|
632
|
-
baseTheme
|
|
633
|
-
];
|
|
634
|
-
|
|
635
|
-
export { closeLintPanel, lintKeymap, nextDiagnostic, openLintPanel, setDiagnosticsEffect };
|
|
636
|
-
//# sourceMappingURL=index.js.map
|