From 7d62d4f696192595fee1de0ce1e3d941b73422f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E7=86=B1?= Date: Tue, 7 Jan 2025 21:13:42 +0800 Subject: [PATCH 1/2] feat: export types from all facade modules --- packages/preset-docs-collaboration/src/umd.ts | 2 ++ packages/preset-docs-core/src/umd.ts | 5 ++++- packages/preset-sheets-advanced/src/umd.ts | 8 ++++++++ packages/preset-sheets-conditional-formatting/src/umd.ts | 4 +++- packages/preset-sheets-core/src/umd.ts | 8 ++++++++ packages/preset-sheets-data-validation/src/umd.ts | 2 ++ packages/preset-sheets-drawing/src/umd.ts | 2 ++ packages/preset-sheets-filter/src/umd.ts | 2 ++ packages/preset-sheets-hyper-link/src/umd.ts | 2 ++ packages/preset-sheets-node-core/src/umd.ts | 6 ++++++ packages/preset-sheets-sort/src/umd.ts | 2 ++ packages/preset-sheets-thread-comment/src/umd.ts | 2 ++ 12 files changed, 43 insertions(+), 2 deletions(-) diff --git a/packages/preset-docs-collaboration/src/umd.ts b/packages/preset-docs-collaboration/src/umd.ts index c10a0a1..c2e25ec 100644 --- a/packages/preset-docs-collaboration/src/umd.ts +++ b/packages/preset-docs-collaboration/src/umd.ts @@ -7,6 +7,8 @@ import '@univerjs-pro/collaboration-client/facade'; import '@univerjs-pro/collaboration-client-ui/lib/index.css'; +export type * from '@univerjs-pro/collaboration-client/facade'; + export interface IUniverDocsCollaborationPresetConfig { universerEndpoint?: string; } diff --git a/packages/preset-docs-core/src/umd.ts b/packages/preset-docs-core/src/umd.ts index a302c84..4d8b3ed 100644 --- a/packages/preset-docs-core/src/umd.ts +++ b/packages/preset-docs-core/src/umd.ts @@ -5,10 +5,13 @@ import { UniverFormulaEnginePlugin } from '@univerjs/engine-formula'; import { UniverRenderEnginePlugin } from '@univerjs/engine-render'; import { type IUniverUIConfig, UniverUIPlugin } from '@univerjs/ui'; +import '@univerjs/docs-ui/facade'; + import '@univerjs/design/lib/index.css'; import '@univerjs/ui/lib/index.css'; import '@univerjs/docs-ui/lib/index.css'; -import '@univerjs/docs-ui/facade'; + +export type * from '@univerjs/docs-ui/facade'; export interface IUniverDocsCorePresetConfig extends Pick { diff --git a/packages/preset-sheets-advanced/src/umd.ts b/packages/preset-sheets-advanced/src/umd.ts index cbada87..8e9b1c7 100644 --- a/packages/preset-sheets-advanced/src/umd.ts +++ b/packages/preset-sheets-advanced/src/umd.ts @@ -26,6 +26,14 @@ import '@univerjs-pro/sheets-print/lib/index.css'; import '@univerjs-pro/sheets-chart-ui/lib/index.css'; import '@univerjs-pro/sheets-sparkline-ui/lib/index.css'; +export type * from '@univerjs-pro/engine-formula/facade'; +export type * from '@univerjs-pro/exchange-client/facade'; +export type * from '@univerjs-pro/sheets-chart-ui/facade'; +export type * from '@univerjs-pro/sheets-pivot/facade'; +export type * from '@univerjs-pro/sheets-print/facade'; +export type * from '@univerjs-pro/sheets-sparkline/facade'; +export type * from '@univerjs/network/facade'; + export interface IUniverSheetsAdvancedPresetConfig { universerEndpoint?: string; license?: string; diff --git a/packages/preset-sheets-conditional-formatting/src/umd.ts b/packages/preset-sheets-conditional-formatting/src/umd.ts index 9776899..75179db 100644 --- a/packages/preset-sheets-conditional-formatting/src/umd.ts +++ b/packages/preset-sheets-conditional-formatting/src/umd.ts @@ -3,9 +3,11 @@ import type { IPreset } from './types'; import { UniverSheetsConditionalFormattingPlugin } from '@univerjs/sheets-conditional-formatting'; import { UniverSheetsConditionalFormattingUIPlugin } from '@univerjs/sheets-conditional-formatting-ui'; +import '@univerjs/sheets-conditional-formatting/facade'; + import '@univerjs/sheets-conditional-formatting-ui/lib/index.css'; -import '@univerjs/sheets-conditional-formatting/facade'; +export type * from '@univerjs/sheets-conditional-formatting/facade'; export function UniverSheetsConditionalFormattingPreset(): IPreset { return { diff --git a/packages/preset-sheets-core/src/umd.ts b/packages/preset-sheets-core/src/umd.ts index 10a15dd..a60dca7 100644 --- a/packages/preset-sheets-core/src/umd.ts +++ b/packages/preset-sheets-core/src/umd.ts @@ -31,6 +31,14 @@ import '@univerjs/sheets-ui/lib/index.css'; import '@univerjs/sheets-formula-ui/lib/index.css'; import '@univerjs/sheets-numfmt-ui/lib/index.css'; +export type * from '@univerjs/docs-ui/facade'; +export type * from '@univerjs/engine-formula/facade'; +export type * from '@univerjs/sheets-formula/facade'; +export type * from '@univerjs/sheets-numfmt/facade'; +export type * from '@univerjs/sheets-ui/facade'; +export type * from '@univerjs/sheets/facade'; +export type * from '@univerjs/ui/facade'; + export interface IUniverSheetsCorePresetConfig extends Pick, Pick { diff --git a/packages/preset-sheets-data-validation/src/umd.ts b/packages/preset-sheets-data-validation/src/umd.ts index fe0f83d..80d38a3 100644 --- a/packages/preset-sheets-data-validation/src/umd.ts +++ b/packages/preset-sheets-data-validation/src/umd.ts @@ -8,6 +8,8 @@ import '@univerjs/sheets-data-validation/facade'; import '@univerjs/sheets-data-validation-ui/lib/index.css'; +export type * from '@univerjs/sheets-data-validation/facade'; + export function UniverSheetsDataValidationPreset(): IPreset { return { plugins: [ diff --git a/packages/preset-sheets-drawing/src/umd.ts b/packages/preset-sheets-drawing/src/umd.ts index 01e239f..872a7c0 100644 --- a/packages/preset-sheets-drawing/src/umd.ts +++ b/packages/preset-sheets-drawing/src/umd.ts @@ -11,6 +11,8 @@ import '@univerjs/sheets-drawing-ui/facade'; import '@univerjs/drawing-ui/lib/index.css'; import '@univerjs/sheets-drawing-ui/lib/index.css'; +export type * from '@univerjs/sheets-drawing-ui/facade'; + export interface IUniverSheetsDrawingPresetConfig { collaboration?: boolean; } diff --git a/packages/preset-sheets-filter/src/umd.ts b/packages/preset-sheets-filter/src/umd.ts index a379cf6..6291b9e 100644 --- a/packages/preset-sheets-filter/src/umd.ts +++ b/packages/preset-sheets-filter/src/umd.ts @@ -7,6 +7,8 @@ import '@univerjs/sheets-filter/facade'; import '@univerjs/sheets-filter-ui/lib/index.css'; +export type * from '@univerjs/sheets-filter/facade'; + export function UniverSheetsFilterPreset(): IPreset { return { plugins: [ diff --git a/packages/preset-sheets-hyper-link/src/umd.ts b/packages/preset-sheets-hyper-link/src/umd.ts index 2b12f33..fd220fd 100644 --- a/packages/preset-sheets-hyper-link/src/umd.ts +++ b/packages/preset-sheets-hyper-link/src/umd.ts @@ -7,6 +7,8 @@ import '@univerjs/sheets-hyper-link/facade'; import '@univerjs/sheets-hyper-link-ui/lib/index.css'; +export type * from '@univerjs/sheets-hyper-link/facade'; + export function UniverSheetsHyperLinkPreset(): IPreset { return { plugins: [ diff --git a/packages/preset-sheets-node-core/src/umd.ts b/packages/preset-sheets-node-core/src/umd.ts index 8fe37cf..6ca9e87 100644 --- a/packages/preset-sheets-node-core/src/umd.ts +++ b/packages/preset-sheets-node-core/src/umd.ts @@ -18,6 +18,12 @@ import '@univerjs/sheets-data-validation/facade'; import '@univerjs/engine-formula/facade'; import '@univerjs/sheets-filter/facade'; +export type * from '@univerjs/engine-formula/facade'; +export type * from '@univerjs/sheets-data-validation/facade'; +export type * from '@univerjs/sheets-filter/facade'; +export type * from '@univerjs/sheets-formula/facade'; +export type * from '@univerjs/sheets/facade'; + export interface IUniverSheetsNodeCorePresetConfig { /** * The formula configuration. diff --git a/packages/preset-sheets-sort/src/umd.ts b/packages/preset-sheets-sort/src/umd.ts index ca00543..e879435 100644 --- a/packages/preset-sheets-sort/src/umd.ts +++ b/packages/preset-sheets-sort/src/umd.ts @@ -7,6 +7,8 @@ import '@univerjs/sheets-sort/facade'; import '@univerjs/sheets-sort-ui/lib/index.css'; +export type * from '@univerjs/sheets-sort/facade'; + export function UniverSheetsSortPreset(): IPreset { return { plugins: [ diff --git a/packages/preset-sheets-thread-comment/src/umd.ts b/packages/preset-sheets-thread-comment/src/umd.ts index 9a6cdf4..b63e697 100644 --- a/packages/preset-sheets-thread-comment/src/umd.ts +++ b/packages/preset-sheets-thread-comment/src/umd.ts @@ -7,6 +7,8 @@ import '@univerjs/sheets-thread-comment/facade'; import '@univerjs/thread-comment-ui/lib/index.css'; +export type * from '@univerjs/sheets-thread-comment/facade'; + export interface IUniverSheetsThreadCommentPresetConfig { } From 57ff6a24cbfa3286f77248a58f509dd7c3784a9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E7=86=B1?= Date: Wed, 8 Jan 2025 15:46:37 +0800 Subject: [PATCH 2/2] fix: remove unused exports --- packages/presets/src/umd.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/presets/src/umd.ts b/packages/presets/src/umd.ts index 141ca4e..22b7cb9 100644 --- a/packages/presets/src/umd.ts +++ b/packages/presets/src/umd.ts @@ -76,6 +76,3 @@ export function createUniver(options: CreateUniverOptions) { univerAPI, }; } - -export * from '@univerjs/core'; -export * from '@univerjs/design';