@tomorrowevening/theatre-r3f 1.0.1

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 (73) hide show
  1. package/LICENSE +203 -0
  2. package/README.md +104 -0
  3. package/dist/drei/OrthographicCamera.d.ts +17 -0
  4. package/dist/drei/OrthographicCamera.d.ts.map +1 -0
  5. package/dist/drei/PerspectiveCamera.d.ts +17 -0
  6. package/dist/drei/PerspectiveCamera.d.ts.map +1 -0
  7. package/dist/drei/index.d.ts +3 -0
  8. package/dist/drei/index.d.ts.map +1 -0
  9. package/dist/extension/InfiniteGridHelper/index.d.ts +12 -0
  10. package/dist/extension/InfiniteGridHelper/index.d.ts.map +1 -0
  11. package/dist/extension/components/DragDetector.d.ts +8 -0
  12. package/dist/extension/components/DragDetector.d.ts.map +1 -0
  13. package/dist/extension/components/EditableProxy.d.ts +9 -0
  14. package/dist/extension/components/EditableProxy.d.ts.map +1 -0
  15. package/dist/extension/components/OrbitControls/OrbitControlsImpl.d.ts +65 -0
  16. package/dist/extension/components/OrbitControls/OrbitControlsImpl.d.ts.map +1 -0
  17. package/dist/extension/components/OrbitControls/index.d.ts +24 -0
  18. package/dist/extension/components/OrbitControls/index.d.ts.map +1 -0
  19. package/dist/extension/components/ProxyManager.d.ts +9 -0
  20. package/dist/extension/components/ProxyManager.d.ts.map +1 -0
  21. package/dist/extension/components/ReferenceWindow/ReferenceWindow.d.ts +10 -0
  22. package/dist/extension/components/ReferenceWindow/ReferenceWindow.d.ts.map +1 -0
  23. package/dist/extension/components/ReferenceWindow/noiseImage.d.ts +3 -0
  24. package/dist/extension/components/ReferenceWindow/noiseImage.d.ts.map +1 -0
  25. package/dist/extension/components/SnapshotEditor.d.ts +6 -0
  26. package/dist/extension/components/SnapshotEditor.d.ts.map +1 -0
  27. package/dist/extension/components/TransformControls.d.ts +19 -0
  28. package/dist/extension/components/TransformControls.d.ts.map +1 -0
  29. package/dist/extension/components/useRefAndState.d.ts +18 -0
  30. package/dist/extension/components/useRefAndState.d.ts.map +1 -0
  31. package/dist/extension/components/useSelected.d.ts +3 -0
  32. package/dist/extension/components/useSelected.d.ts.map +1 -0
  33. package/dist/extension/components/useSnapshotEditorCamera.d.ts +9 -0
  34. package/dist/extension/components/useSnapshotEditorCamera.d.ts.map +1 -0
  35. package/dist/extension/editorStuff.d.ts +19 -0
  36. package/dist/extension/editorStuff.d.ts.map +1 -0
  37. package/dist/extension/icons.d.ts +13 -0
  38. package/dist/extension/icons.d.ts.map +1 -0
  39. package/dist/extension/index.d.ts +4 -0
  40. package/dist/extension/index.d.ts.map +1 -0
  41. package/dist/extension/index.esm.js +22176 -0
  42. package/dist/extension/index.esm.js.map +7 -0
  43. package/dist/extension/index.js +22142 -0
  44. package/dist/extension/index.js.map +7 -0
  45. package/dist/extension/useExtensionStore.d.ts +3 -0
  46. package/dist/extension/useExtensionStore.d.ts.map +1 -0
  47. package/dist/index.d.ts +8 -0
  48. package/dist/index.d.ts.map +1 -0
  49. package/dist/index.esm.js +780 -0
  50. package/dist/index.esm.js.map +7 -0
  51. package/dist/index.js +778 -0
  52. package/dist/index.js.map +7 -0
  53. package/dist/main/RafDriverProvider.d.ts +10 -0
  54. package/dist/main/RafDriverProvider.d.ts.map +1 -0
  55. package/dist/main/RefreshSnapshot.d.ts +19 -0
  56. package/dist/main/RefreshSnapshot.d.ts.map +1 -0
  57. package/dist/main/SheetProvider.d.ts +10 -0
  58. package/dist/main/SheetProvider.d.ts.map +1 -0
  59. package/dist/main/defaultEditableFactoryConfig.d.ts +579 -0
  60. package/dist/main/defaultEditableFactoryConfig.d.ts.map +1 -0
  61. package/dist/main/editable.d.ts +124 -0
  62. package/dist/main/editable.d.ts.map +1 -0
  63. package/dist/main/editableFactoryConfigUtils.d.ts +58 -0
  64. package/dist/main/editableFactoryConfigUtils.d.ts.map +1 -0
  65. package/dist/main/store.d.ts +46 -0
  66. package/dist/main/store.d.ts.map +1 -0
  67. package/dist/main/useInvalidate.d.ts +2 -0
  68. package/dist/main/useInvalidate.d.ts.map +1 -0
  69. package/dist/main/utils.d.ts +4 -0
  70. package/dist/main/utils.d.ts.map +1 -0
  71. package/dist/types.d.ts +3 -0
  72. package/dist/types.d.ts.map +1 -0
  73. package/package.json +87 -0
