mirror of
https://github.com/smartxworks/sunmao-ui.git
synced 2025-04-06 21:40:23 +08:00
remove editor from arco-lib's dependencies
This commit is contained in:
parent
208737c98f
commit
3d1b1549c5
@ -1,13 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>SunmaoUI Arco Examples</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/examples/index.tsx"></script>
|
||||
</body>
|
||||
</html>
|
@ -4,15 +4,10 @@
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>SunmaoUI Arco Editor</title>
|
||||
<style>
|
||||
#root {
|
||||
height: 100vh;
|
||||
}
|
||||
</style>
|
||||
<title>SunmaoUI Arco Examples</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root" style='height: 100vh'></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/examples/index.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -40,7 +40,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sunmao-ui/chakra-ui-lib": "^0.2.1",
|
||||
"@sunmao-ui/editor": "^0.4.1",
|
||||
"@types/lodash": "^4.14.170",
|
||||
"@types/lodash-es": "^4.17.5",
|
||||
"@types/react": "^17.0.0",
|
||||
@ -70,8 +69,7 @@
|
||||
]
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@sunmao-ui/core": "^0.4.0",
|
||||
"@sunmao-ui/runtime": "^0.4.0",
|
||||
"@sunmao-ui/editor": "^0.4.0"
|
||||
"@sunmao-ui/core": "^0.4.1",
|
||||
"@sunmao-ui/runtime": "^0.4.1"
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +0,0 @@
|
||||
#root,
|
||||
#root > .App {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
import ReactDom from "react-dom";
|
||||
import { initSunmaoUIEditor } from "@sunmao-ui/editor";
|
||||
import { sunmaoChakraUILib } from "@sunmao-ui/chakra-ui-lib";
|
||||
import { ArcoDesignLib } from ".";
|
||||
import { StrictMode } from "react";
|
||||
import "@sunmao-ui/editor/dist/esm/index.css";
|
||||
|
||||
const { Editor } = initSunmaoUIEditor({
|
||||
libs: [ArcoDesignLib, sunmaoChakraUILib],
|
||||
});
|
||||
|
||||
ReactDom.render(
|
||||
<StrictMode>
|
||||
<Editor />
|
||||
</StrictMode>,
|
||||
document.getElementById("root")
|
||||
);
|
@ -1,6 +1,6 @@
|
||||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import { resolve } from "path";
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import { resolve } from 'path';
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
@ -8,8 +8,7 @@ export default defineConfig({
|
||||
build: {
|
||||
rollupOptions: {
|
||||
input: {
|
||||
index: resolve(__dirname, "index.html"),
|
||||
examples: resolve(__dirname, "examples.html"),
|
||||
index: resolve(__dirname, 'index.html'),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -63,8 +63,8 @@
|
||||
"@chakra-ui/react": "^1.7.1",
|
||||
"@emotion/styled": "^11.6.0",
|
||||
"@sinclair/typebox": "^0.21.2",
|
||||
"@sunmao-ui/core": "^0.4.0",
|
||||
"@sunmao-ui/runtime": "^0.4.0",
|
||||
"@sunmao-ui/core": "^0.4.1",
|
||||
"@sunmao-ui/runtime": "^0.4.1",
|
||||
"@emotion/css": "^11.7.1",
|
||||
"lodash-es": "^4.17.21",
|
||||
"react": "^17.0.0",
|
||||
|
@ -89,8 +89,8 @@
|
||||
"peerDependencies": {
|
||||
"@emotion/react": "^11.1.1",
|
||||
"@emotion/css": "^11.7.1",
|
||||
"@sunmao-ui/core": "^0.4.0",
|
||||
"@sunmao-ui/runtime": "^0.4.0",
|
||||
"@sunmao-ui/core": "^0.4.1",
|
||||
"@sunmao-ui/runtime": "^0.4.1",
|
||||
"@sunmao-ui/chakra-ui-lib": "^0.2.0",
|
||||
"@sunmao-ui/arco-lib": "^0.0.7",
|
||||
"@chakra-ui/icons": "^1.0.15",
|
||||
|
@ -2,6 +2,7 @@ import { StrictMode } from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { Registry } from '@sunmao-ui/runtime';
|
||||
import { sunmaoChakraUILib } from '@sunmao-ui/chakra-ui-lib';
|
||||
import { ArcoDesignLib } from '@sunmao-ui/arco-lib';
|
||||
import { initSunmaoUIEditor } from './init';
|
||||
import { LocalStorageManager } from './LocalStorageManager';
|
||||
|
||||
@ -14,7 +15,7 @@ type Options = Partial<{
|
||||
|
||||
const lsManager = new LocalStorageManager();
|
||||
const { Editor, registry } = initSunmaoUIEditor({
|
||||
libs: [sunmaoChakraUILib],
|
||||
libs: [sunmaoChakraUILib, ArcoDesignLib],
|
||||
storageHandler: {
|
||||
onSaveApp(app) {
|
||||
lsManager.saveAppInLS(app);
|
||||
|
@ -76,7 +76,7 @@
|
||||
"peerDependencies": {
|
||||
"@emotion/css": "^11.7.1",
|
||||
"@sinclair/typebox": "^0.21.2",
|
||||
"@sunmao-ui/core": "^0.4.0",
|
||||
"@sunmao-ui/core": "^0.4.1",
|
||||
"immer": "^9.0.12",
|
||||
"lodash-es": "^4.17.21",
|
||||
"react": "^17.0.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user