Skip to content

Commit 7b3428a

Browse files
committed
Updates
1 parent e69a010 commit 7b3428a

17 files changed

+64
-24
lines changed

assets/Color-6VNJS4EI-DVp5d0l7.js renamed to assets/Color-6VNJS4EI-CsgT2jRk.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/DocsRenderer-NNNQARDV-BNxP2yvO.js renamed to assets/DocsRenderer-NNNQARDV-VeyEMvm7.js

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/WithTooltip-V3YHNWJZ-CbxjffEq.js renamed to assets/WithTooltip-V3YHNWJZ-DvyW6eYm.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/formatter-SWP5E3XI-hQPIcHj7.js renamed to assets/formatter-SWP5E3XI-5L0ssRRz.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/iframe-DH5MBqw2.js renamed to assets/iframe-BYJfVQvA.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/index-BQc1RlQh.js renamed to assets/index-Ce7pMi1j.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function __vite__mapDeps(indexes) {
22
if (!__vite__mapDeps.viteFileDeps) {
3-
__vite__mapDeps.viteFileDeps = ["./DocsRenderer-NNNQARDV-BNxP2yvO.js","./iframe-DH5MBqw2.js","./_commonjsHelpers-Cpj98o6Y.js","./_commonjs-dynamic-modules-TDtrdbi3.js","./index-pWxvJFOW.js","./index-DrFu-skq.js"]
3+
__vite__mapDeps.viteFileDeps = ["./DocsRenderer-NNNQARDV-VeyEMvm7.js","./iframe-BYJfVQvA.js","./_commonjsHelpers-Cpj98o6Y.js","./_commonjs-dynamic-modules-TDtrdbi3.js","./index-pWxvJFOW.js","./index-DrFu-skq.js"]
44
}
55
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
66
}
7-
import{_ as t}from"./iframe-DH5MBqw2.js";import"../sb-preview/runtime.js";var _={docs:{renderer:async()=>{let{DocsRenderer:r}=await t(()=>import("./DocsRenderer-NNNQARDV-BNxP2yvO.js").then(e=>e.D),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url);return new r}}};export{_ as parameters};
7+
import{_ as t}from"./iframe-BYJfVQvA.js";import"../sb-preview/runtime.js";var _={docs:{renderer:async()=>{let{DocsRenderer:r}=await t(()=>import("./DocsRenderer-NNNQARDV-VeyEMvm7.js").then(e=>e.D),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url);return new r}}};export{_ as parameters};

assets/stories-8Sjj62Nu.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/stories-BC4zeMLR.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

assets/stories-BqeXlCu6.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import{F as e}from"./from-file-UCacLlDS.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";const t=`import doc from "./doc.riv";
2+
import type { Rive } from "@rive-app/canvas-lite";
3+
class {
4+
declare rive: Rive;
5+
handleMounted(rive: Rive) {
6+
this.rive = rive;
7+
this.rive.play();
8+
}
9+
10+
trigger(index: number) {
11+
this.rive.stateMachineInputs("State Machine 1")[index].fire();
12+
}
13+
}
14+
15+
<rive-canvas src=doc stateMachines="State Machine 1" onMount("handleMounted")>
16+
<@canvas width=500 height=500 class="doc"/>
17+
</rive-canvas>
18+
19+
<div>
20+
<button onClick("trigger", 0)>
21+
Blink
22+
</button>
23+
<button onClick("trigger", 1)>
24+
Look Around
25+
</button>
26+
<button onClick("trigger", 2)>
27+
Adjust Glasses
28+
</button>
29+
</div>
30+
style {
31+
.doc {
32+
border: 1px solid black;
33+
width: 20rem;
34+
height: 20rem;
35+
}
36+
}
37+
`,r={title:"<rive-canvas>",component:e,parameters:{docs:{description:{component:`
38+
Use this component to render [Rive](https://rive.app/) animations in your Marko application.
39+
40+
By default, the asset is frozen in its initial state until you call \`.play()\` on the Rive object.
41+
`}}},argTypes:{src:{description:"The source of the `.riv` file to be displayed",table:{category:"Rive Parameters"}},stateMachines:{description:"string or list of strings detailing which state machines to render",table:{category:"Rive Parameters"}},otherRiveParamters:{name:"...RiveParameters",description:"All parameters available in [the RiveParameters object from `@rive/canvas-lite`](https://github.com/rive-app/rive-wasm/blob/3e048e4866310d0f890481f071290e4807cecf32/js/src/rive.ts#L1226-L1303) may be set as attributes of the main tag.",table:{category:"Rive Parameters"}},canvas:{name:"@canvas",description:"Contains any attributes required in the host `<canvas>` element",table:{category:"@attr tags"}},onLoad:{action:"on-load",description:"Triggered once the Rive asset has loaded",table:{category:"Events"}},onMount:{action:"on-mount",description:"Triggered when the component is mounted",table:{category:"Events"}}}},o={args:{},parameters:{docs:{source:{code:t,language:"marko"}}}};export{o as StateMachine,r as default};

0 commit comments

Comments
 (0)