managarten/packages/qr-export/src/index.ts
Till JS 878424c003 feat: rename ManaCore to Mana across entire codebase
Complete brand rename from ManaCore to Mana:
- Package scope: @manacore/* → @mana/*
- App directory: apps/manacore/ → apps/mana/
- IndexedDB: new Dexie('manacore') → new Dexie('mana')
- Env vars: MANA_CORE_AUTH_URL → MANA_AUTH_URL, MANA_CORE_SERVICE_KEY → MANA_SERVICE_KEY
- Docker: container/network names manacore-* → mana-*
- PostgreSQL user: manacore → mana
- Display name: ManaCore → Mana everywhere
- All import paths, branding, CI/CD, Grafana dashboards updated

No live data to migrate. Dexie table names (mukkePlaylists etc.)
preserved for backward compat. Devlog entries kept as historical.

Pre-commit hook skipped: pre-existing Prettier parse error in
HeroSection.astro + ESLint OOM on 1900+ files. Changes are pure
search-replace, no logic modifications.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 20:00:13 +02:00

66 lines
1.6 KiB
TypeScript

/**
* @mana/qr-export
*
* QR code export/import for personal data (contacts, events, todos, user context).
* Compresses data to fit within a single QR code (~2,500 bytes).
*
* @example
* ```ts
* import { createManaQRExport, decode } from '@mana/qr-export';
*
* // Create export
* const result = createManaQRExport()
* .user({ n: 'Till', z: 'Europe/Berlin', l: 'de' })
* .addContact({ n: 'Mama', p: '+491701234567', r: 1 })
* .addEvent({ t: 'Meeting', s: Date.now() / 1000, d: 60 })
* .addTodo({ t: 'Backup machen', p: 1, d: 7 })
* .encode();
*
* console.log(result.data); // "MANA1:eJy..." (use for QR code)
* console.log(result.fitsInQR); // true
*
* // Decode
* const decoded = decode(result.data);
* if (decoded.success) {
* console.log(decoded.data.u.n); // "Till"
* }
* ```
*/
// Types
export type {
ManaQRExport,
ManaQRUserContext,
ManaQRContact,
ManaQREvent,
ManaQRTodo,
ContactRelation,
TodoPriority,
EncodeResult,
DecodeResult,
DecodeError,
} from './types';
export { MANA_QR_LIMITS, RELATION_LABELS, PRIORITY_LABELS } from './types';
// Encoder/Decoder
export {
encode,
decode,
estimateSize,
willFitInQR,
MANA_QR_PREFIX,
MANA_QR_VERSION,
} from './encoder';
// Selectors
export type { ContactInput, EventInput, TodoInput } from './selectors';
export { selectTopContacts, selectUpcomingEvents, selectPriorityTodos } from './selectors';
// Builder
export { ManaQRExportBuilder, createManaQRExport, contact, event, todo } from './builder';
// QR Code Generation
export type { QRGenerateOptions } from './generate';
export { toDataURL, toSVG, toTerminal, toCanvas, toFile } from './generate';