tgui-core 1.1.16 → 1.1.17

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.
@@ -0,0 +1,30 @@
1
+ import { ReactNode } from 'react';
2
+ import { BoxProps } from './Box';
3
+
4
+ declare enum Direction {
5
+ NORTH = 1,
6
+ SOUTH = 2,
7
+ EAST = 4,
8
+ WEST = 8,
9
+ NORTHEAST = 5,
10
+ NORTHWEST = 9,
11
+ SOUTHEAST = 6,
12
+ SOUTHWEST = 10
13
+ }
14
+ type Props = {
15
+ /** Required: The path of the icon */
16
+ icon: string;
17
+ /** Required: The state of the icon */
18
+ icon_state: string;
19
+ } & Partial<{
20
+ /** Facing direction. See direction enum. Default is South */
21
+ direction: Direction;
22
+ /** Fallback icon. */
23
+ fallback: ReactNode;
24
+ /** Frame number. Default is 1 */
25
+ frame: number;
26
+ /** Movement state. Default is false */
27
+ movement: any;
28
+ }> & BoxProps;
29
+ export declare function DmIcon(props: Props): string | number | boolean | Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
30
+ export {};
@@ -0,0 +1,21 @@
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import { Image as $ } from "./Image.js";
3
+ function x(o) {
4
+ var r;
5
+ const {
6
+ className: l,
7
+ direction: t = 2,
8
+ fallback: n,
9
+ frame: c = 1,
10
+ icon_state: m,
11
+ icon: i,
12
+ movement: s = !1,
13
+ ...a
14
+ } = o, e = (r = Byond.iconRefMap) == null ? void 0 : r[i];
15
+ if (!e) return n;
16
+ const f = `${e}?state=${m}&dir=${t}&movement=${!!s}&frame=${c}`;
17
+ return /* @__PURE__ */ u($, { fixErrors: !0, src: f, ...a });
18
+ }
19
+ export {
20
+ x as DmIcon
21
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tgui-core",
3
- "version": "1.1.16",
3
+ "version": "1.1.17",
4
4
  "description": "TGUI core component library",
5
5
  "keywords": [
6
6
  "TGUI",