@threlte/flex 0.0.3 → 0.0.4
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.d.ts
CHANGED
|
@@ -1,62 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
node?: any;
|
|
8
|
-
alignItems?: string | number | symbol | undefined;
|
|
9
|
-
alignSelf?: string | number | symbol | undefined;
|
|
10
|
-
alignContent?: string | number | symbol | undefined;
|
|
11
|
-
justifyContent?: string | number | symbol | undefined;
|
|
12
|
-
flexDirection?: string | number | symbol | undefined;
|
|
13
|
-
flexWrap?: string | number | symbol | undefined;
|
|
14
|
-
flex?: unknown;
|
|
15
|
-
flexBasis?: unknown;
|
|
16
|
-
flexGrow?: unknown;
|
|
17
|
-
flexShrink?: unknown;
|
|
18
|
-
height?: unknown;
|
|
19
|
-
width?: unknown;
|
|
20
|
-
maxHeight?: unknown;
|
|
21
|
-
maxWidth?: unknown;
|
|
22
|
-
minHeight?: unknown;
|
|
23
|
-
minWidth?: unknown;
|
|
24
|
-
top?: unknown;
|
|
25
|
-
right?: unknown;
|
|
26
|
-
bottom?: unknown;
|
|
27
|
-
left?: unknown;
|
|
28
|
-
padding?: unknown;
|
|
29
|
-
paddingTop?: unknown;
|
|
30
|
-
paddingRight?: unknown;
|
|
31
|
-
paddingBottom?: unknown;
|
|
32
|
-
paddingLeft?: unknown;
|
|
33
|
-
margin?: unknown;
|
|
34
|
-
marginTop?: unknown;
|
|
35
|
-
marginRight?: unknown;
|
|
36
|
-
marginBottom?: unknown;
|
|
37
|
-
marginLeft?: unknown;
|
|
38
|
-
gap?: unknown;
|
|
39
|
-
gapColumn?: unknown;
|
|
40
|
-
gapRow?: unknown;
|
|
41
|
-
aspectRatio?: unknown;
|
|
42
|
-
order?: number | undefined;
|
|
43
|
-
class?: string | undefined;
|
|
44
|
-
};
|
|
45
|
-
events: {
|
|
46
|
-
[evt: string]: CustomEvent<any>;
|
|
47
|
-
};
|
|
48
|
-
slots: {
|
|
49
|
-
default: {
|
|
50
|
-
width: number;
|
|
51
|
-
height: number;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
export type BoxProps = typeof __propDef.props;
|
|
56
|
-
export type BoxEvents = typeof __propDef.events;
|
|
57
|
-
export type BoxSlots = typeof __propDef.slots;
|
|
58
|
-
export default class Box extends SvelteComponentTyped<BoxProps, BoxEvents, BoxSlots> {
|
|
59
|
-
get group(): Group;
|
|
60
|
-
get contentGroup(): Group;
|
|
1
|
+
import { SvelteComponent } from 'svelte'
|
|
2
|
+
import type { NodeProps } from '../lib/props'
|
|
3
|
+
|
|
4
|
+
type BoxProps = NodeProps & {
|
|
5
|
+
order?: number
|
|
6
|
+
class?: string
|
|
61
7
|
}
|
|
62
|
-
|
|
8
|
+
|
|
9
|
+
type BoxEvents = {}
|
|
10
|
+
|
|
11
|
+
type BoxSlots = {
|
|
12
|
+
default: {
|
|
13
|
+
width: number
|
|
14
|
+
height: number
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default class Box extends SvelteComponent<BoxProps, BoxEvents, BoxSlots> {}
|
package/dist/Flex/Flex.svelte
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>import { forwardEventHandlers } from '@threlte/core';
|
|
2
2
|
import { loadYoga } from 'yoga-layout';
|
|
3
|
-
import InnerFlex from './
|
|
3
|
+
import InnerFlex from './Innerflex.svelte';
|
|
4
4
|
let yoga;
|
|
5
5
|
const initialize = async () => {
|
|
6
6
|
yoga = await loadYoga();
|
|
@@ -1,61 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
direction?: string | number | symbol | undefined;
|
|
15
|
-
flexBasis?: unknown;
|
|
16
|
-
flexDirection?: string | number | symbol | undefined;
|
|
17
|
-
flexGrow?: unknown;
|
|
18
|
-
flexShrink?: unknown;
|
|
19
|
-
flexWrap?: string | number | symbol | undefined;
|
|
20
|
-
gap?: unknown;
|
|
21
|
-
justifyContent?: string | number | symbol | undefined;
|
|
22
|
-
margin?: unknown;
|
|
23
|
-
marginBottom?: unknown;
|
|
24
|
-
marginLeft?: unknown;
|
|
25
|
-
marginRight?: unknown;
|
|
26
|
-
marginTop?: unknown;
|
|
27
|
-
maxHeight?: unknown;
|
|
28
|
-
maxWidth?: unknown;
|
|
29
|
-
minHeight?: unknown;
|
|
30
|
-
minWidth?: unknown;
|
|
31
|
-
padding?: unknown;
|
|
32
|
-
paddingBottom?: unknown;
|
|
33
|
-
paddingLeft?: unknown;
|
|
34
|
-
paddingRight?: unknown;
|
|
35
|
-
paddingTop?: unknown;
|
|
36
|
-
right?: unknown;
|
|
37
|
-
class?: string | undefined;
|
|
38
|
-
plane?: import("../lib/props").FlexPlane | undefined;
|
|
39
|
-
gapColumn?: unknown;
|
|
40
|
-
gapRow?: unknown;
|
|
41
|
-
scaleFactor?: number | undefined;
|
|
42
|
-
classParser?: import("../lib/props").ClassParser | undefined;
|
|
43
|
-
};
|
|
44
|
-
slots: {
|
|
45
|
-
default: {
|
|
46
|
-
reflow: () => void;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
events: {
|
|
50
|
-
reflow: {
|
|
51
|
-
width: number;
|
|
52
|
-
height: number;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
export type FlexProps = typeof __propDef.props;
|
|
57
|
-
export type FlexEvents = typeof __propDef.events;
|
|
58
|
-
export type FlexSlots = typeof __propDef.slots;
|
|
59
|
-
export default class Flex extends SvelteComponentTyped<FlexProps, FlexEvents, FlexSlots> {
|
|
1
|
+
import { SvelteComponent } from 'svelte'
|
|
2
|
+
import type { ComponentEvents, ComponentProps } from 'svelte'
|
|
3
|
+
import type InnerFlex from './InnerFlex.svelte'
|
|
4
|
+
|
|
5
|
+
type FlexProps = Omit<ComponentProps<InnerFlex>, 'yoga'>
|
|
6
|
+
|
|
7
|
+
type FlexEvents = ComponentEvents<InnerFlex>
|
|
8
|
+
|
|
9
|
+
// Currently, there's no svelte helper to get the slots of a component.
|
|
10
|
+
type FlexSlots = {
|
|
11
|
+
default: {
|
|
12
|
+
reflow: () => void
|
|
13
|
+
}
|
|
60
14
|
}
|
|
61
|
-
|
|
15
|
+
|
|
16
|
+
export default class Flex extends SvelteComponent<FlexProps, FlexEvents, FlexSlots> {}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { InnerFlexEvents, InnerFlexProps, InnerFlexSlots } from './Innerflex.svelte';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
alignItems?: string | number | symbol | undefined;
|
|
@@ -37,27 +37,20 @@ declare const __propDef: {
|
|
|
37
37
|
gapRow?: unknown;
|
|
38
38
|
aspectRatio?: unknown;
|
|
39
39
|
yoga: Yoga;
|
|
40
|
-
plane?: FlexPlane | undefined;
|
|
40
|
+
plane?: import("../lib/props").FlexPlane | undefined;
|
|
41
41
|
direction?: string | number | symbol | undefined;
|
|
42
42
|
scaleFactor?: number | undefined;
|
|
43
43
|
class?: string | undefined;
|
|
44
|
-
classParser?: ClassParser | undefined;
|
|
45
|
-
};
|
|
46
|
-
slots: {
|
|
47
|
-
default: {
|
|
48
|
-
reflow: () => void;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
events: {
|
|
52
|
-
reflow: {
|
|
53
|
-
width: number;
|
|
54
|
-
height: number;
|
|
55
|
-
};
|
|
44
|
+
classParser?: import("../lib/props").ClassParser | undefined;
|
|
56
45
|
};
|
|
46
|
+
slots: InnerFlexSlots;
|
|
47
|
+
events: InnerFlexEvents;
|
|
57
48
|
};
|
|
58
|
-
|
|
59
|
-
export
|
|
60
|
-
|
|
61
|
-
export
|
|
49
|
+
type InnerFlexProps_ = typeof __propDef.props;
|
|
50
|
+
export { InnerFlexProps_ as InnerFlexProps };
|
|
51
|
+
type InnerFlexEvents_ = typeof __propDef.events;
|
|
52
|
+
export { InnerFlexEvents_ as InnerFlexEvents };
|
|
53
|
+
type InnerFlexSlots_ = typeof __propDef.slots;
|
|
54
|
+
export { InnerFlexSlots_ as InnerFlexSlots };
|
|
55
|
+
export default class InnerFlex extends SvelteComponent<InnerFlexProps, InnerFlexEvents, InnerFlexSlots> {
|
|
62
56
|
}
|
|
63
|
-
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SvelteComponent } from 'svelte'
|
|
2
|
+
import type { Direction, Yoga } from 'yoga-layout'
|
|
3
|
+
import type { NodeProps } from '../lib/props'
|
|
4
|
+
import type { ClassParser, FlexPlane } from '../lib/props'
|
|
5
|
+
|
|
6
|
+
type InnerFlexProps = NodeProps & {
|
|
7
|
+
yoga: Yoga
|
|
8
|
+
width?: number
|
|
9
|
+
height?: number
|
|
10
|
+
plane?: FlexPlane
|
|
11
|
+
direction?: keyof typeof Direction
|
|
12
|
+
scaleFactor?: number
|
|
13
|
+
class?: string
|
|
14
|
+
classParser?: ClassParser
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
type InnerFlexEvents = {
|
|
18
|
+
reflow: {
|
|
19
|
+
width: number
|
|
20
|
+
height: number
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type InnerFlexSlots = {
|
|
25
|
+
default: {
|
|
26
|
+
reflow: () => void
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export default class InnerFlex extends SvelteComponent<
|
|
31
|
+
InnerFlexProps,
|
|
32
|
+
InnerFlexEvents,
|
|
33
|
+
InnerFlexSlots
|
|
34
|
+
> {}
|