durable-actors-observer 0.14.5 → 0.14.7

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 (112) hide show
  1. package/dist/App.d.ts +2 -0
  2. package/dist/client/DatatContext.d.ts +19 -0
  3. package/dist/client/TimeRangeContext.d.ts +8 -0
  4. package/dist/client/cacheKeys.d.ts +6 -0
  5. package/dist/client/observerClient.d.ts +21 -0
  6. package/dist/client/streams/actorStream.d.ts +2 -0
  7. package/dist/client/streams/requestStream.d.ts +2 -0
  8. package/dist/components/actorType/actorTypePage.d.ts +1 -0
  9. package/dist/components/actorType/instanceStatus.d.ts +6 -0
  10. package/dist/components/actorType/instancesCard.d.ts +9 -0
  11. package/dist/components/actorType/liveDormantCard.d.ts +5 -0
  12. package/dist/components/actorType/residencyCard.d.ts +20 -0
  13. package/dist/components/actorType/timingCard.d.ts +14 -0
  14. package/dist/components/instance/connectionsCard.d.ts +14 -0
  15. package/dist/components/instance/instancePage.d.ts +1 -0
  16. package/dist/components/instance/memoryCard.d.ts +7 -0
  17. package/dist/components/instance/requestsCard.d.ts +8 -0
  18. package/dist/components/instance/storageCard.d.ts +8 -0
  19. package/dist/components/overview/activeActorsCard.d.ts +1 -0
  20. package/dist/components/overview/actorTypesCard.d.ts +1 -0
  21. package/dist/components/overview/overview.d.ts +1 -0
  22. package/dist/components/overview/requestRateCard.d.ts +10 -0
  23. package/dist/components/overview/socketsCard.d.ts +1 -0
  24. package/dist/components/overview/trendCard.d.ts +22 -0
  25. package/dist/components/timeRange/timeRangeControl.d.ts +1 -0
  26. package/dist/components/timeRange/timeRangePicker.d.ts +5 -0
  27. package/dist/components/ui/barChart.d.ts +9 -0
  28. package/dist/components/ui/button.d.ts +4 -4
  29. package/dist/components/ui/calendar.d.ts +5 -5
  30. package/dist/components/ui/delta.d.ts +5 -0
  31. package/dist/components/ui/expandFooter.d.ts +9 -0
  32. package/dist/components/ui/input.d.ts +2 -2
  33. package/dist/components/ui/pageHeader.d.ts +15 -0
  34. package/dist/components/ui/popover.d.ts +5 -9
  35. package/dist/components/ui/residencyBar.d.ts +15 -0
  36. package/dist/components/ui/sectionCard.d.ts +10 -0
  37. package/dist/components/ui/segmentedControl.d.ts +13 -0
  38. package/dist/components/ui/skeleton.d.ts +2 -0
  39. package/dist/components/ui/sparkline.d.ts +11 -0
  40. package/dist/components/ui/statCard.d.ts +15 -0
  41. package/dist/components/ui/timeline.d.ts +19 -0
  42. package/dist/components/ui/tooltip.d.ts +7 -0
  43. package/dist/components/ui/trendCard.d.ts +24 -0
  44. package/dist/format.d.ts +15 -0
  45. package/dist/hooks/useActors.d.ts +7 -0
  46. package/dist/hooks/useRequests.d.ts +8 -0
  47. package/dist/hooks/useResidency.d.ts +7 -0
  48. package/dist/hooks/useWebSockets.d.ts +7 -0
  49. package/dist/hooks/useWindowedSWR.d.ts +3 -0
  50. package/dist/index.d.ts +6 -39
  51. package/dist/index.js +2389 -4084
  52. package/dist/lib/actorTypes.d.ts +11 -0
  53. package/dist/lib/requestStats.d.ts +17 -0
  54. package/dist/lib/sockets.d.ts +3 -0
  55. package/dist/lib/timeRange.d.ts +17 -0
  56. package/dist/lib/trendWindow.d.ts +5 -0
  57. package/dist/mocks/instanceResources.d.ts +3 -0
  58. package/dist/routes.d.ts +1 -0
  59. package/dist/standalone/THIRD-PARTY-LICENSES.md +393 -45
  60. package/dist/standalone/app.css +1 -1
  61. package/dist/standalone/app.js +17 -41
  62. package/dist/standalone/index.html +1 -1
  63. package/dist/theme.css +2 -1
  64. package/dist/types/Actors.d.ts +27 -0
  65. package/dist/types/Overview.d.ts +17 -0
  66. package/dist/types/Requests.d.ts +24 -0
  67. package/dist/types/Residency.d.ts +11 -0
  68. package/dist/types/Resources.d.ts +14 -0
  69. package/dist/types/Sockets.d.ts +12 -0
  70. package/dist/types/TimeRange.d.ts +22 -0
  71. package/package.json +8 -5
  72. package/dist/ActorObserver.d.ts +0 -16
  73. package/dist/ConnectionInventoryNotice.d.ts +0 -4
  74. package/dist/ConsoleApp.d.ts +0 -6
  75. package/dist/FilterCombobox.d.ts +0 -19
  76. package/dist/InstanceTimeline.d.ts +0 -45
  77. package/dist/Overview.d.ts +0 -9
  78. package/dist/RequestObserver.d.ts +0 -16
  79. package/dist/RequestTimeline.d.ts +0 -9
  80. package/dist/ResidencyTimeline.d.ts +0 -11
  81. package/dist/SocketTimeline.d.ts +0 -28
  82. package/dist/StateInspector.d.ts +0 -13
  83. package/dist/TimeRangePicker.d.ts +0 -9
  84. package/dist/TimelineScroll.d.ts +0 -8
  85. package/dist/TimelineWheelZoom.d.ts +0 -3
  86. package/dist/TimelineZoom.d.ts +0 -20
  87. package/dist/WebSocketObserver.d.ts +0 -9
  88. package/dist/assets/state-diff.worker-ieZNeZXJ.js +0 -18
  89. package/dist/client.d.ts +0 -120
  90. package/dist/components/ui/badge.d.ts +0 -7
  91. package/dist/components/ui/command.d.ts +0 -11
  92. package/dist/components/ui/drawer.d.ts +0 -15
  93. package/dist/components/ui/native-select.d.ts +0 -7
  94. package/dist/components/ui/sheet.d.ts +0 -9
  95. package/dist/components/ui/table.d.ts +0 -12
  96. package/dist/observer-hooks.d.ts +0 -21
  97. package/dist/overview-data.d.ts +0 -15
  98. package/dist/overview-metrics.d.ts +0 -14
  99. package/dist/queue-wait-history.d.ts +0 -7
  100. package/dist/queue-wait.d.ts +0 -17
  101. package/dist/request-history.d.ts +0 -7
  102. package/dist/request-timeline.d.ts +0 -26
  103. package/dist/residency.d.ts +0 -18
  104. package/dist/socket-history.d.ts +0 -12
  105. package/dist/socket-sessions.d.ts +0 -38
  106. package/dist/standalone/assets/state-diff.worker-ieZNeZXJ.js +0 -18
  107. package/dist/state-data.d.ts +0 -30
  108. package/dist/state-diff.d.ts +0 -1
  109. package/dist/state-diff.worker.d.ts +0 -1
  110. package/dist/state-inspection.d.ts +0 -11
  111. package/dist/styles.css +0 -2
  112. package/dist/time-range.d.ts +0 -39
