@nice2dev/icons 1.0.0 → 1.0.3

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 (152) hide show
  1. package/CHANGELOG.md +169 -7
  2. package/README.md +247 -2
  3. package/bin/ntd-icons.mjs +732 -0
  4. package/dist/cjs/NtdIconBadge.js +375 -0
  5. package/dist/cjs/NtdIconBadge.js.map +1 -0
  6. package/dist/cjs/NtdIconMorph.js +386 -0
  7. package/dist/cjs/NtdIconMorph.js.map +1 -0
  8. package/dist/cjs/NtdStateMorph.js +177 -0
  9. package/dist/cjs/NtdStateMorph.js.map +1 -0
  10. package/dist/cjs/createIcon.js +51 -4
  11. package/dist/cjs/createIcon.js.map +1 -1
  12. package/dist/cjs/figmaSync.js +308 -0
  13. package/dist/cjs/figmaSync.js.map +1 -0
  14. package/dist/cjs/iconAnalytics.js +189 -0
  15. package/dist/cjs/iconAnalytics.js.map +1 -0
  16. package/dist/cjs/iconMetadata.js +523 -0
  17. package/dist/cjs/iconMetadata.js.map +1 -0
  18. package/dist/cjs/iconStyles.js +597 -0
  19. package/dist/cjs/iconStyles.js.map +1 -0
  20. package/dist/cjs/icons/accessibility.js +168 -0
  21. package/dist/cjs/icons/accessibility.js.map +1 -0
  22. package/dist/cjs/icons/ai.js +191 -0
  23. package/dist/cjs/icons/ai.js.map +1 -0
  24. package/dist/cjs/icons/brand.js +70 -0
  25. package/dist/cjs/icons/brand.js.map +1 -1
  26. package/dist/cjs/icons/education.js +212 -0
  27. package/dist/cjs/icons/education.js.map +1 -0
  28. package/dist/cjs/icons/food.js +198 -0
  29. package/dist/cjs/icons/food.js.map +1 -0
  30. package/dist/cjs/icons/gaming.js +191 -0
  31. package/dist/cjs/icons/gaming.js.map +1 -0
  32. package/dist/cjs/icons/index.js +520 -0
  33. package/dist/cjs/icons/index.js.map +1 -0
  34. package/dist/cjs/icons/legal.js +168 -0
  35. package/dist/cjs/icons/legal.js.map +1 -0
  36. package/dist/cjs/icons/realestate.js +212 -0
  37. package/dist/cjs/icons/realestate.js.map +1 -0
  38. package/dist/cjs/icons/science.js +201 -0
  39. package/dist/cjs/icons/science.js.map +1 -0
  40. package/dist/cjs/icons/sports.js +176 -0
  41. package/dist/cjs/icons/sports.js.map +1 -0
  42. package/dist/cjs/icons/sustainability.js +193 -0
  43. package/dist/cjs/icons/sustainability.js.map +1 -0
  44. package/dist/cjs/icons/travel.js +184 -0
  45. package/dist/cjs/icons/travel.js.map +1 -0
  46. package/dist/cjs/index.js +265 -2
  47. package/dist/cjs/index.js.map +1 -1
  48. package/dist/cjs/lottieIntegration.js +286 -0
  49. package/dist/cjs/lottieIntegration.js.map +1 -0
  50. package/dist/cjs/nicetodev-icons.css +1 -1
  51. package/dist/cjs/particleEffects.js +259 -0
  52. package/dist/cjs/particleEffects.js.map +1 -0
  53. package/dist/cjs/resolver.js +224 -0
  54. package/dist/cjs/resolver.js.map +1 -0
  55. package/dist/cjs/tailwind-plugin.js +340 -0
  56. package/dist/cjs/tailwind-plugin.js.map +1 -0
  57. package/dist/cjs/types.js +38 -0
  58. package/dist/cjs/types.js.map +1 -1
  59. package/dist/cjs/variantProps.js +78 -0
  60. package/dist/cjs/variantProps.js.map +1 -0
  61. package/dist/esm/NtdIconBadge.js +370 -0
  62. package/dist/esm/NtdIconBadge.js.map +1 -0
  63. package/dist/esm/NtdIconMorph.js +381 -0
  64. package/dist/esm/NtdIconMorph.js.map +1 -0
  65. package/dist/esm/NtdStateMorph.js +174 -0
  66. package/dist/esm/NtdStateMorph.js.map +1 -0
  67. package/dist/esm/createIcon.js +53 -6
  68. package/dist/esm/createIcon.js.map +1 -1
  69. package/dist/esm/figmaSync.js +304 -0
  70. package/dist/esm/figmaSync.js.map +1 -0
  71. package/dist/esm/iconAnalytics.js +185 -0
  72. package/dist/esm/iconAnalytics.js.map +1 -0
  73. package/dist/esm/iconMetadata.js +510 -0
  74. package/dist/esm/iconMetadata.js.map +1 -0
  75. package/dist/esm/iconStyles.js +585 -0
  76. package/dist/esm/iconStyles.js.map +1 -0
  77. package/dist/esm/icons/accessibility.js +153 -0
  78. package/dist/esm/icons/accessibility.js.map +1 -0
  79. package/dist/esm/icons/ai.js +174 -0
  80. package/dist/esm/icons/ai.js.map +1 -0
  81. package/dist/esm/icons/brand.js +67 -1
  82. package/dist/esm/icons/brand.js.map +1 -1
  83. package/dist/esm/icons/education.js +193 -0
  84. package/dist/esm/icons/education.js.map +1 -0
  85. package/dist/esm/icons/food.js +180 -0
  86. package/dist/esm/icons/food.js.map +1 -0
  87. package/dist/esm/icons/gaming.js +174 -0
  88. package/dist/esm/icons/gaming.js.map +1 -0
  89. package/dist/esm/icons/index.js +31 -0
  90. package/dist/esm/icons/index.js.map +1 -0
  91. package/dist/esm/icons/legal.js +153 -0
  92. package/dist/esm/icons/legal.js.map +1 -0
  93. package/dist/esm/icons/realestate.js +193 -0
  94. package/dist/esm/icons/realestate.js.map +1 -0
  95. package/dist/esm/icons/science.js +183 -0
  96. package/dist/esm/icons/science.js.map +1 -0
  97. package/dist/esm/icons/sports.js +160 -0
  98. package/dist/esm/icons/sports.js.map +1 -0
  99. package/dist/esm/icons/sustainability.js +176 -0
  100. package/dist/esm/icons/sustainability.js.map +1 -0
  101. package/dist/esm/icons/travel.js +167 -0
  102. package/dist/esm/icons/travel.js.map +1 -0
  103. package/dist/esm/index.js +27 -5
  104. package/dist/esm/index.js.map +1 -1
  105. package/dist/esm/lottieIntegration.js +282 -0
  106. package/dist/esm/lottieIntegration.js.map +1 -0
  107. package/dist/esm/nicetodev-icons.css +1 -1
  108. package/dist/esm/particleEffects.js +257 -0
  109. package/dist/esm/particleEffects.js.map +1 -0
  110. package/dist/esm/resolver.js +221 -0
  111. package/dist/esm/resolver.js.map +1 -0
  112. package/dist/esm/tailwind-plugin.js +337 -0
  113. package/dist/esm/tailwind-plugin.js.map +1 -0
  114. package/dist/esm/types.js +37 -1
  115. package/dist/esm/types.js.map +1 -1
  116. package/dist/esm/variantProps.js +68 -0
  117. package/dist/esm/variantProps.js.map +1 -0
  118. package/dist/types/NtdIconBadge.d.ts +209 -0
  119. package/dist/types/NtdIconMorph.d.ts +183 -0
  120. package/dist/types/NtdStateMorph.d.ts +100 -0
  121. package/dist/types/client.d.ts +27 -0
  122. package/dist/types/design-tokens.d.ts +281 -0
  123. package/dist/types/figmaSync.d.ts +135 -0
  124. package/dist/types/headless-ui.d.ts +462 -0
  125. package/dist/types/iconAnalytics.d.ts +131 -0
  126. package/dist/types/iconMetadata.d.ts +123 -0
  127. package/dist/types/iconStyles.d.ts +104 -0
  128. package/dist/types/icons/accessibility.d.ts +39 -0
  129. package/dist/types/icons/ai.d.ts +43 -0
  130. package/dist/types/icons/brand.d.ts +4 -0
  131. package/dist/types/icons/education.d.ts +47 -0
  132. package/dist/types/icons/food.d.ts +45 -0
  133. package/dist/types/icons/gaming.d.ts +42 -0
  134. package/dist/types/icons/index.d.ts +12 -1
  135. package/dist/types/icons/legal.d.ts +39 -0
  136. package/dist/types/icons/realestate.d.ts +47 -0
  137. package/dist/types/icons/science.d.ts +45 -0
  138. package/dist/types/icons/sports.d.ts +41 -0
  139. package/dist/types/icons/sustainability.d.ts +43 -0
  140. package/dist/types/icons/travel.d.ts +43 -0
  141. package/dist/types/index.d.ts +28 -6
  142. package/dist/types/lottieIntegration.d.ts +173 -0
  143. package/dist/types/micro-interactions.d.ts +146 -0
  144. package/dist/types/microInteractions.d.ts +174 -0
  145. package/dist/types/particleEffects.d.ts +69 -0
  146. package/dist/types/resolver.d.ts +58 -0
  147. package/dist/types/rsc.d.ts +159 -0
  148. package/dist/types/tailwind-plugin.d.ts +100 -0
  149. package/dist/types/types.d.ts +100 -0
  150. package/dist/types/utilities.d.ts +221 -0
  151. package/dist/types/variantProps.d.ts +122 -0
  152. package/package.json +58 -5
