{"_id":"@albertluo213/cube-chart-editor","_rev":"8-5a79bf1a904164ce2efee8ce7ebde990","name":"@albertluo213/cube-chart-editor","dist-tags":{"latest":"1.0.4-antd-4.20"},"versions":{"1.0.0-alpha":{"name":"@albertluo213/cube-chart-editor","version":"1.0.0-alpha","keywords":["cube","dashboard","chart","editor","designer","vchart"],"author":"","license":"MIT","_id":"@albertluo213/cube-chart-editor@1.0.0-alpha","maintainers":[{"name":"albertluo213","email":"1204648923@qq.com"}],"dist":{"shasum":"543fe58399e3d79e6eb15abe716a20c781693620","tarball":"https://registry.npmjs.org/@albertluo213/cube-chart-editor/-/cube-chart-editor-1.0.0-alpha.tgz","fileCount":10,"integrity":"sha512-X5LprqHtJMNut6FXd5jNfx0i+f0XVv2IXC7V4N6K8fjpEnReY40p4WOoHupuhcLY5b7wHUA4pUat5c+6lbxd8w==","signatures":[{"sig":"MEYCIQCRFZHTyr4LW2DuItpoU/oxJhF+aUWSXmom9aZGhPP2pgIhAO5z3X7hIt0GBS+A949L3nPrlUJ2sDNZ+AoNWeyq54OB","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6487472},"main":"dist/index.cjs.js","module":"dist/index.esm.js","exports":{".":{"import":"./dist/index.esm.js","require":"./dist/index.cjs.js"},"./react":{"import":"./react/index.js"}},"gitHead":"d830f4d0fbfc6751d6102936a050605152dd1949","scripts":{"dev":"vite","build":"vite build","prepublishOnly":"npm run build"},"_npmUser":{"name":"albertluo213","email":"1204648923@qq.com"},"_npmVersion":"10.9.3","description":"Cube Dashboard Chart Editor SDK - 图表编辑器 SDK","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.8","@vitejs/plugin-react":"^4.2.1"},"peerDependencies":{"antd":">=5.0.0","axios":">=1.6.0","react":">=18.0.0","react-dom":">=18.0.0","@visactor/vchart":">=1.11.0","react-router-dom":">=6.0.0","@visactor/react-vchart":">=1.11.0"},"_npmOperationalInternal":{"tmp":"tmp/cube-chart-editor_1.0.0-alpha_1761912184243_0.7362925236524747","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@albertluo213/cube-chart-editor","version":"1.0.1","keywords":["cube","dashboard","chart","editor","designer","vchart"],"author":"","license":"MIT","_id":"@albertluo213/cube-chart-editor@1.0.1","maintainers":[{"name":"albertluo213","email":"1204648923@qq.com"}],"dist":{"shasum":"afe78731225cb3b8416d15363dc6f4bc2d7b0293","tarball":"https://registry.npmjs.org/@albertluo213/cube-chart-editor/-/cube-chart-editor-1.0.1.tgz","fileCount":10,"integrity":"sha512-50oZ8YpGu+A4QmJ2VCUa3NyWKcfyJLi/et9PEtrH7Uops0C3vwIBUQjm8E5M2O5g5qghDHt/sI8tLBwIMndNcw==","signatures":[{"sig":"MEUCICpBy9/DgIzyq5DNY0TFFXdXnJ+i7qhLvm9ILXf/RdqtAiEAxnSsXj/eciqKGny6IPtM9OHa2KllMkGE30U0ZHOzrKc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6487606},"main":"dist/index.cjs.js","module":"dist/index.esm.js","exports":{".":{"import":"./dist/index.esm.js","require":"./dist/index.cjs.js"},"./react":{"import":"./react/index.js"},"./dist/*":"./dist/*"},"gitHead":"d830f4d0fbfc6751d6102936a050605152dd1949","scripts":{"dev":"vite","build":"vite build","prepublishOnly":"npm run build"},"_npmUser":{"name":"albertluo213","email":"1204648923@qq.com"},"_npmVersion":"10.9.3","description":"Cube Dashboard Chart Editor SDK - 图表编辑器 SDK","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.8","@vitejs/plugin-react":"^4.2.1"},"peerDependencies":{"antd":">=5.0.0","axios":">=1.6.0","react":">=18.0.0","react-dom":">=18.0.0","@visactor/vchart":">=1.11.0","react-router-dom":">=6.0.0","@visactor/react-vchart":">=1.11.0"},"_npmOperationalInternal":{"tmp":"tmp/cube-chart-editor_1.0.1_1761913168885_0.05964885929166153","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@albertluo213/cube-chart-editor","version":"1.0.2","keywords":["cube","dashboard","chart","editor","designer","vchart"],"author":"","license":"MIT","_id":"@albertluo213/cube-chart-editor@1.0.2","maintainers":[{"name":"albertluo213","email":"1204648923@qq.com"}],"dist":{"shasum":"0ed405c0f9d465bb7e4d1b3adfe1577e21956810","tarball":"https://registry.npmjs.org/@albertluo213/cube-chart-editor/-/cube-chart-editor-1.0.2.tgz","fileCount":8,"integrity":"sha512-1+zSvM39W5ze/4+aHGLhz245bfATmSxAJjHujS98HgUdt/zcPtbgQUOgk9WVyKlfgFSKcp+9twD0zc0xScNvrw==","signatures":[{"sig":"MEUCIQDSeoJaNtGbNIMQWKAWH+ZGw3S9V+3QnBHguN7NOK7Z3gIgX3fQ5pdspZdcegSMO8bEvGVmTIRBP0N6K1jvBlxDUSo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6837611},"main":"dist/index.cjs.js","module":"dist/index.esm.js","exports":{".":{"import":"./dist/index.esm.js","require":"./dist/index.cjs.js"},"./react":{"import":"./react/index.js"},"./dist/*":"./dist/*","./style.css":"./dist/style.css"},"gitHead":"a2080617557a466d8e164325214ea143c2b44c07","scripts":{"dev":"vite","build":"vite build","prepublishOnly":"npm run build"},"_npmUser":{"name":"albertluo213","email":"1204648923@qq.com"},"_npmVersion":"10.9.3","description":"Cube Dashboard Chart Editor SDK - 图表编辑器 SDK","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.8","@vitejs/plugin-react":"^4.2.1"},"peerDependencies":{"antd":">=5.0.0","axios":">=1.6.0","react":">=18.0.0","react-dom":">=18.0.0","@visactor/vchart":">=1.11.0","react-router-dom":">=6.0.0","@visactor/react-vchart":">=1.11.0"},"_npmOperationalInternal":{"tmp":"tmp/cube-chart-editor_1.0.2_1764042321989_0.2358727753263139","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@albertluo213/cube-chart-editor","version":"1.0.3","keywords":["cube","dashboard","chart","editor","designer","vchart"],"author":"","license":"MIT","_id":"@albertluo213/cube-chart-editor@1.0.3","maintainers":[{"name":"albertluo213","email":"1204648923@qq.com"}],"dist":{"shasum":"41b9d59831fb361000a5d9e318f2118097c40dbd","tarball":"https://registry.npmjs.org/@albertluo213/cube-chart-editor/-/cube-chart-editor-1.0.3.tgz","fileCount":8,"integrity":"sha512-285PuVlGeDQ3wE2g3OgScLveu01OWhjJWnNjdsim/kPpWfeeWP5xsBNq7S9alyZIGKu6TbW64LvVxSd24ye4Tg==","signatures":[{"sig":"MEUCIQCO78BJFYnk34V45v0Gl/z/2Qwlss3KcrlXVM41/vMzpAIgBVbpQOPCGpkuPpZULJjGAnmKyjHJTNacD9xtfhkpjPc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6837609},"main":"dist/index.cjs.js","module":"dist/index.esm.js","exports":{".":{"import":"./dist/index.esm.js","require":"./dist/index.cjs.js"},"./react":{"import":"./react/index.js"},"./dist/*":"./dist/*","./style.css":"./dist/style.css"},"gitHead":"a2080617557a466d8e164325214ea143c2b44c07","scripts":{"dev":"vite","build":"vite build","prepublishOnly":"npm run build"},"_npmUser":{"name":"albertluo213","email":"1204648923@qq.com"},"_npmVersion":"10.9.3","description":"Cube Dashboard Chart Editor SDK - 图表编辑器 SDK","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.8","@vitejs/plugin-react":"^4.2.1"},"peerDependencies":{"antd":">=5.0.0","axios":">=1.6.0","react":">=18.0.0","react-dom":">=18.0.0","@visactor/vchart":">=1.11.0","react-router-dom":">=6.0.0","@visactor/react-vchart":">=1.11.0"},"_npmOperationalInternal":{"tmp":"tmp/cube-chart-editor_1.0.3_1764042893960_0.37504065744791215","host":"s3://npm-registry-packages-npm-production"}},"1.0.4-antd-4.20":{"name":"@albertluo213/cube-chart-editor","version":"1.0.4-antd-4.20","description":"Cube Dashboard Chart Editor SDK - 图表编辑器 SDK","main":"dist/index.cjs.js","module":"dist/index.esm.js","exports":{".":{"import":"./dist/index.esm.js","require":"./dist/index.cjs.js"},"./style.css":"./dist/style.css","./react":{"import":"./react/index.js"},"./dist/*":"./dist/*"},"scripts":{"dev":"vite","build":"vite build","prepublishOnly":"npm run build"},"peerDependencies":{"react":">=18.0.0","react-dom":">=18.0.0","antd":"^4.20.0","@visactor/vchart":">=1.11.0","@visactor/react-vchart":">=1.11.0","axios":">=1.6.0","react-router-dom":">=6.0.0"},"devDependencies":{"@vitejs/plugin-react":"^4.2.1","vite":"^5.0.8"},"keywords":["cube","dashboard","chart","editor","designer","vchart"],"author":"","license":"MIT","_id":"@albertluo213/cube-chart-editor@1.0.4-antd-4.20","gitHead":"17385cc252bcec94a612fb5fb522c3cfa23fe905","_nodeVersion":"22.20.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-GsN/FWqtqAkebJ6rlJS2dFv0GCOgI6kxjwgZehzXNd8ovMFTt5CJ0H9L7K5cXtfEGibG4RaZKnvxSRpA3cx9ww==","shasum":"141bc02a2e4a4a3f9a0cdf9a6b9e2be3f6f5c6f8","tarball":"https://registry.npmjs.org/@albertluo213/cube-chart-editor/-/cube-chart-editor-1.0.4-antd-4.20.tgz","fileCount":8,"unpackedSize":6837619,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAVo4iPfLQfnpqYWSvkAKspoSo3Y/4GHG7jmiSvsur7WAiEAnGiL8OPRJfYfwm4PeWA/aEP7q06jrzIP3tmmbCIl6As="}]},"_npmUser":{"name":"albertluo213","email":"1204648923@qq.com"},"directories":{},"maintainers":[{"name":"albertluo213","email":"1204648923@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cube-chart-editor_1.0.4-antd-4.20_1764144426053_0.06792661327674021"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-31T12:03:04.178Z","modified":"2025-11-26T08:07:06.506Z","1.0.5":"2025-10-31T11:24:53.955Z","1.0.0-alpha":"2025-10-31T12:03:04.550Z","1.0.1":"2025-10-31T12:19:29.174Z","1.0.2":"2025-11-25T03:45:22.230Z","1.0.3":"2025-11-25T03:54:54.299Z","1.0.4-antd-4.20":"2025-11-26T08:07:06.300Z"},"license":"MIT","keywords":["cube","dashboard","chart","editor","designer","vchart"],"description":"Cube Dashboard Chart Editor SDK - 图表编辑器 SDK","maintainers":[{"name":"albertluo213","email":"1204648923@qq.com"}],"readme":"# Cube Chart Editor SDK\r\n\r\nCube Chart Editor SDK 是一个功能强大的图表设计器组件，允许用户通过可视化界面创建和编辑 Cube Dashboard 图表。\r\n\r\n## 特性\r\n\r\n- 🎨 **可视化编辑**：直观的拖拽式界面，轻松配置图表维度、指标和样式。\r\n- 📊 **丰富图表库**：内置 15+ 种图表类型，满足各种可视化需求。\r\n- ⚡ **智能辅助**：支持智能推荐图表类型和配置。\r\n- 🔌 **简单集成**：提供 React 组件 API，支持嵌入到任何 React 应用中。\r\n- 🛠 **独立配置**：支持通过 Props 传递 API 配置，不依赖全局变量。\r\n\r\n## 安装\r\n\r\n```bash\r\nnpm install @albertluo213/cube-chart-editor\r\n# 或\r\nyarn add @albertluo213/cube-chart-editor\r\n```\r\n\r\n## 快速开始\r\n\r\n```jsx\r\nimport React from \"react\";\r\nimport { ChartEditorSDK } from \"@albertluo213/cube-chart-editor\";\r\n\r\nconst App = () => {\r\n  const handleSave = (chartConfig) => {\r\n    console.log(\"Chart saved:\", chartConfig);\r\n    // 保存配置到你的后端\r\n  };\r\n\r\n  const handleCancel = () => {\r\n    console.log(\"Edit cancelled\");\r\n  };\r\n\r\n  return (\r\n    <div style={{ width: \"100%\", height: \"100vh\" }}>\r\n      <ChartEditorSDK\r\n        chartId=\"new-chart\" // 或现有图表 ID\r\n        apiConfig={{\r\n          baseURL: \"http://your-api-host:8000\", // Cube Transform API 地址\r\n          userId: \"user-123\", // 当前用户 ID\r\n          headers: {\r\n            Authorization: \"Bearer your-token\", // 可选：自定义请求头\r\n          },\r\n        }}\r\n        onSave={handleSave}\r\n        onCancel={handleCancel}\r\n      />\r\n    </div>\r\n  );\r\n};\r\n\r\nexport default App;\r\n```\r\n\r\n## API 参考\r\n\r\n### ChartEditorSDK\r\n\r\n| 属性                | 类型                       | 必填 | 默认值           | 说明                             |\r\n| ------------------- | -------------------------- | ---- | ---------------- | -------------------------------- |\r\n| `chartId`           | `string`                   | 否   | -                | 图表 ID（编辑现有图表时提供）    |\r\n| `config`            | `object`                   | 否   | -                | 初始图表配置（创建新图表时提供） |\r\n| `apiConfig`         | `object`                   | 是   | `{}`             | API 配置对象                     |\r\n| `apiConfig.baseURL` | `string`                   | 是   | -                | API 基础 URL                     |\r\n| `apiConfig.userId`  | `string`                   | 否   | `'default_user'` | 用户 ID                          |\r\n| `apiConfig.headers` | `object`                   | 否   | `{}`             | 自定义请求头                     |\r\n| `onSave`            | `(config: object) => void` | 是   | -                | 保存回调，参数为图表配置对象     |\r\n| `onCancel`          | `() => void`               | 是   | -                | 取消回调                         |\r\n| `style`             | `CSSProperties`            | 否   | -                | 容器样式                         |\r\n| `className`         | `string`                   | 否   | -                | 容器类名                         |\r\n\r\n## 开发与构建\r\n\r\n### 环境要求\r\n\r\n- Node.js >= 16\r\n- npm 或 yarn\r\n\r\n### 构建步骤\r\n\r\n1.  **安装依赖**\r\n\r\n    ```bash\r\n    npm install\r\n    ```\r\n\r\n2.  **开发模式**\r\n\r\n    ```bash\r\n    npm run dev\r\n    ```\r\n\r\n3.  **构建生产包**\r\n\r\n    ```bash\r\n    npm run build\r\n    ```\r\n\r\n    构建产物将输出到 `dist` 目录：\r\n\r\n    - `dist/index.esm.js` (ES Module)\r\n    - `dist/index.cjs.js` (CommonJS)\r\n\r\n## 依赖说明\r\n\r\n本 SDK 依赖于主项目 (`../../src`) 中的组件。在构建时，Vite 会自动解析并打包这些依赖。确保你的开发环境能够访问到主项目的源码目录。\r\n","readmeFilename":"README.md"}