@malloy-publisher/sdk 0.0.248 → 0.0.250
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/README.md +37 -17
- package/TREE_SHAKING.md +5 -0
- package/bunfig.toml +3 -0
- package/dist/ServerProvider-CcfeBpt3.cjs.js +1 -0
- package/dist/{ServerProvider-BxEh3nFI.es.js → ServerProvider-EqBlMMqx.es.js} +1056 -905
- package/dist/client/api.d.ts +306 -9
- package/dist/client/index.cjs.js +1 -1
- package/dist/client/index.es.js +74 -70
- package/dist/components/Dashboard/Dashboard.d.ts +49 -0
- package/dist/components/Dashboard/DashboardTile.d.ts +48 -0
- package/dist/components/Dashboard/index.d.ts +2 -0
- package/dist/components/Notebook/Notebook.d.ts +46 -8
- package/dist/components/Notebook/NotebookCell.d.ts +37 -3
- package/dist/components/Notebook/runPlan.d.ts +29 -0
- package/dist/components/Notebook/types.d.ts +10 -0
- package/dist/components/Package/ContentTypeIcon.d.ts +17 -1
- package/dist/components/Package/Package.d.ts +1 -4
- package/dist/components/RenderedResult/RenderedResult.d.ts +7 -1
- package/dist/components/RenderedResult/ResultContainer.d.ts +3 -1
- package/dist/components/ResultsDialog.d.ts +4 -1
- package/dist/components/ServerProvider.d.ts +2 -1
- package/dist/components/click_helper.d.ts +10 -1
- package/dist/components/drill/index.d.ts +3 -0
- package/dist/components/drill/markDrillableCells.d.ts +55 -0
- package/dist/components/drill/resolveDrill.d.ts +139 -0
- package/dist/components/drill/useDrill.d.ts +63 -0
- package/dist/components/given/GivenInput.d.ts +27 -3
- package/dist/components/given/GivensPanel.d.ts +36 -7
- package/dist/components/given/filterValue.d.ts +97 -0
- package/dist/components/given/index.d.ts +1 -1
- package/dist/components/given/paramCodec.d.ts +60 -0
- package/dist/components/index.d.ts +4 -1
- package/dist/components/styles.d.ts +31 -0
- package/dist/constants/docLinks.d.ts +6 -0
- package/dist/{core-C86Rb7tJ.cjs.js → core-CVXEUnnm.cjs.js} +1 -1
- package/dist/{core-BuvlzSIX.es.js → core-Cr-9Wkp3.es.js} +1 -1
- package/dist/hooks/givenValue.d.ts +10 -0
- package/dist/hooks/index.d.ts +3 -1
- package/dist/hooks/useGivensState.d.ts +64 -0
- package/dist/hooks/useSuggestOptions.d.ts +78 -0
- package/dist/index-C-KeIwsG.cjs.js +339 -0
- package/dist/{index-BdtAZ5k6.es.js → index-DVkelll3.es.js} +40981 -39669
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +77 -62
- package/dist/theme/types.d.ts +9 -0
- package/dist/utils/malloyString.d.ts +7 -0
- package/package.json +3 -1
- package/src/client-entry.ts +3 -0
- package/src/components/AnalyzePackageButton.tsx +3 -0
- package/src/components/ApiErrorDisplay.tsx +3 -0
- package/src/components/Connections/AddConnectionDialog.tsx +13 -1
- package/src/components/Connections/DeleteConnectionDialog.tsx +3 -0
- package/src/components/Connections/EditConnectionDialog.tsx +3 -0
- package/src/components/Connections/common.ts +3 -0
- package/src/components/DOMElement/DOMElement.tsx +3 -0
- package/src/components/DOMElement/index.ts +3 -0
- package/src/components/Dashboard/Dashboard.tsx +398 -0
- package/src/components/Dashboard/DashboardTile.tsx +153 -0
- package/src/components/Dashboard/index.ts +5 -0
- package/src/components/DataAppViewer/DataAppViewer.tsx +3 -0
- package/src/components/DataAppViewer/index.ts +3 -0
- package/src/components/Environment/About.tsx +3 -0
- package/src/components/Environment/AddPackageDialog.tsx +3 -0
- package/src/components/Environment/ConnectionExplorer.tsx +3 -0
- package/src/components/Environment/Connections.tsx +3 -0
- package/src/components/Environment/DeletePackageDialog.tsx +3 -0
- package/src/components/Environment/EditPackageDialog.tsx +3 -0
- package/src/components/Environment/Environment.tsx +3 -0
- package/src/components/Environment/Packages.tsx +3 -0
- package/src/components/Environment/index.ts +3 -0
- package/src/components/Home/AddEnvironmentDialog.tsx +3 -0
- package/src/components/Home/DeleteEnvironmentDialog.tsx +3 -0
- package/src/components/Home/EditEnvironmentDialog.tsx +3 -0
- package/src/components/Home/Home.tsx +113 -23
- package/src/components/Home/index.ts +3 -0
- package/src/components/Loading.tsx +3 -0
- package/src/components/Materializations/CreateEnvMaterializationDialog.tsx +3 -0
- package/src/components/Materializations/CreateMaterializationDialog.tsx +3 -0
- package/src/components/Materializations/DeleteMaterializationDialog.tsx +3 -0
- package/src/components/Materializations/EnvironmentMaterializations.tsx +3 -0
- package/src/components/Materializations/ManifestView.tsx +3 -0
- package/src/components/Materializations/MaterializationDetailDialog.tsx +3 -0
- package/src/components/Materializations/MaterializationRunsList.tsx +3 -0
- package/src/components/Materializations/Materializations.tsx +3 -0
- package/src/components/Materializations/ScheduleCard.tsx +3 -0
- package/src/components/Materializations/SectionLabel.tsx +3 -0
- package/src/components/Materializations/SetScheduleDialog.tsx +3 -0
- package/src/components/Materializations/TriggerChip.tsx +3 -0
- package/src/components/Materializations/cron.ts +3 -0
- package/src/components/Materializations/index.ts +3 -0
- package/src/components/Materializations/utils.ts +3 -0
- package/src/components/Model/Model.tsx +3 -0
- package/src/components/Model/ModelCell.tsx +3 -0
- package/src/components/Model/ModelExplorer.tsx +3 -0
- package/src/components/Model/ModelExplorerDialog.tsx +3 -0
- package/src/components/Model/SourcesExplorer.tsx +3 -0
- package/src/components/Model/index.ts +3 -0
- package/src/components/Model/useModelData.ts +3 -0
- package/src/components/Notebook/Notebook.tsx +447 -390
- package/src/components/Notebook/NotebookCell.tsx +120 -3
- package/src/components/Notebook/index.ts +3 -0
- package/src/components/Notebook/runPlan.spec.ts +155 -0
- package/src/components/Notebook/runPlan.ts +67 -0
- package/src/components/Notebook/types.ts +14 -0
- package/src/components/Package/ContentTypeIcon.spec.ts +91 -0
- package/src/components/Package/ContentTypeIcon.tsx +80 -6
- package/src/components/Package/FileTreeView.tsx +3 -0
- package/src/components/Package/Models.tsx +3 -0
- package/src/components/Package/Package.tsx +151 -38
- package/src/components/Package/index.ts +3 -0
- package/src/components/QueryResult/QueryResult.tsx +3 -0
- package/src/components/QueryResult/index.ts +3 -0
- package/src/components/RenderedResult/RenderedResult.tsx +312 -19
- package/src/components/RenderedResult/ResultContainer.tsx +31 -1
- package/src/components/RenderedResult/index.ts +3 -0
- package/src/components/RenderedResult/renderLogs.spec.ts +3 -0
- package/src/components/RenderedResult/renderLogs.ts +3 -0
- package/src/components/ResultsDialog.tsx +8 -0
- package/src/components/ServerProvider.tsx +5 -0
- package/src/components/Workbook/BrowserWorkbookStorage.ts +3 -0
- package/src/components/Workbook/EditableMalloyCell.tsx +3 -0
- package/src/components/Workbook/ModelPicker.tsx +3 -0
- package/src/components/Workbook/MutableCell.tsx +3 -0
- package/src/components/Workbook/Workbook.tsx +3 -0
- package/src/components/Workbook/WorkbookList.tsx +3 -0
- package/src/components/Workbook/WorkbookManager.ts +3 -0
- package/src/components/Workbook/WorkbookStorage.ts +3 -0
- package/src/components/Workbook/WorkbookStorageProvider.tsx +3 -0
- package/src/components/Workbook/index.ts +3 -0
- package/src/components/click_helper.ts +17 -1
- package/src/components/drill/index.ts +28 -0
- package/src/components/drill/markDrillableCells.dom.spec.ts +313 -0
- package/src/components/drill/markDrillableCells.spec.ts +109 -0
- package/src/components/drill/markDrillableCells.ts +314 -0
- package/src/components/drill/resolveDrill.spec.ts +449 -0
- package/src/components/drill/resolveDrill.ts +375 -0
- package/src/components/drill/useDrill.tsx +203 -0
- package/src/components/filter/DimensionFilter.tsx +3 -0
- package/src/components/filter/index.ts +3 -0
- package/src/components/filter/utils.ts +16 -5
- package/src/components/given/GivenInput.spec.tsx +498 -15
- package/src/components/given/GivenInput.tsx +565 -30
- package/src/components/given/GivensPanel.spec.tsx +175 -0
- package/src/components/given/GivensPanel.tsx +142 -32
- package/src/components/given/filterValue.spec.ts +364 -0
- package/src/components/given/filterValue.ts +207 -0
- package/src/components/given/index.ts +8 -1
- package/src/components/given/paramCodec.spec.ts +857 -0
- package/src/components/given/paramCodec.ts +483 -0
- package/src/components/given/utils.spec.ts +3 -0
- package/src/components/given/utils.ts +3 -0
- package/src/components/highlighter.ts +3 -0
- package/src/components/index.ts +7 -1
- package/src/components/styles.ts +38 -3
- package/src/constants/docLinks.spec.ts +54 -0
- package/src/constants/docLinks.ts +29 -0
- package/src/hooks/givenValue.ts +13 -0
- package/src/hooks/index.ts +9 -4
- package/src/hooks/useDimensionFilters.ts +4 -7
- package/src/hooks/useDimensionFiltersFromSpec.ts +3 -0
- package/src/hooks/useDimensionFiltersQuery.ts +4 -7
- package/src/hooks/useDimensionalFilterRangeData.ts +4 -7
- package/src/hooks/useGivensState.spec.ts +449 -0
- package/src/hooks/useGivensState.ts +340 -0
- package/src/hooks/useModelGivens.ts +3 -0
- package/src/hooks/useQueryWithApiError.ts +3 -0
- package/src/hooks/useRawQueryData.ts +3 -0
- package/src/hooks/useSuggestOptions.spec.ts +112 -0
- package/src/hooks/useSuggestOptions.ts +263 -0
- package/src/index.ts +3 -0
- package/src/react-app-env.d.ts +3 -0
- package/src/theme/ThemeContext.tsx +3 -0
- package/src/theme/buildMalloyExplicitTheme.ts +3 -0
- package/src/theme/buildTableCssVars.spec.ts +3 -0
- package/src/theme/buildTableCssVars.ts +7 -0
- package/src/theme/buildVegaThemeOverride.spec.ts +3 -0
- package/src/theme/buildVegaThemeOverride.ts +3 -0
- package/src/theme/defaults.ts +3 -0
- package/src/theme/index.ts +3 -0
- package/src/theme/keys.ts +3 -0
- package/src/theme/readChartAnnotations.spec.ts +3 -0
- package/src/theme/readChartAnnotations.ts +3 -0
- package/src/theme/resolveTheme.spec.ts +16 -0
- package/src/theme/resolveTheme.ts +6 -0
- package/src/theme/types.ts +12 -0
- package/src/utils/dataAppEmbed.spec.ts +3 -0
- package/src/utils/dataAppEmbed.ts +3 -0
- package/src/utils/formatting.spec.ts +3 -0
- package/src/utils/formatting.ts +3 -0
- package/src/utils/malloyString.spec.ts +24 -0
- package/src/utils/malloyString.ts +12 -0
- package/src/utils/parsing.spec.ts +3 -0
- package/src/utils/parsing.ts +3 -0
- package/src/utils/queryClient.ts +3 -0
- package/test/README.md +21 -10
- package/test/setup.ts +3 -0
- package/vite.config.ts +3 -0
- package/dist/ServerProvider-Dg5S1qBU.cjs.js +0 -1
- package/dist/hooks/useGivensForm.d.ts +0 -35
- package/dist/index-MES4MGpQ.cjs.js +0 -309
- package/src/hooks/useGivensForm.spec.ts +0 -99
- package/src/hooks/useGivensForm.ts +0 -107
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// Copyright (c) Credible Data Inc.
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
1
4
|
import CloseIcon from "@mui/icons-material/Close";
|
|
2
5
|
import CodeIcon from "@mui/icons-material/Code";
|
|
3
6
|
import ContentCopyIcon from "@mui/icons-material/ContentCopy";
|
|
@@ -10,6 +13,7 @@ import {
|
|
|
10
13
|
DialogContent,
|
|
11
14
|
DialogTitle,
|
|
12
15
|
IconButton,
|
|
16
|
+
LinearProgress,
|
|
13
17
|
Snackbar,
|
|
14
18
|
Stack,
|
|
15
19
|
Tooltip,
|
|
@@ -21,12 +25,21 @@ import { usePublisherTheme } from "../../theme/ThemeContext";
|
|
|
21
25
|
import { parseResourceUri } from "../../utils/formatting";
|
|
22
26
|
import { highlight } from "../highlighter";
|
|
23
27
|
import { ModelExplorerDialog } from "../Model/ModelExplorerDialog";
|
|
28
|
+
import type { NavigationClick } from "../click_helper";
|
|
29
|
+
import { useDrill, type DrillNavigation } from "../drill";
|
|
24
30
|
import { createEmbeddedQueryResult } from "../QueryResult/QueryResult";
|
|
25
31
|
import ResultContainer from "../RenderedResult/ResultContainer";
|
|
26
32
|
import ResultsDialog from "../ResultsDialog";
|
|
27
33
|
import { CleanMetricCard, CleanNotebookCell } from "../styles";
|
|
28
34
|
import { EnhancedNotebookCell } from "./types";
|
|
29
35
|
|
|
36
|
+
/**
|
|
37
|
+
* Cap for a cell result that lays itself out: a table, mostly. Tall enough for
|
|
38
|
+
* a screenful of rows, after which the cell scrolls rather than the page
|
|
39
|
+
* turning into one long table.
|
|
40
|
+
*/
|
|
41
|
+
const CELL_MAX_HEIGHT = 700;
|
|
42
|
+
|
|
30
43
|
interface NotebookCellProps {
|
|
31
44
|
cell: EnhancedNotebookCell;
|
|
32
45
|
expandCodeCell?: boolean;
|
|
@@ -37,7 +50,43 @@ interface NotebookCellProps {
|
|
|
37
50
|
index: number;
|
|
38
51
|
maxResultSize?: number;
|
|
39
52
|
isExecuting?: boolean;
|
|
40
|
-
|
|
53
|
+
/**
|
|
54
|
+
* A re-run is coming but has not started, i.e. the given-settle window.
|
|
55
|
+
* Separate from `isExecuting` because the spinner below is gated on
|
|
56
|
+
* `!cell.result`, so on a re-run (where a result IS present) it renders
|
|
57
|
+
* nothing at all, which is exactly the case the settle window needs to
|
|
58
|
+
* signal: the values on screen are already stale.
|
|
59
|
+
*/
|
|
60
|
+
pendingRerun?: boolean;
|
|
61
|
+
// Takes the modifier subset rather than a synthetic event, so a drill click
|
|
62
|
+
// (which the Malloy renderer reports as a DOM event) can navigate without
|
|
63
|
+
// being converted into a React one first.
|
|
64
|
+
onNavigate?: (to: string, event?: NavigationClick) => void;
|
|
65
|
+
/**
|
|
66
|
+
* Applies a `# drill { to=self }` in place, by setting the named parameter
|
|
67
|
+
* on the notebook that owns this cell. Omitted when the notebook declares no
|
|
68
|
+
* givens, which makes a self-drill inert rather than an error.
|
|
69
|
+
*
|
|
70
|
+
* Takes the clicked value unencoded: only the notebook knows the declared
|
|
71
|
+
* type of the given being set, and the encoding depends on it.
|
|
72
|
+
*/
|
|
73
|
+
onDrillSelf?: (given: string, rawValue: unknown) => void;
|
|
74
|
+
/**
|
|
75
|
+
* Whether the owning notebook declares a given, so a `to=self` drill onto it
|
|
76
|
+
* can be honoured. Without it every self-drill reads as clickable and the
|
|
77
|
+
* refusal only shows up in the console.
|
|
78
|
+
*/
|
|
79
|
+
canDrillSelf?: (given: string) => boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Opens a `# drill { to=<dashboard> }` destination, seeded with the clicked
|
|
82
|
+
* value. Distinct from {@link onNavigate}, which routes a markdown link and
|
|
83
|
+
* takes a URL: this one takes a destination and the givens to seed, and only
|
|
84
|
+
* the host knows how to turn those into a route.
|
|
85
|
+
*
|
|
86
|
+
* Omitted on a host with no dashboard route, which makes a cross-dashboard
|
|
87
|
+
* drill inert rather than dead-ended, and removes the affordance with it.
|
|
88
|
+
*/
|
|
89
|
+
onDrillNavigate?: (target: DrillNavigation, event?: MouseEvent) => void;
|
|
41
90
|
}
|
|
42
91
|
|
|
43
92
|
interface NotebookMarkdownLinkProps {
|
|
@@ -47,7 +96,7 @@ interface NotebookMarkdownLinkProps {
|
|
|
47
96
|
envName: string;
|
|
48
97
|
pkgName: string;
|
|
49
98
|
sourceDir: string;
|
|
50
|
-
onNavigate?: (to: string, event?:
|
|
99
|
+
onNavigate?: (to: string, event?: NavigationClick) => void;
|
|
51
100
|
}
|
|
52
101
|
|
|
53
102
|
// Links inside a rendered notebook/README are authored relative to the source
|
|
@@ -124,7 +173,11 @@ export function NotebookCell({
|
|
|
124
173
|
index,
|
|
125
174
|
maxResultSize,
|
|
126
175
|
isExecuting,
|
|
176
|
+
pendingRerun,
|
|
127
177
|
onNavigate,
|
|
178
|
+
onDrillSelf,
|
|
179
|
+
canDrillSelf,
|
|
180
|
+
onDrillNavigate,
|
|
128
181
|
}: NotebookCellProps) {
|
|
129
182
|
const [codeDialogOpen, setCodeDialogOpen] = React.useState<boolean>(false);
|
|
130
183
|
const [embeddingDialogOpen, setEmbeddingDialogOpen] =
|
|
@@ -142,6 +195,36 @@ export function NotebookCell({
|
|
|
142
195
|
|
|
143
196
|
const { environmentName, packageName, modelPath } =
|
|
144
197
|
parseResourceUri(resourceUri);
|
|
198
|
+
|
|
199
|
+
// `# drill` is declared on a model dimension, so a notebook cell that groups
|
|
200
|
+
// by that dimension is clickable for free: the same resolution, and the
|
|
201
|
+
// same hook, the dashboard viewer uses.
|
|
202
|
+
const { drill, drillMenu } = useDrill({
|
|
203
|
+
// The dashboards route now exists, so a `# drill { to=<dashboard> }` from
|
|
204
|
+
// a notebook cell is honoured: the host turns the destination and its
|
|
205
|
+
// seeded givens into `/{env}/{pkg}/dashboards/<slug>?GIVEN=value`. Passed
|
|
206
|
+
// through rather than built here, because only the host knows its routing.
|
|
207
|
+
//
|
|
208
|
+
// Still optional, and the reason matters: a host without a dashboard
|
|
209
|
+
// route omits it, which makes a named destination non-honorable and
|
|
210
|
+
// removes the AFFORDANCE along with the navigation. That is
|
|
211
|
+
// `markDrillableCells`'s principle, that a destination the surface cannot
|
|
212
|
+
// reach never becomes a link, and it is why this is a prop rather than
|
|
213
|
+
// something the cell assumes.
|
|
214
|
+
//
|
|
215
|
+
// Wiring it also makes `drillMenu` reachable for the first time: a menu
|
|
216
|
+
// opens only for two or more honorable destinations, so until there was a
|
|
217
|
+
// second one every drillable cell applied its filter on the first click.
|
|
218
|
+
onNavigate: onDrillNavigate,
|
|
219
|
+
onSelf: onDrillSelf,
|
|
220
|
+
// Only the notebook knows which givens it declares, and a self-drill onto
|
|
221
|
+
// one it does not is refused. Asking here keeps the affordance honest
|
|
222
|
+
// instead of painting a link whose click only logs a warning.
|
|
223
|
+
canSelf: canDrillSelf,
|
|
224
|
+
// The reader is in a notebook, so `to=self` says so: the drill tag is on
|
|
225
|
+
// a shared model dimension and cannot know which document it fired in.
|
|
226
|
+
selfLabel: "Filter this notebook",
|
|
227
|
+
});
|
|
145
228
|
// Directory of the source file within the package (empty for a package-root
|
|
146
229
|
// README), used to resolve relative links the author wrote against it.
|
|
147
230
|
const sourceDir =
|
|
@@ -523,11 +606,16 @@ export function NotebookCell({
|
|
|
523
606
|
onClose={() => setResultsDialogOpen(false)}
|
|
524
607
|
result={cell.result || ""}
|
|
525
608
|
title="Results"
|
|
609
|
+
drill={drill}
|
|
526
610
|
/>
|
|
527
611
|
|
|
528
612
|
{/* Loading state for executing code cells (not import cells) */}
|
|
529
613
|
{isExecuting &&
|
|
530
614
|
!cell.result &&
|
|
615
|
+
/* A failed cell keeps `isExecuting` (it is notebook-wide, not
|
|
616
|
+
per cell), so without this the error card below renders under
|
|
617
|
+
a spinner and the cell reads as still loading. */
|
|
618
|
+
!cell.error &&
|
|
531
619
|
!hasValidImport &&
|
|
532
620
|
!(cell.newSources && cell.newSources.length > 0) && (
|
|
533
621
|
<CleanMetricCard
|
|
@@ -542,6 +630,33 @@ export function NotebookCell({
|
|
|
542
630
|
</CleanMetricCard>
|
|
543
631
|
)}
|
|
544
632
|
|
|
633
|
+
{!cell.result && cell.error && (
|
|
634
|
+
<CleanMetricCard sx={{ p: 2 }}>
|
|
635
|
+
<Typography variant="body2" sx={{ color: "error.main" }}>
|
|
636
|
+
This cell could not be run.
|
|
637
|
+
</Typography>
|
|
638
|
+
<Typography
|
|
639
|
+
variant="body2"
|
|
640
|
+
component="pre"
|
|
641
|
+
sx={{
|
|
642
|
+
color: "text.secondary",
|
|
643
|
+
whiteSpace: "pre-wrap",
|
|
644
|
+
m: 0,
|
|
645
|
+
mt: 1,
|
|
646
|
+
}}
|
|
647
|
+
>
|
|
648
|
+
{cell.error}
|
|
649
|
+
</Typography>
|
|
650
|
+
</CleanMetricCard>
|
|
651
|
+
)}
|
|
652
|
+
|
|
653
|
+
{cell.result && pendingRerun && (
|
|
654
|
+
<LinearProgress
|
|
655
|
+
aria-label="a re-run is pending"
|
|
656
|
+
sx={{ mb: 1, height: 2, borderRadius: 1 }}
|
|
657
|
+
/>
|
|
658
|
+
)}
|
|
659
|
+
|
|
545
660
|
{cell.result && (
|
|
546
661
|
<CleanMetricCard
|
|
547
662
|
sx={{
|
|
@@ -555,10 +670,12 @@ export function NotebookCell({
|
|
|
555
670
|
>
|
|
556
671
|
<ResultContainer
|
|
557
672
|
result={cell.result}
|
|
558
|
-
maxHeight={
|
|
673
|
+
maxHeight={CELL_MAX_HEIGHT}
|
|
559
674
|
maxResultSize={maxResultSize}
|
|
675
|
+
drill={drill}
|
|
560
676
|
/>
|
|
561
677
|
</Box>
|
|
678
|
+
{drillMenu}
|
|
562
679
|
|
|
563
680
|
{/* Top right corner controls.
|
|
564
681
|
`top: -12px` lifts the buttons above the
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
// Copyright (c) Credible Data Inc.
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
import { describe, expect, it } from "bun:test";
|
|
5
|
+
import { planRun } from "./runPlan";
|
|
6
|
+
|
|
7
|
+
const DOC = "uri|1";
|
|
8
|
+
const key = (givens: string) => `${DOC}|${givens}`;
|
|
9
|
+
|
|
10
|
+
describe("planRun", () => {
|
|
11
|
+
it("disarms a pending run when the notebook is not loaded", () => {
|
|
12
|
+
// Handled here rather than by an early return in the effect, because an
|
|
13
|
+
// early return skipped the cancellation: navigating away inside the
|
|
14
|
+
// settle window left a timer holding the previous notebook's closure.
|
|
15
|
+
expect(
|
|
16
|
+
planRun({
|
|
17
|
+
ready: false,
|
|
18
|
+
lastRunKey: key(""),
|
|
19
|
+
pendingKey: key("REGION=West"),
|
|
20
|
+
runKey: key("REGION=West"),
|
|
21
|
+
documentKey: DOC,
|
|
22
|
+
}),
|
|
23
|
+
).toEqual({ cancelPending: true, dispatch: "none" });
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it("does nothing at all when there is nothing pending and nothing loaded", () => {
|
|
27
|
+
expect(
|
|
28
|
+
planRun({
|
|
29
|
+
ready: false,
|
|
30
|
+
lastRunKey: null,
|
|
31
|
+
pendingKey: undefined,
|
|
32
|
+
runKey: key(""),
|
|
33
|
+
documentKey: DOC,
|
|
34
|
+
}),
|
|
35
|
+
).toEqual({ cancelPending: false, dispatch: "none" });
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it("runs the first pass immediately", () => {
|
|
39
|
+
expect(
|
|
40
|
+
planRun({
|
|
41
|
+
ready: true,
|
|
42
|
+
lastRunKey: null,
|
|
43
|
+
pendingKey: undefined,
|
|
44
|
+
runKey: key(""),
|
|
45
|
+
documentKey: DOC,
|
|
46
|
+
}),
|
|
47
|
+
).toEqual({ cancelPending: false, dispatch: "now" });
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it("makes a changed parameter wait for the value to settle", () => {
|
|
51
|
+
expect(
|
|
52
|
+
planRun({
|
|
53
|
+
ready: true,
|
|
54
|
+
lastRunKey: key(""),
|
|
55
|
+
pendingKey: undefined,
|
|
56
|
+
runKey: key("REGION=West"),
|
|
57
|
+
documentKey: DOC,
|
|
58
|
+
}),
|
|
59
|
+
).toEqual({ cancelPending: false, dispatch: "settle" });
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it("does not make a different notebook wait", () => {
|
|
63
|
+
// A document change is not a burst, so delaying it is only a blank screen.
|
|
64
|
+
expect(
|
|
65
|
+
planRun({
|
|
66
|
+
ready: true,
|
|
67
|
+
lastRunKey: "uri|1|",
|
|
68
|
+
pendingKey: undefined,
|
|
69
|
+
runKey: "other|1|",
|
|
70
|
+
documentKey: "other|1",
|
|
71
|
+
}).dispatch,
|
|
72
|
+
).toBe("now");
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
it("does not make a package reload wait", () => {
|
|
76
|
+
// A reload bumps the generation, which changes the document key.
|
|
77
|
+
expect(
|
|
78
|
+
planRun({
|
|
79
|
+
ready: true,
|
|
80
|
+
lastRunKey: "uri|1|REGION=West",
|
|
81
|
+
pendingKey: undefined,
|
|
82
|
+
runKey: "uri|2|REGION=West",
|
|
83
|
+
documentKey: "uri|2",
|
|
84
|
+
}).dispatch,
|
|
85
|
+
).toBe("now");
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
it("lets a pending run for the same key finish its clock", () => {
|
|
89
|
+
// Restarting it on every unrelated re-render could hold it off forever.
|
|
90
|
+
expect(
|
|
91
|
+
planRun({
|
|
92
|
+
ready: true,
|
|
93
|
+
lastRunKey: key(""),
|
|
94
|
+
pendingKey: key("REGION=West"),
|
|
95
|
+
runKey: key("REGION=West"),
|
|
96
|
+
documentKey: DOC,
|
|
97
|
+
}),
|
|
98
|
+
).toEqual({ cancelPending: false, dispatch: "none" });
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
it("supersedes a pending run when the value changes again", () => {
|
|
102
|
+
expect(
|
|
103
|
+
planRun({
|
|
104
|
+
ready: true,
|
|
105
|
+
lastRunKey: key(""),
|
|
106
|
+
pendingKey: key("REGION=We"),
|
|
107
|
+
runKey: key("REGION=West"),
|
|
108
|
+
documentKey: DOC,
|
|
109
|
+
}),
|
|
110
|
+
).toEqual({ cancelPending: true, dispatch: "settle" });
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
it("cancels a pending run when the user reverts to what already ran", () => {
|
|
114
|
+
// The defect this function was extracted for. Typing a value and deleting
|
|
115
|
+
// it again inside the settle window lands on an already-run key. Cancelling
|
|
116
|
+
// has to happen even though there is nothing to dispatch, or the abandoned
|
|
117
|
+
// value's results arrive and nothing is left to correct them.
|
|
118
|
+
expect(
|
|
119
|
+
planRun({
|
|
120
|
+
ready: true,
|
|
121
|
+
lastRunKey: key(""),
|
|
122
|
+
pendingKey: key("REGION=West"),
|
|
123
|
+
runKey: key(""),
|
|
124
|
+
documentKey: DOC,
|
|
125
|
+
}),
|
|
126
|
+
).toEqual({ cancelPending: true, dispatch: "none" });
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
it("cancels a pending run when the DOCUMENT changes under it", () => {
|
|
130
|
+
// The reachable case the first table missed: a parameter edit arms a
|
|
131
|
+
// timer, then the reader navigates to another notebook inside the window.
|
|
132
|
+
// The pending run belongs to the notebook they just left.
|
|
133
|
+
expect(
|
|
134
|
+
planRun({
|
|
135
|
+
ready: true,
|
|
136
|
+
lastRunKey: "uri|1|",
|
|
137
|
+
pendingKey: "uri|1|REGION=West",
|
|
138
|
+
runKey: "other|1|",
|
|
139
|
+
documentKey: "other|1",
|
|
140
|
+
}),
|
|
141
|
+
).toEqual({ cancelPending: true, dispatch: "now" });
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
it("does nothing when the state is unchanged", () => {
|
|
145
|
+
expect(
|
|
146
|
+
planRun({
|
|
147
|
+
ready: true,
|
|
148
|
+
lastRunKey: key("REGION=West"),
|
|
149
|
+
pendingKey: undefined,
|
|
150
|
+
runKey: key("REGION=West"),
|
|
151
|
+
documentKey: DOC,
|
|
152
|
+
}),
|
|
153
|
+
).toEqual({ cancelPending: false, dispatch: "none" });
|
|
154
|
+
});
|
|
155
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// Copyright (c) Credible Data Inc.
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* What the notebook's run effect should do about the state it just observed.
|
|
6
|
+
*
|
|
7
|
+
* Pulled out as a pure function because the inline version produced two defects
|
|
8
|
+
* that no test could reach: it first lost the bound on concurrent runs
|
|
9
|
+
* entirely, then, once a settle delay put the bound back, it let an abandoned
|
|
10
|
+
* run fire. Both were reasoning errors about
|
|
11
|
+
* three interacting pieces of state, which is exactly what a table of cases
|
|
12
|
+
* pins and a component test does not.
|
|
13
|
+
*/
|
|
14
|
+
export interface RunPlanInput {
|
|
15
|
+
/** Whether the notebook is loaded and runnable at all. */
|
|
16
|
+
ready: boolean;
|
|
17
|
+
/** Key of the run that has already been dispatched, or null before the first. */
|
|
18
|
+
lastRunKey: string | null;
|
|
19
|
+
/** Key of a run currently waiting out the settle delay, if any. */
|
|
20
|
+
pendingKey: string | undefined;
|
|
21
|
+
/** Key for the state the notebook is in now. */
|
|
22
|
+
runKey: string;
|
|
23
|
+
/** The `resourceUri|generation` prefix of {@link runKey}, without the parameters. */
|
|
24
|
+
documentKey: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface RunPlan {
|
|
28
|
+
/** Clear the pending timer, because what it would run is no longer current. */
|
|
29
|
+
cancelPending: boolean;
|
|
30
|
+
/** `now` skips the settle delay; `settle` waits it out; `none` does nothing. */
|
|
31
|
+
dispatch: "now" | "settle" | "none";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function planRun({
|
|
35
|
+
ready,
|
|
36
|
+
lastRunKey,
|
|
37
|
+
pendingKey,
|
|
38
|
+
runKey,
|
|
39
|
+
documentKey,
|
|
40
|
+
}: RunPlanInput): RunPlan {
|
|
41
|
+
// A notebook that is not loaded still has to disarm. This is the reason the
|
|
42
|
+
// readiness check belongs here rather than as an early return in the effect:
|
|
43
|
+
// as an early return it skipped the cancellation below, so navigating away
|
|
44
|
+
// inside the settle window left a timer holding the PREVIOUS notebook's
|
|
45
|
+
// closure, which then ran a full wave of cells against the notebook the
|
|
46
|
+
// reader had just left and wrote them into the one now on screen.
|
|
47
|
+
if (!ready) {
|
|
48
|
+
return { cancelPending: pendingKey !== undefined, dispatch: "none" };
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// A pending run for any other key is stale the moment the notebook moves on,
|
|
52
|
+
// INCLUDING when it moves back to a key that has already run. That last case
|
|
53
|
+
// is the one that bit: typing a value and deleting it again inside the
|
|
54
|
+
// window returns to an already-run key, and leaving the timer armed meant the
|
|
55
|
+
// abandoned value's results landed on screen with nothing to correct them.
|
|
56
|
+
const cancelPending = pendingKey !== undefined && pendingKey !== runKey;
|
|
57
|
+
|
|
58
|
+
if (lastRunKey === runKey) return { cancelPending, dispatch: "none" };
|
|
59
|
+
if (pendingKey === runKey) return { cancelPending, dispatch: "none" };
|
|
60
|
+
|
|
61
|
+
// Only a changed PARAMETER waits. A first run, a different notebook, and a
|
|
62
|
+
// package reload all change the document rather than a value, and none of
|
|
63
|
+
// them is a burst worth coalescing: delaying them is just a blank screen.
|
|
64
|
+
const changedDocument =
|
|
65
|
+
lastRunKey === null || !lastRunKey.startsWith(`${documentKey}|`);
|
|
66
|
+
return { cancelPending, dispatch: changedDocument ? "now" : "settle" };
|
|
67
|
+
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// Copyright (c) Credible Data Inc.
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
1
4
|
import { NotebookCell as ClientNotebookCell } from "../../client";
|
|
2
5
|
|
|
3
6
|
/**
|
|
@@ -21,4 +24,15 @@ export interface EnhancedNotebookCell extends ClientNotebookCell {
|
|
|
21
24
|
* that become available in this cell (e.g., from imports or source definitions)
|
|
22
25
|
*/
|
|
23
26
|
newSources?: string[];
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Why this cell has no result, when the server refused to run it.
|
|
30
|
+
*
|
|
31
|
+
* A cell that throws used to be logged to the console and nothing else, so
|
|
32
|
+
* the reader got an empty space with no indication anything had happened.
|
|
33
|
+
* That was survivable while the only way to reach it was a server fault; it
|
|
34
|
+
* stopped being survivable once a model with a required `#(filter)` began
|
|
35
|
+
* failing every cell by design.
|
|
36
|
+
*/
|
|
37
|
+
error?: string;
|
|
24
38
|
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// Copyright (c) Credible Data Inc.
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
import { describe, expect, it } from "bun:test";
|
|
5
|
+
import { MALLOY_ACCENT } from "../styles";
|
|
6
|
+
import { CONTENT_TINT, type ContentType } from "./ContentTypeIcon";
|
|
7
|
+
|
|
8
|
+
/** Relative luminance, WCAG 2.x definition. */
|
|
9
|
+
function luminance(hex: string): number {
|
|
10
|
+
const channels = [1, 3, 5].map(
|
|
11
|
+
(i) => parseInt(hex.slice(i, i + 2), 16) / 255,
|
|
12
|
+
);
|
|
13
|
+
const [r, g, b] = channels.map((c) =>
|
|
14
|
+
c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4,
|
|
15
|
+
);
|
|
16
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function contrastWithWhite(hex: string): number {
|
|
20
|
+
return (1 + 0.05) / (luminance(hex) + 0.05);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
describe("CONTENT_TINT", () => {
|
|
24
|
+
/**
|
|
25
|
+
* The whole point of the map. Before the package row derived its color from
|
|
26
|
+
* its type, four of the six rows were handed the same teal by four separate
|
|
27
|
+
* call sites, so color distinguished two kinds out of six. A repeat here is
|
|
28
|
+
* that regression arriving again, and nothing renders differently enough for
|
|
29
|
+
* a person to notice it in review.
|
|
30
|
+
*/
|
|
31
|
+
it("gives every content type its own color", () => {
|
|
32
|
+
const values = Object.values(CONTENT_TINT);
|
|
33
|
+
expect(new Set(values).size).toBe(values.length);
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Content types whose colour predates this bar. `report` is backed by
|
|
39
|
+
* `MALLOY_BRAND.teal` at 2.5:1, which is below it; that is inherited from the
|
|
40
|
+
* logo and is a brand decision rather than a component one.
|
|
41
|
+
*
|
|
42
|
+
* Keyed by content TYPE rather than by colour, which is the whole point. A new
|
|
43
|
+
* type handed teal is not grandfathered and fails, and fixing teal one day
|
|
44
|
+
* leaves this entry merely unused rather than turning a correct fix into a red
|
|
45
|
+
* suite.
|
|
46
|
+
*/
|
|
47
|
+
const GRANDFATHERED: ContentType[] = ["report"];
|
|
48
|
+
|
|
49
|
+
describe("CONTENT_TINT contrast", () => {
|
|
50
|
+
/**
|
|
51
|
+
* Every tint fills a 32px backplate behind an 18px white glyph, so it has to
|
|
52
|
+
* clear 3:1
|
|
53
|
+
* against white, WCAG's minimum for a graphical object. Asserted rather than
|
|
54
|
+
* written down, because the failure is invisible: a lighter colour looks fine
|
|
55
|
+
* in a screenshot and the icon simply stops being readable.
|
|
56
|
+
*
|
|
57
|
+
* Over `CONTENT_TINT` rather than over `MALLOY_ACCENT`, because the tints are
|
|
58
|
+
* what actually get painted. Asserting the accent palette alone left three of
|
|
59
|
+
* the six painted values unchecked.
|
|
60
|
+
*/
|
|
61
|
+
it.each(
|
|
62
|
+
Object.entries(CONTENT_TINT).filter(
|
|
63
|
+
([type]) => !GRANDFATHERED.includes(type as ContentType),
|
|
64
|
+
),
|
|
65
|
+
)("%s clears 3:1 against white", (_type, hex) => {
|
|
66
|
+
expect(contrastWithWhite(hex)).toBeGreaterThanOrEqual(3);
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
// Guards the exception list against drift: a grandfathered name that no
|
|
70
|
+
// longer matches a `ContentType` fails here rather than silently exempting
|
|
71
|
+
// nothing. It does NOT catch the list being emptied, which passes
|
|
72
|
+
// vacuously; that case is caught instead by the contrast assertion for the
|
|
73
|
+
// type that stops being skipped, and an empty list is the desired end state
|
|
74
|
+
// anyway.
|
|
75
|
+
it("grandfathers only types that exist", () => {
|
|
76
|
+
for (const type of GRANDFATHERED) {
|
|
77
|
+
expect(CONTENT_TINT).toHaveProperty(type);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
describe("MALLOY_ACCENT", () => {
|
|
83
|
+
// The accents were chosen against this bar, so they hold it even before any
|
|
84
|
+
// of them is assigned to a content type.
|
|
85
|
+
it.each(Object.entries(MALLOY_ACCENT))(
|
|
86
|
+
"%s clears 3:1 against white",
|
|
87
|
+
(_name, hex) => {
|
|
88
|
+
expect(contrastWithWhite(hex)).toBeGreaterThanOrEqual(3);
|
|
89
|
+
},
|
|
90
|
+
);
|
|
91
|
+
});
|
|
@@ -1,6 +1,40 @@
|
|
|
1
|
+
// Copyright (c) Credible Data Inc.
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
1
4
|
import SvgIcon, { SvgIconProps } from "@mui/material/SvgIcon";
|
|
5
|
+
import { MALLOY_ACCENT, MALLOY_BRAND } from "../styles";
|
|
2
6
|
|
|
3
|
-
type ContentType =
|
|
7
|
+
export type ContentType =
|
|
8
|
+
| "report"
|
|
9
|
+
| "model"
|
|
10
|
+
| "data"
|
|
11
|
+
| "materialization"
|
|
12
|
+
| "dataApp"
|
|
13
|
+
| "dashboard";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The backplate color behind each icon. One per content type and no repeats: on
|
|
17
|
+
* a page that lists all six, a shared color reads as a shared kind, and the
|
|
18
|
+
* glyphs are small enough that color does most of the telling apart.
|
|
19
|
+
*
|
|
20
|
+
* The logo's three go to the three artifacts a reader opens to look at data,
|
|
21
|
+
* dashboards and notebooks and the models under them, and the accents to the
|
|
22
|
+
* rest, so the brand leads on the things the page is mostly for. Not a
|
|
23
|
+
* seniority ranking: dashboards are the newest thing a package can hold, and
|
|
24
|
+
* Package Data is among the oldest and takes an accent.
|
|
25
|
+
*
|
|
26
|
+
* Exhaustive by type rather than by a default, so adding a `ContentType` is a
|
|
27
|
+
* compile error here instead of a row that silently paints itself the same as
|
|
28
|
+
* its neighbour.
|
|
29
|
+
*/
|
|
30
|
+
export const CONTENT_TINT: Record<ContentType, string> = {
|
|
31
|
+
dashboard: MALLOY_BRAND.orange,
|
|
32
|
+
report: MALLOY_BRAND.teal,
|
|
33
|
+
model: MALLOY_BRAND.darkBlue,
|
|
34
|
+
dataApp: MALLOY_ACCENT.violet,
|
|
35
|
+
data: MALLOY_ACCENT.moss,
|
|
36
|
+
materialization: MALLOY_ACCENT.magenta,
|
|
37
|
+
};
|
|
4
38
|
|
|
5
39
|
interface ContentTypeIconProps extends Omit<SvgIconProps, "fontSize"> {
|
|
6
40
|
type: ContentType;
|
|
@@ -35,15 +69,31 @@ export default function ContentTypeIcon({
|
|
|
35
69
|
...sx,
|
|
36
70
|
}}
|
|
37
71
|
>
|
|
38
|
-
{type
|
|
39
|
-
{type === "model" && <BoxTopPath />}
|
|
40
|
-
{type === "data" && <TablePath />}
|
|
41
|
-
{type === "materialization" && <StackPath />}
|
|
42
|
-
{type === "dataApp" && <BrowserWindowPath />}
|
|
72
|
+
{CONTENT_GLYPH[type]()}
|
|
43
73
|
</SvgIcon>
|
|
44
74
|
);
|
|
45
75
|
}
|
|
46
76
|
|
|
77
|
+
/**
|
|
78
|
+
* The glyph for each content type, a `Record` for the same reason
|
|
79
|
+
* `CONTENT_TINT` is one. This was a chain of `type === "x" && <Path />`, which
|
|
80
|
+
* type-checks with no arm for a new content type and renders an empty `<svg>`
|
|
81
|
+
* on a coloured backplate: the colour half of the signal failed loudly at
|
|
82
|
+
* compile time and the glyph half failed silently at runtime. Two halves of one
|
|
83
|
+
* signal should fail the same way. The failure mode differs at runtime as well
|
|
84
|
+
* as at compile time: an unknown type throws here, where the old chain rendered
|
|
85
|
+
* an empty `<svg>`. Unreachable today, since every call site passes a literal,
|
|
86
|
+
* and a crash is the better of the two if it ever is reachable.
|
|
87
|
+
*/
|
|
88
|
+
const CONTENT_GLYPH: Record<ContentType, () => React.ReactElement> = {
|
|
89
|
+
report: FileChartPath,
|
|
90
|
+
model: BoxTopPath,
|
|
91
|
+
data: TablePath,
|
|
92
|
+
materialization: StackPath,
|
|
93
|
+
dataApp: BrowserWindowPath,
|
|
94
|
+
dashboard: DashboardGridPath,
|
|
95
|
+
};
|
|
96
|
+
|
|
47
97
|
/** File outline with a folded top-right corner and three chart bars inside. */
|
|
48
98
|
function FileChartPath() {
|
|
49
99
|
return (
|
|
@@ -90,6 +140,30 @@ function StackPath() {
|
|
|
90
140
|
);
|
|
91
141
|
}
|
|
92
142
|
|
|
143
|
+
/**
|
|
144
|
+
* Panels of unequal size in one frame: the grid of tiles a dashboard lays out.
|
|
145
|
+
*
|
|
146
|
+
* The neighbour to stay distinct from is the TABLE glyph, not the data app's
|
|
147
|
+
* browser window. Both this and the table are a rounded rect with the same
|
|
148
|
+
* `M3.5 9.5` divider, so before the second divider the whole difference between
|
|
149
|
+
* them was one vertical stroke: `M12 9.5 V20.5` here against the table's
|
|
150
|
+
* `M9.5 3.5 V20.5`: shifted 2.5 across, and starting at the divider rather
|
|
151
|
+
* than at the top of the frame. That read as the
|
|
152
|
+
* same icon at 18px, with the Dashboards and Databases sections on one page.
|
|
153
|
+
* The second divider is what makes this one read as a grid rather than as
|
|
154
|
+
* columns.
|
|
155
|
+
*/
|
|
156
|
+
function DashboardGridPath() {
|
|
157
|
+
return (
|
|
158
|
+
<>
|
|
159
|
+
<rect x="3.5" y="3.5" width="17" height="17" rx="2" />
|
|
160
|
+
<path d="M3.5 9.5 H20.5" />
|
|
161
|
+
<path d="M12 9.5 V20.5" />
|
|
162
|
+
<path d="M12 15 H20.5" />
|
|
163
|
+
</>
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
93
167
|
/** Browser-window outline with an address-bar separator and content lines. */
|
|
94
168
|
function BrowserWindowPath() {
|
|
95
169
|
return (
|