Skip to content

Release/v0.2.0 - #6

Merged
tinas merged 16 commits into
mainfrom
release/v0.2.0
Aug 9, 2026
Merged

tinas merged 16 commits into
mainfrom
release/v0.2.0

Conversation

@tinas

@tinas tinas commented Aug 9, 2026

Copy link
Copy Markdown
Owner

No description provided.

tinas added 7 commits August 9, 2026 13:29
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`
@netlify

netlify Bot commented Aug 9, 2026

Copy link
Copy Markdown

Deploy Preview for drawerly ready!

Name Link
🔨 Latest commit cc9d2e3
🔍 Latest deploy log https://app.netlify.com/projects/drawerly/deploys/6a789d8b15f8970008e0d947
😎 Deploy Preview https://deploy-preview-6--drawerly.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

tinas added 8 commits August 9, 2026 15:56
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
@tinas
tinas merged commit 47e674c into main Aug 9, 2026
5 checks passed
@tinas
tinas deleted the release/v0.2.0 branch August 9, 2026 15:38
@github-actions github-actions Bot mentioned this pull request Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant