react-semaphor 0.1.560 → 0.1.561

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 (107) hide show
  1. package/dist/analytics-protocol/index.js +353 -349
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +5 -5
  4. package/dist/brand-studio/index.js +9 -9
  5. package/dist/briefings/index.js +5 -5
  6. package/dist/chunks/{analytics-base-schemas-CHLxsPfX.js → analytics-base-schemas-CB3oFAXk.js} +199 -171
  7. package/dist/chunks/{assistant-chat-Bu2fFm_I.js → assistant-chat-DiVHY3Hw.js} +27 -28
  8. package/dist/chunks/bookmark-impact-CR09dpkn.js +75 -0
  9. package/dist/chunks/bookmark-state-BusLpkb7.js +743 -0
  10. package/dist/chunks/{braces-Da41xfUd.js → braces-u8VorWJc.js} +1 -1
  11. package/dist/chunks/{comparison-window-caption-4FNkMrzE.js → comparison-window-caption-DDsIWJYT.js} +108 -108
  12. package/dist/chunks/{context-BgPDzLHZ.js → context-TUjw9eqr.js} +1 -1
  13. package/dist/chunks/{custom-visual-inputs-Dz-enUNR.js → custom-visual-inputs-DfolidZ9.js} +1 -1
  14. package/dist/chunks/{dashboard-_MeBuy67.js → dashboard-BRdZBPqr.js} +1 -1
  15. package/dist/chunks/{dashboard-briefing-launcher-CEi4Pr_v.js → dashboard-briefing-launcher-CgvTLndW.js} +161 -162
  16. package/dist/chunks/{dashboard-controls-Bi7fyG-4.js → dashboard-controls-B4vfSzTF.js} +881 -945
  17. package/dist/chunks/{dashboard-json-B1mU_OMa.js → dashboard-json-Y3MF59g7.js} +5 -5
  18. package/dist/chunks/document-dashboard-inputs-CvBbFTUA.js +1718 -0
  19. package/dist/chunks/{edit-dashboard-visual-0CJN31Y3.js → edit-dashboard-visual-DwjZcxj-.js} +6112 -6146
  20. package/dist/chunks/{filter-reach-copy-BF4w4kI2.js → filter-reach-copy-bijwf_-b.js} +1250 -1392
  21. package/dist/chunks/{filter-value-text-CRC-K_l_.js → filter-value-text-DFnhwuEW.js} +3 -3
  22. package/dist/chunks/global-date-filter-utils-BXgCpvQM.js +15142 -0
  23. package/dist/chunks/{index-DtHidOPV.js → index-ClwbY3BL.js} +197 -198
  24. package/dist/chunks/{layout-grid-BvsH4RY2.js → layout-grid-CtvCBfOm.js} +1 -1
  25. package/dist/chunks/{list-filter-Dg0otx5E.js → list-filter-BklYgciR.js} +1 -1
  26. package/dist/chunks/{matrix-analytical-definition-CM18W8w6.js → matrix-analytical-definition-pU51-JmY.js} +4 -4
  27. package/dist/chunks/{matrix-card-HPskLaPy.js → matrix-card-CUorIB7Q.js} +3 -3
  28. package/dist/chunks/{matrix-member-presentation-Bbrfrke4.js → matrix-member-presentation-Df5UgCGN.js} +1 -1
  29. package/dist/chunks/{matrix-operation-contract-WPv4R-H_.js → matrix-operation-contract-BSiGEXVC.js} +255 -248
  30. package/dist/chunks/{metric-comparison-ljMKYZKa.js → metric-comparison-95aC0uEO.js} +6 -6
  31. package/dist/chunks/{model-change-Ccn1zaxl.js → model-change-B5wQhg5G.js} +1 -1
  32. package/dist/chunks/{palette-Bsh376zO.js → palette-DTnMhipt.js} +1 -1
  33. package/dist/chunks/pivot-result-contract-expectations-Bo-86vwS.js +56 -0
  34. package/dist/chunks/{pivot-result-identity-vS9TSh4f.js → pivot-result-identity-olvXJoB9.js} +1 -1
  35. package/dist/chunks/{report-preferences-dialog-BV8L0SeS.js → report-preferences-dialog-C2YUIwKG.js} +14 -14
  36. package/dist/chunks/{report-runtime-context-BZQh9ywy.js → report-runtime-context-DoIUr3MP.js} +2 -2
  37. package/dist/chunks/resolve-dashboard-input-context-q_iiNXE1.js +6503 -0
  38. package/dist/chunks/{save-B5EAsgQF.js → save-DH4RyrnG.js} +1 -1
  39. package/dist/chunks/{saved-dashboard-context-n2Wn11cV.js → saved-dashboard-context-8jqfI7hI.js} +12 -12
  40. package/dist/chunks/{selection-reducer-D0YnaAD9.js → selection-reducer-CV7K4FI6.js} +1 -1
  41. package/dist/chunks/{semaphor-ready-indicator-XLBLOJ2V.js → semaphor-ready-indicator-E2XWyibu.js} +30253 -31076
  42. package/dist/chunks/{shelf-drop-preview-context-DHMa54a-.js → shelf-drop-preview-context-C29EUzDp.js} +7 -7
  43. package/dist/chunks/{source-entity-resolution-dUG5VWRm.js → source-entity-resolution-BXI3nQ5Z.js} +1 -1
  44. package/dist/chunks/{switch-ByxH4M7t.js → switch-balDSHc7.js} +3 -3
  45. package/dist/chunks/{table-export-sheet-C_GdeTYU.js → table-export-sheet-CK8tvh4d.js} +1 -1
  46. package/dist/chunks/temporal-input-presentation-B77JsAzU.js +5002 -0
  47. package/dist/chunks/{token-types-CQtXUVMy.js → token-types-DhYH5YKb.js} +1 -1
  48. package/dist/chunks/{upload-wbR-NVzq.js → upload-Ufj8vjyn.js} +1 -1
  49. package/dist/chunks/{use-create-flow-overlay-state-CEBaLOKC.js → use-create-flow-overlay-state-9WsnzEO5.js} +6 -6
  50. package/dist/chunks/{validators-CXTneCA4.js → validators-BtaCFIEB.js} +37 -37
  51. package/dist/chunks/{zoned-wall-clock-B1n_WjW3.js → zoned-wall-clock-CGLVI40Q.js} +1 -1
  52. package/dist/dashboard/index.js +2 -2
  53. package/dist/dashboard-authoring/index.js +2400 -1856
  54. package/dist/data-app-sdk/index.js +20 -20
  55. package/dist/data-app-sdk-adapters/index.js +3 -3
  56. package/dist/data-app-sdk-validation/index.js +10 -10
  57. package/dist/format-utils/index.js +257 -256
  58. package/dist/index.js +214 -215
  59. package/dist/report-runtime-context/index.js +2 -2
  60. package/dist/style.css +1 -1
  61. package/dist/surfboard/index.js +2 -2
  62. package/dist/types/components/dashboard/summary-number-formatter.d.ts +6 -0
  63. package/dist/types/index.js +50 -51
  64. package/dist/types/lib/formatters/kpi-number-formatter.d.ts +41 -0
  65. package/dist/types/lib/stores/editor-store.d.ts +9 -1
  66. package/dist/types/lib/stores/table-actions.d.ts +0 -2
  67. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +10 -0
  68. package/dist/types/shared/analytics-protocol/measure-aggregation-profile.d.ts +12 -0
  69. package/dist/types/shared/dashboard-authoring/card-settings/apply-card-settings.d.ts +11 -0
  70. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +52 -0
  71. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +14 -0
  72. package/dist/types/shared/dashboard-authoring/card-settings/carry-column-settings.d.ts +3 -0
  73. package/dist/types/shared/dashboard-authoring/card-settings/column-format-write.d.ts +8 -0
  74. package/dist/types/shared/dashboard-authoring/card-settings/column-names.d.ts +51 -0
  75. package/dist/types/shared/dashboard-authoring/card-settings/column-sources.d.ts +14 -0
  76. package/dist/types/shared/dashboard-authoring/card-settings/confirm-class.d.ts +9 -0
  77. package/dist/types/shared/dashboard-authoring/card-settings/highlight-inputs.d.ts +19 -0
  78. package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +15 -0
  79. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +102 -0
  80. package/dist/types/shared/dashboard-authoring/card-settings/read-card-settings.d.ts +10 -0
  81. package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-highlights.d.ts +14 -0
  82. package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-settings.d.ts +59 -0
  83. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +40 -0
  84. package/dist/types/shared/dashboard-authoring/card-settings/views.d.ts +28 -0
  85. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +6 -0
  86. package/dist/types/shared/dashboard-authoring/changes/card-types.d.ts +32 -0
  87. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +539 -22
  88. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +27 -8
  89. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +25 -1
  90. package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +1 -8
  91. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  92. package/dist/types/shared/dashboard-authoring/index.d.ts +3 -0
  93. package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +123 -0
  94. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +21 -1
  95. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +10 -4
  96. package/dist/types/shared/dashboard-viewer/bookmark-impact.d.ts +33 -0
  97. package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +8 -1
  98. package/dist/types/shared/format-utils/raw-temporal.d.ts +16 -0
  99. package/package.json +2 -2
  100. package/dist/chunks/bookmark-state-BFY9oNmr.js +0 -111
  101. package/dist/chunks/document-dashboard-inputs-CkWfDB8c.js +0 -3010
  102. package/dist/chunks/global-date-filter-utils-D8365uPH.js +0 -12889
  103. package/dist/chunks/pivot-result-contract-expectations-Bl5suy4-.js +0 -1832
  104. package/dist/chunks/raw-temporal-presentation-BHm7s-hz.js +0 -540
  105. package/dist/chunks/resolve-dashboard-input-context-CAMiWvyR.js +0 -5280
  106. package/dist/chunks/table-settings-Imz0FgWi.js +0 -637
  107. package/dist/chunks/temporal-input-presentation-uvNK_tM0.js +0 -3228
