[{"data":1,"prerenderedAt":1843},["ShallowReactive",2],{"navigation_docs":3,"i-nanime:logo":174,"-composables-composable-lifecycle":181,"-composables-composable-lifecycle-surround":1838},[4,20,90,115,150,164],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Getting Started",false,"\u002Fgetting-started","1.getting-started",[10,15],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction","i-ph-info",{"title":16,"path":17,"stem":18,"icon":19},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation","i-ph-download-simple",{"title":21,"icon":6,"path":22,"stem":23,"children":24,"page":6},"Composables","\u002Fcomposables","2.composables",[25,29,34,39,45,50,55,60,65,70,75,80,85],{"title":11,"path":26,"stem":27,"icon":28},"\u002Fcomposables\u002Fintroduction","2.composables\u002F0.introduction","i-ph-stack",{"title":30,"path":31,"stem":32,"icon":33},"useAnimate","\u002Fcomposables\u002Fuse-animate","2.composables\u002F1.use-animate","i-ph-play-circle",{"title":35,"path":36,"stem":37,"icon":38},"Composable lifecycle","\u002Fcomposables\u002Fcomposable-lifecycle","2.composables\u002F10.composable-lifecycle","i-ph-arrows-clockwise",{"title":40,"path":41,"stem":42,"icon":43,"badge":44},"useWaapiTimeline","\u002Fcomposables\u002Fuse-waapi-timeline","2.composables\u002F11.use-waapi-timeline","i-ph-flask","Experimental",{"title":46,"path":47,"stem":48,"icon":49},"useWaapiAnimate","\u002Fcomposables\u002Fuse-waapi-animate","2.composables\u002F2.use-waapi-animate","i-ph-lightning",{"title":51,"path":52,"stem":53,"icon":54},"useAnimatable","\u002Fcomposables\u002Fuse-animatable","2.composables\u002F3.use-animatable","i-ph-cube",{"title":56,"path":57,"stem":58,"icon":59},"useAnimeTimeline","\u002Fcomposables\u002Fuse-anime-timeline","2.composables\u002F4.use-anime-timeline","i-ph-list-numbers",{"title":61,"path":62,"stem":63,"icon":64},"useSplitText","\u002Fcomposables\u002Fuse-split-text","2.composables\u002F5.use-split-text","i-ph-text-t",{"title":66,"path":67,"stem":68,"icon":69},"useScrambleText","\u002Fcomposables\u002Fuse-scramble-text","2.composables\u002F6.use-scramble-text","i-ph-shuffle",{"title":71,"path":72,"stem":73,"icon":74},"useDraggable","\u002Fcomposables\u002Fuse-draggable","2.composables\u002F7.use-draggable","i-ph-hand-grabbing",{"title":76,"path":77,"stem":78,"icon":79},"useAnimeScroll","\u002Fcomposables\u002Fuse-anime-scroll","2.composables\u002F8.use-anime-scroll","i-ph-mouse-scroll",{"title":81,"path":82,"stem":83,"icon":84},"useAnimeLayout","\u002Fcomposables\u002Fuse-anime-layout","2.composables\u002F9.use-anime-layout","i-ph-layout",{"title":86,"path":87,"stem":88,"icon":89},"Utilities","\u002Fcomposables\u002Futilities","2.composables\u002F99.utilities","i-ph-puzzle-piece",{"title":91,"icon":6,"path":92,"stem":93,"children":94,"page":6},"Components","\u002Fcomponents","3.components",[95,100,105,110],{"title":96,"path":97,"stem":98,"icon":99},"Transition","\u002Fcomponents\u002Ftransition","3.components\u002F1.transition","i-ph-arrows-left-right",{"title":101,"path":102,"stem":103,"icon":104},"TransitionGroup","\u002Fcomponents\u002Ftransition-group","3.components\u002F2.transition-group","i-ph-list-dashes",{"title":106,"path":107,"stem":108,"icon":109},"Built-in styles","\u002Fcomponents\u002Ftransition-styles","3.components\u002F3.transition-styles","i-ph-palette",{"title":111,"path":112,"stem":113,"icon":114},"LayoutGroup","\u002Fcomponents\u002Flayout-group","3.components\u002F4.layout-group","i-ph-frame-corners",{"title":116,"icon":6,"path":117,"stem":118,"children":119,"page":6},"Guides","\u002Fguides","4.guides",[120,125,130,135,140,145],{"title":121,"path":122,"stem":123,"icon":124},"Configuration","\u002Fguides\u002Fconfiguration","4.guides\u002F1.configuration","i-ph-sliders-horizontal",{"title":126,"path":127,"stem":128,"icon":28,"badge":129},"Defaults","\u002Fguides\u002Fdefaults","4.guides\u002F2.defaults","New",{"title":131,"path":132,"stem":133,"icon":134,"badge":129},"Presets","\u002Fguides\u002Fpresets","4.guides\u002F3.presets","i-ph-magic-wand",{"title":136,"path":137,"stem":138,"icon":139},"Performance","\u002Fguides\u002Fperformance","4.guides\u002F4.performance","i-ph-gauge",{"title":141,"path":142,"stem":143,"icon":144},"Accessibility","\u002Fguides\u002Faccessibility","4.guides\u002F5.accessibility","i-ph-person-simple-circle",{"title":146,"path":147,"stem":148,"icon":149,"badge":129},"Vue without Nuxt","\u002Fguides\u002Fvue","4.guides\u002F6.vue","i-ph-browser",{"title":151,"icon":6,"path":152,"stem":153,"children":154,"page":6},"Comparisons","\u002Fcomparisons","5.comparisons",[155,160],{"title":156,"path":157,"stem":158,"icon":159},"Compared with Nuxt modules","\u002Fcomparisons\u002Fvs-nuxt-modules","5.comparisons\u002F1.vs-nuxt-modules","i-ph-scales",{"title":161,"path":162,"stem":163,"icon":159},"Compared with Vue packages","\u002Fcomparisons\u002Fvs-vue-packages","5.comparisons\u002F2.vs-vue-packages",{"title":165,"icon":6,"path":166,"stem":167,"children":168,"page":6},"Updates","\u002Fchanges","7.changes",[169],{"title":170,"path":171,"stem":172,"icon":173},"Changelog","\u002Fchanges\u002Fchangelog","7.changes\u002F1.changelog","i-ph-clock-counter-clockwise",{"left":175,"top":176,"width":177,"height":178,"rotate":179,"vFlip":6,"hFlip":6,"body":180},84,74,344,367,0,"\u003Cpath d=\"M124 401 V230 C124 144 186 114 256 114 C326 114 388 144 388 230 V304\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"80\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\u002F>\n  \u003Crect x=\"348\" y=\"358\" width=\"80\" height=\"80\" rx=\"12\" fill=\"#ff4b4b\"\u002F>",{"id":182,"title":35,"body":183,"description":1829,"extension":1830,"links":1831,"meta":1832,"navigation":1833,"path":36,"seo":1834,"stem":37,"__hash__":1837},"docs\u002F2.composables\u002F10.composable-lifecycle.md",{"type":184,"value":185,"toc":1811},"minimark",[186,201,206,218,223,243,273,290,424,438,442,447,467,619,623,644,736,747,751,766,770,791,798,867,875,1090,1120,1146,1150,1376,1379,1395,1399,1403,1415,1516,1519,1540,1544,1553,1657,1671,1675,1681,1807],[187,188,189,190,194,195,200],"p",{},"The nine AnimeJS composables share the same rules for building, rebuilding\nand tearing down their AnimeJS instance. Each\n",[191,192,193],"a",{"href":26},"composable page"," covers its own API. The\nexperimental ",[191,196,197],{"href":41},[198,199,40],"code",{}," never\nrebuilds, and its page covers when it builds.",[202,203,205],"h2",{"id":204},"where-you-can-call-a-composable","Where you can call a composable",[187,207,208,209,212,213,217],{},"Call a composable in ",[198,210,211],{},"setup()"," unless you have a reason not to. The\n",[191,214,216],{"href":215},"\u002Fcomposables\u002Fintroduction#choosing-a-composable","composables index"," marks\nwhich composables have Instant play and which are Buffered.",[219,220,222],"h3",{"id":221},"instant-play","Instant play",[187,224,225,226,228,229,231,232,235,236,239,240,242],{},"Composables with Instant play also work outside ",[198,227,211],{},", for example in\na click handler. There they build the animation on the next tick, or at the\nfirst playback call for ",[198,230,40],{},", and read ",[198,233,234],{},"parameters"," once, so later ",[198,237,238],{},"ref"," changes are ignored. Outside ",[198,241,211],{},"\nthere is no component to read from, so:",[244,245,246,260,266],"ul",{},[247,248,249,252,253,259],"li",{},[198,250,251],{},"app.config.ts"," defaults, ",[191,254,256],{"href":255},"\u002Fguides\u002Fdefaults#scope-defaults-to-part-of-the-app",[198,257,258],{},"provideAnimeDefaults()"," and presets do not apply.",[247,261,262,265],{},[198,263,264],{},"reducedMotion"," is not honored, so the animation always plays.",[247,267,268,269,272],{},"Nothing reverts the animation. Call ",[198,270,271],{},"revert()"," yourself, or each call stacks another animation on the same targets.",[187,274,275,276,278,279,282,283,285,286,289],{},"To keep reactivity, call the composable in ",[198,277,211],{}," and call ",[198,280,281],{},"play()"," on\nthe returned object from the handler. ",[198,284,30],{}," autoplays on mount, so\nset ",[198,287,288],{},"autoplay: false"," when the handler starts the animation:",[291,292,297],"pre",{"className":293,"code":294,"language":295,"meta":296,"style":296},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","const animation = useAnimate('.box', { opacity: [0, 1], autoplay: false })\n\nbutton.addEventListener('click', () => animation.play())\n","ts","",[198,298,299,377,384],{"__ignoreMap":296},[300,301,304,308,312,316,320,323,326,330,332,335,338,342,345,348,352,354,357,360,362,365,367,371,374],"span",{"class":302,"line":303},"line",1,[300,305,307],{"class":306},"spNyl","const",[300,309,311],{"class":310},"sTEyZ"," animation ",[300,313,315],{"class":314},"sMK4o","=",[300,317,319],{"class":318},"s2Zo4"," useAnimate",[300,321,322],{"class":310},"(",[300,324,325],{"class":314},"'",[300,327,329],{"class":328},"sfazB",".box",[300,331,325],{"class":314},[300,333,334],{"class":314},",",[300,336,337],{"class":314}," {",[300,339,341],{"class":340},"swJcz"," opacity",[300,343,344],{"class":314},":",[300,346,347],{"class":310}," [",[300,349,351],{"class":350},"sbssI","0",[300,353,334],{"class":314},[300,355,356],{"class":350}," 1",[300,358,359],{"class":310},"]",[300,361,334],{"class":314},[300,363,364],{"class":340}," autoplay",[300,366,344],{"class":314},[300,368,370],{"class":369},"sfNiH"," false",[300,372,373],{"class":314}," }",[300,375,376],{"class":310},")\n",[300,378,380],{"class":302,"line":379},2,[300,381,383],{"emptyLinePlaceholder":382},true,"\n",[300,385,387,390,393,396,398,400,403,405,407,410,413,416,418,421],{"class":302,"line":386},3,[300,388,389],{"class":310},"button",[300,391,392],{"class":314},".",[300,394,395],{"class":318},"addEventListener",[300,397,322],{"class":310},[300,399,325],{"class":314},[300,401,402],{"class":328},"click",[300,404,325],{"class":314},[300,406,334],{"class":314},[300,408,409],{"class":314}," ()",[300,411,412],{"class":306}," =>",[300,414,415],{"class":310}," animation",[300,417,392],{"class":314},[300,419,420],{"class":318},"play",[300,422,423],{"class":310},"())\n",[425,426,427,428,431,432,435,436,392],"note",{},"A top-level ",[198,429,430],{},"await"," in ",[198,433,434],{},"\u003Cscript setup>"," still counts as ",[198,437,211],{},[219,439,441],{"id":440},"buffered","Buffered",[187,443,444,445,344],{},"Buffered composables build their instance after the component mounts, so\nin ",[198,446,211],{},[244,448,449,452,462],{},[247,450,451],{},"A call to a method in the table below is queued and replayed in order\nonce the instance exists.",[247,453,454,455,458,459,392],{},"Any other method is ",[198,456,457],{},"undefined",", so calling it throws a ",[198,460,461],{},"TypeError",[247,463,464,465,392],{},"A property read gives ",[198,466,457],{},[468,469,470,484],"table",{},[471,472,473],"thead",{},[474,475,476,481],"tr",{},[477,478,480],"th",{"align":479},"left","Composable",[477,482,483],{"align":479},"Queued before mount",[485,486,487,560,593,608],"tbody",{},[474,488,489,494],{},[490,491,492],"td",{"align":479},[198,493,56],{},[490,495,496,499,500,499,503,499,506,499,509,499,512,499,515,499,518,499,521,524,525,499,527,499,530,499,533,499,536,499,539,499,542,499,545,499,548,499,551,499,554,499,557],{"align":479},[198,497,498],{},"add",", ",[198,501,502],{},"set",[198,504,505],{},"remove",[198,507,508],{},"call",[198,510,511],{},"label",[198,513,514],{},"sync",[198,516,517],{},"stretch",[198,519,520],{},"refresh",[198,522,523],{},"revert"," and the playback methods ",[198,526,420],{},[198,528,529],{},"pause",[198,531,532],{},"resume",[198,534,535],{},"restart",[198,537,538],{},"reset",[198,540,541],{},"reverse",[198,543,544],{},"alternate",[198,546,547],{},"seek",[198,549,550],{},"cancel",[198,552,553],{},"complete",[198,555,556],{},"init",[198,558,559],{},"resetTime",[474,561,562,566],{},[490,563,564],{"align":479},[198,565,71],{},[490,567,568,499,571,499,574,499,576,499,578,499,581,499,584,499,587,499,590],{"align":479},[198,569,570],{},"disable",[198,572,573],{},"enable",[198,575,538],{},[198,577,523],{},[198,579,580],{},"stop",[198,582,583],{},"setX",[198,585,586],{},"setY",[198,588,589],{},"scrollInView",[198,591,592],{},"animateInView",[474,594,595,599],{},[490,596,597],{"align":479},[198,598,76],{},[490,600,601,499,604,499,606],{"align":479},[198,602,603],{},"link",[198,605,520],{},[198,607,523],{},[474,609,610,614],{},[490,611,612],{"align":479},[198,613,81],{},[490,615,616],{"align":479},[198,617,618],{},"record",[219,620,622],{"id":621},"read-properties-after-mount","Read properties after mount",[187,624,625,499,627,629,630,632,633,636,637,640,641,344],{},[198,626,56],{},[198,628,71],{}," and ",[198,631,76],{}," build their\ninstance on the tick after the component mounts. Read properties after\n",[198,634,635],{},"await nextTick()"," inside ",[198,638,639],{},"onMounted",", or inside a callback such as\n",[198,642,643],{},"onDrag",[291,645,647],{"className":293,"code":646,"language":295,"meta":296,"style":296},"const draggable = useDraggable('.card')\n\nonMounted(async () => {\n  await nextTick()\n  console.log(draggable.x)\n})\n",[198,648,649,672,676,692,705,728],{"__ignoreMap":296},[300,650,651,653,656,658,661,663,665,668,670],{"class":302,"line":303},[300,652,307],{"class":306},[300,654,655],{"class":310}," draggable ",[300,657,315],{"class":314},[300,659,660],{"class":318}," useDraggable",[300,662,322],{"class":310},[300,664,325],{"class":314},[300,666,667],{"class":328},".card",[300,669,325],{"class":314},[300,671,376],{"class":310},[300,673,674],{"class":302,"line":379},[300,675,383],{"emptyLinePlaceholder":382},[300,677,678,680,682,685,687,689],{"class":302,"line":386},[300,679,639],{"class":318},[300,681,322],{"class":310},[300,683,684],{"class":306},"async",[300,686,409],{"class":314},[300,688,412],{"class":306},[300,690,691],{"class":314}," {\n",[300,693,695,699,702],{"class":302,"line":694},4,[300,696,698],{"class":697},"s7zQu","  await",[300,700,701],{"class":318}," nextTick",[300,703,704],{"class":340},"()\n",[300,706,708,711,713,716,718,721,723,726],{"class":302,"line":707},5,[300,709,710],{"class":310},"  console",[300,712,392],{"class":314},[300,714,715],{"class":318},"log",[300,717,322],{"class":340},[300,719,720],{"class":310},"draggable",[300,722,392],{"class":314},[300,724,725],{"class":310},"x",[300,727,376],{"class":340},[300,729,731,734],{"class":302,"line":730},6,[300,732,733],{"class":314},"}",[300,735,376],{"class":310},[425,737,738,740,741,743,744,392],{},[198,739,81],{}," builds during mount, so its members are ready inside\n",[198,742,639],{}," without ",[198,745,746],{},"nextTick()",[219,748,750],{"id":749},"composables-that-are-not-buffered","Composables that are not Buffered",[187,752,753,499,755,629,757,759,760,762,763,765],{},[198,754,30],{},[198,756,46],{},[198,758,66],{}," return an empty\nplaceholder until the component mounts, so a method called during\n",[198,761,211],{}," does nothing. ",[198,764,51],{}," has no setters until then, so\ncalling one throws.",[202,767,769],{"id":768},"know-when-an-animation-rebuilds","Know when an animation rebuilds",[187,771,772,773,779,780,783,784,787,788,790],{},"By default a rebuild reverts the old instance and builds a new one, so the\nanimation restarts. Set\n",[191,774,776],{"href":775},"\u002Fguides\u002Fconfiguration#set-module-options",[198,777,778],{},"rebuild"," to ",[198,781,782],{},"'keepTime'"," to\ncontinue from the playhead, or to ",[198,785,786],{},"'keepValue'"," (",[198,789,30],{}," only) to\ncancel the old instance and start from the current values.",[187,792,793,794,797],{},"Most composables rebuild when ",[198,795,796],{},"target"," or a parameter changes. Three differ:",[468,799,800,809],{},[471,801,802],{},[474,803,804,806],{},[477,805,480],{"align":479},[477,807,808],{"align":479},"Rebuilds when",[485,810,811,822,844],{},[474,812,813,817],{},[490,814,815],{"align":479},[198,816,51],{},[490,818,819,821],{"align":479},[198,820,796],{}," changes. Its options are read once.",[474,823,824,828],{},[490,825,826],{"align":479},[198,827,71],{},[490,829,830,832,833,836,837,840,841,843],{"align":479},[198,831,796],{}," or ",[198,834,835],{},"trigger"," changes. A new ",[198,838,839],{},"container"," or a ",[198,842,238],{}," in the listed options updates it in place.",[474,845,846,850],{},[490,847,848],{"align":479},[198,849,76],{},[490,851,852,832,854,856,857,860,861,863,864,866],{"align":479},[198,853,796],{},[198,855,839],{}," changes, or a field of its ",[198,858,859],{},"reactive()"," object changes. It takes a plain or ",[198,862,859],{}," object, not a ",[198,865,238],{}," or getter.",[219,868,870,871,874],{"id":869},"animate-items-added-to-a-v-for-list","Animate items added to a ",[198,872,873],{},"v-for"," list",[291,876,880],{"className":877,"code":878,"language":879,"meta":296,"style":296},"language-vue shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u003Cscript setup lang=\"ts\">\nconst items = ref([1, 2, 3])\nconst cards = useTemplateRef('cards')\n\nuseAnimate(cards, { y: -16, alternate: true, loop: true })\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Cdiv v-for=\"item in items\" :key=\"item\" ref=\"cards\" \u002F>\n\u003C\u002Ftemplate>\n","vue",[198,881,882,908,939,962,966,1011,1020,1025,1035,1081],{"__ignoreMap":296},[300,883,884,887,890,893,896,898,901,903,905],{"class":302,"line":303},[300,885,886],{"class":314},"\u003C",[300,888,889],{"class":340},"script",[300,891,892],{"class":306}," setup",[300,894,895],{"class":306}," lang",[300,897,315],{"class":314},[300,899,900],{"class":314},"\"",[300,902,295],{"class":328},[300,904,900],{"class":314},[300,906,907],{"class":314},">\n",[300,909,910,912,915,917,920,923,926,928,931,933,936],{"class":302,"line":379},[300,911,307],{"class":306},[300,913,914],{"class":310}," items ",[300,916,315],{"class":314},[300,918,919],{"class":318}," ref",[300,921,922],{"class":310},"([",[300,924,925],{"class":350},"1",[300,927,334],{"class":314},[300,929,930],{"class":350}," 2",[300,932,334],{"class":314},[300,934,935],{"class":350}," 3",[300,937,938],{"class":310},"])\n",[300,940,941,943,946,948,951,953,955,958,960],{"class":302,"line":386},[300,942,307],{"class":306},[300,944,945],{"class":310}," cards ",[300,947,315],{"class":314},[300,949,950],{"class":318}," useTemplateRef",[300,952,322],{"class":310},[300,954,325],{"class":314},[300,956,957],{"class":328},"cards",[300,959,325],{"class":314},[300,961,376],{"class":310},[300,963,964],{"class":302,"line":694},[300,965,383],{"emptyLinePlaceholder":382},[300,967,968,970,973,975,977,980,982,985,988,990,993,995,998,1000,1003,1005,1007,1009],{"class":302,"line":707},[300,969,30],{"class":318},[300,971,972],{"class":310},"(cards",[300,974,334],{"class":314},[300,976,337],{"class":314},[300,978,979],{"class":340}," y",[300,981,344],{"class":314},[300,983,984],{"class":314}," -",[300,986,987],{"class":350},"16",[300,989,334],{"class":314},[300,991,992],{"class":340}," alternate",[300,994,344],{"class":314},[300,996,997],{"class":369}," true",[300,999,334],{"class":314},[300,1001,1002],{"class":340}," loop",[300,1004,344],{"class":314},[300,1006,997],{"class":369},[300,1008,373],{"class":314},[300,1010,376],{"class":310},[300,1012,1013,1016,1018],{"class":302,"line":730},[300,1014,1015],{"class":314},"\u003C\u002F",[300,1017,889],{"class":340},[300,1019,907],{"class":314},[300,1021,1023],{"class":302,"line":1022},7,[300,1024,383],{"emptyLinePlaceholder":382},[300,1026,1028,1030,1033],{"class":302,"line":1027},8,[300,1029,886],{"class":314},[300,1031,1032],{"class":340},"template",[300,1034,907],{"class":314},[300,1036,1038,1041,1044,1047,1049,1051,1054,1056,1059,1061,1063,1066,1068,1070,1072,1074,1076,1078],{"class":302,"line":1037},9,[300,1039,1040],{"class":314},"  \u003C",[300,1042,1043],{"class":340},"div",[300,1045,1046],{"class":306}," v-for",[300,1048,315],{"class":314},[300,1050,900],{"class":314},[300,1052,1053],{"class":328},"item in items",[300,1055,900],{"class":314},[300,1057,1058],{"class":306}," :key",[300,1060,315],{"class":314},[300,1062,900],{"class":314},[300,1064,1065],{"class":328},"item",[300,1067,900],{"class":314},[300,1069,919],{"class":306},[300,1071,315],{"class":314},[300,1073,900],{"class":314},[300,1075,957],{"class":328},[300,1077,900],{"class":314},[300,1079,1080],{"class":314}," \u002F>\n",[300,1082,1084,1086,1088],{"class":302,"line":1083},10,[300,1085,1015],{"class":314},[300,1087,1032],{"class":340},[300,1089,907],{"class":314},[187,1091,1092,1093,1096,1097,1100,1101,499,1103,499,1105,499,1107,1109,1110,1112,1113,1115,1116,1119],{},"Adding to or removing from ",[198,1094,1095],{},"items"," rebuilds the animation with the new\nlist of cards. Pass the ref itself, not ",[198,1098,1099],{},"cards.value"," or a getter, to\n",[198,1102,30],{},[198,1104,46],{},[198,1106,51],{},[198,1108,66],{}," or\n",[198,1111,71],{},". ",[198,1114,56],{}," reads the targets of each ",[198,1117,1118],{},"add()"," once,\nwhen you call it.",[425,1121,1122,1123,1125,1126,1129,1130,1133,1134,1141,1142,1145],{},"Vue changes the array in ",[198,1124,1099],{}," in place, which no watcher can\ndetect. ",[198,1127,1128],{},"nanime"," makes that array ",[198,1131,1132],{},"shallowReactive()",", as Vue plans to do\nin ",[191,1135,1140],{"href":1136,"rel":1137,"target":1139},"https:\u002F\u002Fgithub.com\u002Fvuejs\u002Fcore\u002Fpull\u002F12733",[1138],"nofollow","_blank","vuejs\u002Fcore#12733",".\nCall ",[198,1143,1144],{},"toRaw(cards.value)"," where you need a plain array.",[219,1147,1149],{"id":1148},"read-changing-values-inside-callbacks","Read changing values inside callbacks",[291,1151,1154],{"className":877,"code":1152,"filename":1153,"language":879,"meta":296,"style":296},"\u003Cscript setup lang=\"ts\">\nconst props = defineProps\u003C{ onDone: () => void }>()\nconst toast = useTemplateRef('toast')\n\nuseAnimate(toast, () => ({\n  opacity: 0,\n  delay: 3000,\n  \u002F\u002F wrong: onComplete: props.onDone\n  onComplete: () => props.onDone(),\n}))\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003Cdiv ref=\"toast\">Saved\u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n","Toast.vue",[198,1155,1156,1176,1209,1231,1235,1253,1266,1278,1284,1308,1315,1324,1329,1338,1367],{"__ignoreMap":296},[300,1157,1158,1160,1162,1164,1166,1168,1170,1172,1174],{"class":302,"line":303},[300,1159,886],{"class":314},[300,1161,889],{"class":340},[300,1163,892],{"class":306},[300,1165,895],{"class":306},[300,1167,315],{"class":314},[300,1169,900],{"class":314},[300,1171,295],{"class":328},[300,1173,900],{"class":314},[300,1175,907],{"class":314},[300,1177,1178,1180,1183,1185,1188,1191,1194,1196,1198,1200,1204,1207],{"class":302,"line":379},[300,1179,307],{"class":306},[300,1181,1182],{"class":310}," props ",[300,1184,315],{"class":314},[300,1186,1187],{"class":318}," defineProps",[300,1189,1190],{"class":314},"\u003C{",[300,1192,1193],{"class":340}," onDone",[300,1195,344],{"class":314},[300,1197,409],{"class":314},[300,1199,412],{"class":306},[300,1201,1203],{"class":1202},"sBMFI"," void",[300,1205,1206],{"class":314}," }>",[300,1208,704],{"class":310},[300,1210,1211,1213,1216,1218,1220,1222,1224,1227,1229],{"class":302,"line":386},[300,1212,307],{"class":306},[300,1214,1215],{"class":310}," toast ",[300,1217,315],{"class":314},[300,1219,950],{"class":318},[300,1221,322],{"class":310},[300,1223,325],{"class":314},[300,1225,1226],{"class":328},"toast",[300,1228,325],{"class":314},[300,1230,376],{"class":310},[300,1232,1233],{"class":302,"line":694},[300,1234,383],{"emptyLinePlaceholder":382},[300,1236,1237,1239,1242,1244,1246,1248,1250],{"class":302,"line":707},[300,1238,30],{"class":318},[300,1240,1241],{"class":310},"(toast",[300,1243,334],{"class":314},[300,1245,409],{"class":314},[300,1247,412],{"class":306},[300,1249,787],{"class":310},[300,1251,1252],{"class":314},"{\n",[300,1254,1255,1258,1260,1263],{"class":302,"line":730},[300,1256,1257],{"class":340},"  opacity",[300,1259,344],{"class":314},[300,1261,1262],{"class":350}," 0",[300,1264,1265],{"class":314},",\n",[300,1267,1268,1271,1273,1276],{"class":302,"line":1022},[300,1269,1270],{"class":340},"  delay",[300,1272,344],{"class":314},[300,1274,1275],{"class":350}," 3000",[300,1277,1265],{"class":314},[300,1279,1280],{"class":302,"line":1027},[300,1281,1283],{"class":1282},"sHwdD","  \u002F\u002F wrong: onComplete: props.onDone\n",[300,1285,1286,1289,1291,1293,1295,1298,1300,1303,1306],{"class":302,"line":1037},[300,1287,1288],{"class":318},"  onComplete",[300,1290,344],{"class":314},[300,1292,409],{"class":314},[300,1294,412],{"class":306},[300,1296,1297],{"class":310}," props",[300,1299,392],{"class":314},[300,1301,1302],{"class":318},"onDone",[300,1304,1305],{"class":310},"()",[300,1307,1265],{"class":314},[300,1309,1310,1312],{"class":302,"line":1083},[300,1311,733],{"class":314},[300,1313,1314],{"class":310},"))\n",[300,1316,1318,1320,1322],{"class":302,"line":1317},11,[300,1319,1015],{"class":314},[300,1321,889],{"class":340},[300,1323,907],{"class":314},[300,1325,1327],{"class":302,"line":1326},12,[300,1328,383],{"emptyLinePlaceholder":382},[300,1330,1332,1334,1336],{"class":302,"line":1331},13,[300,1333,886],{"class":314},[300,1335,1032],{"class":340},[300,1337,907],{"class":314},[300,1339,1341,1343,1345,1347,1349,1351,1353,1355,1358,1361,1363,1365],{"class":302,"line":1340},14,[300,1342,1040],{"class":314},[300,1344,1043],{"class":340},[300,1346,919],{"class":306},[300,1348,315],{"class":314},[300,1350,900],{"class":314},[300,1352,1226],{"class":328},[300,1354,900],{"class":314},[300,1356,1357],{"class":314},">",[300,1359,1360],{"class":310},"Saved",[300,1362,1015],{"class":314},[300,1364,1043],{"class":340},[300,1366,907],{"class":314},[300,1368,1370,1372,1374],{"class":302,"line":1369},15,[300,1371,1015],{"class":314},[300,1373,1032],{"class":340},[300,1375,907],{"class":314},[187,1377,1378],{},"Changing only a callback does not rebuild the animation, so read changing\nvalues inside it.",[425,1380,1381,1382,1384,1385,1388,1389,1391,1392,392],{},"Two composables do rebuild on a callback change: ",[198,1383,46],{}," on any\nfunction except ",[198,1386,1387],{},"onComplete",", and ",[198,1390,66],{}," on callbacks in\n",[198,1393,1394],{},"scrambleOptions",[202,1396,1398],{"id":1397},"avoid-common-mistakes","Avoid common mistakes",[219,1400,1402],{"id":1401},"do-not-destructure-the-returned-instance","Do not destructure the returned instance",[187,1404,1405,1406,499,1408,499,1410,1412,1413,392],{},"Applies to ",[198,1407,30],{},[198,1409,46],{},[198,1411,51],{}," and\n",[198,1414,66],{},[291,1416,1418],{"className":293,"code":1417,"language":295,"meta":296,"style":296},"\u002F\u002F wrong: play() throws when called\nconst { play } = useAnimate('.target', { opacity: 0 })\n\n\u002F\u002F right\nconst animation = useAnimate('.target', { opacity: 0 })\nanimation.play()\n",[198,1419,1420,1425,1464,1468,1473,1505],{"__ignoreMap":296},[300,1421,1422],{"class":302,"line":303},[300,1423,1424],{"class":1282},"\u002F\u002F wrong: play() throws when called\n",[300,1426,1427,1429,1431,1434,1436,1439,1441,1443,1445,1448,1450,1452,1454,1456,1458,1460,1462],{"class":302,"line":379},[300,1428,307],{"class":306},[300,1430,337],{"class":314},[300,1432,1433],{"class":310}," play ",[300,1435,733],{"class":314},[300,1437,1438],{"class":314}," =",[300,1440,319],{"class":318},[300,1442,322],{"class":310},[300,1444,325],{"class":314},[300,1446,1447],{"class":328},".target",[300,1449,325],{"class":314},[300,1451,334],{"class":314},[300,1453,337],{"class":314},[300,1455,341],{"class":340},[300,1457,344],{"class":314},[300,1459,1262],{"class":350},[300,1461,373],{"class":314},[300,1463,376],{"class":310},[300,1465,1466],{"class":302,"line":386},[300,1467,383],{"emptyLinePlaceholder":382},[300,1469,1470],{"class":302,"line":694},[300,1471,1472],{"class":1282},"\u002F\u002F right\n",[300,1474,1475,1477,1479,1481,1483,1485,1487,1489,1491,1493,1495,1497,1499,1501,1503],{"class":302,"line":707},[300,1476,307],{"class":306},[300,1478,311],{"class":310},[300,1480,315],{"class":314},[300,1482,319],{"class":318},[300,1484,322],{"class":310},[300,1486,325],{"class":314},[300,1488,1447],{"class":328},[300,1490,325],{"class":314},[300,1492,334],{"class":314},[300,1494,337],{"class":314},[300,1496,341],{"class":340},[300,1498,344],{"class":314},[300,1500,1262],{"class":350},[300,1502,373],{"class":314},[300,1504,376],{"class":310},[300,1506,1507,1510,1512,1514],{"class":302,"line":730},[300,1508,1509],{"class":310},"animation",[300,1511,392],{"class":314},[300,1513,420],{"class":318},[300,1515,704],{"class":310},[187,1517,1518],{},"Destructured properties and setters break too:",[244,1520,1521,1528],{},[247,1522,1523,1524,1527],{},"A property such as ",[198,1525,1526],{},"progress"," is copied once and never updates.",[247,1529,1530,1531,1533,1534,1536,1537,1539],{},"A ",[198,1532,51],{}," setter such as ",[198,1535,725],{}," keeps working, but after ",[198,1538,796],{},"\nchanges it still animates the old target.",[219,1541,1543],{"id":1542},"properties-do-not-update-templates","Properties do not update templates",[187,1545,1546,1547,1549,1550,1552],{},"Applies to every composable except ",[198,1548,61],{},", which returns refs, and\n",[198,1551,51],{},", which returns setters.",[291,1554,1556],{"className":293,"code":1555,"language":295,"meta":296,"style":296},"const progress = ref(0)\nconst animation = useAnimate('.target', {\n  opacity: [0, 1],\n  \u002F\u002F wrong: {{ animation.progress }}\n  onUpdate: self => progress.value = self.progress,\n})\n",[198,1557,1558,1575,1597,1615,1620,1651],{"__ignoreMap":296},[300,1559,1560,1562,1565,1567,1569,1571,1573],{"class":302,"line":303},[300,1561,307],{"class":306},[300,1563,1564],{"class":310}," progress ",[300,1566,315],{"class":314},[300,1568,919],{"class":318},[300,1570,322],{"class":310},[300,1572,351],{"class":350},[300,1574,376],{"class":310},[300,1576,1577,1579,1581,1583,1585,1587,1589,1591,1593,1595],{"class":302,"line":379},[300,1578,307],{"class":306},[300,1580,311],{"class":310},[300,1582,315],{"class":314},[300,1584,319],{"class":318},[300,1586,322],{"class":310},[300,1588,325],{"class":314},[300,1590,1447],{"class":328},[300,1592,325],{"class":314},[300,1594,334],{"class":314},[300,1596,691],{"class":314},[300,1598,1599,1601,1603,1605,1607,1609,1611,1613],{"class":302,"line":386},[300,1600,1257],{"class":340},[300,1602,344],{"class":314},[300,1604,347],{"class":310},[300,1606,351],{"class":350},[300,1608,334],{"class":314},[300,1610,356],{"class":350},[300,1612,359],{"class":310},[300,1614,1265],{"class":314},[300,1616,1617],{"class":302,"line":694},[300,1618,1619],{"class":1282},"  \u002F\u002F wrong: {{ animation.progress }}\n",[300,1621,1622,1625,1627,1631,1633,1636,1638,1641,1643,1645,1647,1649],{"class":302,"line":707},[300,1623,1624],{"class":318},"  onUpdate",[300,1626,344],{"class":314},[300,1628,1630],{"class":1629},"sHdIc"," self",[300,1632,412],{"class":306},[300,1634,1635],{"class":310}," progress",[300,1637,392],{"class":314},[300,1639,1640],{"class":310},"value ",[300,1642,315],{"class":314},[300,1644,1630],{"class":310},[300,1646,392],{"class":314},[300,1648,1526],{"class":310},[300,1650,1265],{"class":314},[300,1652,1653,1655],{"class":302,"line":730},[300,1654,733],{"class":314},[300,1656,376],{"class":310},[425,1658,1659,1661,1662,1665,1666,1670],{},[198,1660,46],{}," has no ",[198,1663,1664],{},"onUpdate",". Use\n",[191,1667,1668],{"href":31},[198,1669,30],{}," when a template needs live\nprogress.",[219,1672,1674],{"id":1673},"plain-object-targets-must-be-reactive","Plain object targets must be reactive",[187,1676,1405,1677,629,1679,392],{},[198,1678,30],{},[198,1680,51],{},[291,1682,1684],{"className":293,"code":1683,"language":295,"meta":296,"style":296},"\u002F\u002F AnimeJS writes to a plain object directly, so Vue never sees the change\nconst position = { x: 0, y: 0 }\nuseAnimate(position, { x: 100 })\n\n\u002F\u002F reactive(), shallowReactive() and ref() work, a shallowRef holding an object does not\nconst tracked = reactive({ x: 0, y: 0 })\nuseAnimate(tracked, { x: 100 })\n",[198,1685,1686,1691,1720,1742,1746,1751,1786],{"__ignoreMap":296},[300,1687,1688],{"class":302,"line":303},[300,1689,1690],{"class":1282},"\u002F\u002F AnimeJS writes to a plain object directly, so Vue never sees the change\n",[300,1692,1693,1695,1698,1700,1702,1705,1707,1709,1711,1713,1715,1717],{"class":302,"line":379},[300,1694,307],{"class":306},[300,1696,1697],{"class":310}," position ",[300,1699,315],{"class":314},[300,1701,337],{"class":314},[300,1703,1704],{"class":340}," x",[300,1706,344],{"class":314},[300,1708,1262],{"class":350},[300,1710,334],{"class":314},[300,1712,979],{"class":340},[300,1714,344],{"class":314},[300,1716,1262],{"class":350},[300,1718,1719],{"class":314}," }\n",[300,1721,1722,1724,1727,1729,1731,1733,1735,1738,1740],{"class":302,"line":386},[300,1723,30],{"class":318},[300,1725,1726],{"class":310},"(position",[300,1728,334],{"class":314},[300,1730,337],{"class":314},[300,1732,1704],{"class":340},[300,1734,344],{"class":314},[300,1736,1737],{"class":350}," 100",[300,1739,373],{"class":314},[300,1741,376],{"class":310},[300,1743,1744],{"class":302,"line":694},[300,1745,383],{"emptyLinePlaceholder":382},[300,1747,1748],{"class":302,"line":707},[300,1749,1750],{"class":1282},"\u002F\u002F reactive(), shallowReactive() and ref() work, a shallowRef holding an object does not\n",[300,1752,1753,1755,1758,1760,1763,1765,1768,1770,1772,1774,1776,1778,1780,1782,1784],{"class":302,"line":730},[300,1754,307],{"class":306},[300,1756,1757],{"class":310}," tracked ",[300,1759,315],{"class":314},[300,1761,1762],{"class":318}," reactive",[300,1764,322],{"class":310},[300,1766,1767],{"class":314},"{",[300,1769,1704],{"class":340},[300,1771,344],{"class":314},[300,1773,1262],{"class":350},[300,1775,334],{"class":314},[300,1777,979],{"class":340},[300,1779,344],{"class":314},[300,1781,1262],{"class":350},[300,1783,373],{"class":314},[300,1785,376],{"class":310},[300,1787,1788,1790,1793,1795,1797,1799,1801,1803,1805],{"class":302,"line":1022},[300,1789,30],{"class":318},[300,1791,1792],{"class":310},"(tracked",[300,1794,334],{"class":314},[300,1796,337],{"class":314},[300,1798,1704],{"class":340},[300,1800,344],{"class":314},[300,1802,1737],{"class":350},[300,1804,373],{"class":314},[300,1806,376],{"class":310},[1808,1809,1810],"style",{},"html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}",{"title":296,"searchDepth":379,"depth":379,"links":1812},[1813,1819,1824],{"id":204,"depth":379,"text":205,"children":1814},[1815,1816,1817,1818],{"id":221,"depth":386,"text":222},{"id":440,"depth":386,"text":441},{"id":621,"depth":386,"text":622},{"id":749,"depth":386,"text":750},{"id":768,"depth":379,"text":769,"children":1820},[1821,1823],{"id":869,"depth":386,"text":1822},"Animate items added to a v-for list",{"id":1148,"depth":386,"text":1149},{"id":1397,"depth":379,"text":1398,"children":1825},[1826,1827,1828],{"id":1401,"depth":386,"text":1402},{"id":1542,"depth":386,"text":1543},{"id":1673,"depth":386,"text":1674},"Where a nanime composable builds, when it rebuilds, and the caveats that apply across all of them.","md",null,{},{"icon":38},{"title":1835,"description":1836},"How nanime composables build and rebuild in Nuxt","Where each nanime composable builds, when it rebuilds, and the caveats that apply across the nine AnimeJS composables.","aQvWoISWmUONvkq_u9yj26q5lagrzbMC7fuxuZxfz8s",[1839,1841],{"title":30,"path":31,"stem":32,"description":1840,"icon":33,"children":-1},"Animate CSS properties, transforms, SVG and JS objects with AnimeJS animate().",{"title":40,"path":41,"stem":42,"description":1842,"icon":43,"badge":44,"children":-1},"Run sequenced CSS tweens on the browser's native Web Animations clock.",1794941724775]