@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
|
@@ -578,7 +578,7 @@ var sectionIdentityHistory = commands.invertedEffects.of((tr) => {
|
|
|
578
578
|
return value && tr.docChanged ? [restoreHistoryIdentity.of({ rawContent: value.rawContent, blocks: toEditorBlocks(value) })] : [];
|
|
579
579
|
});
|
|
580
580
|
function sectionAtPos(state, pos) {
|
|
581
|
-
return state.field(sectionField)
|
|
581
|
+
return state.field(sectionField, false)?.sections.find((section) => pos >= section.from && pos <= section.to) ?? null;
|
|
582
582
|
}
|
|
583
583
|
function activeCursorSection(state) {
|
|
584
584
|
return sectionAtPos(state, state.selection.main.head);
|
|
@@ -673,6 +673,8 @@ function fenceCompletion(context) {
|
|
|
673
673
|
}
|
|
674
674
|
function wrapInTimeFence(view) {
|
|
675
675
|
if (view.state.readOnly) return false;
|
|
676
|
+
const section = activeCursorSection(view.state);
|
|
677
|
+
if (section && section.type !== "markdown") return false;
|
|
676
678
|
const { from, to } = view.state.selection.main;
|
|
677
679
|
const selected = view.state.doc.sliceString(from, to);
|
|
678
680
|
if (!selected) {
|
|
@@ -696,6 +698,8 @@ ${selected}
|
|
|
696
698
|
function handleFenceAutoWrap(event, view) {
|
|
697
699
|
if (view.state.readOnly) return false;
|
|
698
700
|
if (event.data !== "`") return false;
|
|
701
|
+
const section = activeCursorSection(view.state);
|
|
702
|
+
if (section && section.type !== "markdown") return false;
|
|
699
703
|
const { from, to } = view.state.selection.main;
|
|
700
704
|
if (from === to) return false;
|
|
701
705
|
const selected = view.state.doc.sliceString(from, to);
|
|
@@ -720,32 +724,152 @@ var wodEditorKeymap = view.keymap.of([
|
|
|
720
724
|
run: wrapInTimeFence
|
|
721
725
|
}
|
|
722
726
|
]);
|
|
723
|
-
var customCompletionSources =
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
727
|
+
var customCompletionSources = state.Facet.define({
|
|
728
|
+
combine: (sources) => sources
|
|
729
|
+
});
|
|
730
|
+
var nestedCompletionOptions = state.Facet.define({
|
|
731
|
+
combine: (values2) => values2[values2.length - 1]
|
|
732
|
+
});
|
|
733
|
+
var sharedWqlSource;
|
|
734
|
+
var nestedWqlSources = /* @__PURE__ */ new WeakMap();
|
|
735
|
+
function nestedWqlSource(options) {
|
|
736
|
+
if (!options) return sharedWqlSource ??= wodWikiWql.wqlCompletionSource({});
|
|
737
|
+
let source = nestedWqlSources.get(options);
|
|
738
|
+
if (!source) {
|
|
739
|
+
source = wodWikiWql.wqlCompletionSource(options);
|
|
740
|
+
nestedWqlSources.set(options, source);
|
|
741
|
+
}
|
|
742
|
+
return source;
|
|
743
|
+
}
|
|
744
|
+
var sharedWbPerSport;
|
|
745
|
+
var nestedWbSources = /* @__PURE__ */ new WeakMap();
|
|
746
|
+
function nestedWhiteboardScriptSource(options, sport) {
|
|
747
|
+
let perSport;
|
|
748
|
+
if (!options) perSport = sharedWbPerSport ??= /* @__PURE__ */ new Map();
|
|
749
|
+
else {
|
|
750
|
+
perSport = nestedWbSources.get(options) ?? /* @__PURE__ */ new Map();
|
|
751
|
+
nestedWbSources.set(options, perSport);
|
|
752
|
+
}
|
|
753
|
+
const key = sport ?? "";
|
|
754
|
+
let source = perSport.get(key);
|
|
755
|
+
if (!source) {
|
|
756
|
+
source = wodWikiLang.whiteboardScriptCompletionSource({ ...options ?? {}, ...sport ? { sport } : {} });
|
|
757
|
+
perSport.set(key, source);
|
|
758
|
+
}
|
|
759
|
+
return source;
|
|
760
|
+
}
|
|
761
|
+
function wqlFenceAt(state, pos) {
|
|
762
|
+
return /^`{3,}wql\b/i.test(state.doc.lineAt(pos).text.trim());
|
|
763
|
+
}
|
|
764
|
+
function nestedCompletion(context) {
|
|
765
|
+
const section = sectionAtPos(context.state, context.pos);
|
|
766
|
+
const { contentFrom, contentTo } = section ?? {};
|
|
767
|
+
if (!section || contentFrom === void 0 || contentTo === void 0) return null;
|
|
768
|
+
const whiteboard = section.type === "time" || section.type === "log";
|
|
769
|
+
const query = section.type === "query" || wqlFenceAt(context.state, section.from);
|
|
770
|
+
if (!whiteboard && !query) return null;
|
|
771
|
+
if (context.pos < contentFrom || context.pos > contentTo) return null;
|
|
772
|
+
const { state: state$1 } = context;
|
|
773
|
+
const selection2 = state$1.selection.main;
|
|
774
|
+
const selFrom = Math.min(Math.max(selection2.from, contentFrom), contentTo);
|
|
775
|
+
const selTo = Math.min(Math.max(selection2.to, contentFrom), contentTo);
|
|
776
|
+
const subState = state.EditorState.create({
|
|
777
|
+
doc: state$1.doc.sliceString(contentFrom, contentTo),
|
|
778
|
+
selection: state.EditorSelection.range(selFrom - contentFrom, selTo - contentFrom),
|
|
779
|
+
// Slot detection may read the Lezer tree — parse the body with its
|
|
780
|
+
// dialect language, exactly as a standalone editor's state would have it.
|
|
781
|
+
extensions: whiteboard ? wodWikiLang.whiteboardScriptLanguage : [wodWikiWql.wqlLanguage]
|
|
782
|
+
});
|
|
783
|
+
const source = whiteboard ? nestedWhiteboardScriptSource(state$1.facet(nestedCompletionOptions)?.whiteboardScript, section.sport) : nestedWqlSource(state$1.facet(nestedCompletionOptions)?.wql);
|
|
784
|
+
const result = source(
|
|
785
|
+
new autocomplete.CompletionContext(subState, context.pos - contentFrom, context.explicit)
|
|
786
|
+
);
|
|
787
|
+
const rebase = (resolved) => resolved && {
|
|
788
|
+
...resolved,
|
|
789
|
+
from: contentFrom + resolved.from,
|
|
790
|
+
...resolved.to !== void 0 ? { to: contentFrom + resolved.to } : {}
|
|
791
|
+
};
|
|
792
|
+
return result instanceof Promise ? result.then(rebase) : rebase(result);
|
|
728
793
|
}
|
|
729
|
-
function
|
|
730
|
-
const
|
|
731
|
-
|
|
732
|
-
|
|
794
|
+
async function wodCompletionSource(context) {
|
|
795
|
+
for (const source of context.state.facet(customCompletionSources)) {
|
|
796
|
+
const result = await source(context);
|
|
797
|
+
if (result) return result;
|
|
733
798
|
}
|
|
799
|
+
return fenceCompletion(context) ?? nestedCompletion(context);
|
|
734
800
|
}
|
|
735
801
|
var wodAutocompletion = autocomplete.autocompletion({
|
|
736
802
|
interactionDelay: 0,
|
|
737
803
|
activateOnCompletion: (completion) => completion.type === "property" && typeof completion.apply === "string" && completion.apply.endsWith(":\n - "),
|
|
738
804
|
override: [
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
for (const source of customCompletionSources) {
|
|
742
|
-
const res = await source(context);
|
|
743
|
-
if (res) return res;
|
|
744
|
-
}
|
|
745
|
-
return null;
|
|
746
|
-
}
|
|
805
|
+
// Explicit provider order — see wodCompletionSource.
|
|
806
|
+
wodCompletionSource
|
|
747
807
|
]
|
|
748
808
|
});
|
|
809
|
+
var autocompleteTooltipTheme = view.EditorView.theme({
|
|
810
|
+
".cm-tooltip": {
|
|
811
|
+
backgroundColor: "hsl(var(--popover))",
|
|
812
|
+
color: "hsl(var(--popover-foreground))",
|
|
813
|
+
border: "1px solid hsl(var(--border))",
|
|
814
|
+
borderRadius: "var(--radius-md)",
|
|
815
|
+
// Tailwind shadow-md (no --shadow-* token exists yet).
|
|
816
|
+
boxShadow: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
|
|
817
|
+
fontFamily: "var(--font-sans, Inter, system-ui, sans-serif)",
|
|
818
|
+
fontSize: "14px",
|
|
819
|
+
zIndex: "40"
|
|
820
|
+
},
|
|
821
|
+
".cm-tooltip-autocomplete": {
|
|
822
|
+
overflow: "hidden",
|
|
823
|
+
// Viewport clamps keep the popover usable on narrow/mobile screens.
|
|
824
|
+
minWidth: "min(18rem, calc(100vw - 2rem))",
|
|
825
|
+
maxWidth: "calc(100vw - 2rem)"
|
|
826
|
+
},
|
|
827
|
+
".cm-tooltip-autocomplete > ul": {
|
|
828
|
+
padding: "4px",
|
|
829
|
+
maxHeight: "min(45svh, 20rem)",
|
|
830
|
+
overscrollBehavior: "contain",
|
|
831
|
+
fontFamily: "inherit",
|
|
832
|
+
fontSize: "inherit"
|
|
833
|
+
},
|
|
834
|
+
".cm-tooltip-autocomplete > ul > li": {
|
|
835
|
+
display: "flex",
|
|
836
|
+
alignItems: "center",
|
|
837
|
+
gap: "8px",
|
|
838
|
+
minHeight: "40px",
|
|
839
|
+
padding: "8px 10px",
|
|
840
|
+
borderRadius: "var(--radius-sm)",
|
|
841
|
+
lineHeight: "20px"
|
|
842
|
+
},
|
|
843
|
+
".cm-tooltip-autocomplete > ul > li:hover": {
|
|
844
|
+
backgroundColor: "hsl(var(--muted) / 0.6)"
|
|
845
|
+
},
|
|
846
|
+
'.cm-tooltip-autocomplete > ul > li[aria-selected="true"]': {
|
|
847
|
+
backgroundColor: "hsl(var(--primary) / 0.15)",
|
|
848
|
+
fontWeight: "600"
|
|
849
|
+
},
|
|
850
|
+
".cm-completionLabel": {
|
|
851
|
+
fontFamily: "var(--font-mono, ui-monospace, SFMono-Regular, monospace)",
|
|
852
|
+
fontWeight: "500",
|
|
853
|
+
overflow: "hidden",
|
|
854
|
+
textOverflow: "ellipsis"
|
|
855
|
+
},
|
|
856
|
+
".cm-completionMatchedText": {
|
|
857
|
+
textDecoration: "none",
|
|
858
|
+
fontWeight: "700",
|
|
859
|
+
color: "hsl(var(--primary))"
|
|
860
|
+
},
|
|
861
|
+
".cm-completionDetail": {
|
|
862
|
+
marginLeft: "auto",
|
|
863
|
+
paddingLeft: "12px",
|
|
864
|
+
fontFamily: "var(--font-sans, Inter, system-ui, sans-serif)",
|
|
865
|
+
fontSize: "12px",
|
|
866
|
+
fontStyle: "normal",
|
|
867
|
+
color: "hsl(var(--muted-foreground))"
|
|
868
|
+
},
|
|
869
|
+
"@media (pointer: coarse)": {
|
|
870
|
+
".cm-tooltip-autocomplete > ul > li": { minHeight: "48px" }
|
|
871
|
+
}
|
|
872
|
+
});
|
|
749
873
|
var SectionGeometryPlugin = class {
|
|
750
874
|
constructor(view) {
|
|
751
875
|
this.view = view;
|
|
@@ -4634,7 +4758,7 @@ function EditorDialog({
|
|
|
4634
4758
|
const handleKeyDown = (event) => {
|
|
4635
4759
|
if (event.key === "Escape") {
|
|
4636
4760
|
event.stopPropagation();
|
|
4637
|
-
onClose();
|
|
4761
|
+
if (!event.defaultPrevented) onClose();
|
|
4638
4762
|
return;
|
|
4639
4763
|
}
|
|
4640
4764
|
if (event.key !== "Tab") return;
|
|
@@ -4790,7 +4914,11 @@ var TARGET_OPTIONS = wodWikiWql.WQL_FIND_TARGETS.map((t) => ({
|
|
|
4790
4914
|
effort: "Find registered movements and benchmarks",
|
|
4791
4915
|
session: "Find completed workout sessions",
|
|
4792
4916
|
segment: "Cross-workout segment table",
|
|
4793
|
-
event: "Telemetry events table"
|
|
4917
|
+
event: "Telemetry events table",
|
|
4918
|
+
notebook: "Find notebooks \u2014 every notebook, narrowed with notebook:",
|
|
4919
|
+
page: "Find page placements \u2014 notes placed on pages, narrowed with page:",
|
|
4920
|
+
tag: "Find tags \u2014 labels, types, and what they contribute",
|
|
4921
|
+
equipment: "Find equipment notes \u2014 narrowed with equipment: or tags:"
|
|
4794
4922
|
}[t]
|
|
4795
4923
|
}));
|
|
4796
4924
|
var SOURCE_OPTIONS = wodWikiWql.WQL_SOURCE_VALUES.map((s) => ({
|
|
@@ -4798,7 +4926,7 @@ var SOURCE_OPTIONS = wodWikiWql.WQL_SOURCE_VALUES.map((s) => ({
|
|
|
4798
4926
|
label: s.charAt(0).toUpperCase() + s.slice(1),
|
|
4799
4927
|
description: {
|
|
4800
4928
|
journal: "Daily journal notes",
|
|
4801
|
-
|
|
4929
|
+
notebooks: "Notebook notes",
|
|
4802
4930
|
guides: "Static guide pages",
|
|
4803
4931
|
playground: "Playground scratch pages",
|
|
4804
4932
|
dashboards: "Dashboard notes",
|
|
@@ -4837,9 +4965,9 @@ var CLAUSE_META = {
|
|
|
4837
4965
|
target: { label: "Find", inputType: "select", placeholder: "note, block, effort\u2026", placeholderText: ": [target]", icon: "\u{1F3AF}", description: "What to find \u2014 singular", prefix: ":" },
|
|
4838
4966
|
source: { label: "Where stored", inputType: "select", placeholder: "journal, notebooks\u2026", placeholderText: "source: [scope]", icon: "\u{1F310}", description: "Storage scope \u2014 all sources means no scope", prefix: "source:" },
|
|
4839
4967
|
text: { label: "Contains", inputType: "freetext", placeholder: "Text query...", placeholderText: "text: [query]", icon: "\u{1F50D}", description: "Raw text substring search", prefix: "text:" },
|
|
4840
|
-
catalog: { label: "Catalog", inputType: "select", placeholder: "crossfit-games, hyrox...", placeholderText: "catalog: [directory-id]", icon: "\u{1F4D3}", description: "Filter by catalog directory id, e.g. crossfit-games", prefix: "catalog:" },
|
|
4841
4968
|
notebook: { label: "Notebook", inputType: "select", placeholder: "Pick notebook...", placeholderText: "notebook: [id]", icon: "\u{1F4D3}", description: "Filter by canonical notebook container id, e.g. notebook/journal, notebook/playground, notebook/guides", prefix: "notebook:" },
|
|
4842
4969
|
tag: { label: "Tag", inputType: "select", placeholder: "Pick tag...", placeholderText: "tags: [tag]", icon: "\u{1F3F7}", description: "Filter by note/workout tags", prefix: "tags:" },
|
|
4970
|
+
contributes: { label: "Contributes", inputType: "select", placeholder: "metric, tag, function\u2026", placeholderText: "contributes: [kind]", icon: "\u2747", description: "On :tag \u2014 what a tag contributes (metric, tag:<slug>, function:<name>) \u2014 never a label filter", prefix: "contributes:" },
|
|
4843
4971
|
effort: { label: "Effort", inputType: "select", placeholder: "Pick effort...", placeholderText: "effort: [movement]", icon: "\u{1F4AA}", description: "Filter by movement/workout", prefix: "effort:" },
|
|
4844
4972
|
domain: { label: "Domain", inputType: "select", placeholder: "crossfit, parkour, swimming\u2026", placeholderText: "domain: [discipline]", icon: "\u{1F310}", description: "Filter by sport/training domain", prefix: "domain:" },
|
|
4845
4973
|
format: { label: "Format", inputType: "select", placeholder: "for-time, amrap, emom\u2026", placeholderText: "format: [shape]", icon: "\u23F1", description: "Filter by session time structure", prefix: "format:" },
|
|
@@ -4860,7 +4988,7 @@ var CLAUSE_META = {
|
|
|
4860
4988
|
result: { label: "Session", inputType: "freetext", placeholder: "result id\u2026", placeholderText: "result: [id]", icon: "\u{1F3C1}", description: "Scope to one workout session", prefix: "result:" },
|
|
4861
4989
|
block: { label: "Block", inputType: "freetext", placeholder: "block content id\u2026", placeholderText: "block: [contentId]", icon: "\u{1F9F1}", description: "Scope to all versions of a block", prefix: "block:" },
|
|
4862
4990
|
note: { label: "Note", inputType: "freetext", placeholder: "note id\u2026", placeholderText: "note: [id]", icon: "\u{1F4D3}", description: "Scope to one note", prefix: "note:" },
|
|
4863
|
-
page: { label: "Page", inputType: "select", placeholder: "
|
|
4991
|
+
page: { label: "Page", inputType: "select", placeholder: "slug, date, true\u2026", placeholderText: "page: [slug|date]", icon: "\u{1F4C4}", description: "On :page \u2014 the page slug or YYYY-MM-DD date; on :note \u2014 page-ness (true/false)", prefix: "page:" },
|
|
4864
4992
|
plane: { label: "Output Plane", inputType: "select", placeholder: "segment, load, event\u2026", placeholderText: "plane: [type]", icon: "\u{1F4CB}", description: "Output-statement plane on :session", prefix: "plane:" },
|
|
4865
4993
|
pipes: { label: "Pipes", inputType: "freetext", placeholder: "| order by date | limit 10", placeholderText: "| select | order | limit", icon: "\u21E5", description: "Presentation pipes \u2014 select/order/limit/offset" }
|
|
4866
4994
|
};
|
|
@@ -5127,8 +5255,8 @@ function InlineClauseEditor({
|
|
|
5127
5255
|
}
|
|
5128
5256
|
var MULTI_VALUE_TYPES = {
|
|
5129
5257
|
tag: true,
|
|
5130
|
-
catalog: true,
|
|
5131
5258
|
notebook: true,
|
|
5259
|
+
contributes: true,
|
|
5132
5260
|
effort: true,
|
|
5133
5261
|
domain: true,
|
|
5134
5262
|
format: true,
|
|
@@ -5179,12 +5307,6 @@ var builtinBindings = {
|
|
|
5179
5307
|
open: false,
|
|
5180
5308
|
emptyText: "No disciplines available"
|
|
5181
5309
|
},
|
|
5182
|
-
catalog: {
|
|
5183
|
-
load: async () => [],
|
|
5184
|
-
cache: "static",
|
|
5185
|
-
open: false,
|
|
5186
|
-
emptyText: "No catalogs in the static corpus"
|
|
5187
|
-
},
|
|
5188
5310
|
notebook: {
|
|
5189
5311
|
load: async () => [],
|
|
5190
5312
|
cache: "static",
|
|
@@ -5202,6 +5324,14 @@ var builtinBindings = {
|
|
|
5202
5324
|
cache: "static",
|
|
5203
5325
|
open: false,
|
|
5204
5326
|
emptyText: "No indexed block types yet"
|
|
5327
|
+
},
|
|
5328
|
+
// Tag-plane contribution kinds (ticket 08) — an open slot: qualifiers like
|
|
5329
|
+
// `metric:rpe` or `function:calc.e1rm` are typed, never listed as labels.
|
|
5330
|
+
contributes: {
|
|
5331
|
+
load: async () => canonicalSuggestionItems(["metric", "tag", "function"]),
|
|
5332
|
+
cache: "static",
|
|
5333
|
+
open: true,
|
|
5334
|
+
emptyText: "metric, tag, or function"
|
|
5205
5335
|
}
|
|
5206
5336
|
};
|
|
5207
5337
|
var SUGGESTION_BINDINGS = { ...builtinBindings };
|
|
@@ -5914,38 +6044,9 @@ function WqlTextEditor({ value, onChange, onSubmit, onEscape, placeholder, autoF
|
|
|
5914
6044
|
'.cm-line span[class*="tok-"]:hover, .cm-line span[class^="tok-"]:hover': { fontWeight: "700", textShadow: "0 0 0.5px currentColor", cursor: "pointer" },
|
|
5915
6045
|
".cm-scroller": { overflow: "auto" },
|
|
5916
6046
|
".cm-placeholder": { color: "hsl(var(--muted-foreground))" },
|
|
5917
|
-
".
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
border: "1px solid hsl(var(--border))",
|
|
5921
|
-
borderRadius: "12px",
|
|
5922
|
-
boxShadow: "0 8px 24px rgb(0 0 0 / 0.16)",
|
|
5923
|
-
fontFamily: "var(--font-sans, Inter, system-ui, sans-serif)",
|
|
5924
|
-
fontSize: "14px"
|
|
5925
|
-
},
|
|
5926
|
-
".cm-tooltip-autocomplete": { overflow: "hidden", minWidth: "min(18rem, calc(100vw - 2rem))", maxWidth: "calc(100vw - 2rem)" },
|
|
5927
|
-
".cm-tooltip-autocomplete > ul": { padding: "4px", maxHeight: "min(20rem, 45vh)", overscrollBehavior: "contain" },
|
|
5928
|
-
".cm-tooltip-autocomplete > ul > li": {
|
|
5929
|
-
display: "flex",
|
|
5930
|
-
alignItems: "center",
|
|
5931
|
-
gap: "8px",
|
|
5932
|
-
minHeight: "40px",
|
|
5933
|
-
padding: "8px 10px",
|
|
5934
|
-
borderRadius: "8px",
|
|
5935
|
-
lineHeight: "20px"
|
|
5936
|
-
},
|
|
5937
|
-
".cm-tooltip-autocomplete > ul > li:hover": { backgroundColor: "hsl(var(--muted))" },
|
|
5938
|
-
".cm-tooltip-autocomplete > ul > li[aria-selected]": {
|
|
5939
|
-
backgroundColor: "hsl(var(--accent))",
|
|
5940
|
-
color: "hsl(var(--accent-foreground))",
|
|
5941
|
-
boxShadow: "inset 2px 0 hsl(var(--primary))"
|
|
5942
|
-
},
|
|
5943
|
-
".wql-completion-icon": { display: "inline-flex", flexShrink: "0", color: "hsl(var(--primary))" },
|
|
5944
|
-
".cm-completionLabel": { fontWeight: "500", overflow: "hidden", textOverflow: "ellipsis" },
|
|
5945
|
-
".cm-completionMatchedText": { textDecoration: "none", fontWeight: "700", color: "hsl(var(--primary))" },
|
|
5946
|
-
".cm-completionDetail": { marginLeft: "auto", paddingLeft: "12px", fontSize: "12px", fontStyle: "normal", color: "hsl(var(--muted-foreground))" },
|
|
5947
|
-
"@media (pointer: coarse)": { ".cm-tooltip-autocomplete > ul > li": { minHeight: "48px" } }
|
|
5948
|
-
})
|
|
6047
|
+
".wql-completion-icon": { display: "inline-flex", flexShrink: "0", color: "hsl(var(--primary))" }
|
|
6048
|
+
}),
|
|
6049
|
+
autocompleteTooltipTheme
|
|
5949
6050
|
]
|
|
5950
6051
|
})
|
|
5951
6052
|
});
|
|
@@ -6623,8 +6724,8 @@ function AnalyticsChart({
|
|
|
6623
6724
|
function containerPageHref(container) {
|
|
6624
6725
|
if (!container || container.kind !== "page") return void 0;
|
|
6625
6726
|
const { slug, date } = container;
|
|
6626
|
-
if (slug) return `/
|
|
6627
|
-
if (date) return `/
|
|
6727
|
+
if (slug) return `/page/${encodeURIComponent(slug)}`;
|
|
6728
|
+
if (date) return `/day/${encodeURIComponent(date)}`;
|
|
6628
6729
|
return void 0;
|
|
6629
6730
|
}
|
|
6630
6731
|
function FindResultList({
|
|
@@ -12636,6 +12737,7 @@ function editorPreset(optionsOrDialect = "markdown") {
|
|
|
12636
12737
|
onResultSaved,
|
|
12637
12738
|
catalog,
|
|
12638
12739
|
tagTypeValues,
|
|
12740
|
+
whiteboardScript: whiteboardScriptCompletion,
|
|
12639
12741
|
extensions: extraExtensions = []
|
|
12640
12742
|
} = options;
|
|
12641
12743
|
const extensions = [
|
|
@@ -12655,6 +12757,8 @@ function editorPreset(optionsOrDialect = "markdown") {
|
|
|
12655
12757
|
commands.indentWithTab
|
|
12656
12758
|
]),
|
|
12657
12759
|
editorTheme(isDark),
|
|
12760
|
+
// One token-based autocomplete tooltip theme for every dialect.
|
|
12761
|
+
autocompleteTooltipTheme,
|
|
12658
12762
|
lineIdsExtension,
|
|
12659
12763
|
smartIncrement
|
|
12660
12764
|
];
|
|
@@ -12669,10 +12773,18 @@ function editorPreset(optionsOrDialect = "markdown") {
|
|
|
12669
12773
|
extensions.push(wodWikiWql.wql(completionOptions));
|
|
12670
12774
|
} else if (dialect === "wod" || dialect === "whiteboard" || dialect === "time") {
|
|
12671
12775
|
extensions.push(
|
|
12672
|
-
wodWikiLang.whiteboardScript(),
|
|
12776
|
+
wodWikiLang.whiteboardScript(whiteboardScriptCompletion),
|
|
12673
12777
|
wodLinter
|
|
12674
12778
|
);
|
|
12675
12779
|
} else {
|
|
12780
|
+
const nestedWql = {
|
|
12781
|
+
...catalog ? { catalog } : {},
|
|
12782
|
+
...tagTypeValues ? { tagTypeValues } : {}
|
|
12783
|
+
};
|
|
12784
|
+
const nestedOptions = {
|
|
12785
|
+
...Object.keys(nestedWql).length ? { wql: nestedWql } : {},
|
|
12786
|
+
...whiteboardScriptCompletion ? { whiteboardScript: whiteboardScriptCompletion } : {}
|
|
12787
|
+
};
|
|
12676
12788
|
extensions.push(
|
|
12677
12789
|
markdown({ codeLanguages: resolveCodeLanguage }),
|
|
12678
12790
|
sectionField,
|
|
@@ -12682,6 +12794,7 @@ function editorPreset(optionsOrDialect = "markdown") {
|
|
|
12682
12794
|
wodAutocompletion,
|
|
12683
12795
|
wodEditorKeymap,
|
|
12684
12796
|
wodAutoWrap,
|
|
12797
|
+
...Object.keys(nestedOptions).length ? [nestedCompletionOptions.of(nestedOptions)] : [],
|
|
12685
12798
|
linkOpen,
|
|
12686
12799
|
markdownSyntaxHiding(),
|
|
12687
12800
|
markdownTablePreview,
|
|
@@ -12702,8 +12815,10 @@ Object.defineProperty(exports, "blockContentId", {
|
|
|
12702
12815
|
exports.DefaultFrontmatterWidget = DefaultFrontmatterWidget;
|
|
12703
12816
|
exports.activeCursorSection = activeCursorSection;
|
|
12704
12817
|
exports.addRuntimePanel = addRuntimePanel;
|
|
12818
|
+
exports.autocompleteTooltipTheme = autocompleteTooltipTheme;
|
|
12705
12819
|
exports.configureOverlayActions = configureOverlayActions;
|
|
12706
12820
|
exports.cursorFocusExtension = cursorFocusExtension;
|
|
12821
|
+
exports.customCompletionSources = customCompletionSources;
|
|
12707
12822
|
exports.dispatchAddRuntimePanel = dispatchAddRuntimePanel;
|
|
12708
12823
|
exports.dispatchExpandRuntimePanel = dispatchExpandRuntimePanel;
|
|
12709
12824
|
exports.dispatchGutterHighlights = dispatchGutterHighlights;
|
|
@@ -12734,12 +12849,14 @@ exports.linkPreview = linkPreview;
|
|
|
12734
12849
|
exports.markdownSyntaxHiding = markdownSyntaxHiding;
|
|
12735
12850
|
exports.markdownTablePreview = markdownTablePreview;
|
|
12736
12851
|
exports.navigationFacet = navigationFacet;
|
|
12852
|
+
exports.nestedCompletion = nestedCompletion;
|
|
12853
|
+
exports.nestedCompletionOptions = nestedCompletionOptions;
|
|
12737
12854
|
exports.previewDecorations = previewDecorations;
|
|
12738
12855
|
exports.queryBlockPreview = queryBlockPreview;
|
|
12739
12856
|
exports.referenceIndexReload = referenceIndexReload;
|
|
12740
|
-
exports.registerCustomCompletionSource = registerCustomCompletionSource;
|
|
12741
12857
|
exports.registeredSectionWidgets = registeredSectionWidgets;
|
|
12742
12858
|
exports.removeRuntimePanel = removeRuntimePanel;
|
|
12859
|
+
exports.resolveCodeLanguage = resolveCodeLanguage;
|
|
12743
12860
|
exports.runtimePanelField = runtimePanelField;
|
|
12744
12861
|
exports.saveBlockQuerySource = saveBlockQuerySource;
|
|
12745
12862
|
exports.sectionAtPos = sectionAtPos;
|
|
@@ -12755,11 +12872,11 @@ exports.sessionQueryWql = sessionQueryWql;
|
|
|
12755
12872
|
exports.setGutterHighlights = setGutterHighlights;
|
|
12756
12873
|
exports.smartIncrement = smartIncrement;
|
|
12757
12874
|
exports.toggleWidgetEdit = toggleWidgetEdit;
|
|
12758
|
-
exports.unregisterCustomCompletionSource = unregisterCustomCompletionSource;
|
|
12759
12875
|
exports.urlAtPos = urlAtPos;
|
|
12760
12876
|
exports.widgetBlockPreview = widgetBlockPreview;
|
|
12761
12877
|
exports.wodAutoWrap = wodAutoWrap;
|
|
12762
12878
|
exports.wodAutocompletion = wodAutocompletion;
|
|
12879
|
+
exports.wodCompletionSource = wodCompletionSource;
|
|
12763
12880
|
exports.wodEditorKeymap = wodEditorKeymap;
|
|
12764
12881
|
exports.wodLinter = wodLinter;
|
|
12765
12882
|
exports.wodOverlayPanel = wodOverlayPanel;
|