@bitcobblers/wod-wiki-engine 0.63.2275 → 0.63.2276
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/agent.cjs +45 -12
- package/dist/agent.cjs.map +1 -1
- package/dist/agent.mjs +4 -3
- package/dist/agent.mjs.map +1 -1
- package/dist/{chunk-4TWTS5TS.mjs → chunk-J3G7VFT6.mjs} +104 -18
- package/dist/chunk-J3G7VFT6.mjs.map +1 -0
- package/dist/index.cjs +103 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -8
- package/dist/index.d.ts +33 -8
- package/dist/index.mjs +1 -1
- package/package.json +5 -5
- package/dist/chunk-4TWTS5TS.mjs.map +0 -1
|
@@ -858,13 +858,13 @@ function csvToTelemetryBundle(csv) {
|
|
|
858
858
|
}
|
|
859
859
|
|
|
860
860
|
// src/version.ts
|
|
861
|
-
var VERSION = "0.63.
|
|
862
|
-
var GIT_SHA = "
|
|
863
|
-
var BUILD_TIME = "2026-11-
|
|
861
|
+
var VERSION = "0.63.2276";
|
|
862
|
+
var GIT_SHA = "8f52262";
|
|
863
|
+
var BUILD_TIME = "2026-11-28T17:47:58.856Z";
|
|
864
864
|
var SEMVER = {
|
|
865
|
-
version: "0.63.
|
|
866
|
-
gitSha: "
|
|
867
|
-
buildTime: "2026-11-
|
|
865
|
+
version: "0.63.2276",
|
|
866
|
+
gitSha: "8f52262",
|
|
867
|
+
buildTime: "2026-11-28T17:47:58.856Z"
|
|
868
868
|
};
|
|
869
869
|
var SEED_SCHEMA = 9;
|
|
870
870
|
var SEED_REGISTERED_WIDGETS = KNOWN_SECTION_WIDGETS;
|
|
@@ -1338,6 +1338,55 @@ async function saveScopedPropertyOverride(storage, input) {
|
|
|
1338
1338
|
);
|
|
1339
1339
|
return overrideRecord;
|
|
1340
1340
|
}
|
|
1341
|
+
async function deleteScopedPropertyOverride(storage, input) {
|
|
1342
|
+
const targetNotebookId = toNotebookId$1(input.targetNotebookId);
|
|
1343
|
+
const cleanSlug = input.slug.trim().toLowerCase();
|
|
1344
|
+
if (!cleanSlug) {
|
|
1345
|
+
throw new Error("Deleting a property override requires a non-empty canonical slug.");
|
|
1346
|
+
}
|
|
1347
|
+
const nbSlug = notebookSlugFromId$1(targetNotebookId);
|
|
1348
|
+
const overrideId = makeScopedOverrideId(targetNotebookId, input.kind, cleanSlug);
|
|
1349
|
+
const defaultOwnerNoteId = `override/${nbSlug}/${input.kind}/${cleanSlug}`;
|
|
1350
|
+
return storage.transaction(
|
|
1351
|
+
["notes", "block_revisions", "property_overrides", "tags", "tag_types"],
|
|
1352
|
+
"readwrite",
|
|
1353
|
+
async (tx) => {
|
|
1354
|
+
const existing = await tx.readonly("property_overrides").get(overrideId);
|
|
1355
|
+
const ownerNoteId = existing?.ownerNoteId ?? defaultOwnerNoteId;
|
|
1356
|
+
const existingNote = await tx.readonly("notes").get(ownerNoteId);
|
|
1357
|
+
if (existing) {
|
|
1358
|
+
await tx.readwrite("property_overrides").delete(overrideId);
|
|
1359
|
+
}
|
|
1360
|
+
if (existingNote) {
|
|
1361
|
+
await tx.readwrite("notes").delete(ownerNoteId);
|
|
1362
|
+
}
|
|
1363
|
+
try {
|
|
1364
|
+
const revisions = await tx.readonly("block_revisions").getAllFromIndex("by-note", ownerNoteId);
|
|
1365
|
+
for (const rev of revisions) {
|
|
1366
|
+
await tx.readwrite("block_revisions").delete([rev.noteId, rev.blockId, rev.version]);
|
|
1367
|
+
}
|
|
1368
|
+
} catch {
|
|
1369
|
+
}
|
|
1370
|
+
if (existing && targetNotebookId === "notebook/custom") {
|
|
1371
|
+
const payloadId = typeof existing.payload?.id === "string" ? existing.payload.id : void 0;
|
|
1372
|
+
if (payloadId) {
|
|
1373
|
+
if (input.kind === "tag") {
|
|
1374
|
+
await tx.readwrite("tags").delete(payloadId).catch(() => {
|
|
1375
|
+
});
|
|
1376
|
+
} else if (input.kind === "tag-type") {
|
|
1377
|
+
await tx.readwrite("tag_types").delete(payloadId).catch(() => {
|
|
1378
|
+
});
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
return {
|
|
1383
|
+
deleted: Boolean(existing || existingNote),
|
|
1384
|
+
notebookId: targetNotebookId,
|
|
1385
|
+
ownerNoteId
|
|
1386
|
+
};
|
|
1387
|
+
}
|
|
1388
|
+
);
|
|
1389
|
+
}
|
|
1341
1390
|
async function listScopedPropertyOverrides(storage, filter) {
|
|
1342
1391
|
let rows;
|
|
1343
1392
|
try {
|
|
@@ -2310,13 +2359,14 @@ function buildQueryServiceStoresFromStorage(storage, options = {}) {
|
|
|
2310
2359
|
const res = options.isNotebookSubscribed(feedId, chunkId);
|
|
2311
2360
|
subscribed = typeof res === "boolean" ? res : Boolean(await res);
|
|
2312
2361
|
}
|
|
2362
|
+
const builtin = BUILTIN_NOTEBOOKS.find((b) => b.slug === slug);
|
|
2313
2363
|
rows.push({
|
|
2314
2364
|
id: notebookId,
|
|
2315
2365
|
feedId,
|
|
2316
2366
|
feedLabel: feedSourceId ?? "Yours (Local)",
|
|
2317
2367
|
chunkId,
|
|
2318
2368
|
slug,
|
|
2319
|
-
label: landing?.title ?? slug,
|
|
2369
|
+
label: builtin ? builtin.name : landing?.title ?? slug,
|
|
2320
2370
|
count,
|
|
2321
2371
|
subscribed,
|
|
2322
2372
|
installed: true,
|
|
@@ -4103,12 +4153,27 @@ async function ensureUserNotebookLanding(tx, notebookId, now) {
|
|
|
4103
4153
|
seedOrigin: "user"
|
|
4104
4154
|
});
|
|
4105
4155
|
}
|
|
4106
|
-
|
|
4156
|
+
var RESERVED_NOTEBOOK_SLUGS = new Set(
|
|
4157
|
+
BUILTIN_NOTEBOOKS.map((b) => b.slug)
|
|
4158
|
+
);
|
|
4159
|
+
function resolveUserNotebookSlug(rawName, takenSlugs) {
|
|
4107
4160
|
const trimmed = rawName.trim();
|
|
4108
|
-
let
|
|
4109
|
-
if (
|
|
4110
|
-
|
|
4161
|
+
let baseSlug = trimmed.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "notebook";
|
|
4162
|
+
if (RESERVED_NOTEBOOK_SLUGS.has(baseSlug) || isNonPublishableNotebook(baseSlug)) {
|
|
4163
|
+
baseSlug = `${baseSlug}-user`;
|
|
4164
|
+
}
|
|
4165
|
+
if (!takenSlugs || !takenSlugs.has(baseSlug)) {
|
|
4166
|
+
return baseSlug;
|
|
4167
|
+
}
|
|
4168
|
+
let slug = baseSlug;
|
|
4169
|
+
for (let i = 2; takenSlugs.has(slug); i++) {
|
|
4170
|
+
slug = `${baseSlug}-${i}`;
|
|
4111
4171
|
}
|
|
4172
|
+
return slug;
|
|
4173
|
+
}
|
|
4174
|
+
async function createUserNotebookLanding(storage, rawName) {
|
|
4175
|
+
const trimmed = rawName.trim();
|
|
4176
|
+
const slug = resolveUserNotebookSlug(trimmed);
|
|
4112
4177
|
const nbId = toNotebookId$1(slug);
|
|
4113
4178
|
await storage.transaction(["notes"], "readwrite", async (tx) => {
|
|
4114
4179
|
const existing = await tx.readonly("notes").get(nbId);
|
|
@@ -4377,11 +4442,32 @@ async function setNotebookPublic(storage, notebookIdOrSlug, isPublic) {
|
|
|
4377
4442
|
if (existing && (existing.feedOrigin === "feed" || existing.seedOrigin === "seed")) {
|
|
4378
4443
|
throw new Error(`Subscribed feed notebooks cannot be published directly (${notebookId}). Clone into a user notebook first.`);
|
|
4379
4444
|
}
|
|
4380
|
-
const
|
|
4445
|
+
const slug = notebookSlugFromId$1(notebookId);
|
|
4446
|
+
const builtin = BUILTIN_NOTEBOOKS.find((b) => b.slug === slug);
|
|
4447
|
+
const canonicalTitle = builtin?.name ?? slug;
|
|
4448
|
+
const canonicalRawContent = builtin ? `---
|
|
4449
|
+
description: ${JSON.stringify(builtin.description)}
|
|
4450
|
+
icon: ${JSON.stringify(builtin.icon)}
|
|
4451
|
+
---
|
|
4452
|
+
|
|
4453
|
+
# ${builtin.name}
|
|
4454
|
+
` : `# ${slug}
|
|
4455
|
+
`;
|
|
4456
|
+
const needsTitleHeal = Boolean(builtin && (!existing?.title || existing.title === builtin.slug));
|
|
4457
|
+
const needsRawHeal = Boolean(
|
|
4458
|
+
existing && needsTitleHeal && existing.rawContent.trim() === `# ${builtin.slug}`
|
|
4459
|
+
);
|
|
4460
|
+
const base = existing ? {
|
|
4461
|
+
...existing,
|
|
4462
|
+
...needsTitleHeal ? { title: builtin.name } : {},
|
|
4463
|
+
...needsRawHeal ? {
|
|
4464
|
+
rawContent: canonicalRawContent,
|
|
4465
|
+
sourceRevision: (existing.sourceRevision ?? 0) + 1
|
|
4466
|
+
} : {}
|
|
4467
|
+
} : {
|
|
4381
4468
|
id: notebookId,
|
|
4382
|
-
title:
|
|
4383
|
-
rawContent:
|
|
4384
|
-
`,
|
|
4469
|
+
title: canonicalTitle,
|
|
4470
|
+
rawContent: canonicalRawContent,
|
|
4385
4471
|
sourceRevision: 1,
|
|
4386
4472
|
blocks: {},
|
|
4387
4473
|
createdAt: Date.now(),
|
|
@@ -6859,6 +6945,6 @@ async function migrateDatedPageNotesToSchedule(storage) {
|
|
|
6859
6945
|
});
|
|
6860
6946
|
}
|
|
6861
6947
|
|
|
6862
|
-
export { APP_ORIGIN, BUILD_TIME, CANVAS_CHUNK_ID, DASHBOARDS_CHUNK_ID, DirectoryHandleFeedTree, EFFORTS_CHUNK_ID, EQUIPMENT_CHUNK_ID, FEED_INDEX_META_PREFIX, FEED_REGISTRY_META_KEY, FEED_SUBSCRIPTIONS_META_KEY, FeedTreeError, GIT_SHA, HttpFeedTree, MemoryFeedTree, NOTE_ID_FRONTMATTER_KEY, PUBLISHED_FEED_META_KEY, QR_SCRIPT_ID, SEED_BROADCAST_CHANNEL, SEED_NAMESPACE, SEED_REGISTERED_WIDGETS, SEED_SCHEMA, SEMVER, SESSION_CSV_HEADER, TELEMETRY_CSV_HEADER, VERSION, applySeedChunk, applySeedChunks, assertNotebookIndex, assertSeedManifest, assertSeedRow, assertSeedRows, attributeSession, backfillFeedProvenance, batchScheduleNotes, buildContextualPageSource, buildNoteProvenance, buildQueryServiceStoresFromStorage, buildStatementTree, canvasRouteSlug, checkUnpublishedFeedChanges, cloneRemoteRecord, compileSeedRowFromMarkdown, composeNoteMarkdown, createIRFile, createUserNotebookLanding, csvToEquipmentLabels, csvToSessionRows, csvToTelemetryBundle, decodeUtf8, deleteFeedSourceHeadless, deleteUserNotebook, effortToMarkdown, emptySeedMeta, encodeUtf8, ensurePinnedExternalWorkout, equipmentToCsv, equipmentToMarkdown, exportPortableFilesFromStorage, extractNoteIdentity, extractTypedTags, feedIdOfMetaKey, feedIndexMetaKey, findNearbyMatchingScheduleItems, forkNoteToUserNotebook, getJournalDayOverlay, getNoteNotebooks, getNotePublicationSummary, getNoteRevision, getScheduleAndSessionCountsByNote, ingestPortableFilesIntoStorage, injectIdentityFrontmatter, isIRFile, listFeedSubscriptionsHeadless, listNoteRevisions, listScheduleItemsByDateRange, listScheduleItemsForNote, listScopedPropertyOverrides, localCivilDateKey, logSessionAgainstExternalWorkout, makeNotebookLinkId, makeScopedOverrideId, materializeCachedRemoteRecord, migrateDatedPageNotesToSchedule, migrateNotebookVocabulary, normalizeCivilDate, normalizeFeedTreePath, noteHasRecordedSessionsInTx, notebookSlugForChunkId, parseCsvLine, parseFrontmatterDateMs, parseNoteMarkdown, parseRemoteNoteId, prepareJournalSessionRun, previewRemoteNotebook, previewRemoteRecord, promoteNoteToNotebooks, promoteReferencedOverridesToNotebook, publishFeedFromStorage, qrInlineScript, readFeedRegistryHeadless, readFrontmatterMeta, reconcileRemovedFeedRecords, recordPublishedFeedCheckpoint, removeFeedNotebookContent, removeFeedSourceContentById, removeNoteFromNotebook, removeScheduleItem, removeSeedSourceContent, renderFeedLandingHtml, resolveScopedPropertyCatalog, resolveSessionCivilDate, resolveUpstreamProvenance, saveScopedPropertyOverride, scheduleNoteOnDate, seedMetaKey, seedNoteId, seedNoteSourceId, seedPrecedenceRank, seedSourceTier, sessionToCsv, setNoteNotebooks, setNotebookPublic, setSessionPublic, sha256HexAsync, snapshotNoteRevisionIfHasSessionsInTx, splitCsvRecords, statementToNode, subscribeFeedSourceHeadless, telemetryBundleToCsv, unsubscribeFeedSourceHeadless, updateScheduleItem, writeFeedRegistryHeadless };
|
|
6863
|
-
//# sourceMappingURL=chunk-
|
|
6864
|
-
//# sourceMappingURL=chunk-
|
|
6948
|
+
export { APP_ORIGIN, BUILD_TIME, CANVAS_CHUNK_ID, DASHBOARDS_CHUNK_ID, DirectoryHandleFeedTree, EFFORTS_CHUNK_ID, EQUIPMENT_CHUNK_ID, FEED_INDEX_META_PREFIX, FEED_REGISTRY_META_KEY, FEED_SUBSCRIPTIONS_META_KEY, FeedTreeError, GIT_SHA, HttpFeedTree, MemoryFeedTree, NOTE_ID_FRONTMATTER_KEY, PUBLISHED_FEED_META_KEY, QR_SCRIPT_ID, SEED_BROADCAST_CHANNEL, SEED_NAMESPACE, SEED_REGISTERED_WIDGETS, SEED_SCHEMA, SEMVER, SESSION_CSV_HEADER, TELEMETRY_CSV_HEADER, VERSION, applySeedChunk, applySeedChunks, assertNotebookIndex, assertSeedManifest, assertSeedRow, assertSeedRows, attributeSession, backfillFeedProvenance, batchScheduleNotes, buildContextualPageSource, buildNoteProvenance, buildQueryServiceStoresFromStorage, buildStatementTree, canvasRouteSlug, checkUnpublishedFeedChanges, cloneRemoteRecord, compileSeedRowFromMarkdown, composeNoteMarkdown, createIRFile, createUserNotebookLanding, csvToEquipmentLabels, csvToSessionRows, csvToTelemetryBundle, decodeUtf8, deleteFeedSourceHeadless, deleteScopedPropertyOverride, deleteUserNotebook, effortToMarkdown, emptySeedMeta, encodeUtf8, ensurePinnedExternalWorkout, equipmentToCsv, equipmentToMarkdown, exportPortableFilesFromStorage, extractNoteIdentity, extractTypedTags, feedIdOfMetaKey, feedIndexMetaKey, findNearbyMatchingScheduleItems, forkNoteToUserNotebook, getJournalDayOverlay, getNoteNotebooks, getNotePublicationSummary, getNoteRevision, getScheduleAndSessionCountsByNote, ingestPortableFilesIntoStorage, injectIdentityFrontmatter, isIRFile, listFeedSubscriptionsHeadless, listNoteRevisions, listScheduleItemsByDateRange, listScheduleItemsForNote, listScopedPropertyOverrides, localCivilDateKey, logSessionAgainstExternalWorkout, makeNotebookLinkId, makeScopedOverrideId, materializeCachedRemoteRecord, migrateDatedPageNotesToSchedule, migrateNotebookVocabulary, normalizeCivilDate, normalizeFeedTreePath, noteHasRecordedSessionsInTx, notebookSlugForChunkId, parseCsvLine, parseFrontmatterDateMs, parseNoteMarkdown, parseRemoteNoteId, prepareJournalSessionRun, previewRemoteNotebook, previewRemoteRecord, promoteNoteToNotebooks, promoteReferencedOverridesToNotebook, publishFeedFromStorage, qrInlineScript, readFeedRegistryHeadless, readFrontmatterMeta, reconcileRemovedFeedRecords, recordPublishedFeedCheckpoint, removeFeedNotebookContent, removeFeedSourceContentById, removeNoteFromNotebook, removeScheduleItem, removeSeedSourceContent, renderFeedLandingHtml, resolveScopedPropertyCatalog, resolveSessionCivilDate, resolveUpstreamProvenance, resolveUserNotebookSlug, saveScopedPropertyOverride, scheduleNoteOnDate, seedMetaKey, seedNoteId, seedNoteSourceId, seedPrecedenceRank, seedSourceTier, sessionToCsv, setNoteNotebooks, setNotebookPublic, setSessionPublic, sha256HexAsync, snapshotNoteRevisionIfHasSessionsInTx, splitCsvRecords, statementToNode, subscribeFeedSourceHeadless, telemetryBundleToCsv, unsubscribeFeedSourceHeadless, updateScheduleItem, writeFeedRegistryHeadless };
|
|
6949
|
+
//# sourceMappingURL=chunk-J3G7VFT6.mjs.map
|
|
6950
|
+
//# sourceMappingURL=chunk-J3G7VFT6.mjs.map
|