@iota-uz/sdk 0.16.0 → 0.17.1

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 (55) hide show
  1. package/dist/client-host/identity.d.ts +4 -4
  2. package/dist/client-host/identity.js +2 -2
  3. package/dist/lens/{CascadePanel-jtC2EUUS.js → CascadePanel-Sd2OKQx-.js} +15 -15
  4. package/dist/lens/{ChartDataEquivalent-BFDdHoQn.js → ChartDataEquivalent-DgCAb4Ov.js} +14 -13
  5. package/dist/lens/ChartPanel-CiAahY9O.js +709 -0
  6. package/dist/lens/{CoveragePanel-5LWQwFMZ.js → CoveragePanel-DeeKg8gF.js} +10 -10
  7. package/dist/lens/{GaugePanel-eVYvp3Hk.js → GaugePanel-8rsf_XHS.js} +8 -8
  8. package/dist/lens/{MapPanel-CzpZKz1Y.js → MapPanel-Bq0mfVCB.js} +14 -14
  9. package/dist/lens/{MetricFlowPanel-CG2Bj7s6.js → MetricFlowPanel-ZBJqPFpc.js} +2 -2
  10. package/dist/lens/{MetricHierarchyPanel-Difdcafn.js → MetricHierarchyPanel-DStGwvVU.js} +2 -2
  11. package/dist/lens/{MetricRelationshipPanel-Cq1dFTeY.js → MetricRelationshipPanel-D6ItmGCS.js} +2 -2
  12. package/dist/lens/{PrintReport-BiUdo8XG.js → PrintReport-Dr-6xXVr.js} +413 -397
  13. package/dist/lens/{TablePanel-_6j7epQg.js → TablePanel-CzLP8gG0.js} +1 -1
  14. package/dist/lens/{adapter-DRShqW45.js → adapter-BwEwcw2W.js} +4960 -4956
  15. package/dist/lens/adapter-CgoRd_uP.js +6 -0
  16. package/dist/lens/charts/adapter.d.ts +1 -0
  17. package/dist/lens/charts/adapter.d.ts.map +1 -1
  18. package/dist/lens/charts/echarts/options.d.ts.map +1 -1
  19. package/dist/lens/charts/keys.d.ts +2 -0
  20. package/dist/lens/charts/keys.d.ts.map +1 -1
  21. package/dist/lens/contract/schemas.d.ts.map +1 -1
  22. package/dist/lens/contract/types.d.ts +1 -0
  23. package/dist/lens/contract/types.d.ts.map +1 -1
  24. package/dist/lens/{index-CmXDbBaF.js → index-B6anZ5Pr.js} +1 -1
  25. package/dist/lens/{index-BBtBPnTb.js → index-R9mnOHaj.js} +684 -667
  26. package/dist/lens/index.js +1 -1
  27. package/dist/lens/{install-ByIx15ES.js → install-CsNOaFxV.js} +1 -1
  28. package/dist/lens/{install-DKwCLbtk.js → install-CumkiUJn.js} +1 -1
  29. package/dist/lens/{install-ByEamXef.js → install-D5OiGDnd.js} +1 -1
  30. package/dist/lens/{install-DIbrzh5h.js → install-VEXJv-Wi.js} +1 -1
  31. package/dist/lens/keys-6_gqLhcv.js +78 -0
  32. package/dist/lens/{metricViews-IoSavtwn.js → metricViews-De-9pff-.js} +1 -1
  33. package/dist/lens/panels/ChartPanel.d.ts.map +1 -1
  34. package/dist/lens/panels/data.d.ts +2 -0
  35. package/dist/lens/panels/data.d.ts.map +1 -1
  36. package/dist/lens/{prefetch-CrMQhAEy.js → prefetch-C_qYKOTU.js} +2 -2
  37. package/dist/lens/{prefetchPanels-BbWAAYrz.js → prefetchPanels-CD4C-A5q.js} +1 -1
  38. package/dist/lens/print/PrintReport.d.ts.map +1 -1
  39. package/dist/lens/{print-CLo-mTEP.js → print-Iu804kRb.js} +18 -18
  40. package/dist/lens/{scales-CChHRiVq.js → scales-CWTA0tSQ.js} +53 -53
  41. package/dist/sdk-identity.cjs +3 -3
  42. package/dist/sdk-identity.js +3 -3
  43. package/dist/sdk-identity.json +2 -2
  44. package/dist/testing/driver.d.ts +19 -0
  45. package/dist/testing/driver.js +103 -30
  46. package/dist/testing/fixtures.d.ts +27 -0
  47. package/dist/testing/fixtures.js +19 -4
  48. package/dist/testing/index.d.ts +3 -2
  49. package/dist/testing/index.js +6 -30
  50. package/dist/testing/lease.d.ts +11 -0
  51. package/dist/testing/lease.js +44 -0
  52. package/package.json +1 -1
  53. package/dist/lens/ChartHost-DTnhnwkn.js +0 -68
  54. package/dist/lens/ChartPanel-_S4IVYdJ.js +0 -730
  55. package/dist/lens/keys-DenV5HsJ.js +0 -12
