@threlte/flex 2.0.0-next.0 → 2.0.0-next.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.
- package/dist/Box/Box.svelte +1 -1
- package/dist/Flex/Flex.svelte +1 -1
- package/dist/Flex/InnerFlex.svelte +1 -1
- package/package.json +22 -22
- package/dist/Flex/context.d.ts +0 -39
package/dist/Box/Box.svelte
CHANGED
package/dist/Flex/Flex.svelte
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script>import { T, currentWritable, useTask } from '@threlte/core';
|
|
1
|
+
<script lang="ts">import { T, currentWritable, useTask } from '@threlte/core';
|
|
2
2
|
import { onDestroy } from 'svelte';
|
|
3
3
|
import { Box3, Group, Vector3 } from 'three';
|
|
4
4
|
import { Direction } from 'yoga-layout';
|
package/package.json
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@threlte/flex",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.1",
|
|
4
4
|
"author": "Grischa Erbe <hello@legrisch.com> (https://legrisch.com)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@sveltejs/adapter-auto": "^3.
|
|
8
|
-
"@sveltejs/kit": "^2.
|
|
9
|
-
"@sveltejs/package": "^2.
|
|
10
|
-
"@sveltejs/vite-plugin-svelte": "^3.
|
|
11
|
-
"@types/node": "^20.
|
|
12
|
-
"@types/three": "^0.
|
|
13
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
14
|
-
"@typescript-eslint/parser": "^6.
|
|
7
|
+
"@sveltejs/adapter-auto": "^3.2.0",
|
|
8
|
+
"@sveltejs/kit": "^2.5.5",
|
|
9
|
+
"@sveltejs/package": "^2.3.1",
|
|
10
|
+
"@sveltejs/vite-plugin-svelte": "^3.1.0",
|
|
11
|
+
"@types/node": "^20.12.7",
|
|
12
|
+
"@types/three": "^0.163.0",
|
|
13
|
+
"@typescript-eslint/eslint-plugin": "^7.6.0",
|
|
14
|
+
"@typescript-eslint/parser": "^7.6.0",
|
|
15
15
|
"@yushijinhun/three-minifier-rollup": "^0.4.0",
|
|
16
|
-
"eslint": "^
|
|
16
|
+
"eslint": "^9.0.0",
|
|
17
17
|
"eslint-config-prettier": "^9.1.0",
|
|
18
|
-
"eslint-plugin-svelte": "^2.
|
|
19
|
-
"prettier": "^3.2.
|
|
20
|
-
"prettier-plugin-svelte": "^3.
|
|
18
|
+
"eslint-plugin-svelte": "^2.36.0",
|
|
19
|
+
"prettier": "^3.2.5",
|
|
20
|
+
"prettier-plugin-svelte": "^3.2.2",
|
|
21
21
|
"publint": "^0.2.7",
|
|
22
22
|
"rimraf": "^5.0.5",
|
|
23
|
-
"svelte": "^
|
|
24
|
-
"svelte-check": "^3.6.
|
|
23
|
+
"svelte": "^5.0.0-next.95",
|
|
24
|
+
"svelte-check": "^3.6.9",
|
|
25
25
|
"svelte-preprocess": "^5.1.3",
|
|
26
|
-
"svelte2tsx": "^0.7.
|
|
27
|
-
"three": "^0.
|
|
26
|
+
"svelte2tsx": "^0.7.6",
|
|
27
|
+
"three": "^0.163.0",
|
|
28
28
|
"tslib": "^2.6.2",
|
|
29
|
-
"typescript": "^5.
|
|
30
|
-
"vite": "^5.
|
|
31
|
-
"@threlte/core": "8.0.0-next.
|
|
32
|
-
"@threlte/extras": "9.0.0-next.
|
|
29
|
+
"typescript": "^5.4.5",
|
|
30
|
+
"vite": "^5.2.8",
|
|
31
|
+
"@threlte/core": "8.0.0-next.2",
|
|
32
|
+
"@threlte/extras": "9.0.0-next.2"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"mitt": "^3.0.1",
|
|
36
36
|
"yoga-layout": "^2.0.1"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"svelte": ">=
|
|
39
|
+
"svelte": ">=5",
|
|
40
40
|
"three": ">=0.152"
|
|
41
41
|
},
|
|
42
42
|
"type": "module",
|
package/dist/Flex/context.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { CurrentWritable } from '@threlte/core';
|
|
2
|
-
import { type Emitter } from 'mitt';
|
|
3
|
-
import type { Group } from 'three';
|
|
4
|
-
import type { Node, Yoga } from 'yoga-layout';
|
|
5
|
-
import type { Axis, ClassParser, NodeProps } from '../lib/props';
|
|
6
|
-
type FlexContextEvents = {
|
|
7
|
-
'reflow:before': void;
|
|
8
|
-
'reflow:after': void;
|
|
9
|
-
};
|
|
10
|
-
type FlexContextNode = {
|
|
11
|
-
node: Node;
|
|
12
|
-
group: THREE.Group;
|
|
13
|
-
props: NodeProps;
|
|
14
|
-
};
|
|
15
|
-
export type FlexContextData = {
|
|
16
|
-
yoga: Yoga;
|
|
17
|
-
nodes: Map<Node, FlexContextNode>;
|
|
18
|
-
addNode: (node: Node, group: Group, props: NodeProps) => void;
|
|
19
|
-
updateNodeProps: (node: Node, props: NodeProps, force?: boolean) => void;
|
|
20
|
-
removeNode: (node: Node) => void;
|
|
21
|
-
scaleFactor: CurrentWritable<number>;
|
|
22
|
-
mainAxis: CurrentWritable<Axis>;
|
|
23
|
-
crossAxis: CurrentWritable<Axis>;
|
|
24
|
-
depthAxis: CurrentWritable<Axis>;
|
|
25
|
-
rootGroup: Group;
|
|
26
|
-
rootWidth: CurrentWritable<number>;
|
|
27
|
-
rootHeight: CurrentWritable<number>;
|
|
28
|
-
reflow: () => void;
|
|
29
|
-
classParser?: ClassParser;
|
|
30
|
-
};
|
|
31
|
-
export type FlexContext = FlexContextData & Emitter<FlexContextEvents> & {
|
|
32
|
-
onEvent: <Type extends keyof FlexContextEvents>(type: Type, callback: (payload: FlexContextEvents[Type]) => void) => void;
|
|
33
|
-
};
|
|
34
|
-
export declare const flexContextName = "__threlte-flex";
|
|
35
|
-
export declare const createFlexContext: (data: FlexContextData) => FlexContextData & Emitter<FlexContextEvents> & {
|
|
36
|
-
onEvent: <Type extends keyof FlexContextEvents>(type: Type, callback: (payload: FlexContextEvents[Type]) => void) => void;
|
|
37
|
-
};
|
|
38
|
-
export declare const useFlex: () => FlexContext;
|
|
39
|
-
export {};
|