@windrun-huaiin/third-ui 31.3.0 → 31.3.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.
|
@@ -4,9 +4,12 @@
|
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var tocBase = require('./toc-base.js');
|
|
6
6
|
|
|
7
|
+
function joinUrlPath(baseUrl, path) {
|
|
8
|
+
return `${baseUrl.replace(/\/+$/, '')}/${path.replace(/^\/+/, '')}`;
|
|
9
|
+
}
|
|
7
10
|
function TocFooterWrapper({ lastModified, editPath, githubBaseUrl, copyButtonComponent }) {
|
|
8
11
|
const showEdit = githubBaseUrl && editPath;
|
|
9
|
-
return (jsxRuntime.jsxs("div", { className: "flex flex-col gap-y-2 items-start m-4", children: [jsxRuntime.jsx(tocBase.LastUpdatedDate, { date: lastModified }), copyButtonComponent, showEdit && jsxRuntime.jsx(tocBase.EditOnGitHub, { url:
|
|
12
|
+
return (jsxRuntime.jsxs("div", { className: "flex flex-col gap-y-2 items-start m-4", children: [jsxRuntime.jsx(tocBase.LastUpdatedDate, { date: lastModified }), copyButtonComponent, showEdit && jsxRuntime.jsx(tocBase.EditOnGitHub, { url: joinUrlPath(githubBaseUrl, editPath) })] }));
|
|
10
13
|
}
|
|
11
14
|
|
|
12
15
|
exports.TocFooterWrapper = TocFooterWrapper;
|
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { LastUpdatedDate, EditOnGitHub } from './toc-base.mjs';
|
|
4
4
|
|
|
5
|
+
function joinUrlPath(baseUrl, path) {
|
|
6
|
+
return `${baseUrl.replace(/\/+$/, '')}/${path.replace(/^\/+/, '')}`;
|
|
7
|
+
}
|
|
5
8
|
function TocFooterWrapper({ lastModified, editPath, githubBaseUrl, copyButtonComponent }) {
|
|
6
9
|
const showEdit = githubBaseUrl && editPath;
|
|
7
|
-
return (jsxs("div", { className: "flex flex-col gap-y-2 items-start m-4", children: [jsx(LastUpdatedDate, { date: lastModified }), copyButtonComponent, showEdit && jsx(EditOnGitHub, { url:
|
|
10
|
+
return (jsxs("div", { className: "flex flex-col gap-y-2 items-start m-4", children: [jsx(LastUpdatedDate, { date: lastModified }), copyButtonComponent, showEdit && jsx(EditOnGitHub, { url: joinUrlPath(githubBaseUrl, editPath) })] }));
|
|
8
11
|
}
|
|
9
12
|
|
|
10
13
|
export { TocFooterWrapper };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@windrun-huaiin/third-ui",
|
|
3
|
-
"version": "31.3.
|
|
3
|
+
"version": "31.3.1",
|
|
4
4
|
"description": "Third-party integrated UI components for windrun-huaiin projects",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./clerk": {
|
|
@@ -243,8 +243,8 @@
|
|
|
243
243
|
"tslib": "^2.8.1",
|
|
244
244
|
"unified": "^11.0.5",
|
|
245
245
|
"zod": "^4.3.6",
|
|
246
|
-
"@windrun-huaiin/base-ui": "^31.0.0",
|
|
247
246
|
"@windrun-huaiin/contracts": "^31.0.0",
|
|
247
|
+
"@windrun-huaiin/base-ui": "^31.0.0",
|
|
248
248
|
"@windrun-huaiin/lib": "^31.0.2"
|
|
249
249
|
},
|
|
250
250
|
"peerDependencies": {
|
|
@@ -10,13 +10,17 @@ interface TocFooterProps {
|
|
|
10
10
|
copyButtonComponent?: React.ReactNode;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
function joinUrlPath(baseUrl: string, path: string) {
|
|
14
|
+
return `${baseUrl.replace(/\/+$/, '')}/${path.replace(/^\/+/, '')}`;
|
|
15
|
+
}
|
|
16
|
+
|
|
13
17
|
export function TocFooterWrapper({ lastModified, editPath, githubBaseUrl, copyButtonComponent }: TocFooterProps) {
|
|
14
18
|
const showEdit = githubBaseUrl && editPath;
|
|
15
19
|
return (
|
|
16
20
|
<div className="flex flex-col gap-y-2 items-start m-4">
|
|
17
21
|
<LastUpdatedDate date={lastModified} />
|
|
18
22
|
{copyButtonComponent}
|
|
19
|
-
{showEdit && <EditOnGitHub url={
|
|
23
|
+
{showEdit && <EditOnGitHub url={joinUrlPath(githubBaseUrl, editPath)} />}
|
|
20
24
|
</div>
|
|
21
25
|
);
|
|
22
26
|
}
|