feat(manacore/web): add tag junction tables and stores for all 23 modules

Every module now has a tag junction table in IndexedDB and a tag store
with createTagLinkOps for consistent tag-entity linking. Tags are shared
globally via globalTags; each module only manages its own junctions.

New junction tables: eventTags, contactTags, conversationTags, deckTags,
zitareListTags, songTags, presiDeckTags, invItemTags, skillTags,
ccLocationTags, entryTags, documentTags, questionTags, mealTags,
plantTags, moodTags, guideTags.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-02 16:10:49 +02:00
parent be20de23db
commit d49a3d727d
17 changed files with 314 additions and 3 deletions

View file

@ -0,0 +1,19 @@
/**
* Ucalendar Tags Uses shared global tags + module-specific junction table.
*/
import { db } from '$lib/data/database';
import { createTagLinkOps } from '@manacore/shared-stores';
export {
tagMutations,
useAllTags,
getTagById,
getTagsByIds,
getTagColor,
} from '@manacore/shared-stores';
export const eventTagOps = createTagLinkOps({
table: () => db.table('eventTags'),
entityIdField: 'eventId',
});

View file

@ -0,0 +1,19 @@
/**
* Ucards Tags Uses shared global tags + module-specific junction table.
*/
import { db } from '$lib/data/database';
import { createTagLinkOps } from '@manacore/shared-stores';
export {
tagMutations,
useAllTags,
getTagById,
getTagsByIds,
getTagColor,
} from '@manacore/shared-stores';
export const deckTagOps = createTagLinkOps({
table: () => db.table('deckTags'),
entityIdField: 'deckId',
});

View file

@ -0,0 +1,19 @@
/**
* Uchat Tags Uses shared global tags + module-specific junction table.
*/
import { db } from '$lib/data/database';
import { createTagLinkOps } from '@manacore/shared-stores';
export {
tagMutations,
useAllTags,
getTagById,
getTagsByIds,
getTagColor,
} from '@manacore/shared-stores';
export const conversationTagOps = createTagLinkOps({
table: () => db.table('conversationTags'),
entityIdField: 'conversationId',
});

View file

@ -0,0 +1,19 @@
/**
* Ucitycorners Tags Uses shared global tags + module-specific junction table.
*/
import { db } from '$lib/data/database';
import { createTagLinkOps } from '@manacore/shared-stores';
export {
tagMutations,
useAllTags,
getTagById,
getTagsByIds,
getTagColor,
} from '@manacore/shared-stores';
export const locationTagOps = createTagLinkOps({
table: () => db.table('ccLocationTags'),
entityIdField: 'locationId',
});

View file

@ -0,0 +1,19 @@
/**
* Ucontacts Tags Uses shared global tags + module-specific junction table.
*/
import { db } from '$lib/data/database';
import { createTagLinkOps } from '@manacore/shared-stores';
export {
tagMutations,
useAllTags,
getTagById,
getTagsByIds,
getTagColor,
} from '@manacore/shared-stores';
export const contactTagOps = createTagLinkOps({
table: () => db.table('contactTags'),
entityIdField: 'contactId',
});

View file

@ -0,0 +1,19 @@
/**
* Ucontext Tags Uses shared global tags + module-specific junction table.
*/
import { db } from '$lib/data/database';
import { createTagLinkOps } from '@manacore/shared-stores';
export {
tagMutations,
useAllTags,
getTagById,
getTagsByIds,
getTagColor,
} from '@manacore/shared-stores';
export const documentTagOps = createTagLinkOps({
table: () => db.table('documentTags'),
entityIdField: 'documentId',
});

View file

@ -0,0 +1,19 @@
/**
* Guides Tags Uses shared global tags + module-specific junction table.
*/
import { db } from '$lib/data/database';
import { createTagLinkOps } from '@manacore/shared-stores';
export {
tagMutations,
useAllTags,
getTagById,
getTagsByIds,
getTagColor,
} from '@manacore/shared-stores';
export const guideTagOps = createTagLinkOps({
table: () => db.table('guideTags'),
entityIdField: 'guideId',
});

View file

@ -0,0 +1,19 @@
/**
* Uinventar Tags Uses shared global tags + module-specific junction table.
*/
import { db } from '$lib/data/database';
import { createTagLinkOps } from '@manacore/shared-stores';
export {
tagMutations,
useAllTags,
getTagById,
getTagsByIds,
getTagColor,
} from '@manacore/shared-stores';
export const itemTagOps = createTagLinkOps({
table: () => db.table('invItemTags'),
entityIdField: 'itemId',
});

View file

