@react-opencv/fiber 0.1.0
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.
- package/dist/components/OpenCVProvider.d.ts +5 -0
- package/dist/fiber/CvCanvas.d.ts +9 -0
- package/dist/fiber/CvNode.d.ts +16 -0
- package/dist/fiber/executePipeline.d.ts +3 -0
- package/dist/fiber/hostConfig.d.ts +54 -0
- package/dist/fiber/reconciler.d.ts +3 -0
- package/dist/fiber/resolveOpName.d.ts +1 -0
- package/dist/fiber/types.d.ts +12 -0
- package/dist/filters/buildArgs.d.ts +6 -0
- package/dist/filters/coerce.d.ts +2 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +826 -0
- package/dist/types.d.ts +32 -0
- package/package.json +42 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactNode, CSSProperties } from "react";
|
|
2
|
+
import type { Mat } from "../types";
|
|
3
|
+
export interface CvCanvasProps {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
style?: CSSProperties;
|
|
6
|
+
className?: string;
|
|
7
|
+
onResult?: (mat: Mat) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const CvCanvas: import("react").ForwardRefExoticComponent<CvCanvasProps & import("react").RefAttributes<HTMLCanvasElement>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CV, Mat } from "../types";
|
|
2
|
+
export declare class CvNode {
|
|
3
|
+
type: string;
|
|
4
|
+
props: Record<string, unknown>;
|
|
5
|
+
parent: CvNode | null;
|
|
6
|
+
children: CvNode[];
|
|
7
|
+
cachedMat: Mat | null;
|
|
8
|
+
_rootNotify: (() => void) | null;
|
|
9
|
+
constructor(type: string, props: Record<string, unknown>);
|
|
10
|
+
appendChild(child: CvNode): void;
|
|
11
|
+
removeChild(child: CvNode): void;
|
|
12
|
+
insertBefore(child: CvNode, before: CvNode): void;
|
|
13
|
+
propagateNotify(notify: (() => void) | null): void;
|
|
14
|
+
dispose(): void;
|
|
15
|
+
loadImage(cv: CV): Promise<Mat>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { CvNode } from "./CvNode";
|
|
2
|
+
type Instance = CvNode;
|
|
3
|
+
type Props = Record<string, unknown>;
|
|
4
|
+
export declare const hostConfig: {
|
|
5
|
+
supportsMutation: boolean;
|
|
6
|
+
supportsPersistence: boolean;
|
|
7
|
+
supportsHydration: boolean;
|
|
8
|
+
isPrimaryRenderer: boolean;
|
|
9
|
+
noTimeout: number;
|
|
10
|
+
createInstance(type: string, props: Props): Instance;
|
|
11
|
+
createTextInstance(): never;
|
|
12
|
+
appendInitialChild(parent: Instance, child: Instance): void;
|
|
13
|
+
appendChild(parent: Instance, child: Instance): void;
|
|
14
|
+
appendChildToContainer(container: CvNode, child: Instance): void;
|
|
15
|
+
removeChild(parent: Instance, child: Instance): void;
|
|
16
|
+
removeChildFromContainer(container: CvNode, child: Instance): void;
|
|
17
|
+
insertBefore(parent: Instance, child: Instance, before: Instance): void;
|
|
18
|
+
insertInContainerBefore(container: CvNode, child: Instance, before: Instance): void;
|
|
19
|
+
commitUpdate(instance: Instance, _type: string, oldProps: Props, newProps: Props): void;
|
|
20
|
+
finalizeInitialChildren(): boolean;
|
|
21
|
+
prepareForCommit(): null;
|
|
22
|
+
resetAfterCommit(container: CvNode): void;
|
|
23
|
+
getPublicInstance(instance: Instance): Instance;
|
|
24
|
+
getRootHostContext(): {};
|
|
25
|
+
getChildHostContext(): {};
|
|
26
|
+
shouldSetTextContent(): boolean;
|
|
27
|
+
clearContainer(container: CvNode): void;
|
|
28
|
+
preparePortalMount: () => void;
|
|
29
|
+
scheduleTimeout: typeof setTimeout;
|
|
30
|
+
cancelTimeout: typeof clearTimeout;
|
|
31
|
+
getCurrentUpdatePriority: () => number;
|
|
32
|
+
setCurrentUpdatePriority: (priority: number) => void;
|
|
33
|
+
resolveUpdatePriority: () => number;
|
|
34
|
+
getInstanceFromNode: () => null;
|
|
35
|
+
prepareScopeUpdate: () => void;
|
|
36
|
+
getInstanceFromScope: () => null;
|
|
37
|
+
detachDeletedInstance: () => void;
|
|
38
|
+
beforeActiveInstanceBlur: () => void;
|
|
39
|
+
afterActiveInstanceBlur: () => void;
|
|
40
|
+
resetFormInstance: () => void;
|
|
41
|
+
requestPostPaintCallback: (cb: (time: number) => void) => void;
|
|
42
|
+
shouldAttemptEagerTransition: () => boolean;
|
|
43
|
+
trackSchedulerEvent: () => void;
|
|
44
|
+
resolveEventType: () => null;
|
|
45
|
+
resolveEventTimeStamp: () => number;
|
|
46
|
+
maySuspendCommit: () => boolean;
|
|
47
|
+
preloadInstance: () => boolean;
|
|
48
|
+
startSuspendingCommit: () => void;
|
|
49
|
+
suspendInstance: () => void;
|
|
50
|
+
waitForCommitToBeReady: () => null;
|
|
51
|
+
NotPendingTransition: null;
|
|
52
|
+
HostTransitionContext: any;
|
|
53
|
+
};
|
|
54
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveOpName(elementName: string): string;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { OpenCVProvider, useOpenCV } from "./components/OpenCVProvider";
|
|
2
|
+
export { CvCanvas } from "./fiber/CvCanvas";
|
|
3
|
+
export type { CvCanvasProps } from "./fiber/CvCanvas";
|
|
4
|
+
export type { CvOpProps } from "./fiber/types";
|
|
5
|
+
import "./fiber/types";
|
|
6
|
+
export type { CV, Mat, OpenCVContextValue, ParamConfig, SignatureParam, SignatureOverload, SignatureEntry, } from "./types";
|