react-semaphor 0.1.527 → 0.1.528

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 (43) hide show
  1. package/dist/analytics-protocol/index.js +206 -195
  2. package/dist/brand-studio/index.js +2 -2
  3. package/dist/briefings/index.js +3 -3
  4. package/dist/chunks/{calculated-field-identity-DEhjPSr-.js → calculated-field-identity-DUu-tCQw.js} +2 -2
  5. package/dist/chunks/{card-config-utils-BlIbwkuD.js → card-config-utils-BdPceiw8.js} +3 -3
  6. package/dist/chunks/{dashboard-JNHR0_cZ.js → dashboard-BkskKMck.js} +1 -1
  7. package/dist/chunks/{dashboard-briefing-launcher-D9pFByPh.js → dashboard-briefing-launcher-Bb0RhGRC.js} +8 -8
  8. package/dist/chunks/{dashboard-controls-CJI5ZWMq.js → dashboard-controls-loWTHPMi.js} +10 -10
  9. package/dist/chunks/{dashboard-json-DLdrFry-.js → dashboard-json-DUci_SOR.js} +2 -2
  10. package/dist/chunks/{edit-dashboard-visual-D5LjWle1.js → edit-dashboard-visual-z9WN26w7.js} +14 -14
  11. package/dist/chunks/{editor-action-buttons-G91NQKxU.js → editor-action-buttons-CGSFK9S-.js} +5 -5
  12. package/dist/chunks/{field-aggregations-DeVQLIsP.js → field-aggregations-CdXSo1pb.js} +2 -2
  13. package/dist/chunks/{index-BvJOYbNv.js → index-CTYnXU85.js} +348 -357
  14. package/dist/chunks/{matrix-card-DY45yiUM.js → matrix-card-DhykwdZs.js} +1 -1
  15. package/dist/chunks/{matrix-control-sources-BypfLZsK.js → matrix-control-sources-BV9ywFtJ.js} +4 -4
  16. package/dist/chunks/{matrix-formatter-BoKU3MzZ.js → matrix-formatter-1Mm8x8w7.js} +2 -2
  17. package/dist/chunks/matrix-operation-contract-Dp7kFpVk.js +1383 -0
  18. package/dist/chunks/{pivot-header-presentation-D5v8uyjj.js → pivot-header-presentation-CZa3556D.js} +3 -3
  19. package/dist/chunks/{pivot-result-lifecycle-BWrPhlGT.js → pivot-result-lifecycle-Bqdtknud.js} +1 -1
  20. package/dist/chunks/{report-preferences-dialog-D3hxu4sE.js → report-preferences-dialog-VV0-Ro6F.js} +6 -6
  21. package/dist/chunks/{selection-reducer-C7Um5XN-.js → selection-reducer-IZjBSU6Z.js} +1 -1
  22. package/dist/chunks/{semantic-format-BjBMOSoo.js → semantic-format-BBLvfwua.js} +1 -1
  23. package/dist/chunks/{semaphor-ready-indicator-D46I_4g7.js → semaphor-ready-indicator-DbA4mVQL.js} +9356 -9408
  24. package/dist/chunks/{slider-B6LELqx6.js → slider-DpiJG8lv.js} +7 -7
  25. package/dist/chunks/{switch-_7uBAbYx.js → switch-C4YH-W1X.js} +6 -6
  26. package/dist/dashboard/index.js +1 -1
  27. package/dist/dashboard-authoring/index.js +8 -8
  28. package/dist/data-app-sdk/index.js +3 -3
  29. package/dist/data-app-sdk-adapters/index.js +1 -1
  30. package/dist/data-app-sdk-validation/index.js +2 -2
  31. package/dist/format-utils/index.js +5 -5
  32. package/dist/index.js +13 -13
  33. package/dist/surfboard/index.js +1 -1
  34. package/dist/types/lib/types/semantic-types.d.ts +4 -2
  35. package/dist/types/lib/utils/aggregate-expression-utils.d.ts +0 -4
  36. package/dist/types/shared/analytics-protocol/aggregate-expression.d.ts +89 -0
  37. package/dist/types/shared/analytics-protocol/analytics-refusal.d.ts +32 -0
  38. package/dist/types/shared/analytics-protocol/contracts.d.ts +38 -0
  39. package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
  40. package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +10 -1
  41. package/dist/types/shared/analytics-protocol/measure-aggregation-profile.d.ts +63 -0
  42. package/package.json +1 -1
  43. package/dist/chunks/matrix-operation-contract-BV02rLhu.js +0 -809
@@ -1,17 +1,17 @@
1
1
  import { jsxs as B, jsx as p, Fragment as fe } from "react/jsx-runtime";
2
2
  import * as C from "react";
3
3
  import Ue, { useState as pe, useRef as F, useCallback as W, useEffect as Q, forwardRef as ge, useMemo as T, memo as Qe, Suspense as Ye } from "react";
4
- import { ax as $e, ay as oe, az as he, aA as Ge, aB as je, aC as We, aD as Xe, aE as Je, aF as Ze, aG as et, aH as tt, aI as nt, aJ as rt, aK as ot, aL as st, aM as at } from "./semaphor-ready-indicator-D46I_4g7.js";
5
- import { a4 as Se, a5 as z, a6 as k, c as ve, a7 as it, a2 as L, a3 as ye, C as be, B as lt, a8 as ct, a9 as ut, u as Z, aa as dt, ab as ft, ac as H, ad as mt, ae as Ce, af as pt, ag as gt } from "./switch-_7uBAbYx.js";
4
+ import { ax as $e, ay as oe, az as he, aA as Ge, aB as je, aC as We, aD as Xe, aE as Je, aF as Ze, aG as et, aH as tt, aI as nt, aJ as rt, aK as ot, aL as st, aM as at } from "./semaphor-ready-indicator-DbA4mVQL.js";
5
+ import { a4 as Se, a5 as z, a6 as k, c as ve, a7 as it, a2 as L, a3 as ye, C as be, B as lt, a8 as ct, a9 as ut, u as Z, aa as dt, ab as ft, ac as H, ad as mt, ae as Ce, af as pt, ag as gt } from "./switch-C4YH-W1X.js";
6
6
  import "./x-CXDkqdur.js";
