@malloy-publisher/sdk 0.0.51 → 0.0.53

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@malloy-publisher/sdk",
3
3
  "description": "Malloy Publisher SDK",
4
- "version": "0.0.51",
4
+ "version": "0.0.53",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.es.js",
@@ -1,22 +1,21 @@
1
- import React from "react";
1
+ import AnalyticsOutlinedIcon from "@mui/icons-material/AnalyticsOutlined";
2
+ import ContentCopyIcon from "@mui/icons-material/ContentCopy";
3
+ import LinkOutlinedIcon from "@mui/icons-material/LinkOutlined";
2
4
  import {
3
- styled,
4
- Collapse,
5
- CardActions,
6
5
  Card,
6
+ CardActions,
7
7
  CardContent,
8
+ Collapse,
8
9
  Divider,
10
+ IconButton,
9
11
  Stack,
10
- Typography,
12
+ styled,
11
13
  Tooltip,
12
- IconButton,
14
+ Typography,
13
15
  } from "@mui/material";
14
- import { QueryResult } from "../QueryResult";
15
- import AnalyticsOutlinedIcon from "@mui/icons-material/AnalyticsOutlined";
16
- import LinkOutlinedIcon from "@mui/icons-material/LinkOutlined";
17
- import ContentCopyIcon from "@mui/icons-material/ContentCopy";
18
- import { useEffect } from "react";
16
+ import React, { useEffect } from "react";
19
17
  import { highlight } from "../highlighter";
18
+ import { QueryResult } from "../QueryResult";
20
19
 