@@ -1,9 +1,9 @@
1
- export declare const SDK_RELEASE_VERSION = "0.16.0";
2
- export declare const SDK_SOURCE_COMMIT = "ae7a4576fd9bb50b6428680cc45228c83c9d5155";
1
+ export declare const SDK_RELEASE_VERSION = "0.17.1";
2
+ export declare const SDK_SOURCE_COMMIT = "2c09f5ec03f86600750c262edbddf7a987b50992";
3
3
  export declare const SDK_PROTOCOL_VERSION = "1.0.0";
4
4
  export declare const SDK_IDENTITY: Readonly<{
5
- releaseVersion: "0.16.0";
6
- sourceCommit: "ae7a4576fd9bb50b6428680cc45228c83c9d5155";
5
+ releaseVersion: "0.17.1";
6
+ sourceCommit: "2c09f5ec03f86600750c262edbddf7a987b50992";
7
7
  protocolVersion: "1.0.0";
8
8
  }>;
9
9
  export interface SDKRuntimeIdentity {
@@ -1,6 +1,6 @@
1
1
  import { CLIENT_HOST_PROTOCOL_VERSION } from './protocol';
2
- export const SDK_RELEASE_VERSION = '0.16.0';
3
- export const SDK_SOURCE_COMMIT = 'ae7a4576fd9bb50b6428680cc45228c83c9d5155';
2
+ export const SDK_RELEASE_VERSION = '0.17.1';
3
+ export const SDK_SOURCE_COMMIT = '2c09f5ec03f86600750c262edbddf7a987b50992';
4
4
  export const SDK_PROTOCOL_VERSION = CLIENT_HOST_PROTOCOL_VERSION;
5
5
  export const SDK_IDENTITY = Object.freeze({
6
6
  releaseVersion: SDK_RELEASE_VERSION,
@@ -1,10 +1,10 @@
1
1
  import { jsx as o, jsxs as m, Fragment as Z } from "react/jsx-runtime";
2
- import { useState as _, useRef as P, useEffect as W, useCallback as D, useLayoutEffect as J } from "react";
3
- import { u as G, U as Q, V as tt, X as et, Y as at, Z as Y, _ as nt, $ as lt, o as ot, a0 as T, L as A, M as st, a1 as it, I as rt, H as ct, z as dt, P as ut, a2 as F, a3 as H, a4 as ft } from "./index-BBtBPnTb.js";
2
+ import { useState as B, useRef as z, useEffect as W, useCallback as D, useLayoutEffect as J } from "react";
3
+ import { u as G, U as Q, V as tt, X as et, Y as at, Z as Y, _ as nt, $ as lt, t as ot, a0 as T, L as _, M as st, a1 as it, I as rt, H as ct, A as dt, P as ut, a2 as F, a3 as H, a4 as ft } from "./index-R9mnOHaj.js";
4
4
  import "@iota-uz/sdk/client-host";
5
5
  import { createPortal as ht } from "react-dom";
6
6
  function O({ raw: t }) {
7
- const a = G(), [n, r] = _(!1), u = P();
7
+ const a = G(), [n, r] = B(!1), u = z();
8
8
  W(() => () => {
9
9
  u.current && clearTimeout(u.current);
10
10
  }, []);
@@ -34,7 +34,7 @@ function pt(t, a, n) {
34
34
  };
35
35
  }
36
36
  function bt({ anchor: t, open: a, item: n, actionHint: r, onMouseEnter: u, onMouseLeave: s }) {
37
- const i = lt(a, t, "lens-waterfall-tip-overlay-root"), g = P(null), [c, d] = _(), f = D(() => {
37
+ const i = lt(a, t, "lens-waterfall-tip-overlay-root"), g = z(null), [c, d] = B(), f = D(() => {
38
38
  var L, $, I, e;
39
39
  const b = (L = t.current) == null ? void 0 : L.getBoundingClientRect(), x = ($ = g.current) == null ? void 0 : $.getBoundingClientRect();
40
40
  if (!b || !x) return;
@@ -93,7 +93,7 @@ function bt({ anchor: t, open: a, item: n, actionHint: r, onMouseEnter: u, onMou
93
93
  );
94
94
  }
95
95
  function vt({ item: t, index: a, count: n, chrome: r, splitCallout: u, actionHint: s, unknownLabel: i }) {
96
- const [g, c] = _(!1), d = P(null), f = P(null), w = at(f), p = P(), b = () => {
96
+ const [g, c] = B(!1), d = z(null), f = z(null), w = at(f), p = z(), b = () => {
97
97
  p.current && clearTimeout(p.current), c(!0);
98
98
  }, x = () => {
99
99
  p.current && clearTimeout(p.current), p.current = setTimeout(() => c(!1), nt);
@@ -261,7 +261,7 @@ function j(t) {
261
261
  }
262
262
  return 0;
263
263
  }
264
- const B = "—";
264
+ const A = "—";
265
265
  function gt(t) {
266
266
  return typeof t == "boolean" ? t : typeof t == "number" ? t !== 0 : typeof t == "string" && t.trim().toLowerCase() === "true";
267
267
  }
@@ -288,17 +288,17 @@ function Mt(t, a) {
288
288
  function q(t, a, n, r) {
289
289
  const u = T(t, "label") ?? "label", s = T(t, "value") ?? "value", i = T(t, "cut") ?? "cut", g = T(t, "cutLabel") ?? "cutLabel", c = T(t, "final") ?? "final", d = T(t, "annotation"), f = T(t, "tone"), w = T(t, "split"), p = T(t, "splitLabel"), b = F(a, u), x = F(a, s), y = F(a, i), M = F(a, g), k = F(a, c), L = F(a, d), $ = F(a, f), I = F(a, w), e = F(a, p), l = (h) => ft(h[x]), N = Math.max(1, ...a.rows.map((h) => Math.max(0, l(h) ?? 0)));
290
290
  return a.rows.map((h, v) => {
291
- const E = l(h), V = E !== void 0, C = E ?? 0, z = j(h[y]), S = V && C > 0 ? Math.min(100, C / N * 100) : 0;
291
+ const E = l(h), V = E !== void 0, C = E ?? 0, P = j(h[y]), S = V && C > 0 ? Math.min(100, C / N * 100) : 0;
292
292
  return {
293
293
  label: H(h[b], `Stage ${v + 1}`),
294
294
  value: C,
295
295
  hasValue: V,
296
- formattedValue: V ? n(C) : B,
297
- cut: z,
296
+ formattedValue: V ? n(C) : A,
297
+ cut: P,
298
298
  // A stage whose total is unknown has an unknown movement: the frame's own
299
299
  // `cut` for such a row is a placeholder, and printing «0 UZS» beside it
300
300
  // would restate the very lie the em dash above it just refused to tell.
301
- formattedCut: V ? yt(z, r) : B,
301
+ formattedCut: V ? yt(P, r) : A,
302
302
  cutLabel: H(h[M], ""),
303
303
  final: gt(h[k]),
304
304
  annotation: L >= 0 ? H(h[L], "") : "",
@@ -424,7 +424,7 @@ function X(t, a, n = a, { formatExact: r = () => {
424
424
  w = Math.min(w, e.from, e.to), p = Math.max(p, e.from, e.to);
425
425
  });
426
426
  const b = K(w, p), x = w < 0 ? Math.floor(w / b) * b : 0, y = Math.max(b, Math.ceil(p / b) * b), M = Math.max(1, y - x), k = (e) => Math.max(0, Math.min(100, (y - e) / M * 100)), L = k(0), $ = i.map((e, l) => {
427
- const N = k(Math.max(e.from, e.to)), h = k(Math.min(e.from, e.to)), v = e.unknown === !0, E = v || e.kind !== "start" && e.kind !== "end" && e.value === 0, V = E ? 0 : Math.max(1.5, h - N), C = Math.abs(e.split), z = Math.abs(e.value), S = !v && C > d && C < z - d;
427
+ const N = k(Math.max(e.from, e.to)), h = k(Math.min(e.from, e.to)), v = e.unknown === !0, E = v || e.kind !== "start" && e.kind !== "end" && e.value === 0, V = E ? 0 : Math.max(1.5, h - N), C = Math.abs(e.split), P = Math.abs(e.value), S = !v && C > d && C < P - d;
428
428
  return {
429
429
  label: e.label,
430
430
  value: e.value,
@@ -432,7 +432,7 @@ function X(t, a, n = a, { formatExact: r = () => {
432
432
  // exact form of a figure that does not exist, and no machine value to put
433
433
  // on the clipboard, so the tooltip carries neither and shows no copy
434
434
  // button rather than offering to copy a zero.
435
- formattedValue: v ? B : e.kind === "start" || e.kind === "end" ? a(e.value) : Nt(e.value, a),
435
+ formattedValue: v ? A : e.kind === "start" || e.kind === "end" ? a(e.value) : Nt(e.value, a),
436
436
  exactValue: v ? void 0 : e.kind === "start" || e.kind === "end" ? r(e.value) : Mt(e.value, r),
437
437
  rawValue: v ? void 0 : u(e.value),
438
438
  top: N,
@@ -441,7 +441,7 @@ function X(t, a, n = a, { formatExact: r = () => {
441
441
  // so its percentage resolves against the bar's own box. Scaling by the
442
442
  // bar's plot height too shrank every band by that height again — a 24.5%
443
443
  // share of a bar 18% tall drew as 4.5% of it.
444
- splitHeight: S ? 100 * (C / z) : void 0,
444
+ splitHeight: S ? 100 * (C / P) : void 0,
445
445
  formattedSplit: S ? a(C) : void 0,
446
446
  exactSplit: S ? r(C) : void 0,
447
447
  rawSplit: S ? u(C) : void 0,
@@ -471,7 +471,7 @@ function X(t, a, n = a, { formatExact: r = () => {
471
471
  }
472
472
  function Ct({ panel: t }) {
473
473
  var $, I;
474
- const a = ot(t.id), n = G(), r = T(t, "value") ?? "value", u = T(t, "cut") ?? "cut", s = A(t.format[r]), i = A(t.format[u] ?? t.format[r]), g = st(t.format[r]), c = it(t.format[r]), d = D(
474
+ const a = ot(t.id), n = G(), r = T(t, "value") ?? "value", u = T(t, "cut") ?? "cut", s = _(t.format[r]), i = _(t.format[u] ?? t.format[r]), g = st(t.format[r]), c = it(t.format[r]), d = D(
475
475
  (e) => rt(e, t.format[r]),
476
476
  [t.format, r]
477
477
  ), f = ct(t.format[r]), w = a.data ? q(t, a.data, s, i) : [], p = (($ = t.presentation) == null ? void 0 : $.bridgeLayout) === "waterfall" ? X(w, s, g, { formatExact: c, rawValue: d }) : { items: [], ticks: [], zero: 100 }, b = p.items.some((e) => e.checkpoint), x = dt(t), y = (e) => {
@@ -563,7 +563,7 @@ const Et = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
563
563
  CascadePanel: Ct,
564
564
  buildCascadeStages: q,
565
565
  buildWaterfallModel: X,
566
- unknownValueText: B,
566
+ unknownValueText: A,
567
567
  waterfallAxisStep: K
568
568
  }, Symbol.toStringTag, { value: "Module" }));
569
569
  export {
@@ -1,34 +1,35 @@
1
1
  import { jsx as f } from "react/jsx-runtime";
2
- import { r as g, f as b } from "./keys-DenV5HsJ.js";
2
+ import { r as g } from "./adapter-CgoRd_uP.js";
3
+ import { f as b } from "./keys-6_gqLhcv.js";
3
4
  function y(n) {
4
5
  return typeof n == "string" || typeof n == "number" || typeof n == "boolean" || typeof n == "bigint" ? String(n) : "";
5
6
  }
6
- function h(n, i, s) {
7
- var o;
8
- const a = n.rows[s];
7
+ function h(n, i, o) {
8
+ var s;
9
+ const a = n.rows[o];
9
10
  if (!a) return;
10
11
  const t = (c) => {
11
12
  const e = n.columns.findIndex(({ name: u }) => u === c);
12
13
  return e >= 0 ? y(a[e]) : "";
13
14
  }, l = t(i.encoding.id), d = t(i.encoding.category) || t(i.encoding.label), r = t(i.encoding.series);
14
- return ((o = i.radial) == null ? void 0 : o.mode) === "partition" ? g(r, l || d) : l || b(d, r);
15
+ return ((s = i.radial) == null ? void 0 : s.mode) === "partition" ? g(r, l || d) : l || b(d, r);
15
16
  }
16
- function k(n, i, s, a) {
17
+ function k(n, i, o, a) {
17
18
  const t = n.rows[a];
18
19
  return t ? [
19
- { field: [i.encoding.category, i.encoding.label].find((r) => !!r && n.columns.some(({ name: o }) => o === r)), formatted: !1 },
20
+ { field: [i.encoding.category, i.encoding.label].find((r) => !!r && n.columns.some(({ name: s }) => s === r)), formatted: !1 },
20
21
  { field: i.encoding.series, formatted: !1 },
21
22
  { field: i.encoding.value, formatted: !0 }
22
- ].filter((r) => !!r.field).flatMap(({ field: r, formatted: o }) => {
23
+ ].filter((r) => !!r.field).flatMap(({ field: r, formatted: s }) => {
23
24
  const c = n.columns.findIndex(({ name: u }) => u === r);
24
25
  if (c < 0) return [];
25
- const e = o || i.format[r] ? s(r, t[c]) : y(t[c]);
26
+ const e = s || i.format[r] ? o(r, t[c]) : y(t[c]);
26
27
  return e ? [e] : [];
27
28
  }).join(", ") : "";
28
29
  }
29
- function C({ actionable: n, format: i, frame: s, label: a, onHover: t, onSelect: l, panel: d, translate: r }) {
30
- return /* @__PURE__ */ f("div", { "aria-label": a, className: "lens-chart-keyboard-actions", role: "list", children: s.rows.map((o, c) => {
31
- const e = h(s, d, c), u = k(s, d, i, c) || String(e ?? c + 1);
30
+ function D({ actionable: n, format: i, frame: o, label: a, onHover: t, onSelect: l, panel: d, translate: r }) {
31
+ return /* @__PURE__ */ f("div", { "aria-label": a, className: "lens-chart-keyboard-actions", role: "list", children: o.rows.map((s, c) => {
32
+ const e = h(o, d, c), u = k(o, d, i, c) || String(e ?? c + 1);
32
33
  return /* @__PURE__ */ f("div", { role: "listitem", children: n && e !== void 0 ? /* @__PURE__ */ f(
33
34
  "button",
34
35
  {
@@ -47,6 +48,6 @@ function C({ actionable: n, format: i, frame: s, label: a, onHover: t, onSelect:
47
48
  }) });
48
49
  }
49
50
  export {
50
- C,
51
+ D as C,
51
52
  h as c
52
53
  };