@malloydata/malloy-explorer 0.0.299-dev250808170326 → 0.0.305-dev250819202105

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.
Files changed (57) hide show
  1. package/@flowtypes/components/CodeEditor/CodeEditor.flow.js +9 -0
  2. package/@flowtypes/components/CodeEditor/CodeEditorContext.flow.js +15 -0
  3. package/@flowtypes/components/CodeEditor/index.flow.js +4 -0
  4. package/@flowtypes/components/MalloyExplorerProvider.flow.js +6 -3
  5. package/@flowtypes/components/QueryPanel/QueryPanel.flow.js +1 -0
  6. package/@flowtypes/components/ResultPanel/ResultPanel.flow.js +2 -2
  7. package/@flowtypes/components/ResultPanel/SubmittedQuery.flow.js +1 -1
  8. package/@flowtypes/components/SourcePanel/SourcePanel.flow.js +1 -1
  9. package/@flowtypes/index.flow.js +2 -0
  10. package/dist/cjs/index.cjs +3938 -1282
  11. package/dist/cjs/index.cjs.map +1 -1
  12. package/dist/esm/index.js +3934 -1283
  13. package/dist/esm/index.js.map +1 -1
  14. package/dist/malloy-explorer.css +64 -63
  15. package/dist/types/components/CodeEditor/CodeEditor.d.ts +7 -0
  16. package/dist/types/components/CodeEditor/CodeEditorContext.d.ts +14 -0
  17. package/dist/types/components/CodeEditor/index.d.ts +4 -0
  18. package/dist/types/components/CodeEditor/lsp/code_actions.d.ts +2 -0
  19. package/dist/types/components/CodeEditor/lsp/completion_docs.d.ts +5 -0
  20. package/dist/types/components/CodeEditor/lsp/completions.d.ts +2 -0
  21. package/dist/types/components/CodeEditor/lsp/definitions.d.ts +2 -0
  22. package/dist/types/components/CodeEditor/lsp/diagnostics.d.ts +2 -0
  23. package/dist/types/components/CodeEditor/lsp/hover.d.ts +2 -0
  24. package/dist/types/components/CodeEditor/lsp/index.d.ts +7 -0
  25. package/dist/types/components/CodeEditor/lsp/stub_compile.d.ts +15 -0
  26. package/dist/types/components/CodeEditor/lsp/symbols.d.ts +2 -0
  27. package/dist/types/components/CodeEditor/lsp/utils.d.ts +9 -0
  28. package/dist/types/components/CodeEditor/monaco/index.d.ts +0 -0
  29. package/dist/types/components/CodeEditor/monaco/monaco.d.ts +2 -0
  30. package/dist/types/components/CodeEditor/monaco/monaco_shim.d.ts +3 -0
  31. package/dist/types/components/CodeEditor/monaco/monaco_worker.d.ts +1 -0
  32. package/dist/types/components/MalloyExplorerProvider.d.ts +15 -4
  33. package/dist/types/components/QueryPanel/AddMenu/styles.d.ts +1 -1
  34. package/dist/types/components/QueryPanel/QueryActionBar.d.ts +2 -1
  35. package/dist/types/components/QueryPanel/QueryPanel.d.ts +2 -1
  36. package/dist/types/components/QueryPanel/dialogStyles.d.ts +11 -6
  37. package/dist/types/components/ResultPanel/ResultPanel.d.ts +2 -2
  38. package/dist/types/components/ResultPanel/SubmittedQuery.d.ts +1 -1
  39. package/dist/types/components/SourcePanel/FieldGroupList.d.ts +4 -2
  40. package/dist/types/components/SourcePanel/FieldTokenWithCopy.d.ts +7 -0
  41. package/dist/types/components/SourcePanel/SearchResultList.d.ts +4 -2
  42. package/dist/types/components/SourcePanel/SourcePanel.d.ts +1 -1
  43. package/dist/types/components/primitives/Button.d.ts +11 -11
  44. package/dist/types/components/primitives/Spinner.d.ts +3 -12
  45. package/dist/types/components/primitives/colors.stylex.d.ts +145 -4
  46. package/dist/types/components/primitives/contexts/ThemeContext.d.ts +6 -0
  47. package/dist/types/components/primitives/styles.d.ts +12 -10
  48. package/dist/types/components/primitives/syntax_highlighting/syntaxHighlighter.d.ts +2 -0
  49. package/dist/types/components/primitives/utils/icon.d.ts +6 -0
  50. package/dist/types/components/styles.d.ts +5 -3
  51. package/dist/types/contexts/QueryEditorContext.d.ts +5 -4
  52. package/dist/types/hooks/useQueryBuilder.d.ts +1 -1
  53. package/dist/types/index.d.ts +2 -0
  54. package/jest.config.cjs +33 -0
  55. package/package.json +12 -9
  56. package/scripts/gen_flow.ts +3 -0
  57. package/dist/types/components/QueryPanel/AddMenu/colors.stylex.d.ts +0 -9
