@jis3r/icons 1.12.1 → 1.14.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.
@@ -0,0 +1,72 @@
1
+ <script>
2
+ /**
3
+ * @typedef {Object} Props
4
+ * @property {string} [color]
5
+ * @property {number} [size]
6
+ * @property {number} [strokeWidth]
7
+ * @property {boolean} [isHovered]
8
+ * @property {string} [class]
9
+ */
10
+
11
+ /** @type {Props} */
12
+ let {
13
+ color = 'currentColor',
14
+ size = 24,
15
+ strokeWidth = 2,
16
+ isHovered = false,
17
+ class: className = ''
18
+ } = $props();
19
+
20
+ function handleMouseEnter() {
21
+ isHovered = true;
22
+ }
23
+
24
+ function handleMouseLeave() {
25
+ isHovered = false;
26
+ }
27
+ </script>
28
+
29
+ <div
30
+ class={className}
31
+ aria-label="airplay"
32
+ role="img"
33
+ onmouseenter={handleMouseEnter}
34
+ onmouseleave={handleMouseLeave}
35
+ >
36
+ <svg
37
+ xmlns="http://www.w3.org/2000/svg"
38
+ width={size}
39
+ height={size}
40
+ viewBox="0 0 24 24"
41
+ fill="none"
42
+ stroke={color}
43
+ stroke-width={strokeWidth}
44
+ stroke-linecap="round"
45
+ stroke-linejoin="round"
46
+ class="airplay-icon"
47
+ >
48
+ <path
49
+ d="M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1"
50
+ class="airplay-path1"
51
+ />
52
+ <path d="m12 15 5 6H7Z" class="airplay-path2" class:hovered={isHovered} />
53
+ </svg>
54
+ </div>
55
+
56
+ <style>
57
+ div {
58
+ display: inline-block;
59
+ }
60
+ .airplay-icon {
61
+ overflow: visible;
62
+ }
63
+
64
+ .airplay-path2 {
65
+ transform: translateY(0);
66
+ transition: transform 0.4s cubic-bezier(0, 0, 0.3, 1.6);
67
+ }
68
+
69
+ .airplay-path2.hovered {
70
+ transform: translateY(2px);
71
+ }
72
+ </style>
@@ -0,0 +1,19 @@
1
+ export default Airplay;
2
+ type Airplay = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<Props>): void;
5
+ };
6
+ declare const Airplay: import("svelte").Component<{
7
+ color?: string;
8
+ size?: number;
9
+ strokeWidth?: number;
10
+ isHovered?: boolean;
11
+ class?: string;
12
+ }, {}, "">;
13
+ type Props = {
14
+ color?: string;
15
+ size?: number;
16
+ strokeWidth?: number;
17
+ isHovered?: boolean;
18
+ class?: string;
19
+ };
@@ -17,12 +17,220 @@
17
17
  class: className = ''
18
18
  } = $props();
19
19
 
20
+ let line1Y1 = $state(10);
21
+ let line1Y2 = $state(13);
22
+ let line2Y1 = $state(6);
23
+ let line2Y2 = $state(17);
24
+ let line3Y1 = $state(3);
25
+ let line3Y2 = $state(21);
26
+ let line4Y1 = $state(8);
27
+ let line4Y2 = $state(15);
28
+ let line5Y1 = $state(5);
29
+ let line5Y2 = $state(18);
30
+ let line6Y1 = $state(10);
31
+ let line6Y2 = $state(13);
32
+
33
+ let animationFrameId = $state(null);
34
+ let startTime = $state(null);
35
+ let isAnimatingBack = $state(false);
36
+ let startPositions = $state(null);
37
+
38
+ const originalPositions = {
39
+ line1: { y1: 10, y2: 13 },
40
+ line2: { y1: 6, y2: 17 },
41
+ line3: { y1: 3, y2: 21 },
42
+ line4: { y1: 8, y2: 15 },
43
+ line5: { y1: 5, y2: 18 },
44
+ line6: { y1: 10, y2: 13 }
45
+ };
46
+
47
+ const line1Keyframes = [
48
+ { y1: 10, y2: 13 },
49
+ { y1: 5, y2: 18 },
50
+ { y1: 8, y2: 15 },
51
+ { y1: 6, y2: 17 },
52
+ { y1: 10, y2: 13 }
53
+ ];
54
+
55
+ const line2Keyframes = [
56
+ { y1: 6, y2: 17 },
57
+ { y1: 2, y2: 22 },
58
+ { y1: 10, y2: 13 },
59
+ { y1: 6, y2: 17 }
60
+ ];
61
+
62
+ const line3Keyframes = [
63
+ { y1: 3, y2: 21 },
64
+ { y1: 6, y2: 17 },
65
+ { y1: 3, y2: 21 },
66
+ { y1: 8, y2: 15 },
67
+ { y1: 3, y2: 21 }
68
+ ];
69
+
70
+ const line4Keyframes = [
71
+ { y1: 8, y2: 15 },
72
+ { y1: 4, y2: 19 },
73
+ { y1: 7, y2: 16 },
74
+ { y1: 2, y2: 22 },
75
+ { y1: 8, y2: 15 }
76
+ ];
77
+
78
+ const line5Keyframes = [
79
+ { y1: 5, y2: 18 },
80
+ { y1: 10, y2: 13 },
81
+ { y1: 4, y2: 19 },
82
+ { y1: 8, y2: 15 },
83
+ { y1: 5, y2: 18 }
84
+ ];
85
+
86
+ const line6Keyframes = [
87
+ { y1: 10, y2: 13 },
88
+ { y1: 8, y2: 15 },
89
+ { y1: 5, y2: 18 },
90
+ { y1: 10, y2: 13 }
91
+ ];
92
+
93
+ function easeOutCubic(t) {
94
+ return 1 - Math.pow(1 - t, 3);
95
+ }
96
+
97
+ function interpolateKeyframes(keyframes, progress) {
98
+ const totalFrames = keyframes.length - 1;
99
+ const frameIndex = progress * totalFrames;
100
+ const frame = Math.floor(frameIndex);
101
+ const nextFrame = Math.min(frame + 1, totalFrames);
102
+ const t = frameIndex - frame;
103
+
104
+ const current = keyframes[frame];
105
+ const next = keyframes[nextFrame];
106
+
107
+ return {
108
+ y1: current.y1 + (next.y1 - current.y1) * t,
109
+ y2: current.y2 + (next.y2 - current.y2) * t
110
+ };
111
+ }
112
+
113
+ function animate(timestamp) {
114
+ if (!startTime) startTime = timestamp;
115
+ const elapsed = (timestamp - startTime) / 1000;
116
+
117
+ if (isAnimatingBack && startPositions) {
118
+ const duration = 0.4;
119
+ const progress = Math.min(elapsed / duration, 1);
120
+ const easedProgress = easeOutCubic(progress);
121
+
122
+ line1Y1 =
123
+ startPositions.line1.y1 +
124
+ (originalPositions.line1.y1 - startPositions.line1.y1) * easedProgress;
125
+ line1Y2 =
126
+ startPositions.line1.y2 +
127
+ (originalPositions.line1.y2 - startPositions.line1.y2) * easedProgress;
128
+ line2Y1 =
129
+ startPositions.line2.y1 +
130
+ (originalPositions.line2.y1 - startPositions.line2.y1) * easedProgress;
131
+ line2Y2 =
132
+ startPositions.line2.y2 +
133
+ (originalPositions.line2.y2 - startPositions.line2.y2) * easedProgress;
134
+ line3Y1 =
135
+ startPositions.line3.y1 +
136
+ (originalPositions.line3.y1 - startPositions.line3.y1) * easedProgress;
137
+ line3Y2 =
138
+ startPositions.line3.y2 +
139
+ (originalPositions.line3.y2 - startPositions.line3.y2) * easedProgress;
140
+ line4Y1 =
141
+ startPositions.line4.y1 +
142
+ (originalPositions.line4.y1 - startPositions.line4.y1) * easedProgress;
143
+ line4Y2 =
144
+ startPositions.line4.y2 +
145
+ (originalPositions.line4.y2 - startPositions.line4.y2) * easedProgress;
146
+ line5Y1 =
147
+ startPositions.line5.y1 +
148
+ (originalPositions.line5.y1 - startPositions.line5.y1) * easedProgress;
149
+ line5Y2 =
150
+ startPositions.line5.y2 +
151
+ (originalPositions.line5.y2 - startPositions.line5.y2) * easedProgress;
152
+ line6Y1 =
153
+ startPositions.line6.y1 +
154
+ (originalPositions.line6.y1 - startPositions.line6.y1) * easedProgress;
155
+ line6Y2 =
156
+ startPositions.line6.y2 +
157
+ (originalPositions.line6.y2 - startPositions.line6.y2) * easedProgress;
158
+
159
+ if (progress < 1) {
160
+ animationFrameId = requestAnimationFrame(animate);
161
+ } else {
162
+ line1Y1 = originalPositions.line1.y1;
163
+ line1Y2 = originalPositions.line1.y2;
164
+ line2Y1 = originalPositions.line2.y1;
165
+ line2Y2 = originalPositions.line2.y2;
166
+ line3Y1 = originalPositions.line3.y1;
167
+ line3Y2 = originalPositions.line3.y2;
168
+ line4Y1 = originalPositions.line4.y1;
169
+ line4Y2 = originalPositions.line4.y2;
170
+ line5Y1 = originalPositions.line5.y1;
171
+ line5Y2 = originalPositions.line5.y2;
172
+ line6Y1 = originalPositions.line6.y1;
173
+ line6Y2 = originalPositions.line6.y2;
174
+ isAnimatingBack = false;
175
+ startPositions = null;
176
+ animationFrameId = null;
177
+ }
178
+ } else {
179
+ const duration = 1.5;
180
+ const progress = (elapsed % duration) / duration;
181
+
182
+ const line1 = interpolateKeyframes(line1Keyframes, progress);
183
+ line1Y1 = line1.y1;
184
+ line1Y2 = line1.y2;
185
+
186
+ const line2 = interpolateKeyframes(line2Keyframes, progress);
187
+ line2Y1 = line2.y1;
188
+ line2Y2 = line2.y2;
189
+
190
+ const line3 = interpolateKeyframes(line3Keyframes, progress);
191
+ line3Y1 = line3.y1;
192
+ line3Y2 = line3.y2;
193
+
194
+ const line4 = interpolateKeyframes(line4Keyframes, progress);
195
+ line4Y1 = line4.y1;
196
+ line4Y2 = line4.y2;
197
+
198
+ const line5 = interpolateKeyframes(line5Keyframes, progress);
199
+ line5Y1 = line5.y1;
200
+ line5Y2 = line5.y2;
201
+
202
+ const line6 = interpolateKeyframes(line6Keyframes, progress);
203
+ line6Y1 = line6.y1;
204
+ line6Y2 = line6.y2;
205
+
206
+ if (isHovered) {
207
+ animationFrameId = requestAnimationFrame(animate);
208
+ }
209
+ }
210
+ }
211
+
20
212
  function handleMouseEnter() {
21
213
  isHovered = true;
214
+ isAnimatingBack = false;
215
+ startTime = null;
216
+ animationFrameId = requestAnimationFrame(animate);
22
217
  }
