@f12io/maple 2.0.1

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 (63) hide show
  1. package/LICENSE +33 -0
  2. package/README.md +187 -0
  3. package/dist/keyframes.css +445 -0
  4. package/dist/maple.js +2 -0
  5. package/dist/module/index.cjs +2 -0
  6. package/dist/module/index.js +2 -0
  7. package/dist/module/types/src/core/aliases.d.cts +3 -0
  8. package/dist/module/types/src/core/aliases.d.ts +3 -0
  9. package/dist/module/types/src/core/bootstrap.d.cts +1 -0
  10. package/dist/module/types/src/core/bootstrap.d.ts +1 -0
  11. package/dist/module/types/src/core/builder.d.cts +2 -0
  12. package/dist/module/types/src/core/builder.d.ts +2 -0
  13. package/dist/module/types/src/core/constants/caches.d.cts +7 -0
  14. package/dist/module/types/src/core/constants/caches.d.ts +7 -0
  15. package/dist/module/types/src/core/constants/chars.d.cts +33 -0
  16. package/dist/module/types/src/core/constants/chars.d.ts +33 -0
  17. package/dist/module/types/src/core/constants/config.d.cts +17 -0
  18. package/dist/module/types/src/core/constants/config.d.ts +17 -0
  19. package/dist/module/types/src/core/constants/dictionaries.d.cts +16 -0
  20. package/dist/module/types/src/core/constants/dictionaries.d.ts +16 -0
  21. package/dist/module/types/src/core/constants/precalculated-prop-types.d.cts +6 -0
  22. package/dist/module/types/src/core/constants/precalculated-prop-types.d.ts +6 -0
  23. package/dist/module/types/src/core/constants/regex.d.cts +18 -0
  24. package/dist/module/types/src/core/constants/regex.d.ts +18 -0
  25. package/dist/module/types/src/core/constants/units.d.cts +14 -0
  26. package/dist/module/types/src/core/constants/units.d.ts +14 -0
  27. package/dist/module/types/src/core/generator.d.cts +5 -0
  28. package/dist/module/types/src/core/generator.d.ts +5 -0
  29. package/dist/module/types/src/core/helpers/cache.helper.d.cts +1 -0
  30. package/dist/module/types/src/core/helpers/cache.helper.d.ts +1 -0
  31. package/dist/module/types/src/core/helpers/escape-class-polyfill.d.cts +1 -0
  32. package/dist/module/types/src/core/helpers/escape-class-polyfill.d.ts +1 -0
  33. package/dist/module/types/src/core/helpers/escape-class.d.cts +1 -0
  34. package/dist/module/types/src/core/helpers/escape-class.d.ts +1 -0
  35. package/dist/module/types/src/core/helpers/merge.helper.d.cts +1 -0
  36. package/dist/module/types/src/core/helpers/merge.helper.d.ts +1 -0
  37. package/dist/module/types/src/core/helpers/property.helper.d.cts +11 -0
  38. package/dist/module/types/src/core/helpers/property.helper.d.ts +11 -0
  39. package/dist/module/types/src/core/helpers/string.helper.d.cts +7 -0
  40. package/dist/module/types/src/core/helpers/string.helper.d.ts +7 -0
  41. package/dist/module/types/src/core/observer.d.cts +1 -0
  42. package/dist/module/types/src/core/observer.d.ts +1 -0
  43. package/dist/module/types/src/core/parser-class.d.cts +3 -0
  44. package/dist/module/types/src/core/parser-class.d.ts +3 -0
  45. package/dist/module/types/src/core/parser-media-query.d.cts +2 -0
  46. package/dist/module/types/src/core/parser-media-query.d.ts +2 -0
  47. package/dist/module/types/src/core/serializer.d.cts +8 -0
  48. package/dist/module/types/src/core/serializer.d.ts +8 -0
  49. package/dist/module/types/src/core/stylesheet.d.cts +4 -0
  50. package/dist/module/types/src/core/stylesheet.d.ts +4 -0
  51. package/dist/module/types/src/core/types.d.cts +65 -0
  52. package/dist/module/types/src/core/types.d.ts +65 -0
  53. package/dist/module/types/src/generated/precalculated-prop-abbreviations.d.cts +1 -0
  54. package/dist/module/types/src/generated/precalculated-prop-abbreviations.d.ts +1 -0
  55. package/dist/module/types/src/generated/precalculated-prop-types.d.cts +1 -0
  56. package/dist/module/types/src/generated/precalculated-prop-types.d.ts +1 -0
  57. package/dist/module/types/src/index.d.cts +11 -0
  58. package/dist/module/types/src/index.d.ts +11 -0
  59. package/dist/module/types/src/runtime.d.cts +1 -0
  60. package/dist/module/types/src/runtime.d.ts +1 -0
  61. package/dist/module/types/tests/helpers/convert.helper.d.cts +2 -0
  62. package/dist/module/types/tests/helpers/convert.helper.d.ts +2 -0
  63. package/package.json +59 -0
