@bitcobblers/wod-wiki-ui 0.44.2159 → 0.45.2166

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.
@@ -1,8 +1,10 @@
1
- export { B as ButtonAction, C as CursorFocusState, a as CustomCompletionSource, D as DefaultFrontmatterWidget, E as EditorDialect, b as EditorPresetOptions, c as EditorSection, d as EditorSectionSubtype, e as EditorSectionType, f as EmbedType, F as FrontmatterCatalogEntry, g as FrontmatterRefDiagnostic, h as FrontmatterReferenceProvider, i as FrontmatterReferenceRef, j as FrontmatterReferenceResolution, k as FrontmatterSuggestionCatalog, G as GeometryListener, N as NavigationHook, O as OverlayAction, l as QueryBlockPreviewOptions, R as RuntimePanelEntry, S as SectionIdentity, m as SectionRect, n as SectionState, W as WidgetConfig, o as WidgetProps, p as WidgetRegistry, q as activeCursorSection, r as addRuntimePanel, s as configureOverlayActions, t as cursorFocusExtension, u as dispatchAddRuntimePanel, v as dispatchExpandRuntimePanel, w as dispatchGutterHighlights, x as dispatchRemoveRuntimePanel, y as editingWidgetsField, z as editorPreset, A as editorTheme, H as embedPreviewDecorations, I as expandRuntimePanel, J as fenceCompletion, K as findQueryBlockSection, L as findWorkoutErrors, M as forceSectionParse, P as frontmatterPreview, T as frontmatterPreviewField, U as frontmatterReferenceIndex, V as frontmatterSuggestions, X as frontmatterVisibility, Y as getCursorFocusState, Z as getOverlayActions, _ as gutterHighlightsField, $ as gutterUnified, a0 as handleFenceAutoWrap, a1 as inlineButtonDecoration, a2 as lineIdsExtension, a3 as linkOpen, a4 as linkPreview, a5 as markdownSyntaxHiding, a6 as markdownTablePreview, a7 as navigationFacet, a8 as previewDecorations, a9 as queryBlockPreview, aa as referenceIndexReload, ab as registerCustomCompletionSource, ac as registeredSectionWidgets, ad as removeRuntimePanel, ae as runtimePanelField, af as saveBlockQuerySource, ag as sectionAtPos, ah as sectionField, ai as sectionGeometry, aj as sectionIdentity, ak as sectionIdentityHistory, al as sectionMove, am as sectionRestore, an as sectionSaved, ao as sessionQueryInsert, ap as sessionQueryWql, aq as setGutterHighlights, ar as smartIncrement, as as toggleWidgetEdit, at as unregisterCustomCompletionSource, au as urlAtPos, av as widgetBlockPreview, aw as wodAutoWrap, ax as wodAutocompletion, ay as wodEditorKeymap, az as wodLinter, aA as wodOverlayPanel, aB as workoutLintSource, aC as wrapInTimeFence } from '../index-CNVZ516f.cjs';
1
+ export { B as ButtonAction, C as CursorFocusState, a as CustomCompletionSource, D as DefaultFrontmatterWidget, E as EditorDialect, b as EditorPresetOptions, c as EditorSection, d as EditorSectionSubtype, e as EditorSectionType, f as EmbedType, F as FrontmatterCatalogEntry, g as FrontmatterRefDiagnostic, h as FrontmatterReferenceProvider, i as FrontmatterReferenceRef, j as FrontmatterReferenceResolution, k as FrontmatterSuggestionCatalog, G as GeometryListener, N as NavigationHook, l as NestedCompletionOptions, O as OverlayAction, m as QueryBlockPreviewOptions, R as RuntimePanelEntry, S as SectionIdentity, n as SectionRect, o as SectionState, W as WidgetConfig, p as WidgetProps, q as WidgetRegistry, r as activeCursorSection, s as addRuntimePanel, t as autocompleteTooltipTheme, u as configureOverlayActions, v as cursorFocusExtension, w as customCompletionSources, x as dispatchAddRuntimePanel, y as dispatchExpandRuntimePanel, z as dispatchGutterHighlights, A as dispatchRemoveRuntimePanel, H as editingWidgetsField, I as editorPreset, J as editorTheme, K as embedPreviewDecorations, L as expandRuntimePanel, M as fenceCompletion, P as findQueryBlockSection, T as findWorkoutErrors, U as forceSectionParse, V as frontmatterPreview, X as frontmatterPreviewField, Y as frontmatterReferenceIndex, Z as frontmatterSuggestions, _ as frontmatterVisibility, $ as getCursorFocusState, a0 as getOverlayActions, a1 as gutterHighlightsField, a2 as gutterUnified, a3 as handleFenceAutoWrap, a4 as inlineButtonDecoration, a5 as lineIdsExtension, a6 as linkOpen, a7 as linkPreview, a8 as markdownSyntaxHiding, a9 as markdownTablePreview, aa as navigationFacet, ab as nestedCompletion, ac as nestedCompletionOptions, ad as previewDecorations, ae as queryBlockPreview, af as referenceIndexReload, ag as registeredSectionWidgets, ah as removeRuntimePanel, ai as resolveCodeLanguage, aj as runtimePanelField, ak as saveBlockQuerySource, al as sectionAtPos, am as sectionField, an as sectionGeometry, ao as sectionIdentity, ap as sectionIdentityHistory, aq as sectionMove, ar as sectionRestore, as as sectionSaved, at as sessionQueryInsert, au as sessionQueryWql, av as setGutterHighlights, aw as smartIncrement, ax as toggleWidgetEdit, ay as urlAtPos, az as widgetBlockPreview, aA as wodAutoWrap, aB as wodAutocompletion, aC as wodCompletionSource, aD as wodEditorKeymap, aE as wodLinter, aF as wodOverlayPanel, aG as workoutLintSource, aH as wrapInTimeFence } from '../index-BPh_dUN3.cjs';
2
2
  export { blockContentId } from '@bitcobblers/wod-wiki-core';
