react-semaphor 0.1.537 → 0.1.539

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 (174) hide show
  1. package/dist/analytics-protocol/index.js +352 -341
  2. package/dist/assistant-context/index.js +10 -0
  3. package/dist/assistant-protocol/index.js +104 -0
  4. package/dist/brand-studio/index.js +35 -31
  5. package/dist/briefings/index.js +46 -45
  6. package/dist/chunks/_commonjsHelpers-BkfeUUK-.js +28 -0
  7. package/dist/chunks/add-to-dashboard-CxtTfISD.js +56 -0
  8. package/dist/chunks/aggregate-table-row-presentation-BjK9YfMI.js +979 -0
  9. package/dist/chunks/analytics-base-schemas-BFAoRlkU.js +472 -0
  10. package/dist/chunks/apply-dashboard-operations-C-iahGka.js +402 -0
  11. package/dist/chunks/assistant-chat-DgiSuFT4.js +8083 -0
  12. package/dist/chunks/availability-Bp5Gfu1I.js +44 -0
  13. package/dist/chunks/{bookmark-state-B-I9BDD0.js → bookmark-state-k7y5SNGf.js} +9 -9
  14. package/dist/chunks/{braces-8TRlDwDw.js → braces-o9UiRQes.js} +1 -1
  15. package/dist/chunks/calculated-field-identity-DcBS2NPP.js +2161 -0
  16. package/dist/chunks/calendar-day-equality-Bpl15IBo.js +487 -0
  17. package/dist/chunks/class-utils-Df1OVOT1.js +2315 -0
  18. package/dist/chunks/{field-dependencies-CpRUwr9J.js → common-types-CUf03Htv.js} +65 -58
  19. package/dist/chunks/context-HD9usB1P.js +349 -0
  20. package/dist/chunks/conversation-sQiWYUOb.js +16 -0
  21. package/dist/chunks/csv-utils-GUfKyT1J.js +56 -0
  22. package/dist/chunks/custom-visual-inputs-BrUOIwln.js +3288 -0
  23. package/dist/chunks/{dashboard-briefing-launcher-A2uVpHCp.js → dashboard-briefing-launcher-Bl3gCeBR.js} +580 -556
  24. package/dist/chunks/{dashboard-controls-DxTuVis_.js → dashboard-controls-0EX0HiJt.js} +683 -686
  25. package/dist/chunks/{common-types-g7yS12Cg.js → dashboard-filter-value-compatibility-D95O4nd7.js} +18 -24
  26. package/dist/chunks/dashboard-json-6X_2BDiL.js +69 -0
  27. package/dist/chunks/{dashboard-BPJo-Fnd.js → dashboard-y5BwcvzT.js} +1 -1
  28. package/dist/chunks/document-dashboard-inputs-BrYYlRVo.js +10678 -0
  29. package/dist/chunks/document-sheet-utils-C1eEldxs.js +1076 -0
  30. package/dist/chunks/{edit-dashboard-visual-ByV0OwSp.js → edit-dashboard-visual-Bzchfgga.js} +4744 -4746
  31. package/dist/chunks/editor-draft-sync-BN5qYHPF.js +15 -0
  32. package/dist/chunks/filter-value-text-BhWugPWE.js +163 -0
  33. package/dist/chunks/index-CqMiAkay.js +3164 -0
  34. package/dist/chunks/index-CuHybtft.js +51 -0
  35. package/dist/chunks/layout-grid-Bgzth8vd.js +16 -0
  36. package/dist/chunks/{matrix-analytical-definition-CgBTD6H8.js → matrix-analytical-definition-bcprSe4u.js} +1 -1
  37. package/dist/chunks/{matrix-card-CAdizkUl.js → matrix-card-CJn1hB5V.js} +13 -12
  38. package/dist/chunks/matrix-definition-DQDI2okF.js +206 -0
  39. package/dist/chunks/{matrix-formatter-DJCk8Znf.js → matrix-formatter-DQ8avoIQ.js} +648 -457
  40. package/dist/chunks/matrix-member-presentation-BNPSDKBG.js +105 -0
  41. package/dist/chunks/{matrix-operation-contract-BKupLHXL.js → matrix-operation-contract-B8PBF1Gd.js} +134 -133
  42. package/dist/chunks/{metric-comparison-BKHyvnAy.js → metric-comparison-CojWeLqx.js} +1 -1
  43. package/dist/chunks/{palette-Cp1hqZtm.js → palette-D10o_yYX.js} +1 -1
  44. package/dist/chunks/pivot-header-presentation-MkcKnjn3.js +42 -0
  45. package/dist/chunks/{pivot-result-identity-Bs4tLtLo.js → pivot-result-identity-D6hhcRXi.js} +1 -1
  46. package/dist/chunks/pivot-result-lifecycle-8qCDmpKc.js +804 -0
  47. package/dist/chunks/raw-temporal-D61lr48Y.js +1464 -0
  48. package/dist/chunks/{raw-temporal-contract-mLFS-9wk.js → raw-temporal-contract-C51YG48G.js} +1 -1
  49. package/dist/chunks/report-preferences-dialog-CWhSbc5_.js +1808 -0
  50. package/dist/chunks/{report-runtime-context-CG_I0PPW.js → report-runtime-context-B984Nq1E.js} +8 -7
  51. package/dist/chunks/save-CfJpQQ68.js +21 -0
  52. package/dist/chunks/saved-dashboard-context-Dqve2jlB.js +566 -0
  53. package/dist/chunks/{selection-reducer-CiDEtmAq.js → selection-reducer-vKIb_jS6.js} +2 -2
  54. package/dist/chunks/{semaphor-ready-indicator-CHu1L-lo.js → semaphor-ready-indicator-ldcwmLoY.js} +65803 -62954
  55. package/dist/chunks/{shelf-drop-preview-context-i-H6DFyU.js → shelf-drop-preview-context-BWxunXTq.js} +199 -196
  56. package/dist/chunks/{source-entity-resolution-C-oNyYMp.js → source-entity-resolution-CVA1a85c.js} +8 -8
  57. package/dist/chunks/switch-CvItuC1Q.js +8199 -0
  58. package/dist/chunks/{temporal-bucket-DlFuhCnT.js → temporal-bucket-D8JF7zKz.js} +86 -71
  59. package/dist/chunks/{temporal-bucket-contract-D2OuaVZ7.js → temporal-bucket-contract-DaOajRC7.js} +1 -1
  60. package/dist/chunks/{token-types-DtSJOUjh.js → token-types-bxUxXDX2.js} +1 -1
  61. package/dist/chunks/{upload-CAIpsti1.js → upload-BFX7apKV.js} +1 -1
  62. package/dist/chunks/{use-create-flow-overlay-state-Bj63WwHc.js → use-create-flow-overlay-state-RHgzVfcz.js} +331 -339
  63. package/dist/chunks/{validators-DMSH81OM.js → validators-Ej1DdCXa.js} +1050 -1510
  64. package/dist/chunks/visual-choice-JiJ-_3bi.js +204 -0
  65. package/dist/chunks/x-4f5U2XwU.js +100 -0
  66. package/dist/chunks/{zoned-wall-clock-1qlWCE20.js → zoned-wall-clock-MulfA26h.js} +2 -2
  67. package/dist/dashboard/index.js +2 -2
  68. package/dist/dashboard-authoring/index.js +823 -661
  69. package/dist/data-app-sdk/index.js +32 -30
  70. package/dist/data-app-sdk-adapters/index.js +23 -22
  71. package/dist/data-app-sdk-validation/index.js +23 -22
  72. package/dist/format-utils/index.js +173 -168
  73. package/dist/index.js +267 -258
  74. package/dist/layouts/index.js +236 -24
  75. package/dist/report-runtime-context/index.js +2 -2
  76. package/dist/style.css +1 -1
  77. package/dist/surfboard/index.js +2 -2
  78. package/dist/types/assistant-context.d.ts +2 -0
  79. package/dist/types/assistant-protocol.d.ts +2 -0
  80. package/dist/types/components/assistant/assistant-entry-points.d.ts +18 -0
  81. package/dist/types/components/assistant/assistant-provider.d.ts +19 -0
  82. package/dist/types/components/assistant/assistant-store.d.ts +52 -0
  83. package/dist/types/components/assistant/use-assistant.d.ts +38 -0
  84. package/dist/types/components/index.d.ts +5 -1
  85. package/dist/types/components/surfboard/filter/types.d.ts +5 -2
  86. package/dist/types/index.js +50 -51
  87. package/dist/types/lib/api/invalidate-token.d.ts +7 -0
  88. package/dist/types/lib/charts/cartesian-fields.d.ts +64 -0
  89. package/dist/types/lib/charts/types.d.ts +7 -0
  90. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +14 -2
  91. package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +5 -6
  92. package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +8 -3
  93. package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +11 -6
  94. package/dist/types/lib/dashboard-pagination/dashboard-card-pagination.d.ts +7 -0
  95. package/dist/types/lib/dashboard-viewer/compatibility-input-storage.d.ts +79 -0
  96. package/dist/types/lib/dashboard-viewer/viewer-state.d.ts +3 -2
  97. package/dist/types/lib/document/document-table-data-policy.d.ts +15 -0
  98. package/dist/types/lib/filter-values/filter-mode.d.ts +22 -0
  99. package/dist/types/lib/hooks/use-calendar-context.d.ts +5 -0
  100. package/dist/types/lib/hooks/use-filter-option-browse.d.ts +5 -0
  101. package/dist/types/lib/hooks/use-text-filter.d.ts +9 -0
  102. package/dist/types/lib/print/print-inputs.d.ts +4 -2
  103. package/dist/types/lib/query-context/build-card-query-context.d.ts +12 -4
  104. package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +93 -0
  105. package/dist/types/lib/query-context/card-server-request.d.ts +72 -0
  106. package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +7 -0
  107. package/dist/types/lib/query-context/describe-card-execution-snapshot.d.ts +56 -0
  108. package/dist/types/lib/query-context/document-section-card-query.d.ts +45 -0
  109. package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +17 -2
  110. package/dist/types/lib/stores/dashboard-store.d.ts +34 -11
  111. package/dist/types/lib/stores/editor-store.d.ts +4 -2
  112. package/dist/types/lib/types/token-types.d.ts +11 -0
  113. package/dist/types/lib/utils/card-type-change.d.ts +30 -0
  114. package/dist/types/lib/utils/comparison-window-caption.d.ts +12 -0
  115. package/dist/types/lib/utils/filter-default-value-utils.d.ts +13 -2
  116. package/dist/types/shared/analytics-protocol/applied-constraints.d.ts +74 -0
  117. package/dist/types/shared/analytics-protocol/contracts.d.ts +3 -0
  118. package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +43 -0
  119. package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
  120. package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +1 -1
  121. package/dist/types/shared/analytics-protocol/visual-choice.d.ts +75 -0
  122. package/dist/types/shared/assistant-context/index.d.ts +9 -0
  123. package/dist/types/shared/assistant-context/project-context.d.ts +55 -0
  124. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +130 -0
  125. package/dist/types/shared/assistant-protocol/add-to-dashboard.d.ts +17 -0
  126. package/dist/types/shared/assistant-protocol/artifact.d.ts +63 -0
  127. package/dist/types/shared/assistant-protocol/availability.d.ts +39 -0
  128. package/dist/types/shared/assistant-protocol/context.d.ts +952 -0
  129. package/dist/types/shared/assistant-protocol/conversation.d.ts +38 -0
  130. package/dist/types/shared/assistant-protocol/index.d.ts +16 -0
  131. package/dist/types/shared/assistant-protocol/limits.d.ts +53 -0
  132. package/dist/types/shared/assistant-protocol/parts.d.ts +140 -0
  133. package/dist/types/shared/assistant-protocol/request.d.ts +77 -0
  134. package/dist/types/shared/assistant-protocol/sources.d.ts +27 -0
  135. package/dist/types/shared/assistant-protocol/token-config.d.ts +32 -0
  136. package/dist/types/shared/assistant-protocol/transcript.d.ts +40 -0
  137. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +112 -0
  138. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +1794 -0
  139. package/dist/types/shared/dashboard-authoring/index.d.ts +5 -0
  140. package/dist/types/shared/dashboard-authoring/new-card.d.ts +10 -0
  141. package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +40 -0
  142. package/dist/types/shared/dashboard-authoring/resolved-primary-date-field-validation.d.ts +16 -0
  143. package/dist/types/shared/format-utils/filter-detail.d.ts +70 -0
  144. package/dist/types/shared/format-utils/filter-value-text.d.ts +15 -0
  145. package/dist/types/shared/format-utils/index.d.ts +3 -0
  146. package/dist/types/shared/format-utils/raw-temporal.d.ts +7 -0
  147. package/dist/types/shared/format-utils/temporal-bucket.d.ts +7 -0
  148. package/dist/types/shared/layouts/frame-layouts.d.ts +23 -0
  149. package/dist/types/shared/layouts/index.d.ts +1 -0
  150. package/package.json +12 -2
  151. package/dist/chunks/calculated-field-identity-BptYhyOP.js +0 -1326
  152. package/dist/chunks/calendar-day-equality-BRjN1S9h.js +0 -383
  153. package/dist/chunks/card-config-utils-BOM1dxCk.js +0 -1150
  154. package/dist/chunks/constants-DNWVy8Y3.js +0 -9
  155. package/dist/chunks/dashboard-json-B1dEQu98.js +0 -65
  156. package/dist/chunks/field-aggregations-CoLzYHeL.js +0 -1229
  157. package/dist/chunks/index-DTcTAGGM.js +0 -4101
  158. package/dist/chunks/matrix-continuation-C4sRcjZU.js +0 -72
  159. package/dist/chunks/matrix-control-sources-DTqcA2_L.js +0 -636
  160. package/dist/chunks/matrix-definition-D9iShKZI.js +0 -87
  161. package/dist/chunks/matrix-member-presentation-Ct8GuxHt.js +0 -209
  162. package/dist/chunks/numeric-presentation-CWu3gunq.js +0 -537
  163. package/dist/chunks/pivot-header-presentation-CHs2GFrM.js +0 -753
  164. package/dist/chunks/pivot-result-lifecycle-DQz_gjGu.js +0 -789
  165. package/dist/chunks/raw-temporal-iMXRK-Qz.js +0 -930
  166. package/dist/chunks/report-preferences-dialog-DXPjteCU.js +0 -1623
  167. package/dist/chunks/save-kO6cIaob.js +0 -34
  168. package/dist/chunks/semantic-format-DiqYeKwU.js +0 -192
  169. package/dist/chunks/switch-DO8a0EfJ.js +0 -25004
  170. package/dist/chunks/temporal-input-presentation-BD7YNUzu.js +0 -195
  171. package/dist/chunks/x-CXDkqdur.js +0 -149
  172. package/dist/types/lib/class-utils.d.ts +0 -2
  173. package/dist/types/lib/document/document-input-runtime.d.ts +0 -26
  174. package/dist/types/lib/utils.d.ts +0 -51
