@nice2dev/icons 1.0.0

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 (132) hide show
  1. package/CHANGELOG.md +124 -0
  2. package/LICENSE +21 -0
  3. package/README.md +581 -0
  4. package/dist/cjs/NiceIconPicker.js +387 -0
  5. package/dist/cjs/NiceIconPicker.js.map +1 -0
  6. package/dist/cjs/NiceVectorEditor.js +675 -0
  7. package/dist/cjs/NiceVectorEditor.js.map +1 -0
  8. package/dist/cjs/animationControls.js +690 -0
  9. package/dist/cjs/animationControls.js.map +1 -0
  10. package/dist/cjs/createIcon.js +142 -0
  11. package/dist/cjs/createIcon.js.map +1 -0
  12. package/dist/cjs/figmaExport.js +288 -0
  13. package/dist/cjs/figmaExport.js.map +1 -0
  14. package/dist/cjs/icons/actions.js +257 -0
  15. package/dist/cjs/icons/actions.js.map +1 -0
  16. package/dist/cjs/icons/brand.js +128 -0
  17. package/dist/cjs/icons/brand.js.map +1 -0
  18. package/dist/cjs/icons/business.js +228 -0
  19. package/dist/cjs/icons/business.js.map +1 -0
  20. package/dist/cjs/icons/devtech.js +374 -0
  21. package/dist/cjs/icons/devtech.js.map +1 -0
  22. package/dist/cjs/icons/ecommerce.js +171 -0
  23. package/dist/cjs/icons/ecommerce.js.map +1 -0
  24. package/dist/cjs/icons/files.js +286 -0
  25. package/dist/cjs/icons/files.js.map +1 -0
  26. package/dist/cjs/icons/fintech.js +151 -0
  27. package/dist/cjs/icons/fintech.js.map +1 -0
  28. package/dist/cjs/icons/fun.js +124 -0
  29. package/dist/cjs/icons/fun.js.map +1 -0
  30. package/dist/cjs/icons/health.js +132 -0
  31. package/dist/cjs/icons/health.js.map +1 -0
  32. package/dist/cjs/icons/media.js +219 -0
  33. package/dist/cjs/icons/media.js.map +1 -0
  34. package/dist/cjs/icons/navigation.js +147 -0
  35. package/dist/cjs/icons/navigation.js.map +1 -0
  36. package/dist/cjs/icons/saas.js +141 -0
  37. package/dist/cjs/icons/saas.js.map +1 -0
  38. package/dist/cjs/icons/shapes.js +205 -0
  39. package/dist/cjs/icons/shapes.js.map +1 -0
  40. package/dist/cjs/icons/smarthome.js +141 -0
  41. package/dist/cjs/icons/smarthome.js.map +1 -0
  42. package/dist/cjs/icons/social.js +159 -0
  43. package/dist/cjs/icons/social.js.map +1 -0
  44. package/dist/cjs/icons/ui.js +262 -0
  45. package/dist/cjs/icons/ui.js.map +1 -0
  46. package/dist/cjs/icons/weather.js +187 -0
  47. package/dist/cjs/icons/weather.js.map +1 -0
  48. package/dist/cjs/index.js +362 -0
  49. package/dist/cjs/index.js.map +1 -0
  50. package/dist/cjs/nicetodev-icons.css +1 -0
  51. package/dist/cjs/smilAnimations.js +182 -0
  52. package/dist/cjs/smilAnimations.js.map +1 -0
  53. package/dist/cjs/types.js +47 -0
  54. package/dist/cjs/types.js.map +1 -0
  55. package/dist/esm/NiceIconPicker.js +385 -0
  56. package/dist/esm/NiceIconPicker.js.map +1 -0
  57. package/dist/esm/NiceVectorEditor.js +673 -0
  58. package/dist/esm/NiceVectorEditor.js.map +1 -0
  59. package/dist/esm/animationControls.js +680 -0
  60. package/dist/esm/animationControls.js.map +1 -0
  61. package/dist/esm/createIcon.js +140 -0
  62. package/dist/esm/createIcon.js.map +1 -0
  63. package/dist/esm/figmaExport.js +279 -0
  64. package/dist/esm/figmaExport.js.map +1 -0
  65. package/dist/esm/icons/actions.js +231 -0
  66. package/dist/esm/icons/actions.js.map +1 -0
  67. package/dist/esm/icons/brand.js +124 -0
  68. package/dist/esm/icons/brand.js.map +1 -0
  69. package/dist/esm/icons/business.js +209 -0
  70. package/dist/esm/icons/business.js.map +1 -0
  71. package/dist/esm/icons/devtech.js +342 -0
  72. package/dist/esm/icons/devtech.js.map +1 -0
  73. package/dist/esm/icons/ecommerce.js +154 -0
  74. package/dist/esm/icons/ecommerce.js.map +1 -0
  75. package/dist/esm/icons/files.js +254 -0
  76. package/dist/esm/icons/files.js.map +1 -0
  77. package/dist/esm/icons/fintech.js +136 -0
  78. package/dist/esm/icons/fintech.js.map +1 -0
  79. package/dist/esm/icons/fun.js +110 -0
  80. package/dist/esm/icons/fun.js.map +1 -0
  81. package/dist/esm/icons/health.js +118 -0
  82. package/dist/esm/icons/health.js.map +1 -0
  83. package/dist/esm/icons/media.js +195 -0
  84. package/dist/esm/icons/media.js.map +1 -0
  85. package/dist/esm/icons/navigation.js +132 -0
  86. package/dist/esm/icons/navigation.js.map +1 -0
  87. package/dist/esm/icons/saas.js +127 -0
  88. package/dist/esm/icons/saas.js.map +1 -0
  89. package/dist/esm/icons/shapes.js +182 -0
  90. package/dist/esm/icons/shapes.js.map +1 -0
  91. package/dist/esm/icons/smarthome.js +127 -0
  92. package/dist/esm/icons/smarthome.js.map +1 -0
  93. package/dist/esm/icons/social.js +150 -0
  94. package/dist/esm/icons/social.js.map +1 -0
  95. package/dist/esm/icons/ui.js +233 -0
  96. package/dist/esm/icons/ui.js.map +1 -0
  97. package/dist/esm/icons/weather.js +166 -0
  98. package/dist/esm/icons/weather.js.map +1 -0
  99. package/dist/esm/index.js +25 -0
  100. package/dist/esm/index.js.map +1 -0
  101. package/dist/esm/nicetodev-icons.css +1 -0
  102. package/dist/esm/smilAnimations.js +176 -0
  103. package/dist/esm/smilAnimations.js.map +1 -0
  104. package/dist/esm/types.js +44 -0
  105. package/dist/esm/types.js.map +1 -0
  106. package/dist/types/NiceIconPicker.d.ts +149 -0
  107. package/dist/types/NiceVectorEditor.d.ts +75 -0
  108. package/dist/types/animationControls.d.ts +307 -0
  109. package/dist/types/createIcon.d.ts +76 -0
  110. package/dist/types/figmaExport.d.ts +243 -0
  111. package/dist/types/icons/actions.d.ts +25 -0
  112. package/dist/types/icons/brand.d.ts +3 -0
  113. package/dist/types/icons/business.d.ts +25 -0
  114. package/dist/types/icons/devtech.d.ts +39 -0
  115. package/dist/types/icons/ecommerce.d.ts +16 -0
  116. package/dist/types/icons/files.d.ts +31 -0
  117. package/dist/types/icons/fintech.d.ts +14 -0
  118. package/dist/types/icons/fun.d.ts +13 -0
  119. package/dist/types/icons/health.d.ts +14 -0
  120. package/dist/types/icons/index.d.ts +17 -0
  121. package/dist/types/icons/media.d.ts +23 -0
  122. package/dist/types/icons/navigation.d.ts +14 -0
  123. package/dist/types/icons/saas.d.ts +13 -0
  124. package/dist/types/icons/shapes.d.ts +22 -0
  125. package/dist/types/icons/smarthome.d.ts +13 -0
  126. package/dist/types/icons/social.d.ts +18 -0
  127. package/dist/types/icons/ui.d.ts +28 -0
  128. package/dist/types/icons/weather.d.ts +20 -0
  129. package/dist/types/index.d.ts +69 -0
  130. package/dist/types/smilAnimations.d.ts +102 -0
  131. package/dist/types/types.d.ts +179 -0
  132. package/package.json +86 -0
