@univerjs-pro/embed-ui 1.0.0-insiders.20260709-5fcadb2

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 (201) hide show
  1. package/README.md +45 -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/sheets-floating.js +1 -0
  18. package/lib/cjs/locale/sk-SK.js +1 -0
  19. package/lib/cjs/locale/vi-VN.js +1 -0
  20. package/lib/cjs/locale/zh-CN.js +1 -0
  21. package/lib/cjs/locale/zh-HK.js +1 -0
  22. package/lib/cjs/locale/zh-TW.js +1 -0
  23. package/lib/es/index.js +1 -0
  24. package/lib/es/locale/ar-SA.js +1 -0
  25. package/lib/es/locale/ca-ES.js +1 -0
  26. package/lib/es/locale/de-DE.js +1 -0
  27. package/lib/es/locale/en-US.js +1 -0
  28. package/lib/es/locale/es-ES.js +1 -0
  29. package/lib/es/locale/fa-IR.js +1 -0
  30. package/lib/es/locale/fr-FR.js +1 -0
  31. package/lib/es/locale/id-ID.js +1 -0
  32. package/lib/es/locale/it-IT.js +1 -0
  33. package/lib/es/locale/ja-JP.js +1 -0
  34. package/lib/es/locale/ko-KR.js +1 -0
  35. package/lib/es/locale/pl-PL.js +1 -0
  36. package/lib/es/locale/pt-BR.js +1 -0
  37. package/lib/es/locale/ru-RU.js +1 -0
  38. package/lib/es/locale/sheets-floating.js +1 -0
  39. package/lib/es/locale/sk-SK.js +1 -0
  40. package/lib/es/locale/vi-VN.js +1 -0
  41. package/lib/es/locale/zh-CN.js +1 -0
  42. package/lib/es/locale/zh-HK.js +1 -0
  43. package/lib/es/locale/zh-TW.js +1 -0
  44. package/lib/index.css +1135 -0
  45. package/lib/index.js +1 -0
  46. package/lib/locale/ar-SA.js +1 -0
  47. package/lib/locale/ca-ES.js +1 -0
  48. package/lib/locale/de-DE.js +1 -0
  49. package/lib/locale/en-US.js +1 -0
  50. package/lib/locale/es-ES.js +1 -0
  51. package/lib/locale/fa-IR.js +1 -0
  52. package/lib/locale/fr-FR.js +1 -0
  53. package/lib/locale/id-ID.js +1 -0
  54. package/lib/locale/it-IT.js +1 -0
  55. package/lib/locale/ja-JP.js +1 -0
  56. package/lib/locale/ko-KR.js +1 -0
  57. package/lib/locale/pl-PL.js +1 -0
  58. package/lib/locale/pt-BR.js +1 -0
  59. package/lib/locale/ru-RU.js +1 -0
  60. package/lib/locale/sheets-floating.js +1 -0
  61. package/lib/locale/sk-SK.js +1 -0
  62. package/lib/locale/vi-VN.js +1 -0
  63. package/lib/locale/zh-CN.js +1 -0
  64. package/lib/locale/zh-HK.js +1 -0
  65. package/lib/locale/zh-TW.js +1 -0
  66. package/lib/types/common/const.d.ts +17 -0
  67. package/lib/types/common/embed-float-interaction-policy.d.ts +28 -0
  68. package/lib/types/common/embed-host-chrome-policy.d.ts +34 -0
  69. package/lib/types/common/embed-runtime-policy.d.ts +28 -0
  70. package/lib/types/common/embed-runtime-slots.d.ts +24 -0
  71. package/lib/types/common/tab-peer-workbench.d.ts +21 -0
  72. package/lib/types/components/EmbedFloatDomRenderer.d.ts +56 -0
  73. package/lib/types/components/EmbedFloatFullscreenButton.d.ts +31 -0
  74. package/lib/types/components/EmbedHostToolbarMenu.d.ts +52 -0
  75. package/lib/types/components/EmbedRuntimeProviders.d.ts +24 -0
  76. package/lib/types/config/config.d.ts +25 -0
  77. package/lib/types/controllers/docs-table-passive-wheel-bridge.controller.d.ts +7 -0
  78. package/lib/types/controllers/embed-host-anchor-cleanup.controller.d.ts +22 -0
  79. package/lib/types/controllers/embed-host-ribbon-override.controller.d.ts +29 -0
  80. package/lib/types/index.d.ts +71 -0
  81. package/lib/types/locale/ar-SA.d.ts +18 -0
  82. package/lib/types/locale/ca-ES.d.ts +18 -0
  83. package/lib/types/locale/de-DE.d.ts +18 -0
  84. package/lib/types/locale/en-US.d.ts +70 -0
  85. package/lib/types/locale/es-ES.d.ts +18 -0
  86. package/lib/types/locale/fa-IR.d.ts +18 -0
  87. package/lib/types/locale/fr-FR.d.ts +18 -0
  88. package/lib/types/locale/id-ID.d.ts +18 -0
  89. package/lib/types/locale/it-IT.d.ts +18 -0
  90. package/lib/types/locale/ja-JP.d.ts +18 -0
  91. package/lib/types/locale/ko-KR.d.ts +18 -0
  92. package/lib/types/locale/pl-PL.d.ts +18 -0
  93. package/lib/types/locale/pt-BR.d.ts +18 -0
  94. package/lib/types/locale/ru-RU.d.ts +18 -0
  95. package/lib/types/locale/sheets-floating.d.ts +62 -0
  96. package/lib/types/locale/sk-SK.d.ts +18 -0
  97. package/lib/types/locale/types.d.ts +18 -0
  98. package/lib/types/locale/vi-VN.d.ts +18 -0
  99. package/lib/types/locale/zh-CN.d.ts +18 -0
  100. package/lib/types/locale/zh-HK.d.ts +18 -0
  101. package/lib/types/locale/zh-TW.d.ts +18 -0
  102. package/lib/types/plugin.d.ts +38 -0
  103. package/lib/types/product-menus/docs-product-menus.d.ts +17 -0
  104. package/lib/types/products/bases/EmbedChildView.d.ts +13 -0
  105. package/lib/types/products/bases/EmbedChildView.spec.d.ts +1 -0
  106. package/lib/types/products/bases/EmbedFloatingMenu.d.ts +37 -0
  107. package/lib/types/products/bases/embed-block.d.ts +2 -0
  108. package/lib/types/products/bases/embed-content-size.d.ts +9 -0
  109. package/lib/types/products/bases/embed-host-adapter.d.ts +6 -0
  110. package/lib/types/products/bases/embed-passive-viewport.d.ts +3 -0
  111. package/lib/types/products/bases/register.d.ts +13 -0
  112. package/lib/types/products/docs/EmbedDocsCustomBlockRenderer.d.ts +54 -0
  113. package/lib/types/products/docs/EmbedFloatingMenu.d.ts +29 -0
  114. package/lib/types/products/docs/embed-block.d.ts +18 -0
  115. package/lib/types/products/docs/embed-docs-custom-block-bleed.render-controller.d.ts +40 -0
  116. package/lib/types/products/docs/embed-host-adapter.d.ts +21 -0
  117. package/lib/types/products/docs/embed-passive-viewport.d.ts +18 -0
  118. package/lib/types/products/docs/register.d.ts +17 -0
  119. package/lib/types/products/product-ui-contributions.d.ts +2 -0
  120. package/lib/types/products/sheets/EmbedBlock.d.ts +23 -0
  121. package/lib/types/products/sheets/EmbedFloatingMenu.d.ts +79 -0
  122. package/lib/types/products/sheets/embed-content-size.d.ts +17 -0
  123. package/lib/types/products/sheets/embed-host-adapter.d.ts +20 -0
  124. package/lib/types/products/sheets/embed-passive-viewport.d.ts +18 -0
  125. package/lib/types/products/sheets/embed-product-menu.d.ts +36 -0
  126. package/lib/types/products/sheets/register.d.ts +43 -0
  127. package/lib/types/products/slides/EmbedChildView.d.ts +3 -0
  128. package/lib/types/products/slides/components/embed-floating-menu/SlideEmbedFloatingMenu.d.ts +28 -0
  129. package/lib/types/products/slides/components/embed-floating-preview/SlideEmbedFloatingPreview.d.ts +24 -0
  130. package/lib/types/products/slides/embed-block.d.ts +2 -0
  131. package/lib/types/products/slides/embed-floating-menu-stage.d.ts +8 -0
  132. package/lib/types/products/slides/embed-floating-menu.d.ts +5 -0
  133. package/lib/types/products/slides/embed-host-adapter.d.ts +7 -0
  134. package/lib/types/products/slides/embed-passive-viewport.d.ts +2 -0
  135. package/lib/types/products/slides/register.d.ts +13 -0
  136. package/lib/types/products/slides/services/EmbedSlideReadonlyPreviewProvider.d.ts +15 -0
  137. package/lib/types/products/slides/services/embed-slide-float-preview.provider.d.ts +34 -0
  138. package/lib/types/services/embed-activation.service.d.ts +59 -0
  139. package/lib/types/services/embed-block-contribution-factory.d.ts +32 -0
  140. package/lib/types/services/embed-block-registry.service.d.ts +23 -0
  141. package/lib/types/services/embed-child-product-plugin-lease.d.ts +30 -0
  142. package/lib/types/services/embed-child-product-plugin-registry.service.d.ts +55 -0
  143. package/lib/types/services/embed-child-runtime-scope.d.ts +22 -0
  144. package/lib/types/services/embed-child-unit-scoped-injector.d.ts +21 -0
  145. package/lib/types/services/embed-child-view-registry.service.d.ts +23 -0
  146. package/lib/types/services/embed-content-size-registry.service.d.ts +24 -0
  147. package/lib/types/services/embed-default-floating-menu.d.ts +19 -0
  148. package/lib/types/services/embed-docs-sticky-wheel.d.ts +17 -0
  149. package/lib/types/services/embed-dom-passive-viewport-provider.d.ts +23 -0
  150. package/lib/types/services/embed-float-preview.service.d.ts +44 -0
  151. package/lib/types/services/embed-floating-active.service.d.ts +26 -0
  152. package/lib/types/services/embed-floating-geometry.service.d.ts +37 -0
  153. package/lib/types/services/embed-floating-menu-registry.service.d.ts +26 -0
  154. package/lib/types/services/embed-floating-menu-root.d.ts +17 -0
  155. package/lib/types/services/embed-fullscreen.service.d.ts +27 -0
  156. package/lib/types/services/embed-host-container-registry.service.d.ts +26 -0
  157. package/lib/types/services/embed-host-menu-override.service.d.ts +29 -0
  158. package/lib/types/services/embed-host-restore.service.d.ts +34 -0
  159. package/lib/types/services/embed-interaction-boundary.service.d.ts +57 -0
  160. package/lib/types/services/embed-mount.service.d.ts +68 -0
  161. package/lib/types/services/embed-overlay-root.service.d.ts +37 -0
  162. package/lib/types/services/embed-passive-viewport-registry.service.d.ts +24 -0
  163. package/lib/types/services/embed-passive-wheel-handler-registry.service.d.ts +24 -0
  164. package/lib/types/services/embed-product-floating-menu-contributions.d.ts +17 -0
  165. package/lib/types/services/embed-product-menu-mounting.d.ts +33 -0
  166. package/lib/types/services/embed-product-menu-registry.service.d.ts +29 -0
  167. package/lib/types/services/embed-readonly-preview-registry.service.d.ts +23 -0
  168. package/lib/types/services/embed-render-canvas-preview-provider.d.ts +23 -0
  169. package/lib/types/services/embed-render-child-view-contribution.d.ts +76 -0
  170. package/lib/types/services/embed-runtime-focus-coordinator.service.d.ts +91 -0
  171. package/lib/types/services/embed-runtime-policy.service.d.ts +43 -0
  172. package/lib/types/services/embed-runtime-scope-dom.d.ts +30 -0
  173. package/lib/types/services/embed-scene-canvas-capture.service.d.ts +39 -0
  174. package/lib/types/services/embed-scene-passive-wheel.d.ts +36 -0
  175. package/lib/types/services/embed-screenshot.service.d.ts +16 -0
  176. package/lib/types/services/embed-ui-contribution-register.d.ts +20 -0
  177. package/lib/types/services/embed-undo-bridge.service.d.ts +29 -0
  178. package/lib/types/services/react-root-disposal.d.ts +21 -0
  179. package/lib/types/types/embed-ui.d.ts +307 -0
  180. package/lib/umd/index.js +1 -0
  181. package/lib/umd/locale/ar-SA.js +1 -0
  182. package/lib/umd/locale/ca-ES.js +1 -0
  183. package/lib/umd/locale/de-DE.js +1 -0
  184. package/lib/umd/locale/en-US.js +1 -0
  185. package/lib/umd/locale/es-ES.js +1 -0
  186. package/lib/umd/locale/fa-IR.js +1 -0
  187. package/lib/umd/locale/fr-FR.js +1 -0
  188. package/lib/umd/locale/id-ID.js +1 -0
  189. package/lib/umd/locale/it-IT.js +1 -0
  190. package/lib/umd/locale/ja-JP.js +1 -0
  191. package/lib/umd/locale/ko-KR.js +1 -0
  192. package/lib/umd/locale/pl-PL.js +1 -0
  193. package/lib/umd/locale/pt-BR.js +1 -0
  194. package/lib/umd/locale/ru-RU.js +1 -0
  195. package/lib/umd/locale/sheets-floating.js +1 -0
  196. package/lib/umd/locale/sk-SK.js +1 -0
  197. package/lib/umd/locale/vi-VN.js +1 -0
  198. package/lib/umd/locale/zh-CN.js +1 -0
  199. package/lib/umd/locale/zh-HK.js +1 -0
  200. package/lib/umd/locale/zh-TW.js +1 -0
  201. package/package.json +110 -0
