@bitcobblers/wod-wiki-ui 0.8.39 → 0.10.41

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-S77JRUQM.mjs';
2
2
  //# sourceMappingURL=index.mjs.map
3
3
  //# sourceMappingURL=index.mjs.map
package/dist/index.cjs CHANGED
@@ -1872,6 +1872,9 @@ function filterFragmentToClause(fragment, index) {
1872
1872
  const key = fragment.slice(0, colon2);
1873
1873
  const value = fragment.slice(colon2 + 1);
1874
1874
  if (!value.trim()) return null;
1875
+ if (key === "source") {
1876
+ return restoreClause(`c-source-${index}`, "source", value);
1877
+ }
1875
1878
  const builtin = FILTER_KEY_TO_CLAUSE_TYPE[key];
1876
1879
  if (builtin) {
1877
1880
  const restoredValue = builtin === "text" && value.length >= 2 && value.startsWith('"') && value.endsWith('"') ? value.slice(1, -1) : value;
@@ -1902,7 +1905,8 @@ function restoreFilters(rest) {
1902
1905
  function wqlToClauses(wql2) {
1903
1906
  const suffixes = wodWikiWql.parseWqlSuffixes(wql2.trim());
1904
1907
  if (suffixes.conflicts?.length) return null;
1905
- const { where, displayUnit, groupBy, rollup, last, scope, primaryText } = suffixes;
1908
+ const { where, displayUnit, groupBy, rollup, window: window2, legacyScope, primaryText } = suffixes;
1909
+ if (window2?.kind === "range") return null;
1906
1910
  const rowsMatch = /^rows(?:\:([a-zA-Z0-9_-]+))?\:?/.exec(primaryText);
1907
1911
  if (rowsMatch) {
1908
1912
  if (where || groupBy || rollup) return null;
@@ -1911,7 +1915,7 @@ function wqlToClauses(wql2) {
1911
1915
  if (!filterClauses2) return null;
1912
1916
  const clauses2 = [
1913
1917
  restoreClause("c-source", "source", "rows"),
1914
- restoreClause("c-time", "time", last ? `last ${last.size}${last.unit}` : "all"),
1918
+ restoreClause("c-time", "time", window2?.kind === "relative" ? `last ${window2.size}${window2.unit}` : "all"),
1915
1919
  ...rowsMatch[1] ? [restoreClause("c-output", "output", rowsMatch[1])] : [],
1916
1920
  ...filterClauses2
1917
1921
  ];
@@ -1925,17 +1929,21 @@ function wqlToClauses(wql2) {
1925
1929
  const rest2 = primaryText.slice(headMatch2[0].length).trim();
1926
1930
  const filterClauses2 = restoreFilters(rest2);
1927
1931
  if (!filterClauses2) return null;
1928
- const timeValue = last ? `last ${last.size}${last.unit}` : "all";
1929
- const scopeValue = scope;
1932
+ const timeValue = window2?.kind === "relative" ? `last ${window2.size}${window2.unit}` : "all";
1933
+ const sourceClauseIdx = filterClauses2.findIndex((c) => c.type === "source");
1934
+ const sourceFromFilter = sourceClauseIdx !== -1 ? filterClauses2[sourceClauseIdx].value : void 0;
1935
+ const scopeValue = legacyScope ?? sourceFromFilter;
1936
+ const remainingFilterClauses = sourceClauseIdx !== -1 ? filterClauses2.filter((_, idx) => idx !== sourceClauseIdx) : filterClauses2;
1930
1937
  const sourceValue = targetValue === "block" ? "blocks" : targetValue === "effort" ? "efforts" : !scopeValue || scopeValue === "all" ? "notes" : scopeValue;
1931
1938
  const clauses2 = [
1932
1939
  restoreClause("c-source", "source", sourceValue),
1933
1940
  restoreClause("c-time", "time", timeValue),
1934
- ...filterClauses2
1941
+ ...remainingFilterClauses
1935
1942
  ];
1936
1943
  if (where) clauses2.push(restoreClause("c-where", "where", where));
1937
1944
  return clauses2;
1938
1945
  }
1946
+ if (window2) return null;
1939
1947
  const headMatch = RESTORE_AGG_HEAD_RE.exec(primaryText);
1940
1948
  if (!headMatch) return null;
1941
1949
  const aggValue = headMatch[1];
@@ -2442,10 +2450,12 @@ function AddCalcDropdown({
2442
2450
  ] });
2443
2451
  }
2444
2452
  function summarizeFind(ast) {
2453
+ const sourceFilter = ast.filters.find((f) => f.key === "source");
2454
+ const scope = sourceFilter ? sourceFilter.values.map((v) => v.value).join(",") : "all";
2445
2455
  return {
2446
2456
  target: ast.target,
2447
- scope: ast.scope || "all",
2448
- timeWindow: ast.last ? `last ${ast.last.size}${ast.last.unit}` : void 0,
2457
+ scope,
2458
+ 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
2459
  hasJoin: Boolean(ast.join),
2450
2460
  filterCount: ast.filters.length
2451
2461
  };
@@ -10786,13 +10796,13 @@ function editorPreset(optionsOrDialect = "markdown") {
10786
10796
  }
10787
10797
 
10788
10798
  // src/version.ts
10789
- var VERSION = "0.8.39";
10790
- var GIT_SHA = "3c19185";
10791
- var BUILD_TIME = "2026-08-26T00:07:31.934Z";
10799
+ var VERSION = "0.10.41";
10800
+ var GIT_SHA = "1b9b771";
10801
+ var BUILD_TIME = "2026-08-26T04:16:38.418Z";
10792
10802
  var SEMVER = {
10793
- version: "0.8.39",
10794
- gitSha: "3c19185",
10795
- buildTime: "2026-08-26T00:07:31.934Z"
10803
+ version: "0.10.41",
10804
+ gitSha: "1b9b771",
10805
+ buildTime: "2026-08-26T04:16:38.418Z"
10796
10806
  };
10797
10807
 
10798
10808
  exports.AGG_OPTIONS = AGG_OPTIONS;