Commit Graph
10966 Commits
Author SHA1 Message Date
.CooCoo a3485952ce Merge pull request #10023 from dotCooCoo/fix/js-eval-new-target-super
Scripts: direct eval inside a method or derived constructor reads super
2026-11-28 19:38:45 -08:00
.CooCoo dc2c6ff30f Merge pull request #9061 from dotCooCoo/feat/scripts-api-d4b-text-styles
Scripts: character and paragraph styles for scripts
2026-11-28 18:26:11 -08:00
.CooCoo 06f7b28a43 Merge pull request #9903 from dotCooCoo/feat/distorted-image-place-replace
Place: Replace keeps a distorted image's corners for a raster file
2026-11-28 18:14:53 -08:00
dotCooCoo d75ba761d4 Merge main into feat/distorted-image-place-replace 2026-11-28 18:13:24 -08:00
dotCooCoo 44c89a7912 Merge main into feat/scripts-api-d4b-text-styles 2026-11-28 18:11:24 -08:00
.CooCoo 0ac2b74614 Merge pull request #9055 from dotCooCoo/feat/scripts-api-d9-do-script
Scripts: app.doScript plays an action of the Actions panel
2026-11-28 17:55:11 -08:00
dotCooCoo 2c18b10d17 Merge main into feat/distorted-image-place-replace 2026-11-28 17:41:51 -08:00
.CooCoo 1fe4d824c8 Merge pull request #9064 from dotCooCoo/feat/scripts-api-d4c-threads-stories
Scripts: nextFrame, previousFrame, story and document.stories for threaded type
2026-11-28 17:38:38 -08:00
dotCooCoo 8a269c4ce8 Scripts: direct eval inside a method or derived constructor reads super
In a .js script, `class B extends A { m() { return eval("super.x"); } }`
and `class B extends A { constructor() { eval("super()"); } }` threw a
SyntaxError: eval code was parsed with only `new.target` allowed, never
`super` (ECMA-262 2015 section 18.2.1.1).

Each compiled code now records what `super` and `new.target` may do in
eval code it runs: the rules of its function's body, the rules of the
code around an arrow function, or the rules the eval code itself was read
with. A direct eval parses its code with the caller's rules, so
`super.name` and `super[key]` work inside a method, accessor or class
constructor, and `super(...)` works inside a derived class's
constructor, also from an arrow function or a nested eval there. A plain
function inside a method, the top of a script, an indirect eval and a
`Function` body still give a SyntaxError. `super(...)` in eval code binds
`this` once; a second call is a ReferenceError.

Two tests in es2015_tests.rs cover the allowed and SyntaxError cases and
fail without the change; a third checks that a `Function` body reads its
own `new.target`. docs/mcp.md describes the rule. Follows #9094.
2026-11-28 17:34:04 -08:00
.CooCoo 67adc70369 Merge pull request #9775 from dotCooCoo/fix/brush-options-unchanged-approval-b-verify
Keep unchanged Brush Options out of document history
2026-11-28 17:28:50 -08:00
.CooCoo 75e639a024 Merge pull request #9915 from dotCooCoo/feat/arc-join-path-end
Three-Point Arc: join arcs to open path ends and snap to carry a path on
2026-11-28 17:28:46 -08:00
.CooCoo 398fdd672c Merge pull request #10017 from dotCooCoo/fix/js-collections-iterator
Scripts: Map, Set and typed array constructors read their argument through its iterator
2026-11-28 17:28:11 -08:00
.CooCoo 774891d6ff Merge pull request #8088 from jmverges/fix/6983-followup-page-widths-pick-font-copy
.ai import: type takes the installed copy that sets its PDF part's widths
2026-11-28 17:25:40 -08:00
.CooCoo 664571cbef Merge pull request #9852 from dotCooCoo/fix/script-collection-numeric-names
Scripts: collection reads look up names such as -1 and 1.5
2026-11-28 17:18:51 -08:00
dotCooCoo 1935494805 Merge main into fix/script-collection-numeric-names
# Conflicts:
#	crates/engine/src/tests/script_dom.rs
#	docs/target-app-parity.md
2026-11-28 17:18:25 -08:00
dotCooCoo 4999199bd5 Merge main into feat/scripts-api-d4c-threads-stories
# Conflicts:
#	crates/engine/src/script/dom.rs
#	crates/engine/src/script/dom/text.rs
#	crates/engine/src/tests.rs
#	crates/engine/src/tests/script_text.rs
#	crates/engine/tests/it/script_host_vs_scriptcheck.rs
#	docs/gaps.md
#	docs/mcp.md
#	docs/target-app-parity.md
2026-11-28 17:15:13 -08:00
.CooCoo 31a5e30057 Merge pull request #10013 from dotCooCoo/fix/move-handles-zero-offset-keeps-live
Direct Selection: a move by nothing leaves a live shape that needs no change live
2026-11-28 17:04:05 -08:00
dotCooCoo 1729de3109 Merge main into feat/scripts-api-d9-do-script 2026-11-28 16:57:36 -08:00
dotCooCoo fbb0f2d5ff Merge main into feat/scripts-api-d4b-text-styles 2026-11-28 16:57:12 -08:00
dotCooCoo e7bf7b789f Scripts: Map, Set and typed array constructors read their argument through its iterator
new Map, new Set, new WeakMap and new WeakSet read their argument by
index (an array, a string or an object with a length), so a generator,
a Map, a Set or any other iterable was a TypeError, and an array whose
@@iterator was replaced was still read by index. They now read it
through GetIterator and close the iterator when adding an entry throws
(ECMAScript 2015, sections 23.1.1.1, 23.2.1.1, 23.3.1.1 and 23.4.1.1).
A Map or WeakMap entry that is not an object is a TypeError.

