Skip to content

Commit

Permalink
Ps Update docs to reflect Imaging moving out of Prerelease. (#404)
Browse files Browse the repository at this point in the history
* Update docs to reflect Imaging moving out of Prerelease.

"_beta" dropped from Imaging's module name.
Example script and plugin updated.
Update SolidColor after fixes in January.
Clean up pages for interfaces, filing them under Objects.

* Changelog fix for 24.2 entry.

LaB is Lab in Ps.

* Add entry for 24.4 Beta for Imaging API.
  • Loading branch information
samgannawayA committed Mar 30, 2023
1 parent c547df3 commit 9a3ecc4
Show file tree
Hide file tree
Showing 44 changed files with 20,984 additions and 15,442 deletions.
190 changes: 137 additions & 53 deletions reference-ps.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ module.exports = [{
"title": "Channels",
"path": "/ps_reference/classes/channels/"
},
{
"title": "CharacterStyle",
"path": "/ps_reference/classes/characterstyle/"
},
{
"title": "ColorSampler",
"path": "/ps_reference/classes/colorsampler/"
Expand Down Expand Up @@ -80,28 +76,43 @@ module.exports = [{
"path": "/ps_reference/classes/layers/"
},
{
"title": "ParagraphStyle",
"path": "/ps_reference/classes/paragraphstyle/"
},
{
"title": "PathItem",
"path": "/ps_reference/classes/pathitem/"
},
{
"title": "PathItems",
"path": "/ps_reference/classes/pathitems/"
},
{
"title": "PathPoint",
"path": "/ps_reference/classes/pathpoint/"
},
{
"title": "PathPointInfo",
"path": "/ps_reference/classes/pathpointinfo/"
},
{
"title": "PathPoints",
"path": "/ps_reference/classes/pathpoints/"
"title": "Paths",
"path": "/ps_reference/classes/pathitem",
"header": true,
"pages": [
{
"title": "PathItem",
"path": "/ps_reference/classes/pathitem/"
},
{
"title": "PathPoint",
"path": "/ps_reference/classes/pathpoint/"
},
{
"title": "SubPathItem",
"path": "/ps_reference/classes/subpathitem/"
},
{
"title": "PathItems",
"path": "/ps_reference/classes/pathitems/"
},
{
"title": "PathPoints",
"path": "/ps_reference/classes/pathpoints/"
},
{
"title": "SubPathItems",
"path": "/ps_reference/classes/subpathitems/"
},
{
"title": "PathPointInfo",
"path": "/ps_reference/classes/pathpointinfo/"
},
{
"title": "SubPathInfo",
"path": "/ps_reference/classes/subpathinfo/"
}
]
},
{
"title": "Photoshop",
Expand Down Expand Up @@ -167,32 +178,35 @@ module.exports = [{
"path": "/ps_reference/classes/solidcolor/"
},
{
"title": "SubPathInfo",
"path": "/ps_reference/classes/subpathinfo/"
},
{
"title": "SubPathItem",
"path": "/ps_reference/classes/subpathitem/"
},
{
"title": "SubPathItems",
"path": "/ps_reference/classes/subpathitems/"
},
{
"title": "TextFont",
"path": "/ps_reference/classes/textfont/"
},
{
"title": "TextFonts",
"path": "/ps_reference/classes/textfonts/"
},
{
"title": "TextItem",
"path": "/ps_reference/classes/textitem/"
},
{
"title": "WarpStyle",
"path": "/ps_reference/classes/warpstyle/"
"title": "Text",
"path": "/ps_reference/classes/textitem",
"header": true,
"pages": [
{
"title": "TextItem",
"path": "/ps_reference/classes/textitem/"
},
{
"title": "TextFonts",
"path": "/ps_reference/classes/textfonts/"
},
{
"title": "TextFont",
"path": "/ps_reference/classes/textfont/"
},
{
"title": "CharacterStyle",
"path": "/ps_reference/classes/characterstyle/"
},
{
"title": "ParagraphStyle",
"path": "/ps_reference/classes/paragraphstyle/"
},
{
"title": "WarpStyle",
"path": "/ps_reference/classes/warpstyle/"
}
]
}
]
},{
Expand All @@ -219,6 +233,53 @@ module.exports = [{
}
]
},
{
"title": "Core Modules Options",
"path": "/ps_reference/objects/coremodulesobjects",
"header": true,
"pages": [
{
"title": "Batch Play Command Options",
"path": "/ps_reference/objects/options/batchplaycommandoptions/"
},
{
"title": "CPU Info",
"path": "/ps_reference/objects/returnobjects/cpuinfo/"
},
{
"title": "Execute As Modal Options",
"path": "/ps_reference/objects/returnobjects/executeasmodaloptions/"
},
{
"title": "Execution Context",
"path": "/ps_reference/objects/options/executioncontext/"
},
{
"title": "GPU Info",
"path": "/ps_reference/objects/returnobjects/gpuinfo/"
},
{
"title": "History State Info",
"path": "/ps_reference/objects/options/historystateinfo/"
},
{
"title": "History Suspension",
"path": "/ps_reference/objects/returnobjects/historysuspension/"
},
{
"title": "Open CL Device Info",
"path": "/ps_reference/objects/returnobjects/opencldeviceinfo/"
},
{
"title": "Open GL Device Info",
"path": "/ps_reference/objects/returnobjects/opengldeviceinfo/"
},
{
"title": "Resume History Suspension Options",
"path": "/ps_reference/objects/options/resumehistorysuspensionoptions/"
}
]
},
{
"title": "Create Options",
"path": "/ps_reference/objects/createoptions",
Expand Down Expand Up @@ -246,6 +307,29 @@ module.exports = [{
}
]
},
{
"title": "Other Options",
"path": "/ps_reference/objects/otherobjects",
"header": true,
"pages": [
{
"title": "Color Picker Option",
"path": "/ps_reference/objects/options/colorpickeroption/"
},
{
"title": "Layer Comp Recapture Options",
"path": "/ps_reference/objects/options/layercomprecaptureoptions/"
},
{
"title": "Hyphenation Properties",
"path": "/ps_reference/objects/options/hyphenationproperties/"
},
{
"title": "Justification Properties",
"path": "/ps_reference/objects/options/justificationproperties/"
}
]
},
{
"title": "Save Options",
"path": "/ps_reference/objects/saveoptions",
Expand Down Expand Up @@ -329,7 +413,7 @@ module.exports = [{
"path": "/ps_reference/media/photoshopaction/"
},
{
"title": "Imaging API Beta",
"title": "Imaging API",
"path": "/ps_reference/media/imaging/"
},
{
Expand Down
78 changes: 40 additions & 38 deletions src/pages/ps_reference/changelog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,38 @@ description: Contains a running log of changes to the UXP API environment in Ado

# Photoshop API Changelog

## Photoshop Beta (24.2 February 2023)
## Photoshop Beta 24.4 (April 2023)
### Imaging API update
The [Imaging API](../media/imaging) is moving out of Prerelease. It will now be available in the Beta build with the module name "imaging".
Previously, access was via `require("photoshop").imaging_beta`. It is now `require("photoshop").imaging`.
#### Improvements and Fixes
- Speed on Windows, especially medium to small images.
- Invalid `targetBounds` caused crash.


## Photoshop 24.2 (February 2023)

### UXP 6.4 Integration
From the [UXP team](../../uxp-api/) we have integrated the following update.
> ### New
> - Webviews for Panels
> - Support [Path Module](../../uxp-api/reference-js/Global%20Members/Path/) APIs
> - Script can run fsapi with full access in [localFileSystem](../../uxp-api/reference-js/Modules/FileSystem/)
> ### Bug Fixes
> - PluginManifest parsing / Load Plugin errors not logged in UDT
> - Error shown in UDT APP logs on Plugin UnLoad
> - UXP script : file session tokens are not getting created
> - Error message and stack are empty in case of reject("error string") executed in script
> - [Win only]-Volume is being muted automatically for 3rd video in the tutorial while opening the video in Theatre mode
> - After closing the theatre mode, videos are overlapping while scrolling up and down in Discover
> - Provide an API to programmatically close dialog in pop-out/theatre mode.
> - Plugin Data folder shouldn't be created for scripts
> - Crash on exit
> - script.setResult("kSuccess") not working
> - Resource Leaks in Window Dialog on UWP
> - Privilege plugin fail to add in XD in certain cases
> - Fixed mouse/keyboard events within Webview in XD v55 and Win 10.
### Imaging API Beta
We are excited to provide an entirely new capability with the [Imaging API](../media/imaging). Anyone that has been eagerly awaiting the ability to directly get and set pixels in a document should head to the [dedicated page](../media/imaging). Note: we are serious about the Beta label. While this is exciting new territory, keep in mind that the API is in an early form. We want your feedback to help guide it toward maturity.
Expand Down Expand Up @@ -81,17 +112,15 @@ The UXP DOM features a variety of new text-related APIs, that provide a more rob
- horizontalDistortion
- verticalDistortion
- reset()

### Other fixes

### UXP
From the [UXP team](../../uxp-api/) we have integrated the following update.

#### v6.5 Integration

##### New
- [UXP Hybrid plugins](../../guides/hybrid-plugins/)
- Allow unrestricted relative paths in require from scripts
- [getEntryWithUrl](../../uxp-api/reference-js/Modules/uxp/Persistent%20File%20Storage/FileSystemProvider.md#getentrywithurlurl) in LocalFileProvider

- `solidColor.cmyk` no longer shows `undefined` for `yellow` color. Also setter is now fixed.
- `SolidColor` - Adds range validation for all color modes and its components so it should not be possible to enter invalid value. This should also fix invalid hex code value.
- Adds setter to the `app.backgroundColor` so it can be changed.
- `app.backgroundColor` and `app.foregroundColor` were broken when color was was not picked as RGB color*
- RGB32 is currently not supported. If RGB 32 bit per channel is obtained, it will be converted automatically into
nearest RGB 16 bit per channel.

----
## Photoshop 24.1 (December 2022)
Expand Down Expand Up @@ -120,33 +149,6 @@ The CountItems DOM API is now available in Photoshop.
- `move()`, `remove()`
-


### UXP
From the [UXP team](../../uxp-api/) we have integrated the following update.

#### v6.4 Integration

##### New
- [WebView](../../uxp/reference-js/Global%20Members/HTML%20Elements/HTMLWebViewElement) for panels
- Support [Path Module APIs](../../uxp/reference-js/Global%20Members/Path)
- Script can run fsapi with full access in localFileSystem

##### Bugs Fixes
- PluginManifest parsing / Load Plugin errors not logged in UDT
- Error shown in UDT APP logs on Plugin UnLoad
- UXP script : file session tokens are not getting created
- Error message and stack are empty in case of reject("error string") executed in script
- [Win only]-Volume is being muted automatically for 3rd video in the tutorial while opening the video in Theatre mode
- After closing the theatre mode, video's are Overlapping while scrolling up and down in DP
- Provide an API to programmatically close dialog in pop-out/theatre mode.
- Plugin Data folder shouldn't be created for scripts
- Crash on exit
- script.setResult("kSuccess") not working
- Resource Leaks in Window Dialog on UWP
- Privilege plugin fail to add in XD in certain cases
- Fixed mouse/keyboard events within Webview in XD v55 and Win 10.


## Photoshop 24.0 (October 2022)

### Preferences
Expand Down
16 changes: 8 additions & 8 deletions src/pages/ps_reference/classes/paragraphstyle.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ The Class that stores properties related to the Paragraph panel in the Photoshop

| Name | Type | Access | Default | Range | Min Version | Description |
| :------ | :------ | :------ | :------ | :------ | :------ | :------ |
| features | [*TypeInterfaceFeatures*](/ps_reference/modules/constants/#typeinterfacefeatures) | R W | TypeInterfaceFeatures.DEFAULT | - | 24.1 | The paragraph UI features to display. |
| features | [*TypeInterfaceFeatures*](/ps_reference/modules/constants/#typeinterfacefeatures) | R W | [DEFAULT](Constants.TypeInterfaceFeatures) | - | 24.1 | The paragraph UI features to display. |
| firstLineIndent | *number* | R W | - | -1296..1296 | 24.1 | The amount of space in pixels to indent the first line of paragraphs for a 72ppi document. |
| hyphenation | *boolean* | R W | false | - | 24.1 | True to use hyphenation in word wrap. Use hyphenationFeatures for maximum control. |
| hyphenationFeatures | [*HyphenationProperties*](/ps_reference/interfaces/hyphenationproperties/) | R W | - | - | 24.1 | The hyphenation features as they're displayed in the dialog found in the Paragraph's flyout menu "Hyphenation...". They're expressed with an option object with the following properties (numbers are in pixels): ```javascript { // The minimum number of letters a word must have in order for hyphenation // in word wrap to be allowed. In the range [2, 25], default 5. wordsLongerThan: number, // The minimum number of letters after which hyphenation // in word wrap is allowed. In the range [1, 15], default 2. afterFirst: number, // The minimum number of letters before which hyphenation // in word wrap is allowed. In the range [1, 15], default 2. beforeLast: number, // The maximum number of consecutive lines that can end with a hyphenated word. // In the range [2, 25], default 2. limit: number, // The distance in pixels at the end of a line that will cause a word // to break in unjustified type. In the range of [0, 8640] pixels for a 72PPI document. // If the document resolution is different, the max. value is scaled accordingly. // Default: 36px (72PPI) zone: number, // True to allow hyphenation in word wrap of capitalized words. Default true. capitalWords: boolean } ``` The hyphenationFeatures getter returns an object with all the features: ```javascript const textItem = app.activeDocument.activeLayers[0].textItem; textItem.paragraphStyle.hyphenationFeatures; // { // wordsLongerThan: 5, // afterFirst: 2, // beforeLast: 2, // limit: 2, // zone: 36, // capitalWords: true // } ``` In the object that is passed to the setter, all the properties are optional; the ones that are not specified will be assigned the default values. ```javascript textItem.paragraphStyle.hyphenationFeatures = { wordsLongerThan: 10, afterFirst: 3 }; // { // wordsLongerThan: 10, // afterFirst: 3, // beforeLast: 2, // limit: 2, // zone: 36, // capitalWords: true // } ``` |
| justification | [*Justification*](/ps_reference/modules/constants/#justification) | R W | Justification.LEFT | - | 24.1 | The paragraph justification. |
| justificationFeatures | [*JustificationProperties*](/ps_reference/interfaces/justificationproperties/) | R W | - | - | 24.1 | The justification features as they're displayed in the dialog found in the Paragraph's flyout menu "Justification...". They're expressed with an option object with the following properties (all percentage numbers): ```javascript { // Minimum, Desired and Maximum percentage of normal word spacing wordSpacingMinimum: number, wordSpacingDesired: number, wordSpacingMaximum: number, // Minimum, Desired and Maximum percentage of normal letter spacing letterSpacingMinimum: number, letterSpacingDesired: number, letterSpacingMaximum: number, // Minimum, Desired and Maximum percentage of normal glyph scaling glyphScalingMinimum: number, glyphScalingDesired: number, glyphScalingMaximum: number // Percentage of type size to use for auto leading autoLeadingAmount: number } ``` Unless it's been set, the justificationFeatures value is `null`. The setter allows you to set individual properties: the missing ones will be either filled with the default values or left untouched. Properties' ranges are as follows: WordSpacing: 0 <= Minimum <= Maximum Minimum <= Desired <= Maximum Minimum <= Maximum <= 1000 LetterSpacing: -100 <= Minimum <= Maximum Minimum <= Desired <= Maximum Minimum <= Maximum <= 500 GlyphScaling: 50 <= Minimum <= Maximum Minimum <= Desired <= Maximum Minimum <= Maximum <= 200 AutoLeading: 0 <= AutoLeading <= 500 |
| kashidaWidth | [*KashidaWidthType*](/ps_reference/modules/constants/#kashidawidthtype) | R W | KashidaWidthType.MEDIUM | - | 24.1 | The width of kashida (tatweel) character |
| kinsoku | [*Kinsoku*](/ps_reference/modules/constants/#kinsoku) | R W | Kinsoku.NONE | - | 24.1 | Line breaking rules in Japanese text (Kinsoku Shori) |
| layoutMode | [*ParagraphLayout*](/ps_reference/modules/constants/#paragraphlayout) | R W | ParagraphLayout.WORLD | - | 24.1 | The paragraph layout mode. |
| hyphenationFeatures | [*HyphenationProperties*](/ps_reference/objects/options/hyphenationproperties/) | R W | - | - | 24.1 | The property values used to calculate hyphenation. |
| justification | [*Justification*](/ps_reference/modules/constants/#justification) | R W | [LEFT](Constants.Justification) | - | 24.1 | The paragraph justification. |
| justificationFeatures | [*JustificationProperties*](/ps_reference/objects/options/justificationproperties/) | R W | - | - | 24.1 | The property values used to calculate justification. |
| kashidaWidth | [*KashidaWidthType*](/ps_reference/modules/constants/#kashidawidthtype) | R W | [MEDIUM](Constants.KashidaWidthType) | - | 24.1 | The width of kashida (tatweel) character |
| kinsoku | [*Kinsoku*](/ps_reference/modules/constants/#kinsoku) | R W | [NONE](Constants.Kinsoku) | - | 24.1 | Line breaking rules in Japanese text (Kinsoku Shori) |
| layoutMode | [*ParagraphLayout*](/ps_reference/modules/constants/#paragraphlayout) | R W | [WORLD](Constants.ParagraphLayout) | - | 24.1 | The paragraph layout mode. |
| leftIndent | *number* | R W | - | -1296..1296 | 24.1 | The amount of space in pixels to indent text from the left for a 72ppi document. |
| mojikumi | [*Mojikumi*](/ps_reference/modules/constants/#mojikumi) | R W | Mojikumi.NONE | - | 24.1 | Spacing between punctuation, symbols, numbers, and other character classes in Japanese text. |
| mojikumi | [*Mojikumi*](/ps_reference/modules/constants/#mojikumi) | R W | [NONE](Constants.Mojikumi) | - | 24.1 | Spacing between punctuation, symbols, numbers, and other character classes in Japanese text. |
| rightIndent | *number* | R W | - | -1296..1296 | 24.1 | The amount of space in pixels to indent text from the right for a 72ppi document. |
| spaceAfter | *number* | R W | - | -1296..1296 | 24.1 | The amount of space in pixels to use after each paragraph for a 72ppi document. |
| spaceBefore | *number* | R W | - | -1296..1296 | 24.1 | The amount of space in pixels to use before each paragraph for a 72ppi document. |
Expand Down
Loading

0 comments on commit 9a3ecc4

Please sign in to comment.