@univerjs-pro/slides-ui 1.0.0-alpha.0 → 1.0.0-alpha.2

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 (99) hide show
  1. package/lib/cjs/index.js +1 -1
  2. package/lib/cjs/locale/ar-SA.js +1 -1
  3. package/lib/cjs/locale/ca-ES.js +1 -1
  4. package/lib/cjs/locale/de-DE.js +1 -1
  5. package/lib/cjs/locale/en-US.js +1 -1
  6. package/lib/cjs/locale/es-ES.js +1 -1
  7. package/lib/cjs/locale/fa-IR.js +1 -1
  8. package/lib/cjs/locale/fr-FR.js +1 -1
  9. package/lib/cjs/locale/id-ID.js +1 -1
  10. package/lib/cjs/locale/it-IT.js +1 -1
  11. package/lib/cjs/locale/ja-JP.js +1 -1
  12. package/lib/cjs/locale/ko-KR.js +1 -1
  13. package/lib/cjs/locale/pl-PL.js +1 -1
  14. package/lib/cjs/locale/pt-BR.js +1 -1
  15. package/lib/cjs/locale/ru-RU.js +1 -1
  16. package/lib/cjs/locale/sk-SK.js +1 -1
  17. package/lib/cjs/locale/vi-VN.js +1 -1
  18. package/lib/cjs/locale/zh-CN.js +1 -1
  19. package/lib/cjs/locale/zh-HK.js +1 -1
  20. package/lib/cjs/locale/zh-TW.js +1 -1
  21. package/lib/es/index.js +1 -1
  22. package/lib/es/locale/ar-SA.js +1 -1
  23. package/lib/es/locale/ca-ES.js +1 -1
  24. package/lib/es/locale/de-DE.js +1 -1
  25. package/lib/es/locale/en-US.js +1 -1
  26. package/lib/es/locale/es-ES.js +1 -1
  27. package/lib/es/locale/fa-IR.js +1 -1
  28. package/lib/es/locale/fr-FR.js +1 -1
  29. package/lib/es/locale/id-ID.js +1 -1
  30. package/lib/es/locale/it-IT.js +1 -1
  31. package/lib/es/locale/ja-JP.js +1 -1
  32. package/lib/es/locale/ko-KR.js +1 -1
  33. package/lib/es/locale/pl-PL.js +1 -1
  34. package/lib/es/locale/pt-BR.js +1 -1
  35. package/lib/es/locale/ru-RU.js +1 -1
  36. package/lib/es/locale/sk-SK.js +1 -1
  37. package/lib/es/locale/vi-VN.js +1 -1
  38. package/lib/es/locale/zh-CN.js +1 -1
  39. package/lib/es/locale/zh-HK.js +1 -1
  40. package/lib/es/locale/zh-TW.js +1 -1
  41. package/lib/index.css +65 -83
  42. package/lib/index.js +1 -1
  43. package/lib/locale/ar-SA.js +1 -1
  44. package/lib/locale/ca-ES.js +1 -1
  45. package/lib/locale/de-DE.js +1 -1
  46. package/lib/locale/en-US.js +1 -1
  47. package/lib/locale/es-ES.js +1 -1
  48. package/lib/locale/fa-IR.js +1 -1
  49. package/lib/locale/fr-FR.js +1 -1
  50. package/lib/locale/id-ID.js +1 -1
  51. package/lib/locale/it-IT.js +1 -1
  52. package/lib/locale/ja-JP.js +1 -1
  53. package/lib/locale/ko-KR.js +1 -1
  54. package/lib/locale/pl-PL.js +1 -1
  55. package/lib/locale/pt-BR.js +1 -1
  56. package/lib/locale/ru-RU.js +1 -1
  57. package/lib/locale/sk-SK.js +1 -1
  58. package/lib/locale/vi-VN.js +1 -1
  59. package/lib/locale/zh-CN.js +1 -1
  60. package/lib/locale/zh-HK.js +1 -1
  61. package/lib/locale/zh-TW.js +1 -1
  62. package/lib/types/components/insert-toolbar/ShapePicker.d.ts +6 -6
  63. package/lib/types/components/object-list-panel/SlideObjectListPanel.d.ts +1 -1
  64. package/lib/types/components/shape-edit-panel/SlideShapeStyleEditor.d.ts +2 -2
  65. package/lib/types/components/thumbnail-bar/ThumbnailBar.d.ts +2 -1
  66. package/lib/types/default-config.d.ts +1 -0
  67. package/lib/types/index.d.ts +3 -1
  68. package/lib/types/locale/en-US.d.ts +20 -208
  69. package/lib/types/menu/change-shape.menu.d.ts +1 -1
  70. package/lib/types/render-objects/background-image-fit.util.d.ts +10 -1
  71. package/lib/types/render-objects/slide-image-object.d.ts +1 -0
  72. package/lib/types/render-objects/slide-page-background-object.d.ts +3 -0
  73. package/lib/types/render-objects/slide-shape-object.d.ts +2 -0
  74. package/lib/types/services/slide-insert.service.d.ts +1 -2
  75. package/lib/types/slide-editor/editor-ui/utils/document.d.ts +3 -2
  76. package/lib/types/slide-editor/views/shape-floating-toolbar/ShapeFloatingToolbar.d.ts +1 -1
  77. package/lib/types/views/render/adaptors/shape-adaptor.d.ts +1 -1
  78. package/lib/umd/index.js +1 -1
  79. package/lib/umd/locale/ar-SA.js +1 -1
  80. package/lib/umd/locale/ca-ES.js +1 -1
  81. package/lib/umd/locale/de-DE.js +1 -1
  82. package/lib/umd/locale/en-US.js +1 -1
  83. package/lib/umd/locale/es-ES.js +1 -1
  84. package/lib/umd/locale/fa-IR.js +1 -1
  85. package/lib/umd/locale/fr-FR.js +1 -1
  86. package/lib/umd/locale/id-ID.js +1 -1
  87. package/lib/umd/locale/it-IT.js +1 -1
  88. package/lib/umd/locale/ja-JP.js +1 -1
  89. package/lib/umd/locale/ko-KR.js +1 -1
  90. package/lib/umd/locale/pl-PL.js +1 -1
  91. package/lib/umd/locale/pt-BR.js +1 -1
  92. package/lib/umd/locale/ru-RU.js +1 -1
  93. package/lib/umd/locale/sk-SK.js +1 -1
  94. package/lib/umd/locale/vi-VN.js +1 -1
  95. package/lib/umd/locale/zh-CN.js +1 -1
  96. package/lib/umd/locale/zh-HK.js +1 -1
  97. package/lib/umd/locale/zh-TW.js +1 -1
  98. package/package.json +16 -16
  99. package/lib/types/components/shape-picker/shapes.d.ts +0 -34
