tgui-core 1.1.6 → 1.1.7

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.
@@ -1,28 +1,31 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
- import { useState as h, useEffect as $ } from "react";
2
+ import { useState as $, useEffect as h } from "react";
3
3
  import { resolveAsset as j } from "../common/assets.js";
4
4
  import { fetchRetry as v } from "../common/http.js";
5
5
  import { Image as x } from "./Image.js";
6
- let t;
7
- function b(o) {
6
+ let r;
7
+ function d(f) {
8
8
  const {
9
- className: E,
10
- direction: n = 2,
11
- fallback: f,
12
- frame: m = 1,
13
- icon_state: s,
14
- icon: c,
15
- movement: i = !1,
16
- ...a
17
- } = o, [r, p] = h(""), u = `${r}?state=${s}&dir=${n}&movement=${i}&frame=${m}`;
18
- return $(() => {
19
- t || v(j("icon_ref_map.json")).then((e) => e.json()).then((e) => {
20
- t = e, p(e[c]);
21
- }).catch((e) => {
22
- console.error("Error fetching ref map:", e);
9
+ className: I,
10
+ direction: m = 2,
11
+ fallback: s,
12
+ frame: c = 1,
13
+ icon_state: i,
14
+ icon: t,
15
+ movement: a = !1,
16
+ ...p
17
+ } = f, [o, n] = $(""), u = `${o}?state=${i}&dir=${m}&movement=${a}&frame=${c}`;
18
+ return h(() => {
19
+ if (r) {
20
+ n(r[t]);
21
+ return;
22
+ }
23
+ v(j("icon_ref_map.json")).then((e) => e.json()).then((e) => {
24
+ r = e, n(e[t]);
25
+ }).catch(() => {
23
26
  });
24
- }, []), r ? /* @__PURE__ */ l(x, { fixErrors: !0, src: u, ...a }) : f;
27
+ }, []), o ? /* @__PURE__ */ l(x, { fixErrors: !0, src: u, ...p }) : s;
25
28
  }
26
29
  export {
27
- b as DmIcon
30
+ d as DmIcon
28
31
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tgui-core",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "TGUI core component library",
5
5
  "keywords": [
6
6
  "TGUI",