@bitcobblers/wod-wiki-ui 0.6.31 → 0.6.36
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-V2JNLN54.mjs → chunk-OFXIDA6Z.mjs} +21 -23
- package/dist/chunk-OFXIDA6Z.mjs.map +1 -0
- package/dist/extensions/index.cjs +19 -21
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.mjs +1 -1
- package/dist/index.cjs +25 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-V2JNLN54.mjs.map +0 -1
|
@@ -1661,14 +1661,8 @@ var cursorFocusExtension = [
|
|
|
1661
1661
|
cursorFocusInternal
|
|
1662
1662
|
];
|
|
1663
1663
|
function formatRunHeader(run) {
|
|
1664
|
-
const
|
|
1665
|
-
|
|
1666
|
-
const durationMs = run.result.data.duration;
|
|
1667
|
-
if (!durationMs) return date;
|
|
1668
|
-
const totalSeconds = Math.round(durationMs / 1e3);
|
|
1669
|
-
const minutes = Math.floor(totalSeconds / 60);
|
|
1670
|
-
const seconds = String(totalSeconds % 60).padStart(2, "0");
|
|
1671
|
-
return `${date} \u2014 ${minutes}:${seconds}`;
|
|
1664
|
+
const date = new Date(run.timestamp).toLocaleDateString(void 0, { month: "short", day: "numeric" });
|
|
1665
|
+
return date;
|
|
1672
1666
|
}
|
|
1673
1667
|
function PlainSegmentList({ segments }) {
|
|
1674
1668
|
if (segments.length === 0) {
|
|
@@ -1696,10 +1690,14 @@ function RowsTable({
|
|
|
1696
1690
|
renderSegments
|
|
1697
1691
|
}) {
|
|
1698
1692
|
const runs = useMemo(
|
|
1699
|
-
() => result.runs.map((run) =>
|
|
1700
|
-
run
|
|
1701
|
-
|
|
1702
|
-
|
|
1693
|
+
() => result.runs.map((run) => {
|
|
1694
|
+
const statements = run.events;
|
|
1695
|
+
const startTime = run.events[0]?.timeSpan?.started ?? run.timestamp;
|
|
1696
|
+
return {
|
|
1697
|
+
run,
|
|
1698
|
+
segments: getAnalyticsFromLogs(statements, startTime).segments
|
|
1699
|
+
};
|
|
1700
|
+
}),
|
|
1703
1701
|
[result]
|
|
1704
1702
|
);
|
|
1705
1703
|
if (runs.length === 0) {
|
|
@@ -1711,12 +1709,12 @@ function RowsTable({
|
|
|
1711
1709
|
renderRunHeaderExtra?.(run)
|
|
1712
1710
|
] }),
|
|
1713
1711
|
renderSegments ? renderSegments(segments, run) : /* @__PURE__ */ jsx(PlainSegmentList, { segments })
|
|
1714
|
-
] }, run.
|
|
1712
|
+
] }, run.resultId)) });
|
|
1715
1713
|
}
|
|
1716
1714
|
var RPE_SCALE = Array.from({ length: 10 }, (_, i) => i + 1);
|
|
1717
|
-
function readSessionRpe(
|
|
1718
|
-
if (!
|
|
1719
|
-
for (const statement of
|
|
1715
|
+
function readSessionRpe(events) {
|
|
1716
|
+
if (!events) return void 0;
|
|
1717
|
+
for (const statement of events) {
|
|
1720
1718
|
for (const metric of statement.metrics) {
|
|
1721
1719
|
if (metric.type === MetricType.SessionRPE || metric.type === "session_rpe") {
|
|
1722
1720
|
if (typeof metric.value === "number") return metric.value;
|
|
@@ -1727,11 +1725,11 @@ function readSessionRpe(logs) {
|
|
|
1727
1725
|
}
|
|
1728
1726
|
function RpeChip({
|
|
1729
1727
|
resultId,
|
|
1730
|
-
|
|
1728
|
+
events,
|
|
1731
1729
|
readOnly,
|
|
1732
1730
|
onCapture
|
|
1733
1731
|
}) {
|
|
1734
|
-
const value = readSessionRpe(
|
|
1732
|
+
const value = readSessionRpe(events);
|
|
1735
1733
|
const [open, setOpen] = useState(false);
|
|
1736
1734
|
const [pending, setPending] = useState(false);
|
|
1737
1735
|
if (readOnly) {
|
|
@@ -1795,7 +1793,7 @@ function RowsResultsChrome({
|
|
|
1795
1793
|
const [widened, setWidened] = useState(false);
|
|
1796
1794
|
const [wideResult, setWideResult] = useState(void 0);
|
|
1797
1795
|
const sessionRun = sessionResult.runs[0];
|
|
1798
|
-
const blockContentId2 = sessionRun?.
|
|
1796
|
+
const blockContentId2 = sessionRun?.events[0]?.blockContentId;
|
|
1799
1797
|
const handleCapture = useCallback(
|
|
1800
1798
|
async (rpe) => {
|
|
1801
1799
|
if (onCaptureRpe) {
|
|
@@ -1863,7 +1861,7 @@ function RowsResultsChrome({
|
|
|
1863
1861
|
RpeChip,
|
|
1864
1862
|
{
|
|
1865
1863
|
resultId,
|
|
1866
|
-
|
|
1864
|
+
events: sessionRun?.events,
|
|
1867
1865
|
onCapture: handleCapture
|
|
1868
1866
|
}
|
|
1869
1867
|
) })
|
|
@@ -1873,7 +1871,7 @@ function RowsResultsChrome({
|
|
|
1873
1871
|
{
|
|
1874
1872
|
result: displayedResult,
|
|
1875
1873
|
renderSegments,
|
|
1876
|
-
renderRunHeaderExtra: (run) => run.
|
|
1874
|
+
renderRunHeaderExtra: (run) => run.resultId === resultId ? /* @__PURE__ */ jsx(RpeChip, { resultId, events: run.events, onCapture: handleCapture }) : /* @__PURE__ */ jsx(RpeChip, { resultId: run.resultId, events: run.events, readOnly: true, onCapture: handleCapture })
|
|
1877
1875
|
}
|
|
1878
1876
|
)
|
|
1879
1877
|
] });
|
|
@@ -10370,5 +10368,5 @@ function editorPreset(optionsOrDialect = "markdown") {
|
|
|
10370
10368
|
}
|
|
10371
10369
|
|
|
10372
10370
|
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 };
|
|
10373
|
-
//# sourceMappingURL=chunk-
|
|
10374
|
-
//# sourceMappingURL=chunk-
|
|
10371
|
+
//# sourceMappingURL=chunk-OFXIDA6Z.mjs.map
|
|
10372
|
+
//# sourceMappingURL=chunk-OFXIDA6Z.mjs.map
|