3
3
  import '@codemirror/state';
4
4
  import '@codemirror/view';
5
5
  import '@codemirror/lint';
6
6
  import '@codemirror/autocomplete';
7
+ import '@bitcobblers/wod-wiki-lang';
7
8
  import '@bitcobblers/wod-wiki-wql';
8
9
  import 'react';
10
+ import '@codemirror/language';
@@ -1,8 +1,10 @@
1
- export { B as ButtonAction, C as CursorFocusState, a as CustomCompletionSource, D as DefaultFrontmatterWidget, E as EditorDialect, b as EditorPresetOptions, c as EditorSection, d as EditorSectionSubtype, e as EditorSectionType, f as EmbedType, F as FrontmatterCatalogEntry, g as FrontmatterRefDiagnostic, h as FrontmatterReferenceProvider, i as FrontmatterReferenceRef, j as FrontmatterReferenceResolution, k as FrontmatterSuggestionCatalog, G as GeometryListener, N as NavigationHook, O as OverlayAction, l as QueryBlockPreviewOptions, R as RuntimePanelEntry, S as SectionIdentity, m as SectionRect, n as SectionState, W as WidgetConfig, o as WidgetProps, p as WidgetRegistry, q as activeCursorSection, r as addRuntimePanel, s as configureOverlayActions, t as cursorFocusExtension, u as dispatchAddRuntimePanel, v as dispatchExpandRuntimePanel, w as dispatchGutterHighlights, x as dispatchRemoveRuntimePanel, y as editingWidgetsField, z as editorPreset, A as editorTheme, H as embedPreviewDecorations, I as expandRuntimePanel, J as fenceCompletion, K as findQueryBlockSection, L as findWorkoutErrors, M as forceSectionParse, P as frontmatterPreview, T as frontmatterPreviewField, U as frontmatterReferenceIndex, V as frontmatterSuggestions, X as frontmatterVisibility, Y as getCursorFocusState, Z as getOverlayActions, _ as gutterHighlightsField, $ as gutterUnified, a0 as handleFenceAutoWrap, a1 as inlineButtonDecoration, a2 as lineIdsExtension, a3 as linkOpen, a4 as linkPreview, a5 as markdownSyntaxHiding, a6 as markdownTablePreview, a7 as navigationFacet, a8 as previewDecorations, a9 as queryBlockPreview, aa as referenceIndexReload, ab as registerCustomCompletionSource, ac as registeredSectionWidgets, ad as removeRuntimePanel, ae as runtimePanelField, af as saveBlockQuerySource, ag as sectionAtPos, ah as sectionField, ai as sectionGeometry, aj as sectionIdentity, ak as sectionIdentityHistory, al as sectionMove, am as sectionRestore, an as sectionSaved, ao as sessionQueryInsert, ap as sessionQueryWql, aq as setGutterHighlights, ar as smartIncrement, as as toggleWidgetEdit, at as unregisterCustomCompletionSource, au as urlAtPos, av as widgetBlockPreview, aw as wodAutoWrap, ax as wodAutocompletion, ay as wodEditorKeymap, az as wodLinter, aA as wodOverlayPanel, aB as workoutLintSource, aC as wrapInTimeFence } from '../index-CNVZ516f.js';
1
+ export { B as ButtonAction, C as CursorFocusState, a as CustomCompletionSource, D as DefaultFrontmatterWidget, E as EditorDialect, b as EditorPresetOptions, c as EditorSection, d as EditorSectionSubtype, e as EditorSectionType, f as EmbedType, F as FrontmatterCatalogEntry, g as FrontmatterRefDiagnostic, h as FrontmatterReferenceProvider, i as FrontmatterReferenceRef, j as FrontmatterReferenceResolution, k as FrontmatterSuggestionCatalog, G as GeometryListener, N as NavigationHook, l as NestedCompletionOptions, O as OverlayAction, m as QueryBlockPreviewOptions, R as RuntimePanelEntry, S as SectionIdentity, n as SectionRect, o as SectionState, W as WidgetConfig, p as WidgetProps, q as WidgetRegistry, r as activeCursorSection, s as addRuntimePanel, t as autocompleteTooltipTheme, u as configureOverlayActions, v as cursorFocusExtension, w as customCompletionSources, x as dispatchAddRuntimePanel, y as dispatchExpandRuntimePanel, z as dispatchGutterHighlights, A as dispatchRemoveRuntimePanel, H as editingWidgetsField, I as editorPreset, J as editorTheme, K as embedPreviewDecorations, L as expandRuntimePanel, M as fenceCompletion, P as findQueryBlockSection, T as findWorkoutErrors, U as forceSectionParse, V as frontmatterPreview, X as frontmatterPreviewField, Y as frontmatterReferenceIndex, Z as frontmatterSuggestions, _ as frontmatterVisibility, $ as getCursorFocusState, a0 as getOverlayActions, a1 as gutterHighlightsField, a2 as gutterUnified, a3 as handleFenceAutoWrap, a4 as inlineButtonDecoration, a5 as lineIdsExtension, a6 as linkOpen, a7 as linkPreview, a8 as markdownSyntaxHiding, a9 as markdownTablePreview, aa as navigationFacet, ab as nestedCompletion, ac as nestedCompletionOptions, ad as previewDecorations, ae as queryBlockPreview, af as referenceIndexReload, ag as registeredSectionWidgets, ah as removeRuntimePanel, ai as resolveCodeLanguage, aj as runtimePanelField, ak as saveBlockQuerySource, al as sectionAtPos, am as sectionField, an as sectionGeometry, ao as sectionIdentity, ap as sectionIdentityHistory, aq as sectionMove, ar as sectionRestore, as as sectionSaved, at as sessionQueryInsert, au as sessionQueryWql, av as setGutterHighlights, aw as smartIncrement, ax as toggleWidgetEdit, ay as urlAtPos, az as widgetBlockPreview, aA as wodAutoWrap, aB as wodAutocompletion, aC as wodCompletionSource, aD as wodEditorKeymap, aE as wodLinter, aF as wodOverlayPanel, aG as workoutLintSource, aH as wrapInTimeFence } from '../index-BPh_dUN3.js';
2
2
  export { blockContentId } from '@bitcobblers/wod-wiki-core';
