@threlte/theatre 3.0.7 → 3.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.
Files changed (49) hide show
  1. package/README.md +0 -4
  2. package/dist/index.d.ts +6 -6
  3. package/dist/index.js +4 -4
  4. package/dist/project/Project.svelte +34 -13
  5. package/dist/project/Project.svelte.d.ts +4 -2
  6. package/dist/sequence/Sequence.svelte +102 -71
  7. package/dist/sequence/Sequence.svelte.d.ts +5 -5
  8. package/dist/sequence/SequenceController.d.ts +2 -2
  9. package/dist/sequence/SequenceController.js +1 -1
  10. package/dist/sequence/useSequence.d.ts +1 -1
  11. package/dist/sheet/Sheet.svelte +34 -16
  12. package/dist/sheet/Sheet.svelte.d.ts +5 -3
  13. package/dist/sheet/types.d.ts +1 -1
  14. package/dist/sheetObject/SheetObject.svelte +108 -75
  15. package/dist/sheetObject/SheetObject.svelte.d.ts +11 -4
  16. package/dist/sheetObject/declare/Declare.svelte +23 -14
  17. package/dist/sheetObject/declare/Declare.svelte.d.ts +11 -4
  18. package/dist/sheetObject/sync/Sync.svelte +122 -85
  19. package/dist/sheetObject/sync/Sync.svelte.d.ts +15 -4
  20. package/dist/sheetObject/sync/types.d.ts +1 -1
  21. package/dist/sheetObject/sync/utils/getInitialValue.js +2 -2
  22. package/dist/sheetObject/sync/utils/isComplexProp.d.ts +1 -1
  23. package/dist/sheetObject/sync/utils/isStringProp.d.ts +1 -1
  24. package/dist/sheetObject/sync/utils/parsePropLabel.d.ts +1 -1
  25. package/dist/sheetObject/transfomers/createTransformer.d.ts +1 -1
  26. package/dist/sheetObject/transfomers/defaults/color.d.ts +1 -1
  27. package/dist/sheetObject/transfomers/defaults/color.js +2 -2
  28. package/dist/sheetObject/transfomers/defaults/degrees.d.ts +1 -1
  29. package/dist/sheetObject/transfomers/defaults/degrees.js +2 -2
  30. package/dist/sheetObject/transfomers/defaults/euler.d.ts +1 -1
  31. package/dist/sheetObject/transfomers/defaults/euler.js +2 -2
  32. package/dist/sheetObject/transfomers/defaults/generic.d.ts +1 -1
  33. package/dist/sheetObject/transfomers/defaults/generic.js +3 -3
  34. package/dist/sheetObject/transfomers/defaults/normalized.d.ts +1 -1
  35. package/dist/sheetObject/transfomers/defaults/normalized.js +2 -2
  36. package/dist/sheetObject/transfomers/defaults/side.d.ts +1 -1
  37. package/dist/sheetObject/transfomers/defaults/side.js +2 -2
  38. package/dist/sheetObject/transfomers/getDefaultTransformer.d.ts +1 -1
  39. package/dist/sheetObject/transfomers/getDefaultTransformer.js +6 -6
  40. package/dist/sheetObject/transform/Transform.svelte +145 -120
  41. package/dist/sheetObject/transform/Transform.svelte.d.ts +11 -4
  42. package/dist/studio/InnerStudio.svelte +31 -19
  43. package/dist/studio/InnerStudio.svelte.d.ts +5 -3
  44. package/dist/studio/Studio.svelte +12 -3
  45. package/dist/studio/Studio.svelte.d.ts +4 -2
  46. package/dist/studio/useStudio.js +1 -1
  47. package/dist/theatre/Theatre.svelte +15 -2
  48. package/dist/theatre/Theatre.svelte.d.ts +4 -2
  49. package/package.json +11 -12
@@ -6,106 +6,139 @@
6
6
  <script
7
7
  lang="ts"
8
8
  generics="Props extends UnknownShorthandCompoundProps"
