@walkeros/explorer 3.0.1 → 3.0.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/dist/__mocks__/@monaco-editor/react.d.ts +3 -0
- package/dist/__mocks__/@monaco-editor/react.d.ts.map +1 -0
- package/dist/__mocks__/@monaco-editor/react.js +4 -0
- package/dist/__mocks__/@monaco-editor/react.js.map +1 -0
- package/dist/components/atoms/box.d.ts +27 -0
- package/dist/components/atoms/box.d.ts.map +1 -0
- package/dist/components/atoms/box.js +86 -0
- package/dist/components/atoms/box.js.map +1 -0
- package/dist/components/atoms/box.stories.d.ts +34 -0
- package/dist/components/atoms/box.stories.d.ts.map +1 -0
- package/dist/components/atoms/box.stories.js +104 -0
- package/dist/components/atoms/box.stories.js.map +1 -0
- package/dist/components/atoms/button-group.d.ts +17 -0
- package/dist/components/atoms/button-group.d.ts.map +1 -0
- package/dist/components/atoms/button-group.js +12 -0
- package/dist/components/atoms/button-group.js.map +1 -0
- package/dist/components/atoms/button-group.stories.d.ts +18 -0
- package/dist/components/atoms/button-group.stories.d.ts.map +1 -0
- package/dist/components/atoms/button-group.stories.js +39 -0
- package/dist/components/atoms/button-group.stories.js.map +1 -0
- package/dist/components/atoms/button-link.d.ts +12 -0
- package/dist/components/atoms/button-link.d.ts.map +1 -0
- package/dist/components/atoms/button-link.js +10 -0
- package/dist/components/atoms/button-link.js.map +1 -0
- package/dist/components/atoms/button-link.stories.d.ts +11 -0
- package/dist/components/atoms/button-link.stories.d.ts.map +1 -0
- package/dist/components/atoms/button-link.stories.js +50 -0
- package/dist/components/atoms/button-link.stories.js.map +1 -0
- package/dist/components/atoms/button.d.ts +15 -0
- package/dist/components/atoms/button.d.ts.map +1 -0
- package/dist/components/atoms/button.js +11 -0
- package/dist/components/atoms/button.js.map +1 -0
- package/dist/components/atoms/button.stories.d.ts +14 -0
- package/dist/components/atoms/button.stories.d.ts.map +1 -0
- package/dist/components/atoms/button.stories.js +25 -0
- package/dist/components/atoms/button.stories.js.map +1 -0
- package/dist/components/atoms/code.d.ts +92 -0
- package/dist/components/atoms/code.d.ts.map +1 -0
- package/dist/components/atoms/code.js +405 -0
- package/dist/components/atoms/code.js.map +1 -0
- package/dist/components/atoms/code.stories.d.ts +46 -0
- package/dist/components/atoms/code.stories.d.ts.map +1 -0
- package/dist/components/atoms/code.stories.js +156 -0
- package/dist/components/atoms/code.stories.js.map +1 -0
- package/dist/components/atoms/footer.d.ts +21 -0
- package/dist/components/atoms/footer.d.ts.map +1 -0
- package/dist/components/atoms/footer.js +19 -0
- package/dist/components/atoms/footer.js.map +1 -0
- package/dist/components/atoms/footer.stories.d.ts +14 -0
- package/dist/components/atoms/footer.stories.d.ts.map +1 -0
- package/dist/components/atoms/footer.stories.js +29 -0
- package/dist/components/atoms/footer.stories.js.map +1 -0
- package/dist/components/atoms/grid.d.ts +65 -0
- package/dist/components/atoms/grid.d.ts.map +1 -0
- package/dist/components/atoms/grid.js +169 -0
- package/dist/components/atoms/grid.js.map +1 -0
- package/dist/components/atoms/grid.stories.d.ts +18 -0
- package/dist/components/atoms/grid.stories.d.ts.map +1 -0
- package/dist/components/atoms/grid.stories.js +60 -0
- package/dist/components/atoms/grid.stories.js.map +1 -0
- package/dist/components/atoms/header.d.ts +7 -0
- package/dist/components/atoms/header.d.ts.map +1 -0
- package/dist/components/atoms/header.js +5 -0
- package/dist/components/atoms/header.js.map +1 -0
- package/dist/components/atoms/header.stories.d.ts +15 -0
- package/dist/components/atoms/header.stories.d.ts.map +1 -0
- package/dist/components/atoms/header.stories.js +37 -0
- package/dist/components/atoms/header.stories.js.map +1 -0
- package/dist/components/atoms/icons/icon.stories.d.ts +18 -0
- package/dist/components/atoms/icons/icon.stories.d.ts.map +1 -0
- package/dist/components/atoms/icons/icon.stories.js +37 -0
- package/dist/components/atoms/icons/icon.stories.js.map +1 -0
- package/dist/components/atoms/icons/icons.d.ts +2 -0
- package/dist/components/atoms/icons/icons.d.ts.map +1 -0
- package/dist/components/atoms/icons/icons.js +7 -0
- package/dist/components/atoms/icons/icons.js.map +1 -0
- package/dist/components/atoms/icons/index.d.ts +3 -0
- package/dist/components/atoms/icons/index.d.ts.map +1 -0
- package/dist/components/atoms/icons/index.js +3 -0
- package/dist/components/atoms/icons/index.js.map +1 -0
- package/dist/components/atoms/mdx-code.d.ts +33 -0
- package/dist/components/atoms/mdx-code.d.ts.map +1 -0
- package/dist/components/atoms/mdx-code.js +69 -0
- package/dist/components/atoms/mdx-code.js.map +1 -0
- package/dist/components/atoms/preview-footer.d.ts +32 -0
- package/dist/components/atoms/preview-footer.d.ts.map +1 -0
- package/dist/components/atoms/preview-footer.js +31 -0
- package/dist/components/atoms/preview-footer.js.map +1 -0
- package/dist/components/atoms/spinner.d.ts +17 -0
- package/dist/components/atoms/spinner.d.ts.map +1 -0
- package/dist/components/atoms/spinner.js +14 -0
- package/dist/components/atoms/spinner.js.map +1 -0
- package/dist/components/atoms/spinner.stories.d.ts +7 -0
- package/dist/components/atoms/spinner.stories.d.ts.map +1 -0
- package/dist/components/atoms/spinner.stories.js +9 -0
- package/dist/components/atoms/spinner.stories.js.map +1 -0
- package/dist/components/atoms/toggle.d.ts +9 -0
- package/dist/components/atoms/toggle.d.ts.map +1 -0
- package/dist/components/atoms/toggle.js +6 -0
- package/dist/components/atoms/toggle.js.map +1 -0
- package/dist/components/demos/DestinationDemo.d.ts +48 -0
- package/dist/components/demos/DestinationDemo.d.ts.map +1 -0
- package/dist/components/demos/DestinationDemo.js +105 -0
- package/dist/components/demos/DestinationDemo.js.map +1 -0
- package/dist/components/demos/DestinationDemo.stories.d.ts +17 -0
- package/dist/components/demos/DestinationDemo.stories.d.ts.map +1 -0
- package/dist/components/demos/DestinationDemo.stories.js +53 -0
- package/dist/components/demos/DestinationDemo.stories.js.map +1 -0
- package/dist/components/demos/DestinationInitDemo.d.ts +34 -0
- package/dist/components/demos/DestinationInitDemo.d.ts.map +1 -0
- package/dist/components/demos/DestinationInitDemo.js +73 -0
- package/dist/components/demos/DestinationInitDemo.js.map +1 -0
- package/dist/components/demos/DestinationInitDemo.stories.d.ts +17 -0
- package/dist/components/demos/DestinationInitDemo.stories.d.ts.map +1 -0
- package/dist/components/demos/DestinationInitDemo.stories.js +39 -0
- package/dist/components/demos/DestinationInitDemo.stories.js.map +1 -0
- package/dist/components/demos/PromotionPlayground.d.ts +30 -0
- package/dist/components/demos/PromotionPlayground.d.ts.map +1 -0
- package/dist/components/demos/PromotionPlayground.js +366 -0
- package/dist/components/demos/PromotionPlayground.js.map +1 -0
- package/dist/components/demos/PromotionPlayground.stories.d.ts +27 -0
- package/dist/components/demos/PromotionPlayground.stories.d.ts.map +1 -0
- package/dist/components/demos/PromotionPlayground.stories.js +32 -0
- package/dist/components/demos/PromotionPlayground.stories.js.map +1 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.d.ts +24 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.d.ts.map +1 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.js +10 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.js.map +1 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.stories.d.ts +7 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.stories.d.ts.map +1 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.stories.js +71 -0
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.stories.js.map +1 -0
- package/dist/components/molecules/architecture-flow/index.d.ts +3 -0
- package/dist/components/molecules/architecture-flow/index.d.ts.map +1 -0
- package/dist/components/molecules/architecture-flow/index.js +2 -0
- package/dist/components/molecules/architecture-flow/index.js.map +1 -0
- package/dist/components/molecules/code-box.d.ts +75 -0
- package/dist/components/molecules/code-box.d.ts.map +1 -0
- package/dist/components/molecules/code-box.js +174 -0
- package/dist/components/molecules/code-box.js.map +1 -0
- package/dist/components/molecules/code-box.stories.d.ts +87 -0
- package/dist/components/molecules/code-box.stories.d.ts.map +1 -0
- package/dist/components/molecules/code-box.stories.js +300 -0
- package/dist/components/molecules/code-box.stories.js.map +1 -0
- package/dist/components/molecules/code-snippet.d.ts +58 -0
- package/dist/components/molecules/code-snippet.d.ts.map +1 -0
- package/dist/components/molecules/code-snippet.js +72 -0
- package/dist/components/molecules/code-snippet.js.map +1 -0
- package/dist/components/molecules/code-snippet.stories.d.ts +23 -0
- package/dist/components/molecules/code-snippet.stories.d.ts.map +1 -0
- package/dist/components/molecules/code-snippet.stories.js +87 -0
- package/dist/components/molecules/code-snippet.stories.js.map +1 -0
- package/dist/components/molecules/dropdown.d.ts +68 -0
- package/dist/components/molecules/dropdown.d.ts.map +1 -0
- package/dist/components/molecules/dropdown.js +47 -0
- package/dist/components/molecules/dropdown.js.map +1 -0
- package/dist/components/molecules/dropdown.stories.d.ts +7 -0
- package/dist/components/molecules/dropdown.stories.d.ts.map +1 -0
- package/dist/components/molecules/dropdown.stories.js +18 -0
- package/dist/components/molecules/dropdown.stories.js.map +1 -0
- package/dist/components/molecules/flow-map/FlowMap.d.ts +74 -0
- package/dist/components/molecules/flow-map/FlowMap.d.ts.map +1 -0
- package/dist/components/molecules/flow-map/FlowMap.js +1039 -0
- package/dist/components/molecules/flow-map/FlowMap.js.map +1 -0
- package/dist/components/molecules/flow-map/FlowMap.stories.d.ts +47 -0
- package/dist/components/molecules/flow-map/FlowMap.stories.d.ts.map +1 -0
- package/dist/components/molecules/flow-map/FlowMap.stories.js +355 -0
- package/dist/components/molecules/flow-map/FlowMap.stories.js.map +1 -0
- package/dist/components/molecules/flow-map/FlowMap.transformers.stories.d.ts +29 -0
- package/dist/components/molecules/flow-map/FlowMap.transformers.stories.d.ts.map +1 -0
- package/dist/components/molecules/flow-map/FlowMap.transformers.stories.js +117 -0
- package/dist/components/molecules/flow-map/FlowMap.transformers.stories.js.map +1 -0
- package/dist/components/molecules/flow-map/index.d.ts +3 -0
- package/dist/components/molecules/flow-map/index.d.ts.map +1 -0
- package/dist/components/molecules/flow-map/index.js +2 -0
- package/dist/components/molecules/flow-map/index.js.map +1 -0
- package/dist/components/molecules/preview.d.ts +23 -0
- package/dist/components/molecules/preview.d.ts.map +1 -0
- package/dist/components/molecules/preview.js +232 -0
- package/dist/components/molecules/preview.js.map +1 -0
- package/dist/components/molecules/preview.stories.d.ts +23 -0
- package/dist/components/molecules/preview.stories.d.ts.map +1 -0
- package/dist/components/molecules/preview.stories.js +186 -0
- package/dist/components/molecules/preview.stories.js.map +1 -0
- package/dist/components/molecules/property-table.d.ts +7 -0
- package/dist/components/molecules/property-table.d.ts.map +1 -0
- package/dist/components/molecules/property-table.js +88 -0
- package/dist/components/molecules/property-table.js.map +1 -0
- package/dist/components/molecules/property-table.stories.d.ts +24 -0
- package/dist/components/molecules/property-table.stories.d.ts.map +1 -0
- package/dist/components/molecules/property-table.stories.js +86 -0
- package/dist/components/molecules/property-table.stories.js.map +1 -0
- package/dist/components/organisms/browser-box.d.ts +31 -0
- package/dist/components/organisms/browser-box.d.ts.map +1 -0
- package/dist/components/organisms/browser-box.js +80 -0
- package/dist/components/organisms/browser-box.js.map +1 -0
- package/dist/components/organisms/browser-box.stories.d.ts +26 -0
- package/dist/components/organisms/browser-box.stories.d.ts.map +1 -0
- package/dist/components/organisms/browser-box.stories.js +102 -0
- package/dist/components/organisms/browser-box.stories.js.map +1 -0
- package/dist/components/organisms/collector-box.d.ts +24 -0
- package/dist/components/organisms/collector-box.d.ts.map +1 -0
- package/dist/components/organisms/collector-box.js +56 -0
- package/dist/components/organisms/collector-box.js.map +1 -0
- package/dist/components/organisms/collector-box.stories.d.ts +22 -0
- package/dist/components/organisms/collector-box.stories.d.ts.map +1 -0
- package/dist/components/organisms/collector-box.stories.js +59 -0
- package/dist/components/organisms/collector-box.stories.js.map +1 -0
- package/dist/components/organisms/live-code.d.ts +22 -0
- package/dist/components/organisms/live-code.d.ts.map +1 -0
- package/dist/components/organisms/live-code.js +50 -0
- package/dist/components/organisms/live-code.js.map +1 -0
- package/dist/components/organisms/live-code.stories.d.ts +24 -0
- package/dist/components/organisms/live-code.stories.d.ts.map +1 -0
- package/dist/components/organisms/live-code.stories.js +55 -0
- package/dist/components/organisms/live-code.stories.js.map +1 -0
- package/dist/components/ui/button.d.ts +4 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +6 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/icon.d.ts +5 -0
- package/dist/components/ui/icon.d.ts.map +1 -0
- package/dist/components/ui/icon.js +5 -0
- package/dist/components/ui/icon.js.map +1 -0
- package/dist/contexts/GridHeightContext.d.ts +11 -0
- package/dist/contexts/GridHeightContext.d.ts.map +1 -0
- package/dist/contexts/GridHeightContext.js +14 -0
- package/dist/contexts/GridHeightContext.js.map +1 -0
- package/dist/helpers/capture.d.ts +83 -0
- package/dist/helpers/capture.d.ts.map +1 -0
- package/dist/helpers/capture.js +125 -0
- package/dist/helpers/capture.js.map +1 -0
- package/dist/helpers/destinations.d.ts +21 -0
- package/dist/helpers/destinations.d.ts.map +1 -0
- package/dist/helpers/destinations.js +46 -0
- package/dist/helpers/destinations.js.map +1 -0
- package/dist/hooks/useDropdown.d.ts +34 -0
- package/dist/hooks/useDropdown.d.ts.map +1 -0
- package/dist/hooks/useDropdown.js +66 -0
- package/dist/hooks/useDropdown.js.map +1 -0
- package/dist/hooks/useMonacoHeight.d.ts +31 -0
- package/dist/hooks/useMonacoHeight.d.ts.map +1 -0
- package/dist/hooks/useMonacoHeight.js +83 -0
- package/dist/hooks/useMonacoHeight.js.map +1 -0
- package/dist/hooks/useTreeState.d.ts +32 -0
- package/dist/hooks/useTreeState.d.ts.map +1 -0
- package/dist/hooks/useTreeState.js +94 -0
- package/dist/hooks/useTreeState.js.map +1 -0
- package/dist/index.d.ts +69 -1338
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +59 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/utils.d.ts +7 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +10 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/providers/MDXProvider.d.ts +40 -0
- package/dist/providers/MDXProvider.d.ts.map +1 -0
- package/dist/providers/MDXProvider.js +57 -0
- package/dist/providers/MDXProvider.js.map +1 -0
- package/dist/themes/index.d.ts +23 -0
- package/dist/themes/index.d.ts.map +1 -0
- package/dist/themes/index.js +29 -0
- package/dist/themes/index.js.map +1 -0
- package/dist/themes/lighthouse.d.ts +26 -0
- package/dist/themes/lighthouse.d.ts.map +1 -0
- package/dist/themes/lighthouse.js +230 -0
- package/dist/themes/lighthouse.js.map +1 -0
- package/dist/themes/palenight.d.ts +31 -0
- package/dist/themes/palenight.d.ts.map +1 -0
- package/dist/themes/palenight.js +236 -0
- package/dist/themes/palenight.js.map +1 -0
- package/dist/themes/types.d.ts +103 -0
- package/dist/themes/types.d.ts.map +1 -0
- package/dist/themes/types.js +8 -0
- package/dist/themes/types.js.map +1 -0
- package/dist/types/intellisense.d.ts +33 -0
- package/dist/types/intellisense.d.ts.map +1 -0
- package/dist/types/intellisense.js +2 -0
- package/dist/types/intellisense.js.map +1 -0
- package/dist/utils/code-normalizer.d.ts +11 -0
- package/dist/utils/code-normalizer.d.ts.map +1 -0
- package/dist/utils/code-normalizer.js +21 -0
- package/dist/utils/code-normalizer.js.map +1 -0
- package/dist/utils/contract-path-walker.d.ts +27 -0
- package/dist/utils/contract-path-walker.d.ts.map +1 -0
- package/dist/utils/contract-path-walker.js +145 -0
- package/dist/utils/contract-path-walker.js.map +1 -0
- package/dist/utils/format-code.d.ts +9 -0
- package/dist/utils/format-code.d.ts.map +1 -0
- package/dist/utils/format-code.js +77 -0
- package/dist/utils/format-code.js.map +1 -0
- package/dist/utils/mapping-context-detector.d.ts +17 -0
- package/dist/utils/mapping-context-detector.d.ts.map +1 -0
- package/dist/utils/mapping-context-detector.js +22 -0
- package/dist/utils/mapping-context-detector.js.map +1 -0
- package/dist/utils/monaco-context-types.d.ts +39 -0
- package/dist/utils/monaco-context-types.d.ts.map +1 -0
- package/dist/utils/monaco-context-types.js +426 -0
- package/dist/utils/monaco-context-types.js.map +1 -0
- package/dist/utils/monaco-decorators.d.ts +17 -0
- package/dist/utils/monaco-decorators.d.ts.map +1 -0
- package/dist/utils/monaco-decorators.js +81 -0
- package/dist/utils/monaco-decorators.js.map +1 -0
- package/dist/utils/monaco-formatters.d.ts +16 -0
- package/dist/utils/monaco-formatters.d.ts.map +1 -0
- package/dist/utils/monaco-formatters.js +139 -0
- package/dist/utils/monaco-formatters.js.map +1 -0
- package/dist/utils/monaco-intellisense-flow-extractor.d.ts +13 -0
- package/dist/utils/monaco-intellisense-flow-extractor.d.ts.map +1 -0
- package/dist/utils/monaco-intellisense-flow-extractor.js +168 -0
- package/dist/utils/monaco-intellisense-flow-extractor.js.map +1 -0
- package/dist/utils/monaco-json-path.d.ts +12 -0
- package/dist/utils/monaco-json-path.d.ts.map +1 -0
- package/dist/utils/monaco-json-path.js +68 -0
- package/dist/utils/monaco-json-path.js.map +1 -0
- package/dist/utils/monaco-json-schema.d.ts +45 -0
- package/dist/utils/monaco-json-schema.d.ts.map +1 -0
- package/dist/utils/monaco-json-schema.js +90 -0
- package/dist/utils/monaco-json-schema.js.map +1 -0
- package/dist/utils/monaco-schema-contract.d.ts +8 -0
- package/dist/utils/monaco-schema-contract.d.ts.map +1 -0
- package/dist/utils/monaco-schema-contract.js +73 -0
- package/dist/utils/monaco-schema-contract.js.map +1 -0
- package/dist/utils/monaco-schema-enrichment.d.ts +26 -0
- package/dist/utils/monaco-schema-enrichment.d.ts.map +1 -0
- package/dist/utils/monaco-schema-enrichment.js +31 -0
- package/dist/utils/monaco-schema-enrichment.js.map +1 -0
- package/dist/utils/monaco-schema-flow-config.d.ts +10 -0
- package/dist/utils/monaco-schema-flow-config.d.ts.map +1 -0
- package/dist/utils/monaco-schema-flow-config.js +201 -0
- package/dist/utils/monaco-schema-flow-config.js.map +1 -0
- package/dist/utils/monaco-schema-variables.d.ts +4 -0
- package/dist/utils/monaco-schema-variables.d.ts.map +1 -0
- package/dist/utils/monaco-schema-variables.js +26 -0
- package/dist/utils/monaco-schema-variables.js.map +1 -0
- package/dist/utils/monaco-types.d.ts +174 -0
- package/dist/utils/monaco-types.d.ts.map +1 -0
- package/dist/utils/monaco-types.js +378 -0
- package/dist/utils/monaco-types.js.map +1 -0
- package/dist/utils/monaco-walkeros-completions.d.ts +23 -0
- package/dist/utils/monaco-walkeros-completions.d.ts.map +1 -0
- package/dist/utils/monaco-walkeros-completions.js +258 -0
- package/dist/utils/monaco-walkeros-completions.js.map +1 -0
- package/dist/utils/monaco-walkeros-decorations.d.ts +29 -0
- package/dist/utils/monaco-walkeros-decorations.d.ts.map +1 -0
- package/dist/utils/monaco-walkeros-decorations.js +87 -0
- package/dist/utils/monaco-walkeros-decorations.js.map +1 -0
- package/dist/utils/monaco-walkeros-markers.d.ts +13 -0
- package/dist/utils/monaco-walkeros-markers.d.ts.map +1 -0
- package/dist/utils/monaco-walkeros-markers.js +69 -0
- package/dist/utils/monaco-walkeros-markers.js.map +1 -0
- package/dist/utils/monaco-walkeros-providers.d.ts +19 -0
- package/dist/utils/monaco-walkeros-providers.d.ts.map +1 -0
- package/dist/utils/monaco-walkeros-providers.js +284 -0
- package/dist/utils/monaco-walkeros-providers.js.map +1 -0
- package/dist/utils/path-analyzer.d.ts +88 -0
- package/dist/utils/path-analyzer.d.ts.map +1 -0
- package/dist/utils/path-analyzer.js +215 -0
- package/dist/utils/path-analyzer.js.map +1 -0
- package/package.json +6 -6
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { getContractPathCompletions } from './contract-path-walker';
|
|
2
|
+
export function getVariableCompletions(variables) {
|
|
3
|
+
if (!variables || Object.keys(variables).length === 0)
|
|
4
|
+
return [];
|
|
5
|
+
return Object.entries(variables).map(([name, value]) => ({
|
|
6
|
+
label: `$var.${name}`,
|
|
7
|
+
insertText: `$var.${name}`,
|
|
8
|
+
detail: `= ${JSON.stringify(value)}`,
|
|
9
|
+
documentation: `Variable reference. Resolves to \`${JSON.stringify(value)}\` at runtime.`,
|
|
10
|
+
kind: 'variable',
|
|
11
|
+
sortText: '0_var_' + name,
|
|
12
|
+
}));
|
|
13
|
+
}
|
|
14
|
+
export function getDefinitionCompletions(definitions) {
|
|
15
|
+
if (!definitions || Object.keys(definitions).length === 0)
|
|
16
|
+
return [];
|
|
17
|
+
return Object.keys(definitions).map((name) => ({
|
|
18
|
+
label: `$def.${name}`,
|
|
19
|
+
insertText: `$def.${name}`,
|
|
20
|
+
detail: '(definition)',
|
|
21
|
+
documentation: `Definition reference. Injects the reusable config fragment "${name}" at runtime.`,
|
|
22
|
+
kind: 'reference',
|
|
23
|
+
sortText: '0_def_' + name,
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
export function getSecretCompletions(secrets) {
|
|
27
|
+
if (!secrets || secrets.length === 0)
|
|
28
|
+
return [];
|
|
29
|
+
return secrets.map((name) => ({
|
|
30
|
+
label: `$secret.${name}`,
|
|
31
|
+
insertText: `$secret.${name}`,
|
|
32
|
+
detail: '(secret)',
|
|
33
|
+
documentation: 'Secret reference. Value is securely injected at runtime. Never stored in config.',
|
|
34
|
+
kind: 'secret',
|
|
35
|
+
sortText: '0_secret_' + name,
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
export function getPackageCompletions(packages, platform) {
|
|
39
|
+
if (!packages || packages.length === 0)
|
|
40
|
+
return [];
|
|
41
|
+
const filtered = platform
|
|
42
|
+
? packages.filter((p) => p.platform === platform)
|
|
43
|
+
: packages;
|
|
44
|
+
return filtered.map((pkg) => ({
|
|
45
|
+
label: pkg.package,
|
|
46
|
+
insertText: pkg.package,
|
|
47
|
+
detail: `${pkg.type} (${pkg.platform})`,
|
|
48
|
+
documentation: `walkerOS ${pkg.type}: ${pkg.shortName}`,
|
|
49
|
+
kind: 'module',
|
|
50
|
+
sortText: '1_pkg_' + pkg.shortName,
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
export function getStepNameCompletions(stepNames, context) {
|
|
54
|
+
if (!stepNames)
|
|
55
|
+
return [];
|
|
56
|
+
const names = stepNames.transformers || [];
|
|
57
|
+
return names.map((name) => ({
|
|
58
|
+
label: name,
|
|
59
|
+
insertText: name,
|
|
60
|
+
detail: `transformer (${context} chain)`,
|
|
61
|
+
documentation: `Reference to transformer step "${name}" in this flow config.`,
|
|
62
|
+
kind: 'reference',
|
|
63
|
+
sortText: '0_step_' + name,
|
|
64
|
+
}));
|
|
65
|
+
}
|
|
66
|
+
/** Top-level WalkerOS event fields available in mapping values */
|
|
67
|
+
const EVENT_ROOT_FIELDS = [
|
|
68
|
+
{
|
|
69
|
+
label: 'data',
|
|
70
|
+
insertText: 'data',
|
|
71
|
+
detail: '(event data)',
|
|
72
|
+
kind: 'property',
|
|
73
|
+
sortText: '0_event_data',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
label: 'globals',
|
|
77
|
+
insertText: 'globals',
|
|
78
|
+
detail: '(global properties)',
|
|
79
|
+
kind: 'property',
|
|
80
|
+
sortText: '0_event_globals',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
label: 'user',
|
|
84
|
+
insertText: 'user',
|
|
85
|
+
detail: '(user properties)',
|
|
86
|
+
kind: 'property',
|
|
87
|
+
sortText: '0_event_user',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
label: 'context',
|
|
91
|
+
insertText: 'context',
|
|
92
|
+
detail: '(context data)',
|
|
93
|
+
kind: 'property',
|
|
94
|
+
sortText: '0_event_context',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
label: 'custom',
|
|
98
|
+
insertText: 'custom',
|
|
99
|
+
detail: '(custom properties)',
|
|
100
|
+
kind: 'property',
|
|
101
|
+
sortText: '0_event_custom',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
label: 'consent',
|
|
105
|
+
insertText: 'consent',
|
|
106
|
+
detail: '(consent state)',
|
|
107
|
+
kind: 'property',
|
|
108
|
+
sortText: '0_event_consent',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
label: 'nested',
|
|
112
|
+
insertText: 'nested',
|
|
113
|
+
detail: '(nested entities)',
|
|
114
|
+
kind: 'property',
|
|
115
|
+
sortText: '0_event_nested',
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
label: 'entity',
|
|
119
|
+
insertText: 'entity',
|
|
120
|
+
detail: '(string)',
|
|
121
|
+
kind: 'property',
|
|
122
|
+
sortText: '1_event_entity',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
label: 'action',
|
|
126
|
+
insertText: 'action',
|
|
127
|
+
detail: '(string)',
|
|
128
|
+
kind: 'property',
|
|
129
|
+
sortText: '1_event_action',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
label: 'name',
|
|
133
|
+
insertText: 'name',
|
|
134
|
+
detail: '(string)',
|
|
135
|
+
kind: 'property',
|
|
136
|
+
sortText: '1_event_name',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
label: 'trigger',
|
|
140
|
+
insertText: 'trigger',
|
|
141
|
+
detail: '(string)',
|
|
142
|
+
kind: 'property',
|
|
143
|
+
sortText: '1_event_trigger',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
label: 'timestamp',
|
|
147
|
+
insertText: 'timestamp',
|
|
148
|
+
detail: '(number)',
|
|
149
|
+
kind: 'property',
|
|
150
|
+
sortText: '1_event_timestamp',
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
label: 'timing',
|
|
154
|
+
insertText: 'timing',
|
|
155
|
+
detail: '(number)',
|
|
156
|
+
kind: 'property',
|
|
157
|
+
sortText: '1_event_timing',
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
label: 'id',
|
|
161
|
+
insertText: 'id',
|
|
162
|
+
detail: '(string)',
|
|
163
|
+
kind: 'property',
|
|
164
|
+
sortText: '1_event_id',
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
label: 'group',
|
|
168
|
+
insertText: 'group',
|
|
169
|
+
detail: '(string)',
|
|
170
|
+
kind: 'property',
|
|
171
|
+
sortText: '1_event_group',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
label: 'count',
|
|
175
|
+
insertText: 'count',
|
|
176
|
+
detail: '(number)',
|
|
177
|
+
kind: 'property',
|
|
178
|
+
sortText: '1_event_count',
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
label: 'source',
|
|
182
|
+
insertText: 'source',
|
|
183
|
+
detail: '(source info)',
|
|
184
|
+
kind: 'property',
|
|
185
|
+
sortText: '1_event_source',
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
label: 'version',
|
|
189
|
+
insertText: 'version',
|
|
190
|
+
detail: '(version info)',
|
|
191
|
+
kind: 'property',
|
|
192
|
+
sortText: '1_event_version',
|
|
193
|
+
},
|
|
194
|
+
];
|
|
195
|
+
/**
|
|
196
|
+
* Get mapping value path completions based on contract schemas.
|
|
197
|
+
*
|
|
198
|
+
* When typing "data." inside a mapping rule for entity "page" action "view",
|
|
199
|
+
* this returns the properties defined in the contract for page.view.
|
|
200
|
+
*/
|
|
201
|
+
export function getMappingPathCompletions(contractRaw, entity, action, prefix) {
|
|
202
|
+
if (!prefix)
|
|
203
|
+
return EVENT_ROOT_FIELDS;
|
|
204
|
+
if (!contractRaw || Object.keys(contractRaw).length === 0)
|
|
205
|
+
return [];
|
|
206
|
+
const sectionMap = {
|
|
207
|
+
data: 'events',
|
|
208
|
+
globals: 'globals',
|
|
209
|
+
context: 'context',
|
|
210
|
+
custom: 'custom',
|
|
211
|
+
user: 'user',
|
|
212
|
+
consent: 'consent',
|
|
213
|
+
};
|
|
214
|
+
const section = sectionMap[prefix];
|
|
215
|
+
if (!section)
|
|
216
|
+
return [];
|
|
217
|
+
const allCompletions = [];
|
|
218
|
+
const seen = new Set();
|
|
219
|
+
for (const contractName of Object.keys(contractRaw)) {
|
|
220
|
+
const pathSegments = section === 'events'
|
|
221
|
+
? [contractName, 'events', entity, action]
|
|
222
|
+
: [contractName, section];
|
|
223
|
+
const completions = getContractPathCompletions(contractRaw, pathSegments);
|
|
224
|
+
for (const c of completions) {
|
|
225
|
+
if (seen.has(c.key))
|
|
226
|
+
continue;
|
|
227
|
+
seen.add(c.key);
|
|
228
|
+
allCompletions.push({
|
|
229
|
+
label: `${prefix}.${c.key}`,
|
|
230
|
+
insertText: `${prefix}.${c.key}`,
|
|
231
|
+
detail: c.type ? `(${c.type})` : '(property)',
|
|
232
|
+
documentation: `Event property from contract. Maps to event.${prefix}.${c.key}.`,
|
|
233
|
+
kind: 'property',
|
|
234
|
+
sortText: `0_mapping_${c.key}`,
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return allCompletions;
|
|
239
|
+
}
|
|
240
|
+
export function getContractCompletions(contractRaw, pathSegments) {
|
|
241
|
+
if (!contractRaw || Object.keys(contractRaw).length === 0)
|
|
242
|
+
return [];
|
|
243
|
+
const completions = getContractPathCompletions(contractRaw, pathSegments);
|
|
244
|
+
const prefix = pathSegments.length > 0
|
|
245
|
+
? `$contract.${pathSegments.join('.')}.`
|
|
246
|
+
: '$contract.';
|
|
247
|
+
return completions.map((c) => ({
|
|
248
|
+
label: `${prefix}${c.key}`.replace(/\.$/, ''),
|
|
249
|
+
insertText: pathSegments.length === 0
|
|
250
|
+
? `$contract.${c.key}`
|
|
251
|
+
: `$contract.${pathSegments.join('.')}.${c.key}`,
|
|
252
|
+
detail: c.type ? `(${c.type})` : c.detail ? `(${c.detail})` : '(contract)',
|
|
253
|
+
documentation: `Contract reference. Resolves to the ${c.key} ${c.detail || 'value'} at runtime.`,
|
|
254
|
+
kind: 'property',
|
|
255
|
+
sortText: '0_contract_' + pathSegments.concat(c.key).join('_'),
|
|
256
|
+
}));
|
|
257
|
+
}
|
|
258
|
+
//# sourceMappingURL=monaco-walkeros-completions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file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,EAAE,GAAG,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;QAC7C,UAAU,EACR,YAAY,CAAC,MAAM,KAAK,CAAC;YACvB,CAAC,CAAC,aAAa,CAAC,CAAC,GAAG,EAAE;YACtB,CAAC,CAAC,aAAa,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE;QACpD,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,YAAY;QAC1E,aAAa,EAAE,uCAAuC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,MAAM,IAAI,OAAO,cAAc;QAChG,IAAI,EAAE,UAAmB;QACzB,QAAQ,EAAE,aAAa,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;KAC/D,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { editor } from 'monaco-editor';
|
|
2
|
+
export type ReferenceType = 'variable' | 'definition' | 'secret' | 'env' | 'code';
|
|
3
|
+
export interface WalkerOSReference {
|
|
4
|
+
type: ReferenceType;
|
|
5
|
+
name: string;
|
|
6
|
+
startIndex: number;
|
|
7
|
+
endIndex: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const REFERENCE_PATTERNS: Array<{
|
|
10
|
+
type: ReferenceType;
|
|
11
|
+
regex: RegExp;
|
|
12
|
+
className: string;
|
|
13
|
+
}>;
|
|
14
|
+
/**
|
|
15
|
+
* Find all walkerOS reference patterns in text.
|
|
16
|
+
* Used for both decorations and validation.
|
|
17
|
+
*/
|
|
18
|
+
export declare function findWalkerOSReferences(text: string): WalkerOSReference[];
|
|
19
|
+
/**
|
|
20
|
+
* Apply walkerOS reference decorations to a Monaco editor.
|
|
21
|
+
* Returns a cleanup function.
|
|
22
|
+
*/
|
|
23
|
+
export declare function applyWalkerOSDecorations(editorInstance: editor.IStandaloneCodeEditor): () => void;
|
|
24
|
+
/**
|
|
25
|
+
* Register CSS styles for walkerOS reference decorations.
|
|
26
|
+
* Call once on app init.
|
|
27
|
+
*/
|
|
28
|
+
export declare function registerWalkerOSDecorationStyles(): void;
|
|
29
|
+
//# sourceMappingURL=monaco-walkeros-decorations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monaco-walkeros-decorations.d.ts","sourceRoot":"","sources":["../../src/utils/monaco-walkeros-decorations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,MAAM,aAAa,GACrB,UAAU,GACV,YAAY,GACZ,QAAQ,GACR,KAAK,GACL,MAAM,CAAC;AAEX,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC;IACrC,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAUA,CAAC;AAEF;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,EAAE,CAiBxE;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,cAAc,EAAE,MAAM,CAAC,qBAAqB,GAC3C,MAAM,IAAI,CAsCZ;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,IAAI,IAAI,CAcvD"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export const REFERENCE_PATTERNS = [
|
|
2
|
+
{ type: 'variable', regex: /\$var\.(\w*)/g, className: 'elb-ref-variable' },
|
|
3
|
+
{
|
|
4
|
+
type: 'definition',
|
|
5
|
+
regex: /\$def\.(\w*)/g,
|
|
6
|
+
className: 'elb-ref-definition',
|
|
7
|
+
},
|
|
8
|
+
{ type: 'secret', regex: /\$secret\.(\w*)/g, className: 'elb-ref-secret' },
|
|
9
|
+
{ type: 'env', regex: /\$env\.(\w*)/g, className: 'elb-ref-env' },
|
|
10
|
+
{ type: 'code', regex: /\$code:/g, className: 'elb-ref-code' },
|
|
11
|
+
];
|
|
12
|
+
/**
|
|
13
|
+
* Find all walkerOS reference patterns in text.
|
|
14
|
+
* Used for both decorations and validation.
|
|
15
|
+
*/
|
|
16
|
+
export function findWalkerOSReferences(text) {
|
|
17
|
+
const references = [];
|
|
18
|
+
for (const pattern of REFERENCE_PATTERNS) {
|
|
19
|
+
const regex = new RegExp(pattern.regex.source, pattern.regex.flags);
|
|
20
|
+
let match;
|
|
21
|
+
while ((match = regex.exec(text)) !== null) {
|
|
22
|
+
references.push({
|
|
23
|
+
type: pattern.type,
|
|
24
|
+
name: pattern.type === 'code' ? '' : match[1] || '',
|
|
25
|
+
startIndex: match.index,
|
|
26
|
+
endIndex: match.index + match[0].length,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return references;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Apply walkerOS reference decorations to a Monaco editor.
|
|
34
|
+
* Returns a cleanup function.
|
|
35
|
+
*/
|
|
36
|
+
export function applyWalkerOSDecorations(editorInstance) {
|
|
37
|
+
let decorationIds = [];
|
|
38
|
+
function update() {
|
|
39
|
+
const model = editorInstance.getModel();
|
|
40
|
+
if (!model)
|
|
41
|
+
return;
|
|
42
|
+
const text = model.getValue();
|
|
43
|
+
const references = findWalkerOSReferences(text);
|
|
44
|
+
const decorations = references.map((ref) => {
|
|
45
|
+
const startPos = model.getPositionAt(ref.startIndex);
|
|
46
|
+
const endPos = model.getPositionAt(ref.endIndex);
|
|
47
|
+
const pattern = REFERENCE_PATTERNS.find((p) => p.type === ref.type);
|
|
48
|
+
return {
|
|
49
|
+
range: {
|
|
50
|
+
startLineNumber: startPos.lineNumber,
|
|
51
|
+
startColumn: startPos.column,
|
|
52
|
+
endLineNumber: endPos.lineNumber,
|
|
53
|
+
endColumn: endPos.column,
|
|
54
|
+
},
|
|
55
|
+
options: { inlineClassName: pattern.className },
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
decorationIds = editorInstance.deltaDecorations(decorationIds, decorations);
|
|
59
|
+
}
|
|
60
|
+
update();
|
|
61
|
+
const disposable = editorInstance.onDidChangeModelContent(() => update());
|
|
62
|
+
return () => {
|
|
63
|
+
disposable.dispose();
|
|
64
|
+
editorInstance.deltaDecorations(decorationIds, []);
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Register CSS styles for walkerOS reference decorations.
|
|
69
|
+
* Call once on app init.
|
|
70
|
+
*/
|
|
71
|
+
export function registerWalkerOSDecorationStyles() {
|
|
72
|
+
if (typeof document === 'undefined')
|
|
73
|
+
return;
|
|
74
|
+
if (document.getElementById('walkeros-ref-styles'))
|
|
75
|
+
return;
|
|
76
|
+
const style = document.createElement('style');
|
|
77
|
+
style.id = 'walkeros-ref-styles';
|
|
78
|
+
style.textContent = `
|
|
79
|
+
.monaco-editor .elb-ref-variable { color: #89ddff !important; font-style: italic; }
|
|
80
|
+
.monaco-editor .elb-ref-definition { color: #c3e88d !important; font-style: italic; }
|
|
81
|
+
.monaco-editor .elb-ref-secret { color: #ffcb6b !important; font-style: italic; }
|
|
82
|
+
.monaco-editor .elb-ref-env { color: #ffcb6b !important; font-style: italic; }
|
|
83
|
+
.monaco-editor .elb-ref-code { color: #c084fc !important; }
|
|
84
|
+
`;
|
|
85
|
+
document.head.appendChild(style);
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=monaco-walkeros-decorations.js.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M,UAAU,GAAG,cAAc,CAAC,uBAAuB,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;IAE1E,OAAO,GAAG,EAAE;QACV,UAAU,CAAC,OAAO,EAAE,CAAC;QACrB,cAAc,CAAC,gBAAgB,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;IACrD,CAAC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gCAAgC;IAC9C,IAAI,OAAO,QAAQ,KAAK,WAAW;QAAE,OAAO;IAC5C,IAAI,QAAQ,CAAC,cAAc,CAAC,qBAAqB,CAAC;QAAE,OAAO;IAE3D,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9C,KAAK,CAAC,EAAE,GAAG,qBAAqB,CAAC;IACjC,KAAK,CAAC,WAAW,GAAG;;;;;;GAMnB,CAAC;IACF,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IntelliSenseContext } from '../types/intellisense';
|
|
2
|
+
export interface ValidationIssue {
|
|
3
|
+
message: string;
|
|
4
|
+
severity: 'error' | 'warning' | 'info';
|
|
5
|
+
startIndex: number;
|
|
6
|
+
endIndex: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Validate walkerOS references in JSON text against the current context.
|
|
10
|
+
* Returns issues for dangling references and invalid cross-references.
|
|
11
|
+
*/
|
|
12
|
+
export declare function validateWalkerOSReferences(text: string, context: Partial<IntelliSenseContext>): ValidationIssue[];
|
|
13
|
+
//# sourceMappingURL=monaco-walkeros-markers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monaco-walkeros-markers.d.ts","sourceRoot":"","sources":["../../src/utils/monaco-walkeros-markers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,OAAO,CAAC,mBAAmB,CAAC,GACpC,eAAe,EAAE,CAoEnB"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validate walkerOS references in JSON text against the current context.
|
|
3
|
+
* Returns issues for dangling references and invalid cross-references.
|
|
4
|
+
*/
|
|
5
|
+
export function validateWalkerOSReferences(text, context) {
|
|
6
|
+
const issues = [];
|
|
7
|
+
// Check $var. references
|
|
8
|
+
if (context.variables) {
|
|
9
|
+
const varRegex = /\$var\.(\w+)/g;
|
|
10
|
+
let match;
|
|
11
|
+
while ((match = varRegex.exec(text)) !== null) {
|
|
12
|
+
if (!(match[1] in context.variables)) {
|
|
13
|
+
issues.push({
|
|
14
|
+
message: `Unknown variable "$var.${match[1]}". Defined variables: ${Object.keys(context.variables).join(', ') || 'none'}`,
|
|
15
|
+
severity: 'warning',
|
|
16
|
+
startIndex: match.index,
|
|
17
|
+
endIndex: match.index + match[0].length,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
// Check $def. references
|
|
23
|
+
if (context.definitions) {
|
|
24
|
+
const defRegex = /\$def\.(\w+)/g;
|
|
25
|
+
let match;
|
|
26
|
+
while ((match = defRegex.exec(text)) !== null) {
|
|
27
|
+
if (!(match[1] in context.definitions)) {
|
|
28
|
+
issues.push({
|
|
29
|
+
message: `Unknown definition "$def.${match[1]}". Defined: ${Object.keys(context.definitions).join(', ') || 'none'}`,
|
|
30
|
+
severity: 'warning',
|
|
31
|
+
startIndex: match.index,
|
|
32
|
+
endIndex: match.index + match[0].length,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
// Check $secret. references
|
|
38
|
+
if (context.secrets) {
|
|
39
|
+
const secretRegex = /\$secret\.(\w+)/g;
|
|
40
|
+
let match;
|
|
41
|
+
while ((match = secretRegex.exec(text)) !== null) {
|
|
42
|
+
if (!context.secrets.includes(match[1])) {
|
|
43
|
+
issues.push({
|
|
44
|
+
message: `Unknown secret "$secret.${match[1]}". Available: ${context.secrets.join(', ') || 'none'}`,
|
|
45
|
+
severity: 'warning',
|
|
46
|
+
startIndex: match.index,
|
|
47
|
+
endIndex: match.index + match[0].length,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
// Check next/before cross-references
|
|
53
|
+
if (context.stepNames?.transformers) {
|
|
54
|
+
const nextRegex = /"(?:next|before)"\s*:\s*"(\w+)"/g;
|
|
55
|
+
let match;
|
|
56
|
+
while ((match = nextRegex.exec(text)) !== null) {
|
|
57
|
+
if (!context.stepNames.transformers.includes(match[1])) {
|
|
58
|
+
issues.push({
|
|
59
|
+
message: `Unknown transformer "${match[1]}". Available: ${context.stepNames.transformers.join(', ') || 'none'}`,
|
|
60
|
+
severity: 'warning',
|
|
61
|
+
startIndex: match.index,
|
|
62
|
+
endIndex: match.index + match[0].length,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return issues;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=monaco-walkeros-markers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monaco-walkeros-markers.js","sourceRoot":"","sources":["../../src/utils/monaco-walkeros-markers.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,MAAM,UAAU,0BAA0B,CACxC,IAAY,EACZ,OAAqC;IAErC,MAAM,MAAM,GAAsB,EAAE,CAAC;IAErC,yBAAyB;IACzB,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SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,EAAE;oBAC/G,QAAQ,EAAE,SAAS;oBACnB,UAAU,EAAE,KAAK,CAAC,KAAK;oBACvB,QAAQ,EAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM;iBACxC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { IntelliSenseContext } from '../types/intellisense';
|
|
2
|
+
/**
|
|
3
|
+
* Update the IntelliSense context for a specific editor model.
|
|
4
|
+
*/
|
|
5
|
+
export declare function setIntelliSenseContext(modelPath: string, context: IntelliSenseContext): void;
|
|
6
|
+
/**
|
|
7
|
+
* Remove context when editor unmounts.
|
|
8
|
+
*/
|
|
9
|
+
export declare function removeIntelliSenseContext(modelPath: string): void;
|
|
10
|
+
/**
|
|
11
|
+
* Register the walkerOS CompletionItemProvider and HoverProvider for JSON.
|
|
12
|
+
* Call once on app initialization. Safe to call multiple times (idempotent).
|
|
13
|
+
*/
|
|
14
|
+
export declare function registerWalkerOSProviders(monaco: typeof import('monaco-editor')): void;
|
|
15
|
+
/**
|
|
16
|
+
* Dispose all registered providers. Call on app teardown.
|
|
17
|
+
*/
|
|
18
|
+
export declare function disposeWalkerOSProviders(): void;
|
|
19
|
+
//# sourceMappingURL=monaco-walkeros-providers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monaco-walkeros-providers.d.ts","sourceRoot":"","sources":["../../src/utils/monaco-walkeros-providers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAmBjE;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,mBAAmB,GAC3B,IAAI,CAEN;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAEjE;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,cAAc,eAAe,CAAC,GACrC,IAAI,CA0QN;AAED;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAK/C"}
|