This release introduces TypeScript support and modernizes the build and dependency setup for the project. The most important changes include migrating the source code to TypeScript, updating build tools and dependencies, and improving the CSS for better maintainability and theming.
TypeScript Migration and Build Process:
- Migrated main source files from JavaScript/JSX to TypeScript/TSX, updating type annotations throughout
src/lib/Core.tsxand related files. Updated the main entry point in the Rollup config toQuiz.tsxand added TypeScript compilation and type declaration generation with@rollup/plugin-typescript. - Added TypeScript-related scripts (
typecheck) and type declaration output (types) topackage.json.
Dependency and Build Tool Updates:
- Updated Babel configuration to add TypeScript preset and switch to
@babel/plugin-transform-*plugins. - Upgraded various dependencies and devDependencies in
package.jsonto their latest versions, including React, dompurify, nanoid, and build tools (Rollup, Webpack, Babel, ESLint, etc.), and added TypeScript type definitions.
Styling and Theming Improvements:
- Refactored
docs/main.cssto use CSS custom properties (variables) for colors, spacing, and border radii, making theming and maintenance easier. Improved responsive and dark mode support.
Full Changelog: 0.9.2...1.0.0