@bitcobblers/wod-wiki-core 0.45.2167 → 0.47.2169

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/index.d.cts CHANGED
@@ -23,7 +23,7 @@ type MetricOwnershipLayer = 'parser' | 'dialect' | 'user-plan' | 'runtime' | 'us
23
23
  * - 'user-plan': Planned override set by user before execution
24
24
  */
25
25
  type MetricAction = 'suppress';
26
- type MetricOrigin = 'parser' | 'compiler' | 'dialect' | 'runtime' | 'user' | 'collected' | 'hinted' | 'tracked' | 'analyzed' | 'analyzed-estimated' | 'execution' | 'user-plan';
26
+ type MetricOrigin = 'parser' | 'compiler' | 'dialect' | 'runtime' | 'user' | 'collected' | 'hinted' | 'tracked' | 'analyzed' | 'analyzed-estimated' | 'execution' | 'user-plan' | 'diagnostic';
27
27
  type Origin = MetricOrigin;
28
28
  interface IMetric {
29
29
  readonly image?: string;
@@ -165,6 +165,8 @@ declare enum MetricType {
165
165
  TIS = "tis",
166
166
  /** Runtime-layer calculated metric emitted from declarative formulas */
167
167
  Calculated = "calculated",
168
+ /** Skipped-Dependency Diagnostic emitted by the Metric Shake-Out Queue */
169
+ Diagnostic = "diagnostic",
168
170
  /**
169
171
  * **Choice** (Parser) — a pipe-separated OR expression.
170
172
  *
@@ -1892,13 +1894,13 @@ declare function patchFrontmatterProperty(raw: string, path: readonly string[],
1892
1894
  * Auto-generated build version metadata.
1893
1895
  * Do not edit directly; updated by scripts/stamp-version.ts
1894
1896
  */
1895
- declare const VERSION = "0.45.2167";
1896
- declare const GIT_SHA = "d9859fd";
1897
- declare const BUILD_TIME = "2026-10-26T20:26:47.975Z";
1897
+ declare const VERSION = "0.47.2169";
1898
+ declare const GIT_SHA = "388d659";
1899
+ declare const BUILD_TIME = "2026-10-26T23:06:14.030Z";
1898
1900
  declare const SEMVER: {
1899
- readonly version: "0.45.2167";
1900
- readonly gitSha: "d9859fd";
1901
- readonly buildTime: "2026-10-26T20:26:47.975Z";
1901
+ readonly version: "0.47.2169";
1902
+ readonly gitSha: "388d659";
1903
+ readonly buildTime: "2026-10-26T23:06:14.030Z";
1902
1904
  };
1903
1905
 
1904
1906
  export { type AnalyticsDataPoint, type AnalyticsGraphConfig, type AnalyticsGroup, type Attachment, BUILD_TIME, BUILTIN_NOTEBOOKS, type BlockEffort, type BlockEquipment, type BlockIndexRow, BlockKey, type BlockRevision, type BuiltinNotebookSpec, type CatalogBackfillState, CodeMetadata, CodeStatement, DEFAULT_NOTEBOOK_SLUGS, type DefaultNotebookSlug, type DialectAnalysis, type DimensionKey, type DisplayStatus, type EventGrain, type EventRecord, type FeedId, type FeedOrigin, type FenceDialect, type FieldCatalogEntry, type FieldContribution, type FieldLeaf, type FieldRef, type FieldSourceRecord, type FieldValueKind, type FieldValueRecord, type FrontMatterSubtype, type FrontmatterPatchValue, GIT_SHA, type IBlockKey, type ICodeMetadata, type ICodeStatement, type IDialect, type IDialectTagDescriptor, type IMetric, type IMetricOwnershipResolver, type IMetricSource, type IOutputStatement, type IScript, type ITagSource, KNOWN_OUTPUT_TYPES, KNOWN_SECTION_WIDGETS, LEGACY_ORIGIN_TO_OWNERSHIP_LAYER, METRIC_OWNERSHIP_LAYER_CHAIN, type Membership, Metric, type MetricAction, MetricContainer, type MetricFilter, type MetricOrigin, type MetricOwnershipLayer, type MetricOwnershipLedger, type MetricOwnershipOutcome, type MetricOwnershipPromotionCandidate, type MetricOwnershipQuery, type MetricOwnershipResolvedContribution, type MetricOwnershipTypeExplanation, type MetricTemporal, MetricType, type MetricWithOptionalOwnershipLayer, NOTEBOOK_TAG_PREFIX, type Note, type NoteBlock, type NoteBlockChange, type NoteBlockKind, type NoteKind, type NotePlacement, type NoteTag, type Notebook, type NotebookId, type NotebookOrigin, type NullValueKind, type Origin, OutputStatement, type OutputStatementOptions, type OutputStatementType, OwnershipResolver, type Page, type PageNote, type PageTarget, type ParseError, ParsedCodeStatement, type PlacementProjection, REFERENCE_METADATA_KEY, type ReconcileNoteBlocksOptions, type ReducerStats, type ReferenceDiagnostic, type ReferenceDiagnosticReason, type ReferenceKind, type ReferenceMatchKind, type ReferenceMetadata, type ReferenceRef, type ResultOrigin, SEMVER, SYSTEM_DEFAULT_OUTPUT_UNIT, type ScriptBlock, type ScriptBlockState, type Section, type SectionDocument, type SectionRecognitionOptions, type SectionType, type Segment, type Session, type StoredOutputStatement, type SummaryCoverage, TAG_REFERENCE_METADATA_KEY, type Tag, type TagContribution, type TagDefinition, type TagFunctionContribution, type TagIndex, type TagMetricContribution, type TagReferenceMetadata, type TagTagContribution, type TagType, type TagTypeRecord, type TimeSpan, UNIT_CATALOG, UnitConversionError, type UnitDefinition, type UnitErrorCode, VALID_FENCE_DIALECTS, VERSION, type VisualizerFilter, type VisualizerSize, type WorkoutResults, type WorkoutSectionType, actionableSectionKind, blockContentId, buildRawContent, calculateTotalLines, comparePlacements, convertViaCatalog, createMetricOwnershipLedger, createTagIndex, detectScriptBlocks, dimensionKeyOf, extractBlockContent, fieldRefFromKey, fieldRefKey, findBlockAtLine, flattenFieldLeaves, fromNotebookTag, getMetricOwnershipLayer, getReferenceMetadata, getTagReference, isNoteEditable, isNotebookTag, isWorkoutSectionType, lookupUnit, mapNoteBlockChanges, matchDialectFence, normalizeFieldComponent, normalizeFieldPath, notebookSlugFromId, orderPlacements, ownershipRank, parseDocumentSections, patchFrontmatterProperty, projectPlacements, reconcileNoteBlocks, resolveLayer, resolvePlacements, runAffordance, systemDefaultUnit, toNotebookId, toNotebookTag, validateNoteBlocks, valueKindOf };
package/dist/index.d.ts CHANGED
@@ -23,7 +23,7 @@ type MetricOwnershipLayer = 'parser' | 'dialect' | 'user-plan' | 'runtime' | 'us
23
23
  * - 'user-plan': Planned override set by user before execution
24
24
  */
25
25
  type MetricAction = 'suppress';
26
- type MetricOrigin = 'parser' | 'compiler' | 'dialect' | 'runtime' | 'user' | 'collected' | 'hinted' | 'tracked' | 'analyzed' | 'analyzed-estimated' | 'execution' | 'user-plan';
26
+ type MetricOrigin = 'parser' | 'compiler' | 'dialect' | 'runtime' | 'user' | 'collected' | 'hinted' | 'tracked' | 'analyzed' | 'analyzed-estimated' | 'execution' | 'user-plan' | 'diagnostic';
27
27
  type Origin = MetricOrigin;
28
28
  interface IMetric {
29
29
  readonly image?: string;
@@ -165,6 +165,8 @@ declare enum MetricType {
165
165
  TIS = "tis",
166
166
  /** Runtime-layer calculated metric emitted from declarative formulas */
167
167
  Calculated = "calculated",
168
+ /** Skipped-Dependency Diagnostic emitted by the Metric Shake-Out Queue */
169
+ Diagnostic = "diagnostic",
168
170
  /**
169
171
  * **Choice** (Parser) — a pipe-separated OR expression.
170
172
  *
@@ -1892,13 +1894,13 @@ declare function patchFrontmatterProperty(raw: string, path: readonly string[],
1892
1894
  * Auto-generated build version metadata.
1893
1895
  * Do not edit directly; updated by scripts/stamp-version.ts
1894
1896
  */
1895
- declare const VERSION = "0.45.2167";
1896
- declare const GIT_SHA = "d9859fd";
1897
- declare const BUILD_TIME = "2026-10-26T20:26:47.975Z";
1897
+ declare const VERSION = "0.47.2169";
1898
+ declare const GIT_SHA = "388d659";
1899
+ declare const BUILD_TIME = "2026-10-26T23:06:14.030Z";
1898
1900
  declare const SEMVER: {
1899
- readonly version: "0.45.2167";
1900
- readonly gitSha: "d9859fd";
1901
- readonly buildTime: "2026-10-26T20:26:47.975Z";
1901
+ readonly version: "0.47.2169";
1902
+ readonly gitSha: "388d659";
1903
+ readonly buildTime: "2026-10-26T23:06:14.030Z";
1902
1904
  };
1903
1905
 
1904
1906
  export { type AnalyticsDataPoint, type AnalyticsGraphConfig, type AnalyticsGroup, type Attachment, BUILD_TIME, BUILTIN_NOTEBOOKS, type BlockEffort, type BlockEquipment, type BlockIndexRow, BlockKey, type BlockRevision, type BuiltinNotebookSpec, type CatalogBackfillState, CodeMetadata, CodeStatement, DEFAULT_NOTEBOOK_SLUGS, type DefaultNotebookSlug, type DialectAnalysis, type DimensionKey, type DisplayStatus, type EventGrain, type EventRecord, type FeedId, type FeedOrigin, type FenceDialect, type FieldCatalogEntry, type FieldContribution, type FieldLeaf, type FieldRef, type FieldSourceRecord, type FieldValueKind, type FieldValueRecord, type FrontMatterSubtype, type FrontmatterPatchValue, GIT_SHA, type IBlockKey, type ICodeMetadata, type ICodeStatement, type IDialect, type IDialectTagDescriptor, type IMetric, type IMetricOwnershipResolver, type IMetricSource, type IOutputStatement, type IScript, type ITagSource, KNOWN_OUTPUT_TYPES, KNOWN_SECTION_WIDGETS, LEGACY_ORIGIN_TO_OWNERSHIP_LAYER, METRIC_OWNERSHIP_LAYER_CHAIN, type Membership, Metric, type MetricAction, MetricContainer, type MetricFilter, type MetricOrigin, type MetricOwnershipLayer, type MetricOwnershipLedger, type MetricOwnershipOutcome, type MetricOwnershipPromotionCandidate, type MetricOwnershipQuery, type MetricOwnershipResolvedContribution, type MetricOwnershipTypeExplanation, type MetricTemporal, MetricType, type MetricWithOptionalOwnershipLayer, NOTEBOOK_TAG_PREFIX, type Note, type NoteBlock, type NoteBlockChange, type NoteBlockKind, type NoteKind, type NotePlacement, type NoteTag, type Notebook, type NotebookId, type NotebookOrigin, type NullValueKind, type Origin, OutputStatement, type OutputStatementOptions, type OutputStatementType, OwnershipResolver, type Page, type PageNote, type PageTarget, type ParseError, ParsedCodeStatement, type PlacementProjection, REFERENCE_METADATA_KEY, type ReconcileNoteBlocksOptions, type ReducerStats, type ReferenceDiagnostic, type ReferenceDiagnosticReason, type ReferenceKind, type ReferenceMatchKind, type ReferenceMetadata, type ReferenceRef, type ResultOrigin, SEMVER, SYSTEM_DEFAULT_OUTPUT_UNIT, type ScriptBlock, type ScriptBlockState, type Section, type SectionDocument, type SectionRecognitionOptions, type SectionType, type Segment, type Session, type StoredOutputStatement, type SummaryCoverage, TAG_REFERENCE_METADATA_KEY, type Tag, type TagContribution, type TagDefinition, type TagFunctionContribution, type TagIndex, type TagMetricContribution, type TagReferenceMetadata, type TagTagContribution, type TagType, type TagTypeRecord, type TimeSpan, UNIT_CATALOG, UnitConversionError, type UnitDefinition, type UnitErrorCode, VALID_FENCE_DIALECTS, VERSION, type VisualizerFilter, type VisualizerSize, type WorkoutResults, type WorkoutSectionType, actionableSectionKind, blockContentId, buildRawContent, calculateTotalLines, comparePlacements, convertViaCatalog, createMetricOwnershipLedger, createTagIndex, detectScriptBlocks, dimensionKeyOf, extractBlockContent, fieldRefFromKey, fieldRefKey, findBlockAtLine, flattenFieldLeaves, fromNotebookTag, getMetricOwnershipLayer, getReferenceMetadata, getTagReference, isNoteEditable, isNotebookTag, isWorkoutSectionType, lookupUnit, mapNoteBlockChanges, matchDialectFence, normalizeFieldComponent, normalizeFieldPath, notebookSlugFromId, orderPlacements, ownershipRank, parseDocumentSections, patchFrontmatterProperty, projectPlacements, reconcileNoteBlocks, resolveLayer, resolvePlacements, runAffordance, systemDefaultUnit, toNotebookId, toNotebookTag, validateNoteBlocks, valueKindOf };
package/dist/index.mjs CHANGED
@@ -18,7 +18,8 @@ var LEGACY_ORIGIN_TO_OWNERSHIP_LAYER = {
18
18
  "analyzed-estimated": "runtime",
19
19
  execution: "runtime",
20
20
  user: "user-entry",
21
- collected: "user-entry"
21
+ collected: "user-entry",
22
+ diagnostic: "runtime"
22
23
  };
23
24
  function getMetricOwnershipLayer(origin) {
24
25
  return LEGACY_ORIGIN_TO_OWNERSHIP_LAYER[origin ?? "parser"] ?? "parser";
@@ -61,6 +62,7 @@ var MetricType = /* @__PURE__ */ ((MetricType2) => {
61
62
  MetricType2["METScore"] = "met-score";
62
63
  MetricType2["TIS"] = "tis";
63
64
  MetricType2["Calculated"] = "calculated";
65
+ MetricType2["Diagnostic"] = "diagnostic";
64
66
  MetricType2["Choice"] = "choice";
65
67
  return MetricType2;
66
68
  })(MetricType || {});
@@ -1160,7 +1162,7 @@ function frontmatterSubtype(properties) {
1160
1162
  if (host === "youtu.be" || host === "youtube.com" || host.endsWith(".youtube.com")) return "youtube";
1161
1163
  if (host === "strava.com" || host.endsWith(".strava.com")) return "strava";
1162
1164
  if (host === "amzn.to" || host === "amazon.com" || host.endsWith(".amazon.com")) return "amazon";
1163
- if (["baseAttributes", "discipline", "effortType", "targetRPE", "equipment", "aliases", "derivation"].some((key) => key in properties)) return "effort";
1165
+ if (["baseAttributes", "metrics.met", "discipline", "effortType", "targetRPE", "equipment", "aliases", "derivation"].some((key) => key in properties)) return "effort";
1164
1166
  if (["slug", "label", "registrySource", "ownerNoteId", "sourcePath"].some((key) => key in properties)) return "equipment";
1165
1167
  return "default";
1166
1168
  }
@@ -1253,7 +1255,7 @@ function parseDocumentSections(content, options = {}) {
1253
1255
  let close = line + 1;
1254
1256
  while (close < lines.length && lines[close].trim() !== "---" && !/^(`{3,}|~{3,})/.test(lines[close].trim())) close++;
1255
1257
  const inner = lines.slice(line + 1, close);
1256
- if (lines[close]?.trim() === "---" && inner.some((value) => /^[A-Za-z_][\w-]*\s*:/.test(value.trim()))) {
1258
+ if (lines[close]?.trim() === "---" && inner.some((value) => /^[A-Za-z_][\w.-]*\s*:/.test(value.trim()))) {
1257
1259
  const section2 = make("frontmatter", line, close);
1258
1260
  section2.contentFrom = offsets[line + 1];
1259
1261
  section2.contentTo = offsets[close];
@@ -1477,14 +1479,22 @@ function patchFrontmatterProperty(raw, path, value) {
1477
1479
  return raw.length ? block + raw : block;
1478
1480
  }
1479
1481
  const lines = m[1] === "" ? [] : m[1].split(/\r?\n/);
1482
+ let effectivePath = path;
1483
+ if (path.length === 1 && path[0].includes(".") && findProperty(lines, path[0], 0, 0, lines.length) === -1) {
1484
+ const split = path[0].split(".");
1485
+ const rootIdx = findProperty(lines, split[0], 0, 0, lines.length);
1486
+ if (rootIdx !== -1 && propertyExtent(lines, rootIdx, 0).length > 1) {
1487
+ effectivePath = split;
1488
+ }
1489
+ }
1480
1490
  let searchStart = 0;
1481
1491
  let searchEnd = lines.length;
1482
1492
  let foundDepth = -1;
1483
1493
  let foundIdx = -1;
1484
1494
  let foundExtent = [];
1485
- for (let d = 0; d < path.length; d++) {
1495
+ for (let d = 0; d < effectivePath.length; d++) {
1486
1496
  const indent = d * 2;
1487
- const idx = findProperty(lines, path[d], indent, searchStart, searchEnd);
1497
+ const idx = findProperty(lines, effectivePath[d], indent, searchStart, searchEnd);
1488
1498
  if (idx === -1) break;
1489
1499
  foundDepth = d;
1490
1500
  foundIdx = idx;
@@ -1493,11 +1503,11 @@ function patchFrontmatterProperty(raw, path, value) {
1493
1503
  searchEnd = foundExtent[foundExtent.length - 1] + 1;
1494
1504
  }
1495
1505
  if (value === null) {
1496
- if (foundDepth !== path.length - 1) return raw;
1506
+ if (foundDepth !== effectivePath.length - 1) return raw;
1497
1507
  const doomed = new Set(foundExtent);
1498
1508
  for (let d = foundDepth - 1; d >= 0; d--) {
1499
1509
  const indent = d * 2;
1500
- const idx = findProperty(lines, path[d], indent, 0, lines.length);
1510
+ const idx = findProperty(lines, effectivePath[d], indent, 0, lines.length);
1501
1511
  if (idx === -1 || doomed.has(idx)) break;
1502
1512
  let hasChild = false;
1503
1513
  for (let j = idx + 1; j < lines.length; j++) {
@@ -1516,8 +1526,8 @@ function patchFrontmatterProperty(raw, path, value) {
1516
1526
  let spliceIndex;
1517
1527
  let removeCount;
1518
1528
  let replacement;
1519
- if (foundDepth === path.length - 1) {
1520
- replacement = propertyLines(foundDepth * 2, path[foundDepth], value);
1529
+ if (foundDepth === effectivePath.length - 1) {
1530
+ replacement = propertyLines(foundDepth * 2, effectivePath[foundDepth], value);
1521
1531
  if (!isList(value)) {
1522
1532
  const ci = inlineCommentIndex(lines[foundIdx]);
1523
1533
  if (ci !== -1) {
@@ -1530,7 +1540,7 @@ function patchFrontmatterProperty(raw, path, value) {
1530
1540
  } else {
1531
1541
  spliceIndex = foundDepth === -1 ? lines.length : searchEnd;
1532
1542
  removeCount = 0;
1533
- replacement = missingChainLines(path, foundDepth + 1, value, (foundDepth + 1) * 2);
1543
+ replacement = missingChainLines(effectivePath, foundDepth + 1, value, (foundDepth + 1) * 2);
1534
1544
  }
1535
1545
  const next = [...lines];
1536
1546
  next.splice(spliceIndex, removeCount, ...replacement);
@@ -1538,13 +1548,13 @@ function patchFrontmatterProperty(raw, path, value) {
1538
1548
  }
1539
1549
 
1540
1550
  // src/version.ts
1541
- var VERSION = "0.45.2167";
1542
- var GIT_SHA = "d9859fd";
1543
- var BUILD_TIME = "2026-10-26T20:26:47.975Z";
1551
+ var VERSION = "0.47.2169";
1552
+ var GIT_SHA = "388d659";
1553
+ var BUILD_TIME = "2026-10-26T23:06:14.030Z";
1544
1554
  var SEMVER = {
1545
- version: "0.45.2167",
1546
- gitSha: "d9859fd",
1547
- buildTime: "2026-10-26T20:26:47.975Z"
1555
+ version: "0.47.2169",
1556
+ gitSha: "388d659",
1557
+ buildTime: "2026-10-26T23:06:14.030Z"
1548
1558
  };
1549
1559
 
1550
1560
  export { BUILD_TIME, BUILTIN_NOTEBOOKS, BlockKey, CodeMetadata, CodeStatement, DEFAULT_NOTEBOOK_SLUGS, GIT_SHA, KNOWN_OUTPUT_TYPES, KNOWN_SECTION_WIDGETS, LEGACY_ORIGIN_TO_OWNERSHIP_LAYER, METRIC_OWNERSHIP_LAYER_CHAIN, Metric, MetricContainer, MetricType, NOTEBOOK_TAG_PREFIX, OutputStatement, OwnershipResolver, ParsedCodeStatement, REFERENCE_METADATA_KEY, SEMVER, SYSTEM_DEFAULT_OUTPUT_UNIT, TAG_REFERENCE_METADATA_KEY, UNIT_CATALOG, UnitConversionError, VALID_FENCE_DIALECTS, VERSION, actionableSectionKind, blockContentId, buildRawContent, calculateTotalLines, comparePlacements, convertViaCatalog, createMetricOwnershipLedger, createTagIndex, detectScriptBlocks, dimensionKeyOf, extractBlockContent, fieldRefFromKey, fieldRefKey, findBlockAtLine, flattenFieldLeaves, fromNotebookTag, getMetricOwnershipLayer, getReferenceMetadata, getTagReference, isNoteEditable, isNotebookTag, isWorkoutSectionType, lookupUnit, mapNoteBlockChanges, matchDialectFence, normalizeFieldComponent, normalizeFieldPath, notebookSlugFromId, orderPlacements, ownershipRank, parseDocumentSections, patchFrontmatterProperty, projectPlacements, reconcileNoteBlocks, resolveLayer, resolvePlacements, runAffordance, systemDefaultUnit, toNotebookId, toNotebookTag, validateNoteBlocks, valueKindOf };