@bubblydoo/photoshop-mcp 0.0.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 (88) hide show
  1. package/README.md +138 -0
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.js +7049 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist-readmes/README.md +383 -0
  6. package/dist-runtime/runtime-code.cjs +17124 -0
  7. package/dist-runtime/runtime-code.d.cts +9 -0
  8. package/dist-schemas/@adobe-uxp-types/photoshop/src/index.d.ts +16 -0
  9. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/all-types.d.ts +65 -0
  10. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/Actions.d.ts +230 -0
  11. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/Channel.d.ts +120 -0
  12. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/ColorSampler.d.ts +105 -0
  13. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/Constants.d.ts +1648 -0
  14. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/CoreModules.d.ts +922 -0
  15. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/CountItem.d.ts +86 -0
  16. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/Document.d.ts +931 -0
  17. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/Guide.d.ts +105 -0
  18. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/HistoryState.d.ts +74 -0
  19. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/ImagingModule.d.ts +559 -0
  20. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/Layer.d.ts +1073 -0
  21. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/LayerComp.d.ts +219 -0
  22. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/Objects.d.ts +7 -0
  23. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/PathItem.d.ts +243 -0
  24. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/PathPoint.d.ts +78 -0
  25. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/Photoshop.d.ts +317 -0
  26. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/Selection.d.ts +557 -0
  27. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/SubPathItem.d.ts +69 -0
  28. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/TextItem.d.ts +213 -0
  29. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/Channels.d.ts +81 -0
  30. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/ColorSamplers.d.ts +97 -0
  31. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/CountItems.d.ts +130 -0
  32. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/Documents.d.ts +95 -0
  33. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/Guides.d.ts +76 -0
  34. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/HistoryStates.d.ts +56 -0
  35. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/LayerComps.d.ts +92 -0
  36. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/Layers.d.ts +68 -0
  37. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/PathItems.d.ts +65 -0
  38. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/PathPoints.d.ts +50 -0
  39. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/SubPathItems.d.ts +50 -0
  40. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/TextFonts.d.ts +43 -0
  41. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/objects/Colors.d.ts +225 -0
  42. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/objects/ConversionOptions.d.ts +213 -0
  43. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/objects/ImagingBounds.d.ts +53 -0
  44. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/objects/PathPointInfo.d.ts +84 -0
  45. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/objects/SaveOptions.d.ts +376 -0
  46. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/objects/SolidColor.d.ts +118 -0
  47. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/objects/SubPathInfo.d.ts +47 -0
  48. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/objects/TextFont.d.ts +49 -0
  49. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/objects/Tool.d.ts +23 -0
  50. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/Preferences.d.ts +121 -0
  51. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesBase.d.ts +9 -0
  52. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesCursors.d.ts +37 -0
  53. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesFileHandling.d.ts +58 -0
  54. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesGeneral.d.ts +77 -0
  55. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesGuidesGridsAndSlices.d.ts +51 -0
  56. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesHistory.d.ts +69 -0
  57. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesInterface.d.ts +46 -0
  58. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesPerformance.d.ts +42 -0
  59. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesTools.d.ts +44 -0
  60. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesTransparencyAndGamut.d.ts +38 -0
  61. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesType.d.ts +44 -0
  62. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesUnitsAndRulers.d.ts +44 -0
  63. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/text/CharacterStyle.d.ts +254 -0
  64. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/text/ParagraphStyle.d.ts +114 -0
  65. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/text/TextWarpStyle.d.ts +48 -0
  66. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/types/ApplyImageTypes.d.ts +107 -0
  67. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/types/CalculationsTypes.d.ts +119 -0
  68. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/types/DocumentTypes.d.ts +80 -0
  69. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/types/LayerCompTypes.d.ts +91 -0
  70. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/types/LayerTypes.d.ts +153 -0
  71. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/types/SharedTypes.d.ts +6 -0
  72. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/types/TextTypes.d.ts +218 -0
  73. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/util/colorTypes.d.ts +61 -0
  74. package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/util/unit.d.ts +45 -0
  75. package/dist-schemas/@adobe-uxp-types/uxp/src/index.d.ts +21 -0
  76. package/dist-schemas/@adobe-uxp-types/uxp/src/internal/all-types.d.ts +3 -0
  77. package/dist-schemas/@adobe-uxp-types/uxp/src/internal/dialog.d.ts +26 -0
  78. package/dist-schemas/@adobe-uxp-types/uxp/src/internal/entrypoints.d.ts +385 -0
  79. package/dist-schemas/@adobe-uxp-types/uxp/src/internal/host.d.ts +28 -0
  80. package/dist-schemas/@adobe-uxp-types/uxp/src/internal/os.d.ts +56 -0
  81. package/dist-schemas/@adobe-uxp-types/uxp/src/internal/other.d.ts +7 -0
  82. package/dist-schemas/@adobe-uxp-types/uxp/src/internal/shell.d.ts +54 -0
  83. package/dist-schemas/@adobe-uxp-types/uxp/src/internal/storage.d.ts +1216 -0
  84. package/dist-schemas/@adobe-uxp-types/uxp/src/internal/versions.d.ts +18 -0
  85. package/dist-schemas/@bubblydoo/uxp-toolkit/dist/commands-library/index.d.ts +109 -0
  86. package/dist-schemas/@bubblydoo/uxp-toolkit/dist/index.d.ts +153 -0
  87. package/dist-schemas/@bubblydoo/uxp-toolkit/dist/psLayerRef-BJKcxKbm.d.ts +66 -0
  88. package/package.json +51 -0
