@univerjs/presets 0.18.0 → 0.19.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/lib/cjs/index.js +1 -1
- package/lib/es/index.js +4 -5
- package/lib/index.js +4 -5
- package/lib/types/index.d.ts +0 -1
- package/lib/umd/index.js +14 -591
- package/package.json +31 -32
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@univerjs/core"),g=require("@univerjs/core/lib/facade"),y=require("@univerjs/themes");function O(e){const{presets:c,plugins:s,collaboration:f,override:i=[],...h}=e;f&&(i.push([n.IUndoRedoService,null]),i.push([n.IAuthzIoService,null]),i.push([n.IMentionIOService,null]));const u=new n.Univer({logLevel:n.LogLevel.WARN,...h,override:i}),o=new Map;c==null||c.forEach(r=>{const t=Array.isArray(r)?r[0]:r,{plugins:p}=t;p.forEach(a=>{const[l,d]=Array.isArray(a)?[a[0],a[1]]:[a];o.has(l.pluginName)&&o.delete(l.pluginName),o.set(l.pluginName,{plugin:l,options:d})})}),s==null||s.forEach(r=>{const[t,p]=Array.isArray(r)?[r[0],r[1]]:[r];if(o.has(t.pluginName))throw new Error(`Plugin ${t.pluginName} already registered by presets or other ways! Repeated registration may cause potential problems, please check your code.`);o.set(t.pluginName,{plugin:t,options:p})}),o.forEach(({plugin:r,options:t})=>{u.registerPlugin(r,t)});const b=g.FUniver.newAPI(u);return{univer:u,univerAPI:b}}exports.createUniver=O;Object.keys(n).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>n[e]})});Object.keys(g).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>g[e]})});Object.keys(y).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>y[e]})});
|
package/lib/es/index.js
CHANGED
|
@@ -2,21 +2,20 @@ import { IUndoRedoService as h, IAuthzIoService as v, IMentionIOService as y, Un
|
|
|
2
2
|
export * from "@univerjs/core";
|
|
3
3
|
import { FUniver as I } from "@univerjs/core/lib/facade";
|
|
4
4
|
export * from "@univerjs/core/lib/facade";
|
|
5
|
-
export * from "@univerjs/design";
|
|
6
5
|
export * from "@univerjs/themes";
|
|
7
6
|
function w(p) {
|
|
8
|
-
const { presets:
|
|
7
|
+
const { presets: t, plugins: l, collaboration: c, override: n = [], ...g } = p;
|
|
9
8
|
c && (n.push([h, null]), n.push([v, null]), n.push([y, null]));
|
|
10
9
|
const s = new A({
|
|
11
10
|
logLevel: d.WARN,
|
|
12
11
|
...g,
|
|
13
12
|
override: n
|
|
14
13
|
}), o = /* @__PURE__ */ new Map();
|
|
15
|
-
|
|
14
|
+
t == null || t.forEach((e) => {
|
|
16
15
|
const r = Array.isArray(e) ? e[0] : e, { plugins: u } = r;
|
|
17
16
|
u.forEach((i) => {
|
|
18
|
-
const [
|
|
19
|
-
o.has(
|
|
17
|
+
const [a, m] = Array.isArray(i) ? [i[0], i[1]] : [i];
|
|
18
|
+
o.has(a.pluginName) && o.delete(a.pluginName), o.set(a.pluginName, { plugin: a, options: m });
|
|
20
19
|
});
|
|
21
20
|
}), l == null || l.forEach((e) => {
|
|
22
21
|
const [r, u] = Array.isArray(e) ? [e[0], e[1]] : [e];
|
package/lib/index.js
CHANGED
|
@@ -2,21 +2,20 @@ import { IUndoRedoService as h, IAuthzIoService as v, IMentionIOService as y, Un
|
|
|
2
2
|
export * from "@univerjs/core";
|
|
3
3
|
import { FUniver as I } from "@univerjs/core/lib/facade";
|
|
4
4
|
export * from "@univerjs/core/lib/facade";
|
|
5
|
-
export * from "@univerjs/design";
|
|
6
5
|
export * from "@univerjs/themes";
|
|
7
6
|
function w(p) {
|
|
8
|
-
const { presets:
|
|
7
|
+
const { presets: t, plugins: l, collaboration: c, override: n = [], ...g } = p;
|
|
9
8
|
c && (n.push([h, null]), n.push([v, null]), n.push([y, null]));
|
|
10
9
|
const s = new A({
|
|
11
10
|
logLevel: d.WARN,
|
|
12
11
|
...g,
|
|
13
12
|
override: n
|
|
14
13
|
}), o = /* @__PURE__ */ new Map();
|
|
15
|
-
|
|
14
|
+
t == null || t.forEach((e) => {
|
|
16
15
|
const r = Array.isArray(e) ? e[0] : e, { plugins: u } = r;
|
|
17
16
|
u.forEach((i) => {
|
|
18
|
-
const [
|
|
19
|
-
o.has(
|
|
17
|
+
const [a, m] = Array.isArray(i) ? [i[0], i[1]] : [i];
|
|
18
|
+
o.has(a.pluginName) && o.delete(a.pluginName), o.set(a.pluginName, { plugin: a, options: m });
|
|
20
19
|
});
|
|
21
20
|
}), l == null || l.forEach((e) => {
|
|
22
21
|
const [r, u] = Array.isArray(e) ? [e[0], e[1]] : [e];
|
package/lib/types/index.d.ts
CHANGED