@bitcobblers/wod-wiki-ui 0.8.39 → 0.9.40

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.
@@ -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, getCursorFocusState, getOverlayActions, gutterHighlightsField, gutterUnified, handleFenceAutoWrap, inlineButtonDecoration, lineIdsExtension, linkOpen, markdownSyntaxHiding, markdownTablePreview, navigationFacet, previewDecorations, queryBlockPreview, removeRuntimePanel, runtimePanelField, saveBlockQuerySource, sectionAtPos, sectionField, sectionGeometry, sessionQueryInsert, sessionQueryWql, setGutterHighlights, smartIncrement, toggleWidgetEdit, urlAtPos, widgetBlockPreview, wodAutoWrap, wodAutocompletion, wodEditorKeymap, wodLinter, wodOverlayPanel, workoutLintSource, wrapInTimeFence } from '../chunk-5JJK5ONN.mjs';
1
+ export { DefaultFrontmatterWidget, activeCursorSection, addRuntimePanel, blockContentId, configureOverlayActions, cursorFocusExtension, dispatchAddRuntimePanel, dispatchExpandRuntimePanel, dispatchGutterHighlights, dispatchRemoveRuntimePanel, editingWidgetsField, editorPreset, editorTheme, embedPreviewDecorations, expandRuntimePanel, fenceCompletion, findQueryBlockSection, findWorkoutErrors, forceSectionParse, frontmatterPreview, frontmatterPreviewField, getCursorFocusState, getOverlayActions, gutterHighlightsField, gutterUnified, handleFenceAutoWrap, inlineButtonDecoration, lineIdsExtension, linkOpen, markdownSyntaxHiding, markdownTablePreview, navigationFacet, previewDecorations, queryBlockPreview, removeRuntimePanel, runtimePanelField, saveBlockQuerySource, sectionAtPos, sectionField, sectionGeometry, sessionQueryInsert, sessionQueryWql, setGutterHighlights, smartIncrement, toggleWidgetEdit, urlAtPos, widgetBlockPreview, wodAutoWrap, wodAutocompletion, wodEditorKeymap, wodLinter, wodOverlayPanel, workoutLintSource, wrapInTimeFence } from '../chunk-LEM2Y37Q.mjs';
2
2
  //# sourceMappingURL=index.mjs.map
3
3
  //# sourceMappingURL=index.mjs.map
package/dist/index.cjs CHANGED
@@ -1902,7 +1902,8 @@ function restoreFilters(rest) {
1902
1902
  function wqlToClauses(wql2) {
1903
1903
  const suffixes = wodWikiWql.parseWqlSuffixes(wql2.trim());
1904
1904
  if (suffixes.conflicts?.length) return null;
1905
- const { where, displayUnit, groupBy, rollup, last, scope, primaryText } = suffixes;
1905
+ const { where, displayUnit, groupBy, rollup, window: window2, legacyScope, primaryText } = suffixes;
1906
+ if (window2?.kind === "range") return null;
1906
1907
  const rowsMatch = /^rows(?:\:([a-zA-Z0-9_-]+))?\:?/.exec(primaryText);
1907
1908
  if (rowsMatch) {
1908
1909
  if (where || groupBy || rollup) return null;
@@ -1911,7 +1912,7 @@ function wqlToClauses(wql2) {
1911
1912
  if (!filterClauses2) return null;
1912
1913
  const clauses2 = [
1913
1914
  restoreClause("c-source", "source", "rows"),
1914
- restoreClause("c-time", "time", last ? `last ${last.size}${last.unit}` : "all"),
1915
+ restoreClause("c-time", "time", window2?.kind === "relative" ? `last ${window2.size}${window2.unit}` : "all"),
1915
1916
  ...rowsMatch[1] ? [restoreClause("c-output", "output", rowsMatch[1])] : [],
1916
1917
  ...filterClauses2
1917
1918
  ];
@@ -1925,17 +1926,20 @@ function wqlToClauses(wql2) {
1925
1926
  const rest2 = primaryText.slice(headMatch2[0].length).trim();
1926
1927
  const filterClauses2 = restoreFilters(rest2);
1927
1928
  if (!filterClauses2) return null;
1928
- const timeValue = last ? `last ${last.size}${last.unit}` : "all";
1929
- const scopeValue = scope;
1929
+ const timeValue = window2?.kind === "relative" ? `last ${window2.size}${window2.unit}` : "all";
1930
+ const sourceClauseIdx = filterClauses2.findIndex((c) => c.type === "source");
1931
+ const sourceFromFilter = sourceClauseIdx !== -1 ? filterClauses2[sourceClauseIdx].value : void 0;
1932
+ const scopeValue = legacyScope ?? sourceFromFilter;
1933
+ const remainingFilterClauses = sourceClauseIdx !== -1 ? filterClauses2.filter((_, idx) => idx !== sourceClauseIdx) : filterClauses2;
1930
1934
  const sourceValue = targetValue === "block" ? "blocks" : targetValue === "effort" ? "efforts" : !scopeValue || scopeValue === "all" ? "notes" : scopeValue;
1931
1935
  const clauses2 = [
1932
1936
  restoreClause("c-source", "source", sourceValue),
1933
1937
  restoreClause("c-time", "time", timeValue),
1934
- ...filterClauses2
1938
+ ...remainingFilterClauses
1935
1939
  ];
1936
- if (where) clauses2.push(restoreClause("c-where", "where", where));
1937
1940
  return clauses2;
1938
1941
  }
1942
+ if (window2) return null;
1939
1943
  const headMatch = RESTORE_AGG_HEAD_RE.exec(primaryText);
1940
1944
  if (!headMatch) return null;
1941
1945
  const aggValue = headMatch[1];
@@ -2442,10 +2446,12 @@ function AddCalcDropdown({
2442
2446
  ] });
2443
2447
  }
2444
2448
  function summarizeFind(ast) {
2449
+ const sourceFilter = ast.filters.find((f) => f.key === "source");
2450
+ const scope = sourceFilter ? sourceFilter.values.map((v) => v.value).join(",") : "all";
2445
2451
  return {
2446
2452
  target: ast.target,
2447
- scope: ast.scope || "all",
2448
- timeWindow: ast.last ? `last ${ast.last.size}${ast.last.unit}` : void 0,
2453
+ scope,
2454
+ timeWindow: ast.window ? ast.window.kind === "relative" ? `last ${ast.window.size}${ast.window.unit}` : `from ${ast.window.start}${ast.window.end ? ` to ${ast.window.end}` : ""}` : void 0,
2449
2455
  hasJoin: Boolean(ast.join),
2450
2456
  filterCount: ast.filters.length
2451
2457
  };
@@ -10786,13 +10792,13 @@ function editorPreset(optionsOrDialect = "markdown") {
10786
10792
  }
10787
10793
 
10788
10794
  // src/version.ts
10789
- var VERSION = "0.8.39";
10790
- var GIT_SHA = "3c19185";
10791
- var BUILD_TIME = "2026-08-26T00:07:31.934Z";
10795
+ var VERSION = "0.9.40";
10796
+ var GIT_SHA = "2462ec9";
10797
+ var BUILD_TIME = "2026-08-26T01:04:47.412Z";
10792
10798
  var SEMVER = {
10793
- version: "0.8.39",
10794
- gitSha: "3c19185",
10795
- buildTime: "2026-08-26T00:07:31.934Z"
10799
+ version: "0.9.40",
10800
+ gitSha: "2462ec9",
10801
+ buildTime: "2026-08-26T01:04:47.412Z"
10796
10802
  };
10797
10803
 
10798
10804
  exports.AGG_OPTIONS = AGG_OPTIONS;