This commit is contained in:
morgan
2026-03-13 19:23:37 +03:00
parent 8917f1631f
commit cc7403191a
5113 changed files with 168404 additions and 0 deletions

1
node_modules/motion-dom/dist/es/value/index.mjs.map generated vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"subscribe-value.mjs","sources":["../../../src/value/subscribe-value.ts"],"sourcesContent":["import { MotionValue } from \".\"\nimport { cancelFrame, frame } from \"../frameloop\"\n\nexport function subscribeValue<O>(\n inputValues: MotionValue[],\n outputValue: MotionValue<O>,\n getLatest: () => O\n) {\n const update = () => outputValue.set(getLatest())\n const scheduleUpdate = () => frame.preRender(update, false, true)\n\n const subscriptions = inputValues.map((v) => v.on(\"change\", scheduleUpdate))\n\n outputValue.on(\"destroy\", () => {\n subscriptions.forEach((unsubscribe) => unsubscribe())\n cancelFrame(update)\n })\n}\n"],"names":[],"mappings":";;SAGgB,cAAc,CAC1B,WAA0B,EAC1B,WAA2B,EAC3B,SAAkB,EAAA;AAElB,IAAA,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;AACjD,IAAA,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC;IAEjE,MAAM,aAAa,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;AAE5E,IAAA,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,MAAK;QAC3B,aAAa,CAAC,OAAO,CAAC,CAAC,WAAW,KAAK,WAAW,EAAE,CAAC;QACrD,WAAW,CAAC,MAAM,CAAC;AACvB,IAAA,CAAC,CAAC;AACN;;;;"}

View File

@@ -0,0 +1,43 @@
// Adapted from https://gist.github.com/mjackson/5311256
function hueToRgb(p, q, t) {
if (t < 0)
t += 1;
if (t > 1)
t -= 1;
if (t < 1 / 6)
return p + (q - p) * 6 * t;
if (t < 1 / 2)
return q;
if (t < 2 / 3)
return p + (q - p) * (2 / 3 - t) * 6;
return p;
}
function hslaToRgba({ hue, saturation, lightness, alpha }) {
hue /= 360;
saturation /= 100;
lightness /= 100;
let red = 0;
let green = 0;
let blue = 0;
if (!saturation) {
red = green = blue = lightness;
}
else {
const q = lightness < 0.5
? lightness * (1 + saturation)
: lightness + saturation - lightness * saturation;
const p = 2 * lightness - q;
red = hueToRgb(p, q, hue + 1 / 3);
green = hueToRgb(p, q, hue);
blue = hueToRgb(p, q, hue - 1 / 3);
}
return {
red: Math.round(red * 255),
green: Math.round(green * 255),
blue: Math.round(blue * 255),
alpha,
};
}
export { hslaToRgba };
//# sourceMappingURL=hsla-to-rgba.mjs.map

View File

@@ -0,0 +1,4 @@
const colorRegex = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
export { colorRegex };
//# sourceMappingURL=color-regex.mjs.map