@humanspeak/svelte-motion 0.0.8 → 0.0.9

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.
Files changed (64) hide show
  1. package/README.md +0 -61
  2. package/dist/html/A.svelte +1 -3
  3. package/dist/html/Area.svelte +1 -1
  4. package/dist/html/Article.svelte +1 -3
  5. package/dist/html/Aside.svelte +1 -3
  6. package/dist/html/Base.svelte +1 -1
  7. package/dist/html/Blockquote.svelte +1 -3
  8. package/dist/html/Br.svelte +1 -1
  9. package/dist/html/Button.svelte +1 -3
  10. package/dist/html/Code.svelte +1 -3
  11. package/dist/html/Col.svelte +1 -1
  12. package/dist/html/Dd.svelte +1 -3
  13. package/dist/html/Div.svelte +1 -3
  14. package/dist/html/Dl.svelte +1 -3
  15. package/dist/html/Dt.svelte +1 -3
  16. package/dist/html/Embed.svelte +1 -1
  17. package/dist/html/Fieldset.svelte +1 -3
  18. package/dist/html/Figcaption.svelte +1 -3
  19. package/dist/html/Figure.svelte +1 -3
  20. package/dist/html/Footer.svelte +1 -3
  21. package/dist/html/Form.svelte +1 -3
  22. package/dist/html/H1.svelte +1 -3
  23. package/dist/html/H2.svelte +1 -3
  24. package/dist/html/H3.svelte +1 -3
  25. package/dist/html/H4.svelte +1 -3
  26. package/dist/html/H5.svelte +1 -3
  27. package/dist/html/H6.svelte +1 -3
  28. package/dist/html/Header.svelte +1 -3
  29. package/dist/html/Hr.svelte +1 -1
  30. package/dist/html/Img.svelte +1 -1
  31. package/dist/html/Input.svelte +1 -1
  32. package/dist/html/Label.svelte +1 -3
  33. package/dist/html/Legend.svelte +1 -3
  34. package/dist/html/Li.svelte +1 -3
  35. package/dist/html/Main.svelte +1 -3
  36. package/dist/html/Nav.svelte +1 -3
  37. package/dist/html/Ol.svelte +1 -3
  38. package/dist/html/Option.svelte +1 -3
  39. package/dist/html/P.svelte +1 -3
  40. package/dist/html/Param.svelte +1 -1
  41. package/dist/html/Pre.svelte +1 -3
  42. package/dist/html/Section.svelte +1 -3
  43. package/dist/html/Select.svelte +1 -3
  44. package/dist/html/Source.svelte +1 -1
  45. package/dist/html/Span.svelte +1 -3
  46. package/dist/html/Table.svelte +1 -3
  47. package/dist/html/Tbody.svelte +1 -3
  48. package/dist/html/Td.svelte +1 -3
  49. package/dist/html/Textarea.svelte +1 -3
  50. package/dist/html/Tfoot.svelte +1 -3
  51. package/dist/html/Th.svelte +1 -3
  52. package/dist/html/Thead.svelte +1 -3
  53. package/dist/html/Tr.svelte +1 -3
  54. package/dist/html/Track.svelte +1 -1
  55. package/dist/html/Ul.svelte +1 -3
  56. package/dist/html/Wbr.svelte +1 -1
  57. package/dist/html/_MotionContainer.svelte +2 -13
  58. package/dist/html/_MotionContainer.svelte.d.ts +2 -8
  59. package/dist/html/_template.template +1 -3
  60. package/dist/html/_template_void.template +1 -1
  61. package/dist/html/index.d.ts +57 -0
  62. package/dist/index.d.ts +1 -4
  63. package/dist/types.d.ts +10 -2
  64. package/package.json +1 -1
package/README.md CHANGED
@@ -79,67 +79,6 @@ Just a little wrapper for motion. I love their work! The typical this is a WIP,
79
79
  - `motion.track`
80
80
  - `motion.wbr`
81
81
 
