@bitcobblers/wod-wiki-core 0.51.2193 → 0.51.2195

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
@@ -1954,13 +1954,13 @@ declare function parseFrontmatterProps(lines: string[]): Record<string, string>;
1954
1954
  * Auto-generated build version metadata.
1955
1955
  * Do not edit directly; updated by scripts/stamp-version.ts
1956
1956
  */
1957
- declare const VERSION = "0.51.2193";
1958
- declare const GIT_SHA = "2b8e999";
1959
- declare const BUILD_TIME = "2026-11-04T19:02:01.054Z";
1957
+ declare const VERSION = "0.51.2195";
1958
+ declare const GIT_SHA = "79e6e99";
1959
+ declare const BUILD_TIME = "2026-11-05T22:34:59.062Z";
1960
1960
  declare const SEMVER: {
1961
- readonly version: "0.51.2193";
1962
- readonly gitSha: "2b8e999";
1963
- readonly buildTime: "2026-11-04T19:02:01.054Z";
1961
+ readonly version: "0.51.2195";
1962
+ readonly gitSha: "79e6e99";
1963
+ readonly buildTime: "2026-11-05T22:34:59.062Z";
1964
1964
  };
1965
1965
 
1966
1966
  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, type LinkWidget, 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 ParsedFrontmatter, 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, type TypedTagItem, 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, extractFrontmatterTags, extractTypedFrontmatterTags, fieldRefFromKey, fieldRefKey, findBlockAtLine, flattenFieldLeaves, fromNotebookTag, getList, getMetricOwnershipLayer, getReferenceMetadata, getScalar, getTagReference, isNoteEditable, isNotebookTag, isWorkoutSectionType, lookupUnit, mapNoteBlockChanges, matchDialectFence, normalizeFieldComponent, normalizeFieldPath, notebookSlugFromId, orderPlacements, ownershipRank, parseDocumentSections, parseFlatProperties, parseFrontmatter, parseFrontmatterBody, parseFrontmatterCategories, parseFrontmatterProps, patchFrontmatterProperty, projectPlacements, reconcileNoteBlocks, resolveLayer, resolvePlacements, runAffordance, serializeFrontmatter, stripFrontmatter, systemDefaultUnit, toNotebookId, toNotebookTag, validateNoteBlocks, valueKindOf };
package/dist/index.d.ts CHANGED
@@ -1954,13 +1954,13 @@ declare function parseFrontmatterProps(lines: string[]): Record<string, string>;
1954
1954
  * Auto-generated build version metadata.
1955
1955
  * Do not edit directly; updated by scripts/stamp-version.ts
1956
1956
  */
1957
- declare const VERSION = "0.51.2193";
1958
- declare const GIT_SHA = "2b8e999";
1959
- declare const BUILD_TIME = "2026-11-04T19:02:01.054Z";
1957
+ declare const VERSION = "0.51.2195";
1958
+ declare const GIT_SHA = "79e6e99";
1959
+ declare const BUILD_TIME = "2026-11-05T22:34:59.062Z";
1960
1960
  declare const SEMVER: {
1961
- readonly version: "0.51.2193";
1962
- readonly gitSha: "2b8e999";
1963
- readonly buildTime: "2026-11-04T19:02:01.054Z";
1961
+ readonly version: "0.51.2195";
1962
+ readonly gitSha: "79e6e99";
1963
+ readonly buildTime: "2026-11-05T22:34:59.062Z";
1964
1964
  };
1965
1965
 
1966
1966
  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, type LinkWidget, 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 ParsedFrontmatter, 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, type TypedTagItem, 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, extractFrontmatterTags, extractTypedFrontmatterTags, fieldRefFromKey, fieldRefKey, findBlockAtLine, flattenFieldLeaves, fromNotebookTag, getList, getMetricOwnershipLayer, getReferenceMetadata, getScalar, getTagReference, isNoteEditable, isNotebookTag, isWorkoutSectionType, lookupUnit, mapNoteBlockChanges, matchDialectFence, normalizeFieldComponent, normalizeFieldPath, notebookSlugFromId, orderPlacements, ownershipRank, parseDocumentSections, parseFlatProperties, parseFrontmatter, parseFrontmatterBody, parseFrontmatterCategories, parseFrontmatterProps, patchFrontmatterProperty, projectPlacements, reconcileNoteBlocks, resolveLayer, resolvePlacements, runAffordance, serializeFrontmatter, stripFrontmatter, systemDefaultUnit, toNotebookId, toNotebookTag, validateNoteBlocks, valueKindOf };
package/dist/index.mjs CHANGED
@@ -1494,11 +1494,26 @@ function patchFrontmatterProperty(raw, path, value) {
1494
1494
  }
1495
1495
  const lines = m[1] === "" ? [] : m[1].split(/\r?\n/);
1496
1496
  let effectivePath = path;
