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: 0 additions & 7 deletions .changeset/native-close-on-back-default.md

This file was deleted.

38 changes: 0 additions & 38 deletions .changeset/native-substrate.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/state-machine-0-3-2.md

This file was deleted.

43 changes: 43 additions & 0 deletions packages/core/dialog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
# @dunky.dev/dialog

## 0.3.0

### Minor Changes

- [#33](https://github.com/dunky-dev/ui/pull/33) [`21cc0b8`](https://github.com/dunky-dev/ui/commit/21cc0b82d858789ea0e6a90a7e8d65f4a773d669) Thanks [@ivanbanov](https://github.com/ivanbanov)! - Add `@dunky.dev/native-dialog` — the React Native binding for the dialog, the
first package of the native substrate. Same compound API as the React
binding; the parts translate the core's logical bindings into React Native
props (`onPress`, `accessibilityState`, `accessibilityViewIsModal`), the
Portal renders the host's `Modal`, and the hardware Back press reports
through the core `closeOnBack` contract.

```tsx
import { Dialog } from '@dunky.dev/native-dialog'
;<Dialog>
<Dialog.Trigger>
<Text>Open</Text>
</Dialog.Trigger>
<Dialog.Portal>
<Dialog.Backdrop />
<Dialog.Viewport>
<Dialog.Content>
<Dialog.Title>Title</Dialog.Title>
<Dialog.Close>
<Text>Close</Text>
</Dialog.Close>
</Dialog.Content>
</Dialog.Viewport>
</Dialog.Portal>
</Dialog>
```

`@dunky.dev/dialog` now exports `dialogEffects` — the substrate-free effect
list (the controlled-open echo) every binding consumes instead of
re-implementing, so the controlled contract can't fork between substrates. A
substrate composes its host-specific effects around it (the React binding
adds its DOM Escape listener); the echo itself is written once, in core.

### Patch Changes

- [#33](https://github.com/dunky-dev/ui/pull/33) [`b02dc81`](https://github.com/dunky-dev/ui/commit/b02dc81c524e19dd660bf342ed9583ee91e6b6ee) Thanks [@ivanbanov](https://github.com/ivanbanov)! - Update the state-machine runtime packages to 0.3.2.

For `@dunky.dev/native-dialog` this fixes a native crash on Android: the runtime's `normalize` used to emit the machine's `role: 'dialog'` as the legacy `accessibilityRole` prop, which Android rejects at mount (`Invalid accessibility role value: dialog`). It now emits React Native's web-aligned `role` prop, which also restores the intended semantics on iOS (VoiceOver previously got no dialog traits at all). `hidden` now lands on `aria-hidden` instead of being silently ignored.

## 0.2.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/core/dialog/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dunky.dev/dialog",
"version": "0.2.1",
"version": "0.3.0",
"description": "Framework-agnostic dialog interaction, modeled as a state machine.",
"license": "MIT",
"repository": {
Expand Down
51 changes: 51 additions & 0 deletions packages/native/dialog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# @dunky.dev/native-dialog

## 0.1.0

### Minor Changes

- [#33](https://github.com/dunky-dev/ui/pull/33) [`8c0dde3`](https://github.com/dunky-dev/ui/commit/8c0dde3249d867de7fd556ba02f2bef26687f869) Thanks [@ivanbanov](https://github.com/ivanbanov)! - Hardware Back now dismisses the dialog by default: `closeOnBack` defaults to `true` on the native substrate (the core default stays `false`).

Back is Android's dismiss gesture for transient surfaces — native `Dialog`s are `cancelable` by default — and it plays the same role Escape does on the web, where `closeOnEscape` already defaults to `true`. Requiring an opt-in inverted that platform expectation. Opt out per dialog with `closeOnBack={false}`; the `onBackNavigation` veto is unchanged.

- [#33](https://github.com/dunky-dev/ui/pull/33) [`21cc0b8`](https://github.com/dunky-dev/ui/commit/21cc0b82d858789ea0e6a90a7e8d65f4a773d669) Thanks [@ivanbanov](https://github.com/ivanbanov)! - Add `@dunky.dev/native-dialog` — the React Native binding for the dialog, the
first package of the native substrate. Same compound API as the React
binding; the parts translate the core's logical bindings into React Native
props (`onPress`, `accessibilityState`, `accessibilityViewIsModal`), the
Portal renders the host's `Modal`, and the hardware Back press reports
through the core `closeOnBack` contract.

```tsx
import { Dialog } from '@dunky.dev/native-dialog'
;<Dialog>
<Dialog.Trigger>
<Text>Open</Text>
</Dialog.Trigger>
<Dialog.Portal>
<Dialog.Backdrop />
<Dialog.Viewport>
<Dialog.Content>
<Dialog.Title>Title</Dialog.Title>
<Dialog.Close>
<Text>Close</Text>
</Dialog.Close>
</Dialog.Content>
</Dialog.Viewport>
</Dialog.Portal>
</Dialog>
```

`@dunky.dev/dialog` now exports `dialogEffects` — the substrate-free effect
list (the controlled-open echo) every binding consumes instead of
re-implementing, so the controlled contract can't fork between substrates. A
substrate composes its host-specific effects around it (the React binding
adds its DOM Escape listener); the echo itself is written once, in core.

### Patch Changes

- [#33](https://github.com/dunky-dev/ui/pull/33) [`b02dc81`](https://github.com/dunky-dev/ui/commit/b02dc81c524e19dd660bf342ed9583ee91e6b6ee) Thanks [@ivanbanov](https://github.com/ivanbanov)! - Update the state-machine runtime packages to 0.3.2.

For `@dunky.dev/native-dialog` this fixes a native crash on Android: the runtime's `normalize` used to emit the machine's `role: 'dialog'` as the legacy `accessibilityRole` prop, which Android rejects at mount (`Invalid accessibility role value: dialog`). It now emits React Native's web-aligned `role` prop, which also restores the intended semantics on iOS (VoiceOver previously got no dialog traits at all). `hidden` now lands on `aria-hidden` instead of being silently ignored.

- Updated dependencies [[`21cc0b8`](https://github.com/dunky-dev/ui/commit/21cc0b82d858789ea0e6a90a7e8d65f4a773d669), [`b02dc81`](https://github.com/dunky-dev/ui/commit/b02dc81c524e19dd660bf342ed9583ee91e6b6ee)]:
- @dunky.dev/dialog@0.3.0
2 changes: 1 addition & 1 deletion packages/native/dialog/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dunky.dev/native-dialog",
"version": "0.0.0",
"version": "0.1.0",
"description": "React Native binding for @dunky.dev/dialog.",
"license": "MIT",
"repository": {
Expand Down
44 changes: 44 additions & 0 deletions packages/react/dialog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
# @dunky.dev/react-dialog

## 0.2.2

### Patch Changes

- [#33](https://github.com/dunky-dev/ui/pull/33) [`21cc0b8`](https://github.com/dunky-dev/ui/commit/21cc0b82d858789ea0e6a90a7e8d65f4a773d669) Thanks [@ivanbanov](https://github.com/ivanbanov)! - Add `@dunky.dev/native-dialog` — the React Native binding for the dialog, the
first package of the native substrate. Same compound API as the React
binding; the parts translate the core's logical bindings into React Native
props (`onPress`, `accessibilityState`, `accessibilityViewIsModal`), the
Portal renders the host's `Modal`, and the hardware Back press reports
through the core `closeOnBack` contract.

```tsx
import { Dialog } from '@dunky.dev/native-dialog'
;<Dialog>
<Dialog.Trigger>
<Text>Open</Text>
</Dialog.Trigger>
<Dialog.Portal>
<Dialog.Backdrop />
<Dialog.Viewport>
<Dialog.Content>
<Dialog.Title>Title</Dialog.Title>
<Dialog.Close>
<Text>Close</Text>
</Dialog.Close>
</Dialog.Content>
</Dialog.Viewport>
</Dialog.Portal>
</Dialog>
```

`@dunky.dev/dialog` now exports `dialogEffects` — the substrate-free effect
list (the controlled-open echo) every binding consumes instead of
re-implementing, so the controlled contract can't fork between substrates. A
substrate composes its host-specific effects around it (the React binding
adds its DOM Escape listener); the echo itself is written once, in core.

- [#33](https://github.com/dunky-dev/ui/pull/33) [`b02dc81`](https://github.com/dunky-dev/ui/commit/b02dc81c524e19dd660bf342ed9583ee91e6b6ee) Thanks [@ivanbanov](https://github.com/ivanbanov)! - Update the state-machine runtime packages to 0.3.2.

For `@dunky.dev/native-dialog` this fixes a native crash on Android: the runtime's `normalize` used to emit the machine's `role: 'dialog'` as the legacy `accessibilityRole` prop, which Android rejects at mount (`Invalid accessibility role value: dialog`). It now emits React Native's web-aligned `role` prop, which also restores the intended semantics on iOS (VoiceOver previously got no dialog traits at all). `hidden` now lands on `aria-hidden` instead of being silently ignored.

- Updated dependencies [[`21cc0b8`](https://github.com/dunky-dev/ui/commit/21cc0b82d858789ea0e6a90a7e8d65f4a773d669), [`b02dc81`](https://github.com/dunky-dev/ui/commit/b02dc81c524e19dd660bf342ed9583ee91e6b6ee)]:
- @dunky.dev/dialog@0.3.0

## 0.2.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react/dialog/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dunky.dev/react-dialog",
"version": "0.2.1",
"version": "0.2.2",
"description": "React binding for @dunky.dev/dialog.",
"license": "MIT",
"repository": {
Expand Down
Loading