@particle-network/icons 0.0.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.
Files changed (211) hide show
  1. package/.turbo/turbo-build.log +1024 -0
  2. package/.turbo/turbo-lint.log +4 -0
  3. package/.turbo/turbo-type-check.log +4 -0
  4. package/CHANGELOG.md +17 -0
  5. package/README.md +7 -0
  6. package/eslint.config.js +15 -0
  7. package/package.json +36 -0
  8. package/rslib.config.ts +21 -0
  9. package/scripts/generate-icons.ts +231 -0
  10. package/scripts/templates.ts +117 -0
  11. package/scripts/utils.ts +5 -0
  12. package/src/core/index.tsx +41 -0
  13. package/svg/Internet.svg +3 -0
  14. package/svg/alert-off.svg +3 -0
  15. package/svg/alert-on.svg +3 -0
  16. package/svg/all.svg +3 -0
  17. package/svg/assets-2.svg +3 -0
  18. package/svg/assets.svg +10 -0
  19. package/svg/backup-wallet.svg +4 -0
  20. package/svg/bottle.svg +9 -0
  21. package/svg/bubble-chain.svg +3 -0
  22. package/svg/bundler.svg +21 -0
  23. package/svg/burn.svg +4 -0
  24. package/svg/cabal-leader.svg +4 -0
  25. package/svg/cabals.svg +4 -0
  26. package/svg/camera.svg +3 -0
  27. package/svg/cash-add.svg +3 -0
  28. package/svg/cash-in.svg +3 -0
  29. package/svg/chart-candle.svg +10 -0
  30. package/svg/chart-line.svg +3 -0
  31. package/svg/check.svg +3 -0
  32. package/svg/chevron-down.svg +3 -0
  33. package/svg/chevron-left.svg +3 -0
  34. package/svg/chevron-right.svg +3 -0
  35. package/svg/chevron-up.svg +3 -0
  36. package/svg/choose.svg +3 -0
  37. package/svg/circle-checked.svg +3 -0
  38. package/svg/circle-minus.svg +3 -0
  39. package/svg/circle-plus.svg +3 -0
  40. package/svg/clear.svg +4 -0
  41. package/svg/close.svg +3 -0
  42. package/svg/cloud.svg +10 -0
  43. package/svg/color-cancelled.svg +7 -0
  44. package/svg/color-error.svg +3 -0
  45. package/svg/color-evm.svg +18 -0
  46. package/svg/color-failed-light.svg +4 -0
  47. package/svg/color-failed.svg +10 -0
  48. package/svg/color-instagram.svg +28 -0
  49. package/svg/color-launch-platform.svg +26 -0
  50. package/svg/color-pause.svg +19 -0
  51. package/svg/color-pending.svg +15 -0
  52. package/svg/color-safe.svg +3 -0
  53. package/svg/color-success-light.svg +5 -0
  54. package/svg/color-success.svg +5 -0
  55. package/svg/color-tiktok.svg +7 -0
  56. package/svg/color-twitter-tweet.svg +3 -0
  57. package/svg/color-warning.svg +3 -0
  58. package/svg/color-youtube.svg +4 -0
  59. package/svg/concept.svg +4 -0
  60. package/svg/connect.svg +3 -0
  61. package/svg/control.svg +3 -0
  62. package/svg/copy.svg +3 -0
  63. package/svg/crown.svg +3 -0
  64. package/svg/cube.svg +21 -0
  65. package/svg/dashboard.svg +3 -0
  66. package/svg/delete.svg +3 -0
  67. package/svg/dev.svg +10 -0
  68. package/svg/disconnect.svg +3 -0
  69. package/svg/dockBottom.svg +10 -0
  70. package/svg/dockRight.svg +10 -0
  71. package/svg/dollar-hexagon.svg +4 -0
  72. package/svg/dollar-white.svg +10 -0
  73. package/svg/dot.svg +3 -0
  74. package/svg/down-arrow.svg +3 -0
  75. package/svg/down.svg +3 -0
  76. package/svg/download.svg +5 -0
  77. package/svg/draggable.svg +3 -0
  78. package/svg/draggableV.svg +3 -0
  79. package/svg/earn-dollar.svg +4 -0
  80. package/svg/edit.svg +4 -0
  81. package/svg/empty-box.svg +5 -0
  82. package/svg/exchange.svg +3 -0
  83. package/svg/export.svg +5 -0
  84. package/svg/external-link.svg +3 -0
  85. package/svg/eye-closed.svg +3 -0
  86. package/svg/eye-open.svg +3 -0
  87. package/svg/fast-forward.svg +5 -0
  88. package/svg/filter-2.svg +3 -0
  89. package/svg/filter.svg +3 -0
  90. package/svg/filterDelete.svg +4 -0
  91. package/svg/fire.svg +3 -0
  92. package/svg/flash.svg +3 -0
  93. package/svg/float.svg +4 -0
  94. package/svg/folder.svg +3 -0
  95. package/svg/gasfee.svg +6 -0
  96. package/svg/ghost.svg +26 -0
  97. package/svg/hidden.svg +3 -0
  98. package/svg/history.svg +8 -0
  99. package/svg/import-export.svg +4 -0
  100. package/svg/insiders.svg +26 -0
  101. package/svg/invite-dollar.svg +3 -0
  102. package/svg/join-our-community.svg +3 -0
  103. package/svg/k-line.svg +3 -0
  104. package/svg/list-setting.svg +3 -0
  105. package/svg/listed.svg +9 -0
  106. package/svg/lock.svg +3 -0
  107. package/svg/logo-discord.svg +10 -0
  108. package/svg/logo-telegram.svg +3 -0
  109. package/svg/logo-x.svg +10 -0
  110. package/svg/mail.svg +3 -0
  111. package/svg/migrating-arrow.svg +3 -0
  112. package/svg/mnemonic-toggle.svg +3 -0
  113. package/svg/more.svg +5 -0
  114. package/svg/network.svg +3 -0
  115. package/svg/no-mint.svg +11 -0
  116. package/svg/orders.svg +4 -0
  117. package/svg/owl.svg +9 -0
  118. package/svg/panel.svg +10 -0
  119. package/svg/particle.svg +6 -0
  120. package/svg/passkey.svg +3 -0
  121. package/svg/paste.svg +3 -0
  122. package/svg/pause.svg +3 -0
  123. package/svg/pause2.svg +19 -0
  124. package/svg/percent_sign.svg +3 -0
  125. package/svg/person-follow.svg +6 -0
  126. package/svg/person.svg +17 -0
  127. package/svg/pin.svg +4 -0
  128. package/svg/pinned.svg +5 -0
  129. package/svg/play.svg +19 -0
  130. package/svg/plus.svg +3 -0
  131. package/svg/pro-trader.svg +3 -0
  132. package/svg/profile-update.svg +4 -0
  133. package/svg/pulse.svg +3 -0
  134. package/svg/question.svg +4 -0
  135. package/svg/radio-off.svg +3 -0
  136. package/svg/radio-on.svg +11 -0
  137. package/svg/re-tweet.svg +3 -0
  138. package/svg/red-pocket.svg +3 -0
  139. package/svg/refresh.svg +3 -0
  140. package/svg/refresh2.svg +3 -0
  141. package/svg/rotate-right.svg +3 -0
  142. package/svg/scale-in.svg +4 -0
  143. package/svg/search.svg +3 -0
  144. package/svg/secure-tips1.svg +10 -0
  145. package/svg/secure-tips2.svg +10 -0
  146. package/svg/secure-tips3.svg +5 -0
  147. package/svg/setting.svg +3 -0
  148. package/svg/settings-2.svg +3 -0
  149. package/svg/settings.svg +5 -0
  150. package/svg/share.svg +3 -0
  151. package/svg/shield-error-2.svg +3 -0
  152. package/svg/shield-error.svg +4 -0
  153. package/svg/shield-off.svg +4 -0
  154. package/svg/shield-success-2.svg +3 -0
  155. package/svg/shield-success.svg +4 -0
  156. package/svg/shield-warning-2.svg +3 -0
  157. package/svg/shield-warning.svg +4 -0
  158. package/svg/shield.svg +4 -0
  159. package/svg/smart-wallet.svg +3 -0
  160. package/svg/sniper.svg +15 -0
  161. package/svg/snowflake.svg +19 -0
  162. package/svg/sort-down.svg +3 -0
  163. package/svg/sort-filter-up.svg +3 -0
  164. package/svg/sort-filter.svg +3 -0
  165. package/svg/sound.svg +3 -0
  166. package/svg/square-plus.svg +4 -0
  167. package/svg/star-mark.svg +4 -0
  168. package/svg/star.svg +3 -0
  169. package/svg/starred.svg +3 -0
  170. package/svg/status-fail.svg +4 -0
  171. package/svg/status-success.svg +4 -0
  172. package/svg/switch.svg +3 -0
  173. package/svg/swords.svg +3 -0
  174. package/svg/tabbar-account.svg +4 -0
  175. package/svg/tabbar-discover.svg +4 -0
  176. package/svg/tabbar-earn.svg +3 -0
  177. package/svg/tabbar-home.svg +3 -0
  178. package/svg/tabbar-trade.svg +5 -0
  179. package/svg/target.svg +15 -0
  180. package/svg/time-end.svg +4 -0
  181. package/svg/timer.svg +11 -0
  182. package/svg/timer2.svg +3 -0
  183. package/svg/token-share.svg +3 -0
  184. package/svg/top10.svg +5 -0
  185. package/svg/track.svg +3 -0
  186. package/svg/tracked.svg +3 -0
  187. package/svg/trading-view.svg +3 -0
  188. package/svg/trend-chart.svg +4 -0
  189. package/svg/triangle-down.svg +6 -0
  190. package/svg/triangle-up.svg +3 -0
  191. package/svg/tweet-quote.svg +3 -0
  192. package/svg/twitter-community.svg +3 -0
  193. package/svg/twitter-tweet.svg +3 -0
  194. package/svg/up-arrow.svg +3 -0
  195. package/svg/up.svg +3 -0
  196. package/svg/user-lock.svg +3 -0
  197. package/svg/user-star.svg +5 -0
  198. package/svg/user.svg +3 -0
  199. package/svg/wallet-create.svg +3 -0
  200. package/svg/wallet-import.svg +4 -0
  201. package/svg/wallet-password.svg +11 -0
  202. package/svg/wallet-pin.svg +4 -0
  203. package/svg/wallet-receive.svg +3 -0
  204. package/svg/wallet-send.svg +3 -0
  205. package/svg/wallet.svg +5 -0
  206. package/svg/warning.svg +6 -0
  207. package/svg/window.svg +3 -0
  208. package/svg/wrench.svg +3 -0
  209. package/tsconfig.base.json +14 -0
  210. package/tsconfig.eslint.json +4 -0
  211. package/tsconfig.json +4 -0
