@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.
@@ -918,11 +918,11 @@
918
918
  "packageName": "@rlx-widgets/resizable",
919
919
  "slug": "resizable",
920
920
  "category": "widget",
921
- "sourceCode": "\"use client\";\n\nimport * as React from \"react\";\nimport { GripVerticalIcon } from \"lucide-react\";\nimport * as ResizablePrimitive from \"react-resizable-panels\";\nimport { cn } from \"@rlx-widgets/base\";\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {\n return (\n <ResizablePrimitive.PanelGroup\n data-slot=\"resizable-panel-group\"\n className={cn(\n \"flex h-full w-full data-[panel-group-direction=vertical]:flex-col\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction ResizablePanel({\n ...props\n}: React.ComponentProps<typeof ResizablePrimitive.Panel>) {\n return <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />;\n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\n withHandle?: boolean;\n}) {\n return (\n <ResizablePrimitive.PanelResizeHandle\n data-slot=\"resizable-handle\"\n className={cn(\n \"bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90\",\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 </ResizablePrimitive.PanelResizeHandle>\n );\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle };\n",
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=\"max-w-md rounded-lg border md:min-w-[450px]\"\n >\n <ResizablePanel defaultSize={50}>\n <div className=\"flex h-[200px] items-center justify-center p-6\">\n <span className=\"font-semibold\">One</span>\n </div>\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 p-6\">\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 p-6\">\n <span className=\"font-semibold\">Three</span>\n </div>\n </ResizablePanel>\n </ResizablePanelGroup>\n </ResizablePanel>\n </ResizablePanelGroup>\n );\n};\n"
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>{highlightedCode ?? <p>Loading...</p>}</div>\n <span\n className={cn(\n \"absolute top-[8px] right-[16px]\",\n \"text-xs\",\n onHover && \"hidden\"\n )}\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 >\n <Copy /> {copied ? \"Copied!\" : \"Copy\"}\n </Button>\n </div>\n </div>\n );\n};\n",
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-21T06:29:06.871Z"
1442
+ "extractedAt": "2025-11-24T06:31:33.379Z"
1443
1443
  }
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rlx-ui/mcp",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "MCP (Model Context Protocol) Server for RLX UI components",
5
5
  "publishConfig": {
6
6
  "access": "public"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rlx-ui/mcp",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "MCP (Model Context Protocol) Server for RLX UI components",
5
5
  "publishConfig": {
6
6
  "access": "public"