@@ -0,0 +1,221 @@
1
+ /**
2
+ * @file utilities.ts
3
+ * @description Utility hooks and functions for @nice2dev/icons
4
+ *
5
+ * Provides:
6
+ * - useIcon hook for dynamic icon loading
7
+ * - useReducedMotion hook for accessibility
8
+ * - preloadIcons for performance optimization
9
+ * - Icon type guards and helpers
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * import { useIcon, useReducedMotion, preloadIcons } from '@nice2dev/icons/utilities';
14
+ *
15
+ * // Dynamic icon loading
16
+ * const { Icon, isLoading } = useIcon('NtdHome');
17
+ *
18
+ * // Respect user preference for reduced motion
19
+ * const prefersReducedMotion = useReducedMotion();
20
+ *
21
+ * // Preload icons for better performance
22
+ * await preloadIcons(['NtdHome', 'NtdSearch', 'NtdUser']);
23
+ * ```
24
+ *
25
+ * @version 1.0.0
26
+ * @since 2026-03
27
+ * @license MIT
28
+ */
29
+ import React from 'react';
30
+ import type { ComponentType } from 'react';
31
+ import type { NtdIconProps } from './types';
32
+ /**
33
+ * Icon component type
34
+ */
35
+ export type IconComponentType = ComponentType<NtdIconProps>;
36
+ /**
37
+ * Result of useIcon hook
38
+ */
39
+ export interface UseIconResult {
40
+ /** The loaded icon component, or null if loading/not found */
41
+ Icon: IconComponentType | null;
42
+ /** Whether the icon is currently loading */
43
+ isLoading: boolean;
44
+ /** Error if icon failed to load */
45
+ error: Error | null;
46
+ }
47
+ /**
48
+ * Options for useIcon hook
49
+ */
50
+ export interface UseIconOptions {
51
+ /** Fallback icon while loading */
52
+ fallback?: IconComponentType;
53
+ /** Cache loaded icons */
54
+ cache?: boolean;
55
+ }
56
+ /**
57
+ * Registers an icon in the global registry
58
+ */
59
+ export declare function registerIcon(name: string, component: IconComponentType): void;
60
+ /**
61
+ * Gets an icon from the registry
62
+ */
63
+ export declare function getIconFromRegistry(name: string): IconComponentType | undefined;
64
+ /**
65
+ * Clears the icon registry
66
+ */
67
+ export declare function clearIconRegistry(): void;
68
+ /**
69
+ * Gets all registered icon names
70
+ */
71
+ export declare function getRegisteredIconNames(): string[];
72
+ /**
73
+ * Hook for dynamically loading icons by name.
74
+ *
75
+ * @param iconName - Name of the icon to load (e.g., 'NtdHome')
76
+ * @param options - Loading options
77
+ * @returns Icon component, loading state, and error
78
+ *
79
+ * @example
80
+ * ```tsx
81
+ * function DynamicIcon({ name }: { name: string }) {
82
+ * const { Icon, isLoading, error } = useIcon(name);
83
+ *
84
+ * if (isLoading) return <Spinner />;
85
+ * if (error || !Icon) return <FallbackIcon />;
86
+ *
87
+ * return <Icon size="md" />;
88
+ * }
89
+ * ```
90
+ */
91
+ export declare function useIcon(iconName: string | undefined, options?: UseIconOptions): UseIconResult;
92
+ /**
93
+ * Hook that returns true if user prefers reduced motion.
94
+ * Uses useSyncExternalStore for SSR compatibility.
95
+ *
96
+ * @returns Whether the user prefers reduced motion
97
+ *
98
+ * @example
99
+ * ```tsx
100
+ * function AnimatedIcon() {
101
+ * const prefersReducedMotion = useReducedMotion();
102
+ *
103
+ * return (
104
+ * <NtdHeart
105
+ * animation={prefersReducedMotion ? undefined : 'pulse'}
106
+ * />
107
+ * );
108
+ * }
109
+ * ```
110
+ */
111
+ export declare function useReducedMotion(): boolean;
112
+ /**
113
+ * Preloads icons into the registry for instant access.
114
+ *
115
+ * @param iconNames - Array of icon names to preload
116
+ * @returns Promise that resolves when all icons are loaded
117
+ *
118
+ * @example
119
+ * ```tsx
120
+ * // Preload critical icons at app startup
121
+ * useEffect(() => {
122
+ * preloadIcons(['NtdHome', 'NtdSearch', 'NtdUser', 'NtdMenu']);
123
+ * }, []);
124
+ * ```
125
+ */
126
+ export declare function preloadIcons(iconNames: string[]): Promise<Map<string, IconComponentType>>;
127
+ /**
128
+ * Creates a preloader component that preloads icons on mount.
129
+ *
130
+ * @param iconNames - Icons to preload
131
+ * @returns React component that preloads icons
132
+ *
133
+ * @example
134
+ * ```tsx
135
+ * const IconPreloader = createIconPreloader(['NtdHome', 'NtdSearch']);
136
+ *
137
+ * function App() {
138
+ * return (
139
+ * <>
140
+ * <IconPreloader />
141
+ * <MainContent />
142
+ * </>
143
+ * );
144
+ * }
145
+ * ```
146
+ */
147
+ export declare function createIconPreloader(iconNames: string[]): React.FC;
148
+ /**
149
+ * Creates props with animation disabled if user prefers reduced motion.
150
+ *
151
+ * @param props - Original icon props
152
+ * @param prefersReducedMotion - Whether user prefers reduced motion
153
+ * @returns Props with animation conditionally disabled
154
+ */
155
+ export declare function withReducedMotionProps<T extends Partial<NtdIconProps>>(props: T, prefersReducedMotion: boolean): T;
156
+ /**
157
+ * Creates accessible icon props based on context.
158
+ *
159
+ * @param options - Accessibility options
160
+ * @returns Icon props for accessibility
161
+ */
162
+ export declare function createAccessibleIconProps(options: {
163
+ label?: string;
164
+ isDecorative?: boolean;
165
+ role?: string;
166
+ }): Partial<NtdIconProps>;
167
+ /**
168
+ * Checks if a value is a valid icon component.
169
+ * Handles both regular components and forwardRef components.
170
+ */
171
+ export declare function isIconComponent(value: unknown): value is IconComponentType;
172
+ /**
173
+ * Checks if an icon name is valid.
174
+ */
175
+ export declare function isValidIconName(name: string): boolean;
176
+ /**
177
+ * Configuration for batch icon rendering.
178
+ */
179
+ export interface BatchIconConfig {
180
+ name: string;
181
+ props?: Partial<NtdIconProps>;
182
+ }
183
+ /**
184
+ * Creates a function that renders multiple icons efficiently.
185
+ *
186
+ * @param configs - Array of icon configurations
187
+ * @returns Function that renders all configured icons
188
+ *
189
+ * @example
190
+ * ```tsx
191
+ * const renderNavIcons = createBatchIconRenderer([
192
+ * { name: 'NtdHome', props: { size: 'md' } },
193
+ * { name: 'NtdSearch', props: { size: 'md' } },
194
+ * { name: 'NtdUser', props: { size: 'md' } },
195
+ * ]);
196
+ *
197
+ * // In component
198
+ * const icons = renderNavIcons();
199
+ * ```
200
+ */
201
+ export declare function useBatchIcons(configs: BatchIconConfig[]): {
202
+ renderIcon: (name: string, additionalProps?: Partial<NtdIconProps>) => React.ReactElement<NtdIconProps, string | React.JSXElementConstructor<any>> | null;
203
+ isLoading: boolean;
204
+ icons: Map<string, IconComponentType>;
205
+ };
206
+ declare const _default: {
207
+ useIcon: typeof useIcon;
208
+ useReducedMotion: typeof useReducedMotion;
209
+ preloadIcons: typeof preloadIcons;
210
+ createIconPreloader: typeof createIconPreloader;
211
+ registerIcon: typeof registerIcon;
212
+ getIconFromRegistry: typeof getIconFromRegistry;
213
+ clearIconRegistry: typeof clearIconRegistry;
214
+ getRegisteredIconNames: typeof getRegisteredIconNames;
215
+ withReducedMotionProps: typeof withReducedMotionProps;
216
+ createAccessibleIconProps: typeof createAccessibleIconProps;
217
+ isIconComponent: typeof isIconComponent;
218
+ isValidIconName: typeof isValidIconName;
219
+ useBatchIcons: typeof useBatchIcons;
220
+ };
221
+ export default _default;
@@ -0,0 +1,122 @@
1
+ /**
2
+ * @file variantProps.ts
3
+ * @description Discriminated unions and strict prop validation per icon variant.
4
+ *
5
+ * Provides narrowed prop types for each icon variant (solid, outline, duotone, flat,
6
+ * sharp, rounded, mini, 3d) with variant-specific required/optional props.
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * // Narrows to DuotoneIconProps — guarantees secondaryColor is accepted
11
+ * const props: VariantIconProps = {
12
+ * variant: 'duotone',
13
+ * primaryColor: '#3b82f6',
14
+ * secondaryColor: '#93c5fd',
15
+ * secondaryOpacity: 0.4,
16
+ * };
17
+ *
18
+ * // Type guard usage
19
+ * if (isDuotoneProps(props)) {
20
+ * props.secondaryColor; // string — narrowed
21
+ * }
22
+ * ```
23
+ */
24
+ import type { NtdIconProps, IconSize, IconAnimation, GradientPreset, SemanticColor } from './types';
25
+ interface SharedIconProps {
26
+ size?: IconSize;
27
+ color?: SemanticColor;
28
+ primaryColor?: string;
29
+ animation?: IconAnimation;
30
+ animationDuration?: string;
31
+ gradient?: GradientPreset;
32
+ rotate?: number;
33
+ flipX?: boolean;
34
+ flipY?: boolean;
35
+ scale?: number;
36
+ title?: string;
37
+ className?: string;
38
+ style?: React.CSSProperties;
39
+ }
40
+ /** Props for `variant="solid"` — filled shapes, no stroke-specific props needed. */
41
+ export interface SolidIconProps extends SharedIconProps {
42
+ variant: 'solid';
43
+ }
44
+ /** Props for `variant="outline"` — stroke-based, strokeWidth is important. */
45
+ export interface OutlineIconProps extends SharedIconProps {
46
+ variant: 'outline';
47
+ strokeWidth?: number;
48
+ strokeLinecap?: 'round' | 'square' | 'butt';
49
+ strokeLinejoin?: 'round' | 'miter' | 'bevel';
50
+ }
51
+ /** Props for `variant="duotone"` — two-color rendering with opacity control. */
52
+ export interface DuotoneIconProps extends SharedIconProps {
53
+ variant: 'duotone';
54
+ secondaryColor?: string;
55
+ secondaryOpacity?: number;
56
+ strokeWidth?: number;
57
+ }
58
+ /** Props for `variant="flat"` — badge-style with background color. */
59
+ export interface FlatIconProps extends SharedIconProps {
60
+ variant: 'flat';
61
+ secondaryColor?: string;
62
+ }
63
+ /** Props for `variant="sharp"` — solid with sharp corners. */
64
+ export interface SharpIconProps extends SharedIconProps {
65
+ variant: 'sharp';
66
+ }
67
+ /** Props for `variant="rounded"` — solid with extra-rounded corners. */
68
+ export interface RoundedIconProps extends SharedIconProps {
69
+ variant: 'rounded';
70
+ }
71
+ /** Props for `variant="mini"` — compact, optimized for small sizes. */
72
+ export interface MiniIconProps extends SharedIconProps {
73
+ variant: 'mini';
74
+ }
75
+ /** Props for `variant="3d"` — pseudo-3D with highlights and shadows. */
76
+ export interface ThreeDIconProps extends SharedIconProps {
77
+ variant: '3d';
78
+ accentColor?: string;
79
+ accentOpacity?: number;
80
+ }
81
+ /**
82
+ * Discriminated union of all variant-specific prop types.
83
+ *
84
+ * Use this when you want TypeScript to narrow the type based on `variant`.
85
+ *
86
+ * @example
87
+ * ```tsx
88
+ * function renderIcon(props: VariantIconProps) {
89
+ * switch (props.variant) {
90
+ * case 'duotone':
91
+ * return <NtdHome {...props} />; // props.secondaryColor is available
92
+ * case 'outline':
93
+ * return <NtdHome {...props} />; // props.strokeWidth is available
94
+ * default:
95
+ * return <NtdHome {...props} />;
96
+ * }
97
+ * }
98
+ * ```
99
+ */
100
+ export type VariantIconProps = SolidIconProps | OutlineIconProps | DuotoneIconProps | FlatIconProps | SharpIconProps | RoundedIconProps | MiniIconProps | ThreeDIconProps;
101
+ /** Narrows to `SolidIconProps` when `variant === 'solid'`. */
102
+ export declare function isSolidProps(props: VariantIconProps): props is SolidIconProps;
103
+ /** Narrows to `OutlineIconProps` when `variant === 'outline'`. */
104
+ export declare function isOutlineProps(props: VariantIconProps): props is OutlineIconProps;
105
+ /** Narrows to `DuotoneIconProps` when `variant === 'duotone'`. */
106
+ export declare function isDuotoneProps(props: VariantIconProps): props is DuotoneIconProps;
107
+ /** Narrows to `FlatIconProps` when `variant === 'flat'`. */
108
+ export declare function isFlatProps(props: VariantIconProps): props is FlatIconProps;
109
+ /** Narrows to `SharpIconProps` when `variant === 'sharp'`. */
110
+ export declare function isSharpProps(props: VariantIconProps): props is SharpIconProps;
111
+ /** Narrows to `RoundedIconProps` when `variant === 'rounded'`. */
112
+ export declare function isRoundedProps(props: VariantIconProps): props is RoundedIconProps;
113
+ /** Narrows to `MiniIconProps` when `variant === 'mini'`. */
114
+ export declare function isMiniProps(props: VariantIconProps): props is MiniIconProps;
115
+ /** Narrows to `ThreeDIconProps` when `variant === '3d'`. */
116
+ export declare function isThreeDProps(props: VariantIconProps): props is ThreeDIconProps;
117
+ /**
118
+ * Converts a discriminated `VariantIconProps` into the general `NtdIconProps`.
119
+ * Useful when passing narrowed props to actual icon components.
120
+ */
121
+ export declare function toIconProps(props: VariantIconProps): NtdIconProps;
122
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice2dev/icons",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "description": "Beautiful, lightweight, multi-color SVG icon library for React with animations",
5
5
  "author": "NiceToDev <contact@nicetodev.com>",
