vectorcraft/crates/engine/src/cmd/fileio
bflatastic d62ecfe33a Fix #926: the Libraries panel's search, groups and library export/import
Search: a search field at the top of the Libraries panel filters the
current library's colours, character and paragraph styles and graphics
by name, ignoring case; groups without a match are hidden, groups with
one open, and a search nothing matches says so ("No results").

Groups: items can be put in user-named groups, kept in the library file
(`groups: [{name, items: [{kind, item}]}]`, left out when there are
none, so files written before groups load as they are). New commands:
library.createGroup {library?, name?, items?}, library.renameGroup
{library?, group, name}, library.deleteGroup {library?, group} (its
items stay, ungrouped) and library.moveItem {library?, kind, item,
group?}. An item is in one group at most; deleting an item takes it out
of its group. The panel shows each group as a collapsible section with
its item count after the ungrouped items (rename and delete on its
context menu), each item's context menu has Move to Group (No Group,
the groups, New Group...), and a New Group button sits in the footer.
library.get lists the groups, library.list counts them. The generic
command dialog takes fixed params in `__params` for this.

Export / import: library.export {library?, path?} writes a library
(colours, styles, graphics with art and thumbnails, groups) as a
.vclibrary file, the JSON the library folder keeps (without a path:
{data}); library.import {path | data | dataBase64, name?} adds one as a
new library, made current, numbered on a name clash ("Brand (2)").
The panel menu has Import Library... and Export Library..., through the
app's file dialogs (the web downloads, and picks through File > Open,
which now lists Libraries files). Imported and folder files are made
safe: at most 10,000 items of a kind and 1,000 groups, names clipped and
made unique, sizes finite, thumbnails kept only when their PNG header
says at most 1024 px a side, group entries naming missing items or
unknown kinds dropped; a file over 512 MB or that isn't a library is an
error. Paths go through the engine's file helpers (automation roots).
The importer is fuzzed (import_fuzz: garbage and mutated libraries).

Also fixed: the third graphic added to a library got the second's id
(`graphic-2` twice).