@@ -0,0 +1,13 @@
1
+ import type { Injector } from '@univerjs/core';
2
+ import { EmbedModelService } from '@univerjs-pro/embed';
3
+ import { IBaseEmbedRuntimeService } from '@univerjs-pro/bases-ui';
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,54 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IEmbedFloatDomData } from '../../components/EmbedFloatDomRenderer';
17
+ import { IRenderManagerService } from '@univerjs/engine-render';
18
+ import './embed-docs-custom-block.css';
19
+ export interface IEmbedDocsCustomBlockRuntimeProps {
20
+ customBlockRenderViewport?: {
21
+ bleedLeft?: number;
22
+ bleedWidth?: number;
23
+ contentHeight?: number;
24
+ contentWidth?: number;
25
+ height?: number;
26
+ viewportHeight?: number;
27
+ };
28
+ }
29
+ export interface IDocsTableLikeCustomBlockWheelHandlerOptions {
30
+ getLive: () => HTMLElement | null;
31
+ getMaxScrollLeft?: () => number | undefined;
32
+ }
33
+ export interface IDocsTableLikeCustomBlockStage2WheelHandlerOptions extends IDocsTableLikeCustomBlockWheelHandlerOptions {
34
+ getStage: () => 'inactive' | 'stage1' | 'stage2' | undefined;
35
+ }
36
+ export declare function EmbedDocsCustomBlockRenderer(props: {
37
+ data?: IEmbedFloatDomData;
38
+ } & IEmbedDocsCustomBlockRuntimeProps): import("react").JSX.Element;
39
+ export declare function blurHostDocSelectionWhenEmbedRuntimeEntersStage(renderManagerService: IRenderManagerService, hostUnitId: string | undefined, stage: 'inactive' | 'stage1' | 'stage2'): void;
40
+ export declare function createDocsTableLikeCustomBlockWheelHandler(options: IDocsTableLikeCustomBlockWheelHandlerOptions): (event: WheelEvent) => void;
41
+ export declare function createDocsTableLikeCustomBlockStage2WheelHandler(options: IDocsTableLikeCustomBlockStage2WheelHandlerOptions): (event: WheelEvent) => void;
42
+ export declare function resolveDocsTableLikeCustomBlockRuntimeContentHeight(authoritativeContentHeight: number | undefined): number;
43
+ export declare function resolveDocsCustomBlockRuntimeViewportHeight(params: {
44
+ contentHeight: number;
45
+ sheetLike: boolean;
46
+ viewportHeight?: number;
47
+ }): number;
48
+ export declare function resolveDocsCustomBlockRuntimeOuterHeight(params: {
49
+ contentHeight: number;
50
+ menuInsetTop: number;
51
+ sheetLike: boolean;
52
+ }): number;
53
+ export declare function resolveDocsTableLikeCustomBlockRuntimeContentWidth(authoritativeContentWidth: number | undefined, measureFallback: () => number): number;
54
+ export declare function shouldSyncDocsTableLikeCustomBlockBleedOnScroll(root: HTMLElement, target: EventTarget | null): boolean;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IEmbedFloatingActivation, IEmbedFloatingMenuContribution } from '../../types/embed-ui';
17
+ export declare function createDocsFloatingMenuContributions(): IEmbedFloatingMenuContribution[];
18
+ export declare function resolveDocsFloatingMenuStage(params: {
19
+ embedId: string;
20
+ active: IEmbedFloatingActivation | null;
21
+ fullscreen: boolean;
22
+ usesDomFloatingStage: boolean;
23
+ renderScopeActive: boolean;
24
+ }): 'inactive' | 'stage2';
25
+ export declare function resolveDocsFloatingMenuClassName(params: {
26
+ entry: string;
27
+ fullscreen: boolean;
28
+ stage: 'inactive' | 'stage2';
29
+ }): string;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IEmbedBlockContribution, IEmbedChildViewContribution } from '../../types/embed-ui';
17
+ export declare function createDocsEmbedBlockContribution(): IEmbedBlockContribution;
18
+ export declare function createDocsEmbedChildViewContribution(): IEmbedChildViewContribution;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { DocumentDataModel } from '@univerjs/core';
17
+ import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
18
+ import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
19
+ import { EmbedModelService } from '@univerjs-pro/embed';
20
+ import { EmbedContentSizeRegistryService } from '../../services/embed-content-size-registry.service';
21
+ import { IRenderManagerService } from '@univerjs/engine-render';
22
+ export declare class EmbedDocsCustomBlockBleedRenderController extends Disposable implements IRenderModule {
23
+ private readonly _context;
24
+ private readonly _univerInstanceService;
25
+ private readonly _commandService;
26
+ private readonly _contentSizeRegistry?;
27
+ private readonly _embedModelService?;
28
+ private readonly _renderManagerService?;
29
+ private readonly _resolvedChildUnits;
30
+ private readonly _pendingChildUnits;
31
+ constructor(_context: IRenderContext<DocumentDataModel>, _univerInstanceService: IUniverInstanceService, _commandService: ICommandService, _contentSizeRegistry?: EmbedContentSizeRegistryService | undefined, _embedModelService?: EmbedModelService | undefined, _renderManagerService?: IRenderManagerService | undefined);
32
+ private _getHostUnit;
33
+ private _getHostSnapshot;
34
+ private _rerenderHostDoc;
35
+ private _refreshHostDocZoom;
36
+ private _resolveChildUnitId;
37
+ private _getChildUnitForMeasurement;
38
+ private _getDocsLeft;
39
+ private _getVisibleCanvasDocumentRect;
40
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IUniverInstanceService } from '@univerjs/core';
17
+ import type { EmbedHostAnchorModelService, IEmbedHostAdapterContribution } from '@univerjs-pro/embed';
18
+ import type { IEmbedHostContainerContribution } from '../../types/embed-ui';
19
+ import type { IRenderManagerService } from '@univerjs/engine-render';
20
+ export declare function createDocsCustomBlockUIHostAdapterContribution(anchorModelService?: EmbedHostAnchorModelService, univerInstanceService?: IUniverInstanceService, renderManagerService?: IRenderManagerService): IEmbedHostAdapterContribution;
21
+ export declare function createDocsCustomBlockHostContainerContribution(): IEmbedHostContainerContribution;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { Injector } from '@univerjs/core';
17
+ import type { IEmbedPassiveViewportProvider } from '../../types/embed-ui';
18
+ export declare function createDocsPassiveViewportProvider(injector: Injector): IEmbedPassiveViewportProvider;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { Injector } from '@univerjs/core';
17
+ 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,23 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IEmbedBlockContribution, IEmbedChildContainerContext, IEmbedChildViewContribution } from '../../types/embed-ui';
17
+ export declare function createSheetsEmbedBlockContribution(): IEmbedBlockContribution;
18
+ export declare function createSheetsEmbedChildViewContribution(): IEmbedChildViewContribution;
19
+ export declare function shouldShowEmbeddedSheetChrome(context: Pick<IEmbedChildContainerContext, 'renderScope'>): boolean;
20
+ export declare function applyEmbeddedSheetChromeInset(canvasRoot: HTMLElement, chrome: {
21
+ formulaBar: boolean;
22
+ sheetBar: boolean;
23
+ }): import("@wendellhu/redi").IDisposable;
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IMenuItem, IMenuSchema, IValueOption } from '@univerjs/ui';
17
+ import type { IEmbedFloatingActivation, IEmbedFloatingMenuContribution } from '../../types/embed-ui';
18
+ import { BORDER_LINE_CHILDREN } from '@univerjs/sheets-ui';
19
+ import { FONT_SIZE_LIST } from '@univerjs/ui';
20
+ type SheetFloatingMenuStage = 'inactive' | 'stage2';
21
+ export type SheetFloatingToolbarItem = {
22
+ id: string;
23
+ type: 'button' | 'dropdown';
24
+ } | {
25
+ id: string;
26
+ type: 'divider';
27
+ };
28
+ export declare function createSheetsFloatingToolbarItems(): SheetFloatingToolbarItem[];
29
+ export declare function createSheetsFloatingBorderLineItems(): typeof BORDER_LINE_CHILDREN;
30
+ export declare function createSheetsFloatingFontSizeItems(): typeof FONT_SIZE_LIST;
31
+ export interface IResolvedSheetsFloatingToolbarMenuItems {
32
+ formatPainter?: IMenuItem;
33
+ numberFormat?: IMenuItem;
34
+ fontFamily?: IMenuItem;
35
+ fontSize?: IMenuItem;
36
+ bold?: IMenuItem;
37
+ textColor?: IMenuItem;
38
+ backgroundColor?: IMenuItem;
39
+ borderComposite?: IMenuItem;
40
+ merge?: {
41
+ root?: IMenuItem;
42
+ all?: IMenuItem;
43
+ vertical?: IMenuItem;
44
+ horizontal?: IMenuItem;
45
+ unmerge?: IMenuItem;
46
+ };
47
+ horizontalAlign?: IMenuItem;
48
+ verticalAlign?: IMenuItem;
49
+ wrap?: IMenuItem;
50
+ filter?: IMenuItem;
51
+ deleteBlock?: true;
52
+ }
53
+ export declare function resolveSheetsFloatingToolbarMenuItems(menuSchemas: IMenuSchema[]): IResolvedSheetsFloatingToolbarMenuItems;
54
+ export declare function createVisibleSheetsFloatingToolbarItems(resolved: IResolvedSheetsFloatingToolbarMenuItems): SheetFloatingToolbarItem[];
55
+ export declare function getStaticMenuSelections(item: IMenuItem | undefined): IValueOption[];
56
+ export declare function resolveMenuCommandRequest(item: IMenuItem | undefined, params?: object): {
57
+ commandId: string;
58
+ params?: object;
59
+ } | undefined;
60
+ export declare function createSheetsFloatingMenuContributions(): IEmbedFloatingMenuContribution[];
61
+ export declare function shouldUseSheetsFloatingMenuDomStage(_entry: string): boolean;
62
+ export declare function resolveSheetsFloatingMenuStage(params: {
63
+ embedId: string;
64
+ active: IEmbedFloatingActivation | null;
65
+ fullscreen?: boolean;
66
+ usesDomFloatingStage: boolean;
67
+ renderScopeActive: boolean;
68
+ }): SheetFloatingMenuStage;
69
+ export declare function resolveSheetsFloatingMenuClassName(params: {
70
+ entry: string;
71
+ fullscreen: boolean;
72
+ stage: SheetFloatingMenuStage;
73
+ }): string;
74
+ export declare function isFloatingDropdownOwnSurfaceTarget(target: EventTarget | null, embedId: string): boolean;
75
+ export declare function keepFloatingDropdownOpenForOwnSurface(event: {
76
+ target: EventTarget | null;
77
+ preventDefault: () => void;
78
+ }, embedId: string): void;
79
+ export {};
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IEmbedContentSizeProvider } from '../../types/embed-ui';
17
+ export declare function createSheetsContentSizeProvider(): IEmbedContentSizeProvider;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IEmbedHostContainerContribution } from '../../types/embed-ui';
17
+ import { PRO_EMBED_SHEETS_FLOATING_COMPONENT_KEY } from '@univerjs-pro/embed';
18
+ export declare function createSheetsFloatingObjectHostContainerContribution(): IEmbedHostContainerContribution;
19
+ export declare function createSheetsSheetTabHostContainerContribution(): IEmbedHostContainerContribution;
20
+ export { PRO_EMBED_SHEETS_FLOATING_COMPONENT_KEY as EMBED_SHEETS_FLOATING_COMPONENT_KEY };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { Injector } from '@univerjs/core';
17
+ import type { IEmbedPassiveViewportProvider } from '../../types/embed-ui';
18
+ export declare function createSheetsPassiveViewportProvider(rootInjector: Injector): IEmbedPassiveViewportProvider;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IDisposable, Injector } from '@univerjs/core';
17
+ import { UniverSheetsChartUIPlugin } from '@univerjs-pro/sheets-chart-ui';
18
+ import { UniverSheetsOutlineUIPlugin } from '@univerjs-pro/sheets-outline-ui';
19
+ import { UniverSheetsPivotTableUIPlugin } from '@univerjs-pro/sheets-pivot-ui';
20
+ import { UniverSheetsPrintPlugin } from '@univerjs-pro/sheets-print';
21
+ import { UniverSheetsShapeUIPlugin } from '@univerjs-pro/sheets-shape-ui';
22
+ import { UniverSheetSparklineUIPlugin } from '@univerjs-pro/sheets-sparkline-ui';
23
+ import { UniverSheetsConditionalFormattingUIPlugin } from '@univerjs/sheets-conditional-formatting-ui';
24
+ import { UniverSheetsDataValidationUIPlugin } from '@univerjs/sheets-data-validation-ui';
25
+ import { UniverSheetsDrawingUIPlugin } from '@univerjs/sheets-drawing-ui';
26
+ import { UniverSheetsFilterUIPlugin } from '@univerjs/sheets-filter-ui';
27
+ import { UniverSheetsHyperLinkUIPlugin } from '@univerjs/sheets-hyper-link-ui';
28
+ import { UniverSheetsNoteUIPlugin } from '@univerjs/sheets-note-ui';
29
+ import { UniverSheetsNumfmtUIPlugin } from '@univerjs/sheets-numfmt-ui';
30
+ import { UniverSheetsSortUIPlugin } from '@univerjs/sheets-sort-ui';
31
+ import { UniverSheetsTableUIPlugin } from '@univerjs/sheets-table-ui';
32
+ import { UniverSheetsThreadCommentUIPlugin } from '@univerjs/sheets-thread-comment-ui';
33
+ import { UniverSheetsUIPlugin } from '@univerjs/sheets-ui';
34
+ import { UniverThreadCommentUIPlugin } from '@univerjs/thread-comment-ui';
35
+ export declare const EMBED_SHEETS_FULL_UI_PLUGINS: (typeof UniverSheetsUIPlugin | typeof UniverSheetsDrawingUIPlugin | typeof UniverSheetsChartUIPlugin | typeof UniverSheetsOutlineUIPlugin | typeof UniverSheetsPivotTableUIPlugin | typeof UniverSheetsPrintPlugin | typeof UniverSheetsShapeUIPlugin | typeof UniverSheetSparklineUIPlugin | typeof UniverSheetsConditionalFormattingUIPlugin | typeof UniverSheetsDataValidationUIPlugin | typeof UniverSheetsFilterUIPlugin | typeof UniverSheetsHyperLinkUIPlugin | typeof UniverSheetsNoteUIPlugin | typeof UniverSheetsNumfmtUIPlugin | typeof UniverSheetsSortUIPlugin | typeof UniverSheetsTableUIPlugin | typeof UniverThreadCommentUIPlugin | typeof UniverSheetsThreadCommentUIPlugin)[];
36
+ export declare function registerSheetsEmbedProductMenus(injector: Pick<Injector, 'get' | 'has'>): IDisposable | undefined;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { Injector } from '@univerjs/core';
17
+ import { EmbedModelService } from '@univerjs-pro/embed';
18
+ import { CanvasFloatDomPreviewService } from '@univerjs/ui';
19
+ import { ISheetEmbedRuntimeService } from '@univerjs/sheets-ui';
20
+ import { Subscription } from 'rxjs';
21
+ import { EmbedActivationService } from '../../services/embed-activation.service';
22
+ import { EmbedFloatPreviewService } from '../../services/embed-float-preview.service';
23
+ import { EmbedHostRestoreService } from '../../services/embed-host-restore.service';
24
+ import { EmbedMountService } from '../../services/embed-mount.service';
25
+ export declare function registerSheetsEmbedUIContributions(injector: Injector): void;
26
+ export declare function createSheetsEmbedRuntimeService(params: {
27
+ embedModelService: EmbedModelService;
28
+ mountService: EmbedMountService;
29
+ activationService: EmbedActivationService;
30
+ restoreService: EmbedHostRestoreService;
31
+ }): ISheetEmbedRuntimeService;
32
+ export declare function wireSheetsFloatPreviewBridge(params: {
33
+ previewService: EmbedFloatPreviewService;
34
+ embedModelService: EmbedModelService;
35
+ canvasFloatDomPreviewService: CanvasFloatDomPreviewService;
36
+ }): Subscription;
37
+ export declare function ensureSheetsFloatPreviewBridge(params: {
38
+ injector: Pick<Injector, 'get' | 'has'>;
39
+ previewService: EmbedFloatPreviewService;
40
+ retry?: boolean;
41
+ maxRetries?: number;
42
+ retryDelay?: number;
43
+ }): 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 { EmbedFloatingActiveService } from '../../../../services/embed-floating-active.service';
4
+ import type { Observable } from 'rxjs';
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,5 @@
1
+ import type { IEmbedFloatingMenuContribution } from '../../types/embed-ui';
2
+ export { resolveSlideFloatingMenuClassName } from './components/embed-floating-menu/SlideEmbedFloatingMenu';
3
+ export { resolveSlidesFloatingMenuStage } from './embed-floating-menu-stage';
4
+ export declare function createSlidesAsSheetFloatingMenuContribution(): IEmbedFloatingMenuContribution;
5
+ export declare function createSlidesFloatingMenuContributions(): IEmbedFloatingMenuContribution[];
@@ -0,0 +1,7 @@
1
+ import type { IUniverInstanceService } from '@univerjs/core';
2
+ import type { EmbedHostAnchorModelService, IEmbedHostAdapterContribution } from '@univerjs-pro/embed';
3
+ import type { IEmbedHostContainerContribution } from '../../types/embed-ui';
4
+ import type { ISlideEmbedRuntimeService } from '@univerjs-pro/slides-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,13 @@
1
+ import type { Injector } from '@univerjs/core';
2
+ import { EmbedModelService } from '@univerjs-pro/embed';
3
+ import { EmbedActivationService } from '../../services/embed-activation.service';
4
+ import { EmbedMountService } from '../../services/embed-mount.service';
5
+ import { EmbedSceneCanvasCaptureService } from '../../services/embed-scene-canvas-capture.service';
6
+ import type { ISlideEmbedRuntimeService as ISlideEmbedRuntimeServiceType } from '@univerjs-pro/slides-ui';
7
+ export declare function registerSlidesEmbedUIContributions(injector: Injector): void;
8
+ export declare function createSlidesEmbedRuntimeService(params: {
9
+ embedModelService: EmbedModelService;
10
+ mountService: EmbedMountService;
11
+ activationService: EmbedActivationService;
12
+ sceneCanvasCaptureService: EmbedSceneCanvasCaptureService | undefined;
13
+ }): ISlideEmbedRuntimeServiceType;
@@ -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;