1497
- if (path.length === 1 && path[0].includes(".") && findProperty(lines, path[0], 0, 0, lines.length) === -1) {
1498
- const split = path[0].split(".");
1499
- const rootIdx = findProperty(lines, split[0], 0, 0, lines.length);
1500
- if (rootIdx !== -1 && propertyExtent(lines, rootIdx, 0).length > 1) {
1501
- effectivePath = split;
1497
+ if (path.length === 1 && findProperty(lines, path[0], 0, 0, lines.length) === -1) {
1498
+ if (path[0].includes(".")) {
1499
+ const split = path[0].split(".");
1500
+ const rootIdx = findProperty(lines, split[0], 0, 0, lines.length);
1501
+ if (rootIdx !== -1) {
1502
+ effectivePath = split;
1503
+ if (/:\s*(?:""|''|\{\})?\s*$/.test(lines[rootIdx])) {
1504
+ lines[rootIdx] = lines[rootIdx].replace(/:\s*(?:""|''|\{\})\s*$/, ":");
1505
+ }
1506
+ } else if (split[0] === "metrics" && (split[1] === "met" || split[1] === "disciplineFactor")) {
1507
+ const baseIdx = findProperty(lines, "baseAttributes", 0, 0, lines.length);
1508
+ if (baseIdx !== -1 && propertyExtent(lines, baseIdx, 0).length > 1) {
1509
+ effectivePath = ["baseAttributes", split[1]];
1510
+ }
1511
+ }
1512
+ } else if (path[0] === "discipline" || path[0] === "intensityTier") {
1513
+ const baseIdx = findProperty(lines, "baseAttributes", 0, 0, lines.length);
1514
+ if (baseIdx !== -1 && propertyExtent(lines, baseIdx, 0).length > 1) {
1515
+ effectivePath = ["baseAttributes", path[0]];
1516
+ }
1502
1517
  }
1503
1518
  }
1504
1519
  let searchStart = 0;
@@ -1587,7 +1602,7 @@ function parseMetaLines(lines) {
1587
1602
  }
1588
1603
  if (items.length > 0) {
1589
1604
  meta[key] = items;
1590
- } else if (key === "metrics" || key === "summaries" || key === "widgets") {
1605
+ } else if (key === "metrics" || key === "summaries" || key === "widgets" || key === "baseAttributes") {
1591
1606
  while (i + 1 < lines.length) {
1592
1607
  const childLine = lines[i + 1];
1593
1608
  if (/^\s*(?:#.*)?$/.test(childLine)) {
@@ -1597,7 +1612,8 @@ function parseMetaLines(lines) {
1597
1612
  const childMatch = childLine.match(/^\s{2,}([A-Za-z][\w.-]*)\s*:(.*)$/);
1598
1613
  if (!childMatch) break;
1599
1614
  i++;
1600
- const childKey = `${key}.${childMatch[1]}`;
1615
+ const childName = childMatch[1];
1616
+ const childKey = key === "baseAttributes" ? childName === "met" || childName === "disciplineFactor" ? `metrics.${childName}` : childName : `${key}.${childName}`;
1601
1617
  const childRaw = childMatch[2].trim();
1602
1618
  if (childRaw === "") {
1603
1619
  const childItems = [];
@@ -1722,13 +1738,13 @@ function parseFrontmatterProps(lines) {
1722
1738
  }
1723
1739
 
1724
1740
  // src/version.ts
1725
- var VERSION = "0.51.2193";
1726
- var GIT_SHA = "2b8e999";
1727
- var BUILD_TIME = "2026-11-04T19:02:01.054Z";
1741
+ var VERSION = "0.51.2195";
1742
+ var GIT_SHA = "79e6e99";
1743
+ var BUILD_TIME = "2026-11-05T22:34:59.062Z";
1728
1744
  var SEMVER = {
1729
- version: "0.51.2193",
1730
- gitSha: "2b8e999",
1731
- buildTime: "2026-11-04T19:02:01.054Z"
1745
+ version: "0.51.2195",
1746
+ gitSha: "79e6e99",
1747
+ buildTime: "2026-11-05T22:34:59.062Z"
1732
1748
  };
1733
1749
 
1734
1750
  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, extractFrontmatterTags, extractTypedFrontmatterTags, fieldRefFromKey, fieldRefKey, findBlockAtLine, flattenFieldLeaves, fromNotebookTag, getList, getMetricOwnershipLayer, getReferenceMetadata, getScalar, getTagReference, isNoteEditable, isNotebookTag, isWorkoutSectionType, lookupUnit, mapNoteBlockChanges, matchDialectFence, normalizeFieldComponent, normalizeFieldPath, notebookSlugFromId, orderPlacements, ownershipRank, parseDocumentSections, parseFlatProperties, parseFrontmatter, parseFrontmatterBody, parseFrontmatterCategories, parseFrontmatterProps, patchFrontmatterProperty, projectPlacements, reconcileNoteBlocks, resolveLayer, resolvePlacements, runAffordance, serializeFrontmatter, stripFrontmatter, systemDefaultUnit, toNotebookId, toNotebookTag, validateNoteBlocks, valueKindOf };