@iternio/react-native-auto-play 0.5.7 → 0.5.8

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 (58) hide show
  1. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAutoPlay.kt +0 -1
  2. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/VirtualRenderer.kt +29 -116
  3. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/VoiceInputManager.kt +17 -1
  4. package/ios/templates/MapTemplate.swift +14 -1
  5. package/lib/index.d.ts +1 -2
  6. package/lib/index.js +1 -2
  7. package/lib/scenes/AutoPlayCluster.js +1 -6
  8. package/lib/templates/MapTemplate.js +1 -6
  9. package/lib/types/RootComponent.d.ts +0 -4
  10. package/nitro.json +0 -6
  11. package/nitrogen/generated/android/ReactNativeAutoPlay+autolinking.cmake +0 -2
  12. package/nitrogen/generated/android/ReactNativeAutoPlayOnLoad.cpp +0 -18
  13. package/package.json +1 -1
  14. package/src/index.ts +1 -2
  15. package/src/scenes/AutoPlayCluster.ts +1 -6
  16. package/src/templates/MapTemplate.ts +1 -6
  17. package/src/types/RootComponent.ts +0 -4
  18. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAndroidWindowInformation.kt +0 -49
  19. package/lib/HybridAutoPlay.d.ts +0 -2
  20. package/lib/HybridAutoPlay.js +0 -2
  21. package/lib/components/OnAppearedChildRenderer.d.ts +0 -10
  22. package/lib/components/OnAppearedChildRenderer.js +0 -26
  23. package/lib/components/WindowInformationWrapper.d.ts +0 -15
  24. package/lib/components/WindowInformationWrapper.js +0 -17
  25. package/lib/hooks/useIsAutoPlayFocused.d.ts +0 -7
  26. package/lib/hooks/useIsAutoPlayFocused.js +0 -20
  27. package/lib/hybrid/HybridAndroidWindowInformation.android.d.ts +0 -2
  28. package/lib/hybrid/HybridAndroidWindowInformation.android.js +0 -2
  29. package/lib/hybrid/HybridAndroidWindowInformation.d.ts +0 -2
  30. package/lib/hybrid/HybridAndroidWindowInformation.js +0 -1
  31. package/lib/hybrid.d.ts +0 -2
  32. package/lib/hybrid.js +0 -2
  33. package/lib/specs/AndroidWindowInformation.nitro.d.ts +0 -22
  34. package/lib/specs/AndroidWindowInformation.nitro.js +0 -1
  35. package/lib/specs/AutomotivePermissionRequestTemplate.d.ts +0 -11
  36. package/lib/specs/AutomotivePermissionRequestTemplate.js +0 -1
  37. package/lib/specs/AutomotivePermissionRequestTemplate.nitro.d.ts +0 -11
  38. package/lib/specs/AutomotivePermissionRequestTemplate.nitro.js +0 -1
  39. package/lib/templates/AutomotivePermissionRequestTemplate.d.ts +0 -23
  40. package/lib/templates/AutomotivePermissionRequestTemplate.js +0 -18
  41. package/lib/types/Glyphmap.d.ts +0 -4105
  42. package/lib/types/Glyphmap.js +0 -4105
  43. package/lib/utils/NitroOptionsPanel.d.ts +0 -67
  44. package/lib/utils/NitroOptionsPanel.js +0 -48
  45. package/nitrogen/generated/android/c++/JFunc_void_WindowInformation.hpp +0 -77
  46. package/nitrogen/generated/android/c++/JHybridAndroidWindowInformationSpec.cpp +0 -68
  47. package/nitrogen/generated/android/c++/JHybridAndroidWindowInformationSpec.hpp +0 -63
  48. package/nitrogen/generated/android/c++/JWindowInformation.hpp +0 -65
  49. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_WindowInformation.kt +0 -80
  50. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAndroidWindowInformationSpec.kt +0 -59
  51. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/WindowInformation.kt +0 -61
  52. package/nitrogen/generated/shared/c++/HybridAndroidWindowInformationSpec.cpp +0 -21
  53. package/nitrogen/generated/shared/c++/HybridAndroidWindowInformationSpec.hpp +0 -65
  54. package/nitrogen/generated/shared/c++/WindowInformation.hpp +0 -91
  55. package/src/components/WindowInformationWrapper.tsx +0 -30
  56. package/src/hybrid/HybridAndroidWindowInformation.android.ts +0 -5
  57. package/src/hybrid/HybridAndroidWindowInformation.ts +0 -3
  58. package/src/specs/AndroidWindowInformation.nitro.ts +0 -24
