@odigos/ui-kit 0.0.294 → 0.0.295
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/CHANGELOG.md +17 -0
- package/lib/chunks/{helpers-BbLwXwCP.js → helpers-CVRjhvw4.js} +1 -1
- package/lib/chunks/index-B13xWqwt.js +342 -0
- package/lib/chunks/{source-instrument-form-context-TaNVlKMt.js → source-instrument-form-context-CgGshOFa.js} +1 -1
- package/lib/chunks/{ui-components-CnvJIMbW.js → ui-components-DwtaxXwl.js} +298 -294
- package/lib/components/table/types.d.ts +7 -0
- package/lib/components/tooltip/index.d.ts +0 -2
- package/lib/components.js +1 -1
- package/lib/constants.js +1 -1
- package/lib/containers/insights/service-with-language-icons.d.ts +12 -0
- package/lib/containers/insights/transactions/drawer/baselines/data-drawer/db-access-view/helpers.d.ts +0 -4
- package/lib/containers/insights/transactions/drawer/baselines/data-drawer/db-access-view/map.d.ts +0 -1
- package/lib/containers/insights/transactions/drawer/baselines/data-drawer/outbound-peers-view/helpers.d.ts +0 -4
- package/lib/containers/insights/transactions/drawer/baselines/data-drawer/outbound-peers-view/map.d.ts +0 -1
- package/lib/containers/insights/transactions/drawer/baselines/data-drawer/service-call-edges-view/helpers.d.ts +0 -4
- package/lib/containers/insights/transactions/drawer/baselines/data-drawer/service-call-edges-view/map.d.ts +0 -1
- package/lib/containers/service-map/helpers/types.d.ts +2 -1
- package/lib/containers/service-map/react-flow/edges/animated-traffic-edge.d.ts +5 -1
- package/lib/containers/service-map/react-flow/edges/self-loop-edge.d.ts +6 -0
- package/lib/containers/service-map/service-map-context.d.ts +3 -0
- package/lib/containers.js +557 -622
- package/lib/contexts.js +1 -1
- package/lib/functions/find-source-by-service/index.d.ts +3 -0
- package/lib/functions/index.d.ts +1 -0
- package/lib/functions.js +1 -1
- package/lib/hooks/useCopy.d.ts +1 -1
- package/lib/hooks.js +1 -1
- package/lib/icons/common/index.d.ts +1 -0
- package/lib/icons/common/self-loop-icon/index.d.ts +2 -0
- package/lib/icons.js +1 -1
- package/lib/snippets/blast-radius/index.d.ts +0 -1
- package/lib/snippets/graph-flow/animated-edge.d.ts +12 -0
- package/lib/snippets/graph-flow/auto-fit-view.d.ts +14 -0
- package/lib/snippets/graph-flow/elk-layout.d.ts +6 -0
- package/lib/snippets/graph-flow/get-edge-path.d.ts +14 -0
- package/lib/snippets/graph-flow/graph-flow.d.ts +9 -0
- package/lib/snippets/graph-flow/index.d.ts +5 -0
- package/lib/snippets/graph-flow/types.d.ts +61 -0
- package/lib/snippets/index.d.ts +1 -0
- package/lib/snippets.js +1 -1
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types.js +1 -1
- package/lib/visuals.js +1 -1
- package/package.json +9 -9
- package/lib/chunks/index-DrntqYmU.js +0 -338
- package/lib/snippets/blast-radius/animated-edge.d.ts +0 -10
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GRAPH_FLOW_ANIMATED_EDGE, type AnimatedGraphEdgeData } from './types';
|
|
3
|
+
import { type Edge, type EdgeProps } from '@xyflow/react';
|
|
4
|
+
export type AnimatedGraphEdgeType = Edge<AnimatedGraphEdgeData, typeof GRAPH_FLOW_ANIMATED_EDGE>;
|
|
5
|
+
/**
|
|
6
|
+
* Packet-stream edge animation.
|
|
7
|
+
* - `mode: 'fixed'` — constant ball count/duration (service map).
|
|
8
|
+
* - `mode: 'path-length'` — duration/count scale with path length (blast radius).
|
|
9
|
+
* Colors resolve from `data` → `style.stroke` → theme defaults.
|
|
10
|
+
*/
|
|
11
|
+
declare const AnimatedGraphEdgeComponent: React.FC<EdgeProps<AnimatedGraphEdgeType>>;
|
|
12
|
+
export { AnimatedGraphEdgeComponent as AnimatedGraphEdge };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import { type FitViewOptions } from '@xyflow/react';
|
|
3
|
+
export declare const DEFAULT_GRAPH_FIT_VIEW_OPTIONS: FitViewOptions;
|
|
4
|
+
interface AutoFitViewProps {
|
|
5
|
+
trigger: number;
|
|
6
|
+
options?: FitViewOptions;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Programmatically calls fitView whenever `trigger` increments.
|
|
10
|
+
* Skips the first render (empty/unlaid-out graph). Needed because async ELK
|
|
11
|
+
* finishes after React Flow's built-in fitView-on-mount.
|
|
12
|
+
*/
|
|
13
|
+
export declare const AutoFitView: FC<AutoFitViewProps>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Position } from '@xyflow/react';
|
|
2
|
+
interface Params {
|
|
3
|
+
sourceX: number;
|
|
4
|
+
sourceY: number;
|
|
5
|
+
targetX: number;
|
|
6
|
+
targetY: number;
|
|
7
|
+
sourcePosition?: Position;
|
|
8
|
+
targetPosition?: Position;
|
|
9
|
+
isSelfLoop?: boolean;
|
|
10
|
+
/** Used to clear the node body when drawing a self-loop arc. */
|
|
11
|
+
selfLoopNodeHeight?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare const getGraphEdgePath: ({ sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, isSelfLoop, selfLoopNodeHeight, }: Params) => [string, number, number, number, number];
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { type FC } from 'react';
|
|
2
|
+
import '@xyflow/react/dist/style.css';
|
|
3
|
+
import type { GraphFlowProps } from './types';
|
|
4
|
+
import { AutoFitView, DEFAULT_GRAPH_FIT_VIEW_OPTIONS } from './auto-fit-view';
|
|
5
|
+
import { type Node } from '@xyflow/react';
|
|
6
|
+
export declare function GraphFlow<N extends Node>(props: GraphFlowProps<N>): React.JSX.Element;
|
|
7
|
+
/** Headless AutoFit for callers that keep their own ReactFlow shell (e.g. Service Map). */
|
|
8
|
+
export { AutoFitView, DEFAULT_GRAPH_FIT_VIEW_OPTIONS };
|
|
9
|
+
export declare const GraphFlowComponent: FC<GraphFlowProps>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { GraphFlow, GraphFlowComponent, AutoFitView, DEFAULT_GRAPH_FIT_VIEW_OPTIONS } from './graph-flow';
|
|
2
|
+
export { getGraphEdgePath } from './get-edge-path';
|
|
3
|
+
export { getElkLayoutedElements } from './elk-layout';
|
|
4
|
+
export { AnimatedGraphEdge, type AnimatedGraphEdgeType } from './animated-edge';
|
|
5
|
+
export { GRAPH_FLOW_ANIMATED_EDGE, type AnimatedEdgeMode, type AnimatedGraphEdgeData, type ElkDirection, type ElkLayoutOptions, type ElkLayoutSpacing, type ElkRootLayerConstraint, type GraphFlowProps, } from './types';
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import type { Edge, Node, NodeTypes, EdgeTypes as RFEdgeTypes, NodeMouseHandler, OnNodesChange, OnEdgesChange } from '@xyflow/react';
|
|
3
|
+
export type ElkDirection = 'RIGHT' | 'DOWN' | 'LEFT' | 'UP';
|
|
4
|
+
export type ElkRootLayerConstraint = 'FIRST' | 'FIRST_SEPARATE';
|
|
5
|
+
export interface ElkLayoutSpacing {
|
|
6
|
+
betweenLayers?: number;
|
|
7
|
+
nodeNode?: number;
|
|
8
|
+
edgeEdge?: number;
|
|
9
|
+
edgeNode?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface ElkLayoutOptions {
|
|
12
|
+
direction?: ElkDirection;
|
|
13
|
+
nodeWidth: number;
|
|
14
|
+
nodeHeight: number;
|
|
15
|
+
rootIds?: string[];
|
|
16
|
+
/** Applied to every id in `rootIds`. Defaults to `FIRST`. */
|
|
17
|
+
rootLayerConstraint?: ElkRootLayerConstraint;
|
|
18
|
+
/** When true (default), also set `elk.alignment: CENTER` on root nodes. */
|
|
19
|
+
rootAlignCenter?: boolean;
|
|
20
|
+
spacing?: ElkLayoutSpacing;
|
|
21
|
+
/** Merged last into ELK layoutOptions (e.g. separateConnectedComponents). */
|
|
22
|
+
extraOptions?: Record<string, string>;
|
|
23
|
+
}
|
|
24
|
+
export type AnimatedEdgeMode = 'fixed' | 'path-length';
|
|
25
|
+
export type AnimatedGraphEdgeData = {
|
|
26
|
+
isSelfLoop?: boolean;
|
|
27
|
+
/** When true with path-length mode, uses red packet colors (blast-radius attacker). */
|
|
28
|
+
isAttacker?: boolean;
|
|
29
|
+
/** Optional packet colors; falls back to theme blues (fixed) or silvers (path-length). */
|
|
30
|
+
trackColor?: string;
|
|
31
|
+
ballColorSmall?: string;
|
|
32
|
+
ballColorLarge?: string;
|
|
33
|
+
mode?: AnimatedEdgeMode;
|
|
34
|
+
/** Node height used for self-loop arc clearance. Defaults to 80. */
|
|
35
|
+
selfLoopNodeHeight?: number;
|
|
36
|
+
};
|
|
37
|
+
export declare const GRAPH_FLOW_ANIMATED_EDGE = "graph-flow-animated";
|
|
38
|
+
export interface GraphFlowProps<N extends Node = Node> {
|
|
39
|
+
nodes: N[];
|
|
40
|
+
edges: Edge[];
|
|
41
|
+
nodeTypes: NodeTypes;
|
|
42
|
+
edgeTypes?: RFEdgeTypes;
|
|
43
|
+
height?: number | string;
|
|
44
|
+
/** When false (default), locks drag/select/focus and disables node pointer events. */
|
|
45
|
+
interactive?: boolean;
|
|
46
|
+
minZoom?: number;
|
|
47
|
+
maxZoom?: number;
|
|
48
|
+
fitViewPadding?: number;
|
|
49
|
+
fitViewTrigger?: number;
|
|
50
|
+
showBackground?: boolean;
|
|
51
|
+
/** Soften node focus/selection chrome (baselines). Default true when not interactive. */
|
|
52
|
+
suppressNodeFocusStyle?: boolean;
|
|
53
|
+
onNodesChange?: OnNodesChange<N>;
|
|
54
|
+
onEdgesChange?: OnEdgesChange;
|
|
55
|
+
onNodeClick?: NodeMouseHandler<N>;
|
|
56
|
+
onNodeMouseEnter?: NodeMouseHandler<N>;
|
|
57
|
+
onNodeMouseLeave?: NodeMouseHandler<N>;
|
|
58
|
+
className?: string;
|
|
59
|
+
style?: CSSProperties;
|
|
60
|
+
children?: ReactNode;
|
|
61
|
+
}
|
package/lib/snippets/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './connector-created-modal';
|
|
|
7
7
|
export * from './delete-modal';
|
|
8
8
|
export * from './dynamic-field';
|
|
9
9
|
export * from './enable-disable-segment';
|
|
10
|
+
export * from './graph-flow';
|
|
10
11
|
export * from './instrumentation-rule-form-sections';
|
|
11
12
|
export * from './odigos-logo-text-by-tier';
|
|
12
13
|
export * from './rich-title';
|
package/lib/snippets.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as ActionType,a as Actions,R as RichTitle}from"./chunks/ui-components-
|
|
1
|
+
export{A as ActionType,a as Actions,R as RichTitle}from"./chunks/ui-components-DwtaxXwl.js";export{A as AnimatedCollapse,a as AnimatedGraphEdge,b as AutoFitView,B as BlastRadius,C as CancelModal,c as ConnectorCreatedModal,D as DEFAULT_GRAPH_FIT_VIEW_OPTIONS,d as DURATION_OPTIONS,e as DeleteModal,f as DurationErrorsSection,g as DynamicActionFields,h as DynamicField,i as DynamicFields,E as EnableDisableSegment,G as GRAPH_FLOW_ANIMATED_EDGE,j as GraphFlow,k as GraphFlowComponent,I as InstrumentationPreviewSection,N as NOISY_PERCENTAGE_OPTIONS,O as OdigosLogoTextByTier,l as OperationSection,P as PERCENTAGE_OPTIONS,m as PercentageSection,n as PresetWithCustomInput,R as RuleInfoSection,o as RuleTypeSection,S as SamplingPreviewSection,p as SignalsCheckboxList,q as SourceScopeSection,U as UpgradeModal,W as WIDE_DRAWER_WIDTH,r as WideDrawer,Y as YamlSectionCard,s as getElkLayoutedElements,t as getGraphEdgePath}from"./chunks/index-B13xWqwt.js";export{C as ColoredSpan,a as ColoredSpanVariant}from"./chunks/helpers-CVRjhvw4.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"virtua";import"elkjs/lib/elk.bundled.js";import"@xyflow/react";import"@xyflow/react/dist/style.css";
|
package/lib/store.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{hp as DrawerType,bf as ProgressKeys,
|
|
1
|
+
export{hp as DrawerType,bf as ProgressKeys,ju as getDrawerTypeForAdd,eO as getDrawerTypeForEdit,bc as useDataStreamStore,eJ as useDrawerStore,jp as useFilterStore,b7 as useNotificationStore,bd as useProgressStore,jv as useSelectedStore,be as useSetupStore}from"./chunks/ui-components-DwtaxXwl.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"virtua";
|
package/lib/theme.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{nF as Provider,nG as animations,nH as opacity,nI as palettes}from"./chunks/ui-components-DwtaxXwl.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"virtua";
|
package/lib/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{eg as ActionCategoryTypes,bu as ActionKeyTypes,bv as ActionType,
|
|
1
|
+
export{eg as ActionCategoryTypes,bu as ActionKeyTypes,bv as ActionType,kM as AgentInjectedReason,kN as BooleanOperation,eo as CloudConnectorFeatureKey,ai as CodeAttributesKeyTypes,kO as ConditionType,ba as Crud,ac as CustomInstrumentationsKeyTypes,eZ as DesiredConditionActionItemType,eD as DesiredStateProgress,kP as DestinationTypes,bb as EntityTypes,c4 as ExtractionDataFormat,n as FieldTypes,ae as GolangCustomProbe,ag as HeadersCollectionKeyTypes,z as InputTypes,kQ as InsightsAnomalyClassFindingKind,iL as InsightsAnomalyResolution,iI as InsightsAnomalyStatus,kR as InsightsBaselineHistogramUnit,iM as InsightsBaselineLearningPhase,iK as InsightsBulkResolution,bP as InsightsDeviationClass,bj as InsightsEntityTypes,iJ as InsightsFindingKind,bR as InsightsLearningConditionType,bT as InsightsLearningMode,bO as InsightsPolicyScope,bI as InsightsRuleMode,iY as InsightsSampleReason,e5 as InsightsSeverity,jm as InsightsStorageDiskStatus,kS as InsightsStorageHealthStatus,kT as InsightsTransactionKind,iH as InsightsViolationStatus,kU as InstallationMethod,kV as InstallationStatus,ab as InstrumentationRuleType,kW as IntrumentationStatus,ad as JavaCustomProbe,kX as JsonOperation,c2 as K8sAttributesFrom,bY as K8sResourceKind,kY as K8sWorkloadContainerAgentConfigTracesHeadSamplingSpanMetricsMode,kZ as ListDirection,k_ as NumberOperation,k$ as OtelDistroName,l0 as OtherEntityTypes,ah as PayloadCollectionKeyTypes,af as PhpCustomProbe,P as PlatformType,l1 as PodContainerLifecycleStatus,l2 as PodContainerStatus,l3 as PodPhase,l4 as Profile,Q as ProgrammingLanguages,f8 as RecommendationApplyExampleType,f9 as RecommendationRemediationType,f7 as RecommendationState,l5 as RecommendationType,l6 as SIGNAL_KEY_TO_TYPE,l7 as SIGNAL_TYPE_TO_KEY,l8 as SignalKey,bA as SignalType,l9 as SortDirection,S as StatusType,la as StringOperation,b as Tier,lb as WorkloadRolloutReason,jI as WorkloadRolloutStatus}from"./chunks/ui-components-DwtaxXwl.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"virtua";
|
package/lib/visuals.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{lc as VISUAL_ODIGOS_LOGO_HEIGHT,ld as VISUAL_ODIGOS_LOGO_WIDTH,V as VisualGreenRings,le as VisualOdigosLogo,hz as VisualPurpleRings}from"./chunks/ui-components-DwtaxXwl.js";import"react/jsx-runtime";import"styled-components";import"./icons.js";import"zustand";import"react";import"javascript-time-ago";import"javascript-time-ago/locale/en";import"react-dom";import"prism-react-renderer";import"react-error-boundary";import"virtua";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odigos/ui-kit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.295",
|
|
4
4
|
"author": "Odigos",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"styled-components": "6.5.3"
|
|
95
95
|
},
|
|
96
96
|
"dependencies": {
|
|
97
|
-
"@xyflow/react": "^12.11.
|
|
97
|
+
"@xyflow/react": "^12.11.6",
|
|
98
98
|
"elkjs": "^0.12.0",
|
|
99
99
|
"javascript-time-ago": "^2.6.4",
|
|
100
100
|
"prism-react-renderer": "^2.4.1",
|
|
@@ -111,32 +111,32 @@
|
|
|
111
111
|
"@babel/preset-env": "^7.29.7",
|
|
112
112
|
"@babel/preset-react": "^7.29.7",
|
|
113
113
|
"@babel/preset-typescript": "^7.29.7",
|
|
114
|
-
"@eslint/eslintrc": "^3.3.
|
|
114
|
+
"@eslint/eslintrc": "^3.3.7",
|
|
115
115
|
"@rollup/plugin-commonjs": "^29.0.3",
|
|
116
116
|
"@rollup/plugin-json": "^6.1.0",
|
|
117
117
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
118
118
|
"@rollup/plugin-terser": "^1.0.0",
|
|
119
119
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
120
120
|
"@storybook/addon-webpack5-compiler-babel": "^4.0.1",
|
|
121
|
-
"@storybook/react-webpack5": "10.
|
|
122
|
-
"@types/node": "^26.4.
|
|
121
|
+
"@storybook/react-webpack5": "10.6.0",
|
|
122
|
+
"@types/node": "^26.4.1",
|
|
123
123
|
"@types/react": "^19.2.18",
|
|
124
|
-
"@types/react-dom": "^19.2.
|
|
124
|
+
"@types/react-dom": "^19.2.7",
|
|
125
125
|
"@typescript-eslint/eslint-plugin": "^8.69.0",
|
|
126
126
|
"@typescript-eslint/parser": "^8.69.0",
|
|
127
127
|
"babel-loader": "^10.1.1",
|
|
128
128
|
"babel-plugin-styled-components": "^2.3.0",
|
|
129
129
|
"eslint": "^9.39.4",
|
|
130
130
|
"eslint-plugin-react": "^7.37.5",
|
|
131
|
-
"eslint-plugin-storybook": "10.
|
|
131
|
+
"eslint-plugin-storybook": "10.6.0",
|
|
132
132
|
"graphql": "^17.0.2",
|
|
133
|
-
"postcss": "^8.5.
|
|
133
|
+
"postcss": "^8.5.27",
|
|
134
134
|
"rollup": "^4.63.1",
|
|
135
135
|
"rollup-plugin-filesize": "^10.0.0",
|
|
136
136
|
"rollup-plugin-postcss": "^4.0.2",
|
|
137
137
|
"rollup-plugin-visualizer": "^7.1.1",
|
|
138
138
|
"rxjs": "^7.8.2",
|
|
139
|
-
"storybook": "10.
|
|
139
|
+
"storybook": "10.6.0",
|
|
140
140
|
"typescript": "^5.9.3"
|
|
141
141
|
},
|
|
142
142
|
"resolutions": {
|