Releases: toss/overlay-kit
[email protected]
Patch Changes
-
#145
1a5d4bb
Thanks @gwagjiug! - fix: remove unnecessary type assertion from Context.Provider -
#167
b19f2c6
Thanks @jiji-hoon96! - refactor: Extract determine current overlay logic to a utility function -
#158
a6e2f15
Thanks @jiji-hoon96! - refactor: Replace map with forEach in event emitter -
#168
4f70bdb
Thanks @DongGukMon! - feat: extend environment guard to recognise React Native -
#173
617b0a0
Thanks @dayongkr! - Enhance error message for duplicated id
[email protected]
Patch Changes
-
#161
ec07614
Thanks @jungpaeng! - feat: Change to allow each overlay provider to have a unique event IDEach overlay provider now uses a unique event ID instead of relying on shared global identifiers.
This change improves event handling accuracy and avoids potential collisions when managing multiple overlays from different providers.
It is backward-compatible for existing overlays that do not explicitly set a provider-specific ID.
[email protected]
Minor Changes
- #149
a98a312
Thanks @jungpaeng! - refactor: migrate event based store
Patch Changes
-
#151
07f42a5
Thanks @jungpaeng! - feat: Add component keyFixed an issue with overlay components not properly remounting when unmounted and immediately reopened with the same ID.
Added a newcomponentKey
property that's separate fromoverlayId
to ensure React properly handles component lifecycle. Each timeoverlay.open()
is called, a new randomcomponentKey
is generated internally even when reusing the sameoverlayId
.This fix resolves scenarios where calling
unmount()
followed byopen()
with the same overlay ID in quick succession would result in the overlay not being visible to users.
[email protected]
Minor Changes
-
8c4d54d
Thanks @jungpaeng! - feat: export types from content-overlay-controllerExport
OverlayControllerComponent
andOverlayAsyncControllerComponent
types from content-overlay-controller module for better type accessibility in consumer projects.
[email protected]
[email protected]
Patch Changes
-
#113
b57d15b
Thanks @jungpaeng! - Improve overlay unmount logic and add test cases- Enhanced current overlay state management during unmount
- When unmounting a middle overlay with multiple overlays open, the last overlay becomes current
- When unmounting the last overlay, the previous overlay becomes current
- Added test cases
- Test for unmounting multiple overlays in different orders
- Test for tracking current overlay state using useCurrentOverlay hook
- Enhanced current overlay state management during unmount
[email protected]
Minor Changes
-
#102
becbd90
Thanks @jungpaeng! - feat: Add local overlay context support- Add
experimental_createOverlayContext
function to create isolated overlay contexts - Refactor context management to support multiple overlay instances
- Move overlay provider and controller logic into separate files
- Update store management to support local state
- Add documentation for new context creation API
- Improve type definitions and exports
- Add
[email protected]
[email protected]
Patch Changes
-
#74
324dab9
Thanks @jungpaeng! - Fix path resolution error by updating import path for 'use-sync-external-store/shim'The import path for
use-sync-external-store/shim
was incorrect, causing a path resolution error during build. This change updates the import statement to includeindex.js
, resolving the path issue.
[email protected]
Minor Changes
-
#72
9776fff
Thanks @jungpaeng! - Support for React versions 16.8 and 17Related Issue: Fixes #43
Patch Changes
-
#64
01eaa3c
Thanks @jungpaeng! - feat: Add cleanup effect for unmountingThis commit introduces a useEffect cleanup function in the OverlayProvider component that dispatches a 'REMOVE_ALL' action when the component unmounts.
This change ensures that all overlays are properly cleaned up during testing scenarios, preventing state leakage and side effects from persistent overlays.Related Issue: Fixes #63