@wise/art 2.24.4 → 2.24.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/rive/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../../src/rive/RiveIllustration.tsx"],"sourcesContent":["import { useRive } from \"@rive-app/react-
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../src/rive/RiveIllustration.tsx"],"sourcesContent":["import { useRive } from \"@rive-app/react-webgl2\";\nimport clsx from \"clsx\";\nimport { useEffect, useState } from \"react\";\n\nimport { Sizes } from \"../common\";\nimport type { Illustration3DProps } from \"../illustrations3d\";\n\nexport interface RiveProps {\n src: string;\n animationNames?: string | string[];\n}\n\nconst Rive = ({ src, animationNames }: RiveProps) => {\n const { RiveComponent } = useRive({\n src,\n animations: animationNames,\n autoplay: true,\n });\n\n return (<RiveComponent />);\n};\n\nexport type Props = {\n name: 'document-scan';\n size?: Illustration3DProps[\"size\"];\n className?: Illustration3DProps[\"className\"];\n};\n\nconst RiveIllustrationExperimental = ({ name, size: sizeProp = Sizes.MEDIUM, className }: Props) => {\n const [size, setSize] = useState<Props['size']>(sizeProp);\n useEffect(() => {\n const isMobile: boolean =\n (typeof window !== \"undefined\" && window?.matchMedia('(max-width: 575px)')?.matches) ?? false;\n if (isMobile) {\n setSize(Sizes.SMALL);\n }\n }, []);\n return (\n <div className={clsx('wds-illustration-rive', `wds-illustration-rive-${name}`, `wds-illustration-rive-${size}`, className)}>\n {(() => {\n if (name === 'document-scan') {\n return (\n <Rive\n src=\"https://wise.com/web-art/assets/illustrations3d/rive/doc-scan.riv\"\n animationNames={[\"Scan Line Appearing\", \"Scan Line Moving\"]}\n />);\n }\n return null;\n })()}\n </div>\n );\n};\n\nexport default RiveIllustrationExperimental;\n"],"names":["Rive","src","animationNames","RiveComponent","useRive","animations","autoplay","_jsx","RiveIllustrationExperimental","name","size","sizeProp","Sizes","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AC5D;AACN,MAAA;AACA,MAAA,OAAO,IAAI;AACb,IAAA,CAAC;AAAG,GACD,CAAC;AAEV;;;;"}
|
package/dist/rive/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var reactWebgl2 = require('@rive-app/react-webgl2');
|
|
4
4
|
var clsx = require('clsx');
|
|
5
5
|
var react = require('react');
|
|
6
6
|
var common = require('../common-H4L6Hbbh.js');
|
|
@@ -16,7 +16,7 @@ const Rive = ({
|
|
|
16
16
|
}) => {
|
|
17
17
|
const {
|
|
18
18
|
RiveComponent
|
|
19
|
-
} =
|
|
19
|
+
} = reactWebgl2.useRive({
|
|
20
20
|
src,
|
|
21
21
|
animations: animationNames,
|
|
22
22
|
autoplay: true
|
package/dist/rive/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/rive/RiveIllustration.tsx"],"sourcesContent":["import { useRive } from \"@rive-app/react-
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/rive/RiveIllustration.tsx"],"sourcesContent":["import { useRive } from \"@rive-app/react-webgl2\";\nimport clsx from \"clsx\";\nimport { useEffect, useState } from \"react\";\n\nimport { Sizes } from \"../common\";\nimport type { Illustration3DProps } from \"../illustrations3d\";\n\nexport interface RiveProps {\n src: string;\n animationNames?: string | string[];\n}\n\nconst Rive = ({ src, animationNames }: RiveProps) => {\n const { RiveComponent } = useRive({\n src,\n animations: animationNames,\n autoplay: true,\n });\n\n return (<RiveComponent />);\n};\n\nexport type Props = {\n name: 'document-scan';\n size?: Illustration3DProps[\"size\"];\n className?: Illustration3DProps[\"className\"];\n};\n\nconst RiveIllustrationExperimental = ({ name, size: sizeProp = Sizes.MEDIUM, className }: Props) => {\n const [size, setSize] = useState<Props['size']>(sizeProp);\n useEffect(() => {\n const isMobile: boolean =\n (typeof window !== \"undefined\" && window?.matchMedia('(max-width: 575px)')?.matches) ?? false;\n if (isMobile) {\n setSize(Sizes.SMALL);\n }\n }, []);\n return (\n <div className={clsx('wds-illustration-rive', `wds-illustration-rive-${name}`, `wds-illustration-rive-${size}`, className)}>\n {(() => {\n if (name === 'document-scan') {\n return (\n <Rive\n src=\"https://wise.com/web-art/assets/illustrations3d/rive/doc-scan.riv\"\n animationNames={[\"Scan Line Appearing\", \"Scan Line Moving\"]}\n />);\n }\n return null;\n })()}\n </div>\n );\n};\n\nexport default RiveIllustrationExperimental;\n"],"names":["Rive","src","animationNames","RiveComponent","useRive","animations","autoplay","_jsx","RiveIllustrationExperimental","name","size","sizeProp","Sizes","MEDIUM","className","setSize","useState","useEffect","isMobile","window","matchMedia","matches","SMALL","clsx","children"],"mappings":";;;;;;;;;;;;AAYA,MAAMA,IAAI,GAAGA,CAAC;EAAEC,GAAG;AAAEC,EAAAA;AAAc,CAAa,KAAI;EAClD,MAAM;AAAEC,IAAAA;GAAe,GAAGC,mBAAO,CAAC;IAChCH,GAAG;AACHI,IAAAA,UAAU,EAAEH,cAAc;AAC1BI,IAAAA,QAAQ,EAAE;AACX,GAAA,CAAC;AAEF,EAAA,oBAAQC,cAAA,CAACJ,aAAa,EAAA,EAAA,CAAG;AAC3B,CAAC;AAQD,MAAMK,4BAA4B,GAAGA,CAAC;EAAEC,IAAI;AAAEC,EAAAA,IAAI,EAAEC,QAAQ,GAAGC,YAAK,CAACC,MAAM;AAAEC,EAAAA;AAAS,CAAS,KAAI;EACjG,MAAM,CAACJ,IAAI,EAAEK,OAAO,CAAC,GAAGC,cAAQ,CAAgBL,QAAQ,CAAC;AACzDM,EAAAA,eAAS,CAAC,MAAK;AACb,IAAA,MAAMC,QAAQ,GACZ,CAAC,OAAOC,MAAM,KAAK,WAAW,IAAIA,MAAM,EAAEC,UAAU,CAAC,oBAAoB,CAAC,EAAEC,OAAO,KAAK,KAAK;AAC/F,IAAA,IAAIH,QAAQ,EAAE;AACZH,MAAAA,OAAO,CAACH,YAAK,CAACU,KAAK,CAAC;AACtB,IAAA;EACF,CAAC,EAAE,EAAE,CAAC;AACN,EAAA,oBACEf,cAAA,CAAA,KAAA,EAAA;IAAKO,SAAS,EAAES,qBAAI,CAAA,CAAA,4CAAA,EAAmDd,IAAI,0BAA6BC,IAAI,CAAA,CAAA,EAAII,SAAS,CAAE;IAAAU,QAAA,EACxH,CAAC,MAAK;MACL,IAAIf,IAAI,KAAK,eAAe,EAAE;QAC5B,oBACEF,cAAA,CAACP,IAAI,EAAA;AACHC,UAAAA,GAAG,EAAC,mEAAmE;AACvEC,UAAAA,cAAc,EAAE,CAAC,qBAAqB,EAAE,kBAAkB;AAAE,SAAA,CAC5D;AACN,MAAA;AACA,MAAA,OAAO,IAAI;AACb,IAAA,CAAC;AAAG,GACD,CAAC;AAEV;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wise/art",
|
|
3
|
-
"version": "2.24.
|
|
3
|
+
"version": "2.24.5",
|
|
4
4
|
"packageManager": "pnpm@10.14.0+sha512.ad27a79641b49c3e481a16a805baa71817a04bbe06a38d17e60e2eaee83f6a146c6a688125f5792e48dd5ba30e7da52a5cda4c3992b9ccf333f9ce223af84748",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "React library for art elements in UI",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@babel/runtime": "^7.28.3",
|
|
50
50
|
"@react-three/drei": "9.122.0",
|
|
51
51
|
"@react-three/fiber": "8.18.0",
|
|
52
|
-
"@rive-app/react-
|
|
52
|
+
"@rive-app/react-webgl2": "^4.23.1",
|
|
53
53
|
"@types/three": "0.164.0",
|
|
54
54
|
"clsx": "^2.1.1",
|
|
55
55
|
"three": "0.164.0"
|