@@ -0,0 +1,124 @@
1
+ import type { ComponentProps, ComponentType, Ref, RefAttributes } from 'react';
2
+ import React from 'react';
3
+ import type { $FixMe } from '../types';
4
+ declare const editable: (<T extends ComponentType<any> | keyof JSX.IntrinsicElements, U extends "line" | "mesh" | "lineSegments" | "lineLoop" | "points" | "group" | "perspectiveCamera" | "orthographicCamera" | "spotLight" | "pointLight" | "hemisphereLight" | "directionalLight" | "ambientLight" | "fog">(Component: T, type: T extends "primitive" ? null : U) => React.ForwardRefExoticComponent<React.PropsWithoutRef<Omit<ComponentProps<T>, "visible"> & {
5
+ theatreKey: string;
6
+ visible?: boolean | "editor" | undefined;
7
+ additionalProps?: $FixMe;
8
+ objRef?: $FixMe;
9
+ } & (T extends "primitive" ? {
10
+ editableType: U;
11
+ } : {}) & RefAttributes<JSX.IntrinsicElements[U]>> & RefAttributes<unknown>>) & {
12
+ line: React.ForwardRefExoticComponent<Omit<React.SVGLineElementAttributes<SVGLineElement>, "visible"> & {
13
+ theatreKey: string;
14
+ visible?: boolean | "editor" | undefined;
15
+ additionalProps?: $FixMe;
16
+ objRef?: $FixMe;
17
+ ref?: Ref<unknown> | undefined;
18
+ }>;
19
+ mesh: React.ForwardRefExoticComponent<Omit<import("@react-three/fiber").MeshProps, "visible"> & {
20
+ theatreKey: string;
21
+ visible?: boolean | "editor" | undefined;
22
+ additionalProps?: $FixMe;
23
+ objRef?: $FixMe;
24
+ ref?: Ref<unknown> | undefined;
25
+ }>;
26
+ lineSegments: React.ForwardRefExoticComponent<Omit<import("@react-three/fiber").LineSegmentsProps, "visible"> & {
27
+ theatreKey: string;
28
+ visible?: boolean | "editor" | undefined;
29
+ additionalProps?: $FixMe;
30
+ objRef?: $FixMe;
31
+ ref?: Ref<unknown> | undefined;
32
+ }>;
33
+ lineLoop: React.ForwardRefExoticComponent<Omit<import("@react-three/fiber").LineLoopProps, "visible"> & {
34
+ theatreKey: string;
35
+ visible?: boolean | "editor" | undefined;
36
+ additionalProps?: $FixMe;
37
+ objRef?: $FixMe;
38
+ ref?: Ref<unknown> | undefined;
39
+ }>;
40
+ points: React.ForwardRefExoticComponent<Omit<import("@react-three/fiber").PointsProps, "visible"> & {
41
+ theatreKey: string;
42
+ visible?: boolean | "editor" | undefined;
43
+ additionalProps?: $FixMe;
44
+ objRef?: $FixMe;
45
+ ref?: Ref<unknown> | undefined;
46
+ }>;
47
+ group: React.ForwardRefExoticComponent<Omit<import("@react-three/fiber").GroupProps, "visible"> & {
48
+ theatreKey: string;
49
+ visible?: boolean | "editor" | undefined;
50
+ additionalProps?: $FixMe;
51
+ objRef?: $FixMe;
52
+ ref?: Ref<unknown> | undefined;
53
+ }>;
54
+ perspectiveCamera: React.ForwardRefExoticComponent<Omit<import("@react-three/fiber").PerspectiveCameraProps, "visible"> & {
55
+ theatreKey: string;
56
+ visible?: boolean | "editor" | undefined;
57
+ additionalProps?: $FixMe;
58
+ objRef?: $FixMe;
59
+ ref?: Ref<unknown> | undefined;
60
+ }>;
61
+ orthographicCamera: React.ForwardRefExoticComponent<Omit<import("@react-three/fiber").OrthographicCameraProps, "visible"> & {
62
+ theatreKey: string;
63
+ visible?: boolean | "editor" | undefined;
64
+ additionalProps?: $FixMe;
65
+ objRef?: $FixMe;
66
+ ref?: Ref<unknown> | undefined;
67
+ }>;
68
+ spotLight: React.ForwardRefExoticComponent<Omit<import("@react-three/fiber").SpotLightProps, "visible"> & {
69
+ theatreKey: string;
70
+ visible?: boolean | "editor" | undefined;
71
+ additionalProps?: $FixMe;
72
+ objRef?: $FixMe;
73
+ ref?: Ref<unknown> | undefined;
74
+ }>;
75
+ pointLight: React.ForwardRefExoticComponent<Omit<import("@react-three/fiber").PointLightProps, "visible"> & {
76
+ theatreKey: string;
77
+ visible?: boolean | "editor" | undefined;
78
+ additionalProps?: $FixMe;
79
+ objRef?: $FixMe;
80
+ ref?: Ref<unknown> | undefined;
81
+ }>;
82
+ hemisphereLight: React.ForwardRefExoticComponent<Omit<import("@react-three/fiber").HemisphereLightProps, "visible"> & {
83
+ theatreKey: string;
84
+ visible?: boolean | "editor" | undefined;
85
+ additionalProps?: $FixMe;
86
+ objRef?: $FixMe;
87
+ ref?: Ref<unknown> | undefined;
88
+ }>;
89
+ directionalLight: React.ForwardRefExoticComponent<Omit<import("@react-three/fiber").DirectionalLightProps, "visible"> & {
90
+ theatreKey: string;
91
+ visible?: boolean | "editor" | undefined;
92
+ additionalProps?: $FixMe;
93
+ objRef?: $FixMe;
94
+ ref?: Ref<unknown> | undefined;
95
+ }>;
96
+ ambientLight: React.ForwardRefExoticComponent<Omit<import("@react-three/fiber").AmbientLightProps, "visible"> & {
97
+ theatreKey: string;
98
+ visible?: boolean | "editor" | undefined;
99
+ additionalProps?: $FixMe;
100
+ objRef?: $FixMe;
101
+ ref?: Ref<unknown> | undefined;
102
+ }>;
103
+ fog: React.ForwardRefExoticComponent<Omit<import("@react-three/fiber").ExtendedColors<import("@react-three/fiber").Overwrite<Partial<import("three").Fog>, import("@react-three/fiber").NodeProps<import("three").Fog, typeof import("three").Fog>>>, "visible"> & {
104
+ theatreKey: string;
105
+ visible?: boolean | "editor" | undefined;
106
+ additionalProps?: $FixMe;
107
+ objRef?: $FixMe;
108
+ ref?: Ref<unknown> | undefined;
109
+ }>;
110
+ } & {
111
+ primitive: React.ForwardRefExoticComponent<{
112
+ object: any;
113
+ theatreKey: string;
114
+ visible?: boolean | "editor" | undefined;
115
+ additionalProps?: $FixMe;
116
+ objRef?: $FixMe;
117
+ editableType: keyof JSX.IntrinsicElements;
118
+ ref?: Ref<unknown> | undefined;
119
+ } & {
120
+ [props: string]: any;
121
+ }>;
122
+ };
123
+ export default editable;
124
+ //# sourceMappingURL=editable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editable.d.ts","sourceRoot":"","sources":["../../src/main/editable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAE,aAAa,EAAE,GAAG,EAAE,aAAa,EAAC,MAAM,OAAO,CAAA;AAE5E,OAAO,KAAuD,MAAM,OAAO,CAAA;AAQ3E,OAAO,KAAK,EAAC,MAAM,EAAkB,MAAM,UAAU,CAAA;AAoRrD,QAAA,MAAM,QAAQ;gBApQI,MAAM;;sBAEA,MAAM;aACf,MAAM;;;;;oBAmOD,MAAM;;0BAEA,MAAM;iBACf,MAAM;;;;oBAHH,MAAM;;0BAEA,MAAM;iBACf,MAAM;;;;oBAHH,MAAM;;0BAEA,MAAM;iBACf,MAAM;;;;oBAHH,MAAM;;0BAEA,MAAM;iBACf,MAAM;;;;oBAHH,MAAM;;0BAEA,MAAM;iBACf,MAAM;;;;oBAHH,MAAM;;0BAEA,MAAM;iBACf,MAAM;;;;oBAHH,MAAM;;0BAEA,MAAM;iBACf,MAAM;;;;oBAHH,MAAM;;0BAEA,MAAM;iBACf,MAAM;;;;oBAHH,MAAM;;0BAEA,MAAM;iBACf,MAAM;;;;oBAHH,MAAM;;0BAEA,MAAM;iBACf,MAAM;;;;oBAHH,MAAM;;0BAEA,MAAM;iBACf,MAAM;;;;oBAHH,MAAM;;0BAEA,MAAM;iBACf,MAAM;;;;oBAHH,MAAM;;0BAEA,MAAM;iBACf,MAAM;;;;oBAHH,MAAM;;0BAEA,MAAM;iBACf,MAAM;;;;;gBAQP,GAAG;oBACC,MAAM;;0BAEA,MAAM;iBACf,MAAM;sBACD,MAAM,IAAI,iBAAiB;;;;;CAgBhD,CAAA;AAED,eAAe,QAAQ,CAAA"}
@@ -0,0 +1,58 @@
1
+ import type { UnknownShorthandCompoundProps } from '@theatre/core';
2
+ import type { Object3D } from 'three';
3
+ import type { IconID } from '../extension/icons';
4
+ import { Color } from 'three';
5
+ export type Helper = Object3D & {
6
+ update?: () => void;
7
+ };
8
+ type PropConfig<T> = {
9
+ parse: (props: Record<string, any>) => T;
10
+ apply: (value: T, object: any) => void;
11
+ type: UnknownShorthandCompoundProps;
12
+ };
13
+ type Props = Record<string, PropConfig<any>>;
14
+ type Meta<T> = {
15
+ useTransformControls: boolean;
16
+ updateObject?: (object: T) => void;
17
+ icon: IconID;
18
+ dimensionless?: boolean;
19
+ createHelper?: (object: T) => Helper;
20
+ };
21
+ export type ObjectConfig<T> = {
22
+ props: Props;
23
+ } & Meta<T>;
24
+ export type EditableFactoryConfig = Partial<Record<keyof JSX.IntrinsicElements, ObjectConfig<any>>>;
25
+ type Vector3 = {
26
+ x: number;
27
+ y: number;
28
+ z: number;
29
+ };
30
+ export declare const createVector: (components?: [number, number, number]) => {
31
+ x: number;
32
+ y: number;
33
+ z: number;
34
+ };
35
+ export declare const createVectorPropConfig: (key: string, defaultValue?: {
36
+ x: number;
37
+ y: number;
38
+ z: number;
39
+ }, { nudgeMultiplier }?: {
40
+ nudgeMultiplier?: number | undefined;
41
+ }) => PropConfig<Vector3>;
42
+ export declare const createNumberPropConfig: (key: string, defaultValue?: number, { nudgeMultiplier }?: {
43
+ nudgeMultiplier?: number | undefined;
44
+ }) => PropConfig<number>;
45
+ export type Rgba = {
46
+ r: number;
47
+ g: number;
48
+ b: number;
49
+ a: number;
50
+ };
51
+ export declare const createColorPropConfig: (key: string, defaultValue?: Color) => PropConfig<Rgba>;
52
+ export declare const extendObjectProps: <T extends {
53
+ props: {};
54
+ }>(objectConfig: T, extension: Props) => T & {
55
+ props: {};
56
+ };
57
+ export {};
58
+ //# sourceMappingURL=editableFactoryConfigUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editableFactoryConfigUtils.d.ts","sourceRoot":"","sources":["../../src/main/editableFactoryConfigUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,6BAA6B,EAAC,MAAM,eAAe,CAAA;AAGhE,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAA;AACn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E,MAAM,EAAE,MAAM,CAAC;;;;CAQjE,CAAA;AAED,eAAO,MAAM,sBAAsB,QAC5B,MAAM;;;;;;MAGV,WAAW,OAAO,CAsDnB,CAAA;AAEF,eAAO,MAAM,sBAAsB,QAC5B,MAAM,iBACG,MAAM;;MAEnB,WAAW,MAAM,CAUlB,CAAA;AAEF,MAAM,MAAM,IAAI,GAAG;IACjB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV,CAAA;AAED,eAAO,MAAM,qBAAqB,QAC3B,MAAM,2BAEV,WAAW,IAAI,CAUhB,CAAA;AAEF,eAAO,MAAM,iBAAiB;WAAsB,EAAE;+BAEzC,KAAK;;CAIhB,CAAA"}
@@ -0,0 +1,46 @@
1
+ import type { Object3D, Scene, WebGLRenderer } from 'three';
2
+ import { Group } from 'three';
3
+ import type { ISheetObject } from '@theatre/core';
4
+ import type { ObjectConfig } from './editableFactoryConfigUtils';
5
+ export type TransformControlsMode = 'translate' | 'rotate' | 'scale';
6
+ export type TransformControlsSpace = 'world' | 'local';
7
+ export type ViewportShading = 'wireframe' | 'flat' | 'solid' | 'rendered';
8
+ export type BaseSheetObjectType = ISheetObject<any>;
9
+ export declare const allRegisteredObjects: WeakSet<BaseSheetObjectType>;
10
+ export interface Editable<T> {
11
+ type: string;
12
+ sheetObject: ISheetObject<any>;
13
+ objectConfig: ObjectConfig<T>;
14
+ visibleOnlyInEditor: boolean;
15
+ }
16
+ export type EditableSnapshot<T extends Editable<any> = Editable<any>> = {
17
+ proxyObject?: Object3D | null;
18
+ } & T;
19
+ export interface SerializedEditable {
20
+ type: string;
21
+ }
22
+ export interface EditableState {
23
+ editables: Record<string, SerializedEditable>;
24
+ }
25
+ export type EditorStore = {
26
+ scene: Scene | null;
27
+ gl: WebGLRenderer | null;
28
+ helpersRoot: Group;
29
+ editables: Record<string, Editable<any>>;
30
+ canvasName: string;
31
+ sceneSnapshot: Scene | null;
32
+ editablesSnapshot: Record<string, EditableSnapshot> | null;
33
+ init: (scene: Scene, gl: WebGLRenderer) => void;
34
+ addEditable: (theatreKey: string, editable: Editable<any>) => void;
35
+ removeEditable: (theatreKey: string) => void;
36
+ createSnapshot: () => void;
37
+ setSnapshotProxyObject: (proxyObject: Object3D | null, theatreKey: string) => void;
38
+ };
39
+ export declare const editorStore: import("zustand").StoreApi<EditorStore>;
40
+ export type BindFunction = (options: {
41
+ allowImplicitInstancing?: boolean;
42
+ gl: WebGLRenderer;
43
+ scene: Scene;
44
+ }) => void;
45
+ export declare const bindToCanvas: BindFunction;
46
+ //# sourceMappingURL=store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/main/store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAC,MAAM,OAAO,CAAA;AACzD,OAAO,EAAC,KAAK,EAAC,MAAM,OAAO,CAAA;AAC3B,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,eAAe,CAAA;AAC/C,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,8BAA8B,CAAA;AAE9D,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAA;AACpE,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,OAAO,CAAA;AACtD,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CAAA;AAEzE,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,GAAG,CAAC,CAAA;AAEnD,eAAO,MAAM,oBAAoB,8BAAqC,CAAA;AAEtE,MAAM,WAAW,QAAQ,CAAC,CAAC;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,YAAY,CAAC,GAAG,CAAC,CAAA;IAC9B,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,CA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AO,EAAE;IACnC,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,EAAE,EAAE,aAAa,CAAA;IACjB,KAAK,EAAE,KAAK,CAAA;CACb,KAAK,IAAI,CAAA;AAEV,eAAO,MAAM,YAAY,EAAE,YAG1B,CAAA"}
@@ -0,0 +1,2 @@
1
+ export default function useInvalidate(): (frames?: number | undefined) => void;
2
+ //# sourceMappingURL=useInvalidate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInvalidate.d.ts","sourceRoot":"","sources":["../../src/main/useInvalidate.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,aAAa,0CAEpC"}
@@ -0,0 +1,4 @@
1
+ import type { ISheetObject } from '@theatre/core';
2
+ export declare const refreshSnapshot: () => void;
3
+ export declare const makeStoreKey: (sheetObjectAddress: ISheetObject['address']) => string;
4
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/main/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,eAAe,CAAA;AAE/C,eAAO,MAAM,eAAe,YAAwC,CAAA;AAEpE,eAAO,MAAM,YAAY,uBAAwB,YAAY,CAAC,SAAS,CAAC,WAC+B,CAAA"}
@@ -0,0 +1,3 @@
1
+ export type $FixMe = any;
2
+ export type $IntentionalAny = any;
3
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG,GAAG,CAAA;AACxB,MAAM,MAAM,eAAe,GAAG,GAAG,CAAA"}
package/package.json ADDED
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "@tomorrowevening/theatre-r3f",
3
+ "version": "1.0.1",
4
+ "license": "Apache-2.0",
5
+ "authors": [
6
+ {
7
+ "name": "Andrew Prifer",
8
+ "email": "andrew.prifer@gmail.com",
9
+ "url": "https://github.com/AndrewPrifer"
10
+ },
11
+ {
12
+ "name": "Aria Minaei",
13
+ "email": "aria@theatrejs.com",
14
+ "url": "https://github.com/AriaMinaei"
15
+ }
16
+ ],
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/AriaMinaei/theatre",
20
+ "directory": "packages/r3f"
21
+ },
22
+ "main": "dist/index.js",
23
+ "module": "dist/index.esm.js",
24
+ "sideEffects": false,
25
+ "files": [
26
+ "dist/**/*"
27
+ ],
28
+ "exports": {
29
+ ".": {
30
+ "import": "./dist/index.esm.js",
31
+ "require": "./dist/index.js",
32
+ "types": "./dist/index.d.ts"
33
+ },
34
+ "./dist/extension": {
35
+ "import": "./dist/extension/index.esm.js",
36
+ "require": "./dist/extension/index.js",
37
+ "types": "./dist/extension/index.d.ts"
38
+ }
39
+ },
40
+ "scripts": {
41
+ "prepack": "yarn run build",
42
+ "typecheck": "yarn run build",
43
+ "build": "run-s build:ts build:js",
44
+ "build:js": "node -r esbuild-register devEnv/bundle.ts",
45
+ "build:ts": "tsc --build ./tsconfig.json",
46
+ "prepublish": "yarn run build",
47
+ "clean": "rm -rf ./dist && rm -f tsconfig.tsbuildinfo"
48
+ },
49
+ "devDependencies": {
50
+ "@react-three/drei": "^9.80.1",
51
+ "@react-three/fiber": "^8.13.6",
52
+ "@tomorrowevening/theatre-dataverse": "workspace:*",
53
+ "@tomorrowevening/theatre-react": "workspace:*",
54
+ "@types/jest": "^26.0.23",
55
+ "@types/lodash-es": "^4.17.4",
56
+ "@types/node": "^15.6.2",
57
+ "@types/react": "^18.2.18",
58
+ "@types/react-dom": "^18.2.7",
59
+ "@types/styled-components": "^5.1.26",
60
+ "@types/three": "0.155.0",
61
+ "esbuild": "^0.18.17",
62
+ "esbuild-register": "^3.4.2",
63
+ "lodash-es": "^4.17.21",
64
+ "npm-run-all": "^4.1.5",
65
+ "polished": "^4.1.3",
66
+ "react": "^18.2.0",
67
+ "react-dom": "^18.2.0",
68
+ "react-icons": "^4.2.0",
69
+ "react-merge-refs": "^2.0.2",
70
+ "react-shadow": "^20.4.0",
71
+ "react-use-measure": "^2.1.1",
72
+ "reakit": "^1.3.8",
73
+ "styled-components": "^5.3.11",
74
+ "three": "0.155.0",
75
+ "three-stdlib": "^2.24.1",
76
+ "typescript": "5.1.6",
77
+ "zustand": "^3.5.1"
78
+ },
79
+ "peerDependencies": {
80
+ "@react-three/fiber": "^8.13.6",
81
+ "@tomorrowevening/theatre-core": "*",
82
+ "@tomorrowevening/theatre-studio": "*",
83
+ "react": ">=17.0.2",
84
+ "react-dom": ">=17.0.2",
85
+ "three": ">=0.155.0"
86
+ }
87
+ }