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

This commit is contained in:
upstream-mirror
2026-09-16 05:09:45 +05:00
commit bcf6ef63ad
7118 changed files with 1236854 additions and 0 deletions

75
presets/package.json Normal file
View File

@@ -0,0 +1,75 @@
{
"name": "@univerjs/presets",
"version": "1.0.0-rc.0",
"private": false,
"description": "Build Univer apps faster and easier with pre-configured plugin collections.",
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
"license": "Apache-2.0",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/univer"
},
"homepage": "https://univer.ai",
"repository": {
"type": "git",
"url": "https://github.com/dream-num/univer"
},
"bugs": {
"url": "https://github.com/dream-num/univer/issues"
},
"keywords": [
"univer",
"univer-preset",
"presets"
],
"sideEffects": [
"*.css"
],
"exports": {
".": "./src/index.ts",
"./lib/*": "./lib/*"
},
"main": "./src/index.ts",
"types": "./lib/types/index.d.ts",
"publishConfig": {
"access": "public",
"main": "./lib/es/index.js",
"module": "./lib/es/index.js",
"exports": {
".": {
"import": "./lib/es/index.js",
"require": "./lib/cjs/index.js",
"types": "./lib/types/index.d.ts"
},
"./lib/*": "./lib/*"
}
},
"directories": {
"lib": "lib"
},
"files": [
"lib"
],
"scripts": {
"typecheck": "tsc --noEmit",
"build:bundle": "univer-cli preset build --cleanup",
"build:types": "tsc -p tsconfig.node.json",
"build": "pnpm run build:bundle && pnpm run build:types"
},
"dependencies": {
"@univerjs/core": "workspace:*",
"@univerjs/drawing": "workspace:*",
"@univerjs/engine-formula": "workspace:*",
"@univerjs/engine-render": "workspace:*",
"@univerjs/network": "workspace:*",
"@univerjs/protocol": "workspace:*",
"@univerjs/rpc": "workspace:*",
"@univerjs/telemetry": "workspace:*",
"@univerjs/themes": "workspace:*"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@wendellhu/redi": "1.1.3",
"typescript": "^6.0.3"
}
}

View File