82
- ### Regular Elements
83
-
84
- - `motion.a`
85
- - `motion.article`
86
- - `motion.aside`
87
- - `motion.blockquote`
88
- - `motion.button`
89
- - `motion.code`
90
- - `motion.dd`
91
- - `motion.div`
92
- - `motion.dl`
93
- - `motion.dt`
94
- - `motion.fieldset`
95
- - `motion.figcaption`
96
- - `motion.figure`
97
- - `motion.footer`
98
- - `motion.form`
99
- - `motion.h1`
100
- - `motion.h2`
101
- - `motion.h3`
102
- - `motion.h4`
103
- - `motion.h5`
104
- - `motion.h6`
105
- - `motion.header`
106
- - `motion.label`
107
- - `motion.legend`
108
- - `motion.li`
109
- - `motion.main`
110
- - `motion.nav`
111
- - `motion.ol`
112
- - `motion.option`
113
- - `motion.p`
114
- - `motion.pre`
115
- - `motion.section`
116
- - `motion.select`
117
- - `motion.span`
118
- - `motion.table`
119
- - `motion.tbody`
120
- - `motion.td`
121
- - `motion.textarea`
122
- - `motion.tfoot`
123
- - `motion.th`
124
- - `motion.thead`
125
- - `motion.tr`
126
- - `motion.ul`
127
-
128
- ### Void Elements
129
-
130
- - `motion.area`
131
- - `motion.base`
132
- - `motion.br`
133
- - `motion.col`
134
- - `motion.embed`
135
- - `motion.hr`
136
- - `motion.img`
137
- - `motion.input`
138
- - `motion.param`
139
- - `motion.source`
140
- - `motion.track`
141
- - `motion.wbr`
142
-
143
82
  ## External Dependencies
144
83
 
145
84
  This package carefully selects its dependencies to provide a robust and maintainable solution:
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="a" {...rest}>
@@ -2,7 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLVoidElementProps } from '../types.js'
4
4
 
5
- let { ...rest } = $props<HTMLVoidElementProps>()
5
+ let { ...rest }: HTMLVoidElementProps = $props()
6
6
  </script>
7
7
 
8
8
  <MotionContainer tag="area" {...rest} />
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="article" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="aside" {...rest}>
@@ -2,7 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLVoidElementProps } from '../types.js'
4
4
 
5
- let { ...rest } = $props<HTMLVoidElementProps>()
5
+ let { ...rest }: HTMLVoidElementProps = $props()
6
6
  </script>
7
7
 
8
8
  <MotionContainer tag="base" {...rest} />
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="blockquote" {...rest}>
@@ -2,7 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLVoidElementProps } from '../types.js'
4
4
 
5
- let { ...rest } = $props<HTMLVoidElementProps>()
5
+ let { ...rest }: HTMLVoidElementProps = $props()
6
6
  </script>
7
7
 
8
8
  <MotionContainer tag="br" {...rest} />
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="button" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="code" {...rest}>
@@ -2,7 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLVoidElementProps } from '../types.js'
4
4
 
5
- let { ...rest } = $props<HTMLVoidElementProps>()
5
+ let { ...rest }: HTMLVoidElementProps = $props()
6
6
  </script>
7
7
 
8
8
  <MotionContainer tag="col" {...rest} />
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="dd" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="div" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="dl" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="dt" {...rest}>
@@ -2,7 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLVoidElementProps } from '../types.js'
4
4
 
5
- let { ...rest } = $props<HTMLVoidElementProps>()
5
+ let { ...rest }: HTMLVoidElementProps = $props()
6
6
  </script>
7
7
 
8
8
  <MotionContainer tag="embed" {...rest} />
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="fieldset" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="figcaption" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="figure" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="footer" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="form" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="h1" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="h2" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="h3" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="h4" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="h5" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="h6" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="header" {...rest}>
@@ -2,7 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLVoidElementProps } from '../types.js'
4
4
 
5
- let { ...rest } = $props<HTMLVoidElementProps>()
5
+ let { ...rest }: HTMLVoidElementProps = $props()
6
6
  </script>
7
7
 
8
8
  <MotionContainer tag="hr" {...rest} />
@@ -2,7 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLVoidElementProps } from '../types.js'
4
4
 
5
- let { ...rest } = $props<HTMLVoidElementProps>()
5
+ let { ...rest }: HTMLVoidElementProps = $props()
6
6
  </script>
7
7
 
8
8
  <MotionContainer tag="img" {...rest} />
@@ -2,7 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLVoidElementProps } from '../types.js'
4
4
 
5
- let { ...rest } = $props<HTMLVoidElementProps>()
5
+ let { ...rest }: HTMLVoidElementProps = $props()
6
6
  </script>
7
7
 
