@malloy-publisher/sdk 0.4.0 → 0.5.0
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 +19 -0
- package/dist/{DocumentStorageProvider-CyOJ0hqf.es.js → DocumentStorage-B04sZ5Ie.es.js} +2307 -2334
- package/dist/{DocumentStorageProvider-DGPQEd_l.cjs.js → DocumentStorage-B_MMJ0Ot.cjs.js} +20 -20
- package/dist/{RenderedResult-BnPzJ9Jf.es.js → RenderedResult-BB7eokcf.es.js} +100 -80
- package/dist/RenderedResult-DVuGhatg.cjs.js +135 -0
- package/dist/ServerProvider-D-jjzfE5.cjs.js +1 -0
- package/dist/{ServerProvider-BWOEKg0O.es.js → ServerProvider-Do-GBvpn.es.js} +492 -481
- package/dist/builder/index.cjs.js +57 -52
- package/dist/builder/index.es.js +4421 -3738
- package/dist/client/api.d.ts +14 -1
- package/dist/client/index.cjs.js +1 -1
- package/dist/client/index.es.js +1 -1
- package/dist/components/Dashboard/TileCard.d.ts +7 -3
- package/dist/components/Dashboard/telemetry.d.ts +20 -8
- package/dist/components/DashboardBuilder/DashboardBuilder.d.ts +16 -4
- package/dist/components/DashboardBuilder/DashboardEditor.d.ts +31 -8
- package/dist/components/DashboardBuilder/controls.d.ts +8 -6
- package/dist/components/DashboardBuilder/document.d.ts +19 -5
- package/dist/components/DashboardBuilder/malloyText.d.ts +0 -30
- package/dist/components/DashboardBuilder/malloyTree.d.ts +232 -0
- package/dist/components/DashboardBuilder/preview.d.ts +17 -0
- package/dist/components/DashboardBuilder/readDocument.d.ts +23 -28
- package/dist/components/DashboardBuilder/spliceDocument.d.ts +12 -0
- package/dist/components/DocumentStorage/DocumentStorage.d.ts +69 -5
- package/dist/components/DocumentStorage/index.d.ts +1 -0
- package/dist/index.cjs.js +9 -9
- package/dist/index.es.js +508 -506
- package/dist/theme/resolveTheme.d.ts +1 -1
- package/dist/theme/types.d.ts +12 -2
- package/package.json +1 -1
- package/src/components/Dashboard/TileCard.tsx +8 -4
- package/src/components/Dashboard/telemetry.ts +20 -8
- package/src/components/DashboardBuilder/BuilderToolbar.tsx +4 -5
- package/src/components/DashboardBuilder/DashboardBuilder.tsx +21 -3
- package/src/components/DashboardBuilder/DashboardEditor.authoritative.spec.tsx +706 -0
- package/src/components/DashboardBuilder/DashboardEditor.resourceUri.spec.tsx +356 -0
- package/src/components/DashboardBuilder/DashboardEditor.tsx +468 -103
- package/src/components/DashboardBuilder/FilterDialog.tsx +19 -6
- package/src/components/DashboardBuilder/TileFrame.tsx +11 -2
- package/src/components/DashboardBuilder/TileMenu.tsx +6 -0
- package/src/components/DashboardBuilder/__test__/inventory.ts +367 -0
- package/src/components/DashboardBuilder/controls.spec.ts +53 -3
- package/src/components/DashboardBuilder/controls.ts +9 -7
- package/src/components/DashboardBuilder/document.ts +17 -5
- package/src/components/DashboardBuilder/invariants.spec.ts +297 -0
- package/src/components/DashboardBuilder/malloyText.spec.ts +27 -66
- package/src/components/DashboardBuilder/malloyText.ts +4 -109
- package/src/components/DashboardBuilder/malloyTree.spec.ts +362 -0
- package/src/components/DashboardBuilder/malloyTree.ts +954 -0
- package/src/components/DashboardBuilder/preview.spec.ts +18 -0
- package/src/components/DashboardBuilder/preview.ts +24 -6
- package/src/components/DashboardBuilder/readDocument.spec.ts +312 -21
- package/src/components/DashboardBuilder/readDocument.ts +144 -165
- package/src/components/DashboardBuilder/scannerShapes.spec.ts +550 -0
- package/src/components/DashboardBuilder/spliceDocument.spec.ts +955 -21
- package/src/components/DashboardBuilder/spliceDocument.ts +509 -119
- package/src/components/DashboardBuilder/statementExtent.spec.ts +606 -0
- package/src/components/DocumentStorage/BrowserDocumentStorage.ts +7 -6
- package/src/components/DocumentStorage/DocumentStorage.ts +78 -5
- package/src/components/DocumentStorage/index.ts +1 -0
- package/src/components/Package/Package.tsx +12 -7
- package/src/components/RenderedResult/RenderedResult.tsx +21 -1
- package/src/components/given/GivensPanel.tsx +15 -3
- package/src/theme/buildTableCssVars.spec.ts +3 -0
- package/src/theme/buildTableCssVars.ts +6 -0
- package/src/theme/defaults.ts +16 -12
- package/src/theme/resolveTheme.spec.ts +14 -7
- package/src/theme/resolveTheme.ts +14 -8
- package/src/theme/types.ts +12 -2
- package/tsconfig.spec.json +5 -1
- package/dist/RenderedResult-Dp22kZsQ.cjs.js +0 -115
- package/dist/ServerProvider-Cc489A3f.cjs.js +0 -1
package/README.md
CHANGED
|
@@ -1006,7 +1006,16 @@ type DocumentType = "dashboard" | "notebook";
|
|
|
1006
1006
|
interface Workspace {
|
|
1007
1007
|
name: string;
|
|
1008
1008
|
writeable: boolean;
|
|
1009
|
+
/** What this place is, in the backend's own words. The editor shows it. */
|
|
1009
1010
|
description: string;
|
|
1011
|
+
/**
|
|
1012
|
+
* This workspace holds the package's system of record: the editor opens
|
|
1013
|
+
* what it keeps and writes back to it, and treats the package file as a
|
|
1014
|
+
* deploy of it. Left out, the package file is the record and this is a
|
|
1015
|
+
* place a copy is kept beside it, which is what every host got before the
|
|
1016
|
+
* flag existed. At most one workspace per storage sets it.
|
|
1017
|
+
*/
|
|
1018
|
+
authoritative?: boolean;
|
|
1010
1019
|
}
|
|
1011
1020
|
|
|
1012
1021
|
interface DocumentLocator {
|
|
@@ -1028,6 +1037,14 @@ interface DocumentStorage {
|
|
|
1028
1037
|
}
|
|
1029
1038
|
```
|
|
1030
1039
|
|
|
1040
|
+
`getDocument`, `deleteDocument` and `moveDocument` reject with `DocumentNotFoundError`
|
|
1041
|
+
when the document is not there, and with anything else when the backend could not be
|
|
1042
|
+
asked. The distinction is load-bearing rather than cosmetic: a failed read reported as
|
|
1043
|
+
"there is no document" reads as "the package is the only copy", and saving on that
|
|
1044
|
+
belief overwrites the copy that was actually there. Use `isDocumentNotFound(error)`
|
|
1045
|
+
rather than `instanceof`, since the `es` and `cjs` builds carry their own copy of the
|
|
1046
|
+
class.
|
|
1047
|
+
|
|
1031
1048
|
A document is a string; the `type` on its locator says what kind so a backend can keep kinds apart
|
|
1032
1049
|
and a listing can ask for one. Every method rejects when the document is not there, so a caller can
|
|
1033
1050
|
tell "missing" from "empty".
|
|
@@ -1471,6 +1488,8 @@ function EnvironmentList() {
|
|
|
1471
1488
|
| `createEmbeddedQueryResult` | Serialize query config |
|
|
1472
1489
|
| `BrowserDocumentStorage` | localStorage-based document storage |
|
|
1473
1490
|
| `globalQueryClient` | Shared React Query client |
|
|
1491
|
+
| `DocumentNotFoundError` | Absence, not a failed read |
|
|
1492
|
+
| `isDocumentNotFound` | Absence check across es/cjs builds |
|
|
1474
1493
|
|
|
1475
1494
|
### Exported Types
|
|
1476
1495
|
|