@odigos/ui-kit 0.0.216 → 0.0.218

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 (38) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/lib/chunks/index-BPGpDZxy.js +3 -0
  3. package/lib/chunks/{ui-components-DvThY8Em.js → ui-components-CzlBPbLD.js} +364 -327
  4. package/lib/components/_v2/button/index.d.ts +1 -0
  5. package/lib/components/_v2/search/index.d.ts +4 -0
  6. package/lib/components/tooltip/index.d.ts +5 -0
  7. package/lib/components/v2.js +1 -1
  8. package/lib/components.js +1 -1
  9. package/lib/constants.js +1 -1
  10. package/lib/containers/_v2/index.d.ts +1 -1
  11. package/lib/containers/_v2/settings/index.d.ts +13 -0
  12. package/lib/containers/source-drawer/index.d.ts +5 -0
  13. package/lib/containers/source-drawer/profiling/flame-graph-canvas.d.ts +10 -0
  14. package/lib/containers/source-drawer/profiling/flamebearer.d.ts +70 -0
  15. package/lib/containers/source-drawer/profiling/index.d.ts +34 -0
  16. package/lib/containers/v2.js +102 -156
  17. package/lib/containers.js +214 -120
  18. package/lib/contexts.js +1 -1
  19. package/lib/functions.js +1 -1
  20. package/lib/hooks/usePopup.d.ts +17 -1
  21. package/lib/hooks.js +1 -1
  22. package/lib/mock-data/config/index.d.ts +3 -0
  23. package/lib/mock-data/index.d.ts +1 -0
  24. package/lib/mock-data/profiling/index.d.ts +10 -0
  25. package/lib/mock-data/service-map/index.d.ts +3 -1
  26. package/lib/snippets/_v2/dynamic-field/index.d.ts +19 -0
  27. package/lib/snippets/_v2/index.d.ts +1 -0
  28. package/lib/snippets/v2.js +55 -0
  29. package/lib/snippets.js +1 -1
  30. package/lib/store.js +1 -1
  31. package/lib/theme.js +1 -1
  32. package/lib/types/config/index.d.ts +78 -0
  33. package/lib/types/destinations/index.d.ts +2 -2
  34. package/lib/types/index.d.ts +1 -0
  35. package/lib/types.js +1 -1
  36. package/lib/visuals.js +1 -1
  37. package/package.json +10 -5
  38. package/lib/chunks/index-3rwrQKyF.js +0 -3
@@ -12,6 +12,7 @@ export declare enum ButtonSize {
12
12
  }
13
13
  export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
14
14
  label?: string;
15
+ tooltip?: string;
15
16
  leftIcon?: SVG;
16
17
  rightIcon?: SVG;
17
18
  variant?: ButtonVariants;
@@ -6,5 +6,9 @@ export interface SearchProps {
6
6
  placeholder?: string;
7
7
  width?: CSSProperties['width'];
8
8
  segment?: Pick<SegmentProps, 'options' | 'selected' | 'setSelected'>;
9
+ /** Replaces default idle background (`silver[800]`). */
10
+ idleBackgroundColor?: CSSProperties['backgroundColor'];
11
+ /** Replaces default hover / focus background (`silver[700]`). */
12
+ emphasizeBackgroundColor?: CSSProperties['backgroundColor'];
9
13
  }
10
14
  export declare const Search: FC<SearchProps>;
@@ -7,6 +7,11 @@ interface TooltipProps extends PropsWithChildren {
7
7
  text?: string;
8
8
  timestamp?: string | number | Date;
9
9
  fullWidth?: boolean;
10
+ /**
11
+ * Keep the hover wrapper when `text` is empty so callers can set `text` from pointer move
12
+ * (e.g. hit-tested canvas). The popup only opens when `text` is non-empty.
13
+ */
14
+ keepAlive?: boolean;
10
15
  }
11
16
  declare const Tooltip: FC<TooltipProps>;
12
17
  export { Tooltip, type TooltipProps };
