@bitcobblers/wod-wiki-ui 0.44.2160 → 0.45.2167
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-7OSBFQY7.mjs → chunk-QCWASNQO.mjs} +187 -76
- package/dist/chunk-QCWASNQO.mjs.map +1 -0
- package/dist/extensions/index.cjs +184 -67
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.d.cts +3 -1
- package/dist/extensions/index.d.ts +3 -1
- package/dist/extensions/index.mjs +1 -1
- package/dist/{index-CNVZ516f.d.cts → index-BPh_dUN3.d.cts} +56 -4
- package/dist/{index-CNVZ516f.d.ts → index-BPh_dUN3.d.ts} +56 -4
- package/dist/index.cjs +194 -79
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -14
- package/dist/index.d.ts +16 -14
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-7OSBFQY7.mjs.map +0 -1
|
@@ -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,
|
|
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,
|
|
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,
|
|
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
|
-
|
|
37
|
-
|
|
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 {
|
|
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
|
-
|
|
37
|
-
|
|
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 {
|
|
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 };
|