@univerjs-pro/embed-ui 1.0.0-alpha.7 → 1.0.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ar-SA.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/id-ID.js +1 -1
- package/lib/cjs/locale/it-IT.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +1 -1
- package/lib/cjs/locale/pt-BR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ar-SA.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/id-ID.js +1 -1
- package/lib/es/locale/it-IT.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +1 -1
- package/lib/es/locale/pt-BR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/index.css +0 -49
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +1 -1
- package/lib/locale/it-IT.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -1
- package/lib/locale/pt-BR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/common/embed-float-interaction-policy.d.ts +0 -2
- package/lib/types/common/embed-overlay-layers.d.ts +4 -0
- package/lib/types/components/EmbedFloatDomRenderer.d.ts +4 -1
- package/lib/types/products/bases/EmbedChildView.d.ts +5 -2
- package/lib/types/products/sheets/EmbedBlock.d.ts +4 -1
- package/lib/types/products/sheets/register.d.ts +1 -1
- package/lib/types/products/slides/EmbedChildView.d.ts +5 -1
- package/lib/types/services/embed-display-target-sync.d.ts +6 -0
- package/lib/types/services/embed-floating-menu-root.d.ts +4 -0
- package/lib/types/types/embed-ui.d.ts +1 -0
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +35 -33
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { EmbedFloatingStage, EmbedInteractionFlow } from '../types/embed-ui';
|
|
2
2
|
export interface IEmbedFloatInteractionPolicy {
|
|
3
3
|
allowHostBodyDrag: boolean;
|
|
4
|
-
allowHostDragHandle: boolean;
|
|
5
4
|
disableLiveHostPointerEvents: boolean;
|
|
6
5
|
passThroughInteractionGate: boolean;
|
|
7
6
|
runtimeOwnsInteraction: boolean;
|
|
8
|
-
showHostDragHandle: boolean;
|
|
9
7
|
}
|
|
10
8
|
export declare function resolveEmbedFloatInteractionPolicy(params: {
|
|
11
9
|
stage: EmbedFloatingStage;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Embed chrome sits above the embedded block while remaining below product overlays. */
|
|
2
|
+
export declare const EMBED_CHROME_Z_INDEX = 800;
|
|
3
|
+
/** Fullscreen covers other embed chrome while remaining below product overlays. */
|
|
4
|
+
export declare const EMBED_FULLSCREEN_Z_INDEX = 810;
|
|
@@ -55,10 +55,13 @@ export declare function EmbedFloatDomRenderer(props: {
|
|
|
55
55
|
resolveHostWheelGestureRoot?: (container: HTMLElement) => HTMLElement | null | undefined;
|
|
56
56
|
isExternalHostInteraction?: (event: PointerEvent) => boolean;
|
|
57
57
|
}): import("react").JSX.Element;
|
|
58
|
+
export declare function resetEmbedChromeLayoutStyles(chrome: HTMLElement): void;
|
|
59
|
+
export declare function isPointInsideFloatBlock(container: HTMLElement, event: MouseEvent): boolean;
|
|
58
60
|
export declare function syncRuntimeInteractionVisibility(container: HTMLElement, chrome: HTMLElement | undefined, visible: boolean, _stage: 'inactive' | 'stage1' | 'stage2'): void;
|
|
59
|
-
export declare function syncChromeControlsVisibility(container: HTMLElement, chrome: HTMLElement | undefined, visible: boolean,
|
|
61
|
+
export declare function syncChromeControlsVisibility(container: HTMLElement, chrome: HTMLElement | undefined, visible: boolean, stage: 'inactive' | 'stage1' | 'stage2'): void;
|
|
60
62
|
export declare function syncDocsSheetLikeChromePageArea(chrome: HTMLElement, chromeRect: DOMRect, pageRect: DOMRect): void;
|
|
61
63
|
export declare function resolveChromeAnchorRect(container: HTMLElement): DOMRect;
|
|
64
|
+
export declare function shouldRouteUnhandledWheelToHost(event: WheelEvent): boolean;
|
|
62
65
|
export declare function registerEmbedStage2LayoutContainers(layoutService: Pick<ILayoutService, 'checkElementInCurrentContainers' | 'registerContainerElement'>, focusCoordinator: Pick<EmbedRuntimeFocusCoordinator, 'listElements' | 'runtimeFocusChanged$'>, embedId: string | undefined, container: HTMLElement | null, stage: EmbedFloatingStage): IDisposable | undefined;
|
|
63
66
|
export declare function shouldAcquireOwnedInteractionPointerLease(options: {
|
|
64
67
|
stage: EmbedFloatingStage;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import type { IUniverBaseUIConfig } from '@univerjs-pro/bases-ui';
|
|
2
|
+
import type { EmbedDisplayTarget, IEmbedBaseDisplayTarget } from '@univerjs-pro/embed';
|
|
2
3
|
import type { BaseDataModel, Injector } from '@univerjs/core';
|
|
3
4
|
import type { IEmbedChildContainerContext, IEmbedChildViewContribution } from '../../types/embed-ui';
|
|
4
5
|
import { BaseEditorService, BaseUIPopupService, BaseUIStateService, IBaseUIPopupService, IBaseViewWheelScrollService } from '@univerjs-pro/bases-ui';
|
|
6
|
+
import { ICommandService } from '@univerjs/core';
|
|
5
7
|
export type BaseEmbedChromeMode = 'workbench' | 'content-only' | 'fullscreen';
|
|
6
|
-
export declare function createBasesEmbedChildViewContribution(): IEmbedChildViewContribution;
|
|
8
|
+
export declare function createBasesEmbedChildViewContribution(commandService: ICommandService): IEmbedChildViewContribution;
|
|
7
9
|
export declare function isBaseCanvasRootReady(canvasRoot: HTMLElement | null): canvasRoot is HTMLElement;
|
|
8
10
|
export declare function shouldActivateBasesEmbedRender(_context: Pick<IEmbedChildContainerContext, 'renderScope'>): boolean;
|
|
9
11
|
export declare function createBasesEmbedChildUnitScopedInjector(context: IEmbedChildContainerContext, baseStateService: BaseUIStateService, basePopupService: IBaseUIPopupService, baseEditorService: BaseEditorService): Injector | undefined;
|
|
10
|
-
export declare function initializeBasesEmbedState(stateService: BaseUIStateService, childUnit: BaseDataModel, chromeMode?: BaseEmbedChromeMode): void;
|
|
12
|
+
export declare function initializeBasesEmbedState(stateService: BaseUIStateService, childUnit: BaseDataModel, chromeMode?: BaseEmbedChromeMode, displayTarget?: EmbedDisplayTarget): void;
|
|
13
|
+
export declare function resolveBasesDisplayTarget(childUnit: BaseDataModel, displayTarget?: EmbedDisplayTarget): IEmbedBaseDisplayTarget;
|
|
11
14
|
export declare function resolveBasesEmbedChromeMode(context: Pick<IEmbedChildContainerContext, 'renderScope'>): BaseEmbedChromeMode;
|
|
12
15
|
export declare function createBasesEmbedScopedInjector(rootInjector: Injector, childScopedInjector: Injector, baseStateService: BaseUIStateService, basePopupService?: BaseUIPopupService, baseEditorService?: BaseEditorService, chromeMode?: BaseEmbedChromeMode, baseWheelScrollService?: IBaseViewWheelScrollService, readOnly?: boolean, globalPortalContainer?: HTMLElement | null): Injector;
|
|
13
16
|
export declare function resolveEmbeddedBaseUIConfig(baseConfig: IUniverBaseUIConfig, chromeMode?: BaseEmbedChromeMode): IUniverBaseUIConfig;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import type { EmbedDisplayTarget } from '@univerjs-pro/embed';
|
|
2
|
+
import type { ICommandService, Workbook } from '@univerjs/core';
|
|
1
3
|
import type { IEmbedBlockContribution, IEmbedChildContainerContext, IEmbedChildViewContribution } from '../../types/embed-ui';
|
|
2
4
|
export declare function createSheetsEmbedBlockContribution(): IEmbedBlockContribution;
|
|
3
|
-
export declare function createSheetsEmbedChildViewContribution(): IEmbedChildViewContribution;
|
|
5
|
+
export declare function createSheetsEmbedChildViewContribution(commandService: ICommandService): IEmbedChildViewContribution;
|
|
6
|
+
export declare function applySheetDisplayTarget(workbook: Workbook, target: EmbedDisplayTarget | undefined): void;
|
|
4
7
|
export declare function shouldShowEmbeddedSheetChrome(context: Pick<IEmbedChildContainerContext, 'renderScope'>): boolean;
|
|
5
8
|
export declare function applyEmbeddedSheetChromeInset(canvasRoot: HTMLElement, chrome: {
|
|
6
9
|
formulaBar: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Injector } from '@univerjs/core';
|
|
2
1
|
import { EmbedModelService } from '@univerjs-pro/embed';
|
|
2
|
+
import { type Injector } from '@univerjs/core';
|
|
3
3
|
import { ISheetEmbedRuntimeService } from '@univerjs/sheets-ui';
|
|
4
4
|
import { CanvasFloatDomPreviewService } from '@univerjs/ui';
|
|
5
5
|
import { Subscription } from 'rxjs';
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import type { EmbedDisplayTarget } from '@univerjs-pro/embed';
|
|
2
|
+
import type { SlideModel } from '@univerjs-pro/slides';
|
|
1
3
|
import type { IEmbedChildContainerContext, IEmbedChildViewContribution } from '../../types/embed-ui';
|
|
2
|
-
|
|
4
|
+
import { type ICommandService } from '@univerjs/core';
|
|
5
|
+
export declare function createSlidesEmbedChildViewContribution(commandService: ICommandService): IEmbedChildViewContribution;
|
|
6
|
+
export declare function applySlideDisplayTarget(slide: SlideModel, target: EmbedDisplayTarget | undefined): void;
|
|
3
7
|
export declare function shouldUseSlideEmbedFloatingPreview(context: Pick<IEmbedChildContainerContext, 'layout' | 'renderScope'>): boolean;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IEmbedChildContainerContext } from '../types/embed-ui';
|
|
2
|
+
import { type EmbedDisplayTarget } from '@univerjs-pro/embed';
|
|
3
|
+
import { type ICommandService, type IDisposable } from '@univerjs/core';
|
|
4
|
+
type ApplyEmbedDisplayTarget = (target: EmbedDisplayTarget | undefined) => void;
|
|
5
|
+
export declare function registerEmbedDisplayTargetSync(context: Pick<IEmbedChildContainerContext, 'descriptor' | 'embedId' | 'hostUnitId'>, commandService: ICommandService, applyTarget: ApplyEmbedDisplayTarget): IDisposable;
|
|
6
|
+
export {};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import type { IEmbedFloatingMenuMountContext } from '../types/embed-ui';
|
|
2
2
|
export declare function resolveEmbedFloatingMenuRoot(context: Pick<IEmbedFloatingMenuMountContext, 'embedId' | 'renderScope' | 'runtimeScope'>): HTMLElement;
|
|
3
|
+
export declare function createEmbedFloatingMenuContainer(context: IEmbedFloatingMenuMountContext): {
|
|
4
|
+
root: HTMLElement;
|
|
5
|
+
menu: HTMLDivElement;
|
|
6
|
+
};
|
|
@@ -92,6 +92,7 @@ export interface IEmbedHostContainerContribution {
|
|
|
92
92
|
export interface IEmbedChildViewContribution {
|
|
93
93
|
childType: UniverInstanceType;
|
|
94
94
|
supportedLayouts: EmbedLayout[];
|
|
95
|
+
canvasRootClassName?: string;
|
|
95
96
|
beforeDeactivate?: (context: IEmbedChildContainerContext) => void;
|
|
96
97
|
mount?: (context: IEmbedChildContainerContext) => IDisposable | void;
|
|
97
98
|
}
|