tgui-core 1.1.12 → 1.1.14

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.
@@ -27,5 +27,5 @@ type Props = {
27
27
  /** Movement state. Default is false */
28
28
  movement: BooleanLike;
29
29
  }> & BoxProps;
30
- export declare function DmIcon(props: Props): string | number | boolean | Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
30
+ export declare function DmIcon(props: Props): string;
31
31
  export {};
@@ -1,29 +1,29 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { useState as $, useEffect as h } from "react";
3
- import { Image as d } from "./Image.js";
4
- let t;
5
- function g(c) {
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) {
6
5
  const {
7
- className: j,
8
- direction: f = 2,
9
- fallback: s,
10
- frame: m = 1,
11
- icon_state: i,
12
- icon: r,
13
- movement: a = !1,
14
- ...p
15
- } = c, [o, n] = $(""), u = `${o}?state=${i}&dir=${f}&movement=${a}&frame=${m}`;
16
- return h(() => {
17
- if (t) {
18
- n(t[r]);
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]);
19
18
  return;
20
19
  }
21
- fetch(loadedMappings == null ? void 0 : loadedMappings["icon_ref_map.json"]).then((e) => e.json()).then((e) => {
22
- t = e, n(e[r]);
23
- }).catch(() => {
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);
24
24
  });
25
- }, []), o ? /* @__PURE__ */ l(d, { fixErrors: !0, src: u, ...p }) : s;
25
+ }, []), f;
26
26
  }
27
27
  export {
28
- g as DmIcon
28
+ p as DmIcon
29
29
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tgui-core",
3
- "version": "1.1.12",
3
+ "version": "1.1.14",
4
4
  "description": "TGUI core component library",
5
5
  "keywords": [
6
6
  "TGUI",