drizzle-cube 0.1.26 → 0.1.28

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 (29) hide show
  1. package/dist/adapters/{compiler-CSr2Ti96.js → compiler-BibS3bXd.js} +980 -920
  2. package/dist/adapters/express/index.js +1 -1
  3. package/dist/adapters/fastify/index.js +1 -1
  4. package/dist/adapters/hono/index.js +1 -1
  5. package/dist/adapters/nextjs/index.js +1 -1
  6. package/dist/adapters/utils.d.ts +1 -1
  7. package/dist/client/charts.js +1 -1
  8. package/dist/client/chunks/{charts-JUvTF2xT.js → charts-Dm25kuUn.js} +54 -50
  9. package/dist/client/chunks/{charts-JUvTF2xT.js.map → charts-Dm25kuUn.js.map} +1 -1
  10. package/dist/client/chunks/{icons-ChgBIaCg.js → icons-B_0yoGjv.js} +398 -352
  11. package/dist/client/chunks/icons-B_0yoGjv.js.map +1 -0
  12. package/dist/client/chunks/providers-B7MVnAAt.js.map +1 -1
  13. package/dist/client/components/CubeRelationshipDiagram/CubeNode.d.ts +13 -0
  14. package/dist/client/components/CubeRelationshipDiagram/ERDControls.d.ts +7 -0
  15. package/dist/client/components/CubeRelationshipDiagram/RelationshipEdge.d.ts +11 -0
  16. package/dist/client/components/CubeRelationshipDiagram/index.d.ts +10 -0
  17. package/dist/client/components/CubeRelationshipDiagram/useERDLayout.d.ts +21 -0
  18. package/dist/client/components/QueryBuilder/types.d.ts +4 -0
  19. package/dist/client/components.js +14393 -4492
  20. package/dist/client/components.js.map +1 -1
  21. package/dist/client/hooks/useCubeMeta.d.ts +9 -0
  22. package/dist/client/index.js +1 -1
  23. package/dist/client/styles.css +1 -1
  24. package/dist/client/types.d.ts +2 -1
  25. package/dist/client-bundle-stats.html +1 -1
  26. package/dist/server/index.d.ts +27 -9
  27. package/dist/server/index.js +1002 -942
  28. package/package.json +5 -2
  29. package/dist/client/chunks/icons-ChgBIaCg.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import Q, { Router as E } from "express";
2
2
  import R from "cors";
