Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
2.0.0 · 2026-07-30
First stable release of the awaitable, typed modal system.
Breaking
- Replaced the global
modalStoreand module augmentation API with isolated systems created bycreateModalSystem(). - Replaced injected flat modal props with
ModalRenderProps<Input, Result>. - Changed
ModalProviderregistration frommodalstosystem.
Added
- Added typed, awaitable
open()outcomes with explicit cancellation reasons. - Added
stack,replace, andsingletonorchestration policies. - Added headless
dialog,drawer, andsheetmotion presets. - Added automatic reduced-motion rendering and provider-unmount cancellation.
- Added a v1-to-v2 migration guide and typed-flow examples.
Changed
- Made the distributed stylesheet structural and headless; applications now own backdrop color, surface styling, spacing, and shadows.
- Separated business input from per-open rendering and interaction options.
1.4.0 · 2026-07-30
Fixed
- Bound injected close handlers to modal instance IDs, so repeated modal names close the correct instance.
- Made closing an empty or missing modal a safe no-op and prevented rapid repeated close actions from throwing.
- Made
closeAllModal()invoke each open modal'sonClosecallback once. - Fixed modals opened before
ModalProvidermounts so the portal renders after the body root is available. - Added a real Tab focus trap, accessible dialog naming props, and inactive-dialog isolation for stacked modals.
- Allowed oversized modal bodies to scroll instead of clipping their content.
- Prevented edge and corner positions from squeezing modal bodies into half or quarter viewports on smaller screens.
- Prevented horizontal scrollbars from flashing while positioned modals animate into view.
Added
- Exported the full public type surface, including
Params,BaseModalParams,ModalConfig, andModalInitialParams. - Added Chromium browser regression tests for portal rendering, focus containment, accessible names, and responsive modal placement.
Changed
- Docs deployment now triggers on documentation changes to
main(and manual dispatch) instead of tag pushes, because the GitHub Pages environment does not allow tag-based deployments. - Release publishing now runs lint, type checks, unit tests, browser tests, build, and package verification before publishing.
- Trusted publishing now uses Node 24 and a compatible npm 11 release instead of upgrading to an incompatible npm major.
1.3.2 · 2026-06-27
Fixed
- Fixed
onClosefiring twice when a modal is closed by clicking outside it; the store is now the single source of truth for the callback. - Fixed
closeModal(name)leavingactivepointing at the wrong modal when a non-topmost modal is closed by name. - Enforced the documented
closeOnPressEscdefault oftrue; pressing Escape now closes the topmost modal unless explicitly disabled. - Synced the
blurJSDoc default with its runtime default (true). - Fixed API documentation headings so inline code titles keep the gradient text treatment without showing an inline-code background.
Added
- Accessibility baseline: dialogs now render with
role="dialog"andaria-modal="true", lock background scroll while open, move focus into the active dialog on open, and restore focus to the trigger when the stack empties. - Unit tests for the modal store.
- A Husky pre-commit hook that runs Biome format + lint on staged files.
- An
apps/exampleVite app that imports the library source for local testing.
Changed
- Externalized
motionandzustandfrom the published bundle so peer dependencies are no longer duplicated, reducing package size. - Declared
sideEffectsfor the stylesheet and removed the vestigialpathdependency and an invalidrequireexport map entry. - The docs site now rebuilds only on tag pushes or when documentation files change.
1.3.1 · 2026-06-05
Changed
- Switched the library version bump scripts to Yarn and removed the root
package-lock.jsonfrom the repository and future commits. - Updated the published package homepage to point to the GitHub Pages documentation site.
- Restored the Turbo task pipeline and added a dedicated
check-typesscript for the library workspace so CI can run type checks again. - Restored the default click-outside behavior so clicking the backdrop closes a modal unless it is explicitly disabled.
- Added a root
LICENSEfile so repository and package tooling can detect the MIT license from the monorepo root.
1.3.0 · 2026-06-01
Changed
- Converted the repository to a Turbo monorepo with
apps/library,apps/document, and shared TypeScript config packages. - Moved the published library source, package metadata, README, license, and security files into
apps/library. - Replaced the root Prettier setup with a root-level Biome setup and wired
lint/formatscripts through the workspaces. - Added a Docusaurus documentation site in
apps/document, including API, guide, getting started, and changelog pages. - Added GitHub Pages deployment for the docs site and updated CI workflows to build from the monorepo layout.
- Renamed store and provider entrypoints to
src/stores/modal.tsandsrc/providers/modal.tsx, and updated public exports accordingly. - Renamed type files to shorter names such as
base-modal-params.ts,modal-components.ts, andmodal-state.ts. - Removed the bundled example app source from
src/exampleand the unused example stylesheet from the package source. - Extracted modal class-name and body animation helpers into
src/utils, and moved modal animation constants and z-index constants intosrc/configs/constant.ts. - Replaced
uuid,keyboardjs, andclsxusage with built-in JavaScript and DOM APIs, removing those packages from runtime dependencies. - Updated the README install note and examples to reflect the current
modalStoreAPI and peer dependency expectations.
1.2.8 · 2026-06-01
Added
- Added GitHub Actions workflows for CI and npm publishing with provenance.
- Added a
SECURITY.mdpolicy and an MITLICENSEfile to document release and security expectations. - Added
release:checkandciscripts to validate release artifacts and CI builds consistently. - Added npm, bundle, type, issue, and Socket badges to the README.
Changed
- Documented the trusted publishing release flow in the README.
- Replaced the manual local publish script with a CI-oriented release verification script.
1.2.6 · 2026-05-31
Changed
- Removed Tailwind CSS and the Tailwind Vite plugin from package dependencies.
- Replaced the example app Tailwind utilities with plain CSS classes.
- Moved modal default layout to
main.csswith zero-specificity selectors so consumer classes can override defaults without!important. - Added modal positions:
top,top-left,top-right,top-center,left,right,bottom,bottom-left,bottom-right,bottom-center,center, andcenter-full. - Added default position-aware body animations for edge and corner placements.
1.2.5 · 2026-05-30
Fixed
- Removed Tailwind CSS injection from the distributed library build.
- Moved Tailwind CSS import to the example app only.
- Replaced internal modal layout Tailwind classes with inline styles to avoid overriding consumer app utilities.
1.2.4 · 2025-05-30
Changed
- Split
modal.type.tsinto separate files for better maintainability. base-modal-params.type.tshandled base modal parameter types.modal-components.type.tshandled modal component and config types.modal-state.type.tshandled modal state and action types.modal.type.tsre-exported all types for backward compatibility.- Bumped dependencies such as
motion,zustand,vite,tailwindcss,biome, andplaywright.
1.2.3 · 2025-05-30
Fixed
- Fixed
ModalParamsso it correctly extendsModalDefinition[T]withcloseModal. - Updated dependencies for stability.
1.2.2 · 2025-11-21
Added
- Enhanced TypeScript documentation with comprehensive JSDoc comments.
- Added more detailed examples for modal animations and positioning.
- Improved documentation for the blur effect parameter.
- Added more complete examples for
ModalComponentandModalConfig.
Changed
- Improved type documentation with more realistic usage examples.
- Expanded Framer Motion animation configuration documentation.
- Clarified modal positioning options.
Fixed
- Type definitions now import required dependencies correctly.
- Documentation examples now match the current API.
