Skip to content

fix(motion-gpu): export reactive texture option types - #13

Open
alectimison-maker wants to merge 1 commit into
motion-core:masterfrom
alectimison-maker:fix/export-texture-options-types
Open

fix(motion-gpu): export reactive texture option types#13
alectimison-maker wants to merge 1 commit into
motion-core:masterfrom
alectimison-maker:fix/export-texture-options-types

Conversation

@alectimison-maker

Copy link
Copy Markdown

Summary

  • re-export TextureOptionsInput from the Svelte and Vue adapter entrypoints
  • cover both public barrel imports and both supported input shapes in the public API contract test

Motivation

useTexture() already accepts an options object or lazy options provider and its adapter modules export the corresponding TextureOptionsInput type. The package export map exposes only the adapter barrels, however, and those barrels omitted the type. Consumers therefore could not name the public input type without importing a non-exported internal path.

Design

This reuses the existing type and adds type-only barrel exports. The regression test imports through the same public adapter barrels consumers use and compiles both the object and lazy-provider forms. Existing runtime export snapshots remain unchanged.

Testing

  • pnpm exec tsc --noEmit --project tsconfig.json — passed
  • pnpm exec vitest run src/tests/public-api.test.ts — 7 tests passed
  • pnpm run test — 60 files and 808 tests passed
  • pnpm exec svelte-check --tsconfig ./tsconfig.json — passed with 0 errors and 0 warnings
  • pnpm exec vue-tsc --project tsconfig.vue.json --noEmit — passed
  • targeted Prettier and ESLint checks for the three changed files — passed

Unavailable on this Windows checkout:

  • pnpm run build reaches declaration generation, then scripts/build/emit-vue-dts.mjs cannot directly spawn the extensionless POSIX node_modules/.bin/vue-tsc shim (ENOENT)
  • the full Prettier check reports pre-existing CRLF differences across the checkout; the changed files pass the targeted check

Compatibility and risks

The change is additive and type-only. It does not add runtime exports, alter texture loading behavior, or change the React adapter.

Scope

No runtime or build-script changes are included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant