Commit Graph
1740 Commits
Author SHA1 Message Date
BFlat 959f3dc609 Merge pull request #6779 from dotCooCoo/fix/script-sleep-reads-doc-cancel
Scripts: a canceled request stops a run asleep in $.sleep at its next slice
2026-11-12 13:18:11 +07:00
BFlat af22fd6d5b Merge pull request #6776 from dotCooCoo/fix/eval-source-takes-fuel
JavaScript: source that eval and Function compile takes fuel before it is parsed
2026-11-12 13:17:47 +07:00
BFlat ee6aae1d1d Merge pull request #6769 from dotCooCoo/fix/options-dialog-menus
EPS: Save As options are menus with readable names, and Export As's Range shows an example
2026-11-12 13:17:11 +07:00
BFlat a8ac772c53 Merge pull request #6753 from dotCooCoo/feat/pixel-align-new-objects
Transform: Align New Objects to Pixel Grid makes new paths pixel-aligned
2026-11-12 12:41:07 +07:00
BFlat 7e27e6e4c9 Merge pull request #6761 from dotCooCoo/feat/dynamic-text-path-presets
Type: Dynamic Text Presets put type on a circle, arch or bow
2026-11-12 12:40:55 +07:00
BFlat 4eb0915795 Merge pull request #6781 from dotCooCoo/feat/diamond-gradient
Gradients: diamond gradients run the stops from the center out to a square
2026-11-12 12:40:46 +07:00
BFlat 247f9e1569 Merge pull request #6763 from dotCooCoo/feat/styles-textures-library
Graphic Styles: built-in Textures library with grain, canvas, craquelure and tile styles
2026-11-12 12:40:38 +07:00
BFlat 1f1e7354ea Merge pull request #6780 from dotCooCoo/fix/action-batch-param-types
Actions: Batch refuses options of the wrong type before it writes
2026-11-12 12:39:54 +07:00
BFlat fee2b1340a Merge pull request #6773 from dotCooCoo/perf/flatten-opaque-chain
Flatten Transparency: opaque art that touches only opaque art stays vector
2026-11-12 12:39:46 +07:00
BFlat 72adc36f55 Merge pull request #6767 from dotCooCoo/feat/document-setup-color
Document Setup: a Color tab sets the color mode and the assigned profiles
2026-11-12 12:39:38 +07:00
dotCooCoo 2f7c3854c7 Merge main into fix/script-sleep-reads-doc-cancel
# Conflicts:
#	docs/target-app-parity.md
2026-11-11 21:01:53 -08:00
dotCooCoo 651041fc0c Merge main into fix/options-dialog-menus
# Conflicts:
#	docs/mcp.md
2026-11-11 20:48:58 -08:00
BFlat dec6717379 Merge pull request #6726 from dotCooCoo/feat/hpgl-import
File formats: HP-GL (.plt) plot files open and place
2026-11-12 11:42:46 +07:00
BFlat b945662f75 Merge pull request #6700 from dotCooCoo/fix/script-files-followups
Scripts: File and Folder exists checks the kind, encode keeps slashes, every call is counted
2026-11-12 11:42:26 +07:00
BFlat 3baa943174 Merge pull request #6693 from dotCooCoo/fix/pdfa-14-long-pages
PDF: a PDF/A-2b file at PDF 1.4 writes long pages as PDF 1.6 with a UserUnit
2026-11-12 11:42:17 +07:00
BFlat cd92345707 Merge pull request #6759 from dotCooCoo/fix/js-tosource-property-flags
Scripts: toSource refuses read-only, non-configurable and non-extensible data it cannot write back
2026-11-12 11:42:09 +07:00
BFlat d843a4f1ec Merge pull request #6670 from dotCooCoo/fix/plugin-put-back-result
Plug-ins: an update left in the store by a failed put-back turns a disabled plug-in on
2026-11-12 11:42:01 +07:00
BFlat 5e181e2aec Merge pull request #6699 from dotCooCoo/fix/links-read-roots
MCP: links.list, links.check, links.info and document.open leave out paths outside the read roots
2026-11-12 11:41:52 +07:00
BFlat 95325e8ef0 Merge pull request #6694 from dotCooCoo/feat/char-style-options-tcy-offsets
Type: Character Style Options sets Tate-chu-yoko Up/Down and Left/Right
2026-11-12 11:41:41 +07:00
BFlat d349c4b586 Merge pull request #6775 from dotCooCoo/feat/image-remove-background
Image Tools: Remove Background clears an image's background in its pixels
2026-11-12 11:41:32 +07:00
dotCooCoo 66d21471ae Gradients: diamond gradients run the stops from the center out to a square
A new gradient kind, `diamond`, runs its stops from the center (the
start) out to a square with a corner at the end of the vector; the
aspect stretches the square across the vector into a rhombus. The
Gradient panel's Type row has a Diamond button, the Gradient tool draws
the square with the aspect handle and center ring, and a gradient
fitted to an object covers its box.

