@genarou/blazir-icons 1.2.20 → 1.3.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 (69) hide show
  1. package/LICENSE +121 -0
  2. package/README.md +1206 -0
  3. package/dist/CustomIcon.svelte +30 -0
  4. package/dist/CustomIcon.svelte.d.ts +14 -0
  5. package/dist/Icon.svelte +282 -102
  6. package/dist/Icon.svelte.d.ts +12 -5
  7. package/dist/IconBadge.svelte +75 -0
  8. package/dist/IconBadge.svelte.d.ts +16 -0
  9. package/dist/IconBase.svelte +89 -57
  10. package/dist/effects.js +1 -3
  11. package/dist/icons/Camera.svelte +19 -0
  12. package/dist/icons/Camera.svelte.d.ts +4 -0
  13. package/dist/icons/Cards.svelte +19 -0
  14. package/dist/icons/Cards.svelte.d.ts +4 -0
  15. package/dist/icons/CloudAlert.svelte +19 -0
  16. package/dist/icons/CloudAlert.svelte.d.ts +4 -0
  17. package/dist/icons/CloudCheck.svelte +19 -0
  18. package/dist/icons/CloudCheck.svelte.d.ts +4 -0
  19. package/dist/icons/CloudDownload.svelte +19 -0
  20. package/dist/icons/CloudDownload.svelte.d.ts +4 -0
  21. package/dist/icons/CreditCard.svelte +19 -0
  22. package/dist/icons/CreditCard.svelte.d.ts +4 -0
  23. package/dist/icons/Desktop.svelte +19 -0
  24. package/dist/icons/Desktop.svelte.d.ts +4 -0
  25. package/dist/icons/DoughnutChart.svelte +19 -0
  26. package/dist/icons/DoughnutChart.svelte.d.ts +4 -0
  27. package/dist/icons/Earth.svelte +19 -0
  28. package/dist/icons/Earth.svelte.d.ts +4 -0
  29. package/dist/icons/Globe.svelte +19 -0
  30. package/dist/icons/Globe.svelte.d.ts +4 -0
  31. package/dist/icons/LightHub.svelte +19 -0
  32. package/dist/icons/LightHub.svelte.d.ts +4 -0
  33. package/dist/icons/Link.svelte +19 -0
  34. package/dist/icons/Link.svelte.d.ts +4 -0
  35. package/dist/icons/Power.svelte +19 -0
  36. package/dist/icons/Power.svelte.d.ts +4 -0
  37. package/dist/icons/Receipt.svelte +19 -0
  38. package/dist/icons/Receipt.svelte.d.ts +4 -0
  39. package/dist/icons/Sync.svelte +19 -0
  40. package/dist/icons/Sync.svelte.d.ts +4 -0
  41. package/dist/icons/Upload.svelte +12 -57
  42. package/dist/icons/Wifi.svelte +19 -0
  43. package/dist/icons/Wifi.svelte.d.ts +4 -0
  44. package/dist/icons/lazy-registry.d.ts +21 -0
  45. package/dist/icons/lazy-registry.js +251 -0
  46. package/dist/icons/registry.d.ts +145 -134
  47. package/dist/icons/registry.js +177 -137
  48. package/dist/icons-api.d.ts +65 -267
  49. package/dist/icons-api.js +82 -465
  50. package/dist/index.d.ts +5 -5
  51. package/dist/index.js +14 -11
  52. package/dist/plugin/index.d.ts +46 -0
  53. package/dist/plugin/index.js +327 -0
  54. package/dist/smart-cache.d.ts +35 -0
  55. package/dist/smart-cache.js +192 -0
  56. package/dist/types.d.ts +19 -2
  57. package/dist/utils/sanitize.d.ts +25 -0
  58. package/dist/utils/sanitize.js +109 -0
  59. package/package.json +23 -13
  60. package/dist/icons/Aws.svelte +0 -19
  61. package/dist/icons/Aws.svelte.d.ts +0 -4
  62. package/dist/icons/Facebook.svelte +0 -18
  63. package/dist/icons/Facebook.svelte.d.ts +0 -4
  64. package/dist/icons/Golang.svelte +0 -17
  65. package/dist/icons/Golang.svelte.d.ts +0 -4
  66. package/dist/icons/Google.svelte +0 -18
  67. package/dist/icons/Google.svelte.d.ts +0 -4
  68. package/dist/icons/Paypal.svelte +0 -21
  69. package/dist/icons/Paypal.svelte.d.ts +0 -4
