@univerjs-pro/embed-ui 1.0.0-beta.0 → 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ar-SA.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/id-ID.js +1 -1
- package/lib/cjs/locale/it-IT.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +1 -1
- package/lib/cjs/locale/pt-BR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ar-SA.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/id-ID.js +1 -1
- package/lib/es/locale/it-IT.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +1 -1
- package/lib/es/locale/pt-BR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/index.css +120 -85
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +1 -1
- package/lib/locale/it-IT.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -1
- package/lib/locale/pt-BR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/components/embed-float-dom-geometry.d.ts +2 -0
- package/lib/types/components/embed-float-dom-interaction.d.ts +9 -1
- package/lib/types/controllers/embed-host-ribbon-override.controller.d.ts +2 -2
- package/lib/types/products/bases/EmbedChildView.d.ts +2 -2
- package/lib/types/products/boards/EmbedChildView.d.ts +2 -1
- package/lib/types/products/docs/embed-docs-custom-block-bleed.render-controller.d.ts +3 -1
- package/lib/types/products/slides/embed-floating-menu-stage.d.ts +2 -2
- package/lib/types/products/slides/register.d.ts +4 -0
- package/lib/types/products/slides/services/embed-slide-presentation-preview.d.ts +14 -2
- package/lib/types/services/embed-activation.service.d.ts +1 -0
- package/lib/types/services/embed-child-runtime-scope.d.ts +2 -2
- package/lib/types/services/embed-child-unit-scoped-injector.d.ts +4 -1
- package/lib/types/services/embed-content-size-registry.service.d.ts +9 -1
- package/lib/types/services/embed-host-menu-override.service.d.ts +1 -0
- package/lib/types/services/embed-interaction-boundary.service.d.ts +2 -1
- package/lib/types/services/embed-mount.service.d.ts +8 -1
- package/lib/types/services/embed-presentation-policy.d.ts +1 -0
- package/lib/types/services/embed-render-canvas-preview-provider.d.ts +3 -2
- package/lib/types/types/embed-ui.d.ts +21 -3
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +35 -35
package/lib/locale/zh-TW.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x370ae1=_0x8fb6;(function(_0x117350,_0x86da71){const _0x5f286a=_0x8fb6,_0x3eed82=_0x117350();while(!![]){try{const _0xd04ece=-parseInt(_0x5f286a(0x153))/0x1*(parseInt(_0x5f286a(0x16c))/0x2)+-parseInt(_0x5f286a(0x16d))/0x3+parseInt(_0x5f286a(0x169))/0x4+-parseInt(_0x5f286a(0x163))/0x5*(parseInt(_0x5f286a(0x160))/0x6)+parseInt(_0x5f286a(0x170))/0x7*(-parseInt(_0x5f286a(0x161))/0x8)+parseInt(_0x5f286a(0x175))/0x9*(-parseInt(_0x5f286a(0x174))/0xa)+parseInt(_0x5f286a(0x167))/0xb*(parseInt(_0x5f286a(0x159))/0xc);if(_0xd04ece===_0x86da71)break;else _0x3eed82['push'](_0x3eed82['shift']());}catch(_0xb06c0c){_0x3eed82['push'](_0x3eed82['shift']());}}}(_0x3636,0xbc824));const e={'embed-ui':{'deleteBlock':_0x370ae1(0x155),'fullscreen':{'exit':_0x370ae1(0x172)},'boardsFloating':{'fitContent':_0x370ae1(0x15e),'zoomOut':'縮小','resetZoom':'重設縮放','zoomIn':'放大','delete':'刪除'},'basesFloating':{'copySuffix':'副本','delete':'刪除','confirmDelete':{'viewTitle':_0x370ae1(0x152),'viewDescription':_0x370ae1(0x164),'tableTitle':_0x370ae1(0x16e),'tableDescription':'此表和其中的記錄將被刪除。'},'tableSidebar':{'defaultTableName':_0x370ae1(0x173)},'duplicateTable':{'copyName':_0x370ae1(0x156)},'viewSettings':{'title':_0x370ae1(0x15d),'addView':_0x370ae1(0x171),'configureView':_0x370ae1(0x15a),'deleteView':'刪除檢視'}},'sheetsFloating':{'toolbar':{'formatPainter':_0x370ae1(0x158),'font':'字型','fontSize':_0x370ae1(0x16a),'numberFormat':_0x370ae1(0x16f),'bold':'粗體','filter':'篩選','resetColor':_0x370ae1(0x157),'textColor':{'main':_0x370ae1(0x168)},'fillColor':{'main':_0x370ae1(0x165)},'border':{'main':'邊框'},'mergeCell':{'main':_0x370ae1(0x154)},'horizontalAlignMode':{'main':_0x370ae1(0x15f)},'verticalAlignMode':{'main':'垂直對齊'},'textWrapMode':{'main':_0x370ae1(0x166)}},'align':{'left':'靠左對齊','center':'置中','right':_0x370ae1(0x16b),'top':'靠上對齊','middle':'垂直置中','bottom':_0x370ae1(0x15b)},'borderLine':{'borderColor':_0x370ae1(0x162),'borderSize':_0x370ae1(0x15c)},'textWrap':{'overflow':'溢出','wrap':_0x370ae1(0x166),'clip':'截斷'}}}};function _0x8fb6(_0x34d909,_0x2787f7){_0x34d909=_0x34d909-0x152;const _0x363663=_0x3636();let _0x8fb6bb=_0x363663[_0x34d909];return _0x8fb6bb;}export{e as default};function _0x3636(){const _0x3feb89=['2330PoLrgK','21015IeiHvv','刪除此檢視?','498oXlkCY','合併儲存格','刪除嵌入區塊','{0}\x20副本','重置顏色','複製格式','9228ZvBKav','設定檢視','靠下對齊','邊框粗細','檢視設定','適應內容','水平對齊','1368iLqnUU','7432LpgMCZ','邊框顏色','30670UXJSWZ','此檢視將被刪除。','填滿色彩','自動換行','59125ajUdZl','字型顏色','1138376SeVkyH','字型大小','靠右對齊','1462aWhhdp','843183VyLmtH','刪除此表?','數字格式','7973GpOWaL','新增檢視','退出全螢幕','表\x20{0}'];_0x3636=function(){return _0x3feb89;};return _0x3636();}
|
|
@@ -17,6 +17,7 @@ interface IDocsEmbedVerticalScrollState {
|
|
|
17
17
|
visualOffset: number;
|
|
18
18
|
}
|
|
19
19
|
export interface IEmbedHostVerticalScrollSyncOptions {
|
|
20
|
+
collapseWithoutChildScroll?: boolean;
|
|
20
21
|
container: HTMLElement;
|
|
21
22
|
content: HTMLElement;
|
|
22
23
|
contentHeight?: number;
|
|
@@ -46,6 +47,7 @@ export declare function registerEmbedHostVerticalScrollSync(options: IEmbedHostV
|
|
|
46
47
|
export declare function canWriteDocsEmbedVerticalScroll(owner: EmbedVerticalScrollOwner, writer: Exclude<EmbedVerticalScrollOwner, undefined>): boolean;
|
|
47
48
|
export declare function resolveDocsEmbedHostScrollDelta(targetOffset: number, currentOffset: number, distanceToSticky: number): number;
|
|
48
49
|
export declare function resolveDocsEmbedVerticalScrollState(params: {
|
|
50
|
+
collapseWithoutChildScroll?: boolean;
|
|
49
51
|
contentHeight: number;
|
|
50
52
|
hostOffset: number;
|
|
51
53
|
stickyHeaderHeight: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EmbedModelService } from '@univerjs-pro/embed';
|
|
1
|
+
import type { EmbedModelService, IEmbedDescriptor } from '@univerjs-pro/embed';
|
|
2
2
|
import type { IDisposable } from '@univerjs/core';
|
|
3
3
|
import type { ILayoutService } from '@univerjs/ui';
|
|
4
4
|
import type { EmbedActivationService } from '../services/embed-activation.service';
|
|
@@ -20,6 +20,7 @@ export interface IEmbedFloatDragHandlePointerDownDetail {
|
|
|
20
20
|
pointerId?: number;
|
|
21
21
|
}
|
|
22
22
|
export declare function getRuntimeRootElements(...roots: Array<HTMLElement | null | undefined>): HTMLElement[];
|
|
23
|
+
export declare function registerEmbedBrowserZoomPrevention(container: HTMLElement, chrome: HTMLElement | null): () => void;
|
|
23
24
|
export declare function findRuntimeCanvas(roots: HTMLElement[], target?: EventTarget | null): HTMLCanvasElement | null;
|
|
24
25
|
export declare function shouldAutoFocusRuntimeCanvas(childType: UniverInstanceType | undefined, allowBase?: boolean): boolean;
|
|
25
26
|
export declare function isChildEditorOrPopupRuntimeElement(target: EventTarget | null): boolean;
|
|
@@ -58,6 +59,8 @@ export declare function registerEmbedActivationInteraction(options: {
|
|
|
58
59
|
acquireStage2SessionLease: () => void;
|
|
59
60
|
activationService: EmbedActivationService;
|
|
60
61
|
data: {
|
|
62
|
+
childType?: UniverInstanceType;
|
|
63
|
+
childUnitId?: string;
|
|
61
64
|
embedId: string;
|
|
62
65
|
hostAnchorId: string;
|
|
63
66
|
hostUnitId: string;
|
|
@@ -70,11 +73,16 @@ export declare function registerEmbedActivationInteraction(options: {
|
|
|
70
73
|
popupRoot: HTMLElement | null;
|
|
71
74
|
releaseStage2SessionLeaseIfActivationDoesNotStick: () => void;
|
|
72
75
|
}): IDisposable;
|
|
76
|
+
export declare function resolveEmbedActivationDescriptor(descriptor: IEmbedDescriptor | undefined, runtime: {
|
|
77
|
+
childType?: UniverInstanceType;
|
|
78
|
+
childUnitId?: string;
|
|
79
|
+
}): IEmbedDescriptor | undefined;
|
|
73
80
|
export declare function registerEmbedCanvasFocus(options: {
|
|
74
81
|
acquireStage2SessionLease: () => void;
|
|
75
82
|
activationService: EmbedActivationService;
|
|
76
83
|
data: {
|
|
77
84
|
childType?: UniverInstanceType;
|
|
85
|
+
childUnitId?: string;
|
|
78
86
|
embedId?: string;
|
|
79
87
|
hostUnitId?: string;
|
|
80
88
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Disposable, Injector } from '@univerjs/core';
|
|
2
|
-
import { IRibbonOverrideService } from '@univerjs/ui';
|
|
2
|
+
import { IRibbonOverrideService, IUIPartsService } from '@univerjs/ui';
|
|
3
3
|
import { EmbedBlockRegistryService } from '../services/embed-block-registry.service';
|
|
4
4
|
import { EmbedHostMenuOverrideService } from '../services/embed-host-menu-override.service';
|
|
5
5
|
export declare class EmbedHostRibbonOverrideController extends Disposable {
|
|
@@ -9,6 +9,6 @@ export declare class EmbedHostRibbonOverrideController extends Disposable {
|
|
|
9
9
|
private readonly _injector;
|
|
10
10
|
private _current;
|
|
11
11
|
private _currentOverride;
|
|
12
|
-
constructor(_menuOverrideService: EmbedHostMenuOverrideService, _blockRegistry: EmbedBlockRegistryService, _ribbonOverrideService: IRibbonOverrideService, _injector: Injector);
|
|
12
|
+
constructor(_menuOverrideService: EmbedHostMenuOverrideService, _blockRegistry: EmbedBlockRegistryService, _ribbonOverrideService: IRibbonOverrideService, uiPartsService: IUIPartsService, _injector: Injector);
|
|
13
13
|
dispose(): void;
|
|
14
14
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { IUniverBaseUIConfig } from '@univerjs-pro/bases-ui';
|
|
1
|
+
import type { BaseEmbedRuntimeRegistryService, IUniverBaseUIConfig } from '@univerjs-pro/bases-ui';
|
|
2
2
|
import type { EmbedDisplayTarget, IEmbedBaseDisplayTarget } from '@univerjs-pro/embed';
|
|
3
3
|
import type { BaseDataModel, Injector } from '@univerjs/core';
|
|
4
4
|
import type { IEmbedChildContainerContext, IEmbedChildViewContribution } from '../../types/embed-ui';
|
|
5
5
|
import { BaseEditorService, BaseUIPopupService, BaseUIStateService, IBaseUIPopupService, IBaseViewWheelScrollService } from '@univerjs-pro/bases-ui';
|
|
6
6
|
import { ICommandService } from '@univerjs/core';
|
|
7
7
|
export type BaseEmbedChromeMode = 'workbench' | 'content-only' | 'fullscreen';
|
|
8
|
-
export declare function createBasesEmbedChildViewContribution(commandService: ICommandService): IEmbedChildViewContribution;
|
|
8
|
+
export declare function createBasesEmbedChildViewContribution(commandService: ICommandService, runtimeRegistry: BaseEmbedRuntimeRegistryService): IEmbedChildViewContribution;
|
|
9
9
|
export declare function isBaseCanvasRootReady(canvasRoot: HTMLElement | null): canvasRoot is HTMLElement;
|
|
10
10
|
export declare function shouldActivateBasesEmbedRender(_context: Pick<IEmbedChildContainerContext, 'renderScope'>): boolean;
|
|
11
11
|
export declare function createBasesEmbedChildUnitScopedInjector(context: IEmbedChildContainerContext, baseStateService: BaseUIStateService, basePopupService: IBaseUIPopupService, baseEditorService: BaseEditorService): Injector | undefined;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import type { Injector } from '@univerjs/core';
|
|
1
2
|
import type { IEmbedChildViewContribution } from '../../types/embed-ui';
|
|
2
|
-
export declare function createBoardsEmbedChildViewContribution(): IEmbedChildViewContribution;
|
|
3
|
+
export declare function createBoardsEmbedChildViewContribution(injector: Injector): IEmbedChildViewContribution;
|
|
@@ -5,17 +5,19 @@ import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/c
|
|
|
5
5
|
import { DocViewScaleService } from '@univerjs/docs-ui';
|
|
6
6
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
7
7
|
import { EmbedContentSizeRegistryService } from '../../services/embed-content-size-registry.service';
|
|
8
|
+
import { EmbedMountService } from '../../services/embed-mount.service';
|
|
8
9
|
export declare class EmbedDocsCustomBlockBleedRenderController extends Disposable implements IRenderModule {
|
|
9
10
|
private readonly _context;
|
|
10
11
|
private readonly _univerInstanceService;
|
|
11
12
|
private readonly _commandService;
|
|
12
13
|
private readonly _contentSizeRegistry;
|
|
14
|
+
private readonly _embedMountService;
|
|
13
15
|
private readonly _embedModelService;
|
|
14
16
|
private readonly _renderManagerService;
|
|
15
17
|
private readonly _docViewScaleService;
|
|
16
18
|
private readonly _resolvedChildUnits;
|
|
17
19
|
private readonly _pendingChildUnits;
|
|
18
|
-
constructor(_context: IRenderContext<DocumentDataModel>, _univerInstanceService: IUniverInstanceService, _commandService: ICommandService, _contentSizeRegistry: EmbedContentSizeRegistryService, _embedModelService: EmbedModelService, _renderManagerService: IRenderManagerService, _docViewScaleService: DocViewScaleService);
|
|
20
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _univerInstanceService: IUniverInstanceService, _commandService: ICommandService, _contentSizeRegistry: EmbedContentSizeRegistryService, _embedMountService: EmbedMountService, _embedModelService: EmbedModelService, _renderManagerService: IRenderManagerService, _docViewScaleService: DocViewScaleService);
|
|
19
21
|
private _getHostUnit;
|
|
20
22
|
private _getHostSnapshot;
|
|
21
23
|
private _rerenderHostDoc;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { IEmbedFloatingActivation } from '../../types/embed-ui';
|
|
1
|
+
import type { EmbedFloatingStage, IEmbedFloatingActivation } from '../../types/embed-ui';
|
|
2
2
|
export declare function resolveSlidesFloatingMenuStage(params: {
|
|
3
3
|
embedId: string;
|
|
4
4
|
active: IEmbedFloatingActivation | null;
|
|
5
5
|
fullscreen?: boolean;
|
|
6
6
|
usesDomFloatingStage?: boolean;
|
|
7
7
|
renderScopeActive?: boolean;
|
|
8
|
-
}):
|
|
8
|
+
}): EmbedFloatingStage;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { Injector } from '@univerjs/core';
|
|
2
2
|
import { EmbedModelService } from '@univerjs-pro/embed';
|
|
3
3
|
import { ISlideEmbedRuntimeService } from '@univerjs-pro/slides-ui';
|
|
4
|
+
import { IUniverInstanceService } from '@univerjs/core';
|
|
4
5
|
import { EmbedActivationService } from '../../services/embed-activation.service';
|
|
6
|
+
import { EmbedBlockRegistryService } from '../../services/embed-block-registry.service';
|
|
5
7
|
import { EmbedFloatPreviewService } from '../../services/embed-float-preview.service';
|
|
6
8
|
import { EmbedHostRestoreService } from '../../services/embed-host-restore.service';
|
|
7
9
|
import { EmbedMountService } from '../../services/embed-mount.service';
|
|
@@ -14,11 +16,13 @@ interface ISlidesEmbedRuntimeServiceDependencies {
|
|
|
14
16
|
embedModelService: EmbedModelService;
|
|
15
17
|
mountService: EmbedMountService;
|
|
16
18
|
activationService: EmbedActivationService;
|
|
19
|
+
blockRegistry: EmbedBlockRegistryService;
|
|
17
20
|
restoreService: EmbedHostRestoreService;
|
|
18
21
|
previewService: EmbedFloatPreviewService;
|
|
19
22
|
runtimeHostLeaseService: EmbedRuntimeHostLeaseService;
|
|
20
23
|
passiveViewportRegistry: EmbedPassiveViewportRegistryService;
|
|
21
24
|
passiveWheelHandlerRegistry: EmbedPassiveWheelHandlerRegistryService;
|
|
25
|
+
univerInstanceService?: IUniverInstanceService;
|
|
22
26
|
sceneCanvasCaptureService: EmbedSceneCanvasCaptureService | undefined;
|
|
23
27
|
}
|
|
24
28
|
export declare function createSlidesEmbedRuntimeService(params: ISlidesEmbedRuntimeServiceDependencies): ISlideEmbedRuntimeService;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import type { EmbedModelService, IEmbedDescriptor } from '@univerjs-pro/embed';
|
|
1
2
|
import type { ISlideEmbedPresentationMountParams } from '@univerjs-pro/slides-ui';
|
|
3
|
+
import type { EmbedActivationService } from '../../../services/embed-activation.service';
|
|
4
|
+
import type { EmbedBlockRegistryService } from '../../../services/embed-block-registry.service';
|
|
2
5
|
import type { EmbedFloatPreviewService } from '../../../services/embed-float-preview.service';
|
|
3
6
|
import type { EmbedHostRestoreService } from '../../../services/embed-host-restore.service';
|
|
4
7
|
import type { EmbedPassiveViewportRegistryService } from '../../../services/embed-passive-viewport-registry.service';
|
|
@@ -6,8 +9,10 @@ import type { EmbedPassiveWheelHandlerRegistryService } from '../../../services/
|
|
|
6
9
|
import type { EmbedRuntimeHostLeaseService } from '../../../services/embed-runtime-host-lease.service';
|
|
7
10
|
import type { EmbedSceneCanvasCaptureService } from '../../../services/embed-scene-canvas-capture.service';
|
|
8
11
|
import type { EmbedFloatPreviewRenderResult } from '../../../types/embed-ui';
|
|
9
|
-
|
|
12
|
+
import { UniverInstanceType } from '@univerjs/core';
|
|
10
13
|
export interface ISlidePresentationEmbedDependencies {
|
|
14
|
+
activationService: EmbedActivationService;
|
|
15
|
+
blockRegistry: EmbedBlockRegistryService;
|
|
11
16
|
embedModelService: EmbedModelService;
|
|
12
17
|
restoreService: EmbedHostRestoreService;
|
|
13
18
|
previewService: EmbedFloatPreviewService;
|
|
@@ -23,5 +28,12 @@ export interface ISlidePresentationEmbedDependencies {
|
|
|
23
28
|
* Static preview rendering remains only as a runtime-unavailable fallback.
|
|
24
29
|
*/
|
|
25
30
|
export declare function mountSlidesPresentationEmbed(dependencies: ISlidePresentationEmbedDependencies, mountParams: ISlideEmbedPresentationMountParams): import("@wendellhu/redi").IDisposable;
|
|
31
|
+
export declare function createSlidesPresentationPreviewDescriptor(params: {
|
|
32
|
+
hostUnitId: string;
|
|
33
|
+
embedId: string;
|
|
34
|
+
hostAnchorId: string;
|
|
35
|
+
childUnitId?: string;
|
|
36
|
+
childType?: UniverInstanceType;
|
|
37
|
+
entry: 'slides-floating-object' | 'slides-page-list-block';
|
|
38
|
+
}): IEmbedDescriptor | undefined;
|
|
26
39
|
export declare function normalizePresentationPreviewResult(result: EmbedFloatPreviewRenderResult): string | undefined;
|
|
27
|
-
export {};
|
|
@@ -26,6 +26,7 @@ export declare class EmbedActivationService extends Disposable {
|
|
|
26
26
|
activateFloating(descriptor: IEmbedDescriptor, stage?: 'stage1' | 'stage2', _options?: IEmbedFloatingActivationOptions): void;
|
|
27
27
|
focusFloatingRuntime(descriptor: IEmbedDescriptor, options?: IEmbedFloatingActivationOptions): void;
|
|
28
28
|
activateFullscreen(descriptor: IEmbedDescriptor): void;
|
|
29
|
+
focusHostForPassiveRuntime(descriptor: IEmbedDescriptor): void;
|
|
29
30
|
clearFullscreen(descriptor: IEmbedDescriptor): void;
|
|
30
31
|
clearFloating(embedId?: string, hostUnitId?: string): void;
|
|
31
32
|
clearTab(embedId?: string): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { IDisposable } from '@univerjs/core';
|
|
1
|
+
import type { Dependency, IDisposable } from '@univerjs/core';
|
|
2
2
|
import type { IEmbedChildContainerContext, IEmbedChildRuntimeScope } from '../types/embed-ui';
|
|
3
3
|
export type EmbedChildRuntimeScopeCreateContext = Omit<IEmbedChildContainerContext, 'runtimeScope'>;
|
|
4
|
-
export declare function createEmbedChildRuntimeScope(context: EmbedChildRuntimeScopeCreateContext, setActive: (active: boolean) => void): {
|
|
4
|
+
export declare function createEmbedChildRuntimeScope(context: EmbedChildRuntimeScopeCreateContext, setActive: (active: boolean) => void, scopedDependencies?: readonly Dependency[]): {
|
|
5
5
|
runtimeScope: IEmbedChildRuntimeScope;
|
|
6
6
|
disposable: IDisposable;
|
|
7
7
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import type { Dependency } from '@univerjs/core';
|
|
1
2
|
import type { IEmbedChildContainerContext } from '../types/embed-ui';
|
|
2
3
|
import { Injector } from '@univerjs/core';
|
|
3
4
|
export type IEmbedScopedConfigOverrides = ReadonlyMap<string | symbol, (config: unknown) => unknown>;
|
|
4
|
-
|
|
5
|
+
type EmbedChildContainerSetupContext = Omit<IEmbedChildContainerContext, 'runtimeScope'>;
|
|
6
|
+
export declare function createEmbedChildUnitScopedInjector(context: EmbedChildContainerSetupContext, scopedDependencies?: readonly Dependency[]): Injector | undefined;
|
|
5
7
|
export declare function createEmbedScopedConfigInjector(parentInjector: Injector, configOverrides: IEmbedScopedConfigOverrides): Injector | undefined;
|
|
6
8
|
export declare function createEmbedScopedInjector(parentInjector: Injector, overrides: ReadonlyMap<unknown, unknown>, sharedRootInjector?: Injector): Injector;
|
|
9
|
+
export {};
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import type { IDisposable, UniverInstanceType } from '@univerjs/core';
|
|
2
2
|
import type { IEmbedContentSize, IEmbedContentSizeMeasureContext, IEmbedContentSizeProvider } from '../types/embed-ui';
|
|
3
|
-
|
|
3
|
+
import { Disposable } from '@univerjs/core';
|
|
4
|
+
export declare class EmbedContentSizeRegistryService extends Disposable {
|
|
4
5
|
private readonly _providers;
|
|
6
|
+
private readonly _contentSizeChanged$;
|
|
7
|
+
readonly contentSizeChanged$: import("rxjs").Observable<{
|
|
8
|
+
embedId: string;
|
|
9
|
+
hostUnitId: string;
|
|
10
|
+
}>;
|
|
5
11
|
register(provider: IEmbedContentSizeProvider): IDisposable;
|
|
6
12
|
get(childType: UniverInstanceType): IEmbedContentSizeProvider | undefined;
|
|
7
13
|
list(): IEmbedContentSizeProvider[];
|
|
8
14
|
measureContentSize(context: IEmbedContentSizeMeasureContext): IEmbedContentSize | undefined;
|
|
15
|
+
notifyContentSizeChanged(hostUnitId: string, embedId: string): void;
|
|
16
|
+
dispose(): void;
|
|
9
17
|
}
|
|
@@ -3,6 +3,7 @@ import type { IEmbedHostMenuOverride } from '../types/embed-ui';
|
|
|
3
3
|
export interface IEmbedHostMenuOverrideActivateOptions {
|
|
4
4
|
layoutPolicy?: IEmbedLayoutPolicy;
|
|
5
5
|
allowPlaceholder?: boolean;
|
|
6
|
+
allowHiddenRibbon?: boolean;
|
|
6
7
|
portalContainer?: HTMLElement | null;
|
|
7
8
|
}
|
|
8
9
|
export declare class EmbedHostMenuOverrideService {
|
|
@@ -4,10 +4,11 @@ export declare function getEmbedInteractionBoundaryOwnerId(element: HTMLElement
|
|
|
4
4
|
export declare function isEventTargetInSameEmbedInteractionBoundary(scopeElement: HTMLElement | null | undefined, target: EventTarget | null | undefined): boolean;
|
|
5
5
|
export declare class EmbedInteractionBoundaryService {
|
|
6
6
|
private readonly _roots;
|
|
7
|
+
private readonly _childUnitIds;
|
|
7
8
|
private readonly _portalObservers;
|
|
8
9
|
private readonly _activePortalOwners;
|
|
9
10
|
private _pendingPortalOwner;
|
|
10
|
-
registerRoot(embedId: string, root: HTMLElement): IDisposable;
|
|
11
|
+
registerRoot(embedId: string, root: HTMLElement, childUnitId?: string): IDisposable;
|
|
11
12
|
private _registerRootPopupDescendantFocusRoles;
|
|
12
13
|
registerOwnedElement(embedId: string, element: HTMLElement): IDisposable;
|
|
13
14
|
contains(embedId: string | undefined, target: EventTarget | null | undefined, event?: Event): boolean;
|
|
@@ -2,6 +2,7 @@ import type { IEmbedDescriptor } from '@univerjs-pro/embed';
|
|
|
2
2
|
import type { IEmbedHostMountResult, IEmbedMountSession } from '../types/embed-ui';
|
|
3
3
|
import { Injector, IUniverInstanceService } from '@univerjs/core';
|
|
4
4
|
import { EmbedChildViewRegistryService } from './embed-child-view-registry.service';
|
|
5
|
+
import { EmbedFloatingActiveService } from './embed-floating-active.service';
|
|
5
6
|
import { EmbedHostContainerRegistryService } from './embed-host-container-registry.service';
|
|
6
7
|
import { EmbedOverlayRootService } from './embed-overlay-root.service';
|
|
7
8
|
import { EmbedRuntimePolicyService } from './embed-runtime-policy.service';
|
|
@@ -19,11 +20,13 @@ export declare class EmbedMountService {
|
|
|
19
20
|
private readonly _overlayRootService;
|
|
20
21
|
private readonly _sceneCanvasCaptureService;
|
|
21
22
|
private readonly _univerInstanceService;
|
|
23
|
+
private readonly _floatingActiveService;
|
|
22
24
|
private readonly _runtimePolicyService;
|
|
23
25
|
private readonly _injector;
|
|
24
26
|
private readonly _sessions;
|
|
25
27
|
private readonly _tabFocusLeases;
|
|
26
|
-
|
|
28
|
+
private readonly _tabHostRenderLeases;
|
|
29
|
+
constructor(_hostContainerRegistry: EmbedHostContainerRegistryService, _childViewRegistry: EmbedChildViewRegistryService, _overlayRootService: EmbedOverlayRootService, _sceneCanvasCaptureService: EmbedSceneCanvasCaptureService, _univerInstanceService: IUniverInstanceService, _floatingActiveService: EmbedFloatingActiveService, _runtimePolicyService: EmbedRuntimePolicyService, _injector: Injector);
|
|
27
30
|
mount(descriptor: IEmbedDescriptor): IEmbedMountSession;
|
|
28
31
|
mountIntoHostElement(descriptor: IEmbedDescriptor, hostElement: HTMLElement, runtimeRoots?: IEmbedHostMountResult['runtimeRoots']): IEmbedMountSession;
|
|
29
32
|
private _mountResolvedHost;
|
|
@@ -33,10 +36,13 @@ export declare class EmbedMountService {
|
|
|
33
36
|
getSession(embedId: string): IEmbedMountSession | undefined;
|
|
34
37
|
listSessions(): IEmbedMountSession[];
|
|
35
38
|
activateSession(embedId: string): void;
|
|
39
|
+
releaseSessionFocus(embedId: string): boolean;
|
|
36
40
|
deactivateTabSessions(embedId?: string): IEmbedMountSession[];
|
|
37
41
|
deactivateFloatingSession(embedId: string): IEmbedMountSession | undefined;
|
|
38
42
|
setActive(embedId: string, active: boolean): void;
|
|
39
43
|
private _runChildBeforeDeactivate;
|
|
44
|
+
private _suspendTabPeerHostRender;
|
|
45
|
+
private _releaseTabPeerHostRenderLease;
|
|
40
46
|
private _resolveLayout;
|
|
41
47
|
private _createRenderScope;
|
|
42
48
|
private _registerRuntimeBoundary;
|
|
@@ -44,6 +50,7 @@ export declare class EmbedMountService {
|
|
|
44
50
|
private _mountFloatingMenu;
|
|
45
51
|
private _registerChildFocusBridge;
|
|
46
52
|
private _focusTabPeerSession;
|
|
53
|
+
private _refreshTabPeerRender;
|
|
47
54
|
private _activateTabPeerFocusLease;
|
|
48
55
|
private _releaseTabPeerFocusLeasesForHost;
|
|
49
56
|
private _releaseTabPeerFocusLease;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function findEmbedPresentationElementAtPoint(root: HTMLElement, selector: string, clientX: number, clientY: number): HTMLElement | undefined;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { DependencyIdentifier, Injector, UniverInstanceType } from '@univerjs/core';
|
|
2
|
-
import type {
|
|
3
|
-
import
|
|
2
|
+
import type { IEmbedChildContainerContext, IEmbedFloatPreviewProvider } from '../types/embed-ui';
|
|
3
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
4
4
|
export interface ICreateEmbedRenderCanvasPreviewProviderOptions {
|
|
5
5
|
childType: UniverInstanceType;
|
|
6
6
|
renderManagerService: DependencyIdentifier<IRenderManagerService>;
|
|
7
7
|
}
|
|
8
8
|
export declare function createEmbedRenderCanvasPreviewProvider(injector: Injector, options: ICreateEmbedRenderCanvasPreviewProviderOptions): IEmbedFloatPreviewProvider;
|
|
9
|
+
export declare function waitForEmbedContextCanvasPreviewReady(context: IEmbedChildContainerContext): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { EmbedHostEntry, EmbedLayout, EmbedMenuBehavior, IEmbedDescriptor, IEmbedLayoutPolicies } from '@univerjs-pro/embed';
|
|
2
|
-
import type { DependencyIdentifier, ICommandService, IDisposable, Injector, IUniverInstanceService, UniverInstanceType } from '@univerjs/core';
|
|
3
|
-
import type { IMenuManagerService, IRibbonService } from '@univerjs/ui';
|
|
2
|
+
import type { Dependency, DependencyIdentifier, ICommandService, IDisposable, Injector, IUniverInstanceService, UniverInstanceType } from '@univerjs/core';
|
|
3
|
+
import type { IMenuManagerService, IRibbonService, RibbonType } from '@univerjs/ui';
|
|
4
4
|
import type { Observable } from 'rxjs';
|
|
5
5
|
export interface IEmbedContainerContext {
|
|
6
6
|
descriptor: IEmbedDescriptor;
|
|
@@ -92,6 +92,7 @@ export interface IEmbedHostContainerContribution {
|
|
|
92
92
|
export interface IEmbedChildViewContribution {
|
|
93
93
|
childType: UniverInstanceType;
|
|
94
94
|
supportedLayouts: EmbedLayout[];
|
|
95
|
+
scopedDependencies?: readonly Dependency[];
|
|
95
96
|
canvasRootClassName?: string;
|
|
96
97
|
beforeDeactivate?: (context: IEmbedChildContainerContext) => void;
|
|
97
98
|
mount?: (context: IEmbedChildContainerContext) => IDisposable | void;
|
|
@@ -113,12 +114,13 @@ export interface IEmbedProductMenuMountContext {
|
|
|
113
114
|
surface?: EmbedProductMenuSurface;
|
|
114
115
|
childUnitId?: string;
|
|
115
116
|
embedId?: string;
|
|
116
|
-
injector:
|
|
117
|
+
injector: Injector;
|
|
117
118
|
menuSchema: unknown;
|
|
118
119
|
menuTitlePrefix?: string;
|
|
119
120
|
activeRibbonTab?: string;
|
|
120
121
|
headerMenu?: boolean;
|
|
121
122
|
toolbarOnly?: boolean;
|
|
123
|
+
ribbonType?: RibbonType;
|
|
122
124
|
ribbonHeaderClassName?: string;
|
|
123
125
|
scopedActionServiceTokens?: readonly DependencyIdentifier<unknown>[];
|
|
124
126
|
}
|
|
@@ -139,12 +141,26 @@ export interface IEmbedProductRibbonOverrideContext {
|
|
|
139
141
|
hostUnitId: string;
|
|
140
142
|
entry: EmbedHostEntry;
|
|
141
143
|
}
|
|
144
|
+
export interface IEmbedPresentationPolicyContext {
|
|
145
|
+
childContext: IEmbedChildContainerContext;
|
|
146
|
+
entry: EmbedHostEntry;
|
|
147
|
+
runtimeHost: HTMLElement;
|
|
148
|
+
}
|
|
149
|
+
export interface IEmbedPresentationNavigationContext extends IEmbedPresentationPolicyContext {
|
|
150
|
+
clientX: number;
|
|
151
|
+
clientY: number;
|
|
152
|
+
}
|
|
153
|
+
export interface IEmbedPresentationPolicyContribution {
|
|
154
|
+
getChromeCss?: (context: IEmbedPresentationPolicyContext) => string | undefined;
|
|
155
|
+
activateNavigationAtPoint?: (context: IEmbedPresentationNavigationContext) => boolean;
|
|
156
|
+
}
|
|
142
157
|
export interface IEmbedBlockContribution {
|
|
143
158
|
childType: UniverInstanceType;
|
|
144
159
|
productName: string;
|
|
145
160
|
hostChromeMode?: EmbedHostChromeMode;
|
|
146
161
|
hostHeaderMode?: 'none' | 'placeholder';
|
|
147
162
|
layoutPolicy?: IEmbedLayoutPolicies;
|
|
163
|
+
presentationPolicy?: IEmbedPresentationPolicyContribution;
|
|
148
164
|
createRibbonOverride?: (context: IEmbedProductRibbonOverrideContext) => IEmbedProductRibbonOverride | undefined;
|
|
149
165
|
}
|
|
150
166
|
export declare enum EmbedHostChromeMode {
|
|
@@ -197,6 +213,8 @@ export interface IEmbedContentSizeMeasureContext {
|
|
|
197
213
|
childType: UniverInstanceType;
|
|
198
214
|
childUnit?: unknown;
|
|
199
215
|
childUnitId: string;
|
|
216
|
+
injector?: Injector;
|
|
217
|
+
viewportHeight?: number;
|
|
200
218
|
viewportWidth?: number;
|
|
201
219
|
}
|
|
202
220
|
export interface IEmbedContentSizeProvider {
|