@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.
- package/README.md +138 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7049 -0
- package/dist/index.js.map +1 -0
- package/dist-readmes/README.md +383 -0
- package/dist-runtime/runtime-code.cjs +17124 -0
- package/dist-runtime/runtime-code.d.cts +9 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/index.d.ts +16 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/all-types.d.ts +65 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/Actions.d.ts +230 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/Channel.d.ts +120 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/ColorSampler.d.ts +105 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/Constants.d.ts +1648 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/CoreModules.d.ts +922 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/CountItem.d.ts +86 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/Document.d.ts +931 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/Guide.d.ts +105 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/HistoryState.d.ts +74 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/ImagingModule.d.ts +559 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/Layer.d.ts +1073 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/LayerComp.d.ts +219 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/Objects.d.ts +7 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/PathItem.d.ts +243 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/PathPoint.d.ts +78 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/Photoshop.d.ts +317 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/Selection.d.ts +557 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/SubPathItem.d.ts +69 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/TextItem.d.ts +213 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/Channels.d.ts +81 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/ColorSamplers.d.ts +97 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/CountItems.d.ts +130 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/Documents.d.ts +95 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/Guides.d.ts +76 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/HistoryStates.d.ts +56 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/LayerComps.d.ts +92 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/Layers.d.ts +68 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/PathItems.d.ts +65 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/PathPoints.d.ts +50 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/SubPathItems.d.ts +50 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/TextFonts.d.ts +43 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/objects/Colors.d.ts +225 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/objects/ConversionOptions.d.ts +213 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/objects/ImagingBounds.d.ts +53 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/objects/PathPointInfo.d.ts +84 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/objects/SaveOptions.d.ts +376 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/objects/SolidColor.d.ts +118 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/objects/SubPathInfo.d.ts +47 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/objects/TextFont.d.ts +49 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/objects/Tool.d.ts +23 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/Preferences.d.ts +121 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesBase.d.ts +9 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesCursors.d.ts +37 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesFileHandling.d.ts +58 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesGeneral.d.ts +77 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesGuidesGridsAndSlices.d.ts +51 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesHistory.d.ts +69 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesInterface.d.ts +46 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesPerformance.d.ts +42 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesTools.d.ts +44 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesTransparencyAndGamut.d.ts +38 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesType.d.ts +44 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/preferences/PreferencesUnitsAndRulers.d.ts +44 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/text/CharacterStyle.d.ts +254 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/text/ParagraphStyle.d.ts +114 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/text/TextWarpStyle.d.ts +48 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/types/ApplyImageTypes.d.ts +107 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/types/CalculationsTypes.d.ts +119 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/types/DocumentTypes.d.ts +80 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/types/LayerCompTypes.d.ts +91 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/types/LayerTypes.d.ts +153 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/types/SharedTypes.d.ts +6 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/types/TextTypes.d.ts +218 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/util/colorTypes.d.ts +61 -0
- package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/util/unit.d.ts +45 -0
- package/dist-schemas/@adobe-uxp-types/uxp/src/index.d.ts +21 -0
- package/dist-schemas/@adobe-uxp-types/uxp/src/internal/all-types.d.ts +3 -0
- package/dist-schemas/@adobe-uxp-types/uxp/src/internal/dialog.d.ts +26 -0
- package/dist-schemas/@adobe-uxp-types/uxp/src/internal/entrypoints.d.ts +385 -0
- package/dist-schemas/@adobe-uxp-types/uxp/src/internal/host.d.ts +28 -0
- package/dist-schemas/@adobe-uxp-types/uxp/src/internal/os.d.ts +56 -0
- package/dist-schemas/@adobe-uxp-types/uxp/src/internal/other.d.ts +7 -0
- package/dist-schemas/@adobe-uxp-types/uxp/src/internal/shell.d.ts +54 -0
- package/dist-schemas/@adobe-uxp-types/uxp/src/internal/storage.d.ts +1216 -0
- package/dist-schemas/@adobe-uxp-types/uxp/src/internal/versions.d.ts +18 -0
- package/dist-schemas/@bubblydoo/uxp-toolkit/dist/commands-library/index.d.ts +109 -0
- package/dist-schemas/@bubblydoo/uxp-toolkit/dist/index.d.ts +153 -0
- package/dist-schemas/@bubblydoo/uxp-toolkit/dist/psLayerRef-BJKcxKbm.d.ts +66 -0
- package/package.json +51 -0
package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/HistoryStates.d.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { HistoryState } from '../HistoryState';
|
|
2
|
+
/**
|
|
3
|
+
* A collections class allowing for array access into a document's history states,
|
|
4
|
+
* while also providing familiar methods from ExtendScript, like `getByName`
|
|
5
|
+
*
|
|
6
|
+
* @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/historystates/}
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```javascript
|
|
10
|
+
* // Iterate through all history states
|
|
11
|
+
* app.activeDocument.historyStates.forEach(h => console.log(h.name));
|
|
12
|
+
*
|
|
13
|
+
* // Find all snapshot history states
|
|
14
|
+
* var snapshots = app.activeDocument.historyStates.filter(h => h.snapshot)
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export class HistoryStates extends Array<HistoryState> {
|
|
18
|
+
/**
|
|
19
|
+
* @ignore
|
|
20
|
+
*/
|
|
21
|
+
readonly _docId: number;
|
|
22
|
+
/**
|
|
23
|
+
* @ignore
|
|
24
|
+
*/
|
|
25
|
+
private proxy;
|
|
26
|
+
/**
|
|
27
|
+
* Used to access the history states in the collection.
|
|
28
|
+
* @minVersion 22.5
|
|
29
|
+
*/
|
|
30
|
+
[index: number]: HistoryState;
|
|
31
|
+
/**
|
|
32
|
+
* @ignore
|
|
33
|
+
*/
|
|
34
|
+
constructor(docId: number);
|
|
35
|
+
/**
|
|
36
|
+
* @ignore
|
|
37
|
+
*/
|
|
38
|
+
handler(): {
|
|
39
|
+
get: (obj: any, key: any) => any;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Find the first history state with the matching name.
|
|
43
|
+
* @minVersion 22.5
|
|
44
|
+
*/
|
|
45
|
+
getByName(name: string): HistoryState;
|
|
46
|
+
/**
|
|
47
|
+
* Number of {@link HistoryState} elements in this collection.
|
|
48
|
+
* @minVersion 22.5
|
|
49
|
+
*/
|
|
50
|
+
get length(): number;
|
|
51
|
+
/**
|
|
52
|
+
* The owner document of this HistoryState collection.
|
|
53
|
+
* @minVersion 22.5
|
|
54
|
+
*/
|
|
55
|
+
get parent(): Document;
|
|
56
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { Document } from '../Document';
|
|
2
|
+
import type { LayerComp } from '../LayerComp';
|
|
3
|
+
import type { LayerCompCreateOptions } from '../types/LayerCompTypes';
|
|
4
|
+
/**
|
|
5
|
+
* A collections class allowing for array access into a document's Layer Comps
|
|
6
|
+
*
|
|
7
|
+
* Access this collection through {@link Document.layerComps} property. For example,
|
|
8
|
+
* following adds a new Layer Comp to the collection:
|
|
9
|
+
*
|
|
10
|
+
* @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/layercomps/}
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```javascript
|
|
14
|
+
* const comp = await app.activeDocument.layerComps.add();
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @minVersion 24.0
|
|
18
|
+
*/
|
|
19
|
+
export class LayerComps extends Array<LayerComp> {
|
|
20
|
+
/**
|
|
21
|
+
* @ignore
|
|
22
|
+
*/
|
|
23
|
+
readonly _docId: number;
|
|
24
|
+
/**
|
|
25
|
+
* @ignore
|
|
26
|
+
*/
|
|
27
|
+
private proxy;
|
|
28
|
+
/**
|
|
29
|
+
* Used to access the Layer Comp in the collection
|
|
30
|
+
*/
|
|
31
|
+
[index: number]: LayerComp;
|
|
32
|
+
/**
|
|
33
|
+
* @ignore
|
|
34
|
+
*/
|
|
35
|
+
constructor(docId: number);
|
|
36
|
+
/**
|
|
37
|
+
* @ignore
|
|
38
|
+
*/
|
|
39
|
+
handler(): {
|
|
40
|
+
get: (obj: any, key: any) => any;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* The name for this object collection: LayerComps
|
|
44
|
+
*
|
|
45
|
+
* @minVersion 24.0
|
|
46
|
+
*/
|
|
47
|
+
get typename(): 'LayerComps';
|
|
48
|
+
/**
|
|
49
|
+
* Number of {@link LayerComp} elements in this collection
|
|
50
|
+
*
|
|
51
|
+
* @minVersion 24.0
|
|
52
|
+
*/
|
|
53
|
+
get length(): number;
|
|
54
|
+
/**
|
|
55
|
+
* The owner document of this Layer comp collection
|
|
56
|
+
*
|
|
57
|
+
* @minVersion 24.0
|
|
58
|
+
*/
|
|
59
|
+
get parent(): Document;
|
|
60
|
+
/**
|
|
61
|
+
* Adds a Layer Comp to the document's collection. If no options are given, only visibility will be recorded.
|
|
62
|
+
*
|
|
63
|
+
* Note: This command will fail if the document is flat, that is, only a Background and no other layers.
|
|
64
|
+
*
|
|
65
|
+
* @param options An optional object literal containing key/value pairs as described by {@link LayerCompCreateOptions}
|
|
66
|
+
* ```javascript
|
|
67
|
+
* const options = {
|
|
68
|
+
* name: "mockup",
|
|
69
|
+
* comment: "First attempt",
|
|
70
|
+
* visibility: true,
|
|
71
|
+
* position: true
|
|
72
|
+
* };
|
|
73
|
+
* await require('photoshop').app.activeDocument.layerComps.add(options);
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* @minVersion 24.0
|
|
77
|
+
*/
|
|
78
|
+
add(options?: LayerCompCreateOptions): Promise<LayerComp>;
|
|
79
|
+
/**
|
|
80
|
+
* Clears all Layer Comps from this collection
|
|
81
|
+
*
|
|
82
|
+
* @minVersion 24.0
|
|
83
|
+
*/
|
|
84
|
+
removeAll(): Promise<void>;
|
|
85
|
+
/**
|
|
86
|
+
* Get all Layer Comps by name
|
|
87
|
+
* @param name
|
|
88
|
+
*
|
|
89
|
+
* @minVersion 24.0
|
|
90
|
+
*/
|
|
91
|
+
getAllByName(name: string): LayerComp[];
|
|
92
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { Layer } from '../Layer';
|
|
2
|
+
/**
|
|
3
|
+
* A collections class allowing for array access into the applications
|
|
4
|
+
* list of layers on a document,
|
|
5
|
+
* while also providing familiar methods from ExtendScript, like `getByName`
|
|
6
|
+
*
|
|
7
|
+
* @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/layers/}
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```javascript
|
|
11
|
+
* // Iterate through all the top layers of frontmost document
|
|
12
|
+
* app.activeDocument.layers.forEach(h => console.log(h.name));
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export class Layers extends Array<Layer> {
|
|
16
|
+
/** @ignore */
|
|
17
|
+
private proxy;
|
|
18
|
+
/** @ignore */
|
|
19
|
+
private parentDocID;
|
|
20
|
+
/** @ignore */
|
|
21
|
+
private layerIDs;
|
|
22
|
+
/**
|
|
23
|
+
* Used to access the layers in the collection.
|
|
24
|
+
* @minVersion 22.5
|
|
25
|
+
*/
|
|
26
|
+
[index: number]: Layer;
|
|
27
|
+
/** @ignore */
|
|
28
|
+
constructor(parentDoc: number, layerIDs: number[]);
|
|
29
|
+
/** @ignore */
|
|
30
|
+
handler(): {
|
|
31
|
+
get: (obj: any, key: any) => any;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Find the first layer with the matching name.
|
|
35
|
+
*
|
|
36
|
+
* @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/layers/#getbyname}
|
|
37
|
+
* @minVersion 22.5
|
|
38
|
+
*/
|
|
39
|
+
getByName(name: string): Layer;
|
|
40
|
+
/**
|
|
41
|
+
* Number of {@link Layer} elements in this collection.
|
|
42
|
+
*
|
|
43
|
+
* @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/layers/#length}
|
|
44
|
+
* @minVersion 22.5
|
|
45
|
+
*/
|
|
46
|
+
get length(): number;
|
|
47
|
+
/**
|
|
48
|
+
* The name for this object collection: Layers.
|
|
49
|
+
*
|
|
50
|
+
* @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/layers/#typename}
|
|
51
|
+
* @minVersion 22.5
|
|
52
|
+
*/
|
|
53
|
+
get typename(): 'Layers';
|
|
54
|
+
/**
|
|
55
|
+
* Create a new layer.
|
|
56
|
+
*
|
|
57
|
+
* @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/layers/#add}
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```javascript
|
|
61
|
+
* let newDoc1 = await app.activeDocument.layers.add();
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @async
|
|
65
|
+
* @minVersion 22.5
|
|
66
|
+
*/
|
|
67
|
+
add(): Promise<Layer | null>;
|
|
68
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { SubPathInfo } from '../objects/SubPathInfo';
|
|
2
|
+
import type { PathItem } from '../PathItem';
|
|
3
|
+
/**
|
|
4
|
+
* The collection of {@link PathItem} objects in a document.
|
|
5
|
+
*
|
|
6
|
+
* Access through the {@link Document.pathItems} collection property. To create new paths,
|
|
7
|
+
* see {@link PathPointInfo} and {@link SubPathInfo} classes and pass them to {@link PathItems.add}() method.
|
|
8
|
+
*
|
|
9
|
+
* @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/pathitems/}
|
|
10
|
+
*/
|
|
11
|
+
export class PathItems extends Array<PathItem> {
|
|
12
|
+
/**
|
|
13
|
+
* @ignore
|
|
14
|
+
*/
|
|
15
|
+
readonly _docId: number;
|
|
16
|
+
/**
|
|
17
|
+
* @ignore
|
|
18
|
+
*/
|
|
19
|
+
private proxy;
|
|
20
|
+
/**
|
|
21
|
+
* Used to access the paths in the collection.
|
|
22
|
+
* @minVersion 23.3
|
|
23
|
+
*/
|
|
24
|
+
[index: number]: PathItem;
|
|
25
|
+
/**
|
|
26
|
+
* @ignore
|
|
27
|
+
*/
|
|
28
|
+
constructor(docId: number);
|
|
29
|
+
/**
|
|
30
|
+
* @ignore
|
|
31
|
+
*/
|
|
32
|
+
handler(): {
|
|
33
|
+
get: (obj: any, key: any) => any;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Number of {@link PathItem} objects in this collection.
|
|
37
|
+
* @minVersion 23.3
|
|
38
|
+
*/
|
|
39
|
+
get length(): number;
|
|
40
|
+
/**
|
|
41
|
+
* The owner document of this PathItem collection.
|
|
42
|
+
* @minVersion 23.3
|
|
43
|
+
*/
|
|
44
|
+
get parent(): Document;
|
|
45
|
+
/**
|
|
46
|
+
* Creates a new path item object and adds it to this collection.
|
|
47
|
+
*
|
|
48
|
+
* A new {@link SubPathItem} object is created for each {@link SubPathInfo} object provided in `entirePath`,
|
|
49
|
+
* and those {@link SubPathItem} objects are added to the {@link PathItem.subPathItems} collection of the returned
|
|
50
|
+
* {@link PathItem}.
|
|
51
|
+
* @minVersion 23.3
|
|
52
|
+
*/
|
|
53
|
+
add(name: string, entirePath: SubPathInfo[]): PathItem;
|
|
54
|
+
/**
|
|
55
|
+
* Removes all paths from this collection.
|
|
56
|
+
* @minVersion 23.3
|
|
57
|
+
*/
|
|
58
|
+
removeAll(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Retrieve the first PathItem matching the given name.
|
|
61
|
+
* @param name Name to find
|
|
62
|
+
* @minVersion 23.3
|
|
63
|
+
*/
|
|
64
|
+
getByName(name: string): PathItem;
|
|
65
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { PathPoint } from '../PathPoint';
|
|
2
|
+
import type { SubPathItem } from '../SubPathItem';
|
|
3
|
+
/**
|
|
4
|
+
* A collection of {@link PathPoint} objects that define a subpath, kept in the {@link SubPathItem.pathPoints} property.
|
|
5
|
+
*
|
|
6
|
+
* @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/pathpoints/}
|
|
7
|
+
*/
|
|
8
|
+
export class PathPoints extends Array<PathPoint> {
|
|
9
|
+
/**
|
|
10
|
+
* @ignore
|
|
11
|
+
*/
|
|
12
|
+
readonly _docId: number;
|
|
13
|
+
/**
|
|
14
|
+
* @ignore
|
|
15
|
+
*/
|
|
16
|
+
readonly _pathId: number;
|
|
17
|
+
/**
|
|
18
|
+
* @ignore
|
|
19
|
+
*/
|
|
20
|
+
readonly _subPathIndex: number;
|
|
21
|
+
/**
|
|
22
|
+
* @ignore
|
|
23
|
+
*/
|
|
24
|
+
private proxy;
|
|
25
|
+
/**
|
|
26
|
+
* Used to access the guides in the collection.
|
|
27
|
+
* @minVersion 23.3
|
|
28
|
+
*/
|
|
29
|
+
[index: number]: PathPoint;
|
|
30
|
+
/**
|
|
31
|
+
* @ignore
|
|
32
|
+
*/
|
|
33
|
+
constructor(index: number, pathId: number, docId: number);
|
|
34
|
+
/**
|
|
35
|
+
* @ignore
|
|
36
|
+
*/
|
|
37
|
+
handler(): {
|
|
38
|
+
get: (obj: any, key: any) => any;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Number of elements in this collection.
|
|
42
|
+
* @minVersion 23.3
|
|
43
|
+
*/
|
|
44
|
+
get length(): number;
|
|
45
|
+
/**
|
|
46
|
+
* The SubPathItem that contains this PathPoints collection.
|
|
47
|
+
* @minVersion 23.3
|
|
48
|
+
*/
|
|
49
|
+
get parent(): SubPathItem;
|
|
50
|
+
}
|
package/dist-schemas/@adobe-uxp-types/photoshop/src/internal/dom/collections/SubPathItems.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { PathItem } from '../PathItem';
|
|
2
|
+
import type { SubPathItem } from '../SubPathItem';
|
|
3
|
+
/**
|
|
4
|
+
* A collection of {@link SubPathItem} objects that make up a {@link PathItem}. Access this object in the
|
|
5
|
+
* {@link PathItem.subPathItems} collection property.
|
|
6
|
+
*
|
|
7
|
+
* - Use {@link SubPathInfo} to create subpaths; the properties are writeable.
|
|
8
|
+
* - Use the {@link SubPathItem} object to retrieve information about existing subpaths. The properties are read-only.
|
|
9
|
+
*
|
|
10
|
+
* @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/subpathitems/}
|
|
11
|
+
*/
|
|
12
|
+
export class SubPathItems extends Array<SubPathItem> {
|
|
13
|
+
/**
|
|
14
|
+
* @ignore
|
|
15
|
+
*/
|
|
16
|
+
readonly _docId: number;
|
|
17
|
+
/**
|
|
18
|
+
* @ignore
|
|
19
|
+
*/
|
|
20
|
+
readonly _pathId: number;
|
|
21
|
+
/**
|
|
22
|
+
* @ignore
|
|
23
|
+
*/
|
|
24
|
+
private proxy;
|
|
25
|
+
/**
|
|
26
|
+
* Used to access the guides in the collection.
|
|
27
|
+
* @minVersion 23.3
|
|
28
|
+
*/
|
|
29
|
+
[index: number]: SubPathItem;
|
|
30
|
+
/**
|
|
31
|
+
* @ignore
|
|
32
|
+
*/
|
|
33
|
+
constructor(pathId: number, docId: number);
|
|
34
|
+
/**
|
|
35
|
+
* @ignore
|
|
36
|
+
*/
|
|
37
|
+
handler(): {
|
|
38
|
+
get: (obj: any, key: any) => any;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Number of elements in this collection.
|
|
42
|
+
* @minVersion 23.3
|
|
43
|
+
*/
|
|
44
|
+
get length(): number;
|
|
45
|
+
/**
|
|
46
|
+
* The PathItem that contains this SubPathItem.
|
|
47
|
+
* @minVersion 23.3
|
|
48
|
+
*/
|
|
49
|
+
get parent(): PathItem;
|
|
50
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { TextFont } from '../objects/TextFont';
|
|
2
|
+
import type { Photoshop } from '../Photoshop';
|
|
3
|
+
/**
|
|
4
|
+
* The collection of fonts available on your computer. Fonts are represented by
|
|
5
|
+
* {@link TextFont} objects. Access this object in the {@link Photoshop.fonts} property.
|
|
6
|
+
*
|
|
7
|
+
* @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/textfonts/}
|
|
8
|
+
*/
|
|
9
|
+
export class TextFonts extends Array<TextFont> {
|
|
10
|
+
/** @ignore */
|
|
11
|
+
private proxy;
|
|
12
|
+
/** @ignore */
|
|
13
|
+
constructor();
|
|
14
|
+
/**
|
|
15
|
+
* Used to access the text fonts in the collection.
|
|
16
|
+
* @minVersion 23.0
|
|
17
|
+
*/
|
|
18
|
+
[index: number]: TextFont;
|
|
19
|
+
/** @ignore */
|
|
20
|
+
handler(): {
|
|
21
|
+
get: (obj: any, key: any) => any;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Find the first font with the given PostScript name.
|
|
25
|
+
* @minVersion 23.0
|
|
26
|
+
*/
|
|
27
|
+
getByName(name: string): TextFont;
|
|
28
|
+
/**
|
|
29
|
+
* Number of {@link TextFont} elements in this collection.
|
|
30
|
+
* @minVersion 23.0
|
|
31
|
+
*/
|
|
32
|
+
get length(): number;
|
|
33
|
+
/**
|
|
34
|
+
* The owner application of this TextFonts collection.
|
|
35
|
+
* @minVersion 23.0
|
|
36
|
+
*/
|
|
37
|
+
get parent(): Photoshop;
|
|
38
|
+
/**
|
|
39
|
+
* The name for this object collection: TextFonts.
|
|
40
|
+
* @minVersion 23.0
|
|
41
|
+
*/
|
|
42
|
+
get typename(): 'TextFonts';
|
|
43
|
+
}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines a CMYK color, used in {@link SolidColor} object.
|
|
3
|
+
*
|
|
4
|
+
* ***Fixes in Photoshop 24.2:***
|
|
5
|
+
* - *Getter now will return number instead of `undefined`*
|
|
6
|
+
* - *Value used in setter is now respected when passed to Photoshop*
|
|
7
|
+
*
|
|
8
|
+
* @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/objects/cmykcolor/}
|
|
9
|
+
* @targetfolder colors
|
|
10
|
+
* @minVersion 23.0
|
|
11
|
+
*/
|
|
12
|
+
export class CMYKColor {
|
|
13
|
+
/**
|
|
14
|
+
* The black color value, as percentage.
|
|
15
|
+
* @default 0
|
|
16
|
+
* @range 0.0..100.0
|
|
17
|
+
* @minVersion 23.0
|
|
18
|
+
*/
|
|
19
|
+
get black(): number;
|
|
20
|
+
set black(b: number);
|
|
21
|
+
/**
|
|
22
|
+
* The cyan color value, as percentage.
|
|
23
|
+
* @default 0
|
|
24
|
+
* @range 0.0..100.0
|
|
25
|
+
* @minVersion 23.0
|
|
26
|
+
*/
|
|
27
|
+
get cyan(): number;
|
|
28
|
+
set cyan(c: number);
|
|
29
|
+
/**
|
|
30
|
+
* The magenta color value, as percentage.
|
|
31
|
+
* @default 0
|
|
32
|
+
* @range 0.0..100.0
|
|
33
|
+
* @minVersion 23.0
|
|
34
|
+
*/
|
|
35
|
+
get magenta(): number;
|
|
36
|
+
set magenta(m: number);
|
|
37
|
+
/**
|
|
38
|
+
* The yellow color value, as percentage.
|
|
39
|
+
* @default 0
|
|
40
|
+
* @range 0.0..100.0
|
|
41
|
+
*
|
|
42
|
+
* @minVersion 23.0
|
|
43
|
+
*/
|
|
44
|
+
get yellow(): number;
|
|
45
|
+
set yellow(y: number);
|
|
46
|
+
/**
|
|
47
|
+
* The class name of the referenced object: *"CMYKColor"*.
|
|
48
|
+
* @minVersion 23.0
|
|
49
|
+
*/
|
|
50
|
+
get typename(): 'CMYKColor';
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Defines a grayscale color, used in {@link SolidColor} object.
|
|
54
|
+
*
|
|
55
|
+
* @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/objects/graycolor/}
|
|
56
|
+
*
|
|
57
|
+
* @targetfolder colors
|
|
58
|
+
* @minVersion 23.0
|
|
59
|
+
*/
|
|
60
|
+
export class GrayColor {
|
|
61
|
+
/**
|
|
62
|
+
* The gray value.
|
|
63
|
+
*
|
|
64
|
+
* @default 0
|
|
65
|
+
* @range 0..100
|
|
66
|
+
* @minVersion 23.0
|
|
67
|
+
*/
|
|
68
|
+
get gray(): number;
|
|
69
|
+
set gray(g: number);
|
|
70
|
+
/**
|
|
71
|
+
* The class name of the referenced object: *"GrayColor"*.
|
|
72
|
+
* @minVersion 23.0
|
|
73
|
+
*/
|
|
74
|
+
get typename(): 'GrayColor';
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Defines an HSB color, used in {@link SolidColor} object.
|
|
78
|
+
*
|
|
79
|
+
* @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/objects/hsbcolor/}
|
|
80
|
+
* @targetfolder colors
|
|
81
|
+
* @minVersion 23.0
|
|
82
|
+
*/
|
|
83
|
+
export class HSBColor {
|
|
84
|
+
/**
|
|
85
|
+
* The brightness value.
|
|
86
|
+
*
|
|
87
|
+
* @default 100
|
|
88
|
+
* @range 0..100
|
|
89
|
+
* @minVersion 23.0
|
|
90
|
+
*/
|
|
91
|
+
get brightness(): number;
|
|
92
|
+
set brightness(b: number);
|
|
93
|
+
/**
|
|
94
|
+
* The hue value.
|
|
95
|
+
*
|
|
96
|
+
* @default 360
|
|
97
|
+
* @range 0..360
|
|
98
|
+
* @minVersion 23.0
|
|
99
|
+
*/
|
|
100
|
+
get hue(): number;
|
|
101
|
+
set hue(h: number);
|
|
102
|
+
/**
|
|
103
|
+
* The saturation value.
|
|
104
|
+
*
|
|
105
|
+
* @default 0
|
|
106
|
+
* @range 0..100
|
|
107
|
+
* @minVersion 23.0
|
|
108
|
+
*/
|
|
109
|
+
get saturation(): number;
|
|
110
|
+
set saturation(s: number);
|
|
111
|
+
/**
|
|
112
|
+
* The class name of the referenced object: *"HSBColor"*.
|
|
113
|
+
* @minVersion 23.0
|
|
114
|
+
*/
|
|
115
|
+
get typename(): 'HSBColor';
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Defines a L<sup>\*</sup>a<sup>\*</sup>b<sup>\*</sup> color, used in {@link SolidColor} object.
|
|
119
|
+
*
|
|
120
|
+
* @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/objects/labcolor/}
|
|
121
|
+
* @targetfolder colors
|
|
122
|
+
* @minVersion 23.0
|
|
123
|
+
*/
|
|
124
|
+
export class LabColor {
|
|
125
|
+
/**
|
|
126
|
+
* The a-value.
|
|
127
|
+
*
|
|
128
|
+
* @default 0
|
|
129
|
+
* @range -128..127
|
|
130
|
+
* @minVersion 23.0
|
|
131
|
+
*/
|
|
132
|
+
get a(): number;
|
|
133
|
+
set a(a: number);
|
|
134
|
+
/**
|
|
135
|
+
* The b-value.
|
|
136
|
+
*
|
|
137
|
+
* @default 0
|
|
138
|
+
* @range -128..127
|
|
139
|
+
* @minVersion 23.0
|
|
140
|
+
*/
|
|
141
|
+
get b(): number;
|
|
142
|
+
set b(b: number);
|
|
143
|
+
/**
|
|
144
|
+
* The L-value.
|
|
145
|
+
*
|
|
146
|
+
* @default 100
|
|
147
|
+
* @range 0..100
|
|
148
|
+
* @minVersion 23.0
|
|
149
|
+
*/
|
|
150
|
+
get l(): number;
|
|
151
|
+
set l(l: number);
|
|
152
|
+
/**
|
|
153
|
+
* The class name of the referenced object: *"LabColor"*.
|
|
154
|
+
* @minVersion 23.0
|
|
155
|
+
*/
|
|
156
|
+
get typename(): 'LabColor';
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Defines an RGB color, used in {@link SolidColor} object.
|
|
160
|
+
*
|
|
161
|
+
* Please note: RGB with 32 bits per channels is not currently supported. Color values will be rounded to the nearest
|
|
162
|
+
* range valid for RGB with 16 bits per channel.
|
|
163
|
+
*
|
|
164
|
+
* @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/objects/rgbcolor/}
|
|
165
|
+
* @targetfolder colors
|
|
166
|
+
* @minVersion 23.0
|
|
167
|
+
*/
|
|
168
|
+
export class RGBColor {
|
|
169
|
+
/**
|
|
170
|
+
* The blue color value.
|
|
171
|
+
*
|
|
172
|
+
* @default 255
|
|
173
|
+
* @range 0..255
|
|
174
|
+
* @minVersion 23.0
|
|
175
|
+
*/
|
|
176
|
+
get blue(): number;
|
|
177
|
+
set blue(b: number);
|
|
178
|
+
/**
|
|
179
|
+
* The green color value.
|
|
180
|
+
*
|
|
181
|
+
* @default 255
|
|
182
|
+
* @range 0..255
|
|
183
|
+
* @minVersion 23.0
|
|
184
|
+
*/
|
|
185
|
+
get green(): number;
|
|
186
|
+
set green(g: number);
|
|
187
|
+
/**
|
|
188
|
+
* The red color value.
|
|
189
|
+
*
|
|
190
|
+
* @default 255
|
|
191
|
+
* @range 0..255
|
|
192
|
+
* @minVersion 23.0
|
|
193
|
+
*/
|
|
194
|
+
get red(): number;
|
|
195
|
+
set red(r: number);
|
|
196
|
+
/**
|
|
197
|
+
* The hexadecimal representation of the color.
|
|
198
|
+
*
|
|
199
|
+
* Ex. returns *FF9801*, but accepts *#ff9801* or *FF9801*.
|
|
200
|
+
*
|
|
201
|
+
* @default "FFFFFF"
|
|
202
|
+
* @minVersion 23.0
|
|
203
|
+
*/
|
|
204
|
+
get hexValue(): string;
|
|
205
|
+
set hexValue(value: string);
|
|
206
|
+
/**
|
|
207
|
+
* The class name of the referenced object: *"RGBColor"*.
|
|
208
|
+
* @minVersion 23.0
|
|
209
|
+
*/
|
|
210
|
+
get typename(): 'RGBColor';
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Represents a missing color, used in {@link SolidColor} object.
|
|
214
|
+
*
|
|
215
|
+
* @see {@link https://developer.adobe.com/photoshop/uxp/2022/ps_reference/objects/nocolor/}
|
|
216
|
+
* @targetfolder colors
|
|
217
|
+
* @minVersion 23.0
|
|
218
|
+
*/
|
|
219
|
+
export class NoColor {
|
|
220
|
+
/**
|
|
221
|
+
* The class name of the referenced object: *"NoColor"*.
|
|
222
|
+
* @minVersion 23.0
|
|
223
|
+
*/
|
|
224
|
+
get typename(): 'NoColor';
|
|
225
|
+
}
|