@overmap-ai/forms 1.1.0 → 1.1.2

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.
@@ -1,2 +1,5 @@
1
1
  import { PropsWithChildren } from 'react';
2
- export declare const ScannerProvider: import('react').MemoExoticComponent<(props: PropsWithChildren) => import("react/jsx-runtime").JSX.Element>;
2
+ import { UseZxingOptions } from 'react-zxing';
3
+ export interface ScannerProviderProps extends PropsWithChildren, Pick<UseZxingOptions, "wasmUrl"> {
4
+ }
5
+ export declare const ScannerProvider: import('react').MemoExoticComponent<(props: ScannerProviderProps) => import("react/jsx-runtime").JSX.Element>;
@@ -1,3 +1,8 @@
1
+ import { UseZxingOptions } from 'react-zxing';
1
2
  import { ScannerConfig } from './typings';
2
- export type ScannerContextType = (func: (close: () => void) => ScannerConfig) => void;
3
- export declare const ScannerContext: import('react').Context<ScannerContextType>;
3
+ export type OpenScannerCallback = (func: (close: () => void) => ScannerConfig) => void;
4
+ export interface IScannerContext {
5
+ openScanner: OpenScannerCallback;
6
+ wasmUrl: UseZxingOptions["wasmUrl"];
7
+ }
8
+ export declare const ScannerContext: import('react').Context<IScannerContext>;
@@ -1 +1,2 @@
1
- export declare const useScanner: () => import('./context').ScannerContextType;
1
+ export declare const useScannerContext: () => import('./context').IScannerContext;
2
+ export declare const useScanner: () => import('./context').OpenScannerCallback;
@@ -1,5 +1,5 @@
1
1
  import { UseZxingOptions } from 'react-zxing';
2
- export type ZxingOptions = Omit<UseZxingOptions, "hints">;
2
+ export type ZxingOptions = Omit<UseZxingOptions, "wasmUrl">;
3
3
  export interface ScannerConfig extends ZxingOptions {
4
4
  onClose?: () => void;
5
5
  }