@malloy-publisher/sdk 0.0.198-dev → 0.0.198-dev1

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 (45) hide show
  1. package/dist/{ServerProvider-DDScRRDc.es.js → ServerProvider-BuM1usxf.es.js} +181 -177
  2. package/dist/{ServerProvider-IhQ4aYBm.cjs.js → ServerProvider-C_Mnvmgc.cjs.js} +1 -1
  3. package/dist/client/api.d.ts +61 -4
  4. package/dist/client/index.cjs.js +1 -1
  5. package/dist/client/index.es.js +1 -1
  6. package/dist/components/Package/ContentTypeIcon.d.ts +16 -0
  7. package/dist/components/Package/index.d.ts +0 -1
  8. package/dist/components/styles.d.ts +16 -0
  9. package/dist/{core-w79IMXAG.es.js → core-DfcpQGVP.es.js} +1 -1
  10. package/dist/{core-7-3Jcsb0.cjs.js → core-yDgxkpo0.cjs.js} +1 -1
  11. package/dist/index-CMA8U4-B.cjs.js +228 -0
  12. package/dist/{index-CN0_kZSF.es.js → index-Y4ooZDYA.es.js} +17654 -20603
  13. package/dist/index.cjs.js +1 -1
  14. package/dist/index.es.js +33 -34
  15. package/package.json +5 -5
  16. package/src/components/Environment/AddPackageDialog.tsx +116 -79
  17. package/src/components/Environment/DeletePackageDialog.tsx +3 -2
  18. package/src/components/Environment/Environment.tsx +44 -23
  19. package/src/components/Environment/Packages.tsx +164 -156
  20. package/src/components/Home/DeleteEnvironmentDialog.tsx +3 -2
  21. package/src/components/Home/Home.tsx +272 -389
  22. package/src/components/Model/Model.tsx +2 -2
  23. package/src/components/Model/ModelCell.tsx +1 -1
  24. package/src/components/Model/ModelExplorerDialog.tsx +1 -1
  25. package/src/components/Model/SourcesExplorer.tsx +4 -4
  26. package/src/components/Notebook/Notebook.tsx +4 -9
  27. package/src/components/Notebook/NotebookCell.tsx +10 -7
  28. package/src/components/Package/ContentTypeIcon.tsx +79 -0
  29. package/src/components/Package/Package.tsx +387 -55
  30. package/src/components/Package/index.ts +0 -1
  31. package/src/components/QueryResult/QueryResult.tsx +1 -1
  32. package/src/components/RenderedResult/RenderedResult.tsx +9 -8
  33. package/src/components/ResultsDialog.tsx +1 -1
  34. package/src/components/styles.ts +28 -15
  35. package/dist/components/Package/Config.d.ts +0 -5
  36. package/dist/components/Package/Databases.d.ts +0 -5
  37. package/dist/components/Package/FileTreeView.d.ts +0 -9
  38. package/dist/components/Package/Models.d.ts +0 -6
  39. package/dist/components/Package/Notebooks.d.ts +0 -6
  40. package/dist/index-Xo_ADux9.cjs.js +0 -233
  41. package/src/components/Package/Config.tsx +0 -97
  42. package/src/components/Package/Databases.tsx +0 -228
  43. package/src/components/Package/FileTreeView.tsx +0 -241
  44. package/src/components/Package/Models.tsx +0 -68
  45. package/src/components/Package/Notebooks.tsx +0 -77