The typed array constructors and %TypedArray%.from read a source with
an @@iterator method through its iterator to the end before mapping
it, and any other source as an array-like object (sections 22.2.1.4
and 22.2.2.1).

Map.prototype[@@iterator] is entries, Set.prototype[@@iterator] is
values, %TypedArray%.prototype[@@iterator] is values, and the Map, Set
and array iterators inherit %IteratorPrototype%, so for-of and spread
walk them.

Changed behavior: an array-like object without @@iterator passed to
new Set or new Map is now a TypeError, and Uint8Array.from([1, 1], f)
with an f that changes the array maps the values read before f ran.
2026-11-28 16:51:11 -08:00
.CooCoo d4b6d7f10d Merge pull request #9050 from dotCooCoo/feat/scripts-api-d4-text
Scripts: text frames, text ranges and fonts for scripts
2026-11-28 16:50:36 -08:00
dotCooCoo 7f96211081 Docs: state the zero-offset rule for path.moveHandles
The params text and docs/mcp.md now say that a move by 0, 0 changes only
the anchors it makes corners, so a live shape whose listed anchors need no
change stays live, and one with an anchor made a corner becomes a plain
path.
2026-11-28 16:36:19 -08:00
dotCooCoo 31844b57dd Merge feat/scripts-api-d4-text into feat/scripts-api-d4b-text-styles 2026-11-28 16:13:51 -08:00
dotCooCoo 055b0e786f Merge main into fix/brush-options-unchanged-approval-b-verify 2026-11-28 16:13:10 -08:00
.CooCoo e0649cf32f Merge pull request #8924 from dotCooCoo/feat/script-warning-reaches
Scripts: the Other Script… warning lists what the script reaches outside the document
2026-11-28 16:09:06 -08:00
.CooCoo dcc6cd8241 Merge pull request #9399 from dotCooCoo/fix/command-dialog-document-scope
Command dialogs: restrict edits to their target document
2026-11-28 16:08:15 -08:00
.CooCoo d077b7cbb1 Merge pull request #9283 from dotCooCoo/feat/scripts-page-item-blending-mode
Scripts: PageItem.blendingMode reads and sets an object's blending mode
2026-11-28 16:06:38 -08:00
.CooCoo 79a3805b1d Merge pull request #9957 from dotCooCoo/train/carry8496
3D: a ring of overlapping faces is broken at one of its own faces
2026-11-28 16:06:32 -08:00
.CooCoo 8c6e5d7e33 Merge pull request #9129 from dotCooCoo/feat/plugin-api-importer-output-kinds
Plug-ins: importers at API level 4 open type, embedded images, layers and artboards
2026-11-28 16:06:28 -08:00
.CooCoo 4bfa4bef66 Merge pull request #9997 from dotCooCoo/fix/js-eval-new-target
Scripts: direct eval inside a function reads its new.target
2026-11-28 16:06:25 -08:00
dotCooCoo 05d2b51998 Docs: scope the numeric collection name rule to pageItems and documents
Tags still returns undefined for a number that is not an array index and does
not look it up by name, so the progress line names only the two collections
that do, and describes the key as the text JavaScript writes for a number that
is not an array index. The script guide now says that assigning to such a name
is ignored outside strict mode and throws a TypeError in strict mode code or
with #strict on, instead of Not found.
2026-11-28 14:55:39 -08:00
dotCooCoo 548a8015aa Merge main into fix/command-dialog-document-scope 2026-11-28 14:50:18 -08:00
dotCooCoo 2f9621bc38 Scripts: direct eval inside a function reads its new.target
In a .js script, `function F() { return eval("new.target"); } new F()`
threw a SyntaxError: eval code was always parsed as if it were at the
top of a script, where `new.target` is not allowed (ECMA-262 2015
section 18.2.1.1).

A function that calls eval now keeps its new.target in the hidden
binding arrow functions already use, also when it was compiled as ES5.1.
A direct eval looks that binding up through the caller's scopes (one
unit of fuel per scope); when it finds one, the eval code may use
`new.target` and reads that value. At the top of a script, in an arrow
function there, and through an indirect eval it stays a SyntaxError.
`super` in eval code is still not supported.

