@bitcobblers/wod-wiki-ui 0.60.2250 → 0.60.2258

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.
package/dist/index.d.ts CHANGED
@@ -1,10 +1,11 @@
1
- import { Q as QueryExecutor, O as OutputFilterInput, S as SessionTableSortSpec, I as InlineMetricEditPayload, R as RowPrHighlight } from './index-C3DEUF-0.js';
2
- export { A as AttachmentUrlResolver, B as ButtonAction, C as CategorizedMetrics, a as CursorFocusState, b as CustomCompletionSource, D as DEFAULT_OUTPUT_FILTERS, c as DEFAULT_PRIMARY_FILTER, d as DefaultFrontmatterWidget, E as EditorDialect, e as EditorPresetOptions, f as EditorSection, g as EditorSectionSubtype, h as EditorSectionType, i as EmbedType, F as FrontmatterCatalogEntry, j as FrontmatterRefDiagnostic, k as FrontmatterReferenceProvider, l as FrontmatterReferenceRef, m as FrontmatterReferenceResolution, n as FrontmatterSuggestionCatalog, G as GeometryListener, o as INTERNAL_FRONTMATTER_KEYS, M as MetricBadge, N as NavigationHook, p as NestedCompletionOptions, q as OUTPUT_TYPE_CLASS, r as OUTPUT_TYPE_DOT, s as OutputFilterPills, t as OutputFilterPreset, u as OutputStatementRow, v as OutputStatementsTable, w as OutputStatementsTableProps, x as OverlayAction, y as QueryBlockPreviewOptions, z as RuntimePanelEntry, H as SectionIdentity, J as SectionRect, K as SectionState, T as TONE_CLASS, W as WidgetConfig, L as WidgetProps, P as WidgetRegistry, U as activeCursorSection, V as addRuntimePanel, X as affiliateTagFacet, Y as applyAmazonAffiliateTag, Z as attachmentUrlFacet, _ as autocompleteTooltipTheme, $ as configureOverlayActions, a0 as cursorFocusExtension, a1 as customCompletionSources, a2 as dispatchAddRuntimePanel, a3 as dispatchExpandRuntimePanel, a4 as dispatchGutterHighlights, a5 as dispatchRemoveRuntimePanel, a6 as editingQuerySectionsField, a7 as editingWidgetsField, a8 as editorFocusField, a9 as editorFocusTracker, aa as editorPreset, ab as editorTheme, ac as embedPreviewDecorations, ad as expandRuntimePanel, ae as extractMetricsByCategory, af as fenceCompletion, ag as findQueryBlockSection, ah as findWorkoutErrors, ai as forceSectionParse, aj as formatClockTime, ak as formatMMSS, al as frontmatterDebugMode, am as frontmatterDetailed, an as frontmatterKeymap, ao as frontmatterPreview, ap as frontmatterPreviewField, aq as frontmatterReferenceIndex, ar as frontmatterSource, as as frontmatterSuggestions, at as frontmatterVisibility, au as getCursorFocusState, av as getOverlayActions, aw as gutterHighlightsField, ax as gutterUnified, ay as handleFenceAutoWrap, az as handleSmartUrlPaste, aA as inlineButtonDecoration, aB as insertMarkdownLinkCommand, aC as isAmazonRetailHost, aD as isEditorFocused, aE as isInternalFrontmatterKey, aF as isNavigableUrl, aG as lineIdsExtension, aH as linkOpen, aI as linkPreview, aJ as markdownSyntaxHiding, aK as markdownTablePreview, aL as navigationFacet, aM as nestedCompletion, aN as nestedCompletionOptions, aO as normalizeOutputFilter, aP as presentBadges, aQ as previewDecorations, aR as queryBlockPreview, aS as referenceIndexReload, aT as registeredSectionWidgets, aU as removeRuntimePanel, aV as resolveCodeLanguage, aW as runtimePanelField, aX as saveBlockQuerySource, aY as sectionAtPos, aZ as sectionField, a_ as sectionGeometry, a$ as sectionIdentity, b0 as sectionIdentityHistory, b1 as sectionMove, b2 as sectionRestore, b3 as sectionSaved, b4 as sessionQueryFence, b5 as sessionQueryInsert, b6 as sessionQueryWql, b7 as setEditorFocused, b8 as setFrontmatterDetailed, b9 as setFrontmatterSource, ba as setGutterHighlights, bb as setQuerySourceEditing, bc as slashBlockCompletion, bd as smartIncrement, be as toggleInlineMarkdown, bf as toggleWidgetEdit, bg as urlAtPos, bh as widgetBlockPreview, bi as wodAutoWrap, bj as wodAutocompletion, bk as wodCompletionSource, bl as wodEditorKeymap, bm as wodLinter, bn as wodOverlayPanel, bo as workoutLintSource, bp as wrapInTimeFence } from './index-C3DEUF-0.js';
1
+ import { Q as QueryExecutor, S as SessionActionContext, O as OutputFilterInput, a as SessionTableSortSpec, I as InlineMetricEditPayload, R as RowPrHighlight } from './index--dnlfHhC.js';
2
+ export { A as AttachmentUrlResolver, B as ButtonAction, C as CategorizedMetrics, b as CursorFocusState, c as CustomCompletionSource, D as DEFAULT_OUTPUT_FILTERS, d as DEFAULT_PRIMARY_FILTER, e as DefaultFrontmatterWidget, E as EditorDialect, f as EditorPresetOptions, g as EditorSection, h as EditorSectionSubtype, i as EditorSectionType, j as EmbedType, F as FrontmatterCatalogEntry, k as FrontmatterRefDiagnostic, l as FrontmatterReferenceProvider, m as FrontmatterReferenceRef, n as FrontmatterReferenceResolution, o as FrontmatterSuggestionCatalog, G as GeometryListener, p as INTERNAL_FRONTMATTER_KEYS, M as MetricBadge, N as NavigationHook, q as NestedCompletionOptions, r as OUTPUT_TYPE_CLASS, s as OUTPUT_TYPE_DOT, t as OutputFilterPills, u as OutputFilterPreset, v as OutputStatementRow, w as OutputStatementsTable, x as OutputStatementsTableProps, y as OverlayAction, z as QueryBlockPreviewOptions, H as RpePopoverControl, J as RpePopoverControlProps, K as RuntimePanelEntry, L as SectionIdentity, P as SectionRect, T as SectionState, U as SessionQueryFenceOptions, V as SessionSummaryCard, W as SessionSummaryCardProps, X as TONE_CLASS, Y as WidgetConfig, Z as WidgetProps, _ as WidgetRegistry, $ as activeCursorSection, a0 as addRuntimePanel, a1 as affiliateTagFacet, a2 as applyAmazonAffiliateTag, a3 as attachmentUrlFacet, a4 as autocompleteTooltipTheme, a5 as configureOverlayActions, a6 as cursorFocusExtension, a7 as customCompletionSources, a8 as dispatchAddRuntimePanel, a9 as dispatchExpandRuntimePanel, aa as dispatchGutterHighlights, ab as dispatchRemoveRuntimePanel, ac as editingQuerySectionsField, ad as editingWidgetsField, ae as editorFocusField, af as editorFocusTracker, ag as editorPreset, ah as editorTheme, ai as embedPreviewDecorations, aj as expandRuntimePanel, ak as extractMetricsByCategory, al as fenceCompletion, am as findQueryBlockSection, an as findWorkoutErrors, ao as forceSectionParse, ap as formatClockTime, aq as formatMMSS, ar as formatSummaryDurationMMSS, as as frontmatterDebugMode, at as frontmatterDetailed, au as frontmatterKeymap, av as frontmatterPreview, aw as frontmatterPreviewField, ax as frontmatterReferenceIndex, ay as frontmatterSource, az as frontmatterSuggestions, aA as frontmatterVisibility, aB as getCursorFocusState, aC as getOverlayActions, aD as gutterHighlightsField, aE as gutterUnified, aF as handleFenceAutoWrap, aG as handleSmartUrlPaste, aH as inlineButtonDecoration, aI as insertMarkdownLinkCommand, aJ as isAmazonRetailHost, aK as isEditorFocused, aL as isInternalFrontmatterKey, aM as isNavigableUrl, aN as lineIdsExtension, aO as linkOpen, aP as linkPreview, aQ as markdownSyntaxHiding, aR as markdownTablePreview, aS as navigationFacet, aT as nestedCompletion, aU as nestedCompletionOptions, aV as normalizeOutputFilter, aW as presentBadges, aX as previewDecorations, aY as queryBlockPreview, aZ as referenceIndexReload, a_ as registeredSectionWidgets, a$ as removeRuntimePanel, b0 as resolveCodeLanguage, b1 as runtimePanelField, b2 as saveBlockQuerySource, b3 as sectionAtPos, b4 as sectionField, b5 as sectionGeometry, b6 as sectionIdentity, b7 as sectionIdentityHistory, b8 as sectionMove, b9 as sectionRestore, ba as sectionSaved, bb as sessionQueryFence, bc as sessionQueryInsert, bd as sessionQueryWql, be as setEditorFocused, bf as setFrontmatterDetailed, bg as setFrontmatterSource, bh as setGutterHighlights, bi as setQuerySourceEditing, bj as slashBlockCompletion, bk as smartIncrement, bl as toggleInlineMarkdown, bm as toggleWidgetEdit, bn as urlAtPos, bo as widgetBlockPreview, bp as wodAutoWrap, bq as wodAutocompletion, br as wodCompletionSource, bs as wodEditorKeymap, bt as wodLinter, bu as wodOverlayPanel, bv as workoutLintSource, bw as wrapInTimeFence } from './index--dnlfHhC.js';
3
3
  import * as react from 'react';