23
218
 
24
219
  function handleMouseLeave() {
25
220
  isHovered = false;
221
+ startPositions = {
222
+ line1: { y1: line1Y1, y2: line1Y2 },
223
+ line2: { y1: line2Y1, y2: line2Y2 },
224
+ line3: { y1: line3Y1, y2: line3Y2 },
225
+ line4: { y1: line4Y1, y2: line4Y2 },
226
+ line5: { y1: line5Y1, y2: line5Y2 },
227
+ line6: { y1: line6Y1, y2: line6Y2 }
228
+ };
229
+ isAnimatingBack = true;
230
+ startTime = null;
231
+ if (!animationFrameId) {
232
+ animationFrameId = requestAnimationFrame(animate);
233
+ }
26
234
  }
27
235
  </script>
28
236
 
@@ -46,12 +254,12 @@
46
254
  class="audio-lines-icon"
47
255
  class:animate={isHovered}
48
256
  >
49
- <path d="M2 10v3" />
50
- <path d="M6 6v11" class="line line1" />
51
- <path d="M10 3v18" class="line line2" />
52
- <path d="M14 8v7" class="line line3" />
53
- <path d="M18 5v13" class="line line4" />
54
- <path d="M22 10v3" />
257
+ <line x1="2" y1={line1Y1} x2="2" y2={line1Y2} />
258
+ <line x1="6" y1={line2Y1} x2="6" y2={line2Y2} />
259
+ <line x1="10" y1={line3Y1} x2="10" y2={line3Y2} />
260
+ <line x1="14" y1={line4Y1} x2="14" y2={line4Y2} />
261
+ <line x1="18" y1={line5Y1} x2="18" y2={line5Y2} />
262
+ <line x1="22" y1={line6Y1} x2="22" y2={line6Y2} />
55
263
  </svg>
