1 line
7.0 KiB
JSON
1 line
7.0 KiB
JSON
|
|
{"ast":null,"code":"import _objectSpread from \"/Users/apple/Documents/cursor/Web\\u8BFE\\u4EF6/AI\\u8BFE/education_web_\\u591AAgent\\u534F\\u4F5C\\u7CFB\\u7EDF/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";\nimport { noop } from 'motion-utils';\nimport { addToQueue } from './queue.mjs';\nclass ViewTransitionBuilder {\n constructor(update) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.currentTarget = \"root\";\n this.targets = new Map();\n this.notifyReady = noop;\n this.readyPromise = new Promise(resolve => {\n this.notifyReady = resolve;\n });\n this.update = update;\n this.options = _objectSpread({\n interrupt: \"wait\"\n }, options);\n addToQueue(this);\n }\n get(selector) {\n this.currentTarget = selector;\n return this;\n }\n layout(keyframes, options) {\n this.updateTarget(\"layout\", keyframes, options);\n return this;\n }\n new(keyframes, options) {\n this.updateTarget(\"new\", keyframes, options);\n return this;\n }\n old(keyframes, options) {\n this.updateTarget(\"old\", keyframes, options);\n return this;\n }\n enter(keyframes, options) {\n this.updateTarget(\"enter\", keyframes, options);\n return this;\n }\n exit(keyframes, options) {\n this.updateTarget(\"exit\", keyframes, options);\n return this;\n }\n crossfade(options) {\n this.updateTarget(\"enter\", {\n opacity: 1\n }, options);\n this.updateTarget(\"exit\", {\n opacity: 0\n }, options);\n return this;\n }\n updateTarget(target, keyframes) {\n let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n const {\n currentTarget,\n targets\n } = this;\n if (!targets.has(currentTarget)) {\n targets.set(currentTarget, {});\n }\n const targetData = targets.get(currentTarget);\n targetData[target] = {\n keyframes,\n options\n };\n }\n then(resolve, reject) {\n return this.readyPromise.then(resolve, reject);\n }\n}\nfunction animateView(update) {\n let defaultOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new ViewTransitionBuilder(update, defaultOptions);\n}\nexport { ViewTransitionBuilder, animateView };","map":{"version":3,"names":["noop","addToQueue","ViewTransitionBuilder","constructor","update","options","arguments","length","undefined","currentTarget","targets","Map","notifyReady","readyPromise","Promise","resolve","_objectSpread","interrupt","get","selector","layout","keyframes","updateTarget","new","old","enter","exit","crossfade","opacity","target","has","set","targetData","then","reject","animateView","defaultOptions"],"sources":["/Users/apple/Documents/cursor/Web课件/AI课/education_web_多Agent协作系统/node_modules/motion-dom/dist/es/view/index.mjs"],"sourcesContent":["import { noop } from 'motion-utils';\nimport { addToQueue } from './queue.mjs';\n\nclass ViewTransitionBuilder {\n constructor(update, options = {}) {\n this.currentTarget = \"root\";\n this.targets = new Map();\n this.notifyReady = noop;\n this.readyPromise = new Promise((resolve) => {\n this.notifyReady = resolve;\n });\n this.update = update;\n this.options = {\n interrupt: \"wait\",\n ...options,\n };\n addToQueue(this);\n }\n get(selector) {\n this.currentTarget = selector;\n return this;\n }\n layout(keyframes, options) {\n this.updateTarget(\"layout\", keyframes, options);\n return this;\n }\n new(keyframes, options) {\n this.updateTarget(\"new\", keyframes, options);\n return this;\n }\n old(keyframes, options) {\n this.updateTarget(\"old\", keyframes, options);\n return this;\n }\n enter(keyframes, options) {\n this.updateTarget(\"enter\", keyframes, options);\n return this;\n }\n exit(keyframes, options) {\n this.updateTarget(\"exit\", keyframes, optio
|