@prestack/thread-ui 0.1.9 → 0.1.11
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 +366 -0
- package/dist/ui/attach.js +6 -7
- package/dist/ui/compositions.d.ts +0 -2
- package/dist/ui/compositions.js +2 -112
- package/dist/ui/generators/routes.js +1 -0
- package/dist/ui/variant.d.ts +1 -3
- package/package.json +2 -2
- package/dist/ui/animations/anm_appear.ts +0 -13
- package/dist/ui/animations/anm_blur_in.ts +0 -19
- package/dist/ui/animations/anm_blur_out.ts +0 -18
- package/dist/ui/animations/anm_dismiss.ts +0 -18
- package/dist/ui/animations/anm_drop.ts +0 -19
- package/dist/ui/animations/anm_fall.ts +0 -18
- package/dist/ui/animations/anm_flash.ts +0 -18
- package/dist/ui/animations/anm_glow.ts +0 -16
- package/dist/ui/animations/anm_lift.ts +0 -16
- package/dist/ui/animations/anm_nudge.ts +0 -16
- package/dist/ui/animations/anm_pop_in.ts +0 -23
- package/dist/ui/animations/anm_pop_out.ts +0 -22
- package/dist/ui/animations/anm_press.ts +0 -12
- package/dist/ui/animations/anm_pulse.ts +0 -13
- package/dist/ui/animations/anm_rise.ts +0 -19
- package/dist/ui/animations/anm_shake.ts +0 -13
- package/dist/ui/animations/anm_slide_in_left.ts +0 -19
- package/dist/ui/animations/anm_slide_in_right.ts +0 -19
- package/dist/ui/animations/anm_slide_out_left.ts +0 -18
- package/dist/ui/animations/anm_slide_out_right.ts +0 -18
- package/dist/ui/animations/anm_spin.ts +0 -12
- package/dist/ui/animations/anm_swell.ts +0 -16
- package/dist/ui/animations/anm_wobble.ts +0 -24
- package/dist/ui/animations/anm_zoom_in.ts +0 -19
- package/dist/ui/animations/anm_zoom_out.ts +0 -18
- package/dist/ui/animations.ts +0 -308
- package/dist/ui/attach.ts +0 -553
- package/dist/ui/charts.tsx +0 -69
- package/dist/ui/checked.ts +0 -32
- package/dist/ui/collector.ts +0 -140
- package/dist/ui/compositions.ts +0 -555
- package/dist/ui/consent.ts +0 -55
- package/dist/ui/content.tsx +0 -27
- package/dist/ui/contrast.ts +0 -27
- package/dist/ui/controls.tsx +0 -25
- package/dist/ui/disclosure.tsx +0 -20
- package/dist/ui/dismiss-layer.ts +0 -87
- package/dist/ui/door.ts +0 -140
- package/dist/ui/drag.ts +0 -316
- package/dist/ui/elements/accordion.tsx +0 -47
- package/dist/ui/elements/accordion.works.ts +0 -66
- package/dist/ui/elements/aspect-ratio.tsx +0 -31
- package/dist/ui/elements/aspect-ratio.works.ts +0 -5
- package/dist/ui/elements/avatar.tsx +0 -34
- package/dist/ui/elements/avatar.works.ts +0 -16
- package/dist/ui/elements/badge.tsx +0 -33
- package/dist/ui/elements/badge.works.ts +0 -9
- package/dist/ui/elements/bars.tsx +0 -50
- package/dist/ui/elements/bars.works.ts +0 -29
- package/dist/ui/elements/box.tsx +0 -36
- package/dist/ui/elements/breadcrumb.tsx +0 -38
- package/dist/ui/elements/breadcrumb.works.ts +0 -24
- package/dist/ui/elements/button.tsx +0 -46
- package/dist/ui/elements/button.works.tsx +0 -52
- package/dist/ui/elements/column.tsx +0 -29
- package/dist/ui/elements/consent.tsx +0 -71
- package/dist/ui/elements/consent.works.tsx +0 -132
- package/dist/ui/elements/donut.tsx +0 -45
- package/dist/ui/elements/donut.works.ts +0 -42
- package/dist/ui/elements/each.tsx +0 -34
- package/dist/ui/elements/each.works.tsx +0 -82
- package/dist/ui/elements/empty.tsx +0 -33
- package/dist/ui/elements/field.tsx +0 -45
- package/dist/ui/elements/field.works.ts +0 -65
- package/dist/ui/elements/funnel.tsx +0 -50
- package/dist/ui/elements/funnel.works.ts +0 -37
- package/dist/ui/elements/gauge.tsx +0 -40
- package/dist/ui/elements/gauge.works.ts +0 -42
- package/dist/ui/elements/glyph.tsx +0 -30
- package/dist/ui/elements/glyph.works.tsx +0 -42
- package/dist/ui/elements/grid.tsx +0 -29
- package/dist/ui/elements/heatmap.tsx +0 -48
- package/dist/ui/elements/heatmap.works.ts +0 -24
- package/dist/ui/elements/hit-box.tsx +0 -47
- package/dist/ui/elements/hit-box.works.tsx +0 -576
- package/dist/ui/elements/image.tsx +0 -29
- package/dist/ui/elements/line-chart.tsx +0 -45
- package/dist/ui/elements/line-chart.works.ts +0 -41
- package/dist/ui/elements/link.tsx +0 -38
- package/dist/ui/elements/link.works.ts +0 -25
- package/dist/ui/elements/media.tsx +0 -57
- package/dist/ui/elements/menu.tsx +0 -51
- package/dist/ui/elements/menu.works.tsx +0 -154
- package/dist/ui/elements/money.tsx +0 -36
- package/dist/ui/elements/money.works.ts +0 -9
- package/dist/ui/elements/pagination.tsx +0 -39
- package/dist/ui/elements/pagination.works.ts +0 -20
- package/dist/ui/elements/progress.tsx +0 -34
- package/dist/ui/elements/progress.works.ts +0 -8
- package/dist/ui/elements/radio-group.tsx +0 -50
- package/dist/ui/elements/radio-group.works.ts +0 -33
- package/dist/ui/elements/row.tsx +0 -29
- package/dist/ui/elements/scatter.tsx +0 -42
- package/dist/ui/elements/scatter.works.ts +0 -38
- package/dist/ui/elements/select.tsx +0 -43
- package/dist/ui/elements/select.works.ts +0 -5
- package/dist/ui/elements/separator.tsx +0 -31
- package/dist/ui/elements/skeleton.tsx +0 -31
- package/dist/ui/elements/slider.tsx +0 -34
- package/dist/ui/elements/slider.works.ts +0 -5
- package/dist/ui/elements/sparkline.tsx +0 -37
- package/dist/ui/elements/sparkline.works.ts +0 -32
- package/dist/ui/elements/spinner.tsx +0 -33
- package/dist/ui/elements/stack.tsx +0 -29
- package/dist/ui/elements/stat.tsx +0 -36
- package/dist/ui/elements/stat.works.ts +0 -14
- package/dist/ui/elements/surface.tsx +0 -36
- package/dist/ui/elements/surface.works.ts +0 -9
- package/dist/ui/elements/table.tsx +0 -62
- package/dist/ui/elements/table.works.ts +0 -30
- package/dist/ui/elements/tabs.tsx +0 -47
- package/dist/ui/elements/tabs.works.ts +0 -84
- package/dist/ui/elements/text.tsx +0 -33
- package/dist/ui/elements/textarea.tsx +0 -38
- package/dist/ui/elements/textarea.works.ts +0 -5
- package/dist/ui/elements/time.tsx +0 -40
- package/dist/ui/elements/time.works.ts +0 -29
- package/dist/ui/elements/toggle.tsx +0 -34
- package/dist/ui/elements/toggle.works.ts +0 -5
- package/dist/ui/elements/tooltip.tsx +0 -40
- package/dist/ui/elements/tooltip.works.ts +0 -77
- package/dist/ui/elements/value.tsx +0 -38
- package/dist/ui/elements/value.works.ts +0 -9
- package/dist/ui/elements.ts +0 -127
- package/dist/ui/focus-scope.ts +0 -121
- package/dist/ui/fonts.ts +0 -355
- package/dist/ui/generators/dev.d.ts +0 -1
- package/dist/ui/generators/dev.js +0 -61
- package/dist/ui/generators/dev.ts +0 -74
- package/dist/ui/generators/elements.ts +0 -796
- package/dist/ui/generators/i18n.ts +0 -283
- package/dist/ui/generators/icons.ts +0 -207
- package/dist/ui/generators/react.ts +0 -267
- package/dist/ui/generators/routes.ts +0 -847
- package/dist/ui/generators/show.ts +0 -261
- package/dist/ui/generators/styles.ts +0 -677
- package/dist/ui/generators/variants.ts +0 -196
- package/dist/ui/i18n/catalogs/en.ts +0 -191
- package/dist/ui/i18n/format.ts +0 -221
- package/dist/ui/i18n/locales.ts +0 -33
- package/dist/ui/i18n/parse.ts +0 -315
- package/dist/ui/i18n/translator.ts +0 -31
- package/dist/ui/i18n/types.ts +0 -96
- package/dist/ui/icons.ts +0 -331
- package/dist/ui/islands/map.ts +0 -58
- package/dist/ui/localizations.ts +0 -75
- package/dist/ui/material.ts +0 -236
- package/dist/ui/materials/mat_bordered.ts +0 -13
- package/dist/ui/materials/mat_ceramic.ts +0 -13
- package/dist/ui/materials/mat_clay.ts +0 -13
- package/dist/ui/materials/mat_elevated.ts +0 -24
- package/dist/ui/materials/mat_flat.ts +0 -34
- package/dist/ui/materials/mat_glass.ts +0 -20
- package/dist/ui/materials/mat_lit.ts +0 -13
- package/dist/ui/materials/mat_moulded.ts +0 -11
- package/dist/ui/materials.ts +0 -197
- package/dist/ui/modes.ts +0 -44
- package/dist/ui/navigation.tsx +0 -29
- package/dist/ui/positioning.ts +0 -90
- package/dist/ui/presented.tsx +0 -119
- package/dist/ui/provider.tsx +0 -184
- package/dist/ui/render-loop.ts +0 -133
- package/dist/ui/roving-focus.ts +0 -161
- package/dist/ui/screens.ts +0 -141
- package/dist/ui/scroll-lock.ts +0 -28
- package/dist/ui/series.ts +0 -97
- package/dist/ui/signals.ts +0 -386
- package/dist/ui/styleguide.ts +0 -231
- package/dist/ui/styleguides.ts +0 -374
- package/dist/ui/themes.ts +0 -22
- package/dist/ui/token.ts +0 -78
- package/dist/ui/tokens/shadow.ts +0 -25
- package/dist/ui/tokens.ts +0 -234
- package/dist/ui/validators.ts +0 -232
- package/dist/ui/variant.ts +0 -352
- package/dist/ui/variants/var_avatar-round.ts +0 -14
- package/dist/ui/variants/var_bubble-me.ts +0 -14
- package/dist/ui/variants/var_bubble-them.ts +0 -13
- package/dist/ui/variants/var_button-border.ts +0 -76
- package/dist/ui/variants/var_button-cta.ts +0 -76
- package/dist/ui/variants/var_button-destructive-ghost.ts +0 -72
- package/dist/ui/variants/var_button-destructive.ts +0 -76
- package/dist/ui/variants/var_button-fill.ts +0 -76
- package/dist/ui/variants/var_button-ghost.ts +0 -72
- package/dist/ui/variants/var_button-glass.ts +0 -55
- package/dist/ui/variants/var_button-normal.ts +0 -76
- package/dist/ui/variants/var_button-quiet.ts +0 -74
- package/dist/ui/variants/var_card.ts +0 -17
- package/dist/ui/variants/var_chip.ts +0 -13
- package/dist/ui/variants/var_choice.ts +0 -15
- package/dist/ui/variants/var_framed.ts +0 -10
- package/dist/ui/variants/var_glyph-plain.ts +0 -11
- package/dist/ui/variants/var_input.ts +0 -43
- package/dist/ui/variants/var_link-inline.ts +0 -29
- package/dist/ui/variants/var_list-row.ts +0 -34
- package/dist/ui/variants/var_rule.ts +0 -10
- package/dist/ui/variants/var_skeleton-block.ts +0 -12
- package/dist/ui/variants/var_spinner-turning.ts +0 -12
- package/dist/ui/variants/var_stat-tile.ts +0 -13
- package/dist/ui/variants/var_tab-bar.ts +0 -15
- package/dist/ui/variants/var_tap-target.ts +0 -25
- package/dist/ui/variants.ts +0 -64
- package/dist/ui/wrappers.tsx +0 -429
package/dist/ui/compositions.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { existsSync, readFileSync, readdirSync, rmSync, writeFileSync } from '@prestack/thread/integrations/disk';
|
|
2
|
-
import { basename,
|
|
2
|
+
import { basename, join, relative } from 'node:path';
|
|
3
3
|
import { argv, stdout } from 'node:process';
|
|
4
4
|
import { SHAPED } from '@prestack/thread/core/init';
|
|
5
5
|
import { exit, invoked } from '@prestack/thread/core/invoked';
|
|
@@ -111,21 +111,6 @@ const REFUSED = {
|
|
|
111
111
|
export function compiledAt(at) {
|
|
112
112
|
return `${COMPILED}/${slashed(at)}`;
|
|
113
113
|
}
|
|
114
|
-
const ENDINGS = ['.tsx', '.ts'];
|
|
115
|
-
function beside(root, where, said) {
|
|
116
|
-
if (!said.startsWith(`${HOME}/`))
|
|
117
|
-
return undefined;
|
|
118
|
-
const tail = said.slice(HOME.length + 1);
|
|
119
|
-
for (const ending of ENDINGS) {
|
|
120
|
-
const at = `${COMPILED}/ui/${tail}${ending}`;
|
|
121
|
-
if (!existsSync(join(root, at)))
|
|
122
|
-
continue;
|
|
123
|
-
const out = slashed(relative(dirname(where), at));
|
|
124
|
-
return out.startsWith('.') ? out : `./${out}`;
|
|
125
|
-
}
|
|
126
|
-
return undefined;
|
|
127
|
-
}
|
|
128
|
-
const NAMED_IMPORT = /(['"])(@[^'"]+)\1/g;
|
|
129
114
|
export function settled(root, rows, checking, by, kept) {
|
|
130
115
|
const said = [];
|
|
131
116
|
for (const row of rows) {
|
|
@@ -139,10 +124,7 @@ export function settled(root, rows, checking, by, kept) {
|
|
|
139
124
|
}
|
|
140
125
|
const where = compiledAt(row.at);
|
|
141
126
|
kept.add(where);
|
|
142
|
-
const text =
|
|
143
|
-
const found = beside(root, where, said);
|
|
144
|
-
return found === undefined ? whole : `${quote}${found}${quote}`;
|
|
145
|
-
});
|
|
127
|
+
const text = held.text ?? '';
|
|
146
128
|
const at = join(root, where);
|
|
147
129
|
if (!checking) {
|
|
148
130
|
writeFileSync(at, text, 'utf8');
|
|
@@ -155,86 +137,6 @@ export function settled(root, rows, checking, by, kept) {
|
|
|
155
137
|
}
|
|
156
138
|
return said;
|
|
157
139
|
}
|
|
158
|
-
const ORG = packageOf('ui').split('/')[0] ?? '';
|
|
159
|
-
const REACHED = /^(?:import|export)\s+(type\s+)?(?:(?:[^\n]|\n(?=[ \t}]))*?\s)?from\s*['"]([^'"]+)['"]/gm;
|
|
160
|
-
export const RUNTIME = ['wrappers.tsx', 'drag.ts', 'provider.tsx', 'islands/map.ts'];
|
|
161
|
-
const NODE = /^node:/;
|
|
162
|
-
function installs(root) {
|
|
163
|
-
try {
|
|
164
|
-
const held = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8'));
|
|
165
|
-
return new Set([...Object.keys(held.dependencies ?? {}), ...Object.keys(held.devDependencies ?? {})]);
|
|
166
|
-
}
|
|
167
|
-
catch {
|
|
168
|
-
return new Set();
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
function packaging(said) {
|
|
172
|
-
return said.startsWith('@') ? said.split('/').slice(0, 2).join('/') : (said.split('/')[0] ?? said);
|
|
173
|
-
}
|
|
174
|
-
export function emitting(root, entries, checking, kept) {
|
|
175
|
-
const has = installs(root);
|
|
176
|
-
const from = join(root, 'node_modules', packageOf('ui'), 'dist', 'ui');
|
|
177
|
-
const said = [];
|
|
178
|
-
if (!existsSync(from)) {
|
|
179
|
-
return [
|
|
180
|
-
`this app declares an interface and ${packageOf('ui')} is not installed, so there is nothing to emit it from. ` +
|
|
181
|
-
`Install it and run \`thread attach ${packageOf('ui')}\` again.`,
|
|
182
|
-
];
|
|
183
|
-
}
|
|
184
|
-
const seen = new Set();
|
|
185
|
-
const walk = (at) => {
|
|
186
|
-
if (seen.has(at))
|
|
187
|
-
return;
|
|
188
|
-
seen.add(at);
|
|
189
|
-
const file = join(from, at);
|
|
190
|
-
if (!existsSync(file)) {
|
|
191
|
-
said.push(`${at} is part of the interface this app emits, and the installed ${packageOf('ui')} does not hold it. ` +
|
|
192
|
-
'Upgrade the framework packages and run this again.');
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
const text = readFileSync(file, 'utf8');
|
|
196
|
-
const where = `${COMPILED}/ui/${at}`;
|
|
197
|
-
kept.add(where);
|
|
198
|
-
const to = join(root, where);
|
|
199
|
-
if (checking) {
|
|
200
|
-
if (!existsSync(to) || readFileSync(to, 'utf8') !== text) {
|
|
201
|
-
said.push(`${where} is not what this app emits from ${packageOf('ui')}. An emitted file that differs from ` +
|
|
202
|
-
'its source is a hand edit wearing a generated name. Run `thread compositions` and commit what it writes.');
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
else {
|
|
206
|
-
writeFileSync(to, text, 'utf8');
|
|
207
|
-
}
|
|
208
|
-
for (const one of text.matchAll(REACHED)) {
|
|
209
|
-
const named = one[2] ?? '';
|
|
210
|
-
if (named.startsWith('.')) {
|
|
211
|
-
const next = slashed(join(dirname(at), named));
|
|
212
|
-
if (next.startsWith('..')) {
|
|
213
|
-
said.push(`${at} reaches \`${named}\`, which is outside the interface this app emits.`);
|
|
214
|
-
continue;
|
|
215
|
-
}
|
|
216
|
-
walk(next);
|
|
217
|
-
continue;
|
|
218
|
-
}
|
|
219
|
-
if (one[1] !== undefined)
|
|
220
|
-
continue;
|
|
221
|
-
if (!named.startsWith(`${ORG}/`)) {
|
|
222
|
-
const held = packaging(named);
|
|
223
|
-
if (NODE.test(named) || has.has(held))
|
|
224
|
-
continue;
|
|
225
|
-
said.push(`${at} reaches ${held}, and this app installs nothing by that name. An emitted interface brings ` +
|
|
226
|
-
`what it reaches with it, so ${held} has to arrive when ` +
|
|
227
|
-
`thread attach ${packageOf('ui')} runs.`);
|
|
228
|
-
continue;
|
|
229
|
-
}
|
|
230
|
-
said.push(`${at} reaches \`${named}\`, so emitting it would leave this app importing the framework while it runs. ` +
|
|
231
|
-
'It reaches what is emitted beside it, or nothing of this framework at all.');
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
for (const one of entries)
|
|
235
|
-
walk(one);
|
|
236
|
-
return said;
|
|
237
|
-
}
|
|
238
140
|
export function stale(root, kept, checking) {
|
|
239
141
|
const said = [];
|
|
240
142
|
const walk = (at) => {
|
|
@@ -263,13 +165,8 @@ export function stale(root, kept, checking) {
|
|
|
263
165
|
const SHEET = 'compiled.ts';
|
|
264
166
|
const EMITS = 'thread compositions';
|
|
265
167
|
export const SCREENED_BY = 'thread screens';
|
|
266
|
-
const SHIPS = `${COMPILED}/ui/`;
|
|
267
168
|
const idFor = (at) => `compiled-${at.slice(COMPILED.length + 1).replace(/\.[^./]+$/, '').split('/').join('-')}`;
|
|
268
169
|
function meaning(at, by) {
|
|
269
|
-
if (at.startsWith(SHIPS)) {
|
|
270
|
-
return ('`' + at.slice(SHIPS.length) + '` from ' + packageOf('ui') + ', copied into this app so a page runs it with nothing of ' +
|
|
271
|
-
'the framework installed. `' + by + '` writes it, so an edit made here is refused.');
|
|
272
|
-
}
|
|
273
170
|
return ('`' + at.slice(COMPILED.length + 1) + '` as React runs it, compiled from the file a person wrote: a variant worn as a ' +
|
|
274
171
|
'tag has become its class, and a named place the class its arrangement declares. `' + by + '` writes it, so an ' +
|
|
275
172
|
'edit made here is refused.');
|
|
@@ -424,12 +321,6 @@ function run() {
|
|
|
424
321
|
stdout.write(`thread: seeded ${one.path}\n`);
|
|
425
322
|
}
|
|
426
323
|
}
|
|
427
|
-
const parts = sheetOf(tree, 'elements.ts', 'ELEMENT', 'ELEMENTS');
|
|
428
|
-
const shipped = `node_modules/${packageOf('ui')}/dist/ui/`;
|
|
429
|
-
const entries = [
|
|
430
|
-
...RUNTIME,
|
|
431
|
-
...parts.flatMap((one) => (one.at ?? '').startsWith(shipped) ? [(one.at ?? '').slice(shipped.length).replace(/\.js$/, '.tsx')] : []),
|
|
432
|
-
];
|
|
433
324
|
const screened = new Set();
|
|
434
325
|
for (const one of sheetOf(tree, 'screens.ts', 'SCREEN', 'SCREENS')) {
|
|
435
326
|
if (one.at !== undefined && one.at !== '')
|
|
@@ -438,7 +329,6 @@ function run() {
|
|
|
438
329
|
const kept = new Set(screened);
|
|
439
330
|
const found = [
|
|
440
331
|
...undeclared(tree, rows),
|
|
441
|
-
...emitting(tree.at, entries, checking, kept),
|
|
442
332
|
...settled(tree.at, rows, checking, EMITS, kept),
|
|
443
333
|
];
|
|
444
334
|
found.push(...declaring(tree, [...kept], checking, screened));
|
package/dist/ui/variant.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FREE, type Material, type Setting } from './material.ts';
|
|
2
|
-
import type { MATERIALS } from './materials.ts';
|
|
3
2
|
import type { Holds, Token, Wearing } from './token.ts';
|
|
4
3
|
import { holds } from './signals.ts';
|
|
5
4
|
interface Stateful {
|
|
@@ -10,7 +9,6 @@ interface Stateful {
|
|
|
10
9
|
}[];
|
|
11
10
|
}
|
|
12
11
|
type SignalId = (typeof holds)[number]['id'] | (string & {});
|
|
13
|
-
type MaterialId = (typeof MATERIALS)['declares'][number]['id'] | (string & {});
|
|
14
12
|
declare const BOUND: {
|
|
15
13
|
readonly background: readonly ['colour', 'gradient', 'texture', 'noise', 'img'];
|
|
16
14
|
readonly borderColor: readonly ['colour'];
|
|
@@ -69,7 +67,7 @@ type VariantSetting = {
|
|
|
69
67
|
export interface Variant {
|
|
70
68
|
readonly id: string;
|
|
71
69
|
readonly version?: number;
|
|
72
|
-
readonly material?:
|
|
70
|
+
readonly material?: string;
|
|
73
71
|
readonly type?: string;
|
|
74
72
|
readonly icon?: string;
|
|
75
73
|
readonly sets: readonly VariantSetting[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prestack/thread-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -17,6 +17,6 @@
|
|
|
17
17
|
"react-dom": "^19.0.0",
|
|
18
18
|
"typescript": "^6.0.0",
|
|
19
19
|
"zod": "^4.5.4",
|
|
20
|
-
"@prestack/thread": "^0.1.
|
|
20
|
+
"@prestack/thread": "^0.1.22"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const APPEAR = {
|
|
4
|
-
id: 'appear',
|
|
5
|
-
runs: 'motion-normal',
|
|
6
|
-
eases: 'ease-out',
|
|
7
|
-
|
|
8
|
-
fills: 'backwards',
|
|
9
|
-
stops: {
|
|
10
|
-
'0%': [{ property: 'opacity', is: 'opacity-none' }],
|
|
11
|
-
'100%': [{ property: 'opacity', is: 'opacity-full' }],
|
|
12
|
-
},
|
|
13
|
-
} as const satisfies Animation
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const BLUR_IN = {
|
|
4
|
-
id: 'blur-in',
|
|
5
|
-
runs: 'motion-normal',
|
|
6
|
-
eases: 'ease-out',
|
|
7
|
-
|
|
8
|
-
fills: 'backwards',
|
|
9
|
-
stops: {
|
|
10
|
-
'0%': [
|
|
11
|
-
{ property: 'opacity', is: 'opacity-none' },
|
|
12
|
-
{ property: 'filter', is: 'filter-blurred' },
|
|
13
|
-
],
|
|
14
|
-
'100%': [
|
|
15
|
-
{ property: 'opacity', is: 'opacity-full' },
|
|
16
|
-
{ property: 'filter', is: 'filter-sharp' },
|
|
17
|
-
],
|
|
18
|
-
},
|
|
19
|
-
} as const satisfies Animation
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const BLUR_OUT = {
|
|
4
|
-
id: 'blur-out',
|
|
5
|
-
runs: 'motion-quick',
|
|
6
|
-
eases: 'ease-in',
|
|
7
|
-
fills: 'forwards',
|
|
8
|
-
stops: {
|
|
9
|
-
'0%': [
|
|
10
|
-
{ property: 'opacity', is: 'opacity-full' },
|
|
11
|
-
{ property: 'filter', is: 'filter-sharp' },
|
|
12
|
-
],
|
|
13
|
-
'100%': [
|
|
14
|
-
{ property: 'opacity', is: 'opacity-none' },
|
|
15
|
-
{ property: 'filter', is: 'filter-blurred' },
|
|
16
|
-
],
|
|
17
|
-
},
|
|
18
|
-
} as const satisfies Animation
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const DISMISS = {
|
|
4
|
-
id: 'dismiss',
|
|
5
|
-
runs: 'motion-quick',
|
|
6
|
-
eases: 'ease-in',
|
|
7
|
-
fills: 'forwards',
|
|
8
|
-
stops: {
|
|
9
|
-
'0%': [
|
|
10
|
-
{ property: 'opacity', is: 'opacity-full' },
|
|
11
|
-
{ property: 'transform', is: 'transform-rest' },
|
|
12
|
-
],
|
|
13
|
-
'100%': [
|
|
14
|
-
{ property: 'opacity', is: 'opacity-none' },
|
|
15
|
-
{ property: 'transform', is: 'transform-shrink' },
|
|
16
|
-
],
|
|
17
|
-
},
|
|
18
|
-
} as const satisfies Animation
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const DROP = {
|
|
4
|
-
id: 'drop',
|
|
5
|
-
runs: 'motion-normal',
|
|
6
|
-
eases: 'ease-out',
|
|
7
|
-
|
|
8
|
-
fills: 'backwards',
|
|
9
|
-
stops: {
|
|
10
|
-
'0%': [
|
|
11
|
-
{ property: 'opacity', is: 'opacity-none' },
|
|
12
|
-
{ property: 'transform', is: 'transform-above' },
|
|
13
|
-
],
|
|
14
|
-
'100%': [
|
|
15
|
-
{ property: 'opacity', is: 'opacity-full' },
|
|
16
|
-
{ property: 'transform', is: 'transform-rest' },
|
|
17
|
-
],
|
|
18
|
-
},
|
|
19
|
-
} as const satisfies Animation
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const FALL = {
|
|
4
|
-
id: 'fall',
|
|
5
|
-
runs: 'motion-quick',
|
|
6
|
-
eases: 'ease-in',
|
|
7
|
-
fills: 'forwards',
|
|
8
|
-
stops: {
|
|
9
|
-
'0%': [
|
|
10
|
-
{ property: 'opacity', is: 'opacity-full' },
|
|
11
|
-
{ property: 'transform', is: 'transform-rest' },
|
|
12
|
-
],
|
|
13
|
-
'100%': [
|
|
14
|
-
{ property: 'opacity', is: 'opacity-none' },
|
|
15
|
-
{ property: 'transform', is: 'transform-below' },
|
|
16
|
-
],
|
|
17
|
-
},
|
|
18
|
-
} as const satisfies Animation
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const FLASH = {
|
|
4
|
-
id: 'flash',
|
|
5
|
-
runs: 'motion-normal',
|
|
6
|
-
eases: 'ease-out',
|
|
7
|
-
stops: {
|
|
8
|
-
'0%': [
|
|
9
|
-
{ property: 'opacity', is: 'opacity-full' },
|
|
10
|
-
],
|
|
11
|
-
'40%': [
|
|
12
|
-
{ property: 'opacity', is: 'opacity-muted' },
|
|
13
|
-
],
|
|
14
|
-
'100%': [
|
|
15
|
-
{ property: 'opacity', is: 'opacity-full' },
|
|
16
|
-
],
|
|
17
|
-
},
|
|
18
|
-
} as const satisfies Animation
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const GLOW = {
|
|
4
|
-
id: 'glow',
|
|
5
|
-
runs: 'motion-normal',
|
|
6
|
-
eases: 'ease-out',
|
|
7
|
-
fills: 'forwards',
|
|
8
|
-
stops: {
|
|
9
|
-
'0%': [
|
|
10
|
-
{ property: 'boxShadow', is: 'shadow-0' },
|
|
11
|
-
],
|
|
12
|
-
'100%': [
|
|
13
|
-
{ property: 'boxShadow', is: 'shadow-glow' },
|
|
14
|
-
],
|
|
15
|
-
},
|
|
16
|
-
} as const satisfies Animation
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const LIFT = {
|
|
4
|
-
id: 'lift',
|
|
5
|
-
runs: 'motion-quick',
|
|
6
|
-
eases: 'ease-out',
|
|
7
|
-
fills: 'forwards',
|
|
8
|
-
stops: {
|
|
9
|
-
'0%': [
|
|
10
|
-
{ property: 'transform', is: 'transform-rest' },
|
|
11
|
-
],
|
|
12
|
-
'100%': [
|
|
13
|
-
{ property: 'transform', is: 'transform-lift' },
|
|
14
|
-
],
|
|
15
|
-
},
|
|
16
|
-
} as const satisfies Animation
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const NUDGE = {
|
|
4
|
-
id: 'nudge',
|
|
5
|
-
runs: 'motion-quick',
|
|
6
|
-
eases: 'ease-out',
|
|
7
|
-
fills: 'forwards',
|
|
8
|
-
stops: {
|
|
9
|
-
'0%': [
|
|
10
|
-
{ property: 'transform', is: 'transform-rest' },
|
|
11
|
-
],
|
|
12
|
-
'100%': [
|
|
13
|
-
{ property: 'transform', is: 'transform-right' },
|
|
14
|
-
],
|
|
15
|
-
},
|
|
16
|
-
} as const satisfies Animation
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const POP_IN = {
|
|
4
|
-
id: 'pop-in',
|
|
5
|
-
runs: 'motion-normal',
|
|
6
|
-
eases: 'ease-spring',
|
|
7
|
-
|
|
8
|
-
fills: 'backwards',
|
|
9
|
-
stops: {
|
|
10
|
-
'0%': [
|
|
11
|
-
{ property: 'opacity', is: 'opacity-none' },
|
|
12
|
-
{ property: 'transform', is: 'transform-shrink' },
|
|
13
|
-
],
|
|
14
|
-
'70%': [
|
|
15
|
-
{ property: 'opacity', is: 'opacity-full' },
|
|
16
|
-
{ property: 'transform', is: 'transform-swell' },
|
|
17
|
-
],
|
|
18
|
-
'100%': [
|
|
19
|
-
{ property: 'opacity', is: 'opacity-full' },
|
|
20
|
-
{ property: 'transform', is: 'transform-rest' },
|
|
21
|
-
],
|
|
22
|
-
},
|
|
23
|
-
} as const satisfies Animation
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const POP_OUT = {
|
|
4
|
-
id: 'pop-out',
|
|
5
|
-
runs: 'motion-quick',
|
|
6
|
-
eases: 'ease-in',
|
|
7
|
-
fills: 'forwards',
|
|
8
|
-
stops: {
|
|
9
|
-
'0%': [
|
|
10
|
-
{ property: 'opacity', is: 'opacity-full' },
|
|
11
|
-
{ property: 'transform', is: 'transform-rest' },
|
|
12
|
-
],
|
|
13
|
-
'30%': [
|
|
14
|
-
{ property: 'opacity', is: 'opacity-full' },
|
|
15
|
-
{ property: 'transform', is: 'transform-swell' },
|
|
16
|
-
],
|
|
17
|
-
'100%': [
|
|
18
|
-
{ property: 'opacity', is: 'opacity-none' },
|
|
19
|
-
{ property: 'transform', is: 'transform-shrink' },
|
|
20
|
-
],
|
|
21
|
-
},
|
|
22
|
-
} as const satisfies Animation
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const PRESS = {
|
|
4
|
-
id: 'press',
|
|
5
|
-
runs: 'motion-quick',
|
|
6
|
-
eases: 'ease-out',
|
|
7
|
-
stops: {
|
|
8
|
-
'0%': [{ property: 'transform', is: 'transform-rest' }],
|
|
9
|
-
'50%': [{ property: 'transform', is: 'transform-press' }],
|
|
10
|
-
'100%': [{ property: 'transform', is: 'transform-rest' }],
|
|
11
|
-
},
|
|
12
|
-
} as const satisfies Animation
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const PULSE = {
|
|
4
|
-
id: 'pulse',
|
|
5
|
-
runs: 'motion-slow',
|
|
6
|
-
eases: 'ease-in-out',
|
|
7
|
-
repeats: 'infinite',
|
|
8
|
-
stops: {
|
|
9
|
-
'0%': [{ property: 'opacity', is: 'opacity-full' }],
|
|
10
|
-
'50%': [{ property: 'opacity', is: 'opacity-muted' }],
|
|
11
|
-
'100%': [{ property: 'opacity', is: 'opacity-full' }],
|
|
12
|
-
},
|
|
13
|
-
} as const satisfies Animation
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const RISE = {
|
|
4
|
-
id: 'rise',
|
|
5
|
-
runs: 'motion-normal',
|
|
6
|
-
eases: 'ease-out',
|
|
7
|
-
|
|
8
|
-
fills: 'backwards',
|
|
9
|
-
stops: {
|
|
10
|
-
'0%': [
|
|
11
|
-
{ property: 'opacity', is: 'opacity-none' },
|
|
12
|
-
{ property: 'transform', is: 'transform-below' },
|
|
13
|
-
],
|
|
14
|
-
'100%': [
|
|
15
|
-
{ property: 'opacity', is: 'opacity-full' },
|
|
16
|
-
{ property: 'transform', is: 'transform-rest' },
|
|
17
|
-
],
|
|
18
|
-
},
|
|
19
|
-
} as const satisfies Animation
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const SHAKE = {
|
|
4
|
-
id: 'shake',
|
|
5
|
-
runs: 'motion-quick',
|
|
6
|
-
eases: 'ease-in-out',
|
|
7
|
-
stops: {
|
|
8
|
-
'0%': [{ property: 'transform', is: 'transform-rest' }],
|
|
9
|
-
'25%': [{ property: 'transform', is: 'transform-left' }],
|
|
10
|
-
'75%': [{ property: 'transform', is: 'transform-right' }],
|
|
11
|
-
'100%': [{ property: 'transform', is: 'transform-rest' }],
|
|
12
|
-
},
|
|
13
|
-
} as const satisfies Animation
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const SLIDE_IN_LEFT = {
|
|
4
|
-
id: 'slide-in-left',
|
|
5
|
-
runs: 'motion-normal',
|
|
6
|
-
eases: 'ease-out',
|
|
7
|
-
|
|
8
|
-
fills: 'backwards',
|
|
9
|
-
stops: {
|
|
10
|
-
'0%': [
|
|
11
|
-
{ property: 'opacity', is: 'opacity-none' },
|
|
12
|
-
{ property: 'transform', is: 'transform-far-left' },
|
|
13
|
-
],
|
|
14
|
-
'100%': [
|
|
15
|
-
{ property: 'opacity', is: 'opacity-full' },
|
|
16
|
-
{ property: 'transform', is: 'transform-rest' },
|
|
17
|
-
],
|
|
18
|
-
},
|
|
19
|
-
} as const satisfies Animation
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const SLIDE_IN_RIGHT = {
|
|
4
|
-
id: 'slide-in-right',
|
|
5
|
-
runs: 'motion-normal',
|
|
6
|
-
eases: 'ease-out',
|
|
7
|
-
|
|
8
|
-
fills: 'backwards',
|
|
9
|
-
stops: {
|
|
10
|
-
'0%': [
|
|
11
|
-
{ property: 'opacity', is: 'opacity-none' },
|
|
12
|
-
{ property: 'transform', is: 'transform-far-right' },
|
|
13
|
-
],
|
|
14
|
-
'100%': [
|
|
15
|
-
{ property: 'opacity', is: 'opacity-full' },
|
|
16
|
-
{ property: 'transform', is: 'transform-rest' },
|
|
17
|
-
],
|
|
18
|
-
},
|
|
19
|
-
} as const satisfies Animation
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const SLIDE_OUT_LEFT = {
|
|
4
|
-
id: 'slide-out-left',
|
|
5
|
-
runs: 'motion-quick',
|
|
6
|
-
eases: 'ease-in',
|
|
7
|
-
fills: 'forwards',
|
|
8
|
-
stops: {
|
|
9
|
-
'0%': [
|
|
10
|
-
{ property: 'opacity', is: 'opacity-full' },
|
|
11
|
-
{ property: 'transform', is: 'transform-rest' },
|
|
12
|
-
],
|
|
13
|
-
'100%': [
|
|
14
|
-
{ property: 'opacity', is: 'opacity-none' },
|
|
15
|
-
{ property: 'transform', is: 'transform-far-left' },
|
|
16
|
-
],
|
|
17
|
-
},
|
|
18
|
-
} as const satisfies Animation
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const SLIDE_OUT_RIGHT = {
|
|
4
|
-
id: 'slide-out-right',
|
|
5
|
-
runs: 'motion-quick',
|
|
6
|
-
eases: 'ease-in',
|
|
7
|
-
fills: 'forwards',
|
|
8
|
-
stops: {
|
|
9
|
-
'0%': [
|
|
10
|
-
{ property: 'opacity', is: 'opacity-full' },
|
|
11
|
-
{ property: 'transform', is: 'transform-rest' },
|
|
12
|
-
],
|
|
13
|
-
'100%': [
|
|
14
|
-
{ property: 'opacity', is: 'opacity-none' },
|
|
15
|
-
{ property: 'transform', is: 'transform-far-right' },
|
|
16
|
-
],
|
|
17
|
-
},
|
|
18
|
-
} as const satisfies Animation
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const SPIN = {
|
|
4
|
-
id: 'spin',
|
|
5
|
-
runs: 'motion-slow',
|
|
6
|
-
eases: 'ease-steady',
|
|
7
|
-
repeats: 'infinite',
|
|
8
|
-
stops: {
|
|
9
|
-
'0%': [{ property: 'transform', is: 'transform-rest' }],
|
|
10
|
-
'100%': [{ property: 'transform', is: 'transform-turn' }],
|
|
11
|
-
},
|
|
12
|
-
} as const satisfies Animation
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const SWELL = {
|
|
4
|
-
id: 'swell',
|
|
5
|
-
runs: 'motion-quick',
|
|
6
|
-
eases: 'ease-out',
|
|
7
|
-
fills: 'forwards',
|
|
8
|
-
stops: {
|
|
9
|
-
'0%': [
|
|
10
|
-
{ property: 'transform', is: 'transform-rest' },
|
|
11
|
-
],
|
|
12
|
-
'100%': [
|
|
13
|
-
{ property: 'transform', is: 'transform-swell' },
|
|
14
|
-
],
|
|
15
|
-
},
|
|
16
|
-
} as const satisfies Animation
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const WOBBLE = {
|
|
4
|
-
id: 'wobble',
|
|
5
|
-
runs: 'motion-slow',
|
|
6
|
-
eases: 'ease-in-out',
|
|
7
|
-
stops: {
|
|
8
|
-
'0%': [
|
|
9
|
-
{ property: 'transform', is: 'transform-rest' },
|
|
10
|
-
],
|
|
11
|
-
'25%': [
|
|
12
|
-
{ property: 'transform', is: 'transform-tilt' },
|
|
13
|
-
],
|
|
14
|
-
'50%': [
|
|
15
|
-
{ property: 'transform', is: 'transform-rest' },
|
|
16
|
-
],
|
|
17
|
-
'75%': [
|
|
18
|
-
{ property: 'transform', is: 'transform-tilt-back' },
|
|
19
|
-
],
|
|
20
|
-
'100%': [
|
|
21
|
-
{ property: 'transform', is: 'transform-rest' },
|
|
22
|
-
],
|
|
23
|
-
},
|
|
24
|
-
} as const satisfies Animation
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Animation } from '../animations.ts'
|
|
2
|
-
|
|
3
|
-
export const ZOOM_IN = {
|
|
4
|
-
id: 'zoom-in',
|
|
5
|
-
runs: 'motion-normal',
|
|
6
|
-
eases: 'ease-out',
|
|
7
|
-
|
|
8
|
-
fills: 'backwards',
|
|
9
|
-
stops: {
|
|
10
|
-
'0%': [
|
|
11
|
-
{ property: 'opacity', is: 'opacity-none' },
|
|
12
|
-
{ property: 'transform', is: 'transform-grow' },
|
|
13
|
-
],
|
|
14
|
-
'100%': [
|
|
15
|
-
{ property: 'opacity', is: 'opacity-full' },
|
|
16
|
-
{ property: 'transform', is: 'transform-rest' },
|
|
17
|
-
],
|
|
18
|
-
},
|
|
19
|
-
} as const satisfies Animation
|