@bitcobblers/wod-wiki-ui 0.51.2196 → 0.52.2198
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/{chunk-7PGNDGU7.mjs → chunk-JERLIUE2.mjs} +4094 -531
- package/dist/chunk-JERLIUE2.mjs.map +1 -0
- package/dist/extensions/index.cjs +4093 -538
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.d.cts +1 -1
- package/dist/extensions/index.d.ts +1 -1
- package/dist/extensions/index.mjs +1 -1
- package/dist/{index-Bo1KHv-b.d.cts → index-CfljPEK3.d.cts} +149 -20
- package/dist/{index-Bo1KHv-b.d.ts → index-CfljPEK3.d.ts} +149 -20
- package/dist/index.cjs +4037 -447
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +122 -87
- package/dist/index.d.ts +122 -87
- package/dist/index.mjs +20 -20
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +12 -11
- package/package.json +4 -4
- package/dist/chunk-7PGNDGU7.mjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Q as QueryExecutor } from './index-
|
|
2
|
-
export { B as ButtonAction, C as
|
|
1
|
+
import { Q as QueryExecutor, O as OutputFilterInput, S as SessionTableSortSpec, I as InlineMetricEditPayload, R as RowPrHighlight } from './index-CfljPEK3.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 attachmentUrlFacet, Y as autocompleteTooltipTheme, Z as configureOverlayActions, _ as cursorFocusExtension, $ as customCompletionSources, a0 as dispatchAddRuntimePanel, a1 as dispatchExpandRuntimePanel, a2 as dispatchGutterHighlights, a3 as dispatchRemoveRuntimePanel, a4 as editingQuerySectionsField, a5 as editingWidgetsField, a6 as editorFocusField, a7 as editorFocusTracker, a8 as editorPreset, a9 as editorTheme, aa as embedPreviewDecorations, ab as expandRuntimePanel, ac as extractMetricsByCategory, ad as fenceCompletion, ae as findQueryBlockSection, af as findWorkoutErrors, ag as forceSectionParse, ah as formatClockTime, ai as formatMMSS, aj as frontmatterDebugMode, ak as frontmatterDetailed, al as frontmatterKeymap, am as frontmatterPreview, an as frontmatterPreviewField, ao as frontmatterReferenceIndex, ap as frontmatterSource, aq as frontmatterSuggestions, ar as frontmatterVisibility, as as getCursorFocusState, at as getOverlayActions, au as gutterHighlightsField, av as gutterUnified, aw as handleFenceAutoWrap, ax as handleSmartUrlPaste, ay as inlineButtonDecoration, az as insertMarkdownLinkCommand, aA as isEditorFocused, aB as isInternalFrontmatterKey, aC as isNavigableUrl, aD as lineIdsExtension, aE as linkOpen, aF as linkPreview, aG as markdownSyntaxHiding, aH as markdownTablePreview, aI as navigationFacet, aJ as nestedCompletion, aK as nestedCompletionOptions, aL as normalizeOutputFilter, aM as presentBadges, aN as previewDecorations, aO as queryBlockPreview, aP as referenceIndexReload, aQ as registeredSectionWidgets, aR as removeRuntimePanel, aS as resolveCodeLanguage, aT as runtimePanelField, aU as saveBlockQuerySource, aV as sectionAtPos, aW as sectionField, aX as sectionGeometry, aY as sectionIdentity, aZ as sectionIdentityHistory, a_ as sectionMove, a$ as sectionRestore, b0 as sectionSaved, b1 as sessionQueryFence, b2 as sessionQueryInsert, b3 as sessionQueryWql, b4 as setEditorFocused, b5 as setFrontmatterDetailed, b6 as setFrontmatterSource, b7 as setGutterHighlights, b8 as setQuerySourceEditing, b9 as slashBlockCompletion, ba as smartIncrement, bb as toggleInlineMarkdown, bc as toggleWidgetEdit, bd as urlAtPos, be as widgetBlockPreview, bf as wodAutoWrap, bg as wodAutocompletion, bh as wodCompletionSource, bi as wodEditorKeymap, bj as wodLinter, bk as wodOverlayPanel, bl as workoutLintSource, bm as wrapInTimeFence } from './index-CfljPEK3.js';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import react__default, { ReactNode, ComponentType } from 'react';
|
|
5
|
-
import { QueryResult, RowsRun, NoteContainer, TabularResult, PipelineSink, QueryDocumentRunnerHost, Series, AnyParsedQuery, DocumentOutput, DashboardToken, DashboardDocument, DashboardWidget, RowsQueryResult, FindQueryResult, ParsedAggregateQuery, ParsedFindQuery, ParsedPipelineQuery } from '@bitcobblers/wod-wiki-wql';
|
|
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';
|
|
6
6
|
export { CONTENT_GROUPING_DIMENSIONS, FindOptions, FindQueryResult, ParsedAggregateQuery, ParsedFindQuery, ParsedPipelineQuery, ParsedRowsQuery, PipelineResult, QueryOptions, QueryResult, RowsQueryResult, RowsRun } from '@bitcobblers/wod-wiki-wql';
|
|
7
|
-
import {
|
|
7
|
+
import { EventRecord, BlockIndexRow } from '@bitcobblers/wod-wiki-core';
|
|
8
8
|
export { blockContentId } from '@bitcobblers/wod-wiki-core';
|
|
9
|
-
import { MetricPresentationToken } from '@bitcobblers/wod-wiki-lang';
|
|
10
9
|
import { ClassValue } from 'clsx';
|
|
11
10
|
import '@codemirror/state';
|
|
12
11
|
import '@codemirror/view';
|
|
13
12
|
import '@codemirror/lint';
|
|
14
13
|
import '@codemirror/autocomplete';
|
|
14
|
+
import '@bitcobblers/wod-wiki-lang';
|
|
15
15
|
import '@codemirror/language';
|
|
16
16
|
|
|
17
17
|
interface StorageLike {
|
|
@@ -137,6 +137,16 @@ declare function toChartResult(input: {
|
|
|
137
137
|
}): QueryResult;
|
|
138
138
|
/** Convert a `DocumentOutput` from `SharedQueryDocumentRunner` into `WidgetRunResult`. */
|
|
139
139
|
declare function outputToRunResult(parsed: AnyParsedQuery, out: DocumentOutput): WidgetRunResult;
|
|
140
|
+
/**
|
|
141
|
+
* Merge EVERY shown output of a document run into one widget result.
|
|
142
|
+
*
|
|
143
|
+
* A Query Document can show several bindings (`show kb, bb | :stacked-bar{}`).
|
|
144
|
+
* Taking only `outputs[0]` silently dropped every series after the first —
|
|
145
|
+
* the chart rendered a single band for a stacked-bar that declared two.
|
|
146
|
+
* This merges all shown series, keeps the first sink/unit, and surfaces the
|
|
147
|
+
* first error so a failed stage is never swallowed by a healthy sibling.
|
|
148
|
+
*/
|
|
149
|
+
declare function outputsToRunResult(parsed: AnyParsedQuery, res: DocumentResult, attributes?: Record<string, string>): WidgetRunResult;
|
|
140
150
|
declare function mergeSeries(series: Series[]): MergedPoint[];
|
|
141
151
|
declare function compactNumber(value: number): string;
|
|
142
152
|
declare function formatTimestamp(ts: number): string;
|
|
@@ -368,68 +378,14 @@ interface AnalyticsUnitPreferenceProps {
|
|
|
368
378
|
}
|
|
369
379
|
declare function AnalyticsUnitPreference({ className, unit: unitProp, forced, storage }: AnalyticsUnitPreferenceProps): react.JSX.Element;
|
|
370
380
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
/** Metric badges for a statement/output metric group. */
|
|
378
|
-
declare function presentBadges(metrics: Iterable<IMetric>): ReactNode;
|
|
379
|
-
declare const OUTPUT_TYPE_CLASS: Record<string, string>;
|
|
380
|
-
declare const OUTPUT_TYPE_DOT: Record<string, string>;
|
|
381
|
-
interface CategorizedMetrics {
|
|
382
|
-
efforts: IMetric[];
|
|
383
|
-
reps: IMetric[];
|
|
384
|
-
loads: IMetric[];
|
|
385
|
-
rounds: IMetric[];
|
|
386
|
-
durations: IMetric[];
|
|
387
|
-
distances: IMetric[];
|
|
388
|
-
hints: IMetric[];
|
|
389
|
-
}
|
|
390
|
-
declare function extractMetricsByCategory(metrics?: Iterable<IMetric>): CategorizedMetrics;
|
|
391
|
-
interface OutputFilterPreset {
|
|
392
|
-
label: string;
|
|
393
|
-
query: string;
|
|
381
|
+
interface PRBadgeProps {
|
|
382
|
+
isPR?: boolean;
|
|
383
|
+
label?: string;
|
|
384
|
+
improvement?: number;
|
|
385
|
+
unit?: string;
|
|
386
|
+
className?: string;
|
|
394
387
|
}
|
|
395
|
-
|
|
396
|
-
/** Default row filter — segment statements only (the Workbench default). */
|
|
397
|
-
declare const DEFAULT_PRIMARY_FILTER = "type:segment";
|
|
398
|
-
declare const DEFAULT_OUTPUT_FILTERS: OutputFilterPreset[];
|
|
399
|
-
declare function normalizeOutputFilter(filter: OutputFilterInput): OutputFilterPreset;
|
|
400
|
-
/** Structural subset satisfied by live `IOutputStatement`s, stored statements,
|
|
401
|
-
* and `EventRecord` event rows alike. */
|
|
402
|
-
interface OutputStatementRow {
|
|
403
|
-
readonly id?: number | string;
|
|
404
|
-
readonly outputType?: string;
|
|
405
|
-
readonly timeSpan?: {
|
|
406
|
-
started: number;
|
|
407
|
-
ended?: number;
|
|
408
|
-
};
|
|
409
|
-
readonly metrics?: Iterable<IMetric>;
|
|
410
|
-
readonly sourceBlockKey?: string;
|
|
411
|
-
readonly completionReason?: string;
|
|
412
|
-
}
|
|
413
|
-
declare function OutputFilterPills({ presets, filter, onChange, }: {
|
|
414
|
-
presets: OutputFilterPreset[];
|
|
415
|
-
filter: string;
|
|
416
|
-
onChange: (next: string) => void;
|
|
417
|
-
}): react.JSX.Element;
|
|
418
|
-
interface OutputStatementsTableProps {
|
|
419
|
-
outputs: readonly OutputStatementRow[];
|
|
420
|
-
/** Filter expression (`type:segment`, free text). Empty shows all. */
|
|
421
|
-
filter?: string;
|
|
422
|
-
/** Epoch ms the +offset column is relative to. Defaults to first statement start. */
|
|
423
|
-
timeOrigin?: number;
|
|
424
|
-
/** Clears the active filter — enables the Card List's Clear-filter
|
|
425
|
-
* affordance on the filtered-empty state. Optional; hosts without a
|
|
426
|
-
* clearable filter omit it. */
|
|
427
|
-
onClearFilter?: () => void;
|
|
428
|
-
}
|
|
429
|
-
/** The Session Results surface — Card List below `sm`, the 9-column table at
|
|
430
|
-
* `sm` and above. One component: same props, same filtering; hosts (analytics
|
|
431
|
-
* explorer, editor query blocks, workbench) inherit the phone path. */
|
|
432
|
-
declare function OutputStatementsTable({ outputs, filter, timeOrigin, onClearFilter, }: OutputStatementsTableProps): react.JSX.Element;
|
|
388
|
+
declare function PRBadge({ isPR, label, improvement, unit, className, }: PRBadgeProps): react.JSX.Element | null;
|
|
433
389
|
|
|
434
390
|
interface RowsTableProps {
|
|
435
391
|
result: RowsQueryResult;
|
|
@@ -440,10 +396,21 @@ interface RowsTableProps {
|
|
|
440
396
|
/** Controlled filter expression — omit to let the table own its filter state. */
|
|
441
397
|
filter?: string;
|
|
442
398
|
onFilterChange?: (filter: string) => void;
|
|
399
|
+
/** Optional explicit column whitelist & order (from YAML `columns: [...]`). */
|
|
400
|
+
columns?: readonly string[];
|
|
401
|
+
/** Optional initial or controlled sort specs (from YAML `sort: [...]`). */
|
|
402
|
+
sort?: readonly SessionTableSortSpec[];
|
|
403
|
+
onSortChange?: (next: SessionTableSortSpec[]) => void;
|
|
404
|
+
/** Optional row cap after filtering and sorting. */
|
|
405
|
+
limit?: number;
|
|
406
|
+
/** Optional inline actuals editor (`captureMetricCorrection`), scoped per run `resultId`. */
|
|
407
|
+
onEditMetric?: (resultId: string, payload: InlineMetricEditPayload) => void | Promise<void>;
|
|
408
|
+
/** Optional PR highlights keyed by row `id` or `sourceBlockKey`. */
|
|
409
|
+
prHighlights?: ReadonlyMap<string | number, RowPrHighlight> | Record<string, RowPrHighlight>;
|
|
443
410
|
}
|
|
444
411
|
/** The Session Results Table — renders a Rows Query result: one section per
|
|
445
412
|
* run, filter pills on top, and the shared statement table as the body. */
|
|
446
|
-
declare function RowsTable({ result, renderRunHeaderExtra, presets, filter, onFilterChange, }: RowsTableProps): react.JSX.Element;
|
|
413
|
+
declare function RowsTable({ result, renderRunHeaderExtra, presets, filter, onFilterChange, columns, sort, onSortChange, limit, onEditMetric, prHighlights, }: RowsTableProps): react.JSX.Element;
|
|
447
414
|
|
|
448
415
|
interface QueryBlockViewProps {
|
|
449
416
|
/** Raw text between the ```query fences — the WQL query string or Query Document body. */
|
|
@@ -470,6 +437,8 @@ interface QueryBlockViewProps {
|
|
|
470
437
|
onAddToDashboard?: () => void;
|
|
471
438
|
/** Optional RPE capture handler. */
|
|
472
439
|
onCaptureRpe?: (resultId: string, rpe: number) => Promise<void>;
|
|
440
|
+
/** Optional inline metric actuals editor (`captureMetricCorrection`). */
|
|
441
|
+
onEditMetric?: (resultId: string, payload: InlineMetricEditPayload) => void | Promise<void>;
|
|
473
442
|
/** Optional click handler for opening a note from :note results. */
|
|
474
443
|
onOpenNote?: (item: {
|
|
475
444
|
id: string;
|
|
@@ -482,30 +451,49 @@ interface QueryBlockViewProps {
|
|
|
482
451
|
title?: string;
|
|
483
452
|
blockContentId?: string;
|
|
484
453
|
}) => string;
|
|
454
|
+
/** Optional handler to reveal the raw fenced WQL source in the host editor. */
|
|
455
|
+
onEditSource?: () => void;
|
|
485
456
|
}
|
|
486
|
-
declare function QueryBlockView({ query, executor, onResultSaved, onSaveQuery, queryIndex: _queryIndex, readOnly, widgetType, widgetError, tokenValues, attributes, onAddToDashboard, onCaptureRpe, onOpenNote, noteHref, }: QueryBlockViewProps): react.JSX.Element;
|
|
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;
|
|
487
458
|
|
|
488
459
|
declare function readSessionRpe(events: EventRecord[] | undefined): number | undefined;
|
|
460
|
+
/**
|
|
461
|
+
* Compute per-row PR highlights by comparing `sessionRun` against prior runs
|
|
462
|
+
* of the same workout block. For each effort slug with a numeric `calc.e1rm`
|
|
463
|
+
* or `resistance` metric, flags the row that beats the best prior run.
|
|
464
|
+
*/
|
|
465
|
+
declare function computeSessionPrHighlights(sessionRun: RowsRun | undefined, allRuns: readonly RowsRun[] | undefined): Map<string | number, RowPrHighlight>;
|
|
489
466
|
interface RowsResultsChromeProps {
|
|
490
|
-
/** The session result id from the written
|
|
467
|
+
/** The session result id from the written `:session{result:…}` query. */
|
|
491
468
|
resultId: string;
|
|
492
469
|
/** The session-scoped rows result (one run). */
|
|
493
470
|
sessionResult: RowsQueryResult;
|
|
494
|
-
/** Injected QueryExecutor for widened query execution. */
|
|
471
|
+
/** Injected QueryExecutor for widened query execution and PR lookup. */
|
|
495
472
|
executor?: QueryExecutor;
|
|
496
473
|
/** Optional RPE capture handler. */
|
|
497
474
|
onCaptureRpe?: (resultId: string, rpe: number) => Promise<void>;
|
|
498
|
-
/**
|
|
475
|
+
/** Optional inline metric actuals editor (`captureMetricCorrection`). */
|
|
476
|
+
onEditMetric?: (resultId: string, payload: InlineMetricEditPayload) => void | Promise<void>;
|
|
477
|
+
/** Re-run the parent query after a capture so the grid reflects the update. */
|
|
499
478
|
onCaptured?: () => void;
|
|
479
|
+
/** Optional column whitelist/order from YAML `columns: [...]`. */
|
|
480
|
+
columns?: readonly string[];
|
|
481
|
+
/** Optional sort specs from YAML `sort: [...]`. */
|
|
482
|
+
sort?: readonly SessionTableSortSpec[];
|
|
483
|
+
/** Optional row limit from YAML `limit: N`. */
|
|
484
|
+
limit?: number;
|
|
485
|
+
/** Enable/disable historical PR badge comparison (defaults to true). */
|
|
486
|
+
comparePr?: boolean;
|
|
500
487
|
}
|
|
501
|
-
declare function RowsResultsChrome({ resultId, sessionResult, executor, onCaptureRpe, onCaptured, }: RowsResultsChromeProps): react.JSX.Element;
|
|
488
|
+
declare function RowsResultsChrome({ resultId, sessionResult, executor, onCaptureRpe, onEditMetric, onCaptured, columns, sort, limit, comparePr, }: RowsResultsChromeProps): react.JSX.Element;
|
|
502
489
|
|
|
503
490
|
interface WqlQueryInspectorModalProps {
|
|
504
491
|
isOpen: boolean;
|
|
505
492
|
onClose: () => void;
|
|
506
493
|
initialQuery: string;
|
|
507
|
-
|
|
508
|
-
|
|
494
|
+
initialWidgetType?: string;
|
|
495
|
+
initialAttributes?: Record<string, string>;
|
|
496
|
+
/** Persist the applied query block body (1-line WQL or YAML). */
|
|
509
497
|
onApply: (newQuery: string) => void | Promise<void>;
|
|
510
498
|
title?: string;
|
|
511
499
|
subtitle?: string;
|
|
@@ -513,7 +501,7 @@ interface WqlQueryInspectorModalProps {
|
|
|
513
501
|
applyLabel?: string;
|
|
514
502
|
executor?: QueryExecutor;
|
|
515
503
|
}
|
|
516
|
-
declare function WqlQueryInspectorModal({ isOpen, onClose, initialQuery, onApply, title, subtitle, applyLabel, executor, }: WqlQueryInspectorModalProps): react.JSX.Element;
|
|
504
|
+
declare function WqlQueryInspectorModal({ isOpen, onClose, initialQuery, initialWidgetType, initialAttributes, onApply, title, subtitle, applyLabel, executor, }: WqlQueryInspectorModalProps): react.JSX.Element;
|
|
517
505
|
|
|
518
506
|
type WqlExecutor = (ast: AnyParsedQuery) => Promise<FindQueryResult | QueryResult>;
|
|
519
507
|
type WqlStageCounts = {
|
|
@@ -549,7 +537,7 @@ declare function useWqlStageCounts(ast: AnyParsedQuery, valid: boolean, execute:
|
|
|
549
537
|
* Supports freeform token slots, placeholder guidance, and keyboard navigation.
|
|
550
538
|
*/
|
|
551
539
|
|
|
552
|
-
type ClauseType = 'kind' | 'target' | 'source' | 'text' | 'notebook' | 'tag' | 'contributes' | 'effort' | 'domain' | 'format' | 'equipment' | 'quality' | 'intent' | 'discipline' | 'intensity' | 'origin' | 'type' | 'time' | 'where' | 'agg' | 'metric' | 'groupby' | 'rollup' | 'unit' | 'result' | 'block' | 'note' | 'page' | 'plane' | 'pipes' | 'feed' | 'subscribed';
|
|
540
|
+
type ClauseType = 'kind' | 'target' | 'source' | 'text' | 'notebook' | 'tag' | 'contributes' | 'effort' | 'domain' | 'format' | 'equipment' | 'quality' | 'intent' | 'discipline' | 'intensity' | 'origin' | 'type' | 'time' | 'where' | 'agg' | 'metric' | 'groupby' | 'rollup' | 'unit' | 'result' | 'block' | 'note' | 'page' | 'plane' | 'pipes' | 'feed' | 'subscribed' | 'scope';
|
|
553
541
|
interface QueryClause {
|
|
554
542
|
id: string;
|
|
555
543
|
/** Built-in ClauseType or a custom slot type id from the ComposerRegistry. */
|
|
@@ -576,7 +564,7 @@ declare const KIND_OPTIONS: {
|
|
|
576
564
|
}[];
|
|
577
565
|
/** Singular find targets — the colon `<target>` head (C7 closed enum). */
|
|
578
566
|
declare const TARGET_OPTIONS: {
|
|
579
|
-
value: "page" | "note" | "block" | "effort" | "segment" | "event" | "session" | "notebook" | "tag" | "equipment";
|
|
567
|
+
value: "page" | "note" | "block" | "feed" | "effort" | "segment" | "event" | "session" | "notebook" | "tag" | "equipment";
|
|
580
568
|
label: string;
|
|
581
569
|
description: string;
|
|
582
570
|
}[];
|
|
@@ -615,8 +603,8 @@ declare const GROUPBY_OPTIONS: {
|
|
|
615
603
|
label: "format" | "origin" | "result" | "day" | "page" | "domain" | "round" | "metric" | "note" | "block" | "week" | "effort" | "intensity" | "session" | "equipment" | "quality" | "intent" | "discipline" | "grade" | "grain" | "tags";
|
|
616
604
|
}[];
|
|
617
605
|
declare const METRIC_OPTIONS: {
|
|
618
|
-
value: "distance" | "resistance" | "
|
|
619
|
-
label: "distance" | "resistance" | "
|
|
606
|
+
value: "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.hrv" | "calc.readiness" | "calc.mvcBw" | "calc.ef" | "calc.adherence" | "calc.pct1rm" | "calc.sends";
|
|
607
|
+
label: "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.hrv" | "calc.readiness" | "calc.mvcBw" | "calc.ef" | "calc.adherence" | "calc.pct1rm" | "calc.sends";
|
|
620
608
|
}[];
|
|
621
609
|
declare const UNIT_OPTIONS: {
|
|
622
610
|
value: "kg" | "lb";
|
|
@@ -870,9 +858,10 @@ interface WqlDiagnosticsStripProps {
|
|
|
870
858
|
* a flat header section separated from the composer by an accent line. */
|
|
871
859
|
variant?: 'card' | 'header';
|
|
872
860
|
actions?: ReactNode;
|
|
861
|
+
activeStage?: WqlCursorStageInfo;
|
|
873
862
|
className?: string;
|
|
874
863
|
}
|
|
875
|
-
declare function WqlDiagnosticsStrip({ diagnostics, offendingLabel, stages, hideSummary, variant, actions, className, }: WqlDiagnosticsStripProps): react.JSX.Element;
|
|
864
|
+
declare function WqlDiagnosticsStrip({ diagnostics, offendingLabel, stages, hideSummary, variant, actions, activeStage, className, }: WqlDiagnosticsStripProps): react.JSX.Element;
|
|
876
865
|
|
|
877
866
|
interface QueryDraft {
|
|
878
867
|
wql: string;
|
|
@@ -880,10 +869,56 @@ interface QueryDraft {
|
|
|
880
869
|
valid: boolean;
|
|
881
870
|
error?: string;
|
|
882
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;
|
|
883
878
|
declare function wqlToPills(wql: string): QueryClause[] | null;
|
|
884
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
885
|
declare function resolveQueryDraft(query: string, pendingText?: string): QueryDraft;
|
|
886
886
|
|
|
887
|
+
type QueryObjectBuilderDensity = 'bar' | 'inline' | 'studio';
|
|
888
|
+
interface QueryObjectValidationState {
|
|
889
|
+
valid: boolean;
|
|
890
|
+
error?: string;
|
|
891
|
+
}
|
|
892
|
+
interface QueryObjectBuilderProps {
|
|
893
|
+
value: QueryBlockObject;
|
|
894
|
+
onChange: (next: QueryBlockObject) => void;
|
|
895
|
+
density: QueryObjectBuilderDensity;
|
|
896
|
+
readOnly?: boolean;
|
|
897
|
+
executor?: QueryExecutor;
|
|
898
|
+
tokenValues?: Record<string, string>;
|
|
899
|
+
preferredUnit?: string;
|
|
900
|
+
rangeStart?: number;
|
|
901
|
+
rangeEnd?: number;
|
|
902
|
+
preferredChoices?: readonly string[];
|
|
903
|
+
/** Optional read-only dataset subset banner for studio mode (Explorer -> Dashboard). */
|
|
904
|
+
subsetQuery?: string | null;
|
|
905
|
+
/** Optional destination slot rendered between dataset and query in studio mode. */
|
|
906
|
+
destination?: ReactNode;
|
|
907
|
+
onValidationChange?: (state: QueryObjectValidationState) => void;
|
|
908
|
+
onSubmit?: (next: QueryBlockObject) => void;
|
|
909
|
+
actionLabel?: string;
|
|
910
|
+
className?: string;
|
|
911
|
+
}
|
|
912
|
+
declare function primaryQueryOf(obj: QueryBlockObject): string;
|
|
913
|
+
declare function setPrimaryQueryOnObject(obj: QueryBlockObject, nextQuery: string): QueryBlockObject;
|
|
914
|
+
declare function promoteFindToChartObject(obj: QueryBlockObject, metric?: string): QueryBlockObject;
|
|
915
|
+
declare function bindTokenToQueryObject(obj: QueryBlockObject, tokenName: string): QueryBlockObject;
|
|
916
|
+
declare function toggleGoalLayer(obj: QueryBlockObject, defaultTarget?: number): QueryBlockObject;
|
|
917
|
+
declare function cycleBaselineLayer(obj: QueryBlockObject): QueryBlockObject;
|
|
918
|
+
declare function toggleCompareLayer(obj: QueryBlockObject): QueryBlockObject;
|
|
919
|
+
declare function removeSeriesLayer(obj: QueryBlockObject, id: string): QueryBlockObject;
|
|
920
|
+
declare function QueryObjectBuilder({ value, onChange, density, readOnly, executor, tokenValues, preferredUnit, rangeStart, rangeEnd, preferredChoices, subsetQuery, destination, onValidationChange, onSubmit, actionLabel, className, }: QueryObjectBuilderProps): react.JSX.Element;
|
|
921
|
+
|
|
887
922
|
interface EditorDialogProps {
|
|
888
923
|
/** Controls visibility; the dialog unmounts its portal when closed. */
|
|
889
924
|
open: boolean;
|
|
@@ -969,13 +1004,13 @@ declare function patchBlockQuery(blockContent: string, newQuery: string, queryIn
|
|
|
969
1004
|
* Auto-generated build version metadata.
|
|
970
1005
|
* Do not edit directly; updated by scripts/stamp-version.ts
|
|
971
1006
|
*/
|
|
972
|
-
declare const VERSION = "0.
|
|
973
|
-
declare const GIT_SHA = "
|
|
974
|
-
declare const BUILD_TIME = "2026-11-
|
|
1007
|
+
declare const VERSION = "0.52.2198";
|
|
1008
|
+
declare const GIT_SHA = "15e2fcb";
|
|
1009
|
+
declare const BUILD_TIME = "2026-11-11T15:07:53.492Z";
|
|
975
1010
|
declare const SEMVER: {
|
|
976
|
-
readonly version: "0.
|
|
977
|
-
readonly gitSha: "
|
|
978
|
-
readonly buildTime: "2026-11-
|
|
1011
|
+
readonly version: "0.52.2198";
|
|
1012
|
+
readonly gitSha: "15e2fcb";
|
|
1013
|
+
readonly buildTime: "2026-11-11T15:07:53.492Z";
|
|
979
1014
|
};
|
|
980
1015
|
|
|
981
|
-
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
|
|
1016
|
+
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, 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 };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cn, WidgetProblemBadge, WidgetChart, createExecutorDocumentHost, outputToRunResult } from './chunk-
|
|
2
|
-
export { AGG_OPTIONS, CANONICAL_BLOCK_TYPES, CLAUSE_META, CONTENT_GROUPING_DIMENSIONS, ComposerRegistry, DEFAULT_DIAGNOSTICS_DEBOUNCE_MS, DEFAULT_OUTPUT_FILTERS, DEFAULT_PRIMARY_FILTER, DefaultFrontmatterWidget, EditorDialog, GROUPBY_OPTIONS, GoalRings, INTERNAL_FRONTMATTER_KEYS, KIND_OPTIONS, METRIC_OPTIONS, MULTI_VALUE_TYPES, MetricBadge, OUTPUT_TYPE_CLASS, OUTPUT_TYPE_DOT, OutputFilterPills, OutputStatementsTable, PLANE_OPTIONS, ProposedMetricBadge, QueryBlockView, QueryValue, ROLLUP_OPTIONS, RowsResultsChrome, RowsTable, SERIES_COLORS, SOURCE_OPTIONS, SUGGESTION_BINDINGS, StackedBar, TARGET_OPTIONS, TIME_OPTIONS, TONE_CLASS, TokenSlotPill, TopList, UNIT_OPTIONS, WHERE_AGGREGATORS, WHERE_METRICS, WidgetChart, WidgetProblemBadge, WqlBars, WqlComposer, WqlDiagnosticsStrip, WqlEmptyState, WqlQueryInspectorModal, WqlTable, WqlTimeseries, ZoneDistribution, activeCursorSection, addRuntimePanel, autocompleteTooltipTheme, blockContentId, blockTypesFromBlocks, canonicalSuggestionItems, cn, compactNumber, composerRegistry, configureOverlayActions, createExecutorDocumentHost, cursorFocusExtension, customCompletionSources, dateRangeSlot, dispatchAddRuntimePanel, dispatchExpandRuntimePanel, dispatchGutterHighlights, dispatchRemoveRuntimePanel, editQueryClause, editingWidgetsField, editorPreset, editorTheme, embedPreviewDecorations, expandRuntimePanel, extractBlockQueries, extractMetricsByCategory, fenceCompletion, findQueryBlockSection, findWorkoutErrors, forceSectionParse, formatClockTime, formatMMSS, formatTimestamp, frontmatterDebugMode, frontmatterDetailed, frontmatterKeymap, frontmatterPreview, frontmatterPreviewField, frontmatterReferenceIndex, frontmatterSource, frontmatterSuggestions, frontmatterVisibility, getClauseMeta, getCursorFocusState, getOverlayActions, getSuggestionBinding, gutterHighlightsField, gutterUnified, handleFenceAutoWrap, hashCode, inlineButtonDecoration, invalidateSuggestions, isInternalFrontmatterKey, lineIdsExtension, linkOpen, linkPreview, loadSuggestions, markdownSyntaxHiding, markdownTablePreview, matchFilterTypeahead, mergeSeries, mergeSuggestionItems, mergeTagSuggestions, navigationFacet, nestedCompletion, nestedCompletionOptions, normalizeOutputFilter, notebookSlugsFromBlocks, outputToRunResult, patchBlockQuery, presentBadges, previewDecorations, queryBlockPreview, readSessionRpe, referenceIndexReload, registeredSectionWidgets, removeRuntimePanel, resolveCodeLanguage, resolveQueryDraft, runtimePanelField, saveBlockQuerySource, sectionAtPos, sectionField, sectionGeometry, sectionIdentity, sectionIdentityHistory, sectionMove, sectionRestore, sectionSaved, sessionQueryInsert, sessionQueryWql, setFrontmatterDetailed, setFrontmatterSource, setGutterHighlights, setSuggestionBinding, smartIncrement, summarizeAggregate, summarizeFind, summarizePipeline, tagsFromStaticBlocks, toChartResult, toggleWidgetEdit, tooltipTimestamp, urlAtPos, useChartShape, useComposerSlots, useSuggestions, useVisualViewportRect, useWqlStageCounts, widgetBlockPreview, wodAutoWrap, wodAutocompletion, wodCompletionSource, wodEditorKeymap, wodLinter, wodOverlayPanel, workoutLintSource, wqlToPills, wrapInTimeFence } from './chunk-
|
|
1
|
+
import { cn, WidgetProblemBadge, WidgetChart, createExecutorDocumentHost, outputsToRunResult, outputToRunResult } from './chunk-JERLIUE2.mjs';
|
|
2
|
+
export { AGG_OPTIONS, CANONICAL_BLOCK_TYPES, CLAUSE_META, CONTENT_GROUPING_DIMENSIONS, ComposerRegistry, DEFAULT_DIAGNOSTICS_DEBOUNCE_MS, DEFAULT_OUTPUT_FILTERS, DEFAULT_PRIMARY_FILTER, DefaultFrontmatterWidget, EditorDialog, GROUPBY_OPTIONS, GoalRings, INTERNAL_FRONTMATTER_KEYS, KIND_OPTIONS, METRIC_OPTIONS, MULTI_VALUE_TYPES, MetricBadge, OUTPUT_TYPE_CLASS, OUTPUT_TYPE_DOT, OutputFilterPills, OutputStatementsTable, PLANE_OPTIONS, PRBadge, ProposedMetricBadge, QueryBlockView, QueryObjectBuilder, QueryValue, ROLLUP_OPTIONS, RowsResultsChrome, RowsTable, SERIES_COLORS, SOURCE_OPTIONS, SUGGESTION_BINDINGS, StackedBar, TARGET_OPTIONS, TIME_OPTIONS, TONE_CLASS, TokenSlotPill, TopList, UNIT_OPTIONS, WHERE_AGGREGATORS, WHERE_METRICS, WidgetChart, WidgetProblemBadge, WqlBars, WqlComposer, WqlDiagnosticsStrip, WqlEmptyState, WqlQueryInspectorModal, WqlTable, WqlTimeseries, ZoneDistribution, activeCursorSection, addRuntimePanel, attachmentUrlFacet, autocompleteTooltipTheme, bindTokenParamIntoWql, bindTokenToQueryObject, blockContentId, blockTypesFromBlocks, canonicalSuggestionItems, cn, compactNumber, composerRegistry, computeSessionPrHighlights, configureOverlayActions, createExecutorDocumentHost, cursorFocusExtension, customCompletionSources, cycleBaselineLayer, dateRangeSlot, dispatchAddRuntimePanel, dispatchExpandRuntimePanel, dispatchGutterHighlights, dispatchRemoveRuntimePanel, editQueryClause, editingQuerySectionsField, editingWidgetsField, editorFocusField, editorFocusTracker, editorPreset, editorTheme, embedPreviewDecorations, expandRuntimePanel, extractBlockQueries, extractMetricsByCategory, fenceCompletion, findQueryBlockSection, findWorkoutErrors, forceSectionParse, formatClockTime, formatMMSS, formatTimestamp, frontmatterDebugMode, frontmatterDetailed, frontmatterKeymap, frontmatterPreview, frontmatterPreviewField, frontmatterReferenceIndex, frontmatterSource, frontmatterSuggestions, frontmatterVisibility, getClauseMeta, getCursorFocusState, getOverlayActions, getSuggestionBinding, gutterHighlightsField, gutterUnified, handleFenceAutoWrap, handleSmartUrlPaste, hashCode, inlineButtonDecoration, insertMarkdownLinkCommand, invalidateSuggestions, isEditorFocused, isInternalFrontmatterKey, isNavigableUrl, lineIdsExtension, linkOpen, linkPreview, loadSuggestions, markdownSyntaxHiding, markdownTablePreview, matchFilterTypeahead, mergeSeries, mergeSuggestionItems, mergeTagSuggestions, navigationFacet, nestedCompletion, nestedCompletionOptions, normalizeOutputFilter, normalizeSimplePipelineToAggregate, notebookSlugsFromBlocks, outputToRunResult, outputsToRunResult, patchBlockQuery, presentBadges, previewDecorations, primaryQueryOf, promoteFindToChartObject, queryBlockPreview, readSessionRpe, referenceIndexReload, registeredSectionWidgets, removeRuntimePanel, removeSeriesLayer, resolveCodeLanguage, resolveQueryDraft, runtimePanelField, saveBlockQuerySource, sectionAtPos, sectionField, sectionGeometry, sectionIdentity, sectionIdentityHistory, sectionMove, sectionRestore, sectionSaved, sessionQueryFence, sessionQueryInsert, sessionQueryWql, setEditorFocused, setFrontmatterDetailed, setFrontmatterSource, setGutterHighlights, setPrimaryQueryOnObject, setQuerySourceEditing, setSuggestionBinding, slashBlockCompletion, smartIncrement, summarizeAggregate, summarizeFind, summarizePipeline, tagsFromStaticBlocks, toChartResult, toggleCompareLayer, toggleGoalLayer, toggleInlineMarkdown, toggleWidgetEdit, tooltipTimestamp, urlAtPos, useChartShape, useComposerSlots, useSuggestions, useVisualViewportRect, useWqlStageCounts, widgetBlockPreview, wodAutoWrap, wodAutocompletion, wodCompletionSource, wodEditorKeymap, wodLinter, wodOverlayPanel, workoutLintSource, wqlToPills, wrapInTimeFence } from './chunk-JERLIUE2.mjs';
|
|
3
3
|
import { Eye, ExternalLink, Edit3, ChevronUp, ChevronDown, ChevronRight, Copy, Trash2 } from 'lucide-react';
|
|
4
4
|
import { jsxs, jsx, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
5
5
|
import { useMemo, useState, useEffect, Fragment, useCallback } from 'react';
|
|
@@ -252,7 +252,7 @@ function DashboardView({
|
|
|
252
252
|
async function load() {
|
|
253
253
|
const next = {};
|
|
254
254
|
const runnable = [];
|
|
255
|
-
for (const { widget, query, missing } of resolved) {
|
|
255
|
+
for (const { widget, query, missing, attributes } of resolved) {
|
|
256
256
|
if (widget.type !== "" && !isDashboardWidgetType(widget.type)) {
|
|
257
257
|
next[widget.key] = { error: unknownWidgetTypeMessage(widget.type) };
|
|
258
258
|
continue;
|
|
@@ -279,7 +279,7 @@ function DashboardView({
|
|
|
279
279
|
next[widget.key] = { error: "aggregate queries return numbers \u2014 use a chart or value widget instead" };
|
|
280
280
|
continue;
|
|
281
281
|
}
|
|
282
|
-
runnable.push({ widget, query, parsed });
|
|
282
|
+
runnable.push({ widget, query, parsed, attributes });
|
|
283
283
|
}
|
|
284
284
|
if (!executor) {
|
|
285
285
|
if (!cancelled) {
|
|
@@ -295,18 +295,13 @@ function DashboardView({
|
|
|
295
295
|
rollupEnsure: onEnsureRollupFacts
|
|
296
296
|
});
|
|
297
297
|
await Promise.all(
|
|
298
|
-
runnable.map(async ({ widget, query, parsed }) => {
|
|
298
|
+
runnable.map(async ({ widget, query, parsed, attributes }) => {
|
|
299
299
|
try {
|
|
300
300
|
const runner = new SharedQueryDocumentRunner(host);
|
|
301
301
|
const res = await runner.run(query);
|
|
302
|
-
const
|
|
303
|
-
if (!out) {
|
|
304
|
-
next[widget.key] = { error: res.diagnostics[0] ?? "widget produced no output" };
|
|
305
|
-
return;
|
|
306
|
-
}
|
|
307
|
-
const error = out.error ?? res.diagnostics[0];
|
|
302
|
+
const error = res.outputs.find((o) => o.error !== void 0)?.error ?? res.diagnostics[0];
|
|
308
303
|
next[widget.key] = {
|
|
309
|
-
result:
|
|
304
|
+
result: outputsToRunResult(parsed, res, attributes),
|
|
310
305
|
...error ? { error } : {}
|
|
311
306
|
};
|
|
312
307
|
} catch (err) {
|
|
@@ -409,11 +404,16 @@ function DashboardView({
|
|
|
409
404
|
children: run?.error ? /* @__PURE__ */ jsx(WidgetProblemBadge, { message: run.error }) : /* @__PURE__ */ jsx(
|
|
410
405
|
WidgetChart,
|
|
411
406
|
{
|
|
412
|
-
type: widget.type,
|
|
407
|
+
type: widget.type !== "" ? widget.type : run?.result?.chart?.head ?? "",
|
|
413
408
|
result: run?.result,
|
|
414
409
|
label: widget.title,
|
|
415
410
|
unit: preferredUnit,
|
|
416
|
-
attributes
|
|
411
|
+
attributes: {
|
|
412
|
+
...Object.fromEntries(
|
|
413
|
+
(run?.result?.chart?.filters ?? []).map((f) => [f.key, f.values.map((v) => v.value).join(",")])
|
|
414
|
+
),
|
|
415
|
+
...attributes
|
|
416
|
+
},
|
|
417
417
|
onOpenNote,
|
|
418
418
|
noteHref
|
|
419
419
|
}
|
|
@@ -631,13 +631,13 @@ function AnalyticsUnitPreference({ className, unit: unitProp, forced = false, st
|
|
|
631
631
|
}
|
|
632
632
|
|
|
633
633
|
// src/version.ts
|
|
634
|
-
var VERSION = "0.
|
|
635
|
-
var GIT_SHA = "
|
|
636
|
-
var BUILD_TIME = "2026-11-
|
|
634
|
+
var VERSION = "0.52.2198";
|
|
635
|
+
var GIT_SHA = "15e2fcb";
|
|
636
|
+
var BUILD_TIME = "2026-11-11T15:07:53.492Z";
|
|
637
637
|
var SEMVER = {
|
|
638
|
-
version: "0.
|
|
639
|
-
gitSha: "
|
|
640
|
-
buildTime: "2026-11-
|
|
638
|
+
version: "0.52.2198",
|
|
639
|
+
gitSha: "15e2fcb",
|
|
640
|
+
buildTime: "2026-11-11T15:07:53.492Z"
|
|
641
641
|
};
|
|
642
642
|
|
|
643
643
|
export { ANALYTICS_UNIT_STORAGE_KEY, AnalyticsUnitPreference, BUILD_TIME, CODEMIRROR_SINGLETON_DEPS, DEFAULT_ANALYTICS_UNIT, DashboardTokenControls, DashboardView, GIT_SHA, RangeSelector, SEMVER, VERSION, WidgetEditButton, WidgetFrame, WidgetToolButton, getDashboardEffectiveUnit, getEffectiveAnalyticsUnit, readStoredUnit, useAnalyticsQueries, useAnalyticsUnitPreference };
|