react-semaphor 0.1.556 → 0.1.558

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 (79) hide show
  1. package/DATA_APP_SDK.md +6 -29
  2. package/dist/analytics-protocol/index.js +19 -20
  3. package/dist/assistant-context/index.js +1 -1
  4. package/dist/brand-studio/index.js +28 -29
  5. package/dist/briefings/index.js +55 -56
  6. package/dist/chunks/{assistant-chat-C7Acww1T.js → assistant-chat-BCWoP6Rf.js} +78 -80
  7. package/dist/chunks/{bookmark-state-7iZErWnR.js → bookmark-state-PjQpxbG7.js} +3 -3
  8. package/dist/chunks/{braces-o9UiRQes.js → braces-D5Ucy7q1.js} +1 -1
  9. package/dist/chunks/{comparison-window-caption-BseG5aOZ.js → comparison-window-caption-Dc7BaCMz.js} +186 -189
  10. package/dist/chunks/{custom-visual-inputs-ChuKjx27.js → custom-visual-inputs-B-DLRGrV.js} +1 -2
  11. package/dist/chunks/{dashboard-briefing-launcher-qrYd2zkN.js → dashboard-briefing-launcher-Coqghdn6.js} +148 -150
  12. package/dist/chunks/{dashboard-controls-BsapXI2H.js → dashboard-controls-BYWSM2RM.js} +170 -172
  13. package/dist/chunks/{dashboard-json-CJqPqYnI.js → dashboard-json-pPTB5gj0.js} +20 -21
  14. package/dist/chunks/{dashboard-BU6rE5kV.js → dashboard-wK6Bai4V.js} +1 -1
  15. package/dist/chunks/{document-dashboard-inputs-BNSprf5_.js → document-dashboard-inputs-PY_7Xm55.js} +31 -31
  16. package/dist/chunks/{edit-dashboard-visual-CjAdV-WG.js → edit-dashboard-visual-BODxuUeq.js} +7505 -7990
  17. package/dist/chunks/{filter-reach-copy-BTrqtFkh.js → filter-reach-copy-BvJH9JO-.js} +148 -149
  18. package/dist/chunks/{filter-value-text-CJTJDCym.js → filter-value-text-CUBpotVN.js} +3 -3
  19. package/dist/chunks/{global-date-filter-utils-CTVf3dG3.js → global-date-filter-utils-BsFqnnbA.js} +1396 -1391
  20. package/dist/chunks/{index-dIV-Gdsb.js → index-CJW5BdWT.js} +23 -24
  21. package/dist/chunks/{index-B_vIRa-q.js → index-DP_wQl0v.js} +70 -72
  22. package/dist/chunks/{layout-grid-Bgzth8vd.js → layout-grid-CkoXmv0L.js} +1 -1
  23. package/dist/chunks/{list-filter-DsaTbM3J.js → list-filter-B4i25kuc.js} +1 -1
  24. package/dist/chunks/{matrix-analytical-definition-Cg0ioFGQ.js → matrix-analytical-definition-4GTUDheD.js} +3 -3
  25. package/dist/chunks/{matrix-card-yYibXSw1.js → matrix-card-fS_4O7zA.js} +2 -2
  26. package/dist/chunks/{matrix-member-presentation-DEEauKXC.js → matrix-member-presentation-Dj7HaAHC.js} +1 -1
  27. package/dist/chunks/{matrix-operation-contract-C1G6AJNh.js → matrix-operation-contract-CpgLZ7E5.js} +21 -21
  28. package/dist/chunks/{metric-comparison-BfcmwxM1.js → metric-comparison-C8LY7GG5.js} +1 -1
  29. package/dist/chunks/{palette-D10o_yYX.js → palette-stlpjVk4.js} +1 -1
  30. package/dist/chunks/{matrix-formatter-C2kjsCDf.js → pivot-result-contract-expectations-DMk-mKhG.js} +444 -395
  31. package/dist/chunks/{pivot-result-identity-CWi5WrrY.js → pivot-result-identity-CrQ54Xbj.js} +1 -1
  32. package/dist/chunks/{raw-temporal-presentation-DWzLIHc3.js → raw-temporal-presentation-BI2z2LlB.js} +24 -25
  33. package/dist/chunks/report-preferences-dialog-Dc-YyVwf.js +2109 -0
  34. package/dist/chunks/{report-runtime-context-BgM-iNWB.js → report-runtime-context-CohdtiMg.js} +1 -1
  35. package/dist/chunks/{resolve-dashboard-input-context-Df8V5QHW.js → resolve-dashboard-input-context-BZYI1hB0.js} +225 -227
  36. package/dist/chunks/{save-CfJpQQ68.js → save-C1dgxgAu.js} +1 -1
  37. package/dist/chunks/{saved-dashboard-context-VvXI6r03.js → saved-dashboard-context-CIBoMq46.js} +8 -8
  38. package/dist/chunks/selection-reducer-_d6aKJnj.js +46 -0
  39. package/dist/chunks/{semaphor-ready-indicator-fejZmdq9.js → semaphor-ready-indicator-ERTLU7B4.js} +43497 -49629
  40. package/dist/chunks/{shelf-drop-preview-context-BuTCXe-S.js → shelf-drop-preview-context-fEnx6iL_.js} +6 -6
  41. package/dist/chunks/{source-entity-resolution-B46EZIzX.js → source-entity-resolution-DXW1HpKf.js} +1 -1
  42. package/dist/chunks/{switch-Bq92UGId.js → switch-BqUan2mN.js} +1430 -1341
  43. package/dist/chunks/{table-export-sheet-noKl8-en.js → table-export-sheet-CTCTA_bd.js} +1 -1
  44. package/dist/chunks/{table-settings-PpINOzw8.js → table-settings-DF1gdVQR.js} +2 -2
  45. package/dist/chunks/temporal-input-presentation-DoSniQj1.js +2939 -0
  46. package/dist/chunks/{token-types--0bgRCaO.js → token-types-DFyLflLY.js} +1 -1
  47. package/dist/chunks/{upload-BFX7apKV.js → upload-DcoyjkRV.js} +1 -1
  48. package/dist/chunks/{use-create-flow-overlay-state-Cz-ve64t.js → use-create-flow-overlay-state-xhb9YFg-.js} +124 -126
  49. package/dist/chunks/{validators-CZo_H4E6.js → validators-hmfNNQz8.js} +5 -5
  50. package/dist/chunks/zoned-wall-clock-E35Frf9v.js +191 -0
  51. package/dist/dashboard/index.js +2 -2
  52. package/dist/dashboard-authoring/index.js +131 -132
  53. package/dist/data-app-sdk/index.js +788 -4153
  54. package/dist/data-app-sdk-adapters/index.js +2 -2
  55. package/dist/data-app-sdk-validation/index.js +5 -5
  56. package/dist/format-utils/index.js +230 -233
  57. package/dist/index.js +217 -218
  58. package/dist/layouts/index.js +1 -1
  59. package/dist/report-runtime-context/index.js +1 -1
  60. package/dist/style.css +1 -1
  61. package/dist/surfboard/index.js +2 -2
  62. package/dist/types/data-app-sdk/contracts.d.ts +0 -146
  63. package/dist/types/data-app-sdk/index.d.ts +0 -2
  64. package/dist/types/index.js +6 -6
  65. package/dist/types/lib/charts/types.d.ts +1 -2
  66. package/dist/types/lib/types/common-types.d.ts +0 -10
  67. package/dist/types/shared/dashboard-authoring/filter-model/filter-definitions.d.ts +1 -7
  68. package/package.json +1 -4
  69. package/src/data-app-sdk/README.md +7 -31
  70. package/dist/chunks/pivot-result-contract-expectations-fKBHFPfz.js +0 -56
  71. package/dist/chunks/raw-temporal-contract-CjHaUIsE.js +0 -64
  72. package/dist/chunks/report-preferences-dialog-D_wrbIQt.js +0 -2261
  73. package/dist/chunks/selection-reducer-By4CSmEF.js +0 -111
  74. package/dist/chunks/temporal-bucket-DzyadxVY.js +0 -2071
  75. package/dist/chunks/temporal-input-presentation-CJWS4d0L.js +0 -879
  76. package/dist/chunks/x-4f5U2XwU.js +0 -100
  77. package/dist/chunks/zoned-wall-clock-MulfA26h.js +0 -129
  78. package/dist/types/data-app-sdk/devtools/index.d.ts +0 -49
  79. package/dist/types/data-app-sdk/devtools.d.ts +0 -1
