@threlte/theatre 3.0.0 → 3.0.3

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,7 @@
1
1
  import { type Snippet } from 'svelte';
2
2
  import type { IProject, IProjectConfig } from '@theatre/core';
3
3
  declare const Project: import("svelte").Component<{
4
- name: string;
4
+ name?: string;
5
5
  config?: IProjectConfig | undefined;
6
6
  project?: IProject;
7
7
  isReady?: boolean;
@@ -44,7 +44,7 @@ declare const Sequence: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsW
44
44
  iterationCount?: number;
45
45
  range?: [from: number, to: number];
46
46
  rate?: number;
47
- direction?: "reverse" | "alternate" | "normal" | "alternateReverse";
47
+ direction?: "normal" | "reverse" | "alternate" | "alternateReverse";
48
48
  rafDriver?: IRafDriver;
49
49
  }) => Promise<boolean>;
50
50
  pause: () => void;
@@ -60,7 +60,7 @@ declare const Sequence: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsW
60
60
  iterationCount?: number;
61
61
  range?: [from: number, to: number];
62
62
  rate?: number;
63
- direction?: "reverse" | "alternate" | "normal" | "alternateReverse";
63
+ direction?: "normal" | "reverse" | "alternate" | "alternateReverse";
64
64
  rafDriver?: IRafDriver;
65
65
  }) => Promise<boolean>;
66
66
  pause: () => void;
@@ -4,8 +4,8 @@ import type { Transformer } from '../transfomers/types';
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;
7
- type MaybeInstance<Type extends any> = Type extends AnyClass ? InstanceType<Type> : Type;
8
- type InstanceProps<Type extends any> = Partial<Omit<MaybeInstance<Type> extends Primitive ? Record<string, unknown> : {
7
+ type MaybeInstance<Type> = Type extends AnyClass ? InstanceType<Type> : Type;
8
+ type InstanceProps<Type> = Partial<Omit<MaybeInstance<Type> extends Primitive ? Record<string, unknown> : {
9
9
  [K in keyof MaybeInstance<Type>]?: MaybeInstance<Type>[K] extends {
10
10
  set: (...args: any[]) => any;
11
11
  } ? Parameters<MaybeInstance<Type>[K]['set']> | Parameters<MaybeInstance<Type>[K]['set']>[0] : MaybeInstance<Type>[K] extends AnyFn ? never : MaybeInstance<Type>[K];
@@ -99,7 +99,7 @@ watch([studio], ([studio]) => {
99
99
  });
100
100
  });
101
101
  const onMouseDown = () => {
102
- if (!studio)
102
+ if (!studio.current)
103
103
  return;
104
104
  if (scrub)
105
105
  return;
@@ -1,10 +1,10 @@
1
1
  import type { ISheetObject, UnknownShorthandCompoundProps } from '@theatre/core';
2
2
  import type { CurrentWritable } from '@threlte/core';
3
- type Context<T extends UnknownShorthandCompoundProps = {}> = {
3
+ type Context<T extends UnknownShorthandCompoundProps = any> = {
4
4
  sheetObject: CurrentWritable<ISheetObject<T>>;
5
5
  addProps: (props: UnknownShorthandCompoundProps) => void;
6
6
  removeProps: (names: string[]) => void;
7
7
  };
8
8
  export declare const createSheetContext: (context: Context) => void;
9
- export declare const useSheet: <T extends UnknownShorthandCompoundProps = {}>() => Context<T>;
9
+ export declare const useSheet: <T extends UnknownShorthandCompoundProps = any>() => Context<T>;
10
10
  export {};
package/package.json CHANGED
@@ -1,45 +1,45 @@
1
1
  {
2
2
  "name": "@threlte/theatre",
3
- "version": "3.0.0",
3
+ "version": "3.0.3",
4
4
  "author": "Grischa Erbe <hello@legrisch.com> (https://legrisch.com)",
5
5
  "license": "MIT",
6
6
  "description": "Threlte Components for Theatre, an animation library with a professional motion design toolset",
7
7
  "devDependencies": {
8
+ "@eslint/js": "^9.26.0",
8
9
  "@sveltejs/adapter-auto": "^3.3.1",
9
10
  "@sveltejs/kit": "^2.7.7",
10
11
  "@sveltejs/package": "^2.3.7",
11
12
  "@sveltejs/vite-plugin-svelte": "^4.0.0",
12
13
  "@types/node": "^20.12.7",
13
- "@types/three": "^0.171.0",
14
- "@typescript-eslint/eslint-plugin": "^7.6.0",
15
- "@typescript-eslint/parser": "^7.6.0",
14
+ "@types/three": "^0.175.0",
16
15
  "@yushijinhun/three-minifier-rollup": "^0.4.0",
17
- "eslint": "^9.0.0",
18
- "eslint-config-prettier": "^9.1.0",
19
- "eslint-plugin-svelte": "^2.36.0",
16
+ "eslint": "^9.26.0",
17
+ "eslint-plugin-svelte": "^3.5.1",
18
+ "globals": "^16.1.0",
20
19
  "prettier": "^3.2.5",
21
20
  "prettier-plugin-svelte": "^3.2.2",
22
21
  "publint": "^0.2.7",
23
22
  "rimraf": "^5.0.5",
24
- "svelte": "^5.14.4",
25
- "svelte-check": "^3.6.9",
23
+ "svelte": "^5.26.2",
24
+ "svelte-check": "^4.1.7",
26
25
  "svelte-preprocess": "^5.1.3",
27
26
  "svelte2tsx": "^0.7.6",
28
- "three": "^0.171.0",
27
+ "three": "^0.175.0",
29
28
  "tslib": "^2.6.2",
30
29
  "type-fest": "^4.15.0",
31
30
  "typescript": "^5.6.3",
31
+ "typescript-eslint": "^8.32.0",
32
32
  "vite": "^5.2.8",
33
- "@threlte/core": "8.0.0",
34
- "@threlte/extras": "9.0.0"
33
+ "@threlte/core": "8.0.4",
34
+ "@threlte/extras": "9.2.1"
35
35
  },
36
36
  "peerDependencies": {
37
- "svelte": ">=4",
38
- "three": ">=0.155",
37
+ "@theatre/core": ">=0.6",
38
+ "@theatre/studio": ">=0.6",
39
39
  "@threlte/core": ">=8.0.0-next.0",
40
40
  "@threlte/extras": ">=9.0.0-next.0",
41
- "@theatre/core": ">=0.6",
42
- "@theatre/studio": ">=0.6"
41
+ "svelte": ">=4",
42
+ "three": ">=0.155"
43
43
  },
44
44
  "type": "module",
45
45
  "keywords": [
@@ -77,7 +77,7 @@
77
77
  "package": "svelte-kit sync && svelte-package && node ./scripts/cleanupPackage.js && publint",
78
78
  "check": "svelte-check --tsconfig ./tsconfig.json",
79
79
  "check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
80
- "lint": "prettier --check .",
80
+ "lint": "prettier --check . && eslint .",
81
81
  "format": "prettier --write .",
82
82
  "cleanup": "rimraf node_modules .svelte-kit dist"
83
83
  }