3
3
  import '@codemirror/state';
4
4
  import '@codemirror/view';
5
5
  import '@codemirror/lint';
6
6
  import '@codemirror/autocomplete';
7
+ import '@bitcobblers/wod-wiki-lang';
7
8
  import '@bitcobblers/wod-wiki-wql';
8
9
  import 'react';
10
+ import '@codemirror/language';
@@ -1,3 +1,3 @@
1
- export { DefaultFrontmatterWidget, activeCursorSection, addRuntimePanel, blockContentId, configureOverlayActions, cursorFocusExtension, dispatchAddRuntimePanel, dispatchExpandRuntimePanel, dispatchGutterHighlights, dispatchRemoveRuntimePanel, editingWidgetsField, editorPreset, editorTheme, embedPreviewDecorations, expandRuntimePanel, fenceCompletion, findQueryBlockSection, findWorkoutErrors, forceSectionParse, frontmatterPreview, frontmatterPreviewField, frontmatterReferenceIndex, frontmatterSuggestions, frontmatterVisibility, getCursorFocusState, getOverlayActions, gutterHighlightsField, gutterUnified, handleFenceAutoWrap, inlineButtonDecoration, lineIdsExtension, linkOpen, linkPreview, markdownSyntaxHiding, markdownTablePreview, navigationFacet, previewDecorations, queryBlockPreview, referenceIndexReload, registerCustomCompletionSource, registeredSectionWidgets, removeRuntimePanel, runtimePanelField, saveBlockQuerySource, sectionAtPos, sectionField, sectionGeometry, sectionIdentity, sectionIdentityHistory, sectionMove, sectionRestore, sectionSaved, sessionQueryInsert, sessionQueryWql, setGutterHighlights, smartIncrement, toggleWidgetEdit, unregisterCustomCompletionSource, urlAtPos, widgetBlockPreview, wodAutoWrap, wodAutocompletion, wodEditorKeymap, wodLinter, wodOverlayPanel, workoutLintSource, wrapInTimeFence } from '../chunk-7OSBFQY7.mjs';
1
+ export { DefaultFrontmatterWidget, activeCursorSection, addRuntimePanel, autocompleteTooltipTheme, blockContentId, configureOverlayActions, cursorFocusExtension, customCompletionSources, dispatchAddRuntimePanel, dispatchExpandRuntimePanel, dispatchGutterHighlights, dispatchRemoveRuntimePanel, editingWidgetsField, editorPreset, editorTheme, embedPreviewDecorations, expandRuntimePanel, fenceCompletion, findQueryBlockSection, findWorkoutErrors, forceSectionParse, frontmatterPreview, frontmatterPreviewField, frontmatterReferenceIndex, frontmatterSuggestions, frontmatterVisibility, getCursorFocusState, getOverlayActions, gutterHighlightsField, gutterUnified, handleFenceAutoWrap, inlineButtonDecoration, 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, setGutterHighlights, smartIncrement, toggleWidgetEdit, urlAtPos, widgetBlockPreview, wodAutoWrap, wodAutocompletion, wodCompletionSource, wodEditorKeymap, wodLinter, wodOverlayPanel, workoutLintSource, wrapInTimeFence } from '../chunk-QCWASNQO.mjs';
2
2
  //# sourceMappingURL=index.mjs.map
