react-semaphor 0.1.526 → 0.1.527

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 (175) hide show
  1. package/DATA_APP_SDK.md +5 -1
  2. package/dist/analytics-protocol/index.js +1179 -296
  3. package/dist/brand-studio/index.js +15 -15
  4. package/dist/briefings/index.js +50 -49
  5. package/dist/chunks/{calculated-field-identity-D1ofR4KJ.js → calculated-field-identity-DEhjPSr-.js} +66 -65
  6. package/dist/chunks/{card-config-utils-9sv4e-Vb.js → card-config-utils-BlIbwkuD.js} +68 -65
  7. package/dist/chunks/{constants-DeLIHVAW.js → constants-DNWVy8Y3.js} +4 -4
  8. package/dist/chunks/dashboard-JNHR0_cZ.js +14 -0
  9. package/dist/chunks/{dashboard-briefing-launcher-DXz1GhFZ.js → dashboard-briefing-launcher-D9pFByPh.js} +372 -359
  10. package/dist/chunks/{dashboard-controls-Df8qOSrs.js → dashboard-controls-CJI5ZWMq.js} +739 -686
  11. package/dist/chunks/{dashboard-json-Xldp0qww.js → dashboard-json-DLdrFry-.js} +10 -10
  12. package/dist/chunks/{edit-dashboard-visual-COHBqyic.js → edit-dashboard-visual-D5LjWle1.js} +6603 -6572
  13. package/dist/chunks/{editor-action-buttons-DahlP57T.js → editor-action-buttons-G91NQKxU.js} +266 -267
  14. package/dist/chunks/{field-aggregations-BQjogiI1.js → field-aggregations-DeVQLIsP.js} +19 -19
  15. package/dist/chunks/{field-dependencies-v-lJNzC7.js → field-dependencies-CGYic38w.js} +1 -1
  16. package/dist/chunks/{index-CbjuruKe.js → index-BvJOYbNv.js} +755 -745
  17. package/dist/chunks/{matrix-analytical-definition-BimC4XIV.js → matrix-analytical-definition-BJyH5-99.js} +1 -1
  18. package/dist/chunks/{matrix-card-CIlz0Dnp.js → matrix-card-DY45yiUM.js} +7 -6
  19. package/dist/chunks/{matrix-control-sources-2VAzGlt8.js → matrix-control-sources-BypfLZsK.js} +11 -11
  20. package/dist/chunks/{matrix-definition-E5gXXSTZ.js → matrix-definition-Cdn3LoxW.js} +3 -3
  21. package/dist/chunks/{semantic-format-Baqp8kD_.js → matrix-formatter-BoKU3MzZ.js} +655 -511
  22. package/dist/chunks/{matrix-member-presentation-Bw7-JCrr.js → matrix-member-presentation-BBW0n1iY.js} +1 -1
  23. package/dist/chunks/matrix-operation-contract-BV02rLhu.js +809 -0
  24. package/dist/chunks/{metric-comparison-BphoJ9bq.js → metric-comparison-Crljx_XY.js} +15 -10
  25. package/dist/chunks/{numeric-presentation-VhMUHfrJ.js → numeric-presentation-LvnNY5Ma.js} +68 -68
  26. package/dist/chunks/pivot-header-presentation-D5v8uyjj.js +618 -0
  27. package/dist/chunks/{pivot-result-identity-BzUQiCEV.js → pivot-result-identity-CY__BuwI.js} +1 -1
  28. package/dist/chunks/{pivot-result-lifecycle-BFO354lk.js → pivot-result-lifecycle-BWrPhlGT.js} +259 -204
  29. package/dist/chunks/{raw-temporal-7bFbXd2a.js → raw-temporal-CdnA_OXJ.js} +10 -10
  30. package/dist/chunks/{raw-temporal-contract-BQZIJ1fn.js → raw-temporal-contract-Bc9z83t-.js} +1 -1
  31. package/dist/chunks/relative-date-DAF9J7mt.js +456 -0
  32. package/dist/chunks/{report-preferences-dialog-BcH-0lR-.js → report-preferences-dialog-D3hxu4sE.js} +131 -132
  33. package/dist/chunks/{report-runtime-context-CxIoGyNM.js → report-runtime-context-CtaGGlit.js} +1 -1
  34. package/dist/chunks/{selection-reducer-NF5C07yM.js → selection-reducer-C7Um5XN-.js} +47 -26
  35. package/dist/chunks/semantic-format-BjBMOSoo.js +192 -0
  36. package/dist/chunks/{semaphor-ready-indicator-BLRDuLr4.js → semaphor-ready-indicator-D46I_4g7.js} +49895 -46141
  37. package/dist/chunks/{slider-BYIH4icg.js → slider-B6LELqx6.js} +81 -82
  38. package/dist/chunks/{source-entity-resolution-Bzefiive.js → source-entity-resolution-Bde29mqE.js} +25 -25
  39. package/dist/chunks/switch-_7uBAbYx.js +24003 -0
  40. package/dist/chunks/{temporal-bucket-PcLFSYWX.js → temporal-bucket-DlFuhCnT.js} +6 -6
  41. package/dist/chunks/{temporal-bucket-contract-DTLDRzgV.js → temporal-bucket-contract-C6lUGPS3.js} +1 -1
  42. package/dist/chunks/temporal-input-presentation-DyMWCZYh.js +195 -0
  43. package/dist/chunks/{token-types-BC6RcUY8.js → token-types-UjyNz95-.js} +1 -1
  44. package/dist/chunks/{validators-CsdOtZI6.js → validators-CQcG0EPN.js} +852 -731
  45. package/dist/chunks/zoned-wall-clock-BkxV9jS2.js +46 -0
  46. package/dist/dashboard/index.js +1 -1
  47. package/dist/dashboard-authoring/index.js +138 -137
  48. package/dist/data-app-sdk/index.js +12 -12
  49. package/dist/data-app-sdk-adapters/index.js +23 -22
  50. package/dist/data-app-sdk-validation/index.js +27 -26
  51. package/dist/format-utils/index.js +247 -329
  52. package/dist/index.js +165 -168
  53. package/dist/report-runtime-context/index.js +2 -2
  54. package/dist/style.css +1 -1
  55. package/dist/surfboard/index.js +1 -1
  56. package/dist/types/briefings/index.d.ts +3 -0
  57. package/dist/types/components/explorer/filters/card-date-filter.d.ts +13 -5
  58. package/dist/types/components/explorer/filters/card-date-selection.d.ts +28 -0
  59. package/dist/types/components/sharing-and-management/dashboard-actions-menu.d.ts +1 -1
  60. package/dist/types/components/sharing-and-management/hooks/use-resource-management.d.ts +0 -1
  61. package/dist/types/components/surfboard/download-settings-dialog.d.ts +8 -0
  62. package/dist/types/components/surfboard/filter/types.d.ts +8 -29
  63. package/dist/types/components/surfboard/filter/use-dashboard-filter-mapping-popover.d.ts +5 -1
  64. package/dist/types/components/ui-custom/date-range-picker.d.ts +18 -2
  65. package/dist/types/components/ui-custom/date-range-presets.d.ts +8 -21
  66. package/dist/types/components/ui-custom/report-calendar.d.ts +18 -0
  67. package/dist/types/components/visual/aggregated-table/utils/export-utils.d.ts +3 -5
  68. package/dist/types/components/visual/data-table/data-table-toolbar.d.ts +1 -1
  69. package/dist/types/components/visual/pivot-table/utils/pivot-table-export-utils.d.ts +3 -1
  70. package/dist/types/index.js +5 -5
  71. package/dist/types/lib/api/exports-api.d.ts +3 -0
  72. package/dist/types/lib/csv-download.d.ts +9 -0
  73. package/dist/types/lib/csv-encoding-options.d.ts +6 -0
  74. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +2 -1
  75. package/dist/types/lib/dashboard-navigation/build-carried-click-context.d.ts +0 -1
  76. package/dist/types/lib/document/document-input-runtime.d.ts +2 -1
  77. package/dist/types/lib/export-utils.d.ts +17 -15
  78. package/dist/types/lib/hooks/explorer/use-filter-builder.d.ts +2 -2
  79. package/dist/types/lib/hooks/use-relative-date-summarizer.d.ts +7 -0
  80. package/dist/types/lib/matrix-table/matrix-application-adapter.d.ts +3 -2
  81. package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +1 -1
  82. package/dist/types/lib/matrix-table/matrix-card-draft.d.ts +1 -1
  83. package/dist/types/lib/matrix-table/matrix-dataset-history.d.ts +47 -0
  84. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +7 -3
  85. package/dist/types/lib/matrix-table/matrix-execution-context.d.ts +2 -0
  86. package/dist/types/lib/matrix-table/matrix-query-transport.d.ts +4 -1
  87. package/dist/types/lib/matrix-table/matrix-runtime-types.d.ts +105 -4
  88. package/dist/types/lib/matrix-table/matrix-runtime.d.ts +43 -2
  89. package/dist/types/lib/matrix-table/use-matrix.d.ts +6 -0
  90. package/dist/types/lib/query-context/build-card-query-context.d.ts +5 -1
  91. package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +0 -1
  92. package/dist/types/lib/query-context/build-global-date-comparison-context.d.ts +1 -2
  93. package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +1 -2
  94. package/dist/types/lib/query-context/dashboard-card-query-key.d.ts +10 -0
  95. package/dist/types/lib/query-context/query-auth-scope.d.ts +5 -0
  96. package/dist/types/lib/stores/dashboard-store.d.ts +9 -4
  97. package/dist/types/lib/temporal-filter/temporal-filter-utils.d.ts +9 -2
  98. package/dist/types/lib/types/common-types.d.ts +5 -0
  99. package/dist/types/lib/types/explorer-types.d.ts +14 -0
  100. package/dist/types/lib/types/token-types.d.ts +0 -1
  101. package/dist/types/lib/utils/card-definition.d.ts +1 -1
  102. package/dist/types/lib/utils/date-timezone-utils.d.ts +4 -46
  103. package/dist/types/lib/utils/filter-default-value-utils.d.ts +8 -2
  104. package/dist/types/lib/utils/inline-filter-utils.d.ts +3 -2
  105. package/dist/types/lib/utils/relative-date-description.d.ts +38 -0
  106. package/dist/types/shared/analytics-protocol/contracts.d.ts +10 -7
  107. package/dist/types/shared/analytics-protocol/index.d.ts +12 -1
  108. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +20 -20
  109. package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +10 -10
  110. package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +8 -8
  111. package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +51 -5
  112. package/dist/types/shared/analytics-protocol/metric-comparison.d.ts +9 -3
  113. package/dist/types/shared/analytics-protocol/operation-temporal-state.d.ts +64 -0
  114. package/dist/types/shared/analytics-protocol/relative-date-filter.d.ts +61 -0
  115. package/dist/types/shared/analytics-protocol/relative-date-label.d.ts +20 -0
  116. package/dist/types/shared/analytics-protocol/runtime-schemas.d.ts +0 -2
  117. package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +314 -0
  118. package/dist/types/shared/analytics-protocol/time-window.d.ts +13 -0
  119. package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +8 -4
  120. package/dist/types/shared/format-utils/exporters/csv-utils.d.ts +46 -15
  121. package/dist/types/shared/format-utils/exporters/index.d.ts +2 -3
  122. package/dist/types/shared/format-utils/flat-table-export-totals.d.ts +2 -1
  123. package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +2 -2
  124. package/dist/types/shared/format-utils/types/format-types.d.ts +0 -42
  125. package/dist/types/shared/temporal/calendar-periods.d.ts +56 -0
  126. package/dist/types/shared/temporal/index.d.ts +5 -0
  127. package/dist/types/shared/temporal/relative-date.d.ts +21 -0
  128. package/dist/types/shared/temporal/temporal-parity-fixtures.d.ts +73 -0
  129. package/dist/types/shared/temporal/time-window-periods.d.ts +21 -0
  130. package/dist/types/shared/temporal/zoned-wall-clock.d.ts +23 -0
  131. package/package.json +1 -17
  132. package/src/data-app-sdk/README.md +6 -3
  133. package/dist/chunks/code-highlight-994tgM9v.js +0 -22265
  134. package/dist/chunks/dashboard-CsHvEtjN.js +0 -15
  135. package/dist/chunks/dashboard-date-comparison-definition-BqNhECUr.js +0 -183
  136. package/dist/chunks/matrix-formatter-WBgtebUT.js +0 -341
  137. package/dist/chunks/matrix-operation-contract-D32U2CSw.js +0 -1802
  138. package/dist/chunks/mouse-pointer-2-BZvGk45-.js +0 -19
  139. package/dist/chunks/pivot-header-presentation-CGtudHo7.js +0 -661
  140. package/dist/chunks/pre-block-Cq1RqhZX.js +0 -3987
  141. package/dist/chunks/search-CJz-QQ0Q.js +0 -24
  142. package/dist/chunks/switch-XaAACBrJ.js +0 -2234
  143. package/dist/chunks/temporal-input-presentation-2RJrvmYL.js +0 -222
  144. package/dist/chunks/update-policy-DhAUtiC8.js +0 -913
  145. package/dist/data-app-builder/index.js +0 -3666
  146. package/dist/data-app-builder-browser-runtime/index.js +0 -8
  147. package/dist/data-app-codegen/index.js +0 -22
  148. package/dist/data-app-codegen-node/index.js +0 -1807
  149. package/dist/types/components/data-app-runtime/published-data-app-runtime.d.ts +0 -7
  150. package/dist/types/components/surfboard/json-to-csv.d.ts +0 -7
  151. package/dist/types/components/visual/data-table/utils/export-utils.d.ts +0 -31
  152. package/dist/types/data-app-builder/browser-runtime.d.ts +0 -174
  153. package/dist/types/data-app-builder/constants.d.ts +0 -14
  154. package/dist/types/data-app-builder/data-app-builder.d.ts +0 -14
  155. package/dist/types/data-app-builder/index.d.ts +0 -1
  156. package/dist/types/data-app-builder/lib/api.d.ts +0 -36
  157. package/dist/types/data-app-builder/lib/context-select.d.ts +0 -3
  158. package/dist/types/data-app-builder/lib/diagnostics.d.ts +0 -12
  159. package/dist/types/data-app-builder/lib/file-tree.d.ts +0 -2
  160. package/dist/types/data-app-builder/types.d.ts +0 -558
  161. package/dist/types/data-app-builder-browser-runtime.d.ts +0 -2
  162. package/dist/types/data-app-builder.d.ts +0 -2
  163. package/dist/types/data-app-codegen/generate-contract.d.ts +0 -26
  164. package/dist/types/data-app-codegen/generated-contract-files.d.ts +0 -7
  165. package/dist/types/data-app-codegen/generated-contract-validation.d.ts +0 -13
  166. package/dist/types/data-app-codegen/index.d.ts +0 -6
  167. package/dist/types/data-app-codegen/live-execution.d.ts +0 -42
  168. package/dist/types/data-app-codegen/node.d.ts +0 -2
  169. package/dist/types/data-app-codegen/update-policy.d.ts +0 -25
  170. package/dist/types/data-app-codegen/validation.d.ts +0 -8
  171. package/dist/types/data-app-codegen-node.d.ts +0 -2
  172. package/dist/types/data-app-codegen.d.ts +0 -2
  173. package/dist/types/shared/analytics-protocol/data-app-codegen-summary.d.ts +0 -418
  174. package/dist/types/shared/format-utils/exporters/pivot-exporter.d.ts +0 -13
  175. package/dist/types/shared/format-utils/exporters/table-exporter.d.ts +0 -10