@@ -0,0 +1,79 @@
1
+ import { CalendarContext } from '../../shared/report-runtime-context/index.js';
2
+ import { DashboardInputCompatibilityMetadata, DashboardInputValues, TDashboard } from '../types/common-types.js';
3
+ import { TFilterValue } from '../../components/surfboard/filter/types.js';
4
+ /**
5
+ * The bridge between bookmark slots and the storage compatibility inputs
6
+ * still use (TECH-SPEC 12, ledger P2-08). Legacy dashboard filters, controls
7
+ * and card inline filters keep their values in `filterValues`, control values
8
+ * and inline filter values, where the filter bar, controls and queries read
9
+ * them. Reading turns that storage into slots; writing turns a bookmark's
10
+ * slots back into it. When those inputs keep their values in slots, this
11
+ * file is deleted.
12
+ */
13
+ export type ViewerRuntimeInputs = {
14
+ readonly filterValues: readonly TFilterValue[];
15
+ readonly controlOverrides: Readonly<Record<string, unknown>> | undefined;
16
+ readonly dashboardInputValues: DashboardInputValues;
17
+ /** Absent: the cards' inline filter defaults. */
18
+ readonly inlineFilterValuesMap?: Readonly<Record<string, readonly TFilterValue[]>>;
19
+ };
20
+ /** The input values the dashboard store holds, which cards run with. */
21
+ export type ViewerStoreInputValues = {
22
+ filterValues: TFilterValue[];
23
+ controlValues: Record<string, unknown>;
24
+ cardControlValuesMap: Record<string, Record<string, unknown>>;
25
+ dashboardInputValues: DashboardInputValues;
26
+ inlineFilterValuesMap: Record<string, TFilterValue[]>;
27
+ };
28
+ /**
29
+ * The store's input values for these runtime values: the authored control
30
+ * defaults (dashboard and card) with the overrides on them, and the cards'
31
+ * inline filter defaults unless the values include their own. The one place
32
+ * runtime values become the values cards run with: the store applies it when
33
+ * a dashboard loads or refetches (`setDashboardWithFilterValues`), when it is
34
+ * replaced in place (`setDashboard`, keeping live control values), when a
35
+ * sheet is copied (the copy's defaults) and on every viewer event; the
36
+ * snapshot capture materializes it, and the analytics agent's regression set
37
+ * opens a saved dashboard with it. A host's control change alone goes through
38
+ * `computeRuntimeControlHydration`, the control half it is built on.
39
+ */
40
+ export declare function resolveViewerStoreInputValues(dashboard: TDashboard, runtime: ViewerRuntimeInputs, calendar: CalendarContext | undefined): ViewerStoreInputValues;
41
+ /**
42
+ * Every applicable input's slot on every dashboard sheet and card, as the
43
+ * snapshot capture materializes them, including click selection slots.
44
+ */
45
+ export declare function materializeViewerInputs(dashboard: TDashboard, runtime: ViewerRuntimeInputs, calendar: CalendarContext | undefined): DashboardInputValues;
46
+ /**
47
+ * Every applicable input's current slot from the store's runtime values,
48
+ * materialized like the baseline. `readViewerSnapshot` uses it.
49
+ */
50
+ export declare function materializeViewerRuntimeInputs(dashboard: TDashboard, runtimeValues: Parameters<typeof materializeRuntimeInputs>[1], calendar: CalendarContext | undefined): DashboardInputValues;
51
+ declare function materializeRuntimeInputs(dashboard: TDashboard, runtimeValues: {
52
+ filterValues?: TFilterValue[];
53
+ controlValues?: Record<string, unknown>;
54
+ cardControlValuesMap?: Record<string, Record<string, unknown>>;
55
+ dashboardInputValues?: DashboardInputValues;
56
+ inlineFilterValuesMap?: Record<string, TFilterValue[] | undefined>;
57
+ }, calendar: CalendarContext | undefined): DashboardInputValues;
58
+ /**
59
+ * A bookmark's slots, split by where each value lives. Authored inputs and
60
+ * click selections are runtime slots. Inputs synthesized from legacy dashboard
61
+ * filters, controls and card inline filters keep their values where the
62
+ * filter bar, controls and queries read them: `filterValues`, control values
63
+ * and inline filter values. A comparison choice stays a runtime aspect slot.
64
+ */
65
+ export type BookmarkInputs = {
66
+ readonly runtime: DashboardInputValues;
67
+ /** filterId -> value, or `null` for a default the viewer removed. */
68
+ readonly filterValues: ReadonlyMap<string, TFilterValue | null>;
69
+ readonly controlValues: Readonly<Record<string, unknown>>;
70
+ /** cardId -> filterId -> value, or `null` for a removed default. */
71
+ readonly inlineFilterValues: ReadonlyMap<string, ReadonlyMap<string, TFilterValue | null>>;
72
+ };
73
+ export declare function splitBookmarkInputs(compatibilityByInputId: ReadonlyMap<string, DashboardInputCompatibilityMetadata>, values: DashboardInputValues): BookmarkInputs;
74
+ export declare function overlayFilterValues(base: readonly TFilterValue[], overrides: ReadonlyMap<string, TFilterValue | null>): TFilterValue[];
75
+ export declare function overlayControlValues(dashboard: TDashboard, base: Readonly<Record<string, unknown>> | undefined, overrides: Readonly<Record<string, unknown>>): Readonly<Record<string, unknown>> | undefined;
76
+ export declare function overlayInlineFilterValues(defaults: Readonly<Record<string, readonly TFilterValue[]>>, overrides: ReadonlyMap<string, ReadonlyMap<string, TFilterValue | null>>): Record<string, TFilterValue[]> | undefined;
77
+ /** Live inline filter values for inline filters the cards still define, over the defaults. */
78
+ export declare function keepLiveInlineFilterValues(dashboard: TDashboard, defaults: Readonly<Record<string, readonly TFilterValue[]>>, live: Readonly<Record<string, readonly TFilterValue[] | undefined>>): Record<string, TFilterValue[]> | undefined;
79
+ export {};
@@ -1,10 +1,11 @@
1
1
  import { DashboardInputValues, TDashboard } from '../types/common-types.js';
