@photon-ai/pho-ui 4.18.5 → 4.19.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/chunks/IconAlertTriangleFilled-QV-gsVQW.js +11 -0
- package/dist/chunks/IconAlertTriangleFilled-QV-gsVQW.js.map +1 -0
- package/dist/chunks/{basic-page-BKvtEQkZ.js → basic-page-Cp7CccNN.js} +3 -3
- package/dist/chunks/{basic-page-BKvtEQkZ.js.map → basic-page-Cp7CccNN.js.map} +1 -1
- package/dist/chunks/{dialog-CCfeyQBG.js → dialog-DORIrfyJ.js} +101 -100
- package/dist/chunks/dialog-DORIrfyJ.js.map +1 -0
- package/dist/chunks/{error-yAVi4cBu.js → error-BObcQClz.js} +86 -68
- package/dist/chunks/error-BObcQClz.js.map +1 -0
- package/dist/chunks/{toast-DrLKzrDJ.js → toast-B3oURNJC.js} +33 -35
- package/dist/chunks/toast-B3oURNJC.js.map +1 -0
- package/dist/components/command.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/error.js +11 -10
- package/dist/components/toast.js +1 -1
- package/dist/index.js +151 -150
- package/dist/sections/basic-page.js +1 -1
- package/dist/src/components/dialog/dialog.d.ts +2 -0
- package/dist/src/components/error/error.d.ts +21 -0
- package/package.json +1 -1
- package/dist/chunks/dialog-CCfeyQBG.js.map +0 -1
- package/dist/chunks/error-yAVi4cBu.js.map +0 -1
- package/dist/chunks/toast-DrLKzrDJ.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -4,81 +4,81 @@ import { t as r } from "./chunks/is-react-component-DSnjtBmo.js";
|
|
|
4
4
|
import { t as e } from "./chunks/resolve-variant-CcD8iG5l.js";
|
|
5
5
|
import { n as S, t as E } from "./chunks/link-provider-DXzDQ08N.js";
|
|
6
6
|
import { BAR_RISE_PX as n, BLUR_PX as m, EASE_POP as A, EASE_STACK as I, FADE_ENTRANCE as T, FADE_SWAP as p, PRESS_SCALE as R, PRESS_SCALE_ROW as l, RISE_PX as C, SPAN_SCALE as u, SPRING_ENTRANCE as B, SPRING_PRESS as f, SPRING_PRESS_INLINE as N, SPRING_PRESS_QUICK as L, SPRING_SETTLE as P, TRAVEL_LINEAR as c, fadeThroughBlur as D, revealIn as O, riseIn as d } from "./motion.js";
|
|
7
|
-
import { n as
|
|
7
|
+
import { n as V, r as h, t as G } from "./chunks/use-press-pulse-IbNstUT0.js";
|
|
8
8
|
import { n as M, t as b } from "./chunks/use-copy-D6JwKUll.js";
|
|
9
9
|
import "./utils.js";
|
|
10
10
|
import { a as k, c as w, d as W, i as y, l as H, n as K, o as x, r as z, s as X, t as Y, u as Z } from "./chunks/button-CLfWdqm-.js";
|
|
11
|
-
import { a as J, c as Q, i as q, l as $, n as aa, o as sa, r as ta, s as ra, t as oa } from "./chunks/error-
|
|
12
|
-
import { t as
|
|
13
|
-
import { A as
|
|
14
|
-
import { a as
|
|
15
|
-
import { n as
|
|
16
|
-
import { n as
|
|
17
|
-
import { a as
|
|
18
|
-
import { t as
|
|
19
|
-
import { i as
|
|
20
|
-
import { i as
|
|
21
|
-
import { n as
|
|
22
|
-
import { t as
|
|
23
|
-
import { t as
|
|
24
|
-
import { t as
|
|
25
|
-
import { n as
|
|
26
|
-
import { n as
|
|
27
|
-
import { i as
|
|
28
|
-
import { t as
|
|
29
|
-
import { a as
|
|
30
|
-
import { a as
|
|
11
|
+
import { a as J, c as Q, i as q, l as $, n as aa, o as sa, r as ta, s as ra, t as oa, u as ea } from "./chunks/error-BObcQClz.js";
|
|
12
|
+
import { t as Sa } from "./chunks/chat-ZUzGmTWE.js";
|
|
13
|
+
import { A as _a, B as na, C as ma, D as Aa, E as Ia, F as Ta, I as pa, L as Ra, M as la, N as Ca, O as ua, P as Ba, R as fa, S as Na, T as La, V as Pa, _ as ca, a as Da, b as Oa, c as da, d as ga, f as Va, g as ha, h as Ga, i as Ua, j as Ma, k as ba, l as Fa, m as va, n as ka, o as wa, p as Wa, r as ya, s as Ha, t as Ka, u as xa, v as za, w as Xa, x as Ya, y as Za, z as ja } from "./chunks/trace-D9F0sne7.js";
|
|
14
|
+
import { a as Qa, c as qa, d as $a, i as as, l as ss, n as ts, o as rs, r as os, s as es, t as is, u as Ss } from "./chunks/code-block-Yxg2wZGJ.js";
|
|
15
|
+
import { n as _s, t as ns } from "./chunks/date-picker-vJQrTol9.js";
|
|
16
|
+
import { n as As, t as Is } from "./chunks/copy-button-BLvirhXk.js";
|
|
17
|
+
import { a as ps, c as Rs, d as ls, i as Cs, l as us, n as Bs, o as fs, r as Ns, s as Ls, t as Ps, u as cs } from "./chunks/sidebar-CgaSEWVr.js";
|
|
18
|
+
import { t as Os } from "./chunks/input-DWnb33UF.js";
|
|
19
|
+
import { i as gs, n as Vs, r as hs, t as Gs } from "./chunks/filter-bar-qqCZf1x4.js";
|
|
20
|
+
import { i as Ms } from "./chunks/data-table-CAz_8HQw.js";
|
|
21
|
+
import { n as Fs, t as vs } from "./chunks/stat-BXBfMQ9Q.js";
|
|
22
|
+
import { t as ws } from "./chunks/calendar-DDWITGo4.js";
|
|
23
|
+
import { t as ys } from "./chunks/close-button-Ck4rY1Fp.js";
|
|
24
|
+
import { t as Ks } from "./chunks/input-group-C3upo2OU.js";
|
|
25
|
+
import { n as zs, t as Xs } from "./chunks/card-zyRAihYE.js";
|
|
26
|
+
import { n as Zs, t as js } from "./chunks/dialog-DORIrfyJ.js";
|
|
27
|
+
import { i as Qs, n as qs, r as $s, t as at } from "./chunks/status-view-I_Y6eEyX.js";
|
|
28
|
+
import { t as tt } from "./chunks/description-list-Duhhralt.js";
|
|
29
|
+
import { a as ot, c as et, d as it, f as St, i as Et, l as _t, m as nt, n as mt, o as At, p as It, r as Tt, s as pt, t as Rt, u as lt } from "./chunks/basic-page-Cp7CccNN.js";
|
|
30
|
+
import { a as ut, i as Bt, n as ft, o as Nt, r as Lt, s as Pt, t as ct } from "./chunks/chart-Btnw7KXV.js";
|
|
31
31
|
import "./components/chart.js";
|
|
32
|
-
import { t as
|
|
32
|
+
import { t as dt } from "./chunks/bar-chart-ZNuOoH7c.js";
|
|
33
33
|
import { t as Vt } from "./chunks/line-chart-pOwE2_Oz.js";
|
|
34
|
-
import { i as
|
|
35
|
-
import { n as
|
|
36
|
-
import { n as
|
|
34
|
+
import { i as Gt, n as Ut, r as Mt, t as bt } from "./chunks/log-list-QbSYHZu3.js";
|
|
35
|
+
import { n as vt, t as kt } from "./chunks/bubble-D88Edlgj.js";
|
|
36
|
+
import { n as Wt, r as yt, t as Ht } from "./chunks/message-DRAWQlW-.js";
|
|
37
37
|
export {
|
|
38
|
-
|
|
38
|
+
Rt as AUTO_SAVE_DELAY_MS,
|
|
39
39
|
n as BAR_RISE_PX,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
mt as BASIC_PAGE_CALLOUT,
|
|
41
|
+
Tt as BASIC_PAGE_CARD,
|
|
42
|
+
Et as BASIC_PAGE_ITEM,
|
|
43
|
+
ot as BASIC_PAGE_ITEM_PANEL,
|
|
44
|
+
At as BASIC_PAGE_ITEM_PANEL_DIVIDED,
|
|
45
|
+
pt as BASIC_PAGE_ROW,
|
|
46
46
|
m as BLUR_PX,
|
|
47
|
-
|
|
47
|
+
kt as BUBBLE_VARIANTS,
|
|
48
48
|
Y as BUTTON_COLORS,
|
|
49
49
|
K as BUTTON_SHAPES,
|
|
50
50
|
z as BUTTON_SIZES,
|
|
51
51
|
y as BUTTON_VARIANTS,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
dt as BarChart,
|
|
53
|
+
et as BasicPage,
|
|
54
|
+
vt as Bubble,
|
|
55
55
|
k as Button,
|
|
56
56
|
x as ButtonLink,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
57
|
+
Xs as CARD_SURFACE,
|
|
58
|
+
Nt as CHART_SLOTS,
|
|
59
|
+
ss as CODE_GRAMMARS,
|
|
60
|
+
qa as CODE_TOKEN_CLASS,
|
|
61
|
+
_t as CONDENSE_BAR_ENTER,
|
|
62
|
+
lt as CONDENSE_BAR_RISE_PX,
|
|
63
|
+
it as CONDENSE_BAR_TRAVEL,
|
|
64
64
|
G as CONTROL_PRESS_SCALE,
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
V as CONTROL_PRESS_SPRING,
|
|
66
|
+
Is as COPY_BUTTON_SIZES,
|
|
67
67
|
b as COPY_FEEDBACK_MS,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
68
|
+
ws as Calendar,
|
|
69
|
+
zs as Card,
|
|
70
|
+
ct as Chart,
|
|
71
|
+
ft as ChartBar,
|
|
72
|
+
Bt as ChartLegend,
|
|
73
|
+
Lt as ChartLine,
|
|
74
|
+
ut as ChartSwatch,
|
|
75
|
+
Sa as Chat,
|
|
76
|
+
ys as CloseButton,
|
|
77
|
+
is as CodeBlock,
|
|
78
|
+
As as CopyButton,
|
|
79
|
+
ns as DatePicker,
|
|
80
|
+
tt as DescriptionList,
|
|
81
|
+
js as Dialog,
|
|
82
82
|
A as EASE_POP,
|
|
83
83
|
I as EASE_STACK,
|
|
84
84
|
X as EFFECT_BUTTON_SIZES,
|
|
@@ -88,120 +88,121 @@ export {
|
|
|
88
88
|
aa as ErrorView,
|
|
89
89
|
T as FADE_ENTRANCE,
|
|
90
90
|
p as FADE_SWAP,
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
Gs as FILTER_DATE_PRESETS,
|
|
92
|
+
ma as FULL_VIEW,
|
|
93
93
|
Vs as FilterBar,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
q as GENERIC_ERROR_TITLE,
|
|
95
|
+
Wa as GEN_AI_KINDS,
|
|
96
|
+
Os as Input,
|
|
97
|
+
Ks as InputGroup,
|
|
98
|
+
Ss as LANGUAGE_ALIASES,
|
|
99
99
|
Vt as LineChart,
|
|
100
100
|
E as LinkProvider,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
bt as LogList,
|
|
102
|
+
Xa as MIN_VIEW_WIDTH,
|
|
103
|
+
yt as Message,
|
|
104
104
|
R as PRESS_SCALE,
|
|
105
105
|
l as PRESS_SCALE_ROW,
|
|
106
106
|
C as RISE_PX,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
107
|
+
Ps as SIDEBAR_HEADER_INSET,
|
|
108
|
+
Bs as SIDEBAR_ITEM,
|
|
109
|
+
Ns as SIDEBAR_ITEM_ACTIVE,
|
|
110
|
+
Cs as SIDEBAR_ITEM_INACTIVE,
|
|
111
|
+
ps as SIDEBAR_ROOT,
|
|
112
|
+
fs as SIDEBAR_ROOT_BASE,
|
|
113
|
+
Ls as SIDEBAR_ROOT_INSET,
|
|
114
|
+
Rs as SIDEBAR_SUBMENU_CHEVRON,
|
|
115
|
+
us as SIDEBAR_SUBMENU_LIST_INDENT,
|
|
116
|
+
cs as SIDEBAR_SUBMENU_TRIGGER_CHILD_ACTIVE,
|
|
117
117
|
u as SPAN_SCALE,
|
|
118
118
|
B as SPRING_ENTRANCE,
|
|
119
119
|
f as SPRING_PRESS,
|
|
120
120
|
N as SPRING_PRESS_INLINE,
|
|
121
121
|
L as SPRING_PRESS_QUICK,
|
|
122
122
|
P as SPRING_SETTLE,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
123
|
+
at as STATUS_VIEW,
|
|
124
|
+
qs as STATUS_VIEW_COPY,
|
|
125
|
+
$s as STATUS_VIEW_SIZES,
|
|
126
|
+
ls as Sidebar,
|
|
127
|
+
Oa as SpanPrimitive,
|
|
128
|
+
vs as Stat,
|
|
129
|
+
Fs as StatGroup,
|
|
130
|
+
Qs as StatusView,
|
|
131
131
|
c as TRAVEL_LINEAR,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
Ga as
|
|
138
|
-
|
|
139
|
-
|
|
132
|
+
Ka as Trace,
|
|
133
|
+
ta as Warning,
|
|
134
|
+
La as allCollapsed,
|
|
135
|
+
Ia as ancestorIds,
|
|
136
|
+
va as attribute,
|
|
137
|
+
Ga as attributeText,
|
|
138
|
+
Ua as axisTicks,
|
|
139
|
+
Da as barGeometry,
|
|
140
|
+
Aa as buildSpanTree,
|
|
140
141
|
Z as buttonVariants,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
J as capitalizeFirst,
|
|
143
|
+
Pt as chartColor,
|
|
144
|
+
ua as clampView,
|
|
144
145
|
s as cn,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
146
|
+
ba as collapseAllIds,
|
|
147
|
+
_a as collapseOneLevel,
|
|
148
|
+
Ms as createColumns,
|
|
149
|
+
Ma as deriveSpanTree,
|
|
150
|
+
sa as describeError,
|
|
150
151
|
W as effectButtonVariants,
|
|
151
|
-
|
|
152
|
+
la as expandOneLevel,
|
|
152
153
|
D as fadeThroughBlur,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
154
|
+
Ca as filterSpans,
|
|
155
|
+
ka as footerTotals,
|
|
156
|
+
St as formToasts,
|
|
157
|
+
_s as formatDateLabel,
|
|
158
|
+
wa as formatDuration,
|
|
159
|
+
hs as formatFilterValue,
|
|
160
|
+
Ha as formatTick,
|
|
161
|
+
ha as genAIKind,
|
|
162
|
+
os as highlight,
|
|
163
|
+
as as highlightSync,
|
|
164
|
+
ra as httpReasonPhrase,
|
|
165
|
+
Q as httpStatusExplanation,
|
|
166
|
+
gs as isFilterSet,
|
|
167
|
+
Ba as isFullView,
|
|
168
|
+
Qa as isLanguageReady,
|
|
169
|
+
$ as isProblem,
|
|
169
170
|
r as isReactComponent,
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
171
|
+
da as labeledTicks,
|
|
172
|
+
Fa as layoutTickLabels,
|
|
173
|
+
Ut as logStatusColor,
|
|
174
|
+
Mt as logStatusLabel,
|
|
175
|
+
Ht as messageStatusKey,
|
|
176
|
+
xa as niceStep,
|
|
177
|
+
ga as normalizeSpans,
|
|
178
|
+
Ta as panView,
|
|
179
|
+
ea as parseProblem,
|
|
180
|
+
ca as peerService,
|
|
181
|
+
rs as preloadLanguage,
|
|
182
|
+
$a as resolveGrammar,
|
|
182
183
|
e as resolveVariant,
|
|
183
184
|
O as revealIn,
|
|
184
185
|
d as riseIn,
|
|
185
|
-
|
|
186
|
-
|
|
186
|
+
Wt as shouldShowMessageStatus,
|
|
187
|
+
za as spanDecorationIcon,
|
|
187
188
|
Va as spanDuration,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
189
|
+
Za as spanPills,
|
|
190
|
+
pa as spanTimelineBarVars,
|
|
191
|
+
ts as tokenizeJson,
|
|
192
|
+
ya as traceBulletInset,
|
|
193
|
+
Ra as traceRange,
|
|
194
|
+
Gt as truncateMiddle,
|
|
195
|
+
It as useAutoSave,
|
|
196
|
+
nt as useCondense,
|
|
196
197
|
M as useCopy,
|
|
197
|
-
|
|
198
|
-
|
|
198
|
+
Zs as useDialogPending,
|
|
199
|
+
es as useHighlight,
|
|
199
200
|
S as useLinkComponent,
|
|
200
201
|
h as usePressPulse,
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
202
|
+
Ya as useSpan,
|
|
203
|
+
Na as useSpanTree,
|
|
204
|
+
fa as viewFraction,
|
|
205
|
+
ja as viewToRange,
|
|
206
|
+
na as visibleSpans,
|
|
207
|
+
Pa as zoomView
|
|
207
208
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { i as s } from "../chunks/data-table-CAz_8HQw.js";
|
|
3
|
-
import { a as E, c as a, d as C, f as S, i as I, l as e, m as o, n as B, o as P, p as N, r, s as t, t as D, u as R } from "../chunks/basic-page-
|
|
3
|
+
import { a as E, c as a, d as C, f as S, i as I, l as e, m as o, n as B, o as P, p as N, r, s as t, t as D, u as R } from "../chunks/basic-page-Cp7CccNN.js";
|
|
4
4
|
export {
|
|
5
5
|
D as AUTO_SAVE_DELAY_MS,
|
|
6
6
|
B as BASIC_PAGE_CALLOUT,
|
|
@@ -68,6 +68,8 @@ interface ContentProps extends Omit<StyledProps<typeof BaseDialog.Popup>, "title
|
|
|
68
68
|
/**
|
|
69
69
|
* Footer action row (Cancel / Confirm, etc.). Iron rule: when `actions` is
|
|
70
70
|
* set, the header close button is never shown — dismiss via the actions.
|
|
71
|
+
* Three actions split: the first (tertiary) at the row's start, the
|
|
72
|
+
* secondary and the primary at its end.
|
|
71
73
|
*/
|
|
72
74
|
actions?: ReactNode;
|
|
73
75
|
/**
|
|
@@ -21,6 +21,27 @@ export declare function Error({ error, children, className, ...props }: ErrorPro
|
|
|
21
21
|
export declare namespace Error {
|
|
22
22
|
var displayName: string;
|
|
23
23
|
}
|
|
24
|
+
export interface WarningProps extends Omit<ComponentProps<"output">, "children"> {
|
|
25
|
+
/** What to look at twice. Shows nothing while nullish. */
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Warning — the inline `Error` line in warning ink, a triangle in place of
|
|
30
|
+
* the circle: something the user can go ahead with but may not mean (an
|
|
31
|
+
* address outside the team, a value that differs from the usual one). Same
|
|
32
|
+
* row, glyph seat and type as `Error`, so the two can take turns in one
|
|
33
|
+
* place. It doesn't stop anything, so it announces politely (an `output`,
|
|
34
|
+
* role `status`) and carries no details disclosure.
|
|
35
|
+
*
|
|
36
|
+
* A polite region is announced when its content changes, not when it is
|
|
37
|
+
* inserted, so the `output` stays mounted while the copy is nullish:
|
|
38
|
+
* empty and `sr-only`, the way pho-ui's other live regions sit, it keeps
|
|
39
|
+
* its role and, out of flow, adds no gap to a stack.
|
|
40
|
+
*/
|
|
41
|
+
export declare function Warning({ children, className, ...props }: WarningProps): import('react').JSX.Element;
|
|
42
|
+
export declare namespace Warning {
|
|
43
|
+
var displayName: string;
|
|
44
|
+
}
|
|
24
45
|
interface ErrorViewBaseProps {
|
|
25
46
|
/** The caught value — a problem body, an `Error` wrapping one, or unknown. */
|
|
26
47
|
error?: unknown;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-CCfeyQBG.js","names":["BaseDialog","Dialog","cn","Button","CloseButton","AnimatedHeight","ScrollArea","createContext","useCallback","useContext","useEffect","useMemo","useRef","useState","jsx","jsxs","Dialog","DialogPendingContext","useDialogPending","Root","onOpenChange","actionsRef","props","pending","setPending","pendingRef","internalActionsRef","handleOpenChange","open","eventDetails","contextValue","Trigger","Portal","Close","isThenable","value","Action","onClick","loading","disabled","pendingContext","busy","setBusy","mountedRef","handleClick","event","result","error","inert","Backdrop","className","Popup","Title","Description","DialogHeaderIcon","children","size","Content","icon","title","description","consequences","warning","actions","caption","showClose","showCloseButton","hasHeader","hasConsequences","hasScrollBody","item","index","InsetPopup","InsetContent","FullscreenPopup","FullscreenContent","frameClassName","Dialog$1"],"sources":["../../src/components/dialog/dialog.tsx"],"sourcesContent":["import {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n type ComponentProps,\n type ElementType,\n type MouseEvent as ReactMouseEvent,\n type ReactNode,\n} from \"react\";\nimport { Dialog as BaseDialog } from \"@base-ui/react/dialog\";\nimport { AnimatedHeight } from \"../../utils/animated-height\";\nimport { cn } from \"../../utils/cn\";\nimport { ScrollArea } from \"../scroll-area\";\nimport { Button, type ButtonProps } from \"../button/button\";\nimport { CloseButton } from \"../button/close-button\";\n\n/** Override Base UI's `string | (state) => string` className with plain string. */\ntype StyledProps<T extends ElementType> = Omit<\n ComponentProps<T>,\n \"className\"\n> & {\n className?: string;\n};\n\n/* ========================== Async pending context ========================== */\n\n/** Imperative actions exposed by Base UI's `actionsRef`. */\ninterface RootActions {\n unmount: () => void;\n close: () => void;\n}\n\ninterface DialogPendingContextValue {\n /** True while a `Dialog.Action` promise is in flight. */\n pending: boolean;\n beginPending: () => void;\n endPending: () => void;\n /** Close the dialog imperatively (used by `Dialog.Action` on resolve). */\n close: () => void;\n}\n\nconst DialogPendingContext = createContext<DialogPendingContextValue | null>(\n null,\n);\n\n/**\n * Whether the surrounding dialog has a `Dialog.Action` promise in flight —\n * use it to disable secondary actions (Cancel etc.) while work is pending.\n * Returns `false` outside a `Dialog.Root`.\n */\nexport function useDialogPending(): boolean {\n return useContext(DialogPendingContext)?.pending ?? false;\n}\n\ntype RootProps = ComponentProps<typeof BaseDialog.Root>;\n\n/**\n * `Dialog.Root` with async awareness: while a `Dialog.Action` promise is\n * pending, every close request (outside press, Escape, `Dialog.Close`) is\n * cancelled so the dialog stays open until the work settles. Props pass\n * through to Base UI's `Dialog.Root` unchanged.\n */\nfunction Root({ onOpenChange, actionsRef, ...props }: RootProps) {\n const [pending, setPending] = useState(false);\n // Guard reads a ref so a resolve → close() in the same tick isn't blocked\n // by a not-yet-flushed state update.\n const pendingRef = useRef(false);\n const internalActionsRef = useRef<RootActions | null>(null);\n\n // Keep a caller-supplied actionsRef working alongside our internal one.\n useEffect(() => {\n if (!actionsRef) return;\n actionsRef.current = internalActionsRef.current;\n return () => {\n actionsRef.current = null;\n };\n }, [actionsRef]);\n\n const handleOpenChange = useCallback<NonNullable<RootProps[\"onOpenChange\"]>>(\n (open, eventDetails) => {\n if (!open && pendingRef.current) {\n eventDetails.cancel();\n return;\n }\n onOpenChange?.(open, eventDetails);\n },\n [onOpenChange],\n );\n\n const contextValue = useMemo<DialogPendingContextValue>(\n () => ({\n pending,\n beginPending: () => {\n pendingRef.current = true;\n setPending(true);\n },\n endPending: () => {\n pendingRef.current = false;\n setPending(false);\n },\n close: () => internalActionsRef.current?.close(),\n }),\n [pending],\n );\n\n return (\n <DialogPendingContext.Provider value={contextValue}>\n <BaseDialog.Root\n actionsRef={internalActionsRef}\n onOpenChange={handleOpenChange}\n {...props}\n />\n </DialogPendingContext.Provider>\n );\n}\n\nconst Trigger = BaseDialog.Trigger;\nconst Portal = BaseDialog.Portal;\nconst Close = BaseDialog.Close;\n\n/* ============================== Dialog.Action ============================== */\n\nexport interface DialogActionProps extends Omit<ButtonProps, \"onClick\"> {\n /**\n * Confirm handler. Return a promise to keep the dialog open while it runs:\n * the button shows `loading`, all dismissal is locked, and the dialog\n * closes when the promise resolves. On rejection the dialog stays open —\n * surface errors inside the handler. A non-promise return closes\n * immediately, like `Dialog.Close`.\n */\n onClick?: (\n event: ReactMouseEvent<HTMLButtonElement>,\n ) => void | Promise<unknown>;\n}\n\nfunction isThenable(value: unknown): value is Promise<unknown> {\n return (\n value != null && typeof (value as { then?: unknown }).then === \"function\"\n );\n}\n\n/**\n * The confirm button of an action row, with native promise support — a\n * `Button` that runs its (possibly async) `onClick` and closes the dialog\n * when the work settles successfully.\n */\nfunction Action({ onClick, loading, disabled, ...props }: DialogActionProps) {\n const pendingContext = useContext(DialogPendingContext);\n const [busy, setBusy] = useState(false);\n const mountedRef = useRef(true);\n\n useEffect(() => {\n mountedRef.current = true;\n return () => {\n mountedRef.current = false;\n };\n }, []);\n\n function handleClick(event: ReactMouseEvent<HTMLButtonElement>) {\n if (busy || loading) return;\n const result = onClick?.(event);\n if (!isThenable(result)) {\n pendingContext?.close();\n return;\n }\n setBusy(true);\n pendingContext?.beginPending();\n result.then(\n () => {\n pendingContext?.endPending();\n if (mountedRef.current) setBusy(false);\n pendingContext?.close();\n },\n (error: unknown) => {\n pendingContext?.endPending();\n if (mountedRef.current) setBusy(false);\n if (\n typeof process !== \"undefined\" &&\n process.env?.NODE_ENV !== \"production\"\n ) {\n console.error(\"Dialog.Action: async onClick rejected —\", error);\n }\n },\n );\n }\n\n const inert = busy || loading;\n return (\n <Button\n {...props}\n disabled={disabled || inert}\n loading={inert}\n onClick={handleClick}\n />\n );\n}\n\nfunction Backdrop({\n className,\n ...props\n}: StyledProps<typeof BaseDialog.Backdrop>) {\n return (\n <BaseDialog.Backdrop\n className={cn(\n \"bg-pho-overlay fixed inset-0 z-50 transition-opacity duration-200 ease-out\",\n \"data-[ending-style]:opacity-0 data-[ending-style]:duration-150 data-[starting-style]:opacity-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Popup({ className, ...props }: StyledProps<typeof BaseDialog.Popup>) {\n return (\n <BaseDialog.Popup\n className={cn(\n // Floating layer: bg-pho-primary + border-pho-secondary hairline, elevation kept.\n \"border-pho-secondary bg-pho-primary shadow-pho-xl fixed top-1/2 left-1/2 z-50 w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 overflow-hidden rounded-lg border outline-none\",\n // Global height cap — the inset panel's footprint (inset-4 /\n // sm:inset-8). A flex column so the body region can shrink and\n // scroll while header and actions stay pinned.\n \"flex max-h-[calc(100dvh-2rem)] flex-col sm:max-h-[calc(100dvh-4rem)]\",\n // Opacity + scale only — leave translate centering alone (no transition-all).\n \"transition-[opacity,scale] duration-200 ease-out\",\n \"data-[starting-style]:scale-95 data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:duration-150\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Title({ className, ...props }: StyledProps<typeof BaseDialog.Title>) {\n return (\n <BaseDialog.Title\n className={cn(\n \"text-pho-primary font-display text-display-sm font-medium text-balance\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Description({\n className,\n ...props\n}: StyledProps<typeof BaseDialog.Description>) {\n return (\n <BaseDialog.Description\n className={cn(\n \"text-pho-description text-display-xs font-normal\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Header icon chrome: secondary ink, a hair of extra air before the title.\n * Panel dialogs use 32px (`size-8`); fullscreen gates step up to 48px\n * (`size-12`) so the glyph reads at viewport scale.\n */\nfunction DialogHeaderIcon({\n children,\n size = \"md\",\n}: {\n children: ReactNode;\n size?: \"md\" | \"lg\";\n}) {\n return (\n <span\n aria-hidden\n className={cn(\n \"text-pho-secondary mb-1\",\n size === \"lg\" ? \"[&>svg]:size-12\" : \"[&>svg]:size-8\",\n )}\n >\n {children}\n </span>\n );\n}\n\ninterface ContentProps extends Omit<\n StyledProps<typeof BaseDialog.Popup>,\n \"title\"\n> {\n /**\n * Decorative icon above the title — typically a Tabler outline icon.\n * Rendered aria-hidden in secondary ink at 32px (`[&>svg]:size-8`). Pass a\n * styled node to override the ink; the size is owned by the slot.\n */\n icon?: ReactNode;\n /** Heading rendered in the panel header. */\n title?: ReactNode;\n /** Supporting text under the title. */\n description?: ReactNode;\n /**\n * Consequence bullets rendered as a list at the top of the body — one item\n * per outcome (what is deleted, what survives, who loses access). Use on\n * destructive confirms where the one-line description undersells the\n * impact; keep each item to a single short sentence. Wrap the load-bearing\n * figure in `<strong>` (\"<strong>3 members</strong> lose access\") — the\n * list styles it (secondary ink, medium weight); no classes needed.\n */\n consequences?: ReactNode[];\n /**\n * Final cautionary line under `consequences` — error ink at description\n * size (e.g. \"It cannot be undone. Please be certain.\"). Reserve it for\n * irreversible actions; keep it short.\n */\n warning?: ReactNode;\n /**\n * Footer action row (Cancel / Confirm, etc.). Iron rule: when `actions` is\n * set, the header close button is never shown — dismiss via the actions.\n */\n actions?: ReactNode;\n /**\n * A quiet footnote at the panel's foot — the limit, cost or policy that\n * frames the decision without being it (\"You may change these up to five\n * times a week.\"). Description ink at `text-xs`, at the action row's\n * start with the actions at its end; when the row runs short of room it\n * takes a line of its own above them. One short sentence.\n */\n caption?: ReactNode;\n /**\n * Header close control. Only applies when `actions` is absent.\n * @default true\n */\n showClose?: boolean;\n children?: ReactNode;\n}\n\n/**\n * Convenience panel: renders the portal, backdrop, and styled popup with an\n * optional header (title/description + close) and optional action row. For\n * full control, compose the parts directly (`Dialog.Portal` /\n * `Dialog.Backdrop` / `Dialog.Popup`).\n */\nfunction Content({\n icon,\n title,\n description,\n consequences,\n warning,\n actions,\n caption,\n showClose = true,\n children,\n className,\n ...props\n}: ContentProps) {\n // Iron rule: action dialogs dismiss via their actions — never a header X.\n const showCloseButton = actions == null && showClose;\n const hasHeader = Boolean(icon || title || description || showCloseButton);\n const hasConsequences = consequences != null && consequences.length > 0;\n // The scrollable middle region — actions stay pinned below it.\n const hasScrollBody = hasConsequences || warning != null || children != null;\n\n return (\n <Portal>\n <Backdrop />\n <Popup className={className} {...props}>\n {hasHeader && (\n <div className=\"flex shrink-0 flex-col gap-1 px-6 pt-6\">\n {icon && <DialogHeaderIcon>{icon}</DialogHeaderIcon>}\n {(title || showCloseButton) && (\n // Title row height = title only. Close is out of flow, centered\n // on the row, and may paint outside it (no clip, no stretch).\n <div className=\"relative\">\n {title ? (\n <Title className={showCloseButton ? \"pr-12\" : undefined}>\n {title}\n </Title>\n ) : (\n <div className=\"h-[1.625rem]\" aria-hidden=\"true\" />\n )}\n {showCloseButton && (\n <Close\n render={\n <CloseButton className=\"absolute top-1/2 right-0 z-10 -translate-y-1/2\" />\n }\n />\n )}\n </div>\n )}\n {description && <Description>{description}</Description>}\n </div>\n )}\n {hasScrollBody && (\n <ScrollArea.Root className=\"min-h-0 flex-1\">\n <ScrollArea.Viewport>\n <ScrollArea.Content className=\"flex flex-col gap-5 px-6 py-5\">\n {hasConsequences && (\n <ul className=\"text-pho-description text-md [&_strong]:text-pho-secondary space-y-1 [&_strong]:font-medium\">\n {consequences.map((item, index) => (\n // Hand-drawn marker: a 4px dot on the first line's center —\n // quieter than the browser disc, ink tracks the text.\n <li\n key={index}\n className=\"relative pl-4 before:absolute before:top-2.5 before:left-1 before:size-1 before:rounded-full before:bg-current\"\n >\n {item}\n </li>\n ))}\n </ul>\n )}\n {warning != null && (\n <p className=\"text-pho-error text-display-xs font-medium\">\n {warning}\n </p>\n )}\n {children}\n </ScrollArea.Content>\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar>\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea.Root>\n )}\n {(actions != null || caption != null) && (\n <div\n className={cn(\n \"flex shrink-0 flex-wrap items-center justify-end gap-x-2 gap-y-3 px-6 pb-5\",\n !hasScrollBody && \"pt-5\",\n )}\n >\n {caption != null && (\n // Grows into the row's free width, never under 12rem: below\n // that it wraps to a line of its own above the actions.\n <p\n data-dialog-caption=\"\"\n className=\"text-pho-description min-w-48 flex-1 pr-2 text-xs\"\n >\n {caption}\n </p>\n )}\n {actions}\n </div>\n )}\n </Popup>\n </Portal>\n );\n}\n\n/* =========================== Dialog.InsetContent =========================== */\n\n/**\n * Near-fullscreen popup — the viewport minus a breathing ring, floating over\n * a backdrop (the page stays visible through the gap, so it dims like any\n * floating layer). Still a card: border, elevation, rounded corners; the\n * scale gesture stays but shrinks to 98% — at this size 95% reads like a jump.\n */\nfunction InsetPopup({\n className,\n ...props\n}: StyledProps<typeof BaseDialog.Popup>) {\n return (\n <BaseDialog.Popup\n className={cn(\n \"border-pho-secondary bg-pho-primary shadow-pho-xl fixed inset-4 z-50 flex flex-col overflow-hidden rounded-lg border outline-none sm:inset-8\",\n \"transition-[opacity,scale] duration-200 ease-out\",\n \"data-[starting-style]:scale-[0.98] data-[starting-style]:opacity-0\",\n \"data-[ending-style]:scale-[0.98] data-[ending-style]:opacity-0 data-[ending-style]:duration-150\",\n className,\n )}\n {...props}\n />\n );\n}\n\ninterface InsetContentProps extends Omit<\n StyledProps<typeof BaseDialog.Popup>,\n \"title\"\n> {\n /** Decorative icon above the title — same treatment as `Content`. */\n icon?: ReactNode;\n /** Heading rendered in the panel header. */\n title?: ReactNode;\n /** Supporting text under the title. */\n description?: ReactNode;\n /**\n * Bottom action row. Iron rule as `Content`: when `actions` is set, the\n * header close button is never shown — dismiss via the actions.\n */\n actions?: ReactNode;\n /**\n * Header close control. Only applies when `actions` is absent.\n * @default true\n */\n showClose?: boolean;\n children?: ReactNode;\n}\n\n/**\n * Convenience near-fullscreen panel: header pinned on top, body filling and\n * scrolling on its own, optional action row pinned at the bottom. Sits\n * between `Content` (a focused card) and `FullscreenContent` (a page\n * takeover): use it for roomy working surfaces — pickers, editors, previews —\n * that still want the page peeking through an edge.\n */\nfunction InsetContent({\n icon,\n title,\n description,\n actions,\n showClose = true,\n children,\n className,\n ...props\n}: InsetContentProps) {\n // Iron rule: action dialogs dismiss via their actions — never a header X.\n const showCloseButton = actions == null && showClose;\n const hasHeader = Boolean(icon || title || description || showCloseButton);\n\n return (\n <Portal>\n <Backdrop />\n <InsetPopup className={className} {...props}>\n {hasHeader && (\n <div className=\"flex shrink-0 flex-col gap-1 px-6 pt-6\">\n {icon && <DialogHeaderIcon>{icon}</DialogHeaderIcon>}\n {(title || showCloseButton) && (\n <div className=\"relative\">\n {title ? (\n <Title className={showCloseButton ? \"pr-12\" : undefined}>\n {title}\n </Title>\n ) : (\n <div className=\"h-[1.625rem]\" aria-hidden=\"true\" />\n )}\n {showCloseButton && (\n <Close\n render={\n <CloseButton className=\"absolute top-1/2 right-0 z-10 -translate-y-1/2\" />\n }\n />\n )}\n </div>\n )}\n {description && <Description>{description}</Description>}\n </div>\n )}\n <ScrollArea.Root className=\"min-h-0 flex-1\">\n <ScrollArea.Viewport>\n <ScrollArea.Content className=\"px-6 py-5\">\n {children}\n </ScrollArea.Content>\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar>\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea.Root>\n {actions != null && (\n <div className=\"flex shrink-0 items-center justify-end gap-2 px-6 pb-5\">\n {actions}\n </div>\n )}\n </InsetPopup>\n </Portal>\n );\n}\n\n/* ========================= Dialog.FullscreenContent ======================== */\n\n/**\n * Full-viewport popup — a page-surface takeover instead of a floating card.\n * No backdrop: the popup itself is the layer. Fade only; scale is a floating-\n * card gesture and reads wrong at viewport size.\n */\nfunction FullscreenPopup({\n className,\n ...props\n}: StyledProps<typeof BaseDialog.Popup>) {\n return (\n <BaseDialog.Popup\n className={cn(\n \"bg-pho-page fixed inset-0 z-50 overflow-y-auto outline-none\",\n \"transition-opacity duration-200 ease-out\",\n \"data-[ending-style]:opacity-0 data-[ending-style]:duration-150 data-[starting-style]:opacity-0\",\n className,\n )}\n {...props}\n />\n );\n}\n\ninterface FullscreenContentProps extends Omit<\n StyledProps<typeof BaseDialog.Popup>,\n \"title\"\n> {\n /**\n * Decorative icon above the title — same chrome as `Content`, but 48px\n * (`size-12`) for viewport-scale gates.\n */\n icon?: ReactNode;\n /** Heading of the takeover. */\n title?: ReactNode;\n /** Supporting text under the title. */\n description?: ReactNode;\n /**\n * Action row under the body. Iron rule as `Content`: when `actions` is set,\n * the corner close button is never shown — dismiss via the actions.\n */\n actions?: ReactNode;\n /**\n * Corner close control. Only applies when `actions` is absent.\n * @default true\n */\n showClose?: boolean;\n /**\n * Classes on the viewport-centering frame (the `min-h-full` flex host).\n * Use to drop the default optical `pb-20` when the stack grows (e.g. a\n * captcha) so true center stays put: `frameClassName=\"pb-6\"`.\n */\n frameClassName?: string;\n children?: ReactNode;\n}\n\n/**\n * Convenience full-screen panel: the whole viewport becomes the dialog, with\n * a centered column at the standalone-flow width (28rem — the same measure as\n * onboarding / invite cards). Column height follows its content through\n * `AnimatedHeight` (same spring as the Card shell), so step swaps — phone →\n * OTP → captcha — glide instead of jumping. Use for gates the visitor must\n * deal with before the page behind makes sense (e.g. binding a phone number);\n * prefer `Content` for everything conversational.\n */\nfunction FullscreenContent({\n icon,\n title,\n description,\n actions,\n showClose = true,\n frameClassName,\n children,\n className,\n ...props\n}: FullscreenContentProps) {\n // Iron rule: action dialogs dismiss via their actions — never a corner X.\n const showCloseButton = actions == null && showClose;\n\n return (\n <Portal>\n <FullscreenPopup className={className} {...props}>\n {showCloseButton && (\n <Close\n render={<CloseButton className=\"fixed top-4 right-4 z-10\" />}\n />\n )}\n {/* Default `pb-20` optically lifts the column above true center. */}\n <div\n className={cn(\n \"flex min-h-full items-center justify-center px-6 pt-6 pb-20\",\n frameClassName,\n )}\n >\n {/* Width stays on the outer host; AnimatedHeight measures the\n header + body stack and springs its own height on content\n changes. The action row sits below it, outside the clip: while\n the body grows the container is shorter than its content for a\n few frames, and a row inside it would be cut off at the bottom\n (a pressed \"Send code\" turning grey right as a captcha mounts).\n Outside, the row rides the spring instead. */}\n <div className=\"w-full max-w-md\">\n <AnimatedHeight className=\"flex flex-col gap-5\">\n {(icon || title || description) && (\n <div className=\"flex flex-col gap-1\">\n {icon && (\n <DialogHeaderIcon size=\"lg\">{icon}</DialogHeaderIcon>\n )}\n {title && <Title>{title}</Title>}\n {description && <Description>{description}</Description>}\n </div>\n )}\n {children}\n </AnimatedHeight>\n {actions != null && (\n <div className=\"mt-5 flex items-center justify-end gap-2\">\n {actions}\n </div>\n )}\n </div>\n </div>\n </FullscreenPopup>\n </Portal>\n );\n}\n\n/**\n * Modal dialog built on Base UI `Dialog`. Controlled or uncontrolled via\n * `Dialog.Root` (`open` / `onOpenChange` / `defaultOpen`). `Dialog.Action`\n * adds native promise support: an async confirm keeps the dialog open and\n * undismissable until the work resolves.\n */\nexport const Dialog = {\n Root,\n Trigger,\n Portal,\n Backdrop,\n Popup,\n InsetPopup,\n FullscreenPop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E;AAAA,EACA,OAAAtB;AAAA,EACA,aAAAC;AAAA,EACA,OAAApB;AAAA,EACA,QAAAG;AAAA,EACA,SAAAqB;AAAA,EACA,cAAAgB;AAAA,EACA,mBAAAE;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-yAVi4cBu.js","names":["_Fragment","cn","Button","ButtonLink","createReactComponent","IconInfoCircle","IconAlertCircleFilled","Popover","StatusView","useEffect","useRef","useState","Fragment$1","jsx","jsxs","__iconNode","IconAlertTriangle","isProblem","value","v","parseProblem","error","current","depth","carried","GENERIC_ERROR_TITLE","HTTP_REASON_PHRASE","HTTP_STATUS_EXPLANATION","hasContractCode","problem","httpReasonPhrase","status","fallbackTitle","httpStatusExplanation","capitalizeFirst","text","first","upper","describeError","description","part","displayCopy","DOC_LINK_LABEL","RETRY_LABEL","Error","children","className","props","copy","ErrorDetails","requestId","statusLine","reason","RequestId","copied","setCopied","copiedTimer","ErrorView","title","icon","onRetry","actions","size","resolvedDescription","body","resolvedActions"],"sources":["../../../../node_modules/.pnpm/@tabler+icons-react@3.49.0_react@19.3.1/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.mjs","../../src/components/error/problem.ts","../../src/components/error/error.tsx"],"sourcesContent":["/**\n * @license @tabler/icons-react v3.49.0 - MIT\n *\n * This source code is licensed under the MIT license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createReactComponent from '../createReactComponent.mjs';\n\nconst __iconNode = [[\"path\", { \"d\": \"M12 9v4\", \"key\": \"svg-0\" }], [\"path\", { \"d\": \"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0\", \"key\": \"svg-1\" }], [\"path\", { \"d\": \"M12 16h.01\", \"key\": \"svg-2\" }]];\nconst IconAlertTriangle = createReactComponent(\"outline\", \"alert-triangle\", \"AlertTriangle\", __iconNode);\n\nexport { __iconNode, IconAlertTriangle as default };\n","/**\n * Client-side mirror of the `@photon-hq/error` response contract — the\n * RFC 9457 Problem Details body every Photon service returns for 4xx / 5xx.\n * Machine logic branches on `code`; `title` / `detail` / `remediation` are\n * the human-readable copy, already reviewed server-side and safe to render.\n *\n * Fetch layers may also hand us a thin status-only shape when the response\n * was not ok but the body was not a contract problem — `title` + `status`\n * still count so the UI can disclose the HTTP code we already know.\n */\n\nexport interface ProblemRemediation {\n /** What the user can do about it — a full sentence. */\n action?: string;\n /** Docs URL explaining the problem. */\n documentation?: string;\n}\n\nexport interface Problem {\n /** Stable machine-readable key (`RATE_LIMITED`) — the field to branch on. */\n code?: string;\n /** Human summary of the problem type (\"Too Many Requests\"). */\n title: string;\n /** HTTP status (4xx / 5xx). */\n status: number;\n /** Problem type URI (`urn:photon:problem:*` or an https URL). */\n type?: string;\n /** Occurrence-specific human sentence. */\n detail?: string;\n /** Correlation id for support (`X-Request-ID`). */\n requestId?: string;\n remediation?: ProblemRemediation;\n /** RFC 9457 extensions (`issues`, `actualVersion`, …). */\n [extension: string]: unknown;\n}\n\n/** Structural check: `title` + a 4xx/5xx status. `code` is optional. */\nexport function isProblem(value: unknown): value is Problem {\n if (typeof value !== \"object\" || value === null) return false;\n const v = value as Record<string, unknown>;\n return (\n typeof v.title === \"string\" &&\n typeof v.status === \"number\" &&\n Number.isInteger(v.status) &&\n v.status >= 400 &&\n v.status <= 599 &&\n (v.code === undefined || typeof v.code === \"string\")\n );\n}\n\n/**\n * Find the problem a caught value carries — the value itself, one typed onto\n * an error as a `problem` field (dashboard's `ApiError` shape), or one\n * wrapped in an `Error` `cause` chain (how fetch layers usually rethrow a\n * parsed body). Returns `null` when there is none.\n */\nexport function parseProblem(error: unknown): Problem | null {\n let current: unknown = error;\n for (\n let depth = 0;\n depth < 8 && typeof current === \"object\" && current !== null;\n depth++\n ) {\n if (isProblem(current)) return current;\n const carried = (current as { problem?: unknown }).problem;\n if (isProblem(carried)) return carried;\n current = (current as { cause?: unknown }).cause;\n }\n return null;\n}\n\nexport interface ErrorDescription {\n /** Short name of the failure — the problem `title`, or a generic fallback. */\n title: string;\n /** Sentence(s) to show — `detail` and `remediation.action` joined. */\n description?: string;\n /** Docs URL from `remediation.documentation`. */\n documentation?: string;\n /** Correlation id for support. */\n requestId?: string;\n /** The matched problem, when the input carried one. */\n problem?: Problem;\n}\n\n/**\n * Anything that isn't a problem renders as this — raw `Error` messages are\n * not contract copy and never shown (the same fail-closed stance as the\n * server side of `@photon-hq/error`). Always a full sentence (trailing\n * period).\n */\nexport const GENERIC_ERROR_TITLE = \"Something went wrong.\";\n\n/** Standard reason phrases for statuses we commonly surface without a body. */\nconst HTTP_REASON_PHRASE: Record<number, string> = {\n 400: \"Bad Request\",\n 401: \"Unauthorized\",\n 403: \"Forbidden\",\n 404: \"Not Found\",\n 408: \"Request Timeout\",\n 409: \"Conflict\",\n 410: \"Gone\",\n 413: \"Payload Too Large\",\n 415: \"Unsupported Media Type\",\n 422: \"Unprocessable Entity\",\n 429: \"Too Many Requests\",\n 500: \"Internal Server Error\",\n 501: \"Not Implemented\",\n 502: \"Bad Gateway\",\n 503: \"Service Unavailable\",\n 504: \"Gateway Timeout\",\n};\n\n/** One-sentence explanations when the server gave a status but no problem copy. */\nconst HTTP_STATUS_EXPLANATION: Record<number, string> = {\n 400: \"The request was malformed or incomplete.\",\n 401: \"You need to sign in again.\",\n 403: \"You don't have permission to do that.\",\n 404: \"The requested resource was not found.\",\n 408: \"The request timed out before the server responded.\",\n 409: \"The request conflicts with the current state.\",\n 410: \"That resource is no longer available.\",\n 413: \"The request was too large for the server to accept.\",\n 415: \"That media type isn't supported.\",\n 422: \"The request was understood but couldn't be processed.\",\n 429: \"Request rate limit exceeded. Wait a moment before trying again.\",\n 500: \"The server hit an unexpected error.\",\n 501: \"The server doesn't support that operation.\",\n 502: \"The gateway got an invalid response from an upstream server.\",\n 503: \"The service is temporarily unavailable.\",\n 504: \"The gateway timed out waiting for an upstream server.\",\n};\n\nfunction hasContractCode(problem: Problem): boolean {\n return typeof problem.code === \"string\" && problem.code !== \"\";\n}\n\n/** Reason phrase for a status — map first, then a non-generic `problem.title`. */\nexport function httpReasonPhrase(\n status: number,\n fallbackTitle?: string,\n): string | undefined {\n if (HTTP_REASON_PHRASE[status]) return HTTP_REASON_PHRASE[status];\n if (\n fallbackTitle &&\n fallbackTitle !== GENERIC_ERROR_TITLE &&\n fallbackTitle !== \"Request failed\"\n ) {\n return fallbackTitle.replace(/\\.$/, \"\");\n }\n return undefined;\n}\n\n/** Human sentence for a bare HTTP status, when the body carried no copy. */\nexport function httpStatusExplanation(status: number): string {\n return (\n HTTP_STATUS_EXPLANATION[status] ??\n \"The request failed with an unexpected status.\"\n );\n}\n\n/**\n * Sentence-case the first character. Server `detail` / `title` sometimes\n * arrive fully lowercase; UI copy always leads with a capital.\n */\nexport function capitalizeFirst(text: string): string {\n if (!text) return text;\n const first = text.charAt(0);\n const upper = first.toUpperCase();\n if (first === upper) return text;\n return upper + text.slice(1);\n}\n\n/**\n * Turn a caught value into displayable copy. `Error` and `ErrorView` call\n * this internally; use it directly for other surfaces (a toast, a banner).\n *\n * Status-only failures (HTTP not ok, but no contract `code` / copy) still\n * keep `problem` so the details panel can show the status. Title becomes the\n * reason phrase (e.g. \"Bad Gateway\"); description is a short explanation —\n * not just the numeric code.\n */\nexport function describeError(error: unknown): ErrorDescription {\n const problem = parseProblem(error);\n if (problem == null) return { title: GENERIC_ERROR_TITLE };\n\n const description =\n [problem.detail, problem.remediation?.action]\n .filter((part): part is string => typeof part === \"string\" && part !== \"\")\n .join(\" \") || undefined;\n\n if (!hasContractCode(problem) && description == null) {\n const reason = httpReasonPhrase(problem.status, problem.title);\n return {\n title: capitalizeFirst(reason ?? GENERIC_ERROR_TITLE),\n description: httpStatusExplanation(problem.status),\n requestId: problem.requestId,\n problem,\n };\n }\n\n return {\n title: capitalizeFirst(problem.title || GENERIC_ERROR_TITLE),\n description: description ? capitalizeFirst(description) : undefined,\n documentation: problem.remediation?.documentation,\n requestId: problem.requestId,\n problem,\n };\n}\n","import {\n useEffect,\n useRef,\n useState,\n type ComponentProps,\n type ReactNode,\n} from \"react\";\nimport {\n IconAlertCircleFilled,\n IconAlertTriangle,\n IconInfoCircle,\n} from \"@tabler/icons-react\";\nimport { cn } from \"../../utils/cn\";\nimport { Button, ButtonLink } from \"../button/button\";\nimport { Popover } from \"../popover/popover\";\nimport { StatusView, type StatusViewSize } from \"../status-view/status-view\";\nimport {\n capitalizeFirst,\n describeError,\n httpReasonPhrase,\n type ErrorDescription,\n} from \"./problem\";\n\n/** Capitalize string copy; leave custom ReactNode overrides alone. */\nfunction displayCopy(value: ReactNode): ReactNode {\n return typeof value === \"string\" ? capitalizeFirst(value) : value;\n}\n\n/**\n * Design notes:\n * - ONE input: `error` is the caught value, whatever it is — a Problem\n * Details body from `@photon-hq/error`, an `Error` carrying one as\n * `cause`, or something unknown. The component derives its copy via\n * `describeError`; unknowns fall back to a generic line rather than\n * leaking raw messages.\n * - TWO presentations, one per altitude: `Error` is the inline line for\n * forms, cards, and action rows; `ErrorView` is the region / page state\n * built on StatusView (same `sm` / `base` size axis).\n * - Both render `null` when there is nothing to show, so they can sit\n * unconditionally in JSX (`<Error error={mutation.error} />`).\n * - Client-side *validation* is not this component's job — that belongs to\n * `Field.Error`, wired to control validity.\n */\n\nconst DOC_LINK_LABEL = \"Learn more\";\nconst RETRY_LABEL = \"Try again\";\n\ninterface ErrorBaseProps {\n /** The caught value — a problem body, an `Error` wrapping one, or unknown. */\n error?: unknown;\n /** Override the derived message. */\n children?: ReactNode;\n}\n\nexport interface ErrorProps\n extends ErrorBaseProps, Omit<ComponentProps<\"div\">, keyof ErrorBaseProps> {}\n\n/**\n * Error — one line of red ink naming a server failure (4xx / 5xx), placed\n * inline: under a form, in a card, beside the action that failed. Give it the\n * caught value and it renders the problem's `detail` (falling back to `title`,\n * then to a generic line), plus a docs link when the problem carries one.\n * Renders nothing while `error` is nullish, so it can stay mounted.\n *\n * For a region or page that failed to load, use {@link ErrorView}.\n */\nexport function Error({ error, children, className, ...props }: ErrorProps) {\n if (error == null && children == null) return null;\n const copy = describeError(error);\n return (\n <div\n role=\"alert\"\n className={cn(\n \"text-pho-error flex min-w-0 items-start gap-1.5 text-base\",\n className,\n )}\n {...props}\n >\n <span aria-hidden className=\"flex h-[1lh] shrink-0 items-center\">\n <IconAlertCircleFilled className=\"size-4\" />\n </span>\n <span className=\"min-w-0\">\n {displayCopy(children ?? copy.description ?? copy.title)}\n {copy.documentation != null && (\n <>\n {\" \"}\n <a\n href={copy.documentation}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"font-medium underline underline-offset-2\"\n >\n {DOC_LINK_LABEL}\n </a>\n </>\n )}\n {/* Trailing whitespace collapses when the details render null. */}{\" \"}\n <ErrorDetails copy={copy} />\n </span>\n </div>\n );\n}\n\nError.displayName = \"Error\";\n\n/**\n * Hover / focus disclosure on the inline line — the request's fuller story:\n * problem `title` (with the same alert icon + `text-pho-error` ink as the\n * inline line), the untruncated description, then `status` + `code` and the\n * copyable request id grouped below for a support handoff. Renders only when\n * the caught value actually carried a problem (or at least a request id); a\n * generic unknown has nothing more to disclose. Built on `Popover` rather\n * than `Tooltip` because the panel holds an interactive control (the copy\n * button) — `openOnHover` keeps the tooltip-like gesture.\n */\nfunction ErrorDetails({ copy }: { copy: ErrorDescription }) {\n const { problem, requestId } = copy;\n if (problem == null && requestId == null) return null;\n\n // Contract problems show `status CODE`; status-only shows `status Reason`.\n let statusLine: string | null = null;\n if (problem != null) {\n if (problem.code) {\n statusLine = `${problem.status} ${problem.code}`;\n } else {\n const reason = httpReasonPhrase(problem.status, problem.title);\n statusLine = reason\n ? `${problem.status} ${reason}`\n : String(problem.status);\n }\n }\n\n return (\n <Popover.Root>\n <Popover.Trigger\n openOnHover\n delay={150}\n aria-label=\"Error details\"\n className=\"outline-pho-brand inline-flex size-4 shrink-0 translate-y-[3px] cursor-help items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100 focus-visible:opacity-100 focus-visible:outline-2\"\n >\n <IconInfoCircle className=\"size-3.5\" />\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Positioner align=\"start\">\n <Popover.Popup className=\"text-pho-error\">\n <Popover.Title className=\"text-pho-error flex items-start gap-1.5\">\n <span aria-hidden className=\"flex h-[1lh] shrink-0 items-center\">\n <IconAlertCircleFilled className=\"size-4\" />\n </span>\n {copy.title}\n </Popover.Title>\n {copy.description != null && (\n <Popover.Description className=\"text-pho-error\">\n {copy.description}\n </Popover.Description>\n )}\n {(statusLine != null || requestId != null) && (\n <div className=\"text-pho-error mt-1 font-mono text-[10px] leading-snug\">\n {statusLine != null && <p>{statusLine}</p>}\n {requestId != null && (\n <RequestId requestId={requestId} className=\"mt-0\" />\n )}\n </div>\n )}\n </Popover.Popup>\n </Popover.Positioner>\n </Popover.Portal>\n </Popover.Root>\n );\n}\n\n/** Request-id footnote — click copies the id for support handoff. */\nfunction RequestId({\n requestId,\n className,\n}: {\n requestId: string;\n className?: string;\n}) {\n const [copied, setCopied] = useState(false);\n const copiedTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(\n () => () => {\n if (copiedTimer.current) clearTimeout(copiedTimer.current);\n },\n [],\n );\n\n return (\n <span\n className={cn(\"mt-1 block font-mono text-[10px] leading-snug\", className)}\n >\n Request ID:{\" \"}\n <button\n type=\"button\"\n className=\"outline-pho-brand inline cursor-pointer underline-offset-2 select-all hover:underline focus-visible:underline focus-visible:outline-2 focus-visible:-outline-offset-1\"\n aria-label={\n copied ? \"Request ID copied\" : `Copy request ID ${requestId}`\n }\n onClick={async () => {\n try {\n await navigator.clipboard.writeText(requestId);\n } catch {\n return;\n }\n setCopied(true);\n if (copiedTimer.current) clearTimeout(copiedTimer.current);\n copiedTimer.current = setTimeout(() => setCopied(false), 1500);\n }}\n >\n {requestId}\n </button>\n <output className=\"sr-only\" aria-live=\"polite\">\n {copied ? \"Copied\" : \"\"}\n </output>\n </span>\n );\n}\n\ninterface ErrorViewBaseProps {\n /** The caught value — a problem body, an `Error` wrapping one, or unknown. */\n error?: unknown;\n /** Override the derived title. */\n title?: ReactNode;\n /** Override the derived description. */\n description?: ReactNode;\n /** Override the warning glyph. */\n icon?: ReactNode;\n /** Offer a retry — renders a \"Try again\" button. */\n onRetry?: () => void;\n /** Replace the built-in action row entirely. */\n actions?: ReactNode;\n /** Size variant — StatusView's axis. @default \"base\" */\n size?: StatusViewSize;\n}\n\nexport interface ErrorViewProps\n extends\n ErrorViewBaseProps,\n Omit<ComponentProps<\"div\">, keyof ErrorViewBaseProps | \"children\"> {}\n\n/**\n * ErrorView — the failed state of a region or page, built on StatusView:\n * warning icon over the problem's `title`, its `detail` and remediation\n * below, an action row (`onRetry` and the problem's docs link), and the\n * request id as a footnote for support. Announces via `role=\"alert\"`.\n *\n * Use `size=\"sm\"` inside cards and panels, the default `base` for whole\n * pages. Renders nothing while `error` is nullish (unless given a static\n * `title`), so it can sit unconditionally next to a query.\n */\nexport function ErrorView({\n error,\n title,\n description,\n icon,\n onRetry,\n actions,\n size = \"base\",\n ...props\n}: ErrorViewProps) {\n if (error == null && title == null) return null;\n const copy = describeError(error);\n\n const resolvedDescription = displayCopy(description ?? copy.description);\n const body =\n resolvedDescription != null || copy.requestId != null ? (\n <>\n {resolvedDescription}\n {copy.requestId != null && <RequestId requestId={copy.requestId} />}\n </>\n ) : undefined;\n\n const resolvedActions =\n actions ??\n (onRetry != null || copy.documentation != null ? (\n <>\n {onRetry != null && (\n <Button size=\"sm\" onClick={onRetry}>\n {RETRY_LABEL}\n </Button>\n )}\n {copy.documentation != null && (\n <ButtonLink\n size=\"sm\"\n variant=\"outlined\"\n href={copy.documentation}\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n {DOC_LINK_LABEL}\n </ButtonLink>\n )}\n </>\n ) : undefined);\n\n return (\n <StatusView\n role=\"alert\"\n size={size}\n icon={icon ?? <IconAlertTriangle />}\n title={displayCopy(title ?? copy.title)}\n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