@bitcobblers/wod-wiki-ui 0.50.2187 → 0.50.2188
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-DKPPJXUH.mjs → chunk-UAIJTD74.mjs} +4 -73
- package/dist/chunk-UAIJTD74.mjs.map +1 -0
- package/dist/extensions/index.cjs +1 -70
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.mjs +1 -1
- package/dist/index.cjs +7 -76
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -0
- package/package.json +4 -4
- package/dist/chunk-DKPPJXUH.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ViewPlugin, Decoration, hoverTooltip, EditorView, keymap, gutter,
|
|
1
|
+
import { ViewPlugin, Decoration, hoverTooltip, EditorView, keymap, gutter, GutterMarker, WidgetType, lineNumbers, highlightActiveLineGutter, highlightSpecialChars, drawSelection, dropCursor, highlightActiveLine, placeholder } from '@codemirror/view';
|
|
2
2
|
import { HighlightStyle, syntaxTree, sublanguageProp, LRLanguage, indentNodeProp, flatIndent, continuedIndent, delimitedIndent, foldNodeProp, foldInside, defineLanguageFacet, syntaxHighlighting, LanguageSupport, foldService, Language, indentUnit, bracketMatchingHandle, languageDataProp, LanguageDescription, ParseContext } from '@codemirror/language';
|
|
3
3
|
import { tags, styleTags, Tag as Tag$1 } from '@lezer/highlight';
|
|
4
4
|
import { RangeSetBuilder, Facet, StateEffect, StateField, Prec, EditorState, EditorSelection, countColumn } from '@codemirror/state';
|
|
@@ -933,40 +933,6 @@ var SectionGeometryPlugin = class {
|
|
|
933
933
|
}
|
|
934
934
|
};
|
|
935
935
|
var sectionGeometry = ViewPlugin.fromClass(SectionGeometryPlugin);
|
|
936
|
-
var WorkoutFooterWidget = class extends WidgetType {
|
|
937
|
-
eq(_other) {
|
|
938
|
-
return true;
|
|
939
|
-
}
|
|
940
|
-
toDOM() {
|
|
941
|
-
const el = document.createElement("div");
|
|
942
|
-
el.className = "cm-wod-block-footer";
|
|
943
|
-
return el;
|
|
944
|
-
}
|
|
945
|
-
get estimatedHeight() {
|
|
946
|
-
return 28;
|
|
947
|
-
}
|
|
948
|
-
get block() {
|
|
949
|
-
return true;
|
|
950
|
-
}
|
|
951
|
-
};
|
|
952
|
-
var WorkoutInsertSpacerWidget = class extends WidgetType {
|
|
953
|
-
eq(_other) {
|
|
954
|
-
return true;
|
|
955
|
-
}
|
|
956
|
-
toDOM() {
|
|
957
|
-
const el = document.createElement("div");
|
|
958
|
-
el.className = "cm-wod-insert-spacer";
|
|
959
|
-
return el;
|
|
960
|
-
}
|
|
961
|
-
get estimatedHeight() {
|
|
962
|
-
return 28;
|
|
963
|
-
}
|
|
964
|
-
get block() {
|
|
965
|
-
return true;
|
|
966
|
-
}
|
|
967
|
-
};
|
|
968
|
-
var footerWidget = new WorkoutFooterWidget();
|
|
969
|
-
var insertSpacerWidget = new WorkoutInsertSpacerWidget();
|
|
970
936
|
var fenceOpenDeco = Decoration.line({
|
|
971
937
|
attributes: { class: "cm-wod-fence cm-wod-fence-open" }
|
|
972
938
|
});
|
|
@@ -979,11 +945,8 @@ var workoutInnerDeco = Decoration.line({
|
|
|
979
945
|
function buildWorkoutDecorations(state) {
|
|
980
946
|
const builder = new RangeSetBuilder();
|
|
981
947
|
const { sections } = state.field(sectionField);
|
|
982
|
-
const cursorHead = state.selection.main.head;
|
|
983
|
-
const cursorLineNum = state.doc.lineAt(cursorHead).number;
|
|
984
948
|
for (const section of sections) {
|
|
985
949
|
if (section.type !== "time" && section.type !== "log") continue;
|
|
986
|
-
const isCursorInside = cursorLineNum > section.startLine && cursorLineNum < section.endLine;
|
|
987
950
|
const startLine = state.doc.line(section.startLine);
|
|
988
951
|
const endLine = state.doc.line(section.endLine);
|
|
989
952
|
if (section.endLine <= section.startLine) {
|
|
@@ -994,20 +957,6 @@ function buildWorkoutDecorations(state) {
|
|
|
994
957
|
for (let l = section.startLine + 1; l < section.endLine; l++) {
|
|
995
958
|
const line = state.doc.line(l);
|
|
996
959
|
builder.add(line.from, line.from, workoutInnerDeco);
|
|
997
|
-
if (isCursorInside && l === cursorLineNum) {
|
|
998
|
-
builder.add(
|
|
999
|
-
line.to,
|
|
1000
|
-
line.to,
|
|
1001
|
-
Decoration.widget({ widget: insertSpacerWidget, block: true, side: 1 })
|
|
1002
|
-
);
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
if (!isCursorInside) {
|
|
1006
|
-
builder.add(
|
|
1007
|
-
endLine.from,
|
|
1008
|
-
endLine.from,
|
|
1009
|
-
Decoration.widget({ widget: footerWidget, block: true, side: -1 })
|
|
1010
|
-
);
|
|
1011
960
|
}
|
|
1012
961
|
builder.add(endLine.from, endLine.from, fenceCloseDeco);
|
|
1013
962
|
}
|
|
@@ -1018,9 +967,7 @@ var scriptBlockDecoField = StateField.define({
|
|
|
1018
967
|
return buildWorkoutDecorations(state);
|
|
1019
968
|
},
|
|
1020
969
|
update(deco, tr) {
|
|
1021
|
-
if (tr.docChanged
|
|
1022
|
-
return buildWorkoutDecorations(tr.state);
|
|
1023
|
-
}
|
|
970
|
+
if (tr.docChanged) return buildWorkoutDecorations(tr.state);
|
|
1024
971
|
return deco;
|
|
1025
972
|
},
|
|
1026
973
|
provide: (f) => EditorView.decorations.from(f)
|
|
@@ -1062,22 +1009,6 @@ var scriptBlockBaseTheme = EditorView.baseTheme({
|
|
|
1062
1009
|
borderLeft: "1px solid hsl(var(--border) / 0.5)",
|
|
1063
1010
|
borderRight: "1px solid hsl(var(--border) / 0.5)",
|
|
1064
1011
|
boxSizing: "border-box"
|
|
1065
|
-
},
|
|
1066
|
-
".cm-wod-block-footer": {
|
|
1067
|
-
height: "28px",
|
|
1068
|
-
backgroundColor: "rgba(128, 128, 128, 0.05)",
|
|
1069
|
-
borderLeft: "1px solid hsl(var(--border) / 0.5)",
|
|
1070
|
-
borderRight: "1px solid hsl(var(--border) / 0.5)",
|
|
1071
|
-
boxSizing: "border-box",
|
|
1072
|
-
pointerEvents: "none"
|
|
1073
|
-
},
|
|
1074
|
-
".cm-wod-insert-spacer": {
|
|
1075
|
-
height: "28px",
|
|
1076
|
-
backgroundColor: "rgba(128, 128, 128, 0.05)",
|
|
1077
|
-
borderLeft: "1px solid hsl(var(--border) / 0.5)",
|
|
1078
|
-
borderRight: "1px solid hsl(var(--border) / 0.5)",
|
|
1079
|
-
boxSizing: "border-box",
|
|
1080
|
-
pointerEvents: "none"
|
|
1081
1012
|
}
|
|
1082
1013
|
});
|
|
1083
1014
|
var previewDecorations = [
|
|
@@ -13681,5 +13612,5 @@ function editorPreset(optionsOrDialect = "markdown") {
|
|
|
13681
13612
|
}
|
|
13682
13613
|
|
|
13683
13614
|
export { AGG_OPTIONS, CANONICAL_BLOCK_TYPES, CLAUSE_META, ComposerRegistry, DEFAULT_DIAGNOSTICS_DEBOUNCE_MS, DEFAULT_OUTPUT_FILTERS, DEFAULT_PRIMARY_FILTER, DefaultFrontmatterWidget, EditorDialog, GROUPBY_OPTIONS, GoalRings, KIND_OPTIONS, METRIC_OPTIONS, MULTI_VALUE_TYPES, MetricBadge, OUTPUT_TYPE_CLASS, OUTPUT_TYPE_DOT, OutputFilterPills, OutputStatementsTable, PLANE_OPTIONS, ProposedMetricBadge, QueryBlockView, QueryValue, ROLLUP_OPTIONS, RowsResultsChrome, RowsTable, SERIES_COLORS, SOURCE_OPTIONS, SUGGESTION_BINDINGS, StackedBar, TARGET_OPTIONS, TIME_OPTIONS, TONE_CLASS, TokenSlotPill, TopList, UNIT_OPTIONS, WHERE_AGGREGATORS, WHERE_METRICS, WidgetChart, WidgetProblemBadge, WqlBars, WqlComposer, WqlDiagnosticsStrip, WqlEmptyState, WqlQueryInspectorModal, WqlTable, WqlTimeseries, ZoneDistribution, activeCursorSection, addRuntimePanel, autocompleteTooltipTheme, blockTypesFromBlocks, canonicalSuggestionItems, cn, compactNumber, composerRegistry, configureOverlayActions, cursorFocusExtension, customCompletionSources, dateRangeSlot, dispatchAddRuntimePanel, dispatchExpandRuntimePanel, dispatchGutterHighlights, dispatchRemoveRuntimePanel, editQueryClause, editingWidgetsField, editorPreset, editorTheme, embedPreviewDecorations, expandRuntimePanel, extractBlockQueries, extractMetricsByCategory, fenceCompletion, findQueryBlockSection, findWorkoutErrors, forceSectionParse, formatClockTime, formatMMSS, formatTimestamp, frontmatterDetailed, frontmatterPreview, frontmatterPreviewField, frontmatterReferenceIndex, frontmatterSource, frontmatterSuggestions, frontmatterVisibility, getClauseMeta, getCursorFocusState, getOverlayActions, getSuggestionBinding, gutterHighlightsField, gutterUnified, handleFenceAutoWrap, hashCode, inlineButtonDecoration, invalidateSuggestions, lineIdsExtension, linkOpen, linkPreview, loadSuggestions, markdownSyntaxHiding, markdownTablePreview, matchFilterTypeahead, mergeSeries, mergeSuggestionItems, mergeTagSuggestions, navigationFacet, nestedCompletion, nestedCompletionOptions, normalizeOutputFilter, notebookSlugsFromBlocks, patchBlockQuery, presentBadges, previewDecorations, queryBlockPreview, readSessionRpe, referenceIndexReload, registeredSectionWidgets, removeRuntimePanel, resolveCodeLanguage, resolveQueryDraft, runtimePanelField, saveBlockQuerySource, sectionAtPos, sectionField, sectionGeometry, sectionIdentity, sectionIdentityHistory, sectionMove, sectionRestore, sectionSaved, sessionQueryInsert, sessionQueryWql, setFrontmatterDetailed, setFrontmatterSource, setGutterHighlights, setSuggestionBinding, smartIncrement, summarizeAggregate, summarizeFind, summarizePipeline, tagsFromStaticBlocks, toChartResult, toggleWidgetEdit, tooltipTimestamp, urlAtPos, useChartShape, useComposerSlots, useSuggestions, useVisualViewportRect, useWqlStageCounts, widgetBlockPreview, wodAutoWrap, wodAutocompletion, wodCompletionSource, wodEditorKeymap, wodLinter, wodOverlayPanel, workoutLintSource, wqlToPills, wrapInTimeFence };
|
|
13684
|
-
//# sourceMappingURL=chunk-
|
|
13685
|
-
//# sourceMappingURL=chunk-
|
|
13615
|
+
//# sourceMappingURL=chunk-UAIJTD74.mjs.map
|
|
13616
|
+
//# sourceMappingURL=chunk-UAIJTD74.mjs.map
|