@bitcobblers/wod-wiki-ui 0.7.37 → 0.7.38

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.
@@ -4,7 +4,7 @@ import { tags, styleTags, Tag } from '@lezer/highlight';
4
4
  import { RangeSetBuilder, Facet, StateEffect, StateField, Prec, EditorState, EditorSelection, countColumn } from '@codemirror/state';
5
5
  import { linter, forEachDiagnostic } from '@codemirror/lint';
6
6
  import { whiteboardScriptLanguage, createParser, getAnalyticsFromLogs, whiteboardScript } from '@bitcobblers/wod-wiki-lang';
7
- import { WQL_SOURCES, WQL_AGGREGATORS, WQL_ROLLUP_PERIODS, WQL_VIRTUAL_DIMS, WQL_TAG_KEYS, WQL_METRIC_AGGREGATES, WQL_METRIC_FAMILIES, WQL_CALC_TARGETS, WQL_DISPLAY_UNITS, WQL_INTENSITY_TIERS, parseQueryWidgetSuffix, WQL_COMPARISON_OPS, parseQuery, isRowsQuery, isDashboardWidgetType, unknownWidgetTypeMessage, resolveWidgetType, PLANNED_WIDGET_TYPES, parseWqlSuffixes, isFindQuery, splitWidgetBody, substituteTokens, unknownTokensMessage, wql, wqlLanguage } from '@bitcobblers/wod-wiki-wql';
7
+ import { WQL_SOURCES, WQL_AGGREGATORS, WQL_ROLLUP_PERIODS, WQL_VIRTUAL_DIMS, WQL_TAG_KEYS, WQL_METRIC_AGGREGATES, WQL_METRIC_FAMILIES, WQL_CALC_TARGETS, WQL_DISPLAY_UNITS, WQL_INTENSITY_TIERS, parseQueryWidgetSuffix, WQL_COMPARISON_OPS, parseQuery, isRowsQuery, isDashboardWidgetType, unknownWidgetTypeMessage, resolveWidgetType, PLANNED_WIDGET_TYPES, parseWqlSuffixes, isFindQuery, isAggregateQuery, splitWidgetBody, substituteTokens, unknownTokensMessage, wql, wqlLanguage } from '@bitcobblers/wod-wiki-wql';
8
8
  import { clsx } from 'clsx';
9
9
  import { twMerge } from 'tailwind-merge';
10
10
  import { snippet, autocompletion, closeBrackets, closeBracketsKeymap, CompletionContext, ifNotIn, completeFromList, snippetCompletion } from '@codemirror/autocomplete';
@@ -3685,7 +3685,7 @@ function diagnoseClauses(clauses) {
3685
3685
  return {
3686
3686
  valid: false,
3687
3687
  wql: clausesToWql(clauses),
3688
- ast: { raw: "", error },
3688
+ ast: { family: "aggregate", raw: "", agg: "sum", metric: "", filters: [], groupBy: [], error },
3689
3689
  error,
3690
3690
  offendingClauseId: clause.id
3691
3691
  };
@@ -3755,7 +3755,7 @@ function WqlDiagnosticsStrip({
3755
3755
  summary.hasJoin && /* @__PURE__ */ jsx("span", { "data-testid": "diag-summary-join", className: "text-primary font-semibold", children: "+join" })
3756
3756
  ] });
3757
3757
  })() }),
3758
- valid && !isFindQuery(ast) && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-x-3 text-[11px] opacity-80 border-l border-border/50 pl-3", children: (() => {
3758
+ valid && isAggregateQuery(ast) && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-x-3 text-[11px] opacity-80 border-l border-border/50 pl-3", children: (() => {
3759
3759
  const summary = summarizeAggregate(ast);
3760
3760
  return /* @__PURE__ */ jsxs(Fragment, { children: [
3761
3761
  /* @__PURE__ */ jsx(SummaryChip, { label: "agg", value: summary.agg, testId: "diag-summary-agg" }),
@@ -10369,5 +10369,5 @@ function editorPreset(optionsOrDialect = "markdown") {
10369
10369
  }
10370
10370
 
10371
10371
  export { AGG_OPTIONS, AddCalcDropdown, AddFilterDropdown, CLAUSE_META, CONTENT_SOURCES, ClausePopover, ComposerRegistry, CustomSlotPopover, DEFAULT_DIAGNOSTICS_DEBOUNCE_MS, DefaultFrontmatterWidget, GROUPBY_OPTIONS, GoalRings, METRIC_OPTIONS, MULTI_VALUE_TYPES, ProposedMetricBadge, QueryBlockView, QueryValue, ROLLUP_OPTIONS, RowsResultsChrome, RowsTable, SERIES_COLORS, SOURCE_OPTIONS, SUGGESTION_BINDINGS, StackedBar, TIME_OPTIONS, TokenSlotPill, TopList, UNIT_OPTIONS, WHERE_AGGREGATORS, WHERE_METRICS, WHERE_OPERATORS, WidgetChart, WidgetProblemBadge, WqlBars, WqlComposer, WqlDiagnosticsStrip, WqlEmptyState, WqlQueryInspectorModal, WqlTable, WqlTimeseries, ZoneDistribution, activeCursorSection, addRuntimePanel, blockContentId, blockTypesFromBlocks, catalogIdsFromBlocks, clauseToWql, clauseValue, clausesToWql, cn, compactNumber, composerRegistry, configureOverlayActions, cursorFocusExtension, dateRangeSlot, defaultClauses, defaultMetricsClauses, diagnoseClauses, dispatchAddRuntimePanel, dispatchExpandRuntimePanel, dispatchGutterHighlights, dispatchRemoveRuntimePanel, editingWidgetsField, editorPreset, editorTheme, embedPreviewDecorations, expandRuntimePanel, extractBlockQueries, fenceCompletion, findQueryBlockSection, findWorkoutErrors, forceSectionParse, formatTimestamp, frontmatterPreview, frontmatterPreviewField, getClauseMeta, getCursorFocusState, getOverlayActions, getSuggestionBinding, gutterHighlightsField, gutterUnified, handleFenceAutoWrap, hashCode, inlineButtonDecoration, invalidateSuggestions, lineIdsExtension, linkOpen, loadSuggestions, markdownSyntaxHiding, markdownTablePreview, mergeSeries, mergeTagSuggestions, navigationFacet, patchBlockQuery, pivotClauses, previewDecorations, queryBlockPreview, readSessionRpe, removeRuntimePanel, runtimePanelField, saveBlockQuerySource, sectionAtPos, sectionField, sectionGeometry, sessionQueryInsert, sessionQueryWql, setGutterHighlights, setMetricClause, setSuggestionBinding, smartIncrement, sourcePlane, summarizeAggregate, summarizeFind, tagsFromStaticBlocks, toggleWidgetEdit, tooltipTimestamp, urlAtPos, useChartShape, useComposerSlots, useSuggestions, useWqlStageCounts, widgetBlockPreview, wodAutoWrap, wodAutocompletion, wodEditorKeymap, wodLinter, wodOverlayPanel, workoutLintSource, wqlToClauses, wrapInTimeFence };
10372
- //# sourceMappingURL=chunk-3SOUSOM5.mjs.map
10373
- //# sourceMappingURL=chunk-3SOUSOM5.mjs.map
10372
+ //# sourceMappingURL=chunk-3ANAQJ6S.mjs.map
10373
+ //# sourceMappingURL=chunk-3ANAQJ6S.mjs.map