@@ -0,0 +1,38 @@
# @univerjs/preset-docs-core
[![npm version](https://img.shields.io/npm/v/@univerjs/preset-docs-core?style=flat-square)](https://npmjs.com/package/@univerjs/preset-docs-core)
[![license](https://img.shields.io/npm/l/@univerjs/preset-docs-core?style=flat-square)](https://npmjs.com/package/@univerjs/preset-docs-core)
[![downloads](https://img.shields.io/npm/dm/@univerjs/preset-docs-core?style=flat-square)](https://npmjs.com/package/@univerjs/preset-docs-core)
`@univerjs/preset-docs-core` provides a preset for core Univer Docs editing and UI features.
## Package Overview
| Package | CSS | Locales | Facade entry |
| ---------------------------- | :-: | :-----: | :----------: |
| `@univerjs/preset-docs-core` | Yes | Yes | Yes |
## Installation
```sh
pnpm add @univerjs/preset-docs-core
# or
npm install @univerjs/preset-docs-core
```
Keep all `@univerjs/*` packages on the same version.
## Usage
```ts
import { UniverDocsCorePreset } from '@univerjs/preset-docs-core';
// Use with createUniver:
// createUniver({ presets: [UniverDocsCorePreset()] });
```
## Resources
- [Documentation](https://docs.univer.ai)
- [NPM package](https://npmjs.com/package/@univerjs/preset-docs-core)
- [GitHub repository](https://github.com/dream-num/univer)

View File

@@ -0,0 +1,90 @@
{
"name": "@univerjs/preset-docs-core",
"version": "1.0.0-rc.0",
"private": false,
"description": "Preset for core Univer Docs editing and UI features.",
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
"license": "Apache-2.0",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/univer"
},
"homepage": "https://univer.ai",
"repository": {
"type": "git",
"url": "https://github.com/dream-num/univer"
},
"bugs": {
"url": "https://github.com/dream-num/univer/issues"
},
"keywords": [
"univer",
"univer-preset",
"docs",
"core"
],
"sideEffects": [
"*.css"
],
"exports": {
".": "./src/index.ts",
"./locales/*": "./src/locales/*.ts",
"./lib/*": "./lib/*"
},
"main": "./src/index.ts",
"publishConfig": {
"access": "public",
"main": "./lib/es/index.js",
"module": "./lib/es/index.js",
"exports": {
".": {
"import": "./lib/es/index.js",
"require": "./lib/cjs/index.js",
"types": "./lib/types/index.d.ts"
},
"./locales/*": {
"import": "./lib/es/locales/*.js",
"require": "./lib/cjs/locales/*.js",
"types": "./lib/types/locales/*.d.ts"
},
"./lib/*": "./lib/*"
}
},
"directories": {
"lib": "lib"
},
"types": "./lib/types/index.d.ts",
"files": [
"lib"
],
"scripts": {
"prepare": "univer-cli preset prepare",
"build:bundle": "univer-cli preset build --cleanup",
"build:types": "tsc -p tsconfig.node.json",
"build": "pnpm run build:bundle && pnpm run build:types",
"typecheck": "tsc --noEmit"
},
"peerDependencies": {
"react": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
"react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
"rxjs": ">=7.0.0"
},
"dependencies": {
"@univerjs/design": "workspace:*",
"@univerjs/docs": "workspace:*",
"@univerjs/docs-ui": "workspace:*",
"@univerjs/engine-formula": "workspace:*",
"@univerjs/engine-render": "workspace:*",
"@univerjs/network": "workspace:*",
"@univerjs/ui": "workspace:*"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@univerjs/core": "workspace:*",
"@univerjs/presets": "workspace:*",
"react": "18.3.1",
"react-dom": "18.3.1",
"rxjs": "^7.8.2",
"typescript": "^6.0.3"
}
}

View File

@@ -0,0 +1,17 @@
/**
* 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 { default } from '@univerjs-infra/shared/postcss';

View File

@@ -0,0 +1,24 @@
/**
* 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/design';
export * from '@univerjs/docs';
export * from '@univerjs/docs-ui';
export * from '@univerjs/engine-formula';
export * from '@univerjs/engine-render';
export * from '@univerjs/network';
export * from '@univerjs/ui';

View File

@@ -0,0 +1,68 @@
/**
* 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 { IUniverUIConfig } from '@univerjs/ui';
import { UniverDocsPlugin } from '@univerjs/docs';
import { UniverDocsUIPlugin } from '@univerjs/docs-ui';
import { UniverFormulaEnginePlugin } from '@univerjs/engine-formula';
import { UniverRenderEnginePlugin } from '@univerjs/engine-render';
import { UniverNetworkPlugin } from '@univerjs/network';
import { UniverUIPlugin } from '@univerjs/ui';
import '@univerjs/network/facade';
import '@univerjs/docs-ui/facade';
export type * from '@univerjs/docs-ui/facade';
export type * from '@univerjs/network/facade';
export interface IUniverDocsCorePresetConfig extends
Pick<IUniverUIConfig, 'container' | 'header' | 'footer' | 'toolbar' | 'ribbonType' | 'menu' | 'contextMenu' | 'disableAutoFocus'> {
collaboration?: true;
}
export function UniverDocsCorePreset(config: Partial<IUniverDocsCorePresetConfig> = {}): IPreset {
const {
container = 'app',
header,
footer,
toolbar,
ribbonType,
menu,
contextMenu,
disableAutoFocus,
} = config;
return {
plugins: [
UniverNetworkPlugin,
UniverDocsPlugin,
UniverRenderEnginePlugin as any,
[UniverUIPlugin, {
container,
header,
footer,
toolbar,
ribbonType,
menu,
contextMenu,
disableAutoFocus,
}],
UniverDocsUIPlugin,
UniverFormulaEnginePlugin,
],
};
}

View File

@@ -0,0 +1,27 @@
/**
* 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 { Config } from 'tailwindcss';
import preset, { createTailwindContent } from '@univerjs-infra/shared/tailwind';
const config: Config = {
presets: [preset],
content: createTailwindContent(import.meta.url, {
includeStyleDependencies: true,
}),
};
export default config;

View File

@@ -0,0 +1,8 @@
{
"extends": "@univerjs-infra/shared/tsconfigs/base",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib/types"
},
"include": ["src", "../../common/shared/types/global.d.ts"]
}

View File

@@ -0,0 +1,18 @@
{
"extends": "@univerjs-infra/shared/tsconfigs/node",
"compilerOptions": {
"rootDir": "src",
"declaration": true,
"emitDeclarationOnly": true,
"noEmit": false,
"outDir": "lib/types"
},
"include": [
"src"
],
"exclude": [
"src/**/__tests__/**",
"src/**/*.spec.ts",
"src/**/*.test.ts"
]
}

View File

@@ -0,0 +1,38 @@
# @univerjs/preset-docs-drawing
[![npm version](https://img.shields.io/npm/v/@univerjs/preset-docs-drawing?style=flat-square)](https://npmjs.com/package/@univerjs/preset-docs-drawing)
[![license](https://img.shields.io/npm/l/@univerjs/preset-docs-drawing?style=flat-square)](https://npmjs.com/package/@univerjs/preset-docs-drawing)
[![downloads](https://img.shields.io/npm/dm/@univerjs/preset-docs-drawing?style=flat-square)](https://npmjs.com/package/@univerjs/preset-docs-drawing)
`@univerjs/preset-docs-drawing` provides a preset for drawing capabilities in Univer Docs.
## Package Overview
| Package | CSS | Locales | Facade entry |
| ------------------------------- | :-: | :-----: | :----------: |
| `@univerjs/preset-docs-drawing` | Yes | Yes | Yes |
## Installation
```sh
pnpm add @univerjs/preset-docs-drawing
# or
npm install @univerjs/preset-docs-drawing
```
Keep all `@univerjs/*` packages on the same version.
## Usage
```ts
import { UniverDocsDrawingPreset } from '@univerjs/preset-docs-drawing';
// Use with createUniver:
// createUniver({ presets: [UniverDocsDrawingPreset()] });
```
## Resources
- [Documentation](https://docs.univer.ai)
- [NPM package](https://npmjs.com/package/@univerjs/preset-docs-drawing)
- [GitHub repository](https://github.com/dream-num/univer)

View File

@@ -0,0 +1,87 @@
{
"name": "@univerjs/preset-docs-drawing",
"version": "1.0.0-rc.0",
"private": false,
"description": "Preset for drawing capabilities in Univer Docs.",
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
"license": "Apache-2.0",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/univer"
},
"homepage": "https://univer.ai",
"repository": {
"type": "git",
"url": "https://github.com/dream-num/univer"
},
"bugs": {
"url": "https://github.com/dream-num/univer/issues"
},
"keywords": [
"univer",
"univer-preset",
"docs",
"drawing"
],
"sideEffects": [
"*.css"
],
"exports": {
".": "./src/index.ts",
"./locales/*": "./src/locales/*.ts",
"./lib/*": "./lib/*"
},
"publishConfig": {
"access": "public",
"main": "./lib/es/index.js",
"module": "./lib/es/index.js",
"exports": {
".": {
"import": "./lib/es/index.js",
"require": "./lib/cjs/index.js",
"types": "./lib/types/index.d.ts"
},
"./locales/*": {
"import": "./lib/es/locales/*.js",
"require": "./lib/cjs/locales/*.js",
"types": "./lib/types/locales/*.d.ts"
},
"./lib/*": "./lib/*"
}
},
"main": "./src/index.ts",
"directories": {
"lib": "lib"
},
"types": "./lib/types/index.d.ts",
"files": [
"lib"
],
"scripts": {
"prepare": "univer-cli preset prepare",
"build:bundle": "univer-cli preset build --cleanup",
"build:types": "tsc -p tsconfig.node.json",
"build": "pnpm run build:bundle && pnpm run build:types",
"typecheck": "tsc --noEmit"
},
"peerDependencies": {
"react": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
"react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
"rxjs": ">=7.0.0"
},
"dependencies": {
"@univerjs/core": "workspace:*",
"@univerjs/docs-drawing": "workspace:*",
"@univerjs/docs-drawing-ui": "workspace:*",
"@univerjs/drawing": "workspace:*",
"@univerjs/drawing-ui": "workspace:*"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@univerjs/presets": "workspace:*",
"react": "18.3.1",
"react-dom": "18.3.1",
"rxjs": "^7.8.2",
"typescript": "^6.0.3"
}
}

View File

@@ -0,0 +1,17 @@
/**
* 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 { default } from '@univerjs-infra/shared/postcss';

View File

@@ -0,0 +1,21 @@
/**
* 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-drawing';
export * from '@univerjs/docs-drawing-ui';
export * from '@univerjs/drawing';
export * from '@univerjs/drawing-ui';

View File

@@ -0,0 +1,43 @@
/**
* 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 { IImageIoService } from '@univerjs/core';
import { UniverDocsDrawingPlugin } from '@univerjs/docs-drawing';
import { UniverDocsDrawingUIPlugin } from '@univerjs/docs-drawing-ui';
import { UniverDrawingPlugin } from '@univerjs/drawing';
import { UniverDrawingUIPlugin } from '@univerjs/drawing-ui';
import '@univerjs/docs-drawing/facade';
export type * from '@univerjs/docs-drawing/facade';
export interface IUniverDocsDrawingPresetConfig {
collaboration?: boolean;
}
export function UniverDocsDrawingPreset(config: Partial<IUniverDocsDrawingPresetConfig> = {}): IPreset {
const { collaboration = false } = config;
return {
plugins: [
[UniverDrawingPlugin, { override: collaboration ? [[IImageIoService, null]] : [] }],
UniverDrawingUIPlugin,
UniverDocsDrawingPlugin,
UniverDocsDrawingUIPlugin,
].filter((v) => !!v) as IPreset['plugins'],
};
};

View File

@@ -0,0 +1,27 @@
/**
* 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 { Config } from 'tailwindcss';
import preset, { createTailwindContent } from '@univerjs-infra/shared/tailwind';
const config: Config = {
presets: [preset],
content: createTailwindContent(import.meta.url, {
includeStyleDependencies: true,
}),
};
export default config;

View File

@@ -0,0 +1,8 @@
{
"extends": "@univerjs-infra/shared/tsconfigs/base",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib/types"
},
"include": ["src", "../../common/shared/types/global.d.ts"]
}

View File

@@ -0,0 +1,18 @@
{
"extends": "@univerjs-infra/shared/tsconfigs/node",
"compilerOptions": {
"rootDir": "src",
"declaration": true,
"emitDeclarationOnly": true,
"noEmit": false,
"outDir": "lib/types"
},
"include": [
"src"
],
"exclude": [
"src/**/__tests__/**",
"src/**/*.spec.ts",
"src/**/*.test.ts"
]
}

View File

@@ -0,0 +1,38 @@
# @univerjs/preset-docs-hyper-link
[![npm version](https://img.shields.io/npm/v/@univerjs/preset-docs-hyper-link?style=flat-square)](https://npmjs.com/package/@univerjs/preset-docs-hyper-link)
[![license](https://img.shields.io/npm/l/@univerjs/preset-docs-hyper-link?style=flat-square)](https://npmjs.com/package/@univerjs/preset-docs-hyper-link)
[![downloads](https://img.shields.io/npm/dm/@univerjs/preset-docs-hyper-link?style=flat-square)](https://npmjs.com/package/@univerjs/preset-docs-hyper-link)
`@univerjs/preset-docs-hyper-link` provides a preset for hyperlink support in Univer Docs.
## Package Overview
| Package | CSS | Locales | Facade entry |
| ---------------------------------- | :-: | :-----: | :----------: |
| `@univerjs/preset-docs-hyper-link` | Yes | Yes | No |
## Installation
```sh
pnpm add @univerjs/preset-docs-hyper-link
# or
npm install @univerjs/preset-docs-hyper-link
```
Keep all `@univerjs/*` packages on the same version.
## Usage
```ts
import { UniverDocsHyperLinkPreset } from '@univerjs/preset-docs-hyper-link';
// Use with createUniver:
// createUniver({ presets: [UniverDocsHyperLinkPreset()] });
```
## Resources
- [Documentation](https://docs.univer.ai)
- [NPM package](https://npmjs.com/package/@univerjs/preset-docs-hyper-link)
- [GitHub repository](https://github.com/dream-num/univer)

View File

@@ -0,0 +1,85 @@
{
"name": "@univerjs/preset-docs-hyper-link",
"version": "1.0.0-rc.0",
"private": false,
"description": "Preset for hyperlink support in Univer Docs.",
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
"license": "Apache-2.0",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/univer"
},
"homepage": "https://univer.ai",
"repository": {
"type": "git",
"url": "https://github.com/dream-num/univer"
},
"bugs": {
"url": "https://github.com/dream-num/univer/issues"
},
"keywords": [
"univer",
"univer-preset",
"docs",
"hyperlink"
],
"sideEffects": [
"*.css"
],
"exports": {
".": "./src/index.ts",
"./locales/*": "./src/locales/*.ts",
"./lib/*": "./lib/*"
},
"publishConfig": {
"access": "public",
"main": "./lib/es/index.js",
"module": "./lib/es/index.js",
"exports": {
".": {
"import": "./lib/es/index.js",
"require": "./lib/cjs/index.js",
"types": "./lib/types/index.d.ts"
},
"./locales/*": {
"import": "./lib/es/locales/*.js",
"require": "./lib/cjs/locales/*.js",
"types": "./lib/types/locales/*.d.ts"
},
"./lib/*": "./lib/*"
}
},
"main": "./src/index.ts",
"directories": {
"lib": "lib"
},
"types": "./lib/types/index.d.ts",
"files": [
"lib"
],
"scripts": {
"prepare": "univer-cli preset prepare",
"build:bundle": "univer-cli preset build --cleanup",
"build:types": "tsc -p tsconfig.node.json",
"build": "pnpm run build:bundle && pnpm run build:types",
"typecheck": "tsc --noEmit"
},
"peerDependencies": {
"react": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
"react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
"rxjs": ">=7.0.0"
},
"dependencies": {
"@univerjs/docs-hyper-link": "workspace:*",
"@univerjs/docs-hyper-link-ui": "workspace:*"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@univerjs/core": "workspace:*",
"@univerjs/presets": "workspace:*",
"react": "18.3.1",
"react-dom": "18.3.1",
"rxjs": "^7.8.2",
"typescript": "^6.0.3"
}
}

View File

@@ -0,0 +1,17 @@
/**
* 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 { default } from '@univerjs-infra/shared/postcss';

View File

@@ -0,0 +1,19 @@
/**
* 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-hyper-link';
export * from '@univerjs/docs-hyper-link-ui';

View File

@@ -0,0 +1,29 @@
/**
* 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 { UniverDocsHyperLinkPlugin } from '@univerjs/docs-hyper-link';
import { UniverDocsHyperLinkUIPlugin } from '@univerjs/docs-hyper-link-ui';
export function UniverDocsHyperLinkPreset(): IPreset {
return {
plugins: [
UniverDocsHyperLinkPlugin,
UniverDocsHyperLinkUIPlugin,
].filter((v) => !!v) as IPreset['plugins'],
};
};

View File

@@ -0,0 +1,27 @@
/**
* 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 { Config } from 'tailwindcss';
import preset, { createTailwindContent } from '@univerjs-infra/shared/tailwind';
const config: Config = {
presets: [preset],
content: createTailwindContent(import.meta.url, {
includeStyleDependencies: true,
}),
};
export default config;

View File

@@ -0,0 +1,8 @@
{
"extends": "@univerjs-infra/shared/tsconfigs/base",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib/types"
},
"include": ["src", "../../common/shared/types/global.d.ts"]
}

View File

@@ -0,0 +1,18 @@
{
"extends": "@univerjs-infra/shared/tsconfigs/node",
"compilerOptions": {
"rootDir": "src",
"declaration": true,
"emitDeclarationOnly": true,
"noEmit": false,
"outDir": "lib/types"
},
"include": [
"src"
],
"exclude": [
"src/**/__tests__/**",
"src/**/*.spec.ts",
"src/**/*.test.ts"
]
}

View File

@@ -0,0 +1,38 @@
# @univerjs/preset-docs-node-core
[![npm version](https://img.shields.io/npm/v/@univerjs/preset-docs-node-core?style=flat-square)](https://npmjs.com/package/@univerjs/preset-docs-node-core)
[![license](https://img.shields.io/npm/l/@univerjs/preset-docs-node-core?style=flat-square)](https://npmjs.com/package/@univerjs/preset-docs-node-core)
[![downloads](https://img.shields.io/npm/dm/@univerjs/preset-docs-node-core?style=flat-square)](https://npmjs.com/package/@univerjs/preset-docs-node-core)
`@univerjs/preset-docs-node-core` provides a preset for running Univer Docs on Node.js with core features.
## Package Overview
| Package | CSS | Locales | Facade entry |
| --------------------------------- | :-: | :-----: | :----------: |
| `@univerjs/preset-docs-node-core` | No | Yes | Yes |
## Installation
```sh
pnpm add @univerjs/preset-docs-node-core
# or
npm install @univerjs/preset-docs-node-core
```
Keep all `@univerjs/*` packages on the same version.
## Usage
```ts
import { UniverDocsNodeCorePreset } from '@univerjs/preset-docs-node-core';
// Use with createUniver:
// createUniver({ presets: [UniverDocsNodeCorePreset()] });
```
## Resources
- [Documentation](https://docs.univer.ai)
- [NPM package](https://npmjs.com/package/@univerjs/preset-docs-node-core)
- [GitHub repository](https://github.com/dream-num/univer)

View File

@@ -0,0 +1,86 @@
{
"name": "@univerjs/preset-docs-node-core",
"version": "1.0.0-rc.0",
"private": false,
"description": "Preset for running Univer Docs on Node.js with core features.",
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
"license": "Apache-2.0",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/univer"
},
"homepage": "https://univer.ai",
"repository": {
"type": "git",
"url": "https://github.com/dream-num/univer"
},
"bugs": {
"url": "https://github.com/dream-num/univer/issues"
},
"keywords": [
"univer",
"univer-preset",
"docs",
"node",
"core"
],
"sideEffects": [
"*.css"
],
"exports": {
".": "./src/index.ts",
"./locales/*": "./src/locales/*.ts",
"./lib/*": "./lib/*"
},
"publishConfig": {
"access": "public",
"main": "./lib/es/index.js",
"module": "./lib/es/index.js",
"exports": {
".": {
"import": "./lib/es/index.js",
"require": "./lib/cjs/index.js",
"types": "./lib/types/index.d.ts"
},
"./locales/*": {
"import": "./lib/es/locales/*.js",
"require": "./lib/cjs/locales/*.js",
"types": "./lib/types/locales/*.d.ts"
},
"./lib/*": "./lib/*"
}
},
"main": "./src/index.ts",
"directories": {
"lib": "lib"
},
"types": "./lib/types/index.d.ts",
"files": [
"lib"
],
"scripts": {
"prepare": "univer-cli preset prepare",
"build:bundle": "univer-cli preset build --cleanup",
"build:types": "tsc -p tsconfig.node.json",
"build": "pnpm run build:bundle && pnpm run build:types",
"typecheck": "tsc --noEmit"
},
"peerDependencies": {
"rxjs": ">=7.0.0"
},
"dependencies": {
"@univerjs/docs": "workspace:*",
"@univerjs/docs-drawing": "workspace:*",
"@univerjs/docs-hyper-link": "workspace:*",
"@univerjs/engine-formula": "workspace:*",
"@univerjs/rpc-node": "workspace:*",
"@univerjs/thread-comment": "workspace:*"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@univerjs/core": "workspace:*",
"@univerjs/presets": "workspace:*",
"rxjs": "^7.8.2",
"typescript": "^6.0.3"
}
}

View File

@@ -0,0 +1,17 @@
/**
* 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 { default } from '@univerjs-infra/shared/postcss';

View 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';

View 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'],
};
}

View 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'> {
}

View File

@@ -0,0 +1,27 @@
/**
* 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 { Config } from 'tailwindcss';
import preset, { createTailwindContent } from '@univerjs-infra/shared/tailwind';
const config: Config = {
presets: [preset],
content: createTailwindContent(import.meta.url, {
includeStyleDependencies: true,
}),
};
export default config;

View File

@@ -0,0 +1,8 @@
{
"extends": "@univerjs-infra/shared/tsconfigs/base",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib/types"
},
"include": ["src", "../../common/shared/types/global.d.ts"]
}

View File

@@ -0,0 +1,18 @@
{
"extends": "@univerjs-infra/shared/tsconfigs/node",
"compilerOptions": {
"rootDir": "src",
"declaration": true,
"emitDeclarationOnly": true,
"noEmit": false,
"outDir": "lib/types"
},
"include": [
"src"
],
"exclude": [
"src/**/__tests__/**",
"src/**/*.spec.ts",
"src/**/*.test.ts"
]
}

View File

@@ -0,0 +1,38 @@
# @univerjs/preset-docs-thread-comment
[![npm version](https://img.shields.io/npm/v/@univerjs/preset-docs-thread-comment?style=flat-square)](https://npmjs.com/package/@univerjs/preset-docs-thread-comment)
[![license](https://img.shields.io/npm/l/@univerjs/preset-docs-thread-comment?style=flat-square)](https://npmjs.com/package/@univerjs/preset-docs-thread-comment)
[![downloads](https://img.shields.io/npm/dm/@univerjs/preset-docs-thread-comment?style=flat-square)](https://npmjs.com/package/@univerjs/preset-docs-thread-comment)
`@univerjs/preset-docs-thread-comment` provides a preset for thread comments in Univer Docs.
## Package Overview
| Package | CSS | Locales | Facade entry |
| -------------------------------------- | :-: | :-----: | :----------: |
| `@univerjs/preset-docs-thread-comment` | Yes | Yes | No |
## Installation
```sh
pnpm add @univerjs/preset-docs-thread-comment
# or
npm install @univerjs/preset-docs-thread-comment
```
Keep all `@univerjs/*` packages on the same version.
## Usage
```ts
import { UniverDocsThreadCommentPreset } from '@univerjs/preset-docs-thread-comment';
// Use with createUniver:
// createUniver({ presets: [UniverDocsThreadCommentPreset()] });
```
## Resources
- [Documentation](https://docs.univer.ai)
- [NPM package](https://npmjs.com/package/@univerjs/preset-docs-thread-comment)
- [GitHub repository](https://github.com/dream-num/univer)

View File

@@ -0,0 +1,86 @@
{
"name": "@univerjs/preset-docs-thread-comment",
"version": "1.0.0-rc.0",
"private": false,
"description": "Preset for thread comments in Univer Docs.",
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
"license": "Apache-2.0",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/univer"
},
"homepage": "https://univer.ai",
"repository": {
"type": "git",
"url": "https://github.com/dream-num/univer"
},
"bugs": {
"url": "https://github.com/dream-num/univer/issues"
},
"keywords": [
"univer",
"univer-preset",
"docs",
"thread-comment"
],
"sideEffects": [
"*.css"
],
"exports": {
".": "./src/index.ts",
"./locales/*": "./src/locales/*.ts",
"./lib/*": "./lib/*"
},
"publishConfig": {
"access": "public",
"main": "./lib/es/index.js",
"module": "./lib/es/index.js",
"exports": {
".": {
"import": "./lib/es/index.js",
"require": "./lib/cjs/index.js",
"types": "./lib/types/index.d.ts"
},
"./locales/*": {
"import": "./lib/es/locales/*.js",
"require": "./lib/cjs/locales/*.js",
"types": "./lib/types/locales/*.d.ts"
},
"./lib/*": "./lib/*"
}
},
"main": "./src/index.ts",
"directories": {
"lib": "lib"
},
"types": "./lib/types/index.d.ts",
"files": [
"lib"
],
"scripts": {
"prepare": "univer-cli preset prepare",
"build:bundle": "univer-cli preset build --cleanup",
"build:types": "tsc -p tsconfig.node.json",
"build": "pnpm run build:bundle && pnpm run build:types",
"typecheck": "tsc --noEmit"
},
"peerDependencies": {
"react": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
"react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
"rxjs": ">=7.0.0"
},
"dependencies": {
"@univerjs/docs-thread-comment-ui": "workspace:*",
"@univerjs/thread-comment": "workspace:*",
"@univerjs/thread-comment-ui": "workspace:*"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@univerjs/core": "workspace:*",
"@univerjs/presets": "workspace:*",
"react": "18.3.1",
"react-dom": "18.3.1",
"rxjs": "^7.8.2",
"typescript": "^6.0.3"
}
}

View File

@@ -0,0 +1,17 @@
/**
* 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 { default } from '@univerjs-infra/shared/postcss';

View File

@@ -0,0 +1,19 @@
/**
* 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-thread-comment-ui';
export * from '@univerjs/thread-comment-ui';

View File

@@ -0,0 +1,36 @@
/**
* 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 { UniverDocsThreadCommentUIPlugin } from '@univerjs/docs-thread-comment-ui';
import { UniverThreadCommentUIPlugin } from '@univerjs/thread-comment-ui';
export interface IUniverDocsThreadCommentPresetConfig {
}
/**
* This preset add thread comment features into your application.
*
* @param {Partial<IUniverDocsThreadCommentPresetConfig>} config - The configuration object.
*/
export function UniverDocsThreadCommentPreset(_config: Partial<IUniverDocsThreadCommentPresetConfig> = {}): IPreset {
const plugins: IPreset['plugins'] = [
UniverThreadCommentUIPlugin,
UniverDocsThreadCommentUIPlugin,
];
return { plugins };
}

View File

@@ -0,0 +1,27 @@
/**
* 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 { Config } from 'tailwindcss';
import preset, { createTailwindContent } from '@univerjs-infra/shared/tailwind';
const config: Config = {
presets: [preset],
content: createTailwindContent(import.meta.url, {
includeStyleDependencies: true,
}),
};
export default config;

View File

@@ -0,0 +1,8 @@
{
"extends": "@univerjs-infra/shared/tsconfigs/base",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib/types"
},
"include": ["src", "../../common/shared/types/global.d.ts"]
}

View File

@@ -0,0 +1,18 @@
{
"extends": "@univerjs-infra/shared/tsconfigs/node",
"compilerOptions": {
"rootDir": "src",
"declaration": true,
"emitDeclarationOnly": true,
"noEmit": false,
"outDir": "lib/types"
},
"include": [
"src"
],
"exclude": [
"src/**/__tests__/**",
"src/**/*.spec.ts",
"src/**/*.test.ts"
]
}

View File

@@ -0,0 +1,38 @@
# @univerjs/preset-sheets-conditional-formatting
[![npm version](https://img.shields.io/npm/v/@univerjs/preset-sheets-conditional-formatting?style=flat-square)](https://npmjs.com/package/@univerjs/preset-sheets-conditional-formatting)
[![license](https://img.shields.io/npm/l/@univerjs/preset-sheets-conditional-formatting?style=flat-square)](https://npmjs.com/package/@univerjs/preset-sheets-conditional-formatting)
[![downloads](https://img.shields.io/npm/dm/@univerjs/preset-sheets-conditional-formatting?style=flat-square)](https://npmjs.com/package/@univerjs/preset-sheets-conditional-formatting)
`@univerjs/preset-sheets-conditional-formatting` provides a preset for conditional formatting in Univer Sheets.
## Package Overview
| Package | CSS | Locales | Facade entry |
| ------------------------------------------------ | :-: | :-----: | :----------: |
| `@univerjs/preset-sheets-conditional-formatting` | Yes | Yes | Yes |
## Installation
```sh
pnpm add @univerjs/preset-sheets-conditional-formatting
# or
npm install @univerjs/preset-sheets-conditional-formatting
```
Keep all `@univerjs/*` packages on the same version.
## Usage
```ts
import { UniverSheetsConditionalFormattingPreset } from '@univerjs/preset-sheets-conditional-formatting';
// Use with createUniver:
// createUniver({ presets: [UniverSheetsConditionalFormattingPreset()] });
```
## Resources
- [Documentation](https://docs.univer.ai)
- [NPM package](https://npmjs.com/package/@univerjs/preset-sheets-conditional-formatting)
- [GitHub repository](https://github.com/dream-num/univer)

View File

@@ -0,0 +1,85 @@
{
"name": "@univerjs/preset-sheets-conditional-formatting",
"version": "1.0.0-rc.0",
"private": false,
"description": "Preset for conditional formatting in Univer Sheets.",
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
"license": "Apache-2.0",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/univer"
},
"homepage": "https://univer.ai",
"repository": {
"type": "git",
"url": "https://github.com/dream-num/univer"
},
"bugs": {
"url": "https://github.com/dream-num/univer/issues"
},
"keywords": [
"univer",
"univer-preset",
"sheets",
"conditional-formatting"
],
"sideEffects": [
"*.css"
],
"exports": {
".": "./src/index.ts",
"./locales/*": "./src/locales/*.ts",
"./lib/*": "./lib/*"
},
"publishConfig": {
"access": "public",
"main": "./lib/es/index.js",
"module": "./lib/es/index.js",
"exports": {
".": {
"import": "./lib/es/index.js",
"require": "./lib/cjs/index.js",
"types": "./lib/types/index.d.ts"
},
"./locales/*": {
"import": "./lib/es/locales/*.js",
"require": "./lib/cjs/locales/*.js",
"types": "./lib/types/locales/*.d.ts"
},
"./lib/*": "./lib/*"
}
},
"main": "./src/index.ts",
"directories": {
"lib": "lib"
},
"types": "./lib/types/index.d.ts",
"files": [
"lib"
],
"scripts": {
"prepare": "univer-cli preset prepare",
"build:bundle": "univer-cli preset build --cleanup",
"build:types": "tsc -p tsconfig.node.json",
"build": "pnpm run build:bundle && pnpm run build:types",
"typecheck": "tsc --noEmit"
},
"peerDependencies": {
"react": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
"react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
"rxjs": ">=7.0.0"
},
"dependencies": {
"@univerjs/sheets-conditional-formatting": "workspace:*",
"@univerjs/sheets-conditional-formatting-ui": "workspace:*"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@univerjs/core": "workspace:*",
"@univerjs/presets": "workspace:*",
"react": "18.3.1",
"react-dom": "18.3.1",
"rxjs": "^7.8.2",
"typescript": "^6.0.3"
}
}

View File

@@ -0,0 +1,17 @@
/**
* 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 { default } from '@univerjs-infra/shared/postcss';

View File

@@ -0,0 +1,19 @@
/**
* 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/sheets-conditional-formatting';
export * from '@univerjs/sheets-conditional-formatting-ui';

View File

@@ -0,0 +1,33 @@
/**
* 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 { UniverSheetsConditionalFormattingPlugin } from '@univerjs/sheets-conditional-formatting';
import { UniverSheetsConditionalFormattingUIPlugin } from '@univerjs/sheets-conditional-formatting-ui';
import '@univerjs/sheets-conditional-formatting/facade';
export type * from '@univerjs/sheets-conditional-formatting/facade';
export function UniverSheetsConditionalFormattingPreset(): IPreset {
return {
plugins: [
UniverSheetsConditionalFormattingPlugin,
UniverSheetsConditionalFormattingUIPlugin,
].filter((v) => !!v) as IPreset['plugins'],
};
};

View File

@@ -0,0 +1,27 @@
/**
* 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 { Config } from 'tailwindcss';
import preset, { createTailwindContent } from '@univerjs-infra/shared/tailwind';
const config: Config = {
presets: [preset],
content: createTailwindContent(import.meta.url, {
includeStyleDependencies: true,
}),
};
export default config;

View File

@@ -0,0 +1,8 @@
{
"extends": "@univerjs-infra/shared/tsconfigs/base",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib/types"
},
"include": ["src", "../../common/shared/types/global.d.ts"]
}

View File

@@ -0,0 +1,18 @@
{
"extends": "@univerjs-infra/shared/tsconfigs/node",
"compilerOptions": {
"rootDir": "src",
"declaration": true,
"emitDeclarationOnly": true,
"noEmit": false,
"outDir": "lib/types"
},
"include": [
"src"
],
"exclude": [
"src/**/__tests__/**",
"src/**/*.spec.ts",
"src/**/*.test.ts"
]
}

View File

@@ -0,0 +1,38 @@
# @univerjs/preset-sheets-core
[![npm version](https://img.shields.io/npm/v/@univerjs/preset-sheets-core?style=flat-square)](https://npmjs.com/package/@univerjs/preset-sheets-core)
[![license](https://img.shields.io/npm/l/@univerjs/preset-sheets-core?style=flat-square)](https://npmjs.com/package/@univerjs/preset-sheets-core)
[![downloads](https://img.shields.io/npm/dm/@univerjs/preset-sheets-core?style=flat-square)](https://npmjs.com/package/@univerjs/preset-sheets-core)
`@univerjs/preset-sheets-core` provides a preset for core Univer Sheets spreadsheet features.
## Package Overview
| Package | CSS | Locales | Facade entry |
| ------------------------------ | :-: | :-----: | :----------: |
| `@univerjs/preset-sheets-core` | Yes | Yes | Yes |
## Installation
```sh
pnpm add @univerjs/preset-sheets-core
# or
npm install @univerjs/preset-sheets-core
```
Keep all `@univerjs/*` packages on the same version.
## Usage
```ts
import { UniverSheetsCorePreset } from '@univerjs/preset-sheets-core';
// Use with createUniver:
// createUniver({ presets: [UniverSheetsCorePreset()] });
```
## Resources
- [Documentation](https://docs.univer.ai)
- [NPM package](https://npmjs.com/package/@univerjs/preset-sheets-core)
- [GitHub repository](https://github.com/dream-num/univer)

View File

@@ -0,0 +1,103 @@
{
"name": "@univerjs/preset-sheets-core",
"version": "1.0.0-rc.0",
"private": false,
"description": "Preset for core Univer Sheets spreadsheet features.",
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
"license": "Apache-2.0",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/univer"
},
"homepage": "https://univer.ai",
"repository": {
"type": "git",
"url": "https://github.com/dream-num/univer"
},
"bugs": {
"url": "https://github.com/dream-num/univer/issues"
},
"keywords": [
"univer",
"univer-preset",
"sheets",
"core"
],
"sideEffects": [
"*.css"
],
"exports": {
".": "./src/index.ts",
"./worker": "./src/worker.ts",
"./locales/*": "./src/locales/*.ts",
"./lib/*": "./lib/*"
},
"publishConfig": {
"access": "public",
"main": "./lib/es/index.js",
"module": "./lib/es/index.js",
"exports": {
".": {
"import": "./lib/es/index.js",
"require": "./lib/cjs/index.js",
"types": "./lib/types/index.d.ts"
},
"./worker": {
"import": "./lib/es/worker.js",
"require": "./lib/cjs/worker.js",
"types": "./lib/types/worker.d.ts"
},
"./locales/*": {
"import": "./lib/es/locales/*.js",
"require": "./lib/cjs/locales/*.js",
"types": "./lib/types/locales/*.d.ts"
},
"./lib/*": "./lib/*"
}
},
"main": "./src/index.ts",
"directories": {
"lib": "lib"
},
"types": "./lib/types/index.d.ts",
"files": [
"lib"
],
"scripts": {
"prepare": "univer-cli preset prepare",
"build:bundle": "univer-cli preset build --cleanup",
"build:types": "tsc -p tsconfig.node.json",
"build": "pnpm run build:bundle && pnpm run build:types",
"typecheck": "tsc --noEmit"
},
"peerDependencies": {
"react": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
"react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
"rxjs": ">=7.0.0"
},
"dependencies": {
"@univerjs/design": "workspace:*",
"@univerjs/docs": "workspace:*",
"@univerjs/docs-ui": "workspace:*",
"@univerjs/engine-formula": "workspace:*",
"@univerjs/engine-render": "workspace:*",
"@univerjs/network": "workspace:*",
"@univerjs/rpc": "workspace:*",
"@univerjs/sheets": "workspace:*",
"@univerjs/sheets-formula": "workspace:*",
"@univerjs/sheets-formula-ui": "workspace:*",
"@univerjs/sheets-numfmt": "workspace:*",
"@univerjs/sheets-numfmt-ui": "workspace:*",
"@univerjs/sheets-ui": "workspace:*",
"@univerjs/ui": "workspace:*"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@univerjs/core": "workspace:*",
"@univerjs/presets": "workspace:*",
"react": "18.3.1",
"react-dom": "18.3.1",
"rxjs": "^7.8.2",
"typescript": "^6.0.3"
}
}

View File

@@ -0,0 +1,17 @@
/**
* 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 { default } from '@univerjs-infra/shared/postcss';

View File

@@ -0,0 +1,31 @@
/**
* 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/design';
export * from '@univerjs/docs';
export * from '@univerjs/docs-ui';
export * from '@univerjs/engine-formula';
export * from '@univerjs/engine-render';
export * from '@univerjs/network';
export * from '@univerjs/rpc';
export * from '@univerjs/sheets';
export * from '@univerjs/sheets-formula';
export * from '@univerjs/sheets-formula-ui';
export * from '@univerjs/sheets-numfmt';
export * from '@univerjs/sheets-numfmt-ui';
export * from '@univerjs/sheets-ui';
export * from '@univerjs/ui';

View File

@@ -0,0 +1,167 @@
/**
* 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 { IUniverRPCMainThreadConfig } from '@univerjs/rpc';
import type { IUniverSheetsNumfmtConfig } from '@univerjs/sheets-numfmt';
import type { IUniverSheetsUIConfig } from '@univerjs/sheets-ui';
import type { IUniverUIConfig } from '@univerjs/ui';
import type { IUniverDocsPresetConfig, IUniverFormulaConfig, IUniverSheetsPresetConfig } from './types';
import { UniverDocsPlugin } from '@univerjs/docs';
import { UniverDocsUIPlugin } from '@univerjs/docs-ui';
import { UniverFormulaEnginePlugin } from '@univerjs/engine-formula';
import { UniverRenderEnginePlugin } from '@univerjs/engine-render';
import { UniverNetworkPlugin } from '@univerjs/network';
import { UniverRPCMainThreadPlugin } from '@univerjs/rpc';
import { UniverSheetsPlugin } from '@univerjs/sheets';
import { UniverSheetsFormulaPlugin } from '@univerjs/sheets-formula';
import { UniverSheetsFormulaUIPlugin } from '@univerjs/sheets-formula-ui';
import { UniverSheetsNumfmtPlugin } from '@univerjs/sheets-numfmt';
import { UniverSheetsNumfmtUIPlugin } from '@univerjs/sheets-numfmt-ui';
import { UniverSheetsUIPlugin } from '@univerjs/sheets-ui';
import { UniverUIPlugin } from '@univerjs/ui';
// NOTE: here we copy code from everything.ts. That file (along with the package itself) would be removed in the future.
import '@univerjs/network/facade';
import '@univerjs/sheets/facade';
import '@univerjs/ui/facade';
import '@univerjs/docs-ui/facade';
import '@univerjs/sheets-ui/facade';
import '@univerjs/engine-formula/facade';
import '@univerjs/sheets-formula/facade';
import '@univerjs/sheets-numfmt/facade';
import '@univerjs/sheets-formula-ui/facade';
export type * from '@univerjs/docs-ui/facade';
export type * from '@univerjs/engine-formula/facade';
export type * from '@univerjs/network/facade';
export type * from '@univerjs/sheets-formula-ui/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<IUniverUIConfig, 'container' | 'header' | 'toolbar' | 'ribbonType' | 'menu' | 'contextMenu' | 'disableAutoFocus' | 'customFontFamily'>,
Pick<IUniverSheetsUIConfig, 'formulaBar' | 'footer'>,
IUniverSheetsNumfmtConfig {
/**
* The docs related configuration.
*/
docs?: IUniverDocsPresetConfig;
/**
* The sheets related configuration.
*/
sheets?: IUniverSheetsPresetConfig;
/**
* The formula related configuration.
*/
formula?: IUniverFormulaConfig;
/**
* The URL of the worker script.
*/
workerURL: IUniverRPCMainThreadConfig['workerURL'];
}
/**
* This presets helps you to create a Univer sheet with open sourced features.
*/
export function UniverSheetsCorePreset(config: Partial<IUniverSheetsCorePresetConfig> = {}): IPreset {
const {
container = 'app',
workerURL: workerSrc,
header,
footer,
toolbar,
ribbonType,
formulaBar,
menu,
contextMenu,
disableAutoFocus,
customFontFamily,
docs,
sheets,
formula,
disableTextFormatAlert,
disableTextFormatMark,
} = config;
const useWorker = !!workerSrc;
return {
plugins: [
UniverNetworkPlugin,
[UniverDocsPlugin, {
hasScroll: docs?.hasScroll,
}],
UniverRenderEnginePlugin,
[UniverUIPlugin, {
container,
header,
toolbar,
ribbonType,
menu,
contextMenu,
disableAutoFocus,
customFontFamily,
}],
UniverDocsUIPlugin,
useWorker
? [UniverRPCMainThreadPlugin, { workerURL: workerSrc }]
: null,
[UniverFormulaEnginePlugin, {
notExecuteFormula: useWorker,
function: formula?.function,
}],
[UniverSheetsPlugin, {
notExecuteFormula: useWorker,
onlyRegisterFormulaRelatedMutations: false,
isRowStylePrecedeColumnStyle: sheets?.isRowStylePrecedeColumnStyle,
autoHeightForMergedCells: sheets?.autoHeightForMergedCells,
freezeSync: sheets?.freezeSync,
}],
[UniverSheetsUIPlugin, {
formulaBar,
footer,
maxAutoHeightCount: sheets?.maxAutoHeightCount,
clipboardConfig: sheets?.clipboardConfig,
scrollConfig: sheets?.scrollConfig,
protectedRangeShadow: sheets?.protectedRangeShadow ?? true,
protectedRangeUserSelector: sheets?.protectedRangeUserSelector,
disableForceStringAlert: sheets?.disableForceStringAlert,
disableForceStringMark: sheets?.disableForceStringMark,
}],
[UniverSheetsNumfmtPlugin, {
disableTextFormatAlert,
disableTextFormatMark,
}],
UniverSheetsNumfmtUIPlugin,
[UniverSheetsFormulaPlugin, {
notExecuteFormula: useWorker,
description: formula?.description,
initialFormulaComputing: formula?.initialFormulaComputing,
}],
[UniverSheetsFormulaUIPlugin, {
functionScreenTips: formula?.functionScreenTips,
}],
].filter((v) => !!v) as IPreset['plugins'],
};
};

View File

@@ -0,0 +1,41 @@
/**
* 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 { IUniverDocsConfig } from '@univerjs/docs';
import type { IUniverEngineFormulaConfig } from '@univerjs/engine-formula';
import type { IUniverSheetsConfig } from '@univerjs/sheets';
import type { IUniverSheetsFormulaBaseConfig } from '@univerjs/sheets-formula';
import type { IUniverSheetsFormulaUIConfig } from '@univerjs/sheets-formula-ui';
import type { IUniverSheetsUIConfig } from '@univerjs/sheets-ui';
export interface IUniverFormulaConfig extends
Pick<IUniverEngineFormulaConfig, 'function'>,
Pick<IUniverSheetsFormulaBaseConfig, 'description' | 'initialFormulaComputing'>,
Pick<IUniverSheetsFormulaUIConfig, 'functionScreenTips'> {
}
export interface IUniverFormulaWorkerConfig extends
Pick<IUniverEngineFormulaConfig, 'function'> {
}
export interface IUniverDocsPresetConfig extends
IUniverDocsConfig {
}
export interface IUniverSheetsPresetConfig extends
Pick<IUniverSheetsConfig, 'isRowStylePrecedeColumnStyle' | 'autoHeightForMergedCells' | 'freezeSync'>,
Pick<IUniverSheetsUIConfig, 'maxAutoHeightCount' | 'clipboardConfig' | 'scrollConfig' | 'protectedRangeShadow' | 'protectedRangeUserSelector' | 'disableForceStringAlert' | 'disableForceStringMark'> {
}

View File

@@ -0,0 +1,43 @@
/**
* 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 { IUniverFormulaWorkerConfig } from './types';
import { UniverFormulaEnginePlugin } from '@univerjs/engine-formula';
import { UniverRPCWorkerThreadPlugin } from '@univerjs/rpc';
import { UniverSheetsPlugin } from '@univerjs/sheets';
import { UniverRemoteSheetsFormulaPlugin } from '@univerjs/sheets-formula';
export interface IUniverSheetsCoreWorkerPresetConfig {
/**
* The formula worker config.
*/
formula?: IUniverFormulaWorkerConfig;
}
export function UniverSheetsCoreWorkerPreset(config: Partial<IUniverSheetsCoreWorkerPresetConfig> = {}): IPreset {
const {
formula,
} = config;
return {
plugins: [
[UniverSheetsPlugin, { onlyRegisterFormulaRelatedMutations: true }],
[UniverFormulaEnginePlugin, { function: formula?.function }],
UniverRPCWorkerThreadPlugin,
UniverRemoteSheetsFormulaPlugin,
],
};
}

View File

@@ -0,0 +1,27 @@
/**
* 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 { Config } from 'tailwindcss';
import preset, { createTailwindContent } from '@univerjs-infra/shared/tailwind';
const config: Config = {
presets: [preset],
content: createTailwindContent(import.meta.url, {
includeStyleDependencies: true,
}),
};
export default config;

View File

@@ -0,0 +1,8 @@
{
"extends": "@univerjs-infra/shared/tsconfigs/base",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib/types"
},
"include": ["src", "../../common/shared/types/global.d.ts"]
}

View File

@@ -0,0 +1,18 @@
{
"extends": "@univerjs-infra/shared/tsconfigs/node",
"compilerOptions": {
"rootDir": "src",
"declaration": true,
"emitDeclarationOnly": true,
"noEmit": false,
"outDir": "lib/types"
},
"include": [
"src"
],
"exclude": [
"src/**/__tests__/**",
"src/**/*.spec.ts",
"src/**/*.test.ts"
]
}

View File

@@ -0,0 +1,38 @@
# @univerjs/preset-sheets-data-validation
[![npm version](https://img.shields.io/npm/v/@univerjs/preset-sheets-data-validation?style=flat-square)](https://npmjs.com/package/@univerjs/preset-sheets-data-validation)
[![license](https://img.shields.io/npm/l/@univerjs/preset-sheets-data-validation?style=flat-square)](https://npmjs.com/package/@univerjs/preset-sheets-data-validation)
[![downloads](https://img.shields.io/npm/dm/@univerjs/preset-sheets-data-validation?style=flat-square)](https://npmjs.com/package/@univerjs/preset-sheets-data-validation)
`@univerjs/preset-sheets-data-validation` provides a preset for data validation in Univer Sheets.
## Package Overview
| Package | CSS | Locales | Facade entry |
| ----------------------------------------- | :-: | :-----: | :----------: |
| `@univerjs/preset-sheets-data-validation` | Yes | Yes | Yes |
## Installation
```sh
pnpm add @univerjs/preset-sheets-data-validation
# or
npm install @univerjs/preset-sheets-data-validation
```
Keep all `@univerjs/*` packages on the same version.
## Usage
```ts
import { UniverSheetsDataValidationPreset } from '@univerjs/preset-sheets-data-validation';
// Use with createUniver:
// createUniver({ presets: [UniverSheetsDataValidationPreset()] });
```
## Resources
- [Documentation](https://docs.univer.ai)
- [NPM package](https://npmjs.com/package/@univerjs/preset-sheets-data-validation)
- [GitHub repository](https://github.com/dream-num/univer)

View File

@@ -0,0 +1,86 @@
{
"name": "@univerjs/preset-sheets-data-validation",
"version": "1.0.0-rc.0",
"private": false,
"description": "Preset for data validation in Univer Sheets.",
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
"license": "Apache-2.0",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/univer"
},
"homepage": "https://univer.ai",
"repository": {
"type": "git",
"url": "https://github.com/dream-num/univer"
},
"bugs": {
"url": "https://github.com/dream-num/univer/issues"
},
"keywords": [
"univer",
"univer-preset",
"sheets",
"data-validation"
],
"sideEffects": [
"*.css"
],
"exports": {
".": "./src/index.ts",
"./locales/*": "./src/locales/*.ts",
"./lib/*": "./lib/*"
},
"publishConfig": {
"access": "public",
"main": "./lib/es/index.js",
"module": "./lib/es/index.js",
"exports": {
".": {
"import": "./lib/es/index.js",
"require": "./lib/cjs/index.js",
"types": "./lib/types/index.d.ts"
},
"./locales/*": {
"import": "./lib/es/locales/*.js",
"require": "./lib/cjs/locales/*.js",
"types": "./lib/types/locales/*.d.ts"
},
"./lib/*": "./lib/*"
}
},
"main": "./src/index.ts",
"directories": {
"lib": "lib"
},
"types": "./lib/types/index.d.ts",
"files": [
"lib"
],
"scripts": {
"prepare": "univer-cli preset prepare",
"build:bundle": "univer-cli preset build --cleanup",
"build:types": "tsc -p tsconfig.node.json",
"build": "pnpm run build:bundle && pnpm run build:types",
"typecheck": "tsc --noEmit"
},
"peerDependencies": {
"react": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
"react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
"rxjs": ">=7.0.0"
},
"dependencies": {
"@univerjs/data-validation": "workspace:*",
"@univerjs/sheets-data-validation": "workspace:*",
"@univerjs/sheets-data-validation-ui": "workspace:*"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@univerjs/core": "workspace:*",
"@univerjs/presets": "workspace:*",
"react": "18.3.1",
"react-dom": "18.3.1",
"rxjs": "^7.8.2",
"typescript": "^6.0.3"
}
}

View File

@@ -0,0 +1,17 @@
/**
* 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 { default } from '@univerjs-infra/shared/postcss';

View File

@@ -0,0 +1,20 @@
/**
* 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/data-validation';
export * from '@univerjs/sheets-data-validation';
export * from '@univerjs/sheets-data-validation-ui';

View File

@@ -0,0 +1,44 @@
/**
* 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 { IUniverSheetsDataValidationUIConfig } from '@univerjs/sheets-data-validation-ui';
import { UniverDataValidationPlugin } from '@univerjs/data-validation';
import { UniverSheetsDataValidationPlugin } from '@univerjs/sheets-data-validation';
import { UniverSheetsDataValidationUIPlugin } from '@univerjs/sheets-data-validation-ui';
import '@univerjs/sheets-data-validation/facade';
export type * from '@univerjs/sheets-data-validation/facade';
export interface IUniverSheetsDataValidationPresetConfig extends
Pick<IUniverSheetsDataValidationUIConfig, 'showEditOnDropdown' | 'showSearchOnDropdown'> {
}
export function UniverSheetsDataValidationPreset(config: Partial<IUniverSheetsDataValidationPresetConfig> = {}): IPreset {
const { showEditOnDropdown, showSearchOnDropdown } = config;
return {
plugins: [
UniverDataValidationPlugin,
UniverSheetsDataValidationPlugin,
[UniverSheetsDataValidationUIPlugin, {
showEditOnDropdown,
showSearchOnDropdown,
}],
].filter((v) => !!v) as IPreset['plugins'],
};
};

View File

@@ -0,0 +1,27 @@
/**
* 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 { Config } from 'tailwindcss';
import preset, { createTailwindContent } from '@univerjs-infra/shared/tailwind';
const config: Config = {
presets: [preset],
content: createTailwindContent(import.meta.url, {
includeStyleDependencies: true,
}),
};
export default config;

View File

@@ -0,0 +1,8 @@
{
"extends": "@univerjs-infra/shared/tsconfigs/base",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib/types"
},
"include": ["src", "../../common/shared/types/global.d.ts"]
}

View File

@@ -0,0 +1,18 @@
{
"extends": "@univerjs-infra/shared/tsconfigs/node",
"compilerOptions": {
"rootDir": "src",
"declaration": true,
"emitDeclarationOnly": true,
"noEmit": false,
"outDir": "lib/types"
},
"include": [
"src"
],
"exclude": [
"src/**/__tests__/**",
"src/**/*.spec.ts",
"src/**/*.test.ts"
]
}

View File

@@ -0,0 +1,38 @@
# @univerjs/preset-sheets-drawing
[![npm version](https://img.shields.io/npm/v/@univerjs/preset-sheets-drawing?style=flat-square)](https://npmjs.com/package/@univerjs/preset-sheets-drawing)
[![license](https://img.shields.io/npm/l/@univerjs/preset-sheets-drawing?style=flat-square)](https://npmjs.com/package/@univerjs/preset-sheets-drawing)
[![downloads](https://img.shields.io/npm/dm/@univerjs/preset-sheets-drawing?style=flat-square)](https://npmjs.com/package/@univerjs/preset-sheets-drawing)
`@univerjs/preset-sheets-drawing` provides a preset for drawing capabilities in Univer Sheets.
## Package Overview
| Package | CSS | Locales | Facade entry |
| --------------------------------- | :-: | :-----: | :----------: |
| `@univerjs/preset-sheets-drawing` | Yes | Yes | Yes |
## Installation
```sh
pnpm add @univerjs/preset-sheets-drawing
# or
npm install @univerjs/preset-sheets-drawing
```
Keep all `@univerjs/*` packages on the same version.
## Usage
```ts
import { UniverSheetsDrawingPreset } from '@univerjs/preset-sheets-drawing';
// Use with createUniver:
// createUniver({ presets: [UniverSheetsDrawingPreset()] });
```
## Resources
- [Documentation](https://docs.univer.ai)
- [NPM package](https://npmjs.com/package/@univerjs/preset-sheets-drawing)
- [GitHub repository](https://github.com/dream-num/univer)

View File

@@ -0,0 +1,88 @@
{
"name": "@univerjs/preset-sheets-drawing",
"version": "1.0.0-rc.0",
"private": false,
"description": "Preset for drawing capabilities in Univer Sheets.",
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
"license": "Apache-2.0",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/univer"
},
"homepage": "https://univer.ai",
"repository": {
"type": "git",
"url": "https://github.com/dream-num/univer"
},
"bugs": {
"url": "https://github.com/dream-num/univer/issues"
},
"keywords": [
"univer",
"univer-preset",
"sheets",
"drawing"
],
"sideEffects": [
"*.css"
],
"exports": {
".": "./src/index.ts",
"./locales/*": "./src/locales/*.ts",
"./lib/*": "./lib/*"
},
"publishConfig": {
"access": "public",
"main": "./lib/es/index.js",
"module": "./lib/es/index.js",
"exports": {
".": {
"import": "./lib/es/index.js",
"require": "./lib/cjs/index.js",
"types": "./lib/types/index.d.ts"
},
"./locales/*": {
"import": "./lib/es/locales/*.js",
"require": "./lib/cjs/locales/*.js",
"types": "./lib/types/locales/*.d.ts"
},
"./lib/*": "./lib/*"
}
},
"main": "./src/index.ts",
"directories": {
"lib": "lib"
},
"types": "./lib/types/index.d.ts",
"files": [
"lib"
],
"scripts": {
"prepare": "univer-cli preset prepare",
"build:bundle": "univer-cli preset build --cleanup",
"build:types": "tsc -p tsconfig.node.json",
"build": "pnpm run build:bundle && pnpm run build:types",
"typecheck": "tsc --noEmit"
},
"peerDependencies": {
"react": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
"react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
"rxjs": ">=7.0.0"
},
"dependencies": {
"@univerjs/core": "workspace:*",
"@univerjs/docs-drawing": "workspace:*",
"@univerjs/drawing": "workspace:*",
"@univerjs/drawing-ui": "workspace:*",
"@univerjs/sheets-drawing": "workspace:*",
"@univerjs/sheets-drawing-ui": "workspace:*"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@univerjs/presets": "workspace:*",
"react": "18.3.1",
"react-dom": "18.3.1",
"rxjs": "^7.8.2",
"typescript": "^6.0.3"
}
}

View File

@@ -0,0 +1,17 @@
/**
* 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 { default } from '@univerjs-infra/shared/postcss';

View File

@@ -0,0 +1,22 @@
/**
* 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-drawing';
export * from '@univerjs/drawing';
export * from '@univerjs/drawing-ui';
export * from '@univerjs/sheets-drawing';
export * from '@univerjs/sheets-drawing-ui';

View File

@@ -0,0 +1,51 @@
/**
* 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 { IUniverDrawingConfig } from '@univerjs/drawing';
import type { IPreset } from '@univerjs/presets';
import { IImageIoService } from '@univerjs/core';
import { UniverDocsDrawingPlugin } from '@univerjs/docs-drawing';
import { UniverDrawingPlugin } from '@univerjs/drawing';
import { UniverDrawingUIPlugin } from '@univerjs/drawing-ui';
import { UniverSheetsDrawingPlugin } from '@univerjs/sheets-drawing';
import { UniverSheetsDrawingUIPlugin } from '@univerjs/sheets-drawing-ui';
import '@univerjs/sheets-drawing/facade';
import '@univerjs/sheets-drawing-ui/facade';
export type * from '@univerjs/sheets-drawing-ui/facade';
export type * from '@univerjs/sheets-drawing/facade';
export interface IUniverSheetsDrawingPresetConfig extends Pick<IUniverDrawingConfig, 'allowImageSize'> {
collaboration?: boolean;
}
export function UniverSheetsDrawingPreset(config: Partial<IUniverSheetsDrawingPresetConfig> = {}): IPreset {
const { collaboration = false, allowImageSize } = config;
return {
plugins: [
[UniverDrawingPlugin, {
override: collaboration ? [[IImageIoService, null]] : [],
allowImageSize,
}],
UniverDocsDrawingPlugin,
UniverDrawingUIPlugin,
UniverSheetsDrawingPlugin,
UniverSheetsDrawingUIPlugin,
].filter((v) => !!v) as IPreset['plugins'],
};
};

View File

@@ -0,0 +1,27 @@
/**
* 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 { Config } from 'tailwindcss';
import preset, { createTailwindContent } from '@univerjs-infra/shared/tailwind';
const config: Config = {
presets: [preset],
content: createTailwindContent(import.meta.url, {
includeStyleDependencies: true,
}),
};
export default config;

View File

@@ -0,0 +1,8 @@
{
"extends": "@univerjs-infra/shared/tsconfigs/base",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib/types"
},
"include": ["src", "../../common/shared/types/global.d.ts"]
}

View File

@@ -0,0 +1,18 @@
{
"extends": "@univerjs-infra/shared/tsconfigs/node",
"compilerOptions": {
"rootDir": "src",
"declaration": true,
"emitDeclarationOnly": true,
"noEmit": false,
"outDir": "lib/types"
},
"include": [
"src"
],
"exclude": [
"src/**/__tests__/**",
"src/**/*.spec.ts",
"src/**/*.test.ts"
]
}

View File

@@ -0,0 +1,38 @@
# @univerjs/preset-sheets-filter
[![npm version](https://img.shields.io/npm/v/@univerjs/preset-sheets-filter?style=flat-square)](https://npmjs.com/package/@univerjs/preset-sheets-filter)
[![license](https://img.shields.io/npm/l/@univerjs/preset-sheets-filter?style=flat-square)](https://npmjs.com/package/@univerjs/preset-sheets-filter)
[![downloads](https://img.shields.io/npm/dm/@univerjs/preset-sheets-filter?style=flat-square)](https://npmjs.com/package/@univerjs/preset-sheets-filter)
`@univerjs/preset-sheets-filter` provides a preset for filter functionality in Univer Sheets.
## Package Overview
| Package | CSS | Locales | Facade entry |
| -------------------------------- | :-: | :-----: | :----------: |
| `@univerjs/preset-sheets-filter` | Yes | Yes | Yes |
## Installation
```sh
pnpm add @univerjs/preset-sheets-filter
# or
npm install @univerjs/preset-sheets-filter
```
Keep all `@univerjs/*` packages on the same version.
## Usage
```ts
import { UniverSheetsFilterPreset } from '@univerjs/preset-sheets-filter';
// Use with createUniver:
// createUniver({ presets: [UniverSheetsFilterPreset()] });
```
## Resources
- [Documentation](https://docs.univer.ai)
- [NPM package](https://npmjs.com/package/@univerjs/preset-sheets-filter)
- [GitHub repository](https://github.com/dream-num/univer)

View File

@@ -0,0 +1,91 @@
{
"name": "@univerjs/preset-sheets-filter",
"version": "1.0.0-rc.0",
"private": false,
"description": "Preset for filter functionality in Univer Sheets.",
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
"license": "Apache-2.0",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/univer"
},
"homepage": "https://univer.ai",
"repository": {
"type": "git",
"url": "https://github.com/dream-num/univer"
},
"bugs": {
"url": "https://github.com/dream-num/univer/issues"
},
"keywords": [
"univer",
"univer-preset",
"sheets",
"filter"
],
"sideEffects": [
"*.css"
],
"exports": {
".": "./src/index.ts",
"./worker": "./src/worker.ts",
"./locales/*": "./src/locales/*.ts",
"./lib/*": "./lib/*"
},
"main": "./src/index.ts",
"publishConfig": {
"access": "public",
"main": "./lib/es/index.js",
"module": "./lib/es/index.js",
"exports": {
".": {
"import": "./lib/es/index.js",
"require": "./lib/cjs/index.js",
"types": "./lib/types/index.d.ts"
},
"./worker": {
"import": "./lib/es/worker.js",
"require": "./lib/cjs/worker.js",
"types": "./lib/types/worker.d.ts"
},
"./locales/*": {
"import": "./lib/es/locales/*.js",
"require": "./lib/cjs/locales/*.js",
"types": "./lib/types/locales/*.d.ts"
},
"./lib/*": "./lib/*"
}
},
"directories": {
"lib": "lib"
},
"types": "./lib/types/index.d.ts",
"files": [
"lib"
],
"scripts": {
"prepare": "univer-cli preset prepare",
"build:bundle": "univer-cli preset build --cleanup",
"build:types": "tsc -p tsconfig.node.json",
"build": "pnpm run build:bundle && pnpm run build:types",
"typecheck": "tsc --noEmit"
},
"peerDependencies": {
"react": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
"react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
"rxjs": ">=7.0.0"
},
"dependencies": {
"@univerjs/sheets-filter": "workspace:*",
"@univerjs/sheets-filter-ui": "workspace:*"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@univerjs/core": "workspace:*",
"@univerjs/presets": "workspace:*",
"react": "18.3.1",
"react-dom": "18.3.1",
"rxjs": "^7.8.2",
"typescript": "^6.0.3"
}
}

View File

@@ -0,0 +1,17 @@
/**
* 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 { default } from '@univerjs-infra/shared/postcss';

View File

@@ -0,0 +1,19 @@
/**
* 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/sheets-filter';
export * from '@univerjs/sheets-filter-ui';

View File

@@ -0,0 +1,39 @@
/**
* 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 { IUniverSheetsFilterConfig } from '@univerjs/sheets-filter';
import { UniverSheetsFilterPlugin } from '@univerjs/sheets-filter';
import { UniverSheetsFilterUIPlugin } from '@univerjs/sheets-filter-ui';
import '@univerjs/sheets-filter/facade';
export type * from '@univerjs/sheets-filter/facade';
export interface IUniverSheetsFilterPresetConfig extends IUniverSheetsFilterConfig {
}
export function UniverSheetsFilterPreset(config: Partial<IUniverSheetsFilterPresetConfig> = {}): IPreset {
const { enableSyncSwitch } = config;
return {
plugins: [
[UniverSheetsFilterPlugin, { enableSyncSwitch }],
UniverSheetsFilterUIPlugin,
].filter((v) => !!v) as IPreset['plugins'],
};
};

View File

@@ -0,0 +1,26 @@
/**
* 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 { UniverSheetsFilterPlugin } from '@univerjs/sheets-filter';
export function UniverSheetsFilterWorkerPreset(): IPreset {
return {
plugins: [
UniverSheetsFilterPlugin,
],
};
};

View File

@@ -0,0 +1,27 @@
/**
* 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 { Config } from 'tailwindcss';
import preset, { createTailwindContent } from '@univerjs-infra/shared/tailwind';
const config: Config = {
presets: [preset],
content: createTailwindContent(import.meta.url, {
includeStyleDependencies: true,
}),
};
export default config;

View File

@@ -0,0 +1,8 @@
{
"extends": "@univerjs-infra/shared/tsconfigs/base",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib/types"
},
"include": ["src", "../../common/shared/types/global.d.ts"]
}

View File

@@ -0,0 +1,18 @@
{
"extends": "@univerjs-infra/shared/tsconfigs/node",
"compilerOptions": {
"rootDir": "src",
"declaration": true,
"emitDeclarationOnly": true,
"noEmit": false,
"outDir": "lib/types"
},
"include": [
"src"
],
"exclude": [
"src/**/__tests__/**",
"src/**/*.spec.ts",
"src/**/*.test.ts"
]
}

View File

@@ -0,0 +1,38 @@
# @univerjs/preset-sheets-find-replace
[![npm version](https://img.shields.io/npm/v/@univerjs/preset-sheets-find-replace?style=flat-square)](https://npmjs.com/package/@univerjs/preset-sheets-find-replace)
[![license](https://img.shields.io/npm/l/@univerjs/preset-sheets-find-replace?style=flat-square)](https://npmjs.com/package/@univerjs/preset-sheets-find-replace)
[![downloads](https://img.shields.io/npm/dm/@univerjs/preset-sheets-find-replace?style=flat-square)](https://npmjs.com/package/@univerjs/preset-sheets-find-replace)
`@univerjs/preset-sheets-find-replace` provides a preset for find and replace capabilities in Univer Sheets.
## Package Overview
| Package | CSS | Locales | Facade entry |
| -------------------------------------- | :-: | :-----: | :----------: |
| `@univerjs/preset-sheets-find-replace` | Yes | Yes | Yes |
## Installation
```sh
pnpm add @univerjs/preset-sheets-find-replace
# or
npm install @univerjs/preset-sheets-find-replace
```
Keep all `@univerjs/*` packages on the same version.
## Usage
```ts
import { UniverSheetsFindReplacePreset } from '@univerjs/preset-sheets-find-replace';
// Use with createUniver:
// createUniver({ presets: [UniverSheetsFindReplacePreset()] });
```
## Resources
- [Documentation](https://docs.univer.ai)
- [NPM package](https://npmjs.com/package/@univerjs/preset-sheets-find-replace)
- [GitHub repository](https://github.com/dream-num/univer)

View File

@@ -0,0 +1,85 @@
{
"name": "@univerjs/preset-sheets-find-replace",
"version": "1.0.0-rc.0",
"private": false,
"description": "Preset for find and replace capabilities in Univer Sheets.",
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
"license": "Apache-2.0",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/univer"
},
"homepage": "https://univer.ai",
"repository": {
"type": "git",
"url": "https://github.com/dream-num/univer"
},
"bugs": {
"url": "https://github.com/dream-num/univer/issues"
},
"keywords": [
"univer",
"univer-preset",
"sheets",
"find-replace"
],
"sideEffects": [
"*.css"
],
"exports": {
".": "./src/index.ts",
"./locales/*": "./src/locales/*.ts",
"./lib/*": "./lib/*"
},
"publishConfig": {
"access": "public",
"main": "./lib/es/index.js",
"module": "./lib/es/index.js",
"exports": {
".": {
"import": "./lib/es/index.js",
"require": "./lib/cjs/index.js",
"types": "./lib/types/index.d.ts"
},
"./locales/*": {
"import": "./lib/es/locales/*.js",
"require": "./lib/cjs/locales/*.js",
"types": "./lib/types/locales/*.d.ts"
},
"./lib/*": "./lib/*"
}
},
"main": "./src/index.ts",
"directories": {
"lib": "lib"
},
"types": "./lib/types/index.d.ts",
"files": [
"lib"
],
"scripts": {
"prepare": "univer-cli preset prepare",
"build:bundle": "univer-cli preset build --cleanup",
"build:types": "tsc -p tsconfig.node.json",
"build": "pnpm run build:bundle && pnpm run build:types",
"typecheck": "tsc --noEmit"
},
"peerDependencies": {
"react": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
"react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
"rxjs": ">=7.0.0"
},
"dependencies": {
"@univerjs/find-replace": "workspace:*",
"@univerjs/sheets-find-replace": "workspace:*"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@univerjs/core": "workspace:*",
"@univerjs/presets": "workspace:*",
"react": "18.3.1",
"react-dom": "18.3.1",
"rxjs": "^7.8.2",
"typescript": "^6.0.3"
}
}

View File

@@ -0,0 +1,17 @@
/**
* 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 { default } from '@univerjs-infra/shared/postcss';

View File

@@ -0,0 +1,19 @@
/**
* 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/find-replace';
export * from '@univerjs/sheets-find-replace';

View File

@@ -0,0 +1,34 @@
/**
* 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 { UniverFindReplacePlugin } from '@univerjs/find-replace';
import { UniverSheetsFindReplacePlugin } from '@univerjs/sheets-find-replace';
import '@univerjs/sheets-find-replace/facade';
export type * from '@univerjs/sheets-find-replace/facade';
export interface IUniverSheetsFindReplacePresetConfig {}
export function UniverSheetsFindReplacePreset(_config: Partial<IUniverSheetsFindReplacePresetConfig> = {}): IPreset {
return {
plugins: [
[UniverFindReplacePlugin],
[UniverSheetsFindReplacePlugin],
].filter((v) => !!v) as IPreset['plugins'],
};
}

View File

@@ -0,0 +1,27 @@
/**
* 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 { Config } from 'tailwindcss';
import preset, { createTailwindContent } from '@univerjs-infra/shared/tailwind';
const config: Config = {
presets: [preset],
content: createTailwindContent(import.meta.url, {
includeStyleDependencies: true,
}),
};
export default config;

View File

@@ -0,0 +1,8 @@
{
"extends": "@univerjs-infra/shared/tsconfigs/base",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib/types"
},
"include": ["src", "../../common/shared/types/global.d.ts"]
}

View File

@@ -0,0 +1,18 @@
{
"extends": "@univerjs-infra/shared/tsconfigs/node",
"compilerOptions": {
"rootDir": "src",
"declaration": true,
"emitDeclarationOnly": true,
"noEmit": false,
"outDir": "lib/types"
},
"include": [
"src"
],
"exclude": [
"src/**/__tests__/**",
"src/**/*.spec.ts",
"src/**/*.test.ts"
]
}

View File

@@ -0,0 +1,38 @@
# @univerjs/preset-sheets-hyper-link
[![npm version](https://img.shields.io/npm/v/@univerjs/preset-sheets-hyper-link?style=flat-square)](https://npmjs.com/package/@univerjs/preset-sheets-hyper-link)
[![license](https://img.shields.io/npm/l/@univerjs/preset-sheets-hyper-link?style=flat-square)](https://npmjs.com/package/@univerjs/preset-sheets-hyper-link)
[![downloads](https://img.shields.io/npm/dm/@univerjs/preset-sheets-hyper-link?style=flat-square)](https://npmjs.com/package/@univerjs/preset-sheets-hyper-link)
`@univerjs/preset-sheets-hyper-link` provides a preset for hyperlink support in Univer Sheets.
## Package Overview
| Package | CSS | Locales | Facade entry |
| ------------------------------------ | :-: | :-----: | :----------: |
| `@univerjs/preset-sheets-hyper-link` | Yes | Yes | Yes |
## Installation
```sh
pnpm add @univerjs/preset-sheets-hyper-link
# or
npm install @univerjs/preset-sheets-hyper-link
```
Keep all `@univerjs/*` packages on the same version.
## Usage
```ts
import { UniverSheetsHyperLinkPreset } from '@univerjs/preset-sheets-hyper-link';
// Use with createUniver:
// createUniver({ presets: [UniverSheetsHyperLinkPreset()] });
```
## Resources
- [Documentation](https://docs.univer.ai)
- [NPM package](https://npmjs.com/package/@univerjs/preset-sheets-hyper-link)
- [GitHub repository](https://github.com/dream-num/univer)

View File

@@ -0,0 +1,85 @@
{
"name": "@univerjs/preset-sheets-hyper-link",
"version": "1.0.0-rc.0",
"private": false,
"description": "Preset for hyperlink support in Univer Sheets.",
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
"license": "Apache-2.0",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/univer"
},
"homepage": "https://univer.ai",
"repository": {
"type": "git",
"url": "https://github.com/dream-num/univer"
},
"bugs": {
"url": "https://github.com/dream-num/univer/issues"
},
"keywords": [
"univer",
"univer-preset",
"sheets",
"hyperlink"
],
"sideEffects": [
"*.css"
],
"exports": {
".": "./src/index.ts",
"./locales/*": "./src/locales/*.ts",
"./lib/*": "./lib/*"
},
"publishConfig": {
"access": "public",
"main": "./lib/es/index.js",
"module": "./lib/es/index.js",
"exports": {
".": {
"import": "./lib/es/index.js",
"require": "./lib/cjs/index.js",
"types": "./lib/types/index.d.ts"
},
"./locales/*": {
"import": "./lib/es/locales/*.js",
"require": "./lib/cjs/locales/*.js",
"types": "./lib/types/locales/*.d.ts"
},
"./lib/*": "./lib/*"
}
},
"main": "./src/index.ts",
"directories": {
"lib": "lib"
},
"types": "./lib/types/index.d.ts",
"files": [
"lib"
],
"scripts": {
"prepare": "univer-cli preset prepare",
"build:bundle": "univer-cli preset build --cleanup",
"build:types": "tsc -p tsconfig.node.json",
"build": "pnpm run build:bundle && pnpm run build:types",
"typecheck": "tsc --noEmit"
},
"peerDependencies": {
"react": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
"react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
"rxjs": ">=7.0.0"
},
"dependencies": {
"@univerjs/sheets-hyper-link": "workspace:*",
"@univerjs/sheets-hyper-link-ui": "workspace:*"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@univerjs/core": "workspace:*",
"@univerjs/presets": "workspace:*",
"react": "18.3.1",
"react-dom": "18.3.1",
"rxjs": "^7.8.2",
"typescript": "^6.0.3"
}
}

View File

@@ -0,0 +1,17 @@
/**
* 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 { default } from '@univerjs-infra/shared/postcss';

View File

@@ -0,0 +1,19 @@
/**
* 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/sheets-hyper-link';
export * from '@univerjs/sheets-hyper-link-ui';

View File

@@ -0,0 +1,43 @@
/**
* 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 { IUniverSheetsHyperLinkUIConfig } from '@univerjs/sheets-hyper-link-ui';
import { UniverSheetsHyperLinkPlugin } from '@univerjs/sheets-hyper-link';
import { UniverSheetsHyperLinkUIPlugin } from '@univerjs/sheets-hyper-link-ui';
import '@univerjs/sheets-hyper-link/facade';
import '@univerjs/sheets-hyper-link-ui/facade';
export type * from '@univerjs/sheets-hyper-link-ui/facade';
export type * from '@univerjs/sheets-hyper-link/facade';
export interface IUniverSheetsHyperLinkPresetConfig extends
Pick<IUniverSheetsHyperLinkUIConfig, 'urlHandler'> {
}
export function UniverSheetsHyperLinkPreset(config: Partial<IUniverSheetsHyperLinkPresetConfig> = {}): IPreset {
const { urlHandler } = config;
return {
plugins: [
UniverSheetsHyperLinkPlugin,
[UniverSheetsHyperLinkUIPlugin, {
urlHandler,
}],
].filter((v) => !!v) as IPreset['plugins'],
};
};

View File

@@ -0,0 +1,27 @@
/**
* 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 { Config } from 'tailwindcss';
import preset, { createTailwindContent } from '@univerjs-infra/shared/tailwind';
const config: Config = {
presets: [preset],
content: createTailwindContent(import.meta.url, {
includeStyleDependencies: true,
}),
};
export default config;

View File

@@ -0,0 +1,8 @@
{
"extends": "@univerjs-infra/shared/tsconfigs/base",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib/types"
},
"include": ["src", "../../common/shared/types/global.d.ts"]
}

Some files were not shown because too many files have changed in this diff Show More