@plastic-js/tsumiki 0.1.21 → 0.1.23
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/components/DatePickerMobile/index.js +3 -1
- package/dist/components/DatePickerMobile/index.js.map +1 -1
- package/dist/components/DatePickerMobile/wheel.js +28 -14
- package/dist/components/DatePickerMobile/wheel.js.map +1 -1
- package/dist/node_modules/framesync/dist/es/create-render-step.js +54 -0
- package/dist/node_modules/framesync/dist/es/create-render-step.js.map +1 -0
- package/dist/node_modules/framesync/dist/es/index.js +61 -0
- package/dist/node_modules/framesync/dist/es/index.js.map +1 -0
- package/dist/node_modules/framesync/dist/es/on-next-frame.js +8 -0
- package/dist/node_modules/framesync/dist/es/on-next-frame.js.map +1 -0
- package/dist/node_modules/hey-listen/dist/hey-listen.es.js +15 -0
- package/dist/node_modules/hey-listen/dist/hey-listen.es.js.map +1 -0
- package/dist/node_modules/popmotion/dist/es/animations/generators/decay.js +24 -0
- package/dist/node_modules/popmotion/dist/es/animations/generators/decay.js.map +1 -0
- package/dist/node_modules/popmotion/dist/es/animations/generators/keyframes.js +40 -0
- package/dist/node_modules/popmotion/dist/es/animations/generators/keyframes.js.map +1 -0
- package/dist/node_modules/popmotion/dist/es/animations/generators/spring.js +96 -0
- package/dist/node_modules/popmotion/dist/es/animations/generators/spring.js.map +1 -0
- package/dist/node_modules/popmotion/dist/es/animations/index.js +94 -0
- package/dist/node_modules/popmotion/dist/es/animations/index.js.map +1 -0
- package/dist/node_modules/popmotion/dist/es/animations/inertia.js +74 -0
- package/dist/node_modules/popmotion/dist/es/animations/inertia.js.map +1 -0
- package/dist/node_modules/popmotion/dist/es/animations/utils/detect-animation-from-options.js +21 -0
- package/dist/node_modules/popmotion/dist/es/animations/utils/detect-animation-from-options.js.map +1 -0
- package/dist/node_modules/popmotion/dist/es/animations/utils/elapsed.js +14 -0
- package/dist/node_modules/popmotion/dist/es/animations/utils/elapsed.js.map +1 -0
- package/dist/node_modules/popmotion/dist/es/animations/utils/find-spring.js +68 -0
- package/dist/node_modules/popmotion/dist/es/animations/utils/find-spring.js.map +1 -0
- package/dist/node_modules/popmotion/dist/es/easing/index.js +28 -0
- package/dist/node_modules/popmotion/dist/es/easing/index.js.map +1 -0
- package/dist/node_modules/popmotion/dist/es/easing/utils.js +13 -0
- package/dist/node_modules/popmotion/dist/es/easing/utils.js.map +1 -0
- package/dist/node_modules/popmotion/dist/es/utils/clamp.js +6 -0
- package/dist/node_modules/popmotion/dist/es/utils/clamp.js.map +1 -0
- package/dist/node_modules/popmotion/dist/es/utils/hsla-to-rgba.js +35 -0
- package/dist/node_modules/popmotion/dist/es/utils/hsla-to-rgba.js.map +1 -0
- package/dist/node_modules/popmotion/dist/es/utils/inc.js +6 -0
- package/dist/node_modules/popmotion/dist/es/utils/inc.js.map +1 -0
- package/dist/node_modules/popmotion/dist/es/utils/interpolate.js +69 -0
- package/dist/node_modules/popmotion/dist/es/utils/interpolate.js.map +1 -0
- package/dist/node_modules/popmotion/dist/es/utils/mix-color.js +45 -0
- package/dist/node_modules/popmotion/dist/es/utils/mix-color.js.map +1 -0
- package/dist/node_modules/popmotion/dist/es/utils/mix-complex.js +61 -0
- package/dist/node_modules/popmotion/dist/es/utils/mix-complex.js.map +1 -0
- package/dist/node_modules/popmotion/dist/es/utils/mix.js +6 -0
- package/dist/node_modules/popmotion/dist/es/utils/mix.js.map +1 -0
- package/dist/node_modules/popmotion/dist/es/utils/pipe.js +7 -0
- package/dist/node_modules/popmotion/dist/es/utils/pipe.js.map +1 -0
- package/dist/node_modules/popmotion/dist/es/utils/progress.js +9 -0
- package/dist/node_modules/popmotion/dist/es/utils/progress.js.map +1 -0
- package/dist/node_modules/popmotion/dist/es/utils/velocity-per-second.js +8 -0
- package/dist/node_modules/popmotion/dist/es/utils/velocity-per-second.js.map +1 -0
- package/dist/node_modules/popmotion/node_modules/tslib/tslib.es6.js +13 -0
- package/dist/node_modules/popmotion/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/node_modules/style-value-types/dist/es/color/hex.js +39 -0
- package/dist/node_modules/style-value-types/dist/es/color/hex.js.map +1 -0
- package/dist/node_modules/style-value-types/dist/es/color/hsla.js +16 -0
- package/dist/node_modules/style-value-types/dist/es/color/hsla.js.map +1 -0
- package/dist/node_modules/style-value-types/dist/es/color/index.js +20 -0
- package/dist/node_modules/style-value-types/dist/es/color/index.js.map +1 -0
- package/dist/node_modules/style-value-types/dist/es/color/rgba.js +15 -0
- package/dist/node_modules/style-value-types/dist/es/color/rgba.js.map +1 -0
- package/dist/node_modules/style-value-types/dist/es/color/utils.js +19 -0
- package/dist/node_modules/style-value-types/dist/es/color/utils.js.map +1 -0
- package/dist/node_modules/style-value-types/dist/es/complex/index.js +58 -0
- package/dist/node_modules/style-value-types/dist/es/complex/index.js.map +1 -0
- package/dist/node_modules/style-value-types/dist/es/numbers/index.js +13 -0
- package/dist/node_modules/style-value-types/dist/es/numbers/index.js.map +1 -0
- package/dist/node_modules/style-value-types/dist/es/numbers/units.js +16 -0
- package/dist/node_modules/style-value-types/dist/es/numbers/units.js.map +1 -0
- package/dist/node_modules/style-value-types/dist/es/utils.js +13 -0
- package/dist/node_modules/style-value-types/dist/es/utils.js.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interpolate.js","names":[],"sources":["../../../../../../node_modules/popmotion/dist/es/utils/interpolate.mjs"],"sourcesContent":["import { progress } from './progress.mjs';\nimport { mix } from './mix.mjs';\nimport { mixColor } from './mix-color.mjs';\nimport { mixComplex, mixArray, mixObject } from './mix-complex.mjs';\nimport { color } from 'style-value-types';\nimport { clamp } from './clamp.mjs';\nimport { pipe } from './pipe.mjs';\nimport { invariant } from 'hey-listen';\n\nconst mixNumber = (from, to) => (p) => mix(from, to, p);\nfunction detectMixerFactory(v) {\n if (typeof v === 'number') {\n return mixNumber;\n }\n else if (typeof v === 'string') {\n if (color.test(v)) {\n return mixColor;\n }\n else {\n return mixComplex;\n }\n }\n else if (Array.isArray(v)) {\n return mixArray;\n }\n else if (typeof v === 'object') {\n return mixObject;\n }\n}\nfunction createMixers(output, ease, customMixer) {\n const mixers = [];\n const mixerFactory = customMixer || detectMixerFactory(output[0]);\n const numMixers = output.length - 1;\n for (let i = 0; i < numMixers; i++) {\n let mixer = mixerFactory(output[i], output[i + 1]);\n if (ease) {\n const easingFunction = Array.isArray(ease) ? ease[i] : ease;\n mixer = pipe(easingFunction, mixer);\n }\n mixers.push(mixer);\n }\n return mixers;\n}\nfunction fastInterpolate([from, to], [mixer]) {\n return (v) => mixer(progress(from, to, v));\n}\nfunction slowInterpolate(input, mixers) {\n const inputLength = input.length;\n const lastInputIndex = inputLength - 1;\n return (v) => {\n let mixerIndex = 0;\n let foundMixerIndex = false;\n if (v <= input[0]) {\n foundMixerIndex = true;\n }\n else if (v >= input[lastInputIndex]) {\n mixerIndex = lastInputIndex - 1;\n foundMixerIndex = true;\n }\n if (!foundMixerIndex) {\n let i = 1;\n for (; i < inputLength; i++) {\n if (input[i] > v || i === lastInputIndex) {\n break;\n }\n }\n mixerIndex = i - 1;\n }\n const progressInRange = progress(input[mixerIndex], input[mixerIndex + 1], v);\n return mixers[mixerIndex](progressInRange);\n };\n}\nfunction interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) {\n const inputLength = input.length;\n invariant(inputLength === output.length, 'Both input and output ranges must be the same length');\n invariant(!ease || !Array.isArray(ease) || ease.length === inputLength - 1, 'Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values.');\n if (input[0] > input[inputLength - 1]) {\n input = [].concat(input);\n output = [].concat(output);\n input.reverse();\n output.reverse();\n }\n const mixers = createMixers(output, ease, mixer);\n const interpolator = inputLength === 2\n ? fastInterpolate(input, mixers)\n : slowInterpolate(input, mixers);\n return isClamp\n ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v))\n : interpolator;\n}\n\nexport { interpolate };\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;AASA,IAAM,aAAa,MAAM,QAAQ,MAAM,IAAI,MAAM,IAAI,CAAC;AACtD,SAAS,mBAAmB,GAAG;CAC3B,IAAI,OAAO,MAAM,UACb,OAAO;MAEN,IAAI,OAAO,MAAM,UAClB,IAAI,MAAM,KAAK,CAAC,GACZ,OAAO;MAGP,OAAO;MAGV,IAAI,MAAM,QAAQ,CAAC,GACpB,OAAO;MAEN,IAAI,OAAO,MAAM,UAClB,OAAO;AAEf;AACA,SAAS,aAAa,QAAQ,MAAM,aAAa;CAC7C,MAAM,SAAS,CAAC;CAChB,MAAM,eAAe,eAAe,mBAAmB,OAAO,EAAE;CAChE,MAAM,YAAY,OAAO,SAAS;CAClC,KAAK,IAAI,IAAI,GAAG,IAAI,WAAW,KAAK;EAChC,IAAI,QAAQ,aAAa,OAAO,IAAI,OAAO,IAAI,EAAE;EACjD,IAAI,MAEA,QAAQ,KADe,MAAM,QAAQ,IAAI,IAAI,KAAK,KAAK,MAC1B,KAAK;EAEtC,OAAO,KAAK,KAAK;CACrB;CACA,OAAO;AACX;AACA,SAAS,gBAAgB,CAAC,MAAM,KAAK,CAAC,QAAQ;CAC1C,QAAQ,MAAM,MAAM,SAAS,MAAM,IAAI,CAAC,CAAC;AAC7C;AACA,SAAS,gBAAgB,OAAO,QAAQ;CACpC,MAAM,cAAc,MAAM;CAC1B,MAAM,iBAAiB,cAAc;CACrC,QAAQ,MAAM;EACV,IAAI,aAAa;EACjB,IAAI,kBAAkB;EACtB,IAAI,KAAK,MAAM,IACX,kBAAkB;OAEjB,IAAI,KAAK,MAAM,iBAAiB;GACjC,aAAa,iBAAiB;GAC9B,kBAAkB;EACtB;EACA,IAAI,CAAC,iBAAiB;GAClB,IAAI,IAAI;GACR,OAAO,IAAI,aAAa,KACpB,IAAI,MAAM,KAAK,KAAK,MAAM,gBACtB;GAGR,aAAa,IAAI;EACrB;EACA,MAAM,kBAAkB,SAAS,MAAM,aAAa,MAAM,aAAa,IAAI,CAAC;EAC5E,OAAO,OAAO,YAAY,eAAe;CAC7C;AACJ;AACA,SAAS,YAAY,OAAO,QAAQ,EAAE,OAAO,UAAU,MAAM,MAAM,UAAU,CAAC,GAAG;CAC7E,MAAM,cAAc,MAAM;CAC1B,UAAU,gBAAgB,OAAO,QAAQ,sDAAsD;CAC/F,UAAU,CAAC,QAAQ,CAAC,MAAM,QAAQ,IAAI,KAAK,KAAK,WAAW,cAAc,GAAG,kIAAkI;CAC9M,IAAI,MAAM,KAAK,MAAM,cAAc,IAAI;EACnC,QAAQ,CAAC,EAAE,OAAO,KAAK;EACvB,SAAS,CAAC,EAAE,OAAO,MAAM;EACzB,MAAM,QAAQ;EACd,OAAO,QAAQ;CACnB;CACA,MAAM,SAAS,aAAa,QAAQ,MAAM,KAAK;CAC/C,MAAM,eAAe,gBAAgB,IAC/B,gBAAgB,OAAO,MAAM,IAC7B,gBAAgB,OAAO,MAAM;CACnC,OAAO,WACA,MAAM,aAAa,MAAM,MAAM,IAAI,MAAM,cAAc,IAAI,CAAC,CAAC,IAC9D;AACV"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { invariant } from "../../../../hey-listen/dist/hey-listen.es.js";
|
|
2
|
+
import { mix } from "./mix.js";
|
|
3
|
+
import { hsla } from "../../../../style-value-types/dist/es/color/hsla.js";
|
|
4
|
+
import { rgba } from "../../../../style-value-types/dist/es/color/rgba.js";
|
|
5
|
+
import { hex } from "../../../../style-value-types/dist/es/color/hex.js";
|
|
6
|
+
import { hslaToRgba } from "./hsla-to-rgba.js";
|
|
7
|
+
//#region node_modules/popmotion/dist/es/utils/mix-color.mjs
|
|
8
|
+
var mixLinearColor = (from, to, v) => {
|
|
9
|
+
const fromExpo = from * from;
|
|
10
|
+
const toExpo = to * to;
|
|
11
|
+
return Math.sqrt(Math.max(0, v * (toExpo - fromExpo) + fromExpo));
|
|
12
|
+
};
|
|
13
|
+
var colorTypes = [
|
|
14
|
+
hex,
|
|
15
|
+
rgba,
|
|
16
|
+
hsla
|
|
17
|
+
];
|
|
18
|
+
var getColorType = (v) => colorTypes.find((type) => type.test(v));
|
|
19
|
+
var notAnimatable = (color) => `'${color}' is not an animatable color. Use the equivalent color code instead.`;
|
|
20
|
+
var mixColor = (from, to) => {
|
|
21
|
+
let fromColorType = getColorType(from);
|
|
22
|
+
let toColorType = getColorType(to);
|
|
23
|
+
invariant(!!fromColorType, notAnimatable(from));
|
|
24
|
+
invariant(!!toColorType, notAnimatable(to));
|
|
25
|
+
let fromColor = fromColorType.parse(from);
|
|
26
|
+
let toColor = toColorType.parse(to);
|
|
27
|
+
if (fromColorType === hsla) {
|
|
28
|
+
fromColor = hslaToRgba(fromColor);
|
|
29
|
+
fromColorType = rgba;
|
|
30
|
+
}
|
|
31
|
+
if (toColorType === hsla) {
|
|
32
|
+
toColor = hslaToRgba(toColor);
|
|
33
|
+
toColorType = rgba;
|
|
34
|
+
}
|
|
35
|
+
const blended = Object.assign({}, fromColor);
|
|
36
|
+
return (v) => {
|
|
37
|
+
for (const key in blended) if (key !== "alpha") blended[key] = mixLinearColor(fromColor[key], toColor[key], v);
|
|
38
|
+
blended.alpha = mix(fromColor.alpha, toColor.alpha, v);
|
|
39
|
+
return fromColorType.transform(blended);
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
//#endregion
|
|
43
|
+
export { mixColor };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=mix-color.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mix-color.js","names":[],"sources":["../../../../../../node_modules/popmotion/dist/es/utils/mix-color.mjs"],"sourcesContent":["import { mix } from './mix.mjs';\nimport { hsla, rgba, hex } from 'style-value-types';\nimport { invariant } from 'hey-listen';\nimport { hslaToRgba } from './hsla-to-rgba.mjs';\n\nconst mixLinearColor = (from, to, v) => {\n const fromExpo = from * from;\n const toExpo = to * to;\n return Math.sqrt(Math.max(0, v * (toExpo - fromExpo) + fromExpo));\n};\nconst colorTypes = [hex, rgba, hsla];\nconst getColorType = (v) => colorTypes.find((type) => type.test(v));\nconst notAnimatable = (color) => `'${color}' is not an animatable color. Use the equivalent color code instead.`;\nconst mixColor = (from, to) => {\n let fromColorType = getColorType(from);\n let toColorType = getColorType(to);\n invariant(!!fromColorType, notAnimatable(from));\n invariant(!!toColorType, notAnimatable(to));\n let fromColor = fromColorType.parse(from);\n let toColor = toColorType.parse(to);\n if (fromColorType === hsla) {\n fromColor = hslaToRgba(fromColor);\n fromColorType = rgba;\n }\n if (toColorType === hsla) {\n toColor = hslaToRgba(toColor);\n toColorType = rgba;\n }\n const blended = Object.assign({}, fromColor);\n return (v) => {\n for (const key in blended) {\n if (key !== \"alpha\") {\n blended[key] = mixLinearColor(fromColor[key], toColor[key], v);\n }\n }\n blended.alpha = mix(fromColor.alpha, toColor.alpha, v);\n return fromColorType.transform(blended);\n };\n};\n\nexport { mixColor, mixLinearColor };\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;AAKA,IAAM,kBAAkB,MAAM,IAAI,MAAM;CACpC,MAAM,WAAW,OAAO;CACxB,MAAM,SAAS,KAAK;CACpB,OAAO,KAAK,KAAK,KAAK,IAAI,GAAG,KAAK,SAAS,YAAY,QAAQ,CAAC;AACpE;AACA,IAAM,aAAa;CAAC;CAAK;CAAM;AAAI;AACnC,IAAM,gBAAgB,MAAM,WAAW,MAAM,SAAS,KAAK,KAAK,CAAC,CAAC;AAClE,IAAM,iBAAiB,UAAU,IAAI,MAAM;AAC3C,IAAM,YAAY,MAAM,OAAO;CAC3B,IAAI,gBAAgB,aAAa,IAAI;CACrC,IAAI,cAAc,aAAa,EAAE;CACjC,UAAU,CAAC,CAAC,eAAe,cAAc,IAAI,CAAC;CAC9C,UAAU,CAAC,CAAC,aAAa,cAAc,EAAE,CAAC;CAC1C,IAAI,YAAY,cAAc,MAAM,IAAI;CACxC,IAAI,UAAU,YAAY,MAAM,EAAE;CAClC,IAAI,kBAAkB,MAAM;EACxB,YAAY,WAAW,SAAS;EAChC,gBAAgB;CACpB;CACA,IAAI,gBAAgB,MAAM;EACtB,UAAU,WAAW,OAAO;EAC5B,cAAc;CAClB;CACA,MAAM,UAAU,OAAO,OAAO,CAAC,GAAG,SAAS;CAC3C,QAAQ,MAAM;EACV,KAAK,MAAM,OAAO,SACd,IAAI,QAAQ,SACR,QAAQ,OAAO,eAAe,UAAU,MAAM,QAAQ,MAAM,CAAC;EAGrE,QAAQ,QAAQ,IAAI,UAAU,OAAO,QAAQ,OAAO,CAAC;EACrD,OAAO,cAAc,UAAU,OAAO;CAC1C;AACJ"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { warning } from "../../../../hey-listen/dist/hey-listen.es.js";
|
|
2
|
+
import { mix } from "./mix.js";
|
|
3
|
+
import { color } from "../../../../style-value-types/dist/es/color/index.js";
|
|
4
|
+
import { complex } from "../../../../style-value-types/dist/es/complex/index.js";
|
|
5
|
+
import { mixColor } from "./mix-color.js";
|
|
6
|
+
import { isNum } from "./inc.js";
|
|
7
|
+
import { pipe } from "./pipe.js";
|
|
8
|
+
//#region node_modules/popmotion/dist/es/utils/mix-complex.mjs
|
|
9
|
+
function getMixer(origin, target) {
|
|
10
|
+
if (isNum(origin)) return (v) => mix(origin, target, v);
|
|
11
|
+
else if (color.test(origin)) return mixColor(origin, target);
|
|
12
|
+
else return mixComplex(origin, target);
|
|
13
|
+
}
|
|
14
|
+
var mixArray = (from, to) => {
|
|
15
|
+
const output = [...from];
|
|
16
|
+
const numValues = output.length;
|
|
17
|
+
const blendValue = from.map((fromThis, i) => getMixer(fromThis, to[i]));
|
|
18
|
+
return (v) => {
|
|
19
|
+
for (let i = 0; i < numValues; i++) output[i] = blendValue[i](v);
|
|
20
|
+
return output;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
var mixObject = (origin, target) => {
|
|
24
|
+
const output = Object.assign(Object.assign({}, origin), target);
|
|
25
|
+
const blendValue = {};
|
|
26
|
+
for (const key in output) if (origin[key] !== void 0 && target[key] !== void 0) blendValue[key] = getMixer(origin[key], target[key]);
|
|
27
|
+
return (v) => {
|
|
28
|
+
for (const key in blendValue) output[key] = blendValue[key](v);
|
|
29
|
+
return output;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
function analyse(value) {
|
|
33
|
+
const parsed = complex.parse(value);
|
|
34
|
+
const numValues = parsed.length;
|
|
35
|
+
let numNumbers = 0;
|
|
36
|
+
let numRGB = 0;
|
|
37
|
+
let numHSL = 0;
|
|
38
|
+
for (let i = 0; i < numValues; i++) if (numNumbers || typeof parsed[i] === "number") numNumbers++;
|
|
39
|
+
else if (parsed[i].hue !== void 0) numHSL++;
|
|
40
|
+
else numRGB++;
|
|
41
|
+
return {
|
|
42
|
+
parsed,
|
|
43
|
+
numNumbers,
|
|
44
|
+
numRGB,
|
|
45
|
+
numHSL
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
var mixComplex = (origin, target) => {
|
|
49
|
+
const template = complex.createTransformer(target);
|
|
50
|
+
const originStats = analyse(origin);
|
|
51
|
+
const targetStats = analyse(target);
|
|
52
|
+
if (originStats.numHSL === targetStats.numHSL && originStats.numRGB === targetStats.numRGB && originStats.numNumbers >= targetStats.numNumbers) return pipe(mixArray(originStats.parsed, targetStats.parsed), template);
|
|
53
|
+
else {
|
|
54
|
+
warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`);
|
|
55
|
+
return (p) => `${p > 0 ? target : origin}`;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
//#endregion
|
|
59
|
+
export { mixArray, mixComplex, mixObject };
|
|
60
|
+
|
|
61
|
+
//# sourceMappingURL=mix-complex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mix-complex.js","names":[],"sources":["../../../../../../node_modules/popmotion/dist/es/utils/mix-complex.mjs"],"sourcesContent":["import { complex, color } from 'style-value-types';\nimport { mix } from './mix.mjs';\nimport { mixColor } from './mix-color.mjs';\nimport { isNum } from './inc.mjs';\nimport { pipe } from './pipe.mjs';\nimport { warning } from 'hey-listen';\n\nfunction getMixer(origin, target) {\n if (isNum(origin)) {\n return (v) => mix(origin, target, v);\n }\n else if (color.test(origin)) {\n return mixColor(origin, target);\n }\n else {\n return mixComplex(origin, target);\n }\n}\nconst mixArray = (from, to) => {\n const output = [...from];\n const numValues = output.length;\n const blendValue = from.map((fromThis, i) => getMixer(fromThis, to[i]));\n return (v) => {\n for (let i = 0; i < numValues; i++) {\n output[i] = blendValue[i](v);\n }\n return output;\n };\n};\nconst mixObject = (origin, target) => {\n const output = Object.assign(Object.assign({}, origin), target);\n const blendValue = {};\n for (const key in output) {\n if (origin[key] !== undefined && target[key] !== undefined) {\n blendValue[key] = getMixer(origin[key], target[key]);\n }\n }\n return (v) => {\n for (const key in blendValue) {\n output[key] = blendValue[key](v);\n }\n return output;\n };\n};\nfunction analyse(value) {\n const parsed = complex.parse(value);\n const numValues = parsed.length;\n let numNumbers = 0;\n let numRGB = 0;\n let numHSL = 0;\n for (let i = 0; i < numValues; i++) {\n if (numNumbers || typeof parsed[i] === \"number\") {\n numNumbers++;\n }\n else {\n if (parsed[i].hue !== undefined) {\n numHSL++;\n }\n else {\n numRGB++;\n }\n }\n }\n return { parsed, numNumbers, numRGB, numHSL };\n}\nconst mixComplex = (origin, target) => {\n const template = complex.createTransformer(target);\n const originStats = analyse(origin);\n const targetStats = analyse(target);\n const canInterpolate = originStats.numHSL === targetStats.numHSL &&\n originStats.numRGB === targetStats.numRGB &&\n originStats.numNumbers >= targetStats.numNumbers;\n if (canInterpolate) {\n return pipe(mixArray(originStats.parsed, targetStats.parsed), template);\n }\n else {\n warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`);\n return (p) => `${p > 0 ? target : origin}`;\n }\n};\n\nexport { mixArray, mixComplex, mixObject };\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AAOA,SAAS,SAAS,QAAQ,QAAQ;CAC9B,IAAI,MAAM,MAAM,GACZ,QAAQ,MAAM,IAAI,QAAQ,QAAQ,CAAC;MAElC,IAAI,MAAM,KAAK,MAAM,GACtB,OAAO,SAAS,QAAQ,MAAM;MAG9B,OAAO,WAAW,QAAQ,MAAM;AAExC;AACA,IAAM,YAAY,MAAM,OAAO;CAC3B,MAAM,SAAS,CAAC,GAAG,IAAI;CACvB,MAAM,YAAY,OAAO;CACzB,MAAM,aAAa,KAAK,KAAK,UAAU,MAAM,SAAS,UAAU,GAAG,EAAE,CAAC;CACtE,QAAQ,MAAM;EACV,KAAK,IAAI,IAAI,GAAG,IAAI,WAAW,KAC3B,OAAO,KAAK,WAAW,GAAG,CAAC;EAE/B,OAAO;CACX;AACJ;AACA,IAAM,aAAa,QAAQ,WAAW;CAClC,MAAM,SAAS,OAAO,OAAO,OAAO,OAAO,CAAC,GAAG,MAAM,GAAG,MAAM;CAC9D,MAAM,aAAa,CAAC;CACpB,KAAK,MAAM,OAAO,QACd,IAAI,OAAO,SAAS,KAAA,KAAa,OAAO,SAAS,KAAA,GAC7C,WAAW,OAAO,SAAS,OAAO,MAAM,OAAO,IAAI;CAG3D,QAAQ,MAAM;EACV,KAAK,MAAM,OAAO,YACd,OAAO,OAAO,WAAW,KAAK,CAAC;EAEnC,OAAO;CACX;AACJ;AACA,SAAS,QAAQ,OAAO;CACpB,MAAM,SAAS,QAAQ,MAAM,KAAK;CAClC,MAAM,YAAY,OAAO;CACzB,IAAI,aAAa;CACjB,IAAI,SAAS;CACb,IAAI,SAAS;CACb,KAAK,IAAI,IAAI,GAAG,IAAI,WAAW,KAC3B,IAAI,cAAc,OAAO,OAAO,OAAO,UACnC;MAGA,IAAI,OAAO,GAAG,QAAQ,KAAA,GAClB;MAGA;CAIZ,OAAO;EAAE;EAAQ;EAAY;EAAQ;CAAO;AAChD;AACA,IAAM,cAAc,QAAQ,WAAW;CACnC,MAAM,WAAW,QAAQ,kBAAkB,MAAM;CACjD,MAAM,cAAc,QAAQ,MAAM;CAClC,MAAM,cAAc,QAAQ,MAAM;CAIlC,IAHuB,YAAY,WAAW,YAAY,UACtD,YAAY,WAAW,YAAY,UACnC,YAAY,cAAc,YAAY,YAEtC,OAAO,KAAK,SAAS,YAAY,QAAQ,YAAY,MAAM,GAAG,QAAQ;MAErE;EACD,QAAQ,MAAM,mBAAmB,OAAO,SAAS,OAAO,yKAAyK;EACjO,QAAQ,MAAM,GAAG,IAAI,IAAI,SAAS;CACtC;AACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mix.js","names":[],"sources":["../../../../../../node_modules/popmotion/dist/es/utils/mix.mjs"],"sourcesContent":["const mix = (from, to, progress) => -progress * from + progress * to + from;\n\nexport { mix };\n"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAM,OAAO,MAAM,IAAI,aAAa,CAAC,WAAW,OAAO,WAAW,KAAK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipe.js","names":[],"sources":["../../../../../../node_modules/popmotion/dist/es/utils/pipe.mjs"],"sourcesContent":["const combineFunctions = (a, b) => (v) => b(a(v));\nconst pipe = (...transformers) => transformers.reduce(combineFunctions);\n\nexport { pipe };\n"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAM,oBAAoB,GAAG,OAAO,MAAM,EAAE,EAAE,CAAC,CAAC;AAChD,IAAM,QAAQ,GAAG,iBAAiB,aAAa,OAAO,gBAAgB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region node_modules/popmotion/dist/es/utils/progress.mjs
|
|
2
|
+
var progress = (from, to, value) => {
|
|
3
|
+
const toFromDifference = to - from;
|
|
4
|
+
return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;
|
|
5
|
+
};
|
|
6
|
+
//#endregion
|
|
7
|
+
export { progress };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.js","names":[],"sources":["../../../../../../node_modules/popmotion/dist/es/utils/progress.mjs"],"sourcesContent":["const progress = (from, to, value) => {\n const toFromDifference = to - from;\n return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;\n};\n\nexport { progress };\n"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAM,YAAY,MAAM,IAAI,UAAU;CAClC,MAAM,mBAAmB,KAAK;CAC9B,OAAO,qBAAqB,IAAI,KAAK,QAAQ,QAAQ;AACzD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region node_modules/popmotion/dist/es/utils/velocity-per-second.mjs
|
|
2
|
+
function velocityPerSecond(velocity, frameDuration) {
|
|
3
|
+
return frameDuration ? velocity * (1e3 / frameDuration) : 0;
|
|
4
|
+
}
|
|
5
|
+
//#endregion
|
|
6
|
+
export { velocityPerSecond };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=velocity-per-second.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"velocity-per-second.js","names":[],"sources":["../../../../../../node_modules/popmotion/dist/es/utils/velocity-per-second.mjs"],"sourcesContent":["function velocityPerSecond(velocity, frameDuration) {\n return frameDuration ? velocity * (1000 / frameDuration) : 0;\n}\n\nexport { velocityPerSecond };\n"],"x_google_ignoreList":[0],"mappings":";AAAA,SAAS,kBAAkB,UAAU,eAAe;CAChD,OAAO,gBAAgB,YAAY,MAAO,iBAAiB;AAC/D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region node_modules/popmotion/node_modules/tslib/tslib.es6.js
|
|
2
|
+
function __rest(s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") {
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { __rest };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=tslib.es6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tslib.es6.js","names":[],"sources":["../../../../../node_modules/popmotion/node_modules/tslib/tslib.es6.js"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n"],"x_google_ignoreList":[0],"mappings":";AA0CA,SAAgB,OAAO,GAAG,GAAG;CACzB,IAAI,IAAI,CAAC;CACT,KAAK,IAAI,KAAK,GAAG,IAAI,OAAO,UAAU,eAAe,KAAK,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,GAC9E,EAAE,KAAK,EAAE;CACb,IAAI,KAAK,QAAQ,OAAO,OAAO,0BAA0B;OAChD,IAAI,IAAI,GAAG,IAAI,OAAO,sBAAsB,CAAC,GAAG,IAAI,EAAE,QAAQ,KAC/D,IAAI,EAAE,QAAQ,EAAE,EAAE,IAAI,KAAK,OAAO,UAAU,qBAAqB,KAAK,GAAG,EAAE,EAAE,GACzE,EAAE,EAAE,MAAM,EAAE,EAAE;CAAA;CAE1B,OAAO;AACX"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { isColorString } from "./utils.js";
|
|
2
|
+
import { rgba } from "./rgba.js";
|
|
3
|
+
//#region node_modules/style-value-types/dist/es/color/hex.mjs
|
|
4
|
+
function parseHex(v) {
|
|
5
|
+
let r = "";
|
|
6
|
+
let g = "";
|
|
7
|
+
let b = "";
|
|
8
|
+
let a = "";
|
|
9
|
+
if (v.length > 5) {
|
|
10
|
+
r = v.substr(1, 2);
|
|
11
|
+
g = v.substr(3, 2);
|
|
12
|
+
b = v.substr(5, 2);
|
|
13
|
+
a = v.substr(7, 2);
|
|
14
|
+
} else {
|
|
15
|
+
r = v.substr(1, 1);
|
|
16
|
+
g = v.substr(2, 1);
|
|
17
|
+
b = v.substr(3, 1);
|
|
18
|
+
a = v.substr(4, 1);
|
|
19
|
+
r += r;
|
|
20
|
+
g += g;
|
|
21
|
+
b += b;
|
|
22
|
+
a += a;
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
red: parseInt(r, 16),
|
|
26
|
+
green: parseInt(g, 16),
|
|
27
|
+
blue: parseInt(b, 16),
|
|
28
|
+
alpha: a ? parseInt(a, 16) / 255 : 1
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
var hex = {
|
|
32
|
+
test: isColorString("#"),
|
|
33
|
+
parse: parseHex,
|
|
34
|
+
transform: rgba.transform
|
|
35
|
+
};
|
|
36
|
+
//#endregion
|
|
37
|
+
export { hex };
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=hex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hex.js","names":[],"sources":["../../../../../../node_modules/style-value-types/dist/es/color/hex.mjs"],"sourcesContent":["import { rgba } from './rgba.mjs';\nimport { isColorString } from './utils.mjs';\n\nfunction parseHex(v) {\n let r = '';\n let g = '';\n let b = '';\n let a = '';\n if (v.length > 5) {\n r = v.substr(1, 2);\n g = v.substr(3, 2);\n b = v.substr(5, 2);\n a = v.substr(7, 2);\n }\n else {\n r = v.substr(1, 1);\n g = v.substr(2, 1);\n b = v.substr(3, 1);\n a = v.substr(4, 1);\n r += r;\n g += g;\n b += b;\n a += a;\n }\n return {\n red: parseInt(r, 16),\n green: parseInt(g, 16),\n blue: parseInt(b, 16),\n alpha: a ? parseInt(a, 16) / 255 : 1,\n };\n}\nconst hex = {\n test: isColorString('#'),\n parse: parseHex,\n transform: rgba.transform,\n};\n\nexport { hex };\n"],"x_google_ignoreList":[0],"mappings":";;;AAGA,SAAS,SAAS,GAAG;CACjB,IAAI,IAAI;CACR,IAAI,IAAI;CACR,IAAI,IAAI;CACR,IAAI,IAAI;CACR,IAAI,EAAE,SAAS,GAAG;EACd,IAAI,EAAE,OAAO,GAAG,CAAC;EACjB,IAAI,EAAE,OAAO,GAAG,CAAC;EACjB,IAAI,EAAE,OAAO,GAAG,CAAC;EACjB,IAAI,EAAE,OAAO,GAAG,CAAC;CACrB,OACK;EACD,IAAI,EAAE,OAAO,GAAG,CAAC;EACjB,IAAI,EAAE,OAAO,GAAG,CAAC;EACjB,IAAI,EAAE,OAAO,GAAG,CAAC;EACjB,IAAI,EAAE,OAAO,GAAG,CAAC;EACjB,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;CACT;CACA,OAAO;EACH,KAAK,SAAS,GAAG,EAAE;EACnB,OAAO,SAAS,GAAG,EAAE;EACrB,MAAM,SAAS,GAAG,EAAE;EACpB,OAAO,IAAI,SAAS,GAAG,EAAE,IAAI,MAAM;CACvC;AACJ;AACA,IAAM,MAAM;CACR,MAAM,cAAc,GAAG;CACvB,OAAO;CACP,WAAW,KAAK;AACpB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { sanitize } from "../utils.js";
|
|
2
|
+
import { alpha } from "../numbers/index.js";
|
|
3
|
+
import { percent } from "../numbers/units.js";
|
|
4
|
+
import { isColorString, splitColor } from "./utils.js";
|
|
5
|
+
//#region node_modules/style-value-types/dist/es/color/hsla.mjs
|
|
6
|
+
var hsla = {
|
|
7
|
+
test: isColorString("hsl", "hue"),
|
|
8
|
+
parse: splitColor("hue", "saturation", "lightness"),
|
|
9
|
+
transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {
|
|
10
|
+
return "hsla(" + Math.round(hue) + ", " + percent.transform(sanitize(saturation)) + ", " + percent.transform(sanitize(lightness)) + ", " + sanitize(alpha.transform(alpha$1)) + ")";
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { hsla };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=hsla.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hsla.js","names":[],"sources":["../../../../../../node_modules/style-value-types/dist/es/color/hsla.mjs"],"sourcesContent":["import { alpha } from '../numbers/index.mjs';\nimport { percent } from '../numbers/units.mjs';\nimport { sanitize } from '../utils.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst hsla = {\n test: isColorString('hsl', 'hue'),\n parse: splitColor('hue', 'saturation', 'lightness'),\n transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {\n return ('hsla(' +\n Math.round(hue) +\n ', ' +\n percent.transform(sanitize(saturation)) +\n ', ' +\n percent.transform(sanitize(lightness)) +\n ', ' +\n sanitize(alpha.transform(alpha$1)) +\n ')');\n },\n};\n\nexport { hsla };\n"],"x_google_ignoreList":[0],"mappings":";;;;;AAKA,IAAM,OAAO;CACT,MAAM,cAAc,OAAO,KAAK;CAChC,OAAO,WAAW,OAAO,cAAc,WAAW;CAClD,YAAY,EAAE,KAAK,YAAY,WAAW,OAAO,UAAU,QAAQ;EAC/D,OAAQ,UACJ,KAAK,MAAM,GAAG,IACd,OACA,QAAQ,UAAU,SAAS,UAAU,CAAC,IACtC,OACA,QAAQ,UAAU,SAAS,SAAS,CAAC,IACrC,OACA,SAAS,MAAM,UAAU,OAAO,CAAC,IACjC;CACR;AACJ"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { isString } from "../utils.js";
|
|
2
|
+
import { hsla } from "./hsla.js";
|
|
3
|
+
import { rgba } from "./rgba.js";
|
|
4
|
+
import { hex } from "./hex.js";
|
|
5
|
+
//#region node_modules/style-value-types/dist/es/color/index.mjs
|
|
6
|
+
var color = {
|
|
7
|
+
test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v),
|
|
8
|
+
parse: (v) => {
|
|
9
|
+
if (rgba.test(v)) return rgba.parse(v);
|
|
10
|
+
else if (hsla.test(v)) return hsla.parse(v);
|
|
11
|
+
else return hex.parse(v);
|
|
12
|
+
},
|
|
13
|
+
transform: (v) => {
|
|
14
|
+
return isString(v) ? v : v.hasOwnProperty("red") ? rgba.transform(v) : hsla.transform(v);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { color };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../../node_modules/style-value-types/dist/es/color/index.mjs"],"sourcesContent":["import { isString } from '../utils.mjs';\nimport { hex } from './hex.mjs';\nimport { hsla } from './hsla.mjs';\nimport { rgba } from './rgba.mjs';\n\nconst color = {\n test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v),\n parse: (v) => {\n if (rgba.test(v)) {\n return rgba.parse(v);\n }\n else if (hsla.test(v)) {\n return hsla.parse(v);\n }\n else {\n return hex.parse(v);\n }\n },\n transform: (v) => {\n return isString(v)\n ? v\n : v.hasOwnProperty('red')\n ? rgba.transform(v)\n : hsla.transform(v);\n },\n};\n\nexport { color };\n"],"x_google_ignoreList":[0],"mappings":";;;;;AAKA,IAAM,QAAQ;CACV,OAAO,MAAM,KAAK,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC;CACvD,QAAQ,MAAM;EACV,IAAI,KAAK,KAAK,CAAC,GACX,OAAO,KAAK,MAAM,CAAC;OAElB,IAAI,KAAK,KAAK,CAAC,GAChB,OAAO,KAAK,MAAM,CAAC;OAGnB,OAAO,IAAI,MAAM,CAAC;CAE1B;CACA,YAAY,MAAM;EACd,OAAO,SAAS,CAAC,IACX,IACA,EAAE,eAAe,KAAK,IAClB,KAAK,UAAU,CAAC,IAChB,KAAK,UAAU,CAAC;CAC9B;AACJ"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { clamp, sanitize } from "../utils.js";
|
|
2
|
+
import { alpha, number } from "../numbers/index.js";
|
|
3
|
+
import { isColorString, splitColor } from "./utils.js";
|
|
4
|
+
//#region node_modules/style-value-types/dist/es/color/rgba.mjs
|
|
5
|
+
var clampRgbUnit = clamp(0, 255);
|
|
6
|
+
var rgbUnit = Object.assign(Object.assign({}, number), { transform: (v) => Math.round(clampRgbUnit(v)) });
|
|
7
|
+
var rgba = {
|
|
8
|
+
test: isColorString("rgb", "red"),
|
|
9
|
+
parse: splitColor("red", "green", "blue"),
|
|
10
|
+
transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => "rgba(" + rgbUnit.transform(red) + ", " + rgbUnit.transform(green) + ", " + rgbUnit.transform(blue) + ", " + sanitize(alpha.transform(alpha$1)) + ")"
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { rgba };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=rgba.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rgba.js","names":[],"sources":["../../../../../../node_modules/style-value-types/dist/es/color/rgba.mjs"],"sourcesContent":["import { number, alpha } from '../numbers/index.mjs';\nimport { sanitize, clamp } from '../utils.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst clampRgbUnit = clamp(0, 255);\nconst rgbUnit = Object.assign(Object.assign({}, number), { transform: (v) => Math.round(clampRgbUnit(v)) });\nconst rgba = {\n test: isColorString('rgb', 'red'),\n parse: splitColor('red', 'green', 'blue'),\n transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => 'rgba(' +\n rgbUnit.transform(red) +\n ', ' +\n rgbUnit.transform(green) +\n ', ' +\n rgbUnit.transform(blue) +\n ', ' +\n sanitize(alpha.transform(alpha$1)) +\n ')',\n};\n\nexport { rgbUnit, rgba };\n"],"x_google_ignoreList":[0],"mappings":";;;;AAIA,IAAM,eAAe,MAAM,GAAG,GAAG;AACjC,IAAM,UAAU,OAAO,OAAO,OAAO,OAAO,CAAC,GAAG,MAAM,GAAG,EAAE,YAAY,MAAM,KAAK,MAAM,aAAa,CAAC,CAAC,EAAE,CAAC;AAC1G,IAAM,OAAO;CACT,MAAM,cAAc,OAAO,KAAK;CAChC,OAAO,WAAW,OAAO,SAAS,MAAM;CACxC,YAAY,EAAE,KAAK,OAAO,MAAM,OAAO,UAAU,QAAQ,UACrD,QAAQ,UAAU,GAAG,IACrB,OACA,QAAQ,UAAU,KAAK,IACvB,OACA,QAAQ,UAAU,IAAI,IACtB,OACA,SAAS,MAAM,UAAU,OAAO,CAAC,IACjC;AACR"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { floatRegex, isString, singleColorRegex } from "../utils.js";
|
|
2
|
+
//#region node_modules/style-value-types/dist/es/color/utils.mjs
|
|
3
|
+
var isColorString = (type, testProp) => (v) => {
|
|
4
|
+
return Boolean(isString(v) && singleColorRegex.test(v) && v.startsWith(type) || testProp && Object.prototype.hasOwnProperty.call(v, testProp));
|
|
5
|
+
};
|
|
6
|
+
var splitColor = (aName, bName, cName) => (v) => {
|
|
7
|
+
if (!isString(v)) return v;
|
|
8
|
+
const [a, b, c, alpha] = v.match(floatRegex);
|
|
9
|
+
return {
|
|
10
|
+
[aName]: parseFloat(a),
|
|
11
|
+
[bName]: parseFloat(b),
|
|
12
|
+
[cName]: parseFloat(c),
|
|
13
|
+
alpha: alpha !== void 0 ? parseFloat(alpha) : 1
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { isColorString, splitColor };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../../../../../node_modules/style-value-types/dist/es/color/utils.mjs"],"sourcesContent":["import { isString, singleColorRegex, floatRegex } from '../utils.mjs';\n\nconst isColorString = (type, testProp) => (v) => {\n return Boolean((isString(v) && singleColorRegex.test(v) && v.startsWith(type)) ||\n (testProp && Object.prototype.hasOwnProperty.call(v, testProp)));\n};\nconst splitColor = (aName, bName, cName) => (v) => {\n if (!isString(v))\n return v;\n const [a, b, c, alpha] = v.match(floatRegex);\n return {\n [aName]: parseFloat(a),\n [bName]: parseFloat(b),\n [cName]: parseFloat(c),\n alpha: alpha !== undefined ? parseFloat(alpha) : 1,\n };\n};\n\nexport { isColorString, splitColor };\n"],"x_google_ignoreList":[0],"mappings":";;AAEA,IAAM,iBAAiB,MAAM,cAAc,MAAM;CAC7C,OAAO,QAAS,SAAS,CAAC,KAAK,iBAAiB,KAAK,CAAC,KAAK,EAAE,WAAW,IAAI,KACvE,YAAY,OAAO,UAAU,eAAe,KAAK,GAAG,QAAQ,CAAE;AACvE;AACA,IAAM,cAAc,OAAO,OAAO,WAAW,MAAM;CAC/C,IAAI,CAAC,SAAS,CAAC,GACX,OAAO;CACX,MAAM,CAAC,GAAG,GAAG,GAAG,SAAS,EAAE,MAAM,UAAU;CAC3C,OAAO;GACF,QAAQ,WAAW,CAAC;GACpB,QAAQ,WAAW,CAAC;GACpB,QAAQ,WAAW,CAAC;EACrB,OAAO,UAAU,KAAA,IAAY,WAAW,KAAK,IAAI;CACrD;AACJ"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { colorRegex, floatRegex, isString, sanitize } from "../utils.js";
|
|
2
|
+
import { number } from "../numbers/index.js";
|
|
3
|
+
import { color } from "../color/index.js";
|
|
4
|
+
//#region node_modules/style-value-types/dist/es/complex/index.mjs
|
|
5
|
+
var colorToken = "${c}";
|
|
6
|
+
var numberToken = "${n}";
|
|
7
|
+
function test(v) {
|
|
8
|
+
var _a, _b, _c, _d;
|
|
9
|
+
return isNaN(v) && isString(v) && ((_b = (_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) + ((_d = (_c = v.match(colorRegex)) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0;
|
|
10
|
+
}
|
|
11
|
+
function analyse(v) {
|
|
12
|
+
if (typeof v === "number") v = `${v}`;
|
|
13
|
+
const values = [];
|
|
14
|
+
let numColors = 0;
|
|
15
|
+
const colors = v.match(colorRegex);
|
|
16
|
+
if (colors) {
|
|
17
|
+
numColors = colors.length;
|
|
18
|
+
v = v.replace(colorRegex, colorToken);
|
|
19
|
+
values.push(...colors.map(color.parse));
|
|
20
|
+
}
|
|
21
|
+
const numbers = v.match(floatRegex);
|
|
22
|
+
if (numbers) {
|
|
23
|
+
v = v.replace(floatRegex, numberToken);
|
|
24
|
+
values.push(...numbers.map(number.parse));
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
values,
|
|
28
|
+
numColors,
|
|
29
|
+
tokenised: v
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function parse(v) {
|
|
33
|
+
return analyse(v).values;
|
|
34
|
+
}
|
|
35
|
+
function createTransformer(v) {
|
|
36
|
+
const { values, numColors, tokenised } = analyse(v);
|
|
37
|
+
const numValues = values.length;
|
|
38
|
+
return (v) => {
|
|
39
|
+
let output = tokenised;
|
|
40
|
+
for (let i = 0; i < numValues; i++) output = output.replace(i < numColors ? colorToken : numberToken, i < numColors ? color.transform(v[i]) : sanitize(v[i]));
|
|
41
|
+
return output;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
var convertNumbersToZero = (v) => typeof v === "number" ? 0 : v;
|
|
45
|
+
function getAnimatableNone(v) {
|
|
46
|
+
const parsed = parse(v);
|
|
47
|
+
return createTransformer(v)(parsed.map(convertNumbersToZero));
|
|
48
|
+
}
|
|
49
|
+
var complex = {
|
|
50
|
+
test,
|
|
51
|
+
parse,
|
|
52
|
+
createTransformer,
|
|
53
|
+
getAnimatableNone
|
|
54
|
+
};
|
|
55
|
+
//#endregion
|
|
56
|
+
export { complex };
|
|
57
|
+
|
|
58
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../../node_modules/style-value-types/dist/es/complex/index.mjs"],"sourcesContent":["import { color } from '../color/index.mjs';\nimport { number } from '../numbers/index.mjs';\nimport { isString, floatRegex, colorRegex, sanitize } from '../utils.mjs';\n\nconst colorToken = '${c}';\nconst numberToken = '${n}';\nfunction test(v) {\n var _a, _b, _c, _d;\n return (isNaN(v) &&\n isString(v) &&\n ((_b = (_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) + ((_d = (_c = v.match(colorRegex)) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0);\n}\nfunction analyse(v) {\n if (typeof v === 'number')\n v = `${v}`;\n const values = [];\n let numColors = 0;\n const colors = v.match(colorRegex);\n if (colors) {\n numColors = colors.length;\n v = v.replace(colorRegex, colorToken);\n values.push(...colors.map(color.parse));\n }\n const numbers = v.match(floatRegex);\n if (numbers) {\n v = v.replace(floatRegex, numberToken);\n values.push(...numbers.map(number.parse));\n }\n return { values, numColors, tokenised: v };\n}\nfunction parse(v) {\n return analyse(v).values;\n}\nfunction createTransformer(v) {\n const { values, numColors, tokenised } = analyse(v);\n const numValues = values.length;\n return (v) => {\n let output = tokenised;\n for (let i = 0; i < numValues; i++) {\n output = output.replace(i < numColors ? colorToken : numberToken, i < numColors ? color.transform(v[i]) : sanitize(v[i]));\n }\n return output;\n };\n}\nconst convertNumbersToZero = (v) => typeof v === 'number' ? 0 : v;\nfunction getAnimatableNone(v) {\n const parsed = parse(v);\n const transformer = createTransformer(v);\n return transformer(parsed.map(convertNumbersToZero));\n}\nconst complex = { test, parse, createTransformer, getAnimatableNone };\n\nexport { complex };\n"],"x_google_ignoreList":[0],"mappings":";;;;AAIA,IAAM,aAAa;AACnB,IAAM,cAAc;AACpB,SAAS,KAAK,GAAG;CACb,IAAI,IAAI,IAAI,IAAI;CAChB,OAAQ,MAAM,CAAC,KACX,SAAS,CAAC,OACR,MAAM,KAAK,EAAE,MAAM,UAAU,OAAO,QAAQ,OAAO,KAAK,IAAI,KAAK,IAAI,GAAG,YAAY,QAAQ,OAAO,KAAK,IAAI,KAAK,OAAO,MAAM,KAAK,EAAE,MAAM,UAAU,OAAO,QAAQ,OAAO,KAAK,IAAI,KAAK,IAAI,GAAG,YAAY,QAAQ,OAAO,KAAK,IAAI,KAAK,KAAK;AACxP;AACA,SAAS,QAAQ,GAAG;CAChB,IAAI,OAAO,MAAM,UACb,IAAI,GAAG;CACX,MAAM,SAAS,CAAC;CAChB,IAAI,YAAY;CAChB,MAAM,SAAS,EAAE,MAAM,UAAU;CACjC,IAAI,QAAQ;EACR,YAAY,OAAO;EACnB,IAAI,EAAE,QAAQ,YAAY,UAAU;EACpC,OAAO,KAAK,GAAG,OAAO,IAAI,MAAM,KAAK,CAAC;CAC1C;CACA,MAAM,UAAU,EAAE,MAAM,UAAU;CAClC,IAAI,SAAS;EACT,IAAI,EAAE,QAAQ,YAAY,WAAW;EACrC,OAAO,KAAK,GAAG,QAAQ,IAAI,OAAO,KAAK,CAAC;CAC5C;CACA,OAAO;EAAE;EAAQ;EAAW,WAAW;CAAE;AAC7C;AACA,SAAS,MAAM,GAAG;CACd,OAAO,QAAQ,CAAC,EAAE;AACtB;AACA,SAAS,kBAAkB,GAAG;CAC1B,MAAM,EAAE,QAAQ,WAAW,cAAc,QAAQ,CAAC;CAClD,MAAM,YAAY,OAAO;CACzB,QAAQ,MAAM;EACV,IAAI,SAAS;EACb,KAAK,IAAI,IAAI,GAAG,IAAI,WAAW,KAC3B,SAAS,OAAO,QAAQ,IAAI,YAAY,aAAa,aAAa,IAAI,YAAY,MAAM,UAAU,EAAE,EAAE,IAAI,SAAS,EAAE,EAAE,CAAC;EAE5H,OAAO;CACX;AACJ;AACA,IAAM,wBAAwB,MAAM,OAAO,MAAM,WAAW,IAAI;AAChE,SAAS,kBAAkB,GAAG;CAC1B,MAAM,SAAS,MAAM,CAAC;CAEtB,OADoB,kBAAkB,CACrB,EAAE,OAAO,IAAI,oBAAoB,CAAC;AACvD;AACA,IAAM,UAAU;CAAE;CAAM;CAAO;CAAmB;AAAkB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { clamp } from "../utils.js";
|
|
2
|
+
//#region node_modules/style-value-types/dist/es/numbers/index.mjs
|
|
3
|
+
var number = {
|
|
4
|
+
test: (v) => typeof v === "number",
|
|
5
|
+
parse: parseFloat,
|
|
6
|
+
transform: (v) => v
|
|
7
|
+
};
|
|
8
|
+
var alpha = Object.assign(Object.assign({}, number), { transform: clamp(0, 1) });
|
|
9
|
+
Object.assign(Object.assign({}, number), { default: 1 });
|
|
10
|
+
//#endregion
|
|
11
|
+
export { alpha, number };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../../node_modules/style-value-types/dist/es/numbers/index.mjs"],"sourcesContent":["import { clamp } from '../utils.mjs';\n\nconst number = {\n test: (v) => typeof v === 'number',\n parse: parseFloat,\n transform: (v) => v,\n};\nconst alpha = Object.assign(Object.assign({}, number), { transform: clamp(0, 1) });\nconst scale = Object.assign(Object.assign({}, number), { default: 1 });\n\nexport { alpha, number, scale };\n"],"x_google_ignoreList":[0],"mappings":";;AAEA,IAAM,SAAS;CACX,OAAO,MAAM,OAAO,MAAM;CAC1B,OAAO;CACP,YAAY,MAAM;AACtB;AACA,IAAM,QAAQ,OAAO,OAAO,OAAO,OAAO,CAAC,GAAG,MAAM,GAAG,EAAE,WAAW,MAAM,GAAG,CAAC,EAAE,CAAC;AACnE,OAAO,OAAO,OAAO,OAAO,CAAC,GAAG,MAAM,GAAG,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { isString } from "../utils.js";
|
|
2
|
+
//#region node_modules/style-value-types/dist/es/numbers/units.mjs
|
|
3
|
+
var createUnitType = (unit) => ({
|
|
4
|
+
test: (v) => isString(v) && v.endsWith(unit) && v.split(" ").length === 1,
|
|
5
|
+
parse: parseFloat,
|
|
6
|
+
transform: (v) => `${v}${unit}`
|
|
7
|
+
});
|
|
8
|
+
var percent = createUnitType("%");
|
|
9
|
+
Object.assign(Object.assign({}, percent), {
|
|
10
|
+
parse: (v) => percent.parse(v) / 100,
|
|
11
|
+
transform: (v) => percent.transform(v * 100)
|
|
12
|
+
});
|
|
13
|
+
//#endregion
|
|
14
|
+
export { percent };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=units.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"units.js","names":[],"sources":["../../../../../../node_modules/style-value-types/dist/es/numbers/units.mjs"],"sourcesContent":["import { isString } from '../utils.mjs';\n\nconst createUnitType = (unit) => ({\n test: (v) => isString(v) && v.endsWith(unit) && v.split(' ').length === 1,\n parse: parseFloat,\n transform: (v) => `${v}${unit}`,\n});\nconst degrees = createUnitType('deg');\nconst percent = createUnitType('%');\nconst px = createUnitType('px');\nconst vh = createUnitType('vh');\nconst vw = createUnitType('vw');\nconst progressPercentage = Object.assign(Object.assign({}, percent), { parse: (v) => percent.parse(v) / 100, transform: (v) => percent.transform(v * 100) });\n\nexport { degrees, percent, progressPercentage, px, vh, vw };\n"],"x_google_ignoreList":[0],"mappings":";;AAEA,IAAM,kBAAkB,UAAU;CAC9B,OAAO,MAAM,SAAS,CAAC,KAAK,EAAE,SAAS,IAAI,KAAK,EAAE,MAAM,GAAG,EAAE,WAAW;CACxE,OAAO;CACP,YAAY,MAAM,GAAG,IAAI;AAC7B;AAEA,IAAM,UAAU,eAAe,GAAG;AAIP,OAAO,OAAO,OAAO,OAAO,CAAC,GAAG,OAAO,GAAG;CAAE,QAAQ,MAAM,QAAQ,MAAM,CAAC,IAAI;CAAK,YAAY,MAAM,QAAQ,UAAU,IAAI,GAAG;AAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region node_modules/style-value-types/dist/es/utils.mjs
|
|
2
|
+
var clamp = (min, max) => (v) => Math.max(Math.min(v, max), min);
|
|
3
|
+
var sanitize = (v) => v % 1 ? Number(v.toFixed(5)) : v;
|
|
4
|
+
var floatRegex = /(-)?([\d]*\.?[\d])+/g;
|
|
5
|
+
var colorRegex = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi;
|
|
6
|
+
var singleColorRegex = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;
|
|
7
|
+
function isString(v) {
|
|
8
|
+
return typeof v === "string";
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { clamp, colorRegex, floatRegex, isString, sanitize, singleColorRegex };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../../../../node_modules/style-value-types/dist/es/utils.mjs"],"sourcesContent":["const clamp = (min, max) => (v) => Math.max(Math.min(v, max), min);\nconst sanitize = (v) => (v % 1 ? Number(v.toFixed(5)) : v);\nconst floatRegex = /(-)?([\\d]*\\.?[\\d])+/g;\nconst colorRegex = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\\((-?[\\d\\.]+%?[,\\s]+){2}(-?[\\d\\.]+%?)\\s*[\\,\\/]?\\s*[\\d\\.]*%?\\))/gi;\nconst singleColorRegex = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\\((-?[\\d\\.]+%?[,\\s]+){2}(-?[\\d\\.]+%?)\\s*[\\,\\/]?\\s*[\\d\\.]*%?\\))$/i;\nfunction isString(v) {\n return typeof v === 'string';\n}\n\nexport { clamp, colorRegex, floatRegex, isString, sanitize, singleColorRegex };\n"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAM,SAAS,KAAK,SAAS,MAAM,KAAK,IAAI,KAAK,IAAI,GAAG,GAAG,GAAG,GAAG;AACjE,IAAM,YAAY,MAAO,IAAI,IAAI,OAAO,EAAE,QAAQ,CAAC,CAAC,IAAI;AACxD,IAAM,aAAa;AACnB,IAAM,aAAa;AACnB,IAAM,mBAAmB;AACzB,SAAS,SAAS,GAAG;CACjB,OAAO,OAAO,MAAM;AACxB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plastic-js/tsumiki",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.23",
|
|
4
4
|
"description": "A UI component library for Plastic JS.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "tigre",
|
|
@@ -48,7 +48,8 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@emotion/css": "^11.13.5",
|
|
50
50
|
"@plastic-js/ark": "^1.0.12",
|
|
51
|
-
"@plastic-js/plastic": "^1.0.22"
|
|
51
|
+
"@plastic-js/plastic": "^1.0.22",
|
|
52
|
+
"popmotion": "^11.0.5"
|
|
52
53
|
},
|
|
53
54
|
"peerDependencies": {
|
|
54
55
|
"@zag-js/combobox": "1.40.0"
|