@@ -119,11 +119,6 @@ declare const locale: {
119
119
  title: string;
120
120
  shapeStyle: string;
121
121
  shapePosition: string;
122
- style: {
123
- fill: string;
124
- stroke: string;
125
- strokeWidth: string;
126
- };
127
122
  openPanel: string;
128
123
  deleteShape: string;
129
124
  toolbar: {
@@ -160,6 +155,26 @@ declare const locale: {
160
155
  height: string;
161
156
  rotation: string;
162
157
  };
158
+ style: {
159
+ shadow: string;
160
+ shadowColor: string;
161
+ shadowBlurRadius: string;
162
+ shadowDistance: string;
163
+ shadowDirection: string;
164
+ shadowPresetTitle: string;
165
+ shadowPresetNone: string;
166
+ shadowPresetCustom: string;
167
+ shadowTransparency: string;
168
+ shadowSize: string;
169
+ shadowPreset: {
170
+ shdw6: string;
171
+ shdw5: string;
172
+ shdw2: string;
173
+ shdw1: string;
174
+ shdw14: string;
175
+ shdw10: string;
176
+ };
177
+ };
163
178
  fill: {
164
179
  title: string;
165
180
  noFill: string;
@@ -346,209 +361,6 @@ declare const locale: {
346
361
  speakerNotesSave: string;
347
362
  speakerNotesCancel: string;
348
363
  };
349
- shape: {
350
- group: {
351
- line: string;
352
- rectangle: string;
353
- basicShape: string;
354
- blockArrow: string;
355
- equationShape: string;
356
- flowchart: string;
357
- starAndBanner: string;
358
- callout: string;
359
- other: string;
360
- };
361
- type: {
362
- line: string;
363
- 'straight-connector1': string;
364
- 'straight-connector2': string;
365
- 'bent-connector3': string;
366
- 'bent-connector3-arrow1': string;
367
- 'bent-connector3-arrow2': string;
368
- 'curved-connector3': string;
369
- 'curved-connector3-arrow1': string;
370
- 'curved-connector3-arrow2': string;
371
- rect: string;
372
- 'round-rect': string;
373
- 'snip1-rect': string;
374
- 'snip2-same-rect': string;
375
- 'snip2-diag-rect': string;
376
- 'snip-round-rect': string;
377
- 'round1-rect': string;
378
- 'round2-same-rect': string;
379
- 'round2-diag-rect': string;
380
- 'rect-textbox-horizontal': string;
381
- 'rect-textbox-vertical': string;
382
- ellipse: string;
383
- triangle: string;
384
- 'rt-triangle': string;
385
- parallelogram: string;
386
- trapezoid: string;
387
- 'non-isosceles-trapezoid': string;
388
- diamond: string;
389
- pentagon: string;
390
- hexagon: string;
391
- heptagon: string;
392
- octagon: string;
393
- decagon: string;
394
- dodecagon: string;
395
- pie: string;
396
- chord: string;
397
- teardrop: string;
398
- frame: string;
399
- 'half-frame': string;
400
- corner: string;
401
- 'diag-stripe': string;
402
- plus: string;
403
- plaque: string;
404
- can: string;
405
- cube: string;
406
- bevel: string;
407
- donut: string;
408
- 'no-smoking': string;
409
- 'block-arc': string;
410
- 'folder-corner': string;
411
- 'smiley-face': string;
412
- heart: string;
413
- 'lightning-bolt': string;
414
- sun: string;
415
- moon: string;
416
- cloud: string;
417
- arc: string;
418
- 'bracket-pair': string;
419
- 'brace-pair': string;
420
- 'left-bracket': string;
421
- 'right-bracket': string;
422
- 'left-brace': string;
423
- 'right-brace': string;
424
- 'right-arrow': string;
425
- 'left-arrow': string;
426
- 'up-arrow': string;
427
- 'down-arrow': string;
428
- 'left-right-arrow': string;
429
- 'up-down-arrow': string;
430
- 'quad-arrow': string;
431
- 'left-right-up-arrow': string;
432
- 'bent-arrow': string;
433
- 'uturn-arrow': string;
434
- 'left-up-arrow': string;
435
- 'bent-up-arrow': string;
436
- 'curved-right-arrow': string;
437
- 'curved-left-arrow': string;
438
- 'curved-up-arrow': string;
439
- 'curved-down-arrow': string;
440
- 'striped-right-arrow': string;
441
- 'notched-right-arrow': string;
442
- 'home-plate': string;
443
- chevron: string;
444
- 'right-arrow-callout': string;
445
- 'down-arrow-callout': string;
446
- 'left-arrow-callout': string;
447
- 'up-arrow-callout': string;
448
- 'left-right-arrow-callout': string;
449
- 'quad-arrow-callout': string;
450
- 'circular-arrow': string;
451
- 'math-plus': string;
452
- 'math-minus': string;
453
- 'math-multiply': string;
454
- 'math-divide': string;
455
- 'math-equal': string;
456
- 'math-not-equal': string;
457
- 'flow-chart-process': string;
458
- 'flow-chart-alternate-process': string;
459
- 'flow-chart-decision': string;
460
- 'flow-chart-input-output': string;
461
- 'flow-chart-predefined-process': string;
462
- 'flow-chart-internal-storage': string;
463
- 'flow-chart-document': string;
464
- 'flow-chart-multidocument': string;
465
- 'flow-chart-terminator': string;
466
- 'flow-chart-preparation': string;
467
- 'flow-chart-manual-input': string;
468
- 'flow-chart-manual-operation': string;
469
- 'flow-chart-connector': string;
470
- 'flow-chart-offpage-connector': string;
471
- 'flow-chart-punched-card': string;
472
- 'flow-chart-punched-tape': string;
473
- 'flow-chart-summing-junction': string;
474
- 'flow-chart-or': string;
475
- 'flow-chart-collate': string;
476
- 'flow-chart-sort': string;
477
- 'flow-chart-extract': string;
478
- 'flow-chart-merge': string;
479
- 'flow-chart-online-storage': string;
480
- 'flow-chart-delay': string;
481
- 'flow-chart-magnetic-tape': string;
482
- 'flow-chart-magnetic-disk': string;
483
- 'flow-chart-magnetic-drum': string;
484
- 'flow-chart-display': string;
485
- 'irregular-seal1': string;
486
- 'irregular-seal2': string;
487
- star4: string;
488
- star5: string;
489
- star6: string;
490
- star7: string;
491
- star8: string;
492
- star10: string;
493
- star12: string;
494
- star16: string;
495
- star24: string;
496
- star32: string;
497
- ribbon2: string;
498
- ribbon: string;
499
- 'ellipse-ribbon2': string;
500
- 'ellipse-ribbon': string;
501
- 'vertical-scroll': string;
502
- 'horizontal-scroll': string;
503
- wave: string;
504
- 'double-wave': string;
505
- 'wedge-rect-callout': string;
506
- 'wedge-round-rect-callout': string;
507
- 'wedge-ellipse-callout': string;
508
- 'cloud-callout': string;
509
- 'border-callout1': string;
510
- 'border-callout2': string;
511
- 'border-callout3': string;
512
- 'accent-callout1': string;
513
- 'accent-callout2': string;
514
- 'accent-callout3': string;
515
- callout1: string;
516
- callout2: string;
517
- callout3: string;
518
- 'accent-border-callout1': string;
519
- 'accent-border-callout2': string;
520
- 'accent-border-callout3': string;
521
- 'left-circular-arrow': string;
522
- 'left-right-circular-arrow': string;
523
- 'swoosh-arrow': string;
524
- 'left-right-ribbon': string;
525
- 'pie-wedge': string;
526
- funnel: string;
527
- gear6: string;
528
- gear9: string;
529
- 'corner-tabs': string;
530
- 'action-button-back-previous': string;
531
- 'action-button-forward-next': string;
532
- 'action-button-beginning': string;
533
- 'action-button-end': string;
534
- 'action-button-home': string;
535
- 'action-button-information': string;
536
- 'action-button-return': string;
537
- 'action-button-movie': string;
538
- 'action-button-document': string;
539
- 'action-button-sound': string;
540
- 'action-button-help': string;
541
- 'action-button-blank': string;
542
- 'chart-plus': string;
543
- 'chart-star': string;
544
- 'chart-x': string;
545
- 'flow-chart-offline-storage': string;
546
- 'line-inv': string;
547
- 'plaque-tabs': string;
548
- 'square-tabs': string;
549
- 'up-down-arrow-callout': string;
550
- };
551
- };
552
364
  slide: {
553
365
  placeholder: {
554
366
  text: {
@@ -2,4 +2,4 @@ import type { ShapeTypeEnum } from '@univerjs-pro/engine-shape';
2
2
  import type { IAccessor } from '@univerjs/core';
3
3
  import type { IMenuSelectorItem } from '@univerjs/ui';
4
4
  import type { LocaleKey } from '../locale/types';
5
- export declare function SlideChangeShapeMenuFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey, ShapeTypeEnum>;
5
+ export declare function SlideChangeShapeMenuFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey, ShapeTypeEnum | undefined, ShapeTypeEnum>;
@@ -5,4 +5,13 @@ export interface IBackgroundImageDrawRect {
5
5
  width: number;
6
6
  height: number;
7
7
  }
8
- export declare function resolveBackgroundImageDrawRect(frameWidth: number, frameHeight: number, imageWidth: number, imageHeight: number, fit: SlidePresentationBackgroundGraphicFitWithoutRepeatEnum): IBackgroundImageDrawRect;
8
+ export interface IBackgroundImageEdgeRect {
9
+ left?: number;
10
+ top?: number;
11
+ right?: number;
12
+ bottom?: number;
13
+ }
14
+ export interface IBackgroundImageSourceRect extends IBackgroundImageDrawRect {
15
+ }
16
+ export declare function resolveBackgroundImageSourceRect(imageWidth: number, imageHeight: number, srcRect?: IBackgroundImageEdgeRect): IBackgroundImageSourceRect;
17
+ export declare function resolveBackgroundImageDrawRect(frameWidth: number, frameHeight: number, imageWidth: number, imageHeight: number, fit: SlidePresentationBackgroundGraphicFitWithoutRepeatEnum, stretchFillRect?: IBackgroundImageEdgeRect): IBackgroundImageDrawRect;
@@ -22,5 +22,6 @@ export declare class SlideImageObject extends Image {
22
22
  loadSource(source: string, imageSourceType: ImageSourceType, imageIoService: IImageIoService, onReady?: () => void): Promise<void>;
23
23
  setNativeImage(native: HTMLImageElement): void;
24
24
  protected _draw(ctx: UniverRenderingContext, bounds?: IViewportInfo, renderWidth?: number, renderHeight?: number): void;
25
+ private _drawPictureStroke;
25
26
  private _applyResolvedSource;
26
27
  }
@@ -10,6 +10,7 @@ interface ISlidePageBackgroundObjectProps {
10
10
  background?: ISlideBackgroundData;
11
11
  evented?: boolean;
12
12
  zIndex?: number;
13
+ requestRender?: () => void;
13
14
  }
14
15
  export declare class SlidePageBackgroundObject extends Rect<ISlidePageBackgroundObjectProps> {
15
16
  private readonly _imageIoService?;
@@ -17,10 +18,12 @@ export declare class SlidePageBackgroundObject extends Rect<ISlidePageBackground
17
18
  private static readonly _imageLoadingCache;
18
19
  private _background?;
19
20
  private _native?;
21
+ private readonly _requestRender?;
20
22
  constructor(key: string, props: ISlidePageBackgroundObjectProps, _imageIoService?: IImageIoService | undefined);
21
23
  updateBackground(background?: ISlideBackgroundData): void;
22
24
  protected _draw(ctx: UniverRenderingContext, _bounds?: IViewportInfo, renderWidth?: number, renderHeight?: number): void;
23
25
  private _prepareImage;
26
+ private _markImageReady;
24
27
  private _createImagePromise;
25
28
  private _drawImage;
26
29
  private _createGradient;
@@ -57,6 +57,8 @@ export declare class SlideShapeObject extends Shape<ISlideShapeObjectProps> {
57
57
  _draw(ctx: UniverRenderingContext, _bounds?: IViewportInfo, renderWidth?: number, renderHeight?: number): void;
58
58
  private _drawShapeText;
59
59
  private _applyReadableTextFlip;
60
+ private _renderShapePath;
61
+ private _applyOuterShadow;
60
62
  render(mainCtx: UniverRenderingContext, bounds: IViewportInfo): this;
61
63
  getInverseCoord(coord: Vector2): Vector2;
62
64
  dispose(): void;
@@ -1,7 +1,6 @@
1
1
  import type { ISlideInsertShapeOptions, ISlideInsertTextBoxOptions } from '@univerjs-pro/slides';
2
- import type { ImageSourceType } from '@univerjs/drawing';
3
2
  import { ICommandService, IUniverInstanceService } from '@univerjs/core';
4
- import { IImageIoService } from '@univerjs/drawing';
3
+ import { IImageIoService, ImageSourceType } from '@univerjs/drawing';
5
4
  import { ISlideDrawingStateService } from './slide-drawing-state.service';
6
5
  export interface ISlideInsertTableOptions {
7
6
  rows?: number;
@@ -1,7 +1,8 @@
1
- import type { IDocumentData, ITextStyle, WrapStrategy as WrapStrategyType } from '@univerjs/core';
1
+ import type { IDocumentData, ITextStyle } from '@univerjs/core';
2
2
  import type { IEditorUIDocumentLayout } from '../types';
3
+ import { WrapStrategy } from '@univerjs/core';
3
4
  export interface IPrepareEditorUIDocumentOptions extends Pick<IEditorUIDocumentLayout, 'rect' | 'horizontalAlign' | 'verticalAlign' | 'isHorizontal'> {
4
- wrapStrategy?: WrapStrategyType;
5
+ wrapStrategy?: WrapStrategy;
5
6
  }
6
7
  export interface IEditorUITextStyleOptions {
7
8
  fontFamily?: string;
@@ -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,9 +1,9 @@
1
1
  import type { ISlideDrawing } from '@univerjs-pro/slides';
2
2
  import type { Nullable } from '@univerjs/core';
3
- import type { IImageIoService } from '@univerjs/drawing';
4
3
  import type { BaseObject } from '@univerjs/engine-render';
5
4
  import type { IRenderConvertContext } from '../adaptor';
6
5
  import { LocaleService } from '@univerjs/core';
6
+ import { IImageIoService } from '@univerjs/drawing';
7
7
  import { SlideTextEditingService } from '../../../slide-editor/services/slide-text-editing.service';
8
8
  import { ObjectAdaptor } from '../adaptor';
9
9
  export declare class ShapeObjectAdaptor extends ObjectAdaptor {