@@ -0,0 +1,56 @@
1
+ import { CalendarContext } from '../report-runtime-context/index.js';
2
+ import { ZonedWallClockTime } from './zoned-wall-clock.js';
3
+ /** The units a period or a shift counts in. */
4
+ export type TemporalUnit = 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
5
+ /**
6
+ * What period math reads from a calendar. The anchor ("now") is never read
7
+ * here: callers pass the instant they resolve against.
8
+ */
9
+ export type TemporalCalendar = Pick<CalendarContext, 'tz' | 'weekStart' | 'fiscalCalendar'>;
10
+ /** Every instant from `start` up to, not including, `endExclusive`. */
11
+ export type TemporalPeriod = {
12
+ start: Date;
13
+ endExclusive: Date;
14
+ };
15
+ /** A wall-clock time with every field set. */
16
+ export type WallClockTime = Required<ZonedWallClockTime>;
17
+ /** Units measured as elapsed time rather than on the calendar, in milliseconds. */
18
+ export declare const ELAPSED_UNIT_MILLISECONDS: Partial<Record<TemporalUnit, number>>;
19
+ /** The wall clock at an instant, with its milliseconds (offsets are whole seconds). */
20
+ export declare function wallClockAt(instant: Date, tz: string): WallClockTime;
21
+ /** The instant a wall clock names, under the daylight-saving rule (K7). */
22
+ export declare function instantAt(wall: ZonedWallClockTime, tz: string): Date;
23
+ export declare function daysInMonth(year: number, month: number): number;
24
+ /**
25
+ * The wall clock moved by whole units, keeping the time of day for calendar
26
+ * units and clamping the day for months, quarters and years (January 31 plus
27
+ * one month is February 28), as date-fns does.
28
+ */
29
+ export declare function shiftWallClock(wall: WallClockTime, amount: number, unit: TemporalUnit): WallClockTime;
30
+ /** The weekday of a wall date, 0 for Sunday. */
31
+ export declare function wallWeekday(wall: Pick<WallClockTime, 'year' | 'month' | 'day'>): number;
32
+ /**
33
+ * The period `offset` periods from the one containing `instant` (0 for that
34
+ * period, -1 for the one before). Calendar periods are found in the wall
35
+ * clock, so a day that starts after a skipped midnight starts when it does
36
+ * (K7). Seconds, minutes and hours count elapsed time from the instant's own
37
+ * occurrence, so a repeated hour is two periods.
38
+ */
39
+ export declare function periodAt(instant: Date, unit: TemporalUnit, calendar: TemporalCalendar, offset?: number): TemporalPeriod;
40
+ /** Where the period containing `instant` starts. */
41
+ export declare function startOfPeriod(instant: Date, unit: TemporalUnit, calendar: TemporalCalendar): Date;
42
+ /** The last millisecond of the period containing `instant`. */
43
+ export declare function endOfPeriod(instant: Date, unit: TemporalUnit, calendar: TemporalCalendar): Date;
44
+ /**
45
+ * The instant moved by whole units in the calendar's wall clock, keeping its
46
+ * time of day (see `shiftWallClock`).
47
+ */
48
+ export declare function shiftInstant(instant: Date, amount: number, unit: TemporalUnit, calendar: Pick<TemporalCalendar, 'tz'>): Date;
49
+ /** Calendar days from `start`'s date to `end`'s date in the timezone. */
50
+ export declare function calendarDaysBetween(start: Date, end: Date, tz: string): number;
51
+ /** `YYYY-MM-DD` of the instant's wall date in the timezone. */
52
+ export declare function formatWallDate(instant: Date, tz: string): string;
53
+ /** The fields of a `YYYY-MM-DD` date that names a real day, else null. */
54
+ export declare function parseWallDate(value: string): Pick<WallClockTime, 'year' | 'month' | 'day'> | null;
55
+ /** The day a `YYYY-MM-DD` date names in the timezone, or null when it names none. */
56
+ export declare function wallDatePeriod(value: string, tz: string): TemporalPeriod | null;
@@ -0,0 +1,5 @@
1
+ export * from './zoned-wall-clock.js';
2
+ export * from './calendar-periods.js';
3
+ export * from './relative-date.js';
4
+ export * from './time-window-periods.js';
5
+ export * from './temporal-parity-fixtures.js';
@@ -0,0 +1,21 @@
1
+ import { RelativeDateFilter } from '../analytics-protocol/relative-date-filter.js';
2
+ import { TemporalCalendar } from './calendar-periods.js';
3
+ /** A resolved window: `end` is the inclusive last instant. */
4
+ export type ResolvedRelativeDate = {
5
+ start: Date;
6
+ end: Date;
7
+ };
8
+ /**
9
+ * The window a relative date names at `anchor` in the calendar:
10
+ * - `last` n units: the n units back to the anchor, the same wall-clock time
11
+ * n units earlier (minutes and hours count elapsed time); with `complete`,
12
+ * the n whole periods before the one containing the anchor;
13
+ * - `this`: the period containing the anchor, or up to the anchor with
14
+ * `toDate`; a month `boundary` names its first or last day (months only);
15
+ * - `previous`: the period before;
16
+ * - `between` from/to: from the start of the `from` period to the end of the
17
+ * `to` period, counted from the anchor's.
18
+ * Weeks start on the calendar's week start; quarters and years follow its
19
+ * fiscal calendar when it has one.
20
+ */
21
+ export declare function resolveRelativeDate(relative: RelativeDateFilter, calendar: TemporalCalendar, anchor: Date): ResolvedRelativeDate;
@@ -0,0 +1,73 @@
1
+ import { RelativeDateFilter } from '../analytics-protocol/relative-date-filter.js';
2
+ import { WeekStart } from '../report-runtime-context/index.js';
3
+ import { TemporalUnit } from './calendar-periods.js';
4
+ import { ZonedWallClockTime } from './zoned-wall-clock.js';
5
+ /** A relative date resolved at an anchor: `[start, inclusive end]`. */
6
+ export type TemporalParityRelativeCase = {
7
+ tz: string;
8
+ weekStart: WeekStart;
9
+ /** The month-aligned fiscal year's first month, when the calendar has one. */
10
+ fiscalStart?: number;
11
+ anchor: string;
12
+ relative: RelativeDateFilter;
13
+ expected: [string, string];
14
+ /**
15
+ * The browser's old result where it differed, and the rule that changed
16
+ * it: `fiscal_periods`, the browser ignored the fiscal calendar for
17
+ * quarters and years. Previews still show those as labels only (K8).
18
+ */
19
+ browser?: {
20
+ old: [string, string];
21
+ rule: 'fiscal_periods';
22
+ };
23
+ };
24
+ /** An instant moved by whole units in the timezone's wall clock. */
25
+ export type TemporalParityShiftCase = {
26
+ tz: string;
27
+ at: string;
28
+ unit: TemporalUnit;
29
+ amount: number;
30
+ expected: string;
31
+ };
32
+ /** The period containing an instant: `[start, endExclusive]`. */
33
+ export type TemporalParityPeriodCase = {
34
+ tz: string;
35
+ at: string;
36
+ unit: TemporalUnit;
37
+ weekStart?: WeekStart;
38
+ expected: [string, string];
39
+ };
40
+ /**
41
+ * A daylight-saving case (K7): the instant a wall clock names, or the period
42
+ * containing an instant. `before` is the old result, which depended on
43
+ * date-fns-tz's offset guess: a repeated hour took its second occurrence east
44
+ * of UTC, a skipped hour moved back, and a day starting after a skipped
45
+ * midnight started an hour early.
46
+ */
47
+ export type TemporalParityDaylightCase = {
48
+ kind: 'instant';
49
+ tz: string;
50
+ wall: ZonedWallClockTime;
51
+ expected: string;
52
+ before: string;
53
+ } | {
54
+ kind: 'period';
55
+ tz: string;
56
+ at: string;
57
+ unit: TemporalUnit;
58
+ expected: [string, string];
59
+ before: [string, string];
60
+ };
61
+ /**
62
+ * The parity grid (analytics kernel Phase 3): units, modes, the six
63
+ * timezones, week starts 0 to 6, fiscal start months 1 to 12 and four
64
+ * anchors. Both repos run it: react-semaphor against `shared/temporal`, and
65
+ * semaphor-app against the server functions that delegate to it. Built by a
66
+ * pure call, so a bundle that doesn't use it drops it.
67
+ */
68
+ export declare const TEMPORAL_PARITY_FIXTURES: {
69
+ relative: TemporalParityRelativeCase[];
70
+ shifts: TemporalParityShiftCase[];
71
+ periods: TemporalParityPeriodCase[];
72
+ daylight: TemporalParityDaylightCase[];
73
+ };
@@ -0,0 +1,21 @@
1
+ import { TemporalCalendar, TemporalUnit } from './calendar-periods.js';
2
+ /** A rolling window's length: `value` units. */
3
+ export type TemporalSpan = {
4
+ unit: TemporalUnit;
5
+ value: number;
6
+ };
7
+ /**
8
+ * Where a window of `span` ending at `end` starts: elapsed time for seconds,
9
+ * minutes and hours; the same wall-clock time `value` units earlier for
10
+ * calendar units.
11
+ */
12
+ export declare function subtractTimeSpan(end: Date, span: TemporalSpan, calendar: TemporalCalendar): Date;
13
+ /** The `value` whole periods before the one containing `latest`. */
14
+ export type CompletePeriodWindow = {
15
+ windowStart: Date;
16
+ /** The inclusive last instant: the millisecond before `latest`'s period. */
17
+ windowEnd: Date;
18
+ /** Whether `latest`'s own period, which is partial, was left out. */
19
+ excludedPartialPeriod: boolean;
20
+ };
21
+ export declare function completePeriodWindow(latest: Date, span: TemporalSpan, calendar: TemporalCalendar): CompletePeriodWindow;
@@ -0,0 +1,23 @@
1
+ export type ZonedWallClock = {
2
+ year: number;
3
+ month: number;
4
+ day: number;
5
+ hour: number;
6
+ minute: number;
7
+ second: number;
8
+ };
9
+ export declare function zonedWallClock(instant: Date, tz: string): ZonedWallClock;
10
+ /** A wall-clock time, with optional milliseconds. */
11
+ export type ZonedWallClockTime = ZonedWallClock & {
12
+ millisecond?: number;
13
+ };
14
+ /** The wall clock as if it were UTC, in milliseconds. */
15
+ export declare function wallClockMilliseconds(wall: ZonedWallClockTime): number;
16
+ /**
17
+ * The instant a wall-clock time names in a timezone (analytics kernel K7). A
18
+ * repeated hour takes its first occurrence; a skipped hour moves forward by
19
+ * the gap, as JavaScript's Temporal API and java.time do by default. The
20
+ * offsets a day either side cover any one change, and no offset reaches a
21
+ * day, so the answer never depends on the machine.
22
+ */
23
+ export declare function zonedWallClockToInstant(wall: ZonedWallClockTime, tz: string): Date;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.526",
8
+ "version": "0.1.527",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",
@@ -72,22 +72,6 @@
72
72
  "types": "./dist/types/data-app-sdk-validation.d.ts",
