@rdlabo/ionic-theme-ios27 1.2.1 → 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.
Files changed (195) hide show
  1. package/README.md +24 -280
  2. package/dist/css/components/ion-toolbar.css +1 -1
  3. package/dist/css/ionic-theme-ios27.css +1 -1
  4. package/dist/css/vertical-bars.css +1 -1
  5. package/dist/index.d.ts +3 -2
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +3 -2
  8. package/dist/index.js.map +1 -1
  9. package/dist/layout/index.d.ts +18 -0
  10. package/dist/layout/index.d.ts.map +1 -0
  11. package/dist/layout/index.js +26 -0
  12. package/dist/layout/index.js.map +1 -0
  13. package/dist/segment/index.js +3 -3
  14. package/dist/segment/index.js.map +1 -1
  15. package/dist/sheets-of-glass/index.js +7 -7
  16. package/dist/sheets-of-glass/index.js.map +1 -1
  17. package/dist/tab-bar-searchable/dismiss-button.js +53 -3
  18. package/dist/tab-bar-searchable/dismiss-button.js.map +1 -1
  19. package/dist/tab-bar-searchable/index.js +18 -3
  20. package/dist/tab-bar-searchable/index.js.map +1 -1
  21. package/dist/transition/ios.transition.d.ts.map +1 -1
  22. package/dist/transition/ios.transition.js +7 -4
  23. package/dist/transition/ios.transition.js.map +1 -1
  24. package/dist/transition/native-ui.d.ts +6 -0
  25. package/dist/transition/native-ui.d.ts.map +1 -0
  26. package/dist/{native-integration/index.js → transition/native-ui.js} +16 -30
  27. package/dist/transition/native-ui.js.map +1 -0
  28. package/docs/adaptive-themes.md +161 -0
  29. package/docs/add-native-ui.md +53 -0
  30. package/docs/animation.md +19 -3
  31. package/docs/eslint.md +3 -1
  32. package/docs/features.md +9 -5
  33. package/docs/iphone-duo.md +62 -35
  34. package/docs/migration.md +17 -26
  35. package/docs/setup.md +92 -0
  36. package/docs/special-markup.md +41 -10
  37. package/docs/using-ion-item-group.md +2 -2
  38. package/docs/vertical-bars-layout.md +67 -0
  39. package/package.json +12 -42
  40. package/src/index.ts +3 -1
  41. package/src/layout/index.ts +29 -0
  42. package/src/segment/index.ts +3 -3
  43. package/src/sheets-of-glass/index.ts +7 -7
  44. package/src/styles/components/ion-toolbar.scss +1 -1
  45. package/src/styles/vertical-bars.scss +15 -18
  46. package/src/tab-bar-searchable/dismiss-button.ts +73 -4
  47. package/src/tab-bar-searchable/index.ts +20 -3
  48. package/src/transition/ios.transition.ts +7 -4
  49. package/src/{native-integration/index.ts → transition/native-ui.ts} +17 -46
  50. package/Package.swift +0 -21
  51. package/dist/_virtual/_rolldown/runtime.js +0 -13
  52. package/dist/native/components/index.d.ts +0 -19
  53. package/dist/native/components/index.d.ts.map +0 -1
  54. package/dist/native/components/index.js +0 -40
  55. package/dist/native/components/index.js.map +0 -1
  56. package/dist/native/components/ion-back-button.d.ts +0 -9
  57. package/dist/native/components/ion-back-button.d.ts.map +0 -1
  58. package/dist/native/components/ion-back-button.js +0 -20
  59. package/dist/native/components/ion-back-button.js.map +0 -1
  60. package/dist/native/components/ion-button.d.ts +0 -10
  61. package/dist/native/components/ion-button.d.ts.map +0 -1
  62. package/dist/native/components/ion-button.js +0 -23
  63. package/dist/native/components/ion-button.js.map +0 -1
  64. package/dist/native/components/ion-buttons.d.ts +0 -11
  65. package/dist/native/components/ion-buttons.d.ts.map +0 -1
  66. package/dist/native/components/ion-buttons.js +0 -30
  67. package/dist/native/components/ion-buttons.js.map +0 -1
  68. package/dist/native/components/ion-fab.d.ts +0 -10
  69. package/dist/native/components/ion-fab.d.ts.map +0 -1
  70. package/dist/native/components/ion-fab.js +0 -132
  71. package/dist/native/components/ion-fab.js.map +0 -1
  72. package/dist/native/components/ion-menu-button.d.ts +0 -13
  73. package/dist/native/components/ion-menu-button.d.ts.map +0 -1
  74. package/dist/native/components/ion-menu-button.js +0 -31
  75. package/dist/native/components/ion-menu-button.js.map +0 -1
  76. package/dist/native/components/ion-segment.d.ts +0 -11
  77. package/dist/native/components/ion-segment.d.ts.map +0 -1
  78. package/dist/native/components/ion-segment.js +0 -30
  79. package/dist/native/components/ion-segment.js.map +0 -1
  80. package/dist/native/components/ion-tab-bar.d.ts +0 -11
  81. package/dist/native/components/ion-tab-bar.d.ts.map +0 -1
  82. package/dist/native/components/ion-tab-bar.js +0 -50
  83. package/dist/native/components/ion-tab-bar.js.map +0 -1
  84. package/dist/native/components/searchable-tabs.d.ts +0 -20
  85. package/dist/native/components/searchable-tabs.d.ts.map +0 -1
  86. package/dist/native/components/searchable-tabs.js +0 -383
  87. package/dist/native/components/searchable-tabs.js.map +0 -1
  88. package/dist/native/definitions.d.ts +0 -152
  89. package/dist/native/definitions.d.ts.map +0 -1
  90. package/dist/native/definitions.js +0 -0
  91. package/dist/native/foldable/fold-state.d.ts +0 -5
  92. package/dist/native/foldable/fold-state.d.ts.map +0 -1
  93. package/dist/native/foldable/fold-state.js +0 -14
  94. package/dist/native/foldable/fold-state.js.map +0 -1
  95. package/dist/native/foldable/types.d.ts +0 -12
  96. package/dist/native/foldable/types.d.ts.map +0 -1
  97. package/dist/native/foldable/types.js +0 -0
  98. package/dist/native/index.d.ts +0 -11
  99. package/dist/native/index.d.ts.map +0 -1
  100. package/dist/native/index.js +0 -242
  101. package/dist/native/index.js.map +0 -1
  102. package/dist/native/prehide.d.ts +0 -7
  103. package/dist/native/prehide.d.ts.map +0 -1
  104. package/dist/native/prehide.js +0 -230
  105. package/dist/native/prehide.js.map +0 -1
  106. package/dist/native/runtime.d.ts +0 -5
  107. package/dist/native/runtime.d.ts.map +0 -1
  108. package/dist/native/runtime.js +0 -640
  109. package/dist/native/runtime.js.map +0 -1
  110. package/dist/native/shared/candidate.d.ts +0 -21
  111. package/dist/native/shared/candidate.d.ts.map +0 -1
  112. package/dist/native/shared/candidate.js +0 -98
  113. package/dist/native/shared/candidate.js.map +0 -1
  114. package/dist/native/shared/crossfade.d.ts +0 -10
  115. package/dist/native/shared/crossfade.d.ts.map +0 -1
  116. package/dist/native/shared/crossfade.js +0 -50
  117. package/dist/native/shared/crossfade.js.map +0 -1
  118. package/dist/native/shared/dom.d.ts +0 -46
  119. package/dist/native/shared/dom.d.ts.map +0 -1
  120. package/dist/native/shared/dom.js +0 -172
  121. package/dist/native/shared/dom.js.map +0 -1
  122. package/dist/native/shared/events.d.ts +0 -11
  123. package/dist/native/shared/events.d.ts.map +0 -1
  124. package/dist/native/shared/events.js +0 -13
  125. package/dist/native/shared/events.js.map +0 -1
  126. package/dist/native/shared/icons.d.ts +0 -8
  127. package/dist/native/shared/icons.d.ts.map +0 -1
  128. package/dist/native/shared/icons.js +0 -61
  129. package/dist/native/shared/icons.js.map +0 -1
  130. package/dist/native/shared/modal.d.ts +0 -10
  131. package/dist/native/shared/modal.d.ts.map +0 -1
  132. package/dist/native/shared/modal.js +0 -160
  133. package/dist/native/shared/modal.js.map +0 -1
  134. package/dist/native/vertical-bars-web-search.d.ts +0 -9
  135. package/dist/native/vertical-bars-web-search.d.ts.map +0 -1
  136. package/dist/native/vertical-bars-web-search.js +0 -84
  137. package/dist/native/vertical-bars-web-search.js.map +0 -1
  138. package/dist/native/vertical-bars-web.d.ts +0 -5
  139. package/dist/native/vertical-bars-web.d.ts.map +0 -1
  140. package/dist/native/vertical-bars-web.js +0 -341
  141. package/dist/native/vertical-bars-web.js.map +0 -1
  142. package/dist/native-integration/index.d.ts +0 -23
  143. package/dist/native-integration/index.d.ts.map +0 -1
  144. package/dist/native-integration/index.js.map +0 -1
  145. package/dist/native-integration/transition.d.ts +0 -5
  146. package/dist/native-integration/transition.d.ts.map +0 -1
  147. package/dist/native-integration/transition.js +0 -16
  148. package/dist/native-integration/transition.js.map +0 -1
  149. package/dist/vertical-bars.d.ts +0 -5
  150. package/dist/vertical-bars.js +0 -4
  151. package/docs/e2e-testing.md +0 -51
  152. package/docs/feedback.md +0 -65
  153. package/docs/iphone-duo-with-original-theme.md +0 -158
  154. package/docs/native-ui-shell.md +0 -285
  155. package/docs/vertical-bars.md +0 -285
  156. package/ios/Sources/IonicNativeUIShellPlugin/Components/ShellButton.swift +0 -71
  157. package/ios/Sources/IonicNativeUIShellPlugin/Components/ShellButtons.swift +0 -24
  158. package/ios/Sources/IonicNativeUIShellPlugin/Components/ShellComponents.swift +0 -18
  159. package/ios/Sources/IonicNativeUIShellPlugin/Components/ShellFab.swift +0 -83
  160. package/ios/Sources/IonicNativeUIShellPlugin/Components/ShellSearchController.swift +0 -432
  161. package/ios/Sources/IonicNativeUIShellPlugin/Components/ShellSegment.swift +0 -91
  162. package/ios/Sources/IonicNativeUIShellPlugin/Components/ShellTabBar.swift +0 -221
  163. package/ios/Sources/IonicNativeUIShellPlugin/Components/ShellVerticalBars.swift +0 -437
  164. package/ios/Sources/IonicNativeUIShellPlugin/Components/ShellVerticalSearch.swift +0 -118
  165. package/ios/Sources/IonicNativeUIShellPlugin/IonicNativeUIShellPlugin.swift +0 -396
  166. package/ios/Sources/IonicNativeUIShellPlugin/Shared/ShellCrossfade.swift +0 -35
  167. package/ios/Sources/IonicNativeUIShellPlugin/Shared/ShellHost.swift +0 -8
  168. package/ios/Sources/IonicNativeUIShellPlugin/Shared/ShellRendering.swift +0 -27
  169. package/ios/Sources/IonicNativeUIShellPlugin/Shared/ShellSnapshot.swift +0 -135
  170. package/ios/Tests/IonicNativeUIShellPluginTests/ShellSnapshotTests.swift +0 -650
  171. package/src/native/components/index.ts +0 -53
  172. package/src/native/components/ion-back-button.ts +0 -19
  173. package/src/native/components/ion-button.ts +0 -24
  174. package/src/native/components/ion-buttons.ts +0 -38
  175. package/src/native/components/ion-fab.ts +0 -151
  176. package/src/native/components/ion-menu-button.ts +0 -24
  177. package/src/native/components/ion-segment.ts +0 -27
  178. package/src/native/components/ion-tab-bar.ts +0 -50
  179. package/src/native/components/searchable-tabs.ts +0 -459
  180. package/src/native/definitions.ts +0 -191
  181. package/src/native/foldable/fold-state.ts +0 -9
  182. package/src/native/foldable/types.ts +0 -4
  183. package/src/native/index.ts +0 -281
  184. package/src/native/prehide.ts +0 -265
  185. package/src/native/runtime.ts +0 -781
  186. package/src/native/shared/candidate.ts +0 -150
  187. package/src/native/shared/crossfade.ts +0 -50
  188. package/src/native/shared/dom.ts +0 -286
  189. package/src/native/shared/events.ts +0 -8
  190. package/src/native/shared/icons.ts +0 -57
  191. package/src/native/shared/modal.ts +0 -157
  192. package/src/native/vertical-bars-web-search.ts +0 -80
  193. package/src/native/vertical-bars-web.ts +0 -411
  194. package/src/native-integration/transition.ts +0 -15
  195. package/src/vertical-bars.ts +0 -11
