@univerjs-pro/slides-ui 1.0.0-alpha.1 → 1.0.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/README.md +5 -2
  2. package/lib/cjs/index.js +1 -1
  3. package/lib/cjs/locale/ar-SA.js +1 -1
  4. package/lib/cjs/locale/ca-ES.js +1 -1
  5. package/lib/cjs/locale/de-DE.js +1 -1
  6. package/lib/cjs/locale/en-US.js +1 -1
  7. package/lib/cjs/locale/es-ES.js +1 -1
  8. package/lib/cjs/locale/fa-IR.js +1 -1
  9. package/lib/cjs/locale/fr-FR.js +1 -1
  10. package/lib/cjs/locale/id-ID.js +1 -1
  11. package/lib/cjs/locale/it-IT.js +1 -1
  12. package/lib/cjs/locale/ja-JP.js +1 -1
  13. package/lib/cjs/locale/ko-KR.js +1 -1
  14. package/lib/cjs/locale/pl-PL.js +1 -1
  15. package/lib/cjs/locale/pt-BR.js +1 -1
  16. package/lib/cjs/locale/ru-RU.js +1 -1
  17. package/lib/cjs/locale/sk-SK.js +1 -1
  18. package/lib/cjs/locale/vi-VN.js +1 -1
  19. package/lib/cjs/locale/zh-CN.js +1 -1
  20. package/lib/cjs/locale/zh-HK.js +1 -1
  21. package/lib/cjs/locale/zh-TW.js +1 -1
  22. package/lib/es/index.js +1 -1
  23. package/lib/es/locale/ar-SA.js +1 -1
  24. package/lib/es/locale/ca-ES.js +1 -1
  25. package/lib/es/locale/de-DE.js +1 -1
  26. package/lib/es/locale/en-US.js +1 -1
  27. package/lib/es/locale/es-ES.js +1 -1
  28. package/lib/es/locale/fa-IR.js +1 -1
  29. package/lib/es/locale/fr-FR.js +1 -1
  30. package/lib/es/locale/id-ID.js +1 -1
  31. package/lib/es/locale/it-IT.js +1 -1
  32. package/lib/es/locale/ja-JP.js +1 -1
  33. package/lib/es/locale/ko-KR.js +1 -1
  34. package/lib/es/locale/pl-PL.js +1 -1
  35. package/lib/es/locale/pt-BR.js +1 -1
  36. package/lib/es/locale/ru-RU.js +1 -1
  37. package/lib/es/locale/sk-SK.js +1 -1
  38. package/lib/es/locale/vi-VN.js +1 -1
  39. package/lib/es/locale/zh-CN.js +1 -1
  40. package/lib/es/locale/zh-HK.js +1 -1
  41. package/lib/es/locale/zh-TW.js +1 -1
  42. package/lib/index.css +157 -115
  43. package/lib/index.js +1 -1
  44. package/lib/locale/ar-SA.js +1 -1
  45. package/lib/locale/ca-ES.js +1 -1
  46. package/lib/locale/de-DE.js +1 -1
  47. package/lib/locale/en-US.js +1 -1
  48. package/lib/locale/es-ES.js +1 -1
  49. package/lib/locale/fa-IR.js +1 -1
  50. package/lib/locale/fr-FR.js +1 -1
  51. package/lib/locale/id-ID.js +1 -1
  52. package/lib/locale/it-IT.js +1 -1
  53. package/lib/locale/ja-JP.js +1 -1
  54. package/lib/locale/ko-KR.js +1 -1
  55. package/lib/locale/pl-PL.js +1 -1
  56. package/lib/locale/pt-BR.js +1 -1
  57. package/lib/locale/ru-RU.js +1 -1
  58. package/lib/locale/sk-SK.js +1 -1
  59. package/lib/locale/vi-VN.js +1 -1
  60. package/lib/locale/zh-CN.js +1 -1
  61. package/lib/locale/zh-HK.js +1 -1
  62. package/lib/locale/zh-TW.js +1 -1
  63. package/lib/types/components/canvas-view/CanvasView.d.ts +141 -3
  64. package/lib/types/components/editor-content/EditorContent.d.ts +4 -1
  65. package/lib/types/components/embed-child-workbench/SlideEmbedChildWorkbench.d.ts +8 -0
  66. package/lib/types/components/embed-floating-menu/SlideEmbedFloatingMenu.d.ts +43 -0
  67. package/lib/types/components/embed-floating-preview/SlideEmbedFloatingPreview.d.ts +24 -0
  68. package/lib/types/components/embed-floating-preview/SlideEmbedFloatingPreview.spec.d.ts +4 -0
  69. package/lib/types/components/host-ui/SlideHostUiParts.d.ts +7 -0
  70. package/lib/types/components/insert-toolbar/ShapePicker.d.ts +5 -10
  71. package/lib/types/components/object-list-panel/SlideObjectListPanel.d.ts +1 -1
  72. package/lib/types/components/object-list-panel/slide-object-list-state.d.ts +1 -0
  73. package/lib/types/components/presentation/SlidePresentationEmbedLayer.d.ts +34 -0
  74. package/lib/types/components/table-size/SlideTableSizePicker.d.ts +2 -12
  75. package/lib/types/components/thumbnail-bar/ThumbnailBar.d.ts +21 -0
  76. package/lib/types/controllers/slide-connector-endpoint.controller.d.ts +1 -1
  77. package/lib/types/controllers/slide-contextual-ribbon.controller.d.ts +10 -1
  78. package/lib/types/controllers/slide-drawing-selection.controller.d.ts +15 -3
  79. package/lib/types/controllers/slide-drawing-transform.controller.d.ts +3 -0
  80. package/lib/types/controllers/slide-drawing-transformer-config.util.d.ts +3 -1
  81. package/lib/types/controllers/slide-image-cropper.controller.d.ts +20 -1
  82. package/lib/types/controllers/slide-render.controller.d.ts +2 -0
  83. package/lib/types/default-config.d.ts +2 -2
  84. package/lib/types/embed-active-page.d.ts +5 -0
  85. package/lib/types/embed-floating-menu-stage.d.ts +14 -0
  86. package/lib/types/embed-focus-owner.d.ts +40 -0
  87. package/lib/types/index.d.ts +30 -7
  88. package/lib/types/locale/en-US.d.ts +6 -203
  89. package/lib/types/quick-styles/presets.d.ts +4 -3
  90. package/lib/types/render-objects/document-text-render.util.d.ts +6 -0
  91. package/lib/types/render-objects/index.d.ts +1 -0
  92. package/lib/types/render-objects/placeholder-object/index.d.ts +1 -0
  93. package/lib/types/render-objects/placeholder-object/placeholder-text-rect.util.d.ts +7 -0
  94. package/lib/types/render-objects/slide-drawing-base.d.ts +1 -3
  95. package/lib/types/render-objects/slide-image-object.d.ts +2 -2
  96. package/lib/types/render-objects/slide-page-background-object.d.ts +4 -1
  97. package/lib/types/render-objects/slide-shape-object.d.ts +2 -1
  98. package/lib/types/render-objects/slide-table-object.d.ts +9 -4
  99. package/lib/types/services/slide-canvas-pop-manager.service.d.ts +2 -1
  100. package/lib/types/services/slide-embed-integration.service.d.ts +45 -0
  101. package/lib/types/services/slide-embed-runtime.service.d.ts +50 -0
  102. package/lib/types/services/slide-hit-test.service.d.ts +2 -0
  103. package/lib/types/services/slide-insert.service.d.ts +8 -6
  104. package/lib/types/slide-editor/editor-ui/index.d.ts +1 -1
  105. package/lib/types/slide-editor/editor-ui/utils/render.d.ts +12 -3
  106. package/lib/types/slide-editor/services/slide-text-editing.service.d.ts +3 -1
  107. package/lib/types/slide-editor/views/shape-floating-toolbar/ShapeFloatingToolbar.d.ts +1 -1
  108. package/lib/types/utils/shape-text-style.util.d.ts +9 -5
  109. package/lib/types/views/render/adaptors/image-adaptor.d.ts +3 -3
  110. package/lib/types/views/render/adaptors/placeholder-adaptor.d.ts +1 -2
  111. package/lib/types/views/render/adaptors/shape-adaptor.d.ts +1 -2
  112. package/lib/types/views/render/adaptors/table-adaptor.d.ts +3 -3
  113. package/lib/umd/index.js +1 -1
  114. package/lib/umd/locale/ar-SA.js +1 -1
  115. package/lib/umd/locale/ca-ES.js +1 -1
  116. package/lib/umd/locale/de-DE.js +1 -1
  117. package/lib/umd/locale/en-US.js +1 -1
  118. package/lib/umd/locale/es-ES.js +1 -1
  119. package/lib/umd/locale/fa-IR.js +1 -1
  120. package/lib/umd/locale/fr-FR.js +1 -1
  121. package/lib/umd/locale/id-ID.js +1 -1
  122. package/lib/umd/locale/it-IT.js +1 -1
  123. package/lib/umd/locale/ja-JP.js +1 -1
  124. package/lib/umd/locale/ko-KR.js +1 -1
  125. package/lib/umd/locale/pl-PL.js +1 -1
  126. package/lib/umd/locale/pt-BR.js +1 -1
  127. package/lib/umd/locale/ru-RU.js +1 -1
  128. package/lib/umd/locale/sk-SK.js +1 -1
  129. package/lib/umd/locale/vi-VN.js +1 -1
  130. package/lib/umd/locale/zh-CN.js +1 -1
  131. package/lib/umd/locale/zh-HK.js +1 -1
  132. package/lib/umd/locale/zh-TW.js +1 -1
  133. package/package.json +18 -19
  134. package/lib/types/components/shape-picker/shapes.d.ts +0 -34
  135. package/lib/types/slide-editor/views/shape-text-editor/ShapeTextFloatToolbar.d.ts +0 -1