- Model and canvas: the level is |x| + |y| in the square's frame; a
  square with no area (no vector, an aspect of 0, numbers out of range)
  paints the last stop. The canvas draws it as pixels, out to a
  stroke's miters, caps and arrowheads. Transforms keep the vector and
  take the mapped size across it as the aspect.
- Commands: `paint.setFill`, `paint.editGradient` and
  `paint.setGradientGeom` take `kind: "diamond"`; a negative aspect or
  a focal point is an error. A conic or diamond gradient that a plug-in
  returns with a focal point loses the focal point.
- Gradient tool: dragging the aspect handle of a radial or diamond
  gradient whose file gave it a negative aspect now sets a positive
  aspect; only a conic's negative aspect mirrors it.
- Export: PDF, SVG, EPS and legacy .ai write four linear gradients, one
  for each quarter of the square, clipped to the shape (PDF as axial
  shadings). PDF and SVG write an image for translucent stops, a
  dithered fill or a flat square, and for the Perceptual method unless
  PDF writes the stops as spot color shadings. SVG writes a diamond on
  type characters as a radial gradient through the corners, and so
  does CSS. A swatch library saved as CSS gets four corner layers, a
  value for the `background` property (a circle when the swatch is
  turned by an angle that is not a multiple of 90 degrees). The .ai
  editing data holds a radial gradient through the corners. The
  document exports give a warning.
- SVG export: a stroke drawn as an image, as conic wedges or as diamond
  quarters now covers the miters, caps and arrowheads that reach past
  its paint box.
- PDF import reads a function-based shading whose color is the same
  along each square about the origin of its space as a diamond.
- Object > Expand gives nested squares or a mesh of rings.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-11 20:27:48 -08:00
dotCooCoo 69c3da175c Actions: Batch refuses options of the wrong type before it writes
action.batch read its true/false options with a fallback, so
{"stopOnError": "false"} kept stopping on the first error, and a
number for a string option such as label or datasetFileNaming was
dropped or turned into an empty string. The source check also ran
after the destination folder was made.

includeSubdirs, overrideOpen, overrideSave, overrideExport and
stopOnError now take only true or false, and source, folder,
destination, destinationFolder, datasetFileNaming and label take only
a string. Any other value is an error naming the key, given before the
destination folder is made or a file is opened. A null reads as a key
left out. The params text and docs/mcp.md say so.
2026-11-11 20:11:50 -08:00
dotCooCoo 8bd437687a Scripts: a canceled request stops a sleeping or waiting run at its next slice
script_pump read vectorcraft_doc::cancel only after the guard that keeps
a run waiting, so a run asleep in $.sleep went on waiting until its wake
time (up to 1,000 ms), and a run waiting at a dialog or for approval to
grow waited until someone answered. The check now runs before that
guard, after the dialog-failure check, so a canceled request ends the
run at the next slice and every document goes back.
2026-11-11 20:01:25 -08:00
dotCooCoo a9e7dfb2f8 Merge main into fix/options-dialog-menus 2026-11-11 19:59:50 -08:00
dotCooCoo f3b089f83f Merge main into feat/styles-textures-library 2026-11-11 19:59:30 -08:00
dotCooCoo d151f3f5d0 JavaScript: source that eval and Function compile takes fuel before it is parsed
Direct and indirect eval, Function and host evaluators parsed and compiled
their source before taking any fuel or checking the heap, so a script with a
small fuel limit could make the interpreter parse megabytes of source in a
handful of instructions. Interp::prepare_source now takes one unit of fuel for
each UTF-16 code unit and checks that the source text fits in the heap before
the source is flattened, parsed or compiled. A host evaluator's string takes
the fuel for a third of its bytes before it is encoded, and the rest after.

Limits::fuel and the maxFuel row in docs/mcp.md say so.
2026-11-11 19:52:06 -08:00
dotCooCoo f65f3029a6 Image Tools: Remove Background clears an image's background in its pixels
A new built-in add-on, Image Tools (Object › Plug-ins › Image Tools),
adds Remove Background… (`addon.image.removeBackground`). It makes the
background of the selected images transparent by lowering the alpha of
their own pixels, in one undo step, with no service or model. The
background is the most common color along the image's edges, the
average of the image's corners, or colors the user picks. Contiguous
(on by default) clears it only where it reaches in from an edge; off,
it is cleared wherever it is. Tolerance and Softness (0 to 100, 10 by
default) set how near a color must be to be cleared and the band over
which pixels fade out. Match measures that nearness as the RGB
distance or as the largest difference on one channel. It is a
VectorCraft addition.

