@vielzeug/necromancer 3.0.0 → 26.10.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/dist/_elements.cjs +1 -1
- package/dist/_elements.cjs.map +1 -1
- package/dist/_elements.js +1 -7
- package/dist/_elements.js.map +1 -1
- package/dist/_handle.cjs +1 -1
- package/dist/_handle.cjs.map +1 -1
- package/dist/_handle.js +1 -54
- package/dist/_handle.js.map +1 -1
- package/dist/animate-each.cjs +1 -1
- package/dist/animate-each.cjs.map +1 -1
- package/dist/animate-each.js +1 -29
- package/dist/animate-each.js.map +1 -1
- package/dist/animate.cjs +1 -1
- package/dist/animate.cjs.map +1 -1
- package/dist/animate.js +1 -13
- package/dist/animate.js.map +1 -1
- package/dist/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.js +1 -9
- package/dist/errors.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -5
- package/dist/layout.cjs +1 -1
- package/dist/layout.cjs.map +1 -1
- package/dist/layout.js +1 -96
- package/dist/layout.js.map +1 -1
- package/dist/motion.cjs +2 -0
- package/dist/motion.cjs.map +1 -0
- package/dist/{_motion.d.ts → motion.d.ts} +1 -1
- package/dist/motion.d.ts.map +1 -0
- package/dist/motion.js +2 -0
- package/dist/motion.js.map +1 -0
- package/dist/necromancer.cjs +1 -1
- package/dist/necromancer.cjs.map +1 -1
- package/dist/necromancer.iife.js +1 -1
- package/dist/necromancer.iife.js.map +1 -1
- package/dist/necromancer.js +1 -1
- package/dist/necromancer.js.map +1 -1
- package/dist/testing.cjs +1 -1
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.js +1 -48
- package/dist/testing.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +6 -6
- package/dist/_motion.cjs +0 -2
- package/dist/_motion.cjs.map +0 -1
- package/dist/_motion.d.ts.map +0 -1
- package/dist/_motion.js +0 -28
- package/dist/_motion.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vielzeug/necromancer",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "26.10.0",
|
|
4
|
+
"description": "Lifecycle-owned Web Animations API primitives with native access, per-handle groups, and additive FLIP",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/helmuthdu/vielzeug",
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@playwright/test": "^1.63.0",
|
|
57
|
-
"@types/node": "^26.
|
|
58
|
-
"jsdom": "^30.
|
|
57
|
+
"@types/node": "^26.6.2",
|
|
58
|
+
"jsdom": "^30.1.1",
|
|
59
59
|
"typescript": "^6.0.3",
|
|
60
|
-
"vite": "^8.
|
|
61
|
-
"vitest": "^5.0.
|
|
60
|
+
"vite": "^8.3.0",
|
|
61
|
+
"vitest": "^5.0.1"
|
|
62
62
|
}
|
|
63
63
|
}
|
package/dist/_motion.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require("./errors.cjs");function t(e){return e===`full`?!1:e===`reduced`||typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches}function n(e={},t=!1){let{motion:n,signal:r,...i}=e;return t?{...i,delay:0,duration:0,endDelay:0,iterations:1}:i}function r(t,n){if(n===0)return t;let r=t.delay??0;if(typeof r!=`number`)throw new e.NecromancerConfigError(`A non-zero stagger requires a numeric delay; received ${typeof r}.`);return{...t,delay:r+n}}exports.resolveAnimationOptions=n,exports.shouldReduceMotion=t,exports.withStaggeredDelay=r;
|
|
2
|
-
//# sourceMappingURL=_motion.cjs.map
|
package/dist/_motion.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_motion.cjs","names":[],"sources":["../src/_motion.ts"],"sourcesContent":["import { NecromancerConfigError } from './errors';\nimport type { AnimateOptions, MotionMode } from './types';\n\n/** Reports whether the requested motion preference reduces visible movement. */\nexport function shouldReduceMotion(mode: MotionMode): boolean {\n if (mode === 'full') return false;\n\n if (mode === 'reduced') return true;\n\n return typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;\n}\n\n/** Converts ownership options to native timing, collapsing reduced motion to an instant transition. */\nexport function resolveAnimationOptions(options: AnimateOptions = {}, reduced = false): KeyframeAnimationOptions {\n const { motion: _motion, signal: _signal, ...nativeOptions } = options;\n\n return reduced ? { ...nativeOptions, delay: 0, duration: 0, endDelay: 0, iterations: 1 } : nativeOptions;\n}\n\n/** Adds an element's stagger offset without changing native nonnumeric delays when no offset is needed. */\nexport function withStaggeredDelay(options: AnimateOptions, offset: number): AnimateOptions {\n if (offset === 0) return options;\n\n const delay = options.delay ?? 0;\n\n if (typeof delay !== 'number') {\n throw new NecromancerConfigError(`A non-zero stagger requires a numeric delay; received ${typeof delay}.`);\n }\n\n return { ...options, delay: delay + offset };\n}\n"],"mappings":"gCAIA,SAAgB,EAAmB,EAA2B,CAK5D,OAJI,IAAS,OAAe,GAExB,IAAS,WAEN,OAAO,YAAe,YAAc,WAAW,kCAAkC,CAAC,CAAC,OAC5F,CAGA,SAAgB,EAAwB,EAA0B,CAAC,EAAG,EAAU,GAAiC,CAC/G,GAAM,CAAE,OAAQ,EAAS,OAAQ,EAAS,GAAG,GAAkB,EAE/D,OAAO,EAAU,CAAE,GAAG,EAAe,MAAO,EAAG,SAAU,EAAG,SAAU,EAAG,WAAY,CAAE,EAAI,CAC7F,CAGA,SAAgB,EAAmB,EAAyB,EAAgC,CAC1F,GAAI,IAAW,EAAG,OAAO,EAEzB,IAAM,EAAQ,EAAQ,OAAS,EAE/B,GAAI,OAAO,GAAU,SACnB,MAAM,IAAI,EAAA,uBAAuB,yDAAyD,OAAO,EAAM,EAAE,EAG3G,MAAO,CAAE,GAAG,EAAS,MAAO,EAAQ,CAAO,CAC7C"}
|
package/dist/_motion.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_motion.d.ts","sourceRoot":"","sources":["../src/_motion.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1D,gFAAgF;AAChF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAM5D;AAED,uGAAuG;AACvG,wBAAgB,uBAAuB,CAAC,OAAO,GAAE,cAAmB,EAAE,OAAO,UAAQ,GAAG,wBAAwB,CAI/G;AAED,2GAA2G;AAC3G,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,CAU1F"}
|
package/dist/_motion.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { NecromancerConfigError as e } from "./errors.js";
|
|
2
|
-
//#region src/_motion.ts
|
|
3
|
-
function t(e) {
|
|
4
|
-
return e === "full" ? !1 : e === "reduced" || typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
5
|
-
}
|
|
6
|
-
function n(e = {}, t = !1) {
|
|
7
|
-
let { motion: n, signal: r, ...i } = e;
|
|
8
|
-
return t ? {
|
|
9
|
-
...i,
|
|
10
|
-
delay: 0,
|
|
11
|
-
duration: 0,
|
|
12
|
-
endDelay: 0,
|
|
13
|
-
iterations: 1
|
|
14
|
-
} : i;
|
|
15
|
-
}
|
|
16
|
-
function r(t, n) {
|
|
17
|
-
if (n === 0) return t;
|
|
18
|
-
let r = t.delay ?? 0;
|
|
19
|
-
if (typeof r != "number") throw new e(`A non-zero stagger requires a numeric delay; received ${typeof r}.`);
|
|
20
|
-
return {
|
|
21
|
-
...t,
|
|
22
|
-
delay: r + n
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
//#endregion
|
|
26
|
-
export { n as resolveAnimationOptions, t as shouldReduceMotion, r as withStaggeredDelay };
|
|
27
|
-
|
|
28
|
-
//# sourceMappingURL=_motion.js.map
|
package/dist/_motion.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_motion.js","names":[],"sources":["../src/_motion.ts"],"sourcesContent":["import { NecromancerConfigError } from './errors';\nimport type { AnimateOptions, MotionMode } from './types';\n\n/** Reports whether the requested motion preference reduces visible movement. */\nexport function shouldReduceMotion(mode: MotionMode): boolean {\n if (mode === 'full') return false;\n\n if (mode === 'reduced') return true;\n\n return typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;\n}\n\n/** Converts ownership options to native timing, collapsing reduced motion to an instant transition. */\nexport function resolveAnimationOptions(options: AnimateOptions = {}, reduced = false): KeyframeAnimationOptions {\n const { motion: _motion, signal: _signal, ...nativeOptions } = options;\n\n return reduced ? { ...nativeOptions, delay: 0, duration: 0, endDelay: 0, iterations: 1 } : nativeOptions;\n}\n\n/** Adds an element's stagger offset without changing native nonnumeric delays when no offset is needed. */\nexport function withStaggeredDelay(options: AnimateOptions, offset: number): AnimateOptions {\n if (offset === 0) return options;\n\n const delay = options.delay ?? 0;\n\n if (typeof delay !== 'number') {\n throw new NecromancerConfigError(`A non-zero stagger requires a numeric delay; received ${typeof delay}.`);\n }\n\n return { ...options, delay: delay + offset };\n}\n"],"mappings":";;AAIA,SAAgB,EAAmB,GAA2B;CAK5D,OAJI,MAAS,SAAe,KAExB,MAAS,aAEN,OAAO,cAAe,cAAc,WAAW,kCAAkC,CAAC,CAAC;AAC5F;AAGA,SAAgB,EAAwB,IAA0B,CAAC,GAAG,IAAU,IAAiC;CAC/G,IAAM,EAAE,QAAQ,GAAS,QAAQ,GAAS,GAAG,MAAkB;CAE/D,OAAO,IAAU;EAAE,GAAG;EAAe,OAAO;EAAG,UAAU;EAAG,UAAU;EAAG,YAAY;CAAE,IAAI;AAC7F;AAGA,SAAgB,EAAmB,GAAyB,GAAgC;CAC1F,IAAI,MAAW,GAAG,OAAO;CAEzB,IAAM,IAAQ,EAAQ,SAAS;CAE/B,IAAI,OAAO,KAAU,UACnB,MAAM,IAAI,EAAuB,yDAAyD,OAAO,EAAM,EAAE;CAG3G,OAAO;EAAE,GAAG;EAAS,OAAO,IAAQ;CAAO;AAC7C"}
|