@malloydata/malloy-explorer 0.0.257-dev250410160631

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 (158) hide show
  1. package/.editorconfig +8 -0
  2. package/.github/workflows/prerelease.yaml +28 -0
  3. package/.github/workflows/test.yaml +26 -0
  4. package/.node-version +1 -0
  5. package/.prettierrc.js +8 -0
  6. package/.vscode/extensions.json +6 -0
  7. package/@flowtypes/components/MalloyExplorerProvider.flow.js +13 -0
  8. package/@flowtypes/components/QueryPanel/QueryActionBar.flow.js +10 -0
  9. package/@flowtypes/components/QueryPanel/QueryEditor.flow.js +9 -0
  10. package/@flowtypes/components/ResultPanel/ResultPanel.flow.js +14 -0
  11. package/@flowtypes/components/ResultPanel/SubmittedQuery.flow.js +32 -0
  12. package/@flowtypes/components/SourcePanel/SourcePanel.flow.js +9 -0
  13. package/@flowtypes/contexts/ExplorerPanelsContext.flow.js +6 -0
  14. package/@flowtypes/index.flow.js +18 -0
  15. package/CONTRIBUTING.md +44 -0
  16. package/LICENSE +9 -0
  17. package/README.md +23 -0
  18. package/babel.config.mjs +35 -0
  19. package/dist/cjs/index.cjs +30740 -0
  20. package/dist/cjs/index.cjs.map +1 -0
  21. package/dist/esm/index.js +30723 -0
  22. package/dist/esm/index.js.map +1 -0
  23. package/dist/malloy-explorer.css +422 -0
  24. package/dist/types/components/ErrorElement.d.ts +18 -0
  25. package/dist/types/components/FieldHoverCard.d.ts +13 -0
  26. package/dist/types/components/FieldToken.d.ts +19 -0
  27. package/dist/types/components/Label.d.ts +5 -0
  28. package/dist/types/components/MalloyExplorerProvider.d.ts +11 -0
  29. package/dist/types/components/QueryPanel/AddMenu/AddAggregate.d.ts +6 -0
  30. package/dist/types/components/QueryPanel/AddMenu/AddEmptyNest.d.ts +6 -0
  31. package/dist/types/components/QueryPanel/AddMenu/AddFieldItem.d.ts +15 -0
  32. package/dist/types/components/QueryPanel/AddMenu/AddGroupBy.d.ts +6 -0
  33. package/dist/types/components/QueryPanel/AddMenu/AddItem.d.ts +9 -0
  34. package/dist/types/components/QueryPanel/AddMenu/AddLimit.d.ts +6 -0
  35. package/dist/types/components/QueryPanel/AddMenu/AddMenu.d.ts +6 -0
  36. package/dist/types/components/QueryPanel/AddMenu/AddOrderBy.d.ts +6 -0
  37. package/dist/types/components/QueryPanel/AddMenu/AddView.d.ts +7 -0
  38. package/dist/types/components/QueryPanel/AddMenu/AddWhere.d.ts +6 -0
  39. package/dist/types/components/QueryPanel/AddMenu/FieldList.d.ts +11 -0
  40. package/dist/types/components/QueryPanel/AddMenu/FieldMenu.d.ts +10 -0
  41. package/dist/types/components/QueryPanel/AddMenu/ValueList.d.ts +10 -0
  42. package/dist/types/components/QueryPanel/AddMenu/colors.stylex.d.ts +7 -0
  43. package/dist/types/components/QueryPanel/AddMenu/hooks/useSearch.d.ts +10 -0
  44. package/dist/types/components/QueryPanel/AddMenu/styles.d.ts +34 -0
  45. package/dist/types/components/QueryPanel/FieldHover.d.ts +10 -0
  46. package/dist/types/components/QueryPanel/LiteralValueEditor.d.ts +9 -0
  47. package/dist/types/components/QueryPanel/Operations.d.ts +6 -0
  48. package/dist/types/components/QueryPanel/Parameters.d.ts +8 -0
  49. package/dist/types/components/QueryPanel/Query.d.ts +8 -0
  50. package/dist/types/components/QueryPanel/QueryActionBar.d.ts +11 -0
  51. package/dist/types/components/QueryPanel/QueryEditor.d.ts +15 -0
  52. package/dist/types/components/QueryPanel/QueryPanel.d.ts +10 -0
  53. package/dist/types/components/QueryPanel/Source.d.ts +8 -0
  54. package/dist/types/components/QueryPanel/View.d.ts +6 -0
  55. package/dist/types/components/QueryPanel/ViewDefinition.d.ts +6 -0
  56. package/dist/types/components/QueryPanel/Visualization.d.ts +7 -0
  57. package/dist/types/components/QueryPanel/VisualizationIcon.d.ts +5 -0
  58. package/dist/types/components/QueryPanel/index.d.ts +3 -0
  59. package/dist/types/components/QueryPanel/operations/AggregateOperations.d.ts +7 -0
  60. package/dist/types/components/QueryPanel/operations/ClearButton.d.ts +4 -0
  61. package/dist/types/components/QueryPanel/operations/GroupByOperations.d.ts +7 -0
  62. package/dist/types/components/QueryPanel/operations/LimitOperation.d.ts +7 -0
  63. package/dist/types/components/QueryPanel/operations/NestOperation.d.ts +7 -0
  64. package/dist/types/components/QueryPanel/operations/OperationActionTitle.d.ts +12 -0
  65. package/dist/types/components/QueryPanel/operations/OrderByOperations.d.ts +7 -0
  66. package/dist/types/components/QueryPanel/operations/WhereOperations.d.ts +7 -0
  67. package/dist/types/components/QueryPanel/operations/hover.stylex.d.ts +17 -0
  68. package/dist/types/components/ResultPanel/BookmarkedView.d.ts +7 -0
  69. package/dist/types/components/ResultPanel/EmptyQueryDisplay.d.ts +6 -0
  70. package/dist/types/components/ResultPanel/ResultDisplay.d.ts +6 -0
  71. package/dist/types/components/ResultPanel/ResultPanel.d.ts +14 -0
  72. package/dist/types/components/ResultPanel/SubmittedQuery.d.ts +28 -0
  73. package/dist/types/components/ResultPanel/ViewAttributeTable.d.ts +9 -0
  74. package/dist/types/components/ResultPanel/Visualization.d.ts +5 -0
  75. package/dist/types/components/ResultPanel/index.d.ts +1 -0
  76. package/dist/types/components/SourcePanel/AddFieldDropdownMenu.d.ts +13 -0
  77. package/dist/types/components/SourcePanel/FieldGroupList.d.ts +10 -0
  78. package/dist/types/components/SourcePanel/FieldTokenWithActions.d.ts +7 -0
  79. package/dist/types/components/SourcePanel/NestFieldDropdownMenu.d.ts +12 -0
  80. package/dist/types/components/SourcePanel/OperationDropdownMenuItems.d.ts +10 -0
  81. package/dist/types/components/SourcePanel/SearchResultList.d.ts +8 -0
  82. package/dist/types/components/SourcePanel/SourcePanel.d.ts +7 -0
  83. package/dist/types/components/SourcePanel/field-token.stylex.d.ts +3 -0
  84. package/dist/types/components/SourcePanel/hooks/useNestOperations.d.ts +9 -0
  85. package/dist/types/components/SourcePanel/hooks/useOperations.d.ts +8 -0
  86. package/dist/types/components/SourcePanel/index.d.ts +1 -0
  87. package/dist/types/components/SourcePanel/utils.d.ts +24 -0
  88. package/dist/types/components/TopValuesTable.d.ts +7 -0
  89. package/dist/types/components/filters/BooleanFilterToken.d.ts +11 -0
  90. package/dist/types/components/filters/DateTimeFilterToken.d.ts +12 -0
  91. package/dist/types/components/filters/NumberFilterToken.d.ts +13 -0
  92. package/dist/types/components/filters/PillInput.d.ts +18 -0
  93. package/dist/types/components/filters/StringFilterToken.d.ts +14 -0
  94. package/dist/types/components/filters/index.d.ts +0 -0
  95. package/dist/types/components/hooks/useClickOutside.d.ts +1 -0
  96. package/dist/types/components/primitives/Badge.d.ts +37 -0
  97. package/dist/types/components/primitives/BadgeForField.d.ts +6 -0
  98. package/dist/types/components/primitives/Banner.d.ts +36 -0
  99. package/dist/types/components/primitives/Button.d.ts +92 -0
  100. package/dist/types/components/primitives/Card.d.ts +12 -0
  101. package/dist/types/components/primitives/CodeBlock.d.ts +26 -0
  102. package/dist/types/components/primitives/CollapsibleListItem.d.ts +16 -0
  103. package/dist/types/components/primitives/CollapsiblePanel.d.ts +13 -0
  104. package/dist/types/components/primitives/DOMElement.d.ts +5 -0
  105. package/dist/types/components/primitives/DatePicker.d.ts +9 -0
  106. package/dist/types/components/primitives/Divider.d.ts +24 -0
  107. package/dist/types/components/primitives/DropdownMenu.d.ts +33 -0
  108. package/dist/types/components/primitives/ErrorIcon.d.ts +8 -0
  109. package/dist/types/components/primitives/Icon.d.ts +57 -0
  110. package/dist/types/components/primitives/List.d.ts +9 -0
  111. package/dist/types/components/primitives/ListItem.d.ts +21 -0
  112. package/dist/types/components/primitives/NumberInput.d.ts +10 -0
  113. package/dist/types/components/primitives/Popover.d.ts +19 -0
  114. package/dist/types/components/primitives/ResizeBar.d.ts +7 -0
  115. package/dist/types/components/primitives/ScrollableArea.d.ts +9 -0
  116. package/dist/types/components/primitives/SelectDropdown.d.ts +31 -0
  117. package/dist/types/components/primitives/Spinner.d.ts +22 -0
  118. package/dist/types/components/primitives/TextInput.d.ts +54 -0
  119. package/dist/types/components/primitives/badge.stylex.d.ts +6 -0
  120. package/dist/types/components/primitives/button.stylex.d.ts +6 -0
  121. package/dist/types/components/primitives/colors.stylex.d.ts +39 -0
  122. package/dist/types/components/primitives/dropdown-menu.stylex.d.ts +9 -0
  123. package/dist/types/components/primitives/index.d.ts +22 -0
  124. package/dist/types/components/primitives/scrollable-area.stylex.d.ts +6 -0
  125. package/dist/types/components/primitives/styles.d.ts +74 -0
  126. package/dist/types/components/primitives/syntax_highlighting/malloyGrammar.d.ts +279 -0
  127. package/dist/types/components/primitives/syntax_highlighting/syntaxHighlighter.d.ts +6 -0
  128. package/dist/types/components/primitives/syntax_highlighting/transformers/lineNumberTransformer.d.ts +3 -0
  129. package/dist/types/components/primitives/syntax_highlighting/transformers/lineSpacingTransformer.d.ts +8 -0
  130. package/dist/types/components/primitives/syntax_highlighting/transformers/transformers.d.ts +8 -0
  131. package/dist/types/components/primitives/tokens/EditableToken.d.ts +50 -0
  132. package/dist/types/components/primitives/tokens/SelectorToken.d.ts +18 -0
  133. package/dist/types/components/primitives/tokens/Token.d.ts +49 -0
  134. package/dist/types/components/primitives/tokens/TokenGroup.d.ts +21 -0
  135. package/dist/types/components/primitives/tokens/styles.d.ts +45 -0
  136. package/dist/types/components/primitives/tokens/token.stylex.d.ts +6 -0
  137. package/dist/types/components/primitives/tokens/types.d.ts +5 -0
  138. package/dist/types/components/primitives/utils/icon.d.ts +388 -0
  139. package/dist/types/components/styles.d.ts +66 -0
  140. package/dist/types/components/utils/fields.d.ts +9 -0
  141. package/dist/types/components/utils/icon.d.ts +7 -0
  142. package/dist/types/components/utils/renderer.d.ts +6 -0
  143. package/dist/types/components/utils/segment.d.ts +6 -0
  144. package/dist/types/contexts/ExplorerPanelsContext.d.ts +11 -0
  145. package/dist/types/contexts/QueryEditorContext.d.ts +25 -0
  146. package/dist/types/hooks/useQueryBuilder.d.ts +3 -0
  147. package/dist/types/index.d.ts +8 -0
  148. package/dist/types/types/error.d.ts +8 -0
  149. package/eslint.config.mjs +156 -0
  150. package/index.html +19 -0
  151. package/package.json +109 -0
  152. package/postcss.config.mjs +20 -0
  153. package/scripts/env.d.ts +3 -0
  154. package/scripts/gen_flow.ts +38 -0
  155. package/scripts/malloy-packages.ts +17 -0
  156. package/scripts/tsconfig.json +8 -0
  157. package/tsconfig.json +16 -0
  158. package/vite.config.mts +65 -0
