Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

refactor: remove UMD bundle infrastructure from presets (#7139)

白熱97402e44b7e3
diff --git a/common/shared/bin/index.mts b/common/shared/bin/index.mts
index eaa853cbf7..30f09ce1f5 100755
--- a/common/shared/bin/index.mts
+++ b/common/shared/bin/index.mts
@@ -7,10 +7,7 @@ import { build } from '../tsdown/index.ts';
interface IPresetCliBuildOptions {
cleanup?: boolean;
- skipUMD?: boolean;
tsdownConfigPath?: string;
- umdAdditionalFiles?: string[];
- umdDeps?: string[];
}
const argvs = process.argv.slice(2);
@@ -47,23 +44,10 @@ if (command === 'preset') {
} else if (presetCommand === 'build') {
const options: IPresetCliBuildOptions = {};
- if (presetArgs.includes('--skipUMD')) {
- options.skipUMD = true;
- }
if (presetArgs.includes('--cleanup')) {
options.cleanup = true;
}
- const umdDeps = collectOptionValues(presetArgs, '--umdDeps');
- if (umdDeps.length > 0) {
- options.umdDeps = umdDeps;
- }
-
- const umdAdditionalFiles = collectOptionValues(presetArgs, '--umdAdditionalFiles');
- if (umdAdditionalFiles.length > 0) {
- options.umdAdditionalFiles = umdAdditionalFiles;
- }
-
const configIdx = presetArgs.indexOf('--config');
if (configIdx !== -1 && presetArgs[configIdx + 1]) {
options.tsdownConfigPath = presetArgs[configIdx + 1];
diff --git a/common/shared/preset-build/constants.ts b/common/shared/preset-build/constants.ts
index cf1b94a9e0..49a65f5c14 100644
--- a/common/shared/preset-build/constants.ts
+++ b/common/shared/preset-build/constants.ts
@@ -1,2 +1 @@
export const PRESET_LOCALE_SOURCE_DIR = 'src/locales';
-export const PRESET_UMD_OUTPUT_DIR = 'lib/umd';
diff --git a/common/shared/preset-build/entries.ts b/common/shared/preset-build/entries.ts
index 07787da5e2..088060504d 100644
--- a/common/shared/preset-build/entries.ts
+++ b/common/shared/preset-build/entries.ts
@@ -47,18 +47,3 @@ export function getPresetModuleEntries(packageDir: string): IEntryConfig[] {
return [...entries, ...getPresetLocaleEntries(packageDir)];
}
-
-export function getPresetUmdEntries(packageDir: string): IEntryConfig[] {
- const entries: IEntryConfig[] = [];
- const umdEntry = path.join(packageDir, 'src/umd.ts');
-
- if (existsSync(umdEntry)) {
- entries.push({
- key: 'index',
- path: umdEntry,
- type: 'index',
- });
- }
-
- return [...entries, ...getPresetLocaleEntries(packageDir)];
-}
diff --git a/common/shared/preset-build/index.ts b/common/shared/preset-build/index.ts
index b79a7199a9..856d57aa70 100644
--- a/common/shared/preset-build/index.ts
+++ b/common/shared/preset-build/index.ts
@@ -1,28 +1,19 @@
import type { TModuleFormat } from '../tsdown/configs/module.ts';
import type { IPackageJson } from '../tsdown/types.ts';
-import type { IPresetBuildConfig, IPresetBuildOptions, IPresetPackageJson } from './types.ts';
+import type { IPresetBuildOptions, IPresetPackageJson } from './types.ts';
import { existsSync, readFileSync, rmSync } from 'node:fs';
import path from 'node:path';
import process from 'node:process';
import { mergeConfig, build as tsdownBuild } from 'tsdown';
import { createModuleConfig } from '../tsdown/configs/module.ts';
-import { createUmdConfig } from '../tsdown/configs/umd.ts';
import { BUILD_OUTPUT_DIRECTORIES, CLEANUP_DIRECTORIES } from '../tsdown/constants.ts';
import { createBaseConfig, createInputPlugins } from '../tsdown/utils/base-config.ts';
-import { getPresetModuleEntries, getPresetUmdEntries } from './entries.ts';
+import { getPresetModuleEntries } from './entries.ts';
import { generatePresetLocales } from './locale.ts';
import { buildPresetStyles } from './style.ts';
-import { prependPresetUmd } from './umd.ts';
export { generatePresetLocales } from './locale.ts';
-export type { IPresetBuildConfig, IPresetBuildOptions } from './types.ts';
-export { prependPresetUmd } from './umd.ts';
-
-const PRESET_BUILD_CONFIG_FILENAMES = [
- 'univer-preset.config.mjs',
- 'univer-preset.config.ts',
- 'univer-preset.config.js',
-] as const;
+export type { IPresetBuildOptions } from './types.ts';
function readPackageJson(packageDir: string): IPresetPackageJson {
return JSON.parse(readFileSync(path.join(packageDir, 'package.json'), 'utf8')) as IPresetPackageJson;
@@ -63,48 +54,6 @@ function mergeUserConfig(configs: any[], userConfig: any) {
return configs.map((config) => mergeConfig(config, userConfig));
}
-async function loadPresetBuildConfig(packageDir: string): Promise<IPresetBuildConfig> {
- for (const filename of PRESET_BUILD_CONFIG_FILENAMES) {
- const configPath = path.resolve(packageDir, filename);
- if (!existsSync(configPath)) {
- continue;
- }
-
- let presetBuildConfig = (await import(configPath)).default;
- if (typeof presetBuildConfig === 'function') {
- presetBuildConfig = await presetBuildConfig();
- }
-
- return presetBuildConfig ?? {};
- }
-
- return {};
-}
-
-function mergeArrayOption(configValues?: string[], optionValues?: string[]) {
- return [...new Set([
- ...(configValues ?? []),
- ...(optionValues ?? []),
- ])];
-}
-
-export function resolvePresetBuildOptions(presetBuildConfig: IPresetBuildConfig = {}, options: IPresetBuildOptions = {}): IPresetBuildOptions {
- const resolvedOptions: IPresetBuildOptions = {
- ...options,
- };
- const umdDeps = mergeArrayOption(presetBuildConfig?.umdDeps, options.umdDeps);
- const umdAdditionalFiles = mergeArrayOption(presetBuildConfig?.umdAdditionalFiles, options.umdAdditionalFiles);
-
- if (umdDeps.length > 0) {
- resolvedOptions.umdDeps = umdDeps;
- }
- if (umdAdditionalFiles.length > 0) {
- resolvedOptions.umdAdditionalFiles = umdAdditionalFiles;
- }
-
- return resolvedOptions;
-}
-
export function createPresetModuleEntryGroups(entries: ReturnType<typeof getPresetModuleEntries>) {
const primaryEntries = entries.filter((entry) => entry.type === 'index' || entry.type === 'locale');
const isolatedEntries = entries.filter((entry) => entry.type !== 'index' && entry.type !== 'locale');
@@ -138,10 +87,8 @@ export function preparePresetPackage(packageDir = process.cwd()) {
export async function buildPresetPackage(options: IPresetBuildOptions = {}) {
const packageDir = process.cwd();
const packageJson = readPackageJson(packageDir);
- const presetBuildConfig = await loadPresetBuildConfig(packageDir);
- const resolvedOptions = resolvePresetBuildOptions(presetBuildConfig, options);
- if (resolvedOptions.cleanup) {
+ if (options.cleanup) {
removePresetOutputs(packageDir);
}
@@ -155,7 +102,7 @@ export async function buildPresetPackage(options: IPresetBuildOptions = {}) {
plugins: [],
});
const plugins = createInputPlugins(packageDir);
- const userConfig = await loadUserConfig(resolvedOptions, packageDir);
+ const userConfig = await loadUserConfig(options, packageDir);
const moduleFormats: TModuleFormat[] = ['esm', 'cjs'];
const moduleConfigs = createPresetModuleEntryGroups(getPresetModuleEntries(packageDir)).flatMap((entries) => {
return moduleFormats.map((format) => createModuleConfig({
@@ -176,33 +123,7 @@ export async function buildPresetPackage(options: IPresetBuildOptions = {}) {
}
await buildPresetStyles({
- baseConfig,
packageDir,
packageJson,
- plugins,
- });
-
- if (resolvedOptions.skipUMD) {
- return;
- }
-
- const umdConfigs = getPresetUmdEntries(packageDir).map((entry) => createUmdConfig({
- baseConfig,
- enableObfuscation: false,
- entry,
- outDir: BUILD_OUTPUT_DIRECTORIES.umd,
- packageDir,
- packageName: packageJson.name,
- plugins,
- }));
-
- for (const config of mergeUserConfig(umdConfigs, userConfig)) {
- await tsdownBuild(config);
- }
-
- prependPresetUmd({
- packageDir,
- umdAdditionalFiles: resolvedOptions.umdAdditionalFiles,
- umdDeps: resolvedOptions.umdDeps,
});
}
diff --git a/common/shared/preset-build/style.ts b/common/shared/preset-build/style.ts
index 6a071018b7..c4781c8c98 100644
--- a/common/shared/preset-build/style.ts
+++ b/common/shared/preset-build/style.ts
@@ -1,93 +1,58 @@
-import type { UserConfig } from 'tsdown';
import type { IPresetPackageJson } from './types.ts';
-import { existsSync, mkdirSync, rmSync, writeFileSync } from 'node:fs';
+import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
import path from 'node:path';
-import { defineConfig, build as tsdownBuild } from 'tsdown';
-import { createOutputAliasPlugin } from '../tsdown/plugins/output-alias.ts';
-
-const PRESET_STYLE_TEMP_DIR = '.preset-build';
-const PRESET_STYLE_OUTPUT_DIR = 'lib/.preset-style';
function getDependencyDir(packageDir: string, dependencyName: string) {
return path.join(packageDir, 'node_modules', dependencyName);
}
-function getStyleDependencyNames(packageDir: string, packageJson: IPresetPackageJson) {
+function getBuiltStyleDependencyCssFiles(packageDir: string, packageJson: IPresetPackageJson) {
return Object.keys(packageJson.dependencies ?? {})
- .filter((dependencyName) => {
+ .flatMap((dependencyName) => {
if (!dependencyName.startsWith('@univerjs')) {
- return false;
+ return [];
}
- return existsSync(path.join(getDependencyDir(packageDir, dependencyName), 'src/global.css'));
- })
- .sort((left, right) => left.localeCompare(right));
-}
+ const dependencyDir = getDependencyDir(packageDir, dependencyName);
+ const sourceGlobalCss = path.join(dependencyDir, 'src/global.css');
+ const builtCss = path.join(dependencyDir, 'lib/index.css');
-function normalizePath(filePath: string) {
- return filePath.split(path.sep).join('/');
-}
+ if (!existsSync(sourceGlobalCss)) {
+ return [];
+ }
-function writeStyleEntry(packageDir: string, dependencyNames: string[]) {
- const tempDir = path.join(packageDir, PRESET_STYLE_TEMP_DIR);
- const entryFile = path.join(tempDir, 'style.ts');
+ if (!existsSync(builtCss)) {
+ throw new Error(`Missing built CSS for ${dependencyName}. Build dependency packages before building preset CSS.`);
+ }
- mkdirSync(tempDir, { recursive: true });
+ return [builtCss];
+ });
+}
- const content = dependencyNames
- .map((dependencyName) => {
- const dependencyCss = normalizePath(path.join(getDependencyDir(packageDir, dependencyName), 'src/global.css'));
- return `import ${JSON.stringify(dependencyCss)};`;
- })
- .join('\n');
+function writePresetCss(packageDir: string, cssFiles: string[]) {
+ const outputFile = path.join(packageDir, 'lib/index.css');
- writeFileSync(entryFile, `${content}\n`);
+ mkdirSync(path.dirname(outputFile), { recursive: true });
- return entryFile;
-}
+ const content = cssFiles
+ .map((cssFile) => readFileSync(cssFile, 'utf8').trimEnd())
+ .filter(Boolean)
+ .join('\n');
-function cleanup(packageDir: string) {
- rmSync(path.join(packageDir, PRESET_STYLE_TEMP_DIR), { force: true, recursive: true });
- rmSync(path.join(packageDir, PRESET_STYLE_OUTPUT_DIR), { force: true, recursive: true });
+ writeFileSync(outputFile, `${content}\n`);
}
export async function buildPresetStyles(options: {
- baseConfig: Partial<UserConfig>;
packageDir: string;
packageJson: IPresetPackageJson;
- plugins: any[];
}) {
- const { baseConfig, packageDir, packageJson, plugins } = options;
- const dependencyNames = getStyleDependencyNames(packageDir, packageJson);
+ const { packageDir, packageJson } = options;
+ const cssFiles = getBuiltStyleDependencyCssFiles(packageDir, packageJson);
- if (dependencyNames.length === 0) {
+ if (cssFiles.length === 0) {
rmSync(path.join(packageDir, 'lib/index.css'), { force: true });
return;
}
- const entryFile = writeStyleEntry(packageDir, dependencyNames);
-
- try {
- await tsdownBuild(defineConfig({
- ...baseConfig,
- dts: false,
- entry: { index: entryFile },
- format: 'esm',
- outDir: PRESET_STYLE_OUTPUT_DIR,
- outputOptions: {
- entryFileNames: '[name].js',
- minify: true,
- },
- plugins: [
- ...plugins,
- createOutputAliasPlugin({
- copyToRoot: false,
- keepRootIndexCss: true,
- packageDir,
- }),
- ],
- }));
- } finally {
- cleanup(packageDir);
- }
+ writePresetCss(packageDir, cssFiles);
}
diff --git a/common/shared/preset-build/types.ts b/common/shared/preset-build/types.ts
index 82ebc61ca4..29d887f52c 100644
--- a/common/shared/preset-build/types.ts
+++ b/common/shared/preset-build/types.ts
@@ -1,13 +1,8 @@
export interface IPresetBuildOptions {
cleanup?: boolean;
- skipUMD?: boolean;
tsdownConfigPath?: string;
- umdAdditionalFiles?: string[];
- umdDeps?: string[];
}
-export type IPresetBuildConfig = Pick<IPresetBuildOptions, 'umdAdditionalFiles' | 'umdDeps'>;
-
export interface IPresetPackageJson {
dependencies?: Record<string, string>;
devDependencies?: Record<string, string>;
@@ -18,9 +13,3 @@ export interface IPresetPackageJson {
export interface IGeneratePresetLocalesOptions {
packageDir: string;
}
-
-export interface IPrependPresetUmdOptions {
- packageDir: string;
- umdAdditionalFiles?: string[];
- umdDeps?: string[];
-}
diff --git a/common/shared/preset-build/umd.ts b/common/shared/preset-build/umd.ts
deleted file mode 100644
index d74c27b026..0000000000
--- a/common/shared/preset-build/umd.ts
+++ /dev/null
@@ -1,114 +0,0 @@
-import type { IPrependPresetUmdOptions } from './types.ts';
-import { existsSync, readFileSync, writeFileSync } from 'node:fs';
-import path from 'node:path';
-import { discoverUniverUiLocales } from '../locale/index.ts';
-import { PRESET_UMD_OUTPUT_DIR } from './constants.ts';
-
-function readRequiredFile(filePath: string, label: string) {
- if (!existsSync(filePath)) {
- throw new Error(`Missing ${label}: ${filePath}`);
- }
-
- return readFileSync(filePath, 'utf8');
-}
-
-function getDependencyDir(packageDir: string, dependencyName: string) {
- return path.join(packageDir, 'node_modules', dependencyName);
-}
-
-function getDependencyLocaleUmdFile(packageDir: string, dependencyName: string, locale: string) {
- const dependencyDir = getDependencyDir(packageDir, dependencyName);
- const localeFile = path.join(dependencyDir, 'lib/umd/locale', `${locale}.js`);
-
- if (existsSync(localeFile)) {
- return {
- filePath: localeFile,
- label: `${dependencyName}/locale/${locale}`,
- };
- }
-
- const localesFile = path.join(dependencyDir, 'lib/umd/locales', `${locale}.js`);
-
- if (existsSync(localesFile)) {
- return {
- filePath: localesFile,
- label: `${dependencyName}/locales/${locale}`,
- };
- }
-
- return null;
-}
-
-function prependFile(outputFile: string, chunks: Array<[string, string]>) {
- if (!existsSync(outputFile)) {
- return;
- }
-
- const ownContent = readFileSync(outputFile, 'utf8');
- const content = [
- ...chunks.map(([label, value]) => `// ${label}\n${value}`),
- `// index\n${ownContent}`,
- ].join('\n\n');
-
- writeFileSync(outputFile, content);
-}
-
-export function prependPresetUmd(options: IPrependPresetUmdOptions): void {
- const { packageDir, umdAdditionalFiles = [], umdDeps = [] } = options;
- const outputDir = path.join(packageDir, PRESET_UMD_OUTPUT_DIR);
- const rootOutput = path.join(outputDir, 'index.js');
- const rootChunks: Array<[string, string]> = [];
- const rootFacadeChunks: Array<[string, string]> = [];
-
- for (const file of umdAdditionalFiles) {
- rootChunks.push([file, readRequiredFile(file, `additional UMD file ${file}`)]);
- }
-
- for (const dependencyName of umdDeps) {
- const dependencyDir = getDependencyDir(packageDir, dependencyName);
- const dependencyUmd = path.join(dependencyDir, 'lib/umd/index.js');
- const dependencyFacade = path.join(dependencyDir, 'lib/umd/facade.js');
-
- rootChunks.push([
- `${dependencyName}/index`,
- readRequiredFile(dependencyUmd, `UMD dependency ${dependencyName}`),
- ]);
-
- if (existsSync(dependencyFacade)) {
- rootFacadeChunks.push([
- `${dependencyName}/facade`,
- readFileSync(dependencyFacade, 'utf8'),
- ]);
- }
- }
-
- prependFile(rootOutput, [...rootChunks, ...rootFacadeChunks]);
-
- const localeOutputDir = path.join(outputDir, 'locales');
- if (!existsSync(localeOutputDir)) {
- return;
- }
-
- for (const locale of discoverUniverUiLocales({ rootDir: packageDir })) {
- const localeOutput = path.join(outputDir, 'locales', `${locale}.js`);
-
- if (!existsSync(localeOutput)) {
- continue;
- }
-
- const localeChunks: Array<[string, string]> = [];
-
- for (const dependencyName of umdDeps) {
- const dependencyLocaleFile = getDependencyLocaleUmdFile(packageDir, dependencyName, locale);
-
- if (dependencyLocaleFile !== null) {
- localeChunks.push([
- dependencyLocaleFile.label,
- readFileSync(dependencyLocaleFile.filePath, 'utf8'),
- ]);
- }
- }
-
- prependFile(localeOutput, localeChunks);
- }
-}
diff --git a/examples/umd/presets-docs.html b/examples/umd/presets-docs.html
deleted file mode 100644
index b825e9d247..0000000000
--- a/examples/umd/presets-docs.html
+++ /dev/null
@@ -1,150 +0,0 @@
-<head>
- <script
- src="https://unpkg.com/[email protected]/umd/react.production.min.js"
- integrity="sha384-DGyLxAyjq0f9SPpVevD6IgztCFlnMF6oW/XQGmfe+IsZ8TqEiDrcHkMLKI6fiB/Z"
- crossorigin="anonymous"
- ></script>
- <script
- src="https://unpkg.com/[email protected]/umd/react-dom.production.min.js"
- integrity="sha384-gTGxhz21lVGYNMcdJOyq01Edg0jhn/c22nsx0kyqP0TxaV5WVdsSH1fSDUf5YJj1"
- crossorigin="anonymous"
- ></script>
- <script>
- /**
- * Starting from Univer 0.6.0, with the support for React 19[^1], UMD users may need additional adaptation.
- * It is recommended to migrate to module script[^2] and a more modern build system.
- *
- * [^1]: [Module Script] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#applying_the_module_to_your_html
- * [^2]: [support for React 19] https://github.com/dream-num/univer/pull/4247
- */
-
- /**
- * Fix `Uncaught TypeError: client.createRoot is not a function`
- * If using UMD React < 18, you might need the following code.
- */
- (function (global) {
- 'use strict';
- if (!global.ReactDOM) {
- throw new Error('ReactDOM must be loaded before ReactCreateRoot.');
- }
- const ReactDOM = global.ReactDOM;
- if (!ReactDOM.createRoot) {
- ReactDOM.createRoot = function (container) {
- return {
- render: (element) => {
- ReactDOM.render(element, container);
- },
- };
- };
- }
- })(this);
-
- /**
- * Fix `Uncaught TypeError: jsxRuntime.jsx is not a function`
- * If using UMD React, you might need the following code.
- * Reference: https://unpkg.com/[email protected]/cjs/react-jsx-runtime.production.min.js
- */
- (function (global) {
- 'use strict';
- if (!global.React) {
- throw new Error('React must be loaded before ReactJSXRuntime.');
- }
- const React = global.React;
- if (!React.jsx || !React.jsxs) {
- const REACT_ELEMENT_TYPE = Symbol.for('react.element');
- const hasOwnProperty = Object.prototype.hasOwnProperty;
- const RESERVED_PROPS = {
- key: true,
- ref: true,
- __self: true,
- __source: true,
- };
- const ReactCurrentOwner = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner;
- function createReactElement(type, config, maybeKey) {
- const props = {};
- let key = null;
- let ref = null;
- if (maybeKey !== undefined) {
- key = `${maybeKey}`;
- }
- if (config.key !== undefined) {
- key = `${config.key}`;
- }
- if (config.ref !== undefined) {
- ref = config.ref;
- }
- for (var propName in config) {
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
- props[propName] = config[propName];
- }
- }
- if (type && type.defaultProps) {
- const defaultProps = type.defaultProps;
- for (var propName in defaultProps) {
- if (props[propName] === undefined) {
- props[propName] = defaultProps[propName];
- }
- }
- }
- return {
- $$typeof: REACT_ELEMENT_TYPE,
- type,
- key,
- ref,
- props,
- _owner: ReactCurrentOwner.current,
- };
- }
- React.jsx = createReactElement;
- React.jsxs = createReactElement;
- }
- })(this);
- </script>
- <script
- src="https://unpkg.com/[email protected]/dist/bundles/rxjs.umd.min.js"
- integrity="sha384-Opyi337NBU4M11Xx1aRUN4dZejlRWsq277uHWHyysNm4frJzmqu7KvgkHu4YWTqk"
- crossorigin="anonymous"
- ></script>
- <script src="/presets/lib/umd/index.js"></script>
- <script src="/presets/packages/preset-docs-core/lib/umd/index.js"></script>
- <script src="/presets/packages/preset-docs-core/lib/umd/locales/en-US.js"></script>
-
- <link rel="stylesheet" href="/presets/packages/preset-docs-core/lib/index.css" />
-
- <style>
- html,
- body,
- #root,
- #app {
- padding: 0;
- margin: 0;
- height: 100%;
- }
- </style>
-</head>
-<body>
- <div id="app"></div>
-
- <script>
- const { LocaleType, mergeLocales, UniverInstanceType } = UniverCore;
- const { createUniver } = UniverPresets;
- const { UniverDocsCorePreset } = UniverPresetDocsCore;
-
- const { univer, univerAPI } = createUniver({
- locale: LocaleType.EN_US,
- locales: {
- [LocaleType.EN_US]: mergeLocales(UniverPresetDocsCoreEnUS),
- },
- presets: [
- UniverDocsCorePreset({
- container: 'app',
- }),
- ],
- });
-
- univer.createUnit(UniverInstanceType.UNIVER_DOC, {});
-
- window.univer = univer;
- window.univerAPI = univerAPI;
- </script>
-</body>
diff --git a/examples/umd/presets-sheets.html b/examples/umd/presets-sheets.html
deleted file mode 100644
index fcb6d93ef9..0000000000
--- a/examples/umd/presets-sheets.html
+++ /dev/null
@@ -1,150 +0,0 @@
-<head>
- <script
- src="https://unpkg.com/[email protected]/umd/react.production.min.js"
- integrity="sha384-DGyLxAyjq0f9SPpVevD6IgztCFlnMF6oW/XQGmfe+IsZ8TqEiDrcHkMLKI6fiB/Z"
- crossorigin="anonymous"
- ></script>
- <script
- src="https://unpkg.com/[email protected]/umd/react-dom.production.min.js"
- integrity="sha384-gTGxhz21lVGYNMcdJOyq01Edg0jhn/c22nsx0kyqP0TxaV5WVdsSH1fSDUf5YJj1"
- crossorigin="anonymous"
- ></script>
- <script>
- /**
- * Starting from Univer 0.6.0, with the support for React 19[^1], UMD users may need additional adaptation.
- * It is recommended to migrate to module script[^2] and a more modern build system.
- *
- * [^1]: [Module Script] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#applying_the_module_to_your_html
- * [^2]: [support for React 19] https://github.com/dream-num/univer/pull/4247
- */
-
- /**
- * Fix `Uncaught TypeError: client.createRoot is not a function`
- * If using UMD React < 18, you might need the following code.
- */
- (function (global) {
- 'use strict';
- if (!global.ReactDOM) {
- throw new Error('ReactDOM must be loaded before ReactCreateRoot.');
- }
- const ReactDOM = global.ReactDOM;
- if (!ReactDOM.createRoot) {
- ReactDOM.createRoot = function (container) {
- return {
- render: (element) => {
- ReactDOM.render(element, container);
- },
- };
- };
- }
- })(this);
-
- /**
- * Fix `Uncaught TypeError: jsxRuntime.jsx is not a function`
- * If using UMD React, you might need the following code.
- * Reference: https://unpkg.com/[email protected]/cjs/react-jsx-runtime.production.min.js
- */
- (function (global) {
- 'use strict';
- if (!global.React) {
- throw new Error('React must be loaded before ReactJSXRuntime.');
- }
- const React = global.React;
- if (!React.jsx || !React.jsxs) {
- const REACT_ELEMENT_TYPE = Symbol.for('react.element');
- const hasOwnProperty = Object.prototype.hasOwnProperty;
- const RESERVED_PROPS = {
- key: true,
- ref: true,
- __self: true,
- __source: true,
- };
- const ReactCurrentOwner = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner;
- function createReactElement(type, config, maybeKey) {
- const props = {};
- let key = null;
- let ref = null;
- if (maybeKey !== undefined) {
- key = `${maybeKey}`;
- }
- if (config.key !== undefined) {
- key = `${config.key}`;
- }
- if (config.ref !== undefined) {
- ref = config.ref;
- }
- for (var propName in config) {
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
- props[propName] = config[propName];
- }
- }
- if (type && type.defaultProps) {
- const defaultProps = type.defaultProps;
- for (var propName in defaultProps) {
- if (props[propName] === undefined) {
- props[propName] = defaultProps[propName];
- }
- }
- }
- return {
- $$typeof: REACT_ELEMENT_TYPE,
- type,
- key,
- ref,
- props,
- _owner: ReactCurrentOwner.current,
- };
- }
- React.jsx = createReactElement;
- React.jsxs = createReactElement;
- }
- })(this);
- </script>
- <script
- src="https://unpkg.com/[email protected]/dist/bundles/rxjs.umd.min.js"
- integrity="sha384-Opyi337NBU4M11Xx1aRUN4dZejlRWsq277uHWHyysNm4frJzmqu7KvgkHu4YWTqk"
- crossorigin="anonymous"
- ></script>
- <script src="/presets/lib/umd/index.js"></script>
- <script src="/presets/packages/preset-sheets-core/lib/umd/index.js"></script>
- <script src="/presets/packages/preset-sheets-core/lib/umd/locales/en-US.js"></script>
-
- <link rel="stylesheet" href="/presets/packages/preset-sheets-core/lib/index.css" />
-
- <style>
- html,
- body,
- #root,
- #app {
- padding: 0;
- margin: 0;
- height: 100%;
- }
- </style>
-</head>
-<body>
- <div id="app"></div>
-
- <script>
- const { LocaleType, mergeLocales } = UniverCore;
- const { createUniver } = UniverPresets;
- const { UniverSheetsCorePreset } = UniverPresetSheetsCore;
-
- const { univer, univerAPI } = createUniver({
- locale: LocaleType.EN_US,
- locales: {
- [LocaleType.EN_US]: mergeLocales(UniverPresetSheetsCoreEnUS),
- },
- presets: [
- UniverSheetsCorePreset({
- container: 'app',
- }),
- ],
- });
-
- univerAPI.createWorkbook({});
-
- window.univer = univer;
- window.univerAPI = univerAPI;
- </script>
-</body>
diff --git a/presets/packages/preset-docs-core/README.md b/presets/packages/preset-docs-core/README.md
index 918ce6181e..337a737865 100644
--- a/presets/packages/preset-docs-core/README.md
+++ b/presets/packages/preset-docs-core/README.md
@@ -8,9 +8,9 @@
## Package Overview
-| Package | UMD global | CSS | Locales | Facade entry |
-| ---------------------------- | ---------------------- | :-: | :-----: | :----------: |
-| `@univerjs/preset-docs-core` | `UniverDocsCorePreset` | Yes | Yes | Yes |
+| Package | CSS | Locales | Facade entry |
+| ---------------------------- | :-: | :-----: | :----------: |
+| `@univerjs/preset-docs-core` | Yes | Yes | Yes |
## Installation
diff --git a/presets/packages/preset-docs-core/src/index.ts b/presets/packages/preset-docs-core/src/index.ts
index a3869265cd..44be083700 100644
--- a/presets/packages/preset-docs-core/src/index.ts
+++ b/presets/packages/preset-docs-core/src/index.ts
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-export * from './umd';
-
+export * from './preset';
export * from '@univerjs/design';
export * from '@univerjs/docs';
export * from '@univerjs/docs-ui';
diff --git a/presets/packages/preset-docs-core/src/umd.ts b/presets/packages/preset-docs-core/src/preset.ts
similarity index 100%
rename from presets/packages/preset-docs-core/src/umd.ts
rename to presets/packages/preset-docs-core/src/preset.ts
diff --git a/presets/packages/preset-docs-core/univer-preset.config.mjs b/presets/packages/preset-docs-core/univer-preset.config.mjs
deleted file mode 100644
index 344c9608ae..0000000000
--- a/presets/packages/preset-docs-core/univer-preset.config.mjs
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.
- */
-
-const config = {
- umdDeps: [
- '@univerjs/design',
- '@univerjs/ui',
- '@univerjs/docs',
- '@univerjs/docs-ui',
- ],
-};
-
-export default config;
diff --git a/presets/packages/preset-docs-drawing/README.md b/presets/packages/preset-docs-drawing/README.md
index a0fa91af56..94c008b9f3 100644
--- a/presets/packages/preset-docs-drawing/README.md
+++ b/presets/packages/preset-docs-drawing/README.md
@@ -8,9 +8,9 @@
## Package Overview
-| Package | UMD global | CSS | Locales | Facade entry |
-| ------------------------------- | ------------------------- | :-: | :-----: | :----------: |
-| `@univerjs/preset-docs-drawing` | `UniverDocsDrawingPreset` | Yes | Yes | No |
+| Package | CSS | Locales | Facade entry |
+| ------------------------------- | :-: | :-----: | :----------: |
+| `@univerjs/preset-docs-drawing` | Yes | Yes | No |
## Installation
diff --git a/presets/packages/preset-docs-drawing/src/index.ts b/presets/packages/preset-docs-drawing/src/index.ts
index 7c876ce2a1..07e3aad785 100644
--- a/presets/packages/preset-docs-drawing/src/index.ts
+++ b/presets/packages/preset-docs-drawing/src/index.ts
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-export * from './umd';
-
+export * from './preset';
export * from '@univerjs/docs-drawing';
export * from '@univerjs/docs-drawing-ui';
export * from '@univerjs/drawing';
diff --git a/presets/packages/preset-docs-drawing/src/umd.ts b/presets/packages/preset-docs-drawing/src/preset.ts
similarity index 100%
rename from presets/packages/preset-docs-drawing/src/umd.ts
rename to presets/packages/preset-docs-drawing/src/preset.ts
diff --git a/presets/packages/preset-docs-drawing/univer-preset.config.mjs b/presets/packages/preset-docs-drawing/univer-preset.config.mjs
deleted file mode 100644
index aae9b26fec..0000000000
--- a/presets/packages/preset-docs-drawing/univer-preset.config.mjs
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * 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.
- */
-
-const config = {
- umdDeps: [
- '@univerjs/drawing-ui',
- '@univerjs/docs-drawing',
- '@univerjs/docs-drawing-ui',
- ],
-};
-
-export default config;
diff --git a/presets/packages/preset-docs-hyper-link/README.md b/presets/packages/preset-docs-hyper-link/README.md
index 6634fa4778..5a1e537d35 100644
--- a/presets/packages/preset-docs-hyper-link/README.md
+++ b/presets/packages/preset-docs-hyper-link/README.md
@@ -8,9 +8,9 @@
## Package Overview
-| Package | UMD global | CSS | Locales | Facade entry |
-| ---------------------------------- | --------------------------- | :-: | :-----: | :----------: |
-| `@univerjs/preset-docs-hyper-link` | `UniverDocsHyperLinkPreset` | Yes | Yes | No |
+| Package | CSS | Locales | Facade entry |
+| ---------------------------------- | :-: | :-----: | :----------: |
+| `@univerjs/preset-docs-hyper-link` | Yes | Yes | No |
## Installation
diff --git a/presets/packages/preset-docs-hyper-link/src/index.ts b/presets/packages/preset-docs-hyper-link/src/index.ts
index 42a2377746..51264dcb96 100644
--- a/presets/packages/preset-docs-hyper-link/src/index.ts
+++ b/presets/packages/preset-docs-hyper-link/src/index.ts
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-export * from './umd';
-
+export * from './preset';
export * from '@univerjs/docs-hyper-link';
export * from '@univerjs/docs-hyper-link-ui';
diff --git a/presets/packages/preset-docs-hyper-link/src/umd.ts b/presets/packages/preset-docs-hyper-link/src/preset.ts
similarity index 100%
rename from presets/packages/preset-docs-hyper-link/src/umd.ts
rename to presets/packages/preset-docs-hyper-link/src/preset.ts
diff --git a/presets/packages/preset-docs-hyper-link/univer-preset.config.mjs b/presets/packages/preset-docs-hyper-link/univer-preset.config.mjs
deleted file mode 100644
index 8e982a22f8..0000000000
--- a/presets/packages/preset-docs-hyper-link/univer-preset.config.mjs
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * 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.
- */
-
-const config = {
- umdDeps: [
- '@univerjs/docs-hyper-link',
- '@univerjs/docs-hyper-link-ui',
- ],
-};
-
-export default config;
diff --git a/presets/packages/preset-docs-node-core/README.md b/presets/packages/preset-docs-node-core/README.md
index 7f15d561ab..49266ffae6 100644
--- a/presets/packages/preset-docs-node-core/README.md
+++ b/presets/packages/preset-docs-node-core/README.md
@@ -8,9 +8,9 @@
## Package Overview
-| Package | UMD global | CSS | Locales | Facade entry |
-| --------------------------------- | -------------------------- | :-: | :-----: | :----------: |
-| `@univerjs/preset-docs-node-core` | `UniverDocsNodeCorePreset` | No | Yes | Yes |
+| Package | CSS | Locales | Facade entry |
+| --------------------------------- | :-: | :-----: | :----------: |
+| `@univerjs/preset-docs-node-core` | No | Yes | Yes |
## Installation
diff --git a/presets/packages/preset-docs-node-core/src/index.ts b/presets/packages/preset-docs-node-core/src/index.ts
index 6fb58e9fbd..03cbb17723 100644
--- a/presets/packages/preset-docs-node-core/src/index.ts
+++ b/presets/packages/preset-docs-node-core/src/index.ts
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-export * from './umd';
-
+export * from './preset';
export * from '@univerjs/docs';
export * from '@univerjs/docs-drawing';
export * from '@univerjs/docs-hyper-link';
diff --git a/presets/packages/preset-docs-node-core/src/umd.ts b/presets/packages/preset-docs-node-core/src/preset.ts
similarity index 100%
rename from presets/packages/preset-docs-node-core/src/umd.ts
rename to presets/packages/preset-docs-node-core/src/preset.ts
diff --git a/presets/packages/preset-docs-node-core/univer-preset.config.mjs b/presets/packages/preset-docs-node-core/univer-preset.config.mjs
deleted file mode 100644
index 9f117a86c3..0000000000
--- a/presets/packages/preset-docs-node-core/univer-preset.config.mjs
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.
- */
-
-const config = {
- umdDeps: [
- '@univerjs/docs',
- '@univerjs/rpc-node',
- '@univerjs/docs-hyper-link',
- '@univerjs/thread-comment',
- ],
-};
-
-export default config;
diff --git a/presets/packages/preset-docs-thread-comment/README.md b/presets/packages/preset-docs-thread-comment/README.md
index ce8f80aa06..a07acfe9ac 100644
--- a/presets/packages/preset-docs-thread-comment/README.md
+++ b/presets/packages/preset-docs-thread-comment/README.md
@@ -8,9 +8,9 @@
## Package Overview
-| Package | UMD global | CSS | Locales | Facade entry |
-| -------------------------------------- | ------------------------------- | :-: | :-----: | :----------: |
-| `@univerjs/preset-docs-thread-comment` | `UniverDocsThreadCommentPreset` | Yes | Yes | No |
+| Package | CSS | Locales | Facade entry |
+| -------------------------------------- | :-: | :-----: | :----------: |
+| `@univerjs/preset-docs-thread-comment` | Yes | Yes | No |
## Installation
diff --git a/presets/packages/preset-docs-thread-comment/src/index.ts b/presets/packages/preset-docs-thread-comment/src/index.ts
index 6f272b5431..c7c2e4dc07 100644
--- a/presets/packages/preset-docs-thread-comment/src/index.ts
+++ b/presets/packages/preset-docs-thread-comment/src/index.ts
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-export * from './umd';
-
+export * from './preset';
export * from '@univerjs/docs-thread-comment-ui';
export * from '@univerjs/thread-comment-ui';
diff --git a/presets/packages/preset-docs-thread-comment/src/umd.ts b/presets/packages/preset-docs-thread-comment/src/preset.ts
similarity index 100%
rename from presets/packages/preset-docs-thread-comment/src/umd.ts
rename to presets/packages/preset-docs-thread-comment/src/preset.ts
diff --git a/presets/packages/preset-docs-thread-comment/univer-preset.config.mjs b/presets/packages/preset-docs-thread-comment/univer-preset.config.mjs
deleted file mode 100644
index 090705b97d..0000000000
--- a/presets/packages/preset-docs-thread-comment/univer-preset.config.mjs
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * 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.
- */
-
-const config = {
- umdDeps: [
- '@univerjs/thread-comment',
- '@univerjs/thread-comment-ui',
- '@univerjs/docs-thread-comment-ui',
- ],
-};
-
-export default config;
diff --git a/presets/packages/preset-sheets-conditional-formatting/README.md b/presets/packages/preset-sheets-conditional-formatting/README.md
index 97a36b0a16..25247cc631 100644
--- a/presets/packages/preset-sheets-conditional-formatting/README.md
+++ b/presets/packages/preset-sheets-conditional-formatting/README.md
@@ -8,9 +8,9 @@
## Package Overview
-| Package | UMD global | CSS | Locales | Facade entry |
-| ------------------------------------------------ | ----------------------------------------- | :-: | :-----: | :----------: |
-| `@univerjs/preset-sheets-conditional-formatting` | `UniverSheetsConditionalFormattingPreset` | Yes | Yes | Yes |
+| Package | CSS | Locales | Facade entry |
+| ------------------------------------------------ | :-: | :-----: | :----------: |
+| `@univerjs/preset-sheets-conditional-formatting` | Yes | Yes | Yes |
## Installation
diff --git a/presets/packages/preset-sheets-conditional-formatting/src/index.ts b/presets/packages/preset-sheets-conditional-formatting/src/index.ts
index 5f2f0313e5..416a38057b 100644
--- a/presets/packages/preset-sheets-conditional-formatting/src/index.ts
+++ b/presets/packages/preset-sheets-conditional-formatting/src/index.ts
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-export * from './umd';
-
+export * from './preset';
export * from '@univerjs/sheets-conditional-formatting';
export * from '@univerjs/sheets-conditional-formatting-ui';
diff --git a/presets/packages/preset-sheets-conditional-formatting/src/umd.ts b/presets/packages/preset-sheets-conditional-formatting/src/preset.ts
similarity index 100%
rename from presets/packages/preset-sheets-conditional-formatting/src/umd.ts
rename to presets/packages/preset-sheets-conditional-formatting/src/preset.ts
diff --git a/presets/packages/preset-sheets-conditional-formatting/univer-preset.config.mjs b/presets/packages/preset-sheets-conditional-formatting/univer-preset.config.mjs
deleted file mode 100644
index 6c74c983fd..0000000000
--- a/presets/packages/preset-sheets-conditional-formatting/univer-preset.config.mjs
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * 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.
- */
-
-const config = {
- umdDeps: [
- '@univerjs/sheets-conditional-formatting',
- '@univerjs/sheets-conditional-formatting-ui',
- ],
-};
-
-export default config;
diff --git a/presets/packages/preset-sheets-core/README.md b/presets/packages/preset-sheets-core/README.md
index 0e441b92f1..5daa95d5ac 100644
--- a/presets/packages/preset-sheets-core/README.md
+++ b/presets/packages/preset-sheets-core/README.md
@@ -8,9 +8,9 @@
## Package Overview
-| Package | UMD global | CSS | Locales | Facade entry |
-| ------------------------------ | ------------------------ | :-: | :-----: | :----------: |
-| `@univerjs/preset-sheets-core` | `UniverSheetsCorePreset` | Yes | Yes | Yes |
+| Package | CSS | Locales | Facade entry |
+| ------------------------------ | :-: | :-----: | :----------: |
+| `@univerjs/preset-sheets-core` | Yes | Yes | Yes |
## Installation
diff --git a/presets/packages/preset-sheets-core/src/index.ts b/presets/packages/preset-sheets-core/src/index.ts
index 5830683522..538e9656ba 100644
--- a/presets/packages/preset-sheets-core/src/index.ts
+++ b/presets/packages/preset-sheets-core/src/index.ts
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-export * from './umd';
-
+export * from './preset';
export * from '@univerjs/design';
export * from '@univerjs/docs';
export * from '@univerjs/docs-ui';
diff --git a/presets/packages/preset-sheets-core/src/umd.ts b/presets/packages/preset-sheets-core/src/preset.ts
similarity index 100%
rename from presets/packages/preset-sheets-core/src/umd.ts
rename to presets/packages/preset-sheets-core/src/preset.ts
diff --git a/presets/packages/preset-sheets-core/univer-preset.config.mjs b/presets/packages/preset-sheets-core/univer-preset.config.mjs
deleted file mode 100644
index 3b46622cd2..0000000000
--- a/presets/packages/preset-sheets-core/univer-preset.config.mjs
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * 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.
- */
-
-const config = {
- umdDeps: [
- '@univerjs/design',
- '@univerjs/ui',
- '@univerjs/docs',
- '@univerjs/docs-ui',
- '@univerjs/sheets',
- '@univerjs/sheets-ui',
- '@univerjs/sheets-formula',
- '@univerjs/sheets-formula-ui',
- '@univerjs/sheets-numfmt',
- '@univerjs/sheets-numfmt-ui',
- ],
-};
-
-export default config;
diff --git a/presets/packages/preset-sheets-data-validation/README.md b/presets/packages/preset-sheets-data-validation/README.md
index f8dd8fccb8..a1df45400c 100644
--- a/presets/packages/preset-sheets-data-validation/README.md
+++ b/presets/packages/preset-sheets-data-validation/README.md
@@ -8,9 +8,9 @@
## Package Overview
-| Package | UMD global | CSS | Locales | Facade entry |
-| ----------------------------------------- | ---------------------------------- | :-: | :-----: | :----------: |
-| `@univerjs/preset-sheets-data-validation` | `UniverSheetsDataValidationPreset` | Yes | Yes | Yes |
+| Package | CSS | Locales | Facade entry |
+| ----------------------------------------- | :-: | :-----: | :----------: |
+| `@univerjs/preset-sheets-data-validation` | Yes | Yes | Yes |
## Installation
diff --git a/presets/packages/preset-sheets-data-validation/src/index.ts b/presets/packages/preset-sheets-data-validation/src/index.ts
index d80cf2641b..8f8cd1cf45 100644
--- a/presets/packages/preset-sheets-data-validation/src/index.ts
+++ b/presets/packages/preset-sheets-data-validation/src/index.ts
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-export * from './umd';
-
+export * from './preset';
export * from '@univerjs/data-validation';
export * from '@univerjs/sheets-data-validation';
export * from '@univerjs/sheets-data-validation-ui';
diff --git a/presets/packages/preset-sheets-data-validation/src/umd.ts b/presets/packages/preset-sheets-data-validation/src/preset.ts
similarity index 100%
rename from presets/packages/preset-sheets-data-validation/src/umd.ts
rename to presets/packages/preset-sheets-data-validation/src/preset.ts
diff --git a/presets/packages/preset-sheets-data-validation/univer-preset.config.mjs b/presets/packages/preset-sheets-data-validation/univer-preset.config.mjs
deleted file mode 100644
index 57b799d903..0000000000
--- a/presets/packages/preset-sheets-data-validation/univer-preset.config.mjs
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * 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.
- */
-
-const config = {
- umdDeps: [
- '@univerjs/data-validation',
- '@univerjs/sheets-data-validation',
- '@univerjs/sheets-data-validation-ui',
- ],
-};
-
-export default config;
diff --git a/presets/packages/preset-sheets-drawing/README.md b/presets/packages/preset-sheets-drawing/README.md
index e12fed9cdf..25361a0982 100644
--- a/presets/packages/preset-sheets-drawing/README.md
+++ b/presets/packages/preset-sheets-drawing/README.md
@@ -8,9 +8,9 @@
## Package Overview
-| Package | UMD global | CSS | Locales | Facade entry |
-| --------------------------------- | --------------------------- | :-: | :-----: | :----------: |
-| `@univerjs/preset-sheets-drawing` | `UniverSheetsDrawingPreset` | Yes | Yes | Yes |
+| Package | CSS | Locales | Facade entry |
+| --------------------------------- | :-: | :-----: | :----------: |
+| `@univerjs/preset-sheets-drawing` | Yes | Yes | Yes |
## Installation
diff --git a/presets/packages/preset-sheets-drawing/src/index.ts b/presets/packages/preset-sheets-drawing/src/index.ts
index a5749811cd..d71b84f940 100644
--- a/presets/packages/preset-sheets-drawing/src/index.ts
+++ b/presets/packages/preset-sheets-drawing/src/index.ts
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-export * from './umd';
-
+export * from './preset';
export * from '@univerjs/docs-drawing';
export * from '@univerjs/drawing';
export * from '@univerjs/drawing-ui';
diff --git a/presets/packages/preset-sheets-drawing/src/umd.ts b/presets/packages/preset-sheets-drawing/src/preset.ts
similarity index 100%
rename from presets/packages/preset-sheets-drawing/src/umd.ts
rename to presets/packages/preset-sheets-drawing/src/preset.ts
diff --git a/presets/packages/preset-sheets-drawing/univer-preset.config.mjs b/presets/packages/preset-sheets-drawing/univer-preset.config.mjs
deleted file mode 100644
index 9fc21ad637..0000000000
--- a/presets/packages/preset-sheets-drawing/univer-preset.config.mjs
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.
- */
-
-const config = {
- umdDeps: [
- '@univerjs/docs-drawing',
- '@univerjs/drawing-ui',
- '@univerjs/sheets-drawing',
- '@univerjs/sheets-drawing-ui',
- ],
-};
-
-export default config;
diff --git a/presets/packages/preset-sheets-filter/README.md b/presets/packages/preset-sheets-filter/README.md
index 76ab233e5a..5f067a2b1a 100644
--- a/presets/packages/preset-sheets-filter/README.md
+++ b/presets/packages/preset-sheets-filter/README.md
@@ -8,9 +8,9 @@
## Package Overview
-| Package | UMD global | CSS | Locales | Facade entry |
-| -------------------------------- | -------------------------- | :-: | :-----: | :----------: |
-| `@univerjs/preset-sheets-filter` | `UniverSheetsFilterPreset` | Yes | Yes | Yes |
+| Package | CSS | Locales | Facade entry |
+| -------------------------------- | :-: | :-----: | :----------: |
+| `@univerjs/preset-sheets-filter` | Yes | Yes | Yes |
## Installation
diff --git a/presets/packages/preset-sheets-filter/src/index.ts b/presets/packages/preset-sheets-filter/src/index.ts
index 5c960eb96a..afbef1d07d 100644
--- a/presets/packages/preset-sheets-filter/src/index.ts
+++ b/presets/packages/preset-sheets-filter/src/index.ts
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-export * from './umd';
-
+export * from './preset';
export * from '@univerjs/sheets-filter';
export * from '@univerjs/sheets-filter-ui';
diff --git a/presets/packages/preset-sheets-filter/src/umd.ts b/presets/packages/preset-sheets-filter/src/preset.ts
similarity index 100%
rename from presets/packages/preset-sheets-filter/src/umd.ts
rename to presets/packages/preset-sheets-filter/src/preset.ts
diff --git a/presets/packages/preset-sheets-filter/univer-preset.config.mjs b/presets/packages/preset-sheets-filter/univer-preset.config.mjs
deleted file mode 100644
index f6759c3722..0000000000
--- a/presets/packages/preset-sheets-filter/univer-preset.config.mjs
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * 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.
- */
-
-const config = {
- umdDeps: [
- '@univerjs/sheets-filter',
- '@univerjs/sheets-filter-ui',
- ],
-};
-
-export default config;
diff --git a/presets/packages/preset-sheets-find-replace/README.md b/presets/packages/preset-sheets-find-replace/README.md
index d84ed3425a..66b6b1537a 100644
--- a/presets/packages/preset-sheets-find-replace/README.md
+++ b/presets/packages/preset-sheets-find-replace/README.md
@@ -8,9 +8,9 @@
## Package Overview
-| Package | UMD global | CSS | Locales | Facade entry |
-| -------------------------------------- | ------------------------------- | :-: | :-----: | :----------: |
-| `@univerjs/preset-sheets-find-replace` | `UniverSheetsFindReplacePreset` | Yes | Yes | Yes |
+| Package | CSS | Locales | Facade entry |
+| -------------------------------------- | :-: | :-----: | :----------: |
+| `@univerjs/preset-sheets-find-replace` | Yes | Yes | Yes |
## Installation
diff --git a/presets/packages/preset-sheets-find-replace/src/index.ts b/presets/packages/preset-sheets-find-replace/src/index.ts
index ea60b81f00..1ae6886afd 100644
--- a/presets/packages/preset-sheets-find-replace/src/index.ts
+++ b/presets/packages/preset-sheets-find-replace/src/index.ts
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-export * from './umd';
-
+export * from './preset';
export * from '@univerjs/find-replace';
export * from '@univerjs/sheets-find-replace';
diff --git a/presets/packages/preset-sheets-find-replace/src/umd.ts b/presets/packages/preset-sheets-find-replace/src/preset.ts
similarity index 100%
rename from presets/packages/preset-sheets-find-replace/src/umd.ts
rename to presets/packages/preset-sheets-find-replace/src/preset.ts
diff --git a/presets/packages/preset-sheets-find-replace/univer-preset.config.mjs b/presets/packages/preset-sheets-find-replace/univer-preset.config.mjs
deleted file mode 100644
index ebb34ee2b6..0000000000
--- a/presets/packages/preset-sheets-find-replace/univer-preset.config.mjs
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * 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.
- */
-
-const config = {
- umdDeps: [
- '@univerjs/find-replace',
- '@univerjs/sheets-find-replace',
- ],
-};
-
-export default config;
diff --git a/presets/packages/preset-sheets-hyper-link/README.md b/presets/packages/preset-sheets-hyper-link/README.md
index 3aa65e9926..dde625f285 100644
--- a/presets/packages/preset-sheets-hyper-link/README.md
+++ b/presets/packages/preset-sheets-hyper-link/README.md
@@ -8,9 +8,9 @@
## Package Overview
-| Package | UMD global | CSS | Locales | Facade entry |
-| ------------------------------------ | ----------------------------- | :-: | :-----: | :----------: |
-| `@univerjs/preset-sheets-hyper-link` | `UniverSheetsHyperLinkPreset` | Yes | Yes | Yes |
+| Package | CSS | Locales | Facade entry |
+| ------------------------------------ | :-: | :-----: | :----------: |
+| `@univerjs/preset-sheets-hyper-link` | Yes | Yes | Yes |
## Installation
diff --git a/presets/packages/preset-sheets-hyper-link/src/index.ts b/presets/packages/preset-sheets-hyper-link/src/index.ts
index 0e8e313d06..519496485d 100644
--- a/presets/packages/preset-sheets-hyper-link/src/index.ts
+++ b/presets/packages/preset-sheets-hyper-link/src/index.ts
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-export * from './umd';
-
+export * from './preset';
export * from '@univerjs/sheets-hyper-link';
export * from '@univerjs/sheets-hyper-link-ui';
diff --git a/presets/packages/preset-sheets-hyper-link/src/umd.ts b/presets/packages/preset-sheets-hyper-link/src/preset.ts
similarity index 100%
rename from presets/packages/preset-sheets-hyper-link/src/umd.ts
rename to presets/packages/preset-sheets-hyper-link/src/preset.ts
diff --git a/presets/packages/preset-sheets-hyper-link/univer-preset.config.mjs b/presets/packages/preset-sheets-hyper-link/univer-preset.config.mjs
deleted file mode 100644
index 8b98134b24..0000000000
--- a/presets/packages/preset-sheets-hyper-link/univer-preset.config.mjs
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * 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.
- */
-
-const config = {
- umdDeps: [
- '@univerjs/sheets-hyper-link',
- '@univerjs/sheets-hyper-link-ui',
- ],
-};
-
-export default config;
diff --git a/presets/packages/preset-sheets-node-core/README.md b/presets/packages/preset-sheets-node-core/README.md
index 7a6c63b284..9bdd691b60 100644
--- a/presets/packages/preset-sheets-node-core/README.md
+++ b/presets/packages/preset-sheets-node-core/README.md
@@ -8,9 +8,9 @@
## Package Overview
-| Package | UMD global | CSS | Locales | Facade entry |
-| ----------------------------------- | ---------------------------- | :-: | :-----: | :----------: |
-| `@univerjs/preset-sheets-node-core` | `UniverSheetsNodeCorePreset` | No | Yes | Yes |
+| Package | CSS | Locales | Facade entry |
+| ----------------------------------- | :-: | :-----: | :----------: |
+| `@univerjs/preset-sheets-node-core` | No | Yes | Yes |
## Installation
diff --git a/presets/packages/preset-sheets-node-core/src/index.ts b/presets/packages/preset-sheets-node-core/src/index.ts
index be1db957fd..7510c957c4 100644
--- a/presets/packages/preset-sheets-node-core/src/index.ts
+++ b/presets/packages/preset-sheets-node-core/src/index.ts
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-export * from './umd';
-
+export * from './preset';
export * from '@univerjs/docs';
export * from '@univerjs/engine-formula';
export * from '@univerjs/rpc-node';
diff --git a/presets/packages/preset-sheets-node-core/src/umd.ts b/presets/packages/preset-sheets-node-core/src/preset.ts
similarity index 100%
rename from presets/packages/preset-sheets-node-core/src/umd.ts
rename to presets/packages/preset-sheets-node-core/src/preset.ts
diff --git a/presets/packages/preset-sheets-node-core/univer-preset.config.mjs b/presets/packages/preset-sheets-node-core/univer-preset.config.mjs
deleted file mode 100644
index d115a9e7be..0000000000
--- a/presets/packages/preset-sheets-node-core/univer-preset.config.mjs
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * 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.
- */
-
-const config = {
- umdDeps: [
- '@univerjs/docs',
- '@univerjs/rpc-node',
- '@univerjs/sheets',
- '@univerjs/sheets-numfmt',
- '@univerjs/sheets-data-validation',
- '@univerjs/sheets-drawing',
- '@univerjs/sheets-filter',
- '@univerjs/sheets-formula',
- '@univerjs/sheets-hyper-link',
- '@univerjs/sheets-sort',
- '@univerjs/thread-comment',
- '@univerjs/sheets-thread-comment',
- ],
-};
-
-export default config;
diff --git a/presets/packages/preset-sheets-note/README.md b/presets/packages/preset-sheets-note/README.md
index 1f802a7712..a0fdd3076d 100644
--- a/presets/packages/preset-sheets-note/README.md
+++ b/presets/packages/preset-sheets-note/README.md
@@ -8,9 +8,9 @@
## Package Overview
-| Package | UMD global | CSS | Locales | Facade entry |
-| ------------------------------ | ------------------------ | :-: | :-----: | :----------: |
-| `@univerjs/preset-sheets-note` | `UniverSheetsNotePreset` | Yes | Yes | Yes |
+| Package | CSS | Locales | Facade entry |
+| ------------------------------ | :-: | :-----: | :----------: |
+| `@univerjs/preset-sheets-note` | Yes | Yes | Yes |
## Installation
diff --git a/presets/packages/preset-sheets-note/src/index.ts b/presets/packages/preset-sheets-note/src/index.ts
index fd647e257b..320ee6731f 100644
--- a/presets/packages/preset-sheets-note/src/index.ts
+++ b/presets/packages/preset-sheets-note/src/index.ts
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-export * from './umd';
-
+export * from './preset';
export * from '@univerjs/sheets-note';
export * from '@univerjs/sheets-note-ui';
diff --git a/presets/packages/preset-sheets-note/src/umd.ts b/presets/packages/preset-sheets-note/src/preset.ts
similarity index 100%
rename from presets/packages/preset-sheets-note/src/umd.ts
rename to presets/packages/preset-sheets-note/src/preset.ts
diff --git a/presets/packages/preset-sheets-note/univer-preset.config.mjs b/presets/packages/preset-sheets-note/univer-preset.config.mjs
deleted file mode 100644
index f59dd2a563..0000000000
--- a/presets/packages/preset-sheets-note/univer-preset.config.mjs
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * 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.
- */
-
-const config = {
- umdDeps: [
- '@univerjs/sheets-note',
- '@univerjs/sheets-note-ui',
- ],
-};
-
-export default config;
diff --git a/presets/packages/preset-sheets-sort/README.md b/presets/packages/preset-sheets-sort/README.md
index 1074bb2058..547e35bd2e 100644
--- a/presets/packages/preset-sheets-sort/README.md
+++ b/presets/packages/preset-sheets-sort/README.md
@@ -8,9 +8,9 @@
## Package Overview
-| Package | UMD global | CSS | Locales | Facade entry |
-| ------------------------------ | ------------------------ | :-: | :-----: | :----------: |
-| `@univerjs/preset-sheets-sort` | `UniverSheetsSortPreset` | Yes | Yes | Yes |
+| Package | CSS | Locales | Facade entry |
+| ------------------------------ | :-: | :-----: | :----------: |
+| `@univerjs/preset-sheets-sort` | Yes | Yes | Yes |
## Installation
diff --git a/presets/packages/preset-sheets-sort/src/index.ts b/presets/packages/preset-sheets-sort/src/index.ts
index 8099a78ad7..36090704cd 100644
--- a/presets/packages/preset-sheets-sort/src/index.ts
+++ b/presets/packages/preset-sheets-sort/src/index.ts
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-export * from './umd';
-
+export * from './preset';
export * from '@univerjs/sheets-sort';
export * from '@univerjs/sheets-sort-ui';
diff --git a/presets/packages/preset-sheets-sort/src/umd.ts b/presets/packages/preset-sheets-sort/src/preset.ts
similarity index 100%
rename from presets/packages/preset-sheets-sort/src/umd.ts
rename to presets/packages/preset-sheets-sort/src/preset.ts
diff --git a/presets/packages/preset-sheets-sort/univer-preset.config.mjs b/presets/packages/preset-sheets-sort/univer-preset.config.mjs
deleted file mode 100644
index d4cc25d458..0000000000
--- a/presets/packages/preset-sheets-sort/univer-preset.config.mjs
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * 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.
- */
-
-const config = {
- umdDeps: [
- '@univerjs/sheets-sort',
- '@univerjs/sheets-sort-ui',
- ],
-};
-
-export default config;
diff --git a/presets/packages/preset-sheets-table/README.md b/presets/packages/preset-sheets-table/README.md
index a186b8a3f1..eafa3adcf3 100644
--- a/presets/packages/preset-sheets-table/README.md
+++ b/presets/packages/preset-sheets-table/README.md
@@ -8,9 +8,9 @@
## Package Overview
-| Package | UMD global | CSS | Locales | Facade entry |
-| ------------------------------- | ------------------------- | :-: | :-----: | :----------: |
-| `@univerjs/preset-sheets-table` | `UniverSheetsTablePreset` | Yes | Yes | Yes |
+| Package | CSS | Locales | Facade entry |
+| ------------------------------- | :-: | :-----: | :----------: |
+| `@univerjs/preset-sheets-table` | Yes | Yes | Yes |
## Installation
diff --git a/presets/packages/preset-sheets-table/src/index.ts b/presets/packages/preset-sheets-table/src/index.ts
index efe7bfb49f..be390e9d92 100644
--- a/presets/packages/preset-sheets-table/src/index.ts
+++ b/presets/packages/preset-sheets-table/src/index.ts
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-export * from './umd';
-
+export * from './preset';
export * from '@univerjs/sheets-table';
export * from '@univerjs/sheets-table-ui';
diff --git a/presets/packages/preset-sheets-table/src/umd.ts b/presets/packages/preset-sheets-table/src/preset.ts
similarity index 100%
rename from presets/packages/preset-sheets-table/src/umd.ts
rename to presets/packages/preset-sheets-table/src/preset.ts
diff --git a/presets/packages/preset-sheets-table/univer-preset.config.mjs b/presets/packages/preset-sheets-table/univer-preset.config.mjs
deleted file mode 100644
index 7484c71ff4..0000000000
--- a/presets/packages/preset-sheets-table/univer-preset.config.mjs
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * 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.
- */
-
-const config = {
- umdDeps: [
- '@univerjs/sheets-table',
- '@univerjs/sheets-table-ui',
- ],
-};
-
-export default config;
diff --git a/presets/packages/preset-sheets-thread-comment/README.md b/presets/packages/preset-sheets-thread-comment/README.md
index 53f035ebf5..aa0e98ce39 100644
--- a/presets/packages/preset-sheets-thread-comment/README.md
+++ b/presets/packages/preset-sheets-thread-comment/README.md
@@ -8,9 +8,9 @@
## Package Overview
-| Package | UMD global | CSS | Locales | Facade entry |
-| ---------------------------------------- | --------------------------------- | :-: | :-----: | :----------: |
-| `@univerjs/preset-sheets-thread-comment` | `UniverSheetsThreadCommentPreset` | Yes | Yes | Yes |
+| Package | CSS | Locales | Facade entry |
+| ---------------------------------------- | :-: | :-----: | :----------: |
+| `@univerjs/preset-sheets-thread-comment` | Yes | Yes | Yes |
## Installation
diff --git a/presets/packages/preset-sheets-thread-comment/src/index.ts b/presets/packages/preset-sheets-thread-comment/src/index.ts
index d67f066e56..bc02275e47 100644
--- a/presets/packages/preset-sheets-thread-comment/src/index.ts
+++ b/presets/packages/preset-sheets-thread-comment/src/index.ts
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-export * from './umd';
-
+export * from './preset';
export * from '@univerjs/sheets-thread-comment';
export * from '@univerjs/sheets-thread-comment-ui';
export * from '@univerjs/thread-comment-ui';
diff --git a/presets/packages/preset-sheets-thread-comment/src/umd.ts b/presets/packages/preset-sheets-thread-comment/src/preset.ts
similarity index 100%
rename from presets/packages/preset-sheets-thread-comment/src/umd.ts
rename to presets/packages/preset-sheets-thread-comment/src/preset.ts
diff --git a/presets/packages/preset-sheets-thread-comment/univer-preset.config.mjs b/presets/packages/preset-sheets-thread-comment/univer-preset.config.mjs
deleted file mode 100644
index 6b053572fb..0000000000
--- a/presets/packages/preset-sheets-thread-comment/univer-preset.config.mjs
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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.
- */
-
-const config = {
- umdDeps: [
- '@univerjs/thread-comment',
- '@univerjs/sheets-thread-comment',
- '@univerjs/thread-comment-ui',
- '@univerjs/sheets-thread-comment-ui',
- ],
-};
-
-export default config;
diff --git a/presets/src/index.ts b/presets/src/index.ts
index d9db91b84a..1c3deead34 100644
--- a/presets/src/index.ts
+++ b/presets/src/index.ts
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-export * from './umd';
-
+export * from './preset';
export * from '@univerjs/core';
export * from '@univerjs/themes';
diff --git a/presets/src/umd.ts b/presets/src/preset.ts
similarity index 100%
rename from presets/src/umd.ts
rename to presets/src/preset.ts
diff --git a/presets/univer-preset.config.mjs b/presets/univer-preset.config.mjs
deleted file mode 100644
index 12d02348da..0000000000
--- a/presets/univer-preset.config.mjs
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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.
- */
-
-const config = {
- umdDeps: [
- '@univerjs/themes',
- '@univerjs/protocol',
- '@univerjs/core',
- '@univerjs/network',
- '@univerjs/telemetry',
- '@univerjs/rpc',
- '@univerjs/engine-render',
- '@univerjs/engine-formula',
- '@univerjs/drawing',
- ],
- umdAdditionalFiles: [
- './node_modules/@univerjs-infra/shared/react-polyfill/react-polyfill.js',
- './node_modules/@wendellhu/redi/dist/umd/index.js',
- './node_modules/@wendellhu/redi/dist/umd/react-bindings/index.js',
- ],
-};
-
-export default config;