package/dist/App.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export declare function App(): import("react").JSX.Element;
2
+ export default App;
@@ -0,0 +1,19 @@
1
+ import { type ReactNode } from "react";
2
+ import type { ActorInventory } from "../types/Actors.js";
3
+ import type { RequestTrace } from "../types/Requests.js";
4
+ import type { SocketSession } from "../types/Sockets.js";
5
+ type DataContextType = {
6
+ baseUrl: string;
7
+ actorTypes: ActorInventory | null;
8
+ isError: boolean;
9
+ requests: RequestTrace[] | null;
10
+ isRequestsError: boolean;
11
+ sessions: SocketSession[] | null;
12
+ isSocketsError: boolean;
13
+ };
14
+ export declare const DataProvider: ({ baseUrl, children }: {
15
+ baseUrl?: string;
16
+ children: ReactNode;
17
+ }) => import("react").JSX.Element;
18
+ export declare const useData: () => DataContextType;
19
+ export {};
@@ -0,0 +1,8 @@
1
+ import { type ReactNode } from "react";
2
+ import type { TimeRange, TimeWindow } from "../types/TimeRange.js";
3
+ export declare function TimeRangeProvider({ initialRange, children }: {
4
+ initialRange?: TimeRange | (() => TimeRange);
5
+ children: ReactNode;
6
+ }): import("react").JSX.Element;
7
+ export declare function useTimeWindow(): TimeWindow;
8
+ export declare function useSetTimeRange(): (range: TimeRange) => void;
@@ -0,0 +1,6 @@
1
+ export declare const actorsKey: (baseUrl: string) => readonly ["actors", string];
2
+ export declare const actorEventsKey: (baseUrl: string) => readonly ["actors/events", string];
3
+ export declare const requestsKey: (baseUrl: string) => readonly ["requests", string];
4
+ export declare const requestEventsKey: (baseUrl: string, durationMs: number) => readonly ["requests/events", string, number];
5
+ export declare const residencyKey: (baseUrl: string, actorName: string) => readonly ["residency", string, string];
6
+ export declare const webSocketsKey: (baseUrl: string) => readonly ["websockets", string];
@@ -0,0 +1,21 @@
1
+ import type { ActorInventory } from "../types/Actors.js";
2
+ import type { RequestTracePage } from "../types/Requests.js";
3
+ import type { ResidencyHistory } from "../types/Residency.js";
4
+ import type { SocketSession } from "../types/Sockets.js";
5
+ import type { TimeBounds } from "../types/TimeRange.js";
6
+ export declare const defaultBaseUrl = "/api/observe";
7
+ export interface ObserverClient {
8
+ listActorTypes(): Promise<ActorInventory>;
9
+ listRequests(bounds: TimeBounds): Promise<RequestTracePage>;
10
+ listResidency(actorName: string, bounds: TimeBounds): Promise<ResidencyHistory>;
11
+ listWebSockets(): Promise<SocketSession[]>;
12
+ }
13
+ export declare class HttpObserverClient implements ObserverClient {
14
+ private readonly baseUrl;
15
+ constructor(baseUrl?: string);
16
+ listActorTypes(): Promise<ActorInventory>;
17
+ listRequests({ fromMs, toMs }: TimeBounds): Promise<RequestTracePage>;
18
+ listResidency(actorName: string, { fromMs, toMs }: TimeBounds): Promise<ResidencyHistory>;
19
+ listWebSockets(): Promise<SocketSession[]>;
20
+ private get;
21
+ }
@@ -0,0 +1,2 @@
1
+ import type { ActorInventory } from "../../types/Actors.js";
2
+ export declare function subscribeToActors(baseUrl: string, onInventory: (inventory: ActorInventory) => void): () => void;
@@ -0,0 +1,2 @@
1
+ import type { RequestTracePage } from "../../types/Requests.js";
2
+ export declare function subscribeToRequests(baseUrl: string, onPage: (page: RequestTracePage) => void): () => void;
@@ -0,0 +1 @@
1
+ export declare function ActorTypePage(): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { ReactNode } from "react";
2
+ export declare function InstanceStatus({ live, className, children }: {
3
+ live: boolean;
4
+ className?: string;
5
+ children: ReactNode;
6
+ }): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import type { ActorType } from "../../types/Actors.js";
2
+ import type { RequestTrace } from "../../types/Requests.js";
3
+ export type InstancesCardProps = {
4
+ actor: ActorType | null;
5
+ requests: RequestTrace[] | null;
6
+ failed: boolean;
7
+ now: number;
8
+ };
9
+ export declare function InstancesCard({ actor, requests, failed, now }: InstancesCardProps): import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { ActorTypeSummary } from "../../lib/actorTypes.js";
2
+ export declare function LiveDormantCard({ summary, failed }: {
3
+ summary: ActorTypeSummary | null;
4
+ failed: boolean;
5
+ }): import("react").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import type { ActorType } from "../../types/Actors.js";
2
+ import type { RequestTrace } from "../../types/Requests.js";
3
+ import type { ResidencyHistory, ResidencyPeriod } from "../../types/Residency.js";
4
+ import type { TimeWindow } from "../../types/TimeRange.js";
5
+ import { type TimelineSegment } from "../ui/timeline.js";
6
+ export type ResidencyCardProps = {
7
+ actor: ActorType | null;
8
+ history: ResidencyHistory | null;
9
+ requests: RequestTrace[] | null;
10
+ failed: boolean;
11
+ timeWindow: TimeWindow;
12
+ };
13
+ export declare function ResidencyCard({ actor, history, requests, failed, timeWindow }: ResidencyCardProps): import("react").JSX.Element;
14
+ export declare function groupLivePeriods({ periods }: ResidencyHistory): Map<string, ResidencyPeriod[]>;
15
+ export declare function liveDuration(segments: TimelineSegment[]): number;
16
+ export declare function ResidencyTrack({ segments, requests, label }: {
17
+ segments: TimelineSegment[];
18
+ requests: RequestTrace[] | null;
19
+ label: string;
20
+ }): import("react").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { type TimingPick } from "../../lib/requestStats.js";
2
+ import type { RequestTrace } from "../../types/Requests.js";
3
+ import type { TimeWindow } from "../../types/TimeRange.js";
4
+ export type TimingCardProps = {
5
+ label: string;
6
+ window: string;
7
+ pick: TimingPick;
8
+ color: string;
9
+ chartLabel: string;
10
+ requests: RequestTrace[] | null;
11
+ failed: boolean;
12
+ timeWindow: TimeWindow;
13
+ };
14
+ export declare function TimingCard({ label, window, pick, color, chartLabel, requests, failed, timeWindow }: TimingCardProps): import("react").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import type { ActorInstance } from "../../types/Actors.js";
2
+ import type { RequestTrace } from "../../types/Requests.js";
3
+ import type { ResidencyPeriod } from "../../types/Residency.js";
4
+ import type { SocketSession } from "../../types/Sockets.js";
5
+ import type { TimeWindow } from "../../types/TimeRange.js";
6
+ export type ConnectionsCardProps = {
7
+ instance: ActorInstance | null;
8
+ sessions: SocketSession[] | null;
9
+ livePeriods: ResidencyPeriod[] | null;
10
+ requests: RequestTrace[] | null;
11
+ failed: boolean;
12
+ timeWindow: TimeWindow;
13
+ };
14
+ export declare function ConnectionsCard({ instance, sessions, livePeriods, requests, failed, timeWindow }: ConnectionsCardProps): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function InstancePage(): import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import type { MemoryUsage } from "../../types/Resources.js";
2
+ export type MemoryCardProps = {
3
+ memory: MemoryUsage | null;
4
+ loading: boolean;
5
+ failed: boolean;
6
+ };
7
+ export declare function MemoryCard({ memory, loading, failed }: MemoryCardProps): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import type { RequestTrace } from "../../types/Requests.js";
2
+ import type { TimeWindow } from "../../types/TimeRange.js";
3
+ export type RequestsCardProps = {
4
+ requests: RequestTrace[] | null;
5
+ failed: boolean;
6
+ timeWindow: TimeWindow;
7
+ };
8
+ export declare function RequestsCard({ requests, failed, timeWindow }: RequestsCardProps): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import type { StorageUsage } from "../../types/Resources.js";
2
+ export declare function StorageCard({ storage, failed }: {
3
+ storage: StorageUsage | null;
4
+ failed: boolean;
5
+ }): import("react").JSX.Element;
6
+ export declare function ResourceSkeleton({ failed }: {
7
+ failed: boolean;
8
+ }): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function ActiveActorsCard(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function ActorTypesCard(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function Overview(): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import type { RequestTrace } from "../../types/Requests.js";
2
+ import type { TimeWindow } from "../../types/TimeRange.js";
3
+ export declare function RequestRateCard(): import("react").JSX.Element;
4
+ export type RequestRateTrendProps = {
5
+ requests: RequestTrace[] | null;
6
+ failed: boolean;
7
+ timeWindow: TimeWindow;
8
+ color: string;
9
+ };
10
+ export declare function RequestRateTrend({ requests, failed, timeWindow, color }: RequestRateTrendProps): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function SocketsCard(): import("react").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import type { ReactNode } from "react";
2
+ export type TrendCardProps = {
3
+ label: string;
4
+ window: string;
5
+ value: ReactNode;
6
+ unit: ReactNode;
7
+ busy?: boolean;
8
+ series: number[];
9
+ axis: string[];
10
+ color: string;
11
+ chartLabel: string;
12
+ children: ReactNode;
13
+ };
14
+ export declare function TrendCard({ label, window, value, unit, busy, series, axis, color, chartLabel, children }: TrendCardProps): import("react").JSX.Element;
15
+ export declare function TrendStatsSkeleton({ failed }: {
16
+ failed: boolean;
17
+ }): import("react").JSX.Element;
18
+ export declare function TrendStat({ label, value, suffix }: {
19
+ label: string;
20
+ value: string;
21
+ suffix?: string;
22
+ }): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function TimeRangeControl(): import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { TimeRange, TimeWindow } from "../../types/TimeRange.js";
2
+ export declare function TimeRangePicker({ timeWindow, onChange }: {
3
+ timeWindow: TimeWindow;
4
+ onChange: (range: TimeRange) => void;
5
+ }): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ export type BarChartProps = {
2
+ values: number[];
3
+ label: string;
4
+ highlighted?: number;
5
+ onSelect?: (index: number) => void;
6
+ barLabel?: (index: number) => string;
7
+ className?: string;
8
+ };
9
+ export declare function BarChart({ values, label, highlighted, onSelect, barLabel, className }: BarChartProps): import("react").JSX.Element;
@@ -1,10 +1,10 @@
1
- import * as React from "react";
1
+ import type { ComponentProps } from "react";
2
2
  import { type VariantProps } from "class-variance-authority";
3
3
  declare const buttonVariants: (props?: ({
4
4
  variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
5
- size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
5
+ size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
- declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
7
+ declare function Button({ className, variant, size, asChild, ...props }: ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
8
8
  asChild?: boolean;
9
- }): React.JSX.Element;
9
+ }): import("react").JSX.Element;
10
10
  export { Button, buttonVariants };
@@ -1,8 +1,8 @@
1
- import * as React from "react";
1
+ import { type ComponentProps } from "react";
2
2
  import { type DayButton, DayPicker } from "react-day-picker";
3
3
  import { Button } from "./button.js";
4
- declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
5
- buttonVariant?: React.ComponentProps<typeof Button>["variant"];
6
- }): React.JSX.Element;
7
- declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): React.JSX.Element;
4
+ declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: ComponentProps<typeof DayPicker> & {
5
+ buttonVariant?: ComponentProps<typeof Button>["variant"];
6
+ }): import("react").JSX.Element;
7
+ declare function CalendarDayButton({ className, day, modifiers, ...props }: ComponentProps<typeof DayButton>): import("react").JSX.Element;
8
8
  export { Calendar, CalendarDayButton };
