@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,57 @@
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 } from '@univerjs/core';
17
+ export declare const EMBED_INTERACTION_BOUNDARY_OWNER_ATTRIBUTE = "data-embed-interaction-boundary-owner";
18
+ export declare function getEmbedInteractionBoundaryOwnerId(element: HTMLElement | null | undefined): string | undefined;
19
+ export declare function isEventTargetInSameEmbedInteractionBoundary(scopeElement: HTMLElement | null | undefined, target: EventTarget | null | undefined): boolean;
20
+ export declare class EmbedInteractionBoundaryService {
21
+ private readonly _roots;
22
+ private readonly _portalObservers;
23
+ private readonly _activePortalOwners;
24
+ private _pendingPortalOwner;
25
+ registerRoot(embedId: string, root: HTMLElement): IDisposable;
26
+ private _registerRootPopupDescendantFocusRoles;
27
+ registerOwnedElement(embedId: string, element: HTMLElement): IDisposable;
28
+ contains(embedId: string | undefined, target: EventTarget | null | undefined, event?: Event): boolean;
29
+ hasRecentInteraction(ownerDocument?: Document): boolean;
30
+ hasRecentInteractionFor(embedId: string | undefined, ownerDocument?: Document): boolean;
31
+ closeOwnedFloatingSurfaces(embedId: string | undefined, ownerDocument: Document | undefined): void;
32
+ activatePortalScope(embedId: string, ownerDocument: Document | undefined): IDisposable;
33
+ private _collectOwnedFloatingSurfaceRoots;
34
+ private _resolveFloatingSurfaceRoot;
35
+ private _dispatchEscapeToFloatingSurface;
36
+ private _isOwnedElement;
37
+ private _claimBodyPortals;
38
+ private _ensurePortalObserver;
39
+ private _markBodyPortalOwner;
40
+ private _markExistingBodyPortals;
41
+ private _isBodyPortalCandidate;
42
+ private _isAppShellEditorPortalCandidate;
43
+ private _isHostDocEditorPortal;
44
+ private _isUniverPortalCandidate;
45
+ private _isDetachedOffscreenPortalCandidate;
46
+ private _markRuntimeFocusRole;
47
+ private _markInteractionBoundaryOwnerTree;
48
+ private _isUniverPortalTreeElement;
49
+ private _getBodyPortalOwner;
50
+ private _getLatestActivePortalOwner;
51
+ private _cleanupOrdinaryBodyChromeClaims;
52
+ private _blurActiveElementBeforePortalReassignment;
53
+ private _releaseBodyPortalClaims;
54
+ private _focusDocumentBody;
55
+ private _focusTemporarySink;
56
+ private _removeRuntimeFocusRoleTree;
57
+ }
@@ -0,0 +1,68 @@
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 { IEmbedDescriptor } from '@univerjs-pro/embed';
17
+ import type { IEmbedHostMountResult, IEmbedMountSession } from '../types/embed-ui';
18
+ import { Injector, IUniverInstanceService } from '@univerjs/core';
19
+ import { EmbedChildViewRegistryService } from './embed-child-view-registry.service';
20
+ import { EmbedHostContainerRegistryService } from './embed-host-container-registry.service';
21
+ import { EmbedOverlayRootService } from './embed-overlay-root.service';
22
+ import { EmbedRuntimePolicyService } from './embed-runtime-policy.service';
23
+ import { EmbedSceneCanvasCaptureService } from './embed-scene-canvas-capture.service';
24
+ export declare const EMBED_DUPLICATE_CHILD_UNIT_ERROR_CODE = "EMBED_DUPLICATE_CHILD_UNIT";
25
+ export declare class EmbedDuplicateChildUnitError extends Error {
26
+ readonly childUnitId: string;
27
+ readonly existingEmbedId: string;
28
+ readonly code = "EMBED_DUPLICATE_CHILD_UNIT";
29
+ constructor(childUnitId: string, existingEmbedId: string);
30
+ }
31
+ export declare class EmbedMountService {
32
+ private readonly _hostContainerRegistry;
33
+ private readonly _childViewRegistry;
34
+ private readonly _overlayRootService;
35
+ private readonly _sceneCanvasCaptureService;
36
+ private readonly _univerInstanceService;
37
+ private readonly _runtimePolicyService;
38
+ private readonly _injector;
39
+ private readonly _sessions;
40
+ private readonly _tabFocusLeases;
41
+ constructor(_hostContainerRegistry: EmbedHostContainerRegistryService, _childViewRegistry: EmbedChildViewRegistryService, _overlayRootService: EmbedOverlayRootService, _sceneCanvasCaptureService: EmbedSceneCanvasCaptureService, _univerInstanceService: IUniverInstanceService, _runtimePolicyService: EmbedRuntimePolicyService, _injector: Injector);
42
+ mount(descriptor: IEmbedDescriptor): IEmbedMountSession;
43
+ mountIntoHostElement(descriptor: IEmbedDescriptor, hostElement: HTMLElement, runtimeRoots?: IEmbedHostMountResult['runtimeRoots']): IEmbedMountSession;
44
+ private _mountResolvedHost;
45
+ private _mountBlockedRuntime;
46
+ private _initializeFloatingSessionActiveState;
47
+ unmount(embedId: string): void;
48
+ getSession(embedId: string): IEmbedMountSession | undefined;
49
+ listSessions(): IEmbedMountSession[];
50
+ activateSession(embedId: string): void;
51
+ deactivateTabSessions(embedId?: string): IEmbedMountSession[];
52
+ deactivateFloatingSession(embedId: string): IEmbedMountSession | undefined;
53
+ setActive(embedId: string, active: boolean): void;
54
+ private _runChildBeforeDeactivate;
55
+ private _resolveLayout;
56
+ private _registerChildProductPlugins;
57
+ private _createRenderScope;
58
+ private _registerRuntimeBoundary;
59
+ private _normalizeHostMountResult;
60
+ private _mountFloatingMenu;
61
+ private _registerChildFocusBridge;
62
+ private _focusTabPeerSession;
63
+ private _activateTabPeerFocusLease;
64
+ private _releaseTabPeerFocusLeasesForHost;
65
+ private _releaseTabPeerFocusLease;
66
+ private _createMountFocusRestorer;
67
+ private _assertChildUnitAvailable;
68
+ }
@@ -0,0 +1,37 @@
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 } from '@univerjs/core';
17
+ export interface IEmbedOverlayRootRegistration {
18
+ childUnitId: string;
19
+ embedId?: string;
20
+ hostAnchorId?: string;
21
+ root: HTMLElement;
22
+ }
23
+ export declare class EmbedOverlayRootService {
24
+ private readonly _rootsByChildUnitId;
25
+ private readonly _rootsByEmbedId;
26
+ private readonly _rootsByHostAnchorId;
27
+ register(childUnitId: string, root: HTMLElement): IDisposable;
28
+ register(registration: IEmbedOverlayRootRegistration): IDisposable;
29
+ get(childUnitId: string): HTMLElement | null;
30
+ getByEmbedId(embedId: string): HTMLElement | null;
31
+ getByHostAnchorId(hostAnchorId: string): HTMLElement | null;
32
+ contains(target: EventTarget | Node | null | undefined, query: {
33
+ childUnitId?: string;
34
+ embedId?: string;
35
+ hostAnchorId?: string;
36
+ }): boolean;
37
+ }
@@ -0,0 +1,24 @@
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, UniverInstanceType } from '@univerjs/core';
17
+ import type { EmbedLayout } from '@univerjs-pro/embed';
18
+ import type { IEmbedPassiveViewportProvider } from '../types/embed-ui';
19
+ export declare class EmbedPassiveViewportRegistryService {
20
+ private readonly _providers;
21
+ register(provider: IEmbedPassiveViewportProvider): IDisposable;
22
+ get(childType: UniverInstanceType, layout?: EmbedLayout): IEmbedPassiveViewportProvider | undefined;
23
+ list(): IEmbedPassiveViewportProvider[];
24
+ }
@@ -0,0 +1,24 @@
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 } from '@univerjs/core';
17
+ import type { IEmbedPassiveViewportWheelContext, IEmbedPassiveWheelHandlerContribution } from '../types/embed-ui';
18
+ export declare class EmbedPassiveWheelHandlerRegistryService {
19
+ private readonly _handlers;
20
+ register(handler: IEmbedPassiveWheelHandlerContribution): IDisposable;
21
+ handleWheel(context: IEmbedPassiveViewportWheelContext): boolean;
22
+ list(): IEmbedPassiveWheelHandlerContribution[];
23
+ private _sortHandlers;
24
+ }
@@ -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 { IEmbedFloatingMenuContribution } from '../types/embed-ui';
17
+ export declare function createEmbedProductFloatingMenuContributions(params: Pick<IEmbedFloatingMenuContribution, 'childType' | 'mount'>): IEmbedFloatingMenuContribution[];
@@ -0,0 +1,33 @@
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 { DependencyIdentifier, IDisposable, Injector } from '@univerjs/core';
17
+ import type { IEmbedProductMenuMountContext } from '../types/embed-ui';
18
+ import { UniverInstanceType } from '@univerjs/core';
19
+ import { IRibbonService } from '@univerjs/ui';
20
+ export declare function mountEmbedProductRibbonMenu(context: IEmbedProductMenuMountContext): IDisposable | undefined;
21
+ export declare function createEmbedProductRibbonRuntime(injector: Injector, params: {
22
+ childType: UniverInstanceType;
23
+ childUnitId?: string;
24
+ embedId?: string;
25
+ menuSchema?: unknown;
26
+ menuTitlePrefix?: string;
27
+ activeRibbonTab?: string;
28
+ scopedActionServiceTokens?: readonly DependencyIdentifier<unknown>[];
29
+ }): {
30
+ injector: Injector;
31
+ ribbonService: IRibbonService;
32
+ disposable: IDisposable;
33
+ };
@@ -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 { IDisposable, Injector, UniverInstanceType } from '@univerjs/core';
17
+ import type { EmbedProductMenuSurface, IEmbedProductMenuContribution, IEmbedProductMenuMountContext } from '../types/embed-ui';
18
+ export declare function registerEmbedProductMenuContribution(injector: Pick<Injector, 'get' | 'has'>, contribution: IEmbedProductMenuContribution): IDisposable | undefined;
19
+ export declare function flushPendingEmbedProductMenuContributions(injector: Pick<Injector, 'get' | 'has'>): void;
20
+ export declare class EmbedProductMenuRegistryService {
21
+ private readonly _contributions;
22
+ private _nextIndex;
23
+ constructor();
24
+ register(contribution: IEmbedProductMenuContribution): IDisposable;
25
+ get(childType: UniverInstanceType): IEmbedProductMenuContribution | undefined;
26
+ getAll(childType: UniverInstanceType, surface?: EmbedProductMenuSurface): readonly IEmbedProductMenuContribution[];
27
+ getMergedMenuSchema(childType: UniverInstanceType, surface?: EmbedProductMenuSurface): unknown | undefined;
28
+ mountMenu(context: Omit<IEmbedProductMenuMountContext, 'menuSchema'>): IDisposable | undefined;
29
+ }
@@ -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 { UniverInstanceType } from '@univerjs/core';
17
+ import type { IEmbedReadonlyPreviewProvider } from '../types/embed-ui';
18
+ export declare class EmbedReadonlyPreviewRegistryService {
19
+ private readonly _providers;
20
+ register(provider: IEmbedReadonlyPreviewProvider<any>): void;
21
+ get(childType: UniverInstanceType): IEmbedReadonlyPreviewProvider<any> | undefined;
22
+ list(): IEmbedReadonlyPreviewProvider<any>[];
23
+ }
@@ -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 { DependencyIdentifier, Injector, UniverInstanceType } from '@univerjs/core';
17
+ import type { IEmbedFloatPreviewProvider } from '../types/embed-ui';
18
+ import type { IEmbedRenderManagerServiceLike } from './embed-render-child-view-contribution';
19
+ export interface ICreateEmbedRenderCanvasPreviewProviderOptions {
20
+ childType: UniverInstanceType;
21
+ renderManagerService: DependencyIdentifier<IEmbedRenderManagerServiceLike>;
22
+ }
23
+ export declare function createEmbedRenderCanvasPreviewProvider(injector: Injector, options: ICreateEmbedRenderCanvasPreviewProviderOptions): IEmbedFloatPreviewProvider;
@@ -0,0 +1,76 @@
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 { DependencyIdentifier, IDisposable, UniverInstanceType } from '@univerjs/core';
17
+ import type { EmbedLayout } from '@univerjs-pro/embed';
18
+ import type { IEmbedChildContainerContext, IEmbedChildViewContribution } from '../types/embed-ui';
19
+ import { Injector } from '@univerjs/core';
20
+ export interface IEmbedRenderLike {
21
+ isMainScene?: boolean;
22
+ engine: {
23
+ mount: (target: HTMLElement) => void;
24
+ unmount?: () => void;
25
+ resize: () => void;
26
+ getCanvasElement?: () => HTMLCanvasElement | undefined;
27
+ getCanvas?: () => {
28
+ getCanvasEle?: () => HTMLCanvasElement | undefined;
29
+ } | undefined;
30
+ };
31
+ activate?: () => void;
32
+ components: {
33
+ forEach: (callback: (component: {
34
+ makeForceDirty?: (dirty: boolean) => void;
35
+ makeDirty?: (dirty?: boolean) => void;
36
+ }) => void) => void;
37
+ };
38
+ mainComponent?: {
39
+ makeDirty?: (dirty?: boolean) => void;
40
+ } | null | void;
41
+ scene: {
42
+ makeDirty: () => void;
43
+ render?: () => void;
44
+ };
45
+ with?: <T>(dependency: DependencyIdentifier<T>) => T;
46
+ }
47
+ export interface IEmbedRenderManagerServiceLike {
48
+ getRenderById: (unitId: string) => IEmbedRenderLike | null | undefined | void;
49
+ createRender: (unitId: string, options?: {
50
+ embeddedRender?: boolean;
51
+ makeCurrent?: boolean;
52
+ renderParentInjector?: Injector;
53
+ skipAutoRender?: boolean;
54
+ }) => IEmbedRenderLike;
55
+ removeRender?: (unitId: string) => void;
56
+ }
57
+ export interface ICreateEmbedRenderChildViewContributionOptions {
58
+ childType: UniverInstanceType;
59
+ supportedLayouts: readonly EmbedLayout[];
60
+ renderManagerService: DependencyIdentifier<IEmbedRenderManagerServiceLike>;
61
+ }
62
+ export interface IMountEmbedRenderChildUnitOptions {
63
+ activate?: boolean;
64
+ scopedRenderInjector?: boolean;
65
+ scopedInjector?: Injector;
66
+ }
67
+ export declare function createEmbedRenderChildViewContribution(options: ICreateEmbedRenderChildViewContributionOptions): IEmbedChildViewContribution;
68
+ export declare function mountEmbedRenderChildUnit(context: IEmbedChildContainerContext, renderManagerServiceIdentifier: DependencyIdentifier<IEmbedRenderManagerServiceLike>, target?: HTMLElement, options?: IMountEmbedRenderChildUnitOptions): IDisposable | undefined;
69
+ export declare function observeEmbedRenderTargetResize(render: IEmbedRenderLike, target: HTMLElement, options?: {
70
+ activate?: boolean;
71
+ }): IDisposable;
72
+ export declare function ensureEmbedChildRender(renderManagerService: IEmbedRenderManagerServiceLike, childUnitId: string, renderParentInjector?: Injector): IEmbedRenderLike | undefined;
73
+ export declare function createEmbedChildRender(renderManagerService: IEmbedRenderManagerServiceLike, childUnitId: string, renderParentInjector?: Injector): IEmbedRenderLike | undefined;
74
+ export declare function refreshEmbedChildRender(render: IEmbedRenderLike, options?: {
75
+ activate?: boolean;
76
+ }): void;
@@ -0,0 +1,91 @@
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, UniverInstanceType } from '@univerjs/core';
17
+ import { Subject } from 'rxjs';
18
+ export declare const EMBED_RUNTIME_FOCUS_ROLE_ATTRIBUTE = "data-embed-runtime-focus-role";
19
+ export type EmbedRuntimeFocusRole = 'runtime' | 'child-session' | 'child-editor' | 'child-popup' | 'floating-menu';
20
+ export type EmbedRuntimeSessionMode = 'host-passive' | 'child-keyboard' | 'child-fullscreen' | 'child-tab';
21
+ export interface IEmbedRuntimeFocusLeaseOptions {
22
+ embedId: string;
23
+ role: EmbedRuntimeFocusRole;
24
+ owner?: string;
25
+ sessionMode?: EmbedRuntimeSessionMode;
26
+ hostUnitId?: string;
27
+ childUnitId?: string;
28
+ childType?: UniverInstanceType;
29
+ associatedChildUnitIds?: string[];
30
+ }
31
+ export interface IEmbedRuntimeFocusElementRegistration {
32
+ embedId: string;
33
+ role: EmbedRuntimeFocusRole;
34
+ element: HTMLElement;
35
+ }
36
+ export interface IEmbedRuntimeScopeRegistration {
37
+ embedId: string;
38
+ hostUnitId?: string;
39
+ childUnitId?: string;
40
+ childType?: UniverInstanceType;
41
+ sessionMode?: EmbedRuntimeSessionMode;
42
+ }
43
+ export interface IEmbedRuntimeFocusLeaseQueryOptions {
44
+ ignoreOwners?: string[];
45
+ }
46
+ export declare class EmbedRuntimeFocusCoordinator {
47
+ private readonly _leases;
48
+ private readonly _elements;
49
+ private readonly _runtimeScopes;
50
+ private _leaseSequence;
51
+ readonly runtimeFocusChanged$: Subject<void>;
52
+ readonly runtimeSessionChanged$: Subject<void>;
53
+ acquireLease(options: IEmbedRuntimeFocusLeaseOptions): IDisposable;
54
+ hasChildInteractionLease(embedId: string | undefined): boolean;
55
+ hasBlockingChildFocusLease(embedId: string | undefined, options?: IEmbedRuntimeFocusLeaseQueryOptions): boolean;
56
+ hasAnyChildInteractionLease(): boolean;
57
+ hasAnyBlockingChildFocusLease(options?: IEmbedRuntimeFocusLeaseQueryOptions): boolean;
58
+ hasHostPreservingChildFocusLease(embedId: string | undefined, options?: IEmbedRuntimeFocusLeaseQueryOptions): boolean;
59
+ hasAnyHostPreservingChildFocusLease(options?: IEmbedRuntimeFocusLeaseQueryOptions): boolean;
60
+ hasHostPreservingChildFocusLeaseForHost(hostUnitId: string | undefined, options?: IEmbedRuntimeFocusLeaseQueryOptions): boolean;
61
+ isChildUnitInActiveSession(unitId: string | undefined): boolean;
62
+ registerRuntimeScope(options: IEmbedRuntimeScopeRegistration): IDisposable;
63
+ resolveRuntimeScopeByChildUnitId(childUnitId: string | undefined): IEmbedRuntimeScopeRegistration | undefined;
64
+ resolveActiveChildSessionRuntimeScope(): IEmbedRuntimeScopeRegistration | undefined;
65
+ isChildUnitRuntimeEvent(unitId: string | undefined, target: EventTarget | null | undefined, event?: Event): boolean;
66
+ shouldSuppressHostInteraction(unitId: string | undefined, target?: EventTarget | null, event?: Event, options?: IEmbedRuntimeFocusLeaseQueryOptions): boolean;
67
+ registerElement(options: IEmbedRuntimeFocusElementRegistration): IDisposable;
68
+ containsElement(embedId: string | undefined, target: EventTarget | null | undefined, event?: Event): boolean;
69
+ private _containsRegisteredElement;
70
+ private _isBlockingLease;
71
+ private _isHostPreservingLease;
72
+ private _leaseAppliesToHostUnit;
73
+ private _ownedRuntimeFocusAppliesToHost;
74
+ private _leaseAppliesToChildUnit;
75
+ private _ownedEmbedAppliesToChildUnit;
76
+ private _isBlockingRole;
77
+ private _getChildSessionPriority;
78
+ private _resolveChildSessionMode;
79
+ private _isOwnedBoundaryElement;
80
+ private _getOwnedEmbedIdFromTarget;
81
+ private _getOwnedEmbedIdFromEventPoint;
82
+ private _getEventClientPoint;
83
+ private _rectContainsPoint;
84
+ private _getActiveOwnedRuntimeFocusInfo;
85
+ private _isHTMLElement;
86
+ private _isRuntimeFocusRole;
87
+ private _getAnyActiveElement;
88
+ private _getActiveElement;
89
+ private _notifyRuntimeFocusChanged;
90
+ private _notifyRuntimeSessionChanged;
91
+ }
@@ -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 { IDisposable } from '@univerjs/core';
17
+ import type { IEmbedDescriptor } from '@univerjs-pro/embed';
18
+ export interface IEmbedRuntimeAncestor {
19
+ hostUnitId: string;
20
+ embedId: string;
21
+ childUnitId: string;
22
+ }
23
+ export interface IEmbedRuntimeMountDecision {
24
+ allowed: boolean;
25
+ reason?: 'max-depth' | 'cycle';
26
+ ancestry: readonly IEmbedRuntimeAncestor[];
27
+ }
28
+ export interface IEmbedRuntimePolicyConfig {
29
+ maxDepth?: number;
30
+ }
31
+ type EmbedRuntimeDescriptor = Pick<IEmbedDescriptor, 'hostUnitId' | 'embedId'> & {
32
+ childUnitId: string;
33
+ };
34
+ export declare class EmbedRuntimePolicyService {
35
+ private readonly _childUnitAncestry;
36
+ private readonly _maxDepth;
37
+ constructor(config?: IEmbedRuntimePolicyConfig);
38
+ canMount(descriptor: EmbedRuntimeDescriptor): IEmbedRuntimeMountDecision;
39
+ registerMountedRuntime(descriptor: EmbedRuntimeDescriptor): IDisposable;
40
+ getAncestryForHostUnit(hostUnitId: string): readonly IEmbedRuntimeAncestor[];
41
+ getParentEmbedId(hostUnitId: string): string | undefined;
42
+ }
43
+ export {};
@@ -0,0 +1,30 @@
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 { UniverInstanceType } from '@univerjs/core';
17
+ export declare const EMBED_FLOAT_DOM_ATTRIBUTE = "data-embed-float-dom";
18
+ export declare const EMBED_ID_ATTRIBUTE = "data-embed-id";
19
+ export declare const EMBED_HOST_UNIT_ID_ATTRIBUTE = "data-embed-host-unit-id";
20
+ export declare const EMBED_CHILD_UNIT_ID_ATTRIBUTE = "data-embed-child-unit-id";
21
+ export declare const EMBED_CHILD_TYPE_ATTRIBUTE = "data-embed-child-type";
22
+ export interface IEmbedRuntimeDomScope {
23
+ embedId: string;
24
+ hostUnitId?: string;
25
+ childUnitId?: string;
26
+ childType?: UniverInstanceType;
27
+ }
28
+ export declare function resolveEmbedRuntimeDomScope(element: HTMLElement | null | undefined): IEmbedRuntimeDomScope | undefined;
29
+ export declare function resolveActiveEmbedRuntimeDomScope(ownerDocument?: Document): IEmbedRuntimeDomScope | undefined;
30
+ export declare function resolveEmbedFloatDomContainer(element: HTMLElement | null | undefined, embedId?: string): HTMLElement | undefined;
@@ -0,0 +1,39 @@
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, UniverInstanceType } from '@univerjs/core';
17
+ import type { IEmbedChildContainerContext } from '../types/embed-ui';
18
+ export type EmbedSceneCanvasCaptureResult = string | HTMLCanvasElement | ImageBitmap;
19
+ export interface IEmbedSceneCanvasCaptureProvider {
20
+ childType: UniverInstanceType;
21
+ capture(context: IEmbedChildContainerContext): Promise<EmbedSceneCanvasCaptureResult | null | undefined> | EmbedSceneCanvasCaptureResult | null | undefined;
22
+ }
23
+ export declare class EmbedSceneCanvasCaptureService {
24
+ private readonly _providers;
25
+ private readonly _contextsByEmbedId;
26
+ private readonly _contextsByHostAnchorId;
27
+ private readonly _contextsByChildUnitId;
28
+ register(provider: IEmbedSceneCanvasCaptureProvider): IDisposable;
29
+ get(childType: UniverInstanceType): IEmbedSceneCanvasCaptureProvider | undefined;
30
+ registerContext(context: IEmbedChildContainerContext): IDisposable;
31
+ getContextByEmbedId(embedId: string): IEmbedChildContainerContext | undefined;
32
+ getContextByHostAnchorId(hostAnchorId: string): IEmbedChildContainerContext | undefined;
33
+ getContextByChildUnitId(childUnitId: string): IEmbedChildContainerContext | undefined;
34
+ capture(context: IEmbedChildContainerContext): Promise<EmbedSceneCanvasCaptureResult | null | undefined>;
35
+ captureByEmbedId(embedId: string): Promise<EmbedSceneCanvasCaptureResult | null | undefined>;
36
+ captureByHostAnchorId(hostAnchorId: string): Promise<EmbedSceneCanvasCaptureResult | null | undefined>;
37
+ captureByChildUnitId(childUnitId: string): Promise<EmbedSceneCanvasCaptureResult | null | undefined>;
38
+ }
39
+ export declare function captureEmbedContextSceneCanvas(context: IEmbedChildContainerContext): string | undefined;