9
- >import { useStudio } from '../studio/useStudio';
10
- import { currentWritable, useThrelte, watch } from '@threlte/core';
11
- import { getContext, onDestroy, onMount } from 'svelte';
12
- import Declare from './declare/Declare.svelte';
13
- import Sync from './sync/Sync.svelte';
14
- import Transform from './transform/Transform.svelte';
15
- import { createSheetContext } from './useSheet';
16
- let { key, detach = false, props, selected = $bindable(false), onchange, children } = $props();
17
- const { invalidate } = useThrelte();
18
- let aggregatedProps = { ...props };
19
- const { sheet } = getContext('theatre-sheet');
20
- const sheetObject = currentWritable(sheet.object(key, aggregatedProps, {
21
- reconfigure: true
22
- }));
23
- onMount(() => {
9
+ >
10
+ import { useStudio } from '../studio/useStudio.js'
11
+ import type { ISheetObject, UnknownShorthandCompoundProps } from '@theatre/core'
12
+ import { currentWritable, useThrelte, watch, type CurrentWritable } from '@threlte/core'
13
+ import { getContext, onDestroy, onMount } from 'svelte'
14
+ import type { SheetContext } from '../sheet/types.js'
15
+ import Declare from './declare/Declare.svelte'
16
+ import type { SheetObjectProps } from './types.js'
17
+ import Sync from './sync/Sync.svelte'
18
+ import Transform from './transform/Transform.svelte'
19
+ import { createSheetContext } from './useSheet.js'
20
+
21
+ let {
22
+ key,
23
+ detach = false,
24
+ props,
25
+ selected = $bindable(false),
26
+ onchange,
27
+ children
28
+ }: SheetObjectProps<Props> = $props()
29
+
30
+ const { invalidate } = useThrelte()
31
+
32
+ let aggregatedProps: UnknownShorthandCompoundProps = { ...props }
33
+
34
+ const { sheet } = getContext<SheetContext>('theatre-sheet')
35
+
36
+ const sheetObject: CurrentWritable<ISheetObject<Props>> = currentWritable(
37
+ sheet.object(key, aggregatedProps, {
38
+ reconfigure: true
39
+ }) as any
40
+ )
41
+
42
+ onMount(() => {
24
43
  // Because the sheet object value subscription is not running before any
25
44
  // values change, we're emitting the initial value here. Doing this in
26
45
  // onMount also means that child components which might add props to the
27
46
  // sheet object have already been mounted.
28
- onchange?.(sheetObject.current.value);
29
- });
30
- // This flag is used to prevent the sheet object from being created after it
31
- // has been detached.
32
- let detached = false;
33
- onDestroy(() => {
47
+ onchange?.(sheetObject.current.value)
48
+ })
49
+
50
+ // This flag is used to prevent the sheet object from being created after it
51
+ // has been detached.
52
+ let detached = false
53
+ onDestroy(() => {
34
54
  if (detach) {
35
- detached = true;
36
- sheet.detachObject(key);
55
+ detached = true
56
+ sheet.detachObject(key)
37
57
  }
38
- });
39
- const updateSheetObject = () => {
58
+ })
59
+
60
+ const updateSheetObject = () => {
40
61
  // if the sheetObject has already been detached, do nothing.
41
- if (detached)
42
- return;
62
+ if (detached) return
63
+
43
64
  // first, detach the sheet object.
44
- sheet.detachObject(key);
65
+ sheet.detachObject(key)
66
+
45
67
  // create or reconfigure a sheet object here.
46
- sheetObject.set(sheet.object(key, aggregatedProps, {
68
+ sheetObject.set(
69
+ sheet.object(key, aggregatedProps, {
47
70
  reconfigure: true
48
- }));
49
- };
50
- const addProps = (props) => {
71
+ }) as any
72
+ )
73
+ }
74
+
75
+ const addProps = (props: UnknownShorthandCompoundProps) => {
51
76
  // add props to list of props
52
77
  aggregatedProps = {
53
- ...aggregatedProps,
54
- ...props
55
- };
78
+ ...aggregatedProps,
79
+ ...props
80
+ }
56
81
  // update sheet object (create or reconfigure)
57
- updateSheetObject();
58
- };
59
- const removeProps = (propNames) => {
82
+ updateSheetObject()
83
+ }
84
+
85
+ const removeProps = (propNames: string[]) => {
60
86
  // remove props from sheet object
61
87
  propNames.forEach((prop) => {
62
- delete aggregatedProps[prop];
63
- });
88
+ delete aggregatedProps[prop]
89
+ })
90
+
64
91
  // if there are no more props, detach sheet object