@@ -1,16 +1,16 @@
1
1
  import { z as e } from "zod";
2
- const E = [
2
+ const P = [
3
3
  "missing_dependency",
4
4
  "missing_relationship",
5
5
  "population_required",
6
6
  "ambiguous_relationship"
7
7
  ];
8
- function _e(t) {
9
- return E.includes(
8
+ function ve(t) {
9
+ return P.includes(
10
10
  t
11
11
  );
12
12
  }
13
- const ve = 200, D = [
13
+ const Re = 200, D = [
14
14
  "second",
15
15
  "minute",
16
16
  "hour",
@@ -20,10 +20,10 @@ const ve = 200, D = [
20
20
  "quarter",
21
21
  "year"
22
22
  ];
23
- function Re(t) {
23
+ function Te(t) {
24
24
  return typeof t == "string" && D.includes(t);
25
25
  }
26
- const N = [
26
+ const Z = [
27
27
  "week_of_short",
28
28
  "week_of_long",
29
29
  "quarter_short",
@@ -38,7 +38,7 @@ const N = [
38
38
  ], ke = {
39
39
  invalidMetadata: "invalid_raw_temporal_metadata"
40
40
  };
41
- function U(t) {
41
+ function B(t) {
42
42
  return t === "second" || t === "minute" || t === "hour" ? "datetime" : "date";
43
43
  }
44
44
  const xe = {
@@ -46,17 +46,17 @@ const xe = {
46
46
  invalidMetadata: "invalid_temporal_bucket_metadata",
47
47
  invalidValue: "invalid_temporal_bucket_value"
48
48
  }, Ie = "__auto_count__";
49
- function V(t) {
49
+ function G(t) {
50
50
  try {
51
51
  return new Intl.DateTimeFormat("en-US", { timeZone: t }).format(), !0;
52
52
  } catch {
53
53
  return !1;
54
54
  }
55
55
  }
56
- const q = 20;
56
+ const z = 20;
57
57
  function d(t) {
58
58
  if (!(typeof t != "number" || !Number.isFinite(t)))
59
- return Math.max(0, Math.min(q, Math.trunc(t)));
59
+ return Math.max(0, Math.min(z, Math.trunc(t)));
60
60
  }
61
61
  function s(t) {
62
62
  return typeof t == "string" ? t : void 0;
@@ -67,12 +67,12 @@ function S(t) {
67
67
  function _(t) {
68
68
  return typeof t == "boolean" ? t : void 0;
69
69
  }
70
- function P(t) {
70
+ function L(t) {
71
71
  if (typeof t != "string") return;
72
72
  const a = t.trim().toUpperCase();
73
73
  return /^[A-Z]{3}$/.test(a) ? a : void 0;
74
74
  }
75
- function B(t) {
75
+ function $(t) {
76
76
  return typeof t == "number" && Number.isFinite(t) ? t : void 0;
77
77
  }
78
78
  function c(t) {
@@ -80,22 +80,22 @@ function c(t) {
80
80
  Object.entries(t).filter(([, a]) => a !== void 0)
81
81
  );
82
82
  }
83
- const Z = /* @__PURE__ */ new Set(["number", "currency", "percent", "percentage", "scientific"]), G = /* @__PURE__ */ new Set(["millisecond", "second", "minute", "hour", "day"]);
83
+ const H = /* @__PURE__ */ new Set(["number", "currency", "percent", "percentage", "scientific"]), K = /* @__PURE__ */ new Set(["millisecond", "second", "minute", "hour", "day"]);
84
84
  function v(t) {
85
- return typeof t == "string" && G.has(t) ? t : void 0;
85
+ return typeof t == "string" && K.has(t) ? t : void 0;
86
86
  }
87
- function z(t) {
87
+ function W(t) {
88
88
  const a = t.percentValueMode ?? "fraction";
89
89
  if (t.scale === 1 && a === "whole") {
90
- const { scale: n, ...f } = t;
91
- return { ...f, percentValueMode: "whole" };
90
+ const { scale: i, ...b } = t;
91
+ return { ...b, percentValueMode: "whole" };
92
92
  }
93
- const o = t.minimumFractionDigits ?? (t.maximumFractionDigits === void 0 ? 1 : 0), i = t.maximumFractionDigits ?? Math.max(o, 1);
93
+ const o = t.minimumFractionDigits ?? (t.maximumFractionDigits === void 0 ? 1 : 0), n = t.maximumFractionDigits ?? Math.max(o, 1);
94
94
  return c({
95
95
  type: "number",
96
96
  scale: a === "whole" ? t.scale : t.scale * 100,
97
97
  minimumFractionDigits: o,
98
- maximumFractionDigits: i,
98
+ maximumFractionDigits: n,
99
99
  useGrouping: t.useGrouping,
100
100
  prefix: t.prefix,
101
101
  suffix: `%${t.suffix ?? ""}`,
@@ -103,44 +103,44 @@ function z(t) {
103
103
  signDisplay: t.signDisplay
104
104
  });
105
105
  }
106
- function L(t) {
106
+ function X(t) {
107
107
  const a = t.type === "percentage" ? "percent" : t.type;
108
- let o = d(t.minimumFractionDigits), i = d(t.maximumFractionDigits);
109
- const n = d(t.decimals);
110
- o === void 0 && i === void 0 && n !== void 0 && (o = n, i = n), o !== void 0 && i !== void 0 && o > i && ([o, i] = [i, o]);
111
- const f = t.negativeStyle === "parentheses" || t.negativeStyle === "minus" ? t.negativeStyle : void 0, O = t.signDisplay === "auto" || t.signDisplay === "always" || t.signDisplay === "exceptZero" || t.signDisplay === "never" ? t.signDisplay : void 0, m = c({
108
+ let o = d(t.minimumFractionDigits), n = d(t.maximumFractionDigits);
109
+ const i = d(t.decimals);
110
+ o === void 0 && n === void 0 && i !== void 0 && (o = i, n = i), o !== void 0 && n !== void 0 && o > n && ([o, n] = [n, o]);
111
+ const b = t.negativeStyle === "parentheses" || t.negativeStyle === "minus" ? t.negativeStyle : void 0, q = t.signDisplay === "auto" || t.signDisplay === "always" || t.signDisplay === "exceptZero" || t.signDisplay === "never" ? t.signDisplay : void 0, m = c({
112
112
  type: a,
113
- currency: a === "currency" ? P(t.currency) : void 0,
113
+ currency: a === "currency" ? L(t.currency) : void 0,
114
114
  minimumFractionDigits: o,
115
- maximumFractionDigits: i,
115
+ maximumFractionDigits: n,
116
116
  useGrouping: _(t.useGrouping) ?? _(t.thousandsSeparator),
117
117
  prefix: s(t.prefix),
118
118
  // Intl adds the % of a percent; a stored '%' suffix on one is the same sign.
119
119
  suffix: a === "percent" && t.suffix === "%" ? void 0 : s(t.suffix),
120
- negativeStyle: f,
120
+ negativeStyle: b,
121
121
  compact: _(t.compact),
122
- scale: B(t.scale),
122
+ scale: $(t.scale),
123
123
  percentValueMode: a === "percent" ? t.percentValueMode === "whole" ? "whole" : "fraction" : void 0,
124
- signDisplay: O
124
+ signDisplay: q
125
125
  });
126
- return m.type === "percent" && m.scale !== void 0 ? z(m) : m;
126
+ return m.type === "percent" && m.scale !== void 0 ? W(m) : m;
127
127
  }
128
- function $(t) {
128
+ function Y(t) {
129
129
  if (!t || typeof t != "object" || Array.isArray(t)) return;
130
130
  const a = t;
131
131
  if (a.type === "temporal_bucket") {
132
132
  const o = a.presentation;
133
133
  return o && typeof o == "object" && !Array.isArray(o) ? { type: "temporal_bucket", presentation: o } : void 0;
134
134
  }
135
- if (typeof a.type == "string" && Z.has(a.type))
136
- return L(a);
135
+ if (typeof a.type == "string" && H.has(a.type))
136
+ return X(a);
137
137
  if (a.type === "date" || a.type === "datetime") {
138
- const o = S(a.pattern), i = a.preset === "short" || a.preset === "long" || a.preset === "numeric" || a.preset === "iso" ? a.preset : void 0, n = o && (a.dialect === "date_fns" || a.dialect === "semaphor_tokens") ? a.dialect : void 0;
138
+ const o = S(a.pattern), n = a.preset === "short" || a.preset === "long" || a.preset === "numeric" || a.preset === "iso" ? a.preset : void 0, i = o && (a.dialect === "date_fns" || a.dialect === "semaphor_tokens") ? a.dialect : void 0;
139
139
  return c({
140
140
  type: "date",
141
141
  pattern: o,
142
- dialect: n,
143
- preset: o ? void 0 : i,
142
+ dialect: i,
143
+ preset: o ? void 0 : n,
144
144
  relative: a.relative === !0 ? !0 : void 0,
145
145
  timezone: S(a.timezone),
146
146
  sourceTimezone: S(a.sourceTimezone),
@@ -165,7 +165,7 @@ function $(t) {
165
165
  if (a.type === "string")
166
166
  return c({ type: "string", prefix: s(a.prefix), suffix: s(a.suffix) });
167
167
  }
168
- const H = e.record(e.string(), e.unknown()), p = e.array(H), u = e.enum([
168
+ const J = e.record(e.string(), e.unknown()), p = e.array(J), u = e.enum([
169
169
  "SUM",
170
170
  "COUNT",
171
171
  "AVG",
@@ -184,7 +184,7 @@ const H = e.record(e.string(), e.unknown()), p = e.array(H), u = e.enum([
184
184
  "duckdb",
185
185
  "sqlite",
186
186
  "unknown"
187
- ]), K = e.enum(D), h = e.enum([
187
+ ]), Q = e.enum(D), h = e.enum([
188
188
  "dimension",
189
189
  "measure",
190
190
  "date",
@@ -197,27 +197,27 @@ const H = e.record(e.string(), e.unknown()), p = e.array(H), u = e.enum([
197
197
  "date",
198
198
  "datetime",
199
199
  "unknown"
200
- ]), R = e.union([e.number(), e.string(), e.null()]), k = e.enum([
200
+ ]), R = e.union([e.number(), e.string(), e.null()]), T = e.enum([
201
201
  "millisecond",
202
202
  "second",
203
203
  "minute",
204
204
  "hour",
205
205
  "day"
206
- ]), W = e.enum(N), X = e.discriminatedUnion("mode", [
206
+ ]), ee = e.enum(Z), te = e.discriminatedUnion("mode", [
207
207
  e.object({ mode: e.literal("auto") }).strict(),
208
208
  e.object({
209
209
  mode: e.literal("preset"),
210
- preset: W
210
+ preset: ee
211
211
  }).strict(),
212
212
  e.object({
213
213
  mode: e.literal("pattern"),
214
214
  pattern: e.string().min(1)
215
215
  }).strict()
216
- ]), Y = e.object({
216
+ ]), j = e.object({
217
217
  type: e.literal("temporal_bucket"),
218
- presentation: X
219
- }).strict(), J = e.object({
220
- tz: e.string().min(1).refine(V, {
218
+ presentation: te
219
+ }).strict(), ae = e.object({
220
+ tz: e.string().min(1).refine(G, {
221
221
  message: "tz must be a valid IANA timezone"
222
222
  }),
223
223
  weekStart: e.number().int().min(0).max(6),
@@ -225,18 +225,18 @@ const H = e.record(e.string(), e.unknown()), p = e.array(H), u = e.enum([
225
225
  kind: e.literal("month_aligned"),
226
226
  yearStartMonth: e.number().int().min(1).max(12)
227
227
  }).strict().optional()
228
- }).strict(), x = e.object({
228
+ }).strict(), k = e.object({
229
229
  kind: e.literal("temporal_bucket"),
230
- granularity: K,
231
- calendar: J
232
- }).strict(), Q = e.object({
230
+ granularity: Q,
231
+ calendar: ae
232
+ }).strict(), oe = e.object({
233
233
  kind: e.literal("raw_temporal"),
234
234
  valueKind: e.enum(["date", "wall_datetime", "instant"])
235
- }).strict(), r = e.string(), I = e.number().int().min(0).max(20), ee = e.object({
235
+ }).strict(), r = e.string(), x = e.number().int().min(0).max(20), w = e.object({
236
236
  type: e.enum(["number", "currency", "percent", "scientific"]),
237
237
  currency: e.string().regex(/^[A-Z]{3}$/, "Expected an ISO 4217 currency code.").optional(),
238
- minimumFractionDigits: I.optional(),
239
- maximumFractionDigits: I.optional(),
238
+ minimumFractionDigits: x.optional(),
239
+ maximumFractionDigits: x.optional(),
240
240
  useGrouping: e.boolean().optional(),
241
241
  prefix: r.optional(),
242
242
  suffix: r.optional(),
@@ -246,8 +246,8 @@ const H = e.record(e.string(), e.unknown()), p = e.array(H), u = e.enum([
246
246
  percentValueMode: e.enum(["fraction", "whole"]).optional(),
247
247
  signDisplay: e.enum(["auto", "always", "exceptZero", "never"]).optional()
248
248
  }).strict().superRefine((t, a) => {
249
- const { minimumFractionDigits: o, maximumFractionDigits: i } = t;
250
- o !== void 0 && i !== void 0 && o > i && a.addIssue({
249
+ const { minimumFractionDigits: o, maximumFractionDigits: n } = t;
250
+ o !== void 0 && n !== void 0 && o > n && a.addIssue({
251
251
  code: e.ZodIssueCode.custom,
252
252
  path: ["minimumFractionDigits"],
253
253
  message: "minimumFractionDigits must not exceed maximumFractionDigits."
@@ -268,11 +268,11 @@ const H = e.record(e.string(), e.unknown()), p = e.array(H), u = e.enum([
268
268
  path: ["percentValueMode"],
269
269
  message: "Only a percent format has percentValueMode."
270
270
  });
271
- }), te = ["short", "long", "numeric", "iso"], ae = e.object({
271
+ }), ne = ["short", "long", "numeric", "iso"], F = e.object({
272
272
  type: e.literal("date"),
273
273
  pattern: e.string().min(1).optional(),
274
274
  dialect: e.enum(["semaphor_tokens", "date_fns"]).optional(),
275
- preset: e.enum(te).optional(),
275
+ preset: e.enum(ne).optional(),
276
276
  relative: e.boolean().optional(),
277
277
  timezone: e.string().min(1).optional(),
278
278
  sourceTimezone: e.string().min(1).optional(),
@@ -288,26 +288,26 @@ const H = e.record(e.string(), e.unknown()), p = e.array(H), u = e.enum([
288
288
  path: ["dialect"],
289
289
  message: "dialect names the token set of a pattern."
290
290
  });
291
- }), oe = e.object({
291
+ }), A = e.object({
292
292
  type: e.literal("duration"),
293
- inputUnit: k.optional(),
293
+ inputUnit: T.optional(),
294
294
  outputStyle: e.enum(["compact", "digital", "long"]).optional(),
295
- largestUnit: k.optional(),
296
- smallestUnit: k.optional(),
295
+ largestUnit: T.optional(),
296
+ smallestUnit: T.optional(),
297
297
  maxUnits: e.number().int().min(0).max(10).optional(),
298
298
  prefix: r.optional(),
299
299
  suffix: r.optional(),
300
300
  negativeStyle: e.enum(["minus", "parentheses"]).optional()
301
- }).strict(), ie = e.object({
301
+ }).strict(), M = e.object({
302
302
  type: e.literal("string"),
303
303
  prefix: r.optional(),
304
304
  suffix: r.optional()
305
- }).strict(), j = e.union([
306
- ee,
307
- ae,
308
- oe,
309
- ie
310
- ]), ne = e.unknown().superRefine((t, a) => {
305
+ }).strict(), C = e.union([
306
+ w,
307
+ F,
308
+ A,
309
+ M
310
+ ]), ie = e.unknown().superRefine((t, a) => {
311
311
  t && typeof t == "object" && "locale" in t && ["number", "currency", "percent", "percentage", "scientific"].includes(
312
312
  String(t.type)
313
313
  ) && a.addIssue({
@@ -315,28 +315,53 @@ const H = e.record(e.string(), e.unknown()), p = e.array(H), u = e.enum([
315
315
  path: ["locale"],
316
316
  message: "Numeric semantic formats inherit locale from viewer preferences."
317
317
  });
318
- }).transform((t) => $(t) ?? t).pipe(j), Te = e.union([
319
- j,
320
- Y
321
- ]);
322
- function se(t, a) {
323
- return e.object(t).passthrough().superRefine((o, i) => {
324
- for (const n of a)
325
- Object.prototype.hasOwnProperty.call(o, n) || i.addIssue({
318
+ }).transform((t) => Y(t) ?? t).pipe(C), De = e.union([
319
+ C,
320
+ j
321
+ ]), je = ["number", "currency", "percent", "scientific", "duration", "date", "string", "temporal_bucket"];
322
+ function se(t) {
323
+ switch (t) {
324
+ case "number":
325
+ case "currency":
326
+ case "percent":
327
+ case "scientific":
328
+ return w;
329
+ case "date":
330
+ return F;
331
+ case "duration":
332
+ return A;
333
+ case "string":
334
+ return M;
335
+ case "temporal_bucket":
336
+ return j;
337
+ default:
338
+ return;
339
+ }
340
+ }
341
+ function we(t) {
342
+ let a = se(t);
343
+ for (; a && !(a instanceof e.ZodObject); )
344
+ a = a instanceof e.ZodEffects ? a.innerType() : void 0;
345
+ return a ? Object.keys(a.shape) : void 0;
346
+ }
347
+ function re(t, a) {
348
+ return e.object(t).passthrough().superRefine((o, n) => {
349
+ for (const i of a)
350
+ Object.prototype.hasOwnProperty.call(o, i) || n.addIssue({
326
351
  code: "custom",
327
- path: [n],
328
- message: `Required field "${n}" is missing.`
352
+ path: [i],
353
+ message: `Required field "${i}" is missing.`
329
354
  });
330
355
  });
331
356
  }
332
- const w = e.object({
357
+ const O = e.object({
333
358
  kind: e.literal("semantic"),
334
359
  domainId: e.string(),
335
360
  datasetName: e.string(),
336
361
  datasetId: e.string().optional(),
337
362
  label: e.string().optional(),
338
363
  connectionId: e.string().optional()
339
- }).passthrough(), re = e.object({
364
+ }).passthrough(), ce = e.object({
340
365
  kind: e.literal("physical"),
341
366
  connectionId: e.string(),
342
367
  connectionType: e.string().optional(),
@@ -345,27 +370,27 @@ const w = e.object({
345
370
  schemaName: e.string().optional(),
346
371
  label: e.string().optional(),
347
372
  dialect: g.optional()
348
- }).passthrough(), ce = e.object({
373
+ }).passthrough(), le = e.object({
349
374
  kind: e.literal("sql"),
350
375
  connectionId: e.string(),
351
376
  dialect: g.optional(),
352
377
  label: e.string().optional()
353
- }).passthrough(), F = e.union([
354
- w,
355
- re,
356
- ce
357
- ]), le = e.object({
378
+ }).passthrough(), E = e.union([
379
+ O,
380
+ ce,
381
+ le
382
+ ]), pe = e.object({
358
383
  name: e.string(),
359
384
  label: e.string().optional(),
360
385
  role: h.optional(),
361
386
  dataType: y.optional(),
362
- source: F.optional(),
387
+ source: E.optional(),
363
388
  aggregate: u.optional()
364
- }).passthrough(), C = le, pe = e.object({
389
+ }).passthrough(), N = pe, ue = e.object({
365
390
  kind: e.literal("field"),
366
- field: C,
391
+ field: N,
367
392
  aggregate: u.optional()
368
- }).passthrough(), ue = e.object({
393
+ }).passthrough(), me = e.object({
369
394
  kind: e.literal("derived_field"),
370
395
  name: e.string(),
371
396
  label: e.string(),
@@ -375,7 +400,7 @@ const w = e.object({
375
400
  computeStage: e.enum(["row", "aggregate"]),
376
401
  expression: e.string(),
377
402
  expressionLanguage: e.literal("semaphor_sql_template").optional(),
378
- inputs: e.record(pe),
403
+ inputs: e.record(ue),
379
404
  defaultAggregate: u.optional(),
380
405
  aggregationBehavior: e.enum([
381
406
  "additive",
@@ -391,13 +416,13 @@ const w = e.object({
391
416
  "aggregate_then_join",
392
417
  "weighted"
393
418
  ]).optional(),
394
- format: ne.optional(),
419
+ format: ie.optional(),
395
420
  tags: e.array(e.string()).optional()
396
- }).passthrough(), M = ue, De = C.and(
421
+ }).passthrough(), V = me, Fe = N.and(
397
422
  e.object({
398
- derivedField: M.optional()
423
+ derivedField: V.optional()
399
424
  }).passthrough()
400
- ), me = w, de = e.object({
425
+ ), de = O, ge = e.object({
401
426
  kind: e.literal("physical"),
402
427
  connectionId: e.string().optional(),
403
428
  connectionType: e.string().optional(),
@@ -406,22 +431,22 @@ const w = e.object({
406
431
  schemaName: e.string().optional(),
407
432
  label: e.string().optional(),
408
433
  dialect: g.optional()
409
- }).passthrough(), ge = e.object({
434
+ }).passthrough(), he = e.object({
410
435
  kind: e.literal("sql"),
411
436
  connectionId: e.string().optional(),
412
437
  dialect: g.optional(),
413
438
  label: e.string().optional()
414
- }).passthrough(), he = e.union([
415
- me,
439
+ }).passthrough(), ye = e.union([
416
440
  de,
417
- ge
418
- ]), je = e.object({
441
+ ge,
442
+ he
443
+ ]), Ae = e.object({
419
444
  key: e.string().optional(),
420
445
  name: e.string(),
421
446
  label: e.string().optional(),
422
447
  role: h.optional(),
423
448
  dataType: y.optional(),
424
- source: he.optional(),
449
+ source: ye.optional(),
425
450
  aggregate: u.optional(),
426
451
  derivedField: e.never().optional()
427
452
  }).passthrough(), l = e.object({
@@ -431,10 +456,10 @@ const w = e.object({
431
456
  role: h.optional(),
432
457
  dataType: y.optional(),
433
458
  aggregate: u.optional(),
434
- source: F.optional(),
435
- derivedField: M.optional(),
436
- temporalBucket: x.optional(),
437
- rawTemporal: Q.optional(),
459
+ source: E.optional(),
460
+ derivedField: V.optional(),
461
+ temporalBucket: k.optional(),
462
+ rawTemporal: oe.optional(),
438
463
  pivotIdentity: e.object({
439
464
  metricId: e.string().min(1),
440
465
  metricAlias: e.string().min(1),
@@ -442,7 +467,7 @@ const w = e.object({
442
467
  e.object({
443
468
  fieldId: e.string().min(1),
444
469
  value: e.string().nullable(),
445
- temporalBucket: x.optional()
470
+ temporalBucket: k.optional()
446
471
  }).strict()
447
472
  )
448
473
  }).strict().optional()
@@ -452,7 +477,7 @@ const w = e.object({
452
477
  path: ["rawTemporal"],
453
478
  message: "A result column cannot carry both temporalBucket and rawTemporal metadata."
454
479
  }), t.temporalBucket) {
455
- const o = U(
480
+ const o = B(
456
481
  t.temporalBucket.granularity
457
482
  );
458
483
  t.dataType !== o && a.addIssue({
@@ -469,13 +494,13 @@ const w = e.object({
469
494
  message: `${t.rawTemporal.valueKind} raw temporal values require dataType ${o}.`
470
495
  });
471
496
  }
472
- }), we = e.object({
497
+ }), Me = e.object({
473
498
  records: p,
474
499
  columns: e.array(l).optional()
475
- }).passthrough(), Fe = e.object({
500
+ }).passthrough(), Ce = e.object({
476
501
  records: p,
477
502
  columns: e.array(l)
478
- }).passthrough(), A = e.object({
503
+ }).passthrough(), U = e.object({
479
504
  code: e.string(),
480
505
  message: e.string().optional(),
481
506
  invalidField: e.string().optional(),
@@ -484,34 +509,34 @@ const w = e.object({
484
509
  validDateCandidates: e.array(e.string()).optional(),
485
510
  validDimensionCandidates: e.array(e.string()).optional(),
486
511
  recommendedNextStep: e.string()
487
- }).passthrough(), T = e.object({
512
+ }).passthrough(), I = e.object({
488
513
  code: e.string(),
489
514
  message: e.string(),
490
515
  path: e.string().optional(),
491
516
  fieldRole: e.enum(["measure", "date", "dimension", "input", "source", "sql"]).optional(),
492
- repairHint: A.optional()
493
- }).passthrough(), Ce = e.object({
517
+ repairHint: U.optional()
518
+ }).passthrough(), Oe = e.object({
494
519
  ok: e.boolean(),
495
- errors: e.array(T),
496
- warnings: e.array(T),
497
- repairHints: e.array(A)
498
- }).passthrough(), ye = e.object({
520
+ errors: e.array(I),
521
+ warnings: e.array(I),
522
+ repairHints: e.array(U)
523
+ }).passthrough(), fe = e.object({
499
524
  page: e.number(),
500
525
  pageSize: e.number(),
501
526
  pageCount: e.number(),
502
527
  totalCount: e.number(),
503
528
  hasNextPage: e.boolean(),
504
529
  hasPrevPage: e.boolean()
505
- }).passthrough(), b = {
530
+ }).passthrough(), f = {
506
531
  intentId: e.string().optional(),
507
532
  queryPath: e.enum(["query_spec", "sql", "sql_python"]),
508
533
  warnings: e.array(e.string()).optional(),
509
534
  rowCount: e.number().optional(),
510
535
  rowLimitExceeded: e.boolean().optional(),
511
536
  limit: e.number().optional(),
512
- pagination: ye.optional()
513
- }, Me = e.object({
514
- ...b,
537
+ pagination: fe.optional()
538
+ }, Ee = e.object({
539
+ ...f,
515
540
  kind: e.literal("metric"),
516
541
  primaryValue: R,
517
542
  measures: e.record(R).optional(),
@@ -523,8 +548,8 @@ const w = e.object({
523
548
  deltaPercent: e.union([e.number(), e.null()]).optional()
524
549
  }).passthrough().optional(),
525
550
  records: p.optional()
526
- }).passthrough(), Ae = e.object({
527
- ...b,
551
+ }).passthrough(), Ne = e.object({
552
+ ...f,
528
553
  kind: e.literal("records"),
529
554
  columns: e.array(l),
530
555
  records: p,
@@ -547,16 +572,16 @@ const w = e.object({
547
572
  "unsupported_dependency",
548
573
  "override_not_eligible"
549
574
  ]).optional()
550
- }), fe = e.object({
575
+ }), Se = e.object({
551
576
  complete: e.boolean(),
552
577
  reason: e.enum(["unsupported", "truncated"]).optional()
553
- }), Oe = e.object({
554
- ...b,
578
+ }), Ve = e.object({
579
+ ...f,
555
580
  kind: e.literal("inputOptions"),
556
581
  dependencyOutcomes: e.array(be).optional(),
557
- match: fe.optional(),
582
+ match: Se.optional(),
558
583
  options: e.array(
559
- se(
584
+ re(
560
585
  {
561
586
  label: e.string(),
562
587
  value: e.unknown(),
@@ -566,8 +591,8 @@ const w = e.object({
566
591
  ["value"]
567
592
  )
568
593
  )
569
- }).passthrough(), Ee = e.object({
570
- ...b,
594
+ }).passthrough(), Ue = e.object({
595
+ ...f,
571
596
  kind: e.literal("sql"),
572
597
  columns: e.array(l),
573
598
  records: p,
@@ -578,53 +603,56 @@ const w = e.object({
578
603
  }).passthrough().optional()
579
604
  }).passthrough();
580
605
  export {
581
- ce as A,
582
- le as B,
583
- C,
584
- ue as D,
585
- M as E,
586
- De as F,
587
- je as G,
588
- l as H,
589
- we as I,
590
- Fe as J,
591
- T as K,
592
- Ce as L,
593
- ve as M,
594
- Me as N,
595
- E as O,
596
- Ae as P,
597
- be as Q,
606
+ we as A,
607
+ O as B,
608
+ ce as C,
609
+ le as D,
610
+ pe as E,
611
+ N as F,
612
+ me as G,
613
+ V as H,
614
+ Fe as I,
615
+ Ae as J,
616
+ l as K,
617
+ Me as L,
618
+ Re as M,
619
+ Ce as N,
620
+ P as O,
621
+ I as P,
622
+ Oe as Q,
598
623
  ke as R,
599
624
  Ie as S,
600
625
  xe as T,
601
- fe as U,
602
- Oe as V,
603
- Ee as W,
604
- U as a,
605
- x as b,
606
- _e as c,
626
+ Ee as U,
627
+ Ne as V,
628
+ be as W,
629
+ Se as X,
630
+ Ve as Y,
631
+ Ue as Z,
632
+ B as a,
633
+ k as b,
634
+ ve as c,
607
635
  D as d,
608
- Re as e,
609
- N as f,
636
+ Te as e,
637
+ Z as f,
610
638
  p as g,
611
639
  u as h,
612
- V as i,
613
- K as j,
614
- Y as k,
615
- Q as l,
616
- ee as m,
640
+ G as i,
641
+ Q as j,
642
+ j as k,
643
+ oe as l,
644
+ w as m,
617
645
  R as n,
618
- te as o,
619
- ae as p,
620
- oe as q,
621
- H as r,
622
- F as s,
623
- $ as t,
624
- ie as u,
625
- j as v,
626
- ne as w,
627
- Te as x,
628
- w as y,
629
- re as z
646
+ ne as o,
647
+ F as p,
648
+ A as q,
649
+ J as r,
650
+ E as s,
651
+ Y as t,
652
+ M as u,
653
+ C as v,
654
+ ie as w,
655
+ De as x,
656
+ je as y,
657
+ se as z
630
658
  };