@photon-ai/pho-ui 4.20.0 → 4.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/README.md +1 -1
  2. package/dist/chunks/{basic-page-DTomHxEo.js → basic-page-B78a6jpw.js} +4 -4
  3. package/dist/chunks/{basic-page-DTomHxEo.js.map → basic-page-B78a6jpw.js.map} +1 -1
  4. package/dist/chunks/chat-Dfbkf7g8.js +674 -0
  5. package/dist/chunks/chat-Dfbkf7g8.js.map +1 -0
  6. package/dist/chunks/{code-block-Yxg2wZGJ.js → code-block-B7MibV6r.js} +2 -2
  7. package/dist/chunks/{code-block-Yxg2wZGJ.js.map → code-block-B7MibV6r.js.map} +1 -1
  8. package/dist/chunks/{dialog-DORIrfyJ.js → dialog-CDL6qY2a.js} +2 -2
  9. package/dist/chunks/{dialog-DORIrfyJ.js.map → dialog-CDL6qY2a.js.map} +1 -1
  10. package/dist/chunks/{scroll-area-Dhl5hqay.js → scroll-area-DjdSnx2p.js} +2 -2
  11. package/dist/chunks/scroll-area-DjdSnx2p.js.map +1 -0
  12. package/dist/chunks/{sidebar-CgaSEWVr.js → sidebar-DHYyBBUj.js} +2 -2
  13. package/dist/chunks/{sidebar-CgaSEWVr.js.map → sidebar-DHYyBBUj.js.map} +1 -1
  14. package/dist/chunks/{toast-B3oURNJC.js → toast-B1GAdxXP.js} +2 -2
  15. package/dist/chunks/{toast-B3oURNJC.js.map → toast-B1GAdxXP.js.map} +1 -1
  16. package/dist/components/chat.js +1 -1
  17. package/dist/components/code-block.js +1 -1
  18. package/dist/components/command.js +1 -1
  19. package/dist/components/dialog.js +1 -1
  20. package/dist/components/scroll-area.js +1 -1
  21. package/dist/components/toast.js +1 -1
  22. package/dist/index.js +5 -5
  23. package/dist/sections/basic-page.js +1 -1
  24. package/dist/sections/sidebar.js +1 -1
  25. package/dist/src/components/chat/chat.d.ts +9 -4
  26. package/dist/src/components/scroll-area/scroll-area-edges.d.ts +1 -0
  27. package/package.json +1 -1
  28. package/src/styles/fonts.css +45 -8
  29. package/src/styles/theme.css +5 -5
  30. package/dist/chunks/chat-ZUzGmTWE.js +0 -621
  31. package/dist/chunks/chat-ZUzGmTWE.js.map +0 -1
  32. package/dist/chunks/scroll-area-Dhl5hqay.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { a as s, c as e, d as i, i as g, l as o, n as h, o as l, r, s as t, t as n, u as A } from "../chunks/code-block-Yxg2wZGJ.js";