8
8
  <MotionContainer tag="input" {...rest} />
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="label" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="legend" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="li" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="main" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="nav" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="ol" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="option" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="p" {...rest}>
@@ -2,7 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLVoidElementProps } from '../types.js'
4
4
 
5
- let { ...rest } = $props<HTMLVoidElementProps>()
5
+ let { ...rest }: HTMLVoidElementProps = $props()
6
6
  </script>
7
7
 
8
8
  <MotionContainer tag="param" {...rest} />
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="pre" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="section" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="select" {...rest}>
@@ -2,7 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLVoidElementProps } from '../types.js'
4
4
 
5
- let { ...rest } = $props<HTMLVoidElementProps>()
5
+ let { ...rest }: HTMLVoidElementProps = $props()
6
6
  </script>
7
7
 
8
8
  <MotionContainer tag="source" {...rest} />
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="span" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="table" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="tbody" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="td" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="textarea" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="tfoot" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="th" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="thead" {...rest}>
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="tr" {...rest}>
@@ -2,7 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLVoidElementProps } from '../types.js'
4
4
 
5
- let { ...rest } = $props<HTMLVoidElementProps>()
5
+ let { ...rest }: HTMLVoidElementProps = $props()
6
6
  </script>
7
7
 
8
8
  <MotionContainer tag="track" {...rest} />
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="ul" {...rest}>
@@ -2,7 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLVoidElementProps } from '../types.js'
4
4
 
5
- let { ...rest } = $props<HTMLVoidElementProps>()
5
+ let { ...rest }: HTMLVoidElementProps = $props()
6
6
  </script>
7
7
 
8
8
  <MotionContainer tag="wbr" {...rest} />
@@ -1,24 +1,13 @@
1
1
  <script lang="ts">
2
2
  import { type Snippet } from 'svelte'
3
3
  import type { SvelteHTMLElements } from 'svelte/elements'
4
- import type {
5
- MotionInitial,
6
- MotionAnimate,
7
- MotionTransition,
8
- MotionWhileTap
9
- } from '../types.js'
4
+ import type { MotionProps } from '../types.js'
10
5
  import { animate, press } from 'motion'
11
6
  import { isNotEmpty, getCommonKeys } from '../utils/objects.js'
12
7
 
