tgui-core 1.1.14 → 1.1.15

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,29 +1,21 @@
1
- import { useState as r, useEffect as i } from "react";
2
- import { resolveAsset as u } from "../common/assets.js";
3
- let e;
4
- function p(c) {
5
- const {
6
- // className,
7
- // direction = Direction.SOUTH,
8
- // fallback,
9
- // frame = 1,
10
- // icon_state,
11
- icon: o
12
- // movement = false,
13
- // ...rest
14
- } = c, [a, s] = r(""), [f, n] = r("unloaded");
15
- return i(() => {
16
- if (e) {
17
- n(Object.keys(e).length.toString()), s(e[o]);
18
- return;
19
- }
20
- fetch(u("icon_ref_map.json")).then((t) => (n(t.statusText), t.json())).then((t) => {
21
- e = t, s(t[o]);
22
- }).catch((t) => {
23
- n(t.message);
1
+ import { useState as o, useEffect as c } from "react";
2
+ import { resolveAsset as n } from "../common/assets.js";
3
+ function i(a) {
4
+ o("");
5
+ const [r, t] = o("unloaded");
6
+ return c(() => {
7
+ fetch(n("icon_ref_map.json")).then((e) => e.text()).then((e) => {
8
+ try {
9
+ const s = JSON.parse(e);
10
+ t("success " + Object.keys(s).length.toString());
11
+ } catch {
12
+ t(e);
13
+ }
14
+ }).catch((e) => {
15
+ t(e.message);
24
16
  });
25
- }, []), f;
17
+ }, []), r;
26
18
  }
27
19
  export {
28
- p as DmIcon
20
+ i as DmIcon
29
21
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tgui-core",
3
- "version": "1.1.14",
3
+ "version": "1.1.15",
4
4
  "description": "TGUI core component library",
5
5
  "keywords": [
6
6
  "TGUI",