@validationcloud/fractal-ui 1.65.0 → 1.66.0

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.
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ type BottomNavItemProps = {
3
+ icon: React.ReactNode;
4
+ label: string;
5
+ } & React.ComponentPropsWithoutRef<'div'>;
6
+ export declare function BottomNavItem({ icon, label, className, ...props }: BottomNavItemProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,19 @@
1
+ import { jsxs as o, jsx as c } from "react/jsx-runtime";
2
+ import "react";
3
+ import { twMerge as i } from "../../lib/tailwind-merge.js";
4
+ function l({ icon: t, label: e, className: r, ...n }) {
5
+ return /* @__PURE__ */ o(
6
+ "div",
7
+ {
8
+ className: i("text-neutral-40 hover:text-neutral-10 flex flex-col items-center justify-center", r),
9
+ ...n,
10
+ children: [
11
+ t,
12
+ /* @__PURE__ */ c("span", { className: "tg-caption text-center", children: e })
13
+ ]
14
+ }
15
+ );
16
+ }
17
+ export {
18
+ l as BottomNavItem
19
+ };
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ type ProductNavItemProps = {
3
+ icon: React.ReactNode;
4
+ iconHover: React.ReactNode;
5
+ label: string;
6
+ isActive: boolean;
7
+ } & React.ComponentPropsWithoutRef<'div'>;
8
+ export declare function ProductNavItem({ icon, iconHover, label, isActive, className, ...props }: ProductNavItemProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,61 @@
1
+ import { jsx as e, jsxs as a } from "react/jsx-runtime";
2
+ import "react";
3
+ import { Tooltip as d } from "../tooltip/tooltip.js";
4
+ import { twMerge as t } from "../../lib/tailwind-merge.js";
5
+ function f({ icon: i, iconHover: n, label: o, isActive: r, className: l, ...g }) {
6
+ return /* @__PURE__ */ e(d, { content: o, side: "right", children: /* @__PURE__ */ a(
7
+ "div",
8
+ {
9
+ className: t(
10
+ "ring-neutral-60/40 group relative flex size-10 items-center justify-center rounded-lg bg-[linear-gradient(180deg,rgba(5,17,23,0.15)_12.25%,rgba(255,255,255,0.15)_100%)] p-2.5 ring-1 transition-shadow duration-200",
11
+ // Hover
12
+ "hover:ring-neutral-60/80 hover:ring-1.5",
13
+ // Active
14
+ r && "ring-neutral-60/80 ring-1.5",
15
+ l
16
+ ),
17
+ ...g,
18
+ children: [
19
+ /* @__PURE__ */ e(
20
+ "div",
21
+ {
22
+ className: t(
23
+ "absolute inset-0 rounded-lg opacity-0 transition-opacity duration-200",
24
+ "bg-[linear-gradient(84deg,rgba(214,61,87,0)_-24.24%,rgba(255,255,255,0.20)_22.49%),linear-gradient(23deg,rgba(214,61,87,0)_68.98%,rgba(255,255,255,0.75)_160.04%)]",
25
+ "after:absolute after:inset-0 after:rounded-lg after:content-['']",
26
+ "after:bg-[radial-gradient(120%_120%_at_85%_85%,rgba(255,255,255,0.35)_0%,rgba(255,255,255,0.0)_55%)]",
27
+ "after:opacity-80 after:blur-[6px]",
28
+ "group-hover:opacity-100",
29
+ r && "opacity-100"
30
+ )
31
+ }
32
+ ),
33
+ /* @__PURE__ */ a("div", { className: "relative flex h-16 w-full", children: [
34
+ /* @__PURE__ */ e(
35
+ "div",
36
+ {
37
+ className: t(
38
+ "absolute inset-0 flex items-center justify-center opacity-100 transition duration-150 group-hover:opacity-0",
39
+ r && "opacity-0"
40
+ ),
41
+ children: i
42
+ }
43
+ ),
44
+ /* @__PURE__ */ e(
45
+ "div",
46
+ {
47
+ className: t(
48
+ "absolute inset-0 flex items-center justify-center opacity-0 transition duration-150 group-hover:opacity-100",
49
+ r && "opacity-100"
50
+ ),
51
+ children: n
52
+ }
53
+ )
54
+ ] })
55
+ ]
56
+ }
57
+ ) });
58
+ }
59
+ export {
60
+ f as ProductNavItem
61
+ };
@@ -0,0 +1,91 @@
1
+ import { default as React } from 'react';
2
+ type SidebarItemId = 'home' | 'mavrik' | 'nodeApi' | 'staking' | 'apiKey' | 'docs';
3
+ type SidebarDestination = {
4
+ href: string;
5
+ matchPaths?: string | string[];
6
+ external?: boolean;
7
+ };
8
+ type RenderLinkProps = Omit<React.ComponentProps<'a'>, 'href'> & {
9
+ destination: SidebarDestination;
10
+ children: React.ReactNode;
11
+ };
12
+ type SidebarProps = {
13
+ /**
14
+ * Route configuration for the Sidebar items.
15
+ *
16
+ * Provide a key to show that item; omit it to hide it.
17
+ *
18
+ * Possible keys: 'home', 'mavrik', 'nodeApi', 'staking', 'apiKey', 'docs'.
19
+ *
20
+ * Destination shape (per key):
21
+ * - `href` (required): URL or in-app route string
22
+ * - `matchPaths` (optional): used to compute "active" state for product items (mavrik/nodeApi/staking)
23
+ * - `external` (optional): hint for your `renderLink` implementation
24
+ *
25
+ * @example
26
+ * ```tsx
27
+ * const routes = {
28
+ * home: { href: '/' },
29
+ * mavrik: { href: '/mavrik', matchPaths: '/ai/[[...rest]]' },
30
+ * nodeApi: { href: '/node-api', matchPaths: '/node/[[...rest]]' },
31
+ * staking: { href: '/staking', matchPaths: '/staking/[[...rest]]' },
32
+ * apiKey: { href: '/settings/api-keys' },
33
+ * docs: { href: 'https://docs.validationcloud.io', external: true },
34
+ * };
35
+ * ```
36
+ */
37
+ routes: Partial<Record<SidebarItemId, SidebarDestination>>;
38
+ /**
39
+ * Render prop used to integrate the Sidebar with routing logic.
40
+ *
41
+ * The Sidebar will call this for each visible item and expects you to return a link element.
42
+ *
43
+ * Requirements:
44
+ * - Navigate to `destination.href`
45
+ * - Render `children` inside the link
46
+ *
47
+ * @example
48
+ * ```tsx
49
+ * function renderLink({ destination, children }) {
50
+ * return destination.external ? (
51
+ * <a href={destination.href}>
52
+ * {children}
53
+ * </a>
54
+ * ) : (
55
+ * <Link href={destination.href}>
56
+ * {children}
57
+ * </Link>
58
+ * );
59
+ * }
60
+ * ```
61
+ */
62
+ renderLink: (props: RenderLinkProps) => React.ReactElement;
63
+ /**
64
+ * Bottom item content for the account area (e.g. `UserDropdown`).
65
+ *
66
+ * Rendered at the bottom of the Sidebar.
67
+ */
68
+ accountItem: React.ReactNode;
69
+ /**
70
+ * Optional bottom contact item (e.g. `IntercomButton`).
71
+ *
72
+ * Rendered above `accountItem` when provided.
73
+ */
74
+ helpItem?: React.ReactNode;
75
+ /**
76
+ * The app's current pathname (e.g. value from`usePathname()` ).
77
+ *
78
+ * Used to compute active state for product items via each destination's `matchPaths`.
79
+ */
80
+ currentPathname: string;
81
+ } & React.ComponentProps<'nav'>;
82
+ /**
83
+ * Vertical navigation sidebar.
84
+ *
85
+ * Notes:
86
+ * - Provide `routes` to choose which items appear and where they navigate.
87
+ * - Provide `renderLink` to hook into your app router.
88
+ * - Provide `currentPathname` + per-route `matchPaths` to enable active styling for product items.
89
+ */
90
+ export declare function Sidebar({ routes, renderLink, helpItem, accountItem, currentPathname, className }: SidebarProps): import("react/jsx-runtime").JSX.Element;
91
+ export {};
@@ -0,0 +1,75 @@
1
+ import { jsxs as t, jsx as o } from "react/jsx-runtime";
2
+ import s from "react";
3
+ import N from "../../assets/mavrik-icon-muted.svg.js";
4
+ import b from "../../assets/mavrik-icon.svg.js";
5
+ import I from "../../assets/node-api-icon-muted.svg.js";
6
+ import A from "../../assets/node-api-icon.svg.js";
7
+ import k from "../../assets/staking-icon-muted.svg.js";
8
+ import x from "../../assets/staking-icon.svg.js";
9
+ import P from "../../assets/vc-logo-sm-white.svg.js";
10
+ import { Icon as d } from "../icon/icon.js";
11
+ import { BottomNavItem as u } from "./bottom-nav-item.js";
12
+ import { ProductNavItem as H } from "./product-nav-item.js";
13
+ import { twMerge as w } from "../../lib/tailwind-merge.js";
14
+ import { matchesPathname as f } from "../../utils/matches-pathname.js";
15
+ const y = [
16
+ {
17
+ id: "mavrik",
18
+ label: "Mavrik",
19
+ icon: /* @__PURE__ */ o("img", { src: N, alt: "Mavrik", className: "w-5" }),
20
+ iconHover: /* @__PURE__ */ o("img", { src: b, alt: "Mavrik", className: "w-5" })
21
+ },
22
+ {
23
+ id: "nodeApi",
24
+ label: "Node API",
25
+ icon: /* @__PURE__ */ o("img", { src: I, alt: "Node API", className: "w-4" }),
26
+ iconHover: /* @__PURE__ */ o("img", { src: A, alt: "Node API", className: "w-4" })
27
+ },
28
+ {
29
+ id: "staking",
30
+ label: "Staking",
31
+ icon: /* @__PURE__ */ o("img", { src: k, alt: "Staking", className: "w-4" }),
32
+ iconHover: /* @__PURE__ */ o("img", { src: x, alt: "Staking", className: "w-4" })
33
+ }
34
+ ], M = [
35
+ { id: "apiKey", label: "API Key", icon: /* @__PURE__ */ o(d, { icon: "key", className: "size-5 flex-none" }) },
36
+ { id: "docs", label: "Docs", icon: /* @__PURE__ */ o(d, { icon: "documents", className: "mb-1 size-4 flex-none" }) }
37
+ ];
38
+ function U({ routes: c, renderLink: r, helpItem: n, accountItem: p, currentPathname: l, className: g }) {
39
+ const m = c.home;
40
+ return /* @__PURE__ */ t("nav", { className: w("bg-neutral-80 flex h-full w-16 flex-col items-center gap-4 pt-4 pb-9", g), children: [
41
+ m && r({
42
+ destination: m,
43
+ "aria-label": "Home",
44
+ children: /* @__PURE__ */ o("div", { className: "px-5 py-2", children: /* @__PURE__ */ o("img", { src: P, alt: "Company Logo" }) })
45
+ }),
46
+ y.map((a) => {
47
+ const i = c[a.id];
48
+ if (!i) return null;
49
+ let e = !1;
50
+ i.matchPaths && (Array.isArray(i.matchPaths) ? e = i.matchPaths.some((h) => f(l, h)) : e = f(l, i.matchPaths));
51
+ const v = r({
52
+ destination: i,
53
+ children: /* @__PURE__ */ o(H, { icon: a.icon, iconHover: a.iconHover, label: a.label, isActive: e })
54
+ });
55
+ return /* @__PURE__ */ o(s.Fragment, { children: v }, a.id);
56
+ }),
57
+ /* @__PURE__ */ o("div", { className: "flex-1" }),
58
+ /* @__PURE__ */ t("div", { className: "flex flex-col items-center gap-6", children: [
59
+ M.map((a) => {
60
+ const i = c[a.id];
61
+ if (!i) return null;
62
+ const e = r({
63
+ destination: i,
64
+ children: /* @__PURE__ */ o(u, { icon: a.icon, label: a.label })
65
+ });
66
+ return /* @__PURE__ */ o(s.Fragment, { children: e }, a.id);
67
+ }),
68
+ n && n,
69
+ p
70
+ ] })
71
+ ] });
72
+ }
73
+ export {
74
+ U as Sidebar
75
+ };
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { jsxs as r, Fragment as p, jsx as e } from "react/jsx-runtime";
3
3
  import "react";
4
- import m from "../../assets/default-avatar.svg.js";
5
- import { Button as u } from "../button/button.js";
4
+ import h from "../../assets/default-avatar.svg.js";
5
+ import { Button as m } from "../button/button.js";
6
6
  import { DropdownMenu as f, DropdownMenuItem as i } from "../dropdown-menu/dropdown-menu.js";
7
- import { Icon as s } from "../icon/icon.js";
7
+ import { Icon as a } from "../icon/icon.js";
8
8
  import { twMerge as t } from "../../lib/tailwind-merge.js";
9
9
  function C({
10
10
  user: l,
@@ -13,56 +13,53 @@ function C({
13
13
  logoutUrl: g,
14
14
  accountUrl: c,
15
15
  contactItem: n,
16
- className: a,
17
- ...h
16
+ className: s,
17
+ ...u
18
18
  }) {
19
19
  return l ? /* @__PURE__ */ r(
20
20
  f,
21
21
  {
22
- trigger: /* @__PURE__ */ r(
22
+ trigger: /* @__PURE__ */ e(
23
23
  "button",
24
24
  {
25
25
  type: "button",
26
26
  className: "gap-r3 focus-visible:ring-neutral-40 flex h-10 shrink cursor-pointer flex-row items-center overflow-hidden px-3 py-6 focus:outline-none focus-visible:rounded-xl focus-visible:ring-2",
27
- children: [
28
- /* @__PURE__ */ e("img", { className: "size-7 rounded-full sm:size-9", src: l.picture ?? m, alt: "User avatar" }),
29
- /* @__PURE__ */ e(s, { icon: "chevron", className: "hidden size-2.5 flex-none text-white sm:block sm:size-3" })
30
- ]
27
+ children: /* @__PURE__ */ e("img", { className: "size-7 rounded-full sm:size-9", src: l.picture ?? h, alt: "User avatar" })
31
28
  }
32
29
  ),
33
- className: t("tg-caption-bold -mx-2 rounded-xl px-2 py-1", a),
30
+ className: t("tg-caption-bold -mx-2 rounded-xl px-2 py-1", s),
34
31
  contentClassName: "bg-neutral-60",
35
- ...h,
32
+ ...u,
36
33
  children: [
37
34
  /* @__PURE__ */ r(i, { className: "text-neutral-40 flex cursor-default items-center gap-3", disabled: !0, children: [
38
- /* @__PURE__ */ e(s, { icon: "user", className: "size-4 flex-none" }),
35
+ /* @__PURE__ */ e(a, { icon: "user", className: "size-4 flex-none" }),
39
36
  /* @__PURE__ */ e("p", { className: "tg-body", children: l.email })
40
37
  ] }),
41
38
  c && /* @__PURE__ */ e(i, { asChild: !0, children: /* @__PURE__ */ r("a", { href: c, className: "flex items-center gap-3", children: [
42
- /* @__PURE__ */ e(s, { icon: "cog", className: "size-4 flex-none text-white" }),
39
+ /* @__PURE__ */ e(a, { icon: "cog", className: "size-4 flex-none text-white" }),
43
40
  /* @__PURE__ */ e("p", { className: "tg-body", children: "Account" })
44
41
  ] }) }),
45
42
  n && /* @__PURE__ */ e(i, { asChild: !0, children: n }),
46
43
  /* @__PURE__ */ e(i, { asChild: !0, children: /* @__PURE__ */ r("a", { href: g, className: "flex items-center gap-3", children: [
47
- /* @__PURE__ */ e(s, { icon: "logout", className: "size-4 flex-none text-white" }),
44
+ /* @__PURE__ */ e(a, { icon: "logout", className: "size-4 flex-none text-white" }),
48
45
  /* @__PURE__ */ e("p", { className: "tg-body", children: "Log out" })
49
46
  ] }) })
50
47
  ]
51
48
  }
52
49
  ) : /* @__PURE__ */ r(p, { children: [
53
- /* @__PURE__ */ r("div", { className: t("hidden gap-3 sm:flex", a), children: [
54
- /* @__PURE__ */ e(u, { variant: "secondary", size: "medium", asChild: !0, children: /* @__PURE__ */ e("a", { href: o, children: "Log in" }) }),
55
- /* @__PURE__ */ e(u, { variant: "primary", size: "medium", asChild: !0, children: /* @__PURE__ */ e("a", { href: d, children: "Sign up" }) })
50
+ /* @__PURE__ */ r("div", { className: t("hidden gap-3 sm:flex", s), children: [
51
+ /* @__PURE__ */ e(m, { variant: "secondary", size: "medium", asChild: !0, children: /* @__PURE__ */ e("a", { href: o, children: "Log in" }) }),
52
+ /* @__PURE__ */ e(m, { variant: "primary", size: "medium", asChild: !0, children: /* @__PURE__ */ e("a", { href: d, children: "Sign up" }) })
56
53
  ] }),
57
54
  /* @__PURE__ */ r(
58
55
  f,
59
56
  {
60
- trigger: /* @__PURE__ */ e("img", { className: "size-7 cursor-pointer sm:hidden", src: m, alt: "User avatar" }),
57
+ trigger: /* @__PURE__ */ e("img", { className: "size-7 cursor-pointer sm:hidden", src: h, alt: "User avatar" }),
61
58
  className: t(
62
59
  "hover:bg-neutral-60 focus-visible:ring-neutral-60 data-[state=open]:bg-neutral-60 rounded-full outline-none focus-visible:ring-2 sm:hidden",
63
- a
60
+ s
64
61
  ),
65
- ...h,
62
+ ...u,
66
63
  children: [
67
64
  /* @__PURE__ */ e(i, { asChild: !0, children: /* @__PURE__ */ e("a", { href: o, className: "tg-body", children: "Log in" }) }),
68
65
  /* @__PURE__ */ e(i, { asChild: !0, children: /* @__PURE__ */ e("a", { href: d, className: "tg-body", children: "Sign up" }) }),
package/dist/index.d.ts CHANGED
@@ -8,7 +8,6 @@ export { CopyButton } from './components/copy-button/copy-button';
8
8
  export { DecoratedIcon } from './components/decorated-icon/decorated-icon';
9
9
  export { DropdownMenu, DropdownMenuItem } from './components/dropdown-menu/dropdown-menu';
10
10
  export { ErrorBoundary } from './components/error-boundary/error-boundary';
11
- export { ScrollArea } from './components/scroll-area';
12
11
  export { Icon, type IconID } from './components/icon/icon';
13
12
  export { IconButton } from './components/icon-button/icon-button';
14
13
  export { InputButton } from './components/input-button/input-button';
@@ -16,7 +15,9 @@ export { MountSvgSprite } from './components/mount-svg-sprite/mount-svg-sprite';
16
15
  export { NotFoundComponent } from './components/not-found-component/not-found-component';
17
16
  export { PagePadding } from './components/page-padding/page-padding';
18
17
  export { ProtocolLogo } from './components/protocol-logo/protocol-logo';
18
+ export { ScrollArea } from './components/scroll-area';
19
19
  export { Select, SelectItem } from './components/select/select';
20
+ export { Sidebar } from './components/sidebar/sidebar';
20
21
  export { Skeleton } from './components/skeleton/skeleton';
21
22
  export { Switch } from './components/switch/switch';
22
23
  export { TextInput } from './components/text-input/text-input';
package/dist/index.js CHANGED
@@ -1,62 +1,64 @@
1
- import { AnimatedLoader as t } from "./components/animated-loader/animated-loader.js";
1
+ import { AnimatedLoader as e } from "./components/animated-loader/animated-loader.js";
2
2
  import { Badge as p } from "./components/badge/badge.js";
3
3
  import { Box as x } from "./components/box/box.js";
4
4
  import { Button as n } from "./components/button/button.js";
5
5
  import { ClientModal as a } from "./components/client-modal/client-modal.js";
6
- import { Collapsible as u, CollapsibleContent as i, CollapsibleTrigger as c } from "./components/collapsible/collapsible.js";
7
- import { CopyButton as B } from "./components/copy-button/copy-button.js";
6
+ import { Collapsible as i, CollapsibleContent as u, CollapsibleTrigger as c } from "./components/collapsible/collapsible.js";
7
+ import { CopyButton as S } from "./components/copy-button/copy-button.js";
8
8
  import { DecoratedIcon as C } from "./components/decorated-icon/decorated-icon.js";
9
9
  import { DropdownMenu as T, DropdownMenuItem as s } from "./components/dropdown-menu/dropdown-menu.js";
10
10
  import { ErrorBoundary as M } from "./components/error-boundary/error-boundary.js";
11
- import { ScrollArea as P } from "./components/scroll-area/index.js";
12
- import { Icon as h } from "./components/icon/icon.js";
13
- import { IconButton as y } from "./components/icon-button/icon-button.js";
14
- import { InputButton as L } from "./components/input-button/input-button.js";
15
- import { MountSvgSprite as E } from "./components/mount-svg-sprite/mount-svg-sprite.js";
16
- import { NotFoundComponent as N } from "./components/not-found-component/not-found-component.js";
17
- import { PagePadding as j } from "./components/page-padding/page-padding.js";
18
- import { ProtocolLogo as z } from "./components/protocol-logo/protocol-logo.js";
11
+ import { Icon as D } from "./components/icon/icon.js";
12
+ import { IconButton as h } from "./components/icon-button/icon-button.js";
13
+ import { InputButton as y } from "./components/input-button/input-button.js";
14
+ import { MountSvgSprite as L } from "./components/mount-svg-sprite/mount-svg-sprite.js";
15
+ import { NotFoundComponent as E } from "./components/not-found-component/not-found-component.js";
16
+ import { PagePadding as N } from "./components/page-padding/page-padding.js";
17
+ import { ProtocolLogo as j } from "./components/protocol-logo/protocol-logo.js";
18
+ import { ScrollArea as z } from "./components/scroll-area/index.js";
19
19
  import { Select as H, SelectItem as J } from "./components/select/select.js";
20
- import { Skeleton as O } from "./components/skeleton/skeleton.js";
21
- import { Switch as R } from "./components/switch/switch.js";
22
- import { TextInput as W } from "./components/text-input/text-input.js";
23
- import { Tooltip as Y } from "./components/tooltip/tooltip.js";
24
- import { TooltipProvider as _ } from "./components/tooltip-provider/tooltip-provider.js";
25
- import { TouchTarget as oo } from "./components/touch-target/touch-target.js";
26
- import { twMerge as to } from "./lib/tailwind-merge.js";
27
- import { UserDropdown as po } from "./components/user-dropdown/user-dropdown.js";
28
- import { useScrollToBottom as xo } from "./hooks/use-scroll-to-bottom.js";
20
+ import { Sidebar as O } from "./components/sidebar/sidebar.js";
21
+ import { Skeleton as R } from "./components/skeleton/skeleton.js";
22
+ import { Switch as W } from "./components/switch/switch.js";
23
+ import { TextInput as Y } from "./components/text-input/text-input.js";
24
+ import { Tooltip as _ } from "./components/tooltip/tooltip.js";
25
+ import { TooltipProvider as oo } from "./components/tooltip-provider/tooltip-provider.js";
26
+ import { TouchTarget as eo } from "./components/touch-target/touch-target.js";
27
+ import { twMerge as po } from "./lib/tailwind-merge.js";
28
+ import { UserDropdown as xo } from "./components/user-dropdown/user-dropdown.js";
29
+ import { useScrollToBottom as no } from "./hooks/use-scroll-to-bottom.js";
29
30
  export {
30
- t as AnimatedLoader,
31
+ e as AnimatedLoader,
31
32
  p as Badge,
32
33
  x as Box,
33
34
  n as Button,
34
35
  a as ClientModal,
35
- u as Collapsible,
36
- i as CollapsibleContent,
36
+ i as Collapsible,
37
+ u as CollapsibleContent,
37
38
  c as CollapsibleTrigger,
38
- B as CopyButton,
39
+ S as CopyButton,
39
40
  C as DecoratedIcon,
40
41
  T as DropdownMenu,
41
42
  s as DropdownMenuItem,
42
43
  M as ErrorBoundary,
43
- h as Icon,
44
- y as IconButton,
45
- L as InputButton,
46
- E as MountSvgSprite,
47
- N as NotFoundComponent,
48
- j as PagePadding,
49
- z as ProtocolLogo,
50
- P as ScrollArea,
44
+ D as Icon,
45
+ h as IconButton,
46
+ y as InputButton,
47
+ L as MountSvgSprite,
48
+ E as NotFoundComponent,
49
+ N as PagePadding,
50
+ j as ProtocolLogo,
51
+ z as ScrollArea,
51
52
  H as Select,
52
53
  J as SelectItem,
53
- O as Skeleton,
54
- R as Switch,
55
- W as TextInput,
56
- Y as Tooltip,
57
- _ as TooltipProvider,
58
- oo as TouchTarget,
59
- po as UserDropdown,
60
- to as twMerge,
61
- xo as useScrollToBottom
54
+ O as Sidebar,
55
+ R as Skeleton,
56
+ W as Switch,
57
+ Y as TextInput,
58
+ _ as Tooltip,
59
+ oo as TooltipProvider,
60
+ eo as TouchTarget,
61
+ xo as UserDropdown,
62
+ po as twMerge,
63
+ no as useScrollToBottom
62
64
  };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Matches a pathname against a (Next‑style) pattern.
3
+ * Every rule in the original test‑suite still passes.
4
+ */
5
+ export declare const matchesPathname: (path: string, pattern: string) => boolean;
@@ -0,0 +1,28 @@
1
+ const o = (r) => {
2
+ const t = r.split("?")[0];
3
+ return t ? t.length > 1 && t.endsWith("/") ? t.slice(0, -1) : t : "";
4
+ }, p = /^\[\[\.\.\.(.+)\]\]$/, h = /^\[\.\.\.(.+)\]$/, a = /^\[(.+)\]$/, f = (r, t) => {
5
+ const s = o(r), c = o(t);
6
+ if (s === c) return !0;
7
+ const u = c.split("/"), e = [];
8
+ return u.forEach((n, i) => {
9
+ if (!(i === 0 && n === "")) {
10
+ if (p.test(n)) {
11
+ e.push("(?:/.+)?");
12
+ return;
13
+ }
14
+ if (h.test(n)) {
15
+ e.push("/.+");
16
+ return;
17
+ }
18
+ if (a.test(n)) {
19
+ e.push("/[^/]+");
20
+ return;
21
+ }
22
+ e.push("/" + n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
23
+ }
24
+ }), new RegExp(`^${e.join("")}$`).test(s);
25
+ };
26
+ export {
27
+ f as matchesPathname
28
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@validationcloud/fractal-ui",
3
3
  "private": false,
4
- "version": "1.65.0",
4
+ "version": "1.66.0",
5
5
  "module": "./dist/index.js",
6
6
  "type": "module",
7
7
  "files": [