56
264
  </div>
57
265
 
@@ -59,71 +267,8 @@
59
267
  div {
60
268
  display: inline-block;
61
269
  }
270
+
62
271
  .audio-lines-icon {
63
272
  overflow: visible;
64
273
  }
65
-
66
- .line {
67
- transition: d 0.3s ease;
68
- }
69
-
70
- .audio-lines-icon.animate .line {
71
- animation-play-state: running;
72
- }
73
-
74
- .line1 {
75
- animation: line1Animation 1.5s infinite ease-in-out paused;
76
- }
77
-
78
- .line2 {
79
- animation: line2Animation 1s infinite ease-in-out paused;
80
- }
81
-
82
- .line3 {
83
- animation: line3Animation 0.8s infinite ease-in-out paused;
84
- }
85
-
86
- .line4 {
87
- animation: line4Animation 1.5s infinite ease-in-out paused;
88
- }
89
-
90
- @keyframes line1Animation {
91
- 0%,
92
- 100% {
93
- d: path('M6 6v11');
94
- }
95
- 50% {
96
- d: path('M6 10v3');
97
- }
98
- }
99
-
100
- @keyframes line2Animation {
101
- 0%,
102
- 100% {
103
- d: path('M10 3v18');
104
- }
105
- 50% {
106
- d: path('M10 9v5');
107
- }
108
- }
109
-
110
- @keyframes line3Animation {
111
- 0%,
112
- 100% {
113
- d: path('M14 8v7');
114
- }
115
- 50% {
116
- d: path('M14 6v11');
117
- }
118
- }
119
-
120
- @keyframes line4Animation {
121
- 0%,
122
- 100% {
123
- d: path('M18 5v13');
124
- }
125
- 50% {
126
- d: path('M18 7v9');
127
- }
128
- }
129
274
  </style>
