@greese/ui 0.0.0-stage → 1.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.
Files changed (288) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +55 -2
  3. package/bin/greese-utilities.mjs +56 -0
  4. package/dist/_layers.scss +2 -0
  5. package/dist/_maps.scss +1884 -0
  6. package/dist/_tokens-base.scss +174 -0
  7. package/dist/_tokens.scss +2140 -0
  8. package/dist/base.css +67 -0
  9. package/dist/colorScheme.d.ts +16 -0
  10. package/dist/colorScheme.js +13 -0
  11. package/dist/contrast.d.ts +15 -0
  12. package/dist/contrast.js +43 -0
  13. package/dist/css/Accordion.css +9 -0
  14. package/dist/css/ActionSelect.css +6 -0
  15. package/dist/css/Alert.css +84 -0
  16. package/dist/css/AppBar.css +35 -0
  17. package/dist/css/AspectRatio.css +40 -0
  18. package/dist/css/AutoLayout.css +508 -0
  19. package/dist/css/Avatar.css +88 -0
  20. package/dist/css/Badge.css +66 -0
  21. package/dist/css/Box.css +640 -0
  22. package/dist/css/Breadcrumbs.css +57 -0
  23. package/dist/css/Button.css +275 -0
  24. package/dist/css/ButtonGroup.css +40 -0
  25. package/dist/css/Card.css +101 -0
  26. package/dist/css/Carousel.css +170 -0
  27. package/dist/css/Center.css +11 -0
  28. package/dist/css/ChatBubble.css +128 -0
  29. package/dist/css/Checkbox.css +65 -0
  30. package/dist/css/Chip.css +124 -0
  31. package/dist/css/ChoiceGroup.css +57 -0
  32. package/dist/css/Code.css +29 -0
  33. package/dist/css/Collapsible.css +126 -0
  34. package/dist/css/ColorPicker.css +191 -0
  35. package/dist/css/Combobox.css +90 -0
  36. package/dist/css/Container.css +30 -0
  37. package/dist/css/Countdown.css +25 -0
  38. package/dist/css/DateField.css +15 -0
  39. package/dist/css/Dialog.css +640 -0
  40. package/dist/css/Diff.css +103 -0
  41. package/dist/css/Divider.css +19 -0
  42. package/dist/css/Dock.css +91 -0
  43. package/dist/css/Field.css +33 -0
  44. package/dist/css/Fieldset.css +54 -0
  45. package/dist/css/FileInput.css +65 -0
  46. package/dist/css/Footer.css +72 -0
  47. package/dist/css/Grid.css +998 -0
  48. package/dist/css/Header.css +89 -0
  49. package/dist/css/Heading.css +6 -0
  50. package/dist/css/Icon.css +12 -0
  51. package/dist/css/IconButton.css +7 -0
  52. package/dist/css/Image.css +69 -0
  53. package/dist/css/Indicator.css +41 -0
  54. package/dist/css/Input.css +115 -0
  55. package/dist/css/Key.css +42 -0
  56. package/dist/css/Link.css +72 -0
  57. package/dist/css/List.css +52 -0
  58. package/dist/css/Media.css +8 -0
  59. package/dist/css/Menu.css +161 -0
  60. package/dist/css/Motion.css +1356 -0
  61. package/dist/css/NumberField.css +49 -0
  62. package/dist/css/OtpField.css +90 -0
  63. package/dist/css/PageTransition.css +991 -0
  64. package/dist/css/Pagination.css +43 -0
  65. package/dist/css/Popover.css +93 -0
  66. package/dist/css/Progress.css +101 -0
  67. package/dist/css/RadialProgress.css +44 -0
  68. package/dist/css/Radio.css +41 -0
  69. package/dist/css/Rating.css +100 -0
  70. package/dist/css/ScrollSpy.css +6 -0
  71. package/dist/css/SegmentedControl.css +101 -0
  72. package/dist/css/Select.css +115 -0
  73. package/dist/css/Sidebar.css +207 -0
  74. package/dist/css/Skeleton.css +48 -0
  75. package/dist/css/Slider.css +75 -0
  76. package/dist/css/Spacer.css +34 -0
  77. package/dist/css/SpeedDial.css +165 -0
  78. package/dist/css/Spinner.css +44 -0
  79. package/dist/css/Stack.css +528 -0
  80. package/dist/css/Stat.css +107 -0
  81. package/dist/css/Status.css +86 -0
  82. package/dist/css/Steps.css +201 -0
  83. package/dist/css/Swap.css +49 -0
  84. package/dist/css/Switch.css +66 -0
  85. package/dist/css/Table.css +269 -0
  86. package/dist/css/Tabs.css +119 -0
  87. package/dist/css/Text.css +60 -0
  88. package/dist/css/TextRotate.css +147 -0
  89. package/dist/css/Textarea.css +107 -0
  90. package/dist/css/ThemeProvider.css +6 -0
  91. package/dist/css/Tile.css +18 -0
  92. package/dist/css/Toast.css +110 -0
  93. package/dist/css/ToggleButton.css +20 -0
  94. package/dist/css/Tooltip.css +94 -0
  95. package/dist/css/Type.css +211 -0
  96. package/dist/css/Visibility.css +78 -0
  97. package/dist/css/VisuallyHidden.css +15 -0
  98. package/dist/css/core.css +251 -0
  99. package/dist/css.d.ts +29 -0
  100. package/dist/css.js +28 -0
  101. package/dist/effect-classes.d.ts +8 -0
  102. package/dist/effect-classes.js +5 -0
  103. package/dist/effects/css.d.ts +71 -0
  104. package/dist/effects/css.js +184 -0
  105. package/dist/effects/definitions.d.ts +555 -0
  106. package/dist/effects/definitions.js +379 -0
  107. package/dist/effects/frames.d.ts +18 -0
  108. package/dist/effects/frames.js +68 -0
  109. package/dist/effects/sequence.d.ts +33 -0
  110. package/dist/effects/sequence.js +106 -0
  111. package/dist/effects.d.ts +30 -0
  112. package/dist/effects.js +30 -0
  113. package/dist/greese.css +11919 -0
  114. package/dist/index.d.ts +10 -0
  115. package/dist/index.js +10 -0
  116. package/dist/kebab.d.ts +2 -0
  117. package/dist/kebab.js +2 -0
  118. package/dist/palette.css +249 -0
  119. package/dist/palette.d.ts +599 -0
  120. package/dist/palette.js +334 -0
  121. package/dist/shapes.d.ts +193 -0
  122. package/dist/shapes.js +852 -0
  123. package/dist/storage.d.ts +47 -0
  124. package/dist/storage.js +118 -0
  125. package/dist/style-manifest.json +3017 -0
  126. package/dist/theme.d.ts +71 -0
  127. package/dist/theme.js +180 -0
  128. package/dist/tokens.css +253 -0
  129. package/dist/tokens.d.ts +343 -0
  130. package/dist/tokens.js +179 -0
  131. package/dist/typography.d.ts +55 -0
  132. package/dist/typography.js +144 -0
  133. package/dist/utilities.css +6975 -0
  134. package/dist/utilities.d.ts +82 -0
  135. package/dist/utilities.js +636 -0
  136. package/dist/utilitiesFiles.d.ts +18 -0
  137. package/dist/utilitiesFiles.js +26 -0
  138. package/dist/vite.d.ts +40 -0
  139. package/dist/vite.js +43 -0
  140. package/package.json +131 -4
  141. package/src/components/Accordion/Accordion.scss +9 -0
  142. package/src/components/ActionSelect/ActionSelect.scss +6 -0
  143. package/src/components/Alert/Alert.scss +71 -0
  144. package/src/components/AppBar/AppBar.scss +43 -0
  145. package/src/components/AspectRatio/AspectRatio.scss +22 -0
  146. package/src/components/AutoLayout/AutoLayout.scss +90 -0
  147. package/src/components/Avatar/Avatar.scss +91 -0
  148. package/src/components/Badge/Badge.scss +52 -0
  149. package/src/components/Box/Box.scss +63 -0
  150. package/src/components/Breadcrumbs/Breadcrumbs.scss +59 -0
  151. package/src/components/Button/Button.scss +231 -0
  152. package/src/components/ButtonGroup/ButtonGroup.scss +56 -0
  153. package/src/components/Card/Card.scss +99 -0
  154. package/src/components/Carousel/Carousel.scss +161 -0
  155. package/src/components/Center/Center.scss +11 -0
  156. package/src/components/ChatBubble/ChatBubble.scss +119 -0
  157. package/src/components/Checkbox/Checkbox.scss +66 -0
  158. package/src/components/Chip/Chip.scss +119 -0
  159. package/src/components/ChoiceGroup/ChoiceGroup.scss +69 -0
  160. package/src/components/Code/Code.scss +28 -0
  161. package/src/components/Collapsible/Collapsible.scss +136 -0
  162. package/src/components/ColorPicker/ColorPicker.scss +235 -0
  163. package/src/components/Combobox/Combobox.scss +83 -0
  164. package/src/components/Container/Container.scss +28 -0
  165. package/src/components/Countdown/Countdown.scss +28 -0
  166. package/src/components/DateField/DateField.scss +19 -0
  167. package/src/components/Dialog/Dialog.scss +268 -0
  168. package/src/components/Diff/Diff.scss +125 -0
  169. package/src/components/Divider/Divider.scss +22 -0
  170. package/src/components/Dock/Dock.scss +86 -0
  171. package/src/components/Field/Field.scss +38 -0
  172. package/src/components/Fieldset/Fieldset.scss +63 -0
  173. package/src/components/FileInput/FileInput.scss +66 -0
  174. package/src/components/Footer/Footer.scss +79 -0
  175. package/src/components/Grid/Grid.scss +86 -0
  176. package/src/components/Header/Header.scss +111 -0
  177. package/src/components/Heading/Heading.scss +7 -0
  178. package/src/components/Icon/Icon.scss +12 -0
  179. package/src/components/IconButton/IconButton.scss +6 -0
  180. package/src/components/Image/Image.scss +46 -0
  181. package/src/components/Indicator/Indicator.scss +48 -0
  182. package/src/components/Input/Input.scss +58 -0
  183. package/src/components/Key/Key.scss +48 -0
  184. package/src/components/Link/Link.scss +50 -0
  185. package/src/components/List/List.scss +62 -0
  186. package/src/components/Media/Media.scss +7 -0
  187. package/src/components/Menu/Menu.scss +91 -0
  188. package/src/components/Motion/Motion.scss +106 -0
  189. package/src/components/NumberField/NumberField.scss +44 -0
  190. package/src/components/OtpField/OtpField.scss +91 -0
  191. package/src/components/PageTransition/PageTransition.scss +197 -0
  192. package/src/components/Pagination/Pagination.scss +55 -0
  193. package/src/components/Popover/Popover.scss +13 -0
  194. package/src/components/Progress/Progress.scss +126 -0
  195. package/src/components/RadialProgress/RadialProgress.scss +65 -0
  196. package/src/components/Radio/Radio.scss +36 -0
  197. package/src/components/Rating/Rating.scss +121 -0
  198. package/src/components/ScrollSpy/ScrollSpy.scss +6 -0
  199. package/src/components/SegmentedControl/SegmentedControl.scss +107 -0
  200. package/src/components/Select/Select.scss +59 -0
  201. package/src/components/Sidebar/Sidebar.scss +88 -0
  202. package/src/components/Skeleton/Skeleton.scss +60 -0
  203. package/src/components/Slider/Slider.scss +96 -0
  204. package/src/components/Spacer/Spacer.scss +15 -0
  205. package/src/components/SpeedDial/SpeedDial.scss +109 -0
  206. package/src/components/Spinner/Spinner.scss +43 -0
  207. package/src/components/Stack/Stack.scss +57 -0
  208. package/src/components/Stat/Stat.scss +96 -0
  209. package/src/components/Status/Status.scss +60 -0
  210. package/src/components/Steps/Steps.scss +216 -0
  211. package/src/components/Swap/Swap.scss +62 -0
  212. package/src/components/Switch/Switch.scss +63 -0
  213. package/src/components/Table/Table.scss +183 -0
  214. package/src/components/Tabs/Tabs.scss +108 -0
  215. package/src/components/Text/Text.scss +34 -0
  216. package/src/components/TextRotate/TextRotate.scss +51 -0
  217. package/src/components/Textarea/Textarea.scss +56 -0
  218. package/src/components/ThemeProvider/ThemeProvider.scss +7 -0
  219. package/src/components/Tile/Tile.scss +23 -0
  220. package/src/components/Toast/Toast.scss +93 -0
  221. package/src/components/ToggleButton/ToggleButton.scss +23 -0
  222. package/src/components/Tooltip/Tooltip.scss +21 -0
  223. package/src/components/Type/Type.scss +35 -0
  224. package/src/components/Visibility/Visibility.scss +39 -0
  225. package/src/components/VisuallyHidden/VisuallyHidden.scss +17 -0
  226. package/src/styles/_breakpoint-vars.scss +16 -0
  227. package/src/styles/_config.scss +48 -0
  228. package/src/styles/_controls.scss +88 -0
  229. package/src/styles/_core.scss +4 -0
  230. package/src/styles/_effect.scss +51 -0
  231. package/src/styles/_floating.scss +141 -0
  232. package/src/styles/_kit.scss +1548 -0
  233. package/src/styles/_manifest.scss +670 -0
  234. package/src/styles/_mixins.scss +261 -0
  235. package/src/styles/_tones.scss +63 -0
  236. package/src/styles/_type-emit.scss +76 -0
  237. package/src/styles/_typography-vars.scss +8 -0
  238. package/src/styles/base.scss +80 -0
  239. package/src/styles/breakpoints.test.ts +73 -0
  240. package/src/styles/entryPoints.test.ts +68 -0
  241. package/src/styles/index.scss +93 -0
  242. package/src/styles/kit.test.ts +754 -0
  243. package/src/styles/public/_controls.scss +3 -0
  244. package/src/styles/public/_floating.scss +3 -0
  245. package/src/styles/public/_mixins.scss +5 -0
  246. package/src/styles/public/_tones.scss +4 -0
  247. package/themes/bevel.css +1077 -0
  248. package/themes/bevel.scss +1166 -0
  249. package/themes/candy.css +87 -0
  250. package/themes/candy.scss +32 -0
  251. package/themes/depth.css +123 -0
  252. package/themes/depth.scss +46 -0
  253. package/themes/extrude.css +219 -0
  254. package/themes/extrude.scss +255 -0
  255. package/themes/folio.css +986 -0
  256. package/themes/folio.scss +1047 -0
  257. package/themes/forest.css +87 -0
  258. package/themes/forest.scss +32 -0
  259. package/themes/gentle.css +66 -0
  260. package/themes/gentle.scss +39 -0
  261. package/themes/grape.css +87 -0
  262. package/themes/grape.scss +32 -0
  263. package/themes/greese.css +36 -0
  264. package/themes/greese.scss +21 -0
  265. package/themes/mono.css +87 -0
  266. package/themes/mono.scss +32 -0
  267. package/themes/ocean.css +87 -0
  268. package/themes/ocean.scss +32 -0
  269. package/themes/outline.css +127 -0
  270. package/themes/outline.scss +126 -0
  271. package/themes/pebble.css +65 -0
  272. package/themes/pebble.scss +69 -0
  273. package/themes/pocket.css +137 -0
  274. package/themes/pocket.scss +45 -0
  275. package/themes/ridge.css +927 -0
  276. package/themes/ridge.scss +998 -0
  277. package/themes/snappy.css +82 -0
  278. package/themes/snappy.scss +40 -0
  279. package/themes/soft.css +79 -0
  280. package/themes/soft.scss +84 -0
  281. package/themes/sunset.css +87 -0
  282. package/themes/sunset.scss +32 -0
  283. package/themes/ticket.css +960 -0
  284. package/themes/ticket.scss +1031 -0
  285. package/themes/tilt.css +148 -0
  286. package/themes/tilt.scss +169 -0
  287. package/themes/wipe.css +186 -0
  288. package/themes/wipe.scss +46 -0
