init 3
This commit is contained in:
9918
node_modules/motion-dom/dist/cjs/index.js
generated
vendored
Normal file
9918
node_modules/motion-dom/dist/cjs/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/motion-dom/dist/es/animation/animate/single-value.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/animation/animate/single-value.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"single-value.mjs","sources":["../../../../src/animation/animate/single-value.ts"],"sourcesContent":["import { animateMotionValue } from \"../interfaces/motion-value\"\nimport type {\n AnimationPlaybackControlsWithThen,\n AnyResolvedKeyframe,\n UnresolvedValueKeyframe,\n ValueAnimationTransition,\n} from \"../types\"\nimport {\n motionValue as createMotionValue,\n MotionValue,\n} from \"../../value\"\nimport { isMotionValue } from \"../../value/utils/is-motion-value\"\n\nexport function animateSingleValue<V extends AnyResolvedKeyframe>(\n value: MotionValue<V> | V,\n keyframes: V | UnresolvedValueKeyframe<V>[],\n options?: ValueAnimationTransition\n): AnimationPlaybackControlsWithThen {\n const motionValue = isMotionValue(value) ? value : createMotionValue(value)\n\n motionValue.start(animateMotionValue(\"\", motionValue, keyframes, options))\n\n return motionValue.animation!\n}\n"],"names":["motionValue","createMotionValue"],"mappings":";;;;SAagB,kBAAkB,CAC9B,KAAyB,EACzB,SAA2C,EAC3C,OAAkC,EAAA;AAElC,IAAA,MAAMA,aAAW,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,KAAK,GAAGC,WAAiB,CAAC,KAAK,CAAC;AAE3E,IAAAD,aAAW,CAAC,KAAK,CAAC,kBAAkB,CAAC,EAAE,EAAEA,aAAW,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAE1E,OAAOA,aAAW,CAAC,SAAU;AACjC;;;;"}
|
||||
18
node_modules/motion-dom/dist/es/animation/drivers/frame.mjs
generated
vendored
Normal file
18
node_modules/motion-dom/dist/es/animation/drivers/frame.mjs
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { time } from '../../frameloop/sync-time.mjs';
|
||||
import { frameData, cancelFrame, frame } from '../../frameloop/frame.mjs';
|
||||
|
||||
const frameloopDriver = (update) => {
|
||||
const passTimestamp = ({ timestamp }) => update(timestamp);
|
||||
return {
|
||||
start: (keepAlive = true) => frame.update(passTimestamp, keepAlive),
|
||||
stop: () => cancelFrame(passTimestamp),
|
||||
/**
|
||||
* If we're processing this frame we can use the
|
||||
* framelocked timestamp to keep things in sync.
|
||||
*/
|
||||
now: () => (frameData.isProcessing ? frameData.timestamp : time.now()),
|
||||
};
|
||||
};
|
||||
|
||||
export { frameloopDriver };
|
||||
//# sourceMappingURL=frame.mjs.map
|
||||
1
node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
10
node_modules/motion-dom/dist/es/animation/utils/active-animations.mjs
generated
vendored
Normal file
10
node_modules/motion-dom/dist/es/animation/utils/active-animations.mjs
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
const animationMaps = new WeakMap();
|
||||
const animationMapKey = (name, pseudoElement = "") => `${name}:${pseudoElement}`;
|
||||
function getAnimationMap(element) {
|
||||
const map = animationMaps.get(element) || new Map();
|
||||
animationMaps.set(element, map);
|
||||
return map;
|
||||
}
|
||||
|
||||
export { animationMapKey, getAnimationMap };
|
||||
//# sourceMappingURL=active-animations.mjs.map
|
||||
19
node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.mjs
generated
vendored
Normal file
19
node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.mjs
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import { inertia } from '../generators/inertia.mjs';
|
||||
import { keyframes } from '../generators/keyframes.mjs';
|
||||
import { spring } from '../generators/spring.mjs';
|
||||
|
||||
const transitionTypeMap = {
|
||||
decay: inertia,
|
||||
inertia,
|
||||
tween: keyframes,
|
||||
keyframes: keyframes,
|
||||
spring,
|
||||
};
|
||||
function replaceTransitionType(transition) {
|
||||
if (typeof transition.type === "string") {
|
||||
transition.type = transitionTypeMap[transition.type];
|
||||
}
|
||||
}
|
||||
|
||||
export { replaceTransitionType };
|
||||
//# sourceMappingURL=replace-transition-type.mjs.map
|
||||
4
node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs
generated
vendored
Normal file
4
node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
const cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;
|
||||
|
||||
export { cubicBezierAsString };
|
||||
//# sourceMappingURL=cubic-bezier.mjs.map
|
||||
39
node_modules/motion-dom/dist/es/effects/style/transform.mjs
generated
vendored
Normal file
39
node_modules/motion-dom/dist/es/effects/style/transform.mjs
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
import { transformPropOrder } from '../../render/utils/keys-transform.mjs';
|
||||
|
||||
const translateAlias = {
|
||||
x: "translateX",
|
||||
y: "translateY",
|
||||
z: "translateZ",
|
||||
transformPerspective: "perspective",
|
||||
};
|
||||
function buildTransform(state) {
|
||||
let transform = "";
|
||||
let transformIsDefault = true;
|
||||
/**
|
||||
* Loop over all possible transforms in order, adding the ones that
|
||||
* are present to the transform string.
|
||||
*/
|
||||
for (let i = 0; i < transformPropOrder.length; i++) {
|
||||
const key = transformPropOrder[i];
|
||||
const value = state.latest[key];
|
||||
if (value === undefined)
|
||||
continue;
|
||||
let valueIsDefault = true;
|
||||
if (typeof value === "number") {
|
||||
valueIsDefault = value === (key.startsWith("scale") ? 1 : 0);
|
||||
}
|
||||
else {
|
||||
const parsed = parseFloat(value);
|
||||
valueIsDefault = key.startsWith("scale") ? parsed === 1 : parsed === 0;
|
||||
}
|
||||
if (!valueIsDefault) {
|
||||
transformIsDefault = false;
|
||||
const transformName = translateAlias[key] || key;
|
||||
transform += `${transformName}(${value}) `;
|
||||
}
|
||||
}
|
||||
return transformIsDefault ? "none" : transform.trim();
|
||||
}
|
||||
|
||||
export { buildTransform };
|
||||
//# sourceMappingURL=transform.mjs.map
|
||||
32
node_modules/motion-dom/dist/es/frameloop/sync-time.mjs
generated
vendored
Normal file
32
node_modules/motion-dom/dist/es/frameloop/sync-time.mjs
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
import { MotionGlobalConfig } from 'motion-utils';
|
||||
import { frameData } from './frame.mjs';
|
||||
|
||||
let now;
|
||||
function clearTime() {
|
||||
now = undefined;
|
||||
}
|
||||
/**
|
||||
* An eventloop-synchronous alternative to performance.now().
|
||||
*
|
||||
* Ensures that time measurements remain consistent within a synchronous context.
|
||||
* Usually calling performance.now() twice within the same synchronous context
|
||||
* will return different values which isn't useful for animations when we're usually
|
||||
* trying to sync animations to the same frame.
|
||||
*/
|
||||
const time = {
|
||||
now: () => {
|
||||
if (now === undefined) {
|
||||
time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming
|
||||
? frameData.timestamp
|
||||
: performance.now());
|
||||
}
|
||||
return now;
|
||||
},
|
||||
set: (newTime) => {
|
||||
now = newTime;
|
||||
queueMicrotask(clearTime);
|
||||
},
|
||||
};
|
||||
|
||||
export { time };
|
||||
//# sourceMappingURL=sync-time.mjs.map
|
||||
10
node_modules/motion-dom/dist/es/gestures/drag/state/is-active.mjs
generated
vendored
Normal file
10
node_modules/motion-dom/dist/es/gestures/drag/state/is-active.mjs
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
const isDragging = {
|
||||
x: false,
|
||||
y: false,
|
||||
};
|
||||
function isDragActive() {
|
||||
return isDragging.x || isDragging.y;
|
||||
}
|
||||
|
||||
export { isDragActive, isDragging };
|
||||
//# sourceMappingURL=is-active.mjs.map
|
||||
1
node_modules/motion-dom/dist/es/layout/LayoutAnimationBuilder.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/layout/LayoutAnimationBuilder.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
20
node_modules/motion-dom/dist/es/projection/node/state.mjs
generated
vendored
Normal file
20
node_modules/motion-dom/dist/es/projection/node/state.mjs
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* This should only ever be modified on the client otherwise it'll
|
||||
* persist through server requests. If we need instanced states we
|
||||
* could lazy-init via root.
|
||||
*/
|
||||
const globalProjectionState = {
|
||||
/**
|
||||
* Global flag as to whether the tree has animated since the last time
|
||||
* we resized the window
|
||||
*/
|
||||
hasAnimatedSinceResize: true,
|
||||
/**
|
||||
* We set this to true once, on the first update. Any nodes added to the tree beyond that
|
||||
* update will be given a `data-projection-id` attribute.
|
||||
*/
|
||||
hasEverUpdated: false,
|
||||
};
|
||||
|
||||
export { globalProjectionState };
|
||||
//# sourceMappingURL=state.mjs.map
|
||||
6
node_modules/motion-dom/dist/es/projection/utils/each-axis.mjs
generated
vendored
Normal file
6
node_modules/motion-dom/dist/es/projection/utils/each-axis.mjs
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
function eachAxis(callback) {
|
||||
return [callback("x"), callback("y")];
|
||||
}
|
||||
|
||||
export { eachAxis };
|
||||
//# sourceMappingURL=each-axis.mjs.map
|
||||
1
node_modules/motion-dom/dist/es/render/object/ObjectVisualElement.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/render/object/ObjectVisualElement.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ObjectVisualElement.mjs","sources":["../../../../src/render/object/ObjectVisualElement.ts"],"sourcesContent":["import { createBox } from \"../../projection/geometry/models\"\nimport { ResolvedValues } from \"../types\"\nimport { VisualElement } from \"../VisualElement\"\n\ninterface ObjectRenderState {\n output: ResolvedValues\n}\n\nfunction isObjectKey(key: string, object: Object): key is keyof Object {\n return key in object\n}\n\nexport class ObjectVisualElement extends VisualElement<\n Object,\n ObjectRenderState\n> {\n type = \"object\"\n\n readValueFromInstance(instance: Object, key: string) {\n if (isObjectKey(key, instance)) {\n const value = instance[key]\n if (typeof value === \"string\" || typeof value === \"number\") {\n return value\n }\n }\n\n return undefined\n }\n\n getBaseTargetFromProps() {\n return undefined\n }\n\n removeValueFromRenderState(\n key: string,\n renderState: ObjectRenderState\n ): void {\n delete renderState.output[key]\n }\n\n measureInstanceViewportBox() {\n return createBox()\n }\n\n build(renderState: ObjectRenderState, latestValues: ResolvedValues) {\n Object.assign(renderState.output, latestValues)\n }\n\n renderInstance(instance: Object, { output }: ObjectRenderState) {\n Object.assign(instance, output)\n }\n\n sortInstanceNodePosition() {\n return 0\n }\n}\n"],"names":[],"mappings":";;;AAQA,SAAS,WAAW,CAAC,GAAW,EAAE,MAAc,EAAA;IAC5C,OAAO,GAAG,IAAI,MAAM;AACxB;AAEM,MAAO,mBAAoB,SAAQ,aAGxC,CAAA;AAHD,IAAA,WAAA,GAAA;;QAII,IAAA,CAAA,IAAI,GAAG,QAAQ;IAuCnB;IArCI,qBAAqB,CAAC,QAAgB,EAAE,GAAW,EAAA;AAC/C,QAAA,IAAI,WAAW,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAE;AAC5B,YAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC;YAC3B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACxD,gBAAA,OAAO,KAAK;YAChB;QACJ;AAEA,QAAA,OAAO,SAAS;IACpB;IAEA,sBAAsB,GAAA;AAClB,QAAA,OAAO,SAAS;IACpB;IAEA,0BAA0B,CACtB,GAAW,EACX,WAA8B,EAAA;AAE9B,QAAA,OAAO,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC;IAClC;IAEA,0BAA0B,GAAA;QACtB,OAAO,SAAS,EAAE;IACtB;IAEA,KAAK,CAAC,WAA8B,EAAE,YAA4B,EAAA;QAC9D,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC;IACnD;AAEA,IAAA,cAAc,CAAC,QAAgB,EAAE,EAAE,MAAM,EAAqB,EAAA;AAC1D,QAAA,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC;IACnC;IAEA,wBAAwB,GAAA;AACpB,QAAA,OAAO,CAAC;IACZ;AACH;;;;"}
|
||||
14
node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs
generated
vendored
Normal file
14
node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { isAnimationControls } from './is-animation-controls.mjs';
|
||||
import { isVariantLabel } from './is-variant-label.mjs';
|
||||
import { variantProps } from './variant-props.mjs';
|
||||
|
||||
function isControllingVariants(props) {
|
||||
return (isAnimationControls(props.animate) ||
|
||||
variantProps.some((name) => isVariantLabel(props[name])));
|
||||
}
|
||||
function isVariantNode(props) {
|
||||
return Boolean(isControllingVariants(props) || props.variants);
|
||||
}
|
||||
|
||||
export { isControllingVariants, isVariantNode };
|
||||
//# sourceMappingURL=is-controlling-variants.mjs.map
|
||||
14
node_modules/motion-dom/dist/es/render/utils/keys-position.mjs
generated
vendored
Normal file
14
node_modules/motion-dom/dist/es/render/utils/keys-position.mjs
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { transformPropOrder } from './keys-transform.mjs';
|
||||
|
||||
const positionalKeys = new Set([
|
||||
"width",
|
||||
"height",
|
||||
"top",
|
||||
"left",
|
||||
"right",
|
||||
"bottom",
|
||||
...transformPropOrder,
|
||||
]);
|
||||
|
||||
export { positionalKeys };
|
||||
//# sourceMappingURL=keys-position.mjs.map
|
||||
1
node_modules/motion-dom/dist/es/render/utils/keys-position.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/render/utils/keys-position.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"keys-position.mjs","sources":["../../../../src/render/utils/keys-position.ts"],"sourcesContent":["import { transformPropOrder } from \"./keys-transform\"\n\nexport const positionalKeys = new Set([\n \"width\",\n \"height\",\n \"top\",\n \"left\",\n \"right\",\n \"bottom\",\n ...transformPropOrder,\n])\n"],"names":[],"mappings":";;AAEO,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC;IAClC,OAAO;IACP,QAAQ;IACR,KAAK;IACL,MAAM;IACN,OAAO;IACP,QAAQ;AACR,IAAA,GAAG,kBAAkB;AACxB,CAAA;;;;"}
|
||||
1
node_modules/motion-dom/dist/es/render/utils/shallow-compare.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/render/utils/shallow-compare.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"shallow-compare.mjs","sources":["../../../../src/render/utils/shallow-compare.ts"],"sourcesContent":["export function shallowCompare(next: any[], prev: any[] | null) {\n if (!Array.isArray(prev)) return false\n\n const prevLength = prev.length\n\n if (prevLength !== next.length) return false\n\n for (let i = 0; i < prevLength; i++) {\n if (prev[i] !== next[i]) return false\n }\n\n return true\n}\n"],"names":[],"mappings":"AAAM,SAAU,cAAc,CAAC,IAAW,EAAE,IAAkB,EAAA;AAC1D,IAAA,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;AAAE,QAAA,OAAO,KAAK;AAEtC,IAAA,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM;AAE9B,IAAA,IAAI,UAAU,KAAK,IAAI,CAAC,MAAM;AAAE,QAAA,OAAO,KAAK;AAE5C,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE;QACjC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;AAAE,YAAA,OAAO,KAAK;IACzC;AAEA,IAAA,OAAO,IAAI;AACf;;;;"}
|
||||
19
node_modules/motion-dom/dist/es/scroll/observe.mjs
generated
vendored
Normal file
19
node_modules/motion-dom/dist/es/scroll/observe.mjs
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import { frame, cancelFrame } from '../frameloop/frame.mjs';
|
||||
|
||||
function observeTimeline(update, timeline) {
|
||||
let prevProgress;
|
||||
const onFrame = () => {
|
||||
const { currentTime } = timeline;
|
||||
const percentage = currentTime === null ? 0 : currentTime.value;
|
||||
const progress = percentage / 100;
|
||||
if (prevProgress !== progress) {
|
||||
update(progress);
|
||||
}
|
||||
prevProgress = progress;
|
||||
};
|
||||
frame.preUpdate(onFrame, true);
|
||||
return () => cancelFrame(onFrame);
|
||||
}
|
||||
|
||||
export { observeTimeline };
|
||||
//# sourceMappingURL=observe.mjs.map
|
||||
12
node_modules/motion-dom/dist/es/utils/is-svg-element.mjs
generated
vendored
Normal file
12
node_modules/motion-dom/dist/es/utils/is-svg-element.mjs
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { isObject } from 'motion-utils';
|
||||
|
||||
/**
|
||||
* Checks if an element is an SVG element in a way
|
||||
* that works across iframes
|
||||
*/
|
||||
function isSVGElement(element) {
|
||||
return isObject(element) && "ownerSVGElement" in element;
|
||||
}
|
||||
|
||||
export { isSVGElement };
|
||||
//# sourceMappingURL=is-svg-element.mjs.map
|
||||
12
node_modules/motion-dom/dist/es/utils/is-svg-svg-element.mjs
generated
vendored
Normal file
12
node_modules/motion-dom/dist/es/utils/is-svg-svg-element.mjs
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { isSVGElement } from './is-svg-element.mjs';
|
||||
|
||||
/**
|
||||
* Checks if an element is specifically an SVGSVGElement (the root SVG element)
|
||||
* in a way that works across iframes
|
||||
*/
|
||||
function isSVGSVGElement(element) {
|
||||
return isSVGElement(element) && element.tagName === "svg";
|
||||
}
|
||||
|
||||
export { isSVGSVGElement };
|
||||
//# sourceMappingURL=is-svg-svg-element.mjs.map
|
||||
6
node_modules/motion-dom/dist/es/utils/mix/immediate.mjs
generated
vendored
Normal file
6
node_modules/motion-dom/dist/es/utils/mix/immediate.mjs
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
function mixImmediate(a, b) {
|
||||
return (p) => (p > 0 ? b : a);
|
||||
}
|
||||
|
||||
export { mixImmediate };
|
||||
//# sourceMappingURL=immediate.mjs.map
|
||||
1
node_modules/motion-dom/dist/es/value/index.mjs.map
generated
vendored
Normal file
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
1
node_modules/motion-dom/dist/es/value/subscribe-value.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/value/subscribe-value.mjs.map
generated
vendored
Normal 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;;;;"}
|
||||
43
node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs
generated
vendored
Normal file
43
node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs
generated
vendored
Normal 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
|
||||
4
node_modules/motion-dom/dist/es/value/types/utils/color-regex.mjs
generated
vendored
Normal file
4
node_modules/motion-dom/dist/es/value/types/utils/color-regex.mjs
generated
vendored
Normal 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
|
||||
1
node_modules/motion-dom/dist/es/view/utils/has-target.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/view/utils/has-target.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"has-target.mjs","sources":["../../../../src/view/utils/has-target.ts"],"sourcesContent":["import { ViewTransitionTarget, ViewTransitionTargetDefinition } from \"../types\"\n\nexport function hasTarget(\n target: ViewTransitionTargetDefinition,\n targets: Map<ViewTransitionTargetDefinition, ViewTransitionTarget>\n) {\n return targets.has(target) && Object.keys(targets.get(target)!).length > 0\n}\n"],"names":[],"mappings":"AAEM,SAAU,SAAS,CACrB,MAAsC,EACtC,OAAkE,EAAA;IAElE,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAE,CAAC,CAAC,MAAM,GAAG,CAAC;AAC9E;;;;"}
|
||||
2
node_modules/motion-dom/dist/size-rollup-motion-value.js
generated
vendored
Normal file
2
node_modules/motion-dom/dist/size-rollup-motion-value.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
const t={};class e{constructor(){this.subscriptions=[]}add(t){var e,s;return e=this.subscriptions,s=t,-1===e.indexOf(s)&&e.push(s),()=>function(t,e){const s=t.indexOf(e);s>-1&&t.splice(s,1)}(this.subscriptions,t)}notify(t,e,s){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,s);else for(let n=0;n<i;n++){const i=this.subscriptions[n];i&&i(t,e,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const s=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function i(e,i){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,c=s.reduce((t,e)=>(t[e]=function(t){let e=new Set,s=new Set,i=!1,n=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function o(e){r.has(e)&&(c.schedule(e),t()),e(a)}const c={schedule:(t,n=!1,a=!1)=>{const o=a&&i?e:s;return n&&r.add(t),o.add(t),t},cancel:t=>{s.delete(t),r.delete(t)},process:t=>{if(a=t,i)return void(n=!0);i=!0;const r=e;e=s,s=r,e.forEach(o),e.clear(),i=!1,n&&(n=!1,c.process(t))}};return c}(o),t),{}),{setup:h,read:d,resolveKeyframes:p,preUpdate:u,update:l,preRender:v,render:m,postRender:f}=c,g=()=>{const s=t.useManualTiming,o=s?a.timestamp:performance.now();n=!1,s||(a.delta=r?1e3/60:Math.max(Math.min(o-a.timestamp,40),1)),a.timestamp=o,a.isProcessing=!0,h.process(a),d.process(a),p.process(a),u.process(a),l.process(a),v.process(a),m.process(a),f.process(a),a.isProcessing=!1,n&&i&&(r=!1,e(g))};return{schedule:s.reduce((t,s)=>{const i=c[s];return t[s]=(t,s=!1,o=!1)=>(n||(n=!0,r=!0,a.isProcessing||e(g)),i.schedule(t,s,o)),t},{}),cancel:t=>{for(let e=0;e<s.length;e++)c[s[e]].cancel(t)},state:a,steps:c}}const{schedule:n,state:r}=i("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:t=>t,!0);let a;function o(){a=void 0}const c={now:()=>(void 0===a&&c.set(r.isProcessing||t.useManualTiming?r.timestamp:performance.now()),a),set:t=>{a=t,queueMicrotask(o)}},h={current:void 0};class d{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=c.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=c.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,s){this.events[t]||(this.events[t]=new e);const i=this.events[t].add(s);return"change"===t?()=>{i(),n.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,s){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return h.current&&h.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=c.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return s=parseFloat(this.current)-parseFloat(this.prevFrameValue),(i=e)?s*(1e3/i):0;var s,i}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function p(t,e){return new d(t,e)}export{d as MotionValue,h as collectMotionValues,p as motionValue};
|
||||
//# sourceMappingURL=size-rollup-motion-value.js.map
|
||||
Reference in New Issue
Block a user