@symbiote-native/navigation 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/package.json +11 -10
  2. package/build/angular/drawer/index.d.ts +0 -76
  3. package/build/angular/drawer/index.js +0 -508
  4. package/build/angular/drawer-screen.directive.d.ts +0 -14
  5. package/build/angular/drawer-screen.directive.js +0 -87
  6. package/build/angular/index.d.ts +0 -23
  7. package/build/angular/index.js +0 -22
  8. package/build/angular/injectors/index.d.ts +0 -13
  9. package/build/angular/injectors/index.js +0 -8
  10. package/build/angular/injectors/inject-drawer-navigation.d.ts +0 -4
  11. package/build/angular/injectors/inject-drawer-navigation.js +0 -12
  12. package/build/angular/injectors/inject-focus-effect.d.ts +0 -2
  13. package/build/angular/injectors/inject-focus-effect.js +0 -29
  14. package/build/angular/injectors/inject-is-focused.d.ts +0 -2
  15. package/build/angular/injectors/inject-is-focused.js +0 -20
  16. package/build/angular/injectors/inject-navigation-state.d.ts +0 -3
  17. package/build/angular/injectors/inject-navigation-state.js +0 -35
  18. package/build/angular/injectors/inject-navigation.d.ts +0 -7
  19. package/build/angular/injectors/inject-navigation.js +0 -16
  20. package/build/angular/injectors/inject-route.d.ts +0 -3
  21. package/build/angular/injectors/inject-route.js +0 -20
  22. package/build/angular/injectors/inject-stack-navigation.d.ts +0 -4
  23. package/build/angular/injectors/inject-stack-navigation.js +0 -15
  24. package/build/angular/injectors/inject-tab-navigation.d.ts +0 -4
  25. package/build/angular/injectors/inject-tab-navigation.js +0 -11
  26. package/build/angular/linking.d.ts +0 -3
  27. package/build/angular/linking.js +0 -43
  28. package/build/angular/navigation-context.service.d.ts +0 -13
  29. package/build/angular/navigation-context.service.js +0 -105
  30. package/build/angular/navigation-scope.directive.d.ts +0 -10
  31. package/build/angular/navigation-scope.directive.js +0 -90
  32. package/build/angular/screen.directive.d.ts +0 -22
  33. package/build/angular/screen.directive.js +0 -90
  34. package/build/angular/search-bar-ref.directive.d.ts +0 -10
  35. package/build/angular/search-bar-ref.directive.js +0 -88
  36. package/build/angular/stack/index.d.ts +0 -55
  37. package/build/angular/stack/index.js +0 -386
  38. package/build/angular/tab-screen.directive.d.ts +0 -14
  39. package/build/angular/tab-screen.directive.js +0 -87
  40. package/build/angular/tabs/index.d.ts +0 -42
  41. package/build/angular/tabs/index.js +0 -263
  42. package/build/core/constants.d.ts +0 -27
  43. package/build/core/constants.js +0 -61
  44. package/build/core/drawer-options/index.d.ts +0 -64
  45. package/build/core/drawer-options/index.js +0 -200
  46. package/build/core/drawer-router-state/index.d.ts +0 -21
  47. package/build/core/drawer-router-state/index.js +0 -40
  48. package/build/core/guards.d.ts +0 -2
  49. package/build/core/guards.js +0 -22
  50. package/build/core/header-bar-buttons.d.ts +0 -9
  51. package/build/core/header-bar-buttons.js +0 -163
  52. package/build/core/index.d.ts +0 -29
  53. package/build/core/index.js +0 -32
  54. package/build/core/linking-config/index.d.ts +0 -13
  55. package/build/core/linking-config/index.js +0 -171
  56. package/build/core/navigation-events/index.d.ts +0 -16
  57. package/build/core/navigation-events/index.js +0 -57
  58. package/build/core/navigator-handles/index.d.ts +0 -30
  59. package/build/core/navigator-handles/index.js +0 -15
  60. package/build/core/navigator-props.d.ts +0 -216
  61. package/build/core/navigator-props.js +0 -7
  62. package/build/core/navigator-state/index.d.ts +0 -36
  63. package/build/core/navigator-state/index.js +0 -81
  64. package/build/core/render-drawer.d.ts +0 -13
  65. package/build/core/render-drawer.js +0 -88
  66. package/build/core/render-stack.d.ts +0 -35
  67. package/build/core/render-stack.js +0 -294
  68. package/build/core/render-tabs.d.ts +0 -20
  69. package/build/core/render-tabs.js +0 -97
  70. package/build/core/screen-options.d.ts +0 -4
  71. package/build/core/screen-options.js +0 -133
  72. package/build/core/search-bar-commands.d.ts +0 -10
  73. package/build/core/search-bar-commands.js +0 -42
  74. package/build/core/state-persistence/index.d.ts +0 -3
  75. package/build/core/state-persistence/index.js +0 -23
  76. package/build/core/tab-options.d.ts +0 -13
  77. package/build/core/tab-options.js +0 -10
  78. package/build/core/tab-router-state/index.d.ts +0 -19
  79. package/build/core/tab-router-state/index.js +0 -51
  80. package/build/react/collect-registry.d.ts +0 -4
  81. package/build/react/collect-registry.js +0 -15
  82. package/build/react/drawer/index.d.ts +0 -29
  83. package/build/react/drawer/index.js +0 -277
  84. package/build/react/drawer-screen.d.ts +0 -14
  85. package/build/react/drawer-screen.js +0 -8
  86. package/build/react/hooks/index.d.ts +0 -12
  87. package/build/react/hooks/index.js +0 -8
  88. package/build/react/hooks/use-drawer-navigation.d.ts +0 -4
  89. package/build/react/hooks/use-drawer-navigation.js +0 -12
  90. package/build/react/hooks/use-focus-effect.d.ts +0 -2
  91. package/build/react/hooks/use-focus-effect.js +0 -29
  92. package/build/react/hooks/use-is-focused.d.ts +0 -1
  93. package/build/react/hooks/use-is-focused.js +0 -22
  94. package/build/react/hooks/use-navigation-state/index.d.ts +0 -2
  95. package/build/react/hooks/use-navigation-state/index.js +0 -39
  96. package/build/react/hooks/use-navigation.d.ts +0 -7
  97. package/build/react/hooks/use-navigation.js +0 -16
  98. package/build/react/hooks/use-route.d.ts +0 -2
  99. package/build/react/hooks/use-route.js +0 -8
  100. package/build/react/hooks/use-stack-navigation.d.ts +0 -4
  101. package/build/react/hooks/use-stack-navigation.js +0 -14
  102. package/build/react/hooks/use-tab-navigation.d.ts +0 -4
  103. package/build/react/hooks/use-tab-navigation.js +0 -12
  104. package/build/react/index.d.ts +0 -24
  105. package/build/react/index.js +0 -21
  106. package/build/react/linking.d.ts +0 -3
  107. package/build/react/linking.js +0 -47
  108. package/build/react/navigation-context.d.ts +0 -10
  109. package/build/react/navigation-context.js +0 -22
  110. package/build/react/screen.d.ts +0 -22
  111. package/build/react/screen.js +0 -7
  112. package/build/react/stack/index.d.ts +0 -13
  113. package/build/react/stack/index.js +0 -202
  114. package/build/react/tab-screen.d.ts +0 -15
  115. package/build/react/tab-screen.js +0 -8
  116. package/build/react/tabs/index.d.ts +0 -12
  117. package/build/react/tabs/index.js +0 -116
  118. package/build/register.d.ts +0 -7
  119. package/build/register.js +0 -58
  120. package/build/vue/composables/index.d.ts +0 -12
  121. package/build/vue/composables/index.js +0 -8
  122. package/build/vue/composables/use-drawer-navigation.d.ts +0 -5
  123. package/build/vue/composables/use-drawer-navigation.js +0 -15
  124. package/build/vue/composables/use-focus-effect.d.ts +0 -1
  125. package/build/vue/composables/use-focus-effect.js +0 -31
  126. package/build/vue/composables/use-is-focused.d.ts +0 -2
  127. package/build/vue/composables/use-is-focused.js +0 -28
  128. package/build/vue/composables/use-navigation-state.d.ts +0 -3
  129. package/build/vue/composables/use-navigation-state.js +0 -29
  130. package/build/vue/composables/use-navigation.d.ts +0 -8
  131. package/build/vue/composables/use-navigation.js +0 -13
  132. package/build/vue/composables/use-route.d.ts +0 -3
  133. package/build/vue/composables/use-route.js +0 -9
  134. package/build/vue/composables/use-stack-navigation.d.ts +0 -5
  135. package/build/vue/composables/use-stack-navigation.js +0 -18
  136. package/build/vue/composables/use-tab-navigation.d.ts +0 -5
  137. package/build/vue/composables/use-tab-navigation.js +0 -15
  138. package/build/vue/drawer/index.d.ts +0 -19
  139. package/build/vue/drawer/index.js +0 -390
  140. package/build/vue/drawer-screen.d.ts +0 -14
  141. package/build/vue/drawer-screen.js +0 -12
  142. package/build/vue/index.d.ts +0 -21
  143. package/build/vue/index.js +0 -19
  144. package/build/vue/linking.d.ts +0 -3
  145. package/build/vue/linking.js +0 -57
  146. package/build/vue/navigation-context.d.ts +0 -16
  147. package/build/vue/navigation-context.js +0 -65
  148. package/build/vue/screen.d.ts +0 -21
  149. package/build/vue/screen.js +0 -12
  150. package/build/vue/stack/index.d.ts +0 -9
  151. package/build/vue/stack/index.js +0 -279
  152. package/build/vue/tab-screen.d.ts +0 -14
  153. package/build/vue/tab-screen.js +0 -11
  154. package/build/vue/tabs/index.d.ts +0 -10
  155. package/build/vue/tabs/index.js +0 -209
