@overmap-ai/forms 1.0.35-gcs.2 → 1.0.35-gcs.4

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,7 +1,8 @@
1
- import { ComponentProps, PropsWithoutRef, ReactNode } from 'react';
2
- export interface FileCardProps extends Omit<PropsWithoutRef<ComponentProps<"div">>, "children"> {
1
+ import { Card } from '@overmap-ai/blocks';
2
+ import { ComponentProps, ReactNode } from 'react';
3
+ export interface FileCardProps extends Omit<ComponentProps<typeof Card>, "children"> {
3
4
  file: File | null;
4
5
  error?: string;
5
6
  rightSlot?: ReactNode;
6
7
  }
7
- export declare const FileCard: import('react').NamedExoticComponent<FileCardProps & import('react').RefAttributes<HTMLDivElement>>;
8
+ export declare const FileCard: import('react').NamedExoticComponent<FileCardProps>;
@@ -1,7 +1,8 @@
1
- import { ComponentProps, PropsWithoutRef, ReactNode } from 'react';
2
- export interface ImageCardProps extends Omit<PropsWithoutRef<ComponentProps<"div">>, "children"> {
1
+ import { Card } from '@overmap-ai/blocks';
2
+ import { ComponentProps, ReactNode } from 'react';
3
+ export interface ImageCardProps extends Omit<ComponentProps<typeof Card>, "children"> {
3
4
  file: File | null;
4
5
  error?: string;
5
6
  rightSlot?: ReactNode;
6
7
  }
7
- export declare const ImageCard: import('react').NamedExoticComponent<ImageCardProps & import('react').RefAttributes<HTMLDivElement>>;
8
+ export declare const ImageCard: import('react').NamedExoticComponent<ImageCardProps>;
@@ -1,2 +1 @@
1
1
  export * from './ImageFile';
2
- export * from './hooks';
@@ -1,2 +1,5 @@
1
+ import { UseZxingOptions } from 'react-zxing';
1
2
  import { PropsWithChildren } from 'react';
2
- export declare const ScannerProvider: import('react').MemoExoticComponent<(props: PropsWithChildren) => import("react/jsx-runtime").JSX.Element>;
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
  }
@@ -0,0 +1,8 @@
1
+ import { Card } from '@overmap-ai/blocks';
2
+ import { ComponentProps, ReactNode } from 'react';
3
+ export interface VideoCardProps extends Omit<ComponentProps<typeof Card>, "children"> {
4
+ file: File | null;
5
+ error?: string;
6
+ rightSlot?: ReactNode;
7
+ }
8
+ export declare const VideoCard: import('react').NamedExoticComponent<VideoCardProps>;
@@ -0,0 +1 @@
1
+ export * from './VideoCard';
@@ -0,0 +1,5 @@
1
+ import { ComponentPropsWithRef } from 'react';
2
+ export interface VideoFileProps extends Omit<ComponentPropsWithRef<"video">, "src"> {
3
+ file: File;
4
+ }
5
+ export declare const VideoFile: import('react').NamedExoticComponent<VideoFileProps>;
@@ -0,0 +1 @@
1
+ export * from './VideoFile';
@@ -1,9 +1,11 @@
1
+ import { FieldsRendererSize } from '../renderer';
1
2
  import { UUIDFile } from '../UUIDFile';
2
3
  import { UUIDPromise } from '../UUIDPromise';
3
4
  interface DisplayFileProps {
4
5
  file: UUIDFile | UUIDPromise<UUIDFile>;
5
6
  disabled?: boolean;
6
7
  onRemove: () => void;
8
+ size: FieldsRendererSize;
7
9
  }
8
10
  export declare const DisplayFile: import('react').MemoExoticComponent<(props: DisplayFileProps) => import("react/jsx-runtime").JSX.Element>;
9
11
  export {};
@@ -1,7 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { AnyField, AnyFormElement, ValueOfField } from './typings';
3
3
  import { FieldRenderProps } from './BaseFormElement';
4
- export declare const useFieldInput: <TField extends AnyFormElement>(field: TField, props: FieldRenderProps) => ReactNode;
5
4
  export declare const useFieldInputs: (fields: AnyFormElement[], props: Omit<FieldRenderProps, "index">) => ReactNode;
6
5
  export declare const useFormikInput: <TField extends AnyField>(props: FieldRenderProps & {
7
6
  field: TField;