3
3
  //# sourceMappingURL=index.mjs.map
@@ -3,9 +3,11 @@ import { Extension, Facet, EditorState, StateField } 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
8
  import { Section, NoteBlock, ScriptBlock, ICodeStatement, IMetric } from '@bitcobblers/wod-wiki-core';
7
- import { QueryOptions, QueryResult, ParsedFindQuery, FindOptions, FindQueryResult, ParsedRowsQuery, RowsQueryResult, ParsedAggregateQuery, PipelineResult, IFieldCatalog } from '@bitcobblers/wod-wiki-wql';
8
9
  import * as react from 'react';
10
+ import * as _codemirror_language from '@codemirror/language';
9
11
 
10
12
  declare function editorTheme(isDark: boolean): Extension;
11
13
 
@@ -33,10 +35,55 @@ declare function handleFenceAutoWrap(event: InputEvent, view: EditorView): boole
33
35
  declare const wodAutoWrap: Extension;
34
36
  declare const wodEditorKeymap: Extension;
35
37
  type CustomCompletionSource = (context: CompletionContext) => CompletionResult | Promise<CompletionResult | null> | null;
36
- declare function registerCustomCompletionSource(source: CustomCompletionSource): void;
37
- declare function unregisterCustomCompletionSource(source: CustomCompletionSource): void;
38
+ /** Per-editor custom completion sources (frontmatter tags, host registries).
39
+ * Configure through an extension value (`customCompletionSources.of(source)`)
40
+ * — never a module-global registry, so sibling editors stay isolated. */
41
+ declare const customCompletionSources: Facet<CustomCompletionSource, readonly CustomCompletionSource[]>;
42
+ interface NestedCompletionOptions {
43
+ /** Options threaded to the nested WQL source inside ```query/```wql bodies —
44
+ * pass exactly what the host's standalone WQL editors receive so options,
45
+ * ranking, and insert text match. */
46
+ wql?: WqlCompletionOptions;
47
+ /** Options threaded to the nested Whiteboard Script source inside
48
+ * ```time/```log bodies — pass exactly what the host's standalone WB
49
+ * editors receive; each section's `:sport` suffix narrows the vocabulary. */
50
+ whiteboardScript?: WhiteboardScriptCompletionOptions;
51
+ }
52
+ /** Per-editor configuration for nested fence-body completion sources. */
53
+ declare const nestedCompletionOptions: Facet<NestedCompletionOptions, NestedCompletionOptions | undefined>;
54
+ /**
55
+ * Nested fence-body completion, dispatched by the cursor's section through
56
+ * sectionField/activeCursorSection (no re-parsing). ```query/```wql bodies run
57
+ * the WQL source against the body as a standalone document and rebase result
58
+ * ranges back into the note. ```time/```log bodies run the same grammar-aware
59
+ * Whiteboard Script source the standalone editors use, with the section's
60
+ * `:sport` suffix narrowing the dialect vocabulary; the body is parsed with
61
+ * the Whiteboard Script language so syntaxTree slot detection works. Returns
62
+ * null in markdown/frontmatter/widget bodies, so fence and frontmatter
63
+ * suggestions never leak into code.
64
+ */
65
+ declare function nestedCompletion(context: CompletionContext): CompletionResult | Promise<CompletionResult | null> | null;
66
+ /**
67
+ * The note editor's combined completion provider. Explicit order — first
68
+ * result wins: (1) per-editor custom sources via the facet, (2) opening-fence
69
+ * snippets, (3) nested fence-body sources. Exported for direct testing.
70
+ */
71
+ declare function wodCompletionSource(context: CompletionContext): Promise<CompletionResult | null>;
38
72
  declare const wodAutocompletion: Extension;
39
73
 