6
6
  "license": "MIT",
@@ -16,11 +16,53 @@
16
16
  "main": "dist/cjs/index.js",
17
17
  "module": "dist/esm/index.js",
18
18
  "types": "dist/types/index.d.ts",
19
+ "exports": {
20
+ ".": {
21
+ "import": "./dist/esm/index.js",
22
+ "require": "./dist/cjs/index.js",
23
+ "types": "./dist/types/index.d.ts"
24
+ },
25
+ "./rsc": {
26
+ "import": "./dist/esm/rsc.js",
27
+ "require": "./dist/cjs/rsc.js",
28
+ "types": "./dist/types/rsc.d.ts"
29
+ },
30
+ "./client": {
31
+ "import": "./dist/esm/client.js",
32
+ "require": "./dist/cjs/client.js",
33
+ "types": "./dist/types/client.d.ts"
34
+ },
35
+ "./tailwind": {
36
+ "import": "./dist/esm/tailwind-plugin.js",
37
+ "require": "./dist/cjs/tailwind-plugin.js",
38
+ "types": "./dist/types/tailwind-plugin.d.ts"
39
+ },
40
+ "./design-tokens": {
41
+ "import": "./dist/esm/design-tokens.js",
42
+ "require": "./dist/cjs/design-tokens.js",
43
+ "types": "./dist/types/design-tokens.d.ts"
44
+ },
45
+ "./headless-ui": {
46
+ "import": "./dist/esm/headless-ui.js",
47
+ "require": "./dist/cjs/headless-ui.js",
48
+ "types": "./dist/types/headless-ui.d.ts"
49
+ },
50
+ "./utilities": {
51
+ "import": "./dist/esm/utilities.js",
52
+ "require": "./dist/cjs/utilities.js",
53
+ "types": "./dist/types/utilities.d.ts"
54
+ },
55
+ "./styles.css": "./dist/animations.css"
56
+ },
57
+ "bin": {
58
+ "ntd-icons": "./bin/ntd-icons.mjs"
59
+ },
19
60
  "sideEffects": [
20
61
  "*.css"
21
62
  ],