@@ -1,100 +0,0 @@
1
- import { forwardRef as c, createElement as a } from "react";
2
- /**
3
- * @license lucide-react v0.453.0 - ISC
4
- *
5
- * This source code is licensed under the ISC license.
6
- * See the LICENSE file in the root directory of this source tree.
7
- */
8
- const w = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), i = (...e) => e.filter((r, t, o) => !!r && o.indexOf(r) === t).join(" ");
9
- /**
10
- * @license lucide-react v0.453.0 - ISC
11
- *
12
- * This source code is licensed under the ISC license.
13
- * See the LICENSE file in the root directory of this source tree.
14
- */
15
- var k = {
16
- xmlns: "http://www.w3.org/2000/svg",
17
- width: 24,
18
- height: 24,
19
- viewBox: "0 0 24 24",
20
- fill: "none",
21
- stroke: "currentColor",
22
- strokeWidth: 2,
23
- strokeLinecap: "round",
24
- strokeLinejoin: "round"
25
- };
26
- /**
27
- * @license lucide-react v0.453.0 - ISC
28
- *
29
- * This source code is licensed under the ISC license.
30
- * See the LICENSE file in the root directory of this source tree.
31
- */
32
- const C = c(
33
- ({
34
- color: e = "currentColor",
35
- size: r = 24,
36
- strokeWidth: t = 2,
37
- absoluteStrokeWidth: o,
38
- className: s = "",
39
- children: n,
40
- iconNode: u,
41
- ...d
42
- }, m) => a(
43
- "svg",
44
- {
45
- ref: m,
46
- ...k,
47
- width: r,
48
- height: r,
49
- stroke: e,
50
- strokeWidth: o ? Number(t) * 24 / Number(r) : t,
51
- className: i("lucide", s),
52
- ...d
53
- },
54
- [
55
- ...u.map(([h, p]) => a(h, p)),
56
- ...Array.isArray(n) ? n : [n]
57
- ]
58
- )
59
- );
60
- /**
61
- * @license lucide-react v0.453.0 - ISC
62
- *
63
- * This source code is licensed under the ISC license.
64
- * See the LICENSE file in the root directory of this source tree.
65
- */
66
- const l = (e, r) => {
67
- const t = c(
68
- ({ className: o, ...s }, n) => a(C, {
69
- ref: n,
70
- iconNode: r,
71
- className: i(`lucide-${w(e)}`, o),
72
- ...s
73
- })
74
- );
75
- return t.displayName = `${e}`, t;
76
- };
77
- /**
78
- * @license lucide-react v0.453.0 - ISC
79
- *
80
- * This source code is licensed under the ISC license.
81
- * See the LICENSE file in the root directory of this source tree.
82
- */
83
- const b = l("ChevronDown", [
84
- ["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
85
- ]);
86
- /**
87
- * @license lucide-react v0.453.0 - ISC
88
- *
89
- * This source code is licensed under the ISC license.
90
- * See the LICENSE file in the root directory of this source tree.
91
- */
92
- const g = l("X", [
93
- ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
94
- ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
95
- ]);
96
- export {
97
- b as C,
98
- g as X,
99
- l as c
100
- };
@@ -1,129 +0,0 @@
1
- function y(t) {
2
- if (!t) return null;
3
- for (const [e, o] of Object.entries(T))
4
- if (w(o, t))
5
- return e;
6
- return null;
7
- }
8
- const d = (t, e) => Math.abs(t) === 1 ? e : `${e}s`;
9
- function h(t, e) {
10
- if (t === 0)
11
- return e === "day" ? "today" : `this ${e}`;
12
- if (t === -1)
13
- return e === "day" ? "yesterday" : `last ${e}`;
14
- if (t === 1)
15
- return e === "day" ? "tomorrow" : `next ${e}`;
16
- const o = Math.abs(t);
17
- return t < 0 ? `${o} ${d(o, e)} ago` : `${o} ${d(o, e)} ahead`;
18
- }
19
- const L = (t) => t.charAt(0).toUpperCase() + t.slice(1);
20
- function l(t, e) {
21
- return L(h(t, e));
22
- }
23
- function p(t) {
24
- if (!t) return null;
25
- if (t.mode === "last" && t.relativeTo === "latest_data") {
26
- const { relativeTo: o, ...s } = t, n = p(s);
27
- return n ? `${n} of data` : null;
28
- }
29
- const e = y(t);
30
- return e || (t.mode === "this" ? t.boundary === "first_day" ? "First day of the month" : t.boundary === "last_day" ? "Last day of the month" : `This ${t.unit}${t.toDate ? " to date" : ""}` : t.mode === "previous" ? `Last ${t.unit}` : t.mode === "last" ? `Last ${t.n} ${d(t.n, t.unit)}` : t.mode === "between" ? t.from === t.to ? l(t.from, t.unit) : `${l(t.from, t.unit)} to ${h(
31
- t.to,
32
- t.unit
33
- )}` : null);
34
- }
35
- function w(t, e) {
36
- return !(t.mode !== e.mode || t.unit !== e.unit || t.mode === "last" && e.mode === "last" && (t.n !== e.n || !!t.complete != !!e.complete || t.relativeTo !== e.relativeTo) || t.mode === "this" && e.mode === "this" && (!!t.toDate != !!e.toDate || t.boundary !== e.boundary) || t.mode === "between" && e.mode === "between" && (t.from !== e.from || t.to !== e.to));
37
- }
38
- const T = {
39
- // Sub-day presets
40
- "Last 30 minutes": { mode: "last", n: 30, unit: "minute" },
41
- "Last 1 hour": { mode: "last", n: 1, unit: "hour" },
42
- "Last 4 hours": { mode: "last", n: 4, unit: "hour" },
43
- "Last 12 hours": { mode: "last", n: 12, unit: "hour" },
44
- "Last 24 hours": { mode: "last", n: 24, unit: "hour" },
45
- // Day presets
46
- Today: { mode: "this", unit: "day" },
47
- Yesterday: { mode: "previous", unit: "day" },
48
- "First day of the month": {
49
- mode: "this",
50
- unit: "month",
51
- boundary: "first_day"
52
- },
53
- "Last day of the month": {
54
- mode: "this",
55
- unit: "month",
56
- boundary: "last_day"
57
- },
58
- "Last 7 days": { mode: "between", unit: "day", from: -6, to: 0 },
59
- "Last 30 days": { mode: "between", unit: "day", from: -29, to: 0 },
60
- "Last 90 days": { mode: "between", unit: "day", from: -89, to: 0 },
61
- // Week presets
62
- "This week": { mode: "this", unit: "week" },
63
- "Last week": { mode: "previous", unit: "week" },
64
- "Last 2 weeks": { mode: "last", n: 2, unit: "week", complete: !0 },
65
- // Month presets
66
- "This month": { mode: "this", unit: "month" },
67
- "Last month": { mode: "previous", unit: "month" },
68
- "Last 3 months": { mode: "last", n: 3, unit: "month", complete: !0 },
69
- "Last 6 months": { mode: "last", n: 6, unit: "month", complete: !0 },
70
- "Last 9 months": { mode: "last", n: 9, unit: "month", complete: !0 },
71
- "Last 12 months": { mode: "last", n: 12, unit: "month", complete: !0 },
72
- // Quarter presets
73
- "This quarter": { mode: "this", unit: "quarter" },
74
- "Last quarter": { mode: "previous", unit: "quarter" },
75
- "Last 4 quarters": { mode: "last", n: 4, unit: "quarter", complete: !0 },
76
- // Year presets
77
- "This year": { mode: "this", unit: "year" },
78
- "Last year": { mode: "previous", unit: "year" }
79
- }, m = /* @__PURE__ */ new Map();
80
- function v(t, e) {
81
- let o = m.get(e);
82
- o || (o = new Intl.DateTimeFormat("en-CA", {
83
- calendar: "gregory",
84
- numberingSystem: "latn",
85
- timeZone: e,
86
- year: "numeric",
87
- month: "2-digit",
88
- day: "2-digit",
89
- hour: "2-digit",
90
- minute: "2-digit",
91
- second: "2-digit",
92
- hourCycle: "h23"
93
- }), m.set(e, o));
94
- const s = o.formatToParts(t), n = (i) => {
95
- var r;
96
- return Number((r = s.find((a) => a.type === i)) == null ? void 0 : r.value);
97
- };
98
- return {
99
- year: n("year"),
100
- month: n("month"),
101
- day: n("day"),
102
- hour: n("hour"),
103
- minute: n("minute"),
104
- second: n("second")
105
- };
106
- }
107
- function c(t) {
108
- const e = /* @__PURE__ */ new Date(0);
109
- return e.setUTCFullYear(t.year, t.month - 1, t.day), e.setUTCHours(t.hour, t.minute, t.second, t.millisecond ?? 0), e.getTime();
110
- }
111
- function u(t, e) {
112
- const o = t - (t % 1e3 + 1e3) % 1e3;
113
- return c(v(new Date(o), e)) - o;
114
- }
115
- const f = 864e5;
116
- function $(t, e) {
117
- const o = c(t), s = u(o - f, e), n = u(o + f, e), i = [.../* @__PURE__ */ new Set([s, n])].map((r) => o - r).filter((r) => u(r, e) === o - r).sort((r, a) => r - a);
118
- return new Date(i.length ? i[0] : o - s);
119
- }
120
- export {
121
- l as a,
122
- $ as b,
123
- y as f,
124
- p as g,
125
- T as p,
126
- w as r,
127
- c as w,
128
- v as z
129
- };
@@ -1,49 +0,0 @@
1
- import { CSSProperties, ReactElement, ReactNode } from 'react';
2
- import { SemaphorActiveInput, SemaphorDataAppDebugConfig, SemaphorDataAppDevtoolsState, SemaphorDataAppTrace, SemaphorQueryDebugOptions, SemaphorQueryDefinition } from '../contracts.js';
3
- import { SemaphorAnalyticsIntent } from '../../shared/analytics-protocol/index.js';
4
- export type SemaphorDataAppQueryTraceController<TData> = {
5
- enabled: boolean;
6
- queryId: string;
7
- trace?: SemaphorDataAppTrace;
8
- start(): void;
9
- success(data: TData, durationMs: number): void;
10
- failure(error: unknown, durationMs: number): void;
11
- ignored(reason: 'newer_inputs' | 'unmounted' | 'superseded'): void;
12
- validationFailure(error: Error): void;
13
- };
14
- type UseSemaphorQueryTraceOptions = {
15
- spec: SemaphorQueryDefinition;
16
- queryKind: SemaphorQueryDefinition['queryKind'];
17
- queryKey: string;
18
- intent?: SemaphorAnalyticsIntent;
19
- activeInputs?: SemaphorActiveInput[];
20
- debug?: SemaphorQueryDebugOptions;
21
- };
22
- export type SemaphorDevtoolsProps = {
23
- buttonPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'relative';
24
- initialIsOpen?: boolean;
25
- panelPosition?: 'bottom' | 'right';
26
- className?: string;
27
- style?: CSSProperties;
28
- };
29
- export type SemaphorDevtoolsInspectButtonProps = {
30
- queryId?: string;
31
- viewId?: string;
32
- label?: string;
33
- className?: string;
34
- style?: CSSProperties;
35
- };
36
- export declare function SemaphorDataAppDevtoolsProvider({ debug, children, }: {
37
- debug?: SemaphorDataAppDebugConfig;
38
- children: ReactNode;
39
- }): import("react").JSX.Element;
40
- export declare function SemaphorViewBoundary({ id, title, children, }: {
41
- id: string;
42
- title?: string;
43
- children: ReactNode;
44
- }): ReactElement;
45
- export declare function SemaphorDevtools({ buttonPosition, initialIsOpen, panelPosition, className, style, }?: SemaphorDevtoolsProps): ReactElement | null;
46
- export declare function SemaphorDevtoolsInspectButton({ queryId, viewId, label, className, style, }?: SemaphorDevtoolsInspectButtonProps): ReactElement | null;
47
- export declare function useSemaphorDevtools(): SemaphorDataAppDevtoolsState;
48
- export declare function useSemaphorQueryTrace<TData>({ spec, queryKind, queryKey, intent, activeInputs, debug, }: UseSemaphorQueryTraceOptions): SemaphorDataAppQueryTraceController<TData>;
49
- export {};
@@ -1 +0,0 @@
1
- export { SemaphorDataAppDevtoolsProvider, SemaphorDevtools, SemaphorDevtoolsInspectButton, SemaphorViewBoundary, useSemaphorDevtools, useSemaphorQueryTrace, type SemaphorDataAppQueryTraceController, type SemaphorDevtoolsInspectButtonProps, type SemaphorDevtoolsProps, } from './devtools/index.js';