@adobe/ccweb-add-on-sdk-types 1.13.0 → 1.14.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.13.0",
3
+ "version": "1.14.0",
4
4
  "author": "Adobe",
5
5
  "license": "MIT",
6
6
  "description": "Type definitions for Adobe Creative Cloud Web Add-on SDK.",
@@ -38,14 +38,15 @@
38
38
  "url": "https://github.com/adobe/create-ccweb-add-on"
39
39
  },
40
40
  "dependencies": {
41
- "tslib": "2.6.2",
42
- "gl-matrix": "3.3.0"
41
+ "tslib": "2.7.0",
42
+ "gl-matrix": "3.3.0",
43
+ "@swc/helpers": "0.5.12"
43
44
  },
44
45
  "devDependencies": {
45
- "@types/node": "16.18.36",
46
+ "@types/node": "18.18.2",
46
47
  "prettier": "2.8.0",
47
48
  "ts-node": "10.9.2",
48
- "typescript": "5.4.5"
49
+ "typescript": "5.7.3"
49
50
  },
50
51
  "scripts": {
51
52
  "clean": "",
package/ui/ui-sdk.d.ts CHANGED
@@ -252,6 +252,22 @@ declare interface ApplicationBase {
252
252
  showModalDialog(dialogOptions: InputDialogOptions): Promise<InputDialogResult>;
253
253
  showModalDialog(dialogOptions: CustomDialogOptions): Promise<CustomDialogResult>;
254
254
 
255
+ /**
256
+ * @experimental - Experimental API
257
+ * Shows a color picker popover anchored to the specified element.
258
+ * The anchor element must be an instance of HTMLElement.
259
+ * Custom DOM events are dispatched on the anchor element when the color changes or the color picker closes.
260
+ * See {@link ColorPickerEvents} for more details.
261
+ * @param anchorElement - The HTML element to anchor the color picker to.
262
+ * @param options - Optional configuration options for customizing the color picker behavior and appearance.
263
+ */
264
+ showColorPicker(anchorElement: HTMLElement, options?: ColorPickerOptions): Promise<void>;
265
+ /**
266
+ * @experimental - Experimental API
267
+ * Hides the color picker popover if it is currently visible.
268
+ */
269
+ hideColorPicker(): Promise<void>;
270
+
255
271
  /**
256
272
  * Triggers/Starts the in-app monetization upgrade flow
257
273
  * @returns if the user is premium user or not
@@ -516,6 +532,78 @@ export declare interface ClientStorage {
516
532
  clear(): Promise<void>;
517
533
  }
518
534
 
535
+ /**
536
+ * @experimental - Experimental API
537
+ * Custom DOM events dispatched on the anchor element passed to `showColorPicker()` API.
538
+ */
539
+ export declare enum ColorPickerEvents {
540
+ /**
541
+ * Color change event dispatched when a color is selected.
542
+ * The event detail will contain a 'color' property of type string.
543
+ */
544
+ colorChange = "colorpicker-color-change",
545
+ /**
546
+ * Color picker closed event dispatched when the color picker is closed.
547
+ */
548
+ close = "colorpicker-close"
549
+ }
550
+
551
+ /**
552
+ * @experimental - Experimental API
553
+ * Options that can be passed to the `showColorPicker` API to customize the color picker's behavior and appearance.
554
+ */
555
+ export declare interface ColorPickerOptions {
556
+ /**
557
+ * Title text displayed in the color picker popover header.
558
+ * Default title is an empty string.
559
+ */
560
+ title?: string;
561
+ /**
562
+ * Initial color for the color picker, in 0xRRGGBB format.
563
+ * Default color is 0xFFFFFF (white).
564
+ */
565
+ initialColor?: number;
566
+ /**
567
+ * Placement of the color picker popover relative to the anchor element.
568
+ * Default placement is ColorPickerPlacement.left.
569
+ */
570
+ placement?: ColorPickerPlacement;
571
+ /**
572
+ * Controls whether the color picker popover should be temporarily hidden while using the EyeDropper tool.
573
+ * Default value is false.
574
+ */
575
+ eyedropperHidesPicker?: boolean;
576
+ /**
577
+ * Controls whether the transparency/alpha slider is shown in the color picker.
578
+ * Default value is false.
579
+ */
580
+ disableAlphaChannel?: boolean;
581
+ }
582
+
583
+ /**
584
+ * @experimental - Experimental API
585
+ * Denotes the placement of the color picker popover relative to its anchor element.
586
+ * Used in the placement option of `showColorPicker()` API.
587
+ */
588
+ export declare enum ColorPickerPlacement {
589
+ /**
590
+ * The color picker popover will be positioned above the anchor element.
591
+ */
592
+ top = "top",
593
+ /**
594
+ * The color picker popover will be positioned below the anchor element.
595
+ */
596
+ bottom = "bottom",
597
+ /**
598
+ * The color picker popover will be positioned to the left of the anchor element.
599
+ */
600
+ left = "left",
601
+ /**
602
+ * The color picker popover will be positioned to the right of the anchor element.
603
+ */
604
+ right = "right"
605
+ }
606
+
519
607
  declare namespace Constants {
520
608
  export {
521
609
  Range_2 as Range,
@@ -536,6 +624,8 @@ declare namespace Constants {
536
624
  PlatformEnvironment,
537
625
  DeviceClass,
538
626
  PlatformType,
627
+ ColorPickerPlacement,
628
+ ColorPickerEvents,
539
629
  AuthorizationStatus
540
630
  };
541
631
  }
package/.mocharc.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "extension": ["ts"],
3
- "node-option": ["experimental-specifier-resolution=node", "loader=ts-node/esm", "no-warnings"],
4
- "spec": ["test/**/*.spec.ts"]
5
- }