@@ -1,17 +0,0 @@
1
- import { createElement, useEffect, useState } from 'react';
2
- import { HybridAndroidWindowInformation } from '../hybrid/HybridAndroidWindowInformation';
3
- /**
4
- * Renders a user-provided root component and keeps its `window` prop up to date when the host
5
- * recreates the render surface with new dimensions (some head units run Android Auto windowed
6
- * and resize it at runtime), so consumers can simply read `props.window` without registering a
7
- * listener themselves.
8
- * On iOS this only passes the initial props through — CarPlay windows keep their size for the
9
- * lifetime of a scene, so there is nothing to subscribe to.
10
- */
11
- export function WindowInformationWrapper({ moduleName, component, componentProps, }) {
12
- const [window, setWindow] = useState(componentProps.window);
13
- useEffect(() => {
14
- return HybridAndroidWindowInformation?.addWindowInformationListener(moduleName, setWindow);
15
- }, [moduleName]);
16
- return createElement(component, { ...componentProps, window });
17
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * A hook to determine if the CarPlay/Android Auto screen is currently focused (visible).
3
- *
4
- * @param moduleName The name of the module to listen to.
5
- * @returns `true` if the screen is focused, `false` otherwise.
6
- */
7
- export declare function useIsAutoPlayFocused(moduleName: string): boolean;
@@ -1,20 +0,0 @@
1
- import { useEffect, useState } from 'react';
2
- import { HybridAutoPlay } from '..';
3
- /**
4
- * A hook to determine if the CarPlay/Android Auto screen is currently focused (visible).
5
- *
6
- * @param moduleName The name of the module to listen to.
7
- * @returns `true` if the screen is focused, `false` otherwise.
8
- */
9
- export function useIsAutoPlayFocused(moduleName) {
10
- const [isFocused, setIsFocused] = useState(false);
11
- useEffect(() => {
12
- const remove = HybridAutoPlay.addListenerRenderState(moduleName, (state) => {
13
- setIsFocused(state === 'didAppear');
14
- });
15
- return () => {
16
- remove();
17
- };
18
- }, [moduleName]);
19
- return isFocused;
20
- }
@@ -1,2 +0,0 @@
1
- import type { AndroidWindowInformation } from '../specs/AndroidWindowInformation.nitro';
2
- export declare const HybridAndroidWindowInformation: AndroidWindowInformation | null;
@@ -1,2 +0,0 @@
1
- import { NitroModules } from 'react-native-nitro-modules';
2
- export const HybridAndroidWindowInformation = NitroModules.createHybridObject('AndroidWindowInformation');
@@ -1,2 +0,0 @@
1
- import type { AndroidWindowInformation } from '../specs/AndroidWindowInformation.nitro';
2
- export declare const HybridAndroidWindowInformation: AndroidWindowInformation | null;
@@ -1 +0,0 @@
1
- export const HybridAndroidWindowInformation = null;
package/lib/hybrid.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import type { AutoPlay as NitroAutoPlay } from './specs/AutoPlay.nitro';
2
- export declare const HybridAutoPlay: NitroAutoPlay;
package/lib/hybrid.js DELETED
@@ -1,2 +0,0 @@
1
- import { NitroModules } from 'react-native-nitro-modules';
2
- export const HybridAutoPlay = NitroModules.createHybridObject('AutoPlay');
@@ -1,22 +0,0 @@
1
- import type { HybridObject } from 'react-native-nitro-modules';
2
- import type { CleanupCallback } from '../types/Event';
3
- import type { WindowInformation } from '../types/RootComponent';
4
- /**
5
- * Android-only access to render-surface window dimensions. On iOS this module does not exist —
6
- * use the platform-split `HybridAndroidWindowInformation` wrapper which resolves to `null` there.
7
- */
8
- export interface AndroidWindowInformation extends HybridObject<{
9
- android: 'kotlin';
10
- }> {
11
- /**
12
- * callback for window dimension changes, fired when the host recreates the render surface
13
- * with a different size (some head units run Android Auto windowed and resize it at runtime).
14
- * Root components rendered via a template's `component` prop do NOT need this — their
15
- * `window` prop is kept up to date automatically. Use this listener only for
16
- * size-dependent logic living outside a root component.
17
- * Fires with the last known window information immediately if the surface is already initialized.
18
- * @param moduleName one of @AutoPlayModules or a cluster scene uuid
19
- * @namespace Android
20
- */
21
- addWindowInformationListener(moduleName: string, callback: (window: WindowInformation) => void): CleanupCallback;
22
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,11 +0,0 @@
1
- import type { HybridObject } from 'react-native-nitro-modules';
2
- import type { NitroAutomotivePermissionRequestTemplateConfig } from '../templates/AutomotivePermissionRequestTemplate';
3
- import type { NitroTemplateConfig } from './AutoPlay.nitro';
4
- interface AutomotivePermissionRequestTemplateConfig extends NitroTemplateConfig, NitroAutomotivePermissionRequestTemplateConfig {
5
- }
6
- export interface AutomotivePermissionRequestTemplate extends HybridObject<{
7
- android: 'kotlin';
8
- }> {
9
- createAutomotivePermissionRequestTemplate(config: AutomotivePermissionRequestTemplateConfig): void;
10
- }
11
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,11 +0,0 @@
1
- import type { HybridObject } from 'react-native-nitro-modules';
2
- import type { NitroAutomotivePermissionRequestTemplateConfig } from '../templates/AutomotivePermissionRequestTemplate';
3
- import type { NitroTemplateConfig } from './AutoPlay.nitro';
4
- interface AutomotivePermissionRequestTemplateConfig extends NitroTemplateConfig, NitroAutomotivePermissionRequestTemplateConfig {
5
- }
6
- export interface AutomotivePermissionRequestTemplate extends HybridObject<{
7
- android: 'kotlin';
8
- }> {
9
- createAutomotivePermissionRequestTemplate(config: AutomotivePermissionRequestTemplateConfig): void;
10
- }
11
- export {};
@@ -1,23 +0,0 @@
1
- import type { CustomActionButtonAndroid } from '../types/Button';
2
- import type { AutoText } from '../types/Text';
3
- import { type NitroAction } from '../utils/NitroAction';
4
- import { type HeaderActions, Template, type TemplateConfig } from './Template';
5
- export interface NitroAutomotivePermissionRequestTemplateConfig extends TemplateConfig {
6
- headerActions?: Array<NitroAction>;
7
- title: AutoText;
8
- actions: Array<NitroAction>;
9
- }
10
- export type AutomotivePermissionRequestTemplateConfig = Omit<NitroAutomotivePermissionRequestTemplateConfig, 'headerActions' | 'buttons'> & {
11
- /**
12
- * action buttons, usually at the the top right on Android and a top bar on iOS
13
- */
14
- headerActions?: HeaderActions<AutomotivePermissionRequestTemplate>;
15
- actions: [CustomActionButtonAndroid<AutomotivePermissionRequestTemplate>] | [
16
- CustomActionButtonAndroid<AutomotivePermissionRequestTemplate>,
17
- CustomActionButtonAndroid<AutomotivePermissionRequestTemplate>
18
- ];
19
- };
20
- export declare class AutomotivePermissionRequestTemplate extends Template<AutomotivePermissionRequestTemplateConfig, HeaderActions<AutomotivePermissionRequestTemplate>> {
21
- private template;
22
- constructor(config: AutomotivePermissionRequestTemplateConfig);
23
- }
@@ -1,18 +0,0 @@
1
- import { NitroModules } from 'react-native-nitro-modules';
2
- import { NitroActionUtil } from '../utils/NitroAction';
3
- import { Template, } from './Template';
4
- const HybridAutomotivePermissionRequestTemplate = NitroModules.createHybridObject('AutomotivePermissionRequestTemplate');
5
- export class AutomotivePermissionRequestTemplate extends Template {
6
- template = this;
7
- constructor(config) {
8
- super(config);
9
- const { headerActions, actions, ...rest } = config;
10
- const nitroConfig = {
11
- ...rest,
12
- id: this.id,
13
- headerActions: NitroActionUtil.convert(this.template, headerActions),
14
- actions: NitroActionUtil.convert(this.template, actions),
15
- };
16
- HybridAutomotivePermissionRequestTemplate.createAutomotivePermissionRequestTemplate(nitroConfig);
17
- }
18
- }