@rdlabo/ionic-theme-ios27 1.2.0-2 → 1.2.0-4
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.
- package/README.md +15 -2
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/css/ionic-theme-ios27.css +1 -1
- package/dist/css/vertical-bars.css +1 -1
- package/dist/focus-controller/index.d.ts +4 -2
- package/dist/focus-controller/index.d.ts.map +1 -1
- package/dist/focus-controller/index.js +100 -57
- package/dist/focus-controller/index.js.map +1 -0
- package/dist/index.d.ts +10 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +54 -60
- package/dist/index.js.map +1 -0
- package/dist/native/components/index.d.ts +13 -10
- package/dist/native/components/index.d.ts.map +1 -1
- package/dist/native/components/index.js +39 -41
- package/dist/native/components/index.js.map +1 -0
- package/dist/native/components/ion-back-button.d.ts +6 -1
- package/dist/native/components/ion-back-button.d.ts.map +1 -1
- package/dist/native/components/ion-back-button.js +19 -13
- package/dist/native/components/ion-back-button.js.map +1 -0
- package/dist/native/components/ion-button.d.ts +8 -2
- package/dist/native/components/ion-button.d.ts.map +1 -1
- package/dist/native/components/ion-button.js +22 -17
- package/dist/native/components/ion-button.js.map +1 -0
- package/dist/native/components/ion-buttons.d.ts +8 -2
- package/dist/native/components/ion-buttons.d.ts.map +1 -1
- package/dist/native/components/ion-buttons.js +29 -33
- package/dist/native/components/ion-buttons.js.map +1 -0
- package/dist/native/components/ion-fab.d.ts +6 -1
- package/dist/native/components/ion-fab.d.ts.map +1 -1
- package/dist/native/components/ion-fab.js +131 -151
- package/dist/native/components/ion-fab.js.map +1 -0
- package/dist/native/components/ion-menu-button.d.ts +8 -2
- package/dist/native/components/ion-menu-button.d.ts.map +1 -1
- package/dist/native/components/ion-menu-button.js +29 -19
- package/dist/native/components/ion-menu-button.js.map +1 -0
- package/dist/native/components/ion-segment.d.ts +6 -1
- package/dist/native/components/ion-segment.d.ts.map +1 -1
- package/dist/native/components/ion-segment.js +29 -23
- package/dist/native/components/ion-segment.js.map +1 -0
- package/dist/native/components/ion-tab-bar.d.ts +6 -1
- package/dist/native/components/ion-tab-bar.d.ts.map +1 -1
- package/dist/native/components/ion-tab-bar.js +49 -40
- package/dist/native/components/ion-tab-bar.js.map +1 -0
- package/dist/native/components/searchable-tabs.d.ts +17 -15
- package/dist/native/components/searchable-tabs.d.ts.map +1 -1
- package/dist/native/components/searchable-tabs.js +382 -435
- package/dist/native/components/searchable-tabs.js.map +1 -0
- package/dist/native/definitions.d.ts +118 -111
- package/dist/native/definitions.d.ts.map +1 -1
- package/dist/native/definitions.js +0 -1
- package/dist/native/foldable/fold-state.d.ts +5 -0
- package/dist/native/foldable/fold-state.d.ts.map +1 -0
- package/dist/native/foldable/fold-state.js +14 -0
- package/dist/native/foldable/fold-state.js.map +1 -0
- package/dist/native/foldable/types.d.ts +12 -0
- package/dist/native/foldable/types.d.ts.map +1 -0
- package/dist/native/foldable/types.js +0 -0
- package/dist/native/index.d.ts +6 -3
- package/dist/native/index.d.ts.map +1 -1
- package/dist/native/index.js +228 -204
- package/dist/native/index.js.map +1 -0
- package/dist/native/prehide.d.ts +4 -2
- package/dist/native/prehide.d.ts.map +1 -1
- package/dist/native/prehide.js +220 -242
- package/dist/native/prehide.js.map +1 -0
- package/dist/native/runtime.d.ts +3 -1
- package/dist/native/runtime.d.ts.map +1 -1
- package/dist/native/runtime.js +626 -724
- package/dist/native/runtime.js.map +1 -0
- package/dist/native/shared/candidate.d.ts +16 -11
- package/dist/native/shared/candidate.d.ts.map +1 -1
- package/dist/native/shared/candidate.js +96 -95
- package/dist/native/shared/candidate.js.map +1 -0
- package/dist/native/shared/crossfade.d.ts +6 -4
- package/dist/native/shared/crossfade.d.ts.map +1 -1
- package/dist/native/shared/crossfade.js +49 -45
- package/dist/native/shared/crossfade.js.map +1 -0
- package/dist/native/shared/dom.d.ts +7 -5
- package/dist/native/shared/dom.d.ts.map +1 -1
- package/dist/native/shared/dom.js +163 -211
- package/dist/native/shared/dom.js.map +1 -0
- package/dist/native/shared/events.d.ts +8 -6
- package/dist/native/shared/events.d.ts.map +1 -1
- package/dist/native/shared/events.js +12 -7
- package/dist/native/shared/events.js.map +1 -0
- package/dist/native/shared/icons.d.ts +4 -2
- package/dist/native/shared/icons.d.ts.map +1 -1
- package/dist/native/shared/icons.js +59 -53
- package/dist/native/shared/icons.js.map +1 -0
- package/dist/native/shared/modal.d.ts +3 -1
- package/dist/native/shared/modal.d.ts.map +1 -1
- package/dist/native/shared/modal.js +156 -139
- package/dist/native/shared/modal.js.map +1 -0
- package/dist/native/vertical-bars-web.d.ts +3 -1
- package/dist/native/vertical-bars-web.d.ts.map +1 -1
- package/dist/native/vertical-bars-web.js +332 -346
- package/dist/native/vertical-bars-web.js.map +1 -0
- package/dist/native-integration/index.d.ts +10 -8
- package/dist/native-integration/index.d.ts.map +1 -1
- package/dist/native-integration/index.js +102 -100
- package/dist/native-integration/index.js.map +1 -0
- package/dist/native-integration/transition.d.ts +3 -1
- package/dist/native-integration/transition.d.ts.map +1 -1
- package/dist/native-integration/transition.js +15 -6
- package/dist/native-integration/transition.js.map +1 -0
- package/dist/searchbar/index.d.ts +4 -2
- package/dist/searchbar/index.d.ts.map +1 -1
- package/dist/searchbar/index.js +64 -56
- package/dist/searchbar/index.js.map +1 -0
- package/dist/segment/index.d.ts +3 -1
- package/dist/segment/index.d.ts.map +1 -1
- package/dist/segment/index.js +465 -324
- package/dist/segment/index.js.map +1 -0
- package/dist/sheets-of-glass/animations.d.ts +13 -12
- package/dist/sheets-of-glass/animations.d.ts.map +1 -1
- package/dist/sheets-of-glass/animations.js +496 -306
- package/dist/sheets-of-glass/animations.js.map +1 -0
- package/dist/sheets-of-glass/index.d.ts +3 -1
- package/dist/sheets-of-glass/index.d.ts.map +1 -1
- package/dist/sheets-of-glass/index.js +294 -357
- package/dist/sheets-of-glass/index.js.map +1 -0
- package/dist/sheets-of-glass/interfaces.d.ts +11 -9
- package/dist/sheets-of-glass/interfaces.d.ts.map +1 -1
- package/dist/sheets-of-glass/interfaces.js +0 -1
- package/dist/tab-bar-searchable/animations/enter.d.ts +4 -2
- package/dist/tab-bar-searchable/animations/enter.d.ts.map +1 -1
- package/dist/tab-bar-searchable/animations/enter.js +50 -69
- package/dist/tab-bar-searchable/animations/enter.js.map +1 -0
- package/dist/tab-bar-searchable/animations/leave.d.ts +4 -2
- package/dist/tab-bar-searchable/animations/leave.d.ts.map +1 -1
- package/dist/tab-bar-searchable/animations/leave.js +48 -62
- package/dist/tab-bar-searchable/animations/leave.js.map +1 -0
- package/dist/tab-bar-searchable/index.d.ts +5 -3
- package/dist/tab-bar-searchable/index.d.ts.map +1 -1
- package/dist/tab-bar-searchable/index.js +125 -109
- package/dist/tab-bar-searchable/index.js.map +1 -0
- package/dist/transition/index.d.ts +9 -8
- package/dist/transition/index.d.ts.map +1 -1
- package/dist/transition/index.js +203 -192
- package/dist/transition/index.js.map +1 -0
- package/dist/transition/ios.transition.d.ts +7 -5
- package/dist/transition/ios.transition.d.ts.map +1 -1
- package/dist/transition/ios.transition.js +15 -11
- package/dist/transition/ios.transition.js.map +1 -0
- package/dist/utils.d.ts +10 -8
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +58 -66
- package/dist/utils.js.map +1 -0
- package/dist/vertical-bars.d.ts +5 -4
- package/dist/vertical-bars.js +4 -2
- package/docs/iphone-duo-with-original-theme.md +18 -29
- package/docs/iphone-duo.md +44 -204
- package/docs/native-ui-shell.md +15 -11
- package/docs/special-markup.md +2 -0
- package/docs/vertical-bars.md +283 -0
- package/ios/Sources/IonicNativeUIShellPlugin/Components/ShellSearchController.swift +1 -1
- package/ios/Sources/IonicNativeUIShellPlugin/Components/ShellVerticalBars.swift +61 -16
- package/ios/Sources/IonicNativeUIShellPlugin/Components/ShellVerticalSearch.swift +118 -0
- package/ios/Sources/IonicNativeUIShellPlugin/IonicNativeUIShellPlugin.swift +17 -8
- package/ios/Sources/IonicNativeUIShellPlugin/Shared/ShellSnapshot.swift +2 -0
- package/ios/Tests/IonicNativeUIShellPluginTests/ShellSnapshotTests.swift +40 -0
- package/package.json +9 -6
- package/src/native/components/index.ts +3 -2
- package/src/native/components/ion-button.ts +3 -2
- package/src/native/components/ion-buttons.ts +4 -3
- package/src/native/components/ion-menu-button.ts +3 -2
- package/src/native/components/searchable-tabs.ts +8 -11
- package/src/native/definitions.ts +22 -1
- package/src/native/foldable/fold-state.ts +9 -0
- package/src/native/foldable/types.ts +4 -0
- package/src/native/index.ts +17 -3
- package/src/native/prehide.ts +3 -1
- package/src/native/runtime.ts +14 -9
- package/src/native/shared/candidate.ts +39 -10
- package/src/native/shared/dom.ts +4 -4
- package/src/styles/vertical-bars.scss +12 -2
- package/src/tab-bar-searchable/index.ts +40 -9
- package/src/vertical-bars.ts +9 -1
- package/dist/vertical-bars.d.ts.map +0 -1
package/dist/native/index.js
CHANGED
|
@@ -1,218 +1,242 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { createRuntime } from
|
|
4
|
-
import { createVerticalBarsWebProjection } from
|
|
5
|
-
import { prehideVerticalBarsToolbarSources } from
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { setConfig } from "../transition/ios.transition.js";
|
|
2
|
+
import { observeVerticalBarsModals } from "./shared/modal.js";
|
|
3
|
+
import { createRuntime } from "./runtime.js";
|
|
4
|
+
import { createVerticalBarsWebProjection } from "./vertical-bars-web.js";
|
|
5
|
+
import { prehideVerticalBarsToolbarSources } from "./prehide.js";
|
|
6
|
+
import { Capacitor, registerPlugin } from "@capacitor/core";
|
|
7
|
+
//#region src/native/index.ts
|
|
8
|
+
const plugin = registerPlugin("IonicNativeUIShell");
|
|
9
|
+
const IonicNativeUIShell = plugin;
|
|
9
10
|
let active;
|
|
10
11
|
let activeConfiguration;
|
|
11
12
|
const web = (reason) => ({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
getStatus: () => ({
|
|
14
|
+
state: "web",
|
|
15
|
+
projected: 0,
|
|
16
|
+
updates: 0,
|
|
17
|
+
reason
|
|
18
|
+
}),
|
|
19
|
+
suspend: async () => ({ resume: async () => {} }),
|
|
20
|
+
destroy: async () => {}
|
|
15
21
|
});
|
|
16
22
|
const combine = (native, fallback) => ({
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
23
|
+
getStatus() {
|
|
24
|
+
const nativeStatus = native.getStatus();
|
|
25
|
+
const fallbackStatus = fallback.getStatus();
|
|
26
|
+
return {
|
|
27
|
+
...nativeStatus,
|
|
28
|
+
state: nativeStatus.state === "stopped" && fallbackStatus.state === "stopped" ? "stopped" : nativeStatus.projected > 0 ? "native" : "web",
|
|
29
|
+
projected: nativeStatus.projected + fallbackStatus.projected,
|
|
30
|
+
updates: nativeStatus.updates + fallbackStatus.updates
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
async suspend() {
|
|
34
|
+
const [nativeLease, fallbackLease] = await Promise.all([native.suspend(), fallback.suspend()]);
|
|
35
|
+
return { resume: async () => void await Promise.all([nativeLease.resume(), fallbackLease.resume()]) };
|
|
36
|
+
},
|
|
37
|
+
async destroy() {
|
|
38
|
+
await Promise.all([native.destroy(), fallback.destroy()]);
|
|
39
|
+
}
|
|
34
40
|
});
|
|
41
|
+
/** Wraps a runtime handle with the shared enable-lifecycle: reason, suspend hooks and idempotent destroy. */
|
|
35
42
|
const manage = (handle, lifecycle = {}) => {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
};
|
|
43
|
+
let destroyed = false;
|
|
44
|
+
return {
|
|
45
|
+
getStatus: () => lifecycle.reason ? {
|
|
46
|
+
...handle.getStatus(),
|
|
47
|
+
reason: lifecycle.reason
|
|
48
|
+
} : handle.getStatus(),
|
|
49
|
+
async suspend() {
|
|
50
|
+
const lease = await handle.suspend();
|
|
51
|
+
const resume = lifecycle.suspend?.();
|
|
52
|
+
return { async resume() {
|
|
53
|
+
await lease.resume();
|
|
54
|
+
resume?.();
|
|
55
|
+
} };
|
|
56
|
+
},
|
|
57
|
+
async destroy() {
|
|
58
|
+
if (destroyed) return;
|
|
59
|
+
destroyed = true;
|
|
60
|
+
try {
|
|
61
|
+
await handle.destroy();
|
|
62
|
+
} finally {
|
|
63
|
+
await lifecycle.destroy?.();
|
|
64
|
+
lifecycle.release?.();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
};
|
|
62
68
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
69
|
+
/** Reads the current native WebView geometry and applies it to page transitions. */
|
|
70
|
+
const configureNativeTransition = async () => {
|
|
71
|
+
const metrics = typeof document !== "undefined" && Capacitor.getPlatform() === "ios" ? await plugin.getWebViewMetrics() : { radius: 0 };
|
|
72
|
+
setConfig({ radius: metrics.radius });
|
|
73
|
+
return metrics;
|
|
67
74
|
};
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
const
|
|
71
|
-
const
|
|
75
|
+
/** Resolves a logical vertical-bar edge to the physical side for the given direction. */
|
|
76
|
+
const physicalVerticalBarEdge = (edge, rtl) => edge === "leading" !== rtl ? "left" : "right";
|
|
77
|
+
const elementRtl = (element) => element.closest("[dir]")?.getAttribute("dir") === "rtl";
|
|
78
|
+
const nativePlacements = /* @__PURE__ */ new WeakMap();
|
|
79
|
+
const horizontalFallbackAttribute = "data-native-ui-shell-vertical-bars-suspended";
|
|
72
80
|
const observeNativeVerticalBarsLayout = (doc) => {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
81
|
+
const reconcile = () => {
|
|
82
|
+
const app = doc.querySelector("ion-app");
|
|
83
|
+
if (!app) return;
|
|
84
|
+
const requested = app.classList.contains("ios-theme-vertical-bars") || app.hasAttribute(horizontalFallbackAttribute);
|
|
85
|
+
const suspended = requested && nativePlacements.get(app)?.edge == null;
|
|
86
|
+
if (app.hasAttribute(horizontalFallbackAttribute) !== suspended) app.toggleAttribute(horizontalFallbackAttribute, suspended);
|
|
87
|
+
if (app.classList.contains("ios-theme-vertical-bars") !== (requested && !suspended)) app.classList.toggle("ios-theme-vertical-bars", requested && !suspended);
|
|
88
|
+
};
|
|
89
|
+
const observer = new MutationObserver(reconcile);
|
|
90
|
+
observer.observe(doc.documentElement, {
|
|
91
|
+
childList: true,
|
|
92
|
+
subtree: true,
|
|
93
|
+
attributes: true,
|
|
94
|
+
attributeFilter: ["class"]
|
|
95
|
+
});
|
|
96
|
+
doc.defaultView?.addEventListener("nativeUIShellRefresh", reconcile);
|
|
97
|
+
reconcile();
|
|
98
|
+
return () => {
|
|
99
|
+
observer.disconnect();
|
|
100
|
+
doc.defaultView?.removeEventListener("nativeUIShellRefresh", reconcile);
|
|
101
|
+
const app = doc.querySelector(`ion-app[${horizontalFallbackAttribute}]`);
|
|
102
|
+
if (app) {
|
|
103
|
+
app.removeAttribute(horizontalFallbackAttribute);
|
|
104
|
+
app.classList.add("ios-theme-vertical-bars");
|
|
105
|
+
}
|
|
106
|
+
};
|
|
98
107
|
};
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
108
|
+
/**
|
|
109
|
+
* Applies one placement to the CSS layout and both Web/native projections.
|
|
110
|
+
* Pass `rtl` when the document direction is known; otherwise the nearest `dir` attribute is used.
|
|
111
|
+
*/
|
|
112
|
+
const setVerticalControlAreaPlacement = (placement, rtl) => {
|
|
113
|
+
if (typeof document === "undefined") return;
|
|
114
|
+
const app = document.querySelector("ion-app");
|
|
115
|
+
if (!app) throw new Error("Vertical Control Area requires ion-app");
|
|
116
|
+
const { edge, inset = 0 } = placement && typeof placement === "object" ? placement : {
|
|
117
|
+
edge: placement,
|
|
118
|
+
inset: 0
|
|
119
|
+
};
|
|
120
|
+
if (placement && typeof placement === "object" && placement.nativeEdge !== void 0) nativePlacements.set(app, {
|
|
121
|
+
edge: placement.nativeEdge,
|
|
122
|
+
rtl
|
|
123
|
+
});
|
|
124
|
+
app.removeAttribute(horizontalFallbackAttribute);
|
|
125
|
+
app.classList.toggle("ios-theme-vertical-bars", edge !== null);
|
|
126
|
+
app.classList.toggle("ios-theme-vertical-bars-left", edge !== null && physicalVerticalBarEdge(edge, rtl ?? elementRtl(app)) === "left");
|
|
127
|
+
if (edge && Number.isFinite(inset) && inset > 0) app.style.setProperty("--ios-theme-vertical-bars-native-inset", `${inset}px`);
|
|
128
|
+
else app.style.removeProperty("--ios-theme-vertical-bars-native-inset");
|
|
129
|
+
document.defaultView?.dispatchEvent(new Event("nativeUIShellRefresh"));
|
|
117
130
|
};
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
131
|
+
/**
|
|
132
|
+
* Call once after ion-app is mounted. Ionic markup remains the source of truth.
|
|
133
|
+
* Native vertical buttons default to SwiftUI appearance.
|
|
134
|
+
* See VerticalControlAreaOptions for source styling and local overrides.
|
|
135
|
+
*/
|
|
136
|
+
const enableVerticalControlArea = async (options = {}) => {
|
|
137
|
+
const handle = await enableNativeUIShell({
|
|
138
|
+
buttonProjection: options.buttonProjection,
|
|
139
|
+
buttonDefaultFill: options.buttonDefaultFill,
|
|
140
|
+
controls: {
|
|
141
|
+
tabs: true,
|
|
142
|
+
toolbar: true
|
|
143
|
+
},
|
|
144
|
+
verticalBarsOnly: true
|
|
145
|
+
});
|
|
146
|
+
return {
|
|
147
|
+
getStatus: () => handle.getStatus(),
|
|
148
|
+
suspend: () => handle.suspend(),
|
|
149
|
+
destroy: () => handle.destroy(),
|
|
150
|
+
setPlacement: setVerticalControlAreaPlacement
|
|
151
|
+
};
|
|
126
152
|
};
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
await runtime?.destroy();
|
|
213
|
-
await metricsListener?.remove().catch(() => { });
|
|
214
|
-
stopVerticalBarsLayout?.();
|
|
215
|
-
return fallback(error instanceof Error ? error.message : String(error));
|
|
216
|
-
}
|
|
217
|
-
})());
|
|
153
|
+
/** Call once at application startup. Ionic markup remains the source of truth. */
|
|
154
|
+
const enableNativeUIShell = (options = {}) => {
|
|
155
|
+
if (options.enabled === false) {
|
|
156
|
+
const current = active;
|
|
157
|
+
active = void 0;
|
|
158
|
+
activeConfiguration = void 0;
|
|
159
|
+
return current ? current.then(async (handle) => {
|
|
160
|
+
await handle.destroy();
|
|
161
|
+
return web("Disabled");
|
|
162
|
+
}) : Promise.resolve(web("Disabled"));
|
|
163
|
+
}
|
|
164
|
+
if (typeof document === "undefined") return Promise.resolve(web("Requires a document"));
|
|
165
|
+
const controls = options.controls;
|
|
166
|
+
const configuration = JSON.stringify([
|
|
167
|
+
options.verticalBarsOnly === true,
|
|
168
|
+
options.buttonProjection ?? "system",
|
|
169
|
+
options.buttonDefaultFill ?? null,
|
|
170
|
+
...[
|
|
171
|
+
"tabs",
|
|
172
|
+
"toolbar",
|
|
173
|
+
"segment",
|
|
174
|
+
"fab"
|
|
175
|
+
].map((component) => !controls || controls[component] === true)
|
|
176
|
+
]);
|
|
177
|
+
if (active && activeConfiguration !== configuration) return Promise.reject(/* @__PURE__ */ new Error("Native UI Shell is already running with different controls; destroy it before changing configuration."));
|
|
178
|
+
if (active) return active;
|
|
179
|
+
activeConfiguration = configuration;
|
|
180
|
+
const stopModals = observeVerticalBarsModals(document);
|
|
181
|
+
const prehide = options.controls === void 0 || options.controls.toolbar === true ? prehideVerticalBarsToolbarSources(document) : void 0;
|
|
182
|
+
let start;
|
|
183
|
+
const release = () => {
|
|
184
|
+
if (active === start) {
|
|
185
|
+
active = void 0;
|
|
186
|
+
activeConfiguration = void 0;
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
const fallback = (reason) => manage(createVerticalBarsWebProjection(document, options), {
|
|
190
|
+
reason,
|
|
191
|
+
suspend: () => prehide?.suspend(),
|
|
192
|
+
destroy: () => {
|
|
193
|
+
prehide?.stop();
|
|
194
|
+
stopModals();
|
|
195
|
+
},
|
|
196
|
+
release
|
|
197
|
+
});
|
|
198
|
+
return start = active = (async () => {
|
|
199
|
+
if (Capacitor.getPlatform() !== "ios") return fallback("Requires Capacitor iOS");
|
|
200
|
+
let runtime;
|
|
201
|
+
let metricsListener;
|
|
202
|
+
let stopVerticalBarsLayout;
|
|
203
|
+
try {
|
|
204
|
+
if (!(await plugin.configure({ verticalBarsOnly: options.verticalBarsOnly === true })).supported) return fallback("Requires iOS 26 or later");
|
|
205
|
+
if (!options.verticalBarsOnly) stopVerticalBarsLayout = observeNativeVerticalBarsLayout(document);
|
|
206
|
+
const nativeVerticalBars = () => {
|
|
207
|
+
const app = document.querySelector("ion-app.ios-theme-vertical-bars");
|
|
208
|
+
if (!app) return false;
|
|
209
|
+
const reported = nativePlacements.get(app);
|
|
210
|
+
if (!reported?.edge) return false;
|
|
211
|
+
return (app.classList.contains("ios-theme-vertical-bars-left") ? "left" : "right") === physicalVerticalBarEdge(reported.edge, reported.rtl ?? elementRtl(app));
|
|
212
|
+
};
|
|
213
|
+
if (!options.verticalBarsOnly) {
|
|
214
|
+
metricsListener = await plugin.addListener("webViewMetricsChange", (metrics) => {
|
|
215
|
+
setConfig({ radius: metrics.radius });
|
|
216
|
+
});
|
|
217
|
+
await configureNativeTransition().catch(() => void 0);
|
|
218
|
+
}
|
|
219
|
+
const native = await createRuntime(document, plugin, options, nativeVerticalBars, options.verticalBarsOnly === true);
|
|
220
|
+
runtime = combine(native, createVerticalBarsWebProjection(document, options, () => !nativeVerticalBars() || native.getStatus().state === "stopped"));
|
|
221
|
+
return manage(runtime, {
|
|
222
|
+
suspend: () => prehide?.suspend(),
|
|
223
|
+
release,
|
|
224
|
+
destroy: async () => {
|
|
225
|
+
await metricsListener?.remove().catch(() => {});
|
|
226
|
+
stopVerticalBarsLayout?.();
|
|
227
|
+
prehide?.stop();
|
|
228
|
+
stopModals();
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
} catch (error) {
|
|
232
|
+
await runtime?.destroy();
|
|
233
|
+
await metricsListener?.remove().catch(() => {});
|
|
234
|
+
stopVerticalBarsLayout?.();
|
|
235
|
+
return fallback(error instanceof Error ? error.message : String(error));
|
|
236
|
+
}
|
|
237
|
+
})();
|
|
218
238
|
};
|
|
239
|
+
//#endregion
|
|
240
|
+
export { IonicNativeUIShell, configureNativeTransition, enableNativeUIShell, enableVerticalControlArea, setVerticalControlAreaPlacement };
|
|
241
|
+
|
|
242
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/native/index.ts"],"sourcesContent":["import { Capacitor, registerPlugin } from '@capacitor/core';\nimport { setConfig } from '../transition/ios.transition';\nimport type {\n NativeUIShellHandle,\n NativeUIShellOptions,\n NativeUIShellPlugin,\n VerticalBarEdge,\n VerticalBarPlacement,\n VerticalControlAreaHandle,\n VerticalControlAreaOptions,\n WebViewMetrics,\n} from './definitions';\nimport { createRuntime } from './runtime';\nimport { createVerticalBarsWebProjection } from './vertical-bars-web';\nimport { prehideVerticalBarsToolbarSources } from './prehide';\nimport { observeVerticalBarsModals } from './shared/modal';\nexport type {\n NativeUIShellComponent,\n NativeUIShellControls,\n NativeUIShellHandle,\n NativeUIShellOptions,\n NativeUIShellStatus,\n NativeUIShellSuspension,\n VerticalBarEdge,\n VerticalBarPlacement,\n VerticalControlAreaHandle,\n VerticalControlAreaOptions,\n WebViewMetrics,\n} from './definitions';\n\nconst plugin = registerPlugin<NativeUIShellPlugin>('IonicNativeUIShell');\nexport const IonicNativeUIShell = plugin;\nlet active: Promise<NativeUIShellHandle> | undefined;\nlet activeConfiguration: string | undefined;\nconst web = (reason: string): NativeUIShellHandle => ({\n getStatus: () => ({ state: 'web', projected: 0, updates: 0, reason }),\n suspend: async () => ({ resume: async () => {} }),\n destroy: async () => {},\n});\n\nconst combine = (native: NativeUIShellHandle, fallback: NativeUIShellHandle): NativeUIShellHandle => ({\n getStatus() {\n const nativeStatus = native.getStatus();\n const fallbackStatus = fallback.getStatus();\n return {\n ...nativeStatus,\n state:\n nativeStatus.state === 'stopped' && fallbackStatus.state === 'stopped' ? 'stopped' : nativeStatus.projected > 0 ? 'native' : 'web',\n projected: nativeStatus.projected + fallbackStatus.projected,\n updates: nativeStatus.updates + fallbackStatus.updates,\n };\n },\n async suspend() {\n const [nativeLease, fallbackLease] = await Promise.all([native.suspend(), fallback.suspend()]);\n return { resume: async () => void (await Promise.all([nativeLease.resume(), fallbackLease.resume()])) };\n },\n async destroy() {\n await Promise.all([native.destroy(), fallback.destroy()]);\n },\n});\n\n/** Wraps a runtime handle with the shared enable-lifecycle: reason, suspend hooks and idempotent destroy. */\nconst manage = (\n handle: NativeUIShellHandle,\n lifecycle: {\n reason?: string;\n suspend?: () => (() => void) | undefined;\n /** Runs after teardown; clears the shared slot only while this activation owns it. */\n release?: () => void;\n destroy?: () => void | Promise<void>;\n } = {},\n): NativeUIShellHandle => {\n let destroyed = false;\n return {\n getStatus: () => (lifecycle.reason ? { ...handle.getStatus(), reason: lifecycle.reason } : handle.getStatus()),\n async suspend() {\n const lease = await handle.suspend();\n const resume = lifecycle.suspend?.();\n return {\n async resume() {\n await lease.resume();\n resume?.();\n },\n };\n },\n async destroy() {\n if (destroyed) return;\n destroyed = true;\n try {\n await handle.destroy();\n } finally {\n await lifecycle.destroy?.();\n lifecycle.release?.();\n }\n },\n };\n};\n\n/** Reads the current native WebView geometry and applies it to page transitions. */\nexport const configureNativeTransition = async (): Promise<WebViewMetrics> => {\n const metrics = typeof document !== 'undefined' && Capacitor.getPlatform() === 'ios' ? await plugin.getWebViewMetrics() : { radius: 0 };\n setConfig({ radius: metrics.radius });\n return metrics;\n};\n\n/** Resolves a logical vertical-bar edge to the physical side for the given direction. */\nconst physicalVerticalBarEdge = (edge: Exclude<VerticalBarEdge, null>, rtl: boolean): 'left' | 'right' =>\n (edge === 'leading') !== rtl ? 'left' : 'right';\n\nconst elementRtl = (element: Element): boolean => element.closest('[dir]')?.getAttribute('dir') === 'rtl';\n\n// Device facts are supplied by the application; the theme only compares placement.\nconst nativePlacements = new WeakMap<HTMLElement, { edge: VerticalBarEdge; rtl?: boolean }>();\nconst horizontalFallbackAttribute = 'data-native-ui-shell-vertical-bars-suspended';\n\n// Keep the requested rail while ordinary Native UI Shell temporarily uses its\n// horizontal layout. Removing the effective class restores normal measurements,\n// toolbar ownership and safe areas throughout the existing rendering pipeline.\nconst observeNativeVerticalBarsLayout = (doc: Document): (() => void) => {\n const reconcile = () => {\n const app = doc.querySelector<HTMLElement>('ion-app');\n if (!app) return;\n const requested = app.classList.contains('ios-theme-vertical-bars') || app.hasAttribute(horizontalFallbackAttribute);\n const suspended = requested && nativePlacements.get(app)?.edge == null;\n if (app.hasAttribute(horizontalFallbackAttribute) !== suspended) app.toggleAttribute(horizontalFallbackAttribute, suspended);\n if (app.classList.contains('ios-theme-vertical-bars') !== (requested && !suspended)) {\n app.classList.toggle('ios-theme-vertical-bars', requested && !suspended);\n }\n };\n const observer = new MutationObserver(reconcile);\n observer.observe(doc.documentElement, { childList: true, subtree: true, attributes: true, attributeFilter: ['class'] });\n doc.defaultView?.addEventListener('nativeUIShellRefresh', reconcile);\n reconcile();\n return () => {\n observer.disconnect();\n doc.defaultView?.removeEventListener('nativeUIShellRefresh', reconcile);\n const app = doc.querySelector<HTMLElement>(`ion-app[${horizontalFallbackAttribute}]`);\n if (app) {\n app.removeAttribute(horizontalFallbackAttribute);\n app.classList.add('ios-theme-vertical-bars');\n }\n };\n};\n\n/**\n * Applies one placement to the CSS layout and both Web/native projections.\n * Pass `rtl` when the document direction is known; otherwise the nearest `dir` attribute is used.\n */\nexport const setVerticalControlAreaPlacement = (placement: VerticalBarEdge | VerticalBarPlacement, rtl?: boolean): void => {\n if (typeof document === 'undefined') return;\n const app = document.querySelector<HTMLElement>('ion-app');\n if (!app) throw new Error('Vertical Control Area requires ion-app');\n const { edge, inset = 0 } = placement && typeof placement === 'object' ? placement : { edge: placement, inset: 0 };\n if (placement && typeof placement === 'object' && placement.nativeEdge !== undefined) {\n nativePlacements.set(app, { edge: placement.nativeEdge, rtl });\n }\n app.removeAttribute(horizontalFallbackAttribute);\n app.classList.toggle('ios-theme-vertical-bars', edge !== null);\n app.classList.toggle('ios-theme-vertical-bars-left', edge !== null && physicalVerticalBarEdge(edge, rtl ?? elementRtl(app)) === 'left');\n if (edge && Number.isFinite(inset) && inset > 0) app.style.setProperty('--ios-theme-vertical-bars-native-inset', `${inset}px`);\n else app.style.removeProperty('--ios-theme-vertical-bars-native-inset');\n document.defaultView?.dispatchEvent(new Event('nativeUIShellRefresh'));\n};\n\n/**\n * Call once after ion-app is mounted. Ionic markup remains the source of truth.\n * Native vertical buttons default to SwiftUI appearance.\n * See VerticalControlAreaOptions for source styling and local overrides.\n */\nexport const enableVerticalControlArea = async (options: VerticalControlAreaOptions = {}): Promise<VerticalControlAreaHandle> => {\n const handle = await enableNativeUIShell({\n buttonProjection: options.buttonProjection,\n buttonDefaultFill: options.buttonDefaultFill,\n controls: { tabs: true, toolbar: true },\n verticalBarsOnly: true,\n });\n return {\n getStatus: () => handle.getStatus(),\n suspend: () => handle.suspend(),\n destroy: () => handle.destroy(),\n setPlacement: setVerticalControlAreaPlacement,\n };\n};\n\n/** Call once at application startup. Ionic markup remains the source of truth. */\nexport const enableNativeUIShell = (options: NativeUIShellOptions = {}): Promise<NativeUIShellHandle> => {\n if (options.enabled === false) {\n const current = active;\n active = undefined;\n activeConfiguration = undefined;\n return current\n ? current.then(async (handle) => {\n await handle.destroy();\n return web('Disabled');\n })\n : Promise.resolve(web('Disabled'));\n }\n if (typeof document === 'undefined') return Promise.resolve(web('Requires a document'));\n const controls = options.controls;\n const configuration = JSON.stringify([\n options.verticalBarsOnly === true,\n options.buttonProjection ?? 'system',\n // Local source overrides can use this even when the startup projection is system.\n options.buttonDefaultFill ?? null,\n ...(['tabs', 'toolbar', 'segment', 'fab'] as const).map((component) => !controls || controls[component] === true),\n ]);\n if (active && activeConfiguration !== configuration)\n return Promise.reject(\n new Error('Native UI Shell is already running with different controls; destroy it before changing configuration.'),\n );\n if (active) return active;\n activeConfiguration = configuration;\n const stopModals = observeVerticalBarsModals(document);\n const prehide =\n options.controls === undefined || options.controls.toolbar === true ? prehideVerticalBarsToolbarSources(document) : undefined;\n // A slow destroy of a superseded activation must not release a newer one.\n let start: Promise<NativeUIShellHandle>;\n const release = () => {\n if (active === start) {\n active = undefined;\n activeConfiguration = undefined;\n }\n };\n const fallback = (reason: string) =>\n manage(createVerticalBarsWebProjection(document, options), {\n reason,\n suspend: () => prehide?.suspend(),\n destroy: () => {\n prehide?.stop();\n stopModals();\n },\n release,\n });\n return (start = active =\n (async () => {\n if (Capacitor.getPlatform() !== 'ios') return fallback('Requires Capacitor iOS');\n let runtime: NativeUIShellHandle | undefined;\n let metricsListener: Awaited<ReturnType<typeof plugin.addListener>> | undefined;\n let stopVerticalBarsLayout: (() => void) | undefined;\n try {\n const capabilities = await plugin.configure({ verticalBarsOnly: options.verticalBarsOnly === true });\n if (!capabilities.supported) return fallback('Requires iOS 26 or later');\n if (!options.verticalBarsOnly) stopVerticalBarsLayout = observeNativeVerticalBarsLayout(document);\n // The application owns device state and selects the rail through placement classes.\n const nativeVerticalBars = () => {\n const app = document.querySelector<HTMLElement>('ion-app.ios-theme-vertical-bars');\n if (!app) return false;\n const reported = nativePlacements.get(app);\n if (!reported?.edge) return false;\n const physicalEdge = app.classList.contains('ios-theme-vertical-bars-left') ? 'left' : 'right';\n return physicalEdge === physicalVerticalBarEdge(reported.edge, reported.rtl ?? elementRtl(app));\n };\n if (!options.verticalBarsOnly) {\n metricsListener = await plugin.addListener('webViewMetricsChange', (metrics) => {\n setConfig({ radius: metrics.radius });\n });\n await configureNativeTransition().catch(() => undefined);\n }\n const native = await createRuntime(document, plugin, options, nativeVerticalBars, options.verticalBarsOnly === true);\n runtime = combine(\n native,\n createVerticalBarsWebProjection(document, options, () => !nativeVerticalBars() || native.getStatus().state === 'stopped'),\n );\n return manage(runtime, {\n suspend: () => prehide?.suspend(),\n release,\n destroy: async () => {\n await metricsListener?.remove().catch(() => {});\n stopVerticalBarsLayout?.();\n prehide?.stop();\n stopModals();\n },\n });\n } catch (error) {\n await runtime?.destroy();\n await metricsListener?.remove().catch(() => {});\n stopVerticalBarsLayout?.();\n return fallback(error instanceof Error ? error.message : String(error));\n }\n })());\n};\n"],"mappings":";;;;;;;AA8BA,MAAM,SAAS,eAAoC,oBAAoB;AACvE,MAAa,qBAAqB;AAClC,IAAI;AACJ,IAAI;AACJ,MAAM,OAAO,YAAyC;CACpD,kBAAkB;EAAE,OAAO;EAAO,WAAW;EAAG,SAAS;EAAG;CAAO;CACnE,SAAS,aAAa,EAAE,QAAQ,YAAY,CAAC,EAAE;CAC/C,SAAS,YAAY,CAAC;AACxB;AAEA,MAAM,WAAW,QAA6B,cAAwD;CACpG,YAAY;EACV,MAAM,eAAe,OAAO,UAAU;EACtC,MAAM,iBAAiB,SAAS,UAAU;EAC1C,OAAO;GACL,GAAG;GACH,OACE,aAAa,UAAU,aAA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Q,kBAAkB;IAC7B,kBAAkB,MAAM,OAAO,YAAY,yBAAyB,YAAY;KAC9E,UAAU,EAAE,QAAQ,QAAQ,OAAO,CAAC;IACtC,CAAC;IACD,MAAM,0BAA0B,CAAC,CAAC,YAAY,KAAA,CAAS;GACzD;GACA,MAAM,SAAS,MAAM,cAAc,UAAU,QAAQ,SAAS,oBAAoB,QAAQ,qBAAqB,IAAI;GACnH,UAAU,QACR,QACA,gCAAgC,UAAU,eAAe,CAAC,mBAAmB,KAAK,OAAO,UAAU,CAAC,CAAC,UAAU,SAAS,CAC1H;GACA,OAAO,OAAO,SAAS;IACrB,eAAe,SAAS,QAAQ;IAChC;IACA,SAAS,YAAY;KACnB,MAAM,iBAAiB,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC;KAC9C,yBAAyB;KACzB,SAAS,KAAK;KACd,WAAW;IACb;GACF,CAAC;EACH,SAAS,OAAO;GACd,MAAM,SAAS,QAAQ;GACvB,MAAM,iBAAiB,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC;GAC9C,yBAAyB;GACzB,OAAO,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC;EACxE;CACF,EAAA,CAAG;AACP"}
|
package/dist/native/prehide.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
//#region src/native/prehide.d.ts
|
|
1
2
|
export declare const prehideVerticalBarsToolbarSources: (doc: Document) => {
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
suspend: () => () => void;
|
|
4
|
+
stop: () => void;
|
|
4
5
|
};
|
|
6
|
+
//#endregion
|
|
5
7
|
//# sourceMappingURL=prehide.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prehide.d.ts","
|
|
1
|
+
{"version":3,"file":"prehide.d.ts","names":[],"sources":["../../src/native/prehide.ts"],"mappings":";qBAkCa,oCAAqC,KAAK;EAAa;EAA2B"}
|