@actioneer/ads 0.5.3 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/components/accordion.js +15 -15
  2. package/components/agent-icon.d.ts +64 -0
  3. package/components/agent-icon.js +251 -0
  4. package/components/ai-elements/agent-trace.d.ts +8 -1
  5. package/components/ai-elements/agent-trace.js +164 -129
  6. package/components/ai-elements/chain-of-thought-icon.d.ts +42 -0
  7. package/components/ai-elements/chain-of-thought-icon.js +283 -0
  8. package/components/ai-elements/chain-of-thought.js +7 -7
  9. package/components/ai-elements/chart.js +38 -35
  10. package/components/ai-elements/index.d.ts +1 -0
  11. package/components/ai-elements/inline-citation.js +40 -40
  12. package/components/ai-elements/message.js +5 -5
  13. package/components/ai-elements/queue.js +1 -1
  14. package/components/ai-elements/research-activity.d.ts +2 -0
  15. package/components/ai-elements/research-activity.js +79 -81
  16. package/components/ai-elements/task-progress.js +2 -2
  17. package/components/ai-elements/tool.d.ts +4 -2
  18. package/components/ai-elements/tool.js +74 -54
  19. package/components/ai-elements/transcript.js +1 -1
  20. package/components/alert.js +1 -1
  21. package/components/answer.d.ts +2643 -311
  22. package/components/answer.js +1836 -425
  23. package/components/assistant-ui/answer-tool-ui.js +23 -28
  24. package/components/assistant-ui/chain-of-thought.d.ts +7 -2
  25. package/components/assistant-ui/composer-harness.js +20 -16
  26. package/components/assistant-ui/reasoning.js +35 -31
  27. package/components/assistant-ui/tool-fallback.js +125 -122
  28. package/components/assistant-ui/tool-group.d.ts +3 -1
  29. package/components/assistant-ui/tool-group.js +48 -43
  30. package/components/audio-waveform.js +14 -14
  31. package/components/autocomplete.js +52 -48
  32. package/components/avatar.js +58 -44
  33. package/components/badge.js +3 -3
  34. package/components/brand-texture.js +1 -1
  35. package/components/breadcrumbs.d.ts +27 -1
  36. package/components/breadcrumbs.js +94 -42
  37. package/components/button.js +15 -15
  38. package/components/carousel.js +10 -10
  39. package/components/chart.d.ts +14 -0
  40. package/components/chart.js +747 -614
  41. package/components/chip.js +3 -3
  42. package/components/code-block.d.ts +39 -17
  43. package/components/code-block.js +153 -104
  44. package/components/command-palette.js +27 -25
  45. package/components/connector-card.js +2 -2
  46. package/components/dropdown.js +65 -61
  47. package/components/empty-state.js +15 -15
  48. package/components/field.js +23 -23
  49. package/components/index.d.ts +5 -0
  50. package/components/index.js +523 -470
  51. package/components/infinite-canvas.js +60 -60
  52. package/components/kbd.js +6 -6
  53. package/components/link.js +6 -6
  54. package/components/modal.js +22 -20
  55. package/components/page-header.js +1 -1
  56. package/components/pagination.js +22 -22
  57. package/components/pixel-blast-svg.js +1 -1
  58. package/components/pixel-icon.d.ts +31 -0
  59. package/components/pixel-icon.js +733 -0
  60. package/components/popover.js +46 -42
  61. package/components/ripple.d.ts +29 -0
  62. package/components/ripple.js +17 -0
  63. package/components/segmented.js +24 -23
  64. package/components/select.js +71 -67
  65. package/components/selection-action-bar.js +22 -22
  66. package/components/sidebar.d.ts +11 -3
  67. package/components/sidebar.js +161 -148
  68. package/components/stepper.d.ts +2 -0
  69. package/components/stepper.js +80 -43
  70. package/components/table.d.ts +7 -0
  71. package/components/table.js +223 -155
  72. package/components/tabs.d.ts +3 -1
  73. package/components/tabs.js +165 -144
  74. package/components/textarea.js +10 -8
  75. package/components/toast.js +48 -46
  76. package/components/tooltip.js +61 -59
  77. package/components/tree.js +44 -41
  78. package/components/typography.d.ts +1 -1
  79. package/components/typography.js +25 -25
  80. package/components/viz-charts.d.ts +62 -0
  81. package/components/viz-charts.js +408 -0
  82. package/fonts/aribau-grotesk-500.otf +0 -0
  83. package/fonts/aribau-grotesk-600.woff2 +0 -0
  84. package/fonts.css +6 -4
  85. package/lib/icons.d.ts +411 -402
  86. package/lib/icons.js +109 -107
  87. package/lib/viz-format.d.ts +25 -0
  88. package/lib/viz-format.js +40 -0
  89. package/llms.txt +111 -8
  90. package/manifest.json +1096 -58
  91. package/package.json +5 -5
  92. package/styles.css +226 -96
  93. package/theme.css +220 -92
  94. package/fonts/aribau-grotesk-400.otf +0 -0
  95. package/fonts/aribau-grotesk-700.otf +0 -0
