diff --git a/apps/manacore/apps/web/src/lib/modules/calendar/stores/tags.svelte.ts b/apps/manacore/apps/web/src/lib/modules/calendar/stores/tags.svelte.ts new file mode 100644 index 000000000..3f1c2e15c --- /dev/null +++ b/apps/manacore/apps/web/src/lib/modules/calendar/stores/tags.svelte.ts @@ -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', +}); diff --git a/apps/manacore/apps/web/src/lib/modules/cards/stores/tags.svelte.ts b/apps/manacore/apps/web/src/lib/modules/cards/stores/tags.svelte.ts new file mode 100644 index 000000000..6e97e31a9 --- /dev/null +++ b/apps/manacore/apps/web/src/lib/modules/cards/stores/tags.svelte.ts @@ -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', +}); diff --git a/apps/manacore/apps/web/src/lib/modules/chat/stores/tags.svelte.ts b/apps/manacore/apps/web/src/lib/modules/chat/stores/tags.svelte.ts new file mode 100644 index 000000000..c22e39b05 --- /dev/null +++ b/apps/manacore/apps/web/src/lib/modules/chat/stores/tags.svelte.ts @@ -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', +}); diff --git a/apps/manacore/apps/web/src/lib/modules/citycorners/stores/tags.svelte.ts b/apps/manacore/apps/web/src/lib/modules/citycorners/stores/tags.svelte.ts new file mode 100644 index 000000000..a979daa13 --- /dev/null +++ b/apps/manacore/apps/web/src/lib/modules/citycorners/stores/tags.svelte.ts @@ -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', +}); diff --git a/apps/manacore/apps/web/src/lib/modules/contacts/stores/tags.svelte.ts b/apps/manacore/apps/web/src/lib/modules/contacts/stores/tags.svelte.ts new file mode 100644 index 000000000..1467cff48 --- /dev/null +++ b/apps/manacore/apps/web/src/lib/modules/contacts/stores/tags.svelte.ts @@ -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', +}); diff --git a/apps/manacore/apps/web/src/lib/modules/context/stores/tags.svelte.ts b/apps/manacore/apps/web/src/lib/modules/context/stores/tags.svelte.ts new file mode 100644 index 000000000..a559a1c55 --- /dev/null +++ b/apps/manacore/apps/web/src/lib/modules/context/stores/tags.svelte.ts @@ -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', +}); diff --git a/apps/manacore/apps/web/src/lib/modules/guides/stores/tags.svelte.ts b/apps/manacore/apps/web/src/lib/modules/guides/stores/tags.svelte.ts new file mode 100644 index 000000000..b0c25787e --- /dev/null +++ b/apps/manacore/apps/web/src/lib/modules/guides/stores/tags.svelte.ts @@ -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', +}); diff --git a/apps/manacore/apps/web/src/lib/modules/inventar/stores/tags.svelte.ts b/apps/manacore/apps/web/src/lib/modules/inventar/stores/tags.svelte.ts new file mode 100644 index 000000000..5af50734e --- /dev/null +++ b/apps/manacore/apps/web/src/lib/modules/inventar/stores/tags.svelte.ts @@ -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', +}); diff --git a/apps/manacore/apps/web/src/lib/modules/moodlit/stores/tags.svelte.ts b/apps/manacore/apps/web/src/lib/modules/moodlit/stores/tags.svelte.ts new file mode 100644 index 000000000..35f50761f --- /dev/null +++ b/apps/manacore/apps/web/src/lib/modules/moodlit/stores/tags.svelte.ts @@ -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', +}); diff --git a/apps/manacore/apps/web/src/lib/modules/mukke/stores/tags.svelte.ts b/apps/manacore/apps/web/src/lib/modules/mukke/stores/tags.svelte.ts new file mode 100644 index 000000000..e3dc74dfa --- /dev/null +++ b/apps/manacore/apps/web/src/lib/modules/mukke/stores/tags.svelte.ts @@ -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', +}); diff --git a/apps/manacore/apps/web/src/lib/modules/nutriphi/stores/tags.svelte.ts b/apps/manacore/apps/web/src/lib/modules/nutriphi/stores/tags.svelte.ts new file mode 100644 index 000000000..bf2668f30 --- /dev/null +++ b/apps/manacore/apps/web/src/lib/modules/nutriphi/stores/tags.svelte.ts @@ -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', +}); diff --git a/apps/manacore/apps/web/src/lib/modules/planta/stores/tags.svelte.ts b/apps/manacore/apps/web/src/lib/modules/planta/stores/tags.svelte.ts index 074782375..82f624e88 100644 --- a/apps/manacore/apps/web/src/lib/modules/planta/stores/tags.svelte.ts +++ b/apps/manacore/apps/web/src/lib/modules/planta/stores/tags.svelte.ts @@ -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', +}); diff --git a/apps/manacore/apps/web/src/lib/modules/presi/stores/tags.svelte.ts b/apps/manacore/apps/web/src/lib/modules/presi/stores/tags.svelte.ts new file mode 100644 index 000000000..25ee24812 --- /dev/null +++ b/apps/manacore/apps/web/src/lib/modules/presi/stores/tags.svelte.ts @@ -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', +}); diff --git a/apps/manacore/apps/web/src/lib/modules/questions/stores/tags.svelte.ts b/apps/manacore/apps/web/src/lib/modules/questions/stores/tags.svelte.ts new file mode 100644 index 000000000..de2a452ac --- /dev/null +++ b/apps/manacore/apps/web/src/lib/modules/questions/stores/tags.svelte.ts @@ -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', +}); diff --git a/apps/manacore/apps/web/src/lib/modules/skilltree/stores/tags.svelte.ts b/apps/manacore/apps/web/src/lib/modules/skilltree/stores/tags.svelte.ts new file mode 100644 index 000000000..81faf31c3 --- /dev/null +++ b/apps/manacore/apps/web/src/lib/modules/skilltree/stores/tags.svelte.ts @@ -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', +}); diff --git a/apps/manacore/apps/web/src/lib/modules/times/stores/tags.svelte.ts b/apps/manacore/apps/web/src/lib/modules/times/stores/tags.svelte.ts new file mode 100644 index 000000000..35a1b925e --- /dev/null +++ b/apps/manacore/apps/web/src/lib/modules/times/stores/tags.svelte.ts @@ -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', +}); diff --git a/apps/manacore/apps/web/src/lib/modules/zitare/stores/tags.svelte.ts b/apps/manacore/apps/web/src/lib/modules/zitare/stores/tags.svelte.ts new file mode 100644 index 000000000..72100c078 --- /dev/null +++ b/apps/manacore/apps/web/src/lib/modules/zitare/stores/tags.svelte.ts @@ -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', +});