@infinilabs/doc-detail 0.0.2 → 0.0.4

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,4 +1,4 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode("*,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }:root{--color-primary: #1677ff;--color-border: #d9d9d9;--color-primary-bg: #e6f4ff;--color-text-secondary: rgba(0,0,0,.65);--color-bg-layout: #f5f5f5}.dark{--color-primary: #1668dc;--color-border: #424242;--color-primary-bg: #15325b;--color-text-secondary: rgba(255,255,255,.65);--color-bg-layout: #000000}.float-left{float:left}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mr-3{margin-right:.75rem}.children\\:size-4>*{width:1rem;height:1rem}.size-3{width:.75rem;height:.75rem}.size-6{width:1.5rem;height:1.5rem}.children\\:h-unset\\!>*{height:unset!important}.children\\:w-full\\!>*{width:100%!important}.h-full{height:100%}.min-w-3{min-width:.75rem}.w-1\\/2{width:50%}.w-24{width:6rem}.w-full{width:100%}.flex{display:flex}.inline-flex{display:inline-flex}.flex-1{flex:1 1 0%}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.rotate-90{--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-rotate:90deg;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-between{justify-content:space-between}.gap-0{gap:0}.gap-0\\.5{gap:.125rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-row-2{row-gap:.5rem}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.border{border-width:1px}.border-border{border-color:var(--color-border)}.rounded-lg{border-radius:.5rem}.border-solid{border-style:solid}.bg-black\\/3{background-color:#00000008}.bg-transparent{background-color:transparent}.dark .dark\\:bg-white\\/4{background-color:#ffffff0a}.\\[\\&\\>\\.docx\\]\\:p-0\\!>.docx{padding:0!important}.p-4{padding:1rem}.p-4\\!{padding:1rem!important}.pl-2{padding-left:.5rem}.text-3{font-size:.75rem}.text-3\\.5{font-size:.875rem}.text-4\\.5\\/6{font-size:1.125rem;line-height:1.5rem}.text-primary,.hover\\:text-primary:hover{color:var(--color-primary)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}@media(max-width:639.9px){.\\<sm\\:w-full{width:100%}}@keyframes x-markdown-fade-in{0%{opacity:0}to{opacity:1}}.x-markdown{--text-color: inherit;--font-size: inherit;--margin-block: 0 0 1em 0;--td-th-padding: .85em 1em;--pre-th-td-padding: 2px 0;--border-font-weight: 600;--padding-ul-ol: 0 0 0 1em;--margin-ul-ol: 0 0 1em 1.8em;--margin-li: .25em 0;--margin-pre: 1em 0;--padding-code-inline: .2em .4em;--margin-code-inline: 0 .2em;--code-inline-text: .85em;--small-border-radius: 2px;--image-margin: .5em 0;--hr-margin: 1.5em 0;--table-margin: 1em 0;font-size:var(--font-size);line-height:1.5714285714285714;width:100%;color:var(--text-color)}.x-markdown p,.x-markdown div,.x-markdown span,.x-markdown li{word-break:break-word;overflow-wrap:break-word}.x-markdown pre,.x-markdown code{word-break:break-word;overflow-wrap:break-word;white-space:pre-wrap}.x-markdown th,.x-markdown td{padding:var(--td-th-padding)}.x-markdown th{font-weight:var(--border-font-weight)}.x-markdown pre table{box-shadow:none}.x-markdown pre td,.x-markdown pre th{padding:var(--pre-th-td-padding);border:none;text-align:left}.x-markdown p{margin:var(--margin-block)}.x-markdown p:first-child{margin-top:0}.x-markdown p:last-child{margin-bottom:0}.x-markdown ul,.x-markdown ol{margin:var(--margin-ul-ol);padding:var(--padding-ul-ol)}.x-markdown ul:first-child,.x-markdown ol:first-child{margin-top:0}.x-markdown ul:last-child,.x-markdown ol:last-child{margin-bottom:0}.x-markdown ol>li{list-style:decimal}.x-markdown ul>li{list-style:disc}.x-markdown li{margin:var(--margin-li)}.x-markdown li:first-child{margin-top:0}.x-markdown li:last-child{margin-bottom:0}.x-markdown pre{margin:var(--margin-pre);overflow-x:auto}.x-markdown pre:first-child{margin-top:0}.x-markdown pre:last-child{margin-bottom:0}.x-markdown code{padding:var(--padding-code-inline);margin:var(--margin-code-inline);font-size:var(--code-inline-text);border-radius:var(--small-border-radius)}.x-markdown pre code{padding:0;margin:0;font-size:inherit;border-radius:0;line-height:2}.x-markdown img{max-width:100%;height:auto;margin:var(--image-margin)}.x-markdown hr{margin:var(--hr-margin)}.x-markdown table:not(pre){margin:var(--table-margin);border-collapse:collapse;display:block;width:max-content;max-width:100%;overflow:auto}.x-markdown table:not(pre):first-child{margin-top:0}.x-markdown table:not(pre):last-child{margin-bottom:0}.x-markdown .inline-katex .katex-display{display:inline-block;margin:0;text-align:initial;vertical-align:middle}.x-markdown .inline-katex .katex-display>.katex{display:inline-block;text-align:initial;white-space:normal}.x-markdown .inline-katex .katex-display>.katex>.katex-html{display:inline-block;position:static}.x-markdown .inline-katex .katex-display>.katex>.katex-html>.tag{position:static}")),document.head.appendChild(r)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})();
1
+ (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode("*,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }:root{--color-primary: #1677ff;--color-border: #d9d9d9;--color-primary-bg: #e6f4ff;--color-text-secondary: rgba(0,0,0,.65);--color-bg-layout: #f5f5f5}.dark{--color-primary: #1668dc;--color-border: #424242;--color-primary-bg: #15325b;--color-text-secondary: rgba(255,255,255,.65);--color-bg-layout: #000000}.float-left{float:left}.my-2{margin-top:.5rem;margin-bottom:.5rem}.ml-2{margin-left:.5rem}.mr-3{margin-right:.75rem}.children\\:size-4>*{width:1rem;height:1rem}.size-3{width:.75rem;height:.75rem}.size-6{width:1.5rem;height:1.5rem}.children\\:h-unset\\!>*{height:unset!important}.children\\:w-full\\!>*{width:100%!important}.h-full{height:100%}.w-1\\/2{width:50%}.w-24{width:6rem}.w-full{width:100%}.flex{display:flex}.inline-flex{display:inline-flex}.flex-1{flex:1 1 0%}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.rotate-90{--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-rotate:90deg;transform:translate(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotate(var(--un-rotate-z)) skew(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-between{justify-content:space-between}.gap-0{gap:0}.gap-0\\.5{gap:.125rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-row-2{row-gap:.5rem}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.border{border-width:1px}.border-border{border-color:var(--color-border)}.rounded-lg{border-radius:.5rem}.border-solid{border-style:solid}.bg-black\\/3{background-color:#00000008}.bg-transparent{background-color:transparent}.dark .dark\\:bg-white\\/4{background-color:#ffffff0a}.\\[\\&\\>\\.docx\\]\\:p-0\\!>.docx{padding:0!important}.p-4{padding:1rem}.p-4\\!{padding:1rem!important}.text-3{font-size:.75rem}.text-3\\.5{font-size:.875rem}.text-4\\.5\\/6{font-size:1.125rem;line-height:1.5rem}.text-primary,.hover\\:text-primary:hover{color:var(--color-primary)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}@media(max-width:639.9px){.\\<sm\\:w-full{width:100%}}@keyframes x-markdown-fade-in{0%{opacity:0}to{opacity:1}}.x-markdown{--text-color: inherit;--font-size: inherit;--margin-block: 0 0 1em 0;--td-th-padding: .85em 1em;--pre-th-td-padding: 2px 0;--border-font-weight: 600;--padding-ul-ol: 0 0 0 1em;--margin-ul-ol: 0 0 1em 1.8em;--margin-li: .25em 0;--margin-pre: 1em 0;--padding-code-inline: .2em .4em;--margin-code-inline: 0 .2em;--code-inline-text: .85em;--small-border-radius: 2px;--image-margin: .5em 0;--hr-margin: 1.5em 0;--table-margin: 1em 0;font-size:var(--font-size);line-height:1.5714285714285714;width:100%;color:var(--text-color)}.x-markdown p,.x-markdown div,.x-markdown span,.x-markdown li{word-break:break-word;overflow-wrap:break-word}.x-markdown pre,.x-markdown code{word-break:break-word;overflow-wrap:break-word;white-space:pre-wrap}.x-markdown th,.x-markdown td{padding:var(--td-th-padding)}.x-markdown th{font-weight:var(--border-font-weight)}.x-markdown pre table{box-shadow:none}.x-markdown pre td,.x-markdown pre th{padding:var(--pre-th-td-padding);border:none;text-align:left}.x-markdown p{margin:var(--margin-block)}.x-markdown p:first-child{margin-top:0}.x-markdown p:last-child{margin-bottom:0}.x-markdown ul,.x-markdown ol{margin:var(--margin-ul-ol);padding:var(--padding-ul-ol)}.x-markdown ul:first-child,.x-markdown ol:first-child{margin-top:0}.x-markdown ul:last-child,.x-markdown ol:last-child{margin-bottom:0}.x-markdown ol>li{list-style:decimal}.x-markdown ul>li{list-style:disc}.x-markdown li{margin:var(--margin-li)}.x-markdown li:first-child{margin-top:0}.x-markdown li:last-child{margin-bottom:0}.x-markdown pre{margin:var(--margin-pre);overflow-x:auto}.x-markdown pre:first-child{margin-top:0}.x-markdown pre:last-child{margin-bottom:0}.x-markdown code{padding:var(--padding-code-inline);margin:var(--margin-code-inline);font-size:var(--code-inline-text);border-radius:var(--small-border-radius)}.x-markdown pre code{padding:0;margin:0;font-size:inherit;border-radius:0;line-height:2}.x-markdown img{max-width:100%;height:auto;margin:var(--image-margin)}.x-markdown hr{margin:var(--hr-margin)}.x-markdown table:not(pre){margin:var(--table-margin);border-collapse:collapse;display:block;width:max-content;max-width:100%;overflow:auto}.x-markdown table:not(pre):first-child{margin-top:0}.x-markdown table:not(pre):last-child{margin-bottom:0}.x-markdown .inline-katex .katex-display{display:inline-block;margin:0;text-align:initial;vertical-align:middle}.x-markdown .inline-katex .katex-display>.katex{display:inline-block;text-align:initial;white-space:normal}.x-markdown .inline-katex .katex-display>.katex>.katex-html{display:inline-block;position:static}.x-markdown .inline-katex .katex-display>.katex>.katex-html>.tag{position:static}")),document.head.appendChild(r)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
2
  var xL = (n) => {
3
3
  throw TypeError(n);
4
4
  };