21
20
  const StyledCard = styled(Card)({
22
21
  display: "flex",
@@ -170,7 +169,7 @@ export function ModelCell({
170
169
  </Stack>
171
170
  </Collapse>
172
171
  <Collapse in={resultsExpanded} timeout="auto" unmountOnExit>
173
- <Divider sx={{ mb: "10px" }} />
172
+ <Divider sx={{ mb: "4px" }} />
174
173
  {highlightedAnnotations && (
175
174
  <>
176
175
  <Stack
@@ -195,7 +194,7 @@ export function ModelCell({
195
194
  />
196
195
  </Typography>
197
196
  </Stack>
198
- <Divider sx={{ mb: "10px" }} />
197
+ <Divider sx={{ mb: "4px" }} />
199
198
  </>
200
199
  )}
201
200
  <CardContent>
@@ -20,8 +20,8 @@ import {
20
20
  import { styled } from "@mui/material/styles";
21
21
  import React from "react";
22
22
  import { Configuration, QueryresultsApi } from "../../client";
23
- import { usePackage } from "../Package/PackageProvider";
24
23
  import { useMutationWithApiError } from "../../hooks/useQueryWithApiError";
24
+ import { usePackage } from "../Package/PackageProvider";
25
25
 
26
26
  const queryResultsApi = new QueryresultsApi(new Configuration());
27
27
 
@@ -63,7 +63,8 @@ export interface SourceExplorerProps {
63
63
  sourceAndPaths: SourceAndPath[];
64
64
  existingQuery?: QueryExplorerResult;
65
65
  existingSourceName?: string;
66
- onChange?: (query: QueryExplorerResult) => void;
66
+ onQueryChange?: (query: QueryExplorerResult) => void;
67
+ onSourceChange?: (index: number) => void;
67
68
  }
68
69
 
69
70
  /**
@@ -77,13 +78,14 @@ export function SourcesExplorer({
77
78
  sourceAndPaths,
78
79
  existingQuery,
79
80
  existingSourceName,
80
- onChange,
81
+ onQueryChange,
82
+ onSourceChange,
81
83
  }: SourceExplorerProps) {
82
84
  const [selectedTab, setSelectedTab] = React.useState(
83
85
  existingSourceName
84
86
  ? sourceAndPaths.findIndex(
85
- (entry) => entry.sourceInfo.name === existingSourceName,
86
- )
87
+ (entry) => entry.sourceInfo.name === existingSourceName,
88
+ )
87
89
  : 0,
88
90
  );
89
91
 
@@ -91,6 +93,13 @@ export function SourcesExplorer({
91
93
  existingQuery || emptyQueryExplorerResult(),
92
94
  );
93
95
 
96
+ // Notify parent component when selected source changes
97
+ React.useEffect(() => {
98
+ if (onSourceChange) {
99
+ onSourceChange(selectedTab);
100
+ }
101
+ }, [selectedTab, onSourceChange]);
102
+
94
103
  return (
95
104
  <StyledCard variant="outlined">
96
105
  <StyledCardContent>
@@ -123,8 +132,8 @@ export function SourcesExplorer({
123
132
  existingQuery={query}
124
133
  onChange={(query) => {
125
134
  setQuery(query);
126
- if (onChange) {
127
- onChange(query);
135
+ if (onQueryChange) {
136
+ onQueryChange(query);
128
137
  }
129
138
  }}
130
139
  />
@@ -292,16 +301,16 @@ export function SourceExplorerComponent({
292
301
  submittedQuery={
293
302
  query?.malloyQuery
294
303
  ? {
295
- executionState: mutation.isPending
296
- ? "running"
297
- : "finished",
298
- response: {
299
- result: query.malloyResult,
300
- },
301
- query: query.malloyQuery,
302
- queryResolutionStartMillis: Date.now(),
303
- onCancel: mutation.reset,
304
- }
304
+ executionState: mutation.isPending
305
+ ? "running"
306
+ : "finished",
307
+ response: {
308
+ result: query.malloyResult,
309
+ },
310
+ query: query.malloyQuery,
311
+ queryResolutionStartMillis: Date.now(),
312
+ onCancel: mutation.reset,
313
+ }
305
314
  : undefined
306
315
  }
307
316
  options={{ showRawQuery: true }}
@@ -5,25 +5,30 @@ import { NotebookCellValue } from "../NotebookManager";
5
5
  interface EditableMalloyCellProps {
6
6
  cell: NotebookCellValue;
7
7
  sourceAndPaths: SourceAndPath[];
8
- onChange: (query: QueryExplorerResult) => void;
8
+ onQueryChange: (query: QueryExplorerResult) => void;
9
+ onSourceChange?: (index: number) => void;
9
10
  }
10
11
 
11
12
  export function EditableMalloyCell({
12
13
  cell,
13
14
  sourceAndPaths,
14
- onChange,
15
+ onQueryChange,
16
+ onSourceChange,
15
17
  }: EditableMalloyCellProps) {
16
18
  const query = {
17
19
  query: cell.value,
18
20
  malloyResult: cell.result ? JSON.parse(cell.result) : undefined,
19
21
  malloyQuery: cell.queryInfo ? JSON.parse(cell.queryInfo) : undefined,
22
+ sourceName: cell.sourceName,
23
+ modelPath: cell.modelPath,
20
24
  };
21
25
  return (
22
26
  <SourcesExplorer
23
27
  sourceAndPaths={sourceAndPaths}
24
28
  existingQuery={query}
25
29
  existingSourceName={cell.sourceName}
26
- onChange={onChange}
30
+ onQueryChange={onQueryChange}
31
+ onSourceChange={onSourceChange}
27
32
  />
28
33
  );
29
34
  }
@@ -69,6 +69,13 @@ export function MutableCell({
69
69
  emptyQueryExplorerResult(),
70
70
  );
71
71
  const [isHovered, setIsHovered] = React.useState<boolean>(false);
72
+ const [selectedSourceIndex, setSelectedSourceIndex] = React.useState<number>(
73
+ cell.sourceName
74
+ ? sourceAndPaths.findIndex(
75
+ (entry) => entry.sourceInfo.name === cell.sourceName,
76
+ )
77
+ : 0,
78
+ );
72
79
 
73
80
  useEffect(() => {
74
81
  if (!cell.isMarkdown)
@@ -91,7 +98,13 @@ export function MutableCell({
91
98
  };
92
99
  const noSources = sourceAndPaths.length === 0;
93
100
 
94
- const saveResult = (modelPath: string, sourceName: string) => {
101
+ const saveResult = () => {
102
+ // Get the current modelPath and sourceName from the selected source
103
+ const currentSource = sourceAndPaths[selectedSourceIndex];
104
+ const modelPath = currentSource?.modelPath || cell.modelPath || "";
105
+ const sourceName =
106
+ currentSource?.sourceInfo.name || cell.sourceName || "";
107
+
95
108
  // Convert the results of the Query Explorer into
96
109
  // the stringified JSON objects that are stored in the cell.
97
110
  onCellChange({
@@ -197,7 +210,7 @@ export function MutableCell({
197
210
  <IconButton
198
211
  size="small"
199
212
  onClick={() => {
200
- saveResult(cell.modelPath, cell.sourceName);
213
+ saveResult();
201
214
  onClose();
202
215
  }}
203
216
  >
@@ -229,7 +242,7 @@ export function MutableCell({
229
242
  <IconButton
230
243
  size="small"
231
244
  onClick={() => {
232
- saveResult(cell.modelPath, cell.sourceName);
245
+ saveResult();
233
246
  onClose();
234
247
  }}
235
248
  >
@@ -295,7 +308,7 @@ export function MutableCell({
295
308
  updateMarkdown(newValue);
296
309
  }}
297
310
  onBlur={() => {
298
- saveResult(cell.modelPath, cell.sourceName);
311
+ saveResult();
299
312
  if (!isHovered) {
300
313
  onClose();
301
314
  }
@@ -415,10 +428,11 @@ export function MutableCell({
415
428
  ) : (
416
429
  <EditableMalloyCell
417
430
  sourceAndPaths={sourceAndPaths}
418
- onChange={(query) => {
431
+ onQueryChange={(query) => {
419
432
  setQuery(query);
420
433
  }}
421
434
  cell={cell}
435
+ onSourceChange={setSelectedSourceIndex}
422
436
  />
423
437
  ))}
424
438
  {!editingMalloy && cell.result && (
@@ -131,51 +131,51 @@ export default function MutableNotebook({
131
131
  if (!notebookData) {
132
132
  return;
133
133
  }
134
- const modelPathToSourceInfo = new Map(
135
- sourceAndPaths.map(({ modelPath, sourceInfos }) => [
136
- modelPath,
137
- sourceInfos,
138
- ]),
139
- );
140
- const newSourceAndPaths = [];
141
- const promises = [];
142
- for (const model of notebookData.getModels()) {
143
- if (!modelPathToSourceInfo.has(model)) {
144
- console.log("Fetching model from Publisher", model);
145
- promises.push(
146
- modelsApi
147
- .getModel(projectName, packageName, model, versionId, {
148
- baseURL: server,
149
- withCredentials: !accessToken,
150
- })
151
- .then((data) => ({
152
- modelPath: model,
153
- sourceInfos: data.data.sourceInfos.map((source) =>
154
- JSON.parse(source),
155
- ),
156
- })),
157
- );
158
- } else {
159
- newSourceAndPaths.push({
160
- modelPath: model,
161
- sourceInfos: modelPathToSourceInfo.get(model),
162
- });
134
+
135
+ const fetchModels = async () => {
136
+ const modelPathToSourceInfo = new Map(
137
+ sourceAndPaths.map(({ modelPath, sourceInfos }) => [
138
+ modelPath,
139
+ sourceInfos,
140
+ ]),
141
+ );
142
+ const newSourceAndPaths = [];
143
+ const promises = [];
144
+
145
+ for (const model of notebookData.getModels()) {
146
+ if (!modelPathToSourceInfo.has(model)) {
147
+ console.log("Fetching model from Publisher", model);
148
+ promises.push(
149
+ modelsApi
150
+ .getModel(projectName, packageName, model, versionId, {
151
+ baseURL: server,
152
+ withCredentials: !accessToken,
153
+ })
154
+ .then((data) => ({
155
+ modelPath: model,
156
+ sourceInfos: data.data.sourceInfos.map((source) =>
157
+ JSON.parse(source),
158
+ ),
159
+ })),
160
+ );
161
+ } else {
162
+ newSourceAndPaths.push({
163
+ modelPath: model,
164
+ sourceInfos: modelPathToSourceInfo.get(model),
165
+ });
166
+ }
163
167
  }
164
- }
165
- if (promises.length > 0) {
166
- Promise.all(promises).then((loadedSourceAndPaths) => {
168
+
169
+ if (promises.length > 0) {
170
+ const loadedSourceAndPaths = await Promise.all(promises);
167
171
  setSourceAndPaths([...newSourceAndPaths, ...loadedSourceAndPaths]);
168
- });
169
- }
170
- }, [
171
- accessToken,
172
- notebookData,
173
- packageName,
174
- projectName,
175
- server,
176
- sourceAndPaths,
177
- versionId,
178
- ]);
172
+ } else {
173
+ setSourceAndPaths(newSourceAndPaths);
174
+ }
175
+ };
176
+
177
+ fetchModels();
178
+ }, [accessToken, notebookData, packageName, projectName, server, versionId]);
179
179
 
180
180
  React.useEffect(() => {
181
181
  if (!notebookPath) {
@@ -1,25 +1,23 @@
1
+ import "@malloydata/malloy-explorer/styles.css";
1
2
  import ContentCopyIcon from "@mui/icons-material/ContentCopy";
2
3
  import LinkOutlinedIcon from "@mui/icons-material/LinkOutlined";
3
4
  import {
4
- Box,
5
5
  CardActions,
6
6
  Collapse,
7
- Divider,
8
7
  IconButton,
9
8
  Stack,
10
9
  Tooltip,
11
10
  Typography,
12
11
  } from "@mui/material";
13
12
  import React, { useEffect } from "react";
14
- import { Configuration, NotebooksApi, CompiledNotebook } from "../../client";
13
+ import { CompiledNotebook, Configuration, NotebooksApi } from "../../client";
14
+ import { useQueryWithApiError } from "../../hooks/useQueryWithApiError";
15
+ import { ApiErrorDisplay } from "../ApiErrorDisplay";
15
16
  import { highlight } from "../highlighter";
17
+ import { Loading } from "../Loading";
18
+ import { usePackage } from "../Package/PackageProvider";
16
19
  import { StyledCard, StyledCardContent, StyledCardMedia } from "../styles";
17
20
  import { NotebookCell } from "./NotebookCell";
18
- import { ApiErrorDisplay } from "../ApiErrorDisplay";
19
- import { useQueryWithApiError } from "../../hooks/useQueryWithApiError";
20
- import "@malloydata/malloy-explorer/styles.css";
21
- import { usePackage } from "../Package/PackageProvider";
22
- import { Loading } from "../Loading";
23
21
 
24
22
  const notebooksApi = new NotebooksApi(new Configuration());
25
23
 
@@ -112,10 +110,8 @@ export default function Notebook({
112
110
  )}
113
111
  </Stack>
114
112
  <Collapse in={embeddingExpanded} timeout="auto" unmountOnExit>
115
- <Divider />
116
113
  <Stack
117
114
  sx={{
118
- p: "10px",
119
115
  borderRadius: 0,
120
116
  flexDirection: "row",
121
117
  justifyContent: "space-between",
@@ -145,10 +141,9 @@ export default function Notebook({
145
141
  </Tooltip>
146
142
  </Stack>
147
143
  </Collapse>
148
- <Divider />
149
144
  </StyledCardContent>
150
145
  <StyledCardMedia>
151
- <Stack spacing={1} component="section">
146
+ <Stack spacing={2} component="section">
152
147
  {!isSuccess && !isError && (
153
148
  <Loading text="Fetching Notebook..." />
154
149
  )}
@@ -69,7 +69,7 @@ export function NotebookCell({
69
69
 
70
70
  return (
71
71
  (cell.type === "markdown" && (
72
- <StyledCard variant="outlined" sx={{ border: 0 }}>
72
+ <StyledCard variant="outlined">
73
73
  <StyledCardContent>
74
74
  <Markdown>{cell.text}</Markdown>
75
75
  </StyledCardContent>
@@ -86,7 +86,7 @@ export function NotebookCell({
86
86
  >
87
87
  <CardActions
88
88
  sx={{
89
- padding: "0px 10px 0px 10px",
89
+ padding: "0px 8px 0px 8px",
90
90
  mb: "auto",
91
91
  mt: "auto",
92
92
  }}
@@ -154,7 +154,7 @@ export function NotebookCell({
154
154
  <Collapse in={embeddingExpanded} timeout="auto" unmountOnExit>
155
155
  <Stack
156
156
  sx={{
157
- p: "10px",
157
+ p: "8px",
158
158
  borderRadius: 0,
159
159
  flexDirection: "row",
160
160
  justifyContent: "space-between",
@@ -188,8 +188,7 @@ export function NotebookCell({
188
188
  <style>{codeStyle}</style>
189
189
  <Stack
190
190
  sx={{
191
- mx: "15px",
192
- mb: "10px",
191
+ mx: "8px",
193
192
  borderRadius: 0,
194
193
  flexDirection: "row",
195
194
  justifyContent: "space-between",
@@ -8,11 +8,11 @@ import {
8
8
  Typography,
9
9
  } from "@mui/material";
10
10
  import { Configuration, PackagesApi } from "../../client";
11
+ import { useQueryWithApiError } from "../../hooks/useQueryWithApiError";
11
12
  import { ApiErrorDisplay } from "../ApiErrorDisplay";
12
13
  import { Loading } from "../Loading";
13
14
  import { StyledCard, StyledCardContent } from "../styles";
14
15
  import { usePackage } from "./PackageProvider";
15
- import { useQueryWithApiError } from "../../hooks/useQueryWithApiError";
16
16
 
17
17
  const packagesApi = new PackagesApi(new Configuration());
18
18
 
@@ -32,7 +32,7 @@ export default function Config() {
32
32
  });
33
33
 
34
34
  return (
35
- <StyledCard variant="outlined" sx={{ padding: "10px", width: "100%" }}>
35
+ <StyledCard variant="outlined" sx={{ width: "100%" }}>
36
36
  <StyledCardContent>
37
37
  <Typography variant="overline" fontWeight="bold">
38
38
  Package Config
@@ -40,14 +40,17 @@ export default function Config() {
40
40
  <Divider />
41
41
  <Box
42
42
  sx={{
43
- mt: "10px",
44
43
  maxHeight: "200px",
45
44
  overflowY: "auto",
46
45
  }}
47
46
  >
48
47
  <List dense={true} disablePadding={true}>
49
48
  <ListItem dense={true} disablePadding={true}>
50
- <ListItemText primary="Name" secondary={packageName} />
49
+ <ListItemText
50
+ primary="Name"
51
+ primaryTypographyProps={{ fontWeight: "500" }}
52
+ secondary={packageName}
53
+ />
51
54
  </ListItem>
52
55
  {!isSuccess && !isError && (
53
56
  <ListItem>
@@ -59,24 +62,27 @@ export default function Config() {
59
62
  <ListItem dense={true} disablePadding={true}>
60
63
  <ListItemText
61
64
  primary="Description"
65
+ primaryTypographyProps={{
66
+ fontWeight: "500",
67
+ }}
62
68
  secondary={data.data.description}
63
69
  />
64
70
  </ListItem>
65
71
  )) || (
66
- <ListItem
67
- disablePadding={true}
68
- dense={true}
69
- sx={{ mt: "20px" }}
70
- >
71
- <ErrorIcon
72
- sx={{
73
- color: "grey.600",
74
- mr: "10px",
75
- }}
76
- />
77
- <ListItemText primary={"No package manifest"} />
78
- </ListItem>
79
- ))}
72
+ <ListItem
73
+ disablePadding={true}
74
+ dense={true}
75
+ sx={{ mt: "20px" }}
76
+ >
77
+ <ErrorIcon
78
+ sx={{
79
+ color: "grey.600",
80
+ mr: "10px",
81
+ }}
82
+ />
83
+ <ListItemText primary={"No package manifest"} />
84
+ </ListItem>
85
+ ))}
80
86
  {isError && (
81
87
  <ApiErrorDisplay
82
88
  error={error}
@@ -9,10 +9,10 @@ import {
9
9
  } from "@mui/material";
10
10
  import { Configuration, ConnectionsApi } from "../../client";
11
11
  import { Connection as ApiConnection } from "../../client/api";
12
+ import { useQueryWithApiError } from "../../hooks/useQueryWithApiError";
13
+ import { ApiErrorDisplay } from "../ApiErrorDisplay";
12
14
  import { StyledCard, StyledCardContent } from "../styles";
13
15
  import { usePackage } from "./PackageProvider";
14
- import { ApiErrorDisplay } from "../ApiErrorDisplay";
15
- import { useQueryWithApiError } from "../../hooks/useQueryWithApiError";
16
16
 
17
17
  const connectionsApi = new ConnectionsApi(new Configuration());
18
18
 
@@ -39,7 +39,7 @@ export default function Connections() {
39
39
  });
40
40
 
41
41
  return (
42
- <StyledCard variant="outlined" sx={{ padding: "10px", width: "100%" }}>
42
+ <StyledCard variant="outlined" sx={{ width: "100%" }}>
43
43
  <StyledCardContent>
44
44
  <Typography variant="overline" fontWeight="bold">
45
45
  Database Connections
@@ -47,13 +47,12 @@ export default function Connections() {
47
47
  <Divider />
48
48
  <Box
49
49
  sx={{
50
- mt: "10px",
51
50
  maxHeight: "200px",
52
51
  overflowY: "auto",
53
52
  }}
54
53
  >
55
54
  {!isSuccess && !isError && (
56
- <Typography variant="body2" sx={{ p: "20px", m: "auto" }}>
55
+ <Typography variant="body2" sx={{ m: "auto" }}>
57
56
  Fetching Connections...
58
57
  </Typography>
59
58
  )}
@@ -14,11 +14,11 @@ import {
14
14
  } from "@mui/material";
15
15
  import React from "react";
16
16
  import { Configuration, Database, DatabasesApi } from "../../client";
17
- import { StyledCard, StyledCardContent } from "../styles";
18
- import { usePackage } from "./PackageProvider";
17
+ import { useQueryWithApiError } from "../../hooks/useQueryWithApiError";
19
18
  import { ApiErrorDisplay } from "../ApiErrorDisplay";
20
19
  import { Loading } from "../Loading";
21
- import { useQueryWithApiError } from "../../hooks/useQueryWithApiError";
20
+ import { StyledCard, StyledCardContent } from "../styles";
21
+ import { usePackage } from "./PackageProvider";
22
22
 
23
23
  const databasesApi = new DatabasesApi(new Configuration());
24
24
 
@@ -62,15 +62,14 @@ export default function Databases() {
62
62
  };
63
63
  return (
64
64
  <>
65
- <StyledCard variant="outlined" sx={{ padding: "10px", width: "100%" }}>
65
+ <StyledCard variant="outlined" sx={{ width: "100%" }}>
66
66
  <StyledCardContent>
67
67
  <Typography variant="overline" fontWeight="bold">
68
- Databases
68
+ Embedded Databases
69
69
  </Typography>
70
70
  <Divider />
71
71
  <Box
72
72
  sx={{
73
- mt: "10px",
74
73
  maxHeight: "200px",
75
74
  overflowY: "auto",
76
75
  }}
@@ -111,7 +110,7 @@ export default function Databases() {
111
110
  </Table>
112
111
  )}
113
112
  {isSuccess && data.data.length === 0 && (
114
- <Typography variant="body2" sx={{ p: "10px", m: "auto" }}>
113
+ <Typography variant="body2" sx={{ m: "auto" }}>
115
114
  No databases found
116
115
  </Typography>
117
116
  )}
@@ -1,11 +1,11 @@
1
1
  import { Box, Divider, Typography } from "@mui/material";
2
2
  import { Configuration, ModelsApi } from "../../client";
3
+ import { useQueryWithApiError } from "../../hooks/useQueryWithApiError";
3
4
  import { ApiErrorDisplay } from "../ApiErrorDisplay";
4
5
  import { Loading } from "../Loading";
5
6
  import { StyledCard, StyledCardContent } from "../styles";
6
7
  import { FileTreeView } from "./FileTreeView";
7
8
  import { usePackage } from "./PackageProvider";
8
- import { useQueryWithApiError } from "../../hooks/useQueryWithApiError";
9
9
 
10
10
  const modelsApi = new ModelsApi(new Configuration());
11
11
 
@@ -24,7 +24,7 @@ export default function Models({ navigate }: ModelsProps) {
24
24
  });
25
25
 
26
26
  return (
27
- <StyledCard variant="outlined" sx={{ padding: "10px", width: "100%" }}>
27
+ <StyledCard variant="outlined" sx={{ width: "100%" }}>
28
28
  <StyledCardContent>
29
29
  <Typography variant="overline" fontWeight="bold">
30
30
  Semantic Models
@@ -32,7 +32,6 @@ export default function Models({ navigate }: ModelsProps) {
32
32
  <Divider />
33
33
  <Box
34
34
  sx={{
35
- mt: "10px",
36
35
  maxHeight: "200px",
37
36
  overflowY: "auto",
38
37
  }}
@@ -1,11 +1,11 @@
1
1
  import { Box, Divider, Typography } from "@mui/material";
2
2
  import { Configuration, NotebooksApi } from "../../client";
3
+ import { useQueryWithApiError } from "../../hooks/useQueryWithApiError";
3
4
  import { ApiErrorDisplay } from "../ApiErrorDisplay";
4
5
  import { Loading } from "../Loading";
5
6
  import { StyledCard, StyledCardContent } from "../styles";
6
7
  import { FileTreeView } from "./FileTreeView";
7
8
  import { usePackage } from "./PackageProvider";
8
- import { useQueryWithApiError } from "../../hooks/useQueryWithApiError";
9
9
 
10
10
  const notebooksApi = new NotebooksApi(new Configuration());
11
11
 
@@ -30,7 +30,7 @@ export default function Notebooks({ navigate }: NotebooksProps) {
30
30
  });
31
31
 
32
32
  return (
33
- <StyledCard variant="outlined" sx={{ padding: "10px", width: "100%" }}>
33
+ <StyledCard variant="outlined" sx={{ width: "100%" }}>
34
34
  <StyledCardContent>
35
35
  <Typography variant="overline" fontWeight="bold">
36
36
  Notebooks
@@ -38,7 +38,6 @@ export default function Notebooks({ navigate }: NotebooksProps) {
38
38
  <Divider />
39
39
  <Box
40
40
  sx={{
41
- mt: "10px",
42
41
  maxHeight: "200px",
43
42
  overflowY: "auto",
44
43
  }}