@actioneer/ads 0.5.7 → 0.5.9
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/bin/ads-init.mjs +6 -0
- package/components/accordion.js +50 -48
- package/components/agent-icon.d.ts +12 -0
- package/components/agent-icon.js +133 -120
- package/components/ai-elements/chain-of-thought.d.ts +1 -1
- package/components/ai-elements/chain-of-thought.js +108 -108
- package/components/ai-elements/chart.js +16 -14
- package/components/ai-elements/inline-citation.js +41 -41
- package/components/ai-elements/message.js +4 -4
- package/components/ai-elements/queue.js +7 -7
- package/components/ai-elements/research-activity.js +114 -114
- package/components/ai-elements/shimmer.d.ts +2 -2
- package/components/ai-elements/speech-input.js +28 -28
- package/components/ai-elements/task-progress.js +26 -16
- package/components/ai-elements/task.js +17 -17
- package/components/ai-elements/tool.js +6 -6
- package/components/ai-elements/transcript.js +6 -5
- package/components/ai-elements/voice.js +1 -1
- package/components/alert.js +10 -10
- package/components/answer-sources.js +1 -1
- package/components/answer.js +115 -114
- package/components/assistant-ui/action-bar.js +94 -48
- package/components/assistant-ui/attachment.js +103 -75
- package/components/assistant-ui/badge.d.ts +1 -1
- package/components/assistant-ui/badge.js +17 -17
- package/components/assistant-ui/chain-of-thought.d.ts +1 -1
- package/components/assistant-ui/composer-add-context.js +9 -9
- package/components/assistant-ui/composer-deep-research.js +5 -5
- package/components/assistant-ui/composer-harness.js +11 -9
- package/components/assistant-ui/composer-trigger-popover.js +45 -34
- package/components/assistant-ui/composer.js +59 -59
- package/components/assistant-ui/error.js +14 -14
- package/components/assistant-ui/file.d.ts +1 -1
- package/components/assistant-ui/image.d.ts +1 -1
- package/components/assistant-ui/image.js +113 -103
- package/components/assistant-ui/markdown-text.js +18 -18
- package/components/assistant-ui/message.js +46 -45
- package/components/assistant-ui/quote.js +1 -1
- package/components/assistant-ui/reasoning.d.ts +1 -1
- package/components/assistant-ui/reasoning.js +66 -77
- package/components/assistant-ui/suggestions.js +4 -4
- package/components/assistant-ui/thread.js +22 -22
- package/components/assistant-ui/tool-fallback.js +60 -63
- package/components/assistant-ui/tool-group.d.ts +1 -1
- package/components/assistant-ui/tool-group.js +36 -42
- package/components/audio-waveform.js +25 -24
- package/components/autocomplete.d.ts +1 -0
- package/components/autocomplete.js +45 -43
- package/components/avatar.d.ts +1 -0
- package/components/avatar.js +27 -26
- package/components/badge.d.ts +1 -1
- package/components/breadcrumbs.d.ts +2 -0
- package/components/breadcrumbs.js +52 -50
- package/components/button.d.ts +2 -2
- package/components/button.js +22 -20
- package/components/card.js +8 -8
- package/components/carousel.js +105 -104
- package/components/chart.d.ts +6 -0
- package/components/chart.js +743 -672
- package/components/checkbox.js +74 -38
- package/components/chip.d.ts +1 -1
- package/components/code-block.js +3 -3
- package/components/collapsible.js +67 -23
- package/components/connector-card.js +6 -6
- package/components/drawer.d.ts +18 -11
- package/components/drawer.js +81 -78
- package/components/dropdown.d.ts +2 -0
- package/components/dropdown.js +88 -79
- package/components/empty-state.d.ts +1 -1
- package/components/empty-state.js +7 -7
- package/components/field.d.ts +4 -0
- package/components/field.js +45 -34
- package/components/file-dropzone.js +12 -12
- package/components/index.d.ts +3 -0
- package/components/index.js +584 -558
- package/components/input-field.js +51 -46
- package/components/input.js +20 -20
- package/components/link.js +9 -9
- package/components/modal.d.ts +5 -1
- package/components/modal.js +121 -76
- package/components/navbar.d.ts +1 -1
- package/components/navbar.js +1 -1
- package/components/number-field.js +38 -29
- package/components/page-header.js +12 -12
- package/components/pagination.js +19 -19
- package/components/panel.js +2 -2
- package/components/pixel-blast-svg.js +3 -3
- package/components/pixel-icon.d.ts +4 -0
- package/components/pixel-icon.js +210 -164
- package/components/popover.d.ts +1 -1
- package/components/popover.js +66 -64
- package/components/progress-circle.js +36 -32
- package/components/progress.js +28 -24
- package/components/radio.js +59 -49
- package/components/resizable-panel.js +1 -1
- package/components/reveal.d.ts +2 -2
- package/components/ripple.d.ts +3 -3
- package/components/scroll-area.js +17 -16
- package/components/segmented.d.ts +1 -0
- package/components/segmented.js +39 -36
- package/components/select.d.ts +7 -0
- package/components/select.js +186 -137
- package/components/setting-row.js +45 -42
- package/components/sidebar.js +131 -127
- package/components/skeleton.js +5 -5
- package/components/spinner.d.ts +13 -4
- package/components/spinner.js +42 -42
- package/components/stepper.js +21 -21
- package/components/switch.js +41 -39
- package/components/table.d.ts +16 -0
- package/components/table.js +393 -260
- package/components/tabs.js +149 -137
- package/components/toast.js +66 -66
- package/components/tooltip.js +2 -2
- package/components/tree.js +62 -51
- package/components/typography.d.ts +2 -1
- package/components/typography.js +33 -32
- package/components/ui/button.d.ts +2 -2
- package/components/ui/button.js +19 -19
- package/components/ui/collapsible.d.ts +1 -5
- package/components/ui/dialog.d.ts +3 -3
- package/components/ui/dialog.js +95 -58
- package/components/ui/tooltip.d.ts +2 -2
- package/components/ui/tooltip.js +67 -33
- package/components/viz-charts.js +95 -95
- package/demo/components/add-to-artifact.js +363 -0
- package/demo/lib/artifact-library.js +142 -0
- package/demo/lib/artifact-pin-guard.js +12 -0
- package/fonts/aribau-grotesk-medium.woff2 +0 -0
- package/fonts/aribau-grotesk-regular.woff2 +0 -0
- package/fonts.css +11 -11
- package/hooks/agents-ui/use-agent-audio-visualizer-aura.js +17 -16
- package/hooks/agents-ui/use-agent-audio-visualizer-wave.js +21 -20
- package/lib/icons.d.ts +24 -0
- package/lib/icons.js +114 -108
- package/lib/motion.d.ts +42 -39
- package/lib/motion.js +112 -52
- package/lib/spinner-mark.d.ts +9 -0
- package/lib/spinner-mark.js +98 -0
- package/llms.txt +53 -19
- package/manifest.json +258 -36
- package/package.json +1 -1
- package/styles.css +143 -124
- package/theme.css +90 -93
- package/components/ui/collapsible.js +0 -35
- package/fonts/aribau-grotesk-500.otf +0 -0
- package/fonts/aribau-grotesk-600.woff2 +0 -0
|
@@ -1,67 +1,76 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as k, jsx as
|
|
2
|
+
import { jsxs as k, jsx as s } from "react/jsx-runtime";
|
|
3
3
|
import * as M from "react";
|
|
4
4
|
import { Minus as _, Plus as j } from "../lib/icons.js";
|
|
5
|
-
import { cn as
|
|
5
|
+
import { cn as a } from "../lib/cn.js";
|
|
6
6
|
import { inputBaseClass as h } from "./field.js";
|
|
7
7
|
const D = {
|
|
8
|
-
sm: {
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
sm: {
|
|
9
|
+
field: "h-8 rounded-sm text-xs",
|
|
10
|
+
btn: "size-8 rounded-sm [&_svg]:size-3.5"
|
|
11
|
+
},
|
|
12
|
+
md: {
|
|
13
|
+
field: "h-10 rounded-md text-xs",
|
|
14
|
+
btn: "size-10 rounded-md [&_svg]:size-4"
|
|
15
|
+
},
|
|
16
|
+
lg: {
|
|
17
|
+
field: "h-11 rounded-md text-base",
|
|
18
|
+
btn: "size-11 rounded-md [&_svg]:size-4"
|
|
19
|
+
}
|
|
11
20
|
}, F = M.forwardRef(
|
|
12
21
|
({
|
|
13
22
|
className: v,
|
|
14
|
-
value:
|
|
23
|
+
value: c,
|
|
15
24
|
onChange: t,
|
|
16
25
|
min: i,
|
|
17
|
-
max:
|
|
18
|
-
step:
|
|
26
|
+
max: n,
|
|
27
|
+
step: l = 1,
|
|
19
28
|
size: x = "md",
|
|
20
29
|
isInvalid: N,
|
|
21
30
|
disabled: o,
|
|
22
31
|
...z
|
|
23
32
|
}, w) => {
|
|
24
|
-
const u = D[x], b = (
|
|
25
|
-
let e =
|
|
26
|
-
return i !== void 0 && (e = Math.max(i, e)),
|
|
27
|
-
},
|
|
33
|
+
const u = D[x], b = (r) => {
|
|
34
|
+
let e = r;
|
|
35
|
+
return i !== void 0 && (e = Math.max(i, e)), n !== void 0 && (e = Math.min(n, e)), e;
|
|
36
|
+
}, d = c ?? 0, y = !o && (i === void 0 || d > i), g = !o && (n === void 0 || d < n), m = (r) => t == null ? void 0 : t(b(d + r * l)), p = a(
|
|
28
37
|
"inline-flex items-center justify-center rounded-md border border-input bg-elevated text-foreground",
|
|
29
|
-
"transition-[background,box-shadow] duration-
|
|
38
|
+
"transition-[background,box-shadow] duration-150 hover:bg-muted",
|
|
30
39
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
31
40
|
"disabled:pointer-events-none disabled:opacity-50",
|
|
32
41
|
u.btn
|
|
33
42
|
);
|
|
34
|
-
return /* @__PURE__ */ k("div", { className:
|
|
35
|
-
/* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ k("div", { className: a("inline-flex items-center gap-1.5", v), children: [
|
|
44
|
+
/* @__PURE__ */ s(
|
|
36
45
|
"button",
|
|
37
46
|
{
|
|
38
47
|
type: "button",
|
|
39
48
|
"aria-label": "Decrease",
|
|
40
49
|
disabled: !y,
|
|
41
|
-
onClick: () =>
|
|
42
|
-
className:
|
|
43
|
-
children: /* @__PURE__ */
|
|
50
|
+
onClick: () => m(-1),
|
|
51
|
+
className: p,
|
|
52
|
+
children: /* @__PURE__ */ s(_, {})
|
|
44
53
|
}
|
|
45
54
|
),
|
|
46
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ s(
|
|
47
56
|
"input",
|
|
48
57
|
{
|
|
49
58
|
ref: w,
|
|
50
59
|
type: "number",
|
|
51
60
|
inputMode: "numeric",
|
|
52
|
-
value:
|
|
61
|
+
value: c ?? "",
|
|
53
62
|
min: i,
|
|
54
|
-
max:
|
|
55
|
-
step:
|
|
63
|
+
max: n,
|
|
64
|
+
step: l,
|
|
56
65
|
disabled: o,
|
|
57
66
|
"aria-invalid": N || void 0,
|
|
58
|
-
onChange: (
|
|
59
|
-
const e =
|
|
67
|
+
onChange: (r) => {
|
|
68
|
+
const e = r.target.value;
|
|
60
69
|
if (e === "") return;
|
|
61
70
|
const f = Number(e);
|
|
62
71
|
Number.isNaN(f) || t == null || t(b(f));
|
|
63
72
|
},
|
|
64
|
-
className:
|
|
73
|
+
className: a(
|
|
65
74
|
h,
|
|
66
75
|
"w-20 text-center [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
|
|
67
76
|
u.field
|
|
@@ -69,15 +78,15 @@ const D = {
|
|
|
69
78
|
...z
|
|
70
79
|
}
|
|
71
80
|
),
|
|
72
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ s(
|
|
73
82
|
"button",
|
|
74
83
|
{
|
|
75
84
|
type: "button",
|
|
76
85
|
"aria-label": "Increase",
|
|
77
86
|
disabled: !g,
|
|
78
|
-
onClick: () =>
|
|
79
|
-
className:
|
|
80
|
-
children: /* @__PURE__ */
|
|
87
|
+
onClick: () => m(1),
|
|
88
|
+
className: p,
|
|
89
|
+
children: /* @__PURE__ */ s(j, {})
|
|
81
90
|
}
|
|
82
91
|
)
|
|
83
92
|
] });
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import * as
|
|
3
|
+
import * as o from "react";
|
|
4
4
|
import { ArrowLeft as d } from "../lib/icons.js";
|
|
5
5
|
import { cn as f } from "../lib/cn.js";
|
|
6
6
|
import { Button as h } from "./button.js";
|
|
7
|
-
const x =
|
|
7
|
+
const x = o.forwardRef(
|
|
8
8
|
({
|
|
9
|
-
className:
|
|
10
|
-
title:
|
|
9
|
+
className: m,
|
|
10
|
+
title: s,
|
|
11
11
|
description: r,
|
|
12
12
|
onBack: a,
|
|
13
|
-
backLabel:
|
|
13
|
+
backLabel: n = "Back",
|
|
14
14
|
actions: i,
|
|
15
|
-
...
|
|
16
|
-
},
|
|
15
|
+
...l
|
|
16
|
+
}, c) => /* @__PURE__ */ t(
|
|
17
17
|
"header",
|
|
18
18
|
{
|
|
19
|
-
ref:
|
|
19
|
+
ref: c,
|
|
20
20
|
className: f(
|
|
21
21
|
"flex min-w-0 items-start justify-between gap-4",
|
|
22
|
-
|
|
22
|
+
m
|
|
23
23
|
),
|
|
24
|
-
...
|
|
24
|
+
...l,
|
|
25
25
|
children: [
|
|
26
26
|
/* @__PURE__ */ t("div", { className: "flex min-w-0 items-start gap-2", children: [
|
|
27
27
|
a && /* @__PURE__ */ e(
|
|
@@ -30,14 +30,14 @@ const x = c.forwardRef(
|
|
|
30
30
|
type: "button",
|
|
31
31
|
size: "icon-sm",
|
|
32
32
|
variant: "ghost",
|
|
33
|
-
"aria-label":
|
|
33
|
+
"aria-label": n,
|
|
34
34
|
className: "shrink-0",
|
|
35
35
|
onClick: a,
|
|
36
36
|
children: /* @__PURE__ */ e(d, { "aria-hidden": !0 })
|
|
37
37
|
}
|
|
38
38
|
),
|
|
39
39
|
/* @__PURE__ */ t("div", { className: "min-w-0", children: [
|
|
40
|
-
/* @__PURE__ */ e("h1", { className: "flex min-h-8 items-center text-xl font-
|
|
40
|
+
/* @__PURE__ */ e("h1", { className: "flex min-h-8 items-center text-xl font-medium tracking-tight text-foreground", children: s }),
|
|
41
41
|
r && /* @__PURE__ */ e("p", { className: "mt-1 max-w-2xl text-xs text-muted-foreground", children: r })
|
|
42
42
|
] })
|
|
43
43
|
] }),
|
package/components/pagination.js
CHANGED
|
@@ -12,7 +12,7 @@ function p(e, r) {
|
|
|
12
12
|
function E(e, r, t) {
|
|
13
13
|
if (t * 2 + 5 >= e)
|
|
14
14
|
return p(1, e);
|
|
15
|
-
const m = Math.max(r - t, 1),
|
|
15
|
+
const m = Math.max(r - t, 1), s = Math.min(r + t, e), d = m > 2, a = s < e - 1;
|
|
16
16
|
if (!d && a) {
|
|
17
17
|
const c = t * 2 + 3;
|
|
18
18
|
return [...p(1, c), "end-ellipsis", e];
|
|
@@ -24,7 +24,7 @@ function E(e, r, t) {
|
|
|
24
24
|
return [
|
|
25
25
|
1,
|
|
26
26
|
"start-ellipsis",
|
|
27
|
-
...p(m,
|
|
27
|
+
...p(m, s),
|
|
28
28
|
"end-ellipsis",
|
|
29
29
|
e
|
|
30
30
|
];
|
|
@@ -32,7 +32,7 @@ function E(e, r, t) {
|
|
|
32
32
|
const A = (e) => o(
|
|
33
33
|
"inline-flex items-center justify-center rounded-md font-normal",
|
|
34
34
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
35
|
-
"transition active:scale-
|
|
35
|
+
"transition active:scale-[0.97] motion-reduce:transition-none motion-reduce:active:scale-100",
|
|
36
36
|
"disabled:pointer-events-none disabled:opacity-40",
|
|
37
37
|
e === "sm" ? "size-7 text-xs" : "size-9 text-xs"
|
|
38
38
|
), N = (e) => e === "sm" ? "w-auto gap-1.5 px-2" : "w-auto gap-1.5 px-2.5", F = j.forwardRef(
|
|
@@ -42,7 +42,7 @@ const A = (e) => o(
|
|
|
42
42
|
page: t,
|
|
43
43
|
onChange: i,
|
|
44
44
|
siblings: m = 1,
|
|
45
|
-
size:
|
|
45
|
+
size: s = "md",
|
|
46
46
|
summary: d,
|
|
47
47
|
labels: a = !1,
|
|
48
48
|
pageSize: c,
|
|
@@ -51,7 +51,7 @@ const A = (e) => o(
|
|
|
51
51
|
...C
|
|
52
52
|
}, y) => {
|
|
53
53
|
if (r <= 0) return null;
|
|
54
|
-
const P = E(r, t, m), R = t <= 1, S = t >= r, f = A(
|
|
54
|
+
const P = E(r, t, m), R = t <= 1, S = t >= r, f = A(s), x = s === "sm" ? "size-3.5" : "size-4", h = c != null && !!g, b = d != null || h;
|
|
55
55
|
return /* @__PURE__ */ u(
|
|
56
56
|
"nav",
|
|
57
57
|
{
|
|
@@ -90,12 +90,12 @@ const A = (e) => o(
|
|
|
90
90
|
size: "sm",
|
|
91
91
|
className: "w-18",
|
|
92
92
|
placement: "top",
|
|
93
|
-
items: (w ?? [8, 16, 32]).map((
|
|
94
|
-
label: String(
|
|
95
|
-
value: String(
|
|
93
|
+
items: (w ?? [8, 16, 32]).map((n) => ({
|
|
94
|
+
label: String(n),
|
|
95
|
+
value: String(n)
|
|
96
96
|
})),
|
|
97
97
|
value: String(c),
|
|
98
|
-
onChange: (
|
|
98
|
+
onChange: (n) => g(Number(n))
|
|
99
99
|
}
|
|
100
100
|
)
|
|
101
101
|
]
|
|
@@ -112,7 +112,7 @@ const A = (e) => o(
|
|
|
112
112
|
className: o(
|
|
113
113
|
f,
|
|
114
114
|
"text-foreground hover:bg-muted",
|
|
115
|
-
a && N(
|
|
115
|
+
a && N(s)
|
|
116
116
|
),
|
|
117
117
|
children: [
|
|
118
118
|
/* @__PURE__ */ l(k, { className: x, "aria-hidden": !0 }),
|
|
@@ -120,8 +120,8 @@ const A = (e) => o(
|
|
|
120
120
|
]
|
|
121
121
|
}
|
|
122
122
|
),
|
|
123
|
-
P.map((
|
|
124
|
-
if (
|
|
123
|
+
P.map((n) => {
|
|
124
|
+
if (n === "start-ellipsis" || n === "end-ellipsis")
|
|
125
125
|
return /* @__PURE__ */ l(
|
|
126
126
|
"span",
|
|
127
127
|
{
|
|
@@ -129,23 +129,23 @@ const A = (e) => o(
|
|
|
129
129
|
className: o(f, "text-muted-foreground"),
|
|
130
130
|
children: /* @__PURE__ */ l(L, { className: x })
|
|
131
131
|
},
|
|
132
|
-
|
|
132
|
+
n
|
|
133
133
|
);
|
|
134
|
-
const v =
|
|
134
|
+
const v = n === t;
|
|
135
135
|
return /* @__PURE__ */ l(
|
|
136
136
|
"button",
|
|
137
137
|
{
|
|
138
138
|
type: "button",
|
|
139
|
-
"aria-label": `Go to page ${
|
|
139
|
+
"aria-label": `Go to page ${n}`,
|
|
140
140
|
"aria-current": v ? "page" : void 0,
|
|
141
|
-
onClick: () => i(
|
|
141
|
+
onClick: () => i(n),
|
|
142
142
|
className: o(
|
|
143
143
|
f,
|
|
144
144
|
v ? "bg-foreground text-background" : "text-foreground hover:bg-muted"
|
|
145
145
|
),
|
|
146
|
-
children:
|
|
146
|
+
children: n
|
|
147
147
|
},
|
|
148
|
-
|
|
148
|
+
n
|
|
149
149
|
);
|
|
150
150
|
}),
|
|
151
151
|
/* @__PURE__ */ u(
|
|
@@ -158,7 +158,7 @@ const A = (e) => o(
|
|
|
158
158
|
className: o(
|
|
159
159
|
f,
|
|
160
160
|
"text-foreground hover:bg-muted",
|
|
161
|
-
a && N(
|
|
161
|
+
a && N(s)
|
|
162
162
|
),
|
|
163
163
|
children: [
|
|
164
164
|
a && "Next",
|
package/components/panel.js
CHANGED
|
@@ -37,7 +37,7 @@ const d = l.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ o(
|
|
|
37
37
|
"h2",
|
|
38
38
|
{
|
|
39
39
|
ref: r,
|
|
40
|
-
className: n("flex min-w-0 items-center gap-2 truncate text-xs font-
|
|
40
|
+
className: n("flex min-w-0 items-center gap-2 truncate text-xs font-medium text-foreground", e),
|
|
41
41
|
...a
|
|
42
42
|
}
|
|
43
43
|
));
|
|
@@ -47,7 +47,7 @@ const i = l.forwardRef(
|
|
|
47
47
|
);
|
|
48
48
|
i.displayName = "PanelToolbar";
|
|
49
49
|
const f = l.forwardRef(
|
|
50
|
-
({ className: e, ...a }, r) => /* @__PURE__ */ o("div", { ref: r, className: n("min-h-0 flex-1 overflow-auto p-4", e), ...a })
|
|
50
|
+
({ className: e, ...a }, r) => /* @__PURE__ */ o("div", { ref: r, tabIndex: 0, className: n("min-h-0 flex-1 overflow-auto p-4", e), ...a })
|
|
51
51
|
);
|
|
52
52
|
f.displayName = "PanelBody";
|
|
53
53
|
const m = l.forwardRef(
|
|
@@ -13,7 +13,7 @@ const z = {
|
|
|
13
13
|
preserveDrawingBuffer: !1
|
|
14
14
|
}, O = 1e6, B = `uniform float u_type;
|
|
15
15
|
uniform float u_patternDensity;
|
|
16
|
-
uniform float u_pixelSizeJitter;`, k = " float res = step(.5, shape + dithering);",
|
|
16
|
+
uniform float u_pixelSizeJitter;`, k = " float res = step(.5, shape + dithering);", G = ` vec2 triangleUV = fract(pxSizeUV);
|
|
17
17
|
vec2 triangleCell = floor(pxSizeUV);
|
|
18
18
|
float triangleFlip = mod(triangleCell.x + triangleCell.y, 2.0);
|
|
19
19
|
triangleUV.x = mix(triangleUV.x, 1.0 - triangleUV.x, triangleFlip);
|
|
@@ -31,7 +31,7 @@ uniform float u_pixelSizeJitter;`, k = " float res = step(.5, shape + dithering
|
|
|
31
31
|
float res = step(densityThreshold, shape + dithering) * triangleMask;`;
|
|
32
32
|
if (!g.includes("uniform float u_type;") || !g.includes(k))
|
|
33
33
|
throw new Error("The Paper dithering shader no longer exposes the expected cell output.");
|
|
34
|
-
const
|
|
34
|
+
const b = g.replace("uniform float u_type;", B).replace(k, G), d = (e) => Math.max(0, Math.min(1, e)), J = "#202020", W = "#ffffff";
|
|
35
35
|
function X(e, t) {
|
|
36
36
|
if (typeof document > "u") return t;
|
|
37
37
|
const r = (o, i = 0) => {
|
|
@@ -132,7 +132,7 @@ const $ = c.forwardRef(
|
|
|
132
132
|
className: "size-full",
|
|
133
133
|
width: "100%",
|
|
134
134
|
height: "100%",
|
|
135
|
-
fragmentShader:
|
|
135
|
+
fragmentShader: b,
|
|
136
136
|
uniforms: A,
|
|
137
137
|
speed: x || S ? 0 : o,
|
|
138
138
|
minPixelRatio: 1,
|
|
@@ -22,6 +22,10 @@ export interface PixelIconProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
22
22
|
motionMode?: number;
|
|
23
23
|
/** Optional hover/click accent. Defaults to the standard green interaction color. */
|
|
24
24
|
interactionColor?: string;
|
|
25
|
+
/** Optional 1–10 color ramp. Short ramps repeat to fill the ten tile shades. */
|
|
26
|
+
palette?: readonly string[];
|
|
27
|
+
/** Whether interaction is limited to filled tiles or spans the whole icon surface. */
|
|
28
|
+
interactionArea?: "tiles" | "surface";
|
|
25
29
|
/** Larger hero rendering (broader hatch, mode 3). */
|
|
26
30
|
hero?: boolean;
|
|
27
31
|
}
|