@@ -1 +1 @@
1
- export{au as Autocomplete,a4 as Badge,B as Button,t as ButtonSize,e2 as ButtonTab,e3 as ButtonTabList,j as ButtonVariants,C as Checkbox,e4 as CheckboxList,av as CheckboxSize,aS as CliCommand,aG as DataCard,D as Drawer,ay as DropData,aF as DropDataAlignX,aE as DropDataAlignY,H as DropDown,c as FieldMessage,a as FieldTitle,e5 as Header,aZ as HoverActions,ag as IconButton,ah as IconButtonSize,I as Input,r as InputList,o as InputTable,aO as Island,L as Loader,e6 as Modal,e7 as Navbar,N as NoData,h as Note,ax as Radio,e8 as RadioGroup,e9 as RadioSize,g as Search,aD as SectionCard,ea as SectionCardSize,z as Segment,al as SegmentSize,eb as SegmentVariant,aV as StatusCard,aP as Stepper,aM as Table,aN as TableVariant,ec as Tag,E as TextArea,aW as TextCard,p as Toggle,q as ToggleLabelAlign,ed as ToggleList,ap as ToggleSize,ee as ToggleVariant,k as Typography,f as TypographySize,aq as TypographyVariants,W as WarningModal}from"../chunks/ui-components-DvThY8Em.js";import"../icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"../chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
1
+ export{as as Autocomplete,$ as Badge,q as Button,B as ButtonSize,e3 as ButtonTab,e4 as ButtonTabList,a as ButtonVariants,d as Checkbox,e5 as CheckboxList,at as CheckboxSize,aN as CliCommand,aD as DataCard,ax as Drawer,aw as DropData,aC as DropDataAlignX,aB as DropDataAlignY,ai as DropDown,j as FieldMessage,i as FieldTitle,e6 as Header,aW as HoverActions,ad as IconButton,ae as IconButtonSize,I as Input,p as InputList,m as InputTable,aJ as Island,af as Loader,e7 as Modal,e8 as Navbar,N as NoData,P as Note,av as Radio,e9 as RadioGroup,ea as RadioSize,aV as Search,S as SectionCard,eb as SectionCardSize,x as Segment,aj as SegmentSize,cC as SegmentVariant,aR as StatusCard,aK as Stepper,aH as Table,aI as TableVariant,ec as Tag,y as TextArea,aS as TextCard,n as Toggle,o as ToggleLabelAlign,ed as ToggleList,an as ToggleSize,ee as ToggleVariant,T as Typography,e as TypographySize,ao as TypographyVariants,cX as WarningModal}from"../chunks/ui-components-CzlBPbLD.js";import"../icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"../chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
package/lib/components.js CHANGED
@@ -1 +1 @@
1
- export{bv as AutocompleteInput,bP as Badge,bR as Button,bi as CancelWarning,e as CenterThis,b0 as Checkbox,cX as Code,bm as ConditionDetails,bn as DataCard,a_ as DataCardFieldTypes,co as DataCardFields,dP as DataFinger,bT as DataTab,bh as DeleteWarning,cG as DescribeRow,s as Divider,bb as DocsButton,bg as Drawer,dQ as DrawerFooter,dR as DrawerHeader,c9 as Dropdown,dS as ErrorBoundary,cf as ExtendArrow,aR as FadeLoader,b1 as FieldError,a$ as FieldLabel,F as FlexColumn,b as FlexRow,dT as Header,b7 as IconButton,cP as IconGroup,bJ as IconTitleBadge,bE as IconWrapped,cC as IconsNav,dU as ImageControlled,b2 as Input,b6 as InputList,b3 as InputTable,bM as InteractiveTable,b5 as KeyValueInputsList,dV as LoadingText,bs as Modal,bt as ModalBody,bc as MonitorsCheckboxes,bG as MonitorsIcons,bw as NavigationButtons,bN as NoDataFound,bu as NotificationNote,dW as Overlay,aL as PageContent,c4 as Popup,cR as PopupForm,cW as ScrollX,S as ScrollY,ba as SectionTitle,b9 as Segment,c6 as SelectionButton,bY as SkeletonLoader,by as Status,cn as Stepper,dX as TabList,bH as TableContainer,bI as TableTitleWrap,bL as TableWrap,cq as Tag,be as Text,bd as TextArea,b4 as Toggle,cU as ToggleCodeComponent,Z as Tooltip,bO as TraceLoader,aY as UpgradeRequiredWrapper,c5 as VerticalScroll,ct as WarningModal,dY as getLinksFromText,dZ as getStrongsFromText,d_ as renderText}from"./chunks/ui-components-DvThY8Em.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
1
+ export{bs as AutocompleteInput,bM as Badge,bO as Button,bf as CancelWarning,b as CenterThis,aZ as Checkbox,C as Code,bj as ConditionDetails,bk as DataCard,aX as DataCardFieldTypes,cn as DataCardFields,dQ as DataFinger,bQ as DataTab,be as DeleteWarning,cG as DescribeRow,D as Divider,b8 as DocsButton,bd as Drawer,dR as DrawerFooter,dS as DrawerHeader,c7 as Dropdown,dT as ErrorBoundary,ce as ExtendArrow,aM as FadeLoader,a_ as FieldError,aY as FieldLabel,F as FlexColumn,c as FlexRow,dU as Header,b4 as IconButton,cP as IconGroup,bG as IconTitleBadge,bB as IconWrapped,cB as IconsNav,dV as ImageControlled,a$ as Input,b3 as InputList,b0 as InputTable,bJ as InteractiveTable,b2 as KeyValueInputsList,dW as LoadingText,bp as Modal,bq as ModalBody,b9 as MonitorsCheckboxes,bD as MonitorsIcons,bt as NavigationButtons,bK as NoDataFound,br as NotificationNote,dX as Overlay,aG as PageContent,c2 as Popup,cR as PopupForm,cW as ScrollX,bS as ScrollY,b7 as SectionTitle,b6 as Segment,c4 as SelectionButton,bW as SkeletonLoader,bv as Status,cm as Stepper,dY as TabList,bE as TableContainer,bF as TableTitleWrap,bI as TableWrap,cp as Tag,bb as Text,ba as TextArea,b1 as Toggle,cU as ToggleCodeComponent,U as Tooltip,bL as TraceLoader,aU as UpgradeRequiredWrapper,c3 as VerticalScroll,cs as WarningModal,dZ as getLinksFromText,d_ as getStrongsFromText,d$ as renderText}from"./chunks/ui-components-CzlBPbLD.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
package/lib/constants.js CHANGED
@@ -1 +1 @@
1
- export{ad as ACTION_ATTRIBUTE_OPTIONS,bl as ACTION_OPTIONS,ae as ACTION_SAMPLER_OPTIONS,aK as BUTTON_TEXTS,a8 as DEFAULT_CLUSTER_ID,a7 as DEFAULT_CLUSTER_NAME,ce as DEFAULT_DATA_STREAM_NAME,aj as DESTINATION_CATEGORIES,a5 as DISPLAY_LANGUAGES,af as DISPLAY_TITLES,y as DOCS_BASE_URL,ai as DestinationCategoryTypes,X as FORM_ALERTS,an as INSTRUMENTATION_RULE_OPTIONS,dC as LANGUAGE_OPTIONS,M as MONITORS_OPTIONS,dD as OTEL_DISTRO_NAME_OPTIONS,ca as STORAGE_KEYS,dE as TOKEN_ABOUT_TO_EXPIRE}from"./chunks/ui-components-DvThY8Em.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
1
+ export{aa as ACTION_ATTRIBUTE_OPTIONS,bi as ACTION_OPTIONS,ab as ACTION_SAMPLER_OPTIONS,aF as BUTTON_TEXTS,a4 as DEFAULT_CLUSTER_ID,a3 as DEFAULT_CLUSTER_NAME,cd as DEFAULT_DATA_STREAM_NAME,ag as DESTINATION_CATEGORIES,a0 as DISPLAY_LANGUAGES,ac as DISPLAY_TITLES,w as DOCS_BASE_URL,G as DestinationCategoryTypes,O as FORM_ALERTS,al as INSTRUMENTATION_RULE_OPTIONS,dD as LANGUAGE_OPTIONS,c8 as MONITORS_OPTIONS,dE as OTEL_DISTRO_NAME_OPTIONS,c9 as STORAGE_KEYS,dF as TOKEN_ABOUT_TO_EXPIRE}from"./chunks/ui-components-CzlBPbLD.js";import"./icons.js";import"react/jsx-runtime";import"styled-components";import"zustand";import"react";import"javascript-time-ago";import"./chunks/vendor-C150cdxb.js";import"@xyflow/react";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"lottie-react";import"virtua";
@@ -5,4 +5,4 @@ export * from './central-connections';
5
5
  export * from './onboarding';