@@ -0,0 +1,5 @@
1
+ import type { ReactNode } from "react";
2
+ export declare function Delta({ value, children }: {
3
+ value: number;
4
+ children: ReactNode;
5
+ }): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ export type ExpandFooterProps = {
2
+ shown: number;
3
+ total: number;
4
+ noun: string;
5
+ expandLabel: string;
6
+ expanded: boolean;
7
+ onToggle: () => void;
8
+ };
9
+ export declare function ExpandFooter({ shown, total, noun, expandLabel, expanded, onToggle }: ExpandFooterProps): import("react").JSX.Element;
@@ -1,3 +1,3 @@
1
- import type * as React from "react";
2
- declare function Input({ className, type, ...props }: React.ComponentProps<"input">): React.JSX.Element;
1
+ import type { ComponentProps } from "react";
2
+ declare function Input({ className, type, ...props }: ComponentProps<"input">): import("react").JSX.Element;
3
3
  export { Input };
@@ -0,0 +1,15 @@
1
+ import type { ReactNode } from "react";
2
+ import { type RelativeRoutingType } from "react-router";
3
+ export type PageHeaderProps = {
4
+ titleId: string;
5
+ title: string;
6
+ back: {
7
+ to: string;
8
+ label: string;
9
+ relative?: RelativeRoutingType;
10
+ };
11
+ badge?: ReactNode;
12
+ meta: ReactNode;
13
+ aside?: ReactNode;
14
+ };
15
+ export declare function PageHeader({ titleId, title, back, badge, meta, aside }: PageHeaderProps): import("react").JSX.Element;
@@ -1,10 +1,6 @@
1
- import * as React from "react";
1
+ import type { ComponentProps } from "react";
2
2
  import * as PopoverPrimitive from "@radix-ui/react-popover";
