@malloy-publisher/sdk 0.0.54 → 0.0.55

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.54",
4
+ "version": "0.0.55",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.es.js",
@@ -81,74 +81,89 @@ export function NotebookCell({
81
81
  <Stack
82
82
  sx={{
83
83
  flexDirection: "row",
84
- justifyContent: "right",
84
+ justifyContent: "space-between",
85
+ ml: "8px",
85
86
  }}
86
87
  >
87
- <CardActions
88
- sx={{
89
- padding: "0px 8px 0px 8px",
90
- mb: "auto",
91
- mt: "auto",
92
- }}
93
- >
88
+ <Stack sx={{ flexDirection: "row" }}>
94
89
  {cell.newSources && cell.newSources.length > 0 && (
95
- <Tooltip title="Explore Data Sources">
96
- <IconButton
97
- size="small"
98
- onClick={() => {
99
- setSourcesExpanded(!sourcesExpanded);
100
- setEmbeddingExpanded(false);
101
- setCodeExpanded(false);
102
- }}
103
- >
104
- <svg
105
- width="24"
106
- height="24"
107
- viewBox="0 0 24 24"
108
- fill="none"
109
- xmlns="http://www.w3.org/2000/svg"
110
- >
111
- <path
112
- d="M3 3h18v18H3V3zm2 2v14h14V5H5zm2 2h10v2H7V7zm0 4h10v2H7v-2zm0 4h10v2H7v-2z"
113
- fill="currentColor"
114
- />
115
- </svg>
116
- </IconButton>
117
- </Tooltip>
90
+ <Typography variant="overline">
91
+ <b>Data source</b>
92
+ </Typography>
118
93
  )}
119
- {!hideCodeCellIcon && (
120
- <Tooltip
121
- title={codeExpanded ? "Hide Code" : "View Code"}
122
- >
123
- <IconButton
124
- size="small"
125
- onClick={() => {
126
- setCodeExpanded(!codeExpanded);
127
- }}
128
- >
129
- <CodeIcon />
130
- </IconButton>
131
- </Tooltip>
94
+ {cell.result && (
95
+ <Typography variant="overline" fontWeight="bold">
96
+ Results
97
+ </Typography>
132
98
  )}
133
- {!hideEmbeddingIcon && cell.result && (
134
- <Tooltip
135
- title={
136
- embeddingExpanded
137
- ? "Hide Embedding"
138
- : "View Embedding"
139
- }
140
- >
141
- <IconButton
142
- size="small"
143
- onClick={() => {
144
- setEmbeddingExpanded(!embeddingExpanded);
145
- }}
99
+ </Stack>
100
+ <Stack sx={{ flexDirection: "row" }}>
101
+ <CardActions
102
+ sx={{
103
+ padding: "0px 8px 0px 8px",
104
+ mb: "auto",
105
+ mt: "auto",
106
+ }}
107
+ >
108
+ {cell.newSources && cell.newSources.length > 0 && (
109
+ <Tooltip title="Explore Data Sources">
110
+ <IconButton
111
+ size="small"
112
+ onClick={() => {
113
+ setSourcesExpanded(!sourcesExpanded);
114
+ setEmbeddingExpanded(false);
115
+ setCodeExpanded(false);
116
+ }}
117
+ >
118
+ <svg
119
+ width="24"
120
+ height="24"
121
+ viewBox="0 0 24 24"
122
+ fill="none"
123
+ xmlns="http://www.w3.org/2000/svg"
124
+ >
125
+ <path
126
+ d="M3 3h18v18H3V3zm2 2v14h14V5H5zm2 2h10v2H7V7zm0 4h10v2H7v-2zm0 4h10v2H7v-2z"
127
+ fill="currentColor"
128
+ />
129
+ </svg>
130
+ </IconButton>
131
+ </Tooltip>
132
+ )}
133
+ {!hideCodeCellIcon && (
134
+ <Tooltip
135
+ title={codeExpanded ? "Hide Code" : "View Code"}
146
136
  >
147
- <LinkOutlinedIcon />
148
- </IconButton>
149
- </Tooltip>
150
- )}
151
- </CardActions>
137
+ <IconButton
138
+ size="small"
139
+ onClick={() => {
140
+ setCodeExpanded(!codeExpanded);
141
+ }}
142
+ >
143
+ <CodeIcon />
144
+ </IconButton>
145
+ </Tooltip>
146
+ )}
147
+ {!hideEmbeddingIcon && cell.result && (
148
+ <Tooltip
149
+ title={
150
+ embeddingExpanded
151
+ ? "Hide Embedding"
152
+ : "View Embedding"
153
+ }
154
+ >
155
+ <IconButton
156
+ size="small"
157
+ onClick={() => {
158
+ setEmbeddingExpanded(!embeddingExpanded);
159
+ }}
160
+ >
161
+ <LinkOutlinedIcon />
162
+ </IconButton>
163
+ </Tooltip>
164
+ )}
165
+ </CardActions>
166
+ </Stack>
152
167
  </Stack>
153
168
  )}
154
169
  <Collapse in={embeddingExpanded} timeout="auto" unmountOnExit>