Skip to content

Commit

Permalink
Merge branch 'dev' into fix/default-font-style
Browse files Browse the repository at this point in the history
  • Loading branch information
Jocs authored Oct 31, 2024
2 parents 6375e7f + 51f1616 commit dd49c1e
Show file tree
Hide file tree
Showing 205 changed files with 18,972 additions and 1,932 deletions.
16 changes: 8 additions & 8 deletions common/shared/vite/build-pkg.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,6 @@ exports.buildPkg = function buildPkg() {
'./*': './src/*',
}, pkg.exports);

const facadeEntry = path.resolve(process.cwd(), 'src/facade/index.ts');
if (fs.existsSync(facadeEntry)) {
pkg.publishConfig.exports['./facade'] = {
import: './lib/es/facade.js',
types: './lib/types/facade/index.d.ts',
};
}

// main
pkg.main = './src/index.ts';

Expand All @@ -100,6 +92,14 @@ exports.buildPkg = function buildPkg() {
},
};

const facadeEntry = path.resolve(process.cwd(), 'src/facade/index.ts');
if (fs.existsSync(facadeEntry)) {
pkg.publishConfig.exports['./facade'] = {
import: './lib/es/facade.js',
types: './lib/types/facade/index.d.ts',
};
}

// locale
const localeDir = path.resolve(process.cwd(), 'src/locale');
if (fs.existsSync(localeDir)) {
Expand Down
1 change: 1 addition & 0 deletions common/shared/vite/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ function createViteConfig(overrideConfig, /** @type {IOptions} */ options) {
dts({
entryRoot: 'src',
outDir: 'lib/types',
clearPureImport: false,
}),
buildPkg(),
],
Expand Down
2 changes: 2 additions & 0 deletions examples/src/sheets/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { UniverSheetsFormulaPlugin } from '@univerjs/sheets-formula';
import { UniverSheetsFormulaUIPlugin } from '@univerjs/sheets-formula-ui';
import { UniverSheetsHyperLinkPlugin } from '@univerjs/sheets-hyper-link';
import { UniverSheetsNumfmtPlugin } from '@univerjs/sheets-numfmt';
import { UniverSheetsNumfmtUIPlugin } from '@univerjs/sheets-numfmt-ui';
import { UniverSheetsSortPlugin } from '@univerjs/sheets-sort';
import { UniverSheetsThreadCommentPlugin } from '@univerjs/sheets-thread-comment';
import { UniverSheetsThreadCommentUIPlugin } from '@univerjs/sheets-thread-comment-ui';
Expand Down Expand Up @@ -119,6 +120,7 @@ univer.registerPlugin(UniverSheetsUIPlugin);
univer.registerPlugin(UniverSheetsNumfmtPlugin);
univer.registerPlugin(UniverSheetsZenEditorPlugin);
univer.registerPlugin(UniverFormulaEnginePlugin, { notExecuteFormula: true });
univer.registerPlugin(UniverSheetsNumfmtUIPlugin);
univer.registerPlugin(UniverSheetsFormulaPlugin, { notExecuteFormula: true });
univer.registerPlugin(UniverSheetsFormulaUIPlugin);
univer.registerPlugin(UniverSheetsDataValidationPlugin);
Expand Down
8 changes: 8 additions & 0 deletions packages/docs-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
"types": "./lib/types/index.d.ts"
},
"./lib/*": "./lib/*",
"./facade": {
"import": "./lib/es/facade.js",
"types": "./lib/types/facade/index.d.ts"
},
"./locale/*": {
"import": "./lib/locale/*.js",
"types": "./lib/types/locale/*.d.ts"
Expand Down Expand Up @@ -95,6 +99,10 @@
"types": "./lib/types/index.d.ts"
},
"./lib/*": "./lib/*",
"./facade": {
"import": "./lib/es/facade.js",
"types": "./lib/types/facade/index.d.ts"
},
"./locale/*": {
"import": "./lib/locale/*.js",
"types": "./lib/types/locale/*.d.ts"
Expand Down
8 changes: 4 additions & 4 deletions packages/docs-ui/src/controllers/menu/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ export function AlignLeftMenuItemFactory(accessor: IAccessor): IMenuButtonItem {

return disposable.dispose;
}),
hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_DOC),
hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_DOC, undefined, DOCS_ZEN_EDITOR_UNIT_ID_KEY),
};
}

Expand Down Expand Up @@ -671,7 +671,7 @@ export function AlignCenterMenuItemFactory(accessor: IAccessor): IMenuButtonItem
return disposable.dispose;
}),
disabled$: disableMenuWhenNoDocRange(accessor),
hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_DOC),
hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_DOC, undefined, DOCS_ZEN_EDITOR_UNIT_ID_KEY),
};
}

Expand Down Expand Up @@ -705,7 +705,7 @@ export function AlignRightMenuItemFactory(accessor: IAccessor): IMenuButtonItem
return disposable.dispose;
}),
disabled$: disableMenuWhenNoDocRange(accessor),
hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_DOC),
hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_DOC, undefined, DOCS_ZEN_EDITOR_UNIT_ID_KEY),
};
}

Expand Down Expand Up @@ -739,7 +739,7 @@ export function AlignJustifyMenuItemFactory(accessor: IAccessor): IMenuButtonIte
return disposable.dispose;
}),
disabled$: disableMenuWhenNoDocRange(accessor),
hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_DOC),
hidden$: getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_DOC, undefined, DOCS_ZEN_EDITOR_UNIT_ID_KEY),
};
}

Expand Down
12 changes: 10 additions & 2 deletions packages/engine-formula/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@
"import": "./lib/es/*",
"types": "./lib/types/index.d.ts"
},
"./lib/*": "./lib/*"
"./lib/*": "./lib/*",
"./facade": {
"import": "./lib/es/facade.js",
"types": "./lib/types/facade/index.d.ts"
}
}
},
"directories": {
Expand Down Expand Up @@ -82,6 +86,10 @@
"import": "./lib/es/*",
"types": "./lib/types/index.d.ts"
},
"./lib/*": "./lib/*"
"./lib/*": "./lib/*",
"./facade": {
"import": "./lib/es/facade.js",
"types": "./lib/types/facade/index.d.ts"
}
}
}
Loading

0 comments on commit dd49c1e

Please sign in to comment.