@bitcobblers/wod-wiki-ui 0.49.2179 → 0.49.2181
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-CD7P6Q4Z.mjs → chunk-DKPPJXUH.mjs} +39 -26
- package/dist/chunk-DKPPJXUH.mjs.map +1 -0
- package/dist/extensions/index.cjs +36 -23
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.mjs +1 -1
- package/dist/index.cjs +42 -29
- 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/package.json +4 -4
- package/dist/chunk-CD7P6Q4Z.mjs.map +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { DefaultFrontmatterWidget, activeCursorSection, addRuntimePanel, autocompleteTooltipTheme, blockContentId, configureOverlayActions, cursorFocusExtension, customCompletionSources, dispatchAddRuntimePanel, dispatchExpandRuntimePanel, dispatchGutterHighlights, dispatchRemoveRuntimePanel, editingWidgetsField, editorPreset, editorTheme, embedPreviewDecorations, expandRuntimePanel, fenceCompletion, findQueryBlockSection, findWorkoutErrors, forceSectionParse, frontmatterDetailed, frontmatterPreview, frontmatterPreviewField, frontmatterReferenceIndex, frontmatterSource, 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, setFrontmatterDetailed, setFrontmatterSource, setGutterHighlights, smartIncrement, toggleWidgetEdit, urlAtPos, widgetBlockPreview, wodAutoWrap, wodAutocompletion, wodCompletionSource, wodEditorKeymap, wodLinter, wodOverlayPanel, workoutLintSource, wrapInTimeFence } from '../chunk-
|
|
1
|
+
export { DefaultFrontmatterWidget, activeCursorSection, addRuntimePanel, autocompleteTooltipTheme, blockContentId, configureOverlayActions, cursorFocusExtension, customCompletionSources, dispatchAddRuntimePanel, dispatchExpandRuntimePanel, dispatchGutterHighlights, dispatchRemoveRuntimePanel, editingWidgetsField, editorPreset, editorTheme, embedPreviewDecorations, expandRuntimePanel, fenceCompletion, findQueryBlockSection, findWorkoutErrors, forceSectionParse, frontmatterDetailed, frontmatterPreview, frontmatterPreviewField, frontmatterReferenceIndex, frontmatterSource, 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, setFrontmatterDetailed, setFrontmatterSource, setGutterHighlights, smartIncrement, toggleWidgetEdit, urlAtPos, widgetBlockPreview, wodAutoWrap, wodAutocompletion, wodCompletionSource, wodEditorKeymap, wodLinter, wodOverlayPanel, workoutLintSource, wrapInTimeFence } from '../chunk-DKPPJXUH.mjs';
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.cjs
CHANGED
|
@@ -3664,6 +3664,34 @@ function WqlTextEditor({ value, onChange, onSubmit, onEscape, placeholder, autoF
|
|
|
3664
3664
|
const source = wodWikiWql.wqlCompletionSource({
|
|
3665
3665
|
values: async (key) => (await loadSuggestions(key === "tags" ? "tag" : key)).map((item) => ({ label: item.value, detail: item.label, type: "constant" }))
|
|
3666
3666
|
});
|
|
3667
|
+
const handlePointerOrTouchActivation = (editor2, clientX, clientY) => {
|
|
3668
|
+
let { from, to } = editor2.state.selection.main;
|
|
3669
|
+
if (clientX !== void 0 && clientY !== void 0) {
|
|
3670
|
+
const pos = editor2.posAtCoords({ x: clientX, y: clientY });
|
|
3671
|
+
if (pos === null) return false;
|
|
3672
|
+
from = to = pos;
|
|
3673
|
+
}
|
|
3674
|
+
if (from === to) {
|
|
3675
|
+
const line = editor2.state.doc.lineAt(from);
|
|
3676
|
+
const word = Array.from(line.text.matchAll(/[\w.*-]+/g)).find((m) => line.from + m.index <= from && from <= line.from + m.index + m[0].length);
|
|
3677
|
+
if (!word) return false;
|
|
3678
|
+
from = line.from + word.index;
|
|
3679
|
+
to = from + word[0].length;
|
|
3680
|
+
let node = language.syntaxTree(editor2.state).resolveInner(to, -1);
|
|
3681
|
+
while (node.parent && !["Head", "Filter", "GroupBy", "Rollup"].includes(node.name)) node = node.parent;
|
|
3682
|
+
if (!["Head", "Filter", "GroupBy", "Rollup"].includes(node.name)) return false;
|
|
3683
|
+
if (!callbacks.current.onSlotActivate) {
|
|
3684
|
+
editor2.dispatch({ selection: { anchor: from, head: to } });
|
|
3685
|
+
}
|
|
3686
|
+
}
|
|
3687
|
+
if (callbacks.current.onSlotActivate) {
|
|
3688
|
+
autocomplete.closeCompletion(editor2);
|
|
3689
|
+
activateSlot(editor2, from, (slot) => callbacks.current.onSlotActivate?.(slot));
|
|
3690
|
+
} else {
|
|
3691
|
+
autocomplete.startCompletion(editor2);
|
|
3692
|
+
}
|
|
3693
|
+
return false;
|
|
3694
|
+
};
|
|
3667
3695
|
const editor = new view.EditorView({
|
|
3668
3696
|
parent: host.current,
|
|
3669
3697
|
state: state.EditorState.create({
|
|
@@ -3702,27 +3730,12 @@ function WqlTextEditor({ value, onChange, onSubmit, onEscape, placeholder, autoF
|
|
|
3702
3730
|
// retain token selection and in-row completion.
|
|
3703
3731
|
mouseup: (event, editor2) => {
|
|
3704
3732
|
if (event.button !== 0) return false;
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
to = from + word[0].length;
|
|
3712
|
-
let node = language.syntaxTree(editor2.state).resolveInner(to, -1);
|
|
3713
|
-
while (node.parent && !["Head", "Filter", "GroupBy", "Rollup"].includes(node.name)) node = node.parent;
|
|
3714
|
-
if (!["Head", "Filter", "GroupBy", "Rollup"].includes(node.name)) return false;
|
|
3715
|
-
if (!callbacks.current.onSlotActivate) {
|
|
3716
|
-
editor2.dispatch({ selection: { anchor: from, head: to } });
|
|
3717
|
-
}
|
|
3718
|
-
}
|
|
3719
|
-
if (callbacks.current.onSlotActivate) {
|
|
3720
|
-
autocomplete.closeCompletion(editor2);
|
|
3721
|
-
activateSlot(editor2, from, (slot) => callbacks.current.onSlotActivate?.(slot));
|
|
3722
|
-
} else {
|
|
3723
|
-
autocomplete.startCompletion(editor2);
|
|
3724
|
-
}
|
|
3725
|
-
return false;
|
|
3733
|
+
return handlePointerOrTouchActivation(editor2);
|
|
3734
|
+
},
|
|
3735
|
+
touchend: (event, editor2) => {
|
|
3736
|
+
if (event.changedTouches.length !== 1) return false;
|
|
3737
|
+
const touch = event.changedTouches[0];
|
|
3738
|
+
return handlePointerOrTouchActivation(editor2, touch.clientX, touch.clientY);
|
|
3726
3739
|
},
|
|
3727
3740
|
keydown: (event, editor2) => {
|
|
3728
3741
|
if (event.isComposing || editor2.compositionStarted) return true;
|
|
@@ -4070,7 +4083,7 @@ function WqlComposer({
|
|
|
4070
4083
|
"data-testid": "wql-composer-root",
|
|
4071
4084
|
children: [
|
|
4072
4085
|
diagnosticsPosition === "top" && showDiagnostics && /* @__PURE__ */ jsxRuntime.jsx(WqlDiagnosticsStrip, { diagnostics, stages, actions: action, variant: "header" }),
|
|
4073
|
-
(desktop || active.kind === "wql" || !guided) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 w-full items-center gap-2", children: [
|
|
4086
|
+
(desktop || compact || active.kind === "wql" || !guided) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 w-full items-center gap-2", children: [
|
|
4074
4087
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4075
4088
|
WqlTextEditor,
|
|
4076
4089
|
{
|
|
@@ -4096,7 +4109,7 @@ function WqlComposer({
|
|
|
4096
4109
|
setUndo(void 0);
|
|
4097
4110
|
}, className: "min-h-9 shrink-0 rounded-lg px-2.5 text-xs text-muted-foreground hover:text-foreground", children: "Undo removal" })
|
|
4098
4111
|
] }),
|
|
4099
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex min-w-0 flex-wrap items-center gap-1", !desktop && !compact && "rounded-xl border border-border p-2",
|
|
4112
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex min-w-0 flex-wrap items-center gap-1", !desktop && !compact && "rounded-xl border border-border p-2", compact && "hidden"), "data-testid": "wql-composer", onKeyDown: (event) => {
|
|
4100
4113
|
if (!["Delete", "Backspace"].includes(event.key) || !(event.target instanceof HTMLButtonElement)) return;
|
|
4101
4114
|
const buttons = Array.from(event.currentTarget.querySelectorAll('[data-testid^="token-slot-"]:not([data-testid^="token-slot-remove-"]):not([data-testid^="token-slot-value-"])'));
|
|
4102
4115
|
const pill = visiblePills[buttons.indexOf(event.target)];
|
|
@@ -14359,13 +14372,13 @@ function editorPreset(optionsOrDialect = "markdown") {
|
|
|
14359
14372
|
}
|
|
14360
14373
|
|
|
14361
14374
|
// src/version.ts
|
|
14362
|
-
var VERSION = "0.49.
|
|
14363
|
-
var GIT_SHA = "
|
|
14364
|
-
var BUILD_TIME = "2026-10-
|
|
14375
|
+
var VERSION = "0.49.2181";
|
|
14376
|
+
var GIT_SHA = "846445d";
|
|
14377
|
+
var BUILD_TIME = "2026-10-29T14:21:23.766Z";
|
|
14365
14378
|
var SEMVER = {
|
|
14366
|
-
version: "0.49.
|
|
14367
|
-
gitSha: "
|
|
14368
|
-
buildTime: "2026-10-
|
|
14379
|
+
version: "0.49.2181",
|
|
14380
|
+
gitSha: "846445d",
|
|
14381
|
+
buildTime: "2026-10-29T14:21:23.766Z"
|
|
14369
14382
|
};
|
|
14370
14383
|
|
|
14371
14384
|
Object.defineProperty(exports, "CONTENT_GROUPING_DIMENSIONS", {
|