4
- import react__default, { ReactNode, ComponentType } from 'react';
5
- import { QueryResult, RowsRun, NoteContainer, TabularResult, PipelineSink, QueryDocumentRunnerHost, Series, AnyParsedQuery, DocumentOutput, DocumentResult, DashboardToken, DashboardDocument, DashboardWidget, RowsQueryResult, FindQueryResult, ParsedAggregateQuery, ParsedFindQuery, ParsedPipelineQuery, WqlCursorStageInfo, QueryBlockObject } from '@bitcobblers/wod-wiki-wql';
4
+ import react__default, { ReactNode, ComponentType, RefObject, KeyboardEvent } from 'react';
5
+ import { QueryResult, RowsRun, NoteContainer, TabularResult, PipelineSink, QueryDocumentRunnerHost, Series, AnyParsedQuery, DocumentOutput, DocumentResult, DashboardToken, DashboardDocument, DashboardWidget, RowsQueryResult, ParsedAggregateQuery, FindQueryResult, ParsedFindQuery, ParsedPipelineQuery, WqlCursorStageInfo, QueryBlockObject } from '@bitcobblers/wod-wiki-wql';
6
6
  export { CONTENT_GROUPING_DIMENSIONS, FindOptions, FindQueryResult, ParsedAggregateQuery, ParsedFindQuery, ParsedPipelineQuery, ParsedRowsQuery, PipelineResult, QueryOptions, QueryResult, RowsQueryResult, RowsRun } from '@bitcobblers/wod-wiki-wql';
7
- import { EventRecord, BlockIndexRow } from '@bitcobblers/wod-wiki-core';
7
+ import * as _bitcobblers_wod_wiki_core from '@bitcobblers/wod-wiki-core';
8
+ import { EventRecord, Note, BlockIndexRow } from '@bitcobblers/wod-wiki-core';
8
9
  export { blockContentId } from '@bitcobblers/wod-wiki-core';
9
10
  import { ClassValue } from 'clsx';
10
11
  import '@codemirror/state';
