@rlx-ui/mcp 0.0.4 → 0.0.6
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.
- package/dist/data/registry.json +5 -5
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/data/registry.json
CHANGED
|
@@ -918,11 +918,11 @@
|
|
|
918
918
|
"packageName": "@rlx-widgets/resizable",
|
|
919
919
|
"slug": "resizable",
|
|
920
920
|
"category": "widget",
|
|
921
|
-
"sourceCode": "\"use client\";\n\nimport
|
|
921
|
+
"sourceCode": "\"use client\";\n\nimport { cn } from \"@rlx-widgets/base\";\nimport { GripVerticalIcon } from \"lucide-react\";\nimport {\n FlexyPanel,\n FlexyPanelGroup,\n FlexyPanelHandle,\n type FlexyPanelProps,\n type FlexyPanelGroupProps,\n type FlexyPanelHandleProps,\n} from \"react-flexy-panels\";\n\nfunction ResizablePanelGroup({ ...props }: FlexyPanelGroupProps) {\n return <FlexyPanelGroup {...props} />;\n}\n\nfunction ResizablePanel({ ...props }: FlexyPanelProps) {\n return <FlexyPanel {...props} />;\n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: FlexyPanelHandleProps & {\n withHandle?: boolean;\n}) {\n return (\n <FlexyPanelHandle\n className={cn(\n \"cursor-pointer relative flex items-center justify-center after:absolute after:bg-border\",\n \"data-[direction=vertical]:w-full data-[direction=vertical]:after:left-0 data-[direction=vertical]:after:top-[calc(50%-0.5px)] data-[direction=vertical]:after:h-px data-[direction=vertical]:after:w-full data-[direction=vertical]:[&>div]:rotate-90 data-[direction=vertical]:cursor-row-resize\",\n \"data-[direction=horizontal]:h-full data-[direction=horizontal]:after:inset-y-0 data-[direction=horizontal]:after:left-[calc(50%-0.5px)] data-[direction=horizontal]:after:w-px data-[direction=horizontal]:cursor-col-resize\",\n className\n )}\n {...props}\n >\n {withHandle && (\n <div className=\"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border\">\n <GripVerticalIcon className=\"size-2.5\" />\n </div>\n )}\n </FlexyPanelHandle>\n );\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle };\n",
|
|
922
922
|
"demos": [
|
|
923
923
|
{
|
|
924
924
|
"name": "default",
|
|
925
|
-
"code": "import {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@rlx-widgets/resizable\";\n\nexport const Preview = () => {\n return (\n <ResizablePanelGroup\n direction=\"horizontal\"\n className=\"
|
|
925
|
+
"code": "import {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from \"@rlx-widgets/resizable\";\n\nexport const Preview = () => {\n return (\n <ResizablePanelGroup\n direction=\"horizontal\"\n className=\"rounded-lg border\"\n >\n <ResizablePanel defaultSize={25}>\n <div className=\"flex h-full items-center justify-center\">\n <span className=\"font-semibold\">One</span>\n </div>\n </ResizablePanel>\n <ResizableHandle />\n <ResizablePanel defaultSize={25}>\n <ResizablePanelGroup direction=\"vertical\">\n <ResizablePanel defaultSize={25}>\n <div className=\"flex h-full items-center justify-center\">\n <span className=\"font-semibold\">Two</span>\n </div>\n </ResizablePanel>\n <ResizableHandle />\n <ResizablePanel defaultSize={75}>\n <div className=\"flex h-full items-center justify-center\">\n <span className=\"font-semibold\">Three</span>\n </div>\n </ResizablePanel>\n </ResizablePanelGroup>\n </ResizablePanel>\n <ResizableHandle />\n <ResizablePanel defaultSize={50}>\n <ResizablePanelGroup direction=\"vertical\">\n <ResizablePanel defaultSize={25}>\n <div className=\"flex h-full items-center justify-center\">\n <span className=\"font-semibold\">Two</span>\n </div>\n </ResizablePanel>\n <ResizableHandle />\n <ResizablePanel defaultSize={75}>\n <div className=\"flex h-full items-center justify-center\">\n <span className=\"font-semibold\">Three</span>\n </div>\n </ResizablePanel>\n </ResizablePanelGroup>\n </ResizablePanel>\n </ResizablePanelGroup>\n );\n};\n"
|
|
926
926
|
},
|
|
927
927
|
{
|
|
928
928
|
"name": "handle",
|
|
@@ -1295,7 +1295,7 @@
|
|
|
1295
1295
|
"packageName": "@rlx-components/shiki-code-block",
|
|
1296
1296
|
"slug": "shiki-code-block",
|
|
1297
1297
|
"category": "component",
|
|
1298
|
-
"sourceCode": "\"use client\";\n\nimport { JSX, useLayoutEffect, useState } from \"react\";\nimport { highlight } from \"./utils\";\nimport { Button } from \"@rlx-widgets/button\";\nimport { cn } from \"@rlx-widgets/base\";\nimport { BundledLanguage } from \"shiki/bundle/web\";\nimport { Copy } from \"lucide-react\";\n\nexport const ShikiCodeBlock = ({\n code,\n lang,\n className,\n}: {\n code: string;\n lang: BundledLanguage;\n className?: string;\n}) => {\n const [onHover, setOnHover] = useState(false);\n const [highlightedCode, setHighlightedCode] = useState<JSX.Element>();\n const [copied, setCopied] = useState(false);\n\n const handleCopy = async () => {\n await navigator.clipboard.writeText(code);\n setCopied(true);\n setTimeout(() => setCopied(false), 1500);\n };\n\n useLayoutEffect(() => {\n void highlight({\n code,\n lang,\n className: cn(\"h-[400px]\", className),\n }).then(setHighlightedCode);\n }, [className, code, lang]);\n\n return (\n <div\n onMouseEnter={() => setOnHover(true)}\n onMouseLeave={() => setOnHover(false)}\n >\n <div className=\"relative\">\n <div
|
|
1298
|
+
"sourceCode": "\"use client\";\n\nimport { JSX, useLayoutEffect, useState } from \"react\";\nimport { highlight } from \"./utils\";\nimport { Button } from \"@rlx-widgets/button\";\nimport { cn } from \"@rlx-widgets/base\";\nimport { BundledLanguage } from \"shiki/bundle/web\";\nimport { Copy } from \"lucide-react\";\n\nexport const ShikiCodeBlock = ({\n code,\n lang,\n className,\n}: {\n code: string;\n lang: BundledLanguage;\n className?: string;\n}) => {\n const [onHover, setOnHover] = useState(false);\n const [highlightedCode, setHighlightedCode] = useState<JSX.Element>();\n const [copied, setCopied] = useState(false);\n\n const handleCopy = async () => {\n await navigator.clipboard.writeText(code);\n setCopied(true);\n setTimeout(() => setCopied(false), 1500);\n };\n\n useLayoutEffect(() => {\n void highlight({\n code,\n lang,\n className: cn(\"h-[400px]\", className),\n }).then(setHighlightedCode);\n }, [className, code, lang]);\n\n return (\n <div\n onMouseEnter={() => setOnHover(true)}\n onMouseLeave={() => setOnHover(false)}\n className={className}\n data-slot=\"shiki-code-block-root\"\n >\n <div className=\"relative\" data-slot=\"shiki-code-block-container\">\n <div data-slot=\"shiki-code-block-content\">\n {highlightedCode ?? <p>Loading...</p>}\n </div>\n <span\n className={cn(\n \"absolute top-[8px] right-[16px]\",\n \"text-xs\",\n onHover && \"hidden\"\n )}\n data-slot=\"shiki-code-block-lang\"\n >\n {lang}\n </span>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={handleCopy}\n className={cn(\n \"absolute top-[8px] right-[16px]\",\n \"cursor-pointer\",\n !onHover && \"hidden\"\n )}\n data-slot=\"shiki-code-block-copy-button\"\n >\n <Copy /> {copied ? \"Copied!\" : \"Copy\"}\n </Button>\n </div>\n </div>\n );\n};\n",
|
|
1299
1299
|
"demos": [
|
|
1300
1300
|
{
|
|
1301
1301
|
"name": "default",
|
|
@@ -1303,7 +1303,7 @@
|
|
|
1303
1303
|
}
|
|
1304
1304
|
],
|
|
1305
1305
|
"sourceFiles": {
|
|
1306
|
-
"utils/highlight.tsx": "import { codeToHast } from \"shiki/bundle/web\";\nimport { Fragment } from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport { toJsxRuntime } from \"hast-util-to-jsx-runtime\";\nimport type { JSX } from \"react\";\nimport type { BundledLanguage } from \"shiki/bundle/web\";\nimport { cn } from \"@rlx-widgets/base\";\n\nexport async function highlight({\n code,\n lang,\n className,\n}: {\n code: string;\n lang: BundledLanguage;\n className?: string;\n}) {\n const out = await codeToHast(code, {\n lang,\n theme: \"ayu-dark\",\n });\n\n return toJsxRuntime(out, {\n Fragment,\n jsx,\n jsxs,\n components: {\n pre: (props) => (\n <pre\n {...props}\n className={cn(\"rounded p-4 overflow-x-auto\", className)}\n />\n ),\n },\n }) as JSX.Element;\n}\n"
|
|
1306
|
+
"utils/highlight.tsx": "import { codeToHast } from \"shiki/bundle/web\";\nimport { Fragment } from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport { toJsxRuntime } from \"hast-util-to-jsx-runtime\";\nimport type { JSX } from \"react\";\nimport type { BundledLanguage } from \"shiki/bundle/web\";\nimport { cn } from \"@rlx-widgets/base\";\n\nexport async function highlight({\n code,\n lang,\n className,\n}: {\n code: string;\n lang: BundledLanguage;\n className?: string;\n}) {\n const out = await codeToHast(code, {\n lang,\n theme: \"ayu-dark\",\n });\n\n return toJsxRuntime(out, {\n Fragment,\n jsx,\n jsxs,\n components: {\n pre: (props) => (\n <pre\n {...props}\n className={cn(\"rounded p-4 overflow-x-auto\", className)}\n data-slot=\"shiki-code-block-code\"\n />\n ),\n },\n }) as JSX.Element;\n}\n"
|
|
1307
1307
|
}
|
|
1308
1308
|
},
|
|
1309
1309
|
{
|
|
@@ -1439,5 +1439,5 @@
|
|
|
1439
1439
|
"sourceCode": "export const isValidDate = (date: Date) => {\n return !Number.isNaN(date.getTime());\n};\n\nexport default isValidDate;\n"
|
|
1440
1440
|
}
|
|
1441
1441
|
],
|
|
1442
|
-
"extractedAt": "2025-11-
|
|
1442
|
+
"extractedAt": "2025-11-24T06:31:33.379Z"
|
|
1443
1443
|
}
|
package/dist/package.json
CHANGED