@walkeros/explorer 3.1.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1338 -69
- package/dist/index.js +1 -59
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
- package/dist/__mocks__/@monaco-editor/react.d.ts +0 -3
- package/dist/__mocks__/@monaco-editor/react.d.ts.map +0 -1
- package/dist/__mocks__/@monaco-editor/react.js +0 -4
- package/dist/__mocks__/@monaco-editor/react.js.map +0 -1
- package/dist/components/atoms/box.d.ts +0 -27
- package/dist/components/atoms/box.d.ts.map +0 -1
- package/dist/components/atoms/box.js +0 -86
- package/dist/components/atoms/box.js.map +0 -1
- package/dist/components/atoms/box.stories.d.ts +0 -34
- package/dist/components/atoms/box.stories.d.ts.map +0 -1
- package/dist/components/atoms/box.stories.js +0 -104
- package/dist/components/atoms/box.stories.js.map +0 -1
- package/dist/components/atoms/button-group.d.ts +0 -17
- package/dist/components/atoms/button-group.d.ts.map +0 -1
- package/dist/components/atoms/button-group.js +0 -12
- package/dist/components/atoms/button-group.js.map +0 -1
- package/dist/components/atoms/button-group.stories.d.ts +0 -18
- package/dist/components/atoms/button-group.stories.d.ts.map +0 -1
- package/dist/components/atoms/button-group.stories.js +0 -39
- package/dist/components/atoms/button-group.stories.js.map +0 -1
- package/dist/components/atoms/button-link.d.ts +0 -12
- package/dist/components/atoms/button-link.d.ts.map +0 -1
- package/dist/components/atoms/button-link.js +0 -10
- package/dist/components/atoms/button-link.js.map +0 -1
- package/dist/components/atoms/button-link.stories.d.ts +0 -11
- package/dist/components/atoms/button-link.stories.d.ts.map +0 -1
- package/dist/components/atoms/button-link.stories.js +0 -50
- package/dist/components/atoms/button-link.stories.js.map +0 -1
- package/dist/components/atoms/button.d.ts +0 -15
- package/dist/components/atoms/button.d.ts.map +0 -1
- package/dist/components/atoms/button.js +0 -11
- package/dist/components/atoms/button.js.map +0 -1
- package/dist/components/atoms/button.stories.d.ts +0 -14
- package/dist/components/atoms/button.stories.d.ts.map +0 -1
- package/dist/components/atoms/button.stories.js +0 -25
- package/dist/components/atoms/button.stories.js.map +0 -1
- package/dist/components/atoms/code.d.ts +0 -92
- package/dist/components/atoms/code.d.ts.map +0 -1
- package/dist/components/atoms/code.js +0 -405
- package/dist/components/atoms/code.js.map +0 -1
- package/dist/components/atoms/code.stories.d.ts +0 -46
- package/dist/components/atoms/code.stories.d.ts.map +0 -1
- package/dist/components/atoms/code.stories.js +0 -156
- package/dist/components/atoms/code.stories.js.map +0 -1
- package/dist/components/atoms/footer.d.ts +0 -21
- package/dist/components/atoms/footer.d.ts.map +0 -1
- package/dist/components/atoms/footer.js +0 -19
- package/dist/components/atoms/footer.js.map +0 -1
- package/dist/components/atoms/footer.stories.d.ts +0 -14
- package/dist/components/atoms/footer.stories.d.ts.map +0 -1
- package/dist/components/atoms/footer.stories.js +0 -29
- package/dist/components/atoms/footer.stories.js.map +0 -1
- package/dist/components/atoms/grid.d.ts +0 -65
- package/dist/components/atoms/grid.d.ts.map +0 -1
- package/dist/components/atoms/grid.js +0 -169
- package/dist/components/atoms/grid.js.map +0 -1
- package/dist/components/atoms/grid.stories.d.ts +0 -18
- package/dist/components/atoms/grid.stories.d.ts.map +0 -1
- package/dist/components/atoms/grid.stories.js +0 -60
- package/dist/components/atoms/grid.stories.js.map +0 -1
- package/dist/components/atoms/header.d.ts +0 -7
- package/dist/components/atoms/header.d.ts.map +0 -1
- package/dist/components/atoms/header.js +0 -5
- package/dist/components/atoms/header.js.map +0 -1
- package/dist/components/atoms/header.stories.d.ts +0 -15
- package/dist/components/atoms/header.stories.d.ts.map +0 -1
- package/dist/components/atoms/header.stories.js +0 -37
- package/dist/components/atoms/header.stories.js.map +0 -1
- package/dist/components/atoms/icons/icon.stories.d.ts +0 -18
- package/dist/components/atoms/icons/icon.stories.d.ts.map +0 -1
- package/dist/components/atoms/icons/icon.stories.js +0 -37
- package/dist/components/atoms/icons/icon.stories.js.map +0 -1
- package/dist/components/atoms/icons/icons.d.ts +0 -2
- package/dist/components/atoms/icons/icons.d.ts.map +0 -1
- package/dist/components/atoms/icons/icons.js +0 -7
- package/dist/components/atoms/icons/icons.js.map +0 -1
- package/dist/components/atoms/icons/index.d.ts +0 -3
- package/dist/components/atoms/icons/index.d.ts.map +0 -1
- package/dist/components/atoms/icons/index.js +0 -3
- package/dist/components/atoms/icons/index.js.map +0 -1
- package/dist/components/atoms/mdx-code.d.ts +0 -33
- package/dist/components/atoms/mdx-code.d.ts.map +0 -1
- package/dist/components/atoms/mdx-code.js +0 -69
- package/dist/components/atoms/mdx-code.js.map +0 -1
- package/dist/components/atoms/preview-footer.d.ts +0 -32
- package/dist/components/atoms/preview-footer.d.ts.map +0 -1
- package/dist/components/atoms/preview-footer.js +0 -31
- package/dist/components/atoms/preview-footer.js.map +0 -1
- package/dist/components/atoms/spinner.d.ts +0 -17
- package/dist/components/atoms/spinner.d.ts.map +0 -1
- package/dist/components/atoms/spinner.js +0 -14
- package/dist/components/atoms/spinner.js.map +0 -1
- package/dist/components/atoms/spinner.stories.d.ts +0 -7
- package/dist/components/atoms/spinner.stories.d.ts.map +0 -1
- package/dist/components/atoms/spinner.stories.js +0 -9
- package/dist/components/atoms/spinner.stories.js.map +0 -1
- package/dist/components/atoms/toggle.d.ts +0 -9
- package/dist/components/atoms/toggle.d.ts.map +0 -1
- package/dist/components/atoms/toggle.js +0 -6
- package/dist/components/atoms/toggle.js.map +0 -1
- package/dist/components/demos/DestinationDemo.d.ts +0 -48
- package/dist/components/demos/DestinationDemo.d.ts.map +0 -1
- package/dist/components/demos/DestinationDemo.js +0 -105
- package/dist/components/demos/DestinationDemo.js.map +0 -1
- package/dist/components/demos/DestinationDemo.stories.d.ts +0 -17
- package/dist/components/demos/DestinationDemo.stories.d.ts.map +0 -1
- package/dist/components/demos/DestinationDemo.stories.js +0 -53
- package/dist/components/demos/DestinationDemo.stories.js.map +0 -1
- package/dist/components/demos/DestinationInitDemo.d.ts +0 -34
- package/dist/components/demos/DestinationInitDemo.d.ts.map +0 -1
- package/dist/components/demos/DestinationInitDemo.js +0 -73
- package/dist/components/demos/DestinationInitDemo.js.map +0 -1
- package/dist/components/demos/DestinationInitDemo.stories.d.ts +0 -17
- package/dist/components/demos/DestinationInitDemo.stories.d.ts.map +0 -1
- package/dist/components/demos/DestinationInitDemo.stories.js +0 -39
- package/dist/components/demos/DestinationInitDemo.stories.js.map +0 -1
- package/dist/components/demos/PromotionPlayground.d.ts +0 -30
- package/dist/components/demos/PromotionPlayground.d.ts.map +0 -1
- package/dist/components/demos/PromotionPlayground.js +0 -366
- package/dist/components/demos/PromotionPlayground.js.map +0 -1
- package/dist/components/demos/PromotionPlayground.stories.d.ts +0 -27
- package/dist/components/demos/PromotionPlayground.stories.d.ts.map +0 -1
- package/dist/components/demos/PromotionPlayground.stories.js +0 -32
- package/dist/components/demos/PromotionPlayground.stories.js.map +0 -1
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.d.ts +0 -24
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.d.ts.map +0 -1
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.js +0 -10
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.js.map +0 -1
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.stories.d.ts +0 -7
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.stories.d.ts.map +0 -1
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.stories.js +0 -71
- package/dist/components/molecules/architecture-flow/ArchitectureFlow.stories.js.map +0 -1
- package/dist/components/molecules/architecture-flow/index.d.ts +0 -3
- package/dist/components/molecules/architecture-flow/index.d.ts.map +0 -1
- package/dist/components/molecules/architecture-flow/index.js +0 -2
- package/dist/components/molecules/architecture-flow/index.js.map +0 -1
- package/dist/components/molecules/code-box.d.ts +0 -75
- package/dist/components/molecules/code-box.d.ts.map +0 -1
- package/dist/components/molecules/code-box.js +0 -174
- package/dist/components/molecules/code-box.js.map +0 -1
- package/dist/components/molecules/code-box.stories.d.ts +0 -87
- package/dist/components/molecules/code-box.stories.d.ts.map +0 -1
- package/dist/components/molecules/code-box.stories.js +0 -300
- package/dist/components/molecules/code-box.stories.js.map +0 -1
- package/dist/components/molecules/code-snippet.d.ts +0 -58
- package/dist/components/molecules/code-snippet.d.ts.map +0 -1
- package/dist/components/molecules/code-snippet.js +0 -72
- package/dist/components/molecules/code-snippet.js.map +0 -1
- package/dist/components/molecules/code-snippet.stories.d.ts +0 -23
- package/dist/components/molecules/code-snippet.stories.d.ts.map +0 -1
- package/dist/components/molecules/code-snippet.stories.js +0 -87
- package/dist/components/molecules/code-snippet.stories.js.map +0 -1
- package/dist/components/molecules/dropdown.d.ts +0 -68
- package/dist/components/molecules/dropdown.d.ts.map +0 -1
- package/dist/components/molecules/dropdown.js +0 -47
- package/dist/components/molecules/dropdown.js.map +0 -1
- package/dist/components/molecules/dropdown.stories.d.ts +0 -7
- package/dist/components/molecules/dropdown.stories.d.ts.map +0 -1
- package/dist/components/molecules/dropdown.stories.js +0 -18
- package/dist/components/molecules/dropdown.stories.js.map +0 -1
- package/dist/components/molecules/flow-map/FlowMap.d.ts +0 -74
- package/dist/components/molecules/flow-map/FlowMap.d.ts.map +0 -1
- package/dist/components/molecules/flow-map/FlowMap.js +0 -1039
- package/dist/components/molecules/flow-map/FlowMap.js.map +0 -1
- package/dist/components/molecules/flow-map/FlowMap.stories.d.ts +0 -47
- package/dist/components/molecules/flow-map/FlowMap.stories.d.ts.map +0 -1
- package/dist/components/molecules/flow-map/FlowMap.stories.js +0 -355
- package/dist/components/molecules/flow-map/FlowMap.stories.js.map +0 -1
- package/dist/components/molecules/flow-map/FlowMap.transformers.stories.d.ts +0 -29
- package/dist/components/molecules/flow-map/FlowMap.transformers.stories.d.ts.map +0 -1
- package/dist/components/molecules/flow-map/FlowMap.transformers.stories.js +0 -117
- package/dist/components/molecules/flow-map/FlowMap.transformers.stories.js.map +0 -1
- package/dist/components/molecules/flow-map/index.d.ts +0 -3
- package/dist/components/molecules/flow-map/index.d.ts.map +0 -1
- package/dist/components/molecules/flow-map/index.js +0 -2
- package/dist/components/molecules/flow-map/index.js.map +0 -1
- package/dist/components/molecules/preview.d.ts +0 -23
- package/dist/components/molecules/preview.d.ts.map +0 -1
- package/dist/components/molecules/preview.js +0 -232
- package/dist/components/molecules/preview.js.map +0 -1
- package/dist/components/molecules/preview.stories.d.ts +0 -23
- package/dist/components/molecules/preview.stories.d.ts.map +0 -1
- package/dist/components/molecules/preview.stories.js +0 -186
- package/dist/components/molecules/preview.stories.js.map +0 -1
- package/dist/components/molecules/property-table.d.ts +0 -7
- package/dist/components/molecules/property-table.d.ts.map +0 -1
- package/dist/components/molecules/property-table.js +0 -88
- package/dist/components/molecules/property-table.js.map +0 -1
- package/dist/components/molecules/property-table.stories.d.ts +0 -24
- package/dist/components/molecules/property-table.stories.d.ts.map +0 -1
- package/dist/components/molecules/property-table.stories.js +0 -86
- package/dist/components/molecules/property-table.stories.js.map +0 -1
- package/dist/components/organisms/browser-box.d.ts +0 -31
- package/dist/components/organisms/browser-box.d.ts.map +0 -1
- package/dist/components/organisms/browser-box.js +0 -80
- package/dist/components/organisms/browser-box.js.map +0 -1
- package/dist/components/organisms/browser-box.stories.d.ts +0 -26
- package/dist/components/organisms/browser-box.stories.d.ts.map +0 -1
- package/dist/components/organisms/browser-box.stories.js +0 -102
- package/dist/components/organisms/browser-box.stories.js.map +0 -1
- package/dist/components/organisms/collector-box.d.ts +0 -24
- package/dist/components/organisms/collector-box.d.ts.map +0 -1
- package/dist/components/organisms/collector-box.js +0 -56
- package/dist/components/organisms/collector-box.js.map +0 -1
- package/dist/components/organisms/collector-box.stories.d.ts +0 -22
- package/dist/components/organisms/collector-box.stories.d.ts.map +0 -1
- package/dist/components/organisms/collector-box.stories.js +0 -59
- package/dist/components/organisms/collector-box.stories.js.map +0 -1
- package/dist/components/organisms/live-code.d.ts +0 -22
- package/dist/components/organisms/live-code.d.ts.map +0 -1
- package/dist/components/organisms/live-code.js +0 -50
- package/dist/components/organisms/live-code.js.map +0 -1
- package/dist/components/organisms/live-code.stories.d.ts +0 -24
- package/dist/components/organisms/live-code.stories.d.ts.map +0 -1
- package/dist/components/organisms/live-code.stories.js +0 -55
- package/dist/components/organisms/live-code.stories.js.map +0 -1
- package/dist/components/ui/button.d.ts +0 -4
- package/dist/components/ui/button.d.ts.map +0 -1
- package/dist/components/ui/button.js +0 -6
- package/dist/components/ui/button.js.map +0 -1
- package/dist/components/ui/icon.d.ts +0 -5
- package/dist/components/ui/icon.d.ts.map +0 -1
- package/dist/components/ui/icon.js +0 -5
- package/dist/components/ui/icon.js.map +0 -1
- package/dist/contexts/GridHeightContext.d.ts +0 -11
- package/dist/contexts/GridHeightContext.d.ts.map +0 -1
- package/dist/contexts/GridHeightContext.js +0 -14
- package/dist/contexts/GridHeightContext.js.map +0 -1
- package/dist/helpers/capture.d.ts +0 -83
- package/dist/helpers/capture.d.ts.map +0 -1
- package/dist/helpers/capture.js +0 -125
- package/dist/helpers/capture.js.map +0 -1
- package/dist/helpers/destinations.d.ts +0 -21
- package/dist/helpers/destinations.d.ts.map +0 -1
- package/dist/helpers/destinations.js +0 -46
- package/dist/helpers/destinations.js.map +0 -1
- package/dist/hooks/useDropdown.d.ts +0 -34
- package/dist/hooks/useDropdown.d.ts.map +0 -1
- package/dist/hooks/useDropdown.js +0 -66
- package/dist/hooks/useDropdown.js.map +0 -1
- package/dist/hooks/useMonacoHeight.d.ts +0 -31
- package/dist/hooks/useMonacoHeight.d.ts.map +0 -1
- package/dist/hooks/useMonacoHeight.js +0 -83
- package/dist/hooks/useMonacoHeight.js.map +0 -1
- package/dist/hooks/useTreeState.d.ts +0 -32
- package/dist/hooks/useTreeState.d.ts.map +0 -1
- package/dist/hooks/useTreeState.js +0 -94
- package/dist/hooks/useTreeState.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/lib/utils.d.ts +0 -7
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js +0 -10
- package/dist/lib/utils.js.map +0 -1
- package/dist/providers/MDXProvider.d.ts +0 -40
- package/dist/providers/MDXProvider.d.ts.map +0 -1
- package/dist/providers/MDXProvider.js +0 -57
- package/dist/providers/MDXProvider.js.map +0 -1
- package/dist/themes/index.d.ts +0 -23
- package/dist/themes/index.d.ts.map +0 -1
- package/dist/themes/index.js +0 -29
- package/dist/themes/index.js.map +0 -1
- package/dist/themes/lighthouse.d.ts +0 -26
- package/dist/themes/lighthouse.d.ts.map +0 -1
- package/dist/themes/lighthouse.js +0 -230
- package/dist/themes/lighthouse.js.map +0 -1
- package/dist/themes/palenight.d.ts +0 -31
- package/dist/themes/palenight.d.ts.map +0 -1
- package/dist/themes/palenight.js +0 -236
- package/dist/themes/palenight.js.map +0 -1
- package/dist/themes/types.d.ts +0 -103
- package/dist/themes/types.d.ts.map +0 -1
- package/dist/themes/types.js +0 -8
- package/dist/themes/types.js.map +0 -1
- package/dist/types/intellisense.d.ts +0 -33
- package/dist/types/intellisense.d.ts.map +0 -1
- package/dist/types/intellisense.js +0 -2
- package/dist/types/intellisense.js.map +0 -1
- package/dist/utils/code-normalizer.d.ts +0 -11
- package/dist/utils/code-normalizer.d.ts.map +0 -1
- package/dist/utils/code-normalizer.js +0 -21
- package/dist/utils/code-normalizer.js.map +0 -1
- package/dist/utils/contract-path-walker.d.ts +0 -27
- package/dist/utils/contract-path-walker.d.ts.map +0 -1
- package/dist/utils/contract-path-walker.js +0 -145
- package/dist/utils/contract-path-walker.js.map +0 -1
- package/dist/utils/format-code.d.ts +0 -9
- package/dist/utils/format-code.d.ts.map +0 -1
- package/dist/utils/format-code.js +0 -77
- package/dist/utils/format-code.js.map +0 -1
- package/dist/utils/mapping-context-detector.d.ts +0 -17
- package/dist/utils/mapping-context-detector.d.ts.map +0 -1
- package/dist/utils/mapping-context-detector.js +0 -22
- package/dist/utils/mapping-context-detector.js.map +0 -1
- package/dist/utils/monaco-context-types.d.ts +0 -39
- package/dist/utils/monaco-context-types.d.ts.map +0 -1
- package/dist/utils/monaco-context-types.js +0 -426
- package/dist/utils/monaco-context-types.js.map +0 -1
- package/dist/utils/monaco-decorators.d.ts +0 -17
- package/dist/utils/monaco-decorators.d.ts.map +0 -1
- package/dist/utils/monaco-decorators.js +0 -81
- package/dist/utils/monaco-decorators.js.map +0 -1
- package/dist/utils/monaco-formatters.d.ts +0 -16
- package/dist/utils/monaco-formatters.d.ts.map +0 -1
- package/dist/utils/monaco-formatters.js +0 -139
- package/dist/utils/monaco-formatters.js.map +0 -1
- package/dist/utils/monaco-intellisense-flow-extractor.d.ts +0 -13
- package/dist/utils/monaco-intellisense-flow-extractor.d.ts.map +0 -1
- package/dist/utils/monaco-intellisense-flow-extractor.js +0 -168
- package/dist/utils/monaco-intellisense-flow-extractor.js.map +0 -1
- package/dist/utils/monaco-json-path.d.ts +0 -12
- package/dist/utils/monaco-json-path.d.ts.map +0 -1
- package/dist/utils/monaco-json-path.js +0 -68
- package/dist/utils/monaco-json-path.js.map +0 -1
- package/dist/utils/monaco-json-schema.d.ts +0 -45
- package/dist/utils/monaco-json-schema.d.ts.map +0 -1
- package/dist/utils/monaco-json-schema.js +0 -90
- package/dist/utils/monaco-json-schema.js.map +0 -1
- package/dist/utils/monaco-schema-contract.d.ts +0 -8
- package/dist/utils/monaco-schema-contract.d.ts.map +0 -1
- package/dist/utils/monaco-schema-contract.js +0 -73
- package/dist/utils/monaco-schema-contract.js.map +0 -1
- package/dist/utils/monaco-schema-enrichment.d.ts +0 -26
- package/dist/utils/monaco-schema-enrichment.d.ts.map +0 -1
- package/dist/utils/monaco-schema-enrichment.js +0 -31
- package/dist/utils/monaco-schema-enrichment.js.map +0 -1
- package/dist/utils/monaco-schema-flow-config.d.ts +0 -10
- package/dist/utils/monaco-schema-flow-config.d.ts.map +0 -1
- package/dist/utils/monaco-schema-flow-config.js +0 -201
- package/dist/utils/monaco-schema-flow-config.js.map +0 -1
- package/dist/utils/monaco-schema-variables.d.ts +0 -4
- package/dist/utils/monaco-schema-variables.d.ts.map +0 -1
- package/dist/utils/monaco-schema-variables.js +0 -26
- package/dist/utils/monaco-schema-variables.js.map +0 -1
- package/dist/utils/monaco-types.d.ts +0 -174
- package/dist/utils/monaco-types.d.ts.map +0 -1
- package/dist/utils/monaco-types.js +0 -378
- package/dist/utils/monaco-types.js.map +0 -1
- package/dist/utils/monaco-walkeros-completions.d.ts +0 -23
- package/dist/utils/monaco-walkeros-completions.d.ts.map +0 -1
- package/dist/utils/monaco-walkeros-completions.js +0 -258
- package/dist/utils/monaco-walkeros-completions.js.map +0 -1
- package/dist/utils/monaco-walkeros-decorations.d.ts +0 -29
- package/dist/utils/monaco-walkeros-decorations.d.ts.map +0 -1
- package/dist/utils/monaco-walkeros-decorations.js +0 -87
- package/dist/utils/monaco-walkeros-decorations.js.map +0 -1
- package/dist/utils/monaco-walkeros-markers.d.ts +0 -13
- package/dist/utils/monaco-walkeros-markers.d.ts.map +0 -1
- package/dist/utils/monaco-walkeros-markers.js +0 -69
- package/dist/utils/monaco-walkeros-markers.js.map +0 -1
- package/dist/utils/monaco-walkeros-providers.d.ts +0 -19
- package/dist/utils/monaco-walkeros-providers.d.ts.map +0 -1
- package/dist/utils/monaco-walkeros-providers.js +0 -284
- package/dist/utils/monaco-walkeros-providers.js.map +0 -1
- package/dist/utils/path-analyzer.d.ts +0 -88
- package/dist/utils/path-analyzer.d.ts.map +0 -1
- package/dist/utils/path-analyzer.js +0 -215
- package/dist/utils/path-analyzer.js.map +0 -1
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { RefObject } from 'react';
|
|
2
|
-
export interface UseDropdownReturn {
|
|
3
|
-
/** Whether dropdown is currently open */
|
|
4
|
-
isOpen: boolean;
|
|
5
|
-
/** Toggle dropdown open/closed */
|
|
6
|
-
toggle: () => void;
|
|
7
|
-
/** Open the dropdown */
|
|
8
|
-
open: () => void;
|
|
9
|
-
/** Close the dropdown */
|
|
10
|
-
close: () => void;
|
|
11
|
-
/** Ref to attach to the container element for click-outside detection */
|
|
12
|
-
containerRef: RefObject<HTMLDivElement | null>;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* useDropdown - Manages dropdown open/close state with click-outside and keyboard handling
|
|
16
|
-
*
|
|
17
|
-
* Provides:
|
|
18
|
-
* - Open/close state management
|
|
19
|
-
* - Click-outside detection to close
|
|
20
|
-
* - Escape key handling to close
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* const { isOpen, toggle, close, containerRef } = useDropdown();
|
|
24
|
-
*
|
|
25
|
-
* return (
|
|
26
|
-
* <div ref={containerRef}>
|
|
27
|
-
* <Dropdown isOpen={isOpen} onToggle={toggle}>
|
|
28
|
-
* ...
|
|
29
|
-
* </Dropdown>
|
|
30
|
-
* </div>
|
|
31
|
-
* );
|
|
32
|
-
*/
|
|
33
|
-
export declare function useDropdown(): UseDropdownReturn;
|
|
34
|
-
//# sourceMappingURL=useDropdown.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDropdown.d.ts","sourceRoot":"","sources":["../../src/hooks/useDropdown.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,iBAAiB;IAChC,yCAAyC;IACzC,MAAM,EAAE,OAAO,CAAC;IAChB,kCAAkC;IAClC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,wBAAwB;IACxB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,yBAAyB;IACzB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,yEAAyE;IACzE,YAAY,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CAChD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,IAAI,iBAAiB,CAsD/C"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* useDropdown - Manages dropdown open/close state with click-outside and keyboard handling
|
|
4
|
-
*
|
|
5
|
-
* Provides:
|
|
6
|
-
* - Open/close state management
|
|
7
|
-
* - Click-outside detection to close
|
|
8
|
-
* - Escape key handling to close
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* const { isOpen, toggle, close, containerRef } = useDropdown();
|
|
12
|
-
*
|
|
13
|
-
* return (
|
|
14
|
-
* <div ref={containerRef}>
|
|
15
|
-
* <Dropdown isOpen={isOpen} onToggle={toggle}>
|
|
16
|
-
* ...
|
|
17
|
-
* </Dropdown>
|
|
18
|
-
* </div>
|
|
19
|
-
* );
|
|
20
|
-
*/
|
|
21
|
-
export function useDropdown() {
|
|
22
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
23
|
-
const containerRef = useRef(null);
|
|
24
|
-
const toggle = useCallback(() => {
|
|
25
|
-
setIsOpen((prev) => !prev);
|
|
26
|
-
}, []);
|
|
27
|
-
const open = useCallback(() => {
|
|
28
|
-
setIsOpen(true);
|
|
29
|
-
}, []);
|
|
30
|
-
const close = useCallback(() => {
|
|
31
|
-
setIsOpen(false);
|
|
32
|
-
}, []);
|
|
33
|
-
// Close on click outside
|
|
34
|
-
useEffect(() => {
|
|
35
|
-
if (!isOpen)
|
|
36
|
-
return;
|
|
37
|
-
function handleClickOutside(event) {
|
|
38
|
-
if (containerRef.current &&
|
|
39
|
-
!containerRef.current.contains(event.target)) {
|
|
40
|
-
setIsOpen(false);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
document.addEventListener('mousedown', handleClickOutside);
|
|
44
|
-
return () => document.removeEventListener('mousedown', handleClickOutside);
|
|
45
|
-
}, [isOpen]);
|
|
46
|
-
// Close on Escape key
|
|
47
|
-
useEffect(() => {
|
|
48
|
-
if (!isOpen)
|
|
49
|
-
return;
|
|
50
|
-
function handleEscape(event) {
|
|
51
|
-
if (event.key === 'Escape') {
|
|
52
|
-
setIsOpen(false);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
document.addEventListener('keydown', handleEscape);
|
|
56
|
-
return () => document.removeEventListener('keydown', handleEscape);
|
|
57
|
-
}, [isOpen]);
|
|
58
|
-
return {
|
|
59
|
-
isOpen,
|
|
60
|
-
toggle,
|
|
61
|
-
open,
|
|
62
|
-
close,
|
|
63
|
-
containerRef,
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=useDropdown.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDropdown.js","sourceRoot":"","sources":["../../src/hooks/useDropdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAgBjE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,WAAW;IACzB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAElD,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,EAAE;QAC9B,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,EAAE;QAC5B,SAAS,CAAC,IAAI,CAAC,CAAC;IAClB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE;QAC7B,SAAS,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,yBAAyB;IACzB,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM;YAAE,OAAO;QAEpB,SAAS,kBAAkB,CAAC,KAAiB;YAC3C,IACE,YAAY,CAAC,OAAO;gBACpB,CAAC,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,EACpD,CAAC;gBACD,SAAS,CAAC,KAAK,CAAC,CAAC;YACnB,CAAC;QACH,CAAC;QAED,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;QAC3D,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;IAC7E,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,sBAAsB;IACtB,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM;YAAE,OAAO;QAEpB,SAAS,YAAY,CAAC,KAAoB;YACxC,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,EAAE,CAAC;gBAC3B,SAAS,CAAC,KAAK,CAAC,CAAC;YACnB,CAAC;QACH,CAAC;QAED,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;QACnD,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IACrE,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,OAAO;QACL,MAAM;QACN,MAAM;QACN,IAAI;QACJ,KAAK;QACL,YAAY;KACb,CAAC;AACJ,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { editor } from 'monaco-editor';
|
|
2
|
-
export interface UseMonacoHeightOptions {
|
|
3
|
-
enabled?: boolean;
|
|
4
|
-
minHeight?: number;
|
|
5
|
-
maxHeight?: number;
|
|
6
|
-
defaultHeight?: number;
|
|
7
|
-
onHeightChange?: (height: number) => void;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Hook to automatically calculate Monaco Editor height based on content
|
|
11
|
-
*
|
|
12
|
-
* @param enabled - Whether to enable auto-height calculation
|
|
13
|
-
* @param minHeight - Minimum height in pixels (default: 100)
|
|
14
|
-
* @param maxHeight - Maximum height in pixels (default: 800)
|
|
15
|
-
* @param defaultHeight - Default height when not auto-sizing (default: 400)
|
|
16
|
-
*
|
|
17
|
-
* @returns [height, setEditor] - Current height and function to register editor instance
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* const [height, setEditor] = useMonacoHeight({ enabled: autoHeight });
|
|
21
|
-
*
|
|
22
|
-
* <Editor
|
|
23
|
-
* height={height}
|
|
24
|
-
* onMount={(editor) => setEditor(editor)}
|
|
25
|
-
* />
|
|
26
|
-
*/
|
|
27
|
-
export declare function useMonacoHeight({ enabled, minHeight, maxHeight, defaultHeight, onHeightChange, }?: UseMonacoHeightOptions): [
|
|
28
|
-
number,
|
|
29
|
-
(editor: editor.IStandaloneCodeEditor | null) => void
|
|
30
|
-
];
|
|
31
|
-
//# sourceMappingURL=useMonacoHeight.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useMonacoHeight.d.ts","sourceRoot":"","sources":["../../src/hooks/useMonacoHeight.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,eAAe,CAAC,EAC9B,OAAe,EACf,SAAe,EACf,SAAe,EACf,aAAmB,EACnB,cAAc,GACf,GAAE,sBAA2B,GAAG;IAC/B,MAAM;IACN,CAAC,MAAM,EAAE,MAAM,CAAC,qBAAqB,GAAG,IAAI,KAAK,IAAI;CACtD,CAkFA"}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { useState, useRef, useCallback } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Hook to automatically calculate Monaco Editor height based on content
|
|
4
|
-
*
|
|
5
|
-
* @param enabled - Whether to enable auto-height calculation
|
|
6
|
-
* @param minHeight - Minimum height in pixels (default: 100)
|
|
7
|
-
* @param maxHeight - Maximum height in pixels (default: 800)
|
|
8
|
-
* @param defaultHeight - Default height when not auto-sizing (default: 400)
|
|
9
|
-
*
|
|
10
|
-
* @returns [height, setEditor] - Current height and function to register editor instance
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* const [height, setEditor] = useMonacoHeight({ enabled: autoHeight });
|
|
14
|
-
*
|
|
15
|
-
* <Editor
|
|
16
|
-
* height={height}
|
|
17
|
-
* onMount={(editor) => setEditor(editor)}
|
|
18
|
-
* />
|
|
19
|
-
*/
|
|
20
|
-
export function useMonacoHeight({ enabled = false, minHeight = 100, maxHeight = 800, defaultHeight = 400, onHeightChange, } = {}) {
|
|
21
|
-
const [height, setHeight] = useState(enabled ? minHeight : defaultHeight);
|
|
22
|
-
const editorRef = useRef(null);
|
|
23
|
-
const previousHeightRef = useRef(enabled ? minHeight : defaultHeight);
|
|
24
|
-
const updateTimeoutRef = useRef(null);
|
|
25
|
-
const updateHeight = useCallback(() => {
|
|
26
|
-
if (!enabled || !editorRef.current)
|
|
27
|
-
return;
|
|
28
|
-
try {
|
|
29
|
-
const monacoContentHeight = editorRef.current.getContentHeight();
|
|
30
|
-
const boundedMonacoHeight = Math.max(minHeight, Math.min(maxHeight, monacoContentHeight));
|
|
31
|
-
if (boundedMonacoHeight === previousHeightRef.current) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
previousHeightRef.current = boundedMonacoHeight;
|
|
35
|
-
setHeight(boundedMonacoHeight);
|
|
36
|
-
if (onHeightChange) {
|
|
37
|
-
const HEADER_HEIGHT = 36;
|
|
38
|
-
const BORDER = 2;
|
|
39
|
-
const totalBoxHeight = boundedMonacoHeight + HEADER_HEIGHT + BORDER;
|
|
40
|
-
onHeightChange(totalBoxHeight);
|
|
41
|
-
}
|
|
42
|
-
// Note: We don't call editor.layout() here because Monaco's
|
|
43
|
-
// automaticLayout option handles layout updates automatically.
|
|
44
|
-
// Calling layout() here would create a feedback loop with
|
|
45
|
-
// onDidContentSizeChange, causing height to grow indefinitely.
|
|
46
|
-
}
|
|
47
|
-
catch (error) {
|
|
48
|
-
// Silently fail - editor might not be fully initialized
|
|
49
|
-
}
|
|
50
|
-
}, [enabled, minHeight, maxHeight, onHeightChange]);
|
|
51
|
-
const setEditor = useCallback((editor) => {
|
|
52
|
-
// Clean up previous timeout if it exists
|
|
53
|
-
if (updateTimeoutRef.current) {
|
|
54
|
-
clearTimeout(updateTimeoutRef.current);
|
|
55
|
-
updateTimeoutRef.current = null;
|
|
56
|
-
}
|
|
57
|
-
editorRef.current = editor;
|
|
58
|
-
if (!enabled || !editor) {
|
|
59
|
-
setHeight(defaultHeight);
|
|
60
|
-
previousHeightRef.current = defaultHeight;
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
// Trigger initial height calculation
|
|
64
|
-
setTimeout(() => updateHeight(), 50);
|
|
65
|
-
// Listen for content changes with debouncing
|
|
66
|
-
const disposable = editor.onDidContentSizeChange(() => {
|
|
67
|
-
// Clear any pending update
|
|
68
|
-
if (updateTimeoutRef.current) {
|
|
69
|
-
clearTimeout(updateTimeoutRef.current);
|
|
70
|
-
}
|
|
71
|
-
// Debounce updates to prevent rapid-fire recalculations
|
|
72
|
-
updateTimeoutRef.current = setTimeout(() => {
|
|
73
|
-
updateHeight();
|
|
74
|
-
updateTimeoutRef.current = null;
|
|
75
|
-
}, 150);
|
|
76
|
-
});
|
|
77
|
-
// Store disposable for cleanup
|
|
78
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
79
|
-
editor.__heightDisposable = disposable;
|
|
80
|
-
}, [enabled, defaultHeight, updateHeight]);
|
|
81
|
-
return [height, setEditor];
|
|
82
|
-
}
|
|
83
|
-
//# sourceMappingURL=useMonacoHeight.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useMonacoHeight.js","sourceRoot":"","sources":["../../src/hooks/useMonacoHeight.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAWjE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,eAAe,CAAC,EAC9B,OAAO,GAAG,KAAK,EACf,SAAS,GAAG,GAAG,EACf,SAAS,GAAG,GAAG,EACf,aAAa,GAAG,GAAG,EACnB,cAAc,MACY,EAAE;IAI5B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAClC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CACpC,CAAC;IACF,MAAM,SAAS,GAAG,MAAM,CAAsC,IAAI,CAAC,CAAC;IACpE,MAAM,iBAAiB,GAAG,MAAM,CAAS,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;IAC9E,MAAM,gBAAgB,GAAG,MAAM,CAAwB,IAAI,CAAC,CAAC;IAE7D,MAAM,YAAY,GAAG,WAAW,CAAC,GAAG,EAAE;QACpC,IAAI,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO;YAAE,OAAO;QAE3C,IAAI,CAAC;YACH,MAAM,mBAAmB,GAAG,SAAS,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;YACjE,MAAM,mBAAmB,GAAG,IAAI,CAAC,GAAG,CAClC,SAAS,EACT,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,mBAAmB,CAAC,CACzC,CAAC;YAEF,IAAI,mBAAmB,KAAK,iBAAiB,CAAC,OAAO,EAAE,CAAC;gBACtD,OAAO;YACT,CAAC;YAED,iBAAi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DAAwD;YACxD,gBAAgB,CAAC,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;gBACzC,YAAY,EAAE,CAAC;gBACf,gBAAgB,CAAC,OAAO,GAAG,IAAI,CAAC;YAClC,CAAC,EAAE,GAAG,CAAC,CAAC;QACV,CAAC,CAAC,CAAC;QAEH,+BAA+B;QAC/B,8DAA8D;QAC7D,MAAc,CAAC,kBAAkB,GAAG,UAAU,CAAC;IAClD,CAAC,EACD,CAAC,OAAO,EAAE,aAAa,EAAE,YAAY,CAAC,CACvC,CAAC;IAEF,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tree expand/collapse state management
|
|
3
|
-
*
|
|
4
|
-
* Manages which paths in a tree view are expanded or collapsed.
|
|
5
|
-
* This hook is UI-agnostic and can be used with any tree structure.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* const treeState = useTreeState(['']); // Root expanded by default
|
|
9
|
-
*
|
|
10
|
-
* // Check if expanded
|
|
11
|
-
* if (treeState.isExpanded(['product', 'view'])) { ... }
|
|
12
|
-
*
|
|
13
|
-
* // Toggle expansion
|
|
14
|
-
* treeState.togglePath(['product', 'view']);
|
|
15
|
-
*
|
|
16
|
-
* // Expand specific path
|
|
17
|
-
* treeState.expandPath(['product', 'view', 'data']);
|
|
18
|
-
*
|
|
19
|
-
* // Collapse specific path
|
|
20
|
-
* treeState.collapsePath(['product']);
|
|
21
|
-
*/
|
|
22
|
-
export declare function useTreeState(initialExpanded?: string[][]): {
|
|
23
|
-
expandedPaths: Set<string>;
|
|
24
|
-
isExpanded: (path: string[]) => boolean;
|
|
25
|
-
togglePath: (path: string[]) => void;
|
|
26
|
-
expandPath: (path: string[]) => void;
|
|
27
|
-
collapsePath: (path: string[]) => void;
|
|
28
|
-
expandAll: (allPaths: string[][]) => void;
|
|
29
|
-
collapseAll: () => void;
|
|
30
|
-
};
|
|
31
|
-
export type TreeState = ReturnType<typeof useTreeState>;
|
|
32
|
-
//# sourceMappingURL=useTreeState.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useTreeState.d.ts","sourceRoot":"","sources":["../../src/hooks/useTreeState.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,YAAY,CAAC,eAAe,GAAE,MAAM,EAAE,EAAS;;uBASpD,MAAM,EAAE,KAAG,OAAO;uBAUW,MAAM,EAAE;uBAgBR,MAAM,EAAE;yBAYN,MAAM,EAAE;0BAYP,MAAM,EAAE,EAAE;;EAoBpD;AAED,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { useState, useCallback } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Tree expand/collapse state management
|
|
4
|
-
*
|
|
5
|
-
* Manages which paths in a tree view are expanded or collapsed.
|
|
6
|
-
* This hook is UI-agnostic and can be used with any tree structure.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* const treeState = useTreeState(['']); // Root expanded by default
|
|
10
|
-
*
|
|
11
|
-
* // Check if expanded
|
|
12
|
-
* if (treeState.isExpanded(['product', 'view'])) { ... }
|
|
13
|
-
*
|
|
14
|
-
* // Toggle expansion
|
|
15
|
-
* treeState.togglePath(['product', 'view']);
|
|
16
|
-
*
|
|
17
|
-
* // Expand specific path
|
|
18
|
-
* treeState.expandPath(['product', 'view', 'data']);
|
|
19
|
-
*
|
|
20
|
-
* // Collapse specific path
|
|
21
|
-
* treeState.collapsePath(['product']);
|
|
22
|
-
*/
|
|
23
|
-
export function useTreeState(initialExpanded = [[]]) {
|
|
24
|
-
const [expandedPaths, setExpandedPaths] = useState(() => {
|
|
25
|
-
return new Set(initialExpanded.map((path) => path.join('.')));
|
|
26
|
-
});
|
|
27
|
-
/**
|
|
28
|
-
* Check if a path is expanded
|
|
29
|
-
*/
|
|
30
|
-
const isExpanded = useCallback((path) => {
|
|
31
|
-
const pathKey = path.join('.');
|
|
32
|
-
return expandedPaths.has(pathKey);
|
|
33
|
-
}, [expandedPaths]);
|
|
34
|
-
/**
|
|
35
|
-
* Toggle path expansion
|
|
36
|
-
*/
|
|
37
|
-
const togglePath = useCallback((path) => {
|
|
38
|
-
const pathKey = path.join('.');
|
|
39
|
-
setExpandedPaths((prev) => {
|
|
40
|
-
const next = new Set(prev);
|
|
41
|
-
if (next.has(pathKey)) {
|
|
42
|
-
next.delete(pathKey);
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
next.add(pathKey);
|
|
46
|
-
}
|
|
47
|
-
return next;
|
|
48
|
-
});
|
|
49
|
-
}, []);
|
|
50
|
-
/**
|
|
51
|
-
* Expand specific path
|
|
52
|
-
*/
|
|
53
|
-
const expandPath = useCallback((path) => {
|
|
54
|
-
const pathKey = path.join('.');
|
|
55
|
-
setExpandedPaths((prev) => {
|
|
56
|
-
const next = new Set(prev);
|
|
57
|
-
next.add(pathKey);
|
|
58
|
-
return next;
|
|
59
|
-
});
|
|
60
|
-
}, []);
|
|
61
|
-
/**
|
|
62
|
-
* Collapse specific path
|
|
63
|
-
*/
|
|
64
|
-
const collapsePath = useCallback((path) => {
|
|
65
|
-
const pathKey = path.join('.');
|
|
66
|
-
setExpandedPaths((prev) => {
|
|
67
|
-
const next = new Set(prev);
|
|
68
|
-
next.delete(pathKey);
|
|
69
|
-
return next;
|
|
70
|
-
});
|
|
71
|
-
}, []);
|
|
72
|
-
/**
|
|
73
|
-
* Expand all paths
|
|
74
|
-
*/
|
|
75
|
-
const expandAll = useCallback((allPaths) => {
|
|
76
|
-
setExpandedPaths(new Set(allPaths.map((path) => path.join('.'))));
|
|
77
|
-
}, []);
|
|
78
|
-
/**
|
|
79
|
-
* Collapse all paths
|
|
80
|
-
*/
|
|
81
|
-
const collapseAll = useCallback(() => {
|
|
82
|
-
setExpandedPaths(new Set());
|
|
83
|
-
}, []);
|
|
84
|
-
return {
|
|
85
|
-
expandedPaths,
|
|
86
|
-
isExpanded,
|
|
87
|
-
togglePath,
|
|
88
|
-
expandPath,
|
|
89
|
-
collapsePath,
|
|
90
|
-
expandAll,
|
|
91
|
-
collapseAll,
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
//# sourceMappingURL=useTreeState.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useTreeState.js","sourceRoot":"","sources":["../../src/hooks/useTreeState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,YAAY,CAAC,kBAA8B,CAAC,EAAE,CAAC;IAC7D,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAc,GAAG,EAAE;QACnE,OAAO,IAAI,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;IAEH;;OAEG;IACH,MAAM,UAAU,GAAG,WAAW,CAC5B,CAAC,IAAc,EAAW,EAAE;QAC1B,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/B,OAAO,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC,EACD,CAAC,aAAa,CAAC,CAChB,CAAC;IAEF;;OAEG;IACH,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,IAAc,EAAE,EAAE;QAChD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/B,gBAAgB,CAAC,CAAC,IAAI,EAAE,EAAE;YACxB,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,C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Y,EACZ,KAAK,qBAAqB,GAC3B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAGrE,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,gCAAgC,EAChC,kBAAkB,GACnB,MAAM,qCAAqC,CAAC;AAG7C,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAG7E,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,8BAA8B,EAAE,MAAM,4CAA4C,CAAC;AAG5F,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC"}
|
package/dist/lib/utils.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type ClassValue } from 'clsx';
|
|
2
|
-
/**
|
|
3
|
-
* Utility function to merge class names with Tailwind CSS classes
|
|
4
|
-
* Uses clsx for conditional classes and tailwind-merge to handle conflicts
|
|
5
|
-
*/
|
|
6
|
-
export declare function cn(...inputs: ClassValue[]): string;
|
|
7
|
-
//# sourceMappingURL=utils.d.ts.map
|
package/dist/lib/utils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAG7C;;;GAGG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
package/dist/lib/utils.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { clsx } from 'clsx';
|
|
2
|
-
import { twMerge } from 'tailwind-merge';
|
|
3
|
-
/**
|
|
4
|
-
* Utility function to merge class names with Tailwind CSS classes
|
|
5
|
-
* Uses clsx for conditional classes and tailwind-merge to handle conflicts
|
|
6
|
-
*/
|
|
7
|
-
export function cn(...inputs) {
|
|
8
|
-
return twMerge(clsx(inputs));
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=utils.js.map
|
package/dist/lib/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC;;;GAGG;AACH,MAAM,UAAU,EAAE,CAAC,GAAG,MAAoB;IACxC,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { type FC, type PropsWithChildren } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* MDXProvider - Makes components available in MDX files without explicit imports
|
|
4
|
-
*
|
|
5
|
-
* This provider wraps MDX content and injects React components for HTML elements.
|
|
6
|
-
* Components are automatically used when rendering markdown/MDX content.
|
|
7
|
-
*
|
|
8
|
-
* Key features:
|
|
9
|
-
* - No imports needed in MDX files
|
|
10
|
-
* - Consistent styling across all documentation
|
|
11
|
-
* - Theme-aware (respects data-theme attribute)
|
|
12
|
-
* - Automatic inline vs block code detection
|
|
13
|
-
*
|
|
14
|
-
* Available components (no import needed):
|
|
15
|
-
* - CodeBox: Monaco editor for code display (also auto-used for ```code blocks)
|
|
16
|
-
* - PropertyTable: Display schema-based property documentation
|
|
17
|
-
* - DestinationInitDemo: Interactive demo for destination initialization
|
|
18
|
-
* - DestinationDemo: Interactive demo for destination event processing
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* // Wrap your app
|
|
22
|
-
* <MDXProvider>
|
|
23
|
-
* <App />
|
|
24
|
-
* </MDXProvider>
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* // Then in any .mdx file, no imports needed:
|
|
28
|
-
* # Documentation
|
|
29
|
-
*
|
|
30
|
-
* Inline `code` and markdown blocks:
|
|
31
|
-
* ```typescript
|
|
32
|
-
* const example = "Hello";
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* Or use components directly:
|
|
36
|
-
* <CodeBox code="const x = 1;" language="javascript" />
|
|
37
|
-
* <PropertyTable schema={mySchema} />
|
|
38
|
-
*/
|
|
39
|
-
export declare const MDXProvider: FC<PropsWithChildren>;
|
|
40
|
-
//# sourceMappingURL=MDXProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MDXProvider.d.ts","sourceRoot":"","sources":["../../src/providers/MDXProvider.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAQ/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,iBAAiB,CAa7C,CAAC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { MDXProvider as BaseMDXProvider } from '@mdx-js/react';
|
|
3
|
-
import { MDXCode } from '../components/atoms/mdx-code';
|
|
4
|
-
import { CodeBox } from '../components/molecules/code-box';
|
|
5
|
-
import { PropertyTable } from '../components/molecules/property-table';
|
|
6
|
-
import { DestinationInitDemo } from '../components/demos/DestinationInitDemo';
|
|
7
|
-
import { DestinationDemo } from '../components/demos/DestinationDemo';
|
|
8
|
-
/**
|
|
9
|
-
* MDXProvider - Makes components available in MDX files without explicit imports
|
|
10
|
-
*
|
|
11
|
-
* This provider wraps MDX content and injects React components for HTML elements.
|
|
12
|
-
* Components are automatically used when rendering markdown/MDX content.
|
|
13
|
-
*
|
|
14
|
-
* Key features:
|
|
15
|
-
* - No imports needed in MDX files
|
|
16
|
-
* - Consistent styling across all documentation
|
|
17
|
-
* - Theme-aware (respects data-theme attribute)
|
|
18
|
-
* - Automatic inline vs block code detection
|
|
19
|
-
*
|
|
20
|
-
* Available components (no import needed):
|
|
21
|
-
* - CodeBox: Monaco editor for code display (also auto-used for ```code blocks)
|
|
22
|
-
* - PropertyTable: Display schema-based property documentation
|
|
23
|
-
* - DestinationInitDemo: Interactive demo for destination initialization
|
|
24
|
-
* - DestinationDemo: Interactive demo for destination event processing
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* // Wrap your app
|
|
28
|
-
* <MDXProvider>
|
|
29
|
-
* <App />
|
|
30
|
-
* </MDXProvider>
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* // Then in any .mdx file, no imports needed:
|
|
34
|
-
* # Documentation
|
|
35
|
-
*
|
|
36
|
-
* Inline `code` and markdown blocks:
|
|
37
|
-
* ```typescript
|
|
38
|
-
* const example = "Hello";
|
|
39
|
-
* ```
|
|
40
|
-
*
|
|
41
|
-
* Or use components directly:
|
|
42
|
-
* <CodeBox code="const x = 1;" language="javascript" />
|
|
43
|
-
* <PropertyTable schema={mySchema} />
|
|
44
|
-
*/
|
|
45
|
-
export const MDXProvider = ({ children }) => {
|
|
46
|
-
const components = {
|
|
47
|
-
// Markdown element mappings
|
|
48
|
-
code: MDXCode, // Auto-handles ```code blocks
|
|
49
|
-
// Explorer components (no import needed in MDX)
|
|
50
|
-
CodeBox,
|
|
51
|
-
PropertyTable,
|
|
52
|
-
DestinationInitDemo,
|
|
53
|
-
DestinationDemo,
|
|
54
|
-
};
|
|
55
|
-
return _jsx(BaseMDXProvider, { components: components, children: children });
|
|
56
|
-
};
|
|
57
|
-
//# sourceMappingURL=MDXProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MDXProvider.js","sourceRoot":"","sources":["../../src/providers/MDXProvider.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,CAAC,MAAM,WAAW,GAA0B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACjE,MAAM,UAAU,GAAG;QACjB,4BAA4B;QAC5B,IAAI,EAAE,OAAO,EAAE,8BAA8B;QAE7C,gDAAgD;QAChD,OAAO;QACP,aAAa;QACb,mBAAmB;QACnB,eAAe;KAChB,CAAC;IAEF,OAAO,KAAC,eAAe,IAAC,UAAU,EAAE,UAAU,YAAG,QAAQ,GAAmB,CAAC;AAC/E,CAAC,CAAC"}
|
package/dist/themes/index.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Monaco Editor Themes for walkerOS Explorer
|
|
3
|
-
*
|
|
4
|
-
* Custom Monaco themes that integrate seamlessly with the CSS-based theme system.
|
|
5
|
-
* Theme switching is handled via CSS `data-theme` attribute on document root.
|
|
6
|
-
*/
|
|
7
|
-
export { palenightTheme, registerPalenightTheme } from './palenight';
|
|
8
|
-
export { lighthouseTheme, registerLighthouseTheme } from './lighthouse';
|
|
9
|
-
export type { ExplorerTheme } from './types';
|
|
10
|
-
/**
|
|
11
|
-
* Register all Monaco themes
|
|
12
|
-
* Convenience function for registering both themes at once
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```typescript
|
|
16
|
-
* import { registerAllThemes } from '@walkeros/explorer';
|
|
17
|
-
* import * as monaco from 'monaco-editor';
|
|
18
|
-
*
|
|
19
|
-
* registerAllThemes(monaco);
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
export declare function registerAllThemes(monaco: typeof import('monaco-editor')): void;
|
|
23
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/themes/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAGxE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,cAAc,eAAe,CAAC,GACrC,IAAI,CAGN"}
|
package/dist/themes/index.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Monaco Editor Themes for walkerOS Explorer
|
|
3
|
-
*
|
|
4
|
-
* Custom Monaco themes that integrate seamlessly with the CSS-based theme system.
|
|
5
|
-
* Theme switching is handled via CSS `data-theme` attribute on document root.
|
|
6
|
-
*/
|
|
7
|
-
// Import registration functions for use in registerAllThemes
|
|
8
|
-
import { registerPalenightTheme } from './palenight';
|
|
9
|
-
import { registerLighthouseTheme } from './lighthouse';
|
|
10
|
-
// Monaco Editor themes
|
|
11
|
-
export { palenightTheme, registerPalenightTheme } from './palenight';
|
|
12
|
-
export { lighthouseTheme, registerLighthouseTheme } from './lighthouse';
|
|
13
|
-
/**
|
|
14
|
-
* Register all Monaco themes
|
|
15
|
-
* Convenience function for registering both themes at once
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```typescript
|
|
19
|
-
* import { registerAllThemes } from '@walkeros/explorer';
|
|
20
|
-
* import * as monaco from 'monaco-editor';
|
|
21
|
-
*
|
|
22
|
-
* registerAllThemes(monaco);
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
export function registerAllThemes(monaco) {
|
|
26
|
-
registerPalenightTheme(monaco);
|
|
27
|
-
registerLighthouseTheme(monaco);
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=index.js.map
|
package/dist/themes/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/themes/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,6DAA6D;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAEvD,uBAAuB;AACvB,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAKxE;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAAsC;IAEtC,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAC/B,uBAAuB,CAAC,MAAM,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Lighthouse Theme for Monaco Editor
|
|
3
|
-
*
|
|
4
|
-
* Custom light theme for walkerOS Explorer, designed to complement the Palenight dark theme.
|
|
5
|
-
* Based on VS Code Light+ with adjustments for optimal readability and brand consistency.
|
|
6
|
-
*
|
|
7
|
-
* Color Palette Strategy:
|
|
8
|
-
* - Comments: Muted green (#6A737D) for subtle annotations
|
|
9
|
-
* - Strings: Dark green (#22863A) for clear text distinction
|
|
10
|
-
* - Numbers: Brick red (#D73A49) for numeric emphasis
|
|
11
|
-
* - Functions: Deep blue (#005CC5) for callable identification
|
|
12
|
-
* - Keywords: Purple (#6F42C1) maintaining syntax hierarchy
|
|
13
|
-
* - Variables: Near black (#24292E) for primary code elements
|
|
14
|
-
* - Types/Classes: Dark gold (#B08800) for type definitions
|
|
15
|
-
* - Tags: Red (#D73A49) for HTML/JSX elements
|
|
16
|
-
* - Operators: Teal (#0086B3) for logical operations
|
|
17
|
-
* - Booleans: Red (#D73A49) for literal values
|
|
18
|
-
*/
|
|
19
|
-
import type { editor } from 'monaco-editor';
|
|
20
|
-
export declare const lighthouseTheme: editor.IStandaloneThemeData;
|
|
21
|
-
/**
|
|
22
|
-
* Register the lighthouse theme with Monaco Editor
|
|
23
|
-
* Call this function before creating any editor instances
|
|
24
|
-
*/
|
|
25
|
-
export declare function registerLighthouseTheme(monaco: typeof import('monaco-editor')): void;
|
|
26
|
-
//# sourceMappingURL=lighthouse.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lighthouse.d.ts","sourceRoot":"","sources":["../../src/themes/lighthouse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,oBAkPpC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,cAAc,eAAe,CAAC,QAGvC"}
|