@cntyclub/ui-react 0.11.0 → 0.12.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.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ui/aurora-orb.tsx +11 -7
- package/src/components/ui/thinking-orb.tsx +6 -0
- package/src/index.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cntyclub/ui-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "React component library for the Country Club UI Kit — Base UI primitives styled with the Country Club design system (Tailwind CSS v4)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -76,13 +76,15 @@ export function AuroraOrb({
|
|
|
76
76
|
const draw = MODE_DRAWS[mode];
|
|
77
77
|
const rate = baseSpeed * speed;
|
|
78
78
|
|
|
79
|
-
const paint = (t: number) => {
|
|
79
|
+
const paint = (t: number, wall: number) => {
|
|
80
80
|
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
81
81
|
ctx.clearRect(0, 0, size, size);
|
|
82
82
|
draw(ctx, size, t, false, opts);
|
|
83
|
-
// Recolor the frame: a linear gradient across the orb, rotating
|
|
84
|
-
//
|
|
85
|
-
|
|
83
|
+
// Recolor the frame: a linear gradient across the orb, rotating so the
|
|
84
|
+
// colors drift the way AuroraText's sweep does. Driven by wall-clock
|
|
85
|
+
// (~5s per turn) rather than the preset-scaled t, so the drift stays
|
|
86
|
+
// visible even for slow presets/speeds.
|
|
87
|
+
const angle = wall * 1.2;
|
|
86
88
|
const r = size / 2;
|
|
87
89
|
const dx = Math.cos(angle) * r;
|
|
88
90
|
const dy = Math.sin(angle) * r;
|
|
@@ -98,7 +100,7 @@ export function AuroraOrb({
|
|
|
98
100
|
|
|
99
101
|
// Reduced motion: a single still frame, matching the stock component.
|
|
100
102
|
if (typeof matchMedia !== "undefined" && matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
|
101
|
-
paint(0.6);
|
|
103
|
+
paint(0.6, 0.6);
|
|
102
104
|
return;
|
|
103
105
|
}
|
|
104
106
|
|
|
@@ -107,7 +109,8 @@ export function AuroraOrb({
|
|
|
107
109
|
let frame = 0;
|
|
108
110
|
let running = false;
|
|
109
111
|
const loop = () => {
|
|
110
|
-
|
|
112
|
+
const now = performance.now() / 1000;
|
|
113
|
+
paint(now * rate, now);
|
|
111
114
|
if (running) frame = requestAnimationFrame(loop);
|
|
112
115
|
};
|
|
113
116
|
const start = () => {
|
|
@@ -120,7 +123,8 @@ export function AuroraOrb({
|
|
|
120
123
|
cancelAnimationFrame(frame);
|
|
121
124
|
};
|
|
122
125
|
|
|
123
|
-
|
|
126
|
+
const first = performance.now() / 1000;
|
|
127
|
+
paint(first * rate, first);
|
|
124
128
|
let visible = true;
|
|
125
129
|
const observer =
|
|
126
130
|
typeof IntersectionObserver !== "undefined"
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Stock monochrome thinking orb — six hand-tuned dotted animations with
|
|
2
|
+
// automatic light/dark ink (data-theme / .dark class / prefers-color-scheme).
|
|
3
|
+
// Re-exported from the thinking-orbs package so kit consumers get it alongside
|
|
4
|
+
// AuroraOrb without depending on thinking-orbs directly. For the
|
|
5
|
+
// aurora-gradient recolored variant see ./aurora-orb.
|
|
6
|
+
export { ThinkingOrb, type OrbTheme, type ThinkingOrbProps } from "thinking-orbs";
|
package/src/index.ts
CHANGED
|
@@ -89,6 +89,7 @@ export * from "./components/ui/table";
|
|
|
89
89
|
export * from "./components/ui/tabs";
|
|
90
90
|
export * from "./components/ui/tag";
|
|
91
91
|
export { default as TargetCountdown } from "./components/ui/target-countdown";
|
|
92
|
+
export * from "./components/ui/thinking-orb";
|
|
92
93
|
export * from "./components/ui/timeline";
|
|
93
94
|
export * from "./components/ui/text-editor";
|
|
94
95
|
export * from "./components/ui/textarea";
|