@turingpaper/ui 0.0.1-test.7 → 0.0.1

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,11 +1,11 @@
1
- import { jsx as s, jsxs as i } from "react/jsx-runtime";
1
+ import { jsx as s, jsxs as n } from "react/jsx-runtime";
2
2
  import * as t from "react";
3
- import { Slot as n } from "radix-ui";
4
- import { MoreHorizontal as c, ChevronRight as d } from "lucide-react";
3
+ import { Slot as c } from "radix-ui";
4
+ import { MoreHorizontal as d, ChevronRight as l } from "lucide-react";
5
5
  import { cn as o } from "./utils.mjs";
6
- const l = t.forwardRef(({ ...r }, e) => /* @__PURE__ */ s("nav", { ref: e, "aria-label": "breadcrumb", ...r }));
7
- l.displayName = "Breadcrumb";
8
- const p = t.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ s(
6
+ const p = t.forwardRef(({ ...r }, e) => /* @__PURE__ */ s("nav", { ref: e, "aria-label": "breadcrumb", ...r }));
7
+ p.displayName = "Breadcrumb";
8
+ const u = t.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ s(
9
9
  "ol",
10
10
  {
11
11
  ref: a,
@@ -16,8 +16,8 @@ const p = t.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ s(
16
16
  ...e
17
17
  }
18
18
  ));
19
- p.displayName = "BreadcrumbList";
20
- const u = t.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ s(
19
+ u.displayName = "BreadcrumbList";
20
+ const f = t.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ s(
21
21
  "li",
22
22
  {
23
23
  ref: a,
@@ -25,17 +25,20 @@ const u = t.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ s(
25
25
  ...e
26
26
  }
27
27
  ));
28
- u.displayName = "BreadcrumbItem";
29
- const f = t.forwardRef(({ asChild: r, className: e, ...a }, m) => /* @__PURE__ */ s(
30
- r ? n : "a",
31
- {
32
- ref: m,
33
- className: o("transition-colors hover:text-foreground", e),
34
- ...a
35
- }
36
- ));
37
- f.displayName = "BreadcrumbLink";
38
- const b = t.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ s(
28
+ f.displayName = "BreadcrumbItem";
29
+ const b = t.forwardRef(({ asChild: r, className: e, ...a }, m) => {
30
+ const i = r ? c.Root : "a";
31
+ return /* @__PURE__ */ s(
32
+ i,
33
+ {
34
+ ref: m,
35
+ className: o("transition-colors hover:text-foreground", e),
36
+ ...a
37
+ }
38
+ );
39
+ });
40
+ b.displayName = "BreadcrumbLink";
41
+ const N = t.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ s(
39
42
  "span",
40
43
  {
41
44
  ref: a,
@@ -46,8 +49,8 @@ const b = t.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ s(
46
49
  ...e
47
50
  }
48
51
  ));
49
- b.displayName = "BreadcrumbPage";
50
- const N = ({
52
+ N.displayName = "BreadcrumbPage";
53
+ const B = ({
51
54
  children: r,
52
55
  className: e,
53
56
  ...a
@@ -58,14 +61,14 @@ const N = ({
58
61
  "aria-hidden": "true",
59
62
  className: o("[&>svg]:w-3.5 [&>svg]:h-3.5", e),
60
63
  ...a,
61
- children: r ?? /* @__PURE__ */ s(d, {})
64
+ children: r ?? /* @__PURE__ */ s(l, {})
62
65
  }
63
66
  );
64
- N.displayName = "BreadcrumbSeparator";
65
- const B = ({
67
+ B.displayName = "BreadcrumbSeparator";
68
+ const g = ({
66
69
  className: r,
67
70
  ...e
68
- }) => /* @__PURE__ */ i(
71
+ }) => /* @__PURE__ */ n(
69
72
  "span",
70
73
  {
71
74
  role: "presentation",
@@ -73,18 +76,18 @@ const B = ({
73
76
  className: o("flex h-9 w-9 items-center justify-center", r),
74
77
  ...e,
75
78
  children: [
76
- /* @__PURE__ */ s(c, { className: "h-4 w-4" }),
79
+ /* @__PURE__ */ s(d, { className: "h-4 w-4" }),
77
80
  /* @__PURE__ */ s("span", { className: "sr-only", children: "More" })
78
81
  ]
79
82
  }
80
83
  );
81
- B.displayName = "BreadcrumbElipssis";
84
+ g.displayName = "BreadcrumbElipssis";
82
85
  export {
83
- l as Breadcrumb,
84
- B as BreadcrumbEllipsis,
85
- u as BreadcrumbItem,
86
- f as BreadcrumbLink,
87
- p as BreadcrumbList,
88
- b as BreadcrumbPage,
89
- N as BreadcrumbSeparator
86
+ p as Breadcrumb,
87
+ g as BreadcrumbEllipsis,
88
+ f as BreadcrumbItem,
89
+ b as BreadcrumbLink,
90
+ u as BreadcrumbList,
91
+ N as BreadcrumbPage,
92
+ B as BreadcrumbSeparator
90
93
  };
package/dist/button.mjs CHANGED
@@ -1,16 +1,16 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import * as a from "react";
3
- import { Slot as d } from "radix-ui";
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import * as d from "react";
3
+ import { Slot as u } from "radix-ui";
4
4
  import { cva as c } from "class-variance-authority";
5
- import { cn as u } from "./utils.mjs";
6
- const f = c(
5
+ import { cn as f } from "./utils.mjs";
6
+ const g = c(
7
7
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
8
8
  {
9
9
  variants: {
10
10
  variant: {
11
11
  default: "bg-primary text-primary-foreground hover:bg-primary/90",
12
12
  destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
13
- outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
13
+ outline: "border border-input bg-background hover:bg-muted hover:text-foreground",
14
14
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
15
15
  ghost: "hover:bg-accent hover:text-accent-foreground",
16
16
  link: "text-primary underline-offset-4 hover:underline"
@@ -27,18 +27,21 @@ const f = c(
27
27
  size: "default"
28
28
  }
29
29
  }
30
- ), g = a.forwardRef(
31
- ({ className: e, variant: r, size: t, asChild: o = !1, ...n }, i) => /* @__PURE__ */ s(
32
- o ? d : "button",
33
- {
34
- className: u(f({ variant: r, size: t, className: e })),
35
- ref: i,
36
- ...n
37
- }
38
- )
30
+ ), m = d.forwardRef(
31
+ ({ className: e, variant: r, size: t, asChild: o = !1, ...n }, i) => {
32
+ const s = o ? u.Root : "button";
33
+ return /* @__PURE__ */ a(
34
+ s,
35
+ {
36
+ className: f(g({ variant: r, size: t, className: e })),
37
+ ref: i,
38
+ ...n
39
+ }
40
+ );
41
+ }
39
42
  );
40
- g.displayName = "Button";
43
+ m.displayName = "Button";
41
44
  export {
42
- g as Button,
43
- f as buttonVariants
45
+ m as Button,
46
+ g as buttonVariants
44
47
  };
@@ -3,11 +3,11 @@ import * as React from "react";
3
3
  type DialogProps = React.ComponentProps<typeof Dialog>;
4
4
  declare const Command: React.ForwardRefExoticComponent<Omit<{
5
5
  children?: React.ReactNode;
6
- } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
6
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
7
7
  ref?: React.Ref<HTMLDivElement>;
8
8
  } & {
9
9
  asChild?: boolean;
10
- }, "asChild" | keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
10
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
11
11
  label?: string;
12
12
  shouldFilter?: boolean;
13
13
  filter?: (value: string, search: string, keywords?: string[]) => number;
@@ -29,45 +29,45 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
29
29
  } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
30
30
  declare const CommandList: React.ForwardRefExoticComponent<Omit<{
31
31
  children?: React.ReactNode;
32
- } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
32
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
33
33
  ref?: React.Ref<HTMLDivElement>;
34
34
  } & {
35
35
  asChild?: boolean;
36
- }, "asChild" | keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
36
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
37
37
  label?: string;
38
38
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
39
39
  declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
40
40
  children?: React.ReactNode;
41
- } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
41
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
42
42
  ref?: React.Ref<HTMLDivElement>;
43
43
  } & {
44
44
  asChild?: boolean;
45
- }, "asChild" | keyof React.HTMLAttributes<HTMLDivElement> | "key"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
45
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
46
46
  declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
47
47
  children?: React.ReactNode;
48
- } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
48
+ } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
49
49
  ref?: React.Ref<HTMLDivElement>;
50
50
  } & {
51
51
  asChild?: boolean;
52
- }, "asChild" | keyof React.HTMLAttributes<HTMLDivElement> | "key">, "value" | "heading"> & {
52
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
53
53
  heading?: React.ReactNode;
54
54
  value?: string;
55
55
  forceMount?: boolean;
56
56
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
57
- declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
57
+ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
58
58
  ref?: React.Ref<HTMLDivElement>;
59
59
  } & {
60
60
  asChild?: boolean;
61
- }, "asChild" | keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
61
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
62
62
  alwaysRender?: boolean;
63
63
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
64
64
  declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
65
65
  children?: React.ReactNode;
66
- } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
66
+ } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
67
67
  ref?: React.Ref<HTMLDivElement>;
68
68
  } & {
69
69
  asChild?: boolean;
70
- }, "asChild" | keyof React.HTMLAttributes<HTMLDivElement> | "key">, "disabled" | "value" | "onSelect"> & {
70
+ }, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "disabled" | "value" | "onSelect"> & {
71
71
  disabled?: boolean;
72
72
  onSelect?: (value: string) => void;
73
73
  value?: string;
@@ -0,0 +1,8 @@
1
+ import { RenderOptions } from 'beautiful-mermaid';
2
+ export interface MermaidDiagramProps {
3
+ className?: string;
4
+ code: string;
5
+ filename?: string;
6
+ options?: RenderOptions;
7
+ }
8
+ export declare const MermaidDiagram: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof MermaidDiagramProps> & MermaidDiagramProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,24 +1,24 @@
1
- import { jsx as r, jsxs as c } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as c } from "react/jsx-runtime";
2
2
  import * as a from "react";
3
3
  import { OTPInput as m, OTPInputContext as u } from "input-otp";
4
4
  import { Dot as f } from "lucide-react";
5
5
  import { cn as n } from "./utils.mjs";
6
- const x = a.forwardRef(({ className: e, containerClassName: t, ...o }, s) => /* @__PURE__ */ r(
6
+ const x = a.forwardRef(({ className: e, containerClassName: r, ...o }, s) => /* @__PURE__ */ t(
7
7
  m,
8
8
  {
9
9
  ref: s,
10
10
  containerClassName: n(
11
11
  "flex items-center gap-2 has-[:disabled]:opacity-50",
12
- t
12
+ r
13
13
  ),
14
14
  className: n("disabled:cursor-not-allowed", e),
15
15
  ...o
16
16
  }
17
17
  ));
18
18
  x.displayName = "InputOTP";
19
- const O = a.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ r("div", { ref: o, className: n("flex items-center", e), ...t }));
19
+ const O = a.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ t("div", { ref: o, className: n("flex items-center", e), ...r }));
20
20
  O.displayName = "InputOTPGroup";
21
- const P = a.forwardRef(({ index: e, className: t, ...o }, s) => {
21
+ const P = a.forwardRef(({ index: e, className: r, ...o }, s) => {
22
22
  const i = a.useContext(u), { char: d, hasFakeCaret: l, isActive: p } = i.slots[e];
23
23
  return /* @__PURE__ */ c(
24
24
  "div",
@@ -26,19 +26,19 @@ const P = a.forwardRef(({ index: e, className: t, ...o }, s) => {
26
26
  ref: s,
27
27
  className: n(
28
28
  "relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",
29
- p && "z-10 ring-2 ring-ring ring-offset-background",
30
- t
29
+ p && "z-10 border-ring ring-3 ring-ring/50",
30
+ r
31
31
  ),
32
32
  ...o,
33
33
  children: [
34
34
  d,
35
- l && /* @__PURE__ */ r("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ r("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) })
35
+ l && /* @__PURE__ */ t("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ t("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) })
36
36
  ]
37
37
  }
38
38
  );
39
39
  });
40
40
  P.displayName = "InputOTPSlot";
41
- const T = a.forwardRef(({ ...e }, t) => /* @__PURE__ */ r("div", { ref: t, role: "separator", ...e, children: /* @__PURE__ */ r(f, {}) }));
41
+ const T = a.forwardRef(({ ...e }, r) => /* @__PURE__ */ t("div", { ref: r, role: "separator", ...e, children: /* @__PURE__ */ t(f, {}) }));
42
42
  T.displayName = "InputOTPSeparator";
43
43
  export {
44
44
  x as InputOTP,
package/dist/input.mjs CHANGED
@@ -1,21 +1,21 @@
1
- import { jsx as i } from "react/jsx-runtime";
1
+ import { jsx as t } from "react/jsx-runtime";
2
2
  import * as n from "react";
3
- import { cn as f } from "./utils.mjs";
4
- const s = n.forwardRef(
5
- ({ className: e, type: r, ...o }, t) => /* @__PURE__ */ i(
3
+ import { cn as d } from "./utils.mjs";
4
+ const l = n.forwardRef(
5
+ ({ className: e, type: r, ...o }, i) => /* @__PURE__ */ t(
6
6
  "input",
7
7
  {
8
8
  type: r,
9
- className: f(
10
- "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
9
+ className: d(
10
+ "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
11
11
  e
12
12
  ),
13
- ref: t,
13
+ ref: i,
14
14
  ...o
15
15
  }
16
16
  )
17
17
  );
18
- s.displayName = "Input";
18
+ l.displayName = "Input";
19
19
  export {
20
- s as Input
20
+ l as Input
21
21
  };
@@ -0,0 +1,144 @@
1
+ import { jsx as r, jsxs as v } from "react/jsx-runtime";
2
+ import { cn as b } from "./utils.mjs";
3
+ import { forwardRef as p, useMemo as f, useState as x, useCallback as h } from "react";
4
+ import { THEMES as S, renderMermaidSVG as w } from "beautiful-mermaid";
5
+ import { TransformWrapper as C, TransformComponent as k, useControls as E } from "react-zoom-pan-pinch";
6
+ import { ZoomIn as N, ZoomOut as O, RotateCcw as T, Check as y, Copy as I, Download as z } from "lucide-react";
7
+ const R = "script, foreignObject, iframe, object, embed", M = /^on/i;
8
+ function j(e) {
9
+ let t;
10
+ try {
11
+ t = new DOMParser().parseFromString(e, "image/svg+xml");
12
+ } catch {
13
+ return null;
14
+ }
15
+ const o = t.documentElement;
16
+ if (o.tagName !== "svg" || t.querySelector("parsererror") || o.querySelectorAll(R).length > 0) return null;
17
+ const n = o.querySelectorAll("*");
18
+ for (const s of n)
19
+ for (const a of s.attributes)
20
+ if (M.test(a.name)) return null;
21
+ return e;
22
+ }
23
+ const L = {
24
+ ...S["github-light"],
25
+ transparent: !0
26
+ };
27
+ function _(e) {
28
+ if (!e) return "mermaid-diagram.svg";
29
+ const t = Math.max(e.lastIndexOf("/"), e.lastIndexOf("\\")), o = t >= 0 ? e.substring(t + 1) : e, n = o.lastIndexOf(".");
30
+ return `${(n > 0 ? o.substring(0, n) : o).replace(/[^a-zA-Z0-9_-]/g, "") || "mermaid-diagram"}.svg`;
31
+ }
32
+ const G = p(({ className: e, code: t, filename: o, options: n, ...s }, a) => {
33
+ const i = f(() => _(o), [o]), { svg: l, error: u } = f(() => {
34
+ if (!t.trim())
35
+ return { svg: null, error: "Empty diagram" };
36
+ let d;
37
+ try {
38
+ d = w(t, { ...L, ...n });
39
+ } catch (c) {
40
+ return {
41
+ svg: null,
42
+ error: c instanceof Error ? c.message : "Invalid diagram"
43
+ };
44
+ }
45
+ return j(d) ? { svg: d, error: null } : { svg: null, error: "Invalid SVG" };
46
+ }, [t, n]);
47
+ return u ? /* @__PURE__ */ r(
48
+ "div",
49
+ {
50
+ ref: a,
51
+ className: b(
52
+ "flex items-center justify-center text-muted-foreground text-sm",
53
+ e
54
+ ),
55
+ ...s,
56
+ children: u
57
+ }
58
+ ) : /* @__PURE__ */ r(
59
+ "div",
60
+ {
61
+ ref: a,
62
+ className: b("relative w-full h-full overflow-hidden", e),
63
+ ...s,
64
+ children: /* @__PURE__ */ v(
65
+ C,
66
+ {
67
+ initialScale: 1,
68
+ minScale: 0.25,
69
+ maxScale: 4,
70
+ centerOnInit: !0,
71
+ children: [
72
+ /* @__PURE__ */ r(A, { code: t, svg: l, svgFilename: i }),
73
+ /* @__PURE__ */ r(
74
+ k,
75
+ {
76
+ wrapperClass: "!w-full !h-full",
77
+ contentClass: "!w-full",
78
+ children: /* @__PURE__ */ r(
79
+ "div",
80
+ {
81
+ className: "w-full [&>svg]:w-full [&>svg]:h-auto",
82
+ dangerouslySetInnerHTML: { __html: l }
83
+ }
84
+ )
85
+ }
86
+ )
87
+ ]
88
+ }
89
+ )
90
+ }
91
+ );
92
+ }), A = ({ code: e, svg: t, svgFilename: o }) => {
93
+ const { zoomIn: n, zoomOut: s, resetTransform: a } = E(), [i, l] = x(!1), u = h(async () => {
94
+ await navigator.clipboard.writeText(e), l(!0), setTimeout(() => l(!1), 2e3);
95
+ }, [e]), d = h(() => {
96
+ const g = new Blob([t], { type: "image/svg+xml" }), c = URL.createObjectURL(g), m = document.createElement("a");
97
+ m.href = c, m.download = o, m.click(), URL.revokeObjectURL(c);
98
+ }, [t, o]);
99
+ return /* @__PURE__ */ v("div", { className: "absolute top-2 right-2 z-10 flex gap-1", children: [
100
+ /* @__PURE__ */ r(
101
+ "button",
102
+ {
103
+ onClick: () => n(),
104
+ className: "p-1.5 rounded-md bg-background/80 border border-border hover:bg-muted text-foreground",
105
+ children: /* @__PURE__ */ r(N, { size: 16 })
106
+ }
107
+ ),
108
+ /* @__PURE__ */ r(
109
+ "button",
110
+ {
111
+ onClick: () => s(),
112
+ className: "p-1.5 rounded-md bg-background/80 border border-border hover:bg-muted text-foreground",
113
+ children: /* @__PURE__ */ r(O, { size: 16 })
114
+ }
115
+ ),
116
+ /* @__PURE__ */ r(
117
+ "button",
118
+ {
119
+ onClick: () => a(),
120
+ className: "p-1.5 rounded-md bg-background/80 border border-border hover:bg-muted text-foreground",
121
+ children: /* @__PURE__ */ r(T, { size: 16 })
122
+ }
123
+ ),
124
+ /* @__PURE__ */ r(
125
+ "button",
126
+ {
127
+ onClick: u,
128
+ className: "p-1.5 rounded-md bg-background/80 border border-border hover:bg-muted text-foreground",
129
+ children: i ? /* @__PURE__ */ r(y, { size: 16 }) : /* @__PURE__ */ r(I, { size: 16 })
130
+ }
131
+ ),
132
+ /* @__PURE__ */ r(
133
+ "button",
134
+ {
135
+ onClick: d,
136
+ className: "p-1.5 rounded-md bg-background/80 border border-border hover:bg-muted text-foreground",
137
+ children: /* @__PURE__ */ r(z, { size: 16 })
138
+ }
139
+ )
140
+ ] });
141
+ };
142
+ export {
143
+ G as MermaidDiagram
144
+ };