13
- type Props = {
8
+ type Props = MotionProps & {
14
9
  children?: Snippet
15
10
  tag: keyof SvelteHTMLElements
16
- initial?: MotionInitial
17
- animate?: MotionAnimate
18
- whileTap?: MotionWhileTap
19
- transition?: MotionTransition
20
- style?: string
21
- class?: string
22
11
  [key: string]: unknown
23
12
  }
24
13
 
@@ -1,15 +1,9 @@
1
1
  import { type Snippet } from 'svelte';
2
2
  import type { SvelteHTMLElements } from 'svelte/elements';
3
- import type { MotionInitial, MotionAnimate, MotionTransition, MotionWhileTap } from '../types.js';
4
- type Props = {
3
+ import type { MotionProps } from '../types.js';
4
+ type Props = MotionProps & {
5
5
  children?: Snippet;
6
6
  tag: keyof SvelteHTMLElements;
7
- initial?: MotionInitial;
8
- animate?: MotionAnimate;
9
- whileTap?: MotionWhileTap;
10
- transition?: MotionTransition;
11
- style?: string;
12
- class?: string;
13
7
  [key: string]: unknown;
14
8
  };
15
9
  declare const MotionContainer: import("svelte").Component<Props, {}, "">;
@@ -2,9 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLElementProps } from '../types.js'
4
4
 
5
- type Props = HTMLElementProps
6
-
7
- let { children, ...rest } = $props<HTMLElementProps>()
5
+ let { children, ...rest }: HTMLElementProps = $props()
8
6
  </script>
9
7
 
10
8
  <MotionContainer tag="{{tag}}" {...rest}>
@@ -2,7 +2,7 @@
2
2
  import MotionContainer from './_MotionContainer.svelte'
3
3
  import type { HTMLVoidElementProps } from '../types.js'
4
4
 
5
- let { ...rest } = $props<HTMLVoidElementProps>()
5
+ let { ...rest }: HTMLVoidElementProps = $props()
6
6
  </script>
7
7
 
8
8
  <MotionContainer tag="{{tag}}" {...rest} />
@@ -54,3 +54,60 @@ import Track from './Track.svelte';
54
54
  import Ul from './Ul.svelte';
55
55
  import Wbr from './Wbr.svelte';
56
56
  export { A, Area, Article, Aside, Base, Blockquote, Br, Button, Code, Col, Dd, Div, Dl, Dt, Embed, Fieldset, Figcaption, Figure, Footer, Form, H1, H2, H3, H4, H5, H6, Header, Hr, Img, Input, Label, Legend, Li, Main, Nav, Ol, Option, P, Param, Pre, Section, Select, Source, Span, Table, Tbody, Td, Textarea, Tfoot, Th, Thead, Tr, Track, Ul, Wbr };
57
+ export type MotionComponents = {
58
+ a: typeof A;
59
+ article: typeof Article;
60
+ aside: typeof Aside;
61
+ blockquote: typeof Blockquote;
62
+ button: typeof Button;
63
+ code: typeof Code;
64
+ dd: typeof Dd;
65
+ div: typeof Div;
66
+ dl: typeof Dl;
67
+ dt: typeof Dt;
68
+ fieldset: typeof Fieldset;
69
+ figcaption: typeof Figcaption;
70
+ figure: typeof Figure;
71
+ footer: typeof Footer;
72
+ form: typeof Form;
73
+ h1: typeof H1;
74
+ h2: typeof H2;
75
+ h3: typeof H3;
76
+ h4: typeof H4;
77
+ h5: typeof H5;
78
+ h6: typeof H6;
79
+ header: typeof Header;
80
+ label: typeof Label;
81
+ legend: typeof Legend;
82
+ li: typeof Li;
83
+ main: typeof Main;
84
+ nav: typeof Nav;
85
+ ol: typeof Ol;
86
+ option: typeof Option;
87
+ p: typeof P;
88
+ pre: typeof Pre;
89
+ section: typeof Section;
90
+ select: typeof Select;
91
+ span: typeof Span;
92
+ table: typeof Table;
93
+ tbody: typeof Tbody;
94
+ td: typeof Td;
95
+ textarea: typeof Textarea;
96
+ tfoot: typeof Tfoot;
97
+ th: typeof Th;
98
+ thead: typeof Thead;
99
+ tr: typeof Tr;
100
+ ul: typeof Ul;
101
+ area: typeof Area;
102
+ base: typeof Base;
103
+ br: typeof Br;
104
+ col: typeof Col;
105
+ embed: typeof Embed;
106
+ hr: typeof Hr;
107
+ img: typeof Img;
108
+ input: typeof Input;
109
+ param: typeof Param;
110
+ source: typeof Source;
111
+ track: typeof Track;
112
+ wbr: typeof Wbr;
113
+ };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,3 @@
1
- import * as html from './html/index.js';
2
- type MotionComponents = {
3
- [K in Lowercase<keyof typeof html>]: (typeof html)[Capitalize<K>];
4
- };
1
+ import type { MotionComponents } from './html/index.js';
5
2
  export declare const motion: MotionComponents;
6
3
  export type { MotionAnimate, MotionInitial, MotionTransition, MotionWhileTap } from './types.js';
package/dist/types.d.ts CHANGED
@@ -4,11 +4,19 @@ export type MotionInitial = DOMKeyframesDefinition | undefined;
4
4
  export type MotionAnimate = DOMKeyframesDefinition | undefined;
5
5
  export type MotionTransition = AnimationOptions | undefined;
6
6
  export type MotionWhileTap = DOMKeyframesDefinition | undefined;
7
- export type HTMLElementProps = {
7
+ export type MotionProps = {
8
+ initial?: MotionInitial;
9
+ animate?: MotionAnimate;
10
+ transition?: MotionTransition;
11
+ whileTap?: MotionWhileTap;
12
+ style?: string;
13
+ class?: string;
14
+ };
15
+ export type HTMLElementProps = MotionProps & {
8
16
  children?: Snippet;
9
17
  [key: string]: unknown;
10
18
  };
11
- export type HTMLVoidElementProps = {
19
+ export type HTMLVoidElementProps = MotionProps & {
12
20
  [key: string]: unknown;
13
21
  } & {
14
22
  children?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@humanspeak/svelte-motion",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "A lightweight animation library for Svelte 5 that provides smooth, hardware-accelerated animations. Features include spring physics, custom easing, and fluid transitions. Built on top of the motion library, it offers a simple API for creating complex animations with minimal code. Perfect for interactive UIs, micro-interactions, and engaging user experiences.",
5
5
  "keywords": [
6
6
  "svelte",