@univerjs/preset-sheets-node-core 0.5.1-nightly.202412041606 → 0.5.1-nightly.202412271606

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 CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@univerjs/docs"),s=require("@univerjs/engine-formula"),o=require("@univerjs/rpc-node"),u=require("@univerjs/sheets"),l=require("@univerjs/sheets-data-validation"),a=require("@univerjs/sheets-drawing"),c=require("@univerjs/sheets-filter"),h=require("@univerjs/sheets-formula"),g=require("@univerjs/sheets-hyper-link"),q=require("@univerjs/sheets-sort"),P=require("@univerjs/sheets-thread-comment"),m=require("@univerjs/thread-comment");require("@univerjs/sheets/facade");require("@univerjs/sheets-formula/facade");require("@univerjs/sheets-data-validation/facade");require("@univerjs/engine-formula/facade");require("@univerjs/sheets-filter/facade");function v(n){const{workerSrc:r}=n,e=!!r;return{plugins:[e?[o.UniverRPCNodeMainPlugin,{workerSrc:r}]:null,[s.UniverFormulaEnginePlugin,{notExecuteFormula:e}],m.UniverThreadCommentPlugin,t.UniverDocsPlugin,u.UniverSheetsPlugin,[h.UniverSheetsFormulaPlugin,{notExecuteFormula:e}],l.UniverSheetsDataValidationPlugin,c.UniverSheetsFilterPlugin,g.UniverSheetsHyperLinkPlugin,a.UniverSheetsDrawingPlugin,q.UniverSheetsSortPlugin,P.UniverSheetsThreadCommentPlugin].filter(i=>!!i)}}exports.UniverSheetsNodeCorePreset=v;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@univerjs/docs"),o=require("@univerjs/engine-formula"),i=require("@univerjs/rpc-node"),c=require("@univerjs/sheets"),a=require("@univerjs/sheets-data-validation"),u=require("@univerjs/sheets-drawing"),l=require("@univerjs/sheets-filter"),s=require("@univerjs/sheets-formula"),p=require("@univerjs/sheets-hyper-link"),y=require("@univerjs/sheets-sort"),b=require("@univerjs/sheets-thread-comment"),f=require("@univerjs/thread-comment");require("@univerjs/sheets/facade");require("@univerjs/sheets-formula/facade");require("@univerjs/sheets-data-validation/facade");require("@univerjs/engine-formula/facade");require("@univerjs/sheets-filter/facade");function P(e){const{workerSrc:O,formula:t}=e,r=!!O;return{plugins:[r?[i.UniverRPCNodeMainPlugin,{workerSrc:O}]:null,[o.UniverFormulaEnginePlugin,{notExecuteFormula:r,function:t==null?void 0:t.function}],f.UniverThreadCommentPlugin,n.UniverDocsPlugin,c.UniverSheetsPlugin,[s.UniverSheetsFormulaPlugin,{notExecuteFormula:r,description:t==null?void 0:t.description}],a.UniverSheetsDataValidationPlugin,l.UniverSheetsFilterPlugin,p.UniverSheetsHyperLinkPlugin,u.UniverSheetsDrawingPlugin,y.UniverSheetsSortPlugin,b.UniverSheetsThreadCommentPlugin].filter(h=>!!h)}}exports.UniverSheetsNodeCorePreset=P;Object.keys(n).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>n[e]})});Object.keys(o).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>o[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(c).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>c[e]})});Object.keys(a).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>a[e]})});Object.keys(u).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>u[e]})});Object.keys(l).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>l[e]})});Object.keys(s).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>s[e]})});Object.keys(p).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>p[e]})});Object.keys(y).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>y[e]})});Object.keys(b).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>b[e]})});Object.keys(f).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>f[e]})});
package/lib/cjs/worker.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@univerjs/engine-formula"),t=require("@univerjs/rpc-node"),o=require("@univerjs/sheets"),n=require("@univerjs/sheets-formula");function u(){return{plugins:[[o.UniverSheetsPlugin,{onlyRegisterFormulaRelatedMutations:!0}],r.UniverFormulaEnginePlugin,t.UniverRPCNodeWorkerPlugin,n.UniverRemoteSheetsFormulaPlugin]}}exports.UniverSheetsNodeCoreWorkerPreset=u;Object.keys(r).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});Object.keys(t).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});Object.keys(o).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>o[e]})});Object.keys(n).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>n[e]})});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@univerjs/engine-formula"),o=require("@univerjs/rpc-node"),n=require("@univerjs/sheets"),u=require("@univerjs/sheets-formula");function i(e={}){const{formula:r}=e;return{plugins:[[n.UniverSheetsPlugin,{onlyRegisterFormulaRelatedMutations:!0}],[t.UniverFormulaEnginePlugin,{function:r==null?void 0:r.function}],o.UniverRPCNodeWorkerPlugin,u.UniverRemoteSheetsFormulaPlugin]}}exports.UniverSheetsNodeCoreWorkerPreset=i;Object.keys(t).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});Object.keys(o).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>o[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(u).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>u[e]})});
package/lib/es/index.js CHANGED
@@ -1,39 +1,51 @@
1
- import { UniverDocsPlugin as t } from "@univerjs/docs";
2
- import { UniverFormulaEnginePlugin as n } from "@univerjs/engine-formula";
3
- import { UniverRPCNodeMainPlugin as m } from "@univerjs/rpc-node";
4
- import { UniverSheetsPlugin as u } from "@univerjs/sheets";
5
- import { UniverSheetsDataValidationPlugin as l } from "@univerjs/sheets-data-validation";
6
- import { UniverSheetsDrawingPlugin as p } from "@univerjs/sheets-drawing";
7
- import { UniverSheetsFilterPlugin as g } from "@univerjs/sheets-filter";
8
- import { UniverSheetsFormulaPlugin as s } from "@univerjs/sheets-formula";
9
- import { UniverSheetsHyperLinkPlugin as f } from "@univerjs/sheets-hyper-link";
1
+ import { UniverDocsPlugin as n } from "@univerjs/docs";
2
+ export * from "@univerjs/docs";
3
+ import { UniverFormulaEnginePlugin as m } from "@univerjs/engine-formula";
4
+ export * from "@univerjs/engine-formula";
5
+ import { UniverRPCNodeMainPlugin as p } from "@univerjs/rpc-node";
6
+ export * from "@univerjs/rpc-node";
7
+ import { UniverSheetsPlugin as f } from "@univerjs/sheets";
8
+ export * from "@univerjs/sheets";
9
+ import { UniverSheetsDataValidationPlugin as u } from "@univerjs/sheets-data-validation";
10
+ export * from "@univerjs/sheets-data-validation";
11
+ import { UniverSheetsDrawingPlugin as l } from "@univerjs/sheets-drawing";
12
+ export * from "@univerjs/sheets-drawing";
13
+ import { UniverSheetsFilterPlugin as s } from "@univerjs/sheets-filter";
14
+ export * from "@univerjs/sheets-filter";
15
+ import { UniverSheetsFormulaPlugin as g } from "@univerjs/sheets-formula";
16
+ export * from "@univerjs/sheets-formula";
17
+ import { UniverSheetsHyperLinkPlugin as x } from "@univerjs/sheets-hyper-link";
18
+ export * from "@univerjs/sheets-hyper-link";
10
19
  import { UniverSheetsSortPlugin as P } from "@univerjs/sheets-sort";
