Merge feat/scripts-api-d1a-app-documents into feat/scripts-api-d4b-text-styles

This commit is contained in:
dotCooCoo committed 2026-11-25 04:53:10 -08:00
commit 771383bed8
1307 files changed
+194081 -268410

No files matched your search

@@ -44,8 +44,10 @@ const OUTSIDE: &[(&str, &str, &str)] = &[
/// outside it. The document model (`app`, its classes and the enumerations) acts on the open
/// documents; `Document.saveAs` and `close` throw "not available yet".
const INSIDE: &[(&str, &str)] = &[
("", "$ File Folder alert confirm localize prompt toSource"),
("", "$ File Folder UnitValue alert confirm localize prompt toSource"),
("Object.prototype.", "toSource"),
("UnitValue.", "baseUnit baseUnit= length prototype"),
("UnitValue.prototype.", "as baseUnit baseUnit= constructor convert toString type type= value value="),
("localize.", "length"),
("toSource.", "length"),
(
@@ -58,7 +60,7 @@ const INSIDE: &[(&str, &str)] = &[
(
"File.prototype.",
"absoluteURI alias changePath close constructor created creator displayName encoding encoding= eof error error= \
exists fsName fullName getRelativeURI hidden length lineFeed lineFeed= modified name openDlg parent path read \
exists fsName fullName getRelativeURI hidden length lineFeed lineFeed= localizedName modified name openDlg parent path read \
readch readln readonly relativeURI resolve saveDlg seek tell toString type",
),
(
@@ -69,19 +71,19 @@ const INSIDE: &[(&str, &str)] = &[
(
"Folder.prototype.",
"absoluteURI alias changePath constructor created displayName error error= exists fsName fullName getFiles \
getRelativeURI modified name parent path relativeURI resolve selectDlg toString",
getRelativeURI localizedName modified name parent path relativeURI resolve selectDlg toString",
),
(
"",
"app Application CoordinateSystem Document DocumentArtboardLayout DocumentColorSpace DocumentPreset DocumentPresetType \
DocumentPreviewMode DocumentRasterResolution DocumentTransparencyGrid Documents ElementPlacement Layer PageItem \
PageItems RulerUnits ZOrderMethod",
"activeDocument activeDocument= app Application CoordinateSystem Document DocumentArtboardLayout DocumentColorSpace \
DocumentPreset DocumentPresetType DocumentPreviewMode DocumentRasterResolution DocumentTransparencyGrid documents \
Documents ElementPlacement Layer PageItem PageItems RulerUnits selection selection= ZOrderMethod",
),
("Application.", "prototype"),
(
"Application.prototype.",
"activeDocument activeDocument= beep beep= constructor coordinateSystem coordinateSystem= documents getIsFileOpen \
selection textFonts typename",
selection selection= textFonts toString typename",
),
("DocumentPreset.", "prototype"),
(
@@ -89,29 +91,29 @@ const INSIDE: &[(&str, &str)] = &[
"artboardLayout artboardLayout= artboardRowsOrCols artboardRowsOrCols= artboardSpacing artboardSpacing= colorMode \
colorMode= constructor documentBleedLink documentBleedLink= documentBleedOffsetRect documentBleedOffsetRect= height \
height= numArtboards numArtboards= previewMode previewMode= rasterResolution rasterResolution= title title= \
transparencyGrid transparencyGrid= typename units units= width width=",
toString transparencyGrid transparencyGrid= typename units units= width width=",
),
("Documents.", "prototype"),
("Documents.prototype.", "add addDocument constructor getByName index length parent typename"),
("Documents.prototype.", "add addDocument constructor getByName index length parent toString typename"),
("Document.", "prototype"),
(
"Document.prototype.",
"activeLayer activeLayer= artboards artboards= characterStyles close close= constructor convertCoordinate \
documentColorSpace groupItems groupItems= height layers layers= name pageItems paragraphStyles parent pathItems \
pathItems= rulerOrigin rulerOrigin= rulerUnits saveAs saveAs= selection selection= swatches swatches= symbols \
symbols= textFrames typename views views= width",
symbols= textFrames toString typename views views= width",
),
("Layer.", "prototype"),
("Layer.prototype.", "constructor name typename"),
("Layer.prototype.", "constructor name toString typename"),
("PageItems.", "prototype"),
("PageItems.prototype.", "constructor getByName index length parent removeAll typename"),
("PageItems.prototype.", "constructor getByName index length parent removeAll toString typename"),
("PageItem.", "prototype"),
(
"PageItem.prototype.",
"artworkKnockout artworkKnockout= blendingMode blendingMode= bringInPerspective bringInPerspective= constructor \
controlBounds duplicate editable geometricBounds height height= hidden hidden= isIsolated isIsolated= layer layer= \
left left= locked locked= move name name= note note= opacity opacity= parent pixelAligned pixelAligned= position \
position= remove resize resize= rotate rotate= selected selected= sliced sliced= tags tags= top top= transform \
position= remove resize resize= rotate rotate= selected selected= sliced sliced= tags tags= toString top top= transform \
transform= translate translate= typename uRL uRL= uuid uuid= visibilityVariable visibilityVariable= visibleBounds \
width width= wrapInside wrapInside= wrapOffset wrapOffset= wrapped wrapped= zOrder zOrderPosition",
),
@@ -234,6 +236,9 @@ const LIST: &str = r#"(function () {
var globals = Object.getOwnPropertyNames(g);
add(g, "");
for (var i = 0; i < globals.length; i++) {
// A global with a getter, such as `activeDocument`, is not read: it throws with no document open.
var gd = Object.getOwnPropertyDescriptor(g, globals[i]);
if (gd && gd.get) continue;
var v = g[globals[i]];
if (v !== null && (typeof v == "object" || typeof v == "function")) {
add(v, globals[i] + ".");