@rdlabo/capacitor-native-ui 0.0.0-stage → 2.0.0-1
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/LICENSE +21 -0
- package/Package.swift +23 -0
- package/README.md +66 -2
- package/RdlaboCapacitorNativeUi.podspec +17 -0
- package/android/build.gradle +69 -0
- package/android/proguard-rules.pro +0 -0
- package/android/src/main/AndroidManifest.xml +1 -0
- package/android/src/main/java/dev/rdlabo/capacitor/nativeui/NativeUI.kt +51 -0
- package/android/src/main/java/dev/rdlabo/capacitor/nativeui/NativeUIPlugin.kt +192 -0
- package/android/src/main/java/dev/rdlabo/capacitor/nativeui/NativeUISnapshot.kt +57 -0
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/core.d.ts +4 -0
- package/dist/core.js +3 -0
- package/dist/native/activation.d.ts +14 -0
- package/dist/native/activation.d.ts.map +1 -0
- package/dist/native/activation.js +305 -0
- package/dist/native/activation.js.map +1 -0
- package/dist/native/components/index.d.ts +19 -0
- package/dist/native/components/index.d.ts.map +1 -0
- package/dist/native/components/index.js +38 -0
- package/dist/native/components/index.js.map +1 -0
- package/dist/native/components/ion-back-button.d.ts +10 -0
- package/dist/native/components/ion-back-button.d.ts.map +1 -0
- package/dist/native/components/ion-back-button.js +21 -0
- package/dist/native/components/ion-back-button.js.map +1 -0
- package/dist/native/components/ion-button.d.ts +10 -0
- package/dist/native/components/ion-button.d.ts.map +1 -0
- package/dist/native/components/ion-button.js +25 -0
- package/dist/native/components/ion-button.js.map +1 -0
- package/dist/native/components/ion-buttons.d.ts +11 -0
- package/dist/native/components/ion-buttons.d.ts.map +1 -0
- package/dist/native/components/ion-buttons.js +30 -0
- package/dist/native/components/ion-buttons.js.map +1 -0
- package/dist/native/components/ion-fab.d.ts +10 -0
- package/dist/native/components/ion-fab.d.ts.map +1 -0
- package/dist/native/components/ion-fab.js +132 -0
- package/dist/native/components/ion-fab.js.map +1 -0
- package/dist/native/components/ion-menu-button.d.ts +13 -0
- package/dist/native/components/ion-menu-button.d.ts.map +1 -0
- package/dist/native/components/ion-menu-button.js +44 -0
- package/dist/native/components/ion-menu-button.js.map +1 -0
- package/dist/native/components/ion-segment.d.ts +11 -0
- package/dist/native/components/ion-segment.d.ts.map +1 -0
- package/dist/native/components/ion-segment.js +30 -0
- package/dist/native/components/ion-segment.js.map +1 -0
- package/dist/native/components/ion-tab-bar.d.ts +11 -0
- package/dist/native/components/ion-tab-bar.d.ts.map +1 -0
- package/dist/native/components/ion-tab-bar.js +50 -0
- package/dist/native/components/ion-tab-bar.js.map +1 -0
- package/dist/native/components/searchable-tabs.d.ts +20 -0
- package/dist/native/components/searchable-tabs.d.ts.map +1 -0
- package/dist/native/components/searchable-tabs.js +413 -0
- package/dist/native/components/searchable-tabs.js.map +1 -0
- package/dist/native/definitions.d.ts +237 -0
- package/dist/native/definitions.d.ts.map +1 -0
- package/dist/native/definitions.js +0 -0
- package/dist/native/extensions.d.ts +31 -0
- package/dist/native/extensions.d.ts.map +1 -0
- package/dist/native/extensions.js +122 -0
- package/dist/native/extensions.js.map +1 -0
- 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 +15 -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/html.d.ts +9 -0
- package/dist/native/html.d.ts.map +1 -0
- package/dist/native/html.js +197 -0
- package/dist/native/html.js.map +1 -0
- package/dist/native/index.d.ts +10 -0
- package/dist/native/index.d.ts.map +1 -0
- package/dist/native/index.js +19 -0
- package/dist/native/index.js.map +1 -0
- package/dist/native/legacy-layout.d.ts +5 -0
- package/dist/native/legacy-layout.d.ts.map +1 -0
- package/dist/native/legacy-layout.js +27 -0
- package/dist/native/legacy-layout.js.map +1 -0
- package/dist/native/overlays/content.d.ts +4 -0
- package/dist/native/overlays/content.d.ts.map +1 -0
- package/dist/native/overlays/content.js +51 -0
- package/dist/native/overlays/content.js.map +1 -0
- package/dist/native/overlays/controller.d.ts +8 -0
- package/dist/native/overlays/controller.d.ts.map +1 -0
- package/dist/native/overlays/controller.js +285 -0
- package/dist/native/overlays/controller.js.map +1 -0
- package/dist/native/overlays/dialog-animation.d.ts +9 -0
- package/dist/native/overlays/dialog-animation.d.ts.map +1 -0
- package/dist/native/overlays/dialog-animation.js +53 -0
- package/dist/native/overlays/dialog-animation.js.map +1 -0
- package/dist/native/overlays/dismiss-animation.d.ts +4 -0
- package/dist/native/overlays/dismiss-animation.d.ts.map +1 -0
- package/dist/native/overlays/dismiss-animation.js +18 -0
- package/dist/native/overlays/dismiss-animation.js.map +1 -0
- package/dist/native/overlays/focus.d.ts +5 -0
- package/dist/native/overlays/focus.d.ts.map +1 -0
- package/dist/native/overlays/focus.js +59 -0
- package/dist/native/overlays/focus.js.map +1 -0
- package/dist/native/overlays/popover.d.ts +12 -0
- package/dist/native/overlays/popover.d.ts.map +1 -0
- package/dist/native/overlays/popover.js +110 -0
- package/dist/native/overlays/popover.js.map +1 -0
- package/dist/native/overlays/styles.d.ts +11 -0
- package/dist/native/overlays/styles.d.ts.map +1 -0
- package/dist/native/overlays/styles.js +167 -0
- package/dist/native/overlays/styles.js.map +1 -0
- package/dist/native/prehide.d.ts +8 -0
- package/dist/native/prehide.d.ts.map +1 -0
- package/dist/native/prehide.js +238 -0
- package/dist/native/prehide.js.map +1 -0
- package/dist/native/runtime.d.ts +7 -0
- package/dist/native/runtime.d.ts.map +1 -0
- package/dist/native/runtime.js +776 -0
- package/dist/native/runtime.js.map +1 -0
- package/dist/native/shared/bridge.d.ts +6 -0
- package/dist/native/shared/bridge.d.ts.map +1 -0
- package/dist/native/shared/bridge.js +18 -0
- package/dist/native/shared/bridge.js.map +1 -0
- package/dist/native/shared/candidate.d.ts +25 -0
- package/dist/native/shared/candidate.d.ts.map +1 -0
- package/dist/native/shared/candidate.js +106 -0
- package/dist/native/shared/candidate.js.map +1 -0
- package/dist/native/shared/clipping.d.ts +5 -0
- package/dist/native/shared/clipping.d.ts.map +1 -0
- package/dist/native/shared/clipping.js +26 -0
- package/dist/native/shared/clipping.js.map +1 -0
- package/dist/native/shared/control-options.d.ts +6 -0
- package/dist/native/shared/control-options.d.ts.map +1 -0
- package/dist/native/shared/control-options.js +17 -0
- package/dist/native/shared/control-options.js.map +1 -0
- package/dist/native/shared/crossfade.d.ts +12 -0
- package/dist/native/shared/crossfade.d.ts.map +1 -0
- package/dist/native/shared/crossfade.js +67 -0
- package/dist/native/shared/crossfade.js.map +1 -0
- package/dist/native/shared/diagnostics.d.ts +4 -0
- package/dist/native/shared/diagnostics.d.ts.map +1 -0
- package/dist/native/shared/diagnostics.js +18 -0
- package/dist/native/shared/diagnostics.js.map +1 -0
- package/dist/native/shared/dom.d.ts +46 -0
- package/dist/native/shared/dom.d.ts.map +1 -0
- package/dist/native/shared/dom.js +180 -0
- package/dist/native/shared/dom.js.map +1 -0
- package/dist/native/shared/events.d.ts +15 -0
- package/dist/native/shared/events.d.ts.map +1 -0
- package/dist/native/shared/events.js +17 -0
- package/dist/native/shared/events.js.map +1 -0
- package/dist/native/shared/icons.d.ts +8 -0
- package/dist/native/shared/icons.d.ts.map +1 -0
- package/dist/native/shared/icons.js +61 -0
- package/dist/native/shared/icons.js.map +1 -0
- package/dist/native/shared/modal.d.ts +10 -0
- package/dist/native/shared/modal.d.ts.map +1 -0
- package/dist/native/shared/modal.js +160 -0
- package/dist/native/shared/modal.js.map +1 -0
- package/dist/native/shared/projection-id.d.ts +4 -0
- package/dist/native/shared/projection-id.d.ts.map +1 -0
- package/dist/native/shared/projection-id.js +7 -0
- package/dist/native/shared/projection-id.js.map +1 -0
- package/dist/native/shared/toolbar-options.d.ts +13 -0
- package/dist/native/shared/toolbar-options.d.ts.map +1 -0
- package/dist/native/shared/toolbar-options.js +28 -0
- package/dist/native/shared/toolbar-options.js.map +1 -0
- package/dist/native/shared/vertical-bars-geometry.d.ts +10 -0
- package/dist/native/shared/vertical-bars-geometry.d.ts.map +1 -0
- package/dist/native/shared/vertical-bars-geometry.js +85 -0
- package/dist/native/shared/vertical-bars-geometry.js.map +1 -0
- package/dist/native/startup.d.ts +8 -0
- package/dist/native/startup.d.ts.map +1 -0
- package/dist/native/startup.js +70 -0
- package/dist/native/startup.js.map +1 -0
- package/dist/native/vertical-bars-web-search.d.ts +10 -0
- package/dist/native/vertical-bars-web-search.d.ts.map +1 -0
- package/dist/native/vertical-bars-web-search.js +90 -0
- package/dist/native/vertical-bars-web-search.js.map +1 -0
- package/dist/native/vertical-bars-web.d.ts +5 -0
- package/dist/native/vertical-bars-web.d.ts.map +1 -0
- package/dist/native/vertical-bars-web.js +422 -0
- package/dist/native/vertical-bars-web.js.map +1 -0
- package/dist/native-integration/index.d.ts +25 -0
- package/dist/native-integration/index.d.ts.map +1 -0
- package/dist/native-integration/index.js +33 -0
- package/dist/native-integration/index.js.map +1 -0
- package/dist/vertical-bars.d.ts +6 -0
- package/dist/vertical-bars.js +5 -0
- package/docs/appearance.md +45 -0
- package/docs/configuration.md +219 -0
- package/docs/framework-independent.md +107 -0
- package/docs/ionic-vertical-bars.md +173 -0
- package/docs/migration.md +184 -0
- package/docs/native-ui-extensions.md +394 -0
- package/docs/native-ui.md +528 -0
- package/docs/setup.md +224 -0
- package/docs/vertical-bars.md +431 -0
- package/ios/Sources/NativeUIPlugin/Components/NativeUIButton.swift +71 -0
- package/ios/Sources/NativeUIPlugin/Components/NativeUIButtons.swift +24 -0
- package/ios/Sources/NativeUIPlugin/Components/NativeUIComponents.swift +19 -0
- package/ios/Sources/NativeUIPlugin/Components/NativeUIFab.swift +80 -0
- package/ios/Sources/NativeUIPlugin/Components/NativeUISearchController.swift +439 -0
- package/ios/Sources/NativeUIPlugin/Components/NativeUISegment.swift +91 -0
- package/ios/Sources/NativeUIPlugin/Components/NativeUITabBar.swift +218 -0
- package/ios/Sources/NativeUIPlugin/Components/NativeUIVerticalBars.swift +590 -0
- package/ios/Sources/NativeUIPlugin/Components/NativeUIVerticalSearch.swift +118 -0
- package/ios/Sources/NativeUIPlugin/Extensions/NativeUI.swift +178 -0
- package/ios/Sources/NativeUIPlugin/Extensions/NativeUIRendering.swift +38 -0
- package/ios/Sources/NativeUIPlugin/NativeUIPlugin.swift +615 -0
- package/ios/Sources/NativeUIPlugin/Overlays/NativeUIOverlayController.swift +119 -0
- package/ios/Sources/NativeUIPlugin/Overlays/NativeUIOverlayHost.swift +75 -0
- package/ios/Sources/NativeUIPlugin/Shared/NativeUIControlRendering.swift +21 -0
- package/ios/Sources/NativeUIPlugin/Shared/NativeUICrossfade.swift +35 -0
- package/ios/Sources/NativeUIPlugin/Shared/NativeUIHost.swift +8 -0
- package/ios/Sources/NativeUIPlugin/Shared/NativeUISnapshot.swift +161 -0
- package/ios/Sources/NativeUIPlugin/Shared/NativeUIVerticalBarsGeometry.swift +52 -0
- package/ios/Tests/NativeUIPluginTests/NativeUIExtensionTests.swift +165 -0
- package/ios/Tests/NativeUIPluginTests/NativeUISnapshotTests.swift +805 -0
- package/package.json +89 -4
- package/src/core.ts +14 -0
- package/src/native/activation.ts +385 -0
- package/src/native/components/index.ts +45 -0
- package/src/native/components/ion-back-button.ts +22 -0
- package/src/native/components/ion-button.ts +25 -0
- package/src/native/components/ion-buttons.ts +37 -0
- package/src/native/components/ion-fab.ts +151 -0
- package/src/native/components/ion-menu-button.ts +37 -0
- package/src/native/components/ion-segment.ts +27 -0
- package/src/native/components/ion-tab-bar.ts +50 -0
- package/src/native/components/searchable-tabs.ts +499 -0
- package/src/native/definitions.ts +274 -0
- package/src/native/extensions.ts +176 -0
- package/src/native/foldable/fold-state.ts +10 -0
- package/src/native/foldable/types.ts +4 -0
- package/src/native/html.ts +199 -0
- package/src/native/index.ts +32 -0
- package/src/native/legacy-layout.ts +21 -0
- package/src/native/overlays/content.ts +51 -0
- package/src/native/overlays/controller.ts +349 -0
- package/src/native/overlays/dialog-animation.ts +53 -0
- package/src/native/overlays/dismiss-animation.ts +15 -0
- package/src/native/overlays/focus.ts +64 -0
- package/src/native/overlays/popover.ts +120 -0
- package/src/native/overlays/styles.ts +181 -0
- package/src/native/prehide.ts +285 -0
- package/src/native/runtime.ts +979 -0
- package/src/native/shared/bridge.ts +18 -0
- package/src/native/shared/candidate.ts +162 -0
- package/src/native/shared/clipping.ts +24 -0
- package/src/native/shared/control-options.ts +20 -0
- package/src/native/shared/crossfade.ts +67 -0
- package/src/native/shared/diagnostics.ts +13 -0
- package/src/native/shared/dom.ts +304 -0
- package/src/native/shared/events.ts +14 -0
- package/src/native/shared/icons.ts +57 -0
- package/src/native/shared/modal.ts +157 -0
- package/src/native/shared/projection-id.ts +2 -0
- package/src/native/shared/toolbar-options.ts +49 -0
- package/src/native/shared/vertical-bars-geometry.ts +80 -0
- package/src/native/startup.ts +68 -0
- package/src/native/vertical-bars-web-search.ts +86 -0
- package/src/native/vertical-bars-web.ts +500 -0
- package/src/native-integration/index.ts +49 -0
- package/src/vertical-bars.ts +12 -0
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
import { excluded, inFixedToolbar, isNativeUIDisabled, marker, text, visible, withoutPrehide } from "../shared/dom.js";
|
|
2
|
+
import { iconSource } from "../shared/icons.js";
|
|
3
|
+
import { getNativeSearchBindings, requestNativeSearch } from "../../native-integration/index.js";
|
|
4
|
+
//#region src/native/components/searchable-tabs.ts
|
|
5
|
+
const createSearchSupport = (doc, id, schedule) => {
|
|
6
|
+
const states = /* @__PURE__ */ new Map();
|
|
7
|
+
let keyboardVisible = false;
|
|
8
|
+
let heldKeyboardResize = null;
|
|
9
|
+
let keyboardResizeGeneration = 0;
|
|
10
|
+
const keyboardPlugin = () => doc.defaultView?.Capacitor?.Plugins?.Keyboard;
|
|
11
|
+
const projected = (binding) => binding.footer.hasAttribute(marker);
|
|
12
|
+
const holdKeyboardResize = () => {
|
|
13
|
+
const keyboard = keyboardPlugin();
|
|
14
|
+
if (!keyboard?.setResizeMode || heldKeyboardResize !== null) return;
|
|
15
|
+
const setResizeMode = keyboard.setResizeMode.bind(keyboard);
|
|
16
|
+
const generation = ++keyboardResizeGeneration;
|
|
17
|
+
heldKeyboardResize = "native";
|
|
18
|
+
(async () => {
|
|
19
|
+
let restoreMode = "native";
|
|
20
|
+
try {
|
|
21
|
+
const current = await keyboard.getResizeMode?.();
|
|
22
|
+
if (typeof current?.mode === "string") restoreMode = current.mode;
|
|
23
|
+
} catch {}
|
|
24
|
+
if (generation !== keyboardResizeGeneration) return;
|
|
25
|
+
heldKeyboardResize = restoreMode;
|
|
26
|
+
try {
|
|
27
|
+
await setResizeMode({ mode: "none" });
|
|
28
|
+
} catch {
|
|
29
|
+
if (generation === keyboardResizeGeneration) heldKeyboardResize = null;
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (generation !== keyboardResizeGeneration) setResizeMode({ mode: restoreMode }).catch(() => void 0);
|
|
33
|
+
})();
|
|
34
|
+
};
|
|
35
|
+
const hasActiveProjection = () => [...states.keys()].some((binding) => binding.active && projected(binding));
|
|
36
|
+
const releaseKeyboardResize = () => {
|
|
37
|
+
if (hasActiveProjection()) return;
|
|
38
|
+
keyboardResizeGeneration++;
|
|
39
|
+
const mode = heldKeyboardResize;
|
|
40
|
+
heldKeyboardResize = null;
|
|
41
|
+
if (!mode) return;
|
|
42
|
+
keyboardPlugin()?.setResizeMode?.({ mode });
|
|
43
|
+
};
|
|
44
|
+
const isCurrent = (state) => state.bar.isConnected && state.binding.footer.querySelector("ion-searchbar") === state.bar && state.bar.querySelector("input.searchbar-input") === state.input;
|
|
45
|
+
const install = (binding, bar, input) => {
|
|
46
|
+
const originalFocus = bar.setFocus;
|
|
47
|
+
const ownValue = Object.getOwnPropertyDescriptor(bar, "value");
|
|
48
|
+
let owner = bar;
|
|
49
|
+
let value = ownValue;
|
|
50
|
+
while (!value && (owner = Object.getPrototypeOf(owner))) value = Object.getOwnPropertyDescriptor(owner, "value");
|
|
51
|
+
const focus = async () => {
|
|
52
|
+
if (projected(binding) && await requestNativeSearch(binding, true, true)) return;
|
|
53
|
+
await originalFocus.call(bar);
|
|
54
|
+
};
|
|
55
|
+
bar.setFocus = focus;
|
|
56
|
+
let wrapped;
|
|
57
|
+
if (value?.get && value.set && ownValue?.configurable !== false) {
|
|
58
|
+
const descriptor = value;
|
|
59
|
+
wrapped = {
|
|
60
|
+
configurable: true,
|
|
61
|
+
enumerable: value.enumerable,
|
|
62
|
+
get: () => descriptor.get.call(bar),
|
|
63
|
+
set: (next) => {
|
|
64
|
+
if (state.applyingInput) state.applyingInput = false;
|
|
65
|
+
else state.valueVersion++;
|
|
66
|
+
descriptor.set.call(bar, next);
|
|
67
|
+
schedule();
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
Object.defineProperty(bar, "value", wrapped);
|
|
71
|
+
}
|
|
72
|
+
const state = {
|
|
73
|
+
binding,
|
|
74
|
+
bar,
|
|
75
|
+
input,
|
|
76
|
+
editSequence: 0,
|
|
77
|
+
composing: false,
|
|
78
|
+
focused: false,
|
|
79
|
+
minimumRevision: 0,
|
|
80
|
+
valueVersion: 0,
|
|
81
|
+
applyingInput: false,
|
|
82
|
+
restore: () => {
|
|
83
|
+
if (bar.setFocus === focus) bar.setFocus = originalFocus;
|
|
84
|
+
if (wrapped && Object.getOwnPropertyDescriptor(bar, "value")?.set === wrapped.set) {
|
|
85
|
+
if (ownValue) Object.defineProperty(bar, "value", ownValue);
|
|
86
|
+
else Reflect.deleteProperty(bar, "value");
|
|
87
|
+
}
|
|
88
|
+
binding.active = binding.focused = false;
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
states.set(binding, state);
|
|
92
|
+
return state;
|
|
93
|
+
};
|
|
94
|
+
const readIcon = (element, owner, candidate) => {
|
|
95
|
+
const style = getComputedStyle(element);
|
|
96
|
+
const rect = element.getBoundingClientRect();
|
|
97
|
+
const item = {
|
|
98
|
+
id: id(owner),
|
|
99
|
+
x: rect.x,
|
|
100
|
+
y: rect.y,
|
|
101
|
+
width: rect.width,
|
|
102
|
+
height: rect.height,
|
|
103
|
+
label: text(element),
|
|
104
|
+
accessibilityLabel: owner.getAttribute("aria-label") ?? text(element),
|
|
105
|
+
disabled: false,
|
|
106
|
+
selected: false,
|
|
107
|
+
fontSize: parseFloat(style.fontSize),
|
|
108
|
+
fontWeight: parseInt(style.fontWeight, 10) || 400,
|
|
109
|
+
color: style.color
|
|
110
|
+
};
|
|
111
|
+
const icon = element.matches("ion-icon") ? element : element.querySelector("ion-icon");
|
|
112
|
+
const svg = icon?.shadowRoot?.querySelector("svg") ?? element.querySelector("svg");
|
|
113
|
+
if (svg) {
|
|
114
|
+
const source = iconSource(svg);
|
|
115
|
+
if (!source) return;
|
|
116
|
+
const iconStyle = getComputedStyle(icon ?? svg);
|
|
117
|
+
item.iconWidth = parseFloat(iconStyle.width);
|
|
118
|
+
item.iconHeight = parseFloat(iconStyle.height);
|
|
119
|
+
const box = svg.viewBox?.baseVal;
|
|
120
|
+
if (box?.width && box.height && svg.getAttribute("preserveAspectRatio") !== "none") {
|
|
121
|
+
const scale = Math.min(item.iconWidth / box.width, item.iconHeight / box.height);
|
|
122
|
+
item.iconWidth = box.width * scale;
|
|
123
|
+
item.iconHeight = box.height * scale;
|
|
124
|
+
}
|
|
125
|
+
candidate.icons.push({
|
|
126
|
+
item,
|
|
127
|
+
source
|
|
128
|
+
});
|
|
129
|
+
} else if (!item.label) return;
|
|
130
|
+
return item;
|
|
131
|
+
};
|
|
132
|
+
return {
|
|
133
|
+
keyboard(visible) {
|
|
134
|
+
keyboardVisible = visible;
|
|
135
|
+
if (!visible) {
|
|
136
|
+
for (const [binding, state] of states) {
|
|
137
|
+
if (state.keyboardHidden) binding.tabBar.classList.remove("tab-bar-hidden");
|
|
138
|
+
state.keyboardHidden = false;
|
|
139
|
+
}
|
|
140
|
+
releaseKeyboardResize();
|
|
141
|
+
}
|
|
142
|
+
schedule();
|
|
143
|
+
},
|
|
144
|
+
keepSearchTabsVisible() {
|
|
145
|
+
if (!keyboardVisible) return;
|
|
146
|
+
for (const [binding, state] of states) if (binding.active && projected(binding) && binding.tabBar.classList.contains("tab-bar-hidden")) {
|
|
147
|
+
state.keyboardHidden = true;
|
|
148
|
+
binding.tabBar.classList.remove("tab-bar-hidden");
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
decorate(candidates, blocked) {
|
|
152
|
+
var _candidate$control;
|
|
153
|
+
const bindings = getNativeSearchBindings(doc);
|
|
154
|
+
for (const [binding, state] of states) if (!bindings.includes(binding) || !isCurrent(state)) {
|
|
155
|
+
this.retire(binding);
|
|
156
|
+
state.restore();
|
|
157
|
+
states.delete(binding);
|
|
158
|
+
}
|
|
159
|
+
const inactive = [];
|
|
160
|
+
const pageHidden = (element) => !!element.closest(".ion-page-hidden, .ion-page-invisible");
|
|
161
|
+
const retainInactive = (candidate, state, keepAvailable = false) => {
|
|
162
|
+
if (state?.last) inactive.push([candidate, {
|
|
163
|
+
...state.last,
|
|
164
|
+
active: false,
|
|
165
|
+
available: keepAvailable,
|
|
166
|
+
focused: false
|
|
167
|
+
}]);
|
|
168
|
+
};
|
|
169
|
+
for (const binding of bindings) {
|
|
170
|
+
const candidate = candidates.find((c) => c.element === binding.tabBar);
|
|
171
|
+
if (!candidate || candidate.control.search || binding.tabBar.getAttribute("slot") !== "bottom") continue;
|
|
172
|
+
const fab = binding.trigger.parentElement;
|
|
173
|
+
if (!fab?.matches("ion-fab[slot=\"fixed\"]") || !(fab.parentElement?.matches("ion-content") || fab.parentElement?.matches(".ion-page") && !fab.closest("ion-content"))) continue;
|
|
174
|
+
if (isNativeUIDisabled(fab) || isNativeUIDisabled(binding.footer)) continue;
|
|
175
|
+
const pageUnavailable = blocked(binding.footer) || !!binding.footer.closest(excluded);
|
|
176
|
+
const existing = states.get(binding);
|
|
177
|
+
if (pageUnavailable) {
|
|
178
|
+
retainInactive(candidate, existing, !!existing?.last?.available && !pageHidden(binding.footer));
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
if (binding.active && existing && isCurrent(existing) && existing.last && !pageUnavailable) {
|
|
182
|
+
const back = binding.footer.querySelector("ion-buttons[slot=start] ion-button");
|
|
183
|
+
if (back && !back.disabled && !back.closest(excluded) && !existing.bar.closest(excluded)) {
|
|
184
|
+
candidate.control.search = {
|
|
185
|
+
...existing.last,
|
|
186
|
+
active: true,
|
|
187
|
+
available: true,
|
|
188
|
+
focused: binding.focused,
|
|
189
|
+
value: existing.bar.value ?? "",
|
|
190
|
+
placeholder: existing.bar.placeholder ?? "",
|
|
191
|
+
disabled: existing.bar.disabled,
|
|
192
|
+
editSequence: existing.editSequence,
|
|
193
|
+
valueVersion: existing.valueVersion
|
|
194
|
+
};
|
|
195
|
+
existing.last = candidate.control.search;
|
|
196
|
+
candidate.sources = [
|
|
197
|
+
binding.tabBar,
|
|
198
|
+
binding.trigger.closest("ion-fab") ?? binding.trigger,
|
|
199
|
+
binding.footer
|
|
200
|
+
];
|
|
201
|
+
candidate.actions.set(existing.last.trigger.id, binding.trigger);
|
|
202
|
+
candidate.actions.set(existing.last.closeId, back);
|
|
203
|
+
continue;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
if (!visible(binding.trigger) && !pageUnavailable) {
|
|
207
|
+
retainInactive(candidate, existing);
|
|
208
|
+
continue;
|
|
209
|
+
}
|
|
210
|
+
const bar = binding.footer.querySelector("ion-searchbar");
|
|
211
|
+
const input = bar?.querySelector("input.searchbar-input");
|
|
212
|
+
const back = binding.footer.querySelector("ion-buttons[slot=start] ion-button");
|
|
213
|
+
if (!bar || !input || !back || !binding.footer.matches("ion-footer") || !inFixedToolbar(bar) || !inFixedToolbar(back) || !pageUnavailable && bar.closest(excluded) || !bar.classList.contains("ios") || bar.classList.contains("searchbar-classic")) {
|
|
214
|
+
retainInactive(candidate, existing);
|
|
215
|
+
continue;
|
|
216
|
+
}
|
|
217
|
+
if (bar.color || back.fill !== "default" || back.color || bar.maxlength != null || bar.minlength != null || bar.inputmode || bar.enterkeyhint || !["off", "none"].includes(bar.autocapitalize) || bar.autocomplete !== "off" || ![
|
|
218
|
+
false,
|
|
219
|
+
"off",
|
|
220
|
+
void 0
|
|
221
|
+
].includes(bar.autocorrect) || bar.spellcheck || bar.showClearButton !== "always" || bar.clearIcon) {
|
|
222
|
+
retainInactive(candidate, existing);
|
|
223
|
+
continue;
|
|
224
|
+
}
|
|
225
|
+
if (bar.showCancelButton !== "never" || bar.type !== "search" || !getComputedStyle(input).backdropFilter.includes("blur")) {
|
|
226
|
+
retainInactive(candidate, existing);
|
|
227
|
+
continue;
|
|
228
|
+
}
|
|
229
|
+
const fabButton = binding.trigger;
|
|
230
|
+
const nativeTrigger = fabButton.shadowRoot?.querySelector("[part=native]");
|
|
231
|
+
if (!pageUnavailable && binding.trigger.closest(excluded) || !pageUnavailable && back.closest(excluded) || back.disabled || fabButton.disabled || fabButton.color || fabButton.type !== "button" || fabButton.href || !nativeTrigger || getComputedStyle(fabButton).backgroundColor !== "rgba(0, 0, 0, 0)" || !getComputedStyle(nativeTrigger).backdropFilter.includes("blur")) {
|
|
232
|
+
retainInactive(candidate, existing);
|
|
233
|
+
continue;
|
|
234
|
+
}
|
|
235
|
+
const triggerRect = binding.trigger.getBoundingClientRect();
|
|
236
|
+
if (![
|
|
237
|
+
triggerRect.x,
|
|
238
|
+
triggerRect.y,
|
|
239
|
+
triggerRect.width,
|
|
240
|
+
triggerRect.height
|
|
241
|
+
].every(Number.isFinite) || triggerRect.width <= 0 || triggerRect.height <= 0) {
|
|
242
|
+
retainInactive(candidate, existing);
|
|
243
|
+
continue;
|
|
244
|
+
}
|
|
245
|
+
const state = existing ?? install(binding, bar, input);
|
|
246
|
+
const trigger = readIcon(binding.trigger, binding.trigger, candidate);
|
|
247
|
+
const searchIcon = bar.querySelector(".searchbar-search-icon");
|
|
248
|
+
const field = searchIcon && readIcon(searchIcon, bar, candidate);
|
|
249
|
+
if (!trigger || !field) {
|
|
250
|
+
retainInactive(candidate, state);
|
|
251
|
+
continue;
|
|
252
|
+
}
|
|
253
|
+
field.label = "";
|
|
254
|
+
field.accessibilityLabel = bar.getAttribute("aria-label") ?? input.getAttribute("aria-label") ?? "Search";
|
|
255
|
+
if (!trigger.accessibilityLabel) trigger.accessibilityLabel = field.accessibilityLabel;
|
|
256
|
+
state.layout = JSON.stringify([
|
|
257
|
+
innerWidth,
|
|
258
|
+
innerHeight,
|
|
259
|
+
candidate.control.x,
|
|
260
|
+
candidate.control.y,
|
|
261
|
+
candidate.control.width,
|
|
262
|
+
candidate.control.height,
|
|
263
|
+
candidate.control.rtl,
|
|
264
|
+
trigger.x,
|
|
265
|
+
trigger.y,
|
|
266
|
+
trigger.width,
|
|
267
|
+
trigger.height,
|
|
268
|
+
candidate.control.items,
|
|
269
|
+
candidate.icons.map(({ source }) => source),
|
|
270
|
+
field,
|
|
271
|
+
trigger,
|
|
272
|
+
bar.placeholder,
|
|
273
|
+
bar.disabled
|
|
274
|
+
]);
|
|
275
|
+
if (state.rejectedLayout === state.layout) {
|
|
276
|
+
retainInactive(candidate, state);
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
const available = !pageUnavailable && visible(binding.trigger);
|
|
280
|
+
candidate.control.search = {
|
|
281
|
+
id: id(input),
|
|
282
|
+
field,
|
|
283
|
+
trigger,
|
|
284
|
+
closeId: id(back),
|
|
285
|
+
active: available && binding.active,
|
|
286
|
+
available,
|
|
287
|
+
focused: available && binding.focused,
|
|
288
|
+
value: bar.value ?? "",
|
|
289
|
+
placeholder: bar.placeholder ?? "",
|
|
290
|
+
disabled: bar.disabled,
|
|
291
|
+
editSequence: state.editSequence,
|
|
292
|
+
valueVersion: state.valueVersion
|
|
293
|
+
};
|
|
294
|
+
state.last = candidate.control.search;
|
|
295
|
+
if (available) {
|
|
296
|
+
candidate.sources = [
|
|
297
|
+
binding.tabBar,
|
|
298
|
+
binding.trigger.closest("ion-fab") ?? binding.trigger,
|
|
299
|
+
binding.footer
|
|
300
|
+
];
|
|
301
|
+
candidate.actions.set(id(binding.trigger), binding.trigger);
|
|
302
|
+
candidate.actions.set(id(back), back);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
for (const [candidate, configuration] of inactive) (_candidate$control = candidate.control).search ?? (_candidate$control.search = configuration);
|
|
306
|
+
const projectedCandidates = candidates.filter((candidate) => candidate.control.search?.available || !bindings.some((binding) => {
|
|
307
|
+
if (binding.tabBar !== candidate.element) return false;
|
|
308
|
+
const trigger = withoutPrehide(binding.trigger, () => {
|
|
309
|
+
if (!binding.trigger.isConnected || binding.trigger.closest(".ion-page-hidden, .ion-page-invisible, [hidden], [inert]")) return;
|
|
310
|
+
for (let element = binding.trigger; element; element = element.parentElement) {
|
|
311
|
+
const style = getComputedStyle(element);
|
|
312
|
+
if (style.display === "none" || style.visibility !== "visible" || Number(style.opacity) === 0) return;
|
|
313
|
+
}
|
|
314
|
+
const rect = binding.trigger.getBoundingClientRect();
|
|
315
|
+
if ([
|
|
316
|
+
rect.x,
|
|
317
|
+
rect.y,
|
|
318
|
+
rect.width,
|
|
319
|
+
rect.height
|
|
320
|
+
].every(Number.isFinite) && rect.width > 0 && rect.height > 0) return rect;
|
|
321
|
+
});
|
|
322
|
+
if (!trigger) return false;
|
|
323
|
+
const tabs = candidate.control;
|
|
324
|
+
return tabs.x < trigger.right && tabs.x + tabs.width > trigger.left && tabs.y < trigger.bottom && tabs.y + tabs.height > trigger.top;
|
|
325
|
+
}));
|
|
326
|
+
const groups = projectedCandidates.filter((c) => c.control.search);
|
|
327
|
+
return projectedCandidates.filter((c) => !groups.some((group) => group !== c && group.sources?.some((source) => source.contains(c.element))));
|
|
328
|
+
},
|
|
329
|
+
projected,
|
|
330
|
+
hasActive() {
|
|
331
|
+
for (const [binding] of states) if (binding.active && projected(binding)) return true;
|
|
332
|
+
return false;
|
|
333
|
+
},
|
|
334
|
+
begin(binding, revision) {
|
|
335
|
+
const state = states.get(binding);
|
|
336
|
+
if (state) state.minimumRevision = revision;
|
|
337
|
+
},
|
|
338
|
+
/** Enter / focus / leave. `focused` is ignored when leaving. */
|
|
339
|
+
setStatus(binding, active, focused = false) {
|
|
340
|
+
if (!active) {
|
|
341
|
+
this.retire(binding);
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
binding.active = true;
|
|
345
|
+
binding.focused = focused;
|
|
346
|
+
holdKeyboardResize();
|
|
347
|
+
},
|
|
348
|
+
release(element) {
|
|
349
|
+
for (const binding of states.keys()) if (binding.footer === element) this.retire(binding);
|
|
350
|
+
},
|
|
351
|
+
reject(ids) {
|
|
352
|
+
states.forEach((state) => {
|
|
353
|
+
if (ids.includes(id(state.binding.tabBar))) {
|
|
354
|
+
state.rejectedLayout = state.layout;
|
|
355
|
+
state.last = void 0;
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
},
|
|
359
|
+
event(event) {
|
|
360
|
+
const state = Array.from(states.values()).find((s) => id(s.input) === event.id && projected(s.binding) && isCurrent(s));
|
|
361
|
+
if (!state || !state.binding.active || (event.phase === "input" || event.phase === "clear") && event.valueVersion !== state.valueVersion || event.revision < state.minimumRevision || event.sequence <= state.editSequence || state.bar.disabled) return;
|
|
362
|
+
state.editSequence = event.sequence;
|
|
363
|
+
const { input, binding } = state;
|
|
364
|
+
if (event.phase === "input") {
|
|
365
|
+
if (state.composing !== event.composing) input.dispatchEvent(new CompositionEvent(event.composing ? "compositionstart" : "compositionend", {
|
|
366
|
+
bubbles: true,
|
|
367
|
+
data: event.value
|
|
368
|
+
}));
|
|
369
|
+
state.composing = event.composing;
|
|
370
|
+
input.value = event.value;
|
|
371
|
+
state.applyingInput = true;
|
|
372
|
+
try {
|
|
373
|
+
input.dispatchEvent(new InputEvent("input", {
|
|
374
|
+
bubbles: true,
|
|
375
|
+
composed: true,
|
|
376
|
+
isComposing: event.composing
|
|
377
|
+
}));
|
|
378
|
+
} finally {
|
|
379
|
+
state.applyingInput = false;
|
|
380
|
+
}
|
|
381
|
+
} else if (event.phase === "clear") state.bar.querySelector(".searchbar-clear-button")?.click();
|
|
382
|
+
else if (event.phase === "commit") input.dispatchEvent(new Event("change", { bubbles: true }));
|
|
383
|
+
else {
|
|
384
|
+
if (state.focused === (event.phase === "focus")) return;
|
|
385
|
+
state.focused = binding.focused = event.phase === "focus";
|
|
386
|
+
input.dispatchEvent(new FocusEvent(event.phase, { composed: true }));
|
|
387
|
+
}
|
|
388
|
+
schedule();
|
|
389
|
+
},
|
|
390
|
+
retire(binding) {
|
|
391
|
+
const state = states.get(binding);
|
|
392
|
+
if (state?.keyboardHidden && keyboardVisible) binding.tabBar.classList.add("tab-bar-hidden");
|
|
393
|
+
if (state?.focused) {
|
|
394
|
+
state.focused = false;
|
|
395
|
+
state.input.dispatchEvent(new FocusEvent("blur"));
|
|
396
|
+
}
|
|
397
|
+
binding.active = binding.focused = false;
|
|
398
|
+
releaseKeyboardResize();
|
|
399
|
+
},
|
|
400
|
+
destroy() {
|
|
401
|
+
states.forEach((state) => {
|
|
402
|
+
this.retire(state.binding);
|
|
403
|
+
state.restore();
|
|
404
|
+
});
|
|
405
|
+
states.clear();
|
|
406
|
+
releaseKeyboardResize();
|
|
407
|
+
}
|
|
408
|
+
};
|
|
409
|
+
};
|
|
410
|
+
//#endregion
|
|
411
|
+
export { createSearchSupport };
|
|
412
|
+
|
|
413
|
+
//# sourceMappingURL=searchable-tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searchable-tabs.js","names":[],"sources":["../../../src/native/components/searchable-tabs.ts"],"sourcesContent":["import { getNativeSearchBindings, requestNativeSearch } from '../../native-integration';\nimport type { NativeSearchBinding } from '../../native-integration';\nimport { excluded, inFixedToolbar, isNativeUIDisabled, marker, text, visible, withoutPrehide } from '../shared/dom';\nimport { iconSource } from '../shared/icons';\nimport type { Candidate } from '../shared/candidate';\nimport type { NativeUIItem, NativeUISearch, NativeUISearchEvent } from '../definitions';\n\ninterface SearchState {\n binding: NativeSearchBinding;\n bar: HTMLIonSearchbarElement;\n input: HTMLInputElement;\n editSequence: number;\n composing: boolean;\n focused: boolean;\n minimumRevision: number;\n valueVersion: number;\n applyingInput: boolean;\n keyboardHidden?: boolean;\n last?: NativeUISearch;\n layout?: string;\n rejectedLayout?: string;\n restore: () => void;\n}\n\nexport const createSearchSupport = (doc: Document, id: (element: Element) => string, schedule: () => void) => {\n const states = new Map<NativeSearchBinding, SearchState>();\n let keyboardVisible = false;\n let heldKeyboardResize: string | null = null;\n let keyboardResizeGeneration = 0;\n type KeyboardPlugin = {\n setResizeMode?: (options: { mode: string }) => Promise<void>;\n getResizeMode?: () => Promise<{ mode?: string }>;\n };\n const keyboardPlugin = (): KeyboardPlugin | undefined =>\n (\n doc.defaultView as Window & {\n Capacitor?: { Plugins?: { Keyboard?: KeyboardPlugin } };\n }\n )?.Capacitor?.Plugins?.Keyboard;\n const projected = (binding: NativeSearchBinding) => binding.footer.hasAttribute(marker);\n // Hold Cap resize at none while search is active so WebView shrink does not fight UISearchTab.\n const holdKeyboardResize = () => {\n const keyboard = keyboardPlugin();\n if (!keyboard?.setResizeMode || heldKeyboardResize !== null) return;\n const setResizeMode = keyboard.setResizeMode.bind(keyboard);\n const generation = ++keyboardResizeGeneration;\n heldKeyboardResize = 'native';\n void (async () => {\n let restoreMode = 'native';\n try {\n const current = await keyboard.getResizeMode?.();\n if (typeof current?.mode === 'string') restoreMode = current.mode;\n } catch {\n /* keep default restore target */\n }\n if (generation !== keyboardResizeGeneration) return;\n heldKeyboardResize = restoreMode;\n try {\n await setResizeMode({ mode: 'none' });\n } catch {\n if (generation === keyboardResizeGeneration) heldKeyboardResize = null;\n return;\n }\n // Leave raced ahead of setResizeMode(none) — undo the stale none apply.\n if (generation !== keyboardResizeGeneration) void setResizeMode({ mode: restoreMode }).catch(() => undefined);\n })();\n };\n const hasActiveProjection = () => [...states.keys()].some((binding) => binding.active && projected(binding));\n const releaseKeyboardResize = () => {\n if (hasActiveProjection()) return;\n keyboardResizeGeneration++;\n const mode = heldKeyboardResize;\n heldKeyboardResize = null;\n if (!mode) return;\n void keyboardPlugin()?.setResizeMode?.({ mode });\n };\n const isCurrent = (state: SearchState) =>\n state.bar.isConnected &&\n state.binding.footer.querySelector('ion-searchbar') === state.bar &&\n state.bar.querySelector('input.searchbar-input') === state.input;\n const install = (binding: NativeSearchBinding, bar: HTMLIonSearchbarElement, input: HTMLInputElement): SearchState => {\n const originalFocus = bar.setFocus;\n const ownValue = Object.getOwnPropertyDescriptor(bar, 'value');\n let owner: object | null = bar;\n let value = ownValue;\n while (!value && (owner = Object.getPrototypeOf(owner))) value = Object.getOwnPropertyDescriptor(owner, 'value');\n const focus = async () => {\n if (projected(binding) && (await requestNativeSearch(binding, true, true))) return;\n await originalFocus.call(bar);\n };\n bar.setFocus = focus;\n let wrapped: PropertyDescriptor | undefined;\n if (value?.get && value.set && ownValue?.configurable !== false) {\n const descriptor = value;\n wrapped = {\n configurable: true,\n enumerable: value.enumerable,\n get: () => descriptor.get!.call(bar),\n set: (next: string | null | undefined) => {\n if (state.applyingInput) state.applyingInput = false;\n else state.valueVersion++;\n descriptor.set!.call(bar, next);\n schedule();\n },\n };\n Object.defineProperty(bar, 'value', wrapped);\n }\n const state: SearchState = {\n binding,\n bar,\n input,\n editSequence: 0,\n composing: false,\n focused: false,\n minimumRevision: 0,\n valueVersion: 0,\n applyingInput: false,\n restore: () => {\n if (bar.setFocus === focus) bar.setFocus = originalFocus;\n if (wrapped && Object.getOwnPropertyDescriptor(bar, 'value')?.set === wrapped.set) {\n if (ownValue) Object.defineProperty(bar, 'value', ownValue);\n else Reflect.deleteProperty(bar, 'value');\n }\n binding.active = binding.focused = false;\n },\n };\n states.set(binding, state);\n return state;\n };\n const readIcon = (element: HTMLElement, owner: Element, candidate: Candidate): NativeUIItem | undefined => {\n const style = getComputedStyle(element);\n const rect = element.getBoundingClientRect();\n const item: NativeUIItem = {\n id: id(owner),\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height,\n label: text(element),\n accessibilityLabel: owner.getAttribute('aria-label') ?? text(element),\n disabled: false,\n selected: false,\n fontSize: parseFloat(style.fontSize),\n fontWeight: parseInt(style.fontWeight, 10) || 400,\n color: style.color,\n };\n const icon = element.matches('ion-icon') ? element : element.querySelector('ion-icon');\n const svg = icon?.shadowRoot?.querySelector<SVGElement>('svg') ?? element.querySelector<SVGElement>('svg');\n if (svg) {\n const source = iconSource(svg);\n if (!source) return;\n const iconStyle = getComputedStyle(icon ?? svg);\n item.iconWidth = parseFloat(iconStyle.width);\n item.iconHeight = parseFloat(iconStyle.height);\n // ion-searchbar gives its icon a full-height box; SVG meet sizing keeps the glyph square.\n const box = (svg as SVGSVGElement).viewBox?.baseVal;\n if (box?.width && box.height && svg.getAttribute('preserveAspectRatio') !== 'none') {\n const scale = Math.min(item.iconWidth! / box.width, item.iconHeight / box.height);\n item.iconWidth = box.width * scale;\n item.iconHeight = box.height * scale;\n }\n candidate.icons.push({ item, source });\n } else if (!item.label) return;\n return item;\n };\n return {\n keyboard(visible: boolean) {\n keyboardVisible = visible;\n if (!visible) {\n for (const [binding, state] of states) {\n // Ionic can wait for the pre-keyboard height indefinitely after rotation.\n // Release the visibility override we own when native search's keyboard closes.\n if (state.keyboardHidden) binding.tabBar.classList.remove('tab-bar-hidden');\n state.keyboardHidden = false;\n }\n releaseKeyboardResize();\n }\n schedule();\n },\n keepSearchTabsVisible() {\n if (!keyboardVisible) return;\n for (const [binding, state] of states) {\n // Ionic hides bottom tabs for every keyboard, including native search.\n // Correct only that framework class; application styles still apply.\n if (binding.active && projected(binding) && binding.tabBar.classList.contains('tab-bar-hidden')) {\n state.keyboardHidden = true;\n binding.tabBar.classList.remove('tab-bar-hidden');\n }\n }\n },\n decorate(candidates: Candidate[], blocked: (element: HTMLElement) => boolean): Candidate[] {\n const bindings = getNativeSearchBindings(doc);\n for (const [binding, state] of states) {\n if (!bindings.includes(binding) || !isCurrent(state)) {\n this.retire(binding);\n state.restore();\n states.delete(binding);\n }\n }\n const inactive: [Candidate, NativeUISearch][] = [];\n const pageHidden = (element: HTMLElement) => !!element.closest('.ion-page-hidden, .ion-page-invisible');\n const retainInactive = (candidate: Candidate, state?: SearchState, keepAvailable = false) => {\n // Keep NativeUISearchController across page transitions instead of demoting to UITabBar.\n // While the searchable page is only blocked mid-transition (not yet hidden), keep\n // available:true so the system search button stays available over album content.\n if (state?.last) inactive.push([candidate, { ...state.last, active: false, available: keepAvailable, focused: false }]);\n };\n for (const binding of bindings) {\n const candidate = candidates.find((c) => c.element === binding.tabBar);\n if (!candidate || candidate.control.search || binding.tabBar.getAttribute('slot') !== 'bottom') continue;\n const fab = binding.trigger.parentElement;\n // Search also supports the existing page-level fixed FAB, outside scrolling content.\n if (\n !fab?.matches('ion-fab[slot=\"fixed\"]') ||\n !(fab.parentElement?.matches('ion-content') || (fab.parentElement?.matches('.ion-page') && !fab.closest('ion-content')))\n )\n continue;\n if (isNativeUIDisabled(fab) || isNativeUIDisabled(binding.footer)) continue;\n const pageUnavailable = blocked(binding.footer) || !!binding.footer.closest(excluded);\n const existing = states.get(binding);\n if (pageUnavailable) {\n retainInactive(candidate, existing, !!existing?.last?.available && !pageHidden(binding.footer));\n // A first registration on a cached/hidden page has no measurable trigger.\n // Keep ordinary tabs until the page becomes available; only reuse a previous valid search.\n continue;\n }\n if (binding.active && existing && isCurrent(existing) && existing.last && !pageUnavailable) {\n const back = binding.footer.querySelector<HTMLIonButtonElement>('ion-buttons[slot=start] ion-button');\n // Close must stay eligible; otherwise fall through and demote instead of caching active.\n if (back && !back.disabled && !back.closest(excluded) && !existing.bar.closest(excluded)) {\n candidate.control.search = {\n ...existing.last,\n active: true,\n available: true,\n focused: binding.focused,\n value: existing.bar.value ?? '',\n placeholder: existing.bar.placeholder ?? '',\n disabled: existing.bar.disabled,\n editSequence: existing.editSequence,\n valueVersion: existing.valueVersion,\n };\n existing.last = candidate.control.search;\n candidate.sources = [binding.tabBar, binding.trigger.closest<HTMLElement>('ion-fab') ?? binding.trigger, binding.footer];\n candidate.actions.set(existing.last.trigger.id, binding.trigger);\n candidate.actions.set(existing.last.closeId, back);\n continue;\n }\n }\n if (!visible(binding.trigger) && !pageUnavailable) {\n retainInactive(candidate, existing);\n continue;\n }\n const bar = binding.footer.querySelector<HTMLIonSearchbarElement>('ion-searchbar');\n const input = bar?.querySelector<HTMLInputElement>('input.searchbar-input');\n const back = binding.footer.querySelector<HTMLIonButtonElement>('ion-buttons[slot=start] ion-button');\n if (\n !bar ||\n !input ||\n !back ||\n !binding.footer.matches('ion-footer') ||\n !inFixedToolbar(bar) ||\n !inFixedToolbar(back) ||\n (!pageUnavailable && bar.closest(excluded)) ||\n !bar.classList.contains('ios') ||\n bar.classList.contains('searchbar-classic')\n ) {\n retainInactive(candidate, existing);\n continue;\n }\n if (\n bar.color ||\n back.fill !== 'default' ||\n back.color ||\n bar.maxlength != null ||\n bar.minlength != null ||\n bar.inputmode ||\n bar.enterkeyhint ||\n !['off', 'none'].includes(bar.autocapitalize) ||\n bar.autocomplete !== 'off' ||\n ![false, 'off', undefined].includes(bar.autocorrect) ||\n bar.spellcheck ||\n bar.showClearButton !== 'always' ||\n bar.clearIcon\n ) {\n retainInactive(candidate, existing);\n continue;\n }\n if (bar.showCancelButton !== 'never' || bar.type !== 'search' || !getComputedStyle(input).backdropFilter.includes('blur')) {\n retainInactive(candidate, existing);\n continue;\n }\n const fabButton = binding.trigger as HTMLIonFabButtonElement;\n const nativeTrigger = fabButton.shadowRoot?.querySelector<HTMLElement>('[part=native]');\n if (\n (!pageUnavailable && binding.trigger.closest(excluded)) ||\n (!pageUnavailable && back.closest(excluded)) ||\n back.disabled ||\n fabButton.disabled ||\n fabButton.color ||\n fabButton.type !== 'button' ||\n fabButton.href ||\n !nativeTrigger ||\n getComputedStyle(fabButton).backgroundColor !== 'rgba(0, 0, 0, 0)' ||\n !getComputedStyle(nativeTrigger).backdropFilter.includes('blur')\n ) {\n retainInactive(candidate, existing);\n continue;\n }\n const triggerRect = binding.trigger.getBoundingClientRect();\n if (\n ![triggerRect.x, triggerRect.y, triggerRect.width, triggerRect.height].every(Number.isFinite) ||\n triggerRect.width <= 0 ||\n triggerRect.height <= 0\n ) {\n retainInactive(candidate, existing);\n continue;\n }\n const state = existing ?? install(binding, bar, input);\n const trigger = readIcon(binding.trigger, binding.trigger, candidate);\n const searchIcon = bar.querySelector<HTMLElement>('.searchbar-search-icon');\n const field = searchIcon && readIcon(searchIcon, bar, candidate);\n if (!trigger || !field) {\n retainInactive(candidate, state);\n continue;\n }\n field.label = '';\n field.accessibilityLabel = bar.getAttribute('aria-label') ?? input.getAttribute('aria-label') ?? 'Search';\n // Icon-only search FABs often rely on the searchbar for their accessible\n // name. Carry that semantic name into the independent resting trigger.\n if (!trigger.accessibilityLabel) trigger.accessibilityLabel = field.accessibilityLabel;\n state.layout = JSON.stringify([\n innerWidth,\n innerHeight,\n candidate.control.x,\n candidate.control.y,\n candidate.control.width,\n candidate.control.height,\n candidate.control.rtl,\n trigger.x,\n trigger.y,\n trigger.width,\n trigger.height,\n candidate.control.items,\n candidate.icons.map(({ source }) => source),\n field,\n trigger,\n bar.placeholder,\n bar.disabled,\n ]);\n if (state.rejectedLayout === state.layout) {\n retainInactive(candidate, state);\n continue;\n }\n const available = !pageUnavailable && visible(binding.trigger);\n candidate.control.search = {\n id: id(input),\n field,\n trigger,\n closeId: id(back),\n active: available && binding.active,\n available,\n focused: available && binding.focused,\n value: bar.value ?? '',\n placeholder: bar.placeholder ?? '',\n disabled: bar.disabled,\n editSequence: state.editSequence,\n valueVersion: state.valueVersion,\n };\n state.last = candidate.control.search;\n if (available) {\n candidate.sources = [binding.tabBar, binding.trigger.closest<HTMLElement>('ion-fab') ?? binding.trigger, binding.footer];\n candidate.actions.set(id(binding.trigger), binding.trigger);\n candidate.actions.set(id(back), back);\n }\n }\n for (const [candidate, configuration] of inactive) candidate.control.search ??= configuration;\n // Every unsupported search path leaves its trigger on the Web, including\n // opt-outs and unsupported markup before a native layout was attempted.\n // Ordinary native tabs must not intercept that trigger's input.\n const projectedCandidates = candidates.filter(\n (candidate) =>\n candidate.control.search?.available ||\n !bindings.some((binding) => {\n if (binding.tabBar !== candidate.element) return false;\n const trigger = withoutPrehide(binding.trigger, () => {\n // Projection opt-outs do not hide a usable Web button. Check actual\n // presentation here, rather than the native eligibility predicate.\n if (!binding.trigger.isConnected || binding.trigger.closest('.ion-page-hidden, .ion-page-invisible, [hidden], [inert]'))\n return;\n for (let element: HTMLElement | null = binding.trigger; element; element = element.parentElement) {\n const style = getComputedStyle(element);\n if (style.display === 'none' || style.visibility !== 'visible' || Number(style.opacity) === 0) return;\n }\n const rect = binding.trigger.getBoundingClientRect();\n if ([rect.x, rect.y, rect.width, rect.height].every(Number.isFinite) && rect.width > 0 && rect.height > 0) return rect;\n return;\n });\n if (!trigger) return false;\n const tabs = candidate.control;\n return (\n tabs.x < trigger.right && tabs.x + tabs.width > trigger.left && tabs.y < trigger.bottom && tabs.y + tabs.height > trigger.top\n );\n }),\n );\n const groups = projectedCandidates.filter((c) => c.control.search);\n return projectedCandidates.filter(\n (c) => !groups.some((group) => group !== c && group.sources?.some((source) => source.contains(c.element))),\n );\n },\n projected,\n hasActive() {\n for (const [binding] of states) if (binding.active && projected(binding)) return true;\n return false;\n },\n begin(binding: NativeSearchBinding, revision: number) {\n const state = states.get(binding);\n if (state) state.minimumRevision = revision;\n },\n /** Enter / focus / leave. `focused` is ignored when leaving. */\n setStatus(binding: NativeSearchBinding, active: boolean, focused = false) {\n if (!active) {\n this.retire(binding);\n return;\n }\n binding.active = true;\n // Projection intent only. Ionic focus/blur events still wait for the native phase.\n binding.focused = focused;\n holdKeyboardResize();\n },\n release(element: HTMLElement) {\n for (const binding of states.keys()) if (binding.footer === element) this.retire(binding);\n },\n reject(ids: string[]) {\n states.forEach((state) => {\n if (ids.includes(id(state.binding.tabBar))) {\n state.rejectedLayout = state.layout;\n // UIKit removed the search surface — do not reuse its cache; project ordinary tabs.\n state.last = undefined;\n }\n });\n },\n event(event: NativeUISearchEvent) {\n const state = Array.from(states.values()).find((s) => id(s.input) === event.id && projected(s.binding) && isCurrent(s));\n if (\n !state ||\n !state.binding.active ||\n ((event.phase === 'input' || event.phase === 'clear') && event.valueVersion !== state.valueVersion) ||\n event.revision < state.minimumRevision ||\n event.sequence <= state.editSequence ||\n state.bar.disabled\n )\n return;\n state.editSequence = event.sequence;\n const { input, binding } = state;\n if (event.phase === 'input') {\n if (state.composing !== event.composing)\n input.dispatchEvent(\n new CompositionEvent(event.composing ? 'compositionstart' : 'compositionend', { bubbles: true, data: event.value }),\n );\n state.composing = event.composing;\n input.value = event.value;\n state.applyingInput = true;\n try {\n input.dispatchEvent(new InputEvent('input', { bubbles: true, composed: true, isComposing: event.composing }));\n } finally {\n state.applyingInput = false;\n }\n } else if (event.phase === 'clear') {\n state.bar.querySelector<HTMLButtonElement>('.searchbar-clear-button')?.click();\n } else if (event.phase === 'commit') {\n input.dispatchEvent(new Event('change', { bubbles: true }));\n } else {\n if (state.focused === (event.phase === 'focus')) return;\n state.focused = binding.focused = event.phase === 'focus';\n input.dispatchEvent(new FocusEvent(event.phase, { composed: true }));\n }\n schedule();\n },\n retire(binding: NativeSearchBinding) {\n const state = states.get(binding);\n // Keep ownership until keyboardWillHide can release this class.\n if (state?.keyboardHidden && keyboardVisible) binding.tabBar.classList.add('tab-bar-hidden');\n if (state?.focused) {\n state.focused = false;\n state.input.dispatchEvent(new FocusEvent('blur'));\n }\n binding.active = binding.focused = false;\n releaseKeyboardResize();\n },\n destroy() {\n states.forEach((state) => {\n this.retire(state.binding);\n state.restore();\n });\n states.clear();\n releaseKeyboardResize();\n },\n };\n};\n"],"mappings":";;;;AAwBA,MAAa,uBAAuB,KAAe,IAAkC,aAAyB;CAC5G,MAAM,yBAAS,IAAI,IAAsC;CACzD,IAAI,kBAAkB;CACtB,IAAI,qBAAoC;CACxC,IAAI,2BAA2B;CAK/B,MAAM,uBAEF,IAAI,aAGH,WAAW,SAAS;CACzB,M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