@@ -1,383 +0,0 @@
1
- import { getNativeSearchBindings, requestNativeSearch } from "../../native-integration/index.js";
2
- import { excluded, inFixedToolbar, isShellDisabled, marker, text, visible } from "../shared/dom.js";
3
- import { iconSource } from "../shared/icons.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 (isShellDisabled(fab) || isShellDisabled(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
- if (existing?.last) 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 state = existing ?? install(binding, bar, input);
236
- const trigger = readIcon(binding.trigger, binding.trigger, candidate);
237
- const searchIcon = bar.querySelector(".searchbar-search-icon");
238
- const field = searchIcon && readIcon(searchIcon, bar, candidate);
239
- if (!trigger || !field) {
240
- retainInactive(candidate, state);
241
- continue;
242
- }
243
- field.label = "";
244
- field.accessibilityLabel = bar.getAttribute("aria-label") ?? input.getAttribute("aria-label") ?? "Search";
245
- if (!trigger.accessibilityLabel) trigger.accessibilityLabel = field.accessibilityLabel;
246
- state.layout = JSON.stringify([
247
- innerWidth,
248
- innerHeight,
249
- candidate.control.x,
250
- candidate.control.y,
251
- candidate.control.width,
252
- candidate.control.height,
253
- candidate.control.rtl,
254
- trigger.x,
255
- trigger.y,
256
- trigger.width,
257
- trigger.height,
258
- candidate.control.items,
259
- candidate.icons.map(({ source }) => source),
260
- field,
261
- trigger,
262
- bar.placeholder,
263
- bar.disabled
264
- ]);
265
- if (state.rejectedLayout === state.layout) {
266
- retainInactive(candidate, state);
267
- continue;
268
- }
269
- const available = !pageUnavailable && visible(binding.trigger);
270
- candidate.control.search = {
271
- id: id(input),
272
- field,
273
- trigger,
274
- closeId: id(back),
275
- active: available && binding.active,
276
- available,
277
- focused: available && binding.focused,
278
- value: bar.value ?? "",
279
- placeholder: bar.placeholder ?? "",
280
- disabled: bar.disabled,
281
- editSequence: state.editSequence,
282
- valueVersion: state.valueVersion
283
- };
284
- state.last = candidate.control.search;
285
- if (available) {
286
- candidate.sources = [
287
- binding.tabBar,
288
- binding.trigger.closest("ion-fab") ?? binding.trigger,
289
- binding.footer
290
- ];
291
- candidate.actions.set(id(binding.trigger), binding.trigger);
292
- candidate.actions.set(id(back), back);
293
- }
294
- }
295
- for (const [candidate, configuration] of inactive) (_candidate$control = candidate.control).search ?? (_candidate$control.search = configuration);
296
- const groups = candidates.filter((c) => c.control.search);
297
- return candidates.filter((c) => !groups.some((group) => group !== c && group.sources?.some((source) => source.contains(c.element))));
298
- },
299
- projected,
300
- hasActive() {
301
- for (const [binding] of states) if (binding.active && projected(binding)) return true;
302
- return false;
303
- },
304
- begin(binding, revision) {
305
- const state = states.get(binding);
306
- if (state) state.minimumRevision = revision;
307
- },
308
- /** Enter / focus / leave. `focused` is ignored when leaving. */
309
- setStatus(binding, active, focused = false) {
310
- if (!active) {
311
- this.retire(binding);
312
- return;
313
- }
314
- binding.active = true;
315
- binding.focused = focused;
316
- holdKeyboardResize();
317
- },
318
- release(element) {
319
- for (const binding of states.keys()) if (binding.footer === element) this.retire(binding);
320
- },
321
- reject(ids) {
322
- states.forEach((state) => {
323
- if (ids.includes(id(state.binding.tabBar))) {
324
- state.rejectedLayout = state.layout;
325
- state.last = void 0;
326
- }
327
- });
328
- },
329
- event(event) {
330
- const state = Array.from(states.values()).find((s) => id(s.input) === event.id && projected(s.binding) && isCurrent(s));
331
- 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;
332
- state.editSequence = event.sequence;
333
- const { input, binding } = state;
334
- if (event.phase === "input") {
335
- if (state.composing !== event.composing) input.dispatchEvent(new CompositionEvent(event.composing ? "compositionstart" : "compositionend", {
336
- bubbles: true,
337
- data: event.value
338
- }));
339
- state.composing = event.composing;
340
- input.value = event.value;
341
- state.applyingInput = true;
342
- try {
343
- input.dispatchEvent(new InputEvent("input", {
344
- bubbles: true,
345
- composed: true,
346
- isComposing: event.composing
347
- }));
348
- } finally {
349
- state.applyingInput = false;
350
- }
351
- } else if (event.phase === "clear") state.bar.querySelector(".searchbar-clear-button")?.click();
352
- else if (event.phase === "commit") input.dispatchEvent(new Event("change", { bubbles: true }));
353
- else {
354
- if (state.focused === (event.phase === "focus")) return;
355
- state.focused = binding.focused = event.phase === "focus";
356
- input.dispatchEvent(new FocusEvent(event.phase, { composed: true }));
357
- }
358
- schedule();
359
- },
360
- retire(binding) {
361
- const state = states.get(binding);
362
- if (state?.keyboardHidden && keyboardVisible) binding.tabBar.classList.add("tab-bar-hidden");
363
- if (state?.focused) {
364
- state.focused = false;
365
- state.input.dispatchEvent(new FocusEvent("blur"));
366
- }
367
- binding.active = binding.focused = false;
368
- releaseKeyboardResize();
369
- },
370
- destroy() {
371
- states.forEach((state) => {
372
- this.retire(state.binding);
373
- state.restore();
374
- });
375
- states.clear();
376
- releaseKeyboardResize();
377
- }
378
- };
379
- };
380
- //#endregion
381
- export { createSearchSupport };
382
-
383
- //# sourceMappingURL=searchable-tabs.js.map
@@ -1 +0,0 @@
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, isShellDisabled, marker, text, visible } from '../shared/dom';\nimport { iconSource } from '../shared/icons';\nimport type { Candidate } from '../shared/candidate';\nimport type { ShellItem, ShellSearch, ShellSearchEvent } 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?: ShellSearch;\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): ShellItem | undefined => {\n const style = getComputedStyle(element);\n const rect = element.getBoundingClientRect();\n const item: ShellItem = {\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, ShellSearch][] = [];\n const pageHidden = (element: HTMLElement) => !!element.closest('.ion-page-hidden, .ion-page-invisible');\n const retainInactive = (candidate: Candidate, state?: SearchState, keepAvailable = false) => {\n // Keep ShellSearchController 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 (isShellDisabled(fab) || isShellDisabled(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 if (existing?.last) continue;\n // First registration during a transition: fall through and measure available:false.\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 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 const groups = candidates.filter((c) => c.control.search);\n return candidates.filter((c) => !groups.some((group) => group !== c && group.sources?.some((source) => source.contains(c.element))));\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: ShellSearchEvent) {\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,MAAM,aAAa,YAAiC,QAAQ,OAAO,aAAa,MAAM;CAEtF,MAAM,2BAA2B;EAC/B,MAAM,WAAW,eAAe;EAChC,IAAI,CAAC,UAAU,iBAAiB,uBAAuB,MAAM;EAC7D,MAAM,gBAAgB,SAAS,cAAc,KAAK,QAAQ;EAC1D,MAAM,aAAa,EAAE;EACrB,qBAAqB;EACrB,CAAM,YAAY;GAChB,IAAI,cAAc;GAClB,IAAI;IACF,MAAM,UAAU,MAAM,SAAS,gBAAgB;IAC/C,IAAI,OAAO,SAAS,SAAS,UAAU,cAAc,QAAQ;GAC/D,QAAQ,CAER;GACA,IAAI,eAAe,0BAA0B;GAC7C,qBAAqB;GACrB,IAAI;IACF,MAAM,cAAc,EAAE,MAAM,OAAO,CAAC;GACtC,QAAQ;IACN,IAAI,eAAe,0BAA0B,qBAAqB;IAClE;GACF;GAEA,IAAI,eAAe,0BAA0B,cAAmB,EAAE,MAAM,YAAY,CAAC,CAAC,CAAC,YAAY,KAAA,CAAS;EAC9G,EAAA,CAAG;CACL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AI,OAAO,kBAAkB,iBAAiB,QAAQ,OAAO,UAAU,IAAI,gBAAgB;GAC3F,IAAI,OAAO,SAAS;IAClB,MAAM,UAAU;IAChB,MAAM,MAAM,cAAc,IAAI,WAAW,MAAM,CAAC;GAClD;GACA,QAAQ,SAAS,QAAQ,UAAU;GACnC,sBAAsB;EACxB;EACA,UAAU;GACR,OAAO,SAAS,UAAU;IACxB,KAAK,OAAO,MAAM,OAAO;IACzB,MAAM,QAAQ;GAChB,CAAC;GACD,OAAO,MAAM;GACb,sBAAsB;EACxB;CACF;AACF"}
@@ -1,152 +0,0 @@
1
- import { NativeUIShellComponent } from "./components/index.js";
2
- import { PluginListenerHandle } from "@capacitor/core";
3
- //#region src/native/definitions.d.ts
4
- export interface NativeUIShellStatus {
5
- state: 'web' | 'native' | 'stopped';
6
- projected: number;
7
- updates: number;
8
- reason?: string;
9
- }
10
- export interface VerticalControlAreaOptions {
11
- buttonProjection?: 'source' | 'system';
12
- buttonDefaultFill?: 'solid' | null;
13
- }
14
- export interface NativeUIShellOptions extends VerticalControlAreaOptions {
15
- enabled?: boolean;
16
- controls?: NativeUIShellControls;
17
- verticalBarsOnly?: boolean;
18
- }
19
- export interface NativeUIShellControls {
20
- tabs?: boolean;
21
- toolbar?: boolean;
22
- segment?: boolean;
23
- fab?: boolean;
24
- }
25
- export interface NativeUIShellHandle {
26
- getStatus(): NativeUIShellStatus;
27
- suspend(): Promise<NativeUIShellSuspension>;
28
- destroy(): Promise<void>;
29
- }
30
- export type VerticalBarEdge = 'leading' | 'trailing' | null;
31
- export interface VerticalBarPlacement {
32
- edge: VerticalBarEdge;
33
- inset?: number;
34
- nativeEdge?: VerticalBarEdge;
35
- }
36
- export interface VerticalControlAreaHandle extends NativeUIShellHandle {
37
- setPlacement(placement: VerticalBarEdge | VerticalBarPlacement, rtl?: boolean): void;
38
- }
39
- export interface NativeUIShellSuspension {
40
- resume(): Promise<void>;
41
- }
42
- export interface Frame {
43
- x: number;
44
- y: number;
45
- width: number;
46
- height: number;
47
- }
48
- export interface ShellBadge {
49
- value: string;
50
- color: string;
51
- textColor: string;
52
- }
53
- export interface ShellItem extends Frame {
54
- id: string;
55
- label: string;
56
- accessibilityLabel: string;
57
- disabled: boolean;
58
- selected: boolean;
59
- fontSize: number;
60
- fontWeight: number;
61
- color: string;
62
- buttonFill?: 'clear' | 'solid' | 'outline';
63
- backgroundColor?: string;
64
- borderColor?: string;
65
- borderWidth?: number;
66
- badge?: ShellBadge;
67
- icon?: string;
68
- iconWidth?: number;
69
- iconHeight?: number;
70
- iconPosition?: 'leading' | 'trailing' | 'top';
71
- imagePadding?: number;
72
- contentInsetLeading?: number;
73
- contentInsetTrailing?: number;
74
- iconTemplate?: boolean;
75
- visible?: boolean;
76
- closeIcon?: string;
77
- closeIconWidth?: number;
78
- closeIconHeight?: number;
79
- iconTransition?: number;
80
- }
81
- export interface ShellControl extends Frame {
82
- id: string;
83
- kind: NativeUIShellComponent;
84
- placement?: 'vertical-bars';
85
- toolbarSlot?: 'start' | 'end';
86
- items: ShellItem[];
87
- dark: boolean;
88
- rtl: boolean;
89
- tabBarAnchor?: {
90
- x: 0 | 0.5 | 1;
91
- y: 0 | 1;
92
- };
93
- search?: ShellSearch;
94
- }
95
- export interface ShellSearch {
96
- id: string;
97
- field: ShellItem;
98
- trigger: ShellItem;
99
- closeId: string;
100
- active: boolean;
101
- available: boolean;
102
- focused: boolean;
103
- value: string;
104
- placeholder: string;
105
- disabled: boolean;
106
- editSequence: number;
107
- valueVersion: number;
108
- }
109
- export interface ShellSearchEvent extends ShellActivation {
110
- valueVersion: number;
111
- phase: 'input' | 'focus' | 'blur' | 'clear' | 'commit';
112
- value: string;
113
- composing: boolean;
114
- }
115
- export interface ShellSnapshot {
116
- revision: number;
117
- transitionDuration?: number;
118
- viewportWidth: number;
119
- verticalBarEdge?: 'left' | 'right';
120
- verticalBarFrame?: Frame;
121
- controls: ShellControl[];
122
- }
123
- export interface ShellActivation {
124
- revision: number;
125
- id: string;
126
- sequence: number;
127
- }
128
- export interface WebViewMetrics {
129
- radius: number;
130
- }
131
- export interface NativeUIShellPlugin {
132
- configure(options?: {
133
- verticalBarsOnly?: boolean;
134
- }): Promise<{
135
- supported: boolean;
136
- }>;
137
- getWebViewMetrics(): Promise<WebViewMetrics>;
138
- update(snapshot: ShellSnapshot): Promise<{
139
- revision: number;
140
- rejectedSearches?: string[];
141
- rejectedControls?: string[];
142
- }>;
143
- clear(options: {
144
- revision: number;
145
- }): Promise<void>;
146
- addListener(name: 'activate', listener: (event: ShellActivation) => void): Promise<PluginListenerHandle>;
147
- addListener(name: 'search', listener: (event: ShellSearchEvent) => void): Promise<PluginListenerHandle>;
148
- addListener(name: 'webViewMetricsChange', listener: (event: WebViewMetrics) => void): Promise<PluginListenerHandle>;
149
- }
150
- //#endregion
151
- export type { NativeUIShellComponent };
152
- //# sourceMappingURL=definitions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"definitions.d.ts","names":[],"sources":["../../src/native/definitions.ts"],"mappings":";;;iBAKiB;EACf;EACA;EACA;EACA;;iBAGe;EASf;EAOA;;iBAGe,6BAA6B;EAE5C;EAEA,WAAW;EAEX;;iBAGe;EAEf;EAEA;EAEA;EAEA;;iBAGe;EAEf,aAAa;EAEb,WAAW,QAAQ;EAEnB,WAAW;;YAID;iBAEK;EACf,MAAM;EAEN;EAEA,aAAa;;iBAGE,kCAAkC;EAEjD,aAAa,WAAW,kBAAkB,sBAAsB;;iBAGjD;EAEf,UAAU;;iBAGK;EACf;EACA;EACA;EACA;;iBAGe;EACf;EACA;EACA;;iBAGe,kBAAkB;EACjC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA,QAAQ;EACR;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGe,qBAAqB;EACpC;EACA,MAAM;EAEN;EAEA;EACA,OAAO;EACP;EACA;EACA;IAAiB;IAAgB;;EACjC,SAAS;;iBAGM;EACf;EACA,OAAO;EACP,SAAS;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGe,yBAAyB;EACxC;EACA;EACA;EACA;;iBAGe;EACf;EACA;EACA;EAEA;EAEA,mBAAmB;EACnB,UAAU;;iBAGK;EACf;EACA;EACA;;iBAGe;EAEf;;iBAGe;EACf,UAAU;IAAY;MAA+B;IAAU;;EAC/D,qBAAqB,QAAQ;EAC7B,OAAO,UAAU,gBAAgB;IAAU;IAAkB;IAA6B;;EAC1F,MAAM;IAAW;MAAqB;EACtC,YAAY,kBAAkB,WAAW,OAAO,2BAA2B,QAAQ;EACnF,YAAY,gBAAgB,WAAW,OAAO,4BAA4B,QAAQ;EAClF,YAAY,8BAA8B,WAAW,OAAO,0BAA0B,QAAQ"}
File without changes
@@ -1,5 +0,0 @@
1
- import { FoldState } from "./types.js";
2
- //#region src/native/foldable/fold-state.d.ts
3
- export declare function applyFoldStateClasses(root: HTMLElement, fold: FoldState): void;
4
- //#endregion
5
- //# sourceMappingURL=fold-state.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fold-state.d.ts","names":[],"sources":["../../../src/native/foldable/fold-state.ts"],"mappings":";;wBAGgB,sBAAsB,MAAM,aAAa,MAAM"}
@@ -1,14 +0,0 @@
1
- //#region src/native/foldable/fold-state.ts
2
- /** Keep posture on ion-app so descendants can follow it through CSS. */
3
- function applyFoldStateClasses(root, fold) {
4
- for (const state of [
5
- "flat",
6
- "half-opened",
7
- "closed"
8
- ]) root.classList.toggle(`ios-theme-fold-${state}`, fold.state === state);
9
- root.classList.toggle("ios-theme-fold-expanded", fold.state === "half-opened" || fold.state === "flat" && !!fold.hingeBounds);
10
- }
11
- //#endregion
12
- export { applyFoldStateClasses };
13
-
14
- //# sourceMappingURL=fold-state.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fold-state.js","names":[],"sources":["../../../src/native/foldable/fold-state.ts"],"sourcesContent":["import type { FoldState } from './types';\n\n/** Keep posture on ion-app so descendants can follow it through CSS. */\nexport function applyFoldStateClasses(root: HTMLElement, fold: FoldState): void {\n for (const state of ['flat', 'half-opened', 'closed']) {\n root.classList.toggle(`ios-theme-fold-${state}`, fold.state === state);\n }\n root.classList.toggle('ios-theme-fold-expanded', fold.state === 'half-opened' || (fold.state === 'flat' && !!fold.hingeBounds));\n}\n"],"mappings":";;AAGA,SAAgB,sBAAsB,MAAmB,MAAuB;CAC9E,KAAK,MAAM,SAAS;EAAC;EAAQ;EAAe;CAAQ,GAClD,KAAK,UAAU,OAAO,kBAAkB,SAAS,KAAK,UAAU,KAAK;CAEvE,KAAK,UAAU,OAAO,2BAA2B,KAAK,UAAU,iBAAkB,KAAK,UAAU,UAAU,CAAC,CAAC,KAAK,WAAY;AAChI"}
@@ -1,12 +0,0 @@
1
- //#region src/native/foldable/types.d.ts
2
- export interface FoldState {
3
- state: 'flat' | 'half-opened' | 'closed';
4
- hingeBounds?: {
5
- x: number;
6
- y: number;
7
- width: number;
8
- height: number;
9
- };
10
- }
11
- //#endregion
12
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/native/foldable/types.ts"],"mappings":";iBAAiB;EACf;EACA;IAAgB;IAAW;IAAW;IAAe"}
File without changes