snapshot of https://github.com/dream-num/univer.git (dev, 2026-09-16; blobs > 131072B omitted)
Some checks failed
📦 Build / build (push) Has been cancelled
🧪 CI Test / test shard (1/4) (push) Has been cancelled
🧪 CI Test / test shard (2/4) (push) Has been cancelled
🧪 CI Test / test shard (3/4) (push) Has been cancelled
🧪 CI Test / test shard (4/4) (push) Has been cancelled
🧪 CI Test / test (push) Has been cancelled
🧪 CI Test / eslint (push) Has been cancelled
🧪 CI Test / typecheck (push) Has been cancelled
🔫 Sync to Pro / dispatch-sync (push) Has been cancelled
🔮 Sync Mirror / sync (push) Has been cancelled
Some checks failed
📦 Build / build (push) Has been cancelled
🧪 CI Test / test shard (1/4) (push) Has been cancelled
🧪 CI Test / test shard (2/4) (push) Has been cancelled
🧪 CI Test / test shard (3/4) (push) Has been cancelled
🧪 CI Test / test shard (4/4) (push) Has been cancelled
🧪 CI Test / test (push) Has been cancelled
🧪 CI Test / eslint (push) Has been cancelled
🧪 CI Test / typecheck (push) Has been cancelled
🔫 Sync to Pro / dispatch-sync (push) Has been cancelled
🔮 Sync Mirror / sync (push) Has been cancelled
This commit is contained in:
23
presets/packages/preset-docs-node-core/src/index.ts
Normal file
23
presets/packages/preset-docs-node-core/src/index.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Copyright 2023-present DreamNum Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export * from './preset';
|
||||
export * from '@univerjs/docs';
|
||||
export * from '@univerjs/docs-drawing';
|
||||
export * from '@univerjs/docs-hyper-link';
|
||||
export * from '@univerjs/engine-formula';
|
||||
export * from '@univerjs/rpc-node';
|
||||
export * from '@univerjs/thread-comment';
|
||||
57
presets/packages/preset-docs-node-core/src/preset.ts
Normal file
57
presets/packages/preset-docs-node-core/src/preset.ts
Normal file
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* Copyright 2023-present DreamNum Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import type { IPreset } from '@univerjs/presets';
|
||||
import type { IUniverFormulaConfig } from './types';
|
||||
import { UniverDocsPlugin } from '@univerjs/docs';
|
||||
import { UniverDocsDrawingPlugin } from '@univerjs/docs-drawing';
|
||||
import { UniverDocsHyperLinkPlugin } from '@univerjs/docs-hyper-link';
|
||||
import { UniverFormulaEnginePlugin } from '@univerjs/engine-formula';
|
||||
// import { UniverRPCNodeMainPlugin } from '@univerjs/rpc-node';
|
||||
import { UniverThreadCommentPlugin } from '@univerjs/thread-comment';
|
||||
|
||||
import '@univerjs/engine-formula/facade';
|
||||
|
||||
export type * from '@univerjs/engine-formula/facade';
|
||||
|
||||
export interface IUniverDocsNodeCorePresetConfig {
|
||||
/**
|
||||
* The formula configuration.
|
||||
*/
|
||||
formula?: IUniverFormulaConfig;
|
||||
}
|
||||
|
||||
export function UniverDocsNodeCorePreset(config: Partial<IUniverDocsNodeCorePresetConfig> = {}): IPreset {
|
||||
const { formula } = config;
|
||||
|
||||
return {
|
||||
plugins: [
|
||||
// useWorker
|
||||
// ? [UniverRPCNodeMainPlugin, { workerSrc }]
|
||||
// : null,
|
||||
[UniverFormulaEnginePlugin, {
|
||||
// notExecuteFormula: useWorker,
|
||||
function: formula?.function,
|
||||
}],
|
||||
|
||||
UniverThreadCommentPlugin,
|
||||
UniverDocsPlugin,
|
||||
|
||||
UniverDocsHyperLinkPlugin,
|
||||
UniverDocsDrawingPlugin,
|
||||
].filter((v) => !!v) as IPreset['plugins'],
|
||||
};
|
||||
}
|
||||
25
presets/packages/preset-docs-node-core/src/types.ts
Normal file
25
presets/packages/preset-docs-node-core/src/types.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Copyright 2023-present DreamNum Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import type { IUniverEngineFormulaConfig } from '@univerjs/engine-formula';
|
||||
|
||||
export interface IUniverFormulaConfig extends
|
||||
Pick<IUniverEngineFormulaConfig, 'function'> {
|
||||
}
|
||||
|
||||
export interface IUniverFormulaWorkerConfig extends
|
||||
Pick<IUniverEngineFormulaConfig, 'function'> {
|
||||
}
|
||||
Reference in New Issue
Block a user