8 lines
11 KiB
Plaintext
8 lines
11 KiB
Plaintext
{
|
|
"version": 3,
|
|
"sources": ["../../.pnpm/svelte@3.55.0/node_modules/svelte/transition/index.mjs"],
|
|
"sourcesContent": ["import { cubicInOut, linear, cubicOut } from '../easing/index.mjs';\nimport { is_function, assign } from '../internal/index.mjs';\n\n/******************************************************************************\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\r\nfunction __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}\n\nfunction blur(node, { delay = 0, duration = 400, easing = cubicInOut, amount = 5, opacity = 0 } = {}) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const f = style.filter === 'none' ? '' : style.filter;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (_t, u) => `opacity: ${target_opacity - (od * u)}; filter: ${f} blur(${u * amount}px);`\n };\n}\nfunction fade(node, { delay = 0, duration = 400, easing = linear } = {}) {\n const o = +getComputedStyle(node).opacity;\n return {\n delay,\n duration,\n easing,\n css: t => `opacity: ${t * o}`\n };\n}\nfunction fly(node, { delay = 0, duration = 400, easing = cubicOut, x = 0, y = 0, opacity = 0 } = {}) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const transform = style.transform === 'none' ? '' : style.transform;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (t, u) => `\n\t\t\ttransform: ${transform} translate(${(1 - t) * x}px, ${(1 - t) * y}px);\n\t\t\topacity: ${target_opacity - (od * u)}`\n };\n}\nfunction slide(node, { delay = 0, duration = 400, easing = cubicOut } = {}) {\n const style = getComputedStyle(node);\n const opacity = +style.opacity;\n const height = parseFloat(style.height);\n const padding_top = parseFloat(style.paddingTop);\n const padding_bottom = parseFloat(style.paddingBottom);\n const margin_top = parseFloat(style.marginTop);\n const margin_bottom = parseFloat(style.marginBottom);\n const border_top_width = parseFloat(style.borderTopWidth);\n const border_bottom_width = parseFloat(style.borderBottomWidth);\n return {\n delay,\n duration,\n easing,\n css: t => 'overflow: hidden;' +\n `opacity: ${Math.min(t * 20, 1) * opacity};` +\n `height: ${t * height}px;` +\n `padding-top: ${t * padding_top}px;` +\n `padding-bottom: ${t * padding_bottom}px;` +\n `margin-top: ${t * margin_top}px;` +\n `margin-bottom: ${t * margin_bottom}px;` +\n `border-top-width: ${t * border_top_width}px;` +\n `border-bottom-width: ${t * border_bottom_width}px;`\n };\n}\nfunction scale(node, { delay = 0, duration = 400, easing = cubicOut, start = 0, opacity = 0 } = {}) {\n const style = getComputedStyle(node);\n const target_opacity = +style.opacity;\n const transform = style.transform === 'none' ? '' : style.transform;\n const sd = 1 - start;\n const od = target_opacity * (1 - opacity);\n return {\n delay,\n duration,\n easing,\n css: (_t, u) => `\n\t\t\ttransform: ${transform} scale(${1 - (sd * u)});\n\t\t\topacity: ${target_opacity - (od * u)}\n\t\t`\n };\n}\nfunction draw(node, { delay = 0, speed, duration, easing = cubicInOut } = {}) {\n let len = node.getTotalLength();\n const style = getComputedStyle(node);\n if (style.strokeLinecap !== 'butt') {\n len += parseInt(style.strokeWidth);\n }\n if (duration === undefined) {\n if (speed === undefined) {\n duration = 800;\n }\n else {\n duration = len / speed;\n }\n }\n else if (typeof duration === 'function') {\n duration = duration(len);\n }\n return {\n delay,\n duration,\n easing,\n css: (t, u) => `stroke-dasharray: ${t * len} ${u * len}`\n };\n}\nfunction crossfade(_a) {\n var { fallback } = _a, defaults = __rest(_a, [\"fallback\"]);\n const to_receive = new Map();\n const to_send = new Map();\n function crossfade(from, node, params) {\n const { delay = 0, duration = d => Math.sqrt(d) * 30, easing = cubicOut } = assign(assign({}, defaults), params);\n const to = node.getBoundingClientRect();\n const dx = from.left - to.left;\n const dy = from.top - to.top;\n const dw = from.width / to.width;\n const dh = from.height / to.height;\n const d = Math.sqrt(dx * dx + dy * dy);\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n const opacity = +style.opacity;\n return {\n delay,\n duration: is_function(duration) ? duration(d) : duration,\n easing,\n css: (t, u) => `\n\t\t\t\topacity: ${t * opacity};\n\t\t\t\ttransform-origin: top left;\n\t\t\t\ttransform: ${transform} translate(${u * dx}px,${u * dy}px) scale(${t + (1 - t) * dw}, ${t + (1 - t) * dh});\n\t\t\t`\n };\n }\n function transition(items, counterparts, intro) {\n return (node, params) => {\n items.set(params.key, {\n rect: node.getBoundingClientRect()\n });\n return () => {\n if (counterparts.has(params.key)) {\n const { rect } = counterparts.get(params.key);\n counterparts.delete(params.key);\n return crossfade(rect, node, params);\n }\n // if the node is disappearing altogether\n // (i.e. wasn't claimed by the other list)\n // then we need to supply an outro\n items.delete(params.key);\n return fallback && fallback(node, params, intro);\n };\n };\n }\n return [\n transition(to_send, to_receive, false),\n transition(to_receive, to_send, true)\n ];\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