diff --git a/.eslintrc.js b/.eslintrc.js
index 72bc8eacff..6f62557860 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -93,19 +93,19 @@ module.exports = {
},
],
// eslint-plugin-unused-imports
- '@typescript-eslint/no-unused-vars': 'off',
- 'unused-imports/no-unused-imports': 'error',
- 'prefer-regex-literals': 'off',
+ '@typescript-eslint/consistent-type-assertions': 'off',
'@typescript-eslint/default-param-last': 'off',
- 'grouped-accessor-pairs': 'off',
'@typescript-eslint/member-ordering': 'error',
'@typescript-eslint/no-explicit-any': 'warn',
- 'no-unsafe-optional-chaining': 'off',
- '@typescript-eslint/consistent-type-assertions': 'off',
'@typescript-eslint/no-redeclare': 'off', // dependency interface and dependency token share the same name
+ '@typescript-eslint/no-unused-vars': 'off',
+ 'grouped-accessor-pairs': 'off',
'no-magic-numbers': ['warn', { ignore: [0, 1, -1, 2] }],
- 'simple-import-sort/imports': 'error',
+ 'no-unsafe-optional-chaining': 'off',
+ 'prefer-regex-literals': 'off',
'simple-import-sort/exports': 'error',
+ 'simple-import-sort/imports': 'error',
+ 'unused-imports/no-unused-imports': 'error',
},
// https://www.npmjs.com/package/eslint-import-resolver-typescript
settings: {
diff --git a/examples/univer-doc-ts/esbuild.config.js b/examples/univer-doc-ts/esbuild.config.js
index d73e8ff8e6..d73021804d 100644
--- a/examples/univer-doc-ts/esbuild.config.js
+++ b/examples/univer-doc-ts/esbuild.config.js
@@ -5,7 +5,7 @@ const args = require('minimist')(process.argv.slice(2));
bundle: true,
color: true,
loader: { '.svg': 'file' },
- sourcemap: false,
+ sourcemap: true,
plugins: [
require('esbuild-plugin-clean').clean({
patterns: ['./local'],
diff --git a/examples/univer-doc-ts/index.html b/examples/univer-doc-ts/index.html
deleted file mode 100644
index a14c559a5e..0000000000
--- a/examples/univer-doc-ts/index.html
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
- UniverDoc
-
-
-
-
-
-
-
-
-
diff --git a/examples/univer-doc-ts/public/index.html b/examples/univer-doc-ts/public/index.html
index 251fb2bb00..d05c4c6bdb 100644
--- a/examples/univer-doc-ts/public/index.html
+++ b/examples/univer-doc-ts/public/index.html
@@ -1,33 +1,30 @@
-
-
-
-
-
-
- UniverDoc
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+ UniverDoc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/univer-doc-ts/src/main.tsx b/examples/univer-doc-ts/src/main.tsx
index c6e18d40de..463b2fc930 100644
--- a/examples/univer-doc-ts/src/main.tsx
+++ b/examples/univer-doc-ts/src/main.tsx
@@ -1,17 +1,25 @@
import { DocPlugin } from '@univerjs/base-docs';
import { RenderEngine } from '@univerjs/base-render';
+import { UIPlugin } from '@univerjs/base-ui';
import { DEFAULT_DOCUMENT_DATA_EN } from '@univerjs/common-plugin-data';
import { LocaleType, Univer } from '@univerjs/core';
import { DocUIPlugin } from '@univerjs/ui-plugin-docs';
+// univer
const univer = new Univer({
locale: LocaleType.EN,
});
-univer.createUniverDoc(DEFAULT_DOCUMENT_DATA_EN);
-
+// core plugins
univer.registerPlugin(RenderEngine);
-univer.registerPlugin(DocPlugin);
+univer.registerPlugin(UIPlugin, {
+ container: 'univer-container',
+ header: true,
+ toolbar: true,
+});
+univer.registerPlugin(DocPlugin, {
+ standalone: true,
+});
univer.registerPlugin(DocUIPlugin, {
container: 'univerdoc',
layout: {
@@ -20,3 +28,5 @@ univer.registerPlugin(DocUIPlugin, {
},
},
});
+
+univer.createUniverDoc(DEFAULT_DOCUMENT_DATA_EN);
diff --git a/examples/univer-sheet-ts/esbuild.config.js b/examples/univer-sheet-ts/esbuild.config.js
index 9e0ce376ea..be3a16d705 100644
--- a/examples/univer-sheet-ts/esbuild.config.js
+++ b/examples/univer-sheet-ts/esbuild.config.js
@@ -5,7 +5,7 @@ const args = require('minimist')(process.argv.slice(2));
bundle: true,
color: true,
loader: { '.svg': 'file' },
- sourcemap: false,
+ sourcemap: true,
plugins: [
require('esbuild-plugin-clean').clean({
patterns: ['./local'],
diff --git a/examples/univer-sheet-ts/index.html b/examples/univer-sheet-ts/index.html
deleted file mode 100644
index e471eecb52..0000000000
--- a/examples/univer-sheet-ts/index.html
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
- UniverSheet
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/examples/univer-sheet-ts/package.json b/examples/univer-sheet-ts/package.json
index a47f723db2..08c475e67e 100644
--- a/examples/univer-sheet-ts/package.json
+++ b/examples/univer-sheet-ts/package.json
@@ -29,6 +29,7 @@
"ts-node": "^10.9.1"
},
"dependencies": {
+ "@univerjs/base-docs": "workspace:^0.0.1",
"@univerjs/base-render": "workspace:^0.0.1",
"@univerjs/base-sheets": "workspace:^0.0.1",
"@univerjs/base-ui": "workspace:^0.0.1",
@@ -40,8 +41,9 @@
"@univerjs/sheets-plugin-import-xlsx": "workspace:^0.0.1",
"@univerjs/sheets-plugin-numfmt": "workspace:^0.0.1",
"@univerjs/sheets-plugin-operation": "workspace:^0.0.1",
+ "@univerjs/ui-plugin-docs": "workspace:^0.0.1",
"@univerjs/ui-plugin-sheets": "workspace:^0.0.1",
- "react": "^18.2.0",
- "react-dom": "^18.2.0"
+ "react-dom": "^18.2.0",
+ "react": "^18.2.0"
}
}
diff --git a/examples/univer-sheet-ts/public/index.html b/examples/univer-sheet-ts/public/index.html
index c804d874ee..8d7a44503e 100644
--- a/examples/univer-sheet-ts/public/index.html
+++ b/examples/univer-sheet-ts/public/index.html
@@ -1,35 +1,31 @@
+
+
+
+ Univer Sheet
-
-
-
- Univer Sheet
+
+
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+