@arcfusionz/arc-primitive-ui 0.3.12 → 0.3.13

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.
@@ -28,14 +28,16 @@ const textSizeClasses = {
28
28
  };
29
29
  const textClasses = "inline-block whitespace-nowrap font-sans leading-none text-muted-foreground";
30
30
  const textShimmerClasses = "bg-[linear-gradient(90deg,transparent_38%,var(--color-secondary)_50%,transparent_62%),linear-gradient(var(--color-muted-foreground),var(--color-muted-foreground))] bg-[length:250%_100%,100%_100%] bg-clip-text [background-repeat:no-repeat,no-repeat] motion-safe:animate-ai-loader-text-shimmer motion-safe:text-transparent motion-safe:[&_*]:!text-inherit motion-safe:will-change-[background-position]";
31
- const rotationMotionClasses = "motion-safe:animate-ai-loader-rotate motion-safe:will-change-transform";
31
+ const processingRotationMotionClasses = "motion-safe:animate-ai-loader-processing-spin motion-safe:will-change-transform";
32
32
  const processingPulseMotionClasses = "motion-safe:animate-ai-loader-processing-pulse motion-safe:will-change-transform";
33
33
  const coreMotionClasses = "motion-safe:animate-ai-loader-core motion-safe:will-change-transform";
34
34
  const facetMotionClasses = "motion-safe:animate-ai-loader-facet motion-safe:will-change-transform";
35
35
  const firstSparkMotionClasses = "motion-safe:animate-ai-loader-spark motion-safe:will-change-transform";
36
- const quarterSparkMotionClasses = "motion-safe:animate-ai-loader-spark motion-safe:[animation-delay:0.6s] motion-safe:will-change-transform";
37
36
  const secondSparkMotionClasses = "motion-safe:animate-ai-loader-spark motion-safe:[animation-delay:1.2s] motion-safe:will-change-transform";
38
- const threeQuarterSparkMotionClasses = "motion-safe:animate-ai-loader-spark motion-safe:[animation-delay:1.8s] motion-safe:will-change-transform";
37
+ const firstProcessingSparkMotionClasses = "motion-safe:animate-ai-loader-processing-spark motion-safe:will-change-transform";
38
+ const quarterProcessingSparkMotionClasses = "motion-safe:animate-ai-loader-processing-spark motion-safe:[animation-delay:0.6s] motion-safe:will-change-transform";
39
+ const secondProcessingSparkMotionClasses = "motion-safe:animate-ai-loader-processing-spark motion-safe:[animation-delay:1.2s] motion-safe:will-change-transform";
40
+ const threeQuarterProcessingSparkMotionClasses = "motion-safe:animate-ai-loader-processing-spark motion-safe:[animation-delay:1.8s] motion-safe:will-change-transform";
39
41
  const processingSatelliteMotionClasses = "motion-safe:animate-ai-loader-processing-satellite motion-safe:will-change-opacity";
