diff --git a/common/changes/@adobe/ccweb-add-on-sdk-types/release-20250303_2025-03-03-07-41.json b/common/changes/@adobe/ccweb-add-on-sdk-types/release-20250303_2025-03-03-07-41.json new file mode 100644 index 0000000..8f0cd3c --- /dev/null +++ b/common/changes/@adobe/ccweb-add-on-sdk-types/release-20250303_2025-03-03-07-41.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@adobe/ccweb-add-on-sdk-types", + "comment": "Exposed paragraph style APIs and stabalized APIs", + "type": "minor" + } + ], + "packageName": "@adobe/ccweb-add-on-sdk-types" +} \ No newline at end of file diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 1a3f6a6..9c1f40a 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -567,25 +567,28 @@ importers: ../../packages/wxp-sdk-types: dependencies: + '@swc/helpers': + specifier: 0.5.12 + version: 0.5.12 gl-matrix: specifier: 3.3.0 version: 3.3.0 tslib: - specifier: 2.6.2 - version: 2.6.2 + specifier: 2.7.0 + version: 2.7.0 devDependencies: '@types/node': - specifier: 16.18.36 - version: 16.18.36 + specifier: 18.18.2 + version: 18.18.2 prettier: specifier: 2.8.0 version: 2.8.0 ts-node: specifier: 10.9.2 - version: 10.9.2(@types/node@16.18.36)(typescript@5.4.5) + version: 10.9.2(@types/node@18.18.2)(typescript@5.6.3) typescript: - specifier: 5.4.5 - version: 5.4.5 + specifier: 5.6.3 + version: 5.6.3 ../../packages/wxp-ssl: dependencies: @@ -1049,7 +1052,7 @@ packages: strip-ansi: 6.0.1 supports-color: 8.1.1 supports-hyperlinks: 2.3.0 - tslib: 2.6.2 + tslib: 2.7.0 widest-line: 3.1.0 wrap-ansi: 7.0.0 dev: true @@ -1082,7 +1085,7 @@ packages: supports-color: 8.1.1 supports-hyperlinks: 2.3.0 ts-node: 10.9.2(@types/node@16.18.36)(typescript@5.4.5) - tslib: 2.6.2 + tslib: 2.7.0 widest-line: 3.1.0 wordwrap: 1.0.0 wrap-ansi: 7.0.0 @@ -1381,7 +1384,7 @@ packages: /@swc/helpers@0.5.12: resolution: {integrity: sha512-KMZNXiGibsW9kvZAO1Pam2JPTDBm+KSHMMHWdsyI/1DbIZjT2A6Gy3hblVXUMEDvUAKq+e0vL0X0o54owWji7g==} dependencies: - tslib: 2.6.2 + tslib: 2.7.0 dev: false /@tootallnate/once@1.1.2: @@ -1429,7 +1432,7 @@ packages: resolution: {integrity: sha512-oyl4jvAfTGX9Bt6Or4H9ni1Z447/tQuxnZsytsCaExKlmJiU8sFgnIBRzJUpKwB5eWn9HuBYlUlVA74q/yN0eQ==} dependencies: '@types/connect': 3.4.36 - '@types/node': 16.18.36 + '@types/node': 18.18.2 dev: true /@types/chai-as-promised@7.1.3: @@ -1445,7 +1448,7 @@ packages: /@types/cli-progress@3.11.5: resolution: {integrity: sha512-D4PbNRbviKyppS5ivBGyFO29POlySLmA2HyUFE4p5QGazAMM3CwkKWcvTl8gvElSuxRh6FPKL8XmidX873ou4g==} dependencies: - '@types/node': 16.18.36 + '@types/node': 18.18.2 /@types/configstore@2.1.1: resolution: {integrity: sha512-YY+hm3afkDHeSM2rsFXxeZtu0garnusBWNG1+7MknmDWQHqcH2w21/xOU9arJUi8ch4qyFklidANLCu3ihhVwQ==} @@ -1454,7 +1457,7 @@ packages: /@types/connect@3.4.36: resolution: {integrity: sha512-P63Zd/JUGq+PdrM1lv0Wv5SBYeA2+CORvbrXbngriYY0jzLUWfQMQQxOhjONEz/wlHOAxOdY7CY65rgQdTjq2w==} dependencies: - '@types/node': 16.18.36 + '@types/node': 18.18.2 dev: true /@types/cors@2.8.12: @@ -1478,7 +1481,7 @@ packages: /@types/express-serve-static-core@4.17.37: resolution: {integrity: sha512-ZohaCYTgGFcOP7u6aJOhY9uIZQgZ2vxC2yWoArY+FeDXlqeH66ZVBjgvg+RLVAS/DWNq4Ap9ZXu1+SUQiiWYMg==} dependencies: - '@types/node': 16.18.36 + '@types/node': 18.18.2 '@types/qs': 6.9.8 '@types/range-parser': 1.2.5 '@types/send': 0.17.2 @@ -1507,14 +1510,14 @@ packages: resolution: {integrity: sha512-rTtf75rwyP9G2qO5yRpYtdJ6aU1QqEhWbtW55qEgquEDa6bXW0s2TWZfDm02GuppjEozOWG/F2UnPq5hAQb+gw==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 16.18.36 + '@types/node': 18.18.2 dev: false /@types/glob@7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 16.18.36 + '@types/node': 18.18.2 /@types/hjson@2.4.3: resolution: {integrity: sha512-EDixutNn3FQwa5HdET+Tx0h7TirP2knJa9TB21ySqr8XVqT/VsvvOwnanTLHUOOpNofcUhkRKhOk0Wh4YD9RSA==} @@ -1549,7 +1552,7 @@ packages: /@types/mkdirp@0.5.2: resolution: {integrity: sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg==} dependencies: - '@types/node': 16.18.36 + '@types/node': 18.18.2 dev: false /@types/mocha@9.1.1: @@ -1567,6 +1570,9 @@ packages: /@types/node@16.18.36: resolution: {integrity: sha512-8egDX8dE50XyXWH6C6PRCNkTP106DuUrvdrednFouDSmCi7IOvrqr0frznfZaHifHH/3aq/7a7v9N4wdXMqhBQ==} + /@types/node@18.18.2: + resolution: {integrity: sha512-u1cis+7wLZMPI62EozwsqvgMZyauczyiqRRu/vcqZKI5N5yidrJHqOFxEg5seT8adc96Q6Yczg1c0DlqGtMJMw==} + /@types/node@8.10.66: resolution: {integrity: sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==} dev: false @@ -1593,7 +1599,7 @@ packages: resolution: {integrity: sha512-YyP+VfeaqAyFmXoTh3HChxOQMyjByRMsHU7kc5KOJkSlXudhMhQIALbYV7rHh/l8d2lX3VUQzprrcAgWdRuU8g==} dependencies: '@types/glob': 7.2.0 - '@types/node': 16.18.36 + '@types/node': 18.18.2 dev: false /@types/semver@7.3.4: @@ -1604,7 +1610,7 @@ packages: resolution: {integrity: sha512-aAG6yRf6r0wQ29bkS+x97BIs64ZLxeE/ARwyS6wrldMm3C1MdKwCcnnEwMC1slI8wuxJOpiUH9MioC0A0i+GJw==} dependencies: '@types/mime': 1.3.3 - '@types/node': 16.18.36 + '@types/node': 18.18.2 dev: true /@types/serve-static@1.15.3: @@ -1612,7 +1618,7 @@ packages: dependencies: '@types/http-errors': 2.0.2 '@types/mime': 3.0.2 - '@types/node': 16.18.36 + '@types/node': 18.18.2 dev: true /@types/sinon-chai@3.2.10: @@ -1652,7 +1658,7 @@ packages: resolution: {integrity: sha512-vPXzCLmRp74e9LsP8oltnWKTH+jBwt86WgRUb4Pc9Lf3pkMVGyvIo2gm9bODeGfCay2DBB/hAWDuvf07JcK4rw==} dependencies: '@types/expect': 1.20.4 - '@types/node': 16.18.36 + '@types/node': 18.18.2 dev: true /@types/ws@8.5.3: @@ -2855,7 +2861,7 @@ packages: dependencies: '@types/chai': 4.2.14 '@types/lodash': 4.14.199 - '@types/node': 16.18.36 + '@types/node': 18.18.2 '@types/sinon': 9.0.8 lodash: 4.17.21 mock-stdin: 1.0.0 @@ -5326,7 +5332,7 @@ packages: /rxjs@7.8.1: resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} dependencies: - tslib: 2.6.2 + tslib: 2.7.0 dev: true /safe-buffer@5.1.2: @@ -5961,6 +5967,37 @@ packages: v8-compile-cache-lib: 3.0.1 yn: 3.1.1 + /ts-node@10.9.2(@types/node@18.18.2)(typescript@5.6.3): + resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 18.18.2 + acorn: 8.10.0 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.6.3 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: true + /ts-sinon@2.0.1: resolution: {integrity: sha512-uI5huDCY6Gw6Yczmyd/Jcu8gZZYtWO0HakPShvDmlrgcywLyFZ7lgWt1y+gd/x79ReHh+rhMAJkhQkGRnPNikw==} dependencies: @@ -5977,6 +6014,9 @@ packages: /tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + /tslib@2.7.0: + resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} + /tuf-js@1.1.7: resolution: {integrity: sha512-i3P9Kgw3ytjELUfpuKVDNBJvk4u5bXL6gskv572mcevPbSKCV3zt3djhmlEQ65yERjIbOSncy7U4cQJaB1CBCg==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -6032,6 +6072,12 @@ packages: engines: {node: '>=14.17'} hasBin: true + /typescript@5.6.3: + resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + /unique-filename@1.1.1: resolution: {integrity: sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==} dependencies: diff --git a/packages/wxp-sdk-types/package.json b/packages/wxp-sdk-types/package.json index 99cc1b0..bd6426a 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.11.0", + "version": "1.12.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 718c34d..581c5d9 100644 --- a/packages/wxp-sdk-types/sandbox/express-document-sdk.d.ts +++ b/packages/wxp-sdk-types/sandbox/express-document-sdk.d.ts @@ -30,61 +30,31 @@ import { mat2d } from "gl-matrix"; */ export declare class AddOnData { /** - * - * - * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. - * - * @experimental * Sets a private metadata entry on the node. * @param key - The key for the private metadata entry. * @param value - The value for the private metadata entry. */ setItem(key: string, value: string): void; /** - * - * - * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. - * - * @experimental * Retrieves the private metadata value for the specified key on the node. * @param key - The key of the private metadata entry to retrieve. * @returns The value of the private metadata entry. */ getItem(key: string): string | undefined; /** - * - * - * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. - * - * @experimental * Removes a single private metadata entry on the node. * @param key - The key of the private metadata entry to remove. */ removeItem(key: string): void; /** - * - * - * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. - * - * @experimental * Clears all private metadata entries on the node. */ clear(): void; /** - * - * - * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. - * - * @experimental * @returns an array of all keys for the private metadata entries on the node. */ keys(): string[]; /** - * - * - * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. - * - * @experimental * @returns an object with the remaining quota for private metadata on the node for this add-on. * The object contains the following properties: * - sizeInBytes: The remaining quota size in bytes (maximum 3KB). @@ -177,7 +147,7 @@ export declare class ArtboardList extends RestrictedItemList { * Artboards are always contained on a {@link PageNode}; when a page contains multiple artboards, the artboards represent * "scenes" in a linear timeline sequence. * - * To create new artboards, see {@link ArtboardList.addArtboard}. + * To create a new artboard, see {@link ArtboardList.addArtboard}. * * Please note that creating and deleting an artboard in a single frame will crash the editor. */ @@ -319,11 +289,6 @@ declare abstract class BaseFont { */ export declare class BaseNode { /** - * - * - * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. - * - * @experimental * Get {@link AddOnData} reference for managing the private metadata on this node for this add-on. */ get addOnData(): AddOnData; @@ -367,6 +332,47 @@ export declare class BaseNode { removeFromParent(): void; } +/** + * + * + * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. + * + * @experimental + * BaseParagraphListStyle interface represents common properties shared between ordered and unordered list types. + */ +declare interface BaseParagraphListStyle { + /** A value from 0-8 that specifies indent/nesting level. Default is 0 if not provided. */ + indentLevel?: number; +} + +/** + * + * + * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. + * + * @experimental + * Base paragraph styles that can be applied to an entire paragraph atomically. + * Excludes list style settings, which differ between the getter-oriented {@link ParagraphStyles} interface and the + * setter-oriented {@link ParagraphStylesRangeInput}. + */ +declare interface BaseParagraphStyles { + /** + * Space before paragraph (in points). It does not affect the first paragraph. It is additive to previous paragraph's spaceAfter + * (adjacent spacing does not merge/collapse together). + */ + spaceBefore: number; + /** + * Space after paragraph (in points). It does not affect the last paragraph. It is additive to the next paragraph's spaceBefore + * (adjacent spacing does not merge/collapse together). + */ + spaceAfter: number; + /** + * Spacing between lines, aka leading, expressed as a multiple of the font size's default spacing - ex. 1.5 = 150% of normal. + * It only affects the space *between* lines, not the space above the first line or below the last line. + */ + lineSpacing: number; +} + /** * Represents a bitmap image resource. Use {@link Editor.loadBitmapImage} to create a BitmapImage, and then {@link Editor.createImageContainer} * to display it in the document by creating a MediaContainerNode structure. @@ -462,8 +468,7 @@ export declare interface CharacterStylesInput extends Partial - * - * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. - * - * @experimental - * Registers a handler for editor events such as selection change. - * The registered callback will be invoked when the specified event occurs. - * Note: Do not attempt to make changes to the document in response to a selection change callback because it may destabilize the application. - * @param eventName - an editor event name. - * @param callback - a callback to be registered for an editor event. - * @returns a unique ID for the registered event handler. - */ - on(eventName: EditorEvent, callback: EditorEventHandler): EventHandlerId; - /** - * - * - * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. - * - * @experimental - * Unregisters handlers for editor events like selection change. - * @param eventName - an editor event name. - * @param handlerId - a unique ID returned by `editor.context.on` API. - * Callback that was previously registered will be removed and will no more be invoked when the event occurs. - */ - off(eventName: EditorEvent, handlerId: EventHandlerId): void; } /** @@ -795,11 +790,6 @@ export declare class Editor { export declare const editor: ExpressEditor; /** - * - * - * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. - * - * @experimental * This enum represents the supported editor events. */ export declare enum EditorEvent { @@ -807,11 +797,6 @@ export declare enum EditorEvent { } /** - * - * - * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. - * - * @experimental * This type represents function signature for the editor event handler callback. */ export declare type EditorEventHandler = () => void; @@ -843,11 +828,6 @@ export declare class EllipseNode extends FillableNode { } /** - * - * - * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. - * - * @experimental * This type represents unique id of each event handler callback that is registered. */ export declare type EventHandlerId = string; @@ -871,7 +851,7 @@ declare class ExpressFonts extends Fonts {} export declare class ExpressRootNode extends BaseNode { /** * The pages of the document. All visual content is contained on artboards within the pages. - * To create new pages, see {@link PageList.addPage}. + * To create a new page, see {@link PageList.addPage}. */ get pages(): PageList; } @@ -1126,7 +1106,7 @@ export declare class ItemList extends RestrictedItemList /** * A LineNode represents a simple vector line in the scenegraph – a single straight-line segment. * - * To create new lines, see {@link Editor.createLine}. + * To create a new line, see {@link Editor.createLine}. */ export declare class LineNode extends StrokableNode { static readonly DEFAULT_START_X = 0; @@ -1313,7 +1293,9 @@ declare class Node extends VisualNode { get transformMatrix(): mat2d; /** * The node's lock/unlock state. Locked nodes are excluded from the selection (see {@link Context.selection}), and - * cannot be edited by the user unless they are unlocked first. + * cannot be edited by the user in the UI unless they are unlocked first. Operations on locked nodes using the API + * are permitted. However, please consider if modifying a locked node would align with user expectations + * before using the API to make changes to locked nodes. */ get locked(): boolean; set locked(locked: boolean); @@ -1326,10 +1308,61 @@ declare class Node extends VisualNode { } export { Node as Node }; +/** + * + * + * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. + * + * @experimental + * Numbering types used to display ordered lists: 1, A, a, I, i 01, 001. + */ +export declare enum OrderedListNumbering { + numeric = 1, + uppercaseAlpha = 2, + lowercaseAlpha = 3, + uppercaseRomanNum = 4, + lowercaseRomanNum = 5, + singleZeroPrefixNumeric = 7, + doubleZeroPrefixNumeric = 8 +} + +/** + * + * + * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. + * + * @experimental + * OrderedListStyle represents the style of an ordered list. + */ +export declare type OrderedListStyle = Required; + +/** + * + * + * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. + * + * @experimental + * Interface for specifying an ordered list style, such as a numbered list. + */ +export declare interface OrderedListStyleInput extends BaseParagraphListStyle { + type: ParagraphListType.ordered; + /** + * The numbering style to use. If undefined, it defaults to a different type depending on the paragraph's indent level. + * The defaults for increasing indent are 1, a, i, I, and then they repeat. + * These markers and the prefix/postfix strings (if any) are displayed using the same font as the start of the + * paragraph's text content. + */ + numbering?: OrderedListNumbering; + /** Additional string to display before each sequence number/letter, e.g. "(" */ + prefix?: string; + /** Additional string to display after each sequence number/letter, e.g. ")" or "." */ + postfix?: string; +} + /** * PageList represents an ordered list of PageNodes, all of which are children of the root node of the document's "scenegraph" * artwork tree (see {@link ExpressRootNode}). A page contains one or more artboards, representing "scenes" in a linear timeline - * sequence. Those artboards in turn contain all the visual content of the document. + * sequence. Those artboards, in turn, contain all the visual content of the document. * * PageList also provides APIs for adding/removing pages from the document. PageList is never empty: it is illegal to * remove the last remaining page from the list. @@ -1348,7 +1381,7 @@ export declare class PageList extends RestrictedItemList { /** * A PageNode represents a page in the document, a child of the root node of the document's "scenegraph" artwork tree * (see {@link ExpressRootNode}). A page contains one or more artboards, representing "scenes" in a linear timeline - * sequence. Those artboards in turn contain all the visual content of the document. + * sequence. Those artboards, in turn, contain all the visual content of the document. * * To create new pages, see {@link PageList.addPage}. */ @@ -1384,6 +1417,69 @@ export declare class PageNode extends BaseNode implements Readonly + * + * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. + * + * @experimental + * Indicates list type: see {@link UnorderedListStyleInput} and {@link OrderedListStyleInput}. + */ +export declare enum ParagraphListType { + unordered = 0, + ordered = 1 +} + +/** + * + * + * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. + * + * @experimental + * Text styles that must be applied to an entire paragraph atomically. (Contrast with CharacterStyles which can be applied to + * any range of characters, even a short span like one single word). + */ +export declare interface ParagraphStyles extends BaseParagraphStyles { + list?: OrderedListStyle | UnorderedListStyle; +} + +/** + * + * + * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. + * + * @experimental + * The variant of {@link ParagraphStyles} with all optional style fields is used to apply ParagraphStyles(). When using that API, + * any fields not specified are left unchanged, preserving the text's existing styles. + */ +export declare interface ParagraphStylesInput extends Partial { + list?: OrderedListStyleInput | UnorderedListStyleInput; +} + +/** + * + * + * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. + * + * @experimental + * A set of {@link ParagraphStyles} and the text range they apply to. It is seen in the paragraphStyleRanges getter. + */ +export declare interface ParagraphStylesRange extends ParagraphStyles, StyleRange {} + +/** + * + * + * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. + * + * @experimental + * A variant of {@link ParagraphStylesRange} with all style fields optional and the text range they apply to. Used for the + * paragraphStyleRanges setter. When invoking the setter, any fields not specified are reset to their defaults. + * + * Paragraphs are separated by newline characters (`\n`). The ranges specified here should align with + * those boundaries. + */ +export declare interface ParagraphStylesRangeInput extends ParagraphStylesInput, StyleRange {} + /** * A PathNode represents a generic vector path shape in the scenegraph. Paths cannot be edited through this API * yet, only read. @@ -1461,7 +1557,7 @@ export declare class ReadOnlyItemList { /** * All items in the list, as a static array. Mutations that occur later are not reflected in an array returned earlier. */ - toArray(): Readonly; + toArray(): readonly T[]; } declare interface Rect { @@ -1479,7 +1575,7 @@ export declare interface RectangleGeometry { /** * A RectangleNode represents a rectangle shape in the scenegraph. * - * To create new rectangles, see {@link Editor.createRectangle}. + * To create a new rectangle, see {@link Editor.createRectangle}. */ export declare class RectangleNode extends FillableNode implements IRectangularNode { /** @@ -1793,7 +1889,7 @@ export declare class TextContentModel { * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. * * @experimental - * The character styles applied to different ranges of this text content. When setting character styles, any style + * The character styles are applied to different ranges of this text content. When setting character styles, any style * properties that are not provided are reset to their defaults (contrast to {@link applyCharacterStyles} which * preserves the text's existing styles for any fields not specified). When *getting* styles, all fields are always * provided. @@ -1803,6 +1899,31 @@ export declare class TextContentModel { */ get characterStyleRanges(): readonly CharacterStylesRange[]; set characterStyleRanges(styles: readonly CharacterStylesRangeInput[]); + /** + * + * + * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. + * + * @experimental + * The styles applied to different paragraphs of this text content. + */ + get paragraphStyleRanges(): readonly ParagraphStylesRange[]; + /** + * + * + * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. + * + * @experimental + * Apply styles to different paragraphs of this text content. Any style properties that are not provided are reset to their defaults. + * When **getting** styles, all properties are always provided. + * + * Paragraphs are separated by newline characters (`\n`). The ranges specified here should align with + * those boundaries. If multiple ranges provided overlap a single paragraph, the first one to overlap is applied to the + * entire paragraph. + * + * @throws if the text content contains fonts unavailable to the current user and an ordered-list style is being applied. + */ + set paragraphStyleRanges(styles: readonly ParagraphStylesRangeInput[]); /** * * @@ -1815,8 +1936,10 @@ export declare class TextContentModel { * default styles. * @param styles - The styles to apply. - * @param range - The start and length of character sequence to which the styles should be applied. - * If not specified the styles will be applied to the entire piece of text content flow. + * @param range -The start and length of the character sequence to which the styles should be applied. + * The styles will be applied to the entire text content flow if not specified. + * If the specified range doesn't align well with the paragraph boundaries, the range will be expanded to cover the + * entire paragraphs, it overlaps. */ applyCharacterStyles( styles: CharacterStylesInput, @@ -1825,6 +1948,28 @@ export declare class TextContentModel { length: number; } ): void; + /** + * + * + * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. + * + * @experimental + * Apply one or more styles to the paragraphs in the given range, leaving any style properties that were not specified + * unchanged. Does not modify any styles in the text outside this range. Contrast to the {@link paragraphStyleRanges} + * setter, which specifies new style range(s) for the entire text at once, and resets any unspecified properties back to + * default styles. + + * @param styles - The styles to apply. + * @param range - The start and length of character sequence to which the styles should be applied. + * If not specified the styles will be applied to the entire piece of text content flow. + */ + applyParagraphStyles( + styles: ParagraphStylesInput, + range?: { + start: number; + length: number; + } + ): void; } /** @@ -1906,10 +2051,11 @@ export declare class TextNode extends Node { * Sets the layout mode of the TextNode "frame." * * If this TextNode is part of a multi-frame text content flow, it must be configured to use {@link AreaTextLayout}. Other - * layout modes are only available for single-frame text. + * 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 TextNode is part of a multi-frame text content flow and the layout is not {@link AreaTextLayout}. + * @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}. */ set layout(layout: PointTextLayout | AutoHeightTextLayout | AreaTextLayout); } @@ -1945,6 +2091,37 @@ export declare class UnavailableFont extends BaseFont { */ export declare class UnknownNode extends Node {} +/** + * + * + * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. + * + * @experimental + * UnorderedListStyle represents the style of an unordered list. + */ +export declare type UnorderedListStyle = Required; + +/** + * + * + * **IMPORTANT:** This is currently ***experimental only*** and should not be used in any add-ons you will be distributing until it has been declared stable. To use it, you will first need to set the `experimentalApis` flag to `true` in the [`requirements`](../../../manifest/index.md#requirements) section of the `manifest.json`. + * + * @experimental + * Interface for specifying an unordered list style, such as a bullet list. + */ +export declare interface UnorderedListStyleInput extends BaseParagraphListStyle { + type: ParagraphListType.unordered; + /** + * Marker symbol to use. If undefined, it defaults to a different symbol depending on the paragraph's indent level. + * The defaults for increasing indent are: •, ◦, ◼, ◻, and then they repeat. + * Markers are always displayed using the default font (SourceSans3 Regular), regardless of the font(s) used in the + * paragraph's text content. A default marker is used instead if the default font does not support the symbol. + * + * Text or Unicode glyphs are accepted to represent the list marker. + */ + marker?: string; +} + /** * * @@ -1962,11 +2139,11 @@ export declare interface UnsupportedTextLayout { export declare class Viewport { /** * Adjusts the viewport to make the node's bounds visible on-screen, assuming all bounds are within the artboard bounds. - * Makes the node's {@link ArtboardNode} or {@link PageNode} visible if they were not already - * (which may result in {@link Context.selection} being cleared). It is strongly recomended - * to further draw user's attention to the node by setting it as the {@link Context.selection} following this call. + * Makes the node's {@link ArtboardNode} or {@link PageNode} visible if they were not already visible + * (which may result in {@link Context.selection} being cleared). It is strongly recommended + * to further draw user's attention to the node, set it as the {@link Context.selection} following this call. * - * After this call, the value of {@link Context.insertionParent} will always be the node's containing {@link ArtboardNode}. + * After this call, the value of {@link Context.insertionParent} will always be the node containing {@link ArtboardNode}. * * Note that the node might still not appear visible if: * - Its animation settings make it invisible at the beginning of the {@link ArtboardNode} "scene". diff --git a/packages/wxp-sdk-types/ui/ui-sdk.d.ts b/packages/wxp-sdk-types/ui/ui-sdk.d.ts index 10fa863..3f5229f 100644 --- a/packages/wxp-sdk-types/ui/ui-sdk.d.ts +++ b/packages/wxp-sdk-types/ui/ui-sdk.d.ts @@ -238,7 +238,6 @@ declare interface ApplicationBase { dragOptions?: DragOptions ): DisableDragToDocument; /** - * @experimental - Experimental API * Register iframe with the add-on SDK. * @param element - HTMLIframeElement to be registered. * @returns UnregisterIframe - Callback to unregister iframe from the add-on SDK. @@ -745,6 +744,11 @@ declare interface Document_2 { * Import a presentation to the document. */ importPresentation(blob: Blob, attributes: MediaAttributes): void; + /** + * @experimental - Experimental API + * Run print quality check + */ + runPrintQualityCheck(options: PrintQualityCheckOptions): void; } export { Document_2 as Document }; @@ -1133,6 +1137,10 @@ export declare interface PageMetadata { * Whether page contains timelines */ hasTemporalContent: boolean; + /** + * Whether the page is blank + */ + isBlank?: boolean; /** * Pixels per inch of the page */ @@ -1141,21 +1149,16 @@ export declare interface PageMetadata { * Whether page is ready to print */ isPrintReady?: boolean; + /** + * Template details of the page + */ + templateDetails?: TemplateDetails; } /** * Options for fetching page metadata */ -export declare interface PageMetadataOptions { - /** - * Page range of the document to get the metadata - */ - range: Range_2; - /** - * Ids of the pages (Only required if the range is "specificPages") - */ - pageIds?: string[]; -} +export declare interface PageMetadataOptions extends RangeOptions {} export declare interface PageRendition extends Rendition { /** @@ -1350,6 +1353,12 @@ export declare interface PngRenditionOptions extends RenditionOptions { }; } +/** + * @experimental - Experimental API + * Options for running print quality check + */ +export declare interface PrintQualityCheckOptions extends RangeOptions {} + /** * Takes a type and wraps it in a Promise, if it not already is one. * This is to avoid `Promise>`. @@ -1392,6 +1401,20 @@ declare enum Range_2 { } export { Range_2 as Range }; +/** + * Options for providing range of pages + */ +export declare interface RangeOptions { + /** + * Page range of the document + */ + range: Range_2; + /** + * Ids of the pages (Only required if the range is "specificPages") + */ + pageIds?: string[]; +} + /** * Takes the raw type of a remote object or function in the other thread and returns the type as it is visible to * the local thread from the proxy return value of `Runtime.apiProxy()`. @@ -1484,19 +1507,11 @@ export declare enum RenditionIntent { print = "print" } -export declare interface RenditionOptions { - /** - * Range of the document to get the rendition - */ - range: Range_2; +export declare interface RenditionOptions extends RangeOptions { /** * Format of the rendition */ format: RenditionFormat; - /** - * Ids of the pages (Only required if the range is "specificPages") - */ - pageIds?: string[]; } /** @@ -1584,6 +1599,20 @@ export declare interface SearchAction extends PanelAction { export declare type SimpleDialogOptions = AlertDialogOptions | InputDialogOptions; +/** + * Represents template data for a page + */ +export declare interface TemplateDetails { + /** + * Unique id of the template + */ + id: string; + /** + * Creative intent of the template + */ + creativeIntent?: string; +} + /** * Interface that contains methods and properties that are Application UI related. */ @@ -1605,7 +1634,6 @@ export declare interface UI { */ readonly locales: string[]; /** - * @experimental - Experimental API * Opens an Editor Panel * @param panel - one of {@link EditorPanel} * @param action - optional action to be performed on the panel {@link PanelAction} @@ -1629,7 +1657,6 @@ declare type Unpromisify

= P extends Promise ? T : P; declare type UnproxyOrClone = T extends RemoteObject ? Local : T; /** - * @experimental - Experimental API * Callback to unregister iframe from the add-on SDK. */ declare type UnregisterIframe = () => void; diff --git a/rush.json b/rush.json index f9924dc..ca5ec7e 100644 --- a/rush.json +++ b/rush.json @@ -43,7 +43,7 @@ "packageName": "@adobe/ccweb-add-on-scripts", "projectFolder": "packages/wxp-scripts", "reviewCategory": "production", - "shouldPublish": true + "shouldPublish": false }, { "packageName": "@adobe/ccweb-add-on-ssl", @@ -61,7 +61,7 @@ "packageName": "@adobe/ccweb-add-on-sdk-types", "projectFolder": "packages/wxp-sdk-types", "reviewCategory": "production", - "shouldPublish": false + "shouldPublish": true } ] }