@wallarm-org/design-system 0.50.2-rc-feature-shell.1 → 0.50.2

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.
@@ -1,6 +1,7 @@
1
1
  import { CircleDashed, Filter, Plus } from "../../../icons/index.js";
2
2
  const edgeNavConfig = {
3
3
  productLabel: 'Edge',
4
+ productPath: '/edge',
4
5
  headerActions: [
5
6
  {
6
7
  icon: Filter,
@@ -340,6 +341,7 @@ const edgeNavConfig = {
340
341
  };
341
342
  const aiHypervisorNavConfig = {
342
343
  productLabel: 'AI Hypervisor',
344
+ productPath: '/ai-hypervisor',
343
345
  items: [
344
346
  {
345
347
  type: 'link',
@@ -454,6 +456,7 @@ const aiHypervisorNavConfig = {
454
456
  };
455
457
  const infraDiscoveryNavConfig = {
456
458
  productLabel: 'Infra Discovery',
459
+ productPath: '/infra-discovery',
457
460
  headerActions: [
458
461
  {
459
462
  icon: Filter,
@@ -554,6 +557,7 @@ const infraDiscoveryNavConfig = {
554
557
  };
555
558
  const securityTestingNavConfig = {
556
559
  productLabel: 'Security Testing',
560
+ productPath: '/security-testing',
557
561
  items: [
558
562
  {
559
563
  type: 'link',
@@ -627,6 +631,7 @@ const securityTestingNavConfig = {
627
631
  };
628
632
  const settingsNavConfig = {
629
633
  productLabel: 'Settings',
634
+ productPath: '/settings',
630
635
  items: [
631
636
  {
632
637
  type: 'link',
@@ -4,9 +4,10 @@ import { Text } from "../Text/index.js";
4
4
  import { HeaderActions } from "./HeaderActions.js";
5
5
  import { findDrillNode, useRemoteShellContext } from "./model/index.js";
6
6
  import { NavItemsList } from "./NavItemsList.js";
7
- const NavPanelContent = ({ level })=>{
7
+ const NavPanelContent = ({ level: rawLevel })=>{
8
8
  const { config, navStack, effectiveActiveItemId, navigate, drillInto, goBack } = useRemoteShellContext();
9
- const entry = navStack[Math.min(level, navStack.length - 1)];
9
+ const level = Math.min(rawLevel, navStack.length - 1);
10
+ const entry = navStack[level];
10
11
  const hasHeaderActions = !!config.headerActions?.length;
11
12
  if (0 === level) return /*#__PURE__*/ jsxs(Fragment, {
12
13
  children: [
@@ -67,12 +67,9 @@ const RemoteShell = ({ ref, className, children, config, basePath, onNavigate, '
67
67
  ]);
68
68
  const navigateTo = useCallback((href)=>{
69
69
  setVisualDrillLevel(null);
70
- if ('/' === href) {
71
- const firstPath = findFirstLinkPath(config.items) ?? '';
72
- setPathname(`/${firstPath}`);
73
- } else setPathname(href);
70
+ href === config.productPath ? setPathname('/') : setPathname(href);
74
71
  }, [
75
- config.items,
72
+ config.productPath,
76
73
  setPathname
77
74
  ]);
78
75
  const navCtxValue = useMemo(()=>({
@@ -28,7 +28,7 @@ const matchNav = (pathname, config)=>{
28
28
  breadcrumbSegments.push({
29
29
  type: 'link',
30
30
  label: config.productLabel,
31
- href: '/'
31
+ href: config.productPath
32
32
  });
33
33
  let segmentIndex = 0;
34
34
  let currentItems = config.items;
@@ -8,6 +8,7 @@ export interface NavConfigHeaderAction {
8
8
  }
9
9
  export interface NavConfig {
10
10
  productLabel: string;
11
+ productPath: string;
11
12
  items: NavConfigNode[];
12
13
  headerActions?: NavConfigHeaderAction[];
13
14
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "0.50.1",
3
- "generatedAt": "2026-05-31T23:32:28.332Z",
3
+ "generatedAt": "2026-06-01T09:06:56.612Z",
4
4
  "components": [
5
5
  {
6
6
  "name": "Accordion",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wallarm-org/design-system",
3
- "version": "0.50.2-rc-feature-shell.1",
3
+ "version": "0.50.2",
4
4
  "description": "Core design system library with React components and Storybook documentation",
5
5
  "publishConfig": {
6
6
  "access": "public",