Skip to content

Commit 2abe3f0

Browse files
committed
feat(linked -textframes): adds docs for textframes and linkedtexftframes functions
Also updates some other docs
1 parent becc835 commit 2abe3f0

File tree

12 files changed

+3101
-909
lines changed

12 files changed

+3101
-909
lines changed

_source/_data/categories.json

Lines changed: 300 additions & 42 deletions
Large diffs are not rendered by default.

_source/_data/cats-and-subcats.json

Lines changed: 297 additions & 39 deletions
Large diffs are not rendered by default.

_source/_data/function-list.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"blendMode":true,"color":true,"colorMode":true,"fill":true,"fillTint":true,"gradient":true,"gradientMode":true,"lerpColor":true,"noFill":true,"noStroke":true,"opacity":true,"stroke":true,"strokeTint":true,"swatch":true,"forEach":true,"binary":true,"hex":true,"unbinary":true,"unhex":true,"CSV":true,"HashList":true,"JSON":true,"endsWith":true,"join":true,"nf":true,"nfc":true,"nfp":true,"nfs":true,"split":true,"splitTokens":true,"startsWith":true,"trim":true,"trimWord":true,"isArray":true,"isInteger":true,"isNumber":true,"isString":true,"isText":true,"isURL":true,"clear":true,"close":true,"doc":true,"layer":true,"referencePoint":true,"remove":true,"revert":true,"units":true,"bleeds":true,"canvasMode":true,"guideX":true,"guideY":true,"margins":true,"pasteboard":true,"addPage":true,"applyMasterPage":true,"masterPage":true,"nextPage":true,"page":true,"pageCount":true,"pageNumber":true,"previousPage":true,"removePage":true,"applyObjectStyle":true,"arrange":true,"bounds":true,"duplicate":true,"graphics":true,"group":true,"items":true,"label":true,"labels":true,"nameOnPage":true,"objectStyle":true,"selection":true,"selections":true,"ungroup":true,"addToStory":true,"characters":true,"lines":true,"linkTextFrames":true,"paragraphs":true,"placeholder":true,"stories":true,"textStyleRanges":true,"words":true,"delay":true,"frameRate":true,"height":true,"width":true,"VERSION":true,"EPSILON":true,"HALF_PI":true,"KAPPA":true,"PI":true,"QUARTER_PI":true,"SINCOS_LENGTH":true,"TWO_PI":true,"LOREM":true,"inspect":true,"printInfo":true,"projectFolder":true,"property":true,"size":true,"stackArray":true,"image":true,"imageMode":true,"shellExecute":true,"download":true,"file":true,"files":true,"folder":true,"loadString":true,"loadStrings":true,"selectFile":true,"selectFiles":true,"selectFolder":true,"day":true,"hour":true,"millis":true,"millisecond":true,"minute":true,"month":true,"second":true,"timestamp":true,"weekday":true,"year":true,"abs":true,"ceil":true,"constrain":true,"dist":true,"exp":true,"floor":true,"lerp":true,"log":true,"mag":true,"map":true,"max":true,"min":true,"norm":true,"pow":true,"round":true,"sq":true,"sqrt":true,"noise":true,"noiseDetail":true,"noiseSeed":true,"random":true,"randomSeed":true,"acos":true,"asin":true,"atan":true,"atan2":true,"cos":true,"degrees":true,"radians":true,"sin":true,"tan":true,"Vector":true,"print":true,"println":true,"savePDF":true,"savePNG":true,"saveString":true,"saveStrings":true,"ellipseMode":true,"rectMode":true,"strokeWeight":true,"arc":true,"ellipse":true,"line":true,"point":true,"quad":true,"rect":true,"triangle":true,"addPath":true,"beginShape":true,"endShape":true,"vertex":true,"mode":true,"noLoop":true,"applyMatrix":true,"popMatrix":true,"printMatrix":true,"pushMatrix":true,"resetMatrix":true,"rotate":true,"scale":true,"transform":true,"translate":true,"text":true,"textAlign":true,"textFont":true,"textKerning":true,"textLeading":true,"textSize":true,"textTracking":true,"typo":true,"applyCharacterStyle":true,"applyParagraphStyle":true,"characterStyle":true,"paragraphStyle":true}
1+
{"blendMode":true,"color":true,"colorMode":true,"fill":true,"fillTint":true,"gradient":true,"gradientMode":true,"lerpColor":true,"noFill":true,"noStroke":true,"opacity":true,"stroke":true,"strokeTint":true,"swatch":true,"forEach":true,"binary":true,"hex":true,"unbinary":true,"unhex":true,"CSV":true,"HashList":true,"JSON":true,"contains":true,"endsWith":true,"join":true,"nf":true,"nfc":true,"nfp":true,"nfs":true,"split":true,"splitTokens":true,"startsWith":true,"trim":true,"trimWord":true,"isArray":true,"isInteger":true,"isNumber":true,"isString":true,"isText":true,"isURL":true,"clear":true,"close":true,"doc":true,"layer":true,"referencePoint":true,"remove":true,"revert":true,"units":true,"bleeds":true,"canvasMode":true,"guideX":true,"guideY":true,"margins":true,"pasteboard":true,"addPage":true,"applyMasterPage":true,"masterPage":true,"nextPage":true,"page":true,"pageCount":true,"pageNumber":true,"previousPage":true,"removePage":true,"applyObjectStyle":true,"arrange":true,"bounds":true,"duplicate":true,"graphics":true,"group":true,"items":true,"label":true,"labels":true,"linkedTextFrames":true,"nameOnPage":true,"objectStyle":true,"selection":true,"selections":true,"textFrames":true,"ungroup":true,"addToStory":true,"characters":true,"lines":true,"linkTextFrames":true,"paragraphs":true,"placeholder":true,"stories":true,"textStyleRanges":true,"words":true,"delay":true,"frameRate":true,"height":true,"width":true,"VERSION":true,"EPSILON":true,"HALF_PI":true,"KAPPA":true,"PI":true,"QUARTER_PI":true,"SINCOS_LENGTH":true,"TWO_PI":true,"LOREM":true,"inspect":true,"printInfo":true,"projectFolder":true,"property":true,"size":true,"stackArray":true,"image":true,"imageMode":true,"shellExecute":true,"download":true,"file":true,"files":true,"folder":true,"loadJSON":true,"loadString":true,"loadStrings":true,"selectFile":true,"selectFiles":true,"selectFolder":true,"day":true,"hour":true,"millis":true,"millisecond":true,"minute":true,"month":true,"second":true,"timestamp":true,"weekday":true,"year":true,"abs":true,"ceil":true,"constrain":true,"dist":true,"exp":true,"floor":true,"lerp":true,"log":true,"mag":true,"map":true,"max":true,"min":true,"norm":true,"pow":true,"round":true,"sq":true,"sqrt":true,"noise":true,"noiseDetail":true,"noiseSeed":true,"random":true,"randomSeed":true,"acos":true,"asin":true,"atan":true,"atan2":true,"cos":true,"degrees":true,"radians":true,"sin":true,"tan":true,"Vector":true,"print":true,"println":true,"saveJSON":true,"savePDF":true,"savePNG":true,"saveString":true,"saveStrings":true,"ellipseMode":true,"rectMode":true,"strokeWeight":true,"arc":true,"ellipse":true,"line":true,"point":true,"quad":true,"rect":true,"triangle":true,"addPath":true,"beginShape":true,"endShape":true,"vertex":true,"mode":true,"noLoop":true,"applyMatrix":true,"popMatrix":true,"printMatrix":true,"pushMatrix":true,"resetMatrix":true,"rotate":true,"scale":true,"transform":true,"translate":true,"text":true,"textAlign":true,"textFont":true,"textKerning":true,"textLeading":true,"textSize":true,"textTracking":true,"typo":true,"applyCharacterStyle":true,"applyParagraphStyle":true,"characterStyle":true,"paragraphStyle":true}

