@rdlabo/capacitor-native-ui 1.2.1 → 2.0.0-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.md +39 -24
  2. package/dist/core.d.ts +2 -2
  3. package/dist/native/activation.d.ts.map +1 -1
  4. package/dist/native/activation.js +19 -19
  5. package/dist/native/activation.js.map +1 -1
  6. package/dist/native/definitions.d.ts +22 -40
  7. package/dist/native/definitions.d.ts.map +1 -1
  8. package/dist/native/html.d.ts.map +1 -1
  9. package/dist/native/html.js +10 -1
  10. package/dist/native/html.js.map +1 -1
  11. package/dist/native/index.d.ts +2 -2
  12. package/dist/native/index.d.ts.map +1 -1
  13. package/dist/native/index.js +2 -11
  14. package/dist/native/index.js.map +1 -1
  15. package/dist/native/overlays/controller.js +1 -1
  16. package/dist/native/overlays/controller.js.map +1 -1
  17. package/dist/native/prehide.js +1 -1
  18. package/dist/native/prehide.js.map +1 -1
  19. package/dist/native/runtime.d.ts +1 -1
  20. package/dist/native/runtime.d.ts.map +1 -1
  21. package/dist/native/runtime.js +8 -20
  22. package/dist/native/runtime.js.map +1 -1
  23. package/dist/native/shared/candidate.d.ts +2 -2
  24. package/dist/native/shared/candidate.d.ts.map +1 -1
  25. package/dist/native/shared/candidate.js +2 -2
  26. package/dist/native/shared/candidate.js.map +1 -1
  27. package/dist/native/shared/control-options.d.ts +6 -0
  28. package/dist/native/shared/control-options.d.ts.map +1 -0
  29. package/dist/native/shared/control-options.js +17 -0
  30. package/dist/native/shared/control-options.js.map +1 -0
  31. package/dist/native/shared/toolbar-options.d.ts +6 -2
  32. package/dist/native/shared/toolbar-options.d.ts.map +1 -1
  33. package/dist/native/shared/toolbar-options.js +7 -15
  34. package/dist/native/shared/toolbar-options.js.map +1 -1
  35. package/dist/native/startup.d.ts.map +1 -1
  36. package/dist/native/startup.js +0 -16
  37. package/dist/native/startup.js.map +1 -1
  38. package/dist/native/vertical-bars-web.d.ts.map +1 -1
  39. package/dist/native/vertical-bars-web.js +3 -2
  40. package/dist/native/vertical-bars-web.js.map +1 -1
  41. package/dist/vertical-bars.d.ts +2 -2
  42. package/docs/appearance.md +45 -0
  43. package/docs/configuration.md +106 -74
  44. package/docs/framework-independent.md +52 -13
  45. package/docs/ionic-vertical-bars.md +186 -0
  46. package/docs/migration.md +67 -89
  47. package/docs/native-ui-extensions.md +61 -32
  48. package/docs/native-ui.md +187 -68
  49. package/docs/setup.md +46 -25
  50. package/docs/vertical-bars.md +118 -79
  51. package/ios/Sources/NativeUIPlugin/NativeUIPlugin.swift +1 -1
  52. package/package.json +1 -1
  53. package/src/core.ts +1 -2
  54. package/src/native/activation.ts +13 -22
  55. package/src/native/definitions.ts +40 -90
  56. package/src/native/html.ts +11 -5
  57. package/src/native/index.ts +2 -11
  58. package/src/native/overlays/controller.ts +1 -1
  59. package/src/native/prehide.ts +1 -1
  60. package/src/native/runtime.ts +7 -16
  61. package/src/native/shared/candidate.ts +4 -4
  62. package/src/native/shared/control-options.ts +20 -0
  63. package/src/native/shared/toolbar-options.ts +8 -12
  64. package/src/native/startup.ts +0 -16
  65. package/src/native/vertical-bars-web.ts +4 -2
  66. package/src/vertical-bars.ts +2 -1
  67. package/docs/native-mini-player.md +0 -47
@@ -1,17 +1,23 @@
1
1
  # Native UI without Ionic
2
2
 
