Files
Doruk Kavcioglu 42794345ad Preserve Unicode text slots during Lottie saves
CanvasKit's getTextSlot mangles non-ASCII text (mojibake on save), so
read text slot values from the source JSON plus an in-memory overrides
map instead of off the animation. Edits now write to both the slot
document and its bound layer fallback.

- canvas.tsx: track text edits in a textOverrides signal, derive slots
  from sourceDoc + overrides, reset overrides when the scene reloads,
  and bail out of save on a failed HTTP response
- lottie.ts: add readTextSlotValue/writeTextSlotValue and export
  LottieDoc; cover slot document and bound-layer shapes
- add scripts/text-slot-unicode.test.mjs and a check:text-slots script
2026-06-30 23:30:17 +03:00

39 lines
1.0 KiB
JSON

{
"name": "text-to-lottie",
"private": true,
"version": "1.0.0",
"license": "MIT",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"check:text-slots": "node --experimental-strip-types --test scripts/text-slot-unicode.test.mjs",
"preview": "vite preview",
"postinstall": "node scripts/copy-canvaskit.mjs"
},
"dependencies": {
"@fontsource-variable/inter": "^5.2.8",
"@kobalte/core": "^0.13.11",
"@solidjs/router": "^0.16.1",
"canvaskit-wasm": "^0.41.1",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"fflate": "^0.8.3",
"lucide-solid": "^1.18.0",
"shadcn": "^4.11.0",
"solid-js": "^1.9.9",
"tailwind-merge": "^3.6.0",
"tw-animate-css": "^1.4.0",
"vite-plugin-solid-svg": "^0.8.1"
},
"devDependencies": {
"@tailwindcss/vite": "^4.1.13",
"@types/node": "^25.9.2",
"solid-devtools": "^0.34.3",
"tailwindcss": "^4.1.13",
"typescript": "^5.9.2",
"vite": "^7.1.4",
"vite-plugin-solid": "^2.11.8"
}
}