65
92
  if (Object.keys(aggregatedProps).length === 0) {
66
- // detach sheet object
67
- if (detach) {
68
- sheet.detachObject(key);
69
- }
93
+ // detach sheet object
94
+ if (detach) {
95
+ sheet.detachObject(key)
96
+ }
97
+ } else {
98
+ // update sheet object (reconfigure)
99
+ updateSheetObject()
70
100
  }
71
- else {
72
- // update sheet object (reconfigure)
73
- updateSheetObject();
74
- }
75
- };
76
- createSheetContext({
101
+ }
102
+
103
+ createSheetContext({
77
104
  sheetObject,
78
105
  addProps,
79
106
  removeProps
80
- });
81
- let values = $state($sheetObject?.value);
82
- watch(sheetObject, (sheetObject) => {
107
+ })
108
+
109
+ let values = $state($sheetObject?.value)
110
+
111
+ watch(sheetObject, (sheetObject) => {
83
112
  return sheetObject.onValuesChange((newValues) => {
84
- onchange?.(newValues);
85
- values = newValues;
86
- // this invalidation also invalidates changes catched by slotted
87
- // components such as <Sync> or <Declare>.
88
- invalidate();
89
- });
90
- });
91
- // Provide a flag to indicate whether this sheet object is selected in the
92
- // Theatre.js studio.
93
- const studio = useStudio();
94
- watch([studio, sheetObject], ([studio, sheetObject]) => {
113
+ onchange?.(newValues)
114
+ values = newValues
115
+ // this invalidation also invalidates changes catched by slotted
116
+ // components such as <Sync> or <Declare>.
117
+ invalidate()
118
+ })
119
+ })
120
+
121
+ // Provide a flag to indicate whether this sheet object is selected in the
122
+ // Theatre.js studio.
123
+ const studio = useStudio()
124
+
125
+ watch([studio, sheetObject], ([studio, sheetObject]) => {
95
126
  return studio?.onSelectionChange((selection) => {
96
- selected = selection.includes(sheetObject);
97
- });
98
- });
99
- // Provide a select function to select this sheet object in the Theatre.js
100
- // studio.
101
- const select = () => {
102
- $studio?.setSelection([sheetObject.current]);
103
- };
104
- const deselect = () => {
127
+ selected = selection.includes(sheetObject)
128
+ })
129
+ })
130
+
131
+ // Provide a select function to select this sheet object in the Theatre.js
132
+ // studio.
133
+ const select = () => {
134
+ $studio?.setSelection([sheetObject.current])
135
+ }
136
+
137
+ const deselect = () => {
105
138
  if ($studio?.selection.includes(sheetObject.current)) {
106
- $studio?.setSelection([]);
139
+ $studio?.setSelection([])
107
140
  }
108
- };
141
+ }
109
142
  </script>
110
143
 