22
63
  "files": [
23
64
  "dist",
65
+ "bin",
24
66
  "LICENSE",
25
67
  "CHANGELOG.md",
26
68
  "README.md"
@@ -28,6 +70,11 @@
28
70
  "scripts": {
29
71
  "build": "npm run build:types && rollup -c",
30
72
  "build:types": "tsc -p tsconfig.types.json",
73
+ "build:cdn": "vite build -c vite.cdn.config.ts",
74
+ "build:spritesheet": "node scripts/generate-spritesheet.mjs",
75
+ "build:iconfont": "node scripts/generate-iconfont.mjs",
76
+ "audit:treeshaking": "node scripts/tree-shaking-audit.mjs",
77
+ "audit:treeshaking:verbose": "node scripts/tree-shaking-audit.mjs --verbose --output reports/treeshaking-report.json",
31
78
  "dev": "rollup -c -w",
32
79
  "demo": "vite demo",
33
80
  "demo:build": "vite build demo",
@@ -37,7 +84,12 @@
37
84
  "test:coverage": "vitest run --config vitest.config.ts --coverage",
38
85
  "prepublishOnly": "npm run build",
39
86
  "storybook": "storybook dev -p 6006",
40
- "build-storybook": "storybook build"
87
+ "build-storybook": "storybook build",
88
+ "test:visual": "npx chromatic --exit-zero-on-changes",
89
+ "test:visual:ci": "npx chromatic --auto-accept-changes=main",
90
+ "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
91
+ "changelog:first": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
92
+ "version": "npm run changelog && git add CHANGELOG.md"
41
93
  },
42
94
  "keywords": [
43
95
  "icons",
@@ -49,8 +101,6 @@
49
101
  "duotone",
50
102
  "nicetodev"
51
103
  ],
52
- "author": "NiceToDev",
53
- "license": "MIT",
54
104
  "peerDependencies": {
55
105
  "react": ">=17.0.0",
56
106
  "react-dom": ">=17.0.0"
@@ -81,6 +131,9 @@
81
131
  "tslib": "^2.7.0",
82
132
  "typescript": "^5.6.0",
83
133
  "vite": "^6.0.0",
84
- "vitest": "^4.1.0"
134
+ "vitest": "^4.1.0",
135
+ "chromatic": "^11.25.0",
136
+ "conventional-changelog-cli": "^5.0.0",
137
+ "conventional-changelog-angular": "^8.0.0"
85
138
  }
86
139
  }