40
42
  const AILoader = forwardRef(({ state = "default", size = "md", tone = "brand", text, label, render, className, ...rest }, ref) => {
41
43
  const gradientId = `ai-loader-${useId().replaceAll(":", "")}`;
@@ -85,59 +87,64 @@ const AILoader = forwardRef(({ state = "default", size = "md", tone = "brand", t
85
87
  stopColor: endColor
86
88
  })
87
89
  ]
88
- }) }), /* @__PURE__ */ jsxs("g", {
89
- className: cn("origin-center [transform-box:view-box]", processing && rotationMotionClasses),
90
- children: [
91
- !processing && /* @__PURE__ */ jsx("g", {
92
- className: cn("origin-center rotate-45 scale-75 opacity-15 [transform-box:fill-box]", facetMotionClasses),
93
- children: /* @__PURE__ */ jsx("path", {
94
- fill: `url(#${gradientId})`,
95
- d: SPARKLE_PATH
96
- })
97
- }),
98
- /* @__PURE__ */ jsx("path", {
90
+ }) }), /* @__PURE__ */ jsxs("g", { children: [
91
+ !processing && /* @__PURE__ */ jsx("g", {
92
+ className: cn("origin-center rotate-45 scale-75 opacity-15 [transform-box:fill-box]", facetMotionClasses),
93
+ children: /* @__PURE__ */ jsx("path", {
94
+ fill: `url(#${gradientId})`,
95
+ d: SPARKLE_PATH
96
+ })
97
+ }),
98
+ /* @__PURE__ */ jsx("g", {
99
+ className: cn("origin-center [transform-box:view-box]", processing && processingRotationMotionClasses),
100
+ children: /* @__PURE__ */ jsx("path", {
99
101
  fill: `url(#${gradientId})`,
100
102
  d: SPARKLE_PATH,
101
103
  className: cn("origin-center opacity-95 [transform-box:fill-box]", processing ? processingPulseMotionClasses : coreMotionClasses)
102
- }),
103
- /* @__PURE__ */ jsx("g", {
104
- transform: "translate(19 4.75)",
105
- className: processing ? processingSatelliteMotionClasses : void 0,
106
- children: /* @__PURE__ */ jsx("path", {
107
- fill: `url(#${gradientId})`,
108
- className: cn("origin-center opacity-45 [transform-box:fill-box]", firstSparkMotionClasses),
109
- d: LARGE_SATELLITE_PATH
110
- })
111
- }),
112
- processing && /* @__PURE__ */ jsx("g", {
113
- transform: "translate(19 19.25)",
114
- className: processingSatelliteMotionClasses,
115
- children: /* @__PURE__ */ jsx("path", {
116
- fill: `url(#${gradientId})`,
117
- className: cn("origin-center opacity-45 [transform-box:fill-box]", quarterSparkMotionClasses),
118
- d: SMALL_SATELLITE_PATH
119
- })
120
- }),
121
- /* @__PURE__ */ jsx("g", {
122
- transform: processing ? "translate(5 19.25)" : "translate(5 18.25)",
123
- className: processing ? processingSatelliteMotionClasses : void 0,
124
- children: /* @__PURE__ */ jsx("path", {
125
- fill: `url(#${gradientId})`,
126
- className: cn("origin-center opacity-45 [transform-box:fill-box]", secondSparkMotionClasses),
127
- d: processing ? LARGE_SATELLITE_PATH : SMALL_SATELLITE_PATH
128
- })
129
- }),
130
- processing && /* @__PURE__ */ jsx("g", {
131
- transform: "translate(5 4.75)",
132
- className: processingSatelliteMotionClasses,
133
- children: /* @__PURE__ */ jsx("path", {
134
- fill: `url(#${gradientId})`,
135
- className: cn("origin-center opacity-45 [transform-box:fill-box]", threeQuarterSparkMotionClasses),
136
- d: SMALL_SATELLITE_PATH
137
- })
138
104
  })
139
- ]
140
- })]
105
+ }),
106
+ /* @__PURE__ */ jsxs("g", {
107
+ className: cn("origin-center [transform-box:view-box]", processing && processingRotationMotionClasses),
108
+ children: [
109
+ /* @__PURE__ */ jsx("g", {
110
+ transform: "translate(19 4.75)",
111
+ className: processing ? processingSatelliteMotionClasses : void 0,
112
+ children: /* @__PURE__ */ jsx("path", {
113
+ fill: `url(#${gradientId})`,
114
+ className: cn("origin-center opacity-45 [transform-box:fill-box]", processing ? firstProcessingSparkMotionClasses : firstSparkMotionClasses),
115
+ d: LARGE_SATELLITE_PATH
116
+ })
117
+ }),
118
+ processing && /* @__PURE__ */ jsx("g", {
119
+ transform: "translate(19 19.25)",
120
+ className: processingSatelliteMotionClasses,
121
+ children: /* @__PURE__ */ jsx("path", {
122
+ fill: `url(#${gradientId})`,
123
+ className: cn("origin-center opacity-45 [transform-box:fill-box]", secondProcessingSparkMotionClasses),
124
+ d: SMALL_SATELLITE_PATH
125
+ })
126
+ }),
127
+ /* @__PURE__ */ jsx("g", {
128
+ transform: processing ? "translate(5 19.25)" : "translate(5 18.25)",
129
+ className: processing ? processingSatelliteMotionClasses : void 0,
130
+ children: /* @__PURE__ */ jsx("path", {
131
+ fill: `url(#${gradientId})`,
132
+ className: cn("origin-center opacity-45 [transform-box:fill-box]", processing ? quarterProcessingSparkMotionClasses : secondSparkMotionClasses),
133
+ d: processing ? LARGE_SATELLITE_PATH : SMALL_SATELLITE_PATH
134
+ })
135
+ }),
136
+ processing && /* @__PURE__ */ jsx("g", {
137
+ transform: "translate(5 4.75)",
138
+ className: processingSatelliteMotionClasses,
139
+ children: /* @__PURE__ */ jsx("path", {
140
+ fill: `url(#${gradientId})`,
141
+ className: cn("origin-center opacity-45 [transform-box:fill-box]", threeQuarterProcessingSparkMotionClasses),
142
+ d: SMALL_SATELLITE_PATH
143
+ })
144
+ })
145
+ ]
146
+ })
147
+ ] })]
141
148
  }),