@@ -0,0 +1,376 @@
1
+ import type * as Constants from '../Constants';
2
+ import type { SolidColor } from './SolidColor';
3
+ /**
4
+ * Options for saving a document in BMP format using the {@link Document.saveAs} method
5
+ *
6
+ * @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/document/#saveas}
7
+ *
8
+ * @example
9
+ * ```javascript
10
+ * const doc = app.activeDocument;
11
+ * const saveFile = await require('uxp').storage.localFileSystem.getFileForSaving("image.bmp");
12
+ * const saveOptions = new BMPSaveOptions();
13
+ * saveOptions.depth = constants.BMPDepthType.BMP_24BITS;
14
+ * saveOptions.osType = constants.OperatingSystem.WINDOWS;
15
+ * await doc.saveAs.bmp(saveFile, saveOptions);
16
+ * ```
17
+ *
18
+ * @targetfolder objects/saveoptions
19
+ * @minVersion 22.5
20
+ */
21
+ export class BMPSaveOptions {
22
+ private _alphaChannels;
23
+ private _depth;
24
+ private _flipRowOrder;
25
+ private _osType;
26
+ private _rleCompression;
27
+ /**
28
+ * True to save the alpha channels.
29
+ * @minVersion 22.5
30
+ */
31
+ get alphaChannels(): boolean;
32
+ set alphaChannels(value: boolean);
33
+ /**
34
+ * The number of bits per channel.
35
+ * @minVersion 22.5
36
+ */
37
+ get depth(): Constants.BMPDepthType;
38
+ set depth(value: Constants.BMPDepthType);
39
+ /**
40
+ * True to write the image from top to bottom,
41
+ * available only when osType is OperatingSystem.WINDOWS
42
+ * @minVersion 22.5
43
+ */
44
+ get flipRowOrder(): boolean;
45
+ set flipRowOrder(value: boolean);
46
+ /**
47
+ * The target OS.
48
+ * @minVersion 22.5
49
+ */
50
+ get osType(): Constants.OperatingSystem;
51
+ set osType(value: Constants.OperatingSystem);
52
+ /**
53
+ * True to use RLE compression
54
+ * @minVersion 22.5
55
+ */
56
+ get rleCompression(): boolean;
57
+ set rleCompression(value: boolean);
58
+ /**
59
+ * The class name of the referenced object: *"BMPSaveOptions"*.
60
+ * @minVersion 22.5
61
+ */
62
+ get typename(): 'BMPSaveOptions';
63
+ /** @ignore */
64
+ constructor();
65
+ }
66
+ /**
67
+ * Options for saving a document in JPEG format using the {@link Document.saveAs} method
68
+ *
69
+ * @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/document/#saveas}
70
+ *
71
+ * @example
72
+ * ```javascript
73
+ * const doc = app.activeDocument;
74
+ * const saveFile = await require('uxp').storage.localFileSystem.getFileForSaving("image.jpg");
75
+ * const saveOptions = new JPEGSaveOptions();
76
+ * saveOptions.quality = 10;
77
+ * saveOptions.embedColorProfile = true;
78
+ * await doc.saveAs.jpg(saveFile, saveOptions);
79
+ * ```
80
+ *
81
+ * @targetfolder objects/saveoptions
82
+ * @optionobject
83
+ * @minVersion 22.5
84
+ */
85
+ export class JPEGSaveOptions {
86
+ private _quality;
87
+ private _formatOptions;
88
+ private _scans;
89
+ private _color;
90
+ private _matteColor;
91
+ private _customMatte;
92
+ private _embedColorProfile;
93
+ /**
94
+ * The image quality setting to use; affects file size and compression.
95
+ *
96
+ * @default 8
97
+ * @range 0...12
98
+ * @minVersion 22.5
99
+ */
100
+ get quality(): number;
101
+ set quality(value: number);
102
+ /**
103
+ * The JPEG format option to use.
104
+ * @default STANDARDBASELINE
105
+ * @minVersion 22.5
106
+ */
107
+ get formatOptions(): Constants.JPEGFormatOptions;
108
+ set formatOptions(value: Constants.JPEGFormatOptions);
109
+ /**
110
+ * The number of scans to incrementally display the image on the page.
111
+ * formatOptions must be JPEGFormatOptions.PROGRESSIVE.
112
+ * @default 3
113
+ * @range 3...5
114
+ * @minVersion 22.5
115
+ */
116
+ get scans(): number;
117
+ set scans(value: number);
118
+ /**
119
+ * A custom color to use to fill anti-aliased edges adjacent to transparent areas of the image.
120
+ * Mutually exclusive with 'matteColor'.
121
+ * @minVersion 22.5
122
+ */
123
+ get color(): SolidColor;
124
+ set color(value: SolidColor);
125
+ /**
126
+ * The color to use to fill anti-aliased edges adjacent to transparent areas of the image.
127
+ * Mutually exclusive with 'color'.
128
+ * @minVersion 22.5
129
+ */
130
+ get matteColor(): Constants.MatteColor;
131
+ set matteColor(value: Constants.MatteColor);
132
+ /**
133
+ * Custom matting color; overrides matteColor
134
+ * @minVersion 22.5
135
+ */
136
+ get customMatte(): SolidColor;
137
+ set customMatte(value: SolidColor);
138
+ /**
139
+ * False to skip embedding the color profile in the document
140
+ * @minVersion 22.5
141
+ */
142
+ get embedColorProfile(): boolean;
143
+ set embedColorProfile(value: boolean);
144
+ /**
145
+ * The class name of the referenced object: *"JPEGSaveOptions"*.
146
+ * @minVersion 22.5
147
+ */
148
+ get typename(): 'JPEGSaveOptions';
149
+ /** @ignore */
150
+ constructor();
151
+ }
152
+ /**
153
+ * Options for saving a document in GIF format using the {@link Document.saveAs} method
154
+ *
155
+ * @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/document/#saveas}
156
+ *
157
+ * @example
158
+ * ```javascript
159
+ * const doc = app.activeDocument;
160
+ * const saveFile = await require('uxp').storage.localFileSystem.getFileForSaving("image.gif");
161
+ * const saveOptions = new GIFSaveOptions();
162
+ * saveOptions.colors = 256;
163
+ * saveOptions.transparency = true;
164
+ * saveOptions.interlaced = false;
165
+ * await doc.saveAs.gif(saveFile, saveOptions);
166
+ * ```
167
+ *
168
+ * @targetfolder objects/saveoptions
169
+ * @optionobject
170
+ * @minVersion 22.5
171
+ */
172
+ export class GIFSaveOptions {
173
+ private _colors;
174
+ private _dither;
175
+ private _ditherAmount;
176
+ private _forced;
177
+ private _interlaced;
178
+ private _matte;
179
+ private _palette;
180
+ private _preserveExactColors;
181
+ private _transparency;
182
+ /**
183
+ * The number of palette colors. Valid only when palette is:
184
+ *
185
+ * Palette.LOCALADAPTIVE, LOCALPERCEPTUAL, LOCALSELECTIVE, MACOSPALETTE, UNIFORM, WEBPALETTE; or WINDOWSPALETTE
186
+ * @minVersion 22.5
187
+ */
188
+ get colors(): number;
189
+ set colors(value: number);
190
+ /**
191
+ * The dither type.
192
+ * @minVersion 22.5
193
+ */
194
+ get dither(): Constants.Dither;
195
+ set dither(value: Constants.Dither);
196
+ /**
197
+ * The amount of dither.
198
+ *
199
+ * Valid only when dither = Dither.DIFFUSION.
200
+ * @minVersion 22.5
201
+ */
202
+ get ditherAmount(): number;
203
+ set ditherAmount(value: number);
204
+ /**
205
+ * The type of colors to force into the color palette.
206
+ * @minVersion 22.5
207
+ */
208
+ get forced(): Constants.ForcedColors;
209
+ set forced(value: Constants.ForcedColors);
210
+ /**
211
+ * True if rows should be interlaced.
212
+ * @minVersion 22.5
213
+ */
214
+ get interlaced(): boolean;
215
+ set interlaced(value: boolean);
216
+ /**
217
+ * The color to use to fill anti-aliased edges adjacent to transparent areas of the image.
218
+ *
219
+ * When transparency is turned off for an image, the matte color is applied to transparent areas.
220
+ * @minVersion 22.5
221
+ */
222
+ get matte(): Constants.MatteColor;
223
+ set matte(value: Constants.MatteColor);
224
+ /**
225
+ * The type of palette to use.
226
+ * @minVersion 22.5
227
+ */
228
+ get palette(): Constants.Palette;
229
+ set palette(value: Constants.Palette);
230
+ /**
231
+ * True to protect colors in the image that contain entries in the color table from being dithered.
232
+ *
233
+ * Valid only when dither = DITHER.DIFFUSION
234
+ * @minVersion 22.5
235
+ */
236
+ get preserveExactColors(): boolean;
237
+ set preserveExactColors(value: boolean);
238
+ /**
239
+ * True to preserve transparent areas of the image during conversion to GIF format.
240
+ * @minVersion 22.5
241
+ */
242
+ get transparency(): boolean;
243
+ set transparency(value: boolean);
244
+ /**
245
+ * The class name of the referenced object: *"GIFSaveOptions"*.
246
+ * @minVersion 22.5
247
+ */
248
+ get typename(): 'GIFSaveOptions';
249
+ /** @ignore */
250
+ constructor();
251
+ }
252
+ /**
253
+ * Options for saving a document in PNG format using the {@link Document.saveAs} method
254
+ *
255
+ * @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/document/#saveas}
256
+ *
257
+ * @example
258
+ * ```javascript
259
+ * const doc = app.activeDocument;
260
+ * const saveFile = await require('uxp').storage.localFileSystem.getFileForSaving("image.png");
261
+ * const saveOptions = new PNGSaveOptions();
262
+ * saveOptions.compression = 6;
263
+ * saveOptions.interlaced = false;
264
+ * await doc.saveAs.png(saveFile, saveOptions);
265
+ * ```
266
+ *
267
+ * @targetfolder objects/saveoptions
268
+ * @optionobject
269
+ * @minVersion 22.5
270
+ */
271
+ export class PNGSaveOptions {
272
+ private _method;
273
+ private _compression;
274
+ private _interlaced;
275
+ /** @ignore */
276
+ constructor();
277
+ /**
278
+ * PNG File Size optimization method.
279
+ * @minVersion 22.5
280
+ */
281
+ get method(): Constants.PNGMethod;
282
+ set method(value: Constants.PNGMethod);
283
+ /**
284
+ * The compression value to be used when method = PNGMethod.QUICK
285
+ *
286
+ * @range 0...9
287
+ * @default 6
288
+ * @minVersion 22.5
289
+ */
290
+ get compression(): number;
291
+ set compression(value: number);
292
+ /**
293
+ * True to interlace rows when method = PNGMethod.QUICK
294
+ *
295
+ * @default false
296
+ * @minVersion 22.5
297
+ */
298
+ get interlaced(): boolean;
299
+ set interlaced(value: boolean);
300
+ /**
301
+ * The class name of the referenced object: *"PNGSaveOptions"*.
302
+ * @minVersion 22.5
303
+ */
304
+ get typename(): 'PNGSaveOptions';
305
+ }
306
+ /**
307
+ * Options for saving a document in Photoshop (PSD) format using the {@link Document.saveAs} method
308
+ *
309
+ * @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/document/#saveas}
310
+ *
311
+ * @example
312
+ * ```javascript
313
+ * const doc = app.activeDocument;
314
+ * const saveFile = await require('uxp').storage.localFileSystem.getFileForSaving("document.psd");
315
+ * const saveOptions = new PhotoshopSaveOptions();
316
+ * saveOptions.layers = true;
317
+ * saveOptions.embedColorProfile = true;
318
+ * saveOptions.maximizeCompatibility = true;
319
+ * await doc.saveAs.psd(saveFile, saveOptions);
320
+ * ```
321
+ *
322
+ * @targetfolder objects/saveoptions
323
+ * @optionobject
324
+ * @minVersion 22.5
325
+ */
326
+ export class PhotoshopSaveOptions {
327
+ private _alphaChannels;
328
+ private _annotations;
329
+ private _embedColorProfile;
330
+ private _layers;
331
+ private _spotColor;
332
+ private _maximizeCompatibility;
333
+ /**
334
+ * True to save the alpha channels.
335
+ * @minVersion 22.5
336
+ */
337
+ get alphaChannels(): boolean;
338
+ set alphaChannels(value: boolean);
339
+ /**
340
+ * True to save the annotations.
341
+ * @minVersion 22.5
342
+ */
343
+ get annotations(): boolean;
344
+ set annotations(value: boolean);
345
+ /**
346
+ * True to embed the color profiles in the document.
347
+ * @minVersion 22.5
348
+ */
349
+ get embedColorProfile(): boolean;
350
+ set embedColorProfile(value: boolean);
351
+ /**
352
+ * True to preserve the layers.
353
+ * @minVersion 22.5
354
+ */
355
+ get layers(): boolean;
356
+ set layers(value: boolean);
357
+ /**
358
+ * True to save the spot colors.
359
+ * @minVersion 22.5
360
+ */
361
+ get spotColor(): boolean;
362
+ set spotColor(value: boolean);
363
+ /**
364
+ * Maximize Compatibility with older versions
365
+ * @minVersion 22.5
366
+ */
367
+ get maximizeCompatibility(): boolean;
368
+ set maximizeCompatibility(value: boolean);
369
+ /**
370
+ * The class name of the referenced object: *"PhotoshopSaveOptions"*.
371
+ * @minVersion 22.5
372
+ */
373
+ get typename(): 'PhotoshopSaveOptions';
374
+ /** @ignore */
375
+ constructor();
376
+ }
@@ -0,0 +1,118 @@
1
+ import type { ColorModel } from '../Constants';
2
+ import type * as Colors from './Colors';
3
+ /**
4
+ * Represents a color, and allows for mapping into all available Photoshop color models.
5
+ * Import SolidColor from the Photoshop's app object:
6
+ *
7
+ * @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/objects/solidcolor/}
8
+ *
9
+ * @example
10
+ * ```javascript
11
+ * const SolidColor = require("photoshop").app.SolidColor;
12
+ * ```
13
+ *
14
+ * When a property is accessed (either via read or write), the current color model
15
+ * of the SolidColor objects gets set to the space of the accessor. Photoshop internally
16
+ * converts the color across these color spaces using the Color Settings set by the user.
17
+ *
18
+ * For example, to set the foreground color to red:
19
+ *
20
+ * @example
21
+ * ```javascript
22
+ * const SolidColor = require("photoshop").app.SolidColor;
23
+ * const red = new SolidColor();
24
+ * red.rgb.red = 255;
25
+ * red.rgb.green = 0;
26
+ * red.rgb.blue = 0;
27
+ *
28
+ * app.foregroundColor = red;
29
+ * ```
30
+ *
31
+ * To understand how color models change as you interact with a SolidColor object,
32
+ * please see example below:
33
+ *
34
+ * ```javascript
35
+ * const SolidColor = require("photoshop").app.SolidColor;
36
+ * const c = new SolidColor();
37
+ * console.log(c.base.typename); // By default, this will be "RGBColor"
38
+ *
39
+ * c.cmyk.cyan = 50; // Photoshop will convert the color to CMYK using Edit > Color Settings data
40
+ * console.log(c.base.typename); // Now, the typename will be "CMYKColor"
41
+ *
42
+ * c.rgb.green = 128; // Typename will change back to "RGBColor"
43
+ *
44
+ * ```
45
+ *
46
+ * ***Fixes in Photoshop 24.2:***
47
+ * - *Adds range validation for all color modes and its components so it should not be possible to enter invalid value.*
48
+ *
49
+ * @minVersion 23.0
50
+ */
51
+ export class SolidColor {
52
+ /**
53
+ * The class name of the referenced object: *"SolidColor"*.
54
+ * @minVersion 24.2
55
+ */
56
+ get typename(): 'SolidColor';
57
+ /**
58
+ * The color's representation in RGB color space.
59
+ *
60
+ * @minVersion 23.0
61
+ */
62
+ get rgb(): Colors.RGBColor;
63
+ set rgb(c: Colors.RGBColor);
64
+ /**
65
+ * The color's representation in CMYK color space.
66
+ * @minVersion 23.0
67
+ */
68
+ get cmyk(): Colors.CMYKColor;
69
+ set cmyk(c: Colors.CMYKColor);
70
+ /**
71
+ * The color's representation in HSB color space.
72
+ * @minVersion 23.0
73
+ */
74
+ get hsb(): Colors.HSBColor;
75
+ set hsb(c: Colors.HSBColor);
76
+ /**
77
+ * The color's representation in LAB color space.
78
+ * @minVersion 23.0
79
+ */
80
+ get lab(): Colors.LabColor;
81
+ set lab(c: Colors.LabColor);
82
+ /**
83
+ * The color's representation in grayscale.
84
+ * @minVersion 23.0
85
+ */
86
+ get gray(): Colors.GrayColor;
87
+ set gray(c: Colors.GrayColor);
88
+ /**
89
+ * The color's nearest match within the 216 web-safe colors.
90
+ * @minVersion 23.0
91
+ */
92
+ get nearestWebColor(): Colors.RGBColor;
93
+ /**
94
+ * True if the SolidColor object is visually equivalent to the specified color.
95
+ *
96
+ * Both colors are converted to Lab colorspace,
97
+ * and the sum of their normalized squared Euclidian
98
+ * distance in each space is averaged across the three
99
+ * then compared to a small constant (3.5e-6).
100
+ *
101
+ * Due to differences in coverage by various color spaces and clamping,
102
+ * a color that is converted from RGB to CMYK and back may not be visually equal.
103
+ * @minVersion 23.0
104
+ */
105
+ isEqual(color: SolidColor): boolean;
106
+ /**
107
+ * All colors default to pure white.
108
+ *
109
+ * ```
110
+ * const SolidColor = require("photoshop").app.SolidColor;
111
+ * const color = new SolidColor();
112
+ * ```
113
+ *
114
+ * @param model Color model to start.
115
+ * @minVersion 23.0
116
+ */
117
+ constructor(model?: ColorModel);
118
+ }
@@ -0,0 +1,47 @@
1
+ import type * as Constants from '../Constants';
2
+ import type { PathPointInfo } from './PathPointInfo';
3
+ /**
4
+ * An array of {@link PathPointInfo} objects that describes a straight or curved segment of a path, used to create
5
+ * a {@link SubPathItem}.
6
+ *
7
+ * Pass an array of these objects to the {@link PathItems.add}() method. This method creates a {@link SubPathItem} object
8
+ * for each `SubPathInfo` object, and creates and returns a new {@link PathItem} object for the path represented by
9
+ * all of the subpaths.
10
+ *
11
+ * - Use `SubPathInfo` to create subpaths; the properties are read-write.
12
+ *
13
+ * - Use the {@link SubPathItem} object to retrieve information about existing subpaths. The properties are read-only.
14
+ * @minVersion 23.3
15
+ */
16
+ export class SubPathInfo {
17
+ private _closed;
18
+ private _entireSubPath;
19
+ private _operation;
20
+ /**
21
+ * True if the path describes an enclosed area.
22
+ * @minVersion 23.3
23
+ */
24
+ get closed(): boolean;
25
+ set closed(value: boolean);
26
+ /**
27
+ * An array composed of the sub-path's {@link PathPoint} objects.
28
+ *
29
+ * @minVersion 23.3
30
+ */
31
+ get entireSubPath(): PathPointInfo[];
32
+ set entireSubPath(value: PathPointInfo[]);
33
+ /**
34
+ * The subpath's operation on other subpaths. Specifies how to combine the shapes if
35
+ * the destination path already has a selection.
36
+ * @minVersion 23.3
37
+ */
38
+ get operation(): Constants.ShapeOperation;
39
+ set operation(value: Constants.ShapeOperation);
40
+ /**
41
+ * The class name of the referenced object: *"SubPathInfo"*.
42
+ * @minVersion 23.3
43
+ */
44
+ get typename(): 'SubPathInfo';
45
+ /** @ignore */
46
+ constructor();
47
+ }
@@ -0,0 +1,49 @@
1
+ import type { Photoshop } from '../Photoshop';
2
+ /**
3
+ * Describes a font that is available to the application. Access this object in the {@link Photoshop.fonts} collection.
4
+ *
5
+ * @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/objects/textfont/}
6
+ *
7
+ * @example
8
+ * ```javascript
9
+ * const arialMTFont = require('photoshop').app.fonts.getByName("ArialMT");
10
+ * ```
11
+ * @minVersion 23.0
12
+ */
13
+ export class TextFont {
14
+ private _family;
15
+ private _name;
16
+ private _parent;
17
+ private _postScriptName;
18
+ private _style;
19
+ /**
20
+ * The font family.
21
+ * @minVersion 23.0
22
+ */
23
+ get family(): string;
24
+ /**
25
+ * The name of the font.
26
+ * @minVersion 23.0
27
+ */
28
+ get name(): string;
29
+ /**
30
+ * The containing application.
31
+ * @minVersion 23.0
32
+ */
33
+ get parent(): Photoshop;
34
+ /**
35
+ * The PostScript name of the font.
36
+ * @minVersion 23.0
37
+ */
38
+ get postScriptName(): string;
39
+ /**
40
+ * The font style.
41
+ * @minVersion 23.0
42
+ */
43
+ get style(): string;
44
+ /**
45
+ * The class name of the referenced object: *"TextFont"*.
46
+ * @minVersion 23.0
47
+ */
48
+ get typename(): 'TextFont';
49
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * WIP. For now, only contains an id field. In the future, this may become a class.
3
+ *
4
+ * @targetfolder objects
5
+ * @optionobject
6
+ * @minVersion 23.0
7
+ */
8
+ export class Tool {
9
+ private _id;
10
+ /**
11
+ * Name of the tool.
12
+ * @minVersion 23.0
13
+ */
14
+ get id(): string;
15
+ set id(name: string);
16
+ /**
17
+ * The class name of the referenced object: *"Tool"*.
18
+ * @minVersion 23.0
19
+ */
20
+ get typename(): 'Tool';
21
+ /** @ignore */
22
+ constructor();
23
+ }