@malloy-publisher/sdk 0.0.123 → 0.0.125

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.es.js CHANGED
@@ -3,8 +3,8 @@ import { Typography as Ce, Box as Pe, CircularProgress as N2, IconButton as yt,
3
3
  import * as A from "react";
4
4
  import pe, { useState as tt, useRef as _n, useCallback as Dp, useEffect as Gt, Suspense as ad, lazy as Qm, isValidElement as Ss, cloneElement as vs, Children as z2, useImperativeHandle as Xm, useContext as bo, Fragment as Zm, useMemo as Qt, useReducer as W2, createContext as j2, useLayoutEffect as V2 } from "react";
5
5
  import { useQuery as q2, useMutation as G2, useQueryClient as Ai } from "@tanstack/react-query";
6
- import { u as ut, g as Jm, C as e0 } from "./ServerProvider-BXGgfW1t.es.js";
7
- import { S as MM } from "./ServerProvider-BXGgfW1t.es.js";
6
+ import { u as ut, g as Jm, C as e0 } from "./ServerProvider-BslSKRBW.es.js";
7
+ import { S as MM } from "./ServerProvider-BslSKRBW.es.js";
8
8
  import Y2 from "axios";
9
9
  import { unstable_createGetCssVar as K2, createSpacing as Q2, useTheme as X2, GlobalStyles as Z2, unstable_memoTheme as J2, keyframes as Ma, css as t0, Stack as ey, Box as ty, createStack as ny, shouldForwardProp as ry, alpha as kr } from "@mui/system";
10
10
  import iy from "@emotion/styled";
@@ -20428,49 +20428,33 @@ function Ug({
20428
20428
  onChange: l,
20429
20429
  onSourceChange: u
20430
20430
  }) {
20431
- return /* @__PURE__ */ L(
20432
- cr,
20433
- {
20434
- open: e,
20435
- onClose: t,
20436
- maxWidth: !1,
20437
- fullWidth: !0,
20438
- sx: {
20439
- "& .MuiDialog-paper": {
20440
- width: "95vw",
20441
- height: "95vh",
20442
- maxWidth: "none"
20443
- }
20444
- },
20445
- children: [
20446
- /* @__PURE__ */ L(
20447
- dr,
20448
- {
20449
- sx: {
20450
- display: "flex",
20451
- justifyContent: "space-between",
20452
- alignItems: "center"
20453
- },
20454
- children: [
20455
- i,
20456
- /* @__PURE__ */ h(yt, { onClick: t, sx: { color: "#666666" }, children: /* @__PURE__ */ h(Jr, {}) })
20457
- ]
20458
- }
20459
- ),
20460
- /* @__PURE__ */ h(pr, { children: o ? /* @__PURE__ */ h(
20461
- $g,
20462
- {
20463
- resourceUri: n,
20464
- data: r,
20465
- existingQuery: a,
20466
- initialSelectedSourceIndex: s,
20467
- onChange: l,
20468
- onSourceChange: u
20469
- }
20470
- ) : /* @__PURE__ */ h("div", { children: "No valid import statement found in cell" }) })
20471
- ]
20472
- }
20473
- );
20431
+ return /* @__PURE__ */ L(cr, { open: e, onClose: t, fullScreen: !0, children: [
20432
+ /* @__PURE__ */ L(
20433
+ dr,
20434
+ {
20435
+ sx: {
20436
+ display: "flex",
20437
+ justifyContent: "space-between",
20438
+ alignItems: "center"
20439
+ },
20440
+ children: [
20441
+ i,
20442
+ /* @__PURE__ */ h(yt, { onClick: t, sx: { color: "#666666" }, children: /* @__PURE__ */ h(Jr, {}) })
20443
+ ]
20444
+ }
20445
+ ),
20446
+ /* @__PURE__ */ h(pr, { children: o ? /* @__PURE__ */ h(
20447
+ $g,
20448
+ {
20449
+ resourceUri: n,
20450
+ data: r,
20451
+ existingQuery: a,
20452
+ initialSelectedSourceIndex: s,
20453
+ onChange: l,
20454
+ onSourceChange: u
20455
+ }
20456
+ ) : /* @__PURE__ */ h("div", { children: "No valid import statement found in cell" }) })
20457
+ ] });
20474
20458
  }
20475
20459
  function kM({ onChange: e, resourceUri: t }) {
20476
20460
  const { modelPath: n } = gt(t), { data: r, isError: i, isLoading: o, error: a } = Hg(t), [s, l] = pe.useState(!1), [u, c] = pe.useState(), [d, f] = pe.useState(0), [p, g] = tt("");
@@ -42430,14 +42414,27 @@ const Xo = He("MuiMenuItem", ["root", "focusVisible", "dense", "disabled", "divi
42430
42414
  type: "text"
42431
42415
  }
42432
42416
  ],
42433
- duckdb: []
42417
+ duckdb: [],
42418
+ motherduck: [
42419
+ {
42420
+ label: "Access Token",
42421
+ name: "accessToken",
42422
+ type: "text"
42423
+ },
42424
+ {
42425
+ label: "Database",
42426
+ name: "database",
42427
+ type: "text"
42428
+ }
42429
+ ]
42434
42430
  }, oc = {
42435
42431
  postgres: "postgresConnection",
42436
42432
  bigquery: "bigqueryConnection",
42437
42433
  snowflake: "snowflakeConnection",
42438
42434
  trino: "trinoConnection",
42439
42435
  mysql: "mysqlConnection",
42440
- duckdb: "duckdbConnection"
42436
+ duckdb: "duckdbConnection",
42437
+ motherduck: "motherduckConnection"
42441
42438
  };
42442
42439
  function P9({
42443
42440
  onSubmit: e,
@@ -42462,7 +42459,8 @@ function P9({
42462
42459
  bigquery: "bigqueryConnection",
42463
42460
  snowflake: "snowflakeConnection",
42464
42461
  trino: "trinoConnection",
42465
- mysql: "mysqlConnection"
42462
+ mysql: "mysqlConnection",
42463
+ motherduck: "motherduckConnection"
42466
42464
  }[f]]: p.reduce((b, E) => (b[E.name] = c.get(E.name)?.toString(), b), {})
42467
42465
  };
42468
42466
  await e(y), s();
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.123",
4
+ "version": "0.0.125",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.es.js",
@@ -50,6 +50,7 @@ export default function AddConnectionDialog({
50
50
  snowflake: "snowflakeConnection",
51
51
  trino: "trinoConnection",
52
52
  mysql: "mysqlConnection",
53
+ motherduck: "motherduckConnection",
53
54
  };
54
55
  const connectionPayload = {
55
56
  name,
@@ -2,6 +2,7 @@ import { HTMLInputTypeAttribute } from "react";
2
2
  import type {
3
3
  BigqueryConnection,
4
4
  ConnectionTypeEnum,
5
+ MotherDuckConnection,
5
6
  MysqlConnection,
6
7
  PostgresConnection,
7
8
  SnowflakeConnection,
@@ -14,7 +15,8 @@ type ConnectionField = {
14
15
  BigqueryConnection &
15
16
  SnowflakeConnection &
16
17
  TrinoConnection &
17
- MysqlConnection);
18
+ MysqlConnection &
19
+ MotherDuckConnection);
18
20
  type: HTMLInputTypeAttribute;
19
21
  required?: boolean;
20
22
  };
@@ -189,6 +191,18 @@ export const connectionFieldsByType: Record<
189
191
  },
190
192
  ],
191
193
  duckdb: [],
194
+ motherduck: [
195
+ {
196
+ label: "Access Token",
197
+ name: "accessToken",
198
+ type: "text",
199
+ },
200
+ {
201
+ label: "Database",
202
+ name: "database",
203
+ type: "text",
204
+ },
205
+ ],
192
206
  };
193
207
 
194
208
  export const attributesFieldName: Record<ConnectionTypeEnum, string> = {
@@ -198,4 +212,5 @@ export const attributesFieldName: Record<ConnectionTypeEnum, string> = {
198
212
  trino: "trinoConnection",
199
213
  mysql: "mysqlConnection",
200
214
  duckdb: "duckdbConnection",
215
+ motherduck: "motherduckConnection",
201
216
  };
@@ -31,19 +31,7 @@ export function ModelExplorerDialog({
31
31
  onSourceChange,
32
32
  }: ModelExplorerDialogProps) {
33
33
  return (
34
- <Dialog
35
- open={open}
36
- onClose={onClose}
37
- maxWidth={false}
38
- fullWidth
39
- sx={{
40
- "& .MuiDialog-paper": {
41
- width: "95vw",
42
- height: "95vh",
43
- maxWidth: "none",
44
- },
45
- }}
46
- >
34
+ <Dialog open={open} onClose={onClose} fullScreen>
47
35
  <DialogTitle
48
36
  sx={{
49
37
  display: "flex",