111
144
  {@render children?.({
@@ -1,9 +1,16 @@
1
1
  import type { UnknownShorthandCompoundProps } from '@theatre/core';
2
- import type { SheetObjectProps } from './types';
2
+ import type { SheetObjectProps } from './types.js';
3
+ declare function $$render<Props extends UnknownShorthandCompoundProps>(): {
4
+ props: SheetObjectProps<Props>;
5
+ exports: {};
6
+ bindings: "selected";
7
+ slots: {};
8
+ events: {};
9
+ };
3
10
  declare class __sveltets_Render<Props extends UnknownShorthandCompoundProps> {
4
- props(): SheetObjectProps<Props>;
5
- events(): {};
6
- slots(): {};
11
+ props(): ReturnType<typeof $$render<Props>>['props'];
12
+ events(): ReturnType<typeof $$render<Props>>['events'];
13
+ slots(): ReturnType<typeof $$render<Props>>['slots'];
7
14
  bindings(): "selected";
8
15
  exports(): {};
9
16
  }
@@ -1,21 +1,30 @@
1
1
  <script
2
2
  lang="ts"
3
3
  generics="P extends UnknownShorthandCompoundProps"
4
- >import { watch } from '@threlte/core';
5
- import { onDestroy } from 'svelte';
6
- import { useSheet } from '../useSheet';
7
- let { props, children } = $props();
8
- const { sheetObject, addProps, removeProps } = useSheet();
9
- let values = $state($sheetObject?.value);
10
- addProps(props);
11
- onDestroy(() => {
12
- removeProps(Object.keys(props));
13
- });
14
- watch(sheetObject, (sheetObject) => {
4
+ >
5
+ import type { UnknownShorthandCompoundProps } from '@theatre/core'
6
+ import { watch } from '@threlte/core'
7
+ import { onDestroy } from 'svelte'
8
+ import { useSheet } from '../useSheet.js'
9
+ import type { DeclareProps } from './types.js'
10
+
11
+ let { props, children }: DeclareProps<P> = $props()
12
+
13
+ const { sheetObject, addProps, removeProps } = useSheet<P>()
14
+
15
+ let values = $state($sheetObject?.value)
16
+
17
+ addProps(props)
18
+
19
+ onDestroy(() => {
20
+ removeProps(Object.keys(props))
21
+ })
22
+
23
+ watch(sheetObject, (sheetObject) => {
15
24
  return sheetObject?.onValuesChange((v) => {
16
- values = v;
17
- });
18
- });
25
+ values = v
26
+ })
27
+ })
19
28
  </script>
20
29
 
21
30
  {@render children?.({ values })}
@@ -1,9 +1,16 @@
1
1
  import type { UnknownShorthandCompoundProps } from '@theatre/core';
2
- import type { DeclareProps } from './types';
2
+ import type { DeclareProps } from './types.js';
3
+ declare function $$render<P extends UnknownShorthandCompoundProps>(): {
4
+ props: DeclareProps<P>;
5
+ exports: {};
6
+ bindings: "";
7
+ slots: {};
8
+ events: {};
9
+ };
3
10
  declare class __sveltets_Render<P extends UnknownShorthandCompoundProps> {
4
- props(): DeclareProps<P>;
5
- events(): {};
6
- slots(): {};
11
+ props(): ReturnType<typeof $$render<P>>['props'];
12
+ events(): ReturnType<typeof $$render<P>>['events'];
13
+ slots(): ReturnType<typeof $$render<P>>['slots'];
7
14
  bindings(): "";
8
15
  exports(): {};
9
16
  }
@@ -1,48 +1,69 @@
1
1
  <script
2
2
  lang="ts"
3
3
  generics="Type"
4
- >import { resolvePropertyPath, useParent, watch } from '@threlte/core';
5
- import { onDestroy } from 'svelte';
6
- import { useStudio } from '../../studio/useStudio';
7
- import { useSheet } from '../useSheet';
8
- import { getInitialValue } from './utils/getInitialValue';
9
- import { isComplexProp } from './utils/isComplexProp';
10
- import { isStringProp } from './utils/isStringProp';
11
- import { makeAlphanumeric } from './utils/makeAlphanumeric';
12
- import { parsePropLabel } from './utils/parsePropLabel';
13
- let { type, children, ...rest } = $props();
14
- const { sheetObject, addProps, removeProps } = useSheet();
15
- const parent = useParent();
16
- // serves as a map to map (custom) prop names to object target properties
17
- let propMappings = {};
18
- const initProps = () => {
19
- const props = {};
4
+ >
5
+ import { resolvePropertyPath, useParent, watch } from '@threlte/core'
6
+ import { onDestroy } from 'svelte'
7
+ import { useStudio } from '../../studio/useStudio.js'
8
+ import type { Transformer } from '../transfomers/types.js'
9
+ import { useSheet } from '../useSheet.js'
10
+ import type { AnyProp, SyncProps } from './types.js'
11
+ import { getInitialValue } from './utils/getInitialValue.js'
12
+ import { isComplexProp } from './utils/isComplexProp.js'
13
+ import { isStringProp } from './utils/isStringProp.js'
14
+ import { makeAlphanumeric } from './utils/makeAlphanumeric.js'
15
+ import { parsePropLabel } from './utils/parsePropLabel.js'
16
+
17
+ let { type, children, ...rest }: SyncProps<Type> = $props()
18
+
19
+ const { sheetObject, addProps, removeProps } = useSheet()
20
+ const parent = useParent()
21
+
22
+ // serves as a map to map (custom) prop names to object target properties
23
+ let propMappings = {} as Record<
24
+ string,
25
+ {
26
+ propertyPath: string
27
+ transformer: Transformer
28
+ }
29
+ >
30
+
31
+ const initProps = () => {
32
+ const props = {} as Record<string, any>
33
+
20
34
  // propertyPath is for example "position.x" or "intensity", so a property path on the parent object
21
- Object.entries(rest).forEach(([propertyPath, propertyValue]) => {
22
- // The prop might have a custom name, for example "intensity" might be mapped to "light-intensity"
23
- const customKey = isComplexProp(propertyValue)
24
- ? propertyValue.key
25
- : isStringProp(propertyValue)
26
- ? propertyValue
27
- : undefined;
28
- const key = customKey ?? makeAlphanumeric(propertyPath);
29
- // get the initial value as well as the correct transformer for the property
30
- const { value, transformer } = getInitialValue(propertyPath, propertyValue, $parent);
31
- const label = parsePropLabel(key, propertyValue);
32
- // apply the label to the value
33
- value.label = label;
34
- // add the prop to the propMappings map
35
- propMappings[key] = {
36
- propertyPath,
37
- transformer
38
- };
39
- // add the prop to the props object
40
- props[key] = value;
41
- });
35
+ Object.entries(<Record<string, AnyProp>>rest).forEach(([propertyPath, propertyValue]) => {
36
+ // The prop might have a custom name, for example "intensity" might be mapped to "light-intensity"
37
+ const customKey = isComplexProp(propertyValue)
38
+ ? propertyValue.key
39
+ : isStringProp(propertyValue)
40
+ ? propertyValue
41
+ : undefined
42
+
43
+ const key = customKey ?? makeAlphanumeric(propertyPath)
44
+
45
+ // get the initial value as well as the correct transformer for the property
46
+ const { value, transformer } = getInitialValue(propertyPath, propertyValue, $parent)
47
+ const label = parsePropLabel(key, propertyValue)
48
+
49
+ // apply the label to the value
50
+ value.label = label
51
+
52
+ // add the prop to the propMappings map
53
+ propMappings[key] = {
54
+ propertyPath,
55
+ transformer
56
+ }
57
+
58
+ // add the prop to the props object
59
+ props[key] = value
60
+ })
61
+
42
62
  // add the props to the parent IsheetObject
43
- addProps(props);
44
- };
45
- const updateProjectionMatrixKeys = [
63
+ addProps(props)
64
+ }
65
+
66
+ const updateProjectionMatrixKeys = [
46
67
  'fov',
47
68
  'near',
48
69
  'far',
@@ -52,54 +73,70 @@ const updateProjectionMatrixKeys = [
52
73
  'top',
53
74
  'bottom',
54
75
  'aspect'
55
- ];
56
- watch([parent, sheetObject], ([parent, sheetObject]) => {
57
- if (!parent)
58
- return;
76
+ ]
77
+
78
+ watch([parent, sheetObject], ([parent, sheetObject]) => {
79
+ if (!parent) return
80
+
59
81
  return sheetObject?.onValuesChange((values) => {
60
- // Ensure that the parent is still mounted
61
- Object.keys(values).forEach((key) => {
62
- // first, check if the prop is mapped in this component
63
- const propMapping = propMappings[key];
64
- if (!propMapping)
65
- return;
66
- // we're using the addedProps map to infer the target property name from the property name on values
67
- const { target, key: targetKey } = resolvePropertyPath(parent, propMapping.propertyPath);
68
- // use a transformer to apply value
69
- const transformer = propMapping.transformer;
70
- transformer.apply(target, targetKey, values[key]);
71
- if (updateProjectionMatrixKeys.includes(targetKey)) {
72
- target.updateProjectionMatrix?.();
73
- }
74
- });
75
- });
76
- });
77
- initProps();
78
- const studio = useStudio();
79
- /**
80
- * Capture the current values of the props
81
- */
82
- export const capture = () => {
83
- if (!$studio)
84
- return;
85
- const scrub = $studio.scrub();
86
- Object.keys(sheetObject.current.value).forEach((key) => {
82
+ // Ensure that the parent is still mounted
83
+
84
+ Object.keys(values).forEach((key) => {
87
85
  // first, check if the prop is mapped in this component
88
- const propMapping = propMappings[key];
89
- if (!propMapping)
90
- return;
86
+ const propMapping = propMappings[key]
87
+
88
+ if (!propMapping) return
89
+
91
90
  // we're using the addedProps map to infer the target property name from the property name on values
92
- const { target, key: targetKey } = resolvePropertyPath($parent, propMapping.propertyPath);
93
- const value = propMapping.transformer.transform(target[targetKey]).default;
94
- scrub.capture(({ set }) => {
95
- set(sheetObject.current.props[key], value);
96
- });
97
- });
98
- scrub.commit();
99
- };
100
- onDestroy(() => {
101
- removeProps(Object.keys(propMappings));
102
- });
91
+ const { target, key: targetKey } = resolvePropertyPath(
92
+ parent as any,
93
+ propMapping.propertyPath
94
+ )
95
+
96
+ // use a transformer to apply value
97
+ const transformer = propMapping.transformer
98
+ transformer.apply(target, targetKey, values[key])
99
+
100
+ if (updateProjectionMatrixKeys.includes(targetKey)) {
101
+ target.updateProjectionMatrix?.()
102
+ }
103
+ })
104
+ })
105
+ })
106
+
107
+ initProps()
108
+
109
+ const studio = useStudio()
110
+
111
+ /**
112
+ * Capture the current values of the props
113
+ */
114
+ export const capture = () => {
115
+ if (!$studio) return
116
+ const scrub = $studio.scrub()
117
+
118
+ Object.keys(sheetObject.current.value).forEach((key) => {
119
+ // first, check if the prop is mapped in this component
120
+ const propMapping = propMappings[key]
121
+
122
+ if (!propMapping) return
123
+
124
+ // we're using the addedProps map to infer the target property name from the property name on values
125
+ const { target, key: targetKey } = resolvePropertyPath($parent, propMapping.propertyPath)
126
+
127
+ const value = propMapping.transformer.transform(target[targetKey]).default
128
+
129
+ scrub.capture(({ set }) => {
130
+ set(sheetObject.current.props[key], value)
131
+ })
132
+ })
133
+
134
+ scrub.commit()
135
+ }
136
+
137
+ onDestroy(() => {
138
+ removeProps(Object.keys(propMappings))
139
+ })
103
140
  </script>