20
+ export * from "@univerjs/sheets-sort";
11
21
  import { UniverSheetsThreadCommentPlugin as v } from "@univerjs/sheets-thread-comment";
22
+ export * from "@univerjs/sheets-thread-comment";
12
23
  import { UniverThreadCommentPlugin as U } from "@univerjs/thread-comment";
24
+ export * from "@univerjs/thread-comment";
13
25
  import "@univerjs/sheets/facade";
14
26
  import "@univerjs/sheets-formula/facade";
15
27
  import "@univerjs/sheets-data-validation/facade";
16
28
  import "@univerjs/engine-formula/facade";
17
29
  import "@univerjs/sheets-filter/facade";
18
- function M(i) {
19
- const { workerSrc: e } = i, r = !!e;
30
+ function R(t) {
31
+ const { workerSrc: e, formula: r } = t, o = !!e;
20
32
  return {
21
33
  plugins: [
22
- r ? [m, { workerSrc: e }] : null,
23
- [n, { notExecuteFormula: r }],
34
+ o ? [p, { workerSrc: e }] : null,
35
+ [m, { notExecuteFormula: o, function: r == null ? void 0 : r.function }],
24
36
  U,
25
- t,
37
+ n,
38
+ f,
39
+ [g, { notExecuteFormula: o, description: r == null ? void 0 : r.description }],
26
40
  u,
27
- [s, { notExecuteFormula: r }],
41
+ s,
42
+ x,
28
43
  l,
29
- g,
30
- f,
31
- p,
32
44
  P,
33
45
  v
34
- ].filter((o) => !!o)
46
+ ].filter((i) => !!i)
35
47
  };
36
48
  }
