@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,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Monaco JSON Schema Registry
|
|
3
|
+
*
|
|
4
|
+
* Manages JSON Schema registrations for Monaco's JSON language service.
|
|
5
|
+
* Multiple Code instances can register schemas concurrently — the registry
|
|
6
|
+
* accumulates all schemas and issues a single setDiagnosticsOptions() call.
|
|
7
|
+
*
|
|
8
|
+
* The monaco json namespace is initialized via initMonacoJson() when the
|
|
9
|
+
* Code atom's beforeMount fires. Schemas registered before initialization
|
|
10
|
+
* are queued and flushed once the namespace becomes available.
|
|
11
|
+
*/
|
|
12
|
+
const schemaRegistry = new Map();
|
|
13
|
+
let idCounter = 0;
|
|
14
|
+
// Monaco JSON namespace, set via initMonacoJson() from Code atom's beforeMount
|
|
15
|
+
let _json;
|
|
16
|
+
/**
|
|
17
|
+
* Initialize the JSON schema registry with the monaco instance.
|
|
18
|
+
* Called from Code atom's handleBeforeMount where monaco is guaranteed loaded.
|
|
19
|
+
* Flushes any schemas registered before initialization.
|
|
20
|
+
*/
|
|
21
|
+
export function initMonacoJson(monaco) {
|
|
22
|
+
if (_json)
|
|
23
|
+
return;
|
|
24
|
+
_json = monaco.json;
|
|
25
|
+
if (schemaRegistry.size > 0)
|
|
26
|
+
applySchemas();
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Reset state (for testing only).
|
|
30
|
+
*/
|
|
31
|
+
export function resetMonacoJson() {
|
|
32
|
+
_json = undefined;
|
|
33
|
+
schemaRegistry.clear();
|
|
34
|
+
idCounter = 0;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Generate a unique model path for a Code instance.
|
|
38
|
+
* Used as the `path` prop for @monaco-editor/react Editor.
|
|
39
|
+
*/
|
|
40
|
+
export function generateModelPath() {
|
|
41
|
+
return `inmemory://walkeros/json-${++idCounter}.json`;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Register a JSON schema for a specific model path.
|
|
45
|
+
* Triggers a global setDiagnosticsOptions update.
|
|
46
|
+
*/
|
|
47
|
+
export function registerJsonSchema(modelPath, schema) {
|
|
48
|
+
schemaRegistry.set(modelPath, {
|
|
49
|
+
uri: `schema://walkeros/${modelPath}`,
|
|
50
|
+
fileMatch: [modelPath],
|
|
51
|
+
schema,
|
|
52
|
+
});
|
|
53
|
+
applySchemas();
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Unregister a JSON schema when a Code instance unmounts.
|
|
57
|
+
* Triggers a global setDiagnosticsOptions update.
|
|
58
|
+
*/
|
|
59
|
+
export function unregisterJsonSchema(modelPath) {
|
|
60
|
+
schemaRegistry.delete(modelPath);
|
|
61
|
+
applySchemas();
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Apply all registered schemas to Monaco's JSON language service.
|
|
65
|
+
*/
|
|
66
|
+
function applySchemas() {
|
|
67
|
+
if (!_json)
|
|
68
|
+
return;
|
|
69
|
+
_json.jsonDefaults.setDiagnosticsOptions({
|
|
70
|
+
validate: true,
|
|
71
|
+
schemaValidation: 'error',
|
|
72
|
+
schemaRequest: 'ignore',
|
|
73
|
+
enableSchemaRequest: false,
|
|
74
|
+
schemas: Array.from(schemaRegistry.values()),
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Get count of registered schemas (for testing/debugging).
|
|
79
|
+
*/
|
|
80
|
+
export function getRegisteredSchemaCount() {
|
|
81
|
+
return schemaRegistry.size;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Clear all schemas (for testing).
|
|
85
|
+
*/
|
|
86
|
+
export function clearAllSchemas() {
|
|
87
|
+
schemaRegistry.clear();
|
|
88
|
+
applySchemas();
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=monaco-json-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monaco-json-schema.js","sourceRoot":"","sources":["../../src/utils/monaco-json-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAWH,MAAM,cAAc,GAAG,IAAI,GAAG,EAA4B,CAAC;AAE3D,IAAI,SAAS,GAAG,CAAC,CAAC;AAElB,+EAA+E;AAC/E,IAAI,KAAsD,CAAC;AAE3D;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,MAAsC;IACnE,IAAI,KAAK;QAAE,OAAO;IAClB,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC;IACpB,IAAI,cAAc,CAAC,IAAI,GAAG,CA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>;
|
|
2
|
+
/**
|
|
3
|
+
* Returns an enriched JSON Schema for the walkerOS Contract editor.
|
|
4
|
+
* Structure: { $tagging: number, entity: { action: JSONSchema } }
|
|
5
|
+
*/
|
|
6
|
+
export declare function getEnrichedContractSchema(): AnySchema;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=monaco-schema-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monaco-schema-contract.d.ts","sourceRoot":"","sources":["../../src/utils/monaco-schema-contract.ts"],"names":[],"mappings":"AACA,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAErC;;;GAGG;AACH,wBAAgB,yBAAyB,IAAI,SAAS,CAsErD"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns an enriched JSON Schema for the walkerOS Contract editor.
|
|
3
|
+
* Structure: { $tagging: number, entity: { action: JSONSchema } }
|
|
4
|
+
*/
|
|
5
|
+
export function getEnrichedContractSchema() {
|
|
6
|
+
return {
|
|
7
|
+
type: 'object',
|
|
8
|
+
markdownDescription: 'walkerOS Data Contract. Defines entity→action schemas for event validation.\n\n' +
|
|
9
|
+
'```json\n{\n "$tagging": 1,\n "page": {\n' +
|
|
10
|
+
' "view": {\n "type": "object",\n "properties": {\n' +
|
|
11
|
+
' "title": { "type": "string" }\n }\n }\n }\n}\n```',
|
|
12
|
+
properties: {
|
|
13
|
+
$tagging: {
|
|
14
|
+
type: 'number',
|
|
15
|
+
markdownDescription: 'Contract version number. Increment when making breaking changes.\n\n```json\n"$tagging": 1\n```',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
additionalProperties: {
|
|
19
|
+
type: 'object',
|
|
20
|
+
markdownDescription: 'Entity name. Contains action→schema mappings.',
|
|
21
|
+
additionalProperties: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
markdownDescription: 'Action schema (JSON Schema). Defines valid event data for this entity+action.\n\n' +
|
|
24
|
+
'```json\n{\n "type": "object",\n "properties": {\n' +
|
|
25
|
+
' "name": { "type": "string" },\n "price": { "type": "number" }\n' +
|
|
26
|
+
' },\n "required": ["name"]\n}\n```',
|
|
27
|
+
defaultSnippets: [
|
|
28
|
+
{
|
|
29
|
+
label: 'Object schema',
|
|
30
|
+
description: 'Schema with typed properties',
|
|
31
|
+
body: {
|
|
32
|
+
type: 'object',
|
|
33
|
+
properties: {
|
|
34
|
+
'${1:name}': { type: '${2:string}' },
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
defaultSnippets: [
|
|
41
|
+
{
|
|
42
|
+
label: 'Add action',
|
|
43
|
+
description: 'Action with event data schema',
|
|
44
|
+
body: {
|
|
45
|
+
'${1:action}': {
|
|
46
|
+
type: 'object',
|
|
47
|
+
properties: {
|
|
48
|
+
'${2:property}': { type: '${3:string}' },
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
defaultSnippets: [
|
|
56
|
+
{
|
|
57
|
+
label: 'Entity with action',
|
|
58
|
+
description: 'New entity with one action and properties',
|
|
59
|
+
body: {
|
|
60
|
+
'${1:entity}': {
|
|
61
|
+
'${2:action}': {
|
|
62
|
+
type: 'object',
|
|
63
|
+
properties: {
|
|
64
|
+
'${3:property}': { type: '${4:string}' },
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=monaco-schema-contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monaco-schema-contract.js","sourceRoot":"","sources":["../../src/utils/monaco-schema-contract.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,UAAU,yBAAyB;IACvC,OAAO;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|
+
label: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
markdownDescription?: string;
|
|
6
|
+
body?: unknown;
|
|
7
|
+
bodyText?: string;
|
|
8
|
+
}>;
|
|
9
|
+
markdownDescription?: string;
|
|
10
|
+
enumDescriptions?: string[];
|
|
11
|
+
markdownEnumDescriptions?: string[];
|
|
12
|
+
deprecationMessage?: string;
|
|
13
|
+
errorMessage?: string;
|
|
14
|
+
patternErrorMessage?: string;
|
|
15
|
+
doNotSuggest?: boolean;
|
|
16
|
+
suggestSortText?: string;
|
|
17
|
+
}
|
|
18
|
+
type EnrichmentMap = Record<string, MonacoSchemaExtension>;
|
|
19
|
+
/**
|
|
20
|
+
* Deep-merges Monaco-specific JSON Schema extensions into a base schema.
|
|
21
|
+
* Keys in the enrichment map are dot-paths (e.g., 'properties.sources').
|
|
22
|
+
* Empty string '' targets the root. Does not mutate the original.
|
|
23
|
+
*/
|
|
24
|
+
export declare function enrichSchema(baseSchema: Record<string, unknown>, enrichments: EnrichmentMap): Record<string, unknown>;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=monaco-schema-enrichment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monaco-schema-enrichment.d.ts","sourceRoot":"","sources":["../../src/utils/monaco-schema-enrichment.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACpC,eAAe,CAAC,EAAE,KAAK,CAAC;QACtB,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC,CAAC;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;IACpC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,KAAK,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;AAE3D;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,WAAW,EAAE,aAAa,GACzB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAWzB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deep-merges Monaco-specific JSON Schema extensions into a base schema.
|
|
3
|
+
* Keys in the enrichment map are dot-paths (e.g., 'properties.sources').
|
|
4
|
+
* Empty string '' targets the root. Does not mutate the original.
|
|
5
|
+
*/
|
|
6
|
+
export function enrichSchema(baseSchema, enrichments) {
|
|
7
|
+
const schema = JSON.parse(JSON.stringify(baseSchema));
|
|
8
|
+
for (const [path, extensions] of Object.entries(enrichments)) {
|
|
9
|
+
const target = path === '' ? schema : getNestedObject(schema, path);
|
|
10
|
+
if (target && typeof target === 'object') {
|
|
11
|
+
Object.assign(target, extensions);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return schema;
|
|
15
|
+
}
|
|
16
|
+
function getNestedObject(obj, path) {
|
|
17
|
+
const keys = path.split('.');
|
|
18
|
+
let current = obj;
|
|
19
|
+
for (const key of keys) {
|
|
20
|
+
if (current &&
|
|
21
|
+
typeof current === 'object' &&
|
|
22
|
+
key in current) {
|
|
23
|
+
current = current[key];
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return current;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=monaco-schema-enrichment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monaco-schema-enrichment.js","sourceRoot":"","sources":["../../src/utils/monaco-schema-enrichment.ts"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAC1B,UAAmC,EACnC,WAA0B;IAE1B,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;IAEtD,KAAK,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;QAC7D,MAAM,MAAM,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACpE,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YACzC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QACpC,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,eAAe,CACtB,GAA4B,EAC5B,IAAY;IAEZ,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC7B,IAAI,OAAO,GAAY,GAAG,CAAC;IAC3B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IACE,OAAO;YACP,OAAO,OAAO,KAAK,QAAQ;YAC3B,GAAG,IAAK,OAAmC,EAC3C,CAAC;YACD,OAAO,GAAI,OAAmC,CAAC,GAAG,CAAC,CAAC;QACtD,CAAC;aAAM,CAAC;YACN,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IACD,OAAO,OAA8C,CAAC;AACxD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type AnySchema = Record<string, any>;
|
|
2
|
+
/**
|
|
3
|
+
* Takes the base Flow.Config JSON Schema (from @walkeros/core z.toJSONSchema())
|
|
4
|
+
* and returns an enriched version with Monaco-specific extensions.
|
|
5
|
+
*
|
|
6
|
+
* The actual schema uses anyOf[0] at the top level.
|
|
7
|
+
*/
|
|
8
|
+
export declare function enrichFlowConfigSchema(baseSchema: AnySchema): AnySchema;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=monaco-schema-flow-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monaco-schema-flow-config.d.ts","sourceRoot":"","sources":["../../src/utils/monaco-schema-flow-config.ts"],"names":[],"mappings":"AAGA,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAErC;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,SAAS,GAAG,SAAS,CA8MvE"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Takes the base Flow.Config JSON Schema (from @walkeros/core z.toJSONSchema())
|
|
3
|
+
* and returns an enriched version with Monaco-specific extensions.
|
|
4
|
+
*
|
|
5
|
+
* The actual schema uses anyOf[0] at the top level.
|
|
6
|
+
*/
|
|
7
|
+
export function enrichFlowConfigSchema(baseSchema) {
|
|
8
|
+
// The schema structure is { anyOf: [{ type: 'object', properties: {...} }] }
|
|
9
|
+
// We need to enrich inside anyOf[0]
|
|
10
|
+
const schema = JSON.parse(JSON.stringify(baseSchema));
|
|
11
|
+
if (!schema.anyOf?.[0]?.properties)
|
|
12
|
+
return schema;
|
|
13
|
+
const root = schema.anyOf[0];
|
|
14
|
+
const props = root.properties;
|
|
15
|
+
const flowSettings = props.flows?.additionalProperties?.properties;
|
|
16
|
+
// Enrich version
|
|
17
|
+
if (props.version) {
|
|
18
|
+
props.version.markdownDescription =
|
|
19
|
+
'Schema version number. Use `3` for the current format.\n\n```json\n"version": 3\n```';
|
|
20
|
+
}
|
|
21
|
+
// Enrich $schema
|
|
22
|
+
if (props.$schema) {
|
|
23
|
+
props.$schema.markdownDescription =
|
|
24
|
+
'JSON Schema URI for IDE validation.\n\n```json\n"$schema": "https://walkeros.io/schema/flow/v3.json"\n```';
|
|
25
|
+
}
|
|
26
|
+
// Enrich include
|
|
27
|
+
if (props.include) {
|
|
28
|
+
props.include.markdownDescription =
|
|
29
|
+
'Folders to include in the bundle output.\n\n```json\n"include": ["./src", "./lib"]\n```';
|
|
30
|
+
}
|
|
31
|
+
// Enrich variables
|
|
32
|
+
if (props.variables) {
|
|
33
|
+
props.variables.markdownDescription =
|
|
34
|
+
'Shared variables for `$var.name` interpolation across all flows.\n\n' +
|
|
35
|
+
'```json\n"variables": {\n "measurementId": "G-XXXXXXXXXX",\n "debug": false\n}\n```\n\n' +
|
|
36
|
+
'Reference in any config value: `"$var.measurementId"`';
|
|
37
|
+
props.variables.defaultSnippets = [
|
|
38
|
+
{
|
|
39
|
+
label: 'Add variable',
|
|
40
|
+
description: 'New key-value variable',
|
|
41
|
+
body: { '${1:name}': '${2:value}' },
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
}
|
|
45
|
+
// Enrich definitions
|
|
46
|
+
if (props.definitions) {
|
|
47
|
+
props.definitions.markdownDescription =
|
|
48
|
+
'Reusable configuration fragments for `$def.name` references.\n\n' +
|
|
49
|
+
'```json\n"definitions": {\n "gaConfig": {\n "measurementId": "$var.trackingId"\n }\n}\n```\n\n' +
|
|
50
|
+
'Reference in any config: `"$def.gaConfig"`';
|
|
51
|
+
props.definitions.defaultSnippets = [
|
|
52
|
+
{
|
|
53
|
+
label: 'Add definition',
|
|
54
|
+
description: 'New reusable config fragment',
|
|
55
|
+
body: { '${1:name}': { '${2:key}': '${3:value}' } },
|
|
56
|
+
},
|
|
57
|
+
];
|
|
58
|
+
}
|
|
59
|
+
// Enrich flows with scaffolding snippets
|
|
60
|
+
if (props.flows) {
|
|
61
|
+
props.flows.markdownDescription =
|
|
62
|
+
'Flow configurations keyed by name. Each flow defines a complete event pipeline.\n\n' +
|
|
63
|
+
'```json\n"flows": {\n "myFlow": {\n "web": {},\n "sources": { ... },\n "destinations": { ... }\n }\n}\n```';
|
|
64
|
+
props.flows.defaultSnippets = [
|
|
65
|
+
{
|
|
66
|
+
label: 'Web flow (basic)',
|
|
67
|
+
description: 'Minimal web flow with browser source',
|
|
68
|
+
body: {
|
|
69
|
+
'${1:myFlow}': {
|
|
70
|
+
web: {},
|
|
71
|
+
sources: {
|
|
72
|
+
browser: { package: '@walkeros/web-source-browser' },
|
|
73
|
+
},
|
|
74
|
+
destinations: {},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
label: 'Server flow (basic)',
|
|
80
|
+
description: 'Minimal server flow with Express source',
|
|
81
|
+
body: {
|
|
82
|
+
'${1:myFlow}': {
|
|
83
|
+
server: {},
|
|
84
|
+
sources: {
|
|
85
|
+
express: { package: '@walkeros/server-source-express' },
|
|
86
|
+
},
|
|
87
|
+
destinations: {},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
label: 'Web + GA4 flow',
|
|
93
|
+
description: 'Web flow with browser source and GA4 destination',
|
|
94
|
+
body: {
|
|
95
|
+
'${1:myFlow}': {
|
|
96
|
+
web: {},
|
|
97
|
+
sources: {
|
|
98
|
+
browser: { package: '@walkeros/web-source-browser' },
|
|
99
|
+
},
|
|
100
|
+
destinations: {
|
|
101
|
+
ga4: {
|
|
102
|
+
package: '@walkeros/web-destination-ga4',
|
|
103
|
+
config: {
|
|
104
|
+
measurementId: '$var.${2:measurementId}',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
];
|
|
112
|
+
}
|
|
113
|
+
// Enrich FlowSettings sub-properties
|
|
114
|
+
if (flowSettings) {
|
|
115
|
+
if (flowSettings.sources) {
|
|
116
|
+
flowSettings.sources.markdownDescription =
|
|
117
|
+
'Source configurations for data capture, keyed by step name.\n\n' +
|
|
118
|
+
'```json\n"sources": {\n "browser": { "package": "@walkeros/web-source-browser" }\n}\n```';
|
|
119
|
+
flowSettings.sources.defaultSnippets = [
|
|
120
|
+
{
|
|
121
|
+
label: 'Add web source',
|
|
122
|
+
description: 'Browser source for web tracking',
|
|
123
|
+
body: {
|
|
124
|
+
'${1:browser}': {
|
|
125
|
+
package: '@walkeros/web-source-browser',
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
label: 'Add server source',
|
|
131
|
+
description: 'Express source for server tracking',
|
|
132
|
+
body: {
|
|
133
|
+
'${1:express}': {
|
|
134
|
+
package: '@walkeros/server-source-express',
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
];
|
|
139
|
+
}
|
|
140
|
+
if (flowSettings.destinations) {
|
|
141
|
+
flowSettings.destinations.markdownDescription =
|
|
142
|
+
'Destination configurations for data output, keyed by step name.\n\n' +
|
|
143
|
+
'```json\n"destinations": {\n "ga4": {\n "package": "@walkeros/web-destination-ga4",\n "config": { "measurementId": "$var.trackingId" }\n }\n}\n```';
|
|
144
|
+
flowSettings.destinations.defaultSnippets = [
|
|
145
|
+
{
|
|
146
|
+
label: 'Add GA4 destination',
|
|
147
|
+
description: 'Google Analytics 4 destination',
|
|
148
|
+
body: {
|
|
149
|
+
'${1:ga4}': {
|
|
150
|
+
package: '@walkeros/web-destination-ga4',
|
|
151
|
+
config: {
|
|
152
|
+
measurementId: '$var.${2:measurementId}',
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
label: 'Add custom destination',
|
|
159
|
+
description: 'Custom destination with inline code',
|
|
160
|
+
body: {
|
|
161
|
+
'${1:custom}': {
|
|
162
|
+
code: {
|
|
163
|
+
push: '$code:(event) => { ${2:// handle event} }',
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
];
|
|
169
|
+
}
|
|
170
|
+
if (flowSettings.transformers) {
|
|
171
|
+
flowSettings.transformers.markdownDescription =
|
|
172
|
+
'Transformer configurations for event transformation, keyed by step name.\n\n' +
|
|
173
|
+
'```json\n"transformers": {\n "validator": {\n "code": { "push": "$code:(event) => event" }\n }\n}\n```';
|
|
174
|
+
flowSettings.transformers.defaultSnippets = [
|
|
175
|
+
{
|
|
176
|
+
label: 'Add transformer',
|
|
177
|
+
description: 'Inline transformer with code',
|
|
178
|
+
body: {
|
|
179
|
+
'${1:transformer}': {
|
|
180
|
+
code: {
|
|
181
|
+
push: '$code:(event) => { ${2:return event;} }',
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
];
|
|
187
|
+
}
|
|
188
|
+
if (flowSettings.web) {
|
|
189
|
+
flowSettings.web.markdownDescription =
|
|
190
|
+
'Web platform configuration (browser-based). Mutually exclusive with `server`.\n\n' +
|
|
191
|
+
'```json\n"web": {\n "windowCollector": "collector",\n "windowElb": "elb"\n}\n```';
|
|
192
|
+
}
|
|
193
|
+
if (flowSettings.server) {
|
|
194
|
+
flowSettings.server.markdownDescription =
|
|
195
|
+
'Server platform configuration (Node.js). Mutually exclusive with `web`.\n\n' +
|
|
196
|
+
'```json\n"server": {}\n```';
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return schema;
|
|
200
|
+
}
|
|
201
|
+
//# sourceMappingURL=monaco-schema-flow-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monaco-schema-flow-config.js","sourceRoot":"","sources":["../../src/utils/monaco-schema-flow-config.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAAC,UAAqB;IAC1D,6EAA6E;IAC7E,oCAAoC;IACpC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAA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xB,WAAW,EAAE,8BAA8B;oBAC3C,IAAI,EAAE;wBACJ,kBAAkB,EAAE;4BAClB,IAAI,EAAE;gCACJ,IAAI,EAAE,yCAAyC;6BAChD;yBACF;qBACF;iBACF;aACF,CAAC;QACJ,CAAC;QAED,IAAI,YAAY,CAAC,GAAG,EAAE,CAAC;YACrB,YAAY,CAAC,GAAG,CAAC,mBAAmB;gBAClC,mFAAmF;oBACnF,oFAAoF,CAAC;QACzF,CAAC;QAED,IAAI,YAAY,CAAC,MAAM,EAAE,CAAC;YACxB,YAAY,CAAC,MAAM,CAAC,mBAAmB;gBACrC,6EAA6E;oBAC7E,4BAA4B,CAAC;QACjC,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monaco-schema-variables.d.ts","sourceRoot":"","sources":["../../src/utils/monaco-schema-variables.ts"],"names":[],"mappings":"AACA,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAErC,wBAAgB,kBAAkB,IAAI,SAAS,CAyB9C"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export function getVariablesSchema() {
|
|
2
|
+
return {
|
|
3
|
+
type: 'object',
|
|
4
|
+
markdownDescription: 'Flow variables for `$var.name` interpolation. Values must be string, number, or boolean.\n\n' +
|
|
5
|
+
'```json\n{\n "measurementId": "G-XXXXXXXXXX",\n "debug": false,\n "batchSize": 10\n}\n```\n\n' +
|
|
6
|
+
'Reference in any config value: `"$var.measurementId"`',
|
|
7
|
+
additionalProperties: {
|
|
8
|
+
oneOf: [{ type: 'string' }, { type: 'number' }, { type: 'boolean' }],
|
|
9
|
+
},
|
|
10
|
+
defaultSnippets: [
|
|
11
|
+
{
|
|
12
|
+
label: 'Add string variable',
|
|
13
|
+
body: { '${1:name}': '${2:value}' },
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
label: 'Add boolean variable',
|
|
17
|
+
body: { '${1:name}': '${2|true,false|}' },
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
label: 'Add number variable',
|
|
21
|
+
body: { '${1:name}': 0 },
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=monaco-schema-variables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monaco-schema-variables.js","sourceRoot":"","sources":["../../src/utils/monaco-schema-variables.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,kBAAkB;IAChC,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,mBAAmB,EACjB,8FAA8F;YAC9F,kGAAkG;YAClG,uDAAuD;QACzD,oBAAoB,EAAE;YACpB,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;SACrE;QACD,eAAe,EAAE;YACf;gBACE,KAAK,EAAE,qBAAqB;gBAC5B,IAAI,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE;aACpC;YACD;gBACE,KAAK,EAAE,sBAAsB;gBAC7B,IAAI,EAAE,EAAE,WAAW,EAAE,kBAAkB,EAAE;aAC1C;YACD;gBACE,KAAK,EAAE,qBAAqB;gBAC5B,IAAI,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE;aACzB;SACF;KACF,CAAC;AACJ,CAAC"}
|