@symbiote-native/navigation-bar 0.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/LICENSE +21 -0
- package/README.md +157 -0
- package/build/angular/index.d.ts +3 -0
- package/build/angular/index.js +3 -0
- package/build/angular/navigation-bar-visibility.service.d.ts +5 -0
- package/build/angular/navigation-bar-visibility.service.js +73 -0
- package/build/angular/navigation-bar.d.ts +13 -0
- package/build/angular/navigation-bar.js +107 -0
- package/build/core/entries-stack.d.ts +8 -0
- package/build/core/entries-stack.js +54 -0
- package/build/core/index.d.ts +3 -0
- package/build/core/index.js +2 -0
- package/build/core/native-module/index.android.d.ts +2 -0
- package/build/core/native-module/index.android.js +2 -0
- package/build/core/native-module/index.d.ts +2 -0
- package/build/core/native-module/index.js +3 -0
- package/build/core/native-module/shared.d.ts +8 -0
- package/build/core/native-module/shared.js +1 -0
- package/build/core/navigation-bar.d.ts +16 -0
- package/build/core/navigation-bar.js +69 -0
- package/build/core/types.d.ts +14 -0
- package/build/core/types.js +2 -0
- package/build/react/index.d.ts +3 -0
- package/build/react/index.js +3 -0
- package/build/react/navigation-bar.d.ts +3 -0
- package/build/react/navigation-bar.js +23 -0
- package/build/react/use-visibility.d.ts +3 -0
- package/build/react/use-visibility.js +22 -0
- package/build/solid/create-visibility.d.ts +4 -0
- package/build/solid/create-visibility.js +26 -0
- package/build/solid/index.d.ts +3 -0
- package/build/solid/index.js +3 -0
- package/build/solid/navigation-bar.d.ts +2 -0
- package/build/solid/navigation-bar.js +24 -0
- package/build/svelte/NavigationBar.svelte +28 -0
- package/build/svelte/NavigationBar.svelte.d.ts +4 -0
- package/build/svelte/index.d.ts +3 -0
- package/build/svelte/index.js +3 -0
- package/build/svelte/use-visibility.svelte.d.ts +4 -0
- package/build/svelte/use-visibility.svelte.js +26 -0
- package/build/vue/index.d.ts +3 -0
- package/build/vue/index.js +3 -0
- package/build/vue/navigation-bar.d.ts +2 -0
- package/build/vue/navigation-bar.js +23 -0
- package/build/vue/use-visibility.d.ts +4 -0
- package/build/vue/use-visibility.js +24 -0
- package/build-ngc/angular/index.d.ts +3 -0
- package/build-ngc/angular/index.js +4 -0
- package/build-ngc/angular/index.js.map +1 -0
- package/build-ngc/angular/navigation-bar-visibility.service.d.ts +8 -0
- package/build-ngc/angular/navigation-bar-visibility.service.js +32 -0
- package/build-ngc/angular/navigation-bar-visibility.service.js.map +1 -0
- package/build-ngc/angular/navigation-bar.d.ts +16 -0
- package/build-ngc/angular/navigation-bar.js +59 -0
- package/build-ngc/angular/navigation-bar.js.map +1 -0
- package/build-ngc/core/entries-stack.d.ts +8 -0
- package/build-ngc/core/entries-stack.js +55 -0
- package/build-ngc/core/entries-stack.js.map +1 -0
- package/build-ngc/core/index.d.ts +3 -0
- package/build-ngc/core/index.js +3 -0
- package/build-ngc/core/index.js.map +1 -0
- package/build-ngc/core/native-module/index.android.d.ts +2 -0
- package/build-ngc/core/native-module/index.android.js +3 -0
- package/build-ngc/core/native-module/index.android.js.map +1 -0
- package/build-ngc/core/native-module/index.d.ts +2 -0
- package/build-ngc/core/native-module/index.js +4 -0
- package/build-ngc/core/native-module/index.js.map +1 -0
- package/build-ngc/core/native-module/shared.d.ts +8 -0
- package/build-ngc/core/native-module/shared.js +2 -0
- package/build-ngc/core/native-module/shared.js.map +1 -0
- package/build-ngc/core/navigation-bar.d.ts +16 -0
- package/build-ngc/core/navigation-bar.js +70 -0
- package/build-ngc/core/navigation-bar.js.map +1 -0
- package/build-ngc/core/types.d.ts +14 -0
- package/build-ngc/core/types.js +3 -0
- package/build-ngc/core/types.js.map +1 -0
- package/native-link.json +12 -0
- package/package.json +150 -0
- package/src/angular/index.ts +3 -0
- package/src/angular/navigation-bar-visibility.service.ts +29 -0
- package/src/angular/navigation-bar.ts +67 -0
- package/src/core/entries-stack.ts +76 -0
- package/src/core/index.ts +19 -0
- package/src/core/native-module/index.android.ts +5 -0
- package/src/core/native-module/index.ts +5 -0
- package/src/core/native-module/shared.ts +15 -0
- package/src/core/navigation-bar.ts +90 -0
- package/src/core/types.ts +19 -0
- package/src/react/index.ts +3 -0
- package/src/react/navigation-bar.tsx +38 -0
- package/src/react/use-visibility.ts +29 -0
- package/src/solid/create-visibility.ts +32 -0
- package/src/solid/index.ts +3 -0
- package/src/solid/navigation-bar.ts +35 -0
- package/src/svelte/NavigationBar.svelte +28 -0
- package/src/svelte/index.ts +3 -0
- package/src/svelte/svelte-ambient.d.ts +3 -0
- package/src/svelte/svelte-compile.test-helper.ts +7 -0
- package/src/svelte/use-visibility.svelte.ts +37 -0
- package/src/vue/index.ts +3 -0
- package/src/vue/navigation-bar.ts +42 -0
- package/src/vue/use-visibility.ts +28 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import { addVisibilityListener, getVisibilityAsync } from '../core/index.js';
|
|
3
|
+
/** Statefully tracks the system navigation bar's visibility, `null` during async initialization */
|
|
4
|
+
export function useVisibility() {
|
|
5
|
+
const [visibility, setVisibility] = useState(null);
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
let isMounted = true;
|
|
8
|
+
getVisibilityAsync().then(value => {
|
|
9
|
+
if (isMounted)
|
|
10
|
+
setVisibility(value);
|
|
11
|
+
});
|
|
12
|
+
const subscription = addVisibilityListener(({ visibility: next }) => {
|
|
13
|
+
if (isMounted)
|
|
14
|
+
setVisibility(next);
|
|
15
|
+
});
|
|
16
|
+
return () => {
|
|
17
|
+
subscription.remove();
|
|
18
|
+
isMounted = false;
|
|
19
|
+
};
|
|
20
|
+
}, []);
|
|
21
|
+
return visibility;
|
|
22
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type Accessor } from 'solid-js';
|
|
2
|
+
import type { INavigationBarVisibility } from '../core';
|
|
3
|
+
/** Statefully tracks the system navigation bar's visibility, `null` during async initialization */
|
|
4
|
+
export declare function createVisibility(): Accessor<INavigationBarVisibility | null>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Solid twin of `../react`/`../vue`'s visibility hook, returning an accessor instead of a
|
|
2
|
+
// snapshot/ref (`components_split_logic_view_lifecycle`)
|
|
3
|
+
import { createSignal, onCleanup, onMount } from 'solid-js';
|
|
4
|
+
import { addVisibilityListener, getVisibilityAsync } from '../core/index.js';
|
|
5
|
+
/** Statefully tracks the system navigation bar's visibility, `null` during async initialization */
|
|
6
|
+
export function createVisibility() {
|
|
7
|
+
const [visibility, setVisibility] = createSignal(null);
|
|
8
|
+
let subscription;
|
|
9
|
+
let isMounted = false;
|
|
10
|
+
onMount(() => {
|
|
11
|
+
isMounted = true;
|
|
12
|
+
getVisibilityAsync().then(value => {
|
|
13
|
+
if (isMounted)
|
|
14
|
+
setVisibility(value);
|
|
15
|
+
});
|
|
16
|
+
subscription = addVisibilityListener(({ visibility: next }) => {
|
|
17
|
+
if (isMounted)
|
|
18
|
+
setVisibility(next);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
onCleanup(() => {
|
|
22
|
+
subscription?.remove();
|
|
23
|
+
isMounted = false;
|
|
24
|
+
});
|
|
25
|
+
return visibility;
|
|
26
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Solid twin of `../react`/`../vue`'s `NavigationBar`, same shared stack core - only the
|
|
2
|
+
// lifecycle wiring differs per adapter (`components_split_logic_view_lifecycle`)
|
|
3
|
+
import { createEffect, onCleanup, onMount } from 'solid-js';
|
|
4
|
+
import { createColorScheme } from '@symbiote-native/solid';
|
|
5
|
+
import { popStackEntry, pushStackEntry, replaceStackEntry, } from '../core/index.js';
|
|
6
|
+
export function NavigationBar(props) {
|
|
7
|
+
const colorScheme = createColorScheme();
|
|
8
|
+
let stackEntry = null;
|
|
9
|
+
onMount(() => {
|
|
10
|
+
stackEntry = pushStackEntry({ style: props.style, hidden: props.hidden });
|
|
11
|
+
});
|
|
12
|
+
onCleanup(() => {
|
|
13
|
+
if (stackEntry)
|
|
14
|
+
popStackEntry(stackEntry);
|
|
15
|
+
});
|
|
16
|
+
createEffect(() => {
|
|
17
|
+
const style = props.style;
|
|
18
|
+
const hidden = props.hidden;
|
|
19
|
+
colorScheme();
|
|
20
|
+
if (stackEntry)
|
|
21
|
+
stackEntry = replaceStackEntry(stackEntry, { style, hidden });
|
|
22
|
+
});
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { untrack } from 'svelte';
|
|
3
|
+
import { useColorScheme } from '@symbiote-native/svelte';
|
|
4
|
+
import {
|
|
5
|
+
popStackEntry,
|
|
6
|
+
pushStackEntry,
|
|
7
|
+
replaceStackEntry,
|
|
8
|
+
type INavigationBarProps,
|
|
9
|
+
type INavigationBarStackEntry,
|
|
10
|
+
} from '../core';
|
|
11
|
+
|
|
12
|
+
let { style, hidden }: INavigationBarProps = $props();
|
|
13
|
+
const colorScheme = useColorScheme();
|
|
14
|
+
let stackEntry: INavigationBarStackEntry | null = null;
|
|
15
|
+
|
|
16
|
+
$effect(() => {
|
|
17
|
+
const entry = pushStackEntry(untrack(() => ({ style, hidden })));
|
|
18
|
+
stackEntry = entry;
|
|
19
|
+
return () => popStackEntry(entry);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
$effect(() => {
|
|
23
|
+
void style;
|
|
24
|
+
void hidden;
|
|
25
|
+
void colorScheme.current;
|
|
26
|
+
if (stackEntry) stackEntry = replaceStackEntry(stackEntry, { style, hidden });
|
|
27
|
+
});
|
|
28
|
+
</script>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Svelte twin of `../react`/`../vue`'s visibility hook, boxed getter shape matching
|
|
2
|
+
// `use-color-scheme.svelte.ts` (`components_split_logic_view_lifecycle`)
|
|
3
|
+
import { addVisibilityListener, getVisibilityAsync } from '../core/index.js';
|
|
4
|
+
export function useVisibility() {
|
|
5
|
+
let visibility = $state(null);
|
|
6
|
+
$effect(() => {
|
|
7
|
+
let isMounted = true;
|
|
8
|
+
getVisibilityAsync().then(value => {
|
|
9
|
+
if (isMounted)
|
|
10
|
+
visibility = value;
|
|
11
|
+
});
|
|
12
|
+
const subscription = addVisibilityListener(({ visibility: next }) => {
|
|
13
|
+
if (isMounted)
|
|
14
|
+
visibility = next;
|
|
15
|
+
});
|
|
16
|
+
return () => {
|
|
17
|
+
subscription.remove();
|
|
18
|
+
isMounted = false;
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
return {
|
|
22
|
+
get current() {
|
|
23
|
+
return visibility;
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineComponent, onMounted, onUnmounted, watch, } from '@vue/runtime-core';
|
|
2
|
+
import { useColorScheme } from '@symbiote-native/vue';
|
|
3
|
+
import { popStackEntry, pushStackEntry, replaceStackEntry, } from '../core/index.js';
|
|
4
|
+
export const NavigationBar = defineComponent(props => {
|
|
5
|
+
const colorScheme = useColorScheme();
|
|
6
|
+
let stackEntry = null;
|
|
7
|
+
onMounted(() => {
|
|
8
|
+
stackEntry = pushStackEntry({ style: props.style, hidden: props.hidden });
|
|
9
|
+
});
|
|
10
|
+
onUnmounted(() => {
|
|
11
|
+
if (stackEntry)
|
|
12
|
+
popStackEntry(stackEntry);
|
|
13
|
+
});
|
|
14
|
+
watch([colorScheme, () => props.style, () => props.hidden], () => {
|
|
15
|
+
if (stackEntry) {
|
|
16
|
+
stackEntry = replaceStackEntry(stackEntry, {
|
|
17
|
+
style: props.style,
|
|
18
|
+
hidden: props.hidden,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
return () => null;
|
|
23
|
+
}, { name: 'NavigationBar', props: ['style', 'hidden'] });
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type Ref } from '@vue/runtime-core';
|
|
2
|
+
import type { INavigationBarVisibility } from '../core';
|
|
3
|
+
/** Statefully tracks the system navigation bar's visibility, `null` during async initialization */
|
|
4
|
+
export declare function useVisibility(): Ref<INavigationBarVisibility | null>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { onMounted, onUnmounted, ref } from '@vue/runtime-core';
|
|
2
|
+
import { addVisibilityListener, getVisibilityAsync } from '../core/index.js';
|
|
3
|
+
/** Statefully tracks the system navigation bar's visibility, `null` during async initialization */
|
|
4
|
+
export function useVisibility() {
|
|
5
|
+
const visibility = ref(null);
|
|
6
|
+
let subscription;
|
|
7
|
+
let isMounted = false;
|
|
8
|
+
onMounted(() => {
|
|
9
|
+
isMounted = true;
|
|
10
|
+
getVisibilityAsync().then(value => {
|
|
11
|
+
if (isMounted)
|
|
12
|
+
visibility.value = value;
|
|
13
|
+
});
|
|
14
|
+
subscription = addVisibilityListener(({ visibility: next }) => {
|
|
15
|
+
if (isMounted)
|
|
16
|
+
visibility.value = next;
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
onUnmounted(() => {
|
|
20
|
+
subscription?.remove();
|
|
21
|
+
isMounted = false;
|
|
22
|
+
});
|
|
23
|
+
return visibility;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/angular/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { INavigationBarVisibility } from '../core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class NavigationBarVisibilityService {
|
|
4
|
+
readonly visibility: import("@angular/core").WritableSignal<INavigationBarVisibility | null>;
|
|
5
|
+
constructor();
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationBarVisibilityService, never>;
|
|
7
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NavigationBarVisibilityService>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Angular twin of `../react`/`../vue`/`../solid`/`../svelte`'s visibility hook, DI shape
|
|
2
|
+
// matching `ColorSchemeService` (`components_split_logic_view_lifecycle`)
|
|
3
|
+
import { DestroyRef, inject, Injectable, signal } from '@angular/core';
|
|
4
|
+
import { addVisibilityListener, getVisibilityAsync } from '../core';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export class NavigationBarVisibilityService {
|
|
7
|
+
visibility = signal(null, /* @ts-ignore */
|
|
8
|
+
...(ngDevMode ? [{ debugName: "visibility" }] : /* istanbul ignore next */ []));
|
|
9
|
+
constructor() {
|
|
10
|
+
const destroyRef = inject(DestroyRef);
|
|
11
|
+
let isMounted = true;
|
|
12
|
+
getVisibilityAsync().then(value => {
|
|
13
|
+
if (isMounted)
|
|
14
|
+
this.visibility.set(value);
|
|
15
|
+
});
|
|
16
|
+
const subscription = addVisibilityListener(({ visibility: next }) => {
|
|
17
|
+
if (isMounted)
|
|
18
|
+
this.visibility.set(next);
|
|
19
|
+
});
|
|
20
|
+
destroyRef.onDestroy(() => {
|
|
21
|
+
subscription.remove();
|
|
22
|
+
isMounted = false;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: NavigationBarVisibilityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
26
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: NavigationBarVisibilityService, providedIn: 'root' });
|
|
27
|
+
}
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: NavigationBarVisibilityService, decorators: [{
|
|
29
|
+
type: Injectable,
|
|
30
|
+
args: [{ providedIn: 'root' }]
|
|
31
|
+
}], ctorParameters: () => [] });
|
|
32
|
+
//# sourceMappingURL=navigation-bar-visibility.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-bar-visibility.service.js","sourceRoot":"","sources":["../../src/angular/navigation-bar-visibility.service.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,0EAA0E;AAE1E,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;;AAIpE,MAAM,OAAO,8BAA8B;IAChC,UAAU,GAAG,MAAM,CAAkC,IAAI;mFAAC,CAAC;IAEpE;QACE,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;QACtC,IAAI,SAAS,GAAG,IAAI,CAAC;QAErB,kBAAkB,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YAChC,IAAI,SAAS;gBAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;QAEH,MAAM,YAAY,GAAG,qBAAqB,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,EAAE;YAClE,IAAI,SAAS;gBAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;QAEH,UAAU,CAAC,SAAS,CAAC,GAAG,EAAE;YACxB,YAAY,CAAC,MAAM,EAAE,CAAC;YACtB,SAAS,GAAG,KAAK,CAAC;QACpB,CAAC,CAAC,CAAC;IACL,CAAC;uGAnBU,8BAA8B;2GAA9B,8BAA8B,cADjB,MAAM;;2FACnB,8BAA8B;kBAD1C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type OnChanges, type OnDestroy, type OnInit } from '@angular/core';
|
|
2
|
+
import { type INavigationBarStyle } from '../core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NavigationBar implements OnInit, OnChanges, OnDestroy {
|
|
5
|
+
style?: INavigationBarStyle;
|
|
6
|
+
hidden?: boolean;
|
|
7
|
+
private readonly colorScheme;
|
|
8
|
+
private stackEntry;
|
|
9
|
+
private isInitialized;
|
|
10
|
+
constructor();
|
|
11
|
+
ngOnInit(): void;
|
|
12
|
+
ngOnChanges(): void;
|
|
13
|
+
ngOnDestroy(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationBar, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NavigationBar, "navigation-bar", never, { "style": { "alias": "style"; "required": false; }; "hidden": { "alias": "hidden"; "required": false; }; }, {}, never, never, true, never>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Angular twin of `../react`/`../vue`/`../solid`/`../svelte`'s `NavigationBar`, same shared
|
|
2
|
+
// stack core - only the lifecycle wiring differs per adapter
|
|
3
|
+
// (`components_split_logic_view_lifecycle`)
|
|
4
|
+
import { Component, effect, inject, Input, } from '@angular/core';
|
|
5
|
+
import { ColorSchemeService } from '@symbiote-native/angular';
|
|
6
|
+
import { popStackEntry, pushStackEntry, replaceStackEntry, } from '../core';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export class NavigationBar {
|
|
9
|
+
style;
|
|
10
|
+
hidden;
|
|
11
|
+
colorScheme = inject(ColorSchemeService).colorScheme;
|
|
12
|
+
stackEntry = null;
|
|
13
|
+
isInitialized = false;
|
|
14
|
+
constructor() {
|
|
15
|
+
effect(() => {
|
|
16
|
+
this.colorScheme();
|
|
17
|
+
if (this.stackEntry) {
|
|
18
|
+
this.stackEntry = replaceStackEntry(this.stackEntry, {
|
|
19
|
+
style: this.style,
|
|
20
|
+
hidden: this.hidden,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
ngOnInit() {
|
|
26
|
+
this.stackEntry = pushStackEntry({
|
|
27
|
+
style: this.style,
|
|
28
|
+
hidden: this.hidden,
|
|
29
|
+
});
|
|
30
|
+
this.isInitialized = true;
|
|
31
|
+
}
|
|
32
|
+
ngOnChanges() {
|
|
33
|
+
if (!this.isInitialized || !this.stackEntry)
|
|
34
|
+
return;
|
|
35
|
+
this.stackEntry = replaceStackEntry(this.stackEntry, {
|
|
36
|
+
style: this.style,
|
|
37
|
+
hidden: this.hidden,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
ngOnDestroy() {
|
|
41
|
+
if (this.stackEntry)
|
|
42
|
+
popStackEntry(this.stackEntry);
|
|
43
|
+
}
|
|
44
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: NavigationBar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
45
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: NavigationBar, isStandalone: true, selector: "navigation-bar", inputs: { style: "style", hidden: "hidden" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true });
|
|
46
|
+
}
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: NavigationBar, decorators: [{
|
|
48
|
+
type: Component,
|
|
49
|
+
args: [{
|
|
50
|
+
selector: 'navigation-bar',
|
|
51
|
+
standalone: true,
|
|
52
|
+
template: '',
|
|
53
|
+
}]
|
|
54
|
+
}], ctorParameters: () => [], propDecorators: { style: [{
|
|
55
|
+
type: Input
|
|
56
|
+
}], hidden: [{
|
|
57
|
+
type: Input
|
|
58
|
+
}] } });
|
|
59
|
+
//# sourceMappingURL=navigation-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-bar.js","sourceRoot":"","sources":["../../src/angular/navigation-bar.ts"],"names":[],"mappings":"AAAA,4FAA4F;AA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C,UAAU;YAAE,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACtD,CAAC;uGAtCU,aAAa;2FAAb,aAAa,6IAFd,EAAE;;2FAED,aAAa;kBALzB,SAAS;mBAAC;oBACT,QAAQ,EAAE,gBAAgB;oBAC1B,UAAU,EAAE,IAAI;oBAChB,QAAQ,EAAE,EAAE;iBACb;;sBAEE,KAAK;;sBACL,KAAK"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { INavigationBarProps } from './types';
|
|
2
|
+
export type INavigationBarStackEntry = INavigationBarProps;
|
|
3
|
+
/** Registers a mounted `<NavigationBar>` entry */
|
|
4
|
+
export declare function pushStackEntry(props: INavigationBarProps): INavigationBarStackEntry;
|
|
5
|
+
/** Unregisters an entry, falling back to the previous entries or the last imperative call */
|
|
6
|
+
export declare function popStackEntry(entry: INavigationBarStackEntry): void;
|
|
7
|
+
/** Swaps an entry's props in place, for a mounted component's own prop changes */
|
|
8
|
+
export declare function replaceStackEntry(entry: INavigationBarStackEntry, props: INavigationBarProps): INavigationBarStackEntry;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Framework-agnostic merge-stack over multiple mounted `<NavigationBar>` declarative components,
|
|
2
|
+
// ported from expo-navigation-bar's NavigationBar.android.ts - the last pushed (or deepest in the
|
|
3
|
+
// view hierarchy) entry wins on shared fields, matching upstream's own priority rule
|
|
4
|
+
import { defaultNavigationBarProps, setHidden, setStyle, } from './navigation-bar';
|
|
5
|
+
const entriesStack = [];
|
|
6
|
+
let updateImmediate = null;
|
|
7
|
+
function mergeEntriesStack(stack) {
|
|
8
|
+
return stack.reduce((prev, cur) => ({
|
|
9
|
+
style: cur.style ?? prev.style,
|
|
10
|
+
hidden: cur.hidden ?? prev.hidden,
|
|
11
|
+
}), {});
|
|
12
|
+
}
|
|
13
|
+
function createStackEntry(props) {
|
|
14
|
+
return { style: props.style, hidden: props.hidden };
|
|
15
|
+
}
|
|
16
|
+
function updateEntriesStack() {
|
|
17
|
+
if (updateImmediate != null)
|
|
18
|
+
clearImmediate(updateImmediate);
|
|
19
|
+
updateImmediate = setImmediate(() => {
|
|
20
|
+
if (entriesStack.length === 0) {
|
|
21
|
+
setStyle(defaultNavigationBarProps.style);
|
|
22
|
+
setHidden(defaultNavigationBarProps.hidden);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const { style, hidden } = mergeEntriesStack(entriesStack);
|
|
26
|
+
if (style != null)
|
|
27
|
+
setStyle(style);
|
|
28
|
+
if (hidden != null)
|
|
29
|
+
setHidden(hidden);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/** Registers a mounted `<NavigationBar>` entry */
|
|
33
|
+
export function pushStackEntry(props) {
|
|
34
|
+
const entry = createStackEntry(props);
|
|
35
|
+
entriesStack.push(entry);
|
|
36
|
+
updateEntriesStack();
|
|
37
|
+
return entry;
|
|
38
|
+
}
|
|
39
|
+
/** Unregisters an entry, falling back to the previous entries or the last imperative call */
|
|
40
|
+
export function popStackEntry(entry) {
|
|
41
|
+
const index = entriesStack.indexOf(entry);
|
|
42
|
+
if (index !== -1)
|
|
43
|
+
entriesStack.splice(index, 1);
|
|
44
|
+
updateEntriesStack();
|
|
45
|
+
}
|
|
46
|
+
/** Swaps an entry's props in place, for a mounted component's own prop changes */
|
|
47
|
+
export function replaceStackEntry(entry, props) {
|
|
48
|
+
const newEntry = createStackEntry(props);
|
|
49
|
+
const index = entriesStack.indexOf(entry);
|
|
50
|
+
if (index !== -1)
|
|
51
|
+
entriesStack[index] = newEntry;
|
|
52
|
+
updateEntriesStack();
|
|
53
|
+
return newEntry;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=entries-stack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entries-stack.js","sourceRoot":"","sources":["../../src/core/entries-stack.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,kGAAkG;AAClG,qFAAqF;AAErF,OAAO,EACL,yBAAyB,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AY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACzB,kBAAkB,EAAE,CAAC;IACrB,OAAO,KAAK,CAAC;AACf,CAAC;AAED,6FAA6F;AAC7F,MAAM,UAAU,aAAa,CAAC,KAA+B;IAC3D,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC1C,IAAI,KAAK,KAAK,CAAC,CAAC;QAAE,YAAY,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAChD,kBAAkB,EAAE,CAAC;AACvB,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,iBAAiB,CAC/B,KAA+B,EAC/B,KAA0B;IAE1B,MAAM,QAAQ,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACzC,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC1C,IAAI,KAAK,KAAK,CAAC,CAAC;QAAE,YAAY,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC;IACjD,kBAAkB,EAAE,CAAC;IACrB,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { addVisibilityListener, getVisibilityAsync, setHidden, setStyle, setVisibilityAsync, } from './navigation-bar';
|
|
2
|
+
export { popStackEntry, pushStackEntry, replaceStackEntry, type INavigationBarStackEntry, } from './entries-stack';
|
|
3
|
+
export type { INavigationBarProps, INavigationBarStyle, INavigationBarVisibility, INavigationBarVisibilityEvent, } from './types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,SAAS,EACT,QAAQ,EACR,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,aAAa,EACb,cAAc,EACd,iBAAiB,GAElB,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.android.js","sourceRoot":"","sources":["../../../src/core/native-module/index.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGxD,MAAM,CAAC,MAAM,iBAAiB,GAC5B,mBAAmB,CAA6B,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/native-module/index.ts"],"names":[],"mappings":"AAEA,8FAA8F;AAC9F,qFAAqF;AACrF,MAAM,CAAC,MAAM,iBAAiB,GAAwC,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EventSubscription } from 'expo-modules-core';
|
|
2
|
+
import type { INavigationBarVisibility, INavigationBarVisibilityEvent } from '../types';
|
|
3
|
+
export type INativeNavigationBarModule = {
|
|
4
|
+
addListener(event: 'ExpoNavigationBar.didChange', listener: (event: INavigationBarVisibilityEvent) => void): EventSubscription;
|
|
5
|
+
setStyle(style: 'light' | 'dark'): Promise<void>;
|
|
6
|
+
setHidden(hidden: boolean): Promise<void>;
|
|
7
|
+
getVisibilityAsync(): Promise<INavigationBarVisibility>;
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/core/native-module/shared.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type EventSubscription } from 'expo-modules-core';
|
|
2
|
+
import type { INavigationBarStyle, INavigationBarVisibility, INavigationBarVisibilityEvent } from './types';
|
|
3
|
+
export declare const defaultNavigationBarProps: {
|
|
4
|
+
style: INavigationBarStyle;
|
|
5
|
+
hidden: boolean;
|
|
6
|
+
};
|
|
7
|
+
/** Sets the navigation bar buttons' style */
|
|
8
|
+
export declare function setStyle(style: INavigationBarStyle): void;
|
|
9
|
+
/** Shows or hides the navigation bar */
|
|
10
|
+
export declare function setHidden(hidden: boolean): void;
|
|
11
|
+
/** Observes changes to the system navigation bar's visibility */
|
|
12
|
+
export declare function addVisibilityListener(listener: (event: INavigationBarVisibilityEvent) => void): EventSubscription;
|
|
13
|
+
/** Sets the navigation bar's visibility */
|
|
14
|
+
export declare function setVisibilityAsync(visibility: INavigationBarVisibility): Promise<void>;
|
|
15
|
+
/** Gets the navigation bar's current visibility */
|
|
16
|
+
export declare function getVisibilityAsync(): Promise<INavigationBarVisibility>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { UnavailabilityError } from 'expo-modules-core';
|
|
2
|
+
import { Appearance } from '@symbiote-native/engine';
|
|
3
|
+
import { expoNavigationBar } from './native-module';
|
|
4
|
+
function isLightColorScheme() {
|
|
5
|
+
return (Appearance.getColorScheme() ?? 'light') === 'light';
|
|
6
|
+
}
|
|
7
|
+
function resolveStyle(style) {
|
|
8
|
+
switch (style) {
|
|
9
|
+
case 'auto':
|
|
10
|
+
return isLightColorScheme() ? 'dark' : 'light';
|
|
11
|
+
case 'inverted':
|
|
12
|
+
return isLightColorScheme() ? 'light' : 'dark';
|
|
13
|
+
default:
|
|
14
|
+
return style;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
let currentStyle;
|
|
18
|
+
let currentHidden;
|
|
19
|
+
// The baseline the declarative `<NavigationBar>` stack falls back to once every mounted
|
|
20
|
+
// entry unmounts, kept in sync with every imperative `setStyle`/`setHidden` call too -
|
|
21
|
+
// mirrors upstream's own `defaultProps`, read by ./entries-stack.ts
|
|
22
|
+
export const defaultNavigationBarProps = {
|
|
23
|
+
style: 'light',
|
|
24
|
+
hidden: false,
|
|
25
|
+
};
|
|
26
|
+
/** Sets the navigation bar buttons' style */
|
|
27
|
+
export function setStyle(style) {
|
|
28
|
+
if (!expoNavigationBar.setStyle) {
|
|
29
|
+
throw new UnavailabilityError('NavigationBar', 'setStyle');
|
|
30
|
+
}
|
|
31
|
+
defaultNavigationBarProps.style = style;
|
|
32
|
+
const resolved = resolveStyle(style);
|
|
33
|
+
if (resolved === currentStyle)
|
|
34
|
+
return;
|
|
35
|
+
currentStyle = resolved;
|
|
36
|
+
expoNavigationBar.setStyle(resolved);
|
|
37
|
+
}
|
|
38
|
+
/** Shows or hides the navigation bar */
|
|
39
|
+
export function setHidden(hidden) {
|
|
40
|
+
if (!expoNavigationBar.setHidden) {
|
|
41
|
+
throw new UnavailabilityError('NavigationBar', 'setHidden');
|
|
42
|
+
}
|
|
43
|
+
defaultNavigationBarProps.hidden = hidden;
|
|
44
|
+
if (hidden === currentHidden)
|
|
45
|
+
return;
|
|
46
|
+
currentHidden = hidden;
|
|
47
|
+
expoNavigationBar.setHidden(hidden);
|
|
48
|
+
}
|
|
49
|
+
/** Observes changes to the system navigation bar's visibility */
|
|
50
|
+
export function addVisibilityListener(listener) {
|
|
51
|
+
if (!expoNavigationBar.addListener) {
|
|
52
|
+
throw new UnavailabilityError('NavigationBar', 'addVisibilityListener');
|
|
53
|
+
}
|
|
54
|
+
return expoNavigationBar.addListener('ExpoNavigationBar.didChange', listener);
|
|
55
|
+
}
|
|
56
|
+
/** Sets the navigation bar's visibility */
|
|
57
|
+
export async function setVisibilityAsync(visibility) {
|
|
58
|
+
if (!expoNavigationBar.setHidden) {
|
|
59
|
+
throw new UnavailabilityError('NavigationBar', 'setVisibilityAsync');
|
|
60
|
+
}
|
|
61
|
+
await expoNavigationBar.setHidden(visibility === 'hidden');
|
|
62
|
+
}
|
|
63
|
+
/** Gets the navigation bar's current visibility */
|
|
64
|
+
export async function getVisibilityAsync() {
|
|
65
|
+
if (!expoNavigationBar.getVisibilityAsync) {
|
|
66
|
+
throw new UnavailabilityError('NavigationBar', 'getVisibilityAsync');
|
|
67
|
+
}
|
|
68
|
+
return expoNavigationBar.getVisibilityAsync();
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=navigation-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-bar.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INavigationBarVisibilityEvent = {
|
|
3
|
+
/** Current navigation bar visibility */
|
|
4
|
+
visibility: INavigationBarVisibility;
|
|
5
|
+
/** Native Android system UI visibility state, from `setOnSystemUiVisibilityChangeListener` */
|
|
6
|
+
rawVisibility: number;
|
|
7
|
+
};
|
|
8
|
+
/** `auto`/`inverted` resolve against the current color scheme, `light`/`dark` are fixed */
|
|
9
|
+
export type INavigationBarStyle = 'auto' | 'inverted' | 'light' | 'dark';
|
|
10
|
+
export type INavigationBarProps = {
|
|
11
|
+
/** @default 'auto' */
|
|
12
|
+
style?: INavigationBarStyle;
|
|
13
|
+
hidden?: boolean;
|
|
14
|
+
};
|