6
6
  export * from './pipeline-collectors';
7
7
  export * from './sampling-rules-list';
8
- export { RichTitle, type RichTitleProps } from '@/snippets/_v2/rich-title';
8
+ export * from './settings';
@@ -0,0 +1,13 @@
1
+ import { type FC } from 'react';
2
+ import { type ConfigYaml, type EffectiveConfig, type LocalUiConfigInput } from '@/types';
3
+ export interface SettingsProps {
4
+ minSupportedVersion?: number;
5
+ pageHeightOffset?: number;
6
+ configYamls: ConfigYaml[];
7
+ configYamlsLoading: boolean;
8
+ effectiveConfig: EffectiveConfig | null;
9
+ effectiveConfigLoading: boolean;
10
+ onSave: (config: LocalUiConfigInput) => Promise<void>;
11
+ saveLoading: boolean;
12
+ }
13
+ export declare const Settings: FC<SettingsProps>;
@@ -1,4 +1,5 @@
1
1
  import { type FC } from 'react';
2
+ import { type ProfilingProps } from './profiling';
2
3
  import { type DescribeProps } from './describe';
3
4
  import { type LibrariesProps } from './libraries';
4
5
  import { type PeerSourcesProps } from './peers';
@@ -13,6 +14,10 @@ interface SourceDrawerProps {
13
14
  fetchSourceDescribe: DescribeProps['fetchSourceDescribe'];
14
15
  fetchSourceLibraries: LibrariesProps['fetchSourceLibraries'];
15
16
  fetchPeerSources: PeerSourcesProps['fetchPeerSources'];
17
+ fetchProfilingSlots?: ProfilingProps['fetchProfilingSlots'];
18
+ enableProfiling?: ProfilingProps['enableProfiling'];
19
+ releaseProfiling?: ProfilingProps['releaseProfiling'];
20
+ fetchSourceProfiling?: ProfilingProps['fetchSourceProfiling'];
16
21
  }
