@malloydata/malloy-explorer 0.0.299-dev250808170326 → 0.0.304-dev250814203415
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/@flowtypes/components/CodeEditor/CodeEditor.flow.js +9 -0
- package/@flowtypes/components/CodeEditor/CodeEditorContext.flow.js +15 -0
- package/@flowtypes/components/CodeEditor/index.flow.js +4 -0
- package/@flowtypes/components/MalloyExplorerProvider.flow.js +3 -3
- package/@flowtypes/components/QueryPanel/QueryPanel.flow.js +1 -0
- package/@flowtypes/components/ResultPanel/ResultPanel.flow.js +2 -2
- package/@flowtypes/components/ResultPanel/SubmittedQuery.flow.js +1 -1
- package/@flowtypes/components/SourcePanel/SourcePanel.flow.js +1 -1
- package/@flowtypes/index.flow.js +2 -0
- package/dist/cjs/index.cjs +22216 -2931
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +22210 -2930
- package/dist/esm/index.js.map +1 -1
- package/dist/malloy-explorer.css +7 -0
- package/dist/types/components/CodeEditor/CodeEditor.d.ts +7 -0
- package/dist/types/components/CodeEditor/CodeEditorContext.d.ts +14 -0
- package/dist/types/components/CodeEditor/index.d.ts +4 -0
- package/dist/types/components/CodeEditor/lsp/code_actions.d.ts +2 -0
- package/dist/types/components/CodeEditor/lsp/completion_docs.d.ts +5 -0
- package/dist/types/components/CodeEditor/lsp/completions.d.ts +2 -0
- package/dist/types/components/CodeEditor/lsp/definitions.d.ts +2 -0
- package/dist/types/components/CodeEditor/lsp/diagnostics.d.ts +2 -0
- package/dist/types/components/CodeEditor/lsp/hover.d.ts +2 -0
- package/dist/types/components/CodeEditor/lsp/index.d.ts +7 -0
- package/dist/types/components/CodeEditor/lsp/stub_compile.d.ts +15 -0
- package/dist/types/components/CodeEditor/lsp/symbols.d.ts +2 -0
- package/dist/types/components/CodeEditor/lsp/utils.d.ts +9 -0
- package/dist/types/components/CodeEditor/monaco/index.d.ts +0 -0
- package/dist/types/components/CodeEditor/monaco/monaco.d.ts +2 -0
- package/dist/types/components/CodeEditor/monaco/monaco_shim.d.ts +3 -0
- package/dist/types/components/CodeEditor/monaco/monaco_worker.d.ts +1 -0
- package/dist/types/components/MalloyExplorerProvider.d.ts +10 -3
- package/dist/types/components/QueryPanel/QueryActionBar.d.ts +2 -1
- package/dist/types/components/QueryPanel/QueryPanel.d.ts +2 -1
- package/dist/types/components/ResultPanel/ResultPanel.d.ts +2 -2
- package/dist/types/components/ResultPanel/SubmittedQuery.d.ts +1 -1
- package/dist/types/components/SourcePanel/FieldGroupList.d.ts +4 -2
- package/dist/types/components/SourcePanel/FieldTokenWithCopy.d.ts +7 -0
- package/dist/types/components/SourcePanel/SearchResultList.d.ts +4 -2
- package/dist/types/components/SourcePanel/SourcePanel.d.ts +1 -1
- package/dist/types/components/primitives/syntax_highlighting/syntaxHighlighter.d.ts +2 -0
- package/dist/types/components/primitives/utils/icon.d.ts +6 -0
- package/dist/types/contexts/QueryEditorContext.d.ts +5 -4
- package/dist/types/hooks/useQueryBuilder.d.ts +1 -1
- package/dist/types/index.d.ts +2 -0
- package/jest.config.cjs +33 -0
- package/package.json +12 -9
- package/scripts/gen_flow.ts +3 -0
package/dist/malloy-explorer.css
CHANGED
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
.mlygqa5hp{background:rgba(230,235,239,1)}
|
|
68
68
|
.mlyzy8d55{background:rgba(255,255,255,.5)}
|
|
69
69
|
.mlyotlr4g{background:rgba(255,255,255,1)}
|
|
70
|
+
.mly1lrzu1o{background:transparent!important}
|
|
70
71
|
.mly1md70p1{background:transparent}
|
|
71
72
|
.mlysu8s4a{background:var(--mly10mhzaa)}
|
|
72
73
|
.mly1np9qvj{background:var(--mly1eayp21)}
|
|
@@ -87,6 +88,7 @@
|
|
|
87
88
|
.mly1gs6z28{border:none}
|
|
88
89
|
.mly15r89dc{grid-area:1 / 1}
|
|
89
90
|
.mly1ghz6dp{margin:0}
|
|
91
|
+
.mlys8nxjv{margin:4px 12px 0 12px}
|
|
90
92
|
.mlynfbntj{margin:5px 0}
|
|
91
93
|
.mly16zck5j{margin:5px}
|
|
92
94
|
.mlykib98w{margin:8px}
|
|
@@ -96,6 +98,7 @@
|
|
|
96
98
|
.mly1l4tkcb{padding:0 8px 8px 8px}
|
|
97
99
|
.mly1717udv{padding:0}
|
|
98
100
|
.mly1b4vry6{padding:10px 0}
|
|
101
|
+
.mly7z7khe{padding:10px}
|
|
99
102
|
.mlyc7ga6q{padding:12px}
|
|
100
103
|
.mly1tamke2{padding:16px}
|
|
101
104
|
.mly1e41zw8{padding:1px 5px}
|
|
@@ -153,6 +156,7 @@
|
|
|
153
156
|
.mly1roky18{border-right:1px solid rgba(204,211,219,1)}
|
|
154
157
|
.mlyng3xce{border-style:none}
|
|
155
158
|
.mly1y0btm7{border-style:solid}
|
|
159
|
+
.mly1gnry1m{border-top:1px solid #CCD3DB}
|
|
156
160
|
.mlye536se{border-top:1px solid #e0e0e0}
|
|
157
161
|
.mly77krkw{border-top:1px solid var(--malloy-composer-form-border,#ececec)}
|
|
158
162
|
.mlyc342km{border-width:0}
|
|
@@ -170,6 +174,7 @@
|
|
|
170
174
|
.mly167g77z{gap:8px}
|
|
171
175
|
.mly623te4{grid-column:span 2}
|
|
172
176
|
.mly1a80n4u{grid-column:span 3}
|
|
177
|
+
.mlye8uvvx{list-style:none}
|
|
173
178
|
.mly1a2a7pz{outline:none}
|
|
174
179
|
.mlyysyzu8{overflow:auto}
|
|
175
180
|
.mlyb3r6kr{overflow:hidden}
|
|
@@ -286,6 +291,7 @@ html[dir='rtl'] .mly17fq3gk{box-shadow:0 2px 12px 0 rgba(0,0,0,.1), 0 1px 2px 0
|
|
|
286
291
|
.mly2b4tyj{display:var(--mlyvpnzvp)}
|
|
287
292
|
.mlydt5ytf{flex-direction:column}
|
|
288
293
|
.mly1q0g3np{flex-direction:row}
|
|
294
|
+
.mly1c4vz4f{flex-grow:0}
|
|
289
295
|
.mly1iyjqo2{flex-grow:1}
|
|
290
296
|
.mly2lah0s{flex-shrink:0}
|
|
291
297
|
.mly1a02dak{flex-wrap:wrap}
|
|
@@ -389,6 +395,7 @@ html[dir='rtl'] .mly17fq3gk{box-shadow:0 2px 12px 0 rgba(0,0,0,.1), 0 1px 2px 0
|
|
|
389
395
|
.mlydk7pt{height:8px}
|
|
390
396
|
.mlylo07zb{height:90px}
|
|
391
397
|
.mlyt7dq6l{height:auto}
|
|
398
|
+
.mly10msahz{height:calc(100% - 4px)}
|
|
392
399
|
.mly1ktj5wk{height:calc(100% - 8px)}
|
|
393
400
|
.mlyu96u03{left:0}
|
|
394
401
|
.mly12nagc{margin-bottom:4px}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
|
+
export interface CodeEditorProps {
|
|
3
|
+
language: string;
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (value: string | Malloy.Query) => void;
|
|
6
|
+
}
|
|
7
|
+
export default function CodeEditor({ language, value, onChange, }: CodeEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
|
+
import * as Monaco from './monaco/monaco_shim';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import type { ModelDef } from '@malloydata/malloy';
|
|
5
|
+
export interface CodeEditorContextProps {
|
|
6
|
+
monaco?: typeof Monaco;
|
|
7
|
+
modelDef?: ModelDef;
|
|
8
|
+
modelUri?: URL;
|
|
9
|
+
malloyToQuery?: (malloy: string) => {
|
|
10
|
+
query?: Malloy.Query | undefined;
|
|
11
|
+
logs: Malloy.LogMessage[];
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export declare const CodeEditorContext: React.Context<CodeEditorContextProps>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import * as Monaco from '../monaco/monaco_shim';
|
|
2
|
+
export declare function provideCompletionItems(monaco: typeof Monaco, textModel: Monaco.editor.ITextModel, position: Monaco.Position, _context: Monaco.languages.CompletionContext, _token: Monaco.CancellationToken): Monaco.languages.CompletionList;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import * as Monaco from '../monaco/monaco_shim';
|
|
2
|
+
export declare function provideHover(textModel: Monaco.editor.ITextModel, position: Monaco.Position, _token: Monaco.CancellationToken, _context?: Monaco.languages.HoverContext<Monaco.languages.Hover>): Promise<Monaco.languages.Hover | null>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { diagnostics } from './diagnostics';
|
|
2
|
+
export { provideCodeActions } from './code_actions';
|
|
3
|
+
export { provideCompletionItems } from './completions';
|
|
4
|
+
export { provideDefinition } from './definitions';
|
|
5
|
+
export { provideDocumentSymbols } from './symbols';
|
|
6
|
+
export { provideHover } from './hover';
|
|
7
|
+
export { registerModel, initLsp } from './utils';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MalloyQueryData, Model, ModelDef, Parse, SQLSourceDef, TableSourceDef, URLReader } from '@malloydata/malloy';
|
|
2
|
+
import { BaseConnection } from '@malloydata/malloy/connection';
|
|
3
|
+
export declare class StubReader implements URLReader {
|
|
4
|
+
readURL(_url: URL): Promise<string>;
|
|
5
|
+
}
|
|
6
|
+
export declare class StubConnection extends BaseConnection {
|
|
7
|
+
dialectName: string;
|
|
8
|
+
name: string;
|
|
9
|
+
constructor(dialectName?: string);
|
|
10
|
+
runSQL(): Promise<MalloyQueryData>;
|
|
11
|
+
fetchSelectSchema(_sqlSource: SQLSourceDef): Promise<SQLSourceDef | string>;
|
|
12
|
+
fetchTableSchema(_tableName: string, _tablePath: string): Promise<TableSourceDef | string>;
|
|
13
|
+
}
|
|
14
|
+
export declare function stubCompile(modelDef: ModelDef, malloy: string): Promise<Model>;
|
|
15
|
+
export declare function stubParse(_modelDef: ModelDef, source: string): Parse;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ModelDef } from '@malloydata/malloy';
|
|
2
|
+
import * as Monaco from '../monaco/monaco_shim';
|
|
3
|
+
export declare function convertPosition(position: Monaco.Position): {
|
|
4
|
+
line: number;
|
|
5
|
+
character: number;
|
|
6
|
+
};
|
|
7
|
+
export declare function registerModel(modelUri: string, modelDef: ModelDef): void;
|
|
8
|
+
export declare function getModel(modelUri: string): ModelDef;
|
|
9
|
+
export declare function initLsp(monaco: typeof Monaco): Monaco.IDisposable;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,13 +3,20 @@ import * as Malloy from '@malloydata/malloy-interfaces';
|
|
|
3
3
|
import type { DrillData } from '@malloydata/render';
|
|
4
4
|
import { SearchValueMapResult } from '../hooks/useTopValues';
|
|
5
5
|
export interface MalloyExplorerProviderProps {
|
|
6
|
+
/** Malloy source to extend for query */
|
|
6
7
|
source: Malloy.SourceInfo;
|
|
7
|
-
query
|
|
8
|
-
|
|
8
|
+
/** Current query state */
|
|
9
|
+
query?: Malloy.Query | string;
|
|
10
|
+
/** Callback for editor changes */
|
|
11
|
+
onQueryChange?: (query: Malloy.Query | string | undefined) => void;
|
|
12
|
+
/** Currently focused nest element */
|
|
9
13
|
focusedNestViewPath: string[];
|
|
14
|
+
/** Callback for user selecting focussed element */
|
|
10
15
|
onFocusedNestViewPathChange: (path: string[]) => void;
|
|
11
|
-
children: ReactNode
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
/** Search index result values for suggestions */
|
|
12
18
|
topValues?: SearchValueMapResult[];
|
|
19
|
+
/** Default drill behavior override callback */
|
|
13
20
|
onDrill?: ({ stableQuery, stableDrillClauses }: DrillData) => void;
|
|
14
21
|
}
|
|
15
22
|
export declare function MalloyExplorerProvider({ source, query, onQueryChange, focusedNestViewPath, onFocusedNestViewPathChange, children, topValues, onDrill, }: MalloyExplorerProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,5 +4,6 @@ import * as Malloy from '@malloydata/malloy-interfaces';
|
|
|
4
4
|
*/
|
|
5
5
|
export interface QueryActionBarProps {
|
|
6
6
|
runQuery: (source: Malloy.SourceInfo, query: Malloy.Query) => void;
|
|
7
|
+
runQueryString?: (source: Malloy.SourceInfo, query: string) => void;
|
|
7
8
|
}
|
|
8
|
-
export declare function QueryActionBar({ runQuery }: QueryActionBarProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function QueryActionBar({ runQuery, runQueryString, }: QueryActionBarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
2
|
interface QueryPanelProps {
|
|
3
3
|
runQuery: (source: Malloy.SourceInfo, query: Malloy.Query) => void;
|
|
4
|
+
runQueryString?: (source: Malloy.SourceInfo, query: string) => void;
|
|
4
5
|
}
|
|
5
|
-
export default function QueryPanel({ runQuery }: QueryPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default function QueryPanel({ runQuery, runQueryString, }: QueryPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -7,8 +7,8 @@ type ResultPanelOptions = {
|
|
|
7
7
|
};
|
|
8
8
|
export interface ResultPanelProps {
|
|
9
9
|
source: Malloy.SourceInfo;
|
|
10
|
-
draftQuery?: Malloy.Query;
|
|
11
|
-
setDraftQuery: (query: Malloy.Query) => void;
|
|
10
|
+
draftQuery?: Malloy.Query | string;
|
|
11
|
+
setDraftQuery: (query: Malloy.Query | string) => void;
|
|
12
12
|
submittedQuery?: SubmittedQuery;
|
|
13
13
|
options?: ResultPanelOptions;
|
|
14
14
|
}
|
|
@@ -7,7 +7,7 @@ export declare const EXECUTION_STATES: {
|
|
|
7
7
|
};
|
|
8
8
|
export type QueryExecutionState = keyof typeof EXECUTION_STATES;
|
|
9
9
|
export type SubmittedQuery = {
|
|
10
|
-
query: Malloy.Query;
|
|
10
|
+
query: Malloy.Query | string;
|
|
11
11
|
executionState: QueryExecutionState;
|
|
12
12
|
queryResolutionStartMillis: number;
|
|
13
13
|
onCancel: () => void;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
3
|
import { FieldItem } from './utils';
|
|
3
4
|
import { SourceInfo } from '@malloydata/malloy-interfaces';
|
|
4
5
|
import { ASTQuery } from '@malloydata/malloy-query-builder';
|
|
5
6
|
interface FieldGroupListProps {
|
|
6
|
-
rootQuery
|
|
7
|
+
rootQuery?: ASTQuery;
|
|
7
8
|
source: SourceInfo;
|
|
8
9
|
fieldItems: FieldItem[];
|
|
9
10
|
fieldGroupType: 'view' | 'measure' | 'dimension';
|
|
11
|
+
onCopy: (field: Malloy.FieldInfo, path: string[]) => void;
|
|
10
12
|
}
|
|
11
|
-
export default function FieldGroupList({ rootQuery, source, fieldItems, fieldGroupType, }: FieldGroupListProps): React.ReactNode;
|
|
13
|
+
export default function FieldGroupList({ rootQuery, source, fieldItems, fieldGroupType, onCopy, }: FieldGroupListProps): React.ReactNode;
|
|
12
14
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
|
+
export interface FieldTokenWithCopyProps {
|
|
3
|
+
field: Malloy.FieldInfo;
|
|
4
|
+
path: string[];
|
|
5
|
+
onCopy: (field: Malloy.FieldInfo, path: string[]) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function FieldTokenWithCopy({ field, path, onCopy, }: FieldTokenWithCopyProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
1
2
|
import { FieldItem } from './utils';
|
|
2
3
|
import { SourceInfo } from '@malloydata/malloy-interfaces';
|
|
3
4
|
import { ASTQuery } from '@malloydata/malloy-query-builder';
|
|
4
5
|
interface SearchResultListProps {
|
|
5
|
-
rootQuery
|
|
6
|
+
rootQuery?: ASTQuery;
|
|
6
7
|
source: SourceInfo;
|
|
7
8
|
items: FieldItem[];
|
|
9
|
+
onCopy: (field: Malloy.FieldInfo, path: string[]) => void;
|
|
8
10
|
}
|
|
9
|
-
export default function SearchResultList({ rootQuery, source, items, }: SearchResultListProps): import("react/jsx-runtime").JSX.Element
|
|
11
|
+
export default function SearchResultList({ rootQuery, source, items, onCopy, }: SearchResultListProps): import("react/jsx-runtime").JSX.Element;
|
|
10
12
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export interface SourcePanelProps {
|
|
2
2
|
onRefresh: () => void;
|
|
3
3
|
}
|
|
4
|
-
export declare function SourcePanel({ onRefresh }: SourcePanelProps): import("react/jsx-runtime").JSX.Element
|
|
4
|
+
export declare function SourcePanel({ onRefresh }: SourcePanelProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -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;
|
|
@@ -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
|
|
7
|
+
source: Malloy.SourceInfo;
|
|
8
8
|
/** Query object to represent current state at the root level */
|
|
9
|
-
rootQuery
|
|
9
|
+
rootQuery: ASTQuery | undefined;
|
|
10
10
|
/** Provide to allow editing of the query */
|
|
11
|
-
setQuery: (query: Malloy.Query | undefined) => void;
|
|
12
|
-
|
|
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
|
|
3
|
+
export declare function useQueryBuilder(source: Malloy.SourceInfo, query?: Malloy.Query | string): ASTQuery | undefined;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -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';
|
package/jest.config.cjs
ADDED
|
@@ -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.
|
|
3
|
+
"version": "0.0.304-dev250814203415",
|
|
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
|
|
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.
|
|
86
|
-
"@malloydata/malloy": "^0.0.
|
|
87
|
+
"@malloydata/db-duckdb": "^0.0.304",
|
|
88
|
+
"@malloydata/malloy": "^0.0.304",
|
|
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": "
|
|
119
|
-
"@malloydata/malloy-interfaces": "
|
|
120
|
-
"@malloydata/malloy-query-builder": "
|
|
121
|
-
"@malloydata/malloy-tag": "
|
|
122
|
-
"@malloydata/render": "
|
|
120
|
+
"@malloydata/malloy-filter": ">=0.0.304",
|
|
121
|
+
"@malloydata/malloy-interfaces": ">=0.0.304",
|
|
122
|
+
"@malloydata/malloy-query-builder": ">=0.0.304",
|
|
123
|
+
"@malloydata/malloy-tag": ">=0.0.304",
|
|
124
|
+
"@malloydata/render": ">=0.0.304",
|
|
125
|
+
"monaco-editor-core": "^0.52.2",
|
|
123
126
|
"react": ">=19.0.0",
|
|
124
127
|
"react-dom": ">=19.0.0"
|
|
125
128
|
}
|
package/scripts/gen_flow.ts
CHANGED
|
@@ -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() {
|