@@ -1,90 +0,0 @@
1
- // The Angular twin of react/navigation-context.ts's `NavigationContext.Provider` usage in
2
- // stack.ts/tabs.ts/drawer.ts's render loops: one directive instance = one fresh scope. Applying
3
- // `[symbioteNavigationScope]` to an element re-`providers: [NavigationContextService]`
4
- // (component/directive-level DI), so every usage mints its OWN service instance - the DI twin of
5
- // `createElement(NavigationContext.Provider, { value }, content)`. Descendants (a screen's own
6
- // component tree, reached through `*ngComponentOutlet`) call `inject(NavigationContextService)`
7
- // and resolve to the NEAREST enclosing instance, exactly like `useContext(NavigationContext)`
8
- // walks to the nearest Provider.
9
- var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
10
- function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
11
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
12
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
13
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
14
- var _, done = false;
15
- for (var i = decorators.length - 1; i >= 0; i--) {
16
- var context = {};
17
- for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
18
- for (var p in contextIn.access) context.access[p] = contextIn.access[p];
19
- context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
20
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
21
- if (kind === "accessor") {
22
- if (result === void 0) continue;
23
- if (result === null || typeof result !== "object") throw new TypeError("Object expected");
24
- if (_ = accept(result.get)) descriptor.get = _;
25
- if (_ = accept(result.set)) descriptor.set = _;
26
- if (_ = accept(result.init)) initializers.unshift(_);
27
- }
28
- else if (_ = accept(result)) {
29
- if (kind === "field") initializers.unshift(_);
30
- else descriptor[key] = _;
31
- }
32
- }
33
- if (target) Object.defineProperty(target, contextIn.name, descriptor);
34
- done = true;
35
- };
36
- var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
37
- var useValue = arguments.length > 2;
38
- for (var i = 0; i < initializers.length; i++) {
39
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
40
- }
41
- return useValue ? value : void 0;
42
- };
43
- import { Directive, Input, inject } from '@angular/core';
44
- import { NavigationContextService } from './navigation-context.service.js';
45
- let NavigationScopeDirective = (() => {
46
- let _classDecorators = [Directive({
47
- selector: '[symbioteNavigationScope]',
48
- standalone: true,
49
- providers: [NavigationContextService],
50
- })];
51
- let _classDescriptor;
52
- let _classExtraInitializers = [];
53
- let _classThis;
54
- let _route_decorators;
55
- let _route_initializers = [];
56
- let _route_extraInitializers = [];
57
- let _navigation_decorators;
58
- let _navigation_initializers = [];
59
- let _navigation_extraInitializers = [];
60
- let _emitter_decorators;
61
- let _emitter_initializers = [];
62
- let _emitter_extraInitializers = [];
63
- var NavigationScopeDirective = class {
64
- static { _classThis = this; }
65
- static {
66
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
67
- _route_decorators = [Input({ required: true, alias: 'symbioteNavigationScope' })];
68
- _navigation_decorators = [Input({ required: true })];
69
- _emitter_decorators = [Input({ required: true })];
70
- __esDecorate(null, null, _route_decorators, { kind: "field", name: "route", static: false, private: false, access: { has: obj => "route" in obj, get: obj => obj.route, set: (obj, value) => { obj.route = value; } }, metadata: _metadata }, _route_initializers, _route_extraInitializers);
71
- __esDecorate(null, null, _navigation_decorators, { kind: "field", name: "navigation", static: false, private: false, access: { has: obj => "navigation" in obj, get: obj => obj.navigation, set: (obj, value) => { obj.navigation = value; } }, metadata: _metadata }, _navigation_initializers, _navigation_extraInitializers);
72
- __esDecorate(null, null, _emitter_decorators, { kind: "field", name: "emitter", static: false, private: false, access: { has: obj => "emitter" in obj, get: obj => obj.emitter, set: (obj, value) => { obj.emitter = value; } }, metadata: _metadata }, _emitter_initializers, _emitter_extraInitializers);
73
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
74
- NavigationScopeDirective = _classThis = _classDescriptor.value;
75
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
76
- __runInitializers(_classThis, _classExtraInitializers);
77
- }
78
- route = __runInitializers(this, _route_initializers, void 0);
79
- navigation = (__runInitializers(this, _route_extraInitializers), __runInitializers(this, _navigation_initializers, void 0));
80
- emitter = (__runInitializers(this, _navigation_extraInitializers), __runInitializers(this, _emitter_initializers, void 0));
81
- context = (__runInitializers(this, _emitter_extraInitializers), inject(NavigationContextService));
82
- ngOnChanges() {
83
- this.context.setRoute(this.route);
84
- this.context.navigation = this.navigation;
85
- this.context.emitter = this.emitter;
86
- }
87
- };
88
- return NavigationScopeDirective = _classThis;
89
- })();
90
- export { NavigationScopeDirective };
@@ -1,22 +0,0 @@
1
- import { type Type } from '@angular/core';
2
- import type { ISearchBarCommands, ISearchBarOptions, IScreenOptions, IRoute } from '../core';
3
- import type { INavigatorHandle } from '../core';
4
- export type IAngularSearchBarOptions = ISearchBarOptions & {
5
- ref?: {
6
- current: ISearchBarCommands | null;
7
- };
8
- };
9
- export type IAngularScreenOptions = Omit<IScreenOptions, 'headerSearchBarOptions'> & {
10
- headerSearchBarOptions?: IAngularSearchBarOptions;
11
- };
12
- export type IScreenOptionsArgs = {
13
- route: IRoute<unknown>;
14
- navigation: INavigatorHandle;
15
- };
16
- export type IScreenOptionsResolver = (args: IScreenOptionsArgs) => IAngularScreenOptions;
17
- export declare class ScreenDirective {
18
- name: string;
19
- component: Type<unknown>;
20
- options?: IAngularScreenOptions | IScreenOptionsResolver;
21
- initialParams?: unknown;
22
- }
@@ -1,90 +0,0 @@
1
- // [symbioteScreen]: a declarative marker, never rendered on its own - Stack reads its inputs via
2
- // @ContentChildren to build the static name -> {component, options} registry, then mounts the
3
- // registered component itself for each pushed route. Angular's twin of react/screen.ts's Screen
4
- // marker component; mirrors Angular Material's own `@ContentChildren(MatTab) tabs: QueryList<MatTab>`
5
- // pattern (a directive applied to an inert `<ng-template>`, never instantiated as a view - see
6
- // stack.ts's header for why that's safe: @ContentChildren resolves the light-DOM declaration,
7
- // independent of whether the template is ever instantiated).
8
- var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
9
- function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
10
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
11
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
12
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
13
- var _, done = false;
14
- for (var i = decorators.length - 1; i >= 0; i--) {
15
- var context = {};
16
- for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
17
- for (var p in contextIn.access) context.access[p] = contextIn.access[p];
18
- context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
19
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
20
- if (kind === "accessor") {
21
- if (result === void 0) continue;
22
- if (result === null || typeof result !== "object") throw new TypeError("Object expected");
23
- if (_ = accept(result.get)) descriptor.get = _;
24
- if (_ = accept(result.set)) descriptor.set = _;
25
- if (_ = accept(result.init)) initializers.unshift(_);
26
- }
27
- else if (_ = accept(result)) {
28
- if (kind === "field") initializers.unshift(_);
29
- else descriptor[key] = _;
30
- }
31
- }
32
- if (target) Object.defineProperty(target, contextIn.name, descriptor);
33
- done = true;
34
- };
35
- var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
36
- var useValue = arguments.length > 2;
37
- for (var i = 0; i < initializers.length; i++) {
38
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
39
- }
40
- return useValue ? value : void 0;
41
- };
42
- import { Directive, Input } from '@angular/core';
43
- let ScreenDirective = (() => {
44
- let _classDecorators = [Directive({
45
- selector: 'ng-template[symbioteScreen]',
46
- standalone: true,
47
- })];
48
- let _classDescriptor;
49
- let _classExtraInitializers = [];
50
- let _classThis;
51
- let _name_decorators;
52
- let _name_initializers = [];
53
- let _name_extraInitializers = [];
54
- let _component_decorators;
55
- let _component_initializers = [];
56
- let _component_extraInitializers = [];
57
- let _options_decorators;
58
- let _options_initializers = [];
59
- let _options_extraInitializers = [];
60
- let _initialParams_decorators;
61
- let _initialParams_initializers = [];
62
- let _initialParams_extraInitializers = [];
63
- var ScreenDirective = class {
64
- static { _classThis = this; }
65
- static {
66
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
67
- _name_decorators = [Input({ required: true })];
68
- _component_decorators = [Input({ required: true })];
69
- _options_decorators = [Input()];
70
- _initialParams_decorators = [Input()];
71
- __esDecorate(null, null, _name_decorators, { kind: "field", name: "name", static: false, private: false, access: { has: obj => "name" in obj, get: obj => obj.name, set: (obj, value) => { obj.name = value; } }, metadata: _metadata }, _name_initializers, _name_extraInitializers);
72
- __esDecorate(null, null, _component_decorators, { kind: "field", name: "component", static: false, private: false, access: { has: obj => "component" in obj, get: obj => obj.component, set: (obj, value) => { obj.component = value; } }, metadata: _metadata }, _component_initializers, _component_extraInitializers);
73
- __esDecorate(null, null, _options_decorators, { kind: "field", name: "options", static: false, private: false, access: { has: obj => "options" in obj, get: obj => obj.options, set: (obj, value) => { obj.options = value; } }, metadata: _metadata }, _options_initializers, _options_extraInitializers);
74
- __esDecorate(null, null, _initialParams_decorators, { kind: "field", name: "initialParams", static: false, private: false, access: { has: obj => "initialParams" in obj, get: obj => obj.initialParams, set: (obj, value) => { obj.initialParams = value; } }, metadata: _metadata }, _initialParams_initializers, _initialParams_extraInitializers);
75
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
76
- ScreenDirective = _classThis = _classDescriptor.value;
77
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
78
- __runInitializers(_classThis, _classExtraInitializers);
79
- }
80
- name = __runInitializers(this, _name_initializers, void 0);
81
- component = (__runInitializers(this, _name_extraInitializers), __runInitializers(this, _component_initializers, void 0));
82
- options = (__runInitializers(this, _component_extraInitializers), __runInitializers(this, _options_initializers, void 0));
83
- initialParams = (__runInitializers(this, _options_extraInitializers), __runInitializers(this, _initialParams_initializers, void 0));
84
- constructor() {
85
- __runInitializers(this, _initialParams_extraInitializers);
86
- }
87
- };
88
- return ScreenDirective = _classThis;
89
- })();
90
- export { ScreenDirective };
@@ -1,10 +0,0 @@
1
- import { type OnDestroy, type OnInit } from '@angular/core';
2
- import type { ISearchBarCommands } from '../core';
3
- export declare class SearchBarRefDirective implements OnInit, OnDestroy {
4
- ref: {
5
- current: ISearchBarCommands | null;
6
- } | undefined;
7
- private readonly elementRef;
8
- ngOnInit(): void;
9
- ngOnDestroy(): void;
10
- }
@@ -1,88 +0,0 @@
1
- // Assigns the app-supplied `headerSearchBarOptions.ref` (a plain `{ current }` cell - see
2
- // screen.directive.ts's IAngularSearchBarOptions) once the RNSSearchBar native node exists.
3
- // Angular's twin of react/stack.ts's callback `ref` prop on the RNSSearchBar element: a directive
4
- // applied directly onto the raw `<RNSSearchBar>` tag can `inject(ElementRef)` the same way
5
- // SymbioteHostPropsDirective does (primitives/shared.ts's own pattern) - ElementRef.nativeElement
6
- // is the real engine node the moment the element is created (synchronous, no whenCommitted wait
7
- // needed here: buildSearchBarHandle's own methods are already a LAZY getter over the node,
8
- // tolerant of the node existing-but-not-yet-committed, same contract every adapter shares).
9
- var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
10
- function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
11
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
12
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
13
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
14
- var _, done = false;
15
- for (var i = decorators.length - 1; i >= 0; i--) {
16
- var context = {};
17
- for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
18
- for (var p in contextIn.access) context.access[p] = contextIn.access[p];
19
- context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
20
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
21
- if (kind === "accessor") {
22
- if (result === void 0) continue;
23
- if (result === null || typeof result !== "object") throw new TypeError("Object expected");
24
- if (_ = accept(result.get)) descriptor.get = _;
25
- if (_ = accept(result.set)) descriptor.set = _;
26
- if (_ = accept(result.init)) initializers.unshift(_);
27
- }
28
- else if (_ = accept(result)) {
29
- if (kind === "field") initializers.unshift(_);
30
- else descriptor[key] = _;
31
- }
32
- }
33
- if (target) Object.defineProperty(target, contextIn.name, descriptor);
34
- done = true;
35
- };
36
- var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
37
- var useValue = arguments.length > 2;
38
- for (var i = 0; i < initializers.length; i++) {
39
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
40
- }
41
- return useValue ? value : void 0;
42
- };
43
- import { Directive, Input, inject, ElementRef } from '@angular/core';
44
- import { isSymbioteNode, dlog, debugNodeId } from '@symbiote-native/engine';
45
- import { buildSearchBarHandle } from '../core/index.js';
46
- let SearchBarRefDirective = (() => {
47
- let _classDecorators = [Directive({
48
- selector: '[symbioteSearchBarRef]',
49
- standalone: true,
50
- })];
51
- let _classDescriptor;
52
- let _classExtraInitializers = [];
53
- let _classThis;
54
- let _ref_decorators;
55
- let _ref_initializers = [];
56
- let _ref_extraInitializers = [];
57
- var SearchBarRefDirective = class {
58
- static { _classThis = this; }
59
- static {
60
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
61
- _ref_decorators = [Input('symbioteSearchBarRef')];
62
- __esDecorate(null, null, _ref_decorators, { kind: "field", name: "ref", static: false, private: false, access: { has: obj => "ref" in obj, get: obj => obj.ref, set: (obj, value) => { obj.ref = value; } }, metadata: _metadata }, _ref_initializers, _ref_extraInitializers);
63
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
64
- SearchBarRefDirective = _classThis = _classDescriptor.value;
65
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
66
- __runInitializers(_classThis, _classExtraInitializers);
67
- }
68
- ref = __runInitializers(this, _ref_initializers, void 0);
69
- elementRef = (__runInitializers(this, _ref_extraInitializers), inject(ElementRef));
70
- ngOnInit() {
71
- if (!this.ref)
72
- return;
73
- const node = this.elementRef.nativeElement;
74
- if (!isSymbioteNode(node)) {
75
- this.ref.current = null;
76
- return;
77
- }
78
- dlog(`SearchBarRefDirective: attached to node=${debugNodeId(node)}`);
79
- this.ref.current = buildSearchBarHandle(() => node);
80
- }
81
- ngOnDestroy() {
82
- if (this.ref)
83
- this.ref.current = null;
84
- }
85
- };
86
- return SearchBarRefDirective = _classThis;
87
- })();
88
- export { SearchBarRefDirective };
@@ -1,55 +0,0 @@
1
- import { type AfterContentInit, type OnDestroy, type Type } from '@angular/core';
2
- import type { INavigationEmitter, INavigatorHandle, INavigatorState, IRoute, ISearchBarCommands } from '../../core';
3
- import type { IAngularScreenOptions } from '../screen.directive';
4
- export type { INavigatorHandle } from '../../core';
5
- export declare class Stack implements AfterContentInit, OnDestroy, INavigatorHandle {
6
- private readonly screenChildren;
7
- initialRouteName?: string;
8
- screenOptions?: IAngularScreenOptions;
9
- readonly headerSubviewProps: Record<string, unknown>;
10
- private readonly routeIdPrefix;
11
- private readonly registry;
12
- private readonly emitters;
13
- private readonly planCache;
14
- private routeSequence;
15
- private screenChildrenSubscription;
16
- private readonly stateSignal;
17
- readonly state: import("@angular/core").Signal<Readonly<{
18
- routes: readonly Readonly<{
19
- key: string;
20
- name: string;
21
- params: unknown;
22
- }>[];
23
- }> | undefined>;
24
- readonly push: (name: string, params?: unknown) => void;
25
- readonly pop: (count?: number) => void;
26
- readonly popToTop: () => void;
27
- readonly popTo: (key: string) => void;
28
- readonly replace: (name: string, params?: unknown) => void;
29
- readonly setParams: (params: unknown, key?: string) => void;
30
- readonly reset: (nextState: INavigatorState) => void;
31
- readonly canGoBack: () => boolean;
32
- ngAfterContentInit(): void;
33
- ngOnDestroy(): void;
34
- private rebuildRegistry;
35
- private initializeState;
36
- private createRoute;
37
- private dispatch;
38
- emitterFor(routeKey: string): INavigationEmitter;
39
- private mergedOptionsFor;
40
- componentFor(route: IRoute<unknown>): Type<unknown> | null;
41
- stackHostProps(): Record<string, unknown>;
42
- private planFor;
43
- outerScreenIsModal(route: IRoute<unknown>, index: number): boolean;
44
- isInModal(route: IRoute<unknown>, index: number): boolean;
45
- screenHostProps(route: IRoute<unknown>, index: number): Record<string, unknown>;
46
- innerStackProps(): Record<string, unknown>;
47
- innerScreenProps(route: IRoute<unknown>, index: number): Record<string, unknown>;
48
- contentWrapperProps(route: IRoute<unknown>, index: number): Record<string, unknown>;
49
- headerConfigProps(route: IRoute<unknown>, index: number): Record<string, unknown>;
50
- hasSearchBar(route: IRoute<unknown>): boolean;
51
- searchBarRef(route: IRoute<unknown>): {
52
- current: ISearchBarCommands | null;
53
- } | undefined;
54
- searchBarProps(route: IRoute<unknown>, index: number): Record<string, unknown>;
55
- }