@bitcobblers/wod-wiki-ui 0.55.2206 → 0.56.2210
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-JERLIUE2.mjs → chunk-VYFKXF46.mjs} +30 -12
- package/dist/chunk-VYFKXF46.mjs.map +1 -0
- package/dist/extensions/index.cjs +27 -9
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.mjs +1 -1
- package/dist/index.cjs +35 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -7
- package/dist/index.d.ts +18 -7
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-JERLIUE2.mjs.map +0 -1
|
@@ -311,7 +311,7 @@ var lineIdsExtension = ViewPlugin.fromClass(
|
|
|
311
311
|
if (!label) label = timestamp;
|
|
312
312
|
}
|
|
313
313
|
id = label.toLowerCase().replace(/[^\w]+/g, "-");
|
|
314
|
-
} else if (/^```(time|log)
|
|
314
|
+
} else if (/^```(time|wod|whiteboard|log)/i.test(trimmed)) {
|
|
315
315
|
id = `workout-line-${i}`;
|
|
316
316
|
}
|
|
317
317
|
if (id && line.from >= view.viewport.from && line.to <= view.viewport.to) {
|
|
@@ -6696,6 +6696,27 @@ function QueryValue({ result, unit: unitProp, label, thresholds }) {
|
|
|
6696
6696
|
] })
|
|
6697
6697
|
] });
|
|
6698
6698
|
}
|
|
6699
|
+
function formatWithUnit(formattedNumber, unit) {
|
|
6700
|
+
const cleanUnit = unit?.trim();
|
|
6701
|
+
return cleanUnit ? `${formattedNumber} ${cleanUnit}` : formattedNumber;
|
|
6702
|
+
}
|
|
6703
|
+
function formatTimeseriesTick(value, unit) {
|
|
6704
|
+
const numeric = Number(value);
|
|
6705
|
+
if (!Number.isFinite(numeric)) {
|
|
6706
|
+
return formatWithUnit(String(value), unit);
|
|
6707
|
+
}
|
|
6708
|
+
const maximumFractionDigits = Math.abs(numeric) >= 100 ? 0 : 1;
|
|
6709
|
+
const formatted = new Intl.NumberFormat(void 0, { maximumFractionDigits }).format(numeric);
|
|
6710
|
+
return formatWithUnit(formatted, unit);
|
|
6711
|
+
}
|
|
6712
|
+
function formatTimeseriesTooltipValue(value, unit) {
|
|
6713
|
+
const numeric = Number(value);
|
|
6714
|
+
if (!Number.isFinite(numeric)) {
|
|
6715
|
+
return formatWithUnit(String(value), unit);
|
|
6716
|
+
}
|
|
6717
|
+
const formatted = new Intl.NumberFormat(void 0, { maximumFractionDigits: 1 }).format(numeric);
|
|
6718
|
+
return formatWithUnit(formatted, unit);
|
|
6719
|
+
}
|
|
6699
6720
|
function WqlTimeseries({ result, unit: unitProp }) {
|
|
6700
6721
|
const shape = useChartShape(result);
|
|
6701
6722
|
const data2 = useMemo(() => mergeSeries(result.series), [result]);
|
|
@@ -6724,7 +6745,7 @@ function WqlTimeseries({ result, unit: unitProp }) {
|
|
|
6724
6745
|
width: 64,
|
|
6725
6746
|
stroke: "hsl(var(--muted-foreground))",
|
|
6726
6747
|
tick: { fill: "hsl(var(--muted-foreground))", fontSize: 10 },
|
|
6727
|
-
|
|
6748
|
+
tickFormatter: (v) => formatTimeseriesTick(v, unit)
|
|
6728
6749
|
}
|
|
6729
6750
|
),
|
|
6730
6751
|
/* @__PURE__ */ jsx(
|
|
@@ -6737,7 +6758,7 @@ function WqlTimeseries({ result, unit: unitProp }) {
|
|
|
6737
6758
|
color: "hsl(var(--popover-foreground))"
|
|
6738
6759
|
},
|
|
6739
6760
|
labelFormatter: (v) => tooltipTimestamp(v),
|
|
6740
|
-
formatter: (v) => [
|
|
6761
|
+
formatter: (v) => [formatTimeseriesTooltipValue(v, unit), ""]
|
|
6741
6762
|
}
|
|
6742
6763
|
),
|
|
6743
6764
|
result.series.length > 1 && /* @__PURE__ */ jsx(Legend, { wrapperStyle: { fontSize: 11 } }),
|
|
@@ -6812,9 +6833,6 @@ function WqlBars({ result, unit: unitProp }) {
|
|
|
6812
6833
|
] }) });
|
|
6813
6834
|
}
|
|
6814
6835
|
var MAX_ROWS = 12;
|
|
6815
|
-
function formatValue(v, unit) {
|
|
6816
|
-
return `${v.toLocaleString()}${unit ? ` ${unit}` : ""}`;
|
|
6817
|
-
}
|
|
6818
6836
|
function WqlTable({ result, unit: unitProp }) {
|
|
6819
6837
|
const shape = useChartShape(result);
|
|
6820
6838
|
const unit = result.series[0]?.unit ?? unitProp ?? "";
|
|
@@ -6822,14 +6840,14 @@ function WqlTable({ result, unit: unitProp }) {
|
|
|
6822
6840
|
if (shape.kind === "scalar") {
|
|
6823
6841
|
return {
|
|
6824
6842
|
head: ["Metric", "Value"],
|
|
6825
|
-
body: [[result.series[0]?.label ?? "scalar",
|
|
6843
|
+
body: [[result.series[0]?.label ?? "scalar", formatTimeseriesTooltipValue(shape.value, unit)]],
|
|
6826
6844
|
more: 0
|
|
6827
6845
|
};
|
|
6828
6846
|
}
|
|
6829
6847
|
if (shape.kind === "bars") {
|
|
6830
6848
|
const all = result.series.map((s) => [
|
|
6831
6849
|
s.label,
|
|
6832
|
-
|
|
6850
|
+
formatTimeseriesTooltipValue(s.points[0]?.value ?? 0, unit)
|
|
6833
6851
|
]);
|
|
6834
6852
|
return {
|
|
6835
6853
|
head: ["Series", "Value"],
|
|
@@ -6850,7 +6868,7 @@ function WqlTable({ result, unit: unitProp }) {
|
|
|
6850
6868
|
formatTimestamp(ts),
|
|
6851
6869
|
...result.series.map((s) => {
|
|
6852
6870
|
const v = seriesMap.get(s.label)?.get(ts);
|
|
6853
|
-
return v !== void 0 ?
|
|
6871
|
+
return v !== void 0 ? formatTimeseriesTooltipValue(v, unit) : "\u2014";
|
|
6854
6872
|
})
|
|
6855
6873
|
]);
|
|
6856
6874
|
return { head, body, more: Math.max(0, timestamps.length - MAX_ROWS) };
|
|
@@ -17606,6 +17624,6 @@ function editorPreset(optionsOrDialect = "markdown") {
|
|
|
17606
17624
|
return extensions;
|
|
17607
17625
|
}
|
|
17608
17626
|
|
|
17609
|
-
export { AGG_OPTIONS, CANONICAL_BLOCK_TYPES, CLAUSE_META, ComposerRegistry, DEFAULT_DIAGNOSTICS_DEBOUNCE_MS, DEFAULT_OUTPUT_FILTERS, DEFAULT_PRIMARY_FILTER, DefaultFrontmatterWidget, EditorDialog, GROUPBY_OPTIONS, GoalRings, INTERNAL_FRONTMATTER_KEYS, KIND_OPTIONS, METRIC_OPTIONS, MULTI_VALUE_TYPES, MetricBadge, OUTPUT_TYPE_CLASS, OUTPUT_TYPE_DOT, OutputFilterPills, OutputStatementsTable, PLANE_OPTIONS, PRBadge, ProposedMetricBadge, QueryBlockView, QueryObjectBuilder, QueryValue, ROLLUP_OPTIONS, RowsResultsChrome, RowsTable, SERIES_COLORS, SOURCE_OPTIONS, SUGGESTION_BINDINGS, StackedBar, TARGET_OPTIONS, TIME_OPTIONS, TONE_CLASS, TokenSlotPill, TopList, UNIT_OPTIONS, WHERE_AGGREGATORS, WHERE_METRICS, WidgetChart, WidgetProblemBadge, WqlBars, WqlComposer, WqlDiagnosticsStrip, WqlEmptyState, WqlQueryInspectorModal, WqlTable, WqlTimeseries, ZoneDistribution, activeCursorSection, addRuntimePanel, attachmentUrlFacet, autocompleteTooltipTheme, bindTokenParamIntoWql, bindTokenToQueryObject, blockTypesFromBlocks, canonicalSuggestionItems, cn, compactNumber, composerRegistry, computeSessionPrHighlights, configureOverlayActions, createExecutorDocumentHost, cursorFocusExtension, customCompletionSources, cycleBaselineLayer, dateRangeSlot, dispatchAddRuntimePanel, dispatchExpandRuntimePanel, dispatchGutterHighlights, dispatchRemoveRuntimePanel, editQueryClause, editingQuerySectionsField, editingWidgetsField, editorFocusField, editorFocusTracker, editorPreset, editorTheme, embedPreviewDecorations, expandRuntimePanel, extractBlockQueries, extractMetricsByCategory, fenceCompletion, findQueryBlockSection, findWorkoutErrors, forceSectionParse, formatClockTime, formatMMSS, formatTimestamp, frontmatterDebugMode, frontmatterDetailed, frontmatterKeymap, frontmatterPreview, frontmatterPreviewField, frontmatterReferenceIndex, frontmatterSource, frontmatterSuggestions, frontmatterVisibility, getClauseMeta, getCursorFocusState, getOverlayActions, getSuggestionBinding, gutterHighlightsField, gutterUnified, handleFenceAutoWrap, handleSmartUrlPaste, hashCode, inlineButtonDecoration, insertMarkdownLinkCommand, invalidateSuggestions, isEditorFocused, isInternalFrontmatterKey, isNavigableUrl, lineIdsExtension, linkOpen, linkPreview, loadSuggestions, markdownSyntaxHiding, markdownTablePreview, matchFilterTypeahead, mergeSeries, mergeSuggestionItems, mergeTagSuggestions, navigationFacet, nestedCompletion, nestedCompletionOptions, normalizeOutputFilter, normalizeSimplePipelineToAggregate, notebookSlugsFromBlocks, outputToRunResult, outputsToRunResult, patchBlockQuery, presentBadges, previewDecorations, primaryQueryOf, promoteFindToChartObject, queryBlockPreview, readSessionRpe, referenceIndexReload, registeredSectionWidgets, removeRuntimePanel, removeSeriesLayer, resolveCodeLanguage, resolveQueryDraft, runtimePanelField, saveBlockQuerySource, sectionAtPos, sectionField, sectionGeometry, sectionIdentity, sectionIdentityHistory, sectionMove, sectionRestore, sectionSaved, sessionQueryFence, sessionQueryInsert, sessionQueryWql, setEditorFocused, setFrontmatterDetailed, setFrontmatterSource, setGutterHighlights, setPrimaryQueryOnObject, setQuerySourceEditing, setSuggestionBinding, slashBlockCompletion, smartIncrement, summarizeAggregate, summarizeFind, summarizePipeline, tagsFromStaticBlocks, toChartResult, toggleCompareLayer, toggleGoalLayer, toggleInlineMarkdown, toggleWidgetEdit, tooltipTimestamp, urlAtPos, useChartShape, useComposerSlots, useSuggestions, useVisualViewportRect, useWqlStageCounts, widgetBlockPreview, wodAutoWrap, wodAutocompletion, wodCompletionSource, wodEditorKeymap, wodLinter, wodOverlayPanel, workoutLintSource, wqlToPills, wrapInTimeFence };
|
|
17610
|
-
//# sourceMappingURL=chunk-
|
|
17611
|
-
//# sourceMappingURL=chunk-
|
|
17627
|
+
export { AGG_OPTIONS, CANONICAL_BLOCK_TYPES, CLAUSE_META, ComposerRegistry, DEFAULT_DIAGNOSTICS_DEBOUNCE_MS, DEFAULT_OUTPUT_FILTERS, DEFAULT_PRIMARY_FILTER, DefaultFrontmatterWidget, EditorDialog, GROUPBY_OPTIONS, GoalRings, INTERNAL_FRONTMATTER_KEYS, KIND_OPTIONS, METRIC_OPTIONS, MULTI_VALUE_TYPES, MetricBadge, OUTPUT_TYPE_CLASS, OUTPUT_TYPE_DOT, OutputFilterPills, OutputStatementsTable, PLANE_OPTIONS, PRBadge, ProposedMetricBadge, QueryBlockView, QueryObjectBuilder, QueryValue, ROLLUP_OPTIONS, RowsResultsChrome, RowsTable, SERIES_COLORS, SOURCE_OPTIONS, SUGGESTION_BINDINGS, StackedBar, TARGET_OPTIONS, TIME_OPTIONS, TONE_CLASS, TokenSlotPill, TopList, UNIT_OPTIONS, WHERE_AGGREGATORS, WHERE_METRICS, WidgetChart, WidgetProblemBadge, WqlBars, WqlComposer, WqlDiagnosticsStrip, WqlEmptyState, WqlQueryInspectorModal, WqlTable, WqlTimeseries, ZoneDistribution, activeCursorSection, addRuntimePanel, attachmentUrlFacet, autocompleteTooltipTheme, bindTokenParamIntoWql, bindTokenToQueryObject, blockTypesFromBlocks, canonicalSuggestionItems, cn, compactNumber, composerRegistry, computeSessionPrHighlights, configureOverlayActions, createExecutorDocumentHost, cursorFocusExtension, customCompletionSources, cycleBaselineLayer, dateRangeSlot, dispatchAddRuntimePanel, dispatchExpandRuntimePanel, dispatchGutterHighlights, dispatchRemoveRuntimePanel, editQueryClause, editingQuerySectionsField, editingWidgetsField, editorFocusField, editorFocusTracker, editorPreset, editorTheme, embedPreviewDecorations, expandRuntimePanel, extractBlockQueries, extractMetricsByCategory, fenceCompletion, findQueryBlockSection, findWorkoutErrors, forceSectionParse, formatClockTime, formatMMSS, formatTimeseriesTick, formatTimeseriesTooltipValue, formatTimestamp, frontmatterDebugMode, frontmatterDetailed, frontmatterKeymap, frontmatterPreview, frontmatterPreviewField, frontmatterReferenceIndex, frontmatterSource, frontmatterSuggestions, frontmatterVisibility, getClauseMeta, getCursorFocusState, getOverlayActions, getSuggestionBinding, gutterHighlightsField, gutterUnified, handleFenceAutoWrap, handleSmartUrlPaste, hashCode, inlineButtonDecoration, insertMarkdownLinkCommand, invalidateSuggestions, isEditorFocused, isInternalFrontmatterKey, isNavigableUrl, lineIdsExtension, linkOpen, linkPreview, loadSuggestions, markdownSyntaxHiding, markdownTablePreview, matchFilterTypeahead, mergeSeries, mergeSuggestionItems, mergeTagSuggestions, navigationFacet, nestedCompletion, nestedCompletionOptions, normalizeOutputFilter, normalizeSimplePipelineToAggregate, notebookSlugsFromBlocks, outputToRunResult, outputsToRunResult, patchBlockQuery, presentBadges, previewDecorations, primaryQueryOf, promoteFindToChartObject, queryBlockPreview, readSessionRpe, referenceIndexReload, registeredSectionWidgets, removeRuntimePanel, removeSeriesLayer, resolveCodeLanguage, resolveQueryDraft, runtimePanelField, saveBlockQuerySource, sectionAtPos, sectionField, sectionGeometry, sectionIdentity, sectionIdentityHistory, sectionMove, sectionRestore, sectionSaved, sessionQueryFence, sessionQueryInsert, sessionQueryWql, setEditorFocused, setFrontmatterDetailed, setFrontmatterSource, setGutterHighlights, setPrimaryQueryOnObject, setQuerySourceEditing, setSuggestionBinding, slashBlockCompletion, smartIncrement, summarizeAggregate, summarizeFind, summarizePipeline, tagsFromStaticBlocks, toChartResult, toggleCompareLayer, toggleGoalLayer, toggleInlineMarkdown, toggleWidgetEdit, tooltipTimestamp, urlAtPos, useChartShape, useComposerSlots, useSuggestions, useVisualViewportRect, useWqlStageCounts, widgetBlockPreview, wodAutoWrap, wodAutocompletion, wodCompletionSource, wodEditorKeymap, wodLinter, wodOverlayPanel, workoutLintSource, wqlToPills, wrapInTimeFence };
|
|
17628
|
+
//# sourceMappingURL=chunk-VYFKXF46.mjs.map
|
|
17629
|
+
//# sourceMappingURL=chunk-VYFKXF46.mjs.map
|