package/LICENSE ADDED
@@ -0,0 +1,33 @@
1
+ The Root Source License (ROOT) v1.0
2
+
3
+ Copyright (c) 2026 f12.io
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Root"), to deal
7
+ in the Root without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Root, subject to the following distribution conditions, where
10
+
11
+ "The System" refers to any structure that encapsulates the Root in an
12
+ abstract form, capable of recreating a copy or substantial portions of
13
+ the Root on-demand.
14
+
15
+ A. Distribution of The Root: If you distribute the Root, the above
16
+ copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Root.
18
+
19
+ B. Distribution through The System: If you provide public network access
20
+ to a System, allowing it to act as a distribution channel—regardless of
21
+ the percentage of the Root's coverage in that System—the above copyright
22
+ notice and this permission notice shall be included in all copies or
23
+ substantial portions of the Root distributed by the System.
24
+
25
+ C. Severability: If any provision of this License is held to be unenforceable,
26
+ the remainder of the License shall remain in full force and effect.
27
+
28
+ THE ROOT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
30
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
31
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
33
+ OUT OF OR IN CONNECTION WITH THE ROOT OR THE USE OR OTHER DEALINGS IN THE ROOT.
package/README.md ADDED
@@ -0,0 +1,187 @@
1
+ <div align="center">
2
+
3
+ <h1>Maple</h1>
4
+ <p>
5
+ A variable-first, stack-agnostic runtime CSS engine.<br>
6
+ Atomic. Tiny (~12kb gzipped). Delightfully intuitive.
7
+ </p>
8
+
9
+ <p>
10
+ Zero build steps • Zero configuration • Zero dependencies
11
+ </p>
12
+
13
+ <p>
14
+ <a href="#quick-start">Quick Start</a> •
15
+ <a href="#why-maple">Why Maple?</a> •
16
+ <a href="#documentation">Documentation</a> •
17
+ <a href="https://maple.f12.io">Website</a>
18
+ </p>
19
+
20
+ </div>
21
+
22
+ ## TL;DR
23
+
24
+ Maple is a runtime CSS engine that generates atomic styles from utility classes **only when they appear in the DOM**.
25
+
26
+ Instead of shipping pre-compiled stylesheets, Maple ships a small JavaScript file that observes the DOM and constructs CSSOM incrementally as your application renders. If a class is never used, its style is never generated.
27
+
28
+ This shifts styling cost from upfront network transfer to demand-driven runtime generation. It eliminates build steps, complex configuration, and unused CSS, while keeping styles encapsulated.
29
+
30
+ ## Quick Start
31
+
32
+ Add Maple to your project by including the script below in the document `<head>` and start styling with utility classes.
33
+
34
+ ```html
35
+ <!doctype html>
36
+ <html lang="en">
37
+ <head>
38
+ <!-- Include Maple in the head -->
39
+ <script src="https://cdn.jsdelivr.net/npm/@f12io/maple/dist/maple.js"></script>
40
+ </head>
41
+ <body>
42
+ <!-- Start styling -->
43
+ <div class="bgc-blue-500 c-white p-4 rad-2">Hello World</div>
44
+ </body>
45
+ </html>
46
+ ```
47
+
48
+ > [!IMPORTANT]
49
+ > Load Maple as a blocking script in the document head.
50
+ >
51
+ > Maple replaces a render-blocking stylesheet with a small render-blocking runtime. Loading it with `async`, `defer`, `type="module"`, or at the end of the body allows the browser to paint elements before Maple has generated their styles, which can cause a Flash of Unstyled Content.
52
+
53
+ > [!TIP]
54
+ > For production, pin Maple to a specific version:
55
+ >
56
+ > ```html
57
+ > <script src="https://cdn.jsdelivr.net/npm/@f12io/maple@x.y.z/dist/maple.js"></script>
58
+ > ```
59
+
60
+ ## Why Maple?
61
+
62
+ Instead of generating or optimizing CSS files ahead of time, Maple generates styles **on-demand** as the browser encounters classes.
63
+
64
+ That model creates benefits across delivery, developer experience, and styling power.
65
+
66
+ ### Delivery & Performance
67
+
68
+ - [Constant Transfer Size](https://maple.f12.io/docs/why-maple/constant-transfer-size): Maple ships as a single ~12kb gzipped JavaScript file.
69
+ - [Incremental CSSOM](https://maple.f12.io/docs/why-maple/incremental-cssom): CSS is constructed incrementally based on what appears on the page.
70
+ - [Automatic Code Splitting](https://maple.f12.io/docs/why-maple/automatic-splitting): If a component is not on the screen, its styling cost is zero.
71
+ - [Zero Dead Code](https://maple.f12.io/docs/why-maple/no-unused-styles): Styles cannot exist "just in case"; they are generated only from classes that appear in the DOM.
72
+
73
+ ### Developer Experience
74
+
75
+ - [No Build Step](https://maple.f12.io/docs/why-maple/no-build-step): Include the script and start styling.
76
+ - [No Configuration Files](https://maple.f12.io/docs/why-maple/no-configuration-files): Maple observes the DOM using a `MutationObserver` instead of scanning source files.
77
+ - [No Special SSR Treatment](https://maple.f12.io/docs/why-maple/no-special-ssr-treatment): Maple behaves the same whether HTML is produced by Next.js, Remix, Nuxt, PHP, or served as a static file.
78
+ - [Universal Portability](https://maple.f12.io/docs/why-maple/universal-portability): If you can add a `<script>` tag, you can use Maple.
79
+
80
+ ### Styling Power
81
+
82
+ - [Dynamic Data as CSS](https://maple.f12.io/docs/why-maple/dynamic-data-as-css): Maple treats dynamic data exactly like static class names.
83
+ - [Variable-first Architecture](https://maple.f12.io/docs/why-maple/variable-first-architecture): Utilities map to semantic fallback chains of CSS variables.
84
+ - [Dynamic Color Manipulation](https://maple.f12.io/docs/why-maple/dynamic-color-manipulation): Color utilities resolve through CSS variables in the OKLCH color space.
85
+ - [True Encapsulation](https://maple.f12.io/docs/why-maple/true-encapsulation): Selector logic can live inside the class name itself.
86
+
87
+ ## Syntax
88
+
89
+ Every Maple class name follows a colon-separated structure:
90
+
91
+ ```txt
92
+ media-query:selector:utility
93
+ ```
94
+
95
+ The first two parts are optional, so Maple scales from simple utilities to advanced state management.
96
+
97
+ ```html
98
+ <div class="bgc-red"></div>
99
+ <div class="&:hover:bgc-red"></div>
100
+ <div class="@md:^.active:bgc-red"></div>
101
+ ```
102
+
103
+ Learn the full syntax in the [Syntax Reference](https://maple.f12.io/docs/syntax).
104
+
105
+ ## Examples
106
+
107
+ ### Variable-first Utilities
108
+
109
+ Maple maps utility classes to cascading CSS variables rather than hardcoded values. You can also define variables directly in HTML using class syntax.
110
+
111
+ ```html
112
+ <div class="--primary=blue bgc-primary-200 c-primary-700">I am blue.</div>
113
+ ```
114
+
115
+ When you want to bypass the variable system, use `=` to inject a literal value directly:
116
+
117
+ ```html
118
+ <div class="w=86% c=#ff0000"></div>
119
+ ```
120
+
121
+ Read more in [Variable-first Architecture](https://maple.f12.io/docs/why-maple/variable-first-architecture) and [Variable Utilities](https://maple.f12.io/docs/guide).
122
+
123
+ ### Dynamic Classes
124
+
125
+ Because Maple observes the DOM directly, dynamically generated class names work naturally.
126
+
127
+ ```jsx
128
+ <div className={`md:bg-${userColor} w=${progress}%`}></div>
129
+ ```
130
+
131
+ Read more in [Dynamic Data as CSS](https://maple.f12.io/docs/why-maple/dynamic-data-as-css).
132
+
133
+ ### Dynamic Colors
134
+
135
+ Maple color utilities resolve through CSS variables in the OKLCH color space, making lightness, chroma, hue, and alpha adjustable at runtime.
136
+
137
+ ```html
138
+ <div class="bgc-primary-320/70 c-white/80"></div>
139
+ <div class="c-coral-600"></div>
140
+ <div class="bg-teal/70"></div>
141
+ <div class="c-slateblue-500/20"></div>
142
+ ```
143
+
144
+ Read more in [Dynamic Color Manipulation](https://maple.f12.io/docs/why-maple/dynamic-color-manipulation) and try the [Native Palette](https://maple.f12.io/docs/guide/native-palette).
145
+
146
+ ### Inline Selectors
147
+
148
+ Maple supports selector logic inside utility classes.
149
+
150
+ ```html
151
+ <button class="c-red ^.card:c-green ^.nav:c-blue">
152
+ Text is green when in a card and blue when in a navigation bar.
153
+ </button>
154
+
155
+ <button class="&:hover:c-black">The text becomes black on hover</button>
156
+
157
+ <div class="/>span:fw=700">
158
+ <span>This text is bold</span>
159
+ </div>
160
+ ```
161
+
162
+ Read more in [True Encapsulation](https://maple.f12.io/docs/why-maple/true-encapsulation) and [Selectors](https://maple.f12.io/docs/syntax/selectors).
163
+
164
+ ## Limitations & Trade-offs
165
+
166
+ Maple's architecture offers unique benefits but also introduces constraints you should understand before adoption.
167
+
168
+ - **JavaScript is Required.** Maple runs entirely in the browser and does not generate static CSS. If JavaScript is disabled, the page will render without styles.
169
+ - **Runtime Cost Scaling.** Maple's generation work scales with the number of **unique** utility classes that appear in the DOM.
170
+ - **Not all CSS fits in Utilities.** Certain patterns, such as keyframes, font-face declarations, and global resets, are often better expressed in traditional CSS.
171
+ - **Relative OKLCH Colors.** As of May 2026, global support for relative color syntax is about 89%, with broader support for plain OKLab and OKLCH colors. Browsers that do not support relative color syntax ignore those generated color declarations.
172
+
173
+ ## Documentation
174
+
175
+ - [Introduction](https://maple.f12.io/docs)
176
+ - [Quick Start](https://maple.f12.io/docs/quick-start)
177
+ - [Why Maple?](https://maple.f12.io/docs/why-maple)
178
+ - [Syntax Reference](https://maple.f12.io/docs/syntax)
179
+ - [Guide](https://maple.f12.io/docs/guide)
180
+
181
+ ## Contributing
182
+
183
+ If you're interested in contributing to Maple, please read our [contributing docs](https://github.com/f12io/maple/blob/main/.github/CONTRIBUTING.md) **before submitting a pull request**.
184
+
185
+ ## License
186
+
187
+ Released under the [Root Source License (ROOT)](https://github.com/f12io/maple/blob/main/LICENSE), an MIT-style permissive license with an additional distribution condition for systems that can recreate the source on demand. © [f12.io](https://f12.io)
@@ -0,0 +1,445 @@
1
+ /**
2
+ * Include: <link rel="stylesheet" href="keyframes.css">
3
+ * Usage: <div class="anim-fade-in">Fades in</div>
4
+ */
5
+ /* ============================================
6
+ Fade Animations
7
+ ============================================ */
8
+
9
+ @keyframes fade-in {
10
+ from {
11
+ opacity: var(--fade-from-opacity, 0);
12
+ }
13
+ to {
14
+ opacity: var(--fade-to-opacity, 1);
15
+ }
16
+ }
17
+
18
+ @keyframes fade-out {
19
+ from {
20
+ opacity: var(--fade-from-opacity, 1);
21
+ }
22
+ to {
23
+ opacity: var(--fade-to-opacity, 0);
24
+ }
25
+ }
26
+
27
+ @keyframes fade-in-up {
28
+ from {
29
+ opacity: var(--fade-from-opacity, 0);
30
+ transform: translate3d(0, var(--fade-distance, 48px), 0)
31
+ scale(var(--fade-scale-from, 0.98));
32
+ }
33
+ to {
34
+ opacity: var(--fade-to-opacity, 1);
35
+ transform: translate3d(0, 0, 0) scale(1);
36
+ }
37
+ }
38
+
39
+ @keyframes fade-in-down {
40
+ from {
41
+ opacity: var(--fade-from-opacity, 0);
42
+ transform: translate3d(0, calc(var(--fade-distance, 48px) * -1), 0)
43
+ scale(var(--fade-scale-from, 0.98));
44
+ }
45
+ to {
46
+ opacity: var(--fade-to-opacity, 1);
47
+ transform: translate3d(0, 0, 0) scale(1);
48
+ }
49
+ }
50
+
51
+ @keyframes fade-in-left {
52
+ from {
53
+ opacity: var(--fade-from-opacity, 0);
54
+ transform: translate3d(var(--fade-distance, 48px), 0, 0)
55
+ scale(var(--fade-scale-from, 0.98));
56
+ }
57
+ to {
58
+ opacity: var(--fade-to-opacity, 1);
59
+ transform: translate3d(0, 0, 0) scale(1);
60
+ }
61
+ }
62
+
63
+ @keyframes fade-in-right {
64
+ from {
65
+ opacity: var(--fade-from-opacity, 0);
66
+ transform: translate3d(calc(var(--fade-distance, 48px) * -1), 0, 0)
67
+ scale(var(--fade-scale-from, 0.98));
68
+ }
69
+ to {
70
+ opacity: var(--fade-to-opacity, 1);
71
+ transform: translate3d(0, 0, 0) scale(1);
72
+ }
73
+ }
74
+
75
+ @keyframes fade-out-up {
76
+ from {
77
+ opacity: var(--fade-from-opacity, 1);
78
+ transform: translate3d(0, 0, 0) scale(1);
79
+ }
80
+ to {
81
+ opacity: var(--fade-to-opacity, 0);
82
+ transform: translate3d(0, calc(var(--fade-distance, 48px) * -1), 0)
83
+ scale(var(--fade-scale-to, 0.98));
84
+ }
85
+ }
86
+
87
+ @keyframes fade-out-down {
88
+ from {
89
+ opacity: var(--fade-from-opacity, 1);
90
+ transform: translate3d(0, 0, 0) scale(1);
91
+ }
92
+ to {
93
+ opacity: var(--fade-to-opacity, 0);
94
+ transform: translate3d(0, var(--fade-distance, 48px), 0)
95
+ scale(var(--fade-scale-to, 0.98));
96
+ }
97
+ }
98
+
99
+ @keyframes fade-out-left {
100
+ from {
101
+ opacity: var(--fade-from-opacity, 1);
102
+ transform: translate3d(0, 0, 0) scale(1);
103
+ }
104
+ to {
105
+ opacity: var(--fade-to-opacity, 0);
106
+ transform: translate3d(calc(var(--fade-distance, 48px) * -1), 0, 0)
107
+ scale(var(--fade-scale-to, 0.98));
108
+ }
109
+ }
110
+
111
+ @keyframes fade-out-right {
112
+ from {
113
+ opacity: var(--fade-from-opacity, 1);
114
+ transform: translate3d(0, 0, 0) scale(1);
115
+ }
116
+ to {
117
+ opacity: var(--fade-to-opacity, 0);
118
+ transform: translate3d(var(--fade-distance, 48px), 0, 0)
119
+ scale(var(--fade-scale-to, 0.98));
120
+ }
121
+ }
122
+
123
+ /* ============================================
124
+ Scale Animations
125
+ ============================================ */
126
+
127
+ @keyframes scale-in {
128
+ from {
129
+ opacity: var(--scale-from-opacity, 0);
130
+ transform: scale(var(--scale-from, 0.96));
131
+ }
132
+ to {
133
+ opacity: var(--scale-to-opacity, 1);
134
+ transform: scale(1);
135
+ }
136
+ }
137
+
138
+ @keyframes scale-out {
139
+ from {
140
+ opacity: var(--scale-from-opacity, 1);
141
+ transform: scale(1);
142
+ }
143
+ to {
144
+ opacity: var(--scale-to-opacity, 0);
145
+ transform: scale(var(--scale-to, 0.96));
146
+ }
147
+ }
148
+
149
+ /* ============================================
150
+ Slide Animations
151
+ ============================================ */
152
+
153
+ @keyframes slide-in-up {
154
+ from {
155
+ transform: translate3d(0, var(--slide-distance, 100%), 0);
156
+ }
157
+ to {
158
+ transform: translate3d(0, 0, 0);
159
+ }
160
+ }
161
+
162
+ @keyframes slide-in-down {
163
+ from {
164
+ transform: translate3d(0, calc(var(--slide-distance, 100%) * -1), 0);
165
+ }
166
+ to {
167
+ transform: translate3d(0, 0, 0);
168
+ }
169
+ }
170
+
171
+ @keyframes slide-in-left {
172
+ from {
173
+ transform: translate3d(var(--slide-distance, 100%), 0, 0);
174
+ }
175
+ to {
176
+ transform: translate3d(0, 0, 0);
177
+ }
178
+ }
179
+
180
+ @keyframes slide-in-right {
181
+ from {
182
+ transform: translate3d(calc(var(--slide-distance, 100%) * -1), 0, 0);
183
+ }
184
+ to {
185
+ transform: translate3d(0, 0, 0);
186
+ }
187
+ }
188
+
189
+ @keyframes slide-out-up {
190
+ from {
191
+ transform: translate3d(0, 0, 0);
192
+ }
193
+ to {
194
+ transform: translate3d(0, calc(var(--slide-distance, 100%) * -1), 0);
195
+ }
196
+ }
197
+
198
+ @keyframes slide-out-down {
199
+ from {
200
+ transform: translate3d(0, 0, 0);
201
+ }
202
+ to {
203
+ transform: translate3d(0, var(--slide-distance, 100%), 0);
204
+ }
205
+ }
206
+
207
+ @keyframes slide-out-left {
208
+ from {
209
+ transform: translate3d(0, 0, 0);
210
+ }
211
+ to {
212
+ transform: translate3d(calc(var(--slide-distance, 100%) * -1), 0, 0);
213
+ }
214
+ }
215
+
216
+ @keyframes slide-out-right {
217
+ from {
218
+ transform: translate3d(0, 0, 0);
219
+ }
220
+ to {
221
+ transform: translate3d(var(--slide-distance, 100%), 0, 0);
222
+ }
223
+ }
224
+
225
+ /* ============================================
226
+ Continuous Animations
227
+ ============================================ */
228
+
229
+ @keyframes spin {
230
+ to {
231
+ transform: rotate(360deg);
232
+ }
233
+ }
234
+
235
+ @keyframes ping {
236
+ 75%,
237
+ 100% {
238
+ transform: scale(var(--ping-scale, 2));
239
+ opacity: 0;
240
+ }
241
+ }
242
+
243
+ @keyframes pulse {
244
+ 0%,
245
+ 100% {
246
+ opacity: 1;
247
+ }
248
+ 50% {
249
+ opacity: var(--pulse-opacity, 0.5);
250
+ }
251
+ }
252
+
253
+ @keyframes bounce {
254
+ 0%,
255
+ 100% {
256
+ transform: translateY(calc(var(--bounce-distance, 25%) * -1));
257
+ animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
258
+ }
259
+ 50% {
260
+ transform: translateY(0);
261
+ animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
262
+ }
263
+ }
264
+
265
+ @keyframes float {
266
+ 0%,
267
+ 100% {
268
+ transform: translate3d(0, 0, 0);
269
+ }
270
+ 50% {
271
+ transform: translate3d(0, calc(var(--float-distance, 8px) * -1), 0);
272
+ }
273
+ }
274
+
275
+ @property --beam-angle {
276
+ syntax: '<angle>';
277
+ inherits: true;
278
+ initial-value: 0deg;
279
+ }
280
+
281
+ @keyframes border-beam {
282
+ from {
283
+ --beam-angle: 0deg;
284
+ }
285
+ to {
286
+ --beam-angle: 360deg;
287
+ }
288
+ }
289
+
290
+ .border-beam {
291
+ position: relative;
292
+ isolation: isolate;
293
+ }
294
+
295
+ .border-beam::before {
296
+ content: '';
297
+ position: absolute;
298
+ inset: calc(var(--beam-offset, 0px) * -1);
299
+ border-radius: var(--beam-radius, inherit);
300
+ padding: var(--beam-width, 1px);
301
+ pointer-events: none;
302
+ opacity: var(--beam-opacity, 1);
303
+ background: conic-gradient(
304
+ from var(--beam-angle),
305
+ transparent var(--beam-tail-start, 75%),
306
+ var(--beam-glow-color, color-mix(in oklch, currentColor 75%, transparent))
307
+ var(--beam-glow-start, 88%),
308
+ var(--beam-core-color, currentColor) var(--beam-core-start, 92%),
309
+ var(--beam-glow-color, color-mix(in oklch, currentColor 75%, transparent))
310
+ var(--beam-glow-end, 96%),
311
+ transparent 100%
312
+ );
313
+ mask:
314
+ linear-gradient(#fff 0 0) content-box,
315
+ linear-gradient(#fff 0 0);
316
+ mask-composite: exclude;
317
+ -webkit-mask:
318
+ linear-gradient(#fff 0 0) content-box,
319
+ linear-gradient(#fff 0 0);
320
+ -webkit-mask-composite: xor;
321
+ }
322
+
323
+ /* ============================================
324
+ Attention Seekers
325
+ ============================================ */
326
+
327
+ @keyframes shake-x {
328
+ 0%,
329
+ 100% {
330
+ transform: translate3d(0, 0, 0);
331
+ }
332
+ 15% {
333
+ transform: translate3d(calc(var(--shake-distance, 10px) * -1), 0, 0);
334
+ }
335
+ 30% {
336
+ transform: translate3d(var(--shake-distance, 10px), 0, 0);
337
+ }
338
+ 45% {
339
+ transform: translate3d(calc(var(--shake-distance, 10px) * -0.66), 0, 0);
340
+ }
341
+ 60% {
342
+ transform: translate3d(calc(var(--shake-distance, 10px) * 0.66), 0, 0);
343
+ }
344
+ 75% {
345
+ transform: translate3d(calc(var(--shake-distance, 10px) * -0.33), 0, 0);
346
+ }
347
+ 90% {
348
+ transform: translate3d(calc(var(--shake-distance, 10px) * 0.33), 0, 0);
349
+ }
350
+ }
351
+
352
+ @keyframes shake-y {
353
+ 0%,
354
+ 100% {
355
+ transform: translate3d(0, 0, 0);
356
+ }
357
+ 15% {
358
+ transform: translate3d(0, calc(var(--shake-distance, 10px) * -1), 0);
359
+ }
360
+ 30% {
361
+ transform: translate3d(0, var(--shake-distance, 10px), 0);
362
+ }
363
+ 45% {
364
+ transform: translate3d(0, calc(var(--shake-distance, 10px) * -0.66), 0);
365
+ }
366
+ 60% {
367
+ transform: translate3d(0, calc(var(--shake-distance, 10px) * 0.66), 0);
368
+ }
369
+ 75% {
370
+ transform: translate3d(0, calc(var(--shake-distance, 10px) * -0.33), 0);
371
+ }
372
+ 90% {
373
+ transform: translate3d(0, calc(var(--shake-distance, 10px) * 0.33), 0);
374
+ }
375
+ }
376
+
377
+ @keyframes beat {
378
+ 0%,
379
+ 100% {
380
+ transform: scale(1);
381
+ }
382
+ 14% {
383
+ transform: scale(var(--beat-scale, 1.12));
384
+ }
385
+ 28% {
386
+ transform: scale(1);
387
+ }
388
+ 42% {
389
+ transform: scale(var(--beat-scale, 1.12));
390
+ }
391
+ 70% {
392
+ transform: scale(1);
393
+ }
394
+ }
395
+
396
+ @keyframes bell {
397
+ 0%,
398
+ 100% {
399
+ transform: rotate(0deg);
400
+ transform-origin: var(--bell-origin, top center);
401
+ }
402
+ 15% {
403
+ transform: rotate(var(--bell-angle, 10deg));
404
+ }
405
+ 30% {
406
+ transform: rotate(calc(var(--bell-angle, 10deg) * -0.8));
407
+ }
408
+ 45% {
409
+ transform: rotate(calc(var(--bell-angle, 10deg) * 0.6));
410
+ }
411
+ 60% {
412
+ transform: rotate(calc(var(--bell-angle, 10deg) * -0.4));
413
+ }
414
+ 75% {
415
+ transform: rotate(calc(var(--bell-angle, 10deg) * 0.2));
416
+ }
417
+ }
418
+
419
+ @keyframes wiggle {
420
+ 0%,
421
+ 100% {
422
+ transform: rotate(0deg);
423
+ }
424
+ 12.5% {
425
+ transform: rotate(calc(var(--wiggle-angle, 10deg) * -1));
426
+ }
427
+ 25% {
428
+ transform: rotate(calc(var(--wiggle-angle, 10deg) * 0.8));
429
+ }
430
+ 37.5% {
431
+ transform: rotate(calc(var(--wiggle-angle, 10deg) * -0.65));
432
+ }
433
+ 50% {
434
+ transform: rotate(calc(var(--wiggle-angle, 10deg) * 0.5));
435
+ }
436
+ 62.5% {
437
+ transform: rotate(calc(var(--wiggle-angle, 10deg) * -0.35));
438
+ }
439
+ 75% {
440
+ transform: rotate(calc(var(--wiggle-angle, 10deg) * 0.2));
441
+ }
442
+ 87.5% {
443
+ transform: rotate(calc(var(--wiggle-angle, 10deg) * -0.1));
444
+ }
445
+ }