@capgo/capacitor-native-navigation 8.0.23 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -13
- package/android/src/main/java/app/capgo/nativenavigation/NativeNavigationPlugin.java +468 -36
- package/dist/docs.json +74 -0
- package/dist/esm/components.js +6 -1
- package/dist/esm/components.js.map +1 -1
- package/dist/esm/definitions.d.ts +38 -0
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.js +3 -3
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +9 -4
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +9 -4
- package/dist/plugin.js.map +1 -1
- package/docs/native-liquid-glass-android.webp +0 -0
- package/docs/native-liquid-glass-ios.webp +0 -0
- package/package.json +1 -1
package/dist/docs.json
CHANGED
|
@@ -376,6 +376,15 @@
|
|
|
376
376
|
"NativeNavigationColors"
|
|
377
377
|
],
|
|
378
378
|
"type": "NativeNavigationColors"
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"name": "glass",
|
|
382
|
+
"tags": [],
|
|
383
|
+
"docs": "Shared glass background defaults for native bars.",
|
|
384
|
+
"complexTypes": [
|
|
385
|
+
"NativeNavigationGlassOptions"
|
|
386
|
+
],
|
|
387
|
+
"type": "NativeNavigationGlassOptions"
|
|
379
388
|
}
|
|
380
389
|
]
|
|
381
390
|
},
|
|
@@ -451,6 +460,38 @@
|
|
|
451
460
|
}
|
|
452
461
|
]
|
|
453
462
|
},
|
|
463
|
+
{
|
|
464
|
+
"name": "NativeNavigationGlassOptions",
|
|
465
|
+
"slug": "nativenavigationglassoptions",
|
|
466
|
+
"docs": "Native glass background configuration.",
|
|
467
|
+
"tags": [],
|
|
468
|
+
"methods": [],
|
|
469
|
+
"properties": [
|
|
470
|
+
{
|
|
471
|
+
"name": "effect",
|
|
472
|
+
"tags": [],
|
|
473
|
+
"docs": "`liquidGlass` enables the Android 12+ live blurred WebView backdrop for\nnative bars. Android 11 and older keep a translucent surface fallback. iOS\nuses the platform-owned Liquid Glass behavior.",
|
|
474
|
+
"complexTypes": [
|
|
475
|
+
"NativeNavigationGlassEffect"
|
|
476
|
+
],
|
|
477
|
+
"type": "NativeNavigationGlassEffect"
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
"name": "blurRadius",
|
|
481
|
+
"tags": [],
|
|
482
|
+
"docs": "Android blur radius in native dp for `liquidGlass`. Defaults to `18`.",
|
|
483
|
+
"complexTypes": [],
|
|
484
|
+
"type": "number | undefined"
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"name": "surfaceAlpha",
|
|
488
|
+
"tags": [],
|
|
489
|
+
"docs": "Alpha multiplier for the tint surface over the glass backdrop. Defaults to\n`0.62`.",
|
|
490
|
+
"complexTypes": [],
|
|
491
|
+
"type": "number | undefined"
|
|
492
|
+
}
|
|
493
|
+
]
|
|
494
|
+
},
|
|
454
495
|
{
|
|
455
496
|
"name": "NativeNavigationNavbarOptions",
|
|
456
497
|
"slug": "nativenavigationnavbaroptions",
|
|
@@ -502,6 +543,15 @@
|
|
|
502
543
|
],
|
|
503
544
|
"type": "NativeNavigationBlurEffect"
|
|
504
545
|
},
|
|
546
|
+
{
|
|
547
|
+
"name": "glass",
|
|
548
|
+
"tags": [],
|
|
549
|
+
"docs": "Optional glass background behavior. Overrides `configure({ glass })` for\nthis navbar update.",
|
|
550
|
+
"complexTypes": [
|
|
551
|
+
"NativeNavigationGlassOptions"
|
|
552
|
+
],
|
|
553
|
+
"type": "NativeNavigationGlassOptions"
|
|
554
|
+
},
|
|
505
555
|
{
|
|
506
556
|
"name": "backButton",
|
|
507
557
|
"tags": [],
|
|
@@ -738,6 +788,15 @@
|
|
|
738
788
|
],
|
|
739
789
|
"type": "NativeNavigationBlurEffect"
|
|
740
790
|
},
|
|
791
|
+
{
|
|
792
|
+
"name": "glass",
|
|
793
|
+
"tags": [],
|
|
794
|
+
"docs": "Optional glass background behavior. Overrides `configure({ glass })` for\nthis tabbar update.",
|
|
795
|
+
"complexTypes": [
|
|
796
|
+
"NativeNavigationGlassOptions"
|
|
797
|
+
],
|
|
798
|
+
"type": "NativeNavigationGlassOptions"
|
|
799
|
+
},
|
|
741
800
|
{
|
|
742
801
|
"name": "disableTransparentOnScrollEdge",
|
|
743
802
|
"tags": [],
|
|
@@ -1222,6 +1281,21 @@
|
|
|
1222
1281
|
}
|
|
1223
1282
|
]
|
|
1224
1283
|
},
|
|
1284
|
+
{
|
|
1285
|
+
"name": "NativeNavigationGlassEffect",
|
|
1286
|
+
"slug": "nativenavigationglasseffect",
|
|
1287
|
+
"docs": "Native glass background rendering preference.",
|
|
1288
|
+
"types": [
|
|
1289
|
+
{
|
|
1290
|
+
"text": "'none'",
|
|
1291
|
+
"complexTypes": []
|
|
1292
|
+
},
|
|
1293
|
+
{
|
|
1294
|
+
"text": "'liquidGlass'",
|
|
1295
|
+
"complexTypes": []
|
|
1296
|
+
}
|
|
1297
|
+
]
|
|
1298
|
+
},
|
|
1225
1299
|
{
|
|
1226
1300
|
"name": "NativeNavigationBlurEffect",
|
|
1227
1301
|
"slug": "nativenavigationblureffect",
|
package/dist/esm/components.js
CHANGED
|
@@ -25,7 +25,7 @@ export function defineNativeNavigationElements() {
|
|
|
25
25
|
}
|
|
26
26
|
class CapNativeNavigationProvider extends HTMLElement {
|
|
27
27
|
static get observedAttributes() {
|
|
28
|
-
return ['enabled', 'platform-style', 'content-inset-mode', 'animation-duration', 'colors'];
|
|
28
|
+
return ['enabled', 'platform-style', 'content-inset-mode', 'animation-duration', 'colors', 'glass'];
|
|
29
29
|
}
|
|
30
30
|
connectedCallback() {
|
|
31
31
|
void this.sync();
|
|
@@ -43,6 +43,7 @@ export function defineNativeNavigationElements() {
|
|
|
43
43
|
platformStyle: (_a = typedAttribute(this, 'platform-style')) !== null && _a !== void 0 ? _a : 'auto',
|
|
44
44
|
contentInsetMode: (_b = typedAttribute(this, 'content-inset-mode')) !== null && _b !== void 0 ? _b : 'css',
|
|
45
45
|
colors: parseJsonAttribute(this, 'colors', undefined),
|
|
46
|
+
glass: parseJsonAttribute(this, 'glass', undefined),
|
|
46
47
|
};
|
|
47
48
|
if (duration) {
|
|
48
49
|
options.animationDuration = Number(duration);
|
|
@@ -65,6 +66,7 @@ export function defineNativeNavigationElements() {
|
|
|
65
66
|
'left-items',
|
|
66
67
|
'right-items',
|
|
67
68
|
'colors',
|
|
69
|
+
'glass',
|
|
68
70
|
'animated',
|
|
69
71
|
];
|
|
70
72
|
}
|
|
@@ -92,6 +94,7 @@ export function defineNativeNavigationElements() {
|
|
|
92
94
|
leftItems: parseJsonAttribute(this, 'left-items', []),
|
|
93
95
|
rightItems: parseJsonAttribute(this, 'right-items', []),
|
|
94
96
|
colors: parseJsonAttribute(this, 'colors', undefined),
|
|
97
|
+
glass: parseJsonAttribute(this, 'glass', undefined),
|
|
95
98
|
animated: parseBoolean(this.getAttribute('animated')),
|
|
96
99
|
};
|
|
97
100
|
const NativeNavigation = await getNativeNavigation();
|
|
@@ -108,6 +111,7 @@ export function defineNativeNavigationElements() {
|
|
|
108
111
|
'label-visibility-mode',
|
|
109
112
|
'icons',
|
|
110
113
|
'colors',
|
|
114
|
+
'glass',
|
|
111
115
|
'blur-effect',
|
|
112
116
|
'disable-indicator',
|
|
113
117
|
'indicator-color',
|
|
@@ -134,6 +138,7 @@ export function defineNativeNavigationElements() {
|
|
|
134
138
|
labelVisibilityMode: typedAttribute(this, 'label-visibility-mode'),
|
|
135
139
|
icons: parseBoolean(this.getAttribute('icons'), true),
|
|
136
140
|
colors: parseJsonAttribute(this, 'colors', undefined),
|
|
141
|
+
glass: parseJsonAttribute(this, 'glass', undefined),
|
|
137
142
|
blurEffect: typedAttribute(this, 'blur-effect'),
|
|
138
143
|
disableIndicator: parseBoolean(this.getAttribute('disable-indicator')),
|
|
139
144
|
indicatorColor: normalizeAttribute(this.getAttribute('indicator-color')),
|
|
@@ -1 +1 @@
|
|
|
1
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,cAAc,EAAE,kBAAkB,CAAC,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;gBACxE,WAAW,EAAE,kBAAkB,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;gBAClE,oBAAoB,EAAE,kBAAkB,CAAC,IAAI,CAAC,YAAY,CAAC,wBAAwB,CAAC,CAAC;gBACrF,cAAc,EAAE,kBAAkB,CAAC,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC;gBACzE,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;aACtD,CAAC;YAEF,MAAM,gBAAgB,GAAG,MAAM,mBAAmB,EAAE,CAAC;YACrD,MAAM,gBAAgB,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAC5C,CAAC;KACF;IAED,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,gCAAgC,CAAC,EAAE,CAAC;QAC1D,cAAc,CAAC,MAAM,CAAC,gCAAgC,EAAE,2BAA2B,CAAC,CAAC;IACvF,CAAC;IACD,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,mBAAmB,CAAC,EAAE,CAAC;QAC7C,cAAc,CAAC,MAAM,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAC;IAC9D,CAAC;IACD,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,mBAAmB,CAAC,EAAE,CAAC;QAC7C,cAAc,CAAC,MAAM,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC","sourcesContent":["import type {\n NativeNavigationConfigureOptions,\n NativeNavigationNavbarOptions,\n NativeNavigationTabbarOptions,\n} from './definitions';\n\nconst parseBoolean = (value: string | null, defaultValue = false): boolean => {\n if (value === null) {\n return defaultValue;\n }\n return value === '' || value === 'true' || value === '1';\n};\n\nconst normalizeAttribute = (value: string | null): string | undefined => (value ? value : undefined);\n\nconst typedAttribute = <T extends string>(element: Element, name: string): T | undefined =>\n normalizeAttribute(element.getAttribute(name)) as T | undefined;\n\nconst parseJsonAttribute = <T>(element: Element, name: string, fallback: T): T => {\n const value = element.getAttribute(name);\n if (!value) {\n return fallback;\n }\n\n try {\n return JSON.parse(value) as T;\n } catch {\n return fallback;\n }\n};\n\nconst getNativeNavigation = async () => (await import('./index')).NativeNavigation;\n\nexport function defineNativeNavigationElements(): void {\n if (typeof customElements === 'undefined' || typeof HTMLElement === 'undefined') {\n return;\n }\n\n class CapNativeNavigationProvider extends HTMLElement {\n static get observedAttributes(): string[] {\n return ['enabled', 'platform-style', 'content-inset-mode', 'animation-duration', 'colors'];\n }\n\n connectedCallback(): void {\n void this.sync();\n }\n\n attributeChangedCallback(): void {\n if (this.isConnected) {\n void this.sync();\n }\n }\n\n private async sync(): Promise<void> {\n const duration = this.getAttribute('animation-duration');\n const options: NativeNavigationConfigureOptions = {\n enabled: parseBoolean(this.getAttribute('enabled'), true),\n platformStyle:\n typedAttribute<NonNullable<NativeNavigationConfigureOptions['platformStyle']>>(this, 'platform-style') ??\n 'auto',\n contentInsetMode:\n typedAttribute<NonNullable<NativeNavigationConfigureOptions['contentInsetMode']>>(\n this,\n 'content-inset-mode',\n ) ?? 'css',\n colors: parseJsonAttribute(this, 'colors', undefined as NativeNavigationConfigureOptions['colors']),\n };\n\n if (duration) {\n options.animationDuration = Number(duration);\n }\n\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.configure(options);\n }\n }\n\n class CapNativeNavbar extends HTMLElement {\n static get observedAttributes(): string[] {\n return [\n 'hidden',\n 'title',\n 'subtitle',\n 'large',\n 'transparent',\n 'blur-effect',\n 'back-button',\n 'back-title',\n 'left-items',\n 'right-items',\n 'colors',\n 'animated',\n ];\n }\n\n connectedCallback(): void {\n void this.sync();\n }\n\n attributeChangedCallback(): void {\n if (this.isConnected) {\n void this.sync();\n }\n }\n\n private async sync(): Promise<void> {\n const options: NativeNavigationNavbarOptions = {\n hidden: parseBoolean(this.getAttribute('hidden')),\n title: this.getAttribute('title') ?? undefined,\n subtitle: this.getAttribute('subtitle') ?? undefined,\n large: parseBoolean(this.getAttribute('large')),\n transparent: parseBoolean(this.getAttribute('transparent')),\n blurEffect: typedAttribute<NonNullable<NativeNavigationNavbarOptions['blurEffect']>>(this, 'blur-effect'),\n backButton: {\n visible: parseBoolean(this.getAttribute('back-button')),\n title: normalizeAttribute(this.getAttribute('back-title')),\n },\n leftItems: parseJsonAttribute(this, 'left-items', []),\n rightItems: parseJsonAttribute(this, 'right-items', []),\n colors: parseJsonAttribute(this, 'colors', undefined as NativeNavigationNavbarOptions['colors']),\n animated: parseBoolean(this.getAttribute('animated')),\n };\n\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.setNavbar(options);\n }\n }\n\n class CapNativeTabbar extends HTMLElement {\n static get observedAttributes(): string[] {\n return [\n 'hidden',\n 'tabs',\n 'selected-id',\n 'labels',\n 'label-visibility-mode',\n 'icons',\n 'colors',\n 'blur-effect',\n 'disable-indicator',\n 'indicator-color',\n 'ripple-color',\n 'badge-background-color',\n 'badge-text-color',\n 'animated',\n ];\n }\n\n connectedCallback(): void {\n void this.sync();\n }\n\n attributeChangedCallback(): void {\n if (this.isConnected) {\n void this.sync();\n }\n }\n\n private async sync(): Promise<void> {\n const options: NativeNavigationTabbarOptions = {\n hidden: parseBoolean(this.getAttribute('hidden')),\n tabs: parseJsonAttribute(this, 'tabs', []),\n selectedId: normalizeAttribute(this.getAttribute('selected-id')),\n labels: parseBoolean(this.getAttribute('labels'), true),\n labelVisibilityMode: typedAttribute<NonNullable<NativeNavigationTabbarOptions['labelVisibilityMode']>>(\n this,\n 'label-visibility-mode',\n ),\n icons: parseBoolean(this.getAttribute('icons'), true),\n colors: parseJsonAttribute(this, 'colors', undefined as NativeNavigationTabbarOptions['colors']),\n blurEffect: typedAttribute<NonNullable<NativeNavigationTabbarOptions['blurEffect']>>(this, 'blur-effect'),\n disableIndicator: parseBoolean(this.getAttribute('disable-indicator')),\n indicatorColor: normalizeAttribute(this.getAttribute('indicator-color')),\n rippleColor: normalizeAttribute(this.getAttribute('ripple-color')),\n badgeBackgroundColor: normalizeAttribute(this.getAttribute('badge-background-color')),\n badgeTextColor: normalizeAttribute(this.getAttribute('badge-text-color')),\n animated: parseBoolean(this.getAttribute('animated')),\n };\n\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.setTabbar(options);\n }\n }\n\n if (!customElements.get('cap-native-navigation-provider')) {\n customElements.define('cap-native-navigation-provider', CapNativeNavigationProvider);\n }\n if (!customElements.get('cap-native-navbar')) {\n customElements.define('cap-native-navbar', CapNativeNavbar);\n }\n if (!customElements.get('cap-native-tabbar')) {\n customElements.define('cap-native-tabbar', CapNativeTabbar);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../src/components.ts"],"names":[],"mappings":"AAMA,MAAM,YAAY,GAAG,CAAC,KAAoB,EAAE,YAAY,GAAG,KAAK,EAAW,EAAE;IAC3E,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,OAAO,YAAY,CAAC;IACtB,CAAC;IACD,OAAO,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,GAAG,CAAC;AAC3D,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,KAAoB,EAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AAErG,MAAM,cAAc,GAAG,CAAmB,OAAgB,EAAE,IAAY,EAAiB,EAAE,CACzF,kBAAkB,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAkB,CAAC;AAElE,MAAM,kBAAkB,GAAG,CAAI,OAAgB,EAAE,IAAY,EAAE,QAAW,EAAK,EAAE;IAC/E,MAAM,KAAK,GAAG,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IACzC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,QA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,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,gCAAgC,CAAC,EAAE,CAAC;QAC1D,cAAc,CAAC,MAAM,CAAC,gCAAgC,EAAE,2BAA2B,CAAC,CAAC;IACvF,CAAC;IACD,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,mBAAmB,CAAC,EAAE,CAAC;QAC7C,cAAc,CAAC,MAAM,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAC;IAC9D,CAAC;IACD,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,mBAAmB,CAAC,EAAE,CAAC;QAC7C,cAAc,CAAC,MAAM,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC","sourcesContent":["import type {\n NativeNavigationConfigureOptions,\n NativeNavigationNavbarOptions,\n NativeNavigationTabbarOptions,\n} from './definitions';\n\nconst parseBoolean = (value: string | null, defaultValue = false): boolean => {\n if (value === null) {\n return defaultValue;\n }\n return value === '' || value === 'true' || value === '1';\n};\n\nconst normalizeAttribute = (value: string | null): string | undefined => (value ? value : undefined);\n\nconst typedAttribute = <T extends string>(element: Element, name: string): T | undefined =>\n normalizeAttribute(element.getAttribute(name)) as T | undefined;\n\nconst parseJsonAttribute = <T>(element: Element, name: string, fallback: T): T => {\n const value = element.getAttribute(name);\n if (!value) {\n return fallback;\n }\n\n try {\n return JSON.parse(value) as T;\n } catch {\n return fallback;\n }\n};\n\nconst getNativeNavigation = async () => (await import('./index')).NativeNavigation;\n\nexport function defineNativeNavigationElements(): void {\n if (typeof customElements === 'undefined' || typeof HTMLElement === 'undefined') {\n return;\n }\n\n class CapNativeNavigationProvider extends HTMLElement {\n static get observedAttributes(): string[] {\n return ['enabled', 'platform-style', 'content-inset-mode', 'animation-duration', 'colors', 'glass'];\n }\n\n connectedCallback(): void {\n void this.sync();\n }\n\n attributeChangedCallback(): void {\n if (this.isConnected) {\n void this.sync();\n }\n }\n\n private async sync(): Promise<void> {\n const duration = this.getAttribute('animation-duration');\n const options: NativeNavigationConfigureOptions = {\n enabled: parseBoolean(this.getAttribute('enabled'), true),\n platformStyle:\n typedAttribute<NonNullable<NativeNavigationConfigureOptions['platformStyle']>>(this, 'platform-style') ??\n 'auto',\n contentInsetMode:\n typedAttribute<NonNullable<NativeNavigationConfigureOptions['contentInsetMode']>>(\n this,\n 'content-inset-mode',\n ) ?? 'css',\n colors: parseJsonAttribute(this, 'colors', undefined as NativeNavigationConfigureOptions['colors']),\n glass: parseJsonAttribute(this, 'glass', undefined as NativeNavigationConfigureOptions['glass']),\n };\n\n if (duration) {\n options.animationDuration = Number(duration);\n }\n\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.configure(options);\n }\n }\n\n class CapNativeNavbar extends HTMLElement {\n static get observedAttributes(): string[] {\n return [\n 'hidden',\n 'title',\n 'subtitle',\n 'large',\n 'transparent',\n 'blur-effect',\n 'back-button',\n 'back-title',\n 'left-items',\n 'right-items',\n 'colors',\n 'glass',\n 'animated',\n ];\n }\n\n connectedCallback(): void {\n void this.sync();\n }\n\n attributeChangedCallback(): void {\n if (this.isConnected) {\n void this.sync();\n }\n }\n\n private async sync(): Promise<void> {\n const options: NativeNavigationNavbarOptions = {\n hidden: parseBoolean(this.getAttribute('hidden')),\n title: this.getAttribute('title') ?? undefined,\n subtitle: this.getAttribute('subtitle') ?? undefined,\n large: parseBoolean(this.getAttribute('large')),\n transparent: parseBoolean(this.getAttribute('transparent')),\n blurEffect: typedAttribute<NonNullable<NativeNavigationNavbarOptions['blurEffect']>>(this, 'blur-effect'),\n backButton: {\n visible: parseBoolean(this.getAttribute('back-button')),\n title: normalizeAttribute(this.getAttribute('back-title')),\n },\n leftItems: parseJsonAttribute(this, 'left-items', []),\n rightItems: parseJsonAttribute(this, 'right-items', []),\n colors: parseJsonAttribute(this, 'colors', undefined as NativeNavigationNavbarOptions['colors']),\n glass: parseJsonAttribute(this, 'glass', undefined as NativeNavigationNavbarOptions['glass']),\n animated: parseBoolean(this.getAttribute('animated')),\n };\n\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.setNavbar(options);\n }\n }\n\n class CapNativeTabbar extends HTMLElement {\n static get observedAttributes(): string[] {\n return [\n 'hidden',\n 'tabs',\n 'selected-id',\n 'labels',\n 'label-visibility-mode',\n 'icons',\n 'colors',\n 'glass',\n 'blur-effect',\n 'disable-indicator',\n 'indicator-color',\n 'ripple-color',\n 'badge-background-color',\n 'badge-text-color',\n 'animated',\n ];\n }\n\n connectedCallback(): void {\n void this.sync();\n }\n\n attributeChangedCallback(): void {\n if (this.isConnected) {\n void this.sync();\n }\n }\n\n private async sync(): Promise<void> {\n const options: NativeNavigationTabbarOptions = {\n hidden: parseBoolean(this.getAttribute('hidden')),\n tabs: parseJsonAttribute(this, 'tabs', []),\n selectedId: normalizeAttribute(this.getAttribute('selected-id')),\n labels: parseBoolean(this.getAttribute('labels'), true),\n labelVisibilityMode: typedAttribute<NonNullable<NativeNavigationTabbarOptions['labelVisibilityMode']>>(\n this,\n 'label-visibility-mode',\n ),\n icons: parseBoolean(this.getAttribute('icons'), true),\n colors: parseJsonAttribute(this, 'colors', undefined as NativeNavigationTabbarOptions['colors']),\n glass: parseJsonAttribute(this, 'glass', undefined as NativeNavigationTabbarOptions['glass']),\n blurEffect: typedAttribute<NonNullable<NativeNavigationTabbarOptions['blurEffect']>>(this, 'blur-effect'),\n disableIndicator: parseBoolean(this.getAttribute('disable-indicator')),\n indicatorColor: normalizeAttribute(this.getAttribute('indicator-color')),\n rippleColor: normalizeAttribute(this.getAttribute('ripple-color')),\n badgeBackgroundColor: normalizeAttribute(this.getAttribute('badge-background-color')),\n badgeTextColor: normalizeAttribute(this.getAttribute('badge-text-color')),\n animated: parseBoolean(this.getAttribute('animated')),\n };\n\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.setTabbar(options);\n }\n }\n\n if (!customElements.get('cap-native-navigation-provider')) {\n customElements.define('cap-native-navigation-provider', CapNativeNavigationProvider);\n }\n if (!customElements.get('cap-native-navbar')) {\n customElements.define('cap-native-navbar', CapNativeNavbar);\n }\n if (!customElements.get('cap-native-tabbar')) {\n customElements.define('cap-native-tabbar', CapNativeTabbar);\n }\n}\n"]}
|
|
@@ -15,6 +15,30 @@ export type NativeNavigationTransitionDirection = 'forward' | 'back' | 'root' |
|
|
|
15
15
|
* Native material/blur effect preference.
|
|
16
16
|
*/
|
|
17
17
|
export type NativeNavigationBlurEffect = 'none' | 'systemDefault' | 'extraLight' | 'light' | 'dark' | 'regular' | 'prominent' | 'systemUltraThinMaterial' | 'systemThinMaterial' | 'systemMaterial' | 'systemThickMaterial' | 'systemChromeMaterial' | 'systemUltraThinMaterialLight' | 'systemThinMaterialLight' | 'systemMaterialLight' | 'systemThickMaterialLight' | 'systemChromeMaterialLight' | 'systemUltraThinMaterialDark' | 'systemThinMaterialDark' | 'systemMaterialDark' | 'systemThickMaterialDark' | 'systemChromeMaterialDark';
|
|
18
|
+
/**
|
|
19
|
+
* Native glass background rendering preference.
|
|
20
|
+
*/
|
|
21
|
+
export type NativeNavigationGlassEffect = 'none' | 'liquidGlass';
|
|
22
|
+
/**
|
|
23
|
+
* Native glass background configuration.
|
|
24
|
+
*/
|
|
25
|
+
export interface NativeNavigationGlassOptions {
|
|
26
|
+
/**
|
|
27
|
+
* `liquidGlass` enables the Android 12+ live blurred WebView backdrop for
|
|
28
|
+
* native bars. Android 11 and older keep a translucent surface fallback. iOS
|
|
29
|
+
* uses the platform-owned Liquid Glass behavior.
|
|
30
|
+
*/
|
|
31
|
+
effect?: NativeNavigationGlassEffect;
|
|
32
|
+
/**
|
|
33
|
+
* Android blur radius in native dp for `liquidGlass`. Defaults to `18`.
|
|
34
|
+
*/
|
|
35
|
+
blurRadius?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Alpha multiplier for the tint surface over the glass backdrop. Defaults to
|
|
38
|
+
* `0.62`.
|
|
39
|
+
*/
|
|
40
|
+
surfaceAlpha?: number;
|
|
41
|
+
}
|
|
18
42
|
/**
|
|
19
43
|
* Native tab label visibility behavior.
|
|
20
44
|
*/
|
|
@@ -159,6 +183,10 @@ export interface NativeNavigationConfigureOptions {
|
|
|
159
183
|
* Shared color hints for native bars.
|
|
160
184
|
*/
|
|
161
185
|
colors?: NativeNavigationColors;
|
|
186
|
+
/**
|
|
187
|
+
* Shared glass background defaults for native bars.
|
|
188
|
+
*/
|
|
189
|
+
glass?: NativeNavigationGlassOptions;
|
|
162
190
|
}
|
|
163
191
|
/**
|
|
164
192
|
* A button shown in the native navbar.
|
|
@@ -223,6 +251,11 @@ export interface NativeNavigationNavbarOptions {
|
|
|
223
251
|
* available. Defaults to `systemChromeMaterial` for transparent bars.
|
|
224
252
|
*/
|
|
225
253
|
blurEffect?: NativeNavigationBlurEffect;
|
|
254
|
+
/**
|
|
255
|
+
* Optional glass background behavior. Overrides `configure({ glass })` for
|
|
256
|
+
* this navbar update.
|
|
257
|
+
*/
|
|
258
|
+
glass?: NativeNavigationGlassOptions;
|
|
226
259
|
/**
|
|
227
260
|
* Back button state.
|
|
228
261
|
*/
|
|
@@ -311,6 +344,11 @@ export interface NativeNavigationTabbarOptions {
|
|
|
311
344
|
* available.
|
|
312
345
|
*/
|
|
313
346
|
blurEffect?: NativeNavigationBlurEffect;
|
|
347
|
+
/**
|
|
348
|
+
* Optional glass background behavior. Overrides `configure({ glass })` for
|
|
349
|
+
* this tabbar update.
|
|
350
|
+
*/
|
|
351
|
+
glass?: NativeNavigationGlassOptions;
|
|
314
352
|
/**
|
|
315
353
|
* Keep the iOS scroll-edge tabbar appearance from becoming transparent.
|
|
316
354
|
* Mirrors Expo Router native tabs' `disableTransparentOnScrollEdge` option.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\n/**\n * Platform rendering preference for the native bars.\n */\nexport type NativeNavigationPlatformStyle = 'auto' | 'ios' | 'android';\n\n/**\n * How the plugin exposes native bar sizes to web content.\n */\nexport type NativeNavigationContentInsetMode = 'css' | 'none';\n\n/**\n * Navigation animation direction.\n */\nexport type NativeNavigationTransitionDirection = 'forward' | 'back' | 'root' | 'tab' | 'zoom' | 'none';\n\n/**\n * Native material/blur effect preference.\n */\nexport type NativeNavigationBlurEffect =\n | 'none'\n | 'systemDefault'\n | 'extraLight'\n | 'light'\n | 'dark'\n | 'regular'\n | 'prominent'\n | 'systemUltraThinMaterial'\n | 'systemThinMaterial'\n | 'systemMaterial'\n | 'systemThickMaterial'\n | 'systemChromeMaterial'\n | 'systemUltraThinMaterialLight'\n | 'systemThinMaterialLight'\n | 'systemMaterialLight'\n | 'systemThickMaterialLight'\n | 'systemChromeMaterialLight'\n | 'systemUltraThinMaterialDark'\n | 'systemThinMaterialDark'\n | 'systemMaterialDark'\n | 'systemThickMaterialDark'\n | 'systemChromeMaterialDark';\n\n/**\n * Native tab label visibility behavior.\n */\nexport type NativeNavigationTabLabelVisibilityMode = 'auto' | 'selected' | 'labeled' | 'unlabeled';\n\n/**\n * A rectangle in WebView viewport coordinates, expressed in native points/dp.\n */\nexport interface NativeNavigationRect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\n/**\n * A serializable icon descriptor. Framework nodes are intentionally not accepted\n * because icons are rendered by native UI.\n */\nexport interface NativeNavigationIcon {\n /**\n * Cross-platform asset path or URL fallback.\n */\n src?: string;\n\n /**\n * Cross-platform inline SVG markup. The native renderers support common icon\n * shapes such as path, line, polyline, polygon, circle, and rect. SVG icons\n * are rendered as template images by default so native tint colors still\n * apply.\n */\n svg?: string;\n\n /**\n * Preferred rendered icon width in native points/dp. Defaults to `24`.\n */\n width?: number;\n\n /**\n * Preferred rendered icon height in native points/dp. Defaults to `24`.\n */\n height?: number;\n\n /**\n * When `true`, native tint colors are applied to the rendered SVG/image.\n * Defaults to `true`.\n */\n template?: boolean;\n\n /**\n * iOS-specific SF Symbol, bundled image name, or inline SVG.\n */\n ios?: {\n /**\n * SF Symbol name, for example `house.fill`.\n */\n sfSymbol?: string;\n\n /**\n * Bundled image name from the app asset catalog.\n */\n image?: string;\n\n /**\n * iOS-specific inline SVG markup.\n */\n svg?: string;\n };\n\n /**\n * Android-specific drawable resource, asset name, or inline SVG.\n */\n android?: {\n /**\n * Drawable resource name without the `R.drawable.` prefix.\n */\n resource?: string;\n\n /**\n * Bundled image asset name.\n */\n image?: string;\n\n /**\n * Android-specific inline SVG markup.\n */\n svg?: string;\n };\n}\n\n/**\n * Native bar colors. Use CSS-style hex strings (`#RRGGBB` or `#AARRGGBB`).\n */\nexport interface NativeNavigationColors {\n /**\n * When `true`, Android 12+ derives unspecified bar colors from Material You\n * system palettes. Explicit color fields still win.\n */\n dynamic?: boolean;\n\n /**\n * Tint color for active buttons/items.\n */\n tint?: string;\n\n /**\n * Color for inactive tab items.\n */\n inactiveTint?: string;\n\n /**\n * Optional background tint. Ignored on iOS 26+ so UIKit can preserve the\n * system Liquid Glass navigation appearance.\n */\n background?: string;\n\n /**\n * Title and label text color where the native platform supports it.\n */\n foreground?: string;\n\n /**\n * Badge background color for native tab badges.\n */\n badgeBackground?: string;\n\n /**\n * Badge text color for native tab badges.\n */\n badgeText?: string;\n\n /**\n * Active tab indicator color on Android.\n */\n indicator?: string;\n\n /**\n * Tab press ripple color on Android.\n */\n ripple?: string;\n}\n\n/**\n * Global plugin configuration.\n */\nexport interface NativeNavigationConfigureOptions {\n /**\n * Enables or disables the native chrome host.\n */\n enabled?: boolean;\n\n /**\n * Native style preference. `auto` uses the current platform.\n */\n platformStyle?: NativeNavigationPlatformStyle;\n\n /**\n * When `css`, the plugin writes CSS variables on `document.documentElement`.\n */\n contentInsetMode?: NativeNavigationContentInsetMode;\n\n /**\n * Default native transition duration in milliseconds.\n */\n animationDuration?: number;\n\n /**\n * Shared color hints for native bars.\n */\n colors?: NativeNavigationColors;\n}\n\n/**\n * A button shown in the native navbar.\n */\nexport interface NativeNavigationBarButton {\n /**\n * Stable id returned in `navbarItemTap`.\n */\n id: string;\n\n /**\n * Visible text label.\n */\n title?: string;\n\n /**\n * Native icon descriptor.\n */\n icon?: NativeNavigationIcon;\n\n /**\n * Whether the action is enabled. Defaults to `true`.\n */\n enabled?: boolean;\n}\n\n/**\n * Native back button configuration.\n */\nexport interface NativeNavigationBackButton {\n /**\n * Show the native back affordance.\n */\n visible?: boolean;\n\n /**\n * Optional back title.\n */\n title?: string;\n}\n\n/**\n * Native navbar state.\n */\nexport interface NativeNavigationNavbarOptions {\n /**\n * Hide the native navbar.\n */\n hidden?: boolean;\n\n /**\n * Main title.\n */\n title?: string;\n\n /**\n * Secondary title where supported by the platform.\n */\n subtitle?: string;\n\n /**\n * Prefer a large iOS title style.\n */\n large?: boolean;\n\n /**\n * Prefer transparent/scroll-edge style.\n */\n transparent?: boolean;\n\n /**\n * iOS blur/material effect for the navbar background when glass is not\n * available. Defaults to `systemChromeMaterial` for transparent bars.\n */\n blurEffect?: NativeNavigationBlurEffect;\n\n /**\n * Back button state.\n */\n backButton?: NativeNavigationBackButton;\n\n /**\n * Left-side action buttons.\n */\n leftItems?: NativeNavigationBarButton[];\n\n /**\n * Right-side action buttons.\n */\n rightItems?: NativeNavigationBarButton[];\n\n /**\n * Navbar color hints.\n */\n colors?: NativeNavigationColors;\n\n /**\n * Animate native navbar changes.\n */\n animated?: boolean;\n}\n\n/**\n * A native tab item.\n */\nexport interface NativeNavigationTab {\n /**\n * Stable tab id returned in `tabSelect`.\n */\n id: string;\n\n /**\n * Visible tab label.\n */\n title?: string;\n\n /**\n * Native icon descriptor.\n */\n icon?: NativeNavigationIcon;\n\n /**\n * Optional selected-state icon.\n */\n selectedIcon?: NativeNavigationIcon;\n\n /**\n * Optional badge. Numeric badges are supported on both platforms; text badge\n * support depends on platform capabilities.\n */\n badge?: string | number;\n\n /**\n * Whether the tab is enabled. Defaults to `true`.\n */\n enabled?: boolean;\n}\n\n/**\n * Native tabbar state.\n */\nexport interface NativeNavigationTabbarOptions {\n /**\n * Hide the native tabbar.\n */\n hidden?: boolean;\n\n /**\n * Tab definitions.\n */\n tabs?: NativeNavigationTab[];\n\n /**\n * Currently selected tab id.\n */\n selectedId?: string;\n\n /**\n * Show text labels. Defaults to `true`.\n */\n labels?: boolean;\n\n /**\n * Native label visibility mode. Overrides `labels` when provided.\n */\n labelVisibilityMode?: NativeNavigationTabLabelVisibilityMode;\n\n /**\n * Show icons. Defaults to `true`.\n */\n icons?: boolean;\n\n /**\n * Tabbar color hints.\n */\n colors?: NativeNavigationColors;\n\n /**\n * iOS blur/material effect for the tabbar background when glass is not\n * available.\n */\n blurEffect?: NativeNavigationBlurEffect;\n\n /**\n * Keep the iOS scroll-edge tabbar appearance from becoming transparent.\n * Mirrors Expo Router native tabs' `disableTransparentOnScrollEdge` option.\n * Defaults to `false`.\n */\n disableTransparentOnScrollEdge?: boolean;\n\n /**\n * Disable the Android active tab indicator.\n */\n disableIndicator?: boolean;\n\n /**\n * Active tab indicator color on Android. `colors.indicator` is also\n * supported.\n */\n indicatorColor?: string;\n\n /**\n * Tab press ripple color on Android. `colors.ripple` is also supported.\n */\n rippleColor?: string;\n\n /**\n * Badge background color. `colors.badgeBackground` is also supported.\n */\n badgeBackgroundColor?: string;\n\n /**\n * Badge text color. `colors.badgeText` is also supported.\n */\n badgeTextColor?: string;\n\n /**\n * Animate native tabbar changes.\n */\n animated?: boolean;\n}\n\n/**\n * Insets exposed to web content.\n */\nexport interface NativeNavigationInsets {\n top: number;\n right: number;\n bottom: number;\n left: number;\n navbarHeight: number;\n tabbarHeight: number;\n}\n\n/**\n * Returned by methods that may change safe content bounds.\n */\nexport interface NativeNavigationInsetsResult {\n insets: NativeNavigationInsets;\n}\n\n/**\n * Begin a native transition transaction before JS changes route content.\n */\nexport interface NativeNavigationBeginTransitionOptions {\n id?: string;\n direction?: NativeNavigationTransitionDirection;\n duration?: number;\n /**\n * Source rectangle for `zoom` transitions. Use viewport coordinates such as\n * those returned by `Element.getBoundingClientRect()`.\n */\n sourceRect?: NativeNavigationRect;\n /**\n * Destination rectangle for shared-element-style `zoom` transitions.\n */\n targetRect?: NativeNavigationRect;\n /**\n * Corner radius used while animating a `zoom` transition.\n */\n cornerRadius?: number;\n}\n\n/**\n * Finish a native transition transaction after JS has changed route content.\n */\nexport interface NativeNavigationFinishTransitionOptions {\n id?: string;\n direction?: NativeNavigationTransitionDirection;\n duration?: number;\n /**\n * Source rectangle for `zoom` transitions when no active source was recorded.\n */\n sourceRect?: NativeNavigationRect;\n /**\n * Destination rectangle for shared-element-style `zoom` transitions.\n */\n targetRect?: NativeNavigationRect;\n /**\n * Corner radius used while animating a `zoom` transition.\n */\n cornerRadius?: number;\n}\n\n/**\n * Native transition result.\n */\nexport interface NativeNavigationTransitionResult {\n id: string;\n direction: NativeNavigationTransitionDirection;\n duration: number;\n}\n\n/**\n * Plugin version payload.\n */\nexport interface PluginVersionResult {\n /**\n * Version identifier returned by the platform implementation.\n */\n version: string;\n}\n\nexport interface NativeNavigationBackEvent {\n source: 'navbar';\n}\n\nexport interface NativeNavigationBarItemTapEvent {\n id: string;\n title?: string;\n placement: 'left' | 'right';\n}\n\nexport interface NativeNavigationTabSelectEvent {\n id: string;\n index: number;\n title?: string;\n}\n\nexport interface NativeNavigationSafeAreaChangedEvent {\n insets: NativeNavigationInsets;\n}\n\nexport interface NativeNavigationTransitionEvent {\n id: string;\n direction: NativeNavigationTransitionDirection;\n duration: number;\n}\n\n/**\n * Framework-agnostic native navigation chrome API.\n */\nexport interface NativeNavigationPlugin {\n /**\n * Configure the native chrome host and content inset behavior.\n */\n configure(options?: NativeNavigationConfigureOptions): Promise<NativeNavigationInsetsResult>;\n\n /**\n * Render or update the native navbar.\n */\n setNavbar(options: NativeNavigationNavbarOptions): Promise<NativeNavigationInsetsResult>;\n\n /**\n * Render or update the native tabbar.\n */\n setTabbar(options: NativeNavigationTabbarOptions): Promise<NativeNavigationInsetsResult>;\n\n /**\n * Capture the current WebView and prepare a native transition.\n */\n beginTransition(options?: NativeNavigationBeginTransitionOptions): Promise<NativeNavigationTransitionResult>;\n\n /**\n * Animate from the captured WebView snapshot to the current live WebView.\n */\n finishTransition(options?: NativeNavigationFinishTransitionOptions): Promise<NativeNavigationTransitionResult>;\n\n /**\n * Returns the platform implementation version marker.\n */\n getPluginVersion(): Promise<PluginVersionResult>;\n\n addListener(\n eventName: 'navbarBack',\n listenerFunc: (event: NativeNavigationBackEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'navbarItemTap',\n listenerFunc: (event: NativeNavigationBarItemTapEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'tabSelect',\n listenerFunc: (event: NativeNavigationTabSelectEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'safeAreaChanged',\n listenerFunc: (event: NativeNavigationSafeAreaChangedEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'transitionStart',\n listenerFunc: (event: NativeNavigationTransitionEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'transitionEnd',\n listenerFunc: (event: NativeNavigationTransitionEvent) => void,\n ): Promise<PluginListenerHandle>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\n/**\n * Platform rendering preference for the native bars.\n */\nexport type NativeNavigationPlatformStyle = 'auto' | 'ios' | 'android';\n\n/**\n * How the plugin exposes native bar sizes to web content.\n */\nexport type NativeNavigationContentInsetMode = 'css' | 'none';\n\n/**\n * Navigation animation direction.\n */\nexport type NativeNavigationTransitionDirection = 'forward' | 'back' | 'root' | 'tab' | 'zoom' | 'none';\n\n/**\n * Native material/blur effect preference.\n */\nexport type NativeNavigationBlurEffect =\n | 'none'\n | 'systemDefault'\n | 'extraLight'\n | 'light'\n | 'dark'\n | 'regular'\n | 'prominent'\n | 'systemUltraThinMaterial'\n | 'systemThinMaterial'\n | 'systemMaterial'\n | 'systemThickMaterial'\n | 'systemChromeMaterial'\n | 'systemUltraThinMaterialLight'\n | 'systemThinMaterialLight'\n | 'systemMaterialLight'\n | 'systemThickMaterialLight'\n | 'systemChromeMaterialLight'\n | 'systemUltraThinMaterialDark'\n | 'systemThinMaterialDark'\n | 'systemMaterialDark'\n | 'systemThickMaterialDark'\n | 'systemChromeMaterialDark';\n\n/**\n * Native glass background rendering preference.\n */\nexport type NativeNavigationGlassEffect = 'none' | 'liquidGlass';\n\n/**\n * Native glass background configuration.\n */\nexport interface NativeNavigationGlassOptions {\n /**\n * `liquidGlass` enables the Android 12+ live blurred WebView backdrop for\n * native bars. Android 11 and older keep a translucent surface fallback. iOS\n * uses the platform-owned Liquid Glass behavior.\n */\n effect?: NativeNavigationGlassEffect;\n\n /**\n * Android blur radius in native dp for `liquidGlass`. Defaults to `18`.\n */\n blurRadius?: number;\n\n /**\n * Alpha multiplier for the tint surface over the glass backdrop. Defaults to\n * `0.62`.\n */\n surfaceAlpha?: number;\n}\n\n/**\n * Native tab label visibility behavior.\n */\nexport type NativeNavigationTabLabelVisibilityMode = 'auto' | 'selected' | 'labeled' | 'unlabeled';\n\n/**\n * A rectangle in WebView viewport coordinates, expressed in native points/dp.\n */\nexport interface NativeNavigationRect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\n/**\n * A serializable icon descriptor. Framework nodes are intentionally not accepted\n * because icons are rendered by native UI.\n */\nexport interface NativeNavigationIcon {\n /**\n * Cross-platform asset path or URL fallback.\n */\n src?: string;\n\n /**\n * Cross-platform inline SVG markup. The native renderers support common icon\n * shapes such as path, line, polyline, polygon, circle, and rect. SVG icons\n * are rendered as template images by default so native tint colors still\n * apply.\n */\n svg?: string;\n\n /**\n * Preferred rendered icon width in native points/dp. Defaults to `24`.\n */\n width?: number;\n\n /**\n * Preferred rendered icon height in native points/dp. Defaults to `24`.\n */\n height?: number;\n\n /**\n * When `true`, native tint colors are applied to the rendered SVG/image.\n * Defaults to `true`.\n */\n template?: boolean;\n\n /**\n * iOS-specific SF Symbol, bundled image name, or inline SVG.\n */\n ios?: {\n /**\n * SF Symbol name, for example `house.fill`.\n */\n sfSymbol?: string;\n\n /**\n * Bundled image name from the app asset catalog.\n */\n image?: string;\n\n /**\n * iOS-specific inline SVG markup.\n */\n svg?: string;\n };\n\n /**\n * Android-specific drawable resource, asset name, or inline SVG.\n */\n android?: {\n /**\n * Drawable resource name without the `R.drawable.` prefix.\n */\n resource?: string;\n\n /**\n * Bundled image asset name.\n */\n image?: string;\n\n /**\n * Android-specific inline SVG markup.\n */\n svg?: string;\n };\n}\n\n/**\n * Native bar colors. Use CSS-style hex strings (`#RRGGBB` or `#AARRGGBB`).\n */\nexport interface NativeNavigationColors {\n /**\n * When `true`, Android 12+ derives unspecified bar colors from Material You\n * system palettes. Explicit color fields still win.\n */\n dynamic?: boolean;\n\n /**\n * Tint color for active buttons/items.\n */\n tint?: string;\n\n /**\n * Color for inactive tab items.\n */\n inactiveTint?: string;\n\n /**\n * Optional background tint. Ignored on iOS 26+ so UIKit can preserve the\n * system Liquid Glass navigation appearance.\n */\n background?: string;\n\n /**\n * Title and label text color where the native platform supports it.\n */\n foreground?: string;\n\n /**\n * Badge background color for native tab badges.\n */\n badgeBackground?: string;\n\n /**\n * Badge text color for native tab badges.\n */\n badgeText?: string;\n\n /**\n * Active tab indicator color on Android.\n */\n indicator?: string;\n\n /**\n * Tab press ripple color on Android.\n */\n ripple?: string;\n}\n\n/**\n * Global plugin configuration.\n */\nexport interface NativeNavigationConfigureOptions {\n /**\n * Enables or disables the native chrome host.\n */\n enabled?: boolean;\n\n /**\n * Native style preference. `auto` uses the current platform.\n */\n platformStyle?: NativeNavigationPlatformStyle;\n\n /**\n * When `css`, the plugin writes CSS variables on `document.documentElement`.\n */\n contentInsetMode?: NativeNavigationContentInsetMode;\n\n /**\n * Default native transition duration in milliseconds.\n */\n animationDuration?: number;\n\n /**\n * Shared color hints for native bars.\n */\n colors?: NativeNavigationColors;\n\n /**\n * Shared glass background defaults for native bars.\n */\n glass?: NativeNavigationGlassOptions;\n}\n\n/**\n * A button shown in the native navbar.\n */\nexport interface NativeNavigationBarButton {\n /**\n * Stable id returned in `navbarItemTap`.\n */\n id: string;\n\n /**\n * Visible text label.\n */\n title?: string;\n\n /**\n * Native icon descriptor.\n */\n icon?: NativeNavigationIcon;\n\n /**\n * Whether the action is enabled. Defaults to `true`.\n */\n enabled?: boolean;\n}\n\n/**\n * Native back button configuration.\n */\nexport interface NativeNavigationBackButton {\n /**\n * Show the native back affordance.\n */\n visible?: boolean;\n\n /**\n * Optional back title.\n */\n title?: string;\n}\n\n/**\n * Native navbar state.\n */\nexport interface NativeNavigationNavbarOptions {\n /**\n * Hide the native navbar.\n */\n hidden?: boolean;\n\n /**\n * Main title.\n */\n title?: string;\n\n /**\n * Secondary title where supported by the platform.\n */\n subtitle?: string;\n\n /**\n * Prefer a large iOS title style.\n */\n large?: boolean;\n\n /**\n * Prefer transparent/scroll-edge style.\n */\n transparent?: boolean;\n\n /**\n * iOS blur/material effect for the navbar background when glass is not\n * available. Defaults to `systemChromeMaterial` for transparent bars.\n */\n blurEffect?: NativeNavigationBlurEffect;\n\n /**\n * Optional glass background behavior. Overrides `configure({ glass })` for\n * this navbar update.\n */\n glass?: NativeNavigationGlassOptions;\n\n /**\n * Back button state.\n */\n backButton?: NativeNavigationBackButton;\n\n /**\n * Left-side action buttons.\n */\n leftItems?: NativeNavigationBarButton[];\n\n /**\n * Right-side action buttons.\n */\n rightItems?: NativeNavigationBarButton[];\n\n /**\n * Navbar color hints.\n */\n colors?: NativeNavigationColors;\n\n /**\n * Animate native navbar changes.\n */\n animated?: boolean;\n}\n\n/**\n * A native tab item.\n */\nexport interface NativeNavigationTab {\n /**\n * Stable tab id returned in `tabSelect`.\n */\n id: string;\n\n /**\n * Visible tab label.\n */\n title?: string;\n\n /**\n * Native icon descriptor.\n */\n icon?: NativeNavigationIcon;\n\n /**\n * Optional selected-state icon.\n */\n selectedIcon?: NativeNavigationIcon;\n\n /**\n * Optional badge. Numeric badges are supported on both platforms; text badge\n * support depends on platform capabilities.\n */\n badge?: string | number;\n\n /**\n * Whether the tab is enabled. Defaults to `true`.\n */\n enabled?: boolean;\n}\n\n/**\n * Native tabbar state.\n */\nexport interface NativeNavigationTabbarOptions {\n /**\n * Hide the native tabbar.\n */\n hidden?: boolean;\n\n /**\n * Tab definitions.\n */\n tabs?: NativeNavigationTab[];\n\n /**\n * Currently selected tab id.\n */\n selectedId?: string;\n\n /**\n * Show text labels. Defaults to `true`.\n */\n labels?: boolean;\n\n /**\n * Native label visibility mode. Overrides `labels` when provided.\n */\n labelVisibilityMode?: NativeNavigationTabLabelVisibilityMode;\n\n /**\n * Show icons. Defaults to `true`.\n */\n icons?: boolean;\n\n /**\n * Tabbar color hints.\n */\n colors?: NativeNavigationColors;\n\n /**\n * iOS blur/material effect for the tabbar background when glass is not\n * available.\n */\n blurEffect?: NativeNavigationBlurEffect;\n\n /**\n * Optional glass background behavior. Overrides `configure({ glass })` for\n * this tabbar update.\n */\n glass?: NativeNavigationGlassOptions;\n\n /**\n * Keep the iOS scroll-edge tabbar appearance from becoming transparent.\n * Mirrors Expo Router native tabs' `disableTransparentOnScrollEdge` option.\n * Defaults to `false`.\n */\n disableTransparentOnScrollEdge?: boolean;\n\n /**\n * Disable the Android active tab indicator.\n */\n disableIndicator?: boolean;\n\n /**\n * Active tab indicator color on Android. `colors.indicator` is also\n * supported.\n */\n indicatorColor?: string;\n\n /**\n * Tab press ripple color on Android. `colors.ripple` is also supported.\n */\n rippleColor?: string;\n\n /**\n * Badge background color. `colors.badgeBackground` is also supported.\n */\n badgeBackgroundColor?: string;\n\n /**\n * Badge text color. `colors.badgeText` is also supported.\n */\n badgeTextColor?: string;\n\n /**\n * Animate native tabbar changes.\n */\n animated?: boolean;\n}\n\n/**\n * Insets exposed to web content.\n */\nexport interface NativeNavigationInsets {\n top: number;\n right: number;\n bottom: number;\n left: number;\n navbarHeight: number;\n tabbarHeight: number;\n}\n\n/**\n * Returned by methods that may change safe content bounds.\n */\nexport interface NativeNavigationInsetsResult {\n insets: NativeNavigationInsets;\n}\n\n/**\n * Begin a native transition transaction before JS changes route content.\n */\nexport interface NativeNavigationBeginTransitionOptions {\n id?: string;\n direction?: NativeNavigationTransitionDirection;\n duration?: number;\n /**\n * Source rectangle for `zoom` transitions. Use viewport coordinates such as\n * those returned by `Element.getBoundingClientRect()`.\n */\n sourceRect?: NativeNavigationRect;\n /**\n * Destination rectangle for shared-element-style `zoom` transitions.\n */\n targetRect?: NativeNavigationRect;\n /**\n * Corner radius used while animating a `zoom` transition.\n */\n cornerRadius?: number;\n}\n\n/**\n * Finish a native transition transaction after JS has changed route content.\n */\nexport interface NativeNavigationFinishTransitionOptions {\n id?: string;\n direction?: NativeNavigationTransitionDirection;\n duration?: number;\n /**\n * Source rectangle for `zoom` transitions when no active source was recorded.\n */\n sourceRect?: NativeNavigationRect;\n /**\n * Destination rectangle for shared-element-style `zoom` transitions.\n */\n targetRect?: NativeNavigationRect;\n /**\n * Corner radius used while animating a `zoom` transition.\n */\n cornerRadius?: number;\n}\n\n/**\n * Native transition result.\n */\nexport interface NativeNavigationTransitionResult {\n id: string;\n direction: NativeNavigationTransitionDirection;\n duration: number;\n}\n\n/**\n * Plugin version payload.\n */\nexport interface PluginVersionResult {\n /**\n * Version identifier returned by the platform implementation.\n */\n version: string;\n}\n\nexport interface NativeNavigationBackEvent {\n source: 'navbar';\n}\n\nexport interface NativeNavigationBarItemTapEvent {\n id: string;\n title?: string;\n placement: 'left' | 'right';\n}\n\nexport interface NativeNavigationTabSelectEvent {\n id: string;\n index: number;\n title?: string;\n}\n\nexport interface NativeNavigationSafeAreaChangedEvent {\n insets: NativeNavigationInsets;\n}\n\nexport interface NativeNavigationTransitionEvent {\n id: string;\n direction: NativeNavigationTransitionDirection;\n duration: number;\n}\n\n/**\n * Framework-agnostic native navigation chrome API.\n */\nexport interface NativeNavigationPlugin {\n /**\n * Configure the native chrome host and content inset behavior.\n */\n configure(options?: NativeNavigationConfigureOptions): Promise<NativeNavigationInsetsResult>;\n\n /**\n * Render or update the native navbar.\n */\n setNavbar(options: NativeNavigationNavbarOptions): Promise<NativeNavigationInsetsResult>;\n\n /**\n * Render or update the native tabbar.\n */\n setTabbar(options: NativeNavigationTabbarOptions): Promise<NativeNavigationInsetsResult>;\n\n /**\n * Capture the current WebView and prepare a native transition.\n */\n beginTransition(options?: NativeNavigationBeginTransitionOptions): Promise<NativeNavigationTransitionResult>;\n\n /**\n * Animate from the captured WebView snapshot to the current live WebView.\n */\n finishTransition(options?: NativeNavigationFinishTransitionOptions): Promise<NativeNavigationTransitionResult>;\n\n /**\n * Returns the platform implementation version marker.\n */\n getPluginVersion(): Promise<PluginVersionResult>;\n\n addListener(\n eventName: 'navbarBack',\n listenerFunc: (event: NativeNavigationBackEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'navbarItemTap',\n listenerFunc: (event: NativeNavigationBarItemTapEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'tabSelect',\n listenerFunc: (event: NativeNavigationTabSelectEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'safeAreaChanged',\n listenerFunc: (event: NativeNavigationSafeAreaChangedEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'transitionStart',\n listenerFunc: (event: NativeNavigationTransitionEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'transitionEnd',\n listenerFunc: (event: NativeNavigationTransitionEvent) => void,\n ): Promise<PluginListenerHandle>;\n}\n"]}
|
package/dist/esm/web.js
CHANGED
|
@@ -15,15 +15,15 @@ export class NativeNavigationWeb extends WebPlugin {
|
|
|
15
15
|
this.activeTransition = null;
|
|
16
16
|
}
|
|
17
17
|
async configure(options = {}) {
|
|
18
|
-
this.config = Object.assign(Object.assign(Object.assign({}, this.config), options), { colors: Object.assign(Object.assign({}, this.config.colors), options.colors) });
|
|
18
|
+
this.config = Object.assign(Object.assign(Object.assign({}, this.config), options), { colors: Object.assign(Object.assign({}, this.config.colors), options.colors), glass: Object.assign(Object.assign({}, this.config.glass), options.glass) });
|
|
19
19
|
return this.applyInsets();
|
|
20
20
|
}
|
|
21
21
|
async setNavbar(options) {
|
|
22
|
-
this.navbar = Object.assign(Object.assign(Object.assign({}, this.navbar), options), { colors: Object.assign(Object.assign({}, this.navbar.colors), options.colors) });
|
|
22
|
+
this.navbar = Object.assign(Object.assign(Object.assign({}, this.navbar), options), { colors: Object.assign(Object.assign({}, this.navbar.colors), options.colors), glass: Object.assign(Object.assign({}, this.navbar.glass), options.glass) });
|
|
23
23
|
return this.applyInsets();
|
|
24
24
|
}
|
|
25
25
|
async setTabbar(options) {
|
|
26
|
-
this.tabbar = Object.assign(Object.assign(Object.assign({}, this.tabbar), options), { colors: Object.assign(Object.assign({}, this.tabbar.colors), options.colors) });
|
|
26
|
+
this.tabbar = Object.assign(Object.assign(Object.assign({}, this.tabbar), options), { colors: Object.assign(Object.assign({}, this.tabbar.colors), options.colors), glass: Object.assign(Object.assign({}, this.tabbar.glass), options.glass) });
|
|
27
27
|
return this.applyInsets();
|
|
28
28
|
}
|
|
29
29
|
async beginTransition(options = {}) {
|
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAgB5C,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAExC,MAAM,OAAO,mBAAoB,SAAQ,SAAS;IAAlD;;QACU,WAAM,GAAqC;YACjD,gBAAgB,EAAE,KAAK;YACvB,OAAO,EAAE,IAAI;YACb,aAAa,EAAE,MAAM;SACtB,CAAC;QACM,WAAM,GAAkC,E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CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type {\n NativeNavigationBeginTransitionOptions,\n NativeNavigationConfigureOptions,\n NativeNavigationFinishTransitionOptions,\n NativeNavigationInsets,\n NativeNavigationInsetsResult,\n NativeNavigationNavbarOptions,\n NativeNavigationPlugin,\n NativeNavigationTabbarOptions,\n NativeNavigationTransitionDirection,\n NativeNavigationTransitionResult,\n PluginVersionResult,\n} from './definitions';\n\nconst DEFAULT_NAVBAR_HEIGHT = 44;\nconst DEFAULT_TABBAR_HEIGHT = 49;\nconst DEFAULT_TRANSITION_DURATION = 350;\n\nexport class NativeNavigationWeb extends WebPlugin implements NativeNavigationPlugin {\n private config: NativeNavigationConfigureOptions = {\n contentInsetMode: 'css',\n enabled: true,\n platformStyle: 'auto',\n };\n private navbar: NativeNavigationNavbarOptions = { hidden: true };\n private tabbar: NativeNavigationTabbarOptions = { hidden: true };\n private activeTransition: NativeNavigationTransitionResult | null = null;\n\n async configure(options: NativeNavigationConfigureOptions = {}): Promise<NativeNavigationInsetsResult> {\n this.config = {\n ...this.config,\n ...options,\n colors: {\n ...this.config.colors,\n ...options.colors,\n },\n glass: {\n ...this.config.glass,\n ...options.glass,\n },\n };\n return this.applyInsets();\n }\n\n async setNavbar(options: NativeNavigationNavbarOptions): Promise<NativeNavigationInsetsResult> {\n this.navbar = {\n ...this.navbar,\n ...options,\n colors: {\n ...this.navbar.colors,\n ...options.colors,\n },\n glass: {\n ...this.navbar.glass,\n ...options.glass,\n },\n };\n return this.applyInsets();\n }\n\n async setTabbar(options: NativeNavigationTabbarOptions): Promise<NativeNavigationInsetsResult> {\n this.tabbar = {\n ...this.tabbar,\n ...options,\n colors: {\n ...this.tabbar.colors,\n ...options.colors,\n },\n glass: {\n ...this.tabbar.glass,\n ...options.glass,\n },\n };\n return this.applyInsets();\n }\n\n async beginTransition(\n options: NativeNavigationBeginTransitionOptions = {},\n ): Promise<NativeNavigationTransitionResult> {\n const transition = this.createTransition(options.id, options.direction, options.duration);\n this.activeTransition = transition;\n this.notifyListeners('transitionStart', transition);\n this.dispatchWindowEvent('transitionStart', transition);\n return transition;\n }\n\n async finishTransition(\n options: NativeNavigationFinishTransitionOptions = {},\n ): Promise<NativeNavigationTransitionResult> {\n const transition =\n this.activeTransition && (!options.id || options.id === this.activeTransition.id)\n ? {\n ...this.activeTransition,\n direction: options.direction ?? this.activeTransition.direction,\n duration: options.duration ?? this.activeTransition.duration,\n }\n : this.createTransition(options.id, options.direction, options.duration);\n\n this.activeTransition = null;\n this.notifyListeners('transitionEnd', transition);\n this.dispatchWindowEvent('transitionEnd', transition);\n return transition;\n }\n\n async getPluginVersion(): Promise<PluginVersionResult> {\n return {\n version: 'web',\n };\n }\n\n private createTransition(\n id = `transition-${Date.now()}`,\n direction: NativeNavigationTransitionDirection = 'forward',\n duration = this.config.animationDuration ?? DEFAULT_TRANSITION_DURATION,\n ): NativeNavigationTransitionResult {\n return { id, direction, duration };\n }\n\n private applyInsets(): NativeNavigationInsetsResult {\n const enabled = this.config.enabled !== false;\n const navbarVisible = enabled && this.navbar.hidden !== true;\n const tabbarVisible = enabled && this.tabbar.hidden !== true;\n const insets: NativeNavigationInsets = {\n top: navbarVisible ? DEFAULT_NAVBAR_HEIGHT : 0,\n right: 0,\n bottom: tabbarVisible ? DEFAULT_TABBAR_HEIGHT : 0,\n left: 0,\n navbarHeight: navbarVisible ? DEFAULT_NAVBAR_HEIGHT : 0,\n tabbarHeight: tabbarVisible ? DEFAULT_TABBAR_HEIGHT : 0,\n };\n\n if (this.config.contentInsetMode !== 'none' && typeof document !== 'undefined') {\n const root = document.documentElement;\n root.style.setProperty('--cap-native-navigation-top', `${insets.top}px`);\n root.style.setProperty('--cap-native-navigation-right', `${insets.right}px`);\n root.style.setProperty('--cap-native-navigation-bottom', `${insets.bottom}px`);\n root.style.setProperty('--cap-native-navigation-left', `${insets.left}px`);\n root.style.setProperty('--cap-native-navbar-height', `${insets.navbarHeight}px`);\n root.style.setProperty('--cap-native-tabbar-height', `${insets.tabbarHeight}px`);\n }\n\n const event = { insets };\n this.notifyListeners('safeAreaChanged', event);\n this.dispatchWindowEvent('safeAreaChanged', event);\n return { insets };\n }\n\n private dispatchWindowEvent(name: string, detail: unknown): void {\n if (typeof window === 'undefined') {\n return;\n }\n window.dispatchEvent(new CustomEvent(`capNativeNavigation:${name}`, { detail }));\n }\n}\n"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -31,7 +31,7 @@ function defineNativeNavigationElements() {
|
|
|
31
31
|
}
|
|
32
32
|
class CapNativeNavigationProvider extends HTMLElement {
|
|
33
33
|
static get observedAttributes() {
|
|
34
|
-
return ['enabled', 'platform-style', 'content-inset-mode', 'animation-duration', 'colors'];
|
|
34
|
+
return ['enabled', 'platform-style', 'content-inset-mode', 'animation-duration', 'colors', 'glass'];
|
|
35
35
|
}
|
|
36
36
|
connectedCallback() {
|
|
37
37
|
void this.sync();
|
|
@@ -49,6 +49,7 @@ function defineNativeNavigationElements() {
|
|
|
49
49
|
platformStyle: (_a = typedAttribute(this, 'platform-style')) !== null && _a !== void 0 ? _a : 'auto',
|
|
50
50
|
contentInsetMode: (_b = typedAttribute(this, 'content-inset-mode')) !== null && _b !== void 0 ? _b : 'css',
|
|
51
51
|
colors: parseJsonAttribute(this, 'colors', undefined),
|
|
52
|
+
glass: parseJsonAttribute(this, 'glass', undefined),
|
|
52
53
|
};
|
|
53
54
|
if (duration) {
|
|
54
55
|
options.animationDuration = Number(duration);
|
|
@@ -71,6 +72,7 @@ function defineNativeNavigationElements() {
|
|
|
71
72
|
'left-items',
|
|
72
73
|
'right-items',
|
|
73
74
|
'colors',
|
|
75
|
+
'glass',
|
|
74
76
|
'animated',
|
|
75
77
|
];
|
|
76
78
|
}
|
|
@@ -98,6 +100,7 @@ function defineNativeNavigationElements() {
|
|
|
98
100
|
leftItems: parseJsonAttribute(this, 'left-items', []),
|
|
99
101
|
rightItems: parseJsonAttribute(this, 'right-items', []),
|
|
100
102
|
colors: parseJsonAttribute(this, 'colors', undefined),
|
|
103
|
+
glass: parseJsonAttribute(this, 'glass', undefined),
|
|
101
104
|
animated: parseBoolean(this.getAttribute('animated')),
|
|
102
105
|
};
|
|
103
106
|
const NativeNavigation = await getNativeNavigation();
|
|
@@ -114,6 +117,7 @@ function defineNativeNavigationElements() {
|
|
|
114
117
|
'label-visibility-mode',
|
|
115
118
|
'icons',
|
|
116
119
|
'colors',
|
|
120
|
+
'glass',
|
|
117
121
|
'blur-effect',
|
|
118
122
|
'disable-indicator',
|
|
119
123
|
'indicator-color',
|
|
@@ -140,6 +144,7 @@ function defineNativeNavigationElements() {
|
|
|
140
144
|
labelVisibilityMode: typedAttribute(this, 'label-visibility-mode'),
|
|
141
145
|
icons: parseBoolean(this.getAttribute('icons'), true),
|
|
142
146
|
colors: parseJsonAttribute(this, 'colors', undefined),
|
|
147
|
+
glass: parseJsonAttribute(this, 'glass', undefined),
|
|
143
148
|
blurEffect: typedAttribute(this, 'blur-effect'),
|
|
144
149
|
disableIndicator: parseBoolean(this.getAttribute('disable-indicator')),
|
|
145
150
|
indicatorColor: normalizeAttribute(this.getAttribute('indicator-color')),
|
|
@@ -224,15 +229,15 @@ class NativeNavigationWeb extends core.WebPlugin {
|
|
|
224
229
|
this.activeTransition = null;
|
|
225
230
|
}
|
|
226
231
|
async configure(options = {}) {
|
|
227
|
-
this.config = Object.assign(Object.assign(Object.assign({}, this.config), options), { colors: Object.assign(Object.assign({}, this.config.colors), options.colors) });
|
|
232
|
+
this.config = Object.assign(Object.assign(Object.assign({}, this.config), options), { colors: Object.assign(Object.assign({}, this.config.colors), options.colors), glass: Object.assign(Object.assign({}, this.config.glass), options.glass) });
|
|
228
233
|
return this.applyInsets();
|
|
229
234
|
}
|
|
230
235
|
async setNavbar(options) {
|
|
231
|
-
this.navbar = Object.assign(Object.assign(Object.assign({}, this.navbar), options), { colors: Object.assign(Object.assign({}, this.navbar.colors), options.colors) });
|
|
236
|
+
this.navbar = Object.assign(Object.assign(Object.assign({}, this.navbar), options), { colors: Object.assign(Object.assign({}, this.navbar.colors), options.colors), glass: Object.assign(Object.assign({}, this.navbar.glass), options.glass) });
|
|
232
237
|
return this.applyInsets();
|
|
233
238
|
}
|
|
234
239
|
async setTabbar(options) {
|
|
235
|
-
this.tabbar = Object.assign(Object.assign(Object.assign({}, this.tabbar), options), { colors: Object.assign(Object.assign({}, this.tabbar.colors), options.colors) });
|
|
240
|
+
this.tabbar = Object.assign(Object.assign(Object.assign({}, this.tabbar), options), { colors: Object.assign(Object.assign({}, this.tabbar.colors), options.colors), glass: Object.assign(Object.assign({}, this.tabbar.glass), options.glass) });
|
|
236
241
|
return this.applyInsets();
|
|
237
242
|
}
|
|
238
243
|
async beginTransition(options = {}) {
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/plugin.js","esm/components.js","esm/index.js","esm/web.js"],"sourcesContent":["export const createNativeNavigationWeb = () => import('./web').then((m) => new m.NativeNavigationWeb());\n//# sourceMappingURL=plugin.js.map","const parseBoolean = (value, defaultValue = false) => {\n if (value === null) {\n return defaultValue;\n }\n return value === '' || value === 'true' || value === '1';\n};\nconst normalizeAttribute = (value) => (value ? value : undefined);\nconst typedAttribute = (element, name) => normalizeAttribute(element.getAttribute(name));\nconst parseJsonAttribute = (element, name, fallback) => {\n const value = element.getAttribute(name);\n if (!value) {\n return fallback;\n }\n try {\n return JSON.parse(value);\n }\n catch (_a) {\n return fallback;\n }\n};\nconst getNativeNavigation = async () => (await import('./index')).NativeNavigation;\nexport function defineNativeNavigationElements() {\n if (typeof customElements === 'undefined' || typeof HTMLElement === 'undefined') {\n return;\n }\n class CapNativeNavigationProvider extends HTMLElement {\n static get observedAttributes() {\n return ['enabled', 'platform-style', 'content-inset-mode', 'animation-duration', 'colors'];\n }\n connectedCallback() {\n void this.sync();\n }\n attributeChangedCallback() {\n if (this.isConnected) {\n void this.sync();\n }\n }\n async sync() {\n var _a, _b;\n const duration = this.getAttribute('animation-duration');\n const options = {\n enabled: parseBoolean(this.getAttribute('enabled'), true),\n platformStyle: (_a = typedAttribute(this, 'platform-style')) !== null && _a !== void 0 ? _a : 'auto',\n contentInsetMode: (_b = typedAttribute(this, 'content-inset-mode')) !== null && _b !== void 0 ? _b : 'css',\n colors: parseJsonAttribute(this, 'colors', undefined),\n };\n if (duration) {\n options.animationDuration = Number(duration);\n }\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.configure(options);\n }\n }\n class CapNativeNavbar extends HTMLElement {\n static get observedAttributes() {\n return [\n 'hidden',\n 'title',\n 'subtitle',\n 'large',\n 'transparent',\n 'blur-effect',\n 'back-button',\n 'back-title',\n 'left-items',\n 'right-items',\n 'colors',\n 'animated',\n ];\n }\n connectedCallback() {\n void this.sync();\n }\n attributeChangedCallback() {\n if (this.isConnected) {\n void this.sync();\n }\n }\n async sync() {\n var _a, _b;\n const options = {\n hidden: parseBoolean(this.getAttribute('hidden')),\n title: (_a = this.getAttribute('title')) !== null && _a !== void 0 ? _a : undefined,\n subtitle: (_b = this.getAttribute('subtitle')) !== null && _b !== void 0 ? _b : undefined,\n large: parseBoolean(this.getAttribute('large')),\n transparent: parseBoolean(this.getAttribute('transparent')),\n blurEffect: typedAttribute(this, 'blur-effect'),\n backButton: {\n visible: parseBoolean(this.getAttribute('back-button')),\n title: normalizeAttribute(this.getAttribute('back-title')),\n },\n leftItems: parseJsonAttribute(this, 'left-items', []),\n rightItems: parseJsonAttribute(this, 'right-items', []),\n colors: parseJsonAttribute(this, 'colors', undefined),\n animated: parseBoolean(this.getAttribute('animated')),\n };\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.setNavbar(options);\n }\n }\n class CapNativeTabbar extends HTMLElement {\n static get observedAttributes() {\n return [\n 'hidden',\n 'tabs',\n 'selected-id',\n 'labels',\n 'label-visibility-mode',\n 'icons',\n 'colors',\n 'blur-effect',\n 'disable-indicator',\n 'indicator-color',\n 'ripple-color',\n 'badge-background-color',\n 'badge-text-color',\n 'animated',\n ];\n }\n connectedCallback() {\n void this.sync();\n }\n attributeChangedCallback() {\n if (this.isConnected) {\n void this.sync();\n }\n }\n async sync() {\n const options = {\n hidden: parseBoolean(this.getAttribute('hidden')),\n tabs: parseJsonAttribute(this, 'tabs', []),\n selectedId: normalizeAttribute(this.getAttribute('selected-id')),\n labels: parseBoolean(this.getAttribute('labels'), true),\n labelVisibilityMode: typedAttribute(this, 'label-visibility-mode'),\n icons: parseBoolean(this.getAttribute('icons'), true),\n colors: parseJsonAttribute(this, 'colors', undefined),\n blurEffect: typedAttribute(this, 'blur-effect'),\n disableIndicator: parseBoolean(this.getAttribute('disable-indicator')),\n indicatorColor: normalizeAttribute(this.getAttribute('indicator-color')),\n rippleColor: normalizeAttribute(this.getAttribute('ripple-color')),\n badgeBackgroundColor: normalizeAttribute(this.getAttribute('badge-background-color')),\n badgeTextColor: normalizeAttribute(this.getAttribute('badge-text-color')),\n animated: parseBoolean(this.getAttribute('animated')),\n };\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.setTabbar(options);\n }\n }\n if (!customElements.get('cap-native-navigation-provider')) {\n customElements.define('cap-native-navigation-provider', CapNativeNavigationProvider);\n }\n if (!customElements.get('cap-native-navbar')) {\n customElements.define('cap-native-navbar', CapNativeNavbar);\n }\n if (!customElements.get('cap-native-tabbar')) {\n customElements.define('cap-native-tabbar', CapNativeTabbar);\n }\n}\n//# sourceMappingURL=components.js.map","import { registerPlugin } from '@capacitor/core';\nimport { createNativeNavigationWeb } from './plugin';\nexport const NativeNavigation = registerPlugin('NativeNavigation', {\n web: createNativeNavigationWeb,\n});\nexport * from './definitions';\nexport { defineNativeNavigationElements } from './components';\nconst isElement = (target) => typeof Element !== 'undefined' && target instanceof Element;\nconst isDomRect = (target) => typeof DOMRect !== 'undefined' && target instanceof DOMRect;\n/**\n * Convert an element or DOMRect into viewport coordinates accepted by native\n * zoom transitions.\n */\nexport const getNativeNavigationRect = (target) => {\n const rect = isElement(target) ? target.getBoundingClientRect() : target;\n if (isDomRect(rect)) {\n return {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height,\n };\n }\n return {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height,\n };\n};\n/**\n * Begin an Apple-Zoom-style native transition from a DOM element or rect.\n */\nexport const beginZoomTransition = (target, options = {}) => NativeNavigation.beginTransition(Object.assign(Object.assign({}, options), { direction: 'zoom', sourceRect: getNativeNavigationRect(target) }));\n/**\n * Finish an Apple-Zoom-style native transition into an optional DOM element or\n * rect on the destination route.\n */\nexport const finishZoomTransition = (target, options = {}) => NativeNavigation.finishTransition(Object.assign(Object.assign({}, options), { direction: 'zoom', targetRect: target ? getNativeNavigationRect(target) : undefined }));\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nconst DEFAULT_NAVBAR_HEIGHT = 44;\nconst DEFAULT_TABBAR_HEIGHT = 49;\nconst DEFAULT_TRANSITION_DURATION = 350;\nexport class NativeNavigationWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.config = {\n contentInsetMode: 'css',\n enabled: true,\n platformStyle: 'auto',\n };\n this.navbar = { hidden: true };\n this.tabbar = { hidden: true };\n this.activeTransition = null;\n }\n async configure(options = {}) {\n this.config = Object.assign(Object.assign(Object.assign({}, this.config), options), { colors: Object.assign(Object.assign({}, this.config.colors), options.colors) });\n return this.applyInsets();\n }\n async setNavbar(options) {\n this.navbar = Object.assign(Object.assign(Object.assign({}, this.navbar), options), { colors: Object.assign(Object.assign({}, this.navbar.colors), options.colors) });\n return this.applyInsets();\n }\n async setTabbar(options) {\n this.tabbar = Object.assign(Object.assign(Object.assign({}, this.tabbar), options), { colors: Object.assign(Object.assign({}, this.tabbar.colors), options.colors) });\n return this.applyInsets();\n }\n async beginTransition(options = {}) {\n const transition = this.createTransition(options.id, options.direction, options.duration);\n this.activeTransition = transition;\n this.notifyListeners('transitionStart', transition);\n this.dispatchWindowEvent('transitionStart', transition);\n return transition;\n }\n async finishTransition(options = {}) {\n var _a, _b;\n const transition = this.activeTransition && (!options.id || options.id === this.activeTransition.id)\n ? Object.assign(Object.assign({}, this.activeTransition), { direction: (_a = options.direction) !== null && _a !== void 0 ? _a : this.activeTransition.direction, duration: (_b = options.duration) !== null && _b !== void 0 ? _b : this.activeTransition.duration }) : this.createTransition(options.id, options.direction, options.duration);\n this.activeTransition = null;\n this.notifyListeners('transitionEnd', transition);\n this.dispatchWindowEvent('transitionEnd', transition);\n return transition;\n }\n async getPluginVersion() {\n return {\n version: 'web',\n };\n }\n createTransition(id, direction, duration) {\n var _a;\n if (id === void 0) { id = `transition-${Date.now()}`; }\n if (direction === void 0) { direction = 'forward'; }\n if (duration === void 0) { duration = (_a = this.config.animationDuration) !== null && _a !== void 0 ? _a : DEFAULT_TRANSITION_DURATION; }\n return { id, direction, duration };\n }\n applyInsets() {\n const enabled = this.config.enabled !== false;\n const navbarVisible = enabled && this.navbar.hidden !== true;\n const tabbarVisible = enabled && this.tabbar.hidden !== true;\n const insets = {\n top: navbarVisible ? DEFAULT_NAVBAR_HEIGHT : 0,\n right: 0,\n bottom: tabbarVisible ? DEFAULT_TABBAR_HEIGHT : 0,\n left: 0,\n navbarHeight: navbarVisible ? DEFAULT_NAVBAR_HEIGHT : 0,\n tabbarHeight: tabbarVisible ? DEFAULT_TABBAR_HEIGHT : 0,\n };\n if (this.config.contentInsetMode !== 'none' && typeof document !== 'undefined') {\n const root = document.documentElement;\n root.style.setProperty('--cap-native-navigation-top', `${insets.top}px`);\n root.style.setProperty('--cap-native-navigation-right', `${insets.right}px`);\n root.style.setProperty('--cap-native-navigation-bottom', `${insets.bottom}px`);\n root.style.setProperty('--cap-native-navigation-left', `${insets.left}px`);\n root.style.setProperty('--cap-native-navbar-height', `${insets.navbarHeight}px`);\n root.style.setProperty('--cap-native-tabbar-height', `${insets.tabbarHeight}px`);\n }\n const event = { insets };\n this.notifyListeners('safeAreaChanged', event);\n this.dispatchWindowEvent('safeAreaChanged', event);\n return { insets };\n }\n dispatchWindowEvent(name, detail) {\n if (typeof window === 'undefined') {\n return;\n }\n window.dispatchEvent(new CustomEvent(`capNativeNavigation:${name}`, { detail }));\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AAAO,MAAM,yBAAyB,GAAG,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC;;ACAvG,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,YAAY,GAAG,KAAK,KAAK;AACtD,IAAI,IAAI,KAAK,KAAK,IAAI,EAAE;AACxB,QAAQ,OAAO,YAAY;AAC3B,IAAI;AACJ,IAAI,OAAO,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,GAAG;AAC5D,CAAC;AACD,MAAM,kBAAkB,GAAG,CAAC,KAAK,MAAM,KAAK,GAAG,KAAK,GAAG,SAAS,CAAC;AACjE,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,IAAI,KAAK,kBAAkB,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;AACxF,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,KAAK;AACxD,IAAI,MAAM,KAAK,GAAG,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC;AAC5C,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,OAAO,QAAQ;AACvB,IAAI;AACJ,IAAI,IAAI;AACR,QAAQ,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;AAChC,IAAI;AACJ,IAAI,OAAO,EAAE,EAAE;AACf,QAAQ,OAAO,QAAQ;AACvB,IAAI;AACJ,CAAC;AACD,MAAM,mBAAmB,GAAG,YAAY,CAAC,MAAM,qDAAiB,EAAE,gBAAgB;AAC3E,SAAS,8BAA8B,GAAG;AACjD,IAAI,IAAI,OAAO,cAAc,K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AY,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;AAC5F,YAAY,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;AAC5F,QAAQ;AACR,QAAQ,MAAM,KAAK,GAAG,EAAE,MAAM,EAAE;AAChC,QAAQ,IAAI,CAAC,eAAe,CAAC,iBAAiB,EAAE,KAAK,CAAC;AACtD,QAAQ,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,EAAE,KAAK,CAAC;AAC1D,QAAQ,OAAO,EAAE,MAAM,EAAE;AACzB,IAAI;AACJ,IAAI,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE;AACtC,QAAQ,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AAC3C,YAAY;AACZ,QAAQ;AACR,QAAQ,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;AACxF,IAAI;AACJ;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/plugin.js","esm/components.js","esm/index.js","esm/web.js"],"sourcesContent":["export const createNativeNavigationWeb = () => import('./web').then((m) => new m.NativeNavigationWeb());\n//# sourceMappingURL=plugin.js.map","const parseBoolean = (value, defaultValue = false) => {\n if (value === null) {\n return defaultValue;\n }\n return value === '' || value === 'true' || value === '1';\n};\nconst normalizeAttribute = (value) => (value ? value : undefined);\nconst typedAttribute = (element, name) => normalizeAttribute(element.getAttribute(name));\nconst parseJsonAttribute = (element, name, fallback) => {\n const value = element.getAttribute(name);\n if (!value) {\n return fallback;\n }\n try {\n return JSON.parse(value);\n }\n catch (_a) {\n return fallback;\n }\n};\nconst getNativeNavigation = async () => (await import('./index')).NativeNavigation;\nexport function defineNativeNavigationElements() {\n if (typeof customElements === 'undefined' || typeof HTMLElement === 'undefined') {\n return;\n }\n class CapNativeNavigationProvider extends HTMLElement {\n static get observedAttributes() {\n return ['enabled', 'platform-style', 'content-inset-mode', 'animation-duration', 'colors', 'glass'];\n }\n connectedCallback() {\n void this.sync();\n }\n attributeChangedCallback() {\n if (this.isConnected) {\n void this.sync();\n }\n }\n async sync() {\n var _a, _b;\n const duration = this.getAttribute('animation-duration');\n const options = {\n enabled: parseBoolean(this.getAttribute('enabled'), true),\n platformStyle: (_a = typedAttribute(this, 'platform-style')) !== null && _a !== void 0 ? _a : 'auto',\n contentInsetMode: (_b = typedAttribute(this, 'content-inset-mode')) !== null && _b !== void 0 ? _b : 'css',\n colors: parseJsonAttribute(this, 'colors', undefined),\n glass: parseJsonAttribute(this, 'glass', undefined),\n };\n if (duration) {\n options.animationDuration = Number(duration);\n }\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.configure(options);\n }\n }\n class CapNativeNavbar extends HTMLElement {\n static get observedAttributes() {\n return [\n 'hidden',\n 'title',\n 'subtitle',\n 'large',\n 'transparent',\n 'blur-effect',\n 'back-button',\n 'back-title',\n 'left-items',\n 'right-items',\n 'colors',\n 'glass',\n 'animated',\n ];\n }\n connectedCallback() {\n void this.sync();\n }\n attributeChangedCallback() {\n if (this.isConnected) {\n void this.sync();\n }\n }\n async sync() {\n var _a, _b;\n const options = {\n hidden: parseBoolean(this.getAttribute('hidden')),\n title: (_a = this.getAttribute('title')) !== null && _a !== void 0 ? _a : undefined,\n subtitle: (_b = this.getAttribute('subtitle')) !== null && _b !== void 0 ? _b : undefined,\n large: parseBoolean(this.getAttribute('large')),\n transparent: parseBoolean(this.getAttribute('transparent')),\n blurEffect: typedAttribute(this, 'blur-effect'),\n backButton: {\n visible: parseBoolean(this.getAttribute('back-button')),\n title: normalizeAttribute(this.getAttribute('back-title')),\n },\n leftItems: parseJsonAttribute(this, 'left-items', []),\n rightItems: parseJsonAttribute(this, 'right-items', []),\n colors: parseJsonAttribute(this, 'colors', undefined),\n glass: parseJsonAttribute(this, 'glass', undefined),\n animated: parseBoolean(this.getAttribute('animated')),\n };\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.setNavbar(options);\n }\n }\n class CapNativeTabbar extends HTMLElement {\n static get observedAttributes() {\n return [\n 'hidden',\n 'tabs',\n 'selected-id',\n 'labels',\n 'label-visibility-mode',\n 'icons',\n 'colors',\n 'glass',\n 'blur-effect',\n 'disable-indicator',\n 'indicator-color',\n 'ripple-color',\n 'badge-background-color',\n 'badge-text-color',\n 'animated',\n ];\n }\n connectedCallback() {\n void this.sync();\n }\n attributeChangedCallback() {\n if (this.isConnected) {\n void this.sync();\n }\n }\n async sync() {\n const options = {\n hidden: parseBoolean(this.getAttribute('hidden')),\n tabs: parseJsonAttribute(this, 'tabs', []),\n selectedId: normalizeAttribute(this.getAttribute('selected-id')),\n labels: parseBoolean(this.getAttribute('labels'), true),\n labelVisibilityMode: typedAttribute(this, 'label-visibility-mode'),\n icons: parseBoolean(this.getAttribute('icons'), true),\n colors: parseJsonAttribute(this, 'colors', undefined),\n glass: parseJsonAttribute(this, 'glass', undefined),\n blurEffect: typedAttribute(this, 'blur-effect'),\n disableIndicator: parseBoolean(this.getAttribute('disable-indicator')),\n indicatorColor: normalizeAttribute(this.getAttribute('indicator-color')),\n rippleColor: normalizeAttribute(this.getAttribute('ripple-color')),\n badgeBackgroundColor: normalizeAttribute(this.getAttribute('badge-background-color')),\n badgeTextColor: normalizeAttribute(this.getAttribute('badge-text-color')),\n animated: parseBoolean(this.getAttribute('animated')),\n };\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.setTabbar(options);\n }\n }\n if (!customElements.get('cap-native-navigation-provider')) {\n customElements.define('cap-native-navigation-provider', CapNativeNavigationProvider);\n }\n if (!customElements.get('cap-native-navbar')) {\n customElements.define('cap-native-navbar', CapNativeNavbar);\n }\n if (!customElements.get('cap-native-tabbar')) {\n customElements.define('cap-native-tabbar', CapNativeTabbar);\n }\n}\n//# sourceMappingURL=components.js.map","import { registerPlugin } from '@capacitor/core';\nimport { createNativeNavigationWeb } from './plugin';\nexport const NativeNavigation = registerPlugin('NativeNavigation', {\n web: createNativeNavigationWeb,\n});\nexport * from './definitions';\nexport { defineNativeNavigationElements } from './components';\nconst isElement = (target) => typeof Element !== 'undefined' && target instanceof Element;\nconst isDomRect = (target) => typeof DOMRect !== 'undefined' && target instanceof DOMRect;\n/**\n * Convert an element or DOMRect into viewport coordinates accepted by native\n * zoom transitions.\n */\nexport const getNativeNavigationRect = (target) => {\n const rect = isElement(target) ? target.getBoundingClientRect() : target;\n if (isDomRect(rect)) {\n return {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height,\n };\n }\n return {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height,\n };\n};\n/**\n * Begin an Apple-Zoom-style native transition from a DOM element or rect.\n */\nexport const beginZoomTransition = (target, options = {}) => NativeNavigation.beginTransition(Object.assign(Object.assign({}, options), { direction: 'zoom', sourceRect: getNativeNavigationRect(target) }));\n/**\n * Finish an Apple-Zoom-style native transition into an optional DOM element or\n * rect on the destination route.\n */\nexport const finishZoomTransition = (target, options = {}) => NativeNavigation.finishTransition(Object.assign(Object.assign({}, options), { direction: 'zoom', targetRect: target ? getNativeNavigationRect(target) : undefined }));\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nconst DEFAULT_NAVBAR_HEIGHT = 44;\nconst DEFAULT_TABBAR_HEIGHT = 49;\nconst DEFAULT_TRANSITION_DURATION = 350;\nexport class NativeNavigationWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.config = {\n contentInsetMode: 'css',\n enabled: true,\n platformStyle: 'auto',\n };\n this.navbar = { hidden: true };\n this.tabbar = { hidden: true };\n this.activeTransition = null;\n }\n async configure(options = {}) {\n this.config = Object.assign(Object.assign(Object.assign({}, this.config), options), { colors: Object.assign(Object.assign({}, this.config.colors), options.colors), glass: Object.assign(Object.assign({}, this.config.glass), options.glass) });\n return this.applyInsets();\n }\n async setNavbar(options) {\n this.navbar = Object.assign(Object.assign(Object.assign({}, this.navbar), options), { colors: Object.assign(Object.assign({}, this.navbar.colors), options.colors), glass: Object.assign(Object.assign({}, this.navbar.glass), options.glass) });\n return this.applyInsets();\n }\n async setTabbar(options) {\n this.tabbar = Object.assign(Object.assign(Object.assign({}, this.tabbar), options), { colors: Object.assign(Object.assign({}, this.tabbar.colors), options.colors), glass: Object.assign(Object.assign({}, this.tabbar.glass), options.glass) });\n return this.applyInsets();\n }\n async beginTransition(options = {}) {\n const transition = this.createTransition(options.id, options.direction, options.duration);\n this.activeTransition = transition;\n this.notifyListeners('transitionStart', transition);\n this.dispatchWindowEvent('transitionStart', transition);\n return transition;\n }\n async finishTransition(options = {}) {\n var _a, _b;\n const transition = this.activeTransition && (!options.id || options.id === this.activeTransition.id)\n ? Object.assign(Object.assign({}, this.activeTransition), { direction: (_a = options.direction) !== null && _a !== void 0 ? _a : this.activeTransition.direction, duration: (_b = options.duration) !== null && _b !== void 0 ? _b : this.activeTransition.duration }) : this.createTransition(options.id, options.direction, options.duration);\n this.activeTransition = null;\n this.notifyListeners('transitionEnd', transition);\n this.dispatchWindowEvent('transitionEnd', transition);\n return transition;\n }\n async getPluginVersion() {\n return {\n version: 'web',\n };\n }\n createTransition(id, direction, duration) {\n var _a;\n if (id === void 0) { id = `transition-${Date.now()}`; }\n if (direction === void 0) { direction = 'forward'; }\n if (duration === void 0) { duration = (_a = this.config.animationDuration) !== null && _a !== void 0 ? _a : DEFAULT_TRANSITION_DURATION; }\n return { id, direction, duration };\n }\n applyInsets() {\n const enabled = this.config.enabled !== false;\n const navbarVisible = enabled && this.navbar.hidden !== true;\n const tabbarVisible = enabled && this.tabbar.hidden !== true;\n const insets = {\n top: navbarVisible ? DEFAULT_NAVBAR_HEIGHT : 0,\n right: 0,\n bottom: tabbarVisible ? DEFAULT_TABBAR_HEIGHT : 0,\n left: 0,\n navbarHeight: navbarVisible ? DEFAULT_NAVBAR_HEIGHT : 0,\n tabbarHeight: tabbarVisible ? DEFAULT_TABBAR_HEIGHT : 0,\n };\n if (this.config.contentInsetMode !== 'none' && typeof document !== 'undefined') {\n const root = document.documentElement;\n root.style.setProperty('--cap-native-navigation-top', `${insets.top}px`);\n root.style.setProperty('--cap-native-navigation-right', `${insets.right}px`);\n root.style.setProperty('--cap-native-navigation-bottom', `${insets.bottom}px`);\n root.style.setProperty('--cap-native-navigation-left', `${insets.left}px`);\n root.style.setProperty('--cap-native-navbar-height', `${insets.navbarHeight}px`);\n root.style.setProperty('--cap-native-tabbar-height', `${insets.tabbarHeight}px`);\n }\n const event = { insets };\n this.notifyListeners('safeAreaChanged', event);\n this.dispatchWindowEvent('safeAreaChanged', event);\n return { insets };\n }\n dispatchWindowEvent(name, detail) {\n if (typeof window === 'undefined') {\n return;\n }\n window.dispatchEvent(new CustomEvent(`capNativeNavigation:${name}`, { detail }));\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AAAO,MAAM,yBAAyB,GAAG,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC;;ACAvG,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,YAAY,GAAG,KAAK,KAAK;AACtD,IAAI,IAAI,KAAK,KAAK,IAAI,EAAE;AACxB,QAAQ,OAAO,YAAY;AAC3B,IAAI;AACJ,IAAI,OAAO,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,GAAG;AAC5D,CAAC;AACD,MAAM,kBAAkB,GAAG,CAAC,KAAK,MAAM,KAAK,GAAG,KAAK,GAAG,SAAS,CAAC;AACjE,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,IAAI,KAAK,kBAAkB,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;AACxF,MAAM,kBAAkB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