diff --git a/README.md b/README.md index fa60042..1afd74c 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,8 @@ To quickly get started building an Adobe Express add-on, follow these steps, or You'll need: -- Node 16 or better -- NPM 8 or better +- Node 18 or better +- NPM 10 or better - A text editor - A free Adobe account — don't have one? Get one [here](https://www.adobe.com/express/) diff --git a/common/changes/@adobe/ccweb-add-on-sdk-types/release-20250430_2025-04-29-09-35.json b/common/changes/@adobe/ccweb-add-on-sdk-types/release-20250430_2025-04-29-09-35.json new file mode 100644 index 0000000..527b6d8 --- /dev/null +++ b/common/changes/@adobe/ccweb-add-on-sdk-types/release-20250430_2025-04-29-09-35.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@adobe/ccweb-add-on-sdk-types", + "comment": "Renamed enum TextType to TextLayout, ColorPickerEvent enum to ColorPickerEvents, updated TextAlignment enum, stabilized ColorPicker API, exported payload types ", + "type": "minor" + } + ], + "packageName": "@adobe/ccweb-add-on-sdk-types" +} \ No newline at end of file diff --git a/packages/wxp-sdk-types/package.json b/packages/wxp-sdk-types/package.json index f58b10d..4768944 100644 --- a/packages/wxp-sdk-types/package.json +++ b/packages/wxp-sdk-types/package.json @@ -1,6 +1,6 @@ { "name": "@adobe/ccweb-add-on-sdk-types", - "version": "1.15.0", + "version": "1.16.0", "author": "Adobe", "license": "MIT", "description": "Type definitions for Adobe Creative Cloud Web Add-on SDK.", diff --git a/packages/wxp-sdk-types/sandbox/express-document-sdk.d.ts b/packages/wxp-sdk-types/sandbox/express-document-sdk.d.ts index bb20956..3181921 100644 --- a/packages/wxp-sdk-types/sandbox/express-document-sdk.d.ts +++ b/packages/wxp-sdk-types/sandbox/express-document-sdk.d.ts @@ -81,7 +81,7 @@ declare namespace ApiConstants { StrokePosition, StrokeType, TextAlignment, - TextType, + TextLayout, EditorEvent, VisualEffectType, ParagraphListType, @@ -105,7 +105,7 @@ declare interface ApiModuleExport { * @experimental */ export declare interface AreaTextLayout { - type: TextType.area; + type: TextLayout.area; /** * The width of the text node in pixels. */ @@ -120,6 +120,11 @@ export declare interface AreaTextLayout { * * * *Do not depend on the literal numeric values of these constants*, as they may change. Always reference the enum identifiers in your code. + * + * + * + * *Additional arrowhead types may be added in the future.* If your code has different branches or cases depending on arrow type, + * always have a default/fallback case to handle any unknown values you may encounter. */ declare enum ArrowHeadType { none = 0, @@ -201,7 +206,7 @@ export declare class ArtboardNode extends VisualNode implements IRectangularNode * @experimental */ export declare interface AutoHeightTextLayout { - type: TextType.autoHeight; + type: TextLayout.autoHeight; /** * The width of the text node in pixels. */ @@ -1477,7 +1482,7 @@ export declare interface Point { * @experimental */ export declare interface PointTextLayout { - type: TextType.autoWidth; + type: TextLayout.autoWidth; } /** @@ -1799,11 +1804,17 @@ declare interface StyleRange { * * * *Do not depend on the literal numeric values of these constants*, as they may change. Always reference the enum identifiers in your code. + * + * + * + * *Additional alignment types may be added in the future.* If your code has different branches or cases depending on text alignment, + * always have a default/fallback case to handle any unknown values you may encounter. */ declare enum TextAlignment { left = 1, right = 2, - center = 3 + center = 3, + justifyLeft = 4 } /** @@ -1917,6 +1928,43 @@ export declare class TextContentModel { hasUnavailableFonts(): boolean; } +/** + * + * + * *Do not depend on the literal numeric values of these constants*, as they may change. Always reference the enum identifiers in your code. + * + * + * + * *Additional text layout types may be added in the future.* If your code has different branches or cases depending on layout type, + * always have a default/fallback case to handle any unknown values you may encounter. + */ +declare enum TextLayout { + /** + * Area text: both width and height are explicitly set. If text content is too long to fit, the end of the text will be + * clipped. If text content is short, the frame's bounds will occupy extra height that is just blank space. + */ + area = 1, + /** + * Auto-height text: Width is explicitly set, and text wraps to use as much vertical space as necessary to display the + * full content. + */ + autoHeight = 2, + /** + * Auto-width, aka point text: both width and height are automatically determined based on the content. There is no + * automatic line wrapping, so the text will all be on one line unless the text contains explicit newlines. + */ + autoWidth = 3, + /** + * Text is arranged in a circle or arc. The API does not yet support setting or reading the details of this layout style. + */ + circular = 4, + /** + * Aka "Dynamic" layout in the UI: text size and styles are automatically varied to create an attractive multi-line layout. + * The API does not yet support setting or reading the details of this layout style. + */ + magicFit = 5 +} + /** * A TextNode represents a text display frame in the scenegraph. It may display an entire piece of text, or sometimes just * 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 { * If this TextNode is part of a multi-frame text content flow, it must be configured to use {@link AreaTextLayout}. Other * layout modes, except for {@link AreaTextLayout}, are only available for single-frame text. * - * @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. + * @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. * @throws if {@link TextNode} is part of a multi-frame text content flow and the layout is not {@link AreaTextLayout}. * @throws if {@link TextNode} is not a part of a multi-frame text content flow and the layout is {@link AreaTextLayout}. */ @@ -2021,25 +2069,6 @@ declare interface TextRange { length: number; } -/** - * - * - * *Do not depend on the literal numeric values of these constants*, as they may change. Always reference the enum identifiers in your code. - */ -declare enum TextType { - area = 1, - /** - * Soft bottom - */ - autoHeight = 2, - /** - * Point text - */ - autoWidth = 3, - circular = 4, - magicFit = 5 -} - /** * Font the current user does not have access or licensing permissions to create / edit content with. */ @@ -2091,7 +2120,7 @@ export declare interface UnorderedListStyleInput extends BaseParagraphListStyle * @experimental */ export declare interface UnsupportedTextLayout { - type: TextType.magicFit | TextType.circular; + type: TextLayout.magicFit | TextLayout.circular; } /** diff --git a/packages/wxp-sdk-types/ui/ui-sdk.d.ts b/packages/wxp-sdk-types/ui/ui-sdk.d.ts index 78923f2..1b84ba8 100644 --- a/packages/wxp-sdk-types/ui/ui-sdk.d.ts +++ b/packages/wxp-sdk-types/ui/ui-sdk.d.ts @@ -258,17 +258,15 @@ declare interface ApplicationBase { showModalDialog(dialogOptions: CustomDialogOptions): Promise; /** - * @experimental - Experimental API * Shows a color picker popover anchored to the specified element. * The anchor element must be an instance of HTMLElement. * Custom DOM events are dispatched on the anchor element when the color changes or the color picker closes. - * See {@link ColorPickerEvents} for more details. + * See {@link ColorPickerEvent} for more details. * @param anchorElement - The HTML element to anchor the color picker to. * @param options - Optional configuration options for customizing the color picker behavior and appearance. */ showColorPicker(anchorElement: HTMLElement, options?: ColorPickerOptions): Promise; /** - * @experimental - Experimental API * Hides the color picker popover if it is currently visible. */ hideColorPicker(): Promise; @@ -538,10 +536,9 @@ export declare interface ClientStorage { } /** - * @experimental - Experimental API * Custom DOM events dispatched on the anchor element passed to `showColorPicker()` API. */ -export declare enum ColorPickerEvents { +export declare enum ColorPickerEvent { /** * Color change event dispatched when a color is selected. * The event detail will contain a 'color' property of type string. @@ -554,7 +551,6 @@ export declare enum ColorPickerEvents { } /** - * @experimental - Experimental API * Options that can be passed to the `showColorPicker` API to customize the color picker's behavior and appearance. */ export declare interface ColorPickerOptions { @@ -564,10 +560,12 @@ export declare interface ColorPickerOptions { */ title?: string; /** - * Initial color for the color picker, in 0xRRGGBB format. + * Initial color for the color picker, in hex format. + * Can provide either as a number in 0xRRGGBB or 0xRRGGBBAA format, + * or as a string in "#RRGGBB" or "#RRGGBBAA" format. * Default color is 0xFFFFFF (white). */ - initialColor?: number; + initialColor?: number | string; /** * Placement of the color picker popover relative to the anchor element. * Default placement is ColorPickerPlacement.left. @@ -586,7 +584,6 @@ export declare interface ColorPickerOptions { } /** - * @experimental - Experimental API * Denotes the placement of the color picker popover relative to its anchor element. * Used in the placement option of `showColorPicker()` API. */ @@ -631,7 +628,6 @@ declare namespace Constants { DeviceClass, PlatformType, ColorPickerPlacement, - ColorPickerEvents, AuthorizationStatus }; } @@ -856,21 +852,21 @@ export { Document_2 as Document }; /** * The payload data sent to the document id available event handler. */ -declare interface DocumentIdAvailableEventData { +export declare interface DocumentIdAvailableEventData { documentId: string | undefined; } /** * The payload data sent to the document link available event handler. */ -declare interface DocumentLinkAvailableEventData { +export declare interface DocumentLinkAvailableEventData { documentLink: string | undefined; } /** * The payload data sent to the document title change event handler. */ -declare interface DocumentTitleChangeEventData { +export declare interface DocumentTitleChangeEventData { documentTitle: string; } @@ -907,7 +903,7 @@ export declare interface DragCompletionData { /** * Interface to provide drag options which can be passed to enableDragToDocument to change the drag behavior. */ -declare interface DragOptions { +export declare interface DragOptions { /** * Use preview size for the drag image instead of the element size */ @@ -1778,7 +1774,7 @@ declare type UnproxyOrClone = T extends RemoteObject ? Local /** * Callback to unregister iframe from the add-on SDK. */ -declare type UnregisterIframe = () => void; +export declare type UnregisterIframe = () => void; /** * Types of dialog variants supported. diff --git a/rush.json b/rush.json index 428b3d3..193f458 100644 --- a/rush.json +++ b/rush.json @@ -19,43 +19,43 @@ "packageName": "@adobe/ccweb-add-on-manifest", "projectFolder": "packages/add-on-manifest", "reviewCategory": "production", - "shouldPublish": true + "shouldPublish": false }, { "packageName": "@adobe/ccweb-add-on-core", "projectFolder": "packages/wxp-core", "reviewCategory": "production", - "shouldPublish": true + "shouldPublish": false }, { "packageName": "@adobe/create-ccweb-add-on", "projectFolder": "packages/create-ccweb-add-on", "reviewCategory": "production", - "shouldPublish": true + "shouldPublish": false }, { "packageName": "@adobe/ccweb-add-on-scaffolder", "projectFolder": "packages/wxp-add-on-scaffolder", "reviewCategory": "production", - "shouldPublish": true + "shouldPublish": false }, { "packageName": "@adobe/ccweb-add-on-scripts", "projectFolder": "packages/wxp-scripts", "reviewCategory": "production", - "shouldPublish": true + "shouldPublish": false }, { "packageName": "@adobe/ccweb-add-on-ssl", "projectFolder": "packages/wxp-ssl", "reviewCategory": "production", - "shouldPublish": true + "shouldPublish": false }, { "packageName": "@adobe/ccweb-add-on-analytics", "projectFolder": "packages/wxp-analytics", "reviewCategory": "production", - "shouldPublish": true + "shouldPublish": false }, { "packageName": "@adobe/ccweb-add-on-sdk-types",