@datadayrepos/icons 0.0.1-beta.338 → 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 (3) hide show
  1. package/dist/index.mjs +283 -283
  2. package/package.json +293 -60
  3. package/README.md +0 -178
package/package.json CHANGED
@@ -1,17 +1,11 @@
1
1
  {
2
2
  "name": "@datadayrepos/icons",
3
+ "version": "0.0.2",
3
4
  "type": "module",
4
- "version": "0.0.1-beta.338",
5
- "private": false,
6
- "packageManager": "pnpm@10.4.0",
7
- "description": "Uix icon library",
8
- "author": "datadayrepos",
9
5
  "license": "Apache 2.0",
10
- "repository": {
11
- "type": "git",
12
- "url": "git+https://github.com/datadayrepos/dataday-icons.git"
13
- },
14
- "sideEffects": false,
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.mjs",
8
+ "types": "./dist/index.d.ts",
15
9
  "exports": {
16
10
  ".": {
17
11
  "types": "./dist/index.d.ts",
@@ -19,57 +13,296 @@
19
13
  "require": "./dist/index.cjs"
20
14
  }
21
15
  },
22
- "main": "./dist/index.js",
23
- "module": "./dist/index.js",
24
- "types": "./dist/index.d.ts",
25
- "files": [
26
- "dist"
27
- ],
28
- "scripts": {
29
- "build-icons": "node build-icons.cjs",
30
- "prebuild": "pnpm run build-icons",
31
- "dev": "vite",
32
- "build": "pnpm run build-icons && vue-tsc --noEmit && vite build && vue-tsc --emitDeclarationOnly ",
33
- "preview": "vite preview",
34
- "lint": "eslint --cache .",
35
- "lint:fix": "eslint . --fix",
36
- "typecheckVue": "vue-tsc --noEmit",
37
- "typeBuildVue": "vue-tsc --declaration --emitDeclarationOnly",
38
- "pub": "npm publish --access public",
39
- "convertVueSvg": "node dev-vuetosvg.cjs",
40
- "renameFolders": "node dev-renamefolder.cjs",
41
- "folderToSvg": "node dev-foldertosvg.cjs",
42
- "createView": "node dev-createView.cjs",
43
- "dedupeSvg": "node dev-dedupe.cjs"
44
- },
16
+ "sideEffects": false,
45
17
  "peerDependencies": {
46
18
  "vue": "3.5.13"
47
19
  },
48
- "devDependencies": {
49
- "@antfu/eslint-config": "3.7.3",
50
- "@datadayrepos/ni": "0.21.8",
51
- "@types/node": "22.13.4",
52
- "@vitejs/plugin-vue": "5.2.1",
53
- "eslint": "9.20.1",
54
- "eslint-plugin-sort-keys": "2.3.5",
55
- "lint-staged": "14.0.1",
56
- "pnpm": "10.4.0",
57
- "typescript": "5.2.2",
58
- "vite": "5.1.4",
59
- "vue-tsc": "1.8.22"
60
- },
61
- "pnpm": {
62
- "peerDependencyRules": {
63
- "ignoreMissing": [
64
- "vite",
65
- "react",
66
- "react-dom"
67
- ]
68
- }
69
- },
70
- "lint-staged": {
71
- "*.{js,ts,tsx,vue,md}": [
72
- "eslint --cache --fix"
73
- ]
74
- }
20
+ "files": [
21
+ "LICENSE.txt",
22
+ "dist/AccountAddFilledIcon/index.vue.d.ts",
23
+ "dist/AccountAddOutlineIcon/index.vue.d.ts",
24
+ "dist/AccountCogFilled/index.vue.d.ts",
25
+ "dist/AccountGroupFilledIcon/index.vue.d.ts",
26
+ "dist/AccountGroupOutlineIcon/index.vue.d.ts",
27
+ "dist/AccountLockClosedFilledIcon/index.vue.d.ts",
28
+ "dist/AccountLockClosedOutlineIcon/index.vue.d.ts",
29
+ "dist/AccountLockOpenFilledIcon/index.vue.d.ts",
30
+ "dist/AccountLockOpenOutlineIcon/index.vue.d.ts",
31
+ "dist/AccountUserFilledIcon/index.vue.d.ts",
32
+ "dist/AccountUserOutlineIcon/index.vue.d.ts",
33
+ "dist/AddToQueIcon/index.vue.d.ts",
34
+ "dist/AnalyticsIcon/index.vue.d.ts",
35
+ "dist/AppBoxIcon/index.vue.d.ts",
36
+ "dist/AppleBrandIcon/index.vue.d.ts",
37
+ "dist/ArchivesIcon/index.vue.d.ts",
38
+ "dist/ArrowCircleIcon/index.vue.d.ts",
39
+ "dist/ArrowDownIcon/index.vue.d.ts",
40
+ "dist/ArrowLeft2Icon/index.vue.d.ts",
41
+ "dist/ArrowLeftIcon/index.vue.d.ts",
42
+ "dist/ArrowLeftMdiIcon/index.vue.d.ts",
43
+ "dist/ArrowLeftMdiThisIcon/index.vue.d.ts",
44
+ "dist/ArrowRight2Icon/index.vue.d.ts",
45
+ "dist/ArrowRightIcon/index.vue.d.ts",
46
+ "dist/ArrowRightMdiIcon/index.vue.d.ts",
47
+ "dist/ArrowRightMdiThisIcon/index.vue.d.ts",
48
+ "dist/ArrowSplitVertical/index.vue.d.ts",
49
+ "dist/ArrowTopRightThinIcon/index.vue.d.ts",
50
+ "dist/ArrowUpIcon/index.vue.d.ts",
51
+ "dist/AttachementIcon/index.vue.d.ts",
52
+ "dist/AudioIcon/index.vue.d.ts",
53
+ "dist/BackIcon/index.vue.d.ts",
54
+ "dist/BoardPreview/index.vue.d.ts",
55
+ "dist/BoardTemplateIcon/index.vue.d.ts",
56
+ "dist/BoardsLargeMeme/index.vue.d.ts",
57
+ "dist/BoardsLargeMeme2/index.vue.d.ts",
58
+ "dist/BoardsStarred/index.vue.d.ts",
59
+ "dist/BooleanIcon/index.vue.d.ts",
60
+ "dist/BorderBottomIcon/index.vue.d.ts",
61
+ "dist/BorderBoxIcon/index.vue.d.ts",
62
+ "dist/BorderTopIcon/index.vue.d.ts",
63
+ "dist/BotAddFilledIcon/index.vue.d.ts",
64
+ "dist/BotChatIcon/index.vue.d.ts",
65
+ "dist/BotFilledIcon/index.vue.d.ts",
66
+ "dist/BotIcon/index.vue.d.ts",
67
+ "dist/BugIcon/index.vue.d.ts",
68
+ "dist/CalDateIcon/index.vue.d.ts",
69
+ "dist/CalendarIcon/index.vue.d.ts",
70
+ "dist/CameraFilledIcon/index.vue.d.ts",
71
+ "dist/CameraIcon/index.vue.d.ts",
72
+ "dist/CameraSwitchIcon/index.vue.d.ts",
73
+ "dist/CaretDown2Icon/index.vue.d.ts",
74
+ "dist/CaretDown3Icon/index.vue.d.ts",
75
+ "dist/CaretDownIcon/index.vue.d.ts",
76
+ "dist/CaretRightIcon/index.vue.d.ts",
77
+ "dist/CaretUp2Icon/index.vue.d.ts",
78
+ "dist/CaretUp3Icon/index.vue.d.ts",
79
+ "dist/CaretUpIcon/index.vue.d.ts",
80
+ "dist/CheckListIcon/index.vue.d.ts",
81
+ "dist/CheckboxIcon/index.vue.d.ts",
82
+ "dist/CheckedCircleFilledIcon/index.vue.d.ts",
83
+ "dist/CheckedCircleIcon/index.vue.d.ts",
84
+ "dist/CheckedStatusIcon/index.vue.d.ts",
85
+ "dist/CheckmarkIcon/index.vue.d.ts",
86
+ "dist/CircleButtonIcon/index.vue.d.ts",
87
+ "dist/CircleOutlineIcon/index.vue.d.ts",
88
+ "dist/ClockIcon/index.vue.d.ts",
89
+ "dist/CloseCircleFillIcon/index.vue.d.ts",
90
+ "dist/CloseCircleFilledIcon/index.vue.d.ts",
91
+ "dist/CloseCircleOutlineIcon/index.vue.d.ts",
92
+ "dist/CloseCrossIcon/index.vue.d.ts",
93
+ "dist/CloseCrossSmallIcon/index.vue.d.ts",
94
+ "dist/CodeIcon/index.vue.d.ts",
95
+ "dist/ColumnIcon/index.vue.d.ts",
96
+ "dist/ColumnsIcon/index.vue.d.ts",
97
+ "dist/CopyIcon/index.vue.d.ts",
98
+ "dist/CopyMdiIcon/index.vue.d.ts",
99
+ "dist/CopyTwoToneIcon/index.vue.d.ts",
100
+ "dist/CreditsIcon/index.vue.d.ts",
101
+ "dist/DashBoardIcon/index.vue.d.ts",
102
+ "dist/DateIcon/index.vue.d.ts",
103
+ "dist/DefaultIcon/index.vue.d.ts",
104
+ "dist/DeleteIcon/index.vue.d.ts",
105
+ "dist/DescriptionIcon/index.vue.d.ts",
106
+ "dist/Devices/index.vue.d.ts",
107
+ "dist/DevicesOutline/index.vue.d.ts",
108
+ "dist/DiaGramIcon/index.vue.d.ts",
109
+ "dist/DisabledIcon/index.vue.d.ts",
110
+ "dist/DocumentIcon/index.vue.d.ts",
111
+ "dist/DocumentationIcon/index.vue.d.ts",
112
+ "dist/DownLoadIcon/index.vue.d.ts",
113
+ "dist/DownloadCloudFilledIcon/index.vue.d.ts",
114
+ "dist/DownloadCloudOutlineIcon/index.vue.d.ts",
115
+ "dist/DownloadLightIcon/index.vue.d.ts",
116
+ "dist/DragIcon/index.vue.d.ts",
117
+ "dist/DrawBrushIcon/index.vue.d.ts",
118
+ "dist/DrawIcon/index.vue.d.ts",
119
+ "dist/DropDownIcon/index.vue.d.ts",
120
+ "dist/EditIcon/index.vue.d.ts",
121
+ "dist/EmailAccountFilled/index.vue.d.ts",
122
+ "dist/EmailAddFilled/index.vue.d.ts",
123
+ "dist/EmailIcon/index.vue.d.ts",
124
+ "dist/EmojiFaceHappyFilledIcon/index.vue.d.ts",
125
+ "dist/EmojiFaceHappyOutlineIcon/index.vue.d.ts",
126
+ "dist/EncryptedOffFilledIcon/index.vue.d.ts",
127
+ "dist/EncryptedOffOutlineIcon/index.vue.d.ts",
128
+ "dist/EncryptedOnFilledIcon/index.vue.d.ts",
129
+ "dist/EncryptedOnOutlineIcon/index.vue.d.ts",
130
+ "dist/EraserIcon/index.vue.d.ts",
131
+ "dist/ErrorIcon/index.vue.d.ts",
132
+ "dist/EyeHiddenIcon/index.vue.d.ts",
133
+ "dist/EyeHide2Icon/index.vue.d.ts",
134
+ "dist/EyeHideIcon/index.vue.d.ts",
135
+ "dist/EyeView2Icon/index.vue.d.ts",
136
+ "dist/EyeViewIcon/index.vue.d.ts",
137
+ "dist/EyeVisibilityIcon/index.vue.d.ts",
138
+ "dist/FaceRecognitionIcon/index.vue.d.ts",
139
+ "dist/FaceUnhappyIcon/index.vue.d.ts",
140
+ "dist/FacebookBrandIcon/index.vue.d.ts",
141
+ "dist/FilesArchiveIcon/index.vue.d.ts",
142
+ "dist/FolderHomeFilled/index.vue.d.ts",
143
+ "dist/FolderHomeOutline/index.vue.d.ts",
144
+ "dist/FolderIcon/index.vue.d.ts",
145
+ "dist/FolderImageFilled/index.vue.d.ts",
146
+ "dist/FolderKeyFilled/index.vue.d.ts",
147
+ "dist/FolderKeyOutline/index.vue.d.ts",
148
+ "dist/FolderLockFilled/index.vue.d.ts",
149
+ "dist/FolderLockOutline/index.vue.d.ts",
150
+ "dist/FolderPlainFilled/index.vue.d.ts",
151
+ "dist/FolderPlainOutline/index.vue.d.ts",
152
+ "dist/FolderPlusMultiple/index.vue.d.ts",
153
+ "dist/FootnoteIcon/index.vue.d.ts",
154
+ "dist/ForgotPassWordIcon/index.vue.d.ts",
155
+ "dist/FormFlowIcon/index.vue.d.ts",
156
+ "dist/FormLibraryIcon/index.vue.d.ts",
157
+ "dist/FormOutlineIcon/index.vue.d.ts",
158
+ "dist/GalleryIcon/index.vue.d.ts",
159
+ "dist/GeoIcon/index.vue.d.ts",
160
+ "dist/GisMapsIcon/index.vue.d.ts",
161
+ "dist/GoogleBrandIcon/index.vue.d.ts",
162
+ "dist/GrabIcon/index.vue.d.ts",
163
+ "dist/GridBuildIcon/index.vue.d.ts",
164
+ "dist/HeadphonesIcon/index.vue.d.ts",
165
+ "dist/HomeIcon/index.vue.d.ts",
166
+ "dist/ImacRaphaelIcon/index.vue.d.ts",
167
+ "dist/ImageIcon/index.vue.d.ts",
168
+ "dist/InlineIcon/index.vue.d.ts",
169
+ "dist/InterActionsIcon/index.vue.d.ts",
170
+ "dist/InviteIcon/index.vue.d.ts",
171
+ "dist/IpadRaphaelIcon/index.vue.d.ts",
172
+ "dist/IphoneRaphaelIcon/index.vue.d.ts",
173
+ "dist/KanBanIcon/index.vue.d.ts",
174
+ "dist/KeyIcon/index.vue.d.ts",
175
+ "dist/LabelIcon/index.vue.d.ts",
176
+ "dist/LetterAIcon/index.vue.d.ts",
177
+ "dist/LikertIcon/index.vue.d.ts",
178
+ "dist/LinkIcon/index.vue.d.ts",
179
+ "dist/LinkVariantIcon/index.vue.d.ts",
180
+ "dist/LinkedinBrandIcon/index.vue.d.ts",
181
+ "dist/ListRaphaelIcon/index.vue.d.ts",
182
+ "dist/LoadingIcon/index.vue.d.ts",
183
+ "dist/LockClosedFilled/index.vue.d.ts",
184
+ "dist/LockClosedOutline/index.vue.d.ts",
185
+ "dist/LockIcon/index.vue.d.ts",
186
+ "dist/LockOpenFilledIcon/index.vue.d.ts",
187
+ "dist/LockOpenOutline/index.vue.d.ts",
188
+ "dist/LockedIcon/index.vue.d.ts",
189
+ "dist/LogFilledIcon/index.vue.d.ts",
190
+ "dist/LogIcon/index.vue.d.ts",
191
+ "dist/LoginIcon/index.vue.d.ts",
192
+ "dist/MapIcon/index.vue.d.ts",
193
+ "dist/MatrixIcon/index.vue.d.ts",
194
+ "dist/MentionCommentFilledIcon/index.vue.d.ts",
195
+ "dist/MentionCommentRegularIcon/index.vue.d.ts",
196
+ "dist/MentionFilledIcon/index.vue.d.ts",
197
+ "dist/MentionRegularIcon/index.vue.d.ts",
198
+ "dist/MergeIcon/index.vue.d.ts",
199
+ "dist/MergeSourceIcon/index.vue.d.ts",
200
+ "dist/MergeVectorLink/index.vue.d.ts",
201
+ "dist/MergeVectorUnion/index.vue.d.ts",
202
+ "dist/MessagesIcon/index.vue.d.ts",
203
+ "dist/MicrophoneIcon/index.vue.d.ts",
204
+ "dist/MicrosoftBrandIcon/index.vue.d.ts",
205
+ "dist/MinusIcon/index.vue.d.ts",
206
+ "dist/MirrorIcon/index.vue.d.ts",
207
+ "dist/MoonIcon/index.vue.d.ts",
208
+ "dist/MoreHorizonIcon/index.vue.d.ts",
209
+ "dist/MoreIcon/index.vue.d.ts",
210
+ "dist/NumberIcon/index.vue.d.ts",
211
+ "dist/NumbersymbolIcon/index.vue.d.ts",
212
+ "dist/ObjectLeftFilled/index.vue.d.ts",
213
+ "dist/ObjectLeftOutline/index.vue.d.ts",
214
+ "dist/OpenIdIcon/index.vue.d.ts",
215
+ "dist/PaletteIcon/index.vue.d.ts",
216
+ "dist/PassPortIcon/index.vue.d.ts",
217
+ "dist/PasskeyIcon/index.vue.d.ts",
218
+ "dist/PasswordIcon/index.vue.d.ts",
219
+ "dist/PasteIcon/index.vue.d.ts",
220
+ "dist/PhoneColorIcon/index.vue.d.ts",
221
+ "dist/PlusIcon/index.vue.d.ts",
222
+ "dist/PlusminusIcon/index.vue.d.ts",
223
+ "dist/PositionIcon/index.vue.d.ts",
224
+ "dist/ProfileCard/index.vue.d.ts",
225
+ "dist/QRIcon/index.vue.d.ts",
226
+ "dist/QrBarCodeScanIcon/index.vue.d.ts",
227
+ "dist/QrScanIcon/index.vue.d.ts",
228
+ "dist/QuestionFilledIcon/index.vue.d.ts",
229
+ "dist/QuestionIcon/index.vue.d.ts",
230
+ "dist/QuestionOutlineIcon/index.vue.d.ts",
231
+ "dist/RadioButtonIcon/index.vue.d.ts",
232
+ "dist/RadioButtonMultiIcon/index.vue.d.ts",
233
+ "dist/RadioButtonTextIcon/index.vue.d.ts",
234
+ "dist/ReadonlyIcon/index.vue.d.ts",
235
+ "dist/RedoIcon/index.vue.d.ts",
236
+ "dist/RenameIcon/index.vue.d.ts",
237
+ "dist/SaveIcon/index.vue.d.ts",
238
+ "dist/ScanDuoIcon/index.vue.d.ts",
239
+ "dist/SchedulerIcon/index.vue.d.ts",
240
+ "dist/ScrollIcon/index.vue.d.ts",
241
+ "dist/SearchIcon/index.vue.d.ts",
242
+ "dist/SecurityKeyLight/index.vue.d.ts",
243
+ "dist/SecurityKeyLightOutline/index.vue.d.ts",
244
+ "dist/SelectIcon/index.vue.d.ts",
245
+ "dist/SendDataIcon/index.vue.d.ts",
246
+ "dist/SessionEditIcon/index.vue.d.ts",
247
+ "dist/Settings2Icon/index.vue.d.ts",
248
+ "dist/SettingsIcon/index.vue.d.ts",
249
+ "dist/SettingsToolsIcon/index.vue.d.ts",
250
+ "dist/ShareIcon/index.vue.d.ts",
251
+ "dist/SignatureIcon/index.vue.d.ts",
252
+ "dist/SingletonIcon/index.vue.d.ts",
253
+ "dist/SlashForwardIcon/index.vue.d.ts",
254
+ "dist/SliderIcon/index.vue.d.ts",
255
+ "dist/SmileyIcon/index.vue.d.ts",
256
+ "dist/SmileyUnhappyIcon/index.vue.d.ts",
257
+ "dist/SpinnerBoardIcon/index.vue.d.ts",
258
+ "dist/SpreadSheetIcon/index.vue.d.ts",
259
+ "dist/StarEmptyIcon/index.vue.d.ts",
260
+ "dist/StarFullIcon/index.vue.d.ts",
261
+ "dist/StopCircleIcon/index.vue.d.ts",
262
+ "dist/SunIcon/index.vue.d.ts",
263
+ "dist/SurfaceIcon/index.vue.d.ts",
264
+ "dist/SwitchIcon/index.vue.d.ts",
265
+ "dist/TableColumnIcon/index.vue.d.ts",
266
+ "dist/TableEditIcon/index.vue.d.ts",
267
+ "dist/TableFileFilledIcon/index.vue.d.ts",
268
+ "dist/TableFileOutlineIcon/index.vue.d.ts",
269
+ "dist/TableIcon/index.vue.d.ts",
270
+ "dist/TableRowIcon/index.vue.d.ts",
271
+ "dist/TagsIcon/index.vue.d.ts",
272
+ "dist/TeamAddFilledIcon/index.vue.d.ts",
273
+ "dist/TeamAddOutlineIcon/index.vue.d.ts",
274
+ "dist/TeamIcon/index.vue.d.ts",
275
+ "dist/TeamOutlineIcon/index.vue.d.ts",
276
+ "dist/TextIcon/index.vue.d.ts",
277
+ "dist/TimeIcon/index.vue.d.ts",
278
+ "dist/TitleH1Icon/index.vue.d.ts",
279
+ "dist/TitleH2Icon/index.vue.d.ts",
280
+ "dist/TitleH3Icon/index.vue.d.ts",
281
+ "dist/TitleIcon/index.vue.d.ts",
282
+ "dist/TorchOffIcon/index.vue.d.ts",
283
+ "dist/TorchOnIcon/index.vue.d.ts",
284
+ "dist/TrashIcon/index.vue.d.ts",
285
+ "dist/TwoFactorAuthIcon/index.vue.d.ts",
286
+ "dist/UndoIcon/index.vue.d.ts",
287
+ "dist/UnlockedIcon/index.vue.d.ts",
288
+ "dist/UploadCloudIcon/index.vue.d.ts",
289
+ "dist/UploadFilledIcon/index.vue.d.ts",
290
+ "dist/UploadIcon/index.vue.d.ts",
291
+ "dist/UploadMultiIcon/index.vue.d.ts",
292
+ "dist/UpsideDownIcon/index.vue.d.ts",
293
+ "dist/UserGuest/index.vue.d.ts",
294
+ "dist/UserIcon/index.vue.d.ts",
295
+ "dist/UserKeyIcon/index.vue.d.ts",
296
+ "dist/UserKeyOutlineIcon/index.vue.d.ts",
297
+ "dist/UserOutlineIcon/index.vue.d.ts",
298
+ "dist/VerifiedBrandIcon/index.vue.d.ts",
299
+ "dist/VideoIcon/index.vue.d.ts",
300
+ "dist/WarningFilledIcon/index.vue.d.ts",
301
+ "dist/WidthIcon/index.vue.d.ts",
302
+ "dist/WorldIcon/index.vue.d.ts",
303
+ "dist/ZoomInIcon/index.vue.d.ts",
304
+ "dist/index.cjs",
305
+ "dist/index.d.ts",
306
+ "dist/index.mjs"
307
+ ]
75
308
  }
