@alauda/doom 0.14.9 → 0.14.10

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.
@@ -3,5 +3,5 @@ export interface ExternalSiteLinkProps extends AnchorHTMLAttributes<HTMLAnchorEl
3
3
  name: string;
4
4
  children: ReactNode;
5
5
  }
6
- export declare const ExternalSiteLink: ({ name, href, className, ...props }: ExternalSiteLinkProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const ExternalSiteLink: (props: ExternalSiteLinkProps) => import("react/jsx-runtime").JSX.Element;
7
7
  export default ExternalSiteLink;
@@ -7,7 +7,7 @@ import { Directive } from './Directive.js';
7
7
  import virtual from 'doom-@global-virtual';
8
8
  import classes from '../../../styles/link.module.scss';
9
9
  import { useIsPrint } from '../hooks/index.js';
10
- export const ExternalSiteLink = ({ name, href = '', className, ...props }) => {
10
+ const ExternalSiteLink_ = ({ name, href = '', className, ...props }) => {
11
11
  const isPrint = useIsPrint();
12
12
  const site = useMemo(() => virtual.sites?.find((s) => s.name === name), []);
13
13
  const lang = useLang();
@@ -17,11 +17,13 @@ export const ExternalSiteLink = ({ name, href = '', className, ...props }) => {
17
17
  if (isExternalUrl(href)) {
18
18
  return _jsxs(Directive, { type: "danger", children: ["Invalid href `", href, "` found"] });
19
19
  }
20
- return (_jsx(NoSSR, { children: _jsx("a", { href: (isPrint ? 'https://docs.alauda.io' : '') +
21
- (virtual.version
22
- ? addTrailingSlash(site.base + site.version)
23
- : site.base) +
24
- (lang ? `${lang}/` : '') +
25
- removeLeadingSlash(href), target: "_blank", rel: "noopener noreferrer", className: clsx(classes.link, 'cursor-pointer', className), ...props }) }));
20
+ return (_jsx("a", { href: (isPrint ? 'https://docs.alauda.io' : '') +
21
+ (virtual.prefix || '') +
22
+ (virtual.version
23
+ ? addTrailingSlash(site.base + site.version)
24
+ : site.base) +
25
+ (lang ? addTrailingSlash(lang) : '') +
26
+ removeLeadingSlash(href), target: "_blank", rel: "noopener noreferrer", className: clsx(classes.link, 'cursor-pointer', className), ...props }));
26
27
  };
28
+ export const ExternalSiteLink = (props) => (_jsx(NoSSR, { children: _jsx(ExternalSiteLink_, { ...props }) }));
27
29
  export default ExternalSiteLink;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alauda/doom",
3
- "version": "0.14.9",
3
+ "version": "0.14.10",
4
4
  "type": "module",
5
5
  "description": "Doctor Doom making docs.",
6
6
  "repository": {
@@ -43,7 +43,7 @@
43
43
  "translate": "yarn doom translate fixture-docs"
44
44
  },
45
45
  "dependencies": {
46
- "@inquirer/prompts": "^7.3.2",
46
+ "@inquirer/prompts": "^7.3.3",
47
47
  "@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",
48
48
  "@playwright/browser-chromium": "^1.50.1",
49
49
  "@rspress/core": "1.43.1",
@@ -53,7 +53,7 @@
53
53
  "clsx": "^2.1.1",
54
54
  "commander": "^13.1.0",
55
55
  "ejs": "^3.1.10",
56
- "es-toolkit": "^1.32.0",
56
+ "es-toolkit": "^1.33.0",
57
57
  "fs-extra": "^11.3.0",
58
58
  "html-tag-names": "^2.1.0",
59
59
  "mermaid": "^11.4.1",
@@ -78,19 +78,19 @@
78
78
  "yoctocolors": "^2.1.1"
79
79
  },
80
80
  "devDependencies": {
81
- "@eslint/js": "^9.21.0",
81
+ "@eslint/js": "^9.22.0",
82
82
  "@swc-node/register": "^1.10.9",
83
- "@swc/core": "1.11.7",
83
+ "@swc/core": "1.11.8",
84
84
  "@types/cli-progress": "^3.11.6",
85
85
  "@types/ejs": "^3.1.5",
86
86
  "@types/fs-extra": "^11.0.4",
87
- "@types/node": "^18.19.79",
87
+ "@types/node": "^18.19.80",
88
88
  "@types/picomatch": "^3.0.2",
89
89
  "@types/react": "^18.3.18",
90
90
  "@types/react-dom": "^18.3.5",
91
91
  "@types/swagger2openapi": "^7.0.4",
92
92
  "@unts/patch-package": "^8.1.1",
93
- "eslint": "^9.21.0",
93
+ "eslint": "^9.22.0",
94
94
  "lint-staged": "^15.4.3",
95
95
  "npm-run-all2": "^7.0.2",
96
96
  "prettier": "^3.5.3",