@@ -0,0 +1,4 @@
1
+
2
+ yarn run v1.22.22
3
+ $ eslint . --no-error-on-unmatched-pattern --quiet
4
+ ✨ Done in 2.34s.
@@ -0,0 +1,4 @@
1
+
2
+ yarn run v1.22.22
3
+ $ npx tsc --noEmit -p ./tsconfig.json
4
+ ⠙✨ Done in 2.41s.
package/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # @particle-network/icons
2
+
3
+ ## 0.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - release
8
+ - Updated dependencies
9
+ - @particle-network/ui-shared@0.0.2
10
+
11
+ ## 0.0.1
12
+
13
+ ### Patch Changes
14
+
15
+ - 创建 ux design system
16
+ - Updated dependencies
17
+ - @particle-network/ui-shared@0.0.1
package/README.md ADDED
@@ -0,0 +1,7 @@
1
+ ## 如何添加 icon
2
+
3
+ 1. 在`packages/icons/svg` 中添加 svg 资源,命名为 kebab-case
4
+ 1. 在`packages/icons` 中运行
5
+ ```bash
6
+ yarn build
7
+ ```
@@ -0,0 +1,15 @@
1
+ import { getESLintConfig } from '@particle-network/eslint-config';
2
+ import { defineConfig } from 'eslint/config';
3
+
4
+ const config = [
5
+ ...getESLintConfig({
6
+ enableReact: true,
7
+ importMeta: import.meta.url,
8
+ tsProject: './tsconfig.eslint.json',
9
+ }),
10
+ {
11
+ ignores: ['./src/web/**/*', './src/native/**/*'],
12
+ },
13
+ ];
14
+
15
+ export default defineConfig(config);
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@particle-network/icons",
3
+ "type": "module",
4
+ "version": "0.0.2",
5
+ "exports": {
6
+ "./core": "./dist/core/index.js",
7
+ "./core/*": "./dist/core/*.js",
8
+ "./native": "./dist/native/index.js",
9
+ "./native/*": "./dist/native/*.js",
10
+ "./web": "./dist/web/index.js",
11
+ "./web/*": "./dist/web/*.js"
12
+ },
13
+ "scripts": {
14
+ "build": "yarn generate-icons && rslib build",
15
+ "build:fast": "rslib build",
16
+ "type-check": "npx tsc --noEmit -p ./tsconfig.json",
17
+ "lint": "eslint . --no-error-on-unmatched-pattern --quiet",
18
+ "lint:fix": "eslint . --fix --no-error-on-unmatched-pattern --quiet",
19
+ "clean": "rm -rf .turbo node_modules dist",
20
+ "generate-icons": "jiti scripts/generate-icons.ts"
21
+ },
22
+ "dependencies": {
23
+ "@particle-network/ui-shared": "*"
24
+ },
25
+ "devDependencies": {
26
+ "@particle-network/eslint-config": "*",
27
+ "@rsbuild/plugin-react": "^1.3.1",
28
+ "@rslib/core": "^0.9.1",
29
+ "@svgr/core": "^8.1.0",
30
+ "@svgr/plugin-jsx": "^8.1.0",
31
+ "@svgr/plugin-prettier": "^8.1.0",
32
+ "@svgr/plugin-svgo": "^8.1.0",
33
+ "react-native-svg": "15.11.2",
34
+ "typescript": "^5.8.3"
35
+ }
36
+ }
@@ -0,0 +1,21 @@
1
+ import { pluginReact } from '@rsbuild/plugin-react';
2
+ import { defineConfig } from '@rslib/core';
3
+
4
+ export default defineConfig({
5
+ source: {
6
+ entry: {
7
+ index: ['./src/**'],
8
+ },
9
+ },
10
+ lib: [
11
+ {
12
+ bundle: false,
13
+ dts: true,
14
+ format: 'esm',
15
+ },
16
+ ],
17
+ output: {
18
+ target: 'web',
19
+ },
20
+ plugins: [pluginReact()],
21
+ });
@@ -0,0 +1,231 @@
1
+ import { transform } from '@svgr/core';
2
+ import { deleteAsync } from 'del';
3
+ import fs from 'fs/promises';
4
+ import path from 'path';
5
+ import logger, { chalk, tasks } from 'super-cli-logger';
6
+ import { fileURLToPath } from 'url';
7
+
8
+ import {
9
+ generateNativeIconTemplate,
10
+ generateWebIconTemplate,
11
+ NATIVE_TYPES_TEMPLATE,
12
+ WEB_TYPES_TEMPLATE,
13
+ } from './templates';
14
+ import { getComponentName } from './utils';
15
+
16
+ // eslint-disable-next-line no-underscore-dangle
17
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
18
+ const packageRoot = path.join(__dirname, '..');
19
+ const ICONS_DIR = path.join(__dirname, '../svg');
20
+ const SRC_DIR = path.join(__dirname, '../src');
21
+ const WEB_COMPONENTS_DIR = path.join(SRC_DIR, 'web');
22
+ const NATIVE_COMPONENTS_DIR = path.join(SRC_DIR, 'native');
23
+ const WEB_TYPES_FILE = path.join(WEB_COMPONENTS_DIR, 'types.ts');
24
+ const NATIVE_TYPES_FILE = path.join(NATIVE_COMPONENTS_DIR, 'types.ts');
25
+
26
+ const webSvgoConfig = {
27
+ icon: true,
28
+ plugins: ['@svgr/plugin-svgo', '@svgr/plugin-jsx'],
29
+ svgo: true,
30
+ svgoConfig: {
31
+ plugins: [
32
+ {
33
+ name: 'prefixIds',
34
+ params: {
35
+ overrides: {
36
+ prefixIds: false,
37
+ },
38
+ },
39
+ },
40
+ ],
41
+ },
42
+ typescript: true,
43
+ ref: false,
44
+ memo: false,
45
+ expandProps: true,
46
+ svgProps: {
47
+ width: '{width}',
48
+ height: '{height}',
49
+ },
50
+ };
51
+
52
+ const nativeSvgoConfig = {
53
+ ...webSvgoConfig,
54
+ native: true,
55
+ };
56
+
57
+ // 添加清理 React Native 不兼容元素的函数
58
+ const cleanSvgForNative = (svgContent: string): string => {
59
+ return (
60
+ svgContent
61
+ // 移除 ForeignObject 元素
62
+ .replace(/<ForeignObject[^>]*>.*?<\/ForeignObject>/gi, '')
63
+ .replace(/<foreignObject[^>]*>.*?<\/foreignObject>/gi, '')
64
+ // 移除 shapeRendering 属性
65
+ .replace(/\s*shapeRendering="[^"]*"/gi, '')
66
+ .replace(/\s*shape-rendering="[^"]*"/gi, '')
67
+ // 移除 ClipPath 的 transform 属性
68
+ .replace(/(<ClipPath[^>]*)\s*transform="[^"]*"/gi, '$1')
69
+ .replace(/(<clipPath[^>]*)\s*transform="[^"]*"/gi, '$1')
70
+ // 移除复杂的滤镜效果
71
+ .replace(/\s*filter="[^"]*"/gi, '')
72
+ // 移除 data-figma-bg-blur-radius 属性
73
+ .replace(/\s*data-figma-bg-blur-radius="[^"]*"/gi, '')
74
+ // 移除 xmlns:xlink 属性
75
+ .replace(/\s*xmlnsXlink="[^"]*"/gi, '')
76
+ .replace(/\s*xmlns:xlink="[^"]*"/gi, '')
77
+ // 替换 xlinkHref 为 href
78
+ .replace(/xlinkHref=/gi, 'href=')
79
+ .replace(/xlink:href=/gi, 'href=')
80
+ // 移除空的 G 元素
81
+ .replace(/<G><\/G>/gi, '')
82
+ .replace(/<g><\/g>/gi, '')
83
+ // 移除 preserveAspectRatio 在 Image 元素中(React Native 不支持)
84
+ .replace(/(<Image[^>]*)\s*preserveAspectRatio="[^"]*"/gi, '$1')
85
+ .trim()
86
+ );
87
+ };
88
+
89
+ async function generateWebComponent(svgName: string, svgContent: string) {
90
+ const componentName = getComponentName(svgName);
91
+ // @ts-expect-error svgo config
92
+ const webJsCode = await transform(svgContent, webSvgoConfig, { componentName });
93
+ // Extract the SVG content from the generated code
94
+ const webSvgMatch = webJsCode.match(/<svg[^>]*>[\s\S]*<\/svg>/);
95
+ if (!webSvgMatch) {
96
+ logger.fatal(`Could not extract SVG content from ${svgName} for web`);
97
+ }
98
+ const webSvgContent = webSvgMatch[0].replace(/xmlns="[^"]*"/g, '');
99
+ // Create the final web component code
100
+ const webFinalCode = generateWebIconTemplate(svgName, webSvgContent);
101
+ // Write the web component file
102
+ const webComponentPath = path.join(WEB_COMPONENTS_DIR, `${componentName}.tsx`);
103
+ await fs.writeFile(webComponentPath, webFinalCode);
104
+ }
105
+
106
+ async function generateNativeComponent(svgName: string, svgContent: string) {
107
+ const componentName = getComponentName(svgName);
108
+ // @ts-expect-error svgo config
109
+ const nativeJsCode = await transform(svgContent, nativeSvgoConfig, { componentName });
110
+ // Extract the SVG content from the generated code
111
+ const nativeSvgMatch = nativeJsCode.match(/<Svg[^>]*>[\s\S]*<\/Svg>/);
112
+ if (!nativeSvgMatch) {
113
+ logger.fatal(`Could not extract SVG content from ${svgName} for native`);
114
+ }
115
+ let nativeSvgContent = nativeSvgMatch[0].replace(/xmlns="[^"]*"/g, '');
116
+
117
+ // 清理 React Native 不兼容的元素和属性
118
+ nativeSvgContent = cleanSvgForNative(nativeSvgContent);
119
+
120
+ // Create the final native component code
121
+ const nativeFinalCode = generateNativeIconTemplate(svgName, nativeSvgContent);
122
+ // Write the native component file
123
+ const nativeComponentPath = path.join(NATIVE_COMPONENTS_DIR, `${componentName}.tsx`);
124
+ await fs.writeFile(nativeComponentPath, nativeFinalCode);
125
+ }
126
+
127
+ async function main() {
128
+ logger.intro('Icon Generator');
129
+ try {
130
+ logger.title('整理目录');
131
+ await tasks([
132
+ {
133
+ title: '删除 Icon 组件目录',
134
+ task: async () => {
135
+ await deleteAsync([WEB_COMPONENTS_DIR, NATIVE_COMPONENTS_DIR]);
136
+ },
137
+ },
138
+ {
139
+ title: '创建 web 组件目录',
140
+ task: async () => {
141
+ await fs.mkdir(WEB_COMPONENTS_DIR, { recursive: true });
142
+ },
143
+ },
144
+ {
145
+ title: '创建 native 组件目录',
146
+ task: async () => {
147
+ await fs.mkdir(NATIVE_COMPONENTS_DIR, { recursive: true });
148
+ },
149
+ },
150
+ {
151
+ title: '创建 web types 文件',
152
+ task: async () => {
153
+ await fs.writeFile(WEB_TYPES_FILE, WEB_TYPES_TEMPLATE);
154
+ },
155
+ },
156
+ {
157
+ title: '创建 native types 文件',
158
+ task: async () => {
159
+ await fs.writeFile(NATIVE_TYPES_FILE, NATIVE_TYPES_TEMPLATE);
160
+ },
161
+ },
162
+ ]);
163
+
164
+ // Read all SVG files from icons directory
165
+ const files = await fs.readdir(ICONS_DIR);
166
+ const svgFiles = files.filter((file) => file.endsWith('.svg'));
167
+
168
+ // Store component names for index file generation
169
+ const componentNames: string[] = [];
170
+
171
+ logger.title('生成 Icon 组件');
172
+ for (const svgFile of svgFiles) {
173
+ // Read SVG content
174
+ const svgPath = path.join(ICONS_DIR, svgFile);
175
+ const svgContent = await fs.readFile(svgPath, 'utf-8');
176
+
177
+ const svgName = svgFile.replace('.svg', '');
178
+ const componentName = getComponentName(svgName);
179
+
180
+ // Add component name to the list
181
+ componentNames.push(componentName);
182
+
183
+ await tasks([
184
+ {
185
+ title: chalk.gray(`${path.relative(packageRoot, WEB_COMPONENTS_DIR)}/`) + chalk.cyan(`${componentName}.tsx`),
186
+ task: async () => {
187
+ await generateWebComponent(svgName, svgContent);
188
+ },
189
+ },
190
+ {
191
+ title:
192
+ chalk.gray(`${path.relative(packageRoot, NATIVE_COMPONENTS_DIR)}/`) + chalk.cyan(`${componentName}.tsx`),
193
+ task: async () => {
194
+ await generateNativeComponent(svgName, svgContent);
195
+ },
196
+ },
197
+ ]);
198
+ }
199
+
200
+ // Generate index files
201
+ logger.title('生成 index 文件');
202
+ await tasks([
203
+ {
204
+ title: '创建 web/index.ts',
205
+ task: async () => {
206
+ const webIndexContent = componentNames
207
+ .map((name) => `export { default as ${name} } from './${name}';`)
208
+ .join('\n');
209
+ const webIndexPath = path.join(WEB_COMPONENTS_DIR, 'index.ts');
210
+ await fs.writeFile(webIndexPath, `${webIndexContent}\n`);
211
+ },
212
+ },
213
+ {
214
+ title: '创建 native/index.ts',
215
+ task: async () => {
216
+ const nativeIndexContent = componentNames
217
+ .map((name) => `export { default as ${name} } from './${name}';`)
218
+ .join('\n');
219
+ const nativeIndexPath = path.join(NATIVE_COMPONENTS_DIR, 'index.ts');
220
+ await fs.writeFile(nativeIndexPath, `${nativeIndexContent}\n`);
221
+ },
222
+ },
223
+ ]);
224
+ logger.outro();
225
+ } catch (error) {
226
+ logger.error(error, true);
227
+ logger.fatal('生成 Icon 组件时出错');
228
+ }
229
+ }
230
+
231
+ main();
@@ -0,0 +1,117 @@
1
+ import { getComponentName } from './utils';
2
+
3
+ export const processSvgContent = (svgContent: string, svgName: string) => {
4
+ // 检查是否存在 fill 属性, 排除 fill="none" 的情况
5
+ const hasFill = /fill="(?!none)[^"]*"/.test(svgContent);
6
+ // 检查是否存在 stroke 属性, 排除 stroke="none" 的情况
7
+ const hasStroke = /stroke="(?!none)[^"]*"/.test(svgContent);
8
+
9
+ let componentProps = `size = 16,
10
+ width = size,
11
+ height = size,
12
+ color = 'currentColor' as T`;
13
+
14
+ // 彩色图标只有 size 属性
15
+ if (svgName.startsWith('color-')) {
16
+ const finalSvgContent = `
17
+ return ${svgContent};
18
+ `;
19
+ componentProps = `size = 16,
20
+ width = size,
21
+ height = size`;
22
+ return { componentProps, finalSvgContent };
23
+ }
24
+
25
+ let finalSvgContent = `
26
+ const { getColor } = useIconsContext();
27
+ const _color = isThemeColor(color) ? getColor(color as UXColor) : color;
28
+ `;
29
+
30
+ if (hasFill) {
31
+ finalSvgContent += `
32
+ const fill = props.fill || _color;
33
+ `;
34
+ }
35
+
36
+ if (hasStroke) {
37
+ finalSvgContent += `
38
+ const stroke = props.stroke || _color;
39
+ `;
40
+ }
41
+
42
+ const processedSvgContent = svgContent
43
+ .replace(/fill="([^"]*)"/g, (match, p1) => {
44
+ if (p1 === 'none') return match;
45
+ return 'fill={fill}';
46
+ })
47
+ .replace(/stroke="([^"]*)"/g, 'stroke={stroke}');
48
+
49
+ finalSvgContent += `
50
+ return ${processedSvgContent};
51
+ `;
52
+
53
+ return { componentProps, finalSvgContent };
54
+ };
55
+
56
+ export const WEB_TYPES_TEMPLATE = `import { type SVGProps } from 'react';
57
+ import { type IconColor } from '../core';
58
+
59
+ export type IconProps<T extends string = IconColor> = SVGProps<SVGSVGElement> & {
60
+ size?: number;
61
+ color?: T;
62
+ };
63
+ `;
64
+
65
+ export const NATIVE_TYPES_TEMPLATE = `import { type SvgProps } from 'react-native-svg';
66
+ import { type IconColor } from '../core';
67
+
68
+ export type IconProps<T extends string = IconColor> = SvgProps & {
69
+ size?: number;
70
+ color?: T;
71
+ };
72
+ `;
73
+
74
+ export const generateWebIconTemplate = (svgName: string, svgTsxContent: string) => {
75
+ const componentName = getComponentName(svgName);
76
+ const { componentProps, finalSvgContent } = processSvgContent(svgTsxContent, svgName);
77
+
78
+ return `import React from 'react';
79
+ import { type IconColor, isThemeColor, useIconsContext } from '../core';
80
+ import { type UXColor } from '@particle-network/ui-shared';
81
+ import { type IconProps } from './types';
82
+
83
+ const ${componentName} = <T extends string = IconColor>({
84
+ ${componentProps},
85
+ ...props
86
+ }: IconProps<T>) => {
87
+ ${finalSvgContent}
88
+ };
89
+
90
+ ${componentName}.displayName = '${componentName}|${svgName}';
91
+
92
+ export default ${componentName};
93
+ `;
94
+ };
95
+
96
+ export const generateNativeIconTemplate = (svgName: string, svgTsxContent: string) => {
97
+ const componentName = getComponentName(svgName);
98
+ const { componentProps, finalSvgContent } = processSvgContent(svgTsxContent, svgName);
99
+
100
+ return `import React from 'react';
101
+ import Svg, { Path, Circle, Rect, G, Defs, ClipPath, Mask, Pattern, Use, Image, LinearGradient, RadialGradient, Stop } from 'react-native-svg';
102
+ import { type IconColor, isThemeColor, useIconsContext } from '../core';
103
+ import { type UXColor } from '@particle-network/ui-shared';
104
+ import { type IconProps } from './types';
105
+
106
+ const ${componentName} = <T extends string = IconColor>({
107
+ ${componentProps},
108
+ ...props
109
+ }: IconProps<T>) => {
110
+ ${finalSvgContent}
111
+ };
112
+
113
+ ${componentName}.displayName = '${componentName}|${svgName}';
114
+
115
+ export default ${componentName};
116
+ `;
117
+ };
@@ -0,0 +1,5 @@
1
+ export const getComponentName = (svgName: string) =>
2
+ svgName
3
+ .split('-')
4
+ .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
5
+ .join('') + (svgName.toLowerCase().endsWith('icon.svg') ? '' : 'Icon');
@@ -0,0 +1,41 @@
1
+ import React, { createContext, useContext } from 'react';
2
+ import { colorMap, type UXColor } from '@particle-network/ui-shared';
3
+
4
+ export const isThemeColor = (color: string) => Object.keys(colorMap.light).includes(color);
5
+
6
+ export type IconColor = UXColor | 'currentColor';
7
+
8
+ interface IconsContextType {
9
+ theme: 'light' | 'dark';
10
+ bullishColor?: string;
11
+ bearishColor?: string;
12
+ getColor: (colorKey: UXColor) => string;
13
+ }
14
+
15
+ const IconsContext = createContext<IconsContextType>({
16
+ theme: 'light',
17
+ getColor: () => '',
18
+ });
19
+
20
+ export const useIconsContext = () => useContext(IconsContext);
21
+
22
+ interface IconsProviderProps {
23
+ children: React.ReactNode;
24
+ theme?: 'light' | 'dark';
25
+ bullishColor?: string;
26
+ bearishColor?: string;
27
+ }
28
+
29
+ export const IconsProvider = ({ children, theme = 'light', bullishColor, bearishColor }: IconsProviderProps) => {
30
+ const getColor = (colorKey: UXColor) => {
31
+ if (colorKey === 'bullish' && bullishColor) {
32
+ return bullishColor;
33
+ }
34
+ if (colorKey === 'bearish' && bearishColor) {
35
+ return bearishColor;
36
+ }
37
+ return colorMap[theme][colorKey] ?? colorKey;
38
+ };
39
+
40
+ return <IconsContext.Provider value={{ theme, getColor }}>{children}</IconsContext.Provider>;
41
+ };
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M20.0874 12.45H15.5964C15.5316 15.681 14.7864 18.4629 13.7127 19.9191C15.4462 19.5433 17.0085 18.6091 18.16 17.2599C19.3115 15.9107 19.9886 14.221 20.0874 12.45ZM20.0874 11.55C19.9886 9.77898 19.3115 8.08928 18.16 6.74009C17.0085 5.3909 15.4462 4.45674 13.7127 4.0809C14.7873 5.5371 15.5316 8.3199 15.5955 11.55H20.0874ZM3.9126 11.55H8.4036C8.4684 8.319 9.2136 5.5371 10.2873 4.0809C8.5538 4.45674 6.99147 5.3909 5.83997 6.74009C4.68847 8.08928 4.01139 9.77898 3.9126 11.55ZM3.9126 12.45C4.01139 14.221 4.68847 15.9107 5.83997 17.2599C6.99147 18.6091 8.5538 19.5433 10.2873 19.9191C9.2127 18.4629 8.4684 15.6801 8.4045 12.45H3.9126ZM14.6946 12.45H9.3054C9.3954 16.7502 10.7769 20.1 12 20.1C13.224 20.1 14.6037 16.7502 14.6946 12.45ZM14.6946 11.55C14.6055 7.2498 13.224 3.9 12 3.9C10.776 3.9 9.3954 7.2498 9.3045 11.55H14.6946ZM12 21C7.0293 21 3 16.9707 3 12C3 7.0293 7.0293 3 12 3C16.9707 3 21 7.0293 21 12C21 16.9707 16.9707 21 12 21Z" fill="white" stroke="white" stroke-width="0.334286"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M13.1323 10.8919L12.3002 9.13705V6.63382C12.3002 4.98221 11.1629 3.48543 9.52637 2.89189C9.4709 2.1693 8.80518 1.60156 8.00078 1.60156C7.19638 1.60156 6.5584 2.1693 6.47519 2.89189C4.81091 3.48543 3.70138 4.98221 3.70138 6.63382V9.13705L2.86924 10.8919C2.75829 11.1241 2.78603 11.3822 2.92472 11.5887C3.06341 11.7951 3.31305 11.9241 3.59043 11.9241H12.4111C12.6885 11.9241 12.9382 11.7951 13.0768 11.5887C13.2155 11.3822 13.2433 11.0983 13.1323 10.8919ZM3.64591 11.15L4.53353 9.29188V6.63382C4.53353 5.21447 5.55984 3.94995 7.02995 3.53705L7.36281 3.43382L7.30733 3.09834V3.02092C7.30733 2.65963 7.61245 2.37576 8.00078 2.37576C8.38911 2.37576 8.69423 2.65963 8.69423 3.02092V3.12414L8.63876 3.45963L8.97161 3.56285C10.4417 3.97576 11.468 5.24027 11.468 6.65963V9.31769L12.3557 11.1758H3.64591V11.15ZM8.00078 14.4016C8.77745 14.4016 9.38768 13.8338 9.38768 13.1112H6.61388C6.61388 13.8338 7.22412 14.4016 8.00078 14.4016Z" fill="white" stroke="white" stroke-width="0.32"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M13.1323 10.8919L12.3002 9.13705V6.63382C12.3002 4.98221 11.1629 3.48543 9.52637 2.89188C9.4709 2.1693 8.80518 1.60156 8.00078 1.60156C7.19638 1.60156 6.5584 2.1693 6.47519 2.89188C4.81091 3.48543 3.70138 4.98221 3.70138 6.63382V9.13705L2.86924 10.8919C2.75829 11.1241 2.78603 11.3822 2.92472 11.5887C3.06341 11.7951 3.31305 11.9241 3.59043 11.9241H12.4111C12.6885 11.9241 12.9382 11.7951 13.0768 11.5887C13.2155 11.3822 13.2433 11.0983 13.1323 10.8919ZM8.00078 14.4016C8.77745 14.4016 9.38768 13.8338 9.38768 13.1112H6.61388C6.61388 13.8338 7.22412 14.4016 8.00078 14.4016Z" fill="#FF620D" stroke="#FF620D" stroke-width="0.32"/>
3
+ </svg>
package/svg/all.svg ADDED
@@ -0,0 +1,3 @@
1
+ <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M19.5429 17.3143C16.4571 17.4857 14.7429 18.8571 14.7429 21.4286C14.9143 23.6571 16.2857 24.5143 19.0286 24.8571C21.2571 24.8571 23.1429 24.1714 24 22.6286C24 23.3143 24.1714 24 24.6857 24.5143H26.5714C26.0571 24 25.8857 22.9714 25.8857 21.6V16.4571C26.0571 13.0286 24.3429 11.4857 20.9143 11.4857C17.8286 11.3143 15.7714 12.6857 15.0857 15.2571L17.1429 15.7714C17.3143 14.0571 18.5143 13.0286 20.9143 13.3714C23.1429 13.3714 24.3429 14.5714 24 16.8C23.6571 16.8 22.1143 17.1429 19.5429 17.3143ZM23.8286 19.3714C23.6571 21.6 22.2857 22.9714 19.7143 23.1429C18 23.1429 16.8 22.4571 16.8 21.0857C16.8 19.7143 18 18.8571 20.2286 18.6857C22.4571 18.5143 23.6571 18.1714 23.8286 17.8286V19.3714ZM31.0286 6.68571H29.1429V24.1714H31.0286V6.68571ZM34.1143 6.68571V24.1714H36V6.68571H34.1143ZM27.6 26.9143C25.2 26.9143 23.1429 28.9714 23.1429 31.3714C23.1429 31.8857 23.1429 32.0571 23.3143 32.5714C21.6 33.2571 19.7143 33.4286 18 33.4286C9.42857 33.4286 2.22857 26.4 2.22857 17.6571C2.22857 8.91429 9.25714 1.88571 18 1.88571C21.4286 1.88571 24.5143 2.74286 26.9143 4.8C27.7714 5.14286 28.2857 4.97143 28.6286 4.62857C28.9714 3.94286 28.8 3.42857 28.2857 3.08571C25.3714 1.02857 21.7714 0 18 0C8.05714 0 0 8.05714 0 18C0 27.9429 8.05714 36 18 36C20.2286 36 22.4571 35.4857 24.5143 34.6286C25.3714 35.4857 26.5714 36 27.9429 36C30.3429 36 32.4 33.9429 32.4 31.5429C32.4 28.9714 30.1714 26.9143 27.6 26.9143ZM27.6 33.7714C26.2286 33.7714 25.3714 32.9143 25.3714 31.5429C25.3714 30.1714 26.2286 29.3143 27.6 29.3143C28.9714 29.3143 29.8286 30.1714 29.8286 31.5429C30 32.9143 28.9714 33.7714 27.6 33.7714Z" fill="#D745FF"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M15.375 9.82275C16.8 9.82275 18.1502 10.1128 19.2002 10.6938C20.1751 11.2014 21 12.0732 21 13.1616C20.9999 13.6696 20.7748 14.1776 20.5498 14.5405C20.7748 14.9035 21 15.3389 21 15.9194C21 17.0083 20.1751 17.8792 19.2002 18.3872C18.1502 18.9677 16.875 19.2583 15.375 19.2583C14.0503 19.2631 12.7418 18.9651 11.5498 18.3872C10.5749 17.8792 9.75 17.0083 9.75 15.9194C9.75 15.3389 9.97539 14.9035 10.2754 14.5405C9.97542 14.1776 9.75005 13.6696 9.75 13.1616C9.75 12.0732 10.5749 11.2019 11.5498 10.6938C12.5998 10.1128 13.95 9.82275 15.375 9.82275ZM9.59961 4.7417C11.2496 4.7417 12.675 5.10457 13.875 5.68506C15 6.26606 15.975 7.13734 16.125 8.29834C16.1999 8.66121 15.9002 9.09675 15.5254 9.16943C15.1504 9.24193 14.7 8.95138 14.625 8.58838C14.5499 8.08047 14.0997 7.49985 13.125 7.06494C12.2251 6.62948 10.9502 6.33843 9.52539 6.33838C8.02561 6.33838 6.67539 6.70159 5.77539 7.20947C4.87539 7.57247 4.5 8.15362 4.5 8.66162C4.50015 9.09703 4.72561 9.60517 5.40039 10.0405C6.00039 10.4759 6.90065 10.8387 8.02539 11.0562C8.40022 11.1293 8.69998 11.4919 8.625 11.9272C8.54998 12.2902 8.17459 12.5808 7.72461 12.5083C6.59974 12.2903 5.54952 11.9274 4.72461 11.4194C4.72453 11.424 4.72248 11.4915 4.65039 11.4917C4.57539 11.7097 4.5 11.8548 4.5 12.0728C4.50002 12.5077 4.72542 12.9437 5.40039 13.4517C6.00039 13.8866 6.90054 14.2493 8.02539 14.4673C8.40016 14.5399 8.69978 14.9026 8.625 15.3384C8.55 15.7014 8.17461 15.9919 7.72461 15.9194C6.5249 15.702 5.47527 15.3386 4.65039 14.7583C4.57539 14.9033 4.5 15.1209 4.5 15.3384C4.50009 15.8468 4.87532 16.3544 5.7002 16.8628C6.5252 17.3703 7.7252 17.7337 9.0752 17.8062C9.44995 17.8063 9.74975 18.169 9.75 18.5317C9.75 18.9672 9.3748 19.2581 8.9248 19.1851C7.34988 19.1125 5.92496 18.6769 4.875 18.0239C3.82506 17.4434 3 16.4993 3 15.3384C3.00006 14.8305 3.15005 14.3949 3.375 13.9595L3.59961 13.7417C3.2247 13.2338 3.00001 12.7261 3 12.0728C3 11.5648 3.15003 11.1293 3.375 10.6938C3.45 10.5489 3.52481 10.4753 3.6748 10.4028C3.22508 9.96745 3.00009 9.38727 3 8.66162C3 7.42774 3.89978 6.41131 5.09961 5.7583C6.29952 5.10485 7.87476 4.74175 9.59961 4.7417ZM19.3496 15.5562C18.2996 16.1371 16.8749 16.4995 15.375 16.4995C13.8751 16.4995 12.4504 16.1371 11.4004 15.5562C11.2504 15.7016 11.25 15.7744 11.25 15.9194C11.25 16.2824 11.5498 16.7183 12.2998 17.1538C13.0498 17.5168 14.175 17.8062 15.375 17.8062C16.575 17.8062 17.7002 17.5888 18.4502 17.1538C19.2002 16.7183 19.5 16.2824 19.5 15.9194C19.5 15.7744 19.4246 15.7011 19.3496 15.5562ZM15.375 11.2749C14.175 11.2749 13.0498 11.4922 12.2998 11.9272C11.5498 12.3627 11.25 12.7986 11.25 13.1616C11.2501 13.3796 11.4004 13.6696 11.7002 13.9595L11.7754 14.0327L11.8496 14.105C12.5246 14.6135 13.8 15.0483 15.375 15.0483C17.025 15.0483 18.3748 14.54 19.0498 13.9595C19.3496 13.6691 19.4999 13.3796 19.5 13.1616C19.5 12.7986 19.2002 12.3627 18.4502 11.9272C17.7002 11.5642 16.575 11.2749 15.375 11.2749Z" fill="#A1A1AA"/>
3
+ </svg>
package/svg/assets.svg ADDED
@@ -0,0 +1,10 @@
1
+ <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_8896_2135)">
3
+ <path d="M12.1889 7.59633C14.1841 7.59633 15.8641 8.24555 15.9922 9.28437L16 9.28441V14.3119H15.9922C15.8641 15.3508 14.1841 16 12.1889 16C10.1937 16 8.51369 15.3508 8.38562 14.3119H8.37778V9.28439H8.38562C8.5137 8.24553 10.1937 7.59633 12.1889 7.59633ZM9.38882 13.1055L9.38889 14.1835C9.38889 14.2337 9.42372 14.2968 9.49519 14.3664L9.51108 14.3814C9.61796 14.4795 9.79626 14.589 10.051 14.6923C10.5999 14.9147 11.3654 15.0459 12.1889 15.0459C13.0124 15.0459 13.7779 14.9147 14.3268 14.6923C14.5815 14.589 14.7598 14.4795 14.8667 14.3814L14.8826 14.3664C14.9515 14.2993 14.9864 14.2382 14.9888 14.1889L14.9889 14.1835L14.9889 13.1055C14.288 13.455 13.2861 13.6514 12.1889 13.6514C11.0916 13.6514 10.0897 13.455 9.38882 13.1055ZM7.65833 2C10.7558 2 13.3167 3.02131 13.3167 4.53212L13.3159 4.48764C13.3162 4.49257 13.3164 4.49754 13.3165 4.50249L13.3167 4.51376V6.82569C13.3167 7.08917 13.0903 7.30276 12.8111 7.30276C12.5359 7.30276 12.312 7.09523 12.3057 6.83694L12.3056 6.82569L12.3057 6.02132C11.2788 6.67487 9.57087 7.06422 7.65833 7.06422C5.74581 7.06422 4.03788 6.67487 3.01101 6.02132L3.01111 8.25688C3.01111 8.39798 3.0935 8.55328 3.25645 8.71025L3.27865 8.73119C3.31028 8.76031 3.34308 8.78828 3.37699 8.81501L3.40396 8.83596C3.4314 8.8569 3.46026 8.8778 3.49053 8.89865L3.5213 8.91946C3.58172 8.95957 3.64376 8.99744 3.70729 9.033L3.74417 9.05341C3.75663 9.0602 3.76922 9.06698 3.78199 9.07372L3.82074 9.09395C3.84036 9.10403 3.86031 9.11409 3.88063 9.12408L3.92172 9.14404C3.93558 9.15068 3.9496 9.15729 3.96375 9.16388L4.00672 9.1836C4.01395 9.18687 4.02124 9.19014 4.02855 9.19341L4.07291 9.21292C4.09533 9.22266 4.11809 9.23232 4.14121 9.24193L4.18789 9.26108C4.19575 9.26424 4.20365 9.26742 4.21158 9.27058C4.58315 9.41879 5.01318 9.54129 5.48375 9.63385L5.5604 9.64858C6.20215 9.76927 6.91616 9.83488 7.65833 9.83488C7.93754 9.83488 8.16389 10.0485 8.16389 10.3119C8.16389 10.5754 7.93754 10.789 7.65833 10.789C5.74581 10.789 4.03788 10.3996 3.01101 9.74609L3.01111 11.9633C3.01111 12.1044 3.0935 12.2597 3.25645 12.4167L3.27865 12.4376C3.31028 12.4667 3.34308 12.4947 3.37699 12.5214L3.40396 12.5424C3.4314 12.5633 3.46026 12.5842 3.49053 12.6051L3.5213 12.6259C3.58172 12.666 3.64376 12.7039 3.70729 12.7394L3.74417 12.7598C3.75663 12.7666 3.76922 12.7734 3.78199 12.7801L3.82074 12.8004C3.84036 12.8105 3.86031 12.8205 3.88063 12.8305L3.92172 12.8505C3.93558 12.8571 3.9496 12.8637 3.96375 12.8703L4.00672 12.89C4.01395 12.8933 4.02124 12.8966 4.02855 12.8998L4.07291 12.9193C4.09533 12.9291 4.11809 12.9387 4.14121 12.9484L4.18789 12.9675C4.19575 12.9707 4.20365 12.9738 4.21158 12.977C4.58315 13.1252 5.01318 13.2477 5.48375 13.3403L5.5604 13.355C6.20215 13.4757 6.91616 13.5413 7.65833 13.5413C7.93754 13.5413 8.16389 13.7549 8.16389 14.0184C8.16389 14.2818 7.93754 14.4954 7.65833 14.4954C4.6367 14.4954 2.12578 13.5235 2.00457 12.0734L2 12.0734V4.51377C2.0208 3.01304 4.57341 2 7.65833 2ZM14.9889 10.6835C14.288 11.033 13.2861 11.2294 12.1889 11.2294C11.0917 11.2294 10.0897 11.033 9.38885 10.6835L9.38889 11.8349C9.38889 11.885 9.42372 11.9482 9.49519 12.0177L9.51108 12.0327C9.61796 12.1308 9.79626 12.2404 10.051 12.3436C10.5999 12.566 11.3654 12.6972 12.1889 12.6972C13.0124 12.6972 13.7779 12.566 14.3268 12.3437C14.5815 12.2404 14.7598 12.1308 14.8667 12.0327L14.8826 12.0177C14.9515 11.9507 14.9864 11.8895 14.9888 11.8403L14.9889 11.8349L14.9889 10.6835ZM12.1889 8.55047C11.3654 8.55047 10.5999 8.68169 10.051 8.90409C9.79626 9.0073 9.61796 9.11689 9.51108 9.215L9.49519 9.23C9.4237 9.29954 9.38889 9.36271 9.38889 9.41286C9.38889 9.46302 9.42372 9.52617 9.49519 9.59573L9.51108 9.61073C9.61796 9.70883 9.79626 9.81842 10.051 9.92164C10.5999 10.144 11.3654 10.2752 12.1889 10.2752C13.0124 10.2752 13.7779 10.144 14.3268 9.92164C14.5815 9.81842 14.7598 9.70884 14.8667 9.61073L14.8826 9.59573C14.9541 9.52617 14.9889 9.46302 14.9889 9.41286C14.9889 9.36271 14.9541 9.29954 14.8826 9.22999L14.8667 9.21498C14.7598 9.11688 14.5815 9.0073 14.3268 8.90409C13.7779 8.68167 13.0124 8.55047 12.1889 8.55047ZM7.65833 2.95414C6.91616 2.95414 6.20215 3.01973 5.5604 3.14043L5.48373 3.15517C5.01318 3.24772 4.58315 3.37023 4.21158 3.51842C4.20363 3.52158 4.19575 3.52475 4.18791 3.52793L4.14121 3.54709C4.11836 3.55658 4.0956 3.56625 4.07291 3.57608L4.02855 3.5956C4.02124 3.59886 4.01395 3.60215 4.00673 3.6054L3.96375 3.62512C3.9496 3.63171 3.93558 3.63832 3.92174 3.64496L3.88065 3.66491C3.86059 3.67479 3.84062 3.68484 3.82074 3.69505L3.78199 3.71528C3.76922 3.72203 3.75663 3.72882 3.74417 3.7356L3.70731 3.756C3.64376 3.79156 3.58171 3.82943 3.52128 3.86953L3.49054 3.89037C3.46114 3.91058 3.43228 3.93148 3.40397 3.95304L3.37699 3.97398C3.34308 4.00072 3.31028 4.02869 3.27865 4.05781L3.25645 4.07875C3.0935 4.23574 3.01111 4.39103 3.01111 4.53212C3.01111 4.67323 3.0935 4.82851 3.25645 4.9855L3.27865 5.00644C3.31028 5.03556 3.34308 5.06353 3.37699 5.09026L3.40396 5.11121C3.4314 5.13214 3.46026 5.15303 3.49053 5.17388L3.5213 5.19471C3.58172 5.23482 3.64376 5.27269 3.70729 5.30825L3.74417 5.32865C3.75663 5.33545 3.76922 5.34222 3.78199 5.34897L3.82074 5.36919C3.84036 5.37928 3.86031 5.38932 3.88063 5.39933L3.92172 5.41929C3.93558 5.42593 3.9496 5.43254 3.96375 5.43913L4.00672 5.45885C4.01395 5.46212 4.02124 5.46539 4.02855 5.46865L4.07291 5.48817C4.09533 5.49789 4.11809 5.50755 4.14121 5.51718L4.18789 5.53633L4.21158 5.54583C4.58315 5.69402 5.01318 5.81652 5.48375 5.90908L5.5604 5.92383C6.20215 6.04452 6.91616 6.11011 7.65833 6.11011C8.4005 6.11011 9.11452 6.04452 9.75627 5.92383L9.83293 5.90908C10.3035 5.81652 10.7335 5.69402 11.1051 5.54583C11.113 5.54267 11.1209 5.53949 11.1288 5.53632L11.1755 5.51716C11.1983 5.50767 11.2211 5.498 11.2438 5.48817L11.2881 5.46865C11.2954 5.46539 11.3027 5.46212 11.3099 5.45885L11.3529 5.43913C11.3671 5.43254 11.3811 5.42593 11.3949 5.41929L11.436 5.39933C11.4561 5.38946 11.4761 5.37941 11.4959 5.36919L11.5347 5.34897C11.5474 5.34222 11.56 5.33545 11.5725 5.32865L11.6094 5.30825C11.6729 5.27269 11.735 5.23482 11.7954 5.19471L11.8261 5.17388C11.8555 5.15367 11.8844 5.13277 11.9127 5.11121L11.9397 5.09026C11.9736 5.06353 12.0064 5.03556 12.038 5.00644L12.0602 4.9855C12.2232 4.82851 12.3056 4.67322 12.3056 4.53213C12.3056 4.39101 12.2232 4.23574 12.0602 4.07875L12.038 4.05781C12.0064 4.02869 11.9736 4.00072 11.9397 3.97398L11.9127 3.95304C11.8844 3.93148 11.8555 3.91058 11.8261 3.89037L11.7954 3.86953C11.735 3.82943 11.6729 3.79156 11.6094 3.756L11.5725 3.7356C11.56 3.72882 11.5474 3.72203 11.5347 3.71528L11.4959 3.69505C11.4763 3.68496 11.4564 3.67492 11.436 3.66491L11.3949 3.64496C11.3811 3.63832 11.3671 3.63171 11.3529 3.62512L11.3099 3.6054C11.3027 3.60213 11.2954 3.59886 11.2881 3.5956L11.2438 3.57608C11.2211 3.56625 11.1983 3.55658 11.1755 3.54709L11.1288 3.52793L11.1051 3.51842C10.7335 3.37023 10.3035 3.24772 9.83291 3.15517L9.75627 3.14042C9.11452 3.01973 8.4005 2.95414 7.65833 2.95414Z" fill="#A1A1AA"/>
4
+ </g>
5
+ <defs>
6
+ <clipPath id="clip0_8896_2135">
7
+ <rect width="18" height="18" fill="white"/>
8
+ </clipPath>
9
+ </defs>
10
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M16.7852 3.7998C18.2694 3.7998 19.4765 5.00684 19.4766 6.49414V7H18.0811V6.49414C18.081 5.7811 17.4982 5.19922 16.7852 5.19922H4.49023C3.77719 5.19922 3.19439 5.7811 3.19434 6.49414V15.7959C3.19434 16.509 3.77716 17.0918 4.49023 17.0918H5.49902V18.4873H4.49023C3.00609 18.4873 1.79883 17.28 1.79883 15.7959V6.49121C1.79883 5.00707 3.00609 3.7998 4.49023 3.7998H16.7852ZM18.2598 6.25488C18.2724 6.33288 18.2803 6.41266 18.2803 6.49414L18.2734 6.3418C18.2704 6.31246 18.2644 6.2837 18.2598 6.25488Z" fill="white"/>
3
+ <path d="M20.8755 7.52039C22.3597 7.49981 23.5834 8.68999 23.604 10.1771L23.7331 19.478C23.7536 20.962 22.5632 22.1859 21.0792 22.2065L8.7855 22.377C7.30151 22.3976 6.07761 21.2072 6.05702 19.7232L5.92796 10.4194C5.90737 8.93542 7.09777 7.71153 8.58177 7.69094L20.8755 7.52039ZM8.60118 9.09022C7.8882 9.10011 7.31353 9.69002 7.32337 10.403L7.4524 19.7039C7.46229 20.4169 8.05314 20.9915 8.76615 20.9817L21.0599 20.8111C21.7729 20.8012 22.3476 20.2104 22.3377 19.4974L22.3105 17.5376L18.8548 17.5855C17.3711 17.6059 16.148 16.4164 16.1273 14.9327C16.1067 13.4488 17.2963 12.225 18.7801 12.2042L22.2358 12.1563L22.2087 10.1965C22.1987 9.48353 21.6079 8.90978 20.8949 8.91967L8.60118 9.09022ZM6.30866 20.1914C6.3096 20.196 6.31081 20.2005 6.31178 20.2051C6.29573 20.1296 6.28246 20.053 6.27343 19.9751L6.30866 20.1914ZM18.7995 13.5996C18.0867 13.6097 17.5128 14.2005 17.5227 14.9133C17.5327 15.626 18.1227 16.1998 18.8354 16.1902L22.2911 16.1422L22.2552 13.5516L18.7995 13.5996ZM19.4698 14.186C19.8568 14.1808 20.1741 14.4895 20.1796 14.8765C20.1847 15.2634 19.8761 15.5798 19.4892 15.5853L18.8252 15.5945C18.4382 15.5999 18.121 15.2921 18.1154 14.9051C18.1102 14.5181 18.4187 14.2006 18.8058 14.1953L19.4698 14.186ZM18.3472 15.0738C18.3496 15.0801 18.3527 15.0861 18.3553 15.0922C18.3431 15.0637 18.3335 15.0338 18.3267 15.0028L18.3472 15.0738ZM19.944 15.0692C19.9553 15.0406 19.9652 15.0108 19.9711 14.9799L19.971 14.977C19.965 15.0089 19.9556 15.0397 19.944 15.0692ZM19.5743 14.3956C19.6047 14.4013 19.6343 14.4097 19.6625 14.4207C19.6342 14.4096 19.6048 14.4004 19.5743 14.3946L19.4726 14.3862L19.5743 14.3956ZM22.384 9.95478C22.3978 10.0326 22.4067 10.1123 22.4079 10.1937L22.3989 10.0415C22.3955 10.0122 22.3891 9.98353 22.384 9.95478Z" fill="white"/>
4
+ </svg>
package/svg/bottle.svg ADDED
@@ -0,0 +1,9 @@
1
+ <svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M10.633 16.8133H8.57285C8.37129 16.8133 8.18613 16.7055 8.08535 16.532L7.0541 14.7414C6.95332 14.568 6.95332 14.3547 7.0541 14.1812L8.08535 12.3906C8.18613 12.2172 8.37129 12.1094 8.57285 12.1094H10.633C10.8346 12.1094 11.0197 12.2172 11.1205 12.3906L12.1518 14.1812C12.2525 14.3547 12.2525 14.568 12.1518 14.7414L11.1205 16.532C11.0197 16.7055 10.8346 16.8133 10.633 16.8133ZM8.89629 15.6883H10.3072L11.015 14.4602L10.3072 13.232H8.89629L8.18848 14.4602L8.89629 15.6883Z" fill="#A1A1AA"/>
3
+ <path d="M16.8127 16.8133H14.7525C14.551 16.8133 14.3658 16.7055 14.265 16.532L13.2338 14.7414C13.133 14.568 13.133 14.3547 13.2338 14.1812L14.265 12.3906C14.3658 12.2172 14.551 12.1094 14.7525 12.1094H16.8127C17.0143 12.1094 17.1994 12.2172 17.3002 12.3906L18.3314 14.1812C18.4322 14.3547 18.4322 14.568 18.3314 14.7414L17.3002 16.532C17.1994 16.7055 17.0143 16.8133 16.8127 16.8133ZM15.0783 15.6883H16.4893L17.1971 14.4602L16.4893 13.232H15.0783L14.3705 14.4602L15.0783 15.6883Z" fill="#A1A1AA"/>
4
+ <path d="M13.7307 18.5945H11.6705C11.4689 18.5945 11.2838 18.4867 11.183 18.3133L10.1518 16.5227C10.051 16.3492 10.051 16.1359 10.1518 15.9625L11.183 14.1719C11.2838 13.9984 11.4689 13.8906 11.6705 13.8906H13.7307C13.9322 13.8906 14.1174 13.9984 14.2182 14.1719L15.2494 15.9625C15.3502 16.1359 15.3502 16.3492 15.2494 16.5227L14.2182 18.3133C14.1174 18.4867 13.9322 18.5945 13.7307 18.5945ZM11.9939 17.4695H13.4049L14.1127 16.2414L13.4049 15.0133H11.9939L11.2861 16.2414L11.9939 17.4695Z" fill="#A1A1AA"/>
5
+ <path d="M14.8965 22.459H10.5254C9.10039 22.459 7.55352 21.6457 6.28086 20.2277C5.06445 18.873 4.33789 17.209 4.33789 15.777V11.1949C4.33789 9.02461 6.09805 7.25977 8.26367 7.25977H17.1559C19.3215 7.25977 21.0816 9.02461 21.0816 11.1949V15.7793C21.0816 17.209 20.3551 18.873 19.1387 20.2301C17.8684 21.6457 16.3215 22.459 14.8965 22.459ZM8.26602 8.38242C7.5207 8.38242 6.81992 8.67539 6.28789 9.20742C5.75586 9.73945 5.46289 10.4449 5.46289 11.1926V15.777C5.46289 16.3488 5.61758 16.9934 5.91289 17.6449C6.20352 18.2871 6.6207 18.9199 7.11992 19.4777C8.16289 20.6402 9.43555 21.334 10.5254 21.334H14.8965C15.9863 21.334 17.259 20.6402 18.302 19.4777C18.8012 18.9199 19.2184 18.2871 19.509 17.6449C19.802 16.9934 19.959 16.3488 19.959 15.777V11.1949C19.959 10.4473 19.666 9.7418 19.134 9.20977C18.602 8.67773 17.9012 8.38477 17.1559 8.38477H8.26602V8.38242Z" fill="#A1A1AA"/>
6
+ <path d="M18.6871 7.0293H6.70117C6.23477 7.0293 5.85742 6.65195 5.85742 6.18555V4.81445C5.85742 4.34805 6.23477 3.9707 6.70117 3.9707H18.6871C19.1535 3.9707 19.5309 4.34805 19.5309 4.81445V6.18555C19.5309 6.65195 19.1512 7.0293 18.6871 7.0293ZM6.98242 5.9043H18.4059V5.0957H6.98242V5.9043Z" fill="#A1A1AA"/>
7
+ <path d="M17.3902 8.35586H7.99414C7.52773 8.35586 7.15039 7.97852 7.15039 7.51211V6.74805C7.15039 6.28164 7.52773 5.9043 7.99414 5.9043H17.3902C17.8566 5.9043 18.234 6.28164 18.234 6.74805V7.51211C18.234 7.97852 17.8543 8.35586 17.3902 8.35586ZM8.27539 7.23086H17.109V7.0293H8.27539V7.23086Z" fill="#A1A1AA"/>
8
+ <path opacity="0.5" d="M8.4453 9.5592C8.43359 9.50529 8.41484 9.45373 8.38905 9.40451C8.24374 9.13498 7.90155 9.03654 7.62734 9.17717C6.97109 9.51467 6.59609 10.0655 6.38749 10.5155C6.3453 10.6069 6.33124 10.6537 6.34062 10.6725C6.31952 10.7287 6.30312 10.785 6.28671 10.8436C6.20468 11.1389 6.36874 11.4553 6.66171 11.5444C6.71562 11.5608 6.77187 11.5678 6.82577 11.5678C7.07187 11.5678 7.29921 11.4037 7.36718 11.153C7.49374 10.6912 7.78437 10.3959 8.00468 10.2365C8.04921 10.2178 8.09609 10.1967 8.14765 10.1709C8.37968 10.0561 8.49452 9.80061 8.4453 9.5592Z" fill="#A1A1AA"/>
9
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M8.45996 9.3877C8.6441 9.38602 8.82695 9.42157 8.99707 9.49219C9.1662 9.56245 9.31893 9.66632 9.44727 9.79688H9.44824L9.45508 9.80371H9.4541C9.72127 10.0723 9.85931 10.4101 9.85938 10.7871L9.85352 10.9277C9.82304 11.2515 9.68593 11.5423 9.44824 11.7783L9.44727 11.7773C9.178 12.0472 8.83892 12.1875 8.45996 12.1875C8.07976 12.1875 7.73845 12.0469 7.46875 11.7754V11.7744C7.19935 11.5052 7.05957 11.1658 7.05957 10.7871C7.05963 10.4082 7.19892 10.0681 7.46875 9.79883L7.57324 9.70312C7.82244 9.49601 8.12251 9.38933 8.45215 9.3877H8.45996ZM3.50195 5.30371C3.76244 5.30076 4.02095 5.3506 4.26172 5.4502C4.50537 5.55107 4.72661 5.70128 4.91016 5.89062H4.90918C5.28695 6.27105 5.48243 6.74366 5.48438 7.2793L5.47754 7.47656C5.46052 7.67265 5.41347 7.86527 5.33789 8.04785C5.23706 8.29138 5.08765 8.51182 4.89844 8.69531L4.89746 8.69434C4.51686 9.07227 4.04473 9.26777 3.50879 9.26953L3.50977 9.27051C3.50814 9.27053 3.50651 9.26951 3.50488 9.26953L3.50195 9.27051V9.26953C3.24107 9.27261 2.98233 9.2238 2.74121 9.12402C2.49758 9.02315 2.27631 8.8739 2.09277 8.68457V8.68359C1.76123 8.34941 1.57011 7.94397 1.52734 7.4873L1.51855 7.28711C1.51557 7.02634 1.56526 6.76737 1.66504 6.52637C1.74072 6.34368 1.84399 6.17423 1.9707 6.02344L2.10449 5.87891C2.48481 5.50135 2.95774 5.30571 3.49316 5.30371H3.50195ZM9.91797 1.51367C10.2556 1.50942 10.5903 1.57297 10.9023 1.70215C11.2169 1.83243 11.5023 2.02502 11.7393 2.26953H11.7383C12.2294 2.7638 12.4823 3.37342 12.4844 4.07031L12.4756 4.3252C12.4536 4.57851 12.3935 4.82763 12.2959 5.06348C12.1666 5.3758 11.9735 5.65763 11.7314 5.89355L11.7324 5.89453C11.2371 6.389 10.6253 6.64269 9.92578 6.64453L9.92676 6.64551C9.92491 6.64554 9.92275 6.64451 9.9209 6.64453L9.91797 6.64551V6.64453C9.58039 6.64873 9.24556 6.58525 8.93359 6.45605C8.6211 6.32664 8.33854 6.1348 8.10254 5.89258V5.89355C7.66837 5.45864 7.41893 4.93389 7.36328 4.33887L7.35156 4.0791C7.34733 3.74153 7.41186 3.4067 7.54102 3.09473C7.63877 2.8587 7.77181 2.63913 7.93555 2.44434L8.10938 2.25781C8.60366 1.76709 9.21339 1.51559 9.91016 1.51367V1.5127C9.91145 1.51267 9.91277 1.51369 9.91406 1.51367C9.91536 1.51367 9.91667 1.5127 9.91797 1.5127V1.51367Z" stroke="#A1A1AA" stroke-width="1.05"/>
3
+ </svg>
@@ -0,0 +1,21 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_20794_75876)">
3
+ <path d="M8.1416 1.77148C8.38911 1.62862 8.69391 1.62859 8.94141 1.77148L11.2363 3.0957C11.4838 3.23862 11.6357 3.50328 11.6357 3.78906V6.43848C11.6357 6.72412 11.4836 6.9879 11.2363 7.13086L8.94141 8.45605C8.69393 8.59892 8.38909 8.59889 8.1416 8.45605L5.84668 7.13086C5.59936 6.98791 5.44727 6.72415 5.44727 6.43848V3.78906C5.44727 3.50325 5.59916 3.23861 5.84668 3.0957L8.1416 1.77148Z" stroke="#A1A1AA" stroke-width="0.685714"/>
4
+ <path d="M5.70117 3.76172L8.54037 5.11547" stroke="#A1A1AA" stroke-width="0.685714"/>
5
+ <path d="M11.416 3.76172L8.5411 5.11547" stroke="#A1A1AA" stroke-width="0.685714"/>
6
+ <path d="M8.54102 5.11328L8.54102 8.42093" stroke="#A1A1AA" stroke-width="0.685714"/>
7
+ <path d="M4.93652 7.30273C5.18403 7.15987 5.48883 7.15984 5.73633 7.30273L8.03125 8.62695C8.27873 8.76987 8.43066 9.03453 8.43066 9.32031V11.9697C8.43066 12.2554 8.27851 12.5191 8.03125 12.6621L5.73633 13.9873C5.48885 14.1302 5.18401 14.1301 4.93652 13.9873L2.6416 12.6621C2.39429 12.5192 2.24219 12.2554 2.24219 11.9697V9.32031C2.24219 9.0345 2.39408 8.76986 2.6416 8.62695L4.93652 7.30273Z" stroke="#A1A1AA" stroke-width="0.685714"/>
8
+ <path d="M2.28711 9.14453L5.33725 10.6478" stroke="#A1A1AA" stroke-width="0.685714"/>
9
+ <path d="M8.57227 8.57422L5.33686 10.649" stroke="#A1A1AA" stroke-width="0.685714"/>
10
+ <path d="M5.33594 10.6445L5.33594 13.9522" stroke="#A1A1AA" stroke-width="0.685714"/>
11
+ <path d="M11.2949 10.6445L11.2949 13.9522" stroke="#A1A1AA" stroke-width="0.685714"/>
12
+ <path d="M11.0234 7.30273C11.271 7.15983 11.5767 7.15983 11.8242 7.30273L14.1182 8.62695C14.3657 8.76986 14.5186 9.0345 14.5186 9.32031V11.9697C14.5186 12.2555 14.3656 12.5192 14.1182 12.6621L11.8242 13.9873C11.5767 14.1302 11.271 14.1302 11.0234 13.9873L8.72949 12.6621C8.48197 12.5192 8.3291 12.2555 8.3291 11.9697V9.32031C8.3291 9.0345 8.48197 8.76986 8.72949 8.62695L11.0234 7.30273Z" stroke="#A1A1AA" stroke-width="0.685714"/>
13
+ <path d="M8.57617 9.14453L11.2948 10.6478" stroke="#A1A1AA" stroke-width="0.685714"/>
14
+ <path d="M14.291 9.14453L11.2956 10.6478" stroke="#A1A1AA" stroke-width="0.685714"/>
15
+ </g>
16
+ <defs>
17
+ <clipPath id="clip0_20794_75876">
18
+ <rect width="16" height="16" fill="white" transform="translate(0.00195312)"/>
19
+ </clipPath>
20
+ </defs>
21
+ </svg>
package/svg/burn.svg ADDED
@@ -0,0 +1,4 @@
1
+ <svg width="17" height="18" viewBox="0 0 17 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M8.66729 17.3346C7.54254 17.3346 6.45114 17.1142 5.42341 16.6795C4.43101 16.2598 3.53987 15.659 2.77474 14.8939C2.00961 14.1288 1.40883 13.2376 0.989073 12.2452C0.554384 11.2175 0.333984 10.1261 0.333984 9.00132C0.333984 7.87659 0.554384 6.78519 0.989073 5.75746C1.40883 4.76506 2.00961 3.87392 2.77474 3.10877C3.53987 2.34364 4.43103 1.74284 5.42341 1.3231C6.45114 0.888369 7.54254 0.667969 8.66729 0.667969C9.79203 0.667969 10.8834 0.888369 11.9112 1.32308C12.9036 1.74284 13.7947 2.34361 14.5598 3.10875C15.325 3.8739 15.9258 4.76504 16.3455 5.75743C16.7802 6.78517 17.0006 7.87655 17.0006 9.0013C17.0006 10.1261 16.7802 11.2175 16.3455 12.2452C15.9258 13.2376 15.325 14.1288 14.5598 14.8939C13.7947 15.659 12.9036 16.2598 11.9112 16.6795C10.8834 17.1142 9.79203 17.3346 8.66729 17.3346ZM8.66729 1.77908C4.68494 1.77908 1.44507 5.01895 1.44507 9.0013C1.44507 12.9836 4.68494 16.2235 8.66729 16.2235C12.6496 16.2235 15.8895 12.9836 15.8895 9.0013C15.8895 5.01895 12.6496 1.77908 8.66729 1.77908Z" fill="#E84A5A"/>
3
+ <path d="M11.1352 7.33464C11.1352 7.33464 10.5102 5.5638 9.67688 4.52214C8.94771 3.58464 8.01021 3.16797 8.01021 3.16797C8.01021 3.16797 8.11438 4.41797 7.69771 5.35547C7.07271 6.70964 6.03104 7.85547 6.03104 7.85547L5.71854 6.5013C5.71854 6.5013 4.05188 9.10547 4.26021 10.9805C4.46854 12.8555 6.55188 14.1055 6.55188 14.1055C6.55188 14.1055 5.92688 12.9596 6.55188 11.6055C6.96854 10.668 7.69771 9.10547 7.69771 9.10547L8.53104 10.4596C8.53104 10.4596 8.63521 9.9388 8.84354 9.3138C8.94771 8.89713 9.15604 7.95964 9.15604 7.95964C9.15604 7.95964 10.7185 9.3138 11.1352 10.7721C11.5519 12.3346 10.8227 14.1055 10.8227 14.1055C10.8227 14.1055 13.2185 12.543 13.3227 10.1471C13.4269 7.95964 11.3435 5.14714 11.3435 5.14714L11.1352 7.33464Z" fill="#E84A5A"/>
4
+ </svg>