@@ -30,6 +31,8 @@ interface WidgetFrameProps {
30
31
  /** Raw WQL for the widget. Hidden by default — only rendered with showQuery. */
31
32
  query?: string;
32
33
  span?: string;
34
+ /** Semantic heading level (h2 when top-level inside a page h1, h3 under a section h2). */
35
+ headingLevel?: 2 | 3;
33
36
  /** Show the raw WQL query box (teaching/authoring surfaces). View-first default hides it. */
34
37
  showQuery?: boolean;
35
38
  /**
@@ -49,7 +52,7 @@ interface WidgetFrameProps {
49
52
  toolbar?: ReactNode;
50
53
  children: ReactNode;
51
54
  }
52
- declare function WidgetFrame({ id, title, question, query, span, showQuery, onInspect, onOpenInExplorer, toolbar, children }: WidgetFrameProps): react.JSX.Element;
55
+ declare function WidgetFrame({ id, title, question, query, span, headingLevel, showQuery, onInspect, onOpenInExplorer, toolbar, children }: WidgetFrameProps): react.JSX.Element;
53
56
  /** Standard edit-mode tool-button chrome for the widget toolbar. */
54
57
  declare function WidgetToolButton({ label, onClick, disabled, active, children, }: {
55
58
  label: string;
@@ -67,7 +70,7 @@ declare function WidgetEditButton({ title, onClick }: {
67
70
  interface QueryValueProps {
68
71
  result: QueryResult;
69
72
  unit?: string;
70
- label: string;
73
+ label?: string;
71
74
  thresholds?: {
72
75
  green: [number, number];
73
76
  red: [number, number];
@@ -188,8 +191,12 @@ interface WidgetChartProps {
188
191
  title?: string;
189
192
  blockContentId?: string;
190
193
  }) => string;
194
+ /** Optional handler to open full spreadsheet results for a session/summary widget. */
195
+ onOpenResults?: (ctx: SessionActionContext) => void;
196
+ /** Optional handler to promote a session summary widget to another dashboard. */
197
+ onAddToDashboard?: (ctx: SessionActionContext) => void;
191
198
  }
192
- declare function WidgetChart({ type, result, label, unit, params, attributes, inferDefaultShape, onOpenNote, noteHref, }: WidgetChartProps): react__default.JSX.Element;
199
+ declare function WidgetChart({ type, result, label, unit, params, attributes, inferDefaultShape, onOpenNote, noteHref, onOpenResults, onAddToDashboard, }: WidgetChartProps): react__default.JSX.Element;
193
200
  declare function WidgetProblemBadge({ message }: {
194
201
  message: string;
195
202
  }): react__default.JSX.Element;
@@ -251,7 +258,16 @@ interface DashboardViewProps {
251
258
  /** Optional execution range (ms epoch). Omit to use each query's own window. */
252
259
  rangeStart?: number;
253
260
  rangeEnd?: number;
261
+ /** Optional invalidation key — changing it re-runs widget queries. */
262
+ refreshKey?: number | string;
254
263
  preferredUnit?: string;
264
+ /** Optional contextual page sources (`@session`, `@block`, `@notebook`, `@note`). */
265
+ pageSources?: ReadonlyMap<string, {
266
+ events: _bitcobblers_wod_wiki_core.EventRecord[];
267
+ notes: _bitcobblers_wod_wiki_core.Note[];
268
+ }>;
269
+ /** Optional click handler for opening full session results from summary/session widgets. */
270
+ onOpenResults?: (ctx: SessionActionContext) => void;
255
271
  /** Optional click handler for opening a note/block from content-plane widgets. */
256
272
  onOpenNote?: (item: {
257
273
  id: string;
@@ -276,7 +292,7 @@ interface DashboardViewProps {
276
292
  * surfaces the affordances (edit-mode toolbar, inspect button) and reports
277
293
  * through the injected callbacks — it never owns dialog or write state.
278
294
  */
279
- declare function DashboardView({ document, headings, executor, onEnsureRollupFacts, tokenValues, onTokenChange, editMode, onEditWidget, onInspectWidget, onOpenInExplorer, onDuplicateWidget, onRemoveWidget, onMoveWidget, onResizeWidget, rangeStart, rangeEnd, preferredUnit, onOpenNote, noteHref, onLoadingChange, }: DashboardViewProps): react.JSX.Element;
295
+ declare function DashboardView({ document, headings, executor, onEnsureRollupFacts, tokenValues, onTokenChange, editMode, onEditWidget, onInspectWidget, onOpenInExplorer, onDuplicateWidget, onRemoveWidget, onMoveWidget, onResizeWidget, rangeStart, rangeEnd, refreshKey, preferredUnit, pageSources, onOpenResults, onOpenNote, noteHref, onLoadingChange, }: DashboardViewProps): react.JSX.Element;
280
296
 
281
297
  interface WqlEmptyStateProps {
282
298
  result?: QueryResult | undefined;
@@ -412,6 +428,104 @@ interface RowsTableProps {
412
428
  * run, filter pills on top, and the shared statement table as the body. */
413
429
  declare function RowsTable({ result, renderRunHeaderExtra, presets, filter, onFilterChange, columns, sort, onSortChange, limit, onEditMetric, prHighlights, }: RowsTableProps): react.JSX.Element;
414
430
 
431
+ type SpreadsheetTabId = 'splits' | 'movement' | 'compare' | 'raw';
432
+ type ColumnPresetId = 'execution' | 'strength' | 'pacing' | 'all';
433
+ type MobileColumnGroupId = 'core' | 'output' | 'strength';
434
+ type EditableMetricField = 'reps' | 'load' | 'split' | 'distance';
435
+ interface SpreadsheetSplitRow {
436
+ id: string;
437
+ index: number;
438
+ event: EventRecord;
439
+ sourceBlockKey?: string;
440
+ sourceStatementId?: number;
441
+ stackLevel?: number;
442
+ effortSlug: string;
443
+ movement: string;
444
+ round: number | null;
445
+ reps: number | null;
446
+ repsType: string;
447
+ repsModified: boolean;
448
+ load: number | null;
449
+ loadUnit: string;
450
+ loadType: string;
451
+ loadModified: boolean;
452
+ splitSec: number | null;
453
+ splitModified: boolean;
454
+ offsetSec: number;
455
+ distance: number | null;
456
+ distanceUnit: string;
457
+ distanceModified: boolean;
458
+ volume: number | null;
459
+ volumeUnit: string;
460
+ e1rm: number | null;
461
+ e1rmUnit: string;
462
+ power: number | null;
463
+ powerUnit: string;
464
+ paceSecPerKm: number | null;
465
+ isModified: boolean;
466
+ prHighlight?: RowPrHighlight;
467
+ custom: Record<string, {
468
+ label: string;
469
+ value: number;
470
+ unit?: string;
471
+ modified: boolean;
472
+ }>;
473
+ }
474
+ interface SpreadsheetEditSheetContext {
475
+ field: EditableMetricField;
476
+ label: string;
477
+ currentValue: number | null;
478
+ unit?: string;
479
+ row: SpreadsheetSplitRow;
480
+ onSave: (nextValue: number) => Promise<void>;
481
+ onClear?: () => Promise<void>;
482
+ onClose: () => void;
483
+ }
484
+ interface ResultsSpreadsheetGridProps {
485
+ run: RowsRun;
486
+ compareRuns?: readonly RowsRun[];
487
+ prHighlights?: ReadonlyMap<string | number, RowPrHighlight> | Record<string, RowPrHighlight>;
488
+ noteTitle?: string;
489
+ /** Optional test ID on the primary desktop/mobile splits `<table>` (e.g. `TEST_IDS.PROPERTY_TABLE`). */
490
+ tableTestId?: string;
491
+ onEditMetric?: (resultId: string, payload: InlineMetricEditPayload) => void | Promise<void>;
492
+ onClearMetric?: (resultId: string, payload: {
493
+ sourceBlockKey?: string;
494
+ sourceStatementId?: number;
495
+ metricType: string;
496
+ }) => void | Promise<void>;
497
+ onCaptureRpe?: (resultId: string, rpe: number) => Promise<void> | void;
498
+ onAddToDashboard?: (ctx: SessionActionContext) => void;
499
+ onSelectCompareRun?: (resultId: string) => void;
500
+ /** Render computed shake-out summary / analytics rows above or beside the grid (completion & overview). */
501
+ showCustomSummariesStrip?: boolean;
502
+ /** Controlled active tab (defaults to uncontrolled `'splits'`). */
503
+ activeTab?: SpreadsheetTabId;
504
+ onTabChange?: (tab: SpreadsheetTabId) => void;
505
+ /** Controlled mobile presentation mode (`'grid' | 'cards'`). */
506
+ mobileViewMode?: 'grid' | 'cards';
507
+ onMobileViewModeChange?: (mode: 'grid' | 'cards') => void;
508
+ /** Optional host edit sheet (e.g. `ClockValueEntry`); defaults to built-in numeric/duration keypad. */
509
+ renderEditSheet?: (ctx: SpreadsheetEditSheetContext) => ReactNode;
510
+ readOnly?: boolean;
511
+ className?: string;
512
+ }
513
+ declare function buildSpreadsheetRows(run: RowsRun, prHighlights?: ReadonlyMap<string | number, RowPrHighlight> | Record<string, RowPrHighlight>): SpreadsheetSplitRow[];
514
+ /**
515
+ * ResultsSpreadsheetGrid — Production 4-tab execution workbook (`Splits`,
516
+ * `By Movement`, `Compare Runs`, `Raw Events`) with desktop frozen identity
517
+ * column, semantic multi-sort headers, arrow-key navigation, column presets,
518
+ * pinned footer totals, CSV export, and mobile 3-column group pills / cards.
519
+ */
520
+ declare function ResultsSpreadsheetGrid({ run, compareRuns, prHighlights, noteTitle, tableTestId, onEditMetric, onClearMetric, onCaptureRpe, onAddToDashboard, onSelectCompareRun, showCustomSummariesStrip, activeTab: controlledTab, onTabChange, mobileViewMode: controlledMobileView, onMobileViewModeChange, renderEditSheet, readOnly, className, }: ResultsSpreadsheetGridProps): react.JSX.Element;
521
+
522
+ /**
523
+ * Resolve the effective display unit for an analytics widget without letting a
524
+ * host `kg`/`lb` mass preference overwrite unitless, ratio, score, or count
525
+ * series (e.g. `calc.adherence`, `tis`, `sessionLoad`, `reps`, `%`).
526
+ */
527
+ declare function resolveWidgetDisplayUnit(result: Pick<QueryResult, 'unit' | 'parsed' | 'series'> | undefined, preferredUnit?: string, explicitSeriesUnit?: string): string;
528
+
415
529
  interface QueryBlockViewProps {
416
530
  /** Raw text between the ```query fences — the WQL query string or Query Document body. */
417
531
  query: string;
@@ -434,7 +548,14 @@ interface QueryBlockViewProps {
434
548
  /** Fence-tag presentation attributes (decision 22). */
435
549
  attributes?: Record<string, string>;
436
550
  /** Optional action for saving this query as a dashboard widget. */
437
- onAddToDashboard?: () => void;
551
+ onAddToDashboard?: (ctx?: SessionActionContext) => void;
552
+ /** Optional handler to open full spreadsheet results for a session. */
553
+ onOpenResults?: (ctx: SessionActionContext) => void;
554
+ /** Optional contextual page sources (`@session`, `@block`, `@notebook`, `@note`). */
555
+ pageSources?: ReadonlyMap<string, {
556
+ events: EventRecord[];
557
+ notes: Note[];
558
+ }>;
438
559
  /** Optional RPE capture handler. */
439
560
  onCaptureRpe?: (resultId: string, rpe: number) => Promise<void>;
440
561
  /** Optional inline metric actuals editor (`captureMetricCorrection`). */
@@ -454,7 +575,7 @@ interface QueryBlockViewProps {
454
575
  /** Optional handler to reveal the raw fenced WQL source in the host editor. */
455
576
  onEditSource?: () => void;
456
577
  }
457
- declare function QueryBlockView({ query, executor, onResultSaved, onSaveQuery, queryIndex: _queryIndex, readOnly, widgetType, widgetError, tokenValues, attributes, onAddToDashboard, onCaptureRpe, onEditMetric, onOpenNote, noteHref, onEditSource, }: QueryBlockViewProps): react.JSX.Element;
578
+ declare function QueryBlockView({ query, executor, onResultSaved, onSaveQuery, queryIndex: _queryIndex, readOnly, widgetType, widgetError, tokenValues, attributes, onAddToDashboard, onOpenResults, pageSources, onCaptureRpe, onEditMetric, onOpenNote, noteHref, onEditSource, }: QueryBlockViewProps): react.JSX.Element;
458
579
 
459
580
  declare function readSessionRpe(events: EventRecord[] | undefined): number | undefined;
460
581
  /**
@@ -484,8 +605,16 @@ interface RowsResultsChromeProps {
484
605
  limit?: number;
485
606
  /** Enable/disable historical PR badge comparison (defaults to true). */
486
607
  comparePr?: boolean;
608
+ /** Optional handler to open full spreadsheet results for this session. */
609
+ onOpenResults?: (ctx: SessionActionContext) => void;
610
+ /** Optional handler to add this session to a dashboard. */
611
+ onAddToDashboard?: (ctx: SessionActionContext) => void;
487
612
  }
488
- declare function RowsResultsChrome({ resultId, sessionResult, executor, onCaptureRpe, onEditMetric, onCaptured, columns, sort, limit, comparePr, }: RowsResultsChromeProps): react.JSX.Element;
613
+ declare function useSessionPrHighlights(sessionRun: RowsRun | undefined, blockContentId: string | undefined, executor: QueryExecutor | undefined, enabled: boolean, retainHistory?: boolean): {
614
+ wideResult: RowsQueryResult | undefined;
615
+ prHighlights: Map<string | number, RowPrHighlight> | undefined;
616
+ };
617
+ declare function RowsResultsChrome({ resultId, sessionResult, executor, onCaptureRpe, onEditMetric, onCaptured, columns, sort, limit, comparePr, onOpenResults, onAddToDashboard, }: RowsResultsChromeProps): react.JSX.Element;
489
618
 
490
619
  interface WqlQueryInspectorModalProps {
491
620
  isOpen: boolean;
@@ -503,21 +632,6 @@ interface WqlQueryInspectorModalProps {
503
632
  }
504
633
  declare function WqlQueryInspectorModal({ isOpen, onClose, initialQuery, initialWidgetType, initialAttributes, onApply, title, subtitle, applyLabel, executor, }: WqlQueryInspectorModalProps): react.JSX.Element;
505
634
 
506
- type WqlExecutor = (ast: AnyParsedQuery) => Promise<FindQueryResult | QueryResult>;
507
- type WqlStageCounts = {
508
- kind: 'find';
509
- selected: number;
510
- matched: number;
511
- } | {
512
- kind: 'aggregate';
513
- selected: number;
514
- buckets: number;
515
- aggregated: number;
516
- groups: number;
517
- };
518
- declare const DEFAULT_DIAGNOSTICS_DEBOUNCE_MS = 150;
519
- declare function useWqlStageCounts(ast: AnyParsedQuery, valid: boolean, execute: WqlExecutor | undefined, debounceMs?: number): WqlStageCounts | undefined;
520
-
521
635
  /**
522
636
  * The WqlComposer pill vocabulary — types, metadata, and option lists.
523
637
  * Compilation and restore live in `./queryAst` (ticket 013): composer state
@@ -564,7 +678,7 @@ declare const KIND_OPTIONS: {
564
678
  }[];
565
679
  /** Singular find targets — the colon `<target>` head (C7 closed enum). */
566
680
  declare const TARGET_OPTIONS: {
567
- value: "page" | "note" | "block" | "feed" | "effort" | "segment" | "event" | "notebook" | "tag" | "equipment" | "session";
681
+ value: "page" | "feed" | "note" | "effort" | "segment" | "event" | "block" | "session" | "notebook" | "tag" | "equipment";
568
682
  label: string;
569
683
  description: string;
570
684
  }[];
@@ -579,8 +693,8 @@ declare const SOURCE_OPTIONS: {
579
693
  /** Output-statement planes for `plane:` on `:session` (executor narrows
580
694
  * events by the promoted `outputType` column). */
581
695
  declare const PLANE_OPTIONS: {
582
- value: "load" | "system" | "segment" | "completion" | "event" | "compiler" | "analytics" | "wellness";
583
- label: "load" | "system" | "segment" | "completion" | "event" | "compiler" | "analytics" | "wellness";
696
+ value: "load" | "system" | "compiler" | "segment" | "completion" | "event" | "analytics" | "wellness";
697
+ label: "load" | "system" | "compiler" | "segment" | "completion" | "event" | "analytics" | "wellness";
584
698
  }[];
585
699
  declare const TIME_OPTIONS: {
586
700
  value: string;
@@ -588,8 +702,8 @@ declare const TIME_OPTIONS: {
588
702
  }[];
589
703
  /** Aggregate head vocab — canonical homes (decision #824). */
590
704
  declare const AGG_OPTIONS: {
591
- value: "max" | "min" | "sum" | "avg" | "count" | "last" | "delta";
592
- label: "max" | "min" | "sum" | "avg" | "count" | "last" | "delta";
705
+ value: "max" | "min" | "count" | "sum" | "avg" | "last" | "delta";
706
+ label: "max" | "min" | "count" | "sum" | "avg" | "last" | "delta";
593
707
  }[];
594
708
  /** Multi-unit bucket widths — parse accepts any `N>1` + d|w (single-unit
595
709
  * day/week grouping is `by {day}`/`by {week}`, never `.rollup(1w)`); the
@@ -599,12 +713,12 @@ declare const ROLLUP_OPTIONS: {
599
713
  label: string;
600
714
  }[];
601
715
  declare const GROUPBY_OPTIONS: {
602
- value: "format" | "origin" | "result" | "day" | "page" | "domain" | "round" | "metric" | "note" | "block" | "week" | "effort" | "intensity" | "equipment" | "quality" | "intent" | "discipline" | "session" | "grade" | "grain" | "tags";
603
- label: "format" | "origin" | "result" | "day" | "page" | "domain" | "round" | "metric" | "note" | "block" | "week" | "effort" | "intensity" | "equipment" | "quality" | "intent" | "discipline" | "session" | "grade" | "grain" | "tags";
716
+ value: "split" | "format" | "origin" | "result" | "month" | "day" | "page" | "domain" | "round" | "note" | "effort" | "metric" | "intensity" | "week" | "block" | "session" | "notebook" | "tags" | "equipment" | "quality" | "intent" | "discipline" | "attempt" | "grade" | "grain";
717
+ label: "split" | "format" | "origin" | "result" | "month" | "day" | "page" | "domain" | "round" | "note" | "effort" | "metric" | "intensity" | "week" | "block" | "session" | "notebook" | "tags" | "equipment" | "quality" | "intent" | "discipline" | "attempt" | "grade" | "grain";
604
718
  }[];
605
719
  declare const METRIC_OPTIONS: {
606
- value: "calc.hrv" | "distance" | "resistance" | "tis" | "elapsed" | "reps" | "calc.e1rm" | "totalVolume" | "totalDistance" | "sessionLoad" | "power" | "pace" | "calc.metMinutes" | "calc.acwr" | "calc.monotony" | "calc.strain" | "calc.ctl" | "calc.atl" | "calc.tsb" | "calc.soreness" | "calc.sleep" | "calc.readiness" | "calc.mvcBw" | "calc.ef" | "calc.adherence" | "calc.pct1rm" | "calc.sends";
607
- label: "calc.hrv" | "distance" | "resistance" | "tis" | "elapsed" | "reps" | "calc.e1rm" | "totalVolume" | "totalDistance" | "sessionLoad" | "power" | "pace" | "calc.metMinutes" | "calc.acwr" | "calc.monotony" | "calc.strain" | "calc.ctl" | "calc.atl" | "calc.tsb" | "calc.soreness" | "calc.sleep" | "calc.readiness" | "calc.mvcBw" | "calc.ef" | "calc.adherence" | "calc.pct1rm" | "calc.sends";
720
+ value: "calc.hrv" | "resistance" | "calc.e1rm" | "tis" | "reps" | "calc.adherence" | "calc.acwr" | "calc.strain" | "calc.readiness" | "calc.sends" | "distance" | "pace" | "elapsed" | "power" | "totalVolume" | "totalDistance" | "sessionLoad" | "calc.metMinutes" | "calc.monotony" | "calc.ctl" | "calc.atl" | "calc.tsb" | "calc.soreness" | "calc.sleep" | "calc.mvcBw" | "calc.ef" | "calc.pct1rm";
721
+ label: "calc.hrv" | "resistance" | "calc.e1rm" | "tis" | "reps" | "calc.adherence" | "calc.acwr" | "calc.strain" | "calc.readiness" | "calc.sends" | "distance" | "pace" | "elapsed" | "power" | "totalVolume" | "totalDistance" | "sessionLoad" | "calc.metMinutes" | "calc.monotony" | "calc.ctl" | "calc.atl" | "calc.tsb" | "calc.soreness" | "calc.sleep" | "calc.mvcBw" | "calc.ef" | "calc.pct1rm";
608
722
  }[];
609
723
  declare const UNIT_OPTIONS: {
610
724
  value: "kg" | "lb";
@@ -635,10 +749,174 @@ declare const CLAUSE_META: Record<ClauseType, ClauseMeta>;
635
749
  */
636
750
  declare function getClauseMeta(type: string): ClauseMeta;
637
751
 
752
+ interface ClauseItemsResult {
753
+ isMulti: boolean;
754
+ selectedValues: string[];
755
+ /** All options (selected values preserved), unfiltered. */
756
+ items: {
757
+ value: string;
758
+ label: string;
759
+ }[];
760
+ /** Options after the typed filter; the exact typed value (when
761
+ * committable) is selectable at index `filteredItems.length`. */
762
+ filteredItems: {
763
+ value: string;
764
+ label: string;
765
+ }[];
766
+ /** The typed filter text, trimmed — a verbatim value when the slot is open. */
767
+ typedValue: string;
768
+ canCommitTyped: boolean;
769
+ loading: boolean;
770
+ /** True when the slot accepts typed values not present in the list (#831). */
771
+ openSlot: boolean;
772
+ /** Every list is searchable (work item 4): typing always filters. */
773
+ hasFilterInput: boolean;
774
+ /** Empty-state copy for the current filter; null when the list has rows. */
775
+ emptyText: string | null;
776
+ }
777
+
778
+ interface CustomSlotEditorProps<TValue> {
779
+ value: TValue | undefined;
780
+ onChange: (value: TValue) => void;
781
+ onClose: () => void;
782
+ }
783
+ interface CustomSlotDefinition<TValue = unknown> {
784
+ type: string;
785
+ label: string;
786
+ icon: string;
787
+ placeholder: string;
788
+ placeholderText: string;
789
+ description: string;
790
+ Editor: ComponentType<CustomSlotEditorProps<TValue>>;
791
+ wqlGenerator: (value: TValue) => string;
792
+ formatValue?: (value: TValue) => string;
793
+ parseValue?: (raw: string) => TValue | undefined;
794
+ validate?: (value: TValue) => string | null;
795
+ wqlValidator?: (wql: string) => string | null;
796
+ plane?: 'content' | 'metrics' | 'both';
797
+ }
798
+ declare class ComposerRegistry {
799
+ private readonly slots;
800
+ private readonly listeners;
801
+ private cachedList;
802
+ registerSlot<TValue>(def: CustomSlotDefinition<TValue>): () => void;
803
+ unregisterSlot(type: string): void;
804
+ getSlot(type: string): CustomSlotDefinition | undefined;
805
+ listSlots(): CustomSlotDefinition[];
806
+ getAllSlots(): CustomSlotDefinition[];
807
+ subscribe(listener: () => void): () => void;
808
+ private notify;
809
+ }
810
+ declare const composerRegistry: ComposerRegistry;
811
+ declare function useComposerSlots(registry?: ComposerRegistry): CustomSlotDefinition[];
812
+
813
+ type QueryZone = 'what' | 'where' | 'when' | 'group';
814
+ declare const ZONE_ORDER: readonly QueryZone[];
815
+ declare const ZONE_META: Record<QueryZone, {
816
+ label: string;
817
+ hint: string;
818
+ }>;
819
+ interface EnrichedQueryClause extends QueryClause {
820
+ zone: QueryZone;
821
+ invalid?: boolean;
822
+ invalidReason?: string;
823
+ }
824
+ interface ImplicitSlot {
825
+ type: 'time' | 'groupby';
826
+ zone: 'when' | 'group';
827
+ label: string;
828
+ placeholder: string;
829
+ }
830
+ interface ScopeZoneModel {
831
+ zone: QueryZone;
832
+ label: string;
833
+ hint: string;
834
+ clauses: EnrichedQueryClause[];
835
+ implicitSlots: ImplicitSlot[];
836
+ }
837
+ interface AddableFilterOption {
838
+ type: string;
839
+ label: string;
840
+ description: string;
841
+ prefix: string;
842
+ }
843
+ interface AddableFilterGroup {
844
+ group: string;
845
+ items: AddableFilterOption[];
846
+ }
847
+ /** Map a composer clause type onto its canonical WQL grammar zone. */
848
+ declare function getClauseZone(type: string): QueryZone;
849
+ /** Check whether a filter pill is honored by the current query target. */
850
+ declare function getClauseSupportError(clause: QueryClause, ast: AnyParsedQuery): string | undefined;
851
+ /** Group visible composer pills into WHAT / WHERE / WHEN / GROUP zones with explicit implicit slots. */
852
+ declare function buildScopeZones(pills: readonly QueryClause[], ast: AnyParsedQuery, allowed: ReadonlySet<string>, hiddenTypes: ReadonlySet<string>): ScopeZoneModel[];
853
+ /** Group allowed clause types into <=4-item scannable categories for the + Filter catalog. */
854
+ declare function buildAddableFilterGroups(candidateTypes: readonly string[], search: string, customSlotTypes?: ReadonlySet<string>): AddableFilterGroup[];
855
+ /** Format a WQL expression into a concise, gym-floor-readable summary for the mobile dock. */
856
+ declare function formatHumanQuerySummary(wql: string, fallback?: string): string;
857
+
858
+ interface QueryDraft {
859
+ wql: string;
860
+ ast: AnyParsedQuery;
861
+ valid: boolean;
862
+ error?: string;
863
+ }
864
+ /**
865
+ * Normalize a simple 2-stage `:segment{...} | :agg{metric:...} [by {...}]`
866
+ * pipeline (no sink, no source join/groupBy/pipes) into its equivalent
867
+ * `ParsedAggregateQuery` so UI builders can inspect and edit structured pills.
868
+ */
869
+ declare function normalizeSimplePipelineToAggregate(ast: AnyParsedQuery): ParsedAggregateQuery | null;
870
+ declare function wqlToPills(wql: string): QueryClause[] | null;
871
+ declare function editQueryClause(query: string, edited: QueryClause, value: string | null): QueryDraft;
872
+ /**
873
+ * Bind a `$token` parameter into a WQL query expression via pure AST mutation
874
+ * (replaces brittle regex brace surgery).
875
+ */
876
+ declare function bindTokenParamIntoWql(query: string, tokenName: string): string;
877
+ declare function resolveQueryDraft(query: string, pendingText?: string): QueryDraft;
878
+
879
+ type WqlExecutor = (ast: AnyParsedQuery) => Promise<FindQueryResult | QueryResult>;
880
+ type WqlStageCounts = {
881
+ kind: 'find';
882
+ selected: number;
883
+ matched: number;
884
+ } | {
885
+ kind: 'aggregate';
886
+ selected: number;
887
+ buckets: number;
888
+ aggregated: number;
889
+ groups: number;
890
+ };
891
+ declare const DEFAULT_DIAGNOSTICS_DEBOUNCE_MS = 150;
892
+ declare function useWqlStageCounts(ast: AnyParsedQuery, valid: boolean, execute: WqlExecutor | undefined, debounceMs?: number): WqlStageCounts | undefined;
893
+
638
894
  interface WqlValidationState {
639
895
  valid: boolean;
640
896
  error?: string;
641
897
  }
898
+ interface WqlSegmentEditRequest {
899
+ type: ClauseType;
900
+ /** Change the token to repeat a request for the same segment. */
901
+ token: number;
902
+ }
903
+ type ActiveEditor = {
904
+ kind: 'closed';
905
+ } | {
906
+ kind: 'scope';
907
+ } | {
908
+ kind: 'value';
909
+ clause: QueryClause;
910
+ range?: {
911
+ from: number;
912
+ to: number;
913
+ };
914
+ closeSurfaceOnCommit?: boolean;
915
+ } | {
916
+ kind: 'add-filter';
917
+ closeSurfaceOnCommit?: boolean;
918
+ };
919
+
642
920
  interface WqlComposerProps {
643
921
  initialQuery?: string;
644
922
  query?: string;
@@ -650,6 +928,8 @@ interface WqlComposerProps {
650
928
  onSubmit?: (wql: string) => void;
651
929
  actionLabel?: string;
652
930
  compact?: boolean;
931
+ defaultExpanded?: boolean;
932
+ surface?: 'popover' | 'inline' | 'sheet';
653
933
  showDiagnostics?: boolean;
654
934
  diagnosticsPosition?: 'top' | 'bottom';
655
935
  execute?: WqlExecutor;
@@ -666,13 +946,71 @@ interface WqlComposerProps {
666
946
  className?: string;
667
947
  /** External commands activate the same writer as pointer and keyboard entry. */
668
948
  segmentEditRequest?: WqlSegmentEditRequest;
949
+ /** Hide the zone Scope Map below `lg` while keeping the single text editor interactive (e.g. mobile palette Results view). */
950
+ hideScopeMap?: boolean;
951
+ onScopeOpenChange?: (open: boolean) => void;
669
952
  }
670
- interface WqlSegmentEditRequest {
671
- type: ClauseType;
672
- /** Change the token to repeat a request for the same segment. */
673
- token: number;
953
+ /**
954
+ * WqlComposer — unified Split-Pill header rail + in-place single WqlTextEditor
955
+ * and WHAT/WHERE/WHEN/GROUP Scope Map.
956
+ */
957
+ declare function WqlComposer({ initialQuery, query, onQueryChange, onValidationChange, onAstChange, onSubmit, actionLabel, compact, defaultExpanded, surface, showDiagnostics, diagnosticsPosition, execute, stages: suppliedStages, debounceMs, customSlots, diagnosticsActions, hiddenClauseTypes, preferredChoices, autoFocus, placeholder, className, segmentEditRequest, hideScopeMap, onScopeOpenChange, }: WqlComposerProps): react.JSX.Element;
958
+
959
+ interface ClauseIconProps {
960
+ /** Built-in ClauseType or custom slot type id. */
961
+ type: string;
962
+ className?: string;
674
963
  }
675
- declare function WqlComposer({ initialQuery, query, onQueryChange, onValidationChange, onAstChange, onSubmit, actionLabel, compact, showDiagnostics, diagnosticsPosition, execute, stages: suppliedStages, debounceMs, customSlots, diagnosticsActions, hiddenClauseTypes, preferredChoices, autoFocus, placeholder, className, segmentEditRequest, }: WqlComposerProps): react.JSX.Element;
964
+ /** Uniform vector icon replacing system emojis in composer pills and pickers. */
965
+ declare function ClauseIcon({ type, className }: ClauseIconProps): react.JSX.Element;
966
+
967
+ interface WqlScopeMapProps {
968
+ surface?: 'popover' | 'inline' | 'sheet';
969
+ zones: ScopeZoneModel[];
970
+ visiblePills: EnrichedQueryClause[];
971
+ ignoredClauses: EnrichedQueryClause[];
972
+ active: ActiveEditor;
973
+ activeZone?: QueryZone;
974
+ caretClauseId: string | null;
975
+ caretZone?: QueryZone;
976
+ listId: string;
977
+ search: string;
978
+ onSearchChange: (value: string) => void;
979
+ highlight: number;
980
+ onHighlight: (idx: number) => void;
981
+ pickerRef: RefObject<HTMLInputElement | null>;
982
+ values: ClauseItemsResult;
983
+ preferredItems: {
984
+ value: string;
985
+ label: string;
986
+ }[];
987
+ customEditor?: CustomSlotDefinition;
988
+ addableGroups: AddableFilterGroup[];
989
+ astWindow?: {
990
+ kind: string;
991
+ start?: string;
992
+ end?: string;
993
+ };
994
+ draftWindow: () => {
995
+ kind: string;
996
+ start?: string;
997
+ end?: string;
998
+ } | undefined;
999
+ onOpenClause: (clause: QueryClause) => void;
1000
+ onRemoveClause: (clause: QueryClause) => void;
1001
+ onRemoveAllIgnored: () => void;
1002
+ onOpenAddFilter: () => void;
1003
+ onOpenField: (type: string) => void;
1004
+ onUpdateClause: (clause: QueryClause, value: string | null) => void;
1005
+ onChooseValue: (value: string) => void;
1006
+ onMoveEditor: (dir: -1 | 1) => boolean;
1007
+ onCloseInspector: () => void;
1008
+ onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
1009
+ onPillRailKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
1010
+ onError: (msg: string | undefined) => void;
1011
+ }
1012
+ /** Concept B 4-zone grammar map (WHAT / WHERE / WHEN / GROUP) paired with a docked Clause Inspector. */
1013
+ declare function WqlScopeMap({ surface, zones, visiblePills, ignoredClauses, active, activeZone, caretClauseId, caretZone, listId, search, onSearchChange, highlight, onHighlight, pickerRef, values, preferredItems, customEditor, addableGroups, astWindow, draftWindow, onOpenClause, onRemoveClause, onRemoveAllIgnored, onOpenAddFilter, onOpenField, onUpdateClause, onChooseValue, onMoveEditor, onCloseInspector, onKeyDown, onPillRailKeyDown, onError, }: WqlScopeMapProps): react.JSX.Element;
676
1014
 
677
1015
  /**
678
1016
  * filterTypeahead — matches free text typed into the WqlComposer's input
@@ -710,6 +1048,7 @@ declare function matchFilterTypeahead(freeText: string, candidates: FilterTypeah
710
1048
  interface TokenSlotPillProps {
711
1049
  clause: QueryClause;
712
1050
  isActive?: boolean;
1051
+ isCaretMatch?: boolean;
713
1052
  invalid?: boolean;
714
1053
  invalidReason?: string;
715
1054
  onClick?: () => void;
@@ -717,48 +1056,13 @@ interface TokenSlotPillProps {
717
1056
  compact?: boolean;
718
1057
  placeholderOverride?: string;
719
1058
  }
720
- declare function TokenSlotPill({ clause, isActive, invalid, invalidReason, onClick, onRemove, compact, placeholderOverride, }: TokenSlotPillProps): react.JSX.Element;
1059
+ declare function TokenSlotPill({ clause, isActive, isCaretMatch, invalid, invalidReason, onClick, onRemove, compact, placeholderOverride, }: TokenSlotPillProps): react.JSX.Element;
721
1060
 
722
1061
  /** Multi-select (toggle-in-place) clause types. `source` is independently
723
1062
  * multi-select — applySourceFilter ORs the scope values. Typed tag keys and
724
1063
  * `groupby` OR their values in the engine (value lists join with `|`). */
725
1064
  declare const MULTI_VALUE_TYPES: Record<string, true>;
726
1065
 
727
- interface CustomSlotEditorProps<TValue> {
728
- value: TValue | undefined;
729
- onChange: (value: TValue) => void;
730
- onClose: () => void;
731
- }
732
- interface CustomSlotDefinition<TValue = unknown> {
733
- type: string;
734
- label: string;
735
- icon: string;
736
- placeholder: string;
737
- placeholderText: string;
738
- description: string;
739
- Editor: ComponentType<CustomSlotEditorProps<TValue>>;
740
- wqlGenerator: (value: TValue) => string;
741
- formatValue?: (value: TValue) => string;
742
- parseValue?: (raw: string) => TValue | undefined;
743
- validate?: (value: TValue) => string | null;
744
- wqlValidator?: (wql: string) => string | null;
745
- plane?: 'content' | 'metrics' | 'both';
746
- }
747
- declare class ComposerRegistry {
748
- private readonly slots;
749
- private readonly listeners;
750
- private cachedList;
751
- registerSlot<TValue>(def: CustomSlotDefinition<TValue>): () => void;
752
- unregisterSlot(type: string): void;
753
- getSlot(type: string): CustomSlotDefinition | undefined;
754
- listSlots(): CustomSlotDefinition[];
755
- getAllSlots(): CustomSlotDefinition[];
756
- subscribe(listener: () => void): () => void;
757
- private notify;
758
- }
759
- declare const composerRegistry: ComposerRegistry;
760
- declare function useComposerSlots(registry?: ComposerRegistry): CustomSlotDefinition[];
761
-
762
1066
  interface DateRange {
763
1067
  start: string;
764
1068
  end: string;
@@ -863,27 +1167,6 @@ interface WqlDiagnosticsStripProps {
863
1167
  }
864
1168
  declare function WqlDiagnosticsStrip({ diagnostics, offendingLabel, stages, hideSummary, variant, actions, activeStage, className, }: WqlDiagnosticsStripProps): react.JSX.Element;
865
1169
 
866
- interface QueryDraft {
867
- wql: string;
868
- ast: AnyParsedQuery;
869
- valid: boolean;
870
- error?: string;
871
- }
872
- /**
873
- * Normalize a simple 2-stage `:segment{...} | :agg{metric:...} [by {...}]`
874
- * pipeline (no sink, no source join/groupBy/pipes) into its equivalent
875
- * `ParsedAggregateQuery` so UI builders can inspect and edit structured pills.
876
- */
877
- declare function normalizeSimplePipelineToAggregate(ast: AnyParsedQuery): ParsedAggregateQuery | null;
878
- declare function wqlToPills(wql: string): QueryClause[] | null;
879
- declare function editQueryClause(query: string, edited: QueryClause, value: string | null): QueryDraft;
880
- /**
881
- * Bind a `$token` parameter into a WQL query expression via pure AST mutation
882
- * (replaces brittle regex brace surgery).
883
- */
884
- declare function bindTokenParamIntoWql(query: string, tokenName: string): string;
885
- declare function resolveQueryDraft(query: string, pendingText?: string): QueryDraft;
886
-
887
1170
  type QueryObjectBuilderDensity = 'bar' | 'inline' | 'studio';
888
1171
  interface QueryObjectValidationState {
889
1172
  valid: boolean;
@@ -976,13 +1259,13 @@ declare function patchBlockQuery(blockContent: string, newQuery: string, queryIn
976
1259
  * Auto-generated build version metadata.
977
1260
  * Do not edit directly; updated by scripts/stamp-version.ts
978
1261
  */
979
- declare const VERSION = "0.60.2250";
980
- declare const GIT_SHA = "36fc312";
981
- declare const BUILD_TIME = "2026-11-19T15:09:30.936Z";
1262
+ declare const VERSION = "0.60.2258";
1263
+ declare const GIT_SHA = "d5f50d9";
1264
+ declare const BUILD_TIME = "2026-11-20T19:08:09.031Z";
982
1265
  declare const SEMVER: {
983
- readonly version: "0.60.2250";
984
- readonly gitSha: "36fc312";
985
- readonly buildTime: "2026-11-19T15:09:30.936Z";
1266
+ readonly version: "0.60.2258";
1267
+ readonly gitSha: "d5f50d9";
1268
+ readonly buildTime: "2026-11-20T19:08:09.031Z";
986
1269
  };
987
1270
 
988
- export { AGG_OPTIONS, ANALYTICS_UNIT_STORAGE_KEY, type AnalyticsQueriesState, type AnalyticsQueryDef, type AnalyticsRangeWeeks, type AnalyticsUnit, AnalyticsUnitPreference, type AnalyticsUnitPreferenceProps, BUILD_TIME, CANONICAL_BLOCK_TYPES, CLAUSE_META, CODEMIRROR_SINGLETON_DEPS, type ChartShape, type ClauseMeta, type ClauseSuggestions, type ClauseType, ComposerRegistry, type CustomSlotDefinition, type CustomSlotEditorProps, DEFAULT_ANALYTICS_UNIT, DEFAULT_DIAGNOSTICS_DEBOUNCE_MS, type DashboardHeadingAnchor, DashboardTokenControls, type DashboardTokenControlsProps, DashboardView, type DashboardViewProps, type DateRange, EditorDialog, type EditorDialogProps, type ExecutorDocumentHostOptions, type ExtractedQuery, type FilterTypeaheadCandidate, type FilterTypeaheadMatch, GIT_SHA, GROUPBY_OPTIONS, GoalRings, type GoalRingsProps, InlineMetricEditPayload, KIND_OPTIONS, METRIC_OPTIONS, MULTI_VALUE_TYPES, type MergedPoint, OutputFilterInput, PLANE_OPTIONS, PRBadge, type PRBadgeProps, ProposedMetricBadge, QueryBlockView, type QueryBlockViewProps, type QueryClause, type QueryDraft, QueryExecutor, QueryObjectBuilder, type QueryObjectBuilderDensity, type QueryObjectBuilderProps, type QueryObjectValidationState, QueryValue, type QueryValueProps, ROLLUP_OPTIONS, RangeSelector, type RangeSelectorProps, RowPrHighlight, RowsResultsChrome, type RowsResultsChromeProps, RowsTable, type RowsTableProps, SEMVER, SERIES_COLORS, SOURCE_OPTIONS, SUGGESTION_BINDINGS, SessionTableSortSpec, StackedBar, type StackedBarProps, type StorageLike, type SuggestionBinding, type SuggestionCachePolicy, type SuggestionItem, TARGET_OPTIONS, TIME_OPTIONS, TokenSlotPill, type TokenSlotPillProps, TopList, type TopListProps, UNIT_OPTIONS, VERSION, type VisualViewportRect, WHERE_AGGREGATORS, WHERE_METRICS, WidgetChart, type WidgetChartProps, WidgetEditButton, WidgetFrame, type WidgetFrameProps, WidgetProblemBadge, type WidgetRunResult, type WidgetSpanOption, WidgetToolButton, type WqlAggregateSummary, WqlBars, type WqlBarsProps, WqlComposer, type WqlComposerProps, type WqlDiagnostics, WqlDiagnosticsStrip, type WqlDiagnosticsStripProps, WqlEmptyState, type WqlEmptyStateProps, type WqlExecutor, type WqlFindSummary, type WqlPipelineSummary, WqlQueryInspectorModal, type WqlQueryInspectorModalProps, type WqlSegmentEditRequest, type WqlStageCounts, WqlTable, type WqlTableProps, WqlTimeseries, type WqlTimeseriesProps, type WqlValidationState, ZoneDistribution, type ZoneDistributionProps, bindTokenParamIntoWql, bindTokenToQueryObject, blockTypesFromBlocks, canonicalSuggestionItems, cn, compactNumber, composerRegistry, computeSessionPrHighlights, createExecutorDocumentHost, cycleBaselineLayer, dateRangeSlot, editQueryClause, extractBlockQueries, formatTimeseriesTick, formatTimeseriesTooltipValue, formatTimestamp, getClauseMeta, getDashboardEffectiveUnit, getEffectiveAnalyticsUnit, getSuggestionBinding, hashCode, invalidateSuggestions, loadSuggestions, matchFilterTypeahead, mergeSeries, mergeSuggestionItems, mergeTagSuggestions, normalizeSimplePipelineToAggregate, notebookSlugsFromBlocks, outputToRunResult, outputsToRunResult, patchBlockQuery, primaryQueryOf, promoteFindToChartObject, readSessionRpe, readStoredUnit, removeSeriesLayer, resolveQueryDraft, setPrimaryQueryOnObject, setSuggestionBinding, summarizeAggregate, summarizeFind, summarizePipeline, tagsFromStaticBlocks, toChartResult, toggleCompareLayer, toggleGoalLayer, tooltipTimestamp, useAnalyticsQueries, useAnalyticsUnitPreference, useChartShape, useComposerSlots, useSuggestions, useVisualViewportRect, useWqlStageCounts, wqlToPills };
1271
+ export { AGG_OPTIONS, ANALYTICS_UNIT_STORAGE_KEY, type AddableFilterGroup, type AddableFilterOption, type AnalyticsQueriesState, type AnalyticsQueryDef, type AnalyticsRangeWeeks, type AnalyticsUnit, AnalyticsUnitPreference, type AnalyticsUnitPreferenceProps, BUILD_TIME, CANONICAL_BLOCK_TYPES, CLAUSE_META, CODEMIRROR_SINGLETON_DEPS, type ChartShape, ClauseIcon, type ClauseIconProps, type ClauseMeta, type ClauseSuggestions, type ClauseType, type ColumnPresetId, ComposerRegistry, type CustomSlotDefinition, type CustomSlotEditorProps, DEFAULT_ANALYTICS_UNIT, DEFAULT_DIAGNOSTICS_DEBOUNCE_MS, type DashboardHeadingAnchor, DashboardTokenControls, type DashboardTokenControlsProps, DashboardView, type DashboardViewProps, type DateRange, type EditableMetricField, EditorDialog, type EditorDialogProps, type EnrichedQueryClause, type ExecutorDocumentHostOptions, type ExtractedQuery, type FilterTypeaheadCandidate, type FilterTypeaheadMatch, GIT_SHA, GROUPBY_OPTIONS, GoalRings, type GoalRingsProps, type ImplicitSlot, InlineMetricEditPayload, KIND_OPTIONS, METRIC_OPTIONS, MULTI_VALUE_TYPES, type MergedPoint, type MobileColumnGroupId, OutputFilterInput, PLANE_OPTIONS, PRBadge, type PRBadgeProps, ProposedMetricBadge, QueryBlockView, type QueryBlockViewProps, type QueryClause, type QueryDraft, QueryExecutor, QueryObjectBuilder, type QueryObjectBuilderDensity, type QueryObjectBuilderProps, type QueryObjectValidationState, QueryValue, type QueryValueProps, type QueryZone, ROLLUP_OPTIONS, RangeSelector, type RangeSelectorProps, ResultsSpreadsheetGrid, type ResultsSpreadsheetGridProps, RowPrHighlight, RowsResultsChrome, type RowsResultsChromeProps, RowsTable, type RowsTableProps, SEMVER, SERIES_COLORS, SOURCE_OPTIONS, SUGGESTION_BINDINGS, type ScopeZoneModel, SessionActionContext, SessionTableSortSpec, type SpreadsheetEditSheetContext, type SpreadsheetSplitRow, type SpreadsheetTabId, StackedBar, type StackedBarProps, type StorageLike, type SuggestionBinding, type SuggestionCachePolicy, type SuggestionItem, TARGET_OPTIONS, TIME_OPTIONS, TokenSlotPill, type TokenSlotPillProps, TopList, type TopListProps, UNIT_OPTIONS, VERSION, type VisualViewportRect, WHERE_AGGREGATORS, WHERE_METRICS, WidgetChart, type WidgetChartProps, WidgetEditButton, WidgetFrame, type WidgetFrameProps, WidgetProblemBadge, type WidgetRunResult, type WidgetSpanOption, WidgetToolButton, type WqlAggregateSummary, WqlBars, type WqlBarsProps, WqlComposer, type WqlComposerProps, type WqlDiagnostics, WqlDiagnosticsStrip, type WqlDiagnosticsStripProps, WqlEmptyState, type WqlEmptyStateProps, type WqlExecutor, type WqlFindSummary, type WqlPipelineSummary, WqlQueryInspectorModal, type WqlQueryInspectorModalProps, WqlScopeMap, type WqlScopeMapProps, type WqlSegmentEditRequest, type WqlStageCounts, WqlTable, type WqlTableProps, WqlTimeseries, type WqlTimeseriesProps, type WqlValidationState, ZONE_META, ZONE_ORDER, ZoneDistribution, type ZoneDistributionProps, bindTokenParamIntoWql, bindTokenToQueryObject, blockTypesFromBlocks, buildAddableFilterGroups, buildScopeZones, buildSpreadsheetRows, canonicalSuggestionItems, cn, compactNumber, composerRegistry, computeSessionPrHighlights, createExecutorDocumentHost, cycleBaselineLayer, dateRangeSlot, editQueryClause, extractBlockQueries, formatHumanQuerySummary, formatTimeseriesTick, formatTimeseriesTooltipValue, formatTimestamp, getClauseMeta, getClauseSupportError, getClauseZone, getDashboardEffectiveUnit, getEffectiveAnalyticsUnit, getSuggestionBinding, hashCode, invalidateSuggestions, loadSuggestions, matchFilterTypeahead, mergeSeries, mergeSuggestionItems, mergeTagSuggestions, normalizeSimplePipelineToAggregate, notebookSlugsFromBlocks, outputToRunResult, outputsToRunResult, patchBlockQuery, primaryQueryOf, promoteFindToChartObject, readSessionRpe, readStoredUnit, removeSeriesLayer, resolveQueryDraft, resolveWidgetDisplayUnit, setPrimaryQueryOnObject, setSuggestionBinding, summarizeAggregate, summarizeFind, summarizePipeline, tagsFromStaticBlocks, toChartResult, toggleCompareLayer, toggleGoalLayer, tooltipTimestamp, useAnalyticsQueries, useAnalyticsUnitPreference, useChartShape, useComposerSlots, useSessionPrHighlights, useSuggestions, useVisualViewportRect, useWqlStageCounts, wqlToPills };