_source/download/changelog.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ basil.js x.x.x DAY MONTH YEAR
3737
+ Added property()
3838
sets a property of an object to a given value
3939
+ Added graphics() to loop over graphics in a given container
40+
+ Added textFrames() to loop over text frames in a given container
41+
+ Added linkedTextFrames() to loop over all linked text frames of a text frame chain
4042
+ Added textStyleRanges() to loop over text style ranges in a given container
4143
+ Added swatch()
4244
returns a color or gradient of a given name

_source/reference/data/endsWith.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
layout: entry
33
title: endsWith
4-
codetitle: 'endsWith(str, suffix)'
5-
description: 'Checks whether a string ends with a specific character or string.'
4+
codetitle: 'endsWith(searchContainer, valueToFind)'
5+
description: 'Checks whether a string ends with a specific character or string or if an array ends with a specific element.'
66
category: Data
77
subcategory: 'String Functions'
88
returns:
99
name: null
1010
description: 'Returns either true or false'
1111
type: [Boolean]
1212
parameters:
13-
- {name: str, description: 'A string to be checked', optional: false, type: [String]}
14-
- {name: suffix, description: 'The string to look for', optional: false, type: [String]}
13+
- {name: searchContainer, description: 'A string or array to be checked', optional: false, type: [String]}
14+
- {name: valueToFind, description: 'The value to search for', optional: false, type: [String]}
1515
kind: function
1616
todo: null
1717
examples: []