3
- import { S as $, c as a, f as v, a as L, b as x, h } from "../compiler-CSr2Ti96.js";
3
+ import { S as $, c as a, f as v, a as L, b as x, h } from "../compiler-BibS3bXd.js";
4
4
  function N(l) {
5
5
  const {
6
6
  cubes: c,
@@ -1,4 +1,4 @@
1
- import { S as P, c as u, f as v, a as L, b as Q, h as C } from "../compiler-CSr2Ti96.js";
1
+ import { S as P, c as u, f as v, a as L, b as Q, h as C } from "../compiler-BibS3bXd.js";
2
2
  const w = function(o, x, q) {
3
3
  const {
4
4
  cubes: b,
@@ -1,5 +1,5 @@
1
1
  import { Hono as x } from "hono";
2
- import { S as v, f as h, a as A, b as w, h as C } from "../compiler-CSr2Ti96.js";
2
+ import { S as v, f as h, a as A, b as w, h as C } from "../compiler-BibS3bXd.js";
3
3
  var b = (d) => {
4
4
  const l = {
5
5
  ...{
@@ -1,5 +1,5 @@
1
1
  import { NextResponse as o } from "next/server";
2
- import { c as l, f as N, a as S, b as p, h as v, S as C } from "../compiler-CSr2Ti96.js";
2
+ import { c as l, f as N, a as S, b as p, h as v, S as C } from "../compiler-BibS3bXd.js";
3
3
  function g(t) {
4
4
  const { cubes: e, drizzle: a, schema: s, engineType: f } = t;
5
5
  if (!e || e.length === 0)
@@ -96,7 +96,7 @@ export declare function formatCubeResponse(query: SemanticQuery, result: {
96
96
  /**
97
97
  * Format SQL string using sql-formatter with appropriate dialect
98
98
  */
99
- export declare function formatSqlString(sqlString: string, engineType: 'postgres' | 'mysql' | 'sqlite'): string;
99
+ export declare function formatSqlString(sqlString: string, engineType: 'postgres' | 'mysql' | 'sqlite' | 'singlestore'): string;
100
100
  /**
101
101
  * Format SQL generation response
102
102
  */
@@ -1,4 +1,4 @@
1
- import { k as t, C as s, D as h, N as R, u as e, A as C, B as c, L as O, P as T, R as A, a as L, S, T as I, f as _ } from "./chunks/charts-JUvTF2xT.js";
1
+ import { r as t, C as s, D as h, N as R, z as e, A as C, B as c, L as O, P as T, R as A, a as L, S, T as I, f as _ } from "./chunks/charts-Dm25kuUn.js";
2
2
  export {
3
3
  t as CHART_COLORS,
4
4
  s as CHART_MARGINS,
@@ -1,17 +1,17 @@
1
1
  import { jsx as i, jsxs as b } from "react/jsx-runtime";
2
2
  import { useState as G } from "react";
3
- import { ResponsiveContainer as ze, Tooltip as ut, BarChart as ft, CartesianGrid as he, XAxis as ye, YAxis as pe, Legend as B, Bar as mt, Cell as ke, LineChart as xt, Line as ht, AreaChart as yt, Area as pt, PieChart as vt, Pie as bt, ScatterChart as gt, Scatter as Re, RadarChart as wt, PolarGrid as Nt, PolarAngleAxis as At, PolarRadiusAxis as St, Radar as Mt, RadialBarChart as kt, RadialBar as $t, Treemap as Lt } from "recharts";
3
+ import { ResponsiveContainer as Ee, Tooltip as ut, BarChart as ft, CartesianGrid as he, XAxis as ye, YAxis as pe, Legend as B, Bar as mt, Cell as ke, LineChart as xt, Line as ht, AreaChart as yt, Area as pt, PieChart as vt, Pie as bt, ScatterChart as gt, Scatter as Re, RadarChart as wt, PolarGrid as Nt, PolarAngleAxis as At, PolarRadiusAxis as St, Radar as Mt, RadialBarChart as kt, RadialBar as $t, Treemap as Lt } from "recharts";
4
4
  import { u as K } from "./providers-B7MVnAAt.js";
5
5
  function U({ children: e, height: t = "100%" }) {
6
6
  try {
7
7
  if (t === "100%")
8
- return /* @__PURE__ */ i("div", { className: "w-full h-full flex-1 flex flex-col relative", style: { minHeight: "250px", overflow: "hidden" }, children: /* @__PURE__ */ i(ze, { width: "100%", height: "100%", debounce: 50, style: { marginTop: "16px" }, children: e }) });
8
+ return /* @__PURE__ */ i("div", { className: "w-full h-full flex-1 flex flex-col relative", style: { minHeight: "250px", overflow: "hidden" }, children: /* @__PURE__ */ i(Ee, { width: "100%", height: "100%", debounce: 50, style: { marginTop: "16px" }, children: e }) });
9
9
  const n = {
10
10
  height: typeof t == "number" ? `${t}px` : t,
11
11
  width: "100%",
12
12
  minHeight: "200px"
13
13
  };
14
- return /* @__PURE__ */ i("div", { className: "w-full flex flex-col relative", style: { ...n, overflow: "hidden" }, children: /* @__PURE__ */ i(ze, { width: "100%", height: "100%", debounce: 50, style: { marginTop: "16px" }, children: e }) });
14
+ return /* @__PURE__ */ i("div", { className: "w-full flex flex-col relative", style: { ...n, overflow: "hidden" }, children: /* @__PURE__ */ i(Ee, { width: "100%", height: "100%", debounce: 50, style: { marginTop: "16px" }, children: e }) });
15
15
  } catch (n) {
16
16
  return /* @__PURE__ */ b(
17
17
  "div",
@@ -1002,7 +1002,7 @@ function jt(e, t) {
1002
1002
  }
1003
1003
  function et(e) {
1004
1004
  let t, n, r;
1005
- e.length !== 2 ? (t = oe, n = (c, d) => oe(e(c), d), r = (c, d) => e(c) - d) : (t = e === oe || e === jt ? e : Et, n = e, r = e);
1005
+ e.length !== 2 ? (t = oe, n = (c, d) => oe(e(c), d), r = (c, d) => e(c) - d) : (t = e === oe || e === jt ? e : zt, n = e, r = e);
1006
1006
  function s(c, d, o = 0, u = c.length) {
1007
1007
  if (o < u) {
1008
1008
  if (t(d, d) !== 0) return u;
@@ -1029,14 +1029,14 @@ function et(e) {
1029
1029
  }
1030
1030
  return { left: s, center: l, right: a };
1031
1031
  }
1032
- function Et() {
1032
+ function zt() {
1033
1033
  return 0;
1034
1034
  }
1035
- function zt(e) {
1035
+ function Et(e) {
1036
1036
  return e === null ? NaN : +e;
1037
1037
  }
1038
1038
  const Rt = et(oe), tt = Rt.right;
1039
- et(zt).center;
1039
+ et(Et).center;
1040
1040
  class He extends Map {
1041
1041
  constructor(t, n = It) {
1042
1042
  if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: n } }), t != null) for (const [r, s] of t) this.set(r, s);
@@ -1345,28 +1345,28 @@ function V(e) {
1345
1345
  return e = _(e), (e < 16 ? "0" : "") + e.toString(16);
1346
1346
  }
1347
1347
  function Be(e, t, n, r) {
1348
- return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new z(e, t, n, r);
1348
+ return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new E(e, t, n, r);
1349
1349
  }
1350
1350
  function rt(e) {
1351
- if (e instanceof z) return new z(e.h, e.s, e.l, e.opacity);
1352
- if (e instanceof ee || (e = P(e)), !e) return new z();
1353
- if (e instanceof z) return e;
1351
+ if (e instanceof E) return new E(e.h, e.s, e.l, e.opacity);
1352
+ if (e instanceof ee || (e = P(e)), !e) return new E();
1353
+ if (e instanceof E) return e;
1354
1354
  e = e.rgb();
1355
1355
  var t = e.r / 255, n = e.g / 255, r = e.b / 255, s = Math.min(t, n, r), a = Math.max(t, n, r), l = NaN, c = a - s, d = (a + s) / 2;
1356
- return c ? (t === a ? l = (n - r) / c + (n < r) * 6 : n === a ? l = (r - t) / c + 2 : l = (t - n) / c + 4, c /= d < 0.5 ? a + s : 2 - a - s, l *= 60) : c = d > 0 && d < 1 ? 0 : l, new z(l, c, d, e.opacity);
1356
+ return c ? (t === a ? l = (n - r) / c + (n < r) * 6 : n === a ? l = (r - t) / c + 2 : l = (t - n) / c + 4, c /= d < 0.5 ? a + s : 2 - a - s, l *= 60) : c = d > 0 && d < 1 ? 0 : l, new E(l, c, d, e.opacity);
1357
1357
  }
1358
1358
  function en(e, t, n, r) {
1359
- return arguments.length === 1 ? rt(e) : new z(e, t, n, r ?? 1);
1359
+ return arguments.length === 1 ? rt(e) : new E(e, t, n, r ?? 1);
1360
1360
  }
1361
- function z(e, t, n, r) {
1361
+ function E(e, t, n, r) {
1362
1362
  this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
1363
1363
  }
1364
- $e(z, en, nt(ee, {
1364
+ $e(E, en, nt(ee, {
1365
1365
  brighter(e) {
1366
- return e = e == null ? de : Math.pow(de, e), new z(this.h, this.s, this.l * e, this.opacity);
1366
+ return e = e == null ? de : Math.pow(de, e), new E(this.h, this.s, this.l * e, this.opacity);
1367
1367
  },
1368
1368
  darker(e) {
1369
- return e = e == null ? Z : Math.pow(Z, e), new z(this.h, this.s, this.l * e, this.opacity);
1369
+ return e = e == null ? Z : Math.pow(Z, e), new E(this.h, this.s, this.l * e, this.opacity);
1370
1370
  },
1371
1371
  rgb() {
1372
1372
  var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < 0.5 ? n : 1 - n) * t, s = 2 * n - r;
@@ -1378,7 +1378,7 @@ $e(z, en, nt(ee, {
1378
1378
  );
1379
1379
  },
1380
1380
  clamp() {
1381
- return new z(Ke(this.h), ae(this.s), ae(this.l), ue(this.opacity));
1381
+ return new E(Ke(this.h), ae(this.s), ae(this.l), ue(this.opacity));
1382
1382
  },
1383
1383
  displayable() {
1384
1384
  return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
@@ -1606,34 +1606,34 @@ function gn(e) {
1606
1606
  var N = v === "$" ? n : v === "#" && /[boxX]/.test(g) ? "0" + g.toLowerCase() : "", A = v === "$" ? r : /[%p]/.test(g) ? l : "", $ = Xe[g], L = /[defgprs%]/.test(g);
1607
1607
  h = h === void 0 ? 6 : /[gprs]/.test(g) ? Math.max(1, Math.min(21, h)) : Math.max(0, Math.min(20, h));
1608
1608
  function F(M) {
1609
- var H = N, E = A, Y, Ee, te;
1609
+ var H = N, z = A, Y, ze, te;
1610
1610
  if (g === "c")
1611
- E = $(M) + E, M = "";
1611
+ z = $(M) + z, M = "";
1612
1612
  else {
1613
1613
  M = +M;
1614
1614
  var ne = M < 0 || 1 / M < 0;
1615
- if (M = isNaN(M) ? d : $(Math.abs(M), h), y && (M = vn(M)), ne && +M == 0 && x !== "+" && (ne = !1), H = (ne ? x === "(" ? x : c : x === "-" || x === "(" ? "" : x) + H, E = (g === "s" ? Je[8 + it / 3] : "") + E + (ne && x === "(" ? ")" : ""), L) {
1616
- for (Y = -1, Ee = M.length; ++Y < Ee; )
1615
+ if (M = isNaN(M) ? d : $(Math.abs(M), h), y && (M = vn(M)), ne && +M == 0 && x !== "+" && (ne = !1), H = (ne ? x === "(" ? x : c : x === "-" || x === "(" ? "" : x) + H, z = (g === "s" ? Je[8 + it / 3] : "") + z + (ne && x === "(" ? ")" : ""), L) {
1616
+ for (Y = -1, ze = M.length; ++Y < ze; )
1617
1617
  if (te = M.charCodeAt(Y), 48 > te || te > 57) {
1618
- E = (te === 46 ? s + M.slice(Y + 1) : M.slice(Y)) + E, M = M.slice(0, Y);
1618
+ z = (te === 46 ? s + M.slice(Y + 1) : M.slice(Y)) + z, M = M.slice(0, Y);
1619
1619
  break;
1620
1620
  }
1621
1621
  }
1622
1622
  }
1623
1623
  k && !p && (M = t(M, 1 / 0));
1624
- var re = H.length + M.length + E.length, I = re < S ? new Array(S - re + 1).join(m) : "";
1625
- switch (k && p && (M = t(I + M, I.length ? S - E.length : 1 / 0), I = ""), w) {
1624
+ var re = H.length + M.length + z.length, I = re < S ? new Array(S - re + 1).join(m) : "";
1625
+ switch (k && p && (M = t(I + M, I.length ? S - z.length : 1 / 0), I = ""), w) {
1626
1626
  case "<":
1627
- M = H + M + E + I;
1627
+ M = H + M + z + I;
1628
1628
  break;
1629
1629
  case "=":
1630
- M = H + I + M + E;
1630
+ M = H + I + M + z;
1631
1631
  break;
1632
1632
  case "^":
1633
- M = I.slice(0, re = I.length >> 1) + H + M + E + I.slice(re);
1633
+ M = I.slice(0, re = I.length >> 1) + H + M + z + I.slice(re);
1634
1634
  break;
1635
1635
  default:
1636
- M = I + H + M + E;
1636
+ M = I + H + M + z;
1637
1637
  break;
1638
1638
  }
1639
1639
  return a(M);
@@ -1777,10 +1777,10 @@ function jn() {
1777
1777
  return r = m, s = w, u();
1778
1778
  };
1779
1779
  }
1780
- function En() {
1780
+ function zn() {
1781
1781
  return jn()(W, W);
1782
1782
  }
1783
- function zn(e, t, n, r) {
1783
+ function En(e, t, n, r) {
1784
1784
  var s = Vt(e, t, n), a;
1785
1785
  switch (r = xe(r ?? ",f"), r.type) {
1786
1786
  case "s": {
@@ -1810,7 +1810,7 @@ function ct(e) {
1810
1810
  return qt(r[0], r[r.length - 1], n ?? 10);
1811
1811
  }, e.tickFormat = function(n, r) {
1812
1812
  var s = t();
1813
- return zn(s[0], s[s.length - 1], n ?? 10, r);
1813
+ return En(s[0], s[s.length - 1], n ?? 10, r);
1814
1814
  }, e.nice = function(n) {
1815
1815
  n == null && (n = 10);
1816
1816
  var r = t(), s = 0, a = r.length - 1, l = r[s], c = r[a], d, o, u = 10;
@@ -1829,7 +1829,7 @@ function ct(e) {
1829
1829
  }, e;
1830
1830
  }
1831
1831
  function Rn() {
1832
- var e = En();
1832
+ var e = zn();
1833
1833
  return e.copy = function() {
1834
1834
  return Fn(e, Rn());
1835
1835
  }, je.apply(e, arguments), ct(e);
@@ -2223,26 +2223,30 @@ export {
2223
2223
  Kn as S,
2224
2224
  Xn as T,
2225
2225
  Wn as a,
2226
- Fn as b,
2226
+ Ye as b,
2227
2227
  Zn as c,
2228
- W as d,
2229
- R as e,
2228
+ fn as d,
2229
+ P as e,
2230
2230
  Jn as f,
2231
- O as g,
2232
- Rn as h,
2233
- je as i,
2234
- se as j,
2235
- T as k,
2231
+ Fn as g,
2232
+ je as h,
2233
+ fe as i,
2234
+ W as j,
2235
+ O as k,
2236
2236
  ct as l,
2237
- U as m,
2238
- Hn as n,
2239
- ot as o,
2240
- Pn as p,
2237
+ R as m,
2238
+ Rn as n,
2239
+ se as o,
2240
+ ot as p,
2241
2241
  dt as q,
2242
- Cn as r,
2243
- tr as s,
2242
+ T as r,
2243
+ U as s,
2244
2244
  jn as t,
2245
- De as u,
2246
- er as v
2245
+ Hn as u,
2246
+ Pn as v,
2247
+ Cn as w,
2248
+ er as x,
2249
+ tr as y,
2250
+ De as z
2247
2251
  };
2248
- //# sourceMappingURL=charts-JUvTF2xT.js.map
2252
+ //# sourceMappingURL=charts-Dm25kuUn.js.map