@@ -0,0 +1,108 @@
1
+ <script>
2
+ /**
3
+ * @typedef {Object} Props
4
+ * @property {string} [color]
5
+ * @property {number} [size]
6
+ * @property {number} [strokeWidth]
7
+ * @property {boolean} [isHovered]
8
+ * @property {string} [class]
9
+ */
10
+
11
+ /** @type {Props} */
12
+ let {
13
+ color = 'currentColor',
14
+ size = 24,
15
+ strokeWidth = 2,
16
+ isHovered = false,
17
+ class: className = ''
18
+ } = $props();
19
+
20
+ function handleMouseEnter() {
21
+ if (isHovered) return;
22
+ isHovered = true;
23
+
24
+ setTimeout(() => {
25
+ isHovered = false;
26
+ }, 1400);
27
+ }
28
+ </script>
29
+
30
+ <div class={className} aria-label="cloud-moon" role="img" onmouseenter={handleMouseEnter}>
31
+ <svg
32
+ xmlns="http://www.w3.org/2000/svg"
33
+ width={size}
34
+ height={size}
35
+ viewBox="0 0 24 24"
36
+ fill="none"
37
+ stroke={color}
38
+ stroke-width={strokeWidth}
39
+ stroke-linecap="round"
40
+ stroke-linejoin="round"
41
+ class="cloud-moon-icon"
42
+ class:animate={isHovered}
43
+ >
44
+ <path d="M13 16a3 3 0 0 1 0 6H7a5 5 0 1 1 4.9-6z" class="cloud-moon-path1" />
45
+ <path
46
+ d="M18.376 14.512a6 6 0 0 0 3.461-4.127c.148-.625-.659-.97-1.248-.714a4 4 0 0 1-5.259-5.26c.255-.589-.09-1.395-.716-1.248a6 6 0 0 0-4.594 5.36"
47
+ class="cloud-moon-path2"
48
+ />
49
+ </svg>
50
+ </div>
51
+
52
+ <style>
53
+ div {
54
+ display: inline-block;
55
+ }
56
+ .cloud-moon-icon {
57
+ overflow: visible;
58
+ }
59
+
60
+ .cloud-moon-path1 {
61
+ transform: translate(0, 0);
62
+ transition: transform 0.1s ease-in-out;
63
+ }
64
+
65
+ .cloud-moon-path2 {
66
+ transform: rotate(0deg);
67
+ transform-origin: center;
68
+ transition: transform 0.1s ease-in-out;
69
+ }
70
+
71
+ .cloud-moon-icon.animate .cloud-moon-path1 {
72
+ animation: cloudMoonPath1 1.4s ease-in-out forwards;
73
+ }
74
+
75
+ .cloud-moon-icon.animate .cloud-moon-path2 {
76
+ animation: cloudMoonPath2 1.4s ease-in-out forwards;
77
+ }
78
+
79
+ @keyframes cloudMoonPath1 {
80
+ 0% {
81
+ transform: translate(0, 0);
82
+ }
83
+ 33.33% {
84
+ transform: translate(-1px, -1px);
85
+ }
86
+ 66.66% {
87
+ transform: translate(1px, 1px);
88
+ }
89
+ 100% {
90
+ transform: translate(0, 0);
91
+ }
92
+ }
93
+
94
+ @keyframes cloudMoonPath2 {
95
+ 0% {
96
+ transform: rotate(0deg);
97
+ }
98
+ 33.33% {
99
+ transform: rotate(6deg);
100
+ }
101
+ 66.66% {
102
+ transform: rotate(-8deg);
103
+ }
104
+ 100% {
105
+ transform: rotate(0deg);
106
+ }
107
+ }
108
+ </style>
@@ -0,0 +1,19 @@
1
+ export default CloudMoon;
2
+ type CloudMoon = {
3
+ $on?(type: string, callback: (e: any) => void): () => void;
4
+ $set?(props: Partial<Props>): void;
5
+ };
6
+ declare const CloudMoon: import("svelte").Component<{
7
+ color?: string;
8
+ size?: number;
9
+ strokeWidth?: number;
10
+ isHovered?: boolean;
11
+ class?: string;
12
+ }, {}, "">;
13
+ type Props = {
14
+ color?: string;
15
+ size?: number;
16
+ strokeWidth?: number;
17
+ isHovered?: boolean;
18
+ class?: string;
19
+ };
@@ -1,4 +1,5 @@
1
1
  import activity from './activity.svelte';
2
+ import airplay from './airplay.svelte';
2
3
  import alarmClock from './alarm-clock.svelte';
3
4
  import alarmClockCheck from './alarm-clock-check.svelte';