2
+ import { a as s, c as e, d as i, i as g, l as o, n as h, o as l, r, s as t, t as n, u as A } from "../chunks/code-block-B7MibV6r.js";
3
3
  export {
4
4
  o as CODE_GRAMMARS,
5
5
  e as CODE_TOKEN_CLASS,
@@ -5,7 +5,7 @@ import { SPRING_SETTLE as P } from "../motion.js";
5
5
  import { t as j } from "../chunks/IconArrowUpRight-OK8Fp0KQ.js";
6
6
  import { t as V } from "../chunks/IconChevronLeft-CptqhdxO.js";
7
7
  import { t as Z } from "../chunks/animated-height-zr7BmFY1.js";
8
- import { t as u } from "../chunks/dialog-DORIrfyJ.js";
8
+ import { t as u } from "../chunks/dialog-CDL6qY2a.js";
9
9
  import { useEffect as $, useId as z, useLayoutEffect as A, useRef as F } from "react";
10
10
  import { Fragment as E, jsx as t, jsxs as d } from "react/jsx-runtime";
11
11
  import { LayoutGroup as H, motion as g, useReducedMotion as B } from "motion/react";
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { n as i, t as o } from "../chunks/dialog-DORIrfyJ.js";
2
+ import { n as i, t as o } from "../chunks/dialog-CDL6qY2a.js";
3
3
  export {
4
4
  o as Dialog,
5
5
  i as useDialogPending
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { n as e, t as o } from "../chunks/scroll-area-Dhl5hqay.js";
2
+ import { n as e, t as o } from "../chunks/scroll-area-DjdSnx2p.js";
3
3
  export {
4
4
  e as BLUR_MAX_PX,
5
5
  o as ScrollArea
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { n as o, t as s } from "../chunks/toast-B3oURNJC.js";
2
+ import { n as o, t as s } from "../chunks/toast-B1GAdxXP.js";
3
3
  export {
4
4
  s as Toast,
5
5
  o as Toasty
package/dist/index.js CHANGED
@@ -9,12 +9,12 @@ 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
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";
12
+ import { t as Sa } from "./chunks/chat-Dfbkf7g8.js";
13
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";
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-B7MibV6r.js";
15
15
  import { n as _s, t as ns } from "./chunks/date-picker-vJQrTol9.js";
16
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";
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-DHYyBBUj.js";
18
18
  import { t as Os } from "./chunks/input-DWnb33UF.js";
19
19
  import { i as gs, n as Vs, r as hs, t as Gs } from "./chunks/filter-bar-qqCZf1x4.js";
20
20
  import { i as Ms } from "./chunks/data-table-CAz_8HQw.js";
@@ -23,10 +23,10 @@ import { t as ws } from "./chunks/calendar-DDWITGo4.js";
23
23
  import { t as ys } from "./chunks/close-button-Ck4rY1Fp.js";
24
24
  import { t as Ks } from "./chunks/input-group-C3upo2OU.js";
25
25
  import { n as zs, t as Xs } from "./chunks/card-Bg2V2B0x.js";
26
- import { n as Zs, t as js } from "./chunks/dialog-DORIrfyJ.js";
26
+ import { n as Zs, t as js } from "./chunks/dialog-CDL6qY2a.js";
27
27
  import { i as Qs, n as qs, r as $s, t as at } from "./chunks/status-view-I_Y6eEyX.js";
28
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-DTomHxEo.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-B78a6jpw.js";
30
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
32
  import { t as dt } from "./chunks/bar-chart-ZNuOoH7c.js";
@@ -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-DTomHxEo.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-B78a6jpw.js";
4
4
  export {
5
5
  D as AUTO_SAVE_DELAY_MS,
6
6
  B as BASIC_PAGE_CALLOUT,
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { a as I, c as _, d as S, i as R, l as A, n as B, o as T, r as a, s, t as D, u as N } from "../chunks/sidebar-CgaSEWVr.js";
2
+ import { a as I, c as _, d as S, i as R, l as A, n as B, o as T, r as a, s, t as D, u as N } from "../chunks/sidebar-DHYyBBUj.js";
3
3
  export {
4
4
  D as SIDEBAR_HEADER_INSET,
5
5
  B as SIDEBAR_ITEM,
@@ -186,9 +186,9 @@ declare function Title({ className, children, ...props }: ComponentProps<"h2">):
186
186
  /** One line under the title — from whom, a status. */
187
187
  declare function Description({ className, ...props }: ComponentProps<"p">): import('react').JSX.Element;
188
188
  export interface ChatMessagesProps extends ComponentProps<"div"> {
189
- /** Earlier pages exist — a button at the top asks for them. */
189
+ /** Earlier pages exist — the top of the pane asks for them. */
190
190
  hasEarlier?: boolean;
191
- /** The earlier page is on its way. */
191
+ /** The earlier page is on its way — a spinner shows and nothing is asked. */
192
192
  loadingEarlier?: boolean;
193
193
  /** Ask for the page before the first message shown. */
194
194
  onLoadEarlier?: () => void;
@@ -198,8 +198,13 @@ export interface ChatMessagesProps extends ComponentProps<"div"> {
198
198
  /**
199
199
  * The messages, oldest to newest, on the thread surface. The pane starts at
200
200
  * the bottom and stays there as messages arrive unless the reader has
201
- * scrolled up; an earlier page keeps what they were reading in place.
202
- * Children are `Message` rows and `Divider`s.
201
+ * scrolled up. With `hasEarlier`, the earlier page is asked for as the top
202
+ * comes into view (an `IntersectionObserver`, 200px ahead) — the same
203
+ * request as the button there, which stays for keyboards and for a browser
204
+ * without the observer. While `loadingEarlier` a spinner takes its place,
205
+ * and when the page arrives above, what they were reading stays put.
206
+ * Children are `Message` rows and `Divider`s. Its state belongs to one
207
+ * conversation: key the `Thread` by it.
203
208
  */
204
209
  declare function Messages({ hasEarlier, loadingEarlier, onLoadEarlier, earlierLabel, className, children, ...props }: ChatMessagesProps): import('react').JSX.Element;
205
210
  /** A centered caption in the thread — the day, "Unread". */
@@ -8,6 +8,7 @@ export declare const EDGE_REVEAL_PX = 32;
8
8
  * every soft focus in the product is the same soft focus.
9
9
  */
10
10
  export declare const BLUR_MAX_PX = 1;
11
+ export declare function washGradient(edge: "top" | "bottom", surface: string): string;
11
12
  export declare function paintEdge(node: HTMLDivElement | null, progress: number): void;
12
13
  export declare function Edge({ edge, edgeRef, surface, className, }: {
13
14
  edge: "top" | "bottom";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@photon-ai/pho-ui",
3
- "version": "4.20.0",
3
+ "version": "4.21.0",
4
4
  "description": "Photon Design System — Photon's React component library, built on Base UI",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Photon brand fonts. PolySans (commercial) is served from the shared asset
3
3
  * CDN (assets.photon.codes — public R2, versioned path, immutable caching,
4
- * CORS enabled). Inter and Azeret Mono are open Google Fonts, declared below
4
+ * CORS enabled). Geist and Azeret Mono are open Google Fonts, declared below
5
5
  * against the Google Fonts CDN (fonts.gstatic.com), one face per script
6
6
  * subset with its `unicode-range`. They are spelled out rather than pulled in
7
7
  * with an `@import` of Google's stylesheet: once this file is bundled into an
@@ -13,7 +13,7 @@
13
13
  * this import and declare the same @font-face rules against your own /fonts/
14
14
  * paths — the theme only references the family names.
15
15
  *
16
- * Roles: Inter is the text — body at 400, UI controls, navigation, and links
16
+ * Roles: Geist is the text — body at 400, UI controls, navigation, and links
17
17
  * at 600 (`font-medium`). PolySans is the headings — page, section, card,
18
18
  * and step titles at Median 600 (`font-heading`); the `font-display`
19
19
  * utility adds `ss02` for dialog and hero titles. Azeret Mono for code and
@@ -48,10 +48,10 @@
48
48
  font-display: swap;
49
49
  }
50
50
 
51
- /* Inter, latin */
51
+ /* Geist, latin */
52
52
  @font-face {
53
- font-family: "Inter";
54
- src: url("https://fonts.gstatic.com/s/inter/v20/UcCo3FwrK3iLTcviYwY.woff2")
53
+ font-family: "Geist";
54
+ src: url("https://fonts.gstatic.com/s/geist/v5/gyByhwUxId8gMEwcGFU.woff2")
55
55
  format("woff2");
56
56
  font-weight: 100 900;
57
57
  font-style: normal;
@@ -62,10 +62,10 @@
62
62
  U+2215, U+FEFF, U+FFFD;
63
63
  }
64
64
 
65
- /* Inter, latin-ext */
65
+ /* Geist, latin-ext */
66
66
  @font-face {
67
- font-family: "Inter";
68
- src: url("https://fonts.gstatic.com/s/inter/v20/UcCo3FwrK3iLTcvsYwYL8g.woff2")
67
+ font-family: "Geist";
68
+ src: url("https://fonts.gstatic.com/s/geist/v5/gyByhwUxId8gMEwSGFWfOw.woff2")
69
69
  format("woff2");
70
70
  font-weight: 100 900;
71
71
  font-style: normal;
@@ -76,6 +76,43 @@
76
76
  U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
77
77
  }
78
78
 
79
+ /* Geist, cyrillic */
80
+ @font-face {
81
+ font-family: "Geist";
82
+ src: url("https://fonts.gstatic.com/s/geist/v5/gyByhwUxId8gMEwYGFWfOw.woff2")
83
+ format("woff2");
84
+ font-weight: 100 900;
85
+ font-style: normal;
86
+ font-display: swap;
87
+ unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
88
+ }
89
+
90
+ /* Geist, cyrillic-ext */
91
+ @font-face {
92
+ font-family: "Geist";
93
+ src: url("https://fonts.gstatic.com/s/geist/v5/gyByhwUxId8gMEwRGFWfOw.woff2")
94
+ format("woff2");
95
+ font-weight: 100 900;
96
+ font-style: normal;
97
+ font-display: swap;
98
+ unicode-range:
99
+ U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
100
+ }
101
+
102
+ /* Geist, vietnamese */
103
+ @font-face {
104
+ font-family: "Geist";
105
+ src: url("https://fonts.gstatic.com/s/geist/v5/gyByhwUxId8gMEwTGFWfOw.woff2")
106
+ format("woff2");
107
+ font-weight: 100 900;
108
+ font-style: normal;
109
+ font-display: swap;
110
+ unicode-range:
111
+ U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
112
+ U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
113
+ U+1EA0-1EF9, U+20AB;
114
+ }
115
+
79
116
  /* Azeret Mono, latin */
80
117
  @font-face {
81
118
  font-family: "Azeret Mono";
@@ -25,11 +25,11 @@
25
25
 
26
26
  @theme static {
27
27
  /* ============================== Fonts ============================== */
28
- /* Two voices: Inter carries the text (body, UI controls, navigation,
28
+ /* Two voices: Geist carries the text (body, UI controls, navigation,
29
29
  links: the default `font-sans`), PolySans carries the headings (page,
30
30
  section, card, and step titles: `font-heading`). */
31
31
  --font-sans:
32
- "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial,
32
+ "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial,
33
33
  sans-serif;
34
34
  --font-heading:
35
35
  "PolySans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
@@ -188,9 +188,9 @@
188
188
  /* ========================== Font weights ========================== */
189
189
  /* CLOSED set — three stops only; nothing else generates a utility:
190
190
  font-light (300) display/marketing lines · font-normal (400) body ·
191
- font-medium (600) UI controls, headings, and hero slogans: Inter Semi
192
- Bold in text, PolySans Median in headings. font-semibold is gone — use
193
- font-medium. */
191
+ font-medium (600) UI controls, headings, and hero slogans: Geist
192
+ SemiBold in text, PolySans Median in headings. font-semibold is gone —
193
+ use font-medium. */
194
194
  --font-weight-*: initial;
195
195
  --font-weight-light: 300;
196
196
  --font-weight-normal: 400;