@ -0,0 +1,19 @@
/**
* Umoodlit Tags Uses shared global tags + module-specific junction table.
*/
import { db } from '$lib/data/database';
import { createTagLinkOps } from '@manacore/shared-stores';
export {
tagMutations,
useAllTags,
getTagById,
getTagsByIds,
getTagColor,
} from '@manacore/shared-stores';
export const moodTagOps = createTagLinkOps({
table: () => db.table('moodTags'),
entityIdField: 'moodId',
});

View file

@ -0,0 +1,19 @@
/**
* Umukke Tags Uses shared global tags + module-specific junction table.
*/
import { db } from '$lib/data/database';
import { createTagLinkOps } from '@manacore/shared-stores';
export {
tagMutations,
useAllTags,
getTagById,
getTagsByIds,
getTagColor,
} from '@manacore/shared-stores';
export const songTagOps = createTagLinkOps({
table: () => db.table('songTags'),
entityIdField: 'songId',
});

View file

@ -0,0 +1,19 @@
/**
* Unutriphi Tags Uses shared global tags + module-specific junction table.
*/
import { db } from '$lib/data/database';
import { createTagLinkOps } from '@manacore/shared-stores';
export {
tagMutations,
useAllTags,
getTagById,
getTagsByIds,
getTagColor,
} from '@manacore/shared-stores';
export const mealTagOps = createTagLinkOps({
table: () => db.table('mealTags'),
entityIdField: 'mealId',
});

View file

@ -1,8 +1,10 @@
/**
* Tag Store Local-First via Shared Tag Store
* Tags are stored in shared IndexedDB ('manacore-tags'), accessible across all apps.
* Use context ('tags') for reads, tagMutations for writes.
* Planta Tags Uses shared global tags + module-specific junction table.
*/
import { db } from '$lib/data/database';
import { createTagLinkOps } from '@manacore/shared-stores';
export {
tagMutations,
useAllTags,
@ -11,3 +13,8 @@ export {
getTagColor,
getTagsByGroup,
} from '@manacore/shared-stores';
export const plantTagOps = createTagLinkOps({
table: () => db.table('plantTags'),
entityIdField: 'plantId',
});

View file

@ -0,0 +1,19 @@
/**
* Upresi Tags Uses shared global tags + module-specific junction table.
*/
import { db } from '$lib/data/database';
import { createTagLinkOps } from '@manacore/shared-stores';
export {
tagMutations,
useAllTags,
getTagById,
getTagsByIds,
getTagColor,
} from '@manacore/shared-stores';
export const deckTagOps = createTagLinkOps({
table: () => db.table('presiDeckTags'),
entityIdField: 'deckId',
});

View file

@ -0,0 +1,19 @@
/**
* Uquestions Tags Uses shared global tags + module-specific junction table.
*/
import { db } from '$lib/data/database';
import { createTagLinkOps } from '@manacore/shared-stores';
export {
tagMutations,
useAllTags,
getTagById,
getTagsByIds,
getTagColor,
} from '@manacore/shared-stores';
export const questionTagOps = createTagLinkOps({
table: () => db.table('questionTags'),
entityIdField: 'questionId',
});

View file

@ -0,0 +1,19 @@
/**
* Uskilltree Tags Uses shared global tags + module-specific junction table.
*/
import { db } from '$lib/data/database';
import { createTagLinkOps } from '@manacore/shared-stores';
export {
tagMutations,
useAllTags,
getTagById,
getTagsByIds,
getTagColor,
} from '@manacore/shared-stores';
export const skillTagOps = createTagLinkOps({
table: () => db.table('skillTags'),
entityIdField: 'skillId',
});

View file

@ -0,0 +1,19 @@
/**
* Utimes Tags Uses shared global tags + module-specific junction table.
*/
import { db } from '$lib/data/database';
import { createTagLinkOps } from '@manacore/shared-stores';
export {
tagMutations,
useAllTags,
getTagById,
getTagsByIds,
getTagColor,
} from '@manacore/shared-stores';
export const entryTagOps = createTagLinkOps({
table: () => db.table('entryTags'),
entityIdField: 'entryId',
});

View file

@ -0,0 +1,19 @@
/**
* Uzitare Tags Uses shared global tags + module-specific junction table.
*/
import { db } from '$lib/data/database';
import { createTagLinkOps } from '@manacore/shared-stores';
export {
tagMutations,
useAllTags,
getTagById,
getTagsByIds,
getTagColor,
} from '@manacore/shared-stores';
export const listTagOps = createTagLinkOps({
table: () => db.table('zitareListTags'),
entityIdField: 'listId',
});