@botiverse/raft-ui 0.81.0 → 0.82.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 (28) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/components/choice-list/choice-list.d.mts +8 -0
  3. package/dist/components/choice-list/choice-list.mjs +37 -16
  4. package/dist/components/choice-list/choice-list.recipe.mjs +1 -0
  5. package/dist/components/composer/composer-drop-overlay.d.mts +9 -4
  6. package/dist/components/composer/composer-drop-overlay.mjs +2 -5
  7. package/dist/components/list-row/index.d.mts +2 -2
  8. package/dist/components/list-row/list-row.d.mts +9 -0
  9. package/dist/components/list-row/list-row.mjs +20 -1
  10. package/dist/components/list-row/list-row.recipe.d.mts +3 -0
  11. package/dist/components/list-row/list-row.recipe.mjs +1 -0
  12. package/dist/components/message-action-card/index.d.mts +2 -2
  13. package/dist/components/message-action-card/message-action-card.d.mts +8 -0
  14. package/dist/components/message-action-card/message-action-card.mjs +16 -1
  15. package/dist/components/message-action-card/message-action-card.recipe.mjs +5 -0
  16. package/dist/components/resizable/resizable.recipe.mjs +4 -4
  17. package/dist/components/scroll-area/use-scrollbars.mjs +2 -1
  18. package/dist/components/steps/otter-animation-visibility.mjs +45 -0
  19. package/dist/components/steps/otter-indicator.css +131 -106
  20. package/dist/components/steps/otter-indicator.d.mts +5 -8
  21. package/dist/components/steps/otter-indicator.mjs +38 -314
  22. package/dist/components/steps/ottie-assets/error.webp +0 -0
  23. package/dist/components/steps/ottie-assets/finish.webp +0 -0
  24. package/dist/components/steps/ottie-assets/process.webp +0 -0
  25. package/dist/components/steps/ottie-assets/wait.webp +0 -0
  26. package/dist/index.d.mts +3 -3
  27. package/dist/index.mjs +3 -3
  28. package/package.json +1 -1
@@ -1,141 +1,166 @@
1
- /* ─────────────────────────────────────────────────────────────────────────
2
- OtterIndicator — an otter posed by a status (an agent's turn, a step). The
3
- picture is fixed art; only the badges and the "z" take token colours.
4
- ───────────────────────────────────────────────────────────────────────── */
5
-
1
+ /* Fixed Ottie artwork in separate CSS assets; no image modules/base64 in JS. */
6
2
  .r-otter-indicator {
7
- overflow: visible;
8
- }
9
- .r-otter-indicator * {
10
- transform-box: view-box;
11
- }
12
- .r-otter-indicator__body {
13
- transform-origin: 24px 28px;
14
- }
15
- .r-otter-indicator__arm {
16
- transform-origin: 29px 27px;
17
- }
18
- .r-otter-indicator__ripple {
19
- opacity: 0;
20
- transform-origin: 6px 30.5px;
21
- }
22
- .r-otter-indicator__z {
23
- opacity: 0;
24
- }
25
- .r-otter-indicator__parcel--adrift {
26
- transform-origin: 6px 25px;
3
+ overflow: hidden;
4
+ flex-shrink: 0;
5
+ }
6
+ .r-otter-indicator--wait {
7
+ --r-ottie-art: url("./ottie-assets/wait.webp");
8
+ }
9
+ .r-otter-indicator--process {
10
+ --r-ottie-art: url("./ottie-assets/process.webp");
11
+ }
12
+ .r-otter-indicator--error {
13
+ --r-ottie-art: url("./ottie-assets/error.webp");
14
+ }
15
+ .r-otter-indicator--finish {
16
+ --r-ottie-art: url("./ottie-assets/finish.webp");
17
+ }
18
+ .r-otter-indicator__viewport {
19
+ width: 100%;
20
+ aspect-ratio: 1;
21
+ overflow: hidden;
22
+ }
23
+ .r-otter-indicator__art {
24
+ width: 100%;
25
+ height: 100%;
26
+ position: relative;
27
+ }
28
+ .r-otter-indicator__base,
29
+ .r-otter-indicator__frames,
30
+ .r-otter-indicator__rest {
31
+ position: absolute;
32
+ inset: 0;
33
+ background-image: var(--r-ottie-art);
34
+ background-size: 300% 200%;
35
+ background-repeat: no-repeat;
36
+ background-position: 0% 0%;
37
+ }
38
+ .r-otter-indicator__rest {
39
+ background-size: contain;
40
+ background-position: center;
41
+ transform-origin: 50% 80%;
42
+ }
43
+ .r-otter-indicator--process .r-otter-indicator__frames {
44
+ mask-image:
45
+ radial-gradient(ellipse 11% 9% at 40% 60%, oklch(0 0 0) 88%, transparent 100%),
46
+ radial-gradient(ellipse 11% 9% at 61% 60%, oklch(0 0 0) 88%, transparent 100%);
47
+ }
48
+ .r-otter-indicator--error .r-otter-indicator__frames {
49
+ mask-image: linear-gradient(oklch(0 0 0) 0 58%, transparent 64%);
50
+ }
51
+ .r-otter-indicator--error .r-otter-indicator__frames,
52
+ .r-otter-indicator--finish .r-otter-indicator__frames {
53
+ background-position: 100% 100%;
54
+ }
55
+ .r-otter-indicator__question {
56
+ fill: oklch(0.57 0.09 75);
57
+ font-family: ui-rounded, system-ui, sans-serif;
27
58
  }
