@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,59 @@
|
|
|
1
|
+
import { CollectorBox } from './collector-box';
|
|
2
|
+
import { createGtagDestination } from '../../helpers/destinations';
|
|
3
|
+
/**
|
|
4
|
+
* CollectorBox - Event pipeline processor with collector
|
|
5
|
+
*
|
|
6
|
+
* Processes events through the walkerOS collector pipeline with a destination,
|
|
7
|
+
* showing the final formatted output. Perfect for demonstrating how events
|
|
8
|
+
* are transformed and sent to analytics tools.
|
|
9
|
+
*/
|
|
10
|
+
const meta = {
|
|
11
|
+
component: CollectorBox,
|
|
12
|
+
title: 'Organisms/CollectorBox',
|
|
13
|
+
tags: ['autodocs'],
|
|
14
|
+
parameters: {
|
|
15
|
+
layout: 'centered',
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
const sampleEvent = JSON.stringify({
|
|
20
|
+
entity: 'product',
|
|
21
|
+
action: 'view',
|
|
22
|
+
data: {
|
|
23
|
+
id: 'P123',
|
|
24
|
+
name: 'Laptop',
|
|
25
|
+
price: 999,
|
|
26
|
+
},
|
|
27
|
+
}, null, 2);
|
|
28
|
+
const sampleMapping = JSON.stringify({
|
|
29
|
+
product: {
|
|
30
|
+
view: {
|
|
31
|
+
name: 'view_item',
|
|
32
|
+
data: {
|
|
33
|
+
map: {
|
|
34
|
+
item_id: 'data.id',
|
|
35
|
+
item_name: 'data.name',
|
|
36
|
+
value: 'data.price',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
}, null, 2);
|
|
42
|
+
/**
|
|
43
|
+
* Default collector box with product view event
|
|
44
|
+
*
|
|
45
|
+
* Shows how a product view event is:
|
|
46
|
+
* 1. Processed by the collector
|
|
47
|
+
* 2. Transformed by mapping rules
|
|
48
|
+
* 3. Formatted as gtag() call
|
|
49
|
+
*/
|
|
50
|
+
export const Default = {
|
|
51
|
+
args: {
|
|
52
|
+
event: sampleEvent,
|
|
53
|
+
mapping: sampleMapping,
|
|
54
|
+
destination: createGtagDestination(),
|
|
55
|
+
label: 'Collector Output',
|
|
56
|
+
wordWrap: false,
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=collector-box.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collector-box.stories.js","sourceRoot":"","sources":["../../../src/components/organisms/collector-box.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;;;;;GAMG;AACH,MAAM,IAAI,GAA8B;IACtC,SAAS,EAAE,YAAY;IACvB,KAAK,EAAE,wBAAwB;IAC/B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAChC;IACE,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,MAAM;IACd,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,GAAG;KACX;CACF,EACD,IAAI,EACJ,CAAC,CACF,CAAC;AAEF,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAClC;IACE,OAAO,EAAE;QACP,IAAI,EAAE;YACJ,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE;gBACJ,GAAG,EAAE;oBACH,OAAO,EAAE,SAAS;oBAClB,SAAS,EAAE,WAAW;oBACtB,KAAK,EAAE,YAAY;iBACpB;aACF;SACF;KACF;CACF,EACD,IAAI,EACJ,CAAC,CACF,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,KAAK,EAAE,WAAW;QAClB,OAAO,EAAE,aAAa;QACtB,WAAW,EAAE,qBAAqB,EAAE;QACpC,KAAK,EAAE,kBAAkB;QACzB,QAAQ,EAAE,KAAK;KAChB;CACF,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { WalkerOS } from '@walkeros/core';
|
|
2
|
+
export interface LiveCodeProps {
|
|
3
|
+
input: unknown;
|
|
4
|
+
config?: unknown;
|
|
5
|
+
output?: unknown;
|
|
6
|
+
options?: WalkerOS.AnyObject;
|
|
7
|
+
fn?: (input: unknown, config: unknown, log: (...args: unknown[]) => void, options?: WalkerOS.AnyObject) => Promise<void>;
|
|
8
|
+
fnName?: string;
|
|
9
|
+
labelInput?: string;
|
|
10
|
+
labelConfig?: string;
|
|
11
|
+
labelOutput?: string;
|
|
12
|
+
emptyText?: string;
|
|
13
|
+
disableInput?: boolean;
|
|
14
|
+
disableConfig?: boolean;
|
|
15
|
+
showQuotes?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
language?: string;
|
|
18
|
+
format?: boolean;
|
|
19
|
+
rowHeight?: 'auto' | 'equal' | 'synced' | number;
|
|
20
|
+
}
|
|
21
|
+
export declare function LiveCode({ input: initInput, config: initConfig, output: initOutput, options, fn, fnName, labelInput, labelConfig, labelOutput, emptyText, disableInput, disableConfig, showQuotes, className, language, format, rowHeight, }: LiveCodeProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=live-code.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live-code.d.ts","sourceRoot":"","sources":["../../../src/components/organisms/live-code.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO/C,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC;IAC7B,EAAE,CAAC,EAAE,CACH,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,OAAO,EACf,GAAG,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,EACjC,OAAO,CAAC,EAAE,QAAQ,CAAC,SAAS,KACzB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;CAClD;AAQD,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,UAAe,EACvB,OAAO,EACP,EAAE,EACF,MAAM,EACN,UAAoB,EACpB,WAAsB,EACtB,WAAsB,EACtB,SAA2B,EAC3B,YAAoB,EACpB,aAAqB,EACrB,UAAiB,EACjB,SAAS,EACT,QAAiB,EACjB,MAAa,EACb,SAAS,GACV,EAAE,aAAa,2CAgFf"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect, useCallback } from 'react';
|
|
3
|
+
import { debounce, isString, tryCatchAsync } from '@walkeros/core';
|
|
4
|
+
import { CodeBox } from '../molecules/code-box';
|
|
5
|
+
import { Grid } from '../atoms/grid';
|
|
6
|
+
import { formatCode } from '../../utils/format-code';
|
|
7
|
+
function formatValue(value, options = {}) {
|
|
8
|
+
if (value === undefined)
|
|
9
|
+
return '';
|
|
10
|
+
const str = isString(value) ? value.trim() : JSON.stringify(value, null, 2);
|
|
11
|
+
return options.quotes && isString(value) ? `"${str}"` : str;
|
|
12
|
+
}
|
|
13
|
+
export function LiveCode({ input: initInput, config: initConfig, output: initOutput = '', options, fn, fnName, labelInput = 'Event', labelConfig = 'Config', labelOutput = 'Result', emptyText = 'No event yet.', disableInput = false, disableConfig = false, showQuotes = true, className, language = 'json', format = true, rowHeight, }) {
|
|
14
|
+
const [input, setInput] = useState(formatValue(initInput));
|
|
15
|
+
const [config, setConfig] = useState(formatValue(initConfig));
|
|
16
|
+
const [output, setOutput] = useState([formatValue(initOutput)]);
|
|
17
|
+
// Format input code on mount
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (format && initInput) {
|
|
20
|
+
const rawInput = formatValue(initInput);
|
|
21
|
+
formatCode(rawInput, language).then(setInput);
|
|
22
|
+
}
|
|
23
|
+
}, [initInput, language, format]);
|
|
24
|
+
// Format config code on mount
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (format && initConfig) {
|
|
27
|
+
const rawConfig = formatValue(initConfig);
|
|
28
|
+
formatCode(rawConfig, language).then(setConfig);
|
|
29
|
+
}
|
|
30
|
+
}, [initConfig, language, format]);
|
|
31
|
+
const log = useCallback((...args) => {
|
|
32
|
+
const params = args
|
|
33
|
+
.map((arg) => formatValue(arg, { quotes: showQuotes }))
|
|
34
|
+
.join(', ');
|
|
35
|
+
setOutput([fnName ? `${fnName}(${params})` : params]);
|
|
36
|
+
}, [fnName, showQuotes]);
|
|
37
|
+
const updateOutput = useCallback(debounce(async (inputStr, configStr, opts) => {
|
|
38
|
+
if (!fn)
|
|
39
|
+
return;
|
|
40
|
+
setOutput([]);
|
|
41
|
+
await tryCatchAsync(fn, (e) => {
|
|
42
|
+
setOutput([`Error: ${String(e)}`]);
|
|
43
|
+
})(inputStr, configStr, log, opts);
|
|
44
|
+
}, 500, true), [fn, log]);
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
updateOutput(input, config, options || {});
|
|
47
|
+
}, [input, config, options, updateOutput]);
|
|
48
|
+
return (_jsxs(Grid, { columns: 3, className: className, rowHeight: rowHeight, children: [_jsx(CodeBox, { label: labelInput, code: input, onChange: disableInput ? undefined : setInput, disabled: disableInput, language: language, showFormat: !disableInput && language === 'json' }), config && (_jsx(CodeBox, { label: labelConfig, code: config, onChange: disableConfig ? undefined : setConfig, disabled: disableConfig, language: language, showFormat: !disableConfig && language === 'json' })), _jsx(CodeBox, { label: labelOutput, code: output[0] || emptyText, disabled: true, language: language })] }));
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=live-code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live-code.js","sourceRoot":"","sources":["../../../src/components/organisms/live-code.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AA2BrD,SAAS,WAAW,CAAC,KAAc,EAAE,UAAgC,EAAE;IACrE,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACnC,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC5E,OAAO,OAAO,CAAC,MAAM,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,EACvB,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,UAAU,GAAG,EAAE,EACvB,OAAO,EACP,EAAE,EACF,MAAM,EACN,UAAU,GAAG,OAAO,EACpB,WAAW,GAAG,QAAQ,EACtB,WAAW,GAAG,QAAQ,EACtB,SAAS,GAAG,eAAe,EAC3B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,EAAE,CAAC,YAAY,IAAI,QAAQ,KAAK,MAAM,GAChD,EAED,MAAM,IAAI,CACT,KAAC,OAAO,IACN,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAC/C,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,CAAC,aAAa,IAAI,QAAQ,KAAK,MAAM,GACjD,CACH,EAED,KAAC,OAAO,IACN,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,SAAS,EAC5B,QAAQ,QACR,QAAQ,EAAE,QAAQ,GAClB,IACG,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { LiveCode } from './live-code';
|
|
3
|
+
/**
|
|
4
|
+
* LiveCode - Generic live code execution component
|
|
5
|
+
*
|
|
6
|
+
* Three-panel interactive component with:
|
|
7
|
+
* - Input panel (editable JSON)
|
|
8
|
+
* - Config panel (editable JSON)
|
|
9
|
+
* - Output panel (function result)
|
|
10
|
+
*
|
|
11
|
+
* Executes a custom transformation function with debounced updates.
|
|
12
|
+
* Perfect for demonstrating data transformations and API interactions.
|
|
13
|
+
*/
|
|
14
|
+
declare const meta: Meta<typeof LiveCode>;
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof LiveCode>;
|
|
17
|
+
/**
|
|
18
|
+
* Default live code with simple data transformation
|
|
19
|
+
*
|
|
20
|
+
* Shows a transformation that combines input data with config,
|
|
21
|
+
* demonstrating how the component executes and displays results.
|
|
22
|
+
*/
|
|
23
|
+
export declare const Default: Story;
|
|
24
|
+
//# sourceMappingURL=live-code.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live-code.stories.d.ts","sourceRoot":"","sources":["../../../src/components/organisms/live-code.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC;;;;;;;;;;GAUG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAO/B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEvC;;;;;GAKG;AACH,eAAO,MAAM,OAAO,EAAE,KA4BrB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { LiveCode } from './live-code';
|
|
2
|
+
/**
|
|
3
|
+
* LiveCode - Generic live code execution component
|
|
4
|
+
*
|
|
5
|
+
* Three-panel interactive component with:
|
|
6
|
+
* - Input panel (editable JSON)
|
|
7
|
+
* - Config panel (editable JSON)
|
|
8
|
+
* - Output panel (function result)
|
|
9
|
+
*
|
|
10
|
+
* Executes a custom transformation function with debounced updates.
|
|
11
|
+
* Perfect for demonstrating data transformations and API interactions.
|
|
12
|
+
*/
|
|
13
|
+
const meta = {
|
|
14
|
+
component: LiveCode,
|
|
15
|
+
title: 'Organisms/LiveCode',
|
|
16
|
+
tags: ['autodocs'],
|
|
17
|
+
parameters: {
|
|
18
|
+
layout: 'fullscreen',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
/**
|
|
23
|
+
* Default live code with simple data transformation
|
|
24
|
+
*
|
|
25
|
+
* Shows a transformation that combines input data with config,
|
|
26
|
+
* demonstrating how the component executes and displays results.
|
|
27
|
+
*/
|
|
28
|
+
export const Default = {
|
|
29
|
+
args: {
|
|
30
|
+
input: {
|
|
31
|
+
name: 'John Doe',
|
|
32
|
+
email: 'john@example.com',
|
|
33
|
+
},
|
|
34
|
+
config: {
|
|
35
|
+
includeTimestamp: true,
|
|
36
|
+
prefix: 'User:',
|
|
37
|
+
},
|
|
38
|
+
labelInput: 'User Data',
|
|
39
|
+
labelConfig: 'Options',
|
|
40
|
+
labelOutput: 'Transformed',
|
|
41
|
+
fn: async (input, config, log) => {
|
|
42
|
+
const inputData = JSON.parse(input);
|
|
43
|
+
const configData = JSON.parse(config);
|
|
44
|
+
const result = {
|
|
45
|
+
...inputData,
|
|
46
|
+
displayName: `${configData.prefix} ${inputData.name}`,
|
|
47
|
+
...(configData.includeTimestamp && {
|
|
48
|
+
timestamp: new Date().toISOString(),
|
|
49
|
+
}),
|
|
50
|
+
};
|
|
51
|
+
log(result);
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=live-code.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live-code.stories.js","sourceRoot":"","sources":["../../../src/components/organisms/live-code.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC;;;;;;;;;;GAUG;AACH,MAAM,IAAI,GAA0B;IAClC,SAAS,EAAE,QAAQ;IACnB,KAAK,EAAE,oBAAoB;IAC3B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,MAAM,EAAE,YAAY;KACrB;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,kBAAkB;SAC1B;QACD,MAAM,EAAE;YACN,gBAAgB,EAAE,IAAI;YACtB,MAAM,EAAE,OAAO;SAChB;QACD,UAAU,EAAE,WAAW;QACvB,WAAW,EAAE,SAAS;QACtB,WAAW,EAAE,aAAa;QAC1B,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE;YAC/B,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,KAAe,CAAC,CAAC;YAC9C,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,MAAgB,CAAC,CAAC;YAEhD,MAAM,MAAM,GAAG;gBACb,GAAG,SAAS;gBACZ,WAAW,EAAE,GAAG,UAAU,CAAC,MAAM,IAAI,SAAS,CAAC,IAAI,EAAE;gBACrD,GAAG,CAAC,UAAU,CAAC,gBAAgB,IAAI;oBACjC,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;iBACpC,CAAC;aACH,CAAC;YAEF,GAAG,CAAC,MAAM,CAAC,CAAC;QACd,CAAC;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;CAAG;AAErF,wBAAgB,MAAM,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,2CAMpE"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '../../lib/utils';
|
|
3
|
+
export function Button({ className, children, ...props }) {
|
|
4
|
+
return (_jsx("button", { className: cn('explorer-button', className), ...props, children: children }));
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAIrC,MAAM,UAAU,MAAM,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAe;IACnE,OAAO,CACL,iBAAQ,SAAS,EAAE,EAAE,CAAC,iBAAiB,EAAE,SAAS,CAAC,KAAM,KAAK,YAC3D,QAAQ,GACF,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/components/ui/icon.tsx"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,QAAQ,CAAC,EAAE,SAAc,EAAE,EAAE,SAAS,2CAkBrD"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export function CopyIcon({ className = '' }) {
|
|
3
|
+
return (_jsx("svg", { className: className, width: "16", height: "16", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3" }) }));
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.js","sourceRoot":"","sources":["../../../src/components/ui/icon.tsx"],"names":[],"mappings":";AAIA,MAAM,UAAU,QAAQ,CAAC,EAAE,SAAS,GAAG,EAAE,EAAa;IACpD,OAAO,CACL,cACE,SAAS,EAAE,SAAS,EACpB,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,OAAO,EAAC,WAAW,YAEnB,eACE,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAE,CAAC,EACd,CAAC,EAAC,8JAA8J,GAChK,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface GridHeightContextValue {
|
|
2
|
+
registerBox: (id: number, height: number) => void;
|
|
3
|
+
unregisterBox: (id: number) => void;
|
|
4
|
+
getBoxId: () => number;
|
|
5
|
+
syncedHeight: number | null;
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const GridHeightContext: import("react").Context<GridHeightContextValue | null>;
|
|
9
|
+
export declare function useGridHeight(): GridHeightContextValue | null;
|
|
10
|
+
export declare function useBoxId(): number;
|
|
11
|
+
//# sourceMappingURL=GridHeightContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridHeightContext.d.ts","sourceRoot":"","sources":["../../src/contexts/GridHeightContext.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,iBAAiB,wDAE7B,CAAC;AAEF,wBAAgB,aAAa,IAAI,sBAAsB,GAAG,IAAI,CAE7D;AAGD,wBAAgB,QAAQ,IAAI,MAAM,CAMjC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createContext, useContext, useRef } from 'react';
|
|
2
|
+
export const GridHeightContext = createContext(null);
|
|
3
|
+
export function useGridHeight() {
|
|
4
|
+
return useContext(GridHeightContext);
|
|
5
|
+
}
|
|
6
|
+
let nextBoxId = 0;
|
|
7
|
+
export function useBoxId() {
|
|
8
|
+
const idRef = useRef(null);
|
|
9
|
+
if (idRef.current === null) {
|
|
10
|
+
idRef.current = nextBoxId++;
|
|
11
|
+
}
|
|
12
|
+
return idRef.current;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=GridHeightContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridHeightContext.js","sourceRoot":"","sources":["../../src/contexts/GridHeightContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAU1D,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAC5C,IAAI,CACL,CAAC;AAEF,MAAM,UAAU,aAAa;IAC3B,OAAO,UAAU,CAAC,iBAAiB,CAAC,CAAC;AACvC,CAAC;AAED,IAAI,SAAS,GAAG,CAAC,CAAC;AAClB,MAAM,UAAU,QAAQ;IACtB,MAAM,KAAK,GAAG,MAAM,CAAgB,IAAI,CAAC,CAAC;IAC1C,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;QAC3B,KAAK,CAAC,OAAO,GAAG,SAAS,EAAE,CAAC;IAC9B,CAAC;IACD,OAAO,KAAK,CAAC,OAAO,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Destination, WalkerOS } from '@walkeros/core';
|
|
2
|
+
/**
|
|
3
|
+
* Formats captured function calls for display
|
|
4
|
+
*
|
|
5
|
+
* @param calls - Array of captured calls with path and args
|
|
6
|
+
* @param defaultMessage - Message to show when no calls captured
|
|
7
|
+
* @returns Formatted string of function calls
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* formatCapturedCalls([
|
|
11
|
+
* { path: ['window', 'gtag'], args: ['config', 'G-XXX'] }
|
|
12
|
+
* ])
|
|
13
|
+
* // Returns: "gtag('config', 'G-XXX');"
|
|
14
|
+
*/
|
|
15
|
+
export declare function formatCapturedCalls(calls: Array<{
|
|
16
|
+
path: string[];
|
|
17
|
+
args: unknown[];
|
|
18
|
+
}>, defaultMessage?: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Creates a capture function for destination init method
|
|
21
|
+
* Uses walkerOS core mockEnv to intercept function calls
|
|
22
|
+
*
|
|
23
|
+
* @param destination - Destination instance with init method
|
|
24
|
+
* @param destinationEnv - Destination's exported env (usually examples.env.push)
|
|
25
|
+
* @returns Async function that executes init and returns formatted output
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* import destinationGtag, { examples } from '@walkeros/web-destination-gtag';
|
|
29
|
+
*
|
|
30
|
+
* const captureFn = captureDestinationInit(destinationGtag, examples.env.push);
|
|
31
|
+
*
|
|
32
|
+
* // Use in DestinationInitDemo
|
|
33
|
+
* <DestinationInitDemo
|
|
34
|
+
* destination={destinationGtag}
|
|
35
|
+
* settings={{ measurementId: 'G-XXX' }}
|
|
36
|
+
* fn={captureFn}
|
|
37
|
+
* />
|
|
38
|
+
*/
|
|
39
|
+
export declare function captureDestinationInit(destination: Destination.Instance, destinationEnv: unknown): (context: Destination.Context) => Promise<string>;
|
|
40
|
+
/**
|
|
41
|
+
* Creates a capture function for destination push method
|
|
42
|
+
* Uses walkerOS core mockEnv to intercept function calls
|
|
43
|
+
*
|
|
44
|
+
* @param destination - Destination instance with push method
|
|
45
|
+
* @param destinationEnv - Destination's exported env (usually examples.env.push)
|
|
46
|
+
* @returns Async function that executes push and returns formatted output
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* import destinationGtag, { examples } from '@walkeros/web-destination-gtag';
|
|
50
|
+
* import { getEvent } from '@walkeros/core';
|
|
51
|
+
*
|
|
52
|
+
* const captureFn = captureDestinationPush(destinationGtag, examples.env.push);
|
|
53
|
+
*
|
|
54
|
+
* // Use in DestinationDemo
|
|
55
|
+
* <DestinationDemo
|
|
56
|
+
* destination={destinationGtag}
|
|
57
|
+
* event={getEvent('order complete')}
|
|
58
|
+
* mapping={examples.mapping.purchase}
|
|
59
|
+
* fn={captureFn}
|
|
60
|
+
* />
|
|
61
|
+
*/
|
|
62
|
+
export declare function captureDestinationPush(destination: Destination.Instance, destinationEnv: unknown): (event: WalkerOS.Event, context: Destination.PushContext) => Promise<string>;
|
|
63
|
+
/**
|
|
64
|
+
* Advanced: Creates a raw capture function that returns call data
|
|
65
|
+
* Use this when you need custom formatting or processing of calls
|
|
66
|
+
*
|
|
67
|
+
* @param destinationEnv - Destination's exported env
|
|
68
|
+
* @returns Function that returns both env and getCalls function
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* const { env, getCalls } = createRawCapture(examples.env.push);
|
|
72
|
+
* await destination.init({ ...context, env });
|
|
73
|
+
* const calls = getCalls();
|
|
74
|
+
* // Process calls as needed
|
|
75
|
+
*/
|
|
76
|
+
export declare function createRawCapture(destinationEnv: unknown): {
|
|
77
|
+
env: Record<string, unknown>;
|
|
78
|
+
getCalls: () => {
|
|
79
|
+
path: string[];
|
|
80
|
+
args: unknown[];
|
|
81
|
+
}[];
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=capture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capture.d.ts","sourceRoot":"","sources":["../../src/helpers/capture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,WAAW,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAEhE;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,IAAI,EAAE,OAAO,EAAE,CAAA;CAAE,CAAC,EACjD,cAAc,SAA+B,GAC5C,MAAM,CAiBR;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,WAAW,CAAC,QAAQ,EACjC,cAAc,EAAE,OAAO,IAET,SAAS,WAAW,CAAC,OAAO,KAAG,OAAO,CAAC,MAAM,CAAC,CAmB7D;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,WAAW,CAAC,QAAQ,EACjC,cAAc,EAAE,OAAO,IAGrB,OAAO,QAAQ,CAAC,KAAK,EACrB,SAAS,WAAW,CAAC,WAAW,KAC/B,OAAO,CAAC,MAAM,CAAC,CAgBnB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,cAAc,EAAE,OAAO;;;cAC3B,MAAM,EAAE;cAAQ,OAAO,EAAE;;EAarD"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { mockEnv } from '@walkeros/core';
|
|
2
|
+
/**
|
|
3
|
+
* Formats captured function calls for display
|
|
4
|
+
*
|
|
5
|
+
* @param calls - Array of captured calls with path and args
|
|
6
|
+
* @param defaultMessage - Message to show when no calls captured
|
|
7
|
+
* @returns Formatted string of function calls
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* formatCapturedCalls([
|
|
11
|
+
* { path: ['window', 'gtag'], args: ['config', 'G-XXX'] }
|
|
12
|
+
* ])
|
|
13
|
+
* // Returns: "gtag('config', 'G-XXX');"
|
|
14
|
+
*/
|
|
15
|
+
export function formatCapturedCalls(calls, defaultMessage = 'No function calls captured') {
|
|
16
|
+
if (calls.length === 0)
|
|
17
|
+
return defaultMessage;
|
|
18
|
+
return calls
|
|
19
|
+
.map(({ path, args }) => {
|
|
20
|
+
const functionName = path[path.length - 1];
|
|
21
|
+
const formattedArgs = args
|
|
22
|
+
.map((arg) => {
|
|
23
|
+
if (typeof arg === 'string')
|
|
24
|
+
return `'${arg}'`;
|
|
25
|
+
if (typeof arg === 'object' && arg !== null)
|
|
26
|
+
return JSON.stringify(arg, null, 2);
|
|
27
|
+
return String(arg);
|
|
28
|
+
})
|
|
29
|
+
.join(', ');
|
|
30
|
+
return `${functionName}(${formattedArgs});`;
|
|
31
|
+
})
|
|
32
|
+
.join('\n\n');
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Creates a capture function for destination init method
|
|
36
|
+
* Uses walkerOS core mockEnv to intercept function calls
|
|
37
|
+
*
|
|
38
|
+
* @param destination - Destination instance with init method
|
|
39
|
+
* @param destinationEnv - Destination's exported env (usually examples.env.push)
|
|
40
|
+
* @returns Async function that executes init and returns formatted output
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* import destinationGtag, { examples } from '@walkeros/web-destination-gtag';
|
|
44
|
+
*
|
|
45
|
+
* const captureFn = captureDestinationInit(destinationGtag, examples.env.push);
|
|
46
|
+
*
|
|
47
|
+
* // Use in DestinationInitDemo
|
|
48
|
+
* <DestinationInitDemo
|
|
49
|
+
* destination={destinationGtag}
|
|
50
|
+
* settings={{ measurementId: 'G-XXX' }}
|
|
51
|
+
* fn={captureFn}
|
|
52
|
+
* />
|
|
53
|
+
*/
|
|
54
|
+
export function captureDestinationInit(destination, destinationEnv) {
|
|
55
|
+
return async (context) => {
|
|
56
|
+
if (!destination.init) {
|
|
57
|
+
return 'No init method found';
|
|
58
|
+
}
|
|
59
|
+
const calls = [];
|
|
60
|
+
// Use walkerOS core mockEnv to intercept all function calls
|
|
61
|
+
const testEnv = mockEnv((destinationEnv || {}), (path, args) => {
|
|
62
|
+
calls.push({ path, args });
|
|
63
|
+
});
|
|
64
|
+
await destination.init({ ...context, env: testEnv });
|
|
65
|
+
return formatCapturedCalls(calls, 'Destination initialized successfully');
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Creates a capture function for destination push method
|
|
70
|
+
* Uses walkerOS core mockEnv to intercept function calls
|
|
71
|
+
*
|
|
72
|
+
* @param destination - Destination instance with push method
|
|
73
|
+
* @param destinationEnv - Destination's exported env (usually examples.env.push)
|
|
74
|
+
* @returns Async function that executes push and returns formatted output
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* import destinationGtag, { examples } from '@walkeros/web-destination-gtag';
|
|
78
|
+
* import { getEvent } from '@walkeros/core';
|
|
79
|
+
*
|
|
80
|
+
* const captureFn = captureDestinationPush(destinationGtag, examples.env.push);
|
|
81
|
+
*
|
|
82
|
+
* // Use in DestinationDemo
|
|
83
|
+
* <DestinationDemo
|
|
84
|
+
* destination={destinationGtag}
|
|
85
|
+
* event={getEvent('order complete')}
|
|
86
|
+
* mapping={examples.mapping.purchase}
|
|
87
|
+
* fn={captureFn}
|
|
88
|
+
* />
|
|
89
|
+
*/
|
|
90
|
+
export function captureDestinationPush(destination, destinationEnv) {
|
|
91
|
+
return async (event, context) => {
|
|
92
|
+
const calls = [];
|
|
93
|
+
// Use walkerOS core mockEnv to intercept all function calls
|
|
94
|
+
const testEnv = mockEnv((destinationEnv || {}), (path, args) => {
|
|
95
|
+
calls.push({ path, args });
|
|
96
|
+
});
|
|
97
|
+
// Call the real destination push with intercepted env
|
|
98
|
+
await destination.push(event, { ...context, env: testEnv });
|
|
99
|
+
return formatCapturedCalls(calls);
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Advanced: Creates a raw capture function that returns call data
|
|
104
|
+
* Use this when you need custom formatting or processing of calls
|
|
105
|
+
*
|
|
106
|
+
* @param destinationEnv - Destination's exported env
|
|
107
|
+
* @returns Function that returns both env and getCalls function
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* const { env, getCalls } = createRawCapture(examples.env.push);
|
|
111
|
+
* await destination.init({ ...context, env });
|
|
112
|
+
* const calls = getCalls();
|
|
113
|
+
* // Process calls as needed
|
|
114
|
+
*/
|
|
115
|
+
export function createRawCapture(destinationEnv) {
|
|
116
|
+
const calls = [];
|
|
117
|
+
const testEnv = mockEnv((destinationEnv || {}), (path, args) => {
|
|
118
|
+
calls.push({ path, args });
|
|
119
|
+
});
|
|
120
|
+
return {
|
|
121
|
+
env: testEnv,
|
|
122
|
+
getCalls: () => calls,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=capture.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capture.js","sourceRoot":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AAC,CACF,CAAC;IAEF,OAAO;QACL,GAAG,EAAE,OAAO;QACZ,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK;KACtB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Destination } from '@walkeros/core';
|
|
2
|
+
export interface DemoEnv extends Destination.BaseEnv {
|
|
3
|
+
elb: (output: string) => void;
|
|
4
|
+
}
|
|
5
|
+
export type DestinationCode = Destination.Instance<Destination.Types<unknown, unknown, DemoEnv>>;
|
|
6
|
+
/**
|
|
7
|
+
* Creates a gtag-style destination for demo purposes.
|
|
8
|
+
* Formats output as: gtag('event', 'event_name', { data })
|
|
9
|
+
*/
|
|
10
|
+
export declare function createGtagDestination(): DestinationCode;
|
|
11
|
+
/**
|
|
12
|
+
* Creates a Facebook Pixel-style destination for demo purposes.
|
|
13
|
+
* Formats output as: fbq('track', 'EventName', { data })
|
|
14
|
+
*/
|
|
15
|
+
export declare function createFbqDestination(): DestinationCode;
|
|
16
|
+
/**
|
|
17
|
+
* Creates a Plausible-style destination for demo purposes.
|
|
18
|
+
* Formats output as: plausible('event_name', { props: { data } })
|
|
19
|
+
*/
|
|
20
|
+
export declare function createPlausibleDestination(): DestinationCode;
|
|
21
|
+
//# sourceMappingURL=destinations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"destinations.d.ts","sourceRoot":"","sources":["../../src/helpers/destinations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAY,MAAM,gBAAgB,CAAC;AAG5D,MAAM,WAAW,OAAQ,SAAQ,WAAW,CAAC,OAAO;IAClD,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B;AAED,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,QAAQ,CAChD,WAAW,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAC7C,CAAC;AAEF;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,eAAe,CAWvD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,eAAe,CAWtD;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,IAAI,eAAe,CAW5D"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a gtag-style destination for demo purposes.
|
|
3
|
+
* Formats output as: gtag('event', 'event_name', { data })
|
|
4
|
+
*/
|
|
5
|
+
export function createGtagDestination() {
|
|
6
|
+
return {
|
|
7
|
+
type: 'gtag',
|
|
8
|
+
config: {},
|
|
9
|
+
push(event, context) {
|
|
10
|
+
const { data, env } = context;
|
|
11
|
+
const formatted = `gtag('event', '${event.name}', ${JSON.stringify(data, null, 2)});`;
|
|
12
|
+
env.elb(formatted);
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Creates a Facebook Pixel-style destination for demo purposes.
|
|
18
|
+
* Formats output as: fbq('track', 'EventName', { data })
|
|
19
|
+
*/
|
|
20
|
+
export function createFbqDestination() {
|
|
21
|
+
return {
|
|
22
|
+
type: 'fbq',
|
|
23
|
+
config: {},
|
|
24
|
+
push(event, context) {
|
|
25
|
+
const { data, env } = context;
|
|
26
|
+
const formatted = `fbq('track', '${event.name}', ${JSON.stringify(data, null, 2)});`;
|
|
27
|
+
env.elb(formatted);
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Creates a Plausible-style destination for demo purposes.
|
|
33
|
+
* Formats output as: plausible('event_name', { props: { data } })
|
|
34
|
+
*/
|
|
35
|
+
export function createPlausibleDestination() {
|
|
36
|
+
return {
|
|
37
|
+
type: 'plausible',
|
|
38
|
+
config: {},
|
|
39
|
+
push(event, context) {
|
|
40
|
+
const { data, env } = context;
|
|
41
|
+
const formatted = `plausible('${event.name}', { props: ${JSON.stringify(data, null, 2)} });`;
|
|
42
|
+
env.elb(formatted);
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=destinations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"destinations.js","sourceRoot":"","sources":["../../src/helpers/destinations.ts"],"names":[],"mappings":"AAWA;;;GAGG;AACH,MAAM,UAAU,qBAAqB;IACnC,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,EAAE;QACV,IAAI,CAAC,KAAK,EAAE,OAAO;YACjB,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;YAE9B,MAAM,SAAS,GAAG,kBAAkB,KAAK,CAAC,IAAI,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;YACtF,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACrB,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oBAAoB;IAClC,OAAO;QACL,IAAI,EAAE,KAAK;QACX,MAAM,EAAE,EAAE;QACV,IAAI,CAAC,KAAK,EAAE,OAAO;YACjB,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;YAE9B,MAAM,SAAS,GAAG,iBAAiB,KAAK,CAAC,IAAI,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;YACrF,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACrB,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,0BAA0B;IACxC,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,EAAE;QACV,IAAI,CAAC,KAAK,EAAE,OAAO;YACjB,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;YAE9B,MAAM,SAAS,GAAG,cAAc,KAAK,CAAC,IA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