@actioneer/ads 0.5.4 → 0.5.6
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/components/accordion.js +15 -15
- package/components/agent-icon.d.ts +64 -0
- package/components/agent-icon.js +251 -0
- package/components/ai-elements/agent-trace.d.ts +8 -1
- package/components/ai-elements/agent-trace.js +164 -129
- package/components/ai-elements/chain-of-thought-icon.d.ts +42 -0
- package/components/ai-elements/chain-of-thought-icon.js +283 -0
- package/components/ai-elements/chain-of-thought.js +7 -7
- package/components/ai-elements/chart.js +38 -35
- package/components/ai-elements/index.d.ts +1 -0
- package/components/ai-elements/inline-citation.js +40 -40
- package/components/ai-elements/message.js +5 -5
- package/components/ai-elements/queue.js +1 -1
- package/components/ai-elements/research-activity.d.ts +2 -0
- package/components/ai-elements/research-activity.js +79 -81
- package/components/ai-elements/task-progress.js +2 -2
- package/components/ai-elements/tool.d.ts +4 -2
- package/components/ai-elements/tool.js +74 -54
- package/components/ai-elements/transcript.js +1 -1
- package/components/alert.js +1 -1
- package/components/answer.d.ts +2644 -311
- package/components/answer.js +1776 -371
- package/components/assistant-ui/answer-tool-ui.js +27 -28
- package/components/assistant-ui/chain-of-thought.d.ts +7 -2
- package/components/assistant-ui/composer-harness.js +20 -16
- package/components/assistant-ui/follow-up-suggestions.d.ts +5 -1
- package/components/assistant-ui/follow-up-suggestions.js +47 -19
- package/components/assistant-ui/reasoning.js +35 -31
- package/components/assistant-ui/tool-fallback.js +125 -122
- package/components/assistant-ui/tool-group.d.ts +3 -1
- package/components/assistant-ui/tool-group.js +48 -43
- package/components/audio-waveform.js +14 -14
- package/components/autocomplete.js +52 -48
- package/components/avatar.js +58 -44
- package/components/badge.js +3 -3
- package/components/brand-texture.js +1 -1
- package/components/breadcrumbs.d.ts +27 -1
- package/components/breadcrumbs.js +94 -42
- package/components/button.js +15 -15
- package/components/carousel.js +10 -10
- package/components/chart.js +77 -77
- package/components/chip.js +3 -3
- package/components/code-block.d.ts +39 -17
- package/components/code-block.js +153 -104
- package/components/command-palette.js +27 -25
- package/components/connector-card.js +2 -2
- package/components/dropdown.js +65 -61
- package/components/empty-state.js +15 -15
- package/components/field.js +16 -16
- package/components/index.d.ts +4 -0
- package/components/index.js +525 -478
- package/components/infinite-canvas.js +60 -60
- package/components/kbd.js +6 -6
- package/components/link.js +6 -6
- package/components/modal.js +22 -20
- package/components/page-header.js +1 -1
- package/components/pagination.js +22 -22
- package/components/pixel-blast-svg.js +1 -1
- package/components/pixel-icon.d.ts +31 -0
- package/components/pixel-icon.js +733 -0
- package/components/popover.js +46 -42
- package/components/ripple.d.ts +29 -0
- package/components/ripple.js +17 -0
- package/components/segmented.js +24 -23
- package/components/select.js +71 -67
- package/components/selection-action-bar.js +22 -22
- package/components/sidebar.d.ts +11 -3
- package/components/sidebar.js +161 -148
- package/components/stepper.d.ts +2 -0
- package/components/stepper.js +80 -43
- package/components/table.d.ts +7 -0
- package/components/table.js +223 -155
- package/components/tabs.d.ts +3 -1
- package/components/tabs.js +165 -144
- package/components/textarea.js +10 -8
- package/components/toast.js +48 -46
- package/components/tooltip.js +61 -59
- package/components/tree.js +44 -41
- package/components/typography.d.ts +1 -1
- package/components/typography.js +25 -25
- package/components/viz-charts.js +133 -133
- package/fonts/aribau-grotesk-500.otf +0 -0
- package/fonts/aribau-grotesk-600.woff2 +0 -0
- package/fonts.css +6 -4
- package/lib/icons.d.ts +411 -402
- package/lib/icons.js +109 -107
- package/llms.txt +98 -8
- package/manifest.json +1012 -96
- package/package.json +5 -5
- package/styles.css +206 -81
- package/theme.css +200 -77
- package/fonts/aribau-grotesk-400.otf +0 -0
- package/fonts/aribau-grotesk-700.otf +0 -0
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as e, jsxs as b } from "react/jsx-runtime";
|
|
3
3
|
import * as n from "react";
|
|
4
4
|
import { MarkerType as U, ReactFlow as Z, Background as j, BackgroundVariant as H, Panel as h, useReactFlow as K, useStore as V } from "@xyflow/react";
|
|
5
|
-
import { BaseEdge as
|
|
5
|
+
import { BaseEdge as he, EdgeLabelRenderer as xe, Handle as Ee, MarkerType as ke, Position as ye, ReactFlowProvider as De, addEdge as _e, getBezierPath as we, getSmoothStepPath as Ie, getStraightPath as Re, useEdgesState as Se, useNodesState as Ae, useReactFlow as Ce } from "@xyflow/react";
|
|
6
6
|
import "@xyflow/react/dist/style.css";
|
|
7
7
|
import { cn as W } from "../lib/cn.js";
|
|
8
8
|
import { Minus as q, Plus as J, Maximize as Q, Magnet as X } from "../lib/icons.js";
|
|
9
9
|
import { Button as a } from "./button.js";
|
|
10
|
-
const
|
|
11
|
-
function v(
|
|
12
|
-
return typeof window > "u" || !window.matchMedia ?
|
|
10
|
+
const x = 16, Y = 1.2, $ = [x, x], ee = 1.4, w = 18, oe = 6, te = [8, 4], re = 11, I = 150, ae = 200, ne = 0.28, R = "var(--canvas-edge)";
|
|
11
|
+
function v(o) {
|
|
12
|
+
return typeof window > "u" || !window.matchMedia ? o : window.matchMedia("(prefers-reduced-motion: reduce)").matches ? 0 : o;
|
|
13
13
|
}
|
|
14
|
-
const
|
|
14
|
+
const le = {
|
|
15
15
|
markerEnd: {
|
|
16
16
|
type: U.ArrowClosed,
|
|
17
17
|
width: w,
|
|
18
18
|
height: w,
|
|
19
19
|
color: R
|
|
20
20
|
},
|
|
21
|
-
style: { stroke: R, strokeWidth:
|
|
22
|
-
labelStyle: { fill: "var(--color-foreground)", fontSize:
|
|
21
|
+
style: { stroke: R, strokeWidth: ee },
|
|
22
|
+
labelStyle: { fill: "var(--color-foreground)", fontSize: re },
|
|
23
23
|
labelBgStyle: { fill: "var(--color-background)" },
|
|
24
|
-
labelBgPadding:
|
|
25
|
-
labelBgBorderRadius:
|
|
26
|
-
},
|
|
24
|
+
labelBgPadding: te,
|
|
25
|
+
labelBgBorderRadius: oe
|
|
26
|
+
}, ie = [
|
|
27
27
|
"relative size-full overflow-hidden bg-background",
|
|
28
28
|
"[--xy-background-color-default:var(--color-background)]",
|
|
29
|
-
"[--xy-edge-stroke-default:var(--
|
|
29
|
+
"[--xy-edge-stroke-default:var(--canvas-edge)]",
|
|
30
30
|
"[--xy-edge-stroke-selected-default:var(--color-foreground)]",
|
|
31
31
|
"[--xy-edge-label-background-color-default:var(--color-background)]",
|
|
32
32
|
"[--xy-edge-label-color-default:var(--color-foreground)]",
|
|
33
|
-
"[--xy-connectionline-stroke-default:var(--
|
|
33
|
+
"[--xy-connectionline-stroke-default:var(--canvas-edge)]",
|
|
34
34
|
"[--xy-handle-background-color-default:var(--color-background)]",
|
|
35
35
|
"[--xy-handle-border-color-default:var(--color-border-strong)]",
|
|
36
36
|
"[--xy-selection-background-color-default:var(--color-muted)]",
|
|
@@ -39,19 +39,19 @@ const lo = {
|
|
|
39
39
|
"[--xy-node-border-default:var(--color-border)]"
|
|
40
40
|
].join(" ");
|
|
41
41
|
function S({
|
|
42
|
-
fitViewPadding:
|
|
42
|
+
fitViewPadding: o,
|
|
43
43
|
showSnapToGrid: l,
|
|
44
44
|
snapToGrid: t,
|
|
45
45
|
onSnapToGridChange: i
|
|
46
46
|
}) {
|
|
47
|
-
const { zoomIn: s, zoomOut: c, fitView: d } = K(), u = V((
|
|
47
|
+
const { zoomIn: s, zoomOut: c, fitView: d } = K(), u = V((g) => g.transform[2]);
|
|
48
48
|
return /* @__PURE__ */ b(
|
|
49
49
|
h,
|
|
50
50
|
{
|
|
51
51
|
position: "bottom-right",
|
|
52
52
|
className: "m-3 flex items-center gap-0.5 rounded-lg bg-elevated p-1 shadow-elevation",
|
|
53
53
|
children: [
|
|
54
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ e(
|
|
55
55
|
a,
|
|
56
56
|
{
|
|
57
57
|
type: "button",
|
|
@@ -59,7 +59,7 @@ function S({
|
|
|
59
59
|
variant: "ghost",
|
|
60
60
|
"aria-label": "Zoom out",
|
|
61
61
|
onClick: () => void c({ duration: v(I) }),
|
|
62
|
-
children: /* @__PURE__ */
|
|
62
|
+
children: /* @__PURE__ */ e(q, {})
|
|
63
63
|
}
|
|
64
64
|
),
|
|
65
65
|
/* @__PURE__ */ b(
|
|
@@ -73,7 +73,7 @@ function S({
|
|
|
73
73
|
]
|
|
74
74
|
}
|
|
75
75
|
),
|
|
76
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ e(
|
|
77
77
|
a,
|
|
78
78
|
{
|
|
79
79
|
type: "button",
|
|
@@ -81,10 +81,10 @@ function S({
|
|
|
81
81
|
variant: "ghost",
|
|
82
82
|
"aria-label": "Zoom in",
|
|
83
83
|
onClick: () => void s({ duration: v(I) }),
|
|
84
|
-
children: /* @__PURE__ */
|
|
84
|
+
children: /* @__PURE__ */ e(J, {})
|
|
85
85
|
}
|
|
86
86
|
),
|
|
87
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ e(
|
|
88
88
|
a,
|
|
89
89
|
{
|
|
90
90
|
type: "button",
|
|
@@ -92,13 +92,13 @@ function S({
|
|
|
92
92
|
variant: "ghost",
|
|
93
93
|
"aria-label": "Fit to view",
|
|
94
94
|
onClick: () => void d({
|
|
95
|
-
padding:
|
|
96
|
-
duration: v(
|
|
95
|
+
padding: o,
|
|
96
|
+
duration: v(ae)
|
|
97
97
|
}),
|
|
98
|
-
children: /* @__PURE__ */
|
|
98
|
+
children: /* @__PURE__ */ e(Q, {})
|
|
99
99
|
}
|
|
100
100
|
),
|
|
101
|
-
l && /* @__PURE__ */
|
|
101
|
+
l && /* @__PURE__ */ e(
|
|
102
102
|
a,
|
|
103
103
|
{
|
|
104
104
|
type: "button",
|
|
@@ -107,7 +107,7 @@ function S({
|
|
|
107
107
|
"aria-label": "Snap to grid",
|
|
108
108
|
"aria-pressed": t,
|
|
109
109
|
onClick: () => i(!t),
|
|
110
|
-
children: /* @__PURE__ */
|
|
110
|
+
children: /* @__PURE__ */ e(X, {})
|
|
111
111
|
}
|
|
112
112
|
)
|
|
113
113
|
]
|
|
@@ -115,8 +115,8 @@ function S({
|
|
|
115
115
|
);
|
|
116
116
|
}
|
|
117
117
|
S.displayName = "CanvasControls";
|
|
118
|
-
function
|
|
119
|
-
className:
|
|
118
|
+
function se({
|
|
119
|
+
className: o,
|
|
120
120
|
nodes: l,
|
|
121
121
|
edges: t,
|
|
122
122
|
nodeTypes: i,
|
|
@@ -124,22 +124,22 @@ function so({
|
|
|
124
124
|
onNodesChange: c,
|
|
125
125
|
onEdgesChange: d,
|
|
126
126
|
onNodeClick: u,
|
|
127
|
-
onPaneClick:
|
|
127
|
+
onPaneClick: g,
|
|
128
128
|
onInit: A,
|
|
129
|
-
readOnly:
|
|
129
|
+
readOnly: f = !1,
|
|
130
130
|
minZoom: C = 0.25,
|
|
131
131
|
maxZoom: N = 1.6,
|
|
132
|
-
fitViewPadding: m =
|
|
133
|
-
snapToGrid:
|
|
132
|
+
fitViewPadding: m = ne,
|
|
133
|
+
snapToGrid: E,
|
|
134
134
|
onSnapToGridChange: r,
|
|
135
135
|
snapGrid: z = $,
|
|
136
136
|
showControls: B = !0,
|
|
137
137
|
showSnapToGrid: M = !1,
|
|
138
|
-
toolbarStart:
|
|
138
|
+
toolbarStart: k,
|
|
139
139
|
toolbarEnd: y,
|
|
140
140
|
...L
|
|
141
141
|
}, O) {
|
|
142
|
-
const [P, F] = n.useState(!1), p =
|
|
142
|
+
const [P, F] = n.useState(!1), p = E !== void 0, D = p ? E : P, G = n.useCallback(
|
|
143
143
|
(_) => {
|
|
144
144
|
p || F(_), r == null || r(_);
|
|
145
145
|
},
|
|
@@ -148,7 +148,7 @@ function so({
|
|
|
148
148
|
() => ({ padding: m }),
|
|
149
149
|
[m]
|
|
150
150
|
);
|
|
151
|
-
return /* @__PURE__ */
|
|
151
|
+
return /* @__PURE__ */ e("div", { ref: O, className: W(ie, o), ...L, children: /* @__PURE__ */ b(
|
|
152
152
|
Z,
|
|
153
153
|
{
|
|
154
154
|
nodes: l,
|
|
@@ -158,35 +158,35 @@ function so({
|
|
|
158
158
|
onNodesChange: c,
|
|
159
159
|
onEdgesChange: d,
|
|
160
160
|
onNodeClick: u,
|
|
161
|
-
onPaneClick:
|
|
161
|
+
onPaneClick: g,
|
|
162
162
|
onInit: A,
|
|
163
163
|
fitView: !0,
|
|
164
164
|
fitViewOptions: T,
|
|
165
|
-
nodesDraggable: !
|
|
166
|
-
nodesConnectable: !
|
|
165
|
+
nodesDraggable: !f,
|
|
166
|
+
nodesConnectable: !f,
|
|
167
167
|
snapToGrid: D,
|
|
168
168
|
snapGrid: z,
|
|
169
169
|
minZoom: C,
|
|
170
170
|
maxZoom: N,
|
|
171
171
|
proOptions: { hideAttribution: !0 },
|
|
172
|
-
defaultEdgeOptions:
|
|
172
|
+
defaultEdgeOptions: le,
|
|
173
173
|
children: [
|
|
174
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ e(
|
|
175
175
|
j,
|
|
176
176
|
{
|
|
177
177
|
variant: H.Dots,
|
|
178
|
-
gap:
|
|
178
|
+
gap: x,
|
|
179
179
|
size: Y,
|
|
180
180
|
color: "var(--color-border-strong)"
|
|
181
181
|
}
|
|
182
182
|
),
|
|
183
|
-
|
|
184
|
-
y && /* @__PURE__ */
|
|
185
|
-
B && /* @__PURE__ */
|
|
183
|
+
k && /* @__PURE__ */ e(h, { position: "top-left", className: "m-3 flex items-center gap-2", children: k }),
|
|
184
|
+
y && /* @__PURE__ */ e(h, { position: "top-right", className: "m-3 flex items-center gap-2", children: y }),
|
|
185
|
+
B && /* @__PURE__ */ e(
|
|
186
186
|
S,
|
|
187
187
|
{
|
|
188
188
|
fitViewPadding: m,
|
|
189
|
-
showSnapToGrid: M && !
|
|
189
|
+
showSnapToGrid: M && !f,
|
|
190
190
|
snapToGrid: D,
|
|
191
191
|
onSnapToGridChange: G
|
|
192
192
|
}
|
|
@@ -195,21 +195,21 @@ function so({
|
|
|
195
195
|
}
|
|
196
196
|
) });
|
|
197
197
|
}
|
|
198
|
-
const
|
|
199
|
-
|
|
198
|
+
const ce = n.forwardRef(se);
|
|
199
|
+
ce.displayName = "InfiniteCanvas";
|
|
200
200
|
export {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
201
|
+
he as BaseEdge,
|
|
202
|
+
xe as EdgeLabelRenderer,
|
|
203
|
+
Ee as Handle,
|
|
204
|
+
ce as InfiniteCanvas,
|
|
205
|
+
ke as MarkerType,
|
|
206
|
+
ye as Position,
|
|
207
|
+
De as ReactFlowProvider,
|
|
208
|
+
_e as addEdge,
|
|
209
|
+
we as getBezierPath,
|
|
210
|
+
Ie as getSmoothStepPath,
|
|
211
|
+
Re as getStraightPath,
|
|
212
|
+
Se as useEdgesState,
|
|
213
|
+
Ae as useNodesState,
|
|
214
|
+
Ce as useReactFlow
|
|
215
215
|
};
|
package/components/kbd.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
-
import * as
|
|
3
|
+
import * as i from "react";
|
|
4
4
|
import { cn as s } from "../lib/cn.js";
|
|
5
|
-
const c =
|
|
6
|
-
({ className:
|
|
5
|
+
const c = i.forwardRef(
|
|
6
|
+
({ className: o, keys: e, children: a, ...t }, n) => {
|
|
7
7
|
const m = s(
|
|
8
8
|
"inline-flex items-center justify-center rounded-md border border-border bg-muted",
|
|
9
|
-
"px-1.5 min-w-5 h-5 text-xs font-
|
|
10
|
-
|
|
9
|
+
"px-1.5 min-w-5 h-5 text-xs font-normal text-muted-foreground",
|
|
10
|
+
o
|
|
11
11
|
);
|
|
12
12
|
return e && e.length > 0 ? /* @__PURE__ */ r(
|
|
13
13
|
"span",
|
|
@@ -17,7 +17,7 @@ const c = a.forwardRef(
|
|
|
17
17
|
...t,
|
|
18
18
|
children: e.map((d) => /* @__PURE__ */ r("kbd", { className: m, children: d }, d))
|
|
19
19
|
}
|
|
20
|
-
) : /* @__PURE__ */ r("kbd", { ref: n, className: m, ...t, children:
|
|
20
|
+
) : /* @__PURE__ */ r("kbd", { ref: n, className: m, ...t, children: a });
|
|
21
21
|
}
|
|
22
22
|
);
|
|
23
23
|
c.displayName = "Kbd";
|
package/components/link.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as e, jsx as o } from "react/jsx-runtime";
|
|
3
3
|
import * as u from "react";
|
|
4
4
|
import { ArrowUpRight as t } from "../lib/icons.js";
|
|
5
5
|
import { cn as d } from "../lib/cn.js";
|
|
@@ -8,7 +8,7 @@ const c = {
|
|
|
8
8
|
muted: "text-muted-foreground",
|
|
9
9
|
primary: "text-brand"
|
|
10
10
|
}, f = u.forwardRef(
|
|
11
|
-
({ className: n, color: a = "default", isExternal: r = !1, children: i, ...s }, l) => /* @__PURE__ */
|
|
11
|
+
({ className: n, color: a = "default", isExternal: r = !1, children: i, ...s }, l) => /* @__PURE__ */ e(
|
|
12
12
|
"a",
|
|
13
13
|
{
|
|
14
14
|
ref: l,
|
|
@@ -18,7 +18,7 @@ const c = {
|
|
|
18
18
|
// Links read as links by WEIGHT at rest (bold against body copy);
|
|
19
19
|
// the underline is a hover/focus affordance. Underline spec: dotted,
|
|
20
20
|
// 12% thickness, 24% offset, skip-ink, auto (current) color.
|
|
21
|
-
"group/link inline-flex items-center gap-1 rounded-xs font-
|
|
21
|
+
"group/link inline-flex items-center gap-1 rounded-xs font-semibold",
|
|
22
22
|
"hover:underline focus-visible:underline decoration-dotted decoration-[0.12em] underline-offset-[0.24em]",
|
|
23
23
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
24
24
|
c[a],
|
|
@@ -35,13 +35,13 @@ const c = {
|
|
|
35
35
|
// destination. Space is reserved so the label never shifts.
|
|
36
36
|
// (Inline style — Tailwind's arbitrary translate utilities weren't
|
|
37
37
|
// being generated by the JIT for these specific values.)
|
|
38
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ e(
|
|
39
39
|
"span",
|
|
40
40
|
{
|
|
41
41
|
"aria-hidden": !0,
|
|
42
42
|
className: "relative inline-block size-3.5 overflow-hidden [--arrow-out:0] group-hover/link:[--arrow-out:1] group-focus-visible/link:[--arrow-out:1]",
|
|
43
43
|
children: [
|
|
44
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ o(
|
|
45
45
|
t,
|
|
46
46
|
{
|
|
47
47
|
className: "absolute inset-0 size-full transition-transform duration-(--duration-fast) ease-out motion-reduce:transition-none",
|
|
@@ -50,7 +50,7 @@ const c = {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
),
|
|
53
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ o(
|
|
54
54
|
t,
|
|
55
55
|
{
|
|
56
56
|
className: "absolute inset-0 size-full transition-transform duration-(--duration-fast) ease-out motion-reduce:transition-none",
|
package/components/modal.js
CHANGED
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
3
3
|
import * as i from "react";
|
|
4
4
|
import { createPortal as y } from "react-dom";
|
|
5
|
-
import { MotionConfig as
|
|
5
|
+
import { MotionConfig as g, AnimatePresence as b, motion as f } from "motion/react";
|
|
6
6
|
import { Close as w } from "../lib/icons.js";
|
|
7
7
|
import { cva as h } from "class-variance-authority";
|
|
8
8
|
import { cn as n } from "../lib/cn.js";
|
|
9
9
|
import { backdropVariants as N, modalPanelVariants as M } from "../lib/motion.js";
|
|
10
|
+
import { Ripple as R } from "./ripple.js";
|
|
10
11
|
const k = h(
|
|
11
12
|
[
|
|
12
13
|
"relative flex w-full flex-col",
|
|
@@ -25,7 +26,7 @@ const k = h(
|
|
|
25
26
|
defaultVariants: { size: "md" }
|
|
26
27
|
}
|
|
27
28
|
);
|
|
28
|
-
function
|
|
29
|
+
function _({ open: o, onOpenChange: e, size: t, className: u, children: p }) {
|
|
29
30
|
const s = i.useRef(null), l = i.useRef(null);
|
|
30
31
|
return i.useEffect(() => {
|
|
31
32
|
if (!o) return;
|
|
@@ -45,7 +46,7 @@ function L({ open: o, onOpenChange: e, size: t, className: u, children: p }) {
|
|
|
45
46
|
document.removeEventListener("keydown", d), document.body.style.overflow = x, cancelAnimationFrame(v), (c = (a = l.current) == null ? void 0 : a.focus) == null || c.call(a);
|
|
46
47
|
};
|
|
47
48
|
}, [o, e]), y(
|
|
48
|
-
/* @__PURE__ */ r(
|
|
49
|
+
/* @__PURE__ */ r(g, { reducedMotion: "user", children: /* @__PURE__ */ r(b, { children: o && /* @__PURE__ */ m("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
|
|
49
50
|
/* @__PURE__ */ r(
|
|
50
51
|
f.div,
|
|
51
52
|
{
|
|
@@ -70,8 +71,9 @@ function L({ open: o, onOpenChange: e, size: t, className: u, children: p }) {
|
|
|
70
71
|
role: "dialog",
|
|
71
72
|
"aria-modal": "true",
|
|
72
73
|
tabIndex: -1,
|
|
73
|
-
className: n(k({ size: t }), "outline-none", u),
|
|
74
|
+
className: n(k({ size: t }), "relative outline-none", u),
|
|
74
75
|
children: [
|
|
76
|
+
/* @__PURE__ */ r(R, { origin: "center" }),
|
|
75
77
|
/* @__PURE__ */ r(
|
|
76
78
|
"button",
|
|
77
79
|
{
|
|
@@ -98,7 +100,7 @@ function L({ open: o, onOpenChange: e, size: t, className: u, children: p }) {
|
|
|
98
100
|
document.body
|
|
99
101
|
);
|
|
100
102
|
}
|
|
101
|
-
const
|
|
103
|
+
const j = i.forwardRef(({ className: o, ...e }, t) => /* @__PURE__ */ r(
|
|
102
104
|
"div",
|
|
103
105
|
{
|
|
104
106
|
ref: t,
|
|
@@ -106,8 +108,8 @@ const R = i.forwardRef(({ className: o, ...e }, t) => /* @__PURE__ */ r(
|
|
|
106
108
|
...e
|
|
107
109
|
}
|
|
108
110
|
));
|
|
109
|
-
|
|
110
|
-
const
|
|
111
|
+
j.displayName = "ModalHeader";
|
|
112
|
+
const z = i.forwardRef(({ className: o, ...e }, t) => /* @__PURE__ */ r(
|
|
111
113
|
"h2",
|
|
112
114
|
{
|
|
113
115
|
ref: t,
|
|
@@ -115,8 +117,8 @@ const j = i.forwardRef(({ className: o, ...e }, t) => /* @__PURE__ */ r(
|
|
|
115
117
|
...e
|
|
116
118
|
}
|
|
117
119
|
));
|
|
118
|
-
|
|
119
|
-
const
|
|
120
|
+
z.displayName = "ModalTitle";
|
|
121
|
+
const E = i.forwardRef(({ className: o, ...e }, t) => /* @__PURE__ */ r(
|
|
120
122
|
"p",
|
|
121
123
|
{
|
|
122
124
|
ref: t,
|
|
@@ -124,8 +126,8 @@ const z = i.forwardRef(({ className: o, ...e }, t) => /* @__PURE__ */ r(
|
|
|
124
126
|
...e
|
|
125
127
|
}
|
|
126
128
|
));
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
+
E.displayName = "ModalDescription";
|
|
130
|
+
const F = i.forwardRef(({ className: o, ...e }, t) => /* @__PURE__ */ r(
|
|
129
131
|
"div",
|
|
130
132
|
{
|
|
131
133
|
ref: t,
|
|
@@ -133,8 +135,8 @@ const E = i.forwardRef(({ className: o, ...e }, t) => /* @__PURE__ */ r(
|
|
|
133
135
|
...e
|
|
134
136
|
}
|
|
135
137
|
));
|
|
136
|
-
|
|
137
|
-
const
|
|
138
|
+
F.displayName = "ModalBody";
|
|
139
|
+
const P = i.forwardRef(({ className: o, ...e }, t) => /* @__PURE__ */ r(
|
|
138
140
|
"div",
|
|
139
141
|
{
|
|
140
142
|
ref: t,
|
|
@@ -145,12 +147,12 @@ const F = i.forwardRef(({ className: o, ...e }, t) => /* @__PURE__ */ r(
|
|
|
145
147
|
...e
|
|
146
148
|
}
|
|
147
149
|
));
|
|
148
|
-
|
|
150
|
+
P.displayName = "ModalFooter";
|
|
149
151
|
export {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
152
|
+
_ as Modal,
|
|
153
|
+
F as ModalBody,
|
|
154
|
+
E as ModalDescription,
|
|
155
|
+
P as ModalFooter,
|
|
156
|
+
j as ModalHeader,
|
|
157
|
+
z as ModalTitle
|
|
156
158
|
};
|
|
@@ -37,7 +37,7 @@ const x = c.forwardRef(
|
|
|
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-semibold tracking-tight text-foreground", children: m }),
|
|
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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as u, jsx as l } from "react/jsx-runtime";
|
|
3
3
|
import * as j from "react";
|
|
4
|
-
import { ChevronLeft as
|
|
5
|
-
import { cn as
|
|
4
|
+
import { ChevronLeft as k, MoreHorizontal as L, ChevronRight as G } from "../lib/icons.js";
|
|
5
|
+
import { cn as o } from "../lib/cn.js";
|
|
6
6
|
import { Select as M } from "./select.js";
|
|
7
7
|
function p(e, r) {
|
|
8
8
|
const t = [];
|
|
@@ -12,12 +12,12 @@ 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), n = Math.min(r + t, e), d = m > 2,
|
|
16
|
-
if (!d &&
|
|
15
|
+
const m = Math.max(r - t, 1), n = Math.min(r + t, e), d = m > 2, a = n < e - 1;
|
|
16
|
+
if (!d && a) {
|
|
17
17
|
const c = t * 2 + 3;
|
|
18
18
|
return [...p(1, c), "end-ellipsis", e];
|
|
19
19
|
}
|
|
20
|
-
if (d && !
|
|
20
|
+
if (d && !a) {
|
|
21
21
|
const c = t * 2 + 3;
|
|
22
22
|
return [1, "start-ellipsis", ...p(e - c + 1, e)];
|
|
23
23
|
}
|
|
@@ -29,8 +29,8 @@ function E(e, r, t) {
|
|
|
29
29
|
e
|
|
30
30
|
];
|
|
31
31
|
}
|
|
32
|
-
const A = (e) =>
|
|
33
|
-
"inline-flex items-center justify-center rounded-md font-
|
|
32
|
+
const A = (e) => o(
|
|
33
|
+
"inline-flex items-center justify-center rounded-md font-normal",
|
|
34
34
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
35
35
|
"transition active:scale-(--scale-press)",
|
|
36
36
|
"disabled:pointer-events-none disabled:opacity-40",
|
|
@@ -44,7 +44,7 @@ const A = (e) => a(
|
|
|
44
44
|
siblings: m = 1,
|
|
45
45
|
size: n = "md",
|
|
46
46
|
summary: d,
|
|
47
|
-
labels:
|
|
47
|
+
labels: a = !1,
|
|
48
48
|
pageSize: c,
|
|
49
49
|
pageSizeOptions: w,
|
|
50
50
|
onPageSizeChange: g,
|
|
@@ -57,7 +57,7 @@ const A = (e) => a(
|
|
|
57
57
|
{
|
|
58
58
|
ref: y,
|
|
59
59
|
"aria-label": "Pagination",
|
|
60
|
-
className:
|
|
60
|
+
className: o(
|
|
61
61
|
"flex items-center",
|
|
62
62
|
b ? "w-full justify-between gap-4" : "gap-1",
|
|
63
63
|
e
|
|
@@ -67,7 +67,7 @@ const A = (e) => a(
|
|
|
67
67
|
b && /* @__PURE__ */ l(
|
|
68
68
|
"span",
|
|
69
69
|
{
|
|
70
|
-
className:
|
|
70
|
+
className: o(
|
|
71
71
|
"text-muted-foreground",
|
|
72
72
|
"text-xs"
|
|
73
73
|
),
|
|
@@ -78,7 +78,7 @@ const A = (e) => a(
|
|
|
78
78
|
h && /* @__PURE__ */ u(
|
|
79
79
|
"label",
|
|
80
80
|
{
|
|
81
|
-
className:
|
|
81
|
+
className: o(
|
|
82
82
|
"flex items-center gap-2 text-muted-foreground",
|
|
83
83
|
"text-xs"
|
|
84
84
|
),
|
|
@@ -109,14 +109,14 @@ const A = (e) => a(
|
|
|
109
109
|
"aria-label": "Go to previous page",
|
|
110
110
|
disabled: R,
|
|
111
111
|
onClick: () => i(t - 1),
|
|
112
|
-
className:
|
|
112
|
+
className: o(
|
|
113
113
|
f,
|
|
114
114
|
"text-foreground hover:bg-muted",
|
|
115
|
-
|
|
115
|
+
a && N(n)
|
|
116
116
|
),
|
|
117
117
|
children: [
|
|
118
|
-
/* @__PURE__ */ l(
|
|
119
|
-
|
|
118
|
+
/* @__PURE__ */ l(k, { className: x, "aria-hidden": !0 }),
|
|
119
|
+
a && "Prev"
|
|
120
120
|
]
|
|
121
121
|
}
|
|
122
122
|
),
|
|
@@ -126,8 +126,8 @@ const A = (e) => a(
|
|
|
126
126
|
"span",
|
|
127
127
|
{
|
|
128
128
|
"aria-hidden": !0,
|
|
129
|
-
className:
|
|
130
|
-
children: /* @__PURE__ */ l(
|
|
129
|
+
className: o(f, "text-muted-foreground"),
|
|
130
|
+
children: /* @__PURE__ */ l(L, { className: x })
|
|
131
131
|
},
|
|
132
132
|
s
|
|
133
133
|
);
|
|
@@ -139,9 +139,9 @@ const A = (e) => a(
|
|
|
139
139
|
"aria-label": `Go to page ${s}`,
|
|
140
140
|
"aria-current": v ? "page" : void 0,
|
|
141
141
|
onClick: () => i(s),
|
|
142
|
-
className:
|
|
142
|
+
className: o(
|
|
143
143
|
f,
|
|
144
|
-
v ? "bg-
|
|
144
|
+
v ? "bg-foreground text-background" : "text-foreground hover:bg-muted"
|
|
145
145
|
),
|
|
146
146
|
children: s
|
|
147
147
|
},
|
|
@@ -155,13 +155,13 @@ const A = (e) => a(
|
|
|
155
155
|
"aria-label": "Go to next page",
|
|
156
156
|
disabled: S,
|
|
157
157
|
onClick: () => i(t + 1),
|
|
158
|
-
className:
|
|
158
|
+
className: o(
|
|
159
159
|
f,
|
|
160
160
|
"text-foreground hover:bg-muted",
|
|
161
|
-
|
|
161
|
+
a && N(n)
|
|
162
162
|
),
|
|
163
163
|
children: [
|
|
164
|
-
|
|
164
|
+
a && "Next",
|
|
165
165
|
/* @__PURE__ */ l(G, { className: x, "aria-hidden": !0 })
|
|
166
166
|
]
|
|
167
167
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* PixelIcon — the "Compounding Field" interactive brand icon.
|
|
4
|
+
*
|
|
5
|
+
* This is the exact hatched-tile WebGL implementation as authored, ported into
|
|
6
|
+
* an ADS component so it's available to BOTH the design system and the product
|
|
7
|
+
* (`import { PixelIcon } from "@/components"`). The ONLY change from the source
|
|
8
|
+
* is the import above: `ogl` is the installed package, not a CDN URL (the ADS
|
|
9
|
+
* is self-contained — no external hosts). Masks, palettes, shaders, and the
|
|
10
|
+
* `HatchedTileScene` renderer are verbatim.
|
|
11
|
+
*
|
|
12
|
+
* Add a new creative icon = add a mask to `MASKS` (+ a palette). One place.
|
|
13
|
+
*/
|
|
14
|
+
declare const MASKS: Record<string, string[]>;
|
|
15
|
+
export type PixelIconMask = keyof typeof MASKS;
|
|
16
|
+
export interface PixelIconProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
17
|
+
/** Which creative mask to render. Add new ones to MASKS. */
|
|
18
|
+
mask?: PixelIconMask | (string & {});
|
|
19
|
+
/** Entrance choreography: "sequence" sweeps corner-to-corner, else radial. */
|
|
20
|
+
motion?: "sequence" | "radial";
|
|
21
|
+
/** Interaction preset 0–5 (3 = hover-shrink + click blast; hero forces 3). */
|
|
22
|
+
motionMode?: number;
|
|
23
|
+
/** Larger hero rendering (broader hatch, mode 3). */
|
|
24
|
+
hero?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The interactive pixel-field brand icon. Interactive on hover/click; size it
|
|
28
|
+
* with `size-*` / width+height on `className` (it renders a square canvas).
|
|
29
|
+
*/
|
|
30
|
+
export declare const PixelIcon: React.ForwardRefExoticComponent<PixelIconProps & React.RefAttributes<HTMLSpanElement>>;
|
|
31
|
+
export {};
|