package/dist/icons-api.js CHANGED
@@ -1,23 +1,22 @@
1
- // icons-api.ts
2
- import { iconRegistry } from "./icons/registry"; // ⬅️ tu registry real
3
1
  // -------------------------------------------------------------------
4
2
  // 🎯 Mantener TU nombre original: bzIcons (alias -> icon name del registry)
5
3
  // -------------------------------------------------------------------
6
4
  export const bzIcons = {
7
- // 🏠 NAVEGACIÓN Y GENERAL
5
+ // Navegación y layout —
8
6
  Home: "home",
9
7
  Dashboard: "dashboard",
10
- DashboardO: "dashboardO",
8
+ DashboardOutline: "dashboardOutline",
11
9
  Settings: "settings",
12
- Search: "magnifyingGlass",
13
- Filter: "filterOutline",
14
- FilterOutline: "filterOutline",
15
- HamburgerMenu: "hamburguer",
10
+ Search: "search",
11
+ Filter: "filter",
12
+ Menu: "menu",
16
13
  Close: "close",
17
14
  Plus: "plus",
18
15
  Copy: "copy",
19
16
  Rocket: "rocket",
20
- // 👤 USUARIOS Y AUTENTICACIÓN
17
+ Sidebar: "sidebar",
18
+ More: "more",
19
+ // — Usuarios y autenticación —
21
20
  User: "user",
22
21
  UserTie: "userTie",
23
22
  Team: "team",
@@ -33,7 +32,8 @@ export const bzIcons = {
33
32
  Shield: "shield",
34
33
  Fingerprint: "fingerprint",
35
34
  Contact: "contact",
36
- // 📧 COMUNICACIÓN
35
+ Security: "security",
36
+ // — Comunicación —
37
37
  Email: "email",
38
38
  EmailAnimated: "emailAnimated",
39
39
  Phone: "phone",
@@ -41,527 +41,144 @@ export const bzIcons = {
41
41
  Send: "send",
42
42
  Share: "share",
43
43
  World: "world",
44
- // 🏢 NEGOCIO Y EMPRESA
44
+ Chat: "chat",
45
+ Link: "link",
46
+ // — Negocio y finanzas —
45
47
  Building: "building",
46
- HandShake: "handShake",
48
+ Handshake: "handshake",
47
49
  Money: "money",
48
50
  Wallet: "wallet",
49
51
  Profit: "profit",
50
- SafeSolid: "safeSolid",
51
- CostIcon: "costIcon",
52
+ Safe: "safe",
53
+ Cost: "cost",
52
54
  Exchange: "exchange",
53
55
  Swap: "swap",
54
56
  Bank: "bank",
55
- // 📊 DATOS Y ANÁLISIS
57
+ Pay: "pay",
58
+ CreditCard: "creditCard",
59
+ Receipt: "receipt",
60
+ Buy: "buy",
61
+ // — Gráficas y datos —
56
62
  Chart: "chart",
57
- ChartDoc: "chartDoc",
58
- SquareChart: "squareChart",
63
+ ChartDocument: "chartDocument",
64
+ ChartSquare: "chartSquare",
65
+ ChartDoughnut: "chartDoughnut",
59
66
  Table: "table",
60
67
  List: "list",
61
68
  ListDots: "listDots",
62
- FormatListGroup: "formatListGroup",
63
- Lose: "lose",
64
- // 📁 ARCHIVOS Y DOCUMENTOS
69
+ ListGroup: "listGroup",
70
+ TrendingDown: "trendingDown",
71
+ Database: "database",
72
+ Server: "server",
73
+ // — Archivos y documentos —
65
74
  File: "file",
66
75
  Pdf: "pdf",
76
+ Excel: "excel",
67
77
  ExcelAnimated: "excelAnimated",
68
- Notes: "notes",
69
- Book: "book",
70
- Image: "image",
71
- ImageAnimated: "imageAnimated",
78
+ Word: "word",
79
+ PowerPoint: "powerPoint",
72
80
  Csv: "csv",
73
81
  Xml: "xml",
74
82
  Zip: "zip",
75
83
  Png: "png",
76
- Excel: "excel",
77
- PowerPoint: "powerPoint",
78
- Word: "word",
84
+ Notes: "notes",
85
+ Book: "book",
86
+ Image: "image",
87
+ ImageAnimated: "imageAnimated",
79
88
  Folder: "folder",
89
+ FolderShared: "folderShared",
80
90
  Attachment: "attachment",
81
91
  Save: "save",
82
- // 📅 CALENDARIO Y TIEMPO
92
+ Form: "form",
93
+ Print: "print",
94
+ // — Calendario y tiempo —
83
95
  Calendar: "calendar",
84
96
  CalendarPlus: "calendarPlus",
85
97
  CalendarEdit: "calendarEdit",
86
98
  Timer: "timer",
87
- // ⬆️ FLECHAS Y NAVEGACIÓN
88
- RightArrow: "rightArrow",
89
- UpArrow: "upArrow",
90
- UpDownArrow: "upDownArrow",
91
- AnimatedArrowLeft: "animatedArrowLeft",
99
+ // Flechas y navegación —
100
+ ArrowRight: "arrowRight",
101
+ ArrowUp: "arrowUp",
102
+ ArrowUpDown: "arrowUpDown",
103
+ ArrowLeftAnimated: "arrowLeftAnimated",
92
104
  ChevronDown: "chevronDown",
93
105
  ChevronUpDown: "chevronUpDown",
94
- Selector: "chevronUpDown",
95
- // ⬇️ ACCIONES DE ARCHIVO
106
+ // — Acciones de archivo —
96
107
  Download: "download",
97
108
  DownloadAnimated: "downloadAnimated",
98
109
  Upload: "upload",
99
110
  UploadAnimated: "uploadAnimated",
100
- UploadLoader: "uploadLoader",
101
- FileUpdateAnimated: "fileUpdateAnimated",
111
+ UploadProgress: "uploadProgress",
112
+ FileUploadAnimated: "fileUploadAnimated",
102
113
  Refresh: "refresh",
103
- More: "more",
104
- // ✅ ESTADOS Y FEEDBACK
114
+ // — Estados y feedback —
105
115
  Check: "check",
106
- CheckO: "checkO",
116
+ CheckOutline: "checkOutline",
117
+ CheckList: "checkList",
107
118
  CircleCheck: "circleCheck",
108
119
  Error: "error",
109
- ErrorO: "errorO",
120
+ ErrorOutline: "errorOutline",
110
121
  CircleExclamation: "circleExclamation",
122
+ CircleExclamationOutline: "circleExclamationOutline",
111
123
  Warning: "warning",
112
124
  CircleInfo: "circleInfo",
125
+ CircleInfoOutline: "circleInfoOutline",
113
126
  CircleQuestion: "circleQuestion",
127
+ CircleQuestionOutline: "circleQuestionOutline",
114
128
  Star: "star",
115
129
  Favorites: "favorites",
130
+ Heart: "heart",
116
131
  Reset: "reset",
117
132
  Height: "height",
118
133
  Alternate: "alternate",
119
- CheckList: "checkList",
120
- X: "close",
121
- CircleExclamationO: "circleExclamationO",
122
- CircleInfoO: "circleInfoO",
123
- CircleQuestionO: "circleQuestionO",
124
- Heart: "heart",
125
134
  Moon: "moon",
126
135
  Sun: "sun",
127
- // 🔄 LOADING Y PROGRESO
128
- Loading: "loadingDots",
129
- LoadingDots: "loadingDots",
130
- LoadingRegular: "loadingRegular",
131
- // 🛒 COMERCIO Y VENTAS
136
+ Colors: "colors",
137
+ // — Loading y progreso —
138
+ SpinnerDots: "spinnerDots",
139
+ Spinner: "spinner",
140
+ // Comercio y ventas —
132
141
  Product: "product",
133
142
  Bag: "bag",
134
- SaleBox: "pointSale",
143
+ POS: "pos",
135
144
  Category: "category",
136
145
  CategoryAdd: "categoryAdd",
137
- Subcategory: "categorySearch",
138
146
  CategorySearch: "categorySearch",
139
147
  BoxAdd: "boxAdd",
140
148
  Measure: "measure",
141
149
  Box: "box",
142
- ScanBar: "scan",
150
+ Scan: "scan",
143
151
  Cart: "cart",
144
- Pay: "pay",
145
- // 🚚 LOGÍSTICA Y TRANSPORTE
152
+ Cards: "cards",
153
+ // Logística y transporte —
146
154
  Truck: "truck",
147
155
  TruckReturn: "truckReturn",
148
- Storehouse: "warehouse",
156
+ Warehouse: "warehouse",
149
157
  Location: "location",
150
158
  LocationAnimated: "locationAnimated",
151
- // 🔧 HERRAMIENTAS Y UTILIDADES
159
+ // Herramientas y utilidades —
152
160
  AI: "ai",
153
161
  Edit: "edit",
154
162
  EditOutline: "editOutline",
155
163
  Trash: "trash",
156
164
  TrashOutline: "trashOutline",
157
- Security: "security",
158
- Db: "db",
159
- Server: "server",
160
- Print: "print",
161
- Form: "form",
162
- Colors: "colors",
163
- SharedFolder: "sharedFolder",
164
165
  Tags: "tags",
165
166
  Tools: "tools",
166
- Sidebar: "sidebar",
167
- // 🎨 ENTIDADES Y OBJETOS
168
167
  ObjectGroup: "objectGroup",
169
168
  Project: "project",
170
- // 🌐 TECNOLOGÍAS Y PLATAFORMAS
171
- Google: "google",
172
- Aws: "aws",
173
- Golang: "golang",
174
- Facebook: "facebook",
175
- PayPal: "paypal",
176
- };
177
- // -------------------------------------------------------------------
178
- // 📂 Categorías (100% tipadas con IconName[] y corregidas)
179
- // -------------------------------------------------------------------
180
- export const iconCategories = {
181
- navigation: [
182
- "home",
183
- "dashboard",
184
- "settings",
185
- "search",
186
- "magnifyingGlass",
187
- "filterOutline",
188
- "hamburguer",
189
- "close",
190
- "plus",
191
- "copy",
192
- ],
193
- users: [
194
- "user",
195
- "userTie",
196
- "team",
197
- "group",
198
- "supervisor",
199
- "enterprise",
200
- "lock",
201
- "lockOpen",
202
- "key",
203
- "logout",
204
- "eye",
205
- "eyeOff",
206
- "shield",
207
- ],
208
- communication: ["email", "emailAnimated", "phone", "bell"],
209
- business: [
210
- "building",
211
- "handShake",
212
- "money",
213
- "wallet",
214
- "safeSolid",
215
- "costIcon",
216
- "exchange",
217
- "swap",
218
- ],
219
- data: [
220
- "chart",
221
- "chartDoc",
222
- "squareChart",
223
- "table",
224
- "list",
225
- "listDots",
226
- "formatListGroup",
227
- "checkList",
228
- ],
229
- files: [
230
- "file",
231
- "pdf",
232
- "excelAnimated",
233
- "notes",
234
- "book",
235
- "image",
236
- "imageAnimated",
237
- "csv",
238
- "xml",
239
- "zip",
240
- "png",
241
- ],
242
- calendar: ["calendar", "calendarPlus", "calendarEdit"],
243
- arrows: [
244
- "rightArrow",
245
- "upArrow",
246
- "upDownArrow",
247
- "animatedArrowLeft",
248
- "chevronDown",
249
- "chevronUpDown",
250
- "chevronDown", // selector usa chevronUpDown, ya está arriba
251
- ],
252
- actions: [
253
- "download",
254
- "downloadAnimated",
255
- "upload",
256
- "uploadAnimated",
257
- "uploadLoader",
258
- "fileUpdateAnimated", // ← 🔧 corregido
259
- ],
260
- feedback: [
261
- "check",
262
- "checkO",
263
- "circleCheck",
264
- "error",
265
- "errorO",
266
- "circleExclamation",
267
- "warning",
268
- "circleInfo",
269
- "circleQuestion",
270
- "favorites",
271
- "star",
272
- "reset",
273
- "alternate",
274
- "height",
275
- "sidebar",
276
- ],
277
- loading: ["loadingDots", "loadingRegular"],
278
- commerce: [
279
- "product",
280
- "bag",
281
- "pointSale",
282
- "categoryAdd",
283
- "categorySearch",
284
- "boxAdd",
285
- "measure",
286
- "box",
287
- ],
288
- logistics: [
289
- "truck",
290
- "truckReturn",
291
- "warehouse",
292
- "location",
293
- "locationAnimated",
294
- ],
295
- tools: ["editOutline", "trash", "trashOutline", "scan", "security", "tools", "colors", "sharedFolder", "more"],
296
- entities: [
297
- "objectGroup", // ← 🔧 corregido (no existe 'entities' en registry)
298
- "project",
299
- "tags",
300
- ],
301
- tech: ["google", "aws", "golang", "facebook"],
302
- };
303
- // -------------------------------------------------------------------
304
- // 🧰 Shortcuts: agrupaciones amigables para autocompletado
305
- // -------------------------------------------------------------------
306
- export const icons = {
307
- actions: {
308
- plus: bzIcons.Plus,
309
- download: bzIcons.Download,
310
- downloadAnimated: bzIcons.DownloadAnimated,
311
- edit: bzIcons.EditOutline,
312
- upload: bzIcons.Upload,
313
- uploadAnimated: bzIcons.UploadAnimated,
314
- uploadLoader: bzIcons.UploadLoader,
315
- fileUpdateAnimated: bzIcons.FileUpdateAnimated,
316
- delete: bzIcons.Trash,
317
- x: bzIcons.Close,
318
- check: bzIcons.Check,
319
- filter: bzIcons.Filter,
320
- copy: bzIcons.Copy,
321
- favorites: bzIcons.Favorites,
322
- star: bzIcons.Star,
323
- trash: bzIcons.Trash,
324
- trashOutline: bzIcons.TrashOutline,
325
- refresh: bzIcons.Refresh,
326
- },
327
- nav: {
328
- home: bzIcons.Home,
329
- dashboard: bzIcons.Dashboard,
330
- settings: bzIcons.Settings,
331
- hamburgerMenu: bzIcons.HamburgerMenu,
332
- close: bzIcons.Close,
333
- search: bzIcons.Search,
334
- filter: bzIcons.Filter,
335
- copy: bzIcons.Copy,
336
- location: bzIcons.Location,
337
- locationAnimated: bzIcons.LocationAnimated,
338
- },
339
- user: {
340
- profile: bzIcons.User,
341
- team: bzIcons.Team,
342
- supervisor: bzIcons.Supervisor,
343
- enterprise: bzIcons.Enterprise,
344
- key: bzIcons.Key,
345
- logout: bzIcons.Logout,
346
- lock: bzIcons.Lock,
347
- lockOpen: bzIcons.LockOpen,
348
- eye: bzIcons.Eye,
349
- eyeOff: bzIcons.EyeOff,
350
- shield: bzIcons.Shield,
351
- },
352
- comm: {
353
- email: bzIcons.Email,
354
- phone: bzIcons.Phone,
355
- bell: bzIcons.Bell,
356
- },
357
- business: {
358
- building: bzIcons.Building,
359
- handshake: bzIcons.HandShake,
360
- money: bzIcons.Money,
361
- wallet: bzIcons.Wallet,
362
- profit: bzIcons.Profit,
363
- cost: bzIcons.CostIcon,
364
- exchange: bzIcons.Exchange,
365
- swap: bzIcons.Swap,
366
- },
367
- data: {
368
- chart: bzIcons.Chart,
369
- chartDoc: bzIcons.ChartDoc,
370
- squareChart: bzIcons.SquareChart,
371
- table: bzIcons.Table,
372
- list: bzIcons.List,
373
- listDots: bzIcons.ListDots,
374
- formatListGroup: bzIcons.FormatListGroup,
375
- checkList: bzIcons.CheckList,
376
- sharedFolder: bzIcons.SharedFolder
377
- },
378
- file: {
379
- file: bzIcons.File,
380
- pdf: bzIcons.Pdf,
381
- notes: bzIcons.Notes,
382
- book: bzIcons.Book,
383
- csv: bzIcons.Csv,
384
- xml: bzIcons.Xml,
385
- zip: bzIcons.Zip,
386
- png: bzIcons.Png,
387
- excelAnimated: bzIcons.ExcelAnimated,
388
- image: bzIcons.Image,
389
- imageAnimated: bzIcons.ImageAnimated,
390
- attachment: bzIcons.Attachment,
391
- save: bzIcons.Save,
392
- folder: bzIcons.Folder,
393
- },
394
- calendar: {
395
- calendar: bzIcons.Calendar,
396
- calendarPlus: bzIcons.CalendarPlus,
397
- calendarEdit: bzIcons.CalendarEdit,
398
- },
399
- arrows: {
400
- right: bzIcons.RightArrow,
401
- up: bzIcons.UpArrow,
402
- upDown: bzIcons.UpDownArrow,
403
- chevronDown: bzIcons.ChevronDown,
404
- chevronUpDown: bzIcons.ChevronUpDown,
405
- selector: bzIcons.Selector,
406
- animatedArrowLeft: bzIcons.AnimatedArrowLeft,
407
- lose: bzIcons.Lose,
408
- },
409
- status: {
410
- check: bzIcons.Check,
411
- checkO: bzIcons.CheckO,
412
- circleCheck: bzIcons.CircleCheck,
413
- error: bzIcons.Error,
414
- errorO: bzIcons.ErrorO,
415
- circleExclamation: bzIcons.CircleExclamation,
416
- warning: bzIcons.Warning,
417
- info: bzIcons.CircleInfo,
418
- question: bzIcons.CircleQuestion,
419
- reset: bzIcons.Reset,
420
- alternate: bzIcons.Alternate,
421
- height: bzIcons.Height,
422
- measure: bzIcons.Measure,
423
- },
424
- loading: {
425
- dots: bzIcons.LoadingDots,
426
- regular: bzIcons.LoadingRegular,
427
- },
428
- commerce: {
429
- product: bzIcons.Product,
430
- bag: bzIcons.Bag,
431
- categoryAdd: bzIcons.CategoryAdd,
432
- categorySearch: bzIcons.CategorySearch,
433
- boxAdd: bzIcons.BoxAdd,
434
- box: bzIcons.Box,
435
- scanBar: bzIcons.ScanBar,
436
- truck: bzIcons.Truck,
437
- truckReturn: bzIcons.TruckReturn,
438
- storehouse: bzIcons.Storehouse,
439
- },
440
- entities: {
441
- objectGroup: bzIcons.ObjectGroup,
442
- project: bzIcons.Project,
443
- security: bzIcons.Security,
444
- hamburgerMenu: bzIcons.HamburgerMenu,
445
- colors: bzIcons.Colors,
446
- tools: bzIcons.Tools,
447
- more: bzIcons.More,
448
- sidebar: bzIcons.Sidebar,
449
- tags: bzIcons.Tags
450
- },
451
- platforms: {
452
- google: bzIcons.Google,
453
- aws: bzIcons.Aws,
454
- golang: bzIcons.Golang,
455
- facebook: bzIcons.Facebook,
456
- },
457
- };
458
- // -------------------------------------------------------------------
459
- // 🚀 IconAPI: utilidades tipadas
460
- // -------------------------------------------------------------------
461
- export class IconAPI {
462
- // Retorna sólo los válidos (íconos que existen en el registry)
463
- static getValid(...names) {
464
- const results = [];
465
- for (const name of names) {
466
- const iconName = bzIcons[name];
467
- if (iconName && iconName in iconRegistry) {
468
- results.push({
469
- iconName,
470
- component: iconRegistry[iconName],
471
- });
472
- }
473
- }
474
- return results;
475
- }
476
- // Búsqueda por texto en alias (keys) o iconName (values)
477
- static search(query) {
478
- const q = query.toLowerCase();
479
- return Object.entries(bzIcons)
480
- .filter(([key, iconName]) => key.toLowerCase().includes(q) || iconName.toLowerCase().includes(q))
481
- .map(([key, iconName]) => ({
482
- key,
483
- iconName,
484
- component: iconRegistry[iconName],
485
- }));
486
- }
487
- static findByName(name) {
488
- const iconName = bzIcons[name];
489
- return iconName && iconName in iconRegistry ? iconName : undefined;
490
- }
491
- static getComponent(name) {
492
- const iconName = this.findByName(name);
493
- return iconName ? iconRegistry[iconName] : undefined;
494
- }
495
- static exists(name) {
496
- return !!this.findByName(name);
497
- }
498
- // 📂 Categorías → devuelve pares {iconName, component} ya validados
499
- static getByCategory(category) {
500
- const iconsInCategory = iconCategories[category]; // readonly IconName[]
501
- return iconsInCategory.map((iconName) => ({
502
- iconName,
503
- component: iconRegistry[iconName],
504
- }));
505
- }
506
- static getAllCategories() {
507
- return Object.keys(iconCategories);
508
- }
509
- static random() {
510
- const iconNames = Object.values(bzIcons);
511
- const randomName = iconNames[Math.floor(Math.random() * iconNames.length)];
512
- return { iconName: randomName, component: iconRegistry[randomName] };
513
- }
514
- static count() {
515
- return Object.keys(bzIcons).length;
516
- }
517
- static list() {
518
- return Object.entries(bzIcons).map(([key, iconName]) => ({
519
- key,
520
- iconName,
521
- component: iconRegistry[iconName],
522
- }));
523
- }
524
- }
525
- // -------------------------------------------------------------------
526
- // 📊 Estadísticas
527
- // -------------------------------------------------------------------
528
- export const iconStats = {
529
- get total() {
530
- return Object.keys(bzIcons).length;
531
- },
532
- get categories() {
533
- return Object.keys(iconCategories).length;
534
- },
535
- get animated() {
536
- return Object.values(bzIcons).filter((n) => n.toLowerCase().includes("animated")).length;
537
- },
538
- get byCategory() {
539
- return Object.fromEntries(Object.entries(iconCategories).map(([cat, list]) => [cat, list.length]));
540
- },
541
- get mostUsedCategory() {
542
- const entries = Object.entries(iconCategories);
543
- const max = entries.reduce((acc, [name, arr]) => arr.length > acc.count ? { name, count: arr.length } : acc, { name: "", count: 0 });
544
- return max.name;
545
- },
546
- get shortcuts() {
547
- return Object.keys(icons).length;
548
- },
169
+ // Media y dispositivos —
170
+ Camera: "camera",
171
+ Desktop: "desktop",
172
+ Wifi: "wifi",
173
+ Power: "power",
174
+ // — Nube —
175
+ CloudAlert: "cloudAlert",
176
+ CloudCheck: "cloudCheck",
177
+ CloudDownload: "cloudDownload",
178
+ // — Otros —
179
+ Blaze: "blaze",
180
+ Earth: "earth",
181
+ Globe: "globe",
182
+ LightHub: "lightHub",
183
+ Sync: "sync",
549
184
  };
550
- /* ==========================================================================
551
- 📝 Ejemplos de uso
552
-
553
- import { IconAPI, bzIcons, icons } from "./icons-api";
554
-
555
- // Búsqueda
556
- const results = IconAPI.search("user");
557
-
558
- // Alias original:
559
- <Icon name={bzIcons.Home} size={24} />
560
-
561
- // Shortcuts:
562
- <Icon name={icons.nav.home} size={24} />
563
-
564
- // Categorías:
565
- const feedbackIcons = IconAPI.getByCategory("feedback");
566
-
567
- =========================================================================== */
package/dist/index.d.ts CHANGED
@@ -2,10 +2,10 @@ import "./icon-animation.css";
2
2
  export type { DynamicIconProps, IconMode, IconProps } from "./types.js";
3
3
  export { default as Icon } from "./Icon.svelte";
4
4
  export { default as IconBase } from "./IconBase.svelte";
5
+ export { default as CustomIcon } from "./CustomIcon.svelte";
6
+ export { default as IconBadge } from "./IconBadge.svelte";
5
7
  export { iconEffects, type IconEffectOptions } from "./effects.js";
6
- export { coerceSize, coerceStrokeWidth, commonDefaults, modeDefaults, normalizeClass, withDefaults, } from "./utils/defaults.js";
7
- export { combineTransforms, getAnimationClasses, getAnimationStyle, getChevronTransform, getMorphTransform, getSlideTransform, } from "./utils/animations.js";
8
- export { batchStyleUpdates, EASING_PRESETS, getPrefersReducedMotion, optimizeEasing, } from "./utils/performance.js";
9
- export * from "./utils/debounce.js";
10
- export { bzIcons, IconAPI, iconCategories, icons, iconStats, type BzIconKey, type IconCategory, type IconShortcutCategory, } from "./icons-api.js";
8
+ export { sanitizeSvg } from "./utils/sanitize.js";
9
+ export { bzIcons, type BzIconKey, } from "./icons-api.js";
11
10
  export { iconRegistry, type IconComponent, type IconName, } from "./icons/registry.js";
11
+ export { getLoadedIcon, lazyIconNames, loadIcon, preloadIcons, } from "./icons/lazy-registry.js";