mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-15 07:21:10 +02:00
First wire-up of the userTagPresets surface from Phase 2b's v34 schema. This is the store layer only — Space-create UI integration + the apply-preset-to-space flow land in a follow-up commit alongside the SpaceCreateDialog changes. - lib/data/tag-presets/types.ts: LocalUserTagPreset shape + inline TagPresetEntry + toUserTagPreset converter. - lib/data/tag-presets/store.svelte.ts: createPreset / updatePreset / deletePreset / setDefault / appendEntry. Stamps userId explicitly because userTagPresets is kept out of SYNC_APP_MAP (the Dexie creating-hook only fires for sync tables). At-most-one-default-per- user invariant enforced by clearDefaultFlag() before writes that set isDefault=true. - lib/data/tag-presets/queries.ts: useUserTagPresets + useDefaultTagPreset live queries. User-scoped, no active-space filter (presets show from any Space context). - crypto: move userTagPresets from plaintext-allowlist to ENCRYPTION_REGISTRY with fields ['name', 'tags']. AES wrapping handles the tags array via JSON-stringify, same pattern as food.foods. Crypto audit: 196 tables (95 encrypted, +1 userTagPresets). Type-check clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api | ||
| calc/packages/shared | ||
| calendar | ||
| cards | ||
| chat | ||
| citycorners | ||
| contacts | ||
| context | ||
| docs | ||
| food | ||
| guides | ||
| inventory | ||
| mana | ||
| manavoxel | ||
| memoro | ||
| moodlit | ||
| mukke | ||
| news | ||
| photos | ||
| picture | ||
| plants | ||
| presi | ||
| questions | ||
| quotes/packages/content | ||
| skilltree | ||
| storage | ||
| times | ||
| todo | ||
| traces | ||
| uload | ||