_source/reference/data/startsWith.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
layout: entry
33
title: startsWith
4-
codetitle: 'startsWith(str, prefix)'
5-
description: 'Checks whether a string starts with a specific character or string.'
4+
codetitle: 'startsWith(searchContainer, valueToFind)'
5+
description: 'Checks whether a string starts with a specific character or string or if an array starts with a specific value.'
66
category: Data
77
subcategory: 'String Functions'
88
returns:
99
name: null
1010
description: 'Returns either true or false'
1111
type: [Boolean]
1212
parameters:
13-
- {name: str, description: 'A string to be checked', optional: false, type: [String]}
14-
- {name: prefix, description: 'The string to look for', optional: false, type: [String]}
13+
- {name: searchContainer, description: 'A string or an array to be checked', optional: false, type: [String]}
14+
- {name: valueToFind, description: 'The value to search for', optional: false, type: [String]}
1515
kind: function
1616
todo: null
1717
examples: []
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
layout: entry
3+
title: linkedTextFrames
4+
codetitle: 'linkedTextFrames(item, [cb])'
5+
description: "Returns an array of all linked text frames or text paths in relation to a given Text Frame, Text Path, Story or Text Object.\nIf a callback function is given, `textFrames()` calls this callback function on each text frame of the given container. When the callback function returns false, the loop stops and the `textFrames()` function returns an array of all text frames up to this point."
6+
category: Document
7+
subcategory: 'Page Items'
8+
returns:
9+
name: null
10+
description: 'The array of linked text frames or text paths.'
11+
type: [Array]
12+
parameters:
13+
- {name: item, description: 'The text frame, text path, story or text object of the text frame chain.', optional: false, type: [TextFrame, TextPath, Story, TextObject]}
14+
- {name: cb, description: 'The callback function to call with each text frame or text path. When this function returns false the loop stops. Passed arguments: `textFrame`, `loopCount`.', optional: true, type: [Function]}
15+
kind: function
16+
todo: null
17+
examples: []
18+
19+
---
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
layout: entry
3+
title: textFrames
4+
codetitle: 'textFrames(container, [cb])'
5+
description: "Returns a collection of all text frames in the given container. The container object can be a Document, Page, Layer, Group, Story, Page Item or Text Object.\nIf a callback function is given, `textFrames()` calls this callback function on each text frame of the given container. When the callback function returns false, the loop stops and the `textFrames()` function returns an array of all text frames up to this point."
6+
category: Document
7+
subcategory: 'Page Items'
8+
returns:
9+
name: null
10+
description: 'An array of Text Frames.'
11+
type: [Array]
12+
parameters:
13+
- {name: container, description: 'The document, page, layer, group, story, page item or text object to iterate the text frames in.', optional: false, type: [Document, Page, Layer, Group, Story, PageItem, TextObject]}
14+
- {name: cb, description: 'The callback function to call with each text frame. When this function returns false the loop stops. Passed arguments: `textFrame`, `loopCount`.', optional: true, type: [Function]}
15+
kind: function
16+
todo: null
17+
examples: []
18+
19+
---

_source/reference/math/Vector.dist.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
---
22
layout: entry
33
title: Vector.dist
4-
codetitle: 'Vector.dist(v1, v2)'
5-
description: 'Static function. Calculates the Euclidean distance between two points (considering a point as a vector object). Is meant to be called "static" i.e. `Vector.dist(v1, v2);`'
4+
codetitle: 'Vector.dist(v, [y], [z])'
5+
description: 'Calculates the distance from this vector to another as `x`, `y`, and `z` components or full vector.'
66
category: Math
77
subcategory: Vector
88
returns:
99
name: null
1010
description: 'The distance.'
1111
type: [Number]
1212
parameters:
13-
- {name: v1, description: 'The first vector.', optional: false, type: [Vector]}
14-
- {name: v2, description: 'The second vector.', optional: false, type: [Vector]}
15-
kind: function
16-
todo: null
17-
examples: []
18-
19-
---
20-
}
13+
- {name: v, description: 'Either a full vector or an `x` component.', optional: false, type: [Vector, Number]}
14+
- {name: y, description: 'The `y` component.', optional: true, type: [Number]}
15+
- {name: z, description: 'The `z` component.', optional: true, type: [Number]}
2116
kind: function
2217
todo: null
2318
examples: []

_source/reference/math/Vector.dot.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
---
22
layout: entry
33
title: Vector.dot
4-
codetitle: 'Vector.dot(v1, v2)'
5-
description: 'Static function. Calculates the dot product of two vectors. Is meant to be called "static" i.e. `Vector.dot(v1, v2);`'
4+
codetitle: 'Vector.dot(v, [y], [z])'
5+
description: 'Calculates the dot product from this vector to another as `x`, `y`, and `z` components or full vector.'
66
category: Math
77
subcategory: Vector
88
returns:
99
name: null
1010
description: 'The dot product.'
1111
type: [Number]
1212
parameters:
13-
- {name: v1, description: 'The first vector.', optional: false, type: [Vector]}
14-
- {name: v2, description: 'The second vector.', optional: false, type: [Vector]}
15-
kind: function
16-
todo: null
17-
examples: []
18-
19-
---
20-
on: 'The `z` component.', optional: true, type: [Number]}
13+
- {name: v, description: 'Either a full vector or an `x` component.', optional: false, type: [Vector, Number]}
14+
- {name: y, description: 'The `y` component.', optional: true, type: [Number]}
15+
- {name: z, description: 'The `z` component.', optional: true, type: [Number]}
2116
kind: function
2217
todo: null
2318
examples: []

0 commit comments

Comments
 (0)