motionary 6.7.0 → 6.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/bin/usa-codemod-7.mjs +91 -0
- package/dist/chunks/{base-DchG4q_S.js → base-D5MHqeDd.js} +2 -2
- package/dist/chunks/{base-DchG4q_S.js.map → base-D5MHqeDd.js.map} +1 -1
- package/dist/chunks/{core-DVyTlo9Q.js → core-DyJu5r5a.js} +2 -2
- package/dist/chunks/{core-DVyTlo9Q.js.map → core-DyJu5r5a.js.map} +1 -1
- package/dist/chunks/{core-D2vF8kZb.js → core-ZGo4hOEk.js} +2 -2
- package/dist/chunks/{core-D2vF8kZb.js.map → core-ZGo4hOEk.js.map} +1 -1
- package/dist/chunks/{fx-DUMVKSvg.js → fx-DlGRMJ-Z.js} +2 -2
- package/dist/chunks/{fx-DUMVKSvg.js.map → fx-DlGRMJ-Z.js.map} +1 -1
- package/dist/chunks/{gpu-BBRLgEzM.cjs → gpu-C2D4T9Q-.cjs} +9 -2
- package/dist/chunks/gpu-C2D4T9Q-.cjs.map +1 -0
- package/dist/chunks/{gpu-CsP2ZB3x.js → gpu-DPhMkJq6.js} +10 -4
- package/dist/chunks/gpu-DPhMkJq6.js.map +1 -0
- package/dist/chunks/player-DH3TIz-t.js +516 -0
- package/dist/chunks/player-DH3TIz-t.js.map +1 -0
- package/dist/chunks/player-PS6_FzNw.cjs +525 -0
- package/dist/chunks/player-PS6_FzNw.cjs.map +1 -0
- package/dist/chunks/{registry-D23neB4M.js → registry-CTLWeg-J.js} +2 -2
- package/dist/chunks/{registry-D23neB4M.js.map → registry-CTLWeg-J.js.map} +1 -1
- package/dist/chunks/{spring-BhoT09Qb.js → spring-B-9MZOrW.js} +2 -2
- package/dist/chunks/{spring-BhoT09Qb.js.map → spring-B-9MZOrW.js.map} +1 -1
- package/dist/chunks/{variants-C_hv_s23.js → variants-CoZn3k_5.js} +2 -2
- package/dist/chunks/{variants-C_hv_s23.js.map → variants-CoZn3k_5.js.map} +1 -1
- package/dist/components/a11y.js +2 -2
- package/dist/components/angular.js +7 -7
- package/dist/components/background.js +2 -2
- package/dist/components/bridge.js +1 -1
- package/dist/components/cards.js +2 -2
- package/dist/components/click.js +3 -3
- package/dist/components/depth.js +3 -3
- package/dist/components/effects.cjs +13 -522
- package/dist/components/effects.cjs.map +1 -1
- package/dist/components/effects.js +7 -515
- package/dist/components/effects.js.map +1 -1
- package/dist/components/feedback.js +1 -1
- package/dist/components/fx-3d.cjs +8 -2
- package/dist/components/fx-3d.cjs.map +1 -1
- package/dist/components/fx-3d.d.cts +3 -1
- package/dist/components/fx-3d.d.ts +3 -1
- package/dist/components/fx-3d.js +9 -4
- package/dist/components/fx-3d.js.map +1 -1
- package/dist/components/fx-focus.cjs +125 -0
- package/dist/components/fx-focus.cjs.map +1 -0
- package/dist/components/fx-focus.d.cts +65 -0
- package/dist/components/fx-focus.d.ts +65 -0
- package/dist/components/fx-focus.js +122 -0
- package/dist/components/fx-focus.js.map +1 -0
- package/dist/components/fx-gpu.cjs +3 -2
- package/dist/components/fx-gpu.cjs.map +1 -1
- package/dist/components/fx-gpu.d.cts +3 -1
- package/dist/components/fx-gpu.d.ts +3 -1
- package/dist/components/fx-gpu.js +3 -3
- package/dist/components/fx-light.cjs +8 -2
- package/dist/components/fx-light.cjs.map +1 -1
- package/dist/components/fx-light.d.cts +3 -1
- package/dist/components/fx-light.d.ts +3 -1
- package/dist/components/fx-light.js +9 -4
- package/dist/components/fx-light.js.map +1 -1
- package/dist/components/fx-morph.cjs +8 -2
- package/dist/components/fx-morph.cjs.map +1 -1
- package/dist/components/fx-morph.d.cts +3 -1
- package/dist/components/fx-morph.d.ts +3 -1
- package/dist/components/fx-morph.js +9 -4
- package/dist/components/fx-morph.js.map +1 -1
- package/dist/components/fx-physics.cjs +350 -0
- package/dist/components/fx-physics.cjs.map +1 -0
- package/dist/components/fx-physics.d.cts +94 -0
- package/dist/components/fx-physics.d.ts +94 -0
- package/dist/components/fx-physics.js +345 -0
- package/dist/components/fx-physics.js.map +1 -0
- package/dist/components/fx-text.cjs +8 -2
- package/dist/components/fx-text.cjs.map +1 -1
- package/dist/components/fx-text.d.cts +3 -1
- package/dist/components/fx-text.d.ts +3 -1
- package/dist/components/fx-text.js +9 -4
- package/dist/components/fx-text.js.map +1 -1
- package/dist/components/fx-transitions.cjs +8 -2
- package/dist/components/fx-transitions.cjs.map +1 -1
- package/dist/components/fx-transitions.d.cts +3 -1
- package/dist/components/fx-transitions.d.ts +3 -1
- package/dist/components/fx-transitions.js +10 -5
- package/dist/components/fx-transitions.js.map +1 -1
- package/dist/components/fx-weather.cjs +271 -0
- package/dist/components/fx-weather.cjs.map +1 -0
- package/dist/components/fx-weather.d.cts +72 -0
- package/dist/components/fx-weather.d.ts +72 -0
- package/dist/components/fx-weather.js +266 -0
- package/dist/components/fx-weather.js.map +1 -0
- package/dist/components/fx.js +5 -5
- package/dist/components/fx2.cjs +49 -10
- package/dist/components/fx2.cjs.map +1 -1
- package/dist/components/fx2.d.cts +181 -4
- package/dist/components/fx2.d.ts +181 -4
- package/dist/components/fx2.js +42 -22
- package/dist/components/fx2.js.map +1 -1
- package/dist/components/gesture.js +4 -4
- package/dist/components/interaction.cjs +1 -0
- package/dist/components/interaction.cjs.map +1 -1
- package/dist/components/interaction.js +2 -1
- package/dist/components/interaction.js.map +1 -1
- package/dist/components/layout.js +1 -1
- package/dist/components/lite.cjs +2 -0
- package/dist/components/lite.cjs.map +1 -1
- package/dist/components/lite.js +2 -0
- package/dist/components/lite.js.map +1 -1
- package/dist/components/marketplace.cjs +82 -0
- package/dist/components/marketplace.cjs.map +1 -0
- package/dist/components/marketplace.d.cts +108 -0
- package/dist/components/marketplace.d.ts +108 -0
- package/dist/components/marketplace.js +77 -0
- package/dist/components/marketplace.js.map +1 -0
- package/dist/components/packs.js +1 -1
- package/dist/components/page.js +3 -3
- package/dist/components/perf.js +2 -2
- package/dist/components/physics.js +3 -3
- package/dist/components/reveal.js +1 -1
- package/dist/components/solid.js +7 -7
- package/dist/components/svelte.js +7 -7
- package/dist/components/svg.js +1 -1
- package/dist/components/text.js +2 -2
- package/dist/components/timeline.js +3 -3
- package/dist/components/transitions.js +1 -1
- package/dist/components/ui.cjs +1 -0
- package/dist/components/ui.cjs.map +1 -1
- package/dist/components/ui.js +5 -4
- package/dist/components/ui.js.map +1 -1
- package/dist/components/vue.js +7 -7
- package/dist/components/webgl.js +1 -1
- package/dist/components/widgets.cjs +1189 -45
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +177 -2
- package/dist/components/widgets.d.ts +177 -2
- package/dist/components/widgets.js +1179 -48
- package/dist/components/widgets.js.map +1 -1
- package/dist/components.js +9 -9
- package/dist/components.umd.js +2 -2
- package/dist/components.umd.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/docs/ROADMAP.md +2 -2
- package/docs/components.md +55 -0
- package/docs/deprecations.md +4 -0
- package/docs/upgrading-7.md +33 -0
- package/package.json +43 -2
- package/dist/chunks/gpu-BBRLgEzM.cjs.map +0 -1
- package/dist/chunks/gpu-CsP2ZB3x.js.map +0 -1
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var registry = require('../chunks/registry-DehBVRDV.cjs');
|
|
4
|
+
require('../chunks/base-BaQV-2ha.cjs');
|
|
5
|
+
|
|
6
|
+
const EFFECT_PACK_FORMAT = 'motionary/effect-pack';
|
|
7
|
+
const SEMVER = /^\d+\.\d+\.\d+(?:-[\w.]+)?$/;
|
|
8
|
+
const PKG = /^(?:@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/;
|
|
9
|
+
/** Build a manifest from an effect pack. */
|
|
10
|
+
function packManifest(name, packVersion, effects, extra = {}) {
|
|
11
|
+
return {
|
|
12
|
+
format: EFFECT_PACK_FORMAT,
|
|
13
|
+
version: 1,
|
|
14
|
+
name,
|
|
15
|
+
packVersion,
|
|
16
|
+
...extra,
|
|
17
|
+
effects: effects.map((e) => ({ name: e.name, kind: e.kind, ...(e.description ? { description: e.description } : {}), ...(e.defaults ? { defaults: JSON.parse(JSON.stringify(e.defaults)) } : {}) })),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/** Check a manifest (and optionally the module's effects against it). */
|
|
21
|
+
function validateManifest(m, effects) {
|
|
22
|
+
const errors = [];
|
|
23
|
+
const x = m;
|
|
24
|
+
if (!x || typeof x !== 'object')
|
|
25
|
+
return { ok: false, errors: ['manifest must be an object'] };
|
|
26
|
+
if (x.format !== EFFECT_PACK_FORMAT)
|
|
27
|
+
errors.push(`format must be "${EFFECT_PACK_FORMAT}"`);
|
|
28
|
+
if (x.version !== 1)
|
|
29
|
+
errors.push('version must be 1');
|
|
30
|
+
if (!x.name || !PKG.test(x.name))
|
|
31
|
+
errors.push('name must be an npm package name');
|
|
32
|
+
if (!x.packVersion || !SEMVER.test(x.packVersion))
|
|
33
|
+
errors.push('packVersion must be semver (x.y.z)');
|
|
34
|
+
if (!Array.isArray(x.effects) || !x.effects.length)
|
|
35
|
+
errors.push('effects must be a non-empty array');
|
|
36
|
+
const seen = new Set();
|
|
37
|
+
for (const e of x.effects || []) {
|
|
38
|
+
if (!e || !/^[a-z][a-z0-9-]*$/.test(e.name || ''))
|
|
39
|
+
errors.push(`invalid effect name "${e?.name}"`);
|
|
40
|
+
else if (seen.has(e.name))
|
|
41
|
+
errors.push(`duplicate effect "${e.name}"`);
|
|
42
|
+
else
|
|
43
|
+
seen.add(e.name);
|
|
44
|
+
if (!e || !registry.EFFECT_KINDS.includes(e.kind))
|
|
45
|
+
errors.push(`effect "${e?.name}": unknown kind "${e?.kind}"`);
|
|
46
|
+
}
|
|
47
|
+
if (effects) {
|
|
48
|
+
const names = new Set(effects.map((e) => e.name));
|
|
49
|
+
for (const n of seen)
|
|
50
|
+
if (!names.has(n))
|
|
51
|
+
errors.push(`effect "${n}" is in the manifest but not exported`);
|
|
52
|
+
for (const n of names)
|
|
53
|
+
if (!seen.has(n))
|
|
54
|
+
errors.push(`effect "${n}" is exported but missing from the manifest`);
|
|
55
|
+
}
|
|
56
|
+
return { ok: !errors.length, errors };
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Import an effect pack (a URL / specifier, or an already imported module
|
|
60
|
+
* with `effects` / `default` and `manifest`), validate and register it.
|
|
61
|
+
* Returns the registered effect names.
|
|
62
|
+
*/
|
|
63
|
+
async function loadEffectPack(src, opts = {}) {
|
|
64
|
+
const mod = typeof src === 'string' ? await import(/* @vite-ignore */ src) : src;
|
|
65
|
+
const effects = mod.effects || mod.default || [];
|
|
66
|
+
const manifest = opts.manifest || mod.manifest;
|
|
67
|
+
const v = validateManifest(manifest, effects);
|
|
68
|
+
if (!v.ok)
|
|
69
|
+
throw new Error(`[motionary] invalid effect pack: ${v.errors.join('; ')}`);
|
|
70
|
+
const clash = effects.filter((e) => registry.hasEffect(e.name));
|
|
71
|
+
if (clash.length && !opts.override)
|
|
72
|
+
throw new Error(`[motionary] effect pack "${manifest.name}" would replace ${clash.map((e) => e.name).join(', ')} (pass { override: true })`);
|
|
73
|
+
for (const e of effects)
|
|
74
|
+
registry.registerEffect(e, { override: !!opts.override });
|
|
75
|
+
return effects.map((e) => e.name);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
exports.EFFECT_PACK_FORMAT = EFFECT_PACK_FORMAT;
|
|
79
|
+
exports.loadEffectPack = loadEffectPack;
|
|
80
|
+
exports.packManifest = packManifest;
|
|
81
|
+
exports.validateManifest = validateManifest;
|
|
82
|
+
//# sourceMappingURL=marketplace.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marketplace.cjs","sources":["../../src/components/fx2/manifest.ts"],"sourcesContent":["/**\n * 6.9 — effect marketplace manifest (`motionary/components/marketplace`).\n *\n * A third-party effect pack is an ES module that exports its effects (an\n * `EffectDefinition[]` as `effects` or `default`) plus a JSON manifest:\n *\n * ```json\n * { \"format\": \"motionary/effect-pack\", \"version\": 1,\n * \"name\": \"@acme/motion-snow\", \"packVersion\": \"1.2.0\",\n * \"description\": \"Snow and frost effects\", \"license\": \"MIT\",\n * \"author\": \"Acme\", \"entry\": \"./dist/index.js\", \"requires\": \">=6.9\",\n * \"effects\": [{ \"name\": \"frost\", \"kind\": \"background\", \"description\": \"…\",\n * \"defaults\": { \"speed\": 1 } }] }\n * ```\n *\n * `packManifest()` writes one from your effects, `validateManifest()` checks\n * one (format, semver, unique kebab-case names, known kinds, effects match\n * the module), and `loadEffectPack()` imports a pack (URL or module),\n * validates it and registers its effects — refusing names that already\n * exist unless `override`.\n */\nimport type { EffectDefinition } from '../fx/registry';\nimport { EFFECT_KINDS, registerEffect, hasEffect } from '../fx/registry';\n\nexport const EFFECT_PACK_FORMAT = 'motionary/effect-pack';\n\nexport interface EffectPackManifest {\n format: typeof EFFECT_PACK_FORMAT;\n version: 1;\n name: string;\n packVersion: string;\n description?: string;\n license?: string;\n author?: string;\n homepage?: string;\n entry?: string;\n requires?: string;\n keywords?: string[];\n effects: { name: string; kind: string; description?: string; defaults?: Record<string, unknown> }[];\n}\n\nconst SEMVER = /^\\d+\\.\\d+\\.\\d+(?:-[\\w.]+)?$/;\nconst PKG = /^(?:@[a-z0-9-~][a-z0-9-._~]*\\/)?[a-z0-9-~][a-z0-9-._~]*$/;\n\n/** Build a manifest from an effect pack. */\nexport function packManifest(name: string, packVersion: string, effects: EffectDefinition[], extra: Partial<Omit<EffectPackManifest, 'format' | 'version' | 'name' | 'packVersion' | 'effects'>> = {}): EffectPackManifest {\n return {\n format: EFFECT_PACK_FORMAT,\n version: 1,\n name,\n packVersion,\n ...extra,\n effects: effects.map((e) => ({ name: e.name, kind: e.kind, ...(e.description ? { description: e.description } : {}), ...(e.defaults ? { defaults: JSON.parse(JSON.stringify(e.defaults)) } : {}) })),\n };\n}\n\n/** Check a manifest (and optionally the module's effects against it). */\nexport function validateManifest(m: unknown, effects?: EffectDefinition[]): { ok: boolean; errors: string[] } {\n const errors: string[] = [];\n const x = m as Partial<EffectPackManifest> | null;\n if (!x || typeof x !== 'object') return { ok: false, errors: ['manifest must be an object'] };\n if (x.format !== EFFECT_PACK_FORMAT) errors.push(`format must be \"${EFFECT_PACK_FORMAT}\"`);\n if (x.version !== 1) errors.push('version must be 1');\n if (!x.name || !PKG.test(x.name)) errors.push('name must be an npm package name');\n if (!x.packVersion || !SEMVER.test(x.packVersion)) errors.push('packVersion must be semver (x.y.z)');\n if (!Array.isArray(x.effects) || !x.effects.length) errors.push('effects must be a non-empty array');\n const seen = new Set<string>();\n for (const e of x.effects || []) {\n if (!e || !/^[a-z][a-z0-9-]*$/.test(e.name || '')) errors.push(`invalid effect name \"${e?.name}\"`);\n else if (seen.has(e.name)) errors.push(`duplicate effect \"${e.name}\"`);\n else seen.add(e.name);\n if (!e || !(EFFECT_KINDS as readonly string[]).includes(e.kind)) errors.push(`effect \"${e?.name}\": unknown kind \"${e?.kind}\"`);\n }\n if (effects) {\n const names = new Set(effects.map((e) => e.name));\n for (const n of seen) if (!names.has(n)) errors.push(`effect \"${n}\" is in the manifest but not exported`);\n for (const n of names) if (!seen.has(n)) errors.push(`effect \"${n}\" is exported but missing from the manifest`);\n }\n return { ok: !errors.length, errors };\n}\n\n/**\n * Import an effect pack (a URL / specifier, or an already imported module\n * with `effects` / `default` and `manifest`), validate and register it.\n * Returns the registered effect names.\n */\nexport async function loadEffectPack(src: string | { effects?: EffectDefinition[]; default?: EffectDefinition[]; manifest?: EffectPackManifest }, opts: { manifest?: EffectPackManifest; override?: boolean } = {}): Promise<string[]> {\n const mod: any = typeof src === 'string' ? await import(/* @vite-ignore */ src) : src;\n const effects: EffectDefinition[] = mod.effects || mod.default || [];\n const manifest = opts.manifest || mod.manifest;\n const v = validateManifest(manifest, effects);\n if (!v.ok) throw new Error(`[motionary] invalid effect pack: ${v.errors.join('; ')}`);\n const clash = effects.filter((e) => hasEffect(e.name));\n if (clash.length && !opts.override) throw new Error(`[motionary] effect pack \"${manifest.name}\" would replace ${clash.map((e) => e.name).join(', ')} (pass { override: true })`);\n for (const e of effects) registerEffect(e, { override: !!opts.override });\n return effects.map((e) => e.name);\n}\n"],"names":["EFFECT_KINDS","hasEffect","registerEffect"],"mappings":";;;;;AAwBO,MAAM,kBAAkB,GAAG;AAiBlC,MAAM,MAAM,GAAG,6BAA6B;AAC5C,MAAM,GAAG,GAAG,0DAA0D;AAEtE;AACM,SAAU,YAAY,CAAC,IAAY,EAAE,WAAmB,EAAE,OAA2B,EAAE,KAAA,GAAsG,EAAE,EAAA;IACnM,OAAO;AACL,QAAA,MAAM,EAAE,kBAAkB;AAC1B,QAAA,OAAO,EAAE,CAAC;QACV,IAAI;QACJ,WAAW;AACX,QAAA,GAAG,KAAK;AACR,QAAA,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,WAAW,GAAG,EAAE,WAAW,EAAE,CAAC,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,QAAQ,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;KACrM;AACH;AAEA;AACM,SAAU,gBAAgB,CAAC,CAAU,EAAE,OAA4B,EAAA;IACvE,MAAM,MAAM,GAAa,EAAE;IAC3B,MAAM,CAAC,GAAG,CAAuC;AACjD,IAAA,IAAI,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,4BAA4B,CAAC,EAAE;AA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M,IAAI,KAAK,CAAC,CAAA,iCAAA,EAAoC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,CAAE,CAAC;AACrF,IAAA,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAKC,kBAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AACtD,IAAA,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ;AAAE,QAAA,MAAM,IAAI,KAAK,CAAC,CAAA,yBAAA,EAA4B,QAAQ,CAAC,IAAI,CAAA,gBAAA,EAAmB,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,0BAAA,CAA4B,CAAC;IAChL,KAAK,MAAM,CAAC,IAAI,OAAO;AAAE,QAAAC,uBAAc,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;AACzE,IAAA,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;AACnC;;;;;;;"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
type MotionSensitivity = 'full' | 'gentle' | 'minimal' | 'static';
|
|
2
|
+
type Cleanup = () => void;
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 5.0 — unified plugin-style effect registration. Every effect (built-in or
|
|
6
|
+
* yours) is a plain object registered once and played the same way:
|
|
7
|
+
* `playEffect(el, name)`, `bindEffect(el, name, { trigger })` or
|
|
8
|
+
* `<usa-fx effect="name" trigger="click">`. Effects get a context that
|
|
9
|
+
* already applies reduced motion, motion sensitivity, intensity and the
|
|
10
|
+
* animation budget.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
declare const EFFECT_KINDS: readonly ["enter", "exit", "attention", "click", "hover", "card", "loop", "page", "background", "text", "cursor", "scroll"];
|
|
14
|
+
type EffectKind = (typeof EFFECT_KINDS)[number];
|
|
15
|
+
interface EffectContext {
|
|
16
|
+
/** Reduced motion applies (OS setting, `minimal` / `static` sensitivity). */
|
|
17
|
+
readonly reduced: boolean;
|
|
18
|
+
readonly sensitivity: MotionSensitivity;
|
|
19
|
+
/** The triggering event (pointer position for click effects), if any. */
|
|
20
|
+
readonly event?: Event;
|
|
21
|
+
/** `el.animate()` with the library's motion rules (may return `null`). */
|
|
22
|
+
animate(el: Element, keyframes: Keyframe[], options: KeyframeAnimationOptions): Animation | null;
|
|
23
|
+
/** Register teardown for long-running effects (loops, listeners). */
|
|
24
|
+
onCleanup(fn: Cleanup): void;
|
|
25
|
+
}
|
|
26
|
+
interface EffectDefinition<O extends Record<string, unknown> = Record<string, any>> {
|
|
27
|
+
/** Unique, kebab-case. */
|
|
28
|
+
name: string;
|
|
29
|
+
kind: EffectKind;
|
|
30
|
+
/** One line for docs and the gallery. */
|
|
31
|
+
description?: string;
|
|
32
|
+
/** Option defaults (merged under the caller's options). */
|
|
33
|
+
defaults?: Partial<O>;
|
|
34
|
+
/**
|
|
35
|
+
* Under reduced motion: `'skip'` (do nothing — default for loop, background
|
|
36
|
+
* and cursor effects) or `'run'` (run with `ctx.reduced === true`, the
|
|
37
|
+
* effect degrades itself — default for everything else).
|
|
38
|
+
*/
|
|
39
|
+
reduced?: 'skip' | 'run';
|
|
40
|
+
/** Play the effect. Return an Animation / Promise to be awaited, or a cleanup. */
|
|
41
|
+
run(el: HTMLElement, options: O, ctx: EffectContext): void | Cleanup | Animation | null | Promise<unknown>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* 6.9 — effect marketplace manifest (`motionary/components/marketplace`).
|
|
46
|
+
*
|
|
47
|
+
* A third-party effect pack is an ES module that exports its effects (an
|
|
48
|
+
* `EffectDefinition[]` as `effects` or `default`) plus a JSON manifest:
|
|
49
|
+
*
|
|
50
|
+
* ```json
|
|
51
|
+
* { "format": "motionary/effect-pack", "version": 1,
|
|
52
|
+
* "name": "@acme/motion-snow", "packVersion": "1.2.0",
|
|
53
|
+
* "description": "Snow and frost effects", "license": "MIT",
|
|
54
|
+
* "author": "Acme", "entry": "./dist/index.js", "requires": ">=6.9",
|
|
55
|
+
* "effects": [{ "name": "frost", "kind": "background", "description": "…",
|
|
56
|
+
* "defaults": { "speed": 1 } }] }
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* `packManifest()` writes one from your effects, `validateManifest()` checks
|
|
60
|
+
* one (format, semver, unique kebab-case names, known kinds, effects match
|
|
61
|
+
* the module), and `loadEffectPack()` imports a pack (URL or module),
|
|
62
|
+
* validates it and registers its effects — refusing names that already
|
|
63
|
+
* exist unless `override`.
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
declare const EFFECT_PACK_FORMAT = "motionary/effect-pack";
|
|
67
|
+
interface EffectPackManifest {
|
|
68
|
+
format: typeof EFFECT_PACK_FORMAT;
|
|
69
|
+
version: 1;
|
|
70
|
+
name: string;
|
|
71
|
+
packVersion: string;
|
|
72
|
+
description?: string;
|
|
73
|
+
license?: string;
|
|
74
|
+
author?: string;
|
|
75
|
+
homepage?: string;
|
|
76
|
+
entry?: string;
|
|
77
|
+
requires?: string;
|
|
78
|
+
keywords?: string[];
|
|
79
|
+
effects: {
|
|
80
|
+
name: string;
|
|
81
|
+
kind: string;
|
|
82
|
+
description?: string;
|
|
83
|
+
defaults?: Record<string, unknown>;
|
|
84
|
+
}[];
|
|
85
|
+
}
|
|
86
|
+
/** Build a manifest from an effect pack. */
|
|
87
|
+
declare function packManifest(name: string, packVersion: string, effects: EffectDefinition[], extra?: Partial<Omit<EffectPackManifest, 'format' | 'version' | 'name' | 'packVersion' | 'effects'>>): EffectPackManifest;
|
|
88
|
+
/** Check a manifest (and optionally the module's effects against it). */
|
|
89
|
+
declare function validateManifest(m: unknown, effects?: EffectDefinition[]): {
|
|
90
|
+
ok: boolean;
|
|
91
|
+
errors: string[];
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Import an effect pack (a URL / specifier, or an already imported module
|
|
95
|
+
* with `effects` / `default` and `manifest`), validate and register it.
|
|
96
|
+
* Returns the registered effect names.
|
|
97
|
+
*/
|
|
98
|
+
declare function loadEffectPack(src: string | {
|
|
99
|
+
effects?: EffectDefinition[];
|
|
100
|
+
default?: EffectDefinition[];
|
|
101
|
+
manifest?: EffectPackManifest;
|
|
102
|
+
}, opts?: {
|
|
103
|
+
manifest?: EffectPackManifest;
|
|
104
|
+
override?: boolean;
|
|
105
|
+
}): Promise<string[]>;
|
|
106
|
+
|
|
107
|
+
export { EFFECT_PACK_FORMAT, loadEffectPack, packManifest, validateManifest };
|
|
108
|
+
export type { EffectPackManifest };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
type MotionSensitivity = 'full' | 'gentle' | 'minimal' | 'static';
|
|
2
|
+
type Cleanup = () => void;
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 5.0 — unified plugin-style effect registration. Every effect (built-in or
|
|
6
|
+
* yours) is a plain object registered once and played the same way:
|
|
7
|
+
* `playEffect(el, name)`, `bindEffect(el, name, { trigger })` or
|
|
8
|
+
* `<usa-fx effect="name" trigger="click">`. Effects get a context that
|
|
9
|
+
* already applies reduced motion, motion sensitivity, intensity and the
|
|
10
|
+
* animation budget.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
declare const EFFECT_KINDS: readonly ["enter", "exit", "attention", "click", "hover", "card", "loop", "page", "background", "text", "cursor", "scroll"];
|
|
14
|
+
type EffectKind = (typeof EFFECT_KINDS)[number];
|
|
15
|
+
interface EffectContext {
|
|
16
|
+
/** Reduced motion applies (OS setting, `minimal` / `static` sensitivity). */
|
|
17
|
+
readonly reduced: boolean;
|
|
18
|
+
readonly sensitivity: MotionSensitivity;
|
|
19
|
+
/** The triggering event (pointer position for click effects), if any. */
|
|
20
|
+
readonly event?: Event;
|
|
21
|
+
/** `el.animate()` with the library's motion rules (may return `null`). */
|
|
22
|
+
animate(el: Element, keyframes: Keyframe[], options: KeyframeAnimationOptions): Animation | null;
|
|
23
|
+
/** Register teardown for long-running effects (loops, listeners). */
|
|
24
|
+
onCleanup(fn: Cleanup): void;
|
|
25
|
+
}
|
|
26
|
+
interface EffectDefinition<O extends Record<string, unknown> = Record<string, any>> {
|
|
27
|
+
/** Unique, kebab-case. */
|
|
28
|
+
name: string;
|
|
29
|
+
kind: EffectKind;
|
|
30
|
+
/** One line for docs and the gallery. */
|
|
31
|
+
description?: string;
|
|
32
|
+
/** Option defaults (merged under the caller's options). */
|
|
33
|
+
defaults?: Partial<O>;
|
|
34
|
+
/**
|
|
35
|
+
* Under reduced motion: `'skip'` (do nothing — default for loop, background
|
|
36
|
+
* and cursor effects) or `'run'` (run with `ctx.reduced === true`, the
|
|
37
|
+
* effect degrades itself — default for everything else).
|
|
38
|
+
*/
|
|
39
|
+
reduced?: 'skip' | 'run';
|
|
40
|
+
/** Play the effect. Return an Animation / Promise to be awaited, or a cleanup. */
|
|
41
|
+
run(el: HTMLElement, options: O, ctx: EffectContext): void | Cleanup | Animation | null | Promise<unknown>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* 6.9 — effect marketplace manifest (`motionary/components/marketplace`).
|
|
46
|
+
*
|
|
47
|
+
* A third-party effect pack is an ES module that exports its effects (an
|
|
48
|
+
* `EffectDefinition[]` as `effects` or `default`) plus a JSON manifest:
|
|
49
|
+
*
|
|
50
|
+
* ```json
|
|
51
|
+
* { "format": "motionary/effect-pack", "version": 1,
|
|
52
|
+
* "name": "@acme/motion-snow", "packVersion": "1.2.0",
|
|
53
|
+
* "description": "Snow and frost effects", "license": "MIT",
|
|
54
|
+
* "author": "Acme", "entry": "./dist/index.js", "requires": ">=6.9",
|
|
55
|
+
* "effects": [{ "name": "frost", "kind": "background", "description": "…",
|
|
56
|
+
* "defaults": { "speed": 1 } }] }
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* `packManifest()` writes one from your effects, `validateManifest()` checks
|
|
60
|
+
* one (format, semver, unique kebab-case names, known kinds, effects match
|
|
61
|
+
* the module), and `loadEffectPack()` imports a pack (URL or module),
|
|
62
|
+
* validates it and registers its effects — refusing names that already
|
|
63
|
+
* exist unless `override`.
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
declare const EFFECT_PACK_FORMAT = "motionary/effect-pack";
|
|
67
|
+
interface EffectPackManifest {
|
|
68
|
+
format: typeof EFFECT_PACK_FORMAT;
|
|
69
|
+
version: 1;
|
|
70
|
+
name: string;
|
|
71
|
+
packVersion: string;
|
|
72
|
+
description?: string;
|
|
73
|
+
license?: string;
|
|
74
|
+
author?: string;
|
|
75
|
+
homepage?: string;
|
|
76
|
+
entry?: string;
|
|
77
|
+
requires?: string;
|
|
78
|
+
keywords?: string[];
|
|
79
|
+
effects: {
|
|
80
|
+
name: string;
|
|
81
|
+
kind: string;
|
|
82
|
+
description?: string;
|
|
83
|
+
defaults?: Record<string, unknown>;
|
|
84
|
+
}[];
|
|
85
|
+
}
|
|
86
|
+
/** Build a manifest from an effect pack. */
|
|
87
|
+
declare function packManifest(name: string, packVersion: string, effects: EffectDefinition[], extra?: Partial<Omit<EffectPackManifest, 'format' | 'version' | 'name' | 'packVersion' | 'effects'>>): EffectPackManifest;
|
|
88
|
+
/** Check a manifest (and optionally the module's effects against it). */
|
|
89
|
+
declare function validateManifest(m: unknown, effects?: EffectDefinition[]): {
|
|
90
|
+
ok: boolean;
|
|
91
|
+
errors: string[];
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Import an effect pack (a URL / specifier, or an already imported module
|
|
95
|
+
* with `effects` / `default` and `manifest`), validate and register it.
|
|
96
|
+
* Returns the registered effect names.
|
|
97
|
+
*/
|
|
98
|
+
declare function loadEffectPack(src: string | {
|
|
99
|
+
effects?: EffectDefinition[];
|
|
100
|
+
default?: EffectDefinition[];
|
|
101
|
+
manifest?: EffectPackManifest;
|
|
102
|
+
}, opts?: {
|
|
103
|
+
manifest?: EffectPackManifest;
|
|
104
|
+
override?: boolean;
|
|
105
|
+
}): Promise<string[]>;
|
|
106
|
+
|
|
107
|
+
export { EFFECT_PACK_FORMAT, loadEffectPack, packManifest, validateManifest };
|
|
108
|
+
export type { EffectPackManifest };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { hasEffect, registerEffect, EFFECT_KINDS } from '../chunks/registry-CTLWeg-J.js';
|
|
2
|
+
import '../chunks/base-D5MHqeDd.js';
|
|
3
|
+
|
|
4
|
+
const EFFECT_PACK_FORMAT = 'motionary/effect-pack';
|
|
5
|
+
const SEMVER = /^\d+\.\d+\.\d+(?:-[\w.]+)?$/;
|
|
6
|
+
const PKG = /^(?:@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/;
|
|
7
|
+
/** Build a manifest from an effect pack. */
|
|
8
|
+
function packManifest(name, packVersion, effects, extra = {}) {
|
|
9
|
+
return {
|
|
10
|
+
format: EFFECT_PACK_FORMAT,
|
|
11
|
+
version: 1,
|
|
12
|
+
name,
|
|
13
|
+
packVersion,
|
|
14
|
+
...extra,
|
|
15
|
+
effects: effects.map((e) => ({ name: e.name, kind: e.kind, ...(e.description ? { description: e.description } : {}), ...(e.defaults ? { defaults: JSON.parse(JSON.stringify(e.defaults)) } : {}) })),
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/** Check a manifest (and optionally the module's effects against it). */
|
|
19
|
+
function validateManifest(m, effects) {
|
|
20
|
+
const errors = [];
|
|
21
|
+
const x = m;
|
|
22
|
+
if (!x || typeof x !== 'object')
|
|
23
|
+
return { ok: false, errors: ['manifest must be an object'] };
|
|
24
|
+
if (x.format !== EFFECT_PACK_FORMAT)
|
|
25
|
+
errors.push(`format must be "${EFFECT_PACK_FORMAT}"`);
|
|
26
|
+
if (x.version !== 1)
|
|
27
|
+
errors.push('version must be 1');
|
|
28
|
+
if (!x.name || !PKG.test(x.name))
|
|
29
|
+
errors.push('name must be an npm package name');
|
|
30
|
+
if (!x.packVersion || !SEMVER.test(x.packVersion))
|
|
31
|
+
errors.push('packVersion must be semver (x.y.z)');
|
|
32
|
+
if (!Array.isArray(x.effects) || !x.effects.length)
|
|
33
|
+
errors.push('effects must be a non-empty array');
|
|
34
|
+
const seen = new Set();
|
|
35
|
+
for (const e of x.effects || []) {
|
|
36
|
+
if (!e || !/^[a-z][a-z0-9-]*$/.test(e.name || ''))
|
|
37
|
+
errors.push(`invalid effect name "${e?.name}"`);
|
|
38
|
+
else if (seen.has(e.name))
|
|
39
|
+
errors.push(`duplicate effect "${e.name}"`);
|
|
40
|
+
else
|
|
41
|
+
seen.add(e.name);
|
|
42
|
+
if (!e || !EFFECT_KINDS.includes(e.kind))
|
|
43
|
+
errors.push(`effect "${e?.name}": unknown kind "${e?.kind}"`);
|
|
44
|
+
}
|
|
45
|
+
if (effects) {
|
|
46
|
+
const names = new Set(effects.map((e) => e.name));
|
|
47
|
+
for (const n of seen)
|
|
48
|
+
if (!names.has(n))
|
|
49
|
+
errors.push(`effect "${n}" is in the manifest but not exported`);
|
|
50
|
+
for (const n of names)
|
|
51
|
+
if (!seen.has(n))
|
|
52
|
+
errors.push(`effect "${n}" is exported but missing from the manifest`);
|
|
53
|
+
}
|
|
54
|
+
return { ok: !errors.length, errors };
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Import an effect pack (a URL / specifier, or an already imported module
|
|
58
|
+
* with `effects` / `default` and `manifest`), validate and register it.
|
|
59
|
+
* Returns the registered effect names.
|
|
60
|
+
*/
|
|
61
|
+
async function loadEffectPack(src, opts = {}) {
|
|
62
|
+
const mod = typeof src === 'string' ? await import(/* @vite-ignore */ src) : src;
|
|
63
|
+
const effects = mod.effects || mod.default || [];
|
|
64
|
+
const manifest = opts.manifest || mod.manifest;
|
|
65
|
+
const v = validateManifest(manifest, effects);
|
|
66
|
+
if (!v.ok)
|
|
67
|
+
throw new Error(`[motionary] invalid effect pack: ${v.errors.join('; ')}`);
|
|
68
|
+
const clash = effects.filter((e) => hasEffect(e.name));
|
|
69
|
+
if (clash.length && !opts.override)
|
|
70
|
+
throw new Error(`[motionary] effect pack "${manifest.name}" would replace ${clash.map((e) => e.name).join(', ')} (pass { override: true })`);
|
|
71
|
+
for (const e of effects)
|
|
72
|
+
registerEffect(e, { override: !!opts.override });
|
|
73
|
+
return effects.map((e) => e.name);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export { EFFECT_PACK_FORMAT, loadEffectPack, packManifest, validateManifest };
|
|
77
|
+
//# sourceMappingURL=marketplace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marketplace.js","sources":["../../src/components/fx2/manifest.ts"],"sourcesContent":["/**\n * 6.9 — effect marketplace manifest (`motionary/components/marketplace`).\n *\n * A third-party effect pack is an ES module that exports its effects (an\n * `EffectDefinition[]` as `effects` or `default`) plus a JSON manifest:\n *\n * ```json\n * { \"format\": \"motionary/effect-pack\", \"version\": 1,\n * \"name\": \"@acme/motion-snow\", \"packVersion\": \"1.2.0\",\n * \"description\": \"Snow and frost effects\", \"license\": \"MIT\",\n * \"author\": \"Acme\", \"entry\": \"./dist/index.js\", \"requires\": \">=6.9\",\n * \"effects\": [{ \"name\": \"frost\", \"kind\": \"background\", \"description\": \"…\",\n * \"defaults\": { \"speed\": 1 } }] }\n * ```\n *\n * `packManifest()` writes one from your effects, `validateManifest()` checks\n * one (format, semver, unique kebab-case names, known kinds, effects match\n * the module), and `loadEffectPack()` imports a pack (URL or module),\n * validates it and registers its effects — refusing names that already\n * exist unless `override`.\n */\nimport type { EffectDefinition } from '../fx/registry';\nimport { EFFECT_KINDS, registerEffect, hasEffect } from '../fx/registry';\n\nexport const EFFECT_PACK_FORMAT = 'motionary/effect-pack';\n\nexport interface EffectPackManifest {\n format: typeof EFFECT_PACK_FORMAT;\n version: 1;\n name: string;\n packVersion: string;\n description?: string;\n license?: string;\n author?: string;\n homepage?: string;\n entry?: string;\n requires?: string;\n keywords?: string[];\n effects: { name: string; kind: string; description?: string; defaults?: Record<string, unknown> }[];\n}\n\nconst SEMVER = /^\\d+\\.\\d+\\.\\d+(?:-[\\w.]+)?$/;\nconst PKG = /^(?:@[a-z0-9-~][a-z0-9-._~]*\\/)?[a-z0-9-~][a-z0-9-._~]*$/;\n\n/** Build a manifest from an effect pack. */\nexport function packManifest(name: string, packVersion: string, effects: EffectDefinition[], extra: Partial<Omit<EffectPackManifest, 'format' | 'version' | 'name' | 'packVersion' | 'effects'>> = {}): EffectPackManifest {\n return {\n format: EFFECT_PACK_FORMAT,\n version: 1,\n name,\n packVersion,\n ...extra,\n effects: effects.map((e) => ({ name: e.name, kind: e.kind, ...(e.description ? { description: e.description } : {}), ...(e.defaults ? { defaults: JSON.parse(JSON.stringify(e.defaults)) } : {}) })),\n };\n}\n\n/** Check a manifest (and optionally the module's effects against it). */\nexport function validateManifest(m: unknown, effects?: EffectDefinition[]): { ok: boolean; errors: string[] } {\n const errors: string[] = [];\n const x = m as Partial<EffectPackManifest> | null;\n if (!x || typeof x !== 'object') return { ok: false, errors: ['manifest must be an object'] };\n if (x.format !== EFFECT_PACK_FORMAT) errors.push(`format must be \"${EFFECT_PACK_FORMAT}\"`);\n if (x.version !== 1) errors.push('version must be 1');\n if (!x.name || !PKG.test(x.name)) errors.push('name must be an npm package name');\n if (!x.packVersion || !SEMVER.test(x.packVersion)) errors.push('packVersion must be semver (x.y.z)');\n if (!Array.isArray(x.effects) || !x.effects.length) errors.push('effects must be a non-empty array');\n const seen = new Set<string>();\n for (const e of x.effects || []) {\n if (!e || !/^[a-z][a-z0-9-]*$/.test(e.name || '')) errors.push(`invalid effect name \"${e?.name}\"`);\n else if (seen.has(e.name)) errors.push(`duplicate effect \"${e.name}\"`);\n else seen.add(e.name);\n if (!e || !(EFFECT_KINDS as readonly string[]).includes(e.kind)) errors.push(`effect \"${e?.name}\": unknown kind \"${e?.kind}\"`);\n }\n if (effects) {\n const names = new Set(effects.map((e) => e.name));\n for (const n of seen) if (!names.has(n)) errors.push(`effect \"${n}\" is in the manifest but not exported`);\n for (const n of names) if (!seen.has(n)) errors.push(`effect \"${n}\" is exported but missing from the manifest`);\n }\n return { ok: !errors.length, errors };\n}\n\n/**\n * Import an effect pack (a URL / specifier, or an already imported module\n * with `effects` / `default` and `manifest`), validate and register it.\n * Returns the registered effect names.\n */\nexport async function loadEffectPack(src: string | { effects?: EffectDefinition[]; default?: EffectDefinition[]; manifest?: EffectPackManifest }, opts: { manifest?: EffectPackManifest; override?: boolean } = {}): Promise<string[]> {\n const mod: any = typeof src === 'string' ? await import(/* @vite-ignore */ src) : src;\n const effects: EffectDefinition[] = mod.effects || mod.default || [];\n const manifest = opts.manifest || mod.manifest;\n const v = validateManifest(manifest, effects);\n if (!v.ok) throw new Error(`[motionary] invalid effect pack: ${v.errors.join('; ')}`);\n const clash = effects.filter((e) => hasEffect(e.name));\n if (clash.length && !opts.override) throw new Error(`[motionary] effect pack \"${manifest.name}\" would replace ${clash.map((e) => e.name).join(', ')} (pass { override: true })`);\n for (const e of effects) registerEffect(e, { override: !!opts.override });\n return effects.map((e) => e.name);\n}\n"],"names":[],"mappings":";;;AAwBO,MAAM,kBAAkB,GAAG;AAiBlC,MAAM,MAAM,GAAG,6BAA6B;AAC5C,MAAM,GAAG,GAAG,0DAA0D;AAEtE;AACM,SAAU,YAAY,CAAC,IAAY,EAAE,WAAmB,EAAE,OAA2B,EAAE,KAAA,GAAsG,EAAE,EAAA;IACnM,OAAO;AACL,QAAA,MAAM,EAAE,kBAAkB;AAC1B,QAAA,OAAO,EAAE,CAAC;QACV,IAAI;QACJ,WAAW;AACX,QAAA,GAAG,KAAK;AACR,QAAA,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,WAA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,IAAI,CAAC;AACnC;;;;"}
|
package/dist/components/packs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as prefersReducedMotion, q as now, m as motionScale, r as raf, z as EASE_OUT, k as clamp, E as EASE_SPRING, y as defineElement } from '../chunks/base-
|
|
1
|
+
import { p as prefersReducedMotion, q as now, m as motionScale, r as raf, z as EASE_OUT, k as clamp, E as EASE_SPRING, y as defineElement } from '../chunks/base-D5MHqeDd.js';
|
|
2
2
|
|
|
3
3
|
const anim = (el, frames, o) => {
|
|
4
4
|
if (typeof el.animate !== 'function')
|
package/dist/components/page.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { y as defineElement, l as caf, r as raf, p as prefersReducedMotion, q as now, i as getMotionSensitivity, h as getMotionIntensity, g as configureComponents,
|
|
2
|
-
export { M as MOTION_SCALE } from '../chunks/base-
|
|
3
|
-
import { e as springSamples } from '../chunks/spring-
|
|
1
|
+
import { y as defineElement, l as caf, r as raf, p as prefersReducedMotion, q as now, i as getMotionSensitivity, h as getMotionIntensity, g as configureComponents, x as adoptStyles } from '../chunks/base-D5MHqeDd.js';
|
|
2
|
+
export { M as MOTION_SCALE } from '../chunks/base-D5MHqeDd.js';
|
|
3
|
+
import { e as springSamples } from '../chunks/spring-B-9MZOrW.js';
|
|
4
4
|
|
|
5
5
|
var css$8 = "usa-cursor{--usa-cursor-color:var(--usa-accent,#7c5cff);--usa-cursor-size:28px;position:fixed;inset:0;pointer-events:none;z-index:2147483600;opacity:0;transition:opacity 0.2s ease;contain:strict}usa-cursor[data-active]{opacity:1}usa-cursor .usa-cursor-ring{position:absolute;left:0;top:0;width:var(--usa-cursor-size);height:var(--usa-cursor-size);margin:calc(var(--usa-cursor-size) / -2) 0 0 calc(var(--usa-cursor-size) / -2);border:1.5px solid var(--usa-cursor-color);border-radius:999px;box-sizing:border-box;transition:width 0.25s cubic-bezier(0.34,1.56,0.64,1),height 0.25s cubic-bezier(0.34,1.56,0.64,1),margin 0.25s ease,border-radius 0.25s ease,background-color 0.2s ease;will-change:transform}usa-cursor[data-hover] .usa-cursor-ring:first-child{width:calc(var(--usa-cursor-size) * 1.6);height:calc(var(--usa-cursor-size) * 1.6);margin:calc(var(--usa-cursor-size) * -0.8) 0 0 calc(var(--usa-cursor-size) * -0.8);background:color-mix(in srgb,var(--usa-cursor-color) 15%,transparent)}usa-cursor[data-snapped] .usa-cursor-ring{border-radius:12px;background:color-mix(in srgb,var(--usa-cursor-color) 12%,transparent);translate:-50% -50%;margin:0}usa-cursor[data-down] .usa-cursor-ring:first-child{scale:0.8}usa-cursor .usa-cursor-dot{position:absolute;left:-3px;top:-3px;width:6px;height:6px;border-radius:50%;background:var(--usa-cursor-color)}usa-cursor[data-snapped] .usa-cursor-dot{opacity:0}usa-cursor .usa-cursor-glow{position:absolute;left:-200px;top:-200px;width:400px;height:400px;border-radius:50%;background:radial-gradient(circle,color-mix(in srgb,var(--usa-cursor-color) 35%,transparent),transparent 65%);mix-blend-mode:screen}.usa-cursor-none,.usa-cursor-none *{cursor:none !important}@media (pointer:coarse),(prefers-reduced-motion:reduce){usa-cursor{display:none}.usa-cursor-none,.usa-cursor-none *{cursor:auto !important}}";
|
|
6
6
|
|
package/dist/components/perf.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as onFrame, t as setStyleLoader, f as animationBudget, h as getMotionIntensity, g as configureComponents, j as setAnimationBudget, b as activeAnimations } from '../chunks/base-
|
|
2
|
-
export { s as schedulerStats } from '../chunks/base-
|
|
1
|
+
import { o as onFrame, t as setStyleLoader, f as animationBudget, h as getMotionIntensity, g as configureComponents, j as setAnimationBudget, b as activeAnimations } from '../chunks/base-D5MHqeDd.js';
|
|
2
|
+
export { s as schedulerStats } from '../chunks/base-D5MHqeDd.js';
|
|
3
3
|
import { C as COMPONENT_CATEGORIES } from '../chunks/index-tags-DucKMQr_.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { y as defineElement, k as clamp } from '../chunks/base-
|
|
2
|
-
import { d as springEasing, c as createSpring, s as snapTo, a as rubberBand, p as projectInertia } from '../chunks/spring-
|
|
3
|
-
export { S as SPRING_PRESETS, l as linearEasing, r as resolveSpring, b as spring, e as springSamples, f as stepSpring, g as supportsLinearEasing } from '../chunks/spring-
|
|
1
|
+
import { y as defineElement, k as clamp } from '../chunks/base-D5MHqeDd.js';
|
|
2
|
+
import { d as springEasing, c as createSpring, s as snapTo, a as rubberBand, p as projectInertia } from '../chunks/spring-B-9MZOrW.js';
|
|
3
|
+
export { S as SPRING_PRESETS, l as linearEasing, r as resolveSpring, b as spring, e as springSamples, f as stepSpring, g as supportsLinearEasing } from '../chunks/spring-B-9MZOrW.js';
|
|
4
4
|
|
|
5
5
|
var css$2 = "usa-spring{display:inline-block;transform-origin:50% 70%}usa-spring[block]{display:block}usa-spring[effect=\"drop\"]{transform-origin:50% 100%}usa-spring[data-state=\"hidden\"]{opacity:0}usa-spring[trigger=\"click\"],usa-spring[trigger=\"hover\"]{cursor:pointer;-webkit-tap-highlight-color:transparent}";
|
|
6
6
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { y as defineElement, z as EASE_OUT, l as caf, r as raf, k as clamp } from '../chunks/base-
|
|
1
|
+
import { y as defineElement, z as EASE_OUT, l as caf, r as raf, k as clamp } from '../chunks/base-D5MHqeDd.js';
|
|
2
2
|
|
|
3
3
|
/** Entrance effects shared by `<usa-reveal>` and `<usa-stagger>` (transform / opacity / filter only). */
|
|
4
4
|
const REVEAL_EFFECTS = [
|
package/dist/components/solid.js
CHANGED
|
@@ -3,32 +3,32 @@ import { defineComponents } from '../components.js';
|
|
|
3
3
|
import { b as bindUsa } from '../chunks/bind-B_CTL6Qn.js';
|
|
4
4
|
export { u as usaEventName } from '../chunks/bind-B_CTL6Qn.js';
|
|
5
5
|
import './reveal.js';
|
|
6
|
-
import '../chunks/base-
|
|
6
|
+
import '../chunks/base-D5MHqeDd.js';
|
|
7
7
|
import './text.js';
|
|
8
|
-
import '../chunks/core-
|
|
8
|
+
import '../chunks/core-DyJu5r5a.js';
|
|
9
9
|
import './tokens.js';
|
|
10
10
|
import './interaction.js';
|
|
11
11
|
import './feedback.js';
|
|
12
12
|
import './background.js';
|
|
13
|
-
import '../chunks/variants-
|
|
13
|
+
import '../chunks/variants-CoZn3k_5.js';
|
|
14
14
|
import './transitions.js';
|
|
15
15
|
import './physics.js';
|
|
16
|
-
import '../chunks/spring-
|
|
16
|
+
import '../chunks/spring-B-9MZOrW.js';
|
|
17
17
|
import './cards.js';
|
|
18
18
|
import './click.js';
|
|
19
|
-
import '../chunks/fx-
|
|
19
|
+
import '../chunks/fx-DlGRMJ-Z.js';
|
|
20
20
|
import './ui.js';
|
|
21
21
|
import './page.js';
|
|
22
22
|
import './timeline.js';
|
|
23
23
|
import './gesture.js';
|
|
24
|
-
import '../chunks/core-
|
|
24
|
+
import '../chunks/core-ZGo4hOEk.js';
|
|
25
25
|
import './svg.js';
|
|
26
26
|
import './webgl.js';
|
|
27
27
|
import './depth.js';
|
|
28
28
|
import './layout.js';
|
|
29
29
|
import './packs.js';
|
|
30
30
|
import './fx.js';
|
|
31
|
-
import '../chunks/registry-
|
|
31
|
+
import '../chunks/registry-CTLWeg-J.js';
|
|
32
32
|
import './a11y.js';
|
|
33
33
|
import '../chunks/index-tags-DucKMQr_.js';
|
|
34
34
|
import './perf.js';
|
|
@@ -2,32 +2,32 @@ import { defineComponents } from '../components.js';
|
|
|
2
2
|
import { b as bindUsa } from '../chunks/bind-B_CTL6Qn.js';
|
|
3
3
|
export { u as usaEventName } from '../chunks/bind-B_CTL6Qn.js';
|
|
4
4
|
import './reveal.js';
|
|
5
|
-
import '../chunks/base-
|
|
5
|
+
import '../chunks/base-D5MHqeDd.js';
|
|
6
6
|
import './text.js';
|
|
7
|
-
import '../chunks/core-
|
|
7
|
+
import '../chunks/core-DyJu5r5a.js';
|
|
8
8
|
import './tokens.js';
|
|
9
9
|
import './interaction.js';
|
|
10
10
|
import './feedback.js';
|
|
11
11
|
import './background.js';
|
|
12
|
-
import '../chunks/variants-
|
|
12
|
+
import '../chunks/variants-CoZn3k_5.js';
|
|
13
13
|
import './transitions.js';
|
|
14
14
|
import './physics.js';
|
|
15
|
-
import '../chunks/spring-
|
|
15
|
+
import '../chunks/spring-B-9MZOrW.js';
|
|
16
16
|
import './cards.js';
|
|
17
17
|
import './click.js';
|
|
18
|
-
import '../chunks/fx-
|
|
18
|
+
import '../chunks/fx-DlGRMJ-Z.js';
|
|
19
19
|
import './ui.js';
|
|
20
20
|
import './page.js';
|
|
21
21
|
import './timeline.js';
|
|
22
22
|
import './gesture.js';
|
|
23
|
-
import '../chunks/core-
|
|
23
|
+
import '../chunks/core-ZGo4hOEk.js';
|
|
24
24
|
import './svg.js';
|
|
25
25
|
import './webgl.js';
|
|
26
26
|
import './depth.js';
|
|
27
27
|
import './layout.js';
|
|
28
28
|
import './packs.js';
|
|
29
29
|
import './fx.js';
|
|
30
|
-
import '../chunks/registry-
|
|
30
|
+
import '../chunks/registry-CTLWeg-J.js';
|
|
31
31
|
import './a11y.js';
|
|
32
32
|
import '../chunks/index-tags-DucKMQr_.js';
|
|
33
33
|
import './perf.js';
|
package/dist/components/svg.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k as clamp, m as motionScale, l as caf, p as prefersReducedMotion, q as now, r as raf, y as defineElement, z as EASE_OUT } from '../chunks/base-
|
|
1
|
+
import { k as clamp, m as motionScale, l as caf, p as prefersReducedMotion, q as now, r as raf, y as defineElement, z as EASE_OUT } from '../chunks/base-D5MHqeDd.js';
|
|
2
2
|
|
|
3
3
|
const NUM = /-?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi;
|
|
4
4
|
/** `true` when two path strings share the same commands (so their numbers can be interpolated). */
|
package/dist/components/text.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { y as defineElement,
|
|
2
|
-
import { t as timeline } from '../chunks/core-
|
|
1
|
+
import { y as defineElement, v as srText, l as caf, q as now, r as raf, z as EASE_OUT, E as EASE_SPRING, k as clamp } from '../chunks/base-D5MHqeDd.js';
|
|
2
|
+
import { t as timeline } from '../chunks/core-DyJu5r5a.js';
|
|
3
3
|
import './tokens.js';
|
|
4
4
|
|
|
5
5
|
var css$5 = "usa-typewriter{white-space:pre-wrap}usa-typewriter .usa-tw-caret{display:inline-block;width:var(--usa-caret-width,0.08em);height:1.05em;margin-left:0.06em;vertical-align:-0.12em;background:var(--usa-caret-color,currentColor);animation:usa-caret 1.06s steps(1) infinite}usa-typewriter[data-typing] .usa-tw-caret{animation:none}usa-typewriter[data-no-cursor] .usa-tw-caret{display:none}@keyframes usa-caret{50%{opacity:0}}@media (prefers-reduced-motion:reduce){usa-typewriter .usa-tw-caret,usa-shimmer-text{animation:none}}";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { y as defineElement } from '../chunks/base-
|
|
2
|
-
import { t as timeline, T as TIMELINE_PRESETS } from '../chunks/core-
|
|
3
|
-
export { r as resolvePosition, s as supportsNativeScrub } from '../chunks/core-
|
|
1
|
+
import { y as defineElement } from '../chunks/base-D5MHqeDd.js';
|
|
2
|
+
import { t as timeline, T as TIMELINE_PRESETS } from '../chunks/core-DyJu5r5a.js';
|
|
3
|
+
export { r as resolvePosition, s as supportsNativeScrub } from '../chunks/core-DyJu5r5a.js';
|
|
4
4
|
import './tokens.js';
|
|
5
5
|
|
|
6
6
|
var css = "usa-timeline{display:block}usa-timeline[scrub]{position:relative}@media (prefers-reduced-motion:reduce){usa-timeline [data-tl]{opacity:1 !important;transform:none !important;filter:none !important;clip-path:none !important}}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { y as defineElement, A as kindOf, B as shadowStyles, z as EASE_OUT, F as FLUENT_DECELERATE, p as prefersReducedMotion } from '../chunks/base-
|
|
1
|
+
import { y as defineElement, A as kindOf, B as shadowStyles, z as EASE_OUT, F as FLUENT_DECELERATE, p as prefersReducedMotion } from '../chunks/base-D5MHqeDd.js';
|
|
2
2
|
|
|
3
3
|
var shadowCss = ":host{display:contents}dialog{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:transparent;color:inherit;overflow:hidden}dialog:not([open]){display:none}dialog::backdrop{background:transparent}[part=\"backdrop\"]{position:absolute;inset:0;background:var(--usa-dialog-backdrop,rgb(0 0 0 / 0.42))}[part=\"panel\"]{position:absolute;left:50%;top:50%;translate:-50% -50%;box-sizing:border-box;width:min(var(--usa-dialog-width,480px),calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;padding:var(--usa-dialog-padding,24px);border-radius:var(--usa-dialog-radius,12px);background:var(--usa-dialog-bg,Canvas);color:var(--usa-dialog-fg,CanvasText);box-shadow:0 32px 64px -12px rgb(0 0 0 / 0.45),0 0 0 1px rgb(127 127 127 / 0.18)}dialog[data-kind^=\"drawer\"] [part=\"panel\"]{top:0;bottom:0;translate:none;max-height:none;height:100%;border-radius:0;width:min(var(--usa-dialog-width,380px),88vw)}dialog[data-kind=\"drawer-start\"] [part=\"panel\"]{left:0}dialog[data-kind=\"drawer-end\"] [part=\"panel\"]{left:auto;right:0}dialog[data-kind=\"drawer-bottom\"] [part=\"panel\"],dialog[data-kind=\"sheet\"] [part=\"panel\"]{top:auto;bottom:0;left:0;right:0;translate:none;width:100%;height:auto;max-height:85vh;border-radius:var(--usa-dialog-radius,16px) var(--usa-dialog-radius,16px) 0 0}dialog[data-kind=\"sheet\"] [part=\"panel\"]{left:50%;translate:-50% 0;width:min(var(--usa-dialog-width,560px),100vw)}";
|
|
4
4
|
|
package/dist/components/ui.cjs
CHANGED
|
@@ -817,6 +817,7 @@ function defineTooltip(tag = 'usa-tooltip') {
|
|
|
817
817
|
return ['text'];
|
|
818
818
|
}
|
|
819
819
|
mount() {
|
|
820
|
+
base.deprecate('usa-tooltip', '<usa-tooltip> is deprecated since 6.9 and removed in 7.0 — use <usa-tip> (motionary/components/widgets; npx usa-codemod-7).');
|
|
820
821
|
const trigger = this.firstElementChild || this;
|
|
821
822
|
const tip = document.createElement('span');
|
|
822
823
|
tip.className = 'usa-tooltip-bubble usa-surface';
|