@ibnlanre/jumi 0.1.0
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/CHANGELOG.md +156 -0
- package/LICENSE +21 -0
- package/README.md +194 -0
- package/dist/index.cjs +14361 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +84 -0
- package/dist/index.d.ts +84 -0
- package/dist/index.js +14350 -0
- package/dist/index.js.map +1 -0
- package/dist/postcss.cjs +8436 -0
- package/dist/postcss.cjs.map +1 -0
- package/dist/postcss.d.cts +57 -0
- package/dist/postcss.d.ts +58 -0
- package/dist/postcss.js +8426 -0
- package/dist/postcss.js.map +1 -0
- package/dist/view-transition.cjs +141 -0
- package/dist/view-transition.cjs.map +1 -0
- package/dist/view-transition.d.cts +117 -0
- package/dist/view-transition.d.ts +117 -0
- package/dist/view-transition.js +117 -0
- package/dist/view-transition.js.map +1 -0
- package/dist/vite.cjs +8453 -0
- package/dist/vite.cjs.map +1 -0
- package/dist/vite.d.cts +65 -0
- package/dist/vite.d.ts +67 -0
- package/dist/vite.js +8443 -0
- package/dist/vite.js.map +1 -0
- package/package.json +253 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
> **Releases, newest first.** `0.1.0` is the first release: its notes are hand-written from the measurement
|
|
4
|
+
> records in `engineering/research/`, and they give the reasons rather than a recap. Everything under the
|
|
5
|
+
> divider is the mechanical commit record of the `1.0.0-beta.1` line, which was prepared and then renamed
|
|
6
|
+
> before anything was published — kept for provenance, not as a release note. `pnpm run changelog` writes
|
|
7
|
+
> each release after `0.1.0` above the first heading, from the commits tagged since the boundary, and leaves
|
|
8
|
+
> what is already written alone. Release flow: [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
9
|
+
|
|
10
|
+
## 0.1.0 (2026-09-20)
|
|
11
|
+
|
|
12
|
+
Each note below describes behaviour that was measured rather than recalled. None of it changes a motion; the
|
|
13
|
+
changes are about what Jumi writes, and about leaving the author's own CSS alone.
|
|
14
|
+
|
|
15
|
+
### Upgrading from the unpublished 1.0.0-beta.1 line
|
|
16
|
+
|
|
17
|
+
That line was never published, so nothing installed has to move — these are the changes it accumulated on the
|
|
18
|
+
way to this release.
|
|
19
|
+
|
|
20
|
+
**`interpolate-size` is no longer set for you.** It used to be written onto every element that animates, and the
|
|
21
|
+
declaration is inherited — so it opted in the element's whole subtree. Measured: a child with no motion of its
|
|
22
|
+
own found its own ordinary `width: 200px → auto` transition interpolating, identically to a control outside the
|
|
23
|
+
subtree, merely because an ancestor happened to animate. Keyword sizes now need the opt-in written where you
|
|
24
|
+
want it:
|
|
25
|
+
|
|
26
|
+
```html
|
|
27
|
+
<div class="interpolate-size-allow-keywords animate-width-auto w-[200px]">
|
|
28
|
+
Keyword target
|
|
29
|
+
</div>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`interpolate-size-numeric-only` is the other half: it stops a subtree inheriting the switch. Both are plain
|
|
33
|
+
declarations, not motion controls, so they work on an element that animates nothing.
|
|
34
|
+
|
|
35
|
+
**The `perspective(...)` transform part moved to its own slot.** `--jumi-perspective` used to be the variable
|
|
36
|
+
behind the _transform function_; it is now `--jumi-perspective-3d`, and `--jumi-perspective` belongs to the
|
|
37
|
+
`perspective` property. If your own CSS sets `--jumi-perspective` to drive the transform function, rename it —
|
|
38
|
+
the two destinations are otherwise able to write the same variable.
|
|
39
|
+
|
|
40
|
+
**Keyword sizes resolve across the size family.** `animate-block-size-auto` and
|
|
41
|
+
`animate-min-{width,height,inline-size,block-size}-auto` now emit; `animate-block-size` no longer answers to the
|
|
42
|
+
bare spelling, which was the odd one out against `inline-size`. `max-*` keeps `none`, because that is the
|
|
43
|
+
keyword CSS gives those properties.
|
|
44
|
+
|
|
45
|
+
**A malformed motion name is reported and dropped.** A name becomes part of a custom property's name, so it
|
|
46
|
+
cannot contain whitespace — and inside `[brackets]` an underscore becomes one, which is why a name is written
|
|
47
|
+
bare. A name that is _valid_ but matches no motion is still silent: controls configure motion, they do not
|
|
48
|
+
create it.
|
|
49
|
+
|
|
50
|
+
**Two breaking changes the generated record carries and these notes had missed.** Both are real; which side of
|
|
51
|
+
`1.0.0-beta.1` they fall on is for the author to place, because the commit record does not say:
|
|
52
|
+
|
|
53
|
+
- `animation-range-{start,end}-timeline` is gone — `animation-range-start-entry` and
|
|
54
|
+
`animation-range-end-exit` replace the former component controls.
|
|
55
|
+
- The phrase frame separator changed from a comma to a pipe, so `animate-rotate-[0:0deg|100:45deg]` is a phrase
|
|
56
|
+
and a comma-separated value list cannot be confused with one.
|
|
57
|
+
|
|
58
|
+
They were found by generating a changelog from the history rather than by re-reading these notes, which is the
|
|
59
|
+
argument for the generated half being the mechanical record and this half being the reasons.
|
|
60
|
+
|
|
61
|
+
### Added
|
|
62
|
+
|
|
63
|
+
- `animate-perspective-*` and `animate-perspective-origin-*` — the standalone properties, animatable like any
|
|
64
|
+
other. The transform function stays reachable as `animate-transform-[perspective(400px)]`, deliberately with
|
|
65
|
+
no utility of its own.
|
|
66
|
+
- `interpolate-size-allow-keywords` and `interpolate-size-numeric-only`.
|
|
67
|
+
- `animation-range-{range}:` as a composition on every motion source, so a phrase or a single value can be
|
|
68
|
+
placed on a range exactly as an effect can.
|
|
69
|
+
- Motion names are element-local: naming a motion elsewhere in a stylesheet no longer widens the addresses an
|
|
70
|
+
element answers to, and two motions on one element may share a name.
|
|
71
|
+
|
|
72
|
+
### Fixed
|
|
73
|
+
|
|
74
|
+
- A keyword target on a phrase or single value emitted, validated, and did nothing — the range variant published
|
|
75
|
+
under the slot key while the chains read the attribute.
|
|
76
|
+
- The gate's declaration count was a file-wide text search that could not see a transition composition declaring
|
|
77
|
+
`transition:`. It counts the rules the structural detectors find now.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## 1.0.0-beta.1 — never published
|
|
82
|
+
|
|
83
|
+
The commit record of the line prepared as `1.0.0-beta.1` and renamed to `0.1.0` before anything shipped,
|
|
84
|
+
generated mechanically from Conventional Commits (through 2026-09-14). It is kept for provenance — what
|
|
85
|
+
changed, and when — rather than as a release note: nothing under this heading has ever been installed from a
|
|
86
|
+
registry, so the version, the date and the section names below describe the work, not a release.
|
|
87
|
+
|
|
88
|
+
### ⚠ BREAKING CHANGES
|
|
89
|
+
|
|
90
|
+
- animation-range-{start,end}-timeline is gone, and the
|
|
91
|
+
range names are now the values of the halves they belong to —
|
|
92
|
+
animation-range-start-entry and animation-range-end-exit replace the
|
|
93
|
+
former component controls.
|
|
94
|
+
- switch phrase frame separator from comma to pipe
|
|
95
|
+
|
|
96
|
+
### Features
|
|
97
|
+
|
|
98
|
+
- add 'i' to 'm' properties ([05d298a](https://github.com/ibnlanre/jumi/commit/05d298ae84ef0ed3f579f51b780c5d348641e2c0))
|
|
99
|
+
- add animate-border property and extend block-size theme with additional properties ([b0a65fb](https://github.com/ibnlanre/jumi/commit/b0a65fb7732730f5dc16c26a0a4767b00666b013))
|
|
100
|
+
- add animation delay components and refactor backdrop properties ([0689087](https://github.com/ibnlanre/jumi/commit/0689087e01b88b025ada79be8f990a7b84a80826))
|
|
101
|
+
- add atStops collection and update empty object structure ([13b6f56](https://github.com/ibnlanre/jumi/commit/13b6f563805406fb79a6afba0b1ba8fc14d7bf53))
|
|
102
|
+
- add box-shadow inset support and related variables ([7dc9619](https://github.com/ibnlanre/jumi/commit/7dc96190675fa9a0e94a1cfdc5afe392c9d0b339))
|
|
103
|
+
- add comprehensive Jumi effect animations with categorized types ([b8c7838](https://github.com/ibnlanre/jumi/commit/b8c783864c88869cf027ed2134acba5bb8808ca2))
|
|
104
|
+
- add CSS transition layer with per-property timing controls ([5999add](https://github.com/ibnlanre/jumi/commit/5999add1b2710fae7d9326f6e4cbcc9bf10b1ee9))
|
|
105
|
+
- add hover and group-hover animation variants with enhanced composability ([18a1a6e](https://github.com/ibnlanre/jumi/commit/18a1a6e838a9c2b2b7b68b8776f392f35757ad11))
|
|
106
|
+
- Add new border animations and improve HTML structure for better readability ([026a4c1](https://github.com/ibnlanre/jumi/commit/026a4c1392fee92f1c54b190afb60a569953baff))
|
|
107
|
+
- add Tailwind CSS configuration and update TypeScript settings ([1c46ff4](https://github.com/ibnlanre/jumi/commit/1c46ff40b5ebaf26c02eb35eb9c37a57f5a14ce7))
|
|
108
|
+
- add the runtime wrapper for same-document transitions ([2301852](https://github.com/ibnlanre/jumi/commit/23018527f5f8eb7ef1773837c9f1532435ecac7f))
|
|
109
|
+
- add transform utilities and animations for TailwindCSS ([a5c57cd](https://github.com/ibnlanre/jumi/commit/a5c57cdecdb52018a079d2329f49b7dba58d1b72))
|
|
110
|
+
- address labelled animation slots by their label alone ([5378c6f](https://github.com/ibnlanre/jumi/commit/5378c6f89ea8de60ba80b1196f29269ebaa6cc0c))
|
|
111
|
+
- address labelled animation slots with dotted modifiers ([0785545](https://github.com/ibnlanre/jumi/commit/07855455bac392365b6ada5da72d26ca9707c3f4))
|
|
112
|
+
- assemble the transitions carrier through staging, like animations ([f0e19b3](https://github.com/ibnlanre/jumi/commit/f0e19b3157035514c1cd059fd213cafdfc868daf))
|
|
113
|
+
- close theme ownership with a measured classification ([9bef33f](https://github.com/ibnlanre/jumi/commit/9bef33fe552058f72b08563d1d9cc2d1b732a3f7))
|
|
114
|
+
- complete the aggregate into carriers after the build ([95321ef](https://github.com/ibnlanre/jumi/commit/95321effa727f24df3e30c3baa41c35613ee7e83))
|
|
115
|
+
- derive the Storybook catalog from the effect registry ([3730066](https://github.com/ibnlanre/jumi/commit/3730066a6816d00f9ab60c197c5a3c525aa578fb))
|
|
116
|
+
- distinguish stops from aliases in animation modifiers ([be833c8](https://github.com/ibnlanre/jumi/commit/be833c891d8f8c3fb06c50abdd5b4e89ad5a9b06))
|
|
117
|
+
- emit view transitions from the staged candidates ([5bfa772](https://github.com/ibnlanre/jumi/commit/5bfa77274b365e438f26b07ab3906e51b97cf75e))
|
|
118
|
+
- enhance animation handling and keyframe management ([ce4c4fe](https://github.com/ibnlanre/jumi/commit/ce4c4feb08647a76e804d256bef159258a11d261))
|
|
119
|
+
- enhance animation properties and add new border-related animations ([2bc210d](https://github.com/ibnlanre/jumi/commit/2bc210d3c150d06e661b517e323b869b28f01776))
|
|
120
|
+
- enhance animation properties and add new themes ([b28dcb4](https://github.com/ibnlanre/jumi/commit/b28dcb4377ddf61c55d9541aa37b11580c4bb220))
|
|
121
|
+
- enhance animation properties and effects ([f910956](https://github.com/ibnlanre/jumi/commit/f91095665f6a61bed2ac119c82b50f97e3b14673))
|
|
122
|
+
- enhance animation properties and introduce new variants ([a3a07aa](https://github.com/ibnlanre/jumi/commit/a3a07aa43026b90bb45a5066272e82d150eca3c9))
|
|
123
|
+
- enhance match properties with new animations and themes ([4597370](https://github.com/ibnlanre/jumi/commit/4597370e6aafe382d77aa0593edeedb5129decd5))
|
|
124
|
+
- enhance transform properties and simplify animation handling ([86d5b1a](https://github.com/ibnlanre/jumi/commit/86d5b1ab9440802d36e880083fee24a74ab6d509))
|
|
125
|
+
- expose animation-range as a per-slot part and gate it ([6c237dd](https://github.com/ibnlanre/jumi/commit/6c237dd94f0b57c245350185006482c140e21988))
|
|
126
|
+
- give labelled slots per-slot composition and timeline controls ([d4e2628](https://github.com/ibnlanre/jumi/commit/d4e2628ce68695668700985975719646be13d9f5))
|
|
127
|
+
- give perspective its own motion, apart from the transform function ([88ca293](https://github.com/ibnlanre/jumi/commit/88ca293b155d74a8c3c2d12c049f014af5d107ea))
|
|
128
|
+
- infer the composition from motion utilities, dropping the carrier classes ([ae97d61](https://github.com/ibnlanre/jumi/commit/ae97d61c453de83334cc0c567c298db70822e74d))
|
|
129
|
+
- materialize the aggregate into carrier longhands and drop the transport ([81a833c](https://github.com/ibnlanre/jumi/commit/81a833ce454b7a0868f4e2f3f6326c0244839c39))
|
|
130
|
+
- measure Jumi's composition against the View Transition API ([231b85a](https://github.com/ibnlanre/jumi/commit/231b85a3b9674bfc68851df193af3ae33c83f2bf))
|
|
131
|
+
- measure what the host hands Jumi per candidate ([cb963a2](https://github.com/ibnlanre/jumi/commit/cb963a2e9494c16e18e2b71976410c579da110a3))
|
|
132
|
+
- name every motion with a list, refusing names that cannot be written ([baf1cd4](https://github.com/ibnlanre/jumi/commit/baf1cd457d35f4bfc64b4cb7b9581d8f6fc4ebff))
|
|
133
|
+
- own Jumi's lifecycle in one build integration ([39dda27](https://github.com/ibnlanre/jumi/commit/39dda271fcf731dc0646e62a21dc830dbb538a89))
|
|
134
|
+
- place one motion with a range variant, beside the range utilities ([928c386](https://github.com/ibnlanre/jumi/commit/928c38662d883b6c883ef550a471abc05685645c))
|
|
135
|
+
- Refactor animation utilities and types for improved structure and functionality ([3aaa455](https://github.com/ibnlanre/jumi/commit/3aaa45518ad09663221bef5d5a3429e256af22ad))
|
|
136
|
+
- refactor AnimationShowcase import paths and add new component implementation ([5ddb28a](https://github.com/ibnlanre/jumi/commit/5ddb28a950f2a5ca38e2f1586ed17c6422f13735))
|
|
137
|
+
- register slot activation names as non-inheriting, asserting it in the browser ([e633481](https://github.com/ibnlanre/jumi/commit/e633481b383b48dde073047106270f6a0f503eb2))
|
|
138
|
+
- replace stops and aliases with self-contained phrases ([a59139f](https://github.com/ibnlanre/jumi/commit/a59139f7aaecc128397e4145e88e2f9aba95c3d2))
|
|
139
|
+
- resolve partial theme namespaces per value ([4530fb2](https://github.com/ibnlanre/jumi/commit/4530fb2a03f90b871333165ae9cf2dc239fc5389))
|
|
140
|
+
- resolve spacing theme names through the CSS formula ([9074a99](https://github.com/ibnlanre/jumi/commit/9074a9929cdf86fc75fb538fb1ec73cbb5586ff7))
|
|
141
|
+
- route phrases around the host type check, through a second handler ([cee40e2](https://github.com/ibnlanre/jumi/commit/cee40e246c20ba7afb0816c56996525a12bf5f99))
|
|
142
|
+
- stop claiming host selector vocabulary ([555502b](https://github.com/ibnlanre/jumi/commit/555502b92778a8e14344a88edbb3e5840933388d))
|
|
143
|
+
- switch phrase frame separator from comma to pipe ([4d09d4f](https://github.com/ibnlanre/jumi/commit/4d09d4ffdfb952f08bf75d8c82a2a6334a1152e1))
|
|
144
|
+
- **theme:** add new CSS properties and update existing ones ([893f766](https://github.com/ibnlanre/jumi/commit/893f766b0672278c5e890cca4075c99b390b8d32))
|
|
145
|
+
- update animation classes to use 'jumi' prefix for consistency ([5e47983](https://github.com/ibnlanre/jumi/commit/5e47983cc8625e48d208a9860c81a4baab7beb93))
|
|
146
|
+
- update animation keyframes and properties for consistency and flexibility ([7291b04](https://github.com/ibnlanre/jumi/commit/7291b04a6fff76062f93693074d933a998d31122))
|
|
147
|
+
- update README and examples for 'jumi' integration and enhance animation utilities ([1c6efe1](https://github.com/ibnlanre/jumi/commit/1c6efe1c7df286abf69a7fbea3013d361199fec8))
|
|
148
|
+
|
|
149
|
+
### Bug Fixes
|
|
150
|
+
|
|
151
|
+
- address a named motion on the rule that declared it, not in the aggregate ([3aa09b6](https://github.com/ibnlanre/jumi/commit/3aa09b61a2e6d0a78eb9450c2ddf93665c4a43f1))
|
|
152
|
+
- attach the animationend listener once per glyph in the effects catalog ([6bb8255](https://github.com/ibnlanre/jumi/commit/6bb825543194595be0d7de4f524ff176f8538ff8))
|
|
153
|
+
- erase the carrier marker on completion, not on change ([b1e7642](https://github.com/ibnlanre/jumi/commit/b1e76429ec8c1036b1a4ce821da91cb1c8b1995d))
|
|
154
|
+
- only opt in descendants when the author asks, not when an ancestor animates ([a9665c0](https://github.com/ibnlanre/jumi/commit/a9665c004558b87c73897503206621c172364c97))
|
|
155
|
+
- resolve animation-range on a slot's own key, so phrases range too ([0179327](https://github.com/ibnlanre/jumi/commit/01793270f9e24f5a87fca3ed18603bf129e24973))
|
|
156
|
+
- update ESLint and VSCode settings for improved code quality and consistency ([eecc789](https://github.com/ibnlanre/jumi/commit/eecc7893142537481592c9cbbf79ac89a67e23ef))
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ridwan Olanrewaju
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# Jumi
|
|
2
|
+
|
|
3
|
+
### Big motion. Small classes.
|
|
4
|
+
|
|
5
|
+
Give your interface life with a composable animation library for Tailwind CSS.
|
|
6
|
+
Choose from **228 effects**, animate property targets, give each its own rhythm,
|
|
7
|
+
and stagger motion across children—all from your markup.
|
|
8
|
+
|
|
9
|
+
**[Start here](https://jumi-css.vercel.app/docs/installation/)** ·
|
|
10
|
+
**[Learn to compose](https://jumi-css.vercel.app/docs/properties/)** ·
|
|
11
|
+
**[Explore the effects](https://jumi-css.vercel.app/effects/)** ·
|
|
12
|
+
**[Run the docs site](#the-documentation-site)**
|
|
13
|
+
|
|
14
|
+
```html
|
|
15
|
+
<div class="motion-safe:animate-bounce-in animation-duration-800">
|
|
16
|
+
Make your move.
|
|
17
|
+
</div>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Jumi generates CSS through Tailwind at build time. There is no Jumi animation
|
|
21
|
+
runtime to ship to the browser.
|
|
22
|
+
|
|
23
|
+
## Start moving
|
|
24
|
+
|
|
25
|
+
Install Jumi in a project with Tailwind CSS configured:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
pnpm add @ibnlanre/jumi
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Register it by replacing `@tailwindcss/vite` with Jumi in your Vite config:
|
|
32
|
+
|
|
33
|
+
```diff
|
|
34
|
+
- import tailwindcss from '@tailwindcss/vite'
|
|
35
|
+
+ import jumi from '@ibnlanre/jumi/vite'
|
|
36
|
+
|
|
37
|
+
export default defineConfig({
|
|
38
|
+
- plugins: [tailwindcss()],
|
|
39
|
+
+ plugins: [jumi()],
|
|
40
|
+
})
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
and that is the whole setup. Your stylesheet does not mention Jumi:
|
|
44
|
+
|
|
45
|
+
```css
|
|
46
|
+
@import 'tailwindcss';
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
`jumi()` owns Jumi's lifecycle inside the build: it registers Jumi with Tailwind, lets Tailwind
|
|
50
|
+
compile what you wrote, and then completes the stylesheet — because the composition lists cannot be
|
|
51
|
+
known until every `animate-*` class on the page has been compiled.
|
|
52
|
+
|
|
53
|
+
Prefer to be explicit? Both work, and they compile to the same CSS:
|
|
54
|
+
|
|
55
|
+
```css
|
|
56
|
+
@import 'tailwindcss';
|
|
57
|
+
@plugin "@ibnlanre/jumi";
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
// vite.config.ts — Tailwind's entry, plus Jumi after it
|
|
62
|
+
import tailwindcss from '@tailwindcss/vite'
|
|
63
|
+
import { jumiFinalizer } from '@ibnlanre/jumi/vite'
|
|
64
|
+
|
|
65
|
+
export default defineConfig({ plugins: [tailwindcss(), jumiFinalizer()] })
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
PostCSS instead? Same shape — one entry replaces `@tailwindcss/postcss`:
|
|
69
|
+
|
|
70
|
+
```js
|
|
71
|
+
// postcss.config.js
|
|
72
|
+
export default { plugins: { '@ibnlanre/jumi/postcss': {} } }
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
With `@tailwindcss/postcss` already configured separately, `jumiFinalizer()` from
|
|
76
|
+
`@ibnlanre/jumi/postcss` goes after it instead — and the stylesheet names
|
|
77
|
+
`@plugin "@ibnlanre/jumi";`, because nothing registers Jumi in that shape.
|
|
78
|
+
|
|
79
|
+
Building with the Tailwind CLI, or from a script? The CLI has no hook to finish in, so that one
|
|
80
|
+
still needs a final step:
|
|
81
|
+
|
|
82
|
+
```js
|
|
83
|
+
import { finalizeCss } from '@ibnlanre/jumi'
|
|
84
|
+
|
|
85
|
+
const { css } = finalizeCss(readFileSync('dist/output.css', 'utf8'))
|
|
86
|
+
writeFileSync('dist/output.css', css)
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Choose an effect, then its timing:
|
|
90
|
+
|
|
91
|
+
```html
|
|
92
|
+
<div class="animate-reveal-swipe animation-duration-900">
|
|
93
|
+
A little class. A lot of character.
|
|
94
|
+
</div>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Use `motion-safe:animate-reveal-swipe` for decorative motion that respects the
|
|
98
|
+
visitor's reduced-motion preference. Keep the element visible in its unanimated
|
|
99
|
+
state.
|
|
100
|
+
|
|
101
|
+
## Motion, atom by atom
|
|
102
|
+
|
|
103
|
+
Effects are a starting point. Property utilities let you author your own motion:
|
|
104
|
+
|
|
105
|
+
```html
|
|
106
|
+
<div
|
|
107
|
+
class="animate-rotate-45 animate-scale-110 animation-duration-800/rotate animation-duration-1200/scale animation-direction-alternate animation-iteration-count-infinite"
|
|
108
|
+
>
|
|
109
|
+
Two rhythms. One element.
|
|
110
|
+
</div>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Here, rotation takes 800ms and scale takes 1200ms. The `/rotate` and `/scale`
|
|
114
|
+
modifiers scope a control to that property's animation slot.
|
|
115
|
+
|
|
116
|
+
| Piece | Example | What it does |
|
|
117
|
+
| ----------- | ----------------------------------- | ---------------------------------- |
|
|
118
|
+
| Effects | `animate-bounce-in` | Apply a named keyframe effect |
|
|
119
|
+
| Properties | `animate-rotate-[0.25turn]` | Animate a property toward a target |
|
|
120
|
+
| Controls | `animation-duration-[800ms]/rotate` | Give a property its own timing |
|
|
121
|
+
| Stagger | `animate-stagger-forward-[100ms]/3` | Sequence direct children |
|
|
122
|
+
| Transitions | `transition-property/scale` | Animate a change of state |
|
|
123
|
+
|
|
124
|
+
Theme values and arbitrary values work together. Compound properties such as
|
|
125
|
+
filters and transforms are assembled from custom properties; their parts share
|
|
126
|
+
the timing of the compound property's slot.
|
|
127
|
+
|
|
128
|
+
## Start a chain reaction
|
|
129
|
+
|
|
130
|
+
```html
|
|
131
|
+
<div class="animate-stagger-forward-120/3 *:animate-fade-in-up">
|
|
132
|
+
<div>One</div>
|
|
133
|
+
<div>Two</div>
|
|
134
|
+
<div>Three</div>
|
|
135
|
+
</div>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
The parent sets the rhythm; each direct child owns its motion. The `/3` count
|
|
139
|
+
provides an `:nth-child` fallback for browsers without CSS sibling functions.
|
|
140
|
+
Omit the count when targeting browsers that support `sibling-index()` and
|
|
141
|
+
`sibling-count()`.
|
|
142
|
+
|
|
143
|
+
## Make state changes feel considered
|
|
144
|
+
|
|
145
|
+
```html
|
|
146
|
+
<button
|
|
147
|
+
class="transition-property/scale transition-duration-300 hover:scale-110 focus-visible:scale-110"
|
|
148
|
+
>
|
|
149
|
+
Take a closer look.
|
|
150
|
+
</button>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Scope transition duration, delay, and easing with the same `/property` syntax.
|
|
154
|
+
|
|
155
|
+
## Know the boundaries
|
|
156
|
+
|
|
157
|
+
- Write complete class names so Tailwind can discover them at build time.
|
|
158
|
+
- CSS determines whether a property interpolates, changes discretely, or cannot animate.
|
|
159
|
+
- Effects that write the same property can compete. Nest elements for independent layers of motion.
|
|
160
|
+
- Advanced timeline and composition controls require browser support. Keep essential behavior independent of them.
|
|
161
|
+
- Respect reduced motion and offer a pause control for persistent decorative loops.
|
|
162
|
+
|
|
163
|
+
## The documentation site
|
|
164
|
+
|
|
165
|
+
The Astro site in `docs/` is a working showcase: a kinetic landing page, seven
|
|
166
|
+
guides, and a searchable catalog with previews of all 228 effects. Its animation
|
|
167
|
+
examples use Jumi itself.
|
|
168
|
+
|
|
169
|
+
```sh
|
|
170
|
+
pnpm install
|
|
171
|
+
pnpm run docs:dev
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
To generate the static site, run `pnpm run docs:build` and preview it with
|
|
175
|
+
`pnpm run docs:preview`.
|
|
176
|
+
|
|
177
|
+
## Development
|
|
178
|
+
|
|
179
|
+
```sh
|
|
180
|
+
pnpm run test:run
|
|
181
|
+
pnpm run check-types
|
|
182
|
+
pnpm run bundle
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Created by [Ridwan Olanrewaju](https://github.com/ibnlanre).
|
|
186
|
+
|
|
187
|
+
## License and support
|
|
188
|
+
|
|
189
|
+
MIT. Commercial use needs no permission and no payment, and only the copyright notice has to travel with the
|
|
190
|
+
code — that is deliberate, because a CSS library is more useful when nobody has to ask.
|
|
191
|
+
|
|
192
|
+
If it earns a place in something you ship, [sponsoring the work](https://github.com/sponsors/ibnlanre) is what
|
|
193
|
+
keeps it maintained. That is a request rather than a condition: the licence is unchanged for anyone who does not,
|
|
194
|
+
and no attribution beyond the notice is expected either way.
|