@@ -273,6 +273,12 @@ declare const locale: {
273
273
  moveBackward: string;
274
274
  nameInput: string;
275
275
  empty: string;
276
+ close: string;
277
+ name: string;
278
+ description: string;
279
+ descriptionPlaceholder: string;
280
+ details: string;
281
+ noSelection: string;
276
282
  };
277
283
  backgroundPanel: {
278
284
  title: string;
@@ -361,209 +367,6 @@ declare const locale: {
361
367
  speakerNotesSave: string;
362
368
  speakerNotesCancel: string;
363
369
  };
364
- shape: {
365
- group: {
366
- line: string;
367
- rectangle: string;
368
- basicShape: string;
369
- blockArrow: string;
370
- equationShape: string;
371
- flowchart: string;
372
- starAndBanner: string;
373
- callout: string;
374
- other: string;
375
- };
376
- type: {
377
- line: string;
378
- 'straight-connector1': string;
379
- 'straight-connector2': string;
380
- 'bent-connector3': string;
381
- 'bent-connector3-arrow1': string;
382
- 'bent-connector3-arrow2': string;
383
- 'curved-connector3': string;
384
- 'curved-connector3-arrow1': string;
385
- 'curved-connector3-arrow2': string;
386
- rect: string;
387
- 'round-rect': string;
388
- 'snip1-rect': string;
389
- 'snip2-same-rect': string;
390
- 'snip2-diag-rect': string;
391
- 'snip-round-rect': string;
392
- 'round1-rect': string;
393
- 'round2-same-rect': string;
394
- 'round2-diag-rect': string;
395
- 'rect-textbox-horizontal': string;
396
- 'rect-textbox-vertical': string;
397
- ellipse: string;
398
- triangle: string;
399
- 'rt-triangle': string;
400
- parallelogram: string;
401
- trapezoid: string;
402
- 'non-isosceles-trapezoid': string;
403
- diamond: string;
404
- pentagon: string;
405
- hexagon: string;
406
- heptagon: string;
407
- octagon: string;
408
- decagon: string;
409
- dodecagon: string;
410
- pie: string;
411
- chord: string;
412
- teardrop: string;
413
- frame: string;
414
- 'half-frame': string;
415
- corner: string;
416
- 'diag-stripe': string;
417
- plus: string;
418
- plaque: string;
419
- can: string;
420
- cube: string;
421
- bevel: string;
422
- donut: string;
423
- 'no-smoking': string;
424
- 'block-arc': string;
425
- 'folder-corner': string;
426
- 'smiley-face': string;
427
- heart: string;
428
- 'lightning-bolt': string;
429
- sun: string;
430
- moon: string;
431
- cloud: string;
432
- arc: string;
433
- 'bracket-pair': string;
434
- 'brace-pair': string;
435
- 'left-bracket': string;
436
- 'right-bracket': string;
437
- 'left-brace': string;
438
- 'right-brace': string;
439
- 'right-arrow': string;
440
- 'left-arrow': string;
441
- 'up-arrow': string;
442
- 'down-arrow': string;
443
- 'left-right-arrow': string;
444
- 'up-down-arrow': string;
445
- 'quad-arrow': string;
446
- 'left-right-up-arrow': string;
447
- 'bent-arrow': string;
448
- 'uturn-arrow': string;
449
- 'left-up-arrow': string;
450
- 'bent-up-arrow': string;
451
- 'curved-right-arrow': string;
452
- 'curved-left-arrow': string;
453
- 'curved-up-arrow': string;
454
- 'curved-down-arrow': string;
455
- 'striped-right-arrow': string;
456
- 'notched-right-arrow': string;
457
- 'home-plate': string;
458
- chevron: string;
459
- 'right-arrow-callout': string;
460
- 'down-arrow-callout': string;
461
- 'left-arrow-callout': string;
462
- 'up-arrow-callout': string;
463
- 'left-right-arrow-callout': string;
464
- 'quad-arrow-callout': string;
465
- 'circular-arrow': string;
466
- 'math-plus': string;
467
- 'math-minus': string;
468
- 'math-multiply': string;
469
- 'math-divide': string;
470
- 'math-equal': string;
471
- 'math-not-equal': string;
472
- 'flow-chart-process': string;
473
- 'flow-chart-alternate-process': string;
474
- 'flow-chart-decision': string;
475
- 'flow-chart-input-output': string;
476
- 'flow-chart-predefined-process': string;
477
- 'flow-chart-internal-storage': string;
478
- 'flow-chart-document': string;
479
- 'flow-chart-multidocument': string;
480
- 'flow-chart-terminator': string;
481
- 'flow-chart-preparation': string;
482
- 'flow-chart-manual-input': string;
483
- 'flow-chart-manual-operation': string;
484
- 'flow-chart-connector': string;
485
- 'flow-chart-offpage-connector': string;
486
- 'flow-chart-punched-card': string;
487
- 'flow-chart-punched-tape': string;
488
- 'flow-chart-summing-junction': string;
489
- 'flow-chart-or': string;
490
- 'flow-chart-collate': string;
491
- 'flow-chart-sort': string;
492
- 'flow-chart-extract': string;
493
- 'flow-chart-merge': string;
494
- 'flow-chart-online-storage': string;
495
- 'flow-chart-delay': string;
496
- 'flow-chart-magnetic-tape': string;
497
- 'flow-chart-magnetic-disk': string;
498
- 'flow-chart-magnetic-drum': string;
499
- 'flow-chart-display': string;
500
- 'irregular-seal1': string;
501
- 'irregular-seal2': string;
502
- star4: string;
503
- star5: string;
504
- star6: string;
505
- star7: string;
506
- star8: string;
507
- star10: string;
508
- star12: string;
509
- star16: string;
510
- star24: string;
511
- star32: string;
512
- ribbon2: string;
513
- ribbon: string;
514
- 'ellipse-ribbon2': string;
515
- 'ellipse-ribbon': string;
516
- 'vertical-scroll': string;
517
- 'horizontal-scroll': string;
518
- wave: string;
519
- 'double-wave': string;
520
- 'wedge-rect-callout': string;
521
- 'wedge-round-rect-callout': string;
522
- 'wedge-ellipse-callout': string;
523
- 'cloud-callout': string;
524
- 'border-callout1': string;
525
- 'border-callout2': string;
526
- 'border-callout3': string;
527
- 'accent-callout1': string;
528
- 'accent-callout2': string;
529
- 'accent-callout3': string;
530
- callout1: string;
531
- callout2: string;
532
- callout3: string;
533
- 'accent-border-callout1': string;
534
- 'accent-border-callout2': string;
535
- 'accent-border-callout3': string;
536
- 'left-circular-arrow': string;
537
- 'left-right-circular-arrow': string;
538
- 'swoosh-arrow': string;
539
- 'left-right-ribbon': string;
540
- 'pie-wedge': string;
541
- funnel: string;
542
- gear6: string;
543
- gear9: string;
544
- 'corner-tabs': string;
545
- 'action-button-back-previous': string;
546
- 'action-button-forward-next': string;
547
- 'action-button-beginning': string;
548
- 'action-button-end': string;
549
- 'action-button-home': string;
550
- 'action-button-information': string;
551
- 'action-button-return': string;
552
- 'action-button-movie': string;
553
- 'action-button-document': string;
554
- 'action-button-sound': string;
555
- 'action-button-help': string;
556
- 'action-button-blank': string;
557
- 'chart-plus': string;
558
- 'chart-star': string;
559
- 'chart-x': string;
560
- 'flow-chart-offline-storage': string;
561
- 'line-inv': string;
562
- 'plaque-tabs': string;
563
- 'square-tabs': string;
564
- 'up-down-arrow-callout': string;
565
- };
566
- };
567
370
  slide: {
568
371
  placeholder: {
569
372
  text: {
@@ -1,12 +1,13 @@
1
1
  import type { IBasicShapeData, ICxnShapeData, IShapeLineStyle } from '@univerjs-pro/engine-shape';
2
2
  import type { ISlideTextStyle } from '@univerjs-pro/slides';
3
+ import type { LocaleKey } from '../locale/types';
3
4
  export type SlideQuickStyleType = 'shape' | 'line' | 'text';
4
- interface ISlideQuickStylePresetBase {
5
+ interface ISlideQuickStylePresetBase<TLabelKey extends string = LocaleKey> {
5
6
  id: string;
6
- labelKey: string;
7
+ labelKey: TLabelKey;
7
8
  type: SlideQuickStyleType;
8
9
  }
9
- export interface ISlideShapeQuickStylePreset extends ISlideQuickStylePresetBase {
10
+ export interface ISlideShapeQuickStylePreset extends ISlideQuickStylePresetBase<`slides-ui.quickStyles.presets.shape.${string}`> {
10
11
  type: 'shape';
11
12
  fill: IBasicShapeData['fill'];
12
13
  stroke: IShapeLineStyle;
@@ -17,11 +17,17 @@ interface IRenderDocumentTextOptions {
17
17
  wrapStrategy?: WrapStrategy;
18
18
  shapeTextOpticalVerticalAlign?: BooleanNumber | boolean;
19
19
  clip?: boolean;
20
+ sourceTop?: number;
21
+ viewportHeight?: number;
20
22
  }
23
+ type IPreparedDocumentTextRenderOptions = IRenderDocumentTextOptions & {
24
+ documentData: IDocumentData;
25
+ };
21
26
  export interface IDocumentTextRenderCache {
22
27
  signature?: string;
23
28
  resources?: IEditorUIDocumentRenderResources;
24
29
  }
25
30
  export declare function disposeTextDocumentRenderCache(cache?: IDocumentTextRenderCache): void;
26
31
  export declare function renderTextWithDocumentModel(ctx: UniverRenderingContext, options: IRenderDocumentTextOptions, cache?: IDocumentTextRenderCache): boolean;
32
+ export declare function renderPreparedTextWithDocumentModel(ctx: UniverRenderingContext, options: IPreparedDocumentTextRenderOptions, cache?: IDocumentTextRenderCache): boolean;
27
33
  export {};
@@ -1,6 +1,7 @@
1
1
  export type { ISlidePlaceholderRenderIcon, ISlidePlaceholderRenderProps, ISlidePlaceholderRenderText, } from './placeholder-object';
2
2
  export { SlidePlaceholderBaseObject } from './placeholder-object';
3
3
  export { SlidePlaceholderIconObject } from './placeholder-object';
4
+ export { resolveSlidePlaceholderTextRect, SLIDE_PLACEHOLDER_TEXT_HORIZONTAL_INSET, SLIDE_PLACEHOLDER_TEXT_VERTICAL_INSET, } from './placeholder-object';
4
5
  export { SlidePlaceholderTextObject } from './placeholder-object';
5
6
  export { SlideChartDrawing } from './slide-chart-drawing';
6
7
  export { SlideConnectorDrawing } from './slide-connector-drawing';
@@ -1,4 +1,5 @@
1
1
  export type { ISlidePlaceholderRenderIcon, ISlidePlaceholderRenderProps, ISlidePlaceholderRenderText, } from './base-placeholder-object';
2
2
  export { SlidePlaceholderBaseObject } from './base-placeholder-object';
3
3
  export { SlidePlaceholderIconObject } from './icon-placeholder-object';
4
+ export { resolveSlidePlaceholderTextRect, SLIDE_PLACEHOLDER_TEXT_HORIZONTAL_INSET, SLIDE_PLACEHOLDER_TEXT_VERTICAL_INSET, } from './placeholder-text-rect.util';
4
5
  export { SlidePlaceholderTextObject } from './text-placeholder-object';
@@ -0,0 +1,7 @@
1
+ import type { IShapeRect } from '@univerjs-pro/engine-shape';
2
+ export declare const SLIDE_PLACEHOLDER_TEXT_HORIZONTAL_INSET = 12;
3
+ export declare const SLIDE_PLACEHOLDER_TEXT_VERTICAL_INSET: number;
4
+ export declare function resolveSlidePlaceholderTextRect(width: number, height: number, options?: {
5
+ horizontalInset?: number;
6
+ verticalInset?: number;
7
+ }): IShapeRect;
@@ -27,9 +27,7 @@ export declare abstract class SlideDrawingBase<T extends ISlideElementBase = ISl
27
27
  updateTransform(transform: Partial<ISlideDrawingTransform>): void;
28
28
  isVisible(): boolean;
29
29
  setVisible(visible: boolean): void;
30
- isLocked(): boolean;
31
- setLocked(locked: boolean): void;
32
- /** Selectable when not locked and `selectable` is not explicitly false. */
30
+ /** Selectable when `selectable` is not explicitly false. */
33
31
  isSelectable(): boolean;
34
32
  /** Emit the current snapshot without any mutation (forces re-render). */
35
33
  protected _emit(): void;
@@ -1,8 +1,8 @@
1
1
  import type { ISlideConnectionSite } from '@univerjs-pro/slides';
2
- import type { IImageIoService } from '@univerjs/drawing';
2
+ import type { IImageIoService } from '@univerjs/core';
3
3
  import type { IImageProps, IViewportInfo, UniverRenderingContext } from '@univerjs/engine-render';
4
4
  import { SlidePresentationBackgroundGraphicFitEnum } from '@univerjs-pro/slides';
5
- import { ImageSourceType } from '@univerjs/drawing';
5
+ import { ImageSourceType } from '@univerjs/core';
6
6
  import { Image } from '@univerjs/engine-render';
7
7
  export interface ISlideImageObjectProps extends IImageProps {
8
8
  backgroundImageFit?: SlidePresentationBackgroundGraphicFitEnum;
@@ -1,6 +1,6 @@
1
1
  import type { ISlideBackgroundData } from '@univerjs-pro/slides';
2
2
  import type { IViewportInfo, UniverRenderingContext } from '@univerjs/engine-render';
3
- import { IImageIoService } from '@univerjs/drawing';
3
+ import { IImageIoService } from '@univerjs/core';
4
4
  import { Rect } from '@univerjs/engine-render';
5
5
  interface ISlidePageBackgroundObjectProps {
6
6
  left: number;
@@ -26,7 +26,10 @@ export declare class SlidePageBackgroundObject extends Rect<ISlidePageBackground
26
26
  private _markImageReady;
27
27
  private _createImagePromise;
28
28
  private _drawImage;
29
+ private _drawRepeatedImage;
29
30
  private _createGradient;
31
+ private _resolveGradientStops;
32
+ private _interpolateGradientStopSegment;
30
33
  private _createPattern;
31
34
  private _withAlpha;
32
35
  private _normalizeColor;
@@ -42,6 +42,7 @@ export declare class SlideShapeObject extends Shape<ISlideShapeObjectProps> {
42
42
  updateElement(element: ISlideShapeElement): void;
43
43
  getElement(): ISlideShapeElement;
44
44
  getShapeModel(): ShapeModel;
45
+ measureTextBoxNaturalCrossSize(width: number, height: number): number | null;
45
46
  isLineShape(): boolean;
46
47
  /**
47
48
  * Returns the text rect in top-left-origin coordinates `{ 0, 0, w, h }` space.
@@ -53,7 +54,7 @@ export declare class SlideShapeObject extends Shape<ISlideShapeObjectProps> {
53
54
  getTextRect(width: number, height: number): IShapeRect;
54
55
  setEditing(isEditing: boolean): void;
55
56
  setFillImage(image?: HTMLImageElement): void;
56
- private _applyNoWrapAutoFitWidth;
57
+ private _applyNoWrapAutoFitSize;
57
58
  _draw(ctx: UniverRenderingContext, _bounds?: IViewportInfo, renderWidth?: number, renderHeight?: number): void;
58
59
  private _drawShapeText;
59
60
  private _applyReadableTextFlip;
@@ -1,13 +1,14 @@
1
1
  import type { ISlideConnectionSite } from '@univerjs-pro/slides';
2
- import type { ISlideTableCellRange, ISlideTableSnapshot, ISlideTableTrigger } from '@univerjs-pro/slides-table';
3
- import type { LocaleService } from '@univerjs/core';
4
- import type { IImageIoService } from '@univerjs/drawing';
2
+ import type { ISlideTableCellRange, ISlideTableSnapshot, ISlideTableThemePalette, ISlideTableThemeSnapshot, ISlideTableTrigger } from '@univerjs-pro/slides-table';
3
+ import type { IImageIoService, LocaleService } from '@univerjs/core';
5
4
  import type { IRectProps, IViewportInfo, UniverRenderingContext, Vector2 } from '@univerjs/engine-render';
6
5
  import { Rect } from '@univerjs/engine-render';
7
6
  export interface ISlideTableObjectProps extends IRectProps {
8
7
  table?: ISlideTableSnapshot;
9
8
  imageIoService?: IImageIoService;
10
9
  localeService?: LocaleService;
10
+ tableThemes?: Record<string, ISlideTableThemeSnapshot>;
11
+ tableThemePalette?: ISlideTableThemePalette;
11
12
  }
12
13
  export interface ISlideTableCellTextRect {
13
14
  left: number;
@@ -57,6 +58,8 @@ export declare class SlideTableObject extends Rect<ISlideTableObjectProps> {
57
58
  private readonly _table?;
58
59
  private readonly _imageIoService?;
59
60
  private readonly _localeService?;
61
+ private readonly _tableThemes?;
62
+ private readonly _tableThemePalette?;
60
63
  private readonly _textRenderCaches;
61
64
  private _editingCell;
62
65
  private _previewTable;
@@ -81,11 +84,12 @@ export declare class SlideTableObject extends Rect<ISlideTableObjectProps> {
81
84
  isHit(coord: Vector2): boolean;
82
85
  getCellTextRect(row: number, column: number, width?: number, height?: number): ISlideTableCellTextRect | null;
83
86
  _draw(ctx: UniverRenderingContext, _bounds?: IViewportInfo, renderWidth?: number, renderHeight?: number): void;
87
+ private _drawTableOuterShadow;
84
88
  private _drawRowFills;
85
89
  private _drawGrid;
86
- private _drawResolvedGrid;
87
90
  private _drawTableOutline;
88
91
  private _drawCellFills;
92
+ private _drawMatchingCellFillSeams;
89
93
  private _drawCellBorders;
90
94
  private _drawCellHover;
91
95
  private _drawCellTexts;
@@ -115,6 +119,7 @@ export declare class SlideTableObject extends Rect<ISlideTableObjectProps> {
115
119
  private _isEditingCell;
116
120
  private _shouldHideCellTextForEditor;
117
121
  private _getRenderTable;
122
+ private _resolveRenderModel;
118
123
  private _resolvePictureFill;
119
124
  private _createImagePromise;
120
125
  }
@@ -1,5 +1,5 @@
1
1
  import type { IDisposable } from '@univerjs/core';
2
- import type { BaseObject } from '@univerjs/engine-render';
2
+ import type { BaseObject, IBoundRectNoAngle } from '@univerjs/engine-render';
3
3
  import type { IPopup } from '@univerjs/ui';
4
4
  import { Disposable } from '@univerjs/core';
5
5
  import { IRenderManagerService } from '@univerjs/engine-render';
@@ -14,4 +14,5 @@ export declare class SlideCanvasPopManagerService extends Disposable {
14
14
  constructor(_globalPopupManagerService: ICanvasPopupService, _renderManagerService: IRenderManagerService);
15
15
  private _createObjectPositionObserver;
16
16
  attachPopupToObject(unitId: string, subUnitId: string, targetObject: BaseObject, popup: ISlideCanvasPopup): IDisposable;
17
+ attachPopupToClientRect(unitId: string, subUnitId: string, bound: IBoundRectNoAngle, popup: ISlideCanvasPopup): IDisposable;
17
18
  }
@@ -0,0 +1,45 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { Observable } from 'rxjs';
3
+ export interface ISlideEmbedFloatingActivation {
4
+ hostUnitId: string;
5
+ childUnitId: string;
6
+ embedId: string;
7
+ stage?: 'inactive' | 'stage1' | 'stage2';
8
+ }
9
+ export interface ISlideEmbedFloatingActiveService {
10
+ active$: Observable<ISlideEmbedFloatingActivation | null>;
11
+ getActive(): ISlideEmbedFloatingActivation | null;
12
+ clear(embedId?: string): void;
13
+ }
14
+ export declare const ISlideEmbedFloatingActiveService: import("@wendellhu/redi").IdentifierDecorator<ISlideEmbedFloatingActiveService>;
15
+ export interface ISlideEmbedMountSession {
16
+ hostUnitId: string;
17
+ childUnitId?: string;
18
+ embedId: string;
19
+ entry: string;
20
+ layout?: string;
21
+ context?: {
22
+ descriptor: {
23
+ hostAnchorId: string;
24
+ };
25
+ };
26
+ }
27
+ export interface ISlideEmbedMountService {
28
+ listSessions(): ISlideEmbedMountSession[];
29
+ }
30
+ export declare const ISlideEmbedMountService: import("@wendellhu/redi").IdentifierDecorator<ISlideEmbedMountService>;
31
+ export interface ISlideEmbedActivationService {
32
+ clearTab(embedId: string): void;
33
+ clearFloating(embedId: string, hostUnitId: string): void;
34
+ }
35
+ export declare const ISlideEmbedActivationService: import("@wendellhu/redi").IdentifierDecorator<ISlideEmbedActivationService>;
36
+ export interface ISlideEmbedFloatDomRendererProps {
37
+ data: unknown;
38
+ onRuntimeStageEnter?: (stage: 'inactive' | 'stage1' | 'stage2') => void;
39
+ enableStage1BodyDrag?: boolean;
40
+ isExternalHostInteraction?: (event: PointerEvent) => boolean;
41
+ }
42
+ export interface ISlideEmbedFloatDomRenderer {
43
+ render(props: ISlideEmbedFloatDomRendererProps): ReactNode;
44
+ }
45
+ export declare const ISlideEmbedFloatDomRenderer: import("@wendellhu/redi").IdentifierDecorator<ISlideEmbedFloatDomRenderer>;
@@ -0,0 +1,50 @@
1
+ import type { IDisposable, UniverInstanceType } from '@univerjs/core';
2
+ export interface ISlideEmbedPageListMountParams {
3
+ hostUnitId: string;
4
+ embedId: string;
5
+ hostAnchorId: string;
6
+ childUnitId: string;
7
+ childType: UniverInstanceType;
8
+ }
9
+ export interface ISlideEmbedFloatingObjectMountParams {
10
+ hostElement: HTMLElement;
11
+ hostUnitId: string;
12
+ embedId: string;
13
+ hostAnchorId: string;
14
+ childUnitId: string;
15
+ childType: UniverInstanceType;
16
+ }
17
+ export interface ISlideEmbedPresentationMountParams {
18
+ hostElement: HTMLElement;
19
+ hostUnitId: string;
20
+ slideId: string;
21
+ embedId: string;
22
+ hostAnchorId: string;
23
+ childUnitId?: string;
24
+ childType?: UniverInstanceType;
25
+ entry: 'slides-floating-object' | 'slides-page-list-block';
26
+ width: number;
27
+ height: number;
28
+ dpr: number;
29
+ }
30
+ export interface ISlideEmbedRuntimeSession {
31
+ embedId: string;
32
+ hostUnitId: string;
33
+ entry: string;
34
+ childType?: UniverInstanceType;
35
+ childUnitId?: string;
36
+ }
37
+ export interface ISlideEmbedRuntimeService {
38
+ mountPageList(params: ISlideEmbedPageListMountParams): IDisposable | undefined;
39
+ mountFloatingObject(params: ISlideEmbedFloatingObjectMountParams): IDisposable | undefined;
40
+ clearAndUnmount(embedId: string): void;
41
+ unmountFloatingSessions(hostUnitId: string): void;
42
+ listSessions(): ISlideEmbedRuntimeSession[];
43
+ capturePreviewByHostAnchorId(hostAnchorId: string): Promise<string | undefined>;
44
+ /**
45
+ * Optional so standalone Slides does not depend on EmbedUI. The EmbedUI
46
+ * contribution supplies the real presentation runtime when installed.
47
+ */
48
+ mountPresentationEmbed?(params: ISlideEmbedPresentationMountParams): IDisposable | undefined;
49
+ }
50
+ export declare const ISlideEmbedRuntimeService: import("@wendellhu/redi").IdentifierDecorator<ISlideEmbedRuntimeService>;
@@ -118,6 +118,8 @@ export declare class SlideHitTestService extends RxDisposable implements ISlideH
118
118
  private _toScenePoint;
119
119
  private _resolveDeepestHitFromGroup;
120
120
  private _resolveTopGroupSelectionTarget;
121
+ private _isSelectableDrawing;
122
+ private _getLatestDrawingForOKey;
121
123
  private _resolveParentGroupId;
122
124
  private _collectGroupDescendantIds;
123
125
  }
@@ -1,6 +1,7 @@
1
1
  import type { ISlideInsertShapeOptions, ISlideInsertTextBoxOptions } from '@univerjs-pro/slides';
2
- import { ICommandService, IUniverInstanceService } from '@univerjs/core';
3
- import { IImageIoService, ImageSourceType } from '@univerjs/drawing';
2
+ import type { ImageSourceType } from '@univerjs/core';
3
+ import { ICommandService, IImageIoService, IUniverInstanceService } from '@univerjs/core';
4
+ import { SlideTextEditingService } from '../slide-editor/services/slide-text-editing.service';
4
5
  import { ISlideDrawingStateService } from './slide-drawing-state.service';
5
6
  export interface ISlideInsertTableOptions {
6
7
  rows?: number;
@@ -11,10 +12,12 @@ export interface ISlideInsertTableOptions {
11
12
  export declare class SlideInsertService {
12
13
  private readonly _instanceService;
13
14
  private readonly _commandService;
14
- private readonly _imageIoService?;
15
- private readonly _drawingStateService?;
16
- constructor(_instanceService: IUniverInstanceService, _commandService: ICommandService, _imageIoService?: IImageIoService | undefined, _drawingStateService?: ISlideDrawingStateService | undefined);
15
+ private readonly _textEditingService;
16
+ private readonly _imageIoService;
17
+ private readonly _drawingStateService;
18
+ constructor(_instanceService: IUniverInstanceService, _commandService: ICommandService, _textEditingService: SlideTextEditingService, _imageIoService: IImageIoService, _drawingStateService: ISlideDrawingStateService);
17
19
  insertShape(options: ISlideInsertShapeOptions): boolean;
20
+ private _insertShape;
18
21
  insertTextBox(options?: ISlideInsertTextBoxOptions): boolean;
19
22
  insertTable(options?: ISlideInsertTableOptions): boolean;
20
23
  insertImage(file: File): Promise<boolean>;
@@ -30,5 +33,4 @@ export declare class SlideInsertService {
30
33
  private _resolveTextBoxIsHorizontal;
31
34
  private _fitSize;
32
35
  private _resolveImageSource;
33
- private _fileToDataUrl;
34
36
  }
@@ -1,7 +1,7 @@
1
1
  export { EDITOR_UI_PLUGIN_CONFIG_KEY } from './config/config';
2
2
  export type { IUniverEditorUIConfig } from './config/config';
3
3
  export { EditorUIService, IEditorUIService } from './services/editor-ui.service';
4
- export type { IEditorUIDocumentLayout, IEditorUIInsets, IEditorUIKeyboardEvent, IEditorUILayoutMeasurement, IEditorUIOpenOptions, IEditorUIRect, IEditorUIScale, IEditorUISession, IEditorUITransform, } from './types';
4
+ export type { IEditorUIDocumentLayout, IEditorUIInsets, IEditorUIKeyboardEvent, IEditorUILayoutMeasurement, IEditorUIOpenOptions, IEditorUIPointerEvent, IEditorUIRect, IEditorUIScale, IEditorUISession, IEditorUITransform, } from './types';
5
5
  export { applyEditorUIDocumentAlignment, applyEditorUIDocumentTextStyle, getEditorUITextStyle, prepareEditorUIDocumentData, stripEditorUIDocumentData } from './utils/document';
6
6
  export type { IEditorUITextStyleOptions } from './utils/document';
7
7
  export { createEditorUIHostLayout, getEditorUIHostHeightFromMeasurement, normalizeEditorUIInsets } from './utils/layout';
@@ -1,7 +1,8 @@
1
- import type { HorizontalAlign, IDocumentData, LocaleService, WrapStrategy } from '@univerjs/core';
1
+ import type { BooleanNumber, HorizontalAlign, IDocumentData, LocaleService, WrapStrategy } from '@univerjs/core';
2
2
  import type { IEditorUIDocumentLayout, IEditorUILayoutMeasurement, IEditorUIRect } from '../types';
3
- import { BooleanNumber, DocumentDataModel, VerticalAlign } from '@univerjs/core';
3
+ import { DocumentDataModel, VerticalAlign } from '@univerjs/core';
4
4
  import { Documents, DocumentSkeleton, DocumentViewModel, UniverRenderingContext } from '@univerjs/engine-render';
5
+ export { getShapeTextOpticalVerticalOffset } from '@univerjs-pro/shape-editor-ui';
5
6
  export interface IRenderEditorUIDocumentBaseOptions {
6
7
  documentData: IDocumentData;
7
8
  size: Pick<IEditorUIRect, 'width' | 'height'>;
@@ -31,10 +32,18 @@ export interface IEditorUIDocumentRenderResources extends IRenderEditorUIDocumen
31
32
  skeleton: DocumentSkeleton;
32
33
  docViewModel: DocumentViewModel;
33
34
  docModel: DocumentDataModel;
35
+ contentVerticalOffset: number;
34
36
  opticalVerticalOffset: number;
37
+ isHorizontal: boolean;
35
38
  }
36
- export declare function getShapeTextOpticalVerticalOffset(skeleton: DocumentSkeleton, targetHeight: number, verticalAlign?: VerticalAlign): number;
39
+ export declare function resolveEditorUIDocumentFlowSize(size: Pick<IEditorUIRect, 'width' | 'height'>, isHorizontal?: boolean): {
40
+ pageWidth: number;
41
+ alignmentExtent: number;
42
+ renderHeight: number;
43
+ };
44
+ export declare function resolveEditorUIDocumentSurfaceHeight(layoutContentHeight: number, viewportHeight: number, isHorizontal?: boolean): number;
37
45
  export declare function renderEditorUIDocumentToCanvas(options: IRenderEditorUIDocumentToCanvasOptions): IRenderEditorUIDocumentToCanvasResult;
38
46
  export declare function renderEditorUIDocumentToContext(options: IRenderEditorUIDocumentToContextOptions): IRenderEditorUIDocumentToCanvasResult;
39
47
  export declare function drawEditorUIDocumentResources(context: UniverRenderingContext, resources: IEditorUIDocumentRenderResources, clip: boolean): void;
40
48
  export declare function createEditorUIDocumentRenderResources(options: IRenderEditorUIDocumentBaseOptions): IEditorUIDocumentRenderResources;
49
+ export declare function createPreparedEditorUIDocumentRenderResources(options: IRenderEditorUIDocumentBaseOptions): IEditorUIDocumentRenderResources;
@@ -1,5 +1,5 @@
1
1
  import type { IShapeTextEditingParams, IShapeTextHostHeightUpdateParams, IShapeTextHostSizeUpdateParams, IShapeTextUpdateParams } from '@univerjs-pro/shape-editor-ui';
2
- import type { PageTypeEnum } from '@univerjs-pro/slides';
2
+ import type { ISlideDrawing, PageTypeEnum } from '@univerjs-pro/slides';
3
3
  import type { IDocumentData, Nullable } from '@univerjs/core';
4
4
  import type { Observable } from 'rxjs';
5
5
  import { ISlideDrawingService } from '@univerjs-pro/slides';
@@ -30,6 +30,8 @@ export declare class SlideTextEditingService extends Disposable {
30
30
  setEditing(params: Nullable<ISlideTextEditingParams>): void;
31
31
  setOnSavingEditorData(params: Nullable<boolean>): void;
32
32
  getEditing(): Nullable<ISlideTextEditingParams>;
33
+ startEditingDrawing(drawing: ISlideDrawing, shapeKey?: string): void;
34
+ startInsertedTextBoxEditing(params: Pick<ISlideTextEditingParams, 'unitId' | 'subUnitId' | 'shapeId'>): void;
33
35
  ignoreExternalFocusChanges(duration?: number): void;
34
36
  shouldIgnoreExternalFocusChanges(): boolean;
35
37
  completeEditing(): void;
@@ -12,5 +12,5 @@ interface ISlideShapeFloatingToolbarProps {
12
12
  extraProps?: ISlideShapeFloatingToolbarExtraProps;
13
13
  };
14
14
  }
15
- export declare function ShapeFloatingToolbar(props: ISlideShapeFloatingToolbarProps): import("react").JSX.Element | null;
15
+ export declare function SlideShapeFloatingToolbar(props: ISlideShapeFloatingToolbarProps): import("react").JSX.Element | null;
16
16
  export {};
@@ -1,7 +1,11 @@
1
- import type { ISlideThemeData, ISlideThemedShapeText } from '@univerjs-pro/slides';
1
+ import type { ISlidePlainShapeTextData, ISlideThemeData } from '@univerjs-pro/slides';
2
2
  import type { ITextStyle } from '@univerjs/core';
3
3
  import { HorizontalAlign, VerticalAlign } from '@univerjs/core';
4
- export declare function resolvePlainShapeTextData(shapeText: Partial<ISlideThemedShapeText> | undefined, themeData?: ISlideThemeData): ISlideThemedShapeText;
5
- export declare function toDocumentHorizontalAlign(align?: ISlideThemedShapeText['horizontalAlign']): HorizontalAlign;
6
- export declare function toDocumentVerticalAlign(align?: ISlideThemedShapeText['verticalAlign']): VerticalAlign;
7
- export declare function toDocumentTextStyle(shapeText: ISlideThemedShapeText): ITextStyle;
4
+ /**
5
+ * Resolves legacy slide plain shape text for read-only compatibility paths.
6
+ * New writes should create canonical `shapeText.dataModel.doc` instead.
7
+ */
8
+ export declare function resolvePlainShapeTextData(shapeText: Partial<ISlidePlainShapeTextData> | undefined, themeData?: ISlideThemeData): ISlidePlainShapeTextData;
9
+ export declare function toDocumentHorizontalAlign(align?: ISlidePlainShapeTextData['horizontalAlign']): HorizontalAlign;
10
+ export declare function toDocumentVerticalAlign(align?: ISlidePlainShapeTextData['verticalAlign']): VerticalAlign;
11
+ export declare function toDocumentTextStyle(shapeText: ISlidePlainShapeTextData): ITextStyle;