@univerjs-pro/embed-ui 1.0.0-alpha.3

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.
Files changed (196) hide show
  1. package/README.md +46 -0
  2. package/lib/cjs/index.js +1 -0
  3. package/lib/cjs/locale/ar-SA.js +1 -0
  4. package/lib/cjs/locale/ca-ES.js +1 -0
  5. package/lib/cjs/locale/de-DE.js +1 -0
  6. package/lib/cjs/locale/en-US.js +1 -0
  7. package/lib/cjs/locale/es-ES.js +1 -0
  8. package/lib/cjs/locale/fa-IR.js +1 -0
  9. package/lib/cjs/locale/fr-FR.js +1 -0
  10. package/lib/cjs/locale/id-ID.js +1 -0
  11. package/lib/cjs/locale/it-IT.js +1 -0
  12. package/lib/cjs/locale/ja-JP.js +1 -0
  13. package/lib/cjs/locale/ko-KR.js +1 -0
  14. package/lib/cjs/locale/pl-PL.js +1 -0
  15. package/lib/cjs/locale/pt-BR.js +1 -0
  16. package/lib/cjs/locale/ru-RU.js +1 -0
  17. package/lib/cjs/locale/sk-SK.js +1 -0
  18. package/lib/cjs/locale/vi-VN.js +1 -0
  19. package/lib/cjs/locale/zh-CN.js +1 -0
  20. package/lib/cjs/locale/zh-HK.js +1 -0
  21. package/lib/cjs/locale/zh-TW.js +1 -0
  22. package/lib/es/index.js +1 -0
  23. package/lib/es/locale/ar-SA.js +1 -0
  24. package/lib/es/locale/ca-ES.js +1 -0
  25. package/lib/es/locale/de-DE.js +1 -0
  26. package/lib/es/locale/en-US.js +1 -0
  27. package/lib/es/locale/es-ES.js +1 -0
  28. package/lib/es/locale/fa-IR.js +1 -0
  29. package/lib/es/locale/fr-FR.js +1 -0
  30. package/lib/es/locale/id-ID.js +1 -0
  31. package/lib/es/locale/it-IT.js +1 -0
  32. package/lib/es/locale/ja-JP.js +1 -0
  33. package/lib/es/locale/ko-KR.js +1 -0
  34. package/lib/es/locale/pl-PL.js +1 -0
  35. package/lib/es/locale/pt-BR.js +1 -0
  36. package/lib/es/locale/ru-RU.js +1 -0
  37. package/lib/es/locale/sk-SK.js +1 -0
  38. package/lib/es/locale/vi-VN.js +1 -0
  39. package/lib/es/locale/zh-CN.js +1 -0
  40. package/lib/es/locale/zh-HK.js +1 -0
  41. package/lib/es/locale/zh-TW.js +1 -0
  42. package/lib/index.css +1058 -0
  43. package/lib/index.js +1 -0
  44. package/lib/locale/ar-SA.js +1 -0
  45. package/lib/locale/ca-ES.js +1 -0
  46. package/lib/locale/de-DE.js +1 -0
  47. package/lib/locale/en-US.js +1 -0
  48. package/lib/locale/es-ES.js +1 -0
  49. package/lib/locale/fa-IR.js +1 -0
  50. package/lib/locale/fr-FR.js +1 -0
  51. package/lib/locale/id-ID.js +1 -0
  52. package/lib/locale/it-IT.js +1 -0
  53. package/lib/locale/ja-JP.js +1 -0
  54. package/lib/locale/ko-KR.js +1 -0
  55. package/lib/locale/pl-PL.js +1 -0
  56. package/lib/locale/pt-BR.js +1 -0
  57. package/lib/locale/ru-RU.js +1 -0
  58. package/lib/locale/sk-SK.js +1 -0
  59. package/lib/locale/vi-VN.js +1 -0
  60. package/lib/locale/zh-CN.js +1 -0
  61. package/lib/locale/zh-HK.js +1 -0
  62. package/lib/locale/zh-TW.js +1 -0
  63. package/lib/types/common/const.d.ts +1 -0
  64. package/lib/types/common/embed-float-interaction-policy.d.ts +13 -0
  65. package/lib/types/common/embed-host-chrome-policy.d.ts +19 -0
  66. package/lib/types/common/embed-runtime-policy.d.ts +13 -0
  67. package/lib/types/common/embed-runtime-slots.d.ts +9 -0
  68. package/lib/types/common/tab-peer-workbench.d.ts +6 -0
  69. package/lib/types/components/EmbedFloatDomRenderer.d.ts +50 -0
  70. package/lib/types/components/EmbedFloatFullscreenButton.d.ts +16 -0
  71. package/lib/types/components/EmbedHostToolbarMenu.d.ts +37 -0
  72. package/lib/types/components/EmbedRuntimeProviders.d.ts +9 -0
  73. package/lib/types/config/config.d.ts +10 -0
  74. package/lib/types/controllers/docs-table-passive-wheel-bridge.controller.d.ts +7 -0
  75. package/lib/types/controllers/embed-host-anchor-cleanup.controller.d.ts +7 -0
  76. package/lib/types/controllers/embed-host-ribbon-override.controller.d.ts +14 -0
  77. package/lib/types/index.d.ts +11 -0
  78. package/lib/types/locale/ar-SA.d.ts +3 -0
  79. package/lib/types/locale/ca-ES.d.ts +3 -0
  80. package/lib/types/locale/de-DE.d.ts +3 -0
  81. package/lib/types/locale/en-US.d.ts +78 -0
  82. package/lib/types/locale/es-ES.d.ts +3 -0
  83. package/lib/types/locale/fa-IR.d.ts +3 -0
  84. package/lib/types/locale/fr-FR.d.ts +3 -0
  85. package/lib/types/locale/id-ID.d.ts +3 -0
  86. package/lib/types/locale/it-IT.d.ts +3 -0
  87. package/lib/types/locale/ja-JP.d.ts +3 -0
  88. package/lib/types/locale/ko-KR.d.ts +3 -0
  89. package/lib/types/locale/pl-PL.d.ts +3 -0
  90. package/lib/types/locale/pt-BR.d.ts +3 -0
  91. package/lib/types/locale/ru-RU.d.ts +3 -0
  92. package/lib/types/locale/sk-SK.d.ts +3 -0
  93. package/lib/types/locale/types.d.ts +3 -0
  94. package/lib/types/locale/vi-VN.d.ts +3 -0
  95. package/lib/types/locale/zh-CN.d.ts +3 -0
  96. package/lib/types/locale/zh-HK.d.ts +3 -0
  97. package/lib/types/locale/zh-TW.d.ts +3 -0
  98. package/lib/types/plugin.d.ts +22 -0
  99. package/lib/types/product-menus/docs-product-menus.d.ts +2 -0
  100. package/lib/types/products/bases/EmbedChildView.d.ts +13 -0
  101. package/lib/types/products/bases/EmbedFloatingMenu.d.ts +36 -0
  102. package/lib/types/products/bases/embed-block.d.ts +2 -0
  103. package/lib/types/products/bases/embed-content-size.d.ts +9 -0
  104. package/lib/types/products/bases/embed-host-adapter.d.ts +6 -0
  105. package/lib/types/products/bases/embed-passive-viewport.d.ts +3 -0
  106. package/lib/types/products/bases/register.d.ts +13 -0
  107. package/lib/types/products/docs/EmbedDocsCustomBlockRenderer.d.ts +38 -0
  108. package/lib/types/products/docs/EmbedFloatingMenu.d.ts +7 -0
  109. package/lib/types/products/docs/embed-block.d.ts +3 -0
  110. package/lib/types/products/docs/embed-docs-custom-block-bleed.render-controller.d.ts +25 -0
  111. package/lib/types/products/docs/embed-host-adapter.d.ts +6 -0
  112. package/lib/types/products/docs/embed-passive-viewport.d.ts +3 -0
  113. package/lib/types/products/docs/register.d.ts +2 -0
  114. package/lib/types/products/product-ui-contributions.d.ts +2 -0
  115. package/lib/types/products/sheets/EmbedBlock.d.ts +8 -0
  116. package/lib/types/products/sheets/EmbedFloatingMenu.d.ts +57 -0
  117. package/lib/types/products/sheets/embed-content-size.d.ts +2 -0
  118. package/lib/types/products/sheets/embed-host-adapter.d.ts +3 -0
  119. package/lib/types/products/sheets/embed-passive-viewport.d.ts +3 -0
  120. package/lib/types/products/sheets/embed-product-menu.d.ts +2 -0
  121. package/lib/types/products/sheets/register.d.ts +28 -0
  122. package/lib/types/products/slides/EmbedChildView.d.ts +3 -0
  123. package/lib/types/products/slides/components/embed-floating-menu/SlideEmbedFloatingMenu.d.ts +28 -0
  124. package/lib/types/products/slides/components/embed-floating-preview/SlideEmbedFloatingPreview.d.ts +24 -0
  125. package/lib/types/products/slides/embed-block.d.ts +2 -0
  126. package/lib/types/products/slides/embed-floating-menu-stage.d.ts +8 -0
  127. package/lib/types/products/slides/embed-floating-menu.d.ts +3 -0
  128. package/lib/types/products/slides/embed-host-adapter.d.ts +7 -0
  129. package/lib/types/products/slides/embed-passive-viewport.d.ts +2 -0
  130. package/lib/types/products/slides/register.d.ts +25 -0
  131. package/lib/types/products/slides/services/EmbedSlideReadonlyPreviewProvider.d.ts +15 -0
  132. package/lib/types/products/slides/services/embed-slide-float-preview.provider.d.ts +34 -0
  133. package/lib/types/products/slides/services/embed-slide-presentation-preview.d.ts +27 -0
  134. package/lib/types/services/embed-activation.service.d.ts +44 -0
  135. package/lib/types/services/embed-block-contribution-factory.d.ts +17 -0
  136. package/lib/types/services/embed-block-registry.service.d.ts +8 -0
  137. package/lib/types/services/embed-child-product-plugin-lease.d.ts +15 -0
  138. package/lib/types/services/embed-child-product-plugin-registry.service.d.ts +35 -0
  139. package/lib/types/services/embed-child-runtime-scope.d.ts +7 -0
  140. package/lib/types/services/embed-child-unit-scoped-injector.d.ts +6 -0
  141. package/lib/types/services/embed-child-view-registry.service.d.ts +8 -0
  142. package/lib/types/services/embed-content-size-registry.service.d.ts +9 -0
  143. package/lib/types/services/embed-default-floating-menu.d.ts +4 -0
  144. package/lib/types/services/embed-docs-sticky-wheel.d.ts +2 -0
  145. package/lib/types/services/embed-dom-passive-viewport-provider.d.ts +8 -0
  146. package/lib/types/services/embed-float-preview.service.d.ts +29 -0
  147. package/lib/types/services/embed-floating-active.service.d.ts +11 -0
  148. package/lib/types/services/embed-floating-geometry.service.d.ts +22 -0
  149. package/lib/types/services/embed-floating-menu-registry.service.d.ts +11 -0
  150. package/lib/types/services/embed-floating-menu-root.d.ts +2 -0
  151. package/lib/types/services/embed-fullscreen.service.d.ts +12 -0
  152. package/lib/types/services/embed-host-container-registry.service.d.ts +11 -0
  153. package/lib/types/services/embed-host-menu-override.service.d.ts +14 -0
  154. package/lib/types/services/embed-host-restore.service.d.ts +18 -0
  155. package/lib/types/services/embed-interaction-boundary.service.d.ts +42 -0
  156. package/lib/types/services/embed-mount.service.d.ts +52 -0
  157. package/lib/types/services/embed-overlay-root.service.d.ts +22 -0
  158. package/lib/types/services/embed-passive-viewport-registry.service.d.ts +9 -0
  159. package/lib/types/services/embed-passive-wheel-handler-registry.service.d.ts +9 -0
  160. package/lib/types/services/embed-product-floating-menu-contributions.d.ts +2 -0
  161. package/lib/types/services/embed-product-menu-mounting.d.ts +18 -0
  162. package/lib/types/services/embed-product-menu-registry.service.d.ts +14 -0
  163. package/lib/types/services/embed-readonly-preview-registry.service.d.ts +8 -0
  164. package/lib/types/services/embed-render-canvas-preview-provider.d.ts +8 -0
  165. package/lib/types/services/embed-render-child-view-contribution.d.ts +52 -0
  166. package/lib/types/services/embed-runtime-focus-coordinator.service.d.ts +76 -0
  167. package/lib/types/services/embed-runtime-host-lease.service.d.ts +24 -0
  168. package/lib/types/services/embed-runtime-policy.service.d.ts +28 -0
  169. package/lib/types/services/embed-runtime-scope-dom.d.ts +15 -0
  170. package/lib/types/services/embed-scene-canvas-capture.service.d.ts +24 -0
  171. package/lib/types/services/embed-scene-passive-wheel.d.ts +21 -0
  172. package/lib/types/services/embed-ui-contribution-register.d.ts +5 -0
  173. package/lib/types/services/embed-undo-bridge.service.d.ts +14 -0
  174. package/lib/types/services/react-root-disposal.d.ts +6 -0
  175. package/lib/types/types/embed-ui.d.ts +292 -0
  176. package/lib/umd/index.js +1 -0
  177. package/lib/umd/locale/ar-SA.js +1 -0
  178. package/lib/umd/locale/ca-ES.js +1 -0
  179. package/lib/umd/locale/de-DE.js +1 -0
  180. package/lib/umd/locale/en-US.js +1 -0
  181. package/lib/umd/locale/es-ES.js +1 -0
  182. package/lib/umd/locale/fa-IR.js +1 -0
  183. package/lib/umd/locale/fr-FR.js +1 -0
  184. package/lib/umd/locale/id-ID.js +1 -0
  185. package/lib/umd/locale/it-IT.js +1 -0
  186. package/lib/umd/locale/ja-JP.js +1 -0
  187. package/lib/umd/locale/ko-KR.js +1 -0
  188. package/lib/umd/locale/pl-PL.js +1 -0
  189. package/lib/umd/locale/pt-BR.js +1 -0
  190. package/lib/umd/locale/ru-RU.js +1 -0
  191. package/lib/umd/locale/sk-SK.js +1 -0
  192. package/lib/umd/locale/vi-VN.js +1 -0
  193. package/lib/umd/locale/zh-CN.js +1 -0
  194. package/lib/umd/locale/zh-HK.js +1 -0
  195. package/lib/umd/locale/zh-TW.js +1 -0
  196. package/package.json +108 -0
