@bitcobblers/wod-wiki-ui 0.3.23 → 0.5.28
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-HRROD36H.mjs +10359 -0
- package/dist/chunk-HRROD36H.mjs.map +1 -0
- package/dist/extensions/index.cjs +10276 -0
- package/dist/extensions/index.cjs.map +1 -0
- package/dist/extensions/index.d.cts +8 -0
- package/dist/extensions/index.d.ts +8 -0
- package/dist/extensions/index.mjs +3 -0
- package/dist/extensions/index.mjs.map +1 -0
- package/dist/index-BZqjX-eA.d.cts +235 -0
- package/dist/index-BZqjX-eA.d.ts +235 -0
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -240
- package/dist/index.d.ts +16 -240
- package/dist/index.mjs +25 -10370
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +188 -0
- package/package.json +11 -9
package/dist/index.d.cts
CHANGED
|
@@ -1,23 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { Q as QueryExecutor } from './index-BZqjX-eA.cjs';
|
|
2
|
+
export { B as ButtonAction, C as CursorFocusState, D as DefaultFrontmatterWidget, E as EditorDialect, a as EditorPresetOptions, b as EditorSection, c as EditorSectionSubtype, d as EditorSectionType, e as EmbedType, G as GeometryListener, N as NavigationHook, O as OverlayAction, f as QueryBlockPreviewOptions, R as RuntimePanelEntry, S as SectionRect, g as SectionState, W as WidgetConfig, h as WidgetProps, i as WidgetRegistry, j as activeCursorSection, k as addRuntimePanel, l as blockContentId, m as configureOverlayActions, n as cursorFocusExtension, o as dispatchAddRuntimePanel, p as dispatchExpandRuntimePanel, q as dispatchGutterHighlights, r as dispatchRemoveRuntimePanel, s as editingWidgetsField, t as editorPreset, u as editorTheme, v as embedPreviewDecorations, w as expandRuntimePanel, x as fenceCompletion, y as findQueryBlockSection, z as findWorkoutErrors, A as forceSectionParse, F as frontmatterPreview, H as frontmatterPreviewField, I as getCursorFocusState, J as getOverlayActions, K as gutterHighlightsField, L as gutterUnified, M as handleFenceAutoWrap, P as inlineButtonDecoration, T as lineIdsExtension, U as linkOpen, V as markdownSyntaxHiding, X as markdownTablePreview, Y as navigationFacet, Z as previewDecorations, _ as queryBlockPreview, $ as removeRuntimePanel, a0 as runtimePanelField, a1 as saveBlockQuerySource, a2 as sectionAtPos, a3 as sectionField, a4 as sectionGeometry, a5 as sessionQueryInsert, a6 as sessionQueryWql, a7 as setGutterHighlights, a8 as smartIncrement, a9 as toggleWidgetEdit, aa as urlAtPos, ab as widgetBlockPreview, ac as wodAutoWrap, ad as wodAutocompletion, ae as wodEditorKeymap, af as wodLinter, ag as wodOverlayPanel, ah as workoutLintSource, ai as wrapInTimeFence } from './index-BZqjX-eA.cjs';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode, ComponentType } from 'react';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import { ViewPlugin, DecorationSet, ViewUpdate, EditorView, Decoration, WidgetType } from '@codemirror/view';
|
|
9
|
-
import { Diagnostic } from '@codemirror/lint';
|
|
10
|
-
import { CompletionContext, CompletionResult } from '@codemirror/autocomplete';
|
|
5
|
+
import { QueryResult, DashboardToken, DashboardDocument, DashboardWidget, Series, RowsQueryResult, RowsRun, ParsedQuery, ParsedFindQuery, ParsedRowsQuery, FindQueryResult } from '@bitcobblers/wod-wiki-wql';
|
|
6
|
+
export { FindOptions, FindQueryResult, ParsedFindQuery, ParsedQuery, ParsedRowsQuery, QueryOptions, QueryResult, RowsQueryResult, RowsRun } from '@bitcobblers/wod-wiki-wql';
|
|
7
|
+
import { Segment, StoredOutputStatement, BlockIndexRow } from '@bitcobblers/wod-wiki-core';
|
|
11
8
|
import { ClassValue } from 'clsx';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
runRows(parsed: ParsedRowsQuery, options?: {
|
|
17
|
-
anchorNow?: number;
|
|
18
|
-
}): Promise<RowsQueryResult>;
|
|
19
|
-
run?(parsed: ParsedQuery, options?: QueryOptions): Promise<QueryResult>;
|
|
20
|
-
}
|
|
9
|
+
import '@codemirror/state';
|
|
10
|
+
import '@codemirror/view';
|
|
11
|
+
import '@codemirror/lint';
|
|
12
|
+
import '@codemirror/autocomplete';
|
|
21
13
|
|
|
22
14
|
interface StorageLike {
|
|
23
15
|
getItem(key: string): string | null;
|
|
@@ -644,222 +636,6 @@ interface WqlDiagnosticsStripProps {
|
|
|
644
636
|
}
|
|
645
637
|
declare function WqlDiagnosticsStrip({ diagnostics, offendingLabel, stages, actions, className, }: WqlDiagnosticsStripProps): react.JSX.Element;
|
|
646
638
|
|
|
647
|
-
declare function editorTheme(isDark: boolean): Extension;
|
|
648
|
-
|
|
649
|
-
/**
|
|
650
|
-
* Extension that adds ID attributes to line elements in the editor.
|
|
651
|
-
*/
|
|
652
|
-
declare const lineIdsExtension: ViewPlugin<{
|
|
653
|
-
decorations: DecorationSet;
|
|
654
|
-
update(update: ViewUpdate): void;
|
|
655
|
-
getDecorations(view: EditorView): _codemirror_state.RangeSet<Decoration>;
|
|
656
|
-
}, undefined>;
|
|
657
|
-
|
|
658
|
-
type NavigationHook = (url: string, view: EditorView) => void;
|
|
659
|
-
declare const navigationFacet: Facet<NavigationHook, NavigationHook | null>;
|
|
660
|
-
declare function urlAtPos(view: EditorView, pos: number): string | null;
|
|
661
|
-
declare const linkOpen: Extension;
|
|
662
|
-
|
|
663
|
-
declare function findWorkoutErrors(content: string, offsetInDoc: number): Diagnostic[];
|
|
664
|
-
declare function workoutLintSource(view: EditorView): Diagnostic[];
|
|
665
|
-
declare const wodLinter: _codemirror_state.Extension;
|
|
666
|
-
|
|
667
|
-
declare function fenceCompletion(context: CompletionContext): CompletionResult | null;
|
|
668
|
-
declare function wrapInTimeFence(view: EditorView): boolean;
|
|
669
|
-
declare function handleFenceAutoWrap(event: InputEvent, view: EditorView): boolean;
|
|
670
|
-
declare const wodAutoWrap: Extension;
|
|
671
|
-
declare const wodEditorKeymap: Extension;
|
|
672
|
-
declare const wodAutocompletion: Extension;
|
|
673
|
-
|
|
674
|
-
type EditorDialect = "time" | "log";
|
|
675
|
-
type EditorSectionType = "markdown" | "time" | "log" | "frontmatter" | "code" | "widget" | "embed" | "query";
|
|
676
|
-
type EditorSectionSubtype = "heading" | "paragraph" | "list" | "blockquote" | "table" | "unknown";
|
|
677
|
-
type EmbedType = "image" | "link" | "youtube";
|
|
678
|
-
interface EditorSection {
|
|
679
|
-
id: string;
|
|
680
|
-
type: EditorSectionType;
|
|
681
|
-
subtype?: EditorSectionSubtype;
|
|
682
|
-
from: number;
|
|
683
|
-
to: number;
|
|
684
|
-
startLine: number;
|
|
685
|
-
endLine: number;
|
|
686
|
-
contentFrom?: number;
|
|
687
|
-
contentTo?: number;
|
|
688
|
-
sport?: string;
|
|
689
|
-
widgetName?: string;
|
|
690
|
-
contentId?: string;
|
|
691
|
-
queryType?: string;
|
|
692
|
-
queryError?: string;
|
|
693
|
-
embed?: {
|
|
694
|
-
type: EmbedType;
|
|
695
|
-
url: string;
|
|
696
|
-
label: string;
|
|
697
|
-
videoId?: string;
|
|
698
|
-
height?: number;
|
|
699
|
-
};
|
|
700
|
-
}
|
|
701
|
-
interface SectionState {
|
|
702
|
-
sections: EditorSection[];
|
|
703
|
-
}
|
|
704
|
-
declare const forceSectionParse: _codemirror_state.StateEffectType<null>;
|
|
705
|
-
declare function blockContentId(content: string): string;
|
|
706
|
-
declare const sectionField: StateField<SectionState>;
|
|
707
|
-
declare function sectionAtPos(state: EditorState, pos: number): EditorSection | null;
|
|
708
|
-
declare function activeCursorSection(state: EditorState): EditorSection | null;
|
|
709
|
-
|
|
710
|
-
interface SectionRect {
|
|
711
|
-
sectionId: string;
|
|
712
|
-
top: number;
|
|
713
|
-
height: number;
|
|
714
|
-
type: EditorSection["type"];
|
|
715
|
-
subtype?: EditorSection["subtype"];
|
|
716
|
-
widgetName?: string;
|
|
717
|
-
}
|
|
718
|
-
type GeometryListener = (rects: SectionRect[], docVersion: number) => void;
|
|
719
|
-
declare class SectionGeometryPlugin {
|
|
720
|
-
private view;
|
|
721
|
-
rects: SectionRect[];
|
|
722
|
-
docVersion: number;
|
|
723
|
-
private listeners;
|
|
724
|
-
constructor(view: EditorView);
|
|
725
|
-
update(update: ViewUpdate): void;
|
|
726
|
-
addListener(fn: GeometryListener): () => void;
|
|
727
|
-
private measure;
|
|
728
|
-
private notify;
|
|
729
|
-
destroy(): void;
|
|
730
|
-
}
|
|
731
|
-
declare const sectionGeometry: ViewPlugin<SectionGeometryPlugin, undefined>;
|
|
732
|
-
|
|
733
|
-
declare const previewDecorations: Extension;
|
|
734
|
-
|
|
735
|
-
declare const embedPreviewDecorations: Extension;
|
|
736
|
-
|
|
737
|
-
declare class DefaultFrontmatterWidget extends WidgetType {
|
|
738
|
-
readonly props: Record<string, string>;
|
|
739
|
-
constructor(props: Record<string, string>);
|
|
740
|
-
eq(other: DefaultFrontmatterWidget): boolean;
|
|
741
|
-
toDOM(): HTMLElement;
|
|
742
|
-
}
|
|
743
|
-
declare const frontmatterPreviewField: StateField<DecorationSet>;
|
|
744
|
-
declare const frontmatterPreview: Extension;
|
|
745
|
-
|
|
746
|
-
declare function markdownSyntaxHiding(): Extension;
|
|
747
|
-
|
|
748
|
-
declare const markdownTablePreview: Extension;
|
|
749
|
-
|
|
750
|
-
declare const setGutterHighlights: _codemirror_state.StateEffectType<Set<number>>;
|
|
751
|
-
declare const gutterHighlightsField: StateField<Set<number>>;
|
|
752
|
-
declare const gutterUnified: (_codemirror_state.Extension | StateField<Set<number>>)[];
|
|
753
|
-
declare function dispatchGutterHighlights(view: EditorView, lineNumbers: number[]): void;
|
|
754
|
-
|
|
755
|
-
type ButtonAction = (action: string, params: Record<string, string>) => void;
|
|
756
|
-
declare function inlineButtonDecoration(onAction: ButtonAction): Extension;
|
|
757
|
-
|
|
758
|
-
interface RuntimePanelEntry {
|
|
759
|
-
sectionId: string;
|
|
760
|
-
block: ScriptBlock;
|
|
761
|
-
afterPos: number;
|
|
762
|
-
expanded?: boolean;
|
|
763
|
-
}
|
|
764
|
-
declare const addRuntimePanel: _codemirror_state.StateEffectType<RuntimePanelEntry>;
|
|
765
|
-
declare const removeRuntimePanel: _codemirror_state.StateEffectType<{
|
|
766
|
-
sectionId: string;
|
|
767
|
-
}>;
|
|
768
|
-
declare const expandRuntimePanel: _codemirror_state.StateEffectType<{
|
|
769
|
-
sectionId: string;
|
|
770
|
-
expanded: boolean;
|
|
771
|
-
}>;
|
|
772
|
-
declare const runtimePanelField: StateField<Map<string, RuntimePanelEntry>>;
|
|
773
|
-
declare function dispatchAddRuntimePanel(view: EditorView, sectionId: string, block: ScriptBlock, afterPos: number, expanded?: boolean): void;
|
|
774
|
-
declare function dispatchRemoveRuntimePanel(view: EditorView, sectionId: string): void;
|
|
775
|
-
declare function dispatchExpandRuntimePanel(view: EditorView, sectionId: string, expanded: boolean): void;
|
|
776
|
-
|
|
777
|
-
declare function sessionQueryWql(resultId: string): string;
|
|
778
|
-
declare function sessionQueryInsert(state: EditorState, blockId: string, resultId: string, runBlock?: {
|
|
779
|
-
id?: string;
|
|
780
|
-
contentId?: string;
|
|
781
|
-
}): {
|
|
782
|
-
from: number;
|
|
783
|
-
insert: string;
|
|
784
|
-
} | null;
|
|
785
|
-
|
|
786
|
-
declare const smartIncrement: Extension;
|
|
787
|
-
|
|
788
|
-
interface OverlayAction {
|
|
789
|
-
label: string;
|
|
790
|
-
icon: string;
|
|
791
|
-
action: (view: EditorView, section: EditorSection) => void;
|
|
792
|
-
}
|
|
793
|
-
declare function configureOverlayActions(actions: OverlayAction[]): void;
|
|
794
|
-
declare function getOverlayActions(): OverlayAction[];
|
|
795
|
-
declare const wodOverlayPanel: Extension;
|
|
796
|
-
|
|
797
|
-
interface CursorFocusState {
|
|
798
|
-
sectionId: string;
|
|
799
|
-
section: EditorSection;
|
|
800
|
-
lineFrom: number;
|
|
801
|
-
docLine: number;
|
|
802
|
-
statementIndex: number;
|
|
803
|
-
statement: ICodeStatement;
|
|
804
|
-
focusedMetric: IMetric | null;
|
|
805
|
-
focusedMetricIndex: number;
|
|
806
|
-
allStatements: ICodeStatement[];
|
|
807
|
-
}
|
|
808
|
-
declare function getCursorFocusState(state: EditorState): CursorFocusState | null;
|
|
809
|
-
declare const cursorFocusExtension: Extension;
|
|
810
|
-
|
|
811
|
-
interface QueryBlockPreviewOptions {
|
|
812
|
-
executor?: QueryExecutor;
|
|
813
|
-
onResultSaved?: (callback: () => void) => (() => void) | void;
|
|
814
|
-
readOnly?: boolean;
|
|
815
|
-
onSaveQuery?: (sectionId: string, nextQuery: string) => void;
|
|
816
|
-
}
|
|
817
|
-
declare function saveBlockQuerySource(view: EditorView, sectionId: string, newQuery: string, queryIndex?: number): {
|
|
818
|
-
ok: boolean;
|
|
819
|
-
patchedContent?: string;
|
|
820
|
-
message?: string;
|
|
821
|
-
};
|
|
822
|
-
declare function findQueryBlockSection(view: EditorView, sectionId: string): EditorSection | null;
|
|
823
|
-
declare function queryBlockPreview(options?: QueryBlockPreviewOptions): Extension;
|
|
824
|
-
|
|
825
|
-
/** Parsed JSON object passed into a widget component. */
|
|
826
|
-
type WidgetConfig = Record<string, unknown>;
|
|
827
|
-
/** Props passed to every registered widget component. */
|
|
828
|
-
interface WidgetProps {
|
|
829
|
-
/** Parsed JSON object from the fenced widget body. */
|
|
830
|
-
config: WidgetConfig;
|
|
831
|
-
/** Exact source text between the opening and closing fences. */
|
|
832
|
-
rawContent: string;
|
|
833
|
-
/** Stable section identifier generated by section-state.ts. */
|
|
834
|
-
sectionId: string;
|
|
835
|
-
}
|
|
836
|
-
/** Registry of widget names to React components. */
|
|
837
|
-
type WidgetRegistry = Map<string, react.ComponentType<WidgetProps>>;
|
|
838
|
-
/** Effect to toggle edit mode for a specific widget block */
|
|
839
|
-
declare const toggleWidgetEdit: _codemirror_state.StateEffectType<{
|
|
840
|
-
sectionId: string;
|
|
841
|
-
editing: boolean;
|
|
842
|
-
}>;
|
|
843
|
-
/** StateField to track which widgets are currently being edited as raw text */
|
|
844
|
-
declare const editingWidgetsField: StateField<Set<string>>;
|
|
845
|
-
/**
|
|
846
|
-
* Create a CM6 Extension that replaces widget fenced blocks with React components.
|
|
847
|
-
* Block decorations MUST come from a StateField (not a ViewPlugin) per CM6 constraints.
|
|
848
|
-
*/
|
|
849
|
-
declare function widgetBlockPreview(registry: WidgetRegistry): Extension;
|
|
850
|
-
|
|
851
|
-
interface EditorPresetOptions {
|
|
852
|
-
dialect?: 'wod' | 'whiteboard' | 'wql' | 'markdown' | string;
|
|
853
|
-
isDark?: boolean;
|
|
854
|
-
readOnly?: boolean;
|
|
855
|
-
lineNumbers?: boolean;
|
|
856
|
-
lineWrapping?: boolean;
|
|
857
|
-
executor?: QueryExecutor;
|
|
858
|
-
onResultSaved?: (callback: () => void) => (() => void) | void;
|
|
859
|
-
extensions?: Extension[];
|
|
860
|
-
}
|
|
861
|
-
declare function editorPreset(optionsOrDialect?: string | EditorPresetOptions): Extension[];
|
|
862
|
-
|
|
863
639
|
declare function cn(...inputs: ClassValue[]): string;
|
|
864
640
|
declare function hashCode(str: string): number;
|
|
865
641
|
|
|
@@ -883,13 +659,13 @@ declare function patchBlockQuery(blockContent: string, newQuery: string, queryIn
|
|
|
883
659
|
* Auto-generated build version metadata.
|
|
884
660
|
* Do not edit directly; updated by scripts/stamp-version.ts
|
|
885
661
|
*/
|
|
886
|
-
declare const VERSION = "0.
|
|
887
|
-
declare const GIT_SHA = "
|
|
888
|
-
declare const BUILD_TIME = "2026-08-
|
|
662
|
+
declare const VERSION = "0.5.28";
|
|
663
|
+
declare const GIT_SHA = "8aaaba1";
|
|
664
|
+
declare const BUILD_TIME = "2026-08-18T20:49:38.789Z";
|
|
889
665
|
declare const SEMVER: {
|
|
890
|
-
readonly version: "0.
|
|
891
|
-
readonly gitSha: "
|
|
892
|
-
readonly buildTime: "2026-08-
|
|
666
|
+
readonly version: "0.5.28";
|
|
667
|
+
readonly gitSha: "8aaaba1";
|
|
668
|
+
readonly buildTime: "2026-08-18T20:49:38.789Z";
|
|
893
669
|
};
|
|
894
670
|
|
|
895
|
-
export { AGG_OPTIONS, ANALYTICS_UNIT_STORAGE_KEY, AddCalcDropdown, AddFilterDropdown, type AnalyticsQueriesState, type AnalyticsQueryDef, type AnalyticsRangeWeeks, type AnalyticsUnit, AnalyticsUnitPreference, type AnalyticsUnitPreferenceProps, BUILD_TIME,
|
|
671
|
+
export { AGG_OPTIONS, ANALYTICS_UNIT_STORAGE_KEY, AddCalcDropdown, AddFilterDropdown, type AnalyticsQueriesState, type AnalyticsQueryDef, type AnalyticsRangeWeeks, type AnalyticsUnit, AnalyticsUnitPreference, type AnalyticsUnitPreferenceProps, BUILD_TIME, CLAUSE_META, CODEMIRROR_SINGLETON_DEPS, CONTENT_SOURCES, type ChartShape, type ClauseMeta, ClausePopover, type ClauseSuggestions, type ClauseType, ComposerRegistry, type CustomSlotDefinition, type CustomSlotEditorProps, CustomSlotPopover, DEFAULT_ANALYTICS_UNIT, DEFAULT_DIAGNOSTICS_DEBOUNCE_MS, DashboardTokenControls, type DashboardTokenControlsProps, DashboardView, type DashboardViewProps, type DateRange, type ExtractedQuery, GIT_SHA, GROUPBY_OPTIONS, GoalRings, type GoalRingsProps, METRIC_OPTIONS, MULTI_VALUE_TYPES, type MergedPoint, ProposedMetricBadge, QueryBlockView, type QueryBlockViewProps, type QueryClause, QueryExecutor, QueryValue, type QueryValueProps, ROLLUP_OPTIONS, RangeSelector, type RangeSelectorProps, RowsResultsChrome, type RowsResultsChromeProps, RowsTable, type RowsTableProps, SEMVER, SERIES_COLORS, SOURCE_OPTIONS, SUGGESTION_BINDINGS, StackedBar, type StackedBarProps, type StorageLike, type SuggestionBinding, type SuggestionCachePolicy, type SuggestionItem, TIME_OPTIONS, TokenSlotPill, type TokenSlotPillProps, TopList, type TopListProps, UNIT_OPTIONS, VERSION, WHERE_AGGREGATORS, WHERE_METRICS, WHERE_OPERATORS, WidgetChart, type WidgetChartProps, WidgetFrame, type WidgetFrameProps, WidgetProblemBadge, type WqlAggregateSummary, WqlBars, type WqlBarsProps, WqlComposer, type WqlComposerProps, type WqlDiagnostics, WqlDiagnosticsStrip, type WqlDiagnosticsStripProps, WqlEmptyState, type WqlEmptyStateProps, type WqlExecutor, type WqlFindSummary, WqlQueryInspectorModal, type WqlQueryInspectorModalProps, type WqlStageCounts, WqlTable, type WqlTableProps, WqlTimeseries, type WqlTimeseriesProps, type WqlValidationState, ZoneDistribution, type ZoneDistributionProps, blockTypesFromBlocks, catalogIdsFromBlocks, clauseToWql, clauseValue, clausesToWql, cn, compactNumber, composerRegistry, dateRangeSlot, defaultClauses, defaultMetricsClauses, diagnoseClauses, extractBlockQueries, formatTimestamp, getClauseMeta, getDashboardEffectiveUnit, getEffectiveAnalyticsUnit, getSuggestionBinding, hashCode, invalidateSuggestions, loadSuggestions, mergeSeries, mergeTagSuggestions, patchBlockQuery, pivotClauses, readSessionRpe, readStoredUnit, setMetricClause, setSuggestionBinding, sourcePlane, summarizeAggregate, summarizeFind, tagsFromStaticBlocks, tooltipTimestamp, useAnalyticsQueries, useAnalyticsUnitPreference, useChartShape, useComposerSlots, useSuggestions, useWqlStageCounts, wqlToClauses };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { Q as QueryExecutor } from './index-BZqjX-eA.js';
|
|
2
|
+
export { B as ButtonAction, C as CursorFocusState, D as DefaultFrontmatterWidget, E as EditorDialect, a as EditorPresetOptions, b as EditorSection, c as EditorSectionSubtype, d as EditorSectionType, e as EmbedType, G as GeometryListener, N as NavigationHook, O as OverlayAction, f as QueryBlockPreviewOptions, R as RuntimePanelEntry, S as SectionRect, g as SectionState, W as WidgetConfig, h as WidgetProps, i as WidgetRegistry, j as activeCursorSection, k as addRuntimePanel, l as blockContentId, m as configureOverlayActions, n as cursorFocusExtension, o as dispatchAddRuntimePanel, p as dispatchExpandRuntimePanel, q as dispatchGutterHighlights, r as dispatchRemoveRuntimePanel, s as editingWidgetsField, t as editorPreset, u as editorTheme, v as embedPreviewDecorations, w as expandRuntimePanel, x as fenceCompletion, y as findQueryBlockSection, z as findWorkoutErrors, A as forceSectionParse, F as frontmatterPreview, H as frontmatterPreviewField, I as getCursorFocusState, J as getOverlayActions, K as gutterHighlightsField, L as gutterUnified, M as handleFenceAutoWrap, P as inlineButtonDecoration, T as lineIdsExtension, U as linkOpen, V as markdownSyntaxHiding, X as markdownTablePreview, Y as navigationFacet, Z as previewDecorations, _ as queryBlockPreview, $ as removeRuntimePanel, a0 as runtimePanelField, a1 as saveBlockQuerySource, a2 as sectionAtPos, a3 as sectionField, a4 as sectionGeometry, a5 as sessionQueryInsert, a6 as sessionQueryWql, a7 as setGutterHighlights, a8 as smartIncrement, a9 as toggleWidgetEdit, aa as urlAtPos, ab as widgetBlockPreview, ac as wodAutoWrap, ad as wodAutocompletion, ae as wodEditorKeymap, af as wodLinter, ag as wodOverlayPanel, ah as workoutLintSource, ai as wrapInTimeFence } from './index-BZqjX-eA.js';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode, ComponentType } from 'react';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import { ViewPlugin, DecorationSet, ViewUpdate, EditorView, Decoration, WidgetType } from '@codemirror/view';
|
|
9
|
-
import { Diagnostic } from '@codemirror/lint';
|
|
10
|
-
import { CompletionContext, CompletionResult } from '@codemirror/autocomplete';
|
|
5
|
+
import { QueryResult, DashboardToken, DashboardDocument, DashboardWidget, Series, RowsQueryResult, RowsRun, ParsedQuery, ParsedFindQuery, ParsedRowsQuery, FindQueryResult } from '@bitcobblers/wod-wiki-wql';
|
|
6
|
+
export { FindOptions, FindQueryResult, ParsedFindQuery, ParsedQuery, ParsedRowsQuery, QueryOptions, QueryResult, RowsQueryResult, RowsRun } from '@bitcobblers/wod-wiki-wql';
|
|
7
|
+
import { Segment, StoredOutputStatement, BlockIndexRow } from '@bitcobblers/wod-wiki-core';
|
|
11
8
|
import { ClassValue } from 'clsx';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
runRows(parsed: ParsedRowsQuery, options?: {
|
|
17
|
-
anchorNow?: number;
|
|
18
|
-
}): Promise<RowsQueryResult>;
|
|
19
|
-
run?(parsed: ParsedQuery, options?: QueryOptions): Promise<QueryResult>;
|
|
20
|
-
}
|
|
9
|
+
import '@codemirror/state';
|
|
10
|
+
import '@codemirror/view';
|
|
11
|
+
import '@codemirror/lint';
|
|
12
|
+
import '@codemirror/autocomplete';
|
|
21
13
|
|
|
22
14
|
interface StorageLike {
|
|
23
15
|
getItem(key: string): string | null;
|
|
@@ -644,222 +636,6 @@ interface WqlDiagnosticsStripProps {
|
|
|
644
636
|
}
|
|
645
637
|
declare function WqlDiagnosticsStrip({ diagnostics, offendingLabel, stages, actions, className, }: WqlDiagnosticsStripProps): react.JSX.Element;
|
|
646
638
|
|
|
647
|
-
declare function editorTheme(isDark: boolean): Extension;
|
|
648
|
-
|
|
649
|
-
/**
|
|
650
|
-
* Extension that adds ID attributes to line elements in the editor.
|
|
651
|
-
*/
|
|
652
|
-
declare const lineIdsExtension: ViewPlugin<{
|
|
653
|
-
decorations: DecorationSet;
|
|
654
|
-
update(update: ViewUpdate): void;
|
|
655
|
-
getDecorations(view: EditorView): _codemirror_state.RangeSet<Decoration>;
|
|
656
|
-
}, undefined>;
|
|
657
|
-
|
|
658
|
-
type NavigationHook = (url: string, view: EditorView) => void;
|
|
659
|
-
declare const navigationFacet: Facet<NavigationHook, NavigationHook | null>;
|
|
660
|
-
declare function urlAtPos(view: EditorView, pos: number): string | null;
|
|
661
|
-
declare const linkOpen: Extension;
|
|
662
|
-
|
|
663
|
-
declare function findWorkoutErrors(content: string, offsetInDoc: number): Diagnostic[];
|
|
664
|
-
declare function workoutLintSource(view: EditorView): Diagnostic[];
|
|
665
|
-
declare const wodLinter: _codemirror_state.Extension;
|
|
666
|
-
|
|
667
|
-
declare function fenceCompletion(context: CompletionContext): CompletionResult | null;
|
|
668
|
-
declare function wrapInTimeFence(view: EditorView): boolean;
|
|
669
|
-
declare function handleFenceAutoWrap(event: InputEvent, view: EditorView): boolean;
|
|
670
|
-
declare const wodAutoWrap: Extension;
|
|
671
|
-
declare const wodEditorKeymap: Extension;
|
|
672
|
-
declare const wodAutocompletion: Extension;
|
|
673
|
-
|
|
674
|
-
type EditorDialect = "time" | "log";
|
|
675
|
-
type EditorSectionType = "markdown" | "time" | "log" | "frontmatter" | "code" | "widget" | "embed" | "query";
|
|
676
|
-
type EditorSectionSubtype = "heading" | "paragraph" | "list" | "blockquote" | "table" | "unknown";
|
|
677
|
-
type EmbedType = "image" | "link" | "youtube";
|
|
678
|
-
interface EditorSection {
|
|
679
|
-
id: string;
|
|
680
|
-
type: EditorSectionType;
|
|
681
|
-
subtype?: EditorSectionSubtype;
|
|
682
|
-
from: number;
|
|
683
|
-
to: number;
|
|
684
|
-
startLine: number;
|
|
685
|
-
endLine: number;
|
|
686
|
-
contentFrom?: number;
|
|
687
|
-
contentTo?: number;
|
|
688
|
-
sport?: string;
|
|
689
|
-
widgetName?: string;
|
|
690
|
-
contentId?: string;
|
|
691
|
-
queryType?: string;
|
|
692
|
-
queryError?: string;
|
|
693
|
-
embed?: {
|
|
694
|
-
type: EmbedType;
|
|
695
|
-
url: string;
|
|
696
|
-
label: string;
|
|
697
|
-
videoId?: string;
|
|
698
|
-
height?: number;
|
|
699
|
-
};
|
|
700
|
-
}
|
|
701
|
-
interface SectionState {
|
|
702
|
-
sections: EditorSection[];
|
|
703
|
-
}
|
|
704
|
-
declare const forceSectionParse: _codemirror_state.StateEffectType<null>;
|
|
705
|
-
declare function blockContentId(content: string): string;
|
|
706
|
-
declare const sectionField: StateField<SectionState>;
|
|
707
|
-
declare function sectionAtPos(state: EditorState, pos: number): EditorSection | null;
|
|
708
|
-
declare function activeCursorSection(state: EditorState): EditorSection | null;
|
|
709
|
-
|
|
710
|
-
interface SectionRect {
|
|
711
|
-
sectionId: string;
|
|
712
|
-
top: number;
|
|
713
|
-
height: number;
|
|
714
|
-
type: EditorSection["type"];
|
|
715
|
-
subtype?: EditorSection["subtype"];
|
|
716
|
-
widgetName?: string;
|
|
717
|
-
}
|
|
718
|
-
type GeometryListener = (rects: SectionRect[], docVersion: number) => void;
|
|
719
|
-
declare class SectionGeometryPlugin {
|
|
720
|
-
private view;
|
|
721
|
-
rects: SectionRect[];
|
|
722
|
-
docVersion: number;
|
|
723
|
-
private listeners;
|
|
724
|
-
constructor(view: EditorView);
|
|
725
|
-
update(update: ViewUpdate): void;
|
|
726
|
-
addListener(fn: GeometryListener): () => void;
|
|
727
|
-
private measure;
|
|
728
|
-
private notify;
|
|
729
|
-
destroy(): void;
|
|
730
|
-
}
|
|
731
|
-
declare const sectionGeometry: ViewPlugin<SectionGeometryPlugin, undefined>;
|
|
732
|
-
|
|
733
|
-
declare const previewDecorations: Extension;
|
|
734
|
-
|
|
735
|
-
declare const embedPreviewDecorations: Extension;
|
|
736
|
-
|
|
737
|
-
declare class DefaultFrontmatterWidget extends WidgetType {
|
|
738
|
-
readonly props: Record<string, string>;
|
|
739
|
-
constructor(props: Record<string, string>);
|
|
740
|
-
eq(other: DefaultFrontmatterWidget): boolean;
|
|
741
|
-
toDOM(): HTMLElement;
|
|
742
|
-
}
|
|
743
|
-
declare const frontmatterPreviewField: StateField<DecorationSet>;
|
|
744
|
-
declare const frontmatterPreview: Extension;
|
|
745
|
-
|
|
746
|
-
declare function markdownSyntaxHiding(): Extension;
|
|
747
|
-
|
|
748
|
-
declare const markdownTablePreview: Extension;
|
|
749
|
-
|
|
750
|
-
declare const setGutterHighlights: _codemirror_state.StateEffectType<Set<number>>;
|
|
751
|
-
declare const gutterHighlightsField: StateField<Set<number>>;
|
|
752
|
-
declare const gutterUnified: (_codemirror_state.Extension | StateField<Set<number>>)[];
|
|
753
|
-
declare function dispatchGutterHighlights(view: EditorView, lineNumbers: number[]): void;
|
|
754
|
-
|
|
755
|
-
type ButtonAction = (action: string, params: Record<string, string>) => void;
|
|
756
|
-
declare function inlineButtonDecoration(onAction: ButtonAction): Extension;
|
|
757
|
-
|
|
758
|
-
interface RuntimePanelEntry {
|
|
759
|
-
sectionId: string;
|
|
760
|
-
block: ScriptBlock;
|
|
761
|
-
afterPos: number;
|
|
762
|
-
expanded?: boolean;
|
|
763
|
-
}
|
|
764
|
-
declare const addRuntimePanel: _codemirror_state.StateEffectType<RuntimePanelEntry>;
|
|
765
|
-
declare const removeRuntimePanel: _codemirror_state.StateEffectType<{
|
|
766
|
-
sectionId: string;
|
|
767
|
-
}>;
|
|
768
|
-
declare const expandRuntimePanel: _codemirror_state.StateEffectType<{
|
|
769
|
-
sectionId: string;
|
|
770
|
-
expanded: boolean;
|
|
771
|
-
}>;
|
|
772
|
-
declare const runtimePanelField: StateField<Map<string, RuntimePanelEntry>>;
|
|
773
|
-
declare function dispatchAddRuntimePanel(view: EditorView, sectionId: string, block: ScriptBlock, afterPos: number, expanded?: boolean): void;
|
|
774
|
-
declare function dispatchRemoveRuntimePanel(view: EditorView, sectionId: string): void;
|
|
775
|
-
declare function dispatchExpandRuntimePanel(view: EditorView, sectionId: string, expanded: boolean): void;
|
|
776
|
-
|
|
777
|
-
declare function sessionQueryWql(resultId: string): string;
|
|
778
|
-
declare function sessionQueryInsert(state: EditorState, blockId: string, resultId: string, runBlock?: {
|
|
779
|
-
id?: string;
|
|
780
|
-
contentId?: string;
|
|
781
|
-
}): {
|
|
782
|
-
from: number;
|
|
783
|
-
insert: string;
|
|
784
|
-
} | null;
|
|
785
|
-
|
|
786
|
-
declare const smartIncrement: Extension;
|
|
787
|
-
|
|
788
|
-
interface OverlayAction {
|
|
789
|
-
label: string;
|
|
790
|
-
icon: string;
|
|
791
|
-
action: (view: EditorView, section: EditorSection) => void;
|
|
792
|
-
}
|
|
793
|
-
declare function configureOverlayActions(actions: OverlayAction[]): void;
|
|
794
|
-
declare function getOverlayActions(): OverlayAction[];
|
|
795
|
-
declare const wodOverlayPanel: Extension;
|
|
796
|
-
|
|
797
|
-
interface CursorFocusState {
|
|
798
|
-
sectionId: string;
|
|
799
|
-
section: EditorSection;
|
|
800
|
-
lineFrom: number;
|
|
801
|
-
docLine: number;
|
|
802
|
-
statementIndex: number;
|
|
803
|
-
statement: ICodeStatement;
|
|
804
|
-
focusedMetric: IMetric | null;
|
|
805
|
-
focusedMetricIndex: number;
|
|
806
|
-
allStatements: ICodeStatement[];
|
|
807
|
-
}
|
|
808
|
-
declare function getCursorFocusState(state: EditorState): CursorFocusState | null;
|
|
809
|
-
declare const cursorFocusExtension: Extension;
|
|
810
|
-
|
|
811
|
-
interface QueryBlockPreviewOptions {
|
|
812
|
-
executor?: QueryExecutor;
|
|
813
|
-
onResultSaved?: (callback: () => void) => (() => void) | void;
|
|
814
|
-
readOnly?: boolean;
|
|
815
|
-
onSaveQuery?: (sectionId: string, nextQuery: string) => void;
|
|
816
|
-
}
|
|
817
|
-
declare function saveBlockQuerySource(view: EditorView, sectionId: string, newQuery: string, queryIndex?: number): {
|
|
818
|
-
ok: boolean;
|
|
819
|
-
patchedContent?: string;
|
|
820
|
-
message?: string;
|
|
821
|
-
};
|
|
822
|
-
declare function findQueryBlockSection(view: EditorView, sectionId: string): EditorSection | null;
|
|
823
|
-
declare function queryBlockPreview(options?: QueryBlockPreviewOptions): Extension;
|
|
824
|
-
|
|
825
|
-
/** Parsed JSON object passed into a widget component. */
|
|
826
|
-
type WidgetConfig = Record<string, unknown>;
|
|
827
|
-
/** Props passed to every registered widget component. */
|
|
828
|
-
interface WidgetProps {
|
|
829
|
-
/** Parsed JSON object from the fenced widget body. */
|
|
830
|
-
config: WidgetConfig;
|
|
831
|
-
/** Exact source text between the opening and closing fences. */
|
|
832
|
-
rawContent: string;
|
|
833
|
-
/** Stable section identifier generated by section-state.ts. */
|
|
834
|
-
sectionId: string;
|
|
835
|
-
}
|
|
836
|
-
/** Registry of widget names to React components. */
|
|
837
|
-
type WidgetRegistry = Map<string, react.ComponentType<WidgetProps>>;
|
|
838
|
-
/** Effect to toggle edit mode for a specific widget block */
|
|
839
|
-
declare const toggleWidgetEdit: _codemirror_state.StateEffectType<{
|
|
840
|
-
sectionId: string;
|
|
841
|
-
editing: boolean;
|
|
842
|
-
}>;
|
|
843
|
-
/** StateField to track which widgets are currently being edited as raw text */
|
|
844
|
-
declare const editingWidgetsField: StateField<Set<string>>;
|
|
845
|
-
/**
|
|
846
|
-
* Create a CM6 Extension that replaces widget fenced blocks with React components.
|
|
847
|
-
* Block decorations MUST come from a StateField (not a ViewPlugin) per CM6 constraints.
|
|
848
|
-
*/
|
|
849
|
-
declare function widgetBlockPreview(registry: WidgetRegistry): Extension;
|
|
850
|
-
|
|
851
|
-
interface EditorPresetOptions {
|
|
852
|
-
dialect?: 'wod' | 'whiteboard' | 'wql' | 'markdown' | string;
|
|
853
|
-
isDark?: boolean;
|
|
854
|
-
readOnly?: boolean;
|
|
855
|
-
lineNumbers?: boolean;
|
|
856
|
-
lineWrapping?: boolean;
|
|
857
|
-
executor?: QueryExecutor;
|
|
858
|
-
onResultSaved?: (callback: () => void) => (() => void) | void;
|
|
859
|
-
extensions?: Extension[];
|
|
860
|
-
}
|
|
861
|
-
declare function editorPreset(optionsOrDialect?: string | EditorPresetOptions): Extension[];
|
|
862
|
-
|
|
863
639
|
declare function cn(...inputs: ClassValue[]): string;
|
|
864
640
|
declare function hashCode(str: string): number;
|
|
865
641
|
|
|
@@ -883,13 +659,13 @@ declare function patchBlockQuery(blockContent: string, newQuery: string, queryIn
|
|
|
883
659
|
* Auto-generated build version metadata.
|
|
884
660
|
* Do not edit directly; updated by scripts/stamp-version.ts
|
|
885
661
|
*/
|
|
886
|
-
declare const VERSION = "0.
|
|
887
|
-
declare const GIT_SHA = "
|
|
888
|
-
declare const BUILD_TIME = "2026-08-
|
|
662
|
+
declare const VERSION = "0.5.28";
|
|
663
|
+
declare const GIT_SHA = "8aaaba1";
|
|
664
|
+
declare const BUILD_TIME = "2026-08-18T20:49:38.789Z";
|
|
889
665
|
declare const SEMVER: {
|
|
890
|
-
readonly version: "0.
|
|
891
|
-
readonly gitSha: "
|
|
892
|
-
readonly buildTime: "2026-08-
|
|
666
|
+
readonly version: "0.5.28";
|
|
667
|
+
readonly gitSha: "8aaaba1";
|
|
668
|
+
readonly buildTime: "2026-08-18T20:49:38.789Z";
|
|
893
669
|
};
|
|
894
670
|
|
|
895
|
-
export { AGG_OPTIONS, ANALYTICS_UNIT_STORAGE_KEY, AddCalcDropdown, AddFilterDropdown, type AnalyticsQueriesState, type AnalyticsQueryDef, type AnalyticsRangeWeeks, type AnalyticsUnit, AnalyticsUnitPreference, type AnalyticsUnitPreferenceProps, BUILD_TIME,
|
|
671
|
+
export { AGG_OPTIONS, ANALYTICS_UNIT_STORAGE_KEY, AddCalcDropdown, AddFilterDropdown, type AnalyticsQueriesState, type AnalyticsQueryDef, type AnalyticsRangeWeeks, type AnalyticsUnit, AnalyticsUnitPreference, type AnalyticsUnitPreferenceProps, BUILD_TIME, CLAUSE_META, CODEMIRROR_SINGLETON_DEPS, CONTENT_SOURCES, type ChartShape, type ClauseMeta, ClausePopover, type ClauseSuggestions, type ClauseType, ComposerRegistry, type CustomSlotDefinition, type CustomSlotEditorProps, CustomSlotPopover, DEFAULT_ANALYTICS_UNIT, DEFAULT_DIAGNOSTICS_DEBOUNCE_MS, DashboardTokenControls, type DashboardTokenControlsProps, DashboardView, type DashboardViewProps, type DateRange, type ExtractedQuery, GIT_SHA, GROUPBY_OPTIONS, GoalRings, type GoalRingsProps, METRIC_OPTIONS, MULTI_VALUE_TYPES, type MergedPoint, ProposedMetricBadge, QueryBlockView, type QueryBlockViewProps, type QueryClause, QueryExecutor, QueryValue, type QueryValueProps, ROLLUP_OPTIONS, RangeSelector, type RangeSelectorProps, RowsResultsChrome, type RowsResultsChromeProps, RowsTable, type RowsTableProps, SEMVER, SERIES_COLORS, SOURCE_OPTIONS, SUGGESTION_BINDINGS, StackedBar, type StackedBarProps, type StorageLike, type SuggestionBinding, type SuggestionCachePolicy, type SuggestionItem, TIME_OPTIONS, TokenSlotPill, type TokenSlotPillProps, TopList, type TopListProps, UNIT_OPTIONS, VERSION, WHERE_AGGREGATORS, WHERE_METRICS, WHERE_OPERATORS, WidgetChart, type WidgetChartProps, WidgetFrame, type WidgetFrameProps, WidgetProblemBadge, type WqlAggregateSummary, WqlBars, type WqlBarsProps, WqlComposer, type WqlComposerProps, type WqlDiagnostics, WqlDiagnosticsStrip, type WqlDiagnosticsStripProps, WqlEmptyState, type WqlEmptyStateProps, type WqlExecutor, type WqlFindSummary, WqlQueryInspectorModal, type WqlQueryInspectorModalProps, type WqlStageCounts, WqlTable, type WqlTableProps, WqlTimeseries, type WqlTimeseriesProps, type WqlValidationState, ZoneDistribution, type ZoneDistributionProps, blockTypesFromBlocks, catalogIdsFromBlocks, clauseToWql, clauseValue, clausesToWql, cn, compactNumber, composerRegistry, dateRangeSlot, defaultClauses, defaultMetricsClauses, diagnoseClauses, extractBlockQueries, formatTimestamp, getClauseMeta, getDashboardEffectiveUnit, getEffectiveAnalyticsUnit, getSuggestionBinding, hashCode, invalidateSuggestions, loadSuggestions, mergeSeries, mergeTagSuggestions, patchBlockQuery, pivotClauses, readSessionRpe, readStoredUnit, setMetricClause, setSuggestionBinding, sourcePlane, summarizeAggregate, summarizeFind, tagsFromStaticBlocks, tooltipTimestamp, useAnalyticsQueries, useAnalyticsUnitPreference, useChartShape, useComposerSlots, useSuggestions, useWqlStageCounts, wqlToClauses };
|