@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,80 @@
1
+ import type * as Constants from '../Constants';
2
+ import type { SolidColor } from '../objects/SolidColor';
3
+ /**
4
+ * An object literal can be constructed with any of the following properties
5
+ * and passed to {@link Photoshop.createDocument}.
6
+ * As a type, `DocumentCreateOptions` can be used in Typescript development.
7
+ *
8
+ * ```javascript
9
+ * const options = { name: "Web mockup", preset: "Web Large" };
10
+ * require('photoshop').app.createDocument(options);
11
+ * ```
12
+ *
13
+ * @targetfolder objects/createoptions
14
+ * @optionobject
15
+ * @minVersion 22.5
16
+ */
17
+ export interface DocumentCreateOptions {
18
+ /**
19
+ * The name to give the new document.
20
+ * @minVersion 22.5
21
+ */
22
+ name?: string;
23
+ /**
24
+ * Preset.
25
+ * @minVersion 22.5
26
+ */
27
+ preset?: string;
28
+ /**
29
+ * JSON Preset, requires JSONified string.
30
+ * @minVersion 22.5
31
+ */
32
+ presetJSON?: string;
33
+ /**
34
+ * ImageMode class.
35
+ * @minVersion 22.5
36
+ */
37
+ mode?: Constants.NewDocumentMode;
38
+ /**
39
+ * Width of image in pixels.
40
+ * @minVersion 22.5
41
+ */
42
+ width?: number;
43
+ /**
44
+ * Height of image in pixels.
45
+ * @minVersion 22.5
46
+ */
47
+ height?: number;
48
+ /**
49
+ * Resolution of image.
50
+ * @minVersion 22.5
51
+ */
52
+ resolution?: number;
53
+ /**
54
+ * Fill color of the document.
55
+ * @minVersion 22.5
56
+ */
57
+ fill?: Constants.DocumentFill;
58
+ /**
59
+ * Custom fill color of the document.
60
+ * @minVersion 23.0
61
+ */
62
+ fillColor?: SolidColor;
63
+ /**
64
+ * Bit depth
65
+ * @minVersion 22.5
66
+ * @default 8
67
+ * @range [8,16,32]
68
+ */
69
+ depth?: number;
70
+ /**
71
+ * Pixel Scale Factor.
72
+ * @minVersion 22.5
73
+ */
74
+ pixelScaleFactor?: number;
75
+ /**
76
+ * Color Profile using profile name.
77
+ * @minVersion 22.5
78
+ */
79
+ profile?: string;
80
+ }
@@ -0,0 +1,91 @@
1
+ /**
2
+ * An object literal can be constructed with any of the following properties and passed to {@link LayerComps.add}.
3
+ * As a type, `LayerCompCreateOptions` can be used in Typescript development.
4
+ *
5
+ * ```javascript
6
+ * const options = { name: "mockup", comment: "First attempt", visibility: true };
7
+ * await require('photoshop').app.activeDocument.layerComps.add(options);
8
+ * ```
9
+ *
10
+ * @targetfolder objects/createoptions
11
+ * @optionobject
12
+ * @minVersion
13
+ */
14
+ export interface LayerCompCreateOptions {
15
+ /**
16
+ * The name shown in the Layer Comps panel. If no value is provided,
17
+ * then a name will be generated following the template, "Layer Comp #".
18
+ * @default -
19
+ * @minVersion 24.0
20
+ */
21
+ name?: string;
22
+ /**
23
+ * The comment appears in the Layer Comp Options dialog.
24
+ * @default null
25
+ * @minVersion 24.0
26
+ */
27
+ comment?: string;
28
+ /**
29
+ * Record the state of the layers' visibility.
30
+ * @default false
31
+ * @minVersion 24.0
32
+ */
33
+ visibility?: boolean;
34
+ /**
35
+ * Record the state of the layers' position.
36
+ * @default true
37
+ * @minVersion 24.0
38
+ */
39
+ position?: boolean;
40
+ /**
41
+ * Record the state of the layers' effects.
42
+ * @default false
43
+ * @minVersion 24.0
44
+ */
45
+ appearance?: boolean;
46
+ /**
47
+ * Record the state of any Layer Comps contained in the recorded layers' Smart Objects.
48
+ * @default false
49
+ * @minVersion 24.0
50
+ */
51
+ childComp?: boolean;
52
+ }
53
+ /**
54
+ * An object literal can be constructed with any of the following properties and passed to {@link LayerComp.recapture}.
55
+ * As a type, `LayerCompRecaptureOptions` can be used in Typescript development.
56
+ *
57
+ * ```javascript
58
+ * const options = { visibility: true, position: true };
59
+ * await require('photoshop').app.activeDocument.layerComps.add(options);
60
+ * ```
61
+ *
62
+ * @targetfolder objects/options
63
+ * @optionobject
64
+ * @minVersion 24.0
65
+ */
66
+ export interface LayerCompRecaptureOptions {
67
+ /**
68
+ * Update the recorded state of the layers' visibility.
69
+ * @default false
70
+ * @minVersion 24.0
71
+ */
72
+ visibility?: boolean;
73
+ /**
74
+ * Update the recorded state of the layers' position.
75
+ * @default false
76
+ * @minVersion 24.0
77
+ */
78
+ position?: boolean;
79
+ /**
80
+ * Update the recorded state of the layers' effects.
81
+ * @default false
82
+ * @minVersion 24.0
83
+ */
84
+ appearance?: boolean;
85
+ /**
86
+ * Update the recorded state of any Layer Comps contained in the recorded layers' Smart Objects.
87
+ * @default false
88
+ * @minVersion 24.0
89
+ */
90
+ childComp?: boolean;
91
+ }
@@ -0,0 +1,153 @@
1
+ import type * as Constants from '../Constants';
2
+ import type { Layer } from '../Layer';
3
+ import type { SolidColor } from '../objects/SolidColor';
4
+
5
+ interface LayerCreateOptionsBase {
6
+ /**
7
+ * Name of the newly created layer. If no value is provided,
8
+ * then a name will be generated following the template, "Layer #".
9
+ * @default -
10
+ * @minVersion 22.5
11
+ */
12
+ name?: string;
13
+ /**
14
+ * Whether to use previous layer to create clipping mask.
15
+ *
16
+ * @default false
17
+ * @minVersion 22.5
18
+ */
19
+ group?: boolean;
20
+ /**
21
+ * Label color of the newly created layer or group.
22
+ * @default NONE
23
+ * @minVersion 22.5
24
+ */
25
+ color?: Constants.LabelColors;
26
+ /**
27
+ * Opacity of the newly created layer or group.
28
+ *
29
+ * @default 100
30
+ * @minVersion 22.5
31
+ */
32
+ opacity?: number;
33
+ /**
34
+ * Deprecated, please use `blendMode` above as it will override this value.
35
+ *
36
+ * @default NORMAL
37
+ * @minVersion 22.5
38
+ * @deprecated
39
+ */
40
+ mode?: Constants.BlendMode;
41
+ /**
42
+ * Blend mode of the newly created layer or group.
43
+ * @default NORMAL
44
+ * @minVersion 22.5
45
+ */
46
+ blendMode?: Constants.BlendMode;
47
+ }
48
+ /**
49
+ * An object literal can be constructed with any of the following properties and passed to {@link Document.createLayer}.
50
+ * As a type, `PixelLayerCreateOptions` can be used in Typescript development.
51
+ *
52
+ * ```javascript
53
+ * const options = { name: "myLayer", opacity: 80, blendMode: constants.BlendMode.COLORDODGE };
54
+ * await require('photoshop').app.activeDocument.createLayer(options);
55
+ * ```
56
+ *
57
+ * @targetfolder objects/createoptions
58
+ * @optionobject
59
+ * @minVersion 22.5
60
+ */
61
+ export interface PixelLayerCreateOptions extends LayerCreateOptionsBase {
62
+ /**
63
+ * Whether to fill the layer with a neutral color when applying Blend Mode.
64
+ *
65
+ * @default false
66
+ * @minVersion 22.5
67
+ */
68
+ fillNeutral?: boolean;
69
+ }
70
+ /**
71
+ * An object literal can be constructed with any of the following properties
72
+ * and passed to {@link Document.createLayer}.
73
+ * As a type, `TextLayerCreateOptions` can be used in Typescript development.
74
+ *
75
+ * ```javascript
76
+ * const options = { name: "myTextLayer", contents: "Hello, World!", fontSize: 24, position: {x: 200, y: 300} };
77
+ * await require('photoshop').app.activeDocument.createLayer(options);
78
+ * ```
79
+ *
80
+ * @targetfolder objects/createoptions
81
+ * @optionobject
82
+ * @minVersion 24.2
83
+ */
84
+ export interface TextLayerCreateOptions extends LayerCreateOptionsBase {
85
+ /**
86
+ * Text content of the newly created text layer.
87
+ * @default "Lorem Ipsum"
88
+ * @minVersion 24.2
89
+ */
90
+ contents?: string;
91
+ /**
92
+ * Insertion coordinates of the newly created text layer, in pixels
93
+ * @default document center.
94
+ * @minVersion 24.2
95
+ */
96
+ position?: {
97
+ x: number;
98
+ y: number;
99
+ };
100
+ /**
101
+ * Text color of the newly created text layer.
102
+ * @default black
103
+ * @minVersion 24.2
104
+ */
105
+ textColor?: SolidColor;
106
+ /**
107
+ * Font size of the newly created text layer in pixels.
108
+ * @default 12px
109
+ * @minVersion 24.2
110
+ */
111
+ fontSize?: number;
112
+ /**
113
+ * Font PostScript name of the newly created text layer.
114
+ * @default "MyriadPro-Regular"
115
+ * @minVersion 24.2
116
+ */
117
+ fontName?: string;
118
+ }
119
+ /**
120
+ * An object literal can be constructed with any of the following properties
121
+ * and passed to {@link Document.createLayerGroup}.
122
+ * As a type, `GroupLayerCreateOptions` can be used in Typescript development.
123
+ *
124
+ * ```javascript
125
+ * const options = { name: "myGroup", opacity: 50 };
126
+ * await require('photoshop').app.activeDocument.createLayerGroup(options);
127
+ * ```
128
+ *
129
+ * @targetfolder objects/createoptions
130
+ * @optionobject
131
+ * @minVersion 22.5
132
+ */
133
+ export interface GroupLayerCreateOptions extends LayerCreateOptionsBase {
134
+ /**
135
+ * Name of the newly created layer group. If no value is provided,
136
+ * then a name will be generated following the template, "Group #".
137
+ * @minVersion 22.5
138
+ */
139
+ name?: string;
140
+ /**
141
+ * Layer(s) to populate the newly created group.
142
+ * @minVersion 22.5
143
+ */
144
+ fromLayers?: Layer | Layer[];
145
+ }
146
+ /**
147
+ * The options passed to {@link Document.createLayer} may take any of the following forms:
148
+ * - PixelLayerCreateOptions
149
+ * - GroupLayerCreateOptions
150
+ * @minVersion 22.5
151
+ */
152
+ export type LayerCreateOptions = PixelLayerCreateOptions | GroupLayerCreateOptions;
153
+ export {};
@@ -0,0 +1,6 @@
1
+ export interface Bounds {
2
+ left: number;
3
+ right: number;
4
+ top: number;
5
+ bottom: number;
6
+ }
@@ -0,0 +1,218 @@
1
+ /**
2
+ * These property values are used to apply justification to paragraph text.
3
+ *
4
+ * These justification features can be seen in the dialog
5
+ * in the Paragraph panel's flyout menu item labeled "Justification...".
6
+ * They are expressed with an object literal with the following properties (values are percentages):
7
+ *
8
+ * ```javascript
9
+ * {
10
+ * // Minimum, Desired and Maximum percentage of normal word spacing
11
+ * wordSpacingMinimum: number,
12
+ * wordSpacingDesired: number,
13
+ * wordSpacingMaximum: number,
14
+ * // Minimum, Desired and Maximum percentage of normal letter spacing
15
+ * letterSpacingMinimum: number,
16
+ * letterSpacingDesired: number,
17
+ * letterSpacingMaximum: number,
18
+ * // Minimum, Desired and Maximum percentage of normal glyph scaling
19
+ * glyphScalingMinimum: number,
20
+ * glyphScalingDesired: number,
21
+ * glyphScalingMaximum: number
22
+ * // Percentage of type size to use for auto leading
23
+ * autoLeadingAmount: number
24
+ * }
25
+ * ```
26
+ *
27
+ * Unless it's been set, the justificationFeatures value is `null`.
28
+ * The setter allows you to set individual properties: the missing ones will be
29
+ * either filled with the default values or left untouched.
30
+ *
31
+ * @optionobject
32
+ * @targetfolder objects/options
33
+ * @minVersion 24.1
34
+ */
35
+ export interface JustificationProperties {
36
+ /**
37
+ * Auto leading amount
38
+ * @default 120
39
+ * @range 0..500
40
+ * @minVersion 24.1
41
+ */
42
+ autoLeadingAmount?: number;
43
+ /**
44
+ * Minimum word spacing - Must be less than or equal to Maximum.
45
+ * @default 80
46
+ * @range 0..1000
47
+ * @minVersion 24.1
48
+ */
49
+ wordSpacingMinimum?: number;
50
+ /**
51
+ * Desired word spacing - Must be between Minimum and Maximum or equal.
52
+ * @default 100
53
+ * @range 0..1000
54
+ * @minVersion 24.1
55
+ */
56
+ wordSpacingDesired?: number;
57
+ /**
58
+ * Maximum word spacing - Must be greater than or equal to Minimum.
59
+ * @default 133
60
+ * @range 0..1000
61
+ * @minVersion 24.1
62
+ */
63
+ wordSpacingMaximum?: number;
64
+ /**
65
+ * Minimum letter spacing - Must be less than or equal to Maximum.
66
+ * @default 0
67
+ * @range 0..500
68
+ * @minVersion 24.1
69
+ */
70
+ letterSpacingMinimum?: number;
71
+ /**
72
+ * Desired letter spacing - Must be between Minimum and Maximum or equal.
73
+ * @default 0
74
+ * @range 0..500
75
+ * @minVersion 24.1
76
+ */
77
+ letterSpacingDesired?: number;
78
+ /**
79
+ * Maximum letter spacing - Must be greater than or equal to Minimum.
80
+ * @default 0
81
+ * @range 0..500
82
+ * @minVersion 24.1
83
+ */
84
+ letterSpacingMaximum?: number;
85
+ /**
86
+ * Minimum glyph scaling - Must be less than or equal to Maximum.
87
+ * @default 100
88
+ * @range 50..200
89
+ * @minVersion 24.1
90
+ */
91
+ glyphScalingMinimum?: number;
92
+ /**
93
+ * Desired glyph scaling - Must be between Minimum and Maximum or equal
94
+ * @default 100
95
+ * @range 50..200
96
+ * @minVersion 24.1
97
+ */
98
+ glyphScalingDesired?: number;
99
+ /**
100
+ * Maximum glyph scaling - Must be greater than or equal to Minimum.
101
+ * @default 100
102
+ * @range 50..200
103
+ * @minVersion 24.1
104
+ */
105
+ glyphScalingMaximum?: number;
106
+ }
107
+ /**
108
+ * These property values are used to apply hyphenation to paragraph text.
109
+ *
110
+ * These hyphenation features can be seen in the dialog
111
+ * in the Paragraph panel's flyout menu item labeled "Hyphenation...".
112
+ * They are expressed with an object literal with the following properties (values are in pixels):
113
+ *
114
+ * ```javascript
115
+ * {
116
+ * // The minimum number of letters a word must have in order for hyphenation
117
+ * // in word wrap to be allowed. In the range [2, 25], default 5.
118
+ * wordsLongerThan: number,
119
+ * // The minimum number of letters after which hyphenation
120
+ * // in word wrap is allowed. In the range [1, 15], default 2.
121
+ * afterFirst: number,
122
+ * // The minimum number of letters before which hyphenation
123
+ * // in word wrap is allowed. In the range [1, 15], default 2.
124
+ * beforeLast: number,
125
+ * // The maximum number of consecutive lines that can end with a hyphenated word.
126
+ * // In the range [2, 25], default 2.
127
+ * limit: number,
128
+ * // The distance in pixels at the end of a line that will cause a word
129
+ * // to break in unjustified type. In the range of [0, 8640] pixels for a 72PPI document.
130
+ * // If the document resolution is different, the max. value is scaled accordingly.
131
+ * // Default: 36px (72PPI)
132
+ * zone: number,
133
+ * // True to allow hyphenation in word wrap of capitalized words. Default true.
134
+ * capitalWords: boolean
135
+ * }
136
+ * ```
137
+ *
138
+ * The hyphenationFeatures getter returns an object with all the features:
139
+ *
140
+ * ```javascript
141
+ * const textItem = app.activeDocument.activeLayers[0].textItem;
142
+ * textItem.paragraphStyle.hyphenationFeatures;
143
+ * // {
144
+ * // wordsLongerThan: 5,
145
+ * // afterFirst: 2,
146
+ * // beforeLast: 2,
147
+ * // limit: 2,
148
+ * // zone: 36,
149
+ * // capitalWords: true
150
+ * // }
151
+ * ```
152
+ *
153
+ * In the object that is passed to the setter, all the properties are optional;
154
+ * the ones that are not specified will be assigned the default values.
155
+ *
156
+ * ```javascript
157
+ * textItem.paragraphStyle.hyphenationFeatures = { wordsLongerThan: 10, afterFirst: 3 };
158
+ * // {
159
+ * // wordsLongerThan: 10,
160
+ * // afterFirst: 3,
161
+ * // beforeLast: 2,
162
+ * // limit: 2,
163
+ * // zone: 36,
164
+ * // capitalWords: true
165
+ * // }
166
+ * ```
167
+ *
168
+ * @optionobject
169
+ * @targetfolder objects/options
170
+ * @minVersion 24.1
171
+ */
172
+ export interface HyphenationProperties {
173
+ /**
174
+ * The minimum number of letters a word must have in order for hyphenation
175
+ * in word wrap to be allowed.
176
+ * @range 2..25
177
+ * @default 5
178
+ * @minVersion 24.1
179
+ */
180
+ wordsLongerThan?: number;
181
+ /**
182
+ * The minimum number of letters after which hyphenation
183
+ * in word wrap is allowed.
184
+ * @range 1..15
185
+ * @default 2
186
+ * @minVersion 24.1
187
+ */
188
+ afterFirst?: number;
189
+ /**
190
+ * The minimum number of letters before which hyphenation
191
+ * in word wrap is allowed.
192
+ * @range 1..15
193
+ * @default 2
194
+ * @minVersion 24.1
195
+ */
196
+ beforeLast?: number;
197
+ /**
198
+ * The maximum number of consecutive lines that can end with a hyphenated word.
199
+ * @range 2..25
200
+ * @default 2
201
+ * @minVersion 24.1
202
+ */
203
+ limit?: number;
204
+ /**
205
+ * The distance in pixels at the end of a line that will cause a word
206
+ * to break in unjustified type.
207
+ * @range 0..8640 for a 72PPI document
208
+ * @default 36
209
+ * @minVersion 24.1
210
+ */
211
+ zone?: number;
212
+ /**
213
+ * True to allow hyphenation in word wrap of capitalized words.
214
+ * @default true
215
+ * @minVersion 24.1
216
+ */
217
+ capitalWords?: boolean;
218
+ }
@@ -0,0 +1,61 @@
1
+ /**
2
+ * These types define color objects that Photoshop accepts, particularly [[PhotoshopCore.convertColor]] API
3
+ *
4
+ * On DOM level, [[SolidColor]] is used for all representations of a color.
5
+ */
6
+ export type ColorDescriptor
7
+ = | RGBColorDescriptor
8
+ | HSBColorDescriptor
9
+ | CMYKColorDescriptor
10
+ | LabColorDescriptor
11
+ | GrayscaleColorDescriptor
12
+ | RGB32ColorDescriptor;
13
+ export interface RGBColorDescriptor {
14
+ _obj: 'RGBColor';
15
+ red: number;
16
+ green: number;
17
+ blue: number;
18
+ }
19
+ export interface RGB32ColorDescriptor {
20
+ _obj: 'RGBColor';
21
+ greenFloat: number;
22
+ redFloat: number;
23
+ blueFloat: number;
24
+ }
25
+ export interface HSBColorDescriptor {
26
+ _obj: 'HSBColorClass';
27
+ hue: {
28
+ _unit: 'angleUnit';
29
+ _value: number;
30
+ };
31
+ saturation: number;
32
+ brightness: number;
33
+ }
34
+ export interface CMYKColorDescriptor {
35
+ _obj: 'CMYKColorClass';
36
+ cyan: number;
37
+ magenta: number;
38
+ yellowColor: number;
39
+ black: number;
40
+ }
41
+ export interface LabColorDescriptor {
42
+ _obj: 'labColor';
43
+ luminance: number;
44
+ a: number;
45
+ b: number;
46
+ }
47
+ export interface GrayscaleColorDescriptor {
48
+ _obj: 'grayscale';
49
+ gray: number;
50
+ }
51
+ /**
52
+ * These internal numbers are used by Photoshop as target color spaces during [[photoshopCore.convertColor]] calls.
53
+ * @ignore
54
+ */
55
+ export enum ColorConversionModel {
56
+ HSB = 4,
57
+ CMYK = 5,
58
+ Lab = 6,
59
+ RGB = 15,
60
+ Gray = 16,
61
+ }
@@ -0,0 +1,45 @@
1
+ export type UnitTypeEnum
2
+ = | 'angleUnit'
3
+ | 'densityUnit'
4
+ | 'distanceUnit'
5
+ | 'percentUnit'
6
+ | 'pixelsUnit'
7
+ | 'pointsUnit'
8
+ | 'millimetersUnit'
9
+ | 'centimetersUnit'
10
+ | 'inchesUnit'
11
+ | 'picasUnit';
12
+ export interface UnitValue {
13
+ _unit: UnitTypeEnum;
14
+ _value: number;
15
+ }
16
+ export interface AngleValue extends UnitValue {
17
+ _unit: 'angleUnit';
18
+ }
19
+ export interface DensityValue extends UnitValue {
20
+ _unit: 'densityUnit';
21
+ }
22
+ export interface DistanceValue extends UnitValue {
23
+ _unit: 'distanceUnit';
24
+ }
25
+ export interface PercentValue extends UnitValue {
26
+ _unit: 'percentUnit';
27
+ }
28
+ export interface PixelValue extends UnitValue {
29
+ _unit: 'pixelsUnit';
30
+ }
31
+ export interface PointValue extends UnitValue {
32
+ _unit: 'pointsUnit';
33
+ }
34
+ export interface MillimeterValue extends UnitValue {
35
+ _unit: 'millimetersUnit';
36
+ }
37
+ export interface CentimeterValue extends UnitValue {
38
+ _unit: 'centimetersUnit';
39
+ }
40
+ export interface InchValue extends UnitValue {
41
+ _unit: 'inchesUnit';
42
+ }
43
+ export interface PicaValue extends UnitValue {
44
+ _unit: 'picasUnit';
45
+ }
@@ -0,0 +1,21 @@
1
+ import { dialog } from './internal/dialog';
2
+ import { entrypoints } from './internal/entrypoints';
3
+ import { host } from './internal/host';
4
+ import { os } from './internal/os';
5
+ import { shell } from './internal/shell';
6
+ import { storage } from './internal/storage';
7
+ import { versions } from './internal/versions';
8
+
9
+ export type * from './internal/all-types';
10
+ export { dialog, entrypoints, host, os, shell, storage, versions };
11
+
12
+ const _default: {
13
+ dialog: typeof dialog;
14
+ entrypoints: typeof entrypoints;
15
+ host: typeof host;
16
+ os: typeof os;
17
+ shell: typeof shell;
18
+ storage: typeof storage;
19
+ versions: typeof versions;
20
+ };
21
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export type * from './entrypoints';
2
+ export type * from './other';
3
+ export type * from './storage';