28
59
  @media (prefers-reduced-motion: no-preference) {
29
- .r-otter-indicator__wave {
30
- animation: r-otter-indicator-wave 1.2s linear infinite;
60
+ .r-otter-indicator__rest {
61
+ animation: r-ottie-breathe 6s ease-in-out infinite;
31
62
  }
32
- .r-otter-indicator__wave--back {
33
- animation-duration: 2s;
63
+ .r-otter-indicator--process .r-otter-indicator__frames {
64
+ animation: r-ottie-type 4.52s steps(1, end) infinite;
34
65
  }
35
- .r-otter-indicator--process .r-otter-indicator__body {
36
- animation: r-otter-indicator-bob 1.8s ease-in-out infinite alternate;
66
+ .r-otter-indicator--error .r-otter-indicator__frames {
67
+ animation: r-ottie-tilt 1.55s steps(1, end) both;
37
68
  }
38
- .r-otter-indicator--process .r-otter-indicator__arm {
39
- animation: r-otter-indicator-paddle 0.9s ease-in-out infinite alternate;
69
+ .r-otter-indicator--finish .r-otter-indicator__frames {
70
+ animation: r-ottie-finish 1.24s steps(1, end) both;
40
71
  }
41
- .r-otter-indicator--process .r-otter-indicator__ripple {
42
- animation: r-otter-indicator-ripple 1.8s ease-out infinite;
72
+ .r-otter-indicator__question {
73
+ animation: r-ottie-question 1s linear both;
43
74
  }
44
- .r-otter-indicator--process .r-otter-indicator__ripple--late {
45
- animation-delay: 0.9s;
75
+ .r-otter-indicator .r-otter-indicator__rest,
76
+ .r-otter-indicator .r-otter-indicator__frames,
77
+ .r-otter-indicator .r-otter-indicator__question {
78
+ animation-play-state: paused;
46
79
  }
47
- .r-otter-indicator--finish .r-otter-indicator__wave {
48
- animation-duration: 3s;
80
+ .r-otter-indicator[data-animate="true"] .r-otter-indicator__rest,
81
+ .r-otter-indicator[data-animate="true"] .r-otter-indicator__frames,
82
+ .r-otter-indicator[data-animate="true"] .r-otter-indicator__question {
83
+ animation-play-state: running;
49
84
  }
50
- .r-otter-indicator--finish .r-otter-indicator__body {
51
- animation: r-otter-indicator-bob 3.2s ease-in-out infinite alternate;
52
- }
53
- .r-otter-indicator--wait .r-otter-indicator__body {
54
- animation: r-otter-indicator-breathe 2.4s ease-in-out infinite alternate;
85
+ }
86
+ @keyframes r-ottie-breathe {
87
+ 0%,
88
+ 100% {
89
+ transform: scaleY(1);
55
90
  }
56
- .r-otter-indicator--wait .r-otter-indicator__z {
57
- animation: r-otter-indicator-z 2.4s ease-out infinite;
91
+ 50% {
92
+ transform: scaleY(1.006);
58
93
  }
59
- .r-otter-indicator--wait .r-otter-indicator__z--late {
60
- animation-delay: 1.2s;
94
+ }
95
+ @keyframes r-ottie-type {
96
+ 0%,
97
+ 100% {
98
+ background-position: 0% 0%;
61
99
  }
62
- .r-otter-indicator--error .r-otter-indicator__body {
63
- animation: r-otter-indicator-shiver 0.18s linear infinite alternate;
100
+ 48.6726% {
101
+ background-position: 50% 0%;
64
102
  }
65
- .r-otter-indicator--error .r-otter-indicator__parcel--adrift {
66
- animation: r-otter-indicator-drift 2s ease-in-out infinite alternate;
103
+ 52.6549% {
104
+ background-position: 100% 0%;
67
105
  }
68
- }
69
- @media (prefers-reduced-motion: reduce) {
70
- .r-otter-indicator__z {
71
- opacity: 1;
106
+ 58.8496% {
107
+ background-position: 0% 100%;
72
108
  }
73
- }
74
- @keyframes r-otter-indicator-bob {
75
- from {
76
- transform: translateY(-0.6px) rotate(-3deg);
109
+ 62.8319% {
110
+ background-position: 50% 100%;
77
111
  }
78
- to {
79
- transform: translateY(1.2px) rotate(2deg);
112
+ 69.0265% {
113
+ background-position: 100% 100%;
80
114
  }
81
115
  }
82
- @keyframes r-otter-indicator-paddle {
83
- from {
84
- transform: rotate(-35deg);
116
+ @keyframes r-ottie-tilt {
117
+ 0% {
118
+ background-position: 0% 0%;
85
119
  }
86
- to {
87
- transform: rotate(30deg);
120
+ 8.3871% {
121
+ background-position: 50% 0%;
88
122
  }
89
- }
90
- @keyframes r-otter-indicator-wave {
91
- to {
92
- transform: translateX(-12px);
93
- }
94
- }
95
- @keyframes r-otter-indicator-ripple {
96
- from {
97
- opacity: 0.8;
98
- transform: scale(0.4);
123
+ 16.7742% {
124
+ background-position: 100% 0%;
99
125
  }
100
- to {
101
- opacity: 0;
102
- transform: scale(1.6);
126
+ 25.1613% {
127
+ background-position: 0% 100%;
103
128
  }
104
- }
105
- @keyframes r-otter-indicator-breathe {
106
- from {
107
- transform: scale(1, 1);
129
+ 33.5484% {
130
+ background-position: 50% 100%;
108
131
  }
109
- to {
110
- transform: scale(1.02, 1.05);
132
+ 41.9355%,
133
+ 100% {
134
+ background-position: 100% 100%;
111
135
  }
112
136
  }
113
- @keyframes r-otter-indicator-z {
114
- from {
115
- opacity: 0;
116
- transform: translate(0, 0);
137
+ @keyframes r-ottie-finish {
138
+ 0% {
139
+ background-position: 0% 0%;
117
140
  }
118
- 30% {
119
- opacity: 1;
141
+ 13.7097% {
142
+ background-position: 50% 0%;
120
143
  }
121
- to {
122
- opacity: 0;
123
- transform: translate(4px, -7px);
144
+ 26.6129% {
145
+ background-position: 100% 0%;
124
146
  }
125
- }
126
- @keyframes r-otter-indicator-shiver {
127
- from {
128
- transform: translateX(-0.4px);
147
+ 38.7097% {
148
+ background-position: 0% 100%;
129
149
  }
130
- to {
131
- transform: translateX(0.4px);
150
+ 51.6129% {
151
+ background-position: 50% 100%;
152
+ }
153
+ 63.7097%,
154
+ 100% {
155
+ background-position: 100% 100%;
132
156
  }
133
157
  }
134
- @keyframes r-otter-indicator-drift {
135
- from {
136
- transform: translate(0, 0) rotate(-18deg);
158
+ @keyframes r-ottie-question {
159
+ 0%,
160
+ 72% {
161
+ opacity: 0;
137
162
  }
138
- to {
139
- transform: translate(-1.5px, 1.2px) rotate(-8deg);
163
+ 100% {
164
+ opacity: 1;
140
165
  }
141
166
  }
@@ -5,13 +5,10 @@ export interface OtterIndicatorProps extends Omit<ComponentPropsWithRef<"svg">,
5
5
  status: StepStatus;
6
6
  }
7
7
  /**
8
- * An otter on its back, one pose per status:
9
- * - `wait`: asleep on the dry bank, the parcel still on its belly.
10
- * - `process`: afloat, paddling with one arm, the parcel on its belly.
11
- * - `finish`: drifting at ease, hugging the delivered parcel.
12
- * - `error`: shivering in the water; the parcel has slipped away.
13
- *
14
- * It fills its box; give it 48px or more so the poses read.
8
+ * Ottie resting, quietly typing, tilting its head or celebrating.
9
+ * Wait/process loop only while visible. Error/finish play once on entry.
10
+ * Reduced motion shows a still pose. Give it an explicit square box, 40px or larger.
11
+ * Decorative by default; the consumer supplies the nearby status text.
15
12
  */
16
- export declare function OtterIndicator({ status, className, ...props }: OtterIndicatorProps): import("react").JSX.Element;
13
+ export declare function OtterIndicator({ status, className, ref, ...props }: OtterIndicatorProps): import("react").JSX.Element;
17
14
  //#endregion
@@ -1,330 +1,54 @@
1
1
  import { cn } from "../../cn.mjs";
2
- import { useId } from "react";
2
+ import { useMergedRef } from "../../lib/use-merged-ref.mjs";
3
+ import { observeOtterAnimation } from "./otter-animation-visibility.mjs";
4
+ import { useEffect, useRef } from "react";
3
5
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
4
6
  //#region src/components/steps/otter-indicator.tsx
5
- const WAVE_PATH = "M-12 30q3-1.6 6 0t6 0t6 0t6 0t6 0t6 0t6 0t6 0t6 0t6 0t6 0t6 0V48H-12Z";
6
- const FUR = "oklch(0.5 0.07 55)";
7
- const FUR_DARK = "oklch(0.42 0.06 55)";
8
- const INK = "oklch(0.22 0.03 45)";
9
- const WHITE = "oklch(1 0 0)";
10
- function Parcel({ x, y }) {
11
- return /* @__PURE__ */ jsxs("g", {
12
- transform: `translate(${x} ${y})`,
13
- children: [/* @__PURE__ */ jsx("rect", {
14
- width: "9",
15
- height: "7",
16
- rx: "0.8",
17
- fill: "oklch(0.78 0.12 75)",
18
- stroke: FUR_DARK,
19
- strokeWidth: "0.8"
20
- }), /* @__PURE__ */ jsx("path", {
21
- d: "M4.5 0v7M0 3h9",
22
- stroke: "oklch(0.63 0.11 65)",
23
- strokeWidth: "0.8"
24
- })]
25
- });
26
- }
27
- /** The face changes with the step: asleep, paddling, pleased or upset. */
28
- function Face({ status }) {
29
- const line = {
30
- fill: "none",
31
- stroke: INK,
32
- strokeWidth: .8,
33
- strokeLinecap: "round"
34
- };
35
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [
36
- status === "process" && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("circle", {
37
- cx: "36.3",
38
- cy: "20.6",
39
- r: "1.1",
40
- fill: INK
41
- }), /* @__PURE__ */ jsx("circle", {
42
- cx: "36.7",
43
- cy: "20.2",
44
- r: "0.35",
45
- fill: WHITE
46
- })] }),
47
- status === "wait" && /* @__PURE__ */ jsx("path", {
48
- d: "M35.2 20.6q1.1 0.9 2.2 0",
49
- ...line
50
- }),
51
- status === "finish" && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("path", {
52
- d: "M35.2 21.2q1.1-1.3 2.2 0",
53
- ...line
54
- }), /* @__PURE__ */ jsx("ellipse", {
55
- cx: "38.6",
56
- cy: "22.4",
57
- rx: "1.3",
58
- ry: "0.8",
59
- fill: "oklch(0.8 0.1 20)",
60
- opacity: "0.8"
61
- })] }),
62
- status === "error" && /* @__PURE__ */ jsxs(Fragment$1, { children: [
63
- /* @__PURE__ */ jsx("circle", {
64
- cx: "36.3",
65
- cy: "20.8",
66
- r: "1.2",
67
- fill: WHITE,
68
- stroke: INK,
69
- strokeWidth: "0.5"
70
- }),
71
- /* @__PURE__ */ jsx("circle", {
72
- cx: "36.5",
73
- cy: "21",
74
- r: "0.55",
75
- fill: INK
76
- }),
77
- /* @__PURE__ */ jsx("path", {
78
- d: "M34.6 18.2l2.8 0.8",
79
- ...line
80
- })
81
- ] }),
82
- /* @__PURE__ */ jsx("ellipse", {
83
- cx: "42.6",
84
- cy: "23.6",
85
- rx: "1.4",
86
- ry: "1.1",
87
- fill: INK
88
- }),
89
- /* @__PURE__ */ jsx("path", {
90
- d: status === "error" ? "M39.6 27.2q1-0.9 2.1 0" : "M39.6 26.6q1 0.9 2.1 0",
91
- ...line,
92
- strokeWidth: .7
93
- }),
94
- /* @__PURE__ */ jsx("path", {
95
- d: "M41 25.2l4.2-0.8M41 26l4.2 0.6",
96
- stroke: FUR_DARK,
97
- strokeWidth: "0.4",
98
- strokeLinecap: "round"
99
- })
100
- ] });
101
- }
102
- /** A small badge above the head: ✓ when done, ! when failed. */
103
- function Badge({ status }) {
104
- if (status !== "finish" && status !== "error") return null;
105
- return /* @__PURE__ */ jsxs("g", {
106
- transform: "translate(43 9)",
107
- children: [/* @__PURE__ */ jsx("circle", {
108
- r: "4.6",
109
- fill: status === "finish" ? "var(--success)" : "var(--danger)",
110
- stroke: WHITE,
111
- strokeWidth: "1"
112
- }), status === "finish" ? /* @__PURE__ */ jsx("path", {
113
- d: "M-2 0l1.4 1.5L2.1-1.4",
114
- fill: "none",
115
- stroke: WHITE,
116
- strokeWidth: "1.2",
117
- strokeLinecap: "round",
118
- strokeLinejoin: "round"
119
- }) : /* @__PURE__ */ jsx("path", {
120
- d: "M0-2.4v2.6M0 2.1v0.1",
121
- stroke: WHITE,
122
- strokeWidth: "1.3",
123
- strokeLinecap: "round"
124
- })]
125
- });
126
- }
127
- /** The otter on its back, posed by the step: paddling, at ease, upset or asleep. */
128
- function OtterBody({ status }) {
129
- return /* @__PURE__ */ jsxs("g", {
130
- className: "r-otter-indicator__body",
131
- children: [
132
- /* @__PURE__ */ jsx("path", {
133
- d: "M13 26.5Q6 26.5 1.5 30.5Q7 32 13 31Z",
134
- fill: FUR_DARK
135
- }),
136
- /* @__PURE__ */ jsx("ellipse", {
137
- cx: "11",
138
- cy: "21.5",
139
- rx: "1.9",
140
- ry: "3",
141
- fill: FUR_DARK,
142
- transform: "rotate(-25 11 21.5)"
143
- }),
144
- /* @__PURE__ */ jsx("ellipse", {
145
- cx: "14.5",
146
- cy: "20.5",
147
- rx: "1.9",
148
- ry: "3",
149
- fill: FUR_DARK,
150
- transform: "rotate(-10 14.5 20.5)"
151
- }),
152
- /* @__PURE__ */ jsx("g", {
153
- className: "r-otter-indicator__arm",
154
- children: /* @__PURE__ */ jsx("path", {
155
- d: status === "process" ? "M29 27q4 3.5 2.5 8" : "M29 26q3 0.5 4-2",
156
- fill: "none",
157
- stroke: FUR_DARK,
158
- strokeWidth: "2.8",
159
- strokeLinecap: "round"
160
- })
161
- }),
162
- /* @__PURE__ */ jsx("ellipse", {
163
- cx: "22",
164
- cy: "28",
165
- rx: "12",
166
- ry: "6.5",
167
- fill: FUR
168
- }),
169
- /* @__PURE__ */ jsx("ellipse", {
170
- cx: "22",
171
- cy: "25",
172
- rx: "9",
173
- ry: "3.6",
174
- fill: "oklch(0.8 0.06 70)"
175
- }),
176
- status !== "error" && /* @__PURE__ */ jsx(Parcel, {
177
- x: 16.5,
178
- y: 16.5
179
- }),
180
- /* @__PURE__ */ jsx("ellipse", {
181
- cx: "26.5",
182
- cy: "21",
183
- rx: "1.7",
184
- ry: "2.4",
185
- fill: FUR_DARK,
186
- transform: "rotate(30 26.5 21)"
187
- }),
188
- status === "finish" && /* @__PURE__ */ jsx("ellipse", {
189
- cx: "16",
190
- cy: "21.5",
191
- rx: "1.6",
192
- ry: "2.2",
193
- fill: FUR_DARK,
194
- transform: "rotate(-30 16 21.5)"
195
- }),
196
- /* @__PURE__ */ jsx("circle", {
197
- cx: "31.5",
198
- cy: "17.3",
199
- r: "1.8",
200
- fill: FUR_DARK
201
- }),
202
- /* @__PURE__ */ jsx("circle", {
203
- cx: "35",
204
- cy: "23",
205
- r: "7",
206
- fill: FUR
207
- }),
208
- /* @__PURE__ */ jsx("ellipse", {
209
- cx: "39",
210
- cy: "25",
211
- rx: "4.2",
212
- ry: "3.2",
213
- fill: "oklch(0.87 0.05 75)"
214
- }),
215
- /* @__PURE__ */ jsx(Face, { status }),
216
- status === "error" && /* @__PURE__ */ jsx("path", {
217
- d: "M37.4 22.3q-0.8 1.4 0 1.9q0.8-0.5 0-1.9Z",
218
- fill: "oklch(0.8 0.08 230)"
219
- })
220
- ]
221
- });
222
- }
223
7
  /**
224
- * An otter on its back, one pose per status:
225
- * - `wait`: asleep on the dry bank, the parcel still on its belly.
226
- * - `process`: afloat, paddling with one arm, the parcel on its belly.
227
- * - `finish`: drifting at ease, hugging the delivered parcel.
228
- * - `error`: shivering in the water; the parcel has slipped away.
229
- *
230
- * It fills its box; give it 48px or more so the poses read.
8
+ * Ottie resting, quietly typing, tilting its head or celebrating.
9
+ * Wait/process loop only while visible. Error/finish play once on entry.
10
+ * Reduced motion shows a still pose. Give it an explicit square box, 40px or larger.
11
+ * Decorative by default; the consumer supplies the nearby status text.
231
12
  */
232
- function OtterIndicator({ status, className, ...props }) {
233
- const pondId = `otter-pond${useId().replace(/[^\w-]/g, "")}`;
234
- const pond = `url(#${pondId})`;
235
- const wet = status !== "wait";
13
+ function OtterIndicator({ status, className, ref, ...props }) {
14
+ const node = useRef(null);
15
+ const [mergedRef] = useMergedRef(node, ref);
16
+ useEffect(() => {
17
+ if (node.current) return observeOtterAnimation(node.current);
18
+ }, []);
236
19
  return /* @__PURE__ */ jsxs("svg", {
237
20
  "aria-hidden": "true",
238
- viewBox: "0 0 48 48",
239
21
  width: "100%",
240
22
  height: "100%",
241
23
  "data-slot": "otter-indicator",
242
24
  ...props,
25
+ ref: mergedRef,
243
26
  className: cn("r-otter-indicator", `r-otter-indicator--${status}`, className),
244
- children: [
245
- /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", {
246
- id: pondId,
247
- children: /* @__PURE__ */ jsx("ellipse", {
248
- cx: "24",
249
- cy: "35",
250
- rx: "23.5",
251
- ry: "8"
27
+ children: [/* @__PURE__ */ jsx("foreignObject", {
28
+ width: "100%",
29
+ height: "100%",
30
+ children: /* @__PURE__ */ jsx("div", {
31
+ className: "r-otter-indicator__viewport",
32
+ children: /* @__PURE__ */ jsx("div", {
33
+ className: "r-otter-indicator__art",
34
+ children: status === "wait" ? /* @__PURE__ */ jsx("div", { className: "r-otter-indicator__rest" }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [status !== "finish" && /* @__PURE__ */ jsx("div", { className: "r-otter-indicator__base" }), /* @__PURE__ */ jsx("div", { className: "r-otter-indicator__frames" })] })
252
35
  })
253
- }) }),
254
- /* @__PURE__ */ jsxs("g", {
255
- transform: "translate(0 -5)",
256
- children: [
257
- wet ? /* @__PURE__ */ jsx("g", {
258
- clipPath: pond,
259
- children: /* @__PURE__ */ jsx("path", {
260
- className: "r-otter-indicator__wave r-otter-indicator__wave--back",
261
- d: WAVE_PATH,
262
- fill: "oklch(0.88 0.07 215)",
263
- transform: "translate(0 -1.5)"
264
- })
265
- }) : /* @__PURE__ */ jsxs("g", { children: [
266
- /* @__PURE__ */ jsx("ellipse", {
267
- cx: "24",
268
- cy: "34",
269
- rx: "22",
270
- ry: "5.5",
271
- fill: "oklch(0.9 0.06 85)"
272
- }),
273
- /* @__PURE__ */ jsx("ellipse", {
274
- cx: "7",
275
- cy: "34.5",
276
- rx: "1.6",
277
- ry: "1",
278
- fill: "oklch(0.78 0.06 75)"
279
- }),
280
- /* @__PURE__ */ jsx("ellipse", {
281
- cx: "41",
282
- cy: "35.5",
283
- rx: "1.2",
284
- ry: "0.8",
285
- fill: "oklch(0.78 0.06 75)"
286
- })
287
- ] }),
288
- status === "process" && ["", " r-otter-indicator__ripple--late"].map((late) => /* @__PURE__ */ jsx("ellipse", {
289
- className: `r-otter-indicator__ripple${late}`,
290
- cx: "6",
291
- cy: "30.5",
292
- rx: "5",
293
- ry: "1.4",
294
- fill: "none",
295
- stroke: WHITE,
296
- strokeWidth: "0.8"
297
- }, late)),
298
- status === "error" && /* @__PURE__ */ jsx("g", {
299
- className: "r-otter-indicator__parcel--adrift",
300
- children: /* @__PURE__ */ jsx(Parcel, {
301
- x: 1.5,
302
- y: 22
303
- })
304
- }),
305
- /* @__PURE__ */ jsx(OtterBody, { status }),
306
- wet && /* @__PURE__ */ jsx("g", {
307
- clipPath: pond,
308
- children: /* @__PURE__ */ jsx("path", {
309
- className: "r-otter-indicator__wave",
310
- d: WAVE_PATH,
311
- fill: "oklch(0.78 0.11 220)",
312
- fillOpacity: "0.9"
313
- })
314
- }),
315
- status === "wait" && ["", " r-otter-indicator__z--late"].map((late, i) => /* @__PURE__ */ jsx("text", {
316
- className: `r-otter-indicator__z${late}`,
317
- x: i === 0 ? 38 : 43,
318
- y: i === 0 ? 15 : 9,
319
- fontSize: i === 0 ? 9 : 7,
320
- fontWeight: "700",
321
- fill: "var(--foreground-muted, currentColor)",
322
- children: "z"
323
- }, late))
324
- ]
325
- }),
326
- /* @__PURE__ */ jsx(Badge, { status })
327
- ]
36
+ })
37
+ }, `art-${status}`), status === "error" && /* @__PURE__ */ jsx("svg", {
38
+ viewBox: "0 0 48 48",
39
+ width: "100%",
40
+ height: "100%",
41
+ overflow: "visible",
42
+ children: /* @__PURE__ */ jsx("text", {
43
+ className: "r-otter-indicator__question",
44
+ x: "40.3",
45
+ y: "11.4",
46
+ fontSize: "11.4",
47
+ fontWeight: "800",
48
+ transform: "rotate(10 40.3 11.4)",
49
+ children: "?"
50
+ }, `question-${status}`)
51
+ })]
328
52
  });
329
53
  }
330
54
  //#endregion