@react-fabric/core 1.0.1 → 1.0.2

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.
@@ -2,10 +2,8 @@
2
2
 
3
3
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
4
  var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
5
- var AlertCircleIcon = require('@iconify-react/line-md/alert-circle');
6
- var CloseCircleIcon = require('@iconify-react/line-md/close-circle');
7
- var ConfirmCircleIcon = require('@iconify-react/line-md/confirm-circle');
8
- var QuestionCircleIcon = require('@iconify-react/line-md/question-circle');
5
+ var react = require('@iconify-icon/react');
6
+ var utilities = require('@react-fabric/utilities');
9
7
  var Icon = require('../icon/Icon.js');
10
8
  var jsxRuntime = require('react/jsx-runtime');
11
9
 
@@ -13,26 +11,22 @@ var _excluded = ["type"];
13
11
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
14
12
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
15
13
  var ANIMATION_ICONS = {
16
- info: /*#__PURE__*/jsxRuntime.jsx(AlertCircleIcon, {
17
- height: "1.25em",
18
- width: "1.25em",
14
+ info: /*#__PURE__*/jsxRuntime.jsx(react.Icon, {
15
+ icon: "line-md:alert-circle",
19
16
  className: "rotate-180"
20
17
  }),
21
- check: /*#__PURE__*/jsxRuntime.jsx(ConfirmCircleIcon, {
22
- height: "1.25em",
23
- width: "1.25em"
18
+ // <AlertCircleIcon height="1.25em" width="1.25em" className="rotate-180" />,
19
+ check: /*#__PURE__*/jsxRuntime.jsx(react.Icon, {
20
+ icon: "line-md:confirm-circle"
24
21
  }),
25
- cross: /*#__PURE__*/jsxRuntime.jsx(CloseCircleIcon, {
26
- height: "1.25em",
27
- width: "1.25em"
22
+ cross: /*#__PURE__*/jsxRuntime.jsx(react.Icon, {
23
+ icon: "line-md:close-circle"
28
24
  }),
29
- question: /*#__PURE__*/jsxRuntime.jsx(QuestionCircleIcon, {
30
- height: "1.25em",
31
- width: "1.25em"
25
+ question: /*#__PURE__*/jsxRuntime.jsx(react.Icon, {
26
+ icon: "line-md:question-circle"
32
27
  }),
33
- exclaim: /*#__PURE__*/jsxRuntime.jsx(AlertCircleIcon, {
34
- height: "1.25em",
35
- width: "1.25em"
28
+ exclaim: /*#__PURE__*/jsxRuntime.jsx(react.Icon, {
29
+ icon: "line-md:alert-circle"
36
30
  })
37
31
  };
38
32
 
@@ -66,7 +60,7 @@ function AnimationIndicator(_ref) {
66
60
  // Map the type to its corresponding icon and delegate rendering to the Icon component
67
61
  return /*#__PURE__*/jsxRuntime.jsx(Icon.Icon, _objectSpread(_objectSpread({}, props), {}, {
68
62
  icon: ANIMATION_ICONS[type || "info"]
69
- }));
63
+ }), utilities.shortHash());
70
64
  }
71
65
 
72
66
  exports.AnimationIndicator = AnimationIndicator;
@@ -2,10 +2,8 @@
2
2
 
3
3
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
4
4
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
5
- import AlertCircleIcon from '@iconify-react/line-md/alert-circle';
6
- import CloseCircleIcon from '@iconify-react/line-md/close-circle';
7
- import ConfirmCircleIcon from '@iconify-react/line-md/confirm-circle';
8
- import QuestionCircleIcon from '@iconify-react/line-md/question-circle';
5
+ import { Icon as Icon$1 } from '@iconify-icon/react';
6
+ import { shortHash } from '@react-fabric/utilities';
9
7
  import { Icon } from '../icon/Icon.js';
10
8
  import { jsx } from 'react/jsx-runtime';
11
9
 
@@ -13,26 +11,22 @@ var _excluded = ["type"];
13
11
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
14
12
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
15
13
  var ANIMATION_ICONS = {
16
- info: /*#__PURE__*/jsx(AlertCircleIcon, {
17
- height: "1.25em",
18
- width: "1.25em",
14
+ info: /*#__PURE__*/jsx(Icon$1, {
15
+ icon: "line-md:alert-circle",
19
16
  className: "rotate-180"
20
17
  }),
21
- check: /*#__PURE__*/jsx(ConfirmCircleIcon, {
22
- height: "1.25em",
23
- width: "1.25em"
18
+ // <AlertCircleIcon height="1.25em" width="1.25em" className="rotate-180" />,
19
+ check: /*#__PURE__*/jsx(Icon$1, {
20
+ icon: "line-md:confirm-circle"
24
21
  }),
25
- cross: /*#__PURE__*/jsx(CloseCircleIcon, {
26
- height: "1.25em",
27
- width: "1.25em"
22
+ cross: /*#__PURE__*/jsx(Icon$1, {
23
+ icon: "line-md:close-circle"
28
24
  }),
29
- question: /*#__PURE__*/jsx(QuestionCircleIcon, {
30
- height: "1.25em",
31
- width: "1.25em"
25
+ question: /*#__PURE__*/jsx(Icon$1, {
26
+ icon: "line-md:question-circle"
32
27
  }),
33
- exclaim: /*#__PURE__*/jsx(AlertCircleIcon, {
34
- height: "1.25em",
35
- width: "1.25em"
28
+ exclaim: /*#__PURE__*/jsx(Icon$1, {
29
+ icon: "line-md:alert-circle"
36
30
  })
37
31
  };
38
32
 
@@ -66,7 +60,7 @@ function AnimationIndicator(_ref) {
66
60
  // Map the type to its corresponding icon and delegate rendering to the Icon component
67
61
  return /*#__PURE__*/jsx(Icon, _objectSpread(_objectSpread({}, props), {}, {
68
62
  icon: ANIMATION_ICONS[type || "info"]
69
- }));
63
+ }), shortHash());
70
64
  }
71
65
 
72
66
  export { AnimationIndicator };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-fabric/core",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "RUF: Core package",
5
5
  "author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
6
6
  "license": "MIT",
@@ -40,12 +40,13 @@
40
40
  "@fontsource-variable/noto-kufi-arabic": "~5.3.0",
41
41
  "@fontsource-variable/noto-sans": "~5.3.0",
42
42
  "@fontsource/noto-color-emoji": "~5.3.0",
43
+ "@iconify-icon/react": "~3.0.5",
44
+ "@iconify-json/line-md": "~1.2.16",
43
45
  "@iconify-json/mdi": "~1.2.3",
44
46
  "@iconify-json/mdi-light": "~1.2.2",
45
47
  "@iconify-json/svg-spinners": "~1.2.4",
46
- "@iconify-react/line-md": "~1.0.2",
47
48
  "@iconify/tailwind4": "~1.2.3",
48
- "@react-fabric/utilities": "^1.0.1",
49
+ "@react-fabric/utilities": "^1.0.2",
49
50
  "@tailwindcss/postcss": "~4.3.3",
50
51
  "@tanstack/react-hotkeys": "~0.10.0",
51
52
  "boring-avatars": "~2.0.4",
@@ -64,5 +65,5 @@
64
65
  "node": ">=24.0.0",
65
66
  "npm": ">=11.0.0"
66
67
  },
67
- "gitHead": "1419a9df05b5e3850e1d2b4e896ab63df702c7e8"
68
+ "gitHead": "b9fc477b5b3a13b782977bf17762027f376ac30e"
68
69
  }
@@ -23,10 +23,8 @@
23
23
  * SOFTWARE.
24
24
  */
25
25
 
26
- import AlertCircleIcon from "@iconify-react/line-md/alert-circle";
27
- import CloseCircleIcon from "@iconify-react/line-md/close-circle";
28
- import ConfirmCircleIcon from "@iconify-react/line-md/confirm-circle";
29
- import QuestionCircleIcon from "@iconify-react/line-md/question-circle";
26
+ import { Icon as Iconify } from "@iconify-icon/react";
27
+ import { shortHash } from "@react-fabric/utilities";
30
28
  import type { CssProp } from "../../types";
31
29
  import { Icon } from "../icon/Icon";
32
30
 
@@ -39,11 +37,12 @@ export interface AnimationIndicatorProps extends CssProp {
39
37
  }
40
38
 
41
39
  const ANIMATION_ICONS = {
42
- info: <AlertCircleIcon height="1.25em" width="1.25em" className="rotate-180" />,
43
- check: <ConfirmCircleIcon height="1.25em" width="1.25em" />,
44
- cross: <CloseCircleIcon height="1.25em" width="1.25em" />,
45
- question: <QuestionCircleIcon height="1.25em" width="1.25em" />,
46
- exclaim: <AlertCircleIcon height="1.25em" width="1.25em" />,
40
+ info: <Iconify icon="line-md:alert-circle" className="rotate-180" />,
41
+ // <AlertCircleIcon height="1.25em" width="1.25em" className="rotate-180" />,
42
+ check: <Iconify icon="line-md:confirm-circle" />,
43
+ cross: <Iconify icon="line-md:close-circle" />,
44
+ question: <Iconify icon="line-md:question-circle" />,
45
+ exclaim: <Iconify icon="line-md:alert-circle" />,
47
46
  };
48
47
 
49
48
  /**
@@ -72,5 +71,5 @@ const ANIMATION_ICONS = {
72
71
  */
73
72
  export function AnimationIndicator({ type, ...props }: AnimationIndicatorProps) {
74
73
  // Map the type to its corresponding icon and delegate rendering to the Icon component
75
- return <Icon {...props} icon={ANIMATION_ICONS[type || "info"]} />;
74
+ return <Icon key={shortHash()} {...props} icon={ANIMATION_ICONS[type || "info"]} />;
76
75
  }