@danielito1996/compose-svelted 0.2.7-alpha04 → 0.2.8-alpha01
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/README.md +44 -41
- package/dist/components/AppRoot.svelte +26 -11
- package/dist/components/Surface.svelte +29 -19
- package/dist/components/Text.svelte +37 -23
- package/dist/components/buttons/Button.svelte +66 -34
- package/dist/components/buttons/CheckButton.svelte +2 -2
- package/dist/components/layouts/Alignment.d.ts +40 -18
- package/dist/components/layouts/Alignment.js +40 -18
- package/dist/components/layouts/Arrangement.d.ts +27 -11
- package/dist/components/layouts/Arrangement.js +34 -41
- package/dist/components/layouts/Box.svelte +54 -47
- package/dist/components/layouts/Box.svelte.d.ts +19 -3
- package/dist/components/layouts/Column.svelte +52 -46
- package/dist/components/layouts/Column.svelte.d.ts +10 -2
- package/dist/components/layouts/Row.svelte +52 -46
- package/dist/components/layouts/Row.svelte.d.ts +10 -2
- package/dist/components/layouts/Scaffold.svelte +86 -53
- package/dist/components/layouts/Scaffold.svelte.d.ts +5 -2
- package/dist/components/layouts/resolveAlignment.d.ts +25 -4
- package/dist/components/layouts/resolveAlignment.js +46 -42
- package/dist/components/layouts/resolveFlexAlignSelf.d.ts +5 -1
- package/dist/components/layouts/resolveFlexAlignSelf.js +6 -8
- package/dist/components/motion/motion/AnimatedContent.svelte +41 -0
- package/dist/components/motion/{AnimatedContent.svelte.d.ts → motion/AnimatedContent.svelte.d.ts} +1 -1
- package/dist/components/motion/{AnimatedVisibility.svelte → motion/AnimatedVisibility.svelte} +3 -3
- package/dist/components/motion/{AnimatedVisibility.svelte.d.ts → motion/AnimatedVisibility.svelte.d.ts} +1 -1
- package/dist/components/motion/motion/AnimationSpec.d.ts +6 -0
- package/dist/components/motion/motion/AnimationSpec.js +1 -0
- package/dist/components/motion/motion/ContentTransition.d.ts +5 -0
- package/dist/components/motion/motion/ContentTransition.js +1 -0
- package/dist/components/motion/motion/applyAnimation.d.ts +0 -0
- package/dist/components/motion/motion/applyAnimation.js +0 -0
- package/dist/components/motion/motion/contentTransitions.d.ts +4 -0
- package/dist/components/motion/motion/contentTransitions.js +22 -0
- package/dist/components/motion/motion/transitions.d.ts +7 -0
- package/dist/components/motion/motion/transitions.js +70 -0
- package/dist/components/textFields/BaseTextField.svelte +4 -3
- package/dist/components/textFields/BaseTextField.svelte.d.ts +1 -0
- package/dist/components/textFields/OutlinedTextField.svelte +8 -7
- package/dist/components/textFields/TextField.svelte +8 -8
- package/dist/core/modifier/Modifier.d.ts +11 -171
- package/dist/core/modifier/Modifier.js +8 -170
- package/dist/core/modifier/ModifierImpl.d.ts +24 -6
- package/dist/core/modifier/ModifierImpl.js +96 -47
- package/dist/core/motion/AnimationSpec.d.ts +1 -6
- package/dist/core/motion/ContentTransition.d.ts +1 -5
- package/dist/core/motion/applyAnimation.d.ts +2 -0
- package/dist/core/motion/applyAnimation.js +3 -0
- package/dist/core/motion/contentTransitions.d.ts +1 -4
- package/dist/core/motion/contentTransitions.js +1 -22
- package/dist/core/motion/transitions.d.ts +1 -7
- package/dist/core/motion/transitions.js +1 -70
- package/dist/core/navigation/NavHost.svelte +46 -45
- package/dist/core/styles/baseline-safe.css +34 -0
- package/dist/core/styles/baseline.css +44 -48
- package/dist/core/theme/ColorScheme.d.ts +2 -0
- package/dist/core/theme/ColorScheme.js +2 -0
- package/dist/core/theme/ComposeTheme.svelte +36 -21
- package/dist/core/theme/colors.d.ts +2 -0
- package/dist/core/theme/defaults/darkColors.js +2 -0
- package/dist/core/theme/defaults/lightColors.js +2 -0
- package/dist/index.d.ts +48 -129
- package/dist/index.js +7 -3
- package/package.json +73 -59
- package/dist/components/motion/AnimatedContent.svelte +0 -34
package/package.json
CHANGED
|
@@ -1,59 +1,73 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@danielito1996/compose-svelted",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "Compose-like UI toolkit for Svelte, inspired by Jetpack Compose",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"author": "Daniel Imbert Tabares",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "https://github.com/danielitoCode/compose_svelted"
|
|
11
|
-
},
|
|
12
|
-
"homepage": "https://github.com/danielitoCode/compose_svelted#readme",
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://github.com/danielitoCode/compose_svelted/issues"
|
|
15
|
-
},
|
|
16
|
-
"exports": {
|
|
17
|
-
".": {
|
|
18
|
-
"types": "./dist/index.d.ts",
|
|
19
|
-
"import": "./dist/index.js",
|
|
20
|
-
"svelte": "./dist/index.js"
|
|
21
|
-
},
|
|
22
|
-
"./baseline.css": "./dist/core/styles/baseline.css"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"svelte
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@danielito1996/compose-svelted",
|
|
3
|
+
"version": "0.2.8-alpha01",
|
|
4
|
+
"description": "Compose-like UI toolkit for Svelte, inspired by Jetpack Compose",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"author": "Daniel Imbert Tabares",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/danielitoCode/compose_svelted"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/danielitoCode/compose_svelted#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/danielitoCode/compose_svelted/issues"
|
|
15
|
+
},
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"import": "./dist/index.js",
|
|
20
|
+
"svelte": "./dist/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./baseline.css": "./dist/core/styles/baseline.css",
|
|
23
|
+
"./baseline-safe.css": "./dist/core/styles/baseline-safe.css"
|
|
24
|
+
},
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"access": "public"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist"
|
|
30
|
+
],
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"svelte": "^5.0.0"
|
|
33
|
+
},
|
|
34
|
+
"sideEffects": [
|
|
35
|
+
"**/*.css"
|
|
36
|
+
],
|
|
37
|
+
"workspaces": [
|
|
38
|
+
"playground"
|
|
39
|
+
],
|
|
40
|
+
"scripts": {
|
|
41
|
+
"dev": "npm run playground:dev",
|
|
42
|
+
"build": "npm run package",
|
|
43
|
+
"check": "svelte-check --tsconfig ./playground/tsconfig.app.json && tsc -p ./playground/tsconfig.node.json",
|
|
44
|
+
"package": "svelte-package",
|
|
45
|
+
"prepublishOnly": "npm run package",
|
|
46
|
+
|
|
47
|
+
"dev:playground": "npm --prefix playground run dev",
|
|
48
|
+
"playground:dev": "npm --prefix playground run dev",
|
|
49
|
+
"playground:build": "npm --prefix playground run build",
|
|
50
|
+
"playground:check": "npm run check"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@tsconfig/svelte": "^5.0.5",
|
|
54
|
+
"@sveltejs/package": "^2.3.1",
|
|
55
|
+
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
56
|
+
"@types/node": "^24.10.1",
|
|
57
|
+
"svelte": "^5.43.8",
|
|
58
|
+
"svelte-check": "^4.3.4",
|
|
59
|
+
"typescript": "~5.9.3",
|
|
60
|
+
"vite": "npm:rolldown-vite@7.2.5"
|
|
61
|
+
},
|
|
62
|
+
"overrides": {
|
|
63
|
+
"vite": "npm:rolldown-vite@7.2.5"
|
|
64
|
+
},
|
|
65
|
+
"keywords": [
|
|
66
|
+
"svelte",
|
|
67
|
+
"svelte-components",
|
|
68
|
+
"ui",
|
|
69
|
+
"compose",
|
|
70
|
+
"jetpack-compose",
|
|
71
|
+
"design-system"
|
|
72
|
+
]
|
|
73
|
+
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { ContentTransition } from "../../core/motion/ContentTransition";
|
|
3
|
-
import { fade } from "../../core/motion/contentTransitions";
|
|
4
|
-
|
|
5
|
-
export let targetState: any;
|
|
6
|
-
export let transition: ContentTransition = fade();
|
|
7
|
-
|
|
8
|
-
let currentKey = targetState;
|
|
9
|
-
let exiting = false;
|
|
10
|
-
|
|
11
|
-
let timeoutId: ReturnType<typeof setTimeout> | null = null;
|
|
12
|
-
|
|
13
|
-
$: if (targetState !== currentKey) {
|
|
14
|
-
exiting = true;
|
|
15
|
-
|
|
16
|
-
if (timeoutId) clearTimeout(timeoutId);
|
|
17
|
-
|
|
18
|
-
timeoutId = setTimeout(() => {
|
|
19
|
-
currentKey = targetState;
|
|
20
|
-
exiting = false;
|
|
21
|
-
timeoutId = null;
|
|
22
|
-
}, transition.duration);
|
|
23
|
-
}
|
|
24
|
-
</script>
|
|
25
|
-
|
|
26
|
-
<div class="relative w-full h-full overflow-hidden">
|
|
27
|
-
<div
|
|
28
|
-
class={`w-full h-full transition-all ${
|
|
29
|
-
exiting ? transition.exit : transition.enter
|
|
30
|
-
}`}
|
|
31
|
-
>
|
|
32
|
-
<slot />
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|