@malloydata/malloy-explorer 0.0.278-dev250516210719 → 0.0.282-dev250528154617

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.
@@ -4,8 +4,10 @@ import { SearchValueMapResult } from '../contexts/QueryEditorContext';
4
4
  export interface MalloyExplorerProviderProps {
5
5
  source: Malloy.SourceInfo;
6
6
  query?: Malloy.Query;
7
- setQuery?: (query: Malloy.Query | undefined) => void;
7
+ onQueryChange?: (query: Malloy.Query | undefined) => void;
8
+ focusedNestViewPath: string[];
9
+ onFocusedNestViewPathChange: (path: string[]) => void;
8
10
  children: ReactNode | ReactNode[];
9
11
  topValues?: SearchValueMapResult[];
10
12
  }
11
- export declare function MalloyExplorerProvider({ source, query, setQuery, children, topValues, }: MalloyExplorerProviderProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function MalloyExplorerProvider({ source, query, onQueryChange, focusedNestViewPath, onFocusedNestViewPathChange, children, topValues, }: MalloyExplorerProviderProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from 'react';
2
+ import { ASTQuery, ASTView } from '@malloydata/malloy-query-builder';
3
+ interface MalloyQueryFocus {
4
+ focusMainView: () => void;
5
+ isMainViewFocused: boolean;
6
+ focusNestView: (path: string[]) => void;
7
+ isNestViewFocused: (path: string[]) => boolean;
8
+ focusedNestView: ASTView | null;
9
+ }
10
+ interface MalloyQueryFocusProviderProps {
11
+ rootQuery: ASTQuery | undefined;
12
+ focusedNestViewPath: string[];
13
+ onFocusedNestViewPathChange: (path: string[]) => void;
14
+ children: ReactNode | ReactNode[];
15
+ }
16
+ export declare function MalloyQueryFocusProvider({ rootQuery, focusedNestViewPath, onFocusedNestViewPathChange, children, }: MalloyQueryFocusProviderProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function useQueryFocus(): MalloyQueryFocus;
18
+ export {};
@@ -0,0 +1,7 @@
1
+ import { ASTNestViewOperation } from '@malloydata/malloy-query-builder';
2
+ import React from 'react';
3
+ export interface FocusableViewProps {
4
+ children: React.ReactNode | React.ReactNode[];
5
+ nest?: ASTNestViewOperation;
6
+ }
7
+ export declare function FocusableView({ children, nest }: FocusableViewProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import * as Malloy from '@malloydata/malloy-interfaces';
2
+ import { StyleXStyles } from '@stylexjs/stylex';
3
+ interface LiteralValueEditorProps {
4
+ value: Malloy.LiteralValue | undefined;
5
+ customStyle?: StyleXStyles;
6
+ }
7
+ export declare function LiteralValue({ value, customStyle }: LiteralValueEditorProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,6 @@
1
+ import { ASTDrillViewOperation, ASTQuery } from '@malloydata/malloy-query-builder';
2
+ export interface DrillOperationsProps {
3
+ rootQuery: ASTQuery;
4
+ drills: ASTDrillViewOperation[];
5
+ }
6
+ export declare function DrillOperations({ drills }: DrillOperationsProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,13 +1,19 @@
1
+ import * as Malloy from '@malloydata/malloy-interfaces';
1
2
  import { SubmittedQuery } from './SubmittedQuery';
2
3
  import './result_display.css';
3
- import type { MalloyRenderProps } from '@malloydata/render';
4
4
  import '@malloydata/render/webcomponent';
5
+ import type { MalloyRenderProps } from '@malloydata/render';
5
6
  declare global {
6
7
  interface HTMLElementTagNameMap {
7
8
  'malloy-render': HTMLElement & MalloyRenderProps;
8
9
  }
9
10
  }
11
+ export interface DrillData {
12
+ stableQuery: Malloy.Query | undefined;
13
+ stableDrillClauses: Malloy.DrillOperation[] | undefined;
14
+ }
10
15
  export interface ResultDisplayProps {
16
+ source: Malloy.SourceInfo;
11
17
  query: SubmittedQuery;
12
18
  }
13
- export default function ResultDisplay({ query }: ResultDisplayProps): import("react/jsx-runtime").JSX.Element;
19
+ export default function ResultDisplay({ source, query }: ResultDisplayProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const NestViewPathContext: React.Context<string[]>;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import * as Malloy from '@malloydata/malloy-interfaces';
3
- import { ASTQuery, ASTView } from '@malloydata/malloy-query-builder';
3
+ import { ASTQuery } from '@malloydata/malloy-query-builder';
4
4
  export interface SearchValueMapResult {
5
5
  fieldName: string;
6
6
  cardinality: number;
@@ -15,19 +15,8 @@ export interface QueryEditorContextProps {
15
15
  /** Query object to represent current state at the root level */
16
16
  rootQuery?: ASTQuery;
17
17
  /** Provide to allow editing of the query */
18
- setQuery?: (rootQuery: Malloy.Query | undefined) => void;
18
+ setQuery?: (query: Malloy.Query | undefined) => void;
19
19
  topValues?: SearchValueMapResult[];
20
- /** Currently focused nest query panel element */
21
- currentNestQueryPanel?: HTMLElement | null;
22
- /** Callback function for when the current focused nest query panel changes */
23
- onCurrentNestQueryPanelChange?: (panel: HTMLElement | null) => void;
24
- /** Nest view object corresponding to current focused nest query panel */
25
- currentNestView?: ASTView | null;
26
- /**
27
- * Callback function for when the nest view object
28
- * corresponding to current focused nest query panel changes
29
- */
30
- onCurrentNestViewChange?: (view: ASTView | null) => void;
31
20
  }
32
21
  /**
33
22
  * QueryEditorContext enables query editing by providing the setQuery
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/malloy-explorer",
3
- "version": "0.0.278-dev250516210719",
3
+ "version": "0.0.282-dev250528154617",
4
4
  "description": "Malloy visual query builder",
5
5
  "main": "dist/cjs/index.cjs",
6
6
  "types": "dist/types/index.d.ts",
@@ -8,12 +8,12 @@
8
8
  "exports": {
9
9
  ".": {
10
10
  "import": {
11
- "default": "./dist/esm/index.js",
12
- "types": "./dist/types/index.d.ts"
11
+ "types": "./dist/types/index.d.ts",
12
+ "default": "./dist/esm/index.js"
13
13
  },
14
14
  "require": {
15
- "default": "./dist/cjs/index.cjs",
16
- "types": "./dist/types/index.d.ts"
15
+ "types": "./dist/types/index.d.ts",
16
+ "default": "./dist/cjs/index.cjs"
17
17
  }
18
18
  },
19
19
  "./package.json": "./package.json",
@@ -108,15 +108,16 @@
108
108
  "postcss": "^8.5.3",
109
109
  "ts-jest": "^29.3.2",
110
110
  "tsx": "^4.19.3",
111
+ "typescript": "^5.8.3",
111
112
  "vite": "^6.1.0",
112
113
  "vite-plugin-svgr": "^4.3.0"
113
114
  },
114
115
  "peerDependencies": {
115
- "@malloydata/malloy-filter": ">= 0.0.278",
116
- "@malloydata/malloy-interfaces": ">= 0.0.278",
117
- "@malloydata/malloy-query-builder": ">= 0.0.278",
118
- "@malloydata/malloy-tag": ">= 0.0.278",
119
- "@malloydata/render": ">= 0.0.278",
116
+ "@malloydata/malloy-filter": ">= 0.0.282",
117
+ "@malloydata/malloy-interfaces": ">= 0.0.282",
118
+ "@malloydata/malloy-query-builder": ">= 0.0.282",
119
+ "@malloydata/malloy-tag": ">= 0.0.282",
120
+ "@malloydata/render": ">= 0.0.282",
120
121
  "react": ">= 19.0.0",
121
122
  "react-dom": ">= 19.0.0"
122
123
  }