package/lib/icons.js CHANGED
@@ -1,111 +1,113 @@
1
1
  "use client";
2
- import { jsx as s } from "react/jsx-runtime";
3
- import { HugeiconsIcon as r } from "@hugeicons/react";
4
- import { Tick02Icon as a, Copy01Icon as i, File02Icon as I, Cancel01Icon as l, Upload01Icon as h, ViewOffIcon as C, ViewIcon as g, MinusSignIcon as p, PlusSignIcon as f, ArrowDown01Icon as d, Search01Icon as u, InformationCircleIcon as k, AlertCircleIcon as w, Alert02Icon as A, CheckmarkCircle02Icon as L, ArrowLeft01Icon as m, ArrowRight01Icon as S, DatabaseIcon as P, Maximize01Icon as M, Magnet01Icon as O, ArrowUp01Icon as T, ArrowUpDownIcon as U, InboxIcon as y, ArrowLeft02Icon as B, MoreHorizontalIcon as D, SparklesIcon as F, Wrench01Icon as R, CancelCircleIcon as b, Clock01Icon as x, CircleDashedIcon as H, RefreshIcon as v, Attachment01Icon as G, QuoteDownIcon as V, BrainIcon as z, Loading03Icon as E, AtIcon as W, BoltIcon as N, Table01Icon as Q, File01Icon as j, Download01Icon as q, Image01Icon as J, BracesIcon as K, MusicNote01Icon as X, Video01Icon as Y, ImageNotFound01Icon as Z, Activity01Icon as _, AiChat02Icon as $, ArrowDown02Icon as oo, ArrowRight02Icon as no, ArrowUp02Icon as co, Route01Icon as eo, BlocksIcon as to, BookOpen01Icon as so, Calendar01Icon as ro, Call02Icon as ao, CheckListIcon as io, CodeIcon as Io, ComponentIcon as lo, LinkSquare02Icon as ho, Folder01Icon as Co, FolderOpenIcon as go, DashboardSpeed01Icon as po, GitBranchIcon as fo, HashtagIcon as uo, HistoryIcon as ko, Home01Icon as wo, ImageUploadIcon as Ao, GridViewIcon as Lo, Leaf01Icon as mo, Idea01Icon as So, Link01Icon as Po, Logout01Icon as Mo, Mail01Icon as Oo, Mic01Icon as To, MicOff01Icon as Uo, MoreVerticalIcon as yo, PaintBoardIcon as Bo, SidebarLeftIcon as Do, PauseIcon as Fo, PencilEdit02Icon as Ro, PhoneOff01Icon as bo, PieChartIcon as xo, PlayIcon as Ho, PlugSocketIcon as vo, RocketIcon as Go, Settings01Icon as Vo, ShapesIcon as zo, Share01Icon as Eo, StarIcon as Wo, StopIcon as No, Target01Icon as Qo, Telescope01Icon as jo, TextFontIcon as qo, ToggleOnIcon as Jo, Delete02Icon as Ko, UserIcon as Xo, UserGroupIcon as Yo, ArrowUpRight01Icon as Zo } from "@hugeicons/core-free-icons";
5
- function o(c, e) {
6
- function n(t) {
7
- return /* @__PURE__ */ s(r, { icon: c, size: "1em", ...t });
8
- }
9
- return n.displayName = e, n;
2
+ import { jsx as h } from "react/jsx-runtime";
3
+ import * as C from "react";
4
+ import { ArrowUpRight as g, Code as p, Check as u, Copy as $, FileText as f, X as k, UploadSimple as w, EyeSlash as d, Eye as S, Minus as P, Plus as A, CaretDown as L, MagnifyingGlass as T, Info as m, WarningCircle as M, Warning as y, CheckCircle as U, CaretUp as O, ArrowsDownUp as B, Clock as b, Database as D, CaretLeft as R, CaretRight as I, CornersOut as F, Magnet as x, Tray as H, ArrowLeft as v, DotsThree as G, User as W, XCircle as E, CircleDashed as z, ArrowsClockwise as V, Paperclip as N, Quotes as Q, At as q, Lightning as X, Table as j, Sparkle as J, File as K, DownloadSimple as Y, Image as s, BracketsCurly as Z, MusicNotes as _, VideoCamera as oo, ImageBroken as eo, CircleNotch as to, Pulse as so, ChatCircle as no, ArrowDown as ao, ArrowRight as ro, ArrowUp as co, Scroll as io, Stack as lo, BookOpen as ho, Brain as Co, CalendarBlank as go, Phone as po, ListChecks as uo, Cube as $o, ArrowSquareOut as fo, Folder as ko, FolderOpen as wo, Gauge as So, GitBranch as Po, Hash as Ao, ClockCounterClockwise as Lo, House as To, SquaresFour as mo, Leaf as Mo, Lightbulb as yo, Link as Uo, SignOut as Oo, Envelope as Bo, Microphone as bo, MicrophoneSlash as Do, DotsThreeVertical as Ro, Palette as Io, SidebarSimple as Fo, Pause as xo, PencilSimple as Ho, PhoneSlash as vo, ChartPie as Go, Play as Wo, Plug as Eo, Rocket as zo, Gear as Vo, Shapes as No, ShareNetwork as Qo, Star as qo, Stop as Xo, ArrowsLeftRight as jo, Target as Jo, Binoculars as Ko, TextT as Yo, ToggleRight as Zo, Trash as _o, Users as oe, Wrench as ee } from "@phosphor-icons/react";
5
+ function o(n, a) {
6
+ const e = C.forwardRef(function({ strokeWidth: t, weight: r, ...c }, i) {
7
+ const l = r ?? (t != null && t >= 2 ? "bold" : "regular");
8
+ return /* @__PURE__ */ h(n, { ref: i, size: "1em", weight: l, ...c });
9
+ });
10
+ return e.displayName = a, e;
10
11
  }
11
- const nn = o(oo, "ArrowDown"), cn = o(B, "ArrowLeft"), en = o(no, "ArrowRight"), tn = o(co, "ArrowUp"), sn = o(Zo, "ArrowUpRight"), rn = o(d, "ChevronDown"), an = o(m, "ChevronLeft"), In = o(S, "ChevronRight"), ln = o(T, "ChevronUp"), hn = o(U, "SortIcon"), Cn = o(ho, "ExternalLink"), gn = o(Do, "PanelLeft"), pn = o(W, "At"), fn = o(ao, "Call"), dn = o(l, "Close"), un = o(b, "CloseCircle"), kn = o(i, "Copy"), wn = o(q, "Download"), An = o(Mo, "LogOut"), Ln = o(To, "Mic"), mn = o(Uo, "MicOff"), Sn = o(bo, "PhoneOff"), Pn = o(Ro, "Pencil"), Mn = o(V, "Quote"), On = o(g, "Eye"), Tn = o(C, "EyeOff"), Un = o(uo, "Hash"), yn = o(Ao, "ImageUpload"), Bn = o(h, "Upload"), Dn = o(qo, "TextFont"), Fn = o(Jo, "ToggleOn"), Rn = o(ro, "Calendar"), bn = o(x, "Clock"), xn = o(Io, "Code"), Hn = o(No, "Stop"), vn = o(O, "Magnet"), Gn = o(M, "Maximize"), Vn = o(p, "Minus"), zn = o(D, "MoreHorizontal"), En = o(yo, "MoreVertical"), Wn = o(Po, "Link"), Nn = o(f, "Plus"), Qn = o(v, "Refresh"), jn = o(eo, "AuditTrail"), qn = o(u, "Search"), Jn = o(Eo, "Share"), Kn = o(Ko, "Trash"), Xn = o(a, "Check"), Yn = o(E, "Loader"), Zn = o(L, "CheckCircle"), _n = o(k, "Info"), $n = o(A, "Warning"), oc = o(w, "WarningCircle"), nc = o(_, "Activity"), cc = o($, "AgentChat"), ec = o(N, "Bolt"), tc = o(so, "BookOpen"), sc = o(z, "Brain"), rc = o(io, "CheckList"), ac = o(lo, "Component"), ic = o(P, "Database"), Ic = o(Q, "Table"), lc = o(j, "File"), hc = o(I, "FileText"), Cc = o(Co, "Folder"), gc = o(J, "Image"), pc = o(Z, "ImageOff"), fc = o(X, "Music"), dc = o(Y, "Video"), uc = o(K, "Braces"), kc = o(go, "FolderOpen"), wc = o(po, "Gauge"), Ac = o(fo, "GitBranch"), Lc = o(ko, "HistoryClock"), mc = o(wo, "Home"), Sc = o(to, "Blocks"), Pc = o(y, "Inbox"), Mc = o(So, "Lightbulb"), Oc = o(mo, "Leaf"), Tc = o(Lo, "LayoutGrid"), Uc = o(Oo, "Mail"), yc = o(Bo, "Palette"), Bc = o(xo, "PieChart"), Dc = o(vo, "Plug"), Fc = o(Go, "Rocket"), Rc = o(Vo, "Settings"), bc = o(zo, "Shapes"), xc = o(F, "Sparkles"), Hc = o(Wo, "Star"), vc = o(jo, "Telescope"), Gc = o(Qo, "Target"), Vc = o(Xo, "User"), zc = o(Yo, "Users"), Ec = o(Ho, "Play"), Wc = o(Fo, "Pause"), Nc = o(G, "Paperclip"), Qc = o(H, "CircleDashed"), jc = o(R, "Wrench");
12
+ const ae = o(ao, "ArrowDown"), re = o(v, "ArrowLeft"), ce = o(ro, "ArrowRight"), ie = o(co, "ArrowUp"), le = o(g, "ArrowUpRight"), he = o(L, "ChevronDown"), Ce = o(R, "ChevronLeft"), ge = o(I, "ChevronRight"), pe = o(O, "ChevronUp"), ue = o(B, "SortIcon"), $e = o(jo, "SwapHorizontal"), fe = o(fo, "ExternalLink"), ke = o(Fo, "PanelLeft"), we = o(q, "At"), de = o(po, "Call"), Se = o(k, "Close"), Pe = o(E, "CloseCircle"), Ae = o($, "Copy"), Le = o(Y, "Download"), Te = o(Oo, "LogOut"), me = o(bo, "Mic"), Me = o(Do, "MicOff"), ye = o(vo, "PhoneOff"), Ue = o(Ho, "Pencil"), Oe = o(Q, "Quote"), Be = o(S, "Eye"), be = o(d, "EyeOff"), De = o(Ao, "Hash"), Re = o(s, "ImageUpload"), Ie = o(w, "Upload"), Fe = o(Yo, "TextFont"), xe = o(Zo, "ToggleOn"), He = o(go, "Calendar"), ve = o(b, "Clock"), Ge = o(p, "Code"), We = o(Xo, "Stop"), Ee = o(x, "Magnet"), ze = o(F, "Maximize"), Ve = o(P, "Minus"), Ne = o(G, "MoreHorizontal"), Qe = o(Ro, "MoreVertical"), qe = o(Uo, "Link"), Xe = o(A, "Plus"), je = o(V, "Refresh"), Je = o(io, "AuditTrail"), Ke = o(T, "Search"), Ye = o(Qo, "Share"), Ze = o(_o, "Trash"), _e = o(u, "Check"), ot = o(to, "Loader"), et = o(U, "CheckCircle"), tt = o(m, "Info"), st = o(y, "Warning"), nt = o(M, "WarningCircle"), at = o(so, "Activity"), rt = o(no, "AgentChat"), ct = o(X, "Bolt"), it = o(ho, "BookOpen"), lt = o(Co, "Brain"), ht = o(uo, "CheckList"), Ct = o($o, "Component"), gt = o(D, "Database"), pt = o(j, "Table"), ut = o(K, "File"), $t = o(f, "FileText"), ft = o(ko, "Folder"), kt = o(s, "Image"), wt = o(eo, "ImageOff"), dt = o(_, "Music"), St = o(oo, "Video"), Pt = o(Z, "Braces"), At = o(wo, "FolderOpen"), Lt = o(So, "Gauge"), Tt = o(Po, "GitBranch"), mt = o(Lo, "HistoryClock"), Mt = o(To, "Home"), yt = o(lo, "Blocks"), Ut = o(H, "Inbox"), Ot = o(yo, "Lightbulb"), Bt = o(Mo, "Leaf"), bt = o(mo, "LayoutGrid"), Dt = o(Bo, "Mail"), Rt = o(Io, "Palette"), It = o(Go, "PieChart"), Ft = o(Eo, "Plug"), xt = o(zo, "Rocket"), Ht = o(Vo, "Settings"), vt = o(No, "Shapes"), Gt = o(J, "Sparkles"), Wt = o(qo, "Star"), Et = o(Ko, "Telescope"), zt = o(Jo, "Target"), Vt = o(W, "User"), Nt = o(oe, "Users"), Qt = o(Wo, "Play"), qt = o(xo, "Pause"), Xt = o(N, "Paperclip"), jt = o(z, "CircleDashed"), Jt = o(ee, "Wrench");
12
13
  export {
13
- nc as Activity,
14
- cc as AgentChat,
15
- nn as ArrowDown,
16
- cn as ArrowLeft,
17
- en as ArrowRight,
18
- tn as ArrowUp,
19
- sn as ArrowUpRight,
20
- pn as At,
21
- jn as AuditTrail,
22
- Sc as Blocks,
23
- ec as Bolt,
24
- tc as BookOpen,
25
- uc as Braces,
26
- sc as Brain,
27
- Rn as Calendar,
28
- fn as Call,
29
- Xn as Check,
30
- Zn as CheckCircle,
31
- rc as CheckList,
32
- rn as ChevronDown,
33
- an as ChevronLeft,
34
- In as ChevronRight,
35
- ln as ChevronUp,
36
- Qc as CircleDashed,
37
- bn as Clock,
38
- dn as Close,
39
- un as CloseCircle,
40
- xn as Code,
41
- ac as Component,
42
- kn as Copy,
43
- ic as Database,
44
- wn as Download,
45
- Cn as ExternalLink,
46
- On as Eye,
47
- Tn as EyeOff,
48
- lc as File,
49
- hc as FileText,
50
- Cc as Folder,
51
- kc as FolderOpen,
52
- wc as Gauge,
53
- Ac as GitBranch,
54
- Un as Hash,
55
- Lc as HistoryClock,
56
- mc as Home,
57
- gc as Image,
58
- pc as ImageOff,
59
- yn as ImageUpload,
60
- Pc as Inbox,
61
- _n as Info,
62
- Tc as LayoutGrid,
63
- Oc as Leaf,
64
- Mc as Lightbulb,
65
- Wn as Link,
66
- Yn as Loader,
67
- An as LogOut,
68
- vn as Magnet,
69
- Uc as Mail,
70
- Gn as Maximize,
71
- Ln as Mic,
72
- mn as MicOff,
73
- Vn as Minus,
74
- zn as MoreHorizontal,
75
- En as MoreVertical,
76
- fc as Music,
77
- yc as Palette,
78
- gn as PanelLeft,
79
- Nc as Paperclip,
80
- Wc as Pause,
81
- Pn as Pencil,
82
- Sn as PhoneOff,
83
- Bc as PieChart,
84
- Ec as Play,
85
- Dc as Plug,
86
- Nn as Plus,
87
- Mn as Quote,
88
- Qn as Refresh,
89
- Fc as Rocket,
90
- qn as Search,
91
- Rc as Settings,
92
- bc as Shapes,
93
- Jn as Share,
94
- hn as SortIcon,
95
- xc as Sparkles,
96
- Hc as Star,
97
- Hn as Stop,
98
- Ic as Table,
99
- Gc as Target,
100
- vc as Telescope,
101
- Dn as TextFont,
102
- Fn as ToggleOn,
103
- Kn as Trash,
104
- Bn as Upload,
105
- Vc as User,
106
- zc as Users,
107
- dc as Video,
108
- $n as Warning,
109
- oc as WarningCircle,
110
- jc as Wrench
14
+ at as Activity,
15
+ rt as AgentChat,
16
+ ae as ArrowDown,
17
+ re as ArrowLeft,
18
+ ce as ArrowRight,
19
+ ie as ArrowUp,
20
+ le as ArrowUpRight,
21
+ we as At,
22
+ Je as AuditTrail,
23
+ yt as Blocks,
24
+ ct as Bolt,
25
+ it as BookOpen,
26
+ Pt as Braces,
27
+ lt as Brain,
28
+ He as Calendar,
29
+ de as Call,
30
+ _e as Check,
31
+ et as CheckCircle,
32
+ ht as CheckList,
33
+ he as ChevronDown,
34
+ Ce as ChevronLeft,
35
+ ge as ChevronRight,
36
+ pe as ChevronUp,
37
+ jt as CircleDashed,
38
+ ve as Clock,
39
+ Se as Close,
40
+ Pe as CloseCircle,
41
+ Ge as Code,
42
+ Ct as Component,
43
+ Ae as Copy,
44
+ gt as Database,
45
+ Le as Download,
46
+ fe as ExternalLink,
47
+ Be as Eye,
48
+ be as EyeOff,
49
+ ut as File,
50
+ $t as FileText,
51
+ ft as Folder,
52
+ At as FolderOpen,
53
+ Lt as Gauge,
54
+ Tt as GitBranch,
55
+ De as Hash,
56
+ mt as HistoryClock,
57
+ Mt as Home,
58
+ kt as Image,
59
+ wt as ImageOff,
60
+ Re as ImageUpload,
61
+ Ut as Inbox,
62
+ tt as Info,
63
+ bt as LayoutGrid,
64
+ Bt as Leaf,
65
+ Ot as Lightbulb,
66
+ qe as Link,
67
+ ot as Loader,
68
+ Te as LogOut,
69
+ Ee as Magnet,
70
+ Dt as Mail,
71
+ ze as Maximize,
72
+ me as Mic,
73
+ Me as MicOff,
74
+ Ve as Minus,
75
+ Ne as MoreHorizontal,
76
+ Qe as MoreVertical,
77
+ dt as Music,
78
+ Rt as Palette,
79
+ ke as PanelLeft,
80
+ Xt as Paperclip,
81
+ qt as Pause,
82
+ Ue as Pencil,
83
+ ye as PhoneOff,
84
+ It as PieChart,
85
+ Qt as Play,
86
+ Ft as Plug,
87
+ Xe as Plus,
88
+ Oe as Quote,
89
+ je as Refresh,
90
+ xt as Rocket,
91
+ Ke as Search,
92
+ Ht as Settings,
93
+ vt as Shapes,
94
+ Ye as Share,
95
+ ue as SortIcon,
96
+ Gt as Sparkles,
97
+ Wt as Star,
98
+ We as Stop,
99
+ $e as SwapHorizontal,
100
+ pt as Table,
101
+ zt as Target,
102
+ Et as Telescope,
103
+ Fe as TextFont,
104
+ xe as ToggleOn,
105
+ Ze as Trash,
106
+ Ie as Upload,
107
+ Vt as User,
108
+ Nt as Users,
109
+ St as Video,
110
+ st as Warning,
111
+ nt as WarningCircle,
112
+ Jt as Wrench
111
113
  };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Number & date formatting for the viz (segmentation) charts — India-first,
3
+ * per the Visualisations handoff. Kept separate from the components so both
4
+ * the renderers and their data tables format identically.
5
+ *
6
+ * Rule of the surface: every numeral is tabular-nums in the ADS face (never
7
+ * a mono font — EXTENDING §2.2), prose labels are sans. These helpers only
8
+ * produce the numeral strings.
9
+ */
10
+ /** Tooltip / table grouping — lakh grouping. 1042318 → "10,42,318". */
11
+ export declare function commafy(n: number): string;
12
+ /**
13
+ * Axis abbreviation with the Indian ladder — capital K, then L (lakh),
14
+ * then Cr (crore). 145000 → "1.5L", 15000000 → "1.5Cr", 2300 → "2.3K".
15
+ */
16
+ export declare function abbr(n: number): string;
17
+ /**
18
+ * Duration as the two most-significant units; "—" for null/0.
19
+ * 21310 → "5h 55m", 305 → "5m 5s", 42 → "42s".
20
+ */
21
+ export declare function fmtDuration(seconds: number | null | undefined): string;
22
+ /** Percentage to one decimal place, the surface default. 12.83 → "12.8%". */
23
+ export declare function pct1(x: number): string;
24
+ /** Percentage to two decimals — funnel-trends tooltip. 12.8 → "12.80%". */
25
+ export declare function pct2(x: number): string;
@@ -0,0 +1,40 @@
1
+ "use client";
2
+ function s(t) {
3
+ return t.toLocaleString("en-IN");
4
+ }
5
+ function o(t, n) {
6
+ return t.toFixed(n).replace(/\.?0+$/, "");
7
+ }
8
+ function l(t) {
9
+ const n = t < 0 ? "-" : "", r = Math.abs(t);
10
+ return r >= 1e7 ? `${n}${o(r / 1e7, 1)}Cr` : r >= 1e5 ? `${n}${o(r / 1e5, 1)}L` : r >= 1e3 ? `${n}${o(r / 1e3, 1)}K` : `${n}${r}`;
11
+ }
12
+ function $(t) {
13
+ if (t == null || t === 0) return "—";
14
+ const n = Math.floor(t), r = [
15
+ [86400, "d"],
16
+ [3600, "h"],
17
+ [60, "m"],
18
+ [1, "s"]
19
+ ], e = [];
20
+ let i = n;
21
+ for (const [u, c] of r)
22
+ if (i >= u || e.length) {
23
+ const f = Math.floor(i / u);
24
+ if ((e.length || f > 0) && (e.push(`${f}${c}`), i -= f * u), e.length === 2) break;
25
+ }
26
+ return e.slice(0, 2).join(" ") || `${n}s`;
27
+ }
28
+ function a(t) {
29
+ return `${o(t, 1)}%`;
30
+ }
31
+ function h(t) {
32
+ return `${t.toFixed(2)}%`;
33
+ }
34
+ export {
35
+ l as abbr,
36
+ s as commafy,
37
+ $ as fmtDuration,
38
+ a as pct1,
39
+ h as pct2
40
+ };