@@ -0,0 +1,307 @@
1
+ /**
2
+ * @file animationControls.tsx
3
+ * @description Animation control system for @nice2dev/icons
4
+ * - Animation sequences (chain multiple animations)
5
+ * - Interactive animations (hover/click triggers)
6
+ * - Animation controller (play/pause/reset)
7
+ *
8
+ * @version 1.0.0
9
+ * @since 2025-01
10
+ * @license MIT
11
+ */
12
+ import React from "react";
13
+ import type { IconAnimation } from "./types";
14
+ type AnimationType = IconAnimation;
15
+ /**
16
+ * Single step in an animation sequence
17
+ */
18
+ export interface AnimationStep {
19
+ /** Animation to play */
20
+ animation: AnimationType;
21
+ /** Duration in ms (default: 1000) */
22
+ duration?: number;
23
+ /** Delay before starting this step in ms */
24
+ delay?: number;
25
+ /** Easing function (CSS timing function) */
26
+ easing?: string;
27
+ /** Number of iterations for this step (-1 for infinite) */
28
+ iterations?: number;
29
+ }
30
+ /**
31
+ * Configuration for animation sequence
32
+ */
33
+ export interface AnimationSequenceConfig {
34
+ /** Array of animation steps */
35
+ steps: AnimationStep[];
36
+ /** Loop entire sequence (default: false) */
37
+ loop?: boolean;
38
+ /** Number of times to loop (undefined = infinite when loop is true) */
39
+ loopCount?: number;
40
+ /** Delay between loop iterations in ms */
41
+ loopDelay?: number;
42
+ /** Play direction: 'normal' | 'reverse' | 'alternate' */
43
+ direction?: "normal" | "reverse" | "alternate";
44
+ }
45
+ /**
46
+ * Animation playback state
47
+ */
48
+ export type AnimationPlaybackState = "idle" | "playing" | "paused" | "finished";
49
+ /**
50
+ * Interactive animation trigger
51
+ */
52
+ export type AnimationTrigger = "hover" | "click" | "focus" | "visible" | "manual";
53
+ /**
54
+ * Configuration for interactive animations
55
+ */
56
+ export interface InteractiveAnimationConfig {
57
+ /** Trigger type */
58
+ trigger: AnimationTrigger;
59
+ /** Animation to play when triggered */
60
+ enterAnimation?: AnimationType;
61
+ /** Animation duration in ms */
62
+ enterDuration?: number;
63
+ /** Animation to play when leaving (hover out, blur, etc.) */
64
+ leaveAnimation?: AnimationType;
65
+ /** Leave animation duration in ms */
66
+ leaveDuration?: number;
67
+ /** Play animation only once */
68
+ once?: boolean;
69
+ /** Delay before animation starts in ms */
70
+ delay?: number;
71
+ /** Threshold for visibility trigger (0-1) */
72
+ visibilityThreshold?: number;
73
+ }
74
+ /**
75
+ * Handle for AnimationController ref
76
+ */
77
+ export interface AnimationControllerHandle {
78
+ /** Start/resume animation */
79
+ play: () => void;
80
+ /** Pause animation */
81
+ pause: () => void;
82
+ /** Reset to initial state */
83
+ reset: () => void;
84
+ /** Jump to specific step (for sequences) */
85
+ goToStep: (index: number) => void;
86
+ /** Get current playback state */
87
+ getState: () => AnimationPlaybackState;
88
+ /** Get current step index (for sequences) */
89
+ getCurrentStep: () => number;
90
+ /** Get progress (0-1) */
91
+ getProgress: () => number;
92
+ }
93
+ /**
94
+ * Props for AnimationController
95
+ */
96
+ export interface AnimationControllerProps {
97
+ /** Child element to animate (icon component) */
98
+ children: React.ReactElement;
99
+ /** Single animation or sequence config */
100
+ animation: AnimationType | AnimationSequenceConfig;
101
+ /** Auto-play on mount (default: false) */
102
+ autoPlay?: boolean;
103
+ /** Play state controlled externally */
104
+ playState?: AnimationPlaybackState;
105
+ /** Callback when animation starts */
106
+ onStart?: () => void;
107
+ /** Callback when animation ends */
108
+ onEnd?: () => void;
109
+ /** Callback when step changes (sequences) */
110
+ onStepChange?: (stepIndex: number, step: AnimationStep) => void;
111
+ /** Callback on pause */
112
+ onPause?: () => void;
113
+ /** Callback on resume */
114
+ onResume?: () => void;
115
+ /** Additional className */
116
+ className?: string;
117
+ /** Additional styles */
118
+ style?: React.CSSProperties;
119
+ }
120
+ /**
121
+ * Props for InteractiveIcon wrapper
122
+ */
123
+ export interface InteractiveIconProps {
124
+ /** Child icon element */
125
+ children: React.ReactElement;
126
+ /** Interactive animation config */
127
+ config: InteractiveAnimationConfig;
128
+ /** Disable interactions */
129
+ disabled?: boolean;
130
+ /** Callback when interaction starts */
131
+ onInteractionStart?: () => void;
132
+ /** Callback when interaction ends */
133
+ onInteractionEnd?: () => void;
134
+ /** Additional className */
135
+ className?: string;
136
+ /** Additional styles */
137
+ style?: React.CSSProperties;
138
+ }
139
+ /**
140
+ * Hook to manage animation sequences
141
+ */
142
+ export declare function useAnimationSequence(config: AnimationSequenceConfig): {
143
+ currentStep: AnimationStep;
144
+ currentStepIndex: number;
145
+ state: AnimationPlaybackState;
146
+ loopIteration: number;
147
+ play: () => void;
148
+ pause: () => void;
149
+ reset: () => void;
150
+ goToStep: (index: number) => void;
151
+ getProgress: () => number;
152
+ };
153
+ /**
154
+ * Animation Controller component
155
+ *
156
+ * Wraps an icon and provides play/pause/reset controls.
157
+ *
158
+ * @example
159
+ * ```tsx
160
+ * const ref = useRef<AnimationControllerHandle>(null);
161
+ *
162
+ * <AnimationController
163
+ * ref={ref}
164
+ * animation="spin"
165
+ * autoPlay={false}
166
+ * >
167
+ * <NiceIcon name="loading" />
168
+ * </AnimationController>
169
+ *
170
+ * <button onClick={() => ref.current?.play()}>Play</button>
171
+ * <button onClick={() => ref.current?.pause()}>Pause</button>
172
+ * <button onClick={() => ref.current?.reset()}>Reset</button>
173
+ * ```
174
+ *
175
+ * @example Sequence
176
+ * ```tsx
177
+ * <AnimationController
178
+ * animation={{
179
+ * steps: [
180
+ * { animation: 'bounce', duration: 500 },
181
+ * { animation: 'spin', duration: 1000 },
182
+ * { animation: 'pulse', duration: 800 },
183
+ * ],
184
+ * loop: true,
185
+ * loopCount: 3
186
+ * }}
187
+ * autoPlay
188
+ * >
189
+ * <NiceIcon name="star" />
190
+ * </AnimationController>
191
+ * ```
192
+ */
193
+ export declare const AnimationController: React.ForwardRefExoticComponent<AnimationControllerProps & React.RefAttributes<AnimationControllerHandle>>;
194
+ /**
195
+ * Interactive icon wrapper with hover/click/focus triggers
196
+ *
197
+ * @example
198
+ * ```tsx
199
+ * <InteractiveIcon
200
+ * config={{
201
+ * trigger: 'hover',
202
+ * enterAnimation: 'bounce',
203
+ * leaveAnimation: 'fadeOut',
204
+ * }}
205
+ * >
206
+ * <NiceIcon name="heart" />
207
+ * </InteractiveIcon>
208
+ * ```
209
+ *
210
+ * @example Click
211
+ * ```tsx
212
+ * <InteractiveIcon
213
+ * config={{
214
+ * trigger: 'click',
215
+ * enterAnimation: 'pulse',
216
+ * once: true,
217
+ * }}
218
+ * >
219
+ * <NiceIcon name="notification" />
220
+ * </InteractiveIcon>
221
+ * ```
222
+ */
223
+ export declare const InteractiveIcon: React.ForwardRefExoticComponent<InteractiveIconProps & React.RefAttributes<HTMLSpanElement>>;
224
+ /**
225
+ * Create an animation sequence configuration
226
+ *
227
+ * @example
228
+ * ```tsx
229
+ * const seq = createAnimationSequence([
230
+ * { animation: 'shake', duration: 300 },
231
+ * { animation: 'pulse', duration: 500 },
232
+ * { animation: 'bounce', duration: 400 },
233
+ * ], { loop: true, loopCount: 2 });
234
+ * ```
235
+ */
236
+ export declare function createAnimationSequence(steps: AnimationStep[], options?: Partial<Omit<AnimationSequenceConfig, "steps">>): AnimationSequenceConfig;
237
+ /**
238
+ * Create an interactive config for hover effect
239
+ */
240
+ export declare function createHoverAnimation(enterAnimation: AnimationType, leaveAnimation?: AnimationType, options?: {
241
+ enterDuration?: number;
242
+ leaveDuration?: number;
243
+ delay?: number;
244
+ }): InteractiveAnimationConfig;
245
+ /**
246
+ * Create an interactive config for click effect
247
+ */
248
+ export declare function createClickAnimation(animation: AnimationType, options?: {
249
+ duration?: number;
250
+ once?: boolean;
251
+ delay?: number;
252
+ }): InteractiveAnimationConfig;
253
+ /**
254
+ * Create an interactive config for visibility trigger
255
+ */
256
+ export declare function createVisibilityAnimation(animation: AnimationType, options?: {
257
+ duration?: number;
258
+ once?: boolean;
259
+ threshold?: number;
260
+ }): InteractiveAnimationConfig;
261
+ /**
262
+ * Preset animation sequences for common use cases
263
+ */
264
+ export declare const PRESET_SEQUENCES: {
265
+ /** Attention grabber: bounce → shake → pulse */
266
+ readonly attention: AnimationSequenceConfig;
267
+ /** Success animation: pop → bounce */
268
+ readonly success: AnimationSequenceConfig;
269
+ /** Error animation: shake → pulse */
270
+ readonly error: AnimationSequenceConfig;
271
+ /** Loading sequence: spin → pulse (looping) */
272
+ readonly loading: AnimationSequenceConfig;
273
+ /** Celebration: bounce → tada → heartbeat */
274
+ readonly celebrate: AnimationSequenceConfig;
275
+ /** Notification: swing → bounce */
276
+ readonly notification: AnimationSequenceConfig;
277
+ /** Gentle: pulse → breathe */
278
+ readonly gentle: AnimationSequenceConfig;
279
+ /** Reveal: fade-in → pop */
280
+ readonly reveal: AnimationSequenceConfig;
281
+ };
282
+ /**
283
+ * Preset interactive configs
284
+ */
285
+ export declare const PRESET_INTERACTIONS: {
286
+ /** Bounce on hover */
287
+ readonly hoverBounce: InteractiveAnimationConfig;
288
+ /** Pulse on hover */
289
+ readonly hoverPulse: InteractiveAnimationConfig;
290
+ /** Spin on hover */
291
+ readonly hoverSpin: InteractiveAnimationConfig;
292
+ /** Shake on hover */
293
+ readonly hoverShake: InteractiveAnimationConfig;
294
+ /** Pop on click */
295
+ readonly clickPop: InteractiveAnimationConfig;
296
+ /** Bounce on click */
297
+ readonly clickBounce: InteractiveAnimationConfig;
298
+ /** Tada on click */
299
+ readonly clickTada: InteractiveAnimationConfig;
300
+ /** FadeIn on visible */
301
+ readonly visibleFadeIn: InteractiveAnimationConfig;
302
+ /** Bounce on visible */
303
+ readonly visibleBounce: InteractiveAnimationConfig;
304
+ /** Scale in on visible */
305
+ readonly visibleScaleIn: InteractiveAnimationConfig;
306
+ };
307
+ export {};
@@ -0,0 +1,76 @@
1
+ import type { NtdIconProps, IconRenderProps } from './types';
2
+ /**
3
+ * A function that receives resolved icon render props and returns SVG elements.
4
+ *
5
+ * Used inside {@link CreateIconOptions.paths} to define how each variant
6
+ * (solid / outline / duotone) should render its SVG content.
7
+ *
8
+ * @param props - Pre-resolved rendering properties (colors, opacities, strokeWidth).
9
+ * @returns React nodes (SVG `<path>`, `<circle>`, `<rect>`, etc.).
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * const solidRenderer: IconPathRenderer = ({ primaryColor }) => (
14
+ * <path d="M12 4l-8 8h5v8h6v-8h5z" fill={primaryColor} />
15
+ * );
16
+ * ```
17
+ */
18
+ export type IconPathRenderer = (props: IconRenderProps) => React.ReactNode;
19
+ /**
20
+ * Configuration object for {@link createIcon}.
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * const opts: CreateIconOptions = {
25
+ * displayName: 'NtdStar',
26
+ * viewBox: '0 0 24 24',
27
+ * paths: {
28
+ * solid: ({ primaryColor }) => <path d="..." fill={primaryColor} />,
29
+ * outline: ({ primaryColor, strokeWidth }) => <path d="..." stroke={primaryColor} strokeWidth={strokeWidth} fill="none" />,
30
+ * duotone: ({ primaryColor, secondaryColor, secondaryOpacity }) => (
31
+ * <>
32
+ * <path d="..." fill={secondaryColor} opacity={secondaryOpacity} />
33
+ * <path d="..." stroke={primaryColor} fill="none" />
34
+ * </>
35
+ * ),
36
+ * flat: ({ primaryColor, secondaryColor }) => (
37
+ * <>
38
+ * <rect x="2" y="2" width="20" height="20" rx="4" fill={secondaryColor} />
39
+ * <path d="..." fill={primaryColor} />
40
+ * </>
41
+ * ),
42
+ * },
43
+ * };
44
+ * ```
45
+ */
46
+ export interface CreateIconOptions {
47
+ /** React `displayName` for the generated component (e.g. `'NtdStar'`). */
48
+ displayName: string;
49
+ /** SVG `viewBox` attribute. @defaultValue `'0 0 24 24'` */
50
+ viewBox?: string;
51
+ /**
52
+ * Renderer functions for each variant.
53
+ *
54
+ * Required variants: solid, outline, duotone, flat
55
+ * Optional variants: sharp, rounded, mini, 3d (fall back to solid if not provided)
56
+ */
57
+ paths: {
58
+ /** Filled variant — shapes use `fill`. */
59
+ solid: IconPathRenderer;
60
+ /** Outlined variant — shapes use `stroke`, `fill="none"`. */
61
+ outline: IconPathRenderer;
62
+ /** Two-tone variant — background fill at reduced opacity + foreground stroke. */
63
+ duotone: IconPathRenderer;
64
+ /** Flat variant — multi-color fills at full opacity, no strokes. */
65
+ flat: IconPathRenderer;
66
+ /** Sharp variant — solid with sharp corners. Falls back to solid if not defined. */
67
+ sharp?: IconPathRenderer;
68
+ /** Rounded variant — solid with extra-rounded corners. Falls back to solid if not defined. */
69
+ rounded?: IconPathRenderer;
70
+ /** Mini variant — compact, optimized for small sizes. Falls back to solid if not defined. */
71
+ mini?: IconPathRenderer;
72
+ /** 3D variant — pseudo-3D with shadows and highlights. Falls back to solid if not defined. */
73
+ '3d'?: IconPathRenderer;
74
+ };
75
+ }
76
+ export declare function createIcon(options: CreateIconOptions): import("react").ForwardRefExoticComponent<NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
@@ -0,0 +1,243 @@
1
+ /**
2
+ * @file figmaExport.ts
3
+ * @description Export utilities for Figma/Sketch integration
4
+ *
5
+ * Provides functions to export icons in formats compatible with
6
+ * Figma plugins and Sketch libraries.
7
+ *
8
+ * @version 1.0.0
9
+ * @since 2026-03
10
+ * @license MIT
11
+ */
12
+ import type { IconVariant } from './types';
13
+ import type { IconPickerEntry } from './NiceIconPicker';
14
+ /**
15
+ * Figma-compatible vector path data
16
+ */
17
+ export interface FigmaVectorPath {
18
+ /** SVG path data (d attribute) */
19
+ path: string;
20
+ /** Fill color in hex */
21
+ fill?: string;
22
+ /** Fill opacity (0-1) */
23
+ fillOpacity?: number;
24
+ /** Stroke color in hex */
25
+ stroke?: string;
26
+ /** Stroke width */
27
+ strokeWeight?: number;
28
+ /** Stroke cap style */
29
+ strokeCap?: 'NONE' | 'ROUND' | 'SQUARE';
30
+ /** Stroke join style */
31
+ strokeJoin?: 'MITER' | 'BEVEL' | 'ROUND';
32
+ /** Winding rule */
33
+ windingRule?: 'NONZERO' | 'EVENODD';
34
+ }
35
+ /**
36
+ * Figma vector node structure
37
+ */
38
+ export interface FigmaVectorNode {
39
+ /** Node type */
40
+ type: 'VECTOR';
41
+ /** Node name */
42
+ name: string;
43
+ /** Width */
44
+ width: number;
45
+ /** Height */
46
+ height: number;
47
+ /** Vector paths */
48
+ vectorPaths: FigmaVectorPath[];
49
+ /** Node constraints */
50
+ constraints?: {
51
+ horizontal: 'MIN' | 'MAX' | 'CENTER' | 'STRETCH' | 'SCALE';
52
+ vertical: 'MIN' | 'MAX' | 'CENTER' | 'STRETCH' | 'SCALE';
53
+ };
54
+ }
55
+ /**
56
+ * Figma frame node for icon
57
+ */
58
+ export interface FigmaIconFrame {
59
+ /** Node type */
60
+ type: 'FRAME';
61
+ /** Icon name */
62
+ name: string;
63
+ /** Frame width */
64
+ width: number;
65
+ /** Frame height */
66
+ height: number;
67
+ /** Child vector nodes */
68
+ children: FigmaVectorNode[];
69
+ /** Background fills */
70
+ fills?: Array<{
71
+ type: 'SOLID';
72
+ color: {
73
+ r: number;
74
+ g: number;
75
+ b: number;
76
+ };
77
+ opacity?: number;
78
+ }>;
79
+ /** Padding */
80
+ padding?: {
81
+ top: number;
82
+ right: number;
83
+ bottom: number;
84
+ left: number;
85
+ };
86
+ }
87
+ /**
88
+ * Figma component set (icon with variants)
89
+ */
90
+ export interface FigmaComponentSet {
91
+ /** Node type */
92
+ type: 'COMPONENT_SET';
93
+ /** Icon name */
94
+ name: string;
95
+ /** Variant components */
96
+ children: FigmaIconFrame[];
97
+ }
98
+ /**
99
+ * Export options
100
+ */
101
+ export interface FigmaExportOptions {
102
+ /** Size of exported icons (default: 24) */
103
+ size?: number;
104
+ /** Variants to include (default: all) */
105
+ variants?: IconVariant[];
106
+ /** Include as component set with variants */
107
+ asComponentSet?: boolean;
108
+ /** Primary color for solid fills */
109
+ primaryColor?: string;
110
+ /** Secondary color for duotone fills */
111
+ secondaryColor?: string;
112
+ /** Stroke width */
113
+ strokeWidth?: number;
114
+ }
115
+ /**
116
+ * Figma plugin manifest entry
117
+ */
118
+ export interface FigmaPluginIconEntry {
119
+ /** Icon name without prefix */
120
+ name: string;
121
+ /** Category */
122
+ category: string;
123
+ /** Available variants */
124
+ variants: IconVariant[];
125
+ /** Search tags */
126
+ tags: string[];
127
+ /** SVG path data by variant */
128
+ paths: Record<string, string>;
129
+ }
130
+ /**
131
+ * Full Figma plugin manifest
132
+ */
133
+ export interface FigmaPluginManifest {
134
+ /** Library name */
135
+ name: string;
136
+ /** Version */
137
+ version: string;
138
+ /** Total icon count */
139
+ iconCount: number;
140
+ /** Category list */
141
+ categories: string[];
142
+ /** All icons */
143
+ icons: FigmaPluginIconEntry[];
144
+ }
145
+ /**
146
+ * Export a single icon to Figma vector node JSON
147
+ *
148
+ * @example
149
+ * ```ts
150
+ * import { exportIconToFigmaNode, NtdHome } from '@nice2dev/icons';
151
+ *
152
+ * const figmaNode = exportIconToFigmaNode(NtdHome, {
153
+ * size: 24,
154
+ * variant: 'solid',
155
+ * primaryColor: '#6c5ce7',
156
+ * });
157
+ * // Use in Figma plugin: figma.createNodeFromFigmaNode(figmaNode)
158
+ * ```
159
+ */
160
+ export declare function exportIconToFigmaNode(IconComponent: React.ComponentType<{
161
+ variant?: IconVariant;
162
+ primaryColor?: string;
163
+ }>, options?: Omit<FigmaExportOptions, 'variants' | 'asComponentSet'> & {
164
+ variant?: IconVariant;
165
+ }): FigmaIconFrame;
166
+ /**
167
+ * Export icon to SVG string for Figma import
168
+ *
169
+ * Returns a clean SVG string that can be imported into Figma.
170
+ *
171
+ * @example
172
+ * ```ts
173
+ * import { exportIconToSvgString } from '@nice2dev/icons';
174
+ *
175
+ * const svg = exportIconToSvgString(NtdHome, { variant: 'solid', size: 24 });
176
+ * // Copy to clipboard or use in Figma plugin's figma.createNodeFromSvg()
177
+ * ```
178
+ */
179
+ export declare function exportIconToSvgString(svgElement: SVGSVGElement, options?: {
180
+ size?: number;
181
+ removeAnimations?: boolean;
182
+ }): string;
183
+ /**
184
+ * Export icon as base64 data URL
185
+ */
186
+ export declare function exportIconToDataUrl(svgElement: SVGSVGElement, options?: {
187
+ size?: number;
188
+ }): string;
189
+ /**
190
+ * Generate Figma plugin manifest for all icons
191
+ *
192
+ * Creates a JSON manifest that can be used by a Figma plugin
193
+ * to display and insert icons.
194
+ *
195
+ * @example
196
+ * ```ts
197
+ * import { generateFigmaPluginManifest, allIcons } from '@nice2dev/icons';
198
+ *
199
+ * const manifest = generateFigmaPluginManifest(allIcons, {
200
+ * name: 'Nice2Dev Icons',
201
+ * version: '1.0.0',
202
+ * });
203
+ *
204
+ * // Save as icons.json for your Figma plugin
205
+ * ```
206
+ */
207
+ export declare function generateFigmaPluginManifest(icons: IconPickerEntry[], options?: {
208
+ name?: string;
209
+ version?: string;
210
+ }): FigmaPluginManifest;
211
+ /**
212
+ * Download icons as SVG files (browser)
213
+ *
214
+ * Triggers a download of the icon as an SVG file.
215
+ */
216
+ export declare function downloadIconAsSvg(svgElement: SVGSVGElement, filename: string, options?: {
217
+ size?: number;
218
+ }): void;
219
+ /**
220
+ * Download icons as PNG (browser)
221
+ *
222
+ * Renders the SVG to canvas and downloads as PNG.
223
+ */
224
+ export declare function downloadIconAsPng(svgElement: SVGSVGElement, filename: string, options?: {
225
+ size?: number;
226
+ scale?: number;
227
+ backgroundColor?: string;
228
+ }): Promise<void>;
229
+ /**
230
+ * Copy icon SVG to clipboard
231
+ */
232
+ export declare function copyIconToClipboard(svgElement: SVGSVGElement, options?: {
233
+ size?: number;
234
+ }): Promise<void>;
235
+ /**
236
+ * Batch export multiple icons
237
+ */
238
+ export declare function batchExportIcons(svgElements: Array<{
239
+ element: SVGSVGElement;
240
+ name: string;
241
+ }>, format: 'svg' | 'data-url' | 'json', options?: {
242
+ size?: number;
243
+ }): Record<string, string>;
@@ -0,0 +1,25 @@
1
+ export declare const NtdSearch: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
2
+ export declare const NtdEdit: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
3
+ export declare const NtdTrash: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
4
+ export declare const NtdSave: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
5
+ export declare const NtdDownload: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
6
+ export declare const NtdUpload: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
7
+ export declare const NtdShare: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
8
+ export declare const NtdCopy: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
9
+ export declare const NtdClipboard: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
10
+ export declare const NtdPlus: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
11
+ export declare const NtdMinus: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
12
+ export declare const NtdCheck: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
13
+ export declare const NtdFilter: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
14
+ export declare const NtdSort: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
15
+ export declare const NtdPrint: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
16
+ export declare const NtdZoomIn: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
17
+ export declare const NtdZoomOut: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
18
+ export declare const NtdUndo: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
19
+ export declare const NtdRedo: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
20
+ export declare const NtdLink: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
21
+ export declare const NtdSettings: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
22
+ export declare const NtdLogIn: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
23
+ export declare const NtdLogOut: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
24
+ export declare const NtdLock: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
25
+ export declare const NtdUnlock: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
@@ -0,0 +1,3 @@
1
+ export declare const NtdNiceToDev: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
2
+ export declare const NtdOmniVerk: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
3
+ export declare const NtdOmniVerkLogo: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
@@ -0,0 +1,25 @@
1
+ export declare const NtdBriefcase: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
2
+ export declare const NtdDollar: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
3
+ export declare const NtdWallet: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
4
+ export declare const NtdReceipt: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
5
+ export declare const NtdBank: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
6
+ export declare const NtdTrendUp: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
7
+ export declare const NtdTrendDown: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
8
+ export declare const NtdPercent: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
9
+ export declare const NtdInvoice: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
10
+ export declare const NtdStore: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
11
+ export declare const NtdBarcode: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
12
+ export declare const NtdCalculator: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
13
+ export declare const NtdPresentation: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
14
+ export declare const NtdClipboardCheck: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
15
+ export declare const NtdPiggyBank: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
16
+ export declare const NtdCoins: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
17
+ export declare const NtdBudgetPlanner: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
18
+ export declare const NtdCreditScore: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
19
+ export declare const NtdTaxStamp: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
20
+ export declare const NtdPortfolio: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
21
+ export declare const NtdHandshakeDeal: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
22
+ export declare const NtdAuditTrail: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
23
+ export declare const NtdGrowthTarget: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
24
+ export declare const NtdKanban: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;
25
+ export declare const NtdMilestone: import("react").ForwardRefExoticComponent<import("..").NtdIconProps & import("react").RefAttributes<SVGSVGElement>>;