Skip to content

Conversation

@kpal81xd
Copy link
Contributor

@kpal81xd kpal81xd commented Sep 2, 2025

Breaking changes

  • Converted to NPM package and exports this shape:
export const html: string;
export const css: string;
export const js: string;
  • Moves static files to public directory

Non-breaking changes

  • Converts JS to TS

@kpal81xd kpal81xd self-assigned this Sep 2, 2025
@kpal81xd kpal81xd added the enhancement New feature or request label Sep 2, 2025
@kpal81xd kpal81xd requested review from a team and slimbuck September 2, 2025 18:13
@slimbuck slimbuck requested a review from Copilot September 3, 2025 07:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Converts the codebase from JavaScript to TypeScript and prepares it as an NPM package, introducing proper type annotations and module exports.

  • Converts all JS files to TypeScript with proper type annotations
  • Restructures the build to output both a standalone viewer to public/ and NPM package assets to dist/
  • Adds a new module entry point that exports HTML, CSS, and JS as strings

Reviewed Changes

Copilot reviewed 16 out of 21 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/viewer.ts Converted from JS to TS with comprehensive type annotations for all class properties and method parameters
src/pointer-device.js Removed JavaScript file (likely converted to TypeScript elsewhere)
src/picker.ts Added TypeScript types for class properties and method parameters
src/observe.ts Added TypeScript types and symbol property validation logic
src/input.ts Converted from JS to TS with detailed type annotations for all class members
src/index.ts Added comprehensive TypeScript imports and type annotations throughout
src/data-migrations.ts Added TypeScript type annotations for migration functions
src/core/spline.ts Converted from JS to TS with proper type annotations for all methods and properties
src/core/math.ts Created new TypeScript version with proper type annotations
src/core/math.js Removed JavaScript version
src/controllers/anim-controller.ts Added comprehensive TypeScript types including AnimTrack type definition
rollup.config.mjs Updated build configuration to support TypeScript and dual output directories
package.json Updated package configuration for NPM publishing with proper exports
module/index.ts New module entry point that exports HTML, CSS, and JS assets as strings
jsconfig.json Removed JavaScript configuration file
eslint.config.mjs Updated ESLint configuration to support TypeScript
Comments suppressed due to low confidence (1)

src/observe.ts:19

  • The error message 'err' is not descriptive. It should clearly indicate that setting new properties is not allowed, such as 'Cannot set new properties on observed object'.
            if (!members.has(property)) {
                console.log('err');
                return false;
            }

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@kpal81xd kpal81xd requested a review from slimbuck September 3, 2025 08:55
@kpal81xd kpal81xd merged commit 1b92eb0 into main Sep 3, 2025
2 checks passed
@kpal81xd kpal81xd deleted the module branch September 3, 2025 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants