@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.
- package/.editorconfig +8 -0
- package/.github/workflows/prerelease.yaml +28 -0
- package/.github/workflows/test.yaml +26 -0
- package/.node-version +1 -0
- package/.prettierrc.js +8 -0
- package/.vscode/extensions.json +6 -0
- package/@flowtypes/components/MalloyExplorerProvider.flow.js +13 -0
- package/@flowtypes/components/QueryPanel/QueryActionBar.flow.js +10 -0
- package/@flowtypes/components/QueryPanel/QueryEditor.flow.js +9 -0
- package/@flowtypes/components/ResultPanel/ResultPanel.flow.js +14 -0
- package/@flowtypes/components/ResultPanel/SubmittedQuery.flow.js +32 -0
- package/@flowtypes/components/SourcePanel/SourcePanel.flow.js +9 -0
- package/@flowtypes/contexts/ExplorerPanelsContext.flow.js +6 -0
- package/@flowtypes/index.flow.js +18 -0
- package/CONTRIBUTING.md +44 -0
- package/LICENSE +9 -0
- package/README.md +23 -0
- package/babel.config.mjs +35 -0
- package/dist/cjs/index.cjs +30740 -0
- package/dist/cjs/index.cjs.map +1 -0
- package/dist/esm/index.js +30723 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/malloy-explorer.css +422 -0
- package/dist/types/components/ErrorElement.d.ts +18 -0
- package/dist/types/components/FieldHoverCard.d.ts +13 -0
- package/dist/types/components/FieldToken.d.ts +19 -0
- package/dist/types/components/Label.d.ts +5 -0
- package/dist/types/components/MalloyExplorerProvider.d.ts +11 -0
- package/dist/types/components/QueryPanel/AddMenu/AddAggregate.d.ts +6 -0
- package/dist/types/components/QueryPanel/AddMenu/AddEmptyNest.d.ts +6 -0
- package/dist/types/components/QueryPanel/AddMenu/AddFieldItem.d.ts +15 -0
- package/dist/types/components/QueryPanel/AddMenu/AddGroupBy.d.ts +6 -0
- package/dist/types/components/QueryPanel/AddMenu/AddItem.d.ts +9 -0
- package/dist/types/components/QueryPanel/AddMenu/AddLimit.d.ts +6 -0
- package/dist/types/components/QueryPanel/AddMenu/AddMenu.d.ts +6 -0
- package/dist/types/components/QueryPanel/AddMenu/AddOrderBy.d.ts +6 -0
- package/dist/types/components/QueryPanel/AddMenu/AddView.d.ts +7 -0
- package/dist/types/components/QueryPanel/AddMenu/AddWhere.d.ts +6 -0
- package/dist/types/components/QueryPanel/AddMenu/FieldList.d.ts +11 -0
- package/dist/types/components/QueryPanel/AddMenu/FieldMenu.d.ts +10 -0
- package/dist/types/components/QueryPanel/AddMenu/ValueList.d.ts +10 -0
- package/dist/types/components/QueryPanel/AddMenu/colors.stylex.d.ts +7 -0
- package/dist/types/components/QueryPanel/AddMenu/hooks/useSearch.d.ts +10 -0
- package/dist/types/components/QueryPanel/AddMenu/styles.d.ts +34 -0
- package/dist/types/components/QueryPanel/FieldHover.d.ts +10 -0
- package/dist/types/components/QueryPanel/LiteralValueEditor.d.ts +9 -0
- package/dist/types/components/QueryPanel/Operations.d.ts +6 -0
- package/dist/types/components/QueryPanel/Parameters.d.ts +8 -0
- package/dist/types/components/QueryPanel/Query.d.ts +8 -0
- package/dist/types/components/QueryPanel/QueryActionBar.d.ts +11 -0
- package/dist/types/components/QueryPanel/QueryEditor.d.ts +15 -0
- package/dist/types/components/QueryPanel/QueryPanel.d.ts +10 -0
- package/dist/types/components/QueryPanel/Source.d.ts +8 -0
- package/dist/types/components/QueryPanel/View.d.ts +6 -0
- package/dist/types/components/QueryPanel/ViewDefinition.d.ts +6 -0
- package/dist/types/components/QueryPanel/Visualization.d.ts +7 -0
- package/dist/types/components/QueryPanel/VisualizationIcon.d.ts +5 -0
- package/dist/types/components/QueryPanel/index.d.ts +3 -0
- package/dist/types/components/QueryPanel/operations/AggregateOperations.d.ts +7 -0
- package/dist/types/components/QueryPanel/operations/ClearButton.d.ts +4 -0
- package/dist/types/components/QueryPanel/operations/GroupByOperations.d.ts +7 -0
- package/dist/types/components/QueryPanel/operations/LimitOperation.d.ts +7 -0
- package/dist/types/components/QueryPanel/operations/NestOperation.d.ts +7 -0
- package/dist/types/components/QueryPanel/operations/OperationActionTitle.d.ts +12 -0
- package/dist/types/components/QueryPanel/operations/OrderByOperations.d.ts +7 -0
- package/dist/types/components/QueryPanel/operations/WhereOperations.d.ts +7 -0
- package/dist/types/components/QueryPanel/operations/hover.stylex.d.ts +17 -0
- package/dist/types/components/ResultPanel/BookmarkedView.d.ts +7 -0
- package/dist/types/components/ResultPanel/EmptyQueryDisplay.d.ts +6 -0
- package/dist/types/components/ResultPanel/ResultDisplay.d.ts +6 -0
- package/dist/types/components/ResultPanel/ResultPanel.d.ts +14 -0
- package/dist/types/components/ResultPanel/SubmittedQuery.d.ts +28 -0
- package/dist/types/components/ResultPanel/ViewAttributeTable.d.ts +9 -0
- package/dist/types/components/ResultPanel/Visualization.d.ts +5 -0
- package/dist/types/components/ResultPanel/index.d.ts +1 -0
- package/dist/types/components/SourcePanel/AddFieldDropdownMenu.d.ts +13 -0
- package/dist/types/components/SourcePanel/FieldGroupList.d.ts +10 -0
- package/dist/types/components/SourcePanel/FieldTokenWithActions.d.ts +7 -0
- package/dist/types/components/SourcePanel/NestFieldDropdownMenu.d.ts +12 -0
- package/dist/types/components/SourcePanel/OperationDropdownMenuItems.d.ts +10 -0
- package/dist/types/components/SourcePanel/SearchResultList.d.ts +8 -0
- package/dist/types/components/SourcePanel/SourcePanel.d.ts +7 -0
- package/dist/types/components/SourcePanel/field-token.stylex.d.ts +3 -0
- package/dist/types/components/SourcePanel/hooks/useNestOperations.d.ts +9 -0
- package/dist/types/components/SourcePanel/hooks/useOperations.d.ts +8 -0
- package/dist/types/components/SourcePanel/index.d.ts +1 -0
- package/dist/types/components/SourcePanel/utils.d.ts +24 -0
- package/dist/types/components/TopValuesTable.d.ts +7 -0
- package/dist/types/components/filters/BooleanFilterToken.d.ts +11 -0
- package/dist/types/components/filters/DateTimeFilterToken.d.ts +12 -0
- package/dist/types/components/filters/NumberFilterToken.d.ts +13 -0
- package/dist/types/components/filters/PillInput.d.ts +18 -0
- package/dist/types/components/filters/StringFilterToken.d.ts +14 -0
- package/dist/types/components/filters/index.d.ts +0 -0
- package/dist/types/components/hooks/useClickOutside.d.ts +1 -0
- package/dist/types/components/primitives/Badge.d.ts +37 -0
- package/dist/types/components/primitives/BadgeForField.d.ts +6 -0
- package/dist/types/components/primitives/Banner.d.ts +36 -0
- package/dist/types/components/primitives/Button.d.ts +92 -0
- package/dist/types/components/primitives/Card.d.ts +12 -0
- package/dist/types/components/primitives/CodeBlock.d.ts +26 -0
- package/dist/types/components/primitives/CollapsibleListItem.d.ts +16 -0
- package/dist/types/components/primitives/CollapsiblePanel.d.ts +13 -0
- package/dist/types/components/primitives/DOMElement.d.ts +5 -0
- package/dist/types/components/primitives/DatePicker.d.ts +9 -0
- package/dist/types/components/primitives/Divider.d.ts +24 -0
- package/dist/types/components/primitives/DropdownMenu.d.ts +33 -0
- package/dist/types/components/primitives/ErrorIcon.d.ts +8 -0
- package/dist/types/components/primitives/Icon.d.ts +57 -0
- package/dist/types/components/primitives/List.d.ts +9 -0
- package/dist/types/components/primitives/ListItem.d.ts +21 -0
- package/dist/types/components/primitives/NumberInput.d.ts +10 -0
- package/dist/types/components/primitives/Popover.d.ts +19 -0
- package/dist/types/components/primitives/ResizeBar.d.ts +7 -0
- package/dist/types/components/primitives/ScrollableArea.d.ts +9 -0
- package/dist/types/components/primitives/SelectDropdown.d.ts +31 -0
- package/dist/types/components/primitives/Spinner.d.ts +22 -0
- package/dist/types/components/primitives/TextInput.d.ts +54 -0
- package/dist/types/components/primitives/badge.stylex.d.ts +6 -0
- package/dist/types/components/primitives/button.stylex.d.ts +6 -0
- package/dist/types/components/primitives/colors.stylex.d.ts +39 -0
- package/dist/types/components/primitives/dropdown-menu.stylex.d.ts +9 -0
- package/dist/types/components/primitives/index.d.ts +22 -0
- package/dist/types/components/primitives/scrollable-area.stylex.d.ts +6 -0
- package/dist/types/components/primitives/styles.d.ts +74 -0
- package/dist/types/components/primitives/syntax_highlighting/malloyGrammar.d.ts +279 -0
- package/dist/types/components/primitives/syntax_highlighting/syntaxHighlighter.d.ts +6 -0
- package/dist/types/components/primitives/syntax_highlighting/transformers/lineNumberTransformer.d.ts +3 -0
- package/dist/types/components/primitives/syntax_highlighting/transformers/lineSpacingTransformer.d.ts +8 -0
- package/dist/types/components/primitives/syntax_highlighting/transformers/transformers.d.ts +8 -0
- package/dist/types/components/primitives/tokens/EditableToken.d.ts +50 -0
- package/dist/types/components/primitives/tokens/SelectorToken.d.ts +18 -0
- package/dist/types/components/primitives/tokens/Token.d.ts +49 -0
- package/dist/types/components/primitives/tokens/TokenGroup.d.ts +21 -0
- package/dist/types/components/primitives/tokens/styles.d.ts +45 -0
- package/dist/types/components/primitives/tokens/token.stylex.d.ts +6 -0
- package/dist/types/components/primitives/tokens/types.d.ts +5 -0
- package/dist/types/components/primitives/utils/icon.d.ts +388 -0
- package/dist/types/components/styles.d.ts +66 -0
- package/dist/types/components/utils/fields.d.ts +9 -0
- package/dist/types/components/utils/icon.d.ts +7 -0
- package/dist/types/components/utils/renderer.d.ts +6 -0
- package/dist/types/components/utils/segment.d.ts +6 -0
- package/dist/types/contexts/ExplorerPanelsContext.d.ts +11 -0
- package/dist/types/contexts/QueryEditorContext.d.ts +25 -0
- package/dist/types/hooks/useQueryBuilder.d.ts +3 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/types/error.d.ts +8 -0
- package/eslint.config.mjs +156 -0
- package/index.html +19 -0
- package/package.json +109 -0
- package/postcss.config.mjs +20 -0
- package/scripts/env.d.ts +3 -0
- package/scripts/gen_flow.ts +38 -0
- package/scripts/malloy-packages.ts +17 -0
- package/scripts/tsconfig.json +8 -0
- package/tsconfig.json +16 -0
- package/vite.config.mts +65 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export declare const tooltipStyles: Readonly<{
|
|
2
|
+
readonly default: Readonly<{
|
|
3
|
+
readonly padding: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"padding", "4px 8px">;
|
|
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)">;
|
|
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)">;
|
|
9
|
+
readonly zIndex: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"zIndex", 2>;
|
|
10
|
+
}>;
|
|
11
|
+
readonly card: Readonly<{
|
|
12
|
+
readonly width: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"width", "var(--radix-tooltip-trigger-width)">;
|
|
13
|
+
readonly maxHeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"maxHeight", "var(--radix-tooltip-content-available-height)">;
|
|
14
|
+
readonly zIndex: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"zIndex", 2>;
|
|
15
|
+
}>;
|
|
16
|
+
}>;
|
|
17
|
+
export declare const fontStyles: Readonly<{
|
|
18
|
+
readonly largeEmphasized: Readonly<{
|
|
19
|
+
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)">;
|
|
21
|
+
readonly fontWeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontWeight", 700>;
|
|
22
|
+
readonly fontSize: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontSize", "16px">;
|
|
23
|
+
readonly lineHeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"lineHeight", "24px">;
|
|
24
|
+
readonly letterSpacing: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"letterSpacing", "-0.24px">;
|
|
25
|
+
}>;
|
|
26
|
+
readonly largeBody: Readonly<{
|
|
27
|
+
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)">;
|
|
29
|
+
readonly fontWeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontWeight", 400>;
|
|
30
|
+
readonly fontSize: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontSize", "16px">;
|
|
31
|
+
readonly lineHeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"lineHeight", "20px">;
|
|
32
|
+
readonly letterSpacing: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"letterSpacing", "0px">;
|
|
33
|
+
}>;
|
|
34
|
+
readonly emphasized: Readonly<{
|
|
35
|
+
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)">;
|
|
37
|
+
readonly fontWeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontWeight", 700>;
|
|
38
|
+
readonly fontSize: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontSize", "14px">;
|
|
39
|
+
readonly lineHeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"lineHeight", "20px">;
|
|
40
|
+
readonly letterSpacing: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"letterSpacing", "-0.24px">;
|
|
41
|
+
}>;
|
|
42
|
+
readonly body: Readonly<{
|
|
43
|
+
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)">;
|
|
45
|
+
readonly fontWeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontWeight", 400>;
|
|
46
|
+
readonly fontSize: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontSize", "14px">;
|
|
47
|
+
readonly lineHeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"lineHeight", "20px">;
|
|
48
|
+
readonly letterSpacing: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"letterSpacing", "0px">;
|
|
49
|
+
}>;
|
|
50
|
+
readonly link: Readonly<{
|
|
51
|
+
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)">;
|
|
53
|
+
readonly fontWeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontWeight", 400>;
|
|
54
|
+
readonly fontSize: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontSize", "14px">;
|
|
55
|
+
readonly lineHeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"lineHeight", "20px">;
|
|
56
|
+
readonly letterSpacing: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"letterSpacing", "0px">;
|
|
57
|
+
}>;
|
|
58
|
+
readonly supporting: Readonly<{
|
|
59
|
+
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)">;
|
|
61
|
+
readonly fontWeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontWeight", 400>;
|
|
62
|
+
readonly fontSize: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontSize", "12px">;
|
|
63
|
+
readonly lineHeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"lineHeight", "16px">;
|
|
64
|
+
readonly letterSpacing: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"letterSpacing", "0px">;
|
|
65
|
+
}>;
|
|
66
|
+
readonly badge: Readonly<{
|
|
67
|
+
readonly fontFamily: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontFamily", "SF Pro Text, -apple-system, system-ui, sans-serif">;
|
|
68
|
+
readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", "rgba(228, 230, 235, 1)">;
|
|
69
|
+
readonly fontWeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontWeight", 600>;
|
|
70
|
+
readonly fontSize: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontSize", "12px">;
|
|
71
|
+
readonly lineHeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"lineHeight", "16px">;
|
|
72
|
+
readonly letterSpacing: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"letterSpacing", "-0.24px">;
|
|
73
|
+
}>;
|
|
74
|
+
}>;
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
export declare const MALLOY_GRAMMAR: {
|
|
2
|
+
scopeName: string;
|
|
3
|
+
patterns: {
|
|
4
|
+
include: string;
|
|
5
|
+
}[];
|
|
6
|
+
repository: {
|
|
7
|
+
'malloy-language': {
|
|
8
|
+
patterns: {
|
|
9
|
+
include: string;
|
|
10
|
+
}[];
|
|
11
|
+
};
|
|
12
|
+
'malloy-matched': {
|
|
13
|
+
begin: string;
|
|
14
|
+
end: string;
|
|
15
|
+
patterns: {
|
|
16
|
+
include: string;
|
|
17
|
+
}[];
|
|
18
|
+
};
|
|
19
|
+
'malloy-in-sql': {
|
|
20
|
+
begin: string;
|
|
21
|
+
name: string;
|
|
22
|
+
end: string;
|
|
23
|
+
patterns: {
|
|
24
|
+
include: string;
|
|
25
|
+
}[];
|
|
26
|
+
};
|
|
27
|
+
'sql-string': {
|
|
28
|
+
patterns: {
|
|
29
|
+
begin: string;
|
|
30
|
+
end: string;
|
|
31
|
+
beginCaptures: {
|
|
32
|
+
'1': {
|
|
33
|
+
name: string;
|
|
34
|
+
};
|
|
35
|
+
'3': {
|
|
36
|
+
name: string;
|
|
37
|
+
};
|
|
38
|
+
'5': {
|
|
39
|
+
name: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
endCaptures: {
|
|
43
|
+
'0': {
|
|
44
|
+
name: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
name: string;
|
|
48
|
+
patterns: {
|
|
49
|
+
include: string;
|
|
50
|
+
}[];
|
|
51
|
+
}[];
|
|
52
|
+
};
|
|
53
|
+
functions: {
|
|
54
|
+
patterns: ({
|
|
55
|
+
match: string;
|
|
56
|
+
captures: {
|
|
57
|
+
'1': {
|
|
58
|
+
name: string;
|
|
59
|
+
};
|
|
60
|
+
'3': {
|
|
61
|
+
name: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
} | {
|
|
65
|
+
match: string;
|
|
66
|
+
captures: {
|
|
67
|
+
'1': {
|
|
68
|
+
name: string;
|
|
69
|
+
};
|
|
70
|
+
'3'?: undefined;
|
|
71
|
+
};
|
|
72
|
+
})[];
|
|
73
|
+
};
|
|
74
|
+
datetimes: {
|
|
75
|
+
patterns: {
|
|
76
|
+
match: string;
|
|
77
|
+
name: string;
|
|
78
|
+
}[];
|
|
79
|
+
};
|
|
80
|
+
'identifiers-quoted': {
|
|
81
|
+
patterns: {
|
|
82
|
+
match: string;
|
|
83
|
+
name: string;
|
|
84
|
+
}[];
|
|
85
|
+
};
|
|
86
|
+
'identifiers-unquoted': {
|
|
87
|
+
patterns: {
|
|
88
|
+
match: string;
|
|
89
|
+
name: string;
|
|
90
|
+
}[];
|
|
91
|
+
};
|
|
92
|
+
timeframes: {
|
|
93
|
+
patterns: {
|
|
94
|
+
match: string;
|
|
95
|
+
name: string;
|
|
96
|
+
}[];
|
|
97
|
+
};
|
|
98
|
+
comments: {
|
|
99
|
+
patterns: ({
|
|
100
|
+
begin: string;
|
|
101
|
+
end: string;
|
|
102
|
+
beginCaptures: {
|
|
103
|
+
'0': {
|
|
104
|
+
name: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
endCaptures: {
|
|
108
|
+
'0': {
|
|
109
|
+
name: string;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
name: string;
|
|
113
|
+
} | {
|
|
114
|
+
begin: string;
|
|
115
|
+
end: string;
|
|
116
|
+
beginCaptures: {
|
|
117
|
+
'0': {
|
|
118
|
+
name: string;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
name: string;
|
|
122
|
+
endCaptures?: undefined;
|
|
123
|
+
})[];
|
|
124
|
+
};
|
|
125
|
+
tags: {
|
|
126
|
+
patterns: ({
|
|
127
|
+
match: string;
|
|
128
|
+
name: string;
|
|
129
|
+
captures: {
|
|
130
|
+
'0': {
|
|
131
|
+
name: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
begin?: undefined;
|
|
135
|
+
end?: undefined;
|
|
136
|
+
beginCaptures?: undefined;
|
|
137
|
+
patterns?: undefined;
|
|
138
|
+
} | {
|
|
139
|
+
begin: string;
|
|
140
|
+
end: string;
|
|
141
|
+
beginCaptures: {
|
|
142
|
+
'0': {
|
|
143
|
+
name: string;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
name: string;
|
|
147
|
+
match?: undefined;
|
|
148
|
+
captures?: undefined;
|
|
149
|
+
patterns?: undefined;
|
|
150
|
+
} | {
|
|
151
|
+
begin: string;
|
|
152
|
+
end: string;
|
|
153
|
+
beginCaptures: {
|
|
154
|
+
'0': {
|
|
155
|
+
name: string;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
name: string;
|
|
159
|
+
patterns: {
|
|
160
|
+
include: string;
|
|
161
|
+
}[];
|
|
162
|
+
match?: undefined;
|
|
163
|
+
captures?: undefined;
|
|
164
|
+
})[];
|
|
165
|
+
repository: {
|
|
166
|
+
'tag-values': {
|
|
167
|
+
name: string;
|
|
168
|
+
match: string;
|
|
169
|
+
captures: {
|
|
170
|
+
'1': {
|
|
171
|
+
name: string;
|
|
172
|
+
};
|
|
173
|
+
'2': {
|
|
174
|
+
name: string;
|
|
175
|
+
};
|
|
176
|
+
'3': {
|
|
177
|
+
name: string;
|
|
178
|
+
};
|
|
179
|
+
'4': {
|
|
180
|
+
name: string;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
strings: {
|
|
187
|
+
patterns: ({
|
|
188
|
+
begin: string;
|
|
189
|
+
end: string;
|
|
190
|
+
beginCaptures: {
|
|
191
|
+
'0': {
|
|
192
|
+
name: string;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
endCaptures: {
|
|
196
|
+
'0': {
|
|
197
|
+
name: string;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
name: string;
|
|
201
|
+
patterns: {
|
|
202
|
+
include: string;
|
|
203
|
+
}[];
|
|
204
|
+
} | {
|
|
205
|
+
begin: string;
|
|
206
|
+
end: string;
|
|
207
|
+
beginCaptures: {
|
|
208
|
+
'0': {
|
|
209
|
+
name: string;
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
endCaptures: {
|
|
213
|
+
'0': {
|
|
214
|
+
name: string;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
name: string;
|
|
218
|
+
patterns?: undefined;
|
|
219
|
+
} | {
|
|
220
|
+
begin: string;
|
|
221
|
+
end: string;
|
|
222
|
+
name: string;
|
|
223
|
+
patterns: {
|
|
224
|
+
include: string;
|
|
225
|
+
}[];
|
|
226
|
+
beginCaptures?: undefined;
|
|
227
|
+
endCaptures?: undefined;
|
|
228
|
+
})[];
|
|
229
|
+
repository: {
|
|
230
|
+
escapes: {
|
|
231
|
+
name: string;
|
|
232
|
+
match: string;
|
|
233
|
+
captures: {
|
|
234
|
+
'0': {
|
|
235
|
+
name: string;
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
'regex-escapes': {
|
|
240
|
+
name: string;
|
|
241
|
+
match: string;
|
|
242
|
+
captures: {
|
|
243
|
+
'0': {
|
|
244
|
+
name: string;
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
numbers: {
|
|
251
|
+
match: string;
|
|
252
|
+
name: string;
|
|
253
|
+
};
|
|
254
|
+
constants: {
|
|
255
|
+
patterns: {
|
|
256
|
+
match: string;
|
|
257
|
+
name: string;
|
|
258
|
+
}[];
|
|
259
|
+
};
|
|
260
|
+
types: {
|
|
261
|
+
patterns: {
|
|
262
|
+
match: string;
|
|
263
|
+
name: string;
|
|
264
|
+
}[];
|
|
265
|
+
};
|
|
266
|
+
properties: {
|
|
267
|
+
patterns: {
|
|
268
|
+
match: string;
|
|
269
|
+
name: string;
|
|
270
|
+
}[];
|
|
271
|
+
};
|
|
272
|
+
keywords: {
|
|
273
|
+
patterns: {
|
|
274
|
+
match: string;
|
|
275
|
+
name: string;
|
|
276
|
+
}[];
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TransformerOptions } from './transformers/transformers';
|
|
2
|
+
export type SupportedLang = 'json' | 'sql' | 'malloy';
|
|
3
|
+
export type SupportedTheme = 'light-plus' | 'dark-plus';
|
|
4
|
+
type HighlighterOptions = {} & TransformerOptions;
|
|
5
|
+
export declare function highlightPre(code: string, lang: SupportedLang, theme: SupportedTheme, { showLineNumbers, lineSpacing }: HighlighterOptions): Promise<HTMLDivElement>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GetTransformer } from './transformers';
|
|
2
|
+
declare const LINE_SPACING_MAP: {
|
|
3
|
+
single: string;
|
|
4
|
+
double: string;
|
|
5
|
+
};
|
|
6
|
+
export type LineSpacing = keyof typeof LINE_SPACING_MAP;
|
|
7
|
+
declare const getLineSpacingTransformer: GetTransformer;
|
|
8
|
+
export default getLineSpacingTransformer;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ShikiTransformer } from '@shikijs/types';
|
|
2
|
+
import { LineSpacing } from './lineSpacingTransformer';
|
|
3
|
+
export type TransformerOptions = {
|
|
4
|
+
showLineNumbers: boolean;
|
|
5
|
+
lineSpacing: LineSpacing;
|
|
6
|
+
};
|
|
7
|
+
export type GetTransformer = (options: TransformerOptions) => ShikiTransformer | undefined;
|
|
8
|
+
export default function getTransformers(options: TransformerOptions): Array<ShikiTransformer>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { StyleXStyles } from '@stylexjs/stylex';
|
|
2
|
+
import { IconType } from '../utils/icon';
|
|
3
|
+
import { TokenColor, TokenSize } from './types';
|
|
4
|
+
interface EditableTokenBaseProps<T> {
|
|
5
|
+
/**
|
|
6
|
+
* The current value of the token.
|
|
7
|
+
*/
|
|
8
|
+
value: T;
|
|
9
|
+
/**
|
|
10
|
+
* Callback function called when the token's value changes.
|
|
11
|
+
*
|
|
12
|
+
* @param value The new value of the token.
|
|
13
|
+
*/
|
|
14
|
+
onChange: (value: T) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Optional callback function called when the token is removed.
|
|
17
|
+
*/
|
|
18
|
+
onRemove?: () => void;
|
|
19
|
+
/**
|
|
20
|
+
* Optional icon to display in the token.
|
|
21
|
+
*
|
|
22
|
+
* Must be a key from the ICON_MAP object.
|
|
23
|
+
*/
|
|
24
|
+
icon?: IconType;
|
|
25
|
+
/**
|
|
26
|
+
* Optional color of the token.
|
|
27
|
+
*/
|
|
28
|
+
color?: TokenColor;
|
|
29
|
+
/**
|
|
30
|
+
* Optional size of the token.
|
|
31
|
+
*/
|
|
32
|
+
size?: TokenSize;
|
|
33
|
+
/**
|
|
34
|
+
* Optional custom styles for the token.
|
|
35
|
+
*/
|
|
36
|
+
customStyle?: StyleXStyles;
|
|
37
|
+
/**
|
|
38
|
+
* Optional error message to show. If an error message exists, the token will
|
|
39
|
+
* include error styles.
|
|
40
|
+
*/
|
|
41
|
+
errorMessage?: string;
|
|
42
|
+
}
|
|
43
|
+
interface EditableTokenStringProps extends EditableTokenBaseProps<string> {
|
|
44
|
+
type?: 'string';
|
|
45
|
+
}
|
|
46
|
+
interface EditableTokenNumberProps extends EditableTokenBaseProps<number> {
|
|
47
|
+
type: 'number';
|
|
48
|
+
}
|
|
49
|
+
export default function EditableToken({ value, onChange, onRemove, icon, color, size, customStyle, type, errorMessage, }: EditableTokenStringProps | EditableTokenNumberProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StyleXStyles } from '@stylexjs/stylex';
|
|
2
|
+
import { IconType } from '../utils/icon';
|
|
3
|
+
import { TokenColor, TokenSize } from './types';
|
|
4
|
+
export interface SelectorTokenItem<T extends string> {
|
|
5
|
+
label: string;
|
|
6
|
+
value: T;
|
|
7
|
+
}
|
|
8
|
+
export interface SelectorTokenProps<T extends string> {
|
|
9
|
+
value: T | undefined;
|
|
10
|
+
onChange: (value: T) => void;
|
|
11
|
+
icon?: IconType;
|
|
12
|
+
color?: TokenColor;
|
|
13
|
+
size?: TokenSize;
|
|
14
|
+
items: SelectorTokenItem<T>[];
|
|
15
|
+
isSearchable?: boolean;
|
|
16
|
+
customStyle?: StyleXStyles;
|
|
17
|
+
}
|
|
18
|
+
export default function SelectorToken<T extends string>({ value, onChange, icon, color, size, items, isSearchable, customStyle, }: SelectorTokenProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { StyleXStyles } from '@stylexjs/stylex';
|
|
3
|
+
import { IconType } from '../utils/icon';
|
|
4
|
+
import { TokenColor, TokenSize } from './types';
|
|
5
|
+
export interface TokenProps extends React.ComponentProps<'button'> {
|
|
6
|
+
/**
|
|
7
|
+
* The label to display on the token.
|
|
8
|
+
*/
|
|
9
|
+
label?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The icon to display on the token.
|
|
12
|
+
*/
|
|
13
|
+
icon?: IconType;
|
|
14
|
+
/**
|
|
15
|
+
* The color of the token.
|
|
16
|
+
*/
|
|
17
|
+
color?: TokenColor;
|
|
18
|
+
/**
|
|
19
|
+
* The size of the token.
|
|
20
|
+
*/
|
|
21
|
+
size?: TokenSize;
|
|
22
|
+
/**
|
|
23
|
+
* Called when the token is clicked. Adding this will make the token appear interactive.
|
|
24
|
+
*/
|
|
25
|
+
onClick?: (event: React.MouseEvent) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Called when the token is hovered or not hovered.
|
|
28
|
+
*/
|
|
29
|
+
onHover?: (isHovered: boolean) => void;
|
|
30
|
+
/**
|
|
31
|
+
* If true, the token will behave as button trigger without requiring an onClick event handler prop.
|
|
32
|
+
*/
|
|
33
|
+
asButtonTrigger?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* The tooltip to show when hovering over the token.
|
|
36
|
+
*/
|
|
37
|
+
tooltip?: string | React.ReactElement;
|
|
38
|
+
tooltipProps?: {
|
|
39
|
+
align?: 'start' | 'center' | 'end';
|
|
40
|
+
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
41
|
+
alignOffset?: number;
|
|
42
|
+
sideOffset?: number;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Custom styles for the token.
|
|
46
|
+
*/
|
|
47
|
+
customStyle?: StyleXStyles;
|
|
48
|
+
}
|
|
49
|
+
export default function Token({ label, icon, color, size, onClick, onHover, asButtonTrigger, tooltip, tooltipProps, customStyle, ...props }: TokenProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import Token, { TokenProps } from './Token';
|
|
3
|
+
import { StyleXStyles } from '@stylexjs/stylex';
|
|
4
|
+
import { TokenColor } from './types';
|
|
5
|
+
interface TokenGroupProps {
|
|
6
|
+
/**
|
|
7
|
+
* An array of Token components to be rendered within the group.
|
|
8
|
+
*/
|
|
9
|
+
children: React.ReactElement<TokenProps, typeof Token>[];
|
|
10
|
+
/**
|
|
11
|
+
* The color to be applied to all tokens in the group. If not provided,
|
|
12
|
+
* the color will be determined by each token's individual color prop.
|
|
13
|
+
*/
|
|
14
|
+
color?: TokenColor;
|
|
15
|
+
/**
|
|
16
|
+
* Custom styles
|
|
17
|
+
*/
|
|
18
|
+
customStyle?: StyleXStyles;
|
|
19
|
+
}
|
|
20
|
+
export default function TokenGroup({ children, color, customStyle, }: TokenGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export declare const tokenStyles: Readonly<{
|
|
2
|
+
readonly main: Readonly<{
|
|
3
|
+
readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "flex">;
|
|
4
|
+
readonly alignItems: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"alignItems", "center">;
|
|
5
|
+
readonly justifyContent: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"justifyContent", "center">;
|
|
6
|
+
readonly gap: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"gap", "8px">;
|
|
7
|
+
readonly borderRadius: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderRadius", "4px">;
|
|
8
|
+
readonly borderWidth: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderWidth", "0px">;
|
|
9
|
+
readonly outline: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"outline", "none">;
|
|
10
|
+
readonly cursor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"cursor", "pointer">;
|
|
11
|
+
readonly overflow: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"overflow", "hidden">;
|
|
12
|
+
readonly background: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"background", string>;
|
|
13
|
+
readonly position: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"position", "relative">;
|
|
14
|
+
}>;
|
|
15
|
+
readonly icon: Readonly<{
|
|
16
|
+
readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", null>;
|
|
17
|
+
}>;
|
|
18
|
+
readonly label: Readonly<{
|
|
19
|
+
readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", null>;
|
|
20
|
+
readonly textOverflow: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"textOverflow", "ellipsis">;
|
|
21
|
+
readonly overflow: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"overflow", "hidden">;
|
|
22
|
+
}>;
|
|
23
|
+
}>;
|
|
24
|
+
export declare const tokenColorVariants: Readonly<{
|
|
25
|
+
readonly default: Readonly<{
|
|
26
|
+
readonly [x: string]: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<string, string>;
|
|
27
|
+
}>;
|
|
28
|
+
readonly purple: Readonly<{
|
|
29
|
+
readonly [x: string]: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<string, string>;
|
|
30
|
+
}>;
|
|
31
|
+
readonly green: Readonly<{
|
|
32
|
+
readonly [x: string]: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<string, string>;
|
|
33
|
+
}>;
|
|
34
|
+
readonly cyan: Readonly<{
|
|
35
|
+
readonly [x: string]: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<string, string>;
|
|
36
|
+
}>;
|
|
37
|
+
}>;
|
|
38
|
+
export declare const tokenSizeVariants: Readonly<{
|
|
39
|
+
readonly default: Readonly<{
|
|
40
|
+
readonly padding: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"padding", "4px 8px">;
|
|
41
|
+
}>;
|
|
42
|
+
readonly compact: Readonly<{
|
|
43
|
+
readonly padding: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"padding", "2px 4px">;
|
|
44
|
+
}>;
|
|
45
|
+
}>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { tokenColorVariants, tokenSizeVariants } from './styles';
|
|
2
|
+
export declare const DEFAULT_TOKEN_COLOR = "default";
|
|
3
|
+
export declare const DEFAULT_TOKEN_SIZE = "default";
|
|
4
|
+
export type TokenColor = keyof typeof tokenColorVariants;
|
|
5
|
+
export type TokenSize = keyof typeof tokenSizeVariants;
|