104
141
 
105
142
  {@render children?.({ capture })}
@@ -1,8 +1,19 @@
1
- import type { SyncProps } from './types';
1
+ import type { SyncProps } from './types.js';
2
+ declare function $$render<Type>(): {
3
+ props: SyncProps<Type>;
4
+ exports: {
5
+ /**
6
+ * Capture the current values of the props
7
+ */ capture: () => void;
8
+ };
9
+ bindings: "";
10
+ slots: {};
11
+ events: {};
12
+ };
2
13
  declare class __sveltets_Render<Type> {
3
- props(): SyncProps<Type>;
4
- events(): {};
5
- slots(): {};
14
+ props(): ReturnType<typeof $$render<Type>>['props'];
15
+ events(): ReturnType<typeof $$render<Type>>['events'];
16
+ slots(): ReturnType<typeof $$render<Type>>['slots'];
6
17
  bindings(): "";
7
18
  exports(): {
8
19
  /**
@@ -1,6 +1,6 @@
1
1
  import type { Snippet } from 'svelte';
2
2
  import type { ConditionalKeys, Primitive } from 'type-fest';
3
- import type { Transformer } from '../transfomers/types';
3
+ import type { Transformer } from '../transfomers/types.js';
4
4
  type OmittedPropKeys = 'type' | 'args' | 'attach' | 'manual' | 'makeDefault' | 'id' | 'children' | `is${string}` | 'parent' | 'uuid' | 'name';
5
5
  type AnyClass = new (...args: any) => any;
6
6
  type AnyFn = (...args: any) => any;
@@ -1,6 +1,6 @@
1
1
  import { resolvePropertyPath } from '@threlte/core';
2
- import { getDefaultTransformer } from '../../transfomers/getDefaultTransformer';
3
- import { isComplexProp } from './isComplexProp';
2
+ import { getDefaultTransformer } from '../../transfomers/getDefaultTransformer.js';
3
+ import { isComplexProp } from './isComplexProp.js';
4
4
  export const getInitialValue = (propertyPath, propertyValue, targetObject) => {
5
5
  const { target, key } = resolvePropertyPath(targetObject, propertyPath);
6
6
  const rawValue = target[key];
@@ -1,2 +1,2 @@
1
- import type { AnyProp, ComplexProp } from '../types';
1
+ import type { AnyProp, ComplexProp } from '../types.js';
2
2
  export declare const isComplexProp: (prop: AnyProp) => prop is ComplexProp;
@@ -1,2 +1,2 @@
1
- import type { AnyProp } from '../types';
1
+ import type { AnyProp } from '../types.js';
2
2
  export declare const isStringProp: (prop: AnyProp) => prop is string;
@@ -1,2 +1,2 @@
1
- import type { AnyProp } from '../types';
1
+ import type { AnyProp } from '../types.js';
2
2
  export declare const parsePropLabel: (alphaNumericKey: string, propValue: AnyProp) => string;
@@ -1,2 +1,2 @@
1
- import type { Transformer } from './types';
1
+ import type { Transformer } from './types.js';
2
2
  export declare const createTransformer: (transformer: Transformer) => Transformer;
@@ -1 +1 @@
1
- export declare const color: import("../types").Transformer;
1
+ export declare const color: import("../types.js").Transformer;
@@ -1,5 +1,5 @@
1
- import { types } from '../../../theatre';
2
- import { createTransformer } from '../createTransformer';
1
+ import { types } from '../../../theatre.js';
2
+ import { createTransformer } from '../createTransformer.js';
3
3
  import { Color, SRGBColorSpace } from 'three';
4
4
  const _color = new Color();
5
5
  export const color = createTransformer({
@@ -1 +1 @@
1
- export declare const degrees: import("../types").Transformer;
1
+ export declare const degrees: import("../types.js").Transformer;
@@ -1,6 +1,6 @@
1
1
  import { DEG2RAD, RAD2DEG } from 'three/src/math/MathUtils.js';
2
- import { createTransformer } from '../createTransformer';
3
- import { types } from '../../../theatre';
2
+ import { createTransformer } from '../createTransformer.js';
3
+ import { types } from '../../../theatre.js';
4
4
  export const degrees = createTransformer({
5
5
  transform(target) {
6
6
  return types.number(target * RAD2DEG);
@@ -1 +1 @@
1
- export declare const euler: import("../types").Transformer;
1
+ export declare const euler: import("../types.js").Transformer;
@@ -1,6 +1,6 @@
1
1
  import { DEG2RAD, RAD2DEG } from 'three/src/math/MathUtils.js';
2
- import { createTransformer } from '../createTransformer';
3
- import { types } from '../../../theatre';
2
+ import { createTransformer } from '../createTransformer.js';
3
+ import { types } from '../../../theatre.js';
4
4
  export const euler = createTransformer({
5
5
  transform(value) {
6
6
  return types.compound({
@@ -1 +1 @@
1
- export declare const generic: import("../types").Transformer;
1
+ export declare const generic: import("../types.js").Transformer;