Docs: the commands' params docs, docs/mcp.md, ROADMAP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 17:17:01 +07:00
..
affinity.rs AF.4: validate and harden Affinity 3 artboards, text and images 2026-10-09 13:45:55 +00:00
batch.rs M14.4: a batch that opens a new document is journaled 2026-10-05 14:22:36 +07:00
dxf.rs Fix #546: DXF export writes each fill's outlines before its hatch 2026-10-09 14:49:42 +07:00
dxfimport.rs M4.93: DXF drawings open and place with layout, scale or fit, centring and merged layers 2026-10-05 15:24:21 +07:00
encode.rs Fix #526: the exports and the CLI write .ai as Save As does 2026-10-09 03:18:07 +07:00
eps.rs M4.87: PDF 1.3 compatibility: transparency flattened with the chosen preset 2026-10-05 18:05:36 +07:00
export.rs EPS import: bound what hostile editing data can cost, and say when it can't be read 2026-10-09 03:49:49 -04:00
imagemap.rs M4.90: Save for Web (Legacy) previews and saves optimised GIF, JPEG, PNG-8 and PNG-24 images, slices and HTML 2026-10-05 15:24:51 +07:00
load.rs Fix #918: PSD and PSB files open and place as their merged image 2026-10-10 16:09:41 +07:00
metafile.rs M4.95: EMF and WMF open, place and paste as vector objects 2026-10-05 15:24:27 +07:00
mod.rs Fix #926: the Libraries panel's search, groups and library export/import 2026-10-10 17:17:01 +07:00
native.rs Fix #745: a working Libraries panel of graphics, colours and text styles 2026-10-09 20:12:59 +07:00
pdf.rs Fix #733: PDF export keeps type as text in embedded subset fonts 2026-10-09 18:06:38 +07:00
pdfimport.rs Fix #735: Illustrator EPS and .ai files match their page in Fit to Artwork Bounds and the page check 2026-10-10 06:51:50 +07:00
pngtext.rs M4.55: File Info with author, description, keyword chips, rating and copyright, written to SVG, PDF and PNG 2026-10-05 09:55:47 +07:00
ppi.rs Fix #918: PSD and PSB files open and place as their merged image 2026-10-10 16:09:41 +07:00
psdread.rs Fix #918: PSD and PSB files open and place as their merged image 2026-10-10 16:09:41 +07:00
save.rs Read Illustrator EPS and .ai layers from their editing data 2026-10-09 03:49:49 -04:00
screens.rs Fix #526: the exports and the CLI write .ai as Save As does 2026-10-09 03:18:07 +07:00
svg.rs Part of ROADMAP gap 2: Radial Blur, Smart Blur and Unsharp Mask on a pixel-filter pipeline 2026-10-09 13:30:31 +07:00
tests.rs Fix #926: the Libraries panel's search, groups and library export/import 2026-10-10 17:17:01 +07:00
tests_affinity.rs AF.3: open .afphoto by content without listing it for Finder 2026-10-08 19:13:50 +00:00
tests_aiimport.rs Fix #735: Illustrator EPS and .ai files match their page in Fit to Artwork Bounds and the page check 2026-10-10 06:51:50 +07:00
tests_dxf.rs Fix #546: DXF export writes each fill's outlines before its hatch 2026-10-09 14:49:42 +07:00
tests_dxfimport.rs M4.93: DXF drawings open and place with layout, scale or fit, centring and merged layers 2026-10-05 15:24:21 +07:00
tests_eps.rs M4.91: EPS and PostScript files open and place 2026-10-05 16:51:54 +07:00
tests_epsimport.rs AI import: groups and nested groups survive 2026-10-08 17:06:57 +07:00
tests_exportas.rs M4.33: Export As with Use Artboards (All or a range) and art bounds 2026-10-05 09:14:42 +07:00
tests_jpeg.rs M4.48: JPEG Options — RGB/CMYK/gray, baseline/optimized/progressive, embedded ICC profiles and image maps 2026-10-05 11:25:09 +07:00
tests_metafile.rs M4.95: EMF and WMF open, place and paste as vector objects 2026-10-05 15:24:27 +07:00
tests_palette.rs M4.49: PNG-8 and GIF export with a palette quantizer and dithering 2026-10-05 11:26:15 +07:00
tests_pdf.rs M4.87: PDF 1.3 compatibility: transparency flattened with the chosen preset 2026-10-05 18:05:36 +07:00
tests_pdf13.rs M4.87: PDF 1.3 compatibility: transparency flattened with the chosen preset 2026-10-05 18:05:36 +07:00
tests_pdfcolor.rs M4.17: File menu details: converted files, 30 recent files, one colour-mode command, Show in Folder, saved view 2026-10-05 11:11:19 +07:00
tests_pdfedit.rs Fix #526: the exports and the CLI write .ai as Save As does 2026-10-09 03:18:07 +07:00
tests_pdffidelity.rs Fix #319: exports warn when type in a missing font is written in the fallback font 2026-10-08 06:04:29 +07:00
tests_pdfimport.rs M4.91: EPS and PostScript files open and place 2026-10-05 16:51:54 +07:00
tests_pdflayers.rs Part of #372: .ai files write layers and sublayers as PDF layers, hidden ones kept 2026-10-09 04:40:30 +07:00
tests_pdfoutput.rs M4.74: real text with embedded subset fonts in PDF 2026-10-05 16:25:21 +07:00
tests_pdfsecurity.rs M4.85: PDF security: encryption at every compatibility level, permissions, either password opens 2026-10-05 15:24:16 +07:00
tests_pdfwebview.rs M4.86: PDF page thumbnails and fast web view (linearised files) 2026-10-05 18:05:36 +07:00
tests_pdfx.rs M4.87: PDF 1.3 compatibility: transparency flattened with the chosen preset 2026-10-05 18:05:36 +07:00
tests_psd.rs Fix #918: PSD and PSB files open and place as their merged image 2026-10-10 16:09:41 +07:00
tests_psdread.rs Fix #918: PSD and PSB files open and place as their merged image 2026-10-10 16:09:41 +07:00
tests_raster.rs Open raster images at the size their resolution declares 2026-10-09 17:11:07 +13:00
tests_screens.rs M4.52: Export for Screens options: full document, bleed, sub-folders, sizes, presets, format settings 2026-10-05 13:18:10 +07:00
tests_svg.rs M4.14: Save As format chooser, Save writes back its own format, Save a Copy 2026-10-05 11:07:15 +07:00
tests_svgedit.rs M4.41: SVG import keeps symbols, patterns and blur/shadow filters live 2026-10-05 12:11:27 +07:00
tests_svgenc.rs Fix #550: an SVG of chosen artboards holds only their art 2026-10-09 01:38:38 +07:00
tests_svgimport.rs M4.42: SVG import reads linked images from the SVG's folder, intersects nested clips, keeps hidden objects and expands reflected gradients 2026-10-05 12:12:06 +07:00
tests_text.rs M4.50: WebP options, Export As Text and Save for Office Documents 2026-10-05 11:27:22 +07:00
tests_tiffbmp.rs M4.69: Targa export at 16, 24 or 32 bits per pixel 2026-10-05 15:24:51 +07:00
text.rs M4.50: WebP options, Export As Text and Save for Office Documents 2026-10-05 11:27:22 +07:00
zip.rs M4.51: Export for Screens downloads on the web, picks folders, zips 2026-10-05 13:18:10 +07:00