ci: Version Packages - #7
Merged
Merged
Conversation
✅ Deploy Preview for drawerly ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or setup this action to publish automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@drawerly/core@0.2.0
Minor Changes
#6
47e674cThanks @tinas! - Rework the public API of both packages ahead of the first stable release.@drawerly/core
createDrawerManagernow accepts a singleDrawerManagerConfigobject (initialStack,defaultOptions) instead of positional arguments. Drawers passed throughinitialStackgo through the same default merging asopen.BASE_DRAWER_DEFAULTS) are always applied;getDefaultOptions()always returns an object.undefinedornullno longer erase a configured default.opendocuments its replace semantics: opening an already open key replaces its options rather than merging them.updateOptionsandupdateDefaultOptionsaccept a patch object. The updater-function form is removed; read the current value withgetDrawerInstanceorgetDefaultOptionsinstead.DrawerState.stackis nowreadonly.getTopDrawer(),isOpen(key), and theresolveDrawerPredicatehelper. Removed theDrawerUpdatableOptionstype in favor ofDrawerPatch.@drawerly/core/domentry point exportinglockScroll, a reference counted body scroll lock with scrollbar compensation.drawerly-enter-active/drawerly-leave-activeclasses on the overlay instead of thedata-entering/data-closingattributes. Custom stylesheets need to be updated.@drawerly/vue
DrawerPluginis replaced by thecreateDrawerly()factory. The returned instance exposes the full manager API plus a reactivestateref, installs withapp.use(), and is usable outside components. Its manager reads are derived fromstate, so they work inside computed properties and render functions.useDrawerContext()is replaced byuseDrawerly();useDrawerInstance()is replaced byuseDrawer(), which addsisTopandinstance. Drawers are opened throughuseDrawerly().open().useDrawer()mirrors the manager operations that take a drawer key with the key already bound, and nothing else. Theplacement,closeOnEscapeKeyandcloseOnBackdropClicktwo-way bindings are removed; read them frominstanceand write them throughupdateOptions, which also keeps function predicates intact.componentParamsis renamed tocomponentProps.componentPropsplusdrawerKey. The injectedonCloseprop is removed; calluseDrawer(props.drawerKey).close()instead.teleportTomoved from plugin options to a<DrawerlyContainer>prop, alongside the newmodalandlockScrollprops. Theheadlessmode is removed.<TransitionGroup>: transition timing is handled by Vue, every close path plays the exit animation, and body scroll stays locked until it finishes.drawer-opened,drawer-closedandall-closed, each emitted after the matching animation.installregisters the container idempotently and warns when a second instance is installed into the same app; independent scoped stacks are supported by providingdrawerlyInjectionKeyin a subtree.Focus management (focus trap, initial focus, focus restore and background
inert) is not part of this release and lands in a follow-up.@drawerly/react@0.1.0
Minor Changes
#6
47e674cThanks @tinas! - Initial release of the React adapter.createDrawerly()creates a store-style instance at module scope, usable both inside components and outside of them (event handlers, stores, ...). No provider is required.useDrawerly(drawerly)subscribes to the instance and returns the manager API together with the drawer stack. Its manager reads come from the subscribed snapshot, so render output stays consistent with the stack a render was given.useDrawer(drawerly, key)mirrors the manager operations that take a drawer key with the key already bound:isOpen,isTop,instance,close,bringToTopandupdateOptions.<DrawerlyContainer drawerly={instance} />renders and animates the stack through a portal (portalTo, defaultbody), withmodalandlockScrollprops matching the Vue adapter.componentPropsplusdrawerKey; calluseDrawer(drawerly, props.drawerKey).close()to close it. Drawers without acomponentrender through the container'schildrenrender prop, which also receivesclose.Element.getAnimations(), so every close path plays its animation, delays and iteration counts are respected, and no timers are involved. Body scroll stays locked until the animation finishes.onDrawerOpened,onDrawerClosedandonAllClosed, each called after the matching animation.Focus management (focus trap, initial focus, focus restore and background
inert) is not part of this release and lands in a follow-up, together with the Vue adapter.Patch Changes
47e674c]:@drawerly/vue@0.2.0
Minor Changes
#6
47e674cThanks @tinas! - Rework the public API of both packages ahead of the first stable release.@drawerly/core
createDrawerManagernow accepts a singleDrawerManagerConfigobject (initialStack,defaultOptions) instead of positional arguments. Drawers passed throughinitialStackgo through the same default merging asopen.BASE_DRAWER_DEFAULTS) are always applied;getDefaultOptions()always returns an object.undefinedornullno longer erase a configured default.opendocuments its replace semantics: opening an already open key replaces its options rather than merging them.updateOptionsandupdateDefaultOptionsaccept a patch object. The updater-function form is removed; read the current value withgetDrawerInstanceorgetDefaultOptionsinstead.DrawerState.stackis nowreadonly.getTopDrawer(),isOpen(key), and theresolveDrawerPredicatehelper. Removed theDrawerUpdatableOptionstype in favor ofDrawerPatch.@drawerly/core/domentry point exportinglockScroll, a reference counted body scroll lock with scrollbar compensation.drawerly-enter-active/drawerly-leave-activeclasses on the overlay instead of thedata-entering/data-closingattributes. Custom stylesheets need to be updated.@drawerly/vue
DrawerPluginis replaced by thecreateDrawerly()factory. The returned instance exposes the full manager API plus a reactivestateref, installs withapp.use(), and is usable outside components. Its manager reads are derived fromstate, so they work inside computed properties and render functions.useDrawerContext()is replaced byuseDrawerly();useDrawerInstance()is replaced byuseDrawer(), which addsisTopandinstance. Drawers are opened throughuseDrawerly().open().useDrawer()mirrors the manager operations that take a drawer key with the key already bound, and nothing else. Theplacement,closeOnEscapeKeyandcloseOnBackdropClicktwo-way bindings are removed; read them frominstanceand write them throughupdateOptions, which also keeps function predicates intact.componentParamsis renamed tocomponentProps.componentPropsplusdrawerKey. The injectedonCloseprop is removed; calluseDrawer(props.drawerKey).close()instead.teleportTomoved from plugin options to a<DrawerlyContainer>prop, alongside the newmodalandlockScrollprops. Theheadlessmode is removed.<TransitionGroup>: transition timing is handled by Vue, every close path plays the exit animation, and body scroll stays locked until it finishes.drawer-opened,drawer-closedandall-closed, each emitted after the matching animation.installregisters the container idempotently and warns when a second instance is installed into the same app; independent scoped stacks are supported by providingdrawerlyInjectionKeyin a subtree.Focus management (focus trap, initial focus, focus restore and background
inert) is not part of this release and lands in a follow-up.Patch Changes
47e674c]: