Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into refactor/cell-editor-1125
Browse files Browse the repository at this point in the history
  • Loading branch information
weird94 committed Dec 2, 2024
2 parents fa2f8f3 + 2266cbd commit e58e8e5
Show file tree
Hide file tree
Showing 545 changed files with 8,013 additions and 41,406 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,6 @@ playwright-report.json

*storybook.log
typedoc.json

# tsx
**/tsx-0
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
"Unprotect",
"unsync",
"Verdana",
"viewbound",
"viewports",
"vlookup",
"wendellhu",
Expand Down
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@


## [0.5.1](https://github.com/dream-num/univer/compare/v0.5.0...v0.5.1) (2024-11-30)


### Bug Fixes

* auto fill should delete dv rules ([#4075](https://github.com/dream-num/univer/issues/4075)) ([b9439c5](https://github.com/dream-num/univer/commit/b9439c533ea84ab048cfe41680c08734fa6e5f99))
* clipboard deps ([#4115](https://github.com/dream-num/univer/issues/4115)) ([57c595e](https://github.com/dream-num/univer/commit/57c595e209cc2b0de07d7f459514d79f0b065fdf))
* **conditional-formatting:** fix type ([#4181](https://github.com/dream-num/univer/issues/4181)) ([9db1edf](https://github.com/dream-num/univer/commit/9db1edf033904e109d364a7a13dd20252c8dd225))
* **conditional-formatting:** the style that involves conditional formatting does not fall ([#4195](https://github.com/dream-num/univer/issues/4195)) ([d7f5f72](https://github.com/dream-num/univer/commit/d7f5f726af75835885413be7b84042209be37525))
* cursor blink lags when pointer down at text range ([#4180](https://github.com/dream-num/univer/issues/4180)) ([de4d70b](https://github.com/dream-num/univer/commit/de4d70bb4204d18a97f0e7c881b209278e661300))
* **docs-ui:** cursor valished at paragraph beginning ([#4147](https://github.com/dream-num/univer/issues/4147)) ([ae027eb](https://github.com/dream-num/univer/commit/ae027eb98f490594bbba7d5fd988ae3ee926cad7))
* **docs-ui:** double paste issue ([#4168](https://github.com/dream-num/univer/issues/4168)) ([f0e8c92](https://github.com/dream-num/univer/commit/f0e8c92999fb376a5a5e2027a69320b5bc305509))
* dup list glyph type name ([#4169](https://github.com/dream-num/univer/issues/4169)) ([6b68364](https://github.com/dream-num/univer/commit/6b6836491b0d989c657237831e53d8d688818ba4))
* fix client may miss the INITIALIZE event ([#4158](https://github.com/dream-num/univer/issues/4158)) ([f0234bb](https://github.com/dream-num/univer/commit/f0234bbbed4b9ddab0f630cde5ee8966ebdf2363))
* **formula:** fix iferror ([#4163](https://github.com/dream-num/univer/issues/4163)) ([1a9f83d](https://github.com/dream-num/univer/commit/1a9f83d88aec3d8225ffc54c47283bd42f855149))
* **formula:** fix networkdays.intl ([#4152](https://github.com/dream-num/univer/issues/4152)) ([d1d4bbe](https://github.com/dream-num/univer/commit/d1d4bbe830a77c2e36cced0fc7d5ee9fa13f8c4e))
* **formula:** update formula data model ([#4159](https://github.com/dream-num/univer/issues/4159)) ([243acdb](https://github.com/dream-num/univer/commit/243acdb35ec2198cf53abbea4ac1dfcdebffb7ed))
* optimization of create empty doc ([#4149](https://github.com/dream-num/univer/issues/4149)) ([c88e709](https://github.com/dream-num/univer/commit/c88e70980974a562bb24046a0a4b6af819ee5f93))
* ref selection change by arrow key ([#4135](https://github.com/dream-num/univer/issues/4135)) ([444c065](https://github.com/dream-num/univer/commit/444c06594dd105569df4435e3fa91c91e08853a5))
* selection should stop response after a popup shown ([#4156](https://github.com/dream-num/univer/issues/4156)) ([a4b38af](https://github.com/dream-num/univer/commit/a4b38af4cdb434c0987f444e7d8a7625a59ad36c))
* **sheet:** parseValue handle number ([#4049](https://github.com/dream-num/univer/issues/4049)) ([59b95fa](https://github.com/dream-num/univer/commit/59b95fa23f43620eb303dbfd0a539a7c14beb122))
* **sheets-filter-ui:** fix the react compatibility issue with sheets filter ([#4189](https://github.com/dream-num/univer/issues/4189)) ([61e8ebf](https://github.com/dream-num/univer/commit/61e8ebf907c9a9f894caad45300dfe079349c5ae))
* **sheet:** sheet name normalize string ([#4172](https://github.com/dream-num/univer/issues/4172)) ([d9b1149](https://github.com/dream-num/univer/commit/d9b1149ffcdb4ab8b7380344c1746028b0496fb8))
* **ui:** progress bar animation ([#4136](https://github.com/dream-num/univer/issues/4136)) ([f578296](https://github.com/dream-num/univer/commit/f578296f9e6ad9cebbd1aacd8b1a727c5f4e631e))


### Features

* **i18n:** add `fr-FR` locale ([#3564](https://github.com/dream-num/univer/issues/3564)) ([9b7da8d](https://github.com/dream-num/univer/commit/9b7da8df11570b07b97e1b70fa989d223d5b22bb))
* remove zen-zone sidebar ([#4193](https://github.com/dream-num/univer/issues/4193)) ([0f651d6](https://github.com/dream-num/univer/commit/0f651d60c3ac1c115c35bbcb64a9bf32844aa1aa))
* **render-engine:** support repeat table header ([#4139](https://github.com/dream-num/univer/issues/4139)) ([c26f9b0](https://github.com/dream-num/univer/commit/c26f9b04300c4ab443514ddf1811b7e937db136b))
* **sheets-drawing-ui:** support sheet cell image ([#4036](https://github.com/dream-num/univer/issues/4036)) ([244511d](https://github.com/dream-num/univer/commit/244511d6163ad677f1df657075dcb7deacea77ca))

# [0.5.0](https://github.com/dream-num/univer/compare/v0.5.0-beta.1...v0.5.0) (2024-11-23)


Expand Down
3 changes: 3 additions & 0 deletions common/shared/bin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ if (command === 'build') {
if (args.includes('--skipUMD')) {
options.skipUMD = true;
}
if (args.includes('--cleanup')) {
options.cleanup = true;
}

build(options);
}
25 changes: 25 additions & 0 deletions common/shared/eslint/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const eslintPluginReadableTailwind = require('eslint-plugin-readable-tailwind');

exports.baseRules = {
curly: ['error', 'multi-line'],
'no-param-reassign': ['warn'],
Expand Down Expand Up @@ -143,6 +145,29 @@ exports.facadePreset = () => {
};
};

exports.tailwindcssPreset = () => {
return {
files: ['**/*.{jsx,tsx}'],
languageOptions: {
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
plugins: {
'readable-tailwind': eslintPluginReadableTailwind,
},
rules: {
...eslintPluginReadableTailwind.configs.warning.rules,
...eslintPluginReadableTailwind.configs.error.rules,
'jsonc/sort-keys': ['warn'],
'readable-tailwind/multiline': ['warn', { printWidth: 120 }],
'react-hooks/rules-of-hooks': 'off',
},
};
};

exports.specPreset = () => {
return {
files: [
Expand Down
16 changes: 10 additions & 6 deletions common/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@univerjs-infra/shared",
"version": "0.5.0",
"version": "0.5.1",
"private": true,
"description": "Some infrastructures for univerjs",
"author": "DreamNum <[email protected]>",
Expand All @@ -15,7 +15,9 @@
"./eslint": "./eslint/index.js",
"./tsconfigs/*": "./tsconfigs/*.json",
"./vite": "./vite/index.ts",
"./vitest": "./vitest/index.js"
"./vitest": "./vitest/index.js",
"./tailwind": "./tailwind/tailwind.config.ts",
"./postcss": "./postcss/postcss.config.mjs"
},
"main": "bin/index.js",
"bin": {
Expand All @@ -26,19 +28,21 @@
"@vitejs/plugin-react": "^4.3.4",
"@vitejs/plugin-vue": "^5.2.1",
"@vitest/coverage-istanbul": "^2.1.6",
"eslint-plugin-readable-tailwind": "^1.8.2",
"fs-extra": "^11.2.0",
"happy-dom": "15.0.0",
"javascript-obfuscator": "^4.1.1",
"sort-keys": "^5.1.0",
"vite": "^6.0.0",
"tailwindcss": "^3.4.15",
"vite": "^6.0.1",
"vite-plugin-dts": "^4.3.0",
"vite-plugin-external": "^4.3.1",
"vitest": "^2.1.6"
},
"devDependencies": {
"@types/fs-extra": "^11.0.4",
"@univerjs/icons": "^0.2.7",
"@univerjs/icons-svg": "^0.2.7",
"@univerjs/protocol": "0.1.39-alpha.45"
"@univerjs/icons": "^0.2.8",
"@univerjs/icons-svg": "^0.2.8",
"@univerjs/protocol": "0.1.39"
}
}
8 changes: 8 additions & 0 deletions common/shared/postcss/postcss.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
},
};

export default config;
162 changes: 162 additions & 0 deletions common/shared/tailwind/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
/**
* Copyright 2023-present DreamNum Inc.
*
* 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';

const config: Omit<Config, 'content'> = {
prefix: 'univer-',
theme: {
extend: {
colors: {
primary: {
50: '#F3F5FF',
100: '#E9EDFF',
200: '#D2DAFA',
300: '#BAC6F8',
400: '#6280F9',
500: '#466AF7',
600: '#2C53F1',
700: '#143EE3',
800: '#083AD1',
900: '#1033BF',
},
gray: {
50: '#F9FAFB',
100: '#EEEFF1',
200: '#E3E5EA',
300: '#CDD0D8',
400: '#979DAC',
500: '#5F6574',
600: '#414657',
700: '#2C3040',
800: '#181C2A',
900: '#0E111E',
},
blue: {
50: '#EBF5FF',
100: '#E1EFFE',
200: '#C3DDFD',
300: '#A4CAFE',
400: '#76A9FA',
500: '#3F83F8',
600: '#1C64F2',
700: '#1A56DB',
800: '#1E429F',
900: '#233876',
},
red: {
50: '#FDF2F2',
100: '#FDE8E8',
200: '#FBD5D5',
300: '#F8B4B4',
400: '#F98080',
500: '#F05252',
600: '#E02424',
700: '#C81E1E',
800: '#9B1C1C',
900: '#771D1D',
},
orange: {
50: '#FFF8F1',
100: '#FEECDC',
200: '#FCD9BD',
300: '#FDBA8C',
400: '#FF8A4C',
500: '#FF5A1F',
600: '#D03801',
700: '#B43403',
800: '#8A2C0D',
900: '#771D1D',
},
yellow: {
50: '#FDFCEA',
100: '#FFF4B9',
200: '#FCDC6A',
300: '#FAC815',
400: '#F1B312',
500: '#D49D0F',
600: '#AB7F0E',
700: '#9A6D15',
800: '#725213',
900: '#634312',
},
green: {
50: '#F3FAF7',
100: '#DEF7EC',
200: '#BCF0DA',
300: '#84E1BC',
400: '#31C48D',
500: '#0DA471',
600: '#057A55',
700: '#046C4E',
800: '#03543F',
900: '#014737',
},
jiqing: {
50: '#EDFAFA',
100: '#D5F5F6',
200: '#AFECEF',
300: '#7EDCE2',
400: '#16BDCA',
500: '#0694A2',
600: '#047481',
700: '#036672',
800: '#05505C',
900: '#014451',
},
indigo: {
50: '#F3F5FF',
100: '#E9EDFF',
200: '#D2DAFA',
300: '#BAC6F8',
400: '#6280F9',
500: '#466AF7',
600: '#2C53F1',
700: '#143EE3',
800: '#083AD1',
900: '#1033BF',
},
purple: {
50: '#F6F5FF',
100: '#EDEBFE',
200: '#DCD7FE',
300: '#CABFFD',
400: '#AC94FA',
500: '#9061F9',
600: '#7E3AF2',
700: '#6C2BD9',
800: '#5521B5',
900: '#4A1D96',
},
pink: {
50: '#FDF2F8',
100: '#FCE8F3',
200: '#FAD1E8',
300: '#F8B4D9',
400: '#F17EB8',
500: '#E74694',
600: '#D61F69',
700: '#BF125D',
800: '#99154B',
900: '#751A3D',
},
},
},
},
plugins: [],
};

export default config;
25 changes: 24 additions & 1 deletion common/shared/vite/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,33 @@ export interface IBuildOptions {
* @description If true, UMD build will be skipped. Useful for packages that run in Node.js environment.
*/
skipUMD?: boolean;

/**
* Cleanup all compiled files
* @default false
*/
cleanup?: boolean;
}

export function remove() {
const __dirname = process.cwd();

[
path.resolve(__dirname, './lib'),
path.resolve(__dirname, './coverage'),
].forEach((dir) => {
if (fs.existsSync(dir)) {
fs.removeSync(dir);
}
});
}

export async function build(options?: IBuildOptions) {
const { skipUMD = false } = options ?? {};
const { skipUMD = false, cleanup = false } = options ?? {};

if (cleanup) {
remove();
}

const __dirname = process.cwd();

Expand Down
2 changes: 2 additions & 0 deletions common/storybook/.storybook/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@tailwind components;
@tailwind utilities;
Loading

0 comments on commit e58e8e5

Please sign in to comment.