@@ -0,0 +1,34 @@
1
+ export declare const addMenuStyles: Readonly<{
2
+ readonly content: Readonly<{
3
+ readonly background: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"background", string>;
4
+ readonly borderRadius: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderRadius", 4>;
5
+ readonly borderWidth: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderWidth", 1>;
6
+ readonly boxShadow: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"boxShadow", `0px 2px 12px 0px ${import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>}`>;
7
+ readonly fontFamily: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontFamily", "sans-serif">;
8
+ readonly margin: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"margin", 8>;
9
+ readonly maxHeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"maxHeight", "50vh">;
10
+ readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "flex">;
11
+ readonly flexDirection: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"flexDirection", "column">;
12
+ }>;
13
+ readonly item: Readonly<{
14
+ readonly alignItems: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"alignItems", "center">;
15
+ readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
16
+ readonly padding: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"padding", 8>;
17
+ readonly cursor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"cursor", "default">;
18
+ readonly userSelect: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"userSelect", "none">;
19
+ readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "flex">;
20
+ readonly justifyContent: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"justifyContent", "space-between">;
21
+ readonly borderRadius: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderRadius", 3>;
22
+ }>;
23
+ readonly clickable: Readonly<{
24
+ readonly backgroundColor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"backgroundColor", {
25
+ readonly ':hover': import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
26
+ }>;
27
+ }>;
28
+ readonly label: Readonly<{
29
+ readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "flex">;
30
+ readonly alignItems: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"alignItems", "center">;
31
+ readonly gap: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"gap", 8>;
32
+ }>;
33
+ readonly tooltip: Readonly<{}>;
34
+ }>;
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ import * as Malloy from '@malloydata/malloy-interfaces';
3
+ export interface FieldHoverProps {
4
+ align?: 'start' | 'center' | 'end';
5
+ children: ReactNode;
6
+ field: Malloy.FieldInfo;
7
+ path: string[] | undefined;
8
+ side?: 'top' | 'bottom' | 'left' | 'right';
9
+ }
10
+ export declare function FieldHover({ align, children, field, path, side, }: FieldHoverProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import * as Malloy from '@malloydata/malloy-interfaces';
2
+ import { RawLiteralValue } from '@malloydata/malloy-query-builder';
3
+ import { StyleXStyles } from '@stylexjs/stylex';
4
+ export interface LiteralValueEditorProps {
5
+ value: Malloy.LiteralValue | undefined;
6
+ setValue: (value: RawLiteralValue) => void;
7
+ customStyle?: StyleXStyles;
8
+ }
9
+ export declare function LiteralValueEditor({ value, setValue, customStyle, }: LiteralValueEditorProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,6 @@
1
+ import { ASTQuery, ASTViewDefinition } from '@malloydata/malloy-query-builder';
2
+ export interface OperationsProps {
3
+ rootQuery: ASTQuery;
4
+ viewDef: ASTViewDefinition;
5
+ }
6
+ export declare function Operations({ rootQuery, viewDef }: OperationsProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { ASTQuery } from '@malloydata/malloy-query-builder';
2
+ /**
3
+ * Source
4
+ */
5
+ export interface ParametersProps {
6
+ rootQuery: ASTQuery;
7
+ }
8
+ export declare function Parameters({ rootQuery }: ParametersProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,8 @@
1
+ import * as Malloy from '@malloydata/malloy-interfaces';
2
+ import { ASTQuery } from '@malloydata/malloy-query-builder';
3
+ export interface QueryProps {
4
+ rootQuery: ASTQuery;
5
+ query: ASTQuery;
6
+ setQuery?: (query: Malloy.Query | undefined) => void;
7
+ }
8
+ export declare function Query({ rootQuery, query, setQuery }: QueryProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import * as Malloy from '@malloydata/malloy-interfaces';
2
+ /**
3
+ * Source
4
+ */
5
+ export interface QueryActionBarProps {
6
+ source: Malloy.SourceInfo;
7
+ query?: Malloy.Query;
8
+ clearQuery: () => void;
9
+ runQuery: (source: Malloy.SourceInfo, query: Malloy.Query) => void;
10
+ }
11
+ export declare function QueryActionBar({ source, query, clearQuery, runQuery, }: QueryActionBarProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import * as Malloy from '@malloydata/malloy-interfaces';
2
+ export interface QueryEditorProps {
3
+ source: Malloy.SourceInfo;
4
+ query?: Malloy.Query;
5
+ setQuery?: (query: Malloy.Query | undefined) => void;
6
+ }
7
+ /**
8
+ * The Query Viewing and Editing panel. Takes a `SourceInfo` object
9
+ * and an optional `Query` object.
10
+ *
11
+ * @param source The source object to be used for query building.
12
+ * @param query A query to be edited. Omit for a new query.
13
+ * @returns
14
+ */
15
+ export declare function QueryEditor({ source, query, setQuery }: QueryEditorProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,10 @@
1
+ import * as Malloy from '@malloydata/malloy-interfaces';
2
+ interface QueryPanelProps {
3
+ source: Malloy.SourceInfo;
4
+ query?: Malloy.Query;
5
+ showSource?: boolean;
6
+ setQuery: (query: Malloy.Query | undefined) => void;
7
+ runQuery: (source: Malloy.SourceInfo, query: Malloy.Query) => void;
8
+ }
9
+ export default function QueryPanel({ source, query, setQuery, runQuery, }: QueryPanelProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,8 @@
1
+ import { ASTQuery } from '@malloydata/malloy-query-builder';
2
+ /**
3
+ * Source
4
+ */
5
+ export interface SourceProps {
6
+ rootQuery: ASTQuery;
7
+ }
8
+ export declare function Source({ rootQuery }: SourceProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,6 @@
1
+ import { ASTQuery, ASTView } from '@malloydata/malloy-query-builder';
2
+ export interface ViewProps {
3
+ rootQuery: ASTQuery;
4
+ view: ASTView;
5
+ }
6
+ export declare function View({ rootQuery, view }: ViewProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { ASTQuery, ASTViewDefinition } from '@malloydata/malloy-query-builder';
2
+ export interface ViewProps {
3
+ rootQuery: ASTQuery;
4
+ viewDef: ASTViewDefinition;
5
+ }
6
+ export declare function ViewDefinition({ rootQuery, viewDef }: ViewProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { ASTQuery, ASTView } from '@malloydata/malloy-query-builder';
2
+ export interface VisualizationProps {
3
+ rootQuery: ASTQuery;
4
+ view: ASTQuery | ASTView;
5
+ }
6
+ export declare function Visualization({ rootQuery, view }: VisualizationProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function snakeToTitle(snake: string): string;
@@ -0,0 +1,5 @@
1
+ import { ASTQuery, ASTView } from '@malloydata/malloy-query-builder';
2
+ export interface VisualizationIconProps {
3
+ view: ASTQuery | ASTView;
4
+ }
5
+ export declare function VisualizationIcon({ view }: VisualizationIconProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export { QueryActionBar } from './QueryActionBar';
2
+ export { QueryEditor } from './QueryEditor';
3
+ export { default as QueryPanel } from './QueryPanel';
@@ -0,0 +1,7 @@
1
+ import { ASTAggregateViewOperation, ASTQuery, ASTSegmentViewDefinition } from '@malloydata/malloy-query-builder';
2
+ export interface AggregateOperationsProps {
3
+ rootQuery: ASTQuery;
4
+ segment: ASTSegmentViewDefinition;
5
+ aggregates: ASTAggregateViewOperation[];
6
+ }
7
+ export declare function AggregateOperations({ rootQuery, segment, aggregates, }: AggregateOperationsProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,4 @@
1
+ export interface ClearButtonProps {
2
+ onClick: () => void;
3
+ }
4
+ export declare function ClearButton({ onClick }: ClearButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { ASTGroupByViewOperation, ASTQuery, ASTSegmentViewDefinition } from '@malloydata/malloy-query-builder';
2
+ export interface GroupByOperationsProps {
3
+ rootQuery: ASTQuery;
4
+ segment: ASTSegmentViewDefinition;
5
+ groupBys: ASTGroupByViewOperation[];
6
+ }
7
+ export declare function GroupByOperations({ rootQuery, segment, groupBys, }: GroupByOperationsProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,7 @@
1
+ import { ASTLimitViewOperation, ASTQuery, ASTSegmentViewDefinition } from '@malloydata/malloy-query-builder';
2
+ export interface LimitOperationProps {
3
+ rootQuery: ASTQuery;
4
+ segment: ASTSegmentViewDefinition;
5
+ limit: ASTLimitViewOperation | undefined;
6
+ }
7
+ export declare function LimitOperation({ rootQuery, limit }: LimitOperationProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,7 @@
1
+ import { ASTNestViewOperation, ASTQuery, ASTSegmentViewDefinition } from '@malloydata/malloy-query-builder';
2
+ export interface NestOperationsProps {
3
+ rootQuery: ASTQuery;
4
+ segment: ASTSegmentViewDefinition;
5
+ nests: ASTNestViewOperation[];
6
+ }
7
+ export declare function NestOperations({ rootQuery, nests }: NestOperationsProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,12 @@
1
+ import * as Malloy from '@malloydata/malloy-interfaces';
2
+ import { ASTQuery, ASTSegmentViewDefinition } from '@malloydata/malloy-query-builder';
3
+ export interface OperationActionTitleProps {
4
+ rootQuery: ASTQuery;
5
+ segment: ASTSegmentViewDefinition;
6
+ title: string;
7
+ actionTitle: string;
8
+ fields: Malloy.FieldInfo[];
9
+ types: Array<'dimension' | 'measure' | 'view'>;
10
+ onClick: (field: Malloy.FieldInfo, path: string[]) => void;
11
+ }
12
+ export declare function OperationActionTitle({ actionTitle, segment, fields, title, types, onClick, }: OperationActionTitleProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { ASTOrderByViewOperation, ASTQuery, ASTSegmentViewDefinition } from '@malloydata/malloy-query-builder';
2
+ export interface OrderByOperationsProps {
3
+ rootQuery: ASTQuery;
4
+ segment: ASTSegmentViewDefinition;
5
+ orderBys: ASTOrderByViewOperation[];
6
+ }
7
+ export declare function OrderByOperations({ rootQuery, orderBys, }: OrderByOperationsProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,7 @@
1
+ import { ASTQuery, ASTSegmentViewDefinition, ASTWhereViewOperation } from '@malloydata/malloy-query-builder';
2
+ export interface WhereOperationsProps {
3
+ rootQuery: ASTQuery;
4
+ segment: ASTSegmentViewDefinition;
5
+ wheres: ASTWhereViewOperation[];
6
+ }
7
+ export declare function WhereOperations({ rootQuery, wheres }: WhereOperationsProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,17 @@
1
+ export declare const hoverActionsVars: import("@stylexjs/stylex").VarGroup<Readonly<{
2
+ display: string;
3
+ }>, symbol>;
4
+ export declare const hoverStyles: Readonly<{
5
+ readonly main: Readonly<{
6
+ readonly [x: string]: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<string, "flex" | "none" | "center" | "flex-start" | "pointer" | "inline-flex" | "4px">;
7
+ readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "flex">;
8
+ readonly alignItems: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"alignItems", "center">;
9
+ readonly justifyContent: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"justifyContent", "flex-start">;
10
+ readonly gap: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"gap", "4px">;
11
+ readonly cursor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"cursor", "pointer">;
12
+ }>;
13
+ readonly hoverActions: Readonly<{
14
+ readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", string>;
15
+ readonly flexShrink: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"flexShrink", 0>;
16
+ }>;
17
+ }>;
@@ -0,0 +1,7 @@
1
+ import * as Malloy from '@malloydata/malloy-interfaces';
2
+ interface BookmarkedViewProps {
3
+ viewInfo: Malloy.ViewInfo;
4
+ onClick: () => void;
5
+ }
6
+ export declare function BookmarkedView({ viewInfo, onClick }: BookmarkedViewProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ import * as Malloy from '@malloydata/malloy-interfaces';
2
+ export interface EmptyQueryDisplay {
3
+ views: Array<Malloy.ViewInfo>;
4
+ onSelectView: (view: Malloy.ViewInfo) => void;
5
+ }
6
+ export default function EmptyQueryDisplay({ views, onSelectView, }: EmptyQueryDisplay): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { SubmittedQuery } from './SubmittedQuery';
2
+ import '@malloydata/render/webcomponent';
3
+ export interface ResultDisplayProps {
4
+ query: SubmittedQuery;
5
+ }
6
+ export default function ResultDisplay({ query }: ResultDisplayProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import * as Malloy from '@malloydata/malloy-interfaces';
2
+ import { SubmittedQuery } from './SubmittedQuery';
3
+ type ResultPanelOptions = {
4
+ showRawQuery: boolean;
5
+ };
6
+ export interface ResultPanelProps {
7
+ source: Malloy.SourceInfo;
8
+ draftQuery?: Malloy.Query;
9
+ setDraftQuery: (query: Malloy.Query) => void;
10
+ submittedQuery?: SubmittedQuery;
11
+ options?: ResultPanelOptions;
12
+ }
13
+ export default function ResultPanel({ source, draftQuery, setDraftQuery, submittedQuery, options, }: ResultPanelProps): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,28 @@
1
+ import * as Malloy from '@malloydata/malloy-interfaces';
2
+ import { ExplorerError } from '../../types/error';
3
+ export declare const EXECUTION_STATES: {
4
+ compiling: string;
5
+ running: string;
6
+ finished: string;
7
+ canceled: string;
8
+ };
9
+ export type QueryExecutionState = keyof typeof EXECUTION_STATES;
10
+ export type SubmittedQuery = {
11
+ query: Malloy.Query;
12
+ executionState: QueryExecutionState;
13
+ queryResolutionStartMillis: number;
14
+ onCancel: () => void;
15
+ response?: QueryResponse;
16
+ };
17
+ export type RunStats = {
18
+ compileTime: number;
19
+ runTime: number;
20
+ rowsProcessed: number;
21
+ peakMemory: number;
22
+ queryId: string;
23
+ };
24
+ export type QueryResponse = {
25
+ error?: ExplorerError;
26
+ result?: Malloy.Result;
27
+ runStats?: RunStats;
28
+ };
@@ -0,0 +1,9 @@
1
+ import * as Malloy from '@malloydata/malloy-interfaces';
2
+ import { StyleXStyles } from '@stylexjs/stylex';
3
+ interface ViewAttributeTableProps {
4
+ viewInfo: Malloy.ViewInfo;
5
+ isCompact?: boolean;
6
+ style?: StyleXStyles;
7
+ }
8
+ export default function ViewAttributeTable({ viewInfo, isCompact, style, }: ViewAttributeTableProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,5 @@
1
+ import * as Malloy from '@malloydata/malloy-interfaces';
2
+ export interface VisualizationProps {
3
+ annotations: Malloy.Annotation[];
4
+ }
5
+ export declare function Visualization({ annotations }: VisualizationProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { default as ResultPanel } from './ResultPanel';
@@ -0,0 +1,13 @@
1
+ import React, { ReactElement } from 'react';
2
+ import { ASTSegmentViewDefinition } from '@malloydata/malloy-query-builder';
3
+ import { FieldInfo } from '@malloydata/malloy-interfaces';
4
+ interface AddFieldDropdownMenuProps {
5
+ segment?: ASTSegmentViewDefinition;
6
+ field: FieldInfo;
7
+ path: string[];
8
+ trigger: React.ReactElement;
9
+ onOpenChange: (open: boolean) => void;
10
+ tooltip?: ReactElement;
11
+ }
12
+ export declare function AddFieldDropdownMenu({ segment, field, path, trigger, onOpenChange, tooltip, }: AddFieldDropdownMenuProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import { FieldGroupByPath } from './utils';
3
+ import { SourceInfo } from '@malloydata/malloy-interfaces';
4
+ interface FieldGroupListProps {
5
+ source: SourceInfo;
6
+ title: string;
7
+ items: FieldGroupByPath[];
8
+ }
9
+ export default function FieldGroupList({ source, title, items, }: FieldGroupListProps): React.ReactNode;
10
+ export {};
@@ -0,0 +1,7 @@
1
+ import * as Malloy from '@malloydata/malloy-interfaces';
2
+ interface FieldTokenWithActionsProps {
3
+ field: Malloy.FieldInfo;
4
+ path: string[];
5
+ }
6
+ export declare function FieldTokenWithActions({ field, path, }: FieldTokenWithActionsProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { ASTSegmentViewDefinition } from '@malloydata/malloy-query-builder';
3
+ import { FieldInfo } from '@malloydata/malloy-interfaces';
4
+ interface NestFieldDropdownMenuProps {
5
+ segment?: ASTSegmentViewDefinition;
6
+ field: FieldInfo;
7
+ path: string[];
8
+ trigger: React.ReactElement;
9
+ onOpenChange: (open: boolean) => void;
10
+ }
11
+ export declare function NestFieldDropdownMenu({ segment, field, path, trigger, onOpenChange, }: NestFieldDropdownMenuProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,10 @@
1
+ import { ASTSegmentViewDefinition } from '@malloydata/malloy-query-builder';
2
+ import { FieldInfo } from '@malloydata/malloy-interfaces';
3
+ interface OperationDropdownMenuItemsProps {
4
+ segment?: ASTSegmentViewDefinition;
5
+ field: FieldInfo;
6
+ path: string[];
7
+ withEmptyNest?: boolean;
8
+ }
9
+ export declare function OperationDropdownMenuItems({ segment, field, path, withEmptyNest, }: OperationDropdownMenuItemsProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,8 @@
1
+ import { FieldItem } from './utils';
2
+ import { SourceInfo } from '@malloydata/malloy-interfaces';
3
+ interface SearchResultListProps {
4
+ source: SourceInfo;
5
+ items: FieldItem[];
6
+ }
7
+ export default function SearchResultList({ source, items, }: SearchResultListProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import * as Malloy from '@malloydata/malloy-interfaces';
2
+ export interface SourcePanelProps {
3
+ source: Malloy.SourceInfo;
4
+ query?: Malloy.Query;
5
+ setQuery: (query: Malloy.Query | undefined) => void;
6
+ }
7
+ export declare function SourcePanel({ source }: SourcePanelProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,3 @@
1
+ export declare const hoverActionsVars: import("@stylexjs/stylex").VarGroup<Readonly<{
2
+ display: string;
3
+ }>, symbol>;
@@ -0,0 +1,9 @@
1
+ import { ASTQuery, ASTViewDefinition } from '@malloydata/malloy-query-builder';
2
+ export type NestOperation = {
3
+ name: string;
4
+ view: ASTViewDefinition;
5
+ };
6
+ /**
7
+ * Retrieves nest view operations from the root query.
8
+ */
9
+ export declare function useNestOperations(rootQuery?: ASTQuery): NestOperation[];
@@ -0,0 +1,8 @@
1
+ import * as QueryBuilder from '@malloydata/malloy-query-builder';
2
+ import * as Malloy from '@malloydata/malloy-interfaces';
3
+ export declare function useOperations(segment: QueryBuilder.ASTSegmentViewDefinition | undefined, field: Malloy.FieldInfo, path: string[]): {
4
+ isGroupByAllowed: boolean;
5
+ isAggregateAllowed: boolean;
6
+ isFilterAllowed: boolean;
7
+ isOrderByAllowed: boolean;
8
+ };
@@ -0,0 +1 @@
1
+ export { SourcePanel } from './SourcePanel';
@@ -0,0 +1,24 @@
1
+ import { FieldInfo, SourceInfo } from '@malloydata/malloy-interfaces';
2
+ import { ASTSegmentViewDefinition } from '@malloydata/malloy-query-builder';
3
+ export type FieldItem = {
4
+ path: string[];
5
+ field: FieldInfo;
6
+ };
7
+ export type FieldGroupByPath = {
8
+ groupPath: string[];
9
+ items: FieldItem[];
10
+ };
11
+ export type FieldGroupByKind = {
12
+ group: 'view' | 'measure' | 'dimension';
13
+ items: FieldItem[];
14
+ };
15
+ export declare function flattenFieldsTree(fields: FieldInfo[], path?: string[]): FieldItem[];
16
+ export declare function sourceToFieldItems(source: SourceInfo): FieldItem[];
17
+ export declare function groupFieldItemsByPath(source: SourceInfo, items: FieldItem[]): FieldGroupByPath[];
18
+ export declare function groupFieldItemsByKind(items: FieldItem[]): FieldGroupByKind[];
19
+ export declare const getNestName: (segment: ASTSegmentViewDefinition, rename?: string) => string;
20
+ export declare const FIELD_KIND_TO_TITLE: {
21
+ readonly view: "Views";
22
+ readonly measure: "Measures";
23
+ readonly dimension: "Dimensions";
24
+ };
@@ -0,0 +1,7 @@
1
+ import * as Malloy from '@malloydata/malloy-interfaces';
2
+ export interface TopValuesTableProps {
3
+ field: Malloy.FieldInfo;
4
+ path: string[];
5
+ }
6
+ export declare function TopValuesTable({ field, path }: TopValuesTableProps): import("react/jsx-runtime").JSX.Element | null;
7
+ export declare function largeNumberLabel(n: number | null): string;
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ import * as Malloy from '@malloydata/malloy-interfaces';
3
+ import { BooleanFilter } from '@malloydata/malloy-filter';
4
+ export type BooleanFilterType = 'is_true' | 'is_false' | 'is_null' | 'is_not_null' | 'is_false_or_null';
5
+ interface BooleanFilterTokenProps {
6
+ fieldInfo: Malloy.FieldInfoWithDimension | Malloy.FieldInfoWithMeasure;
7
+ filter: BooleanFilter;
8
+ setFilter: (filter: BooleanFilter) => void;
9
+ }
10
+ export declare const BooleanFilterToken: React.FC<BooleanFilterTokenProps>;
11
+ export {};
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import * as Malloy from '@malloydata/malloy-interfaces';
3
+ import { TemporalFilter } from '@malloydata/malloy-filter';
4
+ type DateTimeFilterType = 'is_equal_to' | 'is_before' | 'is_after' | 'is_between' | 'is_null' | 'is_not_null';
5
+ export interface DateTimeFilterBuilderProps {
6
+ fieldInfo: Malloy.FieldInfoWithDimension | Malloy.FieldInfoWithMeasure;
7
+ filter: TemporalFilter | null;
8
+ setFilter: (filter: TemporalFilter) => void;
9
+ }
10
+ export declare const DateTimeFilterToken: React.FC<DateTimeFilterBuilderProps>;
11
+ export declare function dateTimeFilterChangeType(filter: TemporalFilter, type: DateTimeFilterType): TemporalFilter;
12
+ export {};
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import * as Malloy from '@malloydata/malloy-interfaces';
3
+ import { Null, NumberCondition, NumberFilter } from '@malloydata/malloy-filter';
4
+ type NumberFilterType = 'is_equal_to' | 'is_greater_than' | 'is_less_than' | 'is_greater_than_or_equal_to' | 'is_less_than_or_equal_to' | 'is_null' | 'is_not_equal_to' | 'is_not_null';
5
+ type BasicNumberFilter = NumberCondition | Null;
6
+ export interface NumberFilterBuilderProps {
7
+ fieldInfo: Malloy.FieldInfoWithDimension | Malloy.FieldInfoWithMeasure;
8
+ filter: NumberFilter | null;
9
+ setFilter: (filter: NumberFilter) => void;
10
+ }
11
+ export declare const NumberFilterToken: React.FC<NumberFilterBuilderProps>;
12
+ export declare function makeFilterWithNewType(filter: NumberFilter, type: NumberFilterType): BasicNumberFilter;
13
+ export {};
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { RefObject } from 'react';
3
+ import { StyleXStyles } from '@stylexjs/stylex';
4
+ import { TokenColor } from '../primitives/tokens/types';
5
+ interface PillInputProps {
6
+ value?: string;
7
+ setValue?: (value: string) => void;
8
+ values: string[];
9
+ setValues: (values: string[]) => void;
10
+ autoFocus?: boolean;
11
+ placeholder?: string;
12
+ type?: string;
13
+ focusElement?: RefObject<HTMLDivElement>;
14
+ color?: TokenColor;
15
+ customStyle?: StyleXStyles;
16
+ }
17
+ export declare const PillInput: React.FC<PillInputProps>;
18
+ export {};
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import * as Malloy from '@malloydata/malloy-interfaces';
3
+ import { Null, StringCondition, StringEmpty, StringFilter, StringMatch } from '@malloydata/malloy-filter';
4
+ type StringFilterType = 'is_equal_to' | 'starts_with' | 'ends_with' | 'contains' | 'matches' | 'is_blank' | 'is_null' | 'is_not_equal_to' | 'does_not_start_with' | 'does_not_end_with' | 'does_not_contain' | 'does_not_match' | 'is_not_blank' | 'is_not_null';
5
+ type BasicStringFilter = StringCondition | StringMatch | Null | StringEmpty;
6
+ export interface StringFilterBuilderProps {
7
+ fieldInfo: Malloy.FieldInfoWithDimension | Malloy.FieldInfoWithMeasure;
8
+ filter: StringFilter | null;
9
+ path: string[];
10
+ setFilter: (filter: StringFilter) => void;
11
+ }
12
+ export declare const StringFilterToken: React.FC<StringFilterBuilderProps>;
13
+ export declare function stringFilterChangeType(filter: StringFilter, type: StringFilterType): BasicStringFilter;
14
+ export {};
File without changes
@@ -0,0 +1 @@
1
+ export declare function useClickOutside<E extends Element | null>(refOrRefs: React.RefObject<E> | React.RefObject<E>[], handler: (event: Event) => void): void;
@@ -0,0 +1,37 @@
1
+ import { StyleXStyles } from '@stylexjs/stylex';
2
+ import { ICON_MAP } from './utils/icon';
3
+ type Color = keyof typeof colorVariants;
4
+ interface BadgeProps {
5
+ /**
6
+ * The label displayed on the badge.
7
+ */
8
+ label: string;
9
+ /**
10
+ * The color scheme of the badge, which affects both the background and text colors.
11
+ */
12
+ color?: Color;
13
+ /**
14
+ * Optional icon; displayed to left of badge text
15
+ */
16
+ icon?: keyof typeof ICON_MAP;
17
+ /**
18
+ * Optional additional styling for the badge
19
+ */
20
+ customStyle?: StyleXStyles;
21
+ }
22
+ export default function Badge({ label, color, icon, customStyle, }: BadgeProps): import("react/jsx-runtime").JSX.Element;
23
+ declare const colorVariants: Readonly<{
24
+ readonly gray: Readonly<{
25
+ readonly [x: string]: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<string, string>;
26
+ }>;
27
+ readonly purple: Readonly<{
28
+ readonly [x: string]: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<string, string>;
29
+ }>;
30
+ readonly green: Readonly<{
31
+ readonly [x: string]: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<string, string>;
32
+ }>;
33
+ readonly cyan: Readonly<{
34
+ readonly [x: string]: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<string, string>;
35
+ }>;
36
+ }>;
37
+ export {};