3
- declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): React.JSX.Element;
4
- declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): React.JSX.Element;
5
- declare function PopoverContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>): React.JSX.Element;
6
- declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): React.JSX.Element;
7
- declare function PopoverHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
8
- declare function PopoverTitle({ className, ...props }: React.ComponentProps<"h2">): React.JSX.Element;
9
- declare function PopoverDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
10
- export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverHeader, PopoverTitle, PopoverDescription };
3
+ declare function Popover(props: ComponentProps<typeof PopoverPrimitive.Root>): import("react").JSX.Element;
4
+ declare function PopoverTrigger(props: ComponentProps<typeof PopoverPrimitive.Trigger>): import("react").JSX.Element;
5
+ declare function PopoverContent({ className, align, sideOffset, ...props }: ComponentProps<typeof PopoverPrimitive.Content>): import("react").JSX.Element;
6
+ export { Popover, PopoverContent, PopoverTrigger };
@@ -0,0 +1,15 @@
1
+ import type { CSSProperties } from "react";
2
+ export type ResidencyBarProps = {
3
+ liveShare: number;
4
+ label: string;
5
+ pulse?: boolean;
6
+ className?: string;
7
+ style?: CSSProperties;
8
+ };
9
+ export declare function ResidencyBar({ liveShare, label, pulse, className, style }: ResidencyBarProps): import("react").JSX.Element;
10
+ export declare function ResidencyLegend({ live, dormant, showCounts }: {
11
+ live: number;
12
+ dormant: number;
13
+ showCounts?: boolean;
14
+ }): import("react").JSX.Element;
15
+ export declare function ResidencyBarSkeleton(): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { type ReactNode } from "react";
2
+ export type SectionCardProps = {
3
+ title: string;
4
+ description?: ReactNode;
5
+ aside?: ReactNode;
6
+ busy?: boolean;
7
+ className?: string;
8
+ children: ReactNode;
9
+ };
10
+ export declare function SectionCard({ title, description, aside, busy, className, children }: SectionCardProps): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import type { ReactNode } from "react";
2
+ export type SegmentedOption<T extends string> = {
3
+ value: T;
4
+ label: string;
5
+ badge?: ReactNode;
6
+ };
7
+ export type SegmentedControlProps<T extends string> = {
8
+ label: string;
9
+ options: SegmentedOption<T>[];
10
+ value: T;
11
+ onChange: (value: T) => void;
12
+ };
13
+ export declare function SegmentedControl<T extends string>({ label, options, value, onChange }: SegmentedControlProps<T>): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { ComponentProps } from "react";
2
+ export declare function Skeleton({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ export type PointDescription = {
2
+ at: string;
3
+ value: string;
4
+ };
5
+ export type SparklineProps = {
6
+ values: number[];
7
+ color: string;
8
+ label: string;
9
+ describePoint?: (index: number) => PointDescription;
10
+ };
11
+ export declare function Sparkline({ values, color, label, describePoint }: SparklineProps): import("react").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { type ReactNode } from "react";
2
+ export type StatCardProps = {
3
+ label: string;
4
+ aside?: ReactNode;
5
+ value?: ReactNode;
6
+ unit?: ReactNode;
7
+ busy?: boolean;
8
+ children?: ReactNode;
9
+ };
10
+ export declare function StatCard({ label, aside, value, unit, busy, children }: StatCardProps): import("react").JSX.Element;
11
+ export declare function StatFigure({ value, unit, className }: {
12
+ value: ReactNode;
13
+ unit?: ReactNode;
14
+ className?: string;
15
+ }): import("react").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import type { ReactNode } from "react";
2
+ import type { TimeSpan, TimeWindow } from "../../types/TimeRange.js";
3
+ export type TimelineSegment = TimeSpan & {
4
+ left: number;
5
+ width: number;
6
+ now: boolean;
7
+ };
8
+ export type TimelineAxisProps = {
9
+ timeWindow: TimeWindow;
10
+ grid: string;
11
+ label?: string;
12
+ trailing?: string;
13
+ };
14
+ export declare function TimelineAxis({ timeWindow, grid, label, trailing }: TimelineAxisProps): import("react").JSX.Element;
15
+ export declare function TimelineTrack({ label, children }: {
16
+ label: string;
17
+ children: ReactNode;
18
+ }): import("react").JSX.Element;
19
+ export declare function timelineSegments(spans: TimeSpan[], { fromMs: start, toMs: end }: TimeWindow, ongoing: boolean): TimelineSegment[];
@@ -0,0 +1,7 @@
1
+ import type { ComponentProps } from "react";
2
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
3
+ declare function TooltipProvider({ delayDuration, ...props }: ComponentProps<typeof TooltipPrimitive.Provider>): import("react").JSX.Element;
4
+ declare function Tooltip(props: ComponentProps<typeof TooltipPrimitive.Root>): import("react").JSX.Element;
5
+ declare function TooltipTrigger(props: ComponentProps<typeof TooltipPrimitive.Trigger>): import("react").JSX.Element;
6
+ declare function TooltipContent({ className, sideOffset, children, ...props }: ComponentProps<typeof TooltipPrimitive.Content>): import("react").JSX.Element;
7
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
@@ -0,0 +1,24 @@
1
+ import type { ReactNode } from "react";
2
+ import { type PointDescription } from "./sparkline.js";
3
+ export type TrendCardProps = {
4
+ label: string;
5
+ window: string;
6
+ value: ReactNode;
7
+ unit: ReactNode;
8
+ busy?: boolean;
9
+ series: number[];
10
+ axis: string[];
11
+ color: string;
12
+ chartLabel: string;
13
+ describePoint: (index: number) => PointDescription;
14
+ children: ReactNode;
15
+ };
16
+ export declare function TrendCard({ label, window, value, unit, busy, series, axis, color, chartLabel, describePoint, children }: TrendCardProps): import("react").JSX.Element;
17
+ export declare function TrendStatsSkeleton({ failed }: {
18
+ failed: boolean;
19
+ }): import("react").JSX.Element;
20
+ export declare function TrendStat({ label, value, suffix }: {
21
+ label: string;
22
+ value: string;
23
+ suffix?: string;
24
+ }): import("react").JSX.Element;
@@ -0,0 +1,15 @@
1
+ export declare const formatClock: (ms: number) => string;
2
+ export declare const formatPreciseClock: (ms: number) => string;
3
+ export declare const formatTick: (ms: number, spanMs: number) => string;
4
+ export declare const formatTimeSpan: (fromMs: number, toMs: number) => string;
5
+ export declare const formatPreciseTimeSpan: (fromMs: number, toMs: number) => string;
6
+ export declare const formatCount: (value: number) => string;
7
+ export declare const formatDecimal: (value: number) => string;
8
+ export declare const formatPercent: (ratio: number) => string;
9
+ export declare const formatSignedPercent: (ratio: number) => string;
10
+ export declare const formatMsValue: (ms: number) => string;
11
+ export declare const formatMs: (ms: number) => string;
12
+ export declare const formatMegabytes: (bytes: number) => string;
13
+ export declare const formatPlural: (value: number, noun: string) => string;
14
+ export declare function formatDuration(ms: number): string;
15
+ export declare function formatAgo(ms: number, now: number): string;
@@ -0,0 +1,7 @@
1
+ import type { ActorInventory } from "../types/Actors.js";
2
+ export declare function useActors(baseUrl: string): {
3
+ actorTypes: ActorInventory | null;
4
+ isLoading: boolean;
5
+ isError: boolean;
6
+ error: any;
7
+ };
@@ -0,0 +1,8 @@
1
+ import type { RequestTrace } from "../types/Requests.js";
2
+ import type { TimeWindow } from "../types/TimeRange.js";
3
+ export declare function useRequests(baseUrl: string, timeWindow: TimeWindow): {
4
+ requests: RequestTrace[] | null;
5
+ isLoading: boolean;
6
+ isError: boolean;
7
+ error: any;
8
+ };
@@ -0,0 +1,7 @@
1
+ import type { TimeWindow } from "../types/TimeRange.js";
2
+ export declare function useResidency(actorName: string, timeWindow: TimeWindow): {
3
+ residency: import("../types/Residency.js").ResidencyHistory | null;
4
+ isLoading: boolean;
5
+ isError: boolean;
6
+ error: any;
7
+ };
@@ -0,0 +1,7 @@
1
+ import type { SocketSession } from "../types/Sockets.js";
2
+ export declare function useWebSockets(baseUrl: string): {
3
+ sessions: SocketSession[] | null;
4
+ isLoading: boolean;
5
+ isError: boolean;
6
+ error: any;
7
+ };
@@ -0,0 +1,3 @@
1
+ import { type SWRConfiguration } from "swr";
2
+ import type { TimeBounds, TimeWindow } from "../types/TimeRange.js";
3
+ export declare function useWindowedSWR<T>(key: readonly unknown[], timeWindow: TimeWindow, fetch: (bounds: TimeBounds) => Promise<T>, config?: SWRConfiguration<T>): import("swr").SWRResponse<T, any, SWRConfiguration<T, any, import("swr").BareFetcher<T>> | undefined>;
package/dist/index.d.ts CHANGED
@@ -1,39 +1,6 @@
1
- export { ActorObserver } from "./ActorObserver.js";
2
- export type { ActorObserverProps } from "./ActorObserver.js";
3
- export { ConsoleApp } from "./ConsoleApp.js";
4
- export type { ConsoleAppProps } from "./ConsoleApp.js";
5
- export { FilterCombobox } from "./FilterCombobox.js";
6
- export type { FilterComboboxProps, FilterSuggestion } from "./FilterCombobox.js";
7
- export { Overview } from "./Overview.js";
8
- export type { OverviewProps } from "./Overview.js";
9
- export { RequestObserver } from "./RequestObserver.js";
10
- export type { RequestObserverProps } from "./RequestObserver.js";
11
- export { RequestTimeline } from "./RequestTimeline.js";
12
- export type { RequestTimelineProps } from "./RequestTimeline.js";
13
- export type { RequestTimelineLane } from "./request-timeline.js";
14
- export { ResidencyTimeline } from "./ResidencyTimeline.js";
15
- export type { ResidencyTimelineProps } from "./ResidencyTimeline.js";
16
- export type { ResidencyHistory, ResidencyPeriod, ResidencyQuery } from "./residency.js";
17
- export { SocketTimeline } from "./SocketTimeline.js";
18
- export type { SocketTimelineProps } from "./SocketTimeline.js";
19
- export { TimeRangePicker } from "./TimeRangePicker.js";
20
- export type { TimeRangePickerProps } from "./TimeRangePicker.js";
21
- export { WebSocketObserver } from "./WebSocketObserver.js";
22
- export type { WebSocketObserverProps } from "./WebSocketObserver.js";
23
- export { Badge, badgeVariants } from "./components/ui/badge.js";
24
- export { Button, buttonVariants } from "./components/ui/button.js";
25
- export { Calendar, CalendarDayButton } from "./components/ui/calendar.js";
26
- export { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator } from "./components/ui/command.js";
27
- export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription } from "./components/ui/drawer.js";
28
- export { Input } from "./components/ui/input.js";
29
- export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverHeader, PopoverTitle, PopoverDescription } from "./components/ui/popover.js";
30
- export { Sheet, SheetContent, SheetTitle, SheetDescription } from "./components/ui/sheet.js";
31
- export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption } from "./components/ui/table.js";
32
- export { HttpObserverClient } from "./client.js";
33
- export type { ActorConnection, ActorInstance, ActorInventory, ActorResidency, ObserverClient, RequestTrace, RequestTracePage, RequestHistoryQuery } from "./client.js";
34
- export { defaultTimeRange, rangeLabel, resolveRange } from "./time-range.js";
35
- export type { TimeRange, ResolvedRange } from "./time-range.js";
36
- export type { OverviewMetrics, ClassMetrics } from "./overview-metrics.js";
37
- export type { QueueWaitRow, QueueWaitStats } from "./queue-wait.js";
38
- export type { SocketSession, SocketSessionRow, SocketSessionStatus } from "./socket-sessions.js";
39
- export type { StateAttribution, StateRecord, StateSnapshot, StateQuery, StateResponse, StateHistoryPage } from "./state-data.js";
1
+ export { DataProvider } from "./client/DatatContext.js";
2
+ export { TimeRangeProvider } from "./client/TimeRangeContext.js";
3
+ export type { TimeRange } from "./types/TimeRange.js";
4
+ export { ActorTypePage } from "./components/actorType/actorTypePage.js";
5
+ export { Overview } from "./components/overview/overview.js";
6
+ export { ObserverRoutes } from "./routes.js";