17
22
  declare const SourceDrawer: FC<SourceDrawerProps>;
18
23
  export { SourceDrawer, type SourceDrawerProps };
@@ -0,0 +1,10 @@
1
+ import { type FC } from 'react';
2
+ import type { Flamebearer } from './flamebearer';
3
+ export interface FlameGraphCanvasProps {
4
+ flamebearer: Flamebearer;
5
+ maxRowPx?: number;
6
+ /** Non-empty: only stack frames whose name contains the query are drawn (case-insensitive). */
7
+ searchQuery?: string;
8
+ minHostHeight?: number;
9
+ }
10
+ export declare const FlameGraphCanvas: FC<FlameGraphCanvasProps>;
@@ -0,0 +1,70 @@
1
+ /** Pyroscope single-format profile (`flamebearer` + `metadata`) as returned by profiling APIs. */
2
+ import type { DefaultTheme } from 'styled-components';
3
+ export interface Flamebearer {
4
+ /** Usually `string[]`; some APIs use objects per symbol — see `flameNameAt`. */
5
+ names: string[];
6
+ levels: number[][];
7
+ numTicks: number;
8
+ maxSelf?: number;
9
+ }
10
+ /** Resolve a flamebearer symbol index to display text (handles string or common object shapes from APIs). */
11
+ export declare function flameNameAt(fb: Pick<Flamebearer, 'names'>, nameIndex: number): string;
12
+ export interface ParsedFlameProfile {
13
+ flamebearer: Flamebearer;
14
+ units?: string;
15
+ }
16
+ export interface SymbolTableRow {
17
+ name: string;
18
+ self: number;
19
+ total: number;
20
+ }
21
+ export declare function parseFlameProfileJson(raw: string | null): ParsedFlameProfile | null;
22
+ /** One table row per symbol: keep the occurrence with the widest bar (largest cumulative total). */
23
+ export declare function buildSymbolTableRows(fb: Flamebearer): SymbolTableRow[];
24
+ export declare function formatSampleCount(n: number): string;
25
+ export interface FlameRect {
26
+ level: number;
27
+ offset: number;
28
+ size: number;
29
+ self: number;
30
+ nameIndex: number;
31
+ }
32
+ export declare function flattenFlameRects(fb: Flamebearer): FlameRect[];
33
+ /** Stable identity for a frame in the raw flamebearer (for zoom stack + hit-test). */
34
+ export declare function flameRectKey(r: Pick<FlameRect, 'level' | 'offset' | 'size' | 'nameIndex'>): string;
35
+ export declare function flameRectsEqual(a: FlameRect, b: FlameRect): boolean;
36
+ /**
37
+ * All frames in the subtree under `root` (pprof-style “zoom into this frame”).
38
+ * Parent/child follows horizontal containment on adjacent levels, matching merged flame graphs.
39
+ */
40
+ export declare function collectSubtreeFlameRects(all: FlameRect[], root: FlameRect): FlameRect[];
41
+ export declare function flameBarMatchesSearch(name: string, query: string): boolean;
42
+ /** Pixel layout for one flame bar (canvas + hit testing). */
43
+ export type FlameLayoutBar = {
44
+ level: number;
45
+ offset: number;
46
+ size: number;
47
+ self: number;
48
+ nameIndex: number;
49
+ x: number;
50
+ y: number;
51
+ w: number;
52
+ h: number;
53
+ name: string;
54
+ matchesSearch: boolean;
55
+ };
56
+ /**
57
+ * @param zoomRoot When set, layout only that frame’s subtree and scale the X axis to its cumulative size (click-to-zoom, same idea as pprof’s pivot).
58
+ */
59
+ export declare function computeFlameLayout(fb: Flamebearer, cw: number, ch: number, maxRowPx: number | undefined, searchQuery: string, zoomRoot?: FlameRect | null): FlameLayoutBar[] | null;
60
+ /** Deepest stack frames first so hit tests prefer narrow children over parents. */
61
+ export declare function sortFlameBarsDeepestFirst<T extends {
62
+ level: number;
63
+ }>(bars: T[]): T[];
64
+ export interface FlameBarColors {
65
+ fill: string;
66
+ /** Label color on the bar (dark fills → light text, light fills → dark text). */
67
+ text: string;
68
+ }
69
+ /** Stable brand palette (purple / teal / pink from theme) per symbol name. */
70
+ export declare function flameColorsForName(name: string, theme: DefaultTheme): FlameBarColors;
@@ -0,0 +1,34 @@
1
+ import { type FC } from 'react';
2
+ import type { Source } from '@/types';
3
+ interface SourceIdentifier {
4
+ namespace: string;
5
+ kind: string;
6
+ name: string;
7
+ }
8
+ interface ProfilingSlots {
9
+ activeKeys: string[];
10
+ keysWithData: string[];
11
+ totalBytesUsed: number;
12
+ slotMaxBytes: number;
13
+ maxSlots: number;
14
+ maxTotalBytesBudget: number;
15
+ slotTtlSeconds: number;
16
+ }
17
+ interface SourceProfilingResult {
18
+ profileJson: string;
19
+ }
20
+ interface EnableOrReleaseProfilingResult {
21
+ status: string;
22
+ sourceKey: string;
23
+ maxSlots?: number;
24
+ activeSlots?: number;
25
+ }
26
+ export interface ProfilingProps {
27
+ source: Source;
28
+ fetchProfilingSlots: () => Promise<ProfilingSlots | undefined>;
29
+ enableProfiling: (source: SourceIdentifier) => Promise<EnableOrReleaseProfilingResult | undefined>;
30
+ releaseProfiling: (source: SourceIdentifier) => Promise<EnableOrReleaseProfilingResult | undefined>;
31
+ fetchSourceProfiling: (source: SourceIdentifier) => Promise<SourceProfilingResult | undefined>;
32
+ }
33
+ export declare const Profiling: FC<ProfilingProps>;
34
+ export {};