37
49
  export {
38
- M as UniverSheetsNodeCorePreset
50
+ R as UniverSheetsNodeCorePreset
39
51
  };
package/lib/es/worker.js CHANGED
@@ -1,18 +1,21 @@
1
- import { UniverFormulaEnginePlugin as r } from "@univerjs/engine-formula";
1
+ import { UniverFormulaEnginePlugin as o } from "@univerjs/engine-formula";
2
2
  export * from "@univerjs/engine-formula";
3
- import { UniverRPCNodeWorkerPlugin as e } from "@univerjs/rpc-node";
3
+ import { UniverRPCNodeWorkerPlugin as t } from "@univerjs/rpc-node";
4
4
  export * from "@univerjs/rpc-node";
5
- import { UniverSheetsPlugin as o } from "@univerjs/sheets";
5
+ import { UniverSheetsPlugin as n } from "@univerjs/sheets";
6
6
  export * from "@univerjs/sheets";
7
- import { UniverRemoteSheetsFormulaPlugin as t } from "@univerjs/sheets-formula";
7
+ import { UniverRemoteSheetsFormulaPlugin as i } from "@univerjs/sheets-formula";
8
8
  export * from "@univerjs/sheets-formula";
9
- function l() {
9
+ function l(e = {}) {
10
+ const {
11
+ formula: r
12
+ } = e;
10
13
  return {
11
14
  plugins: [
12
- [o, { onlyRegisterFormulaRelatedMutations: !0 }],
13
- r,
14
- e,
15
- t
15
+ [n, { onlyRegisterFormulaRelatedMutations: !0 }],
16
+ [o, { function: r == null ? void 0 : r.function }],
17
+ t,
18
+ i
16
19
  ]
17
20
  };
18
21
  }
@@ -1,4 +1,6 @@
1
1
  import { IUniverConfig, Plugin, PluginCtor } from '@univerjs/core';
2
+ import { IUniverEngineFormulaConfig } from '@univerjs/engine-formula';
3
+ import { IUniverSheetsFormulaBaseConfig } from '@univerjs/sheets-formula';
2
4
  /**
3
5
  * A collection of plugins and their default configs.
4
6
  */
@@ -9,3 +11,7 @@ export interface IPreset {
9
11
  export interface IPresetOptions {
10
12
  lazy?: boolean;
11
13
  }
14
+ export interface IUniverFormulaConfig extends Pick<IUniverEngineFormulaConfig, 'function'>, Pick<IUniverSheetsFormulaBaseConfig, 'description'> {
15
+ }
16
+ export interface IUniverFormulaWorkerConfig extends Pick<IUniverEngineFormulaConfig, 'function'> {
17
+ }
@@ -1,10 +1,17 @@
1
- import { IPreset } from './types';
1
+ import { IPreset, IUniverFormulaConfig } from './types';
2
2
  import '@univerjs/sheets/facade';
3
3
  import '@univerjs/sheets-formula/facade';
4
4
  import '@univerjs/sheets-data-validation/facade';
5
5
  import '@univerjs/engine-formula/facade';
6
6
  import '@univerjs/sheets-filter/facade';
7
7
  export interface IUniverSheetsNodeCorePresetConfig {
8
+ /**
9
+ * The formula configuration.
10
+ */
11
+ formula?: IUniverFormulaConfig;
12
+ /**
13
+ * The URL of the worker script.
14
+ */
8
15
  workerSrc?: string;
9
16
  }
10
17
  export declare function UniverSheetsNodeCorePreset(config: Partial<IUniverSheetsNodeCorePresetConfig>): IPreset;
@@ -1,6 +1,12 @@
1
- import { IPreset } from './types';
1
+ import { IPreset, IUniverFormulaWorkerConfig } from './types';
2
2
  export * from '@univerjs/engine-formula';
3
3
  export * from '@univerjs/rpc-node';
4
4
  export * from '@univerjs/sheets';
5
5
  export * from '@univerjs/sheets-formula';
6
- export declare function UniverSheetsNodeCoreWorkerPreset(): IPreset;
6
+ export interface IUniverSheetsNodeCoreWorkerPresetConfig {
7
+ /**
8
+ * The formula worker config.
9
+ */
10
+ formula?: IUniverFormulaWorkerConfig;
11
+ }
12
+ export declare function UniverSheetsNodeCoreWorkerPreset(config?: Partial<IUniverSheetsNodeCoreWorkerPresetConfig>): IPreset;