@wise/art 2.24.0-beta.3 → 2.24.0-beta.4

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/index.esm.js CHANGED
@@ -1,23 +1,6 @@
1
- 'use strict';
2
-
3
- var index = require('./index-BMneuETC.js');
4
- var common = require('./common-H4L6Hbbh.js');
5
- require('clsx');
6
- require('react');
7
- require('react/jsx-runtime');
8
-
9
-
10
-
11
- Object.defineProperty(exports, "Assets", {
12
- enumerable: true,
13
- get: function () { return index.Assets; }
14
- });
15
- exports.Flag = index.Flag;
16
- exports.Illustration = index.Illustration;
17
- exports.Illustration3D = index.Illustration3D;
18
- exports.isIllustrationSupport3D = index.isIllustrationSupport3D;
19
- Object.defineProperty(exports, "Sizes", {
20
- enumerable: true,
21
- get: function () { return common.Sizes; }
22
- });
1
+ export { A as Assets, F as Flag, I as Illustration, a as Illustration3D, i as isIllustrationSupport3D } from './index-CNsYMQ0g.esm.js';
2
+ export { S as Sizes } from './common-DBpCdW70.esm.js';
3
+ import 'clsx';
4
+ import 'react';
5
+ import 'react/jsx-runtime';
23
6
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
package/dist/index.js ADDED
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-BMneuETC.js');
4
+ var common = require('./common-H4L6Hbbh.js');
5
+ require('clsx');
6
+ require('react');
7
+ require('react/jsx-runtime');
8
+
9
+
10
+
11
+ Object.defineProperty(exports, "Assets", {
12
+ enumerable: true,
13
+ get: function () { return index.Assets; }
14
+ });
15
+ exports.Flag = index.Flag;
16
+ exports.Illustration = index.Illustration;
17
+ exports.Illustration3D = index.Illustration3D;
18
+ exports.isIllustrationSupport3D = index.isIllustrationSupport3D;
19
+ Object.defineProperty(exports, "Sizes", {
20
+ enumerable: true,
21
+ get: function () { return common.Sizes; }
22
+ });
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
package/dist/rive.esm.js CHANGED
@@ -1,14 +1,8 @@
1
- 'use strict';
2
-
3
- var reactCanvasLite = require('@rive-app/react-canvas-lite');
4
- var clsx = require('clsx');
5
- var react = require('react');
6
- var common = require('./common-H4L6Hbbh.js');
7
- var jsxRuntime = require('react/jsx-runtime');
8
-
9
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
-
11
- var clsx__default = /*#__PURE__*/_interopDefault(clsx);
1
+ import { useRive } from '@rive-app/react-canvas-lite';
2
+ import clsx from 'clsx';
3
+ import { useState, useEffect } from 'react';
4
+ import { S as Sizes } from './common-DBpCdW70.esm.js';
5
+ import { jsx } from 'react/jsx-runtime';
12
6
 
