Skip to content

Commit 3270908

Browse files
terencechoclaude
andcommitted
fix(core): move lottieReadiness out of src/runtime so it ships in dist
The "./runtime/lottie-readiness" subpath export claimed to point at ./dist/runtime/adapters/lottieReadiness.js, but the published 0.6.6 and 0.6.7 tarballs never contained that file. Reason: packages/core/tsconfig.json excludes "src/runtime" (those files run in a browser context and are bundled separately into the IIFE artifact), so tsc never emitted the compiled output. Consumers that import the subpath — most notably @hyperframes/studio's Player.tsx — fail to resolve the module and the build breaks at the consumer site. lottieReadiness.ts is a pure helper: takes `unknown`, returns `boolean`, no DOM or `window` access. It doesn't belong under src/runtime/ in the first place — that's why the runtime-exclude rule rightly caught it. Move it to src/lottieReadiness.ts so the standard library build picks it up. The subpath export name stays "./runtime/lottie-readiness" so existing consumers (studio) don't need a code change; only the exports map's underlying file path moves to ./dist/lottieReadiness.{js,d.ts}. - mv src/runtime/adapters/lottieReadiness.{ts,test.ts} -> src/ - update src/runtime/adapters/lottie.ts re-export path - update package.json + publishConfig.exports to point at new dist path Verified: full core test suite passes (862/862), dist now contains lottieReadiness.{js,d.ts}, studio typechecks against the moved file. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 82c9b6b commit 3270908

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

packages/core/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
},
3232
"./runtime": "./dist/hyperframe.runtime.iife.js",
3333
"./runtime/lottie-readiness": {
34-
"import": "./src/runtime/adapters/lottieReadiness.ts",
35-
"types": "./src/runtime/adapters/lottieReadiness.ts"
34+
"import": "./src/lottieReadiness.ts",
35+
"types": "./src/lottieReadiness.ts"
3636
},
3737
"./studio-api": {
3838
"import": "./src/studio-api/index.ts",
@@ -78,8 +78,8 @@
7878
},
7979
"./runtime": "./dist/hyperframe.runtime.iife.js",
8080
"./runtime/lottie-readiness": {
81-
"import": "./dist/runtime/adapters/lottieReadiness.js",
82-
"types": "./dist/runtime/adapters/lottieReadiness.d.ts"
81+
"import": "./dist/lottieReadiness.js",
82+
"types": "./dist/lottieReadiness.d.ts"
8383
},
8484
"./studio-api": {
8585
"import": "./dist/studio-api/index.js",
File renamed without changes.
File renamed without changes.

packages/core/src/runtime/adapters/lottie.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { RuntimeDeterministicAdapter } from "../types";
22
import { swallow } from "../diagnostics";
3-
export { isLottieAnimationLoaded } from "./lottieReadiness";
3+
export { isLottieAnimationLoaded } from "../../lottieReadiness";
44

55
/**
66
* Lottie adapter for HyperFrames

0 commit comments

Comments
 (0)