- The image stays an image: an embedded PNG with alpha, the source's
  ICC profile and resolution, and 16 bits or gray when the source is.
  A linked image is embedded and keeps its Placement Options.
- When the edges hold at least as many clear pixels as pixels of their
  most common color, edge mode clears nothing, so a second run leaves
  the subject alone. Corner mode leaves clear corners out of the
  average and clears nothing when all four are clear.
- With Match set to Each Channel, a tolerance of t / 255 × 100 clears
  the colors within t 8-bit steps on every channel.
- A CMYK image, a linked image that shows its preview, an image that
  would need more than the decode allowance (checked from its header)
  and a result with no pixel left are refused, and the document stays
  as it was. When no pixel changes, no undo step is added. The result
  reports `cleared`, the pixels made fully clear.
- Picked colors are hex colors, with or without `#`, or black, white,
  red, green or blue.
- The dialog opens with Preview off; with Preview on, the canvas shows
  the result, and Cancel puts the image back. While the dialog
  previews, the session keeps the images' decoded pixels (at most
  128 MiB, 32 MiB in the web app) so each preview step does not decode
  them again, and releases them when the dialog closes with OK or
  Cancel. A run that is not a preview step keeps nothing.

Docs: docs/mcp.md (Image Tools add-on), docs/target-app-parity.md.
2026-11-11 19:47:28 -08:00
dotCooCoo bfabe4f980 Merge main into perf/flatten-opaque-chain 2026-11-11 19:18:07 -08:00
dotCooCoo f95c4b51c9 Flatten Transparency: opaque art that touches only opaque art stays vector
Grouping for flattening joined every pair of objects whose 1 pt reach
boxes touched, transitively, so a row or grid of opaque objects next to
one see-through object became one group and was flattened with it.

Now a group holds each see-through object and every object its reach
touches. An object without transparency joins only where its reach
touches a member and it lies above that member but below the group's
topmost object, whose place the group takes, so the stacking order
stays the same. In files without transparency with Clip Complex Regions
on, art under a group within one image pixel of a member joins it too,
with the pixel size taken from the image's actual resolution. Objects in
an overlap set that includes one inside a clip group or clipping layer
keep the previous grouping.

The 1 pt antialiasing margin now goes around a group's art once instead
of once per nested group (a stroked path's plain art is a group, so it
had 2 pt).

On 3,000 stroked rectangles, 60 with a drop shadow, the Flattener Preview
counts 180 affected objects where it counted 3,000, and Flatten
Transparency with the Medium preset makes 240 flat regions and 2 images
where it made one image of the whole grid.
2026-11-11 19:17:06 -08:00
dotCooCoo 7559607037 Document Setup: a Color tab sets the color mode and the assigned profiles
Document Setup gets a Color tab with the document color mode (RGB Color
or CMYK Color), a Convert to CMYK or Convert to RGB box for a mode
change (cleared, the colors keep their numbers), and the RGB and CMYK
profiles assigned to the document, with a working-space entry for none.

When the tab changes something, OK runs document.setup, then
edit.assignProfile, then file.documentColorMode in one command.batch,
and the document's changes are one undo step. Assign Profile runs first,
so a mode change converts through the profile picked with it. An
unchanged Color tab adds no color commands, and Cancel, or OK with
nothing changed, records no undo step. A Color tab field with a value of
the wrong kind is an error, and the dialog stays open with nothing
changed. File › Document Color Mode and Edit › Assign Profile… stay
where they are.