@@ -0,0 +1,555 @@
1
+ /** The built-in effects' definitions: base effects, combos, and how far they reach. */
2
+ export type Value = string | number;
3
+ /** greese.js keyframes: property → values spread over 0–1, or a list of frames. */
4
+ export type EffectFrames = {
5
+ readonly [property: string]: Value | readonly Value[];
6
+ } | ReadonlyArray<{
7
+ readonly [property: string]: Value | undefined;
8
+ offset?: number;
9
+ }>;
10
+ /**
11
+ * How far an effect travels, in the form its player needs. In JavaScript these
12
+ * are plain lengths flipped for the writing direction; in CSS they are
13
+ * `calc()`s over `--greese-motion-distance` and `--greese-motion-dir`.
14
+ */
15
+ export interface Reach {
16
+ /** The `distance` option. */
17
+ distance: string;
18
+ /** A length the other way. */
19
+ negate: (length: string) => string;
20
+ /** A length towards the inline start (left in LTR). */
21
+ start: (length: string) => string;
22
+ /** A length towards the inline end. */
23
+ end: (length: string) => string;
24
+ }
25
+ /** Keys every call accepts, in the order positional arguments fill them. */
26
+ export declare const timingKeys: readonly ["duration", "offset", "ease"];
27
+ /** What a call may set about its timing, as parsed: seconds, and an ease name. */
28
+ export interface Timing {
29
+ /** Seconds this effect takes. Overrides the instance's `duration`. */
30
+ duration?: number;
31
+ /** Seconds after its step starts. */
32
+ offset?: number;
33
+ /** A greese.js ease. */
34
+ ease?: string;
35
+ }
36
+ export type Stop = readonly [offset: number, value: Value];
37
+ export type Params = Readonly<Record<string, Value>>;
38
+ export interface BaseDefinition<P extends Params = Params> {
39
+ /** The one property it animates, as greese.js names it (`opacity`, `y`, `scale`…). */
40
+ property: string;
41
+ /** Every parameter and its default; `start` and `end` come first. */
42
+ params: P;
43
+ /** Where the values sit in time, 0–1. Default: `start` at 0, `end` at 1. */
44
+ stops?(params: P): readonly Stop[];
45
+ /** A parameter as the property's value (`8` → `blur(8px)`). */
46
+ format?(value: Value): Value;
47
+ /** Properties that hold one value throughout, beside the animated one (a mask's image). */
48
+ fixed?: Readonly<Record<string, Value>>;
49
+ }
50
+ export declare const base: <const P extends Params>(definition: BaseDefinition<P>) => BaseDefinition<P>;
51
+ export declare const px: (fn: string) => (value: Value) => string;
52
+ export declare const plain: (fn: string) => (value: Value) => string;
53
+ export declare const ZERO = "0px";
54
+ /**
55
+ * Wipes and pockets: a mask that shows everything, anchored at one side (or
56
+ * the middle), sized from `start` to `end`. A mask, not `clip-path`, because
57
+ * the clip belongs to the element's shape and a mask composes with it (ADR
58
+ * 0024); it exists only while the effect plays.
59
+ */
60
+ export declare const SOLID = "linear-gradient(black, black)";
61
+ export declare const WHOLE = "100% 100%";
62
+ export declare const masked: (position: string, start: string, end: string) => BaseDefinition<{
63
+ readonly start: string;
64
+ readonly end: string;
65
+ }>;
66
+ /** The directions wipes and pockets go in (physical, like the slides): x, y. */
67
+ export declare const DIRECTIONS: {
68
+ readonly Right: readonly [1, 0];
69
+ readonly Left: readonly [-1, 0];
70
+ readonly Up: readonly [0, -1];
71
+ readonly Down: readonly [0, 1];
72
+ readonly DownRight: readonly [1, 1];
73
+ readonly DownLeft: readonly [-1, 1];
74
+ readonly UpRight: readonly [1, -1];
75
+ readonly UpLeft: readonly [-1, -1];
76
+ };
77
+ export type Direction = keyof typeof DIRECTIONS;
78
+ /** The directions wipes and pockets go in, by name: `Right`, `DownLeft`… */
79
+ export declare const effectDirections: Direction[];
80
+ /** `50% 0%` for a side: where a direction comes from (`-1`) or goes to (`1`). */
81
+ export declare const side: (dx: number, dy: number, toward: 1 | -1) => string;
82
+ /** The mask's size with the moving axes at `amount`. */
83
+ export declare const sized: (dx: number, dy: number, amount: string) => string;
84
+ /**
85
+ * A wipe in `direction`: arriving, the edge sweeps that way and reveals the
86
+ * element from the side it leaves; leaving, it sweeps that way and covers it.
87
+ */
88
+ export declare const wipes: Record<`wipe${Direction}` | `wipeOut${Direction}`, BaseDefinition>;
89
+ /**
90
+ * An iris: an opening the element's shape (an ellipse in its proportions)
91
+ * that grows from, or shrinks to, a point: the middle, a side or a corner. The
92
+ * mask is anchored at that point, so it stays put while the opening changes
93
+ * size. `IRIS_OPEN` is where it just covers the farthest corner from any of
94
+ * those points, so the whole run is visible change, in and out alike.
95
+ */
96
+ export declare const iris: (at: string, start: string, end: string) => BaseDefinition<{
97
+ readonly start: string;
98
+ readonly end: string;
99
+ }>;
100
+ export declare const OPEN = "142% 142%";
101
+ export declare const SHUT = "0% 0%";
102
+ /**
103
+ * Leaving, the opening closes toward the side it goes to; arriving, it plays
104
+ * that backwards, opening from the same side, so an entrance is its exit
105
+ * reversed.
106
+ */
107
+ export declare const irises: Record<`iris${Direction}` | `irisOut${Direction}`, BaseDefinition>;
108
+ /**
109
+ * Three-dimensional turns and depth: `transform`, with its own perspective, so
110
+ * they foreshorten wherever they play, with no `perspective` on a parent. Not
111
+ * the individual `translate`/`rotate`/`scale` the other effects animate, so
112
+ * they compose with those, and never with a shape's clip-path (applied before
113
+ * the transform, it turns with the element).
114
+ */
115
+ export declare const PERSPECTIVE = "perspective(800px)";
116
+ export declare const turn: (axis: "X" | "Y", start: number, end: number, origin?: string) => BaseDefinition<{
117
+ readonly start: number;
118
+ readonly end: number;
119
+ }>;
120
+ /** The flips' directions: the axis each turns about, and which way. */
121
+ export declare const FLIPS: {
122
+ readonly Up: readonly ["X", 1];
123
+ readonly Down: readonly ["X", -1];
124
+ readonly Left: readonly ["Y", 1];
125
+ readonly Right: readonly ["Y", -1];
126
+ };
127
+ /**
128
+ * A flip over: a panel turned half a turn about its middle, its two faces
129
+ * the old and the new: arriving, it turns from its back (180 degrees) to its
130
+ * front; leaving, from its front to its back, the same way, so a pair played
131
+ * together turns as one panel. The back face is hidden, so each shows only
132
+ * while it faces the viewer, and the switch is at the quarter turn. A longer
133
+ * perspective than a flip's, so a panel as wide as the screen doesn't swing
134
+ * through the viewer at the quarter turn.
135
+ */
136
+ export declare const FLIP_OVER_PERSPECTIVE = "perspective(2000px)";
137
+ export declare const flipOvers: Record<`flipOver${keyof typeof FLIPS}` | `flipOverOut${keyof typeof FLIPS}`, BaseDefinition>;
138
+ export declare const baseEffects: {
139
+ readonly flipOverRight: BaseDefinition<Readonly<Record<string, Value>>>;
140
+ readonly flipOverLeft: BaseDefinition<Readonly<Record<string, Value>>>;
141
+ readonly flipOverUp: BaseDefinition<Readonly<Record<string, Value>>>;
142
+ readonly flipOverDown: BaseDefinition<Readonly<Record<string, Value>>>;
143
+ readonly flipOverOutRight: BaseDefinition<Readonly<Record<string, Value>>>;
144
+ readonly flipOverOutLeft: BaseDefinition<Readonly<Record<string, Value>>>;
145
+ readonly flipOverOutUp: BaseDefinition<Readonly<Record<string, Value>>>;
146
+ readonly flipOverOutDown: BaseDefinition<Readonly<Record<string, Value>>>;
147
+ readonly turnX: BaseDefinition<{
148
+ readonly start: number;
149
+ readonly end: number;
150
+ }>;
151
+ readonly turnY: BaseDefinition<{
152
+ readonly start: number;
153
+ readonly end: number;
154
+ }>;
155
+ readonly depth: BaseDefinition<{
156
+ readonly start: 0;
157
+ readonly end: 0;
158
+ }>;
159
+ readonly hinge: BaseDefinition<{
160
+ readonly start: number;
161
+ readonly end: number;
162
+ }>;
163
+ readonly irisRight: BaseDefinition<Readonly<Record<string, Value>>>;
164
+ readonly irisLeft: BaseDefinition<Readonly<Record<string, Value>>>;
165
+ readonly irisUp: BaseDefinition<Readonly<Record<string, Value>>>;
166
+ readonly irisDown: BaseDefinition<Readonly<Record<string, Value>>>;
167
+ readonly irisDownRight: BaseDefinition<Readonly<Record<string, Value>>>;
168
+ readonly irisDownLeft: BaseDefinition<Readonly<Record<string, Value>>>;
169
+ readonly irisUpRight: BaseDefinition<Readonly<Record<string, Value>>>;
170
+ readonly irisUpLeft: BaseDefinition<Readonly<Record<string, Value>>>;
171
+ readonly irisOutRight: BaseDefinition<Readonly<Record<string, Value>>>;
172
+ readonly irisOutLeft: BaseDefinition<Readonly<Record<string, Value>>>;
173
+ readonly irisOutUp: BaseDefinition<Readonly<Record<string, Value>>>;
174
+ readonly irisOutDown: BaseDefinition<Readonly<Record<string, Value>>>;
175
+ readonly irisOutDownRight: BaseDefinition<Readonly<Record<string, Value>>>;
176
+ readonly irisOutDownLeft: BaseDefinition<Readonly<Record<string, Value>>>;
177
+ readonly irisOutUpRight: BaseDefinition<Readonly<Record<string, Value>>>;
178
+ readonly irisOutUpLeft: BaseDefinition<Readonly<Record<string, Value>>>;
179
+ readonly wipeOpenX: BaseDefinition<{
180
+ readonly start: string;
181
+ readonly end: string;
182
+ }>;
183
+ readonly wipeOpenY: BaseDefinition<{
184
+ readonly start: string;
185
+ readonly end: string;
186
+ }>;
187
+ readonly wipeCloseX: BaseDefinition<{
188
+ readonly start: string;
189
+ readonly end: string;
190
+ }>;
191
+ readonly wipeCloseY: BaseDefinition<{
192
+ readonly start: string;
193
+ readonly end: string;
194
+ }>;
195
+ readonly irisIn: BaseDefinition<{
196
+ readonly start: string;
197
+ readonly end: string;
198
+ }>;
199
+ readonly irisOut: BaseDefinition<{
200
+ readonly start: string;
201
+ readonly end: string;
202
+ }>;
203
+ readonly wipeRight: BaseDefinition<Readonly<Record<string, Value>>>;
204
+ readonly wipeLeft: BaseDefinition<Readonly<Record<string, Value>>>;
205
+ readonly wipeUp: BaseDefinition<Readonly<Record<string, Value>>>;
206
+ readonly wipeDown: BaseDefinition<Readonly<Record<string, Value>>>;
207
+ readonly wipeDownRight: BaseDefinition<Readonly<Record<string, Value>>>;
208
+ readonly wipeDownLeft: BaseDefinition<Readonly<Record<string, Value>>>;
209
+ readonly wipeUpRight: BaseDefinition<Readonly<Record<string, Value>>>;
210
+ readonly wipeUpLeft: BaseDefinition<Readonly<Record<string, Value>>>;
211
+ readonly wipeOutRight: BaseDefinition<Readonly<Record<string, Value>>>;
212
+ readonly wipeOutLeft: BaseDefinition<Readonly<Record<string, Value>>>;
213
+ readonly wipeOutUp: BaseDefinition<Readonly<Record<string, Value>>>;
214
+ readonly wipeOutDown: BaseDefinition<Readonly<Record<string, Value>>>;
215
+ readonly wipeOutDownRight: BaseDefinition<Readonly<Record<string, Value>>>;
216
+ readonly wipeOutDownLeft: BaseDefinition<Readonly<Record<string, Value>>>;
217
+ readonly wipeOutUpRight: BaseDefinition<Readonly<Record<string, Value>>>;
218
+ readonly wipeOutUpLeft: BaseDefinition<Readonly<Record<string, Value>>>;
219
+ readonly fadeIn: BaseDefinition<{
220
+ readonly start: 0;
221
+ readonly end: 1;
222
+ }>;
223
+ readonly fadeOut: BaseDefinition<{
224
+ readonly start: 1;
225
+ readonly end: 0;
226
+ }>;
227
+ readonly scaleIn: BaseDefinition<{
228
+ readonly start: 0;
229
+ readonly end: 1;
230
+ }>;
231
+ readonly scaleOut: BaseDefinition<{
232
+ readonly start: 1;
233
+ readonly end: 0;
234
+ }>;
235
+ readonly blurIn: BaseDefinition<{
236
+ readonly start: 8;
237
+ readonly end: 0;
238
+ }>;
239
+ readonly blurOut: BaseDefinition<{
240
+ readonly start: 0;
241
+ readonly end: 8;
242
+ }>;
243
+ readonly slideUp: BaseDefinition<{
244
+ readonly start: "100%";
245
+ readonly end: "0%";
246
+ }>;
247
+ readonly slideDown: BaseDefinition<{
248
+ readonly start: "-100%";
249
+ readonly end: "0%";
250
+ }>;
251
+ readonly slideRight: BaseDefinition<{
252
+ readonly start: "-100%";
253
+ readonly end: "0%";
254
+ }>;
255
+ readonly slideLeft: BaseDefinition<{
256
+ readonly start: "100%";
257
+ readonly end: "0%";
258
+ }>;
259
+ readonly pop: BaseDefinition<{
260
+ readonly start: 1;
261
+ readonly end: 1;
262
+ readonly peak: 1.075;
263
+ readonly peakAt: 0.6;
264
+ }>;
265
+ readonly squish: BaseDefinition<{
266
+ readonly start: 1;
267
+ readonly end: 0.96;
268
+ }>;
269
+ readonly tilt: BaseDefinition<{
270
+ readonly start: 0;
271
+ readonly end: -2;
272
+ }>;
273
+ readonly glow: BaseDefinition<{
274
+ readonly start: 1;
275
+ readonly end: 1.12;
276
+ }>;
277
+ };
278
+ export type BaseEffect = keyof typeof baseEffects;
279
+ export type ParamsOf<K extends BaseEffect> = (typeof baseEffects)[K]['params'];
280
+ /** What a call to a base effect may set: any of its parameters. */
281
+ export type BaseArgs<K extends BaseEffect> = {
282
+ [P in keyof ParamsOf<K>]?: Value;
283
+ };
284
+ /** A base effect inside a combo, and where in the combo's time it plays. */
285
+ export interface Part {
286
+ effect: BaseEffect;
287
+ args: Record<string, Value | undefined>;
288
+ /** The share of the combo it spans, `[from, to]` in 0–1. Default: all of it. */
289
+ at: readonly [from: number, to: number];
290
+ }
291
+ /** `effect` must be a base effect's name: a typo, or a combo, fails to compile. */
292
+ export declare const part: <K extends BaseEffect>(effect: K, args?: BaseArgs<K>, at?: readonly [number, number]) => Part;
293
+ export interface ComboDefinition {
294
+ /** Every parameter and its default; it may read how far things travel. */
295
+ params: (reach: Reach) => Params;
296
+ parts: (params: Params, reach: Reach) => readonly Part[];
297
+ }
298
+ export declare const combo: (definition: ComboDefinition) => ComboDefinition;
299
+ export declare const away: ({ distance }: Reach) => {
300
+ distance: string;
301
+ };
302
+ /**
303
+ * A pocket: the element moves out of (or into) an invisible slot at one of
304
+ * its own edges. It slides `distance` (its whole size, by default, so it
305
+ * starts or ends out of sight) while a mask anchored where it's going grows or
306
+ * shrinks by the same amount, so the window it shows through stays where the
307
+ * element rests. Arriving, it moves `direction`; leaving, it moves on that
308
+ * way, into the slot on that side.
309
+ */
310
+ export declare const pocket: (direction: Direction, leaving: boolean) => ComboDefinition;
311
+ export declare const pockets: Record<`pocket${Direction}` | `pocketOut${Direction}`, ComboDefinition>;
312
+ /**
313
+ * A flip: the element turns into place about its middle, from `angle` degrees
314
+ * (75 by default) toward the direction it arrives in: `flipUp` rises, its
315
+ * bottom edge leading; `flipRight` swings in from the left. Leaving, it turns
316
+ * back out the same way.
317
+ */
318
+ export declare const flips: Record<`flip${keyof typeof FLIPS}` | `flipOut${keyof typeof FLIPS}`, ComboDefinition>;
319
+ export declare const comboEffects: {
320
+ readonly depthIn: ComboDefinition;
321
+ readonly depthOut: ComboDefinition;
322
+ readonly swingIn: ComboDefinition;
323
+ readonly swingOut: ComboDefinition;
324
+ readonly flipRight: ComboDefinition;
325
+ readonly flipLeft: ComboDefinition;
326
+ readonly flipUp: ComboDefinition;
327
+ readonly flipDown: ComboDefinition;
328
+ readonly flipOutRight: ComboDefinition;
329
+ readonly flipOutLeft: ComboDefinition;
330
+ readonly flipOutUp: ComboDefinition;
331
+ readonly flipOutDown: ComboDefinition;
332
+ readonly pocketRight: ComboDefinition;
333
+ readonly pocketLeft: ComboDefinition;
334
+ readonly pocketUp: ComboDefinition;
335
+ readonly pocketDown: ComboDefinition;
336
+ readonly pocketDownRight: ComboDefinition;
337
+ readonly pocketDownLeft: ComboDefinition;
338
+ readonly pocketUpRight: ComboDefinition;
339
+ readonly pocketUpLeft: ComboDefinition;
340
+ readonly pocketOutRight: ComboDefinition;
341
+ readonly pocketOutLeft: ComboDefinition;
342
+ readonly pocketOutUp: ComboDefinition;
343
+ readonly pocketOutDown: ComboDefinition;
344
+ readonly pocketOutDownRight: ComboDefinition;
345
+ readonly pocketOutDownLeft: ComboDefinition;
346
+ readonly pocketOutUpRight: ComboDefinition;
347
+ readonly pocketOutUpLeft: ComboDefinition;
348
+ readonly fadeUp: ComboDefinition;
349
+ readonly fadeDown: ComboDefinition;
350
+ readonly fadeStart: ComboDefinition;
351
+ readonly fadeEnd: ComboDefinition;
352
+ readonly fadeOutUp: ComboDefinition;
353
+ readonly fadeOutDown: ComboDefinition;
354
+ readonly popIn: ComboDefinition;
355
+ readonly popOut: ComboDefinition;
356
+ readonly rise: ComboDefinition;
357
+ readonly fall: ComboDefinition;
358
+ };
359
+ export type ComboEffect = keyof typeof comboEffects;
360
+ /** Base effects and combos together: every effect the library ships. */
361
+ export declare const builtInEffects: {
362
+ depthIn: ComboDefinition;
363
+ depthOut: ComboDefinition;
364
+ swingIn: ComboDefinition;
365
+ swingOut: ComboDefinition;
366
+ flipRight: ComboDefinition;
367
+ flipLeft: ComboDefinition;
368
+ flipUp: ComboDefinition;
369
+ flipDown: ComboDefinition;
370
+ flipOutRight: ComboDefinition;
371
+ flipOutLeft: ComboDefinition;
372
+ flipOutUp: ComboDefinition;
373
+ flipOutDown: ComboDefinition;
374
+ pocketRight: ComboDefinition;
375
+ pocketLeft: ComboDefinition;
376
+ pocketUp: ComboDefinition;
377
+ pocketDown: ComboDefinition;
378
+ pocketDownRight: ComboDefinition;
379
+ pocketDownLeft: ComboDefinition;
380
+ pocketUpRight: ComboDefinition;
381
+ pocketUpLeft: ComboDefinition;
382
+ pocketOutRight: ComboDefinition;
383
+ pocketOutLeft: ComboDefinition;
384
+ pocketOutUp: ComboDefinition;
385
+ pocketOutDown: ComboDefinition;
386
+ pocketOutDownRight: ComboDefinition;
387
+ pocketOutDownLeft: ComboDefinition;
388
+ pocketOutUpRight: ComboDefinition;
389
+ pocketOutUpLeft: ComboDefinition;
390
+ fadeUp: ComboDefinition;
391
+ fadeDown: ComboDefinition;
392
+ fadeStart: ComboDefinition;
393
+ fadeEnd: ComboDefinition;
394
+ fadeOutUp: ComboDefinition;
395
+ fadeOutDown: ComboDefinition;
396
+ popIn: ComboDefinition;
397
+ popOut: ComboDefinition;
398
+ rise: ComboDefinition;
399
+ fall: ComboDefinition;
400
+ flipOverRight: BaseDefinition<Readonly<Record<string, Value>>>;
401
+ flipOverLeft: BaseDefinition<Readonly<Record<string, Value>>>;
402
+ flipOverUp: BaseDefinition<Readonly<Record<string, Value>>>;
403
+ flipOverDown: BaseDefinition<Readonly<Record<string, Value>>>;
404
+ flipOverOutRight: BaseDefinition<Readonly<Record<string, Value>>>;
405
+ flipOverOutLeft: BaseDefinition<Readonly<Record<string, Value>>>;
406
+ flipOverOutUp: BaseDefinition<Readonly<Record<string, Value>>>;
407
+ flipOverOutDown: BaseDefinition<Readonly<Record<string, Value>>>;
408
+ turnX: BaseDefinition<{
409
+ readonly start: number;
410
+ readonly end: number;
411
+ }>;
412
+ turnY: BaseDefinition<{
413
+ readonly start: number;
414
+ readonly end: number;
415
+ }>;
416
+ depth: BaseDefinition<{
417
+ readonly start: 0;
418
+ readonly end: 0;
419
+ }>;
420
+ hinge: BaseDefinition<{
421
+ readonly start: number;
422
+ readonly end: number;
423
+ }>;
424
+ irisRight: BaseDefinition<Readonly<Record<string, Value>>>;
425
+ irisLeft: BaseDefinition<Readonly<Record<string, Value>>>;
426
+ irisUp: BaseDefinition<Readonly<Record<string, Value>>>;
427
+ irisDown: BaseDefinition<Readonly<Record<string, Value>>>;
428
+ irisDownRight: BaseDefinition<Readonly<Record<string, Value>>>;
429
+ irisDownLeft: BaseDefinition<Readonly<Record<string, Value>>>;
430
+ irisUpRight: BaseDefinition<Readonly<Record<string, Value>>>;
431
+ irisUpLeft: BaseDefinition<Readonly<Record<string, Value>>>;
432
+ irisOutRight: BaseDefinition<Readonly<Record<string, Value>>>;
433
+ irisOutLeft: BaseDefinition<Readonly<Record<string, Value>>>;
434
+ irisOutUp: BaseDefinition<Readonly<Record<string, Value>>>;
435
+ irisOutDown: BaseDefinition<Readonly<Record<string, Value>>>;
436
+ irisOutDownRight: BaseDefinition<Readonly<Record<string, Value>>>;
437
+ irisOutDownLeft: BaseDefinition<Readonly<Record<string, Value>>>;
438
+ irisOutUpRight: BaseDefinition<Readonly<Record<string, Value>>>;
439
+ irisOutUpLeft: BaseDefinition<Readonly<Record<string, Value>>>;
440
+ wipeOpenX: BaseDefinition<{
441
+ readonly start: string;
442
+ readonly end: string;
443
+ }>;
444
+ wipeOpenY: BaseDefinition<{
445
+ readonly start: string;
446
+ readonly end: string;
447
+ }>;
448
+ wipeCloseX: BaseDefinition<{
449
+ readonly start: string;
450
+ readonly end: string;
451
+ }>;
452
+ wipeCloseY: BaseDefinition<{
453
+ readonly start: string;
454
+ readonly end: string;
455
+ }>;
456
+ irisIn: BaseDefinition<{
457
+ readonly start: string;
458
+ readonly end: string;
459
+ }>;
460
+ irisOut: BaseDefinition<{
461
+ readonly start: string;
462
+ readonly end: string;
463
+ }>;
464
+ wipeRight: BaseDefinition<Readonly<Record<string, Value>>>;
465
+ wipeLeft: BaseDefinition<Readonly<Record<string, Value>>>;
466
+ wipeUp: BaseDefinition<Readonly<Record<string, Value>>>;
467
+ wipeDown: BaseDefinition<Readonly<Record<string, Value>>>;
468
+ wipeDownRight: BaseDefinition<Readonly<Record<string, Value>>>;
469
+ wipeDownLeft: BaseDefinition<Readonly<Record<string, Value>>>;
470
+ wipeUpRight: BaseDefinition<Readonly<Record<string, Value>>>;
471
+ wipeUpLeft: BaseDefinition<Readonly<Record<string, Value>>>;
472
+ wipeOutRight: BaseDefinition<Readonly<Record<string, Value>>>;
473
+ wipeOutLeft: BaseDefinition<Readonly<Record<string, Value>>>;
474
+ wipeOutUp: BaseDefinition<Readonly<Record<string, Value>>>;
475
+ wipeOutDown: BaseDefinition<Readonly<Record<string, Value>>>;
476
+ wipeOutDownRight: BaseDefinition<Readonly<Record<string, Value>>>;
477
+ wipeOutDownLeft: BaseDefinition<Readonly<Record<string, Value>>>;
478
+ wipeOutUpRight: BaseDefinition<Readonly<Record<string, Value>>>;
479
+ wipeOutUpLeft: BaseDefinition<Readonly<Record<string, Value>>>;
480
+ fadeIn: BaseDefinition<{
481
+ readonly start: 0;
482
+ readonly end: 1;
483
+ }>;
484
+ fadeOut: BaseDefinition<{
485
+ readonly start: 1;
486
+ readonly end: 0;
487
+ }>;
488
+ scaleIn: BaseDefinition<{
489
+ readonly start: 0;
490
+ readonly end: 1;
491
+ }>;
492
+ scaleOut: BaseDefinition<{
493
+ readonly start: 1;
494
+ readonly end: 0;
495
+ }>;
496
+ blurIn: BaseDefinition<{
497
+ readonly start: 8;
498
+ readonly end: 0;
499
+ }>;
500
+ blurOut: BaseDefinition<{
501
+ readonly start: 0;
502
+ readonly end: 8;
503
+ }>;
504
+ slideUp: BaseDefinition<{
505
+ readonly start: "100%";
506
+ readonly end: "0%";
507
+ }>;
508
+ slideDown: BaseDefinition<{
509
+ readonly start: "-100%";
510
+ readonly end: "0%";
511
+ }>;
512
+ slideRight: BaseDefinition<{
513
+ readonly start: "-100%";
514
+ readonly end: "0%";
515
+ }>;
516
+ slideLeft: BaseDefinition<{
517
+ readonly start: "100%";
518
+ readonly end: "0%";
519
+ }>;
520
+ pop: BaseDefinition<{
521
+ readonly start: 1;
522
+ readonly end: 1;
523
+ readonly peak: 1.075;
524
+ readonly peakAt: 0.6;
525
+ }>;
526
+ squish: BaseDefinition<{
527
+ readonly start: 1;
528
+ readonly end: 0.96;
529
+ }>;
530
+ tilt: BaseDefinition<{
531
+ readonly start: 0;
532
+ readonly end: -2;
533
+ }>;
534
+ glow: BaseDefinition<{
535
+ readonly start: 1;
536
+ readonly end: 1.12;
537
+ }>;
538
+ };
539
+ export type BuiltInEffect = BaseEffect | ComboEffect;
540
+ /** Every built-in effect name, base effects first. */
541
+ export declare const effectNames: BuiltInEffect[];
542
+ /** Own keys only, so `constructor` is no effect. */
543
+ export declare const isBuiltInEffect: (name: string) => name is BuiltInEffect;
544
+ export declare const isBase: (name: BuiltInEffect) => name is BaseEffect;
545
+ export declare const PLAIN: RegExp;
546
+ /**
547
+ * A length the other way. Plain ones (`1rem`, `-12px`) flip textually,
548
+ * anything else (`calc(…)`, `var(…)`) through `calc()`.
549
+ */
550
+ export declare const negate: (length: string) => string;
551
+ /** The reach for JavaScript: lengths, flipped when the element is right to left. */
552
+ export declare const jsReach: (distance: string, rtl: boolean) => Reach;
553
+ export declare const CSS_DIR = "var(--greese-motion-dir, 1)";
554
+ /** The reach for CSS: `--greese-motion-dir` is 1, or -1 in right-to-left (Motion.scss). */
555
+ export declare const cssReach: Reach;