142
149
  hasText && /* @__PURE__ */ jsx("span", {
143
150
  className: cn(textClasses, textSizeClasses[size], processing && textShimmerClasses),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcfusionz/arc-primitive-ui",
3
- "version": "0.3.12",
3
+ "version": "0.3.13",
4
4
  "description": "ArcFusion primitive UI components",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -50,18 +50,22 @@
50
50
  /* ---------------------------------------------------------------------
51
51
  * Motion
52
52
  * AI Loader uses an asymmetric 2.4s ambient rhythm. Processing combines a
53
- * variable-speed 3.6s rotation, a strong whole-mark pulse, and a monochrome
54
- * currentColor fill. Its satellites fade at peak speed and return as the
55
- * rotation eases. The four-point path itself never morphs. Skeleton's wave
53
+ * four eased quarter-turn beats shared by the core and satellites across a
54
+ * 4.8s revolution, a strong core pulse, and a monochrome currentColor fill.
55
+ * The satellites soften at each beat's midpoint and return as the shared
56
+ * rotation eases; their staggered scale cycles peak at 140% and collapse to
57
+ * zero. The
58
+ * four-point path itself never morphs. Skeleton's wave
56
59
  * crosses a placeholder in 1.6s and rests off-canvas when motion is reduced.
57
60
  * Progress sweeps its indeterminate segment across the track in 1.8s;
58
61
  * reduced motion swaps the sweep for Tailwind's opacity pulse so activity
59
62
  * still reads without positional movement.
60
63
  * `motion-safe` leaves a still frame for reduced-motion users.
61
64
  * ------------------------------------------------------------------- */
62
- --animate-ai-loader-rotate: ai-loader-rotate 3.6s infinite;
65
+ --animate-ai-loader-processing-spin: ai-loader-processing-spin 4.8s infinite;
63
66
  --animate-ai-loader-processing-pulse: ai-loader-processing-pulse 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
64
- --animate-ai-loader-processing-satellite: ai-loader-processing-satellite 3.6s linear infinite;
67
+ --animate-ai-loader-processing-satellite: ai-loader-processing-satellite 4.8s linear infinite;
68
+ --animate-ai-loader-processing-spark: ai-loader-processing-spark 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
65
69
  --animate-ai-loader-core: ai-loader-core 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
66
70
  --animate-ai-loader-facet: ai-loader-facet 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
67
71
  --animate-ai-loader-spark: ai-loader-spark 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
@@ -178,28 +182,6 @@
178
182
  }
179
183
  }
180
184
 
181
- @keyframes ai-loader-rotate {
182
- 0% {
183
- transform: rotate(0deg);
184
- animation-timing-function: cubic-bezier(0.45, 0, 0.75, 0.35);
185
- }
186
- 28% {
187
- transform: rotate(60deg);
188
- animation-timing-function: cubic-bezier(0.15, 0.75, 0.25, 1);
189
- }
190
- 58% {
191
- transform: rotate(220deg);
192
- animation-timing-function: cubic-bezier(0.55, 0, 0.8, 0.45);
193
- }
194
- 76% {
195
- transform: rotate(276deg);
196
- animation-timing-function: cubic-bezier(0.2, 0.7, 0.3, 1);
197
- }
198
- 100% {
199
- transform: rotate(360deg);
200
- }
201
- }
202
-
203
185
  @keyframes ai-loader-processing-pulse {
204
186
  0%,
205
187
  100% {
@@ -220,18 +202,43 @@
220
202
  }
221
203
  }
222
204
 
205
+ /* Four eased quarter turns create a repeatable visual beat. The fourfold core
206
+ reaches the same upright brand-mark orientation at every 1.2s boundary. */
207
+ @keyframes ai-loader-processing-spin {
208
+ 0% {
209
+ transform: rotate(0deg);
210
+ animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
211
+ }
212
+ 25% {
213
+ transform: rotate(90deg);
214
+ animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
215
+ }
216
+ 50% {
217
+ transform: rotate(180deg);
218
+ animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
219
+ }
220
+ 75% {
221
+ transform: rotate(270deg);
222
+ animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
223
+ }
224
+ 100% {
225
+ transform: rotate(360deg);
226
+ }
227
+ }
228
+
223
229
  @keyframes ai-loader-processing-satellite {
224
230
  0%,
225
- 18%,
231
+ 25%,
232
+ 50%,
233
+ 75%,
226
234
  100% {
227
235
  opacity: 1;
228
236
  }
229
- 28%,
230
- 38% {
231
- opacity: 0;
232
- }
233
- 58% {
234
- opacity: 1;
237
+ 12.5%,
238
+ 37.5%,
239
+ 62.5%,
240
+ 87.5% {
241
+ opacity: 0.35;
235
242
  }
236
243
  }
237
244
 
@@ -284,6 +291,30 @@
284
291
  }
285
292
  }
286
293
 
294
+ @keyframes ai-loader-processing-spark {
295
+ 0%,
296
+ 100% {
297
+ opacity: 0;
298
+ transform: scale(0);
299
+ }
300
+ 18% {
301
+ opacity: 0.35;
302
+ transform: scale(0.5);
303
+ }
304
+ 42% {
305
+ opacity: 1;
306
+ transform: scale(1.4);
307
+ }
308
+ 62% {
309
+ opacity: 0.75;
310
+ transform: scale(1.05);
311
+ }
312
+ 82% {
313
+ opacity: 0;
314
+ transform: scale(0);
315
+ }
316
+ }
317
+
287
318
  @keyframes ai-loader-spark {
288
319
  0%,
289
320
  100% {