@threlte/flex 2.0.0-next.0 → 2.0.0-next.10
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 +28 -25
- package/dist/Box/Box.svelte.d.ts +12 -15
- package/dist/Flex/Flex.svelte +5 -10
- package/dist/Flex/Flex.svelte.d.ts +2 -13
- package/dist/Flex/InnerFlex.svelte +9 -9
- package/dist/Flex/InnerFlex.svelte.d.ts +14 -19
- package/dist/Flex/context.d.ts +1 -1
- package/dist/lib/getRootShift.d.ts +1 -0
- package/dist/lib/isTopLevelChildNode.d.ts +1 -0
- package/dist/lib/props.d.ts +44 -34
- package/dist/lib/propsChanged.d.ts +1 -0
- package/package.json +44 -26
package/dist/Box/Box.svelte
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<script>import {
|
|
1
|
+
<script lang="ts">import { T } from '@threlte/core';
|
|
2
2
|
import { onDestroy } from 'svelte';
|
|
3
|
-
import { Group } from 'three';
|
|
3
|
+
import { Group, Object3D } from 'three';
|
|
4
4
|
import { useFlex } from '../Flex/context';
|
|
5
5
|
import { createUseDimensionsContext } from '../hooks/useDimensions';
|
|
6
6
|
import { createNodeContext } from '../nodes/context';
|
|
7
|
-
let { order, class: _class = '', ...props } = $props();
|
|
7
|
+
let { order, class: _class = '', onreflow, children, ...props } = $props();
|
|
8
8
|
/**
|
|
9
9
|
* Create the context for `useDimensions`
|
|
10
10
|
*/
|
|
@@ -41,36 +41,39 @@ onEvent('reflow:after', () => {
|
|
|
41
41
|
contentGroup.position[$depthAxis] = 0;
|
|
42
42
|
dimensionsContext.width.set(computedWidth);
|
|
43
43
|
dimensionsContext.height.set(computedHeight);
|
|
44
|
-
|
|
44
|
+
onreflow?.({
|
|
45
45
|
width: computedWidth,
|
|
46
46
|
height: computedHeight
|
|
47
47
|
});
|
|
48
48
|
});
|
|
49
|
+
const proxy = new Object3D();
|
|
50
|
+
proxy.add = (child) => {
|
|
51
|
+
if (child.userData.isNode) {
|
|
52
|
+
group.add(child);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
contentGroup.add(child);
|
|
56
|
+
}
|
|
57
|
+
return child;
|
|
58
|
+
};
|
|
59
|
+
proxy.remove = (child) => {
|
|
60
|
+
if (child.userData.isNode) {
|
|
61
|
+
group.remove(child);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
contentGroup.remove(child);
|
|
65
|
+
}
|
|
66
|
+
return child;
|
|
67
|
+
};
|
|
49
68
|
</script>
|
|
50
69
|
|
|
51
70
|
<T is={group}>
|
|
52
71
|
<T is={contentGroup} />
|
|
53
72
|
</T>
|
|
54
73
|
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
group.add(child)
|
|
59
|
-
} else {
|
|
60
|
-
contentGroup.add(child)
|
|
61
|
-
}
|
|
62
|
-
}}
|
|
63
|
-
onChildDestroy={(child) => {
|
|
64
|
-
if (child.userData.isNode) {
|
|
65
|
-
group.remove(child)
|
|
66
|
-
} else {
|
|
67
|
-
contentGroup.remove(child)
|
|
68
|
-
}
|
|
69
|
-
}}
|
|
74
|
+
<T
|
|
75
|
+
is={proxy}
|
|
76
|
+
attach={false}
|
|
70
77
|
>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
width={computedWidth}
|
|
74
|
-
height={computedHeight}
|
|
75
|
-
/>
|
|
76
|
-
</HierarchicalObject>
|
|
78
|
+
{@render children?.({ reflow, width: computedWidth, height: computedHeight })}
|
|
79
|
+
</T>
|
package/dist/Box/Box.svelte.d.ts
CHANGED
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
import { SvelteComponent } from 'svelte'
|
|
1
|
+
import { SvelteComponent, type Snippet } from 'svelte'
|
|
2
2
|
import type { NodeProps } from '../lib/props'
|
|
3
3
|
|
|
4
4
|
type BoxProps = NodeProps & {
|
|
5
5
|
order?: number | undefined
|
|
6
6
|
class?: string
|
|
7
|
-
}
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
children?: Snippet<
|
|
9
|
+
[
|
|
10
|
+
{
|
|
11
|
+
reflow: () => void
|
|
12
|
+
width: number
|
|
13
|
+
height: number
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
>
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
default: {
|
|
18
|
-
reflow: () => void
|
|
19
|
-
width: number
|
|
20
|
-
height: number
|
|
21
|
-
}
|
|
18
|
+
onreflow?: (event: { width: number; height: number }) => void
|
|
22
19
|
}
|
|
23
20
|
|
|
24
|
-
export default class Box extends SvelteComponent<BoxProps
|
|
21
|
+
export default class Box extends SvelteComponent<BoxProps> {}
|
package/dist/Flex/Flex.svelte
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script>import { loadYoga } from 'yoga-layout';
|
|
1
|
+
<script lang="ts">import { loadYoga } from 'yoga-layout/load';
|
|
2
2
|
import InnerFlex from './InnerFlex.svelte';
|
|
3
|
-
let { ...props } = $props();
|
|
3
|
+
let { children: innerChildren, ...props } = $props();
|
|
4
4
|
let yoga = $state(undefined);
|
|
5
5
|
const initialize = async () => {
|
|
6
6
|
yoga = await loadYoga();
|
|
@@ -12,14 +12,9 @@ initialize();
|
|
|
12
12
|
<InnerFlex
|
|
13
13
|
{yoga}
|
|
14
14
|
{...props}
|
|
15
|
-
let:reflow
|
|
16
|
-
let:width
|
|
17
|
-
let:height
|
|
18
15
|
>
|
|
19
|
-
|
|
20
|
-
{reflow}
|
|
21
|
-
|
|
22
|
-
{height}
|
|
23
|
-
/>
|
|
16
|
+
{#snippet children({ reflow, width, height })}
|
|
17
|
+
{@render innerChildren?.({ reflow, width, height })}
|
|
18
|
+
{/snippet}
|
|
24
19
|
</InnerFlex>
|
|
25
20
|
{/if}
|
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
import { SvelteComponent } from 'svelte'
|
|
2
|
-
import type {
|
|
2
|
+
import type { ComponentProps } from 'svelte'
|
|
3
3
|
import type InnerFlex from './InnerFlex.svelte'
|
|
4
4
|
|
|
5
5
|
type FlexProps = Omit<ComponentProps<InnerFlex>, 'yoga'>
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
// Currently, there's no svelte helper to get the slots of a component.
|
|
10
|
-
type FlexSlots = {
|
|
11
|
-
default: {
|
|
12
|
-
reflow: () => void
|
|
13
|
-
width: number
|
|
14
|
-
height: number
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export default class Flex extends SvelteComponent<FlexProps, FlexEvents, FlexSlots> {}
|
|
7
|
+
export default class Flex extends SvelteComponent<FlexProps> {}
|
|
@@ -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';
|
|
@@ -10,7 +10,7 @@ import { applyNodeProps } from '../lib/props';
|
|
|
10
10
|
import { propsChanged } from '../lib/propsChanged';
|
|
11
11
|
import { createNodeContext } from '../nodes/context';
|
|
12
12
|
import { createFlexContext } from './context';
|
|
13
|
-
let { yoga, width = 1, height = 1, plane = 'xy', direction = 'LTR', scaleFactor = 1000, classParser, class: _class = '', reflowStage, ref = $bindable(), ...props } = $props();
|
|
13
|
+
let { yoga, width = 1, height = 1, plane = 'xy', direction = 'LTR', scaleFactor = 1000, classParser, class: _class = '', reflowStage, ref = $bindable(), onreflow, children, ...props } = $props();
|
|
14
14
|
$inspect(yoga);
|
|
15
15
|
ref = new Group();
|
|
16
16
|
ref.userData.isNode = true;
|
|
@@ -21,7 +21,7 @@ const vec3 = new Vector3();
|
|
|
21
21
|
*/
|
|
22
22
|
const { width: computedWidth, height: computedHeight } = createUseDimensionsContext();
|
|
23
23
|
/**
|
|
24
|
-
* Reflowing inside
|
|
24
|
+
* Reflowing inside useTask automatically batches reflows to 1 per frame.
|
|
25
25
|
*/
|
|
26
26
|
const { start: reflow, stop } = useTask(Symbol('threlte-flex-reflow'), () => {
|
|
27
27
|
flexContext.emit('reflow:before');
|
|
@@ -68,7 +68,7 @@ const { start: reflow, stop } = useTask(Symbol('threlte-flex-reflow'), () => {
|
|
|
68
68
|
flexContext.emit('reflow:after');
|
|
69
69
|
computedWidth.set((maxX - minX) / scaleFactor);
|
|
70
70
|
computedHeight.set((maxY - minY) / scaleFactor);
|
|
71
|
-
|
|
71
|
+
onreflow?.({
|
|
72
72
|
width: computedWidth.current,
|
|
73
73
|
height: computedHeight.current
|
|
74
74
|
});
|
|
@@ -151,9 +151,9 @@ onDestroy(() => {
|
|
|
151
151
|
</script>
|
|
152
152
|
|
|
153
153
|
<T is={ref}>
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
width
|
|
157
|
-
height
|
|
158
|
-
|
|
154
|
+
{@render children?.({
|
|
155
|
+
reflow,
|
|
156
|
+
width: $computedWidth,
|
|
157
|
+
height: $computedHeight
|
|
158
|
+
})}
|
|
159
159
|
</T>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Stage } from '@threlte/core'
|
|
2
|
-
import { SvelteComponent } from 'svelte'
|
|
2
|
+
import { SvelteComponent, type Snippet } from 'svelte'
|
|
3
3
|
import type { Direction, Yoga } from 'yoga-layout'
|
|
4
4
|
import type { ClassParser, FlexPlane, NodeProps } from '../lib/props'
|
|
5
|
+
import type { Group } from 'three'
|
|
5
6
|
|
|
6
7
|
type InnerFlexProps = NodeProps & {
|
|
7
8
|
yoga: Yoga
|
|
@@ -13,25 +14,19 @@ type InnerFlexProps = NodeProps & {
|
|
|
13
14
|
class?: string
|
|
14
15
|
classParser?: ClassParser
|
|
15
16
|
reflowStage?: Stage
|
|
16
|
-
|
|
17
|
+
ref?: Group
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
children?: Snippet<
|
|
20
|
+
[
|
|
21
|
+
{
|
|
22
|
+
reflow: () => void
|
|
23
|
+
width: number
|
|
24
|
+
height: number
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
>
|
|
24
28
|
|
|
25
|
-
|
|
26
|
-
default: {
|
|
27
|
-
reflow: () => void
|
|
28
|
-
width: number
|
|
29
|
-
height: number
|
|
30
|
-
}
|
|
29
|
+
onreflow?: (event: { width: number; height: number }) => void
|
|
31
30
|
}
|
|
32
31
|
|
|
33
|
-
export default class InnerFlex extends SvelteComponent<
|
|
34
|
-
InnerFlexProps,
|
|
35
|
-
InnerFlexEvents,
|
|
36
|
-
InnerFlexSlots
|
|
37
|
-
> {}
|
|
32
|
+
export default class InnerFlex extends SvelteComponent<InnerFlexProps> {}
|
package/dist/Flex/context.d.ts
CHANGED
package/dist/lib/props.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Align, FlexDirection, Justify, Node, Wrap } from 'yoga-layout';
|
|
2
|
+
import * as Yoga from 'yoga-layout';
|
|
2
3
|
export type FlexPlane = 'xy' | 'yz' | 'xz';
|
|
3
4
|
export type ClassParser = (className: string, props: NodeProps) => NodeProps;
|
|
4
5
|
export type Axis = 'x' | 'y' | 'z';
|
|
@@ -10,41 +11,50 @@ export type Axis = 'x' | 'y' | 'z';
|
|
|
10
11
|
* prevent unnecessary reflows.
|
|
11
12
|
*/
|
|
12
13
|
export declare const propSetter: {
|
|
13
|
-
alignItems: (align: keyof typeof Align, node: Node) =>
|
|
14
|
-
alignSelf: (align: keyof typeof Align, node: Node) =>
|
|
15
|
-
alignContent: (align: keyof typeof Align, node: Node) =>
|
|
16
|
-
justifyContent: (justify: keyof typeof Justify, node: Node) =>
|
|
17
|
-
flexDirection: (dir: keyof typeof FlexDirection, node: Node) =>
|
|
18
|
-
flexWrap: (wrap: keyof typeof Wrap, node: Node) =>
|
|
19
|
-
flex: (flex: Parameters<Node['setFlex']>[0], node: Node) =>
|
|
20
|
-
flexBasis: (basis: Parameters<Node['setFlexBasis']>[0], node: Node) =>
|
|
21
|
-
flexGrow: (grow: Parameters<Node['setFlexGrow']>[0], node: Node) =>
|
|
22
|
-
flexShrink: (shrink: Parameters<Node['setFlexShrink']>[0], node: Node) =>
|
|
23
|
-
height: (height: Parameters<Node['setHeight']>[0], node: Node) =>
|
|
24
|
-
width: (width: Parameters<Node['setWidth']>[0], node: Node) =>
|
|
25
|
-
maxHeight: (maxHeight: Parameters<Node['setMaxHeight']>[0], node: Node) =>
|
|
26
|
-
maxWidth: (maxWidth: Parameters<Node['setMaxWidth']>[0], node: Node) =>
|
|
27
|
-
minHeight: (minHeight: Parameters<Node['setMinHeight']>[0], node: Node) =>
|
|
28
|
-
minWidth: (minWidth: Parameters<Node['setMinWidth']>[0], node: Node) =>
|
|
14
|
+
alignItems: (align: keyof typeof Align, node: Node) => void;
|
|
15
|
+
alignSelf: (align: keyof typeof Align, node: Node) => void;
|
|
16
|
+
alignContent: (align: keyof typeof Align, node: Node) => void;
|
|
17
|
+
justifyContent: (justify: keyof typeof Justify, node: Node) => void;
|
|
18
|
+
flexDirection: (dir: keyof typeof FlexDirection, node: Node) => void;
|
|
19
|
+
flexWrap: (wrap: keyof typeof Wrap, node: Node) => void;
|
|
20
|
+
flex: (flex: Parameters<Node['setFlex']>[0], node: Node) => void;
|
|
21
|
+
flexBasis: (basis: Parameters<Node['setFlexBasis']>[0], node: Node) => void;
|
|
22
|
+
flexGrow: (grow: Parameters<Node['setFlexGrow']>[0], node: Node) => void;
|
|
23
|
+
flexShrink: (shrink: Parameters<Node['setFlexShrink']>[0], node: Node) => void;
|
|
24
|
+
height: (height: Parameters<Node['setHeight']>[0], node: Node) => void;
|
|
25
|
+
width: (width: Parameters<Node['setWidth']>[0], node: Node) => void;
|
|
26
|
+
maxHeight: (maxHeight: Parameters<Node['setMaxHeight']>[0], node: Node) => void;
|
|
27
|
+
maxWidth: (maxWidth: Parameters<Node['setMaxWidth']>[0], node: Node) => void;
|
|
28
|
+
minHeight: (minHeight: Parameters<Node['setMinHeight']>[0], node: Node) => void;
|
|
29
|
+
minWidth: (minWidth: Parameters<Node['setMinWidth']>[0], node: Node) => void;
|
|
29
30
|
/** As of now, this won't work since the bounding box is still computed by nodes marked as absolutely positioned */
|
|
30
|
-
top: (top: Parameters<Node['setPosition']>[1], node: Node) =>
|
|
31
|
-
right: (right: Parameters<Node['setPosition']>[1], node: Node) =>
|
|
32
|
-
bottom: (bottom: Parameters<Node['setPosition']>[1], node: Node) =>
|
|
33
|
-
left: (left: Parameters<Node['setPosition']>[1], node: Node) =>
|
|
34
|
-
padding: (padding: Parameters<Node['setPadding']>[1], node: Node) =>
|
|
35
|
-
paddingTop: (paddingTop: Parameters<Node['setPadding']>[1], node: Node) =>
|
|
36
|
-
paddingRight: (paddingRight: Parameters<Node['setPadding']>[1], node: Node) =>
|
|
37
|
-
paddingBottom: (paddingBottom: Parameters<Node['setPadding']>[1], node: Node) =>
|
|
38
|
-
paddingLeft: (paddingLeft: Parameters<Node['setPadding']>[1], node: Node) =>
|
|
39
|
-
margin: (margin: Parameters<Node['setMargin']>[1], node: Node) =>
|
|
40
|
-
marginTop: (marginTop: Parameters<Node['setMargin']>[1], node: Node) =>
|
|
41
|
-
marginRight: (marginRight: Parameters<Node['setMargin']>[1], node: Node) =>
|
|
42
|
-
marginBottom: (marginBottom: Parameters<Node['setMargin']>[1], node: Node) =>
|
|
43
|
-
marginLeft: (marginLeft: Parameters<Node['setMargin']>[1], node: Node) =>
|
|
44
|
-
gap: (gap: Parameters<Node['setGap']>[1], node: Node) =>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
31
|
+
top: (top: Parameters<Node['setPosition']>[1], node: Node) => void;
|
|
32
|
+
right: (right: Parameters<Node['setPosition']>[1], node: Node) => void;
|
|
33
|
+
bottom: (bottom: Parameters<Node['setPosition']>[1], node: Node) => void;
|
|
34
|
+
left: (left: Parameters<Node['setPosition']>[1], node: Node) => void;
|
|
35
|
+
padding: (padding: Parameters<Node['setPadding']>[1], node: Node) => void;
|
|
36
|
+
paddingTop: (paddingTop: Parameters<Node['setPadding']>[1], node: Node) => void;
|
|
37
|
+
paddingRight: (paddingRight: Parameters<Node['setPadding']>[1], node: Node) => void;
|
|
38
|
+
paddingBottom: (paddingBottom: Parameters<Node['setPadding']>[1], node: Node) => void;
|
|
39
|
+
paddingLeft: (paddingLeft: Parameters<Node['setPadding']>[1], node: Node) => void;
|
|
40
|
+
margin: (margin: Parameters<Node['setMargin']>[1], node: Node) => void;
|
|
41
|
+
marginTop: (marginTop: Parameters<Node['setMargin']>[1], node: Node) => void;
|
|
42
|
+
marginRight: (marginRight: Parameters<Node['setMargin']>[1], node: Node) => void;
|
|
43
|
+
marginBottom: (marginBottom: Parameters<Node['setMargin']>[1], node: Node) => void;
|
|
44
|
+
marginLeft: (marginLeft: Parameters<Node['setMargin']>[1], node: Node) => void;
|
|
45
|
+
gap: (gap: Parameters<Node['setGap']>[1], node: Node) => {
|
|
46
|
+
unit: Yoga.Unit;
|
|
47
|
+
value: number;
|
|
48
|
+
};
|
|
49
|
+
gapColumn: (gapColumn: Parameters<Node['setGap']>[1], node: Node) => {
|
|
50
|
+
unit: Yoga.Unit;
|
|
51
|
+
value: number;
|
|
52
|
+
};
|
|
53
|
+
gapRow: (gapRow: Parameters<Node['setGap']>[1], node: Node) => {
|
|
54
|
+
unit: Yoga.Unit;
|
|
55
|
+
value: number;
|
|
56
|
+
};
|
|
57
|
+
aspectRatio: (aspectRatio: Parameters<Node['setAspectRatio']>[0], node: Node) => void;
|
|
48
58
|
};
|
|
49
59
|
export type NodeProps = {
|
|
50
60
|
[Key in keyof typeof propSetter]?: Parameters<(typeof propSetter)[Key]>[0];
|
package/package.json
CHANGED
|
@@ -1,45 +1,63 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@threlte/flex",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.10",
|
|
4
4
|
"author": "Grischa Erbe <hello@legrisch.com> (https://legrisch.com)",
|
|
5
5
|
"license": "MIT",
|
|
6
|
+
"description": "Components to easily use the flexbox spec with Threlte",
|
|
6
7
|
"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.
|
|
8
|
+
"@sveltejs/adapter-auto": "^3.2.0",
|
|
9
|
+
"@sveltejs/kit": "^2.7.2",
|
|
10
|
+
"@sveltejs/package": "^2.3.7",
|
|
11
|
+
"@sveltejs/vite-plugin-svelte": "^3.1.0",
|
|
12
|
+
"@types/node": "^20.12.7",
|
|
13
|
+
"@types/three": "^0.169.0",
|
|
14
|
+
"@typescript-eslint/eslint-plugin": "^7.6.0",
|
|
15
|
+
"@typescript-eslint/parser": "^7.6.0",
|
|
15
16
|
"@yushijinhun/three-minifier-rollup": "^0.4.0",
|
|
16
|
-
"eslint": "^
|
|
17
|
+
"eslint": "^9.0.0",
|
|
17
18
|
"eslint-config-prettier": "^9.1.0",
|
|
18
|
-
"eslint-plugin-svelte": "^2.
|
|
19
|
-
"prettier": "^3.2.
|
|
20
|
-
"prettier-plugin-svelte": "^3.
|
|
19
|
+
"eslint-plugin-svelte": "^2.36.0",
|
|
20
|
+
"prettier": "^3.2.5",
|
|
21
|
+
"prettier-plugin-svelte": "^3.2.2",
|
|
21
22
|
"publint": "^0.2.7",
|
|
22
23
|
"rimraf": "^5.0.5",
|
|
23
|
-
"svelte": "^
|
|
24
|
-
"svelte-check": "^3.6.
|
|
24
|
+
"svelte": "^5.1.6",
|
|
25
|
+
"svelte-check": "^3.6.9",
|
|
25
26
|
"svelte-preprocess": "^5.1.3",
|
|
26
|
-
"svelte2tsx": "^0.7.
|
|
27
|
-
"three": "^0.
|
|
27
|
+
"svelte2tsx": "^0.7.6",
|
|
28
|
+
"three": "^0.169.0",
|
|
28
29
|
"tslib": "^2.6.2",
|
|
29
|
-
"typescript": "^5.
|
|
30
|
-
"vite": "^5.
|
|
31
|
-
"@threlte/core": "8.0.0-next.
|
|
32
|
-
"@threlte/extras": "9.0.0-next.
|
|
30
|
+
"typescript": "^5.4.5",
|
|
31
|
+
"vite": "^5.2.8",
|
|
32
|
+
"@threlte/core": "8.0.0-next.23",
|
|
33
|
+
"@threlte/extras": "9.0.0-next.32"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
36
|
"mitt": "^3.0.1",
|
|
36
|
-
"yoga-layout": "^
|
|
37
|
+
"yoga-layout": "^3.1.0"
|
|
37
38
|
},
|
|
38
39
|
"peerDependencies": {
|
|
39
|
-
"svelte": ">=
|
|
40
|
-
"three": ">=0.
|
|
40
|
+
"svelte": ">=5",
|
|
41
|
+
"three": ">=0.155"
|
|
41
42
|
},
|
|
42
43
|
"type": "module",
|
|
44
|
+
"keywords": [
|
|
45
|
+
"flex",
|
|
46
|
+
"threlte",
|
|
47
|
+
"svelte",
|
|
48
|
+
"three",
|
|
49
|
+
"three.js",
|
|
50
|
+
"3d"
|
|
51
|
+
],
|
|
52
|
+
"homepage": "https://threlte.xyz",
|
|
53
|
+
"repository": {
|
|
54
|
+
"type": "git",
|
|
55
|
+
"url": "https://github.com/threlte/threlte.git",
|
|
56
|
+
"directory": "packages/flex"
|
|
57
|
+
},
|
|
58
|
+
"bugs": {
|
|
59
|
+
"url": "https://github.com/threlte/threlte/issues"
|
|
60
|
+
},
|
|
43
61
|
"exports": {
|
|
44
62
|
".": {
|
|
45
63
|
"types": "./dist/index.d.ts",
|
|
@@ -56,8 +74,8 @@
|
|
|
56
74
|
"package": "svelte-kit sync && svelte-package && node ./scripts/cleanupPackage.js && publint",
|
|
57
75
|
"check": "svelte-check --tsconfig ./tsconfig.json",
|
|
58
76
|
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
|
|
59
|
-
"lint": "prettier --check
|
|
60
|
-
"format": "prettier --write
|
|
77
|
+
"lint": "prettier --check .",
|
|
78
|
+
"format": "prettier --write .",
|
|
61
79
|
"cleanup": "rimraf node_modules .svelte-kit dist"
|
|
62
80
|
}
|
|
63
81
|
}
|