7
7
  import "./validators-CQcG0EPN.js";
8
- import "./matrix-operation-contract-BV02rLhu.js";
8
+ import "./matrix-operation-contract-Dp7kFpVk.js";
9
9
  import "zod";
10
10
  import "../value-format-preferences/index.js";
11
- import { u as Ee, r as we, f as Re } from "./editor-action-buttons-G91NQKxU.js";
12
- import { M as ht } from "./selection-reducer-C7Um5XN-.js";
13
- import "./card-config-utils-BlIbwkuD.js";
14
- import { P as St, r as vt, g as yt, a as me, b as ee, n as bt, c as Ct } from "./index-BvJOYbNv.js";
11
+ import { u as Ee, r as we, f as Re } from "./editor-action-buttons-CGSFK9S-.js";
12
+ import { M as ht } from "./selection-reducer-IZjBSU6Z.js";
13
+ import "./card-config-utils-BdPceiw8.js";
14
+ import { P as St, r as vt, g as yt, a as me, b as ee, n as bt, c as Ct } from "./index-CTYnXU85.js";
15
15
  import { u as Et } from "./appearance-context-DEYtWinQ.js";
16
16
  const dn = Ue.memo(function({
17
17
  context: t = "editor"
@@ -3,21 +3,21 @@ import * as h from "react";
3
3
  import N, { forwardRef as jc, isValidElement as ui, useLayoutEffect as Kh, useState as qc, useRef as fi, useMemo as Yh, useId as Xh, useImperativeHandle as Qh } from "react";
4
4
  import { j as Zh, c as st, C as Uc } from "./x-CXDkqdur.js";
5
5
  import { az as Jh, F as at, d as nr, am as em, v as tm, a0 as nm, q as Ls, N as no, G as zt, E as tn } from "./validators-CQcG0EPN.js";
6
- import { F as Do, r as on, t as rm, u as om, q as Hi } from "./matrix-operation-contract-BV02rLhu.js";
6
+ import { F as Do, r as on, t as rm, u as om, q as Hi } from "./matrix-operation-contract-Dp7kFpVk.js";
7
7
  import "zod";
8
8
  import { DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as pi } from "../value-format-preferences/index.js";
9
9
  import * as Ao from "react-dom";
10
10
  import Wc from "react-dom";
11
11
  import { u as im } from "./appearance-context-DEYtWinQ.js";
12
- import { r as am, l as Ra, v as yt, D as ro, B as Pa, n as sm, o as lm, p as oo, q as cm, s as Bs, h as dm, t as um, b as fm, u as $s, x as $e } from "./card-config-utils-BlIbwkuD.js";
13
- import { A as Gi, z as pm, m as rr, j as Na, N as hm, n as vt, e as zs, u as $t, c as Hc, d as ko, a as io, b as Gc, K as Te, l as mm, k as Kc, r as Yc, o as Xc, f as Qc, h as gm, H as Ar } from "./calculated-field-identity-DEhjPSr-.js";
12
+ import { r as am, l as Ra, v as yt, D as ro, B as Pa, n as sm, o as lm, p as oo, q as cm, s as Bs, h as dm, t as um, b as fm, u as $s, x as $e } from "./card-config-utils-BdPceiw8.js";
13
+ import { A as Gi, z as pm, m as rr, j as Na, N as hm, n as vt, e as zs, u as $t, c as Hc, d as ko, a as io, b as Gc, K as Te, l as mm, k as Kc, r as Yc, o as Xc, f as Qc, h as gm, H as Ar } from "./calculated-field-identity-DUu-tCQw.js";
14
14
  import { a as bm, B as ym, u as Zc, w as Jc, m as vm, z as Oa, A as ed, t as Im, d as Ki, e as Yi, c as Sm, g as ot, i as Cm, b as xm, C as _a, D as td, r as ao, j as wm } from "./relative-date-DAF9J7mt.js";
15
15
  import { b as Tm } from "./report-runtime-context-CtaGGlit.js";
16
- import { i as nd, a as Em, r as Fm } from "./matrix-card-DY45yiUM.js";
16
+ import { i as nd, a as Em, r as Fm } from "./matrix-card-DhykwdZs.js";
17
17
  import "./matrix-continuation-C4sRcjZU.js";
18
18
  import { b as Dm, f as Am, l as km, r as Rm, o as Pm } from "./source-entity-resolution-Bde29mqE.js";
19
19
  import { r as Nm } from "./temporal-bucket-DlFuhCnT.js";
20
- import { u as Ro, c as Om, b as _m, y as Mm, k as Ma, h as hn, o as _n, D as Vm, n as rd, q as od, j as Va } from "./field-aggregations-DeVQLIsP.js";
20
+ import { u as Ro, c as Om, b as _m, y as Mm, k as Ma, h as hn, o as _n, D as Vm, n as rd, q as od, j as Va } from "./field-aggregations-CdXSo1pb.js";
21
21
  import { c as Lm } from "./metric-comparison-Crljx_XY.js";
22
22
  import { C as id } from "./common-types-C6cAQgyh.js";
23
23
  import { g as Bm, a as $m } from "./matrix-definition-Cdn3LoxW.js";
@@ -25,7 +25,7 @@ import "react-dom/client";
25
25
  import { createFrameLayouts as zm } from "../layouts/index.js";
26
26
  import { p as jm, f as qm } from "./temporal-input-presentation-DyMWCZYh.js";
27
27
  import { i as Po } from "./raw-temporal-CdnA_OXJ.js";
28
- import { n as Um, a as ad, b as No, f as La, D as Wm, c as or } from "./semantic-format-BjBMOSoo.js";
28
+ import { n as Um, a as ad, b as No, f as La, D as Wm, c as or } from "./semantic-format-BBLvfwua.js";
29
29
  var sd = Symbol.for("immer-nothing"), js = Symbol.for("immer-draftable"), ae = Symbol.for("immer-state"), Hm = process.env.NODE_ENV !== "production" ? [
30
30
  // All error codes, starting by 0:
31
31
  function(e) {
@@ -1,4 +1,4 @@
1
- import { D as o } from "../chunks/dashboard-JNHR0_cZ.js";
1
+ import { D as o } from "../chunks/dashboard-BkskKMck.js";
2
2
  import { C as s, E as C } from "../chunks/common-types-C6cAQgyh.js";
3
3
  export {
4
4
  s as CONTROL_CARD_DEFAULT_VALUE,
@@ -1,16 +1,16 @@
1
- import { D as L, a as Ce } from "../chunks/matrix-control-sources-BypfLZsK.js";
2
- import { k as Vt, l as zt, n as qt, h as jt, i as Gt, j as Ht, C as Ut, d as Kt, f as Wt, e as Xt, o as Qt, c as Jt, p as Yt, u as Zt, w as ea, y as ta, g as aa, x as ra, m as na, b as ia, r as oa, s as sa, z as da, t as ca, q as la, v as ua } from "../chunks/matrix-control-sources-BypfLZsK.js";
3
- import { c as Se, r as ve } from "../chunks/field-aggregations-DeVQLIsP.js";
4
- import { A as fa, D as ha, n as ma, S as ga, h as ba, j as Ia, w as _a, k as ya, l as Ca, m as Sa, v as va, o as Da, B as Ta, g as Fa, b as ka, i as wa, z as xa, u as Aa, q as Oa, y as Ra, p as Na, e as Ea, f as Ma, d as La, a as Pa, x as Ba, s as $a, t as Va } from "../chunks/field-aggregations-DeVQLIsP.js";
1
+ import { D as L, a as Ce } from "../chunks/matrix-control-sources-BV9ywFtJ.js";
2
+ import { k as Vt, l as zt, n as qt, h as jt, i as Gt, j as Ht, C as Ut, d as Kt, f as Wt, e as Xt, o as Qt, c as Jt, p as Yt, u as Zt, w as ea, y as ta, g as aa, x as ra, m as na, b as ia, r as oa, s as sa, z as da, t as ca, q as la, v as ua } from "../chunks/matrix-control-sources-BV9ywFtJ.js";
3
+ import { c as Se, r as ve } from "../chunks/field-aggregations-CdXSo1pb.js";
4
+ import { A as fa, D as ha, n as ma, S as ga, h as ba, j as Ia, w as _a, k as ya, l as Ca, m as Sa, v as va, o as Da, B as Ta, g as Fa, b as ka, i as wa, z as xa, u as Aa, q as Oa, y as Ra, p as Na, e as Ea, f as Ma, d as La, a as Pa, x as Ba, s as $a, t as Va } from "../chunks/field-aggregations-CdXSo1pb.js";
5
5
  import { q as De, G as K, b8 as Te, H as se, F as Fe, au as ke } from "../chunks/validators-CQcG0EPN.js";
6
- import "../chunks/matrix-operation-contract-BV02rLhu.js";
6
+ import "../chunks/matrix-operation-contract-Dp7kFpVk.js";
7
7
  import "zod";
8
- import { m as $, r as q } from "../chunks/calculated-field-identity-DEhjPSr-.js";
9
- import { C as qa, D as ja, l as Ga, p as Ha, J as Ua, q as Ka, k as Wa, f as Xa, d as Qa, i as Ja, z as Ya, g as Za, u as er, A as tr, h as ar, j as rr, v as nr, n as ir, t as or, B as sr, H as dr, x as cr, o as lr, e as ur, a as pr, b as fr, E as hr, F as mr, c as gr, w as br, G as Ir, s as _r, y as yr, I as Cr } from "../chunks/calculated-field-identity-DEhjPSr-.js";
8
+ import { m as $, r as q } from "../chunks/calculated-field-identity-DUu-tCQw.js";
9
+ import { C as qa, D as ja, l as Ga, p as Ha, J as Ua, q as Ka, k as Wa, f as Xa, d as Qa, i as Ja, z as Ya, g as Za, u as er, A as tr, h as ar, j as rr, v as nr, n as ir, t as or, B as sr, H as dr, x as cr, o as lr, e as ur, a as pr, b as fr, E as hr, F as mr, c as gr, w as br, G as Ir, s as _r, y as yr, I as Cr } from "../chunks/calculated-field-identity-DUu-tCQw.js";
10
10
  import { n as we } from "../chunks/operators-B3zZoskU.js";
11
11
  import { a as vr, b as Dr, r as Tr } from "../chunks/canonical-result-keys-CEQefvdO.js";
12
12
  import { b as kr, c as wr, g as xr, a as Ar, m as Or, r as Rr } from "../chunks/matrix-definition-Cdn3LoxW.js";
13
- import { m as Er, a as Mr, r as Lr } from "../chunks/matrix-card-DY45yiUM.js";
13
+ import { m as Er, a as Mr, r as Lr } from "../chunks/matrix-card-DhykwdZs.js";
14
14
  function y(e) {
15
15
  return e && typeof e == "object" ? e : null;
16
16
  }
@@ -3,10 +3,10 @@ import { jsxs as p, Fragment as Tr, jsx as l } from "react/jsx-runtime";
3
3
  import { createContext as Ae, useContext as Q, useState as _, useRef as T, useEffect as B, useMemo as x, Fragment as ct, useId as kr, useCallback as L, useReducer as ft } from "react";
4
4
  import { q as pt, u as gt, H as mt, I as xe, s as yt } from "../chunks/validators-CQcG0EPN.js";
5
5
  import { a as Co, b9 as Eo } from "../chunks/validators-CQcG0EPN.js";
6
- import { m as ht, ab as bt, aa as vt, z as sr, o as ar, H as St } from "../chunks/matrix-operation-contract-BV02rLhu.js";
6
+ import { m as ht, am as bt, al as vt, z as sr, o as ar, H as St } from "../chunks/matrix-operation-contract-Dp7kFpVk.js";
7
7
  import "zod";
8
- import { m as lr } from "../chunks/matrix-formatter-BoKU3MzZ.js";
9
- import { a as wt, M as It, S as xt, E as qt, C as At, r as dr } from "../chunks/selection-reducer-C7Um5XN-.js";
8
+ import { m as lr } from "../chunks/matrix-formatter-1Mm8x8w7.js";
9
+ import { a as wt, M as It, S as xt, E as qt, C as At, r as dr } from "../chunks/selection-reducer-IZjBSU6Z.js";
10
10
  import { X as Tt, C as kt, j as Ct } from "../chunks/x-CXDkqdur.js";
11
11
  function he(e, r, t) {
12
12
  return {
@@ -1,6 +1,6 @@
1
1
  import { n as y } from "../chunks/operators-B3zZoskU.js";
2
2
  import { m as v, s as m, p as I, a as S } from "../chunks/validators-CQcG0EPN.js";
3
- import { a as F, c as b } from "../chunks/matrix-operation-contract-BV02rLhu.js";
3
+ import { a as F, c as b } from "../chunks/matrix-operation-contract-Dp7kFpVk.js";
4
4
  import "zod";
5
5
  function w(i) {
6
6
  var n, r, o;
@@ -1,10 +1,10 @@
1
1
  import { E as b, F as N, s as E, G as v, u as O, H as K, I as l } from "../chunks/validators-CQcG0EPN.js";
2
- import { m as Q } from "../chunks/matrix-operation-contract-BV02rLhu.js";
2
+ import { m as Q } from "../chunks/matrix-operation-contract-Dp7kFpVk.js";
3
3
  import "zod";
4
4
  import { p as W } from "../chunks/report-runtime-context-CtaGGlit.js";
5
5
  import { r as U } from "../chunks/source-entity-resolution-Bde29mqE.js";
6
6
  import { toSemaphorMetricIntent as G, toSemaphorAnalysisIntent as J, toSemaphorRecordsIntent as V, toSemaphorSqlIntent as L, toSemaphorMatrixIntent as X, toSemaphorInputOptionsIntent as Y } from "../data-app-sdk-adapters/index.js";
7
- import { m as Z } from "../chunks/matrix-card-DY45yiUM.js";
7
+ import { m as Z } from "../chunks/matrix-card-DhykwdZs.js";
8
8
  function ee({
9
9
  intent: e,
10
10
  field: r,
@@ -1,12 +1,12 @@
1
1
  import { R as S, e as h, c as y, b as F, g as x, a as M, i as I, d as N, p as O, f as D, r as $, v as B } from "../chunks/raw-temporal-CdnA_OXJ.js";
2
2
  import { f as E } from "../chunks/numeric-presentation-LvnNY5Ma.js";
3
3
  import { b as L, i as V, j as X, a as G, h as q, g as j, e as U, c as z, d as K, p as Y, k as H, r as W, l as Q, v as Z } from "../chunks/numeric-presentation-LvnNY5Ma.js";
4
- import { P as ee, A as re, D as ae, F as te, b as oe, M as se, a as ie, i as le, g as ne, P as me, l as ue, z as ce, j as pe, h as fe, e as Te, d as Ee, u as be, x as Re, y as Ce, t as Ae, f as ve, q as Pe, m as de, c as we, k as ge, p as _e, w as Se, B as he, n as ye, o as Fe, r as xe, s as Me, v as Ie } from "../chunks/pivot-header-presentation-D5v8uyjj.js";
5
- import { c as Oe, f as De, a as $e, d as Be, g as ke, b as Le, p as Ve, r as Xe } from "../chunks/matrix-formatter-BoKU3MzZ.js";
6
- import { f as b, c as R } from "../chunks/pivot-result-lifecycle-BWrPhlGT.js";
7
- import { d as qe, a as je, C as Ue, b as ze, D as Ke, M as Ye, y as He, P as We, A as Qe, o as Ze, g as Je, j as er, w as rr, x as ar, k as tr, h as or, q as sr, s as ir, u as lr, z as nr, e as mr, p as ur, n as cr, l as pr, m as fr, i as Tr, r as Er, t as br, v as Rr } from "../chunks/pivot-result-lifecycle-BWrPhlGT.js";
4
+ import { P as ee, A as re, D as ae, F as te, b as oe, M as se, a as ie, i as le, g as ne, P as me, l as ue, z as ce, j as pe, h as fe, e as Te, d as Ee, u as be, x as Re, y as Ce, t as Ae, f as ve, q as Pe, m as de, c as we, k as ge, p as _e, w as Se, B as he, n as ye, o as Fe, r as xe, s as Me, v as Ie } from "../chunks/pivot-header-presentation-CZa3556D.js";
5
+ import { c as Oe, f as De, a as $e, d as Be, g as ke, b as Le, p as Ve, r as Xe } from "../chunks/matrix-formatter-1Mm8x8w7.js";
6
+ import { f as b, c as R } from "../chunks/pivot-result-lifecycle-Bqdtknud.js";
7
+ import { d as qe, a as je, C as Ue, b as ze, D as Ke, M as Ye, y as He, P as We, A as Qe, o as Ze, g as Je, j as er, w as rr, x as ar, k as tr, h as or, q as sr, s as ir, u as lr, z as nr, e as mr, p as ur, n as cr, l as pr, m as fr, i as Tr, r as Er, t as br, v as Rr } from "../chunks/pivot-result-lifecycle-Bqdtknud.js";
8
8
  import { M as Ar, d as vr, a as Pr, b as dr, c as wr, m as gr, f as _r, p as Sr, e as hr, g as yr } from "../chunks/matrix-continuation-C4sRcjZU.js";
9
- import { f as xr } from "../chunks/semantic-format-BjBMOSoo.js";
9
+ import { f as xr } from "../chunks/semantic-format-BBLvfwua.js";
10
10
  import { FAST_PDF_POLICY as Ir, PDF_SAFETY_LIMIT_EXCEEDED as Nr, getUtf8ByteLength as Or, isFastPdfOutputSizeEligible as Dr, isFastPdfPageCountEligible as $r, isFastPdfRequestSizeEligible as Br, isFastPdfRowCountEligible as kr } from "../pdf-export-policy/index.js";
11
11
  import { D as Vr, T as Xr, a as Gr, f as qr, i as jr, b as Ur, p as zr, r as Kr, c as Yr, t as Hr, v as Wr } from "../chunks/temporal-bucket-DlFuhCnT.js";
12
12
  import { f as Zr, p as Jr, v as ea } from "../chunks/temporal-input-presentation-DyMWCZYh.js";
package/dist/index.js CHANGED
@@ -1,30 +1,30 @@
1
- import { D as j } from "./chunks/dashboard-JNHR0_cZ.js";
1
+ import { D as j } from "./chunks/dashboard-BkskKMck.js";
2
2
  import { C as Ze, E as ea } from "./chunks/common-types-C6cAQgyh.js";
3
- import { a as ta, R as ra, D as sa } from "./chunks/report-preferences-dialog-D3hxu4sE.js";
3
+ import { a as ta, R as ra, D as sa } from "./chunks/report-preferences-dialog-VV0-Ro6F.js";
4
4
  import { jsx as n, jsxs as C } from "react/jsx-runtime";
5
- import { E as _, F as k, S as I, a as M, U as O, c as U, C as V, V as z, d as $, e as H, f as W, g as q, I as K, R as Q, h as G, i as Y, j as J, k as X } from "./chunks/semaphor-ready-indicator-D46I_4g7.js";
6
- import { ak as na, al as ia, am as la, B as ca, T as ua, A as da, y as pa, x as fa, at as ha, M as ma, m as ga, p as Ca, p as ya, q as ba, z as Ea, af as Da, ah as va, ai as Aa, ag as xa, a6 as wa, a9 as Sa, as as Ta, Z as Ba, ae as Na, ao as _a, a1 as Fa, aa as Pa, w as Ra, v as La, aw as ja, Y as ka, ab as Ia, ac as Ma, a5 as Oa, a8 as Ua, ar as Va, aq as za, ap as $a, av as Ha, au as Wa, a7 as qa, X as Ka, W as Qa, $ as Ga, ad as Ya, a3 as Ja, a0 as Xa, a2 as Za, a4 as et, _ as at, O as tt, K as rt, an as st, t as ot, H as nt, s as it, l as lt, G as ct, J as ut, n as dt, Q as pt, N as ft, L as ht, P as mt, u as gt, r as Ct, o as yt, aj as bt } from "./chunks/semaphor-ready-indicator-D46I_4g7.js";
7
- import { u as Z, P as ee, a as ae, B as te, c as B, b as re, d as se } from "./chunks/switch-_7uBAbYx.js";
8
- import { a1 as Dt, M as vt, z as At, A as xt, E as wt, O as St, N as Tt, W as Bt, X as Nt, K as _t, D as Ft, J as Pt, Q as Rt, H as Lt, G as jt, F as kt, Y as It, V as Mt, Z as Ot, $ as Ut, _ as Vt, a0 as zt, a3 as $t, a2 as Ht } from "./chunks/switch-_7uBAbYx.js";
5
+ import { E as _, F as k, S as I, a as M, U as O, c as U, C as V, V as z, d as $, e as H, f as W, g as q, I as K, R as Q, h as G, i as Y, j as J, k as X } from "./chunks/semaphor-ready-indicator-DbA4mVQL.js";
6
+ import { ak as na, al as ia, am as la, B as ca, T as ua, A as da, y as pa, x as fa, at as ha, M as ma, m as ga, p as Ca, p as ya, q as ba, z as Ea, af as Da, ah as va, ai as Aa, ag as xa, a6 as wa, a9 as Sa, as as Ta, Z as Ba, ae as Na, ao as _a, a1 as Fa, aa as Pa, w as Ra, v as La, aw as ja, Y as ka, ab as Ia, ac as Ma, a5 as Oa, a8 as Ua, ar as Va, aq as za, ap as $a, av as Ha, au as Wa, a7 as qa, X as Ka, W as Qa, $ as Ga, ad as Ya, a3 as Ja, a0 as Xa, a2 as Za, a4 as et, _ as at, O as tt, K as rt, an as st, t as ot, H as nt, s as it, l as lt, G as ct, J as ut, n as dt, Q as pt, N as ft, L as ht, P as mt, u as gt, r as Ct, o as yt, aj as bt } from "./chunks/semaphor-ready-indicator-DbA4mVQL.js";
7
+ import { u as Z, P as ee, a as ae, B as te, c as B, b as re, d as se } from "./chunks/switch-C4YH-W1X.js";
8
+ import { a1 as Dt, M as vt, z as At, A as xt, E as wt, O as St, N as Tt, W as Bt, X as Nt, K as _t, D as Ft, J as Pt, Q as Rt, H as Lt, G as jt, F as kt, Y as It, V as Mt, Z as Ot, $ as Ut, _ as Vt, a0 as zt, a3 as $t, a2 as Ht } from "./chunks/switch-C4YH-W1X.js";
9
9
  import * as w from "react";
10
10
  import F, { useMemo as oe, useEffect as P } from "react";
11
11
  import { D as qt } from "./chunks/token-types-UjyNz95-.js";
12
12
  import { C as Qt, D as Gt, L as Yt, P as Jt, f as Xt, g as Zt, k as er, j as ar, l as tr, e as rr, c as sr, b as or, d as nr, n as ir, h as lr } from "./chunks/validators-CQcG0EPN.js";
13
- import { A as ur, h as dr, D as pr, f as fr, g as hr, e as mr, b as gr, E as Cr, N as yr, U as br, a as Er, V as Dr, W as vr, u as Ar, c as xr, d as wr } from "./chunks/dashboard-briefing-launcher-D9pFByPh.js";
13
+ import { A as ur, h as dr, D as pr, f as fr, g as hr, e as mr, b as gr, E as Cr, N as yr, U as br, a as Er, V as Dr, W as vr, u as Ar, c as xr, d as wr } from "./chunks/dashboard-briefing-launcher-Bb0RhGRC.js";
14
14
  import { u as Tr } from "./chunks/use-debounced-dirty-check-BwAbnX_5.js";
15
15
  import { createRoot as ne } from "react-dom/client";
16
- import "./chunks/slider-B6LELqx6.js";
17
- import "./chunks/matrix-operation-contract-BV02rLhu.js";
16
+ import "./chunks/slider-DpiJG8lv.js";
17
+ import "./chunks/matrix-operation-contract-Dp7kFpVk.js";
18
18
  import "zod";
19
19
  import "./chunks/matrix-continuation-C4sRcjZU.js";
20
20
  import "./value-format-preferences/index.js";
21
21
  import { D as Nr } from "./chunks/report-runtime-context-CtaGGlit.js";
22
22
  import { r as Fr, a as Pr } from "./chunks/pivot-result-identity-CY__BuwI.js";
23
- import "./chunks/field-aggregations-DeVQLIsP.js";
24
- import { K as ie } from "./chunks/calculated-field-identity-DEhjPSr-.js";
25
- import "./chunks/card-config-utils-BlIbwkuD.js";
23
+ import "./chunks/field-aggregations-CdXSo1pb.js";
24
+ import { K as ie } from "./chunks/calculated-field-identity-DUu-tCQw.js";
25
+ import "./chunks/card-config-utils-BdPceiw8.js";
26
26
  import "react-dom";
27
- import "./chunks/index-BvJOYbNv.js";
27
+ import "./chunks/index-CTYnXU85.js";
28
28
  import "./chunks/appearance-context-DEYtWinQ.js";
29
29
  import "./chunks/color-CJvdlFM_.js";
30
30
  import "./chunks/index-CLIro-EG.js";
@@ -1,4 +1,4 @@
1
- import { a, R as s, D as o } from "../chunks/report-preferences-dialog-D3hxu4sE.js";
1
+ import { a, R as s, D as o } from "../chunks/report-preferences-dialog-VV0-Ro6F.js";
2
2
  import { C as f, E as D } from "../chunks/common-types-C6cAQgyh.js";
3
3
  export {
4
4
  f as CONTROL_CARD_DEFAULT_VALUE,
@@ -53,10 +53,12 @@ export interface JoinabilityMap {
53
53
  * Cardinality of the direct auto-join, from THIS dataset's side.
54
54
  * `one_to_many` means one row here matches many rows there, so an
55
55
  * aggregate over this dataset's values joined to that dataset may
56
- * repeat. Informational; drives a warning, never a block. Optional.
56
+ * repeat. `unknown` when the relationship has no authored cardinality
57
+ * (the planner refuses repeat-sensitive measures across it).
58
+ * Informational; drives a warning, never a block. Optional.
57
59
  */
58
60
  cardinality?: {
59
- [targetDataset: string]: 'one_to_one' | 'one_to_many' | 'many_to_one' | 'many_to_many';
61
+ [targetDataset: string]: 'one_to_one' | 'one_to_many' | 'many_to_one' | 'many_to_many' | 'unknown';
60
62
  };
61
63
  };
62
64
  }
@@ -1,6 +1,2 @@
1
1
  import { AggregateFunction } from '../types/explorer-types.js';
2
- export declare const KNOWN_AGGREGATE_FUNCTIONS: ReadonlySet<string>;
3
- export declare const AGGREGATE_NAME_HINT_REGEX: RegExp;
4
- export declare function isLikelyAggregateFunctionName(functionName: string): boolean;
5
- export declare function expressionHasAggregate(expression: string): boolean;
6
2
  export declare function getDefaultAggregateForMetricType(dataType?: string): AggregateFunction;
@@ -0,0 +1,89 @@
1
+ /**
2
+ * The one aggregate vocabulary and expression scanner for measure
3
+ * expressions (analytics owners plan, owner A). Every consumer that asks
4
+ * "does this expression aggregate, with which functions, and how are they
5
+ * combined?" reads it here instead of keeping its own function list or
6
+ * regular expression.
7
+ *
8
+ * Expressions are Semaphor SQL templates: `{field_N}` tokens for inputs,
9
+ * SQL function calls, string literals in single or double quotes.
10
+ */
11
+ /** What an aggregate function computes, for analytics decisions. */
12
+ export type AggregationFunctionKind = 'count' | 'count_distinct' | 'sum' | 'avg' | 'min' | 'max' | 'median'
13
+ /** Unchanged when input rows repeat: BOOL_AND, BIT_OR, ANY_VALUE, ... */
14
+ | 'repeat_safe_other' | 'other';
15
+ /** Whether a SQL function name is an aggregate. */
16
+ export declare function isAggregateFunctionName(name: string): boolean;
17
+ /**
18
+ * What an aggregate call computes. A DISTINCT argument makes COUNT a
19
+ * distinct count; any other aggregate over DISTINCT values counts each
20
+ * value once, so it is unchanged by repeated rows.
21
+ */
22
+ export declare function aggregationFunctionKind(name: string, distinct?: boolean): AggregationFunctionKind;
23
+ /** One outermost aggregate call in an expression. */
24
+ export type ScannedAggregateCall = {
25
+ name: string;
26
+ kind: AggregationFunctionKind;
27
+ distinct: boolean;
28
+ /** Followed by OVER (...): a window, not a group aggregate. */
29
+ windowed: boolean;
30
+ /** Input tokens inside the call (`field_N` names). */
31
+ tokens: string[];
32
+ /** Source offsets for compiler rewrites; end excludes FILTER/OVER suffixes. */
33
+ span: {
34
+ start: number;
35
+ end: number;
36
+ argumentStart: number;
37
+ argumentEnd: number;
38
+ };
39
+ argumentCount: number;
40
+ filtered: boolean;
41
+ };
42
+ export type ScannedAggregateExpression = {
43
+ calls: ScannedAggregateCall[];
44
+ /** An aggregate call inside another aggregate call. */
45
+ nestedAggregate: boolean;
46
+ windowed: boolean;
47
+ /** Input tokens that occur outside every aggregate call, in order. */
48
+ tokensOutsideAggregates: string[];
49
+ /** All data reads belong to recognized aggregate calls; the rest consists
50
+ * only of literals, operators and understood scalar composition. */
51
+ aggregateInputsComplete: boolean;
52
+ /**
53
+ * The expression with each outermost aggregate call replaced by `@N` (its
54
+ * index in `calls`) and each token outside a call by `#token`, for shape
55
+ * analysis.
56
+ */
57
+ skeleton: string;
58
+ };
59
+ /**
60
+ * Scans an expression's aggregate calls (outermost only), their DISTINCT,
61
+ * FILTER and OVER suffixes, and the input tokens outside them.
62
+ */
63
+ export declare function scanAggregateExpression(expression: string, resolvedInputTokens?: ReadonlySet<string>): ScannedAggregateExpression;
64
+ /** A unit of an expression skeleton: an aggregate call or an input token. */
65
+ export type SkeletonUnit = {
66
+ kind: 'call';
67
+ index: number;
68
+ } | {
69
+ kind: 'token';
70
+ token: string;
71
+ };
72
+ /**
73
+ * The shape of a skeleton: one unit (possibly in parentheses), a linear
74
+ * combination of units (sums and differences, scaled by numeric constants),
75
+ * or anything else (ratios, products of units, functions, CASE, constants
76
+ * added to units).
77
+ */
78
+ export type SkeletonShape = {
79
+ kind: 'single';
80
+ unit: SkeletonUnit;
81
+ } | {
82
+ kind: 'linear';
83
+ units: SkeletonUnit[];
84
+ } | {
85
+ kind: 'other';
86
+ hasDivision: boolean;
87
+ };
88
+ /** Classifies a skeleton from `scanAggregateExpression`. */
89
+ export declare function skeletonShape(skeleton: string): SkeletonShape;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * One typed refusal for governed analytics (analytics owners plan, owner C).
3
+ * Wherever a query is refused or fails, the refusal carries one code from
4
+ * this list, the structured details, and the next step, unchanged through
5
+ * every strategy to the tool that maps it once. Input validation keeps its
6
+ * own specific codes (`invalid_dimension`, `missing_measure`, ...); every
7
+ * other failure uses these.
8
+ */
9
+ export declare const ANALYTICS_REFUSAL_CODES: readonly ["invalid_request", "missing_relationship", "ambiguous_relationship", "unsafe_join", "unsupported_capability", "capability_required", "forbidden", "not_found", "execution_failed", "timeout", "budget_exceeded", "cancelled"];
10
+ export type AnalyticsRefusalCode = (typeof ANALYTICS_REFUSAL_CODES)[number];
11
+ export type AnalyticsRefusal = {
12
+ code: AnalyticsRefusalCode;
13
+ message: string;
14
+ /** Structured specifics: planner code, datasets, path, field, SQL. */
15
+ details?: Record<string, unknown>;
16
+ /** What the caller can do next; absent when retrying is the only option. */
17
+ nextStep?: string;
18
+ /** Only warehouse failures and timeouts are worth retrying unchanged. */
19
+ retryable: boolean;
20
+ /** HTTP status for routes that answer with one. */
21
+ status: number;
22
+ };
23
+ export declare function isAnalyticsRefusalCode(value: unknown): value is AnalyticsRefusalCode;
24
+ /** Builds a refusal with the code's status and retry rule. */
25
+ export declare function analyticsRefusal(code: AnalyticsRefusalCode, message: string, extra?: {
26
+ details?: Record<string, unknown>;
27
+ nextStep?: string;
28
+ status?: number;
29
+ }): AnalyticsRefusal;
30
+ /** Reads a refusal carried on a value (an error, a result, a response). */
31
+ export declare function readAnalyticsRefusal(value: unknown): AnalyticsRefusal | undefined;
32
+ export declare function publicAnalyticsRefusal(refusal: Pick<AnalyticsRefusal, 'code'> & Partial<Pick<AnalyticsRefusal, 'status' | 'retryable'>>): AnalyticsRefusal;
@@ -732,7 +732,45 @@ export type SemaphorRelationshipDiagnostics = {
732
732
  fanoutRisk?: {
733
733
  status: 'none' | 'warning' | 'error' | 'unknown';
734
734
  message?: string;
735
+ /** The planner's structured findings (analytics owners plan, owner B). */
736
+ findings?: SemaphorJoinFinding[];
735
737
  };
738
+ /** How queries ran their joins; mixed means component queries used different strategies. */
739
+ joinStrategy?: 'plain_join' | 'aggregate_then_join' | 'mixed' | 'unknown';
740
+ };
741
+ /** One join walked from a measure's dataset, with its cardinality that way. */
742
+ export type SemaphorJoinStep = {
743
+ from: string;
744
+ to: string;
745
+ relationship?: string;
746
+ walked: 'to_one' | 'to_many' | 'many_to_many' | 'unknown';
747
+ };
748
+ /** What a join does to a measure's rows, as the planner classifies it. */
749
+ export type SemaphorJoinFinding =
750
+ /** Rows repeat per member of a bridge or dimension many side: values per member are attributions. */
751
+ {
752
+ kind: 'attribution';
753
+ measureDataset: string;
754
+ via: SemaphorJoinStep[];
755
+ }
756
+ /** Rows repeat per row of another fact (a chasm trap): values are inflated. */
757
+ | {
758
+ kind: 'inflation';
759
+ measureDataset: string;
760
+ otherFact: string;
761
+ via: SemaphorJoinStep[];
762
+ }
763
+ /** A step's cardinality isn't authored, so repeats can't be ruled out. */
764
+ | {
765
+ kind: 'unknown_cardinality';
766
+ measureDataset: string;
767
+ via: SemaphorJoinStep[];
768
+ }
769
+ /** Measures from facts with no direct relationship, combined at a shared grain. */
770
+ | {
771
+ kind: 'cross_fact';
772
+ datasets: string[];
773
+ sharedGrain?: string[];
736
774
  };
737
775
  export type SemaphorAnalyticsPopulation = {
738
776
  scope: 'filtered_query';
@@ -23,6 +23,9 @@ export * from './raw-temporal-contract.js';
23
23
  export * from './relative-date-filter.js';
24
24
  export * from './relative-date-label.js';
25
25
  export * from './operation-temporal-state.js';
26
+ export * from './aggregate-expression.js';
27
+ export * from './measure-aggregation-profile.js';
28
+ export * from './analytics-refusal.js';
26
29
  /**
27
30
  * The saved filter contract, strict: a key outside it (an execution-only
28
31
  * field the server adds while it runs a filter) fails to parse, so a save
@@ -56,10 +56,19 @@ export type MatrixDescriptor = {
56
56
  nativeDataType: string;
57
57
  semanticFormat?: SemaphorValueFormat;
58
58
  };
59
+ /**
60
+ * Matrix failure codes: the shared refusal codes (Plan 2b, owner C) plus the
61
+ * two only a windowed Matrix has.
62
+ */
63
+ export declare const MATRIX_FAILURE_CODES: readonly ["invalid_request", "missing_relationship", "ambiguous_relationship", "unsafe_join", "unsupported_capability", "capability_required", "forbidden", "not_found", "execution_failed", "timeout", "budget_exceeded", "cancelled", "stale_cursor", "source_truncated"];
64
+ export type MatrixFailureCode = (typeof MATRIX_FAILURE_CODES)[number];
59
65
  export type MatrixFailure = {
60
- code: 'invalid_request' | 'unsupported_capability' | 'stale_cursor' | 'forbidden' | 'budget_exceeded' | 'source_truncated' | 'execution_failed' | 'cancelled';
66
+ code: MatrixFailureCode;
61
67
  message: string;
62
68
  detail?: string;
69
+ details?: Record<string, unknown>;
70
+ nextStep?: string;
71
+ status?: number;
63
72
  retryable: boolean;
64
73
  scope: {
65
74
  kind: 'operation';
@@ -0,0 +1,63 @@
1
+ import { AggregationFunctionKind } from './aggregate-expression.js';
2
+ /** The structural fields of a measure the profile reads. */
3
+ export type MeasureProfileField = {
4
+ name?: string;
5
+ role?: string;
6
+ aggregate?: string;
7
+ expression?: string;
8
+ isPreAggregated?: boolean;
9
+ calculatedFormula?: {
10
+ computeStage?: 'row' | 'aggregate';
11
+ inputFields?: ReadonlyArray<MeasureProfileField>;
12
+ };
13
+ derivedField?: {
14
+ computeStage?: 'row' | 'aggregate';
15
+ aggregationBehavior?: string;
16
+ };
17
+ };
18
+ /** How partial results of a measure combine into a larger group. */
19
+ export type MeasureReaggregation =
20
+ /** Sum the partials (SUM, COUNT, and sums of them). */
21
+ {
22
+ kind: 'additive';
23
+ }
24
+ /** Rebuild from summed parts: AVG from SUM and COUNT partials. */
25
+ | {
26
+ kind: 'decomposable_avg';
27
+ }
28
+ /** Take the MIN or MAX of the partials. */
29
+ | {
30
+ kind: 'idempotent';
31
+ fn: 'min' | 'max';
32
+ }
33
+ /** Partials can't be combined; recompute at the larger grain. */
34
+ | {
35
+ kind: 'none';
36
+ reason: 'distinct' | 'median' | 'ratio' | 'window' | 'declared' | 'unresolved' | 'other';
37
+ };
38
+ export type MeasureAggregationProfile = {
39
+ /** `aggregate`: the measure aggregates itself; `row`: it needs `outer`. */
40
+ stage: 'row' | 'aggregate';
41
+ /** The aggregate wrapping a row-stage measure. */
42
+ outer?: AggregationFunctionKind;
43
+ /** Every aggregate the measure computes, nested inputs expanded. */
44
+ calls: Array<{
45
+ kind: AggregationFunctionKind;
46
+ distinct: boolean;
47
+ }>;
48
+ windowed: boolean;
49
+ /** The value is unchanged when input rows repeat (as through a to-many join). */
50
+ repeatSafe: boolean;
51
+ reaggregation: MeasureReaggregation;
52
+ /** MIN and MAX keep their input's type; everything else is a number. */
53
+ outputType: 'numeric' | 'input';
54
+ /** A stable name for labels and result identity. */
55
+ identity: AggregationFunctionKind | 'ratio' | 'linear' | 'expression' | 'unresolved';
56
+ /** The profile could not be determined exactly; every answer is the cautious one. */
57
+ unresolved: boolean;
58
+ };
59
+ /**
60
+ * The aggregation profile of a compiled measure field. Pure; reads only the
61
+ * field and its nested `calculatedFormula.inputFields`.
62
+ */
63
+ export declare function resolveMeasureAggregationProfile(field: MeasureProfileField): MeasureAggregationProfile;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.527",
8
+ "version": "0.1.528",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",