@bitcobblers/wod-wiki-ui 0.6.32 → 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.
@@ -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-V2JNLN54.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-OFXIDA6Z.mjs';
2
2
  //# sourceMappingURL=index.mjs.map
3
3
  //# sourceMappingURL=index.mjs.map
package/dist/index.cjs CHANGED
@@ -1174,14 +1174,8 @@ function AnalyticsUnitPreference({ className, unit: unitProp, forced = false, st
1174
1174
  );
1175
1175
  }
1176
1176
  function formatRunHeader(run) {
1177
- const end = run.result.data.endTime ?? run.result.createdAt;
1178
- const date = new Date(end).toLocaleDateString(void 0, { month: "short", day: "numeric" });
1179
- const durationMs = run.result.data.duration;
1180
- if (!durationMs) return date;
1181
- const totalSeconds = Math.round(durationMs / 1e3);
1182
- const minutes = Math.floor(totalSeconds / 60);
1183
- const seconds = String(totalSeconds % 60).padStart(2, "0");
1184
- return `${date} \u2014 ${minutes}:${seconds}`;
1177
+ const date = new Date(run.timestamp).toLocaleDateString(void 0, { month: "short", day: "numeric" });
1178
+ return date;
1185
1179
  }
1186
1180
  function PlainSegmentList({ segments }) {
1187
1181
  if (segments.length === 0) {
@@ -1209,10 +1203,14 @@ function RowsTable({
1209
1203
  renderSegments
1210
1204
  }) {
1211
1205
  const runs = React.useMemo(
1212
- () => result.runs.map((run) => ({
1213
- run,
1214
- segments: wodWikiLang.getAnalyticsFromLogs(run.logs, run.result.data.startTime).segments
1215
- })),
1206
+ () => result.runs.map((run) => {
1207
+ const statements = run.events;
1208
+ const startTime = run.events[0]?.timeSpan?.started ?? run.timestamp;
1209
+ return {
1210
+ run,
1211
+ segments: wodWikiLang.getAnalyticsFromLogs(statements, startTime).segments
1212
+ };
1213
+ }),
1216
1214
  [result]
1217
1215
  );
1218
1216
  if (runs.length === 0) {
@@ -1224,12 +1222,12 @@ function RowsTable({
1224
1222
  renderRunHeaderExtra?.(run)
1225
1223
  ] }),
1226
1224
  renderSegments ? renderSegments(segments, run) : /* @__PURE__ */ jsxRuntime.jsx(PlainSegmentList, { segments })
1227
- ] }, run.result.id)) });
1225
+ ] }, run.resultId)) });
1228
1226
  }
1229
1227
  var RPE_SCALE = Array.from({ length: 10 }, (_, i) => i + 1);
1230
- function readSessionRpe(logs) {
1231
- if (!logs) return void 0;
1232
- for (const statement of logs) {
1228
+ function readSessionRpe(events) {
1229
+ if (!events) return void 0;
1230
+ for (const statement of events) {
1233
1231
  for (const metric of statement.metrics) {
1234
1232
  if (metric.type === wodWikiCore.MetricType.SessionRPE || metric.type === "session_rpe") {
1235
1233
  if (typeof metric.value === "number") return metric.value;
@@ -1240,11 +1238,11 @@ function readSessionRpe(logs) {
1240
1238
  }
1241
1239
  function RpeChip({
1242
1240
  resultId,
1243
- logs,
1241
+ events,
1244
1242
  readOnly,
1245
1243
  onCapture
1246
1244
  }) {
1247
- const value = readSessionRpe(logs);
1245
+ const value = readSessionRpe(events);
1248
1246
  const [open, setOpen] = React.useState(false);
1249
1247
  const [pending, setPending] = React.useState(false);
1250
1248
  if (readOnly) {
@@ -1308,7 +1306,7 @@ function RowsResultsChrome({
1308
1306
  const [widened, setWidened] = React.useState(false);
1309
1307
  const [wideResult, setWideResult] = React.useState(void 0);
1310
1308
  const sessionRun = sessionResult.runs[0];
1311
- const blockContentId2 = sessionRun?.result.blockContentId;
1309
+ const blockContentId2 = sessionRun?.events[0]?.blockContentId;
1312
1310
  const handleCapture = React.useCallback(
1313
1311
  async (rpe) => {
1314
1312
  if (onCaptureRpe) {
@@ -1376,7 +1374,7 @@ function RowsResultsChrome({
1376
1374
  RpeChip,
1377
1375
  {
1378
1376
  resultId,
1379
- logs: sessionRun?.logs,
1377
+ events: sessionRun?.events,
1380
1378
  onCapture: handleCapture
1381
1379
  }
1382
1380
  ) })
@@ -1386,7 +1384,7 @@ function RowsResultsChrome({
1386
1384
  {
1387
1385
  result: displayedResult,
1388
1386
  renderSegments,
1389
- renderRunHeaderExtra: (run) => run.result.id === resultId ? /* @__PURE__ */ jsxRuntime.jsx(RpeChip, { resultId, logs: run.logs, onCapture: handleCapture }) : /* @__PURE__ */ jsxRuntime.jsx(RpeChip, { resultId: run.result.id, logs: run.logs, readOnly: true, onCapture: handleCapture })
1387
+ renderRunHeaderExtra: (run) => run.resultId === resultId ? /* @__PURE__ */ jsxRuntime.jsx(RpeChip, { resultId, events: run.events, onCapture: handleCapture }) : /* @__PURE__ */ jsxRuntime.jsx(RpeChip, { resultId: run.resultId, events: run.events, readOnly: true, onCapture: handleCapture })
1390
1388
  }
1391
1389
  )
1392
1390
  ] });
@@ -10786,13 +10784,13 @@ function editorPreset(optionsOrDialect = "markdown") {
10786
10784
  }
10787
10785
 
10788
10786
  // src/version.ts
10789
- var VERSION = "0.6.32";
10790
- var GIT_SHA = "bc13c0f";
10791
- var BUILD_TIME = "2026-08-21T20:12:50.453Z";
10787
+ var VERSION = "0.6.36";
10788
+ var GIT_SHA = "c5ad2b0";
10789
+ var BUILD_TIME = "2026-08-24T20:14:33.951Z";
10792
10790
  var SEMVER = {
10793
- version: "0.6.32",
10794
- gitSha: "bc13c0f",
10795
- buildTime: "2026-08-21T20:12:50.453Z"
10791
+ version: "0.6.36",
10792
+ gitSha: "c5ad2b0",
10793
+ buildTime: "2026-08-24T20:14:33.951Z"
10796
10794
  };
10797
10795
 
10798
10796
  exports.AGG_OPTIONS = AGG_OPTIONS;