Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/presentation-resolver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@astryxdesign/core': patch
---

[chore] An internal `usePresentation` / `readPresentation` resolves a component's `presentation` prop into the surface to render and whether its touch input modes apply, keeping an omitted value distinct from an explicit `'popover'` so a caller's choice always wins over a touch default. Not exported from the package entry point.

@vjeux
5 changes: 4 additions & 1 deletion packages/core/src/hooks/useAdaptivePresentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
* @input Uses React's external-store subscription over window.matchMedia
* and the touch presentation's compact-touch query
* @output Resolves popover/bottom-sheet presentation policy
* @position Internal overlay policy shared across component families
* @position Internal overlay policy shared across component families. A
* component that also switches input modes under a finger resolves its
* `presentation` with usePresentation (utils/presentation.ts), whose
* surface is this one's
*/

import {useCallback, useSyncExternalStore} from 'react';
Expand Down
Loading
Loading