@malilion/block-ui-icons 0.1.0
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.
- package/LICENSE +21 -0
- package/README.md +18 -0
- package/dist/createPixelIcon.d.ts +28 -0
- package/dist/createPixelIcon.d.ts.map +1 -0
- package/dist/createPixelIcon.js +67 -0
- package/dist/createPixelIcon.js.map +1 -0
- package/dist/icons/hud.d.ts +5 -0
- package/dist/icons/hud.d.ts.map +1 -0
- package/dist/icons/hud.js +113 -0
- package/dist/icons/hud.js.map +1 -0
- package/dist/icons/items.d.ts +28 -0
- package/dist/icons/items.d.ts.map +1 -0
- package/dist/icons/items.js +577 -0
- package/dist/icons/items.js.map +1 -0
- package/dist/icons/navigation.d.ts +12 -0
- package/dist/icons/navigation.d.ts.map +1 -0
- package/dist/icons/navigation.js +236 -0
- package/dist/icons/navigation.js.map +1 -0
- package/dist/icons/ui.d.ts +16 -0
- package/dist/icons/ui.d.ts.map +1 -0
- package/dist/icons/ui.js +259 -0
- package/dist/icons/ui.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/palette.d.ts +93 -0
- package/dist/palette.d.ts.map +1 -0
- package/dist/palette.js +29 -0
- package/dist/palette.js.map +1 -0
- package/package.json +62 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Block UI Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# @malilion/block-ui-icons
|
|
2
|
+
|
|
3
|
+
50+ original 16 × 16 pixel-art React icons for [Block UI](https://github.com/malilion/BlockUI). Tree-shakable, crisp at 16 / 24 / 32 px, decorative by default and labelled with `title`.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pnpm add @malilion/block-ui-icons
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { DiamondIcon, HeartIcon, SearchIcon } from "@malilion/block-ui-icons";
|
|
11
|
+
|
|
12
|
+
<DiamondIcon size={32} />
|
|
13
|
+
<SearchIcon size={16} title="Search" /> // role="img" with an accessible name
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Monochrome UI glyphs (`SearchIcon`, `CloseIcon`, `CheckIcon`, …) use `currentColor`. Create your own with `createPixelIcon(name, { palette, pixels })`.
|
|
17
|
+
|
|
18
|
+
MIT License
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type ForwardRefExoticComponent, type RefAttributes, type SVGProps } from "react";
|
|
2
|
+
export type IconSize = 16 | 24 | 32 | (number & {});
|
|
3
|
+
export interface PixelIconProps extends Omit<SVGProps<SVGSVGElement>, "children" | "ref"> {
|
|
4
|
+
/** Rendered size in px. The artwork is drawn on a 16 × 16 grid. @default 24 */
|
|
5
|
+
size?: IconSize;
|
|
6
|
+
/**
|
|
7
|
+
* Accessible label. When omitted the icon is decorative (`aria-hidden`).
|
|
8
|
+
*/
|
|
9
|
+
title?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface PixelIconDefinition {
|
|
12
|
+
/** Map of palette characters to fills. `x` defaults to `currentColor`, `.` is transparent. */
|
|
13
|
+
palette?: Readonly<Record<string, string>>;
|
|
14
|
+
/** 16 rows of 16 characters. */
|
|
15
|
+
pixels: readonly string[];
|
|
16
|
+
}
|
|
17
|
+
export type PixelIcon = ForwardRefExoticComponent<PixelIconProps & RefAttributes<SVGSVGElement>> & {
|
|
18
|
+
readonly definition: PixelIconDefinition;
|
|
19
|
+
};
|
|
20
|
+
export interface PixelPath {
|
|
21
|
+
fill: string;
|
|
22
|
+
d: string;
|
|
23
|
+
}
|
|
24
|
+
/** Converts a pixel grid into one `<path>` per fill, merging horizontal runs. */
|
|
25
|
+
export declare function pixelsToPaths({ pixels, palette }: PixelIconDefinition): PixelPath[];
|
|
26
|
+
/** Creates a pixel-art icon component from a 16 × 16 character grid. */
|
|
27
|
+
export declare function createPixelIcon(displayName: string, definition: PixelIconDefinition): PixelIcon;
|
|
28
|
+
//# sourceMappingURL=createPixelIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createPixelIcon.d.ts","sourceRoot":"","sources":["../src/createPixelIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,yBAAyB,EAC9B,KAAK,aAAa,EAClB,KAAK,QAAQ,EACd,MAAM,OAAO,CAAC;AAOf,MAAM,MAAM,QAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEpD,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,UAAU,GAAG,KAAK,CAAC;IACvF,+EAA+E;IAC/E,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,8FAA8F;IAC9F,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC3C,gCAAgC;IAChC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,MAAM,SAAS,GAAG,yBAAyB,CAAC,cAAc,GAAG,aAAa,CAAC,aAAa,CAAC,CAAC,GAAG;IACjG,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAC;CAC1C,CAAC;AAEF,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;CACX;AAED,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,OAAY,EAAE,EAAE,mBAAmB,GAAG,SAAS,EAAE,CAmBxF;AAED,wEAAwE;AACxE,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,mBAAmB,GAAG,SAAS,CAoC/F"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { forwardRef, useId } from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
//#region src/createPixelIcon.tsx
|
|
4
|
+
/** Transparent pixel. */
|
|
5
|
+
var EMPTY = ".";
|
|
6
|
+
/** Monochrome pixel — rendered with `currentColor`. */
|
|
7
|
+
var CURRENT = "x";
|
|
8
|
+
/** Converts a pixel grid into one `<path>` per fill, merging horizontal runs. */
|
|
9
|
+
function pixelsToPaths({ pixels, palette = {} }) {
|
|
10
|
+
const byFill = /* @__PURE__ */ new Map();
|
|
11
|
+
pixels.forEach((row, y) => {
|
|
12
|
+
let x = 0;
|
|
13
|
+
while (x < row.length) {
|
|
14
|
+
const char = row[x] ?? EMPTY;
|
|
15
|
+
let run = 1;
|
|
16
|
+
while (row[x + run] === char) run += 1;
|
|
17
|
+
if (char !== EMPTY) {
|
|
18
|
+
const fill = palette[char] ?? (char === CURRENT ? "currentColor" : void 0);
|
|
19
|
+
if (fill === void 0) throw new Error(`Pixel icon uses "${char}" but the palette does not define it.`);
|
|
20
|
+
byFill.set(fill, `${byFill.get(fill) ?? ""}M${x} ${y}h${run}v1h-${run}z`);
|
|
21
|
+
}
|
|
22
|
+
x += run;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
return [...byFill.entries()].map(([fill, d]) => ({
|
|
26
|
+
fill,
|
|
27
|
+
d
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
/** Creates a pixel-art icon component from a 16 × 16 character grid. */
|
|
31
|
+
function createPixelIcon(displayName, definition) {
|
|
32
|
+
const paths = pixelsToPaths(definition);
|
|
33
|
+
const height = definition.pixels.length;
|
|
34
|
+
const width = definition.pixels[0]?.length ?? height;
|
|
35
|
+
const Icon = forwardRef(function PixelIconComponent({ size = 24, title, className, ...rest }, ref) {
|
|
36
|
+
const titleId = useId();
|
|
37
|
+
const labelled = Boolean(title);
|
|
38
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
39
|
+
ref,
|
|
40
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41
|
+
width: size,
|
|
42
|
+
height: size,
|
|
43
|
+
viewBox: `0 0 ${width} ${height}`,
|
|
44
|
+
shapeRendering: "crispEdges",
|
|
45
|
+
focusable: "false",
|
|
46
|
+
role: labelled ? "img" : void 0,
|
|
47
|
+
"aria-hidden": labelled ? void 0 : true,
|
|
48
|
+
"aria-labelledby": labelled ? titleId : void 0,
|
|
49
|
+
className: className ? `block-icon ${className}` : "block-icon",
|
|
50
|
+
"data-icon": displayName,
|
|
51
|
+
...rest,
|
|
52
|
+
children: [labelled ? /* @__PURE__ */ jsx("title", {
|
|
53
|
+
id: titleId,
|
|
54
|
+
children: title
|
|
55
|
+
}) : null, paths.map((path) => /* @__PURE__ */ jsx("path", {
|
|
56
|
+
fill: path.fill,
|
|
57
|
+
d: path.d
|
|
58
|
+
}, path.fill))]
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
Icon.displayName = displayName;
|
|
62
|
+
return Object.assign(Icon, { definition });
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
export { createPixelIcon, pixelsToPaths };
|
|
66
|
+
|
|
67
|
+
//# sourceMappingURL=createPixelIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createPixelIcon.js","names":[],"sources":["../src/createPixelIcon.tsx"],"sourcesContent":["import {\n forwardRef,\n useId,\n type ForwardRefExoticComponent,\n type RefAttributes,\n type SVGProps,\n} from \"react\";\n\n/** Transparent pixel. */\nconst EMPTY = \".\";\n/** Monochrome pixel — rendered with `currentColor`. */\nconst CURRENT = \"x\";\n\nexport type IconSize = 16 | 24 | 32 | (number & {});\n\nexport interface PixelIconProps extends Omit<SVGProps<SVGSVGElement>, \"children\" | \"ref\"> {\n /** Rendered size in px. The artwork is drawn on a 16 × 16 grid. @default 24 */\n size?: IconSize;\n /**\n * Accessible label. When omitted the icon is decorative (`aria-hidden`).\n */\n title?: string;\n}\n\nexport interface PixelIconDefinition {\n /** Map of palette characters to fills. `x` defaults to `currentColor`, `.` is transparent. */\n palette?: Readonly<Record<string, string>>;\n /** 16 rows of 16 characters. */\n pixels: readonly string[];\n}\n\nexport type PixelIcon = ForwardRefExoticComponent<PixelIconProps & RefAttributes<SVGSVGElement>> & {\n readonly definition: PixelIconDefinition;\n};\n\nexport interface PixelPath {\n fill: string;\n d: string;\n}\n\n/** Converts a pixel grid into one `<path>` per fill, merging horizontal runs. */\nexport function pixelsToPaths({ pixels, palette = {} }: PixelIconDefinition): PixelPath[] {\n const byFill = new Map<string, string>();\n pixels.forEach((row, y) => {\n let x = 0;\n while (x < row.length) {\n const char = row[x] ?? EMPTY;\n let run = 1;\n while (row[x + run] === char) run += 1;\n if (char !== EMPTY) {\n const fill = palette[char] ?? (char === CURRENT ? \"currentColor\" : undefined);\n if (fill === undefined) {\n throw new Error(`Pixel icon uses \"${char}\" but the palette does not define it.`);\n }\n byFill.set(fill, `${byFill.get(fill) ?? \"\"}M${x} ${y}h${run}v1h-${run}z`);\n }\n x += run;\n }\n });\n return [...byFill.entries()].map(([fill, d]) => ({ fill, d }));\n}\n\n/** Creates a pixel-art icon component from a 16 × 16 character grid. */\nexport function createPixelIcon(displayName: string, definition: PixelIconDefinition): PixelIcon {\n const paths = pixelsToPaths(definition);\n const height = definition.pixels.length;\n const width = definition.pixels[0]?.length ?? height;\n\n const Icon = forwardRef<SVGSVGElement, PixelIconProps>(function PixelIconComponent(\n { size = 24, title, className, ...rest },\n ref,\n ) {\n const titleId = useId();\n const labelled = Boolean(title);\n return (\n <svg\n ref={ref}\n xmlns=\"http://www.w3.org/2000/svg\"\n width={size}\n height={size}\n viewBox={`0 0 ${width} ${height}`}\n shapeRendering=\"crispEdges\"\n focusable=\"false\"\n role={labelled ? \"img\" : undefined}\n aria-hidden={labelled ? undefined : true}\n aria-labelledby={labelled ? titleId : undefined}\n className={className ? `block-icon ${className}` : \"block-icon\"}\n data-icon={displayName}\n {...rest}\n >\n {labelled ? <title id={titleId}>{title}</title> : null}\n {paths.map((path) => (\n <path key={path.fill} fill={path.fill} d={path.d} />\n ))}\n </svg>\n );\n });\n Icon.displayName = displayName;\n return Object.assign(Icon, { definition });\n}\n"],"mappings":";;;;AASA,IAAM,QAAQ;;AAEd,IAAM,UAAU;;AA8BhB,SAAgB,cAAc,EAAE,QAAQ,UAAU,CAAC,KAAuC;CACxF,MAAM,yBAAS,IAAI,IAAoB;CACvC,OAAO,SAAS,KAAK,MAAM;EACzB,IAAI,IAAI;EACR,OAAO,IAAI,IAAI,QAAQ;GACrB,MAAM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;;CAET,CAAC;CACD,KAAK,cAAc;CACnB,OAAO,OAAO,OAAO,MAAM,EAAE,WAAW,CAAC;AAC3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hud.d.ts","sourceRoot":"","sources":["../../src/icons/hud.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,wBAoBpB,CAAC;AAEH,eAAO,MAAM,SAAS,wBAoBpB,CAAC;AAEH,eAAO,MAAM,QAAQ,wBAoBnB,CAAC;AAEH,eAAO,MAAM,SAAS,wBAoBpB,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { createPixelIcon } from "../createPixelIcon.js";
|
|
2
|
+
import { p } from "../palette.js";
|
|
3
|
+
//#region src/icons/hud.ts
|
|
4
|
+
var HeartIcon = /*#__PURE__*/ createPixelIcon("HeartIcon", {
|
|
5
|
+
palette: {
|
|
6
|
+
k: p.outline,
|
|
7
|
+
w: p.heartLight,
|
|
8
|
+
r: p.heart,
|
|
9
|
+
d: p.heartDark
|
|
10
|
+
},
|
|
11
|
+
pixels: [
|
|
12
|
+
"................",
|
|
13
|
+
"................",
|
|
14
|
+
"..kkkk....kkkk..",
|
|
15
|
+
".kwwrrk..krrrrk.",
|
|
16
|
+
"kwwrrrrkkrrrrrdk",
|
|
17
|
+
"kwrrrrrrrrrrrrdk",
|
|
18
|
+
"krrrrrrrrrrrrrdk",
|
|
19
|
+
"krrrrrrrrrrrrrdk",
|
|
20
|
+
".krrrrrrrrrrrdk.",
|
|
21
|
+
"..krrrrrrrrrdk..",
|
|
22
|
+
"...krrrrrrrdk...",
|
|
23
|
+
"....krrrrrdk....",
|
|
24
|
+
".....krrrdk.....",
|
|
25
|
+
"......krdk......",
|
|
26
|
+
".......kk.......",
|
|
27
|
+
"................"
|
|
28
|
+
]
|
|
29
|
+
});
|
|
30
|
+
var ArmorIcon = /*#__PURE__*/ createPixelIcon("ArmorIcon", {
|
|
31
|
+
palette: {
|
|
32
|
+
k: p.outline,
|
|
33
|
+
w: p.iron,
|
|
34
|
+
l: p.ironLight,
|
|
35
|
+
g: p.ironDark
|
|
36
|
+
},
|
|
37
|
+
pixels: [
|
|
38
|
+
"................",
|
|
39
|
+
".kkkkk....kkkkk.",
|
|
40
|
+
"kllllgk..kwwwggk",
|
|
41
|
+
"klwwwgkkkkwwwggk",
|
|
42
|
+
"klwwwwwwwwwwwggk",
|
|
43
|
+
"kkklwwwwwwwwwgkk",
|
|
44
|
+
"..klwwwwwwwwwgk.",
|
|
45
|
+
"..klwwwwwwwwwgk.",
|
|
46
|
+
"..klwwwwwwwwwgk.",
|
|
47
|
+
"..klwwwwwwwwwgk.",
|
|
48
|
+
"..klwwwwwwwwwgk.",
|
|
49
|
+
"..klwwwwwwwwwgk.",
|
|
50
|
+
"..klwwwwwwwwwgk.",
|
|
51
|
+
"..kgggggggggggk.",
|
|
52
|
+
"..kkkkkkkkkkkkk.",
|
|
53
|
+
"................"
|
|
54
|
+
]
|
|
55
|
+
});
|
|
56
|
+
var FoodIcon = /*#__PURE__*/ createPixelIcon("FoodIcon", {
|
|
57
|
+
palette: {
|
|
58
|
+
k: p.outline,
|
|
59
|
+
m: p.meat,
|
|
60
|
+
l: p.meatLight,
|
|
61
|
+
d: p.meatDark,
|
|
62
|
+
b: p.bone
|
|
63
|
+
},
|
|
64
|
+
pixels: [
|
|
65
|
+
"................",
|
|
66
|
+
".......kkkkk....",
|
|
67
|
+
"......kmmmmmkk..",
|
|
68
|
+
".....kmlmmmmmdk.",
|
|
69
|
+
"....kmllmmmmmdk.",
|
|
70
|
+
"....kmlmmmmmmdk.",
|
|
71
|
+
"....kmmmmmmmddk.",
|
|
72
|
+
".....kmmmmmddk..",
|
|
73
|
+
"....kkkdddddk...",
|
|
74
|
+
"...kbbkkkkkk....",
|
|
75
|
+
"..kbbk..........",
|
|
76
|
+
".kbbbk..........",
|
|
77
|
+
"kbbbk...........",
|
|
78
|
+
".kkk............",
|
|
79
|
+
"................",
|
|
80
|
+
"................"
|
|
81
|
+
]
|
|
82
|
+
});
|
|
83
|
+
var XPOrbIcon = /*#__PURE__*/ createPixelIcon("XPOrbIcon", {
|
|
84
|
+
palette: {
|
|
85
|
+
k: p.outline,
|
|
86
|
+
l: p.emeraldLight,
|
|
87
|
+
b: p.emerald,
|
|
88
|
+
d: p.emeraldDark,
|
|
89
|
+
w: p.goldLight
|
|
90
|
+
},
|
|
91
|
+
pixels: [
|
|
92
|
+
"................",
|
|
93
|
+
".......kk.......",
|
|
94
|
+
".....kkllkk.....",
|
|
95
|
+
"....kllbbllk....",
|
|
96
|
+
"...klblbbbblk...",
|
|
97
|
+
"..klbllllbbblk..",
|
|
98
|
+
"..kllwwllbbbdk..",
|
|
99
|
+
".klbbllllbbbblk.",
|
|
100
|
+
".klbblllbbbbbdk.",
|
|
101
|
+
"..klbbbbbbbbdk..",
|
|
102
|
+
"..klbbbbbbbbdk..",
|
|
103
|
+
"...klbbbbbbdk...",
|
|
104
|
+
"....kldbbddk....",
|
|
105
|
+
".....kkldkk.....",
|
|
106
|
+
".......kk.......",
|
|
107
|
+
"................"
|
|
108
|
+
]
|
|
109
|
+
});
|
|
110
|
+
//#endregion
|
|
111
|
+
export { ArmorIcon, FoodIcon, HeartIcon, XPOrbIcon };
|
|
112
|
+
|
|
113
|
+
//# sourceMappingURL=hud.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hud.js","names":[],"sources":["../../src/icons/hud.ts"],"sourcesContent":["import { createPixelIcon } from \"../createPixelIcon\";\nimport { p } from \"../palette\";\n\n/* HUD icons used by HealthBar, ArmorBar, HungerBar and XPBar. */\n\nexport const HeartIcon = /*#__PURE__*/ createPixelIcon(\"HeartIcon\", {\n palette: { k: p.outline, w: p.heartLight, r: p.heart, d: p.heartDark },\n pixels: [\n \"................\",\n \"................\",\n \"..kkkk....kkkk..\",\n \".kwwrrk..krrrrk.\",\n \"kwwrrrrkkrrrrrdk\",\n \"kwrrrrrrrrrrrrdk\",\n \"krrrrrrrrrrrrrdk\",\n \"krrrrrrrrrrrrrdk\",\n \".krrrrrrrrrrrdk.\",\n \"..krrrrrrrrrdk..\",\n \"...krrrrrrrdk...\",\n \"....krrrrrdk....\",\n \".....krrrdk.....\",\n \"......krdk......\",\n \".......kk.......\",\n \"................\",\n ],\n});\n\nexport const ArmorIcon = /*#__PURE__*/ createPixelIcon(\"ArmorIcon\", {\n palette: { k: p.outline, w: p.iron, l: p.ironLight, g: p.ironDark },\n pixels: [\n \"................\",\n \".kkkkk....kkkkk.\",\n \"kllllgk..kwwwggk\",\n \"klwwwgkkkkwwwggk\",\n \"klwwwwwwwwwwwggk\",\n \"kkklwwwwwwwwwgkk\",\n \"..klwwwwwwwwwgk.\",\n \"..klwwwwwwwwwgk.\",\n \"..klwwwwwwwwwgk.\",\n \"..klwwwwwwwwwgk.\",\n \"..klwwwwwwwwwgk.\",\n \"..klwwwwwwwwwgk.\",\n \"..klwwwwwwwwwgk.\",\n \"..kgggggggggggk.\",\n \"..kkkkkkkkkkkkk.\",\n \"................\",\n ],\n});\n\nexport const FoodIcon = /*#__PURE__*/ createPixelIcon(\"FoodIcon\", {\n palette: { k: p.outline, m: p.meat, l: p.meatLight, d: p.meatDark, b: p.bone },\n pixels: [\n \"................\",\n \".......kkkkk....\",\n \"......kmmmmmkk..\",\n \".....kmlmmmmmdk.\",\n \"....kmllmmmmmdk.\",\n \"....kmlmmmmmmdk.\",\n \"....kmmmmmmmddk.\",\n \".....kmmmmmddk..\",\n \"....kkkdddddk...\",\n \"...kbbkkkkkk....\",\n \"..kbbk..........\",\n \".kbbbk..........\",\n \"kbbbk...........\",\n \".kkk............\",\n \"................\",\n \"................\",\n ],\n});\n\nexport const XPOrbIcon = /*#__PURE__*/ createPixelIcon(\"XPOrbIcon\", {\n palette: { k: p.outline, l: p.emeraldLight, b: p.emerald, d: p.emeraldDark, w: p.goldLight },\n pixels: [\n \"................\",\n \".......kk.......\",\n \".....kkllkk.....\",\n \"....kllbbllk....\",\n \"...klblbbbblk...\",\n \"..klbllllbbblk..\",\n \"..kllwwllbbbdk..\",\n \".klbbllllbbbblk.\",\n \".klbblllbbbbbdk.\",\n \"..klbbbbbbbbdk..\",\n \"..klbbbbbbbbdk..\",\n \"...klbbbbbbdk...\",\n \"....kldbbddk....\",\n \".....kkldkk.....\",\n \".......kk.......\",\n \"................\",\n ],\n});\n"],"mappings":";;;AAKA,IAAa,YAA0B,8BAAgB,aAAa;CAClE,SAAS;EAAE,GAAG,EAAE;EAAS,GAAG,EAAE;EAAY,GAAG,EAAE;EAAO,GAAG,EAAE;CAAU;CACrE,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF,CAAC;AAED,IAAa,YAA0B,8BAAgB,aAAa;CAClE,SAAS;EAAE,GAAG,EAAE;EAAS,GAAG,EAAE;EAAM,GAAG,EAAE;EAAW,GAAG,EAAE;CAAS;CAClE,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF,CAAC;AAED,IAAa,WAAyB,8BAAgB,YAAY;CAChE,SAAS;EAAE,GAAG,EAAE;EAAS,GAAG,EAAE;EAAM,GAAG,EAAE;EAAW,GAAG,EAAE;EAAU,GAAG,EAAE;CAAK;CAC7E,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF,CAAC;AAED,IAAa,YAA0B,8BAAgB,aAAa;CAClE,SAAS;EAAE,GAAG,EAAE;EAAS,GAAG,EAAE;EAAc,GAAG,EAAE;EAAS,GAAG,EAAE;EAAa,GAAG,EAAE;CAAU;CAC3F,QAAQ;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const DiamondIcon: import("..").PixelIcon;
|
|
2
|
+
export declare const EmeraldIcon: import("..").PixelIcon;
|
|
3
|
+
export declare const GoldIcon: import("..").PixelIcon;
|
|
4
|
+
export declare const IronIcon: import("..").PixelIcon;
|
|
5
|
+
export declare const RedstoneIcon: import("..").PixelIcon;
|
|
6
|
+
export declare const CoalIcon: import("..").PixelIcon;
|
|
7
|
+
export declare const SwordIcon: import("..").PixelIcon;
|
|
8
|
+
export declare const DiamondSwordIcon: import("..").PixelIcon;
|
|
9
|
+
export declare const PickaxeIcon: import("..").PixelIcon;
|
|
10
|
+
export declare const AxeIcon: import("..").PixelIcon;
|
|
11
|
+
export declare const ShovelIcon: import("..").PixelIcon;
|
|
12
|
+
export declare const ChestIcon: import("..").PixelIcon;
|
|
13
|
+
export declare const AppleIcon: import("..").PixelIcon;
|
|
14
|
+
export declare const BreadIcon: import("..").PixelIcon;
|
|
15
|
+
export declare const BucketIcon: import("..").PixelIcon;
|
|
16
|
+
export declare const TorchIcon: import("..").PixelIcon;
|
|
17
|
+
export declare const FireIcon: import("..").PixelIcon;
|
|
18
|
+
export declare const CoinIcon: import("..").PixelIcon;
|
|
19
|
+
export declare const ClockIcon: import("..").PixelIcon;
|
|
20
|
+
export declare const CompassIcon: import("..").PixelIcon;
|
|
21
|
+
export declare const PlanksIcon: import("..").PixelIcon;
|
|
22
|
+
export declare const StoneIcon: import("..").PixelIcon;
|
|
23
|
+
export declare const DirtIcon: import("..").PixelIcon;
|
|
24
|
+
export declare const SandIcon: import("..").PixelIcon;
|
|
25
|
+
export declare const ObsidianIcon: import("..").PixelIcon;
|
|
26
|
+
export declare const DiamondOreIcon: import("..").PixelIcon;
|
|
27
|
+
export declare const BookIcon: import("..").PixelIcon;
|
|
28
|
+
//# sourceMappingURL=items.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../src/icons/items.ts"],"names":[],"mappings":"AAKA,eAAO,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