@@ -43,9 +43,9 @@ export default function Button({ variant, size, icon, label, tooltip, isDisabled
43
43
  declare const colorVariants: Readonly<{
44
44
  readonly default: Readonly<{
45
45
  readonly [x: string]: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<string, {
46
- readonly default: "rgba(230, 235, 239, 1)";
47
- readonly ':hover': "rgba(221, 226, 232, 1)";
48
- readonly ':active': "rgba(204, 211, 219, 1)";
46
+ readonly default: import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
47
+ readonly ':hover': import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
48
+ readonly ':active': import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
49
49
  readonly ':disabled'?: undefined;
50
50
  } | {
51
51
  readonly default: import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
@@ -53,13 +53,13 @@ declare const colorVariants: Readonly<{
53
53
  readonly ':hover'?: undefined;
54
54
  readonly ':active'?: undefined;
55
55
  }>;
56
- readonly background: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"background", "rgba(204, 211, 219, 1)" | "rgba(230, 235, 239, 1)" | "rgba(221, 226, 232, 1)">;
56
+ readonly background: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"background", string>;
57
57
  }>;
58
58
  readonly flat: Readonly<{
59
59
  readonly [x: string]: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<string, {
60
60
  readonly default: "transparent";
61
- readonly ':hover': "rgba(0, 0, 0, 0.05)";
62
- readonly ':active': "rgba(0, 0, 0, 0.1)";
61
+ readonly ':hover': import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
62
+ readonly ':active': import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
63
63
  readonly ':disabled'?: undefined;
64
64
  } | {
65
65
  readonly default: import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
@@ -67,13 +67,13 @@ declare const colorVariants: Readonly<{
67
67
  readonly ':hover'?: undefined;
68
68
  readonly ':active'?: undefined;
69
69
  }>;
70
- readonly background: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"background", "transparent" | "rgba(0, 0, 0, 0.05)" | "rgba(0, 0, 0, 0.1)">;
70
+ readonly background: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"background", string>;
71
71
  }>;
72
72
  readonly primary: Readonly<{
73
73
  readonly [x: string]: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<string, {
74
- readonly default: "rgba(0, 100, 224, 1)";
75
- readonly ':hover': "rgba(4, 87, 203, 1)";
76
- readonly ':active': "rgba(0, 76, 188, 1)";
74
+ readonly default: import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
75
+ readonly ':hover': import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
76
+ readonly ':active': import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
77
77
  readonly ':disabled'?: undefined;
78
78
  } | {
79
79
  readonly default: import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
@@ -81,7 +81,7 @@ declare const colorVariants: Readonly<{
81
81
  readonly ':hover'?: undefined;
82
82
  readonly ':active'?: undefined;
83
83
  }>;
84
- readonly background: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"background", "rgba(0, 100, 224, 1)" | "rgba(4, 87, 203, 1)" | "rgba(0, 76, 188, 1)">;
84
+ readonly background: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"background", string>;
85
85
  }>;
86
86
  }>;
87
87
  declare const sizeVariants: Readonly<{
@@ -1,17 +1,8 @@
1
1
  import { StyleXStyles } from '@stylexjs/stylex';
2
2
  declare const SIZES: {
3
- large: {
4
- border: number;
5
- diameter: number;
6
- };
7
- medium: {
8
- border: number;
9
- diameter: number;
10
- };
11
- small: {
12
- border: number;
13
- diameter: number;
14
- };
3
+ large: number;
4
+ medium: number;
5
+ small: number;
15
6
  };
16
7
  type SpinnerSize = keyof typeof SIZES;
17
8
  interface SpinnerProps {
@@ -1,22 +1,34 @@
1
1
  export declare const backgroundColors: import("@stylexjs/stylex").VarGroup<Readonly<{
2
+ app: string;
3
+ surface: string;
4
+ surfaceSubtle: string;
5
+ surfaceToken: string;
6
+ tooltip: string;
2
7
  gray: string;
3
8
  purple: string;
4
9
  green: string;
5
10
  cyan: string;
6
- washOnWeb: string;
11
+ divider: string;
7
12
  accentDeemphasized: string;
8
13
  positiveDeemphasized: string;
9
14
  warningDeemphasized: string;
10
15
  negativeDeemphasized: string;
11
- divider: string;
12
- token: string;
13
- tooltip: string;
16
+ overlayHover: string;
17
+ overlayActive: string;
18
+ disabledOverlay: string;
19
+ controlDefault: string;
20
+ controlHover: string;
21
+ controlActive: string;
22
+ brandDefault: string;
23
+ brandHover: string;
24
+ brandActive: string;
14
25
  }>, symbol>;
15
26
  export declare const textColors: import("@stylexjs/stylex").VarGroup<Readonly<{
16
27
  primary: string;
17
28
  secondary: string;
18
29
  disabled: string;
19
30
  link: string;
31
+ tooltip: string;
20
32
  primaryOnDarkMedia: string;
21
33
  gray: string;
22
34
  purple: string;
@@ -38,3 +50,132 @@ export declare const iconColors: import("@stylexjs/stylex").VarGroup<Readonly<{
38
50
  positive: string;
39
51
  negative: string;
40
52
  }>, symbol>;
53
+ export declare const utility: import("@stylexjs/stylex").VarGroup<Readonly<{
54
+ elevationMedium: string;
55
+ elevationSmall: string;
56
+ outline: string;
57
+ focusOutline: string;
58
+ focusRingColor: string;
59
+ focusRingInner: string;
60
+ spinnerTrack: string;
61
+ }>, symbol>;
62
+ export declare const darkBackgroundTheme: import("@stylexjs/stylex").Theme<import("@stylexjs/stylex").VarGroup<Readonly<{
63
+ app: string;
64
+ surface: string;
65
+ surfaceSubtle: string;
66
+ surfaceToken: string;
67
+ tooltip: string;
68
+ gray: string;
69
+ purple: string;
70
+ green: string;
71
+ cyan: string;
72
+ divider: string;
73
+ accentDeemphasized: string;
74
+ positiveDeemphasized: string;
75
+ warningDeemphasized: string;
76
+ negativeDeemphasized: string;
77
+ overlayHover: string;
78
+ overlayActive: string;
79
+ disabledOverlay: string;
80
+ controlDefault: string;
81
+ controlHover: string;
82
+ controlActive: string;
83
+ brandDefault: string;
84
+ brandHover: string;
85
+ brandActive: string;
86
+ }>, symbol>, symbol>;
87
+ export declare const darkTextTheme: import("@stylexjs/stylex").Theme<import("@stylexjs/stylex").VarGroup<Readonly<{
88
+ primary: string;
89
+ secondary: string;
90
+ disabled: string;
91
+ link: string;
92
+ tooltip: string;
93
+ primaryOnDarkMedia: string;
94
+ gray: string;
95
+ purple: string;
96
+ green: string;
97
+ cyan: string;
98
+ dimension: string;
99
+ }>, symbol>, symbol>;
100
+ export declare const darkIconTheme: import("@stylexjs/stylex").Theme<import("@stylexjs/stylex").VarGroup<Readonly<{
101
+ primary: string;
102
+ secondary: string;
103
+ disabled: string;
104
+ primaryOnMedia: string;
105
+ gray: string;
106
+ purple: string;
107
+ green: string;
108
+ cyan: string;
109
+ warning: string;
110
+ accent: string;
111
+ positive: string;
112
+ negative: string;
113
+ }>, symbol>, symbol>;
114
+ export declare const darkUtilityTheme: import("@stylexjs/stylex").Theme<import("@stylexjs/stylex").VarGroup<Readonly<{
115
+ elevationMedium: string;
116
+ elevationSmall: string;
117
+ outline: string;
118
+ focusOutline: string;
119
+ focusRingColor: string;
120
+ focusRingInner: string;
121
+ spinnerTrack: string;
122
+ }>, symbol>, symbol>;
123
+ export declare const darkThemes: readonly [import("@stylexjs/stylex").Theme<import("@stylexjs/stylex").VarGroup<Readonly<{
124
+ app: string;
125
+ surface: string;
126
+ surfaceSubtle: string;
127
+ surfaceToken: string;
128
+ tooltip: string;
129
+ gray: string;
130
+ purple: string;
131
+ green: string;
132
+ cyan: string;
133
+ divider: string;
134
+ accentDeemphasized: string;
135
+ positiveDeemphasized: string;
136
+ warningDeemphasized: string;
137
+ negativeDeemphasized: string;
138
+ overlayHover: string;
139
+ overlayActive: string;
140
+ disabledOverlay: string;
141
+ controlDefault: string;
142
+ controlHover: string;
143
+ controlActive: string;
144
+ brandDefault: string;
145
+ brandHover: string;
146
+ brandActive: string;
147
+ }>, symbol>, symbol>, import("@stylexjs/stylex").Theme<import("@stylexjs/stylex").VarGroup<Readonly<{
148
+ primary: string;
149
+ secondary: string;
150
+ disabled: string;
151
+ link: string;
152
+ tooltip: string;
153
+ primaryOnDarkMedia: string;
154
+ gray: string;
155
+ purple: string;
156
+ green: string;
157
+ cyan: string;
158
+ dimension: string;
159
+ }>, symbol>, symbol>, import("@stylexjs/stylex").Theme<import("@stylexjs/stylex").VarGroup<Readonly<{
160
+ primary: string;
161
+ secondary: string;
162
+ disabled: string;
163
+ primaryOnMedia: string;
164
+ gray: string;
165
+ purple: string;
166
+ green: string;
167
+ cyan: string;
168
+ warning: string;
169
+ accent: string;
170
+ positive: string;
171
+ negative: string;
172
+ }>, symbol>, symbol>, import("@stylexjs/stylex").Theme<import("@stylexjs/stylex").VarGroup<Readonly<{
173
+ elevationMedium: string;
174
+ elevationSmall: string;
175
+ outline: string;
176
+ focusOutline: string;
177
+ focusRingColor: string;
178
+ focusRingInner: string;
179
+ spinnerTrack: string;
180
+ }>, symbol>, symbol>];
181
+ export type ColorTheme = typeof darkThemes;
@@ -0,0 +1,6 @@
1
+ import { ColorTheme } from '../colors.stylex';
2
+ export interface ThemeContextProps {
3
+ theme?: ColorTheme;
4
+ dark?: boolean;
5
+ }
6
+ export declare const ThemeContext: import("react").Context<ThemeContextProps>;
@@ -2,22 +2,24 @@ export declare const tooltipStyles: Readonly<{
2
2
  readonly default: Readonly<{
3
3
  readonly padding: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"padding", "4px 8px">;
4
4
  readonly borderRadius: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderRadius", "12px">;
5
- readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", "rgba(221, 226, 232, 1)">;
6
- readonly backgroundColor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"backgroundColor", "rgba(37, 54, 63, 1)">;
5
+ readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
6
+ readonly backgroundColor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"backgroundColor", string>;
7
7
  readonly maxWidth: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"maxWidth", "360px">;
8
- readonly boxShadow: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"boxShadow", "0px 2px 12px 0px rgba(0, 0, 0, 0.1), 0px 1px 2px 0px rgba(0, 0, 0, 0.1)">;
8
+ readonly boxShadow: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"boxShadow", string>;
9
9
  readonly zIndex: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"zIndex", 2>;
10
10
  }>;
11
11
  readonly card: Readonly<{
12
12
  readonly width: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"width", "var(--radix-tooltip-trigger-width)">;
13
13
  readonly maxHeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"maxHeight", "var(--radix-tooltip-content-available-height)">;
14
+ readonly backgroundColor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"backgroundColor", string>;
15
+ readonly boxShadow: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"boxShadow", string>;
14
16
  readonly zIndex: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"zIndex", 2>;
15
17
  }>;
16
18
  }>;
17
19
  export declare const fontStyles: Readonly<{
18
20
  readonly largeEmphasized: Readonly<{
19
21
  readonly fontFamily: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontFamily", "SF Pro Text, -apple-system, system-ui, sans-serif">;
20
- readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", "rgba(5, 5, 5, 1)">;
22
+ readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
21
23
  readonly fontWeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontWeight", 700>;
22
24
  readonly fontSize: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontSize", "16px">;
23
25
  readonly lineHeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"lineHeight", "24px">;
@@ -25,7 +27,7 @@ export declare const fontStyles: Readonly<{
25
27
  }>;
26
28
  readonly largeBody: Readonly<{
27
29
  readonly fontFamily: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontFamily", "SF Pro Text, -apple-system, system-ui, sans-serif">;
28
- readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", "rgba(5, 5, 5, 1)">;
30
+ readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
29
31
  readonly fontWeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontWeight", 400>;
30
32
  readonly fontSize: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontSize", "16px">;
31
33
  readonly lineHeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"lineHeight", "20px">;
@@ -33,7 +35,7 @@ export declare const fontStyles: Readonly<{
33
35
  }>;
34
36
  readonly emphasized: Readonly<{
35
37
  readonly fontFamily: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontFamily", "SF Pro Text, -apple-system, system-ui, sans-serif">;
36
- readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", "rgba(5, 5, 5, 1)">;
38
+ readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
37
39
  readonly fontWeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontWeight", 700>;
38
40
  readonly fontSize: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontSize", "14px">;
39
41
  readonly lineHeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"lineHeight", "20px">;
@@ -41,7 +43,7 @@ export declare const fontStyles: Readonly<{
41
43
  }>;
42
44
  readonly body: Readonly<{
43
45
  readonly fontFamily: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontFamily", "SF Pro Text, -apple-system, system-ui, sans-serif">;
44
- readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", "rgba(5, 5, 5, 1)">;
46
+ readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
45
47
  readonly fontWeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontWeight", 400>;
46
48
  readonly fontSize: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontSize", "14px">;
47
49
  readonly lineHeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"lineHeight", "20px">;
@@ -49,7 +51,7 @@ export declare const fontStyles: Readonly<{
49
51
  }>;
50
52
  readonly link: Readonly<{
51
53
  readonly fontFamily: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontFamily", "SF Pro Text, -apple-system, system-ui, sans-serif">;
52
- readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", "rgba(0, 100, 224, 1)">;
54
+ readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
53
55
  readonly fontWeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontWeight", 400>;
54
56
  readonly fontSize: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontSize", "14px">;
55
57
  readonly lineHeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"lineHeight", "20px">;
@@ -57,7 +59,7 @@ export declare const fontStyles: Readonly<{
57
59
  }>;
58
60
  readonly supporting: Readonly<{
59
61
  readonly fontFamily: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontFamily", "SF Pro Text, -apple-system, system-ui, sans-serif">;
60
- readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", "rgba(5, 5, 5, 1)">;
62
+ readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
61
63
  readonly fontWeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontWeight", 400>;
62
64
  readonly fontSize: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontSize", "12px">;
63
65
  readonly lineHeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"lineHeight", "16px">;
@@ -73,7 +75,7 @@ export declare const fontStyles: Readonly<{
73
75
  }>;
74
76
  readonly tooltipText: Readonly<{
75
77
  readonly fontFamily: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontFamily", "SF Pro Text, -apple-system, system-ui, sans-serif">;
76
- readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", "rgba(221, 226, 232, 1)">;
78
+ readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
77
79
  readonly fontSize: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontSize", "14px">;
78
80
  readonly fontStyle: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontStyle", "normal">;
79
81
  readonly fontWeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontWeight", 400>;
@@ -1,6 +1,8 @@
1
1
  import { TransformerOptions } from './transformers/transformers';
2
+ import { HighlighterCore } from '@shikijs/core';
2
3
  export type SupportedLang = 'json' | 'sql' | 'malloy';
3
4
  export type SupportedTheme = 'light-plus' | 'dark-plus';
4
5
  type HighlighterOptions = {} & TransformerOptions;
6
+ export declare function getHighlighter(): Promise<HighlighterCore>;
5
7
  export declare function highlightPre(code: string, lang: SupportedLang, theme: SupportedTheme, { showLineNumbers, lineSpacing }: HighlighterOptions): Promise<HTMLDivElement>;
6
8
  export {};
@@ -113,6 +113,12 @@ export declare const ICON_MAP: {
113
113
  desc?: string;
114
114
  descId?: string;
115
115
  }>;
116
+ readonly malloy: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
117
+ title?: string;
118
+ titleId?: string;
119
+ desc?: string;
120
+ descId?: string;
121
+ }>;
116
122
  readonly aggregate: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
117
123
  title?: string;
118
124
  titleId?: string;
@@ -22,7 +22,9 @@ export declare const styles: Readonly<{
22
22
  readonly padding: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"padding", 5>;
23
23
  }>;
24
24
  readonly queryCard: Readonly<{
25
- readonly border: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"border", "1px solid #CCD3DB">;
25
+ readonly borderWidth: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderWidth", "1px">;
26
+ readonly borderStyle: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderStyle", "solid">;
27
+ readonly borderColor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderColor", string>;
26
28
  readonly borderRadius: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderRadius", 5>;
27
29
  readonly padding: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"padding", 8>;
28
30
  }>;
@@ -49,7 +51,7 @@ export declare const styles: Readonly<{
49
51
  readonly gap: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"gap", 8>;
50
52
  }>;
51
53
  readonly token: Readonly<{
52
- readonly backgroundColor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"backgroundColor", "#E6EBEF">;
54
+ readonly backgroundColor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"backgroundColor", string>;
53
55
  readonly borderRadius: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderRadius", 5>;
54
56
  readonly padding: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"padding", "2px 12px 2px 6px">;
55
57
  readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "flex">;
@@ -57,7 +59,7 @@ export declare const styles: Readonly<{
57
59
  readonly alignItems: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"alignItems", "center">;
58
60
  }>;
59
61
  readonly tooltip: Readonly<{
60
- readonly backgroundColor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"backgroundColor", "#E6EBEF">;
62
+ readonly backgroundColor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"backgroundColor", string>;
61
63
  readonly borderRadius: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderRadius", 5>;
62
64
  readonly padding: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"padding", "2px 12px 2px 6px">;
63
65
  readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "flex">;
@@ -4,12 +4,13 @@ import { ASTQuery } from '@malloydata/malloy-query-builder';
4
4
  import type { DrillData } from '@malloydata/render';
5
5
  export interface QueryEditorContextProps {
6
6
  /** Source object at the root level */
7
- source?: Malloy.SourceInfo;
7
+ source: Malloy.SourceInfo;
8
8
  /** Query object to represent current state at the root level */
9
- rootQuery?: ASTQuery;
9
+ rootQuery: ASTQuery | undefined;
10
10
  /** Provide to allow editing of the query */
11
- setQuery: (query: Malloy.Query | undefined) => void;
12
- onDrill?: ({ stableQuery, stableDrillClauses }: DrillData) => void;
11
+ setQuery: (query: Malloy.Query | string | undefined) => void;
12
+ query: Malloy.Query | string | undefined;
13
+ onDrill?: (drillData: DrillData) => void;
13
14
  }
14
15
  /**
15
16
  * QueryEditorContext enables query editing by providing the setQuery
@@ -1,3 +1,3 @@
1
1
  import { ASTQuery } from '@malloydata/malloy-query-builder';
2
2
  import * as Malloy from '@malloydata/malloy-interfaces';
3
- export declare function useQueryBuilder(source?: Malloy.SourceInfo, query?: Malloy.Query): ASTQuery | undefined;
3
+ export declare function useQueryBuilder(source: Malloy.SourceInfo, query?: Malloy.Query | string): ASTQuery | undefined;
@@ -6,3 +6,5 @@ export type { EXECUTION_STATES, Message, QueryExecutionState, QueryResponse, Run
6
6
  export { SourcePanel } from './components/SourcePanel';
7
7
  export { ResizeBar } from './components/primitives';
8
8
  export { ResizableCollapsiblePanel } from './components/ResizableCollapsiblePanel';
9
+ export { CodeEditorContext } from './components/CodeEditor';
10
+ export { modelDefToModelInfo, malloyToQuery } from '@malloydata/malloy';
@@ -0,0 +1,33 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ module.exports = {
9
+ setupFilesAfterEnv: ['<rootDir>/src/test/jest.setup.ts'],
10
+ moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
11
+ testMatch: ['<rootDir>/src/**/?(*.)spec.(ts|js)?(x)'],
12
+ testPathIgnorePatterns: [
13
+ '/node_modules/',
14
+ '<rootDir>/dist/',
15
+ '<rootDir>/dev/',
16
+ '<rootDir>/src/test/',
17
+ '<rootDir>/malloy-samples/',
18
+ ],
19
+ transform: {
20
+ '^.+\\.tsx?$': ['babel-jest'],
21
+ },
22
+ testTimeout: 100000,
23
+ verbose: true,
24
+ testEnvironment: 'jsdom',
25
+ collectCoverage: true,
26
+ coverageReporters: ['lcov', 'html'],
27
+ collectCoverageFrom: ['<rootDir>/src/**/*.(ts|tsx)', '!**/*.stylex.ts'],
28
+ preset: 'ts-jest',
29
+ moduleNameMapper: {
30
+ uuid: require.resolve('uuid'),
31
+ '\\.svg\\?react$': '<rootDir>/src/test/SvgMock.tsx',
32
+ },
33
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/malloy-explorer",
3
- "version": "0.0.299-dev250808170326",
3
+ "version": "0.0.305-dev250819202105",
4
4
  "description": "Malloy visual query builder",
5
5
  "main": "dist/cjs/index.cjs",
6
6
  "types": "dist/types/index.d.ts",
@@ -33,7 +33,7 @@
33
33
  "malloy-unlink": "npm --no-fund --no-save --no-audit unlink $(./scripts/malloy-packages.ts) && npm --no-fund --no-audit install --force",
34
34
  "malloy-build-and-link": "cd ../malloy && npm run -ws build --workspace=@malloydata/malloy-query-builder --workspace=@malloydata/malloy-filter --workspace=@malloydata/malloy-interfaces --workspace=@malloydata/malloy-tag && npm link -ws",
35
35
  "prepublishOnly": "npm run build",
36
- "test": "jest src"
36
+ "test": "jest --config jest.config.cjs"
37
37
  },
38
38
  "bin": {
39
39
  "malloy-packages": "./scripts/malloy-packages.ts"
@@ -64,10 +64,12 @@
64
64
  "@radix-ui/react-scroll-area": "^1.2.3",
65
65
  "@radix-ui/react-select": "^2.1.6",
66
66
  "@radix-ui/react-tabs": "^1.1.3",
67
+ "@radix-ui/react-toast": "^1.2.14",
67
68
  "@radix-ui/react-tooltip": "^1.1.8",
68
69
  "@shikijs/core": "^3.2.1",
69
70
  "@shikijs/engine-javascript": "^3.2.1",
70
71
  "@shikijs/langs": "^3.2.1",
72
+ "@shikijs/monaco": "^3.7.0",
71
73
  "@shikijs/themes": "^3.2.1",
72
74
  "@shikijs/types": "^3.2.1",
73
75
  "@stylexjs/stylex": "^0.10.1",
@@ -82,8 +84,8 @@
82
84
  "@babel/preset-typescript": "^7.27.1",
83
85
  "@eslint/compat": "^1.2.7",
84
86
  "@eslint/js": "^9.21.0",
85
- "@malloydata/db-duckdb": "^0.0.299",
86
- "@malloydata/malloy": "^0.0.299",
87
+ "@malloydata/db-duckdb": "^0.0.305",
88
+ "@malloydata/malloy": "^0.0.305",
87
89
  "@rollup/plugin-replace": "^6.0.2",
88
90
  "@stylexjs/eslint-plugin": "^0.11.1",
89
91
  "@stylexjs/postcss-plugin": "^0.11.1",
@@ -115,11 +117,12 @@
115
117
  "vite-plugin-svgr": "^4.3.0"
116
118
  },
117
119
  "peerDependencies": {
118
- "@malloydata/malloy-filter": "^0.0.299",
119
- "@malloydata/malloy-interfaces": "^0.0.299",
120
- "@malloydata/malloy-query-builder": "^0.0.299",
121
- "@malloydata/malloy-tag": "^0.0.299",
122
- "@malloydata/render": "^0.0.299",
120
+ "@malloydata/malloy-filter": ">=0.0.305",
121
+ "@malloydata/malloy-interfaces": ">=0.0.305",
122
+ "@malloydata/malloy-query-builder": ">=0.0.305",
123
+ "@malloydata/malloy-tag": ">=0.0.305",
124
+ "@malloydata/render": ">=0.0.305",
125
+ "monaco-editor-core": "^0.52.2",
123
126
  "react": ">=19.0.0",
124
127
  "react-dom": ">=19.0.0"
125
128
  }
@@ -13,6 +13,9 @@ const files = [
13
13
  'components/ResultPanel/SubmittedQuery.d.ts',
14
14
  'components/SourcePanel/SourcePanel.d.ts',
15
15
  'components/ResizableCollapsiblePanel.d.ts',
16
+ 'components/CodeEditor/index.d.ts',
17
+ 'components/CodeEditor/CodeEditor.d.ts',
18
+ 'components/CodeEditor/CodeEditorContext.d.ts',
16
19
  ];
17
20
 
18
21
  async function go() {
@@ -1,9 +0,0 @@
1
- export declare const colors: import("@stylexjs/stylex").VarGroup<Readonly<{
2
- accent: string;
3
- accentDeemphasized: string;
4
- background: string;
5
- shadowElevation: string;
6
- hover: string;
7
- text: string;
8
- disabledText: string;
9
- }>, symbol>;