@bysages/icons 0.2.2

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 By Sages
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.
@@ -0,0 +1,63 @@
1
+ //#region ../../node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/types.d.ts
2
+ /**
3
+ * Icon dimensions.
4
+ *
5
+ * Used in:
6
+ * icon (as is)
7
+ * alias (overwrite icon's properties)
8
+ * root of JSON file (default values)
9
+ */
10
+ interface IconifyDimenisons {
11
+ // Left position of viewBox.
12
+ // Defaults to 0.
13
+ left?: number;
14
+ // Top position of viewBox.
15
+ // Defaults to 0.
16
+ top?: number;
17
+ // Width of viewBox.
18
+ // Defaults to 16.
19
+ width?: number;
20
+ // Height of viewBox.
21
+ // Defaults to 16.
22
+ height?: number;
23
+ }
24
+ /**
25
+ * Icon transformations.
26
+ *
27
+ * Used in:
28
+ * icon (as is)
29
+ * alias (merged with icon's properties)
30
+ */
31
+ interface IconifyTransformations {
32
+ // Number of 90 degrees rotations.
33
+ // 0 = 0, 1 = 90deg and so on.
34
+ // Defaults to 0.
35
+ // When merged (such as alias + icon), result is icon.rotation + alias.rotation.
36
+ rotate?: number;
37
+ // Horizontal flip.
38
+ // Defaults to false.
39
+ // When merged, result is icon.hFlip !== alias.hFlip
40
+ hFlip?: boolean;
41
+ // Vertical flip. (see hFlip comments)
42
+ vFlip?: boolean;
43
+ }
44
+ /**
45
+ * Combination of dimensions and transformations.
46
+ */
47
+ interface IconifyOptional extends IconifyDimenisons, IconifyTransformations {}
48
+ /**
49
+ * Icon.
50
+ */
51
+ interface IconifyIcon extends IconifyOptional {
52
+ // Icon body: <path d="..." />, required.
53
+ body: string;
54
+ // IconifyOptional properties.
55
+ // If property is missing in JSON file, look in root object for default value.
56
+ }
57
+ //#endregion
58
+ //#region src/index.d.ts
59
+ /** The registry holds only the curated list in icons.config.json — a name
60
+ * outside it is a miss, and the wrappers treat a miss as a loud error. */
61
+ export declare function getIcon(name: string): IconifyIcon | undefined;
62
+ //#endregion
63
+ export type { IconifyIcon };
package/dist/index.mjs ADDED
@@ -0,0 +1,144 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __exportAll = (all, no_symbols) => {
4
+ let target = {};
5
+ for (var name in all) __defProp(target, name, {
6
+ get: all[name],
7
+ enumerable: true
8
+ });
9
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
10
+ return target;
11
+ };
12
+ //#endregion
13
+ //#region src/data.generated.ts
14
+ var data_generated_exports = /* @__PURE__ */ __exportAll({
15
+ calendar: () => calendar,
16
+ check: () => check,
17
+ chevron_down: () => chevron_down,
18
+ chevron_left: () => chevron_left,
19
+ chevron_right: () => chevron_right,
20
+ chevron_up: () => chevron_up,
21
+ chevrons_up_down: () => chevrons_up_down,
22
+ eye: () => eye,
23
+ eye_off: () => eye_off,
24
+ file: () => file,
25
+ globe: () => globe,
26
+ minus: () => minus,
27
+ pause: () => pause,
28
+ pen_line: () => pen_line,
29
+ play: () => play,
30
+ plus: () => plus,
31
+ rotate_ccw: () => rotate_ccw,
32
+ rotate_cw: () => rotate_cw,
33
+ trash_2: () => trash_2,
34
+ x: () => x
35
+ });
36
+ const calendar = {
37
+ width: 24,
38
+ height: 24,
39
+ body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M8 2v3m8-3v3\"/><rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\"/><path d=\"M3 9h18\"/></g>"
40
+ };
41
+ const check = {
42
+ width: 24,
43
+ height: 24,
44
+ body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M20 6L9 17l-5-5\"/>"
45
+ };
46
+ const chevron_down = {
47
+ width: 24,
48
+ height: 24,
49
+ body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m6 9l6 6l6-6\"/>"
50
+ };
51
+ const chevron_left = {
52
+ width: 24,
53
+ height: 24,
54
+ body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m15 18l-6-6l6-6\"/>"
55
+ };
56
+ const chevron_right = {
57
+ width: 24,
58
+ height: 24,
59
+ body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m9 18l6-6l-6-6\"/>"
60
+ };
61
+ const chevron_up = {
62
+ width: 24,
63
+ height: 24,
64
+ body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m18 15l-6-6l-6 6\"/>"
65
+ };
66
+ const chevrons_up_down = {
67
+ width: 24,
68
+ height: 24,
69
+ body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m7 15l5 5l5-5M7 9l5-5l5 5\"/>"
70
+ };
71
+ const eye = {
72
+ width: 24,
73
+ height: 24,
74
+ body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/></g>"
75
+ };
76
+ const eye_off = {
77
+ width: 24,
78
+ height: 24,
79
+ body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575a1 1 0 0 1 0 .696a10.8 10.8 0 0 1-1.444 2.49m-6.41-.679a3 3 0 0 1-4.242-4.242\"/><path d=\"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 4.446-5.143M2 2l20 20\"/></g>"
80
+ };
81
+ const file = {
82
+ width: 24,
83
+ height: 24,
84
+ body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\"/><path d=\"M14 2v5a1 1 0 0 0 1 1h5\"/></g>"
85
+ };
86
+ const globe = {
87
+ width: 24,
88
+ height: 24,
89
+ body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 2a14.5 14.5 0 0 0 0 20a14.5 14.5 0 0 0 0-20M2 12h20\"/></g>"
90
+ };
91
+ const minus = {
92
+ width: 24,
93
+ height: 24,
94
+ body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 12h14\"/>"
95
+ };
96
+ const pause = {
97
+ width: 24,
98
+ height: 24,
99
+ body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><rect width=\"5\" height=\"18\" x=\"14\" y=\"3\" rx=\"1\"/><rect width=\"5\" height=\"18\" x=\"5\" y=\"3\" rx=\"1\"/></g>"
100
+ };
101
+ const pen_line = {
102
+ width: 24,
103
+ height: 24,
104
+ body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M13 21h8m.174-14.188a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z\"/>"
105
+ };
106
+ const play = {
107
+ width: 24,
108
+ height: 24,
109
+ body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z\"/>"
110
+ };
111
+ const plus = {
112
+ width: 24,
113
+ height: 24,
114
+ body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 12h14m-7-7v14\"/>"
115
+ };
116
+ const rotate_ccw = {
117
+ width: 24,
118
+ height: 24,
119
+ body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8\"/><path d=\"M3 3v5h5\"/></g>"
120
+ };
121
+ const rotate_cw = {
122
+ width: 24,
123
+ height: 24,
124
+ body: "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8\"/><path d=\"M21 3v5h-5\"/></g>"
125
+ };
126
+ const trash_2 = {
127
+ width: 24,
128
+ height: 24,
129
+ body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10 11v6m4-6v6m5-11v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"/>"
130
+ };
131
+ const x = {
132
+ width: 24,
133
+ height: 24,
134
+ body: "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M18 6L6 18M6 6l12 12\"/>"
135
+ };
136
+ //#endregion
137
+ //#region src/index.ts
138
+ /** The registry holds only the curated list in icons.config.json — a name
139
+ * outside it is a miss, and the wrappers treat a miss as a loud error. */
140
+ function getIcon(name) {
141
+ return data_generated_exports[name.replace(/-/g, "_")];
142
+ }
143
+ //#endregion
144
+ export { getIcon };
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@bysages/icons",
3
+ "version": "0.2.2",
4
+ "description": "Icon registry for By Sages Elements — iconify-format glyphs drawn from a curated collection, one canonical set for every framework wrapper",
5
+ "keywords": [
6
+ "design-system",
7
+ "iconify",
8
+ "icons",
9
+ "ui"
10
+ ],
11
+ "homepage": "https://github.com/bysages/elements#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/bysages/elements/issues"
14
+ },
15
+ "license": "MIT",
16
+ "author": {
17
+ "name": "By Sages",
18
+ "email": "contact@bysages.com",
19
+ "url": "https://www.bysages.com/"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/bysages/elements.git"
24
+ },
25
+ "files": [
26
+ "dist"
27
+ ],
28
+ "type": "module",
29
+ "main": "dist/index.mjs",
30
+ "types": "dist/index.d.mts",
31
+ "exports": {
32
+ ".": {
33
+ "types": "./dist/index.d.mts",
34
+ "import": "./dist/index.mjs"
35
+ }
36
+ },
37
+ "devDependencies": {
38
+ "@iconify-json/lucide": "1.2.132",
39
+ "@iconify/types": "2.0.0",
40
+ "@iconify/utils": "3.1.7"
41
+ },
42
+ "scripts": {
43
+ "generate": "node scripts/generate.mjs",
44
+ "dev": "basis build --stub",
45
+ "build": "vp pack",
46
+ "release": "basis publish"
47
+ }
48
+ }