@univerjs/preset-sheets-drawing 0.21.1 → 0.22.0
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/README.md +38 -0
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +15 -12
- package/lib/index.js +15 -12
- package/lib/types/umd.d.ts +2 -1
- package/lib/umd/index.js +6 -6
- package/package.json +13 -11
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @univerjs/preset-sheets-drawing
|
|
2
|
+
|
|
3
|
+
[](https://npmjs.com/package/@univerjs/preset-sheets-drawing)
|
|
4
|
+
[](https://npmjs.com/package/@univerjs/preset-sheets-drawing)
|
|
5
|
+
[](https://npmjs.com/package/@univerjs/preset-sheets-drawing)
|
|
6
|
+
|
|
7
|
+
`@univerjs/preset-sheets-drawing` provides a preset for drawing capabilities in Univer Sheets.
|
|
8
|
+
|
|
9
|
+
## Package Overview
|
|
10
|
+
|
|
11
|
+
| Package | UMD global | CSS | Locales | Facade entry |
|
|
12
|
+
| --------------------------------- | --------------------------- | :-: | :-----: | :----------: |
|
|
13
|
+
| `@univerjs/preset-sheets-drawing` | `UniverSheetsDrawingPreset` | Yes | Yes | Yes |
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
pnpm add @univerjs/preset-sheets-drawing
|
|
19
|
+
# or
|
|
20
|
+
npm install @univerjs/preset-sheets-drawing
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Keep all `@univerjs/*` packages on the same version.
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { UniverSheetsDrawingPreset } from '@univerjs/preset-sheets-drawing';
|
|
29
|
+
|
|
30
|
+
// Use with createUniver:
|
|
31
|
+
// createUniver({ presets: [UniverSheetsDrawingPreset()] });
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Resources
|
|
35
|
+
|
|
36
|
+
- [Documentation](https://docs.univer.ai)
|
|
37
|
+
- [NPM package](https://npmjs.com/package/@univerjs/preset-sheets-drawing)
|
|
38
|
+
- [GitHub repository](https://github.com/dream-num/univer)
|
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@univerjs/docs-drawing"),r=require("@univerjs/drawing"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@univerjs/docs-drawing"),r=require("@univerjs/drawing"),i=require("@univerjs/drawing-ui"),n=require("@univerjs/sheets-drawing"),a=require("@univerjs/sheets-drawing-ui");require("@univerjs/sheets-drawing/lib/facade");require("@univerjs/sheets-drawing-ui/lib/facade");function u(e={}){const{collaboration:o=!1,allowImageSize:c}=e;return{plugins:[[r.UniverDrawingPlugin,{override:o?[[r.IImageIoService,null]]:[],allowImageSize:c}],t.UniverDocsDrawingPlugin,i.UniverDrawingUIPlugin,n.UniverSheetsDrawingPlugin,a.UniverSheetsDrawingUIPlugin].filter(l=>!!l)}}exports.UniverSheetsDrawingPreset=u;Object.keys(t).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});Object.keys(r).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});Object.keys(i).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>i[e]})});Object.keys(n).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>n[e]})});Object.keys(a).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>a[e]})});
|
package/lib/es/index.js
CHANGED
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
import { UniverDocsDrawingPlugin as
|
|
1
|
+
import { UniverDocsDrawingPlugin as n } from "@univerjs/docs-drawing";
|
|
2
2
|
export * from "@univerjs/docs-drawing";
|
|
3
|
-
import { UniverDrawingPlugin as
|
|
3
|
+
import { UniverDrawingPlugin as t, IImageIoService as m } from "@univerjs/drawing";
|
|
4
4
|
export * from "@univerjs/drawing";
|
|
5
|
-
import { UniverDrawingUIPlugin as
|
|
5
|
+
import { UniverDrawingUIPlugin as g } from "@univerjs/drawing-ui";
|
|
6
6
|
export * from "@univerjs/drawing-ui";
|
|
7
|
-
import { UniverSheetsDrawingPlugin as
|
|
7
|
+
import { UniverSheetsDrawingPlugin as l } from "@univerjs/sheets-drawing";
|
|
8
8
|
export * from "@univerjs/sheets-drawing";
|
|
9
|
-
import { UniverSheetsDrawingUIPlugin as
|
|
9
|
+
import { UniverSheetsDrawingUIPlugin as p } from "@univerjs/sheets-drawing-ui";
|
|
10
10
|
export * from "@univerjs/sheets-drawing-ui";
|
|
11
11
|
import "@univerjs/sheets-drawing/lib/facade";
|
|
12
12
|
import "@univerjs/sheets-drawing-ui/lib/facade";
|
|
13
13
|
function D(r = {}) {
|
|
14
|
-
const { collaboration: o = !1 } = r;
|
|
14
|
+
const { collaboration: o = !1, allowImageSize: i } = r;
|
|
15
15
|
return {
|
|
16
16
|
plugins: [
|
|
17
|
-
[
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
[t, {
|
|
18
|
+
override: o ? [[m, null]] : [],
|
|
19
|
+
allowImageSize: i
|
|
20
|
+
}],
|
|
21
|
+
n,
|
|
22
|
+
g,
|
|
23
|
+
l,
|
|
24
|
+
p
|
|
25
|
+
].filter((e) => !!e)
|
|
23
26
|
};
|
|
24
27
|
}
|
|
25
28
|
export {
|
package/lib/index.js
CHANGED
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
import { UniverDocsDrawingPlugin as
|
|
1
|
+
import { UniverDocsDrawingPlugin as n } from "@univerjs/docs-drawing";
|
|
2
2
|
export * from "@univerjs/docs-drawing";
|
|
3
|
-
import { UniverDrawingPlugin as
|
|
3
|
+
import { UniverDrawingPlugin as t, IImageIoService as m } from "@univerjs/drawing";
|
|
4
4
|
export * from "@univerjs/drawing";
|
|
5
|
-
import { UniverDrawingUIPlugin as
|
|
5
|
+
import { UniverDrawingUIPlugin as g } from "@univerjs/drawing-ui";
|
|
6
6
|
export * from "@univerjs/drawing-ui";
|
|
7
|
-
import { UniverSheetsDrawingPlugin as
|
|
7
|
+
import { UniverSheetsDrawingPlugin as l } from "@univerjs/sheets-drawing";
|
|
8
8
|
export * from "@univerjs/sheets-drawing";
|
|
9
|
-
import { UniverSheetsDrawingUIPlugin as
|
|
9
|
+
import { UniverSheetsDrawingUIPlugin as p } from "@univerjs/sheets-drawing-ui";
|
|
10
10
|
export * from "@univerjs/sheets-drawing-ui";
|
|
11
11
|
import "@univerjs/sheets-drawing/lib/facade";
|
|
12
12
|
import "@univerjs/sheets-drawing-ui/lib/facade";
|
|
13
13
|
function D(r = {}) {
|
|
14
|
-
const { collaboration: o = !1 } = r;
|
|
14
|
+
const { collaboration: o = !1, allowImageSize: i } = r;
|
|
15
15
|
return {
|
|
16
16
|
plugins: [
|
|
17
|
-
[
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
[t, {
|
|
18
|
+
override: o ? [[m, null]] : [],
|
|
19
|
+
allowImageSize: i
|
|
20
|
+
}],
|
|
21
|
+
n,
|
|
22
|
+
g,
|
|
23
|
+
l,
|
|
24
|
+
p
|
|
25
|
+
].filter((e) => !!e)
|
|
23
26
|
};
|
|
24
27
|
}
|
|
25
28
|
export {
|
package/lib/types/umd.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IUniverDrawingConfig } from '@univerjs/drawing';
|
|
1
2
|
import { IPreset } from './types';
|
|
2
3
|
import '@univerjs/sheets-drawing/lib/facade';
|
|
3
4
|
import '@univerjs/sheets-drawing-ui/lib/facade';
|
|
@@ -5,7 +6,7 @@ import '@univerjs/drawing-ui/lib/index.css';
|
|
|
5
6
|
import '@univerjs/sheets-drawing-ui/lib/index.css';
|
|
6
7
|
export type * from '@univerjs/sheets-drawing-ui/lib/facade';
|
|
7
8
|
export type * from '@univerjs/sheets-drawing/lib/facade';
|
|
8
|
-
export interface IUniverSheetsDrawingPresetConfig {
|
|
9
|
+
export interface IUniverSheetsDrawingPresetConfig extends Pick<IUniverDrawingConfig, 'allowImageSize'> {
|
|
9
10
|
collaboration?: boolean;
|
|
10
11
|
}
|
|
11
12
|
export declare function UniverSheetsDrawingPreset(config?: Partial<IUniverSheetsDrawingPresetConfig>): IPreset;
|