Release/v0.2.0 - #6
Merged
Merged
Conversation
Take a single config object, always apply built-in defaults, and keep a default when an option is passed as undefined or null. Replace the updater-function form of updateOptions and updateDefaultOptions with a patch object, and dispatch state changes in order when a listener mutates the stack while being notified. Add getTopDrawer, isOpen and resolveDrawerPredicate, plus a @drawerly/core/dom entry point exporting a reference counted scroll lock with scrollbar compensation. Enter and leave animations now hang off the transition classes the adapters apply instead of data-entering and data-closing attributes. BREAKING CHANGE: createDrawerManager takes a config object, updateOptions and updateDefaultOptions no longer accept updater functions, DrawerUpdatableOptions is removed, the stylesheet animation contract changed, and the package no longer ships a CommonJS build.
Replace DrawerPlugin with a createDrawerly() factory whose manager reads derive from a reactive state ref, so they track dependencies inside computed properties and render functions. useDrawerContext and useDrawerInstance become useDrawerly and useDrawer, and drawers are opened through useDrawerly().open(). useDrawer now mirrors the manager operations that take a drawer key with the key already bound, and nothing else. Rebuild the container on TransitionGroup: Vue owns the transition timing, every close path plays the exit animation, and body scroll stays locked until it finishes. Drawer content receives only its componentProps plus drawerKey, so nothing has to be memoized to keep it from re-rendering. BREAKING CHANGE: DrawerPlugin, useDrawerContext, useDrawerInstance, the headless mode, the injected onClose prop and the placement, closeOnEscapeKey and closeOnBackdropClick two-way bindings are removed, componentParams is renamed to componentProps, and the package no longer ships a CommonJS build. Focus management is not part of this release.
Ship a store-style createDrawerly() instance that needs no provider, useDrawerly() and useDrawer() hooks, and a DrawerlyContainer that renders the stack through a portal. The adapter matches the Vue one: manager reads come from the subscribed snapshot, useDrawer mirrors the manager operations that take a drawer key with the key already bound, drawer content receives only its componentProps plus drawerKey, and body scroll stays locked until the exit animation ends. Exit and enter animations are awaited through Element.getAnimations(), so delays and iteration counts are respected without any timers.
Update every guide and API reference page for both adapters to match the current API: open() and updateOptions()/updateDefaultOptions() replace rather than merge (skipping undefined/null so configured defaults survive), the updater-function form is gone, and useDrawer no longer takes an open() method or the placement/closeOnEscapeKey/ closeOnBackdropClick bindings. Drop the injected onClose prop from every example in favor of useDrawer(key).close() called from inside the content component. Rewrite each adapter's animation docs for its actual mechanism (Vue's TransitionGroup timing vs. React's Element.getAnimations()) instead of the removed data-entering/data-closing attributes, and remove claims about focus trapping, focus restore, and inert backgrounds, none of which ship in this release. Document the new lockScroll container prop and the @drawerly/core/dom entry point.
- Turn on `markdown: true` in the shared antfu eslint config so fenced code blocks in docs are linted alongside source - Rewrite the DrawerManager interface with property syntax and drop the `ts/method-signature-style` eslint-disable block - Type Vue `useDrawerly` injection via a generic argument and remove the redundant cast - Update docs snippets to match the new interface style and named code-block filenames
- Bump `packageManager` to pnpm 11.20.0 and refresh workspace policies (`trustPolicy`, `shellEmulator`, `allowBuilds`, etc.) - Split React/Vue-only dependencies into grouped `catalog:react` and `catalog:vue` so adapter-specific bumps stay isolated - Upgrade core toolchain: eslint 10, typescript 6, vite 8, vite-plugin-dts 5, vitest 4.1, vitepress 2 alpha, and matching peers - Add `@types/node` to each package and register it in tsconfig `types` so vite configs typecheck with the new toolchain - Rename `outDir` to `outDirs` in each vite-plugin-dts config for the v5 API - Regenerate `pnpm-lock.yaml`
✅ Deploy Preview for drawerly ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Align workflow tooling with the workspace `packageManager` field and let setup-node track the latest LTS instead of hard-coding a major.
… auto-registration - Simplify `install(app)` to only call `app.provide(drawerlyInjectionKey, drawerly)` - Remove the `declare module 'vue'` block that augmented `ComponentCustomProperties` and `GlobalComponents`, so consumers no longer get the `Drawerly<any>` widening on `$drawerly` - Consumers now import `DrawerlyContainer` explicitly and access the instance through `useDrawerly()` (Options API users can call it from `setup()`) - Drop the unused `env.d.ts` and its tsconfig include since `process.env.NODE_ENV` is no longer referenced - Update tests to assert provide behavior without relying on the removed globals; refresh docs to show explicit imports BREAKING CHANGE: Installing the Drawerly plugin no longer sets `app.config.globalProperties.$drawerly` or globally registers the `DrawerlyContainer` component. Access the instance via `useDrawerly()` and import `DrawerlyContainer` from `@drawerly/vue` where you use it.
Replace hand-written API pages with TypeDoc + typedoc-plugin-markdown + typedoc-vitepress-theme, invoked once per package with dedicated out dirs. Sidebar is imported from the generated typedoc-sidebar.json files. Generated api/ folders are gitignored and rebuilt via the predocs:{dev,build} scripts.
- core: correct 'fields left out' claim in managing-stack; opening a key rebuilds options from defaultOptions, omitted fields fall back to defaults, not to the previous instance
- core: trim BASE_DRAWER_DEFAULTS internals block in defining-drawers to a concise merge summary
- react/vue guides: fix broken /api/{createDrawerly,drawerCointainer,useDrawerly,useDrawer}.md links (auto-generated pages live under /api/functions/ and /api/interfaces/); drop links with anchors that no longer resolve
- hook guides: remove 'Full API' tailers that duplicated the auto-generated reference
Merged
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.
No description provided.