@bitcobblers/wod-wiki-wql 0.50.2189 → 0.50.2190
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.cjs +562 -169
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +92 -56
- package/dist/index.d.ts +92 -56
- package/dist/index.mjs +516 -161
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ import { LanguageSupport, HighlightStyle, LRLanguage } from '@codemirror/languag
|
|
|
3
3
|
import { Completion, CompletionContext, CompletionResult } from '@codemirror/autocomplete';
|
|
4
4
|
import { Extension } from '@codemirror/state';
|
|
5
5
|
import { SummaryCoverage, BlockIndexRow, Note, EventRecord, PageNote, Page, NotePlacement, AnalyticsDataPoint, FeedId, NotebookId, NotebookOrigin, ResultOrigin, StoredOutputStatement, NoteBlockChange } from '@bitcobblers/wod-wiki-core';
|
|
6
|
-
export { DEFAULT_NOTEBOOK_SLUGS, DefaultNotebookSlug, FeedId, NotebookId, NotebookOrigin, SYSTEM_DEFAULT_OUTPUT_UNIT, UnitConversionError, convertViaCatalog, dimensionKeyOf, isNoteEditable, lookupUnit, notebookSlugFromId, systemDefaultUnit, toNotebookId } from '@bitcobblers/wod-wiki-core';
|
|
6
|
+
export { DEFAULT_NOTEBOOK_SLUGS, DefaultNotebookSlug, FeedId, LinkWidget, NotebookId, NotebookOrigin, ParsedFrontmatter, SYSTEM_DEFAULT_OUTPUT_UNIT, TypedTagItem, UnitConversionError, convertViaCatalog, dimensionKeyOf, extractFrontmatterTags, extractTypedFrontmatterTags, getList, getScalar, isNoteEditable, lookupUnit, notebookSlugFromId, parseFlatProperties, parseFrontmatter, parseFrontmatterBody, parseFrontmatterCategories, parseFrontmatterProps, serializeFrontmatter, stripFrontmatter, systemDefaultUnit, toNotebookId } from '@bitcobblers/wod-wiki-core';
|
|
7
7
|
import { IEffort } from '@bitcobblers/wod-wiki-lang';
|
|
8
8
|
export { IEffort } from '@bitcobblers/wod-wiki-lang';
|
|
9
9
|
|
|
@@ -2159,54 +2159,6 @@ declare const DEFAULT_DASHBOARD_TITLE = "New Dashboard";
|
|
|
2159
2159
|
declare function dashboardSlug(title: string): string;
|
|
2160
2160
|
declare function buildDashboardScaffold(title?: string): string;
|
|
2161
2161
|
|
|
2162
|
-
/**
|
|
2163
|
-
* Shared frontmatter parser utilities for WQL dashboard models and notes.
|
|
2164
|
-
*/
|
|
2165
|
-
interface ParsedFrontmatter {
|
|
2166
|
-
meta: Record<string, string | number | string[]>;
|
|
2167
|
-
body: string;
|
|
2168
|
-
}
|
|
2169
|
-
interface LinkWidget {
|
|
2170
|
-
kind: 'youtube' | 'amazon' | 'strava' | 'source' | 'website' | 'book';
|
|
2171
|
-
url?: string;
|
|
2172
|
-
label: string;
|
|
2173
|
-
videoId?: string;
|
|
2174
|
-
}
|
|
2175
|
-
/**
|
|
2176
|
-
* Parse the leading YAML frontmatter block of a markdown string.
|
|
2177
|
-
*/
|
|
2178
|
-
declare function parseFrontmatter(raw: string): ParsedFrontmatter;
|
|
2179
|
-
/**
|
|
2180
|
-
* Parse frontmatter body content (the lines between the `---` delimiters).
|
|
2181
|
-
*/
|
|
2182
|
-
declare function parseFrontmatterBody(innerContent: string): ParsedFrontmatter['meta'];
|
|
2183
|
-
/**
|
|
2184
|
-
* Serialize frontmatter metadata back to YAML body lines.
|
|
2185
|
-
*/
|
|
2186
|
-
declare function serializeFrontmatter(meta: ParsedFrontmatter['meta']): string;
|
|
2187
|
-
/** Body of `raw` with the leading frontmatter block removed. */
|
|
2188
|
-
declare function stripFrontmatter(raw: string): string;
|
|
2189
|
-
/** Scalar value at `key`, or `undefined` when absent or a list. */
|
|
2190
|
-
declare function getScalar(meta: ParsedFrontmatter['meta'], key: string): string | number | undefined;
|
|
2191
|
-
/** List value at `key`, or `[]` when absent or a scalar. */
|
|
2192
|
-
declare function getList(meta: ParsedFrontmatter['meta'], key: string): string[];
|
|
2193
|
-
/**
|
|
2194
|
-
* Parse the `category` YAML array from a full markdown string's frontmatter.
|
|
2195
|
-
*/
|
|
2196
|
-
declare function parseFrontmatterCategories(raw: string): string[];
|
|
2197
|
-
/**
|
|
2198
|
-
* Extract the `tags` list from a frontmatter block's raw content.
|
|
2199
|
-
*/
|
|
2200
|
-
declare function extractFrontmatterTags(raw: string): string[];
|
|
2201
|
-
/**
|
|
2202
|
-
* Parse flat scalar key-value pairs from raw inner content (no delimiters).
|
|
2203
|
-
*/
|
|
2204
|
-
declare function parseFlatProperties(innerContent: string): Record<string, string>;
|
|
2205
|
-
/**
|
|
2206
|
-
* Parse scalar key-value pairs from an array of lines.
|
|
2207
|
-
*/
|
|
2208
|
-
declare function parseFrontmatterProps(lines: string[]): Record<string, string>;
|
|
2209
|
-
|
|
2210
2162
|
/**
|
|
2211
2163
|
* Dashboard note operations — pure markdown↔markdown transforms over the
|
|
2212
2164
|
* locked dashboard-note format (#899). Every operation:
|
|
@@ -2307,17 +2259,101 @@ declare function resizeWidget(raw: string, key: string, expectedBody: string, sp
|
|
|
2307
2259
|
*/
|
|
2308
2260
|
declare function migrateLegacyDashboardBodies(raw: string): string;
|
|
2309
2261
|
|
|
2262
|
+
/**
|
|
2263
|
+
* entityScope — Deep WQL Entity Scope module.
|
|
2264
|
+
*
|
|
2265
|
+
* Maps any domain entity (Note, Property Note: Effort / Equipment / Tag /
|
|
2266
|
+
* Tag Category, Notebook / Collection, Feed, Session, or raw WQL query) to its
|
|
2267
|
+
* canonical WQL scope predicates (`notesWql`, `sessionsWql`, `recordsWql`,
|
|
2268
|
+
* `blocksWql`, `scopeFilter`), token values (`$scope`, `$note`, `$effort`,
|
|
2269
|
+
* `$equipment`, `$tag`, `$notebook`, `$feed`), and dashboard promotion
|
|
2270
|
+
* scaffold (`buildDashboardFromEntityScope` / `buildDashboardFromWql`).
|
|
2271
|
+
*
|
|
2272
|
+
* Pure module — zero DOM or storage dependencies.
|
|
2273
|
+
*/
|
|
2274
|
+
|
|
2275
|
+
type EntityScopeKind = 'note' | 'effort' | 'equipment' | 'tag' | 'tag-category' | 'notebook' | 'feed' | 'session' | 'wql';
|
|
2276
|
+
interface EntityScopeDescriptor {
|
|
2277
|
+
kind: EntityScopeKind;
|
|
2278
|
+
/** Canonical entity or route identifier (e.g. `effort/thruster`, `notebook/crossfit-girls`, `note-uuid`). */
|
|
2279
|
+
id: string;
|
|
2280
|
+
/** Primary slug or key within the kind (e.g. `thruster`, `kettlebell`, `crossfit-girls`). */
|
|
2281
|
+
slug: string;
|
|
2282
|
+
/** Optional Tag Category when kind === 'tag' or 'tag-category'. */
|
|
2283
|
+
category?: string;
|
|
2284
|
+
/** Human-readable display label. */
|
|
2285
|
+
label: string;
|
|
2286
|
+
/** Canonical filter clause (`key:value`) narrowing WQL queries to this entity. */
|
|
2287
|
+
scopeFilter: string;
|
|
2288
|
+
/** Canonical WQL query discovering the Notes in this entity's scope. */
|
|
2289
|
+
notesWql: string;
|
|
2290
|
+
/** Canonical WQL query discovering the workout Blocks in this entity's scope. */
|
|
2291
|
+
blocksWql: string;
|
|
2292
|
+
/** Canonical WQL query discovering the executed Sessions in this entity's scope. */
|
|
2293
|
+
sessionsWql: string;
|
|
2294
|
+
/** Canonical WQL query discovering the emitted statement Records (:segment) in this entity's scope. */
|
|
2295
|
+
recordsWql: string;
|
|
2296
|
+
/** Primary WQL query representing the entity itself (e.g. authored `wql:` override or `notesWql`). */
|
|
2297
|
+
primaryWql: string;
|
|
2298
|
+
/** Default token bindings exposed to embedded Dashboard Widgets on this entity's page. */
|
|
2299
|
+
tokens: Record<string, string>;
|
|
2300
|
+
}
|
|
2301
|
+
interface ResolveEntityScopeInput {
|
|
2302
|
+
/** Note ID, composite route ID (`effort/thruster`, `equipment/barbell`, `t/domain/crossfit`, `notebook/journal`), or UUID. */
|
|
2303
|
+
noteId?: string;
|
|
2304
|
+
/** Explicit entity kind override. */
|
|
2305
|
+
kind?: EntityScopeKind;
|
|
2306
|
+
/** Entity slug override. */
|
|
2307
|
+
slug?: string;
|
|
2308
|
+
/** Tag category when resolving a Tag or Tag Category. */
|
|
2309
|
+
category?: string;
|
|
2310
|
+
/** Display title/label. */
|
|
2311
|
+
label?: string;
|
|
2312
|
+
/** Optional raw markdown content of the Note (inspected for frontmatter `wql:` or `dashboard.scope:` overrides). */
|
|
2313
|
+
rawContent?: string;
|
|
2314
|
+
/** Optional explicit WQL query when kind === 'wql'. */
|
|
2315
|
+
wql?: string;
|
|
2316
|
+
}
|
|
2317
|
+
/**
|
|
2318
|
+
* Extract an explicit `wql` or `dashboard.scope` scalar from a Note's frontmatter
|
|
2319
|
+
* when the author bound a custom WQL query directly to the Note.
|
|
2320
|
+
*/
|
|
2321
|
+
declare function extractNoteWqlOverride(rawContent?: string): string | undefined;
|
|
2322
|
+
/**
|
|
2323
|
+
* Resolve any Note, Property Note (`effort`, `equipment`, `tag`, `tag-category`),
|
|
2324
|
+
* Notebook/Collection, Feed, Session, or arbitrary WQL query into a canonical
|
|
2325
|
+
* `EntityScopeDescriptor`.
|
|
2326
|
+
*/
|
|
2327
|
+
declare function resolveEntityScope(input: ResolveEntityScopeInput): EntityScopeDescriptor;
|
|
2328
|
+
/**
|
|
2329
|
+
* Infer default Dashboard Widget specs for turning any WQL query or
|
|
2330
|
+
* `EntityScopeDescriptor` into a multi-widget Dashboard Note.
|
|
2331
|
+
*/
|
|
2332
|
+
declare function buildWidgetsForWqlScope(wqlOrScope: string | EntityScopeDescriptor, extraWidgets?: readonly WidgetSpec[]): WidgetSpec[];
|
|
2333
|
+
interface BuildScopedDashboardOptions {
|
|
2334
|
+
title?: string;
|
|
2335
|
+
slug?: string;
|
|
2336
|
+
scope?: EntityScopeDescriptor | string;
|
|
2337
|
+
widgets?: readonly WidgetSpec[];
|
|
2338
|
+
tokens?: Record<string, string | readonly string[]>;
|
|
2339
|
+
}
|
|
2340
|
+
/**
|
|
2341
|
+
* Turn any WQL query or EntityScopeDescriptor into a complete, valid
|
|
2342
|
+
* Dashboard Note markdown document (#899 locked format).
|
|
2343
|
+
*/
|
|
2344
|
+
declare function buildDashboardFromScope(options: BuildScopedDashboardOptions): string;
|
|
2345
|
+
|
|
2310
2346
|
/**
|
|
2311
2347
|
* Auto-generated build version metadata.
|
|
2312
2348
|
* Do not edit directly; updated by scripts/stamp-version.ts
|
|
2313
2349
|
*/
|
|
2314
|
-
declare const VERSION = "0.50.
|
|
2315
|
-
declare const GIT_SHA = "
|
|
2316
|
-
declare const BUILD_TIME = "2026-11-
|
|
2350
|
+
declare const VERSION = "0.50.2190";
|
|
2351
|
+
declare const GIT_SHA = "9ee7872";
|
|
2352
|
+
declare const BUILD_TIME = "2026-11-01T23:32:46.829Z";
|
|
2317
2353
|
declare const SEMVER: {
|
|
2318
|
-
readonly version: "0.50.
|
|
2319
|
-
readonly gitSha: "
|
|
2320
|
-
readonly buildTime: "2026-11-
|
|
2354
|
+
readonly version: "0.50.2190";
|
|
2355
|
+
readonly gitSha: "9ee7872";
|
|
2356
|
+
readonly buildTime: "2026-11-01T23:32:46.829Z";
|
|
2321
2357
|
};
|
|
2322
2358
|
|
|
2323
|
-
export { type Aggregator, type AnyParsedQuery, BUILD_TIME, type BlockQueryStore, CONTENT_GROUPING_DIMENSIONS, type CatalogFieldSuggestion, type CatalogValueSuggestion, type ComparisonOp, DASHBOARD_GRID_MAX_COLS, DASHBOARD_WIDGET_TYPES, DEFAULT_DASHBOARD_TITLE, DISCIPLINE_FACTORS, type DashboardDocument, type DashboardMeta, type DashboardParsedSection, type DashboardSectionInput, type DashboardToken, type DashboardWidget, type DashboardWidgetType, type DocumentAssignment, type DocumentDefaults, type DocumentFormula, type DocumentOutput, type DocumentResult, EFFORT_DISCIPLINES, type EffortDiscipline, type EffortQueryStore, type EventRowIdentity, type EventStore, type ExecutionContext, type FamilyRunPayload, type FindOptions, type FindPredicate, type FindQueryResult, type FormulaEvaluation, type FormulaEvaluator, GIT_SHA, type IFieldCatalog, type
|
|
2359
|
+
export { type Aggregator, type AnyParsedQuery, BUILD_TIME, type BlockQueryStore, type BuildScopedDashboardOptions, CONTENT_GROUPING_DIMENSIONS, type CatalogFieldSuggestion, type CatalogValueSuggestion, type ComparisonOp, DASHBOARD_GRID_MAX_COLS, DASHBOARD_WIDGET_TYPES, DEFAULT_DASHBOARD_TITLE, DISCIPLINE_FACTORS, type DashboardDocument, type DashboardMeta, type DashboardParsedSection, type DashboardSectionInput, type DashboardToken, type DashboardWidget, type DashboardWidgetType, type DocumentAssignment, type DocumentDefaults, type DocumentFormula, type DocumentOutput, type DocumentResult, EFFORT_DISCIPLINES, type EffortDiscipline, type EffortQueryStore, type EntityScopeDescriptor, type EntityScopeKind, type EventRowIdentity, type EventStore, type ExecutionContext, type FamilyRunPayload, type FindOptions, type FindPredicate, type FindQueryResult, type FormulaEvaluation, type FormulaEvaluator, GIT_SHA, type IFieldCatalog, type MetricPredicate, type NoteContainer, type NoteQueryStore, type NoteRelationBundle, type OperandValue, type OutputUnitResolution, PLANNED_WIDGET_TYPES, type PageSourceEntry, PageSourceRegistry, type ParsedAggregateQuery, type ParsedDocument, type ParsedFindQuery, type ParsedPipelineQuery, type ParsedRowsQuery, type ParsedWqlRollupSuffix, type ParsedWqlSuffixes, type ParsedWqlWindowSuffix, type PipelineOptions, type PipelineResult, type PipelineSink, type PipelineSource, type PointwiseInputs, type QueryDocument, QueryDocumentRunner$1 as QueryDocumentRunner, type QueryDocumentRunnerHost, type QueryDocumentRunnerOptions, type QueryOptions, type QueryResult, QueryService, type QueryServiceStores, type QueryWidgetSuffix, type QueryWindow, type ResolveEntityScopeInput, type ResolvedRange, type RowsPipes, type RowsQueryResult, type RowsRun, SEMVER, SOURCE_ID_SHAPES, type Series, type SeriesPoint, QueryDocumentRunner as SharedQueryDocumentRunner, type SharedRunnerOptions, type SummaryFactIdentity, type SummaryFactSourceOutput, type TabularColumn, type TabularGroup, type TabularResult, type TagFilter, type TagValue, UNASSIGNED, type UnitBearingFact, type UnitFamily, VERSION, WQL_AGGREGATORS, WQL_CALC_TARGETS, WQL_CHART_HEADS, WQL_COMPARISON_OPS, WQL_CONTENT_FILTER_KEYS, WQL_CONTENT_ONLY_KEYS, WQL_DISPLAY_UNITS, WQL_EFFORT_FILTER_KEYS, WQL_FIND_TARGETS, WQL_FUNCTION_HEADS, WQL_GRAINS, WQL_INTENSITY_TIERS, WQL_KEYWORDS, WQL_METRIC_AGGREGATES, WQL_METRIC_FAMILIES, WQL_NOTE_DEFAULT_SOURCES, WQL_NOTE_HEAD_ALIASES, WQL_RESULT_PLANES, WQL_ROLLUP_PERIODS, WQL_SOURCES, WQL_SOURCE_HEADS, WQL_SOURCE_HEAD_SCOPES, WQL_SOURCE_VALUES, WQL_STANDARD_DATASETS, WQL_TAG_KEYS, WQL_TYPED_TAG_KEYS, WQL_TYPE_HEADS, WQL_VIRTUAL_DIMS, type WidgetOpResult, type WidgetSpan, type WidgetSpec, type WqlAggregator, type WqlCalcTarget, type WqlChartHead, type WqlComparisonOp, type WqlCompletionOptions, type WqlContentFilterKey, type WqlDisplayUnit, type WqlDomainOrder, type WqlDomainPredicate, type WqlDomainReadResult, type WqlFindTarget, type WqlFunctionHead, type WqlGrain, type WqlIntensityTier, type WqlKeyword, type WqlMetricAggregate, type WqlMetricFamily, type WqlResultPlane, type WqlRollupPeriod, type WqlSource, type WqlSourceHead, type WqlSourceValue, type WqlStandardDataset, type WqlTagKey, type WqlTypedTagKey, type WqlVirtualDim, allowedFilterTypesForTarget, appendSuffixes, appendWidget, buildDashboardDocument, buildDashboardFromScope, buildDashboardScaffold, buildDrillDownQuery, buildWidgetsForWqlScope, captureContext, chunkIdOfItem, civilDateAdd, civilDateDiff, civilDateOf, civilDatesCoveredByRange, civilMonday, consumesRollupFacts, convertDisplay, createBuiltinFormulaEvaluator, dashboardSlug, defaultTokenValues, disciplineFactorFor, duplicateWidget, eventsToStoredLogs, extractDashboardTokens, extractNoteWqlOverride, feedIdOfItem, feedOfItem, findTargetAdvisories, getUnitFamily, hasLegacyIdentity, inRange, isAggregateQuery, isDashboardMeta, isDashboardWidgetType, isEffortDiscipline, isFindQuery, isItemSubscribed, isPipelineQuery, isProposedMetric, migrateLegacyChunkId, migrateLegacyDashboardBodies, migrateLegacyRouteId, migrateLegacyRow, migrateLegacySourceId, migrateLegacySourcePath, moveWidget, normalizeSummaryFacts, normalizeWql, notebookOfItem, notebookOriginOfItem, notebookSlugOfSourceId, parseDashboardNote, parseDocument, parseQuery, parseQueryWidgetSuffix, parseWqlSuffixes, projectEventToFacts, referencedTokens, removeWidget, renderWidgetGroup, resizeWidget, resolveCanonicalMetricKey, resolveEntityScope, resolveOutputUnit, resolveWidgetType, resolveWindowRange, rowsParseError, serialize, serializeDocument, setDashboardTokenValue, sourceMatches, sourceShape, splitAtWhere, substituteTokens, substituteTokens$1 as substituteTokensRaw, supportsWqlFilterKey, systemTimeZone, toEventRows, toSummaryEventRows, unknownTokensMessage, unknownWidgetTypeMessage, updateWidget, widgetBodyLine, widgetFenceTag, wql, wqlCompletion, wqlCompletionSource, wqlFilterKeys, wqlGroupingDimensions, wqlHighlightStyle, wqlLanguage, parser as wqlParser, wql_parser_terms as wqlTerms, zonedNoon, zonedStartOfDay };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { LanguageSupport, HighlightStyle, LRLanguage } from '@codemirror/languag
|
|
|
3
3
|
import { Completion, CompletionContext, CompletionResult } from '@codemirror/autocomplete';
|
|
4
4
|
import { Extension } from '@codemirror/state';
|
|
5
5
|
import { SummaryCoverage, BlockIndexRow, Note, EventRecord, PageNote, Page, NotePlacement, AnalyticsDataPoint, FeedId, NotebookId, NotebookOrigin, ResultOrigin, StoredOutputStatement, NoteBlockChange } from '@bitcobblers/wod-wiki-core';
|
|
6
|
-
export { DEFAULT_NOTEBOOK_SLUGS, DefaultNotebookSlug, FeedId, NotebookId, NotebookOrigin, SYSTEM_DEFAULT_OUTPUT_UNIT, UnitConversionError, convertViaCatalog, dimensionKeyOf, isNoteEditable, lookupUnit, notebookSlugFromId, systemDefaultUnit, toNotebookId } from '@bitcobblers/wod-wiki-core';
|
|
6
|
+
export { DEFAULT_NOTEBOOK_SLUGS, DefaultNotebookSlug, FeedId, LinkWidget, NotebookId, NotebookOrigin, ParsedFrontmatter, SYSTEM_DEFAULT_OUTPUT_UNIT, TypedTagItem, UnitConversionError, convertViaCatalog, dimensionKeyOf, extractFrontmatterTags, extractTypedFrontmatterTags, getList, getScalar, isNoteEditable, lookupUnit, notebookSlugFromId, parseFlatProperties, parseFrontmatter, parseFrontmatterBody, parseFrontmatterCategories, parseFrontmatterProps, serializeFrontmatter, stripFrontmatter, systemDefaultUnit, toNotebookId } from '@bitcobblers/wod-wiki-core';
|
|
7
7
|
import { IEffort } from '@bitcobblers/wod-wiki-lang';
|
|
8
8
|
export { IEffort } from '@bitcobblers/wod-wiki-lang';
|
|
9
9
|
|
|
@@ -2159,54 +2159,6 @@ declare const DEFAULT_DASHBOARD_TITLE = "New Dashboard";
|
|
|
2159
2159
|
declare function dashboardSlug(title: string): string;
|
|
2160
2160
|
declare function buildDashboardScaffold(title?: string): string;
|
|
2161
2161
|
|
|
2162
|
-
/**
|
|
2163
|
-
* Shared frontmatter parser utilities for WQL dashboard models and notes.
|
|
2164
|
-
*/
|
|
2165
|
-
interface ParsedFrontmatter {
|
|
2166
|
-
meta: Record<string, string | number | string[]>;
|
|
2167
|
-
body: string;
|
|
2168
|
-
}
|
|
2169
|
-
interface LinkWidget {
|
|
2170
|
-
kind: 'youtube' | 'amazon' | 'strava' | 'source' | 'website' | 'book';
|
|
2171
|
-
url?: string;
|
|
2172
|
-
label: string;
|
|
2173
|
-
videoId?: string;
|
|
2174
|
-
}
|
|
2175
|
-
/**
|
|
2176
|
-
* Parse the leading YAML frontmatter block of a markdown string.
|
|
2177
|
-
*/
|
|
2178
|
-
declare function parseFrontmatter(raw: string): ParsedFrontmatter;
|
|
2179
|
-
/**
|
|
2180
|
-
* Parse frontmatter body content (the lines between the `---` delimiters).
|
|
2181
|
-
*/
|
|
2182
|
-
declare function parseFrontmatterBody(innerContent: string): ParsedFrontmatter['meta'];
|
|
2183
|
-
/**
|
|
2184
|
-
* Serialize frontmatter metadata back to YAML body lines.
|
|
2185
|
-
*/
|
|
2186
|
-
declare function serializeFrontmatter(meta: ParsedFrontmatter['meta']): string;
|
|
2187
|
-
/** Body of `raw` with the leading frontmatter block removed. */
|
|
2188
|
-
declare function stripFrontmatter(raw: string): string;
|
|
2189
|
-
/** Scalar value at `key`, or `undefined` when absent or a list. */
|
|
2190
|
-
declare function getScalar(meta: ParsedFrontmatter['meta'], key: string): string | number | undefined;
|
|
2191
|
-
/** List value at `key`, or `[]` when absent or a scalar. */
|
|
2192
|
-
declare function getList(meta: ParsedFrontmatter['meta'], key: string): string[];
|
|
2193
|
-
/**
|
|
2194
|
-
* Parse the `category` YAML array from a full markdown string's frontmatter.
|
|
2195
|
-
*/
|
|
2196
|
-
declare function parseFrontmatterCategories(raw: string): string[];
|
|
2197
|
-
/**
|
|
2198
|
-
* Extract the `tags` list from a frontmatter block's raw content.
|
|
2199
|
-
*/
|
|
2200
|
-
declare function extractFrontmatterTags(raw: string): string[];
|
|
2201
|
-
/**
|
|
2202
|
-
* Parse flat scalar key-value pairs from raw inner content (no delimiters).
|
|
2203
|
-
*/
|
|
2204
|
-
declare function parseFlatProperties(innerContent: string): Record<string, string>;
|
|
2205
|
-
/**
|
|
2206
|
-
* Parse scalar key-value pairs from an array of lines.
|
|
2207
|
-
*/
|
|
2208
|
-
declare function parseFrontmatterProps(lines: string[]): Record<string, string>;
|
|
2209
|
-
|
|
2210
2162
|
/**
|
|
2211
2163
|
* Dashboard note operations — pure markdown↔markdown transforms over the
|
|
2212
2164
|
* locked dashboard-note format (#899). Every operation:
|
|
@@ -2307,17 +2259,101 @@ declare function resizeWidget(raw: string, key: string, expectedBody: string, sp
|
|
|
2307
2259
|
*/
|
|
2308
2260
|
declare function migrateLegacyDashboardBodies(raw: string): string;
|
|
2309
2261
|
|
|
2262
|
+
/**
|
|
2263
|
+
* entityScope — Deep WQL Entity Scope module.
|
|
2264
|
+
*
|
|
2265
|
+
* Maps any domain entity (Note, Property Note: Effort / Equipment / Tag /
|
|
2266
|
+
* Tag Category, Notebook / Collection, Feed, Session, or raw WQL query) to its
|
|
2267
|
+
* canonical WQL scope predicates (`notesWql`, `sessionsWql`, `recordsWql`,
|
|
2268
|
+
* `blocksWql`, `scopeFilter`), token values (`$scope`, `$note`, `$effort`,
|
|
2269
|
+
* `$equipment`, `$tag`, `$notebook`, `$feed`), and dashboard promotion
|
|
2270
|
+
* scaffold (`buildDashboardFromEntityScope` / `buildDashboardFromWql`).
|
|
2271
|
+
*
|
|
2272
|
+
* Pure module — zero DOM or storage dependencies.
|
|
2273
|
+
*/
|
|
2274
|
+
|
|
2275
|
+
type EntityScopeKind = 'note' | 'effort' | 'equipment' | 'tag' | 'tag-category' | 'notebook' | 'feed' | 'session' | 'wql';
|
|
2276
|
+
interface EntityScopeDescriptor {
|
|
2277
|
+
kind: EntityScopeKind;
|
|
2278
|
+
/** Canonical entity or route identifier (e.g. `effort/thruster`, `notebook/crossfit-girls`, `note-uuid`). */
|
|
2279
|
+
id: string;
|
|
2280
|
+
/** Primary slug or key within the kind (e.g. `thruster`, `kettlebell`, `crossfit-girls`). */
|
|
2281
|
+
slug: string;
|
|
2282
|
+
/** Optional Tag Category when kind === 'tag' or 'tag-category'. */
|
|
2283
|
+
category?: string;
|
|
2284
|
+
/** Human-readable display label. */
|
|
2285
|
+
label: string;
|
|
2286
|
+
/** Canonical filter clause (`key:value`) narrowing WQL queries to this entity. */
|
|
2287
|
+
scopeFilter: string;
|
|
2288
|
+
/** Canonical WQL query discovering the Notes in this entity's scope. */
|
|
2289
|
+
notesWql: string;
|
|
2290
|
+
/** Canonical WQL query discovering the workout Blocks in this entity's scope. */
|
|
2291
|
+
blocksWql: string;
|
|
2292
|
+
/** Canonical WQL query discovering the executed Sessions in this entity's scope. */
|
|
2293
|
+
sessionsWql: string;
|
|
2294
|
+
/** Canonical WQL query discovering the emitted statement Records (:segment) in this entity's scope. */
|
|
2295
|
+
recordsWql: string;
|
|
2296
|
+
/** Primary WQL query representing the entity itself (e.g. authored `wql:` override or `notesWql`). */
|
|
2297
|
+
primaryWql: string;
|
|
2298
|
+
/** Default token bindings exposed to embedded Dashboard Widgets on this entity's page. */
|
|
2299
|
+
tokens: Record<string, string>;
|
|
2300
|
+
}
|
|
2301
|
+
interface ResolveEntityScopeInput {
|
|
2302
|
+
/** Note ID, composite route ID (`effort/thruster`, `equipment/barbell`, `t/domain/crossfit`, `notebook/journal`), or UUID. */
|
|
2303
|
+
noteId?: string;
|
|
2304
|
+
/** Explicit entity kind override. */
|
|
2305
|
+
kind?: EntityScopeKind;
|
|
2306
|
+
/** Entity slug override. */
|
|
2307
|
+
slug?: string;
|
|
2308
|
+
/** Tag category when resolving a Tag or Tag Category. */
|
|
2309
|
+
category?: string;
|
|
2310
|
+
/** Display title/label. */
|
|
2311
|
+
label?: string;
|
|
2312
|
+
/** Optional raw markdown content of the Note (inspected for frontmatter `wql:` or `dashboard.scope:` overrides). */
|
|
2313
|
+
rawContent?: string;
|
|
2314
|
+
/** Optional explicit WQL query when kind === 'wql'. */
|
|
2315
|
+
wql?: string;
|
|
2316
|
+
}
|
|
2317
|
+
/**
|
|
2318
|
+
* Extract an explicit `wql` or `dashboard.scope` scalar from a Note's frontmatter
|
|
2319
|
+
* when the author bound a custom WQL query directly to the Note.
|
|
2320
|
+
*/
|
|
2321
|
+
declare function extractNoteWqlOverride(rawContent?: string): string | undefined;
|
|
2322
|
+
/**
|
|
2323
|
+
* Resolve any Note, Property Note (`effort`, `equipment`, `tag`, `tag-category`),
|
|
2324
|
+
* Notebook/Collection, Feed, Session, or arbitrary WQL query into a canonical
|
|
2325
|
+
* `EntityScopeDescriptor`.
|
|
2326
|
+
*/
|
|
2327
|
+
declare function resolveEntityScope(input: ResolveEntityScopeInput): EntityScopeDescriptor;
|
|
2328
|
+
/**
|
|
2329
|
+
* Infer default Dashboard Widget specs for turning any WQL query or
|
|
2330
|
+
* `EntityScopeDescriptor` into a multi-widget Dashboard Note.
|
|
2331
|
+
*/
|
|
2332
|
+
declare function buildWidgetsForWqlScope(wqlOrScope: string | EntityScopeDescriptor, extraWidgets?: readonly WidgetSpec[]): WidgetSpec[];
|
|
2333
|
+
interface BuildScopedDashboardOptions {
|
|
2334
|
+
title?: string;
|
|
2335
|
+
slug?: string;
|
|
2336
|
+
scope?: EntityScopeDescriptor | string;
|
|
2337
|
+
widgets?: readonly WidgetSpec[];
|
|
2338
|
+
tokens?: Record<string, string | readonly string[]>;
|
|
2339
|
+
}
|
|
2340
|
+
/**
|
|
2341
|
+
* Turn any WQL query or EntityScopeDescriptor into a complete, valid
|
|
2342
|
+
* Dashboard Note markdown document (#899 locked format).
|
|
2343
|
+
*/
|
|
2344
|
+
declare function buildDashboardFromScope(options: BuildScopedDashboardOptions): string;
|
|
2345
|
+
|
|
2310
2346
|
/**
|
|
2311
2347
|
* Auto-generated build version metadata.
|
|
2312
2348
|
* Do not edit directly; updated by scripts/stamp-version.ts
|
|
2313
2349
|
*/
|
|
2314
|
-
declare const VERSION = "0.50.
|
|
2315
|
-
declare const GIT_SHA = "
|
|
2316
|
-
declare const BUILD_TIME = "2026-11-
|
|
2350
|
+
declare const VERSION = "0.50.2190";
|
|
2351
|
+
declare const GIT_SHA = "9ee7872";
|
|
2352
|
+
declare const BUILD_TIME = "2026-11-01T23:32:46.829Z";
|
|
2317
2353
|
declare const SEMVER: {
|
|
2318
|
-
readonly version: "0.50.
|
|
2319
|
-
readonly gitSha: "
|
|
2320
|
-
readonly buildTime: "2026-11-
|
|
2354
|
+
readonly version: "0.50.2190";
|
|
2355
|
+
readonly gitSha: "9ee7872";
|
|
2356
|
+
readonly buildTime: "2026-11-01T23:32:46.829Z";
|
|
2321
2357
|
};
|
|
2322
2358
|
|
|
2323
|
-
export { type Aggregator, type AnyParsedQuery, BUILD_TIME, type BlockQueryStore, CONTENT_GROUPING_DIMENSIONS, type CatalogFieldSuggestion, type CatalogValueSuggestion, type ComparisonOp, DASHBOARD_GRID_MAX_COLS, DASHBOARD_WIDGET_TYPES, DEFAULT_DASHBOARD_TITLE, DISCIPLINE_FACTORS, type DashboardDocument, type DashboardMeta, type DashboardParsedSection, type DashboardSectionInput, type DashboardToken, type DashboardWidget, type DashboardWidgetType, type DocumentAssignment, type DocumentDefaults, type DocumentFormula, type DocumentOutput, type DocumentResult, EFFORT_DISCIPLINES, type EffortDiscipline, type EffortQueryStore, type EventRowIdentity, type EventStore, type ExecutionContext, type FamilyRunPayload, type FindOptions, type FindPredicate, type FindQueryResult, type FormulaEvaluation, type FormulaEvaluator, GIT_SHA, type IFieldCatalog, type
|
|
2359
|
+
export { type Aggregator, type AnyParsedQuery, BUILD_TIME, type BlockQueryStore, type BuildScopedDashboardOptions, CONTENT_GROUPING_DIMENSIONS, type CatalogFieldSuggestion, type CatalogValueSuggestion, type ComparisonOp, DASHBOARD_GRID_MAX_COLS, DASHBOARD_WIDGET_TYPES, DEFAULT_DASHBOARD_TITLE, DISCIPLINE_FACTORS, type DashboardDocument, type DashboardMeta, type DashboardParsedSection, type DashboardSectionInput, type DashboardToken, type DashboardWidget, type DashboardWidgetType, type DocumentAssignment, type DocumentDefaults, type DocumentFormula, type DocumentOutput, type DocumentResult, EFFORT_DISCIPLINES, type EffortDiscipline, type EffortQueryStore, type EntityScopeDescriptor, type EntityScopeKind, type EventRowIdentity, type EventStore, type ExecutionContext, type FamilyRunPayload, type FindOptions, type FindPredicate, type FindQueryResult, type FormulaEvaluation, type FormulaEvaluator, GIT_SHA, type IFieldCatalog, type MetricPredicate, type NoteContainer, type NoteQueryStore, type NoteRelationBundle, type OperandValue, type OutputUnitResolution, PLANNED_WIDGET_TYPES, type PageSourceEntry, PageSourceRegistry, type ParsedAggregateQuery, type ParsedDocument, type ParsedFindQuery, type ParsedPipelineQuery, type ParsedRowsQuery, type ParsedWqlRollupSuffix, type ParsedWqlSuffixes, type ParsedWqlWindowSuffix, type PipelineOptions, type PipelineResult, type PipelineSink, type PipelineSource, type PointwiseInputs, type QueryDocument, QueryDocumentRunner$1 as QueryDocumentRunner, type QueryDocumentRunnerHost, type QueryDocumentRunnerOptions, type QueryOptions, type QueryResult, QueryService, type QueryServiceStores, type QueryWidgetSuffix, type QueryWindow, type ResolveEntityScopeInput, type ResolvedRange, type RowsPipes, type RowsQueryResult, type RowsRun, SEMVER, SOURCE_ID_SHAPES, type Series, type SeriesPoint, QueryDocumentRunner as SharedQueryDocumentRunner, type SharedRunnerOptions, type SummaryFactIdentity, type SummaryFactSourceOutput, type TabularColumn, type TabularGroup, type TabularResult, type TagFilter, type TagValue, UNASSIGNED, type UnitBearingFact, type UnitFamily, VERSION, WQL_AGGREGATORS, WQL_CALC_TARGETS, WQL_CHART_HEADS, WQL_COMPARISON_OPS, WQL_CONTENT_FILTER_KEYS, WQL_CONTENT_ONLY_KEYS, WQL_DISPLAY_UNITS, WQL_EFFORT_FILTER_KEYS, WQL_FIND_TARGETS, WQL_FUNCTION_HEADS, WQL_GRAINS, WQL_INTENSITY_TIERS, WQL_KEYWORDS, WQL_METRIC_AGGREGATES, WQL_METRIC_FAMILIES, WQL_NOTE_DEFAULT_SOURCES, WQL_NOTE_HEAD_ALIASES, WQL_RESULT_PLANES, WQL_ROLLUP_PERIODS, WQL_SOURCES, WQL_SOURCE_HEADS, WQL_SOURCE_HEAD_SCOPES, WQL_SOURCE_VALUES, WQL_STANDARD_DATASETS, WQL_TAG_KEYS, WQL_TYPED_TAG_KEYS, WQL_TYPE_HEADS, WQL_VIRTUAL_DIMS, type WidgetOpResult, type WidgetSpan, type WidgetSpec, type WqlAggregator, type WqlCalcTarget, type WqlChartHead, type WqlComparisonOp, type WqlCompletionOptions, type WqlContentFilterKey, type WqlDisplayUnit, type WqlDomainOrder, type WqlDomainPredicate, type WqlDomainReadResult, type WqlFindTarget, type WqlFunctionHead, type WqlGrain, type WqlIntensityTier, type WqlKeyword, type WqlMetricAggregate, type WqlMetricFamily, type WqlResultPlane, type WqlRollupPeriod, type WqlSource, type WqlSourceHead, type WqlSourceValue, type WqlStandardDataset, type WqlTagKey, type WqlTypedTagKey, type WqlVirtualDim, allowedFilterTypesForTarget, appendSuffixes, appendWidget, buildDashboardDocument, buildDashboardFromScope, buildDashboardScaffold, buildDrillDownQuery, buildWidgetsForWqlScope, captureContext, chunkIdOfItem, civilDateAdd, civilDateDiff, civilDateOf, civilDatesCoveredByRange, civilMonday, consumesRollupFacts, convertDisplay, createBuiltinFormulaEvaluator, dashboardSlug, defaultTokenValues, disciplineFactorFor, duplicateWidget, eventsToStoredLogs, extractDashboardTokens, extractNoteWqlOverride, feedIdOfItem, feedOfItem, findTargetAdvisories, getUnitFamily, hasLegacyIdentity, inRange, isAggregateQuery, isDashboardMeta, isDashboardWidgetType, isEffortDiscipline, isFindQuery, isItemSubscribed, isPipelineQuery, isProposedMetric, migrateLegacyChunkId, migrateLegacyDashboardBodies, migrateLegacyRouteId, migrateLegacyRow, migrateLegacySourceId, migrateLegacySourcePath, moveWidget, normalizeSummaryFacts, normalizeWql, notebookOfItem, notebookOriginOfItem, notebookSlugOfSourceId, parseDashboardNote, parseDocument, parseQuery, parseQueryWidgetSuffix, parseWqlSuffixes, projectEventToFacts, referencedTokens, removeWidget, renderWidgetGroup, resizeWidget, resolveCanonicalMetricKey, resolveEntityScope, resolveOutputUnit, resolveWidgetType, resolveWindowRange, rowsParseError, serialize, serializeDocument, setDashboardTokenValue, sourceMatches, sourceShape, splitAtWhere, substituteTokens, substituteTokens$1 as substituteTokensRaw, supportsWqlFilterKey, systemTimeZone, toEventRows, toSummaryEventRows, unknownTokensMessage, unknownWidgetTypeMessage, updateWidget, widgetBodyLine, widgetFenceTag, wql, wqlCompletion, wqlCompletionSource, wqlFilterKeys, wqlGroupingDimensions, wqlHighlightStyle, wqlLanguage, parser as wqlParser, wql_parser_terms as wqlTerms, zonedNoon, zonedStartOfDay };
|