Files
vectorcraft/crates/engine
dotCooCoo f6bbab4b6e Swatch libraries: swatches a pattern brings skip the library's numbered names
Add to Swatches now passes the clipboard importer the library's numbered
swatch names that a picked pattern's swatches and patterns can come in
under. A swatch or pattern that the import brings under a numbered name
skips those names. This replaces the placeholder and copy swatches that
held the names around the import. Paste and Use Library Item pass none
and number swatches as before.

- A tint or gradient of a numbered library name that the art brings,
  such as a tint "Ink 2" of "Ink", keeps that name. Before, in a
  document with another "Ink", the art's "Ink" came in as "Ink 2", the
  tint as "Ink 2 2", and adding the library's "Ink 2" next added it
  again.
- A swatch of a numbered library name that the document does not use
  comes in under that name instead of as the document's identical copy
  ("Ink 2 2"). A copy of it that the import already brought is not
  reused for another library color of the same paint.
- Of two library swatches with one numbered name, the first one in the
  library keeps the name when the other is a swatch the art brings or a
  pattern swatch.
- A pattern that the art is painted with, and its swatch, skip the
  library's names when they come in numbered. A pattern of a numbered
  name whose library swatch places it otherwise keeps its name, and the
  swatch that comes with it gets another, so adding the library swatch
  next finds its name free.
- A pattern swatch's numbered name skips the library's names, as a
  color's does, and a pattern swatch takes the library swatch's name
  when it is free, also when its pattern is reused.
- A pattern pasted into the document is still found: when skipping the
  names would add the pattern again, or would reuse it only by merging
  colors, an import that does not skip them is used if it reuses the
  pasted pattern and gives none of those names to another swatch.
- The paint and kind check on the colors a pattern's art brings or
  takes has a test: a library whose spot "Ink" shares its name with a
  global "Ink" in a color group, so that the art brings both.

docs/mcp.md is rewrapped and says that a library color is numbered
beside a document color of the same name and paint of another kind
(process, global or spot), not only beside a process color. The params
text of swatch.library.add, docs/mcp.md and the docs/target-app-parity.md
line describe these rules and name their tests.
2026-11-22 10:11:05 -08:00
..