@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,59 @@
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 { IEmbedHostMenuOverride } from '../types/embed-ui';
18
+ import { IContextService, IUniverInstanceService } from '@univerjs/core';
19
+ import { EmbedFocusOwnerService, EmbedHostAdapterRegistryService } from '@univerjs-pro/embed';
20
+ import { ILayoutService } from '@univerjs/ui';
21
+ import { EmbedBlockRegistryService } from './embed-block-registry.service';
22
+ import { EmbedFloatingActiveService } from './embed-floating-active.service';
23
+ import { EmbedHostMenuOverrideService } from './embed-host-menu-override.service';
24
+ import { EmbedMountService } from './embed-mount.service';
25
+ export interface IEmbedFloatingActivationOptions {
26
+ portalContainer?: HTMLElement | null;
27
+ }
28
+ export declare class EmbedActivationService {
29
+ private readonly _univerInstanceService;
30
+ private readonly _focusOwnerService;
31
+ private readonly _hostAdapterRegistry;
32
+ private readonly _menuOverrideService;
33
+ private readonly _mountService;
34
+ private readonly _blockRegistry?;
35
+ private readonly _floatingActiveService?;
36
+ private readonly _contextService?;
37
+ private readonly _layoutService?;
38
+ private readonly _previousChildCurrentUnits;
39
+ private readonly _floatingHostFocusRestorers;
40
+ constructor(_univerInstanceService: IUniverInstanceService, _focusOwnerService: EmbedFocusOwnerService, _hostAdapterRegistry: EmbedHostAdapterRegistryService, _menuOverrideService: EmbedHostMenuOverrideService, _mountService: EmbedMountService, _blockRegistry?: EmbedBlockRegistryService | undefined, _floatingActiveService?: EmbedFloatingActiveService | undefined, _contextService?: IContextService | undefined, _layoutService?: ILayoutService | undefined);
41
+ activateTab(descriptor: IEmbedDescriptor): IEmbedHostMenuOverride | null;
42
+ activateFloating(descriptor: IEmbedDescriptor, stage?: 'stage1' | 'stage2', _options?: IEmbedFloatingActivationOptions): void;
43
+ focusFloatingRuntime(descriptor: IEmbedDescriptor, options?: IEmbedFloatingActivationOptions): void;
44
+ activateFullscreen(descriptor: IEmbedDescriptor): void;
45
+ clearFullscreen(descriptor: IEmbedDescriptor): void;
46
+ clearFloating(embedId?: string, hostUnitId?: string): void;
47
+ clearTab(embedId?: string): void;
48
+ private _rememberPreviousChildCurrentUnit;
49
+ private _restorePreviousChildCurrentUnit;
50
+ private _getCurrentUnitId;
51
+ private _hasUnit;
52
+ private _findFallbackUnitId;
53
+ private _focusUnit;
54
+ private _setCurrentUnitForType;
55
+ private _focusLayout;
56
+ private _preserveHostGlobalFocusForFloating;
57
+ private _releaseFloatingHostFocusRestorers;
58
+ private _assertResolvedChild;
59
+ }
@@ -0,0 +1,32 @@
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, UniverInstanceType } from '@univerjs/core';
17
+ import type { IEmbedBlockContribution } from '../types/embed-ui';
18
+ import { EmbedHostChromeMode } from '../types/embed-ui';
19
+ export interface ICreateEmbedRibbonBlockContributionOptions {
20
+ childType: UniverInstanceType;
21
+ productName: string;
22
+ menuSchema?: unknown;
23
+ }
24
+ export interface ICreateEmbedNoHeaderBlockContributionOptions {
25
+ childType: UniverInstanceType;
26
+ productName: string;
27
+ hostChromeMode?: EmbedHostChromeMode.TITLE_ONLY | EmbedHostChromeMode.NONE;
28
+ hostHeaderMode?: 'none' | 'placeholder';
29
+ }
30
+ export declare function createEmbedRibbonBlockContribution(options: ICreateEmbedRibbonBlockContributionOptions): IEmbedBlockContribution;
31
+ export declare function resolveEmbedProductRibbonMenuSchema(injector: Pick<Injector, 'get' | 'has'> | unknown, childType: UniverInstanceType, fallbackMenuSchema?: unknown): unknown;
32
+ export declare function createEmbedNoHeaderBlockContribution(options: ICreateEmbedNoHeaderBlockContributionOptions): IEmbedBlockContribution;
@@ -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 { IDisposable, UniverInstanceType } from '@univerjs/core';
17
+ import type { IEmbedBlockContribution } from '../types/embed-ui';
18
+ export declare class EmbedBlockRegistryService {
19
+ private readonly _contributions;
20
+ register(contribution: IEmbedBlockContribution): IDisposable;
21
+ get(childType: UniverInstanceType): IEmbedBlockContribution | undefined;
22
+ list(): IEmbedBlockContribution[];
23
+ }
@@ -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 { IUniverInstanceService, UniverInstanceType } from '@univerjs/core';
17
+ export interface IEmbedChildProductCurrentUnitLeaseOptions {
18
+ instanceService: IUniverInstanceService;
19
+ childUnitId: string;
20
+ childType: UniverInstanceType;
21
+ restoreUnitId?: string;
22
+ shouldRestore?: () => boolean;
23
+ /**
24
+ * Product plugin registration may schedule already-started plugin lifecycle work on a short timer.
25
+ * Keep the child current/focused until that lifecycle queue has had a chance to observe it.
26
+ */
27
+ settleDelayMs?: number;
28
+ deferredRestoreDelaysMs?: readonly number[];
29
+ }
30
+ export declare function runWithEmbedChildProductCurrentUnit<T>(options: IEmbedChildProductCurrentUnitLeaseOptions, runner: () => T | Promise<T>): Promise<T>;
@@ -0,0 +1,55 @@
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, PluginCtor, UniverInstanceType } from '@univerjs/core';
17
+ import { Injector } from '@univerjs/core';
18
+ import { EmbedRuntimeFocusCoordinator } from './embed-runtime-focus-coordinator.service';
19
+ export type EmbedChildProductPluginDefinition<T extends PluginCtor = PluginCtor> = T | readonly [T] | readonly [T, ConstructorParameters<T>[0]?];
20
+ export interface IEmbedChildProductPluginPrepareContext {
21
+ injector: Injector;
22
+ childUnitId: string;
23
+ childType: UniverInstanceType;
24
+ descriptor?: unknown;
25
+ }
26
+ export interface IEmbedChildProductPluginContribution {
27
+ id?: string;
28
+ childType: UniverInstanceType;
29
+ order?: number;
30
+ plugins?: readonly EmbedChildProductPluginDefinition[];
31
+ prepare?(context: IEmbedChildProductPluginPrepareContext): void | Promise<void>;
32
+ }
33
+ export interface IEmbedChildProductPluginPrepareOptions {
34
+ childUnitId: string;
35
+ childType: UniverInstanceType;
36
+ restoreUnitId?: string;
37
+ descriptor?: unknown;
38
+ settleDelayMs?: number;
39
+ }
40
+ export declare function registerEmbedChildProductPluginContribution(injector: Pick<Injector, 'get' | 'has'>, contribution: IEmbedChildProductPluginContribution): IDisposable;
41
+ export declare function flushPendingEmbedChildProductPluginContributions(injector: Pick<Injector, 'get' | 'has'>): void;
42
+ export declare class EmbedChildProductPluginRegistryService {
43
+ private readonly _injector;
44
+ private readonly _focusCoordinator?;
45
+ private readonly _contributions;
46
+ private readonly _registeredProductPluginNames;
47
+ private _nextIndex;
48
+ constructor(_injector: Injector, _focusCoordinator?: EmbedRuntimeFocusCoordinator | undefined);
49
+ register(contribution: IEmbedChildProductPluginContribution): IDisposable;
50
+ getAll(childType: UniverInstanceType): readonly IEmbedChildProductPluginContribution[];
51
+ registerProductPlugins(childType: UniverInstanceType): void;
52
+ prepare(options: IEmbedChildProductPluginPrepareOptions): Promise<void>;
53
+ private _hasContributionId;
54
+ private _registerProductPluginsOnce;
55
+ }
@@ -0,0 +1,22 @@
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 { IEmbedChildContainerContext, IEmbedChildRuntimeScope } from '../types/embed-ui';
18
+ export type EmbedChildRuntimeScopeCreateContext = Omit<IEmbedChildContainerContext, 'runtimeScope'>;
19
+ export declare function createEmbedChildRuntimeScope(context: EmbedChildRuntimeScopeCreateContext, setActive: (active: boolean) => void): {
20
+ runtimeScope: IEmbedChildRuntimeScope;
21
+ disposable: IDisposable;
22
+ };
@@ -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 { IEmbedChildContainerContext } from '../types/embed-ui';
17
+ import { Injector } from '@univerjs/core';
18
+ export type IEmbedScopedConfigOverrides = ReadonlyMap<string | symbol, (config: unknown) => unknown>;
19
+ export declare function createEmbedChildUnitScopedInjector(context: IEmbedChildContainerContext): Injector | undefined;
20
+ export declare function createEmbedScopedConfigInjector(parentInjector: Injector, configOverrides: IEmbedScopedConfigOverrides): Injector | undefined;
21
+ export declare function createEmbedScopedInjector(parentInjector: Injector, overrides: ReadonlyMap<unknown, unknown>, sharedRootInjector?: Injector): Injector;
@@ -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 { IEmbedChildViewContribution } from '../types/embed-ui';
18
+ export declare class EmbedChildViewRegistryService {
19
+ private readonly _contributions;
20
+ register(contribution: IEmbedChildViewContribution): void;
21
+ get(childType: UniverInstanceType): IEmbedChildViewContribution | undefined;
22
+ list(): IEmbedChildViewContribution[];
23
+ }
@@ -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 { IEmbedContentSize, IEmbedContentSizeMeasureContext, IEmbedContentSizeProvider } from '../types/embed-ui';
18
+ export declare class EmbedContentSizeRegistryService {
19
+ private readonly _providers;
20
+ register(provider: IEmbedContentSizeProvider): IDisposable;
21
+ get(childType: UniverInstanceType): IEmbedContentSizeProvider | undefined;
22
+ list(): IEmbedContentSizeProvider[];
23
+ measureContentSize(context: IEmbedContentSizeMeasureContext): IEmbedContentSize | undefined;
24
+ }
@@ -0,0 +1,19 @@
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 { IEmbedFloatingMenuContribution, IEmbedFloatingMenuMountContext } from '../types/embed-ui';
18
+ export declare function createDefaultEmbedFloatingMenuContributions(): IEmbedFloatingMenuContribution[];
19
+ export declare function mountDefaultEmbedFloatingMenu(_context: IEmbedFloatingMenuMountContext): IDisposable;
@@ -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 { EmbedLayout } from '@univerjs-pro/embed';
17
+ export declare function shouldPassDocsStickyVerticalWheelToHost(layout: EmbedLayout, event: WheelEvent): boolean;
@@ -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 { EmbedLayout } from '@univerjs-pro/embed';
18
+ import type { IEmbedPassiveViewportProvider } from '../types/embed-ui';
19
+ export interface ICreateEmbedDomPassiveViewportProviderOptions {
20
+ childType: UniverInstanceType;
21
+ supportedLayouts?: EmbedLayout[];
22
+ }
23
+ export declare function createEmbedDomPassiveViewportProvider(options: ICreateEmbedDomPassiveViewportProviderOptions): IEmbedPassiveViewportProvider;
@@ -0,0 +1,44 @@
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, IEmbedFloatPreviewEntry, IEmbedFloatPreviewProvider, IEmbedFloatPreviewRenderRequest } from '../types/embed-ui';
18
+ import { Subject } from 'rxjs';
19
+ export declare class EmbedFloatPreviewService {
20
+ readonly previewUpdated$: Subject<IEmbedFloatPreviewEntry<unknown>>;
21
+ private readonly _providers;
22
+ private readonly _entriesByEmbedId;
23
+ private readonly _entriesByKey;
24
+ private readonly _queue;
25
+ private _rendering;
26
+ private _activeDrain;
27
+ registerProvider(provider: IEmbedFloatPreviewProvider<any>): IDisposable;
28
+ getProvider(childType: UniverInstanceType): IEmbedFloatPreviewProvider<any> | undefined;
29
+ getPreview(embedId: string): IEmbedFloatPreviewEntry | undefined;
30
+ requestPreview<TViewState = unknown>(request: IEmbedFloatPreviewRenderRequest<TViewState>): IEmbedFloatPreviewEntry<TViewState>;
31
+ collectViewState<TViewState = unknown>(context: IEmbedChildContainerContext): Promise<TViewState | undefined>;
32
+ restoreViewState<TViewState = unknown>(context: IEmbedChildContainerContext, viewState: TViewState | undefined): Promise<void>;
33
+ updateViewState<TViewState = unknown>(embedId: string, viewState: TViewState): void;
34
+ markStale(embedId: string, reason?: string): void;
35
+ invalidate(embedId: string): void;
36
+ getCacheKey(request: IEmbedFloatPreviewRenderRequest): string;
37
+ flushForTests(): Promise<void>;
38
+ dispose(): void;
39
+ private _drainQueue;
40
+ private _runQueue;
41
+ private _renderOne;
42
+ private _findPreviousReadyEntry;
43
+ private _setRenderFailure;
44
+ }
@@ -0,0 +1,26 @@
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 { EmbedFloatingStage, IEmbedFloatingActivation } from '../types/embed-ui';
17
+ export declare class EmbedFloatingActiveService {
18
+ private readonly _active$;
19
+ readonly active$: import("rxjs").Observable<IEmbedFloatingActivation | null>;
20
+ getActive(): IEmbedFloatingActivation | null;
21
+ getStage(embedId: string): EmbedFloatingStage;
22
+ activate(next: IEmbedFloatingActivation, stage?: Exclude<EmbedFloatingStage, 'inactive'>): void;
23
+ setStage(embedId: string, stage: Exclude<EmbedFloatingStage, 'inactive'>): void;
24
+ promote(embedId: string): void;
25
+ clear(embedId?: string): void;
26
+ }
@@ -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 type EmbedFloatingGeometryInvalidationReason = 'host-scroll' | 'child-scroll' | 'resize' | 'stage-change' | 'wheel' | 'manual';
18
+ export interface IEmbedFloatingGeometryInvalidation {
19
+ embedId?: string;
20
+ reason: EmbedFloatingGeometryInvalidationReason;
21
+ }
22
+ export interface IEmbedFloatingGeometryRegistration {
23
+ embedId: string;
24
+ childUnitId?: string;
25
+ root: HTMLElement;
26
+ viewport?: HTMLElement | null;
27
+ contentRoot?: HTMLElement | null;
28
+ }
29
+ export declare class EmbedFloatingGeometryService {
30
+ private readonly _registrations;
31
+ private readonly _geometryInvalidated$;
32
+ readonly geometryInvalidated$: import("rxjs").Observable<IEmbedFloatingGeometryInvalidation>;
33
+ register(registration: IEmbedFloatingGeometryRegistration): IDisposable;
34
+ getRegistration(embedId: string): IEmbedFloatingGeometryRegistration | undefined;
35
+ getRegistrationByChildUnitId(childUnitId: string): IEmbedFloatingGeometryRegistration | undefined;
36
+ invalidate(invalidation: IEmbedFloatingGeometryInvalidation): void;
37
+ }
@@ -0,0 +1,26 @@
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 { EmbedHostEntry } from '@univerjs-pro/embed';
18
+ import type { IEmbedFloatingMenuContribution } from '../types/embed-ui';
19
+ export declare class EmbedFloatingMenuRegistryService {
20
+ private readonly _contributions;
21
+ register(contribution: IEmbedFloatingMenuContribution): IDisposable;
22
+ get(hostType: UniverInstanceType, entry: EmbedHostEntry, childType?: UniverInstanceType): IEmbedFloatingMenuContribution | undefined;
23
+ hasExact(hostType: UniverInstanceType, entry: EmbedHostEntry, childType?: UniverInstanceType): boolean;
24
+ list(): IEmbedFloatingMenuContribution[];
25
+ private _key;
26
+ }
@@ -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 { IEmbedFloatingMenuMountContext } from '../types/embed-ui';
17
+ export declare function resolveEmbedFloatingMenuRoot(context: Pick<IEmbedFloatingMenuMountContext, 'renderScope' | 'runtimeScope'>): HTMLElement;
@@ -0,0 +1,27 @@
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 { IEmbedFullscreenSession } from '../types/embed-ui';
18
+ export declare class EmbedFullscreenService {
19
+ private readonly _session$;
20
+ private readonly _exited$;
21
+ readonly session$: import("rxjs").Observable<IEmbedFullscreenSession | null>;
22
+ readonly exited$: import("rxjs").Observable<IEmbedFullscreenSession>;
23
+ getSession(): IEmbedFullscreenSession | null;
24
+ enter(descriptor: IEmbedDescriptor): IEmbedFullscreenSession;
25
+ exit(embedId?: string): void;
26
+ notifyExited(session: IEmbedFullscreenSession): void;
27
+ }
@@ -0,0 +1,26 @@
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 { EmbedHostEntry } from '@univerjs-pro/embed';
18
+ import type { IEmbedHostContainerContribution } from '../types/embed-ui';
19
+ export declare class EmbedHostContainerRegistryService {
20
+ private readonly _contributions;
21
+ register(contribution: IEmbedHostContainerContribution): void;
22
+ get(hostType: UniverInstanceType, entry: EmbedHostEntry): IEmbedHostContainerContribution | undefined;
23
+ list(): IEmbedHostContainerContribution[];
24
+ supports(hostType: UniverInstanceType, entry: EmbedHostEntry, layout: IEmbedHostContainerContribution['layout']): boolean;
25
+ private _key;
26
+ }
@@ -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 { IEmbedDescriptor, IEmbedLayoutPolicy } from '@univerjs-pro/embed';
17
+ import type { IEmbedHostMenuOverride } from '../types/embed-ui';
18
+ export interface IEmbedHostMenuOverrideActivateOptions {
19
+ layoutPolicy?: IEmbedLayoutPolicy;
20
+ allowPlaceholder?: boolean;
21
+ portalContainer?: HTMLElement | null;
22
+ }
23
+ export declare class EmbedHostMenuOverrideService {
24
+ private readonly _override$;
25
+ readonly override$: import("rxjs").Observable<IEmbedHostMenuOverride | null>;
26
+ getOverride(): IEmbedHostMenuOverride | null;
27
+ activate(descriptor: IEmbedDescriptor, reason: IEmbedHostMenuOverride['reason'], options?: IEmbedHostMenuOverrideActivateOptions): IEmbedHostMenuOverride | null;
28
+ clear(embedId?: string): void;
29
+ }
@@ -0,0 +1,34 @@
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 { ICreateUnitOptions } from '@univerjs/core';
17
+ import type { IEmbedDescriptor, IEmbedDescriptorMaterializeContext, IEmbedHostAnchorRecord } from '@univerjs-pro/embed';
18
+ import { EmbedHostAdapterRegistryService, EmbedHostAnchorModelService, EmbedModelService, EmbedReferencedUnitMaterializeService } from '@univerjs-pro/embed';
19
+ export type { IEmbedDescriptorMaterializeContext } from '@univerjs-pro/embed';
20
+ export interface IEmbedHostRestoreContext {
21
+ descriptor: IEmbedDescriptor;
22
+ hostAnchorRecord?: IEmbedHostAnchorRecord;
23
+ hostContext?: Record<string, unknown>;
24
+ createOptions?: ICreateUnitOptions;
25
+ }
26
+ export declare class EmbedHostRestoreService {
27
+ private readonly _modelService;
28
+ private readonly _materializeService;
29
+ private readonly _hostAdapterRegistry;
30
+ private readonly _anchorModelService;
31
+ constructor(_modelService: EmbedModelService, _materializeService: EmbedReferencedUnitMaterializeService, _hostAdapterRegistry: EmbedHostAdapterRegistryService, _anchorModelService: EmbedHostAnchorModelService);
32
+ materializeDescriptor(context: IEmbedDescriptorMaterializeContext): Promise<IEmbedDescriptor>;
33
+ restoreEmbed(context: IEmbedHostRestoreContext): Promise<IEmbedDescriptor>;
34
+ }