@@ -114,7 +114,7 @@ export default function Model({
114
114
  <LinkOutlinedIcon
115
115
  sx={{
116
116
  fontSize: "24px",
117
- color: "#666666",
117
+ color: "text.secondary",
118
118
  cursor: "pointer",
119
119
  }}
120
120
  onClick={copyToClipboard}
@@ -150,7 +150,7 @@ export default function Model({
150
150
  <SearchIcon
151
151
  sx={{
152
152
  fontSize: "18px",
153
- color: "#666666",
153
+ color: "text.secondary",
154
154
  marginBottom: "5px",
155
155
  }}
156
156
  />
@@ -123,7 +123,7 @@ export function ModelCell({
123
123
  }}
124
124
  onClick={() => setResultsDialogOpen(true)}
125
125
  >
126
- <SearchIcon sx={{ fontSize: "18px", color: "#666666" }} />
126
+ <SearchIcon sx={{ fontSize: "18px", color: "text.secondary" }} />
127
127
  </IconButton>
128
128
  </Box>
129
129
 
@@ -40,7 +40,7 @@ export function ModelExplorerDialog({
40
40
  }}
41
41
  >
42
42
  {title}
43
- <IconButton onClick={onClose} sx={{ color: "#666666" }}>
43
+ <IconButton onClick={onClose} sx={{ color: "text.secondary" }}>
44
44
  <CloseIcon />
45
45
  </IconButton>
46
46
  </DialogTitle>
@@ -348,16 +348,16 @@ export function SourceExplorerComponent(props: SourceExplorerComponentProps) {
348
348
  return (
349
349
  <StyledExplorerPage>
350
350
  <StyledExplorerContent>
351
- <div
352
- style={{
351
+ <Box
352
+ sx={{
353
353
  alignItems: "center",
354
354
  justifyContent: "center",
355
355
  height: "200px",
356
- color: "#666",
356
+ color: "text.secondary",
357
357
  }}
358
358
  >
359
359
  Loading explorer...
360
- </div>
360
+ </Box>
361
361
  </StyledExplorerContent>
362
362
  </StyledExplorerPage>
363
363
  );
@@ -453,14 +453,9 @@ export default function Notebook({
453
453
  elevation={0}
454
454
  sx={{
455
455
  p: 3,
456
- backgroundColor: "#ffffff",
457
- border: "1px solid #f0f0f0",
458
- borderRadius: 2,
459
- boxShadow: "0 1px 3px rgba(0, 0, 0, 0.04)",
460
- transition: "box-shadow 0.2s ease-in-out",
461
- "&:hover": {
462
- boxShadow: "0 2px 6px rgba(0, 0, 0, 0.08)",
463
- },
456
+ backgroundColor: "transparent",
457
+ border: "none",
458
+ boxShadow: "none",
464
459
  }}
465
460
  >
466
461
  <Typography
@@ -532,7 +527,7 @@ export default function Notebook({
532
527
 
533
528
  {/* Error States */}
534
529
  {isError && error.status === 404 && (
535
- <Typography variant="body2" sx={{ color: "#666666" }}>
530
+ <Typography variant="body2" sx={{ color: "text.secondary" }}>
536
531
  <code>{`${environmentName} > ${packageName} > ${notebookPath}`}</code>{" "}
537
532
  not found.
538
533
  </Typography>
@@ -193,7 +193,7 @@ export function NotebookCell({
193
193
  <LinkOutlinedIcon
194
194
  sx={{
195
195
  fontSize: "24px",
196
- color: "#666666",
196
+ color: "text.secondary",
197
197
  cursor: "pointer",
198
198
  marginTop: "26px",
199
199
  }}
@@ -270,7 +270,10 @@ export function NotebookCell({
270
270
  onClick={() => setSourcesDialogOpen(true)}
271
271
  >
272
272
  <SearchIcon
273
- sx={{ fontSize: "18px", color: "#666666" }}
273
+ sx={{
274
+ fontSize: "18px",
275
+ color: "text.secondary",
276
+ }}
274
277
  />
275
278
  </IconButton>
276
279
  )}
@@ -308,7 +311,7 @@ export function NotebookCell({
308
311
  Malloy Code
309
312
  <IconButton
310
313
  onClick={() => setCodeDialogOpen(false)}
311
- sx={{ color: "#666666" }}
314
+ sx={{ color: "text.secondary" }}
312
315
  >
313
316
  <CloseIcon />
314
317
  </IconButton>
@@ -357,7 +360,7 @@ export function NotebookCell({
357
360
  Embeddable Code
358
361
  <IconButton
359
362
  onClick={() => setEmbeddingDialogOpen(false)}
360
- sx={{ color: "#666666" }}
363
+ sx={{ color: "text.secondary" }}
361
364
  >
362
365
  <CloseIcon />
363
366
  </IconButton>
@@ -388,7 +391,7 @@ export function NotebookCell({
388
391
  width: "24px",
389
392
  height: "24px",
390
393
  marginLeft: "8px",
391
- color: "#666666",
394
+ color: "text.secondary",
392
395
  }}
393
396
  onClick={() => {
394
397
  navigator.clipboard.writeText(
@@ -474,7 +477,7 @@ export function NotebookCell({
474
477
  }}
475
478
  >
476
479
  <CodeIcon
477
- sx={{ fontSize: "18px", color: "#666666" }}
480
+ sx={{ fontSize: "18px", color: "text.secondary" }}
478
481
  />
479
482
  </IconButton>
480
483
  )}
@@ -490,7 +493,7 @@ export function NotebookCell({
490
493
  onClick={() => setResultsDialogOpen(true)}
491
494
  >
492
495
  <SearchIcon
493
- sx={{ fontSize: "18px", color: "#666666" }}
496
+ sx={{ fontSize: "18px", color: "text.secondary" }}
494
497
  />
495
498
  </IconButton>
496
499
  </Stack>
@@ -0,0 +1,79 @@
1
+ import SvgIcon, { SvgIconProps } from "@mui/material/SvgIcon";
2
+
3
+ type ContentType = "report" | "model" | "data";
4
+
5
+ interface ContentTypeIconProps extends Omit<SvgIconProps, "fontSize"> {
6
+ type: ContentType;
7
+ /** Pixel size of the rendered icon. */
8
+ size?: number;
9
+ }
10
+
11
+ /**
12
+ * Inline SVGs that visually match Central Icons'
13
+ * round-outlined-radius-2-stroke-1 family
14
+ * (IconFileChart, Icon3dBoxTop, IconTable) used by the Credible app.
15
+ * Reimplemented as plain SVG so the open-source SDK does not pick up
16
+ * the paid @central-icons-react dependency.
17
+ */
18
+ export default function ContentTypeIcon({
19
+ type,
20
+ size = 18,
21
+ sx,
22
+ ...rest
23
+ }: ContentTypeIconProps) {
24
+ return (
25
+ <SvgIcon
26
+ {...rest}
27
+ viewBox="0 0 24 24"
28
+ sx={{
29
+ width: size,
30
+ height: size,
31
+ fill: "none",
32
+ stroke: "currentColor",
33
+ strokeWidth: 1.5,
34
+ strokeLinecap: "round",
35
+ strokeLinejoin: "round",
36
+ ...sx,
37
+ }}
38
+ >
39
+ {type === "report" && <FileChartPath />}
40
+ {type === "model" && <BoxTopPath />}
41
+ {type === "data" && <TablePath />}
42
+ </SvgIcon>
43
+ );
44
+ }
45
+
46
+ /** File outline with a folded top-right corner and three chart bars inside. */
47
+ function FileChartPath() {
48
+ return (
49
+ <>
50
+ <path d="M14 3 H6 a2 2 0 0 0 -2 2 v14 a2 2 0 0 0 2 2 h12 a2 2 0 0 0 2 -2 V9 z" />
51
+ <path d="M14 3 v4 a2 2 0 0 0 2 2 h4" />
52
+ <path d="M8 17 v-3" />
53
+ <path d="M12 17 v-6" />
54
+ <path d="M16 17 v-4" />
55
+ </>
56
+ );
57
+ }
58
+
59
+ /** Cube viewed from above with visible top face — matches Icon3dBoxTop. */
60
+ function BoxTopPath() {
61
+ return (
62
+ <>
63
+ <path d="M12 3 L4 7 v10 l8 4 l8 -4 V7 z" />
64
+ <path d="M4 7 l8 4 l8 -4" />
65
+ <path d="M12 11 v10" />
66
+ </>
67
+ );
68
+ }
69
+
70
+ /** Rounded grid icon — matches IconTable. */
71
+ function TablePath() {
72
+ return (
73
+ <>
74
+ <rect x="3.5" y="3.5" width="17" height="17" rx="2" />
75
+ <path d="M3.5 9.5 H20.5" />
76
+ <path d="M9.5 3.5 V20.5" />
77
+ </>
78
+ );
79
+ }