managarten/packages/shared-privacy/package.json
Till JS b7a54ccd10 feat(unlisted-sharing): QR code + per-link expiry picker (M8.5)
SharedLinkControls now renders a lazy QR code (qrcode npm) and a
datetime-local "Läuft ab" picker. Both stay in sync with the active
URL — regenerating the link rebuilds the QR; clearing the expiry
re-publishes with no `expiresAt`.

Wired across all three unlisted collections:
- Calendar: LocalEvent.unlistedExpiresAt + setUnlistedExpiry +
  preserve-on-refresh + clear-on-flip; both Workbench DetailView and
  EventDetailModal pass expiresAt+onExpiryChange to SharedLinkControls.
- Library: same pattern in libraryEntriesStore + DetailView.
- Places: same pattern in placesStore + DetailView.

setVisibility clears any prior expiry so a flip-away-flip-back gets
a fresh "never expires" link. refreshUnlistedSnapshot and
regenerateUnlistedToken preserve the existing expiry so a content
edit or token rotation never silently extends a link's lifetime.

The qrcode dep ships as a regular `dependencies` entry on
@mana/shared-privacy so any consuming app picks it up via the
workspace.

Note: an unrelated svelte-check error in writing/components/DraftCard
("draft" not assignable to DragType) exists from a parallel session
and is not introduced by this commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 12:29:53 +02:00

42 lines
859 B
JSON

{
"name": "@mana/shared-privacy",
"version": "0.1.0",
"private": true,
"type": "module",
"sideEffects": [
"**/*.svelte",
"**/*.css"
],
"svelte": "./src/index.ts",
"main": "./src/index.ts",
"types": "./src/index.ts",
"exports": {
".": {
"svelte": "./src/index.ts",
"types": "./src/index.ts",
"default": "./src/index.ts"
}
},
"scripts": {
"check": "svelte-check --tsconfig ./tsconfig.json",
"type-check": "svelte-check --tsconfig ./tsconfig.json",
"test": "vitest run",
"test:watch": "vitest",
"lint": "eslint ."
},
"dependencies": {
"@mana/shared-icons": "workspace:*",
"qrcode": "^1.5.4",
"zod": "^3.25.76"
},
"devDependencies": {
"@types/qrcode": "^1.5.5",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"typescript": "^5.7.3",
"vitest": "^4.1.2"
},
"peerDependencies": {
"svelte": "^5.0.0"
}
}