@@ -0,0 +1,3 @@
1
+ import type enUS from './en-US';
2
+ declare const locale: typeof enUS;
3
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import type enUS from './en-US';
2
+ declare const locale: typeof enUS;
3
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import type { LocaleLeafKeys } from '@univerjs/core';
2
+ import type enUS from './en-US';
3
+ export type LocaleKey = LocaleLeafKeys<typeof enUS>;
@@ -0,0 +1,3 @@
1
+ import type enUS from './en-US';
2
+ declare const locale: typeof enUS;
3
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import type enUS from './en-US';
2
+ declare const locale: typeof enUS;
3
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import type enUS from './en-US';
2
+ declare const locale: typeof enUS;
3
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import type enUS from './en-US';
2
+ declare const locale: typeof enUS;
3
+ export default locale;
@@ -0,0 +1,22 @@
1
+ import type { IUniverEmbedUIPluginConfig } from './config/config';
2
+ import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
3
+ export declare class UniverEmbedUIPlugin extends Plugin {
4
+ private readonly _config;
5
+ protected readonly _injector: Injector;
6
+ private readonly _configService;
7
+ static pluginName: string;
8
+ static packageName: string;
9
+ static version: string;
10
+ static type: UniverInstanceType;
11
+ constructor(_config: Partial<IUniverEmbedUIPluginConfig> | undefined, _injector: Injector, _configService: IConfigService);
12
+ onStarting(): void;
13
+ onReady(): void;
14
+ private _registerServices;
15
+ private _registerProductMenus;
16
+ private _registerProductUIContributions;
17
+ private _flushPendingContributions;
18
+ private _registerFloatingMenus;
19
+ private _touchServices;
20
+ private _registerDefaultHostToolbar;
21
+ private _enableEmbedUnitLeasePolicy;
22
+ }
@@ -0,0 +1,2 @@
1
+ import type { IDisposable, Injector } from '@univerjs/core';
2
+ export declare function registerDefaultEmbedProductMenus(injector: Injector): IDisposable[];
@@ -0,0 +1,13 @@
1
+ import type { IUniverBaseUIConfig } from '@univerjs-pro/bases-ui';
2
+ import type { BaseDataModel, Injector } from '@univerjs/core';
3
+ import type { IEmbedChildContainerContext, IEmbedChildViewContribution } from '../../types/embed-ui';
4
+ import { BaseEditorService, BaseUIPopupService, BaseUIStateService, IBaseUIPopupService, IBaseViewWheelScrollService } from '@univerjs-pro/bases-ui';
5
+ export type BaseEmbedChromeMode = 'workbench' | 'content-only' | 'fullscreen';
6
+ export declare function createBasesEmbedChildViewContribution(): IEmbedChildViewContribution;
7
+ export declare function isBaseCanvasRootReady(canvasRoot: HTMLElement | null): canvasRoot is HTMLElement;
8
+ export declare function shouldActivateBasesEmbedRender(_context: Pick<IEmbedChildContainerContext, 'renderScope'>): boolean;
9
+ export declare function createBasesEmbedChildUnitScopedInjector(context: IEmbedChildContainerContext, baseStateService: BaseUIStateService, basePopupService: IBaseUIPopupService, baseEditorService: BaseEditorService): Injector | undefined;
10
+ export declare function initializeBasesEmbedState(stateService: BaseUIStateService, childUnit: BaseDataModel, chromeMode?: BaseEmbedChromeMode): void;
11
+ export declare function resolveBasesEmbedChromeMode(context: Pick<IEmbedChildContainerContext, 'renderScope'>): BaseEmbedChromeMode;
12
+ export declare function createBasesEmbedScopedInjector(rootInjector: Injector, childScopedInjector: Injector, baseStateService: BaseUIStateService, basePopupService?: BaseUIPopupService, baseEditorService?: BaseEditorService, chromeMode?: BaseEmbedChromeMode, baseWheelScrollService?: IBaseViewWheelScrollService, readOnly?: boolean, globalPortalContainer?: HTMLElement | null): Injector;
13
+ export declare function resolveEmbeddedBaseUIConfig(baseConfig: IUniverBaseUIConfig, chromeMode?: BaseEmbedChromeMode): IUniverBaseUIConfig;
@@ -0,0 +1,36 @@
1
+ import type { IBaseToolbarState } from '@univerjs-pro/bases-ui';
2
+ import type { BaseDataModel, IViewSnapshot } from '@univerjs/core';
3
+ import type { IEmbedFloatingMenuContribution } from '../../types/embed-ui';
4
+ export declare const BASE_EMBED_VIEW_PANEL_WIDTH = 208;
5
+ export declare function createBasesFloatingMenuContributions(): IEmbedFloatingMenuContribution[];
6
+ export declare function resolveBasesFloatingMenuStage(params: {
7
+ embedId: string;
8
+ activeEmbedId: string | null | undefined;
9
+ stage: string | null | undefined;
10
+ fullscreen?: boolean;
11
+ usesDomFloatingStage: boolean;
12
+ renderScopeActive: boolean;
13
+ }): 'inactive' | 'stage2';
14
+ export declare function resolveBasesFloatingMenuClassName(params: {
15
+ entry: string;
16
+ fullscreen: boolean;
17
+ stage: 'inactive' | 'stage2';
18
+ }): string;
19
+ export declare function shouldUseBaseFullscreenToolbar(fullscreen: boolean): boolean;
20
+ export declare function shouldUseBaseFullscreenViewTabs(fullscreen: boolean): boolean;
21
+ export declare function shouldShowBaseEmbedRemoveButton(fullscreen: boolean): boolean;
22
+ export declare function createBaseEmbedFloatingMenuBoundaryAttributes(embedId: string): Record<string, string>;
23
+ export declare function createBaseFloatingToolbarState(view: IViewSnapshot, undoRedoStatus?: {
24
+ undos?: number;
25
+ redos?: number;
26
+ }): IBaseToolbarState;
27
+ export declare function createBaseFullscreenTableSidebarItems(snapshot: ReturnType<BaseDataModel['getSnapshot']> | undefined, activeTableId: string | null | undefined): {
28
+ id: string;
29
+ name: string;
30
+ active: boolean;
31
+ }[];
32
+ export declare function viewPanelStyle(anchor: DOMRect): {
33
+ top: number;
34
+ left: number;
35
+ maxHeight: number;
36
+ };
@@ -0,0 +1,2 @@
1
+ import type { IEmbedBlockContribution } from '../../types/embed-ui';
2
+ export declare function createBasesEmbedBlockContribution(): IEmbedBlockContribution;
@@ -0,0 +1,9 @@
1
+ import type { IEmbedContentSizeProvider } from '../../types/embed-ui';
2
+ interface IBaseContentSizeActiveState {
3
+ activeTableId?: string;
4
+ activeViewId?: string;
5
+ }
6
+ export declare function createBasesContentSizeProvider(baseUIStateService?: {
7
+ getState?: () => IBaseContentSizeActiveState | undefined;
8
+ }): IEmbedContentSizeProvider;
9
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { IBaseUIStateService } from '@univerjs-pro/bases-ui';
2
+ import type { EmbedHostAnchorModelService, IEmbedHostAdapterContribution } from '@univerjs-pro/embed';
3
+ import type { IUniverInstanceService } from '@univerjs/core';
4
+ import type { IEmbedHostContainerContribution } from '../../types/embed-ui';
5
+ export declare function createBasesTableListBlockUIHostAdapterContribution(anchorModelService?: EmbedHostAnchorModelService, univerInstanceService?: IUniverInstanceService, baseUIStateService?: IBaseUIStateService | (() => IBaseUIStateService | undefined)): IEmbedHostAdapterContribution;
6
+ export declare function createBasesTableListBlockHostContainerContribution(): IEmbedHostContainerContribution;
@@ -0,0 +1,3 @@
1
+ import type { Injector } from '@univerjs/core';
2
+ import type { IEmbedPassiveViewportProvider } from '../../types/embed-ui';
3
+ export declare function createBasesPassiveViewportProvider(rootInjector: Injector): IEmbedPassiveViewportProvider;
@@ -0,0 +1,13 @@
1
+ import type { Injector } from '@univerjs/core';
2
+ import { IBaseEmbedRuntimeService } from '@univerjs-pro/bases-ui';
3
+ import { EmbedModelService } from '@univerjs-pro/embed';
4
+ import { EmbedActivationService } from '../../services/embed-activation.service';
5
+ import { EmbedHostRestoreService } from '../../services/embed-host-restore.service';
6
+ import { EmbedMountService } from '../../services/embed-mount.service';
7
+ export declare function registerBasesEmbedUIContributions(injector: Injector): void;
8
+ export declare function createBasesEmbedRuntimeService(params: {
9
+ embedModelService: EmbedModelService;
10
+ restoreService: EmbedHostRestoreService;
11
+ mountService: EmbedMountService;
12
+ activationService: EmbedActivationService;
13
+ }): IBaseEmbedRuntimeService;
@@ -0,0 +1,38 @@
1
+ import type { IEmbedFloatDomData } from '../../components/EmbedFloatDomRenderer';
2
+ import { IRenderManagerService } from '@univerjs/engine-render';
3
+ export interface IEmbedDocsCustomBlockRuntimeProps {
4
+ customBlockRenderViewport?: {
5
+ bleedLeft?: number;
6
+ bleedWidth?: number;
7
+ contentHeight?: number;
8
+ contentWidth?: number;
9
+ height?: number;
10
+ viewportHeight?: number;
11
+ };
12
+ }
13
+ export interface IDocsTableLikeCustomBlockWheelHandlerOptions {
14
+ getLive: () => HTMLElement | null;
15
+ getMaxScrollLeft?: () => number | undefined;
16
+ }
17
+ export interface IDocsTableLikeCustomBlockStage2WheelHandlerOptions extends IDocsTableLikeCustomBlockWheelHandlerOptions {
18
+ getStage: () => 'inactive' | 'stage1' | 'stage2' | undefined;
19
+ }
20
+ export declare function EmbedDocsCustomBlockRenderer(props: {
21
+ data?: IEmbedFloatDomData;
22
+ } & IEmbedDocsCustomBlockRuntimeProps): import("react").JSX.Element;
23
+ export declare function blurHostDocSelectionWhenEmbedRuntimeEntersStage(renderManagerService: IRenderManagerService, hostUnitId: string | undefined, stage: 'inactive' | 'stage1' | 'stage2'): void;
24
+ export declare function createDocsTableLikeCustomBlockWheelHandler(options: IDocsTableLikeCustomBlockWheelHandlerOptions): (event: WheelEvent) => void;
25
+ export declare function createDocsTableLikeCustomBlockStage2WheelHandler(options: IDocsTableLikeCustomBlockStage2WheelHandlerOptions): (event: WheelEvent) => void;
26
+ export declare function resolveDocsTableLikeCustomBlockRuntimeContentHeight(authoritativeContentHeight: number | undefined): number;
27
+ export declare function resolveDocsCustomBlockRuntimeViewportHeight(params: {
28
+ contentHeight: number;
29
+ sheetLike: boolean;
30
+ viewportHeight?: number;
31
+ }): number;
32
+ export declare function resolveDocsCustomBlockRuntimeOuterHeight(params: {
33
+ contentHeight: number;
34
+ menuInsetTop: number;
35
+ sheetLike: boolean;
36
+ }): number;
37
+ export declare function resolveDocsTableLikeCustomBlockRuntimeContentWidth(authoritativeContentWidth: number | undefined, measureFallback: () => number): number;
38
+ export declare function shouldSyncDocsTableLikeCustomBlockBleedOnScroll(root: HTMLElement, target: EventTarget | null): boolean;
@@ -0,0 +1,7 @@
1
+ import type { IEmbedFloatingMenuContribution } from '../../types/embed-ui';
2
+ export declare function createDocsFloatingMenuContributions(): IEmbedFloatingMenuContribution[];
3
+ export declare function resolveDocsFloatingMenuClassName(params: {
4
+ entry: string;
5
+ fullscreen: boolean;
6
+ stage: 'inactive' | 'stage2';
7
+ }): string;
@@ -0,0 +1,3 @@
1
+ import type { IEmbedBlockContribution, IEmbedChildViewContribution } from '../../types/embed-ui';
2
+ export declare function createDocsEmbedBlockContribution(): IEmbedBlockContribution;
3
+ export declare function createDocsEmbedChildViewContribution(): IEmbedChildViewContribution;
@@ -0,0 +1,25 @@
1
+ import type { DocumentDataModel } from '@univerjs/core';
2
+ import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
3
+ import { EmbedModelService } from '@univerjs-pro/embed';
4
+ import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
5
+ import { IRenderManagerService } from '@univerjs/engine-render';
6
+ import { EmbedContentSizeRegistryService } from '../../services/embed-content-size-registry.service';
7
+ export declare class EmbedDocsCustomBlockBleedRenderController extends Disposable implements IRenderModule {
8
+ private readonly _context;
9
+ private readonly _univerInstanceService;
10
+ private readonly _commandService;
11
+ private readonly _contentSizeRegistry?;
12
+ private readonly _embedModelService?;
13
+ private readonly _renderManagerService?;
14
+ private readonly _resolvedChildUnits;
15
+ private readonly _pendingChildUnits;
16
+ constructor(_context: IRenderContext<DocumentDataModel>, _univerInstanceService: IUniverInstanceService, _commandService: ICommandService, _contentSizeRegistry?: EmbedContentSizeRegistryService | undefined, _embedModelService?: EmbedModelService | undefined, _renderManagerService?: IRenderManagerService | undefined);
17
+ private _getHostUnit;
18
+ private _getHostSnapshot;
19
+ private _rerenderHostDoc;
20
+ private _refreshHostDocZoom;
21
+ private _resolveChildUnitId;
22
+ private _getChildUnitForMeasurement;
23
+ private _getDocsLeft;
24
+ private _getVisibleCanvasDocumentRect;
25
+ }
@@ -0,0 +1,6 @@
1
+ import type { EmbedHostAnchorModelService, IEmbedHostAdapterContribution } from '@univerjs-pro/embed';
2
+ import type { IUniverInstanceService } from '@univerjs/core';
3
+ import type { IRenderManagerService } from '@univerjs/engine-render';
4
+ import type { IEmbedHostContainerContribution } from '../../types/embed-ui';
5
+ export declare function createDocsCustomBlockUIHostAdapterContribution(anchorModelService?: EmbedHostAnchorModelService, univerInstanceService?: IUniverInstanceService, renderManagerService?: IRenderManagerService): IEmbedHostAdapterContribution;
6
+ export declare function createDocsCustomBlockHostContainerContribution(): IEmbedHostContainerContribution;
@@ -0,0 +1,3 @@
1
+ import type { Injector } from '@univerjs/core';
2
+ import type { IEmbedPassiveViewportProvider } from '../../types/embed-ui';
3
+ export declare function createDocsPassiveViewportProvider(injector: Injector): IEmbedPassiveViewportProvider;
@@ -0,0 +1,2 @@
1
+ import type { Injector } from '@univerjs/core';
2
+ export declare function registerDocsEmbedUIContributions(injector: Injector): void;
@@ -0,0 +1,2 @@
1
+ import type { Injector } from '@univerjs/core';
2
+ export declare function registerDefaultEmbedProductUIContributions(injector: Injector): void;
@@ -0,0 +1,8 @@
1
+ import type { IEmbedBlockContribution, IEmbedChildContainerContext, IEmbedChildViewContribution } from '../../types/embed-ui';
2
+ export declare function createSheetsEmbedBlockContribution(): IEmbedBlockContribution;
3
+ export declare function createSheetsEmbedChildViewContribution(): IEmbedChildViewContribution;
4
+ export declare function shouldShowEmbeddedSheetChrome(context: Pick<IEmbedChildContainerContext, 'renderScope'>): boolean;
5
+ export declare function applyEmbeddedSheetChromeInset(canvasRoot: HTMLElement, chrome: {
6
+ formulaBar: boolean;
7
+ sheetBar: boolean;
8
+ }): import("@wendellhu/redi").IDisposable;
@@ -0,0 +1,57 @@
1
+ import type { IMenuItem, IMenuSchema, IValueOption } from '@univerjs/ui';
2
+ import type { IEmbedFloatingMenuContribution } from '../../types/embed-ui';
3
+ import { BORDER_LINE_CHILDREN } from '@univerjs/sheets-ui';
4
+ import { FONT_SIZE_LIST } from '@univerjs/ui';
5
+ type SheetFloatingMenuStage = 'inactive' | 'stage2';
6
+ export type SheetFloatingToolbarItem = {
7
+ id: string;
8
+ type: 'button' | 'dropdown';
9
+ } | {
10
+ id: string;
11
+ type: 'divider';
12
+ };
13
+ export declare function createSheetsFloatingToolbarItems(): SheetFloatingToolbarItem[];
14
+ export declare function createSheetsFloatingBorderLineItems(): typeof BORDER_LINE_CHILDREN;
15
+ export declare function createSheetsFloatingFontSizeItems(): typeof FONT_SIZE_LIST;
16
+ export interface IResolvedSheetsFloatingToolbarMenuItems {
17
+ formatPainter?: IMenuItem;
18
+ numberFormat?: IMenuItem;
19
+ fontFamily?: IMenuItem;
20
+ fontSize?: IMenuItem;
21
+ bold?: IMenuItem;
22
+ textColor?: IMenuItem;
23
+ backgroundColor?: IMenuItem;
24
+ borderComposite?: IMenuItem;
25
+ merge?: {
26
+ root?: IMenuItem;
27
+ all?: IMenuItem;
28
+ vertical?: IMenuItem;
29
+ horizontal?: IMenuItem;
30
+ unmerge?: IMenuItem;
31
+ };
32
+ horizontalAlign?: IMenuItem;
33
+ verticalAlign?: IMenuItem;
34
+ wrap?: IMenuItem;
35
+ filter?: IMenuItem;
36
+ deleteBlock?: true;
37
+ }
38
+ export declare function resolveSheetsFloatingToolbarMenuItems(menuSchemas: IMenuSchema[]): IResolvedSheetsFloatingToolbarMenuItems;
39
+ export declare function createVisibleSheetsFloatingToolbarItems(resolved: IResolvedSheetsFloatingToolbarMenuItems): SheetFloatingToolbarItem[];
40
+ export declare function getStaticMenuSelections(item: IMenuItem | undefined): IValueOption[];
41
+ export declare function resolveMenuCommandRequest(item: IMenuItem | undefined, params?: object): {
42
+ commandId: string;
43
+ params?: object;
44
+ } | undefined;
45
+ export declare function createSheetsFloatingMenuContributions(): IEmbedFloatingMenuContribution[];
46
+ export declare function shouldUseSheetsFloatingMenuDomStage(_entry: string): boolean;
47
+ export declare function resolveSheetsFloatingMenuClassName(params: {
48
+ entry: string;
49
+ fullscreen: boolean;
50
+ stage: SheetFloatingMenuStage;
51
+ }): string;
52
+ export declare function isFloatingDropdownOwnSurfaceTarget(target: EventTarget | null, embedId: string): boolean;
53
+ export declare function keepFloatingDropdownOpenForOwnSurface(event: {
54
+ target: EventTarget | null;
55
+ preventDefault: () => void;
56
+ }, embedId: string): void;
57
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { IEmbedContentSizeProvider } from '../../types/embed-ui';
2
+ export declare function createSheetsContentSizeProvider(): IEmbedContentSizeProvider;
@@ -0,0 +1,3 @@
1
+ import type { IEmbedHostContainerContribution } from '../../types/embed-ui';
2
+ export declare function createSheetsFloatingObjectHostContainerContribution(): IEmbedHostContainerContribution;
3
+ export declare function createSheetsSheetTabHostContainerContribution(): IEmbedHostContainerContribution;
@@ -0,0 +1,3 @@
1
+ import type { Injector } from '@univerjs/core';
2
+ import type { IEmbedPassiveViewportProvider } from '../../types/embed-ui';
3
+ export declare function createSheetsPassiveViewportProvider(rootInjector: Injector): IEmbedPassiveViewportProvider;
@@ -0,0 +1,2 @@
1
+ import type { IDisposable, Injector } from '@univerjs/core';
2
+ export declare function registerSheetsEmbedProductMenus(injector: Pick<Injector, 'get' | 'has'>): IDisposable | undefined;
@@ -0,0 +1,28 @@
1
+ import type { Injector } from '@univerjs/core';
2
+ import { EmbedModelService } from '@univerjs-pro/embed';
3
+ import { ISheetEmbedRuntimeService } from '@univerjs/sheets-ui';
4
+ import { CanvasFloatDomPreviewService } from '@univerjs/ui';
5
+ import { Subscription } from 'rxjs';
6
+ import { EmbedActivationService } from '../../services/embed-activation.service';
7
+ import { EmbedFloatPreviewService } from '../../services/embed-float-preview.service';
8
+ import { EmbedHostRestoreService } from '../../services/embed-host-restore.service';
9
+ import { EmbedMountService } from '../../services/embed-mount.service';
10
+ export declare function registerSheetsEmbedUIContributions(injector: Injector): void;
11
+ export declare function createSheetsEmbedRuntimeService(params: {
12
+ embedModelService: EmbedModelService;
13
+ mountService: EmbedMountService;
14
+ activationService: EmbedActivationService;
15
+ restoreService: EmbedHostRestoreService;
16
+ }): ISheetEmbedRuntimeService;
17
+ export declare function wireSheetsFloatPreviewBridge(params: {
18
+ previewService: EmbedFloatPreviewService;
19
+ embedModelService: EmbedModelService;
20
+ canvasFloatDomPreviewService: CanvasFloatDomPreviewService;
21
+ }): Subscription;
22
+ export declare function ensureSheetsFloatPreviewBridge(params: {
23
+ injector: Pick<Injector, 'get' | 'has'>;
24
+ previewService: EmbedFloatPreviewService;
25
+ retry?: boolean;
26
+ maxRetries?: number;
27
+ retryDelay?: number;
28
+ }): Subscription | undefined;
@@ -0,0 +1,3 @@
1
+ import type { IEmbedChildContainerContext, IEmbedChildViewContribution } from '../../types/embed-ui';
2
+ export declare function createSlidesEmbedChildViewContribution(): IEmbedChildViewContribution;
3
+ export declare function shouldUseSlideEmbedFloatingPreview(context: Pick<IEmbedChildContainerContext, 'layout' | 'renderScope'>): boolean;
@@ -0,0 +1,28 @@
1
+ import type { SlideModel } from '@univerjs-pro/slides';
2
+ import type { ICommandService, IUniverInstanceService } from '@univerjs/core';
3
+ import type { Observable } from 'rxjs';
4
+ import type { EmbedFloatingActiveService } from '../../../../services/embed-floating-active.service';
5
+ export interface ISlideEmbedFloatingMenuProps {
6
+ hostUnitId: string;
7
+ entry: string;
8
+ embedId: string;
9
+ childUnitId: string;
10
+ slideModel: SlideModel | null;
11
+ floatingActiveService: EmbedFloatingActiveService;
12
+ commandService: ICommandService;
13
+ instanceService: IUniverInstanceService;
14
+ fullscreen: boolean;
15
+ usesDomFloatingStage: boolean;
16
+ renderScopeActive$: Observable<boolean>;
17
+ }
18
+ export declare function createSlideEmbedFloatingMenuClassName(params: {
19
+ entry: string;
20
+ fullscreen: boolean;
21
+ isStage2: boolean;
22
+ }): string;
23
+ export declare function SlideEmbedFloatingMenu(props: ISlideEmbedFloatingMenuProps): import("react").JSX.Element;
24
+ export declare function resolveSlideFloatingMenuClassName(params: {
25
+ entry: string;
26
+ fullscreen: boolean;
27
+ stage: 'inactive' | 'stage2';
28
+ }): string;
@@ -0,0 +1,24 @@
1
+ import type { IRender } from '@univerjs/engine-render';
2
+ import type { Observable } from 'rxjs';
3
+ export interface ISlideFloatPageFrameSize {
4
+ width: number;
5
+ height: number;
6
+ }
7
+ export declare function resolveSlideFloatPageFrameSize(containerSize: {
8
+ width: number;
9
+ height: number;
10
+ }, aspectRatio?: number): ISlideFloatPageFrameSize;
11
+ /**
12
+ * Lightweight slide runtime for embed float blocks.
13
+ *
14
+ * Host chrome owns selection, moving, resizing, and menus. This view only owns
15
+ * the slide page content and the minimum editing overlays needed in stage2.
16
+ */
17
+ export declare function SlideEmbedFloatingPreview(props?: {
18
+ unitId?: string;
19
+ active$?: Observable<boolean>;
20
+ }): import("react").JSX.Element;
21
+ export declare function SlideEmbedReadonlyFloatingPreview(props?: {
22
+ unitId?: string;
23
+ render?: IRender;
24
+ }): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { IEmbedBlockContribution } from '../../types/embed-ui';
2
+ export declare function createSlidesEmbedBlockContribution(): IEmbedBlockContribution;
@@ -0,0 +1,8 @@
1
+ import type { IEmbedFloatingActivation } from '../../types/embed-ui';
2
+ export declare function resolveSlidesFloatingMenuStage(params: {
3
+ embedId: string;
4
+ active: IEmbedFloatingActivation | null;
5
+ fullscreen?: boolean;
6
+ usesDomFloatingStage?: boolean;
7
+ renderScopeActive?: boolean;
8
+ }): 'inactive' | 'stage2';
@@ -0,0 +1,3 @@
1
+ import type { IEmbedFloatingMenuContribution } from '../../types/embed-ui';
2
+ export declare function createSlidesAsSheetFloatingMenuContribution(): IEmbedFloatingMenuContribution;
3
+ export declare function createSlidesFloatingMenuContributions(): IEmbedFloatingMenuContribution[];
@@ -0,0 +1,7 @@
1
+ import type { EmbedHostAnchorModelService, IEmbedHostAdapterContribution } from '@univerjs-pro/embed';
2
+ import type { ISlideEmbedRuntimeService } from '@univerjs-pro/slides-ui';
3
+ import type { IUniverInstanceService } from '@univerjs/core';
4
+ import type { IEmbedHostContainerContribution } from '../../types/embed-ui';
5
+ export declare function createSlidesPageListBlockUIHostAdapterContribution(anchorModelService?: EmbedHostAnchorModelService, univerInstanceService?: IUniverInstanceService, embedRuntimeService?: ISlideEmbedRuntimeService): IEmbedHostAdapterContribution;
6
+ export declare function createSlidesFloatingObjectHostContainerContribution(): IEmbedHostContainerContribution;
7
+ export declare function createSlidesPageListBlockHostContainerContribution(): IEmbedHostContainerContribution;
@@ -0,0 +1,2 @@
1
+ import type { IEmbedPassiveViewportProvider } from '../../types/embed-ui';
2
+ export declare function createSlidesPassiveViewportProvider(): IEmbedPassiveViewportProvider;
@@ -0,0 +1,25 @@
1
+ import type { Injector } from '@univerjs/core';
2
+ import { EmbedModelService } from '@univerjs-pro/embed';
3
+ import { ISlideEmbedRuntimeService } from '@univerjs-pro/slides-ui';
4
+ import { EmbedActivationService } from '../../services/embed-activation.service';
5
+ import { EmbedFloatPreviewService } from '../../services/embed-float-preview.service';
6
+ import { EmbedHostRestoreService } from '../../services/embed-host-restore.service';
7
+ import { EmbedMountService } from '../../services/embed-mount.service';
8
+ import { EmbedPassiveViewportRegistryService } from '../../services/embed-passive-viewport-registry.service';
9
+ import { EmbedPassiveWheelHandlerRegistryService } from '../../services/embed-passive-wheel-handler-registry.service';
10
+ import { EmbedRuntimeHostLeaseService } from '../../services/embed-runtime-host-lease.service';
11
+ import { EmbedSceneCanvasCaptureService } from '../../services/embed-scene-canvas-capture.service';
12
+ export declare function registerSlidesEmbedUIContributions(injector: Injector): void;
13
+ interface ISlidesEmbedRuntimeServiceDependencies {
14
+ embedModelService: EmbedModelService;
15
+ mountService: EmbedMountService;
16
+ activationService: EmbedActivationService;
17
+ restoreService: EmbedHostRestoreService;
18
+ previewService: EmbedFloatPreviewService;
19
+ runtimeHostLeaseService: EmbedRuntimeHostLeaseService;
20
+ passiveViewportRegistry: EmbedPassiveViewportRegistryService;
21
+ passiveWheelHandlerRegistry: EmbedPassiveWheelHandlerRegistryService;
22
+ sceneCanvasCaptureService: EmbedSceneCanvasCaptureService | undefined;
23
+ }
24
+ export declare function createSlidesEmbedRuntimeService(params: ISlidesEmbedRuntimeServiceDependencies): ISlideEmbedRuntimeService;
25
+ export {};
@@ -0,0 +1,15 @@
1
+ import type { IDisposable } from '@univerjs/core';
2
+ import type { IEmbedReadonlyPreviewContext, IEmbedReadonlyPreviewProvider, IEmbedReadonlyPreviewWheelContext } from '../../../types/embed-ui';
3
+ import type { ISlideEmbedFloatViewState } from './embed-slide-float-preview.provider';
4
+ import { IUniverInstanceService, UniverInstanceType } from '@univerjs/core';
5
+ import { IRenderManagerService } from '@univerjs/engine-render';
6
+ export declare class SlideEmbedReadonlyPreviewProvider implements IEmbedReadonlyPreviewProvider<ISlideEmbedFloatViewState> {
7
+ private readonly _instanceService;
8
+ private readonly _renderManagerService;
9
+ readonly childType = UniverInstanceType.UNIVER_SLIDE;
10
+ readonly supportedLayouts: "aspect-fit"[];
11
+ constructor(_instanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService);
12
+ mount(context: IEmbedReadonlyPreviewContext<ISlideEmbedFloatViewState>): IDisposable | undefined;
13
+ handleWheel(context: IEmbedReadonlyPreviewWheelContext<ISlideEmbedFloatViewState>): boolean;
14
+ private _getSlideModel;
15
+ }
@@ -0,0 +1,34 @@
1
+ import type { EmbedFloatPreviewRenderResult, IEmbedChildContainerContext, IEmbedFloatPreviewProvider, IEmbedFloatPreviewRenderRequest } from '../../../types/embed-ui';
2
+ import { IUniverInstanceService, UniverInstanceType } from '@univerjs/core';
3
+ import { IRenderManagerService } from '@univerjs/engine-render';
4
+ export interface ISlideEmbedFloatViewState {
5
+ unitId: string;
6
+ pageId: string;
7
+ scaleMode: 'fit' | 'custom';
8
+ zoomRatio?: number;
9
+ }
10
+ export declare class SlideEmbedFloatPreviewProvider implements IEmbedFloatPreviewProvider<ISlideEmbedFloatViewState> {
11
+ private readonly _instanceService;
12
+ private readonly _renderManagerService;
13
+ readonly childType = UniverInstanceType.UNIVER_SLIDE;
14
+ constructor(_instanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService);
15
+ collectViewState(context: IEmbedChildContainerContext): ISlideEmbedFloatViewState;
16
+ restoreViewState(context: IEmbedChildContainerContext, state: ISlideEmbedFloatViewState): void;
17
+ renderPreview(request: IEmbedFloatPreviewRenderRequest<ISlideEmbedFloatViewState>): EmbedFloatPreviewRenderResult | undefined;
18
+ private _getSlideModel;
19
+ private _getOrCreateRender;
20
+ }
21
+ export interface ICenteredAspectCrop {
22
+ sx: number;
23
+ sy: number;
24
+ sWidth: number;
25
+ sHeight: number;
26
+ }
27
+ export declare function resolveCenteredAspectCrop(sourceWidth: number, sourceHeight: number, aspectRatio: number): ICenteredAspectCrop;
28
+ export interface ISlidePageRectLike {
29
+ left?: number;
30
+ top?: number;
31
+ width?: number;
32
+ height?: number;
33
+ }
34
+ export declare function resolveSlidePageCanvasCrop(sourceWidth: number, sourceHeight: number, pageRect: ISlidePageRectLike, scaleX: number, scaleY: number): ICenteredAspectCrop | undefined;
@@ -0,0 +1,27 @@
1
+ import type { ISlideEmbedPresentationMountParams } from '@univerjs-pro/slides-ui';
2
+ import type { EmbedFloatPreviewService } from '../../../services/embed-float-preview.service';
3
+ import type { EmbedHostRestoreService } from '../../../services/embed-host-restore.service';
4
+ import type { EmbedPassiveViewportRegistryService } from '../../../services/embed-passive-viewport-registry.service';
5
+ import type { EmbedPassiveWheelHandlerRegistryService } from '../../../services/embed-passive-wheel-handler-registry.service';
6
+ import type { EmbedRuntimeHostLeaseService } from '../../../services/embed-runtime-host-lease.service';
7
+ import type { EmbedSceneCanvasCaptureService } from '../../../services/embed-scene-canvas-capture.service';
8
+ import type { EmbedFloatPreviewRenderResult } from '../../../types/embed-ui';
9
+ type EmbedModelService = import('@univerjs-pro/embed').EmbedModelService;
10
+ export interface ISlidePresentationEmbedDependencies {
11
+ embedModelService: EmbedModelService;
12
+ restoreService: EmbedHostRestoreService;
13
+ previewService: EmbedFloatPreviewService;
14
+ runtimeHostLeaseService: EmbedRuntimeHostLeaseService;
15
+ passiveViewportRegistry: EmbedPassiveViewportRegistryService;
16
+ passiveWheelHandlerRegistry: EmbedPassiveWheelHandlerRegistryService;
17
+ sceneCanvasCaptureService: EmbedSceneCanvasCaptureService | undefined;
18
+ }
19
+ /**
20
+ * Mounts the real Embed runtime for Slides presentation when available. Input is
21
+ * intentionally presentation-local: wheel is routed through the existing passive
22
+ * contributions, while activation and editing gestures terminate at the gate.
23
+ * Static preview rendering remains only as a runtime-unavailable fallback.
24
+ */
25
+ export declare function mountSlidesPresentationEmbed(dependencies: ISlidePresentationEmbedDependencies, mountParams: ISlideEmbedPresentationMountParams): import("@wendellhu/redi").IDisposable;
26
+ export declare function normalizePresentationPreviewResult(result: EmbedFloatPreviewRenderResult): string | undefined;
27
+ export {};
@@ -0,0 +1,44 @@
1
+ import type { IEmbedDescriptor } from '@univerjs-pro/embed';
2
+ import type { IEmbedHostMenuOverride } from '../types/embed-ui';
3
+ import { EmbedFocusOwnerService, EmbedHostAdapterRegistryService } from '@univerjs-pro/embed';
4
+ import { IContextService, IUniverInstanceService } from '@univerjs/core';
5
+ import { ILayoutService } from '@univerjs/ui';
6
+ import { EmbedBlockRegistryService } from './embed-block-registry.service';
7
+ import { EmbedFloatingActiveService } from './embed-floating-active.service';
8
+ import { EmbedHostMenuOverrideService } from './embed-host-menu-override.service';
9
+ import { EmbedMountService } from './embed-mount.service';
10
+ export interface IEmbedFloatingActivationOptions {
11
+ portalContainer?: HTMLElement | null;
12
+ }
13
+ export declare class EmbedActivationService {
14
+ private readonly _univerInstanceService;
15
+ private readonly _focusOwnerService;
16
+ private readonly _hostAdapterRegistry;
17
+ private readonly _menuOverrideService;
18
+ private readonly _mountService;
19
+ private readonly _blockRegistry?;
20
+ private readonly _floatingActiveService?;
21
+ private readonly _contextService?;
22
+ private readonly _layoutService?;
23
+ private readonly _previousChildCurrentUnits;
24
+ private readonly _floatingHostFocusRestorers;
25
+ constructor(_univerInstanceService: IUniverInstanceService, _focusOwnerService: EmbedFocusOwnerService, _hostAdapterRegistry: EmbedHostAdapterRegistryService, _menuOverrideService: EmbedHostMenuOverrideService, _mountService: EmbedMountService, _blockRegistry?: EmbedBlockRegistryService | undefined, _floatingActiveService?: EmbedFloatingActiveService | undefined, _contextService?: IContextService | undefined, _layoutService?: ILayoutService | undefined);
26
+ activateTab(descriptor: IEmbedDescriptor): IEmbedHostMenuOverride | null;
27
+ activateFloating(descriptor: IEmbedDescriptor, stage?: 'stage1' | 'stage2', _options?: IEmbedFloatingActivationOptions): void;
28
+ focusFloatingRuntime(descriptor: IEmbedDescriptor, options?: IEmbedFloatingActivationOptions): void;
29
+ activateFullscreen(descriptor: IEmbedDescriptor): void;
30
+ clearFullscreen(descriptor: IEmbedDescriptor): void;
31
+ clearFloating(embedId?: string, hostUnitId?: string): void;
32
+ clearTab(embedId?: string): void;
33
+ private _rememberPreviousChildCurrentUnit;
34
+ private _restorePreviousChildCurrentUnit;
35
+ private _getCurrentUnitId;
36
+ private _hasUnit;
37
+ private _findFallbackUnitId;
38
+ private _focusUnit;
39
+ private _setCurrentUnitForType;
40
+ private _focusLayout;
41
+ private _preserveHostGlobalFocusForFloating;
42
+ private _releaseFloatingHostFocusRestorers;
43
+ private _assertResolvedChild;
44
+ }