13
7
  const Rive = ({
14
8
  src,
@@ -16,30 +10,30 @@ const Rive = ({
16
10
  }) => {
17
11
  const {
18
12
  RiveComponent
19
- } = reactCanvasLite.useRive({
13
+ } = useRive({
20
14
  src,
21
15
  animations: animationNames,
22
16
  autoplay: true
23
17
  });
24
- return /*#__PURE__*/jsxRuntime.jsx(RiveComponent, {});
18
+ return /*#__PURE__*/jsx(RiveComponent, {});
25
19
  };
26
20
  const RiveIllustrationExperimental = ({
27
21
  name,
28
- size: sizeProp = common.Sizes.MEDIUM,
22
+ size: sizeProp = Sizes.MEDIUM,
29
23
  className
30
24
  }) => {
31
- const [size, setSize] = react.useState(sizeProp);
32
- react.useEffect(() => {
25
+ const [size, setSize] = useState(sizeProp);
26
+ useEffect(() => {
33
27
  const isMobile = (typeof window !== "undefined" && window?.matchMedia('(max-width: 575px)')?.matches) ?? false;
34
28
  if (isMobile) {
35
- setSize(common.Sizes.SMALL);
29
+ setSize(Sizes.SMALL);
36
30
  }
37
31
  }, []);
38
- return /*#__PURE__*/jsxRuntime.jsx("div", {
39
- className: clsx__default.default(`wds-illustration-rive wds-illustration-rive-${name} wds-illustration-rive-${size}`, className),
32
+ return /*#__PURE__*/jsx("div", {
33
+ className: clsx(`wds-illustration-rive wds-illustration-rive-${name} wds-illustration-rive-${size}`, className),
40
34
  children: (() => {
41
35
  if (name === 'document-scan') {
42
- return /*#__PURE__*/jsxRuntime.jsx(Rive, {
36
+ return /*#__PURE__*/jsx(Rive, {
43
37
  src: "https://wise.com/web-art/assets/illustrations3d/rive/doc-scan.riv",
44
38
  animationNames: ["Scan Line Appearing", "Scan Line Moving"]
45
39
  });
@@ -49,5 +43,5 @@ const RiveIllustrationExperimental = ({
49
43
  });
50
44
  };
51
45
 
52
- exports.RiveIllustrationExperimental = RiveIllustrationExperimental;
46
+ export { RiveIllustrationExperimental };
53
47
  //# sourceMappingURL=rive.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rive.esm.js","sources":["../src/rive/RiveIllustration.tsx"],"sourcesContent":["import { useRive } from \"@rive-app/react-canvas-lite\";\nimport clsx from \"clsx\";\nimport { useEffect, useState } from \"react\";\n\nimport { Sizes } from \"../common\";\nimport type { Illustration3DProps } from \".\";\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} & Pick<Illustration3DProps, \"size\" | \"className\">;\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,uBAAO,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;AAMD,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;;;;"}
1
+ {"version":3,"file":"rive.esm.js","sources":["../src/rive/RiveIllustration.tsx"],"sourcesContent":["import { useRive } from \"@rive-app/react-canvas-lite\";\nimport clsx from \"clsx\";\nimport { useEffect, useState } from \"react\";\n\nimport { Sizes } from \"../common\";\nimport type { Illustration3DProps } from \".\";\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} & Pick<Illustration3DProps, \"size\" | \"className\">;\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,OAAO,CAAC;IAChCH,GAAG;AACHI,IAAAA,UAAU,EAAEH,cAAc;AAC1BI,IAAAA,QAAQ,EAAE;AACX,GAAA,CAAC;AAEF,EAAA,oBAAQC,GAAA,CAACJ,aAAa,EAAA,EAAA,CAAG;AAC3B,CAAC;AAMD,MAAMK,4BAA4B,GAAGA,CAAC;EAAEC,IAAI;AAAEC,EAAAA,IAAI,EAAEC,QAAQ,GAAGC,KAAK,CAACC,MAAM;AAAEC,EAAAA;AAAS,CAAS,KAAI;EACjG,MAAM,CAACJ,IAAI,EAAEK,OAAO,CAAC,GAAGC,QAAQ,CAAgBL,QAAQ,CAAC;AACzDM,EAAAA,SAAS,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,KAAK,CAACU,KAAK,CAAC;AACtB,IAAA;EACF,CAAC,EAAE,EAAE,CAAC;AACN,EAAA,oBACEf,GAAA,CAAA,KAAA,EAAA;IAAKO,SAAS,EAAES,IAAI,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,GAAA,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/dist/rive.js ADDED
@@ -0,0 +1,53 @@
1
+ 'use strict';
2
+
3
+ var reactCanvasLite = require('@rive-app/react-canvas-lite');
4
+ var clsx = require('clsx');
5
+ var react = require('react');
6
+ var common = require('./common-H4L6Hbbh.js');
7
+ var jsxRuntime = require('react/jsx-runtime');
8
+
9
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
+
11
+ var clsx__default = /*#__PURE__*/_interopDefault(clsx);
12
+
13
+ const Rive = ({
14
+ src,
15
+ animationNames
16
+ }) => {
17
+ const {
18
+ RiveComponent
19
+ } = reactCanvasLite.useRive({
20
+ src,
21
+ animations: animationNames,
22
+ autoplay: true
23
+ });
24
+ return /*#__PURE__*/jsxRuntime.jsx(RiveComponent, {});
25
+ };
26
+ const RiveIllustrationExperimental = ({
27
+ name,
28
+ size: sizeProp = common.Sizes.MEDIUM,
29
+ className
30
+ }) => {
31
+ const [size, setSize] = react.useState(sizeProp);
32
+ react.useEffect(() => {
33
+ const isMobile = (typeof window !== "undefined" && window?.matchMedia('(max-width: 575px)')?.matches) ?? false;
34
+ if (isMobile) {
35
+ setSize(common.Sizes.SMALL);
36
+ }
37
+ }, []);
38
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
39
+ className: clsx__default.default(`wds-illustration-rive wds-illustration-rive-${name} wds-illustration-rive-${size}`, className),
40
+ children: (() => {
41
+ if (name === 'document-scan') {
42
+ return /*#__PURE__*/jsxRuntime.jsx(Rive, {
43
+ src: "https://wise.com/web-art/assets/illustrations3d/rive/doc-scan.riv",
44
+ animationNames: ["Scan Line Appearing", "Scan Line Moving"]
45
+ });
46
+ }
47
+ return null;
48
+ })()
49
+ });
50
+ };
51
+
52
+ exports.RiveIllustrationExperimental = RiveIllustrationExperimental;
53
+ //# sourceMappingURL=rive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rive.js","sources":["../src/rive/RiveIllustration.tsx"],"sourcesContent":["import { useRive } from \"@rive-app/react-canvas-lite\";\nimport clsx from \"clsx\";\nimport { useEffect, useState } from \"react\";\n\nimport { Sizes } from \"../common\";\nimport type { Illustration3DProps } from \".\";\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} & Pick<Illustration3DProps, \"size\" | \"className\">;\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,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"2.24.0-beta.3",
3
+ "version": "2.24.0-beta.4",
4
4
  "packageManager": "pnpm@10.12.4+sha512.5ea8b0deed94ed68691c9bad4c955492705c5eeb8a87ef86bc62c74a26b037b08ff9570f108b2e4dbd1dd1a9186fea925e527f141c648e85af45631074680184",
5
5
  "license": "MIT",
6
6
  "description": "React library for art elements in UI",