A test in es2015_tests.rs covers plain, strict, arrow, nested-eval and
class-constructor callers and the three SyntaxError cases; it fails
without the change. Follows #9094.
2026-11-28 14:47:16 -08:00
dotCooCoo 64c985d328 Merge main into feat/scripts-api-d4c-threads-stories
# Conflicts:
#	crates/engine/src/script/dom.rs
#	crates/engine/tests/it/script_host_vs_scriptcheck.rs
#	docs/target-app-parity.md
2026-11-28 14:36:12 -08:00
dotCooCoo 3ce53dbb6c Merge main into fix/script-collection-numeric-names 2026-11-28 14:35:22 -08:00
dotCooCoo e2c4d0bbbe Merge main into feat/scripts-api-d9-do-script 2026-11-28 14:28:32 -08:00
dotCooCoo c75a01b463 Merge main into fix/brush-options-unchanged-approval-b-verify 2026-11-28 14:28:32 -08:00
dotCooCoo 16c63fdec9 Merge main into feat/distort-text-symbols 2026-11-28 14:28:32 -08:00
dotCooCoo 57cf0f348f Merge main into feat/script-warning-reaches
# Conflicts:
#	crates/ui-egui/src/tests/script_run.rs
2026-11-28 14:23:56 -08:00
dotCooCoo 2974180502 Merge main into feat/plugin-api-importer-output-kinds
# Conflicts:
#	crates/engine/src/cmd/plugin.rs
#	crates/plugins/src/lib.rs
#	crates/plugins/src/manifest.rs
#	crates/plugins/src/permissions.rs
#	docs/plugins.md
#	docs/target-app-parity.md
2026-11-28 14:21:28 -08:00
dotCooCoo 5728ff39cd Merge main into feat/scripts-page-item-blending-mode
# Conflicts:
#	crates/engine/src/tests/script_dom.rs
#	docs/mcp.md
#	docs/target-app-parity.md
2026-11-28 14:17:28 -08:00
dotCooCoo 79d78a95de Merge main into feat/scripts-api-d4-text
# Conflicts:
#	crates/engine/src/script/dom.rs
#	crates/engine/tests/it/script_host_vs_scriptcheck.rs
#	docs/target-app-parity.md
2026-11-28 14:16:28 -08:00
dotCooCoo 6f36d55234 Merge main into train/carry8496 2026-11-28 13:51:41 -08:00
.CooCoo 3e9b4f735c Merge pull request #9947 from dotCooCoo/fix/anchor-inspector-accepted
Anchor Inspector: canceling a field edit restores the anchor or the Points per segment count
2026-11-28 13:40:00 -08:00
.CooCoo 854e5a5d5d Merge pull request #9977 from dotCooCoo/fix/packaging-fold-angle
Packaging: canceling a Fold Angle edit restores the fold lines' angles
2026-11-28 13:39:33 -08:00
.CooCoo 0aacac4bf2 Merge pull request #9944 from dotCooCoo/train/carry9162
Anchor Point: Shift keeps handles pulled out of an anchor at 45° steps
2026-11-28 13:37:55 -08:00
.CooCoo 0a8c0ee145 Merge pull request #9954 from dotCooCoo/train/carry8285
Stroke: Notched Arrow arrowhead, carried from #8285 with main merged in
2026-11-28 13:37:14 -08:00
jmvergesandClaude Opus 5.5 cbfb26b9ab Merge main (89a5b64170) into the font width import branch
Main now reads the editing copy decoded as its streams are read
(#9922: ai_alone_decoded, ai_layers_alone_decoded, AiLayers::decoded)
and renamed the text document's patterns to paints (#9782:
text_patterns, Texts::with_paints). The decoded entry points take the
PDF part's widths as the ones they wrap did, AiLayers::decode goes
through AiLayers::decoded, and the text document still takes the widths
when it is first read, before its paints. The docs keep both sides'
entries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 20:50:55 +00:00
dotCooCoo 950e432a57 Packaging: canceling a Fold Angle edit restores the fold lines' angles
The Fold Lines panel's Fold Angle field ran addon.packaging.setFoldAngle
with each value as it was typed, so Escape left the typed angle on the
selected lines. The field's edits now run in one undo scope
(EditPath::Scope, as the Parametric Shape panel does): Enter keeps the
angle as one undo step, and Escape restores the lines and leaves no
undo step.
2026-11-28 11:41:07 -08:00
dotCooCoo 4817c15d0a Layers: the trash footer takes an appearance dragged from a target circle
A target circle dropped on the Layers panel's Delete Selection button
reduces its row's item to a basic appearance again. The button accepted
only dragged rows, so the appearance branch of the footer's drop handling
never ran and the drop did nothing. Delete Selection now also accepts an
appearance dragged from the same document and contents.

New panel tests cover the target circle's drop filter (another row's
appearance moves or, with Alt, copies; its own row's appearance, one from
another document, a paint and dragged art are refused) and the trash
footer's (an appearance from the same document is reduced to basic and the
row stays; one from another document, a paint and dragged art are refused,
and Create New Layer refuses an appearance).
2026-11-28 11:23:44 -08:00