package/README.md DELETED
@@ -1,178 +0,0 @@
1
- # Flexible vue icon library
2
- The primary purpose is to support both dynamic and static import syntaxes for consumers of datadayrepos - and to provide a consistent base icon library.
3
-
4
- We also encopurage use of icon imports through the vite tooling system and 'unplugins' - but those will not resolve dynamic (variable based) imports which are sometimes usefull and the original rationale for this library.
5
-
6
- Especially supporting dynamic async imports turned out to be quite difficult with existing libraries.
7
-
8
- Library is designed for vuejs apps. It requires Vite and rollup to get the build to run correctly.
9
-
10
- Typed.
11
-
12
- ## Import in new project
13
- This will add the latest version of the package to your project's package.json and install it in the node_modules directory.
14
- ```bash
15
- pnpm add @datadayrepos/icons@latest
16
- # or
17
- npm i @datadayrepos/icons@latest
18
- ```
19
-
20
- ## Usage
21
-
22
- All imports are tree shakeable. The imported icon is a vue component.
23
- Different syntaxes are supported:
24
-
25
- ### Standard
26
- ```ts
27
- // Standard - imports mapped against index file and type file.
28
- import { IconCaretUp } from '@datadayrepos/icons'
29
- ```
30
-
31
- ```ts
32
- // Standard direct - imports mapped against individual file and type - maps into long list in package.json file
33
- import IconClose from '@datadayrepos/icons/IconClose'
34
- ```
35
-
36
- ### Dynamic
37
- This supports async imports by variable names.
38
- Requires building a dedicated function to map a list of icon imports against variable keys.
39
- ```ts
40
- // iconresolver.ts
41
- import { defineAsyncComponent } from 'vue'
42
-
43
- type ComponentLoader = Record<string, ReturnType<typeof defineAsyncComponent>>
44
-
45
- const componentMap: ComponentLoader = {
46
- IconClose: defineAsyncComponent(() => import('@datadayrepos/icons/IconClose')),
47
-
48
- }
49
-
50
- export function iconResolver(iconName: string) {
51
- return componentMap[iconName] ? componentMap[iconName] : null
52
- }
53
- ```
54
-
55
- ```ts
56
- // usage.ts
57
- import { iconResolver } from '../iconresolver'
58
-
59
- const Whatever = iconResolver('IconClose')
60
- ```
61
-
62
- ## Web view
63
- There is a web html file inside "view". This can be launched in vscode directly to view all icons.
64
- For example, right click on file, 'launch web server'
65
-
66
- The file gives:
67
- - visual representation of the icon
68
- - name
69
- - import syntax copy buttons
70
- - copy the svg content
71
-
72
- ## Package structure
73
- dist/
74
- IconCaretDown/
75
- index.js
76
- index.vue.d.ts
77
- IconCaretUp/
78
- index.js
79
- index.vue.d.ts
80
- ...other icons...
81
- index.js
82
- index.d.ts
83
-
84
- ## Dev and Build
85
- There are some principles here:
86
- - All source icons are as svg files in src/svg
87
- - All src/vue files are autogenerated - editing is futile
88
- - Package.json export list is autogenerated - editing is futile
89
- - Changing an icon name is a breaking change
90
- - Naming nomeclature:
91
- - Descritive littral naming
92
- - To separatefrom other components in alarge project:
93
- - All names have first charater capitilized
94
- - All names are CamelCase
95
- - All names end with 'Icon'
96
-
97
- ### Adding Icons
98
- Add file as svg in the svg folder. Keep the naming pattern, descriptive, informative, and ends with "Icon"
99
-
100
- ### Tooling helpers
101
- There are several dev tools here.
102
-
103
- Build:
104
- - Dynamically creates vue files from the svg files
105
- - Builds index.ts file
106
- - Updates package json
107
- - Builds dist package including types
108
-
109
- ```bash
110
- pnpm build
111
-
112
- # this creates vue files from the svg files. Doesnt run typescript o rbuild
113
- pnpm build-icons
114
-
115
- # MANUALLY update package version before publishing
116
- pnpm pub
117
-
118
- # Commit to git manually or by uix
119
- git add .
120
- git commit -m "Added icons"
121
- git push
122
-
123
- ```
124
-
125
- Dups:
126
- - Checks src/svg folder for duplicate svg files.
127
- - Dups are simply console logged for manual check and delete
128
-
129
- ```bash
130
- pnpm dedupeSvg
131
- ```
132
-
133
- Webview:
134
- - updates webview page based on any edits in src/svg folder
135
-
136
- ```bash
137
- pnpm createView
138
- ```
139
-
140
- Import vue files:
141
- New named vue file in template sntax containing a svg can be imported in batch.
142
- - Put filed in folder dev/single
143
- - run pnpm convertVueSvg
144
- - this fixes the syntax to a clean svg and saves file with same original filename in src/svg
145
- - If there is a conflict with existing filename the import is ignored and console.logged
146
- - IMPORTANT: Destructive operation. All successfully imported file are deleted from dev/single
147
-
148
- ```bash
149
- pnpm convertVueSvg
150
- ```
151
-
152
- Rename folders:
153
- For use when adding 'named' folders.
154
- - Checks ad changes first character to CSP
155
- - Checks and sets last word to 'Icon'
156
- - IMPORTANT: Will change folder names in dev/folder
157
-
158
- ```bash
159
- pnpm renameFolders
160
- ```
161
-
162
- Import folder system
163
- Helper to import icons in folder systems.
164
- - Takes all folders in dev/folders
165
- - Assumes foldername is new icon name
166
- - Finds 'index.vue' file, and creates svg file named as the folder
167
- - IMPORTANT: Deletes successfull imports. Ignores name folders that result in a name conflict.
168
-
169
- ```bash
170
- pnpm folderToSvg
171
- ```
172
-
173
- ## TODOs
174
- - small script for naming rules when importing files directly
175
- -
176
-
177
-
178
-