@@ -85926,7 +85926,14 @@ const G2t = (n) => {
85926
85926
  }
85927
85927
  );
85928
85928
  }, { Text: V3 } = lJ, GPt = (n) => {
85929
- const { data: t, i18n: e, extraButtons: r, className: i, ...a } = n, [o, s] = Ic(!1), l = [
85929
+ const {
85930
+ data: t,
85931
+ i18n: e,
85932
+ extraButtons: r,
85933
+ className: i,
85934
+ openSourceButtonProps: a,
85935
+ ...o
85936
+ } = n, [s, l] = Ic(!1), u = [
85930
85937
  {
85931
85938
  label: e?.labels?.type ?? "Type",
85932
85939
  value: t?.type
@@ -85952,7 +85959,7 @@ const G2t = (n) => {
85952
85959
  "div",
85953
85960
  {
85954
85961
  className: LPt("flex flex-col h-full overflow-hidden", i),
85955
- ...a,
85962
+ ...o,
85956
85963
  children: [
85957
85964
  /* @__PURE__ */ co("div", { children: [
85958
85965
  /* @__PURE__ */ ae("img", { src: t?.icon, className: "size-6 mr-3 float-left" }),
@@ -85975,9 +85982,9 @@ const G2t = (n) => {
85975
85982
  /* @__PURE__ */ ae(
85976
85983
  fJ,
85977
85984
  {
85978
- className: "pl-2 min-w-3 size-3 hover:text-primary transition cursor-pointer",
85985
+ className: "ml-2 size-3 hover:text-primary transition cursor-pointer",
85979
85986
  onClick: () => {
85980
- s((u) => !u);
85987
+ l((c) => !c);
85981
85988
  }
85982
85989
  }
85983
85990
  )
@@ -85993,6 +86000,7 @@ const G2t = (n) => {
85993
86000
  onClick: () => {
85994
86001
  window.open(t.url);
85995
86002
  },
86003
+ ...a,
85996
86004
  children: e?.buttons?.openSource ?? "Open Source"
85997
86005
  }
85998
86006
  )
@@ -86004,22 +86012,22 @@ const G2t = (n) => {
86004
86012
  className: "bg-black/3 dark:bg-white/4 rounded-lg overflow-hidden",
86005
86013
  initial: !1,
86006
86014
  animate: {
86007
- height: o ? "auto" : 0,
86008
- opacity: o ? 1 : 0,
86009
- marginBottom: o ? "1rem" : 0
86015
+ height: s ? "auto" : 0,
86016
+ opacity: s ? 1 : 0,
86017
+ marginBottom: s ? "1rem" : 0
86010
86018
  },
86011
- children: /* @__PURE__ */ ae("div", { className: "flex flex-wrap gap-row-2 p-4", children: l.map((u) => {
86012
- const { label: c, value: h } = u;
86019
+ children: /* @__PURE__ */ ae("div", { className: "flex flex-wrap gap-row-2 p-4", children: u.map((c) => {
86020
+ const { label: h, value: f } = c;
86013
86021
  return /* @__PURE__ */ co(
86014
86022
  "div",
86015
86023
  {
86016
86024
  className: "w-1/2 inline-flex items-center <sm:w-full",
86017
86025
  children: [
86018
- /* @__PURE__ */ ae(V3, { type: "secondary", className: "w-24", children: c }),
86019
- /* @__PURE__ */ ae("span", { className: "text-3.5", children: h ?? "-" })
86026
+ /* @__PURE__ */ ae(V3, { type: "secondary", className: "w-24", children: h }),
86027
+ /* @__PURE__ */ ae("span", { className: "text-3.5", children: f ?? "-" })
86020
86028
  ]
86021
86029
  },
86022
- c
86030
+ h
86023
86031
  );
86024
86032
  }) })
86025
86033
  }
package/dist/index.d.ts CHANGED
@@ -67,6 +67,7 @@ declare interface DocDetailProps extends HTMLAttributes<HTMLDivElement> {
67
67
  };
68
68
  };
69
69
  extraButtons?: ReactNode[];
70
+ openSourceButtonProps?: ActionButtonProps;
70
71
  }
71
72
 
72
73
  declare type MetadataContentType = "image" | "video" | "markdown" | "pdf" | "docx" | "pptx" | "xlsx";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@infinilabs/doc-detail",
3
3
  "private": false,
4
- "version": "0.0.2",
4
+ "version": "0.0.4",
5
5
  "type": "module",
6
6
  "main": "dist/doc-detail.cjs",
7
7
  "module": "dist/doc-detail.js",
@@ -12,7 +12,7 @@ import { useState, type FC, type HTMLAttributes, type ReactNode } from "react";
12
12
  import Preview from "./components/Preview";
13
13
  import AIInterpretation from "./components/AIInterpretation";
14
14
  import { cn } from "@/utils/cn";
15
- import ActionButton from "../ActionButton";
15
+ import ActionButton, { type ActionButtonProps } from "../ActionButton";
16
16
 
17
17
  const { Text } = Typography;
18
18
 
@@ -83,10 +83,18 @@ export interface DocDetailProps extends HTMLAttributes<HTMLDivElement> {
83
83
  };
84
84
  };
85
85
  extraButtons?: ReactNode[];
86
+ openSourceButtonProps?: ActionButtonProps;
86
87
  }
87
88
 
88
89
  const DocDetail: FC<DocDetailProps> = (props) => {
89
- const { data, i18n, extraButtons, className, ...rest } = props;
90
+ const {
91
+ data,
92
+ i18n,
93
+ extraButtons,
94
+ className,
95
+ openSourceButtonProps,
96
+ ...rest
97
+ } = props;
90
98
 
91
99
  const [visibleMore, setVisibleMore] = useState(false);
92
100
 
@@ -138,7 +146,7 @@ const DocDetail: FC<DocDetailProps> = (props) => {
138
146
  <div>{data?.updated ?? "-"}</div>
139
147
 
140
148
  <Ellipsis
141
- className="pl-2 min-w-3 size-3 hover:text-primary transition cursor-pointer"
149
+ className="ml-2 size-3 hover:text-primary transition cursor-pointer"
142
150
  onClick={() => {
143
151
  setVisibleMore((prev) => !prev);
144
152
  }}
@@ -153,6 +161,7 @@ const DocDetail: FC<DocDetailProps> = (props) => {
153
161
  onClick={() => {
154
162
  window.open(data.url);
155
163
  }}
164
+ {...openSourceButtonProps}
156
165
  >
157
166
  {i18n?.buttons?.openSource ?? "Open Source"}
158
167
  </ActionButton>