@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/dist/index.cjs.js +16 -16
- package/dist/index.es.js +380 -373
- package/package.json +1 -1
- package/src/components/Notebook/NotebookCell.tsx +77 -62
package/package.json
CHANGED
|
@@ -81,74 +81,89 @@ export function NotebookCell({
|
|
|
81
81
|
<Stack
|
|
82
82
|
sx={{
|
|
83
83
|
flexDirection: "row",
|
|
84
|
-
justifyContent: "
|
|
84
|
+
justifyContent: "space-between",
|
|
85
|
+
ml: "8px",
|
|
85
86
|
}}
|
|
86
87
|
>
|
|
87
|
-
<
|
|
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
|
-
<
|
|
96
|
-
<
|
|
97
|
-
|
|
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
|
-
{
|
|
120
|
-
<
|
|
121
|
-
|
|
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
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
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
|
-
<
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
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>
|