73
73
  "import": "./dist/data-app-sdk-validation/index.js"
74
74
  },
75
- "./data-app-codegen": {
76
- "types": "./dist/types/data-app-codegen.d.ts",
77
- "import": "./dist/data-app-codegen/index.js"
78
- },
79
- "./data-app-codegen/node": {
80
- "types": "./dist/types/data-app-codegen-node.d.ts",
81
- "import": "./dist/data-app-codegen-node/index.js"
82
- },
83
- "./data-app-builder": {
84
- "types": "./dist/types/data-app-builder.d.ts",
85
- "import": "./dist/data-app-builder/index.js"
86
- },
87
- "./data-app-builder/browser-runtime": {
88
- "types": "./dist/types/data-app-builder-browser-runtime.d.ts",
89
- "import": "./dist/data-app-builder-browser-runtime/index.js"
90
- },
91
75
  "./appearance": {
92
76
  "types": "./dist/types/appearance.d.ts",
93
77
  "import": "./dist/appearance/index.js"
@@ -1,8 +1,11 @@
1
1
  # Data App SDK Quick Reference
2
2
 
3
- Use this file as the public contract quick reference for generated Semaphor
4
- Data Apps. Do not inspect SDK implementation internals to discover these
5
- patterns.
3
+ > Frozen: no new work goes into this SDK. A replacement built on the shared
4
+ > analytics protocol replaces it in place (semaphor-app
5
+ > `docs/implementation-plans/analytics-mcp-and-sdk/PLAN-3-ANALYTICS-SDK.md`).
6
+
7
+ Use this file as the public contract quick reference for Data App SDK code.
8
+ Do not inspect SDK implementation internals to discover these patterns.
6
9
 
7
10
  ## Imports
8
11