2
2
  import { TFilterValue } from '../../components/surfboard/filter/types.js';
3
- import { DefaultsCalendar } from '../utils/filter-default-value-utils.js';
3
+ import { CalendarContext } from '../../shared/report-runtime-context/index.js';
4
4
  import { ViewerTableSettings } from '../../shared/dashboard-viewer/table-settings.js';
5
5
  import { Bookmark, BookmarkState } from '../../shared/dashboard-viewer/viewer-contract.js';
6
6
  /** The report runtime's calendar, as filter defaults read it. */
7
- export type ViewerCalendar = DefaultsCalendar;
7
+ /** The viewer's report calendar, from report preferences (card query assembly CQ-D8). */
8
+ export type ViewerCalendar = CalendarContext;
8
9
  /** A host filter default: a full filter value, or the short `{ filterId, values }` embed form. */
9
10
  export type HostFilterValue = TFilterValue | {
10
11
  readonly filterId: string;
@@ -0,0 +1,15 @@
1
+ import { TCard } from '../types/common-types.js';
2
+ export type DocumentTableDataPolicy = 'preview-window' | 'export-full-with-cap';
3
+ export declare const DOCUMENT_TABLE_EXPORT_MAX_ROWS = 10000;
4
+ export declare const DOCUMENT_TABLE_EXPORT_QUERY_CHUNK_SIZE = 500;
5
+ export declare const DOCUMENT_TABLE_PREVIEW_QUERY_CHUNK_SIZE = 250;
6
+ export declare function isDocumentFlatTableAcquisitionCard(card: TCard): boolean;
7
+ export declare function isDocumentSqlTablePaginationEnabled(card: TCard): boolean;
8
+ export declare function getDocumentTableQueryPageSize(policy: DocumentTableDataPolicy): 500 | 250;
9
+ export declare function shouldUseServerPaginationForDashboardCardQuery({ card, isTablePrintMode, isPrintDisplayMode, isDocumentSectionRuntime, documentTableDataPolicy, }: {
10
+ card: TCard;
11
+ isTablePrintMode: boolean;
12
+ isPrintDisplayMode: boolean;
13
+ isDocumentSectionRuntime: boolean;
14
+ documentTableDataPolicy?: DocumentTableDataPolicy;
15
+ }): boolean;
@@ -0,0 +1,22 @@
1
+ import { TFilterValue } from '../../components/surfboard/filter/types.js';
2
+ /**
3
+ * Include or Exclude: how a multi-select filter applies its selected values.
4
+ * The mode is stored as an operation (`in` / `not in`). A definition's
5
+ * operation is the authored mode; the viewer's mode lives on the live value
6
+ * (see `resolveLiveFilterMode`).
7
+ */
8
+ export type FilterMode = 'include' | 'exclude';
9
+ export declare function isInclusionFilterOperation(operation: TFilterValue['operation'] | undefined): operation is 'in' | 'not in';
10
+ export declare function getFilterModeFromOperation(operation: TFilterValue['operation'] | undefined): FilterMode;
11
+ export declare function getFilterOperationFromMode(filterMode: FilterMode): 'in' | 'not in';
12
+ /**
13
+ * The mode every viewer surface shows (FM-D2): the live value's when it is an
14
+ * inclusion value, else the mode the viewer picked before selecting anything
15
+ * (held by the dropdown, never a store), else the target's authored default
16
+ * mode (`resolveAuthoredFilterDefault`).
17
+ */
18
+ export declare function resolveLiveFilterMode(params: {
19
+ authoredMode: FilterMode;
20
+ liveValue: Pick<TFilterValue, 'operation'> | undefined;
21
+ pendingMode?: FilterMode;
22
+ }): FilterMode;
@@ -1,5 +1,10 @@
1
1
  import { CalendarContext, ReportPreferenceSources, WeekStart } from '../../shared/report-runtime-context/index.js';
2
2
  import { ResolvedTemporalValueFormatPreferences, ResolvedValueFormatPreferences } from '../../shared/value-format-preferences/index.js';
3
+ /**
4
+ * The viewer's report calendar (report preferences). It keeps its identity
5
+ * until its content changes, so a report context replaced for a formatting
6
+ * preference never re-resolves what reads the calendar.
7
+ */
3
8
  export declare function useCalendarContext(): CalendarContext | null;
4
9
  export declare function useTimezone(): string | null;
5
10
  export declare function useWeekStart(): WeekStart | null;
@@ -59,6 +59,11 @@ export type FilterOptionBrowseState = {
59
59
  resultSource: 'local' | 'server' | 'both';
60
60
  hasNextPage: boolean;
61
61
  hasLoadedMoreOptions: boolean;
62
+ /**
63
+ * More options exist than the list holds and none load on scroll (an
64
+ * engine whose filter options don't page): only search reaches the rest.
65
+ */
66
+ isFirstPageOnly: boolean;
62
67
  isFetchingNextPage: boolean;
63
68
  isNextPageError: boolean;
64
69
  loadNextPage: () => void;
@@ -1,4 +1,5 @@
1
1
  import { TFilter, TFilterValue, TSelectedRecord, FilterStorageOptions } from '../../components/surfboard/filter/types.js';
2
+ import { FilterMode } from '../filter-values/filter-mode.js';
2
3
  export declare function useTextFilterHook(filterId: string): {
3
4
  isLoading: boolean;
4
5
  isFetching: boolean;
@@ -8,6 +9,7 @@ export declare function useTextFilterHook(filterId: string): {
8
9
  retry: () => void;
9
10
  hasNextPage: boolean;
10
11
  hasLoadedMoreOptions: boolean;
12
+ isFirstPageOnly: boolean;
11
13
  isFetchingNextPage: boolean;
12
14
  isNextPageError: boolean;
13
15
  loadNextPage: () => void;
@@ -21,6 +23,9 @@ export declare function useTextFilterHook(filterId: string): {
21
23
  isSingleSelect: boolean;
22
24
  allSelected: boolean;
23
25
  activeFilterValue: TFilterValue | undefined;
26
+ filterMode: FilterMode;
27
+ changeFilterMode: (mode: FilterMode) => void;
28
+ discardPendingFilterMode: () => void;
24
29
  isSearching: boolean;
25
30
  searchError: boolean;
26
31
  resultSource: "server" | "both" | "local";
@@ -42,6 +47,7 @@ export declare function useTextFilter(filter: TFilter, options?: UseTextFilterOp
42
47
  retry: () => void;
43
48
  hasNextPage: boolean;
44
49
  hasLoadedMoreOptions: boolean;
50
+ isFirstPageOnly: boolean;
45
51
  isFetchingNextPage: boolean;
46
52
  isNextPageError: boolean;
47
53
  loadNextPage: () => void;
@@ -57,6 +63,9 @@ export declare function useTextFilter(filter: TFilter, options?: UseTextFilterOp
57
63
  isSingleSelect: boolean;
58
64
  allSelected: boolean;
59
65
  activeFilterValue: TFilterValue | undefined;
66
+ filterMode: FilterMode;
67
+ changeFilterMode: (mode: FilterMode) => void;
68
+ discardPendingFilterMode: () => void;
60
69
  isSearching: boolean;
61
70
  searchError: boolean;
62
71
  resultSource: "server" | "both" | "local";
@@ -1,3 +1,4 @@
1
+ import { CalendarContext } from '../../shared/report-runtime-context/index.js';
1
2
  import { DashboardInputExecutionSnapshot, TDashboard } from '../types/common-types.js';
2
3
  import { DashboardInputRuntimeValues } from '../dashboard-inputs/resolve-dashboard-input-context.js';
3
4
  import { TransientInputContext } from '../dashboard-inputs/transient-input-context.js';
@@ -92,12 +93,13 @@ export declare function buildMissingPrintInputs({ sheetId, sheetTitle, inputLabe
92
93
  * for drill state). Carried state follows the caller: a schedule passes no
93
94
  * transient contexts or card view state, a download passes the viewer's.
94
95
  */
95
- export declare function capturePrintInputs({ dashboard, sheets, runtimeValues, transientContexts, timezone, generatedAt, }: {
96
+ export declare function capturePrintInputs({ dashboard, sheets, runtimeValues, transientContexts, calendar, generatedAt, }: {
96
97
  dashboard: TDashboard;
97
98
  sheets: readonly PrintSheetRef[];
98
99
  runtimeValues: DashboardInputRuntimeValues;
99
100
  transientContexts: readonly TransientInputContext[] | undefined;
100
- timezone?: string;
101
+ /** The report calendar the capture resolves input defaults in (CQ-D8); the capture keeps its zone. */
102
+ calendar: CalendarContext | null;
101
103
  generatedAt?: string;
102
104
  }): PrintInputCapture;
103
105
  /** Reads an untrusted value. Returns undefined for anything that is not a valid version-1 capture. */
@@ -2,9 +2,9 @@ import { TFilter, TFilterValue } from '../../components/surfboard/filter/types.j
2
2
  import { ControlBinding, ControlDefinition, ResolvedDashboardDateComparisonInput, ResolvedDashboardInputContext, TCard, TDashboard } from '../types/common-types.js';
3
3
  import { GlobalDateComparisonContext, GlobalDateComparisonSelection } from '../../shared/analytics-protocol/index.js';
4
4
  import { ResolvedPrimaryDateField } from '../types/semantic-runtime-types.js';
5
- import { CardConfig } from '../types/explorer-types.js';
6
- import { resolveRuntimeCardFilters } from './resolve-runtime-card-filters.js';
7
- import { CardViewState } from '../dashboard-view-state/index.js';
5
+ import { CardConfig, FilterGroup } from '../types/explorer-types.js';
6
+ import { RuntimeCardFilterParts } from './resolve-runtime-card-filters.js';
7
+ import { CardViewState, DrillStep } from '../dashboard-view-state/index.js';
8
8
  import { TransientInputContext } from '../dashboard-inputs/transient-input-context.js';
9
9
  import { DashboardCardFilterCompilationInput } from './compile-dashboard-card-filters.js';
10
10
  import { ResolvedCardDateFields } from './resolve-card-primary-date-field.js';
@@ -51,7 +51,15 @@ export type CardQueryContext = {
51
51
  controlDefinitions: ControlDefinition[];
52
52
  cardControlDefinitions: ControlDefinition[];
53
53
  controlBindings: ControlBinding[];
54
- resolvedFilters: ReturnType<typeof resolveRuntimeCardFilters>;
54
+ resolvedFilters: FilterGroup | undefined;
55
+ /**
56
+ * The groups `resolvedFilters` merges, by origin (authored, drill,
57
+ * selections). Readers that keep where a condition came from read these;
58
+ * never part of the query identity.
59
+ */
60
+ resolvedFilterParts: RuntimeCardFilterParts;
61
+ /** The drill path the card runs at: `finalConfig` is grouped at its last step. */
62
+ drillSteps: readonly DrillStep[];
55
63
  finalConfig: CardConfig;
56
64
  queryRelevantConfig: CardConfig;
57
65
  finalFiltersKey: string;
@@ -0,0 +1,93 @@
1
+ import { CalendarContext } from '../../shared/report-runtime-context/index.js';
2
+ import { CardViewStateMap } from '../dashboard-view-state/index.js';
3
+ import { TFilterValue } from '../../components/surfboard/filter/types.js';
4
+ import { DashboardInputValues, TCard, TDashboard } from '../types/common-types.js';
5
+ import { TransientInputContext } from '../dashboard-inputs/transient-input-context.js';
6
+ import { SemanticExecutionPayload } from '../types/semantic-runtime-types.js';
7
+ import { ViewerTableSettings } from '../../shared/dashboard-viewer/index.js';
8
+ import { CompiledCardQueryContext } from './build-card-query-context.js';
9
+ import { CompiledDashboardCardFilters } from './compile-dashboard-card-filters.js';
10
+ import { CardRequestPayload } from './card-server-request.js';
11
+ import { DocumentSectionCardRuntime } from './document-section-card-query.js';
12
+ import { MatrixCardCatalog, prepareMatrixCard } from '../matrix-table/matrix-card-adapter.js';
13
+ export type DashboardExecutionSnapshot = {
14
+ selectedSheetId: string | null;
15
+ filterValues: TFilterValue[];
16
+ controlValues: Record<string, unknown>;
17
+ };
18
+ type BuildDashboardExecutionSnapshotParams = {
19
+ dashboard: Pick<TDashboard, 'filters' | 'sheets'> | undefined;
20
+ filterValues: TFilterValue[] | undefined;
21
+ selectedSheetId: string | null | undefined;
22
+ sheetSelection?: 'current' | 'all';
23
+ dashboardControlValues?: Record<string, unknown>;
24
+ cardControlValuesMap?: Record<string, Record<string, unknown> | undefined> | undefined;
25
+ semanticExecutionPayload?: SemanticExecutionPayload;
26
+ timezone?: string;
27
+ };
28
+ export declare function buildDashboardExecutionSnapshot({ dashboard, filterValues, selectedSheetId, sheetSelection, dashboardControlValues, cardControlValuesMap, semanticExecutionPayload, timezone, }: BuildDashboardExecutionSnapshotParams): DashboardExecutionSnapshot;
29
+ export type BuildDashboardCardExecutionSnapshotParams = {
30
+ dashboard: TDashboard | undefined;
31
+ cardId: string;
32
+ /**
33
+ * Carried contexts in effect on the dashboard. Required so that every
34
+ * caller decides; see `buildCardQueryContext`.
35
+ */
36
+ transientContexts: readonly TransientInputContext[] | undefined;
37
+ /** Drill paths by card. Required so that every caller decides; see `buildCardQueryContext`. */
38
+ cardViewStates: CardViewStateMap | undefined;
39
+ /**
40
+ * Viewer table settings by card: the export re-fetch carries the viewer's
41
+ * sort. Required so that every caller decides; see `buildCardQueryContext`.
42
+ */
43
+ viewerTableSettings: Readonly<Record<string, ViewerTableSettings>> | undefined;
44
+ filterValues: TFilterValue[] | undefined;
45
+ inlineFilterValuesMap: Record<string, TFilterValue[] | undefined> | undefined;
46
+ dashboardControlValues?: Record<string, unknown> | undefined;
47
+ cardControlValuesMap?: Record<string, Record<string, unknown> | undefined> | undefined;
48
+ dashboardInputValues?: DashboardInputValues;
49
+ semanticExecutionPayload?: SemanticExecutionPayload;
50
+ /**
51
+ * The viewer's report calendar (report preferences): input defaults resolve
52
+ * in it and the card compiles in its zone (CQ-D8). Null only before the
53
+ * report context loads.
54
+ */
55
+ calendar: CalendarContext | null;
56
+ /** Current columns metadata for all Matrix targets participating in coverage. */
57
+ matrixCatalog?: MatrixCardCatalog;
58
+ /** Editor drafts replace their persisted card only for this computation. */
59
+ cardOverride?: TCard;
60
+ sheetId?: string | null;
61
+ /**
62
+ * Runs the target card as a Document section (tech spec G3), with the same
63
+ * rules as every section card's frame query. Other cards keep the dashboard
64
+ * runtime.
65
+ */
66
+ documentSection?: DocumentSectionCardRuntime;
67
+ /** The editor's preview: its card filter values win, and it previews the authored table. */
68
+ editor?: {
69
+ inlineFilterValuesMap: Record<string, TFilterValue[] | undefined>;
70
+ };
71
+ /** Also carry the card's request, built from the same assembled inputs (D3b-2). */
72
+ withRequest?: boolean;
73
+ };
74
+ export type DashboardCardExecutionSnapshot = {
75
+ status: 'ready';
76
+ card: TCard;
77
+ sheetId: string;
78
+ queryContext: CompiledCardQueryContext;
79
+ matrix?: ReturnType<typeof prepareMatrixCard>;
80
+ /** The request the card posts to /api/v1/query (`withRequest`; never for Matrix). */
81
+ request?: CardRequestPayload;
82
+ };
83
+ export type DashboardCardExecutionSnapshotResult = DashboardCardExecutionSnapshot | {
84
+ status: 'blocked';
85
+ cardId: string;
86
+ mappingDispositions: CompiledDashboardCardFilters['mappingDispositions'];
87
+ reason?: 'metadata' | 'configuration' | 'coverage';
88
+ message?: string;
89
+ } | null;
90
+ export declare function requireReadyDashboardCardExecutionSnapshot(result: DashboardCardExecutionSnapshotResult): DashboardCardExecutionSnapshot | null;
91
+ /** One card's compiled query from captured or current values, through the card query assembly. */
92
+ export declare function buildDashboardCardExecutionSnapshot({ dashboard, cardId, transientContexts, cardViewStates, viewerTableSettings, semanticExecutionPayload, filterValues, inlineFilterValuesMap, dashboardControlValues, cardControlValuesMap, dashboardInputValues, calendar, matrixCatalog, cardOverride, sheetId, documentSection, editor, withRequest, }: BuildDashboardCardExecutionSnapshotParams): DashboardCardExecutionSnapshotResult;
93
+ export {};
@@ -0,0 +1,72 @@
1
+ import { TCard } from '../types/common-types.js';
2
+ import { CardConfig, DataSource, PaginationConfig, TableTotalsRequest } from '../types/explorer-types.js';
3
+ import { CardQueryRequestExtras, DashboardCardQueryRequestPayloadBase } from '../../shared/dashboard-authoring/card-query-request.js';
4
+ import { DocumentTableDataPolicy } from '../document/document-table-data-policy.js';
5
+ /**
6
+ * A card's request as the server runs it: the card query assembly's request
7
+ * payload with the card's connection and data source. One owner for the live
8
+ * card query, CSV export and the analytics agent's replay of a card (Plan 1,
9
+ * Phase 3b, D3b-2, ledger P3-72, P3-78). Pure and React-free, so the Node
10
+ * entry can build a saved card's request too.
11
+ */
12
+ export type CardServerRequestOptions = {
13
+ /** The editor in dev mode runs a card on the card's own connection. */
14
+ editorDevMode?: boolean;
15
+ };
16
+ /** The assembly's request with its extras: the whole request a card's query runs with. */
17
+ export type CardRequestPayload = DashboardCardQueryRequestPayloadBase & CardQueryRequestExtras;
18
+ export type CardServerRequest = {
19
+ connectionId: string;
20
+ requestPayloadBase: CardRequestPayload & {
21
+ cardDataSource: DataSource;
22
+ };
23
+ };
24
+ /** The live card query sends the card's own data source, which may be absent. */
25
+ export type LiveCardServerRequest = {
26
+ connectionId: string;
27
+ requestPayloadBase: CardRequestPayload;
28
+ };
29
+ /** The page a new viewer opens a server-paginated card on. */
30
+ export declare function firstCardPage(card: TCard): PaginationConfig;
31
+ /**
32
+ * A card's request extras: the page a server-paginated table runs (the card,
33
+ * the display and a Document table policy decide whether it paginates) and a
34
+ * flat table's totals request. The live query passes the viewer's page; a
35
+ * captured request (the analytics agent's replay) passes `firstCardPage`,
36
+ * the page a new viewer opens on.
37
+ */
38
+ export declare function resolveCardRequestExtras(input: {
39
+ card: TCard;
40
+ /** The config the card runs with (drilled, sorted): its totals are taken from it. */
41
+ finalConfig: CardConfig | undefined;
42
+ /** A printed table runs whole. Default: on screen. */
43
+ display?: {
44
+ isTablePrintMode: boolean;
45
+ isPrintDisplayMode: boolean;
46
+ };
47
+ /** Present for a card in a Document section, with the section's table policy. */
48
+ documentSection?: {
49
+ documentTableDataPolicy?: DocumentTableDataPolicy;
50
+ };
51
+ /** The page the viewer is on. */
52
+ page?: PaginationConfig;
53
+ /** A caller's own totals request (a Document table's). */
54
+ tableTotalsRequest?: TableTotalsRequest;
55
+ }): CardQueryRequestExtras;
56
+ /**
57
+ * The connection a card runs on: a SQL card's own connection first, any other
58
+ * card's data source first; the editor in dev mode only the card's own.
59
+ * Undefined when the card names none.
60
+ */
61
+ export declare function resolveCardConnectionId(card: TCard, options?: CardServerRequestOptions): string | undefined;
62
+ /**
63
+ * Throws when the card names no connection. A server replay or an export
64
+ * needs a data source and gets one built from the connection when the card
65
+ * has none; the live query passes `liveDataSource` and sends the card's own.
66
+ */
67
+ export declare function buildCardServerRequest(card: TCard, requestPayloadBase: CardRequestPayload, options?: CardServerRequestOptions & {
68
+ liveDataSource?: false;
69
+ }): CardServerRequest;
70
+ export declare function buildCardServerRequest(card: TCard, requestPayloadBase: CardRequestPayload, options: CardServerRequestOptions & {
71
+ liveDataSource: true;
72
+ }): LiveCardServerRequest;
@@ -55,6 +55,13 @@ export type DashboardCardFilterCompilationResult = (CompiledDashboardCardFilters
55
55
  export declare function requireReadyDashboardCardFilters(result: DashboardCardFilterCompilationResult): CompiledDashboardCardFilters & {
56
56
  status: 'ready';
57
57
  };
58
+ /**
59
+ * Whether a filter input still applies when a carried context turns the
60
+ * dashboard's own filters off (`resolveContextAwareFilterPolicy`): only inputs
61
+ * authored for specific cards and the cards' inline filters do. The one rule
62
+ * for the compiler and for any reader that says which filters a view applies.
63
+ */
64
+ export declare function filterInputSurvivesCarriedContext(input: Pick<NormalizedDashboardInput, 'kind' | 'scope' | 'compatibility'>): boolean;
58
65
  export declare function composeCardFilterValues(card: TCard, input: DashboardCardFilterCompilationInput): {
59
66
  status: 'ready';
60
67
  filterValues: TFilterValue[];
@@ -0,0 +1,56 @@
1
+ import { TCard } from '../types/common-types.js';
2
+ import { AssistantCardDescription } from '../../shared/assistant-protocol/context.js';
3
+ import { DashboardCardExecutionSnapshotResult } from './build-dashboard-execution-snapshot.js';
4
+ import { CalendarContext } from '../../shared/report-runtime-context/index.js';
5
+ /**
6
+ * What a card runs, for the assistant (analytics agent Plan 1, ledger D3a-4,
7
+ * D3a-5, D3a-8): a formatting of the compiled execution snapshot, never a
8
+ * second resolution of inputs, fields, dates or labels.
9
+ *
10
+ * Kept: fields by role at the level the card runs (details included), every
11
+ * filter by origin with its and/or grouping (dashboard inputs as compiled for
12
+ * this card, the card's own inputs and saved filters, drill, selections), the
13
+ * drill path, the controls the card binds or its SQL references with their
14
+ * values, and the SQL with its parameters, every condition through the one
15
+ * full-detail renderer.
16
+ * Past a cap an entry is counted in `omitted`; the fingerprint is the card's
17
+ * query identity, so it covers all.
18
+ *
19
+ * Not described, by capability: Matrix, custom visuals, Python, and a
20
+ * snapshot that is blocked or still loading. Never a guess.
21
+ */
22
+ /** A card's snapshot as its store adapter has it: `'pending'` while it loads. */
23
+ export type CardExecutionSnapshotState = DashboardCardExecutionSnapshotResult | 'pending';
24
+ export type DescribedCardExecution = {
25
+ fingerprint: string;
26
+ description: AssistantCardDescription;
27
+ };
28
+ export type DescribeCardExecutionOptions = {
29
+ /** The report calendar the card runs in; instants spanning whole days in its zone read as dates. */
30
+ calendar: CalendarContext;
31
+ };
32
+ /**
33
+ * How the description treats every fact the compiled context carries. A field
34
+ * added to the compiled context fails the type-check until it is classified
35
+ * here, so nothing a card runs goes unmentioned by accident (ledger P3-66).
36
+ */
37
+ export declare const COMPILED_FACT_TREATMENT: {
38
+ readonly finalConfig: "described";
39
+ readonly cardFilterValues: "described";
40
+ readonly queryFilterDefinitions: "described";
41
+ readonly resolvedFilterParts: "described";
42
+ readonly resolvedFilters: "described";
43
+ readonly drillSteps: "described";
44
+ readonly controlValues: "described";
45
+ readonly controlDefinitions: "described";
46
+ readonly cardControlDefinitions: "described";
47
+ readonly controlBindings: "described";
48
+ readonly queryRelevantConfig: "named_not_described";
49
+ readonly finalFiltersKey: "identity";
50
+ readonly resolvedPrimaryDateField: "identity";
51
+ readonly resolvedDateFields: "identity";
52
+ readonly globalDateComparison: "described";
53
+ readonly globalDateComparisonSelection: "described";
54
+ readonly dateComparisonInputs: "identity";
55
+ };
56
+ export declare function describeCardExecutionSnapshot(card: TCard, snapshot: CardExecutionSnapshotState, options: DescribeCardExecutionOptions): DescribedCardExecution;
@@ -0,0 +1,45 @@
1
+ import { CalendarContext } from '../../shared/report-runtime-context/index.js';
2
+ import { TFilterValue } from '../../components/surfboard/filter/types.js';
3
+ import { DashboardInputRuntimeValues } from '../dashboard-inputs/resolve-dashboard-input-context.js';
4
+ import { ControlDefinition, DashboardInputValues, TCard, TDashboard } from '../types/common-types.js';
5
+ import { BuildCardQueryContextParams } from './build-card-query-context.js';
6
+ import { EditorContext } from '../stores/editor-store.js';
7
+ /** What a Document sheet resolved for one section, as one card's query sees it. */
8
+ export type DocumentSectionCardRuntime = {
9
+ sheetId: string | undefined;
10
+ sectionId: string | undefined;
11
+ documentFilterValues: TFilterValue[];
12
+ documentControlDefinitions: ControlDefinition[];
13
+ documentControlValues: Record<string, unknown>;
14
+ /** The page's own input values; the editor's query uses the dashboard's. */
15
+ documentDashboardInputValues?: DashboardInputValues;
16
+ /** The editor's card filters, for the editor's query of the card it edits. */
17
+ editorFilterValues?: TFilterValue[];
18
+ };
19
+ /**
20
+ * The section an open editor edits, as the editor's own query runs it: the
21
+ * editor's snapshot of the document inputs and its card filter values.
22
+ */
23
+ export declare function buildEditedDocumentSectionRuntime(editorContext: Extract<EditorContext, {
24
+ type: 'documentSection';
25
+ }>, editorFilterValues: TFilterValue[] | undefined): DocumentSectionCardRuntime;
26
+ /**
27
+ * The `buildCardQueryContext` inputs for a card that runs as a Document
28
+ * section. A section is its own runtime:
29
+ * - nothing is carried in (no transient contexts, no drill state);
30
+ * - the dashboard's toolbar filters and controls do not apply;
31
+ * - the section's scoped dashboard inputs apply when the dashboard has any,
32
+ * otherwise the document's filter and control values do.
33
+ *
34
+ * The one owner of these rules, for frame queries and the Matrix execution
35
+ * snapshot alike.
36
+ */
37
+ export declare function buildDocumentSectionCardQueryParams({ card, dashboard, runtime, dashboardRuntimeValues, calendar, }: {
38
+ card: TCard;
39
+ dashboard: TDashboard;
40
+ runtime: DocumentSectionCardRuntime;
41
+ /** The dashboard's runtime values, which scoped input resolution reads. */
42
+ dashboardRuntimeValues: Omit<DashboardInputRuntimeValues, 'cardViewState'>;
43
+ /** The report calendar the section's input defaults resolve in (CQ-D8); null only before the report context loads. */
44
+ calendar: CalendarContext | null;
45
+ }): Omit<BuildCardQueryContextParams, 'selectedSheetId' | 'includeAuthoredFilters'>;
@@ -14,16 +14,31 @@ import { SelectionFilterSource } from './compile-selection-filters.js';
14
14
  * - Within a selection: AND inside a tuple, OR across tuples, AND across source cards
15
15
  * - Between authored filters, the drill path, and selections: AND
16
16
  */
17
- export declare function resolveRuntimeCardFilters(card: TCard, options?: {
17
+ export declare function resolveRuntimeCardFilters(card: TCard, options?: RuntimeCardFilterOptions): FilterGroup | undefined;
18
+ /** Authored filters, then the drill path, then selections; all AND-ed. */
19
+ export declare function mergeRuntimeCardFilterParts(parts: RuntimeCardFilterParts): FilterGroup | undefined;
20
+ type RuntimeCardFilterOptions = {
18
21
  includeAuthoredFilters?: boolean;
19
22
  /** Other cards' selections, already resolved for this card. */
20
23
  selections?: SelectionFilterSource[];
21
24
  /** This card's drill path, from card view state. */
22
25
  drill?: CardDrillPath;
23
- }): FilterGroup | undefined;
26
+ };
27
+ /**
28
+ * The groups `resolveRuntimeCardFilters` merges, by origin, for readers that
29
+ * keep where each condition came from (the assistant's card description,
30
+ * analytics agent Plan 1, D3a-4).
31
+ */
32
+ export type RuntimeCardFilterParts = {
33
+ authored?: FilterGroup;
34
+ drill?: FilterGroup;
35
+ selections?: FilterGroup;
36
+ };
37
+ export declare function resolveRuntimeCardFilterParts(card: TCard, options?: RuntimeCardFilterOptions): RuntimeCardFilterParts;
24
38
  /**
25
39
  * The configuration a card runs with: grouped at its current drill level, with
26
40
  * the resolved runtime filters. Validated here so every consumer (queries,
27
41
  * exports, and so on) gets a valid comparison configuration.
28
42
  */
29
43
  export declare function resolveRuntimeCardConfig(card: TCard, drill: CardDrillPath | undefined, resolvedFilters: FilterGroup | undefined): CardConfig;
44
+ export {};