@bitcobblers/wod-wiki-ui 0.51.2196 → 0.53.2203
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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as ButtonAction,
|
|
1
|
+
export { A as AttachmentUrlResolver, B as ButtonAction, a as CursorFocusState, b as CustomCompletionSource, 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, N as NavigationHook, p as NestedCompletionOptions, x as OverlayAction, y as QueryBlockPreviewOptions, z as RuntimePanelEntry, H as SectionIdentity, J as SectionRect, K as SectionState, 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, ad as fenceCompletion, ae as findQueryBlockSection, af as findWorkoutErrors, ag as forceSectionParse, 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, 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.cjs';
|
|
2
2
|
export { blockContentId } from '@bitcobblers/wod-wiki-core';
|
|
3
3
|
import '@codemirror/state';
|
|
4
4
|
import '@codemirror/view';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as ButtonAction,
|
|
1
|
+
export { A as AttachmentUrlResolver, B as ButtonAction, a as CursorFocusState, b as CustomCompletionSource, 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, N as NavigationHook, p as NestedCompletionOptions, x as OverlayAction, y as QueryBlockPreviewOptions, z as RuntimePanelEntry, H as SectionIdentity, J as SectionRect, K as SectionState, 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, ad as fenceCompletion, ae as findQueryBlockSection, af as findWorkoutErrors, ag as forceSectionParse, 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, 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';
|
|
2
2
|
export { blockContentId } from '@bitcobblers/wod-wiki-core';
|
|
3
3
|
import '@codemirror/state';
|
|
4
4
|
import '@codemirror/view';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { DefaultFrontmatterWidget, INTERNAL_FRONTMATTER_KEYS, activeCursorSection, addRuntimePanel, autocompleteTooltipTheme, blockContentId, configureOverlayActions, cursorFocusExtension, customCompletionSources, dispatchAddRuntimePanel, dispatchExpandRuntimePanel, dispatchGutterHighlights, dispatchRemoveRuntimePanel, editingWidgetsField, editorPreset, editorTheme, embedPreviewDecorations, expandRuntimePanel, fenceCompletion, findQueryBlockSection, findWorkoutErrors, forceSectionParse, frontmatterDebugMode, frontmatterDetailed, frontmatterKeymap, frontmatterPreview, frontmatterPreviewField, frontmatterReferenceIndex, frontmatterSource, frontmatterSuggestions, frontmatterVisibility, getCursorFocusState, getOverlayActions, gutterHighlightsField, gutterUnified, handleFenceAutoWrap, inlineButtonDecoration, isInternalFrontmatterKey, lineIdsExtension, linkOpen, linkPreview, markdownSyntaxHiding, markdownTablePreview, navigationFacet, nestedCompletion, nestedCompletionOptions, previewDecorations, queryBlockPreview, referenceIndexReload, registeredSectionWidgets, removeRuntimePanel, resolveCodeLanguage, runtimePanelField, saveBlockQuerySource, sectionAtPos, sectionField, sectionGeometry, sectionIdentity, sectionIdentityHistory, sectionMove, sectionRestore, sectionSaved, sessionQueryInsert, sessionQueryWql, setFrontmatterDetailed, setFrontmatterSource, setGutterHighlights, smartIncrement, toggleWidgetEdit, urlAtPos, widgetBlockPreview, wodAutoWrap, wodAutocompletion, wodCompletionSource, wodEditorKeymap, wodLinter, wodOverlayPanel, workoutLintSource, wrapInTimeFence } from '../chunk-
|
|
1
|
+
export { DefaultFrontmatterWidget, INTERNAL_FRONTMATTER_KEYS, activeCursorSection, addRuntimePanel, attachmentUrlFacet, autocompleteTooltipTheme, blockContentId, configureOverlayActions, cursorFocusExtension, customCompletionSources, dispatchAddRuntimePanel, dispatchExpandRuntimePanel, dispatchGutterHighlights, dispatchRemoveRuntimePanel, editingQuerySectionsField, editingWidgetsField, editorFocusField, editorFocusTracker, editorPreset, editorTheme, embedPreviewDecorations, expandRuntimePanel, fenceCompletion, findQueryBlockSection, findWorkoutErrors, forceSectionParse, frontmatterDebugMode, frontmatterDetailed, frontmatterKeymap, frontmatterPreview, frontmatterPreviewField, frontmatterReferenceIndex, frontmatterSource, frontmatterSuggestions, frontmatterVisibility, getCursorFocusState, getOverlayActions, gutterHighlightsField, gutterUnified, handleFenceAutoWrap, handleSmartUrlPaste, inlineButtonDecoration, insertMarkdownLinkCommand, isEditorFocused, isInternalFrontmatterKey, isNavigableUrl, lineIdsExtension, linkOpen, linkPreview, markdownSyntaxHiding, markdownTablePreview, navigationFacet, nestedCompletion, nestedCompletionOptions, previewDecorations, queryBlockPreview, referenceIndexReload, registeredSectionWidgets, removeRuntimePanel, resolveCodeLanguage, runtimePanelField, saveBlockQuerySource, sectionAtPos, sectionField, sectionGeometry, sectionIdentity, sectionIdentityHistory, sectionMove, sectionRestore, sectionSaved, sessionQueryFence, sessionQueryInsert, sessionQueryWql, setEditorFocused, setFrontmatterDetailed, setFrontmatterSource, setGutterHighlights, setQuerySourceEditing, slashBlockCompletion, smartIncrement, toggleInlineMarkdown, toggleWidgetEdit, urlAtPos, widgetBlockPreview, wodAutoWrap, wodAutocompletion, wodCompletionSource, wodEditorKeymap, wodLinter, wodOverlayPanel, workoutLintSource, wrapInTimeFence } from '../chunk-JERLIUE2.mjs';
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,15 +1,33 @@
|
|
|
1
1
|
import * as _codemirror_state from '@codemirror/state';
|
|
2
|
-
import { Extension,
|
|
2
|
+
import { Extension, StateField, EditorState, Facet } from '@codemirror/state';
|
|
3
3
|
import { ViewPlugin, DecorationSet, ViewUpdate, EditorView, Decoration, WidgetType } from '@codemirror/view';
|
|
4
4
|
import { Diagnostic } from '@codemirror/lint';
|
|
5
5
|
import { CompletionContext, CompletionResult } from '@codemirror/autocomplete';
|
|
6
|
-
import { WhiteboardScriptCompletionOptions } from '@bitcobblers/wod-wiki-lang';
|
|
7
|
-
import { WqlCompletionOptions, QueryOptions, QueryResult, ParsedFindQuery, FindOptions, FindQueryResult, ParsedRowsQuery, RowsQueryResult, ParsedAggregateQuery, PipelineResult, IFieldCatalog } from '@bitcobblers/wod-wiki-wql';
|
|
6
|
+
import { WhiteboardScriptCompletionOptions, MetricPresentationToken } from '@bitcobblers/wod-wiki-lang';
|
|
7
|
+
import { WqlCompletionOptions, QueryOptions, QueryResult, ParsedFindQuery, FindOptions, FindQueryResult, ParsedRowsQuery, RowsQueryResult, ParsedAggregateQuery, PipelineResult, FamilyRunPayload, IFieldCatalog } from '@bitcobblers/wod-wiki-wql';
|
|
8
8
|
import { Section, NoteBlock, ScriptBlock, ICodeStatement, IMetric } from '@bitcobblers/wod-wiki-core';
|
|
9
9
|
import * as react from 'react';
|
|
10
|
+
import { ReactNode } from 'react';
|
|
10
11
|
import * as _codemirror_language from '@codemirror/language';
|
|
11
12
|
|
|
12
|
-
declare function editorTheme(isDark: boolean): Extension;
|
|
13
|
+
declare function editorTheme(isDark: boolean, dialect?: string): Extension;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Explicit focus-state effect dispatched by DOM focus/blur handlers (and
|
|
17
|
+
* directly in unit tests when exercising blurred WYSIWYG rendering).
|
|
18
|
+
*/
|
|
19
|
+
declare const setEditorFocused: _codemirror_state.StateEffectType<boolean>;
|
|
20
|
+
declare const editorFocusField: StateField<boolean>;
|
|
21
|
+
/**
|
|
22
|
+
* Returns whether the editor currently holds input focus.
|
|
23
|
+
*
|
|
24
|
+
* When `editorFocusTracker` is not mounted in a standalone extension test,
|
|
25
|
+
* falls back to `true` so selection-driven raw-reveal assertions continue to
|
|
26
|
+
* work out of the box. When mounted (in `editorPreset` and `NoteEditor`),
|
|
27
|
+
* blurring the editor cleanly hides raw Markdown delimiters on every line.
|
|
28
|
+
*/
|
|
29
|
+
declare function isEditorFocused(state: EditorState): boolean;
|
|
30
|
+
declare const editorFocusTracker: Extension;
|
|
13
31
|
|
|
14
32
|
/**
|
|
15
33
|
* Extension that adds ID attributes to line elements in the editor.
|
|
@@ -22,6 +40,7 @@ declare const lineIdsExtension: ViewPlugin<{
|
|
|
22
40
|
|
|
23
41
|
type NavigationHook = (url: string, view: EditorView) => void;
|
|
24
42
|
declare const navigationFacet: Facet<NavigationHook, NavigationHook | null>;
|
|
43
|
+
declare function isNavigableUrl(url: string): boolean;
|
|
25
44
|
declare function urlAtPos(view: EditorView, pos: number): string | null;
|
|
26
45
|
declare const linkOpen: Extension;
|
|
27
46
|
|
|
@@ -30,6 +49,9 @@ declare function workoutLintSource(view: EditorView): Diagnostic[];
|
|
|
30
49
|
declare const wodLinter: _codemirror_state.Extension;
|
|
31
50
|
|
|
32
51
|
declare function fenceCompletion(context: CompletionContext): CompletionResult | null;
|
|
52
|
+
declare function slashBlockCompletion(context: CompletionContext): CompletionResult | null;
|
|
53
|
+
declare function toggleInlineMarkdown(view: EditorView, marker: string): boolean;
|
|
54
|
+
declare function insertMarkdownLinkCommand(view: EditorView): boolean;
|
|
33
55
|
declare function wrapInTimeFence(view: EditorView): boolean;
|
|
34
56
|
declare function handleFenceAutoWrap(event: InputEvent, view: EditorView): boolean;
|
|
35
57
|
declare const wodAutoWrap: Extension;
|
|
@@ -66,7 +88,7 @@ declare function nestedCompletion(context: CompletionContext): CompletionResult
|
|
|
66
88
|
/**
|
|
67
89
|
* The note editor's combined completion provider. Explicit order — first
|
|
68
90
|
* result wins: (1) per-editor custom sources via the facet, (2) opening-fence
|
|
69
|
-
* snippets, (3) nested fence-body sources.
|
|
91
|
+
* snippets, (3) `/` slash block commands, (4) nested fence-body sources.
|
|
70
92
|
*/
|
|
71
93
|
declare function wodCompletionSource(context: CompletionContext): Promise<CompletionResult | null>;
|
|
72
94
|
declare const wodAutocompletion: Extension;
|
|
@@ -76,11 +98,6 @@ declare const wodAutocompletion: Extension;
|
|
|
76
98
|
* (editorPreset all dialects, WqlTextEditor, CalcLineEditor). Semantic
|
|
77
99
|
* popover/border/muted/primary tokens resolve identically in light and dark,
|
|
78
100
|
* so one theme serves both without branching.
|
|
79
|
-
*
|
|
80
|
-
* Stacking: tooltips deliberately sit below dialog overlays (z-50) so a host
|
|
81
|
-
* dialog's chrome wins, while staying above sticky headers and page content —
|
|
82
|
-
* the tooltip still renders inside dialog/sticky hosts because it lives in
|
|
83
|
-
* the editor's own stacking context.
|
|
84
101
|
*/
|
|
85
102
|
declare const autocompleteTooltipTheme: Extension;
|
|
86
103
|
|
|
@@ -171,6 +188,8 @@ declare const sectionGeometry: ViewPlugin<SectionGeometryPlugin, undefined>;
|
|
|
171
188
|
|
|
172
189
|
declare const previewDecorations: Extension;
|
|
173
190
|
|
|
191
|
+
type AttachmentUrlResolver = (target: string) => Promise<string | null> | string | null;
|
|
192
|
+
declare const attachmentUrlFacet: Facet<AttachmentUrlResolver, AttachmentUrlResolver | null>;
|
|
174
193
|
declare const embedPreviewDecorations: Extension;
|
|
175
194
|
|
|
176
195
|
interface FrontmatterCatalogEntry {
|
|
@@ -263,19 +282,21 @@ declare function markdownSyntaxHiding(): Extension;
|
|
|
263
282
|
declare const markdownTablePreview: Extension;
|
|
264
283
|
|
|
265
284
|
/**
|
|
266
|
-
* Link Preview
|
|
285
|
+
* Link Preview & Smart Link Authoring
|
|
267
286
|
*
|
|
268
|
-
* Replaces
|
|
269
|
-
*
|
|
270
|
-
* -
|
|
271
|
-
* -
|
|
287
|
+
* Replaces external and internal workspace links in Markdown note prose with
|
|
288
|
+
* Utilitarian Minimalism link pills:
|
|
289
|
+
* - Markdown links `[label](https://...)` and `[label](/workspace/path)`
|
|
290
|
+
* - Wiki links `[[target]]` and `[[target|Label]]`
|
|
291
|
+
* - Bare URLs `https://...`
|
|
292
|
+
* - Smart URL paste over non-empty prose selections (`[selected](pastedUrl)`)
|
|
293
|
+
* - Inline popover on pill click (`Open`, `Edit`, `Unlink`)
|
|
272
294
|
*
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
* an inline player whenever the cursor is elsewhere, reverting to raw text
|
|
276
|
-
* when the cursor moves onto the line.
|
|
295
|
+
* Image syntax `` is explicitly excluded so `embedPreviewDecorations`
|
|
296
|
+
* owns inline media rendering cleanly.
|
|
277
297
|
*/
|
|
278
298
|
|
|
299
|
+
declare function handleSmartUrlPaste(event: ClipboardEvent, view: EditorView): boolean;
|
|
279
300
|
declare const linkPreview: Extension;
|
|
280
301
|
|
|
281
302
|
declare const setGutterHighlights: _codemirror_state.StateEffectType<Set<number>>;
|
|
@@ -306,6 +327,7 @@ declare function dispatchRemoveRuntimePanel(view: EditorView, sectionId: string)
|
|
|
306
327
|
declare function dispatchExpandRuntimePanel(view: EditorView, sectionId: string, expanded: boolean): void;
|
|
307
328
|
|
|
308
329
|
declare function sessionQueryWql(resultId: string): string;
|
|
330
|
+
declare function sessionQueryFence(resultId: string): string;
|
|
309
331
|
declare function sessionQueryInsert(state: EditorState, blockId: string, resultId: string): {
|
|
310
332
|
from: number;
|
|
311
333
|
insert: string;
|
|
@@ -336,6 +358,101 @@ interface CursorFocusState {
|
|
|
336
358
|
declare function getCursorFocusState(state: EditorState): CursorFocusState | null;
|
|
337
359
|
declare const cursorFocusExtension: Extension;
|
|
338
360
|
|
|
361
|
+
declare function formatMMSS(ms: number): string;
|
|
362
|
+
declare function formatClockTime(d: Date): string;
|
|
363
|
+
declare const TONE_CLASS: Record<string, string>;
|
|
364
|
+
declare function MetricBadge({ token }: {
|
|
365
|
+
token: MetricPresentationToken;
|
|
366
|
+
}): react.JSX.Element | null;
|
|
367
|
+
/** Metric badges for a statement/output metric group. */
|
|
368
|
+
declare function presentBadges(metrics: Iterable<IMetric>): ReactNode;
|
|
369
|
+
declare const OUTPUT_TYPE_CLASS: Record<string, string>;
|
|
370
|
+
declare const OUTPUT_TYPE_DOT: Record<string, string>;
|
|
371
|
+
interface CategorizedMetrics {
|
|
372
|
+
efforts: IMetric[];
|
|
373
|
+
reps: IMetric[];
|
|
374
|
+
loads: IMetric[];
|
|
375
|
+
rounds: IMetric[];
|
|
376
|
+
durations: IMetric[];
|
|
377
|
+
distances: IMetric[];
|
|
378
|
+
hints: IMetric[];
|
|
379
|
+
}
|
|
380
|
+
declare function extractMetricsByCategory(metrics?: Iterable<IMetric>): CategorizedMetrics;
|
|
381
|
+
interface OutputFilterPreset {
|
|
382
|
+
label: string;
|
|
383
|
+
query: string;
|
|
384
|
+
}
|
|
385
|
+
type OutputFilterInput = string | OutputFilterPreset;
|
|
386
|
+
/** Default row filter — segment statements only (the Workbench default). */
|
|
387
|
+
declare const DEFAULT_PRIMARY_FILTER = "type:segment";
|
|
388
|
+
declare const DEFAULT_OUTPUT_FILTERS: OutputFilterPreset[];
|
|
389
|
+
declare function normalizeOutputFilter(filter: OutputFilterInput): OutputFilterPreset;
|
|
390
|
+
/** Structural subset satisfied by live `IOutputStatement`s, stored statements,
|
|
391
|
+
* and `EventRecord` event rows alike. */
|
|
392
|
+
interface OutputStatementRow {
|
|
393
|
+
readonly id?: number | string;
|
|
394
|
+
readonly grain?: string;
|
|
395
|
+
readonly outputType?: string;
|
|
396
|
+
readonly timeSpan?: {
|
|
397
|
+
started: number;
|
|
398
|
+
ended?: number;
|
|
399
|
+
};
|
|
400
|
+
readonly metrics?: Iterable<IMetric>;
|
|
401
|
+
readonly sourceBlockKey?: string;
|
|
402
|
+
readonly sourceStatementId?: number;
|
|
403
|
+
readonly stackLevel?: number;
|
|
404
|
+
readonly completionReason?: string;
|
|
405
|
+
}
|
|
406
|
+
interface SessionTableSortSpec {
|
|
407
|
+
col: string;
|
|
408
|
+
dir: 'asc' | 'desc';
|
|
409
|
+
}
|
|
410
|
+
interface InlineMetricEditPayload {
|
|
411
|
+
occurrence: {
|
|
412
|
+
blockKey: string;
|
|
413
|
+
sourceStatementId?: number;
|
|
414
|
+
stackLevel?: number;
|
|
415
|
+
};
|
|
416
|
+
metric: {
|
|
417
|
+
type: string;
|
|
418
|
+
value: number;
|
|
419
|
+
image: string;
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
interface RowPrHighlight {
|
|
423
|
+
label?: string;
|
|
424
|
+
improvement?: number;
|
|
425
|
+
unit?: string;
|
|
426
|
+
}
|
|
427
|
+
declare function OutputFilterPills({ presets, filter, onChange, }: {
|
|
428
|
+
presets: OutputFilterPreset[];
|
|
429
|
+
filter: string;
|
|
430
|
+
onChange: (next: string) => void;
|
|
431
|
+
}): react.JSX.Element;
|
|
432
|
+
interface OutputStatementsTableProps {
|
|
433
|
+
outputs: readonly OutputStatementRow[];
|
|
434
|
+
/** Filter expression (`type:segment`, free text). Empty shows all. */
|
|
435
|
+
filter?: string;
|
|
436
|
+
/** Epoch ms the +offset column is relative to. Defaults to first statement start. */
|
|
437
|
+
timeOrigin?: number;
|
|
438
|
+
/** Clears the active filter — enables the Card List's Clear-filter affordance. */
|
|
439
|
+
onClearFilter?: () => void;
|
|
440
|
+
/** Optional explicit column whitelist & order (from YAML `columns: [...]`). */
|
|
441
|
+
columns?: readonly string[];
|
|
442
|
+
/** Initial or controlled sort order (from YAML `sort: [...]`). */
|
|
443
|
+
sort?: readonly SessionTableSortSpec[];
|
|
444
|
+
/** Notifies host when user clicks column headers to re-sort. */
|
|
445
|
+
onSortChange?: (next: SessionTableSortSpec[]) => void;
|
|
446
|
+
/** Optional maximum rows to display after filtering and sorting. */
|
|
447
|
+
limit?: number;
|
|
448
|
+
/** Optional inline actuals editor callback (`captureMetricCorrection`). */
|
|
449
|
+
onEditMetric?: (payload: InlineMetricEditPayload) => void | Promise<void>;
|
|
450
|
+
/** Optional PR highlights keyed by row `id` or `sourceBlockKey`. */
|
|
451
|
+
prHighlights?: ReadonlyMap<string | number, RowPrHighlight> | Record<string, RowPrHighlight>;
|
|
452
|
+
}
|
|
453
|
+
/** The Session Results surface — Card List below `sm`, dynamic sortable/editable table at `sm` and up. */
|
|
454
|
+
declare function OutputStatementsTable({ outputs, filter, timeOrigin, onClearFilter, columns: explicitColumns, sort: controlledSort, onSortChange, limit, onEditMetric, prHighlights, }: OutputStatementsTableProps): react.JSX.Element;
|
|
455
|
+
|
|
339
456
|
interface QueryExecutor {
|
|
340
457
|
runQuery(query: string, options?: QueryOptions): Promise<QueryResult>;
|
|
341
458
|
runFind(parsed: ParsedFindQuery, options?: FindOptions): Promise<FindQueryResult>;
|
|
@@ -346,13 +463,24 @@ interface QueryExecutor {
|
|
|
346
463
|
/** Pipeline queries (`:source | :fn | :chart`, `@dataset | …`) — the
|
|
347
464
|
* QueryService.runPipeline seam; the sink rides `PipelineResult.chart`. */
|
|
348
465
|
runPipeline?(query: string, options?: QueryOptions): Promise<PipelineResult>;
|
|
466
|
+
/** Evaluate a named list pipe's tail stages over an ALREADY-RESOLVED
|
|
467
|
+
* source list — the shared source DAG (`kb = bench | :sum{…}` reuses the
|
|
468
|
+
* `bench` events instead of re-fetching them). */
|
|
469
|
+
runPipelineFromFind?(sourceFind: FamilyRunPayload, pipeTail: string, options?: QueryOptions): Promise<PipelineResult>;
|
|
349
470
|
}
|
|
350
471
|
|
|
472
|
+
declare const setQuerySourceEditing: _codemirror_state.StateEffectType<{
|
|
473
|
+
sectionId: string;
|
|
474
|
+
editing: boolean;
|
|
475
|
+
}>;
|
|
476
|
+
declare const editingQuerySectionsField: StateField<ReadonlySet<string>>;
|
|
351
477
|
interface QueryBlockPreviewOptions {
|
|
352
478
|
executor?: QueryExecutor;
|
|
353
479
|
onResultSaved?: (callback: () => void) => (() => void) | void;
|
|
354
480
|
readOnly?: boolean;
|
|
355
481
|
onSaveQuery?: (sectionId: string, nextQuery: string) => void | Promise<void>;
|
|
482
|
+
onCaptureRpe?: (resultId: string, rpe: number) => Promise<void>;
|
|
483
|
+
onEditMetric?: (resultId: string, payload: InlineMetricEditPayload) => void | Promise<void>;
|
|
356
484
|
onOpenNote?: (item: {
|
|
357
485
|
id: string;
|
|
358
486
|
title?: string;
|
|
@@ -364,6 +492,7 @@ interface QueryBlockPreviewOptions {
|
|
|
364
492
|
blockContentId?: string;
|
|
365
493
|
}) => string;
|
|
366
494
|
tokenValues?: Record<string, string>;
|
|
495
|
+
noteId?: string;
|
|
367
496
|
}
|
|
368
497
|
declare function saveBlockQuerySource(view: EditorView, sectionId: string, newQuery: string, queryIndex?: number): {
|
|
369
498
|
ok: boolean;
|
|
@@ -422,4 +551,4 @@ interface EditorPresetOptions {
|
|
|
422
551
|
}
|
|
423
552
|
declare function editorPreset(optionsOrDialect?: string | EditorPresetOptions): Extension[];
|
|
424
553
|
|
|
425
|
-
export {
|
|
554
|
+
export { customCompletionSources as $, type AttachmentUrlResolver as A, type ButtonAction as B, type CategorizedMetrics as C, DEFAULT_OUTPUT_FILTERS as D, type EditorDialect as E, type FrontmatterCatalogEntry as F, type GeometryListener as G, type SectionIdentity as H, type InlineMetricEditPayload as I, type SectionRect as J, type SectionState as K, type WidgetProps as L, MetricBadge as M, type NavigationHook as N, type OutputFilterInput as O, type WidgetRegistry as P, type QueryExecutor as Q, type RowPrHighlight as R, type SessionTableSortSpec as S, TONE_CLASS as T, activeCursorSection as U, addRuntimePanel as V, type WidgetConfig as W, attachmentUrlFacet as X, autocompleteTooltipTheme as Y, configureOverlayActions as Z, cursorFocusExtension as _, type CursorFocusState as a, sectionRestore as a$, dispatchAddRuntimePanel as a0, dispatchExpandRuntimePanel as a1, dispatchGutterHighlights as a2, dispatchRemoveRuntimePanel as a3, editingQuerySectionsField as a4, editingWidgetsField as a5, editorFocusField as a6, editorFocusTracker as a7, editorPreset as a8, editorTheme as a9, isEditorFocused as aA, isInternalFrontmatterKey as aB, isNavigableUrl as aC, lineIdsExtension as aD, linkOpen as aE, linkPreview as aF, markdownSyntaxHiding as aG, markdownTablePreview as aH, navigationFacet as aI, nestedCompletion as aJ, nestedCompletionOptions as aK, normalizeOutputFilter as aL, presentBadges as aM, previewDecorations as aN, queryBlockPreview as aO, referenceIndexReload as aP, registeredSectionWidgets as aQ, removeRuntimePanel as aR, resolveCodeLanguage as aS, runtimePanelField as aT, saveBlockQuerySource as aU, sectionAtPos as aV, sectionField as aW, sectionGeometry as aX, sectionIdentity as aY, sectionIdentityHistory as aZ, sectionMove as a_, embedPreviewDecorations as aa, expandRuntimePanel as ab, extractMetricsByCategory as ac, fenceCompletion as ad, findQueryBlockSection as ae, findWorkoutErrors as af, forceSectionParse as ag, formatClockTime as ah, formatMMSS as ai, frontmatterDebugMode as aj, frontmatterDetailed as ak, frontmatterKeymap as al, frontmatterPreview as am, frontmatterPreviewField as an, frontmatterReferenceIndex as ao, frontmatterSource as ap, frontmatterSuggestions as aq, frontmatterVisibility as ar, getCursorFocusState as as, getOverlayActions as at, gutterHighlightsField as au, gutterUnified as av, handleFenceAutoWrap as aw, handleSmartUrlPaste as ax, inlineButtonDecoration as ay, insertMarkdownLinkCommand as az, type CustomCompletionSource as b, sectionSaved as b0, sessionQueryFence as b1, sessionQueryInsert as b2, sessionQueryWql as b3, setEditorFocused as b4, setFrontmatterDetailed as b5, setFrontmatterSource as b6, setGutterHighlights as b7, setQuerySourceEditing as b8, slashBlockCompletion as b9, smartIncrement as ba, toggleInlineMarkdown as bb, toggleWidgetEdit as bc, urlAtPos as bd, widgetBlockPreview as be, wodAutoWrap as bf, wodAutocompletion as bg, wodCompletionSource as bh, wodEditorKeymap as bi, wodLinter as bj, wodOverlayPanel as bk, workoutLintSource as bl, wrapInTimeFence as bm, DEFAULT_PRIMARY_FILTER as c, DefaultFrontmatterWidget as d, type EditorPresetOptions as e, type EditorSection as f, type EditorSectionSubtype as g, type EditorSectionType as h, type EmbedType as i, type FrontmatterRefDiagnostic as j, type FrontmatterReferenceProvider as k, type FrontmatterReferenceRef as l, type FrontmatterReferenceResolution as m, type FrontmatterSuggestionCatalog as n, INTERNAL_FRONTMATTER_KEYS as o, type NestedCompletionOptions as p, OUTPUT_TYPE_CLASS as q, OUTPUT_TYPE_DOT as r, OutputFilterPills as s, type OutputFilterPreset as t, type OutputStatementRow as u, OutputStatementsTable as v, type OutputStatementsTableProps as w, type OverlayAction as x, type QueryBlockPreviewOptions as y, type RuntimePanelEntry as z };
|
|
@@ -1,15 +1,33 @@
|
|
|
1
1
|
import * as _codemirror_state from '@codemirror/state';
|
|
2
|
-
import { Extension,
|
|
2
|
+
import { Extension, StateField, EditorState, Facet } from '@codemirror/state';
|
|
3
3
|
import { ViewPlugin, DecorationSet, ViewUpdate, EditorView, Decoration, WidgetType } from '@codemirror/view';
|
|
4
4
|
import { Diagnostic } from '@codemirror/lint';
|
|
5
5
|
import { CompletionContext, CompletionResult } from '@codemirror/autocomplete';
|
|
6
|
-
import { WhiteboardScriptCompletionOptions } from '@bitcobblers/wod-wiki-lang';
|
|
7
|
-
import { WqlCompletionOptions, QueryOptions, QueryResult, ParsedFindQuery, FindOptions, FindQueryResult, ParsedRowsQuery, RowsQueryResult, ParsedAggregateQuery, PipelineResult, IFieldCatalog } from '@bitcobblers/wod-wiki-wql';
|
|
6
|
+
import { WhiteboardScriptCompletionOptions, MetricPresentationToken } from '@bitcobblers/wod-wiki-lang';
|
|
7
|
+
import { WqlCompletionOptions, QueryOptions, QueryResult, ParsedFindQuery, FindOptions, FindQueryResult, ParsedRowsQuery, RowsQueryResult, ParsedAggregateQuery, PipelineResult, FamilyRunPayload, IFieldCatalog } from '@bitcobblers/wod-wiki-wql';
|
|
8
8
|
import { Section, NoteBlock, ScriptBlock, ICodeStatement, IMetric } from '@bitcobblers/wod-wiki-core';
|
|
9
9
|
import * as react from 'react';
|
|
10
|
+
import { ReactNode } from 'react';
|
|
10
11
|
import * as _codemirror_language from '@codemirror/language';
|
|
11
12
|
|
|
12
|
-
declare function editorTheme(isDark: boolean): Extension;
|
|
13
|
+
declare function editorTheme(isDark: boolean, dialect?: string): Extension;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Explicit focus-state effect dispatched by DOM focus/blur handlers (and
|
|
17
|
+
* directly in unit tests when exercising blurred WYSIWYG rendering).
|
|
18
|
+
*/
|
|
19
|
+
declare const setEditorFocused: _codemirror_state.StateEffectType<boolean>;
|
|
20
|
+
declare const editorFocusField: StateField<boolean>;
|
|
21
|
+
/**
|
|
22
|
+
* Returns whether the editor currently holds input focus.
|
|
23
|
+
*
|
|
24
|
+
* When `editorFocusTracker` is not mounted in a standalone extension test,
|
|
25
|
+
* falls back to `true` so selection-driven raw-reveal assertions continue to
|
|
26
|
+
* work out of the box. When mounted (in `editorPreset` and `NoteEditor`),
|
|
27
|
+
* blurring the editor cleanly hides raw Markdown delimiters on every line.
|
|
28
|
+
*/
|
|
29
|
+
declare function isEditorFocused(state: EditorState): boolean;
|
|
30
|
+
declare const editorFocusTracker: Extension;
|
|
13
31
|
|
|
14
32
|
/**
|
|
15
33
|
* Extension that adds ID attributes to line elements in the editor.
|
|
@@ -22,6 +40,7 @@ declare const lineIdsExtension: ViewPlugin<{
|
|
|
22
40
|
|
|
23
41
|
type NavigationHook = (url: string, view: EditorView) => void;
|
|
24
42
|
declare const navigationFacet: Facet<NavigationHook, NavigationHook | null>;
|
|
43
|
+
declare function isNavigableUrl(url: string): boolean;
|
|
25
44
|
declare function urlAtPos(view: EditorView, pos: number): string | null;
|
|
26
45
|
declare const linkOpen: Extension;
|
|
27
46
|
|
|
@@ -30,6 +49,9 @@ declare function workoutLintSource(view: EditorView): Diagnostic[];
|
|
|
30
49
|
declare const wodLinter: _codemirror_state.Extension;
|
|
31
50
|
|
|
32
51
|
declare function fenceCompletion(context: CompletionContext): CompletionResult | null;
|
|
52
|
+
declare function slashBlockCompletion(context: CompletionContext): CompletionResult | null;
|
|
53
|
+
declare function toggleInlineMarkdown(view: EditorView, marker: string): boolean;
|
|
54
|
+
declare function insertMarkdownLinkCommand(view: EditorView): boolean;
|
|
33
55
|
declare function wrapInTimeFence(view: EditorView): boolean;
|
|
34
56
|
declare function handleFenceAutoWrap(event: InputEvent, view: EditorView): boolean;
|
|
35
57
|
declare const wodAutoWrap: Extension;
|
|
@@ -66,7 +88,7 @@ declare function nestedCompletion(context: CompletionContext): CompletionResult
|
|
|
66
88
|
/**
|
|
67
89
|
* The note editor's combined completion provider. Explicit order — first
|
|
68
90
|
* result wins: (1) per-editor custom sources via the facet, (2) opening-fence
|
|
69
|
-
* snippets, (3) nested fence-body sources.
|
|
91
|
+
* snippets, (3) `/` slash block commands, (4) nested fence-body sources.
|
|
70
92
|
*/
|
|
71
93
|
declare function wodCompletionSource(context: CompletionContext): Promise<CompletionResult | null>;
|
|
72
94
|
declare const wodAutocompletion: Extension;
|
|
@@ -76,11 +98,6 @@ declare const wodAutocompletion: Extension;
|
|
|
76
98
|
* (editorPreset all dialects, WqlTextEditor, CalcLineEditor). Semantic
|
|
77
99
|
* popover/border/muted/primary tokens resolve identically in light and dark,
|
|
78
100
|
* so one theme serves both without branching.
|
|
79
|
-
*
|
|
80
|
-
* Stacking: tooltips deliberately sit below dialog overlays (z-50) so a host
|
|
81
|
-
* dialog's chrome wins, while staying above sticky headers and page content —
|
|
82
|
-
* the tooltip still renders inside dialog/sticky hosts because it lives in
|
|
83
|
-
* the editor's own stacking context.
|
|
84
101
|
*/
|
|
85
102
|
declare const autocompleteTooltipTheme: Extension;
|
|
86
103
|
|
|
@@ -171,6 +188,8 @@ declare const sectionGeometry: ViewPlugin<SectionGeometryPlugin, undefined>;
|
|
|
171
188
|
|
|
172
189
|
declare const previewDecorations: Extension;
|
|
173
190
|
|
|
191
|
+
type AttachmentUrlResolver = (target: string) => Promise<string | null> | string | null;
|
|
192
|
+
declare const attachmentUrlFacet: Facet<AttachmentUrlResolver, AttachmentUrlResolver | null>;
|
|
174
193
|
declare const embedPreviewDecorations: Extension;
|
|
175
194
|
|
|
176
195
|
interface FrontmatterCatalogEntry {
|
|
@@ -263,19 +282,21 @@ declare function markdownSyntaxHiding(): Extension;
|
|
|
263
282
|
declare const markdownTablePreview: Extension;
|
|
264
283
|
|
|
265
284
|
/**
|
|
266
|
-
* Link Preview
|
|
285
|
+
* Link Preview & Smart Link Authoring
|
|
267
286
|
*
|
|
268
|
-
* Replaces
|
|
269
|
-
*
|
|
270
|
-
* -
|
|
271
|
-
* -
|
|
287
|
+
* Replaces external and internal workspace links in Markdown note prose with
|
|
288
|
+
* Utilitarian Minimalism link pills:
|
|
289
|
+
* - Markdown links `[label](https://...)` and `[label](/workspace/path)`
|
|
290
|
+
* - Wiki links `[[target]]` and `[[target|Label]]`
|
|
291
|
+
* - Bare URLs `https://...`
|
|
292
|
+
* - Smart URL paste over non-empty prose selections (`[selected](pastedUrl)`)
|
|
293
|
+
* - Inline popover on pill click (`Open`, `Edit`, `Unlink`)
|
|
272
294
|
*
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
* an inline player whenever the cursor is elsewhere, reverting to raw text
|
|
276
|
-
* when the cursor moves onto the line.
|
|
295
|
+
* Image syntax `` is explicitly excluded so `embedPreviewDecorations`
|
|
296
|
+
* owns inline media rendering cleanly.
|
|
277
297
|
*/
|
|
278
298
|
|
|
299
|
+
declare function handleSmartUrlPaste(event: ClipboardEvent, view: EditorView): boolean;
|
|
279
300
|
declare const linkPreview: Extension;
|
|
280
301
|
|
|
281
302
|
declare const setGutterHighlights: _codemirror_state.StateEffectType<Set<number>>;
|
|
@@ -306,6 +327,7 @@ declare function dispatchRemoveRuntimePanel(view: EditorView, sectionId: string)
|
|
|
306
327
|
declare function dispatchExpandRuntimePanel(view: EditorView, sectionId: string, expanded: boolean): void;
|
|
307
328
|
|
|
308
329
|
declare function sessionQueryWql(resultId: string): string;
|
|
330
|
+
declare function sessionQueryFence(resultId: string): string;
|
|
309
331
|
declare function sessionQueryInsert(state: EditorState, blockId: string, resultId: string): {
|
|
310
332
|
from: number;
|
|
311
333
|
insert: string;
|
|
@@ -336,6 +358,101 @@ interface CursorFocusState {
|
|
|
336
358
|
declare function getCursorFocusState(state: EditorState): CursorFocusState | null;
|
|
337
359
|
declare const cursorFocusExtension: Extension;
|
|
338
360
|
|
|
361
|
+
declare function formatMMSS(ms: number): string;
|
|
362
|
+
declare function formatClockTime(d: Date): string;
|
|
363
|
+
declare const TONE_CLASS: Record<string, string>;
|
|
364
|
+
declare function MetricBadge({ token }: {
|
|
365
|
+
token: MetricPresentationToken;
|
|
366
|
+
}): react.JSX.Element | null;
|
|
367
|
+
/** Metric badges for a statement/output metric group. */
|
|
368
|
+
declare function presentBadges(metrics: Iterable<IMetric>): ReactNode;
|
|
369
|
+
declare const OUTPUT_TYPE_CLASS: Record<string, string>;
|
|
370
|
+
declare const OUTPUT_TYPE_DOT: Record<string, string>;
|
|
371
|
+
interface CategorizedMetrics {
|
|
372
|
+
efforts: IMetric[];
|
|
373
|
+
reps: IMetric[];
|
|
374
|
+
loads: IMetric[];
|
|
375
|
+
rounds: IMetric[];
|
|
376
|
+
durations: IMetric[];
|
|
377
|
+
distances: IMetric[];
|
|
378
|
+
hints: IMetric[];
|
|
379
|
+
}
|
|
380
|
+
declare function extractMetricsByCategory(metrics?: Iterable<IMetric>): CategorizedMetrics;
|
|
381
|
+
interface OutputFilterPreset {
|
|
382
|
+
label: string;
|
|
383
|
+
query: string;
|
|
384
|
+
}
|
|
385
|
+
type OutputFilterInput = string | OutputFilterPreset;
|
|
386
|
+
/** Default row filter — segment statements only (the Workbench default). */
|
|
387
|
+
declare const DEFAULT_PRIMARY_FILTER = "type:segment";
|
|
388
|
+
declare const DEFAULT_OUTPUT_FILTERS: OutputFilterPreset[];
|
|
389
|
+
declare function normalizeOutputFilter(filter: OutputFilterInput): OutputFilterPreset;
|
|
390
|
+
/** Structural subset satisfied by live `IOutputStatement`s, stored statements,
|
|
391
|
+
* and `EventRecord` event rows alike. */
|
|
392
|
+
interface OutputStatementRow {
|
|
393
|
+
readonly id?: number | string;
|
|
394
|
+
readonly grain?: string;
|
|
395
|
+
readonly outputType?: string;
|
|
396
|
+
readonly timeSpan?: {
|
|
397
|
+
started: number;
|
|
398
|
+
ended?: number;
|
|
399
|
+
};
|
|
400
|
+
readonly metrics?: Iterable<IMetric>;
|
|
401
|
+
readonly sourceBlockKey?: string;
|
|
402
|
+
readonly sourceStatementId?: number;
|
|
403
|
+
readonly stackLevel?: number;
|
|
404
|
+
readonly completionReason?: string;
|
|
405
|
+
}
|
|
406
|
+
interface SessionTableSortSpec {
|
|
407
|
+
col: string;
|
|
408
|
+
dir: 'asc' | 'desc';
|
|
409
|
+
}
|
|
410
|
+
interface InlineMetricEditPayload {
|
|
411
|
+
occurrence: {
|
|
412
|
+
blockKey: string;
|
|
413
|
+
sourceStatementId?: number;
|
|
414
|
+
stackLevel?: number;
|
|
415
|
+
};
|
|
416
|
+
metric: {
|
|
417
|
+
type: string;
|
|
418
|
+
value: number;
|
|
419
|
+
image: string;
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
interface RowPrHighlight {
|
|
423
|
+
label?: string;
|
|
424
|
+
improvement?: number;
|
|
425
|
+
unit?: string;
|
|
426
|
+
}
|
|
427
|
+
declare function OutputFilterPills({ presets, filter, onChange, }: {
|
|
428
|
+
presets: OutputFilterPreset[];
|
|
429
|
+
filter: string;
|
|
430
|
+
onChange: (next: string) => void;
|
|
431
|
+
}): react.JSX.Element;
|
|
432
|
+
interface OutputStatementsTableProps {
|
|
433
|
+
outputs: readonly OutputStatementRow[];
|
|
434
|
+
/** Filter expression (`type:segment`, free text). Empty shows all. */
|
|
435
|
+
filter?: string;
|
|
436
|
+
/** Epoch ms the +offset column is relative to. Defaults to first statement start. */
|
|
437
|
+
timeOrigin?: number;
|
|
438
|
+
/** Clears the active filter — enables the Card List's Clear-filter affordance. */
|
|
439
|
+
onClearFilter?: () => void;
|
|
440
|
+
/** Optional explicit column whitelist & order (from YAML `columns: [...]`). */
|
|
441
|
+
columns?: readonly string[];
|
|
442
|
+
/** Initial or controlled sort order (from YAML `sort: [...]`). */
|
|
443
|
+
sort?: readonly SessionTableSortSpec[];
|
|
444
|
+
/** Notifies host when user clicks column headers to re-sort. */
|
|
445
|
+
onSortChange?: (next: SessionTableSortSpec[]) => void;
|
|
446
|
+
/** Optional maximum rows to display after filtering and sorting. */
|
|
447
|
+
limit?: number;
|
|
448
|
+
/** Optional inline actuals editor callback (`captureMetricCorrection`). */
|
|
449
|
+
onEditMetric?: (payload: InlineMetricEditPayload) => void | Promise<void>;
|
|
450
|
+
/** Optional PR highlights keyed by row `id` or `sourceBlockKey`. */
|
|
451
|
+
prHighlights?: ReadonlyMap<string | number, RowPrHighlight> | Record<string, RowPrHighlight>;
|
|
452
|
+
}
|
|
453
|
+
/** The Session Results surface — Card List below `sm`, dynamic sortable/editable table at `sm` and up. */
|
|
454
|
+
declare function OutputStatementsTable({ outputs, filter, timeOrigin, onClearFilter, columns: explicitColumns, sort: controlledSort, onSortChange, limit, onEditMetric, prHighlights, }: OutputStatementsTableProps): react.JSX.Element;
|
|
455
|
+
|
|
339
456
|
interface QueryExecutor {
|
|
340
457
|
runQuery(query: string, options?: QueryOptions): Promise<QueryResult>;
|
|
341
458
|
runFind(parsed: ParsedFindQuery, options?: FindOptions): Promise<FindQueryResult>;
|
|
@@ -346,13 +463,24 @@ interface QueryExecutor {
|
|
|
346
463
|
/** Pipeline queries (`:source | :fn | :chart`, `@dataset | …`) — the
|
|
347
464
|
* QueryService.runPipeline seam; the sink rides `PipelineResult.chart`. */
|
|
348
465
|
runPipeline?(query: string, options?: QueryOptions): Promise<PipelineResult>;
|
|
466
|
+
/** Evaluate a named list pipe's tail stages over an ALREADY-RESOLVED
|
|
467
|
+
* source list — the shared source DAG (`kb = bench | :sum{…}` reuses the
|
|
468
|
+
* `bench` events instead of re-fetching them). */
|
|
469
|
+
runPipelineFromFind?(sourceFind: FamilyRunPayload, pipeTail: string, options?: QueryOptions): Promise<PipelineResult>;
|
|
349
470
|
}
|
|
350
471
|
|
|
472
|
+
declare const setQuerySourceEditing: _codemirror_state.StateEffectType<{
|
|
473
|
+
sectionId: string;
|
|
474
|
+
editing: boolean;
|
|
475
|
+
}>;
|
|
476
|
+
declare const editingQuerySectionsField: StateField<ReadonlySet<string>>;
|
|
351
477
|
interface QueryBlockPreviewOptions {
|
|
352
478
|
executor?: QueryExecutor;
|
|
353
479
|
onResultSaved?: (callback: () => void) => (() => void) | void;
|
|
354
480
|
readOnly?: boolean;
|
|
355
481
|
onSaveQuery?: (sectionId: string, nextQuery: string) => void | Promise<void>;
|
|
482
|
+
onCaptureRpe?: (resultId: string, rpe: number) => Promise<void>;
|
|
483
|
+
onEditMetric?: (resultId: string, payload: InlineMetricEditPayload) => void | Promise<void>;
|
|
356
484
|
onOpenNote?: (item: {
|
|
357
485
|
id: string;
|
|
358
486
|
title?: string;
|
|
@@ -364,6 +492,7 @@ interface QueryBlockPreviewOptions {
|
|
|
364
492
|
blockContentId?: string;
|
|
365
493
|
}) => string;
|
|
366
494
|
tokenValues?: Record<string, string>;
|
|
495
|
+
noteId?: string;
|
|
367
496
|
}
|
|
368
497
|
declare function saveBlockQuerySource(view: EditorView, sectionId: string, newQuery: string, queryIndex?: number): {
|
|
369
498
|
ok: boolean;
|
|
@@ -422,4 +551,4 @@ interface EditorPresetOptions {
|
|
|
422
551
|
}
|
|
423
552
|
declare function editorPreset(optionsOrDialect?: string | EditorPresetOptions): Extension[];
|
|
424
553
|
|
|
425
|
-
export {
|
|
554
|
+
export { customCompletionSources as $, type AttachmentUrlResolver as A, type ButtonAction as B, type CategorizedMetrics as C, DEFAULT_OUTPUT_FILTERS as D, type EditorDialect as E, type FrontmatterCatalogEntry as F, type GeometryListener as G, type SectionIdentity as H, type InlineMetricEditPayload as I, type SectionRect as J, type SectionState as K, type WidgetProps as L, MetricBadge as M, type NavigationHook as N, type OutputFilterInput as O, type WidgetRegistry as P, type QueryExecutor as Q, type RowPrHighlight as R, type SessionTableSortSpec as S, TONE_CLASS as T, activeCursorSection as U, addRuntimePanel as V, type WidgetConfig as W, attachmentUrlFacet as X, autocompleteTooltipTheme as Y, configureOverlayActions as Z, cursorFocusExtension as _, type CursorFocusState as a, sectionRestore as a$, dispatchAddRuntimePanel as a0, dispatchExpandRuntimePanel as a1, dispatchGutterHighlights as a2, dispatchRemoveRuntimePanel as a3, editingQuerySectionsField as a4, editingWidgetsField as a5, editorFocusField as a6, editorFocusTracker as a7, editorPreset as a8, editorTheme as a9, isEditorFocused as aA, isInternalFrontmatterKey as aB, isNavigableUrl as aC, lineIdsExtension as aD, linkOpen as aE, linkPreview as aF, markdownSyntaxHiding as aG, markdownTablePreview as aH, navigationFacet as aI, nestedCompletion as aJ, nestedCompletionOptions as aK, normalizeOutputFilter as aL, presentBadges as aM, previewDecorations as aN, queryBlockPreview as aO, referenceIndexReload as aP, registeredSectionWidgets as aQ, removeRuntimePanel as aR, resolveCodeLanguage as aS, runtimePanelField as aT, saveBlockQuerySource as aU, sectionAtPos as aV, sectionField as aW, sectionGeometry as aX, sectionIdentity as aY, sectionIdentityHistory as aZ, sectionMove as a_, embedPreviewDecorations as aa, expandRuntimePanel as ab, extractMetricsByCategory as ac, fenceCompletion as ad, findQueryBlockSection as ae, findWorkoutErrors as af, forceSectionParse as ag, formatClockTime as ah, formatMMSS as ai, frontmatterDebugMode as aj, frontmatterDetailed as ak, frontmatterKeymap as al, frontmatterPreview as am, frontmatterPreviewField as an, frontmatterReferenceIndex as ao, frontmatterSource as ap, frontmatterSuggestions as aq, frontmatterVisibility as ar, getCursorFocusState as as, getOverlayActions as at, gutterHighlightsField as au, gutterUnified as av, handleFenceAutoWrap as aw, handleSmartUrlPaste as ax, inlineButtonDecoration as ay, insertMarkdownLinkCommand as az, type CustomCompletionSource as b, sectionSaved as b0, sessionQueryFence as b1, sessionQueryInsert as b2, sessionQueryWql as b3, setEditorFocused as b4, setFrontmatterDetailed as b5, setFrontmatterSource as b6, setGutterHighlights as b7, setQuerySourceEditing as b8, slashBlockCompletion as b9, smartIncrement as ba, toggleInlineMarkdown as bb, toggleWidgetEdit as bc, urlAtPos as bd, widgetBlockPreview as be, wodAutoWrap as bf, wodAutocompletion as bg, wodCompletionSource as bh, wodEditorKeymap as bi, wodLinter as bj, wodOverlayPanel as bk, workoutLintSource as bl, wrapInTimeFence as bm, DEFAULT_PRIMARY_FILTER as c, DefaultFrontmatterWidget as d, type EditorPresetOptions as e, type EditorSection as f, type EditorSectionSubtype as g, type EditorSectionType as h, type EmbedType as i, type FrontmatterRefDiagnostic as j, type FrontmatterReferenceProvider as k, type FrontmatterReferenceRef as l, type FrontmatterReferenceResolution as m, type FrontmatterSuggestionCatalog as n, INTERNAL_FRONTMATTER_KEYS as o, type NestedCompletionOptions as p, OUTPUT_TYPE_CLASS as q, OUTPUT_TYPE_DOT as r, OutputFilterPills as s, type OutputFilterPreset as t, type OutputStatementRow as u, OutputStatementsTable as v, type OutputStatementsTableProps as w, type OverlayAction as x, type QueryBlockPreviewOptions as y, type RuntimePanelEntry as z };
|