@photon-ai/pho-ui 2.16.0 → 3.0.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/IconArrowsMinimize-BfPUGuCB.js +75 -0
- package/dist/chunks/IconArrowsMinimize-BfPUGuCB.js.map +1 -0
- package/dist/chunks/IconChevronUp-CrpWSgIl.js +11 -0
- package/dist/chunks/IconChevronUp-CrpWSgIl.js.map +1 -0
- package/dist/chunks/{bar-chart-BJfr3eyd.js → bar-chart-DIALC2_z.js} +2 -2
- package/dist/chunks/bar-chart-DIALC2_z.js.map +1 -0
- package/dist/chunks/basic-page-CYDwfVjO.js +1749 -0
- package/dist/chunks/basic-page-CYDwfVjO.js.map +1 -0
- package/dist/chunks/calendar-4OFiCLAv.js +292 -0
- package/dist/chunks/calendar-4OFiCLAv.js.map +1 -0
- package/dist/chunks/card-DhDwtSi9.js +56 -0
- package/dist/chunks/card-DhDwtSi9.js.map +1 -0
- package/dist/chunks/code-block-BuDIo8Q0.js +197 -0
- package/dist/chunks/code-block-BuDIo8Q0.js.map +1 -0
- package/dist/chunks/collapsible-if7ncPbI.js +28 -0
- package/dist/chunks/collapsible-if7ncPbI.js.map +1 -0
- package/dist/chunks/{command-Ck8IAgV7.js → command-CTYrSz9a.js} +2 -2
- package/dist/chunks/{command-Ck8IAgV7.js.map → command-CTYrSz9a.js.map} +1 -1
- package/dist/chunks/data-table-DcwCgXJU.js +293 -0
- package/dist/chunks/data-table-DcwCgXJU.js.map +1 -0
- package/dist/chunks/date-picker-Bwa6J4ik.js +381 -0
- package/dist/chunks/date-picker-Bwa6J4ik.js.map +1 -0
- package/dist/chunks/{dialog-BxKACOj5.js → dialog-BwfUFn6B.js} +2 -2
- package/dist/chunks/{dialog-BxKACOj5.js.map → dialog-BwfUFn6B.js.map} +1 -1
- package/dist/chunks/{error-D0yoFxCv.js → error-BAQgnde7.js} +2 -2
- package/dist/chunks/{error-D0yoFxCv.js.map → error-BAQgnde7.js.map} +1 -1
- package/dist/chunks/{filter-bar-Cjjq38xo.js → filter-bar-D9lBBr4z.js} +3 -3
- package/dist/chunks/{filter-bar-Cjjq38xo.js.map → filter-bar-D9lBBr4z.js.map} +1 -1
- package/dist/chunks/ghost-search-BvBFa9su.js +25 -0
- package/dist/chunks/ghost-search-BvBFa9su.js.map +1 -0
- package/dist/chunks/{line-chart-CUR3AxrR.js → line-chart-VuMYKzW3.js} +2 -2
- package/dist/chunks/{line-chart-CUR3AxrR.js.map → line-chart-VuMYKzW3.js.map} +1 -1
- package/dist/chunks/{log-list-0AXnjFrk.js → log-list-BERiO4UJ.js} +2 -2
- package/dist/chunks/{log-list-0AXnjFrk.js.map → log-list-BERiO4UJ.js.map} +1 -1
- package/dist/chunks/scroll-area-Zik8t1Mk.js +168 -0
- package/dist/chunks/scroll-area-Zik8t1Mk.js.map +1 -0
- package/dist/chunks/sidebar-DRPe5CAh.js +306 -0
- package/dist/chunks/sidebar-DRPe5CAh.js.map +1 -0
- package/dist/chunks/{toast-iSf6NuAS.js → toast-72Wwlzg9.js} +2 -2
- package/dist/chunks/{toast-iSf6NuAS.js.map → toast-72Wwlzg9.js.map} +1 -1
- package/dist/chunks/trace-Ba1RMBfk.js +1645 -0
- package/dist/chunks/trace-Ba1RMBfk.js.map +1 -0
- package/dist/chunks/use-measure-C-i54AC6.js +629 -0
- package/dist/chunks/use-measure-C-i54AC6.js.map +1 -0
- package/dist/components/bar-chart.js +1 -1
- package/dist/components/calendar.js +5 -0
- package/dist/components/card.js +1 -1
- package/dist/components/code-block.js +1 -1
- package/dist/components/collapsible.js +2 -25
- package/dist/components/command.js +1 -1
- package/dist/components/data-table.js +9 -8
- package/dist/components/date-picker.js +6 -0
- package/dist/components/dialog.js +1 -1
- package/dist/components/error.js +1 -1
- package/dist/components/filter-bar.js +1 -1
- package/dist/components/line-chart.js +1 -1
- package/dist/components/log-list.js +1 -1
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/trace.js +41 -6
- package/dist/index.js +164 -121
- package/dist/primitives.js +3 -3
- package/dist/sections/basic-page.js +5 -5
- package/dist/sections/sidebar.js +9 -6
- package/dist/src/components/calendar/calendar.d.ts +36 -0
- package/dist/src/components/calendar/index.d.ts +2 -0
- package/dist/src/components/card/card.d.ts +5 -1
- package/dist/src/components/chart/scale.d.ts +6 -1
- package/dist/src/components/code-block/code-block.d.ts +24 -5
- package/dist/src/components/code-block/index.d.ts +1 -1
- package/dist/src/components/data-table/data-table.d.ts +54 -13
- package/dist/src/components/date-picker/date-picker.d.ts +97 -0
- package/dist/src/components/date-picker/index.d.ts +2 -0
- package/dist/src/components/scroll-area/scroll-area.d.ts +9 -1
- package/dist/src/components/trace/decorations.d.ts +32 -0
- package/dist/src/components/trace/index.d.ts +5 -2
- package/dist/src/components/trace/layout.d.ts +57 -29
- package/dist/src/components/trace/span-primitive.d.ts +168 -0
- package/dist/src/components/trace/span-tree.d.ts +148 -0
- package/dist/src/components/trace/trace.d.ts +98 -16
- package/dist/src/index.d.ts +2 -0
- package/dist/src/sections/basic-page/basic-page.d.ts +95 -7
- package/dist/src/sections/basic-page/index.d.ts +1 -1
- package/dist/src/sections/sidebar/index.d.ts +1 -1
- package/dist/src/sections/sidebar/sidebar.d.ts +72 -0
- package/dist/src/utils/ghost-search.d.ts +11 -0
- package/package.json +10 -1
- package/dist/chunks/bar-chart-BJfr3eyd.js.map +0 -1
- package/dist/chunks/basic-page-CMJuM5iA.js +0 -1650
- package/dist/chunks/basic-page-CMJuM5iA.js.map +0 -1
- package/dist/chunks/card-DSW3Uhag.js +0 -56
- package/dist/chunks/card-DSW3Uhag.js.map +0 -1
- package/dist/chunks/code-block-CdozzaHM.js +0 -139
- package/dist/chunks/code-block-CdozzaHM.js.map +0 -1
- package/dist/chunks/data-table-CHLJfGkS.js +0 -279
- package/dist/chunks/data-table-CHLJfGkS.js.map +0 -1
- package/dist/chunks/scroll-area-BO-9PMM7.js +0 -167
- package/dist/chunks/scroll-area-BO-9PMM7.js.map +0 -1
- package/dist/chunks/sidebar-DVzZsCts.js +0 -223
- package/dist/chunks/sidebar-DVzZsCts.js.map +0 -1
- package/dist/chunks/trace-CbH0IohX.js +0 -314
- package/dist/chunks/trace-CbH0IohX.js.map +0 -1
- package/dist/chunks/use-measure-CMVgLouO.js +0 -616
- package/dist/chunks/use-measure-CMVgLouO.js.map +0 -1
- package/dist/components/collapsible.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line-chart-CUR3AxrR.js","names":["constant","curveLinear","x","pointX","y","pointY","array","constant","curveLinear","pointX","pointY","array","line"],"sources":["../../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/constant.js","../../../../node_modules/.pnpm/d3-path@3.1.0/node_modules/d3-path/src/path.js","../../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/path.js","../../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/array.js","../../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/linear.js","../../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/point.js","../../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/line.js","../../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/area.js","../../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/monotone.js","../../src/components/line-chart/line-chart.tsx"],"sourcesContent":["export default function(x) {\n return function constant() {\n return x;\n };\n}\n","const pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction append(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += arguments[i] + strings[i];\n }\n}\n\nfunction appendRound(digits) {\n let d = Math.floor(digits);\n if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);\n if (d > 15) return append;\n const k = 10 ** d;\n return function(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += Math.round(arguments[i] * k) / k + strings[i];\n }\n };\n}\n\nexport class Path {\n constructor(digits) {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n this._append = digits == null ? append : appendRound(digits);\n }\n moveTo(x, y) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;\n }\n closePath() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._append`Z`;\n }\n }\n lineTo(x, y) {\n this._append`L${this._x1 = +x},${this._y1 = +y}`;\n }\n quadraticCurveTo(x1, y1, x, y) {\n this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;\n }\n bezierCurveTo(x1, y1, x2, y2, x, y) {\n this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;\n }\n arcTo(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._append`M${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._append`L${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Otherwise, draw an arc!\n else {\n let x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;\n }\n\n this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;\n }\n }\n arc(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._append`M${x0},${y0}`;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._append`L${x0},${y0}`;\n }\n\n // Is this arc empty? We’re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._append`A${r},${r},0,${+(da >= pi)},${cw},${this._x1 = x + r * Math.cos(a1)},${this._y1 = y + r * Math.sin(a1)}`;\n }\n }\n rect(x, y, w, h) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;\n }\n toString() {\n return this._;\n }\n}\n\nexport function path() {\n return new Path;\n}\n\n// Allow instanceof d3.path\npath.prototype = Path.prototype;\n\nexport function pathRound(digits = 3) {\n return new Path(+digits);\n}\n","import {Path} from \"d3-path\";\n\nexport function withPath(shape) {\n let digits = 3;\n\n shape.digits = function(_) {\n if (!arguments.length) return digits;\n if (_ == null) {\n digits = null;\n } else {\n const d = Math.floor(_);\n if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);\n digits = d;\n }\n return shape;\n };\n\n return () => new Path(digits);\n}\n","export var slice = Array.prototype.slice;\n\nexport default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n","function Linear(context) {\n this._context = context;\n}\n\nLinear.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // falls through\n default: this._context.lineTo(x, y); break;\n }\n }\n};\n\nexport default function(context) {\n return new Linear(context);\n}\n","export function x(p) {\n return p[0];\n}\n\nexport function y(p) {\n return p[1];\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x, y) {\n var defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null,\n path = withPath(line);\n\n x = typeof x === \"function\" ? x : (x === undefined) ? pointX : constant(x);\n y = typeof y === \"function\" ? y : (y === undefined) ? pointY : constant(y);\n\n function line(data) {\n var i,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer;\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) output.lineStart();\n else output.lineEnd();\n }\n if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n line.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n };\n\n line.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n };\n\n line.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n };\n\n line.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n };\n\n line.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n };\n\n return line;\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport line from \"./line.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x0, y0, y1) {\n var x1 = null,\n defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null,\n path = withPath(area);\n\n x0 = typeof x0 === \"function\" ? x0 : (x0 === undefined) ? pointX : constant(+x0);\n y0 = typeof y0 === \"function\" ? y0 : (y0 === undefined) ? constant(0) : constant(+y0);\n y1 = typeof y1 === \"function\" ? y1 : (y1 === undefined) ? pointY : constant(+y1);\n\n function area(data) {\n var i,\n j,\n k,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer,\n x0z = new Array(n),\n y0z = new Array(n);\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) {\n j = i;\n output.areaStart();\n output.lineStart();\n } else {\n output.lineEnd();\n output.lineStart();\n for (k = i - 1; k >= j; --k) {\n output.point(x0z[k], y0z[k]);\n }\n output.lineEnd();\n output.areaEnd();\n }\n }\n if (defined0) {\n x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);\n output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);\n }\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n function arealine() {\n return line().defined(defined).curve(curve).context(context);\n }\n\n area.x = function(_) {\n return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), x1 = null, area) : x0;\n };\n\n area.x0 = function(_) {\n return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), area) : x0;\n };\n\n area.x1 = function(_) {\n return arguments.length ? (x1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : x1;\n };\n\n area.y = function(_) {\n return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), y1 = null, area) : y0;\n };\n\n area.y0 = function(_) {\n return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), area) : y0;\n };\n\n area.y1 = function(_) {\n return arguments.length ? (y1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : y1;\n };\n\n area.lineX0 =\n area.lineY0 = function() {\n return arealine().x(x0).y(y0);\n };\n\n area.lineY1 = function() {\n return arealine().x(x0).y(y1);\n };\n\n area.lineX1 = function() {\n return arealine().x(x1).y(y0);\n };\n\n area.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), area) : defined;\n };\n\n area.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;\n };\n\n area.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;\n };\n\n return area;\n}\n","function sign(x) {\n return x < 0 ? -1 : 1;\n}\n\n// Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\nfunction slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n// Calculate a one-sided slope.\nfunction slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\nfunction point(that, t0, t1) {\n var x0 = that._x0,\n y0 = that._y0,\n x1 = that._x1,\n y1 = that._y1,\n dx = (x1 - x0) / 3;\n that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n this._context = context;\n}\n\nMonotoneX.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 =\n this._t0 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x1, this._y1); break;\n case 3: point(this, this._t0, slope2(this, this._t0)); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n var t1 = NaN;\n\n x = +x, y = +y;\n if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;\n default: point(this, this._t0, t1 = slope3(this, x, y)); break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n this._t0 = t1;\n }\n}\n\nfunction MonotoneY(context) {\n this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {\n MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n this._context = context;\n}\n\nReflectContext.prototype = {\n moveTo: function(x, y) { this._context.moveTo(y, x); },\n closePath: function() { this._context.closePath(); },\n lineTo: function(x, y) { this._context.lineTo(y, x); },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }\n};\n\nexport function monotoneX(context) {\n return new MonotoneX(context);\n}\n\nexport function monotoneY(context) {\n return new MonotoneY(context);\n}\n","import { useMemo, useState, type PointerEvent } from \"react\";\nimport { area as shapeArea, curveLinear, curveMonotoneX, line } from \"d3-shape\";\nimport { XAxis, YAxis } from \"../chart/axes\";\nimport { chartColor } from \"../chart/color\";\nimport { describeChart, numberFormatter, readValue } from \"../chart/format\";\nimport { ChartLegend } from \"../chart/legend\";\nimport {\n bucketSpan,\n bucketTimeFormatter,\n linearScale,\n nearestIndex,\n niceLinearDomain,\n thinTicks,\n timeAxisTicks,\n timeTickFormatter,\n toTime,\n} from \"../chart/scale\";\nimport { ChartShell, chartLayout } from \"../chart/shell\";\nimport { ChartTooltip } from \"../chart/tooltip\";\nimport type { ChartBaseProps, ChartDatum } from \"../chart/types\";\nimport { useMeasuredWidth } from \"../chart/use-measure\";\n\n/**\n * LineChart — series over time as lines: latency percentiles, one line\n * per destination, a min / average / max where the bounds are dashed.\n *\n * Design notes:\n * - A 2px stroke with round joins, no markers at rest. Straight segments\n * by default: a curve invents values between samples, so `curve=\n * \"monotone\"` is a choice the page makes for a smooth-by-nature\n * quantity. `area` washes the surface under a lone series at 10%.\n * - Hover snaps a crosshair to the nearest bucket and rings each series'\n * point in the surface colour, so a dot stays legible where lines\n * cross; the tooltip lists every series at that time.\n * - Gridlines, axis text, legend and the figure's spoken summary are the\n * bar chart's — one system, one reading.\n */\n\nconst LINE_WIDTH = 2;\nconst POINT_RADIUS = 4;\n\nexport interface LineChartProps<\n T extends ChartDatum,\n> extends ChartBaseProps<T> {\n /** Straight segments, or a monotone curve that never overshoots a sample. @default \"linear\" */\n curve?: \"linear\" | \"monotone\";\n /** A soft fill under the first series (a lone one, as a rule). */\n area?: boolean;\n}\n\ntype Point = [number, number | null];\n\nexport function LineChart<T extends ChartDatum>({\n data,\n series,\n label,\n description,\n height = 200,\n width: fixedWidth,\n valueFormat,\n timeFormat,\n locale,\n legend,\n baseline = \"zero\",\n curve = \"linear\",\n area = false,\n breakdownTitle,\n loading,\n empty = \"Nothing here yet.\",\n className,\n ...props\n}: LineChartProps<T>) {\n const [containerRef, width] = useMeasuredWidth<HTMLDivElement>(fixedWidth);\n const [hovered, setHovered] = useState<number | null>(null);\n\n const model = useMemo(() => {\n const colors = series.map((s, index) => chartColor(s.color, index));\n const times = data.map((d) => toTime(d.x));\n const span = bucketSpan(times);\n const axisFormat = valueFormat ?? numberFormatter(locale, true);\n const fullFormat = valueFormat ?? numberFormatter(locale);\n const headingFormat = timeFormat ?? bucketTimeFormatter(locale, span);\n const values = series.map((s) => data.map((d) => readValue(d, s.key)));\n let min = Infinity;\n let max = -Infinity;\n for (const column of values) {\n for (const value of column) {\n if (value == null) continue;\n if (value < min) min = value;\n if (value > max) max = value;\n }\n }\n if (min === Infinity) {\n min = 0;\n max = 0;\n }\n if (baseline === \"zero\") {\n min = Math.min(0, min);\n max = Math.max(0, max);\n }\n const y = niceLinearDomain(min, max);\n return {\n colors,\n times,\n values,\n axisFormat,\n fullFormat,\n headingFormat,\n y,\n yLabels: y.ticks.map(axisFormat),\n described:\n description ??\n describeChart({\n data,\n series,\n kind: \"line\",\n valueFormat: fullFormat,\n timeFormat: headingFormat,\n }),\n };\n }, [data, series, baseline, valueFormat, timeFormat, locale, description]);\n\n const layout = chartLayout(width, height, model.yLabels);\n const n = data.length;\n const t0 = model.times[0] ?? 0;\n const t1 = model.times[n - 1] ?? 0;\n const { left, right, top, bottom } = layout;\n const xScale = useMemo(\n () => linearScale(t1 > t0 ? [t0, t1] : [t0 - 1, t0 + 1], [left, right]),\n [t0, t1, left, right],\n );\n const yScale = useMemo(\n () => linearScale(model.y.domain, [bottom, top]),\n [model.y.domain, bottom, top],\n );\n const xs = useMemo(\n () => model.times.map((t) => xScale(t)),\n [model.times, xScale],\n );\n\n const paths = useMemo(() => {\n const shape = line<Point>()\n .defined((p) => p[1] != null)\n .x((p) => p[0])\n .y((p) => yScale(p[1]!))\n .curve(curve === \"monotone\" ? curveMonotoneX : curveLinear);\n const floor = Math.max(model.y.domain[0], Math.min(0, model.y.domain[1]));\n const fill = shapeArea<Point>()\n .defined((p) => p[1] != null)\n .x((p) => p[0])\n .y0(yScale(floor))\n .y1((p) => yScale(p[1]!))\n .curve(curve === \"monotone\" ? curveMonotoneX : curveLinear);\n return model.values.map((column, index) => {\n const points: Point[] = column.map((value, i) => [xs[i]!, value]);\n return {\n stroke: shape(points) ?? \"\",\n area: area && index === 0 ? (fill(points) ?? \"\") : null,\n };\n });\n }, [model.values, model.y.domain, xs, yScale, curve, area]);\n\n const xTicks = useMemo(() => {\n const innerWidth = right - left;\n if (n === 0 || innerWidth <= 0) return [];\n const format = timeTickFormatter(locale);\n const ticks = timeAxisTicks(t0, t1, innerWidth);\n return thinTicks(ticks, format, innerWidth).map((tick) => ({\n x: xScale(tick.getTime()),\n label: format(tick),\n }));\n }, [n, t0, t1, left, right, xScale, locale]);\n\n const onPointerMove = (event: PointerEvent<SVGSVGElement>) => {\n if (n === 0) return;\n const rect = event.currentTarget.getBoundingClientRect();\n const scale = rect.width > 0 ? width / rect.width : 1;\n const px = (event.clientX - rect.left) * scale;\n setHovered(nearestIndex(xs, px));\n };\n\n const hoveredDatum = hovered != null ? data[hovered] : undefined;\n const showLegend = legend ?? series.length > 1;\n\n return (\n <ChartShell\n label={label}\n description={model.described}\n height={height}\n width={width}\n containerRef={containerRef}\n loading={loading}\n empty={empty}\n showEmpty={n === 0 && !loading}\n onPlotPointerMove={onPointerMove}\n onPlotPointerLeave={() => setHovered(null)}\n className={className}\n legend={\n showLegend ? (\n <ChartLegend\n items={series.map((s, index) => ({\n label: s.label,\n color: model.colors[index]!,\n kind: \"line\",\n dashed: s.dashed,\n }))}\n />\n ) : null\n }\n tooltip={\n hovered != null && hoveredDatum != null ? (\n <ChartTooltip\n x={xs[hovered]!}\n width={width}\n top={layout.top}\n heading={model.headingFormat(new Date(hoveredDatum.x))}\n rows={series.map((s, index) => {\n const value = model.values[index]![hovered];\n return {\n label: s.label,\n value: value == null ? \"No data\" : model.fullFormat(value),\n color: model.colors[index]!,\n kind: \"line\",\n dashed: s.dashed,\n };\n })}\n breakdown={hoveredDatum.breakdown}\n breakdownTitle={breakdownTitle}\n valueFormat={model.fullFormat}\n />\n ) : null\n }\n {...props}\n >\n <YAxis\n layout={layout}\n ticks={model.y.ticks}\n labels={model.yLabels}\n scale={yScale}\n />\n <XAxis layout={layout} ticks={xTicks} />\n {hovered != null && hoveredDatum != null && (\n <line\n x1={xs[hovered]}\n x2={xs[hovered]}\n y1={layout.top}\n y2={layout.bottom}\n stroke=\"var(--color-pho-chart-crosshair)\"\n />\n )}\n <g data-lines=\"\">\n {paths.map((path, index) => (\n <g key={series[index]!.key} data-series={series[index]!.key}>\n {path.area != null && path.area !== \"\" && (\n <path\n d={path.area}\n fill={model.colors[index]}\n fillOpacity={0.1}\n />\n )}\n <path\n d={path.stroke}\n fill=\"none\"\n stroke={model.colors[index]}\n strokeWidth={LINE_WIDTH}\n strokeLinejoin=\"round\"\n strokeLinecap=\"round\"\n strokeDasharray={series[index]!.dashed ? \"4 4\" : undefined}\n />\n </g>\n ))}\n </g>\n {hovered != null && hoveredDatum != null && (\n <g data-points=\"\">\n {model.values.map((column, index) => {\n const value = column[hovered];\n if (value == null) return null;\n return (\n <circle\n key={series[index]!.key}\n cx={xs[hovered]}\n cy={yScale(value)}\n r={POINT_RADIUS}\n fill={model.colors[index]}\n // The surface ring keeps a dot legible where lines cross.\n stroke=\"var(--pho-surface, var(--background-color-pho-primary))\"\n strokeWidth={2}\n />\n );\n })}\n </g>\n )}\n </ChartShell>\n );\n}\n\nLineChart.displayName = \"LineChart\";\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8],"mappings":";;;;;AAAA,SAAA,EAAwB,GAAG;AACzB,SAAO,WAAoB;AACzB,WAAO;AAAA,EACT;AACF;ACJA,IAAM,IAAK,KAAK,IACZ,IAAM,IAAI,GACV,IAAU,MACV,KAAa,IAAM;AAEvB,SAAS,GAAO,GAAS;AACvB,OAAK,KAAK,EAAQ,CAAA;AAClB,WAAS,IAAI,GAAG,IAAI,EAAQ,QAAQ,IAAI,GAAG,EAAE,EAC3C,MAAK,KAAK,UAAU,CAAA,IAAK,EAAQ,CAAA;AAErC;AAEA,SAAS,GAAY,GAAQ;AAC3B,MAAI,IAAI,KAAK,MAAM,CAAM;AACzB,MAAI,EAAE,KAAK,GAAI,OAAM,IAAI,MAAM,mBAAmB,CAAA,EAAQ;AAC1D,MAAI,IAAI,GAAI,QAAO;AACnB,QAAM,IAAI,MAAM;AAChB,SAAO,SAAS,GAAS;AACvB,SAAK,KAAK,EAAQ,CAAA;AAClB,aAAS,IAAI,GAAG,IAAI,EAAQ,QAAQ,IAAI,GAAG,EAAE,EAC3C,MAAK,KAAK,KAAK,MAAM,UAAU,CAAA,IAAK,CAAC,IAAI,IAAI,EAAQ,CAAA;AAAA,EAEzD;AACF;AAEA,IAAa,IAAb,MAAkB;AAAA,EAChB,YAAY,GAAQ;AAClB,SAAK,MAAM,KAAK,MAChB,KAAK,MAAM,KAAK,MAAM,MACtB,KAAK,IAAI,IACT,KAAK,UAAU,KAAU,OAAO,KAAS,GAAY,CAAM;AAAA,EAC7D;AAAA,EACA,OAAO,GAAG,GAAG;AACX,SA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AAA,QACX,UAAA,GAAM,IAAA,CAAK,GAAM,MAChB,gBAAA,GAAC,KAAD;AAAA,UAA4B,eAAa,EAAO,CAAA,EAAQ;AAAA,UAAxD,UAAA,CACG,EAAK,QAAQ,QAAQ,EAAK,SAAS,MAClC,gBAAA,EAAC,QAAD;AAAA,YACE,GAAG,EAAK;AAAA,YACR,MAAM,EAAM,OAAO,CAAA;AAAA,YACnB,aAAa;AAAA,UACd,CAAA,GAEH,gBAAA,EAAC,QAAD;AAAA,YACE,GAAG,EAAK;AAAA,YACR,MAAK;AAAA,YACL,QAAQ,EAAM,OAAO,CAAA;AAAA,YACrB,aAAa;AAAA,YACb,gBAAe;AAAA,YACf,eAAc;AAAA,YACd,iBAAiB,EAAO,CAAA,EAAQ,SAAS,QAAQ;AAAA,UAClD,CAAA,CACA;AAAA,QAjBK,GAAA,EAAO,CAAA,EAAQ,GAiBpB,CACJ;AAAA,MACA,CAAA;AAAA,MACF,KAAW,QAAQ,KAAgB,QAClC,gBAAA,EAAC,KAAD;AAAA,QAAG,eAAY;AAAA,QACZ,UAAA,EAAM,OAAO,IAAA,CAAK,GAAQ,MAAU;AACnC,gBAAM,IAAQ,EAAO,CAAA;AACrB,iBAAI,KAAS,OAAa,OAExB,gBAAA,EAAC,UAAD;AAAA,YAEE,IAAI,EAAG,CAAA;AAAA,YACP,IAAI,EAAO,CAAK;AAAA,YAChB,GAAG;AAAA,YACH,MAAM,EAAM,OAAO,CAAA;AAAA,YAEnB,QAAO;AAAA,YACP,aAAa;AAAA,UACd,GARM,EAAO,CAAA,EAAQ,GAQrB;AAAA,QAEL,CAAC;AAAA,MACA,CAAA;AAAA,IAEK;AAAA;AAEhB;AAEA,GAAU,cAAc"}
|
|
1
|
+
{"version":3,"file":"line-chart-VuMYKzW3.js","names":["constant","curveLinear","x","pointX","y","pointY","array","constant","curveLinear","pointX","pointY","array","line"],"sources":["../../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/constant.js","../../../../node_modules/.pnpm/d3-path@3.1.0/node_modules/d3-path/src/path.js","../../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/path.js","../../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/array.js","../../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/linear.js","../../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/point.js","../../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/line.js","../../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/area.js","../../../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/curve/monotone.js","../../src/components/line-chart/line-chart.tsx"],"sourcesContent":["export default function(x) {\n return function constant() {\n return x;\n };\n}\n","const pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction append(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += arguments[i] + strings[i];\n }\n}\n\nfunction appendRound(digits) {\n let d = Math.floor(digits);\n if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);\n if (d > 15) return append;\n const k = 10 ** d;\n return function(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += Math.round(arguments[i] * k) / k + strings[i];\n }\n };\n}\n\nexport class Path {\n constructor(digits) {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n this._append = digits == null ? append : appendRound(digits);\n }\n moveTo(x, y) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;\n }\n closePath() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._append`Z`;\n }\n }\n lineTo(x, y) {\n this._append`L${this._x1 = +x},${this._y1 = +y}`;\n }\n quadraticCurveTo(x1, y1, x, y) {\n this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;\n }\n bezierCurveTo(x1, y1, x2, y2, x, y) {\n this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;\n }\n arcTo(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._append`M${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._append`L${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Otherwise, draw an arc!\n else {\n let x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;\n }\n\n this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;\n }\n }\n arc(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._append`M${x0},${y0}`;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._append`L${x0},${y0}`;\n }\n\n // Is this arc empty? We’re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._append`A${r},${r},0,${+(da >= pi)},${cw},${this._x1 = x + r * Math.cos(a1)},${this._y1 = y + r * Math.sin(a1)}`;\n }\n }\n rect(x, y, w, h) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;\n }\n toString() {\n return this._;\n }\n}\n\nexport function path() {\n return new Path;\n}\n\n// Allow instanceof d3.path\npath.prototype = Path.prototype;\n\nexport function pathRound(digits = 3) {\n return new Path(+digits);\n}\n","import {Path} from \"d3-path\";\n\nexport function withPath(shape) {\n let digits = 3;\n\n shape.digits = function(_) {\n if (!arguments.length) return digits;\n if (_ == null) {\n digits = null;\n } else {\n const d = Math.floor(_);\n if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);\n digits = d;\n }\n return shape;\n };\n\n return () => new Path(digits);\n}\n","export var slice = Array.prototype.slice;\n\nexport default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n","function Linear(context) {\n this._context = context;\n}\n\nLinear.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // falls through\n default: this._context.lineTo(x, y); break;\n }\n }\n};\n\nexport default function(context) {\n return new Linear(context);\n}\n","export function x(p) {\n return p[0];\n}\n\nexport function y(p) {\n return p[1];\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x, y) {\n var defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null,\n path = withPath(line);\n\n x = typeof x === \"function\" ? x : (x === undefined) ? pointX : constant(x);\n y = typeof y === \"function\" ? y : (y === undefined) ? pointY : constant(y);\n\n function line(data) {\n var i,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer;\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) output.lineStart();\n else output.lineEnd();\n }\n if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n line.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n };\n\n line.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n };\n\n line.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n };\n\n line.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n };\n\n line.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n };\n\n return line;\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport line from \"./line.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x0, y0, y1) {\n var x1 = null,\n defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null,\n path = withPath(area);\n\n x0 = typeof x0 === \"function\" ? x0 : (x0 === undefined) ? pointX : constant(+x0);\n y0 = typeof y0 === \"function\" ? y0 : (y0 === undefined) ? constant(0) : constant(+y0);\n y1 = typeof y1 === \"function\" ? y1 : (y1 === undefined) ? pointY : constant(+y1);\n\n function area(data) {\n var i,\n j,\n k,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer,\n x0z = new Array(n),\n y0z = new Array(n);\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) {\n j = i;\n output.areaStart();\n output.lineStart();\n } else {\n output.lineEnd();\n output.lineStart();\n for (k = i - 1; k >= j; --k) {\n output.point(x0z[k], y0z[k]);\n }\n output.lineEnd();\n output.areaEnd();\n }\n }\n if (defined0) {\n x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);\n output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);\n }\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n function arealine() {\n return line().defined(defined).curve(curve).context(context);\n }\n\n area.x = function(_) {\n return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), x1 = null, area) : x0;\n };\n\n area.x0 = function(_) {\n return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), area) : x0;\n };\n\n area.x1 = function(_) {\n return arguments.length ? (x1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : x1;\n };\n\n area.y = function(_) {\n return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), y1 = null, area) : y0;\n };\n\n area.y0 = function(_) {\n return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), area) : y0;\n };\n\n area.y1 = function(_) {\n return arguments.length ? (y1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : y1;\n };\n\n area.lineX0 =\n area.lineY0 = function() {\n return arealine().x(x0).y(y0);\n };\n\n area.lineY1 = function() {\n return arealine().x(x0).y(y1);\n };\n\n area.lineX1 = function() {\n return arealine().x(x1).y(y0);\n };\n\n area.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), area) : defined;\n };\n\n area.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;\n };\n\n area.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;\n };\n\n return area;\n}\n","function sign(x) {\n return x < 0 ? -1 : 1;\n}\n\n// Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\nfunction slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n// Calculate a one-sided slope.\nfunction slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\nfunction point(that, t0, t1) {\n var x0 = that._x0,\n y0 = that._y0,\n x1 = that._x1,\n y1 = that._y1,\n dx = (x1 - x0) / 3;\n that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n this._context = context;\n}\n\nMonotoneX.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 =\n this._t0 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x1, this._y1); break;\n case 3: point(this, this._t0, slope2(this, this._t0)); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n var t1 = NaN;\n\n x = +x, y = +y;\n if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;\n default: point(this, this._t0, t1 = slope3(this, x, y)); break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n this._t0 = t1;\n }\n}\n\nfunction MonotoneY(context) {\n this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {\n MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n this._context = context;\n}\n\nReflectContext.prototype = {\n moveTo: function(x, y) { this._context.moveTo(y, x); },\n closePath: function() { this._context.closePath(); },\n lineTo: function(x, y) { this._context.lineTo(y, x); },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }\n};\n\nexport function monotoneX(context) {\n return new MonotoneX(context);\n}\n\nexport function monotoneY(context) {\n return new MonotoneY(context);\n}\n","import { useMemo, useState, type PointerEvent } from \"react\";\nimport { area as shapeArea, curveLinear, curveMonotoneX, line } from \"d3-shape\";\nimport { XAxis, YAxis } from \"../chart/axes\";\nimport { chartColor } from \"../chart/color\";\nimport { describeChart, numberFormatter, readValue } from \"../chart/format\";\nimport { ChartLegend } from \"../chart/legend\";\nimport {\n bucketSpan,\n bucketTimeFormatter,\n linearScale,\n nearestIndex,\n niceLinearDomain,\n thinTicks,\n timeAxisTicks,\n timeTickFormatter,\n toTime,\n} from \"../chart/scale\";\nimport { ChartShell, chartLayout } from \"../chart/shell\";\nimport { ChartTooltip } from \"../chart/tooltip\";\nimport type { ChartBaseProps, ChartDatum } from \"../chart/types\";\nimport { useMeasuredWidth } from \"../chart/use-measure\";\n\n/**\n * LineChart — series over time as lines: latency percentiles, one line\n * per destination, a min / average / max where the bounds are dashed.\n *\n * Design notes:\n * - A 2px stroke with round joins, no markers at rest. Straight segments\n * by default: a curve invents values between samples, so `curve=\n * \"monotone\"` is a choice the page makes for a smooth-by-nature\n * quantity. `area` washes the surface under a lone series at 10%.\n * - Hover snaps a crosshair to the nearest bucket and rings each series'\n * point in the surface colour, so a dot stays legible where lines\n * cross; the tooltip lists every series at that time.\n * - Gridlines, axis text, legend and the figure's spoken summary are the\n * bar chart's — one system, one reading.\n */\n\nconst LINE_WIDTH = 2;\nconst POINT_RADIUS = 4;\n\nexport interface LineChartProps<\n T extends ChartDatum,\n> extends ChartBaseProps<T> {\n /** Straight segments, or a monotone curve that never overshoots a sample. @default \"linear\" */\n curve?: \"linear\" | \"monotone\";\n /** A soft fill under the first series (a lone one, as a rule). */\n area?: boolean;\n}\n\ntype Point = [number, number | null];\n\nexport function LineChart<T extends ChartDatum>({\n data,\n series,\n label,\n description,\n height = 200,\n width: fixedWidth,\n valueFormat,\n timeFormat,\n locale,\n legend,\n baseline = \"zero\",\n curve = \"linear\",\n area = false,\n breakdownTitle,\n loading,\n empty = \"Nothing here yet.\",\n className,\n ...props\n}: LineChartProps<T>) {\n const [containerRef, width] = useMeasuredWidth<HTMLDivElement>(fixedWidth);\n const [hovered, setHovered] = useState<number | null>(null);\n\n const model = useMemo(() => {\n const colors = series.map((s, index) => chartColor(s.color, index));\n const times = data.map((d) => toTime(d.x));\n const span = bucketSpan(times);\n const axisFormat = valueFormat ?? numberFormatter(locale, true);\n const fullFormat = valueFormat ?? numberFormatter(locale);\n const headingFormat = timeFormat ?? bucketTimeFormatter(locale, span);\n const values = series.map((s) => data.map((d) => readValue(d, s.key)));\n let min = Infinity;\n let max = -Infinity;\n for (const column of values) {\n for (const value of column) {\n if (value == null) continue;\n if (value < min) min = value;\n if (value > max) max = value;\n }\n }\n if (min === Infinity) {\n min = 0;\n max = 0;\n }\n if (baseline === \"zero\") {\n min = Math.min(0, min);\n max = Math.max(0, max);\n }\n const y = niceLinearDomain(min, max);\n return {\n colors,\n times,\n values,\n axisFormat,\n fullFormat,\n headingFormat,\n y,\n yLabels: y.ticks.map(axisFormat),\n described:\n description ??\n describeChart({\n data,\n series,\n kind: \"line\",\n valueFormat: fullFormat,\n timeFormat: headingFormat,\n }),\n };\n }, [data, series, baseline, valueFormat, timeFormat, locale, description]);\n\n const layout = chartLayout(width, height, model.yLabels);\n const n = data.length;\n const t0 = model.times[0] ?? 0;\n const t1 = model.times[n - 1] ?? 0;\n const { left, right, top, bottom } = layout;\n const xScale = useMemo(\n () => linearScale(t1 > t0 ? [t0, t1] : [t0 - 1, t0 + 1], [left, right]),\n [t0, t1, left, right],\n );\n const yScale = useMemo(\n () => linearScale(model.y.domain, [bottom, top]),\n [model.y.domain, bottom, top],\n );\n const xs = useMemo(\n () => model.times.map((t) => xScale(t)),\n [model.times, xScale],\n );\n\n const paths = useMemo(() => {\n const shape = line<Point>()\n .defined((p) => p[1] != null)\n .x((p) => p[0])\n .y((p) => yScale(p[1]!))\n .curve(curve === \"monotone\" ? curveMonotoneX : curveLinear);\n const floor = Math.max(model.y.domain[0], Math.min(0, model.y.domain[1]));\n const fill = shapeArea<Point>()\n .defined((p) => p[1] != null)\n .x((p) => p[0])\n .y0(yScale(floor))\n .y1((p) => yScale(p[1]!))\n .curve(curve === \"monotone\" ? curveMonotoneX : curveLinear);\n return model.values.map((column, index) => {\n const points: Point[] = column.map((value, i) => [xs[i]!, value]);\n return {\n stroke: shape(points) ?? \"\",\n area: area && index === 0 ? (fill(points) ?? \"\") : null,\n };\n });\n }, [model.values, model.y.domain, xs, yScale, curve, area]);\n\n const xTicks = useMemo(() => {\n const innerWidth = right - left;\n if (n === 0 || innerWidth <= 0) return [];\n const format = timeTickFormatter(locale);\n const ticks = timeAxisTicks(t0, t1, innerWidth);\n return thinTicks(ticks, format, innerWidth).map((tick) => ({\n x: xScale(tick.getTime()),\n label: format(tick),\n }));\n }, [n, t0, t1, left, right, xScale, locale]);\n\n const onPointerMove = (event: PointerEvent<SVGSVGElement>) => {\n if (n === 0) return;\n const rect = event.currentTarget.getBoundingClientRect();\n const scale = rect.width > 0 ? width / rect.width : 1;\n const px = (event.clientX - rect.left) * scale;\n setHovered(nearestIndex(xs, px));\n };\n\n const hoveredDatum = hovered != null ? data[hovered] : undefined;\n const showLegend = legend ?? series.length > 1;\n\n return (\n <ChartShell\n label={label}\n description={model.described}\n height={height}\n width={width}\n containerRef={containerRef}\n loading={loading}\n empty={empty}\n showEmpty={n === 0 && !loading}\n onPlotPointerMove={onPointerMove}\n onPlotPointerLeave={() => setHovered(null)}\n className={className}\n legend={\n showLegend ? (\n <ChartLegend\n items={series.map((s, index) => ({\n label: s.label,\n color: model.colors[index]!,\n kind: \"line\",\n dashed: s.dashed,\n }))}\n />\n ) : null\n }\n tooltip={\n hovered != null && hoveredDatum != null ? (\n <ChartTooltip\n x={xs[hovered]!}\n width={width}\n top={layout.top}\n heading={model.headingFormat(new Date(hoveredDatum.x))}\n rows={series.map((s, index) => {\n const value = model.values[index]![hovered];\n return {\n label: s.label,\n value: value == null ? \"No data\" : model.fullFormat(value),\n color: model.colors[index]!,\n kind: \"line\",\n dashed: s.dashed,\n };\n })}\n breakdown={hoveredDatum.breakdown}\n breakdownTitle={breakdownTitle}\n valueFormat={model.fullFormat}\n />\n ) : null\n }\n {...props}\n >\n <YAxis\n layout={layout}\n ticks={model.y.ticks}\n labels={model.yLabels}\n scale={yScale}\n />\n <XAxis layout={layout} ticks={xTicks} />\n {hovered != null && hoveredDatum != null && (\n <line\n x1={xs[hovered]}\n x2={xs[hovered]}\n y1={layout.top}\n y2={layout.bottom}\n stroke=\"var(--color-pho-chart-crosshair)\"\n />\n )}\n <g data-lines=\"\">\n {paths.map((path, index) => (\n <g key={series[index]!.key} data-series={series[index]!.key}>\n {path.area != null && path.area !== \"\" && (\n <path\n d={path.area}\n fill={model.colors[index]}\n fillOpacity={0.1}\n />\n )}\n <path\n d={path.stroke}\n fill=\"none\"\n stroke={model.colors[index]}\n strokeWidth={LINE_WIDTH}\n strokeLinejoin=\"round\"\n strokeLinecap=\"round\"\n strokeDasharray={series[index]!.dashed ? \"4 4\" : undefined}\n />\n </g>\n ))}\n </g>\n {hovered != null && hoveredDatum != null && (\n <g data-points=\"\">\n {model.values.map((column, index) => {\n const value = column[hovered];\n if (value == null) return null;\n return (\n <circle\n key={series[index]!.key}\n cx={xs[hovered]}\n cy={yScale(value)}\n r={POINT_RADIUS}\n fill={model.colors[index]}\n // The surface ring keeps a dot legible where lines cross.\n stroke=\"var(--pho-surface, var(--background-color-pho-primary))\"\n strokeWidth={2}\n />\n );\n })}\n </g>\n )}\n </ChartShell>\n );\n}\n\nLineChart.displayName = \"LineChart\";\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8],"mappings":";;;;;AAAA,SAAA,EAAwB,GAAG;AACzB,SAAO,WAAoB;AACzB,WAAO;AAAA,EACT;AACF;ACJA,IAAM,IAAK,KAAK,IACZ,IAAM,IAAI,GACV,IAAU,MACV,KAAa,IAAM;AAEvB,SAAS,GAAO,GAAS;AACvB,OAA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,SAAS,QAAQ;AAAA,UAClD,CAAA,CACA;AAAA,QAjBK,GAAA,EAAO,CAAA,EAAQ,GAiBpB,CACJ;AAAA,MACA,CAAA;AAAA,MACF,KAAW,QAAQ,KAAgB,QAClC,gBAAA,EAAC,KAAD;AAAA,QAAG,eAAY;AAAA,QACZ,UAAA,EAAM,OAAO,IAAA,CAAK,GAAQ,MAAU;AACnC,gBAAM,IAAQ,EAAO,CAAA;AACrB,iBAAI,KAAS,OAAa,OAExB,gBAAA,EAAC,UAAD;AAAA,YAEE,IAAI,EAAG,CAAA;AAAA,YACP,IAAI,EAAO,CAAK;AAAA,YAChB,GAAG;AAAA,YACH,MAAM,EAAM,OAAO,CAAA;AAAA,YAEnB,QAAO;AAAA,YACP,aAAa;AAAA,UACd,GARM,EAAO,CAAA,EAAQ,GAQrB;AAAA,QAEL,CAAC;AAAA,MACA,CAAA;AAAA,IAEK;AAAA;AAEhB;AAEA,GAAU,cAAc"}
|
|
@@ -6,8 +6,8 @@ import { n as O } from "./spinner-BzLUo4Xk.js";
|
|
|
6
6
|
import { a as A } from "./button-CdqS_t5a.js";
|
|
7
7
|
import { i as D } from "./status-view-C8tabjDu.js";
|
|
8
8
|
import { t as g } from "./skeleton-DwjSl4vC.js";
|
|
9
|
-
import { r as E } from "./badge-DlLJPLeZ.js";
|
|
10
9
|
import { t as h } from "./tooltip-BTF7GChl.js";
|
|
10
|
+
import { r as E } from "./badge-DlLJPLeZ.js";
|
|
11
11
|
import { useEffect as T, useId as B, useRef as N } from "react";
|
|
12
12
|
import { Fragment as W, jsx as t, jsxs as v } from "react/jsx-runtime";
|
|
13
13
|
import { useRender as z } from "@base-ui/react/use-render";
|
|
@@ -241,4 +241,4 @@ export {
|
|
|
241
241
|
pe as t
|
|
242
242
|
};
|
|
243
243
|
|
|
244
|
-
//# sourceMappingURL=log-list-
|
|
244
|
+
//# sourceMappingURL=log-list-BERiO4UJ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-list-0AXnjFrk.js","names":[],"sources":["../../src/components/log-list/log-list.tsx"],"sourcesContent":["import {\n useEffect,\n useId,\n useRef,\n type ComponentProps,\n type MouseEvent,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { Badge, type BadgeColor, type BadgeSize } from \"../badge\";\nimport { Button } from \"../button\";\nimport { Skeleton } from \"../skeleton\";\nimport { Spinner } from \"../spinner\";\nimport { StatusView } from \"../status-view\";\nimport { Tooltip } from \"../tooltip\";\nimport { cn } from \"../../utils/cn\";\nimport { useCopy } from \"../../utils/use-copy\";\nimport { useLinkComponent } from \"../../utils/link-provider\";\n\n/**\n * Log List — rows of requests, deliveries, or messages, newest first,\n * each one line: a mono id you can copy, a status, the method, what\n * happened, and how long ago. Reach for it where a `DataTable` would be\n * columns of the same few fields: a log reads left to right as one line,\n * and the page filters it from a `FilterBar` pinned above.\n *\n * Design notes:\n * - The surface is `BasicPage.Card`'s: hairline border, `base` radius,\n * hairline rules between rows. It sits in a `Stack` as any card does.\n * - The row is one link (or one button). It stretches over the row from\n * the label, the way a `DataTable` row's does, so the whole row is one\n * pointer target and one tab stop; the copy control sits above it.\n * - The id truncates in the middle, keeping the prefix that says what it\n * is and the tail that tells it apart. The full id is a tooltip away,\n * and one click copies it.\n * - `LoadMore` is the sentinel at the end: it asks for the next page as\n * it scrolls into view, and offers a button for keyboards and for\n * browsers without an observer.\n */\n\n/** Same chrome as `BasicPage.Card`. */\nconst LOG_LIST_SURFACE =\n \"rounded-base border border-pho-secondary bg-pho-primary divide-y divide-pho-secondary\";\n\n/** Middle truncation: the prefix and this many after it, then the tail. */\nconst ID_HEAD = 12;\nconst ID_TAIL = 5;\n\n/**\n * Keep the start and the end of an id and fold the middle into an\n * ellipsis — `pho_req_01m04axjqrfzxv4xjet40a84gb` reads\n * `pho_req_01m0…a84gb`. Ids that fit are returned whole.\n */\nexport function truncateMiddle(\n value: string,\n head = ID_HEAD,\n tail = ID_TAIL,\n): string {\n if (value.length <= head + tail + 1) return value;\n return `${value.slice(0, head)}…${value.slice(-tail)}`;\n}\n\n/* -------------------------------- status -------------------------------- */\n\nconst SUCCESS_WORDS = new Set([\n \"success\",\n \"succeeded\",\n \"successful\",\n \"delivered\",\n \"ok\",\n \"sent\",\n \"received\",\n \"completed\",\n \"complete\",\n \"done\",\n \"active\",\n]);\nconst ERROR_WORDS = new Set([\n \"failed\",\n \"failure\",\n \"error\",\n \"errored\",\n \"rejected\",\n \"undelivered\",\n \"timeout\",\n \"timed_out\",\n \"timed out\",\n \"canceled\",\n \"cancelled\",\n]);\nconst WARNING_WORDS = new Set([\n \"pending\",\n \"queued\",\n \"retrying\",\n \"processing\",\n \"sending\",\n \"in_progress\",\n \"in progress\",\n \"scheduled\",\n \"waiting\",\n]);\n\n/**\n * The `Badge` color for a log status: an HTTP status code (2xx success,\n * 3xx gray, 4xx warning, 5xx error) or a word (`delivered` / `failed` /\n * `pending`). Anything else is gray.\n */\nexport function logStatusColor(status: number | string): BadgeColor {\n if (typeof status === \"number\") {\n if (status < 300) return \"success\";\n if (status < 400) return \"gray\";\n if (status < 500) return \"warning\";\n return \"error\";\n }\n const word = status.trim().toLowerCase();\n if (/^\\d{3}$/.test(word)) return logStatusColor(Number(word));\n if (SUCCESS_WORDS.has(word)) return \"success\";\n if (ERROR_WORDS.has(word)) return \"error\";\n if (WARNING_WORDS.has(word)) return \"warning\";\n return \"gray\";\n}\n\n/** A status word as a label: `timed_out` reads `Timed out`. */\nexport function logStatusLabel(status: number | string): string {\n if (typeof status === \"number\") return String(status);\n const word = status.trim().replace(/_/g, \" \");\n return word.charAt(0).toUpperCase() + word.slice(1);\n}\n\nexport interface LogStatusProps extends Omit<\n ComponentProps<\"span\">,\n \"children\" | \"color\"\n> {\n /** An HTTP status code or a status word. */\n value: number | string;\n /** Override the derived word. */\n label?: ReactNode;\n /** Badge size. @default \"sm\" */\n size?: BadgeSize;\n}\n\n/** The status slot — a low-contrast `Badge` colored by `logStatusColor`. */\nfunction Status({\n value,\n label,\n size = \"sm\",\n className,\n ...props\n}: LogStatusProps) {\n return (\n <Badge\n color={logStatusColor(value)}\n contrast=\"low\"\n size={size}\n className={cn(\"tabular-nums\", className)}\n {...props}\n >\n {label ?? logStatusLabel(value)}\n </Badge>\n );\n}\n\n/** The method slot — `POST`, `GET` as a quiet mono chip. */\nfunction Method({\n className,\n ...props\n}: ComponentProps<\"span\"> & { ref?: Ref<HTMLSpanElement> }) {\n return (\n <span\n className={cn(\n \"bg-pho-secondary text-pho-secondary inline-flex h-5 min-w-12 shrink-0 items-center justify-center rounded-sm px-1.5 font-mono text-xs font-medium whitespace-nowrap\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/* ---------------------------------- id ---------------------------------- */\n\n/**\n * The id cell: a mono button that copies the full id, with a tooltip\n * holding the whole of it. The cell is a fixed width in characters so\n * ids line up down the list.\n */\nfunction IdCell({ id, cellId }: { id: string; cellId: string }) {\n const { copied, copy } = useCopy();\n return (\n <Tooltip.Root>\n <Tooltip.Trigger\n id={cellId}\n aria-label={copied ? `${id} copied` : `Copy ${id}`}\n data-copied={copied || undefined}\n onClick={() => void copy(id)}\n className={cn(\n \"text-pho-secondary outline-pho-brand hover:text-pho-primary relative z-10 -mx-1 w-[calc(18ch+0.5rem)] shrink-0 cursor-pointer truncate rounded-sm px-1 py-0.5 text-left font-mono text-xs transition-colors duration-100 ease-linear focus-visible:outline-2\",\n \"data-[copied]:text-pho-success\",\n )}\n >\n {copied ? \"Copied\" : truncateMiddle(id)}\n </Tooltip.Trigger>\n <output className=\"sr-only\" aria-live=\"polite\">\n {copied ? \"Copied\" : \"\"}\n </output>\n <Tooltip.Portal>\n <Tooltip.Positioner>\n <Tooltip.Popup className=\"font-mono\">{id}</Tooltip.Popup>\n </Tooltip.Positioner>\n </Tooltip.Portal>\n </Tooltip.Root>\n );\n}\n\n/* ---------------------------------- row --------------------------------- */\n\nexport interface LogListRowProps extends Omit<\n ComponentProps<\"div\">,\n \"children\" | \"title\" | \"onClick\" | \"id\"\n> {\n /** The record's id — mono, middle-truncated, copied on click. */\n id?: string;\n /** The status slot — usually `LogList.Status`. */\n status?: ReactNode;\n /** The method — `POST`, `GET`; rendered in `LogList.Method`. */\n method?: string;\n /** What happened — the route, the event type, the message. */\n label: ReactNode;\n /** The label in mono — for a route or an event type. */\n code?: boolean;\n /**\n * The line under the label, with real content: who received what from\n * whom, the destination that answered. A sentence, with its period.\n */\n description?: ReactNode;\n /** Trailing: how long it took — \"59 ms\". */\n duration?: ReactNode;\n /** Trailing: when — \"2 min ago\". */\n time?: ReactNode;\n /** Trailing content before the duration and time. */\n children?: ReactNode;\n /** The row is a link to its page, through the host's `LinkProvider`. */\n href?: string;\n /** The row is a button. */\n onClick?: (event: MouseEvent<HTMLElement>) => void;\n /**\n * Replace the row's link element — a router's `Link`, the way Base UI\n * components take `render`. The row's classes and handlers merge in.\n */\n render?: useRender.RenderProp;\n /** The row whose page is open beside the list — it keeps the wash. */\n current?: boolean;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction Row({\n id,\n status,\n method,\n label,\n code,\n description,\n duration,\n time,\n children,\n href,\n onClick,\n render,\n current,\n className,\n ...props\n}: LogListRowProps) {\n const Link = useLinkComponent();\n const base = useId();\n const interactive = href != null || onClick != null || render != null;\n const cellIds = {\n id: `${base}-id`,\n status: `${base}-status`,\n method: `${base}-method`,\n meta: `${base}-meta`,\n };\n const hasMeta = children != null || duration != null || time != null;\n const describedBy = [\n id != null && cellIds.id,\n status != null && cellIds.status,\n method != null && cellIds.method,\n hasMeta && cellIds.meta,\n ]\n .filter(Boolean)\n .join(\" \");\n const primary = useRender({\n render: render ?? (href != null ? <Link href={href} /> : undefined),\n defaultTagName: href != null ? \"a\" : onClick != null ? \"button\" : \"span\",\n props: {\n className: cn(\n \"text-pho-primary block min-w-0 max-w-full truncate text-left text-base font-medium outline-none\",\n code && \"font-mono text-xs\",\n // The one link, stretched over the row; the ring is the row's.\n interactive &&\n \"cursor-pointer after:absolute after:inset-0 after:content-['']\",\n ),\n onClick,\n type:\n render == null && href == null && onClick != null\n ? \"button\"\n : undefined,\n \"aria-current\": current ? \"page\" : undefined,\n \"aria-describedby\": describedBy || undefined,\n \"data-log-primary\": \"\",\n children: label,\n },\n });\n return (\n <div\n data-log-row=\"\"\n data-current={current || undefined}\n className={cn(\n \"relative flex min-h-12 min-w-0 items-center gap-3 px-5 py-2.5\",\n interactive &&\n \"hover:bg-pho-primary-hover outline-pho-brand transition-colors has-[[data-log-primary]:focus-visible]:outline-2 has-[[data-log-primary]:focus-visible]:-outline-offset-2\",\n current && \"bg-pho-primary-hover\",\n // The wash follows the card's rounding (minus the 1px border).\n \"first:rounded-t-[calc(var(--radius-base)-1px)] last:rounded-b-[calc(var(--radius-base)-1px)]\",\n className,\n )}\n {...props}\n >\n {id != null ? <IdCell id={id} cellId={cellIds.id} /> : null}\n {status != null ? (\n <span id={cellIds.status} className=\"flex shrink-0 items-center\">\n {status}\n </span>\n ) : null}\n {method != null ? <Method id={cellIds.method}>{method}</Method> : null}\n <div data-log-primary-cell=\"\" className=\"min-w-0 flex-1\">\n {primary}\n {description != null ? (\n <p className=\"text-pho-description truncate text-xs\">{description}</p>\n ) : null}\n </div>\n {hasMeta ? (\n <div\n id={cellIds.meta}\n className=\"text-pho-description ml-auto flex shrink-0 items-center gap-3 text-xs whitespace-nowrap tabular-nums\"\n >\n {children}\n {duration != null ? <span>{duration}</span> : null}\n {time != null ? <span>{time}</span> : null}\n </div>\n ) : null}\n </div>\n );\n}\n\n/* -------------------------------- states -------------------------------- */\n\nexport interface LogListEmptyProps extends Omit<\n ComponentProps<\"div\">,\n \"title\" | \"children\"\n> {\n /** One short line naming the state. @default \"Nothing here yet.\" */\n title?: ReactNode;\n /** What fills it, or why it is empty. */\n description?: ReactNode;\n /** An action, when there is one. */\n children?: ReactNode;\n}\n\n/** The list with no rows — `StatusView` at card size. */\nfunction Empty({\n title = \"Nothing here yet.\",\n description,\n children,\n className,\n ...props\n}: LogListEmptyProps) {\n return (\n <div className={cn(\"flex justify-center\", className)} {...props}>\n <StatusView\n size=\"sm\"\n title={title}\n description={description}\n actions={children}\n />\n </div>\n );\n}\n\n/** Bones in the rows' place while the first page is on its way. */\nfunction Loading({ rows = 5 }: { rows?: number }) {\n return (\n <>\n {Array.from({ length: rows }, (_, index) => (\n <div\n key={index}\n aria-hidden\n className=\"flex min-h-12 items-center gap-3 px-5 py-2.5\"\n >\n <Skeleton className=\"h-3.5 w-32\" />\n <Skeleton className=\"h-5 w-12 rounded-full\" />\n <Skeleton className=\"h-3.5 w-48\" />\n <Skeleton className=\"ml-auto h-3.5 w-16\" />\n </div>\n ))}\n </>\n );\n}\n\nexport interface LogListLoadMoreProps extends Omit<\n ComponentProps<\"div\">,\n \"children\"\n> {\n /** Asked for as the sentinel scrolls into view, and on the button. */\n onLoadMore: () => void;\n /** The next page is on its way — the sentinel shows a spinner and waits. */\n loading?: boolean;\n /** Nothing left to load — renders nothing. @default true */\n hasMore?: boolean;\n /** How far ahead of the viewport to ask. @default \"200px\" */\n rootMargin?: string;\n /** The button's words. @default \"Load more\" */\n label?: ReactNode;\n}\n\n/**\n * The sentinel at the end of the list. An `IntersectionObserver` asks for\n * the next page as it comes into view (`rootMargin` ahead of it); while\n * `loading` it shows a spinner and asks for nothing. The button is the\n * same request for keyboards and for a browser without the observer.\n * SSR-safe: the observer is created in an effect.\n */\nfunction LoadMore({\n onLoadMore,\n loading,\n hasMore = true,\n rootMargin = \"200px\",\n label = \"Load more\",\n className,\n ...props\n}: LogListLoadMoreProps) {\n const ref = useRef<HTMLDivElement | null>(null);\n const latest = useRef(onLoadMore);\n latest.current = onLoadMore;\n useEffect(() => {\n const el = ref.current;\n if (!hasMore || loading || el == null) return;\n if (typeof IntersectionObserver === \"undefined\") return;\n const observer = new IntersectionObserver(\n (entries) => {\n if (entries.some((entry) => entry.isIntersecting)) latest.current();\n },\n { rootMargin },\n );\n observer.observe(el);\n return () => observer.disconnect();\n }, [hasMore, loading, rootMargin]);\n if (!hasMore) return null;\n return (\n <div\n ref={ref}\n data-log-load-more=\"\"\n aria-busy={loading || undefined}\n className={cn(\n \"flex min-h-12 items-center justify-center px-5 py-2\",\n className,\n )}\n {...props}\n >\n {loading ? (\n <Spinner aria-label=\"Loading more\" className=\"text-pho-secondary\" />\n ) : (\n <Button variant=\"ghost\" size=\"sm\" onClick={() => onLoadMore()}>\n {label}\n </Button>\n )}\n </div>\n );\n}\n\n/* ---------------------------------- root -------------------------------- */\n\nexport interface LogListRootProps extends ComponentProps<\"div\"> {\n ref?: Ref<HTMLDivElement>;\n}\n\n/** The card the rows stack in. Mark it `aria-busy` while bones show. */\nfunction Root({ className, ...props }: LogListRootProps) {\n return (\n <div\n data-log-list=\"\"\n className={cn(LOG_LIST_SURFACE, \"min-w-0\", className)}\n {...props}\n />\n );\n}\n\n/**\n * Log List — a card of one-line log rows.\n *\n * ```tsx\n * <LogList.Root>\n * <LogList.Row\n * id=\"pho_req_01m04axjqrfzxv4xjet40a84gb\"\n * status={<LogList.Status value={200} />}\n * method=\"POST\"\n * code\n * label=\"/v1/messages\"\n * description=\"+1 332 259 3374 received a message from +1 332 222 1111.\"\n * duration=\"59 ms\"\n * time=\"2 min ago\"\n * href=\"/requests/pho_req_01m04axjqrfzxv4xjet40a84gb\"\n * />\n * <LogList.LoadMore onLoadMore={fetchNextPage} loading={isFetching} hasMore={hasNextPage} />\n * </LogList.Root>\n * ```\n */\nexport const LogList = {\n Root,\n Row,\n Status,\n Method,\n Empty,\n Loading,\n LoadMore,\n};\n"],"mappings":";;;;;;;;;;;;;AA0CA,IAAM,IACJ,yFAGI,IAAU,IACV,IAAU;AAOhB,SAAgB,EACd,GACA,IAAO,GACP,IAAO,GACC;AACR,SAAI,EAAM,UAAU,IAAO,IAAO,IAAU,IACrC,GAAG,EAAM,MAAM,GAAG,CAAI,CAAA,IAAK,EAAM,MAAM,CAAC,CAAI,CAAA;AACrD;AAIA,IAAM,IAAgB,oBAAI,IAAI;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AAG,EAAA,GAA2B;AACvD,SACE,gBAAA,EAAC,OAAD;AAAA,IACE,iBAAc;AAAA,IACd,WAAW,EAAG,GAAkB,WAAW,CAAS;AAAA,IACpD,GAAI;AAAA,EACL,CAAA;AAEL;AAsBA,IAAa,KAAU;AAAA,EACrB,MAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AACF"}
|
|
1
|
+
{"version":3,"file":"log-list-BERiO4UJ.js","names":[],"sources":["../../src/components/log-list/log-list.tsx"],"sourcesContent":["import {\n useEffect,\n useId,\n useRef,\n type ComponentProps,\n type MouseEvent,\n type ReactNode,\n type Ref,\n} from \"react\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { Badge, type BadgeColor, type BadgeSize } from \"../badge\";\nimport { Button } from \"../button\";\nimport { Skeleton } from \"../skeleton\";\nimport { Spinner } from \"../spinner\";\nimport { StatusView } from \"../status-view\";\nimport { Tooltip } from \"../tooltip\";\nimport { cn } from \"../../utils/cn\";\nimport { useCopy } from \"../../utils/use-copy\";\nimport { useLinkComponent } from \"../../utils/link-provider\";\n\n/**\n * Log List — rows of requests, deliveries, or messages, newest first,\n * each one line: a mono id you can copy, a status, the method, what\n * happened, and how long ago. Reach for it where a `DataTable` would be\n * columns of the same few fields: a log reads left to right as one line,\n * and the page filters it from a `FilterBar` pinned above.\n *\n * Design notes:\n * - The surface is `BasicPage.Card`'s: hairline border, `base` radius,\n * hairline rules between rows. It sits in a `Stack` as any card does.\n * - The row is one link (or one button). It stretches over the row from\n * the label, the way a `DataTable` row's does, so the whole row is one\n * pointer target and one tab stop; the copy control sits above it.\n * - The id truncates in the middle, keeping the prefix that says what it\n * is and the tail that tells it apart. The full id is a tooltip away,\n * and one click copies it.\n * - `LoadMore` is the sentinel at the end: it asks for the next page as\n * it scrolls into view, and offers a button for keyboards and for\n * browsers without an observer.\n */\n\n/** Same chrome as `BasicPage.Card`. */\nconst LOG_LIST_SURFACE =\n \"rounded-base border border-pho-secondary bg-pho-primary divide-y divide-pho-secondary\";\n\n/** Middle truncation: the prefix and this many after it, then the tail. */\nconst ID_HEAD = 12;\nconst ID_TAIL = 5;\n\n/**\n * Keep the start and the end of an id and fold the middle into an\n * ellipsis — `pho_req_01m04axjqrfzxv4xjet40a84gb` reads\n * `pho_req_01m0…a84gb`. Ids that fit are returned whole.\n */\nexport function truncateMiddle(\n value: string,\n head = ID_HEAD,\n tail = ID_TAIL,\n): string {\n if (value.length <= head + tail + 1) return value;\n return `${value.slice(0, head)}…${value.slice(-tail)}`;\n}\n\n/* -------------------------------- status -------------------------------- */\n\nconst SUCCESS_WORDS = new Set([\n \"success\",\n \"succeeded\",\n \"successful\",\n \"delivered\",\n \"ok\",\n \"sent\",\n \"received\",\n \"completed\",\n \"complete\",\n \"done\",\n \"active\",\n]);\nconst ERROR_WORDS = new Set([\n \"failed\",\n \"failure\",\n \"error\",\n \"errored\",\n \"rejected\",\n \"undelivered\",\n \"timeout\",\n \"timed_out\",\n \"timed out\",\n \"canceled\",\n \"cancelled\",\n]);\nconst WARNING_WORDS = new Set([\n \"pending\",\n \"queued\",\n \"retrying\",\n \"processing\",\n \"sending\",\n \"in_progress\",\n \"in progress\",\n \"scheduled\",\n \"waiting\",\n]);\n\n/**\n * The `Badge` color for a log status: an HTTP status code (2xx success,\n * 3xx gray, 4xx warning, 5xx error) or a word (`delivered` / `failed` /\n * `pending`). Anything else is gray.\n */\nexport function logStatusColor(status: number | string): BadgeColor {\n if (typeof status === \"number\") {\n if (status < 300) return \"success\";\n if (status < 400) return \"gray\";\n if (status < 500) return \"warning\";\n return \"error\";\n }\n const word = status.trim().toLowerCase();\n if (/^\\d{3}$/.test(word)) return logStatusColor(Number(word));\n if (SUCCESS_WORDS.has(word)) return \"success\";\n if (ERROR_WORDS.has(word)) return \"error\";\n if (WARNING_WORDS.has(word)) return \"warning\";\n return \"gray\";\n}\n\n/** A status word as a label: `timed_out` reads `Timed out`. */\nexport function logStatusLabel(status: number | string): string {\n if (typeof status === \"number\") return String(status);\n const word = status.trim().replace(/_/g, \" \");\n return word.charAt(0).toUpperCase() + word.slice(1);\n}\n\nexport interface LogStatusProps extends Omit<\n ComponentProps<\"span\">,\n \"children\" | \"color\"\n> {\n /** An HTTP status code or a status word. */\n value: number | string;\n /** Override the derived word. */\n label?: ReactNode;\n /** Badge size. @default \"sm\" */\n size?: BadgeSize;\n}\n\n/** The status slot — a low-contrast `Badge` colored by `logStatusColor`. */\nfunction Status({\n value,\n label,\n size = \"sm\",\n className,\n ...props\n}: LogStatusProps) {\n return (\n <Badge\n color={logStatusColor(value)}\n contrast=\"low\"\n size={size}\n className={cn(\"tabular-nums\", className)}\n {...props}\n >\n {label ?? logStatusLabel(value)}\n </Badge>\n );\n}\n\n/** The method slot — `POST`, `GET` as a quiet mono chip. */\nfunction Method({\n className,\n ...props\n}: ComponentProps<\"span\"> & { ref?: Ref<HTMLSpanElement> }) {\n return (\n <span\n className={cn(\n \"bg-pho-secondary text-pho-secondary inline-flex h-5 min-w-12 shrink-0 items-center justify-center rounded-sm px-1.5 font-mono text-xs font-medium whitespace-nowrap\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/* ---------------------------------- id ---------------------------------- */\n\n/**\n * The id cell: a mono button that copies the full id, with a tooltip\n * holding the whole of it. The cell is a fixed width in characters so\n * ids line up down the list.\n */\nfunction IdCell({ id, cellId }: { id: string; cellId: string }) {\n const { copied, copy } = useCopy();\n return (\n <Tooltip.Root>\n <Tooltip.Trigger\n id={cellId}\n aria-label={copied ? `${id} copied` : `Copy ${id}`}\n data-copied={copied || undefined}\n onClick={() => void copy(id)}\n className={cn(\n \"text-pho-secondary outline-pho-brand hover:text-pho-primary relative z-10 -mx-1 w-[calc(18ch+0.5rem)] shrink-0 cursor-pointer truncate rounded-sm px-1 py-0.5 text-left font-mono text-xs transition-colors duration-100 ease-linear focus-visible:outline-2\",\n \"data-[copied]:text-pho-success\",\n )}\n >\n {copied ? \"Copied\" : truncateMiddle(id)}\n </Tooltip.Trigger>\n <output className=\"sr-only\" aria-live=\"polite\">\n {copied ? \"Copied\" : \"\"}\n </output>\n <Tooltip.Portal>\n <Tooltip.Positioner>\n <Tooltip.Popup className=\"font-mono\">{id}</Tooltip.Popup>\n </Tooltip.Positioner>\n </Tooltip.Portal>\n </Tooltip.Root>\n );\n}\n\n/* ---------------------------------- row --------------------------------- */\n\nexport interface LogListRowProps extends Omit<\n ComponentProps<\"div\">,\n \"children\" | \"title\" | \"onClick\" | \"id\"\n> {\n /** The record's id — mono, middle-truncated, copied on click. */\n id?: string;\n /** The status slot — usually `LogList.Status`. */\n status?: ReactNode;\n /** The method — `POST`, `GET`; rendered in `LogList.Method`. */\n method?: string;\n /** What happened — the route, the event type, the message. */\n label: ReactNode;\n /** The label in mono — for a route or an event type. */\n code?: boolean;\n /**\n * The line under the label, with real content: who received what from\n * whom, the destination that answered. A sentence, with its period.\n */\n description?: ReactNode;\n /** Trailing: how long it took — \"59 ms\". */\n duration?: ReactNode;\n /** Trailing: when — \"2 min ago\". */\n time?: ReactNode;\n /** Trailing content before the duration and time. */\n children?: ReactNode;\n /** The row is a link to its page, through the host's `LinkProvider`. */\n href?: string;\n /** The row is a button. */\n onClick?: (event: MouseEvent<HTMLElement>) => void;\n /**\n * Replace the row's link element — a router's `Link`, the way Base UI\n * components take `render`. The row's classes and handlers merge in.\n */\n render?: useRender.RenderProp;\n /** The row whose page is open beside the list — it keeps the wash. */\n current?: boolean;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction Row({\n id,\n status,\n method,\n label,\n code,\n description,\n duration,\n time,\n children,\n href,\n onClick,\n render,\n current,\n className,\n ...props\n}: LogListRowProps) {\n const Link = useLinkComponent();\n const base = useId();\n const interactive = href != null || onClick != null || render != null;\n const cellIds = {\n id: `${base}-id`,\n status: `${base}-status`,\n method: `${base}-method`,\n meta: `${base}-meta`,\n };\n const hasMeta = children != null || duration != null || time != null;\n const describedBy = [\n id != null && cellIds.id,\n status != null && cellIds.status,\n method != null && cellIds.method,\n hasMeta && cellIds.meta,\n ]\n .filter(Boolean)\n .join(\" \");\n const primary = useRender({\n render: render ?? (href != null ? <Link href={href} /> : undefined),\n defaultTagName: href != null ? \"a\" : onClick != null ? \"button\" : \"span\",\n props: {\n className: cn(\n \"text-pho-primary block min-w-0 max-w-full truncate text-left text-base font-medium outline-none\",\n code && \"font-mono text-xs\",\n // The one link, stretched over the row; the ring is the row's.\n interactive &&\n \"cursor-pointer after:absolute after:inset-0 after:content-['']\",\n ),\n onClick,\n type:\n render == null && href == null && onClick != null\n ? \"button\"\n : undefined,\n \"aria-current\": current ? \"page\" : undefined,\n \"aria-describedby\": describedBy || undefined,\n \"data-log-primary\": \"\",\n children: label,\n },\n });\n return (\n <div\n data-log-row=\"\"\n data-current={current || undefined}\n className={cn(\n \"relative flex min-h-12 min-w-0 items-center gap-3 px-5 py-2.5\",\n interactive &&\n \"hover:bg-pho-primary-hover outline-pho-brand transition-colors has-[[data-log-primary]:focus-visible]:outline-2 has-[[data-log-primary]:focus-visible]:-outline-offset-2\",\n current && \"bg-pho-primary-hover\",\n // The wash follows the card's rounding (minus the 1px border).\n \"first:rounded-t-[calc(var(--radius-base)-1px)] last:rounded-b-[calc(var(--radius-base)-1px)]\",\n className,\n )}\n {...props}\n >\n {id != null ? <IdCell id={id} cellId={cellIds.id} /> : null}\n {status != null ? (\n <span id={cellIds.status} className=\"flex shrink-0 items-center\">\n {status}\n </span>\n ) : null}\n {method != null ? <Method id={cellIds.method}>{method}</Method> : null}\n <div data-log-primary-cell=\"\" className=\"min-w-0 flex-1\">\n {primary}\n {description != null ? (\n <p className=\"text-pho-description truncate text-xs\">{description}</p>\n ) : null}\n </div>\n {hasMeta ? (\n <div\n id={cellIds.meta}\n className=\"text-pho-description ml-auto flex shrink-0 items-center gap-3 text-xs whitespace-nowrap tabular-nums\"\n >\n {children}\n {duration != null ? <span>{duration}</span> : null}\n {time != null ? <span>{time}</span> : null}\n </div>\n ) : null}\n </div>\n );\n}\n\n/* -------------------------------- states -------------------------------- */\n\nexport interface LogListEmptyProps extends Omit<\n ComponentProps<\"div\">,\n \"title\" | \"children\"\n> {\n /** One short line naming the state. @default \"Nothing here yet.\" */\n title?: ReactNode;\n /** What fills it, or why it is empty. */\n description?: ReactNode;\n /** An action, when there is one. */\n children?: ReactNode;\n}\n\n/** The list with no rows — `StatusView` at card size. */\nfunction Empty({\n title = \"Nothing here yet.\",\n description,\n children,\n className,\n ...props\n}: LogListEmptyProps) {\n return (\n <div className={cn(\"flex justify-center\", className)} {...props}>\n <StatusView\n size=\"sm\"\n title={title}\n description={description}\n actions={children}\n />\n </div>\n );\n}\n\n/** Bones in the rows' place while the first page is on its way. */\nfunction Loading({ rows = 5 }: { rows?: number }) {\n return (\n <>\n {Array.from({ length: rows }, (_, index) => (\n <div\n key={index}\n aria-hidden\n className=\"flex min-h-12 items-center gap-3 px-5 py-2.5\"\n >\n <Skeleton className=\"h-3.5 w-32\" />\n <Skeleton className=\"h-5 w-12 rounded-full\" />\n <Skeleton className=\"h-3.5 w-48\" />\n <Skeleton className=\"ml-auto h-3.5 w-16\" />\n </div>\n ))}\n </>\n );\n}\n\nexport interface LogListLoadMoreProps extends Omit<\n ComponentProps<\"div\">,\n \"children\"\n> {\n /** Asked for as the sentinel scrolls into view, and on the button. */\n onLoadMore: () => void;\n /** The next page is on its way — the sentinel shows a spinner and waits. */\n loading?: boolean;\n /** Nothing left to load — renders nothing. @default true */\n hasMore?: boolean;\n /** How far ahead of the viewport to ask. @default \"200px\" */\n rootMargin?: string;\n /** The button's words. @default \"Load more\" */\n label?: ReactNode;\n}\n\n/**\n * The sentinel at the end of the list. An `IntersectionObserver` asks for\n * the next page as it comes into view (`rootMargin` ahead of it); while\n * `loading` it shows a spinner and asks for nothing. The button is the\n * same request for keyboards and for a browser without the observer.\n * SSR-safe: the observer is created in an effect.\n */\nfunction LoadMore({\n onLoadMore,\n loading,\n hasMore = true,\n rootMargin = \"200px\",\n label = \"Load more\",\n className,\n ...props\n}: LogListLoadMoreProps) {\n const ref = useRef<HTMLDivElement | null>(null);\n const latest = useRef(onLoadMore);\n latest.current = onLoadMore;\n useEffect(() => {\n const el = ref.current;\n if (!hasMore || loading || el == null) return;\n if (typeof IntersectionObserver === \"undefined\") return;\n const observer = new IntersectionObserver(\n (entries) => {\n if (entries.some((entry) => entry.isIntersecting)) latest.current();\n },\n { rootMargin },\n );\n observer.observe(el);\n return () => observer.disconnect();\n }, [hasMore, loading, rootMargin]);\n if (!hasMore) return null;\n return (\n <div\n ref={ref}\n data-log-load-more=\"\"\n aria-busy={loading || undefined}\n className={cn(\n \"flex min-h-12 items-center justify-center px-5 py-2\",\n className,\n )}\n {...props}\n >\n {loading ? (\n <Spinner aria-label=\"Loading more\" className=\"text-pho-secondary\" />\n ) : (\n <Button variant=\"ghost\" size=\"sm\" onClick={() => onLoadMore()}>\n {label}\n </Button>\n )}\n </div>\n );\n}\n\n/* ---------------------------------- root -------------------------------- */\n\nexport interface LogListRootProps extends ComponentProps<\"div\"> {\n ref?: Ref<HTMLDivElement>;\n}\n\n/** The card the rows stack in. Mark it `aria-busy` while bones show. */\nfunction Root({ className, ...props }: LogListRootProps) {\n return (\n <div\n data-log-list=\"\"\n className={cn(LOG_LIST_SURFACE, \"min-w-0\", className)}\n {...props}\n />\n );\n}\n\n/**\n * Log List — a card of one-line log rows.\n *\n * ```tsx\n * <LogList.Root>\n * <LogList.Row\n * id=\"pho_req_01m04axjqrfzxv4xjet40a84gb\"\n * status={<LogList.Status value={200} />}\n * method=\"POST\"\n * code\n * label=\"/v1/messages\"\n * description=\"+1 332 259 3374 received a message from +1 332 222 1111.\"\n * duration=\"59 ms\"\n * time=\"2 min ago\"\n * href=\"/requests/pho_req_01m04axjqrfzxv4xjet40a84gb\"\n * />\n * <LogList.LoadMore onLoadMore={fetchNextPage} loading={isFetching} hasMore={hasNextPage} />\n * </LogList.Root>\n * ```\n */\nexport const LogList = {\n Root,\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F;AAAA,IACA,GAAI;AAAA,IAEH,UAAA,IACC,gBAAA,EAAC,GAAD;AAAA,MAAS,cAAW;AAAA,MAAe,WAAU;AAAA,IAAsB,CAAA,IAEnE,gBAAA,EAAC,GAAD;AAAA,MAAQ,SAAQ;AAAA,MAAQ,MAAK;AAAA,MAAK,SAAA,MAAe,EAAW;AAAA,MACzD,UAAA;AAAA,IACK,CAAA;AAAA,EAEP,CAAA,IAnBc;AAqBvB;AASA,SAAS,GAAK,EAAE,WAAA,GAAW,GAAG,EAAA,GAA2B;AACvD,SACE,gBAAA,EAAC,OAAD;AAAA,IACE,iBAAc;AAAA,IACd,WAAW,EAAG,GAAkB,WAAW,CAAS;AAAA,IACpD,GAAI;AAAA,EACL,CAAA;AAEL;AAsBA,IAAa,KAAU;AAAA,EACrB,MAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AACF"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as d } from "./cn-ChIgwEl3.js";
|
|
3
|
+
import "../motion.js";
|
|
4
|
+
import { createContext as A, useContext as k, useLayoutEffect as C, useRef as b } from "react";
|
|
5
|
+
import { Fragment as L, jsx as i, jsxs as v } from "react/jsx-runtime";
|
|
6
|
+
import { motion as $ } from "motion/react";
|
|
7
|
+
import { ScrollArea as c } from "@base-ui/react/scroll-area";
|
|
8
|
+
var N = "pointer-events-none absolute inset-x-0 z-10 h-8", _ = 8, F = 1;
|
|
9
|
+
function P(t, e) {
|
|
10
|
+
const n = 100 / (t + 1);
|
|
11
|
+
return Array.from({ length: t }, (o, r) => ({
|
|
12
|
+
blurPx: r / (t - 1) * e,
|
|
13
|
+
window: [
|
|
14
|
+
r * n,
|
|
15
|
+
(r + 1) * n,
|
|
16
|
+
(r + 2) * n,
|
|
17
|
+
(r + 3) * n
|
|
18
|
+
]
|
|
19
|
+
})).filter((o) => o.blurPx > 0);
|
|
20
|
+
}
|
|
21
|
+
var T = P(_, F);
|
|
22
|
+
function U(t, e) {
|
|
23
|
+
const n = t === "top" ? "to top" : "to bottom", [o, r, l, s] = e;
|
|
24
|
+
return `linear-gradient(${n}, transparent ${o}%, black ${r}%, black ${l}%, transparent ${s}%)`;
|
|
25
|
+
}
|
|
26
|
+
var z = "var(--pho-surface, var(--background-color-pho-primary))";
|
|
27
|
+
function B(t, e) {
|
|
28
|
+
return `linear-gradient(${t === "top" ? "to top" : "to bottom"}, color-mix(in oklab, ${e} 20%, transparent) 0%, ${e} 100%)`;
|
|
29
|
+
}
|
|
30
|
+
function y(t, e) {
|
|
31
|
+
if (t)
|
|
32
|
+
for (const n of t.children) {
|
|
33
|
+
const o = n;
|
|
34
|
+
if (o.dataset.scrollFade === "wash") {
|
|
35
|
+
o.style.opacity = String(e);
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
const r = `blur(${Number(o.dataset.blurPx) * e}px)`;
|
|
39
|
+
o.style.backdropFilter = r, o.style.setProperty("-webkit-backdrop-filter", r);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function x({ edge: t, edgeRef: e, surface: n = z, className: o }) {
|
|
43
|
+
return /* @__PURE__ */ v("div", {
|
|
44
|
+
ref: e,
|
|
45
|
+
"aria-hidden": !0,
|
|
46
|
+
"data-edge": t,
|
|
47
|
+
className: d(N, o ?? (t === "top" ? "top-0" : "bottom-0")),
|
|
48
|
+
children: [T.map(({ blurPx: r, window: l }, s) => {
|
|
49
|
+
const a = U(t, l);
|
|
50
|
+
return /* @__PURE__ */ i("div", {
|
|
51
|
+
"data-blur-px": r,
|
|
52
|
+
className: "absolute inset-0",
|
|
53
|
+
style: {
|
|
54
|
+
maskImage: a,
|
|
55
|
+
WebkitMaskImage: a
|
|
56
|
+
}
|
|
57
|
+
}, s);
|
|
58
|
+
}), /* @__PURE__ */ i("div", {
|
|
59
|
+
"data-scroll-fade": "wash",
|
|
60
|
+
className: "absolute inset-0 opacity-0",
|
|
61
|
+
style: { background: B(t, n) }
|
|
62
|
+
})]
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
var R = A(null);
|
|
66
|
+
function H() {
|
|
67
|
+
const t = k(R);
|
|
68
|
+
if (t == null) throw new Error("ScrollArea parts must be used inside ScrollArea.Root");
|
|
69
|
+
return t;
|
|
70
|
+
}
|
|
71
|
+
function E(t) {
|
|
72
|
+
return t <= 0 ? 0 : t >= 1 ? 1 : t;
|
|
73
|
+
}
|
|
74
|
+
function M(t, e) {
|
|
75
|
+
typeof t == "function" ? t(e) : t && (t.current = e);
|
|
76
|
+
}
|
|
77
|
+
function O({ inset: t, insetTop: e, insetBottom: n, style: o, ref: r, ...l }) {
|
|
78
|
+
return /* @__PURE__ */ i(c.Content, {
|
|
79
|
+
ref: r,
|
|
80
|
+
style: {
|
|
81
|
+
paddingTop: e ?? t,
|
|
82
|
+
paddingBottom: n ?? t,
|
|
83
|
+
...o
|
|
84
|
+
},
|
|
85
|
+
...l
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
var X = c.Corner;
|
|
89
|
+
function j({ className: t, children: e, fade: n = !0, ...o }) {
|
|
90
|
+
const r = b(null), l = b(null);
|
|
91
|
+
return /* @__PURE__ */ i(c.Root, {
|
|
92
|
+
className: d("relative overflow-hidden", t),
|
|
93
|
+
...o,
|
|
94
|
+
children: /* @__PURE__ */ v(R.Provider, {
|
|
95
|
+
value: {
|
|
96
|
+
topEl: r,
|
|
97
|
+
bottomEl: l,
|
|
98
|
+
fade: n
|
|
99
|
+
},
|
|
100
|
+
children: [e, n ? /* @__PURE__ */ v(L, { children: [/* @__PURE__ */ i(x, {
|
|
101
|
+
edge: "top",
|
|
102
|
+
edgeRef: r
|
|
103
|
+
}), /* @__PURE__ */ i(x, {
|
|
104
|
+
edge: "bottom",
|
|
105
|
+
edgeRef: l
|
|
106
|
+
})] }) : null]
|
|
107
|
+
})
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function D({ className: t, ref: e, ...n }) {
|
|
111
|
+
const { topEl: o, bottomEl: r, fade: l } = H(), s = b(null);
|
|
112
|
+
return C(() => {
|
|
113
|
+
const a = s.current;
|
|
114
|
+
if (!a || !l) return;
|
|
115
|
+
const m = () => {
|
|
116
|
+
const g = o.current?.offsetHeight || r.current?.offsetHeight || 32, p = a.scrollHeight - a.clientHeight, w = p <= 0 ? 0 : E(a.scrollTop / g), S = p <= 0 ? 0 : E((p - a.scrollTop) / g);
|
|
117
|
+
y(o.current, w), y(r.current, S);
|
|
118
|
+
};
|
|
119
|
+
let u = 0;
|
|
120
|
+
const h = () => {
|
|
121
|
+
u || (u = requestAnimationFrame(() => {
|
|
122
|
+
u = 0, m();
|
|
123
|
+
}));
|
|
124
|
+
};
|
|
125
|
+
m(), a.addEventListener("scroll", h, { passive: !0 });
|
|
126
|
+
let f = null;
|
|
127
|
+
return typeof ResizeObserver < "u" && (f = new ResizeObserver(m), f.observe(a), a.firstElementChild && f.observe(a.firstElementChild)), () => {
|
|
128
|
+
a.removeEventListener("scroll", h), u && cancelAnimationFrame(u), f?.disconnect();
|
|
129
|
+
};
|
|
130
|
+
}, [
|
|
131
|
+
o,
|
|
132
|
+
r,
|
|
133
|
+
l
|
|
134
|
+
]), /* @__PURE__ */ i(c.Viewport, {
|
|
135
|
+
render: /* @__PURE__ */ i($.div, { layoutScroll: !0 }),
|
|
136
|
+
className: d("outline-pho-brand h-full min-h-0 w-full overscroll-contain rounded-[inherit] focus-visible:outline-2 focus-visible:-outline-offset-1", t),
|
|
137
|
+
...n,
|
|
138
|
+
ref: (a) => {
|
|
139
|
+
s.current = a, M(e, a);
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function G({ className: t, ...e }) {
|
|
144
|
+
return /* @__PURE__ */ i(c.Scrollbar, {
|
|
145
|
+
className: d("relative z-20 flex touch-none p-0.5 opacity-0 transition-opacity delay-300 select-none", "data-[hovering]:opacity-100 data-[hovering]:delay-0 data-[scrolling]:opacity-100 data-[scrolling]:delay-0 data-[scrolling]:duration-0", "data-[orientation=horizontal]:h-2.5 data-[orientation=horizontal]:flex-col data-[orientation=vertical]:w-2.5", t),
|
|
146
|
+
...e
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
function I({ className: t, ...e }) {
|
|
150
|
+
return /* @__PURE__ */ i(c.Thumb, {
|
|
151
|
+
className: d("flex-1 rounded-full bg-[var(--border-color-pho-primary)]", t),
|
|
152
|
+
...e
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
var Z = {
|
|
156
|
+
Root: j,
|
|
157
|
+
Viewport: D,
|
|
158
|
+
Content: O,
|
|
159
|
+
Scrollbar: G,
|
|
160
|
+
Thumb: I,
|
|
161
|
+
Corner: X
|
|
162
|
+
};
|
|
163
|
+
export {
|
|
164
|
+
F as n,
|
|
165
|
+
Z as t
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
//# sourceMappingURL=scroll-area-Zik8t1Mk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-area-Zik8t1Mk.js","names":[],"sources":["../../src/components/scroll-area/scroll-area-edges.tsx","../../src/components/scroll-area/scroll-area.tsx"],"sourcesContent":["import { type Ref } from \"react\";\nimport { BLUR_PX } from \"../../motion\";\nimport { cn } from \"../../utils/cn\";\n\n/** Overlay strip height — a short ramp, not a banner. `h-8` = 32px. */\nexport const EDGE_CLASS = \"pointer-events-none absolute inset-x-0 z-10 h-8\";\nexport const EDGE_REVEAL_PX = 32;\n\nconst BLUR_LAYER_COUNT = 8;\n\n/**\n * The system's one blur strength. The edge fade peaks here, and a motion\n * that softens (a scope swap, a bar title) borrows the same value, so\n * every soft focus in the product is the same soft focus.\n */\nexport const BLUR_MAX_PX = BLUR_PX;\n\nfunction buildBlurLayers(count: number, maxPx: number) {\n const segment = 100 / (count + 1);\n return Array.from({ length: count }, (_, i) => ({\n blurPx: (i / (count - 1)) * maxPx,\n window: [\n i * segment,\n (i + 1) * segment,\n (i + 2) * segment,\n (i + 3) * segment,\n ] as const,\n })).filter((layer) => layer.blurPx > 0);\n}\n\nconst BLUR_LAYERS = buildBlurLayers(BLUR_LAYER_COUNT, BLUR_MAX_PX);\n\nfunction edgeMask(edge: \"top\" | \"bottom\", window: readonly number[]) {\n const toEdge = edge === \"top\" ? \"to top\" : \"to bottom\";\n const [a, b, c, d] = window;\n return `linear-gradient(${toEdge}, transparent ${a}%, black ${b}%, black ${c}%, transparent ${d}%)`;\n}\n\n// The wash fades into the block it sits on: every `bg-pho-*` surface\n// registers itself as `--pho-surface` (see the stylesheet), so the nearest\n// surface ancestor's background carries down here — live across themes.\n// The primary surface is the fallback for hosts outside any pho surface.\nconst DEFAULT_SURFACE =\n \"var(--pho-surface, var(--background-color-pho-primary))\";\n\nfunction washGradient(edge: \"top\" | \"bottom\", surface: string) {\n const to = edge === \"top\" ? \"to top\" : \"to bottom\";\n return `linear-gradient(${to}, color-mix(in oklab, ${surface} 20%, transparent) 0%, ${surface} 100%)`;\n}\n\nexport function paintEdge(node: HTMLDivElement | null, progress: number) {\n if (!node) return;\n for (const child of node.children) {\n const el = child as HTMLElement;\n if (el.dataset.scrollFade === \"wash\") {\n el.style.opacity = String(progress);\n continue;\n }\n const blur = `blur(${Number(el.dataset.blurPx) * progress}px)`;\n el.style.backdropFilter = blur;\n el.style.setProperty(\"-webkit-backdrop-filter\", blur);\n }\n}\n\nexport function Edge({\n edge,\n edgeRef,\n surface = DEFAULT_SURFACE,\n className,\n}: {\n edge: \"top\" | \"bottom\";\n edgeRef: Ref<HTMLDivElement>;\n /** The surface the wash fades into — the card by default, or a page. */\n surface?: string;\n /** Position override — the strip sits at the named edge unless placed. */\n className?: string;\n}) {\n return (\n <div\n ref={edgeRef}\n aria-hidden\n data-edge={edge}\n className={cn(\n EDGE_CLASS,\n className ?? (edge === \"top\" ? \"top-0\" : \"bottom-0\"),\n )}\n >\n {BLUR_LAYERS.map(({ blurPx, window }, index) => {\n const mask = edgeMask(edge, window);\n return (\n <div\n key={index}\n data-blur-px={blurPx}\n className=\"absolute inset-0\"\n style={{\n maskImage: mask,\n WebkitMaskImage: mask,\n }}\n />\n );\n })}\n <div\n data-scroll-fade=\"wash\"\n className=\"absolute inset-0 opacity-0\"\n style={{ background: washGradient(edge, surface) }}\n />\n </div>\n );\n}\n","import {\n createContext,\n useContext,\n useLayoutEffect,\n useRef,\n type ComponentProps,\n type ElementType,\n type Ref,\n type RefObject,\n} from \"react\";\nimport { ScrollArea as BaseScrollArea } from \"@base-ui/react/scroll-area\";\nimport { motion } from \"motion/react\";\nimport { cn } from \"../../utils/cn\";\nimport { Edge, EDGE_REVEAL_PX, paintEdge } from \"./scroll-area-edges\";\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\nconst ScrollAreaContext = createContext<{\n topEl: RefObject<HTMLDivElement | null>;\n bottomEl: RefObject<HTMLDivElement | null>;\n fade: boolean;\n} | null>(null);\n\nfunction useScrollAreaContext() {\n const ctx = useContext(ScrollAreaContext);\n if (ctx == null) {\n throw new Error(\"ScrollArea parts must be used inside ScrollArea.Root\");\n }\n return ctx;\n}\n\nfunction clamp01(n: number) {\n if (n <= 0) return 0;\n if (n >= 1) return 1;\n return n;\n}\n\nfunction assignRef<T>(ref: Ref<T> | undefined, node: T | null) {\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref) {\n // React 18 types `RefObject.current` as readonly; the write is legal.\n (ref as { current: T | null }).current = node;\n }\n}\n\n/**\n * The scrolled content. `inset` is a resting inset in the scroll axis —\n * like a scroll view's safe-area padding: the content stands clear of the\n * edges at rest but scrolls past them to the true edge, and the scrollbar\n * and edge fade stay on `Root`'s edges. `insetTop` / `insetBottom` set the\n * ends separately (they win over `inset`).\n */\nfunction Content({\n inset,\n insetTop,\n insetBottom,\n style,\n ref,\n ...props\n}: ComponentProps<typeof BaseScrollArea.Content> & {\n inset?: number | string;\n insetTop?: number | string;\n insetBottom?: number | string;\n ref?: Ref<HTMLDivElement>;\n}) {\n return (\n <BaseScrollArea.Content\n ref={ref}\n style={{\n paddingTop: insetTop ?? inset,\n paddingBottom: insetBottom ?? inset,\n ...style,\n }}\n {...props}\n />\n );\n}\n\nconst Corner = BaseScrollArea.Corner;\n\nfunction Root({\n className,\n children,\n fade = true,\n ...props\n}: StyledProps<typeof BaseScrollArea.Root> & {\n /**\n * Progressive edge fade (blur + wash). Leave on except for code\n * surfaces — CodeBlock is the only caller that turns it off, so\n * glyphs hard-clip at the border.\n * @default true\n */\n fade?: boolean;\n}) {\n const topEl = useRef<HTMLDivElement | null>(null);\n const bottomEl = useRef<HTMLDivElement | null>(null);\n\n return (\n <BaseScrollArea.Root\n className={cn(\"relative overflow-hidden\", className)}\n {...props}\n >\n <ScrollAreaContext.Provider value={{ topEl, bottomEl, fade }}>\n {children}\n {fade ? (\n <>\n <Edge edge=\"top\" edgeRef={topEl} />\n <Edge edge=\"bottom\" edgeRef={bottomEl} />\n </>\n ) : null}\n </ScrollAreaContext.Provider>\n </BaseScrollArea.Root>\n );\n}\n\nfunction Viewport({\n className,\n ref,\n ...props\n}: StyledProps<typeof BaseScrollArea.Viewport>) {\n const { topEl, bottomEl, fade } = useScrollAreaContext();\n const viewportRef = useRef<HTMLElement | null>(null);\n\n useLayoutEffect(() => {\n const viewport = viewportRef.current;\n if (!viewport || !fade) return;\n\n const paint = () => {\n const reveal =\n topEl.current?.offsetHeight ||\n bottomEl.current?.offsetHeight ||\n EDGE_REVEAL_PX;\n const maxScroll = viewport.scrollHeight - viewport.clientHeight;\n const top = maxScroll <= 0 ? 0 : clamp01(viewport.scrollTop / reveal);\n const bottom =\n maxScroll <= 0 ? 0 : clamp01((maxScroll - viewport.scrollTop) / reveal);\n paintEdge(topEl.current, top);\n paintEdge(bottomEl.current, bottom);\n };\n\n let frame = 0;\n const onScroll = () => {\n if (frame) return;\n frame = requestAnimationFrame(() => {\n frame = 0;\n paint();\n });\n };\n\n paint();\n viewport.addEventListener(\"scroll\", onScroll, { passive: true });\n let observer: ResizeObserver | null = null;\n if (typeof ResizeObserver !== \"undefined\") {\n observer = new ResizeObserver(paint);\n observer.observe(viewport);\n if (viewport.firstElementChild) {\n observer.observe(viewport.firstElementChild);\n }\n }\n return () => {\n viewport.removeEventListener(\"scroll\", onScroll);\n if (frame) cancelAnimationFrame(frame);\n observer?.disconnect();\n };\n }, [topEl, bottomEl, fade]);\n\n return (\n <BaseScrollArea.Viewport\n // A motion element with layoutScroll: any layout-animated content\n // inside (a shared-element morph, a FLIP row) projects against the\n // viewport's scroll offset instead of reading a scroll as a layout\n // change.\n render={<motion.div layoutScroll />}\n className={cn(\n \"outline-pho-brand h-full min-h-0 w-full overscroll-contain rounded-[inherit] focus-visible:outline-2 focus-visible:-outline-offset-1\",\n className,\n )}\n {...props}\n ref={(node) => {\n viewportRef.current = node;\n assignRef(ref, node);\n }}\n />\n );\n}\n\nfunction Scrollbar({\n className,\n ...props\n}: StyledProps<typeof BaseScrollArea.Scrollbar>) {\n return (\n <BaseScrollArea.Scrollbar\n className={cn(\n \"relative z-20 flex touch-none p-0.5 opacity-0 transition-opacity delay-300 select-none\",\n \"data-[hovering]:opacity-100 data-[hovering]:delay-0 data-[scrolling]:opacity-100 data-[scrolling]:delay-0 data-[scrolling]:duration-0\",\n \"data-[orientation=horizontal]:h-2.5 data-[orientation=horizontal]:flex-col data-[orientation=vertical]:w-2.5\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction Thumb({\n className,\n ...props\n}: StyledProps<typeof BaseScrollArea.Thumb>) {\n return (\n <BaseScrollArea.Thumb\n className={cn(\n \"flex-1 rounded-full bg-[var(--border-color-pho-primary)]\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/**\n * Scroll area built on Base UI `ScrollArea` — a capped region with overlay\n * scrollbars and progressive edge fade. Approaching rows blur (0 → 1px) and\n * wash into the surface; strength tracks scroll distance over one strip\n * height. Give `Root` a fixed size; put content in `Viewport` → `Content`\n * and add a `Scrollbar` → `Thumb` per axis.\n */\nexport const ScrollArea = {\n Root,\n Viewport,\n Content,\n Scrollbar,\n Thumb,\n Corner,\n};\n"],"mappings":";;;;;;;AAKA,IAAa,IAAa,mDAGpB,IAAmB,GAOZ,IAAA;AAEb,SAAS,EAAgB,GAAe,GAAe;AACrD,QAAM,IAAU,OAAO,IAAQ;AAC/B,SAAO,MAAM,KAAK,EAAE,QAAQ,EAAM,GAAA,CAAI,GAAG,OAAO;AAAA,IAC9C,QAAS,KAAK,IAAQ,KAAM;AAAA,IAC5B,QAAQ;AAAA,MACN,IAAI;AAAA,OACH,IAAI,KAAK;AAAA,OACT,IAAI,KAAK;AAAA,OACT,IAAI,KAAK;AAAA,IACZ;AAAA,EACF,EAAE,EAAE,OAAA,CAAQ,MAAU,EAAM,SAAS,CAAC;AACxC;AAEA,IAAM,IAAc,EAAgB,GAAkB,CAAW;AAEjE,SAAS,EAAS,GAAwB,GAA2B;AACnE,QAAM,IAAS,MAAS,QAAQ,WAAW,aACrC,CAAC,GAAG,GAAG,GAAG,CAAA,IAAK;AACrB,SAAO,mBAAmB,CAAA,iBAAuB,CAAA,YAAa,CAAA,YAAa,CAAA,kBAAmB,CAAA;AAChG;AAMA,IAAM,IACJ;AAEF,SAAS,EAAa,GAAwB,GAAiB;AAE7D,SAAO,mBADI,MAAS,QAAQ,WAAW,WAAA,yBACc,CAAA,0BAAiC,CAAA;AACxF;AAEA,SAAgB,EAAU,GAA6B,GAAkB;AACvE,MAAK;AACL,eAAW,KAAS,EAAK,UAAU;AACjC,YAAM,IAAK;AACX,UAAI,EAAG,QAAQ,eAAe,QAAQ;AACpC,QAAA,EAAG,MAAM,UAAU,OAAO,CAAQ;AAClC;AAAA,MACF;AACA,YAAM,IAAO,QAAQ,OAAO,EAAG,QAAQ,MAAM,IAAI,CAAA;AACjD,MAAA,EAAG,MAAM,iBAAiB,GAC1B,EAAG,MAAM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