74
+ /**
75
+ * Token-based autocomplete tooltip theme shared by every editor surface
76
+ * (editorPreset all dialects, WqlTextEditor, CalcLineEditor). Semantic
77
+ * popover/border/muted/primary tokens resolve identically in light and dark,
78
+ * 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
+ */
85
+ declare const autocompleteTooltipTheme: Extension;
86
+
40
87
  type EditorDialect = 'time' | 'log';
41
88
  type EditorSectionType = Exclude<Section['type'], 'title'>;
42
89
  type EditorSectionSubtype = 'heading' | 'paragraph' | 'list' | 'blockquote' | 'table' | 'unknown';
@@ -345,6 +392,7 @@ declare const editingWidgetsField: StateField<Set<string>>;
345
392
  */
346
393
  declare function widgetBlockPreview(registry: WidgetRegistry): Extension;
347
394
 
395
+ declare function resolveCodeLanguage(info: string | null | undefined): _codemirror_language.LRLanguage | null;
348
396
  interface EditorPresetOptions {
349
397
  dialect?: 'wod' | 'whiteboard' | 'wql' | 'markdown' | string;
350
398
  isDark?: boolean;
@@ -359,8 +407,12 @@ interface EditorPresetOptions {
359
407
  /** Dynamic typed-tag filter values (`domain:`/`format:`/`equipment:`/
360
408
  * `quality:`/`intent:`) for wql editors — host reads its tags store. */
361
409
  tagTypeValues?: (key: string) => Promise<readonly string[]> | readonly string[];
410
+ /** Whiteboard Script completion inputs (sport, catalog callbacks) for
411
+ * standalone wod/whiteboard/time editors and nested ```time/```log
412
+ * bodies — one object, so both offer identical suggestions. */
413
+ whiteboardScript?: WhiteboardScriptCompletionOptions;
362
414
  extensions?: Extension[];
363
415
  }
364
416
  declare function editorPreset(optionsOrDialect?: string | EditorPresetOptions): Extension[];
365
417
 
366
- export { gutterUnified as $, editorTheme as A, type ButtonAction as B, type CursorFocusState as C, DefaultFrontmatterWidget as D, type EditorDialect as E, type FrontmatterCatalogEntry as F, type GeometryListener as G, embedPreviewDecorations as H, expandRuntimePanel as I, fenceCompletion as J, findQueryBlockSection as K, findWorkoutErrors as L, forceSectionParse as M, type NavigationHook as N, type OverlayAction as O, frontmatterPreview as P, type QueryExecutor as Q, type RuntimePanelEntry as R, type SectionIdentity as S, frontmatterPreviewField as T, frontmatterReferenceIndex as U, frontmatterSuggestions as V, type WidgetConfig as W, frontmatterVisibility as X, getCursorFocusState as Y, getOverlayActions as Z, gutterHighlightsField as _, type CustomCompletionSource as a, handleFenceAutoWrap as a0, inlineButtonDecoration as a1, lineIdsExtension as a2, linkOpen as a3, linkPreview as a4, markdownSyntaxHiding as a5, markdownTablePreview as a6, navigationFacet as a7, previewDecorations as a8, queryBlockPreview as a9, wodOverlayPanel as aA, workoutLintSource as aB, wrapInTimeFence as aC, referenceIndexReload as aa, registerCustomCompletionSource as ab, registeredSectionWidgets as ac, removeRuntimePanel as ad, runtimePanelField as ae, saveBlockQuerySource as af, sectionAtPos as ag, sectionField as ah, sectionGeometry as ai, sectionIdentity as aj, sectionIdentityHistory as ak, sectionMove as al, sectionRestore as am, sectionSaved as an, sessionQueryInsert as ao, sessionQueryWql as ap, setGutterHighlights as aq, smartIncrement as ar, toggleWidgetEdit as as, unregisterCustomCompletionSource as at, urlAtPos as au, widgetBlockPreview as av, wodAutoWrap as aw, wodAutocompletion as ax, wodEditorKeymap as ay, wodLinter as az, type EditorPresetOptions as b, type EditorSection as c, type EditorSectionSubtype as d, type EditorSectionType as e, type EmbedType as f, type FrontmatterRefDiagnostic as g, type FrontmatterReferenceProvider as h, type FrontmatterReferenceRef as i, type FrontmatterReferenceResolution as j, type FrontmatterSuggestionCatalog as k, type QueryBlockPreviewOptions as l, type SectionRect as m, type SectionState as n, type WidgetProps as o, type WidgetRegistry as p, activeCursorSection as q, addRuntimePanel as r, configureOverlayActions as s, cursorFocusExtension as t, dispatchAddRuntimePanel as u, dispatchExpandRuntimePanel as v, dispatchGutterHighlights as w, dispatchRemoveRuntimePanel as x, editingWidgetsField as y, editorPreset as z };
418
+ export { getCursorFocusState as $, dispatchRemoveRuntimePanel as A, type ButtonAction as B, type CursorFocusState as C, DefaultFrontmatterWidget as D, type EditorDialect as E, type FrontmatterCatalogEntry as F, type GeometryListener as G, editingWidgetsField as H, editorPreset as I, editorTheme as J, embedPreviewDecorations as K, expandRuntimePanel as L, fenceCompletion as M, type NavigationHook as N, type OverlayAction as O, findQueryBlockSection as P, type QueryExecutor as Q, type RuntimePanelEntry as R, type SectionIdentity as S, findWorkoutErrors as T, forceSectionParse as U, frontmatterPreview as V, type WidgetConfig as W, frontmatterPreviewField as X, frontmatterReferenceIndex as Y, frontmatterSuggestions as Z, frontmatterVisibility as _, type CustomCompletionSource as a, getOverlayActions as a0, gutterHighlightsField as a1, gutterUnified as a2, handleFenceAutoWrap as a3, inlineButtonDecoration as a4, lineIdsExtension as a5, linkOpen as a6, linkPreview as a7, markdownSyntaxHiding as a8, markdownTablePreview as a9, wodAutoWrap as aA, wodAutocompletion as aB, wodCompletionSource as aC, wodEditorKeymap as aD, wodLinter as aE, wodOverlayPanel as aF, workoutLintSource as aG, wrapInTimeFence as aH, navigationFacet as aa, nestedCompletion as ab, nestedCompletionOptions as ac, previewDecorations as ad, queryBlockPreview as ae, referenceIndexReload as af, registeredSectionWidgets as ag, removeRuntimePanel as ah, resolveCodeLanguage as ai, runtimePanelField as aj, saveBlockQuerySource as ak, sectionAtPos as al, sectionField as am, sectionGeometry as an, sectionIdentity as ao, sectionIdentityHistory as ap, sectionMove as aq, sectionRestore as ar, sectionSaved as as, sessionQueryInsert as at, sessionQueryWql as au, setGutterHighlights as av, smartIncrement as aw, toggleWidgetEdit as ax, urlAtPos as ay, widgetBlockPreview as az, type EditorPresetOptions as b, type EditorSection as c, type EditorSectionSubtype as d, type EditorSectionType as e, type EmbedType as f, type FrontmatterRefDiagnostic as g, type FrontmatterReferenceProvider as h, type FrontmatterReferenceRef as i, type FrontmatterReferenceResolution as j, type FrontmatterSuggestionCatalog as k, type NestedCompletionOptions as l, type QueryBlockPreviewOptions as m, type SectionRect as n, type SectionState as o, type WidgetProps as p, type WidgetRegistry as q, activeCursorSection as r, addRuntimePanel as s, autocompleteTooltipTheme as t, configureOverlayActions as u, cursorFocusExtension as v, customCompletionSources as w, dispatchAddRuntimePanel as x, dispatchExpandRuntimePanel as y, dispatchGutterHighlights as z };
@@ -3,9 +3,11 @@ import { Extension, Facet, EditorState, StateField } 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
8
  import { Section, NoteBlock, ScriptBlock, ICodeStatement, IMetric } from '@bitcobblers/wod-wiki-core';
7
- import { QueryOptions, QueryResult, ParsedFindQuery, FindOptions, FindQueryResult, ParsedRowsQuery, RowsQueryResult, ParsedAggregateQuery, PipelineResult, IFieldCatalog } from '@bitcobblers/wod-wiki-wql';
8
9
  import * as react from 'react';
10
+ import * as _codemirror_language from '@codemirror/language';
9
11
 
10
12
  declare function editorTheme(isDark: boolean): Extension;
11
13
 
@@ -33,10 +35,55 @@ declare function handleFenceAutoWrap(event: InputEvent, view: EditorView): boole
33
35
  declare const wodAutoWrap: Extension;
34
36
  declare const wodEditorKeymap: Extension;
35
37
  type CustomCompletionSource = (context: CompletionContext) => CompletionResult | Promise<CompletionResult | null> | null;
36
- declare function registerCustomCompletionSource(source: CustomCompletionSource): void;
37
- declare function unregisterCustomCompletionSource(source: CustomCompletionSource): void;
38
+ /** Per-editor custom completion sources (frontmatter tags, host registries).
39
+ * Configure through an extension value (`customCompletionSources.of(source)`)
40
+ * — never a module-global registry, so sibling editors stay isolated. */
41
+ declare const customCompletionSources: Facet<CustomCompletionSource, readonly CustomCompletionSource[]>;
42
+ interface NestedCompletionOptions {
43
+ /** Options threaded to the nested WQL source inside ```query/```wql bodies —
44
+ * pass exactly what the host's standalone WQL editors receive so options,
45
+ * ranking, and insert text match. */
46
+ wql?: WqlCompletionOptions;
47
+ /** Options threaded to the nested Whiteboard Script source inside
48
+ * ```time/```log bodies — pass exactly what the host's standalone WB
49
+ * editors receive; each section's `:sport` suffix narrows the vocabulary. */
50
+ whiteboardScript?: WhiteboardScriptCompletionOptions;
51
+ }
52
+ /** Per-editor configuration for nested fence-body completion sources. */
53
+ declare const nestedCompletionOptions: Facet<NestedCompletionOptions, NestedCompletionOptions | undefined>;
54
+ /**
55
+ * Nested fence-body completion, dispatched by the cursor's section through
56
+ * sectionField/activeCursorSection (no re-parsing). ```query/```wql bodies run
57
+ * the WQL source against the body as a standalone document and rebase result
58
+ * ranges back into the note. ```time/```log bodies run the same grammar-aware
59
+ * Whiteboard Script source the standalone editors use, with the section's
60
+ * `:sport` suffix narrowing the dialect vocabulary; the body is parsed with
61
+ * the Whiteboard Script language so syntaxTree slot detection works. Returns
62
+ * null in markdown/frontmatter/widget bodies, so fence and frontmatter
63
+ * suggestions never leak into code.
64
+ */
65
+ declare function nestedCompletion(context: CompletionContext): CompletionResult | Promise<CompletionResult | null> | null;
66
+ /**
67
+ * The note editor's combined completion provider. Explicit order — first
68
+ * result wins: (1) per-editor custom sources via the facet, (2) opening-fence
69
+ * snippets, (3) nested fence-body sources. Exported for direct testing.
70
+ */
71
+ declare function wodCompletionSource(context: CompletionContext): Promise<CompletionResult | null>;
38
72
  declare const wodAutocompletion: Extension;
39
73
 
74
+ /**
75
+ * Token-based autocomplete tooltip theme shared by every editor surface
76
+ * (editorPreset all dialects, WqlTextEditor, CalcLineEditor). Semantic
77
+ * popover/border/muted/primary tokens resolve identically in light and dark,
78
+ * 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
+ */
85
+ declare const autocompleteTooltipTheme: Extension;
86
+
40
87
  type EditorDialect = 'time' | 'log';
41
88
  type EditorSectionType = Exclude<Section['type'], 'title'>;
42
89
  type EditorSectionSubtype = 'heading' | 'paragraph' | 'list' | 'blockquote' | 'table' | 'unknown';
@@ -345,6 +392,7 @@ declare const editingWidgetsField: StateField<Set<string>>;
345
392
  */
346
393
  declare function widgetBlockPreview(registry: WidgetRegistry): Extension;
347
394
 
395
+ declare function resolveCodeLanguage(info: string | null | undefined): _codemirror_language.LRLanguage | null;
348
396
  interface EditorPresetOptions {
349
397
  dialect?: 'wod' | 'whiteboard' | 'wql' | 'markdown' | string;
350
398
  isDark?: boolean;
@@ -359,8 +407,12 @@ interface EditorPresetOptions {
359
407
  /** Dynamic typed-tag filter values (`domain:`/`format:`/`equipment:`/
360
408
  * `quality:`/`intent:`) for wql editors — host reads its tags store. */
361
409
  tagTypeValues?: (key: string) => Promise<readonly string[]> | readonly string[];
410
+ /** Whiteboard Script completion inputs (sport, catalog callbacks) for
411
+ * standalone wod/whiteboard/time editors and nested ```time/```log
412
+ * bodies — one object, so both offer identical suggestions. */
413
+ whiteboardScript?: WhiteboardScriptCompletionOptions;
362
414
  extensions?: Extension[];
363
415
  }
364
416
  declare function editorPreset(optionsOrDialect?: string | EditorPresetOptions): Extension[];
365
417
 
366
- export { gutterUnified as $, editorTheme as A, type ButtonAction as B, type CursorFocusState as C, DefaultFrontmatterWidget as D, type EditorDialect as E, type FrontmatterCatalogEntry as F, type GeometryListener as G, embedPreviewDecorations as H, expandRuntimePanel as I, fenceCompletion as J, findQueryBlockSection as K, findWorkoutErrors as L, forceSectionParse as M, type NavigationHook as N, type OverlayAction as O, frontmatterPreview as P, type QueryExecutor as Q, type RuntimePanelEntry as R, type SectionIdentity as S, frontmatterPreviewField as T, frontmatterReferenceIndex as U, frontmatterSuggestions as V, type WidgetConfig as W, frontmatterVisibility as X, getCursorFocusState as Y, getOverlayActions as Z, gutterHighlightsField as _, type CustomCompletionSource as a, handleFenceAutoWrap as a0, inlineButtonDecoration as a1, lineIdsExtension as a2, linkOpen as a3, linkPreview as a4, markdownSyntaxHiding as a5, markdownTablePreview as a6, navigationFacet as a7, previewDecorations as a8, queryBlockPreview as a9, wodOverlayPanel as aA, workoutLintSource as aB, wrapInTimeFence as aC, referenceIndexReload as aa, registerCustomCompletionSource as ab, registeredSectionWidgets as ac, removeRuntimePanel as ad, runtimePanelField as ae, saveBlockQuerySource as af, sectionAtPos as ag, sectionField as ah, sectionGeometry as ai, sectionIdentity as aj, sectionIdentityHistory as ak, sectionMove as al, sectionRestore as am, sectionSaved as an, sessionQueryInsert as ao, sessionQueryWql as ap, setGutterHighlights as aq, smartIncrement as ar, toggleWidgetEdit as as, unregisterCustomCompletionSource as at, urlAtPos as au, widgetBlockPreview as av, wodAutoWrap as aw, wodAutocompletion as ax, wodEditorKeymap as ay, wodLinter as az, type EditorPresetOptions as b, type EditorSection as c, type EditorSectionSubtype as d, type EditorSectionType as e, type EmbedType as f, type FrontmatterRefDiagnostic as g, type FrontmatterReferenceProvider as h, type FrontmatterReferenceRef as i, type FrontmatterReferenceResolution as j, type FrontmatterSuggestionCatalog as k, type QueryBlockPreviewOptions as l, type SectionRect as m, type SectionState as n, type WidgetProps as o, type WidgetRegistry as p, activeCursorSection as q, addRuntimePanel as r, configureOverlayActions as s, cursorFocusExtension as t, dispatchAddRuntimePanel as u, dispatchExpandRuntimePanel as v, dispatchGutterHighlights as w, dispatchRemoveRuntimePanel as x, editingWidgetsField as y, editorPreset as z };
418
+ export { getCursorFocusState as $, dispatchRemoveRuntimePanel as A, type ButtonAction as B, type CursorFocusState as C, DefaultFrontmatterWidget as D, type EditorDialect as E, type FrontmatterCatalogEntry as F, type GeometryListener as G, editingWidgetsField as H, editorPreset as I, editorTheme as J, embedPreviewDecorations as K, expandRuntimePanel as L, fenceCompletion as M, type NavigationHook as N, type OverlayAction as O, findQueryBlockSection as P, type QueryExecutor as Q, type RuntimePanelEntry as R, type SectionIdentity as S, findWorkoutErrors as T, forceSectionParse as U, frontmatterPreview as V, type WidgetConfig as W, frontmatterPreviewField as X, frontmatterReferenceIndex as Y, frontmatterSuggestions as Z, frontmatterVisibility as _, type CustomCompletionSource as a, getOverlayActions as a0, gutterHighlightsField as a1, gutterUnified as a2, handleFenceAutoWrap as a3, inlineButtonDecoration as a4, lineIdsExtension as a5, linkOpen as a6, linkPreview as a7, markdownSyntaxHiding as a8, markdownTablePreview as a9, wodAutoWrap as aA, wodAutocompletion as aB, wodCompletionSource as aC, wodEditorKeymap as aD, wodLinter as aE, wodOverlayPanel as aF, workoutLintSource as aG, wrapInTimeFence as aH, navigationFacet as aa, nestedCompletion as ab, nestedCompletionOptions as ac, previewDecorations as ad, queryBlockPreview as ae, referenceIndexReload as af, registeredSectionWidgets as ag, removeRuntimePanel as ah, resolveCodeLanguage as ai, runtimePanelField as aj, saveBlockQuerySource as ak, sectionAtPos as al, sectionField as am, sectionGeometry as an, sectionIdentity as ao, sectionIdentityHistory as ap, sectionMove as aq, sectionRestore as ar, sectionSaved as as, sessionQueryInsert as at, sessionQueryWql as au, setGutterHighlights as av, smartIncrement as aw, toggleWidgetEdit as ax, urlAtPos as ay, widgetBlockPreview as az, type EditorPresetOptions as b, type EditorSection as c, type EditorSectionSubtype as d, type EditorSectionType as e, type EmbedType as f, type FrontmatterRefDiagnostic as g, type FrontmatterReferenceProvider as h, type FrontmatterReferenceRef as i, type FrontmatterReferenceResolution as j, type FrontmatterSuggestionCatalog as k, type NestedCompletionOptions as l, type QueryBlockPreviewOptions as m, type SectionRect as n, type SectionState as o, type WidgetProps as p, type WidgetRegistry as q, activeCursorSection as r, addRuntimePanel as s, autocompleteTooltipTheme as t, configureOverlayActions as u, cursorFocusExtension as v, customCompletionSources as w, dispatchAddRuntimePanel as x, dispatchExpandRuntimePanel as y, dispatchGutterHighlights as z };