4
5
  import alarmClockOff from './alarm-clock-off.svelte';
@@ -179,6 +180,7 @@ import clock8 from './clock-8.svelte';
179
180
  import clock9 from './clock-9.svelte';
180
181
  import cloudCog from './cloud-cog.svelte';
181
182
  import cloudDownload from './cloud-download.svelte';
183
+ import cloudMoon from './cloud-moon.svelte';
182
184
  import cloudOff from './cloud-off.svelte';
183
185
  import cloudUpload from './cloud-upload.svelte';
184
186
  import cog from './cog.svelte';
@@ -532,6 +534,12 @@ let ICONS_LIST = [
532
534
  ],
533
535
  categories: ['medical', 'account', 'social', 'science', 'multimedia']
534
536
  },
537
+ {
538
+ name: 'airplay',
539
+ icon: airplay,
540
+ tags: ['stream', 'cast', 'mirroring', 'screen', 'monitor', 'macos', 'osx'],
541
+ categories: ['multimedia', 'connectivity', 'devices', 'brands']
542
+ },
535
543
  {
536
544
  name: 'alarm-clock',
537
545
  icon: alarmClock,
@@ -2548,6 +2556,12 @@ let ICONS_LIST = [
2548
2556
  tags: ['import'],
2549
2557
  categories: ['arrows', 'files']
2550
2558
  },
2559
+ {
2560
+ name: 'cloud-moon',
2561
+ icon: cloudMoon,
2562
+ tags: ['weather', 'night'],
2563
+ categories: ['weather']
2564
+ },
2551
2565
  {
2552
2566
  name: 'cloud-off',
2553
2567
  icon: cloudOff,
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { default as Activity } from "./icons/activity.svelte";
2
+ export { default as Airplay } from "./icons/airplay.svelte";
2
3
  export { default as AlarmClockCheck } from "./icons/alarm-clock-check.svelte";
3
4
  export { default as AlarmClockOff } from "./icons/alarm-clock-off.svelte";
4
5
  export { default as AlarmClock } from "./icons/alarm-clock.svelte";
@@ -179,6 +180,7 @@ export { default as Clock9 } from "./icons/clock-9.svelte";
179
180
  export { default as Clock } from "./icons/clock.svelte";
180
181
  export { default as CloudCog } from "./icons/cloud-cog.svelte";
181
182
  export { default as CloudDownload } from "./icons/cloud-download.svelte";
183
+ export { default as CloudMoon } from "./icons/cloud-moon.svelte";
182
184
  export { default as CloudOff } from "./icons/cloud-off.svelte";
183
185
  export { default as CloudUpload } from "./icons/cloud-upload.svelte";
184
186
  export { default as Cog } from "./icons/cog.svelte";
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export { default as Activity } from './icons/activity.svelte';
2
+ export { default as Airplay } from './icons/airplay.svelte';
2
3
  export { default as AlarmClockCheck } from './icons/alarm-clock-check.svelte';
3
4
  export { default as AlarmClockOff } from './icons/alarm-clock-off.svelte';
4
5
  export { default as AlarmClock } from './icons/alarm-clock.svelte';
@@ -179,6 +180,7 @@ export { default as Clock9 } from './icons/clock-9.svelte';
179
180
  export { default as Clock } from './icons/clock.svelte';
180
181
  export { default as CloudCog } from './icons/cloud-cog.svelte';
181
182
  export { default as CloudDownload } from './icons/cloud-download.svelte';
183
+ export { default as CloudMoon } from './icons/cloud-moon.svelte';
182
184
  export { default as CloudOff } from './icons/cloud-off.svelte';
183
185
  export { default as CloudUpload } from './icons/cloud-upload.svelte';
184
186
  export { default as Cog } from './icons/cog.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jis3r/icons",
3
- "version": "1.12.1",
3
+ "version": "1.14.0",
4
4
  "description": "beautifully crafted, moving icons. for svelte.",
5
5
  "keywords": [
6
6
  "svelte",