Catalogs: "Working RGB (don't tag)" and "Assign Profile" rows in every
complete catalog, and the "`{key}` must be a profile name or null"
message in every complete-message catalog. Docs: docs/mcp.md,
docs/control-protocol.md, docs/target-app-parity.md.
2026-11-11 19:08:06 -08:00
dotCooCoo 7e071feb4d Merge main into feat/pixel-align-new-objects 2026-11-11 18:57:23 -08:00
dotCooCoo 2649f20c8e Merge main into feat/styles-textures-library 2026-11-11 18:55:43 -08:00
BFlat 765bd30783 Merge pull request #6744 from dotCooCoo/feat/color-show-recent-colors
Color: the panel menu's Show Recent Colors shows or hides the Recent Colors row
2026-11-12 09:55:35 +07:00
dotCooCoo be4fd1c23e Merge main into fix/plugin-put-back-result 2026-11-11 18:55:34 -08:00
dotCooCoo 269a75c45c Merge main into feat/eps-save-use-artboards 2026-11-11 18:49:02 -08:00
dotCooCoo 19ed0889b1 Merge main into fix/script-files-followups
# Conflicts:
#	crates/engine/src/script/files.rs
2026-11-11 18:48:18 -08:00
dotCooCoo c02f2a5d75 Merge main into fix/links-read-roots 2026-11-11 18:46:20 -08:00
BFlat eb35bd6b3b Merge pull request #6754 from dotCooCoo/feat/3d-shadows
3D and Materials: shadows behind or below the object, with Distance and Bounds
2026-11-12 09:45:11 +07:00
dotCooCoo 09c35cce38 Merge main into feat/char-style-options-tcy-offsets 2026-11-11 18:45:03 -08:00
dotCooCoo b403fe230f Merge main into fix/pdfa-14-long-pages 2026-11-11 18:43:27 -08:00
BFlat aeffe1d004 Merge pull request #6731 from dotCooCoo/feat/actions-insert-menu-item
Actions: Insert Menu Item adds a menu command to an action
2026-11-12 09:40:12 +07:00
dotCooCoo 982cf2ef5a Merge main into feat/hpgl-import 2026-11-11 18:38:00 -08:00
dotCooCoo 4bc50fa21f Type: Dynamic Text Presets put type on a circle, arch or bow
Type › Dynamic Text Presets › Circle, Arch and Bow
(`type.dynamicTextPreset {preset, position?, flip?, ids?}`) put the
selected point type and type on a path on a new path of that shape and
turn Dynamic Text on, so the text is sized to fill it.

- Circle is a circle as wide as the text, the text running clockwise
  from its bottom; Arch and Bow are a 120° arc whose chord is as wide as
  the text, bulging up or down. The shape is upright on the page when
  the object is rotated or scaled.
- `position` above, center or below sets Align to Path to Descender,
  Center or Ascender; `flip` turns the text to the other side of its
  path. Effect and Spacing stay.
- Area type is left as it is, threaded type on a path is refused, and a
  preset that changes nothing records no undo step.

Docs: docs/mcp.md, docs/target-app-parity.md.
Part of #4134.
2026-11-11 18:36:09 -08:00
dotCooCoo 98ad53e799 Merge main into fix/js-tosource-property-flags 2026-11-11 18:34:29 -08:00
dotCooCoo d28b72a358 Scripts: toSource refuses read-only, non-configurable and non-extensible data it cannot write back
A literal makes an extensible object whose properties are writable and
configurable, and an array whose length is writable. toSource wrote a
property defined with writable or configurable false, a sealed, frozen or
non-extensible object or array, and an array with a read-only length as an
ordinary literal, so evaluating the text gave an open value.

toSource now throws a TypeError for each of these, at any depth, as it
already does for getters, hidden properties and other prototypes.
Properties defined with every flag on are written as before.
2026-11-11 18:33:42 -08:00
dotCooCoo 4795701122 Merge main into feat/styles-textures-library 2026-11-11 18:27:09 -08:00
dotCooCoo 2d29087ac2 Graphic Styles: built-in Textures library with grain, canvas, craquelure and tile styles
Window › Graphic Style Libraries › Textures, after Hand-Drawn, holds eight
styles that paint their fills and strokes with the texture effects: Fine
Grain (Grain), Canvas Weave and Burlap Sack (Texturizer), Cracked Glaze
(Craquelure), Mosaic Floor (Mosaic Tiles), Quilted Squares (Patchwork),
Leaded Glass (Stained Glass) and Damp Paper (Water Paper). The styles,
their names and their settings are VectorCraft's own.

Each catalog has rows for the library and style names. Docs: docs/mcp.md,
docs/gaps.md, docs/target-app-parity.md.
2026-11-11 18:25:50 -08:00
BFlat 6c68e13732 Merge pull request #6655 from dotCooCoo/fix/plugin-approval-ok-delay
Plug-ins: the approval dialog takes OK only once its question was shown for half a second
2026-11-12 09:23:52 +07:00
BFlat 8719585cc6 Merge pull request #6663 from dotCooCoo/feat/script-target-engine
Scripts: #targetengine runs a script in a named engine that keeps its globals
2026-11-12 09:22:45 +07:00
BFlat 36fa7c561a Merge pull request #6749 from dotCooCoo/fix/edit-guide-params-reject-wrong-types
Commands: Edit, guide and slice params of the wrong type are refused
2026-11-12 09:22:02 +07:00