@rstack-dev/doc-ui
Advanced tools
| .root-YZxMH8 { | ||
| margin-bottom: 1.5rem; | ||
| } | ||
| export type { BlogAvatarAuthor } from '../blog-avatar'; | ||
| export type BlogAuthorsProps = { | ||
| className?: string; | ||
| }; | ||
| export declare function BlogAuthors({ className }: BlogAuthorsProps): import("react/jsx-runtime").JSX.Element; |
| import './index.css'; | ||
| import { jsx } from "react/jsx-runtime"; | ||
| import { usePage } from "@rspress/core/runtime"; | ||
| import { useMemo } from "react"; | ||
| import { BlogAvatarGroup } from "../blog-avatar/index.js"; | ||
| const index_module = { | ||
| root: "root-YZxMH8" | ||
| }; | ||
| const getClassName = (...classNames)=>classNames.filter(Boolean).join(' '); | ||
| const isRecord = (value)=>null !== value && 'object' == typeof value; | ||
| const isBlogAvatarAuthor = (value)=>isRecord(value) && 'string' == typeof value.name && 'string' == typeof value.avatar; | ||
| const normalizeGithub = (author)=>{ | ||
| var _author_title; | ||
| if (!author.github) return author; | ||
| const githubUrl = author.github.startsWith('http') ? author.github : `https://github.com/${author.github}`; | ||
| return { | ||
| ...author, | ||
| github: githubUrl, | ||
| title: null != (_author_title = author.title) ? _author_title : `@${author.github}` | ||
| }; | ||
| }; | ||
| const getAuthorsFromFrontmatter = (frontmatter)=>{ | ||
| if (Array.isArray(frontmatter.authors)) return frontmatter.authors.filter(isBlogAvatarAuthor).map(normalizeGithub); | ||
| if (Array.isArray(frontmatter.author)) return frontmatter.author.filter(isBlogAvatarAuthor).map(normalizeGithub); | ||
| if (isBlogAvatarAuthor(frontmatter.author)) return [ | ||
| normalizeGithub(frontmatter.author) | ||
| ]; | ||
| return []; | ||
| }; | ||
| function BlogAuthors({ className }) { | ||
| var _page_frontmatter; | ||
| const { page } = usePage(); | ||
| const frontmatter = null != (_page_frontmatter = page.frontmatter) ? _page_frontmatter : {}; | ||
| const authors = useMemo(()=>getAuthorsFromFrontmatter(frontmatter), [ | ||
| frontmatter | ||
| ]); | ||
| return /*#__PURE__*/ jsx(BlogAvatarGroup, { | ||
| authors: authors, | ||
| className: getClassName(index_module.root, className) | ||
| }); | ||
| } | ||
| export { BlogAuthors }; |
| /** | ||
| * @license React | ||
| * react-dom-client.development.js | ||
| * | ||
| * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
| /** | ||
| * @license React | ||
| * react-dom-client.production.js | ||
| * | ||
| * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
| /** | ||
| * @license React | ||
| * react-is.development.js | ||
@@ -21,4 +41,24 @@ * | ||
| /** | ||
| * @license React | ||
| * scheduler.development.js | ||
| * | ||
| * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
| /** | ||
| * @license React | ||
| * scheduler.production.js | ||
| * | ||
| * Copyright (c) Meta Platforms, Inc. and affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
| /** */ | ||
| /** */ |
@@ -423,2 +423,3 @@ import './index.css'; | ||
| .rp-doc-layout__doc-container { margin: 0 auto; } | ||
| .rspress-doc { min-height: 60vh; } | ||
| ` | ||
@@ -425,0 +426,0 @@ }) : null |
@@ -22,3 +22,3 @@ import './index.css'; | ||
| const BackgroundStar = ({ top, left, pageX, pageY, size })=>{ | ||
| const ref = useRef(); | ||
| const ref = useRef(null); | ||
| const [transformX, setTransformX] = useState(0); | ||
@@ -249,3 +249,3 @@ const [transformY, setTransformY] = useState(0); | ||
| const useMouseMove = ()=>{ | ||
| const ref = useRef(); | ||
| const ref = useRef(null); | ||
| const [pageX, setPageX] = useState(null); | ||
@@ -252,0 +252,0 @@ const [pageY, setPageY] = useState(null); |
+2
-2
@@ -1,2 +0,2 @@ | ||
| import type { AnchorHTMLAttributes, ReactNode } from 'react'; | ||
| import type { AnchorHTMLAttributes, ReactElement, ReactNode } from 'react'; | ||
| export type LinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & { | ||
@@ -7,3 +7,3 @@ className: string; | ||
| }; | ||
| export type LinkComp = (props: LinkProps) => JSX.Element; | ||
| export type LinkComp = (props: LinkProps) => ReactElement; | ||
| /** | ||
@@ -10,0 +10,0 @@ * A backup link component, import { Link } from '@rspress/core/theme' to replace it |
| export declare const useCardAnimation: () => { | ||
| ref: import("react").MutableRefObject<HTMLElement | undefined>; | ||
| ref: import("react").RefObject<HTMLElement | null>; | ||
| isHovering: boolean; | ||
@@ -4,0 +4,0 @@ shine: string; |
| export declare const useLottieAnimation: (isHovering: boolean, lottieJsonData?: string) => { | ||
| ref: import("react").MutableRefObject<undefined>; | ||
| ref: import("react").RefObject<HTMLDivElement | null>; | ||
| }; |
+36
-30
| { | ||
| "name": "@rstack-dev/doc-ui", | ||
| "version": "1.13.3", | ||
| "version": "1.14.0", | ||
| "type": "module", | ||
| "types": "./dist/index.d.ts", | ||
| "license": "MIT", | ||
| "packageManager": "pnpm@10.33.0", | ||
| "packageManager": "pnpm@11.1.2", | ||
| "exports": { | ||
@@ -61,2 +61,6 @@ "./nav-icon": { | ||
| }, | ||
| "./blog-authors": { | ||
| "types": "./dist/blog-authors/index.d.ts", | ||
| "import": "./dist/blog-authors/index.js" | ||
| }, | ||
| "./blog-list": { | ||
@@ -85,46 +89,48 @@ "types": "./dist/blog-list/index.d.ts", | ||
| "build:watch": "rslib -w", | ||
| "lint": "biome check", | ||
| "lint:fix": "biome check --write --unsafe", | ||
| "lint": "rslint && prettier -c .", | ||
| "lint:write": "rslint --fix && prettier -w .", | ||
| "lint:fix": "pnpm lint:write", | ||
| "bump": "npx bumpp", | ||
| "chromatic": "chromatic" | ||
| }, | ||
| "nano-staged": { | ||
| "*.{md,mdx,json,css,less,scss}": "prettier --write", | ||
| "*.{js,jsx,ts,tsx,mjs,cjs}": [ | ||
| "biome check --write --formatter-enabled=false --linter-enabled=true --no-errors-on-unmatched", | ||
| "prettier --write" | ||
| ] | ||
| }, | ||
| "simple-git-hooks": { | ||
| "pre-commit": "npx nano-staged" | ||
| "pre-commit": "pnpm run lint:write" | ||
| }, | ||
| "devDependencies": { | ||
| "@biomejs/biome": "1.9.4", | ||
| "@rsbuild/plugin-react": "1.4.6", | ||
| "@rsbuild/plugin-sass": "1.5.1", | ||
| "@rslib/core": "^0.21.2", | ||
| "@rsbuild/plugin-react": "2.0.0", | ||
| "@rsbuild/plugin-sass": "1.5.2", | ||
| "@rslib/core": "^0.21.5", | ||
| "@rslint/core": "^0.5.3", | ||
| "@rspress/core": "^2.0.11", | ||
| "@rstack-dev/doc-ui": "workspace:*", | ||
| "@storybook/addon-themes": "^10.3.5", | ||
| "@storybook/react": "^10.3.5", | ||
| "@storybook/addon-themes": "^10.4.0", | ||
| "@storybook/react": "^10.4.0", | ||
| "@storybook/test": "9.0.0-alpha.2", | ||
| "@types/node": "~24.12.2", | ||
| "@types/react": "^18.3.28", | ||
| "@types/react-dom": "^18.3.7", | ||
| "antd": "^6.3.6", | ||
| "chromatic": "^16.3.0", | ||
| "@types/node": "~24.12.4", | ||
| "@types/react": "^19.2.14", | ||
| "@types/react-dom": "^19.2.3", | ||
| "antd": "^6.4.2", | ||
| "chromatic": "^16.10.1", | ||
| "execa": "9.6.1", | ||
| "fs-extra": "11.3.4", | ||
| "fs-extra": "11.3.5", | ||
| "lottie-web": "5.13.0", | ||
| "nano-staged": "^0.9.0", | ||
| "prettier": "~3.8.3", | ||
| "react": "^18.3.1", | ||
| "react-dom": "^18.3.1", | ||
| "react": "^19.2.6", | ||
| "react-dom": "^19.2.6", | ||
| "rimraf": "~6.1.3", | ||
| "semver": "7.7.4", | ||
| "semver": "7.8.0", | ||
| "simple-git-hooks": "^2.13.1", | ||
| "storybook": "^10.3.5", | ||
| "storybook": "^10.4.0", | ||
| "storybook-addon-rslib": "^3.3.3", | ||
| "storybook-react-rsbuild": "^3.3.3", | ||
| "typescript": "~5.9.3" | ||
| "typescript": "~6.0.3" | ||
| }, | ||
| "peerDependencies": { | ||
| "@rspress/core": ">=2.0.0" | ||
| }, | ||
| "peerDependenciesMeta": { | ||
| "@rspress/core": { | ||
| "optional": true | ||
| } | ||
| }, | ||
| "publishConfig": { | ||
@@ -131,0 +137,0 @@ "access": "public", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
3452963
95.79%70
4.48%67076
63.87%97
-62.69%1
Infinity%