3
- > This guide targets the upcoming package split. Until the first native package release, use the [candidate archive installation](../README.md#try-the-unreleased-packages) in place of registry install commands.
4
-
5
3
  Add native buttons to an existing Web app without Ionic or theme CSS. Keep labels, state, and click handlers on ordinary HTML elements. Standard buttons require no custom Swift registration.
6
4
 
7
5
  Use a Capacitor 8 app with an iOS project, Xcode 26+, and an iOS 26+ device or simulator. Browsers and Android retain Web controls. For custom Android native content, use [Kotlin/Compose extensions](native-ui-extensions.md#2b-register-compose-content-on-android).
8
6
 
7
+ Start with [how projection works](../README.md#how-projection-works): the HTML element remains the source while native controls or Web proxies provide its presentation.
8
+
9
+ **Want only Vertical Bars?** Follow the [device placement setup](#device-placement-for-vertical-bars), alongside steps 1–4 below. Reuse the step 3 runtime without a fixed placement preference. Remove explicit markers from buttons you want to leave on the Web. You do not need Ionic, `@rdlabo/ionic-theme-ios27`, or `vertical-bars.css`.
10
+
11
+ For Vertical Bars in an app using `ion-tabs`, `ion-toolbar` or other Ionic components with a custom theme, use the [Ionic Vertical Bars setup](ionic-vertical-bars.md#try-it-in-your-existing-ionic-app) instead. The framework (Angular, React or Vue) alone does not determine which adapter to use.
12
+
9
13
  ## 1. Install the plugin
10
14
 
11
- Keep your existing Capacitor 8 installation and add the plugin directly:
15
+ [Capacitor Foldable](https://github.com/erkamyaman/capacitor-foldable) is our standard integration for device state. Its placement and posture APIs let your app control how the layout adapts; installing it is followed by connecting its initial values and change events.
16
+
17
+ Keep your existing Capacitor installation and add Native UI and Foldable together:
12
18
 
13
19
  ```sh
14
- npm install @rdlabo/capacitor-native-ui
20
+ npm install @rdlabo/capacitor-native-ui @erkamyaman/capacitor-foldable
15
21
  ```
16
22
 
17
23
  The `/core` entry requires `@capacitor/core` but no Ionic dependencies. If this is currently a browser-only application, configure its Capacitor 8 iOS project before running native controls.
@@ -26,12 +32,25 @@ The `/core` entry requires `@capacitor/core` but no Ionic dependencies. If this
26
32
  <aside id="rail" aria-label="Navigation"></aside>
27
33
  ```
28
34
 
29
- - `data-native-ui="button"` opts into a standard action button.
30
- - `data-native-ui="back-button"` opts into a standard back button. Its original click handler owns navigation; the plugin never calls `history.back()`.
31
- - `data-native-ui-placement="rail"` requests Vertical Bars. Without it, the source rectangle is used. `element` explicitly preserves that rectangle.
32
- - Sources must be `<button>`, explicitly marked `ion-button`, or custom elements exposing `role="button"` and click behavior. Unmarked HTML is never inferred to be a control.
35
+ | Attribute | Value | Effect |
36
+ | -------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------ |
37
+ | `data-native-ui` | `button` | Project a standard action button. |
38
+ | `data-native-ui` | `back-button` | Project a standard back button. The source click handler owns navigation; the plugin never calls `history.back()`. |
39
+ | `data-native-ui` | `disabled` | Exclude the element and its subtree from projection. |
40
+ | `data-native-ui-placement` | `element` (default) | Use the source element's rectangle. |
41
+ | `data-native-ui-placement` | `rail` | Request Vertical Bars; use the optional Web rail host when native rail presentation is unavailable. |
33
42
 
34
- Keep the accessible name, supported static SVG, disabled state and application handlers on the source. Names resolve from `aria-labelledby`, `aria-label`, then text. Native `disabled`, a disabled fieldset and `aria-disabled="true"` are respected. Hidden, removed, excluded or out-of-scope sources are retired and stale actions are rejected. Use `data-native-ui="disabled"` to exclude a subtree.
43
+ Apply `button` and `back-button` to `<button>`, explicitly marked `ion-button`, or elements exposing `role="button"` and click behavior. Unmarked HTML is never inferred to be a control. `data-native-ui-placement` chooses placement for a declared source; it does not opt an unmarked HTML element into projection.
44
+
45
+ Keep the control's data and behavior on its source:
46
+
47
+ | Source property | Projection behavior |
48
+ | -------------------- | ------------------------------------------------------------------------------------------ |
49
+ | Accessible name | Resolves from `aria-labelledby`, then `aria-label`, then text. |
50
+ | Artwork | Uses supported static SVG. |
51
+ | Disabled state | Respects native `disabled`, a disabled fieldset, and `aria-disabled="true"`. |
52
+ | Visibility and scope | Hidden, removed, excluded or out-of-scope sources are retired; stale actions are rejected. |
53
+ | Application handlers | Remain on the original element. |
35
54
 
36
55
  Native and Web-proxy actions click the original element. An ordinary `<button type="submit">` therefore keeps its original form behavior. Use `type="button"` for actions that must not submit. The native bridge does not preserve browser user-activation privileges for APIs such as popup opening.
37
56
 
@@ -47,19 +66,39 @@ const shell = await enableNativeUI({
47
66
 
48
67
  Call once after the source root exists. Keep the handle and call `await shell.destroy()` when that root is disposed. The plugin does not add page padding or safe-area rules; retain your application's CSS. For Angular, React, or Vue, use the [app-root lifecycle examples](setup.md#place-startup-in-your-frameworks-app-root) with the `/core` import. For animated navigation, use [suspension through completion and cancellation](setup.md#navigation-without-the-theme).
49
68
 
69
+ ### Match the HTML theme
70
+
71
+ For a custom HTML theme, declare `color-scheme: light` or `color-scheme: dark` in the same CSS that selects your Web palette. Background colors alone do not select native appearance. See [Light and dark appearance](appearance.md) for a manual-toggle example, precedence when Ionic/theme variables are present, and shared rail behavior.
72
+
50
73
  ## 4. Build and run on iOS
51
74
 
52
- Build your Web app, run `npx cap sync ios`, and launch the iOS project from Xcode. The marked Add button should render natively and invoke its original click handler. In a browser, the same button remains an ordinary Web button. Unmarked HTML remains unchanged.
75
+ Build your Web app, run `npx cap sync ios`, and launch the iOS project from Xcode. With the step 3 configuration, Add renders at its source position and invokes its original click handler. Back requests the device-reported native rail when available; connect the device placement below to keep Web spacing in sync. In a browser, the same button remains an ordinary Web button. Unmarked HTML remains unchanged.
53
76
 
54
77
  If a button stays on the Web on supported iOS, check that it is visible within the configured root, has an accessible name, and that the direct plugin dependency was synced and the iOS app rebuilt.
55
78
 
56
79
  In an app that also uses Ionic, set `ionic: { auto: false }` to project only explicit sources and registered extensions. See [selective Ionic projection](configuration.md#select-controls-explicitly-in-a-customized-ionic-app).
57
80
 
58
- ## Optional Web rail
81
+ ## Device placement for Vertical Bars
59
82
 
60
- Replace the startup call in step 3 with the following configuration; do not start a second shell:
83
+ Foldable is already included in the standard installation in step 1. Connect it to your application layout as follows.
84
+
85
+ Reuse the runtime from step 3 **without `verticalBars.placement`**. Native UI then follows the device-reported edge; a fixed `edge: 'trailing'` would constrain it and can reject a device's leading rail.
86
+
87
+ Follow [Foldable integration](vertical-bars.md#with-application-owned-css-or-without-ionic):
88
+
89
+ 1. Subscribe to `barPlacementChange`, then read `getBarPlacement()` for the initial edge and inset.
90
+ 2. Apply the edge and inset to your application's CSS. On a null edge, restore ordinary spacing and call `shell.disableVerticalControlArea()`; when an edge returns, call `shell.enableVerticalControlArea()`. Serialize these changes with layout updates.
91
+ 3. At teardown, remove the listener and destroy the runtime owned by this application.
92
+
93
+ Keep the explicit source markers from step 2; they declare the controls and their requested placement. To project only Back, remove `data-native-ui="button"` from Add. `controls` does not disable explicit declarations. Without a Web rail host, unavailable native rail controls stay at their original Web positions. The theme package is not required.
94
+
95
+ ## Optional browser rail preview
96
+
97
+ For a browser-only layout preview, temporarily use this fixed Web rail instead of the startup call in step 3 and the device subscription. Do not copy the fixed placement into the standard device setup. Call once after the source root and host are mounted, and call `await shell.destroy()` when their owner is disposed:
61
98
 
62
99
  ```ts
100
+ import { enableNativeUI } from '@rdlabo/capacitor-native-ui/core';
101
+
63
102
  const shell = await enableNativeUI({
64
103
  root: document.querySelector<HTMLElement>('#app')!,
65
104
  verticalBars: {
@@ -73,7 +112,7 @@ const shell = await enableNativeUI({
73
112
 
74
113
  The plugin uses device-reported rail availability and resolves leading/trailing through the document direction. A placement preference never forces an unsupported system rail. Native rejection restores Web presentation. With `webHost`, explicitly rail-marked HTML controls have Web proxies when native projection is unavailable. Without it, their originals remain visible. The application styles and positions the host and reserves any content spacing. The host must be outside the source root.
75
114
 
76
- To use only rail projection, add `verticalBars.only: true`. To change rail use later, call `await shell.disableVerticalControlArea()` or `await shell.enableVerticalControlArea()`. Disabling restores original controls and removes Web rail proxies without destroying ordinary native projection. `only: true` keeps ordinary controls on the Web throughout.
115
+ Explicit markup chooses placement: Back goes to the preview rail and Add stays at its original position. Disabling rail projection restores original rail controls and removes Web proxies without destroying ordinary native projection. Before building for a device, restore the step 3 runtime and the Foldable subscription above.
77
116
 
78
117
  Currently the HTML adapter supports buttons and back buttons. Arbitrary HTML tabs, segments, searchbars and FAB structures are not translated. Ionic adapters continue to support their existing controls. Custom element extensions work with the same scoped root; the existing `tab-accessory` extension placement still requires an Ionic tab-bar owner.
79
118
 
@@ -0,0 +1,186 @@
1
+ ---
2
+ title: Add Vertical Bars while keeping your theme
3
+ ---
4
+
5
+ # Add Vertical Bars while keeping your theme
6
+
7
+ Keep your app's existing appearance and add Vertical Bars. Choose the setup for your app's components, whether you use Angular, React, Vue or another framework.
8
+
9
+ Read [how projection works](../README.md#how-projection-works) for the relationship between source DOM, projected controls and actions. Then choose your setup below.
10
+
11
+ ## Choose your setup
12
+
13
+ | Your app | Start here | What you add |
14
+ | ------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
15
+ | Ionic components with your own theme, Ionic's default styles, or another theme | [Ionic setup below](#try-it-in-your-existing-ionic-app) | Foldable device placement, standalone rail CSS and the Ionic Native UI adapter. Keep your existing theme. |
16
+ | No Ionic components (plain HTML, React, Vue, Angular, etc.) | [HTML setup](framework-independent.md), then its [device rail setup](framework-independent.md#device-placement-for-vertical-bars) | `@rdlabo/capacitor-native-ui/core` and Foldable. Your app supplies the rail layout; no theme package. |
17
+ | Already using the iOS 27 theme and Native UI | [Connect device placement](../../capacitor-native-ui/docs/vertical-bars.md#use-with-capacitor-foldable) | Reuse your existing runtime. Do not start another one. |
18
+
19
+ **Without Ionic, follow the HTML guide instead of the steps below.** You do not need `@rdlabo/ionic-theme-ios27`, `vertical-bars.css`, `ion-app`, or Ionic navigation animations. Explicitly marked HTML buttons and back buttons are supported; arbitrary HTML tabs are not automatically converted. A browser preview requires an application-styled `webHost`; native rail presentation also requires supported iOS hardware and software.
20
+
21
+ The rest of this page is for **Ionic apps**. Both Ionic `ios` and `md` modes are supported. Tabs and supported toolbar actions move to the side; content and horizontal controls keep their existing appearance.
22
+
23
+ iPhone Duo support and Vertical Bars are stable starting with version 2.0.0.
24
+
25
+ ## Try it in your existing Ionic app
26
+
27
+ ### 1. Install and load the standalone stylesheet
28
+
29
+ Start with your existing Ionic app (Ionic `>=8.8.1 <10`, Capacitor 8.5 or later). Install Native UI, the layout stylesheet package and the required device-state plugin together:
30
+
31
+ ```bash
32
+ npm install @rdlabo/ionic-theme-ios27 @rdlabo/capacitor-native-ui @erkamyaman/capacitor-foldable
33
+ ```
34
+
35
+ Keep your existing theme imports. Add this to your global Sass file:
36
+
37
+ ```scss
38
+ @use '@rdlabo/ionic-theme-ios27/dist/css/vertical-bars.css';
39
+ ```
40
+
41
+ The full iOS 27 theme stylesheets are not required. Keep this stylesheet instead of Foldable's `ionic-tabs.css`; loading both would reposition the same tabs.
42
+
43
+ We adopt [Capacitor Foldable](https://github.com/erkamyaman/capacitor-foldable) as the standard device integration because it exposes placement, posture and their changes while leaving layout decisions to your app. Pass its logical rail edge and measured inset to the theme's layout helper. Native UI checks native rail availability independently.
44
+
45
+ ### 2. Connect your navigation animation
46
+
47
+ Configure `navAnimation` before Ionic initializes. Starting the rail runtime does not register this option. The adapter waits for native control retirement and coordinates swipe progress and cancellation while keeping your existing animation.
48
+
49
+ #### Keep Ionic's default animation
50
+
51
+ If you have not configured `navAnimation`, wrap Ionic's standard builders. Select the builder from Ionic's transition `mode` so both `ios` and `md` keep their usual animation:
52
+
53
+ ```ts
54
+ import { iosTransitionAnimation, mdTransitionAnimation, type AnimationBuilder } from '@ionic/core';
55
+ import { withNativeUITransition } from '@rdlabo/ionic-theme-ios27';
56
+
57
+ const defaultTransition: AnimationBuilder = (baseEl, opts) =>
58
+ (opts.mode === 'ios' ? iosTransitionAnimation : mdTransitionAnimation)(baseEl, opts);
59
+
60
+ const ionicConfig = {
61
+ navAnimation: withNativeUITransition(defaultTransition),
62
+ };
63
+ ```
64
+
65
+ Merge this option into your existing Ionic configuration before initialization: pass it to Angular's `provideIonicAngular()`, React's `setupIonicReact()`, or Vue's `IonicVue` plugin options. Keep your existing theme stylesheet imports. No iOS 27 theme stylesheet is required.
66
+
67
+ #### Use the theme's iOS animation
68
+
69
+ If you already use the iOS 27 transition, keep this configuration. It includes the native adapter and excludes the horizontal back-button effect in vertical layouts; no additional wrapper is needed. Importing this JavaScript entry point does not load the theme stylesheets.
70
+
71
+ ```ts
72
+ import { iosTransitionAnimation } from '@rdlabo/ionic-theme-ios27';
73
+
74
+ const ionicConfig = {
75
+ navAnimation: iosTransitionAnimation,
76
+ };
77
+ ```
78
+
79
+ Apply this option to your existing iOS-mode configuration and keep your MD configuration.
80
+
81
+ #### Keep your custom animation
82
+
83
+ If your app uses another builder for `navAnimation`, wrap it:
84
+
85
+ ```ts
86
+ import type { AnimationBuilder } from '@ionic/core';
87
+ import { withNativeUITransition } from '@rdlabo/ionic-theme-ios27';
88
+
89
+ // Pass the animation builder your app already uses.
90
+ const configureNavigation = (existingTransition: AnimationBuilder) => ({
91
+ navAnimation: withNativeUITransition(existingTransition),
92
+ });
93
+ ```
94
+
95
+ The adapter returns the original `Animation`, preserving its effects, duration, and easing. Use it only for navigation, not modal or popover animations. The builder must return a fresh `Animation` for each navigation; Ionic destroys it after the transition. Keep lifecycle events for control registration and transitions without animation.
96
+
97
+ The adapter keeps the builder's animation targets, including any horizontal back-button effect. If you need the iOS 27 transition with that effect excluded in vertical layouts, use `iosTransitionAnimation` from `@rdlabo/ionic-theme-ios27` as your `navAnimation` instead. It already includes the adapter, so no wrapper is needed.
98
+
99
+ ### 3. Connect device placement and start the controls
100
+
101
+ After `ion-app` is mounted, subscribe to placement changes, read the initial placement, and start one runtime. Keep your existing `ion-app` markup; the helper applies or removes the layout classes from device state:
102
+
103
+ ```ts
104
+ import { Foldable, type BarPlacement } from '@erkamyaman/capacitor-foldable';
105
+ import { setVerticalBarsLayout } from '@rdlabo/ionic-theme-ios27';
106
+ import { enableNativeUI } from '@rdlabo/capacitor-native-ui';
107
+
108
+ const applyPlacement = ({ verticalBarEdge, inset }: BarPlacement) => setVerticalBarsLayout({ edge: verticalBarEdge, inset });
109
+ const listener = await Foldable.addListener('barPlacementChange', applyPlacement);
110
+ applyPlacement(await Foldable.getBarPlacement());
111
+ const rail = await enableNativeUI({ controls: 'verticalOnly' });
112
+ ```
113
+
114
+ | Device placement | Web layout |
115
+ | -------------------------------------- | -------------------------------------------------------------------------- |
116
+ | `leading` or `trailing` | Reserves the reported inset at that logical edge. The helper resolves RTL. |
117
+ | `null`, including the browser fallback | Restores the ordinary layout; no side rail is forced. |
118
+
119
+ When the application owner is disposed, remove its listener and destroy the runtime it owns:
120
+
121
+ ```ts
122
+ await listener.remove();
123
+ await rail.destroy();
124
+ ```
125
+
126
+ If Native UI is already active, keep that runtime and add only the placement subscription. Do not start a second runtime. For shared configuration and application-owned CSS, see [Foldable integration](vertical-bars.md#use-with-capacitor-foldable).
127
+
128
+ ### 4. Build, sync and run on iPhone Duo
129
+
130
+ Build your application's Web assets, then sync the native project:
131
+
132
+ ```sh
133
+ npx cap sync ios
134
+ ```
135
+
136
+ Build with Xcode 27.1 or newer and run on iPhone Duo with iOS 27.1 or later. Keep your existing SPM or CocoaPods integration; see [Native UI setup](setup.md#4-build-sync-and-run).
137
+
138
+ **What you should see when the device reports a rail:** your existing tab bar and eligible fixed-toolbar actions move to the side. Content keeps its theme and reserves the measured inset. Supported iOS rails use SwiftUI; unavailable native presentation retains the Web rail. Devices reporting a null edge keep their ordinary layout. Use the [optional browser preview](#optional-browser-preview) to simulate a rail without a device report.
139
+
140
+ Keep your existing click handlers, routing and form associations. By default, actions need an `ion-icon` or SVG with `slot="icon-only"` in a fixed toolbar. All fills (`default`, `clear`, `solid`, `outline`) follow this rule, including submit buttons. Other actions remain horizontal. Use `.ios-theme-horizontal-only` on an `ion-buttons` group or individual `ion-button` to keep an action horizontal.
141
+
142
+ ### Optional: choose native button appearance
143
+
144
+ See [Choose button appearance](vertical-bars.md#choose-button-appearance) for appearance settings and local overrides.
145
+
146
+ The default is `system`: SwiftUI styles vertical buttons and tints their icons. If your existing theme should supply their fill and colors, replace only the `enableNativeUI` call in step 3 with the following; keep the Foldable subscription:
147
+
148
+ ```ts
149
+ const rail = await enableNativeUI({
150
+ controls: 'verticalOnly',
151
+ ionic: { verticalBars: { buttonProjection: 'source', buttonDefaultFill: 'solid' } },
152
+ });
153
+ ```
154
+
155
+ The `solid` default suits ordinary Ionic buttons. Buttons inside `ion-buttons` still default to clear; set `fill="solid"` explicitly to project their background. For one-off exceptions, use the [local projection settings](vertical-bars.md#override-individual-buttons-or-groups). These settings affect native vertical buttons only; Web clones keep their existing appearance.
156
+
157
+ ### If the rail does not appear
158
+
159
+ | What you see | What to check |
160
+ | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
161
+ | Ordinary layout | Check Foldable's reported edge. A null edge intentionally keeps ordinary layout. |
162
+ | Reported edge but no side spacing | Load `vertical-bars.css` and apply the initial placement and `barPlacementChange` events after `ion-app` mounts. |
163
+ | Space appears, but controls stay horizontal | Start the runtime once. Use existing tabs or supported `slot="icon-only"` actions in a fixed header/footer toolbar. |
164
+ | One action stays horizontal | Check its icon slot, fixed placement and exclusions. See [control requirements](vertical-bars.md#toolbar-actions). |
165
+
166
+ ## Optional browser preview
167
+
168
+ For local layout testing without a device report, temporarily omit the Foldable subscription from step 3 and apply a simulated placement after `ion-app` mounts:
169
+
170
+ ```ts
171
+ setVerticalBarsLayout({ edge: 'trailing', inset: 80 });
172
+ ```
173
+
174
+ Keep the same stylesheet and single Native UI runtime. Use `leading` to preview the other logical edge, or `null` to restore ordinary layout. The helper manages `ios-theme-vertical-bars` and its physical-left variant; manual classes are not part of device setup. See [layout classes](../../theme-ios27/docs/vertical-bars-layout.md#reserve-the-vertical-rail) for CSS-only previews.
175
+
176
+ Web rail tabs display icons and reveal labels while pressing and dragging. Browser previews verify Web layout and actions, not native SwiftUI appearance. Restore the Foldable subscription for the device build.
177
+
178
+ ## Use hinge posture without projecting controls
179
+
180
+ If your existing theme needs only a posture-driven split pane or a layout switch, do not start a projection runtime or add `.ios-theme-vertical-bars`. Pass `Foldable.getFoldState()` results and `foldStateChange` events to `applyFoldStateClasses(root, fold)`, removing the listener when finished. There is no separate start/stop monitoring call.
181
+
182
+ See [Read the device layout](../../theme-ios27/docs/vertical-bars-layout.md#read-the-device-layout) for the subscription example, null values, and monitoring lifetime. See [Adapt the split pane](../../theme-ios27/docs/vertical-bars-layout.md#adapt-the-split-pane) for the opt-in width rules and half-open state.
183
+
184
+ ## Shared layout rules and API
185
+
186
+ Safe-area handling, overlays, RTL, control eligibility, Web simulation, and the handle API are documented in [Vertical Bars](vertical-bars.md). Read that reference when you need to customize this setup; it is not an additional installation step.
package/docs/migration.md CHANGED
@@ -4,18 +4,14 @@ title: Migration
4
4
 
5
5
  # Migration
6
6
 
7
- > This guide targets the upcoming package split. Until the first native package release, use the [candidate archive installation](../README.md#try-the-unreleased-packages) in place of registry install commands.
7
+ ## Upgrading from 1.2.1
8
8
 
9
- ## Migrating from Native UI Shell Preview
9
+ This guide is for applications using `@rdlabo/ionic-theme-ios27` **1.2.1**, including its Native UI Shell Preview and standalone Vertical Control Area.
10
10
 
11
- Native UI Shell was already published as **Preview** in `@rdlabo/ionic-theme-ios27` 1.2.0 and 1.2.1. Preview users need the migration below when adopting the split packages; changing the import alone is not sufficient for every configuration. Candidate/beta users should also compare their configuration with these mappings and use JavaScript and native code from the same candidate.
11
+ - **Theme only:** update the theme package. Existing theme imports, CSS/Sass paths and animation imports remain valid; no native startup is needed.
12
+ - **Native UI or Vertical Control Area:** install the native package directly, replace imports and startup settings below, then sync Capacitor and rebuild the native app.
12
13
 
13
- 1. Install the matching packages and replace removed imports using [package separation](#native-ui-package-separation).
14
- 2. Apply the [API and native naming changes](#native-ui-naming-changes), then translate startup settings using [shared shell configuration](#shared-shell-configuration-and-html-adapters), especially partial `controls` objects.
15
- 3. Update [Web layout ownership](#web-layout-ownership) and the [transition adapter](#native-ui-transition-adapter) if used.
16
- 4. Rebuild Web assets, sync Capacitor, and rebuild the native app. A Web-only update cannot replace the native plugin.
17
-
18
- Native UI remains Preview. App-local SwiftUI / Compose **extensions are experimental**, including their TypeScript definitions, native registration APIs and placement behavior. The `defineNativeUI` and `extensions` names stay unchanged; native registration names change as listed below. Applications using extensions should keep their Web fallback and verify their reader, native renderer and action forwarding together after updates. See the [extension guide](native-ui-extensions.md).
14
+ Native UI remains Preview. Experimental Extensions are documented in the [current extension guide](native-ui-extensions.md); this guide covers the published 1.2.1 controls and setup.
19
15
 
20
16
  ## Native UI package separation
21
17
 
@@ -23,11 +19,11 @@ For a new native integration, follow [Native UI setup](setup.md) or, if you alre
23
19
 
24
20
  The theme and native controls now live in separate packages. Choose dependencies by the behavior your app uses:
25
21
 
26
- | App behavior | Package to use directly |
27
- | --- | --- |
28
- | Theme styles, Ionic Web behavior, and theme animations | `@rdlabo/ionic-theme-ios27` |
29
- | Native UI or standalone Vertical Control Area | `@rdlabo/capacitor-native-ui` |
30
- | Theme styling together with native controls | Both packages |
22
+ | App behavior | Package to use directly |
23
+ | ------------------------------------------------------ | ----------------------------- |
24
+ | Theme styles, Ionic Web behavior, and theme animations | `@rdlabo/ionic-theme-ios27` |
25
+ | Native UI or standalone Vertical Control Area | `@rdlabo/capacitor-native-ui` |
26
+ | Theme styling together with native controls | Both packages |
31
27
 
32
28
  The theme owns the appearance and behavior of Ionic's Web elements. Native UI owns projecting supported controls into native iOS views and coordinating their lifecycle with Web navigation. Native UI can be used without the iOS 27 theme; installing it does not apply theme styles. Standard controls on Android and browsers retain Web presentation; Android can render [app-local Compose extensions](native-ui-extensions.md#2b-register-compose-content-on-android).
33
29
 
@@ -35,38 +31,28 @@ The theme uses the native package's shared transition/search integration interna
35
31
 
36
32
  ### 1. Update application dependencies
37
33
 
38
- These commands apply once the packages containing this migration are published.
34
+ When using the theme and Native UI together, update them to the same version. The commands below also install [Capacitor Foldable](https://github.com/erkamyaman/capacitor-foldable) as a separate application dependency for placement and posture reporting. Foldable has its own release versions.
39
35
 
40
36
  For theme-only apps, update the theme package. Keep existing theme imports and CSS/Sass paths; no native startup or plugin setup is needed for theme-only use.
41
37
 
42
38
  ```sh
43
- npm install @rdlabo/ionic-theme-ios27
39
+ npm install @rdlabo/ionic-theme-ios27 @erkamyaman/capacitor-foldable
44
40
  ```
45
41
 
46
42
  For apps using both the theme and native controls, install both as direct application dependencies:
47
43
 
48
44
  ```sh
49
- npm install @rdlabo/ionic-theme-ios27 @rdlabo/capacitor-native-ui
45
+ npm install @rdlabo/ionic-theme-ios27 @rdlabo/capacitor-native-ui @erkamyaman/capacitor-foldable
50
46
  ```
51
47
 
52
48
  For native controls with your existing Web appearance, follow [Native UI only](setup.md). Install the native package directly and keep your existing Web styles. The plugin no longer requires theme variables to select supported controls; Web layout remains the responsibility of your app or theme. Native startup requires Capacitor 8. The Ionic adapter requires Ionic 8.8.1 or later within Ionic 8 or 9; the `/core` entry does not require Ionic.
53
49
 
54
- If you used the intermediate `@ionic-theme/capacitor-native-ui` package name during development, remove it and install `@rdlabo/capacitor-native-ui`. Keep the theme dependency if your app uses its styles or APIs.
55
-
56
- ```sh
57
- npm uninstall @ionic-theme/capacitor-native-ui
58
- npm install @rdlabo/capacitor-native-ui
59
- ```
60
-
61
50
  ### 2. Replace native imports
62
51
 
63
- | Previous import | Replacement |
64
- | --- | --- |
65
- | `@rdlabo/ionic-theme-ios27/native` | `@rdlabo/capacitor-native-ui` |
52
+ | Previous import | Replacement |
53
+ | ----------------------------------------- | ------------------------------------------- |
54
+ | `@rdlabo/ionic-theme-ios27/native` | `@rdlabo/capacitor-native-ui` |
66
55
  | `@rdlabo/ionic-theme-ios27/vertical-bars` | `@rdlabo/capacitor-native-ui/vertical-bars` |
67
- | `@ionic-theme/capacitor-native-ui` | `@rdlabo/capacitor-native-ui` |
68
- | `@ionic-theme/capacitor-native-ui/vertical-bars` | `@rdlabo/capacitor-native-ui/vertical-bars` |
69
- | `@ionic-theme/capacitor-native-ui/integration` | `@rdlabo/capacitor-native-ui/integration` |
70
56
 
71
57
  Update both value and type imports, including lazy imports, test aliases, and bundler configuration. The old theme `/native` and `/vertical-bars` entries have been removed; there are no compatibility aliases.
72
58
 
@@ -75,7 +61,7 @@ Update both value and type imports, including lazy imports, test aliases, and bu
75
61
  + import { enableNativeUI } from '@rdlabo/capacitor-native-ui';
76
62
  ```
77
63
 
78
- Keep existing control markup; review the [startup option changes](#shared-shell-configuration-and-html-adapters), including partial `controls` defaults. The ordinary `@rdlabo/ionic-theme-ios27` entry, theme CSS/Sass paths, and theme animation imports stay unchanged. For custom navigation animations, see the [transition adapter instructions](#native-ui-transition-adapter) below.
64
+ Keep existing control markup; review the [startup option changes](#startup-options), including partial `controls` defaults. The ordinary `@rdlabo/ionic-theme-ios27` entry, theme CSS/Sass paths, and theme animation imports stay unchanged. For custom navigation animations, see the [transition adapter instructions](#native-ui-transition-adapter) below.
79
65
 
80
66
  ### 3. Sync the native project
81
67
 
@@ -87,45 +73,40 @@ npx cap sync ios
87
73
 
88
74
  The Capacitor plugin is now supplied by the native package. Remove manually linked copies of the old theme Swift package so only the new package supplies the plugin. The Swift package/product and CocoaPods pod are now `RdlaboCapacitorNativeUi`; the Swift module is `NativeUIPlugin`. The Capacitor bridge name is now `NativeUI` on JavaScript, iOS and Android. Run Capacitor sync for each native platform you use and rebuild the native app. An OTA/Web-only update cannot migrate an installed binary containing only the old plugin. Use matching JavaScript and native package versions.
89
75
 
90
- For local Swift package references, the package now lives at `packages/capacitor-native-ui` within this repository; there is no root Swift package. Prefer Capacitor's generated integration for application dependencies.
76
+ Use Capacitor's generated integration for the npm dependency; applications do not need a checkout of this repository or a manually linked Swift package.
91
77
 
92
78
  ### 4. Verify the migration
93
79
 
94
- - Check `package.json` and the lockfile: native-enabled apps have a direct `@rdlabo/capacitor-native-ui` dependency and no intermediate `@ionic-theme/capacitor-native-ui` dependency.
95
- - Build the application and confirm there are no imports of the removed theme entries or the intermediate package name.
96
- - Build and launch the iOS app after sync. Check native controls, navigation/back gestures, and any app-local Swift extensions you use.
80
+ - Check that native-enabled apps declare `@rdlabo/capacitor-native-ui` directly, then build and confirm no imports of the removed theme entries remain.
81
+ - Build and launch the iOS app after sync. Check native controls, navigation/back gestures, and restored Web controls after teardown.
97
82
  - Check browser and Android Web presentation where supported by your app, and confirm the theme still looks correct.
98
83
  - Check that previously disabled control kinds remain disabled after expanding partial Preview settings. Test toolbar grouping, individually selected actions and back navigation in both horizontal and vertical layouts.
99
- - For experimental extensions, check native registration, props, click forwarding and restoration of the original Web UI when projection is unavailable. Rebuild and sync Android as well if the app uses Compose extensions.
100
84
 
101
85
  ## Native UI naming changes
102
86
 
103
- The split package uses Native UI names throughout. These are breaking renames; the old names are not aliases. The historical names below refer to the published theme Preview or pre-release package candidates.
87
+ The split package uses Native UI names throughout. These are breaking renames; the old names are not aliases. The previous names below refer to the published 1.2.1 Preview.
104
88
 
105
- | Previous name | New name |
106
- | --- | --- |
107
- | `enableNativeUIShell()` | `enableNativeUI()` |
89
+ | Previous name | New name |
90
+ | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
91
+ | `enableNativeUIShell()` | `enableNativeUI()` |
108
92
  | `NativeUIShellOptions`, `NativeUIShellHandle`, `NativeUIShellStatus`, `NativeUIShellSuspension`, `NativeUIShellControls`, `NativeUIShellComponent` | `NativeUIOptions`, `NativeUIHandle`, `NativeUIStatus`, `NativeUISuspension`, `NativeUIControls`, `NativeUIComponent` |
109
- | `IonicNativeUIShell` (plugin export and bridge registration) | `NativeUI` |
110
- | `withNativeUIShellTransition()` | `withNativeUITransition()` (still exported by the theme package) |
111
- | `IonicNativeUIShellPlugin` (Swift module/native class) | `NativeUIPlugin` |
112
- | `IonicThemeCapacitorNativeUi` (SPM package/product and pod) | `RdlaboCapacitorNativeUi` |
113
- | `NativeUIShell.register()` (Swift / Kotlin extensions) | `NativeUI.register()` |
114
- | `data-shell="disabled"` | `data-native-ui="disabled"` |
115
- | `.ios-theme-shell-disabled` | `.native-ui-disabled` |
116
-
117
- Replace the `NativeUIShell` part with `NativeUI` in imports from `/integration` as well (for example `suspendNativeUI` and `setNativeUIIntegration`). App-local Swift extensions now use `import NativeUIPlugin`; Kotlin extensions use `import dev.rdlabo.capacitor.nativeui.NativeUI`.
93
+ | `IonicNativeUIShell` (plugin export and bridge registration) | `NativeUI` |
94
+ | `withNativeUIShellTransition()` | `withNativeUITransition()` (still exported by the theme package) |
95
+ | `IonicNativeUIShellPlugin` (Swift module/native class) | `NativeUIPlugin` |
96
+ | `RdlaboIonicThemeIos27` (SPM package/product) | `RdlaboCapacitorNativeUi` |
97
+ | `data-shell="disabled"` | `data-native-ui="disabled"` |
98
+ | `.ios-theme-shell-disabled` | `.native-ui-disabled` |
118
99
 
119
100
  Runtime-owned attributes/events are internal, not configuration: `data-native-ui-shell` is now `data-native-ui-projected`, other `data-native-ui-shell-*` attributes use `data-native-ui-*`, `nativeUIShell*` events use `nativeUI*`, and `.ios-theme-native-ui-shell-*` classes use `.native-ui-*`. Update application tests or diagnostics that inspect them. **Keep explicit source declarations such as `data-native-ui="button"` unchanged**; the projected marker is separate and is managed by the runtime.
120
101
 
121
102
  ## Native UI transition adapter
122
103
 
123
- The Ionic transition adapter now belongs to `@rdlabo/ionic-theme-ios27`. Replace preview imports from the plugin’s `/integration` or `/vertical-bars` entry with the theme root. Native-only applications can use `shell.suspend()` and the returned `resume()` directly.
104
+ The Ionic transition adapter now belongs to `@rdlabo/ionic-theme-ios27`. Replace the 1.2.1 import of `withNativeUIShellTransition` from `@rdlabo/ionic-theme-ios27/vertical-bars` with `withNativeUITransition` from the theme root. Native-only applications can use `shell.suspend()` and the returned `resume()` directly.
124
105
 
125
106
  Use `withNativeUITransition()` to keep your existing Ionic navigation animation while coordinating Native UI controls.
126
107
 
127
- - If you already import `iosTransitionAnimation` from `@rdlabo/ionic-theme-ios27`, keep the [package animation setup](https://github.com/rdlabo-dev/ionic-theme-ios27/blob/main/packages/theme-ios27/docs/iphone-duo-with-original-theme.md#use-this-packages-ios-animation); no configuration change is needed. It now uses the shared adapter internally; do not add another wrapper.
128
- - If you use Ionic's default animation without a `navAnimation` option, follow [Keep Ionic's default animation](https://github.com/rdlabo-dev/ionic-theme-ios27/blob/main/packages/theme-ios27/docs/iphone-duo-with-original-theme.md#keep-ionics-default-animation). The example selects Ionic's standard iOS or MD builder from the transition mode.
108
+ - If you already import `iosTransitionAnimation` from `@rdlabo/ionic-theme-ios27`, keep the [package animation setup](ionic-vertical-bars.md#use-the-themes-ios-animation); no configuration change is needed. It now uses the shared adapter internally; do not add another wrapper.
109
+ - If you use Ionic's default animation without a `navAnimation` option, follow [Keep Ionic's default animation](ionic-vertical-bars.md#keep-ionics-default-animation). The example selects Ionic's standard iOS or MD builder from the transition mode.
129
110
  - If you use a custom navigation animation with Native UI or the standalone Vertical Control Area, wrap your existing builder when configuring Ionic:
130
111
 
131
112
  ```diff
@@ -141,66 +122,63 @@ Merge this option into your existing Ionic configuration before initialization.
141
122
 
142
123
  Use the adapter only for navigation; leave modal and popover animations unchanged. Your builder must create a fresh `Animation` for each navigation because Ionic destroys it afterward. Keep lifecycle events for control registration and transitions without animation. If the custom builder animates a horizontal back button separately, exclude that effect while `.ios-theme-vertical-bars` is active.
143
124
 
144
- See [Connect your navigation animation](https://github.com/rdlabo-dev/ionic-theme-ios27/blob/main/packages/theme-ios27/docs/iphone-duo-with-original-theme.md#3-connect-your-navigation-animation) for the setup and supported scope.
125
+ See [Connect your navigation animation](ionic-vertical-bars.md#2-connect-your-navigation-animation) for the setup and supported scope.
145
126
 
146
- ## Shared shell configuration and HTML adapters
127
+ ## Startup options
147
128
 
148
- Run `npx cap sync ios` after updating: JavaScript now sends framework-independent control kinds to Swift. New Swift code also accepts the previous `ion-*` kinds, but new JavaScript requires the matching native plugin.
129
+ In 1.2.1, providing `controls` enabled **only fields set to `true`**. In the new API, omitted fields default to `true`, even in a partial object. Expand your old selection when migrating.
149
130
 
150
- - `controls.toolbar` becomes `ionic.auto.buttons`.
151
- - `controls.popover` becomes `verticalBars.popover`.
152
- - Top-level `buttonProjection` and `buttonDefaultFill` move into `verticalBars`.
153
- - The new `verticalBars.buttonDefaultFill` uses `'glass'` instead of `null`.
154
- - `verticalBarsOnly: true` becomes `verticalBars: { only: true }`.
155
- - Omitted automatic kinds now default to `true`, including partial legacy `controls` objects. Published 1.2.x enabled only fields explicitly set to `true` when `controls` was supplied. Expand partial objects when migrating, even if you keep the legacy option name.
156
- - The global `enableVerticalControlArea()` remains a legacy startup wrapper. New code starts with `enableNativeUI({ verticalBars: { only: true } })`, then uses the returned handle's `enableVerticalControlArea()` / `disableVerticalControlArea()` methods.
157
- - Legacy option names and global `enabled: false` remain accepted; use `shell.destroy()` to stop new code. If both old and new settings are supplied, the new nested settings take precedence.
131
+ | 1.2.1 | New configuration |
132
+ | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
133
+ | No `controls` | No `controls`: all supported kinds remain selected by default. |
134
+ | `controls: {}` | `controls: false` to disable default selection, or `ionic: { auto: false }` to disable Ionic discovery altogether. |
135
+ | `controls.toolbar` | Set `controls.buttonGroup`, `controls.button`, and `controls.backButton` to the old toolbar value. |
136
+ | `controls.tabs`, `.segment`, `.fab` | Same names, but explicitly use `false` for previously omitted fields. |
137
+ | `buttonProjection` | `ionic.verticalBars.buttonProjection` |
138
+ | `buttonDefaultFill: null` | `ionic.verticalBars.buttonDefaultFill: 'glass'` (also the default) |
139
+ | `buttonDefaultFill: 'solid'` | `ionic.verticalBars.buttonDefaultFill: 'solid'` |
140
+ | `verticalBarsOnly: true` | `controls: 'verticalOnly'` for default selection in the rail. For a partial selection, use `'verticalOnly'` on each enabled kind and `false` on the rest. |
141
+ | `enabled: false` | Do not start the runtime, or call the active handle's `destroy()`. |
158
142
 
159
- For example, preserve a Preview configuration that projected only tabs:
143
+ The old startup option names are removed, without aliases. The standalone `enableVerticalControlArea()` entry remains available and defaults `controls` to `'verticalOnly'`; its appearance settings also move under `ionic.verticalBars`. Use only one startup entry per app.
144
+
145
+ ### Preserve a tabs-only configuration
160
146
 
161
147
  ```diff
162
148
  - import { enableNativeUIShell } from '@rdlabo/ionic-theme-ios27/native';
163
149
  + import { enableNativeUI } from '@rdlabo/capacitor-native-ui';
164
150
 
165
151
  - const shell = await enableNativeUIShell({
166
- + const shell = await enableNativeUI({
167
152
  - controls: { tabs: true },
168
153
  - buttonProjection: 'source',
169
154
  - buttonDefaultFill: null,
170
- + ionic: { auto: { tabs: true, buttons: false, segment: false, fab: false } },
171
- + verticalBars: { buttonProjection: 'source', buttonDefaultFill: 'glass' },
155
+ + const shell = await enableNativeUI({
156
+ + controls: {
157
+ + buttonGroup: false,
158
+ + button: false,
159
+ + backButton: false,
160
+ + tabs: true,
161
+ + segment: false,
162
+ + fab: false,
163
+ + },
164
+ + ionic: {
165
+ + verticalBars: { buttonProjection: 'source', buttonDefaultFill: 'glass' },
166
+ + },
172
167
  });
173
168
  ```
174
169
 
175
- Likewise, replace `controls: {}` with `ionic: { auto: false }` to keep automatic Ionic projection off. Explicit `data-native-ui` sources and extensions remain independent. Calling `enableNativeUI()` with no options still enables all supported automatic kinds.
176
-
177
- ### Toolbar selection and grouping by layout
170
+ ### Select controls by placement
178
171
 
179
- `horizontal` and `vertical` are new toolbar settings. Omit them to retain automatic selection and grouping, or configure each layout independently:
172
+ All six control fields accept `boolean | 'horizontalOnly' | 'verticalOnly'`. A scalar `controls` value applies to every field. Horizontal and vertical mean ordinary placement and the rail, not device orientation or model.
180
173
 
181
174
  ```ts
182
- const shell = await enableNativeUI({
183
- horizontal: false,
184
- vertical: { buttons: false, button: false, backButton: true },
185
- });
175
+ const shell = await enableNativeUI({ controls: 'verticalOnly' });
186
176
  ```
187
177
 
188
- This selects only eligible back buttons among vertical toolbar actions and disables automatic horizontal toolbar selection. Tabs, segments and FABs retain their own settings. To enable all eligible toolbar actions only in vertical layout, use `{ horizontal: false, vertical: true }`; this follows layout, not the Duo model.
189
-
190
- Do not translate `controls.toolbar` or `ionic.auto.buttons` into `vertical.buttons`: those options govern the entire automatic toolbar category, while `horizontal.buttons` / `vertical.buttons` govern **grouping only**. Within each layout, `button` selects ordinary actions and `backButton` selects back navigation independently. All three fields default to `true`; a layout value of `false` sets all three to `false`.
191
-
192
- If you used the short-lived development settings at the top level, move `{ buttons, button, backButton }` into `vertical: { buttons, button, backButton }`. Those fields were not part of the published 1.2.0/1.2.1 API and are not compatibility aliases. Existing `buttonProjection` / `buttonDefaultFill` are separate appearance settings, mapped above.
178
+ These are selection defaults, not a hard projection scope. Explicit `data-native-ui` sources and local `data-horizontal-bars="true"` / `data-vertical-bars="true"` can opt in even when a matching default is `false`. Remove the explicit marker or use `data-native-ui="disabled"` to leave an individual source on the Web. `ionic.auto: false` disables automatic Ionic discovery, including local layout opt-ins, but leaves explicit source declarations enabled.
193
179
 
194
- Local `data-horizontal-bars="true|false"` / `data-vertical-bars="true|false"` can override these layout defaults. On `ion-buttons` they affect grouping only and never select children. A back button ignores its group's grouping setting. `ionic.auto` and structural exclusions still apply. See [toolbar selection and grouping](native-ui.md#toolbar-selection-and-grouping) for eligibility and when changes take effect.
195
-
196
- See [all settings and defaults](configuration.md) and [plain HTML setup](framework-independent.md). Standard HTML buttons use the same Swift controls as Ionic; they do not require an application-specific Swift extension.
180
+ `buttonGroup` controls grouping only. It does not select children: `buttonGroup: true, button: false` projects no ordinary action without explicit selection. `backButton` controls back navigation independently, including inside an `ion-buttons` container. See [all settings](configuration.md) for the complete selection matrix and [toolbar grouping](native-ui.md#toolbar-selection-and-grouping) for local overrides.
197
181
 
198
182
  ## Web layout ownership
199
183
 
200
184
  Import `setVerticalBarsLayout` and `applyFoldStateClasses` from `@rdlabo/ionic-theme-ios27` for theme CSS. Replace `setVerticalControlAreaPlacement({ edge, nativeEdge, inset })` with `setVerticalBarsLayout({ edge, inset })`. Native UI now reads availability from its own device metrics; `nativeEdge` is ignored by the deprecated compatibility helper. Normal startup, disabled rails and teardown do not remove theme classes or alter reserved Web spacing. An unavailable native rail keeps the application’s Web rail layout; applications wanting a horizontal layout must select it themselves. Native-only applications can continue to use their own layout CSS.
201
-
202
- ## Automatic Ionic controls
203
-
204
- Use `ionic.auto` for new configuration. It accepts `true` (default), `false`, or `{ buttons, tabs, segment, fab }`. Unlike legacy `controls`, it affects only automatic Ionic projection; explicit `data-native-ui` sources and registered extensions remain enabled. `verticalBars` independently controls rail projection. See [selective projection](configuration.md#select-controls-explicitly-in-a-customized-ionic-app) for an existing Ionic app that opts in individual buttons.
205
-
206
- The legacy `controls` option is marked `@deprecated` and remains available. When `ionic.auto` is omitted, legacy kind settings are used, but omitted kinds now default to `true`; expand partial Preview configurations as shown above. If both are supplied, `ionic.auto` takes precedence for automatic kinds. Move the legacy `popover` option to `verticalBars.popover`.