@adobe/ccweb-add-on-sdk-types 1.15.0 → 1.16.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/ccweb-add-on-sdk-types",
3
- "version": "1.15.0",
3
+ "version": "1.16.0",
4
4
  "author": "Adobe",
5
5
  "license": "MIT",
6
6
  "description": "Type definitions for Adobe Creative Cloud Web Add-on SDK.",
@@ -81,7 +81,7 @@ declare namespace ApiConstants {
81
81
  StrokePosition,
82
82
  StrokeType,
83
83
  TextAlignment,
84
- TextType,
84
+ TextLayout,
85
85
  EditorEvent,
86
86
  VisualEffectType,
87
87
  ParagraphListType,
@@ -105,7 +105,7 @@ declare interface ApiModuleExport {
105
105
  * @experimental
106
106
  */
107
107
  export declare interface AreaTextLayout {
108
- type: TextType.area;
108
+ type: TextLayout.area;
109
109
  /**
110
110
  * The width of the text node in pixels.
111
111
  */
@@ -120,6 +120,11 @@ export declare interface AreaTextLayout {
120
120
  * <InlineAlert slots="text" variant="warning"/>
121
121
  *
122
122
  * *Do not depend on the literal numeric values of these constants*, as they may change. Always reference the enum identifiers in your code.
123
+ *
124
+ * <InlineAlert slots="text" variant="warning"/>
125
+ *
126
+ * *Additional arrowhead types may be added in the future.* If your code has different branches or cases depending on arrow type,
127
+ * always have a default/fallback case to handle any unknown values you may encounter.
123
128
  */
124
129
  declare enum ArrowHeadType {
125
130
  none = 0,
@@ -201,7 +206,7 @@ export declare class ArtboardNode extends VisualNode implements IRectangularNode
201
206
  * @experimental
202
207
  */
203
208
  export declare interface AutoHeightTextLayout {
204
- type: TextType.autoHeight;
209
+ type: TextLayout.autoHeight;
205
210
  /**
206
211
  * The width of the text node in pixels.
207
212
  */
@@ -1477,7 +1482,7 @@ export declare interface Point {
1477
1482
  * @experimental
1478
1483
  */
1479
1484
  export declare interface PointTextLayout {
1480
- type: TextType.autoWidth;
1485
+ type: TextLayout.autoWidth;
1481
1486
  }
1482
1487
 
1483
1488
  /**
@@ -1799,11 +1804,17 @@ declare interface StyleRange {
1799
1804
  * <InlineAlert slots="text" variant="warning"/>
1800
1805
  *
1801
1806
  * *Do not depend on the literal numeric values of these constants*, as they may change. Always reference the enum identifiers in your code.
1807
+ *
1808
+ * <InlineAlert slots="text" variant="warning"/>
1809
+ *
1810
+ * *Additional alignment types may be added in the future.* If your code has different branches or cases depending on text alignment,
1811
+ * always have a default/fallback case to handle any unknown values you may encounter.
1802
1812
  */
1803
1813
  declare enum TextAlignment {
1804
1814
  left = 1,
1805
1815
  right = 2,
1806
- center = 3
1816
+ center = 3,
1817
+ justifyLeft = 4
1807
1818
  }
1808
1819
 
1809
1820
  /**
@@ -1917,6 +1928,43 @@ export declare class TextContentModel {
1917
1928
  hasUnavailableFonts(): boolean;
1918
1929
  }
1919
1930
 
1931
+ /**
1932
+ * <InlineAlert slots="text" variant="warning"/>
1933
+ *
1934
+ * *Do not depend on the literal numeric values of these constants*, as they may change. Always reference the enum identifiers in your code.
1935
+ *
1936
+ * <InlineAlert slots="text" variant="warning"/>
1937
+ *
1938
+ * *Additional text layout types may be added in the future.* If your code has different branches or cases depending on layout type,
1939
+ * always have a default/fallback case to handle any unknown values you may encounter.
1940
+ */
1941
+ declare enum TextLayout {
1942
+ /**
1943
+ * Area text: both width and height are explicitly set. If text content is too long to fit, the end of the text will be
1944
+ * clipped. If text content is short, the frame's bounds will occupy extra height that is just blank space.
1945
+ */
1946
+ area = 1,
1947
+ /**
1948
+ * Auto-height text: Width is explicitly set, and text wraps to use as much vertical space as necessary to display the
1949
+ * full content.
1950
+ */
1951
+ autoHeight = 2,
1952
+ /**
1953
+ * Auto-width, aka point text: both width and height are automatically determined based on the content. There is no
1954
+ * automatic line wrapping, so the text will all be on one line unless the text contains explicit newlines.
1955
+ */
1956
+ autoWidth = 3,
1957
+ /**
1958
+ * Text is arranged in a circle or arc. The API does not yet support setting or reading the details of this layout style.
1959
+ */
1960
+ circular = 4,
1961
+ /**
1962
+ * Aka "Dynamic" layout in the UI: text size and styles are automatically varied to create an attractive multi-line layout.
1963
+ * The API does not yet support setting or reading the details of this layout style.
1964
+ */
1965
+ magicFit = 5
1966
+ }
1967
+
1920
1968
  /**
1921
1969
  * A TextNode represents a text display frame in the scenegraph. It may display an entire piece of text, or sometimes just
1922
1970
  * a subset of longer text that flows across multiple TextNode "frames". Because of this, the TextNode does not directly hold
@@ -2006,7 +2054,7 @@ export declare class TextNode extends Node {
2006
2054
  * If this TextNode is part of a multi-frame text content flow, it must be configured to use {@link AreaTextLayout}. Other
2007
2055
  * layout modes, except for {@link AreaTextLayout}, are only available for single-frame text.
2008
2056
  *
2009
- * @throws if changing text layout to/from {@link TextType.magicFit} or {@link TextType.circular} layout when the text contains font(s) unavailable to the current user.
2057
+ * @throws if changing text layout to/from {@link TextLayout.magicFit} or {@link TextLayout.circular} layout when the text contains font(s) unavailable to the current user.
2010
2058
  * @throws if {@link TextNode} is part of a multi-frame text content flow and the layout is not {@link AreaTextLayout}.
2011
2059
  * @throws if {@link TextNode} is not a part of a multi-frame text content flow and the layout is {@link AreaTextLayout}.
2012
2060
  */
@@ -2021,25 +2069,6 @@ declare interface TextRange {
2021
2069
  length: number;
2022
2070
  }
2023
2071
 
2024
- /**
2025
- * <InlineAlert slots="text" variant="warning"/>
2026
- *
2027
- * *Do not depend on the literal numeric values of these constants*, as they may change. Always reference the enum identifiers in your code.
2028
- */
2029
- declare enum TextType {
2030
- area = 1,
2031
- /**
2032
- * Soft bottom
2033
- */
2034
- autoHeight = 2,
2035
- /**
2036
- * Point text
2037
- */
2038
- autoWidth = 3,
2039
- circular = 4,
2040
- magicFit = 5
2041
- }
2042
-
2043
2072
  /**
2044
2073
  * Font the current user does not have access or licensing permissions to create / edit content with.
2045
2074
  */
@@ -2091,7 +2120,7 @@ export declare interface UnorderedListStyleInput extends BaseParagraphListStyle
2091
2120
  * @experimental
2092
2121
  */
2093
2122
  export declare interface UnsupportedTextLayout {
2094
- type: TextType.magicFit | TextType.circular;
2123
+ type: TextLayout.magicFit | TextLayout.circular;
2095
2124
  }
2096
2125
 
2097
2126
  /**
package/ui/ui-sdk.d.ts CHANGED
@@ -258,17 +258,15 @@ declare interface ApplicationBase {
258
258
  showModalDialog(dialogOptions: CustomDialogOptions): Promise<CustomDialogResult>;
259
259
 
260
260
  /**
261
- * @experimental - Experimental API
262
261
  * Shows a color picker popover anchored to the specified element.
263
262
  * The anchor element must be an instance of HTMLElement.
264
263
  * Custom DOM events are dispatched on the anchor element when the color changes or the color picker closes.
265
- * See {@link ColorPickerEvents} for more details.
264
+ * See {@link ColorPickerEvent} for more details.
266
265
  * @param anchorElement - The HTML element to anchor the color picker to.
267
266
  * @param options - Optional configuration options for customizing the color picker behavior and appearance.
268
267
  */
269
268
  showColorPicker(anchorElement: HTMLElement, options?: ColorPickerOptions): Promise<void>;
270
269
  /**
271
- * @experimental - Experimental API
272
270
  * Hides the color picker popover if it is currently visible.
273
271
  */
274
272
  hideColorPicker(): Promise<void>;
@@ -538,10 +536,9 @@ export declare interface ClientStorage {
538
536
  }
539
537
 
540
538
  /**
541
- * @experimental - Experimental API
542
539
  * Custom DOM events dispatched on the anchor element passed to `showColorPicker()` API.
543
540
  */
544
- export declare enum ColorPickerEvents {
541
+ export declare enum ColorPickerEvent {
545
542
  /**
546
543
  * Color change event dispatched when a color is selected.
547
544
  * The event detail will contain a 'color' property of type string.
@@ -554,7 +551,6 @@ export declare enum ColorPickerEvents {
554
551
  }
555
552
 
556
553
  /**
557
- * @experimental - Experimental API
558
554
  * Options that can be passed to the `showColorPicker` API to customize the color picker's behavior and appearance.
559
555
  */
560
556
  export declare interface ColorPickerOptions {
@@ -564,10 +560,12 @@ export declare interface ColorPickerOptions {
564
560
  */
565
561
  title?: string;
566
562
  /**
567
- * Initial color for the color picker, in 0xRRGGBB format.
563
+ * Initial color for the color picker, in hex format.
564
+ * Can provide either as a number in 0xRRGGBB or 0xRRGGBBAA format,
565
+ * or as a string in "#RRGGBB" or "#RRGGBBAA" format.
568
566
  * Default color is 0xFFFFFF (white).
569
567
  */
570
- initialColor?: number;
568
+ initialColor?: number | string;
571
569
  /**
572
570
  * Placement of the color picker popover relative to the anchor element.
573
571
  * Default placement is ColorPickerPlacement.left.
@@ -586,7 +584,6 @@ export declare interface ColorPickerOptions {
586
584
  }
587
585
 
588
586
  /**
589
- * @experimental - Experimental API
590
587
  * Denotes the placement of the color picker popover relative to its anchor element.
591
588
  * Used in the placement option of `showColorPicker()` API.
592
589
  */
@@ -631,7 +628,6 @@ declare namespace Constants {
631
628
  DeviceClass,
632
629
  PlatformType,
633
630
  ColorPickerPlacement,
634
- ColorPickerEvents,
635
631
  AuthorizationStatus
636
632
  };
637
633
  }
@@ -856,21 +852,21 @@ export { Document_2 as Document };
856
852
  /**
857
853
  * The payload data sent to the document id available event handler.
858
854
  */
859
- declare interface DocumentIdAvailableEventData {
855
+ export declare interface DocumentIdAvailableEventData {
860
856
  documentId: string | undefined;
861
857
  }
862
858
 
863
859
  /**
864
860
  * The payload data sent to the document link available event handler.
865
861
  */
866
- declare interface DocumentLinkAvailableEventData {
862
+ export declare interface DocumentLinkAvailableEventData {
867
863
  documentLink: string | undefined;
868
864
  }
869
865
 
870
866
  /**
871
867
  * The payload data sent to the document title change event handler.
872
868
  */
873
- declare interface DocumentTitleChangeEventData {
869
+ export declare interface DocumentTitleChangeEventData {
874
870
  documentTitle: string;
875
871
  }
876
872
 
@@ -907,7 +903,7 @@ export declare interface DragCompletionData {
907
903
  /**
908
904
  * Interface to provide drag options which can be passed to enableDragToDocument to change the drag behavior.
909
905
  */
910
- declare interface DragOptions {
906
+ export declare interface DragOptions {
911
907
  /**
912
908
  * Use preview size for the drag image instead of the element size
913
909
  */
@@ -1778,7 +1774,7 @@ declare type UnproxyOrClone<T> = T extends RemoteObject<ProxyMarked> ? Local<T>
1778
1774
  /**
1779
1775
  * Callback to unregister iframe from the add-on SDK.
1780
1776
  */
1781
- declare type UnregisterIframe = () => void;
1777
+ export declare type UnregisterIframe = () => void;
1782
1778
 
1783
1779
  /**
1784
1780
  * Types of dialog variants supported.