From 7585026453356e2564dca8a063d7d6655efc4638 Mon Sep 17 00:00:00 2001 From: ruchirguitar Date: Thu, 3 Dec 2026 00:15:34 +0530 Subject: [PATCH 01/62] i18n: Gujarati status and error messages Adds 4,924 @msg and @msgplural rows to gu.tsv, so every message the untranslated report scans has a Gujarati row, and puts gu in COMPLETE_MESSAGES. Machine-assisted draft from the English meaning; native review pending. --- ROADMAP.md | 4 +- crates/ui-egui/src/i18n/gu.tsv | 4926 ++++++++++++++++++++++++++++++ crates/ui-egui/src/i18n/tests.rs | 2 +- docs/development.md | 2 +- docs/localization-parity.md | 5 +- docs/roadmap.md | 7 +- docs/target-app-parity.md | 5 +- 7 files changed, 4940 insertions(+), 11 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index 84e40bc444..958501b43d 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -18,7 +18,7 @@ gate: all six core workflows (path drawing and editing, paint and style, type, l production, file exchange) work end to end on macOS with save and reopen, and only the last is partial, without blocking it ([Alpha gate](docs/roadmap.md#alpha-gate)). -> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status/error messages remain partial, and the pinned CI/release fonts and web startup list contain no Gujarati face; web selection stays unavailable until a Gujarati interface face is bundled. Scores and estimates unchanged. +> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (10,732 catalog rows, 2026-12-02), a machine-assisted draft from the English meaning, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts and web startup list contain no Gujarati face; web selection stays unavailable until a Gujarati interface face is bundled. Scores and estimates unchanged. ## Headline numbers @@ -98,7 +98,7 @@ Weights, evidence and the missing items per area: [target-app-parity.md](docs/ta | Simplified Chinese | `zh-hans` | partial (messages translated, #2578) | 85% | | Spanish | `es` | full | 100% | | Hindi | `hi` | catalog complete; machine-assisted draft, native review pending | complete under the scanner | -| Gujarati | `gu` | 4,673 contributor-reviewed catalog rows; 11 corrections applied to the 387 additions | menus and dialogs; status/error messages partial | +| Gujarati | `gu` | 4,673 contributor-reviewed catalog rows; 11 corrections applied to the 387 additions | menus, dialogs, status and error messages (messages machine-assisted, review pending) | | Arabic | `ar` | none (no right-to-left interface) | 0% | | French | `fr` | full | 100% | | Portuguese (Brazil) | `pt-br` | full | 100% | diff --git a/crates/ui-egui/src/i18n/gu.tsv b/crates/ui-egui/src/i18n/gu.tsv index 497ef4d6d8..6505776922 100644 --- a/crates/ui-egui/src/i18n/gu.tsv +++ b/crates/ui-egui/src/i18n/gu.tsv @@ -5825,3 +5825,4929 @@ swatch [Registration] [રજિસ્ટ્રેશન] Pulse Stroke ધબકતો ઘસારો Round Flow ગોળ પ્રવાહ Chisel Flow ત્રાંસો પ્રવાહ + +# Status and error messages (@msg, @msgplural): machine-assisted draft from the English meaning, added 2026-12-02; native review pending. +@msg "{0}" is not a colour: write it as #rrggbb "{0}" રંગ નથી: તેને #rrggbb તરીકે લખો +@msg $.appEncoding: give an encoding's name, as a string $.appEncoding: એન્કોડિંગનું નામ સ્ટ્રિંગ તરીકે આપો +@msg $.appEncoding: scripts here read and write UTF-8 only $.appEncoding: અહીં સ્ક્રિપ્ટ્સ ફક્ત UTF-8 વાંચે અને લખે છે +@msg $.bp: scripts here have no debugger $.bp: અહીં સ્ક્રિપ્ટ્સ માટે કોઈ ડિબગર નથી +@msg $.colorPicker: scripts cannot show a dialog yet $.colorPicker: સ્ક્રિપ્ટ્સ હજી ડાયલૉગ બતાવી શકતી નથી +@msg $.evalFile requires a file path $.evalFile ને ફાઇલ પાથ જોઈએ +@msg $.evalFile: takes a file path and a timeout $.evalFile: ફાઇલ પાથ અને ટાઇમઆઉટ લે છે +@msg $.evalFile: the timeout must be a finite number of milliseconds, 0 or more $.evalFile: ટાઇમઆઉટ 0 કે તેથી વધુ મિલિસેકન્ડની સીમિત સંખ્યા હોવી જોઈએ +@msg $.flags: give a number $.flags: એક સંખ્યા આપો +@msg $.flags: only 512, which turns localization on, or 0 can be set $.flags: ફક્ત 512, જે લોકલાઇઝેશન ચાલુ કરે છે, અથવા 0 સેટ કરી શકાય છે +@msg $.locale: give a locale such as "en" or "de_DE", or null for the interface's $.locale: "en" કે "de_DE" જેવું લોકેલ આપો, અથવા ઇન્ટરફેસના લોકેલ માટે null આપો +@msg $.localize: give true or false $.localize: true કે false આપો +@msg $.memCache: the memory cache size cannot be set $.memCache: મેમરી કૅશનું કદ સેટ કરી શકાતું નથી +@msg $.setenv: a value has at most {MAX_ENV_BYTES} letters, digits and _ . - @ $.setenv: કિંમતમાં વધુમાં વધુ {MAX_ENV_BYTES} અક્ષરો, અંકો અને _ . - @ હોય છે +@msg $.setenv: give a value, as a string $.setenv: કિંમત સ્ટ્રિંગ તરીકે આપો +@msg $.setenv: only {_1} can be set $.setenv: ફક્ત {_1} સેટ કરી શકાય છે +@msg $.sleep: a run cannot wait inside a callback of a built-in function, a getter, a conversion or a file $.evalFile runs; call it from the script's own code $.sleep: બિલ્ટ-ઇન ફંક્શનના callback, getter, રૂપાંતર કે $.evalFile ચલાવે તે ફાઇલની અંદર રન રાહ જોઈ શકતું નથી; તેને સ્ક્રિપ્ટના પોતાના કોડમાંથી કૉલ કરો +@msg $.sleep: give a number of milliseconds $.sleep: મિલિસેકન્ડની સંખ્યા આપો +@msg $.sleep: give a number of milliseconds from 0 to {MAX_SLEEP_MS} $.sleep: 0 થી {MAX_SLEEP_MS} સુધીની મિલિસેકન્ડની સંખ્યા આપો +@msg $.{name}: give a name, as a string $.{name}: નામ સ્ટ્રિંગ તરીકે આપો +@msg 'caller', 'callee' and 'arguments' cannot be used on strict mode functions 'caller', 'callee' અને 'arguments' નો strict mode ફંક્શન્સ પર ઉપયોગ કરી શકાતો નથી +@msg 'super' is allowed only in constructors 'super' ફક્ત કન્સ્ટ્રક્ટરમાં માન્ય છે +@msg 'super' is allowed only in methods 'super' ફક્ત મેથડ્સમાં માન્ય છે +@msg 'this' is used before super() is called super() કૉલ થાય તે પહેલાં 'this' નો ઉપયોગ થયો છે +@msg '{shown}' is not a symbol in this document '{shown}' આ દસ્તાવેજમાં સિમ્બોલ નથી +@msg 3D effects are not allowed in returned effects પરત કરેલી ઇફેક્ટ્સમાં 3D ઇફેક્ટ્સની મંજૂરી નથી +@msg 3D effects require finite coordinates within 100 million points 3D ઇફેક્ટ્સ માટે 100 મિલિયન પૉઇન્ટની અંદરના સીમિત કોઓર્ડિનેટ્સ જોઈએ +@msg 3D effects require one to ten lights 3D ઇફેક્ટ્સ માટે એકથી દસ લાઇટ્સ જોઈએ +@msg <{_1}> isn't an element of an SVG filter <{_1}> SVG ફિલ્ટરનું એલિમેન્ટ નથી +@msg A 3D effect on a group or layer goes on the group itself, not on its fill or stroke ગ્રૂપ કે લેયર પરની 3D ઇફેક્ટ તેના ફિલ કે સ્ટ્રોક પર નહીં, ગ્રૂપ પર જ લાગે છે +@msg A dimension's arrowhead is a built-in stroke arrowhead પરિમાણનો એરોહેડ બિલ્ટ-ઇન સ્ટ્રોક એરોહેડ હોય છે +@msg A graphic draws at most {MAX_PIECES} fills and strokes: simplify the symbol's art ગ્રાફિક વધુમાં વધુ {MAX_PIECES} ફિલ અને સ્ટ્રોક દોરે છે: સિમ્બોલનું આર્ટ સરળ બનાવો +@msg A graphic's art holds too many objects: simplify the symbol's art ગ્રાફિકના આર્ટમાં ઘણા બધા ઑબ્જેક્ટ્સ છે: સિમ્બોલનું આર્ટ સરળ બનાવો +@msg A graphic's art may be nested at most {MAX_LEVELS} levels deep: simplify the symbol's art ગ્રાફિકનું આર્ટ વધુમાં વધુ {MAX_LEVELS} સ્તર ઊંડે સુધી નેસ્ટ થઈ શકે છે: સિમ્બોલનું આર્ટ સરળ બનાવો +@msg A graphic's art may nest symbols at most {MAX_NESTING} levels deep: simplify the symbol's art ગ્રાફિકનું આર્ટ વધુમાં વધુ {MAX_NESTING} સ્તર ઊંડે સુધી સિમ્બોલ નેસ્ટ કરી શકે છે: સિમ્બોલનું આર્ટ સરળ બનાવો +@msg A plane has one face: map its graphics onto the front પ્લેનને એક જ સપાટી હોય છે: તેના ગ્રાફિક્સ આગળની સપાટી પર મેપ કરો +@msg A preset with this name already exists. આ નામનો પ્રીસેટ પહેલેથી અસ્તિત્વમાં છે. +@msg A print job from an earlier script still waits for approval અગાઉની સ્ક્રિપ્ટનું પ્રિન્ટ જોબ હજી મંજૂરીની રાહ જુએ છે +@msg A profile supports one Revolve effect. Edit the existing effect's options instead. પ્રોફાઇલ એક જ રિવોલ્વ ઇફેક્ટને સપોર્ટ કરે છે. તેના બદલે હાલની ઇફેક્ટના વિકલ્પો સંપાદિત કરો. +@msg A tag is added to a page item's tags, not to the document's ટૅગ પેજ આઇટમના ટૅગ્સમાં ઉમેરાય છે, દસ્તાવેજના ટૅગ્સમાં નહીં +@msg Add Points at Crossings: a path went missing છેદ પર બિંદુઓ ઉમેરો: એક પાથ ગુમ થઈ ગયો +@msg Align to Key Object isn't available with the Artboard tool આર્ટબોર્ડ ટૂલ સાથે કી ઑબ્જેક્ટ પર સંરેખિત કરો ઉપલબ્ધ નથી +@msg An object takes one 3D effect. Edit the existing effect's options, or remove it first. ઑબ્જેક્ટ પર એક જ 3D ઇફેક્ટ લાગે છે. હાલની ઇફેક્ટના વિકલ્પો સંપાદિત કરો, અથવા પહેલાં તેને દૂર કરો. +@msg Angles require two straight segments કોણ માટે બે સીધા સેગમેન્ટ જોઈએ +@msg Application.printerList is not available here Application.printerList અહીં ઉપલબ્ધ નથી +@msg Application.printerList needs an open document Application.printerList ને ખુલ્લો દસ્તાવેજ જોઈએ +@msg ArrayBuffer must be called with new ArrayBuffer ને new સાથે કૉલ કરવું જોઈએ +@msg ArrayBuffer.prototype.{name} was called on a value that is not an ArrayBuffer ArrayBuffer.prototype.{name} ને એવી કિંમત પર કૉલ કરાયું જે ArrayBuffer નથી +@msg Automatic Plane Positioning is off: turn on anchorPoint or gridlineIntersection (perspective.widget.options) સ્વચાલિત પ્લેન પોઝિશનિંગ બંધ છે: anchorPoint અથવા gridlineIntersection ચાલુ કરો (perspective.widget.options) +@msg BMP depth {_1}: 1, 4, 8, 16, 24 or 32 bits per pixel BMP ઊંડાઈ {_1}: પિક્સેલ દીઠ 1, 4, 8, 16, 24 અથવા 32 બિટ્સ +@msg BMP encoding failed: {width} × {height} pixels doesn't fit the format or the pixel buffer BMP એન્કોડિંગ નિષ્ફળ: {width} × {height} પિક્સેલ ફોર્મેટ કે પિક્સેલ બફરમાં બંધબેસતું નથી +@msg BMP files are RGB or grayscale: colorModel rgb or gray BMP ફાઇલો RGB અથવા ગ્રેસ્કેલ હોય છે: colorModel rgb અથવા gray +@msg Batch cannot play an action with a View menu step બૅચ વ્યૂ મેનૂના પગલાવાળી ક્રિયા ચલાવી શકતું નથી +@msg Batch cannot play an action with a stop બૅચ સ્ટોપવાળી ક્રિયા ચલાવી શકતું નથી +@msg Batch: {count} processed બૅચ: {count} પ્રોસેસ થયા +@msg Batch: {count} processed, {failed} failed બૅચ: {count} પ્રોસેસ થયા, {failed} નિષ્ફળ +@msg Blend Options is no longer open બ્લેન્ડ વિકલ્પો હવે ખુલ્લું નથી +@msg Blend colors: select at least three objects with filled colours રંગો બ્લેન્ડ કરો: ભરેલા રંગોવાળા ઓછામાં ઓછા ત્રણ ઑબ્જેક્ટ્સ પસંદ કરો +@msg Boolean.prototype.{name} was called on a value that is not a Boolean Boolean.prototype.{name} ને એવી કિંમત પર કૉલ કરાયું જે Boolean નથી +@msg CDR {version} drawings can't be opened: VectorCraft reads versions 1 to 27 CDR {version} ડ્રૉઇંગ ખોલી શકાતાં નથી: VectorCraft વર્ઝન 1 થી 27 વાંચે છે +@msg CMYK JPEG XL images can't be read CMYK JPEG XL છબીઓ વાંચી શકાતી નથી +@msg CMYK images whose samples couldn't be read in CMYK were imported in RGB જે CMYK છબીઓના સેમ્પલ CMYK માં વાંચી શકાયા નહીં તે RGB માં આયાત કરાઈ +@msg CSS options: {e} CSS વિકલ્પો: {e} +@msg CSV has a header but no data rows CSV માં હેડર છે પણ ડેટા પંક્તિઓ નથી +@msg CSV holds NUL bytes: save it as UTF-8, or as UTF-16 with a byte-order mark CSV માં NUL બાઇટ્સ છે: તેને UTF-8 તરીકે, અથવા બાઇટ-ઑર્ડર માર્ક સાથે UTF-16 તરીકે સાચવો +@msg CSV is empty CSV ખાલી છે +@msg CSV is larger than {MAX_CSV_BYTES} bytes CSV {MAX_CSV_BYTES} બાઇટ્સ કરતાં મોટી છે +@msg CSV is not UTF-16 CSV UTF-16 નથી +@msg CSV is not UTF-8 CSV UTF-8 નથી +@msg CSV would be larger than {MAX_CSV_BYTES} bytes CSV {MAX_CSV_BYTES} બાઇટ્સ કરતાં મોટી થઈ જશે +@msg Cannot change guides on PathItem {_1}: guides are locked PathItem {_1} પર ગાઇડ્સ બદલી શકાતી નથી: ગાઇડ્સ લૉક છે +@msg Cannot duplicate {name} {_1} {name} {_1} ની નકલ કરી શકાતી નથી +@msg Cannot edit PathItem {_1}: it is on a locked artboard PathItem {_1} સંપાદિત કરી શકાતું નથી: તે લૉક કરેલા આર્ટબોર્ડ પર છે +@msg Cannot edit PathItem {_1}: it, or a layer or group it is in, is hidden or locked PathItem {_1} સંપાદિત કરી શકાતું નથી: તે, અથવા તે જે લેયર કે ગ્રૂપમાં છે, છુપાયેલું કે લૉક છે +@msg Cannot edit {name} {_1}: {why} {name} {_1} સંપાદિત કરી શકાતું નથી: {why} +@msg Cannot make PathItem {_1} a guide: it is a clipping path PathItem {_1} ને ગાઇડ બનાવી શકાતું નથી: તે ક્લિપિંગ પાથ છે +@msg Cannot move {name} {_1} {name} {_1} ખસેડી શકાતું નથી +@msg Cannot select PathItem {_1} PathItem {_1} પસંદ કરી શકાતું નથી +@msg Cannot select PathItem {_1}: guides are locked PathItem {_1} પસંદ કરી શકાતું નથી: ગાઇડ્સ લૉક છે +@msg Cannot select {name} {_1} {name} {_1} પસંદ કરી શકાતું નથી +@msg Cannot set {what}: new art's pattern `{pattern}` has a placement of its own, which is not available yet {what} સેટ કરી શકાતું નથી: નવા આર્ટની પેટર્ન `{pattern}` નું પોતાનું પ્લેસમેન્ટ છે, જે હજી ઉપલબ્ધ નથી +@msg Cannot set {what}: new art's pattern `{pattern}` is not in this document {what} સેટ કરી શકાતું નથી: નવા આર્ટની પેટર્ન `{pattern}` આ દસ્તાવેજમાં નથી +@msg Cannot write to the location of “{name}”; choose where to save it “{name}” ના સ્થાન પર લખી શકાતું નથી; તેને ક્યાં સાચવવું તે પસંદ કરો +@msg Changing guides on a path inside a compound path is not available yet કમ્પાઉન્ડ પાથની અંદરના પાથ પર ગાઇડ્સ બદલવાનું હજી ઉપલબ્ધ નથી +@msg Choose a .js, .mjs or .jsx script .js, .mjs અથવા .jsx સ્ક્રિપ્ટ પસંદ કરો +@msg Choose a circle or a perfect arc વર્તુળ અથવા સંપૂર્ણ ચાપ પસંદ કરો +@msg Choose a precision from 0 to 6 0 થી 6 સુધીની ચોકસાઈ પસંદ કરો +@msg Choose original artwork, not a dimension's generated paths મૂળ આર્ટવર્ક પસંદ કરો, પરિમાણના જનરેટ થયેલા પાથ નહીં +@msg Choose two different points બે અલગ બિંદુઓ પસંદ કરો +@msg Choose two non-parallel straight segments બે બિન-સમાંતર સીધા સેગમેન્ટ પસંદ કરો +@msg Choose two nonzero angle arms શૂન્ય લંબાઈ ન હોય તેવી કોણની બે ભુજાઓ પસંદ કરો +@msg Click in type with a Type tool to split it ટાઇપને વિભાજિત કરવા ટાઇપ ટૂલ વડે તેમાં ક્લિક કરો +@msg Combine Slices: the slices have no bounds સ્લાઇસ જોડો: સ્લાઇસની કોઈ સીમા નથી +@msg Contour: select paths or shapes કન્ટૂર: પાથ અથવા આકારો પસંદ કરો +@msg Contour: the Offset Path effect is not available કન્ટૂર: ઓફસેટ પાથ ઇફેક્ટ ઉપલબ્ધ નથી +@msg Convert to Artboards: selection has no area આર્ટબોર્ડમાં રૂપાંતર કરો: પસંદગીનું કોઈ ક્ષેત્રફળ નથી +@msg Convert to Shape: no rectangles or ellipses selected આકારમાં રૂપાંતર કરો: કોઈ લંબચોરસ કે લંબવર્તુળ પસંદ કરેલ નથી +@msg Copied the color as {text} રંગ {text} તરીકે કૉપી કર્યો +@msg Copied the link info લિંકની માહિતી કૉપી કરી +@msg Copied the script report સ્ક્રિપ્ટ રિપોર્ટ કૉપી કર્યો +@msg Copied the troubleshooting info સમસ્યા નિવારણની માહિતી કૉપી કરી +@msg Copied the value કિંમત કૉપી કરી +@msg Corners edits the corners of a path ખૂણાઓ પાથના ખૂણાઓ સંપાદિત કરે છે +@msg Couldn't copy to the system clipboard: {e} સિસ્ટમ ક્લિપબોર્ડ પર કૉપી કરી શકાયું નહીં: {e} +@msg Couldn't open {name}: {e} {name} ખોલી શકાયું નહીં: {e} +@msg Couldn't paste from the clipboard: {e} ક્લિપબોર્ડમાંથી ચોંટાડી શકાયું નહીં: {e} +@msg Couldn't paste: the document it was pasted in was closed ચોંટાડી શકાયું નહીં: જે દસ્તાવેજમાં તે ચોંટાડ્યું હતું તે બંધ થઈ ગયો +@msg Couldn't paste: the document it was pasted in was reverted ચોંટાડી શકાયું નહીં: જે દસ્તાવેજમાં તે ચોંટાડ્યું હતું તે સાચવેલા સંસ્કરણ પર પાછો લવાયો +@msg Couldn't place {name}: the document it was dropped on was closed {name} મૂકી શકાયું નહીં: જે દસ્તાવેજ પર તે ડ્રૉપ કર્યું હતું તે બંધ થઈ ગયો +@msg Couldn't place {name}: the document it was dropped on was reverted {name} મૂકી શકાયું નહીં: જે દસ્તાવેજ પર તે ડ્રૉપ કર્યું હતું તે સાચવેલા સંસ્કરણ પર પાછો લવાયો +@msg Couldn't place {name}: the document it was placed in was closed {name} મૂકી શકાયું નહીં: જે દસ્તાવેજમાં તે મૂક્યું હતું તે બંધ થઈ ગયો +@msg Couldn't place {name}: the document it was placed in was reverted {name} મૂકી શકાયું નહીં: જે દસ્તાવેજમાં તે મૂક્યું હતું તે સાચવેલા સંસ્કરણ પર પાછો લવાયો +@msg Couldn't place {name}: {e} {name} મૂકી શકાયું નહીં: {e} +@msg Couldn't save recovery data for {title}: {e}. Copies go to {folder}, the default recovery folder; to use another folder, set Preferences → File Handling → Data Recovery → Folder (recoveryFolder) {title} માટે પુનઃપ્રાપ્તિ ડેટા સાચવી શકાયો નહીં: {e}. નકલો {folder} માં જાય છે, જે ડિફૉલ્ટ પુનઃપ્રાપ્તિ ફોલ્ડર છે; બીજું ફોલ્ડર વાપરવા, પસંદગીઓ → ફાઇલ હેન્ડલિંગ → ડેટા પુનઃપ્રાપ્તિ → ફોલ્ડર (recoveryFolder) સેટ કરો +@msg Couldn't save recovery data for {title}: {e}. Copies go to {folder}, the folder set in Preferences; to use another folder, set Preferences → File Handling → Data Recovery → Folder (recoveryFolder) {title} માટે પુનઃપ્રાપ્તિ ડેટા સાચવી શકાયો નહીં: {e}. નકલો {folder} માં જાય છે, જે પસંદગીઓમાં સેટ કરેલું ફોલ્ડર છે; બીજું ફોલ્ડર વાપરવા, પસંદગીઓ → ફાઇલ હેન્ડલિંગ → ડેટા પુનઃપ્રાપ્તિ → ફોલ્ડર (recoveryFolder) સેટ કરો +@msg Couldn't save recovery data: {e} પુનઃપ્રાપ્તિ ડેટા સાચવી શકાયો નહીં: {e} +@msg Couldn't save recovery data: {e}. Copies go to {folder}, the default recovery folder; to use another folder, set Preferences → File Handling → Data Recovery → Folder (recoveryFolder) પુનઃપ્રાપ્તિ ડેટા સાચવી શકાયો નહીં: {e}. નકલો {folder} માં જાય છે, જે ડિફૉલ્ટ પુનઃપ્રાપ્તિ ફોલ્ડર છે; બીજું ફોલ્ડર વાપરવા, પસંદગીઓ → ફાઇલ હેન્ડલિંગ → ડેટા પુનઃપ્રાપ્તિ → ફોલ્ડર (recoveryFolder) સેટ કરો +@msg Couldn't save recovery data: {e}. Copies go to {folder}, the folder set in Preferences; to use another folder, set Preferences → File Handling → Data Recovery → Folder (recoveryFolder) પુનઃપ્રાપ્તિ ડેટા સાચવી શકાયો નહીં: {e}. નકલો {folder} માં જાય છે, જે પસંદગીઓમાં સેટ કરેલું ફોલ્ડર છે; બીજું ફોલ્ડર વાપરવા, પસંદગીઓ → ફાઇલ હેન્ડલિંગ → ડેટા પુનઃપ્રાપ્તિ → ફોલ્ડર (recoveryFolder) સેટ કરો +@msg Couldn't save the disabled plug-ins for the next launch અક્ષમ કરેલા પ્લગ-ઇન્સ આગલા લૉન્ચ માટે સાચવી શકાયા નહીં +@msg Create Outlines: select text objects આઉટલાઇન બનાવો: ટેક્સ્ટ ઑબ્જેક્ટ્સ પસંદ કરો +@msg Create from Guides: the document has no artboard ગાઇડ્સમાંથી બનાવો: દસ્તાવેજમાં કોઈ આર્ટબોર્ડ નથી +@msg Create from Guides: the guides make more than {MAX_PIECES} slices ગાઇડ્સમાંથી બનાવો: ગાઇડ્સ {MAX_PIECES} કરતાં વધુ સ્લાઇસ બનાવે છે +@msg Create from Selection: the selection has no area પસંદગીમાંથી બનાવો: પસંદગીનું કોઈ ક્ષેત્રફળ નથી +@msg Create needs fills, strokes or both બનાવવા માટે ફિલ, સ્ટ્રોક અથવા બંને જોઈએ +@msg Cross-document placement is not available દસ્તાવેજો વચ્ચે પ્લેસમેન્ટ ઉપલબ્ધ નથી +@msg Current Color needs a solid color in the active proxy વર્તમાન રંગ માટે સક્રિય પ્રોક્સીમાં સોલિડ રંગ જોઈએ +@msg DCS files can only be placed linked: use File › Place with Link on DCS ફાઇલો ફક્ત લિંક કરીને મૂકી શકાય છે: ફાઇલ › મૂકો માં લિંક ચાલુ રાખીને વાપરો +@msg DXF options: {e} DXF વિકલ્પો: {e} +@msg DXF scale must be a positive number up to {_1}, not {scale} DXF સ્કેલ {_1} સુધીની ધન સંખ્યા હોવી જોઈએ, {scale} નહીં +@msg DXF {field} `{s}`: {allowed} DXF {field} `{s}`: {allowed} +@msg Data Recovery can't keep copies in {path}: {e} ડેટા પુનઃપ્રાપ્તિ {path} માં નકલો રાખી શકતી નથી: {e} +@msg Data Recovery has nowhere to keep copies: set Preferences → File Handling → Data Recovery → Folder (recoveryFolder) ડેટા પુનઃપ્રાપ્તિ પાસે નકલો રાખવાની કોઈ જગ્યા નથી: પસંદગીઓ → ફાઇલ હેન્ડલિંગ → ડેટા પુનઃપ્રાપ્તિ → ફોલ્ડર (recoveryFolder) સેટ કરો +@msg DataView must be called with new DataView ને new સાથે કૉલ કરવું જોઈએ +@msg DataView.prototype.{name} was called on a value that is not a DataView DataView.prototype.{name} ને એવી કિંમત પર કૉલ કરાયું જે DataView નથી +@msg Date.prototype method called on a value that is not a Date object Date.prototype મેથડને એવી કિંમત પર કૉલ કરાઈ જે Date ઑબ્જેક્ટ નથી +@msg Date.prototype[Symbol.toPrimitive] was called on a value that is not an object Date.prototype[Symbol.toPrimitive] ને એવી કિંમત પર કૉલ કરાયું જે ઑબ્જેક્ટ નથી +@msg Date.prototype[Symbol.toPrimitive] was given a hint that is not "string", "number" or "default" Date.prototype[Symbol.toPrimitive] ને એવો hint અપાયો જે "string", "number" કે "default" નથી +@msg Dialog unavailable ડાયલૉગ ઉપલબ્ધ નથી +@msg Dimension is locked or hidden પરિમાણ લૉક અથવા છુપાયેલું છે +@msg Dimension mode does not match its source પરિમાણનો મોડ તેના સ્રોત સાથે મેળ ખાતો નથી +@msg Dimension point is outside the canvas પરિમાણનું બિંદુ કેનવાસની બહાર છે +@msg Dimension size is outside its supported range પરિમાણનું કદ તેની સમર્થિત શ્રેણીની બહાર છે +@msg Divide Objects Below: select a path નીચેના ઑબ્જેક્ટ્સ વિભાજિત કરો: એક પાથ પસંદ કરો +@msg Divide Objects Below: select exactly one path નીચેના ઑબ્જેક્ટ્સ વિભાજિત કરો: બરાબર એક પાથ પસંદ કરો +@msg DocumentPreset.{key} must be {kind} DocumentPreset.{key} {kind} હોવું જોઈએ +@msg DocumentPreset.{k} is not available yet DocumentPreset.{k} હજી ઉપલબ્ધ નથી +@msg DocumentPreviewMode.PixelPreview is not available yet DocumentPreviewMode.PixelPreview હજી ઉપલબ્ધ નથી +@msg Downloaded {what} {what} ડાઉનલોડ કર્યું +@msg Draw Inside needs exactly one selected path, compound path or text અંદર દોરો માટે બરાબર એક પસંદ કરેલ પાથ, કમ્પાઉન્ડ પાથ અથવા ટેક્સ્ટ જોઈએ +@msg Duplicating a path inside a compound path is not available yet કમ્પાઉન્ડ પાથની અંદરના પાથની નકલ કરવાનું હજી ઉપલબ્ધ નથી +@msg EPS Options is no longer open EPS વિકલ્પો હવે ખુલ્લું નથી +@msg EPS Save writes all artwork: use document.export for selected-only EPS EPS સાચવવાથી બધું આર્ટવર્ક લખાય છે: ફક્ત પસંદ કરેલા આર્ટવર્કના EPS માટે document.export વાપરો +@msg EPS flattener: {e} EPS ફ્લેટનર: {e} +@msg EPS options: {e} EPS વિકલ્પો: {e} +@msg EPS {field} `{s}`: {allowed} EPS {field} `{s}`: {allowed} +@msg Edit Original opens image and document files only; “{name}” is not one મૂળ સંપાદિત કરો ફક્ત છબી અને દસ્તાવેજ ફાઇલો ખોલે છે; “{name}” તેમાંથી નથી +@msg Error.prototype.toString was called on a value that is not an object Error.prototype.toString ને એવી કિંમત પર કૉલ કરાયું જે ઑબ્જેક્ટ નથી +@msg Expand Appearance: a plug-in effect in the selection can't be expanded in Safe Mode દેખાવ વિસ્તૃત કરો: પસંદગીમાંની પ્લગ-ઇન ઇફેક્ટ સેફ મોડમાં વિસ્તૃત કરી શકાતી નથી +@msg Expand Appearance: the selection has a basic appearance દેખાવ વિસ્તૃત કરો: પસંદગીનો દેખાવ મૂળભૂત છે +@msg Expand: no brush strokes selected વિસ્તૃત કરો: કોઈ બ્રશ સ્ટ્રોક પસંદ કરેલ નથી +@msg Expand: no gradient fills વિસ્તૃત કરો: કોઈ ગ્રેડિયન્ટ ફિલ નથી +@msg Expand: nothing to expand વિસ્તૃત કરો: વિસ્તૃત કરવા માટે કંઈ નથી +@msg Export cancelled એક્સપોર્ટ રદ કર્યું +@msg Export for Screens writes png, png8, jpg, webp, gif, tiff, bmp, tga, psd, svg, svgz, pdf, eps, ai or vectorcraft સ્ક્રીન માટે એક્સપોર્ટ કરો png, png8, jpg, webp, gif, tiff, bmp, tga, psd, svg, svgz, pdf, eps, ai અથવા vectorcraft લખે છે +@msg ExportType.{other} is not available yet ExportType.{other} હજી ઉપલબ્ધ નથી +@msg File.length: the length must be a finite number, 0 or more File.length: લંબાઈ 0 કે તેથી વધુની સીમિત સંખ્યા હોવી જોઈએ +@msg File.seek: takes a position and a mode File.seek: સ્થાન અને મોડ લે છે +@msg File.seek: the mode must be 0, 1 or 2 File.seek: મોડ 0, 1 અથવા 2 હોવો જોઈએ +@msg File.seek: the position must be a finite number File.seek: સ્થાન સીમિત સંખ્યા હોવી જોઈએ +@msg File: the host gave no path File: હોસ્ટે કોઈ પાથ આપ્યો નહીં +@msg Fill Area: no enclosed area under the pointer વિસ્તાર ભરો: પોઇન્ટર નીચે કોઈ બંધ વિસ્તાર નથી +@msg First measured segment no longer exists પહેલો માપેલો સેગમેન્ટ હવે અસ્તિત્વમાં નથી +@msg Flatten Transparency: select objects to flatten ટ્રાન્સપરન્સી ફ્લેટન કરો: ફ્લેટન કરવા ઑબ્જેક્ટ્સ પસંદ કરો +@msg Flatten Transparency: {e} ટ્રાન્સપરન્સી ફ્લેટન કરો: {e} +@msg Function.prototype.toString was called on a value that is not a function Function.prototype.toString ને એવી કિંમત પર કૉલ કરાયું જે ફંક્શન નથી +@msg GIF encoding failed: the palette image is malformed GIF એન્કોડિંગ નિષ્ફળ: પૅલેટ છબી ખામીયુક્ત છે +@msg GIF encoding failed: {e} GIF એન્કોડિંગ નિષ્ફળ: {e} +@msg Global Edit is off ગ્લોબલ એડિટ બંધ છે +@msg Global Edit works on paths, compound paths, symbol instances and groups of them ગ્લોબલ એડિટ પાથ, કમ્પાઉન્ડ પાથ, સિમ્બોલ ઇન્સ્ટન્સ અને તેમના ગ્રૂપ પર કામ કરે છે +@msg Graphic Style Options needs one selected style ગ્રાફિક સ્ટાઇલ વિકલ્પો માટે એક પસંદ કરેલી સ્ટાઇલ જોઈએ +@msg Graphics map onto the Plane, Extrude, Revolve and Inflate object types ગ્રાફિક્સ પ્લેન, એક્સ્ટ્રુડ, રિવોલ્વ અને ફુલાવો ઑબ્જેક્ટ પ્રકારો પર મેપ થાય છે +@msg HEIC and HEIF images can't be opened in this build HEIC અને HEIF છબીઓ આ બિલ્ડમાં ખોલી શકાતી નથી +@msg HTML Text applies to object slices of type only HTML ટેક્સ્ટ ફક્ત ટાઇપના ઑબ્જેક્ટ સ્લાઇસ પર લાગુ થાય છે +@msg History Options… is not available ઇતિહાસ વિકલ્પો… ઉપલબ્ધ નથી +@msg Identify Objects By is XML ID: the name must be a valid XML ID (start with a letter, underscore or colon; no spaces) ઑબ્જેક્ટ્સ આ રીતે ઓળખો XML ID છે: નામ માન્ય XML ID હોવું જોઈએ (અક્ષર, અન્ડરસ્કોર કે કોલનથી શરૂ થાય; કોઈ સ્પેસ નહીં) +@msg Image Trace failed: internal error: its thread stopped (please report this bug) ઇમેજ ટ્રેસ નિષ્ફળ: આંતરિક ભૂલ: તેનો થ્રેડ અટકી ગયો (કૃપા કરીને આ બગની જાણ કરો) +@msg Image Trace failed: {e} ઇમેજ ટ્રેસ નિષ્ફળ: {e} +@msg Image Trace finished, but its document was closed ઇમેજ ટ્રેસ પૂર્ણ થયું, પણ તેનો દસ્તાવેજ બંધ થઈ ગયો હતો +@msg Image Trace finished, but its document was reverted: trace it again ઇમેજ ટ્રેસ પૂર્ણ થયું, પણ તેનો દસ્તાવેજ સાચવેલા સંસ્કરણ પર પાછો લવાયો હતો: તેને ફરી ટ્રેસ કરો +@msg Image Trace finished, but the image or its settings changed meanwhile: trace it again ઇમેજ ટ્રેસ પૂર્ણ થયું, પણ તે દરમિયાન છબી અથવા તેના સેટિંગ્સ બદલાયા: તેને ફરી ટ્રેસ કરો +@msg Image Trace: the traced image is missing ઇમેજ ટ્રેસ: ટ્રેસ કરેલી છબી ગુમ છે +@msg Import SVG Filter reads SVG files, not SVGZ SVG ફિલ્ટર આયાત કરો SVG ફાઇલો વાંચે છે, SVGZ નહીં +@msg Import reads a data source file ending in .csv, .tsv, .txt or .xml આયાત .csv, .tsv, .txt અથવા .xml થી સમાપ્ત થતી ડેટા સ્રોત ફાઇલ વાંચે છે +@msg Imported library {name} લાઇબ્રેરી {name} આયાત કરી +@msg Imported {what}: {_1} {what} આયાત કર્યું: {_1} +@msg Inflate maps graphics onto its front and back, not onto a side ફુલાવો ગ્રાફિક્સને તેની આગળ અને પાછળની સપાટી પર મેપ કરે છે, બાજુની સપાટી પર નહીં +@msg Installed plug-in {_1} પ્લગ-ઇન {_1} ઇન્સ્ટોલ કર્યું +@msg Internal error: {msg} (please report this bug) આંતરિક ભૂલ: {msg} (કૃપા કરીને આ બગની જાણ કરો) +@msg Invalid dimension distance અમાન્ય પરિમાણ અંતર +@msg Invalid dimension font name અમાન્ય પરિમાણ ફોન્ટ નામ +@msg Invalid dimension offset અમાન્ય પરિમાણ ઓફસેટ +@msg Invalid drawing scale અમાન્ય ડ્રૉઇંગ સ્કેલ +@msg Invalid measured point અમાન્ય માપેલું બિંદુ +@msg Invalid point અમાન્ય બિંદુ +@msg Invalid real scale અમાન્ય વાસ્તવિક સ્કેલ +@msg JPEG colour profile: {e} JPEG રંગ પ્રોફાઇલ: {e} +@msg JPEG encoding failed: pixel buffer doesn't match the image size JPEG એન્કોડિંગ નિષ્ફળ: પિક્સેલ બફર છબીના કદ સાથે મેળ ખાતું નથી +@msg JPEG encoding failed: {e} JPEG એન્કોડિંગ નિષ્ફળ: {e} +@msg JSON.parse: {why} (at offset {at}) JSON.parse: {why} (ઓફસેટ {at} પર) +@msg JSON.stringify cannot write a structure that contains itself JSON.stringify પોતાને જ સમાવતું માળખું લખી શકતું નથી +@msg JavaScript Files has no field `{field}` JavaScript ફાઇલોમાં `{field}` ફીલ્ડ નથી +@msg Join: a subpath went missing જોડો: એક સબપાથ ગુમ થઈ ગયો +@msg Keyboard Shortcuts closed before the set was read સેટ વંચાય તે પહેલાં કીબોર્ડ શૉર્ટકટ બંધ થઈ ગયું +@msg Keyboard Shortcuts is open: change the shortcuts there કીબોર્ડ શૉર્ટકટ ખુલ્લું છે: શૉર્ટકટ ત્યાં બદલો +@msg Live Paint Merge: select a Live Paint group and the paths to add લાઇવ પેઇન્ટ મર્જ: લાઇવ પેઇન્ટ ગ્રૂપ અને ઉમેરવાના પાથ પસંદ કરો +@msg Live Paint takes paths and compound paths: convert type, images and other objects to paths first લાઇવ પેઇન્ટ પાથ અને કમ્પાઉન્ડ પાથ લે છે: પહેલાં ટાઇપ, છબીઓ અને અન્ય ઑબ્જેક્ટ્સને પાથમાં રૂપાંતરિત કરો +@msg Live Paint: select paths or compound paths લાઇવ પેઇન્ટ: પાથ અથવા કમ્પાઉન્ડ પાથ પસંદ કરો +@msg Live Paint: these paths are too degenerate to paint લાઇવ પેઇન્ટ: આ પાથ પેઇન્ટ કરવા માટે ખૂબ વિકૃત છે +@msg Live Paint: {e} to paint લાઇવ પેઇન્ટ: પેઇન્ટ કરવા માટે {e} +@msg Make Guides: select paths ગાઇડ બનાવો: પાથ પસંદ કરો +@msg Map Art maps symbols onto Extrude & Bevel (Classic) and Revolve (Classic) આર્ટવર્ક મેપ કરો સિમ્બોલને એક્સ્ટ્રુડ અને બેવલ (ક્લાસિક) અને રિવોલ્વ (ક્લાસિક) પર મેપ કરે છે +@msg Measured anchor no longer exists માપેલું એન્કર હવે અસ્તિત્વમાં નથી +@msg Measured path no longer exists માપેલો પાથ હવે અસ્તિત્વમાં નથી +@msg Measured segment no longer exists માપેલો સેગમેન્ટ હવે અસ્તિત્વમાં નથી +@msg Multichannel PSD files can't be read: save it in RGB, CMYK or Grayscale mode મલ્ટિચેનલ PSD ફાઇલો વાંચી શકાતી નથી: તેને RGB, CMYK અથવા ગ્રેસ્કેલ મોડમાં સાચવો +@msg Namespace.prototype.toString needs a Namespace Namespace.prototype.toString ને Namespace જોઈએ +@msg New Document profiles need the preferences folder, which this run doesn't have નવા દસ્તાવેજની પ્રોફાઇલ્સને પસંદગીઓનું ફોલ્ડર જોઈએ, જે આ રનમાં નથી +@msg No active document કોઈ સક્રિય દસ્તાવેજ નથી +@msg No bridge of this width fits across the selected art આ પહોળાઈનો કોઈ બ્રિજ પસંદ કરેલા આર્ટમાં આરપાર બંધબેસતો નથી +@msg No document કોઈ દસ્તાવેજ નથી +@msg No fonts are missing કોઈ ફોન્ટ ગુમ નથી +@msg No fonts are missing in this document આ દસ્તાવેજમાં કોઈ ફોન્ટ ગુમ નથી +@msg No linked files to look for શોધવા માટે કોઈ લિંક કરેલી ફાઇલો નથી +@msg No matches found કોઈ મેળ મળ્યો નહીં +@msg No saved selections (Select → Save Selection…) કોઈ સાચવેલી પસંદગી નથી (પસંદ કરો → પસંદગી સાચવો…) +@msg No saved views (View → New View…) કોઈ સાચવેલાં દૃશ્યો નથી (વ્યૂ → નવું દૃશ્ય…) +@msg No tool is named "{name}" "{name}" નામનું કોઈ ટૂલ નથી +@msg Non-finite dimension બિન-સીમિત પરિમાણ +@msg None of these issues are left: check again આમાંથી કોઈ સમસ્યા બાકી નથી: ફરી તપાસો +@msg Not found મળ્યું નહીં +@msg Nothing to split at the cursor કર્સર પર વિભાજિત કરવા માટે કંઈ નથી +@msg Number.prototype.{name} was called on a value that is not a number Number.prototype.{name} ને એવી કિંમત પર કૉલ કરાયું જે સંખ્યા નથી +@msg OK was not filed OK નોંધાયું નહીં +@msg OKLCH needs sRGB as the working RGB space OKLCH માટે કાર્યકારી RGB સ્પેસ તરીકે sRGB જોઈએ +@msg Object.create's prototype must be an object or null Object.create નો પ્રોટોટાઇપ ઑબ્જેક્ટ અથવા null હોવો જોઈએ +@msg Object.preventExtensions: the proxy did not stop being extensible Object.preventExtensions: પ્રોક્સી વિસ્તારી શકાય તેવું રહેવાનું બંધ ન થયું +@msg Object.setPrototypeOf could not set the prototype Object.setPrototypeOf પ્રોટોટાઇપ સેટ કરી શક્યું નહીં +@msg Object.setPrototypeOf was given undefined or null Object.setPrototypeOf ને undefined અથવા null અપાયું +@msg Object.setPrototypeOf's prototype must be an object or null Object.setPrototypeOf નો પ્રોટોટાઇપ ઑબ્જેક્ટ અથવા null હોવો જોઈએ +@msg Object.{function} was given a value that is not an object Object.{function} ને એવી કિંમત અપાઈ જે ઑબ્જેક્ટ નથી +@msg Offset Path: select paths ઓફસેટ પાથ: પાથ પસંદ કરો +@msg Offset Path: the offset leaves nothing of the selected paths (an inset larger than the shapes) ઓફસેટ પાથ: ઓફસેટ પછી પસંદ કરેલા પાથમાંથી કંઈ બચતું નથી (આકારો કરતાં મોટું ઇનસેટ) +@msg Offset Path: the path is too complex to offset ઓફસેટ પાથ: પાથ ઓફસેટ કરવા માટે ખૂબ જટિલ છે +@msg Offset Path: {e} ઓફસેટ પાથ: {e} +@msg Only linear dimensions are horizontal or vertical ફક્ત રેખીય પરિમાણો જ આડા કે ઊભા હોય છે +@msg Only the fill, stroke, opacity and blend of a path, compound path or type selected in a symbol instance can change સિમ્બોલ ઇન્સ્ટન્સમાં પસંદ કરેલા પાથ, કમ્પાઉન્ડ પાથ અથવા ટાઇપના ફક્ત ફિલ, સ્ટ્રોક, અપારદર્શકતા અને બ્લેન્ડ જ બદલી શકાય છે +@msg Only the person at the keyboard can allow a script's file access ફક્ત કીબોર્ડ પરની વ્યક્તિ જ સ્ક્રિપ્ટને ફાઇલ ઍક્સેસની મંજૂરી આપી શકે છે +@msg Only the person at the keyboard can approve installing a plug-in ફક્ત કીબોર્ડ પરની વ્યક્તિ જ પ્લગ-ઇન ઇન્સ્ટોલ કરવાની મંજૂરી આપી શકે છે +@msg Only the person at the keyboard can print a script's print jobs ફક્ત કીબોર્ડ પરની વ્યક્તિ જ સ્ક્રિપ્ટના પ્રિન્ટ જોબ છાપી શકે છે +@msg Open a document before drawing a graph ગ્રાફ દોરતાં પહેલાં દસ્તાવેજ ખોલો +@msg Open a document before editing paths. પાથ સંપાદિત કરતાં પહેલાં દસ્તાવેજ ખોલો. +@msg Open a document before using Split Into Grid. ગ્રિડમાં વિભાજિત કરો વાપરતાં પહેલાં દસ્તાવેજ ખોલો. +@msg Opened {url} {url} ખોલ્યું +@msg Optimize to File Size: there is no image to measure ફાઇલ કદ મુજબ ઑપ્ટિમાઇઝ કરો: માપવા માટે કોઈ છબી નથી +@msg Outline Stroke: no stroked paths selected સ્ટ્રોકની આઉટલાઇન: કોઈ સ્ટ્રોકવાળા પાથ પસંદ કરેલ નથી +@msg PCX files with {bits}-bit pixels in {planes} planes can't be read {planes} પ્લેનમાં {bits}-બિટ પિક્સેલવાળી PCX ફાઇલો વાંચી શકાતી નથી +@msg PDF content is incomplete or exceeds the reader's limits; no document was imported PDF સામગ્રી અધૂરી છે અથવા રીડરની મર્યાદા ઓળંગે છે; કોઈ દસ્તાવેજ આયાત થયો નથી +@msg PDF flattener: {e} PDF ફ્લેટનર: {e} +@msg PDF open options require a PDF file PDF ખોલવાના વિકલ્પો માટે PDF ફાઇલ જોઈએ +@msg PDF options: {e} PDF વિકલ્પો: {e} +@msg PDF writer error: {0} PDF રાઇટર ભૂલ: {0} +@msg PNG encoding failed: pixel buffer doesn't match the image size PNG એન્કોડિંગ નિષ્ફળ: પિક્સેલ બફર છબીના કદ સાથે મેળ ખાતું નથી +@msg PNG encoding failed: the palette image is malformed PNG એન્કોડિંગ નિષ્ફળ: પૅલેટ છબી ખામીયુક્ત છે +@msg PNG encoding failed: {e} PNG એન્કોડિંગ નિષ્ફળ: {e} +@msg PNG encoding failed: {width} × {height} pixels is not a valid image size PNG એન્કોડિંગ નિષ્ફળ: {width} × {height} પિક્સેલ માન્ય છબી કદ નથી +@msg PSD colour profile: {e} PSD રંગ પ્રોફાઇલ: {e} +@msg PSD encoding failed: the pixel buffer doesn't match the image size PSD એન્કોડિંગ નિષ્ફળ: પિક્સેલ બફર છબીના કદ સાથે મેળ ખાતું નથી +@msg PathPoint.selected = PathPointSelection.NOSELECTION is not available yet on PathItem {_1}: the group or compound path that holds it is selected PathPoint.selected = PathPointSelection.NOSELECTION હજી PathItem {_1} પર ઉપલબ્ધ નથી: તેને ધરાવતું ગ્રૂપ અથવા કમ્પાઉન્ડ પાથ પસંદ કરેલું છે +@msg PathPoint.selected = {s} is not available yet: only anchor points can be selected PathPoint.selected = {s} હજી ઉપલબ્ધ નથી: ફક્ત એન્કર બિંદુઓ જ પસંદ કરી શકાય છે +@msg PathPoints.add takes a path to at most {MAX_POINTS} points PathPoints.add પાથને વધુમાં વધુ {MAX_POINTS} બિંદુઓ સુધી લઈ જાય છે +@msg Pathfinder effects are not allowed in returned effects; a piece is one path, with nothing to combine પરત કરેલી ઇફેક્ટ્સમાં પાથફાઇન્ડર ઇફેક્ટ્સની મંજૂરી નથી; દરેક ટુકડો એક પાથ છે, જેમાં જોડવા માટે કંઈ નથી +@msg Persistent libraries not found: {files} કાયમી લાઇબ્રેરીઓ મળી નહીં: {files} +@msg Plug-in “{name}”: {notice} પ્લગ-ઇન “{name}”: {notice} +@msg Plug-ins can't be loaded from {path}: {e} {path} માંથી પ્લગ-ઇન્સ લોડ કરી શકાતા નથી: {e} +@msg PostScript prints only to a file: set jobOptions.file PostScript ફક્ત ફાઇલમાં છાપે છે: jobOptions.file સેટ કરો +@msg Preferences imported. પસંદગીઓ આયાત કરી. +@msg Presentation Mode hides the toolbars: change the screen mode to show them પ્રેઝન્ટેશન મોડ ટૂલબાર છુપાવે છે: તેમને બતાવવા સ્ક્રીન મોડ બદલો +@msg Preview in Browser needs the desktop app (the web downloads files instead) બ્રાઉઝરમાં પૂર્વાવલોકન માટે ડેસ્કટૉપ ઍપ જોઈએ (વેબ તેના બદલે ફાઇલો ડાઉનલોડ કરે છે) +@msg Print Ink Fixes works on CMYK documents: choose File › Document Color Mode › CMYK Color first પ્રિન્ટ ઇંક ફિક્સ CMYK દસ્તાવેજો પર કામ કરે છે: પહેલાં ફાઇલ › દસ્તાવેજ કલર મોડ › CMYK રંગ પસંદ કરો +@msg PrintCoordinateOptions.{name} above {MAX_PRINT_SCALE} is not available yet PrintCoordinateOptions.{name} {MAX_PRINT_SCALE} થી ઉપર હજી ઉપલબ્ધ નથી +@msg PrintJobOptions.artboardRange: {e} PrintJobOptions.artboardRange: {e} +@msg PrintOptions.printerName names no installed printer: {name} PrintOptions.printerName કોઈ ઇન્સ્ટોલ કરેલા પ્રિન્ટરનું નામ નથી: {name} +@msg PrintPaperOptions.width and height apply only to custom paper, not {name} PrintPaperOptions.width અને height ફક્ત કસ્ટમ કાગળ પર લાગુ થાય છે, {name} પર નહીં +@msg Printing from scripts is not available here: the script's print jobs were not sent સ્ક્રિપ્ટ્સમાંથી છાપવાનું અહીં ઉપલબ્ધ નથી: સ્ક્રિપ્ટના પ્રિન્ટ જોબ મોકલાયા નહીં +@msg Printing to a printer is not available here: set jobOptions.file to print to a file પ્રિન્ટર પર છાપવાનું અહીં ઉપલબ્ધ નથી: ફાઇલમાં છાપવા jobOptions.file સેટ કરો +@msg Promise must be called with new Promise ને new સાથે કૉલ કરવું જોઈએ +@msg Promise.prototype.finally was called on a value that is not an object Promise.prototype.finally ને એવી કિંમત પર કૉલ કરાયું જે ઑબ્જેક્ટ નથી +@msg Promise.prototype.{name} was called on a value that is not a promise Promise.prototype.{name} ને એવી કિંમત પર કૉલ કરાયું જે promise નથી +@msg Promise.{_1}: the constructor's resolve is not a function Promise.{_1}: કન્સ્ટ્રક્ટરનું resolve ફંક્શન નથી +@msg Promise.{name} was called on a value that is not a constructor Promise.{name} ને એવી કિંમત પર કૉલ કરાયું જે કન્સ્ટ્રક્ટર નથી +@msg Proxy must be called with new Proxy ને new સાથે કૉલ કરવું જોઈએ +@msg QName.prototype.toString needs a QName QName.prototype.toString ને QName જોઈએ +@msg Ran {name} {name} ચલાવ્યું +@msg Recolor Artwork stayed open કલાકૃતિનો રંગ બદલો ખુલ્લું રહ્યું +@msg Reflect.apply: the target is not a function Reflect.apply: ટાર્ગેટ ફંક્શન નથી +@msg Reflect.construct: newTarget is not a constructor Reflect.construct: newTarget કન્સ્ટ્રક્ટર નથી +@msg Reflect.construct: the target is not a constructor Reflect.construct: ટાર્ગેટ કન્સ્ટ્રક્ટર નથી +@msg Reflect.setPrototypeOf: the prototype is neither an object nor null Reflect.setPrototypeOf: પ્રોટોટાઇપ ન તો ઑબ્જેક્ટ છે ન null +@msg Reflect.{function}: the argument list is not an object Reflect.{function}: આર્ગ્યુમેન્ટ યાદી ઑબ્જેક્ટ નથી +@msg Reflect.{function}: the target is not an object Reflect.{function}: ટાર્ગેટ ઑબ્જેક્ટ નથી +@msg RegExp.prototype.{name} was called on a value that is not a RegExp object RegExp.prototype.{name} ને એવી કિંમત પર કૉલ કરાયું જે RegExp ઑબ્જેક્ટ નથી +@msg Rejoin Path Pieces: too many paths to rejoin at once પાથના ટુકડા ફરી જોડો: એકસાથે ફરી જોડવા માટે ઘણા બધા પાથ છે +@msg Release Guides: no guides ગાઇડ મુક્ત કરો: કોઈ ગાઇડ નથી +@msg Release: no layer to put the rectangle in મુક્ત કરો: લંબચોરસ મૂકવા માટે કોઈ લેયર નથી +@msg Reordering a path inside a compound path is not available yet કમ્પાઉન્ડ પાથની અંદરના પાથનો ક્રમ બદલવાનું હજી ઉપલબ્ધ નથી +@msg Replace Spine: select a blend and a path સ્પાઇન બદલો: બ્લેન્ડ અને પાથ પસંદ કરો +@msg Return to the original drawing to save the PDF or its summary PDF અથવા તેનો સારાંશ સાચવવા મૂળ ડ્રૉઇંગ પર પાછા જાઓ +@msg Retype failed: internal error: its thread stopped (please report this bug) ફરી ટાઇપ કરો નિષ્ફળ: આંતરિક ભૂલ: તેનો થ્રેડ અટકી ગયો (કૃપા કરીને આ બગની જાણ કરો) +@msg Retype finished, but the document or its selection changed meanwhile: run it again ફરી ટાઇપ કરો પૂર્ણ થયું, પણ તે દરમિયાન દસ્તાવેજ અથવા તેની પસંદગી બદલાઈ: તેને ફરી ચલાવો +@msg Retype: no selected shape matches a glyph of an available font ({_1} checked) ફરી ટાઇપ કરો: કોઈ પસંદ કરેલો આકાર ઉપલબ્ધ ફોન્ટના ગ્લિફ સાથે મેળ ખાતો નથી ({_1} તપાસ્યા) +@msg Revolve cap must be a boolean રિવોલ્વ કૅપ બૂલિયન હોવું જોઈએ +@msg Revolve edge must be left or right રિવોલ્વ કિનારી left અથવા right હોવી જોઈએ +@msg Revolve maps graphics onto its side: map them onto the front રિવોલ્વ ગ્રાફિક્સને તેની બાજુની સપાટી પર મેપ કરે છે: તેમને આગળની સપાટી પર મેપ કરો +@msg Revolve paint is too complex for this surface; reduce Segments or simplify the gradient રિવોલ્વ પેઇન્ટ આ સપાટી માટે ખૂબ જટિલ છે; સેગમેન્ટ્સ ઘટાડો અથવા ગ્રેડિયન્ટ સરળ બનાવો +@msg Revolve profile contains invalid coordinates રિવોલ્વ પ્રોફાઇલમાં અમાન્ય કોઓર્ડિનેટ્સ છે +@msg Revolve profile is too complex રિવોલ્વ પ્રોફાઇલ ખૂબ જટિલ છે +@msg Revolve projection is not finite રિવોલ્વ પ્રોજેક્શન સીમિત નથી +@msg Revolve requires a group holding a shape with at least two anchors રિવોલ્વ માટે ઓછામાં ઓછા બે એન્કરવાળા આકારને ધરાવતું ગ્રૂપ જોઈએ +@msg Revolve requires a shape with at least two anchors રિવોલ્વ માટે ઓછામાં ઓછા બે એન્કરવાળો આકાર જોઈએ +@msg Revolve requires finite profile coordinates within 100 million points રિવોલ્વ માટે 100 મિલિયન પૉઇન્ટની અંદરના સીમિત પ્રોફાઇલ કોઓર્ડિનેટ્સ જોઈએ +@msg Revolve surface is too complex; reduce Segments or simplify the profile રિવોલ્વ સપાટી ખૂબ જટિલ છે; સેગમેન્ટ્સ ઘટાડો અથવા પ્રોફાઇલ સરળ બનાવો +@msg Revolve surface is too complex; simplify the profile રિવોલ્વ સપાટી ખૂબ જટિલ છે; પ્રોફાઇલ સરળ બનાવો +@msg Revolve visibility cannot split the projected boundary રિવોલ્વ દૃશ્યતા પ્રોજેક્ટ કરેલી સીમાને વિભાજિત કરી શકતી નથી +@msg Revolve visibility creates too many fragments રિવોલ્વ દૃશ્યતા ઘણા બધા ટુકડા બનાવે છે +@msg Revolve visibility creates too many vector anchors રિવોલ્વ દૃશ્યતા ઘણા બધા વેક્ટર એન્કર બનાવે છે +@msg Revolve visibility exceeds its geometry work limit રિવોલ્વ દૃશ્યતા તેની ભૂમિતિ કાર્ય મર્યાદા ઓળંગે છે +@msg Revolve visibility exceeds its spatial index limit રિવોલ્વ દૃશ્યતા તેની અવકાશી ઇન્ડેક્સ મર્યાદા ઓળંગે છે +@msg Revolve visibility has too many boundary crossings રિવોલ્વ દૃશ્યતામાં ઘણા બધા સીમા છેદ છે +@msg Revolve visibility has too many input anchors રિવોલ્વ દૃશ્યતામાં ઘણા બધા ઇનપુટ એન્કર છે +@msg Revolve visibility requires convex cap sectors રિવોલ્વ દૃશ્યતા માટે બહિર્મુખ કૅપ સેક્ટર જોઈએ +@msg Revolve visibility requires finite projected faces રિવોલ્વ દૃશ્યતા માટે સીમિત પ્રોજેક્ટ કરેલી સપાટીઓ જોઈએ +@msg SVG is not UTF-8, UTF-16 or ISO 8859-1 SVG UTF-8, UTF-16 અથવા ISO 8859-1 નથી +@msg SVG options: {e} SVG વિકલ્પો: {e} +@msg SVG parse error: {0} SVG પાર્સ ભૂલ: {0} +@msg Safe Mode is on: plug-ins don't load or run until VectorCraft starts normally સેફ મોડ ચાલુ છે: VectorCraft સામાન્ય રીતે શરૂ ન થાય ત્યાં સુધી પ્લગ-ઇન્સ લોડ થતા કે ચાલતા નથી +@msg Save canceled સાચવવાનું રદ કર્યું +@msg Save for Web settings: {e} વેબ માટે સાચવો સેટિંગ્સ: {e} +@msg Save for Web: the image is empty વેબ માટે સાચવો: છબી ખાલી છે +@msg Save writes one artboard: name one, or export several with document.export સાચવો એક આર્ટબોર્ડ લખે છે: એકનું નામ આપો, અથવા document.export વડે અનેક એક્સપોર્ટ કરો +@msg Save writes {_1}, not {_2}: use document.export for other formats સાચવો {_1} લખે છે, {_2} નહીં: અન્ય ફોર્મેટ માટે document.export વાપરો +@msg Save writes {_1}, not {_2}: use file.saveAsTemplate to write it સાચવો {_1} લખે છે, {_2} નહીં: તે લખવા file.saveAsTemplate વાપરો +@msg Saved recovery data for {title} {title} માટે પુનઃપ્રાપ્તિ ડેટા સાચવ્યો +@msg Saved to User Defined: {_1} વપરાશકર્તા-વ્યાખ્યાયિતમાં સાચવ્યું: {_1} +@msg Saved {_1} {_1} સાચવ્યું +@msg Saved {name} {name} સાચવ્યું +@msg Saved {n} files beside {path} {path} ની બાજુમાં {n} ફાઇલો સાચવી +@msg Saved {path} {path} સાચવ્યું +@msg Scale Text Attributes: selected type has no scale to bake ટેક્સ્ટ ગુણધર્મો સ્કેલ કરો: પસંદ કરેલા ટાઇપમાં લાગુ કરવા માટે કોઈ સ્કેલ નથી +@msg Scale must be drawing:real, for example 1:10 સ્કેલ drawing:real હોવો જોઈએ, ઉદાહરણ તરીકે 1:10 +@msg Scale ratio must be between 1:1000000 and 1000000:1 સ્કેલ ગુણોત્તર 1:1000000 અને 1000000:1 ની વચ્ચે હોવો જોઈએ +@msg Scale takes {{width, height, linked}} સ્કેલ {{width, height, linked}} લે છે +@msg Script file access denied સ્ક્રિપ્ટ ફાઇલ ઍક્સેસ નકારાઈ +@msg Script file access denied: {_1} સ્ક્રિપ્ટ ફાઇલ ઍક્સેસ નકારાઈ: {_1} +@msg Script file access denied: {_1} isn't valid text સ્ક્રિપ્ટ ફાઇલ ઍક્સેસ નકારાઈ: {_1} માન્ય ટેક્સ્ટ નથી +@msg Script file access denied: {path} સ્ક્રિપ્ટ ફાઇલ ઍક્સેસ નકારાઈ: {path} +@msg Script file access is unavailable on the web વેબ પર સ્ક્રિપ્ટ ફાઇલ ઍક્સેસ ઉપલબ્ધ નથી +@msg Script file access to the app's own folders is not allowed ઍપના પોતાના ફોલ્ડર્સમાં સ્ક્રિપ્ટ ફાઇલ ઍક્સેસની મંજૂરી નથી +@msg Script file cannot be decoded સ્ક્રિપ્ટ ફાઇલ ડીકોડ કરી શકાતી નથી +@msg Script file cannot encode the text સ્ક્રિપ્ટ ફાઇલ ટેક્સ્ટ એન્કોડ કરી શકતી નથી +@msg Script file could not be read સ્ક્રિપ્ટ ફાઇલ વાંચી શકાઈ નહીં +@msg Script file could not be written સ્ક્રિપ્ટ ફાઇલ લખી શકાઈ નહીં +@msg Script file dialogs need a person to answer them સ્ક્રિપ્ટ ફાઇલ ડાયલૉગને જવાબ આપવા વ્યક્તિ જોઈએ +@msg Script file does not exist સ્ક્રિપ્ટ ફાઇલ અસ્તિત્વમાં નથી +@msg Script file exceeds 8 MiB સ્ક્રિપ્ટ ફાઇલ 8 MiB કરતાં મોટી છે +@msg Script file hidden setting cannot be changed સ્ક્રિપ્ટ ફાઇલનું છુપાયેલું સેટિંગ બદલી શકાતું નથી +@msg Script file is not a regular file સ્ક્રિપ્ટ ફાઇલ સામાન્ય ફાઇલ નથી +@msg Script file is not open સ્ક્રિપ્ટ ફાઇલ ખુલ્લી નથી +@msg Script file is not open for writing સ્ક્રિપ્ટ ફાઇલ લખવા માટે ખુલ્લી નથી +@msg Script file is open for writing સ્ક્રિપ્ટ ફાઇલ લખવા માટે ખુલ્લી છે +@msg Script file is read-only સ્ક્રિપ્ટ ફાઇલ ફક્ત-વાંચન છે +@msg Script file name is already in use સ્ક્રિપ્ટ ફાઇલનું નામ પહેલેથી ઉપયોગમાં છે +@msg Script file name must be a name without a folder સ્ક્રિપ્ટ ફાઇલનું નામ ફોલ્ડર વગરનું નામ હોવું જોઈએ +@msg Script file open mode must be r, w, e or a સ્ક્રિપ્ટ ફાઇલ ખોલવાનો મોડ r, w, e અથવા a હોવો જોઈએ +@msg Script file path exceeds 32,767 characters સ્ક્રિપ્ટ ફાઇલ પાથ 32,767 અક્ષરો કરતાં લાંબો છે +@msg Script file path is not valid UTF-8 સ્ક્રિપ્ટ ફાઇલ પાથ માન્ય UTF-8 નથી +@msg Script file permission can be kept only for a script run from a file સ્ક્રિપ્ટ ફાઇલ પરવાનગી ફક્ત ફાઇલમાંથી ચલાવેલી સ્ક્રિપ્ટ માટે જ રાખી શકાય છે +@msg Script file permission could not be saved સ્ક્રિપ્ટ ફાઇલ પરવાનગી સાચવી શકાઈ નહીં +@msg Script files cannot be opened in another application સ્ક્રિપ્ટ ફાઇલો બીજી ઍપ્લિકેશનમાં ખોલી શકાતી નથી +@msg Script files cannot make aliases સ્ક્રિપ્ટ ફાઇલો એલિયાસ બનાવી શકતી નથી +@msg Script folder has more than 2,048 entries સ્ક્રિપ્ટ ફોલ્ડરમાં 2,048 કરતાં વધુ એન્ટ્રીઓ છે +@msg Script folder mask takes too many steps to match સ્ક્રિપ્ટ ફોલ્ડર માસ્કને મેળ કરવામાં ઘણાં બધાં પગલાં લાગે છે +@msg Script has 256 files open સ્ક્રિપ્ટે 256 ફાઇલો ખોલી છે +@msg Second measured segment no longer exists બીજો માપેલો સેગમેન્ટ હવે અસ્તિત્વમાં નથી +@msg Select a dimension first પહેલાં પરિમાણ પસંદ કરો +@msg Select dimensions to update અપડેટ કરવા પરિમાણો પસંદ કરો +@msg Select horizontal point or area type whose text fits જેનું ટેક્સ્ટ બંધબેસે તેવું આડું પોઇન્ટ ટાઇપ અથવા એરિયા ટાઇપ પસંદ કરો +@msg Select only dimensions ફક્ત પરિમાણો પસંદ કરો +@msg Select point type પોઇન્ટ ટાઇપ પસંદ કરો +@msg Select text or click into text with the Type tool to insert glyphs ગ્લિફ દાખલ કરવા ટેક્સ્ટ પસંદ કરો અથવા ટાઇપ ટૂલ વડે ટેક્સ્ટમાં ક્લિક કરો +@msg Select two or more objects, or a group બે કે વધુ ઑબ્જેક્ટ્સ, અથવા ગ્રૂપ પસંદ કરો +@msg Select two or more one-line point type objects on one baseline to combine જોડવા માટે એક બેઝલાઇન પરના બે કે વધુ એક-લીટીના પોઇન્ટ ટાઇપ ઑબ્જેક્ટ્સ પસંદ કરો +@msg Select two or more one-line point type objects to join જોડવા માટે બે કે વધુ એક-લીટીના પોઇન્ટ ટાઇપ ઑબ્જેક્ટ્સ પસંદ કરો +@msg Shape Builder: no region under the pointer શેપ બિલ્ડર: પોઇન્ટર નીચે કોઈ પ્રદેશ નથી +@msg Shape Builder: select paths or compound paths શેપ બિલ્ડર: પાથ અથવા કમ્પાઉન્ડ પાથ પસંદ કરો +@msg Shaper needs 1–64 source paths શેપરને 1–64 સ્રોત પાથ જોઈએ +@msg Show All Hidden Attributes: nothing is hidden બધા છુપાયેલા ગુણધર્મો બતાવો: કંઈ છુપાયેલું નથી +@msg Simplify Anchors: the paths have too many anchors to simplify at once એન્કર સરળ બનાવો: પાથમાં એકસાથે સરળ બનાવવા માટે ઘણા બધા એન્કર છે +@msg Some islands could not be joined to the area around the art કેટલાક ટાપુઓ આર્ટની આસપાસના વિસ્તાર સાથે જોડી શકાયા નહીં +@msg Split Into Grid: select paths large enough for the grid ગ્રિડમાં વિભાજિત કરો: ગ્રિડ માટે પૂરતા મોટા પાથ પસંદ કરો +@msg Stale document દસ્તાવેજ હવે માન્ય નથી +@msg Stale page item પેજ આઇટમ હવે માન્ય નથી +@msg Stale path point પાથ બિંદુ હવે માન્ય નથી +@msg Stale print options પ્રિન્ટ વિકલ્પો હવે માન્ય નથી +@msg Stale printer પ્રિન્ટર હવે માન્ય નથી +@msg Stale story સ્ટોરી હવે માન્ય નથી +@msg Stale style સ્ટાઇલ હવે માન્ય નથી +@msg Stale tag ટૅગ હવે માન્ય નથી +@msg Stale text font ટેક્સ્ટ ફોન્ટ હવે માન્ય નથી +@msg Stale text range ટેક્સ્ટ રેન્જ હવે માન્ય નથી +@msg Stale view વ્યૂ હવે માન્ય નથી +@msg Stencil Bridges: the selected art is too large or too detailed to bridge સ્ટેન્સિલ બ્રિજિસ: પસંદ કરેલું આર્ટ બ્રિજ કરવા માટે ખૂબ મોટું અથવા ખૂબ વિગતવાર છે +@msg String.prototype.toString was called on a value that is not a string String.prototype.toString ને એવી કિંમત પર કૉલ કરાયું જે સ્ટ્રિંગ નથી +@msg String.prototype[Symbol.iterator] was called on null or undefined String.prototype[Symbol.iterator] ને null અથવા undefined પર કૉલ કરાયું +@msg Switch x/y is for scatter graphs x/y બદલો સ્કેટર ગ્રાફ માટે છે +@msg Symbol.keyFor was given a value that is not a Symbol Symbol.keyFor ને એવી કિંમત અપાઈ જે Symbol નથી +@msg Symbol.prototype.{name} was called on a value that is not a Symbol Symbol.prototype.{name} ને એવી કિંમત પર કૉલ કરાયું જે Symbol નથી +@msg TIFF colour profile: {e} TIFF રંગ પ્રોફાઇલ: {e} +@msg TIFF encoding failed: the pixel buffer doesn't match the image size TIFF એન્કોડિંગ નિષ્ફળ: પિક્સેલ બફર છબીના કદ સાથે મેળ ખાતું નથી +@msg Tab has hidden the toolbars: press Tab to show them Tab એ ટૂલબાર છુપાવ્યા છે: તેમને બતાવવા Tab દબાવો +@msg Targa depth {_1}: 16, 24 or 32 bits per pixel Targa ઊંડાઈ {_1}: પિક્સેલ દીઠ 16, 24 અથવા 32 બિટ્સ +@msg Targa encoding failed: the pixel buffer doesn't match the image size Targa એન્કોડિંગ નિષ્ફળ: પિક્સેલ બફર છબીના કદ સાથે મેળ ખાતું નથી +@msg Targa files are RGB: colorModel rgb Targa ફાઇલો RGB હોય છે: colorModel rgb +@msg Text Wrap: select a wrap object ટેક્સ્ટ રૅપ: રૅપ ઑબ્જેક્ટ પસંદ કરો +@msg Text options: {e} ટેક્સ્ટ વિકલ્પો: {e} +@msg TextFrames: path positions are not available yet TextFrames: પાથ સ્થાનો હજી ઉપલબ્ધ નથી +@msg The 3D object is too complex to export 3D ઑબ્જેક્ટ એક્સપોર્ટ કરવા માટે ખૂબ જટિલ છે +@msg The 3D object's mesh is incomplete or holds a value that is not a number 3D ઑબ્જેક્ટનો મેશ અધૂરો છે અથવા તેમાં એવી કિંમત છે જે સંખ્યા નથી +@msg The 3D projection is not finite 3D પ્રોજેક્શન સીમિત નથી +@msg The 3D shadow is too complex; turn Shadows off or simplify the art 3D પડછાયો ખૂબ જટિલ છે; પડછાયા બંધ કરો અથવા આર્ટ સરળ બનાવો +@msg The 3D surface is too complex; simplify the shape 3D સપાટી ખૂબ જટિલ છે; આકાર સરળ બનાવો +@msg The SVG file is larger than 16 MB SVG ફાઇલ 16 MB કરતાં મોટી છે +@msg The action library changed. Reopen Options to edit it. ક્રિયા લાઇબ્રેરી બદલાઈ ગઈ. તેને સંપાદિત કરવા વિકલ્પો ફરી ખોલો. +@msg The active document changed while the Color Picker was open રંગ પિકર ખુલ્લું હતું ત્યારે સક્રિય દસ્તાવેજ બદલાયો +@msg The add-on settings apply only to the drawing where the dialog opened. ઍડ-ઑન સેટિંગ્સ ફક્ત તે ડ્રૉઇંગ પર લાગુ થાય છે જ્યાં ડાયલૉગ ખૂલ્યો હતો. +@msg The document was reverted. Reopen this dialog to continue. દસ્તાવેજ સાચવેલા સંસ્કરણ પર પાછો લવાયો. ચાલુ રાખવા આ ડાયલૉગ ફરી ખોલો. +@msg The export returned no file contents એક્સપોર્ટે ફાઇલની કોઈ સામગ્રી પરત કરી નહીં +@msg The graphics are too complex for this surface: simplify the symbols' art or reduce Segments આ સપાટી માટે ગ્રાફિક્સ ખૂબ જટિલ છે: સિમ્બોલનું આર્ટ સરળ બનાવો અથવા સેગમેન્ટ્સ ઘટાડો +@msg The graphics are too complex: simplify the symbols' art ગ્રાફિક્સ ખૂબ જટિલ છે: સિમ્બોલનું આર્ટ સરળ બનાવો +@msg The last session of VectorCraft stopped responding before it closed. Help › Copy Troubleshooting Info copies the details for a bug report VectorCraft નું છેલ્લું સત્ર બંધ થતાં પહેલાં પ્રતિસાદ આપતું બંધ થઈ ગયું. મદદ › સમસ્યા નિવારણની માહિતી કૉપી કરો બગ રિપોર્ટ માટેની વિગતો કૉપી કરે છે +@msg The link is inside a symbol, graph design, pattern or opacity mask and has no place on the canvas લિંક સિમ્બોલ, ગ્રાફ ડિઝાઇન, પેટર્ન અથવા અપારદર્શકતા માસ્કની અંદર છે અને કેનવાસ પર તેનું કોઈ સ્થાન નથી +@msg The point type has no transform to reset પોઇન્ટ ટાઇપમાં રીસેટ કરવા માટે કોઈ ટ્રાન્સફોર્મ નથી +@msg The point type is aligned that way already પોઇન્ટ ટાઇપ પહેલેથી જ એ રીતે સંરેખિત છે +@msg The preferences file is larger than 1 MB પસંદગીઓની ફાઇલ 1 MB કરતાં મોટી છે +@msg The preferences file is not valid UTF-8 પસંદગીઓની ફાઇલ માન્ય UTF-8 નથી +@msg The printer {_1} is no longer installed: the script's print jobs were not sent પ્રિન્ટર {_1} હવે ઇન્સ્ટોલ કરેલું નથી: સ્ક્રિપ્ટના પ્રિન્ટ જોબ મોકલાયા નહીં +@msg The script changed after its warning opened: check the warning again ચેતવણી ખૂલ્યા પછી સ્ક્રિપ્ટ બદલાઈ: ચેતવણી ફરી તપાસો +@msg The script was stopped and its changes were undone સ્ક્રિપ્ટ અટકાવવામાં આવી અને તેના ફેરફારો પૂર્વવત્ કરાયા +@msg The script's print jobs were not sent સ્ક્રિપ્ટના પ્રિન્ટ જોબ મોકલાયા નહીં +@msg The scripts waiting to run were not run ચાલવાની રાહ જોતી સ્ક્રિપ્ટ્સ ચલાવાઈ નહીં +@msg The selected art has no islands to bridge પસંદ કરેલા આર્ટમાં બ્રિજ કરવા માટે કોઈ ટાપુ નથી +@msg The shape contains invalid coordinates આકારમાં અમાન્ય કોઓર્ડિનેટ્સ છે +@msg The shape is too complex for a 3D effect 3D ઇફેક્ટ માટે આકાર ખૂબ જટિલ છે +@msg The {name} profile could not be read, so the new document has the default settings: {reason} {name} પ્રોફાઇલ વાંચી શકાઈ નહીં, તેથી નવા દસ્તાવેજમાં ડિફૉલ્ટ સેટિંગ્સ છે: {reason} +@msg There is no default printer: set PrintOptions.printerName કોઈ ડિફૉલ્ટ પ્રિન્ટર નથી: PrintOptions.printerName સેટ કરો +@msg There is no window to show the dialog in. ડાયલૉગ બતાવવા માટે કોઈ વિન્ડો નથી. +@msg This name can't be used. આ નામ વાપરી શકાતું નથી. +@msg This shortcut file is in a form VectorCraft can't read. આ શૉર્ટકટ ફાઇલ એવા સ્વરૂપમાં છે જે VectorCraft વાંચી શકતું નથી. +@msg Too many Revolve faces for visibility evaluation દૃશ્યતા મૂલ્યાંકન માટે ઘણી બધી રિવોલ્વ સપાટીઓ છે +@msg Too many breaks to remove at once એકસાથે દૂર કરવા માટે ઘણા બધા બ્રેક છે +@msg Too many pieces to make at once એકસાથે બનાવવા માટે ઘણા બધા ટુકડા છે +@msg Too many type objects to change at once એકસાથે બદલવા માટે ઘણા બધા ટાઇપ ઑબ્જેક્ટ્સ છે +@msg Trap: more than {_1} pairs of objects lie close enough to trap, or too many objects share a horizontal range; trap fewer objects at a time ટ્રૅપ: ઑબ્જેક્ટ્સની {_1} કરતાં વધુ જોડીઓ ટ્રૅપ કરવા જેટલી નજીક છે, અથવા ઘણા બધા ઑબ્જેક્ટ્સ એક જ આડી શ્રેણી ધરાવે છે; એક સમયે ઓછા ઑબ્જેક્ટ્સ ટ્રૅપ કરો +@msg Trap: no edges of different colours meet among the selected objects ટ્રૅપ: પસંદ કરેલા ઑબ્જેક્ટ્સમાં જુદા રંગોની કોઈ કિનારીઓ મળતી નથી +@msg Trap: select two or more objects filled with solid colours ટ્રૅપ: સોલિડ રંગોથી ભરેલા બે કે વધુ ઑબ્જેક્ટ્સ પસંદ કરો +@msg Trim View hides the guides and the grid; turn it off first ટ્રિમ વ્યૂ ગાઇડ્સ અને ગ્રિડ છુપાવે છે; પહેલાં તેને બંધ કરો +@msg TypedArray cannot be called or constructed; use a typed array constructor such as Uint8Array TypedArray ને કૉલ કે કન્સ્ટ્રક્ટ કરી શકાતું નથી; Uint8Array જેવો typed array કન્સ્ટ્રક્ટર વાપરો +@msg TypedArray.from must be called on a typed array constructor TypedArray.from ને typed array કન્સ્ટ્રક્ટર પર કૉલ કરવું જોઈએ +@msg TypedArray.prototype.{name} was called on a value that is not a typed array TypedArray.prototype.{name} ને એવી કિંમત પર કૉલ કરાયું જે typed array નથી +@msg TypedArray.{name} must be called on a typed array constructor TypedArray.{name} ને typed array કન્સ્ટ્રક્ટર પર કૉલ કરવું જોઈએ +@msg Unknown command {id} અજાણ્યો કમાન્ડ {id} +@msg Unknown dimension mode અજાણ્યો પરિમાણ મોડ +@msg Unknown dimension option {k} અજાણ્યો પરિમાણ વિકલ્પ {k} +@msg Unknown dimension orientation અજાણ્યું પરિમાણ ઓરિએન્ટેશન +@msg VectorCraft doesn't search other apps' or the system's folders: {path} VectorCraft અન્ય ઍપ્સના અથવા સિસ્ટમના ફોલ્ડર્સમાં શોધતું નથી: {path} +@msg VectorCraft doesn't search the Shared or Public folder in Users: {path} VectorCraft Users માંના Shared અથવા Public ફોલ્ડરમાં શોધતું નથી: {path} +@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} VectorCraft સ્વેચ એક્સચેન્જ ફાઇલમાંથી વધુમાં વધુ {ASE_MAX_ENTRIES} રંગો અને ગ્રૂપ વાંચે છે, અને આ લાઇબ્રેરીમાં {entries} છે +@msg VectorCraft's Fonts folder isn't set here: the desktop app and vectorcraft-cli set it VectorCraft નું Fonts ફોલ્ડર અહીં સેટ નથી: ડેસ્કટૉપ ઍપ અને vectorcraft-cli તેને સેટ કરે છે +@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless WebP એન્કોડિંગ નિષ્ફળ: lossy WebP માટે છબી ખૂબ મોટી છે: રિઝોલ્યુશન ઘટાડો અથવા લોસલેસ પસંદ કરો +@msg WebP encoding failed: {e} WebP એન્કોડિંગ નિષ્ફળ: {e} +@msg Weed Box and Lines: no weeding line fits outside the art, and the weed box is off વીડ બોક્સ અને રેખાઓ: આર્ટની બહાર કોઈ વીડિંગ રેખા બંધબેસતી નથી, અને વીડ બોક્સ બંધ છે +@msg You must choose a side pattern. તમારે બાજુની પેટર્ન પસંદ કરવી જ જોઈએ. +@msg [x, y] (two numbers) [x, y] (બે સંખ્યાઓ) +@msg [{j}] `{_1}`: {why} [{j}] `{_1}`: {why} +@msg \\ at end of pattern પેટર્નના અંતે \\ છે +@msg `Custom` stands for changed settings: save the preset under another name `Custom` બદલાયેલાં સેટિંગ્સ માટે વપરાય છે: પ્રીસેટને બીજા નામે સાચવો +@msg `Face` and `Edge` name the faces and edges of a Live Paint group: give the path another name `Face` અને `Edge` લાઇવ પેઇન્ટ ગ્રુપના ફેસ અને એજનાં નામ છે: પાથને બીજું નામ આપો +@msg `__category` takes text `__category` ટેક્સ્ટ લે છે +@msg `__doc` must be a document id `__doc` દસ્તાવેજ id હોવું જોઈએ +@msg `__search` takes text `__search` ટેક્સ્ટ લે છે +@msg `a` and `b` must be two different paths `a` અને `b` બે અલગ પાથ હોવા જોઈએ +@msg `action` must be confirm or cancel `action` confirm અથવા cancel હોવું જોઈએ +@msg `action` must be one of {_1} `action` {_1} માંથી એક હોવું જોઈએ +@msg `actions` has more than {MAX_ALL_STEPS} steps in all `actions` માં કુલ {MAX_ALL_STEPS} થી વધુ પગલાં છે +@msg `actions` holds more than {MAX_ACTIONS} actions `actions` માં {MAX_ACTIONS} થી વધુ ક્રિયાઓ છે +@msg `actions` is larger than 16 MiB `actions` 16 MiB થી મોટું છે +@msg `actions` must be a list `actions` યાદી હોવી જોઈએ +@msg `actions{place}` is nested more than 64 levels deep `actions{place}` 64 થી વધુ સ્તર ઊંડે નેસ્ટેડ છે +@msg `alignOn` cannot be empty `alignOn` ખાલી ન હોઈ શકે +@msg `alignOn` must be a string `alignOn` સ્ટ્રિંગ હોવી જોઈએ +@msg `align` is start, center or end `align` start, center અથવા end છે +@msg `align` must be "left", "center" or "right", not {other} `align` "left", "center" અથવા "right" હોવું જોઈએ, {other} નહીં +@msg `align` must be a string `align` સ્ટ્રિંગ હોવી જોઈએ +@msg `all` must be true `all` true હોવું જોઈએ +@msg `amount` must be from 0 to 1 `amount` 0 થી 1 સુધી હોવું જોઈએ +@msg `anchor` must be a [subpath, anchor] pair `anchor` [subpath, anchor] જોડી હોવી જોઈએ +@msg `anchor` needs `id`, the path the point is on `anchor` ને `id` જોઈએ, એટલે કે જે પાથ પર બિંદુ છે તે +@msg `anchors` must be an array of [subpath, anchor] pairs `anchors` [subpath, anchor] જોડીઓનો એરે હોવો જોઈએ +@msg `anchors` must list anchor indices (0, 1, 2…), not {k} `anchors` માં એન્કર ઇન્ડેક્સ (0, 1, 2…) હોવા જોઈએ, {k} નહીં +@msg `anchors` must list anchor indices (0, 1, 2…), not {v} `anchors` માં એન્કર ઇન્ડેક્સ (0, 1, 2…) હોવા જોઈએ, {v} નહીં +@msg `angle` cannot be {angle}: ±90 and ±270 degrees have no shear `angle` {angle} ન હોઈ શકે: ±90 અને ±270 ડિગ્રીએ કોઈ શિયર થતું નથી +@msg `angle` must be a number `angle` સંખ્યા હોવી જોઈએ +@msg `angle` must be from -180 to 180 degrees `angle` -180 થી 180 ડિગ્રી સુધી હોવો જોઈએ +@msg `angle` must be from -359 to 359 degrees, not {angle} `angle` -359 થી 359 ડિગ્રી સુધી હોવો જોઈએ, {angle} નહીં +@msg `answer` for a script's file dialog must be one of: once, always, deny, stop સ્ક્રિપ્ટના ફાઇલ ડાયલોગ માટે `answer` આમાંથી એક હોવો જોઈએ: once, always, deny, stop +@msg `answer` for the print question must be one of: print, cancel પ્રિન્ટના પ્રશ્ન માટે `answer` આમાંથી એક હોવો જોઈએ: print, cancel +@msg `answer` for this {_1} dialog must be one of: {_2} આ {_1} ડાયલોગ માટે `answer` આમાંથી એક હોવો જોઈએ: {_2} +@msg `answer` for this {kind} dialog must be one of: {_1} આ {kind} ડાયલોગ માટે `answer` આમાંથી એક હોવો જોઈએ: {_1} +@msg `answers[{i}]` {e} `answers[{i}]` {e} +@msg `answers` has more than {MAX_ANSWERS} answers `answers` માં {MAX_ANSWERS} થી વધુ જવાબો છે +@msg `answers` is larger than 1 MiB `answers` 1 MiB થી મોટું છે +@msg `answers` is only for a run with nobody to ask: in the app, the person answers each dialog `answers` ફક્ત એવા રન માટે છે જેમાં પૂછવા માટે કોઈ નથી: ઍપમાં, વ્યક્તિ દરેક ડાયલોગનો જવાબ આપે છે +@msg `answers` must be a list of answers `answers` જવાબોની યાદી હોવી જોઈએ +@msg `antiAlias` must be "none", "sharp", "crisp" or "strong" `antiAlias` "none", "sharp", "crisp" અથવા "strong" હોવું જોઈએ +@msg `api` is {_1}; this host implements plug-in API levels 1 to {API_LEVEL} `api` {_1} છે; આ હોસ્ટ પ્લગ-ઇન API સ્તર 1 થી {API_LEVEL} સુધી અમલમાં મૂકે છે +@msg `appearanceOutput` is only for a live effect that declares `paintOutput`, at `api` 3 `appearanceOutput` ફક્ત `api` 3 પર `paintOutput` જાહેર કરતી લાઇવ ઇફેક્ટ માટે છે +@msg `appearanceOutput` may only be true `appearanceOutput` ફક્ત true હોઈ શકે +@msg `args` is larger than 1 MiB `args` 1 MiB થી મોટું છે +@msg `args` must be an object `args` ઑબ્જેક્ટ હોવો જોઈએ +@msg `args{place}` is nested more than 64 levels deep `args{place}` 64 થી વધુ સ્તર ઊંડે નેસ્ટેડ છે +@msg `artboard` must be a whole number `artboard` પૂર્ણ સંખ્યા હોવી જોઈએ +@msg `artboard` must be an artboard's index `artboard` આર્ટબોર્ડનો ઇન્ડેક્સ હોવો જોઈએ +@msg `artboard` must be the index of an artboard of the document `artboard` દસ્તાવેજના કોઈ આર્ટબોર્ડનો ઇન્ડેક્સ હોવો જોઈએ +@msg `artboardsAt` must be [x, y] `artboardsAt` [x, y] હોવું જોઈએ +@msg `artboards` must be a list of artboard indices `artboards` આર્ટબોર્ડ ઇન્ડેક્સની યાદી હોવી જોઈએ +@msg `artboards` must contain whole numbers `artboards` માં પૂર્ણ સંખ્યાઓ હોવી જોઈએ +@msg `artboards` names an artboard the document does not have `artboards` માં એવું આર્ટબોર્ડ છે જે દસ્તાવેજમાં નથી +@msg `artboards` names an artboard twice `artboards` માં એક આર્ટબોર્ડ બે વાર છે +@msg `artboards`: all or a range such as 1, 3-5, not {v} `artboards`: all અથવા 1, 3-5 જેવી શ્રેણી, {v} નહીં +@msg `aspect` must be a number (%) `aspect` સંખ્યા (%) હોવી જોઈએ +@msg `aspect` must be from 0.01 to 100 `aspect` 0.01 થી 100 સુધી હોવું જોઈએ +@msg `aspect` needs objects to place the gradient on: give ids or select objects `aspect` ને ગ્રેડિયન્ટ મૂકવા માટે ઑબ્જેક્ટ જોઈએ: ids આપો અથવા ઑબ્જેક્ટ પસંદ કરો +@msg `asset` is the asset id (see assets.list) `asset` એસેટ id છે (assets.list જુઓ) +@msg `at` must be 0 or a larger whole number (got {v}) `at` 0 અથવા તેથી મોટી પૂર્ણ સંખ્યા હોવી જોઈએ (મળ્યું {v}) +@msg `at` must be [x, y] `at` [x, y] હોવું જોઈએ +@msg `at` must be [x, y] (got {at}) `at` [x, y] હોવું જોઈએ (મળ્યું {at}) +@msg `at` must be a byte offset `at` બાઇટ ઑફસેટ હોવો જોઈએ +@msg `at` must be a point [x, y] `at` બિંદુ [x, y] હોવું જોઈએ +@msg `at` must be a point: [x, y] `at` બિંદુ હોવું જોઈએ: [x, y] +@msg `at` must be a whole number from 0 to {_1} (got {n}) `at` 0 થી {_1} સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ (મળ્યું {n}) +@msg `attributes` must be an object, not {v} `attributes` ઑબ્જેક્ટ હોવો જોઈએ, {v} નહીં +@msg `autoLeading` must be a number `autoLeading` સંખ્યા હોવી જોઈએ +@msg `axes` must be [a, b, c, d], each from -1000 to 1000, with a·d - b·c at least 0.001 from 0 `axes` [a, b, c, d] હોવું જોઈએ, દરેક -1000 થી 1000 સુધી, અને a·d - b·c ઓછામાં ઓછું 0.001 જેટલું 0 થી દૂર +@msg `background` must be "", "matte" or #rrggbb `background` "", "matte" અથવા #rrggbb હોવું જોઈએ +@msg `background` must be edges, corners or colors `background` edges, corners અથવા colors હોવું જોઈએ +@msg `baseAlong` must be one of x, y `baseAlong` x, y માંથી એક હોવું જોઈએ +@msg `base` is empty `base` ખાલી છે +@msg `base` is in no panel `base` કોઈ પેનલમાં નથી +@msg `base` must be a point: [x, y] `base` બિંદુ હોવું જોઈએ: [x, y] +@msg `base` must be a point: [x, y], or null `base` બિંદુ હોવું જોઈએ: [x, y], અથવા null +@msg `beside` needs `side` `beside` ને `side` જોઈએ +@msg `burasagari` must be "none", "standard" or "forced" `burasagari` "none", "standard" અથવા "forced" હોવું જોઈએ +@msg `by` must be lines, paragraphs, words or glyphs, not {other} `by` lines, paragraphs, words અથવા glyphs હોવું જોઈએ, {other} નહીં +@msg `cap` must be "butt", "round" or "square" `cap` "butt", "round" અથવા "square" હોવું જોઈએ +@msg `center` must be [x, y] `center` [x, y] હોવું જોઈએ +@msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` `center` સંખ્યાઓની [x, y] જોડી હોવી જોઈએ, અને `points` માં એક [x, y] જોડી હોવી જોઈએ +@msg `centerline` applies to the tangent lines: leave it out with `curved` `centerline` સ્પર્શરેખાઓને લાગુ પડે છે: `curved` સાથે તેને છોડી દો +@msg `channel` must be hue, saturation, brightness, red, green or blue `channel` hue, saturation, brightness, red, green અથવા blue હોવું જોઈએ +@msg `channel` must be one of {_1} `channel` {_1} માંથી એક હોવું જોઈએ +@msg `charAlign` must be "romanBaseline", "emBoxTop", "emBoxCenter", "emBoxBottom", "icfTop" or "icfBottom" `charAlign` "romanBaseline", "emBoxTop", "emBoxCenter", "emBoxBottom", "icfTop" અથવા "icfBottom" હોવું જોઈએ +@msg `charDirection` must be "default", "leftToRight" or "rightToLeft" `charDirection` "default", "leftToRight" અથવા "rightToLeft" હોવું જોઈએ +@msg `circle` is past the last circle found ({found}) `circle` મળેલા છેલ્લા વર્તુળ ({found}) પછીનું છે +@msg `circle` must be from 0 to 64 `circle` 0 થી 64 સુધી હોવું જોઈએ +@msg `clearStroke` requires `stroke: false`, `ids: []` and no `stop` `clearStroke` માટે `stroke: false`, `ids: []` અને કોઈ `stop` નહીં, એ જરૂરી છે +@msg `clear` must be a list of type object ids, not {v} `clear` ટાઇપ ઑબ્જેક્ટ ids ની યાદી હોવી જોઈએ, {v} નહીં +@msg `clear` must list type objects; {_1} is not one `clear` માં ટાઇપ ઑબ્જેક્ટ હોવા જોઈએ; {_1} ટાઇપ ઑબ્જેક્ટ નથી +@msg `clear` must not list `id` `clear` માં `id` ન હોવું જોઈએ +@msg `code` must be a whole number `code` પૂર્ણ સંખ્યા હોવી જોઈએ +@msg `colorGroup` needs `library: "document"` `colorGroup` ને `library: "document"` જોઈએ +@msg `colorGroup` needs `mode: "color"` `colorGroup` ને `mode: "color"` જોઈએ +@msg `colorGroup` needs `palette: "documentLibrary"` `colorGroup` ને `palette: "documentLibrary"` જોઈએ +@msg `colorMode` must be one of rgb, cmyk `colorMode` rgb, cmyk માંથી એક હોવું જોઈએ +@msg `color` is not a colour `color` રંગ નથી +@msg `color` must be a #rrggbb color, [r, g, b] from 0 to 1 or a color object `color` #rrggbb રંગ, 0 થી 1 સુધીના [r, g, b] અથવા રંગ ઑબ્જેક્ટ હોવો જોઈએ +@msg `color` must be a colour `color` રંગ હોવો જોઈએ +@msg `color` needs a `rule` to make the theme from `color` ને થીમ બનાવવા માટે `rule` જોઈએ +@msg `colors` does not apply to the {name} reduction `colors` {name} રિડક્શનને લાગુ પડતું નથી +@msg `colors` is empty `colors` ખાલી છે +@msg `colors` must be a count of at least 1 `colors` ઓછામાં ઓછી 1 ની ગણતરી હોવી જોઈએ +@msg `colors` must be a whole number from 2 to 256 `colors` 2 થી 256 સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg `colors` must be an array of colors, not {v} `colors` રંગોનો એરે હોવો જોઈએ, {v} નહીં +@msg `colors` must be at least 9 for the uniform reduction uniform રિડક્શન માટે `colors` ઓછામાં ઓછું 9 હોવું જોઈએ +@msg `colors` must be between 1 and {MAX_THEME_COLORS} (got {n}) `colors` 1 અને {MAX_THEME_COLORS} ની વચ્ચે હોવું જોઈએ (મળ્યું {n}) +@msg `colors` must list 1 to 16 colors, each hex (#rrggbb or #rgb) or black, white, red, green or blue `colors` માં 1 થી 16 રંગ હોવા જોઈએ, દરેક hex (#rrggbb અથવા #rgb) અથવા black, white, red, green અથવા blue +@msg `columnType` is vertical, uniform, repeating or sliding `columnType` vertical, uniform, repeating અથવા sliding છે +@msg `columns` must be a whole number 1..50 `columns` 1..50 ની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg `commandAllowlist` names `{shown}`, which is not a command id or is listed twice `commandAllowlist` માં `{shown}` છે, જે કમાન્ડ id નથી અથવા બે વાર છે +@msg `commandAllowlist` needs the permission `commands`, and `commands` needs a `commandAllowlist` `commandAllowlist` ને `commands` પરવાનગી જોઈએ, અને `commands` ને `commandAllowlist` જોઈએ +@msg `command` must be a command whose menu item opens a dialog (see ui.menuDialog) `command` એવો કમાન્ડ હોવો જોઈએ જેની મેનુ આઇટમ ડાયલોગ ખોલે (ui.menuDialog જુઓ) +@msg `commands` must not be empty `commands` ખાલી ન હોવું જોઈએ +@msg `constrainPie` needs one of `pieStart` and `pieEnd`, without `invertPie` `constrainPie` ને `invertPie` વિના `pieStart` અને `pieEnd` માંથી એક જોઈએ +@msg `contents` goes with `to` `contents` ફક્ત `to` સાથે વપરાય છે +@msg `context` is for a filter, or a live effect with `commands`, at `api` 3 or later with the permission `doc.read` `context` ફિલ્ટર માટે, અથવા `commands` વાળી લાઇવ ઇફેક્ટ માટે છે, `api` 3 કે પછીના પર `doc.read` પરવાનગી સાથે +@msg `context` must list distinct sections: settings, artboards, layers or swatches `context` માં અલગ-અલગ વિભાગો હોવા જોઈએ: settings, artboards, layers અથવા swatches +@msg `control` must be a control's index, name or text `control` કંટ્રોલનો ઇન્ડેક્સ, નામ અથવા ટેક્સ્ટ હોવો જોઈએ +@msg `corners` must be an array of anchor indices, not {v} `corners` એન્કર ઇન્ડેક્સનો એરે હોવો જોઈએ, {v} નહીં +@msg `corners` must be four [x, y] pairs of numbers `corners` સંખ્યાઓની ચાર [x, y] જોડીઓ હોવી જોઈએ +@msg `corners` must be sharp, round or square, not `{other}` `corners` sharp, round અથવા square હોવું જોઈએ, `{other}` નહીં +@msg `corners` must list anchor indices (0, 1, 2…), not {v} `corners` માં એન્કર ઇન્ડેક્સ (0, 1, 2…) હોવા જોઈએ, {v} નહીં +@msg `count` must be a whole number from 0 to {MAX_COUNT} `count` 0 થી {MAX_COUNT} સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg `count` must be a whole number from 1 to 100 `count` 1 થી 100 સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg `count` must be a whole number from 1 to {MAX_BRIDGES_PER_ISLAND} `count` 1 થી {MAX_BRIDGES_PER_ISLAND} સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg `curved` joins the circles along their external tangents: give `tangents` "external" or leave it out `curved` વર્તુળોને તેમની બાહ્ય સ્પર્શરેખાઓ પર જોડે છે: `tangents` ને "external" આપો અથવા તેને છોડી દો +@msg `cutId` must be an object id `cutId` ઑબ્જેક્ટ id હોવું જોઈએ +@msg `cutId` must be part of the selection `cutId` પસંદગીનો ભાગ હોવો જોઈએ +@msg `dataBase64` is larger than the module limit `dataBase64` મોડ્યુલ મર્યાદા કરતાં મોટું છે +@msg `dataBase64` is not valid base64 `dataBase64` માન્ય base64 નથી +@msg `datasetFileNaming` must be `fileNumber`, `fileDataSetName` or `dataSetName` `datasetFileNaming` `fileNumber`, `fileDataSetName` અથવા `dataSetName` હોવું જોઈએ +@msg `defaultsOnly` cannot be combined with `brush` `defaultsOnly` ને `brush` સાથે જોડી શકાતું નથી +@msg `defaultsOnly` cannot be combined with `ids`, `id` or `item` `defaultsOnly` ને `ids`, `id` અથવા `item` સાથે જોડી શકાતું નથી +@msg `defaultsOnly` cannot be combined with `ids`, `reverse` or `append` `defaultsOnly` ને `ids`, `reverse` અથવા `append` સાથે જોડી શકાતું નથી +@msg `depth` and `childLimit` slice the summary: pass `summary: true` `depth` અને `childLimit` સારાંશને કાપે છે: `summary: true` આપો +@msg `design` is a design name, or null for plain columns `design` ડિઝાઇનનું નામ છે, અથવા સાદા કૉલમ માટે null +@msg `design` is a design name, or null for the default marker `design` ડિઝાઇનનું નામ છે, અથવા ડિફૉલ્ટ માર્કર માટે null +@msg `destinationFolder` is required when destination is `folder` destination `folder` હોય ત્યારે `destinationFolder` જરૂરી છે +@msg `destination` must be `none`, `saveAndClose` or `folder` `destination` `none`, `saveAndClose` અથવા `folder` હોવું જોઈએ +@msg `diameter` must be from 0.1 to 2500 pt `diameter` 0.1 થી 2500 pt સુધી હોવો જોઈએ +@msg `diameter` must be from 0.25 to 200 pt `diameter` 0.25 થી 200 pt સુધી હોવો જોઈએ +@msg `digits` must be from 1 to {MAX_DIGITS} `digits` 1 થી {MAX_DIGITS} સુધી હોવું જોઈએ +@msg `digits` must be one of {_1} `digits` {_1} માંથી એક હોવું જોઈએ +@msg `dimImages` is a percentage or false `dimImages` ટકાવારી અથવા false છે +@msg `direction` must be "auto", "leftToRight" or "rightToLeft" `direction` "auto", "leftToRight" અથવા "rightToLeft" હોવું જોઈએ +@msg `direction` must be row or column `direction` row અથવા column હોવું જોઈએ +@msg `ditherAmount` must be a number from 0 to 100 `ditherAmount` 0 થી 100 સુધીની સંખ્યા હોવી જોઈએ +@msg `dither` applies to gradient fills `dither` ગ્રેડિયન્ટ ફિલને લાગુ પડે છે +@msg `dither` applies to gradient fills (paint.setFill) `dither` ગ્રેડિયન્ટ ફિલને લાગુ પડે છે (paint.setFill) +@msg `dither` applies to gradient fills (stroke: false) `dither` ગ્રેડિયન્ટ ફિલને લાગુ પડે છે (stroke: false) +@msg `dither` must be true or false `dither` true અથવા false હોવું જોઈએ +@msg `documentData` is {size} bytes (limit {MAX_DOCUMENT_DATA}) `documentData` {size} બાઇટ છે (મર્યાદા {MAX_DOCUMENT_DATA}) +@msg `each` is the value one design stands for, more than 0 `each` એક ડિઝાઇન જે મૂલ્ય દર્શાવે છે તે છે, 0 થી વધુ +@msg `effects` must be an array of at most {MAX_LOOK_EFFECTS} records `effects` વધુમાં વધુ {MAX_LOOK_EFFECTS} રેકોર્ડનો એરે હોવો જોઈએ +@msg `end` must be "start" or "end" `end` "start" અથવા "end" હોવું જોઈએ +@msg `ends` applies to joining exactly two paths `ends` બરાબર બે પાથ જોડવાને લાગુ પડે છે +@msg `event` must be click, change or close `event` click, change અથવા close હોવું જોઈએ +@msg `event` must be one of {_1} `event` {_1} માંથી એક હોવું જોઈએ +@msg `every` must be "all", "odd" or "even", not {v} `every` "all", "odd" અથવા "even" હોવું જોઈએ, {v} નહીં +@msg `expand` must be true or false `expand` true અથવા false હોવું જોઈએ +@msg `exportPreset` is the name of a preset of document.exportPresets.list `exportPreset` document.exportPresets.list ના પ્રીસેટનું નામ છે +@msg `family` is required `family` જરૂરી છે +@msg `family` must be a string `family` સ્ટ્રિંગ હોવી જોઈએ +@msg `fidelity` must be from 0.01 to 100 pt `fidelity` 0.01 થી 100 pt સુધી હોવું જોઈએ +@msg `fidelity` must be from {lo} to {hi} pt `fidelity` {lo} થી {hi} pt સુધી હોવું જોઈએ +@msg `field` is not a string `field` સ્ટ્રિંગ નથી +@msg `fields` holds {_1} items; at most {MAX_DIALOG_FIELDS} `fields` માં {_1} આઇટમ છે; વધુમાં વધુ {MAX_DIALOG_FIELDS} +@msg `fields` is not a list `fields` યાદી નથી +@msg `fields` takes the place of `field` and `value` `fields` એ `field` અને `value` ની જગ્યા લે છે +@msg `file` must be a file plugin.list's failed names `file` એ plugin.list ના નિષ્ફળ નામોમાંની કોઈ ફાઇલ હોવી જોઈએ +@msg `files` must be 1 to 1000 paths of font files the last text.findFontFiles search found `files` છેલ્લી text.findFontFiles શોધમાં મળેલી ફોન્ટ ફાઇલોના 1 થી 1000 પાથ હોવા જોઈએ +@msg `fillRule` must be "nonzero" or "evenodd" `fillRule` "nonzero" અથવા "evenodd" હોવું જોઈએ +@msg `fingerprint` must be "v1:" and 16 lowercase hex digits `fingerprint` "v1:" અને 16 નાના અક્ષરના hex અંકો હોવા જોઈએ +@msg `first` and `last` must be numbers of lines the console holds, first before last `first` અને `last` કન્સોલમાં રહેલી લાઇનોના નંબર હોવા જોઈએ, first એ last પહેલાં +@msg `focal` and `radius` cannot be used together `focal` અને `radius` એકસાથે વાપરી શકાતા નથી +@msg `focal` applies to radial gradients `focal` રેડિયલ ગ્રેડિયન્ટને લાગુ પડે છે +@msg `focal` must be an array of [subpath, anchor] pairs `focal` [subpath, anchor] જોડીઓનો એરે હોવો જોઈએ +@msg `focal` names [{si}, {ai}], which is not an anchor of the path `focal` [{si}, {ai}] દર્શાવે છે, જે પાથનું એન્કર નથી +@msg `folder` must be an absolute folder path `folder` સંપૂર્ણ (absolute) ફોલ્ડર પાથ હોવો જોઈએ +@msg `follow` must be "average", "a" or "b" `follow` "average", "a" અથવા "b" હોવું જોઈએ +@msg `fontAxes` must be an object of axis tags and values, such as {{"wght": 650}} `fontAxes` એક્સિસ ટૅગ અને મૂલ્યોનો ઑબ્જેક્ટ હોવો જોઈએ, જેમ કે {{"wght": 650}} +@msg `fontHeightReference` must be "emBox", "capHeight", "xHeight" or "icfBox" `fontHeightReference` "emBox", "capHeight", "xHeight" અથવા "icfBox" હોવું જોઈએ +@msg `format` must be a string `format` સ્ટ્રિંગ હોવી જોઈએ +@msg `format` must be one of {_1} `format` {_1} માંથી એક હોવું જોઈએ +@msg `fractions` is chop or scale `fractions` chop અથવા scale છે +@msg `freeform.lines` must be an array `freeform.lines` એરે હોવો જોઈએ +@msg `freeform.points` must be an array `freeform.points` એરે હોવો જોઈએ +@msg `from.byte` is past the end of {id}'s text `from.byte` {id} ના ટેક્સ્ટના અંતથી આગળ છે +@msg `from.byte` must be a whole number `from.byte` પૂર્ણ સંખ્યા હોવી જોઈએ +@msg `from.id` must be a type object's id `from.id` ટાઇપ ઑબ્જેક્ટનું id હોવું જોઈએ +@msg `from.id` {id} is not a type object `from.id` {id} ટાઇપ ઑબ્જેક્ટ નથી +@msg `from.id` {id} is not one of the type objects checked `from.id` {id} તપાસેલા ટાઇપ ઑબ્જેક્ટમાંનો એક નથી +@msg `from` and `to` must differ `from` અને `to` અલગ હોવા જોઈએ +@msg `from` has an empty frame `from` ની ફ્રેમ ખાલી છે +@msg `from` must be a graphic style name `from` ગ્રાફિક સ્ટાઇલનું નામ હોવું જોઈએ +@msg `from` must be a non-negative integer `from` બિન-ઋણ પૂર્ણાંક હોવો જોઈએ +@msg `from` must be area type or type on a path `from` એરિયા ટાઇપ અથવા પાથ પર ટાઇપ હોવું જોઈએ +@msg `from` must be {{id, byte}} `from` {{id, byte}} હોવું જોઈએ +@msg `from` takes id and byte, not `{k}` `from` id અને byte લે છે, `{k}` નહીં +@msg `gap` must be from 0 to 6 pt `gap` 0 થી 6 pt સુધી હોવો જોઈએ +@msg `gid` must be a glyph id, not {v} `gid` ગ્લિફ id હોવું જોઈએ, {v} નહીં +@msg `globalAdjust` must be an object `globalAdjust` ઑબ્જેક્ટ હોવો જોઈએ +@msg `glyphAlternate` belongs to one character, not to a character style (text.setGlyphAlternate sets it) `glyphAlternate` એક અક્ષરનું હોય છે, અક્ષર સ્ટાઇલનું નહીં (text.setGlyphAlternate તેને સેટ કરે છે) +@msg `glyphAlternate` takes only null, which takes a glyph choice away (text.setGlyphAlternate makes one) `glyphAlternate` ફક્ત null લે છે, જે ગ્લિફ પસંદગી દૂર કરે છે (text.setGlyphAlternate પસંદગી બનાવે છે) +@msg `glyphForm` must be one of {_1} `glyphForm` {_1} માંથી એક હોવું જોઈએ +@msg `gradient` must be an object `gradient` ઑબ્જેક્ટ હોવો જોઈએ +@msg `grant` and `allowHeavy` take effect only in a session started with --allow-plugin-grants: approve the plug-in in the desktop app `grant` અને `allowHeavy` ફક્ત --allow-plugin-grants સાથે શરૂ થયેલા સત્રમાં અસર કરે છે: ડેસ્કટૉપ ઍપમાં પ્લગ-ઇનને મંજૂરી આપો +@msg `grant` must be a list of permission names `grant` પરવાનગી નામોની યાદી હોવી જોઈએ +@msg `grant` names an unknown permission `{shown}` `grant` માં અજાણી પરવાનગી `{shown}` છે +@msg `groupColors` must be an array `groupColors` એરે હોવો જોઈએ +@msg `group` does not apply to a preset `group` પ્રીસેટને લાગુ પડતું નથી +@msg `group` must be a color group name, not {v} `group` રંગ ગ્રુપનું નામ હોવું જોઈએ, {v} નહીં +@msg `group` must be a colour group name `group` રંગ ગ્રુપનું નામ હોવું જોઈએ +@msg `group` must be one of {_1} `group` {_1} માંથી એક હોવું જોઈએ +@msg `group` must be the Objects on Path group of `member` and `target` `group` એ `member` અને `target` નું પાથ પરના ઑબ્જેક્ટ ગ્રુપ હોવું જોઈએ +@msg `guideLabel` is null, a layer color's name or #rrggbb `guideLabel` null, લેયર રંગનું નામ અથવા #rrggbb છે +@msg `guide` must be a guide index (guide.list) `guide` ગાઇડ ઇન્ડેક્સ હોવો જોઈએ (guide.list) +@msg `hAlign` must be default, left, center or right `hAlign` default, left, center અથવા right હોવું જોઈએ +@msg `handles` is empty `handles` ખાલી છે +@msg `handles` must be an array `handles` એરે હોવો જોઈએ +@msg `helpUrl` must be an https:// address of at most {MAX_HELP_URL} bytes `helpUrl` વધુમાં વધુ {MAX_HELP_URL} બાઇટનું https:// સરનામું હોવું જોઈએ +@msg `help` must be 1-{MAX_HELP} printable characters `help` 1-{MAX_HELP} છાપી શકાય તેવા અક્ષરો હોવા જોઈએ +@msg `id` is an object id, not {v} `id` ઑબ્જેક્ટ id છે, {v} નહીં +@msg `id` is not a path `id` પાથ નથી +@msg `id` is the step reference {r}, which only `run` and `command_batch` resolve `id` સ્ટેપ રેફરન્સ {r} છે, જેને ફક્ત `run` અને `command_batch` ઉકેલે છે +@msg `id` must be a node id `id` નોડ id હોવું જોઈએ +@msg `id` must be an effect id of 1-{MAX_EFFECT_ID} bytes `id` 1-{MAX_EFFECT_ID} બાઇટનું ઇફેક્ટ id હોવું જોઈએ +@msg `id` must be an object id `id` ઑબ્જેક્ટ id હોવું જોઈએ +@msg `id` must be an object id, not {v} `id` ઑબ્જેક્ટ id હોવું જોઈએ, {v} નહીં +@msg `id` must be area type or type on a path `id` એરિયા ટાઇપ અથવા પાથ પર ટાઇપ હોવું જોઈએ +@msg `id` must be the id of an input object `id` ઇનપુટ ઑબ્જેક્ટનું id હોવું જોઈએ +@msg `ids` must be an array of object ids, not {v} `ids` ઑબ્જેક્ટ ids નો એરે હોવો જોઈએ, {v} નહીં +@msg `ids` must name Objects on Path groups or objects in them `ids` માં પાથ પરના ઑબ્જેક્ટ ગ્રુપ અથવા તેમાંના ઑબ્જેક્ટ હોવા જોઈએ +@msg `ids` names an object twice `ids` માં એક ઑબ્જેક્ટ બે વાર છે +@msg `ids` takes at most {MAX_INSPECT_IDS} ids `ids` વધુમાં વધુ {MAX_INSPECT_IDS} ids લે છે +@msg `imageMap` must be none, rectangle or polygon `imageMap` none, rectangle અથવા polygon હોવું જોઈએ +@msg `importer` must be a plug-in format id (see document.formats) `importer` પ્લગ-ઇન ફોર્મેટ id હોવું જોઈએ (document.formats જુઓ) +@msg `includeArtboardFill` must be true or false `includeArtboardFill` true અથવા false હોવું જોઈએ +@msg `includeSubdirs` must be true or false `includeSubdirs` true અથવા false હોવું જોઈએ +@msg `independent` and `symmetric` cannot both be true `independent` અને `symmetric` બંને true ન હોઈ શકે +@msg `index` and `outIndex` must be the two halves of one discontinuous width point `index` અને `outIndex` એક અસતત પહોળાઈ બિંદુના બે અડધા ભાગ હોવા જોઈએ +@msg `index` must be a point index `index` બિંદુ ઇન્ડેક્સ હોવો જોઈએ +@msg `index` must be a whole number `index` પૂર્ણ સંખ્યા હોવી જોઈએ +@msg `index` must be a whole number or null `index` પૂર્ણ સંખ્યા અથવા null હોવું જોઈએ +@msg `index` must be the index of an applied SVG filter `index` લાગુ કરેલા SVG ફિલ્ટરનો ઇન્ડેક્સ હોવો જોઈએ +@msg `indices` must be a non-empty array of item indices `indices` આઇટમ ઇન્ડેક્સનો ખાલી ન હોય તેવો એરે હોવો જોઈએ +@msg `inputs` lists `{shown}` twice `inputs` માં `{shown}` બે વાર છે +@msg `inputs` names an unknown object kind `{shown}`: use type, image or symbolInstance `inputs` માં અજાણ્યો ઑબ્જેક્ટ પ્રકાર `{shown}` છે: type, image અથવા symbolInstance વાપરો +@msg `inputs` needs `api` 2 or later `inputs` ને `api` 2 કે પછીનું જોઈએ +@msg `inputs` needs the permission `doc.read` `inputs` ને `doc.read` પરવાનગી જોઈએ +@msg `inside` must be #rrggbb, the name of a swatch with a plain color, or empty for white, not {v} `inside` #rrggbb, સાદા રંગવાળા સ્વેચનું નામ, અથવા સફેદ માટે ખાલી હોવું જોઈએ, {v} નહીં +@msg `installed` must be true, false or null `installed` true, false અથવા null હોવું જોઈએ +@msg `installed` takes a `path`, not a `source` `installed` `path` લે છે, `source` નહીં +@msg `item` needs `index` `item` ને `index` જોઈએ +@msg `items` is a list of {{kind, item}} `items` {{kind, item}} ની યાદી છે +@msg `items` is empty `items` ખાલી છે +@msg `items` must be a list of {{id, anchors?}}, not {v} `items` {{id, anchors?}} ની યાદી હોવી જોઈએ, {v} નહીં +@msg `items` must be a list of {{id, points}} `items` {{id, points}} ની યાદી હોવી જોઈએ +@msg `items` must be an array of {{id, anchors}} `items` {{id, anchors}} નો એરે હોવો જોઈએ +@msg `items` must be an array of {{id, corners?}}, not {v} `items` {{id, corners?}} નો એરે હોવો જોઈએ, {v} નહીં +@msg `join` must be "miter", "round" or "bevel" `join` "miter", "round" અથવા "bevel" હોવું જોઈએ +@msg `join` must be true or false `join` true અથવા false હોવું જોઈએ +@msg `kashida` must be "none", "short", "medium", "long" or "stylistic" `kashida` "none", "short", "medium", "long" અથવા "stylistic" હોવું જોઈએ +@msg `keepArt` applies only to a new symbol `keepArt` ફક્ત નવા સિમ્બોલને લાગુ પડે છે +@msg `kerningBefore` belongs to a line's first character, not to a character style (text.setRangeStyle sets it) `kerningBefore` લાઇનના પહેલા અક્ષરનું હોય છે, અક્ષર સ્ટાઇલનું નહીં (text.setRangeStyle તેને સેટ કરે છે) +@msg `kind` is one of {_1} `kind` {_1} માંથી એક છે +@msg `kind` must be "line" or "paragraph", not {other} `kind` "line" અથવા "paragraph" હોવું જોઈએ, {other} નહીં +@msg `kind` must be "round", "invertedRound" or "chamfer", not {v} `kind` "round", "invertedRound" અથવા "chamfer" હોવું જોઈએ, {v} નહીં +@msg `kind` must be `text`, `visibility`, `image` or `graph` `kind` `text`, `visibility`, `image` અથવા `graph` હોવું જોઈએ +@msg `kind` must be a string `kind` સ્ટ્રિંગ હોવી જોઈએ +@msg `kind` must be image, noImage or htmlText `kind` image, noImage અથવા htmlText હોવું જોઈએ +@msg `kind` must be spotColors, colorEffects, rgbImages, cmykImages or grayImages `kind` spotColors, colorEffects, rgbImages, cmykImages અથવા grayImages હોવું જોઈએ +@msg `kinds` must be a list of issue kinds `kinds` સમસ્યા પ્રકારોની યાદી હોવી જોઈએ +@msg `kinsokuType` must be "pushInFirst", "pushOutFirst" or "pushOutOnly" `kinsokuType` "pushInFirst", "pushOutFirst" અથવા "pushOutOnly" હોવું જોઈએ +@msg `kinsoku_set` goes with `kinsoku` Hard: give `kinsoku` as `hard` or leave it out `kinsoku_set` ફક્ત `kinsoku` Hard સાથે વપરાય છે: `kinsoku` ને `hard` તરીકે આપો અથવા તેને છોડી દો +@msg `kinsoku_set` needs the name of one of the document's Kinsoku sets `kinsoku_set` ને દસ્તાવેજના Kinsoku સેટમાંથી એકનું નામ જોઈએ +@msg `kinsoku_set`: the document has no Kinsoku set named `{name}` `kinsoku_set`: દસ્તાવેજમાં `{name}` નામનો કોઈ Kinsoku સેટ નથી +@msg `kinsoku` must be "none", "hard", "soft" or the name of a Kinsoku set of the document (type.kinsokuSets.list) `kinsoku` "none", "hard", "soft" અથવા દસ્તાવેજના Kinsoku સેટનું નામ હોવું જોઈએ (type.kinsokuSets.list) +@msg `label` and `group` must be 1-{MAX_LABEL} printable characters `label` અને `group` 1-{MAX_LABEL} છાપી શકાય તેવા અક્ષરો હોવા જોઈએ +@msg `label` must be a non-empty name of at most 200 characters `label` વધુમાં વધુ 200 અક્ષરોનું, ખાલી ન હોય તેવું નામ હોવું જોઈએ +@msg `language` must be a language name or tag, such as "Turkish" or "tr" `language` ભાષાનું નામ અથવા ટૅગ હોવો જોઈએ, જેમ કે "Turkish" અથવા "tr" +@msg `leader` must be a string `leader` સ્ટ્રિંગ હોવી જોઈએ +@msg `leadingModel` must be "romanBaseline" or "emBoxTop" `leadingModel` "romanBaseline" અથવા "emBoxTop" હોવું જોઈએ +@msg `length` must be a number of at most 1000000 pt either way `length` બંને દિશામાં વધુમાં વધુ 1000000 pt ની સંખ્યા હોવી જોઈએ +@msg `level` must be a number from 0 to 100 `level` 0 થી 100 સુધીની સંખ્યા હોવી જોઈએ +@msg `level` must be from 0 to 100 `level` 0 થી 100 સુધી હોવું જોઈએ +@msg `level` must be one of {_1} `level` {_1} માંથી એક હોવું જોઈએ +@msg `library` is a library id or name (see {list}) `library` લાઇબ્રેરી id અથવા નામ છે ({list} જુઓ) +@msg `library` must be a library id or name `library` લાઇબ્રેરી id અથવા નામ હોવું જોઈએ +@msg `limit` must be a whole number from 1 to {MAX_SIMILAR} `limit` 1 થી {MAX_SIMILAR} સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg `lineWidth` must be a number, not {w} `lineWidth` સંખ્યા હોવી જોઈએ, {w} નહીં +@msg `lineWidth` must be from {min} to {max} pt, not {w} `lineWidth` {min} થી {max} pt સુધી હોવી જોઈએ, {w} નહીં +@msg `line` must be true or false `line` true અથવા false હોવું જોઈએ +@msg `linear` must be true or false `linear` true અથવા false હોવું જોઈએ +@msg `link` and `independent` cannot both be true `link` અને `independent` બંને true ન હોઈ શકે +@msg `link` and `symmetric` cannot both be true `link` અને `symmetric` બંને true ન હોઈ શકે +@msg `link` places a handle: give `handle` `link` હેન્ડલ મૂકે છે: `handle` આપો +@msg `locale` (a language tag like nl) is required `locale` (nl જેવો ભાષા ટૅગ) જરૂરી છે +@msg `margin` must be 0 or more `margin` 0 અથવા વધુ હોવું જોઈએ +@msg `match` must be distance or channels `match` distance અથવા channels હોવું જોઈએ +@msg `maxFuel` must be a whole number from 1 to {_1} `maxFuel` 1 થી {_1} સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg `maxLength` must be 1-{MAX_TEXT}, and the default no longer `maxLength` 1-{MAX_TEXT} હોવી જોઈએ, અને ડિફૉલ્ટ તેનાથી લાંબું નહીં +@msg `max` must be 1 to {MAX_SUGGESTIONS} `max` 1 થી {MAX_SUGGESTIONS} હોવું જોઈએ +@msg `max` must be 1 to {MAX_WORDS} `max` 1 થી {MAX_WORDS} હોવું જોઈએ +@msg `message` has {chars} characters; at most {MAX_CHARS} are allowed `message` માં {chars} અક્ષરો છે; વધુમાં વધુ {MAX_CHARS} માન્ય છે +@msg `message` is required `message` જરૂરી છે +@msg `message` must be a string `message` સ્ટ્રિંગ હોવી જોઈએ +@msg `message` must have a character other than whitespace `message` માં ખાલી જગ્યા સિવાયનો કોઈ અક્ષર હોવો જોઈએ +@msg `method` must be classic, perceptual, hue-clockwise or hue-counterclockwise `method` classic, perceptual, hue-clockwise અથવા hue-counterclockwise હોવું જોઈએ +@msg `method` must be userDefined, average or random, not {v} `method` userDefined, average અથવા random હોવું જોઈએ, {v} નહીં +@msg `minAnchors` and `maxAnchors` must be whole numbers `minAnchors` અને `maxAnchors` પૂર્ણ સંખ્યાઓ હોવી જોઈએ +@msg `minAngle` ({min_angle}°) can't be more than `maxAngle` ({max_angle}°) `minAngle` ({min_angle}°) `maxAngle` ({max_angle}°) કરતાં વધુ ન હોઈ શકે +@msg `minItems` and `maxItems` must be 0-{MAX_LIST}, `maxItems` at least 1, and the default that many `minItems` અને `maxItems` 0-{MAX_LIST} હોવા જોઈએ, `maxItems` ઓછામાં ઓછું 1, અને ડિફૉલ્ટમાં એટલી જ આઇટમ +@msg `min` and `max` go with scheme tint or gray `min` અને `max` ફક્ત scheme tint અથવા gray સાથે વપરાય છે +@msg `min` is greater than `max` `min` એ `max` કરતાં મોટું છે +@msg `mode` applies to freeform gradients `mode` ફ્રીફોર્મ ગ્રેડિયન્ટને લાગુ પડે છે +@msg `mode` must be "free", "keepAngles" or "symmetric" `mode` "free", "keepAngles" અથવા "symmetric" હોવું જોઈએ +@msg `mode` must be "handles", "straight" or "smooth" `mode` "handles", "straight" અથવા "smooth" હોવું જોઈએ +@msg `mode` must be "straight", "bezier" or "arc" `mode` "straight", "bezier" અથવા "arc" હોવું જોઈએ +@msg `mode` must be a blend mode, such as "multiply" or "screen" `mode` બ્લેન્ડ મોડ હોવો જોઈએ, જેમ કે "multiply" અથવા "screen" +@msg `mode` must be grayscale, rgb, hsb, cmyk or websafe `mode` grayscale, rgb, hsb, cmyk અથવા websafe હોવું જોઈએ +@msg `mode` must be one of {_1} `mode` {_1} માંથી એક હોવું જોઈએ +@msg `mojikumi` must be "none", "yakumonoHankaku", "gyomatsuYakumonoHankaku", "gyomatsuYakumonoZenkaku", "yakumonoZenkaku" or "lineEndHalf" `mojikumi` "none", "yakumonoHankaku", "gyomatsuYakumonoHankaku", "gyomatsuYakumonoZenkaku", "yakumonoZenkaku" અથવા "lineEndHalf" હોવું જોઈએ +@msg `name` can't hold path characters: `{name}` `name` માં પાથ અક્ષરો ન હોઈ શકે: `{name}` +@msg `name` is empty `name` ખાલી છે +@msg `name` is longer than {MAX_NAME} characters `name` {MAX_NAME} અક્ષરો કરતાં લાંબું છે +@msg `name` must be 1-64 printable characters `name` 1-64 છાપી શકાય તેવા અક્ષરો હોવા જોઈએ +@msg `name` must be a name `name` નામ હોવું જોઈએ +@msg `name` must be a name that is not empty `name` ખાલી ન હોય તેવું નામ હોવું જોઈએ +@msg `name` must be a string `name` સ્ટ્રિંગ હોવી જોઈએ +@msg `name` must be the name of a script engine `name` સ્ક્રિપ્ટ એન્જિનનું નામ હોવું જોઈએ +@msg `name` must not be empty `name` ખાલી ન હોવું જોઈએ +@msg `names` is a list of preset names `names` પ્રીસેટ નામોની યાદી છે +@msg `names` lists preset names `names` માં પ્રીસેટ નામો હોય છે +@msg `names` must be a list of names `names` નામોની યાદી હોવી જોઈએ +@msg `names` must be a list of swatch names `names` સ્વેચ નામોની યાદી હોવી જોઈએ +@msg `names` must be an array of preset names `names` પ્રીસેટ નામોનો એરે હોવો જોઈએ +@msg `names` must be an array of style names `names` સ્ટાઇલ નામોનો એરે હોવો જોઈએ +@msg `names` must hold preset names `names` માં પ્રીસેટ નામો હોવા જોઈએ +@msg `neighbor` must be area type or type on a path `neighbor` એરિયા ટાઇપ અથવા પાથ પર ટાઇપ હોવું જોઈએ +@msg `newName` is empty `newName` ખાલી છે +@msg `new` is a design name, or true `new` ડિઝાઇનનું નામ, અથવા true છે +@msg `notation` must be hex, hexAlpha, rgb, hsl, oklch or cmyk `notation` hex, hexAlpha, rgb, hsl, oklch અથવા cmyk હોવું જોઈએ +@msg `notice` must be a string with visible text `notice` દેખાતા ટેક્સ્ટવાળી સ્ટ્રિંગ હોવી જોઈએ +@msg `objects` must list object indexes in increasing order, each below {count} `objects` માં ઑબ્જેક્ટ ઇન્ડેક્સ વધતા ક્રમમાં હોવા જોઈએ, દરેક {count} થી ઓછો +@msg `offset` must be 0 or more `offset` 0 અથવા વધુ હોવું જોઈએ +@msg `opacity` must be a number `opacity` સંખ્યા હોવી જોઈએ +@msg `opacity` must be a number from 0 to 1 `opacity` 0 થી 1 સુધીની સંખ્યા હોવી જોઈએ +@msg `opacity` must be a number from 0 to 100 `opacity` 0 થી 100 સુધીની સંખ્યા હોવી જોઈએ +@msg `origin` must be [x, y] in points `origin` પોઇન્ટમાં [x, y] હોવું જોઈએ +@msg `outputKinds` lists `{shown}` twice `outputKinds` માં `{shown}` બે વાર છે +@msg `outputKinds` names an unknown kind `{shown}`: use type, image, layer or artboard `outputKinds` માં અજાણ્યો પ્રકાર `{shown}` છે: type, image, layer અથવા artboard વાપરો +@msg `outputKinds` needs plug-in API level {OUTPUT_KINDS_API}: give `api` {OUTPUT_KINDS_API} `outputKinds` ને પ્લગ-ઇન API સ્તર {OUTPUT_KINDS_API} જોઈએ: `api` {OUTPUT_KINDS_API} આપો +@msg `pageSize` must be one of {_1} `pageSize` {_1} માંથી એક હોવું જોઈએ +@msg `paintOutput` is only for a live effect (`kind` "effect") at `api` 2 `paintOutput` ફક્ત `api` 2 પર લાઇવ ઇફેક્ટ (`kind` "effect") માટે છે +@msg `paintOutput` may only be true `paintOutput` ફક્ત true હોઈ શકે +@msg `panel` is swatches, graphicStyles or symbols `panel` swatches, graphicStyles અથવા symbols છે +@msg `params` must be an object `params` ઑબ્જેક્ટ હોવો જોઈએ +@msg `path` is empty `path` ખાલી છે +@msg `path` is empty: give a file path, or leave it out for `dataBase64` `path` ખાલી છે: ફાઇલ પાથ આપો, અથવા `dataBase64` માટે તેને છોડી દો +@msg `path` must be a folder `path` ફોલ્ડર હોવું જોઈએ +@msg `path` must be a path object `path` પાથ ઑબ્જેક્ટ હોવો જોઈએ +@msg `path` must name a .js, .mjs or .jsx file `path` એ .js, .mjs અથવા .jsx ફાઇલ દર્શાવવી જોઈએ +@msg `pathfinder` must be an object `pathfinder` ઑબ્જેક્ટ હોવો જોઈએ +@msg `pens` must be an array of 1 to 255 #rrggbb colors `pens` 1 થી 255 #rrggbb રંગોનો એરે હોવો જોઈએ +@msg `picks` must be an array (got {v}) `picks` એરે હોવો જોઈએ (મળ્યું {v}) +@msg `picks` must hold 1 to {MAX_PICKS} picks (got {_1}) `picks` માં 1 થી {MAX_PICKS} પસંદગીઓ હોવી જોઈએ (મળ્યું {_1}) +@msg `pieces` must be a list of at most 10000 pieces `pieces` વધુમાં વધુ 10000 ટુકડાઓની યાદી હોવી જોઈએ +@msg `pivot` must be a whole number from 0 to 8 `pivot` 0 થી 8 સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg `pixelSize` must be [width, height]: two whole numbers from 1 to {MAX_IMAGE_SIDE} `pixelSize` [width, height] હોવું જોઈએ: 1 થી {MAX_IMAGE_SIDE} સુધીની બે પૂર્ણ સંખ્યાઓ +@msg `pixelsBase64` must hold 4 × width × height = {want} bytes as base64 `pixelsBase64` માં base64 તરીકે 4 × width × height = {want} બાઇટ હોવા જોઈએ +@msg `place` is only for an importer (`kind` "importer") `place` ફક્ત importer (`kind` "importer") માટે છે +@msg `plates` requires a stop linked to a spot swatch `plates` માટે સ્પૉટ સ્વેચ સાથે જોડાયેલો સ્ટોપ જરૂરી છે +@msg `points` must be "x,y x,y …" or [[x, y], …] pairs of numbers from 0 to 255 `points` "x,y x,y …" અથવા 0 થી 255 સુધીની સંખ્યાઓની [[x, y], …] જોડીઓ હોવી જોઈએ +@msg `points` must be a list of [x, y] points `points` [x, y] બિંદુઓની યાદી હોવી જોઈએ +@msg `points` must be a list of point indexes `points` બિંદુ ઇન્ડેક્સની યાદી હોવી જોઈએ +@msg `points` must be an array of point indices `points` બિંદુ ઇન્ડેક્સનો એરે હોવો જોઈએ +@msg `points` must be point indexes `points` બિંદુ ઇન્ડેક્સ હોવા જોઈએ +@msg `points` must be two or three [x, y] pairs of numbers `points` સંખ્યાઓની બે કે ત્રણ [x, y] જોડીઓ હોવી જોઈએ +@msg `points` must hold from 2 to 100000 points `points` માં 2 થી 100000 બિંદુઓ હોવા જોઈએ +@msg `port` must be "in" or "out" `port` "in" અથવા "out" હોવું જોઈએ +@msg `position` is above or below `position` above અથવા below છે +@msg `prefs.import` runs on its own, not as a batch step `prefs.import` બૅચ સ્ટેપ તરીકે નહીં, અલગથી પોતે જ ચાલે છે +@msg `preserve` must be an object `preserve` ઑબ્જેક્ટ હોવો જોઈએ +@msg `preset` must be a string `preset` સ્ટ્રિંગ હોવી જોઈએ +@msg `preset` must be true or false `preset` true અથવા false હોવું જોઈએ +@msg `radius` must be 0 or more `radius` 0 અથવા વધુ હોવી જોઈએ +@msg `radius` must be from 0 to 1000000 pt `radius` 0 થી 1000000 pt સુધી હોવી જોઈએ +@msg `radius` must be from 0.01 to 1000000 pt `radius` 0.01 થી 1000000 pt સુધી હોવી જોઈએ +@msg `ratio` must be from 0.1 to 0.5 `ratio` 0.1 થી 0.5 સુધી હોવો જોઈએ +@msg `rect` must be [x, y, width, height] `rect` [x, y, width, height] હોવું જોઈએ +@msg `rect` must be [x, y, width, height] with a positive size `rect` ધન કદ સાથે [x, y, width, height] હોવું જોઈએ +@msg `rect` must be [x, y, width, height]: finite numbers within ±{MAX_COORD}, width and height above 0 `rect` [x, y, width, height] હોવું જોઈએ: ±{MAX_COORD} ની અંદરની સીમિત સંખ્યાઓ, width અને height 0 થી વધુ +@msg `rect` must be [x0, y0, x1, y1] (got {r}) `rect` [x0, y0, x1, y1] હોવું જોઈએ (મળ્યું {r}) +@msg `reference` must be a whole number `reference` પૂર્ણ સંખ્યા હોવી જોઈએ +@msg `reference` must be a whole number from 0 to 8 `reference` 0 થી 8 સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg `reference` must be from 0 to 8 `reference` 0 થી 8 સુધી હોવું જોઈએ +@msg `refresh` must be true or false `refresh` true અથવા false હોવું જોઈએ +@msg `relation` must be overlap, inside or outside `relation` overlap, inside અથવા outside હોવું જોઈએ +@msg `removeUnused` needs an `end` `removeUnused` ને `end` જોઈએ +@msg `render` must be an object holding only `mode`, set to shaded or wireframe `render` ફક્ત `mode` ધરાવતો ઑબ્જેક્ટ હોવો જોઈએ, જે shaded અથવા wireframe પર સેટ હોય +@msg `repeats` must be a whole number from 1 to {MAX_REPEATS} `repeats` 1 થી {MAX_REPEATS} સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg `replace` must be a string `replace` સ્ટ્રિંગ હોવી જોઈએ +@msg `reversed` must be true or false `reversed` true અથવા false હોવું જોઈએ +@msg `ringSeed` must be below 2^53, not {r} `ringSeed` 2^53 થી ઓછું હોવું જોઈએ, {r} નહીં +@msg `rotate` must be "none", "columns" or "rows" `rotate` "none", "columns" અથવા "rows" હોવું જોઈએ +@msg `rotate` must be a finite number `rotate` સીમિત સંખ્યા હોવી જોઈએ +@msg `roundness` must be from 0 to 100% `roundness` 0 થી 100% સુધી હોવી જોઈએ +@msg `roundness` must be from 1 to 100% `roundness` 1 થી 100% સુધી હોવી જોઈએ +@msg `rows` must be lists of numbers or nulls, not {r} `rows` સંખ્યાઓ અથવા null ની યાદીઓ હોવી જોઈએ, {r} નહીં +@msg `rule` must be nonZero or evenOdd `rule` nonZero અથવા evenOdd હોવું જોઈએ +@msg `runtime` "js" is for an object filter (`kind` "filter"), not `kind` "{kind}" `runtime` "js" ઑબ્જેક્ટ ફિલ્ટર (`kind` "filter") માટે છે, `kind` "{kind}" માટે નહીં +@msg `runtime` "js" needs `script`: the name of the plug-in's .js file, next to the manifest `runtime` "js" ને `script` જોઈએ: પ્લગ-ઇનની .js ફાઇલનું નામ, જે મેનિફેસ્ટની બાજુમાં હોય +@msg `sampleSize` must be 1, 3 or 5 `sampleSize` 1, 3 અથવા 5 હોવું જોઈએ +@msg `saved` must be true or false `saved` true અથવા false હોવું જોઈએ +@msg `scale` must be a number from 0.001 to 1000 `scale` 0.001 થી 1000 સુધીની સંખ્યા હોવી જોઈએ +@msg `scale` must be a number in (0, 100] `scale` (0, 100] માંની સંખ્યા હોવી જોઈએ +@msg `scheme` must be color, tint or gray `scheme` color, tint અથવા gray હોવું જોઈએ +@msg `scope.{key}` must be a non-empty array `scope.{key}` ખાલી ન હોય તેવો એરે હોવો જોઈએ +@msg `scope` must be "document", {{artboards: [index, …]}} or {{layers: [id, …]}} `scope` "document", {{artboards: [index, …]}} અથવા {{layers: [id, …]}} હોવું જોઈએ +@msg `scope` must be "selection" or "document", not {other} `scope` "selection" અથવા "document" હોવું જોઈએ, {other} નહીં +@msg `script` must be a string `script` સ્ટ્રિંગ હોવી જોઈએ +@msg `script` must be the name of a .js file in the manifest's folder: 1-128 bytes, no folder, no `:`, not starting with `.` `script` મેનિફેસ્ટના ફોલ્ડરમાંની .js ફાઇલનું નામ હોવું જોઈએ: 1-128 બાઇટ, કોઈ ફોલ્ડર નહીં, કોઈ `:` નહીં, `.` થી શરૂ ન થતું +@msg `seconds` must be a number from {MIN_SECONDS} to {MAX_SECONDS} `seconds` {MIN_SECONDS} થી {MAX_SECONDS} સુધીની સંખ્યા હોવી જોઈએ +@msg `segmentEnds` must be true or false `segmentEnds` true અથવા false હોવું જોઈએ +@msg `segment` must be "straight" or "curved" `segment` "straight" અથવા "curved" હોવું જોઈએ +@msg `select` must be true or false `select` true અથવા false હોવું જોઈએ +@msg `seriesIndexes` is a non-empty list of series indexes `seriesIndexes` સિરીઝ ઇન્ડેક્સની ખાલી ન હોય તેવી યાદી છે +@msg `seriesIndexes` needs a `type` or a `valueAxis` `seriesIndexes` ને `type` અથવા `valueAxis` જોઈએ +@msg `sheet.{k}` must be a number `sheet.{k}` સંખ્યા હોવી જોઈએ +@msg `sheet` needs a positive width and height `sheet` ને ધન પહોળાઈ અને ઊંચાઈ જોઈએ +@msg `shift` must be a number of points `shift` પોઇન્ટની સંખ્યા હોવી જોઈએ +@msg `showCenter` must be true or false `showCenter` true અથવા false હોવું જોઈએ +@msg `showFoldLines` must be true or false `showFoldLines` true અથવા false હોવું જોઈએ +@msg `showImportOptions` must be true or false `showImportOptions` true અથવા false હોવું જોઈએ +@msg `side` must be "left", "right", "top" or "bottom" `side` "left", "right", "top" અથવા "bottom" હોવું જોઈએ +@msg `side` must be "next" or "previous" `side` "next" અથવા "previous" હોવું જોઈએ +@msg `side` must be left, right or null `side` left, right અથવા null હોવું જોઈએ +@msg `side` places the artboard: leave out x, y, width and height `side` આર્ટબોર્ડ મૂકે છે: x, y, width અને height છોડી દો +@msg `singleWordJustification` must be "fullJustify", "alignLeft", "alignCenter" or "alignRight" `singleWordJustification` "fullJustify", "alignLeft", "alignCenter" અથવા "alignRight" હોવું જોઈએ +@msg `single` must be `incoming` or `outgoing` `single` `incoming` અથવા `outgoing` હોવું જોઈએ +@msg `size` is a percentage of the base text's size, 1 to 100 `size` બેઝ ટેક્સ્ટના કદની ટકાવારી છે, 1 થી 100 +@msg `slice` is a slice number from `slice.list` `slice` એ `slice.list` માંથી સ્લાઇસ નંબર છે +@msg `slice` is a slice number from `slice.list`, with `use: currentSlice` `slice` એ `use: currentSlice` સાથે, `slice.list` માંથી સ્લાઇસ નંબર છે +@msg `sliders` must be none, oklch or hsl `sliders` none, oklch અથવા hsl હોવું જોઈએ +@msg `slot` must be `visibility` or `content` `slot` `visibility` અથવા `content` હોવું જોઈએ +@msg `smoothness` must be from 0 to 100 `smoothness` 0 થી 100 સુધી હોવું જોઈએ +@msg `source` and `target` are the same object `source` અને `target` એક જ ઑબ્જેક્ટ છે +@msg `source` is the only path, line or label that graph group `target` stands for `source` એ એકમાત્ર પાથ, લાઇન અથવા લેબલ છે જેને ગ્રાફ ગ્રુપ `target` દર્શાવે છે +@msg `source` is the script's text, given only in the JSON that plugin.install's dataBase64 takes: a .vcplugin file names its script in `script` `source` સ્ક્રિપ્ટનો ટેક્સ્ટ છે, જે ફક્ત plugin.install ના dataBase64 દ્વારા લેવાતા JSON માં અપાય છે: .vcplugin ફાઇલ તેની સ્ક્રિપ્ટનું નામ `script` માં આપે છે +@msg `source` must be `folder` or `datasets` `source` `folder` અથવા `datasets` હોવું જોઈએ +@msg `spacing` makes more than {MAX_COUNT} lines across the box `spacing` બૉક્સમાં {MAX_COUNT} થી વધુ લાઇનો બનાવે છે +@msg `spacing` must be a number `spacing` સંખ્યા હોવી જોઈએ +@msg `spacing` must be a number of points, 0 or more, or "auto" `spacing` પોઇન્ટની સંખ્યા, 0 અથવા વધુ, અથવા "auto" હોવું જોઈએ +@msg `spacing` must be more than 0 and at most {MAX_DISTANCE} pt `spacing` 0 થી વધુ અને વધુમાં વધુ {MAX_DISTANCE} pt હોવું જોઈએ +@msg `spread` applies to linear, radial, conic and diamond gradients `spread` લિનિયર, રેડિયલ, કોનિક અને ડાયમંડ ગ્રેડિયન્ટને લાગુ પડે છે +@msg `spread` must be pad, repeat or reflect `spread` pad, repeat અથવા reflect હોવું જોઈએ +@msg `startWith` is `current` or `auto` `startWith` `current` અથવા `auto` છે +@msg `start` is a number up to 1 (below 0: before an open path's start) `start` 1 સુધીની સંખ્યા છે (0 થી ઓછી: ખુલ્લા પાથની શરૂઆત પહેલાં) +@msg `start` must be a finite number `start` સીમિત સંખ્યા હોવી જોઈએ +@msg `starts` must be an array of anchor indices (or nulls) `starts` એન્કર ઇન્ડેક્સ (અથવા null) નો એરે હોવો જોઈએ +@msg `status` must be linked, embedded, missing or modified, or a list of them `status` linked, embedded, missing અથવા modified, અથવા તેમની યાદી હોવી જોઈએ +@msg `step` must be a step number from 0 to {last} `step` 0 થી {last} સુધીનો સ્ટેપ નંબર હોવો જોઈએ +@msg `stop` must be a stop index `stop` સ્ટોપ ઇન્ડેક્સ હોવો જોઈએ +@msg `stops` must be an array `stops` એરે હોવો જોઈએ +@msg `story` styles the whole story: give no `start` or `end` `story` આખી સ્ટોરીને સ્ટાઇલ કરે છે: `start` અથવા `end` ન આપો +@msg `story` takes the whole story: give no `start` or `end` `story` આખી સ્ટોરી લે છે: `start` અથવા `end` ન આપો +@msg `strokeMode` applies to strokes (stroke: true) `strokeMode` સ્ટ્રોકને લાગુ પડે છે (stroke: true) +@msg `style` must be "pencil" or "brush", not {v} `style` "pencil" અથવા "brush" હોવું જોઈએ, {v} નહીં +@msg `style` must be a graphic style's name, not {v} `style` ગ્રાફિક સ્ટાઇલનું નામ હોવું જોઈએ, {v} નહીં +@msg `style` must be roman or japanese `style` roman અથવા japanese હોવું જોઈએ +@msg `subpath` and `keep` need `id` `subpath` અને `keep` ને `id` જોઈએ +@msg `subpaths` must be two integer indices `subpaths` બે પૂર્ણાંક ઇન્ડેક્સ હોવા જોઈએ +@msg `surface` must be a whole number from 1 to the object's surface count `surface` 1 થી ઑબ્જેક્ટની સપાટીઓની સંખ્યા સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg `surface` must be one of {_1} `surface` {_1} માંથી એક હોવું જોઈએ +@msg `svg` must be an object of SVG options (see document.formats) `svg` SVG વિકલ્પોનો ઑબ્જેક્ટ હોવો જોઈએ (document.formats જુઓ) +@msg `swatch` goes with scheme tint `swatch` ફક્ત scheme tint સાથે વપરાય છે +@msg `swatch` in `colors` must be a swatch name, not {name} `colors` માં `swatch` સ્વેચનું નામ હોવું જોઈએ, {name} નહીં +@msg `symbol: null` removes the map: leave out `x`, `y`, `scaleX`, `scaleY`, `rotation` and `fit` `symbol: null` મેપ દૂર કરે છે: `x`, `y`, `scaleX`, `scaleY`, `rotation` અને `fit` છોડી દો +@msg `symbol` must be a symbol name `symbol` સિમ્બોલનું નામ હોવું જોઈએ +@msg `symbol`, `x`, `y`, `scaleX`, `scaleY`, `rotation` and `fit` need `surface` `symbol`, `x`, `y`, `scaleX`, `scaleY`, `rotation` અને `fit` ને `surface` જોઈએ +@msg `symmetric` places a handle: give `handle` `symmetric` હેન્ડલ મૂકે છે: `handle` આપો +@msg `t` must be a number from -0.98 to 0.98 `t` -0.98 થી 0.98 સુધીની સંખ્યા હોવી જોઈએ +@msg `t` must be from 0 to 1 `t` 0 થી 1 સુધી હોવું જોઈએ +@msg `tag` must be an OpenType feature tag `tag` OpenType ફીચર ટૅગ હોવો જોઈએ +@msg `target` must be "object" or "contents", not {v} `target` "object" અથવા "contents" હોવું જોઈએ, {v} નહીં +@msg `target` must be an object of the same Objects on Path group as `member` `target` એ `member` જેવા જ પાથ પરના ઑબ્જેક્ટ ગ્રુપનો ઑબ્જેક્ટ હોવો જોઈએ +@msg `text` holds the character of an inline graphic `text` માં ઇનલાઇન ગ્રાફિકનો અક્ષર છે +@msg `text` is {len} bytes (limit {MAX_TYPE_TEXT}) `text` {len} બાઇટ છે (મર્યાદા {MAX_TYPE_TEXT}) +@msg `text` must be a hex color (#rgb, #rgba, #rrggbb or #rrggbbaa) or a CSS rgb(), hsl() or oklch() color of at most 48 characters `text` hex રંગ (#rgb, #rgba, #rrggbb અથવા #rrggbbaa) અથવા વધુમાં વધુ 48 અક્ષરોનો CSS rgb(), hsl() અથવા oklch() રંગ હોવો જોઈએ +@msg `text` must not hold control characters other than line breaks and tabs `text` માં લાઇન બ્રેક અને ટૅબ સિવાયના કંટ્રોલ અક્ષરો ન હોવા જોઈએ +@msg `textureImage` must be a texture as effect.list gives it `textureImage` એ effect.list આપે તેવું ટેક્સ્ચર હોવું જોઈએ +@msg `threshold` must be a number from 0 to 1 `threshold` 0 થી 1 સુધીની સંખ્યા હોવી જોઈએ +@msg `tint` applies to global and spot colours `tint` ગ્લોબલ અને સ્પોટ રંગો પર લાગુ થાય છે +@msg `tint` goes with a global or spot `swatch` `tint` ગ્લોબલ કે સ્પોટ `swatch` સાથે જ આવે છે +@msg `tint` must be a number (%) `tint` સંખ્યા (%) હોવી જોઈએ +@msg `tint` needs a global or spot colour `tint` ને ગ્લોબલ કે સ્પોટ રંગ જોઈએ +@msg `to` is already threaded `to` પહેલેથી થ્રેડ થયેલું છે +@msg `to` is the design's new name `to` એ ડિઝાઇનનું નવું નામ છે +@msg `to` must be "corner" or "smooth" `to` "corner" અથવા "smooth" હોવું જોઈએ +@msg `to` must be [x, y] `to` [x, y] હોવું જોઈએ +@msg `to` must be a closed path, area type or type on a path other than `from` `to` એ `from` સિવાયનો બંધ પાથ, એરિયા ટાઇપ કે પાથ પરનો ટાઇપ હોવો જોઈએ +@msg `to` must be a whole number `to` પૂર્ણાંક હોવો જોઈએ +@msg `to` takes the rows of one object's stack, not aligned rows `to` એક ઑબ્જેક્ટના સ્ટૅકની પંક્તિઓ લે છે, સંરેખિત પંક્તિઓ નહીં +@msg `tolerance` must be 0 or more `tolerance` 0 કે તેથી વધુ હોવું જોઈએ +@msg `tolerance` must be from 0 to 100 pt `tolerance` 0 થી 100 pt સુધી હોવું જોઈએ +@msg `tolerance` must be from 0 to 3 pt `tolerance` 0 થી 3 pt સુધી હોવું જોઈએ +@msg `tolerance` must be from 1 to 100 `tolerance` 1 થી 100 સુધી હોવું જોઈએ +@msg `tolerance` must be from {_1} to {_2} pt `tolerance` {_1} થી {_2} pt સુધી હોવું જોઈએ +@msg `top` and `below` can't both be true `top` અને `below` બંને true ન હોઈ શકે +@msg `translations` gives at most {MAX_LANGUAGES} languages `translations` વધુમાં વધુ {MAX_LANGUAGES} ભાષાઓ આપે છે +@msg `type` must be "path" or "compound" `type` "path" અથવા "compound" હોવું જોઈએ +@msg `unit` must be 1-{MAX_UNIT} printable characters `unit` 1-{MAX_UNIT} છાપી શકાય તેવા અક્ષરો હોવા જોઈએ +@msg `useLab` must be true or false `useLab` true અથવા false હોવું જોઈએ +@msg `use` is `allSlices`, `eachSlice` or `currentSlice` `use` એ `allSlices`, `eachSlice` અથવા `currentSlice` છે +@msg `vAlign` must be default, top, middle, baseline or bottom `vAlign` default, top, middle, baseline અથવા bottom હોવું જોઈએ +@msg `value` must be a number, not {v} `value` સંખ્યા હોવી જોઈએ, {v} નહીં +@msg `value` needs `spacing` (steps|distance) `value` ને `spacing` (steps|distance) જોઈએ +@msg `values` must be a list `values` યાદી હોવી જોઈએ +@msg `values` must be an object `values` ઑબ્જેક્ટ હોવો જોઈએ +@msg `values` must name hex, rgb, cmyk, lab or gray `values` એ hex, rgb, cmyk, lab અથવા gray નું નામ આપવું જોઈએ +@msg `values` names a kind twice `values` એક પ્રકારનું નામ બે વાર આપે છે +@msg `version` must be 0 or {_1} `version` 0 અથવા {_1} હોવું જોઈએ +@msg `version` must be 0 or {newest} `version` 0 અથવા {newest} હોવું જોઈએ +@msg `version`, `description` or `author` is too long `version`, `description` અથવા `author` ખૂબ લાંબું છે +@msg `view` is smallThumb, mediumThumb, largeThumb, smallList or largeList `view` એ smallThumb, mediumThumb, largeThumb, smallList અથવા largeList છે +@msg `view` must be one of {_1} `view` {_1} માંથી એક હોવું જોઈએ +@msg `view` must be wheel or box `view` wheel અથવા box હોવું જોઈએ +@msg `visibleWhen` lists 1 to {MAX_CONDITION_VALUES} values for `{other}` `visibleWhen` `{other}` માટે 1 થી {MAX_CONDITION_VALUES} કિંમતો આપે છે +@msg `visibleWhen` names `{other}`, which isn't a parameter declared before this one `visibleWhen` `{other}` નું નામ આપે છે, જે આના પહેલાં જાહેર કરેલું પેરામીટર નથી +@msg `visibleWhen` names at most {MAX_CONDITIONS} parameters `visibleWhen` વધુમાં વધુ {MAX_CONDITIONS} પેરામીટરનાં નામ આપે છે +@msg `visibleWhen` takes `{other}`'s values, of a checkbox or a choice `visibleWhen` ચેકબૉક્સ કે પસંદગીવાળા `{other}` ની કિંમતો લે છે +@msg `visible` must be true or false `visible` true અથવા false હોવું જોઈએ +@msg `warichuAlign` must be one of {_1} `warichuAlign` {_1} માંથી એક હોવું જોઈએ +@msg `warichuLines` must be a whole number from {_1} to {_2} `warichuLines` {_1} થી {_2} સુધીનો પૂર્ણાંક હોવો જોઈએ +@msg `warnings` must be a list of strings `warnings` સ્ટ્રિંગ્સની યાદી હોવી જોઈએ +@msg `weight` must be from 0.01 to 1000 pt `weight` 0.01 થી 1000 pt સુધી હોવું જોઈએ +@msg `weights` must be a list of {_1} numbers, one per row (got {v}) `weights` {_1} સંખ્યાઓની યાદી હોવી જોઈએ, દરેક પંક્તિ માટે એક ({v} મળ્યું) +@msg `width` must be from {lo} to {hi} pt `width` {lo} થી {hi} pt સુધી હોવું જોઈએ +@msg `with` moves points, not a handle `with` પોઇન્ટ ખસેડે છે, હેન્ડલ નહીં +@msg `with` must be a list of at most 10000 spine point indexes `with` વધુમાં વધુ 10000 સ્પાઇન પોઇન્ટ ઇન્ડેક્સની યાદી હોવી જોઈએ +@msg `words` must be a list of {{id, start, end}} `words` {{id, start, end}} ની યાદી હોવી જોઈએ +@msg `writes` lists `{shown}` twice `writes` `{shown}` ને બે વાર દર્શાવે છે +@msg `writes` lists `{shown}`, which `inputs` doesn't list `writes` `{shown}` દર્શાવે છે, જે `inputs` માં નથી +@msg `writes` names an unknown object kind `{shown}`: use type, image or symbolInstance `writes` અજાણ્યા ઑબ્જેક્ટ પ્રકાર `{shown}` નું નામ આપે છે: type, image અથવા symbolInstance વાપરો +@msg `writes` needs `api` {WRITES_API} or later `writes` ને `api` {WRITES_API} કે પછીનું જોઈએ +@msg `writes` needs the permission `doc.write` `writes` ને `doc.write` પરવાનગી જોઈએ +@msg `xml` must be a string `xml` સ્ટ્રિંગ હોવી જોઈએ +@msg `{GRAPHICS}` entries take symbol, face, x, y, scale and rotation, not `{k}` `{GRAPHICS}` એન્ટ્રીઓ symbol, face, x, y, scale અને rotation લે છે, `{k}` નહીં +@msg `{GRAPHICS}` face must be front, back or side `{GRAPHICS}` face front, back અથવા side હોવું જોઈએ +@msg `{GRAPHICS}` must be an array `{GRAPHICS}` એરે હોવો જોઈએ +@msg `{GRAPHICS}` takes at most {MAX_GRAPHICS} graphics `{GRAPHICS}` વધુમાં વધુ {MAX_GRAPHICS} ગ્રાફિક્સ લે છે +@msg `{GRAPHICS}` {key} must be a number from {lo} to {hi} `{GRAPHICS}` {key} {lo} થી {hi} સુધીની સંખ્યા હોવી જોઈએ +@msg `{GROUP_ACTION}` must be "save", "new" or "delete", not {action} `{GROUP_ACTION}` "save", "new" અથવા "delete" હોવું જોઈએ, {action} નહીં +@msg `{GROUP_STORAGE}` must be true or false `{GROUP_STORAGE}` true અથવા false હોવું જોઈએ +@msg `{ID}`: the reference would be larger than {MAX_BYTES} bytes `{ID}`: સંદર્ભ {MAX_BYTES} બાઇટ્સ કરતાં મોટો થઈ જશે +@msg `{KEY}` entry {n} gives the paragraph at byte {start} of {_1} other indents than an entry before it `{KEY}` એન્ટ્રી {n} બાઇટ {start} પરના {_1} ના ફકરાને તેની પહેલાંની એન્ટ્રી કરતાં જુદા ઇન્ડેન્ટ આપે છે +@msg `{KEY}` entry {n} must be an object `{KEY}` એન્ટ્રી {n} ઑબ્જેક્ટ હોવી જોઈએ +@msg `{KEY}` entry {n} sets neither `leftIndent` nor `firstLineIndent` `{KEY}` એન્ટ્રી {n} ન તો `leftIndent` સેટ કરે છે ન `firstLineIndent` +@msg `{KEY}` entry {n}: `id` must be an object id `{KEY}` એન્ટ્રી {n}: `id` ઑબ્જેક્ટ id હોવું જોઈએ +@msg `{KEY}` entry {n}: `start` must be a byte offset `{KEY}` એન્ટ્રી {n}: `start` બાઇટ ઑફસેટ હોવું જોઈએ +@msg `{KEY}` entry {n}: `{k}` must be a number from -{MAX_PARA} to {MAX_PARA} pt `{KEY}` એન્ટ્રી {n}: `{k}` -{MAX_PARA} થી {MAX_PARA} pt સુધીની સંખ્યા હોવી જોઈએ +@msg `{KEY}` entry {n}: no paragraph of {_1} starts at byte {start} `{KEY}` એન્ટ્રી {n}: {_1} નો કોઈ ફકરો બાઇટ {start} પર શરૂ થતો નથી +@msg `{KEY}` entry {n}: unknown key `{k}` `{KEY}` એન્ટ્રી {n}: અજાણી કી `{k}` +@msg `{KEY}` entry {n}: {_1} is not a type object `{KEY}` એન્ટ્રી {n}: {_1} ટાઇપ ઑબ્જેક્ટ નથી +@msg `{KEY}` is empty `{KEY}` ખાલી છે +@msg `{KEY}` must be a list `{KEY}` યાદી હોવી જોઈએ +@msg `{KEY}` takes at most {MAX_PARAGRAPH_INDENTS} entries (got {_1}) `{KEY}` વધુમાં વધુ {MAX_PARAGRAPH_INDENTS} એન્ટ્રીઓ લે છે ({_1} મળી) +@msg `{KEY}` takes no `{other}` beside it `{KEY}` તેની સાથે કોઈ `{other}` લેતું નથી +@msg `{MAP_ART}` entries take surface, symbol, x, y, scaleX, scaleY and rotation, not `{k}` `{MAP_ART}` એન્ટ્રીઓ surface, symbol, x, y, scaleX, scaleY અને rotation લે છે, `{k}` નહીં +@msg `{MAP_ART}` maps surface {_1} more than once `{MAP_ART}` સપાટી {_1} ને એક કરતાં વધુ વાર મૅપ કરે છે +@msg `{MAP_ART}` must be an array `{MAP_ART}` એરે હોવો જોઈએ +@msg `{MAP_ART}` takes at most {MAX_MAPS} maps `{MAP_ART}` વધુમાં વધુ {MAX_MAPS} મૅપ લે છે +@msg `{MAP_ART}` {key} must be a number from {lo} to {hi} `{MAP_ART}` {key} {lo} થી {hi} સુધીની સંખ્યા હોવી જોઈએ +@msg `{_1}` can't be edited or removed `{_1}` સંપાદિત કે દૂર કરી શકાતું નથી +@msg `{_1}` can't name a Kinsoku set (1 to {KINSOKU_NAME_MAX} characters, no control characters, not None, Hard or Soft) `{_1}` Kinsoku સેટનું નામ ન હોઈ શકે (1 થી {KINSOKU_NAME_MAX} અક્ષરો, કંટ્રોલ અક્ષરો વિના, None, Hard કે Soft નહીં) +@msg `{_1}` can't name a composite font `{_1}` કમ્પોઝિટ ફોન્ટનું નામ ન હોઈ શકે +@msg `{_1}` has no brushes to apply `{_1}` પાસે લાગુ કરવા માટે કોઈ બ્રશ નથી +@msg `{_1}` has no symbols to place `{_1}` પાસે મૂકવા માટે કોઈ સિમ્બોલ નથી +@msg `{_1}` has pattern swatches, which a .vcswatches file can't hold `{_1}` માં પેટર્ન સ્વેચ છે, જે .vcswatches ફાઇલ રાખી શકતી નથી +@msg `{_1}` is a generator: draw its art with plugin.generate {{"id": "{_2}"}} `{_1}` જનરેટર છે: તેની આર્ટ plugin.generate {{"id": "{_2}"}} વડે દોરો +@msg `{_1}` is a live effect: apply it with effect.apply {{"effect": "{_2}"}} `{_1}` લાઇવ ઇફેક્ટ છે: તેને effect.apply {{"effect": "{_2}"}} વડે લાગુ કરો +@msg `{_1}` is a plug-in of kind `{_2}`, not a generator `{_1}` એ `{_2}` પ્રકારનું પ્લગ-ઇન છે, જનરેટર નથી +@msg `{_1}` is a plug-in of kind `{_2}`, not an exporter `{_1}` એ `{_2}` પ્રકારનું પ્લગ-ઇન છે, એક્સપોર્ટર નથી +@msg `{_1}` is a plug-in of kind `{_2}`, not an importer `{_1}` એ `{_2}` પ્રકારનું પ્લગ-ઇન છે, ઇમ્પોર્ટર નથી +@msg `{_1}` is an exporter: export with document.export {{"format": "{_2}"}} `{_1}` એક્સપોર્ટર છે: document.export {{"format": "{_2}"}} વડે એક્સપોર્ટ કરો +@msg `{_1}` is an importer: open a file with document.open {{"importer": "{_2}"}} `{_1}` ઇમ્પોર્ટર છે: document.open {{"importer": "{_2}"}} વડે ફાઇલ ખોલો +@msg `{_1}` is built in and always listed `{_1}` બિલ્ટ-ઇન છે અને હંમેશાં યાદીમાં રહે છે +@msg `{_1}` is not a device to simulate: a custom proof setup simulates workingCmyk, cmyk: or rgb: `{_1}` સિમ્યુલેટ કરવાનું ઉપકરણ નથી: કસ્ટમ પ્રૂફ સેટઅપ workingCmyk, cmyk: અથવા rgb: સિમ્યુલેટ કરે છે +@msg `{_1}` is not a font file the last text.findFontFiles search found `{_1}` છેલ્લી text.findFontFiles શોધમાં મળેલી ફોન્ટ ફાઇલ નથી +@msg `{_1}` is the name of an installed font `{_1}` ઇન્સ્ટોલ કરેલા ફોન્ટનું નામ છે +@msg `{_1}` would be overwritten by the package: choose a different folder or name પૅકેજ `{_1}` પર ઓવરરાઇટ કરશે: બીજું ફોલ્ડર કે નામ પસંદ કરો +@msg `{_1}`: U+{_2} is a control character or past U+FFFF `{_1}`: U+{_2} કંટ્રોલ અક્ષર છે અથવા U+FFFF પછીનો છે +@msg `{_1}`: a character set keeps at most {CUSTOM_CHARS_MAX} characters `{_1}`: અક્ષર સેટ વધુમાં વધુ {CUSTOM_CHARS_MAX} અક્ષરો રાખે છે +@msg `{_1}`: the document has no Kinsoku set named `{f}` `{_1}`: દસ્તાવેજમાં `{f}` નામનો કોઈ Kinsoku સેટ નથી +@msg `{_1}`: {_2} is set in `{font}`, a composite font `{_1}`: {_2} `{font}` માં સેટ છે, જે કમ્પોઝિટ ફોન્ટ છે +@msg `{_1}`: {msg} `{_1}`: {msg} +@msg `{action}` is no save command `{action}` કોઈ સેવ આદેશ નથી +@msg `{area}` is no recovery area name `{area}` પુનઃપ્રાપ્તિ વિસ્તારનું નામ નથી +@msg `{base}` is larger than {_1} MB `{base}` {_1} MB કરતાં મોટું છે +@msg `{base}` is not in the DCS file's folder `{base}` DCS ફાઇલના ફોલ્ડરમાં નથી +@msg `{code}` is not a code from U+0000 to U+FFFF `{code}` U+0000 થી U+FFFF સુધીનો કોડ નથી +@msg `{field}` can't take {value} `{field}` {value} લઈ શકતું નથી +@msg `{field}` must be an object of options, not {value} `{field}` વિકલ્પોનો ઑબ્જેક્ટ હોવો જોઈએ, {value} નહીં +@msg `{field}` must be one of {_1} `{field}` {_1} માંથી એક હોવું જોઈએ +@msg `{field}` must be true or false `{field}` true અથવા false હોવું જોઈએ +@msg `{field}` takes a string `{field}` સ્ટ્રિંગ લે છે +@msg `{field}` takes no input now: its row is hidden or disabled `{field}` હમણાં કોઈ ઇનપુટ લેતું નથી: તેની પંક્તિ છુપાયેલી કે બંધ છે +@msg `{file}` has no art to place `{file}` પાસે મૂકવા માટે કોઈ આર્ટ નથી +@msg `{file}` has no swatches of its own `{file}` પાસે પોતાના કોઈ સ્વેચ નથી +@msg `{file}` is over {_1} MB `{file}` {_1} MB કરતાં મોટી છે +@msg `{file}` isn't a VectorCraft document, a PDF or a PDF-compatible .ai file `{file}` VectorCraft દસ્તાવેજ, PDF કે PDF-સુસંગત .ai ફાઇલ નથી +@msg `{font}`: `{name}`: a character set keeps at most {CUSTOM_CHARS_MAX} characters `{font}`: `{name}`: અક્ષર સેટ વધુમાં વધુ {CUSTOM_CHARS_MAX} અક્ષરો રાખે છે +@msg `{font}`: `{name}`: characters must be a string `{font}`: `{name}`: characters સ્ટ્રિંગ હોવી જોઈએ +@msg `{font}`: `{name}`: {e} `{font}`: `{name}`: {e} +@msg `{font}`: each character set must be {{name, characters, font…}} `{font}`: દરેક અક્ષર સેટ {{name, characters, font…}} હોવો જોઈએ +@msg `{font}`: each character set needs a name `{font}`: દરેક અક્ષર સેટને નામ જોઈએ +@msg `{font}`: unknown key `{k}` in a character set `{font}`: અક્ષર સેટમાં અજાણી કી `{k}` +@msg `{format}` has no color table: use gif or png8 `{format}` પાસે કલર ટેબલ નથી: gif અથવા png8 વાપરો +@msg `{f}` belongs to a VectorCraft that is running `{f}` ચાલી રહેલા VectorCraft નું છે +@msg `{f}` is the copy of a document open now `{f}` હમણાં ખુલ્લા દસ્તાવેજની નકલ છે +@msg `{given}` isn't a library panel (see window.swatchLibrary) `{given}` લાઇબ્રેરી પેનલ નથી (window.swatchLibrary જુઓ) +@msg `{id}` has no envelope dialog `{id}` પાસે એન્વેલોપ ડાયલૉગ નથી +@msg `{id}` is a tool: toolbar.addTool adds tools `{id}` ટૂલ છે: toolbar.addTool ટૂલ્સ ઉમેરે છે +@msg `{id}` is finished (see learn.resetProgress) `{id}` પૂર્ણ થઈ ગયું છે (learn.resetProgress જુઓ) +@msg `{id}` is no writable format (see document.formats) `{id}` લખી શકાય તેવું ફોર્મેટ નથી (document.formats જુઓ) +@msg `{id}` is not a colour adjustment `{id}` રંગ ગોઠવણ નથી +@msg `{id}` is the last tutorial in its skill `{id}` તેના કૌશલ્યનું છેલ્લું ટ્યુટોરિયલ છે +@msg `{id}` isn't a Graphic Styles panel command `{id}` ગ્રાફિક સ્ટાઇલ્સ પેનલનો આદેશ નથી +@msg `{id}` isn't a library panel command `{id}` લાઇબ્રેરી પેનલનો આદેશ નથી +@msg `{id}` isn't a loaded library `{id}` લોડ થયેલી લાઇબ્રેરી નથી +@msg `{id}` needs params, which a click on a button does not give `{id}` ને params જોઈએ, જે બટન પરનું ક્લિક આપતું નથી +@msg `{keep}` is not a side of this axis `{keep}` આ અક્ષની બાજુ નથી +@msg `{key}: {top}` and `options.{key}: {inner}` disagree: give the option once `{key}: {top}` અને `options.{key}: {inner}` મેળ ખાતા નથી: વિકલ્પ એક જ વાર આપો +@msg `{key}` applies to a curved bridge: give `curved` with it `{key}` વળાંકવાળા બ્રિજ પર લાગુ થાય છે: તેની સાથે `curved` આપો +@msg `{key}` entry {index} is {value}, not a non-negative integer object id `{key}` ની એન્ટ્રી {index} {value} છે, ઋણ ન હોય તેવો પૂર્ણાંક ઑબ્જેક્ટ id નહીં +@msg `{key}` has no colours `{key}` માં કોઈ રંગ નથી +@msg `{key}` holds more than {MAX_EDIT_WORDS} words `{key}` માં {MAX_EDIT_WORDS} કરતાં વધુ શબ્દો છે +@msg `{key}` is a design name `{key}` ડિઝાઇનનું નામ છે +@msg `{key}` is a design name or a list of them `{key}` ડિઝાઇનનું નામ કે તેમની યાદી છે +@msg `{key}` is built in and can't be deleted `{key}` બિલ્ટ-ઇન છે અને કાઢી નાખી શકાતું નથી +@msg `{key}` is longer than {MAX_NAME} characters `{key}` {MAX_NAME} અક્ષરો કરતાં લાંબું છે +@msg `{key}` is not a parameter of {_1} `{key}` એ {_1} નું પેરામીટર નથી +@msg `{key}` is not one of the options: {given} `{key}` વિકલ્પોમાંથી એક નથી: {given} +@msg `{key}` is out of range `{key}` શ્રેણીની બહાર છે +@msg `{key}` must be 0 or more `{key}` 0 કે તેથી વધુ હોવું જોઈએ +@msg `{key}` must be 0..{max} `{key}` 0..{max} હોવું જોઈએ +@msg `{key}` must be 1-64 printable characters `{key}` 1-64 છાપી શકાય તેવા અક્ષરો હોવા જોઈએ +@msg `{key}` must be 1-{MAX_NAME_CHARS} characters, without control or text direction characters `{key}` કંટ્રોલ કે ટેક્સ્ટ દિશાના અક્ષરો વિના 1-{MAX_NAME_CHARS} અક્ષરો હોવા જોઈએ +@msg `{key}` must be [min, desired, max] or {{min?, desired?, max?}}, in percent `{key}` ટકામાં [min, desired, max] અથવા {{min?, desired?, max?}} હોવું જોઈએ +@msg `{key}` must be [x, y, width, height]: four finite numbers, width and height not negative `{key}` [x, y, width, height] હોવું જોઈએ: ચાર સીમિત સંખ્યાઓ, width અને height ઋણ નહીં +@msg `{key}` must be [x, y] `{key}` [x, y] હોવું જોઈએ +@msg `{key}` must be [x, y] numbers `{key}` [x, y] સંખ્યાઓ હોવી જોઈએ +@msg `{key}` must be `auto` or a language code such as `en` or `zh-hant` `{key}` `auto` અથવા `en` કે `zh-hant` જેવો ભાષા કોડ હોવો જોઈએ +@msg `{key}` must be a #rrggbb color `{key}` #rrggbb રંગ હોવો જોઈએ +@msg `{key}` must be a #rrggbb colour `{key}` #rrggbb રંગ હોવો જોઈએ +@msg `{key}` must be a color or {_1} `{key}` રંગ અથવા {_1} હોવું જોઈએ +@msg `{key}` must be a list `{key}` યાદી હોવી જોઈએ +@msg `{key}` must be a list of artboard indices `{key}` આર્ટબોર્ડ ઇન્ડેક્સની યાદી હોવી જોઈએ +@msg `{key}` must be a list of words `{key}` શબ્દોની યાદી હોવી જોઈએ +@msg `{key}` must be a list, not {v} `{key}` યાદી હોવી જોઈએ, {v} નહીં +@msg `{key}` must be a non-empty list of artboard indices `{key}` આર્ટબોર્ડ ઇન્ડેક્સની ખાલી ન હોય તેવી યાદી હોવી જોઈએ +@msg `{key}` must be a non-negative integer `{key}` ઋણ ન હોય તેવો પૂર્ણાંક હોવો જોઈએ +@msg `{key}` must be a number `{key}` સંખ્યા હોવી જોઈએ +@msg `{key}` must be a number from 0 to 1 `{key}` 0 થી 1 સુધીની સંખ્યા હોવી જોઈએ +@msg `{key}` must be a number from 1 to 10, not {v} `{key}` 1 થી 10 સુધીની સંખ્યા હોવી જોઈએ, {v} નહીં +@msg `{key}` must be a number from {_1} to {_2} `{key}` {_1} થી {_2} સુધીની સંખ્યા હોવી જોઈએ +@msg `{key}` must be a number from {lo} to {hi} `{key}` {lo} થી {hi} સુધીની સંખ્યા હોવી જોઈએ +@msg `{key}` must be a number not below 0 `{key}` 0 થી ઓછી ન હોય તેવી સંખ્યા હોવી જોઈએ +@msg `{key}` must be a number or null, not {v} `{key}` સંખ્યા અથવા null હોવું જોઈએ, {v} નહીં +@msg `{key}` must be a number {_1}..{_2} `{key}` {_1}..{_2} સંખ્યા હોવી જોઈએ +@msg `{key}` must be a number, not {v} `{key}` સંખ્યા હોવી જોઈએ, {v} નહીં +@msg `{key}` must be a path `{key}` પાથ હોવો જોઈએ +@msg `{key}` must be a profile name or null `{key}` પ્રોફાઇલ નામ અથવા null હોવું જોઈએ +@msg `{key}` must be a string `{key}` સ્ટ્રિંગ હોવી જોઈએ +@msg `{key}` must be a whole number `{key}` પૂર્ણાંક હોવો જોઈએ +@msg `{key}` must be a whole number between {min} and {max} (got {n}) `{key}` {min} અને {max} વચ્ચેનો પૂર્ણાંક હોવો જોઈએ ({n} મળ્યું) +@msg `{key}` must be a whole number between {min} and {max} (got {x}) `{key}` {min} અને {max} વચ્ચેનો પૂર્ણાંક હોવો જોઈએ ({x} મળ્યું) +@msg `{key}` must be a whole number from 1 to {MAX_CELLS} `{key}` 1 થી {MAX_CELLS} સુધીનો પૂર્ણાંક હોવો જોઈએ +@msg `{key}` must be a whole number of 0 or more `{key}` 0 કે તેથી વધુનો પૂર્ણાંક હોવો જોઈએ +@msg `{key}` must be a whole number of at least 0, not {n} `{key}` ઓછામાં ઓછો 0 નો પૂર્ણાંક હોવો જોઈએ, {n} નહીં +@msg `{key}` must be a whole number of at least 0, not {v} `{key}` ઓછામાં ઓછો 0 નો પૂર્ણાંક હોવો જોઈએ, {v} નહીં +@msg `{key}` must be a whole number of pixels from {lo} to {hi} `{key}` {lo} થી {hi} સુધીના પિક્સેલનો પૂર્ણાંક હોવો જોઈએ +@msg `{key}` must be an appearance item index (paint order) or null `{key}` દેખાવ આઇટમ ઇન્ડેક્સ (પેઇન્ટ ક્રમ) અથવા null હોવું જોઈએ +@msg `{key}` must be an array `{key}` એરે હોવો જોઈએ +@msg `{key}` must be an array of asset ids (see assets.list) `{key}` એસેટ id નો એરે હોવો જોઈએ (assets.list જુઓ) +@msg `{key}` must be an array of at most {MAX_ITEMS} entries `{key}` વધુમાં વધુ {MAX_ITEMS} એન્ટ્રીઓનો એરે હોવો જોઈએ +@msg `{key}` must be an array of these names: {_1} `{key}` આ નામોનો એરે હોવો જોઈએ: {_1} +@msg `{key}` must be an object `{key}` ઑબ્જેક્ટ હોવો જોઈએ +@msg `{key}` must be between {min} and {max} (got {x}) `{key}` {min} અને {max} વચ્ચે હોવું જોઈએ ({x} મળ્યું) +@msg `{key}` must be four numbers not below 0: [tl, tr, br, bl] `{key}` 0 થી ઓછી ન હોય તેવી ચાર સંખ્યાઓ હોવી જોઈએ: [tl, tr, br, bl] +@msg `{key}` must be from -{MAX_VALUE} to {MAX_VALUE} `{key}` -{MAX_VALUE} થી {MAX_VALUE} સુધી હોવું જોઈએ +@msg `{key}` must be from 0 to 100 `{key}` 0 થી 100 સુધી હોવું જોઈએ +@msg `{key}` must be from 0 to 180 degrees, not {a} `{key}` 0 થી 180 ડિગ્રી સુધી હોવું જોઈએ, {a} નહીં +@msg `{key}` must be from 0 to {MAX_DISTANCE} pt `{key}` 0 થી {MAX_DISTANCE} pt સુધી હોવું જોઈએ +@msg `{key}` must be from 0 to {max} pt `{key}` 0 થી {max} pt સુધી હોવું જોઈએ +@msg `{key}` must be from 0 to {max}, not {n} `{key}` 0 થી {max} સુધી હોવું જોઈએ, {n} નહીં +@msg `{key}` must be from 0.01 to 1000 pt `{key}` 0.01 થી 1000 pt સુધી હોવું જોઈએ +@msg `{key}` must be from {_1} to {_2} `{key}` {_1} થી {_2} સુધી હોવું જોઈએ +@msg `{key}` must be from {lo} to {hi} `{key}` {lo} થી {hi} સુધી હોવું જોઈએ +@msg `{key}` must be from {lo} to {hi} pt `{key}` {lo} થી {hi} pt સુધી હોવું જોઈએ +@msg `{key}` must be from {lo} to {hi}, not {v} `{key}` {lo} થી {hi} સુધી હોવું જોઈએ, {v} નહીં +@msg `{key}` must be of the type its default {d} has `{key}` તેના ડિફૉલ્ટ {d} ના પ્રકારનું હોવું જોઈએ +@msg `{key}` must be one of "{_1}" `{key}` "{_1}" માંથી એક હોવું જોઈએ +@msg `{key}` must be one of auto, always, never `{key}` auto, always, never માંથી એક હોવું જોઈએ +@msg `{key}` must be one of miter, round, bevel `{key}` miter, round, bevel માંથી એક હોવું જોઈએ +@msg `{key}` must be one of {_1} `{key}` {_1} માંથી એક હોવું જોઈએ +@msg `{key}` must be one word of at most {_1} characters `{key}` વધુમાં વધુ {_1} અક્ષરોનો એક શબ્દ હોવો જોઈએ +@msg `{key}` must be six finite numbers within ±{MAX_COORD} that don't flatten the object `{key}` ±{MAX_COORD} ની અંદરની છ સીમિત સંખ્યાઓ હોવી જોઈએ જે ઑબ્જેક્ટને સપાટ ન કરે +@msg `{key}` must be true or false `{key}` true અથવા false હોવું જોઈએ +@msg `{key}` must contain whole numbers `{key}` માં પૂર્ણાંકો હોવા જોઈએ +@msg `{key}` must hold 1 to {max} entries (it holds {n}) `{key}` માં 1 થી {max} એન્ટ્રીઓ હોવી જોઈએ (તેમાં {n} છે) +@msg `{key}` must hold single words of at most {_1} characters `{key}` માં વધુમાં વધુ {_1} અક્ષરોના એકલ શબ્દો હોવા જોઈએ +@msg `{key}` must name an object attached to the path of an Objects on Path group `{key}` એ પાથ પરના ઑબ્જેક્ટ ગ્રૂપના પાથ સાથે જોડાયેલા ઑબ્જેક્ટનું નામ આપવું જોઈએ +@msg `{key}` names "{name}" twice `{key}` માં "{name}" બે વાર છે +@msg `{key}` names a folder, which preferences files leave out `{key}` ફોલ્ડરનું નામ આપે છે, જેને પસંદગીઓ ફાઇલો છોડી દે છે +@msg `{key}` names an object that is hidden or locked `{key}` છુપાયેલા કે લૉક કરેલા ઑબ્જેક્ટનું નામ આપે છે +@msg `{key}` needs a shortcut before it can have a hold shortcut `{key}` ને હોલ્ડ શોર્ટકટ મળે તે પહેલાં શોર્ટકટ જોઈએ +@msg `{key}` takes a value of another kind than {value} `{key}` {value} કરતાં બીજા પ્રકારની કિંમત લે છે +@msg `{key}`: not a colour: {v} `{key}`: રંગ નથી: {v} +@msg `{k}.family` is required `{k}.family` જરૂરી છે +@msg `{k}` can't be null; leave it out instead `{k}` null ન હોઈ શકે; તેના બદલે તેને છોડી દો +@msg `{k}` is a number 0..1 `{k}` 0..1 સંખ્યા છે +@msg `{k}` is not a parameter of `{_1}` `{k}` એ `{_1}` નું પેરામીટર નથી +@msg `{k}` is true or false `{k}` true અથવા false છે +@msg `{k}` isn't an export setting: {_1}, openLocation `{k}` એક્સપોર્ટ સેટિંગ નથી: {_1}, openLocation +@msg `{k}` must be [x, y] `{k}` [x, y] હોવું જોઈએ +@msg `{k}` must be a byte offset `{k}` બાઇટ ઑફસેટ હોવું જોઈએ +@msg `{k}` must be a number `{k}` સંખ્યા હોવી જોઈએ +@msg `{k}` must be a number of points `{k}` પોઇન્ટની સંખ્યા હોવી જોઈએ +@msg `{k}` must be a string `{k}` સ્ટ્રિંગ હોવી જોઈએ +@msg `{k}` must be a whole number `{k}` પૂર્ણાંક હોવો જોઈએ +@msg `{k}` must be at most {max_length} characters `{k}` વધુમાં વધુ {max_length} અક્ષરોનું હોવું જોઈએ +@msg `{k}` must be from {lo} to {hi} for {key} {key} માટે `{k}` {lo} થી {hi} સુધી હોવું જોઈએ +@msg `{k}` must be from {min} to {max} `{k}` {min} થી {max} સુધી હોવું જોઈએ +@msg `{k}` must be one of {_1} `{k}` {_1} માંથી એક હોવું જોઈએ +@msg `{k}` must be true or false `{k}` true અથવા false હોવું જોઈએ +@msg `{k}` must be {what} `{k}` {what} હોવું જોઈએ +@msg `{k}` must be {what}, not {v} `{k}` {what} હોવું જોઈએ, {v} નહીં +@msg `{l}` isn't a global or spot colour `{l}` ગ્લોબલ કે સ્પોટ રંગ નથી +@msg `{min_key}` is greater than `{max_key}` `{min_key}` એ `{max_key}` કરતાં મોટું છે +@msg `{m}` isn't a bitmap: use clipboard.importSvg, importPdf or importText `{m}` બિટમેપ નથી: clipboard.importSvg, importPdf અથવા importText વાપરો +@msg `{name}` already carries the {_1} role `{name}` પાસે પહેલેથી {_1} ભૂમિકા છે +@msg `{name}` can't be deleted `{name}` કાઢી નાખી શકાતું નથી +@msg `{name}` can't be duplicated `{name}` ની નકલ બનાવી શકાતી નથી +@msg `{name}` can't be edited `{name}` સંપાદિત કરી શકાતું નથી +@msg `{name}` can't be renamed `{name}` નું નામ બદલી શકાતું નથી +@msg `{name}` can't name a character set `{name}` અક્ષર સેટનું નામ ન હોઈ શકે +@msg `{name}` can't name a folder `{name}` ફોલ્ડરનું નામ ન હોઈ શકે +@msg `{name}` has no `params` `{name}` પાસે `params` નથી +@msg `{name}` has no art to place `{name}` પાસે મૂકવા માટે કોઈ આર્ટ નથી +@msg `{name}` has no options `{name}` પાસે કોઈ વિકલ્પો નથી +@msg `{name}` has no text to place `{name}` પાસે મૂકવા માટે કોઈ ટેક્સ્ટ નથી +@msg `{name}` in the Word document is not UTF-8 or UTF-16 text Word દસ્તાવેજમાંનું `{name}` UTF-8 કે UTF-16 ટેક્સ્ટ નથી +@msg `{name}` in the Word document is not well-formed XML: {e} Word દસ્તાવેજમાંનું `{name}` સુવ્યવસ્થિત XML નથી: {e} +@msg `{name}` in the Word document nests elements more than {MAX_NESTING} deep Word દસ્તાવેજમાંનું `{name}` ઘટકોને {MAX_NESTING} કરતાં વધુ ઊંડે નેસ્ટ કરે છે +@msg `{name}` is a built-in preset and can't change: save it under another name `{name}` બિલ્ટ-ઇન પ્રીસેટ છે અને બદલી શકાતું નથી: તેને બીજા નામે સાચવો +@msg `{name}` is a built-in preset and is read-only: save it under another name `{name}` બિલ્ટ-ઇન પ્રીસેટ છે અને ફક્ત વાંચવા પૂરતું છે: તેને બીજા નામે સાચવો +@msg `{name}` is a built-in preset and stays `{name}` બિલ્ટ-ઇન પ્રીસેટ છે અને રહે છે +@msg `{name}` is a built-in preset: save under another name `{name}` બિલ્ટ-ઇન પ્રીસેટ છે: બીજા નામે સાચવો +@msg `{name}` is a built-in profile and stays `{name}` બિલ્ટ-ઇન પ્રોફાઇલ છે અને રહે છે +@msg `{name}` is a file of its own, which can only be found next to the DCS file's path `{name}` પોતાની અલગ ફાઇલ છે, જે ફક્ત DCS ફાઇલના પાથની બાજુમાં જ મળી શકે છે +@msg `{name}` is a process colour: tints apply to global and spot colours `{name}` પ્રોસેસ રંગ છે: ટિન્ટ ગ્લોબલ અને સ્પોટ રંગો પર લાગુ થાય છે +@msg `{name}` is a static symbol: set its Symbol Type to Dynamic first `{name}` સ્ટેટિક સિમ્બોલ છે: પહેલાં તેનો સિમ્બોલ પ્રકાર ડાયનેમિક પર સેટ કરો +@msg `{name}` is a tint of `{base}`: edit `{base}` (a tint swatch only takes a new name) `{name}` એ `{base}` નો ટિન્ટ છે: `{base}` સંપાદિત કરો (ટિન્ટ સ્વેચ ફક્ત નવું નામ લે છે) +@msg `{name}` is a working space: choose another with edit.colorSettings first `{name}` કાર્યકારી સ્પેસ છે: પહેલાં edit.colorSettings વડે બીજી પસંદ કરો +@msg `{name}` is built in and stays `{name}` બિલ્ટ-ઇન છે અને રહે છે +@msg `{name}` is no recovery entry name `{name}` પુનઃપ્રાપ્તિ એન્ટ્રીનું નામ નથી +@msg `{name}` is the name of a built-in preset: rename it in the file `{name}` બિલ્ટ-ઇન પ્રીસેટનું નામ છે: ફાઇલમાં તેનું નામ બદલો +@msg `{name}` isn't a colour swatch `{name}` રંગ સ્વેચ નથી +@msg `{name}` isn't a global or spot color `{name}` ગ્લોબલ કે સ્પોટ રંગ નથી +@msg `{name}` takes a paint of its own kind (colour, gradient or pattern) `{name}` પોતાના પ્રકારનો પેઇન્ટ લે છે (રંગ, ગ્રેડિયન્ટ કે પેટર્ન) +@msg `{name}`: Minimum must not exceed Desired, nor Desired Maximum `{name}`: ન્યૂનતમ ઇચ્છિતથી વધુ ન હોવું જોઈએ, કે ઇચ્છિત મહત્તમથી વધુ નહીં +@msg `{name}`: U+{code} is a control character or past U+FFFF `{name}`: U+{code} કંટ્રોલ અક્ષર છે અથવા U+FFFF પછીનો છે +@msg `{name}`: U+{code} is listed twice `{name}`: U+{code} બે વાર દર્શાવેલ છે +@msg `{name}`: a character set keeps at most {CUSTOM_CHARS_MAX} characters `{name}`: અક્ષર સેટ વધુમાં વધુ {CUSTOM_CHARS_MAX} અક્ષરો રાખે છે +@msg `{name}`: a composite font keeps at most {CUSTOM_SETS_MAX} character sets `{name}`: કમ્પોઝિટ ફોન્ટ વધુમાં વધુ {CUSTOM_SETS_MAX} અક્ષર સેટ રાખે છે +@msg `{name}`: custom must be a list of character sets `{name}`: custom અક્ષર સેટની યાદી હોવી જોઈએ +@msg `{name}`: from must be text `{name}`: from ટેક્સ્ટ હોવું જોઈએ +@msg `{name}`: give the kanji part `{name}`: kanji ભાગ આપો +@msg `{name}`: inseparable must be a list of sequences `{name}`: inseparable ક્રમોની યાદી હોવી જોઈએ +@msg `{name}`: inseparable must be a list of {_1} to {_2} characters each `{name}`: inseparable દરેક {_1} થી {_2} અક્ષરોની યાદી હોવી જોઈએ +@msg `{name}`: inseparable: at most {KINSOKU_CATEGORY_MAX} characters in all `{name}`: inseparable: કુલ વધુમાં વધુ {KINSOKU_CATEGORY_MAX} અક્ષરો +@msg `{name}`: parts must be an object `{name}`: parts ઑબ્જેક્ટ હોવો જોઈએ +@msg `{name}`: unknown class `{k}`; the classes are kanji, kana, punctuation, symbols, roman and numerals `{name}`: અજાણ્યો વર્ગ `{k}`; વર્ગો kanji, kana, punctuation, symbols, roman અને numerals છે +@msg `{name}`: unknown key `{k}` in {_1} `{name}`: {_1} માં અજાણી કી `{k}` +@msg `{name}`: {_1} must be an object `{name}`: {_1} ઑબ્જેક્ટ હોવો જોઈએ +@msg `{name}`: {_1}: {e} `{name}`: {_1}: {e} +@msg `{name}`: {key} must be at most {KINSOKU_CATEGORY_MAX} characters `{name}`: {key} વધુમાં વધુ {KINSOKU_CATEGORY_MAX} અક્ષરોનું હોવું જોઈએ +@msg `{name}`: {key} must be text, one character after another `{name}`: {key} ટેક્સ્ટ હોવું જોઈએ, એક પછી એક અક્ષર +@msg `{name}`: {msg} `{name}`: {msg} +@msg `{n}` can't be deleted `{n}` કાઢી નાખી શકાતું નથી +@msg `{n}` can't be merged `{n}` મર્જ કરી શકાતું નથી +@msg `{n}` can't be moved `{n}` ખસેડી શકાતું નથી +@msg `{n}` is a built-in preset: only saved presets are exported `{n}` બિલ્ટ-ઇન પ્રીસેટ છે: ફક્ત સાચવેલા પ્રીસેટ એક્સપોર્ટ થાય છે +@msg `{n}` is not a colour swatch `{n}` રંગ સ્વેચ નથી +@msg `{n}` isn't a solid colour `{n}` સૉલિડ રંગ નથી +@msg `{n}`: colour groups hold solid colours only `{n}`: રંગ ગ્રૂપમાં ફક્ત સૉલિડ રંગો જ હોય છે +@msg `{other}` doesn't search the installed fonts `{other}` ઇન્સ્ટોલ કરેલા ફોન્ટ્સ શોધતું નથી +@msg `{other}` doesn't trace an image `{other}` ઇમેજ ટ્રેસ કરતું નથી +@msg `{panel}` has no display sizes to cycle `{panel}` પાસે બદલવા માટે કોઈ ડિસ્પ્લે કદ નથી +@msg `{path}` is nested too deeply `{path}` ખૂબ ઊંડે નેસ્ટ થયેલું છે +@msg `{path}` must be a bool or an object of bools `{path}` bool અથવા bools નો ઑબ્જેક્ટ હોવો જોઈએ +@msg `{path}` must be {expected}, not {got} `{path}` {expected} હોવું જોઈએ, {got} નહીં +@msg `{raw}` can't name a Kinsoku set (1 to {KINSOKU_NAME_MAX} characters, no control characters, not None, Hard or Soft) `{raw}` Kinsoku સેટનું નામ ન હોઈ શકે (1 થી {KINSOKU_NAME_MAX} અક્ષરો, કંટ્રોલ અક્ષરો વિના, None, Hard કે Soft નહીં) +@msg `{raw}` can't name a character set (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` અક્ષર સેટનું નામ ન હોઈ શકે (1 થી {COMPOSITE_NAME_MAX} અક્ષરો, કંટ્રોલ અક્ષરો વિના) +@msg `{raw}` can't name a composite font (1 to {COMPOSITE_NAME_MAX} characters, no control characters) `{raw}` કમ્પોઝિટ ફોન્ટનું નામ ન હોઈ શકે (1 થી {COMPOSITE_NAME_MAX} અક્ષરો, કંટ્રોલ અક્ષરો વિના) +@msg `{swatch}` needs a global or spot base swatch `{base}` `{swatch}` ને ગ્લોબલ કે સ્પોટ બેઝ સ્વેચ `{base}` જોઈએ +@msg `{s}`: the step's references copy in more than {_1} MB of values `{s}`: સ્ટેપના સંદર્ભો {_1} MB કરતાં વધુ કિંમતો નકલ કરે છે +@msg `{tag}` is not an OpenType feature the panel sets `{tag}` પેનલ સેટ કરે છે તેવું OpenType ફીચર નથી +@msg `{tag}` is not an axis tag: a tag is four characters, such as "wght" `{tag}` અક્ષ ટૅગ નથી: ટૅગ "wght" જેવા ચાર અક્ષરોનો હોય છે +@msg `{text}`: step {i}'s result has no such value (write $$ for a literal $) `{text}`: સ્ટેપ {i} ના પરિણામમાં આવી કોઈ કિંમત નથી (શાબ્દિક $ માટે $$ લખો) +@msg `{text}`: there is no step {i} before this one (steps count from 0; write $$ for a literal $) `{text}`: આની પહેલાં કોઈ સ્ટેપ {i} નથી (સ્ટેપ 0 થી ગણાય છે; શાબ્દિક $ માટે $$ લખો) +@msg `{tool}` isn't a Liquify tool `{tool}` લિક્વિફાઇ ટૂલ નથી +@msg `{tool}` isn't a freehand tool `{tool}` ફ્રીહેન્ડ ટૂલ નથી +@msg `{to}` is empty or already used `{to}` ખાલી છે અથવા પહેલેથી વપરાયેલું છે +@msg `{u}` is no Unicode character `{u}` કોઈ Unicode અક્ષર નથી +@msg `{var_key}` must be from {_1} to {most} `{var_key}` {_1} થી {most} સુધી હોવું જોઈએ +@msg `{what}` closes nothing `{what}` કંઈ બંધ કરતું નથી +@msg `{what}` closes something it didn't open `{what}` એવું કંઈક બંધ કરે છે જે તેણે ખોલ્યું ન હતું +@msg `{what}` is longer than {MAX_TEXT} bytes `{what}` {MAX_TEXT} બાઇટ્સ કરતાં લાંબું છે +@msg `{what}` must be text `{what}` ટેક્સ્ટ હોવું જોઈએ +@msg `{word}` isn't in the custom dictionary `{word}` કસ્ટમ ડિક્શનરીમાં નથી +@msg `{w}` takes no operands `{w}` કોઈ ઑપરેન્ડ લેતું નથી +@msg a 3D effect on a group's fill or stroke draws nothing ગ્રૂપના ફિલ કે સ્ટ્રોક પરની 3D ઇફેક્ટ કંઈ દોરતી નથી +@msg a 3D effect on a group's fill or stroke draws nothing to export ગ્રૂપના ફિલ કે સ્ટ્રોક પરની 3D ઇફેક્ટ એક્સપોર્ટ કરવા માટે કંઈ દોરતી નથી +@msg a CMYK image can't take a color mask CMYK ઇમેજ કલર માસ્ક લઈ શકતી નથી +@msg a CMYK image has no transparency to set CMYK ઇમેજમાં સેટ કરવા માટે કોઈ પારદર્શકતા નથી +@msg a CMap has too many mappings CMap માં ઘણાં બધાં મૅપિંગ છે +@msg a DXF drawing has one origin: pass useArtboards: true for one drawing per artboard DXF ડ્રૉઇંગનું એક જ ઉદ્ગમબિંદુ હોય છે: આર્ટબોર્ડ દીઠ એક ડ્રૉઇંગ માટે useArtboards: true આપો +@msg a JavaScript plug-in can't list the permission `{name}`: of the host's permissions it may list `progress` JavaScript પ્લગ-ઇન `{name}` પરવાનગી દર્શાવી શકતું નથી: હોસ્ટની પરવાનગીઓમાંથી તે `progress` દર્શાવી શકે છે +@msg a JavaScript plug-in makes no command calls JavaScript પ્લગ-ઇન કોઈ આદેશ કૉલ કરતું નથી +@msg a JavaScript plug-in's manifest gives `runtime` "js" JavaScript પ્લગ-ઇનનું મેનિફેસ્ટ `runtime` "js" આપે છે +@msg a Live Paint group's sources group stays in the group: move the paths in it instead લાઇવ પેઇન્ટ ગ્રૂપનું સ્રોત ગ્રૂપ ગ્રૂપમાં જ રહે છે: તેના બદલે તેમાંના પાથ ખસેડો +@msg a PDF presets file with over {_1} presets {_1} થી વધુ પ્રીસેટવાળી PDF પ્રીસેટ ફાઇલ +@msg a ScriptUI dialog opens with show() ScriptUI ડાયલૉગ show() વડે ખૂલે છે +@msg a WebAssembly module's manifest leaves `runtime` out: "js" is for a JavaScript plug-in WebAssembly મૉડ્યુલનું મેનિફેસ્ટ `runtime` છોડી દે છે: "js" JavaScript પ્લગ-ઇન માટે છે +@msg a \\u escape needs four hexadecimal digits \\u એસ્કેપને ચાર હેક્સાડેસિમલ અંકો જોઈએ +@msg a batch preview cannot switch documents બૅચ પ્રિવ્યૂ દસ્તાવેજો બદલી શકતું નથી +@msg a bristle brush has no options of its own on a path બ્રિસ્ટલ બ્રશના પાથ પર પોતાના કોઈ વિકલ્પો નથી +@msg a bristle brush name can have at most {max} characters: `{name}` has {count} બ્રિસ્ટલ બ્રશના નામમાં વધુમાં વધુ {max} અક્ષરો હોઈ શકે: `{name}` માં {count} છે +@msg a brush named `{nn}` exists `{nn}` નામનું બ્રશ અસ્તિત્વમાં છે +@msg a button label has at most {MAX_LABEL} characters બટન લેબલમાં વધુમાં વધુ {MAX_LABEL} અક્ષરો હોય છે +@msg a change's `value` must be a string, a number or null ફેરફારનું `value` સ્ટ્રિંગ, સંખ્યા અથવા null હોવું જોઈએ +@msg a class can extend only a constructor or null ક્લાસ ફક્ત કન્સ્ટ્રક્ટર અથવા null ને જ extend કરી શકે છે +@msg a class constructor cannot be called without 'new' ક્લાસ કન્સ્ટ્રક્ટરને 'new' વિના કૉલ કરી શકાતો નથી +@msg a clipping path can't change its place in the stacking order ક્લિપિંગ પાથ સ્ટૅકિંગ ક્રમમાં પોતાનું સ્થાન બદલી શકતો નથી +@msg a color (a string, [r, g, b] or an object) રંગ (સ્ટ્રિંગ, [r, g, b] અથવા ઑબ્જેક્ટ) +@msg a color component રંગ ઘટક +@msg a color default must be a color object or a hex string such as "#3a7bd5" રંગ ડિફૉલ્ટ રંગ ઑબ્જેક્ટ અથવા "#3a7bd5" જેવી હેક્સ સ્ટ્રિંગ હોવી જોઈએ +@msg a color object or a hex string such as "#3a7bd5" રંગ ઑબ્જેક્ટ અથવા "#3a7bd5" જેવી હેક્સ સ્ટ્રિંગ +@msg a colour index is 0 to {_1}, not {n} રંગ ઇન્ડેક્સ 0 થી {_1} હોય છે, {n} નહીં +@msg a colour is an index, #rrggbb or a preset name, not {v} રંગ ઇન્ડેક્સ, #rrggbb અથવા પ્રીસેટ નામ હોય છે, {v} નહીં +@msg a comma in an XPath expression must separate function arguments XPath એક્સપ્રેશનમાં અલ્પવિરામ ફંક્શનના આર્ગ્યુમેન્ટ્સને અલગ કરતું હોવું જોઈએ +@msg a composite font keeps at most {CUSTOM_SETS_MAX} character sets કમ્પોઝિટ ફોન્ટ વધુમાં વધુ {CUSTOM_SETS_MAX} અક્ષર સેટ રાખે છે +@msg a container of the listed objects is gone દર્શાવેલા ઑબ્જેક્ટ્સનું એક કન્ટેનર હવે નથી +@msg a content stream can't be read કન્ટેન્ટ સ્ટ્રીમ વાંચી શકાતી નથી +@msg a content stream isn't a stream કન્ટેન્ટ સ્ટ્રીમ સ્ટ્રીમ નથી +@msg a control is not a value કંટ્રોલ કિંમત નથી +@msg a curved bridge is always connected: leave `connect` out or set it true વળાંકવાળો બ્રિજ હંમેશાં જોડાયેલો હોય છે: `connect` છોડી દો અથવા તેને true સેટ કરો +@msg a derived class constructor must return an object or undefined ડિરાઇવ્ડ ક્લાસ કન્સ્ટ્રક્ટરે ઑબ્જેક્ટ અથવા undefined પરત કરવું જોઈએ +@msg a design holds at most {_1} objects ડિઝાઇનમાં વધુમાં વધુ {_1} ઑબ્જેક્ટ હોય છે +@msg a design needs a name ડિઝાઇનને નામ જોઈએ +@msg a dictionary grew too large ડિક્શનરી ખૂબ મોટી થઈ ગઈ +@msg a discontinuous width point keeps its place અસતત પહોળાઈ પોઇન્ટ પોતાનું સ્થાન રાખે છે +@msg a document as the relative object is not available yet સંબંધિત ઑબ્જેક્ટ તરીકે દસ્તાવેજ હજી ઉપલબ્ધ નથી +@msg a document holds at most {_1} SVG filters દસ્તાવેજમાં વધુમાં વધુ {_1} SVG ફિલ્ટર હોય છે +@msg a document holds at most {_1} SVG filters, and applying a default filter adds it દસ્તાવેજમાં વધુમાં વધુ {_1} SVG ફિલ્ટર હોય છે, અને ડિફૉલ્ટ ફિલ્ટર લાગુ કરવાથી તે ઉમેરાય છે +@msg a document keeps at most {COMPOSITE_FONTS_MAX} composite fonts દસ્તાવેજ વધુમાં વધુ {COMPOSITE_FONTS_MAX} કમ્પોઝિટ ફોન્ટ રાખે છે +@msg a document keeps at most {KINSOKU_SETS_MAX} Kinsoku sets દસ્તાવેજ વધુમાં વધુ {KINSOKU_SETS_MAX} Kinsoku સેટ રાખે છે +@msg a document keeps at most {_1} graph designs દસ્તાવેજ વધુમાં વધુ {_1} ગ્રાફ ડિઝાઇન રાખે છે +@msg a document keeps at most {_1} saved selections દસ્તાવેજ વધુમાં વધુ {_1} સાચવેલી પસંદગીઓ રાખે છે +@msg a document keeps at most {_1} views દસ્તાવેજ વધુમાં વધુ {_1} વ્યૂઝ રાખે છે +@msg a document links at most {MAX_SVG_SCRIPTS} JavaScript files દસ્તાવેજ વધુમાં વધુ {MAX_SVG_SCRIPTS} JavaScript ફાઇલો લિંક કરે છે +@msg a document needs at least one artboard દસ્તાવેજમાં ઓછામાં ઓછું એક આર્ટબોર્ડ હોવું જોઈએ +@msg a document needs at least one layer દસ્તાવેજમાં ઓછામાં ઓછું એક લેયર હોવું જોઈએ +@msg a document with unsaved changes has no recovery copy ન સાચવેલા ફેરફારોવાળા દસ્તાવેજની કોઈ પુનઃપ્રાપ્તિ નકલ નથી +@msg a drag or an undo group is open; finish it before running a script ડ્રેગ અથવા પૂર્વવત્ ગ્રૂપ ખુલ્લું છે; સ્ક્રિપ્ટ ચલાવતા પહેલાં તેને પૂરું કરો +@msg a failed command changed undo steps that could not be put back, so the script was stopped નિષ્ફળ આદેશે એવાં પૂર્વવત્ પગલાં બદલ્યાં જે પાછાં મૂકી શકાયાં નહીં, તેથી સ્ક્રિપ્ટ અટકાવવામાં આવી +@msg a feConvolveMatrix filter's order is {x}×{y}, which overflows the kernel-size multiply usvg makes feConvolveMatrix ફિલ્ટરનો ક્રમ {x}×{y} છે, જે usvg કરે છે તે કર્નલ-કદના ગુણાકારને ઓવરફ્લો કરે છે +@msg a font's data is too large ફોન્ટનો ડેટા ખૂબ મોટો છે +@msg a font's subroutines are too large ફોન્ટના સબરૂટિન ખૂબ મોટા છે +@msg a frame cannot be linked to itself ફ્રેમને પોતાની સાથે લિંક કરી શકાતી નથી +@msg a frame of either story is hidden or locked કોઈ એક સ્ટોરીની ફ્રેમ છુપાયેલી કે લૉક કરેલી છે +@msg a frame of the story is hidden or locked સ્ટોરીની એક ફ્રેમ છુપાયેલી કે લૉક કરેલી છે +@msg a freeform gradient holds at most {MAX_ITEMS} points and lines ફ્રીફોર્મ ગ્રેડિયન્ટમાં વધુમાં વધુ {MAX_ITEMS} પોઇન્ટ અને લાઇન હોય છે +@msg a freeform gradient keeps at least one point ફ્રીફોર્મ ગ્રેડિયન્ટ ઓછામાં ઓછો એક પોઇન્ટ રાખે છે +@msg a freeform gradient line names a point it doesn't have ફ્રીફોર્મ ગ્રેડિયન્ટ લાઇન એવા પોઇન્ટનું નામ આપે છે જે તેમાં નથી +@msg a function declaration without a name નામ વિનાનું ફંક્શન ડિક્લેરેશન +@msg a function type exceeds the limit of {MAX_FUNC_TYPE_VALUES} parameters ફંક્શન પ્રકાર {MAX_FUNC_TYPE_VALUES} પેરામીટરની મર્યાદા ઓળંગે છે +@msg a function type exceeds the limit of {MAX_FUNC_TYPE_VALUES} results ફંક્શન પ્રકાર {MAX_FUNC_TYPE_VALUES} પરિણામોની મર્યાદા ઓળંગે છે +@msg a generated art object's plug-in id or parameters are damaged, so its art can't be drawn again: the art stays as it is જનરેટ કરેલા આર્ટ ઑબ્જેક્ટનું પ્લગ-ઇન id અથવા પેરામીટર્સ ખરાબ થયેલા છે, તેથી તેની આર્ટ ફરી દોરી શકાતી નથી: આર્ટ જેમ છે તેમ રહે છે +@msg a generator always gets the usual budget: leave `budget` out જનરેટરને હંમેશાં સામાન્ય બજેટ મળે છે: `budget` છોડી દો +@msg a generator function is not a constructor જનરેટર ફંક્શન કન્સ્ટ્રક્ટર નથી +@msg a generator instruction outside a generator function જનરેટર ફંક્શનની બહાર જનરેટર સૂચના +@msg a generator returns `objects`, not `{key}` જનરેટર `objects` પરત કરે છે, `{key}` નહીં +@msg a generator's objects are new: leave `id` out જનરેટરના ઑબ્જેક્ટ નવા હોય છે: `id` છોડી દો +@msg a gradient needs 1-{MAX_ITEMS} stops ગ્રેડિયન્ટને 1-{MAX_ITEMS} સ્ટૉપ જોઈએ +@msg a gradient needs at least two stops ગ્રેડિયન્ટને ઓછામાં ઓછા બે સ્ટૉપ જોઈએ +@msg a gradient preset is already called {n} {n} નામનો ગ્રેડિયન્ટ પ્રીસેટ પહેલેથી છે +@msg a graph has at most {_1} series, so it transposes with at most that many categories ગ્રાફમાં વધુમાં વધુ {_1} સિરીઝ હોય છે, તેથી તે વધુમાં વધુ તેટલી જ કૅટેગરી સાથે ટ્રાન્સપોઝ થાય છે +@msg a graphic style named `{to}` already exists `{to}` નામની ગ્રાફિક સ્ટાઇલ પહેલેથી અસ્તિત્વમાં છે +@msg a group crosses a multi-layer mask ગ્રૂપ મલ્ટિ-લેયર માસ્કને ઓળંગે છે +@msg a guide has no curvature circle ગાઇડ પાસે વક્રતા વર્તુળ નથી +@msg a heavy filter runs in the background, so it can't declare `commands` ભારે ફિલ્ટર બૅકગ્રાઉન્ડમાં ચાલે છે, તેથી તે `commands` જાહેર કરી શકતું નથી +@msg a host function returned a Symbol in a realm without Symbol હોસ્ટ ફંક્શને Symbol વિનાના realm માં Symbol પરત કર્યો +@msg a host function waited for its result where the run cannot pause હોસ્ટ ફંક્શને એવી જગ્યાએ પોતાના પરિણામની રાહ જોઈ જ્યાં રન થોભી શકતું નથી +@msg a host value has too many entries હોસ્ટ કિંમતમાં ઘણી બધી એન્ટ્રીઓ છે +@msg a host value is nested too deep હોસ્ટ કિંમત ખૂબ ઊંડે નેસ્ટ થયેલી છે +@msg a host value names an object of a host class wrongly હોસ્ટ કિંમત હોસ્ટ ક્લાસના ઑબ્જેક્ટનું ખોટું નામ આપે છે +@msg a host value names the unknown class {name} હોસ્ટ કિંમત અજાણ્યા ક્લાસ {name} નું નામ આપે છે +@msg a key object sits on that point તે પોઇન્ટ પર કી ઑબ્જેક્ટ છે +@msg a layer can't be merged into its own sublayer લેયરને તેના પોતાના સબલેયરમાં મર્જ કરી શકાતું નથી +@msg a layer of the .pcraft document doesn't cover its canvas .pcraft દસ્તાવેજનું એક લેયર તેના કૅનવાસને ઢાંકતું નથી +@msg a layer of the PSD file is too large to read PSD ફાઇલનું એક લેયર વાંચવા માટે ખૂબ મોટું છે +@msg a layer's form box isn't an array લેયરના ફોર્મનું બૉક્સ એરે નથી +@msg a layer's form can't be read લેયરનું ફોર્મ વાંચી શકાતું નથી +@msg a layer's form has no box લેયરના ફોર્મમાં બૉક્સ નથી +@msg a layer's form has no dictionary લેયરના ફોર્મમાં ડિક્શનરી નથી +@msg a legend draws at most {MAX_CHIPS} swatches લેજન્ડ વધુમાં વધુ {MAX_CHIPS} સ્વેચ દોરે છે +@msg a line can't run from a point to itself લાઇન પોઇન્ટથી પોતાના સુધી જઈ શકતી નથી +@msg a line needs at least two points લાઇનને ઓછામાં ઓછા બે પોઇન્ટ જોઈએ +@msg a linked JavaScript file is outside the read roots લિંક કરેલી JavaScript ફાઇલ રીડ રૂટ્સની બહાર છે +@msg a linked file's editing data can't be read to check it against the read roots લિંક કરેલી ફાઇલનો સંપાદન ડેટા રીડ રૂટ્સ સામે તપાસવા માટે વાંચી શકાતો નથી +@msg a linked file's export folder is outside the read roots લિંક કરેલી ફાઇલનું એક્સપોર્ટ ફોલ્ડર રીડ રૂટ્સની બહાર છે +@msg a linked image can't become a gradient mesh: embed it first લિંક કરેલી ઇમેજ ગ્રેડિયન્ટ મેશ બની શકતી નથી: પહેલાં તેને એમ્બેડ કરો +@msg a linked image file is outside the read roots લિંક કરેલી ઇમેજ ફાઇલ રીડ રૂટ્સની બહાર છે +@msg a list યાદી +@msg a list of numbers સંખ્યાઓની યાદી +@msg a list of object ids ઑબ્જેક્ટ id ની યાદી +@msg a list of {min_items} to {max_items} numbers {min_items} થી {max_items} સંખ્યાઓની યાદી +@msg a list's `value` must be an item index or null યાદીનું `value` આઇટમ ઇન્ડેક્સ અથવા null હોવું જોઈએ +@msg a live effect runs while the document is drawn, so it can't be `heavy` લાઇવ ઇફેક્ટ દસ્તાવેજ દોરાતી વખતે ચાલે છે, તેથી તે `heavy` ન હોઈ શકે +@msg a mask has more than one art block માસ્કમાં એક કરતાં વધુ આર્ટ બ્લૉક છે +@msg a method is not a constructor મેથડ કન્સ્ટ્રક્ટર નથી +@msg a module namespace object is not extensible મૉડ્યુલ નેમસ્પેસ ઑબ્જેક્ટ વિસ્તારી શકાય તેવો નથી +@msg a module namespace object is read-only મૉડ્યુલ નેમસ્પેસ ઑબ્જેક્ટ ફક્ત વાંચવા પૂરતો છે +@msg a multi-layer mask needs one clipping path મલ્ટિ-લેયર માસ્કને એક ક્લિપિંગ પાથ જોઈએ +@msg a multi-layer mask's operators are out of order મલ્ટિ-લેયર માસ્કના ઑપરેટર ક્રમ બહાર છે +@msg a name names one asset: give multiple: false, or one object નામ એક એસેટ દર્શાવે છે: multiple: false આપો, અથવા એક ઑબ્જેક્ટ +@msg a namespace declaration uses a reserved prefix or URI નેમસ્પેસ ડિક્લેરેશન આરક્ષિત પ્રિફિક્સ અથવા URI વાપરે છે +@msg a namespace qualifier is undefined નેમસ્પેસ ક્વૉલિફાયર વ્યાખ્યાયિત નથી +@msg a namespace with an empty URI cannot have a prefix ખાલી URI વાળા નેમસ્પેસને પ્રિફિક્સ ન હોઈ શકે +@msg a negative `aspect` applies to conic gradients ઋણ `aspect` કોનિક ગ્રેડિયન્ટ પર લાગુ થાય છે +@msg a negative gap must be smaller than the width or height it is between ઋણ ગેપ તે જે પહોળાઈ કે ઊંચાઈ વચ્ચે છે તેના કરતાં નાનો હોવો જોઈએ +@msg a new document cannot have the units {s} નવા દસ્તાવેજમાં {s} એકમો ન હોઈ શકે +@msg a new document has no artboard નવા દસ્તાવેજમાં કોઈ આર્ટબોર્ડ નથી +@msg a new object needs a `path` નવા ઑબ્જેક્ટને `path` જોઈએ +@msg a nullish jump that drops no values કોઈ કિંમત ન છોડતો nullish જમ્પ +@msg a number સંખ્યા +@msg a number ({_1}) સંખ્યા ({_1}) +@msg a number < {_1} સંખ્યા < {_1} +@msg a number < {_1} ({_2}) સંખ્યા < {_1} ({_2}) +@msg a number <= {_1} સંખ્યા <= {_1} +@msg a number <= {_1} ({_2}) સંખ્યા <= {_1} ({_2}) +@msg a number > {_1} સંખ્યા > {_1} +@msg a number > {_1} ({_2}) સંખ્યા > {_1} ({_2}) +@msg a number > {_1} and < {_2} સંખ્યા > {_1} અને < {_2} +@msg a number > {_1} and < {_2} ({_3}) સંખ્યા > {_1} અને < {_2} ({_3}) +@msg a number > {_1} and <= {_2} સંખ્યા > {_1} અને <= {_2} +@msg a number > {_1} and <= {_2} ({_3}) સંખ્યા > {_1} અને <= {_2} ({_3}) +@msg a number >= {_1} સંખ્યા >= {_1} +@msg a number >= {_1} ({_2}) સંખ્યા >= {_1} ({_2}) +@msg a number >= {_1} and < {_2} સંખ્યા >= {_1} અને < {_2} +@msg a number >= {_1} and < {_2} ({_3}) સંખ્યા >= {_1} અને < {_2} ({_3}) +@msg a number cannot be read સંખ્યા વાંચી શકાતી નથી +@msg a number has no digits સંખ્યામાં કોઈ અંક નથી +@msg a number is out of range (limit ±{MAX_COORD}) સંખ્યા શ્રેણીની બહાર છે (મર્યાદા ±{MAX_COORD}) +@msg a number {_1} to {_2} {_1} થી {_2} સુધીની સંખ્યા +@msg a number {_1} to {_2} ({_3}) {_1} થી {_2} સુધીની સંખ્યા ({_3}) +@msg a number's exponent has no digits સંખ્યાના ઘાતાંકમાં કોઈ અંક નથી +@msg a number's fraction has no digits સંખ્યાના અપૂર્ણાંક ભાગમાં કોઈ અંક નથી +@msg a page can't be read પેજ વાંચી શકાતું નથી +@msg a page is missing એક પેજ ખૂટે છે +@msg a page object is used by something else પેજ ઑબ્જેક્ટ બીજી કોઈ વસ્તુ દ્વારા વપરાય છે +@msg a page out of range શ્રેણીની બહારનું પેજ +@msg a page thumbnail must be RGB pixels, 1 to {THUMBNAIL_SIZE} a side (got {w} × {h}) પેજ થંબનેલ RGB પિક્સેલ હોવું જોઈએ, દરેક બાજુ 1 થી {THUMBNAIL_SIZE} ({w} × {h} મળ્યું) +@msg a page tree kid isn't a reference પેજ ટ્રીનો ચાઇલ્ડ સંદર્ભ નથી +@msg a page tree node has no kids પેજ ટ્રી નોડમાં કોઈ ચાઇલ્ડ નથી +@msg a page's placement is not finite પેજનું સ્થાન સીમિત નથી +@msg a painted live effect returns only `objects` and `notice` પેઇન્ટેડ લાઇવ ઇફેક્ટ ફક્ત `objects` અને `notice` પરત કરે છે +@msg a painted live effect's piece has only `path`, `fillRule`, `fills` and `strokes` પેઇન્ટેડ લાઇવ ઇફેક્ટના ટુકડામાં ફક્ત `path`, `fillRule`, `fills` અને `strokes` હોય છે +@msg a painted live effect's piece has only `path`, `fillRule`, `fills`, `strokes`, `opacity`, `blend` and `effects` પેઇન્ટેડ લાઇવ ઇફેક્ટના ટુકડામાં ફક્ત `path`, `fillRule`, `fills`, `strokes`, `opacity`, `blend` અને `effects` હોય છે +@msg a path has too many points પાથમાં ઘણાં વધારે બિંદુઓ છે +@msg a pattern layer doesn't end what it starts પેટર્ન લેયર જે શરૂ કરે છે તે પૂરું કરતું નથી +@msg a pattern layer's colors hold something else પેટર્ન લેયરના રંગોમાં બીજું કંઈક છે +@msg a pattern named `{n}` exists `{n}` નામની પેટર્ન અસ્તિત્વમાં છે +@msg a plate એક પ્લેટ +@msg a plug-in may not call this command પ્લગ-ઇન આ કમાન્ડ કૉલ કરી શકતું નથી +@msg a plug-in of kind `{_1}` needs the permission `{_2}` `{_1}` પ્રકારના પ્લગ-ઇનને `{_2}` પરવાનગી જોઈએ +@msg a plug-in with id {_1} is already installed id {_1} વાળું પ્લગ-ઇન પહેલેથી ઇન્સ્ટોલ છે +@msg a point's pressure must be a number, not {f} બિંદુનું દબાણ સંખ્યા હોવું જોઈએ, {f} નહીં +@msg a preset named `{name}` exists `{name}` નામનું પ્રીસેટ અસ્તિત્વમાં છે +@msg a preset named `{n}` exists `{n}` નામનું પ્રીસેટ અસ્તિત્વમાં છે +@msg a print presets file with over {_1} presets {_1} થી વધુ પ્રીસેટ્સ ધરાવતી પ્રિન્ટ પ્રીસેટ્સ ફાઇલ +@msg a process color can't colorize a grayscale image with transparency: use a spot color, black or white પ્રોસેસ રંગ પારદર્શકતાવાળી ગ્રેસ્કેલ ઇમેજને રંગી શકતો નથી: સ્પૉટ રંગ, કાળો અથવા સફેદ વાપરો +@msg a profile is already called {n} {n} નામની પ્રોફાઇલ પહેલેથી છે +@msg a property descriptor cannot have both a value or writable and a get or set પ્રોપર્ટી ડિસ્ક્રિપ્ટરમાં value અથવા writable અને get અથવા set બંને ન હોઈ શકે +@msg a property descriptor must be an object પ્રોપર્ટી ડિસ્ક્રિપ્ટર ઑબ્જેક્ટ હોવો જોઈએ +@msg a property's {name} must be a function or undefined પ્રોપર્ટીનું {name} ફંક્શન અથવા undefined હોવું જોઈએ +@msg a proxy's handler must be an object પ્રૉક્સીનો હેન્ડલર ઑબ્જેક્ટ હોવો જોઈએ +@msg a proxy's target must be an object પ્રૉક્સીનું ટાર્ગેટ ઑબ્જેક્ટ હોવું જોઈએ +@msg a proxy's {what} cannot be a revoked proxy પ્રૉક્સીનું {what} રદ કરાયેલું પ્રૉક્સી ન હોઈ શકે +@msg a read-only object was left out ફક્ત વાંચી શકાય તેવો એક ઑબ્જેક્ટ છોડી દેવાયો +@msg a read-only object was left out: return it, as {{"id": …}} alone or as it was given ફક્ત વાંચી શકાય તેવો એક ઑબ્જેક્ટ છોડી દેવાયો: તેને એકલા {{"id": …}} તરીકે અથવા જેમ આપ્યો હતો તેમ પાછો આપો +@msg a recovery copy could not be written, so the script was not run રિકવરી નકલ લખી શકાઈ નહીં, તેથી સ્ક્રિપ્ટ ચલાવાઈ નહીં +@msg a result carries at most {MAX_RESULT_EFFECTS} effect records પરિણામમાં વધુમાં વધુ {MAX_RESULT_EFFECTS} ઇફેક્ટ રેકોર્ડ હોય છે +@msg a row can't go into itself પંક્તિ પોતાની અંદર જઈ શકતી નથી +@msg a run must be {{"text", "style", "inline"?}} રન {{"text", "style", "inline"?}} હોવો જોઈએ +@msg a script can hold at most {MAX_HANDLES} {what} objects in one run એક રનમાં સ્ક્રિપ્ટ વધુમાં વધુ {MAX_HANDLES} {what} ઑબ્જેક્ટ્સ રાખી શકે છે +@msg a script can make at most {MAX_OPTION_OBJECTS} print option objects in a run એક રનમાં સ્ક્રિપ્ટ વધુમાં વધુ {MAX_OPTION_OBJECTS} પ્રિન્ટ વિકલ્પ ઑબ્જેક્ટ્સ બનાવી શકે છે +@msg a script can make at most {MAX_PRESETS} DocumentPresets સ્ક્રિપ્ટ વધુમાં વધુ {MAX_PRESETS} DocumentPresets બનાવી શકે છે +@msg a script can name at most {MAX_HELD} styles in one run એક રનમાં સ્ક્રિપ્ટ વધુમાં વધુ {MAX_HELD} સ્ટાઇલને નામ આપી શકે છે +@msg a script can print at most {MAX_JOBS} jobs to a printer in a run એક રનમાં સ્ક્રિપ્ટ પ્રિન્ટર પર વધુમાં વધુ {MAX_JOBS} જોબ છાપી શકે છે +@msg a script's printer jobs can hold at most 32 MiB in a run એક રનમાં સ્ક્રિપ્ટના પ્રિન્ટર જોબમાં વધુમાં વધુ 32 MiB હોઈ શકે છે +@msg a script's printer jobs can hold at most {MAX_SHEETS} sheets in a run; this job has {pages} એક રનમાં સ્ક્રિપ્ટના પ્રિન્ટર જોબમાં વધુમાં વધુ {MAX_SHEETS} શીટ હોઈ શકે છે; આ જોબમાં {pages} છે +@msg a selection is a page item, a list of them, null or [] પસંદગી એટલે પેજ આઇટમ, તેમની સૂચિ, null અથવા [] +@msg a selection takes at most {MAX_LISTED} objects પસંદગીમાં વધુમાં વધુ {MAX_LISTED} ઑબ્જેક્ટ્સ હોઈ શકે છે +@msg a series goes on the left or the right value axis શ્રેણી ડાબા અથવા જમણા વેલ્યુ અક્ષ પર જાય છે +@msg a shape has no outline આકારની કોઈ આઉટલાઇન નથી +@msg a slice in the slices' descriptor has no bounds સ્લાઇસના ડિસ્ક્રિપ્ટરમાં એક સ્લાઇસની સીમા નથી +@msg a slice size must be a positive number of points સ્લાઇસનું કદ પોઇન્ટની ધન સંખ્યા હોવું જોઈએ +@msg a slice's bounds in the slices' descriptor aren't numbers સ્લાઇસના ડિસ્ક્રિપ્ટરમાં એક સ્લાઇસની સીમા સંખ્યાઓ નથી +@msg a slice's text has more than the {MAX_SLICE_TEXT} characters a PSD file holds સ્લાઇસના ટેક્સ્ટમાં PSD ફાઇલ રાખી શકે તેટલા {MAX_SLICE_TEXT} અક્ષરો કરતાં વધુ છે +@msg a slider is only for `number` and `int` parameters સ્લાઇડર ફક્ત `number` અને `int` પેરામીટર માટે છે +@msg a slider needs `min` below `max`, and an `int` slider a range within ±{EXACT_INT} સ્લાઇડરમાં `min` એ `max` થી ઓછું હોવું જોઈએ, અને `int` સ્લાઇડરની રેન્જ ±{EXACT_INT} ની અંદર હોવી જોઈએ +@msg a spine keeps at least two points સ્પાઇનમાં ઓછામાં ઓછાં બે બિંદુ રહે છે +@msg a start must be an anchor index ≥ 0 or null શરૂઆત ≥ 0 એન્કર ઇન્ડેક્સ અથવા null હોવી જોઈએ +@msg a stream in it would decode to more than 256 MB, or its decode parameters can't be applied તેમાંની એક સ્ટ્રીમ 256 MB કરતાં વધુમાં ડીકોડ થશે, અથવા તેના ડીકોડ પેરામીટર લાગુ કરી શકાતા નથી +@msg a stream runs past the end સ્ટ્રીમ અંતથી આગળ જાય છે +@msg a stream's length is wrong સ્ટ્રીમની લંબાઈ ખોટી છે +@msg a stream's length isn't a number સ્ટ્રીમની લંબાઈ સંખ્યા નથી +@msg a string એક સ્ટ્રિંગ +@msg a string holds a control character સ્ટ્રિંગમાં કંટ્રોલ અક્ષર છે +@msg a string holds an escape sequence JSON does not have સ્ટ્રિંગમાં એવી એસ્કેપ સિક્વન્સ છે જે JSON માં નથી +@msg a string is not closed સ્ટ્રિંગ બંધ થઈ નથી +@msg a stroke has only `paint`, `width`, `join`, `cap` and `miterLimit` સ્ટ્રોકમાં ફક્ત `paint`, `width`, `join`, `cap` અને `miterLimit` હોય છે +@msg a stroke has only `paint`, `width`, `join`, `cap`, `miterLimit`, `opacity`, `blend` and `effects` સ્ટ્રોકમાં ફક્ત `paint`, `width`, `join`, `cap`, `miterLimit`, `opacity`, `blend` અને `effects` હોય છે +@msg a stroke must be {{"paint", "width"?, "join"?, "cap"?, "miterLimit"?}} સ્ટ્રોક {{"paint", "width"?, "join"?, "cap"?, "miterLimit"?}} હોવો જોઈએ +@msg a style name must be a string સ્ટાઇલનું નામ સ્ટ્રિંગ હોવું જોઈએ +@msg a style name must be at most {MAX_STYLE_NAME} characters સ્ટાઇલનું નામ વધુમાં વધુ {MAX_STYLE_NAME} અક્ષરોનું હોવું જોઈએ +@msg a style name must not be empty સ્ટાઇલનું નામ ખાલી ન હોવું જોઈએ +@msg a style name must not hold control characters સ્ટાઇલના નામમાં કંટ્રોલ અક્ષરો ન હોવા જોઈએ +@msg a style named `{name}` already exists `{name}` નામની સ્ટાઇલ પહેલેથી અસ્તિત્વમાં છે +@msg a style named `{to}` already exists `{to}` નામની સ્ટાઇલ પહેલેથી અસ્તિત્વમાં છે +@msg a style named {name} already exists {name} નામની સ્ટાઇલ પહેલેથી અસ્તિત્વમાં છે +@msg a style named {to} already exists {to} નામની સ્ટાઇલ પહેલેથી અસ્તિત્વમાં છે +@msg a swatch exchange block is too long સ્વેચ એક્સચેન્જ બ્લોક ખૂબ લાંબો છે +@msg a swatch exchange name is too long સ્વેચ એક્સચેન્જ નામ ખૂબ લાંબું છે +@msg a swatch needs a colour, gradient or pattern સ્વેચને રંગ, ગ્રેડિયન્ટ અથવા પેટર્ન જોઈએ +@msg a swatch or color group named `{name}` already exists `{name}` નામનું સ્વેચ અથવા રંગ ગ્રૂપ પહેલેથી અસ્તિત્વમાં છે +@msg a swatch or color group named `{n}` exists `{n}` નામનું સ્વેચ અથવા રંગ ગ્રૂપ અસ્તિત્વમાં છે +@msg a symbol can't hold an instance of itself સિમ્બોલ પોતાનો જ ઇન્સ્ટન્સ રાખી શકતું નથી +@msg a symbol named `{n}` already exists `{n}` નામનું સિમ્બોલ પહેલેથી અસ્તિત્વમાં છે +@msg a tag's {key} is longer than 65,536 bytes ટૅગનું {key} 65,536 બાઇટ કરતાં લાંબું છે +@msg a template whose strings do not match એવો ટેમ્પ્લેટ જેની સ્ટ્રિંગ્સ મેળ ખાતી નથી +@msg a text in the slices has more than the {MAX_TEXT} characters read સ્લાઇસમાંના એક ટેક્સ્ટમાં વાંચી શકાય તેટલા {MAX_TEXT} અક્ષરો કરતાં વધુ છે +@msg a theme has 1 to {THEME_SIZE} colours થીમમાં 1 થી {THEME_SIZE} રંગો હોય છે +@msg a theme is already called {name} (replace: "{name}" overwrites it) {name} નામની થીમ પહેલેથી છે (replace: "{name}" તેને ઓવરરાઇટ કરે છે) +@msg a toolbar holds at most {MAX_COMMANDS} commands ટૂલબારમાં વધુમાં વધુ {MAX_COMMANDS} કમાન્ડ હોય છે +@msg a toolbar name has at most {MAX_NAME} characters ટૂલબારના નામમાં વધુમાં વધુ {MAX_NAME} અક્ષરો હોય છે +@msg a type fill must be a color or a gradient ટાઇપનું ભરણ રંગ અથવા ગ્રેડિયન્ટ હોવું જોઈએ +@msg a variable cannot be given the kind VariableKind.Unknown વેરિએબલને VariableKind.Unknown પ્રકાર આપી શકાતો નથી +@msg a variable of unknown kind can't be bound to objects અજ્ઞાત પ્રકારના વેરિએબલને ઑબ્જેક્ટ્સ સાથે બાંધી શકાતું નથી +@msg a view named `{_1}` exists `{_1}` નામનો વ્યૂ અસ્તિત્વમાં છે +@msg a view named `{name}` exists `{name}` નામનો વ્યૂ અસ્તિત્વમાં છે +@msg a word's `id` must be a type object's id શબ્દનું `id` ટાઇપ ઑબ્જેક્ટનું id હોવું જોઈએ +@msg a word's `{k}` must be a whole number શબ્દનું `{k}` પૂર્ણ સંખ્યા હોવું જોઈએ +@msg a workspace keeps at most {MAX} toolbars વર્કસ્પેસમાં વધુમાં વધુ {MAX} ટૂલબાર રહે છે +@msg a wraparound group is inside a compound path રૅપઅરાઉન્ડ ગ્રૂપ કમ્પાઉન્ડ પાથની અંદર છે +@msg a {_1} series can't go in a {_2} graph {_1} શ્રેણી {_2} ગ્રાફમાં જઈ શકતી નથી +@msg a {sw} × {sh} image can't be resized to {width} × {height} pixels {sw} × {sh} ઇમેજનું કદ {width} × {height} પિક્સેલમાં બદલી શકાતું નથી +@msg a {width} × {height} image is too large {width} × {height} ઇમેજ ખૂબ મોટી છે +@msg a {width} × {height} image: {e} {width} × {height} ઇમેજ: {e} +@msg absolute needs objects selected: ruler guides have no bounding box angle absolute માટે ઑબ્જેક્ટ્સ પસંદ કરેલા હોવા જોઈએ: રૂલર ગાઇડ્સને બાઉન્ડિંગ બૉક્સનો કોણ હોતો નથી +@msg action is required action જરૂરી છે +@msg action step {_1} (`{id}`) failed: {reason} ક્રિયાનું પગલું {_1} (`{id}`) નિષ્ફળ ગયું: {reason} +@msg activeDataset must be a Dataset activeDataset એ Dataset હોવો જોઈએ +@msg add a format to export એક્સપોર્ટ કરવા માટે ફોર્મેટ ઉમેરો +@msg add: give a list's items as an array add: સૂચિની આઇટમ્સ એરે તરીકે આપો +@msg add: give a list's items as the third argument or in properties.items, not both add: સૂચિની આઇટમ્સ ત્રીજા આર્ગ્યુમેન્ટ તરીકે અથવા properties.items માં આપો, બંનેમાં નહીં +@msg addDocument needs a startup preset's name addDocument ને સ્ટાર્ટઅપ પ્રીસેટનું નામ જોઈએ +@msg addEventListener: give the handler as a function addEventListener: હેન્ડલર ફંક્શન તરીકે આપો +@msg aiVersion 7 writes legacy .ai files, not .ait templates aiVersion 7 જૂની .ai ફાઇલો લખે છે, .ait ટેમ્પ્લેટ નહીં +@msg aiVersion {v}: "pdf" (PDF-compatible, the default) or "7" (legacy .ai, version 7) aiVersion {v}: "pdf" (PDF-સુસંગત, ડિફૉલ્ટ) અથવા "7" (જૂની .ai, આવૃત્તિ 7) +@msg alignToPixelGrid must be true or false alignToPixelGrid true અથવા false હોવું જોઈએ +@msg allPages takes true or false allPages true અથવા false લે છે +@msg allowContinue must be true or false allowContinue true અથવા false હોવું જોઈએ +@msg already editing a pattern પેટર્ન પહેલેથી એડિટ થઈ રહી છે +@msg already editing an opacity mask ઓપેસિટી માસ્ક પહેલેથી એડિટ થઈ રહ્યો છે +@msg already editing another object's opacity mask બીજા ઑબ્જેક્ટનો ઓપેસિટી માસ્ક પહેલેથી એડિટ થઈ રહ્યો છે +@msg already in pattern editing mode પહેલેથી પેટર્ન એડિટિંગ મોડમાં છો +@msg an SVG filter has at most {MAX_PRIMITIVES} primitives SVG ફિલ્ટરમાં વધુમાં વધુ {MAX_PRIMITIVES} પ્રિમિટિવ હોય છે +@msg an SVG filter has no event attributes such as {_1} SVG ફિલ્ટરમાં {_1} જેવા ઇવેન્ટ એટ્રિબ્યુટ હોતા નથી +@msg an SVG filter is at most {_1} KB SVG ફિલ્ટર વધુમાં વધુ {_1} KB નું હોય છે +@msg an SVG filter is named by its id: give `xml` with `name` SVG ફિલ્ટરનું નામ તેના id થી હોય છે: `xml` સાથે `name` આપો +@msg an SVG filter's elements nest at most {MAX_DEPTH} deep SVG ફિલ્ટરના એલિમેન્ટ વધુમાં વધુ {MAX_DEPTH} સ્તર ઊંડે નેસ્ટ થાય છે +@msg an SVG filter's id is at most {MAX_NAME} characters SVG ફિલ્ટરનું id વધુમાં વધુ {MAX_NAME} અક્ષરોનું હોય છે +@msg an SVG filter's images are PNG, JPEG, GIF or WebP data: URLs SVG ફિલ્ટરની ઇમેજ PNG, JPEG, GIF અથવા WebP data: URL હોય છે +@msg an SVG filter's images have at most {MAX_IMAGE_PIXELS} pixels in all SVG ફિલ્ટરની ઇમેજમાં કુલ વધુમાં વધુ {MAX_IMAGE_PIXELS} પિક્સેલ હોય છે +@msg an XML element has two attributes with the same name XML એલિમેન્ટમાં એક જ નામના બે એટ્રિબ્યુટ છે +@msg an XML value cannot be inserted into itself or its descendants XML વેલ્યુ પોતાની અંદર કે તેના વંશજોમાં દાખલ કરી શકાતી નથી +@msg an XML value's children cannot be assigned by position XML વેલ્યુના ચાઇલ્ડ સ્થાન પ્રમાણે અસાઇન કરી શકાતા નથી +@msg an XML value's children cannot be deleted by position XML વેલ્યુના ચાઇલ્ડ સ્થાન પ્રમાણે ડિલીટ કરી શકાતા નથી +@msg an XMLList converts to XML only when it has one item XMLList માં એક જ આઇટમ હોય ત્યારે જ તે XML માં રૂપાંતરિત થાય છે +@msg an XPath node test is missing XPath નોડ ટેસ્ટ ખૂટે છે +@msg an XPath operand is missing XPath ઓપરેન્ડ ખૂટે છે +@msg an XPath operator is missing XPath ઓપરેટર ખૂટે છે +@msg an XPath predicate or step cannot follow here અહીં XPath પ્રેડિકેટ કે સ્ટેપ આવી શકતું નથી +@msg an XPath predicate or step follows a value that is not a node-set XPath પ્રેડિકેટ કે સ્ટેપ એવી વેલ્યુ પછી આવે છે જે node-set નથી +@msg an XPath step is missing XPath સ્ટેપ ખૂટે છે +@msg an action in the action set file has more than 10,000 steps ક્રિયા સેટ ફાઇલમાંની એક ક્રિયામાં 10,000 કરતાં વધુ પગલાં છે +@msg an action is already playing એક ક્રિયા પહેલેથી ચાલી રહી છે +@msg an action is already recording એક ક્રિયા પહેલેથી રેકોર્ડ થઈ રહી છે +@msg an action with this name already exists આ નામની ક્રિયા પહેલેથી અસ્તિત્વમાં છે +@msg an action's or a set's name is at most {MAX_NAME_BYTES} bytes ક્રિયા કે સેટનું નામ વધુમાં વધુ {MAX_NAME_BYTES} બાઇટનું હોય છે +@msg an array buffer of {len} bytes is larger than the heap limit allows {len} બાઇટનું એરે બફર હીપ મર્યાદા કરતાં મોટું છે +@msg an arrow function is not a constructor એરો ફંક્શન કન્સ્ટ્રક્ટર નથી +@msg an artboard is listed twice એક આર્ટબોર્ડ બે વાર સૂચિબદ્ધ છે +@msg an effect must be {{"id", "params"?, "visible"?}} ઇફેક્ટ {{"id", "params"?, "visible"?}} હોવી જોઈએ +@msg an effect on a fill returns only `fills` ભરણ પરની ઇફેક્ટ ફક્ત `fills` પાછું આપે છે +@msg an effect on a stroke returns only `strokes` સ્ટ્રોક પરની ઇફેક્ટ ફક્ત `strokes` પાછું આપે છે +@msg an element cannot be deleted એલિમેન્ટ ડિલીટ કરી શકાતું નથી +@msg an empty artboard has no width or height to scale to ખાલી આર્ટબોર્ડમાં સ્કેલ કરવા માટે પહોળાઈ કે ઊંચાઈ નથી +@msg an entry is not an object એક એન્ટ્રી ઑબ્જેક્ટ નથી +@msg an exporter always gets an export's budget: leave `budget` out એક્સપોર્ટરને હંમેશાં એક્સપોર્ટનું બજેટ મળે છે: `budget` છોડી દો +@msg an exporter declares 1 to {MAX_EXTENSIONS} `extensions` એક્સપોર્ટર 1 થી {MAX_EXTENSIONS} `extensions` જાહેર કરે છે +@msg an image could not be written: {e} ઇમેજ લખી શકાઈ નહીં: {e} +@msg an image couldn't be decoded and is missing from the picture એક ઇમેજ ડીકોડ થઈ શકી નહીં અને ચિત્રમાંથી ખૂટે છે +@msg an image has no pixels and was left out એક ઇમેજમાં પિક્સેલ નથી, તેથી તેને છોડી દેવાઈ +@msg an image is too large for DXF and was left out એક ઇમેજ DXF માટે ખૂબ મોટી છે, તેથી તેને છોડી દેવાઈ +@msg an image is too large to draw ઇમેજ દોરવા માટે ખૂબ મોટી છે +@msg an image of {_1} MB, at most {_2} MB {_1} MB ની ઇમેજ, વધુમાં વધુ {_2} MB +@msg an image of {sw} × {sh} pixels is too large to resample {sw} × {sh} પિક્સેલની ઇમેજ રીસેમ્પલ કરવા માટે ખૂબ મોટી છે +@msg an image of {width} × {height} pixels is too large to draw {width} × {height} પિક્સેલની ઇમેજ દોરવા માટે ખૂબ મોટી છે +@msg an image of {w} × {h} pixels is too large to change {w} × {h} પિક્સેલની ઇમેજ બદલવા માટે ખૂબ મોટી છે +@msg an image of {w} × {h} pixels is too large to convert (at most {_1} pixels) {w} × {h} પિક્સેલની ઇમેજ રૂપાંતરિત કરવા માટે ખૂબ મોટી છે (વધુમાં વધુ {_1} પિક્સેલ) +@msg an image of {w} × {h} pixels is too large to draw {w} × {h} પિક્સેલની ઇમેજ દોરવા માટે ખૂબ મોટી છે +@msg an imported path must include its geometry in `path` ઇમ્પોર્ટ કરેલા પાથની ભૂમિતિ `path` માં હોવી જોઈએ +@msg an importer always gets an import's budget: leave `budget` out ઇમ્પોર્ટરને હંમેશાં ઇમ્પોર્ટનું બજેટ મળે છે: `budget` છોડી દો +@msg an importer declares 1 to {MAX_EXTENSIONS} `extensions` ઇમ્પોર્ટર 1 થી {MAX_EXTENSIONS} `extensions` જાહેર કરે છે +@msg an importer returns `objects` and `warnings`, not `{key}` ઇમ્પોર્ટર `objects` અને `warnings` પાછા આપે છે, `{key}` નહીં +@msg an importer returns new paths without `id` ઇમ્પોર્ટર `id` વગરના નવા પાથ પાછા આપે છે +@msg an index must be a whole number ઇન્ડેક્સ પૂર્ણ સંખ્યા હોવો જોઈએ +@msg an inline graphic has no glyphs ઇનલાઇન ગ્રાફિકમાં કોઈ ગ્લિફ નથી +@msg an integer પૂર્ણાંક +@msg an integer <= {_1} પૂર્ણાંક <= {_1} +@msg an integer >= {_1} પૂર્ણાંક >= {_1} +@msg an integer {_1} to {_2} {_1} થી {_2} સુધીનો પૂર્ણાંક +@msg an invisible text form can't be read અદૃશ્ય ટેક્સ્ટ ફોર્મ વાંચી શકાતું નથી +@msg an object ઑબ્જેક્ટ +@msg an object can't be read એક ઑબ્જેક્ટ વાંચી શકાતો નથી +@msg an object cannot go below a clipping mask ઑબ્જેક્ટ ક્લિપિંગ માસ્કની નીચે જઈ શકતો નથી +@msg an object cannot go beside a top-level layer ઑબ્જેક્ટ ટોપ-લેવલ લેયરની બાજુમાં જઈ શકતો નથી +@msg an object cannot go into itself ઑબ્જેક્ટ પોતાની અંદર જઈ શકતો નથી +@msg an object flattened to a line or a point can't be placed again રેખા કે બિંદુમાં ચપટો થયેલો ઑબ્જેક્ટ ફરી મૂકી શકાતો નથી +@msg an object id (a non-negative integer) ઑબ્જેક્ટ id (બિન-ઋણ પૂર્ણાંક) +@msg an object in perspective would leave the edited grid પરસ્પેક્ટિવમાંનો ઑબ્જેક્ટ એડિટ થતી ગ્રિડની બહાર જશે +@msg an object is missing એક ઑબ્જેક્ટ ખૂટે છે +@msg an object lies past what the cross-reference table holds એક ઑબ્જેક્ટ ક્રૉસ-રેફરન્સ ટેબલની મર્યાદાની બહાર છે +@msg an object must be a JSON object ઑબ્જેક્ટ JSON ઑબ્જેક્ટ હોવો જોઈએ +@msg an object selected in a symbol instance has no fill or stroke opacity of its own સિમ્બોલ ઇન્સ્ટન્સમાં પસંદ કરેલા ઑબ્જેક્ટની પોતાની ભરણ કે સ્ટ્રોક અપારદર્શકતા નથી +@msg an object's header is missing ઑબ્જેક્ટનું હેડર ખૂટે છે +@msg an overprinting form can't be read ઓવરપ્રિન્ટ થતું ફોર્મ વાંચી શકાતું નથી +@msg an unread object has no readable bounds ન વંચાયેલા ઑબ્જેક્ટની વાંચી શકાય તેવી સીમા નથી +@msg an unread object holds a frame of threaded type ન વંચાયેલા ઑબ્જેક્ટમાં થ્રેડેડ ટાઇપની ફ્રેમ છે +@msg an unread object is missing from its layer ન વંચાયેલો ઑબ્જેક્ટ તેના લેયરમાંથી ખૂટે છે +@msg anchor [{_1}, {_2}] of object {id} is not a selected anchor point ઑબ્જેક્ટ {id} નું એન્કર [{_1}, {_2}] પસંદ કરેલું એન્કર બિંદુ નથી +@msg anchor `smooth` must be true or false એન્કરનું `smooth` true અથવા false હોવું જોઈએ +@msg anchor `{key}` must be [x, y] એન્કરનું `{key}` [x, y] હોવું જોઈએ +@msg anchor `{key}` must be a number એન્કરનું `{key}` સંખ્યા હોવું જોઈએ +@msg anchor is required anchor જરૂરી છે +@msg anchorPoint must be true or false anchorPoint true અથવા false હોવું જોઈએ +@msg angles must be a list as long as pins (degrees or null) angles એ pins જેટલી લાંબી સૂચિ હોવી જોઈએ (ડિગ્રી અથવા null) +@msg antiAlias `{id}`: none, art or type antiAlias `{id}`: none, art અથવા type +@msg appearance must be flat|center|edge appearance flat|center|edge હોવું જોઈએ +@msg apply is "fill" or "stroke", not `{other}` apply "fill" અથવા "stroke" હોય છે, `{other}` નહીં +@msg apply was called on a value that is not a function apply એવી વેલ્યુ પર કૉલ થયું જે ફંક્શન નથી +@msg applyTo takes a TextRange or a TextFrame applyTo એ TextRange અથવા TextFrame લે છે +@msg area must be a closed polygon of 3 to 100000 [x, y] points area એ 3 થી 100000 [x, y] બિંદુઓનો બંધ બહુકોણ હોવો જોઈએ +@msg area type in a thread cannot use Dynamic Text: {frames} થ્રેડમાંનો એરિયા ટાઇપ ડાયનેમિક ટેક્સ્ટ વાપરી શકતો નથી: {frames} +@msg area type needs a path that encloses an area એરિયા ટાઇપ માટે વિસ્તારને ઘેરતો પાથ જોઈએ +@msg area type {_1} is named twice એરિયા ટાઇપ {_1} બે વાર દર્શાવાયો છે +@msg array literal too long એરે લિટરલ ખૂબ લાંબો છે +@msg array too long એરે ખૂબ લાંબો છે +@msg arrowAlign must be extend|tip, got {o} arrowAlign એ extend|tip હોવું જોઈએ, {o} મળ્યું +@msg arrowScale must be [start, end] arrowScale એ [start, end] હોવું જોઈએ +@msg art painted with `{name}` can't be its tile `{name}` થી રંગાયેલું આર્ટ તેની ટાઇલ બની શકતું નથી +@msg artboard is a 0-based index artboard એ 0 થી શરૂ થતો ઇન્ડેક્સ છે +@msg artboard must be a 0-based index artboard એ 0 થી શરૂ થતો ઇન્ડેક્સ હોવો જોઈએ +@msg artboard name `{shown}` is used twice આર્ટબોર્ડ નામ `{shown}` બે વાર વપરાયું છે +@msg artboard {0} does not exist આર્ટબોર્ડ {0} અસ્તિત્વમાં નથી +@msg artboard {i} doesn't print આર્ટબોર્ડ {i} છપાતું નથી +@msg artboardLayout must be a DocumentArtboardLayout value artboardLayout એ DocumentArtboardLayout વેલ્યુ હોવી જોઈએ +@msg artboardLayout must be {{layout?, columns?, rows?, spacing?, rightToLeft?}} artboardLayout એ {{layout?, columns?, rows?, spacing?, rightToLeft?}} હોવું જોઈએ +@msg artboardLayout.columns must be a whole number from 1 to {MAX_ARTBOARDS} artboardLayout.columns એ 1 થી {MAX_ARTBOARDS} સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg artboardLayout.layout must be gridByRow, gridByColumn, row or column artboardLayout.layout એ gridByRow, gridByColumn, row અથવા column હોવું જોઈએ +@msg artboardLayout.rightToLeft must be true or false artboardLayout.rightToLeft એ true અથવા false હોવું જોઈએ +@msg artboardLayout.rows must be a whole number from 1 to {MAX_ARTBOARDS} artboardLayout.rows એ 1 થી {MAX_ARTBOARDS} સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg artboardLayout.rows needs the gridByColumn layout artboardLayout.rows માટે gridByColumn લેઆઉટ જોઈએ +@msg artboardLayout.spacing must be 0–{MAX_SPACING} pt artboardLayout.spacing એ 0–{MAX_SPACING} pt હોવું જોઈએ +@msg artboardRange artboardRange +@msg artboardRange `{r}` is not a range of artboard numbers artboardRange `{r}` આર્ટબોર્ડ નંબરોની રેન્જ નથી +@msg artboardRowsOrCols must be a whole number from 1 to numArtBoards artboardRowsOrCols એ 1 થી numArtBoards સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg artboardSpacing must be from 0 to 100000 points artboardSpacing એ 0 થી 100000 પોઇન્ટ સુધી હોવું જોઈએ +@msg artboards must be a non-empty list artboards ખાલી ન હોય તેવી સૂચિ હોવી જોઈએ +@msg artboards must be a whole number from 1 to {MAX_ARTBOARDS} artboards એ 1 થી {MAX_ARTBOARDS} સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg asset `{_1}` has no art to export સંપત્તિ `{_1}` માં એક્સપોર્ટ કરવા માટે કોઈ આર્ટ નથી +@msg asset {id} is a 3D asset: assets.export3D writes it સંપત્તિ {id} 3D સંપત્તિ છે: assets.export3D તેને લખે છે +@msg asset {id} isn't a 3D asset સંપત્તિ {id} 3D સંપત્તિ નથી +@msg assigning a {l} is not available yet {l} અસાઇન કરવાનું હજી ઉપલબ્ધ નથી +@msg assignment to a constant binding કોન્સ્ટન્ટ બાઇન્ડિંગમાં અસાઇનમેન્ટ +@msg assignment to the constant '{ident}' કોન્સ્ટન્ટ '{ident}' માં અસાઇનમેન્ટ +@msg assignment to the import '{ident}' ઇમ્પોર્ટ '{ident}' માં અસાઇનમેન્ટ +@msg at least one row that isn't excluded needs a weight above 0 બાકાત ન હોય તેવી ઓછામાં ઓછી એક પંક્તિનું વજન 0 થી વધુ હોવું જોઈએ +@msg at most {MAX_ALLOWED_COMMANDS} commands in `commandAllowlist` `commandAllowlist` માં વધુમાં વધુ {MAX_ALLOWED_COMMANDS} કમાન્ડ +@msg at most {MAX_COMMANDS} `commands` વધુમાં વધુ {MAX_COMMANDS} `commands` +@msg at most {MAX_KEYWORDS} keywords વધુમાં વધુ {MAX_KEYWORDS} કીવર્ડ +@msg at most {MAX_MATCHES} matches are kept વધુમાં વધુ {MAX_MATCHES} મેળ રાખવામાં આવે છે +@msg at most {MAX_PERMISSIONS} `permissions` વધુમાં વધુ {MAX_PERMISSIONS} `permissions` +@msg at most {MAX_POINTS} points વધુમાં વધુ {MAX_POINTS} બિંદુ +@msg at most {MAX_QUEUE} files વધુમાં વધુ {MAX_QUEUE} ફાઇલો +@msg at most {MAX_UNGROUPED} parameters outside groups: give the others a `group` ગ્રૂપની બહાર વધુમાં વધુ {MAX_UNGROUPED} પેરામીટર: બાકીનાને `group` આપો +@msg at most {max} tab stops વધુમાં વધુ {max} ટૅબ સ્ટૉપ +@msg at must be [x, y] at એ [x, y] હોવું જોઈએ +@msg at this scale the drawing is {w} × {h} pt, more than the canvas holds: choose a smaller scale or fit it to the artboard આ સ્કેલ પર ડ્રોઇંગ {w} × {h} pt છે, જે કેનવાસમાં સમાય તેના કરતાં વધુ છે: નાનો સ્કેલ પસંદ કરો અથવા તેને આર્ટબોર્ડમાં ફિટ કરો +@msg at/rect lie outside the canvas at/rect કેનવાસની બહાર છે +@msg attribute `{key}` must be average or userDefined, not {v} એટ્રિબ્યુટ `{key}` એ average અથવા userDefined હોવું જોઈએ, {v} નહીં +@msg attribute must be size|leading|tracking|kerning|baselineShift attribute એ size|leading|tracking|kerning|baselineShift હોવું જોઈએ +@msg attrs must be an object attrs ઑબ્જેક્ટ હોવો જોઈએ +@msg autoLeading cannot be turned off: the auto leading here is {bad} points, outside 0.1 to 5000 autoLeading બંધ કરી શકાતું નથી: અહીં ઑટો લીડિંગ {bad} પોઇન્ટ છે, જે 0.1 થી 5000 ની બહાર છે +@msg automaticAlignTo must be true or false automaticAlignTo એ true અથવા false હોવું જોઈએ +@msg automation path rejected: a link that leads nowhere: {path} ઑટોમેશન પાથ નકારાયો: ક્યાંય ન લઈ જતી લિંક: {path} +@msg automation path rejected: cannot resolve {path}: {e} ઑટોમેશન પાથ નકારાયો: {path} ઉકેલી શકાયો નહીં: {e} +@msg automation path rejected: parent traversal below a folder that doesn't exist: {path} ઑટોમેશન પાથ નકારાયો: અસ્તિત્વમાં ન હોય તેવા ફોલ્ડર નીચે પેરેન્ટ ટ્રાવર્સલ: {path} +@msg automation path rejected: path is empty ઑટોમેશન પાથ નકારાયો: પાથ ખાલી છે +@msg automation path rejected: the folder's name isn't valid text ઑટોમેશન પાથ નકારાયો: ફોલ્ડરનું નામ માન્ય ટેક્સ્ટ નથી +@msg automation path rejected: {_1} isn't valid text ઑટોમેશન પાથ નકારાયો: {_1} માન્ય ટેક્સ્ટ નથી +@msg automation path rejected: {command} writes the Language packs into the font store the Craft apps share, outside the automation roots ઑટોમેશન પાથ નકારાયો: {command} ભાષા પૅક્સને Craft ઍપ્સ જે ફોન્ટ સ્ટોર શેર કરે છે તેમાં, ઑટોમેશન રૂટની બહાર લખે છે +@msg automation path rejected: {why}: {path} ઑટોમેશન પાથ નકારાયો: {why}: {path} +@msg axis must be "horizontal", "vertical" or an angle in degrees {range}, not `{given}` axis એ "horizontal", "vertical" અથવા ડિગ્રીમાં ખૂણો {range} હોવો જોઈએ, `{given}` નહીં +@msg axis must be "vertical", "horizontal" or an angle in degrees, not `{given}` axis એ "vertical", "horizontal" અથવા ડિગ્રીમાં ખૂણો હોવો જોઈએ, `{given}` નહીં +@msg background {other}: transparent, white, black or a colour such as "#ff8800" background {other}: transparent, white, black અથવા "#ff8800" જેવો રંગ +@msg background {v}: a color such as "#808080" background {v}: "#808080" જેવો રંગ +@msg backgroundContents must be transparent or white backgroundContents એ transparent અથવા white હોવું જોઈએ +@msg bad AES key ખોટી AES કી +@msg bad `runs`: {e} ખોટા `runs`: {e} +@msg bad arrowScale ખોટું arrowScale +@msg bad base64 ખોટું base64 +@msg bad color {c} ખોટો રંગ {c} +@msg bad color {v} ખોટો રંગ {v} +@msg bad colour ખોટો રંગ +@msg bad colour `{hex}` (#rrggbb) ખોટો રંગ `{hex}` (#rrggbb) +@msg bad colour in `colors` `colors` માં ખોટો રંગ +@msg bad colour {v} ખોટો રંગ {v} +@msg bad colour {v} in groupColors groupColors માં ખોટો રંગ {v} +@msg bad cross-reference entry ખોટી ક્રૉસ-રેફરન્સ એન્ટ્રી +@msg bad cross-reference table ખોટું ક્રૉસ-રેફરન્સ ટેબલ +@msg bad current colour {v} ખોટો વર્તમાન રંગ {v} +@msg bad dataBase64 ખોટું dataBase64 +@msg bad edit ખોટું એડિટ +@msg bad fit: {e} ખોટું ફિટ: {e} +@msg bad model {other} (keep, new or document) ખોટું મોડેલ {other} (keep, new અથવા document) +@msg bad new colour {v} ખોટો નવો રંગ {v} +@msg bad object ખોટો ઑબ્જેક્ટ +@msg bad object number ખોટો ઑબ્જેક્ટ નંબર +@msg bad offset ખોટો ઑફસેટ +@msg bad page tree ખોટું પેજ ટ્રી +@msg bad path data: {e} ખોટો પાથ ડેટા: {e} +@msg bad point {v}: expected [x, y] ખોટું બિંદુ {v}: [x, y] અપેક્ષિત +@msg bad point {v}: expected [x, y] or [x, y, pressure] ખોટું બિંદુ {v}: [x, y] અથવા [x, y, pressure] અપેક્ષિત +@msg bad range ખોટી રેન્જ +@msg bad reference ખોટો રેફરન્સ +@msg bad stream length ખોટી સ્ટ્રીમ લંબાઈ +@msg bad trailer ખોટું ટ્રેલર +@msg bad trailer size ખોટું ટ્રેલર કદ +@msg bad {key} {v} ખોટું {key} {v} +@msg bad {k} colour ખોટો {k} રંગ +@msg balance must be between 0 and 100 balance એ 0 અને 100 ની વચ્ચે હોવું જોઈએ +@msg baseFrame must be a TextFrame baseFrame એ TextFrame હોવી જોઈએ +@msg baseFrame: a frame of its story is hidden or locked baseFrame: તેની સ્ટોરીની એક ફ્રેમ છુપાયેલી અથવા લૉક છે +@msg baseFrame: only area type and type on a path can be threaded baseFrame: ફક્ત એરિયા ટાઇપ અને પાથ પરનો ટાઇપ થ્રેડ કરી શકાય છે +@msg baseFrame: the frame is in another document baseFrame: ફ્રેમ બીજા દસ્તાવેજમાં છે +@msg baseFrame: type made from a path inside a compound path cannot be threaded baseFrame: કમ્પાઉન્ડ પાથની અંદરના પાથમાંથી બનેલો ટાઇપ થ્રેડ કરી શકાતો નથી +@msg baselineShift must be from -1296 to 1296 points baselineShift એ -1296 થી 1296 પોઇન્ટ સુધી હોવું જોઈએ +@msg batch step {_1} (`{id}`) failed: {e} બૅચ પગલું {_1} (`{id}`) નિષ્ફળ ગયું: {e} +@msg batches cannot nest બૅચ નેસ્ટ થઈ શકતા નથી +@msg bevel custom needs {BEVEL_PROFILE}, the bevel's points bevel custom માટે {BEVEL_PROFILE}, એટલે કે બેવલનાં બિંદુઓ જોઈએ +@msg bevel must be none or one of {_1}, or custom with {BEVEL_PROFILE} bevel એ none અથવા {_1} માંથી એક, અથવા {BEVEL_PROFILE} સાથે custom હોવું જોઈએ +@msg bevel: give a shape id, or {{custom: name}} for a bevel of the bevels file (threeD.bevels.list) bevel: આકારનું id આપો, અથવા બેવલ ફાઇલના બેવલ માટે {{custom: name}} આપો (threeD.bevels.list) +@msg bind something to a variable first પહેલાં કંઈક વેરિએબલ સાથે બાંધો +@msg bleed must be 0–{MAX_BLEED} pt: a number, [top, bottom, left, right] or {{top, bottom, left, right}} bleed એ 0–{MAX_BLEED} pt હોવું જોઈએ: સંખ્યા, [top, bottom, left, right] અથવા {{top, bottom, left, right}} +@msg blend must be a mode name blend એ મોડનું નામ હોવું જોઈએ +@msg blendingMode needs a BlendModes value blendingMode માટે BlendModes વેલ્યુ જોઈએ +@msg both sides of an XPath | must select nodes XPath | ની બંને બાજુએ નોડ પસંદ થવા જોઈએ +@msg brightness must be dark|mediumDark|mediumLight|light brightness એ dark|mediumDark|mediumLight|light હોવું જોઈએ +@msg brush must be a name or null brush એ નામ અથવા null હોવું જોઈએ +@msg brushes move only within their type બ્રશ ફક્ત પોતાના પ્રકારની અંદર જ ખસે છે +@msg by must be a number by એ સંખ્યા હોવી જોઈએ +@msg byColor can't regroup a trace with a live Pathfinder effect: expand without byColor byColor લાઇવ પાથફાઇન્ડર ઇફેક્ટવાળા ટ્રેસને ફરી ગ્રૂપ કરી શકતું નથી: byColor વગર વિસ્તૃત કરો +@msg byColor can't split Auto Grouping groups: trace without Auto Grouping byColor ઑટો ગ્રૂપિંગના ગ્રૂપને વિભાજિત કરી શકતું નથી: ઑટો ગ્રૂપિંગ વગર ટ્રેસ કરો +@msg byColor must be true or false byColor એ true અથવા false હોવું જોઈએ +@msg byColor needs the seam fills' group under every path: move it to the bottom or delete it byColor માટે સીમ ભરણનું ગ્રૂપ દરેક પાથની નીચે હોવું જોઈએ: તેને સૌથી નીચે ખસેડો અથવા ડિલીટ કરો +@msg can't add page thumbnails: {why} પેજ થંબનેલ ઉમેરી શકાતા નથી: {why} +@msg can't add the editing data for other apps: {why} બીજી ઍપ્સ માટેનો એડિટિંગ ડેટા ઉમેરી શકાતો નથી: {why} +@msg can't edit the written PDF: {why} લખેલી PDF એડિટ કરી શકાતી નથી: {why} +@msg can't encode the document: {0} દસ્તાવેજ એન્કોડ કરી શકાતો નથી: {0} +@msg can't encode the input ઇનપુટ એન્કોડ કરી શકાતું નથી +@msg can't encrypt the PDF: {why} PDF એન્ક્રિપ્ટ કરી શકાતી નથી: {why} +@msg can't linearise the PDF: {why} PDF લિનિયરાઇઝ કરી શકાતી નથી: {why} +@msg can't open `{_1}`: not a PDF `{_1}` ખોલી શકાતી નથી: PDF નથી +@msg can't open `{_1}`: {_2} `{_1}` ખોલી શકાતી નથી: {_2} +@msg can't open `{_1}`: {e} `{_1}` ખોલી શકાતી નથી: {e} +@msg can't open `{name}`: not a format VectorCraft reads (see document.formats) `{name}` ખોલી શકાતી નથી: VectorCraft વાંચી શકે તેવું ફોર્મેટ નથી (document.formats જુઓ) +@msg can't open “{name}”: {e} “{name}” ખોલી શકાતી નથી: {e} +@msg can't parse shortcut `{s}` for `{k}` `{k}` માટેનો શોર્ટકટ `{s}` પાર્સ કરી શકાતો નથી +@msg can't parse shortcut `{text}` શોર્ટકટ `{text}` પાર્સ કરી શકાતો નથી +@msg can't place `{_1}`: {e} `{_1}` મૂકી શકાતી નથી: {e} +@msg can't place `{name}`: not a format VectorCraft reads (see document.formats) `{name}` મૂકી શકાતી નથી: VectorCraft વાંચી શકે તેવું ફોર્મેટ નથી (document.formats જુઓ) +@msg can't read back the written PDF: {e} લખેલી PDF પાછી વાંચી શકાતી નથી: {e} +@msg can't read this Word document: {why} આ Word દસ્તાવેજ વાંચી શકાતો નથી: {why} +@msg can't save version {0}: VectorCraft writes versions {MIN_VERSION} to {VERSION} આવૃત્તિ {0} સાચવી શકાતી નથી: VectorCraft આવૃત્તિ {MIN_VERSION} થી {VERSION} લખે છે +@msg can't write .{ext} images .{ext} ઇમેજ લખી શકાતી નથી +@msg can't write .{e} images: use .png, .jpg, .gif, .webp, .tif or .bmp .{e} ઇમેજ લખી શકાતી નથી: .png, .jpg, .gif, .webp, .tif અથવા .bmp વાપરો +@msg can't write PDF layers, overprint or invisible text: {why} PDF લેયર, ઓવરપ્રિન્ટ અથવા અદૃશ્ય ટેક્સ્ટ લખી શકાતાં નથી: {why} +@msg can't write the file's copyright: {why} ફાઇલનો કૉપિરાઇટ લખી શકાતો નથી: {why} +@msg can't write the file's modification date: {why} ફાઇલની ફેરફાર તારીખ લખી શકાતી નથી: {why} +@msg can't write the pages' user units: {why} પેજના યુઝર યુનિટ લખી શકાતા નથી: {why} +@msg canceled રદ કર્યું +@msg cancelled; nothing was changed રદ કર્યું; કંઈ બદલાયું નથી +@msg cannot align zip entries to {align} bytes zip એન્ટ્રીઓને {align} બાઇટ પર સંરેખિત કરી શકાતી નથી +@msg cannot apply brush `{name}`: path has no stroke બ્રશ `{name}` લાગુ કરી શકાતું નથી: પાથમાં સ્ટ્રોક નથી +@msg cannot assign to property '{key}': {why} પ્રોપર્ટી '{key}' માં અસાઇન કરી શકાતું નથી: {why} +@msg cannot assign to property '{name}': {why} પ્રોપર્ટી '{name}' માં અસાઇન કરી શકાતું નથી: {why} +@msg cannot convert a Symbol value to a number Symbol વેલ્યુને સંખ્યામાં રૂપાંતરિત કરી શકાતી નથી +@msg cannot convert a Symbol value to a string Symbol વેલ્યુને સ્ટ્રિંગમાં રૂપાંતરિત કરી શકાતી નથી +@msg cannot convert the object to a primitive value ઑબ્જેક્ટને પ્રિમિટિવ વેલ્યુમાં રૂપાંતરિત કરી શકાતો નથી +@msg cannot convert undefined or null to an object undefined અથવા null ને ઑબ્જેક્ટમાં રૂપાંતરિત કરી શકાતું નથી +@msg cannot declare function {ident} ફંક્શન {ident} જાહેર કરી શકાતું નથી +@msg cannot declare variable {ident} વેરિએબલ {ident} જાહેર કરી શકાતું નથી +@msg cannot define property '{key}': {why} પ્રોપર્ટી '{key}' વ્યાખ્યાયિત કરી શકાતી નથી: {why} +@msg cannot define property '{name}' of a typed array typed array ની પ્રોપર્ટી '{name}' વ્યાખ્યાયિત કરી શકાતી નથી +@msg cannot delete hidden or locked objects: {_1} છુપાયેલા અથવા લૉક ઑબ્જેક્ટ્સ ડિલીટ કરી શકાતા નથી: {_1} +@msg cannot delete hidden or locked objects: {list} છુપાયેલા અથવા લૉક ઑબ્જેક્ટ્સ ડિલીટ કરી શકાતા નથી: {list} +@msg cannot delete hidden or locked paths: {list} છુપાયેલા અથવા લૉક પાથ ડિલીટ કરી શકાતા નથી: {list} +@msg cannot delete hidden or locked type: {list} છુપાયેલો અથવા લૉક ટાઇપ ડિલીટ કરી શકાતો નથી: {list} +@msg cannot delete property '{key}' પ્રોપર્ટી '{key}' ડિલીટ કરી શકાતી નથી +@msg cannot delete property '{key}' of a typed array typed array ની પ્રોપર્ટી '{key}' ડિલીટ કરી શકાતી નથી +@msg cannot delete property '{key}': the proxy's deleteProperty trap returned false પ્રોપર્ટી '{key}' ડિલીટ કરી શકાતી નથી: પ્રૉક્સીના deleteProperty trap એ false પાછું આપ્યું +@msg cannot destructure {what} {what} ને ડિસ્ટ્રક્ચર કરી શકાતું નથી +@msg cannot distort a zero-size or non-finite bounding box શૂન્ય કદના અથવા અમર્યાદિત બાઉન્ડિંગ બૉક્સને વિકૃત કરી શકાતું નથી +@msg cannot move an object into itself ઑબ્જેક્ટને પોતાની અંદર ખસેડી શકાતો નથી +@msg cannot open the automation {kind} root `{_1}`: {e} ઑટોમેશન {kind} રૂટ `{_1}` ખોલી શકાતું નથી: {e} +@msg cannot read PDF: {0} PDF વાંચી શકાતી નથી: {0} +@msg cannot read a property of {base} {base} ની પ્રોપર્ટી વાંચી શકાતી નથી +@msg cannot read profile: {0} પ્રોફાઇલ વાંચી શકાતી નથી: {0} +@msg cannot read property '{key}' of {base} {base} ની પ્રોપર્ટી '{key}' વાંચી શકાતી નથી +@msg cannot read script file {specifier}: {e} સ્ક્રિપ્ટ ફાઇલ {specifier} વાંચી શકાતી નથી: {e} +@msg cannot set a property of {base} {base} ની પ્રોપર્ટી સેટ કરી શકાતી નથી +@msg cannot set property '{key}' of {base} {base} ની પ્રોપર્ટી '{key}' સેટ કરી શકાતી નથી +@msg cannot split an open path at its end point ખુલ્લા પાથને તેના અંતિમ બિંદુ પર વિભાજિત કરી શકાતો નથી +@msg cannot test whether a revoked proxy is an array રદ કરાયેલું પ્રૉક્સી એરે છે કે નહીં તે તપાસી શકાતું નથી +@msg cannot use super property '{name}': the home object has no prototype super પ્રોપર્ટી '{name}' વાપરી શકાતી નથી: home ઑબ્જેક્ટને prototype નથી +@msg cannot {what} a revoked proxy રદ કરાયેલા પ્રૉક્સીને {what} કરી શકાતું નથી +@msg case must be upper|lower|title|sentence case એ upper|lower|title|sentence હોવું જોઈએ +@msg category `{c}`: one of {_1} category `{c}`: {_1} માંથી એક +@msg center must be [x, y] center એ [x, y] હોવું જોઈએ +@msg centerPoint is outside the canvas centerPoint કેનવાસની બહાર છે +@msg changeLineWidths must be from 0 to 100000 percent changeLineWidths એ 0 થી 100000 ટકા સુધી હોવું જોઈએ +@msg changeLineWidths would make the stroke weight more than 1000 points changeLineWidths થી સ્ટ્રોકની જાડાઈ 1000 પોઇન્ટ કરતાં વધુ થઈ જશે +@msg character dimensions cannot be represented with the source text transform અક્ષરનાં પરિમાણ સ્રોત ટેક્સ્ટ ટ્રાન્સફોર્મથી દર્શાવી શકાતાં નથી +@msg character dimensions cannot be represented with the target text transform અક્ષરનાં પરિમાણ લક્ષ્ય ટેક્સ્ટ ટ્રાન્સફોર્મથી દર્શાવી શકાતાં નથી +@msg check an artboard to export એક્સપોર્ટ કરવા માટે આર્ટબોર્ડ પર ટિક કરો +@msg check an asset to export એક્સપોર્ટ કરવા માટે સંપત્તિ પર ટિક કરો +@msg choices must be 1-64 non-empty, printable strings choices એ 1-64 ખાલી ન હોય તેવી, છાપી શકાય તેવી સ્ટ્રિંગ્સ હોવી જોઈએ +@msg choose a destination folder ગંતવ્ય ફોલ્ડર પસંદ કરો +@msg choose a folder to export to એક્સપોર્ટ કરવા માટે ફોલ્ડર પસંદ કરો +@msg choose a location for the package પેકેજ માટે સ્થાન પસંદ કરો +@msg choose a source folder સ્રોત ફોલ્ડર પસંદ કરો +@msg choose at least one artboard ઓછામાં ઓછું એક આર્ટબોર્ડ પસંદ કરો +@msg choose at least one status ઓછામાં ઓછી એક સ્થિતિ પસંદ કરો +@msg choose the font files to add ઉમેરવા માટે ફોન્ટ ફાઇલો પસંદ કરો +@msg choose the object to detach with its Select/Move widget અલગ કરવાનો ઑબ્જેક્ટ તેના Select/Move વિજેટથી પસંદ કરો +@msg clearingOverrides must be true or false clearingOverrides એ true અથવા false હોવું જોઈએ +@msg clip must be true or false clip એ true અથવા false હોવું જોઈએ +@msg clipboard is empty ક્લિપબોર્ડ ખાલી છે +@msg clippingMask must be true or false clippingMask એ true અથવા false હોવું જોઈએ +@msg closed must be a boolean closed એ boolean હોવું જોઈએ +@msg closing needs three anchors બંધ કરવા માટે ત્રણ એન્કર જોઈએ +@msg collapsed must be true or false collapsed એ true અથવા false હોવું જોઈએ +@msg color book version {version} isn't supported (only 1) કલર બુક આવૃત્તિ {version} સમર્થિત નથી (ફક્ત 1) +@msg color books in color space {other} aren't supported (only RGB, CMYK and Lab) કલર સ્પેસ {other} માંની કલર બુક્સ સમર્થિત નથી (ફક્ત RGB, CMYK અને Lab) +@msg color group `{g}` holds swatches that are not colors, which Save Changes can't keep રંગ ગ્રૂપ `{g}` માં એવા સ્વેચ છે જે રંગ નથી, જેને ફેરફારો સાચવો રાખી શકતું નથી +@msg color.profile: no RGB or CMYK profile is called “{profile}” color.profile: “{profile}” નામની કોઈ RGB અથવા CMYK પ્રોફાઇલ નથી +@msg colorMode must be rgb or cmyk, not `{m}` colorMode એ rgb અથવા cmyk હોવું જોઈએ, `{m}` નહીં +@msg colorModel must be {own} (the document's mode), grayscale or bitmap colorModel એ {own} (દસ્તાવેજનો મોડ), grayscale અથવા bitmap હોવું જોઈએ +@msg colorSpace must be a DocumentColorSpace value colorSpace એ DocumentColorSpace વેલ્યુ હોવી જોઈએ +@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: કલર ટેબલમાં ઓછામાં ઓછો એક રંગ રહેવો જોઈએ +@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}` એવો રંગ દર્શાવે છે જે બીજી કી પણ દર્શાવે છે +@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}` એ "#ff8800" જેવો રંગ નથી +@msg colour groups can't go into colour groups રંગ ગ્રૂપ રંગ ગ્રૂપની અંદર જઈ શકતાં નથી +@msg colour, mode and spot apply to solid-colour swatches only colour, mode અને spot ફક્ત સોલિડ-રંગ સ્વેચ પર લાગુ થાય છે +@msg column must be true or a number from 1 column એ true અથવા 1 થી શરૂ થતી સંખ્યા હોવી જોઈએ +@msg column {column}: `{cell}` names `{name}`, which is a {_1} variable કૉલમ {column}: `{cell}` એ `{name}` દર્શાવે છે, જે {_1} વેરિએબલ છે +@msg column {column}: `{cell}` names no variable કૉલમ {column}: `{cell}` કોઈ વેરિએબલ દર્શાવતું નથી +@msg column {column}: the variable name is longer than {MAX_NAME} characters કૉલમ {column}: વેરિએબલનું નામ {MAX_NAME} અક્ષરો કરતાં લાંબું છે +@msg column: true floats the whole column and takes no onto, above or below column: true આખી કૉલમને ફ્લોટ કરે છે અને onto, above કે below લેતું નથી +@msg columns {first} and {column} both name the variable `{name}` કૉલમ {first} અને {column} બંને વેરિએબલ `{name}` દર્શાવે છે +@msg command (a command's id) is required command (કમાન્ડનું id) જરૂરી છે +@msg command `{0}` is not available right now: {1} કમાન્ડ `{0}` અત્યારે ઉપલબ્ધ નથી: {1} +@msg command call size (vc_call `{shown}`: {len} bytes, limit {MAX_CALL_DATA}) કમાન્ડ કૉલનું કદ (vc_call `{shown}`: {len} બાઇટ, મર્યાદા {MAX_CALL_DATA}) +@msg command calls ({MAX_CALLS} calls and {MAX_CALL_BYTES} bytes per run) કમાન્ડ કૉલ (દરેક રનમાં {MAX_CALLS} કૉલ અને {MAX_CALL_BYTES} બાઇટ) +@msg command must be a shape.* command command એ shape.* કમાન્ડ હોવો જોઈએ +@msg command must be text command ટેક્સ્ટ હોવો જોઈએ +@msg command {name} is declared twice કમાન્ડ {name} બે વાર જાહેર કરાયો છે +@msg command {name}: `label` must be 1-64 printable characters કમાન્ડ {name}: `label` 1-64 છાપી શકાય તેવા અક્ષરોનું હોવું જોઈએ +@msg command {name}: use an id of 1-{MAX_COMMAND_ID} characters from a-z 0-9 _ that starts with a letter કમાન્ડ {name}: a-z 0-9 _ માંથી 1-{MAX_COMMAND_ID} અક્ષરોનું, અક્ષરથી શરૂ થતું id વાપરો +@msg command {name}: {e} કમાન્ડ {name}: {e} +@msg comparing with an image file isn't available in the browser બ્રાઉઝરમાં ઇમેજ ફાઇલ સાથે સરખામણી ઉપલબ્ધ નથી +@msg compound path {id} has a hidden, locked or guide member, so its members can't be replaced કમ્પાઉન્ડ પાથ {id} માં છુપાયેલો, લૉક અથવા ગાઇડ સભ્ય છે, તેથી તેના સભ્યો બદલી શકાતા નથી +@msg compound path {id} has a member that isn't a path, so its members can't be replaced કમ્પાઉન્ડ પાથ {id} માં એવો સભ્ય છે જે પાથ નથી, તેથી તેના સભ્યો બદલી શકાતા નથી +@msg compound paths can only contain paths કમ્પાઉન્ડ પાથમાં ફક્ત પાથ જ હોઈ શકે +@msg compound shapes take paths, compound paths, groups, compound shapes, type, blends and envelopes કમ્પાઉન્ડ આકારો પાથ, કમ્પાઉન્ડ પાથ, ગ્રૂપ, કમ્પાઉન્ડ આકારો, ટાઇપ, બ્લેન્ડ અને એન્વલપ લે છે +@msg compound {_1} must contain exactly one open path to join જોડવા માટે કમ્પાઉન્ડ {_1} માં બરાબર એક ખુલ્લો પાથ હોવો જોઈએ +@msg concat exceeds the maximum safe length concat મહત્તમ સુરક્ષિત લંબાઈ કરતાં વધી જાય છે +@msg connect end must be "start" or "end" connect નો છેડો "start" અથવા "end" હોવો જોઈએ +@msg connect needs a path other than the one extended connect માટે લંબાવેલા પાથ સિવાયનો બીજો પાથ જોઈએ +@msg connect needs extend connect માટે extend જોઈએ +@msg connect needs id connect માટે id જોઈએ +@msg connect path has no open end connect પાથનો કોઈ ખુલ્લો છેડો નથી +@msg contents must be a string contents એ સ્ટ્રિંગ હોવી જોઈએ +@msg contents must be a string or a number contents એ સ્ટ્રિંગ અથવા સંખ્યા હોવી જોઈએ +@msg continuation must be an array of path chunks continuation એ પાથના ટુકડાઓનો એરે હોવો જોઈએ +@msg continuation requires points continuation માટે બિંદુઓ જરૂરી છે +@msg control must be fillStroke, coloring, drawMode or screenMode control એ fillStroke, coloring, drawMode અથવા screenMode હોવું જોઈએ +@msg coordinate out of range (limit ±{MAX_COORD} pt) કોઓર્ડિનેટ રેન્જની બહાર છે (મર્યાદા ±{MAX_COORD} pt) +@msg copy needs path: the file to copy into the document's folder copy માટે path જોઈએ: દસ્તાવેજના ફોલ્ડરમાં કૉપિ કરવાની ફાઇલ +@msg copy takes images only: relink placed documents where their files are copy ફક્ત ઇમેજ લે છે: મૂકેલા દસ્તાવેજોને તેમની ફાઇલો જ્યાં છે ત્યાં ફરી લિંક કરો +@msg copying a file isn't available on the web વેબ પર ફાઇલ કૉપિ કરવાનું ઉપલબ્ધ નથી +@msg copyrightStatus must be unknown, copyrighted or publicDomain copyrightStatus એ unknown, copyrighted અથવા publicDomain હોવું જોઈએ +@msg copyrightUrl must be a URL (no spaces, at most 2048 characters) copyrightUrl એ URL હોવું જોઈએ (જગ્યા વગર, વધુમાં વધુ 2048 અક્ષરો) +@msg corners must be 4 [x, y] points (TL, TR, BR, BL) corners એ 4 [x, y] બિંદુઓ હોવા જોઈએ (TL, TR, BR, BL) +@msg could not decode image: {0} ઇમેજ ડીકોડ કરી શકાઈ નહીં: {0} +@msg could not decode image: {_1} ઇમેજ ડીકોડ કરી શકાઈ નહીં: {_1} +@msg couldn't start the download: {e} ડાઉનલોડ શરૂ કરી શકાયું નહીં: {e} +@msg counterPer `{c}`: item or file counterPer `{c}`: item અથવા file +@msg crop `{_1}`: only PDF pages have art, trim, bleed and media boxes; use "crop" or "bounding" crop `{_1}`: ફક્ત PDF પેજમાં art, trim, bleed અને media બૉક્સ હોય છે; "crop" અથવા "bounding" વાપરો +@msg crop rectangle doesn't overlap the image ક્રોપ લંબચોરસ ઇમેજ પર ઓવરલેપ થતો નથી +@msg cropTo is not a crop box cropTo ક્રોપ બૉક્સ નથી +@msg cross-reference and object streams aren't supported ક્રૉસ-રેફરન્સ અને ઑબ્જેક્ટ સ્ટ્રીમ સમર્થિત નથી +@msg damaged compressed data: {e} નુકસાન પામેલો કમ્પ્રેસ્ડ ડેટા: {e} +@msg dash lengths must be numbers, got {v} ડૅશની લંબાઈ સંખ્યાઓ હોવી જોઈએ, {v} મળ્યું +@msg dash must be a list of lengths or null, got {v} dash એ લંબાઈઓની સૂચિ અથવા null હોવું જોઈએ, {v} મળ્યું +@msg dash needs a length that is not 0 dash માટે 0 ન હોય તેવી લંબાઈ જોઈએ +@msg dash takes at most {MAX_DASHES} lengths dash વધુમાં વધુ {MAX_DASHES} લંબાઈ લે છે +@msg dashOffset needs a dash pattern dashOffset માટે ડૅશ પેટર્ન જોઈએ +@msg data key `{k}`: letters, digits, -, _ and . (not name or vc-…) ડેટા કી `{k}`: અક્ષરો, અંકો, -, _ અને . (name અથવા vc-… નહીં) +@msg data must be an object of key: value, not {v} data એ key: value નો ઑબ્જેક્ટ હોવો જોઈએ, {v} નહીં +@msg data set `{name}` holds a control character, which a variable library can't hold ડેટા સેટ `{name}` માં કંટ્રોલ અક્ષર છે, જે વેરિએબલ લાઇબ્રેરી રાખી શકતી નથી +@msg data set `{name}` holds a graph value for `{var}` with {_1} ડેટા સેટ `{name}` માં `{var}` માટે {_1} વાળી ગ્રાફ વેલ્યુ છે +@msg data set `{name}` holds a graph value for `{var}` without rows or series ડેટા સેટ `{name}` માં `{var}` માટે પંક્તિઓ કે શ્રેણી વગરની ગ્રાફ વેલ્યુ છે +@msg data set `{name}` holds a value for `{var}`, which the library doesn't declare ડેટા સેટ `{name}` માં `{var}` માટે વેલ્યુ છે, જેને લાઇબ્રેરી જાહેર કરતી નથી +@msg data set `{name}` holds an image value for `{var}` that isn't a file's absolute path ડેટા સેટ `{name}` માં `{var}` માટે એવી ઇમેજ વેલ્યુ છે જે ફાઇલનો સંપૂર્ણ પાથ નથી +@msg data set `{name}` holds two values for `{var}` ડેટા સેટ `{name}` માં `{var}` માટે બે વેલ્યુ છે +@msg data set `{name}` is declared twice ડેટા સેટ `{name}` બે વાર જાહેર કરાયો છે +@msg data set `{name}` starts or ends with white space, which a variable library can't hold ડેટા સેટ `{name}` ખાલી જગ્યાથી શરૂ કે સમાપ્ત થાય છે, જે વેરિએબલ લાઇબ્રેરી રાખી શકતી નથી +@msg data set `{set}` holds a graph value for `{var}` longer than {MAX_GRAPH_CSV} bytes ડેટા સેટ `{set}` માં `{var}` માટે {MAX_GRAPH_CSV} બાઇટ કરતાં લાંબી ગ્રાફ વેલ્યુ છે +@msg data set `{set}` holds a graph value for `{var}` with {_1} ડેટા સેટ `{set}` માં `{var}` માટે {_1} વાળી ગ્રાફ વેલ્યુ છે +@msg data set `{set}` holds a value for `{_1}` that isn't {what} ડેટા સેટ `{set}` માં `{_1}` માટે એવી વેલ્યુ છે જે {what} નથી +@msg data set `{set}` holds a value for `{var}` that isn't a graph's `data` element ડેટા સેટ `{set}` માં `{var}` માટે એવી વેલ્યુ છે જે ગ્રાફનું `data` એલિમેન્ટ નથી +@msg data takes at most {MAX_DATA} keys at once data એકસાથે વધુમાં વધુ {MAX_DATA} કી લે છે +@msg dataBase64 is not base64 dataBase64 એ base64 નથી +@msg dataset `{name}` already exists ડેટા સેટ `{name}` પહેલેથી અસ્તિત્વમાં છે +@msg dataset `{to}` already exists ડેટા સેટ `{to}` પહેલેથી અસ્તિત્વમાં છે +@msg date `{d}`: YYYY-MM-DD તારીખ `{d}`: YYYY-MM-DD +@msg decimals must be {_1}–{_2} (got {_3}) decimals એ {_1}–{_2} હોવું જોઈએ ({_3} મળ્યું) +@msg decoded data is too large ડીકોડ કરેલો ડેટા ખૂબ મોટો છે +@msg default is not one of the options default વિકલ્પોમાંથી એક નથી +@msg defaultStrokeCap must be a StrokeCap value defaultStrokeCap એ StrokeCap મૂલ્ય હોવું જોઈએ +@msg defaultStrokeDashOffset must be from -1000000 to 1000000 points defaultStrokeDashOffset -1000000 થી 1000000 પોઇન્ટ સુધી હોવું જોઈએ +@msg defaultStrokeDashOffset needs defaultStrokeDashes first defaultStrokeDashOffset માટે પહેલાં defaultStrokeDashes જોઈએ +@msg defaultStrokeJoin must be a StrokeJoin value defaultStrokeJoin એ StrokeJoin મૂલ્ય હોવું જોઈએ +@msg defaultStrokeMiterLimit must be from 1 to 500 defaultStrokeMiterLimit 1 થી 500 સુધી હોવું જોઈએ +@msg defaultStrokeWidth must be from 0 to 1000 points defaultStrokeWidth 0 થી 1000 પોઇન્ટ સુધી હોવું જોઈએ +@msg define a variable first પહેલાં વેરિએબલ વ્યાખ્યાયિત કરો +@msg detect must be true or false detect true અથવા false હોવું જોઈએ +@msg did not finish loading within {secs} s {secs} s માં લોડ થવાનું પૂરું થયું નહીં +@msg different horizontalScale and verticalScale are not available yet અલગ horizontalScale અને verticalScale હજુ ઉપલબ્ધ નથી +@msg direct-select anchor points of a path પાથના એન્કર બિંદુઓ ડાયરેક્ટ-સિલેક્ટ કરો +@msg direct-select anchor points to cut at (not the end points of open paths) જ્યાં કાપવું હોય તે એન્કર બિંદુઓ ડાયરેક્ટ-સિલેક્ટ કરો (ખુલ્લા પાથના છેડાના બિંદુઓ નહીં) +@msg direct-select the anchor points to remove દૂર કરવાના એન્કર બિંદુઓ ડાયરેક્ટ-સિલેક્ટ કરો +@msg direct-select two or three anchor points, or give `points` બે કે ત્રણ એન્કર બિંદુઓ ડાયરેક્ટ-સિલેક્ટ કરો, અથવા `points` આપો +@msg distance must be > 0 distance > 0 હોવું જોઈએ +@msg divide into 1 to {MAX_PIECES} slices 1 થી {MAX_PIECES} સ્લાઇસમાં વિભાજિત કરો +@msg doScript needs the action's name and its set's name doScript ને ક્રિયાનું નામ અને તેના સેટનું નામ જોઈએ +@msg doScript needs the action's name and its set's name, as strings doScript ને ક્રિયાનું નામ અને તેના સેટનું નામ, સ્ટ્રિંગ તરીકે, જોઈએ +@msg doScript takes an action's name, its set's name and dialogs doScript ક્રિયાનું નામ, તેના સેટનું નામ અને dialogs લે છે +@msg doScript's dialogs must be true or false doScript નું dialogs true અથવા false હોવું જોઈએ +@msg document.setup reported no settings document.setup એ કોઈ સેટિંગ્સ જણાવી નહીં +@msg duplicate field `{key}` `{key}` ફીલ્ડ બે વાર છે +@msg duplicate needs a relative object for an insertionLocation insertionLocation માટે duplicate ને સંબંધિત ઑબ્જેક્ટ જોઈએ +@msg dx and dy give the arrow's direction dx અને dy તીરની દિશા આપે છે +@msg dx and dy must be finite dx અને dy સીમિત હોવા જોઈએ +@msg dx and dy must be numbers dx અને dy સંખ્યાઓ હોવા જોઈએ +@msg dxf fitTo must be [width, height], positive dxf fitTo એ ધન [width, height] હોવું જોઈએ +@msg dxf must be an object of DXF import options dxf એ DXF ઇમ્પોર્ટ વિકલ્પોનો ઑબ્જેક્ટ હોવો જોઈએ +@msg dxf scale must be a positive number up to {_1}, not {s} dxf scale {_1} સુધીની ધન સંખ્યા હોવી જોઈએ, {s} નહીં +@msg dxf unit `{u}`: a unit such as mm, cm, in or pt dxf unit `{u}`: mm, cm, in અથવા pt જેવો એકમ +@msg dxf: {e} dxf: {e} +@msg each dash length must be a number from 0 to {MAX_DASH_LENGTH} દરેક ડૅશ લંબાઈ 0 થી {MAX_DASH_LENGTH} સુધીની સંખ્યા હોવી જોઈએ +@msg each dash length must be from 0 to 1000000 points દરેક ડૅશ લંબાઈ 0 થી 1000000 પોઇન્ટ સુધી હોવી જોઈએ +@msg each font must be {{name, parts}} દરેક ફોન્ટ {{name, parts}} હોવો જોઈએ +@msg each font needs a name દરેક ફોન્ટને નામ જોઈએ +@msg each format is an object {{format, scale?, suffix?}} દરેક ફોર્મેટ એક ઑબ્જેક્ટ {{format, scale?, suffix?}} છે +@msg each item needs an id દરેક આઇટમને id જોઈએ +@msg each light must be an object દરેક લાઇટ ઑબ્જેક્ટ હોવી જોઈએ +@msg each match needs `kind` દરેક match ને `kind` જોઈએ +@msg each match needs a `name` દરેક match ને `name` જોઈએ +@msg each number of `{k}` must be from {min} to {max} `{k}` ની દરેક સંખ્યા {min} થી {max} સુધી હોવી જોઈએ +@msg each of `fonts` is {{family, style?}}; 1 to 1000 of them `fonts` માંનું દરેક {{family, style?}} છે; 1 થી 1000 સુધી +@msg each of `items` is {{id, corners?}} with an object id, not {it} `items` માંનું દરેક ઑબ્જેક્ટ id સાથે {{id, corners?}} છે, {it} નહીં +@msg each of `items` is {{kind, item}} `items` માંનું દરેક {{kind, item}} છે +@msg each of `words` must be {{id, start, end}} `words` માંનું દરેક {{id, start, end}} હોવું જોઈએ +@msg each of `words` takes id, start and end, not `{k}` `words` માંનું દરેક id, start અને end લે છે, `{k}` નહીં +@msg each of `{GRAPHICS}` must be an object `{GRAPHICS}` માંનું દરેક ઑબ્જેક્ટ હોવું જોઈએ +@msg each of `{GRAPHICS}` needs `symbol`, the name of a symbol `{GRAPHICS}` માંના દરેકને `symbol`, સિમ્બોલનું નામ, જોઈએ +@msg each of `{MAP_ART}` must be an object `{MAP_ART}` માંનું દરેક ઑબ્જેક્ટ હોવું જોઈએ +@msg each of `{MAP_ART}` needs `surface`, a whole number from 1 to {MAX_MAP_SURFACE} `{MAP_ART}` માંના દરેકને `surface`, 1 થી {MAX_MAP_SURFACE} સુધીની પૂર્ણ સંખ્યા, જોઈએ +@msg each of `{MAP_ART}` needs `symbol`, the name of a symbol `{MAP_ART}` માંના દરેકને `symbol`, સિમ્બોલનું નામ, જોઈએ +@msg each path chunk must contain 1 to 4096 points દરેક પાથ ટુકડામાં 1 થી 4096 બિંદુઓ હોવા જોઈએ +@msg each pick is {{at: [x, y]}} or {{rect: [x0, y0, x1, y1]}} (got {v}) દરેક pick {{at: [x, y]}} અથવા {{rect: [x0, y0, x1, y1]}} છે (મળ્યું {v}) +@msg each piece needs a `path` દરેક ટુકડાને `path` જોઈએ +@msg each row needs `from` દરેક પંક્તિને `from` જોઈએ +@msg each set must be {{name, cannotStart?, cannotEnd?, hanging?, inseparable?}} દરેક સેટ {{name, cannotStart?, cannotEnd?, hanging?, inseparable?}} હોવો જોઈએ +@msg each set needs a name દરેક સેટને નામ જોઈએ +@msg each stop needs a position દરેક સ્ટોપને સ્થાન જોઈએ +@msg each subpath needs an anchors array દરેક સબપાથને anchors એરે જોઈએ +@msg each weight must be a number of 0 or more (got {v}) દરેક વજન 0 કે વધુની સંખ્યા હોવી જોઈએ (મળ્યું {v}) +@msg easingType must be easeIn, easeOut, easeInOut or easeOutIn easingType easeIn, easeOut, easeInOut અથવા easeOutIn હોવું જોઈએ +@msg editingData must be true or false editingData true અથવા false હોવું જોઈએ +@msg editingData must be true, false or "always" editingData true, false અથવા "always" હોવું જોઈએ +@msg edits overlap ફેરફારો એકબીજા પર આવે છે +@msg edits too large ફેરફારો ખૂબ મોટા છે +@msg effect {k} is `{_1}`, not `{id}` ઇફેક્ટ {k} `{_1}` છે, `{id}` નહીં +@msg effects of objects whose appearances differ can't be moved together જેમના દેખાવ અલગ હોય તેવા ઑબ્જેક્ટ્સની ઇફેક્ટ્સ એકસાથે ખસેડી શકાતી નથી +@msg ellipse with inscribed true is not available yet inscribed true સાથેનો ellipse હજુ ઉપલબ્ધ નથી +@msg embeddedFonts must be true or false embeddedFonts true અથવા false હોવું જોઈએ +@msg empty brush stroke ખાલી બ્રશ સ્ટ્રોક +@msg empty cutter ખાલી કટર +@msg empty header in column {_1} કૉલમ {_1} માં ખાલી હેડર +@msg empty path ખાલી પાથ +@msg encoding `{_1}`: utf8 or utf16 encoding `{_1}`: utf8 અથવા utf16 +@msg end અંત +@msg ends must be two of "first" and "last" ends એ "first" અને "last" માંથી બે હોવા જોઈએ +@msg every map is in use દરેક મેપ વપરાશમાં છે +@msg every numbered name for it is taken in the Fonts folder Fonts ફોલ્ડરમાં તેના માટેનું દરેક ક્રમાંકિત નામ લેવાઈ ગયું છે +@msg every numbered name for the copy is taken નકલ માટેનું દરેક ક્રમાંકિત નામ લેવાઈ ગયું છે +@msg every numbered name for the result is taken પરિણામ માટેનું દરેક ક્રમાંકિત નામ લેવાઈ ગયું છે +@msg every numbered name for {name} is taken in that folder તે ફોલ્ડરમાં {name} માટેનું દરેક ક્રમાંકિત નામ લેવાઈ ગયું છે +@msg every numbered name for {name} is taken in the document's folder દસ્તાવેજના ફોલ્ડરમાં {name} માટેનું દરેક ક્રમાંકિત નામ લેવાઈ ગયું છે +@msg every pixel matches the background: no image would be left દરેક પિક્સેલ પૃષ્ઠભૂમિ સાથે મેળ ખાય છે: કોઈ ઇમેજ બાકી નહીં રહે +@msg executeMenuCommand needs a menu command, as a string executeMenuCommand ને મેનૂ કમાન્ડ, સ્ટ્રિંગ તરીકે, જોઈએ +@msg executeMenuCommand: no command {id} executeMenuCommand: કોઈ કમાન્ડ {id} નથી +@msg executeMenuCommand: unknown menu command "{name}" executeMenuCommand: અજાણ્યો મેનૂ કમાન્ડ "{name}" +@msg exit isolation mode first પહેલાં આઇસોલેશન મોડમાંથી બહાર નીકળો +@msg expanded SVG styles exceed the import size limit વિસ્તૃત SVG સ્ટાઇલ્સ ઇમ્પોર્ટ કદ મર્યાદા કરતાં વધી જાય છે +@msg expected an object of align parameters align પેરામીટર્સનો ઑબ્જેક્ટ અપેક્ષિત હતો +@msg expected {count} paragraph styles, one per paragraph {count} ફકરા સ્ટાઇલ્સ અપેક્ષિત હતી, દરેક ફકરા માટે એક +@msg expected {{"dataBase64": "…"}} {{"dataBase64": "…"}} અપેક્ષિત હતું +@msg expected {{"objects": [...]}} {{"objects": [...]}} અપેક્ષિત હતું +@msg export `{name}`: {e} એક્સપોર્ટ `{name}`: {e} +@msg export presets file is larger than {MAX_PRESET_FILE_BYTES} bytes એક્સપોર્ટ પ્રીસેટ્સ ફાઇલ {MAX_PRESET_FILE_BYTES} બાઇટ્સ કરતાં મોટી છે +@msg exportText must be editable or appearance exportText editable અથવા appearance હોવું જોઈએ +@msg exportType must be movieClip or graphic, not `{s}` exportType movieClip અથવા graphic હોવું જોઈએ, `{s}` નહીં +@msg extend end must be "start" or "end" extend end "start" અથવા "end" હોવું જોઈએ +@msg extend needs id extend ને id જોઈએ +@msg extension {e} is listed twice એક્સ્ટેન્શન {e} બે વાર સૂચિબદ્ધ છે +@msg extension {e}: use 1-16 lower-case letters and digits, without the dot એક્સ્ટેન્શન {e}: ડોટ વિના 1-16 નાના અક્ષરો અને અંકો વાપરો +@msg feTurbulence's numOctaves is at most {MAX_OCTAVES} feTurbulence નું numOctaves વધુમાં વધુ {MAX_OCTAVES} છે +@msg featureChanges lists at most {MAX_FEATURE_CHANGES} tags featureChanges વધુમાં વધુ {MAX_FEATURE_CHANGES} ટૅગ્સ સૂચવે છે +@msg featureChanges must be a list of tags featureChanges ટૅગ્સની યાદી હોવી જોઈએ +@msg features lists at most {max} tags features વધુમાં વધુ {max} ટૅગ્સ સૂચવે છે +@msg features must be a list of tags features ટૅગ્સની યાદી હોવી જોઈએ +@msg fidelity must be 0..100 fidelity 0..100 હોવું જોઈએ +@msg field `choice` takes `replace` or `ignore`, got {value} `choice` ફીલ્ડ `replace` અથવા `ignore` લે છે, મળ્યું {value} +@msg field `picks` takes a list, got {value} `picks` ફીલ્ડ યાદી લે છે, મળ્યું {value} +@msg field `picks` takes {missing} paths or nulls, got {value} `picks` ફીલ્ડ {missing} પાથ અથવા null લે છે, મળ્યું {value} +@msg field `{field}` takes a string, got {value} `{field}` ફીલ્ડ સ્ટ્રિંગ લે છે, મળ્યું {value} +@msg field `{field}` takes true or false, got {value} `{field}` ફીલ્ડ true અથવા false લે છે, મળ્યું {value} +@msg file name too long to zip: {_1} zip કરવા માટે ફાઇલનું નામ ખૂબ લાંબું છે: {_1} +@msg file name too long to zip: {name} zip કરવા માટે ફાઇલનું નામ ખૂબ લાંબું છે: {name} +@msg file version {0} is newer than this VectorCraft supports ({VERSION}) ફાઇલ આવૃત્તિ {0} આ VectorCraft જે સપોર્ટ કરે છે તેના કરતાં નવી છે ({VERSION}) +@msg file.info gave no fields file.info એ કોઈ ફીલ્ડ આપ્યાં નહીં +@msg files can't be read here ફાઇલો અહીં વાંચી શકાતી નથી +@msg files must be {{name, dataBase64}} files {{name, dataBase64}} હોવી જોઈએ +@msg fill on a symbol instance must be a solid color or none સિમ્બોલ ઇન્સ્ટન્સ પરનું ફિલ ઘન રંગ અથવા none હોવું જોઈએ +@msg finally table {t} out of range finally ટેબલ {t} શ્રેણીની બહાર છે +@msg finish `{id}` first (see learn.finish) પહેલાં `{id}` પૂર્ણ કરો (learn.finish જુઓ) +@msg finish editing the pattern first પહેલાં પેટર્નનું સંપાદન પૂર્ણ કરો +@msg finish the active edit before applying Transform Each Transform Each લાગુ કરતાં પહેલાં ચાલુ સંપાદન પૂર્ણ કરો +@msg fit must be none|autoHeight|shrinkText|block, got {id} fit none|autoHeight|shrinkText|block હોવું જોઈએ, મળ્યું {id} +@msg fitToPage fitToPage +@msg flags cannot be given with a RegExp object RegExp ઑબ્જેક્ટ સાથે flags આપી શકાતા નથી +@msg flattener must be an object of flattener options, not {v} flattener એ flattener વિકલ્પોનો ઑબ્જેક્ટ હોવો જોઈએ, {v} નહીં +@msg flattener.{k} is not a flattener option flattener.{k} એ flattener વિકલ્પ નથી +@msg flattener: {e} flattener: {e} +@msg flattenerPreset `{name}`: high, medium, low or a saved one (see flattener.presets.list) flattenerPreset `{name}`: high, medium, low અથવા સાચવેલો કોઈ એક (flattener.presets.list જુઓ) +@msg flattens the object to a line or a point ઑબ્જેક્ટને રેખા અથવા બિંદુમાં ચપટો કરી દે છે +@msg flipProfile must be along|across, got {o} flipProfile along|across હોવું જોઈએ, મળ્યું {o} +@msg folders `{f}`: none, rows, format, item or itemFormat folders `{f}`: none, rows, format, item અથવા itemFormat +@msg folders deeper than {MAX_BATCH_DEPTH} levels {MAX_BATCH_DEPTH} સ્તરો કરતાં ઊંડા ફોલ્ડર્સ +@msg folders deeper than {MAX_DEPTH} levels {MAX_DEPTH} સ્તરો કરતાં ઊંડા ફોલ્ડર્સ +@msg font family `{family}` is not available ફોન્ટ ફેમિલી `{family}` ઉપલબ્ધ નથી +@msg font family `{tf}` is not available ફોન્ટ ફેમિલી `{tf}` ઉપલબ્ધ નથી +@msg fonts must be a list of composite fonts fonts કમ્પોઝિટ ફોન્ટ્સની યાદી હોવી જોઈએ +@msg fonts must be a list of family names fonts ફેમિલી નામોની યાદી હોવી જોઈએ +@msg format `{f}`: pdf or postscript format `{f}`: pdf અથવા postscript +@msg format `{f}`: text or json format `{f}`: text અથવા json +@msg format is `{format}` ફોર્મેટ `{format}` છે +@msg formats must be an array of rows, not {v} formats પંક્તિઓની એરે હોવી જોઈએ, {v} નહીં +@msg frame {_1} already has a next frame: break that link first ફ્રેમ {_1} પાસે પહેલેથી આગલી ફ્રેમ છે: પહેલાં તે લિંક તોડો +@msg frame {_1} already has a previous frame: break that link first ફ્રેમ {_1} પાસે પહેલેથી પાછલી ફ્રેમ છે: પહેલાં તે લિંક તોડો +@msg freeform line {i} must be an array of point indices freeform રેખા {i} બિંદુ ઇન્ડેક્સની એરે હોવી જોઈએ +@msg freeform line {i}: {e} freeform રેખા {i}: {e} +@msg freeform point {i} needs `at` [x, y] and a valid `color` freeform બિંદુ {i} ને `at` [x, y] અને માન્ય `color` જોઈએ +@msg freeform point {i}: {e} freeform બિંદુ {i}: {e} +@msg frequency must be between 1 and 300 lines per inch frequency પ્રતિ ઇંચ 1 થી 300 લાઇન્સ વચ્ચે હોવી જોઈએ +@msg from and to must be finite from અને to સીમિત હોવા જોઈએ +@msg from must be [x0, y0, x1, y1] from [x0, y0, x1, y1] હોવું જોઈએ +@msg function declaration index out of range ફંક્શન ડિક્લેરેશન ઇન્ડેક્સ શ્રેણીની બહાર છે +@msg gap must be 0 to {_1} pt, not {gap} gap 0 થી {_1} pt હોવો જોઈએ, {gap} નહીં +@msg gaps and margin must be finite gaps અને margin સીમિત હોવા જોઈએ +@msg generators need the ECMAScript 2015 built-ins, and this realm was made without them generators ને ECMAScript 2015 બિલ્ટ-ઇન્સ જોઈએ, અને આ realm તેમના વિના બનાવાયું હતું +@msg getIsFileOpen cannot check that path getIsFileOpen તે પાથ તપાસી શકતું નથી +@msg getIsFileOpen needs a path, as a string getIsFileOpen ને પાથ, સ્ટ્રિંગ તરીકે, જોઈએ +@msg give `all`, or `script` and `path` or one of them `all` આપો, અથવા `script` અને `path` અથવા તેમાંથી એક +@msg give `anchor` or `guide`, not both `anchor` અથવા `guide` આપો, બંને નહીં +@msg give `anchor`, the index of the anchor to slide `anchor` આપો, સરકાવવાના એન્કરનો ઇન્ડેક્સ +@msg give `angle` or `reset: true`, not both `angle` અથવા `reset: true` આપો, બંને નહીં +@msg give `at` or `clear`, not both `at` અથવા `clear` આપો, બંને નહીં +@msg give `before` or `after`, not both `before` અથવા `after` આપો, બંને નહીં +@msg give `char`, `text`, `code` or `unicode` `char`, `text`, `code` અથવા `unicode` આપો +@msg give `colors`, or `color` and `rule` `colors` આપો, અથવા `color` અને `rule` +@msg give `count` or `spacing`, not both `count` અથવા `spacing` આપો, બંને નહીં +@msg give `desiredK`, the desired file size in K (1024 bytes): a number above 0 and at most 1048576 `desiredK` આપો, K (1024 બાઇટ્સ) માં ઇચ્છિત ફાઇલ કદ: 0 થી વધુ અને વધુમાં વધુ 1048576 ની સંખ્યા +@msg give `event`, such as onclick `event` આપો, જેમ કે onclick +@msg give `file`, the JavaScript file's path or URL `file` આપો, JavaScript ફાઇલનો પાથ અથવા URL +@msg give `fill` and/or `stroke` `fill` અને/અથવા `stroke` આપો +@msg give `fill`, `stroke` or both `fill`, `stroke` અથવા બંને આપો +@msg give `folder` `folder` આપો +@msg give `fonts`, or open a document `fonts` આપો, અથવા દસ્તાવેજ ખોલો +@msg give `from` or `indices`, not both `from` અથવા `indices` આપો, બંને નહીં +@msg give `id` (no text is being edited) `id` આપો (કોઈ ટેક્સ્ટ સંપાદિત થઈ રહ્યું નથી) +@msg give `id` and `anchors`, or `items`, not both `id` અને `anchors`, અથવા `items` આપો, બંને નહીં +@msg give `id` or `file` (see plugin.safeMode) `id` અથવા `file` આપો (plugin.safeMode જુઓ) +@msg give `id` or `guide`, not both `id` અથવા `guide` આપો, બંને નહીં +@msg give `inkLimit`, `removeWhiteOverprint` or `overprintBlack` `inkLimit`, `removeWhiteOverprint` અથવા `overprintBlack` આપો +@msg give `length` or `to` `length` અથવા `to` આપો +@msg give `matches`: [{{kind, name, target}}] `matches` આપો: [{{kind, name, target}}] +@msg give `name` (or edit a pattern) `name` આપો (અથવા પેટર્ન સંપાદિત કરો) +@msg give `name` or `names` `name` અથવા `names` આપો +@msg give `name` or `path`, not both `name` અથવા `path` આપો, બંને નહીં +@msg give `name`, an SVG filter's name `name` આપો, SVG ફિલ્ટરનું નામ +@msg give `params` or `reset`, not both `params` અથવા `reset` આપો, બંને નહીં +@msg give `path` (a .wasm file) or `dataBase64` (the module) `path` (.wasm ફાઇલ) અથવા `dataBase64` (મોડ્યુલ) આપો +@msg give `path` or `data` `path` અથવા `data` આપો +@msg give `path` or `name`, not both `path` અથવા `name` આપો, બંને નહીં +@msg give `path`, `data` or `dataBase64` `path`, `data` અથવા `dataBase64` આપો +@msg give `path`, `data`, `dataBase64` or `csv` `path`, `data`, `dataBase64` અથવા `csv` આપો +@msg give `path`, `xml` or `dataBase64` `path`, `xml` અથવા `dataBase64` આપો +@msg give `path`, an SVG file, `svg`, SVG text, or `dataBase64`, file bytes `path`, SVG ફાઇલ, `svg`, SVG ટેક્સ્ટ, અથવા `dataBase64`, ફાઇલ બાઇટ્સ આપો +@msg give `points` or `rect`, not both `points` અથવા `rect` આપો, બંને નહીં +@msg give `script`, the JavaScript the event runs ("" removes the event) `script` આપો, ઇવેન્ટ જે JavaScript ચલાવે છે તે ("" ઇવેન્ટ દૂર કરે છે) +@msg give `size`, `rotate` or `stacking` `size`, `rotate` અથવા `stacking` આપો +@msg give `surface`, `clearAll`, `shade` or `invisible` `surface`, `clearAll`, `shade` અથવા `invisible` આપો +@msg give `text` (the reading) or `remove` `text` (વાંચન) અથવા `remove` આપો +@msg give `width` or `height` `width` અથવા `height` આપો +@msg give `x` and `y` (and a `tolerance` of 0 or more) `x` અને `y` આપો (અને 0 કે વધુની `tolerance`) +@msg give `xml`, one SVG element `xml` આપો, એક SVG એલિમેન્ટ +@msg give `{a}` and `{b}` `{a}` અને `{b}` આપો +@msg give `{key}` or `{other}`, not both `{key}` અથવા `{other}` આપો, બંને નહીં +@msg give a CoordinateSystem value CoordinateSystem મૂલ્ય આપો +@msg give a ScreenMode value ScreenMode મૂલ્ય આપો +@msg give a Transformation value Transformation મૂલ્ય આપો +@msg give a Variable or null Variable અથવા null આપો +@msg give a character's Unicode code point, as U+3001 અક્ષરનો Unicode કોડ પૉઇન્ટ આપો, જેમ કે U+3001 +@msg give a fraction `t` from 0 to 1 0 થી 1 સુધીનો અપૂર્ણાંક `t` આપો +@msg give a mode or r/g/b, c/m/y/k, gray or tint adjustments મોડ અથવા r/g/b, c/m/y/k, gray અથવા tint ગોઠવણો આપો +@msg give a name or an index નામ અથવા ઇન્ડેક્સ આપો +@msg give a name, as a string નામ આપો, સ્ટ્રિંગ તરીકે +@msg give a name, or paint the active proxy with a saved preset નામ આપો, અથવા સક્રિય પ્રોક્સીને સાચવેલા પ્રીસેટથી રંગો +@msg give a name, or select a stroke with a saved profile નામ આપો, અથવા સાચવેલી પ્રોફાઇલવાળો સ્ટ્રોક પસંદ કરો +@msg give a pattern name or select an object painted with a pattern પેટર્નનું નામ આપો અથવા પેટર્નથી રંગાયેલો ઑબ્જેક્ટ પસંદ કરો +@msg give anchor or side, not both anchor અથવા side આપો, બંને નહીં +@msg give at least one of `name`, `kind`, `text`, `within`, `intersects`, `minWidth`, `maxWidth`, `minHeight`, `maxHeight`, `minThickness`, `maxThickness`, `minArea`, `maxArea`, `minAnchors`, `maxAnchors` `name`, `kind`, `text`, `within`, `intersects`, `minWidth`, `maxWidth`, `minHeight`, `maxHeight`, `minThickness`, `maxThickness`, `minArea`, `maxArea`, `minAnchors`, `maxAnchors` માંથી ઓછામાં ઓછું એક આપો +@msg give at least one of clip, invert, disabled, linked clip, invert, disabled, linked માંથી ઓછામાં ઓછું એક આપો +@msg give base: "none", "hard", "soft" or a set's name base આપો: "none", "hard", "soft" અથવા સેટનું નામ +@msg give both `start` and `end` [x, y] (or neither) `start` અને `end` [x, y] બંને આપો (અથવા એક પણ નહીં) +@msg give color, none, swatch or gradient color, none, swatch અથવા gradient આપો +@msg give color, none, swatch, gradient or opacity color, none, swatch, gradient અથવા opacity આપો +@msg give corners of the path: anchors where its sides meet at an angle પાથના ખૂણા આપો: એવા એન્કર જ્યાં તેની બાજુઓ ખૂણે મળે છે +@msg give dataBase64 dataBase64 આપો +@msg give either at (a click) or area (a path drawn around the overlaps) at (એક ક્લિક) અથવા area (ઓવરલેપની આસપાસ દોરેલો પાથ) માંથી એક આપો +@msg give exactly one of `at`, `rect` and `points` `at`, `rect` અને `points` માંથી બરાબર એક આપો +@msg give exactly one of `path` and `dataBase64` `path` અને `dataBase64` માંથી બરાબર એક આપો +@msg give exactly one of `path` and `source` `path` અને `source` માંથી બરાબર એક આપો +@msg give exactly one of `path`, `data` and `dataBase64` `path`, `data` અને `dataBase64` માંથી બરાબર એક આપો +@msg give fill, stroke, opacity and/or blend fill, stroke, opacity અને/અથવા blend આપો +@msg give fonts: [{{name, parts}}…] fonts આપો: [{{name, parts}}…] +@msg give formats or a preset, not both formats અથવા preset આપો, બંને નહીં +@msg give horizontal or vertical horizontal અથવા vertical આપો +@msg give index or indexes, not both index અથવા indexes આપો, બંને નહીં +@msg give name or value name અથવા value આપો +@msg give newName or delete newName અથવા delete આપો +@msg give offset or by offset અથવા by આપો +@msg give one element એક એલિમેન્ટ આપો +@msg give one of `path`, `name`, `data` or `dataBase64` `path`, `name`, `data` અથવા `dataBase64` માંથી એક આપો +@msg give one of `to`, `rect` or `at` `to`, `rect` અથવા `at` માંથી એક આપો +@msg give one of assets, layers, selection or fullDocument assets, layers, selection અથવા fullDocument માંથી એક આપો +@msg give one of path, data or dataBase64 path, data અથવા dataBase64 માંથી એક આપો +@msg give only one of `index`, `indices` and `t` `index`, `indices` અને `t` માંથી ફક્ત એક જ આપો +@msg give only one of onto, above, below, icon and a column place onto, above, below, icon અને કૉલમ સ્થાનમાંથી ફક્ત એક જ આપો +@msg give opacity or blend opacity અથવા blend આપો +@msg give origin: [x, y], or reset: true origin આપો: [x, y], અથવા reset: true +@msg give overprintFill, overprintStroke, showCenter, imageMap, url or note overprintFill, overprintStroke, showCenter, imageMap, url અથવા note આપો +@msg give path (a file) or folder path (ફાઇલ) અથવા folder આપો +@msg give path, or name and dataBase64 path, અથવા name અને dataBase64 આપો +@msg give paths or files paths અથવા files આપો +@msg give rows, rowHeight, columns or columnWidth rows, rowHeight, columns અથવા columnWidth આપો +@msg give sets: [{{name, cannotStart?, cannotEnd?, hanging?, inseparable?}}…] sets આપો: [{{name, cannotStart?, cannotEnd?, hanging?, inseparable?}}…] +@msg give svg, or dataBase64 of an SVG or SVGZ file svg, અથવા SVG કે SVGZ ફાઇલનો dataBase64 આપો +@msg give text ટેક્સ્ટ આપો +@msg give the asset a name એસેટને નામ આપો +@msg give the image ids to replace બદલવાની ઇમેજ ids આપો +@msg give the path `id` પાથનું `id` આપો +@msg give the preset a `name` પ્રીસેટને `name` આપો +@msg give the preset a name પ્રીસેટને નામ આપો +@msg give the preset a name (1–64 characters) પ્રીસેટને નામ આપો (1–64 અક્ષરો) +@msg give the settings to change, e.g. {{"formats": [{{"format": "png", "scale": "2x"}}]}} બદલવાની સેટિંગ્સ આપો, દા.ત. {{"formats": [{{"format": "png", "scale": "2x"}}]}} +@msg give the style a name સ્ટાઇલને નામ આપો +@msg give two or more style `names` બે કે વધુ સ્ટાઇલ `names` આપો +@msg give two or more swatches બે કે વધુ સ્વેચ આપો +@msg give x, y, or a handle's length or angle x, y, અથવા હેન્ડલની લંબાઈ કે ખૂણો આપો +@msg give {{key, value}} or {{values}} {{key, value}} અથવા {{values}} આપો +@msg global must be true or false global true અથવા false હોવું જોઈએ +@msg glyph {_1} is not drawn for {ch} with the character's style (such as All Caps, Small Caps or a numeral system) અક્ષરની સ્ટાઇલ (જેમ કે All Caps, Small Caps અથવા અંક પદ્ધતિ) સાથે {ch} માટે ગ્લિફ {_1} દોરાતો નથી +@msg glyph {g} is not an alternate of {ch} in {_1} {_2} ગ્લિફ {g} એ {_1} {_2} માં {ch} નો વિકલ્પ નથી +@msg gradient must be "objects" or "mesh" gradient "objects" અથવા "mesh" હોવું જોઈએ +@msg grays must be "profile" or "black", not `{g}` grays "profile" અથવા "black" હોવું જોઈએ, `{g}` નહીં +@msg grayscale profiles can't be working spaces yet ગ્રેસ્કેલ પ્રોફાઇલ્સ હજુ વર્કિંગ સ્પેસ બની શકતી નથી +@msg gridColors must be a preset name or two colours gridColors પ્રીસેટ નામ અથવા બે રંગો હોવા જોઈએ +@msg gridSize must be small, medium or large gridSize small, medium અથવા large હોવું જોઈએ +@msg gridlineIntersection must be true or false gridlineIntersection true અથવા false હોવું જોઈએ +@msg group must be the id of a Shaper Group group એ Shaper Group નું id હોવું જોઈએ +@msg guide {g} is not selected ગાઇડ {g} પસંદ કરેલી નથી +@msg guides are locked ગાઇડ્સ લૉક છે +@msg handle must be 0..3 handle 0..3 હોવું જોઈએ +@msg handle must be in or out handle in અથવા out હોવું જોઈએ +@msg handler at {_1} expects {_2} values but its range starts with {d} {_1} પરનો હેન્ડલર {_2} મૂલ્યો અપેક્ષે છે પણ તેની શ્રેણી {d} થી શરૂ થાય છે +@msg handler depth too large હેન્ડલરની ઊંડાઈ ખૂબ વધારે છે +@msg handler range {_1}..{_2} out of range હેન્ડલર શ્રેણી {_1}..{_2} શ્રેણીની બહાર છે +@msg handles[{i}] must be an object handles[{i}] ઑબ્જેક્ટ હોવું જોઈએ +@msg handles[{i}]: `which` must be "in" or "out" handles[{i}]: `which` "in" અથવા "out" હોવું જોઈએ +@msg handles[{i}]: missing anchor handles[{i}]: એન્કર ખૂટે છે +@msg handles[{i}]: missing id handles[{i}]: id ખૂટે છે +@msg handles[{i}]: object {id} has no anchor {ai} in subpath {si} handles[{i}]: ઑબ્જેક્ટ {id} ના સબપાથ {si} માં એન્કર {ai} નથી +@msg handles[{i}]: object {id} is not a path handles[{i}]: ઑબ્જેક્ટ {id} પાથ નથી +@msg has a step {i} that is not a valid click, change or close તેમાં પગલું {i} છે જે માન્ય ક્લિક, ફેરફાર કે બંધ નથી +@msg heightWidth must be from 1 to 1000 % heightWidth 1 થી 1000 % સુધી હોવું જોઈએ +@msg hiddenLayers applies to a PSD file placed with layers: true hiddenLayers ફક્ત layers: true સાથે મૂકેલી PSD ફાઇલને લાગુ પડે છે +@msg hiddenLayers must be true or false hiddenLayers true અથવા false હોવું જોઈએ +@msg hiddenObjects {v}: "layer" (the default), "omit" or "visible" hiddenObjects {v}: "layer" (ડિફૉલ્ટ), "omit" અથવા "visible" +@msg highlight a layer to merge into જેમાં મર્જ કરવું હોય તે લેયર હાઇલાઇટ કરો +@msg highlight two or more rows in one layer or group એક લેયર કે ગ્રૂપમાં બે કે વધુ પંક્તિઓ હાઇલાઇટ કરો +@msg highlight two or more rows to merge મર્જ કરવા માટે બે કે વધુ પંક્તિઓ હાઇલાઇટ કરો +@msg horizontalScale horizontalScale +@msg hvcC hvcC +@msg icon docks a panel in the icon column: use window.panel.dock icon પેનલને આઇકન કૉલમમાં ડૉક કરે છે: window.panel.dock વાપરો +@msg icon must be true or false icon true અથવા false હોવું જોઈએ +@msg id must be a dimension id id એ ડાયમેન્શન id હોવું જોઈએ +@msg id {value} is a layer, not an object id {value} લેયર છે, ઑબ્જેક્ટ નહીં +@msg id {value} is a layer, not an object; move layers with layer.move id {value} લેયર છે, ઑબ્જેક્ટ નહીં; લેયર્સ layer.move વડે ખસેડો +@msg ids must contain 1–10000 object ids ids માં 1–10000 ઑબ્જેક્ટ ids હોવા જોઈએ +@msg image data `{_1}` is missing ઇમેજ ડેટા `{_1}` ખૂટે છે +@msg image has no bounds ઇમેજની કોઈ સીમા નથી +@msg image is empty ઇમેજ ખાલી છે +@msg image is too large to draw ઇમેજ દોરવા માટે ખૂબ મોટી છે +@msg image would be too large; lower the resolution ઇમેજ ખૂબ મોટી થઈ જશે; રિઝોલ્યુશન ઘટાડો +@msg image {_1} is linked already ઇમેજ {_1} પહેલેથી લિંક થયેલી છે +@msg image {_1} is listed twice ઇમેજ {_1} બે વાર સૂચિબદ્ધ છે +@msg imageMap `{m}`: none, client or server imageMap `{m}`: none, client અથવા server +@msg images in a spot ink whose samples couldn't be read were imported in RGB જે સ્પૉટ ઇંકના સેમ્પલ વાંચી શકાયા નહીં તેમાંની ઇમેજો RGB માં ઇમ્પોર્ટ કરાઈ +@msg images too large to read were left out વાંચવા માટે ખૂબ મોટી ઇમેજો છોડી દેવાઈ +@msg importSlices must be true or false importSlices true અથવા false હોવું જોઈએ +@msg importSlices: a linked PSD file is placed as its flat image; give link: false to embed it with its slices importSlices: લિંક કરેલી PSD ફાઇલ તેની સપાટ ઇમેજ તરીકે મૂકાય છે; તેને સ્લાઇસ સાથે એમ્બેડ કરવા link: false આપો +@msg included must be true or false included true અથવા false હોવું જોઈએ +@msg index must be a number or first, previous, next or last index સંખ્યા અથવા first, previous, next કે last હોવું જોઈએ +@msg index must be a number or first, previous, next or last, not `{other}` index સંખ્યા અથવા first, previous, next કે last હોવું જોઈએ, `{other}` નહીં +@msg index must be ≥ 0 index ≥ 0 હોવું જોઈએ +@msg index out of range ઇન્ડેક્સ શ્રેણીની બહાર છે +@msg indexes may hold at most {MAX_GUIDE_INDEXES} entries indexes માં વધુમાં વધુ {MAX_GUIDE_INDEXES} એન્ટ્રીઓ હોઈ શકે +@msg indexes must be an array of guide indexes indexes ગાઇડ ઇન્ડેક્સની એરે હોવી જોઈએ +@msg inline graphics can't be added, removed, reordered or changed ઇનલાઇન ગ્રાફિક્સ ઉમેરી, દૂર કરી, ફરી ક્રમમાં ગોઠવી કે બદલી શકાતા નથી +@msg input contains NaN or infinite coordinates ઇનપુટમાં NaN અથવા અનંત કોઓર્ડિનેટ્સ છે +@msg input path could not be closed ઇનપુટ પાથ બંધ કરી શકાયો નહીં +@msg inseparable: `{s}` must be {_1} to {_2} characters, none of them control or space characters inseparable: `{s}` માં {_1} થી {_2} અક્ષરો હોવા જોઈએ, જેમાંથી કોઈ કંટ્રોલ કે સ્પેસ અક્ષર ન હોય +@msg inseparable: at most {KINSOKU_CATEGORY_MAX} characters in all inseparable: કુલ વધુમાં વધુ {KINSOKU_CATEGORY_MAX} અક્ષરો +@msg insertionLocation must be PLACEBEFORE, PLACEAFTER, PLACEATBEGINNING or PLACEATEND insertionLocation PLACEBEFORE, PLACEAFTER, PLACEATBEGINNING અથવા PLACEATEND હોવું જોઈએ +@msg insertionLocation must be an ElementPlacement value insertionLocation એ ElementPlacement મૂલ્ય હોવું જોઈએ +@msg installing from a path is not available on the web; pass the module as `dataBase64` પાથ પરથી ઇન્સ્ટોલ કરવું વેબ પર ઉપલબ્ધ નથી; મોડ્યુલ `dataBase64` તરીકે આપો +@msg instances must be 1..1000 instances 1..1000 હોવું જોઈએ +@msg instruction budget સૂચના બજેટ +@msg instruction out of range સૂચના શ્રેણીની બહાર છે +@msg instruction {pc} ({op}) pops below the stack સૂચના {pc} ({op}) સ્ટૅકની નીચે સુધી pop કરે છે +@msg instruction {pc} reached with stack depths {seen} and {d} સૂચના {pc} સુધી સ્ટૅક ઊંડાઈ {seen} અને {d} સાથે પહોંચાયું +@msg internal error in `{cmd}`: {msg} (the document was left as it was before; please report this bug) `{cmd}` માં આંતરિક ભૂલ: {msg} (દસ્તાવેજ પહેલાં જેવો હતો તેવો જ રાખવામાં આવ્યો; કૃપા કરીને આ બગની જાણ કરો) +@msg internal error: {msg} (please report this bug) આંતરિક ભૂલ: {msg} (કૃપા કરીને આ બગની જાણ કરો) +@msg invalid 16-bit pixel buffer અમાન્ય 16-bit પિક્સેલ બફર +@msg invalid 8-bit pixel buffer અમાન્ય 8-bit પિક્સેલ બફર +@msg invalid ICC profile: {0} અમાન્ય ICC પ્રોફાઇલ: {0} +@msg invalid PDF setting: {0} અમાન્ય PDF સેટિંગ: {0} +@msg invalid `color` અમાન્ય `color` +@msg invalid anchor index {v}: expected a non-negative integer અમાન્ય એન્કર ઇન્ડેક્સ {v}: બિન-ઋણ પૂર્ણાંક અપેક્ષિત હતો +@msg invalid anchor reference {v}: expected [subpath, anchor] અમાન્ય એન્કર સંદર્ભ {v}: [subpath, anchor] અપેક્ષિત હતું +@msg invalid angle અમાન્ય ખૂણો +@msg invalid array length અમાન્ય એરે લંબાઈ +@msg invalid brush: {e} અમાન્ય બ્રશ: {e} +@msg invalid color અમાન્ય રંગ +@msg invalid colour {c} અમાન્ય રંગ {c} +@msg invalid delta અમાન્ય ડેલ્ટા +@msg invalid group અમાન્ય ગ્રૂપ +@msg invalid id {_1}: use 1-64 characters from A-Z a-z 0-9 . _ - અમાન્ય id {_1}: A-Z a-z 0-9 . _ - માંથી 1-64 અક્ષરો વાપરો +@msg invalid image data for `{0}` `{0}` માટે અમાન્ય ઇમેજ ડેટા +@msg invalid object id {value}: expected a non-negative integer અમાન્ય ઑબ્જેક્ટ id {value}: બિન-ઋણ પૂર્ણાંક અપેક્ષિત હતો +@msg invalid object id {v}: expected a non-negative integer અમાન્ય ઑબ્જેક્ટ id {v}: બિન-ઋણ પૂર્ણાંક અપેક્ષિત હતો +@msg invalid parameter name {k} અમાન્ય પેરામીટર નામ {k} +@msg invalid pattern tile choice અમાન્ય પેટર્ન ટાઇલ પસંદગી +@msg invalid point અમાન્ય બિંદુ +@msg invalid regular expression flag '{_1}' અમાન્ય રેગ્યુલર એક્સપ્રેશન ફ્લેગ '{_1}' +@msg invalid regular expression: {m} અમાન્ય રેગ્યુલર એક્સપ્રેશન: {m} +@msg invalid scale {scale} અમાન્ય સ્કેલ {scale} +@msg invalid size અમાન્ય કદ +@msg invalid stroke widths અમાન્ય સ્ટ્રોક પહોળાઈઓ +@msg invalid t અમાન્ય t +@msg invalid time value અમાન્ય સમય મૂલ્ય +@msg invalid tolerance અમાન્ય સહનશીલતા +@msg is a confirm's answer, whose `value` must be true or false confirm નો જવાબ છે, જેનું `value` true અથવા false હોવું જોઈએ +@msg is a prompt's answer, whose `value` must be a string or null prompt નો જવાબ છે, જેનું `value` સ્ટ્રિંગ અથવા null હોવું જોઈએ +@msg is a window's answer, whose `value` must be a list of steps window નો જવાબ છે, જેનું `value` પગલાંઓની યાદી હોવું જોઈએ +@msg is an alert's answer, whose `value` must be "ok" alert નો જવાબ છે, જેનું `value` "ok" હોવું જોઈએ +@msg is listed twice બે વાર સૂચિબદ્ધ છે +@msg is longer than 16 KiB 16 KiB કરતાં લાંબું છે +@msg it changed or went away while it loaded તે લોડ થતું હતું ત્યારે બદલાયું અથવા દૂર થઈ ગયું +@msg it didn't install તે ઇન્સ્ટોલ થયું નહીં +@msg it draws its image through a clipping path તે તેની ઇમેજ ક્લિપિંગ પાથ દ્વારા દોરે છે +@msg it draws no image તે કોઈ ઇમેજ દોરતું નથી +@msg it ends inside a group or compound path તે ગ્રૂપ અથવા કમ્પાઉન્ડ પાથની અંદર પૂરું થાય છે +@msg it ends inside a layer તે લેયરની અંદર પૂરું થાય છે +@msg it ends inside a multi-layer mask તે મલ્ટિ-લેયર માસ્કની અંદર પૂરું થાય છે +@msg it has art outside its layers તેમાં લેયર્સની બહાર આર્ટ છે +@msg it has more than {MAX_NODES} objects તેમાં {MAX_NODES} કરતાં વધુ ઑબ્જેક્ટ્સ છે +@msg it has no layers તેમાં કોઈ લેયર નથી +@msg it has no page તેમાં કોઈ પેજ નથી +@msg it has only a getter તેમાં ફક્ત getter છે +@msg it has too many text objects તેમાં ઘણા બધા ટેક્સ્ટ ઑબ્જેક્ટ્સ છે +@msg it has too many values in a row તેમાં એક પંક્તિમાં ઘણાં બધાં મૂલ્યો છે +@msg it has too much text તેમાં ઘણું બધું ટેક્સ્ટ છે +@msg it has {_1}, which VectorCraft doesn't read from it yet તેમાં {_1} છે, જે VectorCraft હજુ તેમાંથી વાંચતું નથી +@msg it is larger than {MAX_DICTIONARY_FILE_BYTES} bytes તે {MAX_DICTIONARY_FILE_BYTES} બાઇટ્સ કરતાં મોટું છે +@msg it is read-only તે ફક્ત વાંચવા માટે છે +@msg it isn't a file તે ફાઇલ નથી +@msg it names {_1} plates, and at most {MAX_PLATES} are read તે {_1} પ્લેટ્સનાં નામ આપે છે, અને વધુમાં વધુ {MAX_PLATES} વંચાય છે +@msg items: give a list's items as an array items: યાદીની આઇટમ્સ એરે તરીકે આપો +@msg its 3D effect builds no solid તેની 3D ઇફેક્ટ કોઈ ઘન આકાર બનાવતી નથી +@msg its art is not one open path તેની આર્ટ એક ખુલ્લો પાથ નથી +@msg its art is too long or too detailed for a head તેની આર્ટ હેડ માટે ખૂબ લાંબી અથવા ખૂબ વિગતવાર છે +@msg its art paints nothing તેની આર્ટ કંઈ રંગતી નથી +@msg its artboards all lie beyond the canvas (more than {_1} pt from the origin) તેના બધા આર્ટબોર્ડ કેનવાસની બહાર છે (મૂળબિંદુથી {_1} pt કરતાં વધુ દૂર) +@msg its clipping masks are nested too deeply તેના ક્લિપિંગ માસ્ક ખૂબ ઊંડે નેસ્ટ થયેલા છે +@msg its editing data doesn't say where its art is તેનો એડિટિંગ ડેટા તેની આર્ટ ક્યાં છે તે જણાવતો નથી +@msg its editing data doesn't say where its artboard is તેનો એડિટિંગ ડેટા તેનું આર્ટબોર્ડ ક્યાં છે તે જણાવતો નથી +@msg its editing data is for a {w} × {h} pt page, not the file's {pw} × {ph} pt page તેનો એડિટિંગ ડેટા {w} × {h} pt પેજ માટે છે, ફાઇલના {pw} × {ph} pt પેજ માટે નહીં +@msg its editing data is for a {w} × {h} pt page, the file's {pw} × {ph} pt page at {scale} તેનો એડિટિંગ ડેટા {w} × {h} pt પેજ માટે છે, {scale} પર ફાઇલના {pw} × {ph} pt પેજ માટે +@msg its ends are not apart both across and down તેના છેડા આડા અને ઊભા બંને રીતે અલગ નથી +@msg its image is too large to read તેની ઇમેજ વાંચવા માટે ખૂબ મોટી છે +@msg its localized names take more than {_1} KB તેનાં સ્થાનિક નામો {_1} KB કરતાં વધુ લે છે +@msg its metadata has no description તેના મેટાડેટામાં કોઈ વર્ણન નથી +@msg its metadata has no direct length તેના મેટાડેટામાં કોઈ સીધી લંબાઈ નથી +@msg its objects are nested too deep ({e}) તેના ઑબ્જેક્ટ્સ ખૂબ ઊંડે નેસ્ટ થયેલા છે ({e}) +@msg its objects are nested too deeply તેના ઑબ્જેક્ટ્સ ખૂબ ઊંડે નેસ્ટ થયેલા છે +@msg its page has text, and its layers have no text objects to put it in તેના પેજ પર ટેક્સ્ટ છે, અને તેના લેયર્સમાં તેને મૂકવા માટે કોઈ ટેક્સ્ટ ઑબ્જેક્ટ નથી +@msg its path has no length તેના પાથની કોઈ લંબાઈ નથી +@msg its path has too many anchors for a bevel તેના પાથમાં બેવલ માટે ઘણા બધા એન્કર છે +@msg its path is too detailed for a bevel તેનો પાથ બેવલ માટે ખૂબ વિગતવાર છે +@msg its plates are too large: more than {MAX_SAMPLES} pixels together તેની પ્લેટ્સ ખૂબ મોટી છે: કુલ {MAX_SAMPLES} કરતાં વધુ પિક્સેલ +@msg its plates are too large: {_1} plates of {w} × {h} pixels તેની પ્લેટ્સ ખૂબ મોટી છે: {w} × {h} પિક્સેલની {_1} પ્લેટ્સ +@msg its plates can't be kept together તેની પ્લેટ્સ એકસાથે રાખી શકાતી નથી +@msg its section ending with `%{end}` doesn't end `%{end}` થી પૂરો થતો તેનો વિભાગ પૂરો થતો નથી +@msg its shapes could not be combined into one તેના આકારો એકમાં જોડી શકાયા નહીં +@msg its tag table lists the `{_1}` tag more than once તેનું ટૅગ ટેબલ `{_1}` ટૅગ એક કરતાં વધુ વાર સૂચવે છે +@msg its type is to come in as outlines, which only its page has તેનો ટાઇપ આઉટલાઇન્સ તરીકે આવવાનો છે, જે ફક્ત તેના પેજ પાસે છે +@msg its zlib compression is damaged તેનું zlib કમ્પ્રેશન ખરાબ થયેલું છે +@msg join needs open paths જોડવા માટે ખુલ્લા પાથ જોઈએ +@msg join two different paths બે અલગ પાથ જોડો +@msg jump to {pc}, past the end {pc} પર જમ્પ, અંતની પાર +@msg justification must be a Justification value justification એ Justification મૂલ્ય હોવું જોઈએ +@msg justify must be auto|left|center|right|justifyAll justify auto|left|center|right|justifyAll હોવું જોઈએ +@msg kbps must be a positive number, not {kbps} kbps ધન સંખ્યા હોવી જોઈએ, {kbps} નહીં +@msg kerning must be a number, "auto", or "optical" kerning સંખ્યા, "auto", અથવા "optical" હોવું જોઈએ +@msg keywords must be a list of words or a comma-separated string keywords શબ્દોની યાદી અથવા અલ્પવિરામથી અલગ કરેલી સ્ટ્રિંગ હોવી જોઈએ +@msg keywords must be at most {MAX_KEYWORD} characters, without control characters keywords વધુમાં વધુ {MAX_KEYWORD} અક્ષરોના, કંટ્રોલ અક્ષરો વિના, હોવા જોઈએ +@msg kind must be 1, 2 or 3, or give a preset `name` (see perspective.presets.list) kind 1, 2 અથવા 3 હોવું જોઈએ, અથવા પ્રીસેટ `name` આપો (perspective.presets.list જુઓ) +@msg kind must be a VariableKind value kind એ VariableKind મૂલ્ય હોવું જોઈએ +@msg kind must be graphic, fillColor, strokeColor, fillGradient, strokeGradient, fillPattern, strokePattern, charStyle or paraStyle kind graphic, fillColor, strokeColor, fillGradient, strokeGradient, fillPattern, strokePattern, charStyle અથવા paraStyle હોવું જોઈએ +@msg knockout groups with too many overlapping translucent elements are written as PDF knockout groups: their translucent elements knock out what they cover fully ઘણા ઓવરલેપ થતા અર્ધપારદર્શક ઘટકોવાળાં નૉકઆઉટ ગ્રૂપ PDF નૉકઆઉટ ગ્રૂપ તરીકે લખાય છે: તેમના અર્ધપારદર્શક ઘટકો જે ઢાંકે છે તેને પૂરેપૂરું નૉકઆઉટ કરે છે +@msg knockout must be "on", "off", "neutral" or a bool, not {v} knockout "on", "off", "neutral" અથવા bool હોવું જોઈએ, {v} નહીં +@msg label must be a string (got {v}) label સ્ટ્રિંગ હોવું જોઈએ (મળ્યું {v}) +@msg lang must be one of {_1} lang {_1} માંથી એક હોવું જોઈએ +@msg larger than 256 MB 256 MB કરતાં મોટું +@msg layer `{name}` has no art to export લેયર `{name}` માં એક્સપોર્ટ કરવા કોઈ આર્ટ નથી +@msg layer must name a layer or sublayer layer એ લેયર અથવા સબલેયરનું નામ હોવું જોઈએ +@msg layers can't be intertwined: select the objects in them લેયર્સ એકબીજામાં ગૂંથી શકાતા નથી: તેમાંના ઑબ્જેક્ટ્સ પસંદ કરો +@msg layers can't be wrap objects લેયર્સ રેપ ઑબ્જેક્ટ્સ બની શકતા નથી +@msg layers go only at the top level or in layers, objects in layers and groups લેયર્સ ફક્ત ટોચના સ્તરે અથવા લેયર્સમાં જાય છે, ઑબ્જેક્ટ્સ લેયર્સ અને ગ્રૂપમાં +@msg layers must be true or false layers true અથવા false હોવું જોઈએ +@msg layers: a linked PSD file is placed as its flat image; leave link out or give link: false layers: લિંક કરેલી PSD ફાઇલ તેની સપાટ ઇમેજ તરીકે મૂકાય છે; link છોડી દો અથવા link: false આપો +@msg layout must be gridByRow, gridByColumn, row or column layout gridByRow, gridByColumn, row અથવા column હોવું જોઈએ +@msg leading must be a number or "auto" leading સંખ્યા અથવા "auto" હોવું જોઈએ +@msg leading must be from 0.1 to 5000 points leading 0.1 થી 5000 પોઇન્ટ સુધી હોવું જોઈએ +@msg left/right must be non-negative widths left/right બિન-ઋણ પહોળાઈઓ હોવી જોઈએ +@msg legacyNameEncoding must be one of {_1} legacyNameEncoding {_1} માંથી એક હોવું જોઈએ +@msg length must be a whole number from 0 to {left} length 0 થી {left} સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg level `{t}`: 2 or 3 level `{t}`: 2 અથવા 3 +@msg library panel `{given}` isn't missing its library લાઇબ્રેરી પેનલ `{given}` ની લાઇબ્રેરી ખૂટતી નથી +@msg library panel `{given}` isn't open લાઇબ્રેરી પેનલ `{given}` ખુલ્લી નથી +@msg light behind must be true or false light behind true અથવા false હોવું જોઈએ +@msg light color must use opaque #rrggbb લાઇટનો રંગ અપારદર્શક #rrggbb વાપરતો હોવો જોઈએ +@msg light {key} must be a number from {min} to {max} light {key} {min} થી {max} સુધીની સંખ્યા હોવી જોઈએ +@msg lightColor must be an opaque RGB color in #rrggbb form lightColor #rrggbb સ્વરૂપમાં અપારદર્શક RGB રંગ હોવો જોઈએ +@msg lights must contain one to ten lights lights માં એકથી દસ લાઇટ્સ હોવી જોઈએ +@msg line {line}, column {column}: the graph data file `{path}` for `{var}` gives a graph value longer than {MAX_GRAPH_CSV} bytes લાઇન {line}, કૉલમ {column}: `{var}` માટેની ગ્રાફ ડેટા ફાઇલ `{path}` {MAX_GRAPH_CSV} બાઇટ્સ કરતાં લાંબું ગ્રાફ મૂલ્ય આપે છે +@msg line {line}, column {column}: the graph data file `{path}` for `{var}` is a relative path: give `base`, or an absolute path લાઇન {line}, કૉલમ {column}: `{var}` માટેની ગ્રાફ ડેટા ફાઇલ `{path}` સાપેક્ષ પાથ છે: `base` આપો, અથવા સંપૂર્ણ પાથ +@msg line {line}, column {column}: the graph data file `{path}` for `{var}` is larger than {MAX_GRAPH_DATA_FILE} bytes લાઇન {line}, કૉલમ {column}: `{var}` માટેની ગ્રાફ ડેટા ફાઇલ `{path}` {MAX_GRAPH_DATA_FILE} બાઇટ્સ કરતાં મોટી છે +@msg line {line}, column {column}: the graph data file `{path}` for `{var}` isn't followed: {r} લાઇન {line}, કૉલમ {column}: `{var}` માટેની ગ્રાફ ડેટા ફાઇલ `{path}` અનુસરવામાં આવતી નથી: {r} +@msg line {line}, column {column}: the graph data file for `{var}` can't be read: {e} લાઇન {line}, કૉલમ {column}: `{var}` માટેની ગ્રાફ ડેટા ફાઇલ વાંચી શકાતી નથી: {e} +@msg line {line}, column {column}: the graph data files hold more than {MAX_GRAPH_FILES_TOTAL} bytes in all લાઇન {line}, કૉલમ {column}: ગ્રાફ ડેટા ફાઇલોમાં કુલ {MAX_GRAPH_FILES_TOTAL} બાઇટ્સ કરતાં વધુ છે +@msg line {line}: more than {MAX_CSV_COLS} columns લાઇન {line}: {MAX_CSV_COLS} કરતાં વધુ કૉલમ +@msg line {line}: unclosed quote લાઇન {line}: બંધ ન થયેલું અવતરણ ચિહ્ન +@msg line {line}: value for `{var}` is longer than {MAX_GRAPH_CSV} bytes લાઇન {line}: `{var}` માટેનું મૂલ્ય {MAX_GRAPH_CSV} બાઇટ્સ કરતાં લાંબું છે +@msg line {line}: value for `{var}` must be true or false લાઇન {line}: `{var}` માટેનું મૂલ્ય true અથવા false હોવું જોઈએ +@msg line {line}: value for `{var}` must match its variable kind લાઇન {line}: `{var}` માટેનું મૂલ્ય તેના વેરિએબલ પ્રકાર સાથે મેળ ખાતું હોવું જોઈએ +@msg lineEndings `{other}`: lf or crlf lineEndings `{other}`: lf અથવા crlf +@msg linkPages can't be used with textAs: outlines: linked pages show the file's own type linkPages નો textAs: outlines સાથે ઉપયોગ કરી શકાતો નથી: લિંક કરેલાં પેજ ફાઇલનો પોતાનો ટાઇપ બતાવે છે +@msg linkPages can't open a file with a password: linked pages are read again without it linkPages પાસવર્ડવાળી ફાઇલ ખોલી શકતું નથી: લિંક કરેલાં પેજ તેના વિના ફરી વંચાય છે +@msg linkPages must be true or false linkPages true અથવા false હોવું જોઈએ +@msg linkPages needs the file's path: linked pages are read from it linkPages ને ફાઇલનો પાથ જોઈએ: લિંક કરેલાં પેજ તેમાંથી વંચાય છે +@msg linkPages takes true, false or null linkPages true, false અથવા null લે છે +@msg linkPages: `{file}` is over {_1} MB linkPages: `{file}` {_1} MB કરતાં વધુ છે +@msg linkPages: `{file}` isn't a PDF or a PDF-compatible .ai file linkPages: `{file}` PDF અથવા PDF-સુસંગત .ai ફાઇલ નથી +@msg loading profiles from disk isn't available in the browser ડિસ્કમાંથી પ્રોફાઇલ્સ લોડ કરવી બ્રાઉઝરમાં ઉપલબ્ધ નથી +@msg localize: the first argument must be a localization object or a string localize: પહેલો આર્ગ્યુમેન્ટ લોકલાઇઝેશન ઑબ્જેક્ટ અથવા સ્ટ્રિંગ હોવો જોઈએ +@msg manifest is not UTF-8 મેનિફેસ્ટ UTF-8 નથી +@msg manifest is too long (limit {MAX_MANIFEST_BYTES} bytes) મેનિફેસ્ટ ખૂબ લાંબું છે (મર્યાદા {MAX_MANIFEST_BYTES} બાઇટ્સ) +@msg manifest is {_1} bytes (limit {MAX_MANIFEST_BYTES}) મેનિફેસ્ટ {_1} બાઇટ્સ છે (મર્યાદા {MAX_MANIFEST_BYTES}) +@msg manifest is {size} bytes (limit {MAX_MANIFEST_BYTES}) મેનિફેસ્ટ {size} બાઇટ્સ છે (મર્યાદા {MAX_MANIFEST_BYTES}) +@msg manifest: {e} મેનિફેસ્ટ: {e} +@msg margin: a {m} pt margin leaves no imageable area on the paper margin: {m} pt માર્જિન કાગળ પર કોઈ છાપવાયોગ્ય વિસ્તાર છોડતું નથી +@msg mask art ends outside a mask dictionary માસ્ક આર્ટ માસ્ક ડિક્શનરીની બહાર પૂરી થાય છે +@msg match applies only with scope {scopes} match ફક્ત scope {scopes} સાથે લાગુ પડે છે +@msg match must be a paint as the document stores it match દસ્તાવેજ સંગ્રહે છે તે રીતે પેઇન્ટ હોવું જોઈએ +@msg matrix must be finite and invertible, depth finite matrix સીમિત અને ઉલટાવી શકાય તેવું હોવું જોઈએ, અને depth સીમિત હોવું જોઈએ +@msg matte: {e} મેટ: {e} +@msg member is for order front, forward, backward or back member ક્રમ માટે front, forward, backward અથવા back હોય છે +@msg memory budget (object {_1} needs {size} bytes of input, {left} left) મેમરી બજેટ (ઑબ્જેક્ટ {_1} ને {size} બાઇટ ઇનપુટ જોઈએ, {left} બાકી) +@msg memory budget (the module's initial memory is {initial} bytes, limit {max_memory_bytes}) મેમરી બજેટ (મોડ્યુલની પ્રારંભિક મેમરી {initial} બાઇટ છે, મર્યાદા {max_memory_bytes}) +@msg memory budget (the selection is too large to hand over) મેમરી બજેટ (પસંદગી સોંપવા માટે ખૂબ મોટી છે) +@msg message must be text message ટેક્સ્ટ હોવું જોઈએ +@msg minPpi must be from 1 to 9600 minPpi 1 થી 9600 સુધી હોવું જોઈએ +@msg missing `align` `align` ખૂટે છે +@msg missing `angle` `angle` ખૂટે છે +@msg missing `artboards` `artboards` ખૂટે છે +@msg missing `at` [x, y] `at` [x, y] ખૂટે છે +@msg missing `attrs` `attrs` ખૂટે છે +@msg missing `color` or `opacity` `color` અથવા `opacity` ખૂટે છે +@msg missing `colors` `colors` ખૂટે છે +@msg missing `commands` `commands` ખૂટે છે +@msg missing `dataBase64` `dataBase64` ખૂટે છે +@msg missing `destinationFolder` `destinationFolder` ખૂટે છે +@msg missing `effect` `effect` ખૂટે છે +@msg missing `effect` id `effect` id ખૂટે છે +@msg missing `family` `family` ખૂટે છે +@msg missing `field` `field` ખૂટે છે +@msg missing `find` `find` ખૂટે છે +@msg missing `folder` `folder` ખૂટે છે +@msg missing `gid` (a glyph id, or null for the default glyph) `gid` ખૂટે છે (ગ્લિફ id, અથવા ડિફૉલ્ટ ગ્લિફ માટે null) +@msg missing `group` `group` ખૂટે છે +@msg missing `id` `id` ખૂટે છે +@msg missing `id` (see plugin.list) `id` ખૂટે છે (plugin.list જુઓ) +@msg missing `id`: give one, or select one type object `id` ખૂટે છે: એક આપો, અથવા એક ટાઇપ ઑબ્જેક્ટ પસંદ કરો +@msg missing `importer` (see document.formats) `importer` ખૂટે છે (document.formats જુઓ) +@msg missing `index` (a point index, or null to clear) `index` ખૂટે છે (બિંદુનો ઇન્ડેક્સ, અથવા સાફ કરવા null) +@msg missing `index` (a stop index, or null to clear) `index` ખૂટે છે (સ્ટોપનો ઇન્ડેક્સ, અથવા સાફ કરવા null) +@msg missing `index` (an item index or null) `index` ખૂટે છે (આઇટમનો ઇન્ડેક્સ અથવા null) +@msg missing `item` `item` ખૂટે છે +@msg missing `kind` `kind` ખૂટે છે +@msg missing `library` `library` ખૂટે છે +@msg missing `library` (see brush.libraries) `library` ખૂટે છે (brush.libraries જુઓ) +@msg missing `library` (see graphicStyle.libraries) `library` ખૂટે છે (graphicStyle.libraries જુઓ) +@msg missing `library` (see swatch.library.list) `library` ખૂટે છે (swatch.library.list જુઓ) +@msg missing `library` (see symbol.libraries) `library` ખૂટે છે (symbol.libraries જુઓ) +@msg missing `map` (rows [{{from, to}}] or {{current: new}}) `map` ખૂટે છે (પંક્તિઓ [{{from, to}}] અથવા {{current: new}}) +@msg missing `matrix` [a,b,c,d,e,f] `matrix` [a,b,c,d,e,f] ખૂટે છે +@msg missing `name` `name` ખૂટે છે +@msg missing `name` (see gradient.presets.list) `name` ખૂટે છે (gradient.presets.list જુઓ) +@msg missing `neighbor` (an id, or null to break the link) `neighbor` ખૂટે છે (id, અથવા લિંક તોડવા null) +@msg missing `newName` or `kind` `newName` અથવા `kind` ખૂટે છે +@msg missing `offset` (a distance in points) `offset` ખૂટે છે (પોઇન્ટમાં અંતર) +@msg missing `path` `path` ખૂટે છે +@msg missing `path` (a path object id) `path` ખૂટે છે (પાથ ઑબ્જેક્ટનો id) +@msg missing `path` or `name` `path` અથવા `name` ખૂટે છે +@msg missing `path` or `name` with `dataBase64` `dataBase64` સાથે `path` અથવા `name` ખૂટે છે +@msg missing `picks` `picks` ખૂટે છે +@msg missing `role` `role` ખૂટે છે +@msg missing `rule` `rule` ખૂટે છે +@msg missing `saved`: true or false `saved` ખૂટે છે: true અથવા false +@msg missing `source` id `source` id ખૂટે છે +@msg missing `start` (the byte offset of a character) `start` ખૂટે છે (અક્ષરનો બાઇટ ઑફસેટ) +@msg missing `status`: linked, embedded, missing or modified `status` ખૂટે છે: linked, embedded, missing અથવા modified +@msg missing `step` (see learn.show) `step` ખૂટે છે (learn.show જુઓ) +@msg missing `swatch` `swatch` ખૂટે છે +@msg missing `target` id `target` id ખૂટે છે +@msg missing `text` `text` ખૂટે છે +@msg missing `to` `to` ખૂટે છે +@msg missing `to` (an index) `to` ખૂટે છે (ઇન્ડેક્સ) +@msg missing `to`: a non-negative integer `to` ખૂટે છે: બિન-ઋણ પૂર્ણાંક +@msg missing `tool` `tool` ખૂટે છે +@msg missing `tutorial` (see learn.list) `tutorial` ખૂટે છે (learn.list જુઓ) +@msg missing `type` `type` ખૂટે છે +@msg missing `value` `value` ખૂટે છે +@msg missing `word` `word` ખૂટે છે +@msg missing `{key}` `{key}` ખૂટે છે +@msg missing `{k}` `{k}` ખૂટે છે +@msg missing `{path}` `{path}` ખૂટે છે +@msg missing anchor એન્કર બિંદુ ખૂટે છે +@msg missing anchors એન્કર બિંદુઓ ખૂટે છે +@msg missing anchors [[subpath, anchor]…] એન્કર બિંદુઓ ખૂટે છે [[subpath, anchor]…] +@msg missing array `{key}` એરે `{key}` ખૂટે છે +@msg missing case કેસ ખૂટે છે +@msg missing color રંગ ખૂટે છે +@msg missing commands આદેશો ખૂટે છે +@msg missing destination folder ગંતવ્ય ફોલ્ડર ખૂટે છે +@msg missing field `{key}` ફીલ્ડ `{key}` ખૂટે છે +@msg missing from from ખૂટે છે +@msg missing group ગ્રૂપ ખૂટે છે +@msg missing handles હેન્ડલ્સ ખૂટે છે +@msg missing id id ખૂટે છે +@msg missing id or ids id અથવા ids ખૂટે છે +@msg missing ids ids ખૂટે છે +@msg missing index ઇન્ડેક્સ ખૂટે છે +@msg missing indexes ઇન્ડેક્સો ખૂટે છે +@msg missing integer `{key}` પૂર્ણાંક `{key}` ખૂટે છે +@msg missing matrix [a,b,c,d,e,f] matrix [a,b,c,d,e,f] ખૂટે છે +@msg missing name નામ ખૂટે છે +@msg missing name (the style `from` replaces) નામ ખૂટે છે (`from` જે સ્ટાઇલને બદલે છે તે) +@msg missing number `{key}` સંખ્યા `{key}` ખૂટે છે +@msg missing op op ખૂટે છે +@msg missing or invalid `color` `color` ખૂટે છે અથવા અમાન્ય છે +@msg missing or unknown `tool` `tool` ખૂટે છે અથવા અજાણ્યું છે +@msg missing point બિંદુ ખૂટે છે +@msg missing point [x,y] બિંદુ [x,y] ખૂટે છે +@msg missing point `{key}` ([x, y]) બિંદુ `{key}` ખૂટે છે ([x, y]) +@msg missing points બિંદુઓ ખૂટે છે +@msg missing points [[x,y]…] બિંદુઓ [[x,y]…] ખૂટે છે +@msg missing segment સેગમેન્ટ ખૂટે છે +@msg missing stops સ્ટોપ ખૂટે છે +@msg missing subpaths સબપાથ ખૂટે છે +@msg missing target લક્ષ્ય ખૂટે છે +@msg missing to to ખૂટે છે +@msg missing value મૂલ્ય ખૂટે છે +@msg missing x, y x, y ખૂટે છે +@msg mode is set, add or toggle, not `{other}` mode set, add અથવા toggle હોય છે, `{other}` નહીં +@msg mode must be "cmyk" or "rgb" mode "cmyk" અથવા "rgb" હોવું જોઈએ +@msg mode must be area|onPath, got {o} mode area|onPath હોવું જોઈએ, {o} મળ્યું +@msg mode must be replace or append mode replace અથવા append હોવું જોઈએ +@msg mode must be replace, keep or append mode replace, keep અથવા append હોવું જોઈએ +@msg module file limit ({MAX_FILES}) reached મોડ્યુલ ફાઇલ મર્યાદા ({MAX_FILES}) પહોંચી ગઈ +@msg module file not found: {specifier} મોડ્યુલ ફાઇલ મળી નહીં: {specifier} +@msg module is {_1} bytes (limit {_2}) મોડ્યુલ {_1} બાઇટનું છે (મર્યાદા {_2}) +@msg module not found: '{referrer}' મોડ્યુલ મળ્યું નહીં: '{referrer}' +@msg module path leads out of the script's folder: '{specifier}' મોડ્યુલ પાથ સ્ક્રિપ્ટના ફોલ્ડરની બહાર જાય છે: '{specifier}' +@msg module search limit ({MAX_PROBES} paths) reached મોડ્યુલ શોધ મર્યાદા ({MAX_PROBES} પાથ) પહોંચી ગઈ +@msg module specifier '{specifier}' {why} મોડ્યુલ સ્પેસિફાયર '{specifier}' {why} +@msg more than 10000 linked files: package dependencies in smaller parts 10000 થી વધુ લિંક કરેલી ફાઇલો: ડિપેન્ડન્સીઝને નાના ભાગોમાં પેકેજ કરો +@msg more than 256 commands 256 થી વધુ આદેશો +@msg more than 64 circles touch these shapes: they may touch along a whole curve 64 થી વધુ વર્તુળો આ આકારોને સ્પર્શે છે: તેઓ આખા વક્ર સાથે સ્પર્શતા હોઈ શકે +@msg more than {MAX_BATCH_FILES} data sets {MAX_BATCH_FILES} થી વધુ ડેટા સેટ +@msg more than {MAX_BATCH_FILES} files {MAX_BATCH_FILES} થી વધુ ફાઇલો +@msg more than {MAX_CELLS} copies {MAX_CELLS} થી વધુ નકલો +@msg more than {MAX_CSV_COLS} variables: Import Data Sets reads at most {MAX_CSV_COLS} {MAX_CSV_COLS} થી વધુ વેરિએબલ: ડેટા સેટ આયાત કરો વધુમાં વધુ {MAX_CSV_COLS} વાંચે છે +@msg more than {MAX_CSV_ROWS} data rows {MAX_CSV_ROWS} થી વધુ ડેટા પંક્તિઓ +@msg more than {MAX_CSV_ROWS} data sets: Import Data Sets reads at most {MAX_CSV_ROWS} {MAX_CSV_ROWS} થી વધુ ડેટા સેટ: ડેટા સેટ આયાત કરો વધુમાં વધુ {MAX_CSV_ROWS} વાંચે છે +@msg more than {MAX_FILES} images {MAX_FILES} થી વધુ છબીઓ +@msg more than {MAX_IMPORT} presets {MAX_IMPORT} થી વધુ પ્રીસેટ +@msg more than {MAX_INPUT_TEXT_TOTAL} bytes of text over the output આઉટપુટ પર {MAX_INPUT_TEXT_TOTAL} બાઇટથી વધુ ટેક્સ્ટ +@msg move needs a relative object move ને સંબંધિત ઑબ્જેક્ટ જોઈએ +@msg moved must be [[x,y]…] moved [[x,y]…] હોવું જોઈએ +@msg must be 1-{MAX_FAMILY} printable characters 1-{MAX_FAMILY} છાપી શકાય તેવા અક્ષરો હોવા જોઈએ +@msg must be a list of 6 numbers 6 સંખ્યાઓની યાદી હોવી જોઈએ +@msg must be a list of at most {MAX_INPUT_RUNS} entries વધુમાં વધુ {MAX_INPUT_RUNS} એન્ટ્રીની યાદી હોવી જોઈએ +@msg must be a number from 0 to 1 0 થી 1 સુધીની સંખ્યા હોવી જોઈએ +@msg must be an object with `kind` and `value` `kind` અને `value` વાળો ઑબ્જેક્ટ હોવો જોઈએ +@msg must be the name of a symbol સિમ્બોલનું નામ હોવું જોઈએ +@msg must have `kind` alert, confirm, prompt or window `kind` alert, confirm, prompt અથવા window હોવું જોઈએ +@msg must have exactly `kind` and `value` બરાબર `kind` અને `value` જ હોવા જોઈએ +@msg name (a toolbar's name) is required name (ટૂલબારનું નામ) જરૂરી છે +@msg name (a toolbar's name) must be a string name (ટૂલબારનું નામ) સ્ટ્રિંગ હોવું જોઈએ +@msg name is empty નામ ખાલી છે +@msg name must be a toolbar's name name ટૂલબારનું નામ હોવું જોઈએ +@msg name must be text name ટેક્સ્ટ હોવું જોઈએ +@msg name the file ફાઇલને નામ આપો +@msg names is empty names ખાલી છે +@msg names must be a list of names names નામોની યાદી હોવી જોઈએ +@msg names must be an array of symbol names names સિમ્બોલ નામોનો એરે હોવો જોઈએ +@msg names must be strings names સ્ટ્રિંગ હોવા જોઈએ +@msg need `anchor` or `segment` + `t` `anchor` અથવા `segment` + `t` જોઈએ +@msg need at least one anchor ઓછામાં ઓછું એક એન્કર બિંદુ જોઈએ +@msg need at least one point ઓછામાં ઓછું એક બિંદુ જોઈએ +@msg need at least two points ઓછામાં ઓછા બે બિંદુ જોઈએ +@msg needs a closing quote after the name નામ પછી બંધ કરતું અવતરણ ચિહ્ન જોઈએ +@msg needs a name નામ જોઈએ +@msg needs a name of at most 64 bytes વધુમાં વધુ 64 બાઇટનું નામ જોઈએ +@msg needs a name of letters, digits and _, or a quoted name અક્ષરો, અંકો અને _ વાળું નામ, અથવા અવતરણમાં નામ જોઈએ +@msg needs a name without control characters નિયંત્રણ અક્ષરો વિનાનું નામ જોઈએ +@msg needs approval: it asks for {0}, which the user grants when installing it on its own મંજૂરી જોઈએ: તે {0} માગે છે, જે વપરાશકર્તા તેને અલગથી ઇન્સ્ટોલ કરતી વખતે આપે છે +@msg needs points બિંદુઓ જોઈએ +@msg nesting too deep નેસ્ટિંગ ખૂબ ઊંડું છે +@msg nineSlice must be true or false nineSlice true અથવા false હોવું જોઈએ +@msg nineSliceGuides must be [left, top, right, bottom], each -16..16, with left + right < 1 and top + bottom < 1 nineSliceGuides [left, top, right, bottom] હોવું જોઈએ, દરેક -16..16, અને left + right < 1 તથા top + bottom < 1 +@msg no 3D assets yet: collect an object with a 3D effect first (assets.add3D) હજી કોઈ 3D ઍસેટ નથી: પહેલાં 3D ઇફેક્ટવાળો ઑબ્જેક્ટ એકત્ર કરો (assets.add3D) +@msg no CSS to copy: select objects with CSS of their own નકલ કરવા કોઈ CSS નથી: પોતાની CSS ધરાવતા ઑબ્જેક્ટ પસંદ કરો +@msg no HP-GL encoder HP-GL એન્કોડર નથી +@msg no HP-GL format HP-GL ફોર્મેટ નથી +@msg no Kinsoku set is picked કોઈ Kinsoku Set પસંદ કરેલો નથી +@msg no Kinsoku set named `{from}` `{from}` નામનો કોઈ Kinsoku Set નથી +@msg no Kinsoku set to base the new one on નવો બનાવવા માટે આધાર તરીકે કોઈ Kinsoku Set નથી +@msg no Live Paint edge near that point તે બિંદુ પાસે કોઈ લાઇવ પેઇન્ટ કિનારી નથી +@msg no Live Paint face at that point તે બિંદુ પર કોઈ લાઇવ પેઇન્ટ સપાટી નથી +@msg no New Document profile called `{shown}` ({_1}) `{shown}` ({_1}) નામની કોઈ નવા દસ્તાવેજ પ્રોફાઇલ નથી +@msg no PDF preset named `{n}` `{n}` નામનો કોઈ PDF પ્રીસેટ નથી +@msg no PNG encoder PNG એન્કોડર નથી +@msg no Package dialog open કોઈ પેકેજ ડાયલોગ ખુલ્લો નથી +@msg no Pathfinder operation applied yet હજી કોઈ પાથફાઇન્ડર ક્રિયા લાગુ કરી નથી +@msg no SVG filter at index {k} ઇન્ડેક્સ {k} પર કોઈ SVG ફિલ્ટર નથી +@msg no action is waiting at a stop કોઈ ક્રિયા સ્ટોપ પર રાહ જોતી નથી +@msg no action set is current કોઈ ક્રિયા સેટ વર્તમાન નથી +@msg no action set to save સાચવવા માટે કોઈ ક્રિયા સેટ નથી +@msg no active data set કોઈ સક્રિય ડેટા સેટ નથી +@msg no active document કોઈ સક્રિય દસ્તાવેજ નથી +@msg no active perspective plane કોઈ સક્રિય પરસ્પેક્ટિવ પ્લેન નથી +@msg no anchor points are selected કોઈ એન્કર બિંદુ પસંદ કરેલું નથી +@msg no anchor points selected કોઈ એન્કર બિંદુ પસંદ નથી +@msg no app to open files here અહીં ફાઇલો ખોલવા માટે કોઈ ઍપ નથી +@msg no appearance item {index} કોઈ દેખાવ આઇટમ {index} નથી +@msg no arc fits these points આ બિંદુઓમાં કોઈ ચાપ બેસતી નથી +@msg no arrowheads file here અહીં કોઈ એરોહેડ ફાઇલ નથી +@msg no artboard કોઈ આર્ટબોર્ડ નથી +@msg no artboard {_1} કોઈ આર્ટબોર્ડ {_1} નથી +@msg no artboard {artboard} (0-based; the document has {_1}) કોઈ આર્ટબોર્ડ {artboard} નથી (0-આધારિત; દસ્તાવેજમાં {_1} છે) +@msg no artboard {i} (0-based; the document has {_1}) કોઈ આર્ટબોર્ડ {i} નથી (0-આધારિત; દસ્તાવેજમાં {_1} છે) +@msg no artboard {i} (0-based; the document has {count}) કોઈ આર્ટબોર્ડ {i} નથી (0-આધારિત; દસ્તાવેજમાં {count} છે) +@msg no artboards named કોઈ આર્ટબોર્ડનું નામ આપ્યું નથી +@msg no artwork કોઈ આર્ટવર્ક નથી +@msg no asset {id} કોઈ ઍસેટ {id} નથી +@msg no asset {id} (see assets.list) કોઈ ઍસેટ {id} નથી (assets.list જુઓ) +@msg no assets to export નિકાસ કરવા કોઈ ઍસેટ નથી +@msg no assets yet: collect art for export first (assets.add) હજી કોઈ ઍસેટ નથી: પહેલાં નિકાસ માટે આર્ટ એકત્ર કરો (assets.add) +@msg no bevels file here અહીં કોઈ બેવલ ફાઇલ નથી +@msg no blend options કોઈ બ્લેન્ડ વિકલ્પો નથી +@msg no bound object reports a value (locked objects and embedded images report none) કોઈ બાઉન્ડ ઑબ્જેક્ટ મૂલ્ય જણાવતો નથી (લૉક કરેલા ઑબ્જેક્ટ અને એમ્બેડ કરેલી છબીઓ કોઈ મૂલ્ય જણાવતા નથી) +@msg no bounds કોઈ સીમાઓ નથી +@msg no brush `{n}` કોઈ બ્રશ `{n}` નથી +@msg no brush `{n}` in `{_1}` `{_1}` માં કોઈ બ્રશ `{n}` નથી +@msg no brush library `{key}` (see brush.libraries) કોઈ બ્રશ લાઇબ્રેરી `{key}` નથી (brush.libraries જુઓ) +@msg no brush named `{name}` `{name}` નામનું કોઈ બ્રશ નથી +@msg no brush named `{n}` `{n}` નામનું કોઈ બ્રશ નથી +@msg no brush selected કોઈ બ્રશ પસંદ કરેલું નથી +@msg no catalog કોઈ કેટલોગ નથી +@msg no category `{name}` કોઈ કેટેગરી `{name}` નથી +@msg no changes since the last save છેલ્લે સાચવ્યા પછી કોઈ ફેરફાર નથી +@msg no character at byte {start} બાઇટ {start} પર કોઈ અક્ષર નથી +@msg no character has code {code} કોઈ અક્ષરનો કોડ {code} નથી +@msg no character set કોઈ અક્ષર સેટ નથી +@msg no character style `{name}` કોઈ કેરેક્ટર સ્ટાઇલ `{name}` નથી +@msg no circle passes through these points: two are the same or all three lie on one line આ બિંદુઓમાંથી કોઈ વર્તુળ પસાર થતું નથી: બે એકસરખા છે અથવા ત્રણેય એક રેખા પર છે +@msg no circle touches these shapes કોઈ વર્તુળ આ આકારોને સ્પર્શતું નથી +@msg no clock to keep a heartbeat by હાર્ટબીટ રાખવા માટે કોઈ ઘડિયાળ નથી +@msg no color group `{name}` in the document (see swatch.list) દસ્તાવેજમાં કોઈ રંગ ગ્રૂપ `{name}` નથી (swatch.list જુઓ) +@msg no colour કોઈ રંગ નથી +@msg no colour group `{group}` કોઈ રંગ ગ્રૂપ `{group}` નથી +@msg no colour group `{g}` કોઈ રંગ ગ્રૂપ `{g}` નથી +@msg no colour group `{name}` કોઈ રંગ ગ્રૂપ `{name}` નથી +@msg no colour group `{n}` કોઈ રંગ ગ્રૂપ `{n}` નથી +@msg no composite font કોઈ કમ્પોઝિટ ફોન્ટ નથી +@msg no composite font named `{n}` `{n}` નામનો કોઈ કમ્પોઝિટ ફોન્ટ નથી +@msg no composite fonts to export નિકાસ કરવા કોઈ કમ્પોઝિટ ફોન્ટ નથી +@msg no cross-reference table કોઈ ક્રોસ-રેફરન્સ ટેબલ નથી +@msg no current layer કોઈ વર્તમાન લેયર નથી +@msg no custom arrowhead {name} (see stroke.arrowheads.list) કોઈ કસ્ટમ એરોહેડ {name} નથી (stroke.arrowheads.list જુઓ) +@msg no custom bevel {name} (see threeD.bevels.list) કોઈ કસ્ટમ બેવલ {name} નથી (threeD.bevels.list જુઓ) +@msg no data કોઈ ડેટા નથી +@msg no data sets કોઈ ડેટા સેટ નથી +@msg no dataset named `{from}` `{from}` નામનો કોઈ ડેટા સેટ નથી +@msg no dataset named `{name}` `{name}` નામનો કોઈ ડેટા સેટ નથી +@msg no datasets કોઈ ડેટા સેટ નથી +@msg no design named `{name}` `{name}` નામની કોઈ ડિઝાઇન નથી +@msg no design named `{n}` `{n}` નામની કોઈ ડિઝાઇન નથી +@msg no design named `{old}` `{old}` નામની કોઈ ડિઝાઇન નથી +@msg no dialog open કોઈ ડાયલોગ ખુલ્લો નથી +@msg no document કોઈ દસ્તાવેજ નથી +@msg no document open કોઈ દસ્તાવેજ ખુલ્લો નથી +@msg no drawing કોઈ ડ્રોઇંગ નથી +@msg no effect કોઈ ઇફેક્ટ નથી +@msg no effect applied yet હજી કોઈ ઇફેક્ટ લાગુ કરી નથી +@msg no effect at index {k} ઇન્ડેક્સ {k} પર કોઈ ઇફેક્ટ નથી +@msg no empty artboards to delete કાઢી નાખવા માટે કોઈ ખાલી આર્ટબોર્ડ નથી +@msg no encoder for {_1} yet {_1} માટે હજી કોઈ એન્કોડર નથી +@msg no end record કોઈ અંતિમ રેકોર્ડ નથી +@msg no export preset `{name}` (see document.exportPresets.list) કોઈ નિકાસ પ્રીસેટ `{name}` નથી (document.exportPresets.list જુઓ) +@msg no export preset `{n}` (see document.exportPresets.list) કોઈ નિકાસ પ્રીસેટ `{n}` નથી (document.exportPresets.list જુઓ) +@msg no field {field} કોઈ ફીલ્ડ {field} નથી +@msg no fields કોઈ ફીલ્ડ નથી +@msg no file manager here અહીં કોઈ ફાઇલ મેનેજર નથી +@msg no file picker here અહીં કોઈ ફાઇલ પિકર નથી +@msg no file reader કોઈ ફાઇલ રીડર નથી +@msg no file system here અહીં કોઈ ફાઇલ સિસ્ટમ નથી +@msg no file to open ખોલવા માટે કોઈ ફાઇલ નથી +@msg no file writer કોઈ ફાઇલ રાઇટર નથી +@msg no files to place મૂકવા માટે કોઈ ફાઇલો નથી +@msg no folder picked કોઈ ફોલ્ડર પસંદ કર્યું નથી +@msg no folder: pass `path` or set Preferences › Plug-ins & Scratch Disks › Additional Plug-ins Folder કોઈ ફોલ્ડર નથી: `path` આપો અથવા પસંદગીઓ › પ્લગ-ઇન્સ અને સ્ક્રેચ ડિસ્ક › વધારાનું પ્લગ-ઇન ફોલ્ડર સેટ કરો +@msg no fonts to look for: they are all available શોધવા માટે કોઈ ફોન્ટ નથી: બધા ઉપલબ્ધ છે +@msg no format to export to નિકાસ કરવા માટે કોઈ ફોર્મેટ નથી +@msg no formats to export નિકાસ કરવા કોઈ ફોર્મેટ નથી +@msg no free data set file name in destination folder ગંતવ્ય ફોલ્ડરમાં ડેટા સેટ ફાઇલ માટે કોઈ ખાલી નામ નથી +@msg no free recovery area કોઈ ખાલી પુનઃપ્રાપ્તિ વિસ્તાર નથી +@msg no gradient preset `{name}` (see gradient.presets.list) કોઈ ગ્રેડિયન્ટ પ્રીસેટ `{name}` નથી (gradient.presets.list જુઓ) +@msg no gradient swatch `{name}` કોઈ ગ્રેડિયન્ટ સ્વેચ `{name}` નથી +@msg no graphic style `{name}` કોઈ ગ્રાફિક સ્ટાઇલ `{name}` નથી +@msg no graphic style `{n}` કોઈ ગ્રાફિક સ્ટાઇલ `{n}` નથી +@msg no graphic style `{n}` in `{_1}` `{_1}` માં કોઈ ગ્રાફિક સ્ટાઇલ `{n}` નથી +@msg no graphic style library `{key}` (see graphicStyle.libraries) કોઈ ગ્રાફિક સ્ટાઇલ લાઇબ્રેરી `{key}` નથી (graphicStyle.libraries જુઓ) +@msg no guide selected કોઈ ગાઇડ પસંદ કરેલી નથી +@msg no guide selected (or give an index) કોઈ ગાઇડ પસંદ કરેલી નથી (અથવા ઇન્ડેક્સ આપો) +@msg no guide {i} કોઈ ગાઇડ {i} નથી +@msg no history state {v} કોઈ ઇતિહાસ સ્થિતિ {v} નથી +@msg no history to clear સાફ કરવા કોઈ ઇતિહાસ નથી +@msg no images in the folder ફોલ્ડરમાં કોઈ છબીઓ નથી +@msg no instructions કોઈ સૂચનાઓ નથી +@msg no interaction in progress કોઈ ક્રિયાપ્રતિક્રિયા ચાલુ નથી +@msg no item at index {_1} ઇન્ડેક્સ {_1} પર કોઈ આઇટમ નથી +@msg no item at index {from} ઇન્ડેક્સ {from} પર કોઈ આઇટમ નથી +@msg no item at one of the indices {idx} ઇન્ડેક્સ {idx} માંથી એક પર કોઈ આઇટમ નથી +@msg no key object કોઈ કી ઑબ્જેક્ટ નથી +@msg no key object: set one with select.key કોઈ કી ઑબ્જેક્ટ નથી: select.key વડે એક સેટ કરો +@msg no layer કોઈ લેયર નથી +@msg no layer to rename નામ બદલવા કોઈ લેયર નથી +@msg no layer {id} (see layer.list) કોઈ લેયર {id} નથી (layer.list જુઓ) +@msg no layers to export નિકાસ કરવા કોઈ લેયર નથી +@msg no library `{id}` કોઈ લાઇબ્રેરી `{id}` નથી +@msg no library `{key}` કોઈ લાઇબ્રેરી `{key}` નથી +@msg no library `{key}` (see {list}) કોઈ લાઇબ્રેરી `{key}` નથી ({list} જુઓ) +@msg no map value {key} કોઈ map મૂલ્ય {key} નથી +@msg no match of `find` at bytes {_1}..{_2} of object {_3} ઑબ્જેક્ટ {_3} ના બાઇટ {_1}..{_2} પર `find` નો કોઈ મેળ નથી +@msg no menu item that can be inserted runs this command દાખલ કરી શકાય તેવી કોઈ મેનૂ આઇટમ આ આદેશ ચલાવતી નથી +@msg no metadata templates folder here અહીં કોઈ મેટાડેટા ટેમ્પલેટ ફોલ્ડર નથી +@msg no metafile format કોઈ મેટાફાઇલ ફોર્મેટ નથી +@msg no native format કોઈ નેટિવ ફોર્મેટ નથી +@msg no object at path {shown} in the symbol's art સિમ્બોલની આર્ટમાં પાથ {shown} પર કોઈ ઑબ્જેક્ટ નથી +@msg no object that can be selected has a note matching “{query}” પસંદ કરી શકાય તેવા કોઈ ઑબ્જેક્ટની નોંધ “{query}” સાથે મેળ ખાતી નથી +@msg no object {_1} કોઈ ઑબ્જેક્ટ {_1} નથી +@msg no objects કોઈ ઑબ્જેક્ટ નથી +@msg no option class {class} કોઈ વિકલ્પ વર્ગ {class} નથી +@msg no option class {c} કોઈ વિકલ્પ વર્ગ {c} નથી +@msg no pages કોઈ પેજ નથી +@msg no panels are docked on the {_1} side {_1} બાજુએ કોઈ પેનલ ડૉક કરેલી નથી +@msg no params કોઈ params નથી +@msg no parent layer કોઈ પેરેન્ટ લેયર નથી +@msg no path painted with a brush is selected બ્રશથી રંગેલો કોઈ પાથ પસંદ કરેલો નથી +@msg no pattern `{name}` કોઈ પેટર્ન `{name}` નથી +@msg no pattern `{pat}` કોઈ પેટર્ન `{pat}` નથી +@msg no pattern named `{choice}` `{choice}` નામની કોઈ પેટર્ન નથી +@msg no pattern swatch `{name}` કોઈ પેટર્ન સ્વેચ `{name}` નથી +@msg no perspective grid preset named `{b}` (see perspective.presets.list) `{b}` નામનો કોઈ પરસ્પેક્ટિવ ગ્રિડ પ્રીસેટ નથી (perspective.presets.list જુઓ) +@msg no perspective grid preset named `{name}` `{name}` નામનો કોઈ પરસ્પેક્ટિવ ગ્રિડ પ્રીસેટ નથી +@msg no perspective grid preset named `{n}` `{n}` નામનો કોઈ પરસ્પેક્ટિવ ગ્રિડ પ્રીસેટ નથી +@msg no plug-in effect is deferred કોઈ પ્લગ-ઇન ઇફેક્ટ સ્થગિત નથી +@msg no plug-in filter to repeat: run one from Object › Plug-ins first પુનરાવર્તન કરવા કોઈ પ્લગ-ઇન ફિલ્ટર નથી: પહેલાં ઑબ્જેક્ટ › પ્લગ-ઇન્સ માંથી એક ચલાવો +@msg no plug-in {0} is installed કોઈ પ્લગ-ઇન {0} ઇન્સ્ટોલ કરેલું નથી +@msg no plug-in {id} is installed કોઈ પ્લગ-ઇન {id} ઇન્સ્ટોલ કરેલું નથી +@msg no point selected (give `index`) કોઈ બિંદુ પસંદ કરેલું નથી (`index` આપો) +@msg no point {i} (the gradient has {_1}) કોઈ બિંદુ {i} નથી (ગ્રેડિયન્ટમાં {_1} છે) +@msg no preset called `{from}` (see file.newPresets) `{from}` નામનો કોઈ પ્રીસેટ નથી (file.newPresets જુઓ) +@msg no preset called `{name}` (see file.newPresets) `{name}` નામનો કોઈ પ્રીસેટ નથી (file.newPresets જુઓ) +@msg no preset named `{name}` `{name}` નામનો કોઈ પ્રીસેટ નથી +@msg no preset named `{n}` `{n}` નામનો કોઈ પ્રીસેટ નથી +@msg no preset named {from} {from} નામનો કોઈ પ્રીસેટ નથી +@msg no previous transform કોઈ અગાઉનું ટ્રાન્સફોર્મ નથી +@msg no print preset named `{base}` `{base}` નામનો કોઈ પ્રિન્ટ પ્રીસેટ નથી +@msg no print preset named `{b}` (see print.presets.list) `{b}` નામનો કોઈ પ્રિન્ટ પ્રીસેટ નથી (print.presets.list જુઓ) +@msg no print preset named `{key}` `{key}` નામનો કોઈ પ્રિન્ટ પ્રીસેટ નથી +@msg no print preset named `{name}` (presets: {_1}) `{name}` નામનો કોઈ પ્રિન્ટ પ્રીસેટ નથી (પ્રીસેટ: {_1}) +@msg no print preset named `{n}` `{n}` નામનો કોઈ પ્રિન્ટ પ્રીસેટ નથી +@msg no print service કોઈ પ્રિન્ટ સેવા નથી +@msg no profile named `{name}` `{name}` નામની કોઈ પ્રોફાઇલ નથી +@msg no random numbers ({e}) કોઈ રેન્ડમ સંખ્યાઓ નથી ({e}) +@msg no readable files in the folder ફોલ્ડરમાં વાંચી શકાય તેવી કોઈ ફાઇલો નથી +@msg no recovery copy `{f}` (see file.recovery.list) કોઈ પુનઃપ્રાપ્તિ નકલ `{f}` નથી (file.recovery.list જુઓ) +@msg no revert command કોઈ રિવર્ટ આદેશ નથી +@msg no row in the range is visible, unlocked and inside the isolated group શ્રેણીમાંની કોઈ પંક્તિ દૃશ્યમાન, અનલૉક અને આઇસોલેટ કરેલા ગ્રૂપની અંદર નથી +@msg no row is highlighted કોઈ પંક્તિ હાઇલાઇટ કરેલી નથી +@msg no rows કોઈ પંક્તિઓ નથી +@msg no saved PDF preset named `{name}` `{name}` નામનો કોઈ સાચવેલો PDF પ્રીસેટ નથી +@msg no saved PDF preset named `{name}` (built-in presets are read-only: start a new one from them) `{name}` નામનો કોઈ સાચવેલો PDF પ્રીસેટ નથી (બિલ્ટ-ઇન પ્રીસેટ ફક્ત વાંચવા પૂરતા છે: તેમાંથી નવો શરૂ કરો) +@msg no saved export preset `{name}` કોઈ સાચવેલો નિકાસ પ્રીસેટ `{name}` નથી +@msg no saved export presets to export (name built-in ones in `names`) નિકાસ કરવા કોઈ સાચવેલા નિકાસ પ્રીસેટ નથી (બિલ્ટ-ઇન પ્રીસેટનાં નામ `names` માં આપો) +@msg no saved gradient preset called {name} {name} નામનો કોઈ સાચવેલો ગ્રેડિયન્ટ પ્રીસેટ નથી +@msg no saved gradient presets કોઈ સાચવેલા ગ્રેડિયન્ટ પ્રીસેટ નથી +@msg no saved preset called `{name}` `{name}` નામનો કોઈ સાચવેલો પ્રીસેટ નથી +@msg no saved preset named `{name}` `{name}` નામનો કોઈ સાચવેલો પ્રીસેટ નથી +@msg no saved preset named `{name}` to rename નામ બદલવા માટે `{name}` નામનો કોઈ સાચવેલો પ્રીસેટ નથી +@msg no saved preset named `{n}` `{n}` નામનો કોઈ સાચવેલો પ્રીસેટ નથી +@msg no saved presets કોઈ સાચવેલા પ્રીસેટ નથી +@msg no saved presets to export (name [Default] in `names` to export it) નિકાસ કરવા કોઈ સાચવેલા પ્રીસેટ નથી ([Default] ની નિકાસ કરવા તેનું નામ `names` માં આપો) +@msg no saved presets to export (name built-in ones in `names`) નિકાસ કરવા કોઈ સાચવેલા પ્રીસેટ નથી (બિલ્ટ-ઇન પ્રીસેટનાં નામ `names` માં આપો) +@msg no saved print preset named `{name}` `{name}` નામનો કોઈ સાચવેલો પ્રિન્ટ પ્રીસેટ નથી +@msg no saved print preset named `{name}` ({DEFAULT_PRESET} is protected: start a new one from it) `{name}` નામનો કોઈ સાચવેલો પ્રિન્ટ પ્રીસેટ નથી ({DEFAULT_PRESET} સુરક્ષિત છે: તેમાંથી નવો શરૂ કરો) +@msg no saved profile called {name} {name} નામની કોઈ સાચવેલી પ્રોફાઇલ નથી +@msg no saved profiles કોઈ સાચવેલી પ્રોફાઇલ નથી +@msg no saved selection `{name}` કોઈ સાચવેલી પસંદગી `{name}` નથી +@msg no saved selection recalled કોઈ સાચવેલી પસંદગી પાછી લાવવામાં આવી નથી +@msg no saved selections કોઈ સાચવેલી પસંદગીઓ નથી +@msg no saved theme called {name} (see colorTheme.list) {name} નામની કોઈ સાચવેલી થીમ નથી (colorTheme.list જુઓ) +@msg no saved themes કોઈ સાચવેલી થીમ નથી +@msg no saved tracing presets to export નિકાસ કરવા કોઈ સાચવેલા ટ્રેસિંગ પ્રીસેટ નથી +@msg no saved views કોઈ સાચવેલા વ્યૂ નથી +@msg no script dialog waits કોઈ સ્ક્રિપ્ટ ડાયલોગ રાહ જોતો નથી +@msg no segment {segment} on line {line} લાઇન {line} પર કોઈ સેગમેન્ટ {segment} નથી +@msg no selected object fits on the sheet કોઈ પસંદ કરેલો ઑબ્જેક્ટ શીટ પર બેસતો નથી +@msg no selected or given object has a visible 3D effect કોઈ પસંદ કરેલા કે આપેલા ઑબ્જેક્ટમાં દૃશ્યમાન 3D ઇફેક્ટ નથી +@msg no selected slice in the image: select slices, or save all of them છબીમાં કોઈ પસંદ કરેલી સ્લાઇસ નથી: સ્લાઇસ પસંદ કરો, અથવા બધી સાચવો +@msg no selection bounds કોઈ પસંદગી સીમાઓ નથી +@msg no series {i} કોઈ શ્રેણી {i} નથી +@msg no sheet to fill ભરવા માટે કોઈ શીટ નથી +@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again કોઈ સમાન ઑબ્જેક્ટ મળ્યા નહીં (પ્રતિબિંબિત નકલો મેળવાતી નથી); ગ્લોબલ એડિટ વિકલ્પો બદલો અને ફરી પ્રયાસ કરો +@msg no slice selected કોઈ સ્લાઇસ પસંદ કરેલી નથી +@msg no slice {n} in the image (see slice.list) છબીમાં કોઈ સ્લાઇસ {n} નથી (slice.list જુઓ) +@msg no source art કોઈ સ્રોત આર્ટ નથી +@msg no startup preset called {name} {name} નામનો કોઈ સ્ટાર્ટઅપ પ્રીસેટ નથી +@msg no stop {i} (the gradient has {n}) કોઈ સ્ટોપ {i} નથી (ગ્રેડિયન્ટમાં {n} છે) +@msg no style `{name}` કોઈ સ્ટાઇલ `{name}` નથી +@msg no such Kinsoku set આવો કોઈ Kinsoku Set નથી +@msg no such action આવી કોઈ ક્રિયા નથી +@msg no such action set આવો કોઈ ક્રિયા સેટ નથી +@msg no such action step આવું કોઈ ક્રિયા પગલું નથી +@msg no such anchor આવું કોઈ એન્કર બિંદુ નથી +@msg no such artboard આવું કોઈ આર્ટબોર્ડ નથી +@msg no such assets (see assets.list) આવી કોઈ ઍસેટ નથી (assets.list જુઓ) +@msg no such color આવો કોઈ રંગ નથી +@msg no such document આવો કોઈ દસ્તાવેજ નથી +@msg no such frame anchor, or the frame would reach past the canvas આવો કોઈ ફ્રેમ એન્કર નથી, અથવા ફ્રેમ કેનવાસની બહાર પહોંચી જશે +@msg no such function key આવી કોઈ ફંક્શન કી નથી +@msg no such layer or object આવું કોઈ લેયર કે ઑબ્જેક્ટ નથી +@msg no such object id {_1} આવો કોઈ ઑબ્જેક્ટ id {_1} નથી +@msg no such object id {value} આવો કોઈ ઑબ્જેક્ટ id {value} નથી +@msg no such object {0} આવો કોઈ ઑબ્જેક્ટ {0} નથી +@msg no such objects આવા કોઈ ઑબ્જેક્ટ નથી +@msg no such path anchor, or the path would reach past the canvas આવો કોઈ પાથ એન્કર નથી, અથવા પાથ કેનવાસની બહાર પહોંચી જશે +@msg no such perspective grid preset આવો કોઈ પરસ્પેક્ટિવ ગ્રિડ પ્રીસેટ નથી +@msg no such recent file આવી કોઈ તાજેતરની ફાઇલ નથી +@msg no such recent font આવો કોઈ તાજેતરનો ફોન્ટ નથી +@msg no such rows આવી કોઈ પંક્તિઓ નથી +@msg no such saved selection આવી કોઈ સાચવેલી પસંદગી નથી +@msg no such segment આવો કોઈ સેગમેન્ટ નથી +@msg no such spine point આવું કોઈ સ્પાઇન બિંદુ નથી +@msg no such spine segment આવો કોઈ સ્પાઇન સેગમેન્ટ નથી +@msg no such subpath આવો કોઈ સબપાથ નથી +@msg no such toolbar આવો કોઈ ટૂલબાર નથી +@msg no such user library આવી કોઈ વપરાશકર્તા લાઇબ્રેરી નથી +@msg no such view આવો કોઈ વ્યૂ નથી +@msg no such width point આવું કોઈ પહોળાઈ બિંદુ નથી +@msg no swatch `{keep}` કોઈ સ્વેચ `{keep}` નથી +@msg no swatch `{name}` કોઈ સ્વેચ `{name}` નથી +@msg no swatch `{n}` કોઈ સ્વેચ `{n}` નથી +@msg no swatch `{n}` (swatches and colour groups move separately) કોઈ સ્વેચ `{n}` નથી (સ્વેચ અને રંગ ગ્રૂપ અલગથી ખસે છે) +@msg no swatch library `{key}` (see swatch.library.list) કોઈ સ્વેચ લાઇબ્રેરી `{key}` નથી (swatch.library.list જુઓ) +@msg no swatch library `{key}` (see swatch.library.list; "document": the document's swatches) કોઈ સ્વેચ લાઇબ્રેરી `{key}` નથી (swatch.library.list જુઓ; "document": દસ્તાવેજના સ્વેચ) +@msg no swatch library `{key}` (see swatch.library.list; "{DOCUMENT_SWATCHES}": the document's swatches) કોઈ સ્વેચ લાઇબ્રેરી `{key}` નથી (swatch.library.list જુઓ; "{DOCUMENT_SWATCHES}": દસ્તાવેજના સ્વેચ) +@msg no swatch library `{l}` (see swatch.library.list) કોઈ સ્વેચ લાઇબ્રેરી `{l}` નથી (swatch.library.list જુઓ) +@msg no swatch named `{n}` `{n}` નામનો કોઈ સ્વેચ નથી +@msg no swatch or colour group `{n}` કોઈ સ્વેચ કે રંગ ગ્રૂપ `{n}` નથી +@msg no swatch or colour group `{n}` in `{_1}` `{_1}` માં કોઈ સ્વેચ કે રંગ ગ્રૂપ `{n}` નથી +@msg no symbol `{n}` કોઈ સિમ્બોલ `{n}` નથી +@msg no symbol `{n}` in `{_1}` `{_1}` માં કોઈ સિમ્બોલ `{n}` નથી +@msg no symbol instances selected કોઈ સિમ્બોલ ઇન્સ્ટન્સ પસંદ કરેલા નથી +@msg no symbol library `{key}` (see symbol.libraries) કોઈ સિમ્બોલ લાઇબ્રેરી `{key}` નથી (symbol.libraries જુઓ) +@msg no symbol named `{_1}` `{_1}` નામનો કોઈ સિમ્બોલ નથી +@msg no symbol named `{name}` `{name}` નામનો કોઈ સિમ્બોલ નથી +@msg no symbol named `{name}` in the document it came from જે દસ્તાવેજમાંથી તે આવ્યો તેમાં `{name}` નામનો કોઈ સિમ્બોલ નથી +@msg no symbol named `{n}` `{n}` નામનો કોઈ સિમ્બોલ નથી +@msg no symbol set selected કોઈ સિમ્બોલ સેટ પસંદ કરેલો નથી +@msg no tab stop to delete કાઢી નાખવા કોઈ ટૅબ સ્ટૉપ નથી +@msg no tab stop to repeat પુનરાવર્તન કરવા કોઈ ટૅબ સ્ટૉપ નથી +@msg no target has that fill or stroke to take the opacity અપારદર્શકતા લેવા માટે કોઈ લક્ષ્યમાં તે ફિલ કે સ્ટ્રોક નથી +@msg no target object has an opacity mask: select one or give `id` કોઈ લક્ષ્ય ઑબ્જેક્ટમાં ઓપેસિટી માસ્ક નથી: એક પસંદ કરો અથવા `id` આપો +@msg no text કોઈ ટેક્સ્ટ નથી +@msg no text objects selected કોઈ ટેક્સ્ટ ઑબ્જેક્ટ પસંદ કરેલા નથી +@msg no thread was left to load it તેને લોડ કરવા કોઈ થ્રેડ બાકી નહોતો +@msg no threaded text selected કોઈ થ્રેડેડ ટેક્સ્ટ પસંદ કરેલું નથી +@msg no toolbar named `{_1}` `{_1}` નામનો કોઈ ટૂલબાર નથી +@msg no toolbar named `{bar}` `{bar}` નામનો કોઈ ટૂલબાર નથી +@msg no toolbar named `{name}` `{name}` નામનો કોઈ ટૂલબાર નથી +@msg no tracing preset `{preset}` (see imageTrace.presets) કોઈ ટ્રેસિંગ પ્રીસેટ `{preset}` નથી (imageTrace.presets જુઓ) +@msg no two circles are within reach: raise the reach કોઈ બે વર્તુળ પહોંચમાં નથી: પહોંચ વધારો +@msg no user library folder here અહીં કોઈ વપરાશકર્તા લાઇબ્રેરી ફોલ્ડર નથી +@msg no user library folder here (save with a path, or without one to get the data) અહીં કોઈ વપરાશકર્તા લાઇબ્રેરી ફોલ્ડર નથી (પાથ સાથે સાચવો, અથવા ડેટા મેળવવા પાથ વિના સાચવો) +@msg no user workspace `{from}` કોઈ વપરાશકર્તા વર્કસ્પેસ `{from}` નથી +@msg no variable named `{from}` `{from}` નામનો કોઈ વેરિએબલ નથી +@msg no variable named `{name}` `{name}` નામનો કોઈ વેરિએબલ નથી +@msg no variable named `{var}` `{var}` નામનો કોઈ વેરિએબલ નથી +@msg no variable named `{v}` `{v}` નામનો કોઈ વેરિએબલ નથી +@msg no view named `{name}` `{name}` નામનો કોઈ વ્યૂ નથી +@msg no window કોઈ વિન્ડો નથી +@msg no window to ask in પૂછવા માટે કોઈ વિન્ડો નથી +@msg no window to open the dialog in ડાયલોગ ખોલવા માટે કોઈ વિન્ડો નથી +@msg no window to show Recolor Artwork in કલાકૃતિનો રંગ બદલો બતાવવા માટે કોઈ વિન્ડો નથી +@msg no window to show the dialog in ડાયલોગ બતાવવા માટે કોઈ વિન્ડો નથી +@msg no window to show the {kind} dialog {kind} ડાયલોગ બતાવવા માટે કોઈ વિન્ડો નથી +@msg no workspace `{key}` કોઈ વર્કસ્પેસ `{key}` નથી +@msg no writer configured કોઈ રાઇટર ગોઠવેલ નથી +@msg node {_1} already has the text variable `{_2}` નોડ {_1} માં પહેલેથી ટેક્સ્ટ વેરિએબલ `{_2}` છે +@msg node {_1} has no content a variable can drive નોડ {_1} માં વેરિએબલ ચલાવી શકે તેવી કોઈ સામગ્રી નથી +@msg node {_1} is an embedded image, and an image variable drives only a linked image નોડ {_1} એમ્બેડ કરેલી છબી છે, અને છબી વેરિએબલ ફક્ત લિંક કરેલી છબીને ચલાવે છે +@msg node {_1} is not a graph નોડ {_1} ગ્રાફ નથી +@msg node {_1} is not an image નોડ {_1} છબી નથી +@msg node {_1} is not text નોડ {_1} ટેક્સ્ટ નથી +@msg node {_1} is not type નોડ {_1} ટાઇપ નથી +@msg not JSON: {e} JSON નથી: {e} +@msg not a DCS file DCS ફાઇલ નથી +@msg not a DXF drawing DXF ડ્રોઇંગ નથી +@msg not a PDF presets file (format `{_1}`) PDF પ્રીસેટ ફાઇલ નથી (ફોર્મેટ `{_1}`) +@msg not a PDF presets file: {e} PDF પ્રીસેટ ફાઇલ નથી: {e} +@msg not a PICT file PICT ફાઇલ નથી +@msg not a PSD file PSD ફાઇલ નથી +@msg not a RegExp object RegExp ઑબ્જેક્ટ નથી +@msg not a VectorCraft file: {0} VectorCraft ફાઇલ નથી: {0} +@msg not a VectorCraft proof setup file VectorCraft પ્રૂફ સેટઅપ ફાઇલ નથી +@msg not a VectorCraft shortcut set (missing `overrides`) VectorCraft શૉર્ટકટ સેટ નથી (`overrides` ખૂટે છે) +@msg not a WebAssembly binary (missing \\0asm header) WebAssembly બાઇનરી નથી (\\0asm હેડર ખૂટે છે) +@msg not a Word document: its WordDocument stream doesn't start with a file information block Word દસ્તાવેજ નથી: તેની WordDocument સ્ટ્રીમ ફાઇલ માહિતી બ્લોકથી શરૂ થતી નથી +@msg not a Word document: its compound file has no WordDocument stream Word દસ્તાવેજ નથી: તેની કમ્પાઉન્ડ ફાઇલમાં કોઈ WordDocument સ્ટ્રીમ નથી +@msg not a Word document: its main part is not a WordprocessingML document Word દસ્તાવેજ નથી: તેનો મુખ્ય ભાગ WordprocessingML દસ્તાવેજ નથી +@msg not a Word document: its package has no main document part Word દસ્તાવેજ નથી: તેના પેકેજમાં કોઈ મુખ્ય દસ્તાવેજ ભાગ નથી +@msg not a blend બ્લેન્ડ નથી +@msg not a closed path બંધ પાથ નથી +@msg not a color table: an .act file is 768 or 772 bytes long and uses 1 to 256 colors કલર ટેબલ નથી: .act ફાઇલ 768 અથવા 772 બાઇટ લાંબી હોય છે અને 1 થી 256 રંગો વાપરે છે +@msg not a composite fonts file: no compositeFonts list કમ્પોઝિટ ફોન્ટ્સ ફાઇલ નથી: compositeFonts સૂચિ નથી +@msg not a composite fonts file: {e} કમ્પોઝિટ ફોન્ટ્સ ફાઇલ નથી: {e} +@msg not a file ફાઇલ નથી +@msg not a flattener presets file (format `{_1}`) ફ્લેટનર પ્રીસેટ્સ ફાઇલ નથી (ફોર્મેટ `{_1}`) +@msg not a flattener presets file: {e} ફ્લેટનર પ્રીસેટ્સ ફાઇલ નથી: {e} +@msg not a font file ફોન્ટ ફાઇલ નથી +@msg not a graphic style library (format `{_1}`) ગ્રાફિક સ્ટાઇલ લાઇબ્રેરી નથી (ફોર્મેટ `{_1}`) +@msg not a graphic style library: {e} ગ્રાફિક સ્ટાઇલ લાઇબ્રેરી નથી: {e} +@msg not a layer or group લેયર કે ગ્રૂપ નથી +@msg not a library file: {e} લાઇબ્રેરી ફાઇલ નથી: {e} +@msg not a mesh envelope point મેશ એન્વેલોપ બિંદુ નથી +@msg not a number સંખ્યા નથી +@msg not a perspective grid presets file (format `{_1}`) પરસ્પેક્ટિવ ગ્રિડ પ્રીસેટ્સ ફાઇલ નથી (ફોર્મેટ `{_1}`) +@msg not a perspective grid presets file: {e} પરસ્પેક્ટિવ ગ્રિડ પ્રીસેટ્સ ફાઇલ નથી: {e} +@msg not a plain file સામાન્ય ફાઇલ નથી +@msg not a preferences file (format `{format}`) પસંદગીઓ ફાઇલ નથી (ફોર્મેટ `{format}`) +@msg not a preferences file: no JSON object પસંદગીઓ ફાઇલ નથી: JSON ઑબ્જેક્ટ નથી +@msg not a preferences file: no `format` પસંદગીઓ ફાઇલ નથી: `format` નથી +@msg not a preferences file: no `prefs` પસંદગીઓ ફાઇલ નથી: `prefs` નથી +@msg not a preferences file: no `version` પસંદગીઓ ફાઇલ નથી: `version` નથી +@msg not a preferences file: {e} પસંદગીઓ ફાઇલ નથી: {e} +@msg not a print presets file (format `{_1}`) પ્રિન્ટ પ્રીસેટ્સ ફાઇલ નથી (ફોર્મેટ `{_1}`) +@msg not a print presets file: {e} પ્રિન્ટ પ્રીસેટ્સ ફાઇલ નથી: {e} +@msg not a proof setup file: {e} પ્રૂફ સેટઅપ ફાઇલ નથી: {e} +@msg not a regular expression રેગ્યુલર એક્સપ્રેશન નથી +@msg not a save dialog સેવ ડાયલૉગ નથી +@msg not a shortcut set: the text doesn't start with a slash name and an opening brace શોર્ટકટ સેટ નથી: ટેક્સ્ટ સ્લૅશ નામ અને ખુલતા કૌંસથી શરૂ થતું નથી +@msg not a stored or deflated central record સંગ્રહિત (stored) કે ડિફ્લેટેડ સેન્ટ્રલ રેકોર્ડ નથી +@msg not a supported palette (.gpl, .ase, or .acb) સપોર્ટેડ પૅલેટ નથી (.gpl, .ase, અથવા .acb) +@msg not a swatch library (.vcswatches or .gpl) સ્વેચ લાઇબ્રેરી નથી (.vcswatches અથવા .gpl) +@msg not a swatch library (format `{_1}`) સ્વેચ લાઇબ્રેરી નથી (ફોર્મેટ `{_1}`) +@msg not a swatch library: {e} સ્વેચ લાઇબ્રેરી નથી: {e} +@msg not a tracing presets file: {why} ટ્રેસિંગ પ્રીસેટ્સ ફાઇલ નથી: {why} +@msg not a valid SVGZ file: {e} માન્ય SVGZ ફાઇલ નથી: {e} +@msg not a valid plug-in module: {0} માન્ય પ્લગ-ઇન મૉડ્યુલ નથી: {0} +@msg not an EMF or WMF file EMF કે WMF ફાઇલ નથી +@msg not an HP-GL file HP-GL ફાઇલ નથી +@msg not an RTF file: it doesn't start with {{\\rtf RTF ફાઇલ નથી: તે {{\\rtf થી શરૂ થતી નથી +@msg not an action set file ક્રિયા સેટ ફાઇલ નથી +@msg not an action set file ({e}) ક્રિયા સેટ ફાઇલ નથી ({e}) +@msg not an action set: the text doesn't start with /version and a number ક્રિયા સેટ નથી: ટેક્સ્ટ /version અને સંખ્યાથી શરૂ થતું નથી +@msg not an export presets file (format `{_1}`) એક્સપોર્ટ પ્રીસેટ્સ ફાઇલ નથી (ફોર્મેટ `{_1}`) +@msg not an export presets file: {e} એક્સપોર્ટ પ્રીસેટ્સ ફાઇલ નથી: {e} +@msg not an image VectorCraft reads (see document.formats) VectorCraft વાંચી શકે તેવી ઇમેજ નથી (document.formats જુઓ) +@msg not area type (text in a frame) outside perspective પરસ્પેક્ટિવની બહાર એરિયા ટાઇપ (ફ્રેમમાં ટેક્સ્ટ) નથી +@msg not editing an opacity mask ઓપેસિટી માસ્ક સંપાદિત થઈ રહ્યો નથી +@msg not in pattern editing mode પેટર્ન સંપાદન મોડમાં નથી +@msg not the SVG options SVG વિકલ્પો નથી +@msg not type on a path outside perspective પરસ્પેક્ટિવની બહાર પાથ પર ટાઇપ નથી +@msg nothing encoded કંઈ એન્કોડ થયું નથી +@msg nothing prints કંઈ છપાતું નથી +@msg nothing selected કંઈ પસંદ કરેલું નથી +@msg nothing selected is in a group પસંદ કરેલું કંઈ ગ્રૂપમાં નથી +@msg nothing to align સંરેખિત કરવા માટે કંઈ નથી +@msg nothing to bind બાંધવા માટે કંઈ નથી +@msg nothing to change બદલવા માટે કંઈ નથી +@msg nothing to change: give dx, dy, hScale, vScale or rotation બદલવા માટે કંઈ નથી: dx, dy, hScale, vScale અથવા rotation આપો +@msg nothing to crop ક્રોપ કરવા માટે કંઈ નથી +@msg nothing to distort વિકૃત કરવા માટે કંઈ નથી +@msg nothing to export એક્સપોર્ટ કરવા માટે કંઈ નથી +@msg nothing to export: the document has no visible art એક્સપોર્ટ કરવા માટે કંઈ નથી: દસ્તાવેજમાં કોઈ દૃશ્યમાન આર્ટ નથી +@msg nothing to export: the document has no visible art (or turn on Use Artboards) એક્સપોર્ટ કરવા માટે કંઈ નથી: દસ્તાવેજમાં કોઈ દૃશ્યમાન આર્ટ નથી (અથવા આર્ટબોર્ડ વાપરો ચાલુ કરો) +@msg nothing to mark માર્ક કરવા માટે કંઈ નથી +@msg nothing to mark: the selection has no bounds માર્ક કરવા માટે કંઈ નથી: પસંદગીની કોઈ સીમા નથી +@msg nothing to mark: the selection is too small for corner marks માર્ક કરવા માટે કંઈ નથી: પસંદગી કૉર્નર માર્ક્સ માટે ખૂબ નાની છે +@msg nothing to preview પૂર્વાવલોકન કરવા માટે કંઈ નથી +@msg nothing to print છાપવા માટે કંઈ નથી +@msg nothing to print: every artboard picked is blank છાપવા માટે કંઈ નથી: પસંદ કરેલું દરેક આર્ટબોર્ડ ખાલી છે +@msg nothing to print: the document has no art that prints છાપવા માટે કંઈ નથી: દસ્તાવેજમાં છપાય તેવી કોઈ આર્ટ નથી +@msg nothing to redo ફરીથી કરવા માટે કંઈ નથી +@msg nothing to repeat પુનરાવર્તન કરવા માટે કંઈ નથી +@msg nothing to save: the document has no visible art સાચવવા માટે કંઈ નથી: દસ્તાવેજમાં કોઈ દૃશ્યમાન આર્ટ નથી +@msg nothing to undo પૂર્વવત્ કરવા માટે કંઈ નથી +@msg nothing to warp વૉર્પ કરવા માટે કંઈ નથી +@msg nothing to wrap રૅપ કરવા માટે કંઈ નથી +@msg numArtBoards must be a whole number from 1 to 100 numArtBoards 1 થી 100 સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg numbers out of order in {{}} quantifier {{}} ક્વૉન્ટિફાયરમાં સંખ્યાઓ ક્રમમાં નથી +@msg object budget (more than {MAX_OBJECTS} read-only objects) ઑબ્જેક્ટ મર્યાદા ({MAX_OBJECTS} થી વધુ ફક્ત-વાંચી શકાય તેવા ઑબ્જેક્ટ) +@msg object has no weighted stroke ઑબ્જેક્ટમાં વેઇટેડ સ્ટ્રોક નથી +@msg object ids are non-negative integers, not {v} ઑબ્જેક્ટ id ઋણ ન હોય તેવા પૂર્ણાંક છે, {v} નહીં +@msg object is not a path ઑબ્જેક્ટ પાથ નથી +@msg object transparency cannot be sampled onto highlighted characters; disable Transparency in Eyedropper Options or select the whole object ઑબ્જેક્ટની પારદર્શિતા હાઇલાઇટ કરેલા અક્ષરો પર સેમ્પલ કરી શકાતી નથી; આઇડ્રોપર વિકલ્પોમાં પારદર્શિતા બંધ કરો અથવા આખો ઑબ્જેક્ટ પસંદ કરો +@msg object {0} cannot have children ઑબ્જેક્ટ {0} ને ચાઇલ્ડ હોઈ શકતા નથી +@msg object {_1} can't be set as point type ઑબ્જેક્ટ {_1} ને પોઇન્ટ ટાઇપ તરીકે સેટ કરી શકાતો નથી +@msg object {_1} can't take the requested size ઑબ્જેક્ટ {_1} માંગેલું કદ લઈ શકતો નથી +@msg object {_1} has 64 tags, the most an object has ઑબ્જેક્ટ {_1} પાસે 64 ટૅગ છે, જે ઑબ્જેક્ટ માટે મહત્તમ છે +@msg object {_1} has lost its file's contents: relink it ઑબ્જેક્ટ {_1} એ તેની ફાઇલની સામગ્રી ગુમાવી છે: તેને ફરી લિંક કરો +@msg object {_1} has no bounds to rotate ઑબ્જેક્ટ {_1} ની ફેરવવા માટે કોઈ સીમા નથી +@msg object {_1} has no bounds to size ઑબ્જેક્ટ {_1} ની કદ બદલવા માટે કોઈ સીમા નથી +@msg object {_1} has no path ઑબ્જેક્ટ {_1} માં પાથ નથી +@msg object {_1} has no size ઑબ્જેક્ટ {_1} નું કોઈ કદ નથી +@msg object {_1} has no tag {tag} ઑબ્જેક્ટ {_1} માં ટૅગ {tag} નથી +@msg object {_1} is a layer or a ruler guide, which has no tags ઑબ્જેક્ટ {_1} લેયર કે રૂલર ગાઇડ છે, જેમાં ટૅગ હોતા નથી +@msg object {_1} is an image changed by Perspective Distort or Free Distort, which this command does not work on ઑબ્જેક્ટ {_1} પરસ્પેક્ટિવ વિકૃત અથવા ફ્રી ડિસ્ટોર્ટથી બદલાયેલી ઇમેજ છે, જેના પર આ કમાન્ડ કામ કરતો નથી +@msg object {_1} is hidden or locked, or on a locked artboard ઑબ્જેક્ટ {_1} છુપાયેલો કે લૉક કરેલો છે, અથવા લૉક કરેલા આર્ટબોર્ડ પર છે +@msg object {_1} is not a closed path or compound path ઑબ્જેક્ટ {_1} બંધ પાથ કે કમ્પાઉન્ડ પાથ નથી +@msg object {_1} is not a placed document ઑબ્જેક્ટ {_1} મૂકેલો દસ્તાવેજ નથી +@msg object {_1} is not an Intertwine group ઑબ્જેક્ટ {_1} ગૂંથેલું ગ્રૂપ નથી +@msg object {_1} is not an image ઑબ્જેક્ટ {_1} ઇમેજ નથી +@msg object {_1} is not an image or a linked file ઑબ્જેક્ટ {_1} ઇમેજ કે લિંક કરેલી ફાઇલ નથી +@msg object {_1} is not an image or a placed document ઑબ્જેક્ટ {_1} ઇમેજ કે મૂકેલો દસ્તાવેજ નથી +@msg object {_1} is not in this Intertwine group ઑબ્જેક્ટ {_1} આ ગૂંથેલા ગ્રૂપમાં નથી +@msg object {_1} needs a 3D effect ઑબ્જેક્ટ {_1} ને 3D ઇફેક્ટની જરૂર છે +@msg object {_1} needs a 3D effect at index {index} ઑબ્જેક્ટ {_1} ને ઇન્ડેક્સ {index} પર 3D ઇફેક્ટની જરૂર છે +@msg object {_1}: Inflate's back takes graphics with Both sides and Cap on ઑબ્જેક્ટ {_1}: ફુલાવોની પાછળની સપાટી પર ગ્રાફિક્સ ત્યારે જ મૂકી શકાય જ્યારે બંને બાજુ અને કૅપ ચાલુ હોય +@msg object {_1}: `surface` must be from 1 to {_2}, the object's surface count ઑબ્જેક્ટ {_1}: `surface` 1 થી {_2} સુધી હોવું જોઈએ, જે ઑબ્જેક્ટની સપાટીઓની સંખ્યા છે +@msg object {_1}: a hollow Extrude & Bevel has no caps: turn on Cap to map a graphic ઑબ્જેક્ટ {_1}: પોલા એક્સ્ટ્રુડ અને બેવલમાં કૅપ નથી: ગ્રાફિક મેપ કરવા માટે કૅપ ચાલુ કરો +@msg object {_1}: surface {surface} has no map: give `symbol` ઑબ્જેક્ટ {_1}: સપાટી {surface} પર કોઈ મેપ નથી: `symbol` આપો +@msg object {_1}: with a depth of 0 the object has one face: map its graphics onto the front ઑબ્જેક્ટ {_1}: 0 ઊંડાઈ સાથે ઑબ્જેક્ટની એક જ સપાટી હોય છે: તેના ગ્રાફિક્સ આગળની સપાટી પર મેપ કરો +@msg object {_1}: {_2} ઑબ્જેક્ટ {_1}: {_2} +@msg object {_1}: {e} ઑબ્જેક્ટ {_1}: {e} +@msg object {_1}: {name} at index {index} has no lighting presets; set its lights with effect.setParams ઑબ્જેક્ટ {_1}: ઇન્ડેક્સ {index} પરના {name} માં કોઈ લાઇટિંગ પ્રીસેટ નથી; તેની લાઇટ effect.setParams વડે સેટ કરો +@msg object {id} has anchors 0–{_1} for `corners`, not {past} `corners` માટે ઑબ્જેક્ટ {id} પાસે એન્કર 0–{_1} છે, {past} નહીં +@msg object {id} has {n} anchors, so no anchor {past} ઑબ્જેક્ટ {id} પાસે {n} એન્કર છે, તેથી એન્કર {past} નથી +@msg object {id} is not a path ઑબ્જેક્ટ {id} પાથ નથી +@msg object {id} is not a selected top-level object ઑબ્જેક્ટ {id} પસંદ કરેલો ટોપ-લેવલ ઑબ્જેક્ટ નથી +@msg object {k} must be in exactly one layer ઑબ્જેક્ટ {k} બરાબર એક લેયરમાં હોવો જોઈએ +@msg object {value} fills no area ઑબ્જેક્ટ {value} કોઈ ક્ષેત્ર ભરતો નથી +@msg object {value} is not a closed path or compound path ઑબ્જેક્ટ {value} બંધ પાથ કે કમ્પાઉન્ડ પાથ નથી +@msg object {value} is not a path or compound path ઑબ્જેક્ટ {value} પાથ કે કમ્પાઉન્ડ પાથ નથી +@msg object {value} is not the stored path: it changed, or the document is another one ઑબ્જેક્ટ {value} સંગ્રહિત પાથ નથી: તે બદલાયો છે, અથવા દસ્તાવેજ બીજો છે +@msg object {value} is too complex to measure ઑબ્જેક્ટ {value} માપવા માટે ખૂબ જટિલ છે +@msg objects can't be nested more than 32 deep ઑબ્જેક્ટ 32 થી વધુ સ્તર ઊંડે નેસ્ટ કરી શકાતા નથી +@msg objects must be none, move or copy objects none, move અથવા copy હોવું જોઈએ +@msg objects were left out કેટલાક ઑબ્જેક્ટ બાકાત રહ્યા +@msg offset out of range ઑફસેટ શ્રેણીની બહાર છે +@msg on must be true or false on true અથવા false હોવું જોઈએ +@msg one circle is inside the other એક વર્તુળ બીજાની અંદર છે +@msg one of {_1} {_1} માંથી એક +@msg only a filter declares `inputs` ફક્ત ફિલ્ટર જ `inputs` જાહેર કરે છે +@msg only a filter declares `writes` ફક્ત ફિલ્ટર જ `writes` જાહેર કરે છે +@msg only a filter or a live effect declares `commands` ફક્ત ફિલ્ટર કે લાઇવ ઇફેક્ટ જ `commands` જાહેર કરે છે +@msg only a filter with the usual budget declares `commandAllowlist` ફક્ત સામાન્ય બજેટવાળું ફિલ્ટર જ `commandAllowlist` જાહેર કરે છે +@msg only an exporter or an importer declares `extensions` ફક્ત એક્સપોર્ટર કે ઇમ્પોર્ટર જ `extensions` જાહેર કરે છે +@msg only an importer declares `outputKinds` ફક્ત ઇમ્પોર્ટર જ `outputKinds` જાહેર કરે છે +@msg only an object of the Global Edit other than the one it started from can be left out ગ્લોબલ એડિટનો ફક્ત એ જ ઑબ્જેક્ટ બાકાત રાખી શકાય જેનાથી તે શરૂ થયું ન હોય +@msg only groups, layers, type and images have a Contents (Characters) row ફક્ત ગ્રૂપ, લેયર, ટાઇપ અને ઇમેજમાં જ સામગ્રી (અક્ષરો) પંક્તિ હોય છે +@msg only http, https and mailto URLs open in the browser, not “{url}” બ્રાઉઝરમાં ફક્ત http, https અને mailto URL જ ખૂલે છે, “{url}” નહીં +@msg only interior mesh lines can be deleted ફક્ત અંદરની મેશ રેખાઓ જ ડિલીટ કરી શકાય છે +@msg only paths and compound paths can be aligned to the pixel grid ફક્ત પાથ અને કમ્પાઉન્ડ પાથ જ પિક્સેલ ગ્રિડ પર સંરેખિત કરી શકાય છે +@msg only solid colours can be added (not gradients or patterns) ફક્ત સોલિડ રંગો જ ઉમેરી શકાય છે (ગ્રેડિયન્ટ કે પેટર્ન નહીં) +@msg only solid-colour swatches can be spot colours ફક્ત સોલિડ-રંગ સ્વેચ જ સ્પૉટ રંગ હોઈ શકે છે +@msg only this Affinity file's embedded preview could be read: use File › Open to see it with its warning, or export SVG or PDF from Affinity first આ Affinity ફાઇલનું ફક્ત એમ્બેડ કરેલું પૂર્વાવલોકન જ વાંચી શકાયું: તેને તેની ચેતવણી સાથે જોવા માટે ફાઇલ › ખોલો વાપરો, અથવા પહેલા Affinity માંથી SVG કે PDF એક્સપોર્ટ કરો +@msg only this Affinity file's embedded preview could be read; use File › Open to see it with its warning આ Affinity ફાઇલનું ફક્ત એમ્બેડ કરેલું પૂર્વાવલોકન જ વાંચી શકાયું; તેને તેની ચેતવણી સાથે જોવા માટે ફાઇલ › ખોલો વાપરો +@msg onto, above, below, icon and a column place belong to window.panel.float and window.panel.dock onto, above, below, icon અને column સ્થાન ફક્ત window.panel.float અને window.panel.dock માટે છે +@msg onto, above, below, icon and a column place take no anchor, side, zone or before onto, above, below, icon અને column સ્થાન anchor, side, zone કે before લેતા નથી +@msg onto, above, below, icon and a column place take no x, y, width or height onto, above, below, icon અને column સ્થાન x, y, width કે height લેતા નથી +@msg opacity must be a number opacity સંખ્યા હોવી જોઈએ +@msg opacity must be from 0 to 100 opacity 0 થી 100 સુધી હોવી જોઈએ +@msg open a document to look for its linked files લિંક કરેલી ફાઇલો શોધવા માટે દસ્તાવેજ ખોલો +@msg open a document with data sets ડેટા સેટ્સવાળો દસ્તાવેજ ખોલો +@msg open must be true or false open true અથવા false હોવું જોઈએ +@msg open the practice sample of `{id}` first (see learn.openSample) પહેલા `{id}` નો પ્રેક્ટિસ નમૂનો ખોલો (learn.openSample જુઓ) +@msg open's options must be a PDFFileOptions record open ના વિકલ્પો PDFFileOptions રેકોર્ડ હોવા જોઈએ +@msg operand too large ઑપરેન્ડ ખૂબ મોટો છે +@msg option: one of {_1} option: {_1} માંથી એક +@msg options for {_1} are not available yet {_1} માટેના વિકલ્પો હજી ઉપલબ્ધ નથી +@msg options must be an object (see file.formatOptions) options ઑબ્જેક્ટ હોવું જોઈએ (file.formatOptions જુઓ) +@msg order is a whole number from 0 to {_1}, not `{v}` order 0 થી {_1} સુધીની પૂર્ણ સંખ્યા છે, `{v}` નહીં +@msg order must be leftToRight or rightToLeft order leftToRight અથવા rightToLeft હોવું જોઈએ +@msg orientation must be a TextOrientation value orientation TextOrientation મૂલ્ય હોવું જોઈએ +@msg orientation must be page or path orientation page અથવા path હોવું જોઈએ +@msg orientation must be portrait or landscape, not `{o}` orientation portrait અથવા landscape હોવું જોઈએ, `{o}` નહીં +@msg others must be true or false others true અથવા false હોવું જોઈએ +@msg outlineText {v}: true or false outlineText {v}: true અથવા false +@msg output intent profile: {e} આઉટપુટ ઇન્ટેન્ટ પ્રોફાઇલ: {e} +@msg output must be pdf, print or screen output pdf, print અથવા screen હોવું જોઈએ +@msg output size ({what} is {len} bytes, limit {max}) આઉટપુટ કદ ({what} {len} બાઇટ છે, મર્યાદા {max}) +@msg output.destination: no RGB or CMYK profile is called “{name}” output.destination: “{name}” નામની કોઈ RGB કે CMYK પ્રોફાઇલ નથી +@msg output.destination: {_1} files are CMYK, and “{name}” is an RGB profile output.destination: {_1} ફાઇલો CMYK છે, અને “{name}” RGB પ્રોફાઇલ છે +@msg output.destination: {e} output.destination: {e} +@msg output.inks: no ink is set to print output.inks: છાપવા માટે કોઈ ઇંક સેટ નથી +@msg overlap: {o} pt is half a tile or more overlap: {o} pt અડધી ટાઇલ કે તેથી વધુ છે +@msg overlapping Shaper paths must be in the same layer or group ઓવરલેપ થતા શેપર પાથ એક જ લેયર કે ગ્રૂપમાં હોવા જોઈએ +@msg overlapping edits ઓવરલેપ થતા ફેરફારો +@msg page art conflicts with image data for {key} {key} માટે પેજ આર્ટ ઇમેજ ડેટા સાથે ટકરાય છે +@msg page art conflicts with pattern {name} પેજ આર્ટ પેટર્ન {name} સાથે ટકરાય છે +@msg page art conflicts with swatch {name} પેજ આર્ટ સ્વેચ {name} સાથે ટકરાય છે +@msg page art is missing image data for {key} પેજ આર્ટમાં {key} માટેનો ઇમેજ ડેટા ખૂટે છે +@msg page art is missing pattern {name} પેજ આર્ટમાં પેટર્ન {name} ખૂટે છે +@msg page art is missing swatch {name} પેજ આર્ટમાં સ્વેચ {name} ખૂટે છે +@msg page must be a whole number from 1 page 1 કે તેથી વધુની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg page size {w} × {h} પેજનું કદ {w} × {h} +@msg page takes a number page સંખ્યા લે છે +@msg page thumbnail: {e} પેજ થંબનેલ: {e} +@msg page {0} does not exist (the PDF has {1}) પેજ {0} અસ્તિત્વમાં નથી (PDF માં {1} પેજ છે) +@msg page {page} of the PDF has no objects PDF ના પેજ {page} માં કોઈ ઑબ્જેક્ટ નથી +@msg page {page}: `{file}` has {n} {artboards} પેજ {page}: `{file}` માં {n} {artboards} છે +@msg page {page}: `{name}` has {n} {pages} પેજ {page}: `{name}` માં {n} {pages} છે +@msg pages must be a range such as "2-3" or a page number, not {v} pages "2-3" જેવી શ્રેણી કે પેજ નંબર હોવું જોઈએ, {v} નહીં +@msg pages: {e} pages: {e} +@msg panel is required panel જરૂરી છે +@msg panel position must be finite પૅનલની સ્થિતિ મર્યાદિત હોવી જોઈએ +@msg panels can't be shown in Presentation Mode પ્રેઝન્ટેશન મોડમાં પૅનલ બતાવી શકાતી નથી +@msg panicked while loading લોડ કરતી વખતે ક્રૅશ (panic) થયું +@msg panicked while loading: {what} લોડ કરતી વખતે ક્રૅશ (panic) થયું: {what} +@msg parameter `{k}`: {what} પેરામીટર `{k}`: {what} +@msg parameter `{name}`: {what} પેરામીટર `{name}`: {what} +@msg parameters must be an object પેરામીટર ઑબ્જેક્ટ હોવા જોઈએ +@msg params must be an object params ઑબ્જેક્ટ હોવું જોઈએ +@msg parts of the drawing nested too deeply, or past the import limits, were left out ચિત્રના જે ભાગો ખૂબ ઊંડે નેસ્ટ થયેલા હતા, અથવા ઇમ્પોર્ટ મર્યાદાની બહાર હતા, તે બાકાત રાખવામાં આવ્યા +@msg pass `id` or `from`, not both `id` કે `from` આપો, બંને નહીં +@msg pass newName, registration, exportType, nineSlice, type and/or alignToPixelGrid newName, registration, exportType, nineSlice, type અને/અથવા alignToPixelGrid આપો +@msg paste unavailable ચોંટાડવું ઉપલબ્ધ નથી +@msg path chunks must share their boundary point પાથના ટુકડાઓનું સીમા બિંદુ એક જ હોવું જોઈએ +@msg path has no open end પાથનો કોઈ છેડો ખુલ્લો નથી +@msg path is already closed પાથ પહેલેથી બંધ છે +@msg path is empty પાથ ખાલી છે +@msg path must be a list of child indices path ચાઇલ્ડ ઇન્ડેક્સની સૂચિ હોવી જોઈએ +@msg paths contain invalid coordinates પાથમાં અમાન્ય કોઓર્ડિનેટ છે +@msg paths entry {i} needs path and ids (object ids no other entry has) paths એન્ટ્રી {i} ને path અને ids જોઈએ (એવા ઑબ્જેક્ટ id જે બીજી કોઈ એન્ટ્રીમાં ન હોય) +@msg paths must be strings paths સ્ટ્રિંગ હોવા જોઈએ +@msg paths: give at least one file paths: ઓછામાં ઓછી એક ફાઇલ આપો +@msg pattern missing પેટર્ન ખૂટે છે +@msg pattern transform out of range પેટર્ન ટ્રાન્સફોર્મ શ્રેણીની બહાર છે +@msg pdfCompatible: false needs every artboard to keep the editable artwork pdfCompatible: false માટે દરેક આર્ટબોર્ડે સંપાદનયોગ્ય આર્ટવર્ક રાખવું જરૂરી છે +@msg pdfCompatible: false needs the artboards to keep the editable artwork when useArtboards is false pdfCompatible: false માટે, useArtboards false હોય ત્યારે આર્ટબોર્ડ્સે સંપાદનયોગ્ય આર્ટવર્ક રાખવું જરૂરી છે +@msg pdfs `single` writes artboards as the pages of one PDF: assets, layers and selection `each` write a PDF each pdfs `single` આર્ટબોર્ડ્સને એક PDF ના પેજ તરીકે લખે છે: assets, layers અને selection `each` દરેક માટે અલગ PDF લખે છે +@msg pdfs `{m}`: single or multiple pdfs `{m}`: single અથવા multiple +@msg percent must be above 0 and at most 6400, not {p} percent 0 થી વધુ અને વધુમાં વધુ 6400 હોવું જોઈએ, {p} નહીં +@msg permission `{permission}` needs plug-in API level {PROGRESS_API}: give `api` {PROGRESS_API} પરવાનગી `{permission}` ને પ્લગ-ઇન API સ્તર {PROGRESS_API} જોઈએ: `api` {PROGRESS_API} આપો +@msg permission `{shown}` doesn't apply to a plug-in of kind `{_1}` પરવાનગી `{shown}` `{_1}` પ્રકારના પ્લગ-ઇનને લાગુ પડતી નથી +@msg permission `{shown}` is listed twice પરવાનગી `{shown}` બે વાર સૂચિબદ્ધ છે +@msg permission `{shown}` is reserved for a later plug-in API; this host doesn't grant it પરવાનગી `{shown}` ભવિષ્યના પ્લગ-ઇન API માટે આરક્ષિત છે; આ હોસ્ટ તે આપતું નથી +@msg pick a colour, gradient or pattern to save as a swatch સ્વેચ તરીકે સાચવવા માટે રંગ, ગ્રેડિયન્ટ કે પેટર્ન પસંદ કરો +@msg pickColorFrom is "artwork" or "swatches", not {v} pickColorFrom "artwork" અથવા "swatches" છે, {v} નહીં +@msg pins and moved must be non-empty lists of the same length pins અને moved સમાન લંબાઈની ખાલી ન હોય તેવી સૂચિઓ હોવી જોઈએ +@msg pins must be [[x,y]…] pins [[x,y]…] હોવા જોઈએ +@msg pins must be finite pins મર્યાદિત હોવા જોઈએ +@msg place is above, below or inside, not `{other}` place above, below અથવા inside છે, `{other}` નહીં +@msg placed art lies outside the canvas મૂકેલી આર્ટ કૅન્વાસની બહાર છે +@msg plane must be left, right or ground plane left, right અથવા ground હોવું જોઈએ +@msg plane must be left|right|ground plane left|right|ground હોવું જોઈએ +@msg plane must be left|right|ground|none plane left|right|ground|none હોવું જોઈએ +@msg plug-in ABI: {0} પ્લગ-ઇન ABI: {0} +@msg plug-in effects are not allowed in returned effects પરત કરેલી ઇફેક્ટ્સમાં પ્લગ-ઇન ઇફેક્ટ્સની મંજૂરી નથી +@msg plug-in exceeded its {0} પ્લગ-ઇને તેની {0} ઓળંગી +@msg plug-in failed: {0} પ્લગ-ઇન નિષ્ફળ થયું: {0} +@msg plug-in manifest: {0} પ્લગ-ઇન મૅનિફેસ્ટ: {0} +@msg plug-in output: {0} પ્લગ-ઇન આઉટપુટ: {0} +@msg plug-in output: {at}: it reaches more than {MAX_COORD} pt from the origin પ્લગ-ઇન આઉટપુટ: {at}: તે મૂળ બિંદુથી {MAX_COORD} pt થી વધુ દૂર પહોંચે છે +@msg plug-in parameters must be a JSON object પ્લગ-ઇન પેરામીટર JSON ઑબ્જેક્ટ હોવા જોઈએ +@msg plug-in parameters: {0} પ્લગ-ઇન પેરામીટર: {0} +@msg plug-in trapped: {0} પ્લગ-ઇન ટ્રૅપ થયું: {0} +@msg plugin.remove: {_1}: {e}: nothing was removed plugin.remove: {_1}: {e}: કંઈ દૂર કરવામાં આવ્યું નથી +@msg point is outside the mesh બિંદુ મેશની બહાર છે +@msg point is outside the object બિંદુ ઑબ્જેક્ટની બહાર છે +@msg point x must be a number બિંદુ x સંખ્યા હોવી જોઈએ +@msg point y must be a number બિંદુ y સંખ્યા હોવી જોઈએ +@msg pointType must be a PointType value pointType PointType મૂલ્ય હોવું જોઈએ +@msg points must be [t, left, right] with non-negative widths points ઋણ ન હોય તેવી પહોળાઈ સાથે [t, left, right] હોવા જોઈએ +@msg points must be [x,y] pairs points [x,y] જોડીઓ હોવા જોઈએ +@msg points must be a non-empty [[x,y,pressure?]…] list points ખાલી ન હોય તેવી [[x,y,pressure?]…] સૂચિ હોવી જોઈએ +@msg points must be a non-empty list of finite [x,y] points મર્યાદિત [x,y] ની ખાલી ન હોય તેવી સૂચિ હોવી જોઈએ +@msg points must be an array or null points array અથવા null હોવા જોઈએ +@msg points must be finite points મર્યાદિત હોવા જોઈએ +@msg points must be finite [x,y] pairs points મર્યાદિત [x,y] જોડીઓ હોવા જોઈએ +@msg points must be finite canvas points points મર્યાદિત કૅન્વાસ બિંદુઓ હોવા જોઈએ +@msg points must contain 1–4096 coordinates points માં 1–4096 કોઓર્ડિનેટ હોવા જોઈએ +@msg position must be normal, superscript or subscript position normal, superscript અથવા subscript હોવું જોઈએ +@msg position must be topLeft, topRight, bottomLeft or bottomRight position topLeft, topRight, bottomLeft અથવા bottomRight હોવું જોઈએ +@msg positions must be between 0 and 100000 pt positions 0 અને 100000 pt ની વચ્ચે હોવા જોઈએ +@msg ppi can't be more than {max} for this image આ ઇમેજ માટે ppi {max} થી વધુ ન હોઈ શકે +@msg ppi must be a positive number, not {ppi} ppi ધન સંખ્યા હોવી જોઈએ, {ppi} નહીં +@msg ppi must be between 1 and 2400 ppi 1 અને 2400 ની વચ્ચે હોવું જોઈએ +@msg precision must be from 0.001 to 10 pt precision 0.001 થી 10 pt સુધી હોવું જોઈએ +@msg preserve `{v}` is not transforms|bounds|fileDimensions|fit|fill preserve `{v}` transforms|bounds|fileDimensions|fit|fill માંથી એક નથી +@msg preserveShape must be clippingMask|transparency preserveShape clippingMask|transparency હોવું જોઈએ +@msg preserveText writes type layers: it needs layers: true preserveText ટાઇપ લેયર્સ લખે છે: તેને layers: true જોઈએ +@msg preset `{id}`: mobile or density preset `{id}`: mobile અથવા density +@msg preset must be standard, diffuse, topLeft or right preset standard, diffuse, topLeft અથવા right હોવું જોઈએ +@msg preset must be the name of a print preset preset પ્રિન્ટ પ્રીસેટનું નામ હોવું જોઈએ +@msg preset {_1} has no name પ્રીસેટ {_1} નું કોઈ નામ નથી +@msg presetSettings must be a DocumentPreset presetSettings DocumentPreset હોવું જોઈએ +@msg previewMode must be a DocumentPreviewMode value previewMode DocumentPreviewMode મૂલ્ય હોવું જોઈએ +@msg previewMode must be default, pixel or overprint previewMode default, pixel અથવા overprint હોવું જોઈએ +@msg print settings are not an object પ્રિન્ટ સેટિંગ્સ ઑબ્જેક્ટ નથી +@msg print settings: {e} પ્રિન્ટ સેટિંગ્સ: {e} +@msg print's options must be a PrintOptions object print ના વિકલ્પો PrintOptions ઑબ્જેક્ટ હોવા જોઈએ +@msg printAllArtboards printAllArtboards +@msg printing isn't available here અહીં છાપવાનું ઉપલબ્ધ નથી +@msg procedures nest too deeply પ્રોસિજર ખૂબ ઊંડે નેસ્ટ થાય છે +@msg profile colour space {other} is not RGB, CMYK or Gray પ્રોફાઇલ કલર સ્પેસ {other} RGB, CMYK કે Gray નથી +@msg properties: give the creation properties as an object properties: નિર્માણ પ્રોપર્ટીઝ ઑબ્જેક્ટ તરીકે આપો +@msg quality must be a whole number from 0 to 100, not {v} quality 0 થી 100 સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ, {v} નહીં +@msg quality {q}: WebP quality is 0–100 quality {q}: WebP ગુણવત્તા 0–100 છે +@msg quotes must be {{double?, single?}} quotes {{double?, single?}} હોવા જોઈએ +@msg quotes.{k} must be an opening and a closing quote, e.g. "“”" quotes.{k} ખુલતું અને બંધ થતું અવતરણ ચિહ્ન હોવું જોઈએ, દા.ત. "“”" +@msg range `{s}` is empty શ્રેણી `{s}` ખાલી છે +@msg range `{s}`: `{part}` names no number શ્રેણી `{s}`: `{part}` કોઈ સંખ્યા દર્શાવતું નથી +@msg range `{s}`: `{part}` runs backwards શ્રેણી `{s}`: `{part}` ઊલટી દિશામાં છે +@msg range `{s}`: `{t}` is not a number from 1 to {count} શ્રેણી `{s}`: `{t}` 1 થી {count} સુધીની સંખ્યા નથી +@msg range out of order in character class અક્ષર વર્ગમાં શ્રેણી ક્રમમાં નથી +@msg rasterEffectsPpi must be 1–2400 (72 screen, 150 medium, 300 high) rasterEffectsPpi 1–2400 હોવું જોઈએ (72 સ્ક્રીન, 150 મધ્યમ, 300 ઉચ્ચ) +@msg rasterResolution must be a DocumentRasterResolution value rasterResolution DocumentRasterResolution મૂલ્ય હોવું જોઈએ +@msg rating must be a whole number from 0 to {MAX_RATING} rating 0 થી {MAX_RATING} સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg read-only field '{field}' changed ફક્ત-વાંચી શકાય તેવું ફીલ્ડ '{field}' બદલાયું +@msg recovery copy `{file}`: {e} રિકવરી કૉપિ `{file}`: {e} +@msg rect and {k} contradict each other: give the area or the artboards rect અને {k} એકબીજાનો વિરોધ કરે છે: ક્ષેત્ર કે આર્ટબોર્ડ્સ આપો +@msg rect applies to raster formats, not {_1} rect રાસ્ટર ફોર્મેટ્સને લાગુ પડે છે, {_1} ને નહીં +@msg rect is [x, y, width, height] in points rect પૉઇન્ટમાં [x, y, width, height] છે +@msg rect is [x, y, width, height] in points, with a width and a height above 0 rect પૉઇન્ટમાં [x, y, width, height] છે, 0 થી વધુ પહોળાઈ અને ઊંચાઈ સાથે +@msg rect must be [x, y, width, height] rect [x, y, width, height] હોવું જોઈએ +@msg rect must be [x, y, width, height] with a positive width and height rect ધન પહોળાઈ અને ઊંચાઈ સાથે [x, y, width, height] હોવું જોઈએ +@msg rect must be [x, y, width, height]: {e} rect [x, y, width, height] હોવું જોઈએ: {e} +@msg rect needs finite numbers and a positive width and height rect ને મર્યાદિત સંખ્યાઓ અને ધન પહોળાઈ અને ઊંચાઈ જોઈએ +@msg redeclaration of '{ident}' '{ident}' ની ફરી ઘોષણા +@msg redraw needs id redraw ને id જોઈએ +@msg redraw within must be a finite distance of 0 or more redraw within 0 કે તેથી વધુનું મર્યાદિત અંતર હોવું જોઈએ +@msg reduce of an empty array with no initial value પ્રારંભિક મૂલ્ય વિના ખાલી array નું reduce +@msg reflect does not support proxy objects reflect proxy ઑબ્જેક્ટ્સને સપોર્ટ કરતું નથી +@msg reflect needs an object reflect ને ઑબ્જેક્ટ જોઈએ +@msg reflect.find: give the member's name, as a string or a number reflect.find: મેમ્બરનું નામ સ્ટ્રિંગ કે સંખ્યા તરીકે આપો +@msg reflect: the object has more than {MAX_REFLECTED_MEMBERS} members reflect: ઑબ્જેક્ટમાં {MAX_REFLECTED_MEMBERS} થી વધુ મેમ્બર છે +@msg registration must be 0..8 registration 0..8 હોવું જોઈએ +@msg regular expression flag '{_1}' given twice રેગ્યુલર એક્સપ્રેશન ફ્લૅગ '{_1}' બે વાર આપ્યો છે +@msg regular expression too large રેગ્યુલર એક્સપ્રેશન ખૂબ મોટું છે +@msg relativeObject must be a TextRange or a TextFrame relativeObject TextRange અથવા TextFrame હોવું જોઈએ +@msg relativeObject must be text of the same text frame relativeObject એ જ ટેક્સ્ટ ફ્રેમનું ટેક્સ્ટ હોવું જોઈએ +@msg release a layer or a group લેયર કે ગ્રૂપ મુક્ત કરો +@msg remove: this is not a ScriptUI window or control remove: આ ScriptUI વિન્ડો કે કંટ્રોલ નથી +@msg replace keeps the replaced object's place and transform: drop template, at and rect replace બદલાયેલા ઑબ્જેક્ટનું સ્થાન અને ટ્રાન્સફોર્મ જાળવે છે: template, at અને rect કાઢી નાખો +@msg replace: select the one object to replace replace: બદલવા માટેનો એક ઑબ્જેક્ટ પસંદ કરો +@msg replace: the object to replace was changed or deleted replace: બદલવાનો ઑબ્જેક્ટ બદલાઈ ગયો છે કે ડિલીટ થઈ ગયો છે +@msg resolution must be a number or screen|medium|high resolution સંખ્યા કે screen|medium|high હોવું જોઈએ +@msg resolution must be between 1 and 2400 ppi resolution 1 અને 2400 ppi ની વચ્ચે હોવું જોઈએ +@msg resolutions must be between 1 and 2400 ppi resolutions 1 અને 2400 ppi ની વચ્ચે હોવા જોઈએ +@msg result would exceed the canvas (coordinates out of range) પરિણામ કૅન્વાસની બહાર જશે (કોઓર્ડિનેટ શ્રેણીની બહાર) +@msg rotation must be a number of degrees rotation ડિગ્રીમાં સંખ્યા હોવી જોઈએ +@msg rotation must be finite rotation મર્યાદિત હોવું જોઈએ +@msg rotation must be from -360 to 360 degrees rotation -360 થી 360 ડિગ્રી સુધી હોવું જોઈએ +@msg rows and cols must be 1..50 rows અને cols 1..50 હોવા જોઈએ +@msg rows and columns must be 1..500 પંક્તિઓ અને કૉલમ 1..500 હોવા જોઈએ +@msg rows of objects whose appearances differ can't be reordered together જુદા દેખાવવાળા ઑબ્જેક્ટ્સની પંક્તિઓ એકસાથે ફરી ગોઠવી શકાતી નથી +@msg ruler guides can't be isolated રૂલર ગાઇડ્સ અલગ કરી શકાતી નથી +@msg sampled text would exceed the canvas (coordinates out of range) સેમ્પલ કરેલું ટેક્સ્ટ કૅન્વાસની બહાર જશે (કોઓર્ડિનેટ શ્રેણીની બહાર) +@msg save the document first: Package collects a saved document પહેલા દસ્તાવેજ સાચવો: પેકેજ સાચવેલો દસ્તાવેજ એકત્ર કરે છે +@msg save the document first: copy puts the file in its folder પહેલા દસ્તાવેજ સાચવો: કૉપિ ફાઇલને તેના ફોલ્ડરમાં મૂકે છે +@msg save the document with Save As before Save and Close સાચવો અને બંધ કરો પહેલાં દસ્તાવેજને આ રીતે સાચવો વડે સાચવો +@msg saveAs options must be IllustratorSaveOptions, EPSSaveOptions or PDFSaveOptions saveAs ના વિકલ્પો IllustratorSaveOptions, EPSSaveOptions અથવા PDFSaveOptions હોવા જોઈએ +@msg saved proof setups need the preferences folder, which this run doesn't have સાચવેલા પ્રૂફ સેટઅપ માટે પસંદગીઓ ફોલ્ડર જોઈએ, જે આ રનમાં નથી +@msg savedPreset: {e} savedPreset: {e} +@msg scale `{s}`: a factor such as 2x, a width (100w), a height (100h) or a resolution (72ppi) scale `{s}`: 2x જેવો ગુણક, પહોળાઈ (100w), ઊંચાઈ (100h) અથવા રિઝોલ્યુશન (72ppi) +@msg scale must be a number above 0, at most 64 scale 0 થી વધુ અને વધુમાં વધુ 64 ની સંખ્યા હોવી જોઈએ +@msg scale must be a number from {_1} to {_2}, not {_3} scale {_1} થી {_2} સુધીની સંખ્યા હોવી જોઈએ, {_3} નહીં +@msg scale must be a number from {_1} to {_2}, not {s} scale {_1} થી {_2} સુધીની સંખ્યા હોવી જોઈએ, {s} નહીં +@msg scale must be non-zero scale શૂન્ય ન હોવું જોઈએ +@msg scale: give one percentage, or the same width and height, while scale.linked is on (linked: false scales them apart) scale: scale.linked ચાલુ હોય ત્યારે એક ટકાવારી આપો, અથવા સમાન પહોળાઈ અને ઊંચાઈ આપો (linked: false તેમને અલગથી સ્કેલ કરે છે) +@msg scale: width ({_1}%) and height ({_2}%) must be equal while scale.linked is on scale: scale.linked ચાલુ હોય ત્યારે પહોળાઈ ({_1}%) અને ઊંચાઈ ({_2}%) સમાન હોવી જોઈએ +@msg scaleX and scaleY must not be 0 and at most 100000 percent scaleX અને scaleY 0 ન હોવા જોઈએ અને વધુમાં વધુ 100000 ટકા હોવા જોઈએ +@msg scheme tint needs a `swatch`: a global or spot color swatch સ્કીમ ટિન્ટ માટે `swatch` જોઈએ: ગ્લોબલ કે સ્પૉટ રંગ સ્વેચ +@msg scope applies to a click: leave out points scope ક્લિકને લાગુ પડે છે: points કાઢી નાખો +@msg scope each and paths go together: paths lists entries of ids and path, in place of ids, path and folder scope each અને paths સાથે જ વપરાય છે: paths માં ids, path અને folder ની જગ્યાએ ids અને path ની એન્ટ્રીઓ હોય છે +@msg scope missingInFolder takes path: the folder of that file is searched for the other missing links scope missingInFolder path લે છે: બાકીની ખૂટતી લિંક્સ માટે તે ફાઇલનું ફોલ્ડર શોધવામાં આવે છે +@msg scope must be "one", "connected" or "samePaint" scope "one", "connected" અથવા "samePaint" હોવું જોઈએ +@msg scope must be selection or all (got {other}) scope selection અથવા all હોવું જોઈએ (મળ્યું {other}) +@msg scope {v} is not each|selected|all|missingInFolder scope {v} each|selected|all|missingInFolder નથી +@msg scribble is too long સ્ક્રિબલ ખૂબ લાંબું છે +@msg script file is compiled: {value} સ્ક્રિપ્ટ ફાઇલ કમ્પાઇલ કરેલી છે: {value} +@msg script file is not UTF-8 text: {value} સ્ક્રિપ્ટ ફાઇલ UTF-8 ટેક્સ્ટ નથી: {value} +@msg script file is too large: {specifier} સ્ક્રિપ્ટ ફાઇલ ખૂબ મોટી છે: {specifier} +@msg script file read refused: {specifier} સ્ક્રિપ્ટ ફાઇલ વાંચવાનો ઇનકાર થયો: {specifier} +@msg script source limit reached (32 MiB) સ્ક્રિપ્ટ સોર્સ મર્યાદા પહોંચી ગઈ (32 MiB) +@msg searching a folder isn't available on the web વેબ પર ફોલ્ડર શોધવાનું ઉપલબ્ધ નથી +@msg seconds must be a whole number from 1 to 60 seconds 1 થી 60 સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg segment does not exist સેગમેન્ટ અસ્તિત્વમાં નથી +@msg select (or target) objects whose appearance isn't basic જેનો દેખાવ બેઝિક ન હોય તેવા ઑબ્જેક્ટ્સ પસંદ (અથવા ટાર્ગેટ) કરો +@msg select a Live Paint group લાઇવ પેઇન્ટ ગ્રૂપ પસંદ કરો +@msg select a Shaper group શેપર ગ્રૂપ પસંદ કરો +@msg select a blend બ્લેન્ડ પસંદ કરો +@msg select a blend or give `id` બ્લેન્ડ પસંદ કરો અથવા `id` આપો +@msg select a blend to set easing or color shift ઇઝિંગ કે કલર શિફ્ટ સેટ કરવા માટે બ્લેન્ડ પસંદ કરો +@msg select a clip group ક્લિપ ગ્રૂપ પસંદ કરો +@msg select a color group in the Swatches panel, or pass group સ્વેચ પૅનલમાં રંગ ગ્રૂપ પસંદ કરો, અથવા group આપો +@msg select a compound shape કમ્પાઉન્ડ આકાર પસંદ કરો +@msg select a flare ફ્લેર પસંદ કરો +@msg select a gradient mesh ગ્રેડિયન્ટ મેશ પસંદ કરો +@msg select a graph ગ્રાફ પસંદ કરો +@msg select a group or layer with visible, unlocked members દૃશ્યમાન, અનલૉક સભ્યોવાળું ગ્રૂપ કે લેયર પસંદ કરો +@msg select a layer લેયર પસંદ કરો +@msg select a linked image: an embedded one has no file લિંક કરેલી ઇમેજ પસંદ કરો: એમ્બેડ કરેલી ઇમેજની કોઈ ફાઇલ નથી +@msg select a path પાથ પસંદ કરો +@msg select a path that is neither locked nor hidden: text, images and symbol instances can't have a fold line role લૉક કે છુપાયેલો ન હોય તેવો પાથ પસંદ કરો: ટેક્સ્ટ, ઇમેજ અને સિમ્બોલ ઇન્સ્ટન્સને ફોલ્ડ લાઇનની ભૂમિકા આપી શકાતી નથી +@msg select a path, a compound path or an embedded image પાથ, કમ્પાઉન્ડ પાથ કે એમ્બેડ કરેલી ઇમેજ પસંદ કરો +@msg select a repeat રિપીટ પસંદ કરો +@msg select a stroke with a variable width બદલાતી પહોળાઈવાળો સ્ટ્રોક પસંદ કરો +@msg select a symbol instance સિમ્બોલ ઇન્સ્ટન્સ પસંદ કરો +@msg select a text object ટેક્સ્ટ ઑબ્જેક્ટ પસંદ કરો +@msg select an Image Trace object ઇમેજ ટ્રેસ ઑબ્જેક્ટ પસંદ કરો +@msg select an Intertwine group ગૂંથેલું ગ્રૂપ પસંદ કરો +@msg select an Objects on Path group પાથ પરના ઑબ્જેક્ટ ગ્રૂપ પસંદ કરો +@msg select an SVG filter SVG ફિલ્ટર પસંદ કરો +@msg select an envelope એન્વેલોપ પસંદ કરો +@msg select an image ઇમેજ પસંદ કરો +@msg select an image (or an Image Trace group) ઇમેજ (અથવા ઇમેજ ટ્રેસ ગ્રૂપ) પસંદ કરો +@msg select an image with a color mask કલર માસ્કવાળી ઇમેજ પસંદ કરો +@msg select an image, or pass id ઇમેજ પસંદ કરો, અથવા id આપો +@msg select an object (or pass `id`) ઑબ્જેક્ટ પસંદ કરો (અથવા `id` આપો) +@msg select an object in perspective પરસ્પેક્ટિવમાં ઑબ્જેક્ટ પસંદ કરો +@msg select an object with a 3D effect 3D ઇફેક્ટવાળો ઑબ્જેક્ટ પસંદ કરો +@msg select an object with a 3D effect (or give its ids) 3D ઇફેક્ટવાળો ઑબ્જેક્ટ પસંદ કરો (અથવા તેના ids આપો) +@msg select an object with a 3D effect, or give its id in ids 3D ઇફેક્ટવાળો ઑબ્જેક્ટ પસંદ કરો, અથવા ids માં તેનો id આપો +@msg select an object with a freeform gradient ફ્રીફોર્મ ગ્રેડિયન્ટવાળો ઑબ્જેક્ટ પસંદ કરો +@msg select an object with an opacity mask ઓપેસિટી માસ્કવાળો ઑબ્જેક્ટ પસંદ કરો +@msg select anchor points or segments first પહેલા એન્કર બિંદુઓ કે સેગમેન્ટ્સ પસંદ કરો +@msg select another anchor point to align to the key anchor કી એન્કર પર સંરેખિત કરવા માટે બીજું એન્કર બિંદુ પસંદ કરો +@msg select area type એરિયા ટાઇપ પસંદ કરો +@msg select area type (text in a frame) એરિયા ટાઇપ (ફ્રેમમાં ટેક્સ્ટ) પસંદ કરો +@msg select area type and closed paths (at least one area type object) એરિયા ટાઇપ અને બંધ પાથ પસંદ કરો (ઓછામાં ઓછો એક એરિયા ટાઇપ ઑબ્જેક્ટ) +@msg select area type whose first line can fit its frame જેની પહેલી લાઇન તેની ફ્રેમમાં સમાઈ શકે તેવું એરિયા ટાઇપ પસંદ કરો +@msg select artwork (or a colour group) to recolor રંગ બદલવા માટે આર્ટવર્ક (અથવા રંગ ગ્રૂપ) પસંદ કરો +@msg select artwork to add its colours તેના રંગો ઉમેરવા માટે આર્ટવર્ક પસંદ કરો +@msg select artwork to make a group of its colours તેના રંગોનું ગ્રૂપ બનાવવા માટે આર્ટવર્ક પસંદ કરો +@msg select artwork to recolor રંગ બદલવા માટે આર્ટવર્ક પસંદ કરો +@msg select artwork to recolour, or give a colour `group` રંગ બદલવા માટે આર્ટવર્ક પસંદ કરો, અથવા રંગ `group` આપો +@msg select at least two objects ઓછામાં ઓછા બે ઑબ્જેક્ટ પસંદ કરો +@msg select at most 2000 circles to bridge બ્રિજ કરવા માટે વધુમાં વધુ 2000 વર્તુળો પસંદ કરો +@msg select at most {MAX_SHAPES} objects to nest નેસ્ટ કરવા માટે વધુમાં વધુ {MAX_SHAPES} ઑબ્જેક્ટ પસંદ કરો +@msg select exactly two objects બરાબર બે ઑબ્જેક્ટ પસંદ કરો +@msg select exactly two path ends to join જોડવા માટે બરાબર બે પાથ છેડા પસંદ કરો +@msg select instances of one symbol એક જ સિમ્બોલના ઇન્સ્ટન્સ પસંદ કરો +@msg select members of a compound shape કમ્પાઉન્ડ આકારના સભ્યો પસંદ કરો +@msg select objects or give `color` ઑબ્જેક્ટ પસંદ કરો અથવા `color` આપો +@msg select objects or give ids ઑબ્જેક્ટ પસંદ કરો અથવા ids આપો +@msg select objects to align to the guide ગાઇડ પર સંરેખિત કરવા માટે ઑબ્જેક્ટ પસંદ કરો +@msg select objects, not layers ઑબ્જેક્ટ પસંદ કરો, લેયર નહીં +@msg select one Intertwine group એક ગૂંથેલું ગ્રૂપ પસંદ કરો +@msg select one generated art object એક જનરેટ કરેલો આર્ટ ઑબ્જેક્ટ પસંદ કરો +@msg select one image or pass id એક ઇમેજ પસંદ કરો અથવા id આપો +@msg select one layer, group or object to rename નામ બદલવા માટે એક લેયર, ગ્રૂપ કે ઑબ્જેક્ટ પસંદ કરો +@msg select one object એક ઑબ્જેક્ટ પસંદ કરો +@msg select one path, or give its `id` એક પાથ પસંદ કરો, અથવા તેનો `id` આપો +@msg select one whole path or compound path એક આખો પાથ કે કમ્પાઉન્ડ પાથ પસંદ કરો +@msg select only one path ફક્ત એક જ પાથ પસંદ કરો +@msg select open paths to close બંધ કરવા માટે ખુલ્લા પાથ પસંદ કરો +@msg select paths પાથ પસંદ કરો +@msg select paths or anchor points પાથ કે એન્કર બિંદુઓ પસંદ કરો +@msg select paths or compound paths પાથ કે કમ્પાઉન્ડ પાથ પસંદ કરો +@msg select paths to join જોડવા માટે પાથ પસંદ કરો +@msg select paths with dashed strokes to expand વિસ્તૃત કરવા માટે ડૅશવાળા સ્ટ્રોકવાળા પાથ પસંદ કરો +@msg select paths, or segments, to divide વિભાજિત કરવા માટે પાથ, અથવા સેગમેન્ટ્સ, પસંદ કરો +@msg select plain rectangles, ellipses or regular polygons to convert રૂપાંતર કરવા માટે સાદા લંબચોરસ, એલિપ્સ કે નિયમિત બહુકોણ પસંદ કરો +@msg select point type or type on a path પોઇન્ટ ટાઇપ કે પાથ પર ટાઇપ પસંદ કરો +@msg select rows or objects to collect એકત્ર કરવા માટે પંક્તિઓ કે ઑબ્જેક્ટ પસંદ કરો +@msg select segments, or paths, to add points to બિંદુઓ ઉમેરવા માટે સેગમેન્ટ્સ, અથવા પાથ, પસંદ કરો +@msg select some type first પહેલા થોડું ટાઇપ પસંદ કરો +@msg select something to export એક્સપોર્ટ કરવા માટે કંઈક પસંદ કરો +@msg select something to export (or turn off selectedOnly) એક્સપોર્ટ કરવા માટે કંઈક પસંદ કરો (અથવા selectedOnly બંધ કરો) +@msg select text to redefine the style from જેના પરથી સ્ટાઇલ ફરીથી વ્યાખ્યાયિત કરવી હોય તે ટેક્સ્ટ પસંદ કરો +@msg select the art and, on top of it, the mask object આર્ટ અને, તેની ઉપર, માસ્ક ઑબ્જેક્ટ પસંદ કરો +@msg select the art for the design ડિઝાઇન માટે આર્ટ પસંદ કરો +@msg select the art for the pattern tile પેટર્ન ટાઇલ માટે આર્ટ પસંદ કરો +@msg select the art to add first પહેલા ઉમેરવાની આર્ટ પસંદ કરો +@msg select the art to collect (or give its ids) એકત્ર કરવાની આર્ટ પસંદ કરો (અથવા તેના ids આપો) +@msg select the art to repeat પુનરાવર્તન કરવાની આર્ટ પસંદ કરો +@msg select the art to weed વીડ કરવાની આર્ટ પસંદ કરો +@msg select the artwork to warp વૉર્પ કરવાનું આર્ટવર્ક પસંદ કરો +@msg select the banner, or mark every artboard બૅનર પસંદ કરો, અથવા દરેક આર્ટબોર્ડ માર્ક કરો +@msg select the content and a path on top સામગ્રી અને તેની ઉપર એક પાથ પસંદ કરો +@msg select the images to relink, or pass ids ફરી લિંક કરવાની ઇમેજ પસંદ કરો, અથવા ids આપો +@msg select the images, or pass ids ઇમેજ પસંદ કરો, અથવા ids આપો +@msg select the linked images or placed documents, or pass ids લિંક કરેલી ઇમેજ કે મૂકેલા દસ્તાવેજો પસંદ કરો, અથવા ids આપો +@msg select the object to copy from જેમાંથી કૉપિ કરવું હોય તે ઑબ્જેક્ટ પસંદ કરો +@msg select the objects (or give their ids) ઑબ્જેક્ટ પસંદ કરો (અથવા તેમના ids આપો) +@msg select the objects to attach to the path પાથ સાથે જોડવાના ઑબ્જેક્ટ પસંદ કરો +@msg select the objects to bind બાંધવાના ઑબ્જેક્ટ પસંદ કરો +@msg select the objects to transform in perspective પરસ્પેક્ટિવમાં ટ્રાન્સફોર્મ કરવાના ઑબ્જેક્ટ પસંદ કરો +@msg select two open path ends, or two open paths, to average and join સરેરાશ કરીને જોડવા માટે બે ખુલ્લા પાથ છેડા, અથવા બે ખુલ્લા પાથ, પસંદ કરો +@msg select two or more circles to bridge બ્રિજ કરવા માટે બે કે વધુ વર્તુળો પસંદ કરો +@msg select two or more circles to bridge: {why} બ્રિજ કરવા માટે બે કે વધુ વર્તુળો પસંદ કરો: {why} +@msg select two or more graphic styles to merge મર્જ કરવા માટે બે કે વધુ ગ્રાફિક સ્ટાઇલ પસંદ કરો +@msg select two or more objects to distribute વિતરિત કરવા માટે બે કે વધુ ઑબ્જેક્ટ પસંદ કરો +@msg select two or more objects to intertwine ગૂંથવા માટે બે કે વધુ ઑબ્જેક્ટ પસંદ કરો +@msg select two or more slices to combine જોડવા માટે બે કે વધુ સ્લાઇસ પસંદ કરો +@msg select two or three paths or compound paths બે કે ત્રણ પાથ કે કમ્પાઉન્ડ પાથ પસંદ કરો +@msg select type in perspective પરસ્પેક્ટિવમાં ટાઇપ પસંદ કરો +@msg select type on a closed path બંધ પાથ પર ટાઇપ પસંદ કરો +@msg select type on a path પાથ પર ટાઇપ પસંદ કરો +@msg select type on a path or area type પાથ પર ટાઇપ કે એરિયા ટાઇપ પસંદ કરો +@msg selectTool needs a tool name, as a string selectTool ને ટૂલનું નામ સ્ટ્રિંગ તરીકે જોઈએ +@msg selected must be a PathPointSelection value selected PathPointSelection મૂલ્ય હોવું જોઈએ +@msg selected objects must be in a layer or group without live structural roles પસંદ કરેલા ઑબ્જેક્ટ્સ લાઇવ માળખાકીય ભૂમિકાઓ વિનાના લેયર કે ગ્રૂપમાં હોવા જોઈએ +@msg selection `{m}`: one or each selection `{m}`: one અથવા each +@msg selection has no bounds પસંદગીની કોઈ સીમા નથી +@msg selection: give an item of this list, its index or null selection: આ સૂચિની કોઈ આઇટમ, તેનો ઇન્ડેક્સ કે null આપો +@msg setEntirePath needs an array of [x, y] points setEntirePath ને [x, y] બિંદુઓનો array જોઈએ +@msg setEntirePath takes at most {MAX_POINTS} points setEntirePath વધુમાં વધુ {MAX_POINTS} બિંદુઓ લે છે +@msg settings is an object of document.exportForScreens params settings document.exportForScreens પેરામીટર્સનો ઑબ્જેક્ટ છે +@msg settings must be an object settings ઑબ્જેક્ટ હોવું જોઈએ +@msg shadow must be true or false shadow true અથવા false હોવું જોઈએ +@msg shadowPosition must be behind or below shadowPosition behind અથવા below હોવું જોઈએ +@msg shortcut for `{k}` must be a string `{k}` માટેનો શૉર્ટકટ સ્ટ્રિંગ હોવો જોઈએ +@msg show `{show}`: all, missing, modified or embedded show `{show}`: all, missing, modified અથવા embedded +@msg show must be true or false show true અથવા false હોવું જોઈએ +@msg show: `answers` has no answer left for this dialog show: આ ડાયલોગ માટે `answers` માં કોઈ જવાબ બાકી નથી +@msg show: a container's orientation must be row, column or stack show: કન્ટેનરનું orientation row, column અથવા stack હોવું જોઈએ +@msg show: a control appears twice in the dialog show: ડાયલોગમાં એક કંટ્રોલ બે વાર દેખાય છે +@msg show: a dialog can hold at most {MAX_CONTROLS} controls show: ડાયલોગમાં વધુમાં વધુ {MAX_CONTROLS} કંટ્રોલ હોઈ શકે છે +@msg show: a dialog cannot open inside a callback of a built-in function, a getter, a conversion or a file $.evalFile runs; call it from the script's own code show: બિલ્ટ-ઇન ફંક્શનના કૉલબૅક, ગેટર, રૂપાંતરણ અથવા $.evalFile ચલાવે તે ફાઇલની અંદરથી ડાયલોગ ખૂલી શકતો નથી; તેને સ્ક્રિપ્ટના પોતાના કોડમાંથી કૉલ કરો +@msg show: a dialog's lists hold at most {MAX_ITEMS} items in all show: ડાયલોગની યાદીઓમાં કુલ વધુમાં વધુ {MAX_ITEMS} આઇટમ હોઈ શકે છે +@msg show: a slider's or progress bar's minvalue is larger than its maxvalue show: સ્લાઇડર અથવા પ્રોગ્રેસ બારનું minvalue તેના maxvalue કરતાં મોટું છે +@msg show: controls can be nested at most {MAX_DEPTH} deep show: કંટ્રોલ વધુમાં વધુ {MAX_DEPTH} સ્તર ઊંડે સુધી નેસ્ટ થઈ શકે છે +@msg show: give {what} as an array or an object show: {what} ને એરે અથવા ઑબ્જેક્ટ તરીકે આપો +@msg show: no dialog is showing show: કોઈ ડાયલોગ દેખાતો નથી +@msg show: the dialog holds something that is not a control show: ડાયલોગમાં એવું કંઈક છે જે કંટ્રોલ નથી +@msg show: the dialog's description {what} show: ડાયલોગનું વર્ણન {what} +@msg show: the next answer in `answers` is for {_1}, not window show: `answers` માંનો આગળનો જવાબ window માટે નહીં, {_1} માટે છે +@msg show: there is no alignment {_1} show: {_1} જેવું કોઈ સંરેખણ નથી +@msg show: {what} is longer than 16 KiB show: {what} 16 KiB કરતાં લાંબું છે +@msg showOptionsDialog must be true or false showOptionsDialog true અથવા false હોવું જોઈએ +@msg side is left or right, not `{other}` side left અથવા right હોય છે, `{other}` નહીં +@msg side is left or right, not `{s}` side left અથવા right હોય છે, `{s}` નહીં +@msg side is left or right, not `{v}` side left અથવા right હોય છે, `{v}` નહીં +@msg size must be "small", "medium", "large" or a number of points over 0 up to {_1} size "small", "medium", "large" અથવા 0 થી વધુ અને {_1} સુધીના પોઇન્ટની સંખ્યા હોવી જોઈએ +@msg size must be from 0.1 to 1296 points size 0.1 થી 1296 પોઇન્ટ વચ્ચે હોવું જોઈએ +@msg sizeMode is {MODES}, not `{other}` sizeMode {MODES} હોય છે, `{other}` નહીં +@msg sizeMode is {MODES}, not {other} sizeMode {MODES} હોય છે, {other} નહીં +@msg slice {number} has no finite bounds and can't be written to PSD સ્લાઇસ {number} ની કોઈ સીમિત બાઉન્ડ્સ નથી અને તેને PSD માં લખી શકાતી નથી +@msg smallCaps must be true or false smallCaps true અથવા false હોવું જોઈએ +@msg some raster effects were not made into images: they would take more than 1,024 images or 256 megapixels in all કેટલીક રાસ્ટર ઇફેક્ટ્સ ઇમેજમાં ફેરવાઈ નથી: તેમાં કુલ 1,024 થી વધુ ઇમેજ અથવા 256 મેગાપિક્સેલ લાગત +@msg sort `{x}`: name, kind, status or size sort `{x}`: name, kind, status અથવા size +@msg source must be the id of a Shaper Group's original shape source શેપર ગ્રૂપના મૂળ શેપનું id હોવું જોઈએ +@msg source paths are too large for Shaper સ્રોત પાથ શેપર માટે ખૂબ મોટા છે +@msg source text transform is collapsed or unrepresentable સ્રોત ટેક્સ્ટનું ટ્રાન્સફોર્મ સંકોચાયેલું છે અથવા દર્શાવી શકાય તેવું નથી +@msg span must be "object" or "selection", got {v} span "object" અથવા "selection" હોવું જોઈએ, {v} મળ્યું +@msg span: "selection" places a `gradient`, not a swatch span: "selection" સ્વેચ નહીં, `gradient` મૂકે છે +@msg span: "selection" places a gradient: give `gradient` span: "selection" ગ્રેડિયન્ટ મૂકે છે: `gradient` આપો +@msg span: "selection" places a linear, radial, conic or diamond gradient, not a freeform one span: "selection" લીનિયર, રેડિયલ, કૉનિક અથવા ડાયમંડ ગ્રેડિયન્ટ મૂકે છે, ફ્રીફોર્મ નહીં +@msg span: "selection" places the gradient itself: leave out `start` and `end` (they already place it in document coordinates) span: "selection" ગ્રેડિયન્ટને પોતે મૂકે છે: `start` અને `end` છોડી દો (તે પહેલેથી તેને દસ્તાવેજ કોઑર્ડિનેટમાં મૂકે છે) +@msg speed must be accelerated, step or pause speed accelerated, step અથવા pause હોવું જોઈએ +@msg split must be a number from 0 to 1 split 0 થી 1 સુધીની સંખ્યા હોવી જોઈએ +@msg spot, mode and group apply to solid colours only spot, mode અને group ફક્ત સોલિડ રંગો પર લાગુ થાય છે +@msg start શરૂઆત +@msg status `{s}`: linked, embedded, missing or modified status `{s}`: linked, embedded, missing અથવા modified +@msg step પગલું +@msg step {step} of “{action}” runs the unknown command `{command}` “{action}” નું પગલું {step} અજાણ્યો આદેશ `{command}` ચલાવે છે +@msg steps must be 1..1000 steps 1..1000 હોવા જોઈએ +@msg steps must be 1..{MAX_STEPS} steps 1..{MAX_STEPS} હોવા જોઈએ +@msg stop editing the opacity mask first પહેલાં ઓપેસિટી માસ્કનું સંપાદન બંધ કરો +@msg stop {i} needs `offset` સ્ટૉપ {i} ને `offset` જોઈએ +@msg stop {i} needs a valid `color` સ્ટૉપ {i} ને માન્ય `color` જોઈએ +@msg stop {i}: `plates` must be four numbers from 0 to 1 (C, M, Y, K) સ્ટૉપ {i}: `plates` 0 થી 1 સુધીની ચાર સંખ્યાઓ હોવી જોઈએ (C, M, Y, K) +@msg stop {i}: `{k}` must be a number સ્ટૉપ {i}: `{k}` સંખ્યા હોવી જોઈએ +@msg stop {i}: {e} સ્ટૉપ {i}: {e} +@msg stopped before the archive was finished આર્કાઇવ પૂરું થાય તે પહેલાં બંધ થયું +@msg stops must be in order of `offset` સ્ટૉપ `offset` ના ક્રમમાં હોવા જોઈએ +@msg stroke cannot be set on a symbol instance સિમ્બોલ ઇન્સ્ટન્સ પર સ્ટ્રોક સેટ કરી શકાતો નથી +@msg strokeCap must be a StrokeCap value strokeCap એ StrokeCap મૂલ્ય હોવું જોઈએ +@msg strokeDashOffset must be from -1000000 to 1000000 points strokeDashOffset -1000000 થી 1000000 પોઇન્ટ વચ્ચે હોવું જોઈએ +@msg strokeDashOffset needs strokeDashes first strokeDashOffset માટે પહેલાં strokeDashes જોઈએ +@msg strokeJoin must be a StrokeJoin value strokeJoin એ StrokeJoin મૂલ્ય હોવું જોઈએ +@msg strokeMiterLimit must be from 1 to 500 strokeMiterLimit 1 થી 500 વચ્ચે હોવું જોઈએ +@msg strokeMode must be within|along|across, got {m} strokeMode within|along|across હોવું જોઈએ, {m} મળ્યું +@msg strokeOptions must be an object of stroke.set options strokeOptions એ stroke.set ના વિકલ્પોનો ઑબ્જેક્ટ હોવો જોઈએ +@msg strokeWidth must be a positive number of pixels strokeWidth પિક્સેલની ધન સંખ્યા હોવી જોઈએ +@msg strokeWidth must be from 0 to 1000 points strokeWidth 0 થી 1000 પોઇન્ટ વચ્ચે હોવું જોઈએ +@msg style `{style}` of `{family}` is not available `{family}` ની સ્ટાઇલ `{style}` ઉપલબ્ધ નથી +@msg style must be "pencil" or "brush" style "pencil" અથવા "brush" હોવી જોઈએ +@msg subpath {si} is not an open subpath સબપાથ {si} ખુલ્લો સબપાથ નથી +@msg subpaths required when joining the same path એક જ પાથને જોડતી વખતે subpaths જરૂરી છે +@msg super() needs new.target super() ને new.target જોઈએ +@msg super() was already called super() પહેલેથી કૉલ થઈ ગયું છે +@msg swatch exchange version {major}.{minor} isn't supported (only 1.x) સ્વેચ એક્સચેન્જ વર્ઝન {major}.{minor} સમર્થિત નથી (ફક્ત 1.x) +@msg swatchConflict must be "merge" or "add", not {v} swatchConflict "merge" અથવા "add" હોવું જોઈએ, {v} નહીં +@msg switch back to the document where this style was opened આ સ્ટાઇલ જે દસ્તાવેજમાં ખોલી હતી ત્યાં પાછા જાઓ +@msg t, dx and dy must be finite t, dx અને dy સીમિત હોવા જોઈએ +@msg table budget (the module defines {count} tables, the largest with {largest} elements; limit {MAX_TABLES} tables of {MAX_TABLE_ELEMENTS} elements) ટેબલ મર્યાદા (મોડ્યુલ {count} ટેબલ વ્યાખ્યાયિત કરે છે, સૌથી મોટામાં {largest} ઘટકો છે; મર્યાદા {MAX_TABLE_ELEMENTS} ઘટકોના {MAX_TABLES} ટેબલ) +@msg table must be true or false table true અથવા false હોવું જોઈએ +@msg takes one name એક નામ લે છે +@msg target text transform is collapsed or unrepresentable લક્ષ્ય ટેક્સ્ટનું ટ્રાન્સફોર્મ સંકોચાયેલું છે અથવા દર્શાવી શકાય તેવું નથી +@msg template too long ટેમ્પ્લેટ ખૂબ લાંબું છે +@msg text must be {{characterSet?, platform?, removeLineReturns?, removeParagraphReturns?, replaceSpaces?}} text {{characterSet?, platform?, removeLineReturns?, removeParagraphReturns?, replaceSpaces?}} હોવું જોઈએ +@msg text transform is collapsed or unrepresentable ટેક્સ્ટનું ટ્રાન્સફોર્મ સંકોચાયેલું છે અથવા દર્શાવી શકાય તેવું નથી +@msg text.replaceSpaces must be a whole number from 2 to 100 text.replaceSpaces 2 થી 100 સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg text.{key} `{v}`: use "{_1}" or "{_2}" text.{key} `{v}`: "{_1}" અથવા "{_2}" વાપરો +@msg textAs is not a text choice textAs ટેક્સ્ટનો વિકલ્પ નથી +@msg textFont must be a TextFont textFont એ TextFont હોવું જોઈએ +@msg textFont: the font has no glyph for {kept} {noun} font because Missing Glyph Protection is on textFont: Missing Glyph Protection ચાલુ હોવાથી ફોન્ટમાં {kept} {noun} ફોન્ટ માટે કોઈ ગ્લિફ નથી +@msg textFont: {w} textFont: {w} +@msg textPath must be a PathItem textPath એ PathItem હોવું જોઈએ +@msg texture too large ટેક્સ્ચર ખૂબ મોટું છે +@msg textureImage: give {{path}} or {{name, dataBase64}} of an image file, or a texture as effect.list gives it textureImage: ઇમેજ ફાઇલનો {{path}} અથવા {{name, dataBase64}} આપો, અથવા effect.list આપે તે રીતે ટેક્સ્ચર આપો +@msg textureImage: {e} textureImage: {e} +@msg that anchor can't slide: an end of an open path has nowhere to go તે એન્કર સરકી શકતું નથી: ખુલ્લા પાથના છેડાને જવા માટે કોઈ જગ્યા નથી +@msg that document is no longer open તે દસ્તાવેજ હવે ખુલ્લો નથી +@msg that makes more than {MAX_PIECES} slices તેનાથી {MAX_PIECES} થી વધુ સ્લાઇસ બને છે +@msg that makes too many bridges (at most 8000): lower the reach તેનાથી ઘણા બધા બ્રિજ બને છે (વધુમાં વધુ 8000): પહોંચ ઘટાડો +@msg that makes too many pieces (at most 100000) or dash steps: simplify the dash pattern or make the dashes longer તેનાથી ઘણા બધા ટુકડા (વધુમાં વધુ 100000) અથવા ડૅશ પગલાં બને છે: ડૅશ પેટર્ન સરળ બનાવો અથવા ડૅશ લાંબા કરો +@msg that object is not in the overlap તે ઑબ્જેક્ટ ઓવરલેપમાં નથી +@msg that plug-in isn't disabled (see plugin.safeMode) તે પ્લગ-ઇન નિષ્ક્રિય નથી (plugin.safeMode જુઓ) +@msg the .pcraft document has no full-size image or preview, and its layers can't be combined: {reason} .pcraft દસ્તાવેજમાં પૂર્ણ-કદની ઇમેજ કે પ્રીવ્યૂ નથી, અને તેના લેયર જોડી શકાતા નથી: {reason} +@msg the .pcraft document's canvas of {w} × {h} pixels is empty .pcraft દસ્તાવેજનો {w} × {h} પિક્સેલનો કેનવાસ ખાલી છે +@msg the .pcraft document's full-size image is {_1} × {_2} pixels, not {w} × {h} as its canvas .pcraft દસ્તાવેજની પૂર્ણ-કદની ઇમેજ {_1} × {_2} પિક્સેલ છે, તેના કેનવાસ જેટલી {w} × {h} નહીં +@msg the .pcraft document's preview isn't a PNG image .pcraft દસ્તાવેજનો પ્રીવ્યૂ PNG ઇમેજ નથી +@msg the .pcraft document's {what} isn't a PNG image .pcraft દસ્તાવેજનું {what} PNG ઇમેજ નથી +@msg the 3D dialog is gone 3D ડાયલોગ હવે નથી +@msg the element needs an id, the filter's name ઘટકને id જોઈએ, જે ફિલ્ટરનું નામ છે +@msg the Affinity document has no page with a size Affinity દસ્તાવેજમાં કદ ધરાવતું કોઈ પેજ નથી +@msg the CMYK image couldn't be written CMYK ઇમેજ લખી શકાઈ નહીં +@msg the Color Picker is not open રંગ પિકર ખુલ્લું નથી +@msg the DocumentPreset settings would hold more than {_1} bytes DocumentPreset સેટિંગ્સમાં {_1} બાઇટ કરતાં વધુ થઈ જશે +@msg the Flare Tool Options dialog is gone ફ્લેર ટૂલ વિકલ્પો ડાયલોગ હવે નથી +@msg the Flatten Transparency dialog is closed ટ્રાન્સપરન્સી ફ્લેટન કરો ડાયલોગ બંધ છે +@msg the HEIC or HEIF file can't be read HEIC અથવા HEIF ફાઇલ વાંચી શકાતી નથી +@msg the HEIC or HEIF file holds a kind of image that can't be read HEIC અથવા HEIF ફાઇલમાં એવા પ્રકારની ઇમેજ છે જે વાંચી શકાતી નથી +@msg the Indexed Color dialog is gone ઇન્ડેક્સ્ડ કલર ડાયલોગ હવે નથી +@msg the JPEG 2000 file can't be read JPEG 2000 ફાઇલ વાંચી શકાતી નથી +@msg the JPEG 2000 file has an unsupported color space or JPX content JPEG 2000 ફાઇલમાં અસમર્થિત કલર સ્પેસ અથવા JPX સામગ્રી છે +@msg the JPEG XL container is too large to read JPEG XL કન્ટેનર વાંચવા માટે ખૂબ મોટું છે +@msg the JPEG XL file can't be read: {e} JPEG XL ફાઇલ વાંચી શકાતી નથી: {e} +@msg the JPEG XL file is cut short JPEG XL ફાઇલ અધૂરી છે +@msg the Layers panel is not shown લેયર્સ પેનલ દેખાતી નથી +@msg the Layers panel's search, filter or Show Layers Only hides its row લેયર્સ પેનલની શોધ, ફિલ્ટર અથવા માત્ર લેયર બતાવો તેની પંક્તિ છુપાવે છે +@msg the New Document profile {profile} could not be read: {reason} નવા દસ્તાવેજની પ્રોફાઇલ {profile} વાંચી શકાઈ નહીં: {reason} +@msg the Objects on Path group is hidden or locked પાથ પરના ઑબ્જેક્ટ ગ્રૂપ છુપાયેલું અથવા લૉક છે +@msg the PCX file is cut short PCX ફાઇલ અધૂરી છે +@msg the PCX file's header is damaged PCX ફાઇલનું હેડર ખરાબ છે +@msg the PDF has no pages PDF માં કોઈ પેજ નથી +@msg the PDF is password-protected: give its password PDF પાસવર્ડથી સુરક્ષિત છે: તેનો પાસવર્ડ આપો +@msg the PDF password is wrong PDF પાસવર્ડ ખોટો છે +@msg the PDF security settings were saved without their passwords: give openPassword or permissionsPassword again, or security without passwordRequired to export unprotected PDF સુરક્ષા સેટિંગ્સ તેમના પાસવર્ડ વિના સાચવવામાં આવી હતી: openPassword અથવા permissionsPassword ફરીથી આપો, અથવા સુરક્ષા વિના એક્સપોર્ટ કરવા માટે passwordRequired વિના security આપો +@msg the PICT file is damaged PICT ફાઇલ ખરાબ છે +@msg the PSD file has an unknown colour mode ({m}) PSD ફાઇલમાં અજાણ્યો કલર મોડ છે ({m}) +@msg the PSD file is cut short PSD ફાઇલ અધૂરી છે +@msg the PSD file's header is damaged PSD ફાઇલનું હેડર ખરાબ છે +@msg the PSD file's image data can't be read: {e} PSD ફાઇલનો ઇમેજ ડેટા વાંચી શકાતો નથી: {e} +@msg the PSD file's image data uses an unknown compression ({m}) PSD ફાઇલનો ઇમેજ ડેટા અજાણ્યું કમ્પ્રેશન વાપરે છે ({m}) +@msg the PSD file's layer data uses an unknown compression ({m}) PSD ફાઇલનો લેયર ડેટા અજાણ્યું કમ્પ્રેશન વાપરે છે ({m}) +@msg the PSD file's layer groups are nested too deeply PSD ફાઇલના લેયર ગ્રૂપ ખૂબ ઊંડે નેસ્ટ થયેલા છે +@msg the PSD file's layer records are damaged PSD ફાઇલના લેયર રેકોર્ડ ખરાબ છે +@msg the PSD file's layers take more memory to read than allowed PSD ફાઇલના લેયર વાંચવામાં મંજૂર કરતાં વધુ મેમરી લાગે છે +@msg the PSD image is too large to read ({_1} × {_2} pixels) PSD ઇમેજ વાંચવા માટે ખૂબ મોટી છે ({_1} × {_2} પિક્સેલ) +@msg the Pixar file is cut short Pixar ફાઇલ અધૂરી છે +@msg the Pixar file's header is damaged Pixar ફાઇલનું હેડર ખરાબ છે +@msg the Pixar file's image data is damaged Pixar ફાઇલનો ઇમેજ ડેટા ખરાબ છે +@msg the Placement Options target is missing પ્લેસમેન્ટ વિકલ્પોનું લક્ષ્ય મળ્યું નહીં +@msg the Promise executor is not a function Promise executor ફંક્શન નથી +@msg the RGB policy can't be {_1} RGB નીતિ {_1} ન હોઈ શકે +@msg the RTF file has too many paragraphs or formatting changes to place as type (at most {MAX_PARAGRAPHS} paragraphs and {MAX_RUNS} runs) RTF ફાઇલમાં ટાઇપ તરીકે મૂકવા માટે ઘણા બધા ફકરા અથવા ફૉર્મેટિંગ ફેરફારો છે (વધુમાં વધુ {MAX_PARAGRAPHS} ફકરા અને {MAX_RUNS} રન) +@msg the RTF file is too large to place as type (at most {_1} MB) RTF ફાઇલ ટાઇપ તરીકે મૂકવા માટે ખૂબ મોટી છે (વધુમાં વધુ {_1} MB) +@msg the Recolor with Preset target is missing પ્રીસેટ વડે રંગ બદલો નું લક્ષ્ય મળ્યું નહીં +@msg the SVG Filter dialog is gone SVG ફિલ્ટર ડાયલોગ હવે નથી +@msg the SVG expands to more than {0} nested SVG images SVG {0} થી વધુ નેસ્ટેડ SVG ઇમેજમાં વિસ્તરે છે +@msg the SVG expands to more than {0} objects SVG {0} થી વધુ ઑબ્જેક્ટમાં વિસ્તરે છે +@msg the SVG expands to more than {0} objects, more than the {1} MB of memory available has room for SVG {0} થી વધુ ઑબ્જેક્ટમાં વિસ્તરે છે, જે ઉપલબ્ધ {1} MB મેમરીમાં સમાઈ શકે તેના કરતાં વધુ છે +@msg the SVG file is larger than {MAX_IMPORT_BYTES} bytes SVG ફાઇલ {MAX_IMPORT_BYTES} બાઇટ કરતાં મોટી છે +@msg the SVG filter can't be drawn: check its primitives and their inputs SVG ફિલ્ટર દોરી શકાતું નથી: તેના પ્રિમિટિવ અને તેમના ઇનપુટ તપાસો +@msg the SVG filter has no primitives SVG ફિલ્ટરમાં કોઈ પ્રિમિટિવ નથી +@msg the SVG filter is too large once its attributes are written out SVG ફિલ્ટરના એટ્રિબ્યુટ લખ્યા પછી તે ખૂબ મોટું થઈ જાય છે +@msg the SVG filter isn't valid XML: {e} SVG ફિલ્ટર માન્ય XML નથી: {e} +@msg the SVG has no drawable objects SVG માં દોરી શકાય તેવા કોઈ ઑબ્જેક્ટ નથી +@msg the SVG's elements are nested more than {0} deep SVG ના ઘટકો {0} સ્તરથી વધુ ઊંડે નેસ્ટ થયેલા છે +@msg the SVG's style sheets take too long to match SVG ની સ્ટાઇલ શીટ મેળવવામાં ખૂબ સમય લાગે છે +@msg the SVG's styles expand to more than {0} MB SVG ની સ્ટાઇલ {0} MB થી વધુમાં વિસ્તરે છે +@msg the SVGZ file unpacks to more than {_1} MB SVGZ ફાઇલ ખોલતાં {_1} MB થી વધુ થાય છે +@msg the Save PDF dialog is not open PDF સાચવો ડાયલોગ ખુલ્લો નથી +@msg the Swatch Options dialog is gone સ્વેચ વિકલ્પો ડાયલોગ હવે નથી +@msg the Transform Each dialog is closed દરેકને ટ્રાન્સફોર્મ કરો ડાયલોગ બંધ છે +@msg the Transform dialog is closed ટ્રાન્સફોર્મ ડાયલોગ બંધ છે +@msg the Transform dialog was replaced ટ્રાન્સફોર્મ ડાયલોગ બદલાઈ ગયો +@msg the Word document has more than {MAX_PAGES} pages of properties, too many to place Word દસ્તાવેજમાં ગુણધર્મોના {MAX_PAGES} થી વધુ પેજ છે, જે મૂકવા માટે ઘણા વધારે છે +@msg the Word document has more than {MAX_RUNS} runs of character or paragraph properties, too many to place Word દસ્તાવેજમાં અક્ષર અથવા ફકરાના ગુણધર્મોના {MAX_RUNS} થી વધુ રન છે, જે મૂકવા માટે ઘણા વધારે છે +@msg the Word document has more than {_1} MB of formatting properties, too many to place Word દસ્તાવેજમાં {_1} MB થી વધુ ફૉર્મેટિંગ ગુણધર્મો છે, જે મૂકવા માટે ઘણા વધારે છે +@msg the Word document has too much text or formatting to place as type (at most {MAX_PARAGRAPHS} paragraphs, {MAX_RUNS} runs and {_1} MB of text) Word દસ્તાવેજમાં ટાઇપ તરીકે મૂકવા માટે ઘણું વધારે ટેક્સ્ટ અથવા ફૉર્મેટિંગ છે (વધુમાં વધુ {MAX_PARAGRAPHS} ફકરા, {MAX_RUNS} રન અને {_1} MB ટેક્સ્ટ) +@msg the Word document has too much text to place as type (at most {_1} MB) Word દસ્તાવેજમાં ટાઇપ તરીકે મૂકવા માટે ઘણું વધારે ટેક્સ્ટ છે (વધુમાં વધુ {_1} MB) +@msg the Word document is encrypted or protected with a password; save it without one to place it Word દસ્તાવેજ એન્ક્રિપ્ટ થયેલો છે અથવા પાસવર્ડથી સુરક્ષિત છે; તેને મૂકવા માટે પાસવર્ડ વિના સાચવો +@msg the Word document is too large to place (its {name} stream holds more than {_1} MB) Word દસ્તાવેજ મૂકવા માટે ખૂબ મોટો છે (તેની {name} સ્ટ્રીમમાં {_1} MB થી વધુ છે) +@msg the Word document was last saved with fast save, which VectorCraft doesn't read; save it again with fast save turned off Word દસ્તાવેજ છેલ્લે fast save વડે સાચવાયો હતો, જે VectorCraft વાંચતું નથી; fast save બંધ કરીને તેને ફરીથી સાચવો +@msg the Word document was saved by Word 6.0 or Word 95, which VectorCraft doesn't read; save it as a Word 97-2003 document Word દસ્તાવેજ Word 6.0 અથવા Word 95 વડે સાચવાયો હતો, જે VectorCraft વાંચતું નથી; તેને Word 97-2003 દસ્તાવેજ તરીકે સાચવો +@msg the Word document's text is made of more than {MAX_PIECES} pieces, too many to place Word દસ્તાવેજનું ટેક્સ્ટ {MAX_PIECES} થી વધુ ટુકડાઓનું બનેલું છે, જે મૂકવા માટે ઘણા વધારે છે +@msg the XML operation needs an XML or XMLList value XML ઑપરેશનને XML અથવા XMLList મૂલ્ય જોઈએ +@msg the XPath expression does not evaluate to a node-set XPath એક્સપ્રેશનનું પરિણામ node-set નથી +@msg the XPath expression ends early XPath એક્સપ્રેશન વહેલું પૂરું થાય છે +@msg the XPath expression has an unmatched ) XPath એક્સપ્રેશનમાં મેળ વગરનો ) છે +@msg the XPath expression has an unmatched ] XPath એક્સપ્રેશનમાં મેળ વગરનો ] છે +@msg the XPath expression has an unmatched closing bracket XPath એક્સપ્રેશનમાં મેળ વગરનો બંધ કૌંસ છે +@msg the XPath expression selects a namespace node, which is not an XML value XPath એક્સપ્રેશન namespace નોડ પસંદ કરે છે, જે XML મૂલ્ય નથી +@msg the XPath expression selects the root node, which is not an XML value XPath એક્સપ્રેશન રૂટ નોડ પસંદ કરે છે, જે XML મૂલ્ય નથી +@msg the XPath function {name} needs a node-set XPath ફંક્શન {name} ને node-set જોઈએ +@msg the XPath function {name} takes the wrong number of arguments XPath ફંક્શન {name} ખોટી સંખ્યામાં આર્ગ્યુમેન્ટ લે છે +@msg the XPath name functions need a node-set XPath નામ ફંક્શનને node-set જોઈએ +@msg the XPath prefix {shown} is not bound to a namespace XPath પ્રિફિક્સ {shown} કોઈ namespace સાથે બંધાયેલ નથી +@msg the XPath variable ${shown} is not bound XPath વેરિએબલ ${shown} બંધાયેલ નથી +@msg the action already has 10,000 steps ક્રિયામાં પહેલેથી 10,000 પગલાં છે +@msg the action has no included steps ક્રિયામાં કોઈ સમાવિષ્ટ પગલાં નથી +@msg the action has no steps ક્રિયામાં કોઈ પગલાં નથી +@msg the action set file can't be read in full ક્રિયા સેટ ફાઇલ પૂરી વાંચી શકાતી નથી +@msg the action set file holds more than 1,000 actions ક્રિયા સેટ ફાઇલમાં 1,000 થી વધુ ક્રિયાઓ છે +@msg the action set file is larger than 8 MiB ક્રિયા સેટ ફાઇલ 8 MiB કરતાં મોટી છે +@msg the action set file needs a later version of VectorCraft ક્રિયા સેટ ફાઇલને VectorCraft નું નવું વર્ઝન જોઈએ +@msg the action set names are not a list ક્રિયા સેટનાં નામો યાદી નથી +@msg the action set would be larger than 8 MiB ક્રિયા સેટ 8 MiB કરતાં મોટો થઈ જશે +@msg the action sets changed; nothing was deleted ક્રિયા સેટ બદલાઈ ગયા; કંઈ કાઢી નખાયું નથી +@msg the action stopped playing: its document is no longer active ક્રિયા ચાલતી બંધ થઈ: તેનો દસ્તાવેજ હવે સક્રિય નથી +@msg the action “{_1}” has no included steps ક્રિયા “{_1}” માં કોઈ સમાવિષ્ટ પગલાં નથી +@msg the action “{_1}” sets the folder preference {_2}; delete that step to save the set ક્રિયા “{_1}” ફોલ્ડર પસંદગી {_2} સેટ કરે છે; સેટ સાચવવા માટે તે પગલું કાઢી નાખો +@msg the active document changed while the question was open; nothing was deleted પ્રશ્ન ખુલ્લો હતો ત્યારે સક્રિય દસ્તાવેજ બદલાયો; કંઈ કાઢી નખાયું નથી +@msg the active fill or stroke is drawn through an opacity mask: give `color` સક્રિય ભરણ અથવા સ્ટ્રોક ઓપેસિટી માસ્ક દ્વારા દોરાય છે: `color` આપો +@msg the active fill or stroke is hidden: give `color` સક્રિય ભરણ અથવા સ્ટ્રોક છુપાયેલું છે: `color` આપો +@msg the active paint is not a gradient સક્રિય પેઇન્ટ ગ્રેડિયન્ટ નથી +@msg the argument list is not an object આર્ગ્યુમેન્ટ યાદી ઑબ્જેક્ટ નથી +@msg the array buffer is too large એરે બફર ખૂબ મોટું છે +@msg the array's length is read-only એરેની લંબાઈ ફક્ત વાંચવા માટે છે +@msg the art behind the selection is not one color where it is read, and the color blends with it: give `against` પસંદગી પાછળનું આર્ટ જ્યાં વંચાય છે ત્યાં એક રંગનું નથી, અને રંગ તેની સાથે ભળે છે: `against` આપો +@msg the art could not be sampled આર્ટનું સેમ્પલ લઈ શકાયું નહીં +@msg the art has no bounds આર્ટની કોઈ બાઉન્ડ્સ નથી +@msg the art is too light for any dots આર્ટ કોઈ પણ ટપકાં માટે ખૂબ આછું છે +@msg the art of a graph design in a graph series is drawn again from the design: edit the design to change it ગ્રાફ સિરીઝમાં ગ્રાફ ડિઝાઇનનું આર્ટ ડિઝાઇનમાંથી ફરી દોરાય છે: તેને બદલવા માટે ડિઝાઇન સંપાદિત કરો +@msg the art on them differs from the page's in {_1}% of it તેમના પરનું આર્ટ પેજના આર્ટથી {_1}% ભાગમાં જુદું છે +@msg the artboard is locked આર્ટબોર્ડ લૉક છે +@msg the artboard to fit must be a positive size up to {_1} pt ફિટ કરવાનું આર્ટબોર્ડ {_1} pt સુધીનું ધન કદ હોવું જોઈએ +@msg the artboards don't fit on the canvas: fewer artboards, less spacing or a smaller size આર્ટબોર્ડ કેનવાસ પર સમાતાં નથી: ઓછાં આર્ટબોર્ડ, ઓછું અંતર અથવા નાનું કદ રાખો +@msg the artwork is too large for EPS: what follows 256 MB of PostScript was left out આર્ટવર્ક EPS માટે ખૂબ મોટું છે: PostScript ના 256 MB પછીનું છોડી દેવાયું +@msg the background worker stopped બૅકગ્રાઉન્ડ વર્કર બંધ થઈ ગયો +@msg the banner has no width or height બેનરની કોઈ પહોળાઈ કે ઊંચાઈ નથી +@msg the blend has no spine બ્લેન્ડની કોઈ સ્પાઇન નથી +@msg the bridged circles are too complex to unite બ્રિજ કરેલાં વર્તુળો જોડવા માટે ખૂબ જટિલ છે +@msg the buffer's length must be a multiple of {size} બફરની લંબાઈ {size} નો ગુણાંક હોવી જોઈએ +@msg the built version is empty બનાવેલું વર્ઝન ખાલી છે +@msg the built version was already selected બનાવેલું વર્ઝન પહેલેથી પસંદ થયેલું હતું +@msg the byte offset is past the end of the buffer બાઇટ ઑફસેટ બફરના અંતથી આગળ છે +@msg the byte offset of a {_1} must be a multiple of {size} {_1} નો બાઇટ ઑફસેટ {size} નો ગુણાંક હોવો જોઈએ +@msg the character at byte {start} is not drawn: it falls before its path's start બાઇટ {start} પરનો અક્ષર દોરાતો નથી: તે તેના પાથની શરૂઆત પહેલાં આવે છે +@msg the character's size can't be measured અક્ષરનું કદ માપી શકાતું નથી +@msg the characters of threaded type can't be changed થ્રેડેડ ટાઇપના અક્ષરો બદલી શકાતા નથી +@msg the characters of type with ruby can't be changed રૂબી સાથેના ટાઇપના અક્ષરો બદલી શકાતા નથી +@msg the circle is too small to draw at these coordinates આ કોઑર્ડિનેટ પર દોરવા માટે વર્તુળ ખૂબ નાનું છે +@msg the circle that matches the path there would reach past the canvas ત્યાં પાથ સાથે મેળ ખાતું વર્તુળ કેનવાસની બહાર પહોંચી જશે +@msg the circles are too far apart for this gap આ ગૅપ માટે વર્તુળો એકબીજાથી ખૂબ દૂર છે +@msg the circles are too far apart for this gap: raise the gap આ ગૅપ માટે વર્તુળો એકબીજાથી ખૂબ દૂર છે: ગૅપ વધારો +@msg the circles are too far apart for this radius આ ત્રિજ્યા માટે વર્તુળો એકબીજાથી ખૂબ દૂર છે +@msg the circles are too far apart for this radius: raise the radius આ ત્રિજ્યા માટે વર્તુળો એકબીજાથી ખૂબ દૂર છે: ત્રિજ્યા વધારો +@msg the code runs past its last instruction કોડ તેની છેલ્લી સૂચનાથી આગળ ચાલે છે +@msg the color book holds more than {ASE_MAX_ENTRIES} colors કલર બુકમાં {ASE_MAX_ENTRIES} થી વધુ રંગો છે +@msg the color book is cut short કલર બુક અધૂરી છે +@msg the color book's names take more than {_1} MB કલર બુકનાં નામો {_1} MB થી વધુ જગ્યા લે છે +@msg the color mask's settings are out of range કલર માસ્કની સેટિંગ્સ શ્રેણીની બહાર છે +@msg the combined layers don't fit the canvas જોડેલાં લેયર કેનવાસમાં સમાતાં નથી +@msg the command made no object આદેશે કોઈ ઑબ્જેક્ટ બનાવ્યો નથી +@msg the composite fonts make a file larger than 4 MB, which Import can't read; export fewer of them કમ્પોઝિટ ફોન્ટ્સથી 4 MB કરતાં મોટી ફાઇલ બને છે, જે ઇમ્પોર્ટ વાંચી શકતું નથી; તેમાંથી ઓછા એક્સપોર્ટ કરો +@msg the compound shape is too complex to expand કમ્પાઉન્ડ શેપ વિસ્તૃત કરવા માટે ખૂબ જટિલ છે +@msg the compressed file unpacks to more than VectorCraft reads ({_1} MB of document, {_2} MB per image) કમ્પ્રેસ કરેલી ફાઇલ ખોલતાં VectorCraft વાંચે તેના કરતાં વધુ થાય છે ({_1} MB દસ્તાવેજ, દરેક ઇમેજ દીઠ {_2} MB) +@msg the container of the listed objects is gone યાદીમાંના ઑબ્જેક્ટનું કન્ટેનર હવે નથી +@msg the control {_1} cannot be clicked કંટ્રોલ {_1} ક્લિક કરી શકાતું નથી +@msg the control {_1} cannot take that change કંટ્રોલ {_1} તે ફેરફાર સ્વીકારી શકતું નથી +@msg the control {_1} is disabled or hidden કંટ્રોલ {_1} નિષ્ક્રિય અથવા છુપાયેલું છે +@msg the copies would hold more than {MAX_COPIED_OBJECTS} objects નકલોમાં {MAX_COPIED_OBJECTS} થી વધુ ઑબ્જેક્ટ થઈ જશે +@msg the copy `{user_id}` can't be read as a library નકલ `{user_id}` લાઇબ્રેરી તરીકે વાંચી શકાતી નથી +@msg the copy was not made નકલ બની નથી +@msg the copy would leave the canvas નકલ કેનવાસની બહાર જશે +@msg the curve tolerance must be from 0.01 to 10 points કર્વ ટોલરન્સ 0.01 થી 10 પોઇન્ટ વચ્ચે હોવું જોઈએ +@msg the custom dictionary couldn't be saved to {_1}: {e} કસ્ટમ ડિક્શનરી {_1} માં સાચવી શકાઈ નહીં: {e} +@msg the custom dictionary {_1} can't be read ({why}), so it is left as it is કસ્ટમ ડિક્શનરી {_1} વાંચી શકાતી નથી ({why}), તેથી તેને એમ જ રહેવા દીધી છે +@msg the cut cannot be made on this art: {e} આ આર્ટ પર કટ કરી શકાતો નથી: {e} +@msg the data isn't an EMF or WMF picture ડેટા EMF અથવા WMF ચિત્ર નથી +@msg the data isn't an EPS or PostScript picture ડેટા EPS અથવા PostScript ચિત્ર નથી +@msg the data set is in another document ડેટા સેટ બીજા દસ્તાવેજમાં છે +@msg the data set was not made ડેટા સેટ બન્યો નથી +@msg the decoded samples don't fit the image ડીકોડ કરેલાં સેમ્પલ ઇમેજમાં સમાતાં નથી +@msg the deferred paste is no longer available વિલંબિત પેસ્ટ હવે ઉપલબ્ધ નથી +@msg the design is too big to draw at every data point of this graph આ ગ્રાફના દરેક ડેટા પોઇન્ટ પર દોરવા માટે ડિઝાઇન ખૂબ મોટી છે +@msg the design is too big to draw in every column of this graph આ ગ્રાફના દરેક કૉલમમાં દોરવા માટે ડિઝાઇન ખૂબ મોટી છે +@msg the device to simulate is the CMYK profile `{name}`, which is not loaded સિમ્યુલેટ કરવાનું ડિવાઇસ CMYK પ્રોફાઇલ `{name}` છે, જે લોડ થયેલી નથી +@msg the device to simulate is the RGB profile `{name}`, which is not loaded સિમ્યુલેટ કરવાનું ડિવાઇસ RGB પ્રોફાઇલ `{name}` છે, જે લોડ થયેલી નથી +@msg the dialog has no Reset ડાયલોગમાં રીસેટ નથી +@msg the dialog has no control named {_1} ડાયલોગમાં {_1} નામનો કોઈ કંટ્રોલ નથી +@msg the dialog has no control {id} ડાયલોગમાં કોઈ કંટ્રોલ {id} નથી +@msg the dialog has no fields ડાયલોગમાં કોઈ ફીલ્ડ નથી +@msg the dialog host isn't available ડાયલોગ હોસ્ટ ઉપલબ્ધ નથી +@msg the dialog is closed ડાયલોગ બંધ છે +@msg the dialog is gone ડાયલોગ હવે નથી +@msg the dialog is not open ડાયલોગ ખુલ્લો નથી +@msg the dialog refuses OK while a dialog open over it waits for its answer તેના ઉપર ખુલેલો ડાયલોગ જવાબની રાહ જુએ છે ત્યાં સુધી ડાયલોગ ઠીક સ્વીકારતો નથી +@msg the dictionary stack overflowed ડિક્શનરી સ્ટૅક ઓવરફ્લો થયો +@msg the document already has an SVG filter named {name} દસ્તાવેજમાં પહેલેથી {name} નામનું SVG ફિલ્ટર છે +@msg the document has another SVG filter named {name}: use svgFilter.apply, or svgFilter.define with `replace` to edit it દસ્તાવેજમાં {name} નામનું બીજું SVG ફિલ્ટર છે: svgFilter.apply વાપરો, અથવા તેને સંપાદિત કરવા `replace` સાથે svgFilter.define વાપરો +@msg the document has never been saved દસ્તાવેજ ક્યારેય સાચવાયો નથી +@msg the document has never been saved: give `folder` દસ્તાવેજ ક્યારેય સાચવાયો નથી: `folder` આપો +@msg the document has no Kinsoku set named '{shown}' દસ્તાવેજમાં '{shown}' નામનો કોઈ Kinsoku સેટ નથી +@msg the document has no SVG filter named {name} દસ્તાવેજમાં {name} નામનું કોઈ SVG ફિલ્ટર નથી +@msg the document has no SVG filter named {r} દસ્તાવેજમાં {r} નામનું કોઈ SVG ફિલ્ટર નથી +@msg the document has no artboard દસ્તાવેજમાં કોઈ આર્ટબોર્ડ નથી +@msg the document has no artboards દસ્તાવેજમાં એક પણ આર્ટબોર્ડ નથી +@msg the document has no brushes to save દસ્તાવેજમાં સાચવવા માટે કોઈ બ્રશ નથી +@msg the document has no color swatches દસ્તાવેજમાં કોઈ રંગ સ્વેચ નથી +@msg the document has no pattern {pattern} દસ્તાવેજમાં પેટર્ન {pattern} નથી +@msg the document has no patterns દસ્તાવેજમાં કોઈ પેટર્ન નથી +@msg the document has no slices દસ્તાવેજમાં કોઈ સ્લાઇસ નથી +@msg the document has no swatch {n} દસ્તાવેજમાં સ્વેચ {n} નથી +@msg the document has no symbols દસ્તાવેજમાં કોઈ સિમ્બોલ નથી +@msg the document has no symbols to save દસ્તાવેજમાં સાચવવા માટે કોઈ સિમ્બોલ નથી +@msg the document has no tag ids left દસ્તાવેજમાં કોઈ ટૅગ id બાકી નથી +@msg the document has unsaved changes and no file to save them to: save it with saveAs first, or close with SaveOptions.DONOTSAVECHANGES દસ્તાવેજમાં ન સાચવેલા ફેરફારો છે અને તેમને સાચવવા માટે કોઈ ફાઇલ નથી: પહેલાં તેને saveAs વડે સાચવો, અથવા SaveOptions.DONOTSAVECHANGES સાથે બંધ કરો +@msg the document has unsaved changes: save them first, or close with SaveOptions.SAVECHANGES or SaveOptions.DONOTSAVECHANGES દસ્તાવેજમાં ન સાચવેલા ફેરફારો છે: પહેલાં તેમને સાચવો, અથવા SaveOptions.SAVECHANGES કે SaveOptions.DONOTSAVECHANGES સાથે બંધ કરો +@msg the document has {count} slices, more than the {MAX_SLICES} a PSD file holds દસ્તાવેજમાં {count} સ્લાઇસ છે, જે PSD ફાઇલમાં સમાતી {MAX_SLICES} કરતાં વધુ છે +@msg the document information the plug-in asks for is too large to hand over: at most {MAX_CONTEXT_ITEMS} artboards, layers and swatches in {MAX_CONTEXT_BYTES} bytes પ્લગ-ઇન જે દસ્તાવેજ માહિતી માગે છે તે સોંપવા માટે ખૂબ મોટી છે: {MAX_CONTEXT_BYTES} બાઇટમાં વધુમાં વધુ {MAX_CONTEXT_ITEMS} આર્ટબોર્ડ, લેયર અને સ્વેચ +@msg the document is too large to save compressed ({0}): save it with Use Compression off દસ્તાવેજ કમ્પ્રેસ કરીને સાચવવા માટે ખૂબ મોટો છે ({0}): કમ્પ્રેશન વાપરો બંધ રાખીને તેને સાચવો +@msg the document it was dropped on was closed જે દસ્તાવેજ પર તે ડ્રોપ કરાયું હતું તે બંધ થઈ ગયો +@msg the document it was dropped on was reverted જે દસ્તાવેજ પર તે ડ્રોપ કરાયું હતું તે રિવર્ટ થઈ ગયો +@msg the document it was prepared for is no longer active જે દસ્તાવેજ માટે તે તૈયાર કરાયું હતું તે હવે સક્રિય નથી +@msg the document the symbol came from is no longer open સિમ્બોલ જે દસ્તાવેજમાંથી આવ્યું હતું તે હવે ખુલ્લો નથી +@msg the document was switched or reverted દસ્તાવેજ બદલાયો અથવા રિવર્ટ થયો +@msg the document where this style was opened has closed જે દસ્તાવેજમાં આ સ્ટાઇલ ખોલી હતી તે બંધ થઈ ગયો છે +@msg the document's color mode is {_1}, not RGB દસ્તાવેજનો કલર મોડ {_1} છે, RGB નહીં +@msg the document's swatches hold {_1} colors; the document reduction takes at most 255 દસ્તાવેજના સ્વેચમાં {_1} રંગો છે; દસ્તાવેજ રિડક્શન વધુમાં વધુ 255 લે છે +@msg the drawing has no layout `{_1}` (it has {_2}) ડ્રોઇંગમાં લેઆઉટ `{_1}` નથી (તેમાં {_2} છે) +@msg the drawing is too large to open ડ્રોઇંગ ખોલવા માટે ખૂબ મોટું છે +@msg the editing data's hash has no place એડિટિંગ ડેટાના હેશ માટે કોઈ જગ્યા નથી +@msg the end is not a straight line or a circular arc છેડો સીધી રેખા કે વર્તુળાકાર આર્ક નથી +@msg the entities the document declares expand to too much text દસ્તાવેજ જાહેર કરે છે તે એન્ટિટી ઘણા વધારે ટેક્સ્ટમાં વિસ્તરે છે +@msg the envelope dialog is gone એન્વેલોપ ડાયલોગ હવે નથી +@msg the envelope's content has no bounds એન્વેલોપની સામગ્રીની કોઈ બાઉન્ડ્સ નથી +@msg the envelope's mesh is malformed એન્વેલોપનો મેશ ખોટી રીતે બનેલો છે +@msg the event's target is not a ScriptUI window or control ઇવેન્ટનું લક્ષ્ય ScriptUI વિન્ડો કે કંટ્રોલ નથી +@msg the export region is empty એક્સપોર્ટ વિસ્તાર ખાલી છે +@msg the export region is not finite એક્સપોર્ટ વિસ્તાર સીમિત નથી +@msg the export returned unreadable data એક્સપોર્ટે ન વાંચી શકાય તેવો ડેટા પાછો આપ્યો +@msg the export wrote no file એક્સપોર્ટે કોઈ ફાઇલ લખી નથી +@msg the file has no version VectorCraft reads ફાઇલમાં VectorCraft વાંચે તેવું કોઈ વર્ઝન નથી +@msg the file has {count} slices, more than the {MAX_SLICES} read ફાઇલમાં {count} સ્લાઇસ છે, જે વંચાતી {MAX_SLICES} કરતાં વધુ છે +@msg the file holds more than {COMPOSITE_FONTS_MAX} composite fonts ફાઇલમાં {COMPOSITE_FONTS_MAX} થી વધુ કમ્પોઝિટ ફોન્ટ્સ છે +@msg the file holds no `variableSets` element ફાઇલમાં કોઈ `variableSets` ઘટક નથી +@msg the file holds no composite fonts ફાઇલમાં કોઈ કમ્પોઝિટ ફોન્ટ નથી +@msg the file holds no preferences ફાઇલમાં કોઈ પસંદગીઓ નથી +@msg the file holds only a placeholder page, not its art (it was saved without PDF compatibility): save it again with PDF compatibility on, or as PDF or SVG ફાઇલમાં ફક્ત એક પ્લેસહોલ્ડર પેજ છે, તેનું આર્ટ નહીં (તે PDF સુસંગતતા વિના સાચવાઈ હતી): PDF સુસંગતતા ચાલુ રાખીને તેને ફરીથી સાચવો, અથવા PDF કે SVG તરીકે સાચવો +@msg the file holds two composite fonts named `{_1}` ફાઇલમાં `{_1}` નામના બે કમ્પોઝિટ ફોન્ટ છે +@msg the file holds two presets named `{name}` ફાઇલમાં `{name}` નામના બે પ્રીસેટ છે +@msg the file holds {_1} presets, more than {TRACE_PRESET_MAX_COUNT} ફાઇલમાં {_1} પ્રીસેટ છે, જે {TRACE_PRESET_MAX_COUNT} કરતાં વધુ છે +@msg the file is larger than 1 MB ફાઇલ 1 MB કરતાં મોટી છે +@msg the file is larger than 4 MB ફાઇલ 4 MB કરતાં મોટી છે +@msg the file is larger than the {MAX_INPUT_BYTES} bytes an importer reads ફાઇલ ઇમ્પોર્ટર વાંચે તેવા {MAX_INPUT_BYTES} બાઇટ કરતાં મોટી છે +@msg the file is larger than {_1} MB ફાઇલ {_1} MB કરતાં મોટી છે +@msg the file is larger than {_1} MiB ફાઇલ {_1} MiB કરતાં મોટી છે +@msg the file is no longer in the plug-in store ફાઇલ હવે પ્લગ-ઇન સ્ટોરમાં નથી +@msg the file is not an XMP metadata template ફાઇલ XMP મેટાડેટા ટેમ્પ્લેટ નથી +@msg the file is too large ફાઇલ ખૂબ મોટી છે +@msg the file is version {n}, made by a newer VectorCraft ફાઇલ વર્ઝન {n} છે, જે નવા VectorCraft વડે બનાવેલી છે +@msg the file isn't valid SVG: {e} ફાઇલ માન્ય SVG નથી: {e} +@msg the file names no device to simulate ફાઇલમાં સિમ્યુલેટ કરવાના ડિવાઇસનું નામ નથી +@msg the file names no plate ફાઇલમાં કોઈ પ્લેટનું નામ નથી +@msg the file names no rendering intent ફાઇલમાં કોઈ રેન્ડરિંગ ઇન્ટેન્ટનું નામ નથી +@msg the file stopped being read (please report this bug) ફાઇલનું વાંચન અટકી ગયું (કૃપા કરીને આ બગની જાણ કરો) +@msg the file was saved by a newer version of VectorCraft (version {v}) ફાઇલ VectorCraft ના નવા વર્ઝન વડે સાચવવામાં આવી હતી (વર્ઝન {v}) +@msg the file was updated or encrypted already ફાઇલ પહેલેથી અપડેટ અથવા એન્ક્રિપ્ટ થયેલી હતી +@msg the file would be larger than {_1} MiB: export fewer with `names` ફાઇલ {_1} MiB કરતાં મોટી થઈ જશે: `names` વડે ઓછા એક્સપોર્ટ કરો +@msg the file's preview header points outside the file ફાઇલનું પ્રીવ્યૂ હેડર ફાઇલની બહાર નિર્દેશ કરે છે +@msg the file's version {v} is newer than this version of VectorCraft reads ({TRACE_PRESET_VERSION}) ફાઇલનું વર્ઝન {v} VectorCraft નું આ વર્ઝન વાંચે છે તેના કરતાં નવું છે ({TRACE_PRESET_VERSION}) +@msg the file's {added} new presets would make more than {TRACE_PRESET_MAX_COUNT} saved tracing presets: delete some first ફાઇલના {added} નવા પ્રીસેટથી સાચવેલા ટ્રેસિંગ પ્રીસેટ્સ {TRACE_PRESET_MAX_COUNT} કરતાં વધુ થઈ જશે: પહેલાં કેટલાક કાઢી નાખો +@msg the files come to more than 1 GB: add fewer at a time ફાઇલો કુલ 1 GB કરતાં વધુ થાય છે: એક સમયે ઓછી ઉમેરો +@msg the first argument of DataView must be an ArrayBuffer DataView નું પહેલું આર્ગ્યુમેન્ટ ArrayBuffer હોવું જોઈએ +@msg the first character of a line has no character before it to kern: it moves only up and down (dy) લાઇનના પહેલા અક્ષર પહેલાં કર્ન કરવા માટે કોઈ અક્ષર નથી: તે ફક્ત ઉપર અને નીચે ખસે છે (dy) +@msg the font {_1} is not available ફોન્ટ {_1} ઉપલબ્ધ નથી +@msg the format has no file extension ફૉર્મેટનું કોઈ ફાઇલ એક્સ્ટેન્શન નથી +@msg the function's prototype is not an object ફંક્શનનો prototype ઑબ્જેક્ટ નથી +@msg the generator is already running જનરેટર પહેલેથી ચાલી રહ્યું છે +@msg the generator returned no objects જનરેટરે કોઈ ઑબ્જેક્ટ પાછા આપ્યા નથી +@msg the generator's art is larger than the {MAX_ART_BYTES} bytes a generated art object keeps જનરેટરનું આર્ટ, જનરેટેડ આર્ટ ઑબ્જેક્ટ રાખી શકે તેવા {MAX_ART_BYTES} બાઇટ કરતાં મોટું છે +@msg the graphic can't be read: {e} ગ્રાફિક વાંચી શકાતું નથી: {e} +@msg the graphic is empty ગ્રાફિક ખાલી છે +@msg the graphic style target is missing ગ્રાફિક સ્ટાઇલનું લક્ષ્ય મળ્યું નહીં +@msg the graphic's data is damaged ગ્રાફિકનો ડેટા ખરાબ છે +@msg the graphic's document has no artboard ગ્રાફિકના દસ્તાવેજમાં કોઈ આર્ટબોર્ડ નથી +@msg the graphics could not be drawn ગ્રાફિક્સ દોરી શકાયાં નહીં +@msg the graphics need more than {MAX_TEXTURE_PIXELS} pixels of textures: lower textureSize (now {size}) ગ્રાફિક્સને {MAX_TEXTURE_PIXELS} થી વધુ પિક્સેલનાં ટેક્સ્ચર જોઈએ છે: textureSize ઘટાડો (હાલ {size}) +@msg the grommet inset is too large for the banner ગ્રોમેટનું અંદરની બાજુનું અંતર બેનર માટે ખૂબ મોટું છે +@msg the guide is hidden or locked ગાઇડ છુપાયેલી અથવા લૉક છે +@msg the guide is on a hidden or locked layer ગાઇડ છુપાયેલા અથવા લૉક લેયર પર છે +@msg the hem is too deep for the banner વાળેલી કિનારી બેનર માટે ખૂબ ઊંડી છે +@msg the host class {_1} describes the member {name} twice હોસ્ટ ક્લાસ {_1} સભ્ય {name} નું બે વાર વર્ણન કરે છે +@msg the host class {_1} describes {name}, which is not one of its members હોસ્ટ ક્લાસ {_1}, {name} નું વર્ણન કરે છે, જે તેના સભ્યોમાંથી એક નથી +@msg the host class {_1} is defined twice હોસ્ટ ક્લાસ {_1} બે વાર વ્યાખ્યાયિત છે +@msg the host class {_1} names a member constructor, which is the name of its constructor હોસ્ટ ક્લાસ {_1} સભ્ય constructor નું નામ આપે છે, જે તેના કન્સ્ટ્રક્ટરનું નામ છે +@msg the host class {_1} names the member {name} twice હોસ્ટ ક્લાસ {_1} સભ્ય {name} નું નામ બે વાર આપે છે +@msg the host class {p} is not defined હોસ્ટ ક્લાસ {p} વ્યાખ્યાયિત નથી +@msg the image `{path}` isn't followed: {r} ઇમેજ `{path}` અનુસરાઈ નથી: {r} +@msg the image can't be read as a texture ઇમેજ ટેક્સ્ચર તરીકે વાંચી શકાતી નથી +@msg the image has no embedded pixels ઇમેજમાં કોઈ એમ્બેડ કરેલા પિક્સેલ નથી +@msg the image has no usable size or position ઇમેજનું કોઈ વાપરી શકાય તેવું કદ કે સ્થિતિ નથી +@msg the image is empty ઇમેજ ખાલી છે +@msg the image is fully transparent ઇમેજ સંપૂર્ણ પારદર્શક છે +@msg the image is not on an artboard; pass rect ઇમેજ આર્ટબોર્ડ પર નથી; rect આપો +@msg the image is too large to change ઇમેજ બદલવા માટે ખૂબ મોટી છે +@msg the image is too large to draw ઇમેજ દોરવા માટે ખૂબ મોટી છે +@msg the image is {iw} × {ih} pixels and the artboard at that width is {rw} × {rh} pixels: their proportions differ ઇમેજ {iw} × {ih} પિક્સેલ છે અને તે પહોળાઈ પર આર્ટબોર્ડ {rw} × {rh} પિક્સેલ છે: તેમનાં પ્રમાણ જુદાં છે +@msg the image is {width} × {height} pixels, more than Image Trace takes ({max} megapixels) ઇમેજ {width} × {height} પિક્સેલ છે, જે ઇમેજ ટ્રેસ લે છે તેના કરતાં વધુ ({max} મેગાપિક્સેલ) +@msg the image would be {w} × {h} pixels; raster exports are limited to {MAX_RASTER_SIDE} pixels per side and {_1} megapixels: lower the scale or resolution ઇમેજ {w} × {h} પિક્સેલ થશે; રાસ્ટર એક્સપોર્ટ દરેક બાજુ {MAX_RASTER_SIDE} પિક્સેલ અને {_1} મેગાપિક્સેલ સુધી મર્યાદિત છે: સ્કેલ અથવા રિઝોલ્યુશન ઘટાડો +@msg the image's pixels are missing ઇમેજના પિક્સેલ ખૂટે છે +@msg the image's pixels aren't in the document ઇમેજના પિક્સેલ દસ્તાવેજમાં નથી +@msg the image's pixels can't be read ઇમેજના પિક્સેલ વાંચી શકાતા નથી +@msg the image's pixels can't be read: {e} ઇમેજના પિક્સેલ વાંચી શકાતા નથી: {e} +@msg the image's pixels don't match its size ઇમેજના પિક્સેલ તેના કદ સાથે મેળ ખાતા નથી +@msg the image's proportions leave no size with both sides between 0.1 and 1000000 pt ઇમેજનાં પ્રમાણથી એવું કોઈ કદ બનતું નથી જેની બંને બાજુ 0.1 અને 1000000 pt વચ્ચે હોય +@msg the image's size can't be read ઇમેજનું કદ વાંચી શકાતું નથી +@msg the image's transparency doesn't fit it ઇમેજની પારદર્શિતા તેમાં બંધબેસતી નથી +@msg the images hold more than {MAX_PIXEL_BYTES} bytes of pixels ઇમેજમાં {MAX_PIXEL_BYTES} બાઇટથી વધુ પિક્સેલ છે +@msg the import did not answer ઇમ્પોર્ટે જવાબ આપ્યો નહીં +@msg the import walked more layer lists than the test allows ઇમ્પોર્ટ ટેસ્ટ મંજૂર કરે તેના કરતાં વધુ લેયર યાદીઓમાંથી પસાર થયું +@msg the importer returned no objects ઇમ્પોર્ટરે કોઈ ઑબ્જેક્ટ પાછા આપ્યા નથી +@msg the iterator has no throw method ઇટરેટરમાં throw મેથડ નથી +@msg the iterator is not an object ઇટરેટર ઑબ્જેક્ટ નથી +@msg the iterator result is not an object ઇટરેટરનું પરિણામ ઑબ્જેક્ટ નથી +@msg the iterator's return gave something that is not an object ઇટરેટરના return એ એવું કંઈક આપ્યું જે ઑબ્જેક્ટ નથી +@msg the iterator's return is not a function ઇટરેટરનું return ફંક્શન નથી +@msg the iterator's {name} is not a function ઇટરેટરનું {name} ફંક્શન નથી +@msg the job would print more than {MAX_PAGES} pages જૉબ {MAX_PAGES} થી વધુ પેજ છાપશે +@msg the job would print more than {_1} pages જૉબ {_1} થી વધુ પેજ છાપશે +@msg the key store can't read or keep the key કી સ્ટોર કી વાંચી કે રાખી શકતો નથી +@msg the key store failed ({e}) કી સ્ટોર નિષ્ફળ ગયો ({e}) +@msg the key store is locked or can't be reached ({e}) કી સ્ટોર લૉક છે અથવા તેના સુધી પહોંચી શકાતું નથી ({e}) +@msg the layer has no objects to clip by લેયરમાં ક્લિપ કરવા માટે કોઈ ઑબ્જેક્ટ નથી +@msg the layer or group is hidden or locked લેયર અથવા ગ્રૂપ છુપાયેલું અથવા લૉક છે +@msg the layer or group is locked લેયર અથવા ગ્રૂપ લૉક છે +@msg the layer to flatten into is hidden જેમાં ફ્લેટન કરવાનું છે તે લેયર છુપાયેલું છે +@msg the layers hold no art to mask લેયરમાં માસ્ક કરવા માટે કોઈ આર્ટ નથી +@msg the layout moved લેઆઉટ ખસી ગયું +@msg the length cannot be redefined length ફરીથી વ્યાખ્યાયિત કરી શકાતી નથી +@msg the library has a group `{name}` already લાઇબ્રેરીમાં પહેલેથી `{name}` ગ્રૂપ છે +@msg the library has another item of that kind named `{name}` લાઇબ્રેરીમાં `{name}` નામની તે પ્રકારની બીજી આઇટમ છે +@msg the library has no group `{name}` લાઇબ્રેરીમાં `{name}` ગ્રૂપ નથી +@msg the library has no item `{item}` લાઇબ્રેરીમાં `{item}` આઇટમ નથી +@msg the library has no item `{other}` લાઇબ્રેરીમાં `{other}` આઇટમ નથી +@msg the library holds {MAX_GROUPS} groups already લાઇબ્રેરીમાં પહેલેથી {MAX_GROUPS} ગ્રૂપ છે +@msg the library holds {MAX_ITEMS} items of this kind already લાઇબ્રેરીમાં આ પ્રકારની પહેલેથી {MAX_ITEMS} આઇટમ છે +@msg the library item is damaged લાઇબ્રેરી આઇટમ ખરાબ છે +@msg the library's file is outside the read roots લાઇબ્રેરીની ફાઇલ વાંચવાનાં મૂળ ફોલ્ડરોની બહાર છે +@msg the lines and labels in graph group {_1} have different appearance rows: pass `aligned: true` or their ids ગ્રાફ ગ્રૂપ {_1} ની રેખાઓ અને લેબલમાં જુદી જુદી દેખાવ પંક્તિઓ છે: `aligned: true` અથવા તેમના id આપો +@msg the linked image shows its preview: embed or relink it first લિંક કરેલી ઇમેજ તેનો પ્રીવ્યૂ બતાવે છે: પહેલાં તેને એમ્બેડ અથવા રીલિંક કરો +@msg the list of Language packs hasn't been fetched ભાષા પૅકની યાદી હજુ મેળવાઈ નથી +@msg the list {_1} has no item {k} યાદી {_1} માં કોઈ આઇટમ {k} નથી +@msg the main script engine is new for each run and is never kept, so it cannot be dropped મુખ્ય સ્ક્રિપ્ટ એન્જિન દરેક રન માટે નવું હોય છે અને ક્યારેય રાખવામાં આવતું નથી, તેથી તેને છોડી શકાતું નથી +@msg the manifest in the `{MANIFEST_SECTION}` custom section must give `abi` as {ABI_VERSION}, the ABI version this host implements `{MANIFEST_SECTION}` કસ્ટમ વિભાગમાંના મેનિફેસ્ટે `abi` ને {ABI_VERSION} તરીકે આપવું જોઈએ, જે આ હોસ્ટ અમલમાં મૂકે છે તે ABI વર્ઝન છે +@msg the margin leaves no room on the sheet માર્જિન શીટ પર કોઈ જગ્યા છોડતું નથી +@msg the mask would hide every pixel માસ્ક દરેક પિક્સેલ છુપાવી દેશે +@msg the memory for the array buffer could not be allocated એરે બફર માટે મેમરી ફાળવી શકાઈ નહીં +@msg the menu command is too long મેનુ આદેશ ખૂબ લાંબો છે +@msg the metadata template contains no data મેટાડેટા ટેમ્પ્લેટમાં કોઈ ડેટા નથી +@msg the method needs an XML value મેથડને XML મૂલ્ય જોઈએ +@msg the module doesn't have the SHA-256 `hash` gives: nothing was installed મોડ્યુલમાં `hash` આપે છે તે SHA-256 નથી: કંઈ ઇન્સ્ટોલ થયું નથી +@msg the module has more than one `{MANIFEST_SECTION}` custom section મોડ્યુલમાં એકથી વધુ `{MANIFEST_SECTION}` કસ્ટમ વિભાગ છે +@msg the module imports `env.{name}` with another type than the host's: it is {signature} મોડ્યુલ `env.{name}` ને હોસ્ટ કરતાં જુદા પ્રકાર સાથે ઇમ્પોર્ટ કરે છે: તે {signature} છે +@msg the module imports `env.{name}`, which a plug-in may use only at plug-in API level {PROGRESS_API} (`api` {PROGRESS_API}) and with the permission `{permission}` મોડ્યુલ `env.{name}` ઇમ્પોર્ટ કરે છે, જે પ્લગ-ઇન ફક્ત પ્લગ-ઇન API લેવલ {PROGRESS_API} (`api` {PROGRESS_API}) પર અને `{permission}` પરવાનગી સાથે જ વાપરી શકે છે +@msg the module imports `{from}.{name}`, which the host doesn't offer: a plug-in may import only the `env.vc_*` functions that docs/plugins.md lists (plug-in API level 2), and no WASI, files or network મોડ્યુલ `{from}.{name}` ઇમ્પોર્ટ કરે છે, જે હોસ્ટ આપતું નથી: પ્લગ-ઇન ફક્ત docs/plugins.md માં સૂચિબદ્ધ `env.vc_*` ફંક્શન જ ઇમ્પોર્ટ કરી શકે છે (પ્લગ-ઇન API લેવલ 2), અને કોઈ WASI, ફાઇલો કે નેટવર્ક નહીં +@msg the module must export `{name}` with the type {signature} મોડ્યુલે {signature} પ્રકાર સાથે `{name}` એક્સપોર્ટ કરવું જોઈએ +@msg the module must export its linear memory as `memory` મોડ્યુલે તેની લીનિયર મેમરી `memory` તરીકે એક્સપોર્ટ કરવી જોઈએ +@msg the module's table section could not be read મોડ્યુલનો ટેબલ વિભાગ વાંચી શકાયો નહીં +@msg the name is empty નામ ખાલી છે +@msg the name is too long નામ ખૂબ લાંબું છે +@msg the note is empty નોંધ ખાલી છે +@msg the note is longer than 1,024 bytes નોંધ 1,024 બાઇટ કરતાં લાંબી છે +@msg the note is too long નોંધ ખૂબ લાંબી છે +@msg the object already has an opacity mask ઑબ્જેક્ટમાં પહેલેથી ઓપેસિટી માસ્ક છે +@msg the object cannot be {what}: it did not stop being extensible ઑબ્જેક્ટ {what} થઈ શકતો નથી: તે વિસ્તરણક્ષમ રહેવાનું બંધ થયો નહીં +@msg the object has no 3D effect (Extrude & Bevel, Revolve, Inflate or Rotate) ઑબ્જેક્ટમાં કોઈ 3D ઇફેક્ટ નથી (એક્સ્ટ્રુડ અને બેવલ, રિવોલ્વ, ફુલાવો અથવા ફેરવો) +@msg the object has no content a variable can drive ઑબ્જેક્ટમાં વેરિએબલ ચલાવી શકે તેવી કોઈ સામગ્રી નથી +@msg the object has no fill, stroke or effect ઑબ્જેક્ટમાં કોઈ ભરણ, સ્ટ્રોક કે ઇફેક્ટ નથી +@msg the object has no geometry ઑબ્જેક્ટમાં કોઈ જ્યામિતિ નથી +@msg the object has no graphic style (pass `name`) ઑબ્જેક્ટમાં કોઈ ગ્રાફિક સ્ટાઇલ નથી (`name` આપો) +@msg the object has no opacity mask ઑબ્જેક્ટમાં કોઈ ઓપેસિટી માસ્ક નથી +@msg the object has no stroke ઑબ્જેક્ટમાં કોઈ સ્ટ્રોક નથી +@msg the object has no {what} to scale ઑબ્જેક્ટમાં સ્કેલ કરવા માટે કોઈ {what} નથી +@msg the object is beyond the plane's horizon ઑબ્જેક્ટ પ્લેનની ક્ષિતિજની પેલે પાર છે +@msg the object is hidden or locked ઑબ્જેક્ટ છુપાયેલો અથવા લૉક છે +@msg the object is not an editable parametric shape ઑબ્જેક્ટ સંપાદિત કરી શકાય તેવો પેરામેટ્રિક શેપ નથી +@msg the object is not extensible ઑબ્જેક્ટ વિસ્તરણક્ષમ નથી +@msg the object is outside the isolated group ઑબ્જેક્ટ અલગ કરેલા ગ્રૂપની બહાર છે +@msg the object isn't in perspective ઑબ્જેક્ટ પરસ્પેક્ટિવમાં નથી +@msg the object isn't on a perspective plane ઑબ્જેક્ટ પરસ્પેક્ટિવ પ્લેન પર નથી +@msg the object would cross the horizon of the perspective plane ઑબ્જેક્ટ પરસ્પેક્ટિવ પ્લેનની ક્ષિતિજ પાર કરી જશે +@msg the objects don't match the plan ઑબ્જેક્ટ યોજના સાથે મેળ ખાતા નથી +@msg the objects to change are no longer in the document બદલવાના ઑબ્જેક્ટ હવે દસ્તાવેજમાં નથી +@msg the objects would leave the grid ઑબ્જેક્ટ ગ્રિડની બહાર જશે +@msg the offset is outside the bounds of the DataView ઑફસેટ DataView ની સીમાની બહાર છે +@msg the offset must not be negative ઑફસેટ ઋણ ન હોવો જોઈએ +@msg the open dialog has no Reset ખુલ્લા ડાયલોગમાં રીસેટ નથી +@msg the operand stack overflowed ઑપરેન્ડ સ્ટૅક ઓવરફ્લો થયો +@msg the optimised image can't be read back: {e} ઑપ્ટિમાઇઝ કરેલી ઇમેજ પાછી વાંચી શકાતી નથી: {e} +@msg the options must be an object વિકલ્પો ઑબ્જેક્ટ હોવા જોઈએ +@msg the options must be an {_1} object વિકલ્પો {_1} ઑબ્જેક્ટ હોવા જોઈએ +@msg the output આઉટપુટ +@msg the output holds `{kind}`, which the importer's `outputKinds` doesn't list આઉટપુટમાં `{kind}` છે, જે ઇમ્પોર્ટરની `outputKinds` યાદીમાં નથી +@msg the package came back damaged પૅકેજ ખરાબ થઈને પાછું આવ્યું +@msg the page has no area પેજનું કોઈ ક્ષેત્રફળ નથી +@msg the page's type in an unread object's box isn't in its page art ન વંચાયેલા ઑબ્જેક્ટના બૉક્સમાંનો પેજનો ટાઇપ તેના પેજ આર્ટમાં નથી +@msg the paint is not a freeform gradient (apply one with paint.editGradient {{kind: "freeform"}}) પેઇન્ટ ફ્રીફોર્મ ગ્રેડિયન્ટ નથી (paint.editGradient {{kind: "freeform"}} વડે એક લાગુ કરો) +@msg the panels are not hidden પેનલ છુપાયેલી નથી +@msg the parameters are larger than the {MAX_PARAMS_BYTES} bytes a generated art object keeps પેરામીટર્સ જનરેટ કરેલી આર્ટ ઑબ્જેક્ટ રાખી શકે તેવા {MAX_PARAMS_BYTES} બાઇટ્સ કરતાં મોટા છે +@msg the parameters or body do not form one function પેરામીટર્સ અથવા બૉડી એક ફંક્શન બનાવતા નથી +@msg the params must be an object, not {got} params ઑબ્જેક્ટ હોવું જોઈએ, {got} નહીં +@msg the parent must be a layer or sublayer પેરન્ટ લેયર અથવા સબલેયર હોવું જોઈએ +@msg the pasted SVG filter {name} draws differently from the document's filter of that name, and no free name fits it પેસ્ટ કરેલું SVG ફિલ્ટર {name} દસ્તાવેજના એ જ નામના ફિલ્ટરથી અલગ રીતે દોરે છે, અને તેના માટે કોઈ ખાલી નામ બંધબેસતું નથી +@msg the path can't be extended પાથ લંબાવી શકાતો નથી +@msg the path can't be inside one of the objects to attach પાથ જોડવાની ઑબ્જેક્ટ્સમાંથી કોઈ એકની અંદર હોઈ શકે નહીં +@msg the path has a corner there, so it has no single curvature પાથમાં ત્યાં ખૂણો છે, તેથી તેની એક જ વક્રતા નથી +@msg the path has a cusp there, so it has no single curvature પાથમાં ત્યાં તીક્ષ્ણ અણી (cusp) છે, તેથી તેની એક જ વક્રતા નથી +@msg the path has no anchor points પાથમાં કોઈ એન્કર બિંદુઓ નથી +@msg the path has no open subpath પાથમાં કોઈ ખુલ્લો સબપાથ નથી +@msg the path has no segments to measure પાથમાં માપવા માટે કોઈ સેગમેન્ટ્સ નથી +@msg the path has no {key} to overprint પાથમાં ઓવરપ્રિન્ટ કરવા માટે {key} નથી +@msg the path is empty પાથ ખાલી છે +@msg the path is hidden or locked, or cannot be selected here પાથ છુપાયેલો કે લૉક કરેલો છે, અથવા અહીં પસંદ કરી શકાતો નથી +@msg the path is locked or hidden પાથ લૉક કરેલો અથવા છુપાયેલો છે +@msg the path is straight there, so no circle matches its curvature પાથ ત્યાં સીધો છે, તેથી કોઈ વર્તુળ તેની વક્રતા સાથે મેળ ખાતું નથી +@msg the path is too long પાથ ખૂબ લાંબો છે +@msg the path is too short to remove a point from પાથ એટલો ટૂંકો છે કે તેમાંથી બિંદુ દૂર કરી શકાતું નથી +@msg the path is too short to shorten that much પાથ એટલો ટૂંકો છે કે તેને આટલો ટૂંકો કરી શકાતો નથી +@msg the path was not made પાથ બન્યો નહીં +@msg the paths are too many or too tangled to find where they cross (at most 10000 segments) પાથ ક્યાં એકબીજાને કાપે છે તે શોધવા માટે તે ખૂબ વધુ અથવા ખૂબ ગૂંચવાયેલા છે (વધુમાં વધુ 10000 સેગમેન્ટ્સ) +@msg the paths have nothing to merge there પાથમાં ત્યાં મર્જ કરવા માટે કંઈ નથી +@msg the paths have too many anchors to edit at once પાથમાં એકસાથે ફેરફાર કરવા માટે ખૂબ વધુ એન્કર છે +@msg the pen table holds more than 255 pens પેન ટેબલમાં 255 કરતાં વધુ પેન છે +@msg the perspective grid is hidden પરસ્પેક્ટિવ ગ્રિડ છુપાયેલી છે +@msg the picked object is not found પસંદ કરેલી ઑબ્જેક્ટ મળી નહીં +@msg the picture has no objects ચિત્રમાં કોઈ ઑબ્જેક્ટ્સ નથી +@msg the pixel buffer doesn't match the image size પિક્સેલ બફર ઇમેજના કદ સાથે મેળ ખાતું નથી +@msg the place cursor that asked for these import options is no longer loaded આ ઇમ્પોર્ટ વિકલ્પો માંગનાર પ્લેસ કર્સર હવે લોડ થયેલું નથી +@msg the plates can't be kept પ્લેટ્સ રાખી શકાતી નથી +@msg the plug-in store can't be locked પ્લગ-ઇન સ્ટોર લૉક કરી શકાતો નથી +@msg the plug-in's grant can't be removed from the plug-in store પ્લગ-ઇનની પરવાનગી પ્લગ-ઇન સ્ટોરમાંથી દૂર કરી શકાતી નથી +@msg the point in `points` is on `center` `points` માંનું બિંદુ `center` પર છે +@msg the pointer is beyond the plane's horizon પોઇન્ટર પ્લેનની ક્ષિતિજની પેલે પાર છે +@msg the position table does not match the instructions પોઝિશન ટેબલ સૂચનાઓ સાથે મેળ ખાતું નથી +@msg the preferences are not readable પસંદગીઓ વાંચી શકાતી નથી +@msg the preset editor gave no name પ્રીસેટ એડિટરે કોઈ નામ આપ્યું નહીં +@msg the preview image is empty પ્રિવ્યૂ ઇમેજ ખાલી છે +@msg the preview: {e} પ્રિવ્યૂ: {e} +@msg the print job has no data પ્રિન્ટ જૉબમાં કોઈ ડેટા નથી +@msg the profile question changed since it was asked: answer the question it asks now પ્રોફાઇલનો પ્રશ્ન પૂછાયા પછી બદલાઈ ગયો છે: હવે તે જે પ્રશ્ન પૂછે છે તેનો જવાબ આપો +@msg the program runs too long પ્રોગ્રામ ખૂબ લાંબો ચાલે છે +@msg the program uses too much memory પ્રોગ્રામ ખૂબ વધુ મેમરી વાપરે છે +@msg the prompt's text is longer than {MAX_PROMPT_BYTES} bytes પ્રૉમ્પ્ટનો ટેક્સ્ટ {MAX_PROMPT_BYTES} બાઇટ્સ કરતાં લાંબો છે +@msg the property cannot be redefined પ્રોપર્ટી ફરીથી વ્યાખ્યાયિત કરી શકાતી નથી +@msg the prototype of the class's superclass is not an object or null ક્લાસના સુપરક્લાસનો prototype ઑબ્જેક્ટ કે null નથી +@msg the proxy did not set it proxy એ તેને સેટ કર્યું નહીં +@msg the proxy handler's {name} is not a function proxy હેન્ડલરનું {name} ફંક્શન નથી +@msg the proxy has been revoked proxy રદ કરવામાં આવ્યું છે +@msg the proxy's defineProperty trap returned false proxy ના defineProperty trap એ false પરત કર્યું +@msg the proxy's ownKeys trap returned too many names proxy ના ownKeys trap એ ખૂબ વધુ નામો પરત કર્યાં +@msg the proxy's {trap} trap {why} proxy ના {trap} trap એ {why} +@msg the radix must be between 2 and 36 radix 2 અને 36 ની વચ્ચે હોવું જોઈએ +@msg the rectangle must have a width and a height લંબચોરસની પહોળાઈ અને ઊંચાઈ હોવી જોઈએ +@msg the rectangle needs a size and must lie on the canvas લંબચોરસને કદ જોઈએ અને તે કેનવાસ પર હોવો જોઈએ +@msg the relative object must be a page item or a layer સંબંધિત ઑબ્જેક્ટ પેજ આઇટમ અથવા લેયર હોવી જોઈએ +@msg the replacement font is not available બદલવાનો ફોન્ટ ઉપલબ્ધ નથી +@msg the request may not read the New Document profiles folder વિનંતી New Document પ્રોફાઇલ્સ ફોલ્ડર વાંચી શકતી નથી +@msg the revolved object has no fill or stroke રિવૉલ્વ કરેલી ઑબ્જેક્ટમાં કોઈ ફિલ કે સ્ટ્રોક નથી +@msg the right side of 'in' is not an object 'in' ની જમણી બાજુ ઑબ્જેક્ટ નથી +@msg the right side of 'instanceof' is not a function 'instanceof' ની જમણી બાજુ ફંક્શન નથી +@msg the runtime panicked રનટાઇમ પૅનિક થયો +@msg the save would keep only some of its artboards: save it with saveAs first, or close with SaveOptions.DONOTSAVECHANGES સાચવવાથી તેના કેટલાક આર્ટબોર્ડ્સ જ રહેશે: પહેલાં saveAs વડે સાચવો, અથવા SaveOptions.DONOTSAVECHANGES સાથે બંધ કરો +@msg the scale is not a usable number સ્કેલ વાપરી શકાય તેવી સંખ્યા નથી +@msg the screen color sampler is already open સ્ક્રીન કલર સૅમ્પલર પહેલેથી ખુલ્લું છે +@msg the script added more objects and data to the documents than one run may add સ્ક્રિપ્ટે દસ્તાવેજોમાં એક રન ઉમેરી શકે તેના કરતાં વધુ ઑબ્જેક્ટ્સ અને ડેટા ઉમેર્યા +@msg the script file permissions could not be read: {e} સ્ક્રિપ્ટ ફાઇલની પરવાનગીઓ વાંચી શકાઈ નહીં: {e} +@msg the script file permissions could not be saved: {e} સ્ક્રિપ્ટ ફાઇલની પરવાનગીઓ સાચવી શકાઈ નહીં: {e} +@msg the script is no longer in the Scripts folder સ્ક્રિપ્ટ હવે Scripts ફોલ્ડરમાં નથી +@msg the script is not UTF-8 text સ્ક્રિપ્ટ UTF-8 ટેક્સ્ટ નથી +@msg the script is too large to run સ્ક્રિપ્ટ ચલાવવા માટે ખૂબ મોટી છે +@msg the script made more host calls than one run may make સ્ક્રિપ્ટે એક રન કરી શકે તેના કરતાં વધુ હોસ્ટ કૉલ્સ કર્યા +@msg the script opened more file data than one run may open (32 MiB) સ્ક્રિપ્ટે એક રન ખોલી શકે તેના કરતાં વધુ ફાઇલ ડેટા ખોલ્યો (32 MiB) +@msg the script passed more data to and from commands than one run may pass સ્ક્રિપ્ટે એક રન આપ-લે કરી શકે તેના કરતાં વધુ ડેટા કમાન્ડ્સને આપ્યો અને તેમની પાસેથી લીધો +@msg the script wrote more file data than one run may write (32 MiB) સ્ક્રિપ્ટે એક રન લખી શકે તેના કરતાં વધુ ફાઇલ ડેટા લખ્યો (32 MiB) +@msg the script's run is no longer available સ્ક્રિપ્ટનો રન હવે ઉપલબ્ધ નથી +@msg the search couldn't start: try again in a moment શોધ શરૂ થઈ શકી નહીં: થોડી વારમાં ફરી પ્રયાસ કરો +@msg the segment can't be bent that far સેગમેન્ટને આટલું વાળી શકાતું નથી +@msg the selected art has no width પસંદ કરેલી આર્ટની કોઈ પહોળાઈ નથી +@msg the selected art is nested more than {MAX_DEPTH} levels deep પસંદ કરેલી આર્ટ {MAX_DEPTH} કરતાં વધુ સ્તર ઊંડે નેસ્ટ થયેલી છે +@msg the selected art is too large to measure પસંદ કરેલી આર્ટ માપવા માટે ખૂબ મોટી છે +@msg the selected objects' colors differ: give `color` પસંદ કરેલી ઑબ્જેક્ટ્સના રંગો અલગ છે: `color` આપો +@msg the selected objects' colors differ: give `opacity` or `color` પસંદ કરેલી ઑબ્જેક્ટ્સના રંગો અલગ છે: `opacity` અથવા `color` આપો +@msg the selected paths are painted with brushes of different types પસંદ કરેલા પાથ અલગ પ્રકારના બ્રશથી રંગાયેલા છે +@msg the selected stroke's profile is already listed as {_1} પસંદ કરેલા સ્ટ્રોકની પ્રોફાઇલ પહેલેથી {_1} તરીકે સૂચિબદ્ધ છે +@msg the selection does not fit the sheet પસંદગી શીટમાં બંધબેસતી નથી +@msg the selection draws nothing પસંદગી કંઈ દોરતી નથી +@msg the selection has more than {MAX_LISTED} objects પસંદગીમાં {MAX_LISTED} કરતાં વધુ ઑબ્જેક્ટ્સ છે +@msg the selection has no URL (or they differ) પસંદગીમાં કોઈ URL નથી (અથવા તે અલગ અલગ છે) +@msg the selection has no area પસંદગીનું કોઈ ક્ષેત્રફળ નથી +@msg the selection has no area to repeat પસંદગીમાં પુનરાવર્તન કરવા માટે કોઈ ક્ષેત્રફળ નથી +@msg the selection has no art to export પસંદગીમાં એક્સપોર્ટ કરવા માટે કોઈ આર્ટ નથી +@msg the selection has no bounds પસંદગીની કોઈ સીમાઓ નથી +@msg the selection has no graphic style પસંદગીમાં કોઈ ગ્રાફિક સ્ટાઇલ નથી +@msg the selection has no outlines to weed around પસંદગીમાં વીડિંગ માટે કોઈ આઉટલાઇન્સ નથી +@msg the selection has nothing to nest પસંદગીમાં નેસ્ટ કરવા માટે કંઈ નથી +@msg the selection isn't in perspective પસંદગી પરસ્પેક્ટિવમાં નથી +@msg the session is gone સેશન સમાપ્ત થઈ ગયું છે +@msg the set “{_1}” has more than one action “{_2}” સેટ “{_1}” માં એક કરતાં વધુ ક્રિયા “{_2}” છે +@msg the set “{_1}” has no action “{_2}” સેટ “{_1}” માં કોઈ ક્રિયા “{_2}” નથી +@msg the sets must be a list of Kinsoku sets sets એ Kinsoku સેટ્સની સૂચિ હોવી જોઈએ +@msg the shape is not an editable original shape of that Shaper Group આકાર એ Shaper Group નો ફેરફાર કરી શકાય તેવો મૂળ આકાર નથી +@msg the shape would reach past the edge of the canvas આકાર કેનવાસની કિનારીની બહાર પહોંચી જશે +@msg the shape's numbers are out of range આકારની સંખ્યાઓ શ્રેણીની બહાર છે +@msg the shapes are too complex: at most 2000 segments in all આકારો ખૂબ જટિલ છે: કુલ વધુમાં વધુ 2000 સેગમેન્ટ્સ +@msg the shapes are too degenerate to combine આકારો જોડવા માટે ખૂબ અપૂર્ણ (degenerate) છે +@msg the shapes cross themselves and each other too often to combine આકારો જોડવા માટે પોતાને અને એકબીજાને ખૂબ વાર કાપે છે +@msg the slice would leave the canvas સ્લાઇસ કેનવાસની બહાર જશે +@msg the slices are stored in version {v}, which isn't read સ્લાઇસ વર્ઝન {v} માં સંગ્રહિત છે, જે વાંચી શકાતું નથી +@msg the slices are too large for PSD (at most 4 GB) સ્લાઇસ PSD માટે ખૂબ મોટી છે (વધુમાં વધુ 4 GB) +@msg the slices' descriptor has a reference of an unknown kind ({_1}) સ્લાઇસના ડિસ્ક્રિપ્ટરમાં અજાણ્યા પ્રકારનો રેફરન્સ છે ({_1}) +@msg the slices' descriptor has a value of an unknown type ({_1}) સ્લાઇસના ડિસ્ક્રિપ્ટરમાં અજાણ્યા પ્રકારની વેલ્યૂ છે ({_1}) +@msg the slices' descriptor has a version other than 16 સ્લાઇસના ડિસ્ક્રિપ્ટરનું વર્ઝન 16 સિવાયનું છે +@msg the slices' descriptor has no list of slices સ્લાઇસના ડિસ્ક્રિપ્ટરમાં સ્લાઇસની કોઈ સૂચિ નથી +@msg the slices' descriptor holds too many values સ્લાઇસના ડિસ્ક્રિપ્ટરમાં ખૂબ વધુ વેલ્યૂઝ છે +@msg the slices' descriptor lists something other than a slice સ્લાઇસનું ડિસ્ક્રિપ્ટર સ્લાઇસ સિવાયનું કંઈક સૂચિબદ્ધ કરે છે +@msg the slices' descriptor nests too deep સ્લાઇસનું ડિસ્ક્રિપ્ટર ખૂબ ઊંડે નેસ્ટ થયેલું છે +@msg the source does not fit in the typed array at that offset સોર્સ તે ઑફસેટ પર typed array માં બંધબેસતું નથી +@msg the source object has no height સોર્સ ઑબ્જેક્ટની કોઈ ઊંચાઈ નથી +@msg the source object has no width સોર્સ ઑબ્જેક્ટની કોઈ પહોળાઈ નથી +@msg the source object has no width or no height સોર્સ ઑબ્જેક્ટની પહોળાઈ અથવા ઊંચાઈ નથી +@msg the spacing makes more than {MAX_GROMMETS} grommets અંતરને કારણે {MAX_GROMMETS} કરતાં વધુ ગ્રોમેટ્સ બને છે +@msg the spine has no segments સ્પાઇનમાં કોઈ સેગમેન્ટ્સ નથી +@msg the spot colour couldn't be added સ્પૉટ રંગ ઉમેરી શકાયો નહીં +@msg the startup preset's name is too long સ્ટાર્ટઅપ પ્રીસેટનું નામ ખૂબ લાંબું છે +@msg the stroke has no weight સ્ટ્રોકની કોઈ જાડાઈ નથી +@msg the styles of a text range cannot be added or removed ટેક્સ્ટ રેન્જની સ્ટાઇલ્સ ઉમેરી કે દૂર કરી શકાતી નથી +@msg the subpath has no ends to extend (it is closed or a single point) સબપાથમાં લંબાવવા માટે કોઈ છેડા નથી (તે બંધ છે અથવા એક જ બિંદુ છે) +@msg the subpath is closed સબપાથ બંધ છે +@msg the subpath is closed or too short to close સબપાથ બંધ છે અથવા બંધ કરવા માટે ખૂબ ટૂંકો છે +@msg the superclass is not a constructor સુપરક્લાસ constructor નથી +@msg the surface has no map સરફેસમાં કોઈ મૅપ નથી +@msg the swatch exchange file holds more than {ASE_MAX_ENTRIES} colors and groups સ્વેચ એક્સચેન્જ ફાઇલમાં {ASE_MAX_ENTRIES} કરતાં વધુ રંગો અને ગ્રૂપ્સ છે +@msg the swatch exchange file is cut short સ્વેચ એક્સચેન્જ ફાઇલ અધૂરી છે +@msg the symbols are nested too deeply to expand their instances સિમ્બોલ તેમના ઇન્સ્ટન્સ વિસ્તારવા માટે ખૂબ ઊંડે નેસ્ટ થયેલા છે +@msg the tab stops were not set ટૅબ સ્ટૉપ સેટ થયા નહીં +@msg the tag was not added ટૅગ ઉમેરાયો નહીં +@msg the target layer is locked or hidden લક્ષ્ય લેયર લૉક કરેલું અથવા છુપાયેલું છે +@msg the template name can't be empty ટેમ્પ્લેટનું નામ ખાલી હોઈ શકે નહીં +@msg the template name isn't usable as a file name ટેમ્પ્લેટનું નામ ફાઇલ નામ તરીકે વાપરી શકાય તેવું નથી +@msg the text file is too large to place as type (at most {_1} MB) ટેક્સ્ટ ફાઇલ ટાઇપ તરીકે મૂકવા માટે ખૂબ મોટી છે (વધુમાં વધુ {_1} MB) +@msg the text frame is not {_1} type ટેક્સ્ટ ફ્રેમ {_1} ટાઇપ નથી +@msg the text is empty ટેક્સ્ટ ખાલી છે +@msg the text is in another document than the style ટેક્સ્ટ સ્ટાઇલ કરતાં બીજા દસ્તાવેજમાં છે +@msg the text is longer than 16 KiB ટેક્સ્ટ 16 KiB કરતાં લાંબો છે +@msg the text is over {_1} MB ટેક્સ્ટ {_1} MB કરતાં વધુ છે +@msg the text of type given as `truncated` can't be changed `truncated` તરીકે આપેલા ટાઇપનો ટેક્સ્ટ બદલી શકાતો નથી +@msg the text's transform cannot be measured ટેક્સ્ટનું ટ્રાન્સફોર્મ માપી શકાતું નથી +@msg the texture's opacity could not be drawn ટેક્સ્ચરની અપારદર્શકતા દોરી શકાઈ નહીં +@msg the thumbnail image is malformed થંબનેલ ઇમેજ ખોટા સ્વરૂપની છે +@msg the title is too long શીર્ષક ખૂબ લાંબું છે +@msg the tool name is too long ટૂલનું નામ ખૂબ લાંબું છે +@msg the toolbar `{_1}` has no button for `{id}` ટૂલબાર `{_1}` માં `{id}` માટે કોઈ બટન નથી +@msg the toolbar `{toolbar}` is in another workspace ટૂલબાર `{toolbar}` બીજા વર્કસ્પેસમાં છે +@msg the top object must be a path ઉપરની ઑબ્જેક્ટ પાથ હોવી જોઈએ +@msg the top object must be a path, compound path or text object to use as a clipping mask ક્લિપિંગ માસ્ક તરીકે વાપરવા માટે ઉપરની ઑબ્જેક્ટ પાથ, કમ્પાઉન્ડ પાથ અથવા ટેક્સ્ટ ઑબ્જેક્ટ હોવી જોઈએ +@msg the trace was cancelled ટ્રેસ રદ કરવામાં આવ્યું +@msg the trailer has no size ટ્રેલરનું કોઈ કદ નથી +@msg the two frames are already in one story: the link would make a loop or reorder it બંને ફ્રેમ પહેલેથી એક જ સ્ટોરીમાં છે: લિંક લૂપ બનાવશે અથવા તેનો ક્રમ બદલશે +@msg the type holds more than {MAX_TEXT_TOTAL} bytes of text ટાઇપમાં {MAX_TEXT_TOTAL} બાઇટ્સ કરતાં વધુ ટેક્સ્ટ છે +@msg the type object is flattened to nothing ટાઇપ ઑબ્જેક્ટ ફ્લેટન થઈને કંઈ જ રહેતી નથી +@msg the typed array does not fit in the buffer typed array બફરમાં બંધબેસતું નથી +@msg the value bind was called on is not a function જે વેલ્યૂ પર bind બોલાવાયું તે ફંક્શન નથી +@msg the value is a primitive વેલ્યૂ primitive છે +@msg the value is not a constructor વેલ્યૂ constructor નથી +@msg the value is not a function વેલ્યૂ ફંક્શન નથી +@msg the value is not a generator object વેલ્યૂ generator ઑબ્જેક્ટ નથી +@msg the value is not a valid XML name વેલ્યૂ માન્ય XML નામ નથી +@msg the value is not an XML attribute name વેલ્યૂ XML એટ્રિબ્યૂટ નામ નથી +@msg the value is not an XML name વેલ્યૂ XML નામ નથી +@msg the value is not iterable વેલ્યૂ iterable નથી +@msg the value of axis `{tag}` must be a number or null અક્ષ `{tag}` ની વેલ્યૂ સંખ્યા અથવા null હોવી જોઈએ +@msg the variable is bound to more than {MAX_LISTED} objects વેરિએબલ {MAX_LISTED} કરતાં વધુ ઑબ્જેક્ટ્સ સાથે બંધાયેલું છે +@msg the variable is in another document વેરિએબલ બીજા દસ્તાવેજમાં છે +@msg the variable library declares more than {MAX_LIBRARY_DATASETS} data sets વેરિએબલ લાઇબ્રેરી {MAX_LIBRARY_DATASETS} કરતાં વધુ ડેટા સેટ્સ જાહેર કરે છે +@msg the variable library declares more than {MAX_LIBRARY_ENTITIES} entities વેરિએબલ લાઇબ્રેરી {MAX_LIBRARY_ENTITIES} કરતાં વધુ entities જાહેર કરે છે +@msg the variable library declares more than {MAX_LIBRARY_VARIABLES} variables વેરિએબલ લાઇબ્રેરી {MAX_LIBRARY_VARIABLES} કરતાં વધુ વેરિએબલ્સ જાહેર કરે છે +@msg the variable library declares no variables વેરિએબલ લાઇબ્રેરી કોઈ વેરિએબલ્સ જાહેર કરતી નથી +@msg the variable library is larger than {MAX_LIBRARY_BYTES} bytes વેરિએબલ લાઇબ્રેરી {MAX_LIBRARY_BYTES} બાઇટ્સ કરતાં મોટી છે +@msg the variable library is not UTF-8 વેરિએબલ લાઇબ્રેરી UTF-8 નથી +@msg the variable library is not well-formed XML: {e} વેરિએબલ લાઇબ્રેરી યોગ્ય રીતે બનેલું XML નથી: {e} +@msg the variable library nests elements more than {MAX_LIBRARY_NESTING} deep વેરિએબલ લાઇબ્રેરી એલિમેન્ટ્સને {MAX_LIBRARY_NESTING} કરતાં વધુ ઊંડે નેસ્ટ કરે છે +@msg the variable library's document type declaration holds something other than entities of plain text વેરિએબલ લાઇબ્રેરીના document type declaration માં સાદા ટેક્સ્ટની entities સિવાયનું કંઈક છે +@msg the variable library's entities expand to more than {MAX_LIBRARY_BYTES} bytes વેરિએબલ લાઇબ્રેરીની entities વિસ્તરીને {MAX_LIBRARY_BYTES} બાઇટ્સ કરતાં વધુ થાય છે +@msg the view does not fit in the buffer વ્યૂ બફરમાં બંધબેસતું નથી +@msg the weeding lines cross the art's outlines too many times to measure; use fewer lines વીડિંગ લાઇન્સ આર્ટની આઉટલાઇન્સને માપવા માટે ખૂબ વધુ વાર કાપે છે; ઓછી લાઇન્સ વાપરો +@msg the weeding lines pass too close to too many outline segments to measure; use fewer lines or a smaller gap વીડિંગ લાઇન્સ માપવા માટે ખૂબ વધુ આઉટલાઇન સેગમેન્ટ્સની ખૂબ નજીકથી પસાર થાય છે; ઓછી લાઇન્સ અથવા નાનો ગૅપ વાપરો +@msg the weeding lines would be more than {max_pieces} pieces વીડિંગ લાઇન્સ {max_pieces} કરતાં વધુ ટુકડા બનશે +@msg the window has no dock વિન્ડોમાં કોઈ ડૉક નથી +@msg the window has not drawn a frame વિન્ડોએ કોઈ ફ્રેમ દોરી નથી +@msg the window launch identity was already selected વિન્ડો લૉન્ચ ઓળખ પહેલેથી પસંદ થઈ ગઈ હતી +@msg the wireframe has more than {MAX_WIRE_EDGES} edges વાયરફ્રેમમાં {MAX_WIRE_EDGES} કરતાં વધુ કિનારીઓ છે +@msg the written PDF has no catalog લખેલી PDF માં કોઈ catalog નથી +@msg the written PDF has no cross-reference table લખેલી PDF માં કોઈ cross-reference ટેબલ નથી +@msg the written PDF's metadata can't be edited લખેલી PDF નો મેટાડેટા સંપાદિત કરી શકાતો નથી +@msg the {_1} file holds no records {_1} ફાઇલમાં કોઈ રેકોર્ડ નથી +@msg the {_1} header is damaged {_1} હેડર ખરાબ થયેલું છે +@msg the {_1} plate can't be read: {e} {_1} પ્લેટ વાંચી શકાતી નથી: {e} +@msg the {_1} plate lies outside the file {_1} પ્લેટ ફાઇલની બહાર છે +@msg the {_1} slider has no field `{field}` {_1} સ્લાઇડરમાં કોઈ ફીલ્ડ `{field}` નથી +@msg the {kind} tool has no options {kind} ટૂલમાં કોઈ વિકલ્પો નથી +@msg the {kind} tool has no size dialog {kind} ટૂલમાં કોઈ કદ ડાયલૉગ નથી +@msg the {locale} pack is still installing {locale} પૅક હજુ ઇન્સ્ટોલ થઈ રહ્યું છે +@msg the {name} profile can't be read: {e} {name} પ્રોફાઇલ વાંચી શકાતી નથી: {e} +@msg the {name} profile's [Normal Character Style] has attributes charStyle.new does not take {name} પ્રોફાઇલની [Normal Character Style] માં એવા એટ્રિબ્યૂટ્સ છે જે charStyle.new લેતું નથી +@msg the {tool} tool has no options {tool} ટૂલમાં કોઈ વિકલ્પો નથી +@msg the {what} is too long {what} ખૂબ લાંબું છે +@msg there are no colour swatches to draw દોરવા માટે કોઈ રંગ સ્વેચ નથી +@msg there are no objects to release રિલીઝ કરવા માટે કોઈ ઑબ્જેક્ટ્સ નથી +@msg there are no printer settings to open here અહીં ખોલવા માટે કોઈ પ્રિન્ટર સેટિંગ્સ નથી +@msg there is already a design named `{name}` `{name}` નામની ડિઝાઇન પહેલેથી છે +@msg there is already a design named `{to}` `{to}` નામની ડિઝાઇન પહેલેથી છે +@msg there is already a toolbar named `{name}` `{name}` નામનું ટૂલબાર પહેલેથી છે +@msg there is no Language pack for {locale} {locale} માટે કોઈ Language પૅક નથી +@msg there is no action set “{_1}” કોઈ ક્રિયા સેટ “{_1}” નથી +@msg there is no artboard for the sheet શીટ માટે કોઈ આર્ટબોર્ડ નથી +@msg there is no artboard {i} કોઈ આર્ટબોર્ડ {i} નથી +@msg there is no banner to mark ચિહ્નિત કરવા માટે કોઈ બૅનર નથી +@msg there is no clock here અહીં કોઈ ઘડિયાળ નથી +@msg there is no clock here: give `time` (Unix seconds) અહીં કોઈ ઘડિયાળ નથી: `time` આપો (Unix સેકન્ડ્સ) +@msg there is no key store કોઈ કી સ્ટોર નથી +@msg there is no library: create one first કોઈ લાઇબ્રેરી નથી: પહેલાં એક બનાવો +@msg there is no script engine named {name} {name} નામનું કોઈ સ્ક્રિપ્ટ એન્જિન નથી +@msg there is no window to ask in પૂછવા માટે કોઈ વિન્ડો નથી +@msg these paths are too degenerate for Shaper આ પાથ Shaper માટે ખૂબ અપૂર્ણ (degenerate) છે +@msg these shapes are too small to measure આ આકારો માપવા માટે ખૂબ નાના છે +@msg these shapes take too long to search આ આકારો શોધવામાં ખૂબ સમય લાગે છે +@msg thickness must be from 0.01 to 5000 pt જાડાઈ 0.01 થી 5000 pt સુધી હોવી જોઈએ +@msg this CDR drawing can't be read ({why}) આ CDR ડ્રૉઇંગ વાંચી શકાતું નથી ({why}) +@msg this CMX file can't be read ({why}) આ CMX ફાઇલ વાંચી શકાતી નથી ({why}) +@msg this PostScript file can't be read ({why}): save it as PDF or SVG in the app that made it આ PostScript ફાઇલ વાંચી શકાતી નથી ({why}): તેને બનાવનાર ઍપમાં તેને PDF અથવા SVG તરીકે સાચવો +@msg this binary DXF file is damaged or cut short આ બાઇનરી DXF ફાઇલ ખરાબ થયેલી અથવા અધૂરી છે +@msg this build doesn't read display profiles આ બિલ્ડ ડિસ્પ્લે પ્રોફાઇલ્સ વાંચતું નથી +@msg this built-in cannot be subclassed આ built-in નો subclass બનાવી શકાતો નથી +@msg this export dialog is no longer open આ એક્સપોર્ટ ડાયલૉગ હવે ખુલ્લો નથી +@msg this file was saved without PDF compatibility, and its editing data can't be read ({why}) આ ફાઇલ PDF સુસંગતતા વિના સાચવવામાં આવી હતી, અને તેનો એડિટિંગ ડેટા વાંચી શકાતો નથી ({why}) +@msg this format holds one artboard: export several as PDF or with document.exportForScreens આ ફોર્મેટમાં એક જ આર્ટબોર્ડ રહે છે: ઘણાને PDF તરીકે અથવા document.exportForScreens વડે એક્સપોર્ટ કરો +@msg this function's script run has ended આ ફંક્શનનો સ્ક્રિપ્ટ રન પૂરો થઈ ગયો છે +@msg this host takes no effects here આ હોસ્ટ અહીં કોઈ ઇફેક્ટ્સ લેતું નથી +@msg this is a DWG drawing, which can't be read: save it from the CAD app as a DXF and open that આ DWG ડ્રૉઇંગ છે, જે વાંચી શકાતું નથી: તેને CAD ઍપમાંથી DXF તરીકે સાચવો અને તે ખોલો +@msg this is a PostScript file (an .ai saved in an older format or without PDF compatibility, or an EPS file), not a PDF: File › Open and File › Place read it as EPS આ PostScript ફાઇલ છે (જૂના ફોર્મેટમાં અથવા PDF સુસંગતતા વિના સાચવેલી .ai, અથવા EPS ફાઇલ), PDF નથી: ફાઇલ › ખોલો અને ફાઇલ › મૂકો તેને EPS તરીકે વાંચે છે +@msg this is a compiled script, which cannot be run; use its source text આ કમ્પાઇલ કરેલી સ્ક્રિપ્ટ છે, જે ચલાવી શકાતી નથી; તેનો સોર્સ ટેક્સ્ટ વાપરો +@msg this is not a CharacterStyles આ CharacterStyles નથી +@msg this is not a DocumentPreset આ DocumentPreset નથી +@msg this is not a Layer આ Layer નથી +@msg this is not a PathItem આ PathItem નથી +@msg this is not a PathPoint આ PathPoint નથી +@msg this is not a PathPoints આ PathPoints નથી +@msg this is not a PostScript file આ PostScript ફાઇલ નથી +@msg this is not a Printer આ Printer નથી +@msg this is not a Story આ Story નથી +@msg this is not a Tag આ Tag નથી +@msg this is not a Tags collection આ Tags સંગ્રહ નથી +@msg this is not a TextFrame આ TextFrame નથી +@msg this is not a View આ View નથી +@msg this is not a collection of text આ ટેક્સ્ટનો સંગ્રહ નથી +@msg this is not a page item આ પેજ આઇટમ નથી +@msg this is not a {_1} આ {_1} નથી +@msg this is not a {class} આ {class} નથી +@msg this is not a {name} આ {name} નથી +@msg this is not an HP-GL export આ HP-GL એક્સપોર્ટ નથી +@msg this isn't a flat-colour logo ({_1}% of its solid areas match a few flat colours), so Flat Logo mode would turn its gradients into patches: use Color mode instead આ સપાટ-રંગનો લોગો નથી (તેના ઘન વિસ્તારોમાંથી {_1}% થોડા સપાટ રંગો સાથે મેળ ખાય છે), તેથી Flat Logo મોડ તેના ગ્રેડિયન્ટ્સને પૅચમાં ફેરવી દેશે: તેના બદલે Color મોડ વાપરો +@msg this library cannot add items to a drawing આ લાઇબ્રેરી ડ્રૉઇંગમાં આઇટમ્સ ઉમેરી શકતી નથી +@msg this question has no such choice આ પ્રશ્નમાં આવો કોઈ વિકલ્પ નથી +@msg this system has no screen color sampler આ સિસ્ટમમાં કોઈ સ્ક્રીન કલર સૅમ્પલર નથી +@msg this trace would make more than {max} anchor points, more than the document can show smoothly: raise Noise, lower Paths or Colors, or pick a lower-fidelity preset આ ટ્રેસ {max} કરતાં વધુ એન્કર બિંદુઓ બનાવશે, જે દસ્તાવેજ સરળતાથી બતાવી શકે તેના કરતાં વધુ છે: Noise વધારો, Paths અથવા Colors ઘટાડો, અથવા ઓછી ચોકસાઈવાળો પ્રીસેટ પસંદ કરો +@msg this warp's points can't be edited: use Reset with Mesh first આ વૉર્પના બિંદુઓમાં ફેરફાર કરી શકાતો નથી: પહેલાં મેશ વડે રીસેટ કરો વાપરો +@msg threaded type can't be numbered: its frames share one story થ્રેડેડ ટાઇપને ક્રમાંકિત કરી શકાતો નથી: તેની ફ્રેમ્સ એક જ સ્ટોરી વહેંચે છે +@msg three shapes set the radius themselves: leave `radius` out ત્રણ આકારો ત્રિજ્યા જાતે સેટ કરે છે: `radius` છોડી દો +@msg through applies to scope "connected" through એ scope "connected" ને લાગુ પડે છે +@msg through must be an array of at most 4096 edge ids through વધુમાં વધુ 4096 edge ids નો array હોવો જોઈએ +@msg through: {id} is not an edge of {g}, or is given twice through: {id} એ {g} ની edge નથી, અથવા બે વાર આપેલું છે +@msg thumbnail: no page {v} (the {what} has {count}) thumbnail: કોઈ પેજ {v} નથી ({what} માં {count} છે) +@msg tileRange of {what}: {e} {what} નું tileRange: {e} +@msg tiling ટાઇલિંગ +@msg time budget સમય મર્યાદા +@msg tintReduction must be from 0 to 100 % tintReduction 0 થી 100 % સુધી હોવું જોઈએ +@msg title can't be empty title ખાલી હોઈ શકે નહીં +@msg title must be a string title સ્ટ્રિંગ હોવું જોઈએ +@msg to (the new name) is required to (નવું નામ) જરૂરી છે +@msg to must be fill or stroke to એ fill અથવા stroke હોવું જોઈએ +@msg to must be smooth or corner to એ smooth અથવા corner હોવું જોઈએ +@msg toExponential() digits must be between 0 and 20 toExponential() ના અંકો 0 અને 20 ની વચ્ચે હોવા જોઈએ +@msg toFixed() digits must be between 0 and 20 toFixed() ના અંકો 0 અને 20 ની વચ્ચે હોવા જોઈએ +@msg toISOString is not a function toISOString ફંક્શન નથી +@msg toPrecision() argument must be between 1 and 21 toPrecision() નો આર્ગ્યુમેન્ટ 1 અને 21 ની વચ્ચે હોવો જોઈએ +@msg toSource: a Symbol cannot be written as source toSource: Symbol ને સોર્સ તરીકે લખી શકાતું નથી +@msg toSource: a getter cannot be written as source toSource: getter ને સોર્સ તરીકે લખી શકાતું નથી +@msg toSource: an array with properties besides its elements, a property that is not enumerable or another prototype cannot be written as source toSource: તેના એલિમેન્ટ્સ ઉપરાંત પ્રોપર્ટીઝ ધરાવતો array, enumerable ન હોય તેવી પ્રોપર્ટી અથવા બીજો prototype સોર્સ તરીકે લખી શકાતો નથી +@msg toSource: an object with a Symbol property cannot be written as source toSource: Symbol પ્રોપર્ટીવાળો ઑબ્જેક્ટ સોર્સ તરીકે લખી શકાતો નથી +@msg toSource: an object with a property that is not enumerable, or whose prototype is not Object.prototype, cannot be written as source toSource: enumerable ન હોય તેવી પ્રોપર્ટીવાળો, અથવા જેનો prototype Object.prototype નથી તેવો ઑબ્જેક્ટ સોર્સ તરીકે લખી શકાતો નથી +@msg toSource: the source is too long toSource: સોર્સ ખૂબ લાંબો છે +@msg toSource: the value contains itself toSource: વેલ્યૂ પોતાને જ સમાવે છે +@msg toSource: the value has too many entries toSource: વેલ્યૂમાં ખૂબ વધુ એન્ટ્રીઝ છે +@msg toSource: the value is nested too deep toSource: વેલ્યૂ ખૂબ ઊંડે નેસ્ટ થયેલી છે +@msg toString is not a function toString ફંક્શન નથી +@msg tolerance must be 0 or more tolerance 0 અથવા વધુ હોવું જોઈએ +@msg tolerance must be a number from 0 to 0.05 tolerance 0 થી 0.05 સુધીની સંખ્યા હોવી જોઈએ +@msg too large for a zip archive: package to a folder zip આર્કાઇવ માટે ખૂબ મોટું છે: ફોલ્ડરમાં પૅકેજ કરો +@msg too many Shaper edits ખૂબ વધુ Shaper ફેરફારો +@msg too many `points` (at most 100000) ખૂબ વધુ `points` (વધુમાં વધુ 100000) +@msg too many anchor points (limit {MAX_ANCHORS}) ખૂબ વધુ એન્કર બિંદુઓ (મર્યાદા {MAX_ANCHORS}) +@msg too many arguments ખૂબ વધુ આર્ગ્યુમેન્ટ્સ +@msg too many characters: at most {MAX_CHARS} ખૂબ વધુ અક્ષરો: વધુમાં વધુ {MAX_CHARS} +@msg too many classes ખૂબ વધુ ક્લાસ +@msg too many dots for this size: lower the frequency આ કદ માટે ખૂબ વધુ ટપકાં: ફ્રિક્વન્સી ઘટાડો +@msg too many filters over one file એક ફાઇલ પર ખૂબ વધુ ફિલ્ટર્સ +@msg too many groups ખૂબ વધુ ગ્રૂપ્સ +@msg too many layers for PSD (at most 32767) PSD માટે ખૂબ વધુ લેયર્સ (વધુમાં વધુ 32767) +@msg too many numbers or placeholders to replace: at most {MAX_MATCHES} બદલવા માટે ખૂબ વધુ સંખ્યાઓ અથવા પ્લેસહોલ્ડર્સ: વધુમાં વધુ {MAX_MATCHES} +@msg too many objects selected (at most 20000) ખૂબ વધુ ઑબ્જેક્ટ્સ પસંદ કરેલી છે (વધુમાં વધુ 20000) +@msg too many overlapping paths for Shaper Shaper માટે ખૂબ વધુ ઓવરલેપ થતા પાથ +@msg too many promises to combine જોડવા માટે ખૂબ વધુ promises +@msg too many quantifiers ખૂબ વધુ quantifiers +@msg too many saved clips ખૂબ વધુ સાચવેલી ક્લિપ્સ +@msg too many saved graphics states ખૂબ વધુ સાચવેલી ગ્રાફિક્સ સ્ટેટ્સ +@msg too many swatch exchange blocks ખૂબ વધુ સ્વેચ એક્સચેન્જ બ્લૉક્સ +@msg too many type objects: at most {MAX_TEXTS} ખૂબ વધુ ટાઇપ ઑબ્જેક્ટ્સ: વધુમાં વધુ {MAX_TEXTS} +@msg tool (a tool id) is required tool (ટૂલ id) જરૂરી છે +@msg toolbar (a toolbar's name) is required: only toolbars made with New Toolbar hold commands toolbar (ટૂલબારનું નામ) જરૂરી છે: ફક્ત નવું ટૂલબાર વડે બનાવેલાં ટૂલબારમાં જ કમાન્ડ્સ રહે છે +@msg toolbar (a toolbar's name) must be a string toolbar (ટૂલબારનું નામ) સ્ટ્રિંગ હોવું જોઈએ +@msg toolbar name can't be empty ટૂલબારનું નામ ખાલી હોઈ શકે નહીં +@msg top scope out of range ટોચનો scope શ્રેણીની બહાર છે +@msg tracking must be from -1000 to 10000 ટ્રેકિંગ -1000 થી 10000 સુધી હોવું જોઈએ +@msg transparencyDither must be {IDS}, not {v} transparencyDither {IDS} હોવું જોઈએ, {v} નહીં +@msg transparencyDitherAmount must be a whole number from 0 to 100, not {v} transparencyDitherAmount 0 થી 100 સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ, {v} નહીં +@msg transparentImages {v}: "flatten" (the default) or "omit" transparentImages {v}: "flatten" (ડિફૉલ્ટ) અથવા "omit" +@msg trim keeps the image's pixels as they are: leave out ppi trim ઇમેજના પિક્સેલ્સ જેમ છે તેમ રાખે છે: ppi છોડી દો +@msg true or false true અથવા false +@msg truncated ટૂંકાવેલું +@msg turn on Use Monitor Profile for Canvas first પહેલાં કેનવાસ માટે મોનિટર પ્રોફાઇલ વાપરો ચાલુ કરો +@msg turn on at least one side ઓછામાં ઓછી એક બાજુ ચાલુ કરો +@msg tutorial `{id}` has no practice sample ટ્યુટોરિયલ `{id}` માં કોઈ અભ્યાસ નમૂનો નથી +@msg two Kinsoku sets are named `{_1}` બે Kinsoku સેટ્સનું નામ `{_1}` છે +@msg two Kinsoku sets come from `{f}` બે Kinsoku સેટ્સ `{f}` માંથી આવે છે +@msg two character sets are named `{name}` બે અક્ષર સેટ્સનું નામ `{name}` છે +@msg two composite fonts are named `{_1}` બે કમ્પોઝિટ ફોન્ટ્સનું નામ `{_1}` છે +@msg two saved selections would be named `{_1}` બે સાચવેલી પસંદગીઓનું નામ `{_1}` થશે +@msg two shapes need a `radius` બે આકારોને `radius` જોઈએ +@msg type characters have no opacity of their own: add a fill or stroke with the Appearance panel's Add New Fill or Add New Stroke ટાઇપ અક્ષરોની પોતાની કોઈ અપારદર્શકતા નથી: દેખાવ પેનલના નવું ફિલ ઉમેરો અથવા નવો સ્ટ્રોક ઉમેરો વડે ફિલ અથવા સ્ટ્રોક ઉમેરો +@msg type dimension cannot be represented with this text transform આ ટેક્સ્ટ ટ્રાન્સફોર્મ સાથે ટાઇપ પરિમાણ દર્શાવી શકાતું નથી +@msg type dimension must be finite ટાઇપ પરિમાણ મર્યાદિત હોવું જોઈએ +@msg type must be static or dynamic, not {v} type એ static અથવા dynamic હોવું જોઈએ, {v} નહીં +@msg type needs at least one run ટાઇપને ઓછામાં ઓછો એક run જોઈએ +@msg type objects can't be isolated ટાઇપ ઑબ્જેક્ટ્સ અલગ કરી શકાતી નથી +@msg type on a path with no length or no height cannot be centered: {flat} લંબાઈ કે ઊંચાઈ વગરના પાથ પરના ટાઇપને કેન્દ્રમાં મૂકી શકાતો નથી: {flat} +@msg typing in progress isn't in what the plug-in was given: nothing was changed ચાલુ ટાઇપિંગ પ્લગ-ઇનને આપેલી સામગ્રીમાં નથી: કંઈ બદલાયું નથી +@msg ui.character.set needs value ui.character.set ને value જોઈએ +@msg ui.character.{action} needs {name} ui.character.{action} ને {name} જોઈએ +@msg ui.dock `{operation}` is not available in VectorCraft ui.dock `{operation}` VectorCraft માં ઉપલબ્ધ નથી +@msg ui.glyphs.glyphForm needs a form ui.glyphs.glyphForm ને form જોઈએ +@msg ui.glyphs.show needs a category ui.glyphs.show ને category જોઈએ +@msg unexpected host trap અનપેક્ષિત હોસ્ટ trap +@msg unexpected resources અનપેક્ષિત રિસોર્સિસ +@msg units must be a RulerUnits value units એ RulerUnits વેલ્યૂ હોવું જોઈએ +@msg units: px, pt, mm, cm or in એકમો: px, pt, mm, cm અથવા in +@msg unknown CMYK profile `{name}` અજાણી CMYK પ્રોફાઇલ `{name}` +@msg unknown File Info field `{k}` અજાણ્યું ફાઇલ માહિતી ફીલ્ડ `{k}` +@msg unknown OpenType feature `{t}` અજાણ્યું OpenType ફીચર `{t}` +@msg unknown OpenType feature `{t}` (liga, calt, dlig, smcp, frac, onum, tnum, ordn, swsh, ss01–ss20, salt, titl, pnum, lnum, sups, subs, numr, dnom, aalt, hkna, ital; prefix - to turn off; swsh, ss01–ss20, salt, titl, pnum, lnum, sups, subs, numr, dnom and aalt take an alternate's number as `tag=N` with N from 0 to {_1}, as `salt=2`) અજાણ્યું OpenType ફીચર `{t}` (liga, calt, dlig, smcp, frac, onum, tnum, ordn, swsh, ss01–ss20, salt, titl, pnum, lnum, sups, subs, numr, dnom, aalt, hkna, ital; બંધ કરવા માટે આગળ - લગાવો; swsh, ss01–ss20, salt, titl, pnum, lnum, sups, subs, numr, dnom અને aalt વૈકલ્પિકનો નંબર `tag=N` તરીકે લે છે, જ્યાં N 0 થી {_1} સુધી છે, જેમ કે `salt=2`) +@msg unknown OpenType feature `{t}` in featureChanges (the tags `features` takes) featureChanges માં અજાણ્યું OpenType ફીચર `{t}` (`features` જે ટૅગ્સ લે છે તે) +@msg unknown PDF preset `{name}` (presets: {_1}) અજાણ્યો PDF પ્રીસેટ `{name}` (પ્રીસેટ્સ: {_1}) +@msg unknown RGB profile `{name}` અજાણી RGB પ્રોફાઇલ `{name}` +@msg unknown Warp style અજાણી વૉર્પ સ્ટાઇલ +@msg unknown `by` "{name}": expected one of {_1} અજાણ્યું `by` "{name}": {_1} માંથી એક અપેક્ષિત હતું +@msg unknown align `{other}` અજાણ્યું align `{other}` +@msg unknown alignToPath `{a}` અજાણ્યું alignToPath `{a}` +@msg unknown arrowhead {v} અજાણ્યું arrowhead {v} +@msg unknown artboardLayout key `{k}` (layout, columns, rows, spacing, rightToLeft) અજાણી artboardLayout કી `{k}` (layout, columns, rows, spacing, rightToLeft) +@msg unknown attribute `{attribute}` અજાણ્યો એટ્રિબ્યૂટ `{attribute}` +@msg unknown attribute `{key}` અજાણ્યો એટ્રિબ્યૂટ `{key}` +@msg unknown attribute `{k}` અજાણ્યો એટ્રિબ્યૂટ `{k}` +@msg unknown axis `{other}` (vertical|horizontal|free) અજાણી અક્ષ `{other}` (vertical|horizontal|free) +@msg unknown blend mode `{b}` અજાણ્યો બ્લેન્ડ મોડ `{b}` +@msg unknown blend mode {b} અજાણ્યો બ્લેન્ડ મોડ {b} +@msg unknown blending mode; `blend` is one of {_1} અજાણ્યો બ્લેન્ડિંગ મોડ; `blend` આમાંથી એક છે: {_1} +@msg unknown brush type `{o}` અજાણ્યો બ્રશ પ્રકાર `{o}` +@msg unknown category `{category}`; one of {_1} અજાણી કૅટેગરી `{category}`; આમાંથી એક: {_1} +@msg unknown category `{c}` અજાણી કૅટેગરી `{c}` +@msg unknown category `{c}` ({_1}) અજાણી કૅટેગરી `{c}` ({_1}) +@msg unknown character `{c}` અજાણ્યો અક્ષર `{c}` +@msg unknown character attribute {key} અજાણ્યો અક્ષર એટ્રિબ્યૂટ {key} +@msg unknown character option {other} અજાણ્યો અક્ષર વિકલ્પ {other} +@msg unknown character style number field અજાણ્યું અક્ષર સ્ટાઇલ નંબર ફીલ્ડ +@msg unknown colour profile: {0} અજાણી રંગ પ્રોફાઇલ: {0} +@msg unknown command `{0}` અજાણ્યો કમાન્ડ `{0}` +@msg unknown command `{0}`; did you mean `{1}`? અજાણ્યો કમાન્ડ `{0}`; શું તમારો મતલબ `{1}` હતો? +@msg unknown command `{id}` અજાણ્યો કમાન્ડ `{id}` +@msg unknown command ui.character.{other} અજાણ્યો કમાન્ડ ui.character.{other} +@msg unknown command {SET_FOLD_ANGLE} અજાણ્યો કમાન્ડ {SET_FOLD_ANGLE} +@msg unknown control `{name}`: fillStroke, coloring, drawMode or screenMode અજાણ્યું કંટ્રોલ `{name}`: fillStroke, coloring, drawMode અથવા screenMode +@msg unknown dither `{d}` (diffusion, pattern, noise or none) અજાણ્યું dither `{d}` (diffusion, pattern, noise અથવા none) +@msg unknown docking command `{id}` અજાણ્યો ડૉકિંગ કમાન્ડ `{id}` +@msg unknown effect `{effect}` અજાણી ઇફેક્ટ `{effect}` +@msg unknown effect `{e}` અજાણી ઇફેક્ટ `{e}` +@msg unknown effect `{id}` અજાણી ઇફેક્ટ `{id}` +@msg unknown effect {_1} અજાણી ઇફેક્ટ {_1} +@msg unknown end {e} અજાણ્યો છેડો {e} +@msg unknown field `{field}` અજાણ્યું ફીલ્ડ `{field}` +@msg unknown field `{key}` અજાણ્યું ફીલ્ડ `{key}` +@msg unknown flattenerPreset `{name}` (High Resolution, Medium Resolution, Low Resolution or a saved one: see flattener.presets.list) અજાણ્યો flattenerPreset `{name}` (High Resolution, Medium Resolution, Low Resolution અથવા સાચવેલો એક: flattener.presets.list જુઓ) +@msg unknown format અજાણ્યું ફોર્મેટ +@msg unknown format `{f}` (Save writes {_1}) અજાણ્યું ફોર્મેટ `{f}` (સાચવો {_1} લખે છે) +@msg unknown format `{f}` (vcswatches, gpl, ase or css) અજાણ્યું ફોર્મેટ `{f}` (vcswatches, gpl, ase અથવા css) +@msg unknown freeform mode `{m}` (points, lines) અજાણ્યો ફ્રીફોર્મ મોડ `{m}` (points, lines) +@msg unknown from {f} અજાણ્યું from {f} +@msg unknown glyph form `{wanted}` અજાણ્યું ગ્લિફ સ્વરૂપ `{wanted}` +@msg unknown gradient kind `{k}` (linear, radial, conic, diamond, freeform) અજાણ્યો ગ્રેડિયન્ટ પ્રકાર `{k}` (linear, radial, conic, diamond, freeform) +@msg unknown graph type `{t}` અજાણ્યો ગ્રાફ પ્રકાર `{t}` +@msg unknown graphic style `{n}` અજાણી ગ્રાફિક સ્ટાઇલ `{n}` +@msg unknown grid colours `{name}` (one of {_1}) અજાણ્યા ગ્રિડ રંગો `{name}` ({_1} માંથી એક) +@msg unknown gridType `{t}` અજાણ્યો gridType `{t}` +@msg unknown highlight `{h}` અજાણ્યું હાઇલાઇટ `{h}` +@msg unknown highlight `{v}` અજાણ્યું હાઇલાઇટ `{v}` +@msg unknown intent `{intent}` અજાણ્યો intent `{intent}` +@msg unknown intent `{i}` અજાણ્યો intent `{i}` +@msg unknown issue kind {id} અજાણ્યો સમસ્યા પ્રકાર {id} +@msg unknown issue kind {v} અજાણ્યો સમસ્યા પ્રકાર {v} +@msg unknown key '{k}' અજાણી કી '{k}' +@msg unknown key `{k}`; a font takes name, parts and custom અજાણી કી `{k}`; ફોન્ટ name, parts અને custom લે છે +@msg unknown key `{k}`; a set takes {_1} અજાણી કી `{k}`; સેટ {_1} લે છે +@msg unknown key `{k}`; the keys here are {_1} અજાણી કી `{k}`; અહીંની કીઝ {_1} છે +@msg unknown knockout state {k} અજાણી knockout સ્થિતિ {k} +@msg unknown language `{language}` (one of {_1}) અજાણી ભાષા `{language}` ({_1} માંથી એક) +@msg unknown language `{l}` (one of {_1}) અજાણી ભાષા `{l}` ({_1} માંથી એક) +@msg unknown light setting: use color, intensity, rotation, height, softness or behind અજાણ્યું લાઇટ સેટિંગ: color, intensity, rotation, height, softness અથવા behind વાપરો +@msg unknown method `{m}` ({_1}) અજાણી પદ્ધતિ `{m}` ({_1}) +@msg unknown mode `{other}` (gray, rgb, hsb, lab, cmyk or web) અજાણ્યો મોડ `{other}` (gray, rgb, hsb, lab, cmyk અથવા web) +@msg unknown mode `{other}` (mono|cmyk) અજાણ્યો મોડ `{other}` (mono|cmyk) +@msg unknown mode `{other}` (rgb|cmyk|gray|global) અજાણ્યો મોડ `{other}` (rgb|cmyk|gray|global) +@msg unknown mode `{other}` (set, add, subtract) અજાણ્યો મોડ `{other}` (set, add, subtract) +@msg unknown mode `{o}` અજાણ્યો મોડ `{o}` +@msg unknown mode {m} અજાણ્યો મોડ {m} +@msg unknown model `{other}` અજાણ્યું મૉડલ `{other}` +@msg unknown model `{other}` (keep, new or document) અજાણ્યું મૉડલ `{other}` (keep, new અથવા document) +@msg unknown op {o} અજાણ્યું op {o} +@msg unknown option `{path}.{k}` અજાણ્યો વિકલ્પ `{path}.{k}` +@msg unknown order `{o}`: toggle, front, forward, backward or back અજાણ્યો ક્રમ `{o}`: toggle, front, forward, backward અથવા back +@msg unknown overprints `{o}` (preserve, simulate or discard) અજાણ્યું overprints `{o}` (preserve, simulate અથવા discard) +@msg unknown overprints `{v}` (preserve, simulate or discard) અજાણ્યું overprints `{v}` (preserve, simulate અથવા discard) +@msg unknown panel અજાણી પેનલ +@msg unknown panel `{panel}` અજાણી પેનલ `{panel}` +@msg unknown panel `{raw}` અજાણી પેનલ `{raw}` +@msg unknown paragraph command {id} અજાણ્યો ફકરા કમાન્ડ {id} +@msg unknown paragraph option {key} અજાણ્યો ફકરા વિકલ્પ {key} +@msg unknown parameter `{key}` અજાણ્યો પેરામીટર `{key}` +@msg unknown parameter `{key}`; `{object}` takes: {keys} અજાણ્યો પેરામીટર `{key}`; `{object}` આ લે છે: {keys} +@msg unknown parameter `{key}`; did you mean `{near}`? અજાણ્યો પેરામીટર `{key}`; શું તમારો મતલબ `{near}` હતો? +@msg unknown parameter `{key}`; the command takes no parameters અજાણ્યો પેરામીટર `{key}`; કમાન્ડ કોઈ પેરામીટર્સ લેતો નથી +@msg unknown parameter `{key}`; the command takes: {_1} અજાણ્યો પેરામીટર `{key}`; કમાન્ડ આ લે છે: {_1} +@msg unknown parameter `{key}`; the command takes: {keys} અજાણ્યો પેરામીટર `{key}`; કમાન્ડ આ લે છે: {keys} +@msg unknown parameter `{key}`; the command takes: {only} અજાણ્યો પેરામીટર `{key}`; કમાન્ડ આ લે છે: {only} +@msg unknown parameter `{key}`; {why_not} અજાણ્યો પેરામીટર `{key}`; {why_not} +@msg unknown parameter `{path}`; it takes: {keys} અજાણ્યો પેરામીટર `{path}`; તે આ લે છે: {keys} +@msg unknown parameter `{path}`; the object takes no keys અજાણ્યો પેરામીટર `{path}`; ઑબ્જેક્ટ કોઈ કીઝ લેતો નથી +@msg unknown permission `{shown}` અજાણી પરવાનગી `{shown}` +@msg unknown pieLegend `{v}` (none, standard or wedges) અજાણ્યું pieLegend `{v}` (none, standard અથવા wedges) +@msg unknown piePosition `{v}` (even, ratio or stacked) અજાણ્યું piePosition `{v}` (even, ratio અથવા stacked) +@msg unknown pieSort `{v}` (none, all or first) અજાણ્યું pieSort `{v}` (none, all અથવા first) +@msg unknown plate `{n}` અજાણી પ્લેટ `{n}` +@msg unknown preference `{key}` અજાણી પસંદગી `{key}` +@msg unknown preference `{k}` અજાણી પસંદગી `{k}` +@msg unknown preset (one of {_1}) અજાણ્યો પ્રીસેટ ({_1} માંથી એક) +@msg unknown preset `{name}` (high, medium, low or a saved one: see flattener.presets.list) અજાણ્યો પ્રીસેટ `{name}` (high, medium, low અથવા સાચવેલો એક: flattener.presets.list જુઓ) +@msg unknown preset `{name}` (see flattener.presets.list) અજાણ્યો પ્રીસેટ `{name}` (flattener.presets.list જુઓ) +@msg unknown preset `{name}` (see webExport.presets.list) અજાણ્યો પ્રીસેટ `{name}` (webExport.presets.list જુઓ) +@msg unknown preset `{name}`: not a built-in or saved preset (see imageTrace.presets) અજાણ્યો પ્રીસેટ `{name}`: બિલ્ટ-ઇન કે સાચવેલો પ્રીસેટ નથી (imageTrace.presets જુઓ) +@msg unknown profile {id} (see stroke.widthProfile.list) અજાણી પ્રોફાઇલ {id} (stroke.widthProfile.list જુઓ) +@msg unknown proof target `{target}` અજાણ્યું પ્રૂફ લક્ષ્ય `{target}` +@msg unknown proof target `{t}` અજાણ્યું પ્રૂફ લક્ષ્ય `{t}` +@msg unknown quotes key `{k}` (double, single) અજાણી quotes કી `{k}` (double, single) +@msg unknown reduction `{reduction}` (selective, perceptual, adaptive, web, gray, blackWhite, uniform or document) અજાણ્યું reduction `{reduction}` (selective, perceptual, adaptive, web, gray, blackWhite, uniform અથવા document) +@msg unknown resolution `{v}` અજાણ્યું રિઝોલ્યુશન `{v}` +@msg unknown role `{id}`: cut, crease, partialCut or perforation અજાણી ભૂમિકા `{id}`: cut, crease, partialCut અથવા perforation +@msg unknown role `{id}`: cut, crease, partialCut, perforation or none અજાણી ભૂમિકા `{id}`: cut, crease, partialCut, perforation અથવા none +@msg unknown rule `{rule}` ({_1}) અજાણ્યો નિયમ `{rule}` ({_1}) +@msg unknown rule `{r}` (see color.harmony) અજાણ્યો નિયમ `{r}` (color.harmony જુઓ) +@msg unknown setting `{k}` અજાણ્યું સેટિંગ `{k}` +@msg unknown shape `{v}` (circle|ellipse|square|diamond|line|euclidean|elliptical) અજાણ્યો આકાર `{v}` (circle|ellipse|square|diamond|line|euclidean|elliptical) +@msg unknown side `{other}` (left|right|top|bottom) અજાણી બાજુ `{other}` (left|right|top|bottom) +@msg unknown spacing `{o}` (smooth|steps|distance) અજાણ્યું spacing `{o}` (smooth|steps|distance) +@msg unknown tileType `{t}` ({_1}) અજાણ્યો tileType `{t}` ({_1}) +@msg unknown tool `{tool}` અજાણ્યું ટૂલ `{tool}` +@msg unknown tool `{t}` અજાણ્યું ટૂલ `{t}` +@msg unknown tool or command `{key}` અજાણ્યું ટૂલ અથવા કમાન્ડ `{key}` +@msg unknown tutorial `{id}` (see learn.list) અજાણ્યું ટ્યુટોરિયલ `{id}` (learn.list જુઓ) +@msg unknown ui.dock operation `{other}` અજાણ્યું ui.dock ઑપરેશન `{other}` +@msg unknown units અજાણ્યા એકમો +@msg unknown units `{u}` અજાણ્યા એકમો `{u}` +@msg unknown value axis `{v}` (left, right or both) અજાણી વેલ્યૂ અક્ષ `{v}` (left, right અથવા both) +@msg unknown variation `{v}` (tintsShades|warmCool|vividMuted) અજાણ્યું વેરિએશન `{v}` (tintsShades|warmCool|vividMuted) +@msg unknown warp style `{s}` અજાણી વૉર્પ શૈલી `{s}` +@msg unknown workspace (one of {_1}) અજાણ્યું વર્કસ્પેસ ({_1} માંથી એક) +@msg unknown {key} `{v}` (none, short or full) અજાણ્યું {key} `{v}` (none, short અથવા full) +@msg unknown {key} profile `{n}` અજાણી {key} પ્રોફાઇલ `{n}` +@msg unknown {k} key `{key}` (size, position) અજાણી {k} કી `{key}` (size, position) +@msg unmatched ')' મેળ વગરનો ')' +@msg unreadable object વાંચી ન શકાય એવો ઑબ્જેક્ટ +@msg unsafe destination file name ગંતવ્ય ફાઇલનું નામ સુરક્ષિત નથી +@msg unsupported: {0} સપોર્ટેડ નથી: {0} +@msg unterminated character class અક્ષર વર્ગ બંધ થયો નથી +@msg unterminated group ગ્રૂપ બંધ થયું નથી +@msg use paths or compound paths પાથ અથવા કમ્પાઉન્ડ પાથ વાપરો +@msg useArtboards must be true or false, not {v} useArtboards true અથવા false હોવું જોઈએ, {v} નહીં +@msg value for `{var}` must match its variable kind `{var}` માટેનું મૂલ્ય તેના વેરિએબલ પ્રકાર સાથે મેળ ખાતું હોવું જોઈએ +@msg variable `{_1}` is already defined વેરિએબલ `{_1}` પહેલેથી વ્યાખ્યાયિત છે +@msg variable `{_1}` starts or ends with white space or holds a control character, which a variable library can't hold વેરિએબલ `{_1}` ખાલી જગ્યાથી શરૂ કે સમાપ્ત થાય છે અથવા તેમાં કંટ્રોલ અક્ષર છે, જે વેરિએબલ લાઇબ્રેરી રાખી શકતી નથી +@msg variable `{name}` can't be saved in a variable library: rename it to start with a letter or `_`, without spaces or symbols other than `-`, `_` and `.` વેરિએબલ `{name}` વેરિએબલ લાઇબ્રેરીમાં સાચવી શકાતું નથી: તેનું નામ બદલો જેથી તે અક્ષર કે `_` થી શરૂ થાય, અને તેમાં ખાલી જગ્યા કે `-`, `_` અને `.` સિવાયનાં ચિહ્નો ન હોય +@msg variable `{name}` is a {_1} variable, and this slot takes a {_2} variable વેરિએબલ `{name}` {_1} વેરિએબલ છે, અને આ સ્લૉટ {_2} વેરિએબલ લે છે +@msg variable `{name}` is already defined વેરિએબલ `{name}` પહેલેથી વ્યાખ્યાયિત છે +@msg variable `{name}` is declared twice વેરિએબલ `{name}` બે વાર જાહેર કરેલું છે +@msg variable `{to}` already exists વેરિએબલ `{to}` પહેલેથી અસ્તિત્વમાં છે +@msg variables are locked વેરિએબલ્સ લૉક કરેલા છે +@msg variablesLocked must be true or false variablesLocked true અથવા false હોવું જોઈએ +@msg vc.document{place} is too large for a script vc.document{place} સ્ક્રિપ્ટ માટે ખૂબ મોટું છે +@msg vc.log(level, text) takes a level, 0 (error), 1 (warning), 2 (information) or 3 (debug), and a string vc.log(level, text) એક લેવલ, 0 (ભૂલ), 1 (ચેતવણી), 2 (માહિતી) અથવા 3 (ડીબગ), અને એક સ્ટ્રિંગ લે છે +@msg vc.log: the log of this run is full vc.log: આ રનનો લૉગ ભરાઈ ગયો છે +@msg vc.run: give a command id, as a string vc.run: કમાન્ડ id સ્ટ્રિંગ તરીકે આપો +@msg vc.run: takes a command id and an object of parameters vc.run: કમાન્ડ id અને પેરામીટર્સનો ઑબ્જેક્ટ લે છે +@msg vc.run: the parameters must be an object vc.run: પેરામીટર્સ ઑબ્જેક્ટ હોવા જોઈએ +@msg vc.run: the result{place} is too large for a script vc.run: પરિણામ{place} સ્ક્રિપ્ટ માટે ખૂબ મોટું છે +@msg vc_abi_version returned {v}; this host implements version {ABI_VERSION} vc_abi_version એ {v} પરત કર્યું; આ હોસ્ટ વર્ઝન {ABI_VERSION} અમલમાં મૂકે છે +@msg vc_alloc returned 0 (out of memory) vc_alloc એ 0 પરત કર્યું (મેમરી ખૂટી ગઈ) +@msg vc_alloc returned a block outside memory vc_alloc એ મેમરીની બહારનો બ્લૉક પરત કર્યો +@msg vc_call `{shown}`: the arguments are not a JSON object vc_call `{shown}`: આર્ગ્યુમેન્ટ્સ JSON ઑબ્જેક્ટ નથી +@msg vc_call `{shown}`: the id or the arguments are not UTF-8 vc_call `{shown}`: id અથવા આર્ગ્યુમેન્ટ્સ UTF-8 નથી +@msg vc_call `{shown}`: the id or the arguments lie outside the module's memory vc_call `{shown}`: id અથવા આર્ગ્યુમેન્ટ્સ મોડ્યુલની મેમરીની બહાર છે +@msg vc_call `{shown}`: the manifest's `commandAllowlist` doesn't list it vc_call `{shown}`: મેનિફેસ્ટના `commandAllowlist` માં તે સૂચિબદ્ધ નથી +@msg vc_call `{shown}`: {why} vc_call `{shown}`: {why} +@msg vc_run returned error code {packed} vc_run એ ભૂલ કોડ {packed} પરત કર્યો +@msg version {0} files can't be compressed: only version {COMPRESSED_SINCE} and later open compressed files વર્ઝન {0} ની ફાઇલો કમ્પ્રેસ કરી શકાતી નથી: ફક્ત વર્ઝન {COMPRESSED_SINCE} અને પછીનાં વર્ઝન કમ્પ્રેસ કરેલી ફાઇલો ખોલે છે +@msg verticalScale verticalScale +@msg videoRulerPixelAspectRatio must be a number from 0.1 to 10 videoRulerPixelAspectRatio 0.1 થી 10 સુધીની સંખ્યા હોવી જોઈએ +@msg view is required view જરૂરી છે +@msg view must be one of {_1} view {_1} માંથી એક હોવું જોઈએ +@msg warpStyle can only edit an applied Warp effect warpStyle ફક્ત લાગુ કરેલી વૉર્પ ઇફેક્ટ સંપાદિત કરી શકે છે +@msg width and height are at least 1 pixel પહોળાઈ અને ઊંચાઈ ઓછામાં ઓછી 1 પિક્સેલ હોવી જોઈએ +@msg width and height must be more than 0 and at most {limit} પહોળાઈ અને ઊંચાઈ 0 થી વધુ અને વધુમાં વધુ {limit} હોવી જોઈએ +@msg width and height must be positive પહોળાઈ અને ઊંચાઈ ધન હોવી જોઈએ +@msg width factors must be finite પહોળાઈના ગુણક મર્યાદિત હોવા જોઈએ +@msg width out of range પહોળાઈ શ્રેણીની બહાર છે +@msg width/height must be > 0 પહોળાઈ/ઊંચાઈ > 0 હોવી જોઈએ +@msg with New Art Has Basic Appearance off, new art takes the selected object's appearance: deselect it or turn the option on નવા આર્ટમાં મૂળભૂત દેખાવ બંધ હોય ત્યારે નવો આર્ટ પસંદ કરેલા ઑબ્જેક્ટનો દેખાવ લે છે: તેને નાપસંદ કરો અથવા વિકલ્પ ચાલુ કરો +@msg with no hem and no grommets there is nothing to mark વાળેલી કિનારી અને ગ્રોમેટ્સ વિના ચિહ્નિત કરવા માટે કંઈ નથી +@msg wordGap and lineGap need area type in the selection wordGap અને lineGap માટે પસંદગીમાં એરિયા ટાઇપ જોઈએ +@msg words of {_1} overlap at byte {a} {_1} ના શબ્દો બાઇટ {a} પર એકબીજા પર આવે છે +@msg x and y must be finite x અને y મર્યાદિત હોવા જોઈએ +@msg x and y must be finite numbers x અને y મર્યાદિત સંખ્યાઓ હોવી જોઈએ +@msg x and y must be given together x અને y સાથે આપવા જોઈએ +@msg x and y must both be numbers x અને y બંને સંખ્યાઓ હોવી જોઈએ +@msg x and y must both be numbers from -1000000 to 1000000 x અને y બંને -1000000 થી 1000000 સુધીની સંખ્યાઓ હોવી જોઈએ +@msg x, y, width and height must be finite x, y, પહોળાઈ અને ઊંચાઈ મર્યાદિત હોવાં જોઈએ +@msg xpath needs its variables as an object xpath ને તેના વેરિએબલ્સ ઑબ્જેક્ટ તરીકે જોઈએ +@msg xpath needs the expression as a string xpath ને એક્સપ્રેશન સ્ટ્રિંગ તરીકે જોઈએ +@msg zOrder needs a ZOrderMethod value zOrder ને ZOrderMethod મૂલ્ય જોઈએ +@msg zipped 1-bit PSD image data with prediction can't be read પ્રિડિક્શન સાથેનો ઝિપ કરેલો 1-bit PSD ઇમેજ ડેટા વાંચી શકાતો નથી +@msg zone is tab, center, left, right, top, bottom, above or below, not `{other}` zone tab, center, left, right, top, bottom, above અથવા below હોય છે, `{other}` નહીં +@msg zone needs an anchor: dock beside a panel with anchor, or in a new dock column with side (Start or End) zone ને anchor જોઈએ: anchor વડે પેનલની બાજુમાં ડૉક કરો, અથવા side (Start અથવા End) વડે નવી ડૉક કૉલમમાં +@msg zoom must be from {min} to {max} zoom {min} થી {max} સુધી હોવું જોઈએ +@msg zoom must be positive zoom ધન હોવું જોઈએ +@msg {BEVEL_NAME} must be a string {BEVEL_NAME} સ્ટ્રિંગ હોવી જોઈએ +@msg {BEVEL_PROFILE} must be 2 to {most} [x, y] points, each share between 0 and 1, from [0, 0] (the cap's edge) to [1, 1] (the side wall) {BEVEL_PROFILE} 2 થી {most} [x, y] બિંદુઓ હોવા જોઈએ, દરેક ભાગ 0 અને 1 ની વચ્ચે, [0, 0] (કૅપની કિનારી) થી [1, 1] (બાજુની દીવાલ) સુધી +@msg {C}: no effect at index {list} {C}: ઇન્ડેક્સ {list} પર કોઈ ઇફેક્ટ નથી +@msg {C}: {_1}: {e}: nothing was installed {C}: {_1}: {e}: કંઈ ઇન્સ્ટૉલ થયું નથી +@msg {DEFAULT_PRESET} is protected and stays {DEFAULT_PRESET} સુરક્ષિત છે અને રહે છે +@msg {DEFAULT_PRESET} is protected: save the settings under another name {DEFAULT_PRESET} સુરક્ષિત છે: સેટિંગ્સ બીજા નામે સાચવો +@msg {EXPORT_SELECTION} must be true or false, not {v} {EXPORT_SELECTION} true અથવા false હોવું જોઈએ, {v} નહીં +@msg {GRANT_NOT_REMOVED}, and its settings and cache can't be moved back from {_1} to {_2}: {e} {GRANT_NOT_REMOVED}, અને તેની સેટિંગ્સ અને કૅશ {_1} થી {_2} પર પાછાં ખસેડી શકાતાં નથી: {e} +@msg {LABEL} produced an empty result {LABEL} એ ખાલી પરિણામ આપ્યું +@msg {METRICS} is not available now {METRICS} અત્યારે ઉપલબ્ધ નથી +@msg {ON_LOCKED_ARTBOARD}: {list} {ON_LOCKED_ARTBOARD}: {list} +@msg {TRACE_PRESET_MAX_COUNT} tracing presets are saved, the most there can be: delete one first {TRACE_PRESET_MAX_COUNT} ટ્રેસિંગ પ્રીસેટ્સ સાચવેલા છે, જે મહત્તમ મર્યાદા છે: પહેલાં એક કાઢી નાખો +@msg {_1} MB of document, at most {_2} MB {_1} MB દસ્તાવેજ, વધુમાં વધુ {_2} MB +@msg {_1} MB of images, at most {_2} MB {_1} MB ઇમેજ, વધુમાં વધુ {_2} MB +@msg {_1} and {_2} must be the same here {_1} અને {_2} અહીં સમાન હોવા જોઈએ +@msg {_1} bytes of RGBA data for a {width} × {height} image {width} × {height} ઇમેજ માટે RGBA ડેટાના {_1} બાઇટ +@msg {_1} can't be read, or changed since it was read: relink or update it first {_1} વાંચી શકાતી નથી, અથવા વાંચ્યા પછી બદલાઈ ગઈ છે: પહેલાં તેને ફરી લિંક કરો અથવા અપડેટ કરો +@msg {_1} can't go into {into} {_1} {into} માં જઈ શકતું નથી +@msg {_1} cannot be removed {_1} દૂર કરી શકાતું નથી +@msg {_1} cannot be renamed {_1} નું નામ બદલી શકાતું નથી +@msg {_1} cannot hold objects {_1} માં ઑબ્જેક્ટ રાખી શકાતા નથી +@msg {_1} clashes with a built-in profile name {_1} બિલ્ટ-ઇન પ્રોફાઇલ નામ સાથે ટકરાય છે +@msg {_1} failed: {e} {_1} નિષ્ફળ: {e} +@msg {_1} false is not available yet: gradients move with the art {_1} false હજુ ઉપલબ્ધ નથી: ગ્રેડિયન્ટ્સ આર્ટ સાથે ખસે છે +@msg {_1} files are written by file.saveAsTemplate {_1} ફાઇલો file.saveAsTemplate વડે લખાય છે +@msg {_1} files can be opened but not written (see document.formats) {_1} ફાઇલો ખોલી શકાય છે પણ લખી શકાતી નથી (document.formats જુઓ) +@msg {_1} files can't be opened yet {_1} ફાઇલો હજુ ખોલી શકાતી નથી +@msg {_1} files need a creation date, and this platform has no clock to give one {_1} ફાઇલોને બનાવ્યાની તારીખ જોઈએ, અને આ પ્લેટફોર્મ પાસે તે આપવા માટે ઘડિયાળ નથી +@msg {_1} finished, but the document or the plug-in changed meanwhile: run it again {_1} પૂર્ણ થયું, પણ તે દરમિયાન દસ્તાવેજ અથવા પ્લગ-ઇન બદલાઈ ગયું: તેને ફરી ચલાવો +@msg {_1} font families available {_1} ફોન્ટ ફેમિલી ઉપલબ્ધ છે +@msg {_1} has no {_2} style {_1} માં {_2} સ્ટાઇલ નથી +@msg {_1} is a live effect (Effect › Plug-ins) {_1} લાઇવ ઇફેક્ટ છે (ઇફેક્ટ › પ્લગ-ઇન્સ) +@msg {_1} is an exporter (File › Export › Export As…) {_1} એક્સપોર્ટર છે (ફાઇલ › એક્સપોર્ટ › આ રીતે એક્સપોર્ટ કરો…) +@msg {_1} is an importer (File › Open With) {_1} ઇમ્પોર્ટર છે (ફાઇલ › આ વડે ખોલો) +@msg {_1} is listed twice {_1} બે વાર સૂચિબદ્ધ છે +@msg {_1} is not a file {_1} ફાઇલ નથી +@msg {_1} is not a folder: {e} {_1} ફોલ્ડર નથી: {e} +@msg {_1} is not a language tag like nl or pt-br {_1} nl અથવા pt-br જેવો ભાષા ટૅગ નથી +@msg {_1} is not a raster effect; a fill or stroke takes raster effects only {_1} રાસ્ટર ઇફેક્ટ નથી; ફિલ અથવા સ્ટ્રોક ફક્ત રાસ્ટર ઇફેક્ટ્સ લે છે +@msg {_1} is not a type object {_1} ટાઇપ ઑબ્જેક્ટ નથી +@msg {_1} is not the id of an input object {_1} ઇનપુટ ઑબ્જેક્ટનું id નથી +@msg {_1} is not type, an image or a symbol instance {_1} ટાઇપ, ઇમેજ અથવા સિમ્બોલ ઇન્સ્ટન્સ નથી +@msg {_1} is read-only {_1} ફક્ત વાંચવા માટે છે +@msg {_1} is {_2} bytes (limit {_3}) {_1} નું કદ {_2} બાઇટ છે (મર્યાદા {_3}) +@msg {_1} isn't a path {_1} પાથ નથી +@msg {_1} must be called with new {_1} ને new સાથે કૉલ કરવું જોઈએ +@msg {_1} objects (limit {MAX_OBJECTS}) {_1} ઑબ્જેક્ટ (મર્યાદા {MAX_OBJECTS}) +@msg {_1} options: {e} {_1} વિકલ્પો: {e} +@msg {_1} paints nothing to rasterize {_1} રાસ્ટરાઇઝ કરવા માટે કંઈ પેઇન્ટ કરતું નથી +@msg {_1} stopped: the document or the plug-in changed meanwhile: run it again {_1} અટક્યું: તે દરમિયાન દસ્તાવેજ અથવા પ્લગ-ઇન બદલાઈ ગયું: તેને ફરી ચલાવો +@msg {_1} with linked images or an image map writes several files: use document.export {_1} લિંક કરેલી ઇમેજ અથવા ઇમેજ મૅપ સાથે ઘણી ફાઇલો લખે છે: document.export વાપરો +@msg {_1} writes one file per artboard here: use document.export, or name one artboard {_1} અહીં દરેક આર્ટબોર્ડ માટે એક ફાઇલ લખે છે: document.export વાપરો, અથવા એક આર્ટબોર્ડનું નામ આપો +@msg {_1} × {_2} pixels is too large for GIF (at most 65535 pixels a side): lower the resolution {_1} × {_2} પિક્સેલ GIF માટે ખૂબ મોટું છે (દરેક બાજુ વધુમાં વધુ 65535 પિક્સેલ): રિઝોલ્યુશન ઘટાડો +@msg {_1} × {_2} pixels is too large for {_3} (at most {max} pixels a side): lower the scale {_1} × {_2} પિક્સેલ {_3} માટે ખૂબ મોટું છે (દરેક બાજુ વધુમાં વધુ {max} પિક્સેલ): સ્કેલ ઘટાડો +@msg {_1}: belongs to another account {_1}: બીજા એકાઉન્ટનું છે +@msg {_1}: no usable transform to/from sRGB {_1}: sRGB માં/થી વાપરી શકાય એવું રૂપાંતર નથી +@msg {_1}: not a JSON object {_1}: JSON ઑબ્જેક્ટ નથી +@msg {_1}: not a folder of its own {_1}: પોતાનું અલગ ફોલ્ડર નથી +@msg {_1}: not a plain file {_1}: સામાન્ય ફાઇલ નથી +@msg {_1}: not saved, so not closed {_1}: સાચવ્યું નથી, તેથી બંધ કર્યું નથી +@msg {_1}: the folder's path is not valid Unicode {_1}: ફોલ્ડરનો પાથ માન્ય Unicode નથી +@msg {_1}: the {_2} data does not give a press model {_1}: {_2} ડેટા પ્રેસ મૉડલ આપતો નથી +@msg {_1}: {_2} and {_3} are in the way {_1}: {_2} અને {_3} આડે આવે છે +@msg {_1}: {list} {_1}: {list} +@msg {at} gives two options the same label {at} બે વિકલ્પોને એક જ લેબલ આપે છે +@msg {at} has the unknown key `{_1}` {at} માં અજાણી કી `{_1}` છે +@msg {at} is a command.batch inside a command.batch {at} એ command.batch ની અંદરનું command.batch છે +@msg {at} is not a language code such as `de` or `pt-BR`, or repeats one given before it {at} `de` અથવા `pt-BR` જેવો ભાષા કોડ નથી, અથવા પહેલાં આપેલો કોડ ફરી આપે છે +@msg {at} must be 1-{max} printable characters, without direction or line-separator characters {at} માં 1-{max} છાપી શકાય એવા અક્ષરો હોવા જોઈએ, દિશા અથવા લાઇન-વિભાજક અક્ષરો વિના +@msg {at} must be an object {at} ઑબ્જેક્ટ હોવો જોઈએ +@msg {at} names or translates something the manifest doesn't declare {at} એવી વસ્તુનું નામ આપે છે અથવા અનુવાદ કરે છે જે મેનિફેસ્ટ જાહેર કરતું નથી +@msg {at}.command must be a command id {at}.command કમાન્ડ id હોવું જોઈએ +@msg {at}.params must be an object {at}.params ઑબ્જેક્ટ હોવો જોઈએ +@msg {at}.params.commands must be a list {at}.params.commands યાદી હોવી જોઈએ +@msg {at}.step must be a whole number from 1 to 1000000 {at}.step 1 થી 1000000 સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg {at}.steps must be a list {at}.steps યાદી હોવી જોઈએ +@msg {at}.{key} is longer than {MAX_NAME_BYTES} bytes {at}.{key} {MAX_NAME_BYTES} બાઇટ કરતાં લાંબું છે +@msg {at}.{key} must be a string {at}.{key} સ્ટ્રિંગ હોવી જોઈએ +@msg {at}: the action has more than {MAX_ACTION_STEPS} steps {at}: ક્રિયામાં {MAX_ACTION_STEPS} કરતાં વધુ પગલાં છે +@msg {at}: {msg} {at}: {msg} +@msg {a}..{b} is not a word of {_1}'s text {a}..{b} એ {_1} ના ટેક્સ્ટનો શબ્દ નથી +@msg {bytes} bytes of text (limit {MAX_INPUT_TEXT}) {bytes} બાઇટ ટેક્સ્ટ (મર્યાદા {MAX_INPUT_TEXT}) +@msg {class} has no option {name} {class} માં {name} વિકલ્પ નથી +@msg {class}.{key} must be a number {class}.{key} સંખ્યા હોવી જોઈએ +@msg {class}.{key} must be from {min} to {max} {class}.{key} {min} થી {max} સુધી હોવું જોઈએ +@msg {class}.{name} is not available yet {class}.{name} હજુ ઉપલબ્ધ નથી +@msg {code}: {0} {code}: {0} +@msg {command} didn't create an object {command} એ ઑબ્જેક્ટ બનાવ્યો નહીં +@msg {count} presets are more than one file holds ({TRACE_PRESET_MAX_COUNT}): export fewer with `names` {count} પ્રીસેટ્સ એક ફાઇલમાં સમાય તેના કરતાં વધુ છે ({TRACE_PRESET_MAX_COUNT}): `names` વડે ઓછા એક્સપોર્ટ કરો +@msg {depth}-bit PSD files in this colour mode can't be read {depth}-bit PSD ફાઇલો આ રંગ મોડમાં વાંચી શકાતી નથી +@msg {dest}: {e} {dest}: {e} +@msg {dir}: {e} {dir}: {e} +@msg {doc} has no folder {doc} નું કોઈ ફોલ્ડર નથી +@msg {e} ({sent} of {_1} print jobs were sent) {e} ({_1} માંથી {sent} પ્રિન્ટ જૉબ મોકલાઈ) +@msg {e}.{m} is not available yet {e}.{m} હજુ ઉપલબ્ધ નથી +@msg {e}; its editing data couldn't be read either ({why}) {e}; તેનો એડિટિંગ ડેટા પણ વાંચી શકાયો નહીં ({why}) +@msg {field} takes text {field} ટેક્સ્ટ લે છે +@msg {field}: {e} {field}: {e} +@msg {file} is not a plug-in that failed to load (see plugin.list's failed) {file} લોડ થવામાં નિષ્ફળ ગયેલું પ્લગ-ઇન નથી (plugin.list નું failed જુઓ) +@msg {file} isn't linked {file} લિંક કરેલી નથી +@msg {file} names more than one linked JavaScript file {file} એક કરતાં વધુ લિંક કરેલી JavaScript ફાઇલનાં નામ આપે છે +@msg {file}: larger than {MAX_FILE} bytes {file}: {MAX_FILE} બાઇટ કરતાં મોટી +@msg {folder} is not a package folder {folder} પેકેજ ફોલ્ડર નથી +@msg {folder}: more than {max} files and folders {folder}: {max} કરતાં વધુ ફાઇલો અને ફોલ્ડરો +@msg {folder}: the folder's path is not valid Unicode {folder}: ફોલ્ડરનો પાથ માન્ય Unicode નથી +@msg {folder}: {e} {folder}: {e} +@msg {g} is not a Live Paint group {g} લાઇવ પેઇન્ટ ગ્રૂપ નથી +@msg {ident} is not defined {ident} વ્યાખ્યાયિત નથી +@msg {ident} is used before it is initialized {ident} ઇનિશિયલાઇઝ થાય તે પહેલાં વપરાયું છે +@msg {id} is no top-level layer {id} ટોપ-લેવલ લેયર નથી +@msg {id} is not a slice {id} સ્લાઇસ નથી +@msg {id} is not available {id} ઉપલબ્ધ નથી +@msg {id} is not available now {id} અત્યારે ઉપલબ્ધ નથી +@msg {id} opens another app: only the person at the keyboard can run it {id} બીજી ઍપ ખોલે છે: ફક્ત કીબોર્ડ પર બેઠેલી વ્યક્તિ જ તેને ચલાવી શકે છે +@msg {key} cannot be set on a Repeat {key} પુનરાવર્તન પર સેટ કરી શકાતું નથી +@msg {key} cannot be set on a blend {key} બ્લેન્ડ પર સેટ કરી શકાતું નથી +@msg {key} cannot be set on a gradient mesh {key} ગ્રેડિયન્ટ મેશ પર સેટ કરી શકાતું નથી +@msg {key} cannot be set on a guide {key} ગાઇડ પર સેટ કરી શકાતું નથી +@msg {key} cannot be set on a placed document {key} પ્લેસ કરેલા દસ્તાવેજ પર સેટ કરી શકાતું નથી +@msg {key} cannot be set on an Intertwine group {key} ગૂંથેલા ગ્રૂપ પર સેટ કરી શકાતું નથી +@msg {key} cannot be set on an envelope {key} એન્વેલોપ પર સેટ કરી શકાતું નથી +@msg {key} cannot be set on an image without a Convert to Shape or Outline Object effect on it {key} એવી ઇમેજ પર સેટ કરી શકાતું નથી જેના પર આકારમાં રૂપાંતર કરો અથવા ઑબ્જેક્ટની આઉટલાઇન ઇફેક્ટ ન હોય +@msg {key} must be 0–{MAX_ADD_AROUND} pt {key} 0–{MAX_ADD_AROUND} pt હોવું જોઈએ +@msg {key} must be Unix seconds (an integer) or null {key} Unix સેકન્ડ (પૂર્ણાંક) અથવા null હોવું જોઈએ +@msg {key} must be [x, y] with finite coordinates {key} મર્યાદિત કોઑર્ડિનેટ્સ સાથે [x, y] હોવું જોઈએ +@msg {key} must be [x,y] {key} [x,y] હોવું જોઈએ +@msg {key} must be a finite coordinate {key} મર્યાદિત કોઑર્ડિનેટ હોવો જોઈએ +@msg {key} must be a name {key} નામ હોવું જોઈએ +@msg {key} must be a number from {min} to {max} {key} {min} થી {max} સુધીની સંખ્યા હોવી જોઈએ +@msg {key} must be a number from {min} to {max}, got {v} {key} {min} થી {max} સુધીની સંખ્યા હોવી જોઈએ, {v} મળ્યું +@msg {key} must be a paint object (color, none, swatch or gradient), got {v} {key} પેઇન્ટ ઑબ્જેક્ટ (color, none, swatch અથવા gradient) હોવો જોઈએ, {v} મળ્યું +@msg {key} must be a percentage {min}..100 {key} {min}..100 ટકાવારી હોવી જોઈએ +@msg {key} must be a positive number, not {n} {key} ધન સંખ્યા હોવી જોઈએ, {n} નહીં +@msg {key} must be a positive number, not {v} {key} ધન સંખ્યા હોવી જોઈએ, {v} નહીં +@msg {key} must be a string {key} સ્ટ્રિંગ હોવી જોઈએ +@msg {key} must be an array of non-negative integer object ids {key} ઋણ ન હોય એવા પૂર્ણાંક ઑબ્જેક્ટ id નો એરે હોવો જોઈએ +@msg {key} must be more than 0 and at most 3999856 points {key} 0 થી વધુ અને વધુમાં વધુ 3999856 પૉઇન્ટ હોવું જોઈએ +@msg {key} must be one of {_1} {key} {_1} માંથી એક હોવું જોઈએ +@msg {key} must be true or false, got {v} {key} true અથવા false હોવું જોઈએ, {v} મળ્યું +@msg {key} must be {_1}, got {s} {key} {_1} હોવું જોઈએ, {s} મળ્યું +@msg {key} must name a floating panel {key} ફ્લોટિંગ પેનલનું નામ હોવું જોઈએ +@msg {key} must name a panel in another group {key} બીજા ગ્રૂપની પેનલનું નામ હોવું જોઈએ +@msg {key} must name a panel that shows {key} દેખાતી પેનલનું નામ હોવું જોઈએ +@msg {key} must name a registered panel {key} નોંધાયેલી પેનલનું નામ હોવું જોઈએ +@msg {key}: U+{_1} is a control or space character {key}: U+{_1} કંટ્રોલ અથવા સ્પેસ અક્ષર છે +@msg {key}: `swatch` must be a swatch name {key}: `swatch` સ્વેચનું નામ હોવું જોઈએ +@msg {key}: `tint` goes with a global or spot `swatch` {key}: `tint` ગ્લોબલ અથવા સ્પૉટ `swatch` સાથે જ આવે છે +@msg {key}: at most {KINSOKU_CATEGORY_MAX} characters {key}: વધુમાં વધુ {KINSOKU_CATEGORY_MAX} અક્ષરો +@msg {key}: give color, none, swatch or gradient {key}: color, none, swatch અથવા gradient આપો +@msg {key}: unknown setting `{k}` (a paint takes {_1}) {key}: અજાણી સેટિંગ `{k}` (પેઇન્ટ {_1} લે છે) +@msg {kind} files have no transparency, and the file would have {what}: flatten it first (object.flattenTransparency) {kind} ફાઇલોમાં પારદર્શિતા હોતી નથી, અને ફાઇલમાં {what} હશે: પહેલાં તેને ફ્લેટન કરો (object.flattenTransparency) +@msg {kind} images can't be opened (see document.formats) {kind} ઇમેજ ખોલી શકાતી નથી (document.formats જુઓ) +@msg {k} `{v}` is not one of the choices {k} `{v}` વિકલ્પોમાંથી એક નથી +@msg {k} has control characters {k} માં કંટ્રોલ અક્ષરો છે +@msg {k} has control characters or line breaks {k} માં કંટ્રોલ અક્ષરો અથવા લાઇન બ્રેક છે +@msg {k} is too long (at most {MAX_TEXT} characters) {k} ખૂબ લાંબું છે (વધુમાં વધુ {MAX_TEXT} અક્ષરો) +@msg {k} must be > 0 {k} > 0 હોવું જોઈએ +@msg {k} must be a number (pt) or a length such as "210 mm" {k} સંખ્યા (pt) અથવા "210 mm" જેવી લંબાઈ હોવી જોઈએ +@msg {k} must be a number from {min} to {max} {k} {min} થી {max} સુધીની સંખ્યા હોવી જોઈએ +@msg {k} must be a number or "auto" {k} સંખ્યા અથવા "auto" હોવું જોઈએ +@msg {k} must be a string {k} સ્ટ્રિંગ હોવી જોઈએ +@msg {k} must be text {k} ટેક્સ્ટ હોવું જોઈએ +@msg {k} must be true or false {k} true અથવા false હોવું જોઈએ +@msg {k} must be {{size?, position?}} {k} {{size?, position?}} હોવું જોઈએ +@msg {k}: a custom arrowhead's path needs an area to fill and at most {most} anchors and {most} subpaths, each anchor within {far} head units of its tip {k}: કસ્ટમ એરોહેડના પાથને ભરવા માટે ક્ષેત્રફળ જોઈએ અને વધુમાં વધુ {most} એન્કર અને {most} સબપાથ, દરેક એન્કર તેની ટોચથી {far} હેડ એકમોની અંદર +@msg {k}: bad custom arrowhead path: {e} {k}: ખોટો કસ્ટમ એરોહેડ પાથ: {e} +@msg {k}: bad custom arrowhead: {e} {k}: ખોટો કસ્ટમ એરોહેડ: {e} +@msg {k}: baseline must be {_1} to {_2}% {k}: બેઝલાઇન {_1} થી {_2}% હોવી જોઈએ +@msg {k}: can't read `{s}` as a length {k}: `{s}` ને લંબાઈ તરીકે વાંચી શકાતું નથી +@msg {k}: custom must be a name {k}: custom નામ હોવું જોઈએ +@msg {k}: give a font {k}: ફોન્ટ આપો +@msg {k}: only kana can be scaled at the center {k}: ફક્ત કાના જ કેન્દ્રમાં સ્કેલ કરી શકાય છે +@msg {k}: only kana, roman and numerals can be scaled {k}: ફક્ત કાના, રોમન અને અંકો જ સ્કેલ કરી શકાય છે +@msg {k}: scale must be {_1} to {_2}% {k}: સ્કેલ {_1} થી {_2}% હોવો જોઈએ +@msg {k}: size must be {_1} to {_2}% {k}: કદ {_1} થી {_2}% હોવું જોઈએ +@msg {label} draws no faces for this object {label} આ ઑબ્જેક્ટ માટે કોઈ ફેસ દોરતું નથી +@msg {label} draws the source art for this object instead of its 3D surface {label} આ ઑબ્જેક્ટ માટે તેની 3D સપાટીને બદલે મૂળ આર્ટ દોરે છે +@msg {label} failed: {e} {label} નિષ્ફળ: {e} +@msg {label} files hold real numbers up to {max}, and the page of artboard {n}, {side} pt long, needs larger ones: choose PDF 1.6 or later without a PDF/X standard, or a smaller artboard {label} ફાઇલો {max} સુધીની વાસ્તવિક સંખ્યાઓ રાખે છે, અને આર્ટબોર્ડ {n} ના પેજને, જે {side} pt લાંબું છે, તેનાથી મોટી સંખ્યાઓ જોઈએ: PDF/X ધોરણ વિના PDF 1.6 કે પછીનું પસંદ કરો, અથવા નાનું આર્ટબોર્ડ +@msg {label} must be a number {label} સંખ્યા હોવી જોઈએ +@msg {label} must be a number at most {max} {label} વધુમાં વધુ {max} હોય એવી સંખ્યા હોવી જોઈએ +@msg {label} must be a number from -1296 to 1296 {label} -1296 થી 1296 સુધીની સંખ્યા હોવી જોઈએ +@msg {label} must be a number from 1 to 10000 {label} 1 થી 10000 સુધીની સંખ્યા હોવી જોઈએ +@msg {label} must be a number from {min} to {max} {label} {min} થી {max} સુધીની સંખ્યા હોવી જોઈએ +@msg {label} must be a number of at least 0.1 {label} ઓછામાં ઓછું 0.1 હોય એવી સંખ્યા હોવી જોઈએ +@msg {label} must be a whole number from {min} to {max} {label} {min} થી {max} સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg {label} must be at most {max} characters {label} વધુમાં વધુ {max} અક્ષરોનું હોવું જોઈએ +@msg {label} must be one character {label} એક અક્ષર હોવો જોઈએ +@msg {label} on a group needs paths, compound paths, type, groups, clipping groups, blends and symbol instances: release or expand its {what} first. {label} ને ગ્રૂપ પર લાગુ કરવા માટે પાથ, કમ્પાઉન્ડ પાથ, ટાઇપ, ગ્રૂપ, ક્લિપિંગ ગ્રૂપ, બ્લેન્ડ અને સિમ્બોલ ઇન્સ્ટન્સ જોઈએ: પહેલાં તેના {what} રિલીઝ કરો અથવા એક્સપાન્ડ કરો. +@msg {label} on a group takes at most {MAX_MEMBERS} objects {label} ગ્રૂપ પર વધુમાં વધુ {MAX_MEMBERS} ઑબ્જેક્ટ લે છે +@msg {label} produced an empty result {label} એ ખાલી પરિણામ આપ્યું +@msg {label} produced an empty result: a line or other open path encloses no area; to include it, apply Object › Path › Outline Stroke to it first {label} એ ખાલી પરિણામ આપ્યું: રેખા કે અન્ય ખુલ્લો પાથ કોઈ ક્ષેત્રફળ ઘેરતો નથી; તેને સામેલ કરવા, પહેલાં તેના પર ઑબ્જેક્ટ › પાથ › સ્ટ્રોકની આઉટલાઇન લાગુ કરો +@msg {label} requires a group holding a shape with at least two anchors {label} માટે ઓછામાં ઓછા બે એન્કરવાળો શેપ ધરાવતું ગ્રૂપ જરૂરી છે +@msg {label} requires a shape with at least two anchors {label} માટે ઓછામાં ઓછા બે એન્કરવાળો શેપ જરૂરી છે +@msg {label}: lost track of a shape's style {label}: શેપની સ્ટાઇલનો ટ્રૅક ખોવાઈ ગયો +@msg {label}: select paths {label}: પાથ પસંદ કરો +@msg {label}: select paths, compound paths, groups or text {label}: પાથ, કમ્પાઉન્ડ પાથ, ગ્રૂપ અથવા ટેક્સ્ટ પસંદ કરો +@msg {label}: the clipping masks hide the selected art {label}: ક્લિપિંગ માસ્ક પસંદ કરેલા આર્ટને છુપાવે છે +@msg {label}: {e} to cut with the open paths; select fewer paths {label}: ખુલ્લા પાથ વડે કાપવા માટે {e}; ઓછા પાથ પસંદ કરો +@msg {label}… {label}… +@msg {message} (no window to ask in) {message} (પૂછવા માટે કોઈ વિન્ડો નથી) +@msg {message}: {path} {message}: {path} +@msg {method} needs a File {method} ને File જોઈએ +@msg {mode_key} is one of {ERASER_MODES}, not `{id}` {mode_key} {ERASER_MODES} માંથી એક હોય છે, `{id}` નહીં +@msg {mode_key} is one of {ERASER_MODES}, not {other} {mode_key} {ERASER_MODES} માંથી એક હોય છે, {other} નહીં +@msg {name} Iterator.prototype.next was called on a value that is not a {name} Iterator {name} Iterator.prototype.next ને એવા મૂલ્ય પર કૉલ કરવામાં આવ્યું જે {name} Iterator નથી +@msg {name} `{s}`: {ids} {name} `{s}`: {ids} +@msg {name} is a default SVG filter, and the document holds no copy of it to delete {name} ડિફૉલ્ટ SVG ફિલ્ટર છે, અને દસ્તાવેજમાં કાઢી નાખવા માટે તેની કોઈ નકલ નથી +@msg {name} is built in and can't be deleted {name} બિલ્ટ-ઇન છે અને કાઢી નાખી શકાતું નથી +@msg {name} is not a CMYK profile {name} CMYK પ્રોફાઇલ નથી +@msg {name} is not a function {name} ફંક્શન નથી +@msg {name} is not an RGB profile {name} RGB પ્રોફાઇલ નથી +@msg {name} must be a TextFrame or null {name} TextFrame અથવા null હોવું જોઈએ +@msg {name} must be a finite number {name} મર્યાદિત સંખ્યા હોવી જોઈએ +@msg {name} must be called with new {name} ને new સાથે કૉલ કરવું જોઈએ +@msg {name} must be from -1296 to 1296 points {name} -1296 થી 1296 પૉઇન્ટ સુધી હોવું જોઈએ +@msg {name} must be from 1 to 10000 percent {name} 1 થી 10000 ટકા સુધી હોવું જોઈએ +@msg {name} must be {range} (got {v}) {name} {range} હોવું જોઈએ ({v} મળ્યું) +@msg {name}.prototype.{method} was called on a value that is not a {name} {name}.prototype.{method} ને એવા મૂલ્ય પર કૉલ કરવામાં આવ્યું જે {name} નથી +@msg {name}: CRC or size mismatch {name}: CRC અથવા કદ મેળ ખાતાં નથી +@msg {name}: `answers` has no answer left for this dialog {name}: `answers` માં આ ડાયલોગ માટે કોઈ જવાબ બાકી નથી +@msg {name}: a dialog cannot open inside a callback of a built-in function, a getter, a conversion or a file $.evalFile runs; call it from the script's own code {name}: બિલ્ટ-ઇન ફંક્શનના કૉલબૅક, getter, રૂપાંતર અથવા $.evalFile ચલાવે છે તે ફાઇલની અંદર ડાયલોગ ખૂલી શકતો નથી; તેને સ્ક્રિપ્ટના પોતાના કોડમાંથી કૉલ કરો +@msg {name}: a file dialog cannot open inside a callback of a built-in function, a getter, a conversion or a file $.evalFile runs; call it from the script's own code {name}: બિલ્ટ-ઇન ફંક્શનના કૉલબૅક, getter, રૂપાંતર અથવા $.evalFile ચલાવે છે તે ફાઇલની અંદર ફાઇલ ડાયલોગ ખૂલી શકતો નથી; તેને સ્ક્રિપ્ટના પોતાના કોડમાંથી કૉલ કરો +@msg {name}: give a message {name}: સંદેશ આપો +@msg {name}: give the text the field starts with {name}: ફીલ્ડ જે ટેક્સ્ટથી શરૂ થાય તે આપો +@msg {name}: larger than {MAX_FILE} bytes {name}: {MAX_FILE} બાઇટ કરતાં મોટી +@msg {name}: no local header {name}: કોઈ લોકલ હેડર નથી +@msg {name}: no such recovery entry {name}: આવી કોઈ રિકવરી એન્ટ્રી નથી +@msg {name}: only area type and type on a path can be threaded {name}: ફક્ત એરિયા ટાઇપ અને પાથ પર ટાઇપ જ થ્રેડ કરી શકાય છે +@msg {name}: only this Affinity file's embedded preview could be read; use File › Open to see it with its warning, or export SVG or PDF from Affinity before placing {name}: આ Affinity ફાઇલનું ફક્ત એમ્બેડ કરેલું પ્રીવ્યૂ જ વાંચી શકાયું; તેને તેની ચેતવણી સાથે જોવા ફાઇલ › ખોલો વાપરો, અથવા પ્લેસ કરતાં પહેલાં Affinity માંથી SVG અથવા PDF એક્સપોર્ટ કરો +@msg {name}: the constructor property is not an object {name}: constructor પ્રોપર્ટી ઑબ્જેક્ટ નથી +@msg {name}: the message is longer than 16 KiB {name}: સંદેશ 16 KiB કરતાં લાંબો છે +@msg {name}: the next answer in `answers` is for {_1}, not {name} {name}: `answers` માંનો આગળનો જવાબ {_1} માટે છે, {name} માટે નહીં +@msg {name}: the text the field starts with is longer than 16 KiB {name}: ફીલ્ડ જે ટેક્સ્ટથી શરૂ થાય છે તે 16 KiB કરતાં લાંબું છે +@msg {name}: the title is longer than 256 bytes {name}: શીર્ષક 256 બાઇટ કરતાં લાંબું છે +@msg {name}: the two frames are in different documents {name}: બંને ફ્રેમ જુદા જુદા દસ્તાવેજોમાં છે +@msg {name}: {err} {name}: {err} +@msg {name}: {e} {name}: {e} +@msg {name}: {m} {name}: {m} +@msg {native}; its embedded preview can't be read either ({e}) {native}; તેનું એમ્બેડ કરેલું પ્રીવ્યૂ પણ વાંચી શકાતું નથી ({e}) +@msg {none} (give ids, id or item to edit an object's) {none} (ઑબ્જેક્ટનું સંપાદિત કરવા ids, id અથવા item આપો) +@msg {noun} {_1} cannot be distorted this way: it is being edited flat in Edit Text {noun} {_1} ને આ રીતે વિકૃત કરી શકાતું નથી: તેને ટેક્સ્ટ સંપાદિત કરો માં સપાટ રીતે સંપાદિત કરવામાં આવી રહ્યું છે +@msg {noun} {_1} cannot be distorted this way: its corners would be too close together for a perspective map {noun} {_1} ને આ રીતે વિકૃત કરી શકાતું નથી: પરસ્પેક્ટિવ મૅપ માટે તેના ખૂણા એકબીજાની ખૂબ નજીક આવી જશે +@msg {noun} {_1} cannot be distorted this way: its corners would cross the warp's horizon {noun} {_1} ને આ રીતે વિકૃત કરી શકાતું નથી: તેના ખૂણા વૉર્પની ક્ષિતિજ ઓળંગી જશે +@msg {noun} {_1} cannot be distorted this way: its corners would not make a convex shape {noun} {_1} ને આ રીતે વિકૃત કરી શકાતું નથી: તેના ખૂણા બહિર્ગોળ શેપ નહીં બનાવે +@msg {paragraphs} paragraphs (limit {MAX_INPUT_RUNS}) {paragraphs} ફકરા (મર્યાદા {MAX_INPUT_RUNS}) +@msg {path} can't be found: relink it first {path} મળ્યું નહીં: પહેલાં તેને ફરી લિંક કરો +@msg {path} is not a folder {path} ફોલ્ડર નથી +@msg {path}: copy takes a DCS file only when its plates are inside it; relink to it where its plate files are {path}: copy DCS ફાઇલ ત્યારે જ લે છે જ્યારે તેની પ્લેટ્સ તેની અંદર હોય; તેની પ્લેટ ફાઇલો જ્યાં હોય ત્યાં તેને ફરી લિંક કરો +@msg {path}: could not be read {path}: વાંચી શકાયું નહીં +@msg {path}: invalid pixel buffer {path}: અમાન્ય પિક્સેલ બફર +@msg {path}: larger than {_1} MB {path}: {_1} MB કરતાં મોટી +@msg {path}: no file system here (pass dataBase64 to open; omit the path to get dataBase64) {path}: અહીં કોઈ ફાઇલ સિસ્ટમ નથી (ખોલવા માટે dataBase64 આપો; dataBase64 મેળવવા પાથ છોડી દો) +@msg {path}: not a PNG, JPEG, WebP, TIFF or BMP image {path}: PNG, JPEG, WebP, TIFF અથવા BMP ઇમેજ નથી +@msg {path}: not a file {path}: ફાઇલ નથી +@msg {path}: {error} {path}: {error} +@msg {path}: {e} {path}: {e} +@msg {saving} failed: {e} {saving} નિષ્ફળ: {e} +@msg {shown} is not an XPath 1.0 function {shown} XPath 1.0 ફંક્શન નથી +@msg {source} is not a gradient {source} ગ્રેડિયન્ટ નથી +@msg {status} ({e}) {status} ({e}) +@msg {std} files are CMYK, and the file would have colours in {_1} {std} ફાઇલો CMYK હોય છે, અને ફાઇલમાં {_1} માં રંગો હશે +@msg {std} files embed their fonts, and the file would have one that isn't {std} ફાઇલો તેમના ફોન્ટ એમ્બેડ કરે છે, અને ફાઇલમાં એક એવો ફોન્ટ હશે જે એમ્બેડ થયેલો નથી +@msg {target} is the file this document was read from, and reading it left things out ({what}): writing over it would lose them for good. Write another file instead, or pass acknowledgeLoss: true to replace it anyway {target} એ ફાઇલ છે જેમાંથી આ દસ્તાવેજ વાંચવામાં આવ્યો હતો, અને તેને વાંચતી વખતે કેટલીક વસ્તુઓ છૂટી ગઈ ({what}): તેના પર લખવાથી તે કાયમ માટે ગુમ થઈ જશે. તેના બદલે બીજી ફાઇલ લખો, અથવા છતાં બદલવા માટે acknowledgeLoss: true આપો +@msg {title}: not saved, so not closed {title}: સાચવ્યું નથી, તેથી બંધ કર્યું નથી +@msg {tool} isn't in a toolbar group of several tools {tool} ઘણાં ટૂલ્સવાળા ટૂલબાર ગ્રૂપમાં નથી +@msg {ty} brushes need selected art (or params.{k}) {ty} બ્રશને પસંદ કરેલો આર્ટ જોઈએ (અથવા params.{k}) +@msg {var_key} must be 0 or more {var_key} 0 અથવા વધુ હોવું જોઈએ +@msg {var_key} must be at most {most} {var_key} વધુમાં વધુ {most} હોવું જોઈએ +@msg {v} is not an asset id {v} એસેટ id નથી +@msg {v} names no layer or sublayer {v} કોઈ લેયર કે સબલેયરનું નામ નથી +@msg {what} can't be exported in 3D: {e} {what} 3D માં એક્સપોર્ટ કરી શકાતું નથી: {e} +@msg {what} can't be intertwined {what} ને ગૂંથી શકાતું નથી +@msg {what} doesn't fit the paper with its bleed and marks {what} તેના બ્લીડ અને ચિહ્નો સાથે કાગળમાં સમાતું નથી +@msg {what} is at most {max} {what} વધુમાં વધુ {max} હોય છે +@msg {what} is not a function {what} ફંક્શન નથી +@msg {what} is not available yet {what} હજુ ઉપલબ્ધ નથી +@msg {what} is not iterable {what} પર ઇટરેટ કરી શકાતું નથી +@msg {what} is outside the canvas {what} કેનવાસની બહાર છે +@msg {what} is too long {what} ખૂબ લાંબું છે +@msg {what} must be a File {what} File હોવું જોઈએ +@msg {what} must be a color object {what} રંગ ઑબ્જેક્ટ હોવો જોઈએ +@msg {what} must be a finite number {what} મર્યાદિત સંખ્યા હોવી જોઈએ +@msg {what} must be a number {what} સંખ્યા હોવી જોઈએ +@msg {what} must be a string {what} સ્ટ્રિંગ હોવી જોઈએ +@msg {what} must be a string or a number {what} સ્ટ્રિંગ અથવા સંખ્યા હોવી જોઈએ +@msg {what} must be a whole number from 1 or a range {what} 1 થી શરૂ થતી પૂર્ણ સંખ્યા અથવા શ્રેણી હોવી જોઈએ +@msg {what} must be a whole number from {lo} to {hi} {what} {lo} થી {hi} સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg {what} must be a whole number from {min} to {max} {what} {min} થી {max} સુધીની પૂર્ણ સંખ્યા હોવી જોઈએ +@msg {what} must be a {c} {what} {c} હોવું જોઈએ +@msg {what} must be a {enumeration} value {what} {enumeration} મૂલ્ય હોવું જોઈએ +@msg {what} must be a {e} value {what} {e} મૂલ્ય હોવું જોઈએ +@msg {what} must be an array of lengths {what} લંબાઈઓનો એરે હોવો જોઈએ +@msg {what} must be an array of two numbers {what} બે સંખ્યાઓનો એરે હોવો જોઈએ +@msg {what} must be an integer from 0 to 2^53 - 1 {what} 0 થી 2^53 - 1 સુધીનો પૂર્ણાંક હોવો જોઈએ +@msg {what} must be an object {what} ઑબ્જેક્ટ હોવો જોઈએ +@msg {what} must be at least 1 and at most 776.19 {what} ઓછામાં ઓછું 1 અને વધુમાં વધુ 776.19 હોવું જોઈએ +@msg {what} must be from 0 to 3999856 points {what} 0 થી 3999856 પૉઇન્ટ સુધી હોવું જોઈએ +@msg {what} must be from {lo} to {hi} {what} {lo} થી {hi} સુધી હોવું જોઈએ +@msg {what} must be more than 0 and at most 3999856 points {what} 0 થી વધુ અને વધુમાં વધુ 3999856 પૉઇન્ટ હોવું જોઈએ +@msg {what} must be true or false {what} true અથવા false હોવું જોઈએ +@msg {what} must name a {kind} {what} કોઈ {kind} નું નામ હોવું જોઈએ +@msg {what} names no {kind}: {name} {what} કોઈ {kind} નું નામ નથી: {name} +@msg {what} needs a File {what} ને File જોઈએ +@msg {what} needs a length that is not 0 {what} ને 0 ન હોય એવી લંબાઈ જોઈએ +@msg {what} points outside memory {what} મેમરીની બહાર નિર્દેશ કરે છે +@msg {what} takes at most {MAX_DASHES} lengths {what} વધુમાં વધુ {MAX_DASHES} લંબાઈઓ લે છે +@msg {what} would print more than {MAX_COPIES_PER_SHEET} copies on a sheet: scale it up {what} એક શીટ પર {MAX_COPIES_PER_SHEET} કરતાં વધુ નકલો છાપશે: તેને મોટું કરો +@msg {what} would print on more than {MAX_TILES} tiles: scale it down {what} {MAX_TILES} કરતાં વધુ ટાઇલ પર છપાશે: તેને નાનું કરો +@msg {what} {i} out of range {what} {i} શ્રેણીની બહાર છે +@msg {what}.next was called on a value that is not an {what} {what}.next ને એવા મૂલ્ય પર કૉલ કરવામાં આવ્યું જે {what} નથી +@msg {what}: an invalid UnitValue cannot be converted or calculated with {what}: અમાન્ય UnitValue ને રૂપાંતરિત કરી શકાતું નથી કે તેનાથી ગણતરી કરી શકાતી નથી +@msg {what}: the XMP data is too large {what}: XMP ડેટા ખૂબ મોટો છે +@msg {what}: the XMP packet is not well-formed XMP {what}: XMP પૅકેટ યોગ્ય રીતે બનેલું XMP નથી +@msg {what}: the array index {index} is out of range {what}: એરે ઇન્ડેક્સ {index} શ્રેણીની બહાર છે +@msg {what}: the base must be null or a UnitValue of a length greater than 0 {what}: બેઝ null અથવા 0 થી મોટી લંબાઈનું UnitValue હોવું જોઈએ +@msg {what}: the count must be a finite number, 0 or more {what}: કાઉન્ટ 0 અથવા વધુની મર્યાદિત સંખ્યા હોવી જોઈએ +@msg {what}: the file cannot be updated {what}: ફાઇલ અપડેટ કરી શકાતી નથી +@msg {what}: the file is closed {what}: ફાઇલ બંધ છે +@msg {what}: the library {name} is not available {what}: લાઇબ્રેરી {name} ઉપલબ્ધ નથી +@msg {what}: the namespace {uri} is not registered {what}: નેમસ્પેસ {uri} નોંધાયેલું નથી +@msg {what}: the object is not a File or a Folder {what}: ઑબ્જેક્ટ File અથવા Folder નથી +@msg {what}: the object is not a UnitValue {what}: ઑબ્જેક્ટ UnitValue નથી +@msg {what}: the object is not an {class} object {what}: ઑબ્જેક્ટ {class} ઑબ્જેક્ટ નથી +@msg {what}: the path is too long {what}: પાથ ખૂબ લાંબો છે +@msg {what}: the result is not a finite number {what}: પરિણામ મર્યાદિત સંખ્યા નથી +@msg {what}: the text holds a character XML does not allow {what}: ટેક્સ્ટમાં એવો અક્ષર છે જેની XML પરવાનગી આપતું નથી +@msg {what}: the unit is not known {what}: એકમ અજાણ્યો છે +@msg {what}: the value must be a finite number {what}: મૂલ્ય મર્યાદિત સંખ્યા હોવી જોઈએ +@msg {what}: the value {value} is not available yet {what}: મૂલ્ય {value} હજુ ઉપલબ્ધ નથી +@msg {what}: this is not a ScriptUI window {what}: આ ScriptUI વિન્ડો નથી +@msg {what}: this is not a ScriptUI window or control {what}: આ ScriptUI વિન્ડો કે કંટ્રોલ નથી +@msg {what}: this is not a list {what}: આ યાદી નથી +@msg {what}: this is not a list item {what}: આ યાદીની આઇટમ નથી +@msg {what}: {m} {what}: {m} +@msg {what}: {name} is not a language alternative array {what}: {name} ભાષા વિકલ્પોનો એરે નથી +@msg {what}: {name} is not a simple property {what}: {name} સાદી પ્રોપર્ટી નથી +@msg {what}: {name} is not a valid property name {what}: {name} માન્ય પ્રોપર્ટી નામ નથી +@msg {what}: {name} is not an array {what}: {name} એરે નથી +@msg {why} (the {_1} role's swatch; addon.packaging.setRoleSwatch picks another) {why} ({_1} ભૂમિકાનો સ્વેચ; addon.packaging.setRoleSwatch બીજો પસંદ કરે છે) +@msg {width} × {height} pixels is too large for JPEG (at most 65535 pixels a side): lower the resolution {width} × {height} પિક્સેલ JPEG માટે ખૂબ મોટું છે (દરેક બાજુ વધુમાં વધુ 65535 પિક્સેલ): રિઝોલ્યુશન ઘટાડો +@msg {width} × {height} pixels is too large for Targa (at most 65535 pixels a side): lower the resolution {width} × {height} પિક્સેલ Targa માટે ખૂબ મોટું છે (દરેક બાજુ વધુમાં વધુ 65535 પિક્સેલ): રિઝોલ્યુશન ઘટાડો +@msg {w} × {h} pixels (limit {MAX_IMAGE_SIDE} pixels a side) {w} × {h} પિક્સેલ (મર્યાદા દરેક બાજુ {MAX_IMAGE_SIDE} પિક્સેલ) +@msg {w} × {h} pixels is too large for PSD (at most {MAX_SIDE} pixels a side): lower the resolution {w} × {h} પિક્સેલ PSD માટે ખૂબ મોટું છે (દરેક બાજુ વધુમાં વધુ {MAX_SIDE} પિક્સેલ): રિઝોલ્યુશન ઘટાડો +@msg {w} × {h} pixels take {rgba} bytes as RGBA {w} × {h} પિક્સેલ RGBA તરીકે {rgba} બાઇટ લે છે +@msg “{name}” asks for a heavy budget (each run up to {minutes} minutes and {times} times the usual instructions): a person has to approve it in the desktop app, or pass `allowHeavy: true` in a session started with --allow-plugin-grants “{name}” ભારે બજેટ માગે છે (દરેક રન {minutes} મિનિટ સુધી અને સામાન્ય સૂચનાઓ કરતાં {times} ગણી સુધી): કોઈ વ્યક્તિએ ડેસ્કટૉપ ઍપમાં તેને મંજૂર કરવું પડશે, અથવા --allow-plugin-grants સાથે શરૂ કરેલા સત્રમાં `allowHeavy: true` આપો +@msg “{name}” asks for the permissions {asked}: a person has to approve them in the desktop app, or pass `grant` in a session started with --allow-plugin-grants “{name}” {asked} પરવાનગીઓ માગે છે: કોઈ વ્યક્તિએ ડેસ્કટૉપ ઍપમાં તેને મંજૂર કરવી પડશે, અથવા --allow-plugin-grants સાથે શરૂ કરેલા સત્રમાં `grant` આપો +@msg “{name}” is another module than the plug-in with id {_1} and would get the settings and cache kept for it: install it with `replace: true` once the user agrees “{name}” એ id {_1} વાળા પ્લગ-ઇન કરતાં જુદું મોડ્યુલ છે અને તેના માટે રાખેલી સેટિંગ્સ અને કૅશ તેને મળી જશે: વપરાશકર્તા સંમત થાય પછી જ તેને `replace: true` સાથે ઇન્સ્ટૉલ કરો +@msg “{name}” is not a file “{name}” ફાઇલ નથી +@msg “{name}” is not a word the custom dictionary takes “{name}” કસ્ટમ શબ્દકોશ સ્વીકારે એવો શબ્દ નથી +@msg “{name}” lists `{id}` in `commandAllowlist`, which a plug-in may not call “{name}” `commandAllowlist` માં `{id}` સૂચિબદ્ધ કરે છે, જેને પ્લગ-ઇન કૉલ કરી શકતું નથી +@msg “{name}” wasn't granted `{p}`, which its output needs: nothing was changed “{name}” ને `{p}` આપવામાં આવી નથી, જે તેના આઉટપુટ માટે જરૂરી છે: કંઈ બદલાયું નથી +@msg “{name}” › {label}: {e} “{name}” › {label}: {e} +@msg “{shown}” opens files but doesn't place them: its manifest doesn't set `place` “{shown}” ફાઇલો ખોલે છે પણ તેમને પ્લેસ કરતું નથી: તેનું મેનિફેસ્ટ `place` સેટ કરતું નથી +@msg “{shown}” opens {_1} files, not `{_2}` “{shown}” {_1} ફાઇલો ખોલે છે, `{_2}` નહીં +@msg the program ends a dictionary it didn't begin પ્રોગ્રામ એવી ડિક્શનરી સમાપ્ત કરે છે જે તેણે શરૂ કરી ન હતી +@msg the program opens a file, which the reader can't do પ્રોગ્રામ ફાઇલ ખોલે છે, જે રીડર કરી શકતું નથી +@msg the program restores a saved state that was already restored પ્રોગ્રામ એવી સાચવેલી સ્થિતિ પુનઃસ્થાપિત કરે છે જે પહેલેથી પુનઃસ્થાપિત થઈ ગઈ હતી +@msg data the program reads is damaged or cut short, or the program asks for a position in a file that has none પ્રોગ્રામ જે ડેટા વાંચે છે તે નુકસાન પામેલો કે અધૂરો છે, અથવા પ્રોગ્રામ એવી ફાઇલમાં સ્થાન માગે છે જેમાં સ્થાન નથી +@msg the program goes past one of the reader's limits પ્રોગ્રામ રીડરની કોઈ એક મર્યાદા ઓળંગે છે +@msg the path has no point to continue from પાથમાં આગળ વધવા માટે કોઈ બિંદુ નથી +@msg a value is outside the range the operator takes કોઈ મૂલ્ય ઑપરેટર સ્વીકારે તે શ્રેણીની બહાર છે +@msg the operator needs more values than the stack holds ઑપરેટરને સ્ટૅકમાં છે તેના કરતાં વધુ મૂલ્યો જોઈએ છે +@msg part of the program isn't valid PostScript text પ્રોગ્રામનો એક ભાગ માન્ય PostScript ટેક્સ્ટ નથી +@msg a value has the wrong type for the operator કોઈ મૂલ્યનો પ્રકાર ઑપરેટર માટે ખોટો છે +@msg the program runs, deletes or renames a file, which the reader can't do પ્રોગ્રામ ફાઇલ ચલાવે છે, કાઢી નાખે છે અથવા તેનું નામ બદલે છે, જે રીડર કરી શકતું નથી +@msg the program asks for a resource that isn't defined પ્રોગ્રામ એવો રિસોર્સ માગે છે જે વ્યાખ્યાયિત નથી +@msg a calculation has no result, as in a division by zero કોઈ ગણતરીનું પરિણામ નથી, જેમ કે શૂન્ય વડે ભાગાકારમાં +@msg the operator looks for a mark on the stack and finds none ઑપરેટર સ્ટૅક પર માર્ક શોધે છે અને તેને કોઈ મળતું નથી +@msgplural `answers` has {n} answer the script did not use|`answers` has {n} answers the script did not use `answers` માં {n} જવાબ છે જે સ્ક્રિપ્ટે વાપર્યો નહીં|`answers` માં {n} જવાબ છે જે સ્ક્રિપ્ટે વાપર્યા નહીં +@msgplural {_1} left {n} object under the brush as it was ({_2}): it reshapes paths only|{_1} left {n} objects under the brush as they were ({_2}): it reshapes paths only {_1} એ બ્રશ નીચેનો {n} ઑબ્જેક્ટ જેમ હતો તેમ રહેવા દીધો ({_2}): તે ફક્ત પાથનો આકાર બદલે છે|{_1} એ બ્રશ નીચેના {n} ઑબ્જેક્ટ જેમ હતા તેમ રહેવા દીધા ({_2}): તે ફક્ત પાથનો આકાર બદલે છે +@msgplural Loaded “{name}”: {n} step was left out|Loaded “{name}”: {n} steps were left out “{name}” લોડ કર્યું: {n} પગલું છોડી દેવાયું|“{name}” લોડ કર્યું: {n} પગલાં છોડી દેવાયાં +@msgplural Loaded “{name}”: {n} step has an unknown command and was kept: “{action}”, step {step}, `{command}`|Loaded “{name}”: {n} steps have unknown commands and were kept; the first: “{action}”, step {step}, `{command}` “{name}” લોડ કર્યું: {n} પગલામાં અજાણ્યો કમાન્ડ છે અને તેને રાખવામાં આવ્યું: “{action}”, પગલું {step}, `{command}`|“{name}” લોડ કર્યું: {n} પગલાંમાં અજાણ્યા કમાન્ડ છે અને તેમને રાખવામાં આવ્યાં; પહેલું: “{action}”, પગલું {step}, `{command}` +@msgplural Unembedded {n} image to {folder}|Unembedded {n} images to {folder} {n} ઇમેજનું એમ્બેડ દૂર કરીને {folder} માં મૂકી|{n} ઇમેજનું એમ્બેડ દૂર કરીને {folder} માં મૂકી +@msgplural {n} color is out of the CMYK gamut|{n} colors are out of the CMYK gamut {n} રંગ CMYK ગેમટની બહાર છે|{n} રંગો CMYK ગેમટની બહાર છે +@msgplural {n} font file is now in {folder}; {failed} couldn't be added: {reason}|{n} font files are now in {folder}; {failed} couldn't be added: {reason} {n} ફોન્ટ ફાઇલ હવે {folder} માં છે; {failed} ઉમેરી શકાઈ નહીં: {reason}|{n} ફોન્ટ ફાઇલો હવે {folder} માં છે; {failed} ઉમેરી શકાઈ નહીં: {reason} +@msgplural {n} font file is now in {folder}|{n} font files are now in {folder} {n} ફોન્ટ ફાઇલ હવે {folder} માં છે|{n} ફોન્ટ ફાઇલો હવે {folder} માં છે +@msgplural {n} font isn't available here: its text shows in another font|{n} fonts aren't available here: their text shows in another font {n} ફોન્ટ અહીં ઉપલબ્ધ નથી: તેનું ટેક્સ્ટ બીજા ફોન્ટમાં દેખાય છે|{n} ફોન્ટ અહીં ઉપલબ્ધ નથી: તેમનું ટેક્સ્ટ બીજા ફોન્ટમાં દેખાય છે +@msgplural {n} image couldn't be decoded and shows as a crossed box|{n} images couldn't be decoded and show as crossed boxes {n} ઇમેજ ડીકોડ થઈ શકી નહીં અને ચોકડીવાળા બૉક્સ તરીકે દેખાય છે|{n} ઇમેજ ડીકોડ થઈ શકી નહીં અને ચોકડીવાળાં બૉક્સ તરીકે દેખાય છે +@msgplural {n} image couldn't be traced|{n} images couldn't be traced {n} ઇમેજ ટ્રેસ થઈ શકી નહીં|{n} ઇમેજ ટ્રેસ થઈ શકી નહીં +@msgplural {n} linked file can't be read here: its preview shows|{n} linked files can't be read here: their previews show {n} લિંક કરેલી ફાઇલ અહીં વાંચી શકાતી નથી: તેનું પ્રીવ્યૂ દેખાય છે|{n} લિંક કરેલી ફાઇલો અહીં વાંચી શકાતી નથી: તેમનાં પ્રીવ્યૂ દેખાય છે +@msgplural {n} linked image changed on disk: Update Links shows the new version|{n} linked images changed on disk: Update Links shows the new versions {n} લિંક કરેલી ઇમેજ ડિસ્ક પર બદલાઈ: લિંક્સ અપડેટ કરો નવું વર્ઝન બતાવે છે|{n} લિંક કરેલી ઇમેજ ડિસ્ક પર બદલાઈ: લિંક્સ અપડેટ કરો નવાં વર્ઝન બતાવે છે +@msgplural {selected}; {n} more can't be selected now|{selected}; {n} more can't be selected now {selected}; વધુ {n} અત્યારે પસંદ કરી શકાતું નથી|{selected}; વધુ {n} અત્યારે પસંદ કરી શકાતાં નથી +@msgplural {selected}; {n} more is hidden or locked|{selected}; {n} more are hidden or locked {selected}; વધુ {n} છુપાયેલું અથવા લૉક કરેલું છે|{selected}; વધુ {n} છુપાયેલાં અથવા લૉક કરેલાં છે +@msgplural {selected}; {n} more is on a template layer|{selected}; {n} more are on template layers {selected}; વધુ {n} ટેમ્પ્લેટ લેયર પર છે|{selected}; વધુ {n} ટેમ્પ્લેટ લેયર્સ પર છે +@msgplural {selected}; {n} more is outside the isolated group|{selected}; {n} more are outside the isolated group {selected}; વધુ {n} અલગ કરેલા ગ્રૂપની બહાર છે|{selected}; વધુ {n} અલગ કરેલા ગ્રૂપની બહાર છે +@msgplural Broke {n} link; {missing} can't be read: relink or update them first|Broke {n} links; {missing} can't be read: relink or update them first {n} લિંક તોડી; {missing} વાંચી શકાતી નથી: પહેલાં તેમને ફરી લિંક કરો અથવા અપડેટ કરો|{n} લિંક્સ તોડી; {missing} વાંચી શકાતી નથી: પહેલાં તેમને ફરી લિંક કરો અથવા અપડેટ કરો +@msgplural Broke {n} link|Broke {n} links {n} લિંક તોડી|{n} લિંક્સ તોડી +@msgplural Copied the CSS of {n} object|Copied the CSS of {n} objects {n} ઑબ્જેક્ટનો CSS કૉપિ કર્યો|{n} ઑબ્જેક્ટનો CSS કૉપિ કર્યો +@msgplural Discarded {n} recovered document|Discarded {n} recovered documents {n} રિકવર કરેલો દસ્તાવેજ કાઢી નાખ્યો|{n} રિકવર કરેલા દસ્તાવેજો કાઢી નાખ્યા +@msgplural Downloaded {n} file|Downloaded {n} files {n} ફાઇલ ડાઉનલોડ કરી|{n} ફાઇલો ડાઉનલોડ કરી +@msgplural Embedded {n} image; {missing} missing: relink them first|Embedded {n} images; {missing} missing: relink them first {n} ઇમેજ એમ્બેડ કરી; {missing} ગુમ છે: પહેલાં તેમને ફરી લિંક કરો|{n} ઇમેજ એમ્બેડ કરી; {missing} ગુમ છે: પહેલાં તેમને ફરી લિંક કરો +@msgplural Embedded {n} image|Embedded {n} images {n} ઇમેજ એમ્બેડ કરી|{n} ઇમેજ એમ્બેડ કરી +@msgplural Exported {n} document; {title} wasn't written: {error}|Exported {n} documents; {title} wasn't written: {error} {n} દસ્તાવેજ એક્સપોર્ટ કર્યો; {title} લખાયો નહીં: {error}|{n} દસ્તાવેજો એક્સપોર્ટ કર્યા; {title} લખાયો નહીં: {error} +@msgplural Exported {n} document|Exported {n} documents {n} દસ્તાવેજ એક્સપોર્ટ કર્યો|{n} દસ્તાવેજો એક્સપોર્ટ કર્યા +@msgplural Exported {n} file to {folder}|Exported {n} files to {folder} {n} ફાઇલ {folder} માં એક્સપોર્ટ કરી|{n} ફાઇલો {folder} માં એક્સપોર્ટ કરી +@msgplural Exported {what} with {n} note: {first}|Exported {what} with {n} notes: {first} {what} ને {n} નોંધ સાથે એક્સપોર્ટ કર્યું: {first}|{what} ને {n} નોંધો સાથે એક્સપોર્ટ કર્યું: {first} +@msgplural Opened with {n} note: {first}|Opened with {n} notes: {first} {n} નોંધ સાથે ખોલ્યું: {first}|{n} નોંધો સાથે ખોલ્યું: {first} +@msgplural {notice}. Opened with {n} note: {first}|{notice}. Opened with {n} notes: {first} {notice}. {n} નોંધ સાથે ખોલ્યું: {first}|{notice}. {n} નોંધો સાથે ખોલ્યું: {first} +@msgplural Relinked {n} image; {name} couldn't be relinked: {reason}|Relinked {n} images; {name} couldn't be relinked: {reason} {n} ઇમેજ ફરી લિંક કરી; {name} ફરી લિંક થઈ શકી નહીં: {reason}|{n} ઇમેજ ફરી લિંક કરી; {name} ફરી લિંક થઈ શકી નહીં: {reason} +@msgplural Relinked {n} image; not in that folder: {names}|Relinked {n} images; not in that folder: {names} {n} ઇમેજ ફરી લિંક કરી; તે ફોલ્ડરમાં નથી: {names}|{n} ઇમેજ ફરી લિંક કરી; તે ફોલ્ડરમાં નથી: {names} +@msgplural Relinked {n} image|Relinked {n} images {n} ઇમેજ ફરી લિંક કરી|{n} ઇમેજ ફરી લિંક કરી +@msgplural Replaced {n} image|Replaced {n} images {n} ઇમેજ બદલી|{n} ઇમેજ બદલી +@msgplural Restored {n} recovered document: save it to keep it|Restored {n} recovered documents: save them to keep them {n} રિકવર કરેલો દસ્તાવેજ પુનઃસ્થાપિત કર્યો: તેને રાખવા માટે સાચવો|{n} રિકવર કરેલા દસ્તાવેજો પુનઃસ્થાપિત કર્યા: તેમને રાખવા માટે સાચવો +@msgplural Copied with {n} note: {first}|Copied with {n} notes: {first} {n} નોંધ સાથે કૉપિ કર્યું: {first}|{n} નોંધો સાથે કૉપિ કર્યું: {first} +@msgplural Cut with {n} note: {first}|Cut with {n} notes: {first} {n} નોંધ સાથે કાપ્યું: {first}|{n} નોંધો સાથે કાપ્યું: {first} +@msgplural Traced with {n} note: {first}|Traced with {n} notes: {first} {n} નોંધ સાથે ટ્રેસ કર્યું: {first}|{n} નોંધો સાથે ટ્રેસ કર્યું: {first} +@msgplural Selected {n} embedded image|Selected {n} embedded images {n} એમ્બેડ કરેલી ઇમેજ પસંદ કરી|{n} એમ્બેડ કરેલી ઇમેજ પસંદ કરી +@msgplural Selected {n} image|Selected {n} images {n} ઇમેજ પસંદ કરી|{n} ઇમેજ પસંદ કરી +@msgplural Selected {n} linked image|Selected {n} linked images {n} લિંક કરેલી ઇમેજ પસંદ કરી|{n} લિંક કરેલી ઇમેજ પસંદ કરી +@msgplural Selected {n} missing image|Selected {n} missing images {n} ગુમ ઇમેજ પસંદ કરી|{n} ગુમ ઇમેજ પસંદ કરી +@msgplural Selected {n} modified image|Selected {n} modified images {n} સુધારેલી ઇમેજ પસંદ કરી|{n} સુધારેલી ઇમેજ પસંદ કરી +@msgplural Traced {n} image; not traced: {failed}|Traced {n} images; not traced: {failed} {n} ઇમેજ ટ્રેસ કરી; ટ્રેસ ન થઈ: {failed}|{n} ઇમેજ ટ્રેસ કરી; ટ્રેસ ન થઈ: {failed} +@msgplural Traced {n} image|Traced {n} images {n} ઇમેજ ટ્રેસ કરી|{n} ઇમેજ ટ્રેસ કરી +@msgplural Updated {n} image|Updated {n} images {n} ઇમેજ અપડેટ કરી|{n} ઇમેજ અપડેટ કરી +@msgplural Updated {n} linked file changed on disk|Updated {n} linked files changed on disk ડિસ્ક પર બદલાયેલી {n} લિંક કરેલી ફાઇલ અપડેટ કરી|ડિસ્ક પર બદલાયેલી {n} લિંક કરેલી ફાઇલો અપડેટ કરી +@msgplural Opened with {n} plug-in effect deferred. Effect › Refresh Deferred Effects runs it.|Opened with {n} plug-in effects deferred. Effect › Refresh Deferred Effects runs them. {n} પ્લગ-ઇન ઇફેક્ટ સ્થગિત રાખીને ખોલ્યું. ઇફેક્ટ › સ્થગિત ઇફેક્ટ્સ તાજી કરો તેને ચલાવે છે.|{n} પ્લગ-ઇન ઇફેક્ટ્સ સ્થગિત રાખીને ખોલ્યું. ઇફેક્ટ › સ્થગિત ઇફેક્ટ્સ તાજી કરો તેમને ચલાવે છે. diff --git a/crates/ui-egui/src/i18n/tests.rs b/crates/ui-egui/src/i18n/tests.rs index 3dca49857f..858fb23ba4 100644 --- a/crates/ui-egui/src/i18n/tests.rs +++ b/crates/ui-egui/src/i18n/tests.rs @@ -2038,7 +2038,7 @@ fn command_ids(s: &str) -> Vec<&str> { /// the messages each one lacks. const COMPLETE_MESSAGES: &[&str] = &[ "cs", "de", "el", "es", "fr", "hi", "hu", "it", "ja", "ka", "ko", "pl", "pt-br", "ru", "sv", "uk", "vi", "zh-hans", "zh-hant", "fi", "tr", "ca", - "nl", "da", "id", "bg", + "nl", "da", "id", "bg", "gu", ]; /// Crates whose error and status messages reach the status bar, the crates whose errors the diff --git a/docs/development.md b/docs/development.md index 0e528cdab4..7887c886c0 100644 --- a/docs/development.md +++ b/docs/development.md @@ -319,7 +319,7 @@ other `sv-*` locale resolve to it), Georgian (`ka`, complete; `ka-GE` and `ka_GE ``[{j}] `{_1}`: {why}``, so its reason is translated while a JSON array stays as it is. A literal brace in a row is written `{{` or `}}`, in the English and in the translation: a message made with `format!` keeps the doubled braces of its format string, and a plain string literal has each of its braces doubled, so the row for - `"expected {\"objects\": [...]}"` is `expected {{"objects": [...]}}`. Czech, German, Greek, Spanish, French, Georgian, Hindi, Hungarian, Italian, Japanese, Korean, Polish, Brazilian Portuguese, Russian, Simplified Chinese, Traditional Chinese, Swedish, Ukrainian, Vietnamese, Finnish, Turkish, Catalan, Dutch, Danish, Indonesian and Bulgarian + `"expected {\"objects\": [...]}"` is `expected {{"objects": [...]}}`. Czech, German, Greek, Spanish, French, Georgian, Hindi, Hungarian, Italian, Japanese, Korean, Polish, Brazilian Portuguese, Russian, Simplified Chinese, Traditional Chinese, Swedish, Ukrainian, Vietnamese, Finnish, Turkish, Catalan, Dutch, Danish, Indonesian, Bulgarian and Gujarati translate status and error messages (`COMPLETE_MESSAGES` in `i18n::tests`); the untranslated report lists the message literals the scan finds, and the phrases a parameter schema's error builds at run time (`SCHEMA_PHRASES`), that one of them has no row for. The scan covers the crates in `MESSAGE_CRATES`, the diff --git a/docs/localization-parity.md b/docs/localization-parity.md index fe10d21a97..b2574120dd 100644 --- a/docs/localization-parity.md +++ b/docs/localization-parity.md @@ -24,7 +24,7 @@ English) in-app help, and the docs are English. (`bflatastic`), with community contributors adding or correcting (German by `dwetscher`, Japanese and Traditional Chinese by `imachus`). Georgian and the original Gujarati catalog are recorded as reviewed by native speakers; the contributor approved all 387 later Gujarati additions on 2026-11-14. -> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status/error messages remain partial. The pinned CI/release fonts include Noto Sans Gujarati as an optional `Gujr` fallback, but the web startup list contains no Gujarati face; web selection stays unavailable until a Gujarati interface face is bundled. Scores and estimates unchanged. +> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (10,732 catalog rows, 2026-12-02), a machine-assisted draft from the English meaning, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts include Noto Sans Gujarati as an optional `Gujr` fallback, but the web startup list contains no Gujarati face; web selection stays unavailable until a Gujarati interface face is bundled. Scores and estimates unchanged. ## The thirteen key languages @@ -34,7 +34,7 @@ Chinese by `imachus`). Georgian and the original Gujarati catalog are recorded a | Simplified Chinese (Mandarin) | `zh-hans` | 9,625 rows, 3,735 of them `@msg` and 51 `@msgplural` (counted 2026-11-17 on `main` at `ee60c51fd9`) | all (the untranslated report lists 237 messages without a row for it) | CJK UI font from craft-fonts (BIZ UDPGothic) when embedded, else a system font; IME with marked text at the caret; vertical type partial ([type-parity.md](type-parity.md)) | no | full | — (review) | | Spanish | `es` | 4,009 / 4,020 (99.7%) | all (3,770 `@msg` and 55 `@msgplural` rows, counted 2026-11-18: the untranslated report lists 269 messages without a Spanish row, 236 in its own section and 33 that all 24 checked languages lack) | Latin | no | full | — (review) | | Hindi | `hi` | 8,782 rows (2026-11-13): 3,014 `@msg`, 47 `@msgplural`, 41 `@plural`; the untranslated report on main `f793044f83` (2026-11-14) lists 676 missing rows for it: 608 in its own section and 68 that every checked language lacks | menus, dialogs, tooltips and scanned messages; contributor-approved loanword terminology; agent wording pass | UI and document text shape with HarfRust; installed desktop Devanagari fallback, or a `Deva` craft-fonts face; the web fetches Noto Sans Devanagari when the interface needs it | contributor terminology review; 2026-11-13 wording pass on messages and longer labels, and a word-sense pass on short labels, with a glossary-term test; wider proofread welcome | complete catalog, machine-assisted draft | reported missing rows, native review and layout | -| Gujarati | `gu` | 4,673 rows (2026-11-14): original 4,286 unchanged; all 387 additions contributor-reviewed and approved | menus and dialogs; status/error messages partial | installed Gujarati fonts on desktop; optional `Gujr` craft-fonts fallback (Noto Sans Gujarati, in the pinned CI/release fonts); not in the web startup list | original catalog reviewed by a native speaker; all 387 later additions approved by the contributor, with 11 wording corrections | contributor-reviewed catalog | remaining messages and a bundled Gujarati web font | +| Gujarati | `gu` | 4,673 rows (2026-11-14): original 4,286 unchanged; all 387 additions contributor-reviewed and approved | menus, dialogs, status and error messages (messages machine-assisted, review pending) | installed Gujarati fonts on desktop; optional `Gujr` craft-fonts fallback (Noto Sans Gujarati, in the pinned CI/release fonts); not in the web startup list | original catalog reviewed by a native speaker; all 387 later additions approved by the contributor, with 11 wording corrections | contributor-reviewed catalog | native review of the messages and a bundled Gujarati web font | | Arabic | `ar` | preparatory registration (native name العربية) and 6-form CLDR plural probe only; translations maintained upstream in `storytold/craft-i18n` (`locales/ar/vectorcraft.tsv`) and not yet consumed | none (UI not exposed pending shared catalog) | document text: existing bidirectional layout and paragraph direction; interface UI: not exposed pending shared catalog, with full shell mirroring pending STD-I18N-001 | — (preparatory) | preparatory (not exposed) | 15–20 | | French | `fr` | 9,166 rows, 3,436 of them `@msg` and 48 `@msgplural` (counted 2026-11-13): the untranslated report lists 178 missing messages for it | all | Latin | no | full | — (review) | | Portuguese | `pt-br` | 9,378 rows, 3,563 of them `@msg` and 48 `@msgplural` (counted 2026-11-13): the untranslated report lists 55 missing messages for it, which open #7116, #7211, #7330, #7378 and #7405 translate; one/other plurals | all | Latin | contributor is a Brazilian Portuguese speaker; further native review welcome | full | — (review) | @@ -101,6 +101,7 @@ font for the web build. | Date | Change | Summary | |---|---|---| +| 2026-12-02 | minor | Gujarati: status and error messages translated (4,924 new `@msg`/`@msgplural` rows, machine-assisted draft, native review pending); `gu` joins `COMPLETE_MESSAGES`. Scores and estimates unchanged. | | 2026-11-25 | patch | Arabic (`ar`): preparatory registration and 6-form CLDR plural routing; kept unavailable to users pending upstream `storytold/craft-i18n` catalog | | 2026-11-14 | minor | Gujarati (#6613): contributor proofreading completed for all 387 additions, with 11 wording corrections; 4,673 reviewed catalog rows. Status/error messages remain partial; web selection requires a bundled Gujarati face. Scores and estimates unchanged. | | 2026-11-12 | minor | Gujarati (`gu`): reviewed by a native speaker; zero/one singular plurals (CLDR); Gujarati craft-fonts faces join the UI fonts; strings added on main since branching translated (4,286 rows) | diff --git a/docs/roadmap.md b/docs/roadmap.md index f669559fd2..089883a25c 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -28,7 +28,7 @@ > Blend redraw update (#5179): renderer bounds include spine-placed keys and steps; both focused CPU regressions pass. Scores and estimates unchanged. -> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status/error messages remain partial, and the pinned CI/release fonts and web startup list contain no Gujarati face; web selection stays unavailable until a Gujarati interface face is bundled. Scores and estimates unchanged. +> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (10,732 catalog rows, 2026-12-02), a machine-assisted draft from the English meaning, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts and web startup list contain no Gujarati face; web selection stays unavailable until a Gujarati interface face is bundled. Scores and estimates unchanged. ## Feature submission evidence @@ -84,6 +84,7 @@ M7 type: Touch Type moves a right-to-left character along its line and up from i | Date | Change | Summary | |---|---|---| +| 2026-12-02 | minor | Gujarati: status and error messages translated (4,924 new `@msg`/`@msgplural` rows, machine-assisted draft, native review pending); `gu` joins `COMPLETE_MESSAGES`. Scores and estimates unchanged. | | 2026-11-24 | minor | G12: History row context menus use shared Craft List and Menu controls after rebasing onto the panel migration. App-specific actions retain the chosen snapshot across pending edits and dismiss on document switches; keyboard context requests and focus restoration use the shared runtime. Regression cases retained (#8845); scores and estimates unchanged. | | 2026-11-21 | minor | G12/M14: History row context menus retain the chosen snapshot while the menu is open and pending edits settle; jumps settle typing before counting undo/redo, and discarded states report that they are unavailable. Shift+F10 opens the focused row menu, Escape restores row focus, and switching documents dismisses the popup. History checklist, area and milestone evidence updated (#8845); scores and estimates unchanged. | | 2026-11-20 | minor | G12: Asset Export tiles have item context menus for Export, Remove, Rename, Select Artwork on Canvas and collecting selected artwork; right-click selects an unselected tile and preserves an existing multi-selection. Headless regressions: panels::tests_asset_export. Scores and estimates unchanged. | @@ -169,7 +170,7 @@ Checked 2026-10-10 from the code, tests and open issues; no workflow fails, so V Hindi interface follow-up (2026-11-06): the catalog and zero/one plural rule are implemented; native wording review, layout checks and a web Devanagari font remain. [Notes](localization-hi.md). -Gujarati interface follow-up (2026-11-14): the catalog and zero/one plural rule are implemented. The original 4,286 rows remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status/error messages remain partial, and a bundled Gujarati web font remains to be supplied. +Gujarati interface follow-up (2026-11-14): the catalog and zero/one plural rule are implemented. The original 4,286 rows remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages are translated (2026-12-02, machine-assisted, native review pending), and a bundled Gujarati web font remains to be supplied. ## Current focus @@ -214,7 +215,7 @@ Gujarati interface follow-up (2026-11-14): the catalog and zero/one plural rule | — | Interaction fidelity pass (every tool's modifiers, Properties panel per context, isolation, nuance; width-point creation and adjoining adjustment regression-tested; dialog layout reviewed) | ⬜ (new ruler-guide Alt orientation implemented; existing-guide Escape cancellation regression-tested; broader pass remains) | 60–90 | | — | Hardening at scale (big-file corpus, fuzzing, cross-platform + browser QA) | 🟡 PngSuite integrity and bounded fetching verified (#1729); real-world corpus/manual QA remain | 50–80 | | M14 follow-up | Color Picker layout (#2008) | ✅ Compact controls, centered header, stacked actions, aligned fields and screen sampling; narrow windows scroll vertically | Included above | -| M14 follow-up | Gujarati interface (#6613) | 🟡 Zero/one singular plurals and desktop font fallback; 4,673 contributor-reviewed rows, including 387 approved additions with 11 wording corrections; status/error messages remain partial and pinned fonts lack a Gujarati face | Included above | +| M14 follow-up | Gujarati interface (#6613) | 🟡 Zero/one singular plurals and desktop font fallback; 4,673 contributor-reviewed rows, including 387 approved additions with 11 wording corrections; status/error messages translated (machine-assisted, review pending) and pinned fonts lack a Gujarati face | Included above | | | **Total to full parity** (one agent; from [target-app-parity.md](target-app-parity.md)) | | **~360–590** | Milestone estimates predate the 2026-10-10 re-measure for M1–M14; the area table in diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index a26bfdfee6..78ebe32815 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -37,7 +37,7 @@ Native saves on Unix flush the destination directory after writing or replacing > Blend redraw update (#5179): renderer bounds include spine-placed keys and steps; both focused CPU regressions pass. Scores and estimates unchanged. -> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status/error messages remain partial, and the pinned CI/release fonts and web startup list contain no Gujarati face; web selection stays unavailable until a Gujarati interface face is bundled. Scores and estimates unchanged. +> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (10,732 catalog rows, 2026-12-02), a machine-assisted draft from the English meaning, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts and web startup list contain no Gujarati face; web selection stays unavailable until a Gujarati interface face is bundled. Scores and estimates unchanged. ## Feature submission evidence @@ -132,6 +132,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard | Date | Change | Summary | |---|---|---| +| 2026-12-02 | minor | Gujarati: status and error messages translated (4,924 new `@msg`/`@msgplural` rows, machine-assisted draft, native review pending); `gu` joins `COMPLETE_MESSAGES`. Scores and estimates unchanged. | | 2026-11-25 | minor | Document Info › Objects: total enclosed area (`pathArea` in pt²) for closed and compound paths (holes subtracted per fill rule; guides and open paths left out) and formatted Path Area in document units (#6965). Worked out only when the request covers Objects (`pathArea` null otherwise or with `pathArea: false`); the panel asks for it only while Objects or All Categories is shown. Tests: `info_gives_the_paths_total_area`, `info_works_out_the_path_area_only_for_the_objects_category`, `the_path_area_is_worked_out_only_while_objects_is_shown`, `format_area_formats_and_trims_cleanly`. Scores and estimates unchanged. | | 2026-11-24 | minor | G12: History row context menus use shared Craft List and Menu controls after rebasing onto the panel migration. App-specific actions retain the chosen snapshot across pending edits and dismiss on document switches; keyboard context requests and focus restoration use the shared runtime. Regression cases retained (#8845); scores and estimates unchanged. | | 2026-11-21 | minor | G12/M14: History row context menus retain the chosen snapshot while the menu is open and pending edits settle; jumps settle typing before counting undo/redo, and discarded states report that they are unavailable. Shift+F10 opens the focused row menu, Escape restores row focus, and switching documents dismisses the popup. History checklist, area and milestone evidence updated (#8845); scores and estimates unchanged. | @@ -1267,7 +1268,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - Swedish messages (2026-11-13): the Swedish (`sv`) catalog has an `@msg` row for 464 of the 628 status and error messages the untranslated report listed for it; 162 messages that no complete-message catalog translates, 36 composite font errors among them, are not translated yet, and two unknown-parameter errors that start with the `{within}` placeholder stay in English, as does `{name} must be {lo}–{hi}{unit} (got {v})`, whose existing row can't match because two of its placeholders sit side by side; the rows keep their placeholders, backticked names, quoted values and command ids; native review remains; scores and estimates unchanged. - Window › Toolbars › Keep Tools Beside the Canvas, a VectorCraft layout option that is off by default, docks the Tools panel between left-side panels and the canvas instead of at the window's left edge, and workspaces keep the setting. A floating Tools panel dropped on the canvas's left edge, right of panels docked on the left, docks there and turns the setting on, and one dropped on the window's left edge docks there and turns it off; with no panels docked on the left, a drop leaves the setting as it is (#7837). Scores are unchanged (`window.toolsBesideCanvas`; `docked_tools_keep_the_window_edge_unless_kept_beside_the_canvas`, `tools_dropped_on_a_left_edge_dock_there_and_the_setting_follows`, `tools_dropped_where_the_left_edges_overlap_keep_the_setting`, `tools_dropped_beside_a_collapsed_left_dock_follow_the_strip_dropped_on`). - Hindi (2026-11-06): Hindi (`hi`): 7,877-row machine-assisted catalog, zero/one singular plurals, desktop font fallback and optional Devanagari craft-fonts fallback; all 55 translation tests pass; native review and a web font remain; scores and estimates unchanged. [Terminology and limitations](localization-hi.md). - - Gujarati (2026-11-14, #6613): `gu` has 4,673 catalog rows, zero/one singular plurals, installed desktop font fallback and support for optional `Gujr` craft-font faces. The original 4,286 rows remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status/error messages remain partial; the pinned fonts and web startup list have no Gujarati face, so web selection remains unavailable until one is bundled. Current-head validation is recorded in the PR; scores and estimates unchanged. + - Gujarati (2026-11-14, #6613): `gu` has 4,673 catalog rows, zero/one singular plurals, installed desktop font fallback and support for optional `Gujr` craft-font faces. The original 4,286 rows remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (10,732 catalog rows, 2026-12-02), a machine-assisted draft from the English meaning, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned fonts and web startup list have no Gujarati face, so web selection remains unavailable until one is bundled. Current-head validation is recorded in the PR; scores and estimates unchanged. - Hindi wording (2026-11-13): rows outside the plug-in messages keep their English's meaning, quantities and clauses, and use the catalog's save, swatch, crop, resolution, path and type terms; a test checks those terms and the point unit in every row; native review remains; scores and estimates unchanged. - Hindi word senses (2026-11-13): 85 labels and messages use the interface sense of their English: Desired is वांछित and the range message keeps both comparisons, rulers are रूलर, text characters कैरेक्टर, vector points पॉइंट, fills फ़िल्स and High Contrast उच्च कंट्रास्ट; the glossary test rejects the unrelated senses in every row; native review remains; scores and estimates unchanged. - Hindi terms (2026-11-13): every row that names a variable (data merge, variable fonts and widths, environment variables) says वेरिएबल, and joining paths, anchor points, point type and lines says जोड़ें instead of शामिल हों, which stays for joining the community; a test checks both terms in every row; scores and estimates unchanged. From 53a941656c5ba7bbc57ccb55dabba2549094057d Mon Sep 17 00:00:00 2001 From: ruchirguitar Date: Thu, 3 Dec 2026 00:22:39 +0530 Subject: [PATCH 02/62] i18n: Gujarati menu items, interface labels and undo steps Adds the 155 menu strings, tl! literals and undo step names the untranslated report listed for gu (machine-assisted; Kinsoku stays in Latin letters as in the reviewed rows), and dates the earlier 4,673-row count in the docs. --- ROADMAP.md | 2 +- crates/ui-egui/src/i18n/gu.tsv | 157 +++++++++++++++++++++++++++++++++ docs/localization-parity.md | 2 +- docs/roadmap.md | 2 +- docs/target-app-parity.md | 4 +- 5 files changed, 162 insertions(+), 5 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index 958501b43d..34f9c90b0a 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -18,7 +18,7 @@ gate: all six core workflows (path drawing and editing, paint and style, type, l production, file exchange) work end to end on macOS with save and reopen, and only the last is partial, without blocking it ([Alpha gate](docs/roadmap.md#alpha-gate)). -> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (10,732 catalog rows, 2026-12-02), a machine-assisted draft from the English meaning, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts and web startup list contain no Gujarati face; web selection stays unavailable until a Gujarati interface face is bundled. Scores and estimates unchanged. +> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (2026-12-02); with 155 menu, label and undo rows added the same day the catalog has 10,887 rows; all machine-assisted, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts and web startup list contain no Gujarati face; web selection stays unavailable until a Gujarati interface face is bundled. Scores and estimates unchanged. ## Headline numbers diff --git a/crates/ui-egui/src/i18n/gu.tsv b/crates/ui-egui/src/i18n/gu.tsv index 6505776922..e1d1e06e90 100644 --- a/crates/ui-egui/src/i18n/gu.tsv +++ b/crates/ui-egui/src/i18n/gu.tsv @@ -5826,6 +5826,163 @@ swatch [Registration] [રજિસ્ટ્રેશન] Round Flow ગોળ પ્રવાહ Chisel Flow ત્રાંસો પ્રવાહ +# Menu items, interface labels and undo steps added 2026-12-02: machine-assisted draft from the English meaning; native review pending. + Automatic Plane Positioning સ્વચાલિત પ્લેન પોઝિશનિંગ + Basic મૂળભૂત + Bevels બેવલ + Button Mode બટન મોડ + Drop Script Engine સ્ક્રિપ્ટ એન્જિન છોડો + Edit Bevels બેવલ સંપાદિત કરો + Edit Paragraph Style ફકરા સ્ટાઇલ સંપાદિત કરો + Edit Profile પ્રોફાઇલ સંપાદિત કરો + Emboss એમ્બોસ + Export Image Trace Presets ઇમેજ ટ્રેસ પ્રીસેટ્સ નિકાસ કરો + Glow ગ્લો + Glyph Categories ગ્લિફ શ્રેણીઓ + HP-GL Options Dialog HP-GL વિકલ્પો ડાયલૉગ + Heavy Blur ભારે બ્લર + Import Image Trace Presets ઇમેજ ટ્રેસ પ્રીસેટ્સ આયાત કરો + Import Metadata Template… મેટાડેટા ટેમ્પલેટ આયાત કરો… + Kinsoku Set Base Kinsoku સેટનો આધાર + Kinsoku Sets Kinsoku સેટ્સ + Kinsoku Shori Settings… Kinsoku Shori સેટિંગ્સ… + Konkani કોંકણી + List Script Engines સ્ક્રિપ્ટ એન્જિનની યાદી બતાવો + Map Graphic ગ્રાફિક મેપ કરો + Mark Tutorial Step ટ્યુટોરિયલ પગલું ચિહ્નિત કરો + Metadata Templates મેટાડેટા ટેમ્પલેટ + Move Object on Path પાથ પરનો ઑબ્જેક્ટ ખસેડો + Neon & Glow નિયોન અને ગ્લો + Nepali નેપાળી + Nest Shapes… આકારો નેસ્ટ કરો… + New Document Profiles નવા દસ્તાવેજની પ્રોફાઇલ્સ + PSD Info PSD માહિતી + Reload Bevels બેવલ ફરી લોડ કરો + Reset Learn Progress શીખો પ્રગતિ રીસેટ કરો + Reset Profile પ્રોફાઇલ રીસેટ કરો + Rough Edges ખરબચડી કિનારીઓ + Select Last Selection Tool છેલ્લું પસંદગી ટૂલ પસંદ કરો + Select Object on Path પાથ પરનો ઑબ્જેક્ટ પસંદ કરો + Set Panel View પેનલ વ્યૂ સેટ કરો + Show Hidden Panels at Edge છુપાયેલી પેનલ્સ કિનારી પર બતાવો + Sindhi સિંધી + Soft Blur સૉફ્ટ બ્લર + Thicken જાડું કરો + Thin પાતળું કરો + Tracing Presets… ટ્રેસિંગ પ્રીસેટ્સ… + Abutting અડીને + All Instances બધા ઇન્સ્ટન્સ + Allow Once એક વાર મંજૂરી આપો + Always Allow This Script આ સ્ક્રિપ્ટને હંમેશાં મંજૂરી આપો + Anchor Point of Perspective Artwork પર્સ્પેક્ટિવ આર્ટવર્કનો એન્કર પોઇન્ટ + Auto Grouping ઑટો ગ્રૂપિંગ + Bake બેક કરો + Based on: આના પર આધારિત: + Black and White કાળું અને સફેદ + Cannot End Line લાઇનના અંતે ન આવી શકે + Cannot Start Line લાઇનની શરૂઆતમાં ન આવી શકે + Cap કેપ + Categories શ્રેણીઓ + Check Hidden Layers છુપાયેલા લેયર્સ તપાસો + Check Locked Layers લૉક કરેલા લેયર્સ તપાસો + Close Path: પાથ બંધ કરો: + Color bars રંગ બાર + Count સંખ્યા + Create: બનાવો: + Curve Tolerance: વળાંક સહનશીલતા: + Delete Group ગ્રૂપ કાઢી નાખો + Deny નકારો + Dimension Lines પરિમાણ રેખાઓ + Dimension Text પરિમાણ ટેક્સ્ટ + Discord Discord + Distance અંતર + Distance: અંતર: + Divider ડિવાઇડર + Download ડાઉનલોડ કરો + Draw (Pencil) દોરો (પેન્સિલ) + Draw Inner Paths First અંદરના પાથ પહેલાં દોરો + Draw the Nearest Path Next પછી સૌથી નજીકનો પાથ દોરો + Each Link Separately દરેક લિંક અલગથી + Edit Bevels… બેવલ સંપાદિત કરો… + Edit Original with: મૂળ આનાથી સંપાદિત કરો: + Enhanced ઉન્નત + Export Asset સંપત્તિ નિકાસ કરો + Extension Lines એક્સ્ટેન્શન રેખાઓ + Fills ફિલ + Graphic ગ્રાફિક + HP-GL Options HP-GL વિકલ્પો + Hanging Punctuation હેંગિંગ વિરામચિહ્નો + Harmony Rules હાર્મની નિયમો + High Color ઉચ્ચ રંગ + Ignore Color રંગ અવગણો + Inseparable Characters અવિભાજ્ય અક્ષરો + Intersection of Gridlines ગ્રિડલાઇનનું છેદન + Kinsoku Shori Settings Kinsoku Shori સેટિંગ્સ + Lab Lab + Low Color નિમ્ન રંગ + Method પદ્ધતિ + Missing Links from This Folder આ ફોલ્ડરમાંથી ખૂટતી લિંક્સ + Mode મોડ + Movie Clip મૂવી ક્લિપ + New Group… નવું ગ્રૂપ… + No Group કોઈ ગ્રૂપ નહીં + No matches. કોઈ મેળ મળ્યો નથી. + Noise નોઇઝ + One Pen per Color દરેક રંગ માટે એક પેન + Origin: મૂળબિંદુ: + Out of Gamut Warning ગેમટ બહાર ચેતવણી + Out of Web Color Warning વેબ રંગ બહાર ચેતવણી + Outlines with Source Image સ્રોત ઇમેજ સાથે આઉટલાઇન + Overlapping ઓવરલેપિંગ + Palette: પેલેટ: + Part of ArtCraft. MIT OR Apache-2.0. Fonts: Source Sans 3, Inter, JetBrains Mono (OFL). Icons: Lucide (ISC) + VectorCraft. ArtCraftનો ભાગ. MIT OR Apache-2.0. ફોન્ટ્સ: Source Sans 3, Inter, JetBrains Mono (OFL). આઇકન: Lucide (ISC) + VectorCraft. + Paths: {paths} Anchors: {anchors} Colors: {colors} પાથ: {paths} એન્કર: {anchors} રંગો: {colors} + Pen Table પેન ટેબલ + Pens: પેન: + Pixel પિક્સેલ + Place Image ઇમેજ મૂકો + Press and hold to view the source image સ્રોત ઇમેજ જોવા દબાવી રાખો + Pressure દબાણ + RGB RGB + Radius ત્રિજ્યા + Rename Group… ગ્રૂપનું નામ બદલો… + Rename… નામ બદલો… + Replace the saved presets that have these names? આ નામવાળા સાચવેલા પ્રીસેટ બદલીએ? + Reset progress પ્રગતિ રીસેટ કરો + Reset to Default ડિફૉલ્ટ પર રીસેટ કરો + Scatter સ્કેટર + Search Backwards પાછળની તરફ શોધો + Search artboards આર્ટબોર્ડ્સ શોધો + Select an image to trace ટ્રેસ કરવા માટે ઇમેજ પસંદ કરો + Selected Instances પસંદ કરેલા ઇન્સ્ટન્સ + Shared Edges સહિયારી કિનારીઓ + Sharp શાર્પ + Snap Curves To Lines વળાંકોને રેખાઓ પર સ્નેપ કરો + Source Image સ્રોત ઇમેજ + Spacing અંતર + Split View વિભાજિત વ્યૂ + Strokes સ્ટ્રોક + Symbol સિમ્બોલ + The script asks to read a file you choose. સ્ક્રિપ્ટ તમે પસંદ કરો તે ફાઇલ વાંચવા માંગે છે. + The script asks to read and write a file you choose. સ્ક્રિપ્ટ તમે પસંદ કરો તે ફાઇલ વાંચવા અને લખવા માંગે છે. + The script asks to read and write a folder you choose, with everything in it. સ્ક્રિપ્ટ તમે પસંદ કરો તે ફોલ્ડર અને તેમાંની બધી વસ્તુઓ વાંચવા અને લખવા માંગે છે. + Threshold થ્રેશોલ્ડ + Trace ટ્રેસ કરો + Trace the image with the Default preset ડિફૉલ્ટ પ્રીસેટથી ઇમેજ ટ્રેસ કરો + Tracing Presets ટ્રેસિંગ પ્રીસેટ્સ + Tracing Result ટ્રેસિંગ પરિણામ + Tracing Result with Outlines આઉટલાઇન સાથે ટ્રેસિંગ પરિણામ + Tsume ત્સુમે + Turn the Contour into plain paths કન્ટૂરને સાદા પાથમાં ફેરવો + Unicode Unicode + Units & Scale એકમો અને સ્કેલ + Value Axis મૂલ્ય અક્ષ + Variation વેરિએશન + [Custom] [કસ્ટમ] + x-height x-ઊંચાઈ + {name} (document) {name} (દસ્તાવેજ) + Nest Shapes આકારો નેસ્ટ કરો + # Status and error messages (@msg, @msgplural): machine-assisted draft from the English meaning, added 2026-12-02; native review pending. @msg "{0}" is not a colour: write it as #rrggbb "{0}" રંગ નથી: તેને #rrggbb તરીકે લખો @msg $.appEncoding: give an encoding's name, as a string $.appEncoding: એન્કોડિંગનું નામ સ્ટ્રિંગ તરીકે આપો diff --git a/docs/localization-parity.md b/docs/localization-parity.md index b2574120dd..e2d37e5055 100644 --- a/docs/localization-parity.md +++ b/docs/localization-parity.md @@ -24,7 +24,7 @@ English) in-app help, and the docs are English. (`bflatastic`), with community contributors adding or correcting (German by `dwetscher`, Japanese and Traditional Chinese by `imachus`). Georgian and the original Gujarati catalog are recorded as reviewed by native speakers; the contributor approved all 387 later Gujarati additions on 2026-11-14. -> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (10,732 catalog rows, 2026-12-02), a machine-assisted draft from the English meaning, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts include Noto Sans Gujarati as an optional `Gujr` fallback, but the web startup list contains no Gujarati face; web selection stays unavailable until a Gujarati interface face is bundled. Scores and estimates unchanged. +> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (2026-12-02); with 155 menu, label and undo rows added the same day the catalog has 10,887 rows; all machine-assisted, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts include Noto Sans Gujarati as an optional `Gujr` fallback, but the web startup list contains no Gujarati face; web selection stays unavailable until a Gujarati interface face is bundled. Scores and estimates unchanged. ## The thirteen key languages diff --git a/docs/roadmap.md b/docs/roadmap.md index 089883a25c..2c9a9f7b4e 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -28,7 +28,7 @@ > Blend redraw update (#5179): renderer bounds include spine-placed keys and steps; both focused CPU regressions pass. Scores and estimates unchanged. -> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (10,732 catalog rows, 2026-12-02), a machine-assisted draft from the English meaning, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts and web startup list contain no Gujarati face; web selection stays unavailable until a Gujarati interface face is bundled. Scores and estimates unchanged. +> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (2026-12-02); with 155 menu, label and undo rows added the same day the catalog has 10,887 rows; all machine-assisted, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts and web startup list contain no Gujarati face; web selection stays unavailable until a Gujarati interface face is bundled. Scores and estimates unchanged. ## Feature submission evidence diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 78ebe32815..e727c422a0 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -37,7 +37,7 @@ Native saves on Unix flush the destination directory after writing or replacing > Blend redraw update (#5179): renderer bounds include spine-placed keys and steps; both focused CPU regressions pass. Scores and estimates unchanged. -> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (10,732 catalog rows, 2026-12-02), a machine-assisted draft from the English meaning, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts and web startup list contain no Gujarati face; web selection stays unavailable until a Gujarati interface face is bundled. Scores and estimates unchanged. +> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (2026-12-02); with 155 menu, label and undo rows added the same day the catalog has 10,887 rows; all machine-assisted, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts and web startup list contain no Gujarati face; web selection stays unavailable until a Gujarati interface face is bundled. Scores and estimates unchanged. ## Feature submission evidence @@ -1268,7 +1268,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - Swedish messages (2026-11-13): the Swedish (`sv`) catalog has an `@msg` row for 464 of the 628 status and error messages the untranslated report listed for it; 162 messages that no complete-message catalog translates, 36 composite font errors among them, are not translated yet, and two unknown-parameter errors that start with the `{within}` placeholder stay in English, as does `{name} must be {lo}–{hi}{unit} (got {v})`, whose existing row can't match because two of its placeholders sit side by side; the rows keep their placeholders, backticked names, quoted values and command ids; native review remains; scores and estimates unchanged. - Window › Toolbars › Keep Tools Beside the Canvas, a VectorCraft layout option that is off by default, docks the Tools panel between left-side panels and the canvas instead of at the window's left edge, and workspaces keep the setting. A floating Tools panel dropped on the canvas's left edge, right of panels docked on the left, docks there and turns the setting on, and one dropped on the window's left edge docks there and turns it off; with no panels docked on the left, a drop leaves the setting as it is (#7837). Scores are unchanged (`window.toolsBesideCanvas`; `docked_tools_keep_the_window_edge_unless_kept_beside_the_canvas`, `tools_dropped_on_a_left_edge_dock_there_and_the_setting_follows`, `tools_dropped_where_the_left_edges_overlap_keep_the_setting`, `tools_dropped_beside_a_collapsed_left_dock_follow_the_strip_dropped_on`). - Hindi (2026-11-06): Hindi (`hi`): 7,877-row machine-assisted catalog, zero/one singular plurals, desktop font fallback and optional Devanagari craft-fonts fallback; all 55 translation tests pass; native review and a web font remain; scores and estimates unchanged. [Terminology and limitations](localization-hi.md). - - Gujarati (2026-11-14, #6613): `gu` has 4,673 catalog rows, zero/one singular plurals, installed desktop font fallback and support for optional `Gujr` craft-font faces. The original 4,286 rows remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (10,732 catalog rows, 2026-12-02), a machine-assisted draft from the English meaning, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned fonts and web startup list have no Gujarati face, so web selection remains unavailable until one is bundled. Current-head validation is recorded in the PR; scores and estimates unchanged. + - Gujarati (2026-11-14, #6613): `gu` had 4,673 catalog rows on 2026-11-14 (10,887 on 2026-12-02), zero/one singular plurals, installed desktop font fallback and support for optional `Gujr` craft-font faces. The original 4,286 rows remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (2026-12-02); with 155 menu, label and undo rows added the same day the catalog has 10,887 rows; all machine-assisted, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned fonts and web startup list have no Gujarati face, so web selection remains unavailable until one is bundled. Current-head validation is recorded in the PR; scores and estimates unchanged. - Hindi wording (2026-11-13): rows outside the plug-in messages keep their English's meaning, quantities and clauses, and use the catalog's save, swatch, crop, resolution, path and type terms; a test checks those terms and the point unit in every row; native review remains; scores and estimates unchanged. - Hindi word senses (2026-11-13): 85 labels and messages use the interface sense of their English: Desired is वांछित and the range message keeps both comparisons, rulers are रूलर, text characters कैरेक्टर, vector points पॉइंट, fills फ़िल्स and High Contrast उच्च कंट्रास्ट; the glossary test rejects the unrelated senses in every row; native review remains; scores and estimates unchanged. - Hindi terms (2026-11-13): every row that names a variable (data merge, variable fonts and widths, environment variables) says वेरिएबल, and joining paths, anchor points, point type and lines says जोड़ें instead of शामिल हों, which stays for joining the community; a test checks both terms in every row; scores and estimates unchanged. From 945d6a1de91c5c21b1f25affe4b21e7506257ddc Mon Sep 17 00:00:00 2001 From: ruchirguitar Date: Thu, 3 Dec 2026 08:33:59 +0530 Subject: [PATCH 03/62] docs: Gujarati status separates reviewed rows from the new draft, and the pinned fonts include Noto Sans Gujarati --- ROADMAP.md | 2 +- docs/localization-parity.md | 2 +- docs/roadmap.md | 4 ++-- docs/target-app-parity.md | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index 34f9c90b0a..105fe5bb81 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -18,7 +18,7 @@ gate: all six core workflows (path drawing and editing, paint and style, type, l production, file exchange) work end to end on macOS with save and reopen, and only the last is partial, without blocking it ([Alpha gate](docs/roadmap.md#alpha-gate)). -> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (2026-12-02); with 155 menu, label and undo rows added the same day the catalog has 10,887 rows; all machine-assisted, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts and web startup list contain no Gujarati face; web selection stays unavailable until a Gujarati interface face is bundled. Scores and estimates unchanged. +> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (2026-12-02); with 155 menu, label and undo rows added the same day the catalog has 10,887 rows; all machine-assisted, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts (craft-fonts `16bbfc3`) include Noto Sans Gujarati, but the web startup list contains no Gujarati face; web selection stays unavailable until a Gujarati interface face is bundled. Scores and estimates unchanged. ## Headline numbers diff --git a/docs/localization-parity.md b/docs/localization-parity.md index e2d37e5055..5a895b1552 100644 --- a/docs/localization-parity.md +++ b/docs/localization-parity.md @@ -34,7 +34,7 @@ Chinese by `imachus`). Georgian and the original Gujarati catalog are recorded a | Simplified Chinese (Mandarin) | `zh-hans` | 9,625 rows, 3,735 of them `@msg` and 51 `@msgplural` (counted 2026-11-17 on `main` at `ee60c51fd9`) | all (the untranslated report lists 237 messages without a row for it) | CJK UI font from craft-fonts (BIZ UDPGothic) when embedded, else a system font; IME with marked text at the caret; vertical type partial ([type-parity.md](type-parity.md)) | no | full | — (review) | | Spanish | `es` | 4,009 / 4,020 (99.7%) | all (3,770 `@msg` and 55 `@msgplural` rows, counted 2026-11-18: the untranslated report lists 269 messages without a Spanish row, 236 in its own section and 33 that all 24 checked languages lack) | Latin | no | full | — (review) | | Hindi | `hi` | 8,782 rows (2026-11-13): 3,014 `@msg`, 47 `@msgplural`, 41 `@plural`; the untranslated report on main `f793044f83` (2026-11-14) lists 676 missing rows for it: 608 in its own section and 68 that every checked language lacks | menus, dialogs, tooltips and scanned messages; contributor-approved loanword terminology; agent wording pass | UI and document text shape with HarfRust; installed desktop Devanagari fallback, or a `Deva` craft-fonts face; the web fetches Noto Sans Devanagari when the interface needs it | contributor terminology review; 2026-11-13 wording pass on messages and longer labels, and a word-sense pass on short labels, with a glossary-term test; wider proofread welcome | complete catalog, machine-assisted draft | reported missing rows, native review and layout | -| Gujarati | `gu` | 4,673 rows (2026-11-14): original 4,286 unchanged; all 387 additions contributor-reviewed and approved | menus, dialogs, status and error messages (messages machine-assisted, review pending) | installed Gujarati fonts on desktop; optional `Gujr` craft-fonts fallback (Noto Sans Gujarati, in the pinned CI/release fonts); not in the web startup list | original catalog reviewed by a native speaker; all 387 later additions approved by the contributor, with 11 wording corrections | contributor-reviewed catalog | native review of the messages and a bundled Gujarati web font | +| Gujarati | `gu` | 4,673 rows (2026-11-14): original 4,286 unchanged; all 387 additions contributor-reviewed and approved | menus, dialogs, status and error messages (messages machine-assisted, review pending) | installed Gujarati fonts on desktop; optional `Gujr` craft-fonts fallback (Noto Sans Gujarati, in the pinned CI/release fonts); not in the web startup list | original catalog reviewed by a native speaker; all 387 later additions approved by the contributor, with 11 wording corrections | original rows and the 387 additions contributor-reviewed; the 2026-12-02 messages and labels machine-assisted, native review pending | native review of the messages and a bundled Gujarati web font | | Arabic | `ar` | preparatory registration (native name العربية) and 6-form CLDR plural probe only; translations maintained upstream in `storytold/craft-i18n` (`locales/ar/vectorcraft.tsv`) and not yet consumed | none (UI not exposed pending shared catalog) | document text: existing bidirectional layout and paragraph direction; interface UI: not exposed pending shared catalog, with full shell mirroring pending STD-I18N-001 | — (preparatory) | preparatory (not exposed) | 15–20 | | French | `fr` | 9,166 rows, 3,436 of them `@msg` and 48 `@msgplural` (counted 2026-11-13): the untranslated report lists 178 missing messages for it | all | Latin | no | full | — (review) | | Portuguese | `pt-br` | 9,378 rows, 3,563 of them `@msg` and 48 `@msgplural` (counted 2026-11-13): the untranslated report lists 55 missing messages for it, which open #7116, #7211, #7330, #7378 and #7405 translate; one/other plurals | all | Latin | contributor is a Brazilian Portuguese speaker; further native review welcome | full | — (review) | diff --git a/docs/roadmap.md b/docs/roadmap.md index 2c9a9f7b4e..5e76dc8141 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -28,7 +28,7 @@ > Blend redraw update (#5179): renderer bounds include spine-placed keys and steps; both focused CPU regressions pass. Scores and estimates unchanged. -> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (2026-12-02); with 155 menu, label and undo rows added the same day the catalog has 10,887 rows; all machine-assisted, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts and web startup list contain no Gujarati face; web selection stays unavailable until a Gujarati interface face is bundled. Scores and estimates unchanged. +> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (2026-12-02); with 155 menu, label and undo rows added the same day the catalog has 10,887 rows; all machine-assisted, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts (craft-fonts `16bbfc3`) include Noto Sans Gujarati, but the web startup list contains no Gujarati face; web selection stays unavailable until a Gujarati interface face is bundled. Scores and estimates unchanged. ## Feature submission evidence @@ -215,7 +215,7 @@ Gujarati interface follow-up (2026-11-14): the catalog and zero/one plural rule | — | Interaction fidelity pass (every tool's modifiers, Properties panel per context, isolation, nuance; width-point creation and adjoining adjustment regression-tested; dialog layout reviewed) | ⬜ (new ruler-guide Alt orientation implemented; existing-guide Escape cancellation regression-tested; broader pass remains) | 60–90 | | — | Hardening at scale (big-file corpus, fuzzing, cross-platform + browser QA) | 🟡 PngSuite integrity and bounded fetching verified (#1729); real-world corpus/manual QA remain | 50–80 | | M14 follow-up | Color Picker layout (#2008) | ✅ Compact controls, centered header, stacked actions, aligned fields and screen sampling; narrow windows scroll vertically | Included above | -| M14 follow-up | Gujarati interface (#6613) | 🟡 Zero/one singular plurals and desktop font fallback; 4,673 contributor-reviewed rows, including 387 approved additions with 11 wording corrections; status/error messages translated (machine-assisted, review pending) and pinned fonts lack a Gujarati face | Included above | +| M14 follow-up | Gujarati interface (#6613) | 🟡 Zero/one singular plurals and desktop font fallback; 4,673 contributor-reviewed rows, including 387 approved additions with 11 wording corrections; status/error messages translated (machine-assisted, review pending) and the pinned fonts include Noto Sans Gujarati, but the web does not offer Gujarati yet | Included above | | | **Total to full parity** (one agent; from [target-app-parity.md](target-app-parity.md)) | | **~360–590** | Milestone estimates predate the 2026-10-10 re-measure for M1–M14; the area table in diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index e727c422a0..36224b5a36 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -37,7 +37,7 @@ Native saves on Unix flush the destination directory after writing or replacing > Blend redraw update (#5179): renderer bounds include spine-placed keys and steps; both focused CPU regressions pass. Scores and estimates unchanged. -> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (2026-12-02); with 155 menu, label and undo rows added the same day the catalog has 10,887 rows; all machine-assisted, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts and web startup list contain no Gujarati face; web selection stays unavailable until a Gujarati interface face is bundled. Scores and estimates unchanged. +> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (2026-12-02); with 155 menu, label and undo rows added the same day the catalog has 10,887 rows; all machine-assisted, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts (craft-fonts `16bbfc3`) include Noto Sans Gujarati, but the web startup list contains no Gujarati face; web selection stays unavailable until a Gujarati interface face is bundled. Scores and estimates unchanged. ## Feature submission evidence @@ -1268,7 +1268,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - Swedish messages (2026-11-13): the Swedish (`sv`) catalog has an `@msg` row for 464 of the 628 status and error messages the untranslated report listed for it; 162 messages that no complete-message catalog translates, 36 composite font errors among them, are not translated yet, and two unknown-parameter errors that start with the `{within}` placeholder stay in English, as does `{name} must be {lo}–{hi}{unit} (got {v})`, whose existing row can't match because two of its placeholders sit side by side; the rows keep their placeholders, backticked names, quoted values and command ids; native review remains; scores and estimates unchanged. - Window › Toolbars › Keep Tools Beside the Canvas, a VectorCraft layout option that is off by default, docks the Tools panel between left-side panels and the canvas instead of at the window's left edge, and workspaces keep the setting. A floating Tools panel dropped on the canvas's left edge, right of panels docked on the left, docks there and turns the setting on, and one dropped on the window's left edge docks there and turns it off; with no panels docked on the left, a drop leaves the setting as it is (#7837). Scores are unchanged (`window.toolsBesideCanvas`; `docked_tools_keep_the_window_edge_unless_kept_beside_the_canvas`, `tools_dropped_on_a_left_edge_dock_there_and_the_setting_follows`, `tools_dropped_where_the_left_edges_overlap_keep_the_setting`, `tools_dropped_beside_a_collapsed_left_dock_follow_the_strip_dropped_on`). - Hindi (2026-11-06): Hindi (`hi`): 7,877-row machine-assisted catalog, zero/one singular plurals, desktop font fallback and optional Devanagari craft-fonts fallback; all 55 translation tests pass; native review and a web font remain; scores and estimates unchanged. [Terminology and limitations](localization-hi.md). - - Gujarati (2026-11-14, #6613): `gu` had 4,673 catalog rows on 2026-11-14 (10,887 on 2026-12-02), zero/one singular plurals, installed desktop font fallback and support for optional `Gujr` craft-font faces. The original 4,286 rows remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (2026-12-02); with 155 menu, label and undo rows added the same day the catalog has 10,887 rows; all machine-assisted, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned fonts and web startup list have no Gujarati face, so web selection remains unavailable until one is bundled. Current-head validation is recorded in the PR; scores and estimates unchanged. + - Gujarati (2026-11-14, #6613): `gu` had 4,673 catalog rows on 2026-11-14 (10,887 on 2026-12-02), zero/one singular plurals, installed desktop font fallback and support for optional `Gujr` craft-font faces. The original 4,286 rows remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (2026-12-02); with 155 menu, label and undo rows added the same day the catalog has 10,887 rows; all machine-assisted, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned fonts include Noto Sans Gujarati, but the web startup list has no Gujarati face, so web selection remains unavailable until one is bundled. Current-head validation is recorded in the PR; scores and estimates unchanged. - Hindi wording (2026-11-13): rows outside the plug-in messages keep their English's meaning, quantities and clauses, and use the catalog's save, swatch, crop, resolution, path and type terms; a test checks those terms and the point unit in every row; native review remains; scores and estimates unchanged. - Hindi word senses (2026-11-13): 85 labels and messages use the interface sense of their English: Desired is वांछित and the range message keeps both comparisons, rulers are रूलर, text characters कैरेक्टर, vector points पॉइंट, fills फ़िल्स and High Contrast उच्च कंट्रास्ट; the glossary test rejects the unrelated senses in every row; native review remains; scores and estimates unchanged. - Hindi terms (2026-11-13): every row that names a variable (data merge, variable fonts and widths, environment variables) says वेरिएबल, and joining paths, anchor points, point type and lines says जोड़ें instead of शामिल हों, which stays for joining the community; a test checks both terms in every row; scores and estimates unchanged. From 9d768d61936c70db261b5ec4c991d17ef811fc93 Mon Sep 17 00:00:00 2001 From: ruchirguitar <113586074+ruchirguitar@users.noreply.github.com> Date: Fri, 4 Dec 2026 19:42:38 +0530 Subject: [PATCH 04/62] Type menu: show conversions for the selected text kinds --- crates/ui-egui/src/menus/state.rs | 59 ++++++++++++++++++------------- crates/ui-egui/src/menus/tests.rs | 45 +++++++++++++++++++++++ 2 files changed, 80 insertions(+), 24 deletions(-) diff --git a/crates/ui-egui/src/menus/state.rs b/crates/ui-egui/src/menus/state.rs index 6ae7c66be0..f00d98a243 100644 --- a/crates/ui-egui/src/menus/state.rs +++ b/crates/ui-egui/src/menus/state.rs @@ -4,6 +4,37 @@ use super::{Brightness, Value, VectorcraftApp}; use crate::i18n::LangExt as _; use craft::keymap::{Chord, CommandRef}; use craft::ui::runtime::commands; +use vectorcraft_engine::doc::{NodeKind, TextKind, TextObject}; + +/// The first matching text object among the selection and its descendants, in command order. +fn selected_text(app: &VectorcraftApp, matches_kind: fn(&TextKind) -> bool) -> Option<&TextObject> { + let st = app.session.active()?; + for node in st.selection.objects.iter().filter_map(|id| st.doc.node(*id)) { + let mut found = None; + node.walk(&mut |child| { + if found.is_none() + && let NodeKind::Text(text) = &child.kind + && matches_kind(&text.kind) + { + found = Some(text); + } + }); + if found.is_some() { + return found; + } + } + None +} + +/// Conversion rows in the Type menu require an object of the source kind. +fn type_conversion_hidden(app: &VectorcraftApp, id: &str) -> bool { + let matches_kind: fn(&TextKind) -> bool = match id { + "type.convertToAreaType" => |kind| matches!(kind, TextKind::Point), + "type.convertToPointType" => |kind| matches!(kind, TextKind::Area { .. }), + _ => return false, + }; + selected_text(app, matches_kind).is_none() +} /// Checked state for toggle items. pub fn checked(app: &VectorcraftApp, id: &str, p: &Value) -> Option { @@ -19,26 +50,6 @@ pub fn checked(app: &VectorcraftApp, id: &str, p: &Value) -> Option { let v = &app.ui.view; // An item that can be on or off is `Some` whatever the document and selection (off with none): // the macOS menu bar can't change an item's kind without rebuilding. - // The first type object of a kind `kinds` takes among the selected objects and the objects - // inside them, in the order the type commands act on them. - let selected_text = |kinds: fn(&vectorcraft_engine::doc::TextKind) -> bool| { - let st = app.session.active()?; - let mut found = None; - for n in st.selection.objects.iter().filter_map(|id| st.doc.node(*id)) { - n.walk(&mut |c| { - if found.is_none() - && let vectorcraft_engine::doc::NodeKind::Text(t) = &c.kind - && kinds(&t.kind) - { - found = Some(t); - } - }); - if found.is_some() { - break; - } - } - found - }; Some(match id { "type.orientation.vertical" | "type.orientation.horizontal" => { crate::panels::character::shared_text_flag(app, |t| t.vertical) == Some(id == "type.orientation.vertical") @@ -46,14 +57,14 @@ pub fn checked(app: &VectorcraftApp, id: &str, p: &Value) -> Option { "type.opticalMarginAlignment" => crate::panels::character::shared_text_flag(app, |t| t.optical_margin) == Some(true), // Dynamic Text of the first selected type, which the item turns the other way (point type // counts as off: the item turns it into area type with Block on). - "type.dynamicText" => selected_text(|_| true).is_some_and(|t| t.dynamic_text && !matches!(t.kind, vectorcraft_engine::doc::TextKind::Point)), + "type.dynamicText" => selected_text(app, |_| true).is_some_and(|t| t.dynamic_text && !matches!(t.kind, TextKind::Point)), "view.outline" => app.outline_view(), "view.pixelPreview" => v.pixel_preview, "view.trimView" => v.trim_view, "view.snapToPixel" => v.snap_to_pixel, "view.snapToGlyph" => v.snap_to_glyph, // Type on a Path effect of the selected path type. - "type.pathOptions" if p.get("effect").is_some() => selected_text(|k| matches!(k, vectorcraft_engine::doc::TextKind::OnPath { .. })) + "type.pathOptions" if p.get("effect").is_some() => selected_text(app, |k| matches!(k, TextKind::OnPath { .. })) .is_some_and(|t| p.get("effect").and_then(Value::as_str) == Some(t.path_effect.id())), "view.smartGuides" => v.smart_guides, "edit.autoSpellCheck" => v.auto_spell_check, @@ -172,7 +183,7 @@ fn east_asian_hidden(app: &VectorcraftApp, id: &str) -> bool { /// How the menus show item `id` (params `p`) now: (enabled, checked: `Some` for an item that is on /// or off), or `None` while they leave it out: an empty slot ([`hidden_when_disabled`]), an item /// another stands in for ([`swapped_out`]) or an East Asian item with those options hidden -/// ([`east_asian_hidden`]). +/// ([`east_asian_hidden`]), or a type conversion without eligible text ([`type_conversion_hidden`]). pub fn shown_state(app: &VectorcraftApp, id: &str, p: &Value) -> Option<(bool, Option)> { shown_state_with(app, id, p, &mut |id| why_off(app, id)) } @@ -188,7 +199,7 @@ pub(crate) fn shown_state_with( let en = why_off(id).is_none() && (id != crate::addons::select::link_status::COMMAND || crate::addons::select::link_status::enabled(app, p)) && (!vectorcraft_engine::cmd::plugin::is_command_id(id) || crate::dialogs::plugin::canvas_item_enabled(app, id, p)); - if (!en && hidden_when_disabled(id)) || swapped_out(id, why_off) || east_asian_hidden(app, id) { + if (!en && hidden_when_disabled(id)) || swapped_out(id, why_off) || east_asian_hidden(app, id) || type_conversion_hidden(app, id) { return None; } Some((en, checked(app, id, p))) diff --git a/crates/ui-egui/src/menus/tests.rs b/crates/ui-egui/src/menus/tests.rs index 39909b57eb..df23d8edf9 100644 --- a/crates/ui-egui/src/menus/tests.rs +++ b/crates/ui-egui/src/menus/tests.rs @@ -164,6 +164,51 @@ fn snapping_menu_clicks_toggle_view_state_and_painted_checkmarks() { assert_eq!(menu.toggled("Pixel Snapping Options…"), None); } +#[test] +fn type_menu_offers_only_conversions_that_apply_to_selected_text() { + use crate::tests::panel_harness::Panel; + use craft::ui::contract::Role; + + fn draw(app: &mut VectorcraftApp, ui: &mut egui::Ui) { + model::refresh(app, ui.ctx()); + craft::menu::MenuBarUi::new(&app.menus.laid).show(ui); + } + + const TO_AREA: &str = "Convert To Area Type"; + const TO_POINT: &str = "Convert To Point Type"; + crate::i18n::set_current(crate::i18n::Lang::EN); + let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), crate::Services::default()); + app.run("file.new", json!({})).unwrap(); + let point = app.run("text.create", json!({"x": 20, "y": 40, "text": "Point type"})).unwrap()["id"].clone(); + let area = app.run("text.create", json!({"x": 20, "y": 100, "text": "Area type", "area": {"width": 120, "height": 60}})).unwrap()["id"].clone(); + + app.run("select.set", json!({"ids": [point.clone()]})).unwrap(); + let mut menu = Panel::new(app, draw); + menu.click("Type"); + assert!(menu.menu_item_enabled(TO_AREA)); + assert!(!menu.shows_role(TO_POINT, Role::MENU_ITEM)); + menu.click_menu_item(TO_AREA); + menu.click("Type"); + assert!(menu.menu_item_enabled(TO_POINT)); + assert!(!menu.shows_role(TO_AREA, Role::MENU_ITEM)); + menu.click_menu_item(TO_POINT); + menu.click("Type"); + assert!(menu.menu_item_enabled(TO_AREA)); + assert!(!menu.shows_role(TO_POINT, Role::MENU_ITEM)); + menu.click("Type"); + + menu.app().run("select.set", json!({"ids": [point, area]})).unwrap(); + menu.click("Type"); + assert!(menu.menu_item_enabled(TO_AREA)); + assert!(menu.menu_item_enabled(TO_POINT)); + menu.click("Type"); + + menu.app().run("select.set", json!({"ids": []})).unwrap(); + menu.click("Type"); + assert!(!menu.shows_role(TO_AREA, Role::MENU_ITEM)); + assert!(!menu.shows_role(TO_POINT, Role::MENU_ITEM)); +} + /// The Window menu keeps one check column: the labels of checked and unchecked panels, of plain /// commands and of submenus all start at the same x. #[test] From e29814c6dc813da29a68d26595c085a2cca51f84 Mon Sep 17 00:00:00 2001 From: ruchirguitar <113586074+ruchirguitar@users.noreply.github.com> Date: Fri, 4 Dec 2026 19:53:47 +0530 Subject: [PATCH 05/62] Borrow the selected text object from its node --- crates/ui-egui/src/menus/state.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ui-egui/src/menus/state.rs b/crates/ui-egui/src/menus/state.rs index f00d98a243..c102276b0b 100644 --- a/crates/ui-egui/src/menus/state.rs +++ b/crates/ui-egui/src/menus/state.rs @@ -16,7 +16,7 @@ fn selected_text(app: &VectorcraftApp, matches_kind: fn(&TextKind) -> bool) -> O && let NodeKind::Text(text) = &child.kind && matches_kind(&text.kind) { - found = Some(text); + found = Some(text.as_ref()); } }); if found.is_some() { From eb4b84e601f3c30a9b909d9c3f6a1cfd87c7d56b Mon Sep 17 00:00:00 2001 From: ruchirguitar <113586074+ruchirguitar@users.noreply.github.com> Date: Fri, 4 Dec 2026 21:22:43 +0530 Subject: [PATCH 06/62] Type menu: share conversion availability across commands --- crates/engine/src/cmd/typemenu.rs | 18 ++++++++- crates/engine/src/tests/menucmds.rs | 37 ++++++++++++++--- crates/ui-egui/src/menus/state.rs | 61 ++++++++++++----------------- crates/ui-egui/src/menus/tests.rs | 17 +++++++- 4 files changed, 89 insertions(+), 44 deletions(-) diff --git a/crates/engine/src/cmd/typemenu.rs b/crates/engine/src/cmd/typemenu.rs index 70aa0ee07c..81f5c7a5ef 100644 --- a/crates/engine/src/cmd/typemenu.rs +++ b/crates/engine/src/cmd/typemenu.rs @@ -2,6 +2,8 @@ //! Options, Dynamic Text, Fill with Placeholder Text, Insert Special/Whitespace/Break characters) //! and the text commands of the Edit menu (Find and Replace, Find Next, Paste without Formatting). +use std::ops::ControlFlow; + use serde_json::{Value, json}; use vectorcraft_doc::{AreaFit, CharStyle, Document, Justify, LockedArtboards, Node, NodeId, NodeKind, Quotes, TextKind, TextObject, TextRun}; use vectorcraft_geom::{Affine, Rect, shapes}; @@ -40,7 +42,7 @@ pub fn specs() -> Vec { ["Type"], None, "{ids?|id?} point type → area type framed by its current layout bounds → {ids}", - has_selection, + |s| has_selected_text_kind(s, |kind| matches!(kind, TextKind::Point), "select point type"), to_area ), cmd!( @@ -49,7 +51,7 @@ pub fn specs() -> Vec { ["Type"], None, "{ids?|id?} area type → point type; soft line wraps become line breaks, a frame of threaded text leaves its thread with the text it holds, and Dynamic Text (Block) is turned off, keeping the sizes it set → {ids}", - has_selection, + |s| has_selected_text_kind(s, |kind| matches!(kind, TextKind::Area { .. }), "select area type"), to_point ), cmd!( @@ -154,6 +156,18 @@ pub fn specs() -> Vec { ] } +/// A selected object or one of its descendants has the source kind a conversion needs. +fn has_selected_text_kind(s: &Session, matches_kind: fn(&TextKind) -> bool, reason: &str) -> std::result::Result<(), String> { + let st = s.active().ok_or("no document open")?; + let found = st.selection.objects.iter().filter_map(|id| st.doc.node(*id)).any(|node| { + node.try_walk(&mut |child| { + if matches!(&child.kind, NodeKind::Text(text) if matches_kind(&text.kind)) { ControlFlow::Break(()) } else { ControlFlow::Continue(()) } + }) + .is_break() + }); + found.then_some(()).ok_or_else(|| reason.into()) +} + /// Text objects among `ids` and their descendants. pub(crate) fn text_ids(d: &Document, ids: &[NodeId]) -> Vec { let paths = d.index_paths(ids.iter().copied()); diff --git a/crates/engine/src/tests/menucmds.rs b/crates/engine/src/tests/menucmds.rs index 6896802a68..78c0578678 100644 --- a/crates/engine/src/tests/menucmds.rs +++ b/crates/engine/src/tests/menucmds.rs @@ -4275,19 +4275,44 @@ fn convert_point_area_roundtrip() { assert_eq!(tt.plain_text(), "Some words"); } -/// Convert To Area Type with no point type selected, and Convert To Point Type with no area type -/// selected, record no undo step and reply with the objects. With point type and area type -/// selected, Convert To Area Type converts the point type in one undo step, and Convert To Point -/// Type then converts both in another. #[test] -fn converting_type_to_the_kind_it_is_records_no_undo_step() { +fn type_conversion_availability_requires_its_source_kind() { + let mut s = session(); + let point = text(&mut s, "Point"); + let area = id_of(&s.execute("text.create", &json!({"x": 0, "y": 100, "text": "Area", "area": {"width": 100, "height": 50}})).unwrap()); + let rectangle = rect(&mut s, 200.0, 50.0, 20.0, 20.0); + let to_area = find_command("type.convertToAreaType").unwrap(); + let to_point = find_command("type.convertToPointType").unwrap(); + for (selection, can_convert_to_area, can_convert_to_point) in + [(&[point][..], true, false), (&[area][..], false, true), (&[rectangle][..], false, false), (&[area, point][..], true, true)] + { + sel(&mut s, selection); + for (spec, can_convert) in [(to_area, can_convert_to_area), (to_point, can_convert_to_point)] { + let info = spec.info(&s); + assert_eq!(info.enabled, can_convert, "{} on {selection:?}", info.id); + assert_eq!(info.disabled_reason.is_some(), !can_convert, "{} on {selection:?}", info.id); + } + } + + sel(&mut s, &[rectangle, point]); + let group = id_of(&s.execute("object.group", &json!({})).unwrap()); + sel(&mut s, &[group]); + assert!(to_area.info(&s).enabled); + assert!(!to_point.info(&s).enabled); +} + +/// An inapplicable conversion is disabled and leaves undo history intact. With point type and +/// area type selected, Convert To Area Type converts the point type in one undo step, and +/// Convert To Point Type then converts both in another. +#[test] +fn inapplicable_type_conversions_record_no_undo_step() { let mut s = session(); let p = text(&mut s, "Point"); let a = id_of(&s.execute("text.create", &json!({"x": 0, "y": 100, "text": "Area", "area": {"width": 100, "height": 50}})).unwrap()); for (c, id) in [("type.convertToAreaType", a), ("type.convertToPointType", p)] { select_with_a_step_to_redo(&mut s, &[id]); let before = history(&s); - assert_eq!(s.execute(c, &json!({})).unwrap(), json!({"ids": [id.0]}), "{c}"); + assert!(matches!(s.execute(c, &json!({})), Err(EngineError::Disabled(..))), "{c}"); assert_eq!(history(&s), before, "{c}"); } for c in ["type.convertToAreaType", "type.convertToPointType"] { diff --git a/crates/ui-egui/src/menus/state.rs b/crates/ui-egui/src/menus/state.rs index c102276b0b..d04f5d488a 100644 --- a/crates/ui-egui/src/menus/state.rs +++ b/crates/ui-egui/src/menus/state.rs @@ -4,37 +4,6 @@ use super::{Brightness, Value, VectorcraftApp}; use crate::i18n::LangExt as _; use craft::keymap::{Chord, CommandRef}; use craft::ui::runtime::commands; -use vectorcraft_engine::doc::{NodeKind, TextKind, TextObject}; - -/// The first matching text object among the selection and its descendants, in command order. -fn selected_text(app: &VectorcraftApp, matches_kind: fn(&TextKind) -> bool) -> Option<&TextObject> { - let st = app.session.active()?; - for node in st.selection.objects.iter().filter_map(|id| st.doc.node(*id)) { - let mut found = None; - node.walk(&mut |child| { - if found.is_none() - && let NodeKind::Text(text) = &child.kind - && matches_kind(&text.kind) - { - found = Some(text.as_ref()); - } - }); - if found.is_some() { - return found; - } - } - None -} - -/// Conversion rows in the Type menu require an object of the source kind. -fn type_conversion_hidden(app: &VectorcraftApp, id: &str) -> bool { - let matches_kind: fn(&TextKind) -> bool = match id { - "type.convertToAreaType" => |kind| matches!(kind, TextKind::Point), - "type.convertToPointType" => |kind| matches!(kind, TextKind::Area { .. }), - _ => return false, - }; - selected_text(app, matches_kind).is_none() -} /// Checked state for toggle items. pub fn checked(app: &VectorcraftApp, id: &str, p: &Value) -> Option { @@ -50,6 +19,26 @@ pub fn checked(app: &VectorcraftApp, id: &str, p: &Value) -> Option { let v = &app.ui.view; // An item that can be on or off is `Some` whatever the document and selection (off with none): // the macOS menu bar can't change an item's kind without rebuilding. + // The first type object of a kind `kinds` takes among the selected objects and the objects + // inside them, in the order the type commands act on them. + let selected_text = |kinds: fn(&vectorcraft_engine::doc::TextKind) -> bool| { + let st = app.session.active()?; + let mut found = None; + for n in st.selection.objects.iter().filter_map(|id| st.doc.node(*id)) { + n.walk(&mut |c| { + if found.is_none() + && let vectorcraft_engine::doc::NodeKind::Text(t) = &c.kind + && kinds(&t.kind) + { + found = Some(t); + } + }); + if found.is_some() { + break; + } + } + found + }; Some(match id { "type.orientation.vertical" | "type.orientation.horizontal" => { crate::panels::character::shared_text_flag(app, |t| t.vertical) == Some(id == "type.orientation.vertical") @@ -57,14 +46,14 @@ pub fn checked(app: &VectorcraftApp, id: &str, p: &Value) -> Option { "type.opticalMarginAlignment" => crate::panels::character::shared_text_flag(app, |t| t.optical_margin) == Some(true), // Dynamic Text of the first selected type, which the item turns the other way (point type // counts as off: the item turns it into area type with Block on). - "type.dynamicText" => selected_text(app, |_| true).is_some_and(|t| t.dynamic_text && !matches!(t.kind, TextKind::Point)), + "type.dynamicText" => selected_text(|_| true).is_some_and(|t| t.dynamic_text && !matches!(t.kind, vectorcraft_engine::doc::TextKind::Point)), "view.outline" => app.outline_view(), "view.pixelPreview" => v.pixel_preview, "view.trimView" => v.trim_view, "view.snapToPixel" => v.snap_to_pixel, "view.snapToGlyph" => v.snap_to_glyph, // Type on a Path effect of the selected path type. - "type.pathOptions" if p.get("effect").is_some() => selected_text(app, |k| matches!(k, TextKind::OnPath { .. })) + "type.pathOptions" if p.get("effect").is_some() => selected_text(|k| matches!(k, vectorcraft_engine::doc::TextKind::OnPath { .. })) .is_some_and(|t| p.get("effect").and_then(Value::as_str) == Some(t.path_effect.id())), "view.smartGuides" => v.smart_guides, "edit.autoSpellCheck" => v.auto_spell_check, @@ -183,7 +172,7 @@ fn east_asian_hidden(app: &VectorcraftApp, id: &str) -> bool { /// How the menus show item `id` (params `p`) now: (enabled, checked: `Some` for an item that is on /// or off), or `None` while they leave it out: an empty slot ([`hidden_when_disabled`]), an item /// another stands in for ([`swapped_out`]) or an East Asian item with those options hidden -/// ([`east_asian_hidden`]), or a type conversion without eligible text ([`type_conversion_hidden`]). +/// ([`east_asian_hidden`]), or a disabled type conversion. pub fn shown_state(app: &VectorcraftApp, id: &str, p: &Value) -> Option<(bool, Option)> { shown_state_with(app, id, p, &mut |id| why_off(app, id)) } @@ -199,7 +188,9 @@ pub(crate) fn shown_state_with( let en = why_off(id).is_none() && (id != crate::addons::select::link_status::COMMAND || crate::addons::select::link_status::enabled(app, p)) && (!vectorcraft_engine::cmd::plugin::is_command_id(id) || crate::dialogs::plugin::canvas_item_enabled(app, id, p)); - if (!en && hidden_when_disabled(id)) || swapped_out(id, why_off) || east_asian_hidden(app, id) || type_conversion_hidden(app, id) { + // Keep conversion labels in the catalog while leaving unavailable rows out of the Type menu. + let hide_disabled = hidden_when_disabled(id) || matches!(id, "type.convertToAreaType" | "type.convertToPointType"); + if (!en && hide_disabled) || swapped_out(id, why_off) || east_asian_hidden(app, id) { return None; } Some((en, checked(app, id, p))) diff --git a/crates/ui-egui/src/menus/tests.rs b/crates/ui-egui/src/menus/tests.rs index df23d8edf9..51ac2dd658 100644 --- a/crates/ui-egui/src/menus/tests.rs +++ b/crates/ui-egui/src/menus/tests.rs @@ -181,6 +181,7 @@ fn type_menu_offers_only_conversions_that_apply_to_selected_text() { app.run("file.new", json!({})).unwrap(); let point = app.run("text.create", json!({"x": 20, "y": 40, "text": "Point type"})).unwrap()["id"].clone(); let area = app.run("text.create", json!({"x": 20, "y": 100, "text": "Area type", "area": {"width": 120, "height": 60}})).unwrap()["id"].clone(); + let rectangle = app.run("shape.rectangle", json!({"x": 160, "y": 40, "width": 40, "height": 40})).unwrap()["id"].clone(); app.run("select.set", json!({"ids": [point.clone()]})).unwrap(); let mut menu = Panel::new(app, draw); @@ -197,7 +198,7 @@ fn type_menu_offers_only_conversions_that_apply_to_selected_text() { assert!(!menu.shows_role(TO_POINT, Role::MENU_ITEM)); menu.click("Type"); - menu.app().run("select.set", json!({"ids": [point, area]})).unwrap(); + menu.app().run("select.set", json!({"ids": [point.clone(), area]})).unwrap(); menu.click("Type"); assert!(menu.menu_item_enabled(TO_AREA)); assert!(menu.menu_item_enabled(TO_POINT)); @@ -207,6 +208,20 @@ fn type_menu_offers_only_conversions_that_apply_to_selected_text() { menu.click("Type"); assert!(!menu.shows_role(TO_AREA, Role::MENU_ITEM)); assert!(!menu.shows_role(TO_POINT, Role::MENU_ITEM)); + menu.click("Type"); + + menu.app().run("select.set", json!({"ids": [rectangle.clone()]})).unwrap(); + menu.click("Type"); + assert!(!menu.shows_role(TO_AREA, Role::MENU_ITEM)); + assert!(!menu.shows_role(TO_POINT, Role::MENU_ITEM)); + menu.click("Type"); + + menu.app().run("select.set", json!({"ids": [rectangle, point]})).unwrap(); + let group = menu.app().run("object.group", json!({})).unwrap()["id"].clone(); + menu.app().run("select.set", json!({"ids": [group]})).unwrap(); + menu.click("Type"); + assert!(menu.menu_item_enabled(TO_AREA)); + assert!(!menu.shows_role(TO_POINT, Role::MENU_ITEM)); } /// The Window menu keeps one check column: the labels of checked and unchecked panels, of plain From dd5bec4cade457c2bc4636c907e70c7f5606b172 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 4 Dec 2026 11:38:01 -0800 Subject: [PATCH 07/62] Thumbnails: node renders and swatch previews become images without a copy Every thumbnail and preview rendered a node, a region or a pattern swatch into a byte buffer, and canvas::color_image then copied those bytes into a new Vec for the egui image. The Layers rows, Graphic Styles large preview, Asset Export tiles, Graph Design preview, Navigator, Transparency object and mask thumbnails, pattern swatches, Symbols panel pictures and the Composite Fonts sample each paid that copy, and a supersampled render allocated a second full-size buffer to downsample into. The renderer now renders these in words as well, as the canvas frame already does: render_node_words, render_node_thumbnail_words(_with), render_thumbnail_words, render_region_with_words and render_pattern_swatch_words. node_pixels and the pattern swatch are generic over the frame pixel type, and a supersampled render downsamples straight into the buffer it returns. Each caller hands the words to color_image_owned, which keeps the buffer. canvas::color_image has no callers left and is removed. Each moved path has a test that checks the image holds the buffer the pixels were rendered into, and the render tests check that the words hold the same bytes as the byte renders. --- crates/render/src/lib.rs | 2 +- crates/render/src/options.rs | 9 +- crates/render/src/pattern.rs | 32 ++++++- crates/render/src/renderer.rs | 88 +++++++++++++++-- crates/render/src/tests/words.rs | 94 ++++++++++++++++++- crates/ui-egui/Cargo.toml | 2 +- crates/ui-egui/src/canvas.rs | 4 +- crates/ui-egui/src/canvas/raster.rs | 34 ++++--- crates/ui-egui/src/canvas/tests.rs | 2 +- .../src/dialogs/composite_fonts/sample.rs | 31 ++++-- .../src/dialogs/composite_fonts/tests.rs | 1 + crates/ui-egui/src/dialogs/graph_design.rs | 16 +++- crates/ui-egui/src/panels/asset_export.rs | 28 +++--- crates/ui-egui/src/panels/graphic_styles.rs | 8 +- crates/ui-egui/src/panels/layers/thumbs.rs | 24 ++++- crates/ui-egui/src/panels/navigator.rs | 18 +++- crates/ui-egui/src/panels/swatches.rs | 11 ++- crates/ui-egui/src/panels/swatches/tests.rs | 15 +++ crates/ui-egui/src/panels/symbols.rs | 10 +- crates/ui-egui/src/panels/symbols/tests.rs | 25 ++++- .../ui-egui/src/panels/tests_asset_export.rs | 18 +++- crates/ui-egui/src/panels/transparency.rs | 23 ++++- 22 files changed, 411 insertions(+), 84 deletions(-) diff --git a/crates/render/src/lib.rs b/crates/render/src/lib.rs index f2b76c525d..2ffbee36b2 100644 --- a/crates/render/src/lib.rs +++ b/crates/render/src/lib.rs @@ -47,7 +47,7 @@ pub use effects::stroke::width_outline; pub use fx::pinned_appearance_for_geometry_edit; pub use images::{IMAGE_CACHE_MAX, image_cache_bytes, installed_memory, newly_undecodable, set_image_cache_budget}; pub use live::expand_live; -pub use pattern::render_pattern_swatch; +pub use pattern::{render_pattern_swatch, render_pattern_swatch_words}; pub use vectorcraft_effects as effects; pub use vello_cpu; diff --git a/crates/render/src/options.rs b/crates/render/src/options.rs index e185504d05..6a9736c85c 100644 --- a/crates/render/src/options.rs +++ b/crates/render/src/options.rs @@ -243,11 +243,11 @@ pub fn supersample_factor(w: u32, h: u32) -> Option { }) } -/// Average each `k`×`k` block of `src` (`w`×`h` pixels of 4 premultiplied bytes) into one pixel. -pub(crate) fn downsample(src: &[u8], w: usize, h: usize, k: usize) -> Vec { - let (ow, oh) = (w / k.max(1), h / k.max(1)); +/// Average each `k`×`k` block of `src` (pixels of 4 premultiplied bytes in rows `w` wide) into one +/// pixel of `out`, whose rows are `w` / `k` pixels wide. +pub(crate) fn downsample(src: &[u8], w: usize, k: usize, out: &mut [u8]) { + let ow = w / k.max(1); let n = (k * k).max(1) as u32; - let mut out = vec![0u8; ow * oh * 4]; for (o, px) in out.as_chunks_mut::<4>().0.iter_mut().enumerate() { let (ox, oy) = (o % ow.max(1), o / ow.max(1)); let mut acc = [0u32; 4]; @@ -263,7 +263,6 @@ pub(crate) fn downsample(src: &[u8], w: usize, h: usize, k: usize) -> Vec { *d = ((a + n / 2) / n).min(255) as u8; } } - out } /// For each of `to` pixels spread over `from` (both above 0), the `from` pixels under it and the diff --git a/crates/render/src/pattern.rs b/crates/render/src/pattern.rs index 9e44f5c655..076e80d2e1 100644 --- a/crates/render/src/pattern.rs +++ b/crates/render/src/pattern.rs @@ -28,6 +28,7 @@ use vello_cpu::{Pixmap, RenderContext}; use crate::ink::Ink; use crate::lru::{self, FrameCache}; +use crate::renderer::FramePixels; use crate::{Frame, RenderOptions, Rendered, Renderer}; /// Largest super-tile raster side (pixels). @@ -179,6 +180,21 @@ fn rasterize( ink: Ink, mark_undecoded_images: bool, ) -> (Pixmap, bool) { + rasterize_as(r, doc, def, region, size, ink, mark_undecoded_images, |r, ctx| r.finish(ctx, r.raster)) +} + +/// [`rasterize`], with the pixels taken from the context by `finish`. +#[allow(clippy::too_many_arguments)] +fn rasterize_as( + r: &mut Renderer, + doc: &Document, + def: &PatternDef, + region: Rect, + size: (u16, u16), + ink: Ink, + mark_undecoded_images: bool, + finish: impl FnOnce(&mut Renderer, &mut RenderContext) -> T, +) -> (T, bool) { let (w, h) = (size.0.max(1), size.1.max(1)); let mut ctx = crate::single_threaded_context(w, h); let view = Affine::scale_non_uniform(w as f64 / region.width().max(1e-9), h as f64 / region.height().max(1e-9)) @@ -213,7 +229,7 @@ fn rasterize( r.draw_arc(&mut ctx, &frame, a); } } - (r.finish(&mut ctx, r.raster), r.image_left_out.take().unwrap_or(false) || images_left_out() > pattern_images_left_out) + (finish(r, &mut ctx), r.image_left_out.take().unwrap_or(false) || images_left_out() > pattern_images_left_out) } /// Run `f` with the shared off-screen renderer (None when nested too deep: a pattern whose art @@ -333,13 +349,23 @@ pub(crate) fn set_pattern_paint(ctx: &mut RenderContext, name: &str, xf: Affine, /// A swatch thumbnail of pattern `name`: the tiling around the tile, fitted into `size`². pub fn render_pattern_swatch(doc: &Document, name: &str, size: u32) -> Option { + pattern_swatch(doc, name, size) +} + +/// [`render_pattern_swatch`] with the pixels in words of four bytes, as +/// [`Renderer::render_words`] returns them. +pub fn render_pattern_swatch_words(doc: &Document, name: &str, size: u32) -> Option>> { + pattern_swatch(doc, name, size) +} + +fn pattern_swatch(doc: &Document, name: &str, size: u32) -> Option> { let def = doc.pattern(name)?; let (w, h) = (def.width(), def.height()); let side = w.max(h); let region = Rect::from_center_size((w / 2.0, h / 2.0), (side, side)); let px = size.clamp(1, 1024) as u16; - let (pm, _) = with_tile_renderer(|r| rasterize(r, doc, def, region, (px, px), Ink::Display, false))?; - Some(Rendered { width: px as u32, height: px as u32, pixels: crate::group::into_bytes(pm) }) + let (pixels, _) = with_tile_renderer(|r| rasterize_as(r, doc, def, region, (px, px), Ink::Display, false, P::finish))?; + Some(Rendered { width: px as u32, height: px as u32, pixels }) } impl Renderer { diff --git a/crates/render/src/renderer.rs b/crates/render/src/renderer.rs index 1e32c3657b..c2a10b37a4 100644 --- a/crates/render/src/renderer.rs +++ b/crates/render/src/renderer.rs @@ -189,9 +189,11 @@ impl Renderer { let hairline = std::mem::replace(&mut self.hairline, f64::from(k)); let big: Rendered = self.render_as(doc, w * k, h * k, Affine::scale(f64::from(k)) * view, &hard, inks, k, patch); self.hairline = hairline; - let pixels = downsample(&big.pixels, big.width as usize, big.height as usize, k as usize); + let mut pixels = P::blank(w as usize * h as usize); + downsample(&big.pixels, big.width as usize, k as usize, pixels.bytes_mut()); + #[cfg(test)] + group::FINISHED.with(|p| p.set(pixels.bytes_mut().as_ptr() as usize)); drop(big); - let pixels = P::from_bytes(pixels); self.stats.micros = now().saturating_sub(start); return Rendered { width: w, height: h, pixels }; } @@ -455,6 +457,12 @@ impl Renderer { self.region(doc, region, scale, opts) } + /// [`Self::render_region_with`] with the pixels in words of four bytes, as + /// [`Self::render_words`] returns them. + pub fn render_region_with_words(&mut self, doc: &Document, region: Rect, scale: f64, opts: &RenderOptions) -> Rendered> { + self.region(doc, region, scale, opts) + } + fn region(&mut self, doc: &Document, region: Rect, scale: f64, opts: &RenderOptions) -> Rendered

{ let (w, h) = region_pixels(region, scale); let view = Affine::scale(scale) * Affine::translate((-region.x0, -region.y0)); @@ -485,6 +493,16 @@ impl Renderer { /// [`Self::render_node`] with `opts` (e.g. [`RenderOptions::mark_undecoded_images`]). pub fn render_node_with(&mut self, doc: &Document, n: &Arc, w: u16, h: u16, view: Affine, opts: &RenderOptions) -> Option { + self.node(doc, n, w, h, view, opts) + } + + /// [`Self::render_node`] with the pixels in words of four bytes, as [`Self::render_words`] + /// returns them. + pub fn render_node_words(&mut self, doc: &Document, n: &Arc, w: u16, h: u16, view: Affine) -> Option>> { + self.node(doc, n, w, h, view, &RenderOptions::default()) + } + + fn node(&mut self, doc: &Document, n: &Arc, w: u16, h: u16, view: Affine, opts: &RenderOptions) -> Option> { let _lent = vectorcraft_text::FontDb::global().lend_composite_fonts(&doc.composite_fonts); self.check_plugins(doc); self.check_symbols(doc); @@ -499,7 +517,7 @@ impl Renderer { /// averaged down, and [`RenderOptions::precise`] picks the quality render mode, as in a page /// render ([`Self::render_as`], [`Self::draw_frame`]). `cell` is as in [`Self::render_as`]. #[allow(clippy::too_many_arguments)] - fn node_pixels( + fn node_pixels( &mut self, doc: &Document, n: &Arc, @@ -509,7 +527,7 @@ impl Renderer { opts: &RenderOptions, forced: bool, cell: u32, - ) -> Vec { + ) -> P { if opts.supersample && opts.anti_alias == AntiAlias::Art && let Some(k) = supersample_factor(u32::from(w), u32::from(h)) @@ -518,9 +536,13 @@ impl Renderer { // `supersample_factor` keeps each side within MAX_CONTEXT_SIDE, so it fits in a u16. let (bw, bh) = (u32::from(w) * k, u32::from(h) * k); let hairline = std::mem::replace(&mut self.hairline, f64::from(k)); - let big = self.node_pixels(doc, n, (bw as u16, bh as u16), Affine::scale(f64::from(k)) * view, visible, &hard, forced, k); + let big: Vec = self.node_pixels(doc, n, (bw as u16, bh as u16), Affine::scale(f64::from(k)) * view, visible, &hard, forced, k); self.hairline = hairline; - return downsample(&big, bw as usize, bh as usize, k as usize); + let mut pixels = P::blank(usize::from(w) * usize::from(h)); + downsample(&big, bw as usize, k as usize, pixels.bytes_mut()); + #[cfg(test)] + group::FINISHED.with(|p| p.set(pixels.bytes_mut().as_ptr() as usize)); + return pixels; } let px = 1.0 / view.determinant().abs().sqrt().max(1e-12); let mut ctx = single_threaded_context(w, h); @@ -538,10 +560,10 @@ impl Renderer { } else { self.draw_arc(&mut ctx, &frame, n); } - let pm = self.finish(&mut ctx, self.raster); + let pixels = P::finish(self, &mut ctx); self.end_frame(); self.raster = raster; - group::into_bytes(pm) + pixels } /// Render any node (also one outside the tree, e.g. opacity-mask art) fitted into @@ -565,6 +587,42 @@ impl Renderer { background: Option<[u8; 4]>, opts: &RenderOptions, ) -> Option { + self.node_thumbnail(doc, n, size, background, opts) + } + + /// [`Self::render_node_thumbnail`] with the pixels in words of four bytes, as + /// [`Self::render_words`] returns them. + pub fn render_node_thumbnail_words(&mut self, doc: &Document, n: &Node, size: u32, background: Option<[u8; 4]>) -> Option>> { + self.node_thumbnail(doc, n, size, background, &RenderOptions::default()) + } + + /// [`Self::render_thumbnail`] with the pixels in words of four bytes, as + /// [`Self::render_words`] returns them. + pub fn render_thumbnail_words(&mut self, doc: &Document, id: NodeId, size: u32) -> Option>> { + self.node_thumbnail(doc, doc.node(id)?, size, None, &RenderOptions::default()) + } + + /// [`Self::render_node_thumbnail_with`] with the pixels in words of four bytes, as + /// [`Self::render_words`] returns them. + pub fn render_node_thumbnail_words_with( + &mut self, + doc: &Document, + n: &Node, + size: u32, + background: Option<[u8; 4]>, + opts: &RenderOptions, + ) -> Option>> { + self.node_thumbnail(doc, n, size, background, opts) + } + + fn node_thumbnail( + &mut self, + doc: &Document, + n: &Node, + size: u32, + background: Option<[u8; 4]>, + opts: &RenderOptions, + ) -> Option> { let _lent = vectorcraft_text::FontDb::global().lend_composite_fonts(&doc.composite_fonts); self.check_plugins(doc); self.check_symbols(doc); @@ -573,9 +631,9 @@ impl Renderer { // A 1-pixel margin on each side, unless the thumbnail is too small to keep one. let s = (w as f64 - 2.0).max(1.0) / b.width().max(b.height()).max(1e-6); let view = Affine::translate((w as f64 / 2.0, w as f64 / 2.0)) * Affine::scale(s) * Affine::translate(-b.center().to_vec2()); - let mut pixels = self.node_pixels(doc, &Arc::new(n.clone()), (w, w), view, b.inflate(1.0, 1.0), opts, true, 1); + let mut pixels: P = self.node_pixels(doc, &Arc::new(n.clone()), (w, w), view, b.inflate(1.0, 1.0), opts, true, 1); if let Some(bg) = background { - over_background(&mut pixels, bg); + over_background(pixels.bytes_mut(), bg); } Some(Rendered { width: w as u32, height: w as u32, pixels }) } @@ -605,6 +663,8 @@ pub(crate) trait FramePixels: Sized { fn finish(r: &mut Renderer, ctx: &mut RenderContext) -> Self; /// The pixels in `bytes` (four a pixel). fn from_bytes(bytes: Vec) -> Self; + /// `pixels` transparent pixels, to be written through [`Self::bytes_mut`]. + fn blank(pixels: usize) -> Self; /// The pixels as bytes, four a pixel. fn bytes_mut(&mut self) -> &mut [u8]; } @@ -618,6 +678,10 @@ impl FramePixels for Vec { bytes } + fn blank(pixels: usize) -> Self { + vec![0; pixels * 4] + } + fn bytes_mut(&mut self) -> &mut [u8] { self } @@ -646,6 +710,10 @@ impl FramePixels for Vec { bytes.as_chunks::<4>().0.iter().map(|p| u32::from_ne_bytes(*p)).collect() } + fn blank(pixels: usize) -> Self { + vec![0; pixels] + } + fn bytes_mut(&mut self) -> &mut [u8] { bytemuck::cast_slice_mut(self) } diff --git a/crates/render/src/tests/words.rs b/crates/render/src/tests/words.rs index 27b30d9961..70df3bf590 100644 --- a/crates/render/src/tests/words.rs +++ b/crates/render/src/tests/words.rs @@ -1,10 +1,12 @@ //! A frame rendered in words ([`Renderer::render_words`]): the bytes [`Renderer::render`] returns, -//! rendered straight into the words. +//! rendered straight into the words. Node renders, thumbnails, regions with options and pattern +//! swatches render in words the same way. use std::cell::Cell; use vectorcraft_color::{BlendMode as Blend, Color, Paint}; -use vectorcraft_doc::{Appearance, ColorMode, Node}; +use vectorcraft_doc::pattern::pattern_paint; +use vectorcraft_doc::{Appearance, ColorMode, Node, PatternDef}; use vectorcraft_geom::shapes; use crate::group::FINISHED; @@ -95,3 +97,91 @@ fn a_region_in_words_holds_the_bytes_of_the_region_in_bytes() { let words = Renderer::new().render_region_words(&plain, region, 1.3, false); assert_eq!(words.pixels.as_ptr() as usize, finished(), "a region's words are returned without a copy"); } + +/// The page of [`page`] with [`square`], [`blending_group`] and a square filled with the pattern +/// "Checks" (a red square in a 20 pt tile) on it. +fn patterned() -> Document { + page(ColorMode::Rgb, |d| { + let red = rect(d, Rect::new(0.0, 0.0, 10.0, 10.0), Color::rgb(1.0, 0.0, 0.0)); + let mut def = PatternDef::new("Checks", vec![Arc::new(red)]); + def.tile = Rect::new(0.0, 0.0, 20.0, 20.0); + d.patterns.push(def); + let filled = Appearance::basic(pattern_paint("Checks"), Paint::None, 0.0); + let filled = Node::path(d.alloc_id(), shapes::rectangle(Rect::new(30.0, 30.0, 90.0, 90.0)), filled); + vec![square(d), blending_group(d), filled] + }) +} + +fn same_bytes(words: &Rendered>, bytes: &Rendered, what: &str) { + assert_eq!((words.width, words.height), (bytes.width, bytes.height), "{what}: the size"); + assert!(bytemuck::cast_slice::(&words.pixels) == bytes.pixels.as_slice(), "{what}: the same bytes"); +} + +#[test] +fn nodes_thumbnails_and_swatches_in_words_hold_the_bytes_of_the_same_renders_in_bytes() { + let d = patterned(); + let nodes = d.layers[0].children().expect("a layer").to_vec(); + let view = Affine::scale(0.7) * Affine::translate((-4.0, -9.0)); + let supersampled = RenderOptions { supersample: true, precise: true, image_mips: true, ..Default::default() }; + for (i, n) in nodes.iter().enumerate() { + let bytes = Renderer::new().render_node(&d, n, 53, 41, view).expect("a node render"); + let words = Renderer::new().render_node_words(&d, n, 53, 41, view).expect("a node render"); + same_bytes(&words, &bytes, &format!("node {i}")); + for (what, background, opts) in [ + ("transparent", None, RenderOptions::default()), + ("on white", Some([255; 4]), RenderOptions::default()), + ("on a translucent color", Some([10, 200, 90, 128]), RenderOptions::default()), + ("supersampled", None, supersampled.clone()), + ("supersampled on white", Some([255; 4]), supersampled.clone()), + ] { + let bytes = Renderer::new().render_node_thumbnail_with(&d, n, 37, background, &opts).expect("a thumbnail"); + let words = Renderer::new().render_node_thumbnail_words_with(&d, n, 37, background, &opts).expect("a thumbnail"); + same_bytes(&words, &bytes, &format!("node {i}'s thumbnail, {what}")); + } + let bytes = Renderer::new().render_node_thumbnail(&d, n, 31, Some([255; 4])).expect("a thumbnail"); + let words = Renderer::new().render_node_thumbnail_words(&d, n, 31, Some([255; 4])).expect("a thumbnail"); + same_bytes(&words, &bytes, &format!("node {i}'s thumbnail on white, default options")); + let bytes = Renderer::new().render_thumbnail(&d, n.id, 29).expect("a thumbnail"); + let words = Renderer::new().render_thumbnail_words(&d, n.id, 29).expect("a thumbnail"); + same_bytes(&words, &bytes, &format!("node {i}'s thumbnail by id")); + } + let region = Rect::new(5.0, 15.0, 70.0, 90.0); + for (what, opts) in [("outline", RenderOptions { outline: true, ..Default::default() }), ("supersampled", supersampled)] { + let bytes = Renderer::new().render_region_with(&d, region, 1.3, &opts); + let words = Renderer::new().render_region_with_words(&d, region, 1.3, &opts); + same_bytes(&words, &bytes, &format!("the region, {what}")); + } + let bytes = render_pattern_swatch(&d, "Checks", 23).expect("a swatch"); + let words = render_pattern_swatch_words(&d, "Checks", 23).expect("a swatch"); + same_bytes(&words, &bytes, "the pattern swatch"); + assert!(render_pattern_swatch_words(&d, "Missing", 23).is_none(), "a pattern the document lacks has no swatch"); + assert!(Renderer::new().render_thumbnail_words(&d, NodeId(u64::MAX), 29).is_none(), "a node the document lacks has no thumbnail"); +} + +#[test] +fn nodes_thumbnails_and_swatches_in_words_are_returned_in_the_buffer_they_rendered_into() { + let d = patterned(); + let n = d.layers[0].children().expect("a layer")[1].clone(); + let mut r = Renderer::new(); + let out = r.render_node_words(&d, &n, 40, 40, Affine::IDENTITY).expect("a node render"); + assert_eq!(out.pixels.as_ptr() as usize, finished(), "a node's words are returned without a copy"); + let supersampled = RenderOptions { supersample: true, ..Default::default() }; + for background in [None, Some([255; 4])] { + for (what, opts) in [("", RenderOptions::default()), (" supersampled", supersampled.clone())] { + let out = r.render_node_thumbnail_words_with(&d, &n, 48, background, &opts).expect("a thumbnail"); + let at = out.pixels.as_ptr() as usize; + assert_eq!(at, finished(), "background {background:?}{what}: a thumbnail's words are returned without a copy"); + } + } + let out = r.render_node_thumbnail_words(&d, &n, 48, Some([255; 4])).expect("a thumbnail"); + assert_eq!(out.pixels.as_ptr() as usize, finished(), "a thumbnail on a color's words are returned without a copy"); + let out = r.render_words(&d, 64, 48, Affine::IDENTITY, &supersampled); + assert_eq!(out.pixels.as_ptr() as usize, finished(), "a supersampled frame's words are returned without a copy"); + let out = r.render_thumbnail_words(&d, n.id, 32).expect("a thumbnail"); + assert_eq!(out.pixels.as_ptr() as usize, finished(), "a thumbnail's words by id are returned without a copy"); + let plain = page(ColorMode::Rgb, |d| vec![square(d)]); + let out = r.render_region_with_words(&plain, Rect::new(5.0, 15.0, 70.0, 90.0), 1.3, &RenderOptions::default()); + assert_eq!(out.pixels.as_ptr() as usize, finished(), "a region's words with options are returned without a copy"); + let out = render_pattern_swatch_words(&d, "Checks", 20).expect("a swatch"); + assert_eq!(out.pixels.as_ptr() as usize, finished(), "a swatch's words are returned without a copy"); +} diff --git a/crates/ui-egui/Cargo.toml b/crates/ui-egui/Cargo.toml index 49fad8d56f..9dd168c0eb 100644 --- a/crates/ui-egui/Cargo.toml +++ b/crates/ui-egui/Cargo.toml @@ -64,7 +64,7 @@ vectorcraft-cad = { workspace = true } vectorcraft-eps = { workspace = true } vectorcraft-format = { workspace = true } egui = { workspace = true, features = ["bytemuck", "default_fonts", "monochrome_emoji_fonts"] } -# With egui's `bytemuck`: copies rendered rasters into egui images whole (`canvas::color_image`). +# With egui's `bytemuck`: hands rendered rasters to egui images in their own buffers (`canvas::color_image_owned`). # `default_fonts`: egui 0.37 makes its bundled faces opt-in, and a dependency's dev-features do not # reach our tests; `theme::install_fonts` starts from `FontDefinitions::default()`, which is empty # without them (production would lay out tofu, and the no-interface-fonts tests would bind nothing). diff --git a/crates/ui-egui/src/canvas.rs b/crates/ui-egui/src/canvas.rs index 73b97bce0f..752d3930b5 100644 --- a/crates/ui-egui/src/canvas.rs +++ b/crates/ui-egui/src/canvas.rs @@ -51,7 +51,9 @@ pub use fill::Fill; use home::home; pub use panes::{Layout as TileLayout, Panes}; pub(crate) use panes::{consolidate, pane, tile, tiled_area}; -pub(crate) use raster::{KeptFrame, color_image, color_image_owned, render_job}; +pub(crate) use raster::{KeptFrame, color_image_owned, render_job}; +#[cfg(test)] +pub(crate) use raster::{assert_handed_over, clear_handed_over}; pub(crate) use rulers::{general_lengths, stroke_lengths}; pub use selection::HoverObjectKey; pub(crate) use task_bar::{TASK_BAR_ACTIONS, TASK_BAR_CHIPS, has_colors, is_task_bar_action, read_hidden_task_bar_actions}; diff --git a/crates/ui-egui/src/canvas/raster.rs b/crates/ui-egui/src/canvas/raster.rs index c204df83f7..c1a17eddc8 100644 --- a/crates/ui-egui/src/canvas/raster.rs +++ b/crates/ui-egui/src/canvas/raster.rs @@ -18,25 +18,13 @@ use super::{BodyKind, in_gesture}; use crate::doc_windows::Win; use crate::{CacheKey, VectorcraftApp}; -/// The rendered raster `img` as an egui image. Both are premultiplied RGBA8, so its bytes are copied -/// over whole instead of pixel by pixel, which costs milliseconds for a canvas on a large screen. -/// A raster whose bytes don't match its size gives an empty image of that size. -pub(crate) fn color_image(img: &vectorcraft_render::Rendered) -> egui::ColorImage { - let size = [img.width as usize, img.height as usize]; - let expected = size[0].saturating_mul(size[1]).saturating_mul(4); - if expected == img.pixels.len() { - let pixels: Vec = bytemuck::cast_slice(&img.pixels).to_vec(); - egui::ColorImage::new(size, pixels) - } else { - egui::ColorImage::new(size, vec![egui::Color32::TRANSPARENT; size[0].saturating_mul(size[1])]) - } -} - /// The raster `img` rendered in words ([`vectorcraft_render::Renderer::render_words`]) as an egui /// image, in the buffer `img` holds: a word and a [`egui::Color32`] are both four bytes aligned to /// four, so the pixels are not copied. A raster whose pixels don't match its size gives an empty /// image of that size. pub(crate) fn color_image_owned(img: vectorcraft_render::Rendered>) -> egui::ColorImage { + #[cfg(test)] + HANDED_OVER.with(|p| p.set(img.pixels.as_ptr() as usize)); let size = [img.width as usize, img.height as usize]; if size[0].saturating_mul(size[1]) == img.pixels.len() { let pixels: Vec = bytemuck::allocation::try_cast_vec(img.pixels).unwrap_or_else(|(_, v)| bytemuck::cast_slice(&v).to_vec()); @@ -757,6 +745,24 @@ thread_local! { /// frame the test finished before it lands in the wait. A test that answers the job from /// another thread sets [`std::time::Duration::MAX`] to wait for that answer. pub(crate) static TEST_FIRST_FRAME_GRACE: std::cell::Cell = const { std::cell::Cell::new(std::time::Duration::ZERO) }; + /// The address of the words the last [`color_image_owned`] on this thread was given. + static HANDED_OVER: std::cell::Cell = const { std::cell::Cell::new(0) }; +} + +/// Clears what [`assert_handed_over`] checks, before the image it checks is made. +#[cfg(test)] +pub(crate) fn clear_handed_over() { + HANDED_OVER.with(|p| p.set(0)); +} + +/// Asserts that `image` was made by [`color_image_owned`] on this thread since +/// [`clear_handed_over`], in the words it was given: the pixels were handed over, not copied. +#[cfg(test)] +#[track_caller] +pub(crate) fn assert_handed_over(image: &egui::ColorImage, what: &str) { + let given = HANDED_OVER.with(std::cell::Cell::get); + assert!(given != 0, "{what}: the image is made from words handed over"); + assert_eq!(image.pixels.as_ptr() as usize, given, "{what}: the image holds the words it was given, not a copy"); } /// [`render_ms`] in unit tests: the time [`TEST_RENDER_MS`] holds. diff --git a/crates/ui-egui/src/canvas/tests.rs b/crates/ui-egui/src/canvas/tests.rs index 7be7f49dc2..3fedcc557d 100644 --- a/crates/ui-egui/src/canvas/tests.rs +++ b/crates/ui-egui/src/canvas/tests.rs @@ -6975,7 +6975,7 @@ fn the_worker_s_frame_reaches_its_texture_image_in_the_buffer_it_was_rendered_in let color = color_image_owned(frame); assert_eq!(color.pixels.as_ptr() as usize, at, "the frame's pixels are handed to the image, not copied"); let bytes = vectorcraft_render::Renderer::new().render(&doc, job.w, job.h, job.view, &job.opts); - assert!(color.pixels == color_image(&bytes).pixels, "the image holds the frame's pixels"); + assert!(bytemuck::cast_slice::(&color.pixels) == bytes.pixels.as_slice(), "the image holds the frame's pixels"); assert_eq!(color.size, [256, 128]); // A raster whose pixels don't match its size gives an empty image of that size. let short = vectorcraft_render::Rendered { width: 3, height: 2, pixels: vec![u32::MAX; 5] }; diff --git a/crates/ui-egui/src/dialogs/composite_fonts/sample.rs b/crates/ui-egui/src/dialogs/composite_fonts/sample.rs index 6b7f24ac6f..f9ad9e7d5f 100644 --- a/crates/ui-egui/src/dialogs/composite_fonts/sample.rs +++ b/crates/ui-egui/src/dialogs/composite_fonts/sample.rs @@ -349,22 +349,21 @@ fn image(f: &CompositeFont, zoom: u64, marks: &[Mark], ppp: f32, ink: Color32) - mark_line(&mut rendered, ((base - y) as f32 * ppp).round(), ppp.ceil().max(1.0) as usize, m.color()); } } - crate::canvas::color_image(&rendered) + crate::canvas::color_image_owned(rendered) } /// Draws a horizontal line `thickness` pixels thick from row `y` across `image`; a row outside it draws nothing. -fn mark_line(image: &mut vectorcraft_render::Rendered, y: f32, thickness: usize, color: Color32) { +fn mark_line(image: &mut vectorcraft_render::Rendered>, y: f32, thickness: usize, color: Color32) { if !y.is_finite() || y < 0.0 { return; } let (width, height) = (image.width as usize, image.height as usize); let first = y as usize; + let word = u32::from_ne_bytes(color.to_array()); for row in first..first.saturating_add(thickness).min(height) { - let start = row.saturating_mul(width).saturating_mul(4); - if let Some(line) = image.pixels.get_mut(start..start.saturating_add(width.saturating_mul(4))) { - for pixel in line.as_chunks_mut::<4>().0 { - pixel.copy_from_slice(&color.to_array()); - } + let start = row.saturating_mul(width); + if let Some(line) = image.pixels.get_mut(start..start.saturating_add(width)) { + line.fill(word); } } } @@ -372,7 +371,7 @@ fn mark_line(image: &mut vectorcraft_render::Rendered, y: f32, thickness: usize, /// The sample of `f` set at `size` points in `ink`, its baseline `baseline` points down from the /// top, drawn by the renderer as the canvas draws type (color and bitmap glyphs in their own /// colors) into `px` pixels at `ppp` pixels per point. -pub(super) fn draw(f: &CompositeFont, size: f64, baseline: f64, px: (u16, u16), ppp: f32, ink: Color32) -> vectorcraft_render::Rendered { +pub(super) fn draw(f: &CompositeFont, size: f64, baseline: f64, px: (u16, u16), ppp: f32, ink: Color32) -> vectorcraft_render::Rendered> { let (w, h) = px; let mut doc = vectorcraft_doc::Document::new(f64::from(w) / f64::from(ppp), f64::from(h) / f64::from(ppp)); let font = sample_font(f); @@ -384,8 +383,8 @@ pub(super) fn draw(f: &CompositeFont, size: f64, baseline: f64, px: (u16, u16), let t = TextObject::point(Point::new(INSET, baseline), &sample, style); let node = std::sync::Arc::new(vectorcraft_doc::Node::new(doc.alloc_id(), vectorcraft_doc::NodeKind::Text(Box::new(t)))); let view = Affine::scale(f64::from(ppp)); - let empty = || vectorcraft_render::Rendered { width: u32::from(w), height: u32::from(h), pixels: vec![0; usize::from(w) * usize::from(h) * 4] }; - RENDERER.with(|r| r.borrow_mut().render_node(&doc, &node, w, h, view)).unwrap_or_else(empty) + let empty = || vectorcraft_render::Rendered { width: u32::from(w), height: u32::from(h), pixels: vec![0; usize::from(w) * usize::from(h)] }; + RENDERER.with(|r| r.borrow_mut().render_node_words(&doc, &node, w, h, view)).unwrap_or_else(empty) } #[cfg(test)] @@ -477,4 +476,16 @@ mod zoom_tests { assert_eq!(fields(&panel)["zoom"], json!(400), "canceling an older popup must not undo the later automation edit"); assert_eq!(panel.value_role("Zoom", Role::COMBO_BOX).as_deref(), Some("400%")); } + + /// The sample's image holds the pixels the sample was rendered into, with its lines drawn in. + #[test] + fn the_sample_image_is_handed_over_with_its_lines_drawn_in() { + let f = CompositeFont::new("Sample draft", "Source Sans 3", "Regular"); + crate::canvas::clear_handed_over(); + let image = image(&f, 100, &[Mark::Baseline], 1.0, Color32::BLACK); + crate::canvas::assert_handed_over(&image, "the sample"); + let [w, _] = image.size; + let line = image.pixels.chunks(w).any(|row| row.iter().all(|p| *p == Mark::Baseline.color())); + assert!(line, "the baseline is drawn across the sample"); + } } diff --git a/crates/ui-egui/src/dialogs/composite_fonts/tests.rs b/crates/ui-egui/src/dialogs/composite_fonts/tests.rs index be02c8046c..44eebcdb49 100644 --- a/crates/ui-egui/src/dialogs/composite_fonts/tests.rs +++ b/crates/ui-egui/src/dialogs/composite_fonts/tests.rs @@ -585,6 +585,7 @@ fn the_sample_draws_color_glyphs_in_their_colors() { colr.size = 300.0; f.custom = vec![CustomCharSet { name: "Color".into(), characters: COLOUR_CHAR.to_string(), part: colr }]; let img = sample::draw(&f, 36.0, 120.0, (900, 160), 1.0, egui::Color32::BLACK); + let img = vectorcraft_render::Rendered { width: img.width, height: img.height, pixels: bytemuck::cast_slice::(&img.pixels).to_vec() }; let red = (0..img.height).flat_map(|y| (0..img.width).map(move |x| (x, y))).any(|(x, y)| { let p = img.pixel(x, y); p[0] > 200 && p[1] < 60 && p[2] < 60 && p[3] > 200 diff --git a/crates/ui-egui/src/dialogs/graph_design.rs b/crates/ui-egui/src/dialogs/graph_design.rs index 07c585bd50..c036f4fb7d 100644 --- a/crates/ui-egui/src/dialogs/graph_design.rs +++ b/crates/ui-egui/src/dialogs/graph_design.rs @@ -672,8 +672,8 @@ fn thumbnail(doc: &Document, art: &Node) -> egui::ColorImage { static RENDERER: RefCell = RefCell::new(vectorcraft_render::Renderer::new()); } RENDERER - .with(|r| r.borrow_mut().render_node_thumbnail(doc, art, PREVIEW_PX, Some([255, 255, 255, 255]))) - .map_or_else(blank, |img| crate::canvas::color_image(&img)) + .with(|r| r.borrow_mut().render_node_thumbnail_words(doc, art, PREVIEW_PX, Some([255, 255, 255, 255]))) + .map_or_else(blank, crate::canvas::color_image_owned) } /// The designs among `selection`'s rows. @@ -909,6 +909,18 @@ mod tests { app.run("select.set", json!({"ids": [g]})).unwrap(); } + /// A design's preview holds the pixels it was rendered into. + #[test] + fn a_designs_preview_is_handed_to_its_image_without_a_copy() { + let (app, _ctx) = app_with_design(); + let doc = &app.session.active().unwrap().doc; + let design = doc.graph_designs.first().expect("the new design"); + crate::canvas::clear_handed_over(); + let image = super::thumbnail(doc, &design.art); + assert_eq!(image.size, [super::PREVIEW_PX as usize; 2], "the preview's size"); + crate::canvas::assert_handed_over(&image, "the design's preview"); + } + /// The open dialog's fields, as automation lists them. fn fields(app: &VectorcraftApp) -> Value { app.dialogs().unwrap().with(|host| host.open_dialogs()).last().unwrap().fields.clone().unwrap() diff --git a/crates/ui-egui/src/panels/asset_export.rs b/crates/ui-egui/src/panels/asset_export.rs index af614e819f..1864fff211 100644 --- a/crates/ui-egui/src/panels/asset_export.rs +++ b/crates/ui-egui/src/panels/asset_export.rs @@ -143,17 +143,7 @@ pub(crate) fn paint_thumb(painter: &egui::Painter, revision: Revision, doc: &Doc let key = (nodes, px); let tex = CACHE.with(|c| c.borrow().get(&key).cloned()).or_else(|| { let art: Vec<&Node> = ids().iter().filter_map(|id| doc.node(*id)).collect(); - // Same Art Optimized supersample as assets.export (#983): abutting fills leave no seam in - // the tile (Layers row thumbs stay cheap without it). - let opts = vectorcraft_render::RenderOptions { image_mips: true, precise: true, supersample: true, ..Default::default() }; - let img = RENDERER.with(|rr| match art.as_slice() { - [one] => rr.borrow_mut().render_node_thumbnail_with(doc, one, px, None, &opts), - many => { - let group = Node::group(NodeId(0), many.iter().map(|n| Arc::new((*n).clone())).collect()); - rr.borrow_mut().render_node_thumbnail_with(doc, &group, px, None, &opts) - } - })?; - let color = crate::canvas::color_image(&img); + let color = RENDERER.with(|rr| thumb_image(&mut rr.borrow_mut(), doc, &art, px))?; let tex = painter.ctx().load_texture(format!("asset-thumb-{}", a.id), color, egui::TextureOptions::LINEAR); CACHE.with(|c| { let mut c = c.borrow_mut(); @@ -169,6 +159,22 @@ pub(crate) fn paint_thumb(painter: &egui::Painter, revision: Revision, doc: &Doc } } +/// The objects `art` of `doc` (back to front) fitted into `px` pixels square, transparent: the +/// image of an asset's tile. `None` when they have no bounds. +pub(super) fn thumb_image(r: &mut vectorcraft_render::Renderer, doc: &Document, art: &[&Node], px: u32) -> Option { + // Same Art Optimized supersample as assets.export (#983): abutting fills leave no seam in + // the tile (Layers row thumbs stay cheap without it). + let opts = vectorcraft_render::RenderOptions { image_mips: true, precise: true, supersample: true, ..Default::default() }; + let img = match art { + [one] => r.render_node_thumbnail_words_with(doc, one, px, None, &opts), + many => { + let group = Node::group(NodeId(0), many.iter().map(|n| Arc::new((*n).clone())).collect()); + r.render_node_thumbnail_words_with(doc, &group, px, None, &opts) + } + }?; + Some(crate::canvas::color_image_owned(img)) +} + /// The document's assets as the tile grid's items. struct Assets { ids: Vec, diff --git a/crates/ui-egui/src/panels/graphic_styles.rs b/crates/ui-egui/src/panels/graphic_styles.rs index d85933f8cf..64a45b963e 100644 --- a/crates/ui-egui/src/panels/graphic_styles.rs +++ b/crates/ui-egui/src/panels/graphic_styles.rs @@ -384,8 +384,8 @@ fn render_object(app: &VectorcraftApp, doc: &Document, n: &Node, g: &GraphicStyl } else { styled_node(n, g, app.session.prefs.override_char_color) }; - let img = RENDERER.with(|r| r.borrow_mut().render_node_thumbnail(doc, &styled, px, Some([255; 4])))?; - let mut img = crate::canvas::color_image(&img); + let img = RENDERER.with(|r| r.borrow_mut().render_node_thumbnail_words(doc, &styled, px, Some([255; 4])))?; + let mut img = crate::canvas::color_image_owned(img); if empty { slash(&mut img); } @@ -1321,13 +1321,17 @@ mod tests { // The large preview on the selected rectangle. let st = app.session.active().unwrap(); let n = st.doc.node(st.selection.objects[0]).unwrap(); + crate::canvas::clear_handed_over(); let img = render_object(&app, &st.doc, n, &empty, 60).unwrap(); + crate::canvas::assert_handed_over(&img, "the large preview with the slash"); assert!(red(px(&img, 30, 30))); assert!(dark(px(&img, 1, 30)), "{:?}", px(&img, 1, 30)); assert_eq!(px(&img, 10, 10), Color32::WHITE); // A style that paints keeps its own look there, without the slash. let blue = GraphicStyle::new("Blue", Appearance::basic(Paint::solid(Color::rgb(0.0, 0.0, 1.0)), Paint::None, 1.0)); + crate::canvas::clear_handed_over(); let img = render_object(&app, &st.doc, n, &blue, 60).unwrap(); + crate::canvas::assert_handed_over(&img, "the large preview"); assert_eq!(px(&img, 30, 30), Color32::from_rgb(0, 0, 255)); } diff --git a/crates/ui-egui/src/panels/layers/thumbs.rs b/crates/ui-egui/src/panels/layers/thumbs.rs index fe3bab7649..2900815237 100644 --- a/crates/ui-egui/src/panels/layers/thumbs.rs +++ b/crates/ui-egui/src/panels/layers/thumbs.rs @@ -128,7 +128,7 @@ pub(crate) fn render(node: Arc, doc: Arc, request: &ThumbRequest static RENDERER: std::cell::RefCell = std::cell::RefCell::new(vectorcraft_render::Renderer::new()); } return match RENDERER.with(|r| render_thumb(&mut r.borrow_mut(), &doc, &node, side)) { - Some(img) => ThumbRender::Ready(crate::canvas::color_image(&img)), + Some(img) => ThumbRender::Ready(crate::canvas::color_image_owned(img)), None => ThumbRender::Blank, }; } @@ -141,7 +141,7 @@ pub(crate) fn render(node: Arc, doc: Arc, request: &ThumbRequest if cancel.is_cancelled() { return Err(cancelled()); } - Ok(img.map_or(LoadedPicture::Blank, |img| LoadedPicture::Image(crate::canvas::color_image(&img)))) + Ok(img.map_or(LoadedPicture::Blank, |img| LoadedPicture::Image(crate::canvas::color_image_owned(img)))) })) } @@ -309,8 +309,8 @@ fn light_row(n: &Node, quick: Option, doc: &Document) -> bool { } /// The thumbnail of `n` (`px` pixels square) as `r` renders it, on the UI thread or a lane. -fn render_thumb(r: &mut vectorcraft_render::Renderer, doc: &Document, n: &Node, px: u32) -> Option { - r.render_node_thumbnail_with(doc, n, px, None, &thumb_options()) +fn render_thumb(r: &mut vectorcraft_render::Renderer, doc: &Document, n: &Node, px: u32) -> Option>> { + r.render_node_thumbnail_words_with(doc, n, px, None, &thumb_options()) } #[cfg(test)] @@ -598,7 +598,7 @@ mod tests { let ThumbRender::Later(job) = rendered(doc, n, &request) else { panic!("a heavy node is made on a lane") }; let Ok(LoadedPicture::Image(there)) = job(&Cancel::new()) else { panic!("the job draws the node") }; let here = render_thumb(&mut vectorcraft_render::Renderer::new(), doc, n, request.side).expect("this thread draws the node"); - let here = crate::canvas::color_image(&here); + let here = crate::canvas::color_image_owned(here); assert!(here.pixels.iter().any(|p| p.a() > 0), "the thumbnail shows the art"); assert_eq!((there.size, &there.pixels), (here.size, &here.pixels), "the same pixels"); } @@ -642,4 +642,18 @@ mod tests { assert!(matches!(before.render(&key, &request), ThumbRender::Ready(_))); assert!(matches!(after.render(&key, &request), ThumbRender::Later(_)), "and a long path is made on a lane"); } + + #[test] + fn a_rows_thumbnail_is_handed_to_its_image_without_a_copy() { + let request = ThumbRequest::for_cell(24.0, 1.0); + let (doc, n) = doc_with(|id| rect(id.0)); + crate::canvas::clear_handed_over(); + let ThumbRender::Ready(here) = rendered(&doc, &n, &request) else { panic!("a small object's thumbnail is made at once") }; + crate::canvas::assert_handed_over(&here, "a thumbnail made here"); + let (doc, n) = doc_with(|id| path(id.0, 50_000)); + let ThumbRender::Later(job) = rendered(&doc, &n, &request) else { panic!("a long path is made on a lane") }; + crate::canvas::clear_handed_over(); + let Ok(LoadedPicture::Image(there)) = job(&Cancel::new()) else { panic!("the job draws the node") }; + crate::canvas::assert_handed_over(&there, "a thumbnail made on a lane"); + } } diff --git a/crates/ui-egui/src/panels/navigator.rs b/crates/ui-egui/src/panels/navigator.rs index c1f6bcc537..9cf9345191 100644 --- a/crates/ui-egui/src/panels/navigator.rs +++ b/crates/ui-egui/src/panels/navigator.rs @@ -173,8 +173,8 @@ impl ThumbSource for NavThumbs { ThumbRender::Later(Box::new(move |_cancel| { let options = image_options(key); let renderer = if key.solid_dashes { &SOLID_RENDERER } else { &NAV_RENDERER }; - let image = renderer.with(|r| r.borrow_mut().render_region_with(&doc, region, scale, &options)); - Ok(LoadedPicture::Image(crate::canvas::color_image(&image))) + let image = renderer.with(|r| r.borrow_mut().render_region_with_words(&doc, region, scale, &options)); + Ok(LoadedPicture::Image(crate::canvas::color_image_owned(image))) })) } } @@ -293,6 +293,20 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) { mod tests { use super::*; + /// The navigator's picture, with and without solid dashes, holds the pixels it was rendered into. + #[test] + fn the_navigator_picture_is_handed_to_its_image_without_a_copy() { + let doc = Arc::new(vectorcraft_doc::Document::new(200.0, 100.0)); + let source = NavThumbs::new(&doc, 1, DRect::new(-10.0, -10.0, 210.0, 110.0)); + for solid_dashes in [false, true] { + let key = NavKey { uid: 1, artboard_only: false, solid_dashes }; + let ThumbRender::Later(job) = source.render(&key, &ThumbRequest::for_cell(60.0, 1.0)) else { panic!("the picture is made on a lane") }; + crate::canvas::clear_handed_over(); + let Ok(LoadedPicture::Image(image)) = job(&craft::host::queue::Cancel::new()) else { panic!("the job draws the document") }; + crate::canvas::assert_handed_over(&image, if solid_dashes { "with solid dashes" } else { "with dashes" }); + } + } + #[test] fn navigator_reports_a_malformed_zoom_entry() { assert_malformed_zoom_entry_reported(show); diff --git a/crates/ui-egui/src/panels/swatches.rs b/crates/ui-egui/src/panels/swatches.rs index bea36866bb..c821dd9614 100644 --- a/crates/ui-egui/src/panels/swatches.rs +++ b/crates/ui-egui/src/panels/swatches.rs @@ -649,10 +649,8 @@ fn pattern_thumb_in(doc: &Document, cx: &ContentPainterCx<'_>, r: Rect, paint: & px, ); let tex = CACHE.with(|c| c.borrow().get(&key).cloned()).unwrap_or_else(|| { - let tex = vectorcraft_render::render_pattern_swatch(doc, pattern, px).map(|img| { - let color = crate::canvas::color_image(&img); - ctx.load_texture(format!("pattern-swatch-{pattern}-{px}"), color, egui::TextureOptions::LINEAR) - }); + let tex = pattern_image(doc, pattern, px) + .map(|color| ctx.load_texture(format!("pattern-swatch-{pattern}-{px}"), color, egui::TextureOptions::LINEAR)); CACHE.with(|c| { let mut c = c.borrow_mut(); if c.len() > 256 { @@ -668,6 +666,11 @@ fn pattern_thumb_in(doc: &Document, cx: &ContentPainterCx<'_>, r: Rect, paint: & true } +/// The swatch image of pattern `name` in `doc`, `px` pixels square; `None` when `doc` has no such pattern. +fn pattern_image(doc: &Document, name: &str, px: u32) -> Option { + vectorcraft_render::render_pattern_swatch_words(doc, name, px).map(crate::canvas::color_image_owned) +} + /// The red of None's slash on a swatch tile and of a disabled opacity mask's cross, drawn on the document's white or /// black paper. It is the same in every theme. pub(super) const OFF_MARK: Color32 = Color32::from_rgb(0xe0, 0x20, 0x20); diff --git a/crates/ui-egui/src/panels/swatches/tests.rs b/crates/ui-egui/src/panels/swatches/tests.rs index 9f0d992276..a24a7fab2d 100644 --- a/crates/ui-egui/src/panels/swatches/tests.rs +++ b/crates/ui-egui/src/panels/swatches/tests.rs @@ -1715,3 +1715,18 @@ fn idle_frames_replay_the_swatch_rows() { assert!(panel.shows(red), "and they show the swatch again"); idle(&mut panel, "after an undo"); } + +/// A pattern swatch's image holds the pixels the swatch was rendered into; a pattern the document +/// lacks has no image. +#[test] +fn a_pattern_swatch_image_is_handed_over_without_a_copy() { + let mut app = app(); + let square = app.run("shape.rectangle", json!({"x": 0, "y": 0, "width": 10, "height": 10})).unwrap()["id"].as_u64().unwrap(); + app.run("object.pattern.make", json!({"ids": [square], "name": "Dots", "edit": false})).unwrap(); + let doc = doc(&app); + crate::canvas::clear_handed_over(); + let image = pattern_image(&doc, "Dots", 24).expect("the pattern draws"); + assert_eq!(image.size, [24, 24], "the swatch's size"); + crate::canvas::assert_handed_over(&image, "the pattern swatch"); + assert!(pattern_image(&doc, "Missing", 24).is_none(), "no image for a pattern the document lacks"); +} diff --git a/crates/ui-egui/src/panels/symbols.rs b/crates/ui-egui/src/panels/symbols.rs index f985e31c65..13eb90bc0d 100644 --- a/crates/ui-egui/src/panels/symbols.rs +++ b/crates/ui-egui/src/panels/symbols.rs @@ -100,7 +100,7 @@ impl ThumbSource for SymbolPictures<'_> { render_art(&mut renderer, self.doc, self.name, vectorcraft_geom::Rect::new(x0, y0, x1, y1), (*w, *h)) } }; - img.map_or(ThumbRender::Blank, |img| ThumbRender::Ready(crate::canvas::color_image(&img))) + img.map_or(ThumbRender::Blank, |img| ThumbRender::Ready(crate::canvas::color_image_owned(img))) } } @@ -198,7 +198,7 @@ pub(crate) mod counters { /// Symbol `name` of `doc` rendered `px` pixels wide: an instance at its natural size, alone on a /// copy of `doc` that keeps its resources (the symbols it nests, patterns, images, swatches, /// brushes, graphic styles) but none of its art. -fn render_thumb(r: &mut vectorcraft_render::Renderer, doc: &Document, name: &str, px: u32) -> Option { +fn render_thumb(r: &mut vectorcraft_render::Renderer, doc: &Document, name: &str, px: u32) -> Option>> { let (w, h) = symbol_size(doc, name); let mut d = doc.clone(); let layer = d.alloc_id(); @@ -206,7 +206,7 @@ fn render_thumb(r: &mut vectorcraft_render::Renderer, doc: &Document, name: &str let id = d.alloc_id(); let xf = vectorcraft_geom::Affine::scale_non_uniform(w / 20.0, h / 20.0); d.insert(Some(layer), 0, Node::new(id, NodeKind::SymbolInstance { symbol: name.into(), xf })).ok()?; - r.render_thumbnail(&d, id, px) + r.render_thumbnail_words(&d, id, px) } /// Symbol `name` of `doc` (an instance at its natural size, as [`render_thumb`] places it) drawn @@ -218,7 +218,7 @@ fn render_art( name: &str, art: vectorcraft_geom::Rect, (w, h): (u32, u32), -) -> Option { +) -> Option>> { let (aw, ah) = (art.width(), art.height()); if !(aw.is_finite() && ah.is_finite() && aw > 0.0 && ah > 0.0) { return None; @@ -232,7 +232,7 @@ fn render_art( let n = Arc::new(Node::new(id, NodeKind::SymbolInstance { symbol: name.into(), xf })); let view = vectorcraft_geom::Affine::scale_non_uniform(f64::from(w) / aw, f64::from(h) / ah) * vectorcraft_geom::Affine::translate((-art.x0, -art.y0)); - r.render_node(&d, &n, u16::try_from(w).ok()?, u16::try_from(h).ok()?, view) + r.render_node_words(&d, &n, u16::try_from(w).ok()?, u16::try_from(h).ok()?, view) } /// The active document's current symbol (`symbol.list`'s `current`), read without running a diff --git a/crates/ui-egui/src/panels/symbols/tests.rs b/crates/ui-egui/src/panels/symbols/tests.rs index 23bd444373..2ed6b8d628 100644 --- a/crates/ui-egui/src/panels/symbols/tests.rs +++ b/crates/ui-egui/src/panels/symbols/tests.rs @@ -13,8 +13,9 @@ fn symbols(app: &mut VectorcraftApp) -> Vec { } /// Pixels of `img` that something paints opaquely, and those of them that are red. -fn painted(img: &vectorcraft_render::Rendered) -> (usize, usize) { - let painted: Vec<&[u8; 4]> = img.pixels.as_chunks::<4>().0.iter().filter(|p| p[3] > 200).collect(); +fn painted(img: &vectorcraft_render::Rendered>) -> (usize, usize) { + let bytes: &[u8] = bytemuck::cast_slice(&img.pixels); + let painted: Vec<&[u8; 4]> = bytes.as_chunks::<4>().0.iter().filter(|p| p[3] > 200).collect(); let red = painted.iter().filter(|p| p[0] > 150 && p[1] < 80 && p[2] < 80).count(); (painted.len(), red) } @@ -1199,6 +1200,26 @@ fn an_imported_symbols_thumbnail_frames_its_whole_art() { assert!(orange(inset_x, inset_y) && orange(w - 1 - inset_x, h - 1 - inset_y), "{w} × {h}"); } +/// Both pictures of a symbol become images in the pixels they were rendered into. +#[test] +fn a_symbols_pictures_are_handed_to_their_images_without_a_copy() { + let mut s = Session::new(); + s.execute("file.new", &json!({"width": 200, "height": 200})).unwrap(); + s.execute("shape.rectangle", &json!({"x": 10, "y": 10, "width": 40, "height": 20})).unwrap(); + s.execute("symbol.new", &json!({"name": "Wide"})).unwrap(); + let doc = &*s.doc().unwrap().doc; + let art = vectorcraft_effects::graphic_bounds(doc, "Wide").expect("the art's bounds"); + let pictures = SymbolPictures { doc, name: "Wide" }; + for (what, key) in [ + ("the symbol", SymbolThumb::Symbol { key: 1 }), + ("its art", SymbolThumb::Art { key: 1, w: 40, h: 30, art: [art.x0, art.y0, art.x1, art.y1].map(f64::to_bits) }), + ] { + crate::canvas::clear_handed_over(); + let ThumbRender::Ready(image) = pictures.render(&key, &ThumbRequest::for_cell(40.0, 1.0)) else { panic!("{what} renders at once") }; + crate::canvas::assert_handed_over(&image, what); + } +} + /// A document with symbol "Leaf", whose instance stands where its rectangle was, and symbol /// "Dot", which no instance uses; "Dot" is current. fn leaf_and_dot() -> VectorcraftApp { diff --git a/crates/ui-egui/src/panels/tests_asset_export.rs b/crates/ui-egui/src/panels/tests_asset_export.rs index f0539d5df8..cf1ed1817a 100644 --- a/crates/ui-egui/src/panels/tests_asset_export.rs +++ b/crates/ui-egui/src/panels/tests_asset_export.rs @@ -11,7 +11,7 @@ use craft::ui::runtime::commands::CommandStates; use serde_json::{Value, json}; use vectorcraft_engine::Session; -use super::asset_export::{menu_rows, menu_states}; +use super::asset_export::{menu_rows, menu_states, thumb_image}; use crate::dialogs::ExportForScreensDialog; use crate::tests::panel_harness::Panel; use crate::{Services, VectorcraftApp}; @@ -1158,3 +1158,19 @@ fn tile_menu_collects_canvas_art_as_one_or_multiple_assets_and_disables_empty_se assert_eq!(picked(&p).len(), if single { 1 } else { 2 }); } } + +/// A tile's image is made in the words its objects were rendered into, for one object and for several. +#[test] +fn an_assets_tile_image_holds_the_rendered_words_without_a_copy() { + let (app, _, [a, b]) = app(false); + let doc = &app.session.active().unwrap().doc; + let node = |id: u64| doc.node(vectorcraft_doc::NodeId(id)).expect("the square"); + let mut r = vectorcraft_render::Renderer::new(); + for (what, art) in [("one object", vec![node(a)]), ("two objects", vec![node(a), node(b)])] { + crate::canvas::clear_handed_over(); + let image = thumb_image(&mut r, doc, &art, 40).expect("the squares draw"); + assert_eq!(image.size, [40, 40], "{what}: the tile's size"); + assert!(image.pixels.iter().any(|p| p.a() > 0), "{what}: the tile shows the art"); + crate::canvas::assert_handed_over(&image, what); + } +} diff --git a/crates/ui-egui/src/panels/transparency.rs b/crates/ui-egui/src/panels/transparency.rs index 565f56da75..e1265d6e16 100644 --- a/crates/ui-egui/src/panels/transparency.rs +++ b/crates/ui-egui/src/panels/transparency.rs @@ -122,8 +122,8 @@ fn thumb_image(doc: &Arc, obj: &Node, own_mask: bool, px: u32, bg: Opt } else { obj }; - let img = RENDERER.with(|r| r.borrow_mut().render_node_thumbnail_with(doc, n, px.max(8), bg, &super::layers::thumb_options()))?; - Some(crate::canvas::color_image(&img)) + let img = RENDERER.with(|r| r.borrow_mut().render_node_thumbnail_words_with(doc, n, px.max(8), bg, &super::layers::thumb_options()))?; + Some(crate::canvas::color_image_owned(img)) } impl ThumbSource for MaskThumbs<'_> { @@ -786,6 +786,25 @@ mod tests { assert!(Arc::ptr_eq(&undone, &held(&app, n.id)), "the node Undo put back"); } + /// The object and mask thumbnails, on a background or none, hold the pixels they were rendered into. + #[test] + fn object_and_mask_thumbnails_are_handed_to_their_images_without_a_copy() { + let mut app = new_app(); + let a = run_cmd(&mut app, "shape.rectangle", json!({"x": 0, "y": 0, "width": 50, "height": 50}))["id"].clone(); + let b = run_cmd(&mut app, "shape.ellipse", json!({"x": 10, "y": 10, "width": 20, "height": 20}))["id"].clone(); + run_cmd(&mut app, "select.set", json!({"ids": [a, b]})); + run_cmd(&mut app, "transparency.makeOpacityMask", json!({})); + let n = state(&mut app).1.expect("the masked object"); + let doc = app.session.active().unwrap().doc.clone(); + for own_mask in [false, true] { + for bg in [None, Some([255; 4])] { + crate::canvas::clear_handed_over(); + let image = thumb_image(&doc, &n, own_mask, 44, bg).expect("the thumbnail draws"); + crate::canvas::assert_handed_over(&image, &format!("mask {own_mask}, background {bg:?}")); + } + } + } + #[test] fn a_highlighted_blend_mode_applies_only_once_it_is_chosen() { use egui::{Key, Modifiers}; From 97af8b6968459009f66fc24adbaa30ee92c48daf Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 4 Dec 2026 14:55:03 -0800 Subject: [PATCH 08/62] Open: text, RTF and Word files open as a new document File > Open reads .txt, .rtf, .docx and .doc files. Each opens as a new untitled letter-size document named after the file, with its text set as area type 36 pt inside the artboard, read by the same readers File > Place uses. Save then asks for a name. - A .txt file asks for Text Import Options first (character set, platform and the clean-up options), starting from the options confirmed last; OK opens it and remembers them. Text files opened together are asked about one at a time. document.open takes the same options as `text`. - A file with no text, bad text options or a damaged file opens no document and reports the error. - The Open dialog lists the four extensions in "All readable files" and in Text, RTF and Word filters. Batch source files and openExtensions leave them out. - An importer plug-in that lists one of these extensions reads the file only when `importer` names it. Docs: docs/mcp.md (open_file), document.open's params text. --- crates/engine/src/cmd/fileio.rs | 8 +- crates/engine/src/cmd/fileio/commands.rs | 2 +- crates/engine/src/cmd/fileio/formats.rs | 59 +++++++----- crates/engine/src/cmd/fileio/importer.rs | 11 +-- crates/engine/src/cmd/fileio/load.rs | 10 ++- crates/engine/src/cmd/fileio/tests.rs | 10 +-- crates/engine/src/cmd/place.rs | 86 +++++++++++------- crates/engine/src/tests/textimport.rs | 83 ++++++++++++++++- crates/engine/tests/plugin_import.rs | 15 ++++ crates/mcp/src/tools/definitions.rs | 2 +- crates/ui-egui/src/dialogs/host.rs | 1 + crates/ui-egui/src/dialogs/text_import.rs | 104 +++++++++++++++++++++- crates/ui-egui/src/io/open.rs | 15 ++-- crates/ui-egui/src/state.rs | 5 ++ docs/mcp.md | 2 +- 15 files changed, 333 insertions(+), 80 deletions(-) diff --git a/crates/engine/src/cmd/fileio.rs b/crates/engine/src/cmd/fileio.rs index 1a24bf623b..e462933fd3 100644 --- a/crates/engine/src/cmd/fileio.rs +++ b/crates/engine/src/cmd/fileio.rs @@ -181,10 +181,10 @@ use export_names::{distinct_names_by, write_encoded}; pub(crate) use formats::is_own_title; use formats::{ARTBOARD, ARTBOARDS, RANGE, USE_ARTBOARDS, import_name, writable}; pub use formats::{ - DOC_EXTS, DOCX_EXTS, FORMATS, Format, FormatOption, OPEN_EXTS, PLACE_EXTS, RTF_EXTS, TEXT_EXTS, UNASSOCIATED_EXTS, builtin_open_filters, - export_extensions, extension, file_stem, format, format_for_name, has_own_title, importer_formats, library_open_filters, open_extensions, - open_filters, opens_as_other, opens_with_importer, place_dialog_filters, place_filters, places_with_importer, plugin_formats, read_extensions, - readable_format, readable_format_for_name, titled_for_export, writable_format, + DOC_EXTS, DOCX_EXTS, FORMATS, Format, FormatOption, OPEN_EXTS, PLACE_EXTS, RTF_EXTS, TEXT_DOCUMENT_EXTS, TEXT_EXTS, UNASSOCIATED_EXTS, + builtin_open_filters, export_extensions, extension, file_stem, format, format_for_name, has_own_title, importer_formats, library_open_filters, + open_extensions, open_filters, opens_as_other, opens_with_importer, place_dialog_filters, place_filters, places_with_importer, plugin_formats, + read_extensions, readable_format, readable_format_for_name, titled_for_export, writable_format, }; #[cfg(test)] diff --git a/crates/engine/src/cmd/fileio/commands.rs b/crates/engine/src/cmd/fileio/commands.rs index 94565b3ce8..e808dbf532 100644 --- a/crates/engine/src/cmd/fileio/commands.rs +++ b/crates/engine/src/cmd/fileio/commands.rs @@ -9,7 +9,7 @@ pub fn specs() -> Vec { "Open Document", [], None, - "{path | name | dataBase64 (a file's path, or its name with its bytes), pages?: \"2-3, 5\" (PDF/.ai: 1-based, default all; one artboard each) | page?: n, cropTo?: bounding|art|crop (default)|trim|bleed|media (the box each artboard gets; bounding: the art's bounds; trim: the bleed box round it becomes the document's bleed, and the artboards are 36 pt apart plus that bleed on both sides; a PDF-compatible file whose first PDF page's PieceInfo holds, in itself or nested up to four dictionaries deep counting PieceInfo, a key starting with AIPrivateData or AIPDFPrivateData, when its pages are imported as editable art rather than its editing copy restored, opens on its trim boxes with cropTo and crop omitted and on its crop boxes with cropTo: crop, or crop: crop and no cropTo), password? (encrypted PDFs; see document.pdfInfo), textAs?: text (default: point type per line, lines wrapped in a frame as area type where they lay out the same, in the file's fonts by name; missing ones are listed in warnings) | outlines (glyph paths), layers?: true (default: optional content groups become layers with their visibility, print state and lock — art that is off comes in as a hidden layer; other art goes to a layer per page; a PSD file's layers become layers holding their pixels, with their names, visibility, opacity and blend modes, groups as layers of sublayers, layer masks as opacity masks, clipped layers and layers in blend modes VectorCraft doesn't have merged with the layers below) | false (one layer per page, without the art that is off; Save then asks for a name; a PSD file opens as its merged image), hiddenLayers?: false (a PSD file's hidden layers come in hidden instead of being left out), importSlices?: true (a PSD file's slices become user slices over its canvas, with its layers or its merged image; slices the file generated automatically are left out, and slices that can't be read are left out with a warning), editingData?: true (default: an EPS, .ai or PDF that carries its editor's own copy of the art opens from it, with its layers, hidden objects, guides, artboards and the art outside them; a .ai or PDF whose type shows opens from its PDF part with textAs: outlines) | \"always\" (as true, and a .ai's editing copy is used even where it draws differently from its PDF part, which can be older; the warnings say so) | false (only what its page or PDF part prints, for print pipelines; a .ai saved without PDF compatibility then can't be opened), legacyNameEncoding?: windows-1252 (default) | macintosh | windows-949 (also euc-kr) | shift_jis | gbk | big5 (the code page names in the editing data of a .ai or an EPS are read in when they aren't UTF-8: layers, objects, artboards, colors, gradients, patterns, graphic styles, swatches, brushes, symbols, variables and data sets, and data sets' text values; warnings list the first three such names as read, and count the rest), colorMode?: rgb|cmyk (the mode the document opens in, its colours converted as file.documentColorMode does, through the profiles the document keeps after the color management policies of edit.colorSettings, grays? as there; default: the file's — a PDF keeps CMYK, Gray and spot inks (spot swatches at a tint) and opens in CMYK when painted mostly in CMYK), grays?: as file.documentColorMode, dxf?: {layout?: \"Model\" (default) | a paper layout's name (document.dxfInfo lists them), unit?, scale? (the ratio: 1 unit of the art = scale drawing units; default: the drawing at 1:1 in its own unit), fit?: false (scale to fit an artboard of fitTo?: [612, 792], turned to the art's orientation), scaleLineweights?: false (lineweights scale with the art), center?: true (false: the drawing's origin on the artboard's bottom-left corner; fitted art's bottom-left corner), mergeLayers?: false (all art on one layer)} (DXF), crop?: as cropTo (its older name), linkPages?: false (true: each page `pages` picks of a PDF or PDF-compatible .ai opens as a placed document linked to that page of the file, as file.place with link places one, on an artboard of its cropTo box (bounding: its art's bounds; a blank page: its crop box; a file with that PieceInfo key: its trim box when no box is named, its crop box with cropTo: crop or crop: crop; on its trim box a page shows its bleed box round the artboard and gives the document its bleed), in a row 36 pt apart (on trim boxes, plus the bleed on both sides), and a layer named after the page; links.embed makes a page editable art; refused for any other file, without a path, with a password or with textAs: outlines; Save then asks for a name), profileChoice?: \"useEmbedded\"|\"convert\"|\"discard\" (the profile of the document's color mode is not the working space: keep it, convert that model's colors into the working space and take it off, or take it off and keep the numbers) | \"leave\"|\"assignWorking\"|\"assign\" (the document has no profile of its color mode: leave it untagged, tag it with the working space, or with assignProfile?: a profile of that model) (default: what the model's policy of edit.colorSettings does; a choice for the other case, or for a document tagged with the working space, is not used; the reply's profileChoice gives {issue: mismatch|missing, model, choice} when one was given for the document's question: it names the choice, not what it did, so \"convert\" from a profile that is not available keeps the profile and a warning says the colors were not converted; the desktop app asks for it when edit.colorSettings' askMismatchOpen or askMissingOpen is on, document.open never asks), importer?: \"plugin.\" (an importer plug-in's format id, see document.formats: it opens the file, which must have an extension it lists, also one a built-in format reads), params?: {…} (the importer's own parameters, see plugin.info)} → {index, title, format, warnings, restored, profileChoice?, missingLinks, modifiedLinks, updatedLinks: [{name, path, ids}]}; the color management policies of edit.colorSettings keep, take off or convert from the profiles the file is tagged with, their notes go to warnings, and a document they changed opens with unsaved changes; any readable format (see document.formats): .vectorcraft/.drawcraft, .svg/.svgz, .pdf/.ai, .ait, ASCII .dxf (each DXF layer with art a layer; blocks symbols; what can't come in is listed in warnings), PNG/JPEG/GIF/WebP/TIFF/BMP (an image opens as a document of its size at the resolution it declares, as file.place sizes it; 72 ppi, 1 px = 1 pt, when it declares none), .emf/.wmf (one artboard, the picture's frame; records VectorCraft doesn't read are skipped with one warning; a picture cut short by a reader limit, images and pattern brushes that can't be read, clips that can't be applied and raster operations other than a plain copy each add a warning), PICT .pct/.pic/.pict (QuickDraw versions 1 and 2, with or without the file's 512-byte header: one artboard, the picture's frame; shapes, lines and regions as paths, text as point type, bitmaps, pixel maps and QuickTime JPEG images as images; what isn't read is listed in warnings), HP-GL plot files .plt/.hpgl/.hgl/.hpg (one artboard round the art; what isn't drawn is listed in warnings), .eps and PostScript .ai (one artboard, the bounding box: an EPS file VectorCraft wrote restores the document it carries, restored: true; other files are read by a PostScript interpreter — paths, colours and spot inks, clips, gradients, images, type in the fonts named — and come in as their TIFF preview, with a warning, when their PostScript can't be read). A PDF/.ai/.ait or SVG saved with Preserve Editing restores the native document it carries (restored: true; a PDF only when no pages are picked), unless the file was changed elsewhere since or the data can't be read: then its artwork is imported and the first warning says why. Templates (native templates, .ait) open as a new untitled document; a restored .ai keeps its path (Save writes .ai again) and opens on the artboard its editing copy names as active. A file that no built-in format reads, by its content or its extension, opens with the installed importer plug-in that lists its extension (the one whose id sorts first, when several do): it is given the file, at most 128 MiB, and its objects become a new document whose artboard is their bounds; Save then asks for a name, and the warnings are the importer's. Linked images are read from their files (looked for at their path, then relative to the document): missing ones show their saved preview (links.relink), modified ones are read again only with Preferences › Update Links: Automatically (else links.update). An SVG's files (relative links from the SVG's folder) stay linked, SVG files become art, missing ones a placeholder in their box (a warning and missingLinks). An SVG's variable data (SVG Options › Include Variable Data, a variableSets element) gives the document its text variables and data sets, each text variable bound to the type object its docRef names, unless the SVG restores the native document; variable data variable.loadLibrary would refuse is left out with a warning", + "{path | name | dataBase64 (a file's path, or its name with its bytes), pages?: \"2-3, 5\" (PDF/.ai: 1-based, default all; one artboard each) | page?: n, cropTo?: bounding|art|crop (default)|trim|bleed|media (the box each artboard gets; bounding: the art's bounds; trim: the bleed box round it becomes the document's bleed, and the artboards are 36 pt apart plus that bleed on both sides; a PDF-compatible file whose first PDF page's PieceInfo holds, in itself or nested up to four dictionaries deep counting PieceInfo, a key starting with AIPrivateData or AIPDFPrivateData, when its pages are imported as editable art rather than its editing copy restored, opens on its trim boxes with cropTo and crop omitted and on its crop boxes with cropTo: crop, or crop: crop and no cropTo), password? (encrypted PDFs; see document.pdfInfo), textAs?: text (default: point type per line, lines wrapped in a frame as area type where they lay out the same, in the file's fonts by name; missing ones are listed in warnings) | outlines (glyph paths), layers?: true (default: optional content groups become layers with their visibility, print state and lock — art that is off comes in as a hidden layer; other art goes to a layer per page; a PSD file's layers become layers holding their pixels, with their names, visibility, opacity and blend modes, groups as layers of sublayers, layer masks as opacity masks, clipped layers and layers in blend modes VectorCraft doesn't have merged with the layers below) | false (one layer per page, without the art that is off; Save then asks for a name; a PSD file opens as its merged image), hiddenLayers?: false (a PSD file's hidden layers come in hidden instead of being left out), importSlices?: true (a PSD file's slices become user slices over its canvas, with its layers or its merged image; slices the file generated automatically are left out, and slices that can't be read are left out with a warning), editingData?: true (default: an EPS, .ai or PDF that carries its editor's own copy of the art opens from it, with its layers, hidden objects, guides, artboards and the art outside them; a .ai or PDF whose type shows opens from its PDF part with textAs: outlines) | \"always\" (as true, and a .ai's editing copy is used even where it draws differently from its PDF part, which can be older; the warnings say so) | false (only what its page or PDF part prints, for print pipelines; a .ai saved without PDF compatibility then can't be opened), legacyNameEncoding?: windows-1252 (default) | macintosh | windows-949 (also euc-kr) | shift_jis | gbk | big5 (the code page names in the editing data of a .ai or an EPS are read in when they aren't UTF-8: layers, objects, artboards, colors, gradients, patterns, graphic styles, swatches, brushes, symbols, variables and data sets, and data sets' text values; warnings list the first three such names as read, and count the rest), colorMode?: rgb|cmyk (the mode the document opens in, its colours converted as file.documentColorMode does, through the profiles the document keeps after the color management policies of edit.colorSettings, grays? as there; default: the file's — a PDF keeps CMYK, Gray and spot inks (spot swatches at a tint) and opens in CMYK when painted mostly in CMYK), grays?: as file.documentColorMode, dxf?: {layout?: \"Model\" (default) | a paper layout's name (document.dxfInfo lists them), unit?, scale? (the ratio: 1 unit of the art = scale drawing units; default: the drawing at 1:1 in its own unit), fit?: false (scale to fit an artboard of fitTo?: [612, 792], turned to the art's orientation), scaleLineweights?: false (lineweights scale with the art), center?: true (false: the drawing's origin on the artboard's bottom-left corner; fitted art's bottom-left corner), mergeLayers?: false (all art on one layer)} (DXF), crop?: as cropTo (its older name), linkPages?: false (true: each page `pages` picks of a PDF or PDF-compatible .ai opens as a placed document linked to that page of the file, as file.place with link places one, on an artboard of its cropTo box (bounding: its art's bounds; a blank page: its crop box; a file with that PieceInfo key: its trim box when no box is named, its crop box with cropTo: crop or crop: crop; on its trim box a page shows its bleed box round the artboard and gives the document its bleed), in a row 36 pt apart (on trim boxes, plus the bleed on both sides), and a layer named after the page; links.embed makes a page editable art; refused for any other file, without a path, with a password or with textAs: outlines; Save then asks for a name), profileChoice?: \"useEmbedded\"|\"convert\"|\"discard\" (the profile of the document's color mode is not the working space: keep it, convert that model's colors into the working space and take it off, or take it off and keep the numbers) | \"leave\"|\"assignWorking\"|\"assign\" (the document has no profile of its color mode: leave it untagged, tag it with the working space, or with assignProfile?: a profile of that model) (default: what the model's policy of edit.colorSettings does; a choice for the other case, or for a document tagged with the working space, is not used; the reply's profileChoice gives {issue: mismatch|missing, model, choice} when one was given for the document's question: it names the choice, not what it did, so \"convert\" from a profile that is not available keeps the profile and a warning says the colors were not converted; the desktop app asks for it when edit.colorSettings' askMismatchOpen or askMissingOpen is on, document.open never asks), text?: {…the text options of file.place} (a .txt file), importer?: \"plugin.\" (an importer plug-in's format id, see document.formats: it opens the file, which must have an extension it lists, also one a built-in format reads), params?: {…} (the importer's own parameters, see plugin.info)} → {index, title, format, warnings, restored, profileChoice?, missingLinks, modifiedLinks, updatedLinks: [{name, path, ids}]}; the color management policies of edit.colorSettings keep, take off or convert from the profiles the file is tagged with, their notes go to warnings, and a document they changed opens with unsaved changes; any readable format (see document.formats): .vectorcraft/.drawcraft, .svg/.svgz, .pdf/.ai, .ait, ASCII .dxf (each DXF layer with art a layer; blocks symbols; what can't come in is listed in warnings), PNG/JPEG/GIF/WebP/TIFF/BMP (an image opens as a document of its size at the resolution it declares, as file.place sizes it; 72 ppi, 1 px = 1 pt, when it declares none), .emf/.wmf (one artboard, the picture's frame; records VectorCraft doesn't read are skipped with one warning; a picture cut short by a reader limit, images and pattern brushes that can't be read, clips that can't be applied and raster operations other than a plain copy each add a warning), PICT .pct/.pic/.pict (QuickDraw versions 1 and 2, with or without the file's 512-byte header: one artboard, the picture's frame; shapes, lines and regions as paths, text as point type, bitmaps, pixel maps and QuickTime JPEG images as images; what isn't read is listed in warnings), HP-GL plot files .plt/.hpgl/.hgl/.hpg (one artboard round the art; what isn't drawn is listed in warnings), .eps and PostScript .ai (one artboard, the bounding box: an EPS file VectorCraft wrote restores the document it carries, restored: true; other files are read by a PostScript interpreter — paths, colours and spot inks, clips, gradients, images, type in the fonts named — and come in as their TIFF preview, with a warning, when their PostScript can't be read). A PDF/.ai/.ait or SVG saved with Preserve Editing restores the native document it carries (restored: true; a PDF only when no pages are picked), unless the file was changed elsewhere since or the data can't be read: then its artwork is imported and the first warning says why. Templates (native templates, .ait) open as a new untitled document; a text, RTF or Word file (.txt, .rtf, .docx, .doc) opens as a new letter-size document named after the file whose text is area type 36 pt inside the artboard, read as file.place reads it (a .txt file with text's options; one without text is refused), and Save then asks for a name; a restored .ai keeps its path (Save writes .ai again) and opens on the artboard its editing copy names as active. A file that no built-in format reads, by its content or its extension, opens with the installed importer plug-in that lists its extension (the one whose id sorts first, when several do): it is given the file, at most 128 MiB, and its objects become a new document whose artboard is their bounds; Save then asks for a name, and the warnings are the importer's. Linked images are read from their files (looked for at their path, then relative to the document): missing ones show their saved preview (links.relink), modified ones are read again only with Preferences › Update Links: Automatically (else links.update). An SVG's files (relative links from the SVG's folder) stay linked, SVG files become art, missing ones a placeholder in their box (a warning and missingLinks). An SVG's variable data (SVG Options › Include Variable Data, a variableSets element) gives the document its text variables and data sets, each text variable bound to the type object its docRef names, unless the SVG restores the native document; variable data variable.loadLibrary would refuse is left out with a warning", always, load::open ), diff --git a/crates/engine/src/cmd/fileio/formats.rs b/crates/engine/src/cmd/fileio/formats.rs index f8da5b941c..269a76f917 100644 --- a/crates/engine/src/cmd/fileio/formats.rs +++ b/crates/engine/src/cmd/fileio/formats.rs @@ -665,9 +665,18 @@ pub const DOCX_EXTS: &[&str] = &["docx"]; /// Word 97-2003 documents: File → Place sets them as area type with their formatting. pub const DOC_EXTS: &[&str] = &["doc"]; -/// The Place dialog's Word filter: Word documents and Word 97-2003 documents. +/// The Open and Place dialogs' Word filter: Word documents and Word 97-2003 documents. const WORD_EXTS: &[&str] = &["docx", "doc"]; +/// Text, RTF and Word files: File › Open makes a new document of their text, set as File › Place +/// sets it ([`TEXT_EXTS`], [`RTF_EXTS`], [`DOCX_EXTS`] and [`DOC_EXTS`]). +pub const TEXT_DOCUMENT_EXTS: &[&str] = &["txt", "rtf", "docx", "doc"]; + +/// The Open and Place dialogs' filters of text, RTF and Word files, after the document formats. +fn text_document_filters() -> impl Iterator { + [("Text", TEXT_EXTS), ("RTF", RTF_EXTS), ("Word", WORD_EXTS)].into_iter() +} + /// Every extension File → Place reads: [`OPEN_EXTS`], [`TEXT_EXTS`], [`RTF_EXTS`], /// [`DOCX_EXTS`] and [`DOC_EXTS`]. pub const PLACE_EXTS: &[&str] = &[ @@ -812,15 +821,20 @@ pub fn opens_as_other(ext: &str) -> bool { /// File › Open's extensions and filters for the installed importer plug-ins. type ImporterPart = (&'static [&'static str], Vec<(&'static str, &'static [&'static str])>); -/// File › Open's part for the installed importer plug-ins: the extensions of "All readable files" -/// ([`OPEN_EXTS`], then the importers' extensions in plug-in id order) and one filter per importer +/// File › Open's part for the installed importer plug-ins ([`importer_open_part`]): the +/// extensions [`open_extensions`] gives, those of "All readable files", and the importers' filters. +type ImporterOpenPart = (&'static [&'static str], &'static [&'static str], Vec<(&'static str, &'static [&'static str])>); + +/// File › Open's part for the installed importer plug-ins: the extensions of the documents it reads +/// ([`OPEN_EXTS`], then the importers' extensions in plug-in id order), those of "All readable +/// files" (the same, with [`TEXT_DOCUMENT_EXTS`] after [`OPEN_EXTS`]), and one filter per importer /// that has extensions left, under its name. An importer's extensions leave out those a built-in -/// format reads, which File › Open reads with that format, and those File › Open opens as something -/// else ([`opens_as_other`]). Made once for each set of installed plug-ins, so it lives as long as -/// the dialogs that hold it. -fn importer_open_part() -> ImporterPart { +/// format reads, which File › Open reads with that format, those of text, RTF and Word files, which +/// File › Open reads as text, and those File › Open opens as something else ([`opens_as_other`]). +/// Made once for each set of installed plug-ins, so it lives as long as the dialogs that hold it. +fn importer_open_part() -> ImporterOpenPart { use vectorcraft_plugins::registry; - static MADE: std::sync::Mutex> = std::sync::Mutex::new(None); + static MADE: std::sync::Mutex> = std::sync::Mutex::new(None); let mut made = MADE.lock().unwrap_or_else(|e| e.into_inner()); let revision = registry::revision(); if let Some((r, part)) = made.as_ref() @@ -831,7 +845,8 @@ fn importer_open_part() -> ImporterPart { let mut exts: Vec<&'static str> = OPEN_EXTS.to_vec(); let mut filters = Vec::new(); for f in importer_formats() { - let own: Vec<&'static str> = f.extensions.iter().copied().filter(|e| readable_format(e).is_none() && !opens_as_other(e)).collect(); + let own: Vec<&'static str> = + f.extensions.iter().copied().filter(|e| readable_format(e).is_none() && !TEXT_DOCUMENT_EXTS.contains(e) && !opens_as_other(e)).collect(); if own.is_empty() { continue; } @@ -843,27 +858,31 @@ fn importer_open_part() -> ImporterPart { let own: &'static [&'static str] = if own.len() == f.extensions.len() { f.extensions } else { Box::leak(own.into_boxed_slice()) }; filters.push((f.label, own)); } + let all: Vec<&'static str> = OPEN_EXTS.iter().chain(TEXT_DOCUMENT_EXTS).chain(&exts[OPEN_EXTS.len()..]).copied().collect(); let exts: &'static [&'static str] = if exts.len() == OPEN_EXTS.len() { OPEN_EXTS } else { Box::leak(exts.into_boxed_slice()) }; - let part = (exts, filters); + let part = (exts, &*Box::leak(all.into_boxed_slice()), filters); *made = Some((revision, part.clone())); part } /// Every extension File › Open reads as a document: [`OPEN_EXTS`], then the extensions the /// installed importer plug-ins list that no built-in format reads and that File › Open doesn't open -/// as something else ([`opens_as_other`]), in plug-in id order. +/// as something else ([`opens_as_other`]), in plug-in id order. Text, RTF and Word files +/// ([`TEXT_DOCUMENT_EXTS`]), which File › Open makes a document of, are not among them. pub fn open_extensions() -> &'static [&'static str] { importer_open_part().0 } -/// File › Open's filters: "All readable files" first, then one per readable format, then one per -/// importer plug-in (under its name, with the extensions [`open_extensions`] takes from it), then -/// swatch and graphic style libraries (which open in their library panels), Libraries panel -/// libraries, flattener, PDF, print, perspective grid and export presets and composite fonts -/// (imported), shortcut sets, scripts (checked without running them) and plug-ins (installed). +/// File › Open's filters: "All readable files" first ([`open_extensions`] with +/// [`TEXT_DOCUMENT_EXTS`]), then one per readable format, then text, RTF and Word (`.docx` and +/// `.doc`), then one per importer plug-in (under its name, with the extensions [`open_extensions`] +/// takes from it), then swatch and graphic style libraries (which open in their library panels), +/// Libraries panel libraries, flattener, PDF, print, perspective grid and export presets and +/// composite fonts (imported), shortcut sets, scripts (checked without running them) and plug-ins +/// (installed). pub fn open_filters() -> impl Iterator { - let (all, importers) = importer_open_part(); - std::iter::once(("All readable files", all)).chain(format_filters()).chain(importers).chain(other_open_filters()) + let (_, all, importers) = importer_open_part(); + std::iter::once(("All readable files", all)).chain(format_filters()).chain(text_document_filters()).chain(importers).chain(other_open_filters()) } /// [`open_filters`] without the importer plug-ins: "All readable files" lists [`OPEN_EXTS`]. For @@ -908,9 +927,7 @@ pub fn library_open_filters( pub fn place_filters() -> impl Iterator { std::iter::once(("All placeable files", PLACE_EXTS)) .chain(format_filters().filter(|(_, exts)| exts.iter().all(|ext| PLACE_EXTS.contains(ext)))) - .chain(std::iter::once(("Text", TEXT_EXTS))) - .chain(std::iter::once(("RTF", RTF_EXTS))) - .chain(std::iter::once(("Word", WORD_EXTS))) + .chain(text_document_filters()) } /// File › Place's part for the installed importer plug-ins whose manifests set `place`: the diff --git a/crates/engine/src/cmd/fileio/importer.rs b/crates/engine/src/cmd/fileio/importer.rs index c578dece5d..92cf3e82f5 100644 --- a/crates/engine/src/cmd/fileio/importer.rs +++ b/crates/engine/src/cmd/fileio/importer.rs @@ -54,14 +54,15 @@ fn check_extension(cmd: &str, m: &Manifest, name: &str) -> Result<()> { /// The importer that opens the file `name` holding `bytes` with `document.open`'s params `p`: the /// one `importer` names, which must list the file's extension; else, when no built-in format reads -/// the file, the first installed importer that lists its extension; else `None`. +/// the file and it is no text, RTF or Word file by its extension, the first installed importer +/// that lists its extension; else `None`. pub(super) fn pick(name: &str, bytes: &[u8], p: &Value) -> Result>> { if let Some(id) = named(p, C)? { let plugin = import::named(id).map_err(|e| bad(C, e.to_string()))?; check_extension(C, plugin.manifest(), name)?; return Ok(Some(plugin)); } - if detect(name, bytes).is_some() { + if detect(name, bytes).is_some() || super::TEXT_DOCUMENT_EXTS.contains(&extension(name).as_str()) { return Ok(None); } Ok(import::for_extension(&extension(name)).into_iter().next()) @@ -91,12 +92,12 @@ pub(crate) fn for_place(name: &str) -> Option> { } /// Whether an importer may read a file of extension `ext` for `mode` when none is named: no -/// built-in format reads the extension (for Place, as text, RTF or Word either) and an importer -/// that reads for `mode` lists it. +/// built-in format reads the extension (nor as text, RTF or Word) and an importer that reads for +/// `mode` lists it. fn importer_reads(ext: &str, mode: Mode) -> bool { super::readable_format(ext).is_none() && match mode { - Mode::Import => !import::for_extension(ext).is_empty(), + Mode::Import => !super::TEXT_DOCUMENT_EXTS.contains(&ext) && !import::for_extension(ext).is_empty(), Mode::Place => !super::PLACE_EXTS.contains(&ext) && !import::placing(ext).is_empty(), } } diff --git a/crates/engine/src/cmd/fileio/load.rs b/crates/engine/src/cmd/fileio/load.rs index f152132c69..fc8844f956 100644 --- a/crates/engine/src/cmd/fileio/load.rs +++ b/crates/engine/src/cmd/fileio/load.rs @@ -803,6 +803,14 @@ pub fn read_for_open(name: &str, bytes: &[u8], path: Option, p: &Value, read_for_open_asking(name, bytes, path, p, update_links, low_res_proxy_eps, false) } +/// A text, RTF or Word file as a new document of its text, decoded with the `text` options of +/// `document.open`'s params `p` ([`crate::cmd::place::text_document`]); any other file as +/// [`load_with`] reads it with `opts`. +fn text_or_load(name: &str, bytes: &[u8], p: &Value, opts: &LoadOptions) -> Result { + let Some((doc, format, warnings)) = crate::cmd::place::text_document(name, bytes, p)? else { return load_with(name, bytes, opts) }; + Ok(Loaded { doc, format, warnings, restored: false, converted: false, preview_only: false, editing_data: false, native_pdf_compatible: None }) +} + /// [`read_for_open`]; with `ask` (the desktop app's File › Open), a document whose profile /// question ([`ReadFile::question`]) Edit › Color Settings asks, and that `p` gives no /// `profileChoice` for, stops after it is decoded: the app asks, and [`ReadFile::answer`] (or @@ -825,7 +833,7 @@ pub fn read_for_open_asking( Some(plugin) => (super::importer::load(name, bytes, &plugin, p)?, opts.color_mode), // The color mode `p` asks for converts the colors after the policies did, through the // profiles the document keeps. - None => (load_with(name, bytes, &LoadOptions { color_mode: None, ..opts.clone() })?, opts.color_mode), + None => (text_or_load(name, bytes, p, &LoadOptions { color_mode: None, ..opts.clone() })?, opts.color_mode), } }; let mut file = ReadFile { diff --git a/crates/engine/src/cmd/fileio/tests.rs b/crates/engine/src/cmd/fileio/tests.rs index ed0034b99e..9d8c390318 100644 --- a/crates/engine/src/cmd/fileio/tests.rs +++ b/crates/engine/src/cmd/fileio/tests.rs @@ -101,7 +101,7 @@ fn opens_every_readable_format() { let mime = &doc.images[&im.key].mime; assert_eq!(mime, if name.ends_with("tif") || name.ends_with("bmp") { "image/png" } else { format_for_name(name).unwrap().mime }); } - assert!(s.execute("document.open", &json!({"name": "x.txt", "dataBase64": "aGVsbG8="})).is_err()); + assert!(s.execute("document.open", &json!({"name": "x.xyz", "dataBase64": "aGVsbG8="})).is_err()); } #[test] @@ -457,12 +457,12 @@ fn open_exts_cover_every_readable_format() { assert!(readable_format(e).is_some(), ".{e} in OPEN_EXTS is no readable format"); } let filters: Vec<_> = open_filters().collect(); - assert_eq!(filters[0], ("All readable files", OPEN_EXTS)); + assert_eq!(filters[0], ("All readable files", &[OPEN_EXTS, TEXT_DOCUMENT_EXTS].concat()[..])); assert_eq!( filters.len(), - 13 + FORMATS.iter().filter(|f| f.read).count(), - "and swatch and graphic style libraries, libraries, flattener, PDF, print, perspective grid and export presets, composite \ - fonts, shortcut sets, scripts, plug-ins" + 16 + FORMATS.iter().filter(|f| f.read).count(), + "and text, RTF and Word, swatch and graphic style libraries, libraries, flattener, PDF, print, perspective grid and export \ + presets, composite fonts, shortcut sets, scripts, plug-ins" ); let at = |label: &str| filters.iter().position(|f| f.0 == label).unwrap_or_else(|| panic!("File › Open has no {label} filter")); let styles: &[&str] = &[vectorcraft_doc::style_libs::STYLES_EXT]; diff --git a/crates/engine/src/cmd/place.rs b/crates/engine/src/cmd/place.rs index 9d145853b9..09c55597c4 100644 --- a/crates/engine/src/cmd/place.rs +++ b/crates/engine/src/cmd/place.rs @@ -193,6 +193,60 @@ fn load_sliced(p: &Value, cmd: &str, board: Option, link_pdf: bool) -> Res Ok((l, slices)) } +/// The story of the text, RTF or Word file `name` holding `bytes`, with its format and warnings; a +/// text file is decoded with the `text` options of `p` (errors of command `cmd`). `None` when the +/// file is none of these. +fn text_story(name: &str, bytes: &[u8], p: &Value, cmd: &str) -> Result)>> { + // An Affinity file is recognised by its signature, whatever its name says. + if fileio::TEXT_EXTS.contains(&fileio::extension(name).as_str()) && !vectorcraft_affinity::is_affinity(bytes) { + let text = text::import(bytes, text::TextOptions::parse(p, cmd)?, cmd)?; + return Ok(Some((text::Story::plain(text), &text::FORMAT, vec![]))); + } + // An RTF file is recognized by its content, whatever its name says (a .txt file is plain text). + if rtf::is_rtf(bytes) { + return Ok(Some((rtf::import(bytes, cmd)?, &rtf::FORMAT, vec![]))); + } + // A Word document is recognized by its name or by its package's `word/document.xml`. + if docx::is_docx(name, bytes) { + return Ok(Some((docx::import(bytes, cmd)?, &docx::FORMAT, vec![]))); + } + // A Word 97-2003 document is recognized by its name or by its compound file's WordDocument + // stream. + if doc::is_doc(name, bytes) { + let (story, warnings) = doc::import(bytes, cmd)?; + return Ok(Some((story, &doc::FORMAT, warnings))); + } + Ok(None) +} + +/// The size of the document File › Open makes of a text, RTF or Word file: a letter page. +const TEXT_DOCUMENT: (f64, f64) = (612.0, 792.0); + +/// File › Open of the text, RTF or Word file `name` holding `bytes` (`document.open`, whose params +/// `p` give a text file's `text` options): a new letter-size document whose first layer holds the +/// file's text as area type, in a frame 36 pt inside the artboard, as File › Place sets it, with +/// the file's format and warnings. `None` when the file's extension is not one of +/// [`fileio::TEXT_DOCUMENT_EXTS`], or when its content is none of these files (an Affinity file +/// named `.txt`). +pub(crate) fn text_document(name: &str, bytes: &[u8], p: &Value) -> Result)>> { + const C: &str = "document.open"; + if !fileio::TEXT_DOCUMENT_EXTS.contains(&fileio::extension(name).as_str()) { + return Ok(None); + } + let Some((story, format, warnings)) = text_story(name, bytes, p, C)? else { return Ok(None) }; + if story.plain_text().trim().is_empty() { + return Err(bad(C, format!("`{}` has no text to open", fileio::file_name(name)))); + } + let mut d = Document::new(TEXT_DOCUMENT.0, TEXT_DOCUMENT.1); + let frame = text_frame(d.artboards.first().map(|a| a.rect)); + let node = Node::new(d.alloc_id(), NodeKind::Text(Box::new(text::area_text(story, frame, &d.setup)))); + let node = transformed(node, Affine::translate(frame.origin().to_vec2())); + let layer = d.layers.first().map(|l| l.id); + d.insert(layer, usize::MAX, node)?; + d.title = fileio::file_name(name); + Ok(Some((d, format, warnings))) +} + /// The file `p` names, read into placeable art; a DXF drawing's Fit to Artboard fills `board` /// (unless the params name their own box). A PDF/.ai page or an EPS file read from a path is placed /// linked with Link when `link_pdf` (false for the queries, which read it embedded). A PSD or PSB @@ -204,39 +258,11 @@ fn load_into(p: &Value, cmd: &str, board: Option, link_pdf: bool, slices_o if let Some(plugin) = fileio::importer::named_for_place(src.name, p, cmd)? { return plugin_art(name, src.name, &src.bytes, &plugin, p, cmd); } - // An Affinity file is recognised by its signature, whatever its name says. - if fileio::TEXT_EXTS.contains(&fileio::extension(src.name).as_str()) && !vectorcraft_affinity::is_affinity(&src.bytes) { - let text = text::import(&src.bytes, text::TextOptions::parse(p, cmd)?, cmd)?; - if text.trim().is_empty() { - return Err(bad(cmd, format!("`{name}` has no text to place"))); - } - let art = Art::Text(text::Story::plain(text)); - return Ok(Loaded { name, format: &text::FORMAT, art, natural: TEXT_FRAME, warnings: vec![], link: None, board: None }); - } - // An RTF file is recognized by its content, whatever its name says (a .txt file is plain text). - if rtf::is_rtf(&src.bytes) { - let story = rtf::import(&src.bytes, cmd)?; + if let Some((story, format, warnings)) = text_story(src.name, &src.bytes, p, cmd)? { if story.plain_text().trim().is_empty() { return Err(bad(cmd, format!("`{name}` has no text to place"))); } - return Ok(Loaded { name, format: &rtf::FORMAT, art: Art::Text(story), natural: TEXT_FRAME, warnings: vec![], link: None, board: None }); - } - // A Word document is recognized by its name or by its package's `word/document.xml`. - if docx::is_docx(src.name, &src.bytes) { - let story = docx::import(&src.bytes, cmd)?; - if story.plain_text().trim().is_empty() { - return Err(bad(cmd, format!("`{name}` has no text to place"))); - } - return Ok(Loaded { name, format: &docx::FORMAT, art: Art::Text(story), natural: TEXT_FRAME, warnings: vec![], link: None, board: None }); - } - // A Word 97-2003 document is recognized by its name or by its compound file's WordDocument - // stream. - if doc::is_doc(src.name, &src.bytes) { - let (story, warnings) = doc::import(&src.bytes, cmd)?; - if story.plain_text().trim().is_empty() { - return Err(bad(cmd, format!("`{name}` has no text to place"))); - } - return Ok(Loaded { name, format: &doc::FORMAT, art: Art::Text(story), natural: TEXT_FRAME, warnings, link: None, board: None }); + return Ok(Loaded { name, format, art: Art::Text(story), natural: TEXT_FRAME, warnings, link: None, board: None }); } let Some(format) = fileio::detect(src.name, &src.bytes) else { return match fileio::importer::for_place(src.name) { diff --git a/crates/engine/src/tests/textimport.rs b/crates/engine/src/tests/textimport.rs index 7af09c95e8..36179b716b 100644 --- a/crates/engine/src/tests/textimport.rs +++ b/crates/engine/src/tests/textimport.rs @@ -1162,8 +1162,83 @@ fn place_reads_what_open_reads_and_text_files() { let word: (&str, &[&str]) = ("Word", &["docx", "doc"]); assert_eq!((filters.first(), filters.last()), (Some(&("All placeable files", PLACE_EXTS)), Some(&word))); assert_eq!(filters.get(filters.len() - 3..), Some(&[("Text", TEXT_EXTS), ("RTF", RTF_EXTS), word][..])); - assert!( - !cmd::fileio::open_filters().any(|(_, exts)| ["txt", "rtf", "docx", "doc"].iter().any(|e| exts.contains(e))), - "Open doesn't read text, RTF or Word files" - ); + // File › Open lists them in "All readable files", after the formats it reads, and in filters + // of their own after the format filters; the documents File › Open reads (Batch's source files, + // `openExtensions`) leave them out. + let open: Vec<_> = cmd::fileio::open_filters().collect(); + assert_eq!(open[0].0, "All readable files"); + assert!(open[0].1.starts_with(PLACE_EXTS), "{:?}", open[0].1); + let text = open.iter().position(|f| f.0 == "Text").expect("File › Open has a Text filter"); + assert_eq!(open.get(text..text + 3), Some(&[("Text", TEXT_EXTS), ("RTF", RTF_EXTS), word][..])); + assert_eq!(open.get(text - 1).map(|f| f.0), cmd::fileio::FORMATS.iter().rfind(|f| f.read).map(|f| f.label), "after the format filters"); + assert!(!cmd::fileio::open_extensions().iter().any(|e| ["txt", "rtf", "docx", "doc"].contains(e))); +} + +fn open_text(s: &mut Session, name: &str, bytes: &[u8], extra: Value) -> crate::Result { + let mut p = json!({"name": name, "dataBase64": vectorcraft_format::base64_encode(bytes)}); + if let (Some(o), Value::Object(e)) = (p.as_object_mut(), extra) { + o.extend(e); + } + s.execute("document.open", &p) +} + +/// The opened document's one object: its text and frame bounds. +fn opened_text(s: &Session) -> (String, Rect) { + let st = s.doc().unwrap(); + let layer = &st.doc.layers[0]; + let [n] = layer.children().map_or(&[][..], Vec::as_slice) else { panic!("one object on the first layer: {:?}", layer.children()) }; + let NodeKind::Text(t) = &n.kind else { panic!("not type: {:?}", n.kind) }; + assert!(matches!(t.kind, TextKind::Area { .. }), "area type"); + (t.plain_text(), n.geometric_bounds().unwrap()) +} + +/// File › Open of a text file makes a new letter-size document whose text, read with the Text +/// Import Options given, is area type 36 pt inside the artboard; it has no path, so Save asks for a +/// name, and nothing to undo. +#[test] +fn open_makes_a_new_document_of_a_text_file_with_its_options() { + let mut s = Session::new(); + let text = b"Caf\xE9 au lait,\r\nplease.\r\n\r\nThanks"; + let opts = json!({"text": {"characterSet": "cyrillic", "removeLineReturns": true, "removeParagraphReturns": true}}); + let r = open_text(&mut s, "order.txt", text, opts).unwrap(); + assert_eq!((r["format"].as_str(), r["title"].as_str()), (Some("txt"), Some("order.txt"))); + let (body, frame) = opened_text(&s); + assert_eq!(body, "Cafй au lait, please.\nThanks", "decoded as Cyrillic, lines joined, blank lines dropped"); + assert!(close(frame, Rect::new(36.0, 36.0, 576.0, 756.0)), "a letter page less a 36 pt margin: {frame:?}"); + let st = s.doc().unwrap(); + assert_eq!(st.doc.artboards.iter().map(|a| a.rect).collect::>(), [Rect::new(0.0, 0.0, 612.0, 792.0)]); + assert_eq!((st.path.as_deref(), st.history.undo.len()), (None, 0)); + // Without options each line is a paragraph, read as UTF-8. + open_text(&mut s, "order.txt", "Café\r\nau lait".as_bytes(), json!({})).unwrap(); + assert_eq!(opened_text(&s).0, "Café\nau lait"); + assert_eq!(s.documents().len(), 2, "each open is a document of its own"); +} + +#[test] +fn open_makes_a_new_document_of_an_rtf_or_word_file() { + let mut s = Session::new(); + let r = open_text(&mut s, "letter.rtf", LETTER_RTF.as_bytes(), json!({})).unwrap(); + assert_eq!(r["format"], "rtf"); + assert_eq!(opened_text(&s).0, "Plain and bold words2.\nCentered café"); + let body = r#"MinutesAgreed"#; + let r = open_text(&mut s, "minutes.docx", &docx(body, STYLES), json!({})).unwrap(); + assert_eq!(r["format"], "docx"); + assert_eq!(opened_text(&s).0, "Minutes\nAgreed"); + let doc = Word97 { pieces: vec![("Old memo\r", true)], ..Word97::default() }.build(); + let r = open_text(&mut s, "memo.doc", &doc, json!({})).unwrap(); + assert_eq!(r["format"], "doc"); + assert_eq!(opened_text(&s).0, "Old memo"); +} + +/// A file without text, bad Text Import Options and a damaged file open nothing. +#[test] +fn text_files_that_cant_be_read_open_no_document() { + let mut s = Session::new(); + let e = open_text(&mut s, "blank.txt", b" \r\n\t\r\n", json!({})).unwrap_err().to_string(); + assert!(e.contains("`blank.txt` has no text to open"), "{e}"); + let e = open_text(&mut s, "notes.txt", b"words", json!({"text": {"characterSet": "klingon"}})).unwrap_err().to_string(); + assert!(e.contains("text.characterSet `klingon`"), "{e}"); + assert!(open_text(&mut s, "broken.docx", b"PK\x03\x04 not a package", json!({})).is_err()); + assert!(open_text(&mut s, "plain.rtf", b"Plain words, not RTF", json!({})).is_err(), "an .rtf file that isn't RTF"); + assert_eq!(s.documents().len(), 0); } diff --git a/crates/engine/tests/plugin_import.rs b/crates/engine/tests/plugin_import.rs index 9f77d86ec4..3e7d341491 100644 --- a/crates/engine/tests/plugin_import.rs +++ b/crates/engine/tests/plugin_import.rs @@ -264,6 +264,21 @@ fn file_open_lists_only_the_extensions_it_opens_with_an_importer() { s.execute("plugin.remove", &json!({"id": "test.claimedonly"})).unwrap(); } +/// A text file opens as a document of its text even when an importer lists `.txt`: the importer +/// reads it only when `importer` names it, and File › Open's filter for it leaves `.txt` out. +#[test] +fn text_files_open_as_text_unless_an_importer_is_named() { + let mut s = Session::new(); + install(&mut s, &tpl::returning(&tpl::importer("test.textclaim", r#"["txt","tcx"]"#, "{}"), RECT)); + assert_eq!(open(&mut s, "notes.txt", b"words", json!({})).unwrap()["format"], "txt"); + assert_eq!(open(&mut s, "notes.txt", b"words", json!({"importer": "plugin.test.textclaim"})).unwrap()["format"], "plugin.test.textclaim"); + let filters: Vec<_> = fileio::open_filters().collect(); + assert!(filters.contains(&("Test test.textclaim", &["tcx"][..])), "{filters:?}"); + assert_eq!(filters[0].1.iter().filter(|e| **e == "txt").count(), 1, "All readable files lists .txt once"); + assert!(!fileio::open_extensions().contains(&"txt")); + s.execute("plugin.remove", &json!({"id": "test.textclaim"})).unwrap(); +} + /// Several importers list one extension: the one whose id sorts first opens the file, and /// `importer` picks another (by its format id or its id). #[test] diff --git a/crates/mcp/src/tools/definitions.rs b/crates/mcp/src/tools/definitions.rs index cc187ea408..a76e00e045 100644 --- a/crates/mcp/src/tools/definitions.rs +++ b/crates/mcp/src/tools/definitions.rs @@ -364,7 +364,7 @@ pub fn tool_definitions() -> Vec { "open_file", "Open file", &format!( - "Open a file as a new, active document: .{} (see run_command document.formats). Templates (.ait, native templates) open as a new untitled document. The reply's `warnings` say what didn't come in as it was (an EPS shown as its preview image says why its PostScript couldn't be read). A file of an extension no built-in format reads opens with the installed importer plug-in that lists it; `importer` names the importer to use (File › Open With), also for an extension a built-in format reads, and `params` gives that importer's parameters.", + "Open a file as a new, active document: .{} (see run_command document.formats). Templates (.ait, native templates) open as a new untitled document. A text, RTF or Word file (.txt, .rtf, .docx, .doc) opens as a new letter-size document of its text as area type. The reply's `warnings` say what didn't come in as it was (an EPS shown as its preview image says why its PostScript couldn't be read). A file of an extension no built-in format reads opens with the installed importer plug-in that lists it; `importer` names the importer to use (File › Open With), also for an extension a built-in format reads, and `params` gives that importer's parameters.", OPEN_EXTS.join(", .") ), obj( diff --git a/crates/ui-egui/src/dialogs/host.rs b/crates/ui-egui/src/dialogs/host.rs index 82987ab202..ce25bf4e23 100644 --- a/crates/ui-egui/src/dialogs/host.rs +++ b/crates/ui-egui/src/dialogs/host.rs @@ -188,6 +188,7 @@ pub(crate) fn pump(app: &mut VectorcraftApp, ctx: &egui::Context) { super::find_links::pump, ); super::missing_fonts::open_next(app); + super::text_import::open_next(app); pumps!(app, ctx; super::dxf_import::pump, super::import_pdf::pump, diff --git a/crates/ui-egui/src/dialogs/text_import.rs b/crates/ui-egui/src/dialogs/text_import.rs index 4fadf49511..958b1b1984 100644 --- a/crates/ui-egui/src/dialogs/text_import.rs +++ b/crates/ui-egui/src/dialogs/text_import.rs @@ -1,7 +1,9 @@ //! Text Import Options: placing a text file asks how to read it (platform and character set) and //! what to clean up (line breaks inside paragraphs, blank lines between them, runs of spaces). OK //! places it as area type (`file.place` with `text`) and remembers the options: the next text file -//! starts from them, and is placed with them when Show Import Options is off. +//! starts from them, and is placed with them when Show Import Options is off. Opening a text file +//! (File › Open, Open Recent, a drop) asks the same: OK opens it as a new document of its text +//! (`document.open` with `text`) and remembers the options. //! //! Fields: `platform` (`windows` | `mac`), `characterSet` (one of [`CHARACTER_SETS`]), //! `removeLineReturns`, `removeParagraphReturns`, `replaceSpaces` (on or off) and `spaces` (how @@ -45,7 +47,11 @@ const SPACES: std::ops::RangeInclusive = 2..=100; /// Is the file `p` names (`path` or `name`) a text file? pub fn is_text(p: &Value) -> bool { - let name = p.get("path").or_else(|| p.get("name")).and_then(Value::as_str).unwrap_or_default(); + is_text_name(p.get("path").or_else(|| p.get("name")).and_then(Value::as_str).unwrap_or_default()) +} + +/// Is the file named `name` a text file, by its extension? +fn is_text_name(name: &str) -> bool { vectorcraft_engine::cmd::fileio::TEXT_EXTS.contains(&vectorcraft_engine::cmd::fileio::extension(name).as_str()) } @@ -106,6 +112,60 @@ pub fn open(app: &mut VectorcraftApp, params: &Value) -> Value { json!({ "dialog": KIND }) } +/// A text file File › Open asks about: its name, bytes, path and `document.open` params. +#[derive(Clone, Debug)] +pub struct TextOpen { + name: String, + bytes: Vec, + path: Option, + params: Value, +} + +/// Is Text Import Options open? +fn is_asking(app: &VectorcraftApp) -> bool { + app.dialogs().is_some_and(|w| w.with(|h| h.open_dialogs().iter().any(|d| d.key.as_deref() == Some(KIND)))) +} + +/// File › Open of the file `name` holding `bytes` (read from `path`) with `document.open`'s params +/// `p` asks how to read it first (true) when it is a text file and `p` gives no `text` options and +/// names no importer: OK opens it as a new document with the options and remembers them for the +/// next text file, and an error keeps the dialog open. The dialog starts from the options +/// confirmed last. While Text Import Options is open, the file waits its turn ([`open_next`]). +pub fn offer_open(app: &mut VectorcraftApp, name: &str, bytes: &[u8], path: Option, p: &Value) -> bool { + if !is_text_name(name) || p.get("text").is_some() || p.get("importer").is_some_and(|v| !v.is_null()) || app.ui_ctx.is_none() { + return false; + } + let file = TextOpen { name: name.to_string(), bytes: bytes.to_vec(), path, params: p.clone() }; + if is_asking(app) || !app.ui.text_opens.is_empty() { + app.ui.text_opens.push(file); + return true; + } + ask_open(app, file) +} + +/// Asks about the next text file File › Open waits to open, once Text Import Options is closed. +pub(crate) fn open_next(app: &mut VectorcraftApp) { + if app.ui.text_opens.is_empty() || is_asking(app) { + return; + } + let file = app.ui.text_opens.remove(0); + ask_open(app, file); +} + +/// Text Import Options for the text file `file` File › Open opens. +fn ask_open(app: &mut VectorcraftApp, file: TextOpen) -> bool { + let ctx = app.ui_ctx.clone().unwrap_or_default(); + let dialog = HostedParamDialog::new(&ctx, KIND, starting_fields(app), build).held_ok(); + open_held(app, dialog, move |app, result| { + let mut p = file.params.clone(); + p["text"] = options(&result.fields); + crate::io::open_document(app, &file.name, &file.bytes, file.path.clone(), &p)?; + app.ui.text_import = p["text"].clone(); + Ok(()) + }) + .is_some() +} + /// The `text` options a text file is placed with when Show Import Options is off: those confirmed /// last, else `file.place`'s defaults. pub fn last_options(app: &VectorcraftApp) -> Value { @@ -409,4 +469,44 @@ mod tests { assert_eq!((objects(0), objects(1)), (1, 0), "placed in the document it was dropped on"); assert_eq!(app.session.active_index(), Some(0)); } + + /// File › Open of a text file asks for its import options, starting from the ones confirmed + /// last, and opens nothing until OK: OK opens a new document of its text read with them and + /// remembers them, and Cancel opens nothing. Text files opened together are asked about one at + /// a time. An RTF file opens without asking. + #[test] + fn opening_a_text_file_asks_for_the_import_options_then_opens_a_document() { + let mut app = host::app(); + app.ui.text_import = json!({"characterSet": "shiftJis", "platform": "windows"}); + let text = [b"\x93\xFA\x96\x7B\r\n".as_slice(), b"one\r\n\r\ntwo"].concat(); + assert_eq!(crate::io::open_bytes(&mut app, "notes.txt", &text, None).unwrap(), Value::Null); + assert!(app.session.documents().is_empty(), "nothing opens before OK"); + assert_eq!(host::fields(&app, KIND)["characterSet"], "shiftJis"); + host::set(&app, KIND, "removeParagraphReturns", json!(true)); + host::confirm(&mut app, KIND).unwrap(); + assert!(!host::is_open(&app, KIND)); + assert_eq!(app.session.documents().len(), 1); + assert_eq!(placed_text(&app).as_deref(), Some("日本\none\ntwo"), "decoded as Shift JIS, the blank line dropped"); + assert_eq!(app.ui.text_import["removeParagraphReturns"], true, "remembered for the next file"); + assert_eq!(app.session.doc().unwrap().title(), "notes.txt"); + + // Two text files opened together are asked about in turn: Cancel on the first opens + // nothing, and the second is asked about next. + crate::io::open_bytes(&mut app, "other.txt", b"three", None).unwrap(); + crate::io::open_bytes(&mut app, "last.txt", b"four", None).unwrap(); + assert!(host::is_open(&app, KIND)); + host::cancel(&app, KIND); + let ctx = app.ui_ctx.clone().unwrap(); + crate::dialogs::host::pump(&mut app, &ctx); + assert_eq!(app.session.documents().len(), 1, "Cancel opens nothing"); + host::confirm(&mut app, KIND).unwrap(); + assert_eq!((app.session.documents().len(), placed_text(&app).as_deref()), (2, Some("four"))); + crate::dialogs::host::pump(&mut app, &ctx); + assert!(!host::is_open(&app, KIND), "no file is left to ask about"); + + let rtf = br"{\rtf1 Rich {\b words}}"; + crate::io::open_bytes(&mut app, "rich.rtf", rtf, None).unwrap(); + assert!(!host::is_open(&app, KIND)); + assert_eq!((app.session.documents().len(), placed_text(&app).as_deref()), (3, Some("Rich words"))); + } } diff --git a/crates/ui-egui/src/io/open.rs b/crates/ui-egui/src/io/open.rs index dce5bac6e5..7aec797157 100644 --- a/crates/ui-egui/src/io/open.rs +++ b/crates/ui-egui/src/io/open.rs @@ -69,10 +69,12 @@ fn open_bytes_with(app: &mut VectorcraftApp, name: &str, bytes: &[u8], path: Opt return load(app, p).map(|_| Value::Null); } // A PDF with several pages or a password asks first (the Import PDF dialog), and so do a DXF - // drawing (DXF Import Options) and a PSD file with several layers or with slices (PSD Import - // Options), unless `p` says how its layers come in. + // drawing (DXF Import Options), a text file (Text Import Options, unless `p` gives `text`) and + // a PSD file with several layers or with slices (PSD Import Options), unless `p` says how its + // layers come in. if crate::dialogs::import_pdf::offer(app, name, bytes, path.clone(), None) || crate::dialogs::dxf_import::offer(app, name, bytes, path.clone(), None) + || crate::dialogs::text_import::offer_open(app, name, bytes, path.clone(), p) || (p.get("layers").is_none() && crate::dialogs::psd_import::offer(app, name, bytes, path.clone(), None)) { return Ok(Value::Null); @@ -513,7 +515,9 @@ fn check_import_size(path: &str, explicit: bool) -> Result<(), String> { use std::io::Read as _; use vectorcraft_plugins::import; let ext = fileio::extension(path); - if !explicit && (fileio::readable_format(&ext).is_some() || import::for_extension(&ext).is_empty()) { + if !explicit + && (fileio::readable_format(&ext).is_some() || fileio::TEXT_DOCUMENT_EXTS.contains(&ext.as_str()) || import::for_extension(&ext).is_empty()) + { return Ok(()); } if std::fs::metadata(path).map_or(true, |m| m.len() <= import::MAX_INPUT_BYTES as u64) { @@ -676,10 +680,11 @@ fn open_file_with(app: &mut VectorcraftApp, path: &str, background: bool, p: &Va if crate::dialogs::dxf_import::convert_in_background(app, path, &bytes, Some(path.to_string()), None) { return Ok(Value::Null); } - // A PDF with several pages or a password, a DXF drawing, or a PSD file with several layers - // or with slices asks first, as at once. + // A PDF with several pages or a password, a DXF drawing, a text file, or a PSD file with + // several layers or with slices asks first, as at once. if crate::dialogs::import_pdf::offer(app, path, &bytes, Some(path.to_string()), None) || crate::dialogs::dxf_import::offer(app, path, &bytes, Some(path.to_string()), None) + || crate::dialogs::text_import::offer_open(app, path, &bytes, Some(path.to_string()), p) || (p.get("layers").is_none() && crate::dialogs::psd_import::offer(app, path, &bytes, Some(path.to_string()), None)) { note_recent(app, path); diff --git a/crates/ui-egui/src/state.rs b/crates/ui-egui/src/state.rs index fda6c31677..e8522187b3 100644 --- a/crates/ui-egui/src/state.rs +++ b/crates/ui-egui/src/state.rs @@ -991,6 +991,10 @@ pub struct UiState { /// The Text Import Options confirmed last (`file.place`'s `text` options; null: never used). #[serde(default, skip_serializing_if = "Value::is_null")] pub text_import: Value, + /// The text files File › Open opened while Text Import Options was already open, each asked + /// about once it closes, the next one first. + #[serde(skip)] + pub(crate) text_opens: Vec, /// The documents (uids) whose Missing Fonts dialog waits until no dialog is open, the next one to /// show first. #[serde(skip)] @@ -1629,6 +1633,7 @@ impl Default for UiState { place_link: true, place_import_options: true, text_import: Value::Null, + text_opens: vec![], pending_fonts: vec![], stopped_plugin: None, proof_setup: None, diff --git a/docs/mcp.md b/docs/mcp.md index 2fd8648262..e98cc600c6 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -866,7 +866,7 @@ ends the wait, so the sampler can be shown again. The BSDs and headless sessions | `invoke_menu` | `{command, params?}` | Invokes a menu item by command id. UI commands such as `view.*` and `window.*` are in `command_list` with `ui: true`; running them needs the desktop app (`--connect`). The app refuses `attributes.openUrl`, `file.export.svg.browser`, `file.saveForWeb.browser` and `file.showPackage` for every control and MCP request, since each opens another app, so the headless error for them does not suggest `--connect`. | | `open_panel` | `{panel}` | Remote only. `panel` is a panel id (`layers`, `swatches`, `colorGuide`, …, as `window.panel` takes) or its display label (`"Color Guide"`), in any case. | | `screenshot` | `{path?, scale?, artboard?, window?, max_side?, traceViews?}` | Returns MCP image content (`image/png`, base64) plus a text block. Renders the artboard with the pixels of a PNG `export` with `background: "white"` at the same scale; `traceViews:true` draws Image Trace objects in the view set with `imageTrace.setView`, as in the app's window; `window:true` captures the app window (remote only), as `ui_screenshot` does, and `max_side` (1–4096, window captures only) scales the returned image down as described for `ui_screenshot`. With `path` the backend (the headless session or the app) writes the PNG there too; a window capture written there keeps its full size with `max_side`. An app that does not send the image back writes a window capture without `path` to a file in a new folder inside the system's temporary folder (on Unix only the user can open it); the server reads the file and then removes the folder, also when the capture or the read fails. | -| `open_file` | `{path, importer?, params?}` | Opens any readable file as a new active document: `.vectorcraft`/`.drawcraft`, `.vctemplate`, `.svg`/`.svgz`, `.pdf`/`.ai`, `.ait`, `.eps`/`.epsf`, `.ps`, `.dxf`, `.emf`, `.wmf`, PICT (`.pct`/`.pic`/`.pict`, and a version 2 picture of any extension), HP-GL (`.plt`/`.hpgl`/`.hgl`/`.hpg`, and a file of an extension no other format reads that starts with plotter instructions), PNG (`.png`/`.pns`), JPEG, GIF, WebP, TIFF, BMP (`.bmp`/`.dib`/`.rle`), Targa (`.tga`/`.vda`/`.icb`/`.vst`), PCX, Pixar (`.pxr`), JPEG 2000 (`.jpf`/`.jpx`/`.jp2`/`.j2k`/`.j2c`/`.jpc`), HEIC/HEIF (`.heic`/`.heif`), JPEG XL (`.jxl`), PSD (`.psd`/`.pdd`)/PSB (an image opens as a document of its pixel size; a PSD or PSB file with its layers as layers, or as its merged image through `run_command document.open` with `layers: false`; a JPEG XL file as its first frame), CDR drawings of versions 1 to 27 (`.cdr`, `.cdt`), CMX files with 32-bit coordinates (`.cmx`), layered raster `.pcraft` documents (as one image at the canvas size; a warning says when only the smaller preview could be read). Templates (`.vctemplate`, `.ait`, `.cdt`) open as a new untitled document. PDF, `.ai` and SVG files saved with Preserve Editing reopen as the document they carry. The reply is `document.open`'s: its `warnings` say what didn't come in as it was (an EPS whose PostScript can't be read opens as its preview, and the warning names the PostScript error, the operator and the procedure). A file of an extension only an installed importer plug-in lists opens with that importer ([Plug-ins](#plug-ins)); `importer: "plugin."` opens the file with the importer it names, which must list the file's extension, also one a built-in format reads (in the app, as File › Open With does), and `params` gives that importer's parameters (their defaults when omitted). `run_command document.formats` lists the formats. | +| `open_file` | `{path, importer?, params?}` | Opens any readable file as a new active document: `.vectorcraft`/`.drawcraft`, `.vctemplate`, `.svg`/`.svgz`, `.pdf`/`.ai`, `.ait`, `.eps`/`.epsf`, `.ps`, `.dxf`, `.emf`, `.wmf`, PICT (`.pct`/`.pic`/`.pict`, and a version 2 picture of any extension), HP-GL (`.plt`/`.hpgl`/`.hgl`/`.hpg`, and a file of an extension no other format reads that starts with plotter instructions), PNG (`.png`/`.pns`), JPEG, GIF, WebP, TIFF, BMP (`.bmp`/`.dib`/`.rle`), Targa (`.tga`/`.vda`/`.icb`/`.vst`), PCX, Pixar (`.pxr`), JPEG 2000 (`.jpf`/`.jpx`/`.jp2`/`.j2k`/`.j2c`/`.jpc`), HEIC/HEIF (`.heic`/`.heif`), JPEG XL (`.jxl`), PSD (`.psd`/`.pdd`)/PSB (an image opens as a document of its pixel size; a PSD or PSB file with its layers as layers, or as its merged image through `run_command document.open` with `layers: false`; a JPEG XL file as its first frame), CDR drawings of versions 1 to 27 (`.cdr`, `.cdt`), CMX files with 32-bit coordinates (`.cmx`), layered raster `.pcraft` documents (as one image at the canvas size; a warning says when only the smaller preview could be read). Templates (`.vctemplate`, `.ait`, `.cdt`) open as a new untitled document. A text, RTF or Word file (`.txt`, `.rtf`, `.docx`, `.doc`) opens as a new letter-size document named after the file, its text area type 36 pt inside the artboard as `file.place` sets it; `run_command document.open` with `text` gives a `.txt` file's Text Import Options, and Save asks for a name. PDF, `.ai` and SVG files saved with Preserve Editing reopen as the document they carry. The reply is `document.open`'s: its `warnings` say what didn't come in as it was (an EPS whose PostScript can't be read opens as its preview, and the warning names the PostScript error, the operator and the procedure). A file of an extension only an installed importer plug-in lists opens with that importer ([Plug-ins](#plug-ins)); `importer: "plugin."` opens the file with the importer it names, which must list the file's extension, also one a built-in format reads (in the app, as File › Open With does), and `params` gives that importer's parameters (their defaults when omitted). `run_command document.formats` lists the formats. | | `save_file` | `{path?, compress?, version?, preview?, precision?, options?}` | Runs `document.save`: the document's own file in its own format (native `.vectorcraft` unless it was opened from or saved as SVG, PDF or a restorable `.ai`; then `warnings` say what that format loses). A path's extension picks the format (`.vectorcraft`, `.vctemplate`, `.pdf`, `.svg`, `.svgz`, `.ai`: a PDF carrying the native document, which reopens editable; `.eps`: by default one file whose bounding box fits the visible art, the first artboard when no art shows; `options.useArtboards: true` makes the chosen artboard the page and, with two or more chosen, the file at the path is the central file of the visible art and each artboard is also written to `_.eps` beside it, listed in the reply's `files`). For a native file, `compress: true` gzips it (default: the `useCompression` preference, Preferences › File Handling › Use Compression), `version` (1 to 4) writes it for an older VectorCraft (1 and 2 are never compressed, and `version: 2` with `compress: true` is an error; versions 1 to 3 get each live star as a plain path of its outline, without its point count and ratio), `preview: true` embeds a PNG of the first artboard, and `precision` (0 to 9) rounds path anchors and handles to that many decimal places for that save only (colors, transforms and type stay exact). `options` passes the format's save options as `run_command document.formats` lists them. When `compress`, `version`, `preview` or `precision` is given both at the top level and in `options` with different values, the call is an error (`` `compress: true` and `options.compress: false` disagree: give the option once ``) and nothing is written. A key in `options` that no save format takes is an error, and nothing is written (see Parameter keys). The save drops each option the written format doesn't read. The reply's `warnings` then name each such option given (for example `` `compress` was not used: SVG files don't read it `` for an `.svg` path, and `` `options.preview` was not used: … `` for a key in `options`; a PDF-compatible `.ai` file reads `compress` but not `version`, `preview`, `precision`, `outlineText`, `hiddenObjects`, `transparentImages` or `preserveEditing`, and a legacy `.ai` file reads only its own options). For a `.ai` file, these warnings name the kind of `.ai` written: a legacy .ai (version 7) for `aiVersion: "7"`, a non-PDF-compatible .ai for `pdfCompatible: false`, and a PDF-compatible .ai otherwise, including a save that reuses the options the document was last saved with. `run_command document.save` and the other save commands refuse any option given beside the path and in `options` with different values, and give the same warnings for each key given beside the path or in `options` that the file doesn't read. The headless session and the app receive the same `app.save` params, and the app is also sent `wait: true`: the call returns once the file is written, or with the error (such as a path outside the write root), even with Background Save on. When the save asks first (the question before replacing a file that opened with losses, or on macOS and Linux the file dialog for an untitled document without `path`), the reply is `{pending}` or `"cancelled"` as before, and the save that runs after the answer uses the Background Save preference. Location refusals return `READ_ONLY_LOCATION: ` without a fallback panel for automation; see [Save location errors](#save-location-errors). In the desktop app, a save that runs in the background shows in the progress window after 0.4 s with a moving bar. `file.cancelSave` stops every such save before it replaces its file → `{cancelled: n}`: the file stays as it was, and the document keeps its file and format and stays modified. A save whose file was already being replaced finishes and is reported as saved. `file.saveInBackground` closes the window while the saves go on → `{hidden: n}`. | | `export` | `{path?, format?, scale?, artboard?, range?, selection?, outlineText?, options?}` | `svg`, `svgz`, `pdf`, `ai` (the PDF-compatible `.ai` that Save writes, which carries the document when every artboard is written in order), `eps`, `dxf`, `emf`, `wmf`, `hpgl` (a `.plt` plot file for plotters and cutters), `png`, `jpg`, `webp`, `gif`, `png8` (an indexed `.png`), `tiff`, `bmp`, `tga`, `psd` (layered), `txt` (the document's text), `vectorcraft` or `template` (a native template). The tool's `format` enum and `document.formats` list them, generated from the engine's format table. When `format` is omitted, it comes from the path's extension. PDF and `.ai` write one page per artboard: all of them, or `artboard` (0-based) / `range` (`"1-3, 5"`, 1-based). SVG and SVGZ write one file per chosen artboard. EPS writes one file of the visible art; with `artboard`, `range`, `options.artboards` or `options: {"useArtboards": true}` it writes one file per chosen artboard, after a central file of the visible art when there are two or more, and `useArtboards: false` keeps the one file. Rasters, DXF, EMF, WMF and HP-GL write one artboard, or one file per chosen artboard with `options: {"useArtboards": true}`. Rasters also take `options: {"rect": [x, y, width, height]}` (page points, y down): that area of the page at the given `ppi`/`scale`, without an artboard and without changing the document; it is refused with `artboard`, `artboards`, `range` or `useArtboards`, with a non-positive or non-finite size, and for non-raster formats. `options` carries more format options (e.g. `{"quality": 80}` for JPEG). `selection: true` exports the selected objects cropped to their bounds (the reply adds their `bounds`, and reports `format` and the encoder's `warnings` as a whole-document export does); `outlineText: true` writes SVG text as paths. Template layers are left out, live effects are kept, and exporting `vectorcraft` never changes the document's path. Without `path` the bytes come back as `dataBase64`. Both backends run the same `document.export` call. | | `add_text` | `{text, x?, y?, width?, height?, fit?, fitMinPercent?, path?, mode?, pathEffect?, size?, font?, color?, justify?, vertical?}` | Point type at (x, y) (`justify`: `left`, `center` or `right` starts, centres or ends each line on x); area type with `width`/`height` (`fit`: `none`, `autoHeight`, `shrinkText`, as `text.areaOptions`); or `path` + `mode` (`area`/`onPath`) to flow text in or along a path, with `pathEffect` for type on a path (`rainbow`, `skew`, `3dRibbon`, `stairStep`, `gravity`; SVG export writes type on a path with any effect other than `rainbow` as outlines, with a warning). An invalid effect is rejected before editing. `justify` (also `auto`, `justifyAll`) aligns the paragraphs of every kind, as `text.setStyle` does later. `vertical: true` uses the existing vertical writing mode for every kind (default `false`, horizontal). Returns `{id}`, with `overflow: true` when the text doesn't fit its frame or path. | From c12e48284d7e459fe67f8d845b75103fa88d6fd9 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 4 Dec 2026 16:54:29 -0800 Subject: [PATCH 09/62] Tests: compare OPEN_EXTS with the readable formats as one map The gate's test-lint step failed on open_exts_cover_every_readable_format: the filter assertions this branch changes sit in the same test as two loops that only check presence for every entry of FORMATS and OPEN_EXTS (the census rule). The test now builds the extension-to-format map from the readable formats and from readable_format() over OPEN_EXTS and compares the two, so a missing, extra, duplicated or misrouted extension fails with the whole difference. It also checks that no extension is claimed by two readable formats, plus an alias, a mixed-case name with a leading dot, and that .txt is not a graphic format. --- crates/engine/src/cmd/fileio/tests.rs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/crates/engine/src/cmd/fileio/tests.rs b/crates/engine/src/cmd/fileio/tests.rs index 9d8c390318..6db91d4b2a 100644 --- a/crates/engine/src/cmd/fileio/tests.rs +++ b/crates/engine/src/cmd/fileio/tests.rs @@ -448,14 +448,16 @@ fn templates_open_untitled() { #[test] fn open_exts_cover_every_readable_format() { - for f in FORMATS.iter().filter(|f| f.read) { - for e in read_extensions(f) { - assert!(OPEN_EXTS.contains(e), "OPEN_EXTS lacks .{e} ({})", f.label); - } - } - for e in OPEN_EXTS { - assert!(readable_format(e).is_some(), ".{e} in OPEN_EXTS is no readable format"); - } + let owner: std::collections::BTreeMap<&str, &str> = + FORMATS.iter().filter(|f| f.read).flat_map(|f| read_extensions(f).iter().map(move |e| (*e, f.id))).collect(); + let declared: usize = FORMATS.iter().filter(|f| f.read).map(|f| read_extensions(f).len()).sum(); + assert_eq!(owner.len(), declared, "no extension is claimed by two readable formats"); + let looked_up: std::collections::BTreeMap<&str, &str> = OPEN_EXTS.iter().filter_map(|e| Some((*e, readable_format(e)?.id))).collect(); + assert_eq!(looked_up.len(), OPEN_EXTS.len(), "every OPEN_EXTS entry is listed once and looks up a readable format"); + assert_eq!(looked_up, owner, "OPEN_EXTS is exactly the readable formats' extensions, each looking up its own format"); + assert_eq!(readable_format("dib").map(|f| f.id), Some("bmp"), "an alias opens as its format"); + assert_eq!(readable_format(".SVG").map(|f| f.id), Some("svg"), "any case, leading dot allowed"); + assert!(readable_format("txt").is_none(), "text documents open through their own reader, not a graphic format"); let filters: Vec<_> = open_filters().collect(); assert_eq!(filters[0], ("All readable files", &[OPEN_EXTS, TEXT_DOCUMENT_EXTS].concat()[..])); assert_eq!( From 181a471e6caeca96bc40af15d052c6836f615f71 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 4 Dec 2026 21:22:30 -0800 Subject: [PATCH 10/62] Swatches: the panel checks a large selection in one read of the swatches The Swatches panel's body in craft-libs drops selected keys that no longer name a swatch or a group on every repaint while the panel is hovered, and checked each key with a scan of every swatch name. With 2,000 swatches in 20 groups and every swatch and group selected, one run compared about two million names. Every craft-libs rev moves from 4c330f6bd1 to dbc6b20e78, which reads the swatch names once per run and stops when it has found every selected name. Delete events and the footer's Delete answer the first lookup of a swatch or a group name with a scan and later lookups of that kind from a map of the names. Cargo.lock changes only the craft-libs source lines. --- Cargo.lock | 182 ++++++++++++++++---------------- Cargo.toml | 82 +++++++------- apps/vectorcraft-web/Cargo.toml | 2 +- xtask/src/pdf_deps.rs | 2 +- 4 files changed, 134 insertions(+), 134 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b878d75456..e99a0ac16f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1256,7 +1256,7 @@ dependencies = [ [[package]] name = "craft" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-automation", "craft-behavior", @@ -1298,7 +1298,7 @@ dependencies = [ [[package]] name = "craft-affinity" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "crc32fast", "flate2", @@ -1319,7 +1319,7 @@ dependencies = [ [[package]] name = "craft-appkit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "block2 0.6.2", "objc2 0.6.5", @@ -1331,7 +1331,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "rustix 1.1.6", ] @@ -1339,7 +1339,7 @@ dependencies = [ [[package]] name = "craft-automation" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "base64 0.23.1", "craft-behavior", @@ -1364,7 +1364,7 @@ dependencies = [ [[package]] name = "craft-behavior" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1383,7 +1383,7 @@ dependencies = [ [[package]] name = "craft-browse" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-behavior", "craft-docpath", @@ -1401,7 +1401,7 @@ dependencies = [ [[package]] name = "craft-cdr" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "crc32fast", "flate2", @@ -1410,7 +1410,7 @@ dependencies = [ [[package]] name = "craft-cloud-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "egui", ] @@ -1418,7 +1418,7 @@ dependencies = [ [[package]] name = "craft-cms" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "md-5", "rayon", @@ -1427,12 +1427,12 @@ dependencies = [ [[package]] name = "craft-codepage" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" [[package]] name = "craft-color-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-behavior", "craft-cms", @@ -1452,7 +1452,7 @@ dependencies = [ [[package]] name = "craft-control" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-ai-agents", "craft-atomic", @@ -1468,7 +1468,7 @@ dependencies = [ [[package]] name = "craft-control-protocol" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "getrandom 0.3.4", "serde_json", @@ -1478,7 +1478,7 @@ dependencies = [ [[package]] name = "craft-dds" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "rayon", ] @@ -1486,7 +1486,7 @@ dependencies = [ [[package]] name = "craft-dialogs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "block2 0.6.2", "craft-appkit", @@ -1512,7 +1512,7 @@ dependencies = [ [[package]] name = "craft-doc" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "blake3", "craft-ecproj-format", @@ -1528,7 +1528,7 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "serde", ] @@ -1536,7 +1536,7 @@ dependencies = [ [[package]] name = "craft-draw" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-behavior", "craft-color-ui", @@ -1555,7 +1555,7 @@ dependencies = [ [[package]] name = "craft-dwg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "acadrust", "craft-dxf", @@ -1565,7 +1565,7 @@ dependencies = [ [[package]] name = "craft-dxf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-codepage", "encoding_rs", @@ -1577,7 +1577,7 @@ dependencies = [ [[package]] name = "craft-ecproj-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "serde", "serde_json", @@ -1587,12 +1587,12 @@ dependencies = [ [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" [[package]] name = "craft-flags" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-atomic", "dirs", @@ -1602,7 +1602,7 @@ dependencies = [ [[package]] name = "craft-font-catalog" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "fontique", "harfrust 0.13.3", @@ -1617,7 +1617,7 @@ dependencies = [ [[package]] name = "craft-font-manager" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-behavior", "craft-font-catalog", @@ -1636,7 +1636,7 @@ dependencies = [ [[package]] name = "craft-font-os-windows" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "windows-registry", "windows-sys 0.61.2", @@ -1645,7 +1645,7 @@ dependencies = [ [[package]] name = "craft-font-store" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "cap-primitives", "craft-atomic", @@ -1668,12 +1668,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" [[package]] name = "craft-gif" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "gif", ] @@ -1681,7 +1681,7 @@ dependencies = [ [[package]] name = "craft-gzip" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "flate2", ] @@ -1689,7 +1689,7 @@ dependencies = [ [[package]] name = "craft-host" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1702,7 +1702,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "brotli 9.1.3", "brotli-decompressor 6.3.2", @@ -1732,7 +1732,7 @@ dependencies = [ [[package]] name = "craft-image-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-dds", "craft-jpeg", @@ -1759,7 +1759,7 @@ dependencies = [ [[package]] name = "craft-imaging" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-behavior", "craft-color-ui", @@ -1777,7 +1777,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "thiserror 2.0.21", ] @@ -1785,7 +1785,7 @@ dependencies = [ [[package]] name = "craft-jxl" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "brotli-decompressor 5.0.3", "jixel", @@ -1796,7 +1796,7 @@ dependencies = [ [[package]] name = "craft-keymap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-host", "craft-i18n", @@ -1811,7 +1811,7 @@ dependencies = [ [[package]] name = "craft-layers" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-behavior", "craft-i18n", @@ -1825,7 +1825,7 @@ dependencies = [ [[package]] name = "craft-menu" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-behavior", "craft-host", @@ -1843,7 +1843,7 @@ dependencies = [ [[package]] name = "craft-metadata" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "brotli-decompressor 6.3.2", "chrono", @@ -1855,7 +1855,7 @@ dependencies = [ [[package]] name = "craft-metafile" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "encoding_rs", "image", @@ -1866,7 +1866,7 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "chrono", "craft-codepage", @@ -1876,7 +1876,7 @@ dependencies = [ [[package]] name = "craft-nightly" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "uds_windows", "winsafe", @@ -1885,7 +1885,7 @@ dependencies = [ [[package]] name = "craft-pages" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-behavior", "craft-keymap", @@ -1901,7 +1901,7 @@ dependencies = [ [[package]] name = "craft-pbr" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-texture", "thiserror 2.0.21", @@ -1910,7 +1910,7 @@ dependencies = [ [[package]] name = "craft-pcraft-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "flate2", "serde", @@ -1921,7 +1921,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "hayro-interpret", "hayro-syntax", @@ -1933,7 +1933,7 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "async-channel", "async-io", @@ -1966,7 +1966,7 @@ dependencies = [ [[package]] name = "craft-plotter" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "kurbo 0.13.1", "thiserror 2.0.21", @@ -1975,7 +1975,7 @@ dependencies = [ [[package]] name = "craft-print" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-behavior", "craft-host", @@ -1999,7 +1999,7 @@ dependencies = [ [[package]] name = "craft-proof" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "log", "miniz_oxide 0.9.1", @@ -2010,7 +2010,7 @@ dependencies = [ [[package]] name = "craft-ps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-eps", "flate2", @@ -2024,7 +2024,7 @@ dependencies = [ [[package]] name = "craft-psd" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "encoding_rs", "flate2", @@ -2035,7 +2035,7 @@ dependencies = [ [[package]] name = "craft-quit" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "dispatch2", "egui", @@ -2048,7 +2048,7 @@ dependencies = [ [[package]] name = "craft-raster3d" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "rayon", "thiserror 2.0.21", @@ -2057,7 +2057,7 @@ dependencies = [ [[package]] name = "craft-review" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "base64 0.23.1", "craft-behavior", @@ -2076,7 +2076,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-atomic", "craft-host", @@ -2093,7 +2093,7 @@ dependencies = [ [[package]] name = "craft-stream-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "fax", "hayro-ccitt", @@ -2104,7 +2104,7 @@ dependencies = [ [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-image-codecs", "craft-xml", @@ -2125,7 +2125,7 @@ dependencies = [ [[package]] name = "craft-table" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-behavior", "craft-keymap", @@ -2137,7 +2137,7 @@ dependencies = [ [[package]] name = "craft-text" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-behavior", "craft-font-manager", @@ -2162,7 +2162,7 @@ dependencies = [ [[package]] name = "craft-texture" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "thiserror 2.0.21", ] @@ -2170,7 +2170,7 @@ dependencies = [ [[package]] name = "craft-theme" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -2185,7 +2185,7 @@ dependencies = [ [[package]] name = "craft-theme-store" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-atomic", "craft-behavior", @@ -2200,7 +2200,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "serde", "thiserror 2.0.21", @@ -2210,7 +2210,7 @@ dependencies = [ [[package]] name = "craft-time" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "serde", "thiserror 2.0.21", @@ -2219,7 +2219,7 @@ dependencies = [ [[package]] name = "craft-timeline" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-behavior", "craft-keymap", @@ -2234,12 +2234,12 @@ dependencies = [ [[package]] name = "craft-tracked" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -2253,7 +2253,7 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-behavior", "craft-font-catalog", @@ -2270,7 +2270,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "accesskit", "craft-behavior", @@ -2308,7 +2308,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2319,7 +2319,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-behavior", "craft-host", @@ -2337,7 +2337,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-behavior", "craft-host", @@ -2358,7 +2358,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-behavior", "craft-host", @@ -2379,7 +2379,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-behavior", "craft-host", @@ -2398,7 +2398,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "base64 0.22.1", "chrono", @@ -2430,7 +2430,7 @@ dependencies = [ [[package]] name = "craft-vectorcraft-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "flate2", "serde", @@ -2441,7 +2441,7 @@ dependencies = [ [[package]] name = "craft-wayland" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "raw-window-handle", "wayland-backend", @@ -2451,7 +2451,7 @@ dependencies = [ [[package]] name = "craft-web-api" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "js-sys", "serde_json", @@ -2462,7 +2462,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "winsafe", ] @@ -2470,7 +2470,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "craft-appkit", "craft-atomic", @@ -2502,7 +2502,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "quick-xml 0.41.0", "serde", @@ -3862,7 +3862,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" [[package]] name = "hayro-cmap" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "brotli 8.0.4", "hayro-postscript", @@ -3871,7 +3871,7 @@ dependencies = [ [[package]] name = "hayro-interpret" version = "0.7.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "bitflags 2.13.2", "hayro-cmap", @@ -3889,7 +3889,7 @@ dependencies = [ [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "fearless_simd", "hayro-ccitt", @@ -3907,12 +3907,12 @@ dependencies = [ [[package]] name = "hayro-postscript" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "flate2", "hayro-ccitt", @@ -4895,7 +4895,7 @@ dependencies = [ [[package]] name = "krilla" version = "0.8.2" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "base64 0.22.1", "bumpalo", @@ -5052,7 +5052,7 @@ checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" [[package]] name = "linesweeper" version = "0.5.0" -source = "git+https://github.com/storytold/craft-libs?rev=4c330f6bd1f38dd536f830483ea9618db2cb2bd8#4c330f6bd1f38dd536f830483ea9618db2cb2bd8" +source = "git+https://github.com/storytold/craft-libs?rev=dbc6b20e78327f702371fcfc7887fc099fbedee8#dbc6b20e78327f702371fcfc7887fc099fbedee8" dependencies = [ "arrayvec", "kurbo 0.13.1", diff --git a/Cargo.toml b/Cargo.toml index a48e3c1330..494a5ca085 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,57 +10,57 @@ license = "MIT OR Apache-2.0" rust-version = "1.95" [workspace.dependencies] -craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } -craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8", default-features = false, features = ["interpret", "write"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } -craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } +craft-cms = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } +craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8", default-features = false, features = ["interpret", "write"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } +craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } # Language packs: the Craft apps' shared font store installs them (#4936). -craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } -craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } +craft-font-store = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } +craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } # The `.vectorcraft` envelope: its members, version, embedded images and the data after the JSON. -craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } -craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } +craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } +craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } # `.pcraft` documents: their manifest, full-size composite, preview, layer pixels and ICC profile. -craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8", features = ["pcraft-pixels"] } +craft-doc = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8", features = ["pcraft-pixels"] } # Native Affinity documents (craft-libs#914). -craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } +craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } # Bounded CDR (v1-v27) and CMX (32-bit) reader (craft-libs#778). -craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } +craft-cdr = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } # SVG parsing, limits, SVGZ and writer (craft-libs#778). -craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8", features = ["tree"] } -craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } +craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8", features = ["tree"] } +craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } # EPS container, previews, ASCII85 and DSC comments (craft-libs#778). -craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } +craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } # DXF tags, reader and writer (craft-libs#778, #926, #927). -craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } -craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } +craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } +craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } # DWG to DXF bytes, in a child process on desktop builds (acadrust 0.6.6, MPL-2.0, unmodified). -craft-dwg = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } +craft-dwg = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } # WMF, EMF and EMF+ reader (craft-libs#778). -craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } -craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } -craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } -craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } -craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } -craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8", default-features = false, features = ["read", "write"] } -craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } -craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } -craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } -craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } +craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } +craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } +craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } +craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } +craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } +craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8", default-features = false, features = ["read", "write"] } +craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } +craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } +craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } +craft-codepage = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } # The metallic-roughness BRDF and environment light the 3D effects' Roughness and Metallic shade with. -craft-pbr = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } +craft-pbr = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } # The CPU rasterizer that draws a 3D effect's Render Settings › Rendered image: depth-buffered triangles, shadow maps. -craft-raster3d = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } +craft-raster3d = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } # The framework facade (`craft::ui`, `craft::settings`, `craft::platform`, ...). No default features: each crate names # the members it imports. -craft = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } +craft = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } # Below the egui layer, so not through the facade: the colour harmony rules and their settings (craft-color-ui # without its `ui` feature), the colour type they work in, and the craft-fonts tables the text crate's build writes. -craft-color-ui = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } -craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } -craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } +craft-color-ui = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } +craft-theme = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } +craft-fonts-build = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } # Nightly profile isolation, launch protocol, and security fence. -craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } +craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } # internal vectorcraft-geom = { path = "crates/geom" } vectorcraft-color = { path = "crates/color" } @@ -200,13 +200,13 @@ lto = "thin" codegen-units = 1 [patch.crates-io] -hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } -hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } -hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } -hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } -hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } -krilla = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } -linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8" } +hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } +hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } +hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } +hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } +hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } +krilla = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } +linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8" } # skrifa 0.44 (epaint, glifo, usvg) with the automatic hinter's long blue-zone exit (craft-libs vendor/skrifa). # It stays at this rev until craft-libs#5222 merges. skrifa = { git = "https://github.com/storytold/craft-libs", rev = "37d0532f42eb3421769c8a454e3e25a20fbcff97" } diff --git a/apps/vectorcraft-web/Cargo.toml b/apps/vectorcraft-web/Cargo.toml index 4db9a1dac2..580355f80e 100644 --- a/apps/vectorcraft-web/Cargo.toml +++ b/apps/vectorcraft-web/Cargo.toml @@ -28,7 +28,7 @@ egui_extras = { workspace = true } # `wgpu` pulls egui-wgpu's defaults: WebGPU plus the WebGL2 fallback. eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit"] } # The page command API (storytold/craft-libs#413): the request plumbing behind window.vectorcraft. -craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8", version = "0.1.0" } +craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "dbc6b20e78327f702371fcfc7887fc099fbedee8", version = "0.1.0" } wasm-bindgen = "0.2" serde_json = { workspace = true } diff --git a/xtask/src/pdf_deps.rs b/xtask/src/pdf_deps.rs index 04cf313ca0..72a17d1408 100644 --- a/xtask/src/pdf_deps.rs +++ b/xtask/src/pdf_deps.rs @@ -5,7 +5,7 @@ use std::process::Command; use serde_json::Value; -const REV: &str = "4c330f6bd1f38dd536f830483ea9618db2cb2bd8"; +const REV: &str = "dbc6b20e78327f702371fcfc7887fc099fbedee8"; const PACKAGES: &[(&str, &str, &str)] = &[ ("craft-pdf", "0.1.0", REV), ("krilla", "0.8.2", REV), From 65702eb1fead247791efe82d3adeeef8da69a48d Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 4 Dec 2026 17:54:34 -0800 Subject: [PATCH 11/62] Transform: an unfinished live shape value stays with the shape it was typed for The live shape fields in the Transform and Properties panels and the Contextual Task Bar (a rectangle's, polygon's or ellipse's Angle, a polygon's Sides, Radius and Side Length, a star's Points and Ratio, an ellipse's Pie Start and End Angle, and a line's Line Length and Line Angle) kept a typed but unfinished value when another shape was selected. If the new shape showed the same value, the field went on showing the old text, and the next Enter applied it to the new shape: "3+" typed for one rectangle, then "7" and Enter after selecting another, turned the second one 10 degrees. Each field now passes NumberField::edit_target the active document, its File > Revert count, its Undo and Redo restore count, its rollback count and the selected objects, which object.setLiveShape changes. A change of any of them drops the unfinished value and the field shows the new shape's value. An edit that leaves the selection as it is keeps the value typed so far. The target is hashed once per document revision and kept in CanvasCache::shape_edit_target, as the shared angle beside it is. DocState::rollbacks counts the other ways an older document snapshot and its node ID counter come back, after which a new shape can take the node ID of the shape a value was typed for: - a canceled undo group, or a canceled undo scope that changed the document; - canceling an interaction whose preview changed the document; - Exit Symbol Editing Mode with nothing changed, which takes back the entering step; - a plug-in run made away from the session that ends without applying after its calls changed the document; - a preview that discards an earlier preview that allocated node IDs, or that fails after discarding an earlier preview's change. The count goes to the document whose preview was discarded, also when the preview activates another document; - a command run during a tool interaction that sets aside a preview that allocated node IDs. history_restores still advances only on Undo and Redo. --- crates/engine/src/cmd/plugin_call.rs | 10 +- crates/engine/src/cmd/symboledit.rs | 1 + crates/engine/src/doc_state.rs | 12 + crates/engine/src/session/edit.rs | 17 +- crates/engine/src/session/undo.rs | 5 + crates/engine/src/tests/journal.rs | 201 ++++++++++ crates/engine/src/tests/plugins.rs | 47 +++ crates/ui-egui/src/app.rs | 1 + crates/ui-egui/src/caches.rs | 2 + crates/ui-egui/src/panels/transform/shape.rs | 106 +++-- .../src/panels/transform/shape/tests.rs | 369 ++++++++++++++++++ 11 files changed, 741 insertions(+), 30 deletions(-) create mode 100644 crates/ui-egui/src/panels/transform/shape/tests.rs diff --git a/crates/engine/src/cmd/plugin_call.rs b/crates/engine/src/cmd/plugin_call.rs index 3ab02a0719..ab74e4baf7 100644 --- a/crates/engine/src/cmd/plugin_call.rs +++ b/crates/engine/src/cmd/plugin_call.rs @@ -608,13 +608,21 @@ impl Transaction { for st in &mut s.docs { // Past the newest revision the document reached, so the restored one redraws. A // document the transaction left as it was keeps its revision, so a run made - // away from the session on it still applies. + // away from the session on it still applies. Putting back an older snapshot, or + // reopening a document the calls closed, counts as a rollback: an object the calls + // made can lose its node ID to a new one. The count never goes below the highest + // one the document reached. let reached: Vec<_> = open.iter().filter(|d| d.uid == st.uid).collect(); let unchanged = !reached.is_empty() && reached.iter().all(|d| d.revision == st.revision && d.selection == st.selection); if !unchanged { let newest = reached.iter().map(|d| d.revision).max().unwrap_or(st.revision); st.revision = newest.max(st.revision).saturating_add(1); } + let rollbacks = reached.iter().map(|d| d.rollbacks).max().unwrap_or(st.rollbacks); + st.rollbacks = rollbacks.max(st.rollbacks); + if reached.is_empty() || reached.iter().any(|d| !Arc::ptr_eq(&d.doc, &st.doc)) { + st.rollbacks = st.rollbacks.saturating_add(1); + } crate::deselect_hidden(&s.menu, &st.doc, &mut st.selection); } s.active = active; diff --git a/crates/engine/src/cmd/symboledit.rs b/crates/engine/src/cmd/symboledit.rs index 3b5d7cdf48..6b7e314353 100644 --- a/crates/engine/src/cmd/symboledit.rs +++ b/crates/engine/src/cmd/symboledit.rs @@ -231,6 +231,7 @@ pub(crate) fn leave(s: &mut Session, _: &Value) -> Result { st.selection.prune(&st.doc); st.history.redo = Arc::unwrap_or_clone(redo); st.revision += 1; + st.rollbacks += 1; } else { s.edit("Exit Symbol Editing Mode", |d, sel| { finish(d, sel); diff --git a/crates/engine/src/doc_state.rs b/crates/engine/src/doc_state.rs index 501cb6cd53..8dc15f5aac 100644 --- a/crates/engine/src/doc_state.rs +++ b/crates/engine/src/doc_state.rs @@ -121,6 +121,14 @@ pub struct DocState { /// Advances when Undo or Redo restores an older document snapshot. The same node ID can name different objects /// across that boundary. pub history_restores: u64, + /// Advances when a canceled undo group, undo scope or interaction, or Exit Symbol Editing Mode taking + /// back the entering step, puts back an older document snapshot. A canceled plug-in run advances it + /// when its calls changed the document. A preview advances it when it discards an earlier preview + /// that allocated node IDs, or fails after discarding an earlier preview's document change. + /// A command run during a tool interaction advances it when it sets aside a preview that allocated + /// node IDs. + /// The same node ID can name different objects across that boundary. + pub rollbacks: u64, /// Preferences › User Interface › Open Documents As Tabs when the document opened: cleared, /// the UI opens it in a floating window of its own. pub opened_as_tab: bool, @@ -556,6 +564,7 @@ impl DocState { activated: 0, reverts: 0, history_restores: 0, + rollbacks: 0, opened_as_tab: true, mask_view: None, spelling_ignored: Default::default(), @@ -812,6 +821,9 @@ impl DocState { /// End the interaction in progress, undoing what it changed. pub(crate) fn undo_interaction(&mut self) { if let Some(it) = self.interaction.take() { + if !Arc::ptr_eq(&self.doc, &it.doc) { + self.rollbacks += 1; + } self.doc = it.doc; self.selection = Arc::unwrap_or_clone(it.selection); self.sync_new_art(); diff --git a/crates/engine/src/session/edit.rs b/crates/engine/src/session/edit.rs index 604ca822df..2865a74dce 100644 --- a/crates/engine/src/session/edit.rs +++ b/crates/engine/src/session/edit.rs @@ -366,6 +366,9 @@ impl Session { let previewed = !Arc::ptr_eq(&st.doc, &interaction.doc) || st.selection != *interaction.selection; let shown = previewed.then(|| (st.doc.clone(), st.selection.clone())); if previewed { + if st.doc.peek_next_id() > interaction.doc.peek_next_id() { + st.rollbacks += 1; + } st.doc = interaction.doc.clone(); st.selection.clone_from(&interaction.selection); st.revision += 1; @@ -609,7 +612,7 @@ impl Session { // `defaultsOnly: true`, and one after it. let tool_paints = self.tool_paints(false) || self.tool_paints(true); let new_art_basic = self.prefs.new_art_basic; - let (paint, restore_paint, inherited, last_preview_paint) = { + let (paint, restore_paint, inherited, last_preview_paint, discarded_uid, freed_ids, discarded) = { let menu = self.menu.clone(); let st = self.doc_mut()?; let Some(it) = &mut st.interaction else { return Err(EngineError::Other("no interaction in progress".into())) }; @@ -620,6 +623,8 @@ impl Session { st.revision += 1; } let undone = std::mem::replace(&mut st.doc, it.doc.clone()); + let freed_ids = undone.peek_next_id() > it.doc.peek_next_id(); + let discarded = !Arc::ptr_eq(&undone, &it.doc); let isolation = it.isolation; // A batch, or a preview that changed the new-art paints (a pattern rename), started from // the paints the interaction began with. @@ -653,7 +658,7 @@ impl Session { // undone with it. st.restore_isolation(isolation, &undone); cmd::globaledit::follow_history(st); - (paint, restore_paint, inherited, last_preview_paint) + (paint, restore_paint, inherited, last_preview_paint, st.uid, freed_ids, discarded) }; // The paints before the previews that build on each other: a preview that starts from the // interaction's paints (or from the inherited ones) starts a new run of them. A field that @@ -699,6 +704,14 @@ impl Session { } let after_paint = r.is_ok().then(|| (base, self.paint.clone())); let after_item = self.active_appearance_item.clone(); + // A preview advances rollbacks when it discards an earlier preview that allocated node IDs, or + // fails after discarding an earlier preview's document change, even when the command activates + // another document. + if let Some(st) = self.docs.iter_mut().find(|d| d.uid == discarded_uid) + && (freed_ids || (r.is_err() && discarded)) + { + st.rollbacks += 1; + } let st = self.doc_mut()?; if let Some(it) = &mut st.interaction { it.active_appearance_item = diff --git a/crates/engine/src/session/undo.rs b/crates/engine/src/session/undo.rs index bf7b0bf6f7..d51c5ad7d6 100644 --- a/crates/engine/src/session/undo.rs +++ b/crates/engine/src/session/undo.rs @@ -124,6 +124,7 @@ impl Session { cmd::globaledit::follow_history(st); st.drop_stale_variables_highlight(); st.revision += 1; + st.rollbacks += 1; // The journal drops only the canceled groups' own entries and keeps the ones made in other documents meanwhile. journal.extend(g.journal); steps.extend(g.steps); @@ -273,6 +274,7 @@ impl Session { } Some(_) => return, } + let changed = !Arc::ptr_eq(&st.doc, &doc); let undone = std::mem::replace(&mut st.doc, doc); st.selection = selection; st.restore_isolation(scope.isolation, &undone); @@ -281,6 +283,9 @@ impl Session { deselect_hidden(&menu, &st.doc, &mut st.selection); st.history.recost_last(&st.doc); st.revision += 1; + if changed { + st.rollbacks += 1; + } if colors_changed { self.paint = scope.paint; } diff --git a/crates/engine/src/tests/journal.rs b/crates/engine/src/tests/journal.rs index 35f86fa582..1be7fb69b2 100644 --- a/crates/engine/src/tests/journal.rs +++ b/crates/engine/src/tests/journal.rs @@ -829,6 +829,172 @@ fn canceling_undo_groups_in_two_documents_drops_the_edits_of_both_from_the_journ assert_eq!(ids.last(), Some(&"edit.undoGroup.end")); } +/// A canceled undo group puts back an older snapshot, after which a new object can take a removed object's ID, so +/// it advances `rollbacks`; a group that ends without cancel leaves it as it is. Neither changes `history_restores`. +#[test] +fn undo_group_cancellation_advances_rollbacks_only_when_restoring() { + let mut s = Session::new(); + s.execute("file.new", &json!({"width": 400, "height": 300})).unwrap(); + for cancel in [true, false] { + let restores = s.doc().unwrap().history_restores; + let rollbacks = s.doc().unwrap().rollbacks; + let before = s.doc().unwrap().doc.node_count(); + s.execute("edit.undoGroup.begin", &json!({})).unwrap(); + s.execute("shape.rectangle", &rect_step(10)["params"]).unwrap(); + assert!(s.doc().unwrap().doc.node_count() > before); + s.execute("edit.undoGroup.end", &json!({"cancel": cancel})).unwrap(); + assert_eq!(s.doc().unwrap().history_restores, restores); + if cancel { + assert!(s.doc().unwrap().rollbacks > rollbacks, "a canceled group advances the rollback count"); + assert_eq!(s.doc().unwrap().doc.node_count(), before); + } else { + assert_eq!(s.doc().unwrap().rollbacks, rollbacks); + assert!(s.doc().unwrap().doc.node_count() > before); + } + } +} + +/// Exit Symbol Editing Mode with nothing changed takes back the entering step, which puts back an older snapshot, so +/// it advances `rollbacks`; leaving after an edit adds a step and leaves it as it is. +#[test] +fn leaving_symbol_editing_advances_rollbacks_only_when_taking_back_the_entering_step() { + let mut s = Session::new(); + s.execute("file.new", &json!({"width": 400, "height": 300})).unwrap(); + s.execute("shape.rectangle", &rect_step(10)["params"]).unwrap(); + s.execute("symbol.new", &json!({"name": "Box"})).unwrap(); + for edited in [false, true] { + let rollbacks = s.doc().unwrap().rollbacks; + s.execute("symbol.edit", &json!({})).unwrap(); + if edited { + s.execute("object.move", &json!({"dx": 5, "dy": 0})).unwrap(); + } + s.execute("symbol.exitEditing", &json!({})).unwrap(); + if edited { + assert_eq!(s.doc().unwrap().rollbacks, rollbacks, "leaving after an edit keeps the rollback count"); + } else { + assert!(s.doc().unwrap().rollbacks > rollbacks, "taking back the entering step advances the rollback count"); + } + } +} + +/// Canceling an interaction whose preview changed the document advances `rollbacks`; canceling one that changed +/// nothing leaves it as it is. +#[test] +fn interaction_cancellation_advances_rollbacks_only_when_restoring() { + let mut s = Session::new(); + s.execute("file.new", &json!({"width": 400, "height": 300})).unwrap(); + for previewed in [true, false] { + let rollbacks = s.doc().unwrap().rollbacks; + s.begin_interaction("Rectangle").unwrap(); + if previewed { + s.preview("shape.rectangle", &rect_step(10)["params"]).unwrap(); + } + s.cancel_interaction().unwrap(); + if previewed { + assert!(s.doc().unwrap().rollbacks > rollbacks, "a canceled preview advances the rollback count"); + } else { + assert_eq!(s.doc().unwrap().rollbacks, rollbacks, "a cancel with no preview keeps the rollback count"); + } + } +} + +/// A preview advances `rollbacks` when it discards earlier art and frees its node IDs, whether it +/// succeeds or fails. A failed preview also advances it when it discards an earlier document change +/// without freeing IDs. A successful preview that draws the earlier art again also advances the count. +#[test] +fn a_preview_that_discards_earlier_art_and_frees_its_ids_advances_rollbacks() { + let mut s = Session::new(); + s.execute("file.new", &json!({"width": 400, "height": 300})).unwrap(); + let rollbacks = s.doc().unwrap().rollbacks; + s.begin_interaction("Rectangle").unwrap(); + s.preview("shape.rectangle", &rect_step(10)["params"]).unwrap(); + assert!(s.preview("unknown.command", &json!({})).is_err(), "an unknown preview command returns an error"); + assert!(s.doc().unwrap().rollbacks > rollbacks, "a failed preview after a drawn preview advances the rollback count"); + s.cancel_interaction().unwrap(); + let rollbacks = s.doc().unwrap().rollbacks; + s.begin_interaction("Rectangle").unwrap(); + assert!(s.preview("unknown.command", &json!({})).is_err(), "an unknown preview command returns an error"); + assert_eq!(s.doc().unwrap().rollbacks, rollbacks, "a failed preview with nothing previewed keeps the rollback count"); + s.cancel_interaction().unwrap(); + let rollbacks = s.doc().unwrap().rollbacks; + s.begin_interaction("Rectangle").unwrap(); + s.preview("shape.rectangle", &rect_step(10)["params"]).unwrap(); + s.preview("shape.rectangle", &rect_step(30)["params"]).unwrap(); + assert_eq!(s.doc().unwrap().rollbacks, rollbacks + 1, "a preview that replaces earlier drawn art advances the rollback count"); + s.cancel_interaction().unwrap(); + let rollbacks = s.doc().unwrap().rollbacks; + let starting_doc = s.doc().unwrap().doc.clone(); + s.begin_interaction("Rectangle").unwrap(); + s.preview("shape.rectangle", &rect_step(10)["params"]).unwrap(); + s.preview("select.set", &json!({"ids": []})).unwrap(); + assert!(std::sync::Arc::ptr_eq(&s.doc().unwrap().doc, &starting_doc), "a selection-only preview leaves the starting document Arc"); + assert_eq!( + s.doc().unwrap().rollbacks, + rollbacks + 1, + "a preview that leaves the starting document after a drawn preview advances the rollback count" + ); + s.cancel_interaction().unwrap(); + let kept = s.execute("shape.rectangle", &rect_step(5)["params"]).unwrap()["id"].clone(); + let rollbacks = s.doc().unwrap().rollbacks; + let starting_doc = s.doc().unwrap().doc.clone(); + s.begin_interaction("Rectangle").unwrap(); + s.preview("shape.rectangle", &rect_step(10)["params"]).unwrap(); + let steps = json!({"commands": [ + {"command": "select.set", "params": {"ids": [kept]}}, + {"command": "object.move", "params": {"dx": 5, "dy": 0}} + ]}); + s.preview("command.batch", &steps).unwrap(); + assert!(!std::sync::Arc::ptr_eq(&s.doc().unwrap().doc, &starting_doc), "the move changes the document"); + assert_eq!(s.doc().unwrap().rollbacks, rollbacks + 1, "a preview that moves art instead of drawing it advances the rollback count"); + s.cancel_interaction().unwrap(); +} + +/// A command run during a tool interaction sets the preview aside and can reuse the node IDs the +/// preview allocated, so it advances `rollbacks`; with no IDs allocated by the preview it does not. +#[test] +fn a_command_outside_a_tool_interaction_advances_rollbacks_only_when_the_preview_allocated_ids() { + let mut s = Session::new(); + s.execute("file.new", &json!({"width": 400, "height": 300})).unwrap(); + s.begin_interaction("Rectangle").unwrap(); + // A tool interaction routes the command through outside_interaction. + s.active_mut().unwrap().interaction.as_mut().unwrap().tool = true; + let preview_id = s.preview("shape.rectangle", &rect_step(10)["params"]).unwrap()["id"].clone(); + let rollbacks = s.doc().unwrap().rollbacks; + let command_id = s.execute("shape.rectangle", &rect_step(30)["params"]).unwrap()["id"].clone(); + assert_eq!(command_id, preview_id, "a command outside a tool interaction reuses the rectangle preview's node ID"); + assert_eq!(s.doc().unwrap().rollbacks, rollbacks + 1, "setting aside a preview that allocated IDs advances the rollback count"); + s.cancel_interaction().unwrap(); + + for previewed in [true, false] { + s.begin_interaction("Rectangle").unwrap(); + s.active_mut().unwrap().interaction.as_mut().unwrap().tool = true; + if previewed { + s.preview("select.none", &json!({})).unwrap(); + } + let rollbacks = s.doc().unwrap().rollbacks; + s.execute("shape.rectangle", &rect_step(50)["params"]).unwrap(); + assert_eq!(s.doc().unwrap().rollbacks, rollbacks, "a command with no preview IDs keeps the rollback count, previewed: {previewed}"); + s.cancel_interaction().unwrap(); + } +} + +/// A preview that activates another document advances rollbacks in the document whose art it discards. +#[test] +fn a_preview_that_activates_another_document_advances_only_the_source_rollbacks() { + let mut s = Session::new(); + s.execute("file.new", &json!({"width": 400, "height": 300})).unwrap(); + s.execute("file.new", &json!({"width": 400, "height": 300})).unwrap(); + s.execute("document.activate", &json!({"index": 0})).unwrap(); + let source_rollbacks = s.documents()[0].rollbacks; + let destination_rollbacks = s.documents()[1].rollbacks; + s.begin_interaction("Rectangle").unwrap(); + s.preview("shape.rectangle", &rect_step(10)["params"]).unwrap(); + s.preview("document.activate", &json!({"index": 1})).unwrap(); + assert_eq!(s.active_index(), Some(1), "the activation preview makes the destination document active"); + assert!(s.documents()[0].rollbacks > source_rollbacks, "discarding the rectangle preview advances the source document's rollback count"); + assert_eq!(s.documents()[1].rollbacks, destination_rollbacks, "the activation preview keeps the destination document's rollback count unchanged"); +} + /// A cancel drops only the canceled groups' own entries from the journal: an edit made in another /// document while a group was open stays in that document and in the journal. #[test] @@ -1283,6 +1449,41 @@ fn an_undo_scope_in_an_open_group_takes_back_only_its_own_edits() { assert_eq!(objects(&s), 0, "one undo takes back the group's edits"); } +/// A canceled undo scope that joined an open group advances `rollbacks` only when it restores an older snapshot; +/// a scope that makes no edit or ends without cancel leaves it as it is. Neither changes `history_restores`. +#[test] +fn joined_undo_scope_cancellation_advances_rollbacks_only_when_restoring() { + let mut s = Session::new(); + s.execute("file.new", &json!({"width": 400, "height": 300})).unwrap(); + s.begin_undo_group(); + for cancel in [true, false] { + let restores = s.doc().unwrap().history_restores; + let rollbacks = s.doc().unwrap().rollbacks; + let before = s.doc().unwrap().doc.node_count(); + let scope = s.begin_undo_scope().unwrap(); + s.execute("shape.rectangle", &rect_step(10)["params"]).unwrap(); + assert!(s.doc().unwrap().doc.node_count() > before); + s.end_undo_scope(scope, cancel); + assert_eq!(s.doc().unwrap().history_restores, restores); + if cancel { + assert!(s.doc().unwrap().rollbacks > rollbacks, "a canceled scope advances the rollback count"); + assert_eq!(s.doc().unwrap().doc.node_count(), before); + } else { + assert_eq!(s.doc().unwrap().rollbacks, rollbacks); + assert!(s.doc().unwrap().doc.node_count() > before); + } + assert!(s.doc().unwrap().undo_group.is_some()); + } + s.execute("shape.rectangle", &rect_step(10)["params"]).unwrap(); + let restores = s.doc().unwrap().history_restores; + let rollbacks = s.doc().unwrap().rollbacks; + let scope = s.begin_undo_scope().unwrap(); + s.end_undo_scope(scope, true); + assert_eq!(s.doc().unwrap().rollbacks, rollbacks, "canceling a scope with no edits preserves the rollback count"); + assert_eq!(s.doc().unwrap().history_restores, restores); + s.end_undo_group(false); +} + /// A canceled undo scope that joined an open group forgets the journal entries it cut: when a command /// in another document takes the same entry number, a later cancel of the group keeps that entry, and /// the journal replays to the same documents. diff --git a/crates/engine/src/tests/plugins.rs b/crates/engine/src/tests/plugins.rs index 42728c7fa6..1652b2ea4e 100644 --- a/crates/engine/src/tests/plugins.rs +++ b/crates/engine/src/tests/plugins.rs @@ -8131,6 +8131,19 @@ fn install_select_all_then_remove(s: &mut Session, id: &str) { run(s, "plugin.install", json!({"dataBase64": vectorcraft_format::base64_encode(&wasm), "grant": grant, "replace": true})); } +/// Installs a filter `id` that calls `shape.rectangle` and then returns no objects. +fn install_draw_rectangle_then_remove(s: &mut Session, id: &str) { + let grant = json!(["doc.read", "doc.write", "commands"]); + let manifest = + format!(r#"{{"id":"{id}","name":"Test {id}","kind":"filter","api":2,"permissions":{grant},"commandAllowlist":["shape.rectangle"]}}"#); + let imports = r#"(import "env" "vc_call" (func $vc_call (param i32 i32 i32 i32) (result i32))) + (data (i32.const 0x2000) "shape.rectangle") + (data (i32.const 0x2100) "{\22x\22:0,\22y\22:0,\22width\22:5,\22height\22:5}")"#; + let first = "(drop (call $vc_call (i32.const 0x2000) (i32.const 15) (i32.const 0x2100) (i32.const 34)))"; + let wasm = wat::parse_str(tpl::with_imports(&manifest, imports, first, r#"{"objects":[]}"#)).unwrap(); + run(s, "plugin.install", json!({"dataBase64": vectorcraft_format::base64_encode(&wasm), "grant": grant, "replace": true})); +} + /// Runs the job of a run that [`FilterRun::begin_calls`] started as the web build's plug-in worker /// does, making each command call in `s` → its output. fn run_job_away(s: &mut Session, job: &cmd::plugin::FilterJob) -> Vec { @@ -8201,6 +8214,40 @@ fn a_calling_run_made_away_from_the_session_that_ends_changes_nothing() { run(&mut s, "plugin.remove", json!({"id": id})); } +/// A run made away from the session that ends after its calls changed the document advances `rollbacks`. +/// A run whose calls only changed the selection or that ends before any call keeps the rollback count. +#[test] +fn an_ended_calling_run_advances_rollbacks_only_when_its_calls_changed_the_document() { + use cmd::plugin::FilterRun; + let id = "test.engine.callsawayrollback"; + let draw_id = "test.engine.callsawayrollbackdraw"; + let mut s = session(); + install_select_all_then_remove(&mut s, id); + install_draw_rectangle_then_remove(&mut s, draw_id); + let (a, _) = (rect(&mut s, 10.0, "#ff0000"), rect(&mut s, 40.0, "#00ff00")); + for (plugin_id, called, changed_document) in [(draw_id, true, true), (id, true, false), (id, false, false)] { + run(&mut s, "select.set", json!({"ids": [a.0]})); + let rollbacks = s.doc().unwrap().rollbacks; + let job = FilterRun::begin_calls(&mut s, "plugin.run", &json!({"id": plugin_id})).unwrap(); + let doc = s.doc().unwrap().doc.clone(); + if called { + run_job_away(&mut s, &job); + assert_eq!(!std::sync::Arc::ptr_eq(&doc, &s.doc().unwrap().doc), changed_document, "the calls change only the intended state"); + assert_ne!(s.doc().unwrap().selection.objects, vec![a], "the calls change the selection"); + } + s.end_plugin_calls(); + if changed_document { + assert!(s.doc().unwrap().rollbacks > rollbacks, "an ended run whose calls changed the document advances the rollback count"); + } else if called { + assert_eq!(s.doc().unwrap().rollbacks, rollbacks, "an ended run whose calls only changed the selection keeps the rollback count"); + } else { + assert_eq!(s.doc().unwrap().rollbacks, rollbacks, "an ended run with no calls keeps the rollback count"); + } + } + run(&mut s, "plugin.remove", json!({"id": draw_id})); + run(&mut s, "plugin.remove", json!({"id": id})); +} + /// An output handed in for a run that holds the documents is dropped when that run ends: a later /// run with the same input and params is not given it, and `plugin.run` without its own output is /// refused. diff --git a/crates/ui-egui/src/app.rs b/crates/ui-egui/src/app.rs index 3a9142ba89..06bbd705e3 100644 --- a/crates/ui-egui/src/app.rs +++ b/crates/ui-egui/src/app.rs @@ -180,6 +180,7 @@ impl VectorcraftApp { multi_color: None, global_edit_count: None, shape_angle: None, + shape_edit_target: None, radius_corners: None, selected_rectangles: None, trace_presets: None, diff --git a/crates/ui-egui/src/caches.rs b/crates/ui-egui/src/caches.rs index d7d333402a..058a1099f4 100644 --- a/crates/ui-egui/src/caches.rs +++ b/crates/ui-egui/src/caches.rs @@ -160,6 +160,8 @@ pub struct CanvasCache { pub(crate) global_edit_count: Option<(crate::panels::properties::GlobalEditKey, usize)>, /// The selected live shape's angle, for (document uid, revision, kind of shape). pub shape_angle: Option, + /// The shape-wide edit target, for (document uid, revision). + pub(crate) shape_edit_target: Option<((u64, u64), egui::IdSalt)>, /// The corners a live shape's Corner Radius field sets, as one hash, for (document uid, /// File › Revert count, revision). pub(crate) radius_corners: Option<((u64, u64, u64), u64)>, diff --git a/crates/ui-egui/src/panels/transform/shape.rs b/crates/ui-egui/src/panels/transform/shape.rs index d493cdee9c..89a57e516a 100644 --- a/crates/ui-egui/src/panels/transform/shape.rs +++ b/crates/ui-egui/src/panels/transform/shape.rs @@ -11,7 +11,7 @@ use craft::ui::layout_components::{Row, Stack}; use craft::ui::pickers::Select; use craft::ui::text::{NumberField, link_toggle}; use craft::ui::value_drag::Slider; -use egui::Ui; +use egui::{IdSalt, Ui}; use serde_json::{Value, json}; use vectorcraft_doc::{LiveShape, Node, NodeKind}; use vectorcraft_geom::shapes::CornerKind; @@ -42,14 +42,22 @@ const SIDES_SLIDER: RangeInclusive = 3.0..=20.0; pub(crate) fn live_shape_rows(app: &mut VectorcraftApp, ui: &mut Ui, n: &Node, live: &LiveShape, headed: bool) -> bool { match live { LiveShape::Rectangle { .. } => under_heading(ui, headed.then(|| tl!("Rectangle Properties:")), |ui| { - angle_row(app, ui, live, "rectangleAngle"); + let target = shape_edit_target(app); + angle_row(app, ui, live, "rectangleAngle", target); corner_radius_row(app, ui, n); }), - LiveShape::Polygon { .. } => under_heading(ui, headed.then(|| tl!("Polygon Properties:")), |ui| polygon_rows(app, ui, n, live)), - LiveShape::Star { .. } => under_heading(ui, headed.then(|| tl!("Star Properties:")), |ui| star_rows(app, ui, live)), + LiveShape::Polygon { .. } => under_heading(ui, headed.then(|| tl!("Polygon Properties:")), |ui| { + let target = shape_edit_target(app); + polygon_rows(app, ui, n, live, target); + }), + LiveShape::Star { .. } => under_heading(ui, headed.then(|| tl!("Star Properties:")), |ui| { + let target = shape_edit_target(app); + star_rows(app, ui, live, target); + }), LiveShape::Ellipse { pie, .. } => under_heading(ui, Some(tl!("Ellipse Properties:")), |ui| { - angle_row(app, ui, live, "ellipseAngle"); - pie_rows(app, ui, *pie); + let target = shape_edit_target(app); + angle_row(app, ui, live, "ellipseAngle", target); + pie_rows(app, ui, *pie, target); }), LiveShape::Line { .. } => return line_rows(app, ui, live), _ => return false, @@ -57,6 +65,27 @@ pub(crate) fn live_shape_rows(app: &mut VectorcraftApp, ui: &mut Ui, n: &Node, l true } +/// The edit target of the live shape number fields: the active document, how many times File › Revert replaced its +/// content, how many times Undo or Redo restored an older snapshot, how many times another rollback put one back +/// (`DocState::rollbacks`; after either, the same node ID can name another object), and the selected objects in +/// selection order, which `object.setLiveShape` changes. The first selected object picks the rows, so the same objects +/// in another order can put another property's field in the same place. A field drops a value typed and not yet +/// committed when this changes, even where the newly selected shape shows the same value. Hashed once per (document +/// uid, revision): the panels read it every frame, and Select All can select hundreds of thousands of shapes. The +/// revision is not part of the target, so an edit that leaves the selection as it is keeps the value typed so far. +pub(crate) fn shape_edit_target(app: &mut VectorcraftApp) -> IdSalt { + let Some(st) = app.session.active() else { return IdSalt::new(None::<()>) }; + let key = (st.uid, st.revision); + if let Some((k, target)) = app.canvas.shape_edit_target + && k == key + { + return target; + } + let target = IdSalt::new(Some((st.uid, st.reverts, st.history_restores, st.rollbacks, st.selection.objects.as_slice()))); + app.canvas.shape_edit_target = Some((key, target)); + target +} + /// `rows` under a sub-heading, or bare when there is none. fn under_heading(ui: &mut Ui, heading: Option<&'static str>, mut rows: impl FnMut(&mut Ui)) { match heading { @@ -75,7 +104,16 @@ fn set_live_shape(app: &mut VectorcraftApp, params: Value) { } /// One labelled number field whose edits send `params(number)` to `object.setLiveShape`; a scrub is one undo step. -fn number_row(app: &mut VectorcraftApp, ui: &mut Ui, label: &'static str, value: Option, quantity: Quantity, params: impl Fn(f64) -> Value) { +/// `target` is the field's [`shape_edit_target`]. +fn number_row( + app: &mut VectorcraftApp, + ui: &mut Ui, + label: &'static str, + value: Option, + quantity: Quantity, + target: IdSalt, + params: impl Fn(f64) -> Value, +) { let mut edit = None; Field::new(label).show(ui, |ui, _| { let bind = Bind::given(value); @@ -84,7 +122,7 @@ fn number_row(app: &mut VectorcraftApp, ui: &mut Ui, label: &'static str, value: Quantity::Degrees => NumberField::new(label, bind).unit("°").commit_decimals(1), Quantity::Ratio => NumberField::new(label, bind).range(0.001..=1.0).step(0.001).commit_decimals(3), }; - edit = Some(field.show(ui).edit); + edit = Some(field.edit_target(target).show(ui).edit); }); if let Some(edit) = edit { // `Scope`, not `Preview`: `Preview` names one command, and each field sends its own params. @@ -99,9 +137,9 @@ fn number_row(app: &mut VectorcraftApp, ui: &mut Ui, label: &'static str, value: /// A live rectangle's, ellipse's or polygon's Angle row (counterclockwise): the angle the selected shapes of its /// kind share, blank when they differ. `key` is the `object.setLiveShape` param an edit sets, which turns each of /// them about its own center. -fn angle_row(app: &mut VectorcraftApp, ui: &mut Ui, live: &LiveShape, key: &'static str) { +fn angle_row(app: &mut VectorcraftApp, ui: &mut Ui, live: &LiveShape, key: &'static str, target: IdSalt) { let angle = shared_shape_angle(app, live); - number_row(app, ui, tl!("Angle"), angle, Quantity::Degrees, |a| json!({ key: a })); + number_row(app, ui, tl!("Angle"), angle, Quantity::Degrees, target, |a| json!({ key: a })); } /// The angle ([`LiveShape::shape_angle`]) every selected live shape of `live`'s kind shares, `None` when they @@ -151,9 +189,11 @@ fn line_rows(app: &mut VectorcraftApp, ui: &mut Ui, live: &LiveShape) -> bool { if !only_lines_selected(app) { return false; } + let target = shape_edit_target(app); under_heading(ui, Some(tl!("Line Properties:")), |ui| { - number_row(app, ui, tl!("Line Length"), live.line_length(), Quantity::Length, |l| json!({ "lineLength": l })); - number_row(app, ui, tl!("Line Angle"), Some(live.line_angle().unwrap_or(0.0)), Quantity::Degrees, |a| json!({ "lineAngle": a })); + number_row(app, ui, tl!("Line Length"), live.line_length(), Quantity::Length, target, |l| json!({ "lineLength": l })); + let angle = Some(live.line_angle().unwrap_or(0.0)); + number_row(app, ui, tl!("Line Angle"), angle, Quantity::Degrees, target, |a| json!({ "lineAngle": a })); }); true } @@ -161,13 +201,13 @@ fn line_rows(app: &mut VectorcraftApp, ui: &mut Ui, live: &LiveShape) -> bool { /// An ellipse's Pie Start and End Angle (degrees, counterclockwise from 3 o'clock; 0 to 360 is the whole /// ellipse), the Constrain Pie Angle link beside them, and Invert Pie, which shows the other part of it. With the /// link on, a typed angle moves the other one by as much, so each selected ellipse keeps its span. -fn pie_rows(app: &mut VectorcraftApp, ui: &mut Ui, pie: (f64, f64)) { +fn pie_rows(app: &mut VectorcraftApp, ui: &mut Ui, pie: (f64, f64), target: IdSalt) { let constrain = app.ui.constrain_pie_angle; // The link sits halfway between the two fields, with no bracket drawn to them. Row::new().bracket(Bracket::Unlinked).show(ui, |ui, _| { Stack::new().show(ui, |ui, _| { for (label, key, v) in [(tl!("Pie Start Angle"), "pieStart", pie.0), (tl!("Pie End Angle"), "pieEnd", pie.1)] { - number_row(app, ui, label, Some(v), Quantity::Degrees, |a| { + number_row(app, ui, label, Some(v), Quantity::Degrees, target, |a| { if constrain { json!({ key: a, "constrainPie": true }) } else { json!({ key: a }) } }); } @@ -181,16 +221,16 @@ fn pie_rows(app: &mut VectorcraftApp, ui: &mut Ui, pie: (f64, f64)) { /// A live polygon's Polygon Properties: its side count (a field and a slider), angle (counterclockwise), corner /// type and radius, radius (center to vertex) and side length, and Make Sides Equal, which an uneven scale enables. -fn polygon_rows(app: &mut VectorcraftApp, ui: &mut Ui, n: &Node, live: &LiveShape) { +fn polygon_rows(app: &mut VectorcraftApp, ui: &mut Ui, n: &Node, live: &LiveShape, target: IdSalt) { let LiveShape::Polygon { sides, .. } = live else { return }; let radius = live.polygon_radius(); let side = radius.map(|r| 2.0 * r * (std::f64::consts::PI / f64::from((*sides).max(3))).sin()); - sides_row(app, ui, *sides); - angle_row(app, ui, live, "polygonAngle"); + sides_row(app, ui, *sides, target); + angle_row(app, ui, live, "polygonAngle", target); corner_kind_row(app, ui, corner_style(app, n).1); Field::new(tl!("Corner Radius")).show(ui, |ui, _| corner_radius_field(app, ui, n)); - number_row(app, ui, tl!("Radius"), radius, Quantity::Length, |r| json!({ "polygonRadius": r })); - number_row(app, ui, tl!("Side Length"), side, Quantity::Length, |l| json!({ "sideLength": l })); + number_row(app, ui, tl!("Radius"), radius, Quantity::Length, target, |r| json!({ "polygonRadius": r })); + number_row(app, ui, tl!("Side Length"), side, Quantity::Length, target, |l| json!({ "sideLength": l })); if Button::new(tl!("Make Sides Equal")).enabled(!live.polygon_sides_equal()).show(ui).clicked() { set_live_shape(app, json!({"makeSidesEqual": true})); } @@ -200,18 +240,27 @@ fn polygon_rows(app: &mut VectorcraftApp, ui: &mut Ui, n: &Node, live: &LiveShap /// over [`SIDES_SLIDER`]. A typed count is one undo step. A slider drag previews the count and its release records /// one undo step; Escape during the drag puts the count back. A click on the rail or an arrow key sets the count in /// one undo step. A count above 20 puts the thumb at the rail's right end, and screen readers read the real count. -fn sides_row(app: &mut VectorcraftApp, ui: &mut Ui, sides: u32) { - count_row(app, ui, tl!("Sides"), "sides", sides, 3.0); +fn sides_row(app: &mut VectorcraftApp, ui: &mut Ui, sides: u32, target: IdSalt) { + count_row(app, ui, tl!("Sides"), "sides", sides, 3.0, target); } /// A count row (Polygon Properties' Sides, Star Properties' Points) whose edits set `key`: a field that takes `min` -/// to 1000 and a slider over [`SIDES_SLIDER`], as [`sides_row`] describes. -fn count_row(app: &mut VectorcraftApp, ui: &mut Ui, label: &'static str, key: &'static str, sides: u32, min: f64) { +/// to 1000 and a slider over [`SIDES_SLIDER`], as [`sides_row`] describes. The field drops an unfinished value when +/// `target` changes. +fn count_row(app: &mut VectorcraftApp, ui: &mut Ui, label: &'static str, key: &'static str, sides: u32, min: f64, target: IdSalt) { let count = f64::from(sides); let (mut typed, mut slid) = (None, None); Field::new(label).show(ui, |ui, _| { Row::new().show(ui, |ui, _| { - typed = Some(NumberField::new(label, Bind::given(Some(count))).range(min..=1000.0).fixed_decimals(0).id_salt("field").show(ui).edit); + typed = Some( + NumberField::new(label, Bind::given(Some(count))) + .range(min..=1000.0) + .fixed_decimals(0) + .id_salt("field") + .edit_target(target) + .show(ui) + .edit, + ); let (lo, hi) = (*SIDES_SLIDER.start(), *SIDES_SLIDER.end()); slid = Some( Slider::new(Bind::given(count.clamp(lo, hi)), SIDES_SLIDER) @@ -241,10 +290,10 @@ fn count_row(app: &mut VectorcraftApp, ui: &mut Ui, label: &'static str, key: &' /// A live star's Star Properties: its point count (a field that takes 2 to 1000 and a slider over 3 to 20) and its /// ratio (inner radius over outer radius, 0.001 to 1). Its corners stay with Live Corners and Direct Selection, as any /// path's do. -fn star_rows(app: &mut VectorcraftApp, ui: &mut Ui, live: &LiveShape) { +fn star_rows(app: &mut VectorcraftApp, ui: &mut Ui, live: &LiveShape, target: IdSalt) { let Some(points) = live.star_points() else { return }; - count_row(app, ui, tl!("Points"), "points", points, 2.0); - number_row(app, ui, tl!("Ratio"), live.star_ratio(), Quantity::Ratio, |r| json!({ "ratio": r })); + count_row(app, ui, tl!("Points"), "points", points, 2.0, target); + number_row(app, ui, tl!("Ratio"), live.star_ratio(), Quantity::Ratio, target, |r| json!({ "ratio": r })); } /// The polygon's Corner type select, blank while `kind` is `None` (the corners differ), one number cell wide as the @@ -259,3 +308,6 @@ fn corner_kind_row(app: &mut VectorcraftApp, ui: &mut Ui, kind: Option (VectorcraftApp, Value, Value) { + let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default()); + app.run("file.new", json!({"width": 400, "height": 400})).unwrap(); + let a = app.run(cmd, a).unwrap()["id"].clone(); + let b = app.run(cmd, b).unwrap()["id"].clone(); + (app, a, b) +} + +/// Selects `a`, types "3+" into field `name` drawn by `draw`, selects `b`, then types "7" and Enter. Returns the +/// field's value just after `b` is selected, after the Enter, and with `a` selected again. +fn type_across_a_selection_change( + app: VectorcraftApp, + draw: fn(&mut VectorcraftApp, &mut Ui), + a: &Value, + b: &Value, + name: &str, +) -> (Option, Option, Option) { + let mut app = app; + app.run("select.set", json!({"ids": [a]})).unwrap(); + let mut p = Panel::new(app, draw); + p.click_role(name, Role::SPIN_BUTTON); + p.key(Key::A, Modifiers::COMMAND); + p.type_text("3+"); + p.app().run("select.set", json!({"ids": [b]})).unwrap(); + p.frame(); + let switched = p.value_role(name, Role::SPIN_BUTTON); + p.type_text("7"); + p.key(Key::Enter, Modifiers::NONE); + p.frame(); + let after = p.value_role(name, Role::SPIN_BUTTON); + p.app().run("select.set", json!({"ids": [a]})).unwrap(); + p.frame(); + (switched, after, p.value_role(name, Role::SPIN_BUTTON)) +} + +/// Checks that a value typed into field `name` for `a` and not finished is dropped when `b`, which shows `shown` +/// there as `a` does, is selected: the field shows `shown`, "7" and Enter then give `b` 7 (`seven`), not 3+7, and +/// `a` keeps `shown`. +fn check_field(app: VectorcraftApp, draw: fn(&mut VectorcraftApp, &mut Ui), a: &Value, b: &Value, name: &str, shown: &str, seven: &str) { + let (switched, after, first) = type_across_a_selection_change(app, draw, a, b, name); + assert_eq!(switched.as_deref(), Some(shown), "{name}: the field shows the newly selected shape's value"); + assert_eq!(after.as_deref(), Some(seven), "{name}: the newly selected shape takes 7, not the unfinished 3+ and 7"); + assert_eq!(first.as_deref(), Some(shown), "{name}: the shape the value was first typed for keeps its value"); +} + +fn pt(v: f64) -> String { + Unit::Points.format(v) +} + +fn rectangles() -> (VectorcraftApp, Value, Value) { + two("shape.rectangle", json!({"x": 0, "y": 0, "width": 30, "height": 30}), json!({"x": 100, "y": 0, "width": 30, "height": 30})) +} + +fn polygons() -> (VectorcraftApp, Value, Value) { + two("shape.polygon", json!({"cx": 60, "cy": 60, "radius": 40, "sides": 5}), json!({"cx": 200, "cy": 60, "radius": 40, "sides": 5})) +} + +fn ellipses() -> (VectorcraftApp, Value, Value) { + two("shape.ellipse", json!({"x": 0, "y": 0, "width": 40, "height": 30}), json!({"x": 100, "y": 0, "width": 40, "height": 30})) +} + +fn lines() -> (VectorcraftApp, Value, Value) { + two("shape.line", json!({"x1": 20, "y1": 20, "x2": 120, "y2": 20}), json!({"x1": 20, "y1": 200, "x2": 120, "y2": 200})) +} + +#[test] +fn an_unfinished_rectangle_angle_does_not_reach_another_rectangle() { + let (app, a, b) = rectangles(); + check_field(app, crate::panels::transform::show, &a, &b, "Angle", "0°", "7°"); + let (app, a, b) = rectangles(); + check_field(app, crate::panels::properties::show, &a, &b, "Angle", "0°", "7°"); +} + +#[test] +fn an_unfinished_polygon_sides_count_does_not_reach_another_polygon() { + let (app, a, b) = polygons(); + check_field(app, crate::panels::transform::show, &a, &b, "Sides", "5", "7"); +} + +#[test] +fn an_unfinished_polygon_angle_radius_or_side_length_does_not_reach_another_polygon() { + let (app, a, b) = polygons(); + check_field(app, crate::panels::transform::show, &a, &b, "Angle", "0°", "7°"); + let (app, a, b) = polygons(); + check_field(app, crate::panels::transform::show, &a, &b, "Radius", &pt(40.0), &pt(7.0)); + let (app, a, b) = polygons(); + let side = pt(2.0 * 40.0 * (std::f64::consts::PI / 5.0).sin()); + check_field(app, crate::panels::transform::show, &a, &b, "Side Length", &side, &pt(7.0)); +} + +/// After Undo removes the shape a value was typed for, a new shape can take its node ID. The value is dropped when +/// that shape is selected, so it does not reach an object it was not typed for. +#[test] +fn an_unfinished_angle_does_not_reach_a_shape_that_takes_an_undone_shapes_id() { + let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default()); + app.run("file.new", json!({"width": 400, "height": 400})).unwrap(); + let rect = app.run("shape.rectangle", json!({"x": 0, "y": 0, "width": 30, "height": 30})).unwrap()["id"].clone(); + app.run("select.set", json!({"ids": [rect]})).unwrap(); + let mut p = Panel::new(app, crate::panels::transform::show); + p.click_role("Angle", Role::SPIN_BUTTON); + p.key(Key::A, Modifiers::COMMAND); + p.type_text("3+"); + p.app().run("edit.undo", json!({})).unwrap(); + let ellipse = p.app().run("shape.ellipse", json!({"x": 100, "y": 0, "width": 40, "height": 30})).unwrap()["id"].clone(); + assert_eq!(ellipse, rect, "the ellipse takes the undone rectangle's node ID"); + p.app().run("select.set", json!({"ids": [ellipse]})).unwrap(); + p.frame(); + assert_eq!(p.value_role("Angle", Role::SPIN_BUTTON).as_deref(), Some("0°"), "the field shows the ellipse's angle"); + p.type_text("7"); + p.key(Key::Enter, Modifiers::NONE); + p.frame(); + assert_eq!(p.value_role("Angle", Role::SPIN_BUTTON).as_deref(), Some("7°"), "the ellipse takes 7°, not the unfinished 3+ and 7"); +} + +/// A canceled undo group removes the shape a value was typed for, and a new shape can take its node ID. The value is +/// dropped when that shape is selected. +#[test] +fn an_unfinished_angle_does_not_reach_a_shape_that_takes_a_canceled_groups_shapes_id() { + let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default()); + app.run("file.new", json!({"width": 400, "height": 400})).unwrap(); + app.run("edit.undoGroup.begin", json!({})).unwrap(); + let rect = app.run("shape.rectangle", json!({"x": 0, "y": 0, "width": 30, "height": 30})).unwrap()["id"].clone(); + app.run("select.set", json!({"ids": [rect]})).unwrap(); + let mut p = Panel::new(app, crate::panels::transform::show); + p.click_role("Angle", Role::SPIN_BUTTON); + p.key(Key::A, Modifiers::COMMAND); + p.type_text("3+"); + p.app().run("edit.undoGroup.end", json!({"cancel": true})).unwrap(); + let ellipse = p.app().run("shape.ellipse", json!({"x": 100, "y": 0, "width": 40, "height": 30})).unwrap()["id"].clone(); + assert_eq!(ellipse, rect, "the ellipse takes the canceled group's rectangle's node ID"); + p.app().run("select.set", json!({"ids": [ellipse]})).unwrap(); + p.frame(); + assert_eq!(p.value_role("Angle", Role::SPIN_BUTTON).as_deref(), Some("0°"), "the field shows the new shape's angle"); + p.type_text("7"); + p.key(Key::Enter, Modifiers::NONE); + p.frame(); + assert_eq!(p.value_role("Angle", Role::SPIN_BUTTON).as_deref(), Some("7°"), "the ellipse takes 7°, not the unfinished 3+ and 7"); +} + +/// Exit Symbol Editing Mode with nothing changed takes back the entering step, which removes the editing copy a value +/// was typed for, and a new shape can take the copy's node ID. The value is dropped when that shape is selected. +#[test] +fn an_unfinished_angle_does_not_reach_a_shape_that_takes_an_unchanged_symbol_copys_id() { + let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default()); + app.run("file.new", json!({"width": 400, "height": 400})).unwrap(); + app.run("shape.rectangle", json!({"x": 0, "y": 0, "width": 30, "height": 30})).unwrap(); + app.run("symbol.new", json!({"name": "Box"})).unwrap(); + app.run("symbol.edit", json!({})).unwrap(); + let copy = app.session.active().map(|st| st.selection.objects.clone()).unwrap_or_default(); + assert_eq!(copy.len(), 1, "symbol editing selects the editing copy"); + let mut p = Panel::new(app, crate::panels::transform::show); + p.click_role("Angle", Role::SPIN_BUTTON); + p.key(Key::A, Modifiers::COMMAND); + p.type_text("3+"); + p.app().run("symbol.exitEditing", json!({})).unwrap(); + p.app().run("shape.rectangle", json!({"x": 100, "y": 0, "width": 40, "height": 30})).unwrap(); + let rect = p.app().run("shape.rectangle", json!({"x": 200, "y": 0, "width": 40, "height": 30})).unwrap()["id"].clone(); + assert_eq!(rect, json!(copy[0].0), "the second new rectangle takes the editing copy's node ID"); + p.app().run("select.set", json!({"ids": [rect]})).unwrap(); + p.frame(); + assert_eq!(p.value_role("Angle", Role::SPIN_BUTTON).as_deref(), Some("0°"), "the field shows the new rectangle's angle"); + p.type_text("7"); + p.key(Key::Enter, Modifiers::NONE); + p.frame(); + assert_eq!(p.value_role("Angle", Role::SPIN_BUTTON).as_deref(), Some("7°"), "the rectangle takes 7°, not the unfinished 3+ and 7"); +} + +/// A canceled interaction removes a shape its preview made and a value was typed for, and a new shape can take that +/// shape's node ID. The value is dropped when that shape is selected. +#[test] +fn an_unfinished_angle_does_not_reach_a_shape_that_takes_a_canceled_previews_shapes_id() { + let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default()); + app.run("file.new", json!({"width": 400, "height": 400})).unwrap(); + app.session.begin_interaction("Rectangle").unwrap(); + let previewed = app.session.preview("shape.rectangle", &json!({"x": 0, "y": 0, "width": 30, "height": 30})).unwrap()["id"].clone(); + let selected = app.session.active().map(|st| st.selection.objects.clone()).unwrap_or_default(); + assert_eq!(json!(selected.iter().map(|id| id.0).collect::>()), json!([previewed]), "the preview selects its rectangle"); + let mut p = Panel::new(app, crate::panels::transform::show); + p.click_role("Angle", Role::SPIN_BUTTON); + p.key(Key::A, Modifiers::COMMAND); + p.type_text("3+"); + p.app().session.cancel_interaction().unwrap(); + let rect = p.app().run("shape.rectangle", json!({"x": 100, "y": 0, "width": 40, "height": 30})).unwrap()["id"].clone(); + assert_eq!(rect, previewed, "the new rectangle takes the canceled preview's rectangle's node ID"); + p.app().run("select.set", json!({"ids": [rect]})).unwrap(); + p.frame(); + assert_eq!(p.value_role("Angle", Role::SPIN_BUTTON).as_deref(), Some("0°"), "the field shows the new rectangle's angle"); + p.type_text("7"); + p.key(Key::Enter, Modifiers::NONE); + p.frame(); + assert_eq!(p.value_role("Angle", Role::SPIN_BUTTON).as_deref(), Some("7°"), "the rectangle takes 7°, not the unfinished 3+ and 7"); +} + +/// A replacement preview reuses the discarded rectangle's node ID and drops its unfinished angle. +/// The replacement rectangle takes the next angle typed into the field. +#[test] +fn an_unfinished_angle_does_not_reach_a_replacement_preview_that_reuses_a_discarded_shapes_id() { + let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default()); + app.run("file.new", json!({"width": 400, "height": 400})).unwrap(); + app.session.begin_interaction("Rectangle").unwrap(); + let previewed = app.session.preview("shape.rectangle", &json!({"x": 0, "y": 0, "width": 30, "height": 30})).unwrap()["id"].clone(); + let mut p = Panel::new(app, crate::panels::transform::show); + p.click_role("Angle", Role::SPIN_BUTTON); + p.key(Key::A, Modifiers::COMMAND); + p.type_text("3+"); + let steps = json!({"commands": [ + {"command": "shape.rectangle", "params": {"x": 100, "y": 10, "width": 40, "height": 30}} + ]}); + let replacement = p.app().session.preview("command.batch", &steps).unwrap(); + let rect = replacement["results"][0]["id"].clone(); + assert_eq!(rect, previewed, "the replacement rectangle reuses the discarded rectangle's node ID"); + let selected = p.app().session.active().map(|st| st.selection.objects.clone()).unwrap_or_default(); + assert_eq!(json!(selected.iter().map(|id| id.0).collect::>()), json!([rect]), "the preview selects the replacement rectangle"); + p.frame(); + assert_eq!(p.value_role("Angle", Role::SPIN_BUTTON).as_deref(), Some("0°"), "the field shows the replacement rectangle's angle"); + p.type_text("7"); + p.key(Key::Enter, Modifiers::NONE); + p.frame(); + assert_eq!(p.value_role("Angle", Role::SPIN_BUTTON).as_deref(), Some("7°"), "the replacement rectangle takes 7°, not the unfinished 3+ and 7"); +} + +#[test] +fn an_unfinished_ellipse_angle_or_pie_angle_does_not_reach_another_ellipse() { + for (name, shown) in [("Angle", "0°"), ("Pie Start Angle", "0°"), ("Pie End Angle", "360°")] { + let (app, a, b) = ellipses(); + check_field(app, crate::panels::transform::show, &a, &b, name, shown, "7°"); + } +} + +#[test] +fn an_unfinished_star_points_or_ratio_does_not_reach_another_star() { + let stars = || { + two( + "shape.star", + json!({"cx": 60, "cy": 60, "radius1": 40, "radius2": 20, "points": 5}), + json!({"cx": 200, "cy": 60, "radius1": 40, "radius2": 20, "points": 5}), + ) + }; + let (app, a, b) = stars(); + check_field(app, crate::panels::transform::show, &a, &b, "Points", "5", "7"); + let (app, a, b) = stars(); + check_field(app, crate::panels::transform::show, &a, &b, "Ratio", "0.5", "1"); +} + +#[test] +fn an_unfinished_line_length_or_angle_does_not_reach_another_line() { + let (app, a, b) = lines(); + check_field(app, crate::panels::transform::show, &a, &b, "Line Length", &pt(100.0), &pt(7.0)); + let (app, a, b) = lines(); + check_field(app, crate::panels::transform::show, &a, &b, "Line Angle", "0°", "7°"); +} + +/// A value typed for a rectangle and not finished is dropped when File Revert replaces the document's content or +/// another document becomes active, even where the selection has the same ids and the same angle. +#[test] +fn an_unfinished_angle_is_dropped_by_file_revert_or_another_document() { + type Change = fn(&mut VectorcraftApp); + let changes: [(&str, Change); 2] = [ + ("File Revert", |app| { + // The same content again, with the same rectangle selected after it. + let st = app.session.active().unwrap(); + let (doc, ids) = ((*st.doc).clone(), st.selection.objects.clone()); + assert!(app.session.replace_document(0, doc)); + app.run("select.set", json!({"ids": ids.iter().map(|id| id.0).collect::>()})).unwrap(); + }), + ("another document became active", |app| { + app.run("document.activate", json!({"index": 1})).unwrap(); + }), + ]; + // The angle of the rectangle in each open document, in whole degrees, and the index of the active document. + let angles = |p: &Panel| -> (Vec>, Option) { + let app = p.app(); + let docs = app.session.documents(); + let angles = docs.iter().map(|st| st.doc.node(st.selection.objects[0]).and_then(|n| n.live_shape()?.shape_angle()).map(|a| a.round() as i64)); + let active = app.session.active().map(|a| a.uid); + (angles.collect(), docs.iter().position(|st| Some(st.uid) == active)) + }; + for (change, apply) in changes { + let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default()); + for _ in 0..2 { + app.run("file.new", json!({"width": 400, "height": 400})).unwrap(); + let id = app.run("shape.rectangle", json!({"x": 0, "y": 0, "width": 30, "height": 30})).unwrap()["id"].clone(); + app.run("select.set", json!({"ids": [id]})).unwrap(); + } + app.run("document.activate", json!({"index": 0})).unwrap(); + let mut p = Panel::new(app, crate::panels::transform::show); + p.click_role("Angle", Role::SPIN_BUTTON); + p.key(Key::A, Modifiers::COMMAND); + p.type_text("3+"); + apply(&mut p.app()); + p.frame(); + assert_eq!(p.value_role("Angle", Role::SPIN_BUTTON).as_deref(), Some("0°"), "{change}: the field shows the rectangle's angle"); + p.type_text("7"); + p.key(Key::Enter, Modifiers::NONE); + let (got, active) = angles(&p); + let active = active.unwrap(); + let mut want = vec![Some(0), Some(0)]; + want[active] = Some(7); + assert_eq!(got, want, "{change}: the rectangle takes 7°, not the unfinished 3+ and 7"); + } +} + +/// While the selection stays the same, a value typed over several frames is kept and committed whole, also when an +/// edit to an unselected object changes the document in between. +#[test] +fn a_value_typed_with_the_same_selection_is_kept_across_frames() { + let (mut app, a, b) = rectangles(); + app.run("select.set", json!({"ids": [a]})).unwrap(); + let mut p = Panel::new(app, crate::panels::transform::show); + p.click_role("Angle", Role::SPIN_BUTTON); + p.key(Key::A, Modifiers::COMMAND); + p.type_text("3+"); + p.frame(); + let revision = p.app().session.active().unwrap().revision; + p.app().run("stroke.set", json!({"ids": [b], "weight": 4})).unwrap(); + assert_ne!(p.app().session.active().unwrap().revision, revision, "the document changed"); + p.frame(); + p.type_text("7"); + p.key(Key::Enter, Modifiers::NONE); + p.frame(); + assert_eq!(p.value_role("Angle", Role::SPIN_BUTTON).as_deref(), Some("10°"), "3+7 is committed to the same rectangle"); +} + +/// An unfinished Sides value is dropped when selecting the star first replaces Sides with Points. +#[test] +fn an_unfinished_sides_count_does_not_reach_a_star_selected_first() { + let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default()); + app.run("file.new", json!({"width": 400, "height": 400})).unwrap(); + let polygon = app.run("shape.polygon", json!({"cx": 60, "cy": 60, "radius": 40, "sides": 5})).unwrap()["id"].clone(); + let star = app.run("shape.star", json!({"cx": 200, "cy": 60, "radius1": 40, "radius2": 20, "points": 5})).unwrap()["id"].clone(); + app.run("select.set", json!({"ids": [polygon, star]})).unwrap(); + let mut p = Panel::new(app, crate::panels::transform::show); + p.click_role("Sides", Role::SPIN_BUTTON); + p.key(Key::A, Modifiers::COMMAND); + p.type_text("3+"); + p.app().run("select.set", json!({"ids": [star, polygon]})).unwrap(); + p.frame(); + assert_eq!(p.value_role("Points", Role::SPIN_BUTTON).as_deref(), Some("5"), "the field shows the star's points"); + p.type_text("7"); + p.key(Key::Enter, Modifiers::NONE); + p.frame(); + assert_eq!(p.value_role("Points", Role::SPIN_BUTTON).as_deref(), Some("7"), "the star takes 7 points, not the unfinished 3+ and 7"); +} + +/// An Angle value typed across frames is kept when another corner of the same rectangle is Direct-Selected. +#[test] +fn a_value_typed_for_the_same_shape_is_kept_when_direct_selected_anchors_change() { + let (mut app, a, _) = rectangles(); + let id = a.as_u64().unwrap(); + app.run("select.anchors", json!({"id": id, "anchors": [[0, 0]], "mode": "set"})).unwrap(); + let mut p = Panel::new(app, crate::panels::transform::show); + p.click_role("Angle", Role::SPIN_BUTTON); + p.key(Key::A, Modifiers::COMMAND); + p.type_text("3+"); + p.app().run("select.anchors", json!({"id": id, "anchors": [[0, 2]], "mode": "set"})).unwrap(); + p.frame(); + p.type_text("7"); + p.key(Key::Enter, Modifiers::NONE); + p.frame(); + assert_eq!(p.value_role("Angle", Role::SPIN_BUTTON).as_deref(), Some("10°"), "3+7 is committed to the same rectangle"); +} From f647b9c734f3bb16f523bf8e1660ea10cfaa64a8 Mon Sep 17 00:00:00 2001 From: erolkarino Date: Sat, 5 Dec 2026 10:10:16 +0300 Subject: [PATCH 12/62] feat(stroke): compact reorderable width profile dropdown (#3527, #10826) - Add stroke.widthProfile.move and stroke.widthProfile.rename commands and persist width_profile_order / hidden_width_profiles in Prefs - Replace standard Select with ProfileSelect dropdown featuring inline management footer (Add to Profiles, Delete Profile, Reset Profiles with confirmation), drag/keyboard reordering (keeping Uniform pinned first and undeletable), and deleting non-Uniform built-in profiles - Save immediately from the dropdown footer using next_profile_name(), hide text captions on user-added dropdown rows while keeping drag reordering and inline rename, shrink closed and opened dropdown widths, and allow expanding vertically when space is available --- crates/engine/src/cmd/stroke.rs | 176 ++++- crates/engine/src/prefs.rs | 11 + crates/engine/src/tests/widthprofiles.rs | 88 ++- crates/ui-egui/src/panels/stroke.rs | 74 +- .../src/panels/stroke/profile_picker.rs | 672 ++++++++++++++++++ .../ui-egui/src/panels/tests_strokedepth.rs | 183 +++++ 6 files changed, 1158 insertions(+), 46 deletions(-) create mode 100644 crates/ui-egui/src/panels/stroke/profile_picker.rs diff --git a/crates/engine/src/cmd/stroke.rs b/crates/engine/src/cmd/stroke.rs index 4ee4f01c10..73f2f41c24 100644 --- a/crates/engine/src/cmd/stroke.rs +++ b/crates/engine/src/cmd/stroke.rs @@ -12,7 +12,7 @@ use vectorcraft_tools::builder::is_live_paint; use super::appearance::{ItemTarget, edit_items, item_target}; use super::paint::{live_paint_parts_skipped, painted}; -use super::{CommandSpec, Result, Session, always, bad, bool_or, cmd, has_doc, ok, str_param}; +use super::{CommandSpec, Result, Session, always, bad, bool_or, cmd, has_doc, index_opt, ok, str_param}; use crate::DocState; use crate::inspect::{ALIGNS, CAPS, JOINS, StrokeMixed, node_stroke, scale_layer}; @@ -68,8 +68,8 @@ pub fn specs() -> Vec { "Delete Profile", [], None, - "{name?} remove a saved profile from the Profile list (default: the selected stroke's); built-in profiles can't be deleted, and strokes keep their widths → {deleted}", - has_saved_profiles, + "{name?} remove a built-in or saved profile from the Profile list (default: the selected stroke's); \"uniform\" can't be deleted, and strokes keep their widths → {deleted}", + has_deletable_profiles, profile_delete ), cmd!( @@ -77,10 +77,28 @@ pub fn specs() -> Vec { "Reset Profiles", [], None, - "{} remove every saved profile, leaving the built-ins → {removed: count}", - has_saved_profiles, + "{} remove every saved profile and restore the default built-in profiles and order → {removed: count}", + can_reset_profiles, profile_reset ), + cmd!( + "stroke.widthProfile.move", + "Move Width Profile", + [], + None, + "{name: profile id or name (not \"uniform\"), to: index among reorderable profiles (0 = first after Uniform, clamped)} reorder a width profile in the Profile list (kept with the preferences) → {order}", + always, + profile_move + ), + cmd!( + "stroke.widthProfile.rename", + "Rename Width Profile", + [], + None, + "{name: saved profile name, to: new name (unique, not a built-in's)} rename a saved width profile → {name}", + has_saved_profiles, + profile_rename + ), cmd!( query "stroke.widthProfile.list", "Width Profiles", @@ -710,12 +728,38 @@ impl ProfileEntry<'_> { } impl Session { - /// The Profile list: the built-in profiles, then the saved ones. + /// The Profile list: Uniform first, then the built-in and saved profiles in [`Prefs::width_profile_order`]. pub fn profile_entries(&self) -> impl Iterator> { - let built_in = WidthProfile::PRESETS.iter().map(|p| ProfileEntry { id: p.id, label: p.label, points: p.points, built_in: true }); - let saved = - self.prefs.width_profiles.iter().map(|p| ProfileEntry { id: &p.name, label: &p.name, points: &p.profile.points, built_in: false }); - built_in.chain(saved) + let uniform = WidthProfile::PRESETS[0]; + let uniform = ProfileEntry { id: uniform.id, label: uniform.label, points: uniform.points, built_in: true }; + let candidates: Vec> = WidthProfile::PRESETS[1..] + .iter() + .filter(|p| !self.prefs.hidden_width_profiles.iter().any(|h| h == p.id)) + .map(|p| ProfileEntry { id: p.id, label: p.label, points: p.points, built_in: true }) + .chain(self.prefs.width_profiles.iter().map(|p| ProfileEntry { id: &p.name, label: &p.name, points: &p.profile.points, built_in: false })) + .collect(); + let mut out = Vec::with_capacity(1 + candidates.len()); + out.push(uniform); + if self.prefs.width_profile_order.is_empty() { + out.extend(candidates); + } else { + let mut used = vec![false; candidates.len()]; + for id in &self.prefs.width_profile_order { + if id == uniform.id { + continue; + } + if let Some(pos) = candidates.iter().enumerate().position(|(i, e)| !used[i] && e.id == id) { + used[pos] = true; + out.push(candidates[pos]); + } + } + for (i, entry) in candidates.into_iter().enumerate() { + if !used[i] { + out.push(entry); + } + } + } + out.into_iter() } /// The Profile list row showing `p` (`None`: the plain stroke), if it is listed. @@ -735,9 +779,10 @@ impl Session { (1..).map(|n| format!("Width Profile {n}")).find(|n| !self.profile_name_taken(n)).unwrap_or_default() } - /// Does a listed profile have `name` as its id or label (ignoring case)? + /// Does a listed or built-in profile have `name` as its id or label (ignoring case)? fn profile_name_taken(&self, name: &str) -> bool { self.profile_entries().any(|e| e.id.eq_ignore_ascii_case(name) || e.label.eq_ignore_ascii_case(name)) + || WidthProfile::PRESETS.iter().any(|b| b.id.eq_ignore_ascii_case(name) || b.label.eq_ignore_ascii_case(name)) } /// The variable width Add to Profiles saves: the shown stroke's profile, when it isn't listed. @@ -759,6 +804,32 @@ fn has_saved_profiles(s: &Session) -> std::result::Result<(), String> { if s.prefs.width_profiles.is_empty() { Err("no saved profiles".into()) } else { Ok(()) } } +fn has_deletable_profiles(s: &Session) -> std::result::Result<(), String> { + if s.prefs.width_profiles.is_empty() && !s.profile_entries().any(|e| e.id != WidthProfile::PRESETS[0].id) { + Err("no deletable profiles".into()) + } else { + Ok(()) + } +} + +fn can_reset_profiles(s: &Session) -> std::result::Result<(), String> { + if s.prefs.width_profiles.is_empty() && s.prefs.width_profile_order.is_empty() && s.prefs.hidden_width_profiles.is_empty() { + Err("no saved profiles".into()) + } else { + Ok(()) + } +} + +/// The default order of reorderable profiles (visible built-ins after Uniform, then saved profiles). +fn default_profile_order(s: &Session) -> Vec { + WidthProfile::PRESETS[1..] + .iter() + .filter(|p| !s.prefs.hidden_width_profiles.iter().any(|h| h == p.id)) + .map(|p| p.id.to_string()) + .chain(s.prefs.width_profiles.iter().map(|sp| sp.name.clone())) + .collect() +} + fn profile_add(s: &mut Session, p: &Value) -> Result { const C: &str = "stroke.widthProfile.add"; let profile = s.profile_to_add().map_err(|e| bad(C, e))?; @@ -769,6 +840,9 @@ fn profile_add(s: &mut Session, p: &Value) -> Result { Some(n) => n.to_string(), }; s.prefs.width_profiles.push(SavedProfile { name: name.clone(), profile }); + if !s.prefs.width_profile_order.is_empty() && !s.prefs.width_profile_order.iter().any(|id| id == &name) { + s.prefs.width_profile_order.push(name.clone()); + } Ok(json!({ "name": name })) } @@ -779,22 +853,90 @@ fn profile_delete(s: &mut Session, p: &Value) -> Result { None => { let shown = s.shown_stroke().and_then(|st| st.profile); let entry = shown.as_ref().and_then(|p| s.profile_entry(Some(p))); - entry.map(|e| e.id.to_string()).ok_or_else(|| bad(C, "give a name, or select a stroke with a saved profile"))? + entry.map(|e| e.id.to_string()).ok_or_else(|| bad(C, "give a name, or select a stroke with a deletable profile"))? } }; - if WidthProfile::PRESETS.iter().any(|b| b.id == name || b.label == name) { - return Err(bad(C, format!("{name} is built in and can't be deleted"))); + let uniform = WidthProfile::PRESETS[0]; + if name == uniform.id || name.eq_ignore_ascii_case(uniform.label) { + return Err(bad(C, "Uniform can't be deleted")); } - let i = s.prefs.width_profiles.iter().position(|sp| sp.name == name).ok_or_else(|| bad(C, format!("no saved profile called {name}")))?; - s.prefs.width_profiles.remove(i); - Ok(json!({ "deleted": name })) + let deleted = if let Some(preset) = WidthProfile::PRESETS[1..] + .iter() + .find(|b| (b.id == name || b.label.eq_ignore_ascii_case(&name)) && !s.prefs.hidden_width_profiles.iter().any(|h| h == b.id)) + { + s.prefs.hidden_width_profiles.push(preset.id.to_string()); + preset.id.to_string() + } else if let Some(i) = s.prefs.width_profiles.iter().position(|sp| sp.name == name) { + s.prefs.width_profiles.remove(i); + name + } else { + return Err(bad(C, format!("no profile called {name}"))); + }; + s.prefs.width_profile_order.retain(|id| id != &deleted); + if s.prefs.width_profile_order == default_profile_order(s) { + s.prefs.width_profile_order.clear(); + } + Ok(json!({ "deleted": deleted })) } fn profile_reset(s: &mut Session, _: &Value) -> Result { let removed = std::mem::take(&mut s.prefs.width_profiles).len(); + s.prefs.width_profile_order.clear(); + s.prefs.hidden_width_profiles.clear(); Ok(json!({ "removed": removed })) } +fn profile_move(s: &mut Session, p: &Value) -> Result { + const C: &str = "stroke.widthProfile.move"; + let name = str_param(p, "name").ok_or_else(|| bad(C, "missing name"))?; + let to = index_opt(p, "to", C)?.ok_or_else(|| bad(C, "missing `to` (an index)"))?; + let uniform = WidthProfile::PRESETS[0]; + if name == uniform.id || name.eq_ignore_ascii_case(uniform.label) { + return Err(bad(C, "Uniform stays first and can't be moved")); + } + let mut order: Vec = s.profile_entries().skip(1).map(|e| e.id.to_string()).collect(); + let from = order.iter().position(|id| id == name).ok_or_else(|| bad(C, format!("no width profile called {name}")))?; + if !order.is_empty() { + let to = to.min(order.len() - 1); + if from != to { + let item = order.remove(from); + order.insert(to, item); + } + } + if order == default_profile_order(s) { + s.prefs.width_profile_order.clear(); + } else { + s.prefs.width_profile_order = order.clone(); + } + Ok(json!({ "order": order })) +} + +fn profile_rename(s: &mut Session, p: &Value) -> Result { + const C: &str = "stroke.widthProfile.rename"; + let name = str_param(p, "name").ok_or_else(|| bad(C, "missing name"))?; + let to = str_param(p, "to").map(str::trim).ok_or_else(|| bad(C, "missing `to`"))?; + if to.is_empty() { + return Err(bad(C, "the name is empty")); + } + if WidthProfile::PRESETS.iter().any(|b| b.id == name || b.label == name) { + return Err(bad(C, format!("{name} is built in and can't be renamed"))); + } + if WidthProfile::PRESETS.iter().any(|b| b.id.eq_ignore_ascii_case(to) || b.label.eq_ignore_ascii_case(to)) { + return Err(bad(C, format!("a profile is already called {to}"))); + } + let i = s.prefs.width_profiles.iter().position(|sp| sp.name == name).ok_or_else(|| bad(C, format!("no saved profile called {name}")))?; + if !to.eq_ignore_ascii_case(name) && s.profile_name_taken(to) { + return Err(bad(C, format!("a profile is already called {to}"))); + } + s.prefs.width_profiles[i].name = to.to_string(); + for id in &mut s.prefs.width_profile_order { + if id == name { + *id = to.to_string(); + } + } + Ok(json!({ "name": to })) +} + fn profile_list(s: &mut Session, _: &Value) -> Result { let profiles: Vec = s .profile_entries() diff --git a/crates/engine/src/prefs.rs b/crates/engine/src/prefs.rs index f5528f0471..7b0916669f 100644 --- a/crates/engine/src/prefs.rs +++ b/crates/engine/src/prefs.rs @@ -361,6 +361,15 @@ pub struct Prefs { /// Preferences dialog field, so it has no [`cmd::prefscmds::PREF_SPECS`] row. #[serde(skip_serializing_if = "Vec::is_empty")] pub width_profiles: Vec, + /// Display order of non-uniform width profiles (`stroke.widthProfile.move`), holding built-in + /// ids and saved profile names. Empty means default order (built-ins then saved). Not a + /// Preferences dialog field, so resetting preferences keeps it. + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub width_profile_order: Vec, + /// Built-in non-uniform width profile ids deleted/hidden by the user; Reset Profiles clears + /// this list to restore all built-in presets. + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub hidden_width_profiles: Vec, /// General → Use Japanese Crop Marks: the style of Create Trim Marks and Effect → Crop Marks. pub japanese_crop_marks: bool, /// Appearance panel → New Art Has Basic Appearance (on): new art takes one fill and stroke; @@ -718,6 +727,8 @@ impl Default for Prefs { trace_presets: vec![], gradient_presets: vec![], width_profiles: vec![], + width_profile_order: vec![], + hidden_width_profiles: vec![], japanese_crop_marks: false, new_art_basic: true, color_themes: vec![], diff --git a/crates/engine/src/tests/widthprofiles.rs b/crates/engine/src/tests/widthprofiles.rs index fe041dae43..38fabf740e 100644 --- a/crates/engine/src/tests/widthprofiles.rs +++ b/crates/engine/src/tests/widthprofiles.rs @@ -84,7 +84,7 @@ fn add_list_apply_delete_reset() { } #[test] -fn built_ins_cant_be_deleted_and_names_stay_unique() { +fn uniform_cant_be_deleted_and_built_ins_delete_and_reset() { let (mut s, id) = session_with_line(); set_profile(&mut s, id, custom()); for taken in ["lens", "Taper Start", "UNIFORM"] { @@ -92,16 +92,30 @@ fn built_ins_cant_be_deleted_and_names_stay_unique() { } assert!(s.execute("stroke.widthProfile.add", &json!({"name": " "})).is_err()); s.execute("stroke.widthProfile.add", &json!({"name": "Mine"})).unwrap(); - for b in ["lens", "Lens", "uniform", "wave"] { - let e = s.execute("stroke.widthProfile.delete", &json!({"name": b})).unwrap_err().to_string(); - assert!(e.contains("built in"), "{b}: {e}"); - } - // With a built-in profile selected, Delete has nothing to delete. - s.execute("stroke.set", &json!({"profile": "pinch"})).unwrap(); + + // Uniform cannot be deleted by id or label, nor when selected on the stroke. + s.execute("stroke.set", &json!({"profile": "uniform"})).unwrap(); assert!(s.execute("stroke.widthProfile.delete", &json!({})).is_err()); + for u in ["uniform", "Uniform", "UNIFORM"] { + let e = s.execute("stroke.widthProfile.delete", &json!({"name": u})).unwrap_err().to_string(); + assert!(e.contains("Uniform"), "{u}: {e}"); + } + + // Non-uniform built-in profiles CAN be deleted (by name/id or active selection) and restored on Reset. + assert_eq!(s.execute("stroke.widthProfile.delete", &json!({"name": "Lens"})).unwrap()["deleted"], "lens"); + assert!(!s.profile_entries().any(|e| e.id == "lens")); + s.execute("stroke.set", &json!({"profile": "pinch"})).unwrap(); + assert_eq!(s.execute("stroke.widthProfile.delete", &json!({})).unwrap()["deleted"], "pinch"); + assert!(!s.profile_entries().any(|e| e.id == "pinch")); + assert!(s.execute("stroke.widthProfile.delete", &json!({"name": "Lens"})).is_err(), "already deleted"); + assert!(s.execute("stroke.widthProfile.delete", &json!({"name": "Other"})).is_err()); assert_eq!(s.next_profile_name(), "Width Profile 1"); assert_eq!(s.execute("stroke.widthProfile.delete", &json!({"name": "Mine"})).unwrap()["deleted"], "Mine"); + + // Reset restores all deleted built-ins as well. + assert!(s.execute("stroke.widthProfile.reset", &json!({})).is_ok()); + assert_eq!(ids(&s.execute("stroke.widthProfile.list", &json!({})).unwrap()), WidthProfile::PRESETS.iter().map(|p| p.id).collect::>()); } #[test] @@ -138,3 +152,63 @@ fn every_built_in_applies_and_the_params_doc_names_them() { assert_eq!(profile(&s, id).map(|w| w.points), (p.id != "uniform").then(|| p.points.to_vec())); } } + +#[test] +fn move_reorders_presets_and_saved_profiles_while_keeping_uniform_pinned() { + let mut s = Session::new(); + s.execute("file.new", &json!({"width": 400, "height": 400})).unwrap(); + let id = s.execute("shape.rectangle", &json!({"x": 20, "y": 20, "width": 100, "height": 80})).unwrap()["id"].as_u64().unwrap(); + s.execute("stroke.set", &json!({"weight": 6.0})).unwrap(); + s.execute("stroke.widthPoint.set", &json!({"id": id, "t": 0.35, "left": 12.0, "right": 3.0})).unwrap(); + s.execute("stroke.widthProfile.add", &json!({"name": "Alpha"})).unwrap(); + s.execute("stroke.widthPoint.set", &json!({"id": id, "t": 0.7, "left": 2.0, "right": 14.0})).unwrap(); + s.execute("stroke.widthProfile.add", &json!({"name": "Beta"})).unwrap(); + + // Uniform cannot be moved, even when named by display label. + assert!(s.execute("stroke.widthProfile.move", &json!({"name": "uniform", "to": 2})).is_err()); + assert!(s.execute("stroke.widthProfile.move", &json!({"name": "Uniform", "to": 1})).is_err()); + + // Moving a built-in ("wave") and a saved profile ("Beta") puts them at exact slots after Uniform. + s.execute("stroke.widthProfile.move", &json!({"name": "wave", "to": 0})).unwrap(); + s.execute("stroke.widthProfile.move", &json!({"name": "Beta", "to": 0})).unwrap(); + + let ids: Vec = s.profile_entries().map(|e| e.id.to_owned()).collect(); + assert_eq!(ids[0], "uniform", "Uniform stays pinned first"); + assert_eq!(ids[1], "Beta", "saved profile moves right after Uniform"); + assert_eq!(ids[2], "wave", "built-in preset moves after Beta"); + + // Order survives preferences JSON round-trip. + let saved_prefs = serde_json::to_string(&s.prefs).unwrap(); + let mut restored = Session::new(); + restored.prefs = serde_json::from_str(&saved_prefs).unwrap(); + let restored_ids: Vec = restored.profile_entries().map(|e| e.id.to_owned()).collect(); + assert_eq!(restored_ids, ids); + + // Reset works even if only built-ins were reordered (no saved profiles). + let mut built_ins_only = Session::new(); + built_ins_only.execute("stroke.widthProfile.move", &json!({"name": "wave", "to": 0})).unwrap(); + assert!(built_ins_only.execute("stroke.widthProfile.reset", &json!({})).is_ok()); + let default_ids: Vec = built_ins_only.profile_entries().map(|e| e.id.to_owned()).collect(); + assert_eq!(default_ids, vec!["uniform", "lens", "taperStart", "taperEnd", "pinch", "teardrop", "wave"]); +} + +#[test] +fn rename_updates_saved_profile_in_place_and_refuses_built_ins() { + let mut s = Session::new(); + s.execute("file.new", &json!({"width": 400, "height": 400})).unwrap(); + let id = s.execute("shape.rectangle", &json!({"x": 20, "y": 20, "width": 100, "height": 80})).unwrap()["id"].as_u64().unwrap(); + s.execute("stroke.set", &json!({"weight": 6.0})).unwrap(); + s.execute("stroke.widthPoint.set", &json!({"id": id, "t": 0.35, "left": 12.0, "right": 3.0})).unwrap(); + s.execute("stroke.widthProfile.add", &json!({"name": "Alpha"})).unwrap(); + s.execute("stroke.widthProfile.move", &json!({"name": "Alpha", "to": 1})).unwrap(); + + assert!(s.execute("stroke.widthProfile.rename", &json!({"name": "uniform", "to": "Other"})).is_err()); + assert!(s.execute("stroke.widthProfile.rename", &json!({"name": "lens", "to": "Other"})).is_err()); + assert!(s.execute("stroke.widthProfile.rename", &json!({"name": "Alpha", "to": " "})).is_err()); + assert!(s.execute("stroke.widthProfile.rename", &json!({"name": "Alpha", "to": "Wave"})).is_err()); + + s.execute("stroke.widthProfile.rename", &json!({"name": "Alpha", "to": "Renamed"})).unwrap(); + let ids: Vec = s.profile_entries().map(|e| e.id.to_owned()).collect(); + assert_eq!(ids[0], "uniform"); + assert_eq!(ids[2], "Renamed", "renamed profile keeps its custom slot"); +} diff --git a/crates/ui-egui/src/panels/stroke.rs b/crates/ui-egui/src/panels/stroke.rs index 8ea894b54a..c60d045fd6 100644 --- a/crates/ui-egui/src/panels/stroke.rs +++ b/crates/ui-egui/src/panels/stroke.rs @@ -5,6 +5,9 @@ use std::sync::LazyLock; +mod profile_picker; +use profile_picker::{ProfileAction, ProfileActions, ProfileOption, ProfileSample, ProfileSelect}; + use craft::behavior::{ColumnWidth, EditEvent, GestureId, IconId, Mixed}; use craft::draw::ui::stroke::{self as draw, StrokeEditor, StrokeField, StrokeSections}; use craft::keymap::CommandRef; @@ -887,50 +890,77 @@ pub(crate) fn profile_select(app: &mut VectorcraftApp, ui: &mut Ui) { brush_keeps_size(app, shown.as_ref()) }; let mut entries = vec![]; - // Each entry's id and silhouette, as `WidthProfile::points`. - let mut shapes: Vec<(String, Option>)> = vec![]; let mut picked = String::new(); - let mut divide = true; for e in app.session.profile_entries().filter(|e| brushed != Some(true) || e.matches(None)) { - if !e.built_in && std::mem::take(&mut divide) { - entries.push(Entry::separator()); - } if e.matches(cur) { picked = e.id.to_string(); } // A saved profile's name is the user's. - entries.push(Entry::new(e.id.to_string(), super::label_or_name(e.label, e.built_in).to_string())); - shapes.push((e.id.to_string(), silhouette(e.points).map(<[_]>::to_vec))); + entries.push(ProfileOption { + id: e.id.to_string(), + label: super::label_or_name(e.label, e.built_in).to_string(), + points: silhouette(e.points).map(<[ProfileSample]>::to_vec), + built_in: e.built_in, + }); } let brush_tip = tl!("The stroke's brush keeps its own size, so a width profile does not change it. Remove the brush to use a profile."); // While a brush keeps the size of a profiled stroke the select stays on, to its Uniform row, and still says why. let tip = TooltipSpec::new(if brushed == Some(true) { brush_tip } else { tl!("Variable Width Profile") }).disabled_text(brush_tip); // A profile no row shows (an unsaved one, or a listed one the brushed list leaves out) is drawn and named on the - // face under the empty id, without a row of its own. + // face without a row of its own. let unlisted = match cur { Some(profile) if picked.is_empty() => { - shapes.push((String::new(), silhouette(&profile.points).map(<[_]>::to_vec))); - Some(app.session.profile_entry(Some(profile)).map_or(tl!("Custom"), |e| super::label_or_name(e.label, e.built_in)).to_owned()) + let label = app.session.profile_entry(Some(profile)).map_or(tl!("Custom"), |e| super::label_or_name(e.label, e.built_in)).to_owned(); + Some((label, silhouette(&profile.points).map(<[ProfileSample]>::to_vec))) } _ => None, }; - let select = Select::new(tl!("Profile"), Bind::given(picked), &entries); + let actions = ProfileActions { + can_add: cur.is_some() && brushed != Some(true) && crate::menus::enabled(app, "stroke.widthProfile.add"), + can_delete: cur.as_ref().and_then(|p| app.session.profile_entry(Some(p))).is_some_and(|e| e.id != "uniform") + && brushed != Some(true) + && crate::menus::enabled(app, "stroke.widthProfile.delete"), + can_reset: crate::menus::enabled(app, "stroke.widthProfile.reset"), + can_reorder: brushed != Some(true), + }; + let select = ProfileSelect::new(tl!("Profile"), Bind::given(picked), entries, paint_profile, actions); let select = match unlisted { - Some(label) => select.unlisted_label(label), + Some((label, points)) => select.unlisted(label, points), None => select, }; let out = select - .picture(|id: &String, cx, rect| { - if let Some((_, points)) = shapes.iter().find(|(i, _)| i == id) { - paint_profile(cx, rect, points.as_deref()); - } - }) // Brushed strokes with a profile still open the list, to its Uniform row. .enabled(brushed != Some(false)) .tooltip(tip) .show(ui); // A cancel puts back what the gesture changed instead of applying the empty id, which names no profile. - apply_select(app, "profile", &out, |app, id| set(app, json!({"profile": id}))); + apply_select(app, "profile", &out.edit, |app, id| set(app, json!({"profile": id}))); + if let Some(action) = out.action { + apply_profile_action(app, action); + } +} + +fn apply_profile_action(app: &mut VectorcraftApp, action: ProfileAction) { + match action { + ProfileAction::Add => { + crate::menus::invoke(app, "stroke.widthProfile.add", json!({"name": app.session.next_profile_name()})); + } + ProfileAction::Delete(Some(name)) => { + crate::menus::invoke(app, "stroke.widthProfile.delete", json!({"name": name})); + } + ProfileAction::Delete(None) => { + crate::menus::invoke(app, "stroke.widthProfile.delete", json!({})); + } + ProfileAction::Reset => { + crate::dialogs::confirm::ask(app, tl!("Do you want to reset profiles?"), "", "stroke.widthProfile.reset", json!({})); + } + ProfileAction::Move { name, to } => { + crate::menus::invoke(app, "stroke.widthProfile.move", json!({"name": name, "to": to})); + } + ProfileAction::Rename { name, to } => { + crate::menus::invoke(app, "stroke.widthProfile.rename", json!({"name": name, "to": to})); + } + } } /// The command a ≡ menu row runs to ask for the name of a new saved profile. @@ -960,10 +990,10 @@ pub(crate) fn menu_states(app: &VectorcraftApp, states: &mut CommandStates) { states.set(CommandRef::new("ui.stroke.options"), CommandState::new().title(options)); let enabled = |id: &str| crate::menus::enabled(app, id); states.set(add_profile(app), CommandState::new().title(tl!("Add to Profiles…")).enabled(enabled("stroke.widthProfile.add"))); - // Deletes the selected stroke's saved profile. + // Deletes the selected stroke's non-Uniform profile. let shown = current_stroke(app).and_then(|s| s.profile); - let saved = shown.as_ref().and_then(|p| app.session.profile_entry(Some(p))).is_some_and(|e| !e.built_in); - states.set(CommandRef::new("stroke.widthProfile.delete"), CommandState::new().title(tl!("Delete Profile")).enabled(saved)); + let deletable = shown.as_ref().and_then(|p| app.session.profile_entry(Some(p))).is_some_and(|e| e.id != "uniform"); + states.set(CommandRef::new("stroke.widthProfile.delete"), CommandState::new().title(tl!("Delete Profile")).enabled(deletable)); states.set( CommandRef::new("stroke.widthProfile.reset"), CommandState::new().title(tl!("Reset Profiles")).enabled(enabled("stroke.widthProfile.reset")), diff --git a/crates/ui-egui/src/panels/stroke/profile_picker.rs b/crates/ui-egui/src/panels/stroke/profile_picker.rs new file mode 100644 index 0000000000..03c7a29b33 --- /dev/null +++ b/crates/ui-egui/src/panels/stroke/profile_picker.rs @@ -0,0 +1,672 @@ +//! The Variable Width Profile dropdown (`ProfileSelect`): a combo box whose popup shows the width +//! profile list with drag/keyboard reordering (keeping Uniform pinned first), built-in labels and +//! captionless user-added thumbnails, right-click row actions, and a footer bar with Add to +//! Profiles…, Delete Profile, and Reset Profiles. + +use std::borrow::Cow; +use std::collections::HashSet; + +use craft::behavior::overlay::MinWidth; +use craft::behavior::{ + CancelReason, ColumnKey, ColumnWidth, DisplayOrder, EditEvent, GesturePhase, HitLevel, HitPriority, IconId, ItemSource, Metrics, NavMove, + PartKey, Proposal, Selection, Sense, TypeAhead, +}; +use craft::ui::contract::overlay::OverlayFit; +use craft::ui::contract::{ + Access, ActivateOn, Bind, BindMut, CollectionEvent, ColumnSpec, Common, Component, Cx, Edit as _, EditResponse, Focus as _, HoverLead, Input, + LeadOnOpen, LeadSource, ListDrag, MeasureCx, Outcome, Overlay, OverlayUi, Overlays as _, PaintUi, PartsCx, Pointer as _, Popup, PopupHandle, + Props, ReorderRule, Role, Show as _, ShowCollection as _, ShowContainer as _, WordSetCx as _, request_rename, +}; +use craft::ui::layout_components::Stack; +use craft::ui::list::{List, ListRow, RowEvent, ThumbAspect, ThumbSize}; +use craft::ui::menu::{Menu, MenuItem}; +use craft::ui::pickers::{SelectFace, toggle_on_key}; +use craft::ui::primitives::ContentPainterCx; +use craft::ui::runtime::env::Label; +use craft::ui::runtime::focus::KeyUse; +use craft::ui::runtime::memory::Remember as _; +use craft::ui::runtime::overlay::CloseReason; +use craft::ui::sections::{FooterAction, FooterBar}; +use craft::ui::style::{ComponentStyle, StyleCx}; +use egui::{Rect, Response, Vec2}; + +const UNIFORM_ID: &str = "uniform"; +const SEPARATOR_KEY: &str = "__profile_separator__"; +const PROFILE_COL: ColumnKey = ColumnKey::new("profile"); +const DROPDOWN_MIN_WIDTH: f32 = 132.0; +const CLOSED_MAX_WIDTH: f32 = 145.0; +const PAGE_ROWS: isize = 12; +const FACE: PartKey = PartKey::new("face"); +const POPUP: &str = "list"; +const LIST_SALT: &str = "items"; + +/// One silhouette sample `(t, left_offset, right_offset)` returned by `stroke::silhouette`. +pub(super) type ProfileSample = (f64, f64, f64); + +fn profile_thumb_aspect() -> ThumbAspect { + ThumbAspect::new(14, 5) +} + +#[derive(Clone, Debug, PartialEq, ComponentStyle)] +struct ProfileGraphicStyle { + #[style(metrics)] + metrics: Metrics, +} + +/// Passive width-profile graphic for captionless user-added rows (`Sense::empty()` lets clicks and +/// reorder drags go straight through to the list row). +#[derive(Component, Props)] +#[component(content_painter, sample = ProfileGraphic::sample)] +struct ProfileGraphic { + #[common] + common: Common, + points: Option>, + paint: ProfilePaint, + size: Vec2, +} + +impl ProfileGraphic { + fn new(paint: ProfilePaint, points: Option>, size: Vec2) -> Self { + Self { common: Common::new(), points, paint, size } + } + + fn sample() -> Self { + Self::new(|_, _, _| {}, None, Vec2::new(80.0, 20.0)) + } +} + +impl Component for ProfileGraphic { + const ROLE: Role = Role::None; + const PARTS: bool = false; + const STOPS: bool = false; + const OVERLAYS: bool = false; + type Style = ProfileGraphicStyle; + type Output = Response; + + fn style(_: &StyleCx<'_>, _: ProfileGraphicStyleKey) -> ProfileGraphicStyle { + ProfileGraphicStyle { metrics: Metrics::new() } + } + + fn sense(&self) -> Sense { + Sense::empty() + } + + fn measure(&mut self, _: &MeasureCx<'_, Self>) -> Vec2 { + self.size + } + + fn paint(&mut self, ui: &mut PaintUi<'_>, cx: &Cx<'_, Self>) { + let painter = ui.content_painter(cx); + (self.paint)(&painter, cx.rect.shrink2(Vec2::new(0.0, 2.0)), self.points.as_deref()); + } + + fn finish(self, cx: Cx<'_, Self>) -> Response { + cx.response.clone() + } +} + +/// One entry in the Variable Width Profile dropdown. +#[derive(Clone, Debug, PartialEq)] +pub(super) struct ProfileOption { + /// Engine preset id (`"uniform"`, `"lens"`, …) or saved profile name. + pub id: String, + /// Display label shown in the closed face, and in the dropdown row for built-in profiles. + pub label: String, + /// Profile silhouette samples (`None` for Uniform). + pub points: Option>, + /// Built-in profiles keep their text captions in the dropdown and cannot be renamed. + pub built_in: bool, +} + +/// Enable state for the management controls inside the dropdown footer and row menu. +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] +pub(super) struct ProfileActions { + pub can_add: bool, + pub can_delete: bool, + pub can_reset: bool, + pub can_reorder: bool, +} + +/// A management action requested by the dropdown footer, row menu, drag-reorder, or inline rename. +#[derive(Clone, Debug, PartialEq, Eq)] +pub(super) enum ProfileAction { + Add, + Delete(Option), + Reset, + Move { name: String, to: usize }, + Rename { name: String, to: String }, +} + +/// Output of [`ProfileSelect`]: the underlying profile pick/preview edit and any management action. +#[derive(Debug)] +pub(super) struct ProfileSelectOutput { + pub edit: EditResponse, + pub action: Option, +} + +impl Outcome for ProfileSelectOutput { + type Value = String; + + fn response(&self) -> &Response { + &self.edit.response + } +} + +/// Paint callback shared between the closed face and list rows. +pub(super) type ProfilePaint = fn(&ContentPainterCx, Rect, Option<&[ProfileSample]>); + +#[derive(Clone, Debug, PartialEq, ComponentStyle)] +pub(super) struct ProfileSelectStyle { + #[style(metrics)] + metrics: Metrics, +} + +#[derive(Clone, Default)] +struct PickerMemory { + /// Target key of an open per-row context menu. + menu: Option, + /// Pre-typed query buffered on focus while closed. + type_ahead: TypeAhead, + /// Pending lead override when opening from closed type-ahead. + reveal_on_open: Option, + /// Whether a preview proposal was issued during this open popup session. + previewed: bool, +} + +/// Custom dropdown for stroke width profiles with Illustrator-style management footer and reordering. +#[derive(Component, Props)] +#[component(overlay, sample = ProfileSelect::sample)] +pub(super) struct ProfileSelect { + #[common] + common: Common, + value: Bind<'static, String>, + entries: Vec, + unlisted_label: Option, + unlisted_points: Option>, + paint: ProfilePaint, + actions: ProfileActions, + action: Option, +} + +impl ProfileSelect { + pub(super) fn new( + label: impl Into, + value: Bind<'static, String>, + entries: Vec, + paint: ProfilePaint, + actions: ProfileActions, + ) -> Self { + Self { common: Common::new(), value, entries, unlisted_label: None, unlisted_points: None, paint, actions, action: None }.label(label) + } + + pub(super) fn unlisted(mut self, label: String, points: Option>) -> Self { + self.unlisted_label = Some(label); + self.unlisted_points = points; + self + } + + fn sample() -> Self { + Self::new( + "Profile", + Bind::given("uniform".to_owned()), + vec![ProfileOption { id: "uniform".to_owned(), label: "Uniform".to_owned(), points: None, built_in: true }], + |_, _, _| {}, + ProfileActions::default(), + ) + } + + fn option(&self, id: &str) -> Option<&ProfileOption> { + self.entries.iter().find(|e| e.id == id) + } + + fn display_for(&self, current: Option<&String>) -> (String, Option>, bool) { + let Some(id) = current else { + return (tl!("Mixed").to_owned(), None, true); + }; + if let Some(opt) = self.option(id) { + return (opt.label.clone(), opt.points.clone(), false); + } + if let Some(label) = &self.unlisted_label { + return (label.clone(), self.unlisted_points.clone(), false); + } + (tl!("Mixed").to_owned(), None, true) + } + + fn face(&self, current: Option<&String>) -> SelectFace<'static> { + let (text, points, placeholder) = self.display_for(current); + let paint = self.paint; + let face = SelectFace::new(text).fit(true).thumb(profile_thumb_aspect(), move |cx, rect| paint(cx, rect, points.as_deref())); + if placeholder { face.placeholder() } else { face } + } + + fn has_separator(&self) -> bool { + self.entries.len() > 1 + } + + fn step_entry(&self, current: Option<&String>, steps: isize) -> Option { + if self.entries.is_empty() { + return None; + } + let cur = current.and_then(|id| self.entries.iter().position(|e| &e.id == id)); + let next = match cur { + Some(at) => (at as isize + steps).clamp(0, (self.entries.len() - 1) as isize) as usize, + None if steps >= 0 => 0, + None => self.entries.len() - 1, + }; + self.entries.get(next).map(|e| e.id.clone()) + } + + fn nav_target(&self, current: Option<&String>, mv: NavMove) -> Option { + match mv { + NavMove::Up | NavMove::Back => self.step_entry(current, -1), + NavMove::Down | NavMove::Forward => self.step_entry(current, 1), + NavMove::Start => self.entries.first().map(|e| e.id.clone()), + NavMove::End => self.entries.last().map(|e| e.id.clone()), + NavMove::PageUp => self.step_entry(current, -PAGE_ROWS), + NavMove::PageDown => self.step_entry(current, PAGE_ROWS), + _ => None, + } + } +} + +struct ProfileRows<'a> { + entries: &'a [ProfileOption], + separator: bool, +} + +impl<'a> ProfileRows<'a> { + fn entry_at(&self, at: usize) -> Option<&'a ProfileOption> { + if at == 0 { + return self.entries.first(); + } + if self.separator { if at == 1 { None } else { self.entries.get(at - 1) } } else { self.entries.get(at) } + } +} + +impl DisplayOrder for ProfileRows<'_> { + fn len(&self) -> usize { + self.entries.len() + usize::from(self.separator) + } + + fn key(&self, at: usize) -> String { + self.entry_at(at).map_or_else(|| SEPARATOR_KEY.to_owned(), |e| e.id.clone()) + } + + fn is_section(&self, at: usize) -> bool { + self.separator && at == 1 + } + + fn enabled(&self, at: usize) -> bool { + !(self.separator && at == 1) + } + + fn text(&self, at: usize) -> Option> { + self.entry_at(at).map(|e| Cow::Borrowed(e.label.as_str())) + } +} + +impl ItemSource for ProfileRows<'_> {} + +impl Component for ProfileSelect { + const ROLE: Role = Role::COMBO_BOX; + const INPUT: Input = Input::Pointer; + const KEYS: KeyUse = KeyUse::of(Input::Pointer).with_moves().with_type_ahead(); + type Style = ProfileSelectStyle; + type Output = ProfileSelectOutput; + + fn style(_: &StyleCx<'_>, _: ProfileSelectStyleKey) -> ProfileSelectStyle { + ProfileSelectStyle { metrics: Metrics::new() } + } + + fn sense(&self) -> Sense { + Sense::CLICK | Sense::FOCUS | Sense::TAKE_FOCUS | Sense::WHEEL + } + + fn measure(&mut self, cx: &MeasureCx<'_, Self>) -> Vec2 { + let mut size = cx.face(self.face(cx.value())); + let paint = self.paint; + let aspect = profile_thumb_aspect(); + for entry in self.entries.iter().filter(|e| e.built_in) { + let points = entry.points.clone(); + let mut face = SelectFace::new(entry.label.clone()).fit(true).thumb(aspect, move |painter, rect| paint(painter, rect, points.as_deref())); + let measured = cx.child("option", &mut face, Proposal::Ideal); + size.x = size.x.max(measured.x); + size.y = size.y.max(measured.y); + } + Vec2::new(size.x.clamp(DROPDOWN_MIN_WIDTH, CLOSED_MAX_WIDTH), size.y) + } + + fn parts(&mut self, rect: Rect, cx: &mut PartsCx<'_, Self>) { + cx.part(FACE, rect) + .sense(Sense::CLICK | Sense::HOVER | Sense::TAKE_FOCUS) + .priority(HitPriority::new(HitLevel::Body, 0)) + .pointer_only("Enter, Space and Alt+Down open the list") + .toggles(POPUP); + } + + fn bind(&mut self) -> Option> { + Some(self.value.reborrow()) + } + + fn update(&mut self, cx: &mut Cx<'_, Self>) { + let popup = cx.popup(POPUP); + toggle_on_key(cx, popup); + if popup.is_open(cx) { + return; + } + if let Some(wheel) = cx.take_wheel() { + let notch = if wheel.lines.y != 0.0 { + wheel.lines.y.trunc() as isize + } else if wheel.scroll.y != 0.0 { + wheel.scroll.y.signum() as isize + } else { + 0 + }; + if notch != 0 + && let Some(target) = self.step_entry(cx.value().cloned().as_ref(), -notch) + { + cx.propose(target); + cx.commit(); + } + } + if !cx.is_focused() { + return; + } + if let Some((mv, _)) = cx.intents().take_move() + && let Some(target) = self.nav_target(cx.value().cloned().as_ref(), mv) + { + cx.propose(target); + cx.commit(); + } + if let Some(typed) = cx.intents().take_text() { + let folder = cx.env.folder(); + let now = cx.ctx.input(|i| i.time); + let cur_idx = cx.value().and_then(|id| self.entries.iter().position(|e| &e.id == id)); + let matched = { + let mem = cx.memory::(); + let mut prefix = String::new(); + for ch in typed.chars() { + prefix = mem.type_ahead.push(ch, now).to_owned(); + } + TypeAhead::pick(&prefix, cur_idx, self.entries.len(), |at| Cow::Borrowed(self.entries[at].label.as_str()), |text| folder.key(text)) + }; + if let Some(at) = matched { + let id = self.entries[at].id.clone(); + let mem = cx.memory::(); + mem.reveal_on_open = Some(id.clone()); + mem.previewed = true; + cx.propose(id); + popup.open(cx); + } + } + } + + fn overlay(&mut self, ui: &mut OverlayUi<'_>, cx: &mut Cx<'_, Self>) { + let popup = cx.popup(POPUP); + let list_id = cx.id.with(LIST_SALT); + let mut overlay = Overlay::dropdown() + .fit(OverlayFit::Content) + .min_width(MinWidth::None) + .min_size(Vec2::new(DROPDOWN_MIN_WIDTH, 0.0)) + .body_scroll(false) + .list(list_id); + overlay.dismiss.on_activate = false; + + let fresh = Popup::opening(popup, cx); + if fresh { + let mem = cx.memory::(); + mem.menu = None; + if mem.reveal_on_open.is_none() { + mem.previewed = false; + } + } + + let current = cx.value().cloned().filter(|id| !id.is_empty()); + let reveal = cx.memory::().reveal_on_open.take().or_else(|| fresh.then(|| current.clone()).flatten()); + let selection = current.as_ref().map_or_else(Selection::default, |id| Selection::single(id.clone())); + let saved: HashSet = self.entries.iter().filter(|e| !e.built_in).map(|e| e.id.clone()).collect(); + let can_reorder = self.actions.can_reorder && self.has_separator(); + let view = PopupView { list_id, selection: &selection, reveal: reveal.as_deref(), saved: &saved, can_reorder }; + + let body_out = ui.show(popup, overlay, |ui, _| show_popup_body(ui, cx, self, view)); + + if let Some((events, footer_action, menu_action)) = body_out { + self.handle_list_events(cx, popup, &events); + if let Some(act) = footer_action.or(menu_action) { + if matches!(act, ProfileAction::Reset) { + popup.close(cx); + } + self.action = Some(act); + } + } + + if let Some(reason) = ui.closing(popup) { + let mem = cx.memory::(); + mem.menu = None; + if std::mem::take(&mut mem.previewed) { + let cancel = if reason == CloseReason::Escape { CancelReason::Escape } else { CancelReason::Dismissed }; + cx.cancel(cancel); + } + } + } + + fn access(&self, access: &mut Access, cx: &Cx<'_, Self>) { + let (text, _, _) = self.display_for(cx.value()); + access.value(text); + } + + fn paint(&mut self, ui: &mut PaintUi<'_>, cx: &Cx<'_, Self>) { + ui.face(FACE, self.face(cx.value())); + } + + fn finish(mut self, cx: Cx<'_, Self>) -> ProfileSelectOutput { + ProfileSelectOutput { edit: cx.edit_response(), action: self.action.take() } + } +} + +impl ProfileSelect { + fn handle_list_events(&mut self, cx: &mut Cx<'_, Self>, popup: PopupHandle, events: &[CollectionEvent]) { + for event in events { + match event { + CollectionEvent::LeadMoved { key, by: LeadSource::Keys } if key != SEPARATOR_KEY => { + cx.memory::().previewed = true; + cx.propose(key.clone()); + } + CollectionEvent::Activate(key) | CollectionEvent::Item(key, RowEvent::ThumbClicked { .. }) if key != SEPARATOR_KEY => { + cx.propose(key.clone()); + cx.commit(); + cx.memory::().previewed = false; + popup.close(cx); + } + CollectionEvent::Reorder(EditEvent::Set { after, .. } | EditEvent::Commit { after, .. }) => { + if after.key != UNIFORM_ID && after.key != SEPARATOR_KEY { + self.action = Some(ProfileAction::Move { name: after.key.clone(), to: after.to.saturating_sub(2) }); + } + } + CollectionEvent::Rename(edit) => { + let ended = matches!(edit.phase(), Some(GesturePhase::Commit) | None); + if let Some(rename) = edit.value().filter(|_| ended) { + let trimmed = rename.name.trim(); + if !trimmed.is_empty() && trimmed != rename.key { + self.action = Some(ProfileAction::Rename { name: rename.key.clone(), to: trimmed.to_owned() }); + } + } + } + _ => {} + } + } + } +} + +#[derive(Clone, Copy)] +struct PopupView<'a> { + list_id: egui::Id, + selection: &'a Selection, + reveal: Option<&'a str>, + saved: &'a HashSet, + can_reorder: bool, +} + +fn show_popup_body( + ui: &mut egui::Ui, + cx: &mut Cx<'_, ProfileSelect>, + picker: &ProfileSelect, + view: PopupView<'_>, +) -> (Vec>, Option, Option) { + let mut footer_action = None; + let mut events = Vec::new(); + let mut list_resp = None; + + let label = cx.label(); + let rows = ProfileRows { entries: &picker.entries, separator: picker.has_separator() }; + let paint = picker.paint; + let actions = picker.actions; + let builtin_aspect = profile_thumb_aspect(); + + Stack::new() + .fill_width() + .footer(|ui, _| { + footer_action = show_footer(ui, view.list_id, actions); + }) + .show(ui, |ui, _| { + let saved_for_rename = view.saved.clone(); + let mut list = List::::options(label.clone()) + .id(view.list_id) + .header(false) + .columns(vec![ColumnSpec::new(PROFILE_COL, Label::Empty, ColumnWidth::fill(1.0))]) + .hover_lead(HoverLead::Lead) + .activate(ActivateOn::Click) + .lead_on_open(LeadOnOpen::First) + .selection(Bind::given(view.selection.clone())) + .can_rename(move |key: &String| saved_for_rename.contains(key)); + + if view.can_reorder { + list = list + .can_drag(|key: &String| key != UNIFORM_ID && key != SEPARATOR_KEY) + .reorder(ReorderRule::new()) + .accepts(|drag, _, insert| !drag.keys.iter().any(|k| k == UNIFORM_ID || k == SEPARATOR_KEY) && insert >= 2); + } + if let Some(key) = view.reveal { + list = list.reveal(key.to_owned()); + } + + let out = list.show_items(ui, &rows, &mut |key, icx| { + if key == SEPARATOR_KEY { + return ListRow::separator(); + } + let Some(entry) = picker.option(key) else { + return ListRow::spacer(); + }; + let points = entry.points.clone(); + if entry.built_in { + ListRow::new(entry.label.clone()).option().cells(icx.cells()).thumb_aspect( + ThumbSize::Small, + builtin_aspect, + move |painter, rect| paint(painter, rect, points.as_deref()), + ) + } else { + ListRow::new("").accessible_name(entry.label.clone()).option().cells(icx.cells()).cell_field( + PROFILE_COL, + ProfileGraphic::new(paint, points, Vec2::new(80.0, 20.0)), + |_| {}, + ) + } + }); + events = out.events; + list_resp = Some(out.response); + }); + + let list_response = list_resp.unwrap_or_else(|| ui.response().clone()); + for event in &events { + if let CollectionEvent::ContextMenu(request) = event + && request.key != SEPARATOR_KEY + { + cx.memory::().menu = Some(request.key.clone()); + } + } + let menu_action = show_row_menu(ui, cx, picker, view.list_id, &list_response, view.saved); + (events, footer_action, menu_action) +} + +fn show_footer(ui: &mut egui::Ui, list_id: egui::Id, actions: ProfileActions) -> Option { + // End-edge placement lays out actions from the right edge inward, so index 0 (`Reset Profiles`) + // sits rightmost, with `Delete Profile` and `Add to Profiles` to its left. + let bar = FooterBar::actions([ + FooterAction::new(IconId::new("rotate-ccw"), tl!("Reset Profiles")).enabled(actions.can_reset), + FooterAction::new(IconId::new("trash-2"), tl!("Delete Profile")) + .enabled(actions.can_delete) + .takes_drops_disabled(true) + .drop_hint(tl!("Delete Profile")) + .accepts_drops::>(move |drag| drag.list == list_id && drag.keys.iter().any(|k| k != UNIFORM_ID && k != SEPARATOR_KEY)), + FooterAction::new(IconId::new("dc-new-item"), tl!("Add to Profiles")).enabled(actions.can_add), + ]) + .show_footer(ui); + + if let Some(drop) = &bar.dropped + && drop.index == 1 + && let Some(key) = drop.payload::>().and_then(|d| d.keys.iter().find(|k| *k != UNIFORM_ID && *k != SEPARATOR_KEY)) + { + return Some(ProfileAction::Delete(Some(key.clone()))); + } + match bar.picked { + Some(0) => Some(ProfileAction::Reset), + Some(1) => Some(ProfileAction::Delete(None)), + Some(2) => Some(ProfileAction::Add), + _ => None, + } +} + +fn show_row_menu( + ui: &mut egui::Ui, + cx: &mut Cx<'_, ProfileSelect>, + picker: &ProfileSelect, + list_id: egui::Id, + anchor: &Response, + saved: &HashSet, +) -> Option { + let target = cx.memory::().menu.clone()?; + let Some(entry) = picker.option(&target) else { + cx.memory::().menu = None; + return None; + }; + let title = entry.label.clone(); + let is_uniform = target == UNIFORM_ID; + let is_saved = saved.contains(&target); + let pos = picker.entries.iter().position(|e| e.id == target).unwrap_or(0); + let last = picker.entries.len().saturating_sub(1); + let can_up = !is_uniform && picker.actions.can_reorder && pos > 1; + let can_down = !is_uniform && picker.actions.can_reorder && pos < last; + + let mut action = None; + let mut start_rename = false; + let shown = Menu::context(title, anchor).show(ui, |ui, _| { + if is_uniform { + if MenuItem::new(tl!("Reset Profiles")).enabled(picker.actions.can_reset).show(ui).ran { + action = Some(ProfileAction::Reset); + } + return; + } + if MenuItem::new(tl!("Move Up")).enabled(can_up).show(ui).ran { + // `entries[1..]` holds reorderable items, so removing `target` at `pos - 1` and placing + // it one slot earlier targets `pos - 2`. + action = Some(ProfileAction::Move { name: target.clone(), to: pos.saturating_sub(2) }); + } + if MenuItem::new(tl!("Move Down")).enabled(can_down).show(ui).ran { + // After removing `target` at `pos - 1`, placing it one slot later targets `pos`. + action = Some(ProfileAction::Move { name: target.clone(), to: pos }); + } + if is_saved && MenuItem::new(tl!("Rename…")).show(ui).ran { + start_rename = true; + } + if MenuItem::new(tl!("Delete Profile")).show(ui).ran { + action = Some(ProfileAction::Delete(Some(target.clone()))); + } + }); + if start_rename { + request_rename(ui, list_id, &target); + } + if action.is_some() || start_rename || shown.closed.is_some() { + cx.memory::().menu = None; + } + action +} diff --git a/crates/ui-egui/src/panels/tests_strokedepth.rs b/crates/ui-egui/src/panels/tests_strokedepth.rs index b64f2954e1..2492b28847 100644 --- a/crates/ui-egui/src/panels/tests_strokedepth.rs +++ b/crates/ui-egui/src/panels/tests_strokedepth.rs @@ -320,3 +320,186 @@ fn arrowhead_select_lists_the_notched_arrow_after_arrow() { panel.click("Notched Arrow"); assert_eq!(current_stroke(&panel.app()).and_then(|s| s.end_arrow), Some(vectorcraft_doc::Arrowhead::NotchedArrow)); } + +#[test] +fn dropdown_footer_manages_profiles_and_confirms_reset() { + use craft::ui::contract::Role; + use craft::ui::dialog::StackDialog as _; + use egui::Modifiers; + + let mut session = vectorcraft_engine::Session::new(); + session.execute("file.new", &serde_json::json!({"width": 400, "height": 400})).unwrap(); + let id = session.execute("shape.rectangle", &serde_json::json!({"x": 20, "y": 20, "width": 100, "height": 80})).unwrap()["id"].as_u64().unwrap(); + session.execute("stroke.set", &serde_json::json!({"weight": 6.0, "profile": "taperStart"})).unwrap(); + + let app = crate::VectorcraftApp::new(session, Default::default()); + let mut panel = crate::tests::panel_harness::Panel::new(app, super::stroke::profile_select); + + assert!(panel.rect("Profile").width() <= 165.0, "closed dropdown shrinks to compact width: {:?}", panel.rect("Profile")); + panel.click_role("Profile", Role::COMBO_BOX); + assert!(!panel.shows("Flip Along"), "Flip Along button is not shown inside the dropdown"); + assert!(!panel.shows("Flip Across"), "Flip Across button is not shown inside the dropdown"); + assert!(panel.shows("Add to Profiles"), "dropdown shows Add to Profiles footer button"); + assert!(panel.shows("Delete Profile"), "dropdown shows Delete Profile footer button"); + assert!(panel.shows("Reset Profiles"), "dropdown shows Reset Profiles footer button"); + assert!(panel.enabled("Delete Profile"), "non-Uniform built-in profile can be deleted"); + assert!( + panel.rect("Reset Profiles").left() >= panel.rect("Delete Profile").right() - 0.5 + && panel.rect("Delete Profile").left() >= panel.rect("Add to Profiles").right() - 0.5, + "Reset Profiles sits rightmost in the footer" + ); + assert!(panel.rect("Wave").width() <= 165.0, "dropdown shrinks to fit its items: {:?}", panel.rect("Wave")); + + // Selecting Uniform disables Delete Profile; Uniform cannot be deleted. + panel.click("Uniform"); + panel.click_role("Profile", Role::COMBO_BOX); + assert!(!panel.enabled("Delete Profile"), "Uniform profile cannot be deleted"); + + // Non-Uniform built-in ("Taper Start") can be deleted directly from the dropdown footer. + panel.click("Taper Start"); + panel.click_role("Profile", Role::COMBO_BOX); + assert!(panel.enabled("Delete Profile")); + panel.click("Delete Profile"); + assert!(!panel.app().session.profile_entries().any(|e| e.id == "taperStart"), "built-in preset was deleted"); + + // Custom profile: clicking Add to Profiles saves immediately without opening a name dialog, + // and user-added rows hide their text captions in the dropdown. + panel.app().session.execute("stroke.widthPoint.set", &serde_json::json!({"id": id, "t": 0.35, "left": 12.0, "right": 3.0})).unwrap(); + panel.frame(); + assert_eq!(panel.value_role("Profile", Role::COMBO_BOX).as_deref(), Some("Custom")); + panel.click("Add to Profiles"); + assert!(crate::tests::picks::open_dialogs(&panel.app()).is_empty(), "Add to Profiles does not prompt for a name"); + let saved_label = panel.app().session.profile_entries().find(|e| !e.built_in).map(|e| e.label.to_owned()).unwrap(); + let face_rect = panel.rect("Profile"); + let popup_captions: Vec<_> = panel.painted(&saved_label).into_iter().filter(|r| !face_rect.contains(r.center())).collect(); + assert!(popup_captions.is_empty(), "user-added profile shows no caption text in the pulldown: {popup_captions:?}"); + assert!(!panel.painted("Wave").is_empty(), "built-in profile still shows its caption text"); + + // Dragging a user-added profile row reorders it past built-in profiles while keeping Uniform first. + let wave_rect = panel.rect("Wave"); + let saved_rect = panel.rect(&saved_label); + let top_target = wave_rect.left_top() + egui::vec2(wave_rect.width() * 0.75, 2.0); + panel.drag_between(saved_rect.center(), top_target, Modifiers::NONE); + let order_after_drag: Vec = panel.app().session.profile_entries().map(|e| e.id.to_owned()).collect(); + let saved_pos = order_after_drag.iter().position(|id| id == &saved_label).unwrap(); + let wave_pos = order_after_drag.iter().position(|id| id == "wave").unwrap(); + assert_eq!(order_after_drag[0], "uniform", "Uniform stays first after drag reorder"); + assert!( + saved_pos < wave_pos, + "custom profile reordered ahead of Wave by dragging (saved_rect={saved_rect:?}, wave_rect={wave_rect:?}, open_after={}): {order_after_drag:?}", + panel.shows("Reset Profiles") + ); + + // No three-dot menu buttons appear next to any profile row. + assert!(!panel.shows("More (Uniform)")); + assert!(!panel.shows("More (Wave)")); + assert!(!panel.shows(&format!("More ({saved_label})"))); + + // Clicking Reset Profiles closes the dropdown and opens the confirmation prompt ("Do you want to reset profiles?"). + panel.click("Reset Profiles"); + assert!(!panel.shows("Add to Profiles"), "dropdown closes when confirmation prompt opens"); + let ctx = panel.ctx().clone(); + { + let mut app = panel.app(); + let (message, _, command) = crate::dialogs::confirm::open_question(&app).expect("reset confirmation is open"); + assert_eq!(message, "Do you want to reset profiles?"); + assert_eq!(command, "stroke.widthProfile.reset"); + app.dialogs().unwrap().with(|host| { + let qid = host.get::().expect("reset confirmation is open").id(); + assert!(host.cancel_by_id(&ctx, qid)); + }); + crate::dialogs::confirm::pump(&mut app, &ctx); + assert!(app.session.profile_entries().any(|e| !e.built_in), "cancelling reset preserves profiles"); + } + + // Confirming OK executes the reset and restores deleted built-ins. + panel.click_role("Profile", Role::COMBO_BOX); + panel.click("Reset Profiles"); + let mut app = panel.app(); + app.dialogs().unwrap().with(|host| { + let qid = host.get::().expect("reset confirmation is open").id(); + host.set_json_field(&ctx, qid, "choice", serde_json::json!("proceed")).unwrap(); + assert!(host.confirm_by_id(&ctx, qid)); + }); + crate::dialogs::confirm::pump(&mut app, &ctx); + assert!(app.session.profile_entries().all(|e| e.built_in), "Reset Profiles clears saved presets"); + assert!(app.session.profile_entries().any(|e| e.id == "taperStart"), "Reset Profiles restores deleted built-ins"); +} + +#[test] +fn dropdown_reordering_moves_presets_via_row_menu_and_keeps_uniform_pinned() { + use craft::ui::contract::Role; + + let mut session = vectorcraft_engine::Session::new(); + session.execute("file.new", &serde_json::json!({"width": 400, "height": 400})).unwrap(); + let id = session.execute("shape.rectangle", &serde_json::json!({"x": 20, "y": 20, "width": 100, "height": 80})).unwrap()["id"].as_u64().unwrap(); + session.execute("stroke.set", &serde_json::json!({"weight": 6.0})).unwrap(); + session.execute("stroke.widthPoint.set", &serde_json::json!({"id": id, "t": 0.35, "left": 12.0, "right": 3.0})).unwrap(); + session.execute("stroke.widthProfile.add", &serde_json::json!({"name": "Mine"})).unwrap(); + + let app = crate::VectorcraftApp::new(session, Default::default()); + let mut panel = crate::tests::panel_harness::Panel::new(app, super::stroke::profile_select); + + assert!(panel.rect("Profile").width() <= 165.0, "closed dropdown shrinks to compact width: {:?}", panel.rect("Profile")); + panel.click_role("Profile", Role::COMBO_BOX); + + // Uniform's context menu only exposes Reset Profiles and never offers Move Up / Move Down. + panel.secondary_click("Uniform"); + assert!(panel.shows_role("Reset Profiles", Role::MENU_ITEM), "Uniform menu shows Reset Profiles"); + assert!(!panel.shows("Move Up"), "Uniform cannot move up"); + assert!(!panel.shows("Move Down"), "Uniform cannot move down"); + assert!(!panel.shows_role("Delete Profile", Role::MENU_ITEM), "Uniform cannot be deleted"); + panel.key(egui::Key::Escape, egui::Modifiers::NONE); + + // Moving saved profile "Mine" up moves it ahead of Wave while leaving Uniform at index 0. + panel.secondary_click("Mine"); + assert!(panel.shows_role("Rename…", Role::MENU_ITEM), "saved profile exposes Rename…"); + assert!(panel.shows_role("Delete Profile", Role::MENU_ITEM), "saved profile exposes Delete Profile"); + panel.click("Move Up"); + + let ids: Vec = panel.app().session.profile_entries().map(|e| e.id.to_owned()).collect(); + assert_eq!(ids[0], "uniform", "Uniform remains pinned first after reordering"); + assert_eq!(ids[ids.len() - 2], "Mine", "Mine moves up one slot before Wave"); + + // Move built-in "Wave" up past "Mine" too. + panel.secondary_click("Wave"); + panel.click("Move Up"); + let ids_after: Vec = panel.app().session.profile_entries().map(|e| e.id.to_owned()).collect(); + assert_eq!(ids_after[0], "uniform"); + let wave_pos = ids_after.iter().position(|id| id == "wave").unwrap(); + let mine_pos = ids_after.iter().position(|id| id == "Mine").unwrap(); + assert!(wave_pos < mine_pos, "built-in preset reorders past saved profile: {ids_after:?}"); +} + +#[test] +fn dropdown_expands_into_available_vertical_space() { + use craft::ui::contract::Role; + + let mut session = vectorcraft_engine::Session::new(); + session.execute("file.new", &serde_json::json!({"width": 400, "height": 400})).unwrap(); + let id = session.execute("shape.rectangle", &serde_json::json!({"x": 20, "y": 20, "width": 100, "height": 80})).unwrap()["id"].as_u64().unwrap(); + session.execute("stroke.set", &serde_json::json!({"weight": 6.0})).unwrap(); + for i in 0..10 { + session + .execute( + "stroke.widthPoint.set", + &serde_json::json!({"id": id, "t": 0.25 + 0.05 * f64::from(i), "left": 8.0 + f64::from(i), "right": 4.0}), + ) + .unwrap(); + session.execute("stroke.widthProfile.add", &serde_json::json!({"name": format!("Saved {i}")})).unwrap(); + } + + let app = crate::VectorcraftApp::new(session, Default::default()); + let mut panel = crate::tests::panel_harness::Panel::new(app, super::stroke::profile_select); + + assert!(panel.rect("Profile").width() <= 165.0, "closed dropdown stays compact even with custom profiles: {:?}", panel.rect("Profile")); + panel.click_role("Profile", Role::COMBO_BOX); + assert!(panel.shows("Saved 9"), "dropdown expands past 12 rows when space is available"); + assert!( + panel.rect("Saved 9").bottom() - panel.rect("Uniform").top() > 350.0, + "dropdown opens taller when vertical space allows: uniform={:?}, last={:?}", + panel.rect("Uniform"), + panel.rect("Saved 9") + ); + assert!(panel.shows("Reset Profiles"), "footer remains visible with expanded list"); +} From 566c790db0984d01ba756b33e13ddf001acde54d Mon Sep 17 00:00:00 2001 From: erolkarino Date: Sat, 5 Dec 2026 11:26:38 +0300 Subject: [PATCH 13/62] fix(stroke): address CodeRabbit review feedback on ProfileSelect - Use typed ProfileRowKey enum instead of a magic separator string - Add dropdown surface look to ProfileSelectStyle for focus indication - Use wheel_step and cx.wheel_run so fractional wheel deltas and undo coalescing work cleanly - Commit keyboard preview on CloseReason::FocusLeft(FocusMove::Keys) (Tab) - Add panel test coverage for sentinel profile names, Tab preview commit, and fractional wheel stepping --- .../src/panels/stroke/profile_picker.rs | 145 +++++++++++------- .../ui-egui/src/panels/tests_strokedepth.rs | 37 +++++ 2 files changed, 127 insertions(+), 55 deletions(-) diff --git a/crates/ui-egui/src/panels/stroke/profile_picker.rs b/crates/ui-egui/src/panels/stroke/profile_picker.rs index 03c7a29b33..c611c47461 100644 --- a/crates/ui-egui/src/panels/stroke/profile_picker.rs +++ b/crates/ui-egui/src/panels/stroke/profile_picker.rs @@ -6,10 +6,11 @@ use std::borrow::Cow; use std::collections::HashSet; +use craft::behavior::nav::{StepResult, ValueAxes, ValueSteps}; use craft::behavior::overlay::MinWidth; use craft::behavior::{ CancelReason, ColumnKey, ColumnWidth, DisplayOrder, EditEvent, GesturePhase, HitLevel, HitPriority, IconId, ItemSource, Metrics, NavMove, - PartKey, Proposal, Selection, Sense, TypeAhead, + PartKey, Proposal, Selection, Sense, TypeAhead, WheelPhase, wheel_step, }; use craft::ui::contract::overlay::OverlayFit; use craft::ui::contract::{ @@ -23,15 +24,14 @@ use craft::ui::menu::{Menu, MenuItem}; use craft::ui::pickers::{SelectFace, toggle_on_key}; use craft::ui::primitives::ContentPainterCx; use craft::ui::runtime::env::Label; -use craft::ui::runtime::focus::KeyUse; +use craft::ui::runtime::focus::{FocusMove, KeyUse}; use craft::ui::runtime::memory::Remember as _; use craft::ui::runtime::overlay::CloseReason; use craft::ui::sections::{FooterAction, FooterBar}; -use craft::ui::style::{ComponentStyle, StyleCx}; +use craft::ui::style::{ComponentStyle, StyleCx, SurfaceLook}; use egui::{Rect, Response, Vec2}; const UNIFORM_ID: &str = "uniform"; -const SEPARATOR_KEY: &str = "__profile_separator__"; const PROFILE_COL: ColumnKey = ColumnKey::new("profile"); const DROPDOWN_MIN_WIDTH: f32 = 132.0; const CLOSED_MAX_WIDTH: f32 = 145.0; @@ -40,6 +40,27 @@ const FACE: PartKey = PartKey::new("face"); const POPUP: &str = "list"; const LIST_SALT: &str = "items"; +/// Row identity in the profile list, keeping the non-interactive divider distinct from any +/// user-saved profile name (even a literal `"__profile_separator__"`). +#[derive(Clone, Debug, PartialEq, Eq, Hash)] +enum ProfileRowKey { + Profile(String), + Separator, +} + +impl ProfileRowKey { + fn profile(&self) -> Option<&str> { + match self { + ProfileRowKey::Profile(id) => Some(id.as_str()), + ProfileRowKey::Separator => None, + } + } + + fn is_reorderable(&self) -> bool { + self.profile().is_some_and(|id| id != UNIFORM_ID) + } +} + /// One silhouette sample `(t, left_offset, right_offset)` returned by `stroke::silhouette`. pub(super) type ProfileSample = (f64, f64, f64); @@ -157,6 +178,8 @@ pub(super) type ProfilePaint = fn(&ContentPainterCx, Rect, Option<&[ProfileSampl #[derive(Clone, Debug, PartialEq, ComponentStyle)] pub(super) struct ProfileSelectStyle { + #[style(surface)] + surface: SurfaceLook, #[style(metrics)] metrics: Metrics, } @@ -283,13 +306,13 @@ impl<'a> ProfileRows<'a> { } } -impl DisplayOrder for ProfileRows<'_> { +impl DisplayOrder for ProfileRows<'_> { fn len(&self) -> usize { self.entries.len() + usize::from(self.separator) } - fn key(&self, at: usize) -> String { - self.entry_at(at).map_or_else(|| SEPARATOR_KEY.to_owned(), |e| e.id.clone()) + fn key(&self, at: usize) -> ProfileRowKey { + self.entry_at(at).map_or(ProfileRowKey::Separator, |e| ProfileRowKey::Profile(e.id.clone())) } fn is_section(&self, at: usize) -> bool { @@ -305,7 +328,7 @@ impl DisplayOrder for ProfileRows<'_> { } } -impl ItemSource for ProfileRows<'_> {} +impl ItemSource for ProfileRows<'_> {} impl Component for ProfileSelect { const ROLE: Role = Role::COMBO_BOX; @@ -314,12 +337,12 @@ impl Component for ProfileSelect { type Style = ProfileSelectStyle; type Output = ProfileSelectOutput; - fn style(_: &StyleCx<'_>, _: ProfileSelectStyleKey) -> ProfileSelectStyle { - ProfileSelectStyle { metrics: Metrics::new() } + fn style(cx: &StyleCx<'_>, _: ProfileSelectStyleKey) -> ProfileSelectStyle { + ProfileSelectStyle { surface: cx.dropdown(), metrics: Metrics::new() } } fn sense(&self) -> Sense { - Sense::CLICK | Sense::FOCUS | Sense::TAKE_FOCUS | Sense::WHEEL + Sense::CLICK | Sense::FOCUS | Sense::TAKE_FOCUS | Sense::WHEEL_Y } fn measure(&mut self, cx: &MeasureCx<'_, Self>) -> Vec2 { @@ -351,24 +374,25 @@ impl Component for ProfileSelect { fn update(&mut self, cx: &mut Cx<'_, Self>) { let popup = cx.popup(POPUP); toggle_on_key(cx, popup); - if popup.is_open(cx) { - return; + if !popup.is_open(cx) && !cx.in_wheel_run() && matches!(cx.gesture(), Some(GesturePhase::Begin | GesturePhase::Update)) { + cx.cancel(CancelReason::Dismissed); } if let Some(wheel) = cx.take_wheel() { - let notch = if wheel.lines.y != 0.0 { - wheel.lines.y.trunc() as isize - } else if wheel.scroll.y != 0.0 { - wheel.scroll.y.signum() as isize - } else { - 0 - }; - if notch != 0 - && let Some(target) = self.step_entry(cx.value().cloned().as_ref(), -notch) + if matches!(wheel.phase, WheelPhase::End) { + cx.wheel_run(wheel.phase, None); + } else if let StepResult::Set(along) = + wheel_step(&ValueSteps::new(0.0, -f64::MAX, f64::MAX, 1.0, 1.0).fine(1.0), ValueAxes::Both, &wheel, cx.env.direction().is_rtl()) + && along != 0.0 { - cx.propose(target); - cx.commit(); + let steps = along.round() as isize; + if let Some(target) = self.step_entry(cx.value().cloned().as_ref(), -steps) { + cx.wheel_run(wheel.phase, Some(target)); + } } } + if popup.is_open(cx) { + return; + } if !cx.is_focused() { return; } @@ -422,11 +446,12 @@ impl Component for ProfileSelect { } let current = cx.value().cloned().filter(|id| !id.is_empty()); - let reveal = cx.memory::().reveal_on_open.take().or_else(|| fresh.then(|| current.clone()).flatten()); - let selection = current.as_ref().map_or_else(Selection::default, |id| Selection::single(id.clone())); + let reveal = + cx.memory::().reveal_on_open.take().or_else(|| fresh.then(|| current.clone()).flatten()).map(ProfileRowKey::Profile); + let selection = current.as_ref().map_or_else(Selection::default, |id| Selection::single(ProfileRowKey::Profile(id.clone()))); let saved: HashSet = self.entries.iter().filter(|e| !e.built_in).map(|e| e.id.clone()).collect(); let can_reorder = self.actions.can_reorder && self.has_separator(); - let view = PopupView { list_id, selection: &selection, reveal: reveal.as_deref(), saved: &saved, can_reorder }; + let view = PopupView { list_id, selection: &selection, reveal: reveal.as_ref(), saved: &saved, can_reorder }; let body_out = ui.show(popup, overlay, |ui, _| show_popup_body(ui, cx, self, view)); @@ -443,9 +468,13 @@ impl Component for ProfileSelect { if let Some(reason) = ui.closing(popup) { let mem = cx.memory::(); mem.menu = None; - if std::mem::take(&mut mem.previewed) { - let cancel = if reason == CloseReason::Escape { CancelReason::Escape } else { CancelReason::Dismissed }; - cx.cancel(cancel); + if std::mem::take(&mut mem.previewed) && matches!(cx.gesture(), Some(GesturePhase::Begin | GesturePhase::Update)) { + match reason { + CloseReason::FocusLeft(FocusMove::Keys) => cx.commit(), + CloseReason::FocusLeft(_) => cx.cancel(CancelReason::Blur), + CloseReason::Escape => cx.cancel(CancelReason::Escape), + _ => cx.cancel(CancelReason::Dismissed), + } } } } @@ -465,30 +494,35 @@ impl Component for ProfileSelect { } impl ProfileSelect { - fn handle_list_events(&mut self, cx: &mut Cx<'_, Self>, popup: PopupHandle, events: &[CollectionEvent]) { + fn handle_list_events(&mut self, cx: &mut Cx<'_, Self>, popup: PopupHandle, events: &[CollectionEvent]) { for event in events { match event { - CollectionEvent::LeadMoved { key, by: LeadSource::Keys } if key != SEPARATOR_KEY => { + CollectionEvent::LeadMoved { key: ProfileRowKey::Profile(key), by: LeadSource::Keys } => { cx.memory::().previewed = true; cx.propose(key.clone()); } - CollectionEvent::Activate(key) | CollectionEvent::Item(key, RowEvent::ThumbClicked { .. }) if key != SEPARATOR_KEY => { + CollectionEvent::Activate(ProfileRowKey::Profile(key)) + | CollectionEvent::Item(ProfileRowKey::Profile(key), RowEvent::ThumbClicked { .. }) => { cx.propose(key.clone()); cx.commit(); cx.memory::().previewed = false; popup.close(cx); } CollectionEvent::Reorder(EditEvent::Set { after, .. } | EditEvent::Commit { after, .. }) => { - if after.key != UNIFORM_ID && after.key != SEPARATOR_KEY { - self.action = Some(ProfileAction::Move { name: after.key.clone(), to: after.to.saturating_sub(2) }); + if let ProfileRowKey::Profile(key) = &after.key + && key != UNIFORM_ID + { + self.action = Some(ProfileAction::Move { name: key.clone(), to: after.to.saturating_sub(2) }); } } CollectionEvent::Rename(edit) => { let ended = matches!(edit.phase(), Some(GesturePhase::Commit) | None); - if let Some(rename) = edit.value().filter(|_| ended) { + if let Some(rename) = edit.value().filter(|_| ended) + && let ProfileRowKey::Profile(key) = &rename.key + { let trimmed = rename.name.trim(); - if !trimmed.is_empty() && trimmed != rename.key { - self.action = Some(ProfileAction::Rename { name: rename.key.clone(), to: trimmed.to_owned() }); + if !trimmed.is_empty() && trimmed != key { + self.action = Some(ProfileAction::Rename { name: key.clone(), to: trimmed.to_owned() }); } } } @@ -501,8 +535,8 @@ impl ProfileSelect { #[derive(Clone, Copy)] struct PopupView<'a> { list_id: egui::Id, - selection: &'a Selection, - reveal: Option<&'a str>, + selection: &'a Selection, + reveal: Option<&'a ProfileRowKey>, saved: &'a HashSet, can_reorder: bool, } @@ -512,7 +546,7 @@ fn show_popup_body( cx: &mut Cx<'_, ProfileSelect>, picker: &ProfileSelect, view: PopupView<'_>, -) -> (Vec>, Option, Option) { +) -> (Vec>, Option, Option) { let mut footer_action = None; let mut events = Vec::new(); let mut list_resp = None; @@ -530,7 +564,7 @@ fn show_popup_body( }) .show(ui, |ui, _| { let saved_for_rename = view.saved.clone(); - let mut list = List::::options(label.clone()) + let mut list = List::::options(label.clone()) .id(view.list_id) .header(false) .columns(vec![ColumnSpec::new(PROFILE_COL, Label::Empty, ColumnWidth::fill(1.0))]) @@ -538,23 +572,23 @@ fn show_popup_body( .activate(ActivateOn::Click) .lead_on_open(LeadOnOpen::First) .selection(Bind::given(view.selection.clone())) - .can_rename(move |key: &String| saved_for_rename.contains(key)); + .can_rename(move |key: &ProfileRowKey| key.profile().is_some_and(|id| saved_for_rename.contains(id))); if view.can_reorder { list = list - .can_drag(|key: &String| key != UNIFORM_ID && key != SEPARATOR_KEY) + .can_drag(|key: &ProfileRowKey| key.is_reorderable()) .reorder(ReorderRule::new()) - .accepts(|drag, _, insert| !drag.keys.iter().any(|k| k == UNIFORM_ID || k == SEPARATOR_KEY) && insert >= 2); + .accepts(|drag, _, insert| drag.keys.iter().all(ProfileRowKey::is_reorderable) && insert >= 2); } if let Some(key) = view.reveal { - list = list.reveal(key.to_owned()); + list = list.reveal(key.clone()); } let out = list.show_items(ui, &rows, &mut |key, icx| { - if key == SEPARATOR_KEY { + let ProfileRowKey::Profile(id) = key else { return ListRow::separator(); - } - let Some(entry) = picker.option(key) else { + }; + let Some(entry) = picker.option(id) else { return ListRow::spacer(); }; let points = entry.points.clone(); @@ -579,9 +613,9 @@ fn show_popup_body( let list_response = list_resp.unwrap_or_else(|| ui.response().clone()); for event in &events { if let CollectionEvent::ContextMenu(request) = event - && request.key != SEPARATOR_KEY + && let Some(id) = request.key.profile() { - cx.memory::().menu = Some(request.key.clone()); + cx.memory::().menu = Some(id.to_owned()); } } let menu_action = show_row_menu(ui, cx, picker, view.list_id, &list_response, view.saved); @@ -597,16 +631,17 @@ fn show_footer(ui: &mut egui::Ui, list_id: egui::Id, actions: ProfileActions) -> .enabled(actions.can_delete) .takes_drops_disabled(true) .drop_hint(tl!("Delete Profile")) - .accepts_drops::>(move |drag| drag.list == list_id && drag.keys.iter().any(|k| k != UNIFORM_ID && k != SEPARATOR_KEY)), + .accepts_drops::>(move |drag| drag.list == list_id && drag.keys.iter().any(ProfileRowKey::is_reorderable)), FooterAction::new(IconId::new("dc-new-item"), tl!("Add to Profiles")).enabled(actions.can_add), ]) .show_footer(ui); if let Some(drop) = &bar.dropped && drop.index == 1 - && let Some(key) = drop.payload::>().and_then(|d| d.keys.iter().find(|k| *k != UNIFORM_ID && *k != SEPARATOR_KEY)) + && let Some(id) = drop.payload::>().and_then(|d| d.keys.iter().find_map(ProfileRowKey::profile)) + && id != UNIFORM_ID { - return Some(ProfileAction::Delete(Some(key.clone()))); + return Some(ProfileAction::Delete(Some(id.to_owned()))); } match bar.picked { Some(0) => Some(ProfileAction::Reset), @@ -663,7 +698,7 @@ fn show_row_menu( } }); if start_rename { - request_rename(ui, list_id, &target); + request_rename(ui, list_id, &ProfileRowKey::Profile(target)); } if action.is_some() || start_rename || shown.closed.is_some() { cx.memory::().menu = None; diff --git a/crates/ui-egui/src/panels/tests_strokedepth.rs b/crates/ui-egui/src/panels/tests_strokedepth.rs index 2492b28847..f7a30b5d16 100644 --- a/crates/ui-egui/src/panels/tests_strokedepth.rs +++ b/crates/ui-egui/src/panels/tests_strokedepth.rs @@ -503,3 +503,40 @@ fn dropdown_expands_into_available_vertical_space() { ); assert!(panel.shows("Reset Profiles"), "footer remains visible with expanded list"); } + +#[test] +fn dropdown_keeps_sentinel_named_profile_interactive_and_commits_tab_preview() { + use craft::ui::contract::Role; + use egui::{Key, Modifiers}; + + let mut session = vectorcraft_engine::Session::new(); + session.execute("file.new", &serde_json::json!({"width": 400, "height": 400})).unwrap(); + let id = session.execute("shape.rectangle", &serde_json::json!({"x": 20, "y": 20, "width": 100, "height": 80})).unwrap()["id"].as_u64().unwrap(); + session.execute("stroke.set", &serde_json::json!({"weight": 6.0})).unwrap(); + session.execute("stroke.widthPoint.set", &serde_json::json!({"id": id, "t": 0.35, "left": 12.0, "right": 3.0})).unwrap(); + session.execute("stroke.widthProfile.add", &serde_json::json!({"name": "__profile_separator__"})).unwrap(); + session.execute("stroke.set", &serde_json::json!({"profile": "uniform"})).unwrap(); + + let app = crate::VectorcraftApp::new(session, Default::default()); + let mut panel = crate::tests::panel_harness::Panel::new(app, super::stroke::profile_select); + + // A saved profile literally named "__profile_separator__" stays selectable and applies. + panel.click_role("Profile", Role::COMBO_BOX); + assert!(panel.shows("__profile_separator__")); + panel.click("__profile_separator__"); + assert_eq!(panel.value_role("Profile", Role::COMBO_BOX).as_deref(), Some("__profile_separator__")); + + // Keyboard preview followed by Tab commits the previewed profile instead of cancelling it. + panel.click_role("Profile", Role::COMBO_BOX); + panel.click("Uniform"); + panel.click_role("Profile", Role::COMBO_BOX); + panel.key(Key::ArrowDown, Modifiers::NONE); + assert_eq!(panel.value_role("Profile", Role::COMBO_BOX).as_deref(), Some("Lens")); + panel.key(Key::Tab, Modifiers::NONE); + assert_eq!(panel.value_role("Profile", Role::COMBO_BOX).as_deref(), Some("Lens")); + + // A fractional scroll-wheel delta steps the closed profile control cleanly. + let face_center = panel.rect("Profile").center(); + panel.scroll_at(face_center, -0.5); + assert_ne!(panel.value_role("Profile", Role::COMBO_BOX).as_deref(), Some("Lens")); +} From 75ed49ed349b03ca95855f267fca1e17fac342f3 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 4 Dec 2026 23:22:17 -0800 Subject: [PATCH 14/62] Panels: unfinished corner radius and opacity values follow rollbacks too The Corner Radius fields' edit target and the selection fields' target (the Transparency panel's and the Control bar's Opacity fields, among others) now include the document's rollback count. After a canceled undo group, a new object can take the removed object's node ID; a value typed and not yet committed for the removed object is now dropped when the new one is selected, instead of being committed to it. Tests cover Corner Radius for a rectangle and a polygon in the Transform and Properties panels, and the Transparency panel's Opacity field. --- crates/ui-egui/src/panels.rs | 19 +++---- .../src/panels/transform/shape/tests.rs | 50 +++++++++++++++++++ crates/ui-egui/src/panels/transparency.rs | 18 +++++++ 3 files changed, 78 insertions(+), 9 deletions(-) diff --git a/crates/ui-egui/src/panels.rs b/crates/ui-egui/src/panels.rs index 6ca221d315..590fec11ca 100644 --- a/crates/ui-egui/src/panels.rs +++ b/crates/ui-egui/src/panels.rs @@ -127,8 +127,8 @@ pub(crate) fn corner_length(c: &LiveCorners, k: usize) -> f64 { } /// What a corner field edits, as its edit target: the active document's uid, how many times -/// File › Revert and Undo or Redo replaced its content (after which a node id can name another -/// object), the selected objects in id order, and `corners`, the corners the field sets (a picked +/// File › Revert, Undo or Redo and other rollbacks (`DocState::rollbacks`) replaced its content +/// (after which a node id can name another object), the selected objects in id order, and `corners`, the corners the field sets (a picked /// corner as its [`CornerPlace`]). A field drops a value typed and not yet committed when this /// changes, even where the new corners have the same radius, and keeps it when the same objects /// are selected in another order. Rounding a corner replaces its anchors without changing the @@ -141,7 +141,7 @@ pub(crate) fn corner_target(app: &VectorcraftApp, corners: impl Hash) -> u64 { .map(|st| { let mut objects = st.selection.objects.to_vec(); objects.sort_unstable(); - (st.uid, st.reverts, st.history_restores, objects) + (st.uid, st.reverts, st.history_restores, st.rollbacks, objects) }) .hash(&mut hasher); corners.hash(&mut hasher); @@ -897,11 +897,12 @@ pub(crate) fn current_transparency(app: &VectorcraftApp) -> Option<(f32, BlendMo Some(picked.unwrap_or((n.opacity, n.blend))) } -/// The objects a selection field edits, as a field's edit target: the document with how many times File › Revert and -/// Undo or Redo replaced its content (after which a node id can name another object), the selected objects (or the -/// object targeted in the Layers panel) in id order, and the selected symbol part. A field with an unfinished value -/// drops it when these change, and keeps it when the same objects are selected in another order. -pub(crate) type SelectionTarget = (Option<(u64, u64, u64)>, Vec, Option<(NodeId, Vec)>); +/// The objects a selection field edits, as a field's edit target: the document with how many times File › Revert, +/// Undo or Redo and other rollbacks (`DocState::rollbacks`) replaced its content (after which a node id can name +/// another object), the selected objects (or the object targeted in the Layers panel) in id order, and the selected +/// symbol part. A field with an unfinished value drops it when these change, and keeps it when the same objects are +/// selected in another order. +pub(crate) type SelectionTarget = (Option<(u64, u64, u64, u64)>, Vec, Option<(NodeId, Vec)>); /// The [`SelectionTarget`] of the active document. pub(crate) fn selection_target(app: &VectorcraftApp) -> SelectionTarget { @@ -909,7 +910,7 @@ pub(crate) fn selection_target(app: &VectorcraftApp) -> SelectionTarget { let part = st.selection.symbol_part.as_ref().map(|p| (p.instance, p.path.clone())); let mut subjects = st.selection.subjects().to_vec(); subjects.sort_unstable(); - (Some((st.uid, st.reverts, st.history_restores)), subjects, part) + (Some((st.uid, st.reverts, st.history_restores, st.rollbacks)), subjects, part) } /// What the Transparency panel's and the Control bar's Opacity fields edit, as their edit target: the diff --git a/crates/ui-egui/src/panels/transform/shape/tests.rs b/crates/ui-egui/src/panels/transform/shape/tests.rs index b808ad3751..b2f5a4c147 100644 --- a/crates/ui-egui/src/panels/transform/shape/tests.rs +++ b/crates/ui-egui/src/panels/transform/shape/tests.rs @@ -145,6 +145,56 @@ fn an_unfinished_angle_does_not_reach_a_shape_that_takes_a_canceled_groups_shape assert_eq!(p.value_role("Angle", Role::SPIN_BUTTON).as_deref(), Some("7°"), "the ellipse takes 7°, not the unfinished 3+ and 7"); } +/// A canceled undo group removes the shape a Corner Radius value was typed for, and a new shape made by `cmd` with +/// `args` takes its node ID. The value is dropped when that shape is selected in the panel `draw` draws. +fn check_corner_radius_after_a_canceled_group(draw: fn(&mut VectorcraftApp, &mut Ui), cmd: &str, args: Value, panel: &str) { + let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default()); + app.run("file.new", json!({"width": 400, "height": 400})).unwrap(); + app.run("edit.undoGroup.begin", json!({})).unwrap(); + let first = app.run(cmd, args.clone()).unwrap()["id"].clone(); + app.run("select.set", json!({"ids": [first]})).unwrap(); + let mut p = Panel::new(app, draw); + p.click_role("Corner Radius", Role::SPIN_BUTTON); + p.key(Key::A, Modifiers::COMMAND); + p.type_text("3+"); + p.app().run("edit.undoGroup.end", json!({"cancel": true})).unwrap(); + let second = p.app().run(cmd, args).unwrap()["id"].clone(); + assert_eq!(second, first, "{panel} {cmd}: the new shape takes the canceled group's shape's node ID"); + p.app().run("select.set", json!({"ids": [second]})).unwrap(); + p.frame(); + let shown = p.value_role("Corner Radius", Role::SPIN_BUTTON); + assert_eq!(shown.as_deref(), Some(pt(0.0).as_str()), "{panel} {cmd}: the field shows the new shape's corner radius"); + p.type_text("7"); + p.key(Key::Enter, Modifiers::NONE); + p.frame(); + let after = p.value_role("Corner Radius", Role::SPIN_BUTTON); + assert_eq!(after.as_deref(), Some(pt(7.0).as_str()), "{panel} {cmd}: the new shape takes 7, not the unfinished 3+ and 7"); +} + +#[test] +fn an_unfinished_rectangle_corner_radius_does_not_reach_a_shape_that_takes_a_canceled_groups_shapes_id() { + let rect = json!({"x": 0, "y": 0, "width": 30, "height": 30}); + check_corner_radius_after_a_canceled_group(crate::panels::transform::show, "shape.rectangle", rect, "Transform"); +} + +#[test] +fn an_unfinished_polygon_corner_radius_does_not_reach_a_shape_that_takes_a_canceled_groups_shapes_id() { + let polygon = json!({"cx": 60, "cy": 60, "radius": 40, "sides": 5}); + check_corner_radius_after_a_canceled_group(crate::panels::transform::show, "shape.polygon", polygon, "Transform"); +} + +#[test] +fn an_unfinished_rectangle_corner_radius_in_the_properties_panel_does_not_reach_a_shape_that_takes_a_canceled_groups_shapes_id() { + let rect = json!({"x": 0, "y": 0, "width": 30, "height": 30}); + check_corner_radius_after_a_canceled_group(crate::panels::properties::show, "shape.rectangle", rect, "Properties"); +} + +#[test] +fn an_unfinished_polygon_corner_radius_in_the_properties_panel_does_not_reach_a_shape_that_takes_a_canceled_groups_shapes_id() { + let polygon = json!({"cx": 60, "cy": 60, "radius": 40, "sides": 5}); + check_corner_radius_after_a_canceled_group(crate::panels::properties::show, "shape.polygon", polygon, "Properties"); +} + /// Exit Symbol Editing Mode with nothing changed takes back the entering step, which removes the editing copy a value /// was typed for, and a new shape can take the copy's node ID. The value is dropped when that shape is selected. #[test] diff --git a/crates/ui-egui/src/panels/transparency.rs b/crates/ui-egui/src/panels/transparency.rs index 05f1c4b940..a5066539d0 100644 --- a/crates/ui-egui/src/panels/transparency.rs +++ b/crates/ui-egui/src/panels/transparency.rs @@ -744,6 +744,24 @@ mod tests { assert_eq!(opacity_of(&panel, &b), 0.01, "Undo drops the unfinished value: 1%, not 20+1"); } + /// A canceled undo group drops an unfinished Opacity expression, though the object it takes away and the object + /// made and selected after it have the same id and opacity. + #[test] + fn unfinished_opacity_is_dropped_by_a_canceled_undo_group() { + let mut app = new_app(); + run_cmd(&mut app, "edit.undoGroup.begin", json!({})); + let a = run_cmd(&mut app, "shape.rectangle", json!({"x": 0, "y": 0, "width": 30, "height": 30}))["id"].clone(); + run_cmd(&mut app, "select.set", json!({"ids": [a]})); + let mut panel = Panel::new(app, show); + unfinished_opacity(&mut panel); + run_cmd(&mut panel.app(), "edit.undoGroup.end", json!({"cancel": true})); + let b = run_cmd(&mut panel.app(), "shape.rectangle", json!({"x": 50, "y": 0, "width": 30, "height": 30}))["id"].clone(); + assert_eq!(b, a, "the new rectangle has the canceled group's rectangle's id"); + run_cmd(&mut panel.app(), "select.set", json!({"ids": [b]})); + finish_opacity(&mut panel); + assert_eq!(opacity_of(&panel, &b), 0.01, "the canceled group drops the unfinished value: 1%, not 20+1"); + } + /// The same objects selected in another order keep an unfinished Opacity expression. #[test] fn unfinished_opacity_stays_when_the_same_objects_are_selected_in_another_order() { From 9ac0fe0faec46a6f8dfacac95206bc411dda8bac Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 00:29:22 -0800 Subject: [PATCH 15/62] Type: Discard Empty Type drops unfinished panel values for the text it removes When the Type tool leaves an empty text object, Discard Empty Type takes back the step that made it, which also frees the text's node ID. It did not advance the document's rollback count, so a value typed in a panel field for the text and not yet committed (Opacity, for example) stayed in the field, and the next Enter applied it to a new object that took the same ID. Discard Empty Type now advances the count. A command that panics puts back every document it changed. That restore now advances the rollback count of each document whose snapshot it puts back, for the same reason. Tests: an engine test for each restore, and a Transparency panel test that types 20+ in Opacity for an empty text, discards it, selects a new rectangle with the same ID and types 1 and Enter. --- crates/engine/src/cmd/textedit.rs | 1 + crates/engine/src/doc_state.rs | 5 +-- crates/engine/src/session/execute.rs | 3 ++ crates/engine/src/tests/journal.rs | 43 +++++++++++++++++++++++ crates/ui-egui/src/panels/transparency.rs | 17 +++++++++ 5 files changed, 67 insertions(+), 2 deletions(-) diff --git a/crates/engine/src/cmd/textedit.rs b/crates/engine/src/cmd/textedit.rs index d220deac73..2252ba63e6 100644 --- a/crates/engine/src/cmd/textedit.rs +++ b/crates/engine/src/cmd/textedit.rs @@ -2249,6 +2249,7 @@ fn discard_empty(s: &mut Session, p: &Value) -> Result { st.selection.prune(&st.doc); super::globaledit::follow_history(st); st.revision += 1; + st.rollbacks += 1; return Ok(json!({"removed": true})); } } diff --git a/crates/engine/src/doc_state.rs b/crates/engine/src/doc_state.rs index 8dc15f5aac..b557bb128d 100644 --- a/crates/engine/src/doc_state.rs +++ b/crates/engine/src/doc_state.rs @@ -121,8 +121,9 @@ pub struct DocState { /// Advances when Undo or Redo restores an older document snapshot. The same node ID can name different objects /// across that boundary. pub history_restores: u64, - /// Advances when a canceled undo group, undo scope or interaction, or Exit Symbol Editing Mode taking - /// back the entering step, puts back an older document snapshot. A canceled plug-in run advances it + /// Advances when a canceled undo group, undo scope or interaction, Exit Symbol Editing Mode taking + /// back the entering step, Discard Empty Type taking back the step that made the text, or a command + /// that panicked puts back an older document snapshot. A canceled plug-in run advances it /// when its calls changed the document. A preview advances it when it discards an earlier preview /// that allocated node IDs, or fails after discarding an earlier preview's document change. /// A command run during a tool interaction advances it when it sets aside a preview that allocated diff --git a/crates/engine/src/session/execute.rs b/crates/engine/src/session/execute.rs index 25a9b278b1..88db34c705 100644 --- a/crates/engine/src/session/execute.rs +++ b/crates/engine/src/session/execute.rs @@ -473,6 +473,9 @@ impl Session { for (uid, doc, selection, interaction, history) in snapshot { // A document the command closed stays closed. let Some(st) = self.docs.iter_mut().find(|d| d.uid == uid) else { continue }; + if !std::sync::Arc::ptr_eq(&st.doc, &doc) { + st.rollbacks += 1; + } st.doc = doc; st.selection = selection; st.interaction = interaction; diff --git a/crates/engine/src/tests/journal.rs b/crates/engine/src/tests/journal.rs index 1be7fb69b2..4031910307 100644 --- a/crates/engine/src/tests/journal.rs +++ b/crates/engine/src/tests/journal.rs @@ -877,6 +877,49 @@ fn leaving_symbol_editing_advances_rollbacks_only_when_taking_back_the_entering_ } } +/// Discard Empty Type advances `rollbacks` when it takes back the step that made the empty text, which frees the +/// text's node ID; when it removes the text as a new step instead, it leaves the count as it is. +#[test] +fn discard_empty_type_advances_rollbacks_only_when_taking_back_the_step_that_made_the_text() { + let mut s = Session::new(); + s.execute("file.new", &json!({"width": 400, "height": 300})).unwrap(); + let made = s.execute("text.create", &json!({"x": 10, "y": 40, "text": ""})).unwrap(); + let rollbacks = s.doc().unwrap().rollbacks; + s.execute("text.discardEmpty", &json!({"id": made["id"]})).unwrap(); + assert!(s.doc().unwrap().rollbacks > rollbacks, "taking back the step that made the text advances the rollback count"); + let kept = s.execute("text.create", &json!({"x": 10, "y": 80, "text": ""})).unwrap(); + s.execute("shape.rectangle", &rect_step(10)["params"]).unwrap(); + let rollbacks = s.doc().unwrap().rollbacks; + s.execute("text.discardEmpty", &json!({"id": kept["id"]})).unwrap(); + assert!(s.doc().unwrap().doc.node(NodeId(kept["id"].as_u64().unwrap())).is_none(), "the empty text is removed"); + assert_eq!(s.doc().unwrap().rollbacks, rollbacks, "removing the text as a new step keeps the rollback count"); +} + +/// A command that panics after changing a document advances that document's `rollbacks` when the document is put +/// back; one that panics before changing it leaves the count as it is. +#[test] +fn a_panicking_command_advances_rollbacks_only_when_it_changed_the_document() { + let mut s = Session::new(); + s.execute("file.new", &json!({"width": 400, "height": 300})).unwrap(); + let a = NodeId(s.execute("shape.rectangle", &rect_step(10)["params"]).unwrap()["id"].as_u64().unwrap()); + for changed in [false, true] { + let rollbacks = s.doc().unwrap().rollbacks; + let r = s.run_guarded("test.panic", |s| { + if changed { + let st = s.doc_mut()?; + std::sync::Arc::make_mut(&mut st.doc).remove(a)?; + } + s.run_nested(|_| panic!("boom")) + }); + assert!(matches!(r, Err(EngineError::Internal { .. })), "the panic is returned as an internal error"); + if changed { + assert!(s.doc().unwrap().rollbacks > rollbacks, "putting back the changed document advances the rollback count"); + } else { + assert_eq!(s.doc().unwrap().rollbacks, rollbacks, "a panic before any change keeps the rollback count"); + } + } +} + /// Canceling an interaction whose preview changed the document advances `rollbacks`; canceling one that changed /// nothing leaves it as it is. #[test] diff --git a/crates/ui-egui/src/panels/transparency.rs b/crates/ui-egui/src/panels/transparency.rs index a5066539d0..1f9c09340e 100644 --- a/crates/ui-egui/src/panels/transparency.rs +++ b/crates/ui-egui/src/panels/transparency.rs @@ -762,6 +762,23 @@ mod tests { assert_eq!(opacity_of(&panel, &b), 0.01, "the canceled group drops the unfinished value: 1%, not 20+1"); } + /// Discard Empty Type drops an unfinished Opacity expression when it takes back the step that made the empty + /// text, though the object made and selected after it has the same id and opacity. + #[test] + fn unfinished_opacity_is_dropped_by_discard_empty_type() { + let mut app = new_app(); + let a = run_cmd(&mut app, "text.create", json!({"x": 10, "y": 40, "text": ""}))["id"].clone(); + run_cmd(&mut app, "select.set", json!({"ids": [a]})); + let mut panel = Panel::new(app, show); + unfinished_opacity(&mut panel); + run_cmd(&mut panel.app(), "text.discardEmpty", json!({"id": a})); + let b = run_cmd(&mut panel.app(), "shape.rectangle", json!({"x": 50, "y": 0, "width": 30, "height": 30}))["id"].clone(); + assert_eq!(b, a, "the new rectangle has the discarded text's id"); + run_cmd(&mut panel.app(), "select.set", json!({"ids": [b]})); + finish_opacity(&mut panel); + assert_eq!(opacity_of(&panel, &b), 0.01, "Discard Empty Type drops the unfinished value: 1%, not 20+1"); + } + /// The same objects selected in another order keep an unfinished Opacity expression. #[test] fn unfinished_opacity_stays_when_the_same_objects_are_selected_in_another_order() { From 52ae4d5dd52f6301b86ee43b8aba839e5bc851eb Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 00:51:41 -0800 Subject: [PATCH 16/62] DXF/DWG import: scaled block inserts scale their dashes and polyline widths A named block becomes a symbol whose art is drawn once, at the import's scale, and each insert becomes an instance that carries the insert's scale. Instances leave the strokes in their art unscaled, so a block inserted at scale 10 drew its geometry 10 times larger but kept its linetype dashes and constant-width polylines at scale 1. When a block (or a block it places) draws dashes or wide polylines, its symbol is now made per insert scale, with the art drawn at that scale and the instance taking the rest of the transform. Inserts at one scale share a symbol, and blocks without dashes or wide polylines keep one symbol for every scale. Lineweights are physical widths and stay unscaled. --- crates/cad/src/import/build.rs | 112 ++++++++++++++++++++++++------ crates/cad/src/import/tests.rs | 122 +++++++++++++++++++++++++++++++++ 2 files changed, 213 insertions(+), 21 deletions(-) diff --git a/crates/cad/src/import/build.rs b/crates/cad/src/import/build.rs index 0b3532ca87..870283af2c 100644 --- a/crates/cad/src/import/build.rs +++ b/crates/cad/src/import/build.rs @@ -67,8 +67,12 @@ pub(crate) struct Build<'d, 'a> { blocks: HashMap>>, bounds: HashMap>, sensitive: HashMap, - /// Symbol names by block and what it inherits (`None`: the block has no art). - symbols: HashMap<(String, Inherit), Option>, + /// Symbol names by block, what it inherits and the scale its art is drawn at (the bits of + /// [`symbol_scale`]'s answer; `None`: the block has no art). + symbols: HashMap<(String, Inherit, u64), Option>, + /// Whether a block placed with what it inherits draws dashes or wide polylines, whose + /// lengths and widths follow the insert's scale. + scaled_looks: HashMap<(String, Inherit), bool>, /// Names of the symbols made so far, and the next suffix to try for each label. symbol_names: HashSet, next_suffix: HashMap, @@ -134,6 +138,7 @@ impl<'d, 'a> Build<'d, 'a> { bounds: HashMap::new(), sensitive: HashMap::new(), symbols: HashMap::new(), + scaled_looks: HashMap::new(), symbol_names: HashSet::new(), next_suffix: HashMap::new(), stack: vec![], @@ -597,24 +602,39 @@ impl<'d, 'a> Build<'d, 'a> { let base = self.d.blocks.get(&ins.block).map_or(Point::ZERO, |b| b.base); let unbase = Affine::translate(-base.to_vec2()); let anonymous = ins.block.starts_with('*'); - let symbol = if anonymous { None } else { self.symbol(&ins.block, &child, depth) }; let mut parts = vec![]; + // An array's cells share their scale: the symbol is looked up again only when it changes. + let mut last: Option<(f64, Option<(String, f64)>)> = None; for cell in &ins.cells { - let node = match &symbol { - Some(name) => { - if self.nodes >= MAX_NODES { - self.warn(TOO_MANY); - break; + let node = if anonymous { + self.art(&ins.block, map * *cell * unbase, &child, depth) + } else { + let scale = symbol_scale(map * *cell, self.symbol_map); + let symbol = match &last { + Some((s, symbol)) if s.to_bits() == scale.to_bits() => symbol.clone(), + _ => { + let symbol = self.symbol(&ins.block, &child, scale, depth); + last = Some((scale, symbol.clone())); + symbol } - if !self.charge_text(name.len()) { - break; + }; + match symbol { + Some((name, drawn_at)) => { + if self.nodes >= MAX_NODES { + self.warn(TOO_MANY); + break; + } + if !self.charge_text(name.len()) { + break; + } + // The symbol's art is drawn `drawn_at` times larger than a drawing unit + // at the import's scale; the instance takes the rest of the transform. + let xf = map * *cell * (self.symbol_map * Affine::scale(drawn_at)).inverse(); + self.nodes += 1; + Some(Node::new(self.doc.alloc_id(), NodeKind::SymbolInstance { symbol: name, xf })) } - let xf = map * *cell * self.symbol_map.inverse(); - self.nodes += 1; - Some(Node::new(self.doc.alloc_id(), NodeKind::SymbolInstance { symbol: name.clone(), xf })) + None => None, } - None if anonymous => self.art(&ins.block, map * *cell * unbase, &child, depth), - None => None, }; parts.extend(node); } @@ -664,15 +684,52 @@ impl<'d, 'a> Build<'d, 'a> { } } - /// The symbol for block `name` placed with `inh` (made once per look). - fn symbol(&mut self, name: &str, inh: &Inherit, depth: u32) -> Option { + /// Does block `name` placed with `inh` draw dashes or wide polylines (its own art or that of + /// the blocks it places)? + fn is_scaled_look(&mut self, name: &str, inh: &Inherit, depth: u32) -> bool { + let key = (name.to_string(), inh.clone()); + if let Some(s) = self.scaled_looks.get(&key) { + return *s; + } + let Some(items) = self.block(name) else { return false }; + if !self.enter(name, depth) { + return false; + } + let mut s = false; + for it in items.iter() { + s = match &it.geom { + Geom::Path { fill: true, .. } => false, + Geom::Path { width, .. } => { + *width > 0.0 || self.d.linetypes.get(&self.linetype(&it.props, inh)).is_some_and(|p| p.iter().take(64).any(|v| *v < 0.0)) + } + Geom::Text(_) => false, + Geom::Insert(ins) => { + let child = self.inherit(&it.props, inh); + let child = if self.is_sensitive(&ins.block, depth + 1) { child } else { Inherit::default() }; + self.is_scaled_look(&ins.block, &child, depth + 1) + } + }; + if s { + break; + } + } + self.stack.pop(); + self.scaled_looks.insert(key, s); + s + } + + /// The symbol for block `name` placed with `inh` at `scale` (from [`symbol_scale`]), made + /// once per look, with the scale its art is drawn at: `scale` when the block draws dashes or + /// wide polylines, else 1. + fn symbol(&mut self, name: &str, inh: &Inherit, scale: f64, depth: u32) -> Option<(String, f64)> { let inh = if self.is_sensitive(name, depth) { inh.clone() } else { Inherit::default() }; - let key = (name.to_string(), inh); + let scale = if self.is_scaled_look(name, &inh, depth) { scale } else { 1.0 }; + let key = (name.to_string(), inh, scale.to_bits()); if let Some(s) = self.symbols.get(&key) { - return s.clone(); + return s.clone().map(|s| (s, scale)); } let base = self.d.blocks.get(name).map_or(Point::ZERO, |b| b.base); - let map = self.symbol_map * Affine::translate(-base.to_vec2()); + let map = self.symbol_map * Affine::scale(scale) * Affine::translate(-base.to_vec2()); let art = self.art(name, map, &key.1, depth); let made = art.and_then(|art| { let label = self.d.blocks.get(name).map_or(name, |b| b.name.as_str()); @@ -686,10 +743,23 @@ impl<'d, 'a> Build<'d, 'a> { Some(symbol) }); self.symbols.insert(key, made.clone()); - made + made.map(|s| (s, scale)) } } +/// How much larger than `symbol_map` an insert copy drawn by `placed` is (the square root of the +/// ratio of their areas), rounded to 9 significant digits so that copies at one scale share a +/// symbol; 1 when either is degenerate. +fn symbol_scale(placed: Affine, symbol_map: Affine) -> f64 { + let s = (placed.determinant().abs() / symbol_map.determinant().abs()).sqrt(); + if !(s.is_finite() && s > 0.0) { + return 1.0; + } + let digits = 10f64.powi(8 - s.log10().floor() as i32); + let r = (s * digits).round() / digits; + if r.is_finite() && r > 0.0 { r } else { 1.0 } +} + /// Fit text stretched or squeezed across, aligned text scaled as a whole, to run its span /// (`s`: points per drawing unit), measured in the font it is set in. fn fill_span(obj: &mut TextObject, span: Span, s: f64) { diff --git a/crates/cad/src/import/tests.rs b/crates/cad/src/import/tests.rs index d53694343a..89f6e81ce8 100644 --- a/crates/cad/src/import/tests.rs +++ b/crates/cad/src/import/tests.rs @@ -858,6 +858,128 @@ fn by_block_colours_make_a_symbol_per_look() { assert_eq!(doc.symbols.len(), 1); } +/// The dash pattern and weight of the stroke of `n` (a path) or its first loop (a compound path). +fn dash_and_weight(n: &Node) -> (Vec, f64) { + let n = match &n.kind { + NodeKind::Path { .. } => n, + _ => n.children().and_then(|c| c.first()).map(|c| &**c).unwrap_or_else(|| panic!("no path: {:?}", n.kind)), + }; + let s = n.appearance.stroke().unwrap_or_else(|| panic!("no stroke: {:?}", n.appearance)); + (s.dash.as_ref().map(|d| d.pattern.clone()).unwrap_or_default(), s.width) +} + +/// The strokes of `inst`'s symbol's art (and of the symbols it places): each path's dash +/// pattern and weight, in paint order. +fn instance_strokes(doc: &Document, inst: &Node) -> Vec<(Vec, f64)> { + let NodeKind::SymbolInstance { symbol, .. } = &inst.kind else { panic!("{:?}", inst.kind) }; + let art = &doc.symbols.iter().find(|s| &s.name == symbol).unwrap().art; + let mut out = vec![]; + let mut walk = vec![art.clone()]; + while let Some(n) = walk.pop() { + match &n.kind { + NodeKind::Path { .. } => out.push(dash_and_weight(&n)), + NodeKind::SymbolInstance { .. } => out.extend(instance_strokes(doc, &n)), + _ => walk.extend(n.children().into_iter().flatten().rev().cloned()), + } + } + out +} + +#[test] +fn scaled_inserts_scale_their_blocks_dashes_and_polyline_widths() { + let tables = [(0, "TABLE"), (2, "LTYPE"), (0, "LTYPE"), (2, "DASHED"), (73, "2"), (40, "15"), (49, "10"), (49, "-5"), (0, "ENDTAB")]; + // "Mark": a dashed line with a 0.5 mm lineweight and a polyline 2 units wide. "Pair" places + // "Mark" at scale 1, so the scale of an insert of "Pair" reaches it. + let blocks = [ + (0, "BLOCK"), + (8, "0"), + (2, "Mark"), + (70, "0"), + (10, "0"), + (20, "0"), + (0, "LINE"), + (8, "0"), + (6, "DASHED"), + (370, "50"), + (10, "0"), + (20, "0"), + (11, "100"), + (21, "0"), + (0, "LWPOLYLINE"), + (8, "0"), + (90, "2"), + (70, "0"), + (43, "2"), + (10, "0"), + (20, "10"), + (10, "100"), + (20, "10"), + (0, "ENDBLK"), + (0, "BLOCK"), + (8, "0"), + (2, "Pair"), + (70, "0"), + (10, "0"), + (20, "0"), + (0, "INSERT"), + (8, "0"), + (2, "Mark"), + (10, "0"), + (20, "0"), + (0, "ENDBLK"), + ]; + let inserts = [ + (0, "INSERT"), + (2, "Mark"), + (10, "0"), + (20, "0"), + (0, "INSERT"), + (2, "Mark"), + (10, "0"), + (20, "100"), + (41, "10"), + (42, "10"), + (0, "INSERT"), + (2, "Pair"), + (10, "0"), + (20, "300"), + (41, "10"), + (42, "10"), + (0, "INSERT"), + (2, "Mark"), + (10, "0"), + (20, "500"), + (41, "10"), + (42, "10"), + ]; + let doc = open(&drawing(&[], &tables, &blocks, &inserts), &points()).document; + let insts = leaves(&doc); + let [one, ten, nested, ten_again] = &insts[..] else { panic!("{insts:?}") }; + let at_one = instance_strokes(&doc, one); + let [(dash, lw), (no_dash, width)] = &at_one[..] else { panic!("{at_one:?}") }; + assert!(dash.len() >= 2 && no_dash.is_empty() && *width > 0.0, "{at_one:?}"); + // Instances leave the strokes in their art as they are, so the art carries the insert's scale. + let tenfold: Vec = dash.iter().map(|v| v * 10.0).collect(); + for inst in [ten, nested] { + let got = instance_strokes(&doc, inst); + let [(d, w_lw), (_, w)] = &got[..] else { panic!("{got:?}") }; + assert_eq!(d.len(), tenfold.len()); + assert!(d.iter().zip(&tenfold).all(|(a, b)| (a - b).abs() < 1e-9), "dashes {d:?}, want {tenfold:?}"); + assert!((w - width * 10.0).abs() < 1e-9, "polyline width {w}, want {}", width * 10.0); + assert!((w_lw - lw).abs() < 1e-12, "a lineweight is a physical width: {w_lw}, want {lw}"); + } + // The copies still land where their inserts put them. + let NodeKind::SymbolInstance { symbol, xf } = &ten.kind else { panic!() }; + let art = &doc.symbols.iter().find(|s| &s.name == symbol).unwrap().art; + let line = art.children().and_then(|c| c.first()).unwrap(); + let end = *xf * *path_points(line).last().unwrap(); + assert!(end.distance(Point::new(1000.0, height(&doc) - 100.0)) < 1e-6, "{end:?}"); + // Inserts at one scale share a symbol. + let symbol_of = |n: &Node| if let NodeKind::SymbolInstance { symbol, .. } = &n.kind { symbol.clone() } else { panic!() }; + assert_eq!(symbol_of(ten), symbol_of(ten_again)); + assert_ne!(symbol_of(one), symbol_of(ten)); +} + #[test] fn many_by_block_looks_import_in_linear_time() { let by_block: &[(i32, &str)] = &[(0, "LINE"), (8, "0"), (62, "0"), (10, "5"), (20, "5"), (11, "15"), (21, "5")]; From 7264eff7c2468495b45169426cbee1e0dba00f49 Mon Sep 17 00:00:00 2001 From: erolkarino Date: Sat, 5 Dec 2026 11:56:46 +0300 Subject: [PATCH 17/62] fix(stroke): end active wheel gesture before keyboard navigation --- crates/ui-egui/src/panels/stroke/profile_picker.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/crates/ui-egui/src/panels/stroke/profile_picker.rs b/crates/ui-egui/src/panels/stroke/profile_picker.rs index c611c47461..ed05993f9b 100644 --- a/crates/ui-egui/src/panels/stroke/profile_picker.rs +++ b/crates/ui-egui/src/panels/stroke/profile_picker.rs @@ -396,11 +396,14 @@ impl Component for ProfileSelect { if !cx.is_focused() { return; } - if let Some((mv, _)) = cx.intents().take_move() - && let Some(target) = self.nav_target(cx.value().cloned().as_ref(), mv) - { - cx.propose(target); - cx.commit(); + while let Some((mv, _)) = cx.intents().take_move() { + if cx.in_wheel_run() { + cx.commit(); + } + if let Some(target) = self.nav_target(cx.value().cloned().as_ref(), mv) { + cx.propose(target); + cx.commit(); + } } if let Some(typed) = cx.intents().take_text() { let folder = cx.env.folder(); From de5582cc836c452188edd85de5bf0f277177788e Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 01:49:20 -0800 Subject: [PATCH 18/62] DXF/DWG import: the scale check of blocks skips hidden art and keeps to the work budget The check that decides whether a block's symbol is drawn per insert scale now skips art on hidden layers, which the import does not draw, so a block whose only dashes are hidden keeps one symbol for every scale. The check also counts the items it looks at against the block work budget and stops with the existing warning when the budget runs out. Text in a block drawn at a tiny insert scale is kept: any invertible text transform is accepted, instead of only those above 1e-12 points per unit. --- crates/cad/src/import/build.rs | 26 ++++++- crates/cad/src/import/tests.rs | 126 +++++++++++++++++++++++++++++++++ 2 files changed, 149 insertions(+), 3 deletions(-) diff --git a/crates/cad/src/import/build.rs b/crates/cad/src/import/build.rs index 870283af2c..02da2f46fc 100644 --- a/crates/cad/src/import/build.rs +++ b/crates/cad/src/import/build.rs @@ -24,7 +24,8 @@ const THINNEST: f64 = 0.25; /// The most objects an import makes. const MAX_NODES: usize = 2_000_000; /// The most block work an import does, whatever it produces: one per insert copy drawn, and one -/// per item of the block looked at for it (art on hidden layers too). +/// per item of the block looked at for it (art on hidden layers too), and the same for each block +/// whose dashes and widths are checked for a symbol's scale. const MAX_VISITS: usize = if cfg!(test) { 1_000_000 } else { 20_000_000 }; /// The most path elements an import makes (blocks drawn as art are copied for every placement). pub(crate) const MAX_ELEMENTS: usize = if cfg!(test) { 1_000_000 } else { 4_000_000 }; @@ -568,7 +569,9 @@ impl<'d, 'a> Build<'d, 'a> { // Text space is y-down points; the item's is y-up drawing units. let m = map * t.xf * Affine::FLIP_Y; let s = m.determinant().abs().sqrt(); - if !(s > 1e-12 && s.is_finite()) { + // Any invertible map will do: a symbol drawn at a tiny insert scale draws its text far + // below a point per unit, and its instances scale it back up. + if !(s > 0.0 && s.is_finite() && s.recip().is_finite()) { return None; } let d = self.d; @@ -691,12 +694,27 @@ impl<'d, 'a> Build<'d, 'a> { if let Some(s) = self.scaled_looks.get(&key) { return *s; } - let Some(items) = self.block(name) else { return false }; + let items = self.block(name); + // Looking at a block's items counts against the block work as placing it does, so the + // scan stops at the same limit as `art`. + self.visits = self.visits.saturating_add(1 + items.as_ref().map_or(0, |i| i.len())); + if self.visits > MAX_VISITS { + self.warn(TOO_MUCH_BLOCK_WORK); + return false; + } + let Some(items) = items else { return false }; if !self.enter(name, depth) { return false; } let mut s = false; for it in items.iter() { + #[cfg(test)] + SCALED_LOOK_ITEMS.with(|n| n.set(n.get().saturating_add(1))); + // Art on a hidden layer is not drawn (see `art`), so it does not make the block's + // look depend on its scale. + if self.d.layer(self.layer_name(&it.props, inh)).is_some_and(|l| l.hidden) && it.props.layer != "0" { + continue; + } s = match &it.geom { Geom::Path { fill: true, .. } => false, Geom::Path { width, .. } => { @@ -782,6 +800,8 @@ fn rgb_color([r, g, b]: [u8; 3]) -> Color { thread_local! { /// How many names [`unique`] tried on this thread (tests). pub(crate) static SYMBOL_NAMES_TRIED: std::cell::Cell = const { std::cell::Cell::new(0) }; + /// How many block items [`Build::is_scaled_look`] looked at on this thread (tests). + pub(crate) static SCALED_LOOK_ITEMS: std::cell::Cell = const { std::cell::Cell::new(0) }; } /// Whether `taken` holds `name`, counted as one name tried (tests). diff --git a/crates/cad/src/import/tests.rs b/crates/cad/src/import/tests.rs index 89f6e81ce8..ae3a86d180 100644 --- a/crates/cad/src/import/tests.rs +++ b/crates/cad/src/import/tests.rs @@ -980,6 +980,132 @@ fn scaled_inserts_scale_their_blocks_dashes_and_polyline_widths() { assert_ne!(symbol_of(one), symbol_of(ten)); } +#[test] +fn dashes_on_a_hidden_layer_leave_a_block_one_symbol_for_every_scale() { + let tables = [ + (0, "TABLE"), + (2, "LTYPE"), + (0, "LTYPE"), + (2, "DASHED"), + (73, "2"), + (40, "15"), + (49, "10"), + (49, "-5"), + (0, "ENDTAB"), + (0, "TABLE"), + (2, "LAYER"), + (0, "LAYER"), + (2, "Off"), + (70, "0"), + (62, "-1"), + (0, "ENDTAB"), + ]; + // "Mark": a solid line, and a dashed line on a hidden layer, which is not drawn. + let blocks = [ + (0, "BLOCK"), + (8, "0"), + (2, "Mark"), + (70, "0"), + (10, "0"), + (20, "0"), + (0, "LINE"), + (8, "0"), + (10, "0"), + (20, "0"), + (11, "100"), + (21, "0"), + (0, "LINE"), + (8, "Off"), + (6, "DASHED"), + (10, "0"), + (20, "10"), + (11, "100"), + (21, "10"), + (0, "ENDBLK"), + ]; + let inserts = [(0, "INSERT"), (2, "Mark"), (10, "0"), (20, "0"), (0, "INSERT"), (2, "Mark"), (10, "0"), (20, "100"), (41, "10"), (42, "10")]; + let doc = open(&drawing(&[], &tables, &blocks, &inserts), &points()).document; + assert_eq!(leaves(&doc).len(), 2); + assert_eq!(doc.symbols.len(), 1, "{:?}", doc.symbols.iter().map(|s| &s.name).collect::>()); +} + +#[test] +fn the_scale_check_of_blocks_stops_at_the_work_budget() { + // "Outer" places "Leaf" 1,100 times, each in its own color, and "Leaf" has 1,000 solid + // lines that take their insert's color: 1,100,000 items to look at, past the 1,000,000 + // tests import with. + let mut blocks: Vec<(i32, &'static str)> = vec![(0, "BLOCK"), (8, "0"), (2, "Leaf"), (70, "0"), (10, "0"), (20, "0")]; + for _ in 0..1000 { + blocks.extend([(0, "LINE"), (8, "0"), (62, "0"), (10, "0"), (20, "0"), (11, "1"), (21, "0")]); + } + blocks.extend([(0, "ENDBLK"), (0, "BLOCK"), (8, "0"), (2, "Outer"), (70, "0"), (10, "0"), (20, "0")]); + for i in 0..1100 { + let color: &'static str = Box::leak((i + 1).to_string().into_boxed_str()); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "Leaf"), (420, color), (10, "0"), (20, "0")]); + } + blocks.push((0, "ENDBLK")); + let top = [(0, "INSERT"), (2, "Outer"), (10, "0"), (20, "0")]; + build::SCALED_LOOK_ITEMS.with(|n| n.set(0)); + let r = open(&drawing(&[], &[], &blocks, &top), &points()); + let looked = build::SCALED_LOOK_ITEMS.with(std::cell::Cell::get); + assert!(looked <= 1_000_000, "{looked} items looked at"); + assert!(r.warnings.iter().any(|w| w.contains("too much work")), "{:?}", r.warnings); +} + +#[test] +fn text_in_a_dashed_block_inserted_at_a_tiny_scale_is_kept() { + let tables = [(0, "TABLE"), (2, "LTYPE"), (0, "LTYPE"), (2, "DASHED"), (73, "2"), (40, "15"), (49, "10"), (49, "-5"), (0, "ENDTAB")]; + // "Inner" draws a dashed line and a label; "Outer" places it at 1e-7, and the drawing places + // "Outer" at 1e-7, so "Inner"'s symbol is drawn at 1e-14. + let blocks = [ + (0, "BLOCK"), + (8, "0"), + (2, "Inner"), + (70, "0"), + (10, "0"), + (20, "0"), + (0, "LINE"), + (8, "0"), + (6, "DASHED"), + (10, "0"), + (20, "0"), + (11, "100"), + (21, "0"), + (0, "TEXT"), + (8, "0"), + (10, "0"), + (20, "10"), + (40, "5"), + (1, "Label"), + (0, "ENDBLK"), + (0, "BLOCK"), + (8, "0"), + (2, "Outer"), + (70, "0"), + (10, "0"), + (20, "0"), + (0, "INSERT"), + (8, "0"), + (2, "Inner"), + (10, "0"), + (20, "0"), + (41, "1e-7"), + (42, "1e-7"), + (0, "ENDBLK"), + ]; + let top = [(0, "INSERT"), (2, "Outer"), (10, "0"), (20, "0"), (41, "1e-7"), (42, "1e-7")]; + let doc = open(&drawing(&[], &tables, &blocks, &top), &points()).document; + let mut texts = vec![]; + for s in &doc.symbols { + s.art.walk(&mut |n| { + if let NodeKind::Text(t) = &n.kind { + texts.push(t.plain_text()); + } + }); + } + assert_eq!(texts, ["Label"]); +} + #[test] fn many_by_block_looks_import_in_linear_time() { let by_block: &[(i32, &str)] = &[(0, "LINE"), (8, "0"), (62, "0"), (10, "5"), (20, "5"), (11, "15"), (21, "5")]; From 1da36ce346e60c6cf1a6ad90f2a271690992ed5b Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 02:45:59 -0800 Subject: [PATCH 19/62] DXF/DWG import: block copies drawn at a tiny scale keep a finite transform An instance's transform inverted the symbol map and the scale its art is drawn at as one product. In a fitted drawing with a tiny points-per-unit scale, a dashed block placed at a tiny nested scale made that product's determinant subnormal, its inverse overflowed, and the instance carried NaN coefficients. The two factors are now inverted apart, and a copy whose transform still is not finite is left out with a warning. --- crates/cad/src/import/build.rs | 13 ++++++-- crates/cad/src/import/tests.rs | 56 ++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 3 deletions(-) diff --git a/crates/cad/src/import/build.rs b/crates/cad/src/import/build.rs index 02da2f46fc..2115104bcf 100644 --- a/crates/cad/src/import/build.rs +++ b/crates/cad/src/import/build.rs @@ -46,6 +46,7 @@ const TOO_MANY: &str = "the drawing has more than 2,000,000 objects: the rest ar const TOO_MANY_POINTS: &str = "the drawing has more than 4,000,000 path points: the rest are left out"; const TOO_MUCH_BLOCK_WORK: &str = "the drawing's blocks take too much work to place: the rest are left out"; const TOO_MANY_DASHES: &str = "the drawing has more dashed lines than can be kept: the rest are drawn solid"; +const TOO_SMALL: &str = "block copies drawn too small to place are left out"; const TOO_MUCH_TEXT: &str = "the drawing has more than 64 MB of text and block names: the rest are left out"; /// What a block's art takes from the insert that places it: its colour, lineweight, linetype @@ -627,12 +628,18 @@ impl<'d, 'a> Build<'d, 'a> { self.warn(TOO_MANY); break; } + // The symbol's art is drawn `drawn_at` times larger than a drawing unit + // at the import's scale; the instance takes the rest of the transform. + // The two factors are inverted apart, so a tiny `drawn_at` at a tiny fitted + // scale does not overflow the inverse of their product. + let xf = map * *cell * Affine::scale(drawn_at.recip()) * self.symbol_map.inverse(); + if !xf.as_coeffs().iter().all(|c| c.is_finite()) { + self.warn(TOO_SMALL); + continue; + } if !self.charge_text(name.len()) { break; } - // The symbol's art is drawn `drawn_at` times larger than a drawing unit - // at the import's scale; the instance takes the rest of the transform. - let xf = map * *cell * (self.symbol_map * Affine::scale(drawn_at)).inverse(); self.nodes += 1; Some(Node::new(self.doc.alloc_id(), NodeKind::SymbolInstance { symbol: name, xf })) } diff --git a/crates/cad/src/import/tests.rs b/crates/cad/src/import/tests.rs index ae3a86d180..08f683a65f 100644 --- a/crates/cad/src/import/tests.rs +++ b/crates/cad/src/import/tests.rs @@ -1106,6 +1106,62 @@ fn text_in_a_dashed_block_inserted_at_a_tiny_scale_is_kept() { assert_eq!(texts, ["Label"]); } +#[test] +fn a_dashed_block_at_a_tiny_scale_in_a_huge_fitted_drawing_keeps_a_finite_instance() { + let tables = [(0, "TABLE"), (2, "LTYPE"), (0, "LTYPE"), (2, "DASHED"), (73, "2"), (40, "15"), (49, "10"), (49, "-5"), (0, "ENDTAB")]; + // "G0" draws a line 1e12 long and "G1" to "G6" each place the one before at 1e12, so the + // drawing spans about 1e96 and fits at about 6e-94 points per unit. "D0" draws a dashed line, + // "D1" places it at 1e-4 and "D2" to "D5" each place the one before at 1e-12, so "D0" is drawn + // at about 6e-158 points per unit: the square of that is below the smallest normal number. + let mut blocks: Vec<(i32, &'static str)> = vec![]; + blocks.extend([(0, "BLOCK"), (8, "0"), (2, "G0"), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "0"), (11, "1e12"), (21, "1e12"), (0, "ENDBLK")]); + blocks.extend([(0, "BLOCK"), (8, "0"), (2, "D0"), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "LINE"), (8, "0"), (6, "DASHED"), (10, "0"), (20, "0"), (11, "100"), (21, "0"), (0, "ENDBLK")]); + let names = |p: &str, i: usize| -> &'static str { Box::leak(format!("{p}{i}").into_boxed_str()) }; + for (p, from, to) in [("G", 1, 6), ("D", 1, 5)] { + for i in from..=to { + let scale = match (p, i) { + ("G", _) => "1e12", + (_, 1) => "1e-4", + _ => "1e-12", + }; + blocks.extend([(0, "BLOCK"), (8, "0"), (2, names(p, i)), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, names(p, i - 1)), (10, "0"), (20, "0"), (41, scale), (42, scale), (0, "ENDBLK")]); + } + } + let top = [ + (0, "INSERT"), + (2, "G6"), + (10, "0"), + (20, "0"), + (41, "1e12"), + (42, "1e12"), + (0, "INSERT"), + (2, "D5"), + (10, "0"), + (20, "0"), + (41, "1e-12"), + (42, "1e-12"), + ]; + let o = ImportOptions { fit: true, center: false, ..ImportOptions::default() }; + let doc = open(&drawing(&[], &tables, &blocks, &top), &o).document; + let mut instances = vec![]; + let mut collect = |n: &Node| { + if let NodeKind::SymbolInstance { symbol, xf } = &n.kind { + instances.push((symbol.clone(), *xf)); + } + }; + doc.walk(&mut collect); + for s in &doc.symbols { + s.art.walk(&mut collect); + } + assert!(instances.iter().any(|(symbol, _)| symbol == "D0"), "{instances:?}"); + for (symbol, xf) in &instances { + assert!(xf.as_coeffs().iter().all(|c| c.is_finite()), "{symbol}: {xf:?}"); + } +} + #[test] fn many_by_block_looks_import_in_linear_time() { let by_block: &[(i32, &str)] = &[(0, "LINE"), (8, "0"), (62, "0"), (10, "5"), (20, "5"), (11, "15"), (21, "5")]; From cda16b5163d4f7d9c05b4ce851f4411b6de8b94b Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 04:14:07 -0800 Subject: [PATCH 20/62] Fix #10734: Save asks about a changed file only when its bytes changed Save asked "File changed" on every save of a file in a cloud-sync folder. The save flow counts any new change time or inode as a change by another app, and a sync client sets attributes on the file after uploading it, or puts the same bytes back as a new file. The app now keeps a SHA-256 digest of each document's file as it last read or wrote it, taken on a thread after the open and after each save. When the flow would ask, the file is compared with that digest on a thread; a file that still holds the same bytes becomes the recorded version and is written over without asking. A file whose bytes differ, that changes during the comparison, or that has no digest is asked about as before. Digests of closed documents are dropped. --- Cargo.lock | 1 + crates/ui-egui/Cargo.toml | 3 + crates/ui-egui/src/app.rs | 1 + crates/ui-egui/src/io.rs | 2 + crates/ui-egui/src/io/open.rs | 2 +- crates/ui-egui/src/io/save.rs | 181 +++++++++++++++++++++-- crates/ui-egui/src/io/saved_contents.rs | 185 ++++++++++++++++++++++++ crates/ui-egui/src/tests/save.rs | 56 +++++++ 8 files changed, 415 insertions(+), 16 deletions(-) create mode 100644 crates/ui-egui/src/io/saved_contents.rs diff --git a/Cargo.lock b/Cargo.lock index b878d75456..1395815475 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9289,6 +9289,7 @@ dependencies = [ "rustix 1.1.6", "serde", "serde_json", + "sha2 0.10.9", "toml", "vectorcraft-apischema", "vectorcraft-brush", diff --git a/crates/ui-egui/Cargo.toml b/crates/ui-egui/Cargo.toml index eddc4bf6bd..a94d788e91 100644 --- a/crates/ui-egui/Cargo.toml +++ b/crates/ui-egui/Cargo.toml @@ -87,6 +87,9 @@ craft = { workspace = true, features = ["dialogs", "update", "automation-agents" # The local date and time the status bar's Date and Time readout shows (`chrono::Local`). Already in # Cargo.lock with the time-zone crates `clock` uses. chrono = { workspace = true, features = ["clock"] } +# The digest of each open document's file, which Save compares with the file before asking whether to replace it +# (`src/io/saved_contents.rs`). Already in Cargo.lock (the engine's and the plug-ins' digests). +sha2 = { version = "0.10", default-features = false } [target.'cfg(target_arch = "wasm32")'.dependencies] # The status bar's Date and Time readout reads the page's clock with this crate in the web build. It diff --git a/crates/ui-egui/src/app.rs b/crates/ui-egui/src/app.rs index e2b89abff8..b769dac802 100644 --- a/crates/ui-egui/src/app.rs +++ b/crates/ui-egui/src/app.rs @@ -658,6 +658,7 @@ impl VectorcraftApp { if !self.background.jobs.is_empty() || !self.opening.pending.is_empty() || !self.opening.converting.is_empty() + || io::save::checks_pending(self) || plugin_runs::any_pending(self) || !self.placing.pending.is_empty() || !self.trace_runs.running.is_empty() diff --git a/crates/ui-egui/src/io.rs b/crates/ui-egui/src/io.rs index 8d311212aa..ba7b2d856f 100644 --- a/crates/ui-egui/src/io.rs +++ b/crates/ui-egui/src/io.rs @@ -16,6 +16,8 @@ pub(crate) mod export; mod open; mod read_only_save; pub(crate) mod save; +#[cfg(not(target_arch = "wasm32"))] +mod saved_contents; #[cfg(test)] mod tests_read_only_save; diff --git a/crates/ui-egui/src/io/open.rs b/crates/ui-egui/src/io/open.rs index dce5bac6e5..a536eb1e1c 100644 --- a/crates/ui-egui/src/io/open.rs +++ b/crates/ui-egui/src/io/open.rs @@ -178,7 +178,7 @@ pub(crate) fn opened(app: &mut VectorcraftApp, r: &Value) { if let Some(st) = index.and_then(|i| app.session.documents().get(i)) && let Some(path) = &st.path { - app.saves.watch.known_now(st.uid, Path::new(path)); + app.saves.known_now(st.uid, Path::new(path)); } let notes = open_notes(app, r); crate::dialogs::missing_links::after_open(app, r, notes); diff --git a/crates/ui-egui/src/io/save.rs b/crates/ui-egui/src/io/save.rs index fc42da3c77..c09cbe7106 100644 --- a/crates/ui-egui/src/io/save.rs +++ b/crates/ui-egui/src/io/save.rs @@ -1,14 +1,16 @@ use std::collections::HashMap; -use std::path::PathBuf; -// The save panel's flow is the desktop's (craft-dialogs is native only); the web downloads. +use std::path::{Path, PathBuf}; #[cfg(not(target_arch = "wasm32"))] -use std::path::Path; +use std::sync::mpsc::{Receiver, TryRecvError}; +// The save panel's flow is the desktop's (craft-dialogs is native only); the web downloads. #[cfg(not(target_arch = "wasm32"))] use craft::dialogs::save::{SAVE_IN_PROGRESS, SaveDocument, SaveFlow, SaveStep, SaveTarget}; #[cfg(not(target_arch = "wasm32"))] use craft::host::Files; use craft::host::{FileFilter, PickRequest, Picked, Wake}; +#[cfg(not(target_arch = "wasm32"))] +use craft::platform::watch::FileStamp; use craft::platform::watch::FileWatch; use craft::ui::dialog::DialogId; #[cfg(not(target_arch = "wasm32"))] @@ -48,12 +50,27 @@ struct SaveDone { then: Option, } +/// A save whose flow would ask whether to replace its document's file, waiting for the file to be +/// compared with the bytes the app last read or wrote. +#[cfg(not(target_arch = "wasm32"))] +struct Checking { + path: PathBuf, + /// The file's version when it holds those bytes, else `None`. + answer: Receiver>, +} + /// The saves of the app: one [`SaveFlow`] per document, and what the flows need to ask and write. pub(crate) struct Saves { #[cfg(not(target_arch = "wasm32"))] flows: HashMap>, /// The version of each document's file the app last read or wrote. pub(crate) watch: FileWatch, + /// The digest of the bytes of each document's file, as the app last read or wrote them. + #[cfg(not(target_arch = "wasm32"))] + contents: super::saved_contents::SavedContents, + /// The saves waiting for a comparison of their document's file with those bytes. + #[cfg(not(target_arch = "wasm32"))] + checks: HashMap, /// The files written beside each document's file, which its next save replaces. pub(crate) written_beside: HashMap>, /// The files the OK of the replace question allows the save it runs again to replace. @@ -68,6 +85,10 @@ impl Saves { Self { #[cfg(not(target_arch = "wasm32"))] flows: HashMap::new(), + #[cfg(not(target_arch = "wasm32"))] + contents: super::saved_contents::SavedContents::new(), + #[cfg(not(target_arch = "wasm32"))] + checks: HashMap::new(), watch: FileWatch::new(wake), written_beside: HashMap::new(), replace_files_ok: Vec::new(), @@ -76,12 +97,55 @@ impl Saves { } } + /// The app just read document `uid`'s file at `path`: that version is not a change on disk. + pub(crate) fn known_now(&mut self, uid: u64, path: &Path) { + self.watch.known_now(uid, path); + #[cfg(not(target_arch = "wasm32"))] + self.note_contents(uid, path); + } + + /// Takes the digest of document `uid`'s file at `path`, the version the watcher just recorded. + #[cfg(not(target_arch = "wasm32"))] + fn note_contents(&mut self, uid: u64, path: &Path) { + match FileStamp::at(path) { + // Not differing from the watcher's version: the file has not changed since it was recorded. + Some(stamp) if !self.watch.disk_differs(&uid, path, None) => self.contents.note(uid, path, stamp), + _ => self.contents.forget(uid), + } + } + + /// Stops tracking document `uid`'s file (the document closed). + #[cfg(not(target_arch = "wasm32"))] + fn forget(&mut self, uid: u64) { + self.watch.forget(&uid); + self.contents.forget(uid); + self.checks.remove(&uid); + } + #[cfg(not(target_arch = "wasm32"))] fn start(&mut self, files: &dyn Files, document: SaveDocument, target: SaveTarget) -> SaveStep { let Self { flows, watch, .. } = self; flows.entry(document.key).or_default().start(files, watch, document, target) } + /// The answer of document `uid`'s file comparison, once it has come (with `wait`, once it + /// comes): the file's version when it holds the bytes the app last read or wrote, and the + /// file's path. `None` while there is no answer yet, or no comparison. + #[cfg(not(target_arch = "wasm32"))] + fn answer(&mut self, uid: u64, wait: bool) -> Option<(Option, PathBuf)> { + let check = self.checks.get(&uid)?; + let same = if wait { + check.answer.recv().ok().flatten() + } else { + match check.answer.try_recv() { + Ok(same) => same, + Err(TryRecvError::Empty) => return None, + Err(TryRecvError::Disconnected) => None, + } + }; + self.checks.remove(&uid).map(|c| (same, c.path)) + } + /// Frees the document's flow after a write that wrote nothing. #[cfg(not(target_arch = "wasm32"))] pub(super) fn release(&mut self, uid: u64) { @@ -91,6 +155,18 @@ impl Saves { } } +/// Whether file comparisons need another frame to collect their answers. +#[cfg(not(target_arch = "wasm32"))] +pub(crate) fn checks_pending(app: &VectorcraftApp) -> bool { + !app.saves.checks.is_empty() +} + +/// The web has no file comparisons to collect. +#[cfg(target_arch = "wasm32")] +pub(crate) fn checks_pending(_: &VectorcraftApp) -> bool { + false +} + /// Calls the `then` of the document's save, once. #[cfg(not(target_arch = "wasm32"))] fn terminate(app: &mut VectorcraftApp, uid: u64, r: Result) { @@ -107,7 +183,13 @@ fn finish(app: &mut VectorcraftApp, uid: u64, retargets: bool, out: &Result flow.written(&mut app.saves.watch, uid, Path::new(path)), + Some(path) if flow.is_busy() || retargets => { + flow.written(&mut app.saves.watch, uid, Path::new(path)); + // The document's own file (not a copy's): its digest goes with the version the watcher took. + if app.session.documents().iter().any(|d| d.uid == uid && d.path.as_deref() == Some(path)) { + app.saves.note_contents(uid, Path::new(path)); + } + } _ => flow.failed(&uid), } if !matches!(out, Ok(v) if v.get("pending").is_some()) { @@ -124,10 +206,12 @@ pub(crate) fn allow_replacing(app: &mut VectorcraftApp, files: &[String]) { } } -/// Takes what the flows and their questions have answered since the last pass: the pick, the -/// changed-on-disk question's answer. A save whose document closed is cancelled and forgotten. +/// Takes what the flows and their questions have answered since the last pass: the comparison of +/// a document's file, the pick, the changed-on-disk question's answer. A save whose document +/// closed is cancelled and forgotten. Closed documents' digest state is dropped on every pass. #[cfg(not(target_arch = "wasm32"))] pub(crate) fn pump(app: &mut VectorcraftApp, _ctx: &egui::Context) { + resume_checked(app, false); let busy: Vec = app.saves.flows.iter().filter(|(_, f)| f.is_busy()).map(|(uid, _)| *uid).collect(); for uid in busy { if !app.session.documents().iter().any(|d| d.uid == uid) { @@ -136,7 +220,7 @@ pub(crate) fn pump(app: &mut VectorcraftApp, _ctx: &egui::Context) { if let Some(mut flow) = app.saves.flows.remove(&uid) { flow.cancel(app.host.files()); } - app.saves.watch.forget(&uid); + app.saves.forget(uid); continue; } let (scope, automated) = app.saves.done.get(&uid).map_or_else(|| (ScopeHandle::capture(), app.automation_asked()), |d| d.asked.clone()); @@ -152,6 +236,54 @@ pub(crate) fn pump(app: &mut VectorcraftApp, _ctx: &egui::Context) { app.status(e); } } + app.saves.contents.retain_open(app.session.documents().iter().map(|d| d.uid)); +} + +/// Goes on with the saves whose file comparison has answered (with `wait`, every one, once it +/// answers): an unchanged file is written over, and a changed one is asked about. +#[cfg(not(target_arch = "wasm32"))] +fn resume_checked(app: &mut VectorcraftApp, wait: bool) { + let checking: Vec = app.saves.checks.keys().copied().collect(); + for uid in checking { + // A closed document's save is cancelled with its flow, in [`pump`]. + if !app.session.documents().iter().any(|d| d.uid == uid) { + continue; + } + let (scope, automated) = app.saves.done.get(&uid).map_or_else(|| (ScopeHandle::capture(), app.automation_asked()), |d| d.asked.clone()); + let r = scope.run(|| { + file_asks::as_automated(app, automated, |app| { + let (same, path) = app.saves.answer(uid, wait)?; + // Still that version: a change made since the comparison is asked about. + let Some(stamp) = same.filter(|stamp| FileStamp::at(&path) == Some(*stamp)) else { + let asked = ask_changed_on_disk(app, uid, &path); + return Some(settle(app, uid, asked)); + }; + // The same bytes: the file's version now is the document's, and the flow writes over it. + app.saves.watch.known_as(uid, &path, Some(stamp)); + let step = app.saves.flows.get_mut(&uid).map_or(SaveStep::Busy, SaveFlow::replace); + Some(run_step(app, uid, step)) + }) + }); + if let Some(Err(e)) = r + && e != "cancelled" + { + app.status(e); + } + } +} + +/// Waits for every save's file comparison and goes on with those saves. +#[cfg(all(test, not(target_arch = "wasm32")))] +pub(crate) fn wait_for_checks(app: &mut VectorcraftApp) { + resume_checked(app, true); +} + +/// Waits for the active document's baseline digest and compares it with the file. +#[cfg(all(test, not(target_arch = "wasm32")))] +pub(crate) fn wait_for_contents(app: &VectorcraftApp) -> Option { + let document = app.session.active()?; + let path = Path::new(document.path.as_deref()?); + app.saves.contents.check(document.uid, path)?.recv().ok().flatten() } /// The web has no save flows: nothing answers between passes. @@ -182,6 +314,12 @@ fn next_step(app: &mut VectorcraftApp, uid: u64) -> Option> { /// Runs `step` of the document `uid`'s save; a failure frees the flow and tells the caller. fn run_step(app: &mut VectorcraftApp, uid: u64, step: SaveStep) -> Result { let r = proceed(app, step); + settle(app, uid, r) +} + +#[cfg(not(target_arch = "wasm32"))] +/// The result `r` of a step of document `uid`'s save; a failure frees the flow and tells the caller. +fn settle(app: &mut VectorcraftApp, uid: u64, r: Result) -> Result { if r.is_err() { app.saves.release(uid); terminate(app, uid, r.clone()); @@ -189,19 +327,32 @@ fn run_step(app: &mut VectorcraftApp, uid: u64, step: SaveStep) -> Result Result { + let name = fileio::file_name(&path.to_string_lossy()); + let prompt = StandardPrompt::changed_on_disk(name).instance(("changed-on-disk", key)); + let id = app.dialogs().ok_or("no window to ask in")?.with(|host| host.open(prompt)); + if let Some(done) = app.saves.done.get_mut(&key) { + done.question = Some(id); + } + Ok(json!({ "pending": "changedOnDisk" })) +} + #[cfg(not(target_arch = "wasm32"))] fn proceed(app: &mut VectorcraftApp, step: SaveStep) -> Result { match step { SaveStep::Picking => Ok(json!({ "pending": "fileDialog" })), - SaveStep::AskChangedOnDisk { key, path } => { - let name = fileio::file_name(&path.to_string_lossy()); - let prompt = StandardPrompt::changed_on_disk(name).instance(("changed-on-disk", key)); - let id = app.dialogs().ok_or("no window to ask in")?.with(|host| host.open(prompt)); - if let Some(done) = app.saves.done.get_mut(&key) { - done.question = Some(id); + // Before asking, the file is compared with the bytes the app last read or wrote: a file + // whose metadata alone changed (a cloud-sync folder sets attributes on it, or puts the same + // bytes back as a new file) is written over without asking (#10734). [`pump`] goes on. + SaveStep::AskChangedOnDisk { key, path } => match app.saves.contents.check(key, &path) { + Some(answer) => { + app.saves.checks.insert(key, Checking { path, answer }); + Ok(json!({ "pending": "checkingFile" })) } - Ok(json!({ "pending": "changedOnDisk" })) - } + None => ask_changed_on_disk(app, key, &path), + }, SaveStep::Write { key, path, target, file_type } => write_step(app, key, &path.to_string_lossy(), target, file_type), SaveStep::Cancelled { key } => { terminate(app, key, Err("cancelled".into())); diff --git a/crates/ui-egui/src/io/saved_contents.rs b/crates/ui-egui/src/io/saved_contents.rs new file mode 100644 index 0000000000..3e3ff170b8 --- /dev/null +++ b/crates/ui-egui/src/io/saved_contents.rs @@ -0,0 +1,185 @@ +//! The bytes of each open document's file as the app last read or wrote them, kept as a SHA-256 +//! digest (#10734). Save asks before replacing a file another app changed, and the save flow +//! counts a new change time or a new inode as a change. A cloud-sync folder sets +//! attributes on a file after uploading it, or puts the same bytes back as a new file. When the +//! file on disk still holds the bytes the app wrote, Save writes without asking. +//! +//! Files are read and digested on threads of their own: a file in a cloud folder may have to be +//! downloaded first. + +use std::collections::HashMap; +use std::fs::File; +use std::io::Read; +use std::path::{Path, PathBuf}; +use std::sync::mpsc::{self, Receiver}; +use std::sync::{Arc, Mutex, MutexGuard, PoisonError}; +use std::thread::JoinHandle; + +use craft::platform::watch::FileStamp; +use sha2::{Digest, Sha256}; + +/// A version of a document's file: its path, its stamp when read, and the digest of its bytes. +#[derive(Clone)] +struct Version { + path: PathBuf, + stamp: FileStamp, + digest: [u8; 32], +} + +#[derive(Default)] +struct State { + versions: HashMap, + /// Counts the notes of each document: a digest taken for an older note is dropped. + notes: HashMap, + /// The digest being taken for each document's newest note. + pending: HashMap>, +} + +/// The digests of the open documents' files. +pub(crate) struct SavedContents { + state: Arc>, +} + +fn lock(state: &Mutex) -> MutexGuard<'_, State> { + state.lock().unwrap_or_else(PoisonError::into_inner) +} + +impl SavedContents { + /// No digests yet. + pub(crate) fn new() -> Self { + Self { state: Arc::default() } + } + + /// The app just read or wrote document `key`'s file at `path`, and `stamp` is that version. + /// The file is opened and its digest taken on a thread of its own. Any stamp change + /// before or during the read leaves no digest, so Save asks on a change. + pub(crate) fn note(&self, key: u64, path: &Path, stamp: FileStamp) { + let note = { + let mut state = lock(&self.state); + state.versions.remove(&key); + state.pending.remove(&key); + let note = state.notes.entry(key).or_default(); + *note = note.wrapping_add(1); + *note + }; + let state = Arc::clone(&self.state); + let path = path.to_path_buf(); + let work = move || { + let Ok(file) = File::open(&path) else { return }; + let Some(digest) = digest_of(file, stamp) else { return }; + let mut state = lock(&state); + if state.notes.get(&key) == Some(¬e) { + state.versions.insert(key, Version { path, stamp, digest }); + } + }; + // Without a thread nothing is recorded, and Save asks on any change, as before. + if let Ok(handle) = std::thread::Builder::new().name("vectorcraft-file-digest".into()).spawn(work) { + lock(&self.state).pending.insert(key, handle); + } + } + + /// Starts comparing document `key`'s file at `path` with the version the app last read or + /// wrote, on a thread of its own that first waits for that version's digest. The answer is + /// the file's version now when it holds the same bytes, and `None` when the bytes differ, the + /// file can't be read, or no digest of `path` was taken. `None` here when no thread starts. + pub(crate) fn check(&self, key: u64, path: &Path) -> Option>> { + let pending = lock(&self.state).pending.remove(&key); + let state = Arc::clone(&self.state); + let path = path.to_path_buf(); + let (send, answer) = mpsc::channel(); + let work = move || { + if let Some(handle) = pending { + // A digest thread that panicked recorded nothing. + let _ = handle.join(); + } + // The caller may be gone (its document closed): the answer is dropped. + let _ = send.send(unchanged(&state, key, &path)); + }; + std::thread::Builder::new().name("vectorcraft-file-check".into()).spawn(work).ok().map(|_| answer) + } + + /// Document `key` closed: its digest is dropped, and one still being taken is not recorded. + pub(crate) fn forget(&self, key: u64) { + let mut state = lock(&self.state); + state.versions.remove(&key); + state.pending.remove(&key); + let note = state.notes.entry(key).or_default(); + *note = note.wrapping_add(1); + } + + /// Drops closed documents' versions, pending handles and note counters only when needed. + /// Removing a note counter prevents its digest thread from recording a version later. + pub(crate) fn retain_open(&self, open: impl Iterator + Clone) { + let mut state = lock(&self.state); + let is_open = |key: &u64| open.clone().any(|uid| uid == *key); + if state.notes.keys().any(|key| !is_open(key)) { + state.versions.retain(|key, _| is_open(key)); + state.pending.retain(|key, _| is_open(key)); + state.notes.retain(|key, _| is_open(key)); + } + } +} + +/// [`SavedContents::check`]'s answer, on its thread. +fn unchanged(state: &Mutex, key: u64, path: &Path) -> Option { + let version = lock(state).versions.get(&key).filter(|v| v.path == path).cloned()?; + let now = FileStamp::at(path)?; + if now.len() != version.stamp.len() || digest_of(File::open(path).ok()?, now)? != version.digest || FileStamp::at(path) != Some(now) { + return None; + } + if let Some(v) = lock(state).versions.get_mut(&key).filter(|v| v.digest == version.digest) { + v.stamp = now; + } + Some(now) +} + +/// The digest of `file`, read while its full stamp stays at `stamp`; `None` when the stamp +/// differs or the file can't be read. A Unix change time alone can also signal changed bytes. +fn digest_of(mut file: File, stamp: FileStamp) -> Option<[u8; 32]> { + if !file.metadata().is_ok_and(|m| FileStamp::of(&m) == stamp) { + return None; + } + let mut hasher = Sha256::new(); + let mut buffer = vec![0u8; 64 * 1024]; + loop { + let n = file.read(&mut buffer).ok()?; + if n == 0 { + break; + } + hasher.update(buffer.get(..n)?); + } + file.metadata().is_ok_and(|m| FileStamp::of(&m) == stamp).then(|| hasher.finalize().into()) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn retaining_open_documents_drops_closed_documents_state() { + let folder = crate::tests_folder::Folder::new("saved-contents-retain"); + let file = folder.file("document", b"saved contents"); + let path = Path::new(&file); + let stamp = FileStamp::at(path).unwrap(); + let contents = SavedContents::new(); + for uid in [1, 2] { + contents.note(uid, path, stamp); + assert!(contents.check(uid, path).unwrap().recv().unwrap().is_some()); + } + // A third document closes while its digest handle is still retained. + contents.note(3, path, stamp); + contents.retain_open([2].into_iter()); + + { + let state = lock(&contents.state); + for uid in [1, 3] { + assert!(!state.versions.contains_key(&uid)); + assert!(!state.pending.contains_key(&uid)); + assert!(!state.notes.contains_key(&uid)); + } + } + assert!(contents.check(1, path).unwrap().recv().unwrap().is_none()); + assert!(contents.check(3, path).unwrap().recv().unwrap().is_none()); + assert!(contents.check(2, path).unwrap().recv().unwrap().is_some()); + } +} diff --git a/crates/ui-egui/src/tests/save.rs b/crates/ui-egui/src/tests/save.rs index b1fa7cb347..de7728f9e7 100644 --- a/crates/ui-egui/src/tests/save.rs +++ b/crates/ui-egui/src/tests/save.rs @@ -593,3 +593,59 @@ fn acknowledging_import_loss_does_not_overwrite_the_source_with_another_drawing( assert!(after_switch == saved, "drawing B must never overwrite A's file"); assert!(after_original != saved, "approval in drawing A must still save A"); } + +/// Puts `bytes` at `path` as a new file, as a cloud-sync folder puts a file back after uploading +/// it: the file gets a new inode and new change and modification times. +fn put_back(path: &str, bytes: &[u8]) { + let next = format!("{path}.sync"); + std::fs::write(&next, bytes).unwrap(); + std::fs::rename(&next, path).unwrap(); +} + +/// Once its baseline digest is recorded, Save writes without asking while the file holds the +/// bytes the app last read or wrote (#10734), and asks once they differ, even at the same length. +#[test] +fn save_asks_about_a_changed_file_only_when_its_bytes_changed() { + let d = dir("same-bytes"); + let path = d.join("a.vectorcraft").to_string_lossy().to_string(); + let mut writer = app(); + writer.run("file.new", json!({"width": 100, "height": 100})).unwrap(); + rect(&mut writer); + writer.run("file.saveAs", json!({"path": path})).unwrap(); + crate::background::wait_all(&mut writer); + let mut app = app(); + io::open_path(&mut app, &path).unwrap(); + assert!(io::save::wait_for_contents(&app).is_some(), "the opened file's baseline is recorded before sync"); + + let saved = |app: &VectorcraftApp| vectorcraft_format::load(&std::fs::read(&path).unwrap()).unwrap().node_count() == objects(app); + // File › Save, once the file has been compared: did it ask? + let save = |app: &mut VectorcraftApp| { + rect(app); + assert_eq!(app.run("file.save", json!({})).unwrap()["pending"], "checkingFile"); + io::save::wait_for_checks(app); + crate::background::wait_all(app); + if !app.any_dialog_open() { + assert!(io::save::wait_for_contents(app).is_some(), "the written file's baseline is recorded before sync"); + } + app.any_dialog_open() + }; + + // Read from the file: the same bytes put back. + put_back(&path, &std::fs::read(&path).unwrap()); + assert!(!save(&mut app)); + assert!(saved(&app)); + + // Written by that save: the same bytes put back. + put_back(&path, &std::fs::read(&path).unwrap()); + assert!(!save(&mut app)); + assert!(saved(&app)); + + // Other bytes of the same length. + let mut other = std::fs::read(&path).unwrap(); + let last = other.last_mut().unwrap(); + *last ^= 0xff; + put_back(&path, &other); + assert!(save(&mut app), "asks whether to replace the file"); + assert_eq!(std::fs::read(&path).unwrap(), other, "nothing is written before the answer"); + let _ = std::fs::remove_dir_all(d); +} From e009722fe8f069a1c67adff8360ffe0db896f6d4 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 05:02:06 -0800 Subject: [PATCH 21/62] Canvas: a drag moves the kept anchor marks mesh instead of tessellating it Each step of a drag moved the kept selection marks, but the anchor marks' mesh was keyed on the marks key, which changes with every revision, so every step tessellated the anchors, handles and outlines again and flattened every outline. With about 2,000 paths selected that was the largest part of each step. The kept mesh now moves with the marks when that gives what a new tessellation gives: the move since the mesh was tessellated is a whole number of physical pixels on screen, so pixel rounding lands the same, and every anchor and handle is inside the canvas and the clip before and after the move, so no mark is left out or culled. Otherwise the next paint tessellates the marks as before. A new revision of the same document and selection also keeps the mesh. --- crates/ui-egui/src/canvas/selection.rs | 68 ++++++++++++++++- crates/ui-egui/src/canvas/selection/tests.rs | 77 ++++++++++++++++++++ 2 files changed, 143 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/canvas/selection.rs b/crates/ui-egui/src/canvas/selection.rs index 861eda0790..b6421c882b 100644 --- a/crates/ui-egui/src/canvas/selection.rs +++ b/crates/ui-egui/src/canvas/selection.rs @@ -688,6 +688,59 @@ struct MeshKey { pub(crate) struct KeptMesh { key: MeshKey, mesh: Arc, + /// How far the marks moved on screen since they were tessellated, in physical pixels, unrounded + /// ([`KeptMesh::translate`]). The mesh moved by this distance rounded. + moved: [f64; 2], +} + +/// How far from a whole number of physical pixels the marks' move since they were tessellated may be on screen, and +/// still count as whole: rounding noise of the screen position, well under what the tessellator's `f32` positions hold. +const PIXEL_SLACK: f64 = 1e-6; + +impl KeptMesh { + /// Moves the mesh by `by` in the document when tessellating the moved marks would give the same mesh moved, and + /// returns whether it did. `was` is the box of the marks' points before the move ([`knots_box`]). The mesh moves + /// when the marks' whole move since they were tessellated is a whole number of physical pixels on screen, so the + /// tessellator's rounding to pixels lands the same, and when every point is inside the canvas the marks are drawn + /// near and inside the clip both before and after the move, so no anchor, handle or outline is left out or culled + /// on either side. + fn translate(&mut self, by: Vec2, was: Option) -> bool { + let key = &self.key; + let ppp = f64::from(key.pixels_per_point); + let view = key.view.affine(); + let shift = (view * (Point::ZERO + by)) - (view * Point::ZERO); + let moved = [self.moved[0] + shift.x * ppp, self.moved[1] + shift.y * ppp]; + if moved.iter().any(|p| !p.is_finite() || (p - p.round()).abs() > PIXEL_SLACK) { + return false; + } + if let Some(was) = was { + let area = key.rect.expand(key.look.reach).intersect(key.clip); + let inside = |r: vectorcraft_geom::Rect| { + [(r.x0, r.y0), (r.x1, r.y0), (r.x1, r.y1), (r.x0, r.y1)].into_iter().all(|(x, y)| area.contains(key.view.to_screen(Point::new(x, y)))) + }; + if !(inside(was) && inside(was + by)) { + return false; + } + } + let step = |axis: usize| ((moved[axis].round() - self.moved[axis].round()) / ppp) as f32; + let offset = vec2(step(0), step(1)); + self.moved = moved; + Arc::make_mut(&mut self.mesh).translate(offset); + true + } +} + +/// The box of every anchor and direction handle of `anchors`, in document units, or `None` without any. The outlines +/// lie inside it too, as a curve lies inside the hull of its points. +fn knots_box(anchors: &Anchors) -> Option { + anchors + .paths + .iter() + .chain(&anchors.plain) + .flat_map(|p| &p.subpaths) + .flat_map(|sp| &sp.knots) + .flat_map(|knot| [knot.anchor, knot.in_ctrl, knot.out_ctrl]) + .fold(None, |r: Option, p| Some(r.map_or(vectorcraft_geom::Rect::from_points(p, p), |r| r.union_pt(p)))) } /// One set of anchors as `BezierOverlay` took it: the paths, which anchors are selected and how they show. @@ -809,7 +862,7 @@ impl Component for AnchorMarks<'_> { None => { let shapes = shapes(); let mesh = Arc::new(tessellate(shapes, &key)); - *kept = Some(KeptMesh { key, mesh: Arc::clone(&mesh) }); + *kept = Some(KeptMesh { key, mesh: Arc::clone(&mesh), moved: [0.0; 2] }); mesh } }; @@ -1198,12 +1251,23 @@ impl SelectionMarks { self.from = (moved.from.clone(), moved.by); self.doc = moved.to.clone(); } + // The kept mesh shows these marks, so it stays theirs under the new key. + let was = self.key; + if let Some(kept) = self.mesh.get_mut().as_mut().filter(|kept| kept.key.marks == was) { + kept.key.marks = key; + } self.key = key; Some(self) } - /// Moves every mark by `by`. + /// Moves every mark by `by`, and the kept mesh of the anchor marks with them when it can move as it is + /// ([`KeptMesh::translate`]); otherwise the next paint tessellates the marks again. fn translate(&mut self, by: Vec2) { + let was = knots_box(&self.anchors); + let mesh = self.mesh.get_mut(); + if mesh.as_mut().is_some_and(|kept| !kept.translate(by, was)) { + *mesh = None; + } let shift = vectorcraft_geom::Affine::translate(by); for o in &mut self.outlines { o.paths.iter_mut().chain(o.key.as_mut()).for_each(|path| path.apply_affine(shift)); diff --git a/crates/ui-egui/src/canvas/selection/tests.rs b/crates/ui-egui/src/canvas/selection/tests.rs index 65ca87aff3..f23e4087aa 100644 --- a/crates/ui-egui/src/canvas/selection/tests.rs +++ b/crates/ui-egui/src/canvas/selection/tests.rs @@ -1283,3 +1283,80 @@ fn a_move_of_the_selection_moves_its_marks_without_building_them() { assert_eq!(frames(&mut app, 3), 1, "an undo"); assert!(kept_marks_are_current(&app), "after an undo"); } + +/// The mesh of the anchor marks the canvas keeps. +fn kept_mesh(app: &VectorcraftApp) -> Arc { + let marks = app.canvas.selection_marks.as_ref().expect("the canvas drew the selection's marks"); + let kept = marks.mesh.borrow(); + Arc::clone(&kept.as_ref().expect("the canvas kept the anchor marks' mesh").mesh) +} + +// A drag of the selection moves the kept mesh of its anchor marks instead of tessellating them again: steps of whole +// pixels tessellate nothing and leave the mesh a new tessellation gives, a new revision of the same marks keeps it, and +// a step of part of a pixel or one that takes the marks past the canvas's edge tessellates them once. +#[test] +fn a_drag_of_the_selection_moves_the_anchor_marks_mesh_without_tessellating_it() { + let (mut app, curve) = canvas_app(); + app.select_tool("selection"); + app.run("select.set", json!({"ids": [curve.0]})).unwrap(); + let ctx = crate::testing::ui_context(); + let frames = |app: &mut VectorcraftApp, n: usize| { + let before = MESHES_BUILT.with(std::cell::Cell::get); + for _ in 0..n { + canvas_frame(app, &ctx, vec![]); + } + MESHES_BUILT.with(std::cell::Cell::get) - before + }; + assert_eq!(frames(&mut app, 2), 1, "the first frame tessellates the marks"); + // A document distance that is `px` physical pixels across on screen. + let pixels = |app: &VectorcraftApp, px: f64| px / (app.canvas_view().unwrap().zoom * f64::from(ctx.pixels_per_point())); + let step = |app: &mut VectorcraftApp, dx: f64| { + app.session.preview("object.transform", &json!({"matrix": [1, 0, 0, 1, dx, 0], "copy": false})).unwrap(); + }; + + let layer = app.session.active().unwrap().doc.layers[0].id; + app.run("layer.setCurrent", json!({"id": layer.0})).unwrap(); + assert_eq!(frames(&mut app, 2), 0, "a new revision of the same document and selection"); + + // The kept mesh matches the one marks built now tessellate; the kept marks go back afterwards, so the drag + // goes on moving them. + let matches_new = |app: &mut VectorcraftApp, case: &str| { + let moved = kept_mesh(app); + let kept = app.canvas.selection_marks.take(); + canvas_frame(app, &ctx, vec![]); + let fresh = kept_mesh(app); + app.canvas.selection_marks = kept; + assert!(!fresh.vertices.is_empty(), "{case}: the marks drew something"); + assert_eq!(moved.indices, fresh.indices, "{case}: the moved mesh has the triangles of a new one"); + assert_eq!(moved.vertices.len(), fresh.vertices.len(), "{case}"); + for (a, b) in moved.vertices.iter().zip(&fresh.vertices) { + assert_eq!(a.color, b.color, "{case}"); + assert!((a.pos - b.pos).length() < 1e-3, "{case}: a moved vertex at {:?}, a new one at {:?}", a.pos, b.pos); + } + }; + + app.session.begin_interaction("Move").unwrap(); + let built = MARKS_BUILT.with(std::cell::Cell::get); + for px in [3.0, 10.0, -4.0] { + let dx = pixels(&app, px); + step(&mut app, dx); + assert_eq!(frames(&mut app, 2), 0, "a drag's step to {px} pixels"); + } + assert_eq!(MARKS_BUILT.with(std::cell::Cell::get), built, "the drag moved the kept marks"); + matches_new(&mut app, "after whole pixels"); + + let built = MARKS_BUILT.with(std::cell::Cell::get); + let dx = pixels(&app, -4.5); + step(&mut app, dx); + assert_eq!(frames(&mut app, 2), 1, "a step to part of a pixel"); + let dx = pixels(&app, -3.5); + step(&mut app, dx); + assert_eq!(frames(&mut app, 2), 0, "a whole pixel from the marks tessellated at part of one"); + assert_eq!(MARKS_BUILT.with(std::cell::Cell::get), built, "the drag moved the kept marks"); + matches_new(&mut app, "after part of a pixel and a whole one"); + // Whole pixels from the last step. + let dx = pixels(&app, 1996.5); + step(&mut app, dx); + assert_eq!(frames(&mut app, 2), 1, "a step past the canvas's edge"); + app.session.commit_interaction().unwrap(); +} From 3a7e15649b9c25e6f95856fd8d1522117e00f01f Mon Sep 17 00:00:00 2001 From: ruchirguitar <113586074+ruchirguitar@users.noreply.github.com> Date: Sat, 5 Dec 2026 18:32:50 +0530 Subject: [PATCH 22/62] fix(ui): anchor control bar Stroke, Opacity, and Style popovers (#10233) --- crates/ui-egui/src/chrome/control_bar.rs | 40 ++++++++++++----- crates/ui-egui/src/chrome/tests.rs | 57 ++++++++++++++++++++++++ crates/ui-egui/src/panels/stroke.rs | 32 ++++++------- crates/ui-egui/src/tests/taskbar.rs | 28 ++++++++++++ 4 files changed, 130 insertions(+), 27 deletions(-) diff --git a/crates/ui-egui/src/chrome/control_bar.rs b/crates/ui-egui/src/chrome/control_bar.rs index 266726909a..c1fed7f9fa 100644 --- a/crates/ui-egui/src/chrome/control_bar.rs +++ b/crates/ui-egui/src/chrome/control_bar.rs @@ -6,10 +6,11 @@ use craft::ui::display::{Divider, Elide, Shade, Text}; use craft::ui::form::Field; use craft::ui::layout_components::Row; use craft::ui::menu::{Menu, MenuItem}; +use craft::ui::popover::Popover; use craft::ui::shell::{BarGrip, OptionsBarPlace}; use craft::ui::style::SurfaceKind; use craft::ui::text::NumberField; -use egui::Ui; +use egui::{Ui, vec2}; use serde_json::{Value, json}; use vectorcraft_doc::NodeKind; @@ -281,14 +282,17 @@ fn fill_and_stroke(app: &mut VectorcraftApp, ui: &mut Ui) { ranked(ui, rank::DETAIL, |ui| stroke_panel::profile_select(app, ui)); } -/// The Control bar's Opacity group: its link, which opens the Transparency panel and scrubs the field, and the -/// field, showing `opacity`. Only a selection takes the edit. +const PANEL_POPOVER_W: f32 = 260.0; +const PANEL_POPOVER_MIN_TALL: f32 = 200.0; + +/// The Control bar's Opacity group: its link, which opens the Transparency panel in a popover anchored to it +/// and scrubs the field, and the field, showing `opacity`. Only a selection takes the edit. fn opacity_field(app: &mut VectorcraftApp, ui: &mut Ui, opacity: f32, selected: bool) { let label = tl!("Opacity:"); let (mut link, mut typed) = (false, None); let target = crate::panels::transparency_target(app); group(ui, rank::OPACITY, |ui| { - Field::new(label).side(SideLabel::new().link().scrub(true)).show(ui, |ui, _| { + let field = Field::new(label).side(SideLabel::new().link().scrub(true)).show(ui, |ui, _| { let number = NumberField::new(label, Bind::given(Some(crate::panels::shown_percent(opacity)))) .range(0.0..=100.0) .unit("%") @@ -298,10 +302,19 @@ fn opacity_field(app: &mut VectorcraftApp, ui: &mut Ui, opacity: f32, selected: link |= number.link; typed = number.edit.events.committed().copied().flatten().or(typed); }); + let open_id = field.output.id.with("transparency_popover_open"); + let mut open = ui.data(|d| d.get_temp::(open_id).unwrap_or(false)); + if link { + open = !open; + } + Popover::new(tl!("Transparency"), Bind::bound(&mut open)).opened_by(&field.output).show(ui, |ui, _| { + ui.scope(|ui| { + ui.set_max_width(PANEL_POPOVER_W); + crate::panels::transparency::show(app, ui); + }); + }); + ui.data_mut(|d| d.insert_temp(open_id, open)); }); - if link { - app.ui.open_panel = Some("transparency".into()); - } if let Some(o) = typed.filter(|_| selected) { app.run("transparency.set", json!({"opacity": o.clamp(0.0, 100.0)})).ok(); } @@ -311,14 +324,17 @@ fn opacity_field(app: &mut VectorcraftApp, ui: &mut Ui, opacity: f32, selected: /// Global Edit Options. A narrow bar leaves out Global Edit Options first, then Recolor Artwork, then the Style /// link with its picker. fn style_group(app: &mut VectorcraftApp, ui: &mut Ui) { - let mut open = false; ranked(ui, rank::GROUP, |ui| { - open |= crate::panels::option_link(tl!("Style:")).show(ui).clicked(); + let link = crate::panels::option_link(tl!("Style:")).show(ui); + let tall = (ui.ctx().content_rect().height() * 0.6).max(PANEL_POPOVER_MIN_TALL); + Popover::new(tl!("Graphic Styles"), Bind::kept()).collection_body().overlay(|overlay| overlay.opened_by(&link, Trigger::Click)).show( + ui, + |ui, _| { + ui.allocate_ui(vec2(PANEL_POPOVER_W, tall), |ui| crate::panels::graphic_styles::show(app, ui)); + }, + ); crate::panels::graphic_styles::style_picker(app, ui); }); - if open { - app.ui.open_panel = Some("graphicStyles".into()); - } // Recolor Artwork, when the selection has colours to recolour. let colored = app.session.active().is_some_and(|st| crate::canvas::has_colors(&st.doc, &st.selection.objects)); if colored { diff --git a/crates/ui-egui/src/chrome/tests.rs b/crates/ui-egui/src/chrome/tests.rs index 24df04ceba..cb72280797 100644 --- a/crates/ui-egui/src/chrome/tests.rs +++ b/crates/ui-egui/src/chrome/tests.rs @@ -3629,3 +3629,60 @@ fn the_control_bar_selects_similar_objects() { bar.app().run("window.control.options", json!({"group": "objectOptions"})).unwrap(); assert!(bar.settle().find("Select Similar Objects").is_some(), "Object Options on again"); } + +/// Clicking Stroke:, Opacity: or Style: on the Control bar opens its panel in a popover anchored to that link rather +/// than at the window's left edge or in the dock flyout; Stroke: in the Control bar stays independent of Properties' +/// Stroke row. +#[test] +fn control_bar_panel_links_open_anchored_popovers() { + crate::i18n::set_current(crate::i18n::Lang::EN); + let mut app = crate::VectorcraftApp::new(Session::new(), Default::default()); + app.run("file.new", json!({"width": 400, "height": 200})).unwrap(); + let id = app.run("shape.rectangle", json!({"x": 10, "y": 10, "width": 30, "height": 20})).unwrap()["id"].clone(); + app.run("select.set", json!({ "ids": [id] })).unwrap(); + let mut bar = Shown::new(app, egui::vec2(2400.0, 700.0), |app, ui| { + super::control_bar(app, ui); + crate::panels::properties::show(app, ui); + }); + bar.room(egui::vec2(2400.0, 700.0)).settle(); + + let assert_anchored = |bar: &Shown, link: &Target, content: &Target, label: &str| { + assert!(link.rect.left() > 80.0, "{label}: link {:?} sits past the left edge", link.rect); + assert!(content.rect.top() >= link.rect.bottom() - 2.0, "{label}: popover {:?} opens below {:?}", content.rect, link.rect); + assert!( + (content.rect.center().x - link.rect.center().x).abs() < 220.0 && content.rect.left() > 40.0, + "{label}: popover {:?} anchors horizontally near {:?}, not on the left side", + content.rect, + link.rect + ); + assert!(bar.app().ui.open_panel.is_none(), "{label}: opens as a popover rather than a dock flyout"); + }; + + // Stroke: opens its popover under the Control bar's link and leaves Properties' Stroke row closed. + let stroke_link = caption(&bar, "Stroke:").expect("Stroke: link"); + assert!(bar.find("Dashed line").is_none(), "Stroke popover starts closed"); + bar.click_on(&stroke_link).settle(); + let dashed: Vec<_> = bar.fixture.by_role(Role::CHECK_BOX).into_iter().filter(|t| bar.tree().name_of(t.node) == Some("Dashed line")).collect(); + assert_eq!(dashed.len(), 1, "Control bar and Properties keep separate Stroke popovers: {dashed:?}, names: {:?}", bar.names()); + assert_anchored(&bar, &stroke_link, &dashed[0], "Stroke:"); + bar.click_on(&stroke_link).settle(); + assert!(bar.find("Dashed line").is_none(), "a second click closes the Stroke popover"); + + // Opacity: opens Transparency in an anchored popover. + let opacity_link = caption(&bar, "Opacity:").expect("Opacity: link"); + assert!(bar.find("Isolate Blending").is_none(), "Transparency popover starts closed"); + bar.click_on(&opacity_link).settle(); + let isolate = bar.find("Isolate Blending").unwrap_or_else(|| panic!("Transparency popover opens: {:?}", bar.names())); + assert_anchored(&bar, &opacity_link, &isolate, "Opacity:"); + bar.click_on(&opacity_link).settle(); + assert!(bar.find("Isolate Blending").is_none(), "a second click closes Transparency"); + + // Style: opens Graphic Styles in an anchored popover. + let style_link = caption(&bar, "Style:").expect("Style: link"); + assert!(bar.find("Break Link to Graphic Style").is_none(), "Graphic Styles popover starts closed"); + bar.click_on(&style_link).settle(); + let break_link = bar.find("Break Link to Graphic Style").unwrap_or_else(|| panic!("Graphic Styles popover opens: {:?}", bar.names())); + assert_anchored(&bar, &style_link, &break_link, "Style:"); + bar.click_on(&style_link).settle(); + assert!(bar.find("Break Link to Graphic Style").is_none(), "a second click closes Graphic Styles"); +} diff --git a/crates/ui-egui/src/panels/stroke.rs b/crates/ui-egui/src/panels/stroke.rs index 8ea894b54a..007eeccb01 100644 --- a/crates/ui-egui/src/panels/stroke.rs +++ b/crates/ui-egui/src/panels/stroke.rs @@ -10,7 +10,9 @@ use craft::draw::ui::stroke::{self as draw, StrokeEditor, StrokeField, StrokeSec use craft::keymap::CommandRef; use craft::ui::buttons::IconButton; use craft::ui::choice::Segmented; -use craft::ui::contract::{Bind, EditResponse, Entry, FieldLabelRole, Props as _, Show as _, ShowContainer as _, SideLabel, Sizing, TooltipSpec}; +use craft::ui::contract::{ + Bind, EditResponse, Entry, FieldLabelRole, Inner, Props as _, Show as _, ShowContainer as _, SideLabel, Sizing, TooltipSpec, +}; use craft::ui::display::Divider; use craft::ui::form::{Field, FieldGroup}; use craft::ui::layout_components::{Grid, Row}; @@ -24,7 +26,7 @@ use craft::ui::runtime::env::{LengthUnits, UnitKind}; use craft::ui::style::DataColor; use craft::ui::text::{LinkMode, LinkedFields}; use craft::ui::text::{NumberField, NumberOutput, NumberPick, StepArrows}; -use egui::{Rect, Ui, pos2}; +use egui::{Rect, Response, Ui, pos2}; use serde_json::{Value, json}; use vectorcraft_color::{Color, Paint}; use vectorcraft_doc::{Appearance, ArrowAlign, Arrowhead, Dash, Document, LineCap, LineJoin, Node, StrokeAlign, StrokeLayer, Unit, WidthProfile}; @@ -56,8 +58,6 @@ pub(crate) struct StrokePanel { pub scale_linked: bool, /// The cache of [`brush_keeps_size`], keyed by (document uid, revision, active Appearance row). pub brushed: Option<(BrushedKey, Option)>, - /// The Stroke popover of the weight's link label is open. - pub link_open: bool, /// The running gesture of a Stroke panel select. pub select_gesture: Option, } @@ -447,24 +447,26 @@ pub(crate) fn apply_weight(app: &mut VectorcraftApp, out: &NumberOutput, target: }); } -/// The weight field in a row labelled `label` with the side label `side`: the output of the number field, none when -/// the row's body did not run. -fn weight_row(app: &VectorcraftApp, ui: &mut Ui, label: &'static str, side: SideLabel, weight: Option) -> Option { - Field::new(label).side(side).id_salt("weight").sizing(Sizing::Content).show(ui, |ui, _| weight_number(app, weight).show(ui)).inner +/// The weight field in a row labelled `label` with the side label `side`: the field response and the output of +/// the number field when the row's body ran. +fn weight_row(app: &VectorcraftApp, ui: &mut Ui, label: &'static str, side: SideLabel, weight: Option) -> Inner { + Field::new(label).side(side).id_salt("weight").sizing(Sizing::Content).show(ui, |ui, _| weight_number(app, weight).show(ui)) } /// The weight field whose link side label (`label`: the Control bar's "Stroke:", the Properties panel's "Stroke") -/// opens the Stroke panel in a popover under it, and whose drag scrubs the weight. The field keeps its name, Weight: -/// the label beside the Stroke chip says which paint it is the weight of. +/// opens the Stroke panel in a popover anchored to it, and whose drag scrubs the weight. The field keeps its name, +/// Weight: the label beside the Stroke chip says which paint it is the weight of. pub(crate) fn link_field(app: &mut VectorcraftApp, ui: &mut Ui, label: &'static str, weight: Option) { let side = SideLabel::new().scrub(true).link().role(FieldLabelRole::Describes).tooltip(TooltipSpec::new(tl!("Stroke options"))); - let mut open = app.ui.stroke_panel.link_open; - if let Some(out) = weight_row(app, ui, label, side, weight) { + let field = weight_row(app, ui, label, side, weight); + let open_id = field.output.id.with("stroke_popover_open"); + let mut open = ui.data(|d| d.get_temp::(open_id).unwrap_or(false)); + if let Some(out) = field.inner { apply_weight(app, &out, WeightTarget::Shown); open ^= out.link; } - Popover::new(tl!("Stroke"), Bind::bound(&mut open)).show(ui, |ui, _| show(app, ui)); - app.ui.stroke_panel.link_open = open; + Popover::new(tl!("Stroke"), Bind::bound(&mut open)).opened_by(&field.output).show(ui, |ui, _| show(app, ui)); + ui.data_mut(|d| d.insert_temp(open_id, open)); } /// The Stroke panel: the weight, the stroke editor (cap, corner, align, dashes), arrowheads, scale, align and the @@ -492,7 +494,7 @@ fn rows(app: &mut VectorcraftApp, ui: &mut Ui) { let st = current_stroke(app); let mixed = stroke_mixed(app, ui.ctx()); let weight = shown_weight(app, st.as_ref(), &mixed); - if let Some(out) = weight_row(app, ui, tl!("Weight"), SideLabel::new().scrub(true), weight) { + if let Some(out) = weight_row(app, ui, tl!("Weight"), SideLabel::new().scrub(true), weight).inner { apply_weight(app, &out, WeightTarget::Shown); } if app.ui.stroke_panel.hide_options { diff --git a/crates/ui-egui/src/tests/taskbar.rs b/crates/ui-egui/src/tests/taskbar.rs index 07f42b9c6c..f8b8ea9678 100644 --- a/crates/ui-egui/src/tests/taskbar.rs +++ b/crates/ui-egui/src/tests/taskbar.rs @@ -2245,3 +2245,31 @@ fn the_bar_is_outlined_in_the_accent_on_its_surface() { let surface = outlines.iter().find(|o| o.1 != accent).unwrap_or_else(|| panic!("the surface paints its own border: {outlines:?}")); assert_eq!(edged.0, surface.0, "the accent outline lies on the surface's own border"); } + +/// The Contextual Task Bar's Shape Properties popover anchors to its Shape Properties button rather than opening +/// on the left side of the window. +#[test] +fn the_task_bar_shape_properties_popover_anchors_to_its_button() { + let mut app = app(); + app.run("tool.select", json!({"tool": "selection"})).unwrap(); + let rect = id(app.run("shape.rectangle", json!({"x": 240, "y": 120, "width": 120, "height": 80, "radius": 10})).unwrap()); + select(&mut app, &[rect]); + on_canvas(&mut app, |rig| { + let button = rig.target("Shape Properties").expect("Shape Properties button"); + assert!(button.rect.left() > 100.0, "taskbar button {:?} sits past the left edge", button.rect); + rig.click("Shape Properties"); + let headings = rig.painted("Rectangle Properties:"); + assert_eq!(headings.len(), 1, "Rectangle Properties heading appears once: {headings:?}"); + let heading = headings[0]; + assert!( + heading.bottom() <= button.rect.top() + 2.0 || heading.top() >= button.rect.bottom() - 2.0, + "popover {heading:?} opens above or below {:?}", + button.rect + ); + assert!( + (heading.center().x - button.rect.center().x).abs() < 200.0 && heading.left() > 40.0, + "popover {heading:?} anchors horizontally near {:?}, not on the left side", + button.rect + ); + }); +} From 6646c18604f6e0e99864c26106ed101ad2c0791c Mon Sep 17 00:00:00 2001 From: ruchirguitar Date: Sat, 5 Dec 2026 18:52:34 +0530 Subject: [PATCH 23/62] Language packs: add Preferences and a missing-pack bar using shared Craft UI --- crates/engine/src/cmd/packs.rs | 19 +- crates/engine/src/packs.rs | 142 +++++- crates/engine/src/tests/packs.rs | 97 ++++ crates/ui-egui/src/app.rs | 4 + crates/ui-egui/src/language_packs.rs | 57 +++ crates/ui-egui/src/language_packs/desktop.rs | 421 ++++++++++++++++++ .../src/language_packs/desktop/tests.rs | 330 ++++++++++++++ crates/ui-egui/src/lib.rs | 4 + crates/ui-egui/src/prefs_dialog.rs | 2 +- crates/ui-egui/src/prefs_dialog/model.rs | 22 +- docs/gaps.md | 3 +- docs/mcp.md | 7 +- docs/type-parity.md | 5 +- docs/ui-parity.md | 1 + 14 files changed, 1100 insertions(+), 14 deletions(-) create mode 100644 crates/ui-egui/src/language_packs.rs create mode 100644 crates/ui-egui/src/language_packs/desktop.rs create mode 100644 crates/ui-egui/src/language_packs/desktop/tests.rs diff --git a/crates/engine/src/cmd/packs.rs b/crates/engine/src/cmd/packs.rs index 9dd85a79f9..ac3104523a 100644 --- a/crates/engine/src/cmd/packs.rs +++ b/crates/engine/src/cmd/packs.rs @@ -5,6 +5,9 @@ use serde_json::{Value, json}; +use vectorcraft_doc::NodeKind; + +use super::typemenu::all_texts; use super::{CommandSpec, EngineError, Result, Session, always, bad, cmd, text_param}; use crate::packs::{self, Outcome}; @@ -16,7 +19,7 @@ pub fn specs() -> Vec { "Language Packs", [], None, - "{refresh?: bool (fetch the pinned pack index again; needs downloading on; refused under automation roots; in the desktop app it runs in the background: see refreshing)} the Language packs that spell-check and hyphenate languages other than English, shared by the Craft apps → {packs: [{locale, name, size: bytes, licence: SPDX, class, spelling: bool, hyphenation: bool, installed: bool}…] (the index fetched last; empty before the first fetch), installed: [{locale, name, licence}…] (the packs spelling and hyphenation use), installing: [{locale, done, total}…] (bytes), refreshing: bool, errors: {locale: message} (the last failure of each install or removal; \"\": of the index fetch), downloads: bool (the person allowed downloading), indexOverride: string|null (a test index used instead of the pinned one), available: bool (there is a font store folder to install into)}", + "{refresh?: bool (fetch the pinned pack index again; needs downloading on; refused under automation roots; in the desktop app it runs in the background: see refreshing)} the Language packs that spell-check and hyphenate languages other than English, shared by the Craft apps → {packs: [{locale, name, size: bytes, licence: SPDX, class, spelling: bool, hyphenation: bool, installed: bool}…] (the index fetched last; empty before the first fetch), installed: [{locale, name, licence}…] (the packs spelling and hyphenation use), installing: [{locale, done, total}…] (bytes), refreshing: bool, errors: {locale: message} (the last failure of each install or removal; \"\": of the index fetch), downloads: bool (the person allowed downloading), indexOverride: string|null (a test index used instead of the pinned one), available: bool (there is a font store folder to install into), missing: [{lang, locale: string|null}…] (the languages of the front document's visible, unlocked type that have no dictionary: each with its pack's locale, null before the index is first fetched; a language the fetched index has no pack for is left out)}", always, list ), @@ -82,9 +85,23 @@ fn list(s: &mut Session, p: &Value) -> Result { "downloads": backend.as_ref().is_some_and(|b| b.downloads_on()), "indexOverride": backend.as_ref().and_then(|b| b.index_override()), "available": backend.is_some(), + "missing": missing(s).iter().map(|m| json!({"lang": m.tag, "locale": m.pack.as_ref().map(|p| &p.locale)})).collect::>(), })) } +/// The languages of the front document's type (the type spell check reads: visible, unlocked) that +/// have no dictionary yet, with the pack for each ([`packs::missing_of`]): what the missing-pack +/// bar offers, and `proof.packs`'s `missing`. +pub fn missing(s: &Session) -> Vec { + let Ok(st) = s.doc() else { return Vec::new() }; + let texts = all_texts(&st.doc); + let runs = texts.iter().filter_map(|id| match st.doc.node(*id).map(|n| &n.kind) { + Some(NodeKind::Text(t)) => Some(t.runs.iter()), + _ => None, + }); + packs::missing_of(runs.flatten().filter_map(|r| r.style.language.as_deref())) +} + /// Refuses `command` for a caller confined to automation roots: the packs are written into the font /// store the Craft apps share, which is outside them. fn not_confined(command: &str) -> Result<()> { diff --git a/crates/engine/src/packs.rs b/crates/engine/src/packs.rs index fec380c1c2..f03e4ed618 100644 --- a/crates/engine/src/packs.rs +++ b/crates/engine/src/packs.rs @@ -59,6 +59,11 @@ pub trait Backend: Send + Sync { fn index_override(&self) -> Option { None } + /// Turns downloading on. Only from the person's own click in the app (an Install or Refresh + /// button, [`enable_downloads`]): no command calls it. + fn enable_downloads(&self) -> Result<(), String> { + Err(not_allowed()) + } } /// An install running. @@ -82,6 +87,8 @@ static JOBS: Mutex = Mutex::new(Jobs { installing: BTreeMap::new(), refres static BACKGROUND: AtomicBool = AtomicBool::new(false); /// Goes up each time the installed packs change. static GENERATION: AtomicU64 = AtomicU64::new(0); +/// Goes up each time a fetch of the index ends, done or failed ([`index_generation`]). +static INDEX_GENERATION: AtomicU64 = AtomicU64::new(0); fn jobs() -> MutexGuard<'static, Jobs> { JOBS.lock().unwrap_or_else(PoisonError::into_inner) @@ -119,6 +126,18 @@ pub fn generation() -> u64 { GENERATION.load(Ordering::Relaxed) } +/// Goes up each time a fetch of the index ends, done or failed: what [`available`] lists may have changed (a window +/// that keeps the list keys it on this). +pub fn index_generation() -> u64 { + INDEX_GENERATION.load(Ordering::Relaxed) +} + +/// `r`, a fetch of the index that ended, counted in [`index_generation`]. +fn fetched(r: T) -> T { + INDEX_GENERATION.fetch_add(1, Ordering::Relaxed); + r +} + /// Read the packs folder again: spelling and hyphenation in its languages change. fn changed() { craft_proof::packs::reload(); @@ -149,6 +168,33 @@ fn downloads_off() -> String { "downloading is turned off; only the person using a Craft app can turn it on, by installing a Language pack there".into() } +fn not_allowed() -> String { + "only the person using the app can turn on downloading, with their own click".into() +} + +/// Turns the font store's downloading on, for every Craft app. The app calls it only for the +/// person's own click on Install or Refresh (never for input the control channel injected), and no +/// command calls it (RFC-0011): an agent can install once the person has turned it on. +pub fn enable_downloads() -> Result<(), String> { + backend().ok_or_else(no_backend)?.enable_downloads() +} + +/// An installed pack, as spelling and hyphenation read it. +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct Installed { + /// The pack's locale (`nl`). + pub locale: String, + /// The language's own name, from the pack. + pub name: String, + /// SPDX licence expression of the pack's data. + pub licence: String, +} + +/// The packs installed in the store (by this app or another), the ones spelling and hyphenation use. +pub fn installed() -> Vec { + craft_proof::packs::installed().into_iter().map(|i| Installed { locale: i.locale, name: i.name, licence: i.licence }).collect() +} + /// The packs the index fetched last lists. pub fn available() -> Vec { backend().map(|b| b.cached_index()).unwrap_or_default() @@ -221,6 +267,7 @@ pub fn refresh() -> Result { run( move || { let r = b.fetch_index(&cancel).map(|_| ()); + INDEX_GENERATION.fetch_add(1, Ordering::Relaxed); let mut j = jobs(); j.refreshing = None; if let Err(e) = &r { @@ -274,7 +321,7 @@ pub fn install(locale: &str) -> Result { fn install_now(b: &dyn Backend, locale: &str, cancel: &Cancel) -> Result<(), String> { let listed = |packs: &[Pack]| packs.iter().any(|p| p.locale == locale); - if !listed(&b.cached_index()) && !listed(&b.fetch_index(cancel)?) { + if !listed(&b.cached_index()) && !listed(&fetched(b.fetch_index(cancel))?) { return Err(format!("there is no Language pack for {locale}")); } b.install(locale, cancel, &mut |done, total| { @@ -309,6 +356,93 @@ pub fn remove(locale: &str) -> Result<(), String> { r } +/// Most languages [`missing`] reports for one document. +const MAX_MISSING: usize = 16; + +/// A language the document's type is in that spelling (and hyphenation) can't check yet: what +/// the missing-pack bar offers. +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct Missing { + /// The type's language tag (`hi`, `sr-Latn`). + pub tag: String, + /// The pack the index lists for it; `None` before the index is first fetched, when whether + /// there is one isn't known yet. + pub pack: Option, +} + +/// Of the language tags `tags` (a document's type's, in order, repeats allowed), those with no +/// dictionary: each with the pack the index lists for it, or, before the index is first fetched, +/// with none. A language the fetched index has no pack for is left out, and so is any language +/// while there is no store to install into ([`crate::cmd::packs::missing`] reads the tags). +pub fn missing_of<'a>(tags: impl IntoIterator) -> Vec { + if backend().is_none() { + return Vec::new(); + } + let index = available(); + let mut out: Vec = Vec::new(); + let mut seen: Vec<&str> = Vec::new(); + for tag in tags { + if seen.contains(&tag) { + continue; + } + seen.push(tag); + // English spells from built-in data; a tag that is no language (`und`, `zxx`) has none. + let lang = craft_proof::ProofLang::from_tag(Some(tag)); + if lang == craft_proof::ProofLang::Other || lang.is_english() || craft_proof::missing_dictionary(Some(tag)).is_none() { + continue; + } + let pack = pack_for_tag(tag, &index).cloned(); + if pack.is_none() && !index.is_empty() { + continue; + } + // Two tags of one pack (`nl`, `nl-BE`) offer it once. + if pack.is_some() && out.iter().any(|m| m.pack == pack) { + continue; + } + out.push(Missing { tag: tag.to_string(), pack }); + if out.len() >= MAX_MISSING { + break; + } + } + out +} + +/// The pack for a language tag: the whole tag's (`pt-pt`), else each shorter prefix's +/// (`sr-latn` for `sr-Latn-RS`, `nl` for `nl-NL`), the first `packs` lists. A variant after the +/// region is tried without the region before the region alone (`ca-ES-valencia` is the +/// `ca-valencia` pack's). `None` for English and for a tag no pack is for. +pub fn pack_for_tag<'a>(tag: &str, packs: &'a [Pack]) -> Option<&'a Pack> { + pack_candidates(tag).iter().find_map(|c| packs.iter().find(|p| &p.locale == c)) +} + +/// Whether `subtag`, after a tag's language (and script), is a region: two letters or three digits. +fn is_region(subtag: &str) -> bool { + (subtag.len() == 2 && subtag.bytes().all(|b| b.is_ascii_alphabetic())) || (subtag.len() == 3 && subtag.bytes().all(|b| b.is_ascii_digit())) +} + +/// The pack locales [`pack_for_tag`] tries for `tag`, best first. +fn pack_candidates(tag: &str) -> Vec { + // A tag is a handful of short subtags; anything longer is junk and only its start is read. + let tag: String = tag.trim().chars().take(64).collect::().replace('_', "-").to_ascii_lowercase(); + let parts: Vec<&str> = tag.split('-').collect(); + let base = parts.first().copied().unwrap_or(""); + if base.is_empty() || base == "en" { + return Vec::new(); + } + let mut out: Vec = Vec::new(); + for n in (1..=parts.len()).rev() { + let prefix = parts.get(..n).unwrap_or_default(); + // The prefix, then without its regions: the variant's pack before the region alone. + let stripped: Vec<&str> = prefix.iter().enumerate().filter(|(i, p)| *i == 0 || !is_region(p)).map(|(_, p)| *p).collect(); + for c in [prefix.join("-"), stripped.join("-")] { + if !out.contains(&c) { + out.push(c); + } + } + } + out +} + /// The pack index this build trusts: craft-i18n's Language pack release `language-packs-2` (75 /// packs), pinned by the sha256 of its `index.json`. The font store reads /// `CRAFT_LANGUAGE_PACK_INDEX` itself, to try packs from a test index (testing only). @@ -380,6 +514,12 @@ impl Backend for FontStoreBackend { fn index_override(&self) -> Option { craft_font_store::language_pack_index_overridden() } + + fn enable_downloads(&self) -> Result<(), String> { + // The store is opened as an agent's, which can't turn downloading on: the same folder, + // opened as the person's, does (the setting is a file in it, read on each use). + craft_font_store::FontStore::new(self.store.dir().to_path_buf(), craft_font_store::Caller::User).enable_network().map_err(|e| e.to_string()) + } } /// The font store backend in `dir`, for tests that need the real store without a request. diff --git a/crates/engine/src/tests/packs.rs b/crates/engine/src/tests/packs.rs index 0c09a5e259..da21cd8445 100644 --- a/crates/engine/src/tests/packs.rs +++ b/crates/engine/src/tests/packs.rs @@ -265,3 +265,100 @@ fn a_script_cannot_install_a_pack() { assert!(installed_locales(&mut s).is_empty(), "nothing installed"); assert_eq!(s.execute("proof.installPack", &json!({"locale": "nl"})).unwrap()["installed"], true, "outside a script it installs"); } + +/// A backend that only lists `packs` (the index fetched last), for what the missing-pack bar offers. +struct Listing { + dir: PathBuf, + packs: Vec, +} + +impl Backend for Listing { + fn packs_dir(&self) -> PathBuf { + self.dir.clone() + } + + fn downloads_on(&self) -> bool { + false + } + + fn cached_index(&self) -> Vec { + self.packs.clone() + } + + fn fetch_index(&self, _: &Cancel) -> std::result::Result, String> { + Err("downloading is off".into()) + } + + fn install(&self, _: &str, _: &Cancel, _: &mut dyn FnMut(u64, u64)) -> std::result::Result<(), String> { + Err("downloading is off".into()) + } + + fn remove(&self, _: &str) -> std::result::Result<(), String> { + Ok(()) + } +} + +fn pack(locale: &str) -> Pack { + Pack { locale: locale.into(), name: locale.into(), size: 1, licence: "MIT".into(), class: "Embeddable".into(), spelling: true, hyphenation: true } +} + +/// `proof.packs`'s `missing`, as (lang, locale). +fn missing(s: &mut Session) -> Vec<(String, Value)> { + let r = s.execute("proof.packs", &json!({})).unwrap(); + r["missing"].as_array().unwrap().iter().map(|m| (m["lang"].as_str().unwrap().to_string(), m["locale"].clone())).collect() +} + +/// The missing-pack bar offers the languages of the document's type that have no dictionary: a +/// pack the index lists, or, before the index was ever fetched, the language alone; never one the +/// fetched index has no pack for, nor English. +#[test] +fn the_languages_with_no_dictionary_are_offered_their_pack() { + let _turn = packs_lock(); + let root = folder("missing"); + let _reset = Reset(root.clone()); + let mut s = Session::new(); + s.execute("file.new", &json!({"width": 400, "height": 400})).unwrap(); + s.execute("text.create", &json!({"x": 10, "y": 50, "text": "The house"})).unwrap(); + // Konkani: no system has a Hunspell dictionary for it, so the check can't depend on the machine. + let id = s.execute("text.create", &json!({"x": 10, "y": 90, "text": "घर"})).unwrap()["id"].clone(); + s.execute("text.setFormat", &json!({"ids": [id], "language": "Konkani"})).unwrap(); + assert!(missing(&mut s).is_empty(), "no store, nothing to offer"); + let listing = |packs: Vec| Some(Arc::new(Listing { dir: root.clone(), packs }) as Arc); + packs::set_backend(listing(vec![])); + assert_eq!(missing(&mut s), [("kok".to_string(), Value::Null)], "before the first fetch, the language alone"); + packs::set_backend(listing(vec![pack("nl"), pack("kok")])); + assert_eq!(missing(&mut s), [("kok".to_string(), json!("kok"))], "the pack the index lists"); + packs::set_backend(listing(vec![pack("nl")])); + assert!(missing(&mut s).is_empty(), "the index has no pack for it"); +} + +/// A pack is found for a tag's region and variant forms (`sr-Latn-RS` is `sr-latn`'s, `nl-BE` +/// is `nl`'s), not for English. +#[test] +fn a_tag_finds_its_pack_without_its_region() { + let index = [pack("nl"), pack("sr-latn"), pack("ca-valencia"), pack("pt-pt")]; + let found = |tag: &str| packs::pack_for_tag(tag, &index).map(|p| p.locale.clone()); + assert_eq!(found("nl-BE").as_deref(), Some("nl")); + assert_eq!(found("sr-Latn-RS").as_deref(), Some("sr-latn")); + assert_eq!(found("ca-ES-valencia").as_deref(), Some("ca-valencia")); + assert_eq!(found("pt_PT").as_deref(), Some("pt-pt")); + assert_eq!(found("en-NL"), None); + assert_eq!(found("fy"), None); +} + +/// Downloading is turned on in the shared store only by the app for the person's click +/// (`packs::enable_downloads`); a backend that can't (a stand-in) refuses. +#[test] +fn the_persons_click_turns_downloading_on_in_the_shared_store() { + let _turn = packs_lock(); + let root = folder("consent"); + let _reset = Reset(root.clone()); + let mut s = dutch_session(); + assert!(packs::enable_downloads().is_err(), "no store"); + packs::set_backend(Some(Arc::new(Listing { dir: root.clone(), packs: vec![] }))); + assert!(packs::enable_downloads().is_err(), "a backend that can't turn it on"); + packs::set_backend(Some(packs::font_store_in(root.clone()))); + assert_eq!(s.execute("proof.packs", &json!({})).unwrap()["downloads"], false); + packs::enable_downloads().unwrap(); + assert_eq!(s.execute("proof.packs", &json!({})).unwrap()["downloads"], true, "the store the agent opened sees it on"); +} diff --git a/crates/ui-egui/src/app.rs b/crates/ui-egui/src/app.rs index 12cc42686c..1c12f1b015 100644 --- a/crates/ui-egui/src/app.rs +++ b/crates/ui-egui/src/app.rs @@ -253,6 +253,8 @@ impl VectorcraftApp { trace_runs: Default::default(), concept_runs: Default::default(), retype_runs: Default::default(), + #[cfg(not(target_arch = "wasm32"))] + language_packs: Default::default(), recovery: Default::default(), closing: None, prefs: None, @@ -696,6 +698,7 @@ impl VectorcraftApp { if self.session.poll_language_packs() { ctx.request_repaint_after(std::time::Duration::from_millis(250)); } + crate::language_packs::tick(self); if self.session.plugins_loading() { if self.session.poll_plugin_loads() { ctx.request_repaint_after(std::time::Duration::from_millis(50)); @@ -768,6 +771,7 @@ impl VectorcraftApp { && let Some(view) = app.canvas_view() { chrome::isolation_bar(app, ui, view.rect); + crate::language_packs::bar(app, ui, view.rect); } }); } diff --git a/crates/ui-egui/src/language_packs.rs b/crates/ui-egui/src/language_packs.rs new file mode 100644 index 0000000000..c879ec909d --- /dev/null +++ b/crates/ui-egui/src/language_packs.rs @@ -0,0 +1,57 @@ +//! Language packs in the window (#4936): Preferences › Language Packs lists the packs that spell-check and +//! hyphenate languages other than English, with Install and Remove, and the missing-pack bar over the canvas offers +//! the pack for a language the document's type is in. The engine does the work ([`vectorcraft_engine::packs`]): +//! installs run on its thread, and the buttons go through `proof.installPack`, `proof.removePack` and +//! `proof.packs {refresh}`, as an agent's would. +//! +//! The one step no command takes is turning on the font store's downloading (RFC-0011): the person's own click on +//! Install, Get Language Pack or Refresh List is their consent, and it turns downloading on for every Craft app. A +//! click the control channel injected never does; an agent can install once the person has turned it on. +//! +//! The web build has no font store yet (storytold/craft-libs#745): the page says so and the bar never shows. + +#[cfg(target_arch = "wasm32")] +use craft::theme::variant::Tone; +use craft::ui::contract::{Show as _, ShowContainer as _}; +use craft::ui::display::Text; +use craft::ui::layout_components::Stack; +#[cfg(target_arch = "wasm32")] +use craft::ui::notices::Notice; +use egui::Ui; + +use crate::VectorcraftApp; + +#[cfg(not(target_arch = "wasm32"))] +mod desktop; + +#[cfg(not(target_arch = "wasm32"))] +pub use desktop::Runtime; +#[cfg(not(target_arch = "wasm32"))] +pub(crate) use desktop::{bar, tick}; + +/// The Preferences page's id (its English title), beside the categories of the engine's preference table. +pub const PAGE: &str = "Language Packs"; + +/// Once a frame: nothing on the web. +#[cfg(target_arch = "wasm32")] +pub(crate) fn tick(_app: &mut VectorcraftApp) {} + +/// The missing-pack bar: never on the web, which can't install packs. +#[cfg(target_arch = "wasm32")] +pub(crate) fn bar(_app: &mut VectorcraftApp, _ui: &mut Ui, _area: egui::Rect) {} + +/// Preferences › Language Packs: what packs are, then (on the desktop) whether downloading is on, the installed packs +/// with Remove, and the packs of the list with Install, each with its progress or its last failure. +pub(crate) fn page(app: &mut VectorcraftApp, ui: &mut Ui) { + Stack::new().show(ui, |ui, _| { + Text::new(tl!("Language packs add spelling and hyphenation for languages other than English. They are shared with the other Craft apps.")) + .show(ui); + #[cfg(target_arch = "wasm32")] + { + let _ = &app; + Notice::new(Tone::Info, tl!("Language packs can't be installed in the browser yet: only English is spell-checked here.")).show(ui); + } + #[cfg(not(target_arch = "wasm32"))] + desktop::page(app, ui); + }); +} diff --git a/crates/ui-egui/src/language_packs/desktop.rs b/crates/ui-egui/src/language_packs/desktop.rs new file mode 100644 index 0000000000..a3ba517f9f --- /dev/null +++ b/crates/ui-egui/src/language_packs/desktop.rs @@ -0,0 +1,421 @@ +//! The desktop's Language packs: the Preferences page's list and the missing-pack bar, over the engine's packs +//! ([`vectorcraft_engine::packs`]), which the web build doesn't have. + +use std::collections::{BTreeMap, BTreeSet}; + +use craft::theme::variant::Tone; +use craft::ui::buttons::Button; +use craft::ui::contract::{Politeness, Props as _, Show as _, ShowContainer as _}; +use craft::ui::display::{Progress, Text}; +use craft::ui::layout_components::Row; +use craft::ui::notices::Notice; +use craft::ui::patterns::language_packs::{ + self, BarOffer, BarState, Consent, LanguagePackWords, MissingPackBar, injected, shown, shown_error, size_text, +}; +use craft::ui::runtime::env::Env; +use egui::Ui; +use serde_json::json; +use vectorcraft_engine::packs::{self, Missing, Pack}; + +use crate::VectorcraftApp; + +/// Most characters of a language's name shown (an index may name it at any length). +const MAX_NAME: usize = 40; + +/// How long the bar keeps what it worked out while the document is being edited. +const MISSING_REFRESH_SECS: f64 = 1.0; + +/// The window's pack state. +#[derive(Default)] +pub struct Runtime { + /// Failures of the window's own (turning downloading on, a command it ran), by locale or language tag (`""`: + /// the list), shown until the next try. The engine keeps the installs' own. + errors: BTreeMap, + /// The keys of `errors` that say only the person can turn downloading on: dropped once it is on. + refused: BTreeSet, + /// (document, pack locale or language tag) pairs whose bar was closed. + dismissed: BTreeSet<(u64, String)>, + /// The language tag whose bar asked for the list: its pack installs once the list arrives. + wanted: Option, + /// The installs running when last looked at, to announce each one's end. + running: BTreeSet, + /// What the bar offers for the front document, what it was worked out from, and when. + missing: Option<(MissingKey, f64, Vec)>, + /// The index fetched last, and what it was read for (the list is read from disk, so not every frame). + index: Option<(IndexKey, Vec)>, +} + +impl Runtime { + /// Keeps `message` as the failure for `key`, in place of a refusal it had: downloading coming on drops only + /// refusals, so this one stays. + fn fail(&mut self, key: impl Into, message: String) { + let key = key.into(); + self.refused.remove(&key); + self.errors.insert(key, message); + } + + /// Forgets the failure (or refusal) for `key`: a new try is starting. + fn clear(&mut self, key: &str) { + self.refused.remove(key); + self.errors.remove(key); + } +} + +#[derive(Clone, Copy, PartialEq, Eq)] +struct MissingKey { + document: u64, + revision: u64, + /// The installed packs changed. + generation: u64, + /// A fetch of the list started or ended. + refreshing: bool, + /// A fetch of the list ended (one can start and end between two frames). + index: u64, +} + +/// Whether a fetch of the list was running, the fetches that ended, and the installed packs' generation. +type IndexKey = (bool, u64, u64); + +/// A language as the window names it: the interface's name for a document language (`Hindi`), with the pack's own +/// name after it when that differs (`Hindi (हिन्दी)`); the pack's own name alone for a language the documents' +/// list doesn't have; the tag when there is neither. +pub(crate) fn language_name(tag: &str, own: Option<&str>) -> String { + let own = own.map(|o| shown(o, MAX_NAME)).filter(|o| !o.is_empty()); + let primary = |t: &str| t.split(['-', '_']).next().unwrap_or_default().to_ascii_lowercase(); + let languages = vectorcraft_doc::setup::LANGUAGES; + let known = languages + .iter() + .find(|(_, t, _)| t.eq_ignore_ascii_case(tag)) + .or_else(|| languages.iter().find(|(_, t, _)| primary(t) == primary(tag))) + .map(|(name, _, _)| tl!(name).to_string()); + match (known, own) { + (Some(k), Some(o)) if k != o => format!("{k} ({o})"), + (Some(k), _) => k, + (None, Some(o)) => o, + (None, None) => shown(tag, MAX_NAME), + } +} + +/// What a pack provides, as the list says it. +fn provides(p: &Pack) -> String { + match (p.spelling, p.hyphenation) { + (true, true) => tl!("Spelling and hyphenation").to_string(), + (true, false) => tl!("Spelling").to_string(), + (false, true) => tl!("Hyphenation").to_string(), + (false, false) => String::new(), + } +} + +/// Once a frame: announces the installs that ended, and installs the pack the bar asked the list for once it +/// arrives. +pub(crate) fn tick(app: &mut VectorcraftApp) { + if !app.language_packs.refused.is_empty() && packs::backend().is_some_and(|b| b.downloads_on()) { + // Downloading came on (Refresh List, the bar, another Craft app): the refusals no longer hold. + let refused = std::mem::take(&mut app.language_packs.refused); + app.language_packs.errors.retain(|key, _| !refused.contains(key)); + } + let status = packs::status(); + let now: BTreeSet = status.installing.iter().map(|(l, _, _)| l.clone()).collect(); + let ended: Vec = app.language_packs.running.difference(&now).cloned().collect(); + // The installs running now, an agent's too, and the ones the window started that haven't ended. + app.language_packs.running = now; + if !ended.is_empty() { + for locale in ended { + // The status bar is a live region: the end is announced wherever focus is. + announce_end(app, &locale, status.errors.get(&locale).map(String::as_str)); + } + app.language_packs.missing = None; + } + if status.refreshing { + return; + } + let Some(tag) = app.language_packs.wanted.take() else { return }; + app.language_packs.index = None; + app.language_packs.missing = None; + if let Some(e) = status.errors.get("") { + let message = crate::i18n::fmt(tl!("Couldn't get the list of Language packs: {error}"), &[("error", &shown_error(e))]); + app.language_packs.fail(tag, message.clone()); + app.status(message); + } else if let Some(pack) = packs::pack_for_tag(&tag, &packs::available()).cloned() { + // The person's click asked for it, and turned downloading on. + install(app, &pack.locale); + } else { + let name = language_name(&tag, None); + app.status(crate::i18n::fmt(tl!("There is no Language pack for {language} yet."), &[("language", &name)])); + } +} + +/// Handles the shared consent decision and remembers which messages are only temporary refusals. +fn consent(app: &mut VectorcraftApp, ui: &Ui, injected: bool, key: &str) -> bool { + app.language_packs.clear(key); + let Some(backend) = packs::backend() else { return false }; + let decision = language_packs::consent(backend.downloads_on(), injected, packs::enable_downloads); + if let Some(message) = decision.message(&Env::of(ui).words::()) { + app.language_packs.fail(key, message); + if decision == Consent::Refused { + app.language_packs.refused.insert(key.to_string()); + } + } + decision.is_on() +} + +/// `proof.installPack` for `locale`; a refusal is kept for its row. An install that started is watched from now on, +/// so its end is announced even when it ends before the next frame looks; one that is done already is announced now. +fn install(app: &mut VectorcraftApp, locale: &str) { + app.language_packs.clear(locale); + match app.run("proof.installPack", json!({ "locale": locale })) { + Ok(r) if r["installed"] == true => announce_end(app, locale, None), + Ok(_) => { + app.language_packs.running.insert(locale.to_string()); + } + Err(e) => { + app.language_packs.fail(locale.to_string(), shown_error(&e)); + } + } + app.language_packs.missing = None; +} + +/// Says in the status bar, a live region, that the install of `locale` ended: installed, or its `error`. +fn announce_end(app: &mut VectorcraftApp, locale: &str, error: Option<&str>) { + let own = packs::installed().into_iter().find(|i| i.locale == locale).map(|i| i.name); + let name = language_name(locale, own.as_deref()); + let message = match error { + Some(e) => { + crate::i18n::fmt(tl!("Couldn't install the {language} Language pack: {error}"), &[("language", &name), ("error", &shown_error(e))]) + } + None => crate::i18n::fmt(tl!("The {language} Language pack is installed."), &[("language", &name)]), + }; + app.status(message); +} + +/// `proof.removePack` for `locale`; a refusal is kept for its row. +fn remove(app: &mut VectorcraftApp, locale: &str) { + app.language_packs.clear(locale); + let own = packs::installed().into_iter().find(|p| p.locale == locale).map(|p| p.name); + match app.run("proof.removePack", json!({ "locale": locale })) { + Ok(_) => { + let name = language_name(locale, own.as_deref()); + app.status(crate::i18n::fmt(tl!("The {language} Language pack is removed."), &[("language", &name)])); + } + Err(e) => { + app.language_packs.fail(locale.to_string(), shown_error(&e)); + } + } + app.language_packs.missing = None; +} + +/// `proof.packs {refresh: true}` (fetching runs on the engine's thread); a refusal is kept under `key` → whether +/// the fetch started. +fn refresh(app: &mut VectorcraftApp, key: &str) -> bool { + app.language_packs.index = None; + match app.run("proof.packs", json!({ "refresh": true })) { + Ok(_) => true, + Err(e) => { + app.language_packs.fail(key.to_string(), shown_error(&e)); + false + } + } +} + +/// The index fetched last, read again only when a fetch starts or ends or the installed packs change. +fn index(app: &mut VectorcraftApp) -> Vec { + let key = (packs::status().refreshing, packs::index_generation(), packs::generation()); + if let Some((k, list)) = &app.language_packs.index + && *k == key + { + return list.clone(); + } + let list = packs::available(); + app.language_packs.index = Some((key, list.clone())); + list +} + +/// The failure to show for `locale` (`""`: the list): the window's own, else the engine's last. +fn error_of(app: &VectorcraftApp, errors: &BTreeMap, locale: &str) -> Option { + app.language_packs.errors.get(locale).cloned().or_else(|| errors.get(locale).map(|e| shown_error(e))) +} + +/// The share of an install done, from its bytes (`total` 0: not known yet). +fn fraction(done: u64, total: u64) -> f32 { + if total == 0 { 0.0 } else { (done.min(total) as f64 / total as f64) as f32 } +} + +/// "Installing… 40%" for an install's bytes. +fn installing_text(done: u64, total: u64) -> String { + let percent = (fraction(done, total) * 100.0).round().to_string(); + crate::i18n::fmt(tl!("Installing… {percent}%"), &[("percent", &percent)]) +} + +/// The desktop part of Preferences › Language Packs ([`super::page`]). +pub(super) fn page(app: &mut VectorcraftApp, ui: &mut Ui) { + let Some(backend) = packs::backend() else { + Notice::new(Tone::Warn, tl!("Language packs aren't available: there is no font store folder for this user.")).show(ui); + return; + }; + let injected = injected(ui.ctx()); + let status = packs::status(); + let list = index(app); + let installed = packs::installed(); + if !backend.downloads_on() { + Text::new(tl!("Downloading is off. Install or Refresh List turns it on, for every Craft app.")).show(ui); + } + if let Some(test) = backend.index_override() { + Notice::new(Tone::Warn, crate::i18n::fmt(tl!("Packs come from a test list: {source}"), &[("source", &shown_error(&test))])).show(ui); + } + let mut refresh_clicked = false; + Row::new().wrap(true).show(ui, |ui, _| { + refresh_clicked |= Button::new(tl!("Refresh List")).enabled(!status.refreshing).show(ui).clicked(); + if status.refreshing { + Text::new(tl!("Getting the list of languages…")).show(ui); + } + }); + if let Some(e) = error_of(app, &status.errors, "") { + let message = crate::i18n::fmt(tl!("Couldn't get the list of Language packs: {error}"), &[("error", &e)]); + Notice::new(Tone::Bad, message).announce(Politeness::Assertive).show(ui); + } + + // The installed packs, whether or not the list has them (another app may have installed one from a newer list). + Text::new(tl!("Installed")).show(ui); + if installed.is_empty() { + Text::new(tl!("No Language packs are installed.")).show(ui); + } + let mut remove_clicked: Option = None; + for pack in &installed { + let name = language_name(&pack.locale, Some(&pack.name)); + Row::new().wrap(true).show(ui, |ui, _| { + Text::new(name.clone()).show(ui); + Text::new(shown(&pack.licence, MAX_NAME)).show(ui); + if Button::new(tl!("Remove")).show(ui).clicked() { + remove_clicked = Some(pack.locale.clone()); + } + }); + if let Some(e) = error_of(app, &status.errors, &pack.locale) { + Notice::new(Tone::Bad, e).announce(Politeness::Assertive).show(ui); + } + } + + Text::new(tl!("Available")).show(ui); + if list.is_empty() && !status.refreshing { + Text::new(tl!("The list of Language packs hasn't been fetched yet: Refresh List gets it.")).show(ui); + } + let mut install_clicked: Option = None; + for pack in list.iter().filter(|p| !installed.iter().any(|i| i.locale == p.locale)) { + let name = language_name(&pack.locale, Some(&pack.name)); + let running = status.installing.iter().find(|(l, _, _)| *l == pack.locale).map(|(_, d, t)| (*d, *t)); + let details: Vec = + [size_text(ui, pack.size), provides(pack), shown(&pack.licence, MAX_NAME)].into_iter().filter(|s| !s.is_empty()).collect(); + Row::new().wrap(true).show(ui, |ui, _| { + Text::new(name.clone()).show(ui); + Text::new(details.join(" · ")).show(ui); + match running { + Some((done, total)) => { + Progress::new(fraction(done, total)).show(ui); + Text::new(installing_text(done, total)).show(ui); + } + None => { + if Button::new(tl!("Install")).show(ui).clicked() { + install_clicked = Some(pack.locale.clone()); + } + } + } + }); + if let Some(e) = error_of(app, &status.errors, &pack.locale) { + Notice::new(Tone::Bad, e).announce(Politeness::Assertive).show(ui); + } + } + if refresh_clicked && consent(app, ui, injected, "") { + refresh(app, ""); + } + if let Some(locale) = remove_clicked { + remove(app, &locale); + } + if let Some(locale) = install_clicked + && consent(app, ui, injected, &locale) + { + install(app, &locale); + } +} + +/// What the bar offers for the front document, worked out again when the document, the installed packs or the +/// list change (at most once a [`MISSING_REFRESH_SECS`] while the document is being edited). +fn missing(app: &mut VectorcraftApp, ctx: &egui::Context) -> Vec { + let now = ctx.input(|i| i.time); + let Some(st) = app.session.active() else { return Vec::new() }; + let key = MissingKey { + document: st.uid, + revision: st.revision, + generation: packs::generation(), + refreshing: packs::status().refreshing, + index: packs::index_generation(), + }; + if let Some((k, at, m)) = &app.language_packs.missing { + let only_edited = k.document == key.document && k.generation == key.generation && k.refreshing == key.refreshing && k.index == key.index; + if *k == key { + return m.clone(); + } + let age = now - *at; + if only_edited && age < MISSING_REFRESH_SECS { + // Stale for an edit: a frame comes once it may be worked out again, even with no input by then. + ctx.request_repaint_after(std::time::Duration::from_secs_f64((MISSING_REFRESH_SECS - age).max(0.0))); + return m.clone(); + } + } + let m = vectorcraft_engine::cmd::packs::missing(&app.session); + app.language_packs.missing = Some((key, now, m.clone())); + m +} + +/// The key a bar is closed under: its pack's locale, else (before the list) its language tag. +fn offer_key(m: &Missing) -> String { + m.pack.as_ref().map_or_else(|| m.tag.clone(), |p| p.locale.clone()) +} + +/// The offer the bar shows for the front document: the first language missing a pack whose bar wasn't closed. +fn shown_offer(app: &mut VectorcraftApp, ctx: &egui::Context) -> Option { + packs::backend()?; + let document = app.session.active()?.uid; + missing(app, ctx).into_iter().find(|m| { + let closed = |key: String| app.language_packs.dismissed.contains(&(document, key)); + !closed(offer_key(m)) && !closed(m.tag.clone()) + }) +} + +/// The missing-pack bar at the foot of the canvas `area`: " spelling and hyphenation need a Language +/// pack.", with Install (and the size) when the list has the pack, else Get Language Pack, which fetches the list +/// and then installs it. Closing it hides it for that language in this document. +pub(crate) fn bar(app: &mut VectorcraftApp, ui: &mut Ui, area: egui::Rect) { + let Some(offer) = shown_offer(app, &ui.ctx().clone()) else { return }; + let Some(document) = app.session.active().map(|st| st.uid) else { return }; + let status = packs::status(); + let name = language_name(&offer.tag, offer.pack.as_ref().map(|p| p.name.as_str())); + let message = crate::i18n::fmt(tl!("{language} spelling and hyphenation need a Language pack."), &[("language", &name)]); + let key = offer_key(&offer); + let running = status.installing.iter().find(|(l, _, _)| *l == key).map(|(_, d, t)| (*d, *t)); + let fetching = offer.pack.is_none() && (status.refreshing || app.language_packs.wanted.is_some()); + let error = error_of(app, &status.errors, &key); + let bar_offer = offer.pack.as_ref().map_or(BarOffer::Get, |pack| BarOffer::install(pack.size)); + let state = match running { + Some((done, total)) => BarState::installing(done, total), + None if fetching => BarState::Fetching, + None => BarState::Idle, + }; + // A child that allocates nothing in the canvas, at its foot and clear of the isolation bar. + let mut bar_ui = ui.new_child(egui::UiBuilder::new().max_rect(area.shrink(8.0)).layout(egui::Layout::bottom_up(egui::Align::Center))); + let response = MissingPackBar::new(message, bar_offer).state(state).error(error).show(&mut bar_ui); + if response.dismissed { + app.language_packs.dismissed.insert((document, key.clone())); + } + if response.clicked && consent(app, &bar_ui, response.injected, &key) { + match &offer.pack { + Some(p) => install(app, &p.locale), + None => { + if refresh(app, &key) { + app.language_packs.wanted = Some(offer.tag.clone()); + } + } + } + } +} + +#[cfg(test)] +mod tests; diff --git a/crates/ui-egui/src/language_packs/desktop/tests.rs b/crates/ui-egui/src/language_packs/desktop/tests.rs new file mode 100644 index 0000000000..d111e3f6b8 --- /dev/null +++ b/crates/ui-egui/src/language_packs/desktop/tests.rs @@ -0,0 +1,330 @@ +//! Preferences › Language Packs and the missing-pack bar, over a stand-in for the font store. The packs backend is +//! the whole process's, and with one set the bar shows over any document in a language without a dictionary, so +//! each test that sets it runs in a process of its own ([`crate::testing::in_own_process`]). + +use std::path::{Path, PathBuf}; +use std::sync::Arc; +use std::sync::atomic::{AtomicBool, Ordering}; + +use egui::accesskit::TreeUpdate; +use egui::{Event, Modifiers, PointerButton, Pos2, RawInput, Rect}; +use serde_json::json; +use vectorcraft_engine::Session; +use vectorcraft_engine::packs::{self, Backend, Cancel, Pack}; + +use super::*; +use crate::Services; + +/// A stand-in for the font store: it lists a Konkani pack once the list was fetched (or from the start), and installs +/// it by writing its files. Konkani: no system has a Hunspell dictionary for it, so what the bar offers doesn't +/// depend on the machine. +struct Fake { + dir: PathBuf, + network: AtomicBool, + fetched: AtomicBool, +} + +impl Fake { + fn new(name: &str, fetched: bool) -> Arc { + let dir = std::env::temp_dir().join(format!("vc-ui-packs-{name}-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + std::fs::create_dir_all(&dir).unwrap(); + let fake = Arc::new(Fake { dir, network: AtomicBool::new(false), fetched: AtomicBool::new(fetched) }); + packs::set_backend(Some(fake.clone())); + fake + } + + fn downloads(&self) -> bool { + self.network.load(Ordering::Relaxed) + } +} + +impl Drop for Fake { + fn drop(&mut self) { + let _ = std::fs::remove_dir_all(&self.dir); + } +} + +fn konkani() -> Pack { + Pack { + locale: "kok".into(), + name: "कोंकणी".into(), + size: 2_400_000, + licence: "MIT".into(), + class: "Embeddable".into(), + spelling: true, + hyphenation: true, + } +} + +/// Writes a small Konkani pack into `packs/kok`, laid out as the font store unpacks one. +fn write_konkani_pack(packs: &Path) { + let dir = packs.join("kok"); + std::fs::create_dir_all(dir.join("LICENCES")).unwrap(); + std::fs::write(dir.join("pack.toml"), "locale = \"kok\"\nname = \"कोंकणी\"\nlicence = \"MIT\"\n").unwrap(); + std::fs::write(dir.join("LICENCES").join("COPYING"), "Test licence text.").unwrap(); + std::fs::write(dir.join("spelling.aff"), "SET UTF-8\n").unwrap(); + std::fs::write(dir.join("spelling.dic"), "1\nघर\n").unwrap(); +} + +impl Backend for Fake { + fn packs_dir(&self) -> PathBuf { + self.dir.clone() + } + + fn downloads_on(&self) -> bool { + self.downloads() + } + + fn cached_index(&self) -> Vec { + if self.fetched.load(Ordering::Relaxed) { vec![konkani()] } else { Vec::new() } + } + + fn fetch_index(&self, _: &Cancel) -> Result, String> { + assert!(self.downloads(), "a fetch only once downloading is on"); + self.fetched.store(true, Ordering::Relaxed); + Ok(self.cached_index()) + } + + fn install(&self, locale: &str, _: &Cancel, progress: &mut dyn FnMut(u64, u64)) -> Result<(), String> { + assert!(self.downloads(), "an install only once downloading is on"); + assert_eq!(locale, "kok"); + progress(1, 1); + write_konkani_pack(&self.dir); + Ok(()) + } + + fn remove(&self, locale: &str) -> Result<(), String> { + std::fs::remove_dir_all(self.dir.join(locale)).map_err(|e| e.to_string()) + } + + fn enable_downloads(&self) -> Result<(), String> { + self.network.store(true, Ordering::Relaxed); + Ok(()) + } +} + +/// Takes the backend away when the test ends, also when it failed. +struct NoBackend; + +impl Drop for NoBackend { + fn drop(&mut self) { + packs::set_backend(None); + } +} + +fn app() -> VectorcraftApp { + crate::testing::windowed(VectorcraftApp::new(Session::new(), Services::default())) +} + +/// One frame of the whole app, as the hosts run it → its accessibility tree. +fn frame(a: &mut VectorcraftApp, events: Vec) -> TreeUpdate { + let ctx = a.ui_ctx.clone().expect("a window context"); + let time = ctx.input(|i| i.time) + 0.1; + let raw = RawInput { + events, + time: Some(time), + screen_rect: Some(Rect::from_min_size(Pos2::ZERO, egui::vec2(1400.0, 900.0))), + focused: true, + ..Default::default() + }; + crate::testing::app_frame(a, &ctx, raw).platform_output.accesskit_update.expect("an accessibility tree") +} + +/// Frames until no install or fetch of the list runs and none waits to start (the bar's wanted pack), then one more, +/// whose tick announces what ended. +fn idle(a: &mut VectorcraftApp) { + let start = std::time::Instant::now(); + loop { + frame(a, vec![]); + let status = packs::status(); + if status.installing.is_empty() && !status.refreshing && a.language_packs.wanted.is_none() { + break; + } + assert!(start.elapsed() < std::time::Duration::from_secs(10), "the pack work never ended"); + std::thread::sleep(std::time::Duration::from_millis(5)); + } + frame(a, vec![]); +} + +/// [`idle`], then frames until the layout holds still → the last one's tree. +fn settled(a: &mut VectorcraftApp) -> TreeUpdate { + idle(a); + for _ in 0..5 { + frame(a, vec![]); + } + frame(a, vec![]) +} + +fn labels(tree: &TreeUpdate) -> Vec { + tree.nodes.iter().filter_map(|(_, n)| n.label().map(str::to_string)).collect() +} + +fn has(tree: &TreeUpdate, part: &str) -> bool { + labels(tree).iter().any(|l| l.contains(part)) +} + +/// The centre of the control named `label` exactly (Install, not the Installed heading). +fn spot(tree: &TreeUpdate, label: &str) -> Option { + spot_where(tree, |l| l == label) +} + +/// The centre of the control whose name starts with `start` (`Install (` and the size). +fn spot_starting(tree: &TreeUpdate, start: &str) -> Option { + spot_where(tree, |l| l.starts_with(start)) +} + +fn spot_where(tree: &TreeUpdate, named: impl Fn(&str) -> bool) -> Option { + let (_, node) = tree.nodes.iter().find(|(_, n)| n.label().is_some_and(|l| named(l.trim())) && n.bounds().is_some())?; + let b = node.bounds()?; + Some(Pos2::new((b.x0 + b.x1) as f32 * 0.5, (b.y0 + b.y1) as f32 * 0.5)) +} + +/// The person's own click at `at` (not the control channel's). +fn click(a: &mut VectorcraftApp, at: Pos2) { + frame(a, vec![Event::PointerMoved(at)]); + for pressed in [true, false] { + frame(a, vec![Event::PointerButton { pos: at, button: PointerButton::Primary, pressed, modifiers: Modifiers::NONE }]); + } + idle(a); +} + +/// An agent's click on the control named `name`, through the control channel. +fn agent_click(a: &mut VectorcraftApp, name: &str) { + let ctx = a.ui_ctx.clone().expect("a window context"); + let (request, _reply) = craft::automation::ControlRequest::new("ui.click", json!({"control": {"name": name}})); + let _ = crate::control::handle(a, &ctx, &request); + for _ in 0..3 { + frame(a, vec![]); + } + idle(a); +} + +fn installed() -> Vec { + packs::installed().into_iter().map(|p| p.locale).collect() +} + +/// A document with type in Konkani. +fn konkani_document(a: &mut VectorcraftApp) { + a.run("file.new", json!({"width": 400, "height": 400})).unwrap(); + let id = a.run("text.create", json!({"x": 10, "y": 50, "text": "घर"})).unwrap()["id"].clone(); + a.run("text.setFormat", json!({"ids": [id], "language": "Konkani"})).unwrap(); +} + +#[test] +fn the_page_installs_and_removes_a_pack_on_the_persons_click() { + if !crate::testing::in_own_process("language_packs::desktop::tests::the_page_installs_and_removes_a_pack_on_the_persons_click") { + return; + } + let _none = NoBackend; + let fake = Fake::new("page", true); + let mut a = app(); + crate::prefs_dialog::open(&mut a, Some("language packs")); + let tree = settled(&mut a); + assert!(has(&tree, "Konkani (कोंकणी)"), "the pack is listed by name: {:?}", labels(&tree)); + assert!(has(&tree, "Spelling and hyphenation"), "with what it provides"); + assert!(has(&tree, "Downloading is off"), "and says downloading is off"); + let install = spot(&tree, "Install").expect("an Install button"); + click(&mut a, install); + assert!(fake.downloads(), "the person's click turned downloading on"); + assert_eq!(installed(), ["kok"]); + assert!(a.ui.status.contains("installed"), "the end is announced: {}", a.ui.status); + let tree = settled(&mut a); + assert!(!has(&tree, "Downloading is off")); + let remove = spot(&tree, "Remove").expect("a Remove button for the installed pack"); + click(&mut a, remove); + assert!(installed().is_empty(), "removed"); + assert!(spot(&settled(&mut a), "Install").is_some(), "the pack can be installed again"); +} + +#[test] +fn a_faked_click_never_turns_on_downloading() { + if !crate::testing::in_own_process("language_packs::desktop::tests::a_faked_click_never_turns_on_downloading") { + return; + } + let _none = NoBackend; + let fake = Fake::new("agent", true); + let mut a = app(); + crate::prefs_dialog::open(&mut a, Some("Language Packs")); + settled(&mut a); + agent_click(&mut a, "Install"); + assert!(!fake.downloads(), "an injected click is no consent"); + assert!(installed().is_empty(), "nothing installed"); + assert!(has(&settled(&mut a), "Only you can turn on downloading"), "the row says why"); + // Once the person turned it on, the refusal goes, and an agent installs. + fake.enable_downloads().unwrap(); + assert!(!has(&settled(&mut a), "Only you can turn on downloading"), "the refusal no longer holds"); + agent_click(&mut a, "Install"); + assert_eq!(installed(), ["kok"]); +} + +/// A failure that took a refusal's place is a failure: downloading coming on drops refusals only. +#[test] +fn a_failure_after_a_refusal_outlasts_downloading_coming_on() { + if !crate::testing::in_own_process("language_packs::desktop::tests::a_failure_after_a_refusal_outlasts_downloading_coming_on") { + return; + } + let _none = NoBackend; + let fake = Fake::new("refused-then-failed", true); + let mut a = app(); + crate::prefs_dialog::open(&mut a, Some("Language Packs")); + settled(&mut a); + agent_click(&mut a, "Install"); + assert!(has(&settled(&mut a), "Only you can turn on downloading"), "refused first"); + // Removing a pack that isn't installed fails under the same locale. + remove(&mut a, "kok"); + let failure = a.language_packs.errors.get("kok").cloned().expect("the removal's failure"); + assert!(!failure.contains("Only you can turn on downloading"), "{failure}"); + fake.enable_downloads().unwrap(); + settled(&mut a); + assert_eq!(a.language_packs.errors.get("kok"), Some(&failure), "the failure stays once downloading is on"); +} + +#[test] +fn the_bar_gets_the_pack_for_the_documents_language() { + if !crate::testing::in_own_process("language_packs::desktop::tests::the_bar_gets_the_pack_for_the_documents_language") { + return; + } + let _none = NoBackend; + // No list yet: the bar offers the language alone, and its button gets the list, then the pack. + let fake = Fake::new("bar", false); + let mut a = app(); + konkani_document(&mut a); + let tree = settled(&mut a); + assert!(has(&tree, "Konkani spelling and hyphenation need a Language pack."), "{:?}", labels(&tree)); + let get = spot(&tree, "Get Language Pack").expect("the bar's button"); + click(&mut a, get); + let tree = settled(&mut a); + assert!(fake.downloads(), "the person's click turned downloading on"); + assert_eq!(installed(), ["kok"], "the list came, then the pack"); + assert!(!has(&tree, "need a Language pack"), "the bar is gone once the language spells: {:?}", labels(&tree)); +} + +#[test] +fn closing_the_bar_hides_it_for_that_document() { + if !crate::testing::in_own_process("language_packs::desktop::tests::closing_the_bar_hides_it_for_that_document") { + return; + } + let _none = NoBackend; + let _fake = Fake::new("close", true); + let mut a = app(); + konkani_document(&mut a); + let tree = settled(&mut a); + assert!(spot_starting(&tree, "Install (").is_some(), "the bar offers the pack with its size: {:?}", labels(&tree)); + let close = ["Dismiss", "Close"].iter().find_map(|l| spot(&tree, l)).unwrap_or_else(|| panic!("the bar's close button: {:?}", labels(&tree))); + click(&mut a, close); + assert!(!has(&settled(&mut a), "need a Language pack"), "closed for this document"); + konkani_document(&mut a); + assert!(has(&settled(&mut a), "need a Language pack"), "another document in the language offers it again"); + assert!(installed().is_empty(), "nothing installed without a click"); +} + +/// Text from the index isn't ours to trust: control, bidi and tag characters are taken out and it is cut short. +#[test] +fn index_text_is_shown_without_hidden_characters() { + let hostile = "Nederlands\u{202E}lmth.exe\u{E0041}\u{200B}\n"; + let shown = language_name("zz", Some(hostile)); + assert!(!shown.chars().any(|c| c.is_control() || ('\u{202A}'..='\u{202E}').contains(&c) || ('\u{E0000}'..='\u{E007F}').contains(&c))); + assert!(shown.starts_with("Nederlands")); + assert!(language_name("zz", Some(&"x".repeat(100))).chars().count() <= 40, "cut short"); +} diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index 6c41d58e2d..ee25f7a61c 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -56,6 +56,7 @@ pub mod icon_data; pub mod icons; pub mod io; pub mod keymap; +pub mod language_packs; pub mod layout_migration; pub mod menus; pub mod opening; @@ -270,6 +271,9 @@ pub struct VectorcraftApp { pub concept_runs: panels::concept_vector::ConceptRuns, /// Retype's search of the installed fonts, off the UI thread ([`retype_runs`]). pub retype_runs: retype_runs::RetypeRuns, + /// Language packs: the Preferences page's and the missing-pack bar's state ([`language_packs`]). The web has none. + #[cfg(not(target_arch = "wasm32"))] + pub(crate) language_packs: language_packs::Runtime, /// Data Recovery's timer and startup question ([`recovery`]). pub recovery: recovery::Timer, /// The Close, Close All or Quit in progress, which asks about each unsaved document in turn. diff --git a/crates/ui-egui/src/prefs_dialog.rs b/crates/ui-egui/src/prefs_dialog.rs index eaacf7880e..bdb025a65a 100644 --- a/crates/ui-egui/src/prefs_dialog.rs +++ b/crates/ui-egui/src/prefs_dialog.rs @@ -186,7 +186,7 @@ fn categories(app: &VectorcraftApp) -> impl Iterator { let _ = app; None }; - PREF_CATEGORIES.iter().copied().chain(agents) + PREF_CATEGORIES.iter().copied().chain([crate::language_packs::PAGE]).chain(agents) } /// The agent settings as the AI Integrations page edits them; `None` where the window has no such page. diff --git a/crates/ui-egui/src/prefs_dialog/model.rs b/crates/ui-egui/src/prefs_dialog/model.rs index 59b5d9e15f..a3f21c71e7 100644 --- a/crates/ui-egui/src/prefs_dialog/model.rs +++ b/crates/ui-egui/src/prefs_dialog/model.rs @@ -380,15 +380,22 @@ impl Live<'_> { impl PreferencesModel for Live<'_> { fn pages(&self) -> Vec> { - let pages = PREF_CATEGORIES.iter().map(|&cat| self.page(cat)); + let mut pages: Vec> = PREF_CATEGORIES.iter().map(|&cat| self.page(cat)).collect(); + // Language Packs after Hyphenation: a page of its own, which installs and removes at once (nothing waits for + // OK, and there is nothing to reset). + let packs = PageSpec::custom(crate::language_packs::PAGE, tl!(crate::language_packs::PAGE)) + .resettable(false) + .keywords(tl!("spelling dictionary hyphenation language download install remove")); + let at = pages.iter().position(|p| p.id == "Hyphenation").map_or(pages.len(), |i| i + 1); + pages.insert(at, packs); // The agent settings, drawn whole by the framework's Agents page, on the desktop. #[cfg(not(target_arch = "wasm32"))] - let pages = pages.chain(self.app.agents.is_some().then(|| { + if self.app.agents.is_some() { use crate::agents::PAGE_TITLE; let keywords = "agents AI MCP ArtCraft Launcher control port folders"; - PageSpec::custom(PAGE_TITLE, tl!(PAGE_TITLE)).keywords(keywords).resettable(false) - })); - pages.collect() + pages.push(PageSpec::custom(PAGE_TITLE, tl!(PAGE_TITLE)).keywords(keywords).resettable(false)); + } + pages } fn set(&mut self, key: &str, value: PrefValue) { @@ -464,7 +471,10 @@ impl PreferencesModel for Live<'_> { if page == crate::agents::PAGE_TITLE { return agents_page(self, ui); } - let _ = (ui, page); + if page == crate::language_packs::PAGE { + crate::language_packs::page(self.app, ui); + } + // Nothing of the draft changes: a pack installs or is removed at once. false } diff --git a/docs/gaps.md b/docs/gaps.md index f15612dccf..e49d8ff4af 100644 --- a/docs/gaps.md +++ b/docs/gaps.md @@ -551,7 +551,7 @@ macOS cursor delivery (#2292) is narrowed to a native host adapter using the exi - **Done:** COLR and SVG glyphs go with type that geometry effects reshape, into Expand Appearance and EMF/WMF export, where the type's outlines used to leave them out; bitmap glyphs (emoji) too, as images that hold their own pixels until a document takes them in; estimate unchanged. -- **Done:** spell check (#4936): engine (`text.spelling.check` and `text.spelling.suggest` on craft-proof); custom dictionary and Ignore All (`text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary`, `ignoreAll`); Auto Spell Check (`edit.autoSpellCheck`) with red wavy underlines and canvas context menu suggestions, Ignore All and Add to Dictionary; Edit › Edit Custom Dictionary…; and modal Check Spelling dialog (Edit › Spelling › Check Spelling…, and Spelling › Check Spelling… in the canvas context menu of type, `ui.checkSpelling`) with sentence context, suggestions list, "Change to" edit, Ignore, Ignore All, Change, Change All, Add to Dictionary, Done, Cancel, and keyboard navigation; Language packs for languages other than English, read from the Craft apps' shared font store, with `proof.packs`, `proof.installPack` and `proof.removePack` (a Preferences page to install them and the missing-pack bar remain). Estimate unchanged. +- **Done:** spell check (#4936): engine (`text.spelling.check` and `text.spelling.suggest` on craft-proof); custom dictionary and Ignore All (`text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary`, `ignoreAll`); Auto Spell Check (`edit.autoSpellCheck`) with red wavy underlines and canvas context menu suggestions, Ignore All and Add to Dictionary; Edit › Edit Custom Dictionary…; and modal Check Spelling dialog (Edit › Spelling › Check Spelling…, and Spelling › Check Spelling… in the canvas context menu of type, `ui.checkSpelling`) with sentence context, suggestions list, "Change to" edit, Ignore, Ignore All, Change, Change All, Add to Dictionary, Done, Cancel, and keyboard navigation; Language packs for languages other than English, read from the Craft apps' shared font store, with `proof.packs`, `proof.installPack` and `proof.removePack` ; Edit › Preferences › Language Packs lists them (size, what each provides, licence) with Install, Remove, progress and errors, and a dismissible bar over the canvas offers a pack when the downloaded list contains one for a document language without a dictionary (`proof.packs` `missing`); the person's own click turns downloading on, an injected one never does; the web build has no packs yet (craft-libs#745). Estimate unchanged. - **Missing:** CJK vertical composition (custom mojikumi sets and the Mojikumi Settings dialog), Middle Eastern features beyond bidi, digit types, Character Direction and Kashidas (a split caret; the Middle Eastern & South Asian composers are done, #4935), @@ -1069,6 +1069,7 @@ trap, and the defaults (0.25 pt, 100%, 40%) are VectorCraft's own, the pages giv | Date | Change | Summary | |---|---|---| | 2026-12-02 | minor | G16: Web: Gujarati can be selected as the interface language; the web fetches Noto Sans Gujarati when the interface needs it (`crates/text/web-fonts.txt`, `demand`), as it does Noto Sans Devanagari for Hindi. Status/error messages remain partial. Scores and estimates unchanged. | +| 2026-12-02 | minor | G4 type: Language packs UI (#4936): Edit › Preferences › Language Packs lists the installed packs and the packs on the downloadable list (size, spelling, hyphenation, licence) with Install, Remove, progress and errors; a dismissible missing-pack bar over the canvas offers Install when the downloaded list has a pack for a document language without a dictionary, or Get Language Pack before the list is fetched; `proof.packs` reports `missing`; only the person's own click turns downloading on; not on the web (craft-libs#745); scores and estimates unchanged. | | 2026-11-27 | minor | G4 type: Language packs (#4936): spelling and hyphenation read the packs installed in the Craft apps' shared font store, and `proof.packs`, `proof.installPack` and `proof.removePack` list, install and remove them (installs need downloading on, which only the person turns on); a Preferences page to install them and the missing-pack bar remain; scores and estimates unchanged. | | 2026-11-24 | minor | G12: History row context menus use shared Craft List and Menu controls after rebasing onto the panel migration. App-specific actions retain the chosen snapshot across pending edits and dismiss on document switches; keyboard context requests and focus restoration use the shared runtime. Regression cases retained (#8845); scores and estimates unchanged. | | 2026-11-23 | minor | Gradient stop editor: a compact Color-tab menu offers Grayscale Slider, RGB Sliders, HSB Sliders, CMYK Sliders and Web Color Sliders, sharing the Color panel mode and conversion behavior (#7918). Choosing a mode keeps the editor open; Escape closes the menu first. Scores and estimates unchanged. | diff --git a/docs/mcp.md b/docs/mcp.md index 900de1a4f0..9d5be80d11 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -15039,14 +15039,17 @@ installed packs; the web app has none, and no `proof.*` commands. running (`installing`, with bytes `done` of `total`), whether the index is being fetched (`refreshing`), the last failure of each locale (`errors`; `""` is the index fetch), whether downloading is on (`downloads`), a test index used instead of the pinned one (`indexOverride`, from `CRAFT_LANGUAGE_PACK_INDEX`) and whether there is a store to - install into (`available`). `refresh: true` fetches the index again. + install into (`available`), and the languages of the front document's visible, unlocked type that have no + dictionary (`missing`: each `lang` with its pack's `locale`, `null` before the index is first fetched; a language the + fetched index has no pack for is left out). `refresh: true` fetches the index again. - `proof.installPack {locale}` downloads a pack, checks its sha256 and installs it (fetching the index first when it doesn't list the locale). Every open document is laid out and checked again with it. `locale` is the pack's tag, like `nl` or `pt-br` (`pt_BR` reads as `pt-br`). - `proof.removePack {locale}` removes an installed pack, not while it installs. Installs and index fetches need downloading on. Only the person using a Craft app turns it on, with their own click -(the setting is the font store's, shared by the apps): no command turns it on, and until then an install is an error +(in VectorCraft: Install, Refresh List or Get Language Pack in Edit › Preferences › Language Packs, or in the bar over +the canvas that offers a missing language's pack; the setting is the font store's, shared by the apps): no command, and no click the control channel injects (`ui.click`), turns it on, and until then an install is an error that says so. A caller with automation roots (`--automation-read-root`, `--automation-write-root`) can list packs but not fetch, install or remove them, since the store is outside its roots. A script cannot run the `proof.*` commands at all, since a run's rollback cannot put the store back. In the desktop app installs and fetches diff --git a/docs/type-parity.md b/docs/type-parity.md index 9d3d069cc8..46653fcdfd 100644 --- a/docs/type-parity.md +++ b/docs/type-parity.md @@ -1,6 +1,6 @@ # Type parity -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-18 · **Change:** minor (Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: modal Check Spelling dialog: Edit › Spelling › Check Spelling…, `ui.checkSpelling`, #4936; spell check complete; previously minor: Paragraph composers (#4935): the Paragraph panel menu and paragraph styles offer four composers, the Middle Eastern & South Asian Single-line and Every-line (how all type is set, and the default) and a Standard Single-line and Every-line that set Indic, Arabic and Hebrew type glyph by glyph as the font maps it, for legacy fonts that keep a script on Latin character codes; `.ai` and EPS files do not carry the choice; scores and estimates unchanged; previously minor: kerning at the Type tool's caret at the start of a line sets the space before the character after it, #5111; previously minor: type's strokes in an envelope paint along its bent glyph outlines at their own weight, Distort Appearance on or off, as users' `.ai` files draw them, #6644; previously minor: a centred or right-aligned line of tracked type is aligned without the tracking after its last character, as the page of users' `.ai` files aligns it, #6610; previously minor: tracking and manual kerning in horizontally scaled type are thousandths of the em as the Horizontal Scale draws it, as the page of users' `.ai` files spaces such type; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: Direct Selection shows and drags the direction handles of type on a path's path, #3565; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; paint-only Arabic harakat keep joining with GDEF-mark ownership and Insert Kashidas base-letter paint; scores and estimates unchanged; custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: right-aligned area type sets the text after a line's last tab against the right edge; a soft return in justified type no longer keeps its line from being justified; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen) · **Target:** Adobe Illustrator 2026 (30.x) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-12-02 · **Change:** minor (Language packs (#4936): Edit › Preferences › Language Packs and the missing-pack bar; previously: Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: modal Check Spelling dialog: Edit › Spelling › Check Spelling…, `ui.checkSpelling`, #4936; spell check complete; previously minor: Paragraph composers (#4935): the Paragraph panel menu and paragraph styles offer four composers, the Middle Eastern & South Asian Single-line and Every-line (how all type is set, and the default) and a Standard Single-line and Every-line that set Indic, Arabic and Hebrew type glyph by glyph as the font maps it, for legacy fonts that keep a script on Latin character codes; `.ai` and EPS files do not carry the choice; scores and estimates unchanged; previously minor: kerning at the Type tool's caret at the start of a line sets the space before the character after it, #5111; previously minor: type's strokes in an envelope paint along its bent glyph outlines at their own weight, Distort Appearance on or off, as users' `.ai` files draw them, #6644; previously minor: a centred or right-aligned line of tracked type is aligned without the tracking after its last character, as the page of users' `.ai` files aligns it, #6610; previously minor: tracking and manual kerning in horizontally scaled type are thousandths of the em as the Horizontal Scale draws it, as the page of users' `.ai` files spaces such type; previously minor: Edit › Edit Custom Dictionary…: its dialog adds, deletes and changes the custom dictionary's words, #4936; previously minor: Direct Selection shows and drags the direction handles of type on a path's path, #3565; previously minor: right-click on type: Spelling › Auto Spell Check, with its check mark, #4936; previously minor: right-click on a word Auto Spell Check underlined: its suggestions, Ignore All and Add to Dictionary, #4936; previously minor: Auto Spell Check: `edit.autoSpellCheck` underlines the unknown words, #4936; previously minor: PDF marked-text export (#6309): compatible glyphs stay on one layout line with per-glyph offsets; scores and estimates unchanged; paint-only Arabic harakat keep joining with GDEF-mark ownership and Insert Kashidas base-letter paint; scores and estimates unchanged; custom dictionary and Ignore All: `text.spelling.addWord`, `removeWord`, `changeWord`, `dictionary` and `ignoreAll`, #4936; previously minor: spell check engine: `text.spelling.check` and `text.spelling.suggest` on craft-proof, #4936; previously minor: right-aligned area type sets the text after a line's last tab against the right edge; a soft return in justified type no longer keeps its line from being justified; Character Styles panel: a double-click on a style's row opens its Character Style Options; the dialog keeps a fixed width and scrolls its sections, so its buttons stay on screen) · **Target:** Adobe Illustrator 2026 (30.x) > **File-font hardening status (2026-11-12, #4569):** implementation and synthetic regressions added; compilation and runtime checks pending. Scores and estimates unchanged. > @@ -55,7 +55,7 @@ against Illustrator's public documentation; **estimated** unless noted. | Hyphenation… and Justification… options | done | Eleven Indian languages use attributed patterns and preserve syllables in both composers (#4947). Hyphenation… (`ui.hyphenation`, `text.setFormat`) sets each paragraph's Words Longer Than, After First, Before Last, Hyphen Limit, Hyphenation Zone (Single-line Composer only) and Hyphenate Capitalized Words, and paragraph styles carry them (#2310). Justification… (`ui.justification`, `text.setFormat`, #2755) sets Word Spacing, Letter Spacing and Glyph Scaling (Minimum, Desired, Maximum), Auto Leading and Single Word Justification; Desired applies to every line, justified lines and the Every-line Composer use the ranges. Vertical type isn't glyph scaled. Auto Leading also sets the Leading the Character panel shows for Auto type, the leading Alt+↑/↓ (`type.step`) steps from, per paragraph, and the lines Fill with Placeholder Text counts. Evidence: `crates/text/src/tests/justify.rs`, `dialogs::justification::tests`, `tests_prefs::auto_leading_steps_and_fills_from_the_paragraph_auto_leading`, `panels::character` test `leading_field_shows_the_paragraph_auto_leading` | | Tab stops and leaders; Tabs panel | partial | Tabs panel and stops with leaders in the model (`text.tabs.set`); a stop drags from where the press landed (#1458); leaders fill the tab's gap, repeated on a grid so they line up from line to line (#1877); Ctrl-dragging a stop (Command on macOS) moves all the stops together; in right-aligned area type the text before a line's last tab sits at its stops, from the left edge, and the text after it against the right edge, as Illustrator's own layout in a user's `.ai` sets a price list (evidence: `tests::right_aligned_area_type_sets_the_text_after_its_last_tab_against_the_edge`; centred lines are still aligned as a whole); in justified area type the text up to a line's last tab keeps its spacing and its tabs their stops, and the text after the last tab takes the line's room to the far edge, VectorCraft's own rule (evidence: `tests::justify::a_justified_line_with_a_tab_spreads_the_text_after_it_to_the_edge` and the other tab tests in `crates/text/src/tests/justify.rs`) | | Hidden characters (Show Hidden Characters) | done | `type.hiddenCharacters`: marks spaces, tabs, nonbreaking and narrow nonbreaking spaces, the spaces of a set width, discretionary hyphens, forced line breaks, paragraph ends and the story's end, in horizontal, vertical and right-to-left type and on a path, and none on type in a hidden group or layer; the mark shapes are VectorCraft's own. Evidence: `canvas::tests::hidden_characters_*` | -| Spell check (Check Spelling, Auto Spell Check, custom dictionary) | done | the engine (#4936): `text.spelling.check` lists the unknown words of the document's type, each run in its Language, at the bytes `text.editRange` changes, and `text.spelling.suggest` gives suggestions, both from craft-proof, each paragraph on its own (English from the first dictionary it finds: a Hunspell dictionary in the user's dictionaries folder, the SCOWL dictionary built in from craft-i18n, a system Hunspell dictionary, and last the public-domain Moby word list built into it; other languages from the dictionaries craft-proof finds for them). The custom dictionary commands are done: `text.spelling.addWord`, `removeWord` and `changeWord` (Add, and Edit Custom Dictionary's Add, Delete and Change), and `text.spelling.dictionary` lists the words, saved to `Custom Dictionary.txt` beside the preferences; Ignore All: `text.spelling.ignoreAll` skips a word in the active document while it is open. Auto Spell Check is done: Edit › Spelling › Auto Spell Check (`edit.autoSpellCheck`, off at first, saved with the view settings) draws a red wavy line under the unknown words of the visible type, leaves out type with effects, and follows edits, the custom dictionary and Ignore All. A right-click on an underlined word lists the words its dictionary suggests (each replaces it in one undo step, `text.editRange`), or No Suggestions, then Ignore All and Add to Dictionary, and a right-click on type has Spelling › Auto Spell Check, checked while it is on. Edit › Edit Custom Dictionary… lists the custom dictionary's words, with an Entry field and Add, Delete and Change, applied on Done (Cancel leaves the dictionary as it was). The modal Check Spelling dialog is done: Edit › Spelling › Check Spelling… (`Cmd+I`, `ui.checkSpelling`) opens a modal dialog displaying the unrecognized word in sentence context ("Not in Dictionary"), a list of suggestions with double-click or selection to replace ("Change to" field), and action buttons: Ignore, Ignore All, Change (one-step Undo/Redo via `text.editRange`), Change All (batched across occurrences in a single undo step), Add to Dictionary (`text.spelling.addWord`), Done and Cancel, with keyboard navigation (Tab between controls, Enter to Change or Done, Escape to close). Evidence: `crates/engine/src/tests/spelling.rs`, `crates/ui-egui/src/canvas/tests.rs` (`auto_spell_check_*`), `crates/ui-egui/src/tests/contextmenu.rs` (the right-click), `crates/ui-egui/src/dialogs/custom_dictionary.rs` (the dialog), `crates/ui-egui/src/dialogs/check_spelling.rs` (the Check Spelling dialog). | +| Spell check (Check Spelling, Auto Spell Check, custom dictionary) | done | the engine (#4936): `text.spelling.check` lists the unknown words of the document's type, each run in its Language, at the bytes `text.editRange` changes, and `text.spelling.suggest` gives suggestions, both from craft-proof, each paragraph on its own (English from the first dictionary it finds: a Hunspell dictionary in the user's dictionaries folder, the SCOWL dictionary built in from craft-i18n, a system Hunspell dictionary, and last the public-domain Moby word list built into it; other languages from the dictionaries craft-proof finds for them). The custom dictionary commands are done: `text.spelling.addWord`, `removeWord` and `changeWord` (Add, and Edit Custom Dictionary's Add, Delete and Change), and `text.spelling.dictionary` lists the words, saved to `Custom Dictionary.txt` beside the preferences; Ignore All: `text.spelling.ignoreAll` skips a word in the active document while it is open. Auto Spell Check is done: Edit › Spelling › Auto Spell Check (`edit.autoSpellCheck`, off at first, saved with the view settings) draws a red wavy line under the unknown words of the visible type, leaves out type with effects, and follows edits, the custom dictionary and Ignore All. A right-click on an underlined word lists the words its dictionary suggests (each replaces it in one undo step, `text.editRange`), or No Suggestions, then Ignore All and Add to Dictionary, and a right-click on type has Spelling › Auto Spell Check, checked while it is on. Edit › Edit Custom Dictionary… lists the custom dictionary's words, with an Entry field and Add, Delete and Change, applied on Done (Cancel leaves the dictionary as it was). The modal Check Spelling dialog is done: Edit › Spelling › Check Spelling… (`Cmd+I`, `ui.checkSpelling`) opens a modal dialog displaying the unrecognized word in sentence context ("Not in Dictionary"), a list of suggestions with double-click or selection to replace ("Change to" field), and action buttons: Ignore, Ignore All, Change (one-step Undo/Redo via `text.editRange`), Change All (batched across occurrences in a single undo step), Add to Dictionary (`text.spelling.addWord`), Done and Cancel, with keyboard navigation (Tab between controls, Enter to Change or Done, Escape to close). Language packs (#4936) spell-check and hyphenate other languages: Edit › Preferences › Language Packs installs and removes them (`proof.installPack`, `proof.removePack`), and a bar over the canvas offers the pack for a language of the document's type that has no dictionary. Evidence: `crates/engine/src/tests/spelling.rs`, `crates/ui-egui/src/canvas/tests.rs` (`auto_spell_check_*`), `crates/ui-egui/src/tests/contextmenu.rs` (the right-click), `crates/ui-egui/src/dialogs/custom_dictionary.rs` (the dialog), `crates/ui-egui/src/dialogs/check_spelling.rs` (the Check Spelling dialog), `crates/engine/src/tests/packs.rs` and `crates/ui-egui/src/language_packs/desktop/tests.rs` (Language packs). | | Smart Punctuation, Change Case, Find & Replace | done | Type › Smart Punctuation… opens a dialog with the ff, fi, ffi and ff, fl, ffl ligatures, Smart Quotes, Smart Spaces, En, Em Dashes, Ellipses and Expert Fractions, Replace In and Report Results, which lists the count of each replacement; ligatures and fractions are written only where the font has a glyph for them. Evidence: `tests::menucmds::smart_punctuation_ligatures_spaces_and_fractions_are_counted`, `smart_punctuation_skips_ligatures_and_fractions_the_font_lacks`, `smart_spaces_keeps_one_space_after_a_period`, `dialogs::smart_punctuation::tests::menu_item_opens_the_dialog_and_ok_reports_the_counts` | | Alt + numeric-keypad codes while typing (Windows: `Alt+0176` → °) | partial | #5108: on Windows the character Windows posts when Alt comes up after keypad digits is typed at the caret like any other, in the typing's undo step (winit reports it as typed text), and the keypad digits typed with Alt run no shortcut. With NumLock off the keypad keys (Insert, End, arrows, Clear, Home, Page Up/Down without the extended-key flag) count as digits too and don't move the caret (`windows_alt_codes` unit tests; neither NumLock on nor off has been tried on a Windows machine yet). `type.insert {code}` (Windows Alt+0 code, Windows-1252 for 128–159) and `{unicode}` (hex code point) insert a character by its code (`menucmds::insert_a_character_by_its_code`). macOS and Linux have no such system convention and egui reports a keypad digit as the top-row digit, so there it does nothing; in a floating panel window the keypad digits typed with Alt are not taken out of the frame | | Caret: the arrows and Delete step over whole clusters (Thai consonant with its marks, combining accents, emoji); Backspace removes one character | done | in text with right-to-left characters the arrows move in visual order and stop on both sides of a character drawn with no width, such as a zero width non-joiner | @@ -93,6 +93,7 @@ Character Styles menu New/Redefine and footer New capture the first selected cha | Date | Change | Summary | |---|---|---| +| 2026-12-02 | minor | Language packs (#4936): Edit › Preferences › Language Packs lists, installs and removes the packs that spell-check and hyphenate languages other than English, and a dismissible bar over the canvas offers the pack for a language of the document's type without a dictionary; not on the web yet. | | 2026-11-12 | minor | #4569: file-font identity, ownership and live-face allowance hardening; forged internal family names no longer select global file fonts. Preserve owned fallback bindings through installed-font removal, placement, older saves and recovery. Added synthetic regressions; format-only verification, runtime proof pending. Scores and estimates unchanged. | | 2026-11-18 | minor | Retype phase 1 (#4934): `type.retype` turns outlined glyphs that exactly match an available font back into point text (font, size, baseline, turn, paint), reporting the shapes it cannot match; the Retype row is now partial. Scores and estimates unchanged | | 2026-11-15 | minor | Check Spelling dialog (#4936): Edit › Spelling › Check Spelling… (`Cmd+I`, `ui.checkSpelling`) modal dialog with sentence context, suggestions, Ignore, Ignore All, Change, Change All, Add to Dictionary, Done/Cancel, keyboard navigation, and one-step Undo/Redo; spell check complete. Scores and estimates unchanged. | diff --git a/docs/ui-parity.md b/docs/ui-parity.md index 28c2e63aad..b3e12b5eaf 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -84,6 +84,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard | 2026-12-02 | minor | Canvas context menu: rows for edit, group, path, type, view and artboard commands show a leading icon from the app's icon set, so a row can be found by its shape; rows without a fitting glyph stay text only (#4602); scores and estimates unchanged | | 2026-12-02 | minor | Retype panel (G12): font rows have an item context menu: a secondary click or Shift+F10 selects the row and offers Apply Font (what a click on the row does; off without live text selected), the panel menu's Small, Medium and Large sample sizes and Reset Retype Panel; the menu closes when the list or the document changes. Headless regressions: `panels::retype::tests`. Scores and estimates unchanged. | | 2026-12-02 | minor | Headless (RFC-0052) column on the Summary table and every behaviour table: 365 unknown, with marking rules | +| 2026-12-02 | minor | G4 (desktop only; the web page says packs can't be installed there yet): Edit › Preferences › Language Packs (after Hyphenation) lists the installed Language packs, with Remove, and the packs on the downloadable list, with Install, each with its progress and errors; a dismissible bar at the foot of the canvas offers the pack for a language of the document's type without a dictionary when the downloadable list has one, or to fetch the list when none was fetched yet; a language with no pack in the list (Gujarati in the pinned list) gets no offer (#4936); scores and estimates unchanged. | | 2026-11-24 | minor | G12: History row context menus use shared Craft List and Menu controls after rebasing onto the panel migration. App-specific actions retain the chosen snapshot across pending edits and dismiss on document switches; keyboard context requests and focus restoration use the shared runtime. Regression cases retained (#8845); scores and estimates unchanged. | | 2026-11-21 | minor | G12/M14: History row context menus retain the chosen snapshot while the menu is open and pending edits settle; jumps settle typing before counting undo/redo, and discarded states report that they are unavailable. Shift+F10 opens the focused row menu, Escape restores row focus, and switching documents dismisses the popup. History checklist, area and milestone evidence updated (#8845); scores and estimates unchanged. | | 2026-11-20 | minor | G12: Asset Export tiles have item context menus for Export, Remove, Rename, Select Artwork on Canvas and collecting selected artwork; right-click selects an unselected tile and preserves an existing multi-selection. Headless regressions: panels::tests_asset_export. Scores and estimates unchanged. | From 7961e2563b77137edbcbd5b52ca205333847de41 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 05:57:45 -0800 Subject: [PATCH 24/62] Tests: check the imported instance transforms with is_finite The gate's test-lint flagged the coefficient .all() check as unguarded. --- crates/cad/src/import/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/cad/src/import/tests.rs b/crates/cad/src/import/tests.rs index 08f683a65f..fae4602028 100644 --- a/crates/cad/src/import/tests.rs +++ b/crates/cad/src/import/tests.rs @@ -1158,7 +1158,7 @@ fn a_dashed_block_at_a_tiny_scale_in_a_huge_fitted_drawing_keeps_a_finite_instan } assert!(instances.iter().any(|(symbol, _)| symbol == "D0"), "{instances:?}"); for (symbol, xf) in &instances { - assert!(xf.as_coeffs().iter().all(|c| c.is_finite()), "{symbol}: {xf:?}"); + assert!(xf.is_finite(), "{symbol}: {xf:?}"); } } From 7f09e9c60af38f0eaac555823a27b697dd2a0ff1 Mon Sep 17 00:00:00 2001 From: ruchirguitar <113586074+ruchirguitar@users.noreply.github.com> Date: Sat, 5 Dec 2026 18:54:14 +0530 Subject: [PATCH 25/62] Language packs: announce rejected commands and repaint deferred installs --- crates/ui-egui/src/app.rs | 2 +- crates/ui-egui/src/language_packs.rs | 2 +- crates/ui-egui/src/language_packs/desktop.rs | 22 ++--- .../src/language_packs/desktop/tests.rs | 80 ++++++++++++++++++- 4 files changed, 93 insertions(+), 13 deletions(-) diff --git a/crates/ui-egui/src/app.rs b/crates/ui-egui/src/app.rs index 1c12f1b015..02974120bd 100644 --- a/crates/ui-egui/src/app.rs +++ b/crates/ui-egui/src/app.rs @@ -698,7 +698,7 @@ impl VectorcraftApp { if self.session.poll_language_packs() { ctx.request_repaint_after(std::time::Duration::from_millis(250)); } - crate::language_packs::tick(self); + crate::language_packs::tick(self, ctx); if self.session.plugins_loading() { if self.session.poll_plugin_loads() { ctx.request_repaint_after(std::time::Duration::from_millis(50)); diff --git a/crates/ui-egui/src/language_packs.rs b/crates/ui-egui/src/language_packs.rs index c879ec909d..3956e48819 100644 --- a/crates/ui-egui/src/language_packs.rs +++ b/crates/ui-egui/src/language_packs.rs @@ -34,7 +34,7 @@ pub const PAGE: &str = "Language Packs"; /// Once a frame: nothing on the web. #[cfg(target_arch = "wasm32")] -pub(crate) fn tick(_app: &mut VectorcraftApp) {} +pub(crate) fn tick(_app: &mut VectorcraftApp, _ctx: &egui::Context) {} /// The missing-pack bar: never on the web, which can't install packs. #[cfg(target_arch = "wasm32")] diff --git a/crates/ui-egui/src/language_packs/desktop.rs b/crates/ui-egui/src/language_packs/desktop.rs index a3ba517f9f..96c469b222 100644 --- a/crates/ui-egui/src/language_packs/desktop.rs +++ b/crates/ui-egui/src/language_packs/desktop.rs @@ -108,7 +108,7 @@ fn provides(p: &Pack) -> String { /// Once a frame: announces the installs that ended, and installs the pack the bar asked the list for once it /// arrives. -pub(crate) fn tick(app: &mut VectorcraftApp) { +pub(crate) fn tick(app: &mut VectorcraftApp, ctx: &egui::Context) { if !app.language_packs.refused.is_empty() && packs::backend().is_some_and(|b| b.downloads_on()) { // Downloading came on (Refresh List, the bar, another Craft app): the refusals no longer hold. let refused = std::mem::take(&mut app.language_packs.refused); @@ -139,6 +139,8 @@ pub(crate) fn tick(app: &mut VectorcraftApp) { } else if let Some(pack) = packs::pack_for_tag(&tag, &packs::available()).cloned() { // The person's click asked for it, and turned downloading on. install(app, &pack.locale); + // The session already checked for work this frame. Wake it even if the install ends before the next check. + ctx.request_repaint(); } else { let name = language_name(&tag, None); app.status(crate::i18n::fmt(tl!("There is no Language pack for {language} yet."), &[("language", &name)])); @@ -170,6 +172,7 @@ fn install(app: &mut VectorcraftApp, locale: &str) { } Err(e) => { app.language_packs.fail(locale.to_string(), shown_error(&e)); + announce_end(app, locale, Some(&e)); } } app.language_packs.missing = None; @@ -188,19 +191,20 @@ fn announce_end(app: &mut VectorcraftApp, locale: &str, error: Option<&str>) { app.status(message); } -/// `proof.removePack` for `locale`; a refusal is kept for its row. +/// Removes through `proof.removePack`; a failure is kept for its row and announced. fn remove(app: &mut VectorcraftApp, locale: &str) { app.language_packs.clear(locale); let own = packs::installed().into_iter().find(|p| p.locale == locale).map(|p| p.name); - match app.run("proof.removePack", json!({ "locale": locale })) { - Ok(_) => { - let name = language_name(locale, own.as_deref()); - app.status(crate::i18n::fmt(tl!("The {language} Language pack is removed."), &[("language", &name)])); - } + let name = language_name(locale, own.as_deref()); + let message = match app.run("proof.removePack", json!({ "locale": locale })) { + Ok(_) => crate::i18n::fmt(tl!("The {language} Language pack is removed."), &[("language", &name)]), Err(e) => { - app.language_packs.fail(locale.to_string(), shown_error(&e)); + let error = shown_error(&e); + app.language_packs.fail(locale.to_string(), error.clone()); + crate::i18n::fmt(tl!("Couldn't remove the {language} Language pack: {error}"), &[("language", &name), ("error", &error)]) } - } + }; + app.status(message); app.language_packs.missing = None; } diff --git a/crates/ui-egui/src/language_packs/desktop/tests.rs b/crates/ui-egui/src/language_packs/desktop/tests.rs index d111e3f6b8..e7c6bcf982 100644 --- a/crates/ui-egui/src/language_packs/desktop/tests.rs +++ b/crates/ui-egui/src/language_packs/desktop/tests.rs @@ -3,8 +3,9 @@ //! each test that sets it runs in a process of its own ([`crate::testing::in_own_process`]). use std::path::{Path, PathBuf}; -use std::sync::Arc; use std::sync::atomic::{AtomicBool, Ordering}; +use std::sync::{Arc, Mutex, mpsc}; +use std::time::{Duration, Instant}; use egui::accesskit::TreeUpdate; use egui::{Event, Modifiers, PointerButton, Pos2, RawInput, Rect}; @@ -22,6 +23,7 @@ struct Fake { dir: PathBuf, network: AtomicBool, fetched: AtomicBool, + install_gate: Mutex>>, } impl Fake { @@ -29,7 +31,7 @@ impl Fake { let dir = std::env::temp_dir().join(format!("vc-ui-packs-{name}-{}", std::process::id())); let _ = std::fs::remove_dir_all(&dir); std::fs::create_dir_all(&dir).unwrap(); - let fake = Arc::new(Fake { dir, network: AtomicBool::new(false), fetched: AtomicBool::new(fetched) }); + let fake = Arc::new(Fake { dir, network: AtomicBool::new(false), fetched: AtomicBool::new(fetched), install_gate: Mutex::default() }); packs::set_backend(Some(fake.clone())); fake } @@ -89,6 +91,10 @@ impl Backend for Fake { fn install(&self, locale: &str, _: &Cancel, progress: &mut dyn FnMut(u64, u64)) -> Result<(), String> { assert!(self.downloads(), "an install only once downloading is on"); assert_eq!(locale, "kok"); + let gate = self.install_gate.lock().unwrap().take(); + if let Some(gate) = gate { + gate.recv_timeout(Duration::from_secs(10)).map_err(|e| e.to_string())?; + } progress(1, 1); write_konkani_pack(&self.dir); Ok(()) @@ -109,6 +115,7 @@ struct NoBackend; impl Drop for NoBackend { fn drop(&mut self) { + packs::run_in_background(false); packs::set_backend(None); } } @@ -280,6 +287,75 @@ fn a_failure_after_a_refusal_outlasts_downloading_coming_on() { assert_eq!(a.language_packs.errors.get("kok"), Some(&failure), "the failure stays once downloading is on"); } +#[test] +fn immediate_pack_errors_reach_the_status_bar() { + if !crate::testing::in_own_process("language_packs::desktop::tests::immediate_pack_errors_reach_the_status_bar") { + return; + } + let _none = NoBackend; + let _fake = Fake::new("immediate-errors", true); + let mut a = app(); + + // The engine rejects the install before starting a worker because downloading is off. + install(&mut a, "kok"); + let install_error = &a.language_packs.errors["kok"]; + assert!(a.ui.status.contains("Couldn't install") && a.ui.status.contains(install_error), "{}", a.ui.status); + assert!(packs::status().installing.is_empty()); + + // The backend rejects removal synchronously because the pack does not exist. + remove(&mut a, "kok"); + let remove_error = &a.language_packs.errors["kok"]; + assert!(a.ui.status.contains("Couldn't remove") && a.ui.status.contains(remove_error), "{}", a.ui.status); +} + +#[test] +fn a_deferred_install_schedules_its_completion_frame() { + if !crate::testing::in_own_process("language_packs::desktop::tests::a_deferred_install_schedules_its_completion_frame") { + return; + } + let _none = NoBackend; + let fake = Fake::new("deferred-repaint", false); + fake.enable_downloads().unwrap(); + packs::run_in_background(true); + let (finish, gate) = mpsc::channel(); + *fake.install_gate.lock().unwrap() = Some(gate); + let mut a = app(); + let ctx = a.ui_ctx.clone().expect("a window context"); + + // Tick the host without drawing widgets, which can independently ask for repaints. + let tick = |app: &mut VectorcraftApp| { + let mut out = ctx.run_ui(egui::RawInput::default(), |ui| app.tick(ui.ctx())); + out.textures_delta.clear(); + out.viewport_output[&egui::ViewportId::ROOT].repaint_delay + }; + for _ in 0..3 { + tick(&mut a); + } + assert_eq!(tick(&mut a), Duration::MAX, "the idle host does not request a frame"); + + // The bar's request is pending when the fetch finishes and the host next ticks. + assert!(refresh(&mut a, "kok")); + a.language_packs.wanted = Some("kok".into()); + wait_for_pack_worker(|| !packs::status().refreshing); + let repaint_delay = tick(&mut a); + assert!(!packs::status().installing.is_empty(), "the deferred install started during the tick"); + assert!(repaint_delay < Duration::MAX, "the host must wake with no further input"); + + finish.send(()).unwrap(); + wait_for_pack_worker(|| packs::status().installing.is_empty()); + frame(&mut a, vec![]); + assert_eq!(installed(), ["kok"]); + assert!(a.ui.status.contains("is installed"), "the scheduled frame announces completion: {}", a.ui.status); +} + +fn wait_for_pack_worker(done: impl Fn() -> bool) { + let start = Instant::now(); + while !done() { + assert!(start.elapsed() < Duration::from_secs(10), "the pack worker did not finish"); + std::thread::sleep(Duration::from_millis(5)); + } +} + #[test] fn the_bar_gets_the_pack_for_the_documents_language() { if !crate::testing::in_own_process("language_packs::desktop::tests::the_bar_gets_the_pack_for_the_documents_language") { From cd08707be80d46802881856ae210e87e1771f8ab Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 06:06:15 -0800 Subject: [PATCH 26/62] Undo: canceled undo groups and scopes count only as history restores Since #10882 a canceled undo group, and a canceled undo scope that put back an earlier snapshot, advance history_restores, which every edit target that reads rollbacks also hashes. They no longer advance rollbacks as well, and the two engine tests for that are removed; history_mem.rs covers the count. The Corner Radius tests now cancel an interaction whose preview drew the shape, which only rollbacks counts, so they still fail without rollbacks in corner_target. --- crates/engine/src/doc_state.rs | 2 +- crates/engine/src/session/undo.rs | 5 -- crates/engine/src/tests/journal.rs | 60 ------------------- .../src/panels/transform/shape/tests.rs | 34 ++++++----- 4 files changed, 19 insertions(+), 82 deletions(-) diff --git a/crates/engine/src/doc_state.rs b/crates/engine/src/doc_state.rs index 8b27c87f30..c1da77255b 100644 --- a/crates/engine/src/doc_state.rs +++ b/crates/engine/src/doc_state.rs @@ -121,7 +121,7 @@ pub struct DocState { /// Advances when Undo, Redo or a canceled undo group restores an older document snapshot. The same node ID can name different objects /// across that boundary. pub history_restores: u64, - /// Advances when a canceled undo group, undo scope or interaction, Exit Symbol Editing Mode taking + /// Advances when a canceled interaction, Exit Symbol Editing Mode taking /// back the entering step, Discard Empty Type taking back the step that made the text, or a command /// that panicked puts back an older document snapshot. A canceled plug-in run advances it /// when its calls changed the document. A preview advances it when it discards an earlier preview diff --git a/crates/engine/src/session/undo.rs b/crates/engine/src/session/undo.rs index 5d224e2a5e..910fbda9f9 100644 --- a/crates/engine/src/session/undo.rs +++ b/crates/engine/src/session/undo.rs @@ -125,7 +125,6 @@ impl Session { st.drop_stale_variables_highlight(); st.history_restores += 1; st.revision += 1; - st.rollbacks += 1; // The journal drops only the canceled groups' own entries and keeps the ones made in other documents meanwhile. journal.extend(g.journal); steps.extend(g.steps); @@ -275,7 +274,6 @@ impl Session { } Some(_) => return, } - let changed = !Arc::ptr_eq(&st.doc, &doc); let undone = std::mem::replace(&mut st.doc, doc); st.selection = selection; st.restore_isolation(scope.isolation, &undone); @@ -287,9 +285,6 @@ impl Session { st.history_restores += 1; } st.revision += 1; - if changed { - st.rollbacks += 1; - } if colors_changed { self.paint = scope.paint; } diff --git a/crates/engine/src/tests/journal.rs b/crates/engine/src/tests/journal.rs index 4031910307..ac2cf6c903 100644 --- a/crates/engine/src/tests/journal.rs +++ b/crates/engine/src/tests/journal.rs @@ -829,31 +829,6 @@ fn canceling_undo_groups_in_two_documents_drops_the_edits_of_both_from_the_journ assert_eq!(ids.last(), Some(&"edit.undoGroup.end")); } -/// A canceled undo group puts back an older snapshot, after which a new object can take a removed object's ID, so -/// it advances `rollbacks`; a group that ends without cancel leaves it as it is. Neither changes `history_restores`. -#[test] -fn undo_group_cancellation_advances_rollbacks_only_when_restoring() { - let mut s = Session::new(); - s.execute("file.new", &json!({"width": 400, "height": 300})).unwrap(); - for cancel in [true, false] { - let restores = s.doc().unwrap().history_restores; - let rollbacks = s.doc().unwrap().rollbacks; - let before = s.doc().unwrap().doc.node_count(); - s.execute("edit.undoGroup.begin", &json!({})).unwrap(); - s.execute("shape.rectangle", &rect_step(10)["params"]).unwrap(); - assert!(s.doc().unwrap().doc.node_count() > before); - s.execute("edit.undoGroup.end", &json!({"cancel": cancel})).unwrap(); - assert_eq!(s.doc().unwrap().history_restores, restores); - if cancel { - assert!(s.doc().unwrap().rollbacks > rollbacks, "a canceled group advances the rollback count"); - assert_eq!(s.doc().unwrap().doc.node_count(), before); - } else { - assert_eq!(s.doc().unwrap().rollbacks, rollbacks); - assert!(s.doc().unwrap().doc.node_count() > before); - } - } -} - /// Exit Symbol Editing Mode with nothing changed takes back the entering step, which puts back an older snapshot, so /// it advances `rollbacks`; leaving after an edit adds a step and leaves it as it is. #[test] @@ -1492,41 +1467,6 @@ fn an_undo_scope_in_an_open_group_takes_back_only_its_own_edits() { assert_eq!(objects(&s), 0, "one undo takes back the group's edits"); } -/// A canceled undo scope that joined an open group advances `rollbacks` only when it restores an older snapshot; -/// a scope that makes no edit or ends without cancel leaves it as it is. Neither changes `history_restores`. -#[test] -fn joined_undo_scope_cancellation_advances_rollbacks_only_when_restoring() { - let mut s = Session::new(); - s.execute("file.new", &json!({"width": 400, "height": 300})).unwrap(); - s.begin_undo_group(); - for cancel in [true, false] { - let restores = s.doc().unwrap().history_restores; - let rollbacks = s.doc().unwrap().rollbacks; - let before = s.doc().unwrap().doc.node_count(); - let scope = s.begin_undo_scope().unwrap(); - s.execute("shape.rectangle", &rect_step(10)["params"]).unwrap(); - assert!(s.doc().unwrap().doc.node_count() > before); - s.end_undo_scope(scope, cancel); - assert_eq!(s.doc().unwrap().history_restores, restores); - if cancel { - assert!(s.doc().unwrap().rollbacks > rollbacks, "a canceled scope advances the rollback count"); - assert_eq!(s.doc().unwrap().doc.node_count(), before); - } else { - assert_eq!(s.doc().unwrap().rollbacks, rollbacks); - assert!(s.doc().unwrap().doc.node_count() > before); - } - assert!(s.doc().unwrap().undo_group.is_some()); - } - s.execute("shape.rectangle", &rect_step(10)["params"]).unwrap(); - let restores = s.doc().unwrap().history_restores; - let rollbacks = s.doc().unwrap().rollbacks; - let scope = s.begin_undo_scope().unwrap(); - s.end_undo_scope(scope, true); - assert_eq!(s.doc().unwrap().rollbacks, rollbacks, "canceling a scope with no edits preserves the rollback count"); - assert_eq!(s.doc().unwrap().history_restores, restores); - s.end_undo_group(false); -} - /// A canceled undo scope that joined an open group forgets the journal entries it cut: when a command /// in another document takes the same entry number, a later cancel of the group keeps that entry, and /// the journal replays to the same documents. diff --git a/crates/ui-egui/src/panels/transform/shape/tests.rs b/crates/ui-egui/src/panels/transform/shape/tests.rs index b2f5a4c147..67f4578ba8 100644 --- a/crates/ui-egui/src/panels/transform/shape/tests.rs +++ b/crates/ui-egui/src/panels/transform/shape/tests.rs @@ -145,21 +145,23 @@ fn an_unfinished_angle_does_not_reach_a_shape_that_takes_a_canceled_groups_shape assert_eq!(p.value_role("Angle", Role::SPIN_BUTTON).as_deref(), Some("7°"), "the ellipse takes 7°, not the unfinished 3+ and 7"); } -/// A canceled undo group removes the shape a Corner Radius value was typed for, and a new shape made by `cmd` with -/// `args` takes its node ID. The value is dropped when that shape is selected in the panel `draw` draws. -fn check_corner_radius_after_a_canceled_group(draw: fn(&mut VectorcraftApp, &mut Ui), cmd: &str, args: Value, panel: &str) { +/// A canceled interaction removes the shape its preview made and a Corner Radius value was typed for, and a new shape +/// made by `cmd` with `args` takes its node ID. The value is dropped when that shape is selected in the panel `draw` +/// draws. +fn check_corner_radius_after_a_canceled_preview(draw: fn(&mut VectorcraftApp, &mut Ui), cmd: &str, args: Value, panel: &str) { let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default()); app.run("file.new", json!({"width": 400, "height": 400})).unwrap(); - app.run("edit.undoGroup.begin", json!({})).unwrap(); - let first = app.run(cmd, args.clone()).unwrap()["id"].clone(); - app.run("select.set", json!({"ids": [first]})).unwrap(); + app.session.begin_interaction("Shape").unwrap(); + let first = app.session.preview(cmd, &args).unwrap()["id"].clone(); + let selected = app.session.active().map(|st| st.selection.objects.clone()).unwrap_or_default(); + assert_eq!(json!(selected.iter().map(|id| id.0).collect::>()), json!([first]), "{panel} {cmd}: the preview selects its shape"); let mut p = Panel::new(app, draw); p.click_role("Corner Radius", Role::SPIN_BUTTON); p.key(Key::A, Modifiers::COMMAND); p.type_text("3+"); - p.app().run("edit.undoGroup.end", json!({"cancel": true})).unwrap(); + p.app().session.cancel_interaction().unwrap(); let second = p.app().run(cmd, args).unwrap()["id"].clone(); - assert_eq!(second, first, "{panel} {cmd}: the new shape takes the canceled group's shape's node ID"); + assert_eq!(second, first, "{panel} {cmd}: the new shape takes the canceled preview's shape's node ID"); p.app().run("select.set", json!({"ids": [second]})).unwrap(); p.frame(); let shown = p.value_role("Corner Radius", Role::SPIN_BUTTON); @@ -172,27 +174,27 @@ fn check_corner_radius_after_a_canceled_group(draw: fn(&mut VectorcraftApp, &mut } #[test] -fn an_unfinished_rectangle_corner_radius_does_not_reach_a_shape_that_takes_a_canceled_groups_shapes_id() { +fn an_unfinished_rectangle_corner_radius_does_not_reach_a_shape_that_takes_a_canceled_previews_shapes_id() { let rect = json!({"x": 0, "y": 0, "width": 30, "height": 30}); - check_corner_radius_after_a_canceled_group(crate::panels::transform::show, "shape.rectangle", rect, "Transform"); + check_corner_radius_after_a_canceled_preview(crate::panels::transform::show, "shape.rectangle", rect, "Transform"); } #[test] -fn an_unfinished_polygon_corner_radius_does_not_reach_a_shape_that_takes_a_canceled_groups_shapes_id() { +fn an_unfinished_polygon_corner_radius_does_not_reach_a_shape_that_takes_a_canceled_previews_shapes_id() { let polygon = json!({"cx": 60, "cy": 60, "radius": 40, "sides": 5}); - check_corner_radius_after_a_canceled_group(crate::panels::transform::show, "shape.polygon", polygon, "Transform"); + check_corner_radius_after_a_canceled_preview(crate::panels::transform::show, "shape.polygon", polygon, "Transform"); } #[test] -fn an_unfinished_rectangle_corner_radius_in_the_properties_panel_does_not_reach_a_shape_that_takes_a_canceled_groups_shapes_id() { +fn an_unfinished_rectangle_corner_radius_in_the_properties_panel_does_not_reach_a_shape_that_takes_a_canceled_previews_shapes_id() { let rect = json!({"x": 0, "y": 0, "width": 30, "height": 30}); - check_corner_radius_after_a_canceled_group(crate::panels::properties::show, "shape.rectangle", rect, "Properties"); + check_corner_radius_after_a_canceled_preview(crate::panels::properties::show, "shape.rectangle", rect, "Properties"); } #[test] -fn an_unfinished_polygon_corner_radius_in_the_properties_panel_does_not_reach_a_shape_that_takes_a_canceled_groups_shapes_id() { +fn an_unfinished_polygon_corner_radius_in_the_properties_panel_does_not_reach_a_shape_that_takes_a_canceled_previews_shapes_id() { let polygon = json!({"cx": 60, "cy": 60, "radius": 40, "sides": 5}); - check_corner_radius_after_a_canceled_group(crate::panels::properties::show, "shape.polygon", polygon, "Properties"); + check_corner_radius_after_a_canceled_preview(crate::panels::properties::show, "shape.polygon", polygon, "Properties"); } /// Exit Symbol Editing Mode with nothing changed takes back the entering step, which removes the editing copy a value From 2a0ba09fd3e9052a5e6b313d8607a07a15a6787b Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 06:53:15 -0800 Subject: [PATCH 27/62] Paste: a bitmap copied here is found after a late text read on Linux On Linux and the BSDs, Copy reads the clipboard's text before it writes. When the app that held the clipboard does not answer that read within its wait, the read stays open, and the next Paste waits for its answer. Once it came, Paste read the clipboard again as text only and compared that with the Copy. A Copy whose SVG markup does not go out as text (art with more than 1 MiB of placed images) puts only a bitmap on the clipboard, so the text never matched, and Paste took that bitmap: one picture at 72 ppi in place of the copied objects, in the same document or another one. Paste now reads the clipboard as the Copy wrote it (text or bitmap) before it compares, whatever the late read was, and takes the internal clipboard when it matches. --- apps/vectorcraft/src/clipboard.rs | 39 ++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/apps/vectorcraft/src/clipboard.rs b/apps/vectorcraft/src/clipboard.rs index e9737ab251..0bacc71eb9 100644 --- a/apps/vectorcraft/src/clipboard.rs +++ b/apps/vectorcraft/src/clipboard.rs @@ -1204,7 +1204,8 @@ mod portable { /// paste's bitmap read waits. Once it comes, /// the same read is made again, since the clipboard may have changed hands meanwhile. /// `None`, so the paste takes the internal clipboard, when that answer doesn't come or the - /// new one is what `ours` put on the clipboard. Otherwise the clipboard is read as + /// clipboard, read as `ours` was written (its text or its bitmap), holds what `ours` put + /// there. Otherwise the clipboard is read as /// [`Clipboard::read_now_or_later`] and the paste read it, the new answer standing in for /// the read it answers: copied files, else /// text, else the bitmap, and the bitmap when it is asked for and the text is blank or only @@ -1221,7 +1222,15 @@ mod portable { }; // The late answer may come from an app that lost the clipboard while it was awaited. let answer = fresh(self.request); - let held = match (&answer, ours) { + // The Copy made here is read as it was written, whatever the late read was: a Copy's + // text read that answers late leaves a bitmap Copy with no text to compare. + let written = match ours { + Some(Ours::Text(_)) => Some(Request::Text), + Some(Ours::Image(..)) => Some(Request::Image), + None => None, + }; + let mut check = written.filter(|w| *w != answer.request()).map(fresh); + let held = match (check.as_ref().unwrap_or(&answer), ours) { (Answer::Text(Ok(now)), Some(Ours::Text(t))) => now == t, (Answer::Image(Ok(now)), Some(Ours::Image(w, h))) => (now.width, now.height) == (*w, *h), _ => false, @@ -1230,7 +1239,7 @@ mod portable { return None; } let mut answer = Some(answer); - let mut read = |request: Request| match answer.take_if(|a| a.request() == request) { + let mut read = |request: Request| match answer.take_if(|a| a.request() == request).or_else(|| check.take_if(|a| a.request() == request)) { Some(answer) => answer, None => fresh(request), }; @@ -2080,6 +2089,30 @@ mod portable { assert!(paste_after_check(2).is_none()); } + #[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "dragonfly", target_os = "netbsd", target_os = "openbsd"))] + #[test] + fn a_paste_after_an_unanswered_text_read_finds_a_bitmap_copied_here() { + // A Copy reads the clipboard's text first; when that read gets no answer in its wait, the + // Copy's art goes out as a `width`×1 bitmap with no text (a placed photo too large for + // the SVG markup to go out as text). The paste then waits for the text read's answer. + let paste_after_copy = |width: usize| { + let (mut cb, release) = slow_owner(move |request| match request { + Request::Image => Answer::Image(Ok(arboard::ImageData { width, height: 1, bytes: Cow::Owned(vec![0; width * 4]) })), + _ => Answer::failed(request, "none".into()), + }); + assert!(cb.read_waiting(Request::Text, Duration::ZERO).text().is_err()); + let unanswered = cb.unanswered(&vectorcraft_engine::cmd::clipboard::PASTE_ORDER).expect("the text read is kept for the paste"); + let paste = std::thread::spawn(move || unanswered.paste(Some(&Ours::Image(2, 1)), &vectorcraft_engine::cmd::clipboard::PASTE_ORDER)); + drop(release); + paste.join().ok().flatten() + }; + // The bitmap copied here: the paste takes the internal clipboard, not a picture of it. + assert!(paste_after_copy(2).is_none()); + // Another app's bitmap is pasted. + let pasted = paste_after_copy(3).expect("the other app's bitmap is pasted"); + assert_eq!((pasted.mime, decode_png(&pasted.data).map(|i| i.dimensions())), (PNG, Some((3, 1)))); + } + #[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "dragonfly", target_os = "netbsd", target_os = "openbsd"))] #[test] fn a_late_answer_to_an_ownership_check_is_pasted_only_while_it_is_awaited() { From c2485d29ef5be4720fb3227b9b2829d409ab2d9a Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 07:05:45 -0800 Subject: [PATCH 28/62] Swatches: a Swatch Strip panel of one-click color chips MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Window › Swatch Strip shows a None chip and then the document's color swatches as a row of chips that wraps to the panel's room and scrolls when the chips do not fit. Docked on the window's bottom edge the chips run across in one line; in a dock column or a narrow floating window they run down it. Gradient and pattern swatches are left out. A click on a chip sets the fill (paint.setFill) and a right-click or an Alt-click sets the stroke (paint.setStroke). Both pass focus: false, so the active Fill or Stroke proxy stays as it was. - window.panel {panel: "swatchStrip"} shows the panel, and window.panel.dock with placement {"Edge": "Bottom"} beside the canvas docks it along the bottom edge. - The Swatches panel's shown() is shared so the strip draws a spot color the way its art shows it. Docs: docs/control-protocol.md, ROADMAP. Fixes #10951 --- ROADMAP.md | 1 + crates/ui-egui/src/menus/tree.rs | 1 + crates/ui-egui/src/panels.rs | 2 + crates/ui-egui/src/panels/swatch_strip.rs | 216 ++++++++++++++++++++++ crates/ui-egui/src/panels/swatches.rs | 2 +- crates/ui-egui/src/state.rs | 1 + docs/control-protocol.md | 7 + 7 files changed, 229 insertions(+), 1 deletion(-) create mode 100644 crates/ui-egui/src/panels/swatch_strip.rs diff --git a/ROADMAP.md b/ROADMAP.md index 9b6adac135..9eb13ef8d4 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -124,6 +124,7 @@ Ranked; detail in [docs/roadmap.md](docs/roadmap.md) and [docs/gaps.md](docs/gap ## Progress log +- 2026-12-05: Window › Swatch Strip shows a None chip and the document's color swatches as a strip of chips that wraps to the panel's room: docked on the window's bottom edge it runs across in one line, and in a dock column or a narrow floating window it runs down. A click sets the fill and a right-click or Alt-click sets the stroke (#10951). A VectorCraft addition: headline numbers unchanged. - 2026-12-04: Raster Settings OK edits the objects selected when the dialog opened. It keeps the dialog open with the reason if its document is not active, was reverted or had an Undo, a Redo or a canceled edit that put back an earlier state, if a target was changed, deleted, locked or hidden, if another edit is in progress, or if the change is refused. Headline numbers unchanged. - 2026-12-04: Paste from CAD apps: on Windows, Paste reads the enhanced metafile CAD and office apps copy as vector art, and a `.dxf`, `.dwg` or HP-GL plot file copied in a file manager pastes as its drawing through the new command `clipboard.importCad` (#10819). Headline numbers unchanged. diff --git a/crates/ui-egui/src/menus/tree.rs b/crates/ui-egui/src/menus/tree.rs index dad0879333..fd144ad2b2 100644 --- a/crates/ui-egui/src/menus/tree.rs +++ b/crates/ui-egui/src/menus/tree.rs @@ -798,6 +798,7 @@ fn built_in_tree(english_names: bool, listed: &Listed) -> Vec<(&'static str, Vec panel("Separations Preview", "separations"), panel("Stroke", "stroke"), panel("SVG Interactivity", crate::panels::svg_interactivity::ID), + panel("Swatch Strip", crate::panels::swatch_strip::ID), panel("Swatches", "swatches"), panel("Symbols", "symbols"), panel("Transform", "transform"), diff --git a/crates/ui-egui/src/panels.rs b/crates/ui-egui/src/panels.rs index cf129bf26c..adbacb0382 100644 --- a/crates/ui-egui/src/panels.rs +++ b/crates/ui-egui/src/panels.rs @@ -46,6 +46,7 @@ pub mod script_console; pub mod separations; pub mod stroke; pub mod svg_interactivity; +pub mod swatch_strip; pub mod swatches; pub mod symbols; pub mod tabs; @@ -568,6 +569,7 @@ pub(crate) fn set_part_hidden(app: &mut VectorcraftApp, key: &'static str, on: b pub fn show_icon_panel(app: &mut VectorcraftApp, ui: &mut Ui, id: &str) { match id { "swatches" => swatches::show(app, ui), + swatch_strip::ID => swatch_strip::show(app, ui), "color" => color::show(app, ui), "colorGuide" => color_guide::show(app, ui), "stroke" => stroke::show(app, ui), diff --git a/crates/ui-egui/src/panels/swatch_strip.rs b/crates/ui-egui/src/panels/swatch_strip.rs new file mode 100644 index 0000000000..f6a5f4e8f2 --- /dev/null +++ b/crates/ui-egui/src/panels/swatch_strip.rs @@ -0,0 +1,216 @@ +//! Swatch Strip panel (Window › Swatch Strip): a None chip, then the document's color swatches, in a row of chips +//! that wraps to the room the panel has. Docked along the bottom of the window (`window.panel.dock {panel: +//! "swatchStrip", anchor: "canvas", placement: {"Edge": "Bottom"}}`, or a drop on the bottom edge) the chips run +//! across in one line; in a dock column or a narrow floating window they wrap down the column, and scroll when they +//! do not fit. +//! +//! A click on a chip sets the fill (`paint.setFill`); a right-click or an Alt-click sets the stroke +//! (`paint.setStroke`). Neither changes which of the Fill and Stroke proxies is active. + +use craft::theme::Srgba; +use craft::ui::choice::Swatch; +use craft::ui::contract::{Props as _, Scroll, Show as _, ShowContainer as _}; +use craft::ui::layout_components::{Row, Stack}; +use egui::{PointerButton, Ui}; +use serde_json::{Value, json}; +use vectorcraft_color::Paint; + +use super::srgba; +use crate::VectorcraftApp; + +/// The panel's id, as `window.panel` takes it. +pub const ID: &str = "swatchStrip"; + +/// One chip: its name, the color it shows (`None`: the None chip) and the paint params a pick sends. +struct Chip { + name: String, + color: Option, + params: Value, +} + +/// The None chip, then each color swatch of the active document in the Swatches panel's order (the swatches outside +/// any color group, then each group's), shown in the color its art shows. Gradient and pattern swatches are left out. +fn chips(app: &VectorcraftApp) -> Vec { + let Some(st) = app.session.active() else { return Vec::new() }; + let d = &st.doc; + let none = Chip { name: tl!("None").to_owned(), color: None, params: json!({"none": true}) }; + let swatches = d.swatches_iter().filter_map(|s| match super::swatches::shown(d, s).0 { + Paint::Solid { color, .. } => Some(Chip { name: s.name.clone(), color: Some(srgba(&color)), params: json!({"swatch": s.name}) }), + _ => None, + }); + std::iter::once(none).chain(swatches).collect() +} + +/// Sets the fill (`stroke`: the stroke) to the chip's paint, leaving the active proxy as it is. +fn apply(app: &mut VectorcraftApp, chip: &Chip, stroke: bool) { + let mut params = chip.params.clone(); + params["focus"] = json!(false); + app.run(if stroke { "paint.setStroke" } else { "paint.setFill" }, params).ok(); +} + +/// The panel's body. +pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) { + if app.session.active().is_none() { + super::empty_state(ui, "swatch-book", tl!("No document"), tl!("Open a document to see its swatches.")); + return; + } + let chips = chips(app); + let mut picked = None; + Stack::new().id_salt(ID).fill().scroll(Scroll::vertical()).show(ui, |ui, _| { + Row::new().fill_width().wrap(true).show(ui, |ui, _| { + for (at, chip) in chips.iter().enumerate() { + let swatch = match chip.color { + Some(color) => Swatch::new(chip.name.clone(), color), + None => Swatch::optional(chip.name.clone(), None::), + }; + let out = swatch.id_salt(at).tooltip(chip.name.clone()).show(ui); + // A right-click ends on the chip, as the framework's swatch palette reads one. + let secondary = out.response.contains_pointer() && ui.input(|i| i.pointer.button_released(PointerButton::Secondary)); + if out.clicked || secondary { + picked = Some((at, secondary || out.activation.is_some_and(|a| a.mods.alt))); + } + } + }); + }); + if let Some((at, stroke)) = picked + && let Some(chip) = chips.get(at) + { + apply(app, chip, stroke); + } +} + +#[cfg(test)] +mod tests { + use craft::behavior::Axis; + use craft::behavior::dock::Node; + use egui::{Modifiers, vec2}; + use serde_json::json; + use vectorcraft_color::Paint; + use vectorcraft_engine::Session; + + use super::show; + use crate::VectorcraftApp; + use crate::tests::panel_harness::Panel; + + /// A document with three global color swatches (art painted with one stays linked to it) and a gradient swatch, + /// and one selected rectangle. + fn app() -> VectorcraftApp { + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.run("file.new", json!({"width": 200, "height": 200})).unwrap(); + for (name, color) in [("Strip Red", "#cc2222"), ("Strip Green", "#22aa44"), ("Strip Blue", "#2244cc")] { + app.run("swatch.new", json!({"name": name, "color": color, "global": true})).unwrap(); + } + let ramp = json!({"kind": "linear", "stops": [{"offset": 0, "color": "#000"}, {"offset": 1, "color": "#fff"}]}); + app.run("swatch.new", json!({"name": "Strip Ramp", "gradient": ramp})).unwrap(); + app.run("shape.rectangle", json!({"x": 10, "y": 10, "width": 50, "height": 50})).unwrap(); + app + } + + /// The fill and stroke the Fill and Stroke proxies show: the selected rectangle's. + fn paints(panel: &Panel) -> (Paint, Paint) { + crate::panels::current_paints(&panel.app()) + } + + /// The swatch a solid paint is linked to. + fn swatch_of(paint: &Paint) -> Option { + match paint { + Paint::Solid { swatch, .. } => swatch.clone(), + _ => None, + } + } + + #[test] + fn a_click_sets_the_fill_and_a_right_click_or_alt_click_the_stroke() { + let mut panel = Panel::new(app(), show); + let fill_active = panel.app().session.fill_active; + + panel.click("Strip Red"); + let (fill, stroke) = paints(&panel); + assert_eq!(swatch_of(&fill).as_deref(), Some("Strip Red"), "a click sets the fill"); + assert_ne!(swatch_of(&stroke).as_deref(), Some("Strip Red"), "a click leaves the stroke"); + + panel.secondary_click("Strip Green"); + let (fill, stroke) = paints(&panel); + assert_eq!(swatch_of(&stroke).as_deref(), Some("Strip Green"), "a right-click sets the stroke"); + assert_eq!(swatch_of(&fill).as_deref(), Some("Strip Red"), "a right-click leaves the fill"); + + panel.click_with("Strip Blue", Modifiers::ALT); + let (fill, stroke) = paints(&panel); + assert_eq!(swatch_of(&stroke).as_deref(), Some("Strip Blue"), "an Alt-click sets the stroke"); + assert_eq!(swatch_of(&fill).as_deref(), Some("Strip Red"), "an Alt-click leaves the fill"); + + assert_eq!(panel.app().session.fill_active, fill_active, "the active proxy stays as it was"); + } + + #[test] + fn the_none_chip_comes_first_and_takes_the_paint_off() { + let mut panel = Panel::new(app(), show); + let none = panel.rect("None"); + let red = panel.rect("Strip Red"); + assert!(none.left() < red.left() || none.top() < red.top(), "the None chip comes before the swatches: {none:?} {red:?}"); + + panel.click("Strip Red"); + panel.click("None"); + assert!(paints(&panel).0.is_none(), "a click on None takes the fill off"); + panel.secondary_click("None"); + assert!(paints(&panel).1.is_none(), "a right-click on None takes the stroke off"); + } + + #[test] + fn only_color_swatches_get_chips() { + let panel = Panel::new(app(), show); + assert!(panel.shows("Strip Red"), "a color swatch has a chip"); + assert!(!panel.shows("Strip Ramp"), "a gradient swatch has none"); + } + + #[test] + fn the_chips_run_along_a_wide_strip_and_wrap_down_a_narrow_one() { + let mut panel = Panel::new(app(), show); + let names = ["None", "Strip Red", "Strip Green", "Strip Blue"]; + + panel.room(vec2(4000.0, 200.0)).frame(); + panel.frame(); + let rects: Vec<_> = names.iter().map(|n| panel.rect(n)).collect(); + for pair in rects.windows(2) { + assert!((pair[0].center().y - pair[1].center().y).abs() < 1.0, "the chips share one line: {pair:?}"); + assert!(pair[0].right() <= pair[1].left(), "each chip lies after the one before it without overlapping: {pair:?}"); + } + + let one_chip = rects[0].width(); + panel.room(vec2(one_chip * 2.5, 2000.0)).frame(); + panel.frame(); + let first = panel.rect("None"); + let last = panel.rect("Strip Blue"); + assert!(last.top() >= first.bottom(), "in a narrow column a later chip wraps below the first: {first:?} {last:?}"); + assert!(last.right() <= one_chip * 2.5 + 0.5, "the chips stay inside the column: {last:?}"); + } + + /// Whether `node` holds panel `panel`. + fn holds(node: &Node, panel: &str) -> bool { + match node { + Node::Split { first, second, .. } => holds(first, panel) || holds(second, panel), + Node::Tabs { panels, .. } => panels.iter().any(|p| p == panel), + Node::Stack { entries, .. } => entries.iter().any(|e| e.panel == panel), + Node::Dock { columns, .. } => columns.iter().any(|c| c.panels().any(|p| p == panel)), + _ => false, + } + } + + /// Whether `node` has a split of rows with `upper` in its top part and `lower` in its bottom part. + fn above(node: &Node, upper: &str, lower: &str) -> bool { + match node { + Node::Split { axis: Axis::Y, first, second, .. } if holds(first, upper) && holds(second, lower) => true, + Node::Split { first, second, .. } => above(first, upper, lower) || above(second, upper, lower), + _ => false, + } + } + + #[test] + fn the_strip_docks_along_the_bottom_edge_below_the_canvas() { + let mut app = app(); + app.run("window.panel.dock", json!({"panel": super::ID, "anchor": "canvas", "placement": {"Edge": "Bottom"}})).unwrap(); + let layout = crate::panel_docking::layout_of(&app.ui); + let root = layout.root.as_ref().expect("a docked layout"); + assert!(above(root, crate::panel_docking::CANVAS, super::ID), "the strip lies in a row below the canvas: {root:?}"); + } +} diff --git a/crates/ui-egui/src/panels/swatches.rs b/crates/ui-egui/src/panels/swatches.rs index bea36866bb..8142bc9d33 100644 --- a/crates/ui-egui/src/panels/swatches.rs +++ b/crates/ui-egui/src/panels/swatches.rs @@ -284,7 +284,7 @@ fn highlighted<'a>(d: &'a Document, sel: &'a [String]) -> Vec<&'a str> { /// The `swatch`'s paint as the panel shows it, and whether it is global and spot. A tint swatch shows its base's kind; /// a spot colour shows the colour its art shows (a Lab one's CMYK equivalent when the Spot Colors options use those). -fn shown(d: &Document, s: &Swatch) -> (Paint, bool, bool) { +pub(crate) fn shown(d: &Document, s: &Swatch) -> (Paint, bool, bool) { let (global, spot) = s.tint_of().and_then(|(base, _)| d.swatch(base)).map_or((s.global, s.spot), |b| (b.global, b.spot)); let paint = match s.paint { Paint::Solid { color, swatch: None, .. } if spot => Paint::solid(d.linked_color(color, true)), diff --git a/crates/ui-egui/src/state.rs b/crates/ui-egui/src/state.rs index cfc38a0be6..133f7e97e8 100644 --- a/crates/ui-egui/src/state.rs +++ b/crates/ui-egui/src/state.rs @@ -308,6 +308,7 @@ pub const ICON_PANELS: &[(&str, &str, &str)] = &[ ("color", "Color", "palette"), ("colorGuide", "Color Guide", "dc-color-guide"), ("swatches", "Swatches", "swatch-book"), + (crate::panels::swatch_strip::ID, "Swatch Strip", "swatch-book"), ("brushes", "Brushes", "paintbrush"), ("symbols", "Symbols", "spray-can"), ("patternOptions", "Pattern Options", "grid-3x3"), diff --git a/docs/control-protocol.md b/docs/control-protocol.md index 0f4d35f635..204d98696d 100644 --- a/docs/control-protocol.md +++ b/docs/control-protocol.md @@ -289,6 +289,13 @@ or `rgbPercent` value that is not true or false. The desktop app keeps the four switches R, G and B between percent and 0 to 255 and answers true when they show in percent; a parameter answers an error and changes nothing. +Swatch Strip panel (`window.panel {panel: "swatchStrip"}`): a None chip, then the document's color swatches (the +swatches outside any color group, then each group's; gradient and pattern swatches are left out), in a row of chips +that wraps to the panel's room and scrolls when they do not fit. `window.panel.dock {panel: "swatchStrip", anchor: +"canvas", placement: {"Edge": "Bottom"}}` docks it along the window's bottom edge, where the chips run across in one +line. A click on a chip runs `paint.setFill {swatch}` (`{none: true}` for None) and a right-click or an Alt-click +runs `paint.setStroke`, both with `focus: false`, so the active proxy stays as it was. + Color Themes panel (`window.panel {panel: "colorThemes"}`): its Create tab makes a theme on a harmony wheel and its My Themes tab lists the saved themes; every action runs a command (`colorTheme.save`, `colorTheme.delete`, `colorTheme.addToSwatches`, `swatch.newGroup` for the theme being made), and `colorTheme.list` reads the library. From 1889f48ccd89681bbea20872a50e53982b4cc879 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 07:07:21 -0800 Subject: [PATCH 29/62] Open: a PDF file named .txt opens as a PDF A .txt, .rtf, .docx or .doc file that starts with a PDF header (%PDF- and a version such as 1.7) or an Affinity signature opens as that format again, as it did before File > Open read text documents, and File > Open asks no Text Import Options for it. A plain text note that only starts with "%PDF" or " Result bool { + let pdf = bytes.starts_with(b"%PDF-") + && bytes.get(5).is_some_and(u8::is_ascii_digit) + && bytes.get(6) == Some(&b'.') + && bytes.get(7).is_some_and(u8::is_ascii_digit); + fileio::TEXT_DOCUMENT_EXTS.contains(&fileio::extension(name).as_str()) && !pdf && !vectorcraft_affinity::is_affinity(bytes) +} + /// The size of the document File › Open makes of a text, RTF or Word file: a letter page. const TEXT_DOCUMENT: (f64, f64) = (612.0, 792.0); @@ -226,11 +238,11 @@ const TEXT_DOCUMENT: (f64, f64) = (612.0, 792.0); /// `p` give a text file's `text` options): a new letter-size document whose first layer holds the /// file's text as area type, in a frame 36 pt inside the artboard, as File › Place sets it, with /// the file's format and warnings. `None` when the file's extension is not one of -/// [`fileio::TEXT_DOCUMENT_EXTS`], or when its content is none of these files (an Affinity file -/// named `.txt`). +/// [`fileio::TEXT_DOCUMENT_EXTS`], when it starts with a PDF or Affinity signature +/// ([`opens_as_text`]), or when its content is none of these files. pub(crate) fn text_document(name: &str, bytes: &[u8], p: &Value) -> Result)>> { const C: &str = "document.open"; - if !fileio::TEXT_DOCUMENT_EXTS.contains(&fileio::extension(name).as_str()) { + if !opens_as_text(name, bytes) { return Ok(None); } let Some((story, format, warnings)) = text_story(name, bytes, p, C)? else { return Ok(None) }; diff --git a/crates/engine/src/tests/textimport.rs b/crates/engine/src/tests/textimport.rs index b3e456a3b9..b10de9f068 100644 --- a/crates/engine/src/tests/textimport.rs +++ b/crates/engine/src/tests/textimport.rs @@ -1242,3 +1242,27 @@ fn text_files_that_cant_be_read_open_no_document() { assert!(open_text(&mut s, "plain.rtf", b"Plain words, not RTF", json!({})).is_err(), "an .rtf file that isn't RTF"); assert_eq!(s.documents().len(), 0); } + +/// A file whose content is a format File › Open reads (a PDF file) opens as that format even when +/// it is named `.txt`, as it did before text files opened. +#[test] +fn a_pdf_named_txt_opens_as_a_pdf() { + let mut s = Session::new(); + s.execute("file.new", &json!({"width": 100, "height": 80})).unwrap(); + s.execute("shape.rectangle", &json!({"x": 10, "y": 10, "width": 40, "height": 30})).unwrap(); + let pdf = s.execute("document.exportPdf", &json!({})).unwrap(); + let pdf = vectorcraft_format::base64_decode(pdf["dataBase64"].as_str().expect("dataBase64")).unwrap(); + assert!(pdf.starts_with(b"%PDF")); + let r = open_text(&mut s, "drawing.txt", &pdf, json!({})).unwrap(); + assert_eq!(r["format"], "pdf", "{r}"); + let st = s.doc().unwrap(); + assert!(!st.doc.layers.iter().flat_map(|l| l.children().into_iter().flatten()).any(|n| matches!(n.kind, NodeKind::Text(_))), "no text"); + assert!(!cmd::place::opens_as_text("drawing.txt", &pdf), "File › Open asks no Text Import Options for it"); + // Text that only looks like the start of a drawing is still text. + open_text(&mut s, "notes.txt", b" Vec { "open_file", "Open file", &format!( - "Open a file as a new, active document: .{} (see run_command document.formats). Templates (.ait, native templates) open as a new untitled document. A text, RTF or Word file (.txt, .rtf, .docx, .doc) opens as a new letter-size document of its text as area type. The reply's `warnings` say what didn't come in as it was (an EPS shown as its preview image says why its PostScript couldn't be read). A file of an extension no built-in format reads opens with the installed importer plug-in that lists it; `importer` names the importer to use (File › Open With), also for an extension a built-in format reads, and `params` gives that importer's parameters.", + "Open a file as a new, active document: .{} (see run_command document.formats). Templates (.ait, native templates) open as a new untitled document. A text, RTF or Word file (.txt, .rtf, .docx, .doc) opens as a new letter-size document of its text as area type. A file with one of those extensions that starts with a PDF header or an Affinity signature opens as that format instead. The reply's `warnings` say what didn't come in as it was (an EPS shown as its preview image says why its PostScript couldn't be read). A file of an extension no built-in format reads opens with the installed importer plug-in that lists it; `importer` names the importer to use (File › Open With), also for an extension a built-in format reads, and `params` gives that importer's parameters.", open_exts().join(", .") ), obj( diff --git a/crates/ui-egui/src/dialogs/text_import.rs b/crates/ui-egui/src/dialogs/text_import.rs index 958b1b1984..4e563dde79 100644 --- a/crates/ui-egui/src/dialogs/text_import.rs +++ b/crates/ui-egui/src/dialogs/text_import.rs @@ -127,12 +127,17 @@ fn is_asking(app: &VectorcraftApp) -> bool { } /// File › Open of the file `name` holding `bytes` (read from `path`) with `document.open`'s params -/// `p` asks how to read it first (true) when it is a text file and `p` gives no `text` options and -/// names no importer: OK opens it as a new document with the options and remembers them for the +/// `p` asks how to read it first (true) when it is a text file that opens as text (not a PDF or +/// Affinity file named `.txt`) and `p` gives no `text` options and names no importer: OK opens it as a new document with the options and remembers them for the /// next text file, and an error keeps the dialog open. The dialog starts from the options /// confirmed last. While Text Import Options is open, the file waits its turn ([`open_next`]). pub fn offer_open(app: &mut VectorcraftApp, name: &str, bytes: &[u8], path: Option, p: &Value) -> bool { - if !is_text_name(name) || p.get("text").is_some() || p.get("importer").is_some_and(|v| !v.is_null()) || app.ui_ctx.is_none() { + if !is_text_name(name) + || !vectorcraft_engine::cmd::place::opens_as_text(name, bytes) + || p.get("text").is_some() + || p.get("importer").is_some_and(|v| !v.is_null()) + || app.ui_ctx.is_none() + { return false; } let file = TextOpen { name: name.to_string(), bytes: bytes.to_vec(), path, params: p.clone() }; diff --git a/docs/mcp.md b/docs/mcp.md index 6ae86c8c0e..f8de4c8b91 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -880,7 +880,7 @@ ends the wait, so the sampler can be shown again. The BSDs and headless sessions | `invoke_menu` | `{command, params?}` | Invokes a menu item by command id. UI commands such as `view.*` and `window.*` are in `command_list` with `ui: true`; running them needs the desktop app (`--connect`). The app refuses `attributes.openUrl`, `file.export.svg.browser`, `file.saveForWeb.browser` and `file.showPackage` for every control and MCP request, since each opens another app, so the headless error for them does not suggest `--connect`. | | `open_panel` | `{panel}` | Remote only. `panel` is a panel id (`layers`, `swatches`, `colorGuide`, …, as `window.panel` takes) or its display label (`"Color Guide"`), in any case. | | `screenshot` | `{path?, scale?, artboard?, window?, max_side?, traceViews?}` | Returns MCP image content (`image/png`, base64) plus a text block. Renders the artboard with the pixels of a PNG `export` with `background: "white"` at the same scale; `traceViews:true` draws Image Trace objects in the view set with `imageTrace.setView`, as in the app's window; `window:true` captures the app window (remote only), as `ui_screenshot` does, and `max_side` (1–4096, window captures only) scales the returned image down as described for `ui_screenshot`. With `path` the backend (the headless session or the app) writes the PNG there too; a window capture written there keeps its full size with `max_side`. An app that does not send the image back writes a window capture without `path` to a file in a new folder inside the system's temporary folder (on Unix only the user can open it); the server reads the file and then removes the folder, also when the capture or the read fails. | -| `open_file` | `{path, importer?, params?}` | Opens any readable file as a new active document: `.vectorcraft`/`.drawcraft`, `.vctemplate`, `.svg`/`.svgz`, `.pdf`/`.ai`, `.ait`, `.eps`/`.epsf`, `.ps`, `.dxf`, `.emf`, `.wmf`, PICT (`.pct`/`.pic`/`.pict`, and a version 2 picture of any extension), HP-GL (`.plt`/`.hpgl`/`.hgl`/`.hpg`, and a file of an extension no other format reads that starts with plotter instructions), PNG (`.png`/`.pns`), JPEG (`.jpg`/`.jpeg`/`.jpe`), GIF, WebP, TIFF, BMP (`.bmp`/`.dib`/`.rle`), Targa (`.tga`/`.vda`/`.icb`/`.vst`), PCX, Pixar (`.pxr`), JPEG 2000 (`.jpf`/`.jpx`/`.jp2`/`.j2k`/`.j2c`/`.jpc`), HEIC/HEIF (`.heic`/`.heif`), JPEG XL (`.jxl`), PSD (`.psd`/`.pdd`)/PSB (an image opens as a document of its pixel size; a PSD or PSB file with its layers as layers, or as its merged image through `run_command document.open` with `layers: false`; a JPEG XL file as its first frame), CDR drawings of versions 1 to 27 (`.cdr`, `.cdt`), CMX files with 32-bit coordinates (`.cmx`), layered raster `.pcraft` documents (as one image at the canvas size; a warning says when only the smaller preview could be read), DWG drawings (`.dwg`, `.dws`, `.dwt`). Templates (`.vctemplate`, `.ait`, `.cdt`, `.dwt`) open as a new untitled document. A text, RTF or Word file (`.txt`, `.rtf`, `.docx`, `.doc`) opens as a new letter-size document named after the file, its text area type 36 pt inside the artboard as `file.place` sets it; `run_command document.open` with `text` gives a `.txt` file's Text Import Options, and Save asks for a name. PDF, `.ai` and SVG files saved with Preserve Editing reopen as the document they carry. The reply is `document.open`'s: its `warnings` say what didn't come in as it was (an EPS whose PostScript can't be read opens as its preview, and the warning names the PostScript error, the operator and the procedure). A file of an extension only an installed importer plug-in lists opens with that importer ([Plug-ins](#plug-ins)); `importer: "plugin."` opens the file with the importer it names, which must list the file's extension, also one a built-in format reads (in the app, as File › Open With does), and `params` gives that importer's parameters (their defaults when omitted). `run_command document.formats` lists the formats. | +| `open_file` | `{path, importer?, params?}` | Opens any readable file as a new active document: `.vectorcraft`/`.drawcraft`, `.vctemplate`, `.svg`/`.svgz`, `.pdf`/`.ai`, `.ait`, `.eps`/`.epsf`, `.ps`, `.dxf`, `.emf`, `.wmf`, PICT (`.pct`/`.pic`/`.pict`, and a version 2 picture of any extension), HP-GL (`.plt`/`.hpgl`/`.hgl`/`.hpg`, and a file of an extension no other format reads that starts with plotter instructions), PNG (`.png`/`.pns`), JPEG (`.jpg`/`.jpeg`/`.jpe`), GIF, WebP, TIFF, BMP (`.bmp`/`.dib`/`.rle`), Targa (`.tga`/`.vda`/`.icb`/`.vst`), PCX, Pixar (`.pxr`), JPEG 2000 (`.jpf`/`.jpx`/`.jp2`/`.j2k`/`.j2c`/`.jpc`), HEIC/HEIF (`.heic`/`.heif`), JPEG XL (`.jxl`), PSD (`.psd`/`.pdd`)/PSB (an image opens as a document of its pixel size; a PSD or PSB file with its layers as layers, or as its merged image through `run_command document.open` with `layers: false`; a JPEG XL file as its first frame), CDR drawings of versions 1 to 27 (`.cdr`, `.cdt`), CMX files with 32-bit coordinates (`.cmx`), layered raster `.pcraft` documents (as one image at the canvas size; a warning says when only the smaller preview could be read), DWG drawings (`.dwg`, `.dws`, `.dwt`). Templates (`.vctemplate`, `.ait`, `.cdt`, `.dwt`) open as a new untitled document. A text, RTF or Word file (`.txt`, `.rtf`, `.docx`, `.doc`) opens as a new letter-size document named after the file, its text area type 36 pt inside the artboard as `file.place` sets it; `run_command document.open` with `text` gives a `.txt` file's Text Import Options, and Save asks for a name. A file with one of those extensions that starts with a PDF header or an Affinity signature opens as that format instead. PDF, `.ai` and SVG files saved with Preserve Editing reopen as the document they carry. The reply is `document.open`'s: its `warnings` say what didn't come in as it was (an EPS whose PostScript can't be read opens as its preview, and the warning names the PostScript error, the operator and the procedure). A file of an extension only an installed importer plug-in lists opens with that importer ([Plug-ins](#plug-ins)); `importer: "plugin."` opens the file with the importer it names, which must list the file's extension, also one a built-in format reads (in the app, as File › Open With does), and `params` gives that importer's parameters (their defaults when omitted). `run_command document.formats` lists the formats. | | `save_file` | `{path?, compress?, version?, preview?, precision?, options?}` | Runs `document.save`: the document's own file in its own format (native `.vectorcraft` unless it was opened from or saved as SVG, PDF or a restorable `.ai`; then `warnings` say what that format loses). A path's extension picks the format (`.vectorcraft`, `.vctemplate`, `.pdf`, `.svg`, `.svgz`, `.ai`: a PDF carrying the native document, which reopens editable; `.eps`: by default one file whose bounding box fits the visible art, the first artboard when no art shows; `options.useArtboards: true` makes the chosen artboard the page and, with two or more chosen, the file at the path is the central file of the visible art and each artboard is also written to `_.eps` beside it, listed in the reply's `files`). For a native file, `compress: true` gzips it (default: the `useCompression` preference, Preferences › File Handling › Use Compression), `version` (1 to 4) writes it for an older VectorCraft (1 and 2 are never compressed, and `version: 2` with `compress: true` is an error; versions 1 to 3 get each live star as a plain path of its outline, without its point count and ratio), `preview: true` embeds a PNG of the first artboard, and `precision` (0 to 9) rounds path anchors and handles to that many decimal places for that save only (colors, transforms and type stay exact). `options` passes the format's save options as `run_command document.formats` lists them. When `compress`, `version`, `preview` or `precision` is given both at the top level and in `options` with different values, the call is an error (`` `compress: true` and `options.compress: false` disagree: give the option once ``) and nothing is written. A key in `options` that no save format takes is an error, and nothing is written (see Parameter keys). The save drops each option the written format doesn't read. The reply's `warnings` then name each such option given (for example `` `compress` was not used: SVG files don't read it `` for an `.svg` path, and `` `options.preview` was not used: … `` for a key in `options`; a PDF-compatible `.ai` file reads `compress` but not `version`, `preview`, `precision`, `outlineText`, `hiddenObjects`, `transparentImages` or `preserveEditing`, and a legacy `.ai` file reads only its own options). For a `.ai` file, these warnings name the kind of `.ai` written: a legacy .ai (version 7) for `aiVersion: "7"`, a non-PDF-compatible .ai for `pdfCompatible: false`, and a PDF-compatible .ai otherwise, including a save that reuses the options the document was last saved with. `run_command document.save` and the other save commands refuse any option given beside the path and in `options` with different values, and give the same warnings for each key given beside the path or in `options` that the file doesn't read. The headless session and the app receive the same `app.save` params, and the app is also sent `wait: true`: the call returns once the file is written, or with the error (such as a path outside the write root), even with Background Save on. When the save asks first (the question before replacing a file that opened with losses, or on macOS and Linux the file dialog for an untitled document without `path`), the reply is `{pending}` or `"cancelled"` as before, and the save that runs after the answer uses the Background Save preference. Location refusals return `READ_ONLY_LOCATION: ` without a fallback panel for automation; see [Save location errors](#save-location-errors). In the desktop app, a save that runs in the background shows in the progress window after 0.4 s with a moving bar. `file.cancelSave` stops every such save before it replaces its file → `{cancelled: n}`: the file stays as it was, and the document keeps its file and format and stays modified. A save whose file was already being replaced finishes and is reported as saved. `file.saveInBackground` closes the window while the saves go on → `{hidden: n}`. | | `export` | `{path?, format?, scale?, artboard?, range?, selection?, outlineText?, options?}` | `svg`, `svgz`, `pdf`, `ai` (the PDF-compatible `.ai` that Save writes, which carries the document when every artboard is written in order), `eps`, `dxf`, `emf`, `wmf`, `hpgl` (a `.plt` plot file for plotters and cutters), `png`, `jpg`, `webp`, `gif`, `png8` (an indexed `.png`), `tiff`, `bmp`, `tga`, `psd` (layered), `txt` (the document's text), `vectorcraft` or `template` (a native template). The tool's `format` enum and `document.formats` list them, generated from the engine's format table. When `format` is omitted, it comes from the path's extension. PDF and `.ai` write one page per artboard: all of them, or `artboard` (0-based) / `range` (`"1-3, 5"`, 1-based). SVG and SVGZ write one file per chosen artboard. EPS writes one file of the visible art; with `artboard`, `range`, `options.artboards` or `options: {"useArtboards": true}` it writes one file per chosen artboard, after a central file of the visible art when there are two or more, and `useArtboards: false` keeps the one file. Rasters, DXF, EMF, WMF and HP-GL write one artboard, or one file per chosen artboard with `options: {"useArtboards": true}`. Rasters also take `options: {"rect": [x, y, width, height]}` (page points, y down): that area of the page at the given `ppi`/`scale`, without an artboard and without changing the document; it is refused with `artboard`, `artboards`, `range` or `useArtboards`, with a non-positive or non-finite size, and for non-raster formats. `options` carries more format options (e.g. `{"quality": 80}` for JPEG). `selection: true` exports the selected objects cropped to their bounds (the reply adds their `bounds`, and reports `format` and the encoder's `warnings` as a whole-document export does); `outlineText: true` writes SVG text as paths. Template layers are left out, live effects are kept, and exporting `vectorcraft` never changes the document's path. Without `path` the bytes come back as `dataBase64`. Both backends run the same `document.export` call. | | `add_text` | `{text, x?, y?, width?, height?, fit?, fitMinPercent?, path?, mode?, pathEffect?, size?, font?, color?, justify?, vertical?}` | Point type at (x, y) (`justify`: `left`, `center` or `right` starts, centres or ends each line on x); area type with `width`/`height` (`fit`: `none`, `autoHeight`, `shrinkText`, as `text.areaOptions`); or `path` + `mode` (`area`/`onPath`) to flow text in or along a path, with `pathEffect` for type on a path (`rainbow`, `skew`, `3dRibbon`, `stairStep`, `gravity`; SVG export writes type on a path with any effect other than `rainbow` as outlines, with a warning). An invalid effect is rejected before editing. `justify` (also `auto`, `justifyAll`) aligns the paragraphs of every kind, as `text.setStyle` does later. `vertical: true` uses the existing vertical writing mode for every kind (default `false`, horizontal). Returns `{id}`, with `overflow: true` when the text doesn't fit its frame or path. | From 7645a787b0b3b582ad59a5e245a63a0d227504f0 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 07:28:29 -0800 Subject: [PATCH 30/62] Render: a pattern raster takes its region and size as one argument rasterize_as took eight arguments and carried an allow for Clippy's too_many_arguments lint. The region and the pixel size it fills now go in as one pair, so the function stays within the limit without the allow. --- crates/render/src/pattern.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/crates/render/src/pattern.rs b/crates/render/src/pattern.rs index 6f3bb4be78..75d783e8a8 100644 --- a/crates/render/src/pattern.rs +++ b/crates/render/src/pattern.rs @@ -172,17 +172,16 @@ pub(crate) fn raster_scale(s: f64, period: (f64, f64)) -> f64 { /// Rasterize `region` (pattern space) of the infinite tiling into a `w`×`h` pixmap, colours as /// `ink` paints them. fn rasterize(r: &mut Renderer, doc: &Document, def: &PatternDef, region: Rect, size: (u16, u16), ink: Ink, images: (bool, bool)) -> (Pixmap, bool) { - rasterize_as(r, doc, def, region, size, ink, images, |r, ctx| r.finish(ctx, r.raster)) + rasterize_as(r, doc, def, (region, size), ink, images, |r, ctx| r.finish(ctx, r.raster)) } -/// [`rasterize`], with the pixels taken from the context by `finish`. -#[allow(clippy::too_many_arguments)] +/// [`rasterize`] of `region` into `size` pixels, with the pixels taken from the context by +/// `finish`. fn rasterize_as( r: &mut Renderer, doc: &Document, def: &PatternDef, - region: Rect, - size: (u16, u16), + (region, size): (Rect, (u16, u16)), ink: Ink, (mark_undecoded_images, smooth_images): (bool, bool), finish: impl FnOnce(&mut Renderer, &mut RenderContext) -> T, @@ -357,7 +356,7 @@ fn pattern_swatch(doc: &Document, name: &str, size: u32) -> Opti let side = w.max(h); let region = Rect::from_center_size((w / 2.0, h / 2.0), (side, side)); let px = size.clamp(1, 1024) as u16; - let (pixels, _) = with_tile_renderer(|r| rasterize_as(r, doc, def, region, (px, px), Ink::Display, (false, true), P::finish))?; + let (pixels, _) = with_tile_renderer(|r| rasterize_as(r, doc, def, (region, (px, px)), Ink::Display, (false, true), P::finish))?; Some(Rendered { width: px as u32, height: px as u32, pixels }) } From 8a7ed03908e422718b216bbc6e83fcc4fbc4e903 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 07:35:17 -0800 Subject: [PATCH 31/62] Stroke: built-in width profiles stay protected from Delete Profile Delete Profile removes saved profiles only, as on main: the engine refuses a built-in name again, Reset Profiles clears the saved ones, and the hidden_width_profiles preference is gone. Hiding a built-in also made stroke.set {profile: "lens"} fail with "unknown profile lens". The command's enable check goes back to has_saved_profiles. The check added here passed whenever a built-in other than Uniform was listed, so a key press ran Delete Profile with nothing to delete and shortcut_editor::tests::listed_commands_run_from_a_key_without_a_missing_param failed. In the drop-down, the footer's Delete Profile, the row menu's Delete Profile and the trash drop target act on saved profiles only. --- crates/engine/src/cmd/stroke.rs | 49 +++++-------------- crates/engine/src/prefs.rs | 5 -- crates/engine/src/tests/widthprofiles.rs | 26 +++------- crates/ui-egui/src/panels/stroke.rs | 8 +-- .../src/panels/stroke/profile_picker.rs | 13 +++-- .../ui-egui/src/panels/tests_strokedepth.rs | 12 +---- 6 files changed, 33 insertions(+), 80 deletions(-) diff --git a/crates/engine/src/cmd/stroke.rs b/crates/engine/src/cmd/stroke.rs index 73f2f41c24..9b2ad76963 100644 --- a/crates/engine/src/cmd/stroke.rs +++ b/crates/engine/src/cmd/stroke.rs @@ -68,8 +68,8 @@ pub fn specs() -> Vec { "Delete Profile", [], None, - "{name?} remove a built-in or saved profile from the Profile list (default: the selected stroke's); \"uniform\" can't be deleted, and strokes keep their widths → {deleted}", - has_deletable_profiles, + "{name?} remove a saved profile from the Profile list (default: the selected stroke's); built-in profiles can't be deleted, and strokes keep their widths → {deleted}", + has_saved_profiles, profile_delete ), cmd!( @@ -77,7 +77,7 @@ pub fn specs() -> Vec { "Reset Profiles", [], None, - "{} remove every saved profile and restore the default built-in profiles and order → {removed: count}", + "{} remove every saved profile and restore the default order → {removed: count}", can_reset_profiles, profile_reset ), @@ -734,7 +734,6 @@ impl Session { let uniform = ProfileEntry { id: uniform.id, label: uniform.label, points: uniform.points, built_in: true }; let candidates: Vec> = WidthProfile::PRESETS[1..] .iter() - .filter(|p| !self.prefs.hidden_width_profiles.iter().any(|h| h == p.id)) .map(|p| ProfileEntry { id: p.id, label: p.label, points: p.points, built_in: true }) .chain(self.prefs.width_profiles.iter().map(|p| ProfileEntry { id: &p.name, label: &p.name, points: &p.profile.points, built_in: false })) .collect(); @@ -779,10 +778,9 @@ impl Session { (1..).map(|n| format!("Width Profile {n}")).find(|n| !self.profile_name_taken(n)).unwrap_or_default() } - /// Does a listed or built-in profile have `name` as its id or label (ignoring case)? + /// Does a listed profile have `name` as its id or label (ignoring case)? fn profile_name_taken(&self, name: &str) -> bool { self.profile_entries().any(|e| e.id.eq_ignore_ascii_case(name) || e.label.eq_ignore_ascii_case(name)) - || WidthProfile::PRESETS.iter().any(|b| b.id.eq_ignore_ascii_case(name) || b.label.eq_ignore_ascii_case(name)) } /// The variable width Add to Profiles saves: the shown stroke's profile, when it isn't listed. @@ -804,27 +802,18 @@ fn has_saved_profiles(s: &Session) -> std::result::Result<(), String> { if s.prefs.width_profiles.is_empty() { Err("no saved profiles".into()) } else { Ok(()) } } -fn has_deletable_profiles(s: &Session) -> std::result::Result<(), String> { - if s.prefs.width_profiles.is_empty() && !s.profile_entries().any(|e| e.id != WidthProfile::PRESETS[0].id) { - Err("no deletable profiles".into()) - } else { - Ok(()) - } -} - fn can_reset_profiles(s: &Session) -> std::result::Result<(), String> { - if s.prefs.width_profiles.is_empty() && s.prefs.width_profile_order.is_empty() && s.prefs.hidden_width_profiles.is_empty() { + if s.prefs.width_profiles.is_empty() && s.prefs.width_profile_order.is_empty() { Err("no saved profiles".into()) } else { Ok(()) } } -/// The default order of reorderable profiles (visible built-ins after Uniform, then saved profiles). +/// The default order of reorderable profiles (the built-ins after Uniform, then saved profiles). fn default_profile_order(s: &Session) -> Vec { WidthProfile::PRESETS[1..] .iter() - .filter(|p| !s.prefs.hidden_width_profiles.iter().any(|h| h == p.id)) .map(|p| p.id.to_string()) .chain(s.prefs.width_profiles.iter().map(|sp| sp.name.clone())) .collect() @@ -853,36 +842,24 @@ fn profile_delete(s: &mut Session, p: &Value) -> Result { None => { let shown = s.shown_stroke().and_then(|st| st.profile); let entry = shown.as_ref().and_then(|p| s.profile_entry(Some(p))); - entry.map(|e| e.id.to_string()).ok_or_else(|| bad(C, "give a name, or select a stroke with a deletable profile"))? + entry.map(|e| e.id.to_string()).ok_or_else(|| bad(C, "give a name, or select a stroke with a saved profile"))? } }; - let uniform = WidthProfile::PRESETS[0]; - if name == uniform.id || name.eq_ignore_ascii_case(uniform.label) { - return Err(bad(C, "Uniform can't be deleted")); + if WidthProfile::PRESETS.iter().any(|b| b.id == name || b.label == name) { + return Err(bad(C, format!("{name} is built in and can't be deleted"))); } - let deleted = if let Some(preset) = WidthProfile::PRESETS[1..] - .iter() - .find(|b| (b.id == name || b.label.eq_ignore_ascii_case(&name)) && !s.prefs.hidden_width_profiles.iter().any(|h| h == b.id)) - { - s.prefs.hidden_width_profiles.push(preset.id.to_string()); - preset.id.to_string() - } else if let Some(i) = s.prefs.width_profiles.iter().position(|sp| sp.name == name) { - s.prefs.width_profiles.remove(i); - name - } else { - return Err(bad(C, format!("no profile called {name}"))); - }; - s.prefs.width_profile_order.retain(|id| id != &deleted); + let i = s.prefs.width_profiles.iter().position(|sp| sp.name == name).ok_or_else(|| bad(C, format!("no saved profile called {name}")))?; + s.prefs.width_profiles.remove(i); + s.prefs.width_profile_order.retain(|id| id != &name); if s.prefs.width_profile_order == default_profile_order(s) { s.prefs.width_profile_order.clear(); } - Ok(json!({ "deleted": deleted })) + Ok(json!({ "deleted": name })) } fn profile_reset(s: &mut Session, _: &Value) -> Result { let removed = std::mem::take(&mut s.prefs.width_profiles).len(); s.prefs.width_profile_order.clear(); - s.prefs.hidden_width_profiles.clear(); Ok(json!({ "removed": removed })) } diff --git a/crates/engine/src/prefs.rs b/crates/engine/src/prefs.rs index 778fb527ee..34b25acb28 100644 --- a/crates/engine/src/prefs.rs +++ b/crates/engine/src/prefs.rs @@ -378,10 +378,6 @@ pub struct Prefs { /// Preferences dialog field, so resetting preferences keeps it. #[serde(default, skip_serializing_if = "Vec::is_empty")] pub width_profile_order: Vec, - /// Built-in non-uniform width profile ids deleted/hidden by the user; Reset Profiles clears - /// this list to restore all built-in presets. - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub hidden_width_profiles: Vec, /// General → Use Japanese Crop Marks: the style of Create Trim Marks and Effect → Crop Marks. pub japanese_crop_marks: bool, /// Appearance panel → New Art Has Basic Appearance (on): new art takes one fill and stroke; @@ -742,7 +738,6 @@ impl Default for Prefs { gradient_presets: vec![], width_profiles: vec![], width_profile_order: vec![], - hidden_width_profiles: vec![], japanese_crop_marks: false, new_art_basic: true, color_themes: vec![], diff --git a/crates/engine/src/tests/widthprofiles.rs b/crates/engine/src/tests/widthprofiles.rs index 38fabf740e..3fc2fb4ae3 100644 --- a/crates/engine/src/tests/widthprofiles.rs +++ b/crates/engine/src/tests/widthprofiles.rs @@ -84,7 +84,7 @@ fn add_list_apply_delete_reset() { } #[test] -fn uniform_cant_be_deleted_and_built_ins_delete_and_reset() { +fn built_ins_cant_be_deleted_and_names_stay_unique() { let (mut s, id) = session_with_line(); set_profile(&mut s, id, custom()); for taken in ["lens", "Taper Start", "UNIFORM"] { @@ -92,30 +92,16 @@ fn uniform_cant_be_deleted_and_built_ins_delete_and_reset() { } assert!(s.execute("stroke.widthProfile.add", &json!({"name": " "})).is_err()); s.execute("stroke.widthProfile.add", &json!({"name": "Mine"})).unwrap(); - - // Uniform cannot be deleted by id or label, nor when selected on the stroke. - s.execute("stroke.set", &json!({"profile": "uniform"})).unwrap(); - assert!(s.execute("stroke.widthProfile.delete", &json!({})).is_err()); - for u in ["uniform", "Uniform", "UNIFORM"] { - let e = s.execute("stroke.widthProfile.delete", &json!({"name": u})).unwrap_err().to_string(); - assert!(e.contains("Uniform"), "{u}: {e}"); + for b in ["lens", "Lens", "uniform", "wave"] { + let e = s.execute("stroke.widthProfile.delete", &json!({"name": b})).unwrap_err().to_string(); + assert!(e.contains("built in"), "{b}: {e}"); } - - // Non-uniform built-in profiles CAN be deleted (by name/id or active selection) and restored on Reset. - assert_eq!(s.execute("stroke.widthProfile.delete", &json!({"name": "Lens"})).unwrap()["deleted"], "lens"); - assert!(!s.profile_entries().any(|e| e.id == "lens")); + // With a built-in profile selected, Delete has nothing to delete. s.execute("stroke.set", &json!({"profile": "pinch"})).unwrap(); - assert_eq!(s.execute("stroke.widthProfile.delete", &json!({})).unwrap()["deleted"], "pinch"); - assert!(!s.profile_entries().any(|e| e.id == "pinch")); - assert!(s.execute("stroke.widthProfile.delete", &json!({"name": "Lens"})).is_err(), "already deleted"); - + assert!(s.execute("stroke.widthProfile.delete", &json!({})).is_err()); assert!(s.execute("stroke.widthProfile.delete", &json!({"name": "Other"})).is_err()); assert_eq!(s.next_profile_name(), "Width Profile 1"); assert_eq!(s.execute("stroke.widthProfile.delete", &json!({"name": "Mine"})).unwrap()["deleted"], "Mine"); - - // Reset restores all deleted built-ins as well. - assert!(s.execute("stroke.widthProfile.reset", &json!({})).is_ok()); - assert_eq!(ids(&s.execute("stroke.widthProfile.list", &json!({})).unwrap()), WidthProfile::PRESETS.iter().map(|p| p.id).collect::>()); } #[test] diff --git a/crates/ui-egui/src/panels/stroke.rs b/crates/ui-egui/src/panels/stroke.rs index c60d045fd6..aa24d8b902 100644 --- a/crates/ui-egui/src/panels/stroke.rs +++ b/crates/ui-egui/src/panels/stroke.rs @@ -917,7 +917,7 @@ pub(crate) fn profile_select(app: &mut VectorcraftApp, ui: &mut Ui) { }; let actions = ProfileActions { can_add: cur.is_some() && brushed != Some(true) && crate::menus::enabled(app, "stroke.widthProfile.add"), - can_delete: cur.as_ref().and_then(|p| app.session.profile_entry(Some(p))).is_some_and(|e| e.id != "uniform") + can_delete: cur.as_ref().and_then(|p| app.session.profile_entry(Some(p))).is_some_and(|e| !e.built_in) && brushed != Some(true) && crate::menus::enabled(app, "stroke.widthProfile.delete"), can_reset: crate::menus::enabled(app, "stroke.widthProfile.reset"), @@ -990,10 +990,10 @@ pub(crate) fn menu_states(app: &VectorcraftApp, states: &mut CommandStates) { states.set(CommandRef::new("ui.stroke.options"), CommandState::new().title(options)); let enabled = |id: &str| crate::menus::enabled(app, id); states.set(add_profile(app), CommandState::new().title(tl!("Add to Profiles…")).enabled(enabled("stroke.widthProfile.add"))); - // Deletes the selected stroke's non-Uniform profile. + // Deletes the selected stroke's saved profile. let shown = current_stroke(app).and_then(|s| s.profile); - let deletable = shown.as_ref().and_then(|p| app.session.profile_entry(Some(p))).is_some_and(|e| e.id != "uniform"); - states.set(CommandRef::new("stroke.widthProfile.delete"), CommandState::new().title(tl!("Delete Profile")).enabled(deletable)); + let saved = shown.as_ref().and_then(|p| app.session.profile_entry(Some(p))).is_some_and(|e| !e.built_in); + states.set(CommandRef::new("stroke.widthProfile.delete"), CommandState::new().title(tl!("Delete Profile")).enabled(saved)); states.set( CommandRef::new("stroke.widthProfile.reset"), CommandState::new().title(tl!("Reset Profiles")).enabled(enabled("stroke.widthProfile.reset")), diff --git a/crates/ui-egui/src/panels/stroke/profile_picker.rs b/crates/ui-egui/src/panels/stroke/profile_picker.rs index ed05993f9b..94157802bc 100644 --- a/crates/ui-egui/src/panels/stroke/profile_picker.rs +++ b/crates/ui-egui/src/panels/stroke/profile_picker.rs @@ -563,7 +563,7 @@ fn show_popup_body( Stack::new() .fill_width() .footer(|ui, _| { - footer_action = show_footer(ui, view.list_id, actions); + footer_action = show_footer(ui, view.list_id, actions, view.saved); }) .show(ui, |ui, _| { let saved_for_rename = view.saved.clone(); @@ -625,7 +625,10 @@ fn show_popup_body( (events, footer_action, menu_action) } -fn show_footer(ui: &mut egui::Ui, list_id: egui::Id, actions: ProfileActions) -> Option { +fn show_footer(ui: &mut egui::Ui, list_id: egui::Id, actions: ProfileActions, saved: &HashSet) -> Option { + // Only saved profiles can be deleted; the built-in ones stay in the list. + let droppable = saved.clone(); + let is_saved = move |key: &ProfileRowKey| key.profile().is_some_and(|id| droppable.contains(id)); // End-edge placement lays out actions from the right edge inward, so index 0 (`Reset Profiles`) // sits rightmost, with `Delete Profile` and `Add to Profiles` to its left. let bar = FooterBar::actions([ @@ -634,7 +637,7 @@ fn show_footer(ui: &mut egui::Ui, list_id: egui::Id, actions: ProfileActions) -> .enabled(actions.can_delete) .takes_drops_disabled(true) .drop_hint(tl!("Delete Profile")) - .accepts_drops::>(move |drag| drag.list == list_id && drag.keys.iter().any(ProfileRowKey::is_reorderable)), + .accepts_drops::>(move |drag| drag.list == list_id && drag.keys.iter().any(&is_saved)), FooterAction::new(IconId::new("dc-new-item"), tl!("Add to Profiles")).enabled(actions.can_add), ]) .show_footer(ui); @@ -642,7 +645,7 @@ fn show_footer(ui: &mut egui::Ui, list_id: egui::Id, actions: ProfileActions) -> if let Some(drop) = &bar.dropped && drop.index == 1 && let Some(id) = drop.payload::>().and_then(|d| d.keys.iter().find_map(ProfileRowKey::profile)) - && id != UNIFORM_ID + && saved.contains(id) { return Some(ProfileAction::Delete(Some(id.to_owned()))); } @@ -696,7 +699,7 @@ fn show_row_menu( if is_saved && MenuItem::new(tl!("Rename…")).show(ui).ran { start_rename = true; } - if MenuItem::new(tl!("Delete Profile")).show(ui).ran { + if is_saved && MenuItem::new(tl!("Delete Profile")).show(ui).ran { action = Some(ProfileAction::Delete(Some(target.clone()))); } }); diff --git a/crates/ui-egui/src/panels/tests_strokedepth.rs b/crates/ui-egui/src/panels/tests_strokedepth.rs index f7a30b5d16..cb53a78f9a 100644 --- a/crates/ui-egui/src/panels/tests_strokedepth.rs +++ b/crates/ui-egui/src/panels/tests_strokedepth.rs @@ -342,7 +342,7 @@ fn dropdown_footer_manages_profiles_and_confirms_reset() { assert!(panel.shows("Add to Profiles"), "dropdown shows Add to Profiles footer button"); assert!(panel.shows("Delete Profile"), "dropdown shows Delete Profile footer button"); assert!(panel.shows("Reset Profiles"), "dropdown shows Reset Profiles footer button"); - assert!(panel.enabled("Delete Profile"), "non-Uniform built-in profile can be deleted"); + assert!(!panel.enabled("Delete Profile"), "a built-in profile can't be deleted"); assert!( panel.rect("Reset Profiles").left() >= panel.rect("Delete Profile").right() - 0.5 && panel.rect("Delete Profile").left() >= panel.rect("Add to Profiles").right() - 0.5, @@ -355,13 +355,6 @@ fn dropdown_footer_manages_profiles_and_confirms_reset() { panel.click_role("Profile", Role::COMBO_BOX); assert!(!panel.enabled("Delete Profile"), "Uniform profile cannot be deleted"); - // Non-Uniform built-in ("Taper Start") can be deleted directly from the dropdown footer. - panel.click("Taper Start"); - panel.click_role("Profile", Role::COMBO_BOX); - assert!(panel.enabled("Delete Profile")); - panel.click("Delete Profile"); - assert!(!panel.app().session.profile_entries().any(|e| e.id == "taperStart"), "built-in preset was deleted"); - // Custom profile: clicking Add to Profiles saves immediately without opening a name dialog, // and user-added rows hide their text captions in the dropdown. panel.app().session.execute("stroke.widthPoint.set", &serde_json::json!({"id": id, "t": 0.35, "left": 12.0, "right": 3.0})).unwrap(); @@ -412,7 +405,7 @@ fn dropdown_footer_manages_profiles_and_confirms_reset() { assert!(app.session.profile_entries().any(|e| !e.built_in), "cancelling reset preserves profiles"); } - // Confirming OK executes the reset and restores deleted built-ins. + // Confirming OK executes the reset. panel.click_role("Profile", Role::COMBO_BOX); panel.click("Reset Profiles"); let mut app = panel.app(); @@ -423,7 +416,6 @@ fn dropdown_footer_manages_profiles_and_confirms_reset() { }); crate::dialogs::confirm::pump(&mut app, &ctx); assert!(app.session.profile_entries().all(|e| e.built_in), "Reset Profiles clears saved presets"); - assert!(app.session.profile_entries().any(|e| e.id == "taperStart"), "Reset Profiles restores deleted built-ins"); } #[test] From e90b66052709aff0f3abb10bf525fee747b8c0f8 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 07:35:32 -0800 Subject: [PATCH 32/62] Save: a file comparison waits for another document's dialog and drops a stale file A save waiting for its file comparison now goes on only when no dialog or file picker of another document is open, so writing it does not activate its document under that dialog. While it waits, no frames are requested. A comparison for a file the document no longer uses is dropped and its save canceled, without asking about the old file, and the next Save starts. --- crates/ui-egui/src/io/save.rs | 36 ++++++++++++++- crates/ui-egui/src/tests/save.rs | 76 ++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/io/save.rs b/crates/ui-egui/src/io/save.rs index c09cbe7106..1fb7d89d3a 100644 --- a/crates/ui-egui/src/io/save.rs +++ b/crates/ui-egui/src/io/save.rs @@ -158,7 +158,15 @@ impl Saves { /// Whether file comparisons need another frame to collect their answers. #[cfg(not(target_arch = "wasm32"))] pub(crate) fn checks_pending(app: &VectorcraftApp) -> bool { - !app.saves.checks.is_empty() + // A save waiting for a dialog goes on in the frame that closes the dialog. + app.saves.checks.keys().any(|uid| !under_dialog(app, *uid)) +} + +/// Whether a dialog or file picker of a document other than `uid` is open: writing document +/// `uid`'s save would activate it under the dialog. +#[cfg(not(target_arch = "wasm32"))] +fn under_dialog(app: &VectorcraftApp, uid: u64) -> bool { + app.session.active().map(|d| d.uid) != Some(uid) && (app.any_dialog_open() || app.file_dialog_open()) } /// The web has no file comparisons to collect. @@ -246,12 +254,24 @@ fn resume_checked(app: &mut VectorcraftApp, wait: bool) { let checking: Vec = app.saves.checks.keys().copied().collect(); for uid in checking { // A closed document's save is cancelled with its flow, in [`pump`]. - if !app.session.documents().iter().any(|d| d.uid == uid) { + let Some(file) = app.session.documents().iter().find(|d| d.uid == uid).map(|d| d.path.clone()) else { + continue; + }; + // Writing activates the save's document: while a dialog or file picker of another document + // is open, the answer stays in its channel for a later pass. + if !wait && under_dialog(app, uid) { continue; } let (scope, automated) = app.saves.done.get(&uid).map_or_else(|| (ScopeHandle::capture(), app.automation_asked()), |d| d.asked.clone()); let r = scope.run(|| { file_asks::as_automated(app, automated, |app| { + // The document now uses another file (a Save As finished meanwhile): the comparison + // is dropped and its save cancelled, without asking about the old file. + if app.saves.checks.get(&uid).is_some_and(|c| file.as_deref().map(Path::new) != Some(c.path.as_path())) { + app.saves.checks.remove(&uid); + let step = app.saves.flows.get_mut(&uid).and_then(|f| f.cancel(app.host.files())); + return step.map(|step| run_step(app, uid, step)); + } let (same, path) = app.saves.answer(uid, wait)?; // Still that version: a change made since the comparison is asked about. let Some(stamp) = same.filter(|stamp| FileStamp::at(&path) == Some(*stamp)) else { @@ -278,6 +298,18 @@ pub(crate) fn wait_for_checks(app: &mut VectorcraftApp) { resume_checked(app, true); } +/// Waits for every save's file comparison to answer, leaving each answer for the next [`pump`]. +#[cfg(all(test, not(target_arch = "wasm32")))] +pub(crate) fn wait_for_answers(app: &mut VectorcraftApp) { + for check in app.saves.checks.values_mut() { + let (send, answer) = std::sync::mpsc::channel(); + if let Ok(same) = check.answer.recv() { + let _ = send.send(same); + } + check.answer = answer; + } +} + /// Waits for the active document's baseline digest and compares it with the file. #[cfg(all(test, not(target_arch = "wasm32")))] pub(crate) fn wait_for_contents(app: &VectorcraftApp) -> Option { diff --git a/crates/ui-egui/src/tests/save.rs b/crates/ui-egui/src/tests/save.rs index de7728f9e7..d6c1d0b34d 100644 --- a/crates/ui-egui/src/tests/save.rs +++ b/crates/ui-egui/src/tests/save.rs @@ -649,3 +649,79 @@ fn save_asks_about_a_changed_file_only_when_its_bytes_changed() { assert_eq!(std::fs::read(&path).unwrap(), other, "nothing is written before the answer"); let _ = std::fs::remove_dir_all(d); } + +/// Opens a file saved by another app, with the file then put back (with other bytes of the same +/// length unless `same`), and one more object: File › Save compares the file before it writes. +fn opened_then_put_back(tag: &str, same: bool) -> (std::path::PathBuf, String, VectorcraftApp) { + let d = dir(tag); + let path = d.join("a.vectorcraft").to_string_lossy().to_string(); + let mut writer = app(); + writer.run("file.new", json!({"width": 100, "height": 100})).unwrap(); + rect(&mut writer); + writer.run("file.saveAs", json!({"path": path})).unwrap(); + crate::background::wait_all(&mut writer); + let mut app = app(); + io::open_path(&mut app, &path).unwrap(); + assert!(io::save::wait_for_contents(&app).is_some(), "the opened file's baseline is recorded"); + let mut other = std::fs::read(&path).unwrap(); + if !same { + let last = other.last_mut().unwrap(); + *last ^= 0xff; + } + put_back(&path, &other); + rect(&mut app); + (d, path, app) +} + +/// A comparison that answers after the document took another file does not ask about the old one. +#[test] +fn a_comparison_for_a_file_the_document_no_longer_uses_asks_nothing() { + let (d, path, mut app) = opened_then_put_back("compare-retargeted", false); + assert_eq!(app.run("file.save", json!({})).unwrap()["pending"], "checkingFile"); + let other = d.join("b.vectorcraft").to_string_lossy().to_string(); + app.session.doc_mut().unwrap().path = Some(other.clone()); + let before = std::fs::read(&path).unwrap(); + io::save::wait_for_checks(&mut app); + crate::background::wait_all(&mut app); + let asked = app.any_dialog_open(); + let pending = io::save::checks_pending(&app); + let after = std::fs::read(&path).unwrap(); + // The dropped save freed the flow: the next File › Save writes the new file. + let next = app.run("file.save", json!({})); + crate::background::wait_all(&mut app); + let wrote_new = std::path::Path::new(&other).exists(); + let _ = std::fs::remove_dir_all(d); + assert!(next.is_ok(), "the next save starts: {next:?}"); + assert!(wrote_new, "the next save writes the document's new file"); + assert!(!asked, "no changed-on-disk question about a file the document no longer uses"); + assert!(!pending, "the comparison is dropped"); + assert_eq!(after, before, "the old file is not written"); +} + +/// A comparison that answers while a dialog is open over another document waits for it to close, +/// so the save does not activate its own document under the dialog. +#[test] +fn a_comparison_waits_while_a_dialog_is_open_over_another_document() { + let (d, path, mut app) = opened_then_put_back("compare-under-dialog", true); + let before = std::fs::read(&path).unwrap(); + assert_eq!(app.run("file.save", json!({})).unwrap()["pending"], "checkingFile"); + app.run("file.new", json!({"width": 100, "height": 100})).unwrap(); + let prompt = craft::ui::dialog::StandardPrompt::changed_on_disk("other"); + app.dialogs().unwrap().with(|h| h.open(prompt)); + io::save::wait_for_answers(&mut app); + let ctx = egui::Context::default(); + io::save::pump(&mut app, &ctx); + let active = app.session.active_index(); + let pending = io::save::checks_pending(&app); + let unwritten = std::fs::read(&path).unwrap() == before; + // Once the dialog closes, the save goes on and writes the file. + answer_top(&mut app, false); + io::save::pump(&mut app, &ctx); + crate::background::wait_all(&mut app); + let written = std::fs::read(&path).unwrap() != before; + let _ = std::fs::remove_dir_all(d); + assert_eq!(active, Some(1), "the document under the dialog stays active"); + assert!(!pending, "no frames are asked for while the save waits for the dialog"); + assert!(unwritten, "nothing is written while the dialog is open"); + assert!(written, "the save finishes once the dialog closes"); +} From bd1186eb32ea20fe64d4fbf056fc019f980c70cc Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 07:39:22 -0800 Subject: [PATCH 33/62] Stroke: leave profile reordering and renaming out of the footer change stroke.widthProfile.move, Prefs::width_profile_order, the drag and Move Up/Move Down reordering, stroke.widthProfile.rename and the row menu's Rename item are taken out, along with their tests, so this change holds the drop-down footer alone. Reordering and renaming go to their own pull requests. Dragging a row onto the footer's trash button goes with the row drag. The engine's width profile commands are now the same as on main. A saved row's right-click menu keeps Delete Profile; built-in rows have no menu. --- crates/engine/src/cmd/stroke.rs | 135 ++---------------- crates/engine/src/prefs.rs | 6 - crates/engine/src/tests/widthprofiles.rs | 60 -------- crates/ui-egui/src/panels/stroke.rs | 7 - .../src/panels/stroke/profile_picker.rs | 128 +++-------------- .../ui-egui/src/panels/tests_strokedepth.rs | 54 ++----- 6 files changed, 41 insertions(+), 349 deletions(-) diff --git a/crates/engine/src/cmd/stroke.rs b/crates/engine/src/cmd/stroke.rs index 9b2ad76963..4ee4f01c10 100644 --- a/crates/engine/src/cmd/stroke.rs +++ b/crates/engine/src/cmd/stroke.rs @@ -12,7 +12,7 @@ use vectorcraft_tools::builder::is_live_paint; use super::appearance::{ItemTarget, edit_items, item_target}; use super::paint::{live_paint_parts_skipped, painted}; -use super::{CommandSpec, Result, Session, always, bad, bool_or, cmd, has_doc, index_opt, ok, str_param}; +use super::{CommandSpec, Result, Session, always, bad, bool_or, cmd, has_doc, ok, str_param}; use crate::DocState; use crate::inspect::{ALIGNS, CAPS, JOINS, StrokeMixed, node_stroke, scale_layer}; @@ -77,27 +77,9 @@ pub fn specs() -> Vec { "Reset Profiles", [], None, - "{} remove every saved profile and restore the default order → {removed: count}", - can_reset_profiles, - profile_reset - ), - cmd!( - "stroke.widthProfile.move", - "Move Width Profile", - [], - None, - "{name: profile id or name (not \"uniform\"), to: index among reorderable profiles (0 = first after Uniform, clamped)} reorder a width profile in the Profile list (kept with the preferences) → {order}", - always, - profile_move - ), - cmd!( - "stroke.widthProfile.rename", - "Rename Width Profile", - [], - None, - "{name: saved profile name, to: new name (unique, not a built-in's)} rename a saved width profile → {name}", + "{} remove every saved profile, leaving the built-ins → {removed: count}", has_saved_profiles, - profile_rename + profile_reset ), cmd!( query "stroke.widthProfile.list", @@ -728,37 +710,12 @@ impl ProfileEntry<'_> { } impl Session { - /// The Profile list: Uniform first, then the built-in and saved profiles in [`Prefs::width_profile_order`]. + /// The Profile list: the built-in profiles, then the saved ones. pub fn profile_entries(&self) -> impl Iterator> { - let uniform = WidthProfile::PRESETS[0]; - let uniform = ProfileEntry { id: uniform.id, label: uniform.label, points: uniform.points, built_in: true }; - let candidates: Vec> = WidthProfile::PRESETS[1..] - .iter() - .map(|p| ProfileEntry { id: p.id, label: p.label, points: p.points, built_in: true }) - .chain(self.prefs.width_profiles.iter().map(|p| ProfileEntry { id: &p.name, label: &p.name, points: &p.profile.points, built_in: false })) - .collect(); - let mut out = Vec::with_capacity(1 + candidates.len()); - out.push(uniform); - if self.prefs.width_profile_order.is_empty() { - out.extend(candidates); - } else { - let mut used = vec![false; candidates.len()]; - for id in &self.prefs.width_profile_order { - if id == uniform.id { - continue; - } - if let Some(pos) = candidates.iter().enumerate().position(|(i, e)| !used[i] && e.id == id) { - used[pos] = true; - out.push(candidates[pos]); - } - } - for (i, entry) in candidates.into_iter().enumerate() { - if !used[i] { - out.push(entry); - } - } - } - out.into_iter() + let built_in = WidthProfile::PRESETS.iter().map(|p| ProfileEntry { id: p.id, label: p.label, points: p.points, built_in: true }); + let saved = + self.prefs.width_profiles.iter().map(|p| ProfileEntry { id: &p.name, label: &p.name, points: &p.profile.points, built_in: false }); + built_in.chain(saved) } /// The Profile list row showing `p` (`None`: the plain stroke), if it is listed. @@ -802,23 +759,6 @@ fn has_saved_profiles(s: &Session) -> std::result::Result<(), String> { if s.prefs.width_profiles.is_empty() { Err("no saved profiles".into()) } else { Ok(()) } } -fn can_reset_profiles(s: &Session) -> std::result::Result<(), String> { - if s.prefs.width_profiles.is_empty() && s.prefs.width_profile_order.is_empty() { - Err("no saved profiles".into()) - } else { - Ok(()) - } -} - -/// The default order of reorderable profiles (the built-ins after Uniform, then saved profiles). -fn default_profile_order(s: &Session) -> Vec { - WidthProfile::PRESETS[1..] - .iter() - .map(|p| p.id.to_string()) - .chain(s.prefs.width_profiles.iter().map(|sp| sp.name.clone())) - .collect() -} - fn profile_add(s: &mut Session, p: &Value) -> Result { const C: &str = "stroke.widthProfile.add"; let profile = s.profile_to_add().map_err(|e| bad(C, e))?; @@ -829,9 +769,6 @@ fn profile_add(s: &mut Session, p: &Value) -> Result { Some(n) => n.to_string(), }; s.prefs.width_profiles.push(SavedProfile { name: name.clone(), profile }); - if !s.prefs.width_profile_order.is_empty() && !s.prefs.width_profile_order.iter().any(|id| id == &name) { - s.prefs.width_profile_order.push(name.clone()); - } Ok(json!({ "name": name })) } @@ -850,70 +787,14 @@ fn profile_delete(s: &mut Session, p: &Value) -> Result { } let i = s.prefs.width_profiles.iter().position(|sp| sp.name == name).ok_or_else(|| bad(C, format!("no saved profile called {name}")))?; s.prefs.width_profiles.remove(i); - s.prefs.width_profile_order.retain(|id| id != &name); - if s.prefs.width_profile_order == default_profile_order(s) { - s.prefs.width_profile_order.clear(); - } Ok(json!({ "deleted": name })) } fn profile_reset(s: &mut Session, _: &Value) -> Result { let removed = std::mem::take(&mut s.prefs.width_profiles).len(); - s.prefs.width_profile_order.clear(); Ok(json!({ "removed": removed })) } -fn profile_move(s: &mut Session, p: &Value) -> Result { - const C: &str = "stroke.widthProfile.move"; - let name = str_param(p, "name").ok_or_else(|| bad(C, "missing name"))?; - let to = index_opt(p, "to", C)?.ok_or_else(|| bad(C, "missing `to` (an index)"))?; - let uniform = WidthProfile::PRESETS[0]; - if name == uniform.id || name.eq_ignore_ascii_case(uniform.label) { - return Err(bad(C, "Uniform stays first and can't be moved")); - } - let mut order: Vec = s.profile_entries().skip(1).map(|e| e.id.to_string()).collect(); - let from = order.iter().position(|id| id == name).ok_or_else(|| bad(C, format!("no width profile called {name}")))?; - if !order.is_empty() { - let to = to.min(order.len() - 1); - if from != to { - let item = order.remove(from); - order.insert(to, item); - } - } - if order == default_profile_order(s) { - s.prefs.width_profile_order.clear(); - } else { - s.prefs.width_profile_order = order.clone(); - } - Ok(json!({ "order": order })) -} - -fn profile_rename(s: &mut Session, p: &Value) -> Result { - const C: &str = "stroke.widthProfile.rename"; - let name = str_param(p, "name").ok_or_else(|| bad(C, "missing name"))?; - let to = str_param(p, "to").map(str::trim).ok_or_else(|| bad(C, "missing `to`"))?; - if to.is_empty() { - return Err(bad(C, "the name is empty")); - } - if WidthProfile::PRESETS.iter().any(|b| b.id == name || b.label == name) { - return Err(bad(C, format!("{name} is built in and can't be renamed"))); - } - if WidthProfile::PRESETS.iter().any(|b| b.id.eq_ignore_ascii_case(to) || b.label.eq_ignore_ascii_case(to)) { - return Err(bad(C, format!("a profile is already called {to}"))); - } - let i = s.prefs.width_profiles.iter().position(|sp| sp.name == name).ok_or_else(|| bad(C, format!("no saved profile called {name}")))?; - if !to.eq_ignore_ascii_case(name) && s.profile_name_taken(to) { - return Err(bad(C, format!("a profile is already called {to}"))); - } - s.prefs.width_profiles[i].name = to.to_string(); - for id in &mut s.prefs.width_profile_order { - if id == name { - *id = to.to_string(); - } - } - Ok(json!({ "name": to })) -} - fn profile_list(s: &mut Session, _: &Value) -> Result { let profiles: Vec = s .profile_entries() diff --git a/crates/engine/src/prefs.rs b/crates/engine/src/prefs.rs index 34b25acb28..0cb1cf613f 100644 --- a/crates/engine/src/prefs.rs +++ b/crates/engine/src/prefs.rs @@ -373,11 +373,6 @@ pub struct Prefs { /// Preferences dialog field, so it has no [`cmd::prefscmds::PREF_SPECS`] row. #[serde(skip_serializing_if = "Vec::is_empty")] pub width_profiles: Vec, - /// Display order of non-uniform width profiles (`stroke.widthProfile.move`), holding built-in - /// ids and saved profile names. Empty means default order (built-ins then saved). Not a - /// Preferences dialog field, so resetting preferences keeps it. - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub width_profile_order: Vec, /// General → Use Japanese Crop Marks: the style of Create Trim Marks and Effect → Crop Marks. pub japanese_crop_marks: bool, /// Appearance panel → New Art Has Basic Appearance (on): new art takes one fill and stroke; @@ -737,7 +732,6 @@ impl Default for Prefs { trace_presets: vec![], gradient_presets: vec![], width_profiles: vec![], - width_profile_order: vec![], japanese_crop_marks: false, new_art_basic: true, color_themes: vec![], diff --git a/crates/engine/src/tests/widthprofiles.rs b/crates/engine/src/tests/widthprofiles.rs index 3fc2fb4ae3..fe041dae43 100644 --- a/crates/engine/src/tests/widthprofiles.rs +++ b/crates/engine/src/tests/widthprofiles.rs @@ -138,63 +138,3 @@ fn every_built_in_applies_and_the_params_doc_names_them() { assert_eq!(profile(&s, id).map(|w| w.points), (p.id != "uniform").then(|| p.points.to_vec())); } } - -#[test] -fn move_reorders_presets_and_saved_profiles_while_keeping_uniform_pinned() { - let mut s = Session::new(); - s.execute("file.new", &json!({"width": 400, "height": 400})).unwrap(); - let id = s.execute("shape.rectangle", &json!({"x": 20, "y": 20, "width": 100, "height": 80})).unwrap()["id"].as_u64().unwrap(); - s.execute("stroke.set", &json!({"weight": 6.0})).unwrap(); - s.execute("stroke.widthPoint.set", &json!({"id": id, "t": 0.35, "left": 12.0, "right": 3.0})).unwrap(); - s.execute("stroke.widthProfile.add", &json!({"name": "Alpha"})).unwrap(); - s.execute("stroke.widthPoint.set", &json!({"id": id, "t": 0.7, "left": 2.0, "right": 14.0})).unwrap(); - s.execute("stroke.widthProfile.add", &json!({"name": "Beta"})).unwrap(); - - // Uniform cannot be moved, even when named by display label. - assert!(s.execute("stroke.widthProfile.move", &json!({"name": "uniform", "to": 2})).is_err()); - assert!(s.execute("stroke.widthProfile.move", &json!({"name": "Uniform", "to": 1})).is_err()); - - // Moving a built-in ("wave") and a saved profile ("Beta") puts them at exact slots after Uniform. - s.execute("stroke.widthProfile.move", &json!({"name": "wave", "to": 0})).unwrap(); - s.execute("stroke.widthProfile.move", &json!({"name": "Beta", "to": 0})).unwrap(); - - let ids: Vec = s.profile_entries().map(|e| e.id.to_owned()).collect(); - assert_eq!(ids[0], "uniform", "Uniform stays pinned first"); - assert_eq!(ids[1], "Beta", "saved profile moves right after Uniform"); - assert_eq!(ids[2], "wave", "built-in preset moves after Beta"); - - // Order survives preferences JSON round-trip. - let saved_prefs = serde_json::to_string(&s.prefs).unwrap(); - let mut restored = Session::new(); - restored.prefs = serde_json::from_str(&saved_prefs).unwrap(); - let restored_ids: Vec = restored.profile_entries().map(|e| e.id.to_owned()).collect(); - assert_eq!(restored_ids, ids); - - // Reset works even if only built-ins were reordered (no saved profiles). - let mut built_ins_only = Session::new(); - built_ins_only.execute("stroke.widthProfile.move", &json!({"name": "wave", "to": 0})).unwrap(); - assert!(built_ins_only.execute("stroke.widthProfile.reset", &json!({})).is_ok()); - let default_ids: Vec = built_ins_only.profile_entries().map(|e| e.id.to_owned()).collect(); - assert_eq!(default_ids, vec!["uniform", "lens", "taperStart", "taperEnd", "pinch", "teardrop", "wave"]); -} - -#[test] -fn rename_updates_saved_profile_in_place_and_refuses_built_ins() { - let mut s = Session::new(); - s.execute("file.new", &json!({"width": 400, "height": 400})).unwrap(); - let id = s.execute("shape.rectangle", &json!({"x": 20, "y": 20, "width": 100, "height": 80})).unwrap()["id"].as_u64().unwrap(); - s.execute("stroke.set", &json!({"weight": 6.0})).unwrap(); - s.execute("stroke.widthPoint.set", &json!({"id": id, "t": 0.35, "left": 12.0, "right": 3.0})).unwrap(); - s.execute("stroke.widthProfile.add", &json!({"name": "Alpha"})).unwrap(); - s.execute("stroke.widthProfile.move", &json!({"name": "Alpha", "to": 1})).unwrap(); - - assert!(s.execute("stroke.widthProfile.rename", &json!({"name": "uniform", "to": "Other"})).is_err()); - assert!(s.execute("stroke.widthProfile.rename", &json!({"name": "lens", "to": "Other"})).is_err()); - assert!(s.execute("stroke.widthProfile.rename", &json!({"name": "Alpha", "to": " "})).is_err()); - assert!(s.execute("stroke.widthProfile.rename", &json!({"name": "Alpha", "to": "Wave"})).is_err()); - - s.execute("stroke.widthProfile.rename", &json!({"name": "Alpha", "to": "Renamed"})).unwrap(); - let ids: Vec = s.profile_entries().map(|e| e.id.to_owned()).collect(); - assert_eq!(ids[0], "uniform"); - assert_eq!(ids[2], "Renamed", "renamed profile keeps its custom slot"); -} diff --git a/crates/ui-egui/src/panels/stroke.rs b/crates/ui-egui/src/panels/stroke.rs index aa24d8b902..028f07e83a 100644 --- a/crates/ui-egui/src/panels/stroke.rs +++ b/crates/ui-egui/src/panels/stroke.rs @@ -921,7 +921,6 @@ pub(crate) fn profile_select(app: &mut VectorcraftApp, ui: &mut Ui) { && brushed != Some(true) && crate::menus::enabled(app, "stroke.widthProfile.delete"), can_reset: crate::menus::enabled(app, "stroke.widthProfile.reset"), - can_reorder: brushed != Some(true), }; let select = ProfileSelect::new(tl!("Profile"), Bind::given(picked), entries, paint_profile, actions); let select = match unlisted { @@ -954,12 +953,6 @@ fn apply_profile_action(app: &mut VectorcraftApp, action: ProfileAction) { ProfileAction::Reset => { crate::dialogs::confirm::ask(app, tl!("Do you want to reset profiles?"), "", "stroke.widthProfile.reset", json!({})); } - ProfileAction::Move { name, to } => { - crate::menus::invoke(app, "stroke.widthProfile.move", json!({"name": name, "to": to})); - } - ProfileAction::Rename { name, to } => { - crate::menus::invoke(app, "stroke.widthProfile.rename", json!({"name": name, "to": to})); - } } } diff --git a/crates/ui-egui/src/panels/stroke/profile_picker.rs b/crates/ui-egui/src/panels/stroke/profile_picker.rs index 94157802bc..2768b816d4 100644 --- a/crates/ui-egui/src/panels/stroke/profile_picker.rs +++ b/crates/ui-egui/src/panels/stroke/profile_picker.rs @@ -1,7 +1,7 @@ //! The Variable Width Profile dropdown (`ProfileSelect`): a combo box whose popup shows the width -//! profile list with drag/keyboard reordering (keeping Uniform pinned first), built-in labels and -//! captionless user-added thumbnails, right-click row actions, and a footer bar with Add to -//! Profiles…, Delete Profile, and Reset Profiles. +//! profile list with built-in labels and captionless user-added thumbnails, a right-click Delete +//! Profile on saved rows, and a footer bar with Add to Profiles…, Delete Profile, and Reset +//! Profiles. use std::borrow::Cow; use std::collections::HashSet; @@ -9,14 +9,14 @@ use std::collections::HashSet; use craft::behavior::nav::{StepResult, ValueAxes, ValueSteps}; use craft::behavior::overlay::MinWidth; use craft::behavior::{ - CancelReason, ColumnKey, ColumnWidth, DisplayOrder, EditEvent, GesturePhase, HitLevel, HitPriority, IconId, ItemSource, Metrics, NavMove, - PartKey, Proposal, Selection, Sense, TypeAhead, WheelPhase, wheel_step, + CancelReason, ColumnKey, ColumnWidth, DisplayOrder, GesturePhase, HitLevel, HitPriority, IconId, ItemSource, Metrics, NavMove, PartKey, + Proposal, Selection, Sense, TypeAhead, WheelPhase, wheel_step, }; use craft::ui::contract::overlay::OverlayFit; use craft::ui::contract::{ Access, ActivateOn, Bind, BindMut, CollectionEvent, ColumnSpec, Common, Component, Cx, Edit as _, EditResponse, Focus as _, HoverLead, Input, - LeadOnOpen, LeadSource, ListDrag, MeasureCx, Outcome, Overlay, OverlayUi, Overlays as _, PaintUi, PartsCx, Pointer as _, Popup, PopupHandle, - Props, ReorderRule, Role, Show as _, ShowCollection as _, ShowContainer as _, WordSetCx as _, request_rename, + LeadOnOpen, LeadSource, MeasureCx, Outcome, Overlay, OverlayUi, Overlays as _, PaintUi, PartsCx, Pointer as _, Popup, PopupHandle, Props, Role, + Show as _, ShowCollection as _, ShowContainer as _, WordSetCx as _, }; use craft::ui::layout_components::Stack; use craft::ui::list::{List, ListRow, RowEvent, ThumbAspect, ThumbSize}; @@ -31,7 +31,6 @@ use craft::ui::sections::{FooterAction, FooterBar}; use craft::ui::style::{ComponentStyle, StyleCx, SurfaceLook}; use egui::{Rect, Response, Vec2}; -const UNIFORM_ID: &str = "uniform"; const PROFILE_COL: ColumnKey = ColumnKey::new("profile"); const DROPDOWN_MIN_WIDTH: f32 = 132.0; const CLOSED_MAX_WIDTH: f32 = 145.0; @@ -55,10 +54,6 @@ impl ProfileRowKey { ProfileRowKey::Separator => None, } } - - fn is_reorderable(&self) -> bool { - self.profile().is_some_and(|id| id != UNIFORM_ID) - } } /// One silhouette sample `(t, left_offset, right_offset)` returned by `stroke::silhouette`. @@ -135,27 +130,24 @@ pub(super) struct ProfileOption { pub label: String, /// Profile silhouette samples (`None` for Uniform). pub points: Option>, - /// Built-in profiles keep their text captions in the dropdown and cannot be renamed. + /// Built-in profiles keep their text captions in the dropdown and cannot be deleted. pub built_in: bool, } -/// Enable state for the management controls inside the dropdown footer and row menu. +/// Enable state for the management controls inside the dropdown footer. #[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] pub(super) struct ProfileActions { pub can_add: bool, pub can_delete: bool, pub can_reset: bool, - pub can_reorder: bool, } -/// A management action requested by the dropdown footer, row menu, drag-reorder, or inline rename. +/// A management action requested by the dropdown footer or a saved row's menu. #[derive(Clone, Debug, PartialEq, Eq)] pub(super) enum ProfileAction { Add, Delete(Option), Reset, - Move { name: String, to: usize }, - Rename { name: String, to: String }, } /// Output of [`ProfileSelect`]: the underlying profile pick/preview edit and any management action. @@ -453,8 +445,7 @@ impl Component for ProfileSelect { cx.memory::().reveal_on_open.take().or_else(|| fresh.then(|| current.clone()).flatten()).map(ProfileRowKey::Profile); let selection = current.as_ref().map_or_else(Selection::default, |id| Selection::single(ProfileRowKey::Profile(id.clone()))); let saved: HashSet = self.entries.iter().filter(|e| !e.built_in).map(|e| e.id.clone()).collect(); - let can_reorder = self.actions.can_reorder && self.has_separator(); - let view = PopupView { list_id, selection: &selection, reveal: reveal.as_ref(), saved: &saved, can_reorder }; + let view = PopupView { list_id, selection: &selection, reveal: reveal.as_ref(), saved: &saved }; let body_out = ui.show(popup, overlay, |ui, _| show_popup_body(ui, cx, self, view)); @@ -511,24 +502,6 @@ impl ProfileSelect { cx.memory::().previewed = false; popup.close(cx); } - CollectionEvent::Reorder(EditEvent::Set { after, .. } | EditEvent::Commit { after, .. }) => { - if let ProfileRowKey::Profile(key) = &after.key - && key != UNIFORM_ID - { - self.action = Some(ProfileAction::Move { name: key.clone(), to: after.to.saturating_sub(2) }); - } - } - CollectionEvent::Rename(edit) => { - let ended = matches!(edit.phase(), Some(GesturePhase::Commit) | None); - if let Some(rename) = edit.value().filter(|_| ended) - && let ProfileRowKey::Profile(key) = &rename.key - { - let trimmed = rename.name.trim(); - if !trimmed.is_empty() && trimmed != key { - self.action = Some(ProfileAction::Rename { name: key.clone(), to: trimmed.to_owned() }); - } - } - } _ => {} } } @@ -541,7 +514,6 @@ struct PopupView<'a> { selection: &'a Selection, reveal: Option<&'a ProfileRowKey>, saved: &'a HashSet, - can_reorder: bool, } fn show_popup_body( @@ -563,10 +535,9 @@ fn show_popup_body( Stack::new() .fill_width() .footer(|ui, _| { - footer_action = show_footer(ui, view.list_id, actions, view.saved); + footer_action = show_footer(ui, actions); }) .show(ui, |ui, _| { - let saved_for_rename = view.saved.clone(); let mut list = List::::options(label.clone()) .id(view.list_id) .header(false) @@ -574,15 +545,7 @@ fn show_popup_body( .hover_lead(HoverLead::Lead) .activate(ActivateOn::Click) .lead_on_open(LeadOnOpen::First) - .selection(Bind::given(view.selection.clone())) - .can_rename(move |key: &ProfileRowKey| key.profile().is_some_and(|id| saved_for_rename.contains(id))); - - if view.can_reorder { - list = list - .can_drag(|key: &ProfileRowKey| key.is_reorderable()) - .reorder(ReorderRule::new()) - .accepts(|drag, _, insert| drag.keys.iter().all(ProfileRowKey::is_reorderable) && insert >= 2); - } + .selection(Bind::given(view.selection.clone())); if let Some(key) = view.reveal { list = list.reveal(key.clone()); } @@ -615,40 +578,28 @@ fn show_popup_body( let list_response = list_resp.unwrap_or_else(|| ui.response().clone()); for event in &events { + // Only a saved row has a menu: its one item deletes it, and a built-in can't be deleted. if let CollectionEvent::ContextMenu(request) = event && let Some(id) = request.key.profile() + && view.saved.contains(id) { cx.memory::().menu = Some(id.to_owned()); } } - let menu_action = show_row_menu(ui, cx, picker, view.list_id, &list_response, view.saved); + let menu_action = show_row_menu(ui, cx, picker, &list_response); (events, footer_action, menu_action) } -fn show_footer(ui: &mut egui::Ui, list_id: egui::Id, actions: ProfileActions, saved: &HashSet) -> Option { - // Only saved profiles can be deleted; the built-in ones stay in the list. - let droppable = saved.clone(); - let is_saved = move |key: &ProfileRowKey| key.profile().is_some_and(|id| droppable.contains(id)); +fn show_footer(ui: &mut egui::Ui, actions: ProfileActions) -> Option { // End-edge placement lays out actions from the right edge inward, so index 0 (`Reset Profiles`) // sits rightmost, with `Delete Profile` and `Add to Profiles` to its left. let bar = FooterBar::actions([ FooterAction::new(IconId::new("rotate-ccw"), tl!("Reset Profiles")).enabled(actions.can_reset), - FooterAction::new(IconId::new("trash-2"), tl!("Delete Profile")) - .enabled(actions.can_delete) - .takes_drops_disabled(true) - .drop_hint(tl!("Delete Profile")) - .accepts_drops::>(move |drag| drag.list == list_id && drag.keys.iter().any(&is_saved)), + FooterAction::new(IconId::new("trash-2"), tl!("Delete Profile")).enabled(actions.can_delete), FooterAction::new(IconId::new("dc-new-item"), tl!("Add to Profiles")).enabled(actions.can_add), ]) .show_footer(ui); - if let Some(drop) = &bar.dropped - && drop.index == 1 - && let Some(id) = drop.payload::>().and_then(|d| d.keys.iter().find_map(ProfileRowKey::profile)) - && saved.contains(id) - { - return Some(ProfileAction::Delete(Some(id.to_owned()))); - } match bar.picked { Some(0) => Some(ProfileAction::Reset), Some(1) => Some(ProfileAction::Delete(None)), @@ -657,56 +608,21 @@ fn show_footer(ui: &mut egui::Ui, list_id: egui::Id, actions: ProfileActions, sa } } -fn show_row_menu( - ui: &mut egui::Ui, - cx: &mut Cx<'_, ProfileSelect>, - picker: &ProfileSelect, - list_id: egui::Id, - anchor: &Response, - saved: &HashSet, -) -> Option { +fn show_row_menu(ui: &mut egui::Ui, cx: &mut Cx<'_, ProfileSelect>, picker: &ProfileSelect, anchor: &Response) -> Option { let target = cx.memory::().menu.clone()?; - let Some(entry) = picker.option(&target) else { + let Some(entry) = picker.option(&target).filter(|e| !e.built_in) else { cx.memory::().menu = None; return None; }; let title = entry.label.clone(); - let is_uniform = target == UNIFORM_ID; - let is_saved = saved.contains(&target); - let pos = picker.entries.iter().position(|e| e.id == target).unwrap_or(0); - let last = picker.entries.len().saturating_sub(1); - let can_up = !is_uniform && picker.actions.can_reorder && pos > 1; - let can_down = !is_uniform && picker.actions.can_reorder && pos < last; let mut action = None; - let mut start_rename = false; let shown = Menu::context(title, anchor).show(ui, |ui, _| { - if is_uniform { - if MenuItem::new(tl!("Reset Profiles")).enabled(picker.actions.can_reset).show(ui).ran { - action = Some(ProfileAction::Reset); - } - return; - } - if MenuItem::new(tl!("Move Up")).enabled(can_up).show(ui).ran { - // `entries[1..]` holds reorderable items, so removing `target` at `pos - 1` and placing - // it one slot earlier targets `pos - 2`. - action = Some(ProfileAction::Move { name: target.clone(), to: pos.saturating_sub(2) }); - } - if MenuItem::new(tl!("Move Down")).enabled(can_down).show(ui).ran { - // After removing `target` at `pos - 1`, placing it one slot later targets `pos`. - action = Some(ProfileAction::Move { name: target.clone(), to: pos }); - } - if is_saved && MenuItem::new(tl!("Rename…")).show(ui).ran { - start_rename = true; - } - if is_saved && MenuItem::new(tl!("Delete Profile")).show(ui).ran { + if MenuItem::new(tl!("Delete Profile")).show(ui).ran { action = Some(ProfileAction::Delete(Some(target.clone()))); } }); - if start_rename { - request_rename(ui, list_id, &ProfileRowKey::Profile(target)); - } - if action.is_some() || start_rename || shown.closed.is_some() { + if action.is_some() || shown.closed.is_some() { cx.memory::().menu = None; } action diff --git a/crates/ui-egui/src/panels/tests_strokedepth.rs b/crates/ui-egui/src/panels/tests_strokedepth.rs index cb53a78f9a..88d5959022 100644 --- a/crates/ui-egui/src/panels/tests_strokedepth.rs +++ b/crates/ui-egui/src/panels/tests_strokedepth.rs @@ -325,7 +325,6 @@ fn arrowhead_select_lists_the_notched_arrow_after_arrow() { fn dropdown_footer_manages_profiles_and_confirms_reset() { use craft::ui::contract::Role; use craft::ui::dialog::StackDialog as _; - use egui::Modifiers; let mut session = vectorcraft_engine::Session::new(); session.execute("file.new", &serde_json::json!({"width": 400, "height": 400})).unwrap(); @@ -368,21 +367,6 @@ fn dropdown_footer_manages_profiles_and_confirms_reset() { assert!(popup_captions.is_empty(), "user-added profile shows no caption text in the pulldown: {popup_captions:?}"); assert!(!panel.painted("Wave").is_empty(), "built-in profile still shows its caption text"); - // Dragging a user-added profile row reorders it past built-in profiles while keeping Uniform first. - let wave_rect = panel.rect("Wave"); - let saved_rect = panel.rect(&saved_label); - let top_target = wave_rect.left_top() + egui::vec2(wave_rect.width() * 0.75, 2.0); - panel.drag_between(saved_rect.center(), top_target, Modifiers::NONE); - let order_after_drag: Vec = panel.app().session.profile_entries().map(|e| e.id.to_owned()).collect(); - let saved_pos = order_after_drag.iter().position(|id| id == &saved_label).unwrap(); - let wave_pos = order_after_drag.iter().position(|id| id == "wave").unwrap(); - assert_eq!(order_after_drag[0], "uniform", "Uniform stays first after drag reorder"); - assert!( - saved_pos < wave_pos, - "custom profile reordered ahead of Wave by dragging (saved_rect={saved_rect:?}, wave_rect={wave_rect:?}, open_after={}): {order_after_drag:?}", - panel.shows("Reset Profiles") - ); - // No three-dot menu buttons appear next to any profile row. assert!(!panel.shows("More (Uniform)")); assert!(!panel.shows("More (Wave)")); @@ -419,7 +403,7 @@ fn dropdown_footer_manages_profiles_and_confirms_reset() { } #[test] -fn dropdown_reordering_moves_presets_via_row_menu_and_keeps_uniform_pinned() { +fn dropdown_row_menu_deletes_saved_profiles_only() { use craft::ui::contract::Role; let mut session = vectorcraft_engine::Session::new(); @@ -431,36 +415,20 @@ fn dropdown_reordering_moves_presets_via_row_menu_and_keeps_uniform_pinned() { let app = crate::VectorcraftApp::new(session, Default::default()); let mut panel = crate::tests::panel_harness::Panel::new(app, super::stroke::profile_select); - - assert!(panel.rect("Profile").width() <= 165.0, "closed dropdown shrinks to compact width: {:?}", panel.rect("Profile")); panel.click_role("Profile", Role::COMBO_BOX); - // Uniform's context menu only exposes Reset Profiles and never offers Move Up / Move Down. - panel.secondary_click("Uniform"); - assert!(panel.shows_role("Reset Profiles", Role::MENU_ITEM), "Uniform menu shows Reset Profiles"); - assert!(!panel.shows("Move Up"), "Uniform cannot move up"); - assert!(!panel.shows("Move Down"), "Uniform cannot move down"); - assert!(!panel.shows_role("Delete Profile", Role::MENU_ITEM), "Uniform cannot be deleted"); - panel.key(egui::Key::Escape, egui::Modifiers::NONE); + // A built-in row offers no Delete Profile. + for built_in in ["Uniform", "Wave"] { + panel.secondary_click(built_in); + assert!(!panel.shows_role("Delete Profile", Role::MENU_ITEM), "{built_in} can't be deleted"); + } - // Moving saved profile "Mine" up moves it ahead of Wave while leaving Uniform at index 0. + // A saved row's menu deletes it. panel.secondary_click("Mine"); - assert!(panel.shows_role("Rename…", Role::MENU_ITEM), "saved profile exposes Rename…"); - assert!(panel.shows_role("Delete Profile", Role::MENU_ITEM), "saved profile exposes Delete Profile"); - panel.click("Move Up"); - - let ids: Vec = panel.app().session.profile_entries().map(|e| e.id.to_owned()).collect(); - assert_eq!(ids[0], "uniform", "Uniform remains pinned first after reordering"); - assert_eq!(ids[ids.len() - 2], "Mine", "Mine moves up one slot before Wave"); - - // Move built-in "Wave" up past "Mine" too. - panel.secondary_click("Wave"); - panel.click("Move Up"); - let ids_after: Vec = panel.app().session.profile_entries().map(|e| e.id.to_owned()).collect(); - assert_eq!(ids_after[0], "uniform"); - let wave_pos = ids_after.iter().position(|id| id == "wave").unwrap(); - let mine_pos = ids_after.iter().position(|id| id == "Mine").unwrap(); - assert!(wave_pos < mine_pos, "built-in preset reorders past saved profile: {ids_after:?}"); + assert!(panel.shows_role("Delete Profile", Role::MENU_ITEM), "a saved profile offers Delete Profile"); + panel.click_menu_item("Delete Profile"); + assert!(!panel.app().session.profile_entries().any(|e| e.id == "Mine"), "the saved profile is deleted"); + assert!(panel.app().session.profile_entries().any(|e| e.id == "wave"), "the built-ins stay"); } #[test] From 305ab4d21f2064685d93246c3b8d1a505ec65286 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 07:40:41 -0800 Subject: [PATCH 34/62] Stroke: the drop-down's Add to Profiles asks for a name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The footer's Add to Profiles saved the profile at once as "Width Profile N". It now opens the same name dialog as the Stroke panel's menu item Add to Profiles…, as on main, and saves nothing until OK. --- crates/ui-egui/src/panels/stroke.rs | 13 +++++++++---- crates/ui-egui/src/panels/tests_strokedepth.rs | 18 +++++++++++++++--- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/crates/ui-egui/src/panels/stroke.rs b/crates/ui-egui/src/panels/stroke.rs index 028f07e83a..18c6e872b2 100644 --- a/crates/ui-egui/src/panels/stroke.rs +++ b/crates/ui-egui/src/panels/stroke.rs @@ -941,8 +941,10 @@ pub(crate) fn profile_select(app: &mut VectorcraftApp, ui: &mut Ui) { fn apply_profile_action(app: &mut VectorcraftApp, action: ProfileAction) { match action { + // Asks for the new profile's name, as the ≡ menu's Add to Profiles… does. ProfileAction::Add => { - crate::menus::invoke(app, "stroke.widthProfile.add", json!({"name": app.session.next_profile_name()})); + let params = add_profile_params(app); + crate::menus::invoke(app, "ui.paramDialog", params); } ProfileAction::Delete(Some(name)) => { crate::menus::invoke(app, "stroke.widthProfile.delete", json!({"name": name})); @@ -956,11 +958,14 @@ fn apply_profile_action(app: &mut VectorcraftApp, action: ProfileAction) { } } +/// The `ui.paramDialog` params that ask for the name of a new saved profile. +fn add_profile_params(app: &VectorcraftApp) -> Value { + json!({"command": "stroke.widthProfile.add", "label": "Variable Width Profile", "params": {"name": app.session.next_profile_name()}}) +} + /// The command a ≡ menu row runs to ask for the name of a new saved profile. fn add_profile(app: &VectorcraftApp) -> CommandRef { - let params = - json!({"command": "stroke.widthProfile.add", "label": "Variable Width Profile", "params": {"name": app.session.next_profile_name()}}); - CommandRef::with_params("ui.paramDialog", params) + CommandRef::with_params("ui.paramDialog", add_profile_params(app)) } /// The rows of the Stroke panel's ≡ menu; their titles and enabled flags come from [`menu_states`]. diff --git a/crates/ui-egui/src/panels/tests_strokedepth.rs b/crates/ui-egui/src/panels/tests_strokedepth.rs index 88d5959022..b5edd967d4 100644 --- a/crates/ui-egui/src/panels/tests_strokedepth.rs +++ b/crates/ui-egui/src/panels/tests_strokedepth.rs @@ -354,14 +354,26 @@ fn dropdown_footer_manages_profiles_and_confirms_reset() { panel.click_role("Profile", Role::COMBO_BOX); assert!(!panel.enabled("Delete Profile"), "Uniform profile cannot be deleted"); - // Custom profile: clicking Add to Profiles saves immediately without opening a name dialog, - // and user-added rows hide their text captions in the dropdown. + // Custom profile: Add to Profiles asks for a name and saves the profile under it, and user-added rows hide + // their text captions in the dropdown. panel.app().session.execute("stroke.widthPoint.set", &serde_json::json!({"id": id, "t": 0.35, "left": 12.0, "right": 3.0})).unwrap(); panel.frame(); assert_eq!(panel.value_role("Profile", Role::COMBO_BOX).as_deref(), Some("Custom")); panel.click("Add to Profiles"); - assert!(crate::tests::picks::open_dialogs(&panel.app()).is_empty(), "Add to Profiles does not prompt for a name"); + assert!(panel.app().session.prefs.width_profiles.is_empty(), "Add to Profiles saves nothing before the name is given"); + { + let mut app = panel.app(); + let dialog = crate::tests::picks::open_dialogs(&app).first().map(|d| d.id).expect("Add to Profiles asks for a name"); + crate::tests::picks::answer_dialog(&mut app, dialog, &[("name", serde_json::json!("Ribbon"))], true); + } + panel.frame(); let saved_label = panel.app().session.profile_entries().find(|e| !e.built_in).map(|e| e.label.to_owned()).unwrap(); + assert_eq!(saved_label, "Ribbon", "the profile is saved under the name given"); + // The name dialog may have closed the list on taking focus; the checks below read the open list. + if !panel.shows("Reset Profiles") { + panel.click_role("Profile", Role::COMBO_BOX); + } + assert!(panel.enabled("Delete Profile"), "the saved profile the stroke uses can be deleted"); let face_rect = panel.rect("Profile"); let popup_captions: Vec<_> = panel.painted(&saved_label).into_iter().filter(|r| !face_rect.contains(r.center())).collect(); assert!(popup_captions.is_empty(), "user-added profile shows no caption text in the pulldown: {popup_captions:?}"); From 5ae988ea753af2364a75b679eeb26972ad7f9e60 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 07:49:02 -0800 Subject: [PATCH 35/62] Paste: copied files are read before the late paste's bitmap check When a late text read answers and the Copy made here was a bitmap, Paste read the bitmap to compare before it read copied files. A bitmap read that got no answer left the worker busy, so the files' read failed at once and an art-file list on the clipboard was not pasted. Paste now reads copied files first whenever the ownership check needs a read of its own, since a Copy made here writes no files. The doc comment on Ours now states that a bitmap is known by its size, as Clipboard::owns already compares it, and the test covers a same-size bitmap from another app. --- apps/vectorcraft/src/clipboard.rs | 69 ++++++++++++++++++++++++------- 1 file changed, 55 insertions(+), 14 deletions(-) diff --git a/apps/vectorcraft/src/clipboard.rs b/apps/vectorcraft/src/clipboard.rs index 0bacc71eb9..c19d993768 100644 --- a/apps/vectorcraft/src/clipboard.rs +++ b/apps/vectorcraft/src/clipboard.rs @@ -1019,7 +1019,8 @@ mod portable { /// What our last write put on the clipboard, for a read answered late ([`Unanswered::paste`]): a /// paste does not take what this app copied. Whether the clipboard still holds a copy is - /// [`Clipboard::owns`](ClipboardBackend::owns). + /// [`Clipboard::owns`](ClipboardBackend::owns). A bitmap is known by its size alone, so another + /// app's bitmap of the same size counts as the Copy made here. #[derive(Clone)] enum Ours { Text(String), @@ -1205,7 +1206,8 @@ mod portable { /// the same read is made again, since the clipboard may have changed hands meanwhile. /// `None`, so the paste takes the internal clipboard, when that answer doesn't come or the /// clipboard, read as `ours` was written (its text or its bitmap), holds what `ours` put - /// there. Otherwise the clipboard is read as + /// there; when that takes a read of its own, copied files are read before it. Otherwise + /// the clipboard is read as /// [`Clipboard::read_now_or_later`] and the paste read it, the new answer standing in for /// the read it answers: copied files, else /// text, else the bitmap, and the bitmap when it is asked for and the text is blank or only @@ -1221,7 +1223,7 @@ mod portable { .unwrap_or_else(|why| Answer::failed(request, why)) }; // The late answer may come from an app that lost the clipboard while it was awaited. - let answer = fresh(self.request); + let mut answer = Some(fresh(self.request)); // The Copy made here is read as it was written, whatever the late read was: a Copy's // text read that answers late leaves a bitmap Copy with no text to compare. let written = match ours { @@ -1229,21 +1231,31 @@ mod portable { Some(Ours::Image(..)) => Some(Request::Image), None => None, }; - let mut check = written.filter(|w| *w != answer.request()).map(fresh); - let held = match (check.as_ref().unwrap_or(&answer), ours) { - (Answer::Text(Ok(now)), Some(Ours::Text(t))) => now == t, - (Answer::Image(Ok(now)), Some(Ours::Image(w, h))) => (now.width, now.height) == (*w, *h), + let mut check = None; + let mut files_read = false; + if let Some(written) = written.filter(|w| answer.as_ref().is_some_and(|a| a.request() != *w)) { + // Copied files are read first: a Copy made here writes none, and a read of the + // Copy's format that gets no answer leaves the worker busy for the files' read. + let files = answer.take_if(|a| a.request() == Request::Files).unwrap_or_else(|| fresh(Request::Files)); + if let Some(f) = copied_file(files.files(), mimes) { + return Some(f); + } + files_read = true; + check = Some(fresh(written)); + } + let held = match (check.as_ref().or(answer.as_ref()), ours) { + (Some(Answer::Text(Ok(now))), Some(Ours::Text(t))) => now == t, + (Some(Answer::Image(Ok(now))), Some(Ours::Image(w, h))) => (now.width, now.height) == (*w, *h), _ => false, }; if held { return None; } - let mut answer = Some(answer); let mut read = |request: Request| match answer.take_if(|a| a.request() == request).or_else(|| check.take_if(|a| a.request() == request)) { Some(answer) => answer, None => fresh(request), }; - if let Some(f) = copied_file(read(Request::Files).files(), mimes) { + if !files_read && let Some(f) = copied_file(read(Request::Files).files(), mimes) { return Some(f); } let text = if mimes.contains(&TEXT) { read(Request::Text).text().ok().filter(|t| !t.is_empty()) } else { None }; @@ -2095,9 +2107,9 @@ mod portable { // A Copy reads the clipboard's text first; when that read gets no answer in its wait, the // Copy's art goes out as a `width`×1 bitmap with no text (a placed photo too large for // the SVG markup to go out as text). The paste then waits for the text read's answer. - let paste_after_copy = |width: usize| { + let paste_after_copy = |width: usize, fill: u8| { let (mut cb, release) = slow_owner(move |request| match request { - Request::Image => Answer::Image(Ok(arboard::ImageData { width, height: 1, bytes: Cow::Owned(vec![0; width * 4]) })), + Request::Image => Answer::Image(Ok(arboard::ImageData { width, height: 1, bytes: Cow::Owned(vec![fill; width * 4]) })), _ => Answer::failed(request, "none".into()), }); assert!(cb.read_waiting(Request::Text, Duration::ZERO).text().is_err()); @@ -2107,12 +2119,41 @@ mod portable { paste.join().ok().flatten() }; // The bitmap copied here: the paste takes the internal clipboard, not a picture of it. - assert!(paste_after_copy(2).is_none()); - // Another app's bitmap is pasted. - let pasted = paste_after_copy(3).expect("the other app's bitmap is pasted"); + assert!(paste_after_copy(2, 0).is_none()); + // A bitmap is known by its size: another app's bitmap of the same size counts as the Copy. + assert!(paste_after_copy(2, 0xff).is_none()); + // Another app's bitmap of another size is pasted. + let pasted = paste_after_copy(3, 0).expect("the other app's bitmap is pasted"); assert_eq!((pasted.mime, decode_png(&pasted.data).map(|i| i.dimensions())), (PNG, Some((3, 1)))); } + #[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "dragonfly", target_os = "netbsd", target_os = "openbsd"))] + #[test] + fn a_paste_after_an_unanswered_text_read_takes_copied_files_before_reading_the_bitmap() { + let d = tempfile::Builder::new().prefix("vectorcraft-late-files-").tempdir().unwrap(); + let art = d.path().join("art.png"); + let mut png = vec![]; + image::RgbaImage::new(2, 2).write_to(&mut std::io::Cursor::new(&mut png), image::ImageFormat::Png).unwrap(); + std::fs::write(&art, &png).unwrap(); + let asked = std::sync::Arc::new(std::sync::Mutex::new(Vec::new())); + let seen = asked.clone(); + // The owner offers files and no text; a bitmap read would get no answer in its wait. + let (mut cb, release) = slow_owner(move |request| { + seen.lock().unwrap().push(request); + match request { + Request::Files => Answer::Files(vec![art.clone()]), + _ => Answer::failed(request, "none".into()), + } + }); + assert!(cb.read_waiting(Request::Text, Duration::ZERO).text().is_err()); + let unanswered = cb.unanswered(&vectorcraft_engine::cmd::clipboard::PASTE_ORDER).expect("the text read is kept for the paste"); + let paste = std::thread::spawn(move || unanswered.paste(Some(&Ours::Image(2, 1)), &vectorcraft_engine::cmd::clipboard::PASTE_ORDER)); + drop(release); + assert_eq!(paste.join().ok().flatten().map(|f| (f.mime, f.data)), Some((PNG, png))); + // The files were read before any bitmap read that could leave the worker busy. + assert_eq!(*asked.lock().unwrap(), [Request::Text, Request::Text, Request::Files]); + } + #[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "dragonfly", target_os = "netbsd", target_os = "openbsd"))] #[test] fn a_late_answer_to_an_ownership_check_is_pasted_only_while_it_is_awaited() { From 132055f7950e11372768397424cce0982e439d5f Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 07:49:08 -0800 Subject: [PATCH 36/62] i18n: Gujarati row for the Concept to Vector Detail slider The Concept to Vector panel labels its slider and field with tl!("Detail"), and gu.tsv had a row only for "Detail:", so the label stayed in English in the Gujarati interface. --- crates/ui-egui/src/i18n/gu.tsv | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/ui-egui/src/i18n/gu.tsv b/crates/ui-egui/src/i18n/gu.tsv index edd98f62dd..fc8680e3cd 100644 --- a/crates/ui-egui/src/i18n/gu.tsv +++ b/crates/ui-egui/src/i18n/gu.tsv @@ -1051,6 +1051,7 @@ Desired ઇચ્છિત Destination Folder: ગંતવ્ય ફોલ્ડર: Destination: ગંતવ્ય: + Detail વિગત Detail: વિગત: Devices ડિવાઇસ Dialog ડાયલોગ From 8ff9a8c9eb59501a8812c052d8ceacd3a4e61eb2 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 08:05:39 -0800 Subject: [PATCH 37/62] Canvas: keep the moved anchor marks mesh only when every mark moves by whole pixels A move of whole pixels on screen did not guarantee that each mark's f32 screen position moved by whole pixels: `CanvasView::to_screen` casts to f32, so a point at x = 255.999991 lands at 255.99998 before a one-pixel move and at 257.0 after it, and its square rounds to other pixels than the moved mesh's. The move now checks every anchor and handle's f32 screen position before and after, and tessellates again when one does not move by the whole pixels. The same pass checks that every point stays inside the canvas, in place of the box of the points. --- crates/ui-egui/src/canvas/selection.rs | 43 +++++++++++--------- crates/ui-egui/src/canvas/selection/tests.rs | 37 +++++++++++++++++ 2 files changed, 60 insertions(+), 20 deletions(-) diff --git a/crates/ui-egui/src/canvas/selection.rs b/crates/ui-egui/src/canvas/selection.rs index b6421c882b..6151e3affb 100644 --- a/crates/ui-egui/src/canvas/selection.rs +++ b/crates/ui-egui/src/canvas/selection.rs @@ -699,12 +699,12 @@ const PIXEL_SLACK: f64 = 1e-6; impl KeptMesh { /// Moves the mesh by `by` in the document when tessellating the moved marks would give the same mesh moved, and - /// returns whether it did. `was` is the box of the marks' points before the move ([`knots_box`]). The mesh moves - /// when the marks' whole move since they were tessellated is a whole number of physical pixels on screen, so the - /// tessellator's rounding to pixels lands the same, and when every point is inside the canvas the marks are drawn - /// near and inside the clip both before and after the move, so no anchor, handle or outline is left out or culled - /// on either side. - fn translate(&mut self, by: Vec2, was: Option) -> bool { + /// returns whether it did. `points` are the marks' anchors and direction handles before the move ([`knot_points`]). + /// The mesh moves when the marks' whole move since they were tessellated is a whole number of physical pixels on + /// screen, and when every point's `f32` screen position moves by this move's whole pixels too, so the tessellator's + /// rounding to pixels lands the same. It also needs every point inside the canvas before and after the move, so the + /// marks are drawn near and inside the clip on both sides and no anchor, handle or outline is left out or culled. + fn translate(&mut self, by: Vec2, points: impl IntoIterator) -> bool { let key = &self.key; let ppp = f64::from(key.pixels_per_point); let view = key.view.affine(); @@ -713,26 +713,31 @@ impl KeptMesh { if moved.iter().any(|p| !p.is_finite() || (p - p.round()).abs() > PIXEL_SLACK) { return false; } - if let Some(was) = was { - let area = key.rect.expand(key.look.reach).intersect(key.clip); - let inside = |r: vectorcraft_geom::Rect| { - [(r.x0, r.y0), (r.x1, r.y0), (r.x1, r.y1), (r.x0, r.y1)].into_iter().all(|(x, y)| area.contains(key.view.to_screen(Point::new(x, y)))) - }; - if !(inside(was) && inside(was + by)) { + // This move in whole physical pixels. + let pixels = [moved[0].round() - self.moved[0].round(), moved[1].round() - self.moved[1].round()]; + let area = key.rect.expand(key.look.reach).intersect(key.clip); + // `CanvasView::to_screen` with the affine computed once. + let screen = |p: Point| { + let s = view * p; + egui::pos2(s.x as f32, s.y as f32) + }; + let whole = |from: f32, to: f32, px: f64| ((f64::from(to) - f64::from(from)) * ppp - px).abs() <= PIXEL_SLACK; + for p in points { + let (from, to) = (screen(p), screen(p + by)); + if !(area.contains(from) && area.contains(to) && whole(from.x, to.x, pixels[0]) && whole(from.y, to.y, pixels[1])) { return false; } } - let step = |axis: usize| ((moved[axis].round() - self.moved[axis].round()) / ppp) as f32; - let offset = vec2(step(0), step(1)); + let offset = vec2((pixels[0] / ppp) as f32, (pixels[1] / ppp) as f32); self.moved = moved; Arc::make_mut(&mut self.mesh).translate(offset); true } } -/// The box of every anchor and direction handle of `anchors`, in document units, or `None` without any. The outlines -/// lie inside it too, as a curve lies inside the hull of its points. -fn knots_box(anchors: &Anchors) -> Option { +/// Every anchor and direction handle of `anchors`, in document units. The outlines lie inside the hull of these +/// points, as a curve lies inside the hull of its points. +fn knot_points(anchors: &Anchors) -> impl Iterator + '_ { anchors .paths .iter() @@ -740,7 +745,6 @@ fn knots_box(anchors: &Anchors) -> Option { .flat_map(|p| &p.subpaths) .flat_map(|sp| &sp.knots) .flat_map(|knot| [knot.anchor, knot.in_ctrl, knot.out_ctrl]) - .fold(None, |r: Option, p| Some(r.map_or(vectorcraft_geom::Rect::from_points(p, p), |r| r.union_pt(p)))) } /// One set of anchors as `BezierOverlay` took it: the paths, which anchors are selected and how they show. @@ -1263,9 +1267,8 @@ impl SelectionMarks { /// Moves every mark by `by`, and the kept mesh of the anchor marks with them when it can move as it is /// ([`KeptMesh::translate`]); otherwise the next paint tessellates the marks again. fn translate(&mut self, by: Vec2) { - let was = knots_box(&self.anchors); let mesh = self.mesh.get_mut(); - if mesh.as_mut().is_some_and(|kept| !kept.translate(by, was)) { + if mesh.as_mut().is_some_and(|kept| !kept.translate(by, knot_points(&self.anchors))) { *mesh = None; } let shift = vectorcraft_geom::Affine::translate(by); diff --git a/crates/ui-egui/src/canvas/selection/tests.rs b/crates/ui-egui/src/canvas/selection/tests.rs index f23e4087aa..3b979256c5 100644 --- a/crates/ui-egui/src/canvas/selection/tests.rs +++ b/crates/ui-egui/src/canvas/selection/tests.rs @@ -1360,3 +1360,40 @@ fn a_drag_of_the_selection_moves_the_anchor_marks_mesh_without_tessellating_it() assert_eq!(frames(&mut app, 2), 1, "a step past the canvas's edge"); app.session.commit_interaction().unwrap(); } + +// A move of whole pixels keeps the mesh only when every point's `f32` screen position moves by those whole pixels: +// at x = 255.999991 the screen position before a one-pixel move is 255.99998 and after it 257.0, so the marks' +// squares would round to other pixels than the moved mesh's. +#[test] +fn a_whole_pixel_move_keeps_the_mesh_only_when_the_screen_positions_move_by_whole_pixels() { + let screen = Rect::from_min_size(egui::pos2(0.0, 0.0), vec2(1000.0, 1000.0)); + let look = MarkLook { + line: Color32::BLACK, + fill: Color32::WHITE, + edge: Color32::BLACK, + anchor: 5.0, + large: 7.0, + thin: 1.0, + medium: 2.0, + thick: 3.0, + reach: 20.0, + }; + let kept = || KeptMesh { + key: MeshKey { + marks: 0, + view: CanvasView::new(screen, Point::new(500.0, 500.0), 1.0), + rect: screen, + clip: screen, + pixels_per_point: 1.0, + options: egui::epaint::TessellationOptions::default(), + look, + }, + mesh: Arc::new(egui::Mesh::default()), + moved: [0.0; 2], + }; + let by = Vec2::new(1.0, 0.0); + assert!(kept().translate(by, [Point::new(255.5, 10.0)]), "a point whose screen position moves one whole pixel"); + let mut off = kept(); + assert!(!off.translate(by, [Point::new(255.5, 10.0), Point::new(255.999_991, 10.0)]), "a point that moves 1.0000153 pixels"); + assert_eq!(off.moved, [0.0; 2], "the refused move leaves the mesh where it was"); +} From 1bc0c5ba7825048b93195848a9ee02904cf6ec6c Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 08:06:12 -0800 Subject: [PATCH 38/62] CI: analyze main in SonarCloud only at the nightly's commit SonarCloud ran a full instrumented analysis for every merge commit on main (about 90 a day, 97 to 191 minutes each). Stage 2 only reads the analysis of the commit the nightly builds, so main is now analyzed once a day: - sonarcloud.yml drops the push trigger and starts when the unsigned nightly starts (workflow_run, requested). A first job fails the run when main has moved past the nightly's commit, so the analysis is never of another commit. Pull request analysis is unchanged. - nightly-dispatch.yml waits, for up to 280 minutes, for the SonarCloud check on the producer's commit to complete before it dispatches the signer. A SonarCloud run that ended without a check stops the wait after 20 minutes. The job gains checks: read and a 300-minute timeout. - packaging/nightly-release-tests.py runs the dispatch script against a fake API: it dispatches only after the check completes, and refuses when the SonarCloud run ended without one or when the deadline passes. - docs/nightly-release-preparation.md describes both workflows. --- .github/workflows/nightly-dispatch.yml | 66 ++++++++++++++---- .github/workflows/sonarcloud.yml | 32 ++++++++- docs/nightly-release-preparation.md | 16 +++-- packaging/nightly-release-tests.py | 92 ++++++++++++++++++++++++++ 4 files changed, 186 insertions(+), 20 deletions(-) diff --git a/.github/workflows/nightly-dispatch.yml b/.github/workflows/nightly-dispatch.yml index 4ef372c40b..4581f75d39 100644 --- a/.github/workflows/nightly-dispatch.yml +++ b/.github/workflows/nightly-dispatch.yml @@ -16,9 +16,11 @@ jobs: github.repository == 'storytold/vectorcraft' && github.event_name == 'workflow_run' runs-on: ubuntu-latest - timeout-minutes: 5 + # Most of the time is the wait for the producer commit's SonarCloud analysis (up to 280 minutes). + timeout-minutes: 300 permissions: actions: write + checks: read steps: - name: Dispatch only the exact completed producer run and attempt shell: python @@ -27,6 +29,10 @@ jobs: run: | import json import os + import re + import time + import urllib.error + import urllib.parse import urllib.request def require(value, message): @@ -51,22 +57,58 @@ jobs: run_id, attempt = producer.get('id'), producer.get('run_attempt') require(type(run_id) is int and run_id > 0, 'invalid producer run id') require(type(attempt) is int and attempt == 1, 'invalid automatic producer attempt') + source = producer.get('head_sha') + require(isinstance(source, str) and re.fullmatch(r'[0-9a-f]{40}', source), 'invalid producer commit') + headers = { + 'Authorization': 'Bearer ' + os.environ['GH_TOKEN'], + 'Accept': 'application/vnd.github+json', + 'X-GitHub-Api-Version': '2022-11-28', + 'User-Agent': 'vectorcraft-nightly-dispatch' + } + class NoRedirect(urllib.request.HTTPRedirectHandler): + def redirect_request(self, req, fp, code, msg, headers, newurl): + raise RuntimeError('dispatch redirects are forbidden') + opener = urllib.request.build_opener(NoRedirect()) + + def read(path): + request = urllib.request.Request('https://api.github.com/repos/storytold/vectorcraft' + path, headers=headers) + with opener.open(request, timeout=20) as response: + require(response.status == 200, 'read was not accepted') + return json.load(response) + + # Stage 2 admits the producer only on its commit's own SonarCloud analysis, which + # sonarcloud.yml starts when the producer starts. Wait for the check that analysis posts; + # a SonarCloud run that ended without one gets 20 minutes before the wait gives up. + checks_path = '/commits/' + source + '/check-runs?' + urllib.parse.urlencode( + {'app_id': 12526, 'check_name': 'SonarCloud Code Analysis', 'filter': 'latest'}) + runs_path = '/actions/workflows/sonarcloud.yml/runs?' + urllib.parse.urlencode( + {'event': 'workflow_run', 'head_sha': source, 'per_page': 1}) + deadline = time.monotonic() + 280 * 60 + ended = None + while True: + try: + checks = read(checks_path).get('check_runs', []) + if any(c.get('head_sha') == source and c.get('status') == 'completed' for c in checks): + break + runs = read(runs_path).get('workflow_runs', []) + if runs and runs[0].get('status') == 'completed' and ended is None: + ended = time.monotonic() + print('SonarCloud run', runs[0].get('id'), 'ended:', runs[0].get('conclusion')) + except (urllib.error.URLError, OSError, ValueError) as error: + print('Read failed, polling again:', error) + require(ended is None or time.monotonic() < ended + 20 * 60, + 'the SonarCloud run for the producer commit ended without an analysis check') + require(time.monotonic() < deadline, 'no SonarCloud analysis of the producer commit in time') + time.sleep(60) + print('SonarCloud analysis check of', source, 'is complete.') + body = json.dumps({'ref': 'refs/heads/nightly-signer', 'inputs': { 'producer_run_id': str(run_id), 'producer_run_attempt': str(attempt) }}).encode('utf-8') request = urllib.request.Request( 'https://api.github.com/repos/storytold/vectorcraft/actions/workflows/nightly-sign.yml/dispatches', - data=body, method='POST', headers={ - 'Authorization': 'Bearer ' + os.environ['GH_TOKEN'], - 'Accept': 'application/vnd.github+json', - 'Content-Type': 'application/json', - 'X-GitHub-Api-Version': '2022-11-28', - 'User-Agent': 'vectorcraft-nightly-dispatch' - }) - class NoRedirect(urllib.request.HTTPRedirectHandler): - def redirect_request(self, req, fp, code, msg, headers, newurl): - raise RuntimeError('dispatch redirects are forbidden') + data=body, method='POST', headers=dict(headers, **{'Content-Type': 'application/json'})) # One bounded request, no retry: duplicate transport is not publication authority. - with urllib.request.build_opener(NoRedirect()).open(request, timeout=20) as response: + with opener.open(request, timeout=20) as response: require(response.status == 204, 'dispatch was not accepted') print('Dispatched producer run/attempt to the release-ref validator; not a signing result.') diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 98e9c1d00a..312ab1cbda 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -1,8 +1,12 @@ name: SonarCloud +# Main is analyzed once a day, at the commit the nightly builds: Stage 2 admits a nightly only on +# that commit's own analysis, and nightly-dispatch.yml waits for it before dispatching the signer. on: workflow_dispatch: - push: + workflow_run: + workflows: [VectorCraft unsigned nightly] + types: [requested] branches: [main] pull_request: types: [opened, synchronize, reopened] @@ -12,11 +16,35 @@ permissions: concurrency: group: ${{ github.ref == 'refs/heads/main' && format('sonarcloud-main-{0}', github.sha) || format('sonarcloud-{0}', github.ref) }} - # A push to main is the run that publishes coverage; superseded runs there would never finish. + # A main run is the analysis a nightly waits for; superseded runs there would never finish. cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: + nightly-commit: + name: Nightly commit is main's head + # A workflow_run checks out and analyzes main's head, so main must not have moved since the + # nightly started. + if: github.event_name == 'workflow_run' + runs-on: ubuntu-latest + timeout-minutes: 2 + steps: + - name: Harden runner + uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4 + with: + egress-policy: audit + - name: Require main's head to be the nightly's commit + env: + NIGHTLY_SHA: ${{ github.event.workflow_run.head_sha }} + RUN_SHA: ${{ github.sha }} + run: | + if [ "$NIGHTLY_SHA" != "$RUN_SHA" ]; then + echo "::error::main moved from $NIGHTLY_SHA to $RUN_SHA after the nightly started; this run would not analyze the nightly's commit" + exit 1 + fi + sonarcloud: + needs: nightly-commit + if: ${{ !cancelled() && contains(fromJSON('["success","skipped"]'), needs.nightly-commit.result) }} # Tracked at @main so org-wide CI improvements propagate without PR churn. # The reusable workflow defaults build-jobs to 2 so a cold instrumented # archive stays within hosted-runner memory (craft-common-actions#333). diff --git a/docs/nightly-release-preparation.md b/docs/nightly-release-preparation.md index 29ca838f1d..1074e90299 100644 --- a/docs/nightly-release-preparation.md +++ b/docs/nightly-release-preparation.md @@ -79,7 +79,7 @@ Read on 2026-11-24; re-read anything that may have moved before `nightly-signer` | `max_age_seconds`, `max_artifact_bytes` | `86400`, `2147483648` | Go-live checklist | | `platforms` | three rows | Learning Machines stable identities (Windows Authenticode publisher subject, Linux OpenPGP fingerprint, Apple Developer ID team `DJ6XS33FX8`) | | `candidate_policy.required_workflows` | CI (`ci.yml`, workflow `380135806`), 9 jobs | Workflow list API; jobs that succeeded on recent main push runs | -| `candidate_policy.sonar` | `storytold` / `storytold_vectorcraft`, app `12526` | `sonar-project.properties`; the SonarCloud check on main commits | +| `candidate_policy.sonar` | `storytold` / `storytold_vectorcraft`, app `12526` | `sonar-project.properties`; the SonarCloud check on the nightly's commit | The signer reads the policy from `nightly-signer`, so a candidate whose CI built the tests once (`build`, `lint` and `test 1/5` to `test 5/5`) is admitted only after `nightly-signer` advances to @@ -97,9 +97,12 @@ a main commit with this policy. Candidates whose CI ran six shards (`cache warm` from stable, cancellation is off and `queue: max` must be hosted-qualified. The caller itself passes no credentials; only the shared callee's sign jobs bind the `release` environment, which must admit `nightly-signer` alongside `release` before the first dispatch. -- `.github/workflows/nightly-dispatch.yml`: transport only, never authorization. It is literally - off (`false &&`) and forwards only a first-attempt scheduled producer to `nightly-sign.yml` on - `nightly-signer`. No schedule is registered until activation is reviewed. +- `.github/workflows/nightly-dispatch.yml`: transport only, never authorization. It forwards only + a first-attempt scheduled producer to `nightly-sign.yml` on `nightly-signer`, after the + SonarCloud check on the producer's commit has completed. +- `.github/workflows/sonarcloud.yml`: analyzes main only at the commit a nightly builds. It starts + when the producer starts and fails when main has moved past the producer's commit. Pull requests + are analyzed on every push as before. - Shared reusable entrypoints are `nightly-unsigned.yml` and `nightly-release.yml` in `storytold/craft-common-actions`. Both must resolve to a **real reviewed public immutable commit**; the defining workflow SHA and tooling input must match. @@ -117,8 +120,9 @@ a main commit with this policy. Candidates whose CI ran six shards (`cache warm` - A trust-closure scan reads every workflow: nothing binds an `environment`, only `nightly-sign.yml` calls `nightly-release.yml` (at a full SHA), and the only caller of the shared stable `release.yml` is `release.yml`. -- `nightly-dispatch.yml` keeps a literal-off guard, a `workflow_run`-only trigger and a - `refs/heads/nightly-signer` request. +- `nightly-dispatch.yml` keeps its exact context guard, a `workflow_run`-only trigger and a + `refs/heads/nightly-signer` request, and sends that request only after the SonarCloud check on + the producer's commit has completed. ## The app side of a Nightly build diff --git a/packaging/nightly-release-tests.py b/packaging/nightly-release-tests.py index 2729b40282..ef1003f46e 100755 --- a/packaging/nightly-release-tests.py +++ b/packaging/nightly-release-tests.py @@ -2,10 +2,15 @@ """Local regression checks for VectorCraft nightly workflow and signing-policy contracts.""" import copy from decimal import Decimal +import io import json +import os from pathlib import Path import re +import tempfile +import textwrap import unittest +from unittest import mock ROOT = Path(__file__).resolve().parents[1] INSTALLED_POLICY = ROOT / ".github/nightly-signing-policy.json" @@ -907,5 +912,92 @@ class NightlyDispatchTransport(unittest.TestCase): self.assertIn("repos/storytold/" + APP_NAME + "/actions/workflows/nightly-sign.yml/dispatches", self.source) self.assertNotIn("'ref': 'release'", self.source) + +SONAR_SOURCE = "c" * 40 + + +def dispatch_script(): + """The dispatch job's inline Python, as the runner's `shell: python` step receives it.""" + source = (ROOT / ".github/workflows/nightly-dispatch.yml").read_text() + block = source.split(" run: |\n", 1)[1] + return textwrap.dedent(block) + + +class FakeGitHub: + """Answers the dispatch script's API reads from scripted poll results and records every request.""" + + def __init__(self, polls, run=None): + self.polls = list(polls) + self.run = run + self.requests = [] + self.now = 0.0 + + def open(self, request, timeout): + self.requests.append((request.get_method(), request.full_url)) + if request.get_method() == "POST": + payload = b"" + status = 204 + elif "/check-runs?" in request.full_url: + done = self.polls.pop(0) if self.polls else False + rows = [{"head_sha": SONAR_SOURCE, "status": "completed" if done else "in_progress"}] + payload, status = json.dumps({"check_runs": rows}).encode(), 200 + else: + runs = [self.run] if self.run else [] + payload, status = json.dumps({"workflow_runs": runs}).encode(), 200 + response = io.BytesIO(payload) + response.status = status + return response + + def sleep(self, seconds): + self.now += seconds + + +def run_dispatch(github): + producer = {"head_repository": {"full_name": "storytold/vectorcraft"}, "path": ".github/workflows/nightly.yml", + "head_branch": "main", "status": "completed", "conclusion": "success", "event": "schedule", + "id": 7, "run_attempt": 1, "head_sha": SONAR_SOURCE} + event = {"action": "completed", "repository": {"full_name": "storytold/vectorcraft"}, "workflow_run": producer} + with tempfile.TemporaryDirectory() as folder: + path = Path(folder) / "event.json" + path.write_text(json.dumps(event)) + env = {"GITHUB_REPOSITORY": "storytold/vectorcraft", "GITHUB_EVENT_NAME": "workflow_run", + "GITHUB_EVENT_PATH": str(path), "GH_TOKEN": "token"} + with mock.patch.dict(os.environ, env), \ + mock.patch("urllib.request.build_opener", return_value=github), \ + mock.patch("time.monotonic", side_effect=lambda: github.now), \ + mock.patch("time.sleep", side_effect=github.sleep), \ + mock.patch("builtins.print"): + exec(compile(dispatch_script(), "nightly-dispatch.yml", "exec"), {}) + + +class NightlyDispatchWaitsForSonar(unittest.TestCase): + """The signer is dispatched only after the producer commit's SonarCloud check completes.""" + + def posts(self, github): + return [url for method, url in github.requests if method == "POST"] + + def test_dispatch_waits_for_the_completed_check_of_the_producer_commit(self): + github = FakeGitHub([False, False, True]) + run_dispatch(github) + checks = [url for method, url in github.requests if "/check-runs?" in url] + self.assertEqual(len(checks), 3) + self.assertTrue(all("/commits/" + SONAR_SOURCE + "/" in url and "app_id=12526" in url for url in checks)) + self.assertEqual(len(self.posts(github)), 1) + self.assertEqual(github.requests[-1][0], "POST", "the dispatch comes after the last check read") + + def test_a_sonar_run_that_ended_without_a_check_stops_the_dispatch(self): + github = FakeGitHub([], run={"id": 9, "status": "completed", "conclusion": "failure"}) + with self.assertRaisesRegex(RuntimeError, "ended without an analysis check"): + run_dispatch(github) + self.assertEqual(self.posts(github), []) + self.assertLessEqual(github.now, 21 * 60, "a finished run does not wait for the whole deadline") + + def test_no_analysis_by_the_deadline_stops_the_dispatch(self): + github = FakeGitHub([]) + with self.assertRaisesRegex(RuntimeError, "in time"): + run_dispatch(github) + self.assertEqual(self.posts(github), []) + + if __name__ == "__main__": unittest.main(verbosity=2) From fc84b657d32811e17df0f852e5caf116aa26b7dc Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 08:26:28 -0800 Subject: [PATCH 39/62] Scripting: a self-crossing clip path counts as enclosing an area The clip-outline check behind `pathItems.removeAll()` measured each subpath by its signed area. The loops of a figure eight turn opposite ways and cancel, so the check treated the outline as enclosing nothing, although both fill rules fill it. A subpath whose signed area is within roundoff of zero is now measured by the area it fills under nonzero. A subpath whose points all lie on one line still encloses nothing. --- crates/engine/src/script/dom/paths.rs | 58 +++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 3 deletions(-) diff --git a/crates/engine/src/script/dom/paths.rs b/crates/engine/src/script/dom/paths.rs index 3f6a1ef1d4..417a7ddfcd 100644 --- a/crates/engine/src/script/dom/paths.rs +++ b/crates/engine/src/script/dom/paths.rs @@ -869,7 +869,9 @@ fn items_remove_all(h: &super::Host, a: &[Data]) -> Answer { /// Whether a subpath of `outline` encloses an area. Each subpath's area is measured from its first /// point, so its position does not change the result, and an area within roundoff of its own -/// bounding box's is counted as none. +/// bounding box's is counted as none. A subpath that crosses itself, such as a figure eight whose +/// loops turn opposite ways and cancel in its signed area, is measured by the area it fills under +/// nonzero, which every loop counts toward. fn encloses(outline: &kurbo::BezPath) -> bool { let mut subpaths: Vec = Vec::new(); for el in outline.elements() { @@ -883,11 +885,35 @@ fn encloses(outline: &kurbo::BezPath) -> bool { subpaths.into_iter().any(|mut sub| { let Some(start) = sub.elements().iter().find_map(|e| e.end_point()) else { return false }; sub.apply_affine(kurbo::Affine::translate(-start.to_vec2())); - let area = kurbo::Shape::area(&sub).abs(); - area > 0.0 && area > 64.0 * f64::EPSILON * kurbo::Shape::bounding_box(&sub).area() + let floor = 64.0 * f64::EPSILON * kurbo::Shape::bounding_box(&sub).area(); + let counts = |area: f64| area > 0.0 && area > floor; + counts(kurbo::Shape::area(&sub).abs()) + || (!collinear(&sub) + && vectorcraft_pathops::try_area(&vectorcraft_geom::PathData::from_bezpath(&sub), vectorcraft_geom::FillRule::NonZero) + .is_ok_and(counts)) }) } +/// Whether every point and control point of `sub` lies within roundoff of one straight line, as +/// in a frame collapsed to a line, which encloses no area however the path operations snap it. +fn collinear(sub: &kurbo::BezPath) -> bool { + let points: Vec = sub + .elements() + .iter() + .flat_map(|e| match *e { + kurbo::PathEl::MoveTo(p) | kurbo::PathEl::LineTo(p) => vec![p], + kurbo::PathEl::QuadTo(a, p) => vec![a, p], + kurbo::PathEl::CurveTo(a, b, p) => vec![a, b, p], + kurbo::PathEl::ClosePath => vec![], + }) + .collect(); + let Some(&first) = points.first() else { return true }; + let Some(&far) = points.iter().max_by(|a, b| a.distance(first).total_cmp(&b.distance(first))) else { return true }; + let axis = far - first; + let length = axis.hypot(); + length == 0.0 || points.iter().all(|p| axis.cross(*p - first).abs() <= 64.0 * f64::EPSILON * length * length) +} + /// Whether `outline` fills an area under `rule`: a subpath encloses an area ([`encloses`]) and the /// outline with its overlaps resolved, thin strips included, has an area. An outline the path /// operations refuse is judged by [`encloses`] alone. @@ -2536,6 +2562,32 @@ mod tests { assert_eq!(anchors, vec![(0, 1), (0, 3)], "the undo puts back the selection the write changed"); } + #[test] + fn a_figure_eight_clip_outline_fills_its_loops() { + let mut eight = kurbo::BezPath::new(); + eight.move_to((0.0, 0.0)); + eight.line_to((10.0, 10.0)); + eight.line_to((10.0, 0.0)); + eight.line_to((0.0, 10.0)); + eight.close_path(); + assert!(kurbo::Shape::area(&eight).abs() < 1e-9, "the loops cancel in the signed area"); + assert!(encloses(&eight), "each loop of the figure eight encloses an area"); + assert!(fills(&eight, vectorcraft_geom::FillRule::NonZero)); + assert!(fills(&eight, vectorcraft_geom::FillRule::EvenOdd)); + let mut line = kurbo::BezPath::new(); + line.move_to((0.0, 0.0)); + line.line_to((10.0, 10.0)); + line.close_path(); + assert!(!encloses(&line), "a closed line still encloses nothing"); + let mut flat = kurbo::BezPath::new(); + flat.move_to((0.0, 0.0)); + flat.line_to((1000.0, 0.001)); + flat.line_to((2000.0, 0.002)); + flat.line_to((1000.0, 0.001)); + flat.close_path(); + assert!(!encloses(&flat), "a frame collapsed onto a shallow diagonal encloses nothing"); + } + #[test] fn a_made_id_above_two_to_the_53_stays_exact() { let made = |v: Value| made_id(&(Data::Undefined, v)); From da065b3ca82064e9b9a8071b306cfcf2067ea633 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 08:27:20 -0800 Subject: [PATCH 40/62] Color Picker: a script's picker shows color in its own document's profiles app.showColorPicker opened the picker with the front document's color profiles: the opening color, the CMYK fields and the out-of-gamut test used the active context, while OK converted the pick through the script's document. With two documents assigned different profiles, the picker showed and separated colors in the wrong space. The script picker now draws its opening color, fills its CMYK fields and tests the gamut through the profiles of the script's document. Pickers opened from the panels keep using the active profiles. --- crates/ui-egui/src/dialogs/color_picker.rs | 45 ++++++++++++++----- .../ui-egui/src/dialogs/color_picker/tests.rs | 15 +++++++ crates/ui-egui/src/panels/color.rs | 14 ++++++ 3 files changed, 62 insertions(+), 12 deletions(-) diff --git a/crates/ui-egui/src/dialogs/color_picker.rs b/crates/ui-egui/src/dialogs/color_picker.rs index 9d6c1af6fc..1e74be421d 100644 --- a/crates/ui-egui/src/dialogs/color_picker.rs +++ b/crates/ui-egui/src/dialogs/color_picker.rs @@ -34,7 +34,7 @@ use vectorcraft_engine::cmd::swatchlib; use vectorcraft_engine::script::DialogAnswer; use super::preview::LivePreview; -use crate::panels::color::{WorkingRgb, color_of_values, gamut, model_values}; +use crate::panels::color::{WorkingRgb, color_of_values, gamut, gamut_of, model_values}; use crate::panels::swatches::{DOCUMENT_SWATCHES, colour_libraries}; use crate::panels::{color_json, srgba}; use crate::{VectorcraftApp, screen_color}; @@ -236,10 +236,10 @@ fn library_index(app: &VectorcraftApp, limit: &str) -> Option { colour_libraries(app).iter().position(|lib| lib.id == limit).map(|i| i + 1) } -/// The working CMYK profile as the picker's CMYK converter, so its CMYK fields follow the document's +/// The CMYK profile of `inks` as the picker's CMYK converter, so its CMYK fields follow the document's /// inks; `None` (the picker's built-in coated CMYK) when the profile can't link to sRGB. -fn working_cmyk() -> Option { - let bytes = cms::icc_bytes(&cms::active().settings().cmyk).ok()?; +fn working_cmyk(inks: &cms::Cms) -> Option { + let bytes = cms::icc_bytes(&inks.settings().cmyk).ok()?; CmykConverter::new(Arc::new(Profile::parse(&bytes).ok()?)).ok() } @@ -295,7 +295,7 @@ pub fn open(app: &mut VectorcraftApp, p: &Value) -> Result { (None, false) => "fill", }; let cmyk = app.session.active().is_some_and(|s| s.doc.color_mode == ColorMode::Cmyk); - let mut dialog = picker(app, key, &color, cmyk); + let mut dialog = picker(app, key, &color, cmyk, None); // The host replaces a picker only for the same document and artboard. if let Some((document, _, index, _)) = artboard { dialog = dialog.instance((document, index)); @@ -327,15 +327,18 @@ pub fn open(app: &mut VectorcraftApp, p: &Value) -> Result { } /// The Color Picker with `key` on `color`, with the eyedropper, the gamut warning, the document's -/// swatches and libraries, and with `cmyk` (a CMYK document) the working CMYK inks. -fn picker(app: &VectorcraftApp, key: &str, color: &Color, cmyk: bool) -> ColorPickerDialog { - let mut dialog = ColorPickerDialog::new(key, tl!("Color Picker"), srgba(color)) +/// swatches and libraries, and with `cmyk` (a CMYK document) the CMYK inks. `inks`: the profiles of the +/// document the picker edits when that is not the front document; it shows the color, tests the gamut +/// and fills the CMYK fields through them. `None`: the active profiles. +fn picker(app: &VectorcraftApp, key: &str, color: &Color, cmyk: bool, inks: Option<&Arc>) -> ColorPickerDialog { + let active = cms::active(); + let mut dialog = ColorPickerDialog::new(key, tl!("Color Picker"), srgba_in(color, inks)) .eyedropper(true) .add_to_swatches(false) - .gamut(gamut(app)) + .gamut(inks.map_or_else(|| gamut(app), |i| gamut_of(i.clone()))) .working_rgb(WorkingRgb) .swatch_view(swatch_view(app)); - if cmyk && let Some(converter) = working_cmyk() { + if cmyk && let Some(converter) = working_cmyk(inks.unwrap_or(&active)) { dialog = dialog.cmyk(&converter); } if matches!(color, Color::Cmyk { .. } | Color::Lab { .. }) { @@ -352,14 +355,15 @@ pub(crate) fn open_for_script(app: &mut VectorcraftApp, color: Color, cmyk: bool let Some(dialogs) = app.dialogs() else { return }; // The given colour's own values, so that OK can tell an untouched pick from another model's. // The Only Web Colors setting of earlier pickers is not recalled, so the colour opens as given. - let dialog = picker(app, SCRIPT_KEY, &color, cmyk).kept(model_values(&color)).web_colors_remembered(false); + let inks = script_inks(&profiles); + let dialog = picker(app, SCRIPT_KEY, &color, cmyk, Some(&inks)).kept(model_values(&color)).web_colors_remembered(false); let id = dialogs.with(|h| h.open(dialog)); app.color_dialogs.pickers.retain(|o| o.id != id); let target = Target::Script { color, cmyk, profiles }; app.color_dialogs.pickers.push(Open { id, target, - start: srgba(&color), + start: srgba_in(&color, Some(&inks)), keep: false, preview: LivePreview::default(), view: Vec::new(), @@ -367,6 +371,23 @@ pub(crate) fn open_for_script(app: &mut VectorcraftApp, color: Color, cmyk: bool }); } +/// The color-management context whose CMYK profile a script's picker shows its CMYK fields in: the +/// script's document assigned `profiles`, which may not be the window's front document. +fn script_inks(profiles: &(Option, Option)) -> Arc { + cms::for_document(profiles.0.as_deref(), profiles.1.as_deref()) +} + +/// `color` as display sRGB through `inks` (`None`: the active profiles, as [`srgba`]). +fn srgba_in(color: &Color, inks: Option<&Arc>) -> Srgba { + match (inks, color) { + (Some(inks), Color::Rgb { .. } | Color::Cmyk { .. }) => { + let [r, g, b] = inks.display_rgb(color); + Srgba::rgb(r, g, b) + } + _ => srgba(color), + } +} + /// The key of the Color Picker a script opens. pub(crate) const SCRIPT_KEY: &str = "script"; diff --git a/crates/ui-egui/src/dialogs/color_picker/tests.rs b/crates/ui-egui/src/dialogs/color_picker/tests.rs index 4d7e820a29..14041cbce2 100644 --- a/crates/ui-egui/src/dialogs/color_picker/tests.rs +++ b/crates/ui-egui/src/dialogs/color_picker/tests.rs @@ -494,3 +494,18 @@ fn the_canvas_stays_open_under_the_picker() { step(&mut app, &ctx, vec![]); assert_eq!(app.session.doc().unwrap().selection, selected, "the click under the picker leaves the selection"); } + +#[test] +fn a_script_picker_shows_cmyk_in_the_scripts_document_profile() { + // The front document keeps the working CMYK profile; the script's document is assigned another. + let (mut app, _ctx) = app(); + assert_ne!(cms::active().settings().cmyk, cms::FOGRA52_CMYK, "the front document uses another CMYK profile"); + let color = Color::Cmyk { c: 1.0, m: 0.0, y: 0.0, k: 0.0 }; + open_for_script(&mut app, color, true, (None, Some(cms::FOGRA52_CMYK.to_string()))); + let open = app.color_dialogs.pickers.last().unwrap(); + let [r, g, b] = cms::for_document(None, Some(cms::FOGRA52_CMYK)).display_rgb(&color); + assert_eq!(open.start, Srgba::rgb(r, g, b), "the picker shows the color through the script document's profile"); + assert_ne!(open.start, srgba(&color), "the front document's profile shows the color differently"); + let inks = script_inks(&(None, Some(cms::FOGRA52_CMYK.to_string()))); + assert_eq!(inks.settings().cmyk, cms::FOGRA52_CMYK, "the CMYK fields and gamut use the script document's profile"); +} diff --git a/crates/ui-egui/src/panels/color.rs b/crates/ui-egui/src/panels/color.rs index 759051fa29..3ed4092a63 100644 --- a/crates/ui-egui/src/panels/color.rs +++ b/crates/ui-egui/src/panels/color.rs @@ -180,6 +180,20 @@ pub(crate) fn gamut(_app: &VectorcraftApp) -> Gamut<'static> { }) } +/// The printable test of [`gamut`] in the CMYK space of `inks` instead of the active one, for a +/// picker that edits a document other than the front one. +pub(crate) fn gamut_of(inks: std::sync::Arc) -> Gamut<'static> { + Gamut::new(move |c: Srgba| { + // The picker samples display sRGB: the same color in the document's RGB space. + let color = crate::screen_color::sampled(&inks, [c.r, c.g, c.b]); + if !inks.out_of_gamut(&color) { + return c; + } + let [r, g, b] = inks.display_rgb(&inks.convert(&color, cms::Model::Cmyk, inks.settings().intent)); + Srgba::new(r, g, b, c.a) + }) +} + /// Serde reader for [`crate::UiState::color_panel`]: junk gives the default, so an unknown value /// doesn't lose the rest of the preferences. pub fn deserialize_panel_state<'de, D: serde::Deserializer<'de>>(d: D) -> Result { From d660414ef4ba6ab70a56fc7f2cd55325c2281a2d Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 08:34:13 -0800 Subject: [PATCH 41/62] Docs: Gujarati counts, the web font prerequisite and the tests that need rows The Gujarati status notes now give the catalog's real counts: 4,946 `@msg` rows and 10,890 rows in all, and the revision rows give 4,926 new message rows. They also say that a web build offers Gujarati only when it is built with `CRAFT_FONTS_DIR` pointing at a craft-fonts checkout that has Noto Sans Gujarati; without it `offered_codes` leaves `gu` out on the web. docs/development.md no longer says a missing translation never fails a test. It names the four tests that need a row in every complete catalog or every `COMPLETE_MESSAGES` language. --- ROADMAP.md | 2 +- docs/development.md | 8 ++++++-- docs/localization-parity.md | 4 ++-- docs/roadmap.md | 6 +++--- docs/target-app-parity.md | 6 +++--- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index 5b70379608..a310f25148 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -18,7 +18,7 @@ gate: all six core workflows (path drawing and editing, paint and style, type, l production, file exchange) work end to end on macOS with save and reopen, and only the last is partial, without blocking it ([Alpha gate](docs/roadmap.md#alpha-gate)). -> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (2026-12-02); with 155 menu, label and undo rows added the same day the catalog has 10,887 rows; all machine-assisted, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts include Noto Sans Gujarati as an optional `Gujr` fallback, and since 2026-12-02 the web build fetches it when the interface needs it (`crates/text/web-fonts.txt`, `demand`), so Gujarati can be selected on the web. Scores and estimates unchanged. +> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,946 `@msg` and 56 `@msgplural` rows (2026-12-02); with 155 menu, label and undo rows added the same day the catalog has 10,890 rows; all machine-assisted, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts include Noto Sans Gujarati as an optional `Gujr` fallback, and since 2026-12-02 the web build fetches it when the interface needs it (`crates/text/web-fonts.txt`, `demand`), so a web build made with `CRAFT_FONTS_DIR` pointing at a craft-fonts checkout that has Noto Sans Gujarati offers Gujarati; a web build without it does not. Scores and estimates unchanged. ## Headline numbers diff --git a/docs/development.md b/docs/development.md index d18ee6ab4e..baf8cd551f 100644 --- a/docs/development.md +++ b/docs/development.md @@ -296,8 +296,12 @@ other `sv-*` locale resolve to it), Georgian (`ka`, complete; `ka-GE` and `ka_GE once the menus and `tl!` literals are translated; the untranslated report then lists what the catalog lacks (`VECTORCRAFT_I18N_DUMP=strings.txt cargo test -p vectorcraft-ui-egui dump_source_strings -- --ignored` lists every English string). -- A missing translation never fails a test or a build: the interface shows the English text until a translator - adds the row. `cargo xtask i18n-report` prints, per language, the strings its catalog lacks (menu strings, +- A missing translation shows the English text until a translator adds the row, and fails no build. A few tests + do fail on a missing row: every catalog with `complete_menus` needs the `UI_STRINGS` rows + (`strings_the_ui_shows_are_in_every_complete_catalog`) and the save panel's file types + (`save_panel_file_types_are_in_complete_catalogs`), and every language in `COMPLETE_MESSAGES` needs the + cutting-banner and recovery messages (`banner_and_recovery_messages_are_translated_in_every_complete_catalog`) + and the script warning question (`script_warning_off_question_is_translated`). `cargo xtask i18n-report` prints, per language, the strings its catalog lacks (menu strings, `tl!` literals, undo step names, menu labels, render-site labels, status and error messages, PostScript error meanings, default swatch names), and `cargo xtask ci` prints the same list in its `i18n-report` step. The report is the test `i18n::tests::untranslated_report`, run with `--nocapture`; it fails only when a diff --git a/docs/localization-parity.md b/docs/localization-parity.md index bd61ca2a13..269160971e 100644 --- a/docs/localization-parity.md +++ b/docs/localization-parity.md @@ -24,7 +24,7 @@ English) in-app help, and the docs are English. (`bflatastic`), with community contributors adding or correcting (German by `dwetscher`, Japanese and Traditional Chinese by `imachus`). Georgian and the original Gujarati catalog are recorded as reviewed by native speakers; the contributor approved all 387 later Gujarati additions on 2026-11-14. -> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (2026-12-02); with 155 menu, label and undo rows added the same day the catalog has 10,887 rows; all machine-assisted, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts include Noto Sans Gujarati as an optional `Gujr` fallback, and since 2026-12-02 the web build fetches it when the interface needs it (`crates/text/web-fonts.txt`, `demand`), so Gujarati can be selected on the web. Scores and estimates unchanged. +> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,946 `@msg` and 56 `@msgplural` rows (2026-12-02); with 155 menu, label and undo rows added the same day the catalog has 10,890 rows; all machine-assisted, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts include Noto Sans Gujarati as an optional `Gujr` fallback, and since 2026-12-02 the web build fetches it when the interface needs it (`crates/text/web-fonts.txt`, `demand`), so a web build made with `CRAFT_FONTS_DIR` pointing at a craft-fonts checkout that has Noto Sans Gujarati offers Gujarati; a web build without it does not. Scores and estimates unchanged. ## The thirteen key languages @@ -101,7 +101,7 @@ font for the web build. | Date | Change | Summary | |---|---|---| -| 2026-12-02 | minor | Gujarati: status and error messages translated (4,924 new `@msg`/`@msgplural` rows, machine-assisted draft, native review pending); `gu` joins `COMPLETE_MESSAGES`. Scores and estimates unchanged. | +| 2026-12-02 | minor | Gujarati: status and error messages translated (4,926 new `@msg`/`@msgplural` rows, machine-assisted draft, native review pending); `gu` joins `COMPLETE_MESSAGES`. Scores and estimates unchanged. | | 2026-12-02 | minor | Gujarati (`gu`): Web: Gujarati can be selected as the interface language; the web fetches Noto Sans Gujarati when the interface needs it (`crates/text/web-fonts.txt`, `demand`), as it does Noto Sans Devanagari for Hindi. Status/error messages remain partial. Scores and estimates unchanged. | | 2026-11-25 | patch | Arabic (`ar`): preparatory registration and 6-form CLDR plural routing; kept unavailable to users pending upstream `storytold/craft-i18n` catalog | | 2026-11-14 | minor | Gujarati (#6613): contributor proofreading completed for all 387 additions, with 11 wording corrections; 4,673 reviewed catalog rows. Status/error messages remain partial; web selection requires a bundled Gujarati face. Scores and estimates unchanged. | diff --git a/docs/roadmap.md b/docs/roadmap.md index 2aa55bceee..db83731dbf 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -28,7 +28,7 @@ > Blend redraw update (#5179): renderer bounds include spine-placed keys and steps; both focused CPU regressions pass. Scores and estimates unchanged. -> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (2026-12-02); with 155 menu, label and undo rows added the same day the catalog has 10,887 rows; all machine-assisted, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts include Noto Sans Gujarati as an optional `Gujr` fallback, and since 2026-12-02 the web build fetches it when the interface needs it (`crates/text/web-fonts.txt`, `demand`), so Gujarati can be selected on the web. Scores and estimates unchanged. +> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,946 `@msg` and 56 `@msgplural` rows (2026-12-02); with 155 menu, label and undo rows added the same day the catalog has 10,890 rows; all machine-assisted, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts include Noto Sans Gujarati as an optional `Gujr` fallback, and since 2026-12-02 the web build fetches it when the interface needs it (`crates/text/web-fonts.txt`, `demand`), so a web build made with `CRAFT_FONTS_DIR` pointing at a craft-fonts checkout that has Noto Sans Gujarati offers Gujarati; a web build without it does not. Scores and estimates unchanged. ## Feature submission evidence @@ -84,7 +84,7 @@ M7 type: Touch Type moves a right-to-left character along its line and up from i | Date | Change | Summary | |---|---|---| -| 2026-12-02 | minor | Gujarati: status and error messages translated (4,924 new `@msg`/`@msgplural` rows, machine-assisted draft, native review pending); `gu` joins `COMPLETE_MESSAGES`. Scores and estimates unchanged. | +| 2026-12-02 | minor | Gujarati: status and error messages translated (4,926 new `@msg`/`@msgplural` rows, machine-assisted draft, native review pending); `gu` joins `COMPLETE_MESSAGES`. Scores and estimates unchanged. | | 2026-11-26 | minor | Show Missing Links in View and the Links panel marks missing linked images and placed documents on the canvas; the link watcher scans them in the background, so turning it on never waits on a file; transient overlays stay out of artwork, export and undo history; command API controls and lists markers (#5547). Scores and estimates unchanged. | | 2026-11-24 | minor | G12: History row context menus use shared Craft List and Menu controls after rebasing onto the panel migration. App-specific actions retain the chosen snapshot across pending edits and dismiss on document switches; keyboard context requests and focus restoration use the shared runtime. Regression cases retained (#8845); scores and estimates unchanged. | | 2026-11-21 | minor | G12/M14: History row context menus retain the chosen snapshot while the menu is open and pending edits settle; jumps settle typing before counting undo/redo, and discarded states report that they are unavailable. Shift+F10 opens the focused row menu, Escape restores row focus, and switching documents dismisses the popup. History checklist, area and milestone evidence updated (#8845); scores and estimates unchanged. | @@ -171,7 +171,7 @@ Checked 2026-10-10 from the code, tests and open issues; no workflow fails, so V Hindi interface follow-up (2026-11-06): the catalog and zero/one plural rule are implemented; native wording review, layout checks and a web Devanagari font remain. [Notes](localization-hi.md). -Gujarati interface follow-up (2026-11-14): the catalog and zero/one plural rule are implemented. The original 4,286 rows remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages are translated (2026-12-02, machine-assisted, native review pending). Since 2026-12-02 the web fetches Noto Sans Gujarati when the interface needs it, so Gujarati can be selected on the web. +Gujarati interface follow-up (2026-11-14): the catalog and zero/one plural rule are implemented. The original 4,286 rows remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages are translated (2026-12-02, machine-assisted, native review pending). Since 2026-12-02 the web fetches Noto Sans Gujarati when the interface needs it, so a web build made with `CRAFT_FONTS_DIR` pointing at a craft-fonts checkout that has Noto Sans Gujarati offers Gujarati; a web build without it does not. ## Current focus diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 99bb158257..9481d51914 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -37,7 +37,7 @@ Native saves on Unix flush the destination directory after writing or replacing > Blend redraw update (#5179): renderer bounds include spine-placed keys and steps; both focused CPU regressions pass. Scores and estimates unchanged. -> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (2026-12-02); with 155 menu, label and undo rows added the same day the catalog has 10,887 rows; all machine-assisted, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts include Noto Sans Gujarati as an optional `Gujr` fallback, and since 2026-12-02 the web build fetches it when the interface needs it (`crates/text/web-fonts.txt`, `demand`), so Gujarati can be selected on the web. Scores and estimates unchanged. +> **Gujarati status (2026-11-14, #6613):** 4,673 catalog rows: the original 4,286 remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,946 `@msg` and 56 `@msgplural` rows (2026-12-02); with 155 menu, label and undo rows added the same day the catalog has 10,890 rows; all machine-assisted, native review pending; `gu` is in `COMPLETE_MESSAGES`. The pinned CI/release fonts include Noto Sans Gujarati as an optional `Gujr` fallback, and since 2026-12-02 the web build fetches it when the interface needs it (`crates/text/web-fonts.txt`, `demand`), so a web build made with `CRAFT_FONTS_DIR` pointing at a craft-fonts checkout that has Noto Sans Gujarati offers Gujarati; a web build without it does not. Scores and estimates unchanged. ## Feature submission evidence @@ -133,7 +133,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard | Date | Change | Summary | |---|---|---| -| 2026-12-02 | minor | Gujarati: status and error messages translated (4,924 new `@msg`/`@msgplural` rows, machine-assisted draft, native review pending); `gu` joins `COMPLETE_MESSAGES`. Scores and estimates unchanged. | +| 2026-12-02 | minor | Gujarati: status and error messages translated (4,926 new `@msg`/`@msgplural` rows, machine-assisted draft, native review pending); `gu` joins `COMPLETE_MESSAGES`. Scores and estimates unchanged. | | 2026-11-26 | minor | Show Missing Links in View and the Links panel marks missing linked images and placed documents on the canvas; the link watcher scans them in the background, so turning it on never waits on a file; transient overlays stay out of artwork, export and undo history; command API controls and lists markers (#5547). Scores and estimates unchanged. | | 2026-11-25 | minor | Document Info › Objects: total enclosed area (`pathArea` in pt²) for closed and compound paths (holes subtracted per fill rule; guides and open paths left out) and formatted Path Area in document units (#6965). Worked out only when the request covers Objects (`pathArea` null otherwise or with `pathArea: false`); the panel asks for it only while Objects or All Categories is shown. Tests: `info_gives_the_paths_total_area`, `info_works_out_the_path_area_only_for_the_objects_category`, `the_path_area_is_worked_out_only_while_objects_is_shown`, `format_area_formats_and_trims_cleanly`. Scores and estimates unchanged. | | 2026-11-24 | minor | G12: History row context menus use shared Craft List and Menu controls after rebasing onto the panel migration. App-specific actions retain the chosen snapshot across pending edits and dismiss on document switches; keyboard context requests and focus restoration use the shared runtime. Regression cases retained (#8845); scores and estimates unchanged. | @@ -1289,7 +1289,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - Swedish messages (2026-11-13): the Swedish (`sv`) catalog has an `@msg` row for 464 of the 628 status and error messages the untranslated report listed for it; 162 messages that no complete-message catalog translates, 36 composite font errors among them, are not translated yet, and two unknown-parameter errors that start with the `{within}` placeholder stay in English, as does `{name} must be {lo}–{hi}{unit} (got {v})`, whose existing row can't match because two of its placeholders sit side by side; the rows keep their placeholders, backticked names, quoted values and command ids; native review remains; scores and estimates unchanged. - Window › Toolbars › Keep Tools Beside the Canvas, a VectorCraft layout option that is off by default, docks the Tools panel between left-side panels and the canvas instead of at the window's left edge, and workspaces keep the setting. A floating Tools panel dropped on the canvas's left edge, right of panels docked on the left, docks there and turns the setting on, and one dropped on the window's left edge docks there and turns it off; with no panels docked on the left, a drop leaves the setting as it is (#7837). Scores are unchanged (`window.toolsBesideCanvas`; `docked_tools_keep_the_window_edge_unless_kept_beside_the_canvas`, `tools_dropped_on_a_left_edge_dock_there_and_the_setting_follows`, `tools_dropped_where_the_left_edges_overlap_keep_the_setting`, `tools_dropped_beside_a_collapsed_left_dock_follow_the_strip_dropped_on`). - Hindi (2026-11-06): Hindi (`hi`): 7,877-row machine-assisted catalog, zero/one singular plurals, desktop font fallback and optional Devanagari craft-fonts fallback; all 55 translation tests pass; native review and a web font remain; scores and estimates unchanged. [Terminology and limitations](localization-hi.md). - - Gujarati (2026-11-14, #6613): `gu` had 4,673 catalog rows on 2026-11-14 (10,887 on 2026-12-02), zero/one singular plurals, installed desktop font fallback and support for optional `Gujr` craft-font faces. The original 4,286 rows remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,944 `@msg` and 56 `@msgplural` rows (2026-12-02); with 155 menu, label and undo rows added the same day the catalog has 10,887 rows; all machine-assisted, native review pending; `gu` is in `COMPLETE_MESSAGES`. Since 2026-12-02 the web fetches Noto Sans Gujarati when the interface needs it, so Gujarati can be selected on the web. Current-head validation is recorded in the PR; scores and estimates unchanged. + - Gujarati (2026-11-14, #6613): `gu` had 4,673 catalog rows on 2026-11-14 (10,890 on 2026-12-02), zero/one singular plurals, installed desktop font fallback and support for optional `Gujr` craft-font faces. The original 4,286 rows remain unchanged; all 387 additions are contributor-reviewed and approved, with 11 wording corrections. Status and error messages: 4,946 `@msg` and 56 `@msgplural` rows (2026-12-02); with 155 menu, label and undo rows added the same day the catalog has 10,890 rows; all machine-assisted, native review pending; `gu` is in `COMPLETE_MESSAGES`. Since 2026-12-02 the web fetches Noto Sans Gujarati when the interface needs it, so a web build made with `CRAFT_FONTS_DIR` pointing at a craft-fonts checkout that has Noto Sans Gujarati offers Gujarati; a web build without it does not. Current-head validation is recorded in the PR; scores and estimates unchanged. - Hindi wording (2026-11-13): rows outside the plug-in messages keep their English's meaning, quantities and clauses, and use the catalog's save, swatch, crop, resolution, path and type terms; a test checks those terms and the point unit in every row; native review remains; scores and estimates unchanged. - Hindi word senses (2026-11-13): 85 labels and messages use the interface sense of their English: Desired is वांछित and the range message keeps both comparisons, rulers are रूलर, text characters कैरेक्टर, vector points पॉइंट, fills फ़िल्स and High Contrast उच्च कंट्रास्ट; the glossary test rejects the unrelated senses in every row; native review remains; scores and estimates unchanged. - Hindi terms (2026-11-13): every row that names a variable (data merge, variable fonts and widths, environment variables) says वेरिएबल, and joining paths, anchor points, point type and lines says जोड़ें instead of शामिल हों, which stays for joining the community; a test checks both terms in every row; scores and estimates unchanged. From 05c99d7f5818b6341e565917090b5d33eaf90613 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 07:43:04 -0800 Subject: [PATCH 42/62] Stroke: screen readers step and set the Profile drop-down again The framework's Select, which the Profile control used before, reports the picked row's place in the list as a numeric value and takes AccessKit's SetValue, Increment and Decrement. The new drop-down set only a text value and never read take_set_value, so a screen reader could no longer step or set the profile. ProfileSelect::access now sets access.numeric with the row's place and label, and update takes SetValue and the step moves before its focus check, as Select does. --- .../src/panels/stroke/profile_picker.rs | 33 +++++++++++++++---- .../ui-egui/src/panels/tests_strokedepth.rs | 23 +++++++++++++ crates/ui-egui/src/tests/panel_harness.rs | 14 ++++++++ 3 files changed, 63 insertions(+), 7 deletions(-) diff --git a/crates/ui-egui/src/panels/stroke/profile_picker.rs b/crates/ui-egui/src/panels/stroke/profile_picker.rs index 2768b816d4..0031339a4a 100644 --- a/crates/ui-egui/src/panels/stroke/profile_picker.rs +++ b/crates/ui-egui/src/panels/stroke/profile_picker.rs @@ -9,14 +9,14 @@ use std::collections::HashSet; use craft::behavior::nav::{StepResult, ValueAxes, ValueSteps}; use craft::behavior::overlay::MinWidth; use craft::behavior::{ - CancelReason, ColumnKey, ColumnWidth, DisplayOrder, GesturePhase, HitLevel, HitPriority, IconId, ItemSource, Metrics, NavMove, PartKey, - Proposal, Selection, Sense, TypeAhead, WheelPhase, wheel_step, + CancelReason, ColumnKey, ColumnWidth, DisplayOrder, GesturePhase, HitLevel, HitPriority, IconId, ItemSource, Metrics, NavMove, PartKey, Proposal, + Selection, Sense, TypeAhead, WheelPhase, wheel_step, }; use craft::ui::contract::overlay::OverlayFit; use craft::ui::contract::{ Access, ActivateOn, Bind, BindMut, CollectionEvent, ColumnSpec, Common, Component, Cx, Edit as _, EditResponse, Focus as _, HoverLead, Input, - LeadOnOpen, LeadSource, MeasureCx, Outcome, Overlay, OverlayUi, Overlays as _, PaintUi, PartsCx, Pointer as _, Popup, PopupHandle, Props, Role, - Show as _, ShowCollection as _, ShowContainer as _, WordSetCx as _, + LeadOnOpen, LeadSource, MeasureCx, Numeric, Outcome, Overlay, OverlayUi, Overlays as _, PaintUi, PartsCx, Pointer as _, Popup, PopupHandle, + Props, Role, Show as _, ShowCollection as _, ShowContainer as _, WordSetCx as _, }; use craft::ui::layout_components::Stack; use craft::ui::list::{List, ListRow, RowEvent, ThumbAspect, ThumbSize}; @@ -385,8 +385,17 @@ impl Component for ProfileSelect { if popup.is_open(cx) { return; } - if !cx.is_focused() { - return; + // A screen reader sets the pick by its place in the list, and steps it with Increment and Decrement (moves), + // without the keyboard focus, as the framework's `Select` takes them. + if let Some(at) = cx.intents().take_set_value() { + if cx.in_wheel_run() { + cx.commit(); + } + let to = (at.round().max(0.0) as usize).min(self.entries.len().saturating_sub(1)); + if let Some(entry) = self.entries.get(to) { + cx.propose(entry.id.clone()); + cx.commit(); + } } while let Some((mv, _)) = cx.intents().take_move() { if cx.in_wheel_run() { @@ -397,6 +406,9 @@ impl Component for ProfileSelect { cx.commit(); } } + if !cx.is_focused() { + return; + } if let Some(typed) = cx.intents().take_text() { let folder = cx.env.folder(); let now = cx.ctx.input(|i| i.time); @@ -473,9 +485,16 @@ impl Component for ProfileSelect { } } + /// The picked entry's place in the list, read as its label, so a screen reader steps and sets it. A value no + /// entry holds reads as the label the face shows. fn access(&self, access: &mut Access, cx: &Cx<'_, Self>) { let (text, _, _) = self.display_for(cx.value()); - access.value(text); + let range = 0.0..=self.entries.len().saturating_sub(1) as f64; + let numeric = match cx.value().and_then(|id| self.entries.iter().position(|e| &e.id == id)) { + Some(at) => Numeric::new(at as f64, range), + None => Numeric::empty(range), + }; + access.numeric(numeric.text(text).step(1.0)); } fn paint(&mut self, ui: &mut PaintUi<'_>, cx: &Cx<'_, Self>) { diff --git a/crates/ui-egui/src/panels/tests_strokedepth.rs b/crates/ui-egui/src/panels/tests_strokedepth.rs index b5edd967d4..17acf6f994 100644 --- a/crates/ui-egui/src/panels/tests_strokedepth.rs +++ b/crates/ui-egui/src/panels/tests_strokedepth.rs @@ -512,3 +512,26 @@ fn dropdown_keeps_sentinel_named_profile_interactive_and_commits_tab_preview() { panel.scroll_at(face_center, -0.5); assert_ne!(panel.value_role("Profile", Role::COMBO_BOX).as_deref(), Some("Lens")); } + +#[test] +fn a_screen_reader_sets_and_steps_the_profile() { + use craft::ui::contract::Role; + use craft::ui::testing::focus::AccessActionKind; + + let mut panel = Panel::new(app_with_line(), stroke::profile_select); + let picked = |panel: &Panel| current_stroke(&panel.app()).and_then(|s| s.profile); + let preset = |id: &str| WidthProfile::PRESETS.iter().find(|p| p.id == id).map(|p| p.points.to_vec()); + + // The value is the row's place in the list: Uniform, Lens, Taper Start, ... + let numeric = panel.numeric_role("Profile", Role::COMBO_BOX).expect("the drop-down reports a numeric value"); + assert_eq!(numeric.value, Some(0.0), "Uniform is the first row"); + assert_eq!(*numeric.range.end(), (WidthProfile::PRESETS.len() - 1) as f64, "the range ends at the last row"); + assert_eq!(numeric.text.as_deref(), Some("Uniform"), "the value reads as the row's label"); + panel.access_role("Profile", Role::COMBO_BOX, AccessActionKind::SetValue(2.0)); + assert_eq!(picked(&panel).map(|p| p.points), preset("taperStart"), "SetValue picks the third row"); + assert_eq!(panel.numeric_role("Profile", Role::COMBO_BOX).and_then(|n| n.value), Some(2.0), "the value follows the pick"); + panel.access_role("Profile", Role::COMBO_BOX, AccessActionKind::Decrement); + assert_eq!(picked(&panel).map(|p| p.points), preset("lens"), "Decrement picks the row above"); + panel.access_role("Profile", Role::COMBO_BOX, AccessActionKind::Increment); + assert_eq!(picked(&panel).map(|p| p.points), preset("taperStart"), "Increment picks the row below"); +} diff --git a/crates/ui-egui/src/tests/panel_harness.rs b/crates/ui-egui/src/tests/panel_harness.rs index 7d347119d3..e8c2ca4c21 100644 --- a/crates/ui-egui/src/tests/panel_harness.rs +++ b/crates/ui-egui/src/tests/panel_harness.rs @@ -298,6 +298,15 @@ impl Panel { self.after(); } + /// A screen reader's action `kind` on the control of `role` named `name`. + pub(crate) fn access_role(&mut self, name: &str, role: Role, kind: craft::ui::testing::focus::AccessActionKind) { + self.frame(); + let target = self.look_role(name, role); + self.take_input(); + self.fixture.access(kind, &target); + self.after(); + } + /// Turns the wheel by `dy` points over `at`. pub(crate) fn scroll_at(&mut self, at: Pos2, dy: f32) { self.frame_with(vec![Event::PointerMoved(at)]); @@ -486,6 +495,11 @@ impl Panel { self.fixture.tree().value_of(self.look_role(name, role).node).map(str::to_owned) } + /// The numeric value, range and step that the control of `role` named `name` reports to screen readers. + pub(crate) fn numeric_role(&self, name: &str, role: Role) -> Option { + self.fixture.tree().numeric_of(self.look_role(name, role).node) + } + /// Whether a label named `name` has exactly `value`, where a field's static label may share its name and role. pub(crate) fn label_has_value(&self, name: &str, value: &str) -> bool { let tree = self.fixture.tree(); From 238870c3e1cce669715412bce2bd29bc4113527f Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 07:44:28 -0800 Subject: [PATCH 43/62] Stroke: describe the Profile drop-down in its own terms The ProfileSelect doc comment named another vendor's app; it now says what the drop-down holds. The closed and open widths, the Page Up/Down step and the saved-row thumbnail size are documented consts, and the thumbnail's size and inset are no longer literals at their call sites. --- .../ui-egui/src/panels/stroke/profile_picker.rs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/crates/ui-egui/src/panels/stroke/profile_picker.rs b/crates/ui-egui/src/panels/stroke/profile_picker.rs index 0031339a4a..9e0bfff157 100644 --- a/crates/ui-egui/src/panels/stroke/profile_picker.rs +++ b/crates/ui-egui/src/panels/stroke/profile_picker.rs @@ -32,9 +32,17 @@ use craft::ui::style::{ComponentStyle, StyleCx, SurfaceLook}; use egui::{Rect, Response, Vec2}; const PROFILE_COL: ColumnKey = ColumnKey::new("profile"); +/// The narrowest the closed control and the open list get, in points: room for a built-in's thumbnail and its +/// longest label. const DROPDOWN_MIN_WIDTH: f32 = 132.0; +/// The widest the closed control gets, in points, however long the picked profile's name. const CLOSED_MAX_WIDTH: f32 = 145.0; +/// The rows Page Up and Page Down step the closed control by. const PAGE_ROWS: isize = 12; +/// The size of a saved profile's thumbnail in the open list, in points. +const SAVED_THUMB: Vec2 = Vec2::new(80.0, 20.0); +/// The space left above and below a saved profile's thumbnail inside its row, in points. +const SAVED_THUMB_INSET: f32 = 2.0; const FACE: PartKey = PartKey::new("face"); const POPUP: &str = "list"; const LIST_SALT: &str = "items"; @@ -87,7 +95,7 @@ impl ProfileGraphic { } fn sample() -> Self { - Self::new(|_, _, _| {}, None, Vec2::new(80.0, 20.0)) + Self::new(|_, _, _| {}, None, SAVED_THUMB) } } @@ -113,7 +121,7 @@ impl Component for ProfileGraphic { fn paint(&mut self, ui: &mut PaintUi<'_>, cx: &Cx<'_, Self>) { let painter = ui.content_painter(cx); - (self.paint)(&painter, cx.rect.shrink2(Vec2::new(0.0, 2.0)), self.points.as_deref()); + (self.paint)(&painter, cx.rect.shrink2(Vec2::new(0.0, SAVED_THUMB_INSET)), self.points.as_deref()); } fn finish(self, cx: Cx<'_, Self>) -> Response { @@ -188,7 +196,8 @@ struct PickerMemory { previewed: bool, } -/// Custom dropdown for stroke width profiles with Illustrator-style management footer and reordering. +/// The Profile drop-down: the width profile list, with a footer that adds the stroke's profile, deletes a saved one +/// and resets the list. #[derive(Component, Props)] #[component(overlay, sample = ProfileSelect::sample)] pub(super) struct ProfileSelect { @@ -586,7 +595,7 @@ fn show_popup_body( } else { ListRow::new("").accessible_name(entry.label.clone()).option().cells(icx.cells()).cell_field( PROFILE_COL, - ProfileGraphic::new(paint, points, Vec2::new(80.0, 20.0)), + ProfileGraphic::new(paint, points, SAVED_THUMB), |_| {}, ) } From 87e65b90d39fe66f7417f7b3c8e16007abf85710 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 07:45:43 -0800 Subject: [PATCH 44/62] Docs: the Profile drop-down's footer docs/mcp.md's Width profiles section says which commands the footer's Add to Profiles, Delete Profile and Reset Profiles run, and the progress doc gets a line for the footer with its tests. --- docs/mcp.md | 3 +++ docs/target-app-parity.md | 1 + 2 files changed, 4 insertions(+) diff --git a/docs/mcp.md b/docs/mcp.md index 4407509e2b..46d511dd1b 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -9157,6 +9157,9 @@ right]`) and `current`, the selected stroke's profile (`"custom"` when it isn't `stroke.widthProfile.add {name?}` saves the selected stroke's variable width (default name "Width Profile N"), `stroke.widthProfile.delete {name?}` removes a saved one (default: the selected stroke's; built-ins can't be deleted) and `stroke.widthProfile.reset` removes every saved one. `stroke.set {profile}` takes a built-in id or a saved name. +In the app, the footer of the Profile drop-down (in the Stroke panel, the Control bar and the Properties panel) runs +the same three commands: Add to Profiles asks for a name first, Delete Profile removes the selected stroke's saved +profile, and Reset Profiles asks for confirmation. Right-clicking a saved profile's row offers Delete Profile for it. ```json {"name":"run_command","arguments":{"command":"stroke.widthProfile.add","params":{"name":"Ribbon"}}} diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 89a82c2607..4bc4fc4b9b 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -945,6 +945,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - **Width-point creation (G1):** double-click a stroked segment with the Width tool to open Width Point Edit using sampled side widths. OK creates the point and optionally adjusts adjoining widths in one undo step. Cancel or Delete discards a prospective point without changing the document or redo history. Command and pointer tests cover profiles, compound paths, adjoining adjustment, existing-point editing and Undo/Redo. Message-catalog checks and full CI passed; the original capture verifies opening and Cancel, and the dialog layout was reviewed (2026-10-13: 28 focused Width tests, all seven cargo xtask ci stages, and a headless opening/Cancel capture with original PNG review). [Variable-width strokes](https://helpx.adobe.com/illustrator/using/stroke-object.html). - **Escape deselects width points:** with the Width tool, Escape deselects the selected width points, on the key the reference app's [Default keyboard shortcuts](https://web.archive.org/web/20260726060015/https://helpx.adobe.com/illustrator/using/default-keyboard-shortcuts.html) page lists for deselecting a width point. The path, its widths and the undo history do not change. With no width point selected, Escape does what it does with the other tools, such as leaving isolation mode. - **Width profiles on brushed strokes:** brush art does not follow a stroke's width profile, so while every stroke the list edits draws with a brush, the Profile list in the Stroke panel, the Properties panel and the Control bar is dimmed and says why when hovered (VectorCraft's own rule while brushes ignore width profiles; art and pattern brushes that follow one are still missing). It opens no list while every one of those strokes is uniform, and only Uniform, which removes the profiles, while one has a profile. The Flip Along and Flip Across buttons beside it are off. The strokes are the ones `stroke.set` edits: the active Appearance stroke row in each selected object that has an equal row and the top stroke in the others, else a selected group's or compound shape's own stroke, else the objects' strokes. Images and symbol instances, which take no stroke from the list, do not count. A selection where some of them have no brush, or an object has no stroke, keeps the full list. The Width tool adds, edits and deletes no width points on a brushed stroke, and a press or a double-click on one says why in the status bar; without Shift it deselects the width points of other strokes, and the cursor over a brushed stroke offers no edit. A plain stroke under a selected brushed one stays reachable. Width points selected before their stroke took a brush show no handles, and Delete, Backspace and Escape act as if none were selected. Tests: `panels::tests_strokedepth::{dropdown_is_dimmed_while_the_brush_keeps_its_size, the_active_stroke_row_decides_whether_the_dropdown_is_dimmed, a_groups_own_brushed_stroke_dims_the_dropdown, selecting_another_object_without_an_edit_updates_the_dimming, flip_buttons_leave_a_brushed_strokes_profile_alone, mixed_selection_dims_the_dropdown_only_when_every_stroke_has_a_brush, the_hover_text_is_the_width_tools_status_message}`, `panels::properties::tests::the_width_profile_of_a_brushed_stroke_offers_only_uniform`, `tests::appearance::{brushed_strokes_profiled_reads_the_strokes_stroke_set_edits, brushed_strokes_profiled_reads_a_compound_shapes_own_stroke, brushed_strokes_profiled_reads_a_targeted_layers_active_stroke_row, brushed_strokes_profiled_leaves_out_symbol_instances, brushed_strokes_profiled_falls_back_to_the_top_stroke_where_the_active_row_has_no_match}`, `tests::widthtool::the_width_tool_says_why_it_leaves_a_brushed_compound_path_alone`, `distort::width::tests::{brushed_stroke_is_left_alone_with_a_reason, delete_leaves_the_width_points_of_a_brushed_stroke, a_press_on_a_brushed_stroke_deselects_and_its_cursor_offers_no_edit, shift_on_a_brushed_stroke_keeps_the_selected_width_points, a_plain_stroke_under_a_selected_brushed_one_stays_reachable, a_brush_applied_under_a_still_pointer_takes_away_the_hover, a_brush_added_to_the_library_is_seen_at_the_next_revision}`. +- **Profile drop-down footer:** the Profile drop-down in the Stroke panel, the Control bar and the Properties panel ends in a footer with Add to Profiles, Delete Profile and Reset Profiles, the controls the [Apply stroke on an object](https://helpx.adobe.com/illustrator/using/stroke-object.html) page places at the bottom of the width profile list under "Save width profiles". Add asks for a name, Delete removes the selected stroke's saved profile (built-in profiles stay), and Reset asks for confirmation before it removes the saved profiles. Right-clicking a saved row also offers Delete Profile. The drop-down reports the picked row's place to screen readers, which can step and set it. Tests: `panels::tests_strokedepth::{dropdown_footer_manages_profiles_and_confirms_reset, dropdown_row_menu_deletes_saved_profiles_only, a_screen_reader_sets_and_steps_the_profile}`. - **Smooth widths between width points (#5714):** a variable-width stroke changes width along a smooth curve from one width point to the next, where it used to run in a straight line and turn a corner at each point. The public description is that the path "gradually gets wider or narrower from one point to the next" in "a flowing, continuous curve", and that stacked points make a sharp break ([Peachpit, Expressive Strokes](https://www.peachpit.com/articles/article.aspx?p=2979069)); the exact curve is not documented, so each side follows a monotone cubic (Fritsch–Carlson): no kink at a point, flat where a point is wider or narrower than both neighbours, never past the points either side, points on one line kept on it. The outline samples straight runs between width points closely enough to follow the curve to the drawing tolerance (at most 64 samples per span and 4,096 per piece). Presets with a middle point (Lens, Pinch, Teardrop, Wave) look softer; two-point tapers are unchanged. Tests: `appearance::profile::tests::{widths_run_smoothly_through_width_points, widths_never_pass_the_points_either_side, a_step_ends_the_curve_on_each_side, widest_covers_every_width_along_the_profile}`, `stroke::width::tests::{a_straight_run_follows_the_curve_between_width_points, samples_between_width_points_are_capped}`. - **Stroke gradients where a variable-width stroke meets itself (#5960):** with a gradient along or across a stroke that has a width profile, where the stroke crosses itself the later part paints over the earlier one only where the two overlap, and a narrow part running close beside a wide one leaves its edge alone. Each slice of the gradient reaches as far as the stroke is wide where it sits (for a dashed stroke, as wide as it gets within the reach of a cap or dot, found in one pass along the path, so a densely flattened path costs no more per point), where it used to reach as far as the stroke is wide anywhere and paint a square of its colour over the wider part. Strokes without a profile are unchanged. Tests: `stroke::tests_gradient::a_narrow_pass_over_a_wide_one_paints_only_where_they_overlap`, `a_narrow_pass_beside_a_wide_one_leaves_its_edge_alone`, `a_densely_flattened_dashed_pass_beside_a_wide_one_leaves_its_edge_alone` and `widest_ahead_is_the_widest_within_the_window`, with the existing coverage tests (joins, caps, arrowheads, profiles, dashes, aligned strokes). - **Width strokes zoomed out (#995):** a stroke with a width profile keeps its shape while the view zooms out. The canvas keeps a hairline visible (at least half a device pixel); for a profiled stroke it is the profile's widest point that gets that minimum, not the weight, so a 1 pt stroke with a 6x width point is no longer drawn twice as thick at 25% zoom than at 100%. Plain strokes are unchanged. Test: `render::tests::widthzoom`. From 8415ba1eb6f49a2f582b0c016b40d88ed50587ce Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 09:07:06 -0800 Subject: [PATCH 45/62] Paste: the text is read before the late paste's bitmap check When a late files read finds no copied files and the Copy made here was a bitmap, Paste read the bitmap to compare it with the Copy before it read the text. A bitmap read that gets no answer leaves the clipboard worker busy, so the text read then failed at once and Paste took the internal Copy instead of the text another app put there. The text is now read first and kept for the paste. --- apps/vectorcraft/src/clipboard.rs | 38 +++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/apps/vectorcraft/src/clipboard.rs b/apps/vectorcraft/src/clipboard.rs index c19d993768..b1d451b693 100644 --- a/apps/vectorcraft/src/clipboard.rs +++ b/apps/vectorcraft/src/clipboard.rs @@ -1206,7 +1206,8 @@ mod portable { /// the same read is made again, since the clipboard may have changed hands meanwhile. /// `None`, so the paste takes the internal clipboard, when that answer doesn't come or the /// clipboard, read as `ours` was written (its text or its bitmap), holds what `ours` put - /// there; when that takes a read of its own, copied files are read before it. Otherwise + /// there; when that takes a read of its own, copied files are read before it, and before a + /// bitmap read the text as well. Otherwise /// the clipboard is read as /// [`Clipboard::read_now_or_later`] and the paste read it, the new answer standing in for /// the read it answers: copied files, else @@ -1232,6 +1233,7 @@ mod portable { None => None, }; let mut check = None; + let mut text_first = None; let mut files_read = false; if let Some(written) = written.filter(|w| answer.as_ref().is_some_and(|a| a.request() != *w)) { // Copied files are read first: a Copy made here writes none, and a read of the @@ -1241,6 +1243,11 @@ mod portable { return Some(f); } files_read = true; + // The text is read before a bitmap check for the same reason: a bitmap read that + // gets no answer leaves the worker busy for the text's read. + if written == Request::Image && mimes.contains(&TEXT) && !answer.as_ref().is_some_and(|a| a.request() == Request::Text) { + text_first = Some(fresh(Request::Text)); + } check = Some(fresh(written)); } let held = match (check.as_ref().or(answer.as_ref()), ours) { @@ -1251,7 +1258,11 @@ mod portable { if held { return None; } - let mut read = |request: Request| match answer.take_if(|a| a.request() == request).or_else(|| check.take_if(|a| a.request() == request)) { + let mut read = |request: Request| match answer + .take_if(|a| a.request() == request) + .or_else(|| check.take_if(|a| a.request() == request)) + .or_else(|| text_first.take_if(|a| a.request() == request)) + { Some(answer) => answer, None => fresh(request), }; @@ -2154,6 +2165,29 @@ mod portable { assert_eq!(*asked.lock().unwrap(), [Request::Text, Request::Text, Request::Files]); } + #[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "dragonfly", target_os = "netbsd", target_os = "openbsd"))] + #[test] + fn a_paste_after_an_unanswered_files_read_reads_the_text_before_the_bitmap() { + let asked = std::sync::Arc::new(std::sync::Mutex::new(Vec::new())); + let seen = asked.clone(); + // The owner offers text and no files; a bitmap read would get no answer in its wait. + let (mut cb, release) = slow_owner(move |request| { + seen.lock().unwrap().push(request); + match request { + Request::Files => Answer::Files(vec![]), + Request::Text => Answer::Text(Ok("copied elsewhere".into())), + Request::Image => Answer::failed(request, "none".into()), + } + }); + assert!(cb.read_waiting(Request::Files, Duration::ZERO).files().is_empty()); + let unanswered = cb.unanswered(&vectorcraft_engine::cmd::clipboard::PASTE_ORDER).expect("the files read is kept for the paste"); + let paste = std::thread::spawn(move || unanswered.paste(Some(&Ours::Image(2, 1)), &vectorcraft_engine::cmd::clipboard::PASTE_ORDER)); + drop(release); + assert_eq!(paste.join().ok().flatten().map(|f| (f.mime, f.data)), Some((TEXT, b"copied elsewhere".to_vec()))); + // The text was read before the bitmap read that could leave the worker busy. + assert_eq!(*asked.lock().unwrap(), [Request::Files, Request::Files, Request::Text, Request::Image]); + } + #[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "dragonfly", target_os = "netbsd", target_os = "openbsd"))] #[test] fn a_late_answer_to_an_ownership_check_is_pasted_only_while_it_is_awaited() { From a1e9779fba1212894cd9b518bd026aac1a33c91c Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 07:59:53 -0800 Subject: [PATCH 46/62] Save: a file comparison waits for a drag in another document and wakes after a dialog closes A save whose file comparison answered made its document active even while a drag went on in the active document, and the switch canceled the drag. The save now waits until the drag ends (no interaction and no held press in the active document), as it already waited for another document's dialog or file picker. A save that waited for a dialog went on only at the next input after the dialog closed, because the dialogs close in the UI pass, after the save pump has run. The pass that closes the dialog, or ends the drag, now asks for one more frame, and no frames are asked for while the save waits. --- crates/ui-egui/src/app.rs | 1 + crates/ui-egui/src/io/save.rs | 40 ++++++++++++++---- crates/ui-egui/src/tests/save.rs | 71 ++++++++++++++++++++++++++++++++ 3 files changed, 104 insertions(+), 8 deletions(-) diff --git a/crates/ui-egui/src/app.rs b/crates/ui-egui/src/app.rs index b769dac802..f2ca6fae4d 100644 --- a/crates/ui-egui/src/app.rs +++ b/crates/ui-egui/src/app.rs @@ -777,6 +777,7 @@ impl VectorcraftApp { self.handle_input(&ctx); self.ui_frame(ui); self.window_keys(&ctx); + io::save::after_ui(self, &ctx); // What the canvas, a panel, a dialog or a window key changed in this pass reaches // the plug-ins that react to it now, since an idle app draws no further frame; a // line a handler wrote shows in the next one. The handlers' time counts toward the diff --git a/crates/ui-egui/src/io/save.rs b/crates/ui-egui/src/io/save.rs index 1fb7d89d3a..f373ed900b 100644 --- a/crates/ui-egui/src/io/save.rs +++ b/crates/ui-egui/src/io/save.rs @@ -71,6 +71,10 @@ pub(crate) struct Saves { /// The saves waiting for a comparison of their document's file with those bytes. #[cfg(not(target_arch = "wasm32"))] checks: HashMap, + /// A comparison's save waited in the last pass for a dialog, a file picker or a gesture in + /// another document: [`after_ui`] asks for a frame once it no longer has to. + #[cfg(not(target_arch = "wasm32"))] + held: bool, /// The files written beside each document's file, which its next save replaces. pub(crate) written_beside: HashMap>, /// The files the OK of the replace question allows the save it runs again to replace. @@ -89,6 +93,8 @@ impl Saves { contents: super::saved_contents::SavedContents::new(), #[cfg(not(target_arch = "wasm32"))] checks: HashMap::new(), + #[cfg(not(target_arch = "wasm32"))] + held: false, watch: FileWatch::new(wake), written_beside: HashMap::new(), replace_files_ok: Vec::new(), @@ -158,17 +164,34 @@ impl Saves { /// Whether file comparisons need another frame to collect their answers. #[cfg(not(target_arch = "wasm32"))] pub(crate) fn checks_pending(app: &VectorcraftApp) -> bool { - // A save waiting for a dialog goes on in the frame that closes the dialog. - app.saves.checks.keys().any(|uid| !under_dialog(app, *uid)) + // A save waiting for a dialog or a gesture goes on in the frame after the one that ends it ([`after_ui`]). + app.saves.checks.keys().any(|uid| !held(app, *uid)) } -/// Whether a dialog or file picker of a document other than `uid` is open: writing document -/// `uid`'s save would activate it under the dialog. +/// Whether document `uid`'s save has to wait: writing it activates its document, which would +/// put it under an open dialog or file picker of another document, or cancel a drag in progress +/// in the active one. #[cfg(not(target_arch = "wasm32"))] -fn under_dialog(app: &VectorcraftApp, uid: u64) -> bool { - app.session.active().map(|d| d.uid) != Some(uid) && (app.any_dialog_open() || app.file_dialog_open()) +fn held(app: &VectorcraftApp, uid: u64) -> bool { + let active = app.session.active(); + active.map(|d| d.uid) != Some(uid) + && (app.any_dialog_open() || app.file_dialog_open() || active.is_some_and(|d| d.interaction.is_some()) || app.canvas.grab.is_some()) } +/// Asks for one frame when a save waited in the last pass and this pass's UI closed what it +/// waited for: the dialog pumps and the canvas run after [`pump`], so nothing else would. +#[cfg(not(target_arch = "wasm32"))] +pub(crate) fn after_ui(app: &mut VectorcraftApp, ctx: &egui::Context) { + if app.saves.held && app.saves.checks.keys().any(|uid| !held(app, *uid)) { + app.saves.held = false; + ctx.request_repaint(); + } +} + +/// The web has no saves that wait. +#[cfg(target_arch = "wasm32")] +pub(crate) fn after_ui(_: &mut VectorcraftApp, _: &egui::Context) {} + /// The web has no file comparisons to collect. #[cfg(target_arch = "wasm32")] pub(crate) fn checks_pending(_: &VectorcraftApp) -> bool { @@ -258,8 +281,9 @@ fn resume_checked(app: &mut VectorcraftApp, wait: bool) { continue; }; // Writing activates the save's document: while a dialog or file picker of another document - // is open, the answer stays in its channel for a later pass. - if !wait && under_dialog(app, uid) { + // is open, or a drag goes on in it, the answer stays in its channel for a later pass. + if !wait && held(app, uid) { + app.saves.held = true; continue; } let (scope, automated) = app.saves.done.get(&uid).map_or_else(|| (ScopeHandle::capture(), app.automation_asked()), |d| d.asked.clone()); diff --git a/crates/ui-egui/src/tests/save.rs b/crates/ui-egui/src/tests/save.rs index d6c1d0b34d..912626e647 100644 --- a/crates/ui-egui/src/tests/save.rs +++ b/crates/ui-egui/src/tests/save.rs @@ -725,3 +725,74 @@ fn a_comparison_waits_while_a_dialog_is_open_over_another_document() { assert!(unwritten, "nothing is written while the dialog is open"); assert!(written, "the save finishes once the dialog closes"); } + +/// A context whose first frames have run, so it asks for no more frames of its own. +fn settled() -> egui::Context { + let ctx = egui::Context::default(); + for _ in 0..10 { + if !ctx.has_requested_repaint() { + break; + } + ctx.run_ui(egui::RawInput::default(), |_| {}).textures_delta.clear(); + } + assert!(!ctx.has_requested_repaint(), "the context settled"); + ctx +} + +/// A save that waited for a dialog asks for a frame in the pass whose UI closes the dialog, since +/// its pump ran earlier in that pass and an idle app draws no other frame. +#[test] +fn a_comparison_held_by_a_dialog_asks_for_a_frame_once_the_dialog_closes() { + let (d, _path, mut app) = opened_then_put_back("compare-wake", true); + assert_eq!(app.run("file.save", json!({})).unwrap()["pending"], "checkingFile"); + app.run("file.new", json!({"width": 100, "height": 100})).unwrap(); + let prompt = craft::ui::dialog::StandardPrompt::changed_on_disk("other"); + app.dialogs().unwrap().with(|h| h.open(prompt)); + io::save::wait_for_answers(&mut app); + io::save::pump(&mut app, &egui::Context::default()); + let open = settled(); + io::save::after_ui(&mut app, &open); + let while_open = open.has_requested_repaint(); + // The dialog's own pump, which runs after the save's, takes its answer. + let id = open_dialogs(&app).pop().map(|d| d.id).expect("a dialog is open"); + let window = app.ui_ctx.clone().expect("a window context"); + app.dialogs().unwrap().with(|h| { + assert!(h.cancel_by_id(&window, id)); + let _ = h.take_by_id::(id); + }); + let closed = settled(); + io::save::after_ui(&mut app, &closed); + let after_close = closed.has_requested_repaint(); + io::save::wait_for_checks(&mut app); + crate::background::wait_all(&mut app); + let _ = std::fs::remove_dir_all(d); + assert!(!while_open, "no frame is asked for while the dialog is open"); + assert!(after_close, "a frame is asked for once the dialog has closed"); +} + +/// A comparison that answers while a drag goes on in another document waits for the drag to end, +/// so making the save's document active does not cancel the drag. +#[test] +fn a_comparison_waits_while_a_drag_goes_on_in_another_document() { + let (d, path, mut app) = opened_then_put_back("compare-under-drag", true); + let before = std::fs::read(&path).unwrap(); + assert_eq!(app.run("file.save", json!({})).unwrap()["pending"], "checkingFile"); + app.run("file.new", json!({"width": 100, "height": 100})).unwrap(); + app.begin_interaction("drag").unwrap(); + io::save::wait_for_answers(&mut app); + let ctx = egui::Context::default(); + io::save::pump(&mut app, &ctx); + let active = app.session.active_index(); + let dragging = app.session.active().is_some_and(|d| d.interaction.is_some()); + let unwritten = std::fs::read(&path).unwrap() == before; + // Once the drag ends, the save goes on and writes the file. + app.session.commit_interaction().unwrap(); + io::save::pump(&mut app, &ctx); + crate::background::wait_all(&mut app); + let written = std::fs::read(&path).unwrap() != before; + let _ = std::fs::remove_dir_all(d); + assert_eq!(active, Some(1), "the document with the drag stays active"); + assert!(dragging, "the drag is not canceled"); + assert!(unwritten, "nothing is written while the drag goes on"); + assert!(written, "the save finishes once the drag ends"); +} From 5d69721b428184f940291a3bd08c93da4d234546 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 09:12:33 -0800 Subject: [PATCH 47/62] Open: refuse a truncated RTF file, wait for other dialogs File > Open refuses an RTF file that ends inside a group as damaged instead of opening the text read before the end; File > Place still places that text. Binary data and bytes after the document's closing brace are skipped, as the reader skips them. Text Import Options for a file File > Open asks about now waits while any dialog is open, as Missing Fonts does, so the two never show at once. The File > Open filter test uses the extensions and formats this build reads, so it holds where no DWG decoder is built in. --- crates/engine/src/cmd/fileio/commands.rs | 2 +- crates/engine/src/cmd/place.rs | 4 +++ crates/engine/src/cmd/place/rtf.rs | 41 +++++++++++++++++++++++ crates/engine/src/tests/textimport.rs | 12 +++++-- crates/ui-egui/src/dialogs/text_import.rs | 32 +++++++++++++----- docs/file-format-parity.md | 8 ++--- docs/mcp.md | 2 +- 7 files changed, 84 insertions(+), 17 deletions(-) diff --git a/crates/engine/src/cmd/fileio/commands.rs b/crates/engine/src/cmd/fileio/commands.rs index 80ccbcf57c..d025da9f89 100644 --- a/crates/engine/src/cmd/fileio/commands.rs +++ b/crates/engine/src/cmd/fileio/commands.rs @@ -9,7 +9,7 @@ pub fn specs() -> Vec { "Open Document", [], None, - "{path | name | dataBase64 (a file's path, or its name with its bytes), pages?: \"2-3, 5\" (PDF/.ai: 1-based, default all; one artboard each) | page?: n, cropTo?: bounding|art|crop (default)|trim|bleed|media (the box each artboard gets; bounding: the art's bounds; trim: the bleed box round it becomes the document's bleed, and the artboards are 36 pt apart plus that bleed on both sides; a PDF-compatible file whose first PDF page's PieceInfo holds, in itself or nested up to four dictionaries deep counting PieceInfo, a key starting with AIPrivateData or AIPDFPrivateData, when its pages are imported as editable art rather than its editing copy restored, opens on its trim boxes with cropTo and crop omitted and on its crop boxes with cropTo: crop, or crop: crop and no cropTo), password? (encrypted PDFs; see document.pdfInfo), textAs?: text (default: point type per line, lines wrapped in a frame as area type where they lay out the same, in the file's fonts by name; missing ones are listed in warnings) | outlines (glyph paths), layers?: true (default: optional content groups become layers with their visibility, print state and lock — art that is off comes in as a hidden layer; other art goes to a layer per page; a PSD file's layers become layers holding their pixels, with their names, visibility, opacity and blend modes, groups as layers of sublayers, layer masks as opacity masks, clipped layers and layers in blend modes VectorCraft doesn't have merged with the layers below) | false (one layer per page, without the art that is off; Save then asks for a name; a PSD file opens as its merged image), hiddenLayers?: false (a PSD file's hidden layers come in hidden instead of being left out), importSlices?: true (a PSD file's slices become user slices over its canvas, with its layers or its merged image; slices the file generated automatically are left out, and slices that can't be read are left out with a warning), editingData?: true (default: an EPS, .ai or PDF that carries its editor's own copy of the art opens from it, with its layers, hidden objects, guides, artboards and the art outside them; a .ai or PDF whose type shows opens from its PDF part with textAs: outlines) | \"always\" (as true, and a .ai's editing copy is used even where it draws differently from its PDF part, which can be older; the warnings say so) | false (only what its page or PDF part prints, for print pipelines; a .ai saved without PDF compatibility then can't be opened), legacyNameEncoding?: windows-1252 (default) | macintosh | windows-949 (also euc-kr) | shift_jis | gbk | big5 (the code page names in the editing data of a .ai or an EPS are read in when they aren't UTF-8: layers, objects, artboards, colors, gradients, patterns, graphic styles, swatches, brushes, symbols, variables and data sets, and data sets' text values; warnings list the first three such names as read, and count the rest), colorMode?: rgb|cmyk (the mode the document opens in, its colours converted as file.documentColorMode does, through the profiles the document keeps after the color management policies of edit.colorSettings, grays? as there; default: the file's — a PDF keeps CMYK, Gray and spot inks (spot swatches at a tint) and opens in CMYK when painted mostly in CMYK), grays?: as file.documentColorMode, dxf?: {layout?: \"Model\" (default) | a paper layout's name (document.dxfInfo lists them), unit?, scale? (the ratio: 1 unit of the art = scale drawing units; default: the drawing at 1:1 in its own unit), fit?: false (scale to fit an artboard of fitTo?: [612, 792], turned to the art's orientation), scaleLineweights?: false (lineweights scale with the art), center?: true (false: the drawing's origin on the artboard's bottom-left corner; fitted art's bottom-left corner), mergeLayers?: false (all art on one layer)} (DXF), crop?: as cropTo (its older name), linkPages?: false (true: each page `pages` picks of a PDF or PDF-compatible .ai opens as a placed document linked to that page of the file, as file.place with link places one, on an artboard of its cropTo box (bounding: its art's bounds; a blank page: its crop box; a file with that PieceInfo key: its trim box when no box is named, its crop box with cropTo: crop or crop: crop; on its trim box a page shows its bleed box round the artboard and gives the document its bleed), in a row 36 pt apart (on trim boxes, plus the bleed on both sides), and a layer named after the page; links.embed makes a page editable art; refused for any other file, without a path, with a password or with textAs: outlines; Save then asks for a name), profileChoice?: \"useEmbedded\"|\"convert\"|\"discard\" (the profile of the document's color mode is not the working space: keep it, convert that model's colors into the working space and take it off, or take it off and keep the numbers) | \"leave\"|\"assignWorking\"|\"assign\" (the document has no profile of its color mode: leave it untagged, tag it with the working space, or with assignProfile?: a profile of that model) (default: what the model's policy of edit.colorSettings does; a choice for the other case, or for a document tagged with the working space, is not used; the reply's profileChoice gives {issue: mismatch|missing, model, choice} when one was given for the document's question: it names the choice, not what it did, so \"convert\" from a profile that is not available keeps the profile and a warning says the colors were not converted; the desktop app asks for it when edit.colorSettings' askMismatchOpen or askMissingOpen is on, document.open never asks), text?: {…the text options of file.place} (a .txt file), importer?: \"plugin.\" (an importer plug-in's format id, see document.formats: it opens the file, which must have an extension it lists, also one a built-in format reads), params?: {…} (the importer's own parameters, see plugin.info)} → {index, title, format, warnings, restored, profileChoice?, missingLinks, modifiedLinks, updatedLinks: [{name, path, ids}]}; the color management policies of edit.colorSettings keep, take off or convert from the profiles the file is tagged with, their notes go to warnings, and a document they changed opens with unsaved changes; any readable format (see document.formats): .vectorcraft/.drawcraft, .svg/.svgz, .pdf/.ai, .ait, ASCII .dxf (each DXF layer with art a layer; blocks symbols; what can't come in is listed in warnings), PNG/JPEG/GIF/WebP/TIFF/BMP (an image opens as a document of its size at the resolution it declares, as file.place sizes it; 72 ppi, 1 px = 1 pt, when it declares none), .emf/.wmf (one artboard, the picture's frame; records VectorCraft doesn't read are skipped with one warning; a picture cut short by a reader limit, images and pattern brushes that can't be read, clips that can't be applied and raster operations other than a plain copy each add a warning), PICT .pct/.pic/.pict (QuickDraw versions 1 and 2, with or without the file's 512-byte header: one artboard, the picture's frame; shapes, lines and regions as paths, text as point type, bitmaps, pixel maps and QuickTime JPEG images as images; what isn't read is listed in warnings), HP-GL plot files .plt/.hpgl/.hgl/.hpg (one artboard round the art; what isn't drawn is listed in warnings), .eps and PostScript .ai (one artboard, the bounding box: an EPS file VectorCraft wrote restores the document it carries, restored: true; other files are read by a PostScript interpreter — paths, colours and spot inks, clips, gradients, images, type in the fonts named — and come in as their TIFF preview, with a warning, when their PostScript can't be read). A PDF/.ai/.ait or SVG saved with Preserve Editing restores the native document it carries (restored: true; a PDF only when no pages are picked), unless the file was changed elsewhere since or the data can't be read: then its artwork is imported and the first warning says why. Templates (native templates, .ait) open as a new untitled document; a text, RTF or Word file (.txt, .rtf, .docx, .doc) opens as a new letter-size document named after the file whose text is area type 36 pt inside the artboard, read as file.place reads it (a .txt file with text's options; one without text is refused), and Save then asks for a name; a restored .ai keeps its path (Save writes .ai again) and opens on the artboard its editing copy names as active. A file that no built-in format reads, by its content or its extension, opens with the installed importer plug-in that lists its extension (the one whose id sorts first, when several do): it is given the file, at most 128 MiB, and its objects become a new document whose artboard is their bounds; Save then asks for a name, and the warnings are the importer's. Linked images are read from their files (looked for at their path, then relative to the document): missing ones show their saved preview (links.relink), modified ones are read again only with Preferences › Update Links: Automatically (else links.update). An SVG's files (relative links from the SVG's folder) stay linked, SVG files become art, missing ones a placeholder in their box (a warning and missingLinks). An SVG's variable data (SVG Options › Include Variable Data, a variableSets element) gives the document its text variables and data sets, each text variable bound to the type object its docRef names, unless the SVG restores the native document; variable data variable.loadLibrary would refuse is left out with a warning", + "{path | name | dataBase64 (a file's path, or its name with its bytes), pages?: \"2-3, 5\" (PDF/.ai: 1-based, default all; one artboard each) | page?: n, cropTo?: bounding|art|crop (default)|trim|bleed|media (the box each artboard gets; bounding: the art's bounds; trim: the bleed box round it becomes the document's bleed, and the artboards are 36 pt apart plus that bleed on both sides; a PDF-compatible file whose first PDF page's PieceInfo holds, in itself or nested up to four dictionaries deep counting PieceInfo, a key starting with AIPrivateData or AIPDFPrivateData, when its pages are imported as editable art rather than its editing copy restored, opens on its trim boxes with cropTo and crop omitted and on its crop boxes with cropTo: crop, or crop: crop and no cropTo), password? (encrypted PDFs; see document.pdfInfo), textAs?: text (default: point type per line, lines wrapped in a frame as area type where they lay out the same, in the file's fonts by name; missing ones are listed in warnings) | outlines (glyph paths), layers?: true (default: optional content groups become layers with their visibility, print state and lock — art that is off comes in as a hidden layer; other art goes to a layer per page; a PSD file's layers become layers holding their pixels, with their names, visibility, opacity and blend modes, groups as layers of sublayers, layer masks as opacity masks, clipped layers and layers in blend modes VectorCraft doesn't have merged with the layers below) | false (one layer per page, without the art that is off; Save then asks for a name; a PSD file opens as its merged image), hiddenLayers?: false (a PSD file's hidden layers come in hidden instead of being left out), importSlices?: true (a PSD file's slices become user slices over its canvas, with its layers or its merged image; slices the file generated automatically are left out, and slices that can't be read are left out with a warning), editingData?: true (default: an EPS, .ai or PDF that carries its editor's own copy of the art opens from it, with its layers, hidden objects, guides, artboards and the art outside them; a .ai or PDF whose type shows opens from its PDF part with textAs: outlines) | \"always\" (as true, and a .ai's editing copy is used even where it draws differently from its PDF part, which can be older; the warnings say so) | false (only what its page or PDF part prints, for print pipelines; a .ai saved without PDF compatibility then can't be opened), legacyNameEncoding?: windows-1252 (default) | macintosh | windows-949 (also euc-kr) | shift_jis | gbk | big5 (the code page names in the editing data of a .ai or an EPS are read in when they aren't UTF-8: layers, objects, artboards, colors, gradients, patterns, graphic styles, swatches, brushes, symbols, variables and data sets, and data sets' text values; warnings list the first three such names as read, and count the rest), colorMode?: rgb|cmyk (the mode the document opens in, its colours converted as file.documentColorMode does, through the profiles the document keeps after the color management policies of edit.colorSettings, grays? as there; default: the file's — a PDF keeps CMYK, Gray and spot inks (spot swatches at a tint) and opens in CMYK when painted mostly in CMYK), grays?: as file.documentColorMode, dxf?: {layout?: \"Model\" (default) | a paper layout's name (document.dxfInfo lists them), unit?, scale? (the ratio: 1 unit of the art = scale drawing units; default: the drawing at 1:1 in its own unit), fit?: false (scale to fit an artboard of fitTo?: [612, 792], turned to the art's orientation), scaleLineweights?: false (lineweights scale with the art), center?: true (false: the drawing's origin on the artboard's bottom-left corner; fitted art's bottom-left corner), mergeLayers?: false (all art on one layer)} (DXF), crop?: as cropTo (its older name), linkPages?: false (true: each page `pages` picks of a PDF or PDF-compatible .ai opens as a placed document linked to that page of the file, as file.place with link places one, on an artboard of its cropTo box (bounding: its art's bounds; a blank page: its crop box; a file with that PieceInfo key: its trim box when no box is named, its crop box with cropTo: crop or crop: crop; on its trim box a page shows its bleed box round the artboard and gives the document its bleed), in a row 36 pt apart (on trim boxes, plus the bleed on both sides), and a layer named after the page; links.embed makes a page editable art; refused for any other file, without a path, with a password or with textAs: outlines; Save then asks for a name), profileChoice?: \"useEmbedded\"|\"convert\"|\"discard\" (the profile of the document's color mode is not the working space: keep it, convert that model's colors into the working space and take it off, or take it off and keep the numbers) | \"leave\"|\"assignWorking\"|\"assign\" (the document has no profile of its color mode: leave it untagged, tag it with the working space, or with assignProfile?: a profile of that model) (default: what the model's policy of edit.colorSettings does; a choice for the other case, or for a document tagged with the working space, is not used; the reply's profileChoice gives {issue: mismatch|missing, model, choice} when one was given for the document's question: it names the choice, not what it did, so \"convert\" from a profile that is not available keeps the profile and a warning says the colors were not converted; the desktop app asks for it when edit.colorSettings' askMismatchOpen or askMissingOpen is on, document.open never asks), text?: {…the text options of file.place} (a .txt file), importer?: \"plugin.\" (an importer plug-in's format id, see document.formats: it opens the file, which must have an extension it lists, also one a built-in format reads), params?: {…} (the importer's own parameters, see plugin.info)} → {index, title, format, warnings, restored, profileChoice?, missingLinks, modifiedLinks, updatedLinks: [{name, path, ids}]}; the color management policies of edit.colorSettings keep, take off or convert from the profiles the file is tagged with, their notes go to warnings, and a document they changed opens with unsaved changes; any readable format (see document.formats): .vectorcraft/.drawcraft, .svg/.svgz, .pdf/.ai, .ait, ASCII .dxf (each DXF layer with art a layer; blocks symbols; what can't come in is listed in warnings), PNG/JPEG/GIF/WebP/TIFF/BMP (an image opens as a document of its size at the resolution it declares, as file.place sizes it; 72 ppi, 1 px = 1 pt, when it declares none), .emf/.wmf (one artboard, the picture's frame; records VectorCraft doesn't read are skipped with one warning; a picture cut short by a reader limit, images and pattern brushes that can't be read, clips that can't be applied and raster operations other than a plain copy each add a warning), PICT .pct/.pic/.pict (QuickDraw versions 1 and 2, with or without the file's 512-byte header: one artboard, the picture's frame; shapes, lines and regions as paths, text as point type, bitmaps, pixel maps and QuickTime JPEG images as images; what isn't read is listed in warnings), HP-GL plot files .plt/.hpgl/.hgl/.hpg (one artboard round the art; what isn't drawn is listed in warnings), .eps and PostScript .ai (one artboard, the bounding box: an EPS file VectorCraft wrote restores the document it carries, restored: true; other files are read by a PostScript interpreter — paths, colours and spot inks, clips, gradients, images, type in the fonts named — and come in as their TIFF preview, with a warning, when their PostScript can't be read). A PDF/.ai/.ait or SVG saved with Preserve Editing restores the native document it carries (restored: true; a PDF only when no pages are picked), unless the file was changed elsewhere since or the data can't be read: then its artwork is imported and the first warning says why. Templates (native templates, .ait) open as a new untitled document; a text, RTF or Word file (.txt, .rtf, .docx, .doc) opens as a new letter-size document named after the file whose text is area type 36 pt inside the artboard, read as file.place reads it (a .txt file with text's options; one without text, and an RTF file that ends inside a group, are refused), and Save then asks for a name; a restored .ai keeps its path (Save writes .ai again) and opens on the artboard its editing copy names as active. A file that no built-in format reads, by its content or its extension, opens with the installed importer plug-in that lists its extension (the one whose id sorts first, when several do): it is given the file, at most 128 MiB, and its objects become a new document whose artboard is their bounds; Save then asks for a name, and the warnings are the importer's. Linked images are read from their files (looked for at their path, then relative to the document): missing ones show their saved preview (links.relink), modified ones are read again only with Preferences › Update Links: Automatically (else links.update). An SVG's files (relative links from the SVG's folder) stay linked, SVG files become art, missing ones a placeholder in their box (a warning and missingLinks). An SVG's variable data (SVG Options › Include Variable Data, a variableSets element) gives the document its text variables and data sets, each text variable bound to the type object its docRef names, unless the SVG restores the native document; variable data variable.loadLibrary would refuse is left out with a warning", always, load::open ), diff --git a/crates/engine/src/cmd/place.rs b/crates/engine/src/cmd/place.rs index b2e34a11a7..5b7e3fa801 100644 --- a/crates/engine/src/cmd/place.rs +++ b/crates/engine/src/cmd/place.rs @@ -246,6 +246,10 @@ pub(crate) fn text_document(name: &str, bytes: &[u8], p: &Value) -> Result bool { bytes.get(start..).is_some_and(|b| b.starts_with(b"{\\rtf")) } +/// Does the RTF file `bytes` close every group it opens? A control symbol's escaped brace (`\{`, +/// `\}`), an escaped backslash (`\\`) and the bytes of `\binN` binary data open and close nothing. +/// A file that ends inside a group was cut short; bytes after the outermost group's closing brace +/// are not checked. +pub(super) fn is_complete(bytes: &[u8]) -> bool { + let mut depth = 0usize; + let mut i = 0; + while let Some(&b) = bytes.get(i) { + match b { + b'\\' => { + let (word, n, end) = control_word(bytes, i + 1); + if word != "bin" { + i += 2; + continue; + } + // The binary data's length as `import` reads it; data that runs past the end of the + // file leaves the file incomplete. + let len = usize::try_from(n.unwrap_or(0)).unwrap_or(0); + match end.checked_add(len) { + Some(next) if next <= bytes.len() => i = next, + _ => return false, + } + continue; + } + b'{' => depth += 1, + // The document ends where its outermost group closes; bytes after it are not read. + b'}' if depth <= 1 => return true, + b'}' => depth -= 1, + _ => {} + } + i += 1; + } + false +} + /// The text of an RTF file's `bytes` with its character and paragraph formatting. pub(super) fn import(bytes: &[u8], cmd: &str) -> Result { if bytes.len() > text::MAX_TEXT { @@ -717,6 +752,12 @@ mod tests { let deep = format!("{{\\rtf1 {}x{}}}", "{".repeat(5000), "}".repeat(5000)); assert_eq!(text_of(&read(&deep)), "x"); assert_eq!(text_of(&read(r"{\rtf1 unclosed {\b group")), "unclosed group"); + assert!(!is_complete(br"{\rtf1 unclosed {\b group"), "cut short"); + assert!(is_complete(br"{\rtf1 a \{ b \} c \\}"), "escaped braces"); + assert!(is_complete(b"{\\rtf1 done}\r\n{ trailing bytes"), "bytes after the document's group"); + assert!(is_complete(b"{\\rtf1 {\\*\\blipuid x}{\\pict\\bin3 {{{}}"), "binary data"); + assert!(!is_complete(b"{\\rtf1 {\\pict\\bin9 }}"), "binary data past the end of the file"); + assert!(!is_complete(b"{\\rtf1 {\\pict\\bin99999999999 }}"), "an overflowing binary length"); assert!(import(b"{\\rt", "file.place").is_err(), "not RTF"); assert!(import(b"Plain words", "file.place").is_err(), "not RTF"); } diff --git a/crates/engine/src/tests/textimport.rs b/crates/engine/src/tests/textimport.rs index b10de9f068..af45ce333c 100644 --- a/crates/engine/src/tests/textimport.rs +++ b/crates/engine/src/tests/textimport.rs @@ -1167,10 +1167,14 @@ fn place_reads_what_open_reads_and_text_files() { // `openExtensions`) leave them out. let open: Vec<_> = cmd::fileio::open_filters().collect(); assert_eq!(open[0].0, "All readable files"); - assert!(open[0].1.starts_with(PLACE_EXTS), "{:?}", open[0].1); + assert!(open[0].1.starts_with(cmd::fileio::place_exts()), "{:?}", open[0].1); let text = open.iter().position(|f| f.0 == "Text").expect("File › Open has a Text filter"); assert_eq!(open.get(text..text + 3), Some(&[("Text", TEXT_EXTS), ("RTF", RTF_EXTS), word][..])); - assert_eq!(open.get(text - 1).map(|f| f.0), cmd::fileio::FORMATS.iter().rfind(|f| f.read).map(|f| f.label), "after the format filters"); + assert_eq!( + open.get(text - 1).map(|f| f.0), + cmd::fileio::FORMATS.iter().rfind(|f| cmd::fileio::reads(f)).map(|f| f.label), + "after the format filters" + ); assert!(!cmd::fileio::open_extensions().iter().any(|e| ["txt", "rtf", "docx", "doc"].contains(e))); } @@ -1240,7 +1244,11 @@ fn text_files_that_cant_be_read_open_no_document() { assert!(e.contains("text.characterSet `klingon`"), "{e}"); assert!(open_text(&mut s, "broken.docx", b"PK\x03\x04 not a package", json!({})).is_err()); assert!(open_text(&mut s, "plain.rtf", b"Plain words, not RTF", json!({})).is_err(), "an .rtf file that isn't RTF"); + let e = open_text(&mut s, "broken.rtf", br"{\rtf1 unclosed {\b group", json!({})).unwrap_err().to_string(); + assert!(e.contains("`broken.rtf` is damaged"), "a truncated RTF file: {e}"); assert_eq!(s.documents().len(), 0); + open_text(&mut s, "escaped.rtf", br"{\rtf1 a \{ brace \} and \\ slash}", json!({})).unwrap(); + assert_eq!(s.documents().len(), 1, "escaped braces don't count as groups"); } /// A file whose content is a format File › Open reads (a PDF file) opens as that format even when diff --git a/crates/ui-egui/src/dialogs/text_import.rs b/crates/ui-egui/src/dialogs/text_import.rs index 4e563dde79..c517fe477c 100644 --- a/crates/ui-egui/src/dialogs/text_import.rs +++ b/crates/ui-egui/src/dialogs/text_import.rs @@ -121,16 +121,11 @@ pub struct TextOpen { params: Value, } -/// Is Text Import Options open? -fn is_asking(app: &VectorcraftApp) -> bool { - app.dialogs().is_some_and(|w| w.with(|h| h.open_dialogs().iter().any(|d| d.key.as_deref() == Some(KIND)))) -} - /// File › Open of the file `name` holding `bytes` (read from `path`) with `document.open`'s params /// `p` asks how to read it first (true) when it is a text file that opens as text (not a PDF or /// Affinity file named `.txt`) and `p` gives no `text` options and names no importer: OK opens it as a new document with the options and remembers them for the /// next text file, and an error keeps the dialog open. The dialog starts from the options -/// confirmed last. While Text Import Options is open, the file waits its turn ([`open_next`]). +/// confirmed last. While any dialog is open, the file waits its turn ([`open_next`]). pub fn offer_open(app: &mut VectorcraftApp, name: &str, bytes: &[u8], path: Option, p: &Value) -> bool { if !is_text_name(name) || !vectorcraft_engine::cmd::place::opens_as_text(name, bytes) @@ -141,16 +136,16 @@ pub fn offer_open(app: &mut VectorcraftApp, name: &str, bytes: &[u8], path: Opti return false; } let file = TextOpen { name: name.to_string(), bytes: bytes.to_vec(), path, params: p.clone() }; - if is_asking(app) || !app.ui.text_opens.is_empty() { + if app.any_dialog_open() || !app.ui.text_opens.is_empty() { app.ui.text_opens.push(file); return true; } ask_open(app, file) } -/// Asks about the next text file File › Open waits to open, once Text Import Options is closed. +/// Asks about the next text file File › Open waits to open, once no dialog is open. pub(crate) fn open_next(app: &mut VectorcraftApp) { - if app.ui.text_opens.is_empty() || is_asking(app) { + if app.ui.text_opens.is_empty() || app.any_dialog_open() { return; } let file = app.ui.text_opens.remove(0); @@ -514,4 +509,23 @@ mod tests { assert!(!host::is_open(&app, KIND)); assert_eq!((app.session.documents().len(), placed_text(&app).as_deref()), (3, Some("Rich words"))); } + + /// A text file opened while another dialog is open waits for that dialog to close before + /// Text Import Options asks about it. + #[test] + fn a_text_file_opened_under_another_dialog_waits_for_it_to_close() { + let mut app = host::app(); + let other = crate::dialogs::circle_options::open(&mut app); + let other = other["dialog"].as_str().expect("dialog kind").to_string(); + assert!(host::is_open(&app, &other)); + crate::io::open_bytes(&mut app, "notes.txt", b"words", None).unwrap(); + let ctx = app.ui_ctx.clone().unwrap(); + crate::dialogs::host::pump(&mut app, &ctx); + assert!(!host::is_open(&app, KIND), "Text Import Options waits while another dialog is open"); + host::cancel(&app, &other); + crate::dialogs::host::pump(&mut app, &ctx); + assert!(host::is_open(&app, KIND), "asked once the other dialog closes"); + host::confirm(&mut app, KIND).unwrap(); + assert_eq!(placed_text(&app).as_deref(), Some("words")); + } } diff --git a/docs/file-format-parity.md b/docs/file-format-parity.md index 5bbf877836..fb91a5b560 100644 --- a/docs/file-format-parity.md +++ b/docs/file-format-parity.md @@ -389,10 +389,10 @@ Gradient meshes in the editing data keep each point's own color where a patch's | FreeHand `.fh*` | open (legacy) | no | no | | | `.cdr` drawings | open | yes (versions 1 to 27, the `WL` files of versions 1 and 2 and the ZIP packages of versions 14 on included: pages, layers, guidelines, groups, clipping containers, curves, paths, rectangles, ellipses, arcs, polygons, uniform fills and outlines, from the object's style where it has none of its own; hidden and locked layers, groups and objects; the winding flag as the nonzero fill rule; uniform transparency of version 13 on as opacity and blend mode; text, bitmaps, blends, contours, brush strokes, fountain, pattern, texture and PostScript fills and arrowheads are left out with a warning, and lenses, other transparency and merge modes without a blend mode are not applied, with a warning; versions 1 and 2 open as one page and one layer without groups, arcs or pies; version 3 envelopes are not applied, so the objects and groups under one keep their outlines and matrices, with a warning; encrypted, ZIP64 and split packages are refused) | no | `.cdt` templates open as new untitled documents; File › Place reads both; after an open with a warning, an export or Save As to the drawing's own path needs `acknowledgeLoss: true`; record layouts and their sources in `craft-cdr` (`storytold/craft-libs@9b28b56bc7`, `crates/cdr/PROVENANCE.md`); synthetic test files only; tests in `craft-cdr` `crates/cdr/tests/it/read.rs`, `crates/engine/src/cmd/fileio/tests_cdr.rs` and `crates/engine/tests/import_fuzz.rs` | | `.cmx` exchange files | | yes (files with 32-bit coordinates: pages, layers, groups, curves, uniform fills and outlines with their width, color, caps, joins and dashes; text, images, rectangles, ellipses, clipping paths, other fills and arrowheads are left out with a warning, and lenses are not applied, with a warning; big-endian files and files with 16-bit coordinates are refused) | yes (one file with a page for the artboard, or for each chosen artboard with Use Artboards, and a layer for each layer with art on the page: fills and strokes as curves in CMYK, RGB, gray, spot colors at their tints and Registration, with stroke widths, caps, joins and dashes in whole stroke widths; type as outlines, gradients and patterns as one color, nonzero fills as even-odd; images, clipping masks and transparency are left out with a warning) | File › Place reads them too; after an open with a warning, an export or Save As to the file's own path needs `acknowledgeLoss: true`; layouts and their sources in `craft-cdr` (`storytold/craft-libs@9b28b56bc7`, `crates/cdr/PROVENANCE.md`, R53 to R63; the writer's fields under Written fields at `storytold/craft-libs@51fcc3b041`); synthetic test files only; tests in `craft-cdr` `crates/cdr/tests/it/cmx.rs` and `crates/cdr/tests/it/cmx_write.rs`, `crates/engine/src/cmd/fileio/tests_cmx.rs` and `crates/engine/tests/import_fuzz.rs` | -| Text `.txt` | place, export | place (Text Import Options) | yes | place reads Unicode and ANSI, and Shift JIS, GB2312, Chinese Big 5, Cyrillic, GB18030, Greek, Turkish, Baltic and Central European through the WHATWG Encoding Standard's decoders (VectorCraft's own mapping); `tests/textimport.rs`, `place/text.rs`; fuzzed (`text_import_fuzz.rs`) | -| RTF `.rtf` | place | place (area type with fonts, size, bold, italic, underline, strikethrough, caps, superscript and subscript, color, alignment, indents and paragraph spacing) | no | `tests/textimport.rs`, `place/rtf.rs`; fuzzed (`text_import_fuzz.rs`); `\'hh` bytes read as Windows-1252 or Mac Roman only | -| Word `.docx` | place | place (area type with the document's styles and its fonts, size, bold, italic, underline, strikethrough, caps, superscript and subscript, color, alignment, indents and paragraph spacing) | no | `tests/textimport.rs`, `place/docx.rs`; fuzzed (`text_import_fuzz.rs`); list numbers, pictures and text boxes are left out | -| Word `.doc` | place | place (area type with the same formatting as `.docx`, from the style sheet's styles and direct formatting; Word 97 and later) | no | `tests/textimport.rs`, `place/doc.rs`; fuzzed (`text_import_fuzz.rs`); pictures, headers, footers, notes, comments and text boxes are left out with a warning; encrypted and fast-saved documents are refused | +| Text `.txt` | place, export | open as a new letter-size document, place (Text Import Options for both) | yes | place reads Unicode and ANSI, and Shift JIS, GB2312, Chinese Big 5, Cyrillic, GB18030, Greek, Turkish, Baltic and Central European through the WHATWG Encoding Standard's decoders (VectorCraft's own mapping); `tests/textimport.rs`, `place/text.rs`; fuzzed (`text_import_fuzz.rs`) | +| RTF `.rtf` | place | open as a new letter-size document, place (area type with fonts, size, bold, italic, underline, strikethrough, caps, superscript and subscript, color, alignment, indents and paragraph spacing) | no | `tests/textimport.rs`, `place/rtf.rs`; fuzzed (`text_import_fuzz.rs`); `\'hh` bytes read as Windows-1252 or Mac Roman only; open refuses a file that ends inside a group, and place takes the text read before the end | +| Word `.docx` | place | open as a new letter-size document, place (area type with the document's styles and its fonts, size, bold, italic, underline, strikethrough, caps, superscript and subscript, color, alignment, indents and paragraph spacing) | no | `tests/textimport.rs`, `place/docx.rs`; fuzzed (`text_import_fuzz.rs`); list numbers, pictures and text boxes are left out | +| Word `.doc` | place | open as a new letter-size document, place (area type with the same formatting as `.docx`, from the style sheet's styles and direct formatting; Word 97 and later) | no | `tests/textimport.rs`, `place/doc.rs`; fuzzed (`text_import_fuzz.rs`); pictures, headers, footers, notes, comments and text boxes are left out with a warning; encrypted and fast-saved documents are refused | | CSS | export (CSS Properties) | — | yes | | | OBJ / USDA / glTF | 3D export | — | yes, also USDZ (a 3D asset of Asset Export: `assets.add3D`, `assets.export3D`) | each solid of an object with Extrude & Bevel, Revolve, Inflate or Rotate is a triangle mesh of its faces before projection, at the object's 3D rotation, y up, with a two-sided material in its paint's color; glTF 2.0 is one `.gltf` with its buffer embedded, in meters; USDA and OBJ are in points (USDA says its `metersPerUnit`), OBJ with an `.mtl`; USDZ stores the USDA uncompressed on a 64-byte boundary; tests in `crates/three-d/src/mesh/tests.rs`, `crates/engine/src/cmd/fileio/mesh3d/tests.rs` and `crates/engine/src/tests/assets_3d.rs` | | Affinity `.af`, `.afdesign`, `.afpub` | no | yes (beyond Illustrator) | no (#665) | 51 pinned files, [affinity-validation.md](affinity-validation.md) | diff --git a/docs/mcp.md b/docs/mcp.md index f8de4c8b91..4c14f07580 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -880,7 +880,7 @@ ends the wait, so the sampler can be shown again. The BSDs and headless sessions | `invoke_menu` | `{command, params?}` | Invokes a menu item by command id. UI commands such as `view.*` and `window.*` are in `command_list` with `ui: true`; running them needs the desktop app (`--connect`). The app refuses `attributes.openUrl`, `file.export.svg.browser`, `file.saveForWeb.browser` and `file.showPackage` for every control and MCP request, since each opens another app, so the headless error for them does not suggest `--connect`. | | `open_panel` | `{panel}` | Remote only. `panel` is a panel id (`layers`, `swatches`, `colorGuide`, …, as `window.panel` takes) or its display label (`"Color Guide"`), in any case. | | `screenshot` | `{path?, scale?, artboard?, window?, max_side?, traceViews?}` | Returns MCP image content (`image/png`, base64) plus a text block. Renders the artboard with the pixels of a PNG `export` with `background: "white"` at the same scale; `traceViews:true` draws Image Trace objects in the view set with `imageTrace.setView`, as in the app's window; `window:true` captures the app window (remote only), as `ui_screenshot` does, and `max_side` (1–4096, window captures only) scales the returned image down as described for `ui_screenshot`. With `path` the backend (the headless session or the app) writes the PNG there too; a window capture written there keeps its full size with `max_side`. An app that does not send the image back writes a window capture without `path` to a file in a new folder inside the system's temporary folder (on Unix only the user can open it); the server reads the file and then removes the folder, also when the capture or the read fails. | -| `open_file` | `{path, importer?, params?}` | Opens any readable file as a new active document: `.vectorcraft`/`.drawcraft`, `.vctemplate`, `.svg`/`.svgz`, `.pdf`/`.ai`, `.ait`, `.eps`/`.epsf`, `.ps`, `.dxf`, `.emf`, `.wmf`, PICT (`.pct`/`.pic`/`.pict`, and a version 2 picture of any extension), HP-GL (`.plt`/`.hpgl`/`.hgl`/`.hpg`, and a file of an extension no other format reads that starts with plotter instructions), PNG (`.png`/`.pns`), JPEG (`.jpg`/`.jpeg`/`.jpe`), GIF, WebP, TIFF, BMP (`.bmp`/`.dib`/`.rle`), Targa (`.tga`/`.vda`/`.icb`/`.vst`), PCX, Pixar (`.pxr`), JPEG 2000 (`.jpf`/`.jpx`/`.jp2`/`.j2k`/`.j2c`/`.jpc`), HEIC/HEIF (`.heic`/`.heif`), JPEG XL (`.jxl`), PSD (`.psd`/`.pdd`)/PSB (an image opens as a document of its pixel size; a PSD or PSB file with its layers as layers, or as its merged image through `run_command document.open` with `layers: false`; a JPEG XL file as its first frame), CDR drawings of versions 1 to 27 (`.cdr`, `.cdt`), CMX files with 32-bit coordinates (`.cmx`), layered raster `.pcraft` documents (as one image at the canvas size; a warning says when only the smaller preview could be read), DWG drawings (`.dwg`, `.dws`, `.dwt`). Templates (`.vctemplate`, `.ait`, `.cdt`, `.dwt`) open as a new untitled document. A text, RTF or Word file (`.txt`, `.rtf`, `.docx`, `.doc`) opens as a new letter-size document named after the file, its text area type 36 pt inside the artboard as `file.place` sets it; `run_command document.open` with `text` gives a `.txt` file's Text Import Options, and Save asks for a name. A file with one of those extensions that starts with a PDF header or an Affinity signature opens as that format instead. PDF, `.ai` and SVG files saved with Preserve Editing reopen as the document they carry. The reply is `document.open`'s: its `warnings` say what didn't come in as it was (an EPS whose PostScript can't be read opens as its preview, and the warning names the PostScript error, the operator and the procedure). A file of an extension only an installed importer plug-in lists opens with that importer ([Plug-ins](#plug-ins)); `importer: "plugin."` opens the file with the importer it names, which must list the file's extension, also one a built-in format reads (in the app, as File › Open With does), and `params` gives that importer's parameters (their defaults when omitted). `run_command document.formats` lists the formats. | +| `open_file` | `{path, importer?, params?}` | Opens any readable file as a new active document: `.vectorcraft`/`.drawcraft`, `.vctemplate`, `.svg`/`.svgz`, `.pdf`/`.ai`, `.ait`, `.eps`/`.epsf`, `.ps`, `.dxf`, `.emf`, `.wmf`, PICT (`.pct`/`.pic`/`.pict`, and a version 2 picture of any extension), HP-GL (`.plt`/`.hpgl`/`.hgl`/`.hpg`, and a file of an extension no other format reads that starts with plotter instructions), PNG (`.png`/`.pns`), JPEG (`.jpg`/`.jpeg`/`.jpe`), GIF, WebP, TIFF, BMP (`.bmp`/`.dib`/`.rle`), Targa (`.tga`/`.vda`/`.icb`/`.vst`), PCX, Pixar (`.pxr`), JPEG 2000 (`.jpf`/`.jpx`/`.jp2`/`.j2k`/`.j2c`/`.jpc`), HEIC/HEIF (`.heic`/`.heif`), JPEG XL (`.jxl`), PSD (`.psd`/`.pdd`)/PSB (an image opens as a document of its pixel size; a PSD or PSB file with its layers as layers, or as its merged image through `run_command document.open` with `layers: false`; a JPEG XL file as its first frame), CDR drawings of versions 1 to 27 (`.cdr`, `.cdt`), CMX files with 32-bit coordinates (`.cmx`), layered raster `.pcraft` documents (as one image at the canvas size; a warning says when only the smaller preview could be read), DWG drawings (`.dwg`, `.dws`, `.dwt`). Templates (`.vctemplate`, `.ait`, `.cdt`, `.dwt`) open as a new untitled document. A text, RTF or Word file (`.txt`, `.rtf`, `.docx`, `.doc`) opens as a new letter-size document named after the file, its text area type 36 pt inside the artboard as `file.place` sets it; `run_command document.open` with `text` gives a `.txt` file's Text Import Options, and Save asks for a name. A `.txt` file without text, and an RTF file that ends inside a group, are refused and open nothing. A file with one of those extensions that starts with a PDF header or an Affinity signature opens as that format instead. PDF, `.ai` and SVG files saved with Preserve Editing reopen as the document they carry. The reply is `document.open`'s: its `warnings` say what didn't come in as it was (an EPS whose PostScript can't be read opens as its preview, and the warning names the PostScript error, the operator and the procedure). A file of an extension only an installed importer plug-in lists opens with that importer ([Plug-ins](#plug-ins)); `importer: "plugin."` opens the file with the importer it names, which must list the file's extension, also one a built-in format reads (in the app, as File › Open With does), and `params` gives that importer's parameters (their defaults when omitted). `run_command document.formats` lists the formats. | | `save_file` | `{path?, compress?, version?, preview?, precision?, options?}` | Runs `document.save`: the document's own file in its own format (native `.vectorcraft` unless it was opened from or saved as SVG, PDF or a restorable `.ai`; then `warnings` say what that format loses). A path's extension picks the format (`.vectorcraft`, `.vctemplate`, `.pdf`, `.svg`, `.svgz`, `.ai`: a PDF carrying the native document, which reopens editable; `.eps`: by default one file whose bounding box fits the visible art, the first artboard when no art shows; `options.useArtboards: true` makes the chosen artboard the page and, with two or more chosen, the file at the path is the central file of the visible art and each artboard is also written to `_.eps` beside it, listed in the reply's `files`). For a native file, `compress: true` gzips it (default: the `useCompression` preference, Preferences › File Handling › Use Compression), `version` (1 to 4) writes it for an older VectorCraft (1 and 2 are never compressed, and `version: 2` with `compress: true` is an error; versions 1 to 3 get each live star as a plain path of its outline, without its point count and ratio), `preview: true` embeds a PNG of the first artboard, and `precision` (0 to 9) rounds path anchors and handles to that many decimal places for that save only (colors, transforms and type stay exact). `options` passes the format's save options as `run_command document.formats` lists them. When `compress`, `version`, `preview` or `precision` is given both at the top level and in `options` with different values, the call is an error (`` `compress: true` and `options.compress: false` disagree: give the option once ``) and nothing is written. A key in `options` that no save format takes is an error, and nothing is written (see Parameter keys). The save drops each option the written format doesn't read. The reply's `warnings` then name each such option given (for example `` `compress` was not used: SVG files don't read it `` for an `.svg` path, and `` `options.preview` was not used: … `` for a key in `options`; a PDF-compatible `.ai` file reads `compress` but not `version`, `preview`, `precision`, `outlineText`, `hiddenObjects`, `transparentImages` or `preserveEditing`, and a legacy `.ai` file reads only its own options). For a `.ai` file, these warnings name the kind of `.ai` written: a legacy .ai (version 7) for `aiVersion: "7"`, a non-PDF-compatible .ai for `pdfCompatible: false`, and a PDF-compatible .ai otherwise, including a save that reuses the options the document was last saved with. `run_command document.save` and the other save commands refuse any option given beside the path and in `options` with different values, and give the same warnings for each key given beside the path or in `options` that the file doesn't read. The headless session and the app receive the same `app.save` params, and the app is also sent `wait: true`: the call returns once the file is written, or with the error (such as a path outside the write root), even with Background Save on. When the save asks first (the question before replacing a file that opened with losses, or on macOS and Linux the file dialog for an untitled document without `path`), the reply is `{pending}` or `"cancelled"` as before, and the save that runs after the answer uses the Background Save preference. Location refusals return `READ_ONLY_LOCATION: ` without a fallback panel for automation; see [Save location errors](#save-location-errors). In the desktop app, a save that runs in the background shows in the progress window after 0.4 s with a moving bar. `file.cancelSave` stops every such save before it replaces its file → `{cancelled: n}`: the file stays as it was, and the document keeps its file and format and stays modified. A save whose file was already being replaced finishes and is reported as saved. `file.saveInBackground` closes the window while the saves go on → `{hidden: n}`. | | `export` | `{path?, format?, scale?, artboard?, range?, selection?, outlineText?, options?}` | `svg`, `svgz`, `pdf`, `ai` (the PDF-compatible `.ai` that Save writes, which carries the document when every artboard is written in order), `eps`, `dxf`, `emf`, `wmf`, `hpgl` (a `.plt` plot file for plotters and cutters), `png`, `jpg`, `webp`, `gif`, `png8` (an indexed `.png`), `tiff`, `bmp`, `tga`, `psd` (layered), `txt` (the document's text), `vectorcraft` or `template` (a native template). The tool's `format` enum and `document.formats` list them, generated from the engine's format table. When `format` is omitted, it comes from the path's extension. PDF and `.ai` write one page per artboard: all of them, or `artboard` (0-based) / `range` (`"1-3, 5"`, 1-based). SVG and SVGZ write one file per chosen artboard. EPS writes one file of the visible art; with `artboard`, `range`, `options.artboards` or `options: {"useArtboards": true}` it writes one file per chosen artboard, after a central file of the visible art when there are two or more, and `useArtboards: false` keeps the one file. Rasters, DXF, EMF, WMF and HP-GL write one artboard, or one file per chosen artboard with `options: {"useArtboards": true}`. Rasters also take `options: {"rect": [x, y, width, height]}` (page points, y down): that area of the page at the given `ppi`/`scale`, without an artboard and without changing the document; it is refused with `artboard`, `artboards`, `range` or `useArtboards`, with a non-positive or non-finite size, and for non-raster formats. `options` carries more format options (e.g. `{"quality": 80}` for JPEG). `selection: true` exports the selected objects cropped to their bounds (the reply adds their `bounds`, and reports `format` and the encoder's `warnings` as a whole-document export does); `outlineText: true` writes SVG text as paths. Template layers are left out, live effects are kept, and exporting `vectorcraft` never changes the document's path. Without `path` the bytes come back as `dataBase64`. Both backends run the same `document.export` call. | | `add_text` | `{text, x?, y?, width?, height?, fit?, fitMinPercent?, path?, mode?, pathEffect?, size?, font?, color?, justify?, vertical?}` | Point type at (x, y) (`justify`: `left`, `center` or `right` starts, centres or ends each line on x); area type with `width`/`height` (`fit`: `none`, `autoHeight`, `shrinkText`, as `text.areaOptions`); or `path` + `mode` (`area`/`onPath`) to flow text in or along a path, with `pathEffect` for type on a path (`rainbow`, `skew`, `3dRibbon`, `stairStep`, `gravity`; SVG export writes type on a path with any effect other than `rainbow` as outlines, with a warning). An invalid effect is rejected before editing. `justify` (also `auto`, `justifyAll`) aligns the paragraphs of every kind, as `text.setStyle` does later. `vertical: true` uses the existing vertical writing mode for every kind (default `false`, horizontal). Returns `{id}`, with `overflow: true` when the text doesn't fit its frame or path. | From c7e6cd5487c086ddae44e5c1318c7c482fa42418 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 09:20:58 -0800 Subject: [PATCH 48/62] Color Picker: a script's picker uses its document's CMYK profile in RGB documents too The CMYK fields of a script's picker now convert through the CMYK profile of the script's document whenever one is given, not only in a CMYK document, matching the gamut warning. An RGB color opens through the active RGB profile, which the picker's RGB fields read its channel values in, so the opening swatch and the fields agree. docs/mcp.md names the profiles the picker uses. --- crates/ui-egui/src/dialogs/color_picker.rs | 22 ++++++++++++++----- .../ui-egui/src/dialogs/color_picker/tests.rs | 19 ++++++++++++++++ docs/mcp.md | 4 +++- 3 files changed, 38 insertions(+), 7 deletions(-) diff --git a/crates/ui-egui/src/dialogs/color_picker.rs b/crates/ui-egui/src/dialogs/color_picker.rs index 1e74be421d..f33eed336b 100644 --- a/crates/ui-egui/src/dialogs/color_picker.rs +++ b/crates/ui-egui/src/dialogs/color_picker.rs @@ -328,17 +328,18 @@ pub fn open(app: &mut VectorcraftApp, p: &Value) -> Result { /// The Color Picker with `key` on `color`, with the eyedropper, the gamut warning, the document's /// swatches and libraries, and with `cmyk` (a CMYK document) the CMYK inks. `inks`: the profiles of the -/// document the picker edits when that is not the front document; it shows the color, tests the gamut -/// and fills the CMYK fields through them. `None`: the active profiles. +/// document the picker edits when that is not the front document; it shows a CMYK color, tests the +/// gamut and fills the CMYK fields through them. `None`: the active profiles. fn picker(app: &VectorcraftApp, key: &str, color: &Color, cmyk: bool, inks: Option<&Arc>) -> ColorPickerDialog { - let active = cms::active(); let mut dialog = ColorPickerDialog::new(key, tl!("Color Picker"), srgba_in(color, inks)) .eyedropper(true) .add_to_swatches(false) .gamut(inks.map_or_else(|| gamut(app), |i| gamut_of(i.clone()))) .working_rgb(WorkingRgb) .swatch_view(swatch_view(app)); - if cmyk && let Some(converter) = working_cmyk(inks.unwrap_or(&active)) { + if let Some(cms) = picker_cmyk(cmyk, inks) + && let Some(converter) = working_cmyk(&cms) + { dialog = dialog.cmyk(&converter); } if matches!(color, Color::Cmyk { .. } | Color::Lab { .. }) { @@ -347,6 +348,13 @@ fn picker(app: &VectorcraftApp, key: &str, color: &Color, cmyk: bool, inks: Opti dialog } +/// The color-management context whose CMYK profile the picker's CMYK fields convert through: `inks` +/// whenever given, in an RGB document too, else the active profiles in a CMYK document (`cmyk`). +/// `None`: the picker's built-in coated CMYK. +fn picker_cmyk(cmyk: bool, inks: Option<&Arc>) -> Option> { + inks.cloned().or_else(|| cmyk.then(cms::active)) +} + /// Opens the Color Picker a running script's `app.showColorPicker` waits at, on `color`; `cmyk`: /// the run's own active document is in CMYK, which the session does not show between slices; /// `profiles`: the RGB and CMYK profiles that document is assigned, which OK converts the pick through. It @@ -377,10 +385,12 @@ fn script_inks(profiles: &(Option, Option)) -> Arc { cms::for_document(profiles.0.as_deref(), profiles.1.as_deref()) } -/// `color` as display sRGB through `inks` (`None`: the active profiles, as [`srgba`]). +/// `color` as display sRGB: a CMYK color through the CMYK profile of `inks`, anything else as +/// [`srgba`] shows it. An RGB color keeps the active RGB profile, which the picker's RGB fields +/// ([`WorkingRgb`]) read its channel values in. fn srgba_in(color: &Color, inks: Option<&Arc>) -> Srgba { match (inks, color) { - (Some(inks), Color::Rgb { .. } | Color::Cmyk { .. }) => { + (Some(inks), Color::Cmyk { .. }) => { let [r, g, b] = inks.display_rgb(color); Srgba::rgb(r, g, b) } diff --git a/crates/ui-egui/src/dialogs/color_picker/tests.rs b/crates/ui-egui/src/dialogs/color_picker/tests.rs index 14041cbce2..9b9a6ab715 100644 --- a/crates/ui-egui/src/dialogs/color_picker/tests.rs +++ b/crates/ui-egui/src/dialogs/color_picker/tests.rs @@ -509,3 +509,22 @@ fn a_script_picker_shows_cmyk_in_the_scripts_document_profile() { let inks = script_inks(&(None, Some(cms::FOGRA52_CMYK.to_string()))); assert_eq!(inks.settings().cmyk, cms::FOGRA52_CMYK, "the CMYK fields and gamut use the script document's profile"); } + +#[test] +fn a_script_picker_in_an_rgb_document_fills_cmyk_fields_in_the_scripts_profile() { + // An RGB document can carry its own CMYK profile; the picker's CMYK fields convert through it. + let inks = script_inks(&(None, Some(cms::FOGRA52_CMYK.to_string()))); + let fields = picker_cmyk(false, Some(&inks)).map(|c| c.settings().cmyk.clone()); + assert_eq!(fields.as_deref(), Some(cms::FOGRA52_CMYK), "the script document's CMYK profile, in an RGB document too"); + assert!(picker_cmyk(false, None).is_none(), "the front RGB document keeps the built-in CMYK fields"); +} + +#[test] +fn a_script_picker_opens_an_rgb_color_as_its_rgb_fields_read_it() { + // The RGB fields read channel values in the working RGB profile, so the opening swatch matches them. + let inks = script_inks(&(Some(cms::WIDE_GAMUT_RGB.to_string()), None)); + let color = Color::rgb(0.5, 0.3, 0.2); + let [r, g, b] = inks.display_rgb(&color); + assert_ne!(Srgba::rgb(r, g, b), srgba(&color), "the two RGB profiles show the color differently"); + assert_eq!(srgba_in(&color, Some(&inks)), srgba(&color), "the opening color and the RGB fields use one profile"); +} diff --git a/docs/mcp.md b/docs/mcp.md index 4407509e2b..7f3d55e255 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -4704,7 +4704,9 @@ the color's `typename` can differ from the picker's model and from the color giv picker convert from the RGB profile of the document the window shows (the working RGB profile when it shows none) to the RGB profile of the run's active document, and in a CMYK document they then separate through that document's CMYK profile. Hex, screen-sample and HSB picks, and typed values that Only Web Colors snaps, start in display sRGB and convert only through the active -document's profiles. An answer taken from `answers` +document's profiles. The picker's CMYK fields, its gamut warning and the swatch of a CMYK color it opens on use the +CMYK profile of the run's active document, in an RGB document too; an RGB color opens as the document the window +shows draws it, the profile its RGB fields read. An answer taken from `answers` keeps the color model it was given. The picker opens on the color as given, whatever Only Web Colors was left at in another picker. OK with both the color and its model unchanged, and Cancel, return a new object of the color the script gave. The picker shows no preview on the selection and has no Stop button: the status bar's Stop and quitting From 65ad024ee852cfb2c85f14f9a51ed1b3989557e8 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 09:25:09 -0800 Subject: [PATCH 49/62] Canvas: keep the moved anchor marks mesh only when every square edge rounds the same The kept mesh moved when each anchor's screen position moved by whole pixels, but a square's edges are computed in f32 from that position and rounded to pixels by the tessellator. A 5 pt anchor at x = 252.99998 moving one pixel has its right edge go from 255.49998 to 256.5, which round to 255 and 257, so the moved mesh drew that edge at 256. The move now checks the squares the marks draw at each point, at the anchor size and at the handle size: each must keep its f32 size and have every edge round to pixels moved by the same whole pixels. Squares thin enough for the tessellator to draw as a line are tessellated again after any move. --- crates/ui-egui/src/canvas/selection.rs | 48 +++++++++++++---- crates/ui-egui/src/canvas/selection/tests.rs | 56 +++++++++++++++++--- 2 files changed, 89 insertions(+), 15 deletions(-) diff --git a/crates/ui-egui/src/canvas/selection.rs b/crates/ui-egui/src/canvas/selection.rs index 6151e3affb..c38f85380d 100644 --- a/crates/ui-egui/src/canvas/selection.rs +++ b/crates/ui-egui/src/canvas/selection.rs @@ -699,12 +699,15 @@ const PIXEL_SLACK: f64 = 1e-6; impl KeptMesh { /// Moves the mesh by `by` in the document when tessellating the moved marks would give the same mesh moved, and - /// returns whether it did. `points` are the marks' anchors and direction handles before the move ([`knot_points`]). - /// The mesh moves when the marks' whole move since they were tessellated is a whole number of physical pixels on - /// screen, and when every point's `f32` screen position moves by this move's whole pixels too, so the tessellator's - /// rounding to pixels lands the same. It also needs every point inside the canvas before and after the move, so the - /// marks are drawn near and inside the clip on both sides and no anchor, handle or outline is left out or culled. - fn translate(&mut self, by: Vec2, points: impl IntoIterator) -> bool { + /// returns whether it did. `points` are the marks' anchors and direction handles before the move ([`knot_points`]), + /// and `options` the Path Options they are drawn with. The mesh moves when the marks' whole move since they were + /// tessellated is a whole number of physical pixels on screen, and when every point's `f32` screen position moves + /// by this move's whole pixels too. Every square [`mark_shapes`] could draw at a point, at the anchor side and at + /// the handle side, must keep its `f32` size and have each edge round to pixels as the tessellator rounds it, moved + /// by the same whole pixels; a square thin enough for the tessellator to draw as a line is tessellated again. It + /// also needs every point inside the canvas before and after the move, so the marks are drawn near and inside the + /// clip on both sides and no anchor, handle or outline is left out or culled. + fn translate(&mut self, by: Vec2, points: impl IntoIterator, options: &PathOptionsSettings) -> bool { let key = &self.key; let ppp = f64::from(key.pixels_per_point); let view = key.view.affine(); @@ -722,11 +725,32 @@ impl KeptMesh { egui::pos2(s.x as f32, s.y as f32) }; let whole = |from: f32, to: f32, px: f64| ((f64::from(to) - f64::from(from)) * ppp - px).abs() <= PIXEL_SLACK; + // The tessellator's `f32` rounding of an edge to pixels (`GuiRounding::round_to_pixels`), in whole pixels. + let ppp_f32 = key.pixels_per_point; + let snapped = |edge: f32| f64::from((edge * ppp_f32).round()); + let lands = |from: f32, to: f32, px: f64| snapped(to) - snapped(from) == px; + let sides = mark_sides(options, &key.look); + // Below this side the tessellator draws a filled square as a line, which it rounds other ways. + let feathering = if key.options.feathering { key.options.feathering_size_in_pixels / ppp_f32 } else { 0.0 }; + if sides.iter().any(|side| *side <= 2.0 * feathering) { + return false; + } for p in points { let (from, to) = (screen(p), screen(p + by)); if !(area.contains(from) && area.contains(to) && whole(from.x, to.x, pixels[0]) && whole(from.y, to.y, pixels[1])) { return false; } + for side in sides { + let (a, b) = (Rect::from_center_size(from, egui::Vec2::splat(side)), Rect::from_center_size(to, egui::Vec2::splat(side))); + if a.size() != b.size() + || !(lands(a.min.x, b.min.x, pixels[0]) + && lands(a.max.x, b.max.x, pixels[0]) + && lands(a.min.y, b.min.y, pixels[1]) + && lands(a.max.y, b.max.y, pixels[1])) + { + return false; + } + } } let offset = vec2((pixels[0] / ppp) as f32, (pixels[1] / ppp) as f32); self.moved = moved; @@ -921,14 +945,20 @@ enum MarkFill { Path, } +/// The side of an anchor's mark, then of a direction handle's end, under `options`. +fn mark_sides(options: &PathOptionsSettings, look: &MarkLook) -> [f32; 2] { + let anchor = options.anchor_size.unwrap_or(look.anchor); + let handle = if options.handles == HandleStyle::Large { look.large } else { look.anchor }; + [anchor, handle] +} + /// The egui shapes `BezierOverlay` paints for `set` under `BezierTool::Anchors`, in its order: every outline, the /// selected segment, then the anchors and handles near `rect`, then the handles of the other paths' selected anchors. fn mark_shapes(out: &mut Vec, set: &MarkSet<'_>, view: &CanvasView, rect: Rect, look: &MarkLook) { let options = set.options; let option_color = options.color.map(|[r, g, b]| Color32::from(Srgba::rgb(f32::from(r) / 255.0, f32::from(g) / 255.0, f32::from(b) / 255.0))); let path_color = |path: &EditPath| path.color.map(Color32::from); - let anchor_side = options.anchor_size.unwrap_or(look.anchor); - let handle_side = if options.handles == HandleStyle::Large { look.large } else { look.anchor }; + let [anchor_side, handle_side] = mark_sides(options, look); let circles = set.shown == AnchorsShown::Curvature; let line = |out: &mut Vec, points: Vec, closed: bool, segment: bool, color: Option| { let named = if segment { look.thick } else { look.medium }; @@ -1268,7 +1298,7 @@ impl SelectionMarks { /// ([`KeptMesh::translate`]); otherwise the next paint tessellates the marks again. fn translate(&mut self, by: Vec2) { let mesh = self.mesh.get_mut(); - if mesh.as_mut().is_some_and(|kept| !kept.translate(by, knot_points(&self.anchors))) { + if mesh.as_mut().is_some_and(|kept| !kept.translate(by, knot_points(&self.anchors), &self.anchors.options)) { *mesh = None; } let shift = vectorcraft_geom::Affine::translate(by); diff --git a/crates/ui-egui/src/canvas/selection/tests.rs b/crates/ui-egui/src/canvas/selection/tests.rs index 3b979256c5..765ccd98b3 100644 --- a/crates/ui-egui/src/canvas/selection/tests.rs +++ b/crates/ui-egui/src/canvas/selection/tests.rs @@ -1366,6 +1366,16 @@ fn a_drag_of_the_selection_moves_the_anchor_marks_mesh_without_tessellating_it() // squares would round to other pixels than the moved mesh's. #[test] fn a_whole_pixel_move_keeps_the_mesh_only_when_the_screen_positions_move_by_whole_pixels() { + let by = Vec2::new(1.0, 0.0); + let options = PathOptionsSettings::default(); + assert!(kept_at_one_pixel_per_point().translate(by, [Point::new(255.5, 10.0)], &options), "a point whose screen position moves one whole pixel"); + let mut off = kept_at_one_pixel_per_point(); + assert!(!off.translate(by, [Point::new(255.5, 10.0), Point::new(255.999_991, 10.0)], &options), "a point that moves 1.0000153 pixels"); + assert_eq!(off.moved, [0.0; 2], "the refused move leaves the mesh where it was"); +} + +/// A kept mesh of no marks at one physical pixel per point, with the document's coordinates on screen unchanged. +fn kept_at_one_pixel_per_point() -> KeptMesh { let screen = Rect::from_min_size(egui::pos2(0.0, 0.0), vec2(1000.0, 1000.0)); let look = MarkLook { line: Color32::BLACK, @@ -1378,7 +1388,7 @@ fn a_whole_pixel_move_keeps_the_mesh_only_when_the_screen_positions_move_by_whol thick: 3.0, reach: 20.0, }; - let kept = || KeptMesh { + KeptMesh { key: MeshKey { marks: 0, view: CanvasView::new(screen, Point::new(500.0, 500.0), 1.0), @@ -1390,10 +1400,44 @@ fn a_whole_pixel_move_keeps_the_mesh_only_when_the_screen_positions_move_by_whol }, mesh: Arc::new(egui::Mesh::default()), moved: [0.0; 2], - }; + } +} + +// A point whose `f32` screen position moves by exactly one pixel can still put a square's edge on other pixels: an +// anchor at x = 252.99998 moves to 253.99998, but its 5 pt square's right edge goes from 255.49998 to 256.5, which +// round to 255 and 257, so the moved mesh's edge at 256 is not the one a new tessellation draws. A 6 pt square there +// has edges that round one pixel on, but its `f32` width grows from 6 to 6.0000153, and the tessellator compares the +// width with its thresholds for drawing a square as a line or a stroke as a fill. +#[test] +fn a_whole_pixel_move_keeps_the_mesh_only_when_every_square_edge_rounds_by_those_pixels() { let by = Vec2::new(1.0, 0.0); - assert!(kept().translate(by, [Point::new(255.5, 10.0)]), "a point whose screen position moves one whole pixel"); - let mut off = kept(); - assert!(!off.translate(by, [Point::new(255.5, 10.0), Point::new(255.999_991, 10.0)]), "a point that moves 1.0000153 pixels"); - assert_eq!(off.moved, [0.0; 2], "the refused move leaves the mesh where it was"); + let options = PathOptionsSettings::default(); + // The `f32` just under 253: 252.99998474121094. + let center = f64::from(253.0_f32 - 2.0_f32.powi(-16)); + let mut kept = kept_at_one_pixel_per_point(); + assert!(!kept.translate(by, [Point::new(center, 10.0)], &options), "a right edge that rounds two pixels on"); + assert_eq!(kept.moved, [0.0; 2], "the refused move leaves the mesh where it was"); + assert!(kept_at_one_pixel_per_point().translate(by, [Point::new(252.5, 10.0)], &options), "edges on whole pixels"); + // Near the origin a move is whole within the rounding noise: an anchor at x = 2.9999998 (the `f32` just under 3) + // moved to 4 keeps its square's width, but the left edge goes from 0.4999998 to 1.5, which round to 0 and 2. + let near = f64::from(3.0_f32 - 2.0_f32.powi(-22)); + let step = Vec2::new(4.0 - near, 0.0); + assert!(!kept_at_one_pixel_per_point().translate(step, [Point::new(near, 10.0)], &options), "a left edge that rounds two pixels on"); + // Anchors and handle ends 6 pt across. + let mut six = kept_at_one_pixel_per_point(); + six.key.look.anchor = 6.0; + assert!(!six.translate(by, [Point::new(center, 10.0)], &options), "a square whose width changes"); +} + +// The tessellator draws a filled square no wider than twice its feathering as a line and rounds it another way, so a +// square that small is tessellated again after any move. +#[test] +#[allow(clippy::field_reassign_with_default)] // `PathOptionsSettings` is non-exhaustive: no struct literal outside its crate +fn a_move_tessellates_the_marks_again_when_a_square_is_drawn_as_a_line() { + let by = Vec2::new(1.0, 0.0); + let mut options = PathOptionsSettings::default(); + options.anchor_size = Some(2.0); + assert!(!kept_at_one_pixel_per_point().translate(by, [Point::new(252.5, 10.0)], &options), "a 2 pt anchor at 1 pixel per point"); + options.anchor_size = Some(3.0); + assert!(kept_at_one_pixel_per_point().translate(by, [Point::new(252.5, 10.0)], &options), "a 3 pt anchor"); } From b7604a54e71a1d41acebb5aa5464444c6a5a633f Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 09:53:20 -0800 Subject: [PATCH 50/62] CI: build the tests without bundled fonts in the build job, not the lint leg The lint leg's dependency cache keeps no compiled workspace crates, so on a pull request `cargo test -p vectorcraft-ui-egui --no-default-features --test install_fonts` rebuilt every workspace crate without the bundled fonts: 35 of the lint leg's 60 minutes, and the longest leg of the run. `cargo xtask ci` splits its no-bundled-fonts step in two. The `no-bundled-fonts` step (the `cargo tree` checks and the clippy run without default features) stays in `cargo xtask ci checks`. The new `no-bundled-fonts-tests` step runs the two tests, and the new `cargo xtask ci after-archive` runs it after the doctests in the gate's build job, whose rolling cache entry keeps the workspace crates. The tests' builds record their units in CRAFT_CACHE_UNITS, so the cache trim keeps the crates built without the fonts. --- .github/workflows/ci.yml | 16 ++++---- docs/development.md | 6 ++- xtask/src/main.rs | 80 +++++++++++++++++++++++++++++++--------- 3 files changed, 76 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c86dfb998a..8f0df39682 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,17 +44,19 @@ jobs: # The workspace crates also build without line tables. A panic still names its file and line. dev-debug: "0" # The `build ()` job builds the tests once and writes one nextest archive per shard with - # that shard's test binaries (`cargo xtask ci archive`), then runs the doctests. Five test - # legs download their own archive and run it without building: shards 1 and 2 each run half - # of vectorcraft-ui-egui's tests, and shards 3 to 5 the tests of their own crates - # (xtask/src/shards.rs). The `lint ()` leg runs the other `cargo xtask ci` steps beside - # them, with a dependency cache of its own. `gate ()` passes when the build and every - # test leg that ran passed; `lint ()` is a check of its own. + # that shard's test binaries (`cargo xtask ci archive`), then runs the doctests and the tests + # built without the bundled fonts (`cargo xtask ci after-archive`), whose second build of the + # workspace crates the build job's cache entry keeps. Five test legs download their own archive and + # run it without building: shards 1 and 2 each run half of vectorcraft-ui-egui's tests, and + # shards 3 to 5 the tests of their own crates (xtask/src/shards.rs). The `lint ()` leg + # runs the other `cargo xtask ci` steps beside them, with a dependency cache of its own. + # `gate ()` passes when the build and every test leg that ran passed; `lint ()` is a + # check of its own. test-shards: 5 shard-command: cargo xtask ci shard archive-command: cargo xtask ci archive shard-archives: true - after-archive-command: cargo xtask ci doctests + after-archive-command: cargo xtask ci after-archive lint-command: cargo xtask ci checks # A pull request runs only the test shards whose crates its changes reach: the crates that # own a changed file or declare a read of it (`[package.metadata.craft] reads`), and every diff --git a/docs/development.md b/docs/development.md index 52efff471b..fe2eb91f5c 100644 --- a/docs/development.md +++ b/docs/development.md @@ -227,8 +227,10 @@ context. It replaces the context's font definitions, so an embedder's own faces - `cargo test -p vectorcraft-text --no-default-features --test without_bundled_fonts` checks the configuration without them, and `cargo test -p vectorcraft-ui-egui --no-default-features --test install_fonts` that the fonts `embed::install` sets up bind the proportional, monospace and - semibold families, so an effect dialog draws; the same step lints `vectorcraft-ui-egui` without - its default features. + semibold families, so an effect dialog draws. `cargo xtask ci` runs these two tests in its + `no-bundled-fonts-tests` step, and its `no-bundled-fonts` step also lints `vectorcraft-ui-egui` + without its default features. In CI the gate's `build` job runs the tests (`cargo xtask ci + after-archive`) and the `lint` leg runs the rest (`cargo xtask ci checks`). ### Arabic fonts and the web build diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 2ec7e394b5..093e8db10b 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -49,7 +49,7 @@ commands: layers enforce the crate dependency layering (plan/architecture.md §3) wasm cargo check --target wasm32-unknown-unknown for the wasm-safe crates, the web app and its plug-in worker test the workspace tests (cargo nextest when installed, else cargo test), then the doctests - ci fmt --check, clippy -D warnings, test, doctests, no-bundled-fonts, pdf-deps, assets, brands, grant-sites, cursors (warnings only), test-lint, ui-commands --check, layers, wasm (stops at first failure) + ci fmt --check, clippy -D warnings, test, doctests, no-bundled-fonts, no-bundled-fonts-tests, pdf-deps, assets, brands, grant-sites, cursors (warnings only), test-lint, ui-commands --check, layers, wasm (stops at first failure) ci shard shard $GATE_SHARD of $GATE_SHARDS of ci's tests (xtask/src/shards.rs): from the nextest archive in $NEXTEST_ARCHIVE_FILE when set, otherwise it builds them and also runs the doctests of its crates @@ -57,7 +57,11 @@ commands: $NEXTEST_ARCHIVE_DIR//$NEXTEST_ARCHIVE_NAME for k from 1 to $GATE_SHARDS; with CRAFT_CACHE_UNITS set, appends Cargo's JSON messages for the build to that file ci doctests the doctests of each shard's crates, one cargo command per shard - ci checks the ci steps other than the tests, the doctests and the i18n report + ci after-archive + ci doctests, then the tests built without the bundled fonts + (no-bundled-fonts-tests), for the gate's build job + ci checks the ci steps other than the tests, the doctests, the i18n report and + no-bundled-fonts-tests shards list the crates each shard tests; fails when a member is in no shard or in two, or builds with other features in its shard than in the whole workspace corpus [--download | --affinity | --scripts] @@ -100,6 +104,7 @@ fn main() -> ExitCode { Some("ci") if rest.first() == Some(&"shard") => cmd_ci_shard(), Some("ci") if rest.first() == Some(&"archive") => cmd_ci_archive(), Some("ci") if rest.first() == Some(&"doctests") => cmd_ci_doctests(), + Some("ci") if rest.first() == Some(&"after-archive") => cmd_ci_after_archive(), Some("ci") if rest.first() == Some(&"checks") => cmd_ci_checks(), Some("ci") => cmd_ci(), Some("shards") => shards::run().map(drop), @@ -541,8 +546,8 @@ fn test_build(r: &shards::Run, units: bool) -> (Command, String) { } /// `cargo xtask ci doctests`: the doctests of each shard's crates, one cargo command per shard -/// with the crates `ci shard` runs them for, after `ci archive` (the shared gate's -/// `after-archive-command`). Every command runs before the first error is returned. +/// with the crates `ci shard` runs them for, after `ci archive`. Every command runs before the +/// first error is returned. fn cmd_ci_doctests() -> Result<(), String> { let mut result = Ok(()); for s in shards::assigned()?.iter().filter(|s| s.part.is_none_or(|p| p.is_first())) { @@ -551,10 +556,32 @@ fn cmd_ci_doctests() -> Result<(), String> { result } -/// `cargo xtask ci checks`: every `ci` step other than [`TEST_STEPS`], for the shared gate's -/// `lint` leg. +/// The `ci` steps that `ci after-archive` runs in the gate's `build` job, whose cache entry keeps +/// the workspace crates they build without the bundled fonts; `ci checks` leaves them out. +const BUILD_JOB_STEPS: [&str; 1] = ["no-bundled-fonts-tests"]; + +/// `cargo xtask ci after-archive`: the shared gate's `after-archive-command`. It runs `ci +/// doctests`, then the [`BUILD_JOB_STEPS`]. +fn cmd_ci_after_archive() -> Result<(), String> { + run_steps(&after_archive_steps()) +} + +/// The steps of [`cmd_ci_after_archive`]. +fn after_archive_steps() -> Vec { + let mut steps: Vec = vec![("doctests", Box::new(cmd_ci_doctests))]; + steps.extend(ci_steps().into_iter().filter(|(name, _)| BUILD_JOB_STEPS.contains(name))); + steps +} + +/// `cargo xtask ci checks`: every `ci` step other than [`TEST_STEPS`] and [`BUILD_JOB_STEPS`], for +/// the shared gate's `lint` leg. fn cmd_ci_checks() -> Result<(), String> { - run_steps(&ci_steps().into_iter().filter(|(name, _)| !TEST_STEPS.contains(name)).collect::>()) + run_steps(&checks_steps()) +} + +/// The steps of [`cmd_ci_checks`]. +fn checks_steps() -> Vec { + ci_steps().into_iter().filter(|(name, _)| !TEST_STEPS.contains(name) && !BUILD_JOB_STEPS.contains(name)).collect() } /// Runs `steps` in turn, stopping at the first that fails; the summary names the steps that passed @@ -604,21 +631,28 @@ fn ci_steps() -> Vec { ( "no-bundled-fonts", Box::new(|| { - // vectorcraft-text as embedders that bring their own fonts build it. - let mut c = cargo(); - c.args(["test", "-p", "vectorcraft-text", "--no-default-features", "--test", "without_bundled_fonts"]); - run(c, "cargo test -p vectorcraft-text --no-default-features --test without_bundled_fonts")?; - // The egui panels and the MCP server as such an embedder builds them: nothing turns - // the fonts back on. + // The egui panels and the MCP server as an embedder that brings its own fonts + // builds them: nothing turns the fonts back on. libraries_without_bundled_fonts()?; - // The panels without their interface faces lint clean and still bind every family - // they draw in. + // The panels without their interface faces lint clean. let mut c = cargo(); c.args(["clippy", "-p", "vectorcraft-ui-egui", "--no-default-features", "--all-targets", "--", "-D", "warnings"]); - run(c, "cargo clippy -p vectorcraft-ui-egui --no-default-features --all-targets -- -D warnings")?; + run(c, "cargo clippy -p vectorcraft-ui-egui --no-default-features --all-targets -- -D warnings") + }), + ), + ( + "no-bundled-fonts-tests", + Box::new(|| { + // vectorcraft-text as such an embedder builds it, and the panels without their + // interface faces still bind every family they draw in. In a leg that saves the + // cache the builds record their units (xtask/src/cache_units.rs), so the entry + // keeps the workspace crates built without the fonts. + let mut c = cargo(); + c.args(["test", "-p", "vectorcraft-text", "--no-default-features", "--test", "without_bundled_fonts"]); + cache_units::run(c, "cargo test -p vectorcraft-text --no-default-features --test without_bundled_fonts")?; let mut c = cargo(); c.args(["test", "-p", "vectorcraft-ui-egui", "--no-default-features", "--test", "install_fonts"]); - run(c, "cargo test -p vectorcraft-ui-egui --no-default-features --test install_fonts") + cache_units::run(c, "cargo test -p vectorcraft-ui-egui --no-default-features --test install_fonts") }), ), ("pdf-deps", Box::new(|| pdf_deps::run(&root()))), @@ -758,4 +792,16 @@ mod tests { assert_eq!(archived.len(), shards::GROUPS.len()); assert!(archived.iter().zip(&real).all(|(r, s)| s.runs == [(*r).clone()])); } + + #[test] + fn the_build_job_runs_the_tests_without_bundled_fonts_and_the_lint_leg_the_rest() { + let names = |steps: Vec| steps.into_iter().map(|(name, _)| name).collect::>(); + assert_eq!(names(after_archive_steps()), ["doctests", "no-bundled-fonts-tests"]); + let checks = names(checks_steps()); + assert!(checks.contains(&"no-bundled-fonts"), "{checks:?}"); + assert!(!checks.contains(&"no-bundled-fonts-tests"), "{checks:?}"); + let workflow = include_str!("../../.github/workflows/ci.yml"); + assert!(workflow.contains("after-archive-command: cargo xtask ci after-archive\n"), "ci.yml's after-archive-command"); + assert!(workflow.contains("lint-command: cargo xtask ci checks\n"), "ci.yml's lint-command"); + } } From 94d11f4d19d79640431e66827d7b4a7b526e1fd4 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 10:06:52 -0800 Subject: [PATCH 51/62] DXF/DWG import: a block checked at the nesting limit still scales its dashes elsewhere The check of whether a block draws dashes or wide polylines cached a "no" made by a scan the nesting limit had cut short. A later, shallower placement of the same block then reused it, so its dashes kept their unscaled length. Each answer now carries the depths it holds at: a "no" from a scan cut short holds only from the depth it was made at, and a "yes" only down to the depth from which the dashes it found are still drawn. A scan that left out a block inside itself is kept with the ancestors it left out, and is reused only under the same ones. A symbol whose art the nesting limit cut off is kept apart from the full one, by depth. A placement past the nesting limit is rejected before any cached answer or block work, and a block inside itself is left out before its symbol is looked up. --- crates/cad/src/import/build.rs | 222 ++++++++++++-- crates/cad/src/import/tests.rs | 537 +++++++++++++++++++++++++++++++++ 2 files changed, 741 insertions(+), 18 deletions(-) diff --git a/crates/cad/src/import/build.rs b/crates/cad/src/import/build.rs index a36d7efa8c..75e37dfed4 100644 --- a/crates/cad/src/import/build.rs +++ b/crates/cad/src/import/build.rs @@ -30,6 +30,9 @@ const MAX_NODES: usize = if cfg!(test) { 100_000 } else { 2_000_000 }; /// per item of the block looked at for it (art on hidden layers too), and the same for each block /// whose dashes and widths are checked for a symbol's scale. const MAX_VISITS: usize = if cfg!(test) { 1_000_000 } else { 20_000_000 }; +/// The most scale checks kept for one block at one depth that left out a block inside itself +/// under different ancestors. +const MAX_SCANS_HERE: usize = 16; /// The most path elements an import makes (blocks drawn as art are copied for every placement). pub(crate) const MAX_ELEMENTS: usize = if cfg!(test) { 1_000_000 } else { 4_000_000 }; /// The most dash lengths an import keeps (every dashed path holds its own copy of its pattern). @@ -74,6 +77,33 @@ struct Inherit { layer: Option, } +/// A scale scan of a block that left out a block inside itself: its answer, whether the nesting +/// limit cut off art, the blocks it went into and the ones it left out. +#[derive(Debug)] +struct ScanHere { + scaled: bool, + cut: bool, + reached: HashSet, + left_out: HashSet, +} + +/// A step of the scale scan in progress: a block it went into, a block it left out as a block +/// inside itself, or a kept scan it reused. +#[derive(Debug)] +enum Trail { + Went(String), + LeftOut(String), + Reused(Rc), +} + +/// What tells two [`Trail`] steps apart: a block's name, or which kept scan was reused. +#[derive(PartialEq, Eq, Hash)] +enum TrailKey { + Went(String), + LeftOut(String), + Reused(*const ScanHere), +} + /// Objects, path elements, dash lengths and text bytes taken from the import's limits. #[derive(Clone, Copy, Debug, Default)] struct Cost { @@ -113,11 +143,17 @@ pub(crate) struct Build<'d, 'a> { bounds: HashMap>, sensitive: HashMap, /// Symbol names by block, what it inherits and the scale its art is drawn at (the bits of - /// [`symbol_scale`]'s answer; `None`: the block has no art). + /// [`symbol_scale`]'s answer, or of -1 - depth for art the nesting limit may have cut off at + /// that depth; `None`: the block has no art). symbols: HashMap<(String, Inherit, u64), Option>, /// Whether a block placed with what it inherits draws dashes or wide polylines, whose - /// lengths and widths follow the insert's scale. - scaled_looks: HashMap<(String, Inherit), bool>, + /// lengths and widths follow the insert's scale: the depths each answer holds at, and whether + /// the nesting limit cut off art (see [`Build::scaled_look`]). + scaled_looks: HashMap<(String, Inherit, bool), (u32, u32, bool)>, + /// The same answers for scans that left out a block inside itself, by depth. + scaled_looks_here: HashMap<(String, Inherit, u32), Vec>>, + /// The steps of the scale scan in progress. + scan_trail: Vec, /// Names of the symbols made so far, and the next suffix to try for each label. symbol_names: HashSet, next_suffix: HashMap, @@ -199,6 +235,8 @@ impl<'d, 'a> Build<'d, 'a> { sensitive: HashMap::new(), symbols: HashMap::new(), scaled_looks: HashMap::new(), + scaled_looks_here: HashMap::new(), + scan_trail: Vec::new(), symbol_names: HashSet::new(), next_suffix: HashMap::new(), stack: vec![], @@ -971,26 +1009,77 @@ impl<'d, 'a> Build<'d, 'a> { } } - /// Does block `name` placed with `inh` draw dashes or wide polylines (its own art or that of - /// the blocks it places)? - fn is_scaled_look(&mut self, name: &str, inh: &Inherit, depth: u32) -> bool { - let key = (name.to_string(), inh.clone()); - if let Some(s) = self.scaled_looks.get(&key) { - return *s; + /// Does block `name` placed with `inh` at `depth` draw dashes or wide polylines (its own art + /// or that of the blocks it places)? Also the depths the answer holds at (shallowest, + /// deepest). A scan cut short by the nesting limit may miss art that a shallower placement + /// draws, so a "no" holds only from the depth it was made at; a complete "no" holds from + /// depth 0. A "yes" holds at every depth from which the dashes or wide polylines it found are + /// still within the nesting limit. A "no" that left out a block inside itself, or that the + /// work budget stopped, holds nowhere. Last, whether the nesting limit cut off any of the + /// block's art at this depth. `nested` is set when the scan of an enclosing block asks. + fn scaled_look(&mut self, name: &str, inh: &Inherit, depth: u32, nested: bool) -> (bool, (u32, u32), bool) { + // A block inside itself is left out only under this chain of ancestors, so the answer + // holds nowhere else. It is left out at any depth, so the nesting limit cuts off nothing. + if self.stack.iter().any(|s| s == name) { + self.warn(NESTED); + self.scan_trail.push(Trail::LeftOut(name.to_string())); + return (false, (u32::MAX, 0), false); } let items = self.block(name); + // A placement past the nesting limit draws none of the block, so its items are not + // looked at or charged for, and no answer made at a shallower depth applies. + if items.is_some() && depth >= MAX_NEST { + self.warn(NESTED); + return (false, (depth, u32::MAX), true); + } + // A block can have a "yes" for shallow placements and a "no" for deep ones, so each answer + // is kept with its own depths. + let key = (name.to_string(), inh.clone()); + for s in [true, false] { + if let Some(&(lo, hi, cut)) = self.scaled_looks.get(&(key.0.clone(), key.1.clone(), s)) + && (lo..=hi).contains(&depth) + { + return (s, (lo, hi), cut); + } + } + let context = (key.0.clone(), key.1.clone(), depth); + let stack = &self.stack; + let here = self.scaled_looks_here.get(&context).and_then(|answers| { + // The scan holds again when it would leave out the same ancestors: each block it + // left out is still an ancestor, and no block it went into is one. + answers.iter().find(|a| a.left_out.iter().all(|l| stack.contains(l)) && !stack.iter().any(|s| a.reached.contains(s))) + }); + if let Some(a) = here.cloned() { + if !nested { + return (a.scaled, (u32::MAX, 0), a.cut); + } + let (scaled, cut) = (a.scaled, a.cut); + // The scan in progress keeps one reference to it, not a copy of its names (see + // `keep_new_steps`). + self.scan_trail.push(Trail::Reused(a)); + return (scaled, (u32::MAX, 0), cut); + } + let trail_start = self.scan_trail.len(); // Looking at a block's items counts against the block work as placing it does, so the // scan stops at the same limit as `art`. self.visits = self.visits.saturating_add(1 + items.as_ref().map_or(0, |i| i.len())); if self.visits > MAX_VISITS { self.warn(TOO_MUCH_BLOCK_WORK); - return false; + return (false, (u32::MAX, 0), false); } - let Some(items) = items else { return false }; + let Some(items) = items else { return (false, (0, u32::MAX), false) }; if !self.enter(name, depth) { - return false; + return (false, (depth, u32::MAX), true); } + self.scan_trail.push(Trail::Went(name.to_string())); + // The steps this scan has recorded, so that each is kept once. + let mut seen = HashSet::from([TrailKey::Went(name.to_string())]); + let mut stopped = false; let mut s = false; + let mut from = 0; + let mut cut = false; + // The deepest placement at which the art that made `s` is still drawn. + let mut until = MAX_NEST - 1; for it in items.iter() { #[cfg(test)] SCALED_LOOK_ITEMS.with(|n| n.set(n.get().saturating_add(1))); @@ -1008,7 +1097,19 @@ impl<'d, 'a> Build<'d, 'a> { Geom::Insert(ins) => { let child = self.inherit(&it.props, inh); let child = if self.is_sensitive(&ins.block, depth + 1) { child } else { Inherit::default() }; - self.is_scaled_look(&ins.block, &child, depth + 1) + let mark = self.scan_trail.len(); + let (scaled, (child_lo, child_hi), child_cut) = self.scaled_look(&ins.block, &child, depth + 1, true); + if !self.keep_new_steps(mark, &mut seen) { + stopped = true; + break; + } + cut |= child_cut; + if scaled { + until = child_hi.saturating_sub(1); + } else { + from = from.max(child_lo.saturating_sub(1)); + } + scaled } }; if s { @@ -1016,8 +1117,76 @@ impl<'d, 'a> Build<'d, 'a> { } } self.stack.pop(); - self.scaled_looks.insert(key, s); - s + if stopped { + return (false, (u32::MAX, 0), false); + } + let holds = if s { (0, until) } else { (from, u32::MAX) }; + if (holds.0..=holds.1).contains(&depth) { + self.scaled_looks.insert((key.0, key.1, s), (holds.0, holds.1, cut)); + } else { + // An answer that left out a block inside itself holds again wherever it would leave + // out the same ancestors. A block left out because the scan itself went into it + // is left out under any ancestors. + let mut reached = HashSet::new(); + let mut hits = HashSet::new(); + let mut reused = HashSet::new(); + for step in self.scan_trail.get(trail_start..).unwrap_or_default() { + match step { + Trail::Went(n) => { + reached.insert(n.clone()); + } + Trail::LeftOut(n) => { + hits.insert(n.clone()); + } + Trail::Reused(a) => { + if reused.insert(Rc::as_ptr(a)) { + reached.extend(a.reached.iter().cloned()); + hits.extend(a.left_out.iter().cloned()); + } + } + } + } + let left_out = hits.into_iter().filter(|n| !reached.contains(n)).collect(); + let answer = Rc::new(ScanHere { scaled: s, cut, reached, left_out }); + // Each lookup tries the kept answers one by one, so few are kept for each block and + // depth: a new one replaces the oldest. + let answers = self.scaled_looks_here.entry(context).or_default(); + if answers.len() >= MAX_SCANS_HERE { + answers.remove(0); + } + answers.push(answer); + #[cfg(test)] + SCANS_HERE_MOST.with(|n| n.set(n.get().max(answers.len()))); + } + (s, holds, cut) + } + + /// Keeps the steps recorded on the scan trail from `mark` on that the scan has not recorded + /// yet (`seen`), and drops the rest. A kept reuse of a scan counts against the block work + /// for each block it names, like looking at them. False when that work goes past the budget. + fn keep_new_steps(&mut self, mark: usize, seen: &mut HashSet) -> bool { + let steps: Vec = self.scan_trail.drain(mark..).collect(); + for step in steps { + let key = match &step { + Trail::Went(n) => TrailKey::Went(n.clone()), + Trail::LeftOut(n) => TrailKey::LeftOut(n.clone()), + Trail::Reused(a) => TrailKey::Reused(Rc::as_ptr(a)), + }; + if !seen.insert(key) { + continue; + } + if let Trail::Reused(a) = &step { + self.visits = self.visits.saturating_add(a.reached.len() + a.left_out.len()); + if self.visits > MAX_VISITS { + self.warn(TOO_MUCH_BLOCK_WORK); + return false; + } + } + self.scan_trail.push(step); + } + #[cfg(test)] + SCAN_TRAIL_MOST.with(|n| n.set(n.get().max(self.scan_trail.len()))); + true } /// The symbol for block `name` placed with `inh` at `scale` (from [`symbol_scale`]), made @@ -1025,9 +1194,20 @@ impl<'d, 'a> Build<'d, 'a> { /// wide polylines, else 1. One whose art was taken out is drawn again when `draw` is set, and /// else returned empty. fn symbol(&mut self, name: &str, inh: &Inherit, scale: f64, depth: u32, draw: bool) -> Option<(String, f64)> { + // A block inside itself is left out here, without a symbol that other placements would + // find. + if self.stack.iter().any(|s| s == name) { + self.warn(NESTED); + return None; + } let inh = if self.is_sensitive(name, depth) { inh.clone() } else { Inherit::default() }; - let scale = if self.is_scaled_look(name, &inh, depth) { scale } else { 1.0 }; - let key = (name.to_string(), inh, scale.to_bits()); + self.scan_trail.clear(); + let (scaled, _, cut) = self.scaled_look(name, &inh, depth, false); + let scale = if scaled { scale } else { 1.0 }; + // A "no" for art the nesting limit cut off keeps its symbol apart from those drawn at + // other depths, by the depth (as -1 - depth). + let slot = if !scaled && cut { (-1.0 - f64::from(depth)).to_bits() } else { scale.to_bits() }; + let key = (name.to_string(), inh, slot); if let Some(s) = self.symbols.get(&key) { let s = s.clone()?; if !draw || !self.empty.contains(&s) { @@ -1194,8 +1374,14 @@ fn rgb_color([r, g, b]: [u8; 3]) -> Color { thread_local! { /// How many names [`unique`] tried on this thread (tests). pub(crate) static SYMBOL_NAMES_TRIED: std::cell::Cell = const { std::cell::Cell::new(0) }; - /// How many block items [`Build::is_scaled_look`] looked at on this thread (tests). + /// How many block items [`Build::scaled_look`] looked at on this thread (tests). pub(crate) static SCALED_LOOK_ITEMS: std::cell::Cell = const { std::cell::Cell::new(0) }; + /// The most scale checks [`Build::scaled_look`] kept for one block at one depth on this + /// thread (tests). + pub(crate) static SCANS_HERE_MOST: std::cell::Cell = const { std::cell::Cell::new(0) }; + /// The most steps the scan trail of [`Build::scaled_look`] held after reusing a kept scan on + /// this thread (tests). + pub(crate) static SCAN_TRAIL_MOST: std::cell::Cell = const { std::cell::Cell::new(0) }; } /// Whether `taken` holds `name`, counted as one name tried (tests). diff --git a/crates/cad/src/import/tests.rs b/crates/cad/src/import/tests.rs index fae4602028..60a20129b2 100644 --- a/crates/cad/src/import/tests.rs +++ b/crates/cad/src/import/tests.rs @@ -1029,6 +1029,543 @@ fn dashes_on_a_hidden_layer_leave_a_block_one_symbol_for_every_scale() { assert_eq!(doc.symbols.len(), 1, "{:?}", doc.symbols.iter().map(|s| &s.name).collect::>()); } +#[test] +fn a_block_first_seen_at_the_nesting_limit_still_scales_its_dashes_when_placed_shallow() { + let tables = [(0, "TABLE"), (2, "LTYPE"), (0, "LTYPE"), (2, "DASHED"), (73, "2"), (40, "15"), (49, "10"), (49, "-5"), (0, "ENDTAB")]; + // "Root" first places the anonymous block "*P" through a chain of anonymous blocks + // *C1 > *C2 > ... deep enough that the scale check reaches "*P" but not "*D" inside it, then + // places "*P" directly. "*P" has a solid line and places "*D", a dashed line. Anonymous + // blocks are drawn as groups, so the direct placement draws "*D". + let mut blocks: Vec<(i32, &'static str)> = vec![(0, "BLOCK"), (8, "0"), (2, "*D"), (70, "1"), (10, "0"), (20, "0")]; + blocks.extend([(0, "LINE"), (8, "0"), (6, "DASHED"), (10, "0"), (20, "0"), (11, "100"), (21, "0"), (0, "ENDBLK")]); + blocks.extend([(0, "BLOCK"), (8, "0"), (2, "*P"), (70, "1"), (10, "0"), (20, "0")]); + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "10"), (11, "100"), (21, "10")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "*D"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + let chain = 6; + for i in 1..=chain { + let name: &'static str = Box::leak(format!("*C{i}").into_boxed_str()); + let next: &'static str = if i == chain { "*P" } else { Box::leak(format!("*C{}", i + 1).into_boxed_str()) }; + blocks.extend([(0, "BLOCK"), (8, "0"), (2, name), (70, "1"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, next), (10, "0"), (20, "0"), (0, "ENDBLK")]); + } + blocks.extend([(0, "BLOCK"), (8, "0"), (2, "Root"), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "*C1"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "*P"), (10, "0"), (20, "200"), (0, "ENDBLK")]); + let dashes = |scale: &'static str| { + let top = [(0, "INSERT"), (2, "Root"), (10, "0"), (20, "0"), (41, scale), (42, scale)]; + let doc = open(&drawing(&[], &tables, &blocks, &top), &points()).document; + let [root] = &leaves(&doc)[..] else { panic!("{:?}", leaves(&doc)) }; + instance_strokes(&doc, root).into_iter().map(|(d, _)| d).filter(|d| !d.is_empty()).collect::>() + }; + let (at_one, at_ten) = (dashes("1"), dashes("10")); + assert!(!at_one.is_empty(), "the direct placement of Inner draws Dash"); + assert_eq!(at_one.len(), at_ten.len()); + for (one, ten) in at_one.iter().zip(&at_ten) { + let want: Vec = one.iter().map(|v| v * 10.0).collect(); + assert_eq!(ten.len(), want.len()); + assert!(ten.iter().zip(&want).all(|(a, b)| (a - b).abs() < 1e-9), "dashes {ten:?}, want {want:?}"); + } +} + +#[test] +fn repeated_inserts_of_a_block_past_the_nesting_limit_are_scale_checked_once() { + // "Deep" nests a solid line ten blocks down, past the nesting limit, and the drawing places + // it 1,000 times at one scale. + let mut blocks: Vec<(i32, &'static str)> = vec![]; + for i in 1..=10 { + let name: &'static str = Box::leak(format!("N{i}").into_boxed_str()); + let next: &'static str = Box::leak(format!("N{}", i + 1).into_boxed_str()); + blocks.extend([(0, "BLOCK"), (8, "0"), (2, name), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "0"), (11, "1"), (21, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, next), (10, "0"), (20, "0"), (0, "ENDBLK")]); + } + blocks.extend([(0, "BLOCK"), (8, "0"), (2, "N11"), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "0"), (11, "1"), (21, "0"), (0, "ENDBLK")]); + let mut top: Vec<(i32, &'static str)> = vec![]; + for _ in 0..1000 { + top.extend([(0, "INSERT"), (2, "N1"), (10, "0"), (20, "0"), (41, "2"), (42, "2")]); + } + build::SCALED_LOOK_ITEMS.with(|n| n.set(0)); + let r = open(&drawing(&[], &[], &blocks, &top), &points()); + let looked = build::SCALED_LOOK_ITEMS.with(std::cell::Cell::get); + assert_eq!(leaves(&r.document).len(), 1000); + assert!(looked < 100, "{looked} items looked at"); +} + +#[test] +fn a_block_placed_too_deep_to_draw_its_dashes_shares_one_symbol_across_scales() { + let tables = [(0, "TABLE"), (2, "LTYPE"), (0, "LTYPE"), (2, "DASHED"), (73, "2"), (40, "15"), (49, "10"), (49, "-5"), (0, "ENDTAB")]; + // "Mark" has a solid line and places a dashed line four blocks down (D1 > D2 > D3 > Dash). + // The drawing places "Mark" directly at scale 2, where its dashes are drawn, then through + // W1 > W2 > W3 > W4 at scales 2 and 3, where the dashes are past the nesting limit, then + // directly again at scale 1. + let mut blocks: Vec<(i32, &'static str)> = vec![(0, "BLOCK"), (8, "0"), (2, "Dash"), (70, "0"), (10, "0"), (20, "0")]; + blocks.extend([(0, "LINE"), (8, "0"), (6, "DASHED"), (10, "0"), (20, "0"), (11, "100"), (21, "0"), (0, "ENDBLK")]); + let mut chain = |names: &[&'static str], last: &'static str| { + for (i, name) in names.iter().enumerate() { + let next = names.get(i + 1).copied().unwrap_or(last); + blocks.extend([(0, "BLOCK"), (8, "0"), (2, *name), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, next), (10, "0"), (20, "0"), (0, "ENDBLK")]); + } + }; + chain(&["D1", "D2", "D3"], "Dash"); + chain(&["W1", "W2", "W3", "W4"], "Mark"); + // Anonymous blocks are drawn into whatever places them, so each placement of "*A1" looks + // "Mark" up again at depth 4. + chain(&["*A1", "*A2", "*A3", "*A4"], "Mark"); + blocks.extend([(0, "BLOCK"), (8, "0"), (2, "Mark"), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "10"), (11, "100"), (21, "10")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "D1"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + let insert = |block: &'static str, scale: &'static str| [(0, "INSERT"), (2, block), (10, "0"), (20, "0"), (41, scale), (42, scale)]; + let top: Vec<(i32, &str)> = [insert("Mark", "2"), insert("W1", "2"), insert("W1", "3"), insert("Mark", "1")].concat(); + let doc = open(&drawing(&[], &tables, &blocks, &top), &points()).document; + let names: Vec<&str> = doc.symbols.iter().map(|s| s.name.as_str()).collect(); + // The deep placements share one "W4" and one "Mark" whatever their scale; the direct ones + // have a "Mark" each, drawn at their scale. + assert_eq!(names.iter().filter(|n| n.starts_with("W4")).count(), 1, "{names:?}"); + assert_eq!(names.iter().filter(|n| n.starts_with("Mark")).count(), 3, "{names:?}"); + let insts = leaves(&doc); + let [at_two, _, _, at_one] = &insts[..] else { panic!("{insts:?}") }; + for (inst, scale) in [(at_two, 2.0), (at_one, 1.0)] { + let dashes: Vec> = instance_strokes(&doc, inst).into_iter().map(|(d, _)| d).filter(|d| !d.is_empty()).collect(); + assert_eq!(dashes.len(), 1, "the direct placement at scale {scale} draws its dashed line: {dashes:?}"); + } + // Placements that alternate between the two depths look at the blocks once per depth. + let top: Vec<(i32, &str)> = (0..500).flat_map(|_| [insert("Mark", "1"), insert("*A1", "2")]).flatten().collect(); + build::SCALED_LOOK_ITEMS.with(|n| n.set(0)); + let doc = open(&drawing(&[], &tables, &blocks, &top), &points()).document; + let looked = build::SCALED_LOOK_ITEMS.with(std::cell::Cell::get); + assert_eq!(leaves(&doc).len(), 1000); + assert!(looked < 100, "{looked} items looked at"); +} + +#[test] +fn a_block_cut_off_by_the_nesting_limit_keeps_the_art_a_shallower_placement_draws() { + let tables = [(0, "TABLE"), (2, "LTYPE"), (0, "LTYPE"), (2, "DASHED"), (73, "2"), (40, "15"), (49, "10"), (49, "-5"), (0, "ENDTAB")]; + // "S" has a solid line and places "D1", which has a solid line and places a dashed line. The + // anonymous chain *B2 > ... > *B8 places "S" one level deeper than *B3 > ... > *B8 does: too + // deep to draw "D1", where the shallower placement draws "D1" but not its dashed line. + let mut blocks: Vec<(i32, &'static str)> = vec![(0, "BLOCK"), (8, "0"), (2, "Dash"), (70, "0"), (10, "0"), (20, "0")]; + blocks.extend([(0, "LINE"), (8, "0"), (6, "DASHED"), (10, "0"), (20, "0"), (11, "100"), (21, "0"), (0, "ENDBLK")]); + blocks.extend([(0, "BLOCK"), (8, "0"), (2, "D1"), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "20"), (11, "100"), (21, "20")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "Dash"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + blocks.extend([(0, "BLOCK"), (8, "0"), (2, "S"), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "10"), (11, "100"), (21, "10")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "D1"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + let chain = 8; + for i in 1..=chain { + let name: &'static str = Box::leak(format!("*B{i}").into_boxed_str()); + let next: &'static str = if i == chain { "S" } else { Box::leak(format!("*B{}", i + 1).into_boxed_str()) }; + blocks.extend([(0, "BLOCK"), (8, "0"), (2, name), (70, "1"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, next), (10, "0"), (20, "0"), (0, "ENDBLK")]); + } + let insert = |block: &'static str| [(0, "INSERT"), (2, block), (10, "0"), (20, "0")]; + let top: Vec<(i32, &str)> = [insert("*B2"), insert("*B3")].concat(); + let doc = open(&drawing(&[], &tables, &blocks, &top), &points()).document; + let names: Vec<&str> = doc.symbols.iter().map(|s| s.name.as_str()).collect(); + let insts = leaves(&doc); + let [deep, shallow] = &insts[..] else { panic!("{names:?}: {insts:?}") }; + assert_eq!(instance_strokes(&doc, deep).len(), 1, "{names:?}: the deeper placement draws only the line of S"); + let strokes = instance_strokes(&doc, shallow); + assert_eq!(strokes.len(), 2, "{names:?}: the shallower placement draws the lines of S and D1: {strokes:?}"); +} + +#[test] +fn a_block_left_out_inside_itself_does_not_fix_the_scale_of_another_placement() { + let tables = [(0, "TABLE"), (2, "LTYPE"), (0, "LTYPE"), (2, "DASHED"), (73, "2"), (40, "15"), (49, "10"), (49, "-5"), (0, "ENDTAB")]; + // "D" places "P" and has a dashed line; "P" has a solid line and places "D". Placed from "D", + // the scan of "P" leaves "D" out; placed from "W", "P" draws "D" and its dashes. + let blocks = [ + (0, "BLOCK"), + (8, "0"), + (2, "D"), + (70, "0"), + (10, "0"), + (20, "0"), + (0, "INSERT"), + (8, "0"), + (2, "P"), + (10, "0"), + (20, "0"), + (0, "LINE"), + (8, "0"), + (6, "DASHED"), + (10, "0"), + (20, "0"), + (11, "100"), + (21, "0"), + (0, "ENDBLK"), + (0, "BLOCK"), + (8, "0"), + (2, "P"), + (70, "0"), + (10, "0"), + (20, "0"), + (0, "LINE"), + (8, "0"), + (10, "0"), + (20, "10"), + (11, "100"), + (21, "10"), + (0, "INSERT"), + (8, "0"), + (2, "D"), + (10, "0"), + (20, "0"), + (0, "ENDBLK"), + (0, "BLOCK"), + (8, "0"), + (2, "W"), + (70, "0"), + (10, "0"), + (20, "0"), + (0, "INSERT"), + (8, "0"), + (2, "P"), + (10, "0"), + (20, "0"), + (0, "ENDBLK"), + ]; + let dashes = |top: &[(i32, &'static str)]| { + let doc = open(&drawing(&[], &tables, &blocks, top), &points()).document; + let insts = leaves(&doc); + let last = insts.last().unwrap_or_else(|| panic!("nothing placed")); + instance_strokes(&doc, last).into_iter().map(|(d, _)| d).filter(|d| !d.is_empty()).collect::>() + }; + let w = |scale: &'static str| [(0, "INSERT"), (2, "W"), (10, "0"), (20, "0"), (41, scale), (42, scale)]; + let d_first = [(0, "INSERT"), (2, "D"), (10, "0"), (20, "500")]; + let at_one = dashes(&w("1")); + let at_ten = dashes(&[&d_first[..], &w("10")[..]].concat()); + assert!(!at_one.is_empty() && at_one.len() == at_ten.len(), "{at_one:?} and {at_ten:?}"); + for (one, ten) in at_one.iter().zip(&at_ten) { + let want: Vec = one.iter().map(|v| v * 10.0).collect(); + assert!(ten.len() == want.len() && ten.iter().zip(&want).all(|(a, b)| (a - b).abs() < 1e-9), "dashes {ten:?}, want {want:?}"); + } +} + +#[test] +fn repeated_inserts_of_a_block_inside_itself_are_scale_checked_once() { + // "Loop" has 1,000 solid lines and places itself; the drawing places it 1,000 times. + let mut blocks: Vec<(i32, &'static str)> = vec![(0, "BLOCK"), (8, "0"), (2, "Loop"), (70, "0"), (10, "0"), (20, "0")]; + for _ in 0..1000 { + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "0"), (11, "1"), (21, "0")]); + } + blocks.extend([(0, "INSERT"), (8, "0"), (2, "Loop"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + let top: Vec<(i32, &str)> = (0..1000).flat_map(|_| [(0, "INSERT"), (2, "Loop"), (10, "0"), (20, "0")]).collect(); + build::SCALED_LOOK_ITEMS.with(|n| n.set(0)); + let r = open(&drawing(&[], &[], &blocks, &top), &points()); + let looked = build::SCALED_LOOK_ITEMS.with(std::cell::Cell::get); + assert!(looked < 10_000, "{looked} items looked at"); + assert!(!r.warnings.iter().any(|w| w.contains("too much work")), "{:?}", r.warnings); +} + +#[test] +fn a_block_inside_itself_placed_by_many_anonymous_blocks_is_scale_checked_once() { + // "Loop" has 1,000 solid lines and places itself; 1,000 anonymous blocks each place "Loop", + // and the drawing places each of them. + let mut blocks: Vec<(i32, &'static str)> = vec![(0, "BLOCK"), (8, "0"), (2, "Loop"), (70, "0"), (10, "0"), (20, "0")]; + for _ in 0..1000 { + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "0"), (11, "1"), (21, "0")]); + } + blocks.extend([(0, "INSERT"), (8, "0"), (2, "Loop"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + let mut top: Vec<(i32, &'static str)> = vec![]; + for i in 0..1000 { + let name: &'static str = Box::leak(format!("*H{i}").into_boxed_str()); + blocks.extend([(0, "BLOCK"), (8, "0"), (2, name), (70, "1"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "Loop"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + top.extend([(0, "INSERT"), (2, name), (10, "0"), (20, "0")]); + } + build::SCALED_LOOK_ITEMS.with(|n| n.set(0)); + let r = open(&drawing(&[], &[], &blocks, &top), &points()); + let looked = build::SCALED_LOOK_ITEMS.with(std::cell::Cell::get); + assert!(looked < 10_000, "{looked} items looked at"); + assert!(!r.warnings.iter().any(|w| w.contains("too much work")), "{:?}", r.warnings); +} + +#[test] +fn reusing_the_scale_check_of_a_block_inside_itself_again_and_again_stays_within_the_work_budget() { + // C0 places C1 to C99, and each of them places C0; "P" places C0 20,000 times. Only the first + // reuse of C0's check passes on the 100 blocks it went into. + let mut blocks: Vec<(i32, &'static str)> = vec![(0, "BLOCK"), (8, "0"), (2, "C0"), (70, "0"), (10, "0"), (20, "0")]; + let names: Vec<&'static str> = (1..100).map(|i| &*Box::leak(format!("C{i}").into_boxed_str())).collect(); + for name in &names { + blocks.extend([(0, "INSERT"), (8, "0"), (2, *name), (10, "0"), (20, "0")]); + } + blocks.push((0, "ENDBLK")); + for name in &names { + blocks.extend([(0, "BLOCK"), (8, "0"), (2, *name), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "0"), (11, "1"), (21, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "C0"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + } + blocks.extend([(0, "BLOCK"), (8, "0"), (2, "P"), (70, "0"), (10, "0"), (20, "0")]); + for _ in 0..20_000 { + blocks.extend([(0, "INSERT"), (8, "0"), (2, "C0"), (10, "0"), (20, "0")]); + } + blocks.push((0, "ENDBLK")); + let r = open(&drawing(&[], &[], &blocks, &[(0, "INSERT"), (2, "P"), (10, "0"), (20, "0")]), &points()); + assert!(!r.warnings.iter().any(|w| w.contains("too much work")), "{:?}", r.warnings); +} + +#[test] +fn reusing_two_scale_checks_in_turn_stays_within_the_work_budget() { + // A0 places A1 to A99 and B0 places B1 to B99, and each of those places its own 0 block. + // "P" places A0 and B0 in turn, 10,000 times each. + let mut blocks: Vec<(i32, &'static str)> = vec![]; + for family in ["A", "B"] { + let head: &'static str = Box::leak(format!("{family}0").into_boxed_str()); + let names: Vec<&'static str> = (1..100).map(|i| &*Box::leak(format!("{family}{i}").into_boxed_str())).collect(); + blocks.extend([(0, "BLOCK"), (8, "0"), (2, head), (70, "0"), (10, "0"), (20, "0")]); + for name in &names { + blocks.extend([(0, "INSERT"), (8, "0"), (2, *name), (10, "0"), (20, "0")]); + } + blocks.push((0, "ENDBLK")); + for name in &names { + blocks.extend([(0, "BLOCK"), (8, "0"), (2, *name), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "0"), (11, "1"), (21, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, head), (10, "0"), (20, "0"), (0, "ENDBLK")]); + } + } + blocks.extend([(0, "BLOCK"), (8, "0"), (2, "P"), (70, "0"), (10, "0"), (20, "0")]); + for _ in 0..10_000 { + blocks.extend([(0, "INSERT"), (8, "0"), (2, "A0"), (10, "0"), (20, "0"), (0, "INSERT"), (8, "0"), (2, "B0"), (10, "0"), (20, "0")]); + } + blocks.push((0, "ENDBLK")); + build::SCAN_TRAIL_MOST.with(|n| n.set(0)); + let r = open(&drawing(&[], &[], &blocks, &[(0, "INSERT"), (2, "P"), (10, "0"), (20, "0")]), &points()); + let most = build::SCAN_TRAIL_MOST.with(std::cell::Cell::get); + assert!(!r.warnings.iter().any(|w| w.contains("too much work")), "{:?}", r.warnings); + assert!(most < 1000, "the scan trail held {most} steps"); +} + +#[test] +fn a_block_inside_itself_at_the_nesting_limit_shares_its_symbol() { + // "Loop" has a solid line and places itself. The anonymous chain *Y1 > ... > *Y7 places it + // where its copy inside itself would also be past the nesting limit; the drawing places the + // chain and "Loop" directly. + let mut blocks: Vec<(i32, &'static str)> = vec![(0, "BLOCK"), (8, "0"), (2, "Loop"), (70, "0"), (10, "0"), (20, "0")]; + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "0"), (11, "10"), (21, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "Loop"), (10, "20"), (20, "0"), (0, "ENDBLK")]); + let chain = 7; + for i in 1..=chain { + let name: &'static str = Box::leak(format!("*Y{i}").into_boxed_str()); + let next: &'static str = if i == chain { "Loop" } else { Box::leak(format!("*Y{}", i + 1).into_boxed_str()) }; + blocks.extend([(0, "BLOCK"), (8, "0"), (2, name), (70, "1"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, next), (10, "0"), (20, "0"), (0, "ENDBLK")]); + } + let top = [(0, "INSERT"), (2, "*Y1"), (10, "0"), (20, "0"), (0, "INSERT"), (2, "Loop"), (10, "0"), (20, "100")]; + let doc = open(&drawing(&[], &[], &blocks, &top), &points()).document; + let names: Vec<&str> = doc.symbols.iter().map(|s| s.name.as_str()).collect(); + assert_eq!(leaves(&doc).len(), 2, "{names:?}"); + assert_eq!(names, ["Loop"]); +} + +#[test] +fn reusing_the_scale_check_of_a_block_inside_itself_keeps_one_reference_to_it() { + // C0 places C1 to C99, and each of them places C0; "P" places C0 2,000 times. + let mut blocks: Vec<(i32, &'static str)> = vec![(0, "BLOCK"), (8, "0"), (2, "C0"), (70, "0"), (10, "0"), (20, "0")]; + let names: Vec<&'static str> = (1..100).map(|i| &*Box::leak(format!("C{i}").into_boxed_str())).collect(); + for name in &names { + blocks.extend([(0, "INSERT"), (8, "0"), (2, *name), (10, "0"), (20, "0")]); + } + blocks.push((0, "ENDBLK")); + for name in &names { + blocks.extend([(0, "BLOCK"), (8, "0"), (2, *name), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "0"), (11, "1"), (21, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "C0"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + } + blocks.extend([(0, "BLOCK"), (8, "0"), (2, "P"), (70, "0"), (10, "0"), (20, "0")]); + for _ in 0..2000 { + blocks.extend([(0, "INSERT"), (8, "0"), (2, "C0"), (10, "0"), (20, "0")]); + } + blocks.push((0, "ENDBLK")); + build::SCAN_TRAIL_MOST.with(|n| n.set(0)); + open(&drawing(&[], &[], &blocks, &[(0, "INSERT"), (2, "P"), (10, "0"), (20, "0")]), &points()); + let most = build::SCAN_TRAIL_MOST.with(std::cell::Cell::get); + assert!(most < 1000, "the scan trail held {most} steps"); +} + +#[test] +fn placing_a_block_inside_itself_many_times_stays_within_the_work_budget() { + // C0 places C1 to C99, and each of them places C0; the drawing places C0 20,000 times. + let mut blocks: Vec<(i32, &'static str)> = vec![(0, "BLOCK"), (8, "0"), (2, "C0"), (70, "0"), (10, "0"), (20, "0")]; + let names: Vec<&'static str> = (1..100).map(|i| &*Box::leak(format!("C{i}").into_boxed_str())).collect(); + for name in &names { + blocks.extend([(0, "INSERT"), (8, "0"), (2, *name), (10, "0"), (20, "0")]); + } + blocks.push((0, "ENDBLK")); + for name in &names { + blocks.extend([(0, "BLOCK"), (8, "0"), (2, *name), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "0"), (11, "1"), (21, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "C0"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + } + let top: Vec<(i32, &str)> = (0..20_000).flat_map(|_| [(0, "INSERT"), (2, "C0"), (10, "0"), (20, "0")]).collect(); + let r = open(&drawing(&[], &[], &blocks, &top), &points()); + assert!(!r.warnings.iter().any(|w| w.contains("too much work")), "{:?}", r.warnings); +} + +#[test] +fn few_scale_checks_are_kept_for_a_block_inside_itself_under_many_ancestors() { + // "Loop" places K1 to K20, and each of them places "Loop"; the drawing places each K. Under + // each K, the check of "Loop" leaves out a different ancestor. + let mut blocks: Vec<(i32, &'static str)> = vec![(0, "BLOCK"), (8, "0"), (2, "Loop"), (70, "0"), (10, "0"), (20, "0")]; + let names: Vec<&'static str> = (1..=20).map(|i| &*Box::leak(format!("K{i}").into_boxed_str())).collect(); + for name in &names { + blocks.extend([(0, "INSERT"), (8, "0"), (2, *name), (10, "0"), (20, "0")]); + } + blocks.push((0, "ENDBLK")); + let mut top: Vec<(i32, &'static str)> = vec![]; + for name in &names { + blocks.extend([(0, "BLOCK"), (8, "0"), (2, *name), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "0"), (11, "1"), (21, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "Loop"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + top.extend([(0, "INSERT"), (2, *name), (10, "0"), (20, "0")]); + } + build::SCANS_HERE_MOST.with(|n| n.set(0)); + open(&drawing(&[], &[], &blocks, &top), &points()); + let most = build::SCANS_HERE_MOST.with(std::cell::Cell::get); + assert!((1..=16).contains(&most), "{most} checks kept for one block and depth"); +} + +#[test] +fn a_block_past_the_nesting_limit_stays_out_after_a_direct_placement() { + // The anonymous chain *Z1 > ... > *Z8 places "S" past the nesting limit. The drawing places + // the chain, then "S" directly, then the chain again. + let mut blocks: Vec<(i32, &'static str)> = vec![(0, "BLOCK"), (8, "0"), (2, "S"), (70, "0"), (10, "0"), (20, "0")]; + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "0"), (11, "10"), (21, "0"), (0, "ENDBLK")]); + let chain = 8; + for i in 1..=chain { + let name: &'static str = Box::leak(format!("*Z{i}").into_boxed_str()); + let next: &'static str = if i == chain { "S" } else { Box::leak(format!("*Z{}", i + 1).into_boxed_str()) }; + blocks.extend([(0, "BLOCK"), (8, "0"), (2, name), (70, "1"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, next), (10, "0"), (20, "0"), (0, "ENDBLK")]); + } + let insert = |block: &'static str| [(0, "INSERT"), (2, block), (10, "0"), (20, "0")]; + let top: Vec<(i32, &str)> = [insert("*Z1"), insert("S"), insert("*Z1")].concat(); + let doc = open(&drawing(&[], &[], &blocks, &top), &points()).document; + assert_eq!(leaves(&doc).len(), 1, "only the direct placement draws S: {:?}", leaves(&doc)); +} + +#[test] +fn a_block_inside_itself_placed_again_after_many_others_is_scale_checked_once() { + // "Loop" places the anonymous blocks *W1 to *W20, and each of them places "Loop". The + // drawing places each *W, then *W20 1,000 more times. + let mut blocks: Vec<(i32, &'static str)> = vec![(0, "BLOCK"), (8, "0"), (2, "Loop"), (70, "0"), (10, "0"), (20, "0")]; + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "0"), (11, "1"), (21, "0")]); + let names: Vec<&'static str> = (1..=20).map(|i| &*Box::leak(format!("*W{i}").into_boxed_str())).collect(); + for name in &names { + blocks.extend([(0, "INSERT"), (8, "0"), (2, *name), (10, "0"), (20, "0")]); + } + blocks.push((0, "ENDBLK")); + let mut top: Vec<(i32, &'static str)> = vec![]; + for name in &names { + blocks.extend([(0, "BLOCK"), (8, "0"), (2, *name), (70, "1"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "Loop"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + top.extend([(0, "INSERT"), (2, *name), (10, "0"), (20, "0")]); + } + let first = top.len(); + for _ in 0..1000 { + top.extend([(0, "INSERT"), (2, "*W20"), (10, "0"), (20, "0")]); + } + build::SCALED_LOOK_ITEMS.with(|n| n.set(0)); + open(&drawing(&[], &[], &blocks, &top[..first]), &points()); + let once = build::SCALED_LOOK_ITEMS.with(std::cell::Cell::get); + build::SCALED_LOOK_ITEMS.with(|n| n.set(0)); + open(&drawing(&[], &[], &blocks, &top), &points()); + let again = build::SCALED_LOOK_ITEMS.with(std::cell::Cell::get); + assert!(again < once + 1000, "{again} items looked at, {once} without the repeats"); +} + +#[test] +fn a_block_inside_itself_keeps_its_art_where_another_block_places_it() { + // "Loop" has a solid line and places itself; "W" places "Loop". The drawing places "Loop", + // then "W". + let blocks = [ + (0, "BLOCK"), + (8, "0"), + (2, "Loop"), + (70, "0"), + (10, "0"), + (20, "0"), + (0, "LINE"), + (8, "0"), + (10, "0"), + (20, "0"), + (11, "10"), + (21, "0"), + (0, "INSERT"), + (8, "0"), + (2, "Loop"), + (10, "20"), + (20, "0"), + (0, "ENDBLK"), + (0, "BLOCK"), + (8, "0"), + (2, "W"), + (70, "0"), + (10, "0"), + (20, "0"), + (0, "INSERT"), + (8, "0"), + (2, "Loop"), + (10, "0"), + (20, "0"), + (0, "ENDBLK"), + ]; + let top = [(0, "INSERT"), (2, "Loop"), (10, "0"), (20, "0"), (0, "INSERT"), (2, "W"), (10, "0"), (20, "100")]; + let doc = open(&drawing(&[], &[], &blocks, &top), &points()).document; + let insts = leaves(&doc); + let [_, w] = &insts[..] else { panic!("{insts:?}") }; + assert!(!instance_strokes(&doc, w).is_empty(), "W draws the line of Loop"); + // Leaving out the copy of "Loop" inside itself cuts off nothing else, so both placements + // share one symbol. + let names: Vec<&str> = doc.symbols.iter().map(|s| s.name.as_str()).collect(); + assert_eq!(names.iter().filter(|n| n.starts_with("Loop")).count(), 1, "{names:?}"); +} + +#[test] +fn a_missing_block_past_the_nesting_limit_leaves_one_symbol_for_every_depth() { + // "Big" has a solid line and places "Ghost", which the drawing does not define. The + // anonymous chain *G1 > ... > *G7 places "Big" so that "Ghost" is past the nesting limit; the + // drawing places the chain, then "Big" directly. + let mut blocks: Vec<(i32, &'static str)> = vec![(0, "BLOCK"), (8, "0"), (2, "Big"), (70, "0"), (10, "0"), (20, "0")]; + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "0"), (11, "10"), (21, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "Ghost"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + let chain = 7; + for i in 1..=chain { + let name: &'static str = Box::leak(format!("*G{i}").into_boxed_str()); + let next: &'static str = if i == chain { "Big" } else { Box::leak(format!("*G{}", i + 1).into_boxed_str()) }; + blocks.extend([(0, "BLOCK"), (8, "0"), (2, name), (70, "1"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, next), (10, "0"), (20, "0"), (0, "ENDBLK")]); + } + let top = [(0, "INSERT"), (2, "*G1"), (10, "0"), (20, "0"), (0, "INSERT"), (2, "Big"), (10, "0"), (20, "100")]; + let doc = open(&drawing(&[], &[], &blocks, &top), &points()).document; + let names: Vec<&str> = doc.symbols.iter().map(|s| s.name.as_str()).collect(); + assert_eq!(leaves(&doc).len(), 2, "{names:?}"); + assert_eq!(names, ["Big"]); +} + +#[test] +fn repeated_inserts_of_a_large_block_past_the_nesting_limit_stay_within_the_work_budget() { + // "Big" has 2,000 solid lines; the anonymous chain *E1 > ... > *E8 places it past the nesting + // limit, and the drawing places the chain 1,000 times. + let mut blocks: Vec<(i32, &'static str)> = vec![(0, "BLOCK"), (8, "0"), (2, "Big"), (70, "0"), (10, "0"), (20, "0")]; + for _ in 0..2000 { + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "0"), (11, "1"), (21, "0")]); + } + blocks.push((0, "ENDBLK")); + let chain = 8; + for i in 1..=chain { + let name: &'static str = Box::leak(format!("*E{i}").into_boxed_str()); + let next: &'static str = if i == chain { "Big" } else { Box::leak(format!("*E{}", i + 1).into_boxed_str()) }; + blocks.extend([(0, "BLOCK"), (8, "0"), (2, name), (70, "1"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, next), (10, "0"), (20, "0"), (0, "ENDBLK")]); + } + let top: Vec<(i32, &str)> = (0..1000).flat_map(|_| [(0, "INSERT"), (2, "*E1"), (10, "0"), (20, "0")]).collect(); + let r = open(&drawing(&[], &[], &blocks, &top), &points()); + assert!(!r.warnings.iter().any(|w| w.contains("too much work")), "{:?}", r.warnings); +} + #[test] fn the_scale_check_of_blocks_stops_at_the_work_budget() { // "Outer" places "Leaf" 1,100 times, each in its own color, and "Leaf" has 1,000 solid From 93989cd3ace493dcce24e57ebae1b7f6fcf3e5df Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 10:44:01 -0800 Subject: [PATCH 52/62] DXF/DWG import: shaded hatches leave a block's scale check unchanged Main added Geom::Shaded for gradient and pattern hatches, and the scale check's match did not cover it, so vectorcraft-cad stopped compiling. Gradients fill and pattern lines carry their own dashes at the lineweight, so neither makes a block's look depend on its insert scale. --- crates/cad/src/import/build.rs | 3 ++- crates/cad/src/import/tests.rs | 47 ++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/crates/cad/src/import/build.rs b/crates/cad/src/import/build.rs index 14ae478bb6..c8c6a0e2ad 100644 --- a/crates/cad/src/import/build.rs +++ b/crates/cad/src/import/build.rs @@ -1205,7 +1205,8 @@ impl<'d, 'a> Build<'d, 'a> { Geom::Path { width, .. } => { *width > 0.0 || self.d.linetypes.get(&self.linetype(&it.props, inh)).is_some_and(|p| p.iter().take(64).any(|v| *v < 0.0)) } - Geom::Text(_) | Geom::Image(_) => false, + // Gradients fill, and pattern lines carry their own dashes at the lineweight. + Geom::Shaded { .. } | Geom::Text(_) | Geom::Image(_) => false, Geom::Insert(ins) => { let child = self.inherit(&it.props, inh); let child = if self.is_sensitive(&ins.block, depth + 1) { child } else { Inherit::default() }; diff --git a/crates/cad/src/import/tests.rs b/crates/cad/src/import/tests.rs index 74dd2f4222..60584a839c 100644 --- a/crates/cad/src/import/tests.rs +++ b/crates/cad/src/import/tests.rs @@ -1616,6 +1616,53 @@ fn dashes_on_a_hidden_layer_leave_a_block_one_symbol_for_every_scale() { assert_eq!(doc.symbols.len(), 1, "{:?}", doc.symbols.iter().map(|s| &s.name).collect::>()); } +#[test] +fn a_dashed_pattern_hatch_leaves_a_block_one_symbol_for_every_scale() { + let tables = [(0, "TABLE"), (2, "LTYPE"), (0, "LTYPE"), (2, "DASHED"), (73, "2"), (40, "15"), (49, "10"), (49, "-5"), (0, "ENDTAB")]; + // "Mark": a pattern hatch in a dashed linetype, whose lines are drawn without it. + let mut blocks = vec![(0, "BLOCK"), (8, "0"), (2, "Mark"), (70, "0"), (10, "0"), (20, "0")]; + blocks.extend([ + (0, "HATCH"), + (8, "0"), + (6, "DASHED"), + (10, "0"), + (20, "0"), + (30, "0"), + (2, "ANSI31"), + (70, "0"), + (71, "0"), + (91, "1"), + (92, "2"), + (72, "0"), + (73, "1"), + (93, "4"), + (10, "0"), + (20, "0"), + (10, "100"), + (20, "0"), + (10, "100"), + (20, "50"), + (10, "0"), + (20, "50"), + (97, "0"), + (75, "0"), + (76, "1"), + (78, "1"), + (53, "0"), + (43, "0"), + (44, "5"), + (45, "0"), + (46, "10"), + (79, "0"), + (98, "0"), + (0, "ENDBLK"), + ]); + let inserts = [(0, "INSERT"), (2, "Mark"), (10, "0"), (20, "0"), (0, "INSERT"), (2, "Mark"), (10, "0"), (20, "100"), (41, "10"), (42, "10")]; + let doc = open(&drawing(&[], &tables, &blocks, &inserts), &points()).document; + assert_eq!(leaves(&doc).len(), 2); + assert_eq!(doc.symbols.len(), 1, "{:?}", doc.symbols.iter().map(|s| &s.name).collect::>()); +} + #[test] fn a_block_first_seen_at_the_nesting_limit_still_scales_its_dashes_when_placed_shallow() { let tables = [(0, "TABLE"), (2, "LTYPE"), (0, "LTYPE"), (2, "DASHED"), (73, "2"), (40, "15"), (49, "10"), (49, "-5"), (0, "ENDTAB")]; From 63e06cd7cf48ec4a2067f995375bed184ee1cbb0 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 10:53:38 -0800 Subject: [PATCH 53/62] Canvas: tessellate the anchor marks again when a built square is thin enough to draw as a line The move of the kept anchor marks mesh compared each requested square side with twice the feathering, but the tessellator tests the built rectangle's f32 width and height. A side just over 2 pixels gives a square exactly 2 pixels wide at x = 252.5, which the tessellator draws as a line. The check now tests both built squares, before and after the move. --- crates/ui-egui/src/canvas/selection.rs | 2 ++ crates/ui-egui/src/canvas/selection/tests.rs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/crates/ui-egui/src/canvas/selection.rs b/crates/ui-egui/src/canvas/selection.rs index c38f85380d..d30921195d 100644 --- a/crates/ui-egui/src/canvas/selection.rs +++ b/crates/ui-egui/src/canvas/selection.rs @@ -742,7 +742,9 @@ impl KeptMesh { } for side in sides { let (a, b) = (Rect::from_center_size(from, egui::Vec2::splat(side)), Rect::from_center_size(to, egui::Vec2::splat(side))); + // The tessellator tests the built square's `f32` width and height, which can come out below `side`. if a.size() != b.size() + || [a, b].iter().any(|r| r.width() <= 2.0 * feathering || r.height() <= 2.0 * feathering) || !(lands(a.min.x, b.min.x, pixels[0]) && lands(a.max.x, b.max.x, pixels[0]) && lands(a.min.y, b.min.y, pixels[1]) diff --git a/crates/ui-egui/src/canvas/selection/tests.rs b/crates/ui-egui/src/canvas/selection/tests.rs index 765ccd98b3..fa63201eaf 100644 --- a/crates/ui-egui/src/canvas/selection/tests.rs +++ b/crates/ui-egui/src/canvas/selection/tests.rs @@ -1438,6 +1438,10 @@ fn a_move_tessellates_the_marks_again_when_a_square_is_drawn_as_a_line() { let mut options = PathOptionsSettings::default(); options.anchor_size = Some(2.0); assert!(!kept_at_one_pixel_per_point().translate(by, [Point::new(252.5, 10.0)], &options), "a 2 pt anchor at 1 pixel per point"); + // The `f32` just over 2 passes the check on the side, but the square built at x = 252.5 spans 251.5 to 253.5 in + // `f32`, 2 pixels wide, so the tessellator draws it as a line. + options.anchor_size = Some(f32::from_bits(2.0_f32.to_bits() + 1)); + assert!(!kept_at_one_pixel_per_point().translate(by, [Point::new(252.5, 10.0)], &options), "a square built 2 pixels wide"); options.anchor_size = Some(3.0); assert!(kept_at_one_pixel_per_point().translate(by, [Point::new(252.5, 10.0)], &options), "a 3 pt anchor"); } From 4dd330c8bb9a38b5899f6422637734800eb5fc6b Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 11:00:14 -0800 Subject: [PATCH 54/62] Save: a file comparison wakes the app, waits for its own preview, and ends with its save - The comparison's thread asks for a frame once it answers, so a save started from the menu finishes without waiting for the next input. - A comparison that answers while a dialog previews a change in the save's own document, or a drag in it is not yet committed, waits for the preview to end, so the file never holds a change that Cancel takes back. Typing in progress is saved as by any Save. - A save with an explicit path that ends while a comparison is pending drops the comparison and frees the flow, so no changed-on-disk question opens with no save left to apply its answer. --- crates/ui-egui/src/io/save.rs | 35 +++++++++++--- crates/ui-egui/src/io/saved_contents.rs | 15 +++--- crates/ui-egui/src/tests/save.rs | 63 +++++++++++++++++++++++++ 3 files changed, 101 insertions(+), 12 deletions(-) diff --git a/crates/ui-egui/src/io/save.rs b/crates/ui-egui/src/io/save.rs index f373ed900b..aa60e9835b 100644 --- a/crates/ui-egui/src/io/save.rs +++ b/crates/ui-egui/src/io/save.rs @@ -168,11 +168,15 @@ pub(crate) fn checks_pending(app: &VectorcraftApp) -> bool { app.saves.checks.keys().any(|uid| !held(app, *uid)) } -/// Whether document `uid`'s save has to wait: writing it activates its document, which would -/// put it under an open dialog or file picker of another document, or cancel a drag in progress -/// in the active one. +/// Whether document `uid`'s save has to wait: the document shows a dialog's preview or a drag not +/// yet committed, which the save would write (typing in progress is saved, as by any Save), or +/// writing it activates its document, which would put it under an open dialog or file picker of +/// another document, or cancel a drag in progress in the active one. #[cfg(not(target_arch = "wasm32"))] fn held(app: &VectorcraftApp, uid: u64) -> bool { + if app.session.documents().iter().any(|d| d.uid == uid && d.interaction.as_ref().is_some_and(|it| it.label != "Typing")) { + return true; + } let active = app.session.active(); active.map(|d| d.uid) != Some(uid) && (app.any_dialog_open() || app.file_dialog_open() || active.is_some_and(|d| d.interaction.is_some()) || app.canvas.grab.is_some()) @@ -224,6 +228,14 @@ fn finish(app: &mut VectorcraftApp, uid: u64, retargets: bool, out: &Result flow.failed(&uid), } if !matches!(out, Ok(v) if v.get("pending").is_some()) { + // A comparison still pending belongs to the save this one ends (a save with an explicit path + // ran meanwhile): it is dropped and its flow freed, since its answer would ask about the file + // with no save left to apply the answer. + if app.saves.checks.remove(&uid).is_some() + && let Some(flow) = app.saves.flows.get_mut(&uid) + { + let _ = flow.cancel(app.host.files()); + } terminate(app, uid, out.clone()); } } @@ -322,7 +334,8 @@ pub(crate) fn wait_for_checks(app: &mut VectorcraftApp) { resume_checked(app, true); } -/// Waits for every save's file comparison to answer, leaving each answer for the next [`pump`]. +/// Waits for every save's file comparison to answer and its thread to end (its wake included), +/// leaving each answer for the next [`pump`]. #[cfg(all(test, not(target_arch = "wasm32")))] pub(crate) fn wait_for_answers(app: &mut VectorcraftApp) { for check in app.saves.checks.values_mut() { @@ -330,6 +343,8 @@ pub(crate) fn wait_for_answers(app: &mut VectorcraftApp) { if let Ok(same) = check.answer.recv() { let _ = send.send(same); } + // The thread drops its sender as it ends, after its wake. + let _ = check.answer.recv(); check.answer = answer; } } @@ -339,7 +354,7 @@ pub(crate) fn wait_for_answers(app: &mut VectorcraftApp) { pub(crate) fn wait_for_contents(app: &VectorcraftApp) -> Option { let document = app.session.active()?; let path = Path::new(document.path.as_deref()?); - app.saves.contents.check(document.uid, path)?.recv().ok().flatten() + app.saves.contents.check(document.uid, path, Wake::none())?.recv().ok().flatten() } /// The web has no save flows: nothing answers between passes. @@ -395,6 +410,12 @@ fn ask_changed_on_disk(app: &mut VectorcraftApp, key: u64, path: &Path) -> Resul Ok(json!({ "pending": "changedOnDisk" })) } +#[cfg(not(target_arch = "wasm32"))] +/// Asks the window for a frame, from any thread; does nothing without a window. +fn ui_wake(app: &VectorcraftApp) -> Wake { + app.ui_ctx.clone().map_or_else(Wake::none, |ctx| Wake::new(move || ctx.request_repaint())) +} + #[cfg(not(target_arch = "wasm32"))] fn proceed(app: &mut VectorcraftApp, step: SaveStep) -> Result { match step { @@ -402,7 +423,9 @@ fn proceed(app: &mut VectorcraftApp, step: SaveStep) -> Result match app.saves.contents.check(key, &path) { + // The comparison's thread asks for a frame once it answers: a save started from the UI comes + // after this frame's repaint decision. + SaveStep::AskChangedOnDisk { key, path } => match app.saves.contents.check(key, &path, ui_wake(app)) { Some(answer) => { app.saves.checks.insert(key, Checking { path, answer }); Ok(json!({ "pending": "checkingFile" })) diff --git a/crates/ui-egui/src/io/saved_contents.rs b/crates/ui-egui/src/io/saved_contents.rs index 3e3ff170b8..1c77b56b7c 100644 --- a/crates/ui-egui/src/io/saved_contents.rs +++ b/crates/ui-egui/src/io/saved_contents.rs @@ -15,6 +15,7 @@ use std::sync::mpsc::{self, Receiver}; use std::sync::{Arc, Mutex, MutexGuard, PoisonError}; use std::thread::JoinHandle; +use craft::host::Wake; use craft::platform::watch::FileStamp; use sha2::{Digest, Sha256}; @@ -81,8 +82,9 @@ impl SavedContents { /// Starts comparing document `key`'s file at `path` with the version the app last read or /// wrote, on a thread of its own that first waits for that version's digest. The answer is /// the file's version now when it holds the same bytes, and `None` when the bytes differ, the - /// file can't be read, or no digest of `path` was taken. `None` here when no thread starts. - pub(crate) fn check(&self, key: u64, path: &Path) -> Option>> { + /// file can't be read, or no digest of `path` was taken. `wake` runs once the answer is sent, + /// so a frame collects it. `None` here when no thread starts. + pub(crate) fn check(&self, key: u64, path: &Path, wake: Wake) -> Option>> { let pending = lock(&self.state).pending.remove(&key); let state = Arc::clone(&self.state); let path = path.to_path_buf(); @@ -94,6 +96,7 @@ impl SavedContents { } // The caller may be gone (its document closed): the answer is dropped. let _ = send.send(unchanged(&state, key, &path)); + wake.wake(); }; std::thread::Builder::new().name("vectorcraft-file-check".into()).spawn(work).ok().map(|_| answer) } @@ -164,7 +167,7 @@ mod tests { let contents = SavedContents::new(); for uid in [1, 2] { contents.note(uid, path, stamp); - assert!(contents.check(uid, path).unwrap().recv().unwrap().is_some()); + assert!(contents.check(uid, path, Wake::none()).unwrap().recv().unwrap().is_some()); } // A third document closes while its digest handle is still retained. contents.note(3, path, stamp); @@ -178,8 +181,8 @@ mod tests { assert!(!state.notes.contains_key(&uid)); } } - assert!(contents.check(1, path).unwrap().recv().unwrap().is_none()); - assert!(contents.check(3, path).unwrap().recv().unwrap().is_none()); - assert!(contents.check(2, path).unwrap().recv().unwrap().is_some()); + assert!(contents.check(1, path, Wake::none()).unwrap().recv().unwrap().is_none()); + assert!(contents.check(3, path, Wake::none()).unwrap().recv().unwrap().is_none()); + assert!(contents.check(2, path, Wake::none()).unwrap().recv().unwrap().is_some()); } } diff --git a/crates/ui-egui/src/tests/save.rs b/crates/ui-egui/src/tests/save.rs index 912626e647..cc23df8b53 100644 --- a/crates/ui-egui/src/tests/save.rs +++ b/crates/ui-egui/src/tests/save.rs @@ -796,3 +796,66 @@ fn a_comparison_waits_while_a_drag_goes_on_in_another_document() { assert!(unwritten, "nothing is written while the drag goes on"); assert!(written, "the save finishes once the drag ends"); } + +/// A comparison's thread asks for a frame once it answers: a save started from the UI comes after +/// that frame's repaint decision, and an idle app draws no other frame. +#[test] +fn a_comparison_asks_for_a_frame_once_it_answers() { + let (d, _path, mut app) = opened_then_put_back("compare-answer-wake", true); + let ctx = settled(); + app.ui_ctx = Some(ctx.clone()); + assert_eq!(app.run("file.save", json!({})).unwrap()["pending"], "checkingFile"); + io::save::wait_for_answers(&mut app); + let woke = ctx.has_requested_repaint(); + io::save::wait_for_checks(&mut app); + crate::background::wait_all(&mut app); + let _ = std::fs::remove_dir_all(d); + assert!(woke, "the answer asks for a frame"); +} + +/// A comparison that answers while a dialog previews a change in the save's own document waits for +/// the preview to end, so the file never holds a change the dialog's Cancel takes back. +#[test] +fn a_comparison_waits_while_its_own_document_shows_a_preview() { + let (d, path, mut app) = opened_then_put_back("compare-own-preview", true); + let before = std::fs::read(&path).unwrap(); + assert_eq!(app.run("file.save", json!({})).unwrap()["pending"], "checkingFile"); + app.begin_interaction("Move").unwrap(); + io::save::wait_for_answers(&mut app); + let ctx = egui::Context::default(); + io::save::pump(&mut app, &ctx); + crate::background::wait_all(&mut app); + let unwritten = std::fs::read(&path).unwrap() == before; + let previewing = app.session.active().is_some_and(|d| d.interaction.is_some()); + // Once the preview is canceled, the save goes on and writes the file. + app.session.cancel_interaction().unwrap(); + io::save::pump(&mut app, &ctx); + crate::background::wait_all(&mut app); + let written = std::fs::read(&path).unwrap() != before; + let _ = std::fs::remove_dir_all(d); + assert!(previewing, "the preview stays open"); + assert!(unwritten, "nothing is written while the preview is shown"); + assert!(written, "the save finishes once the preview ends"); +} + +/// A save with an explicit path that ends while a comparison is pending drops the comparison: its +/// answer would ask about the file with no save left to apply the answer. +#[test] +fn a_save_that_ends_first_drops_the_pending_comparison() { + let (d, path, mut app) = opened_then_put_back("compare-overtaken", true); + assert_eq!(app.run("file.save", json!({})).unwrap()["pending"], "checkingFile"); + app.run("file.saveAs", json!({"path": path})).unwrap(); + crate::background::wait_all(&mut app); + io::save::wait_for_checks(&mut app); + crate::background::wait_all(&mut app); + let asked = app.any_dialog_open(); + let pending = io::save::checks_pending(&app); + rect(&mut app); + let next = app.run("file.save", json!({})); + io::save::wait_for_checks(&mut app); + crate::background::wait_all(&mut app); + let _ = std::fs::remove_dir_all(d); + assert!(!asked, "no changed-on-disk question without a save to answer it"); + assert!(!pending, "the comparison is dropped"); + assert!(next.is_ok(), "the next save starts: {next:?}"); +} From fb9759490f96d82682fab3dd9abbd034fc7f7e29 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 11:04:14 -0800 Subject: [PATCH 55/62] Fonts: the startup scan lists the installed fonts once Since the move to the craft font catalog, the global catalog asked the platform's font service (DirectWrite on Windows, CoreText on macOS) and also ran the app's platform lister, which lists the same fonts again. On Windows the font service opens and maps every installed face, so the background font scan did that work twice at every start. set_platform_font_files_complete sets a lister that lists every font the font service lists. The catalog then reads the lister's files and does not ask the font service. set_platform_font_files keeps adding to the font service as before. The desktop app and vectorcraft-cli install their Windows and macOS listers with the new call; both listers already read DirectWrite's system collection (plus GDI's fonts) and CoreText's available fonts. --- apps/vectorcraft/src/mac_fonts.rs | 5 +++-- apps/vectorcraft/src/system_fonts.rs | 5 +++-- crates/text/src/fontdb.rs | 8 +++---- crates/text/src/fontdb/dirs.rs | 32 +++++++++++++++++++++++++--- crates/text/src/lib.rs | 4 ++-- crates/text/src/tests/sysfonts.rs | 4 +++- 6 files changed, 44 insertions(+), 14 deletions(-) diff --git a/apps/vectorcraft/src/mac_fonts.rs b/apps/vectorcraft/src/mac_fonts.rs index 4e9f996d62..a98f76ea68 100644 --- a/apps/vectorcraft/src/mac_fonts.rs +++ b/apps/vectorcraft/src/mac_fonts.rs @@ -21,9 +21,10 @@ use objc2_core_text::CTFontManagerCopyAvailableFontURLs; /// The most fonts read from the list (a system has a few thousand faces). const MAX_FONTS: usize = 1 << 16; -/// Have the font scans read the font files CoreText lists. +/// Have the font scans read the font files CoreText lists, in place of asking the font service for +/// CoreText's fonts a second time. pub fn install() { - vectorcraft_text::set_platform_font_files(font_files); + vectorcraft_text::set_platform_font_files_complete(font_files); } /// The files of the fonts available to the app as CoreText lists them now (fonts registered since diff --git a/apps/vectorcraft/src/system_fonts.rs b/apps/vectorcraft/src/system_fonts.rs index fe9df48ca4..0edbdd41ab 100644 --- a/apps/vectorcraft/src/system_fonts.rs +++ b/apps/vectorcraft/src/system_fonts.rs @@ -40,9 +40,10 @@ const MAX_FACE_FILES: u32 = 8; /// The longest file path taken, in UTF-16 units (Windows' own limit). const MAX_PATH: u32 = 32_767; -/// Have the font scans read the font files DirectWrite and GDI list. +/// Have the font scans read the font files DirectWrite and GDI list, in place of asking the font +/// service for DirectWrite's collection a second time. pub fn install() { - vectorcraft_text::set_platform_font_files(font_files); + vectorcraft_text::set_platform_font_files_complete(font_files); } /// The local files of the fonts in DirectWrite's system font collection as it is now (fonts diff --git a/crates/text/src/fontdb.rs b/crates/text/src/fontdb.rs index 80d1230994..60be7f6251 100644 --- a/crates/text/src/fontdb.rs +++ b/crates/text/src/fontdb.rs @@ -46,12 +46,12 @@ use cache::GlyphCache; use cache::{CanonicalNames, GlyphColours, GlyphImages}; pub use composite::{CompositeCoverage, LentCompositeFonts}; use craft::font_catalog::Catalog; -#[cfg(test)] -pub(crate) use dirs::sfnt_of; pub use dirs::{ - PlatformFontFiles, app_font_dir, set_app_font_dir, set_platform_font_files, set_user_font_dirs, set_user_font_dirs_confined, system_font_dirs, - user_font_dirs, + PlatformFontFiles, app_font_dir, set_app_font_dir, set_platform_font_files, set_platform_font_files_complete, set_user_font_dirs, + set_user_font_dirs_confined, system_font_dirs, user_font_dirs, }; +#[cfg(test)] +pub(crate) use dirs::{sfnt_of, uses_font_service}; use face::Instances; pub(crate) use face::PathAlignHeights; pub use face::{FALLBACK_FAMILY, FontFace, IcfMargins, OutlineFormat}; diff --git a/crates/text/src/fontdb/dirs.rs b/crates/text/src/fontdb/dirs.rs index 51e16807a0..ed986dc8d4 100644 --- a/crates/text/src/fontdb/dirs.rs +++ b/crates/text/src/fontdb/dirs.rs @@ -47,6 +47,22 @@ pub fn set_platform_font_files(list: PlatformFontFiles) { let _ = list; } +/// [`set_platform_font_files`] for a lister that lists every font the platform's font service +/// lists. [`FontDb::global`]'s scan then reads the lister's files and does not also ask the font +/// service, which opens every installed face a second time. Only the first lister set counts. +pub fn set_platform_font_files_complete(list: PlatformFontFiles) { + #[cfg(not(target_arch = "wasm32"))] + if PLATFORM_FONT_FILES.set(list).is_ok() { + LISTER_IS_COMPLETE.store(true, std::sync::atomic::Ordering::Relaxed); + } + #[cfg(target_arch = "wasm32")] + let _ = list; +} + +/// Whether the lister was set with [`set_platform_font_files_complete`]. +#[cfg(not(target_arch = "wasm32"))] +static LISTER_IS_COMPLETE: std::sync::atomic::AtomicBool = std::sync::atomic::AtomicBool::new(false); + /// The most files [`platform_font_files`] takes from the lister. #[cfg(not(target_arch = "wasm32"))] const MAX_PLATFORM_FILES: usize = 1 << 16; @@ -64,10 +80,20 @@ fn platform_font_files() -> Vec { Vec::new() } -/// The catalog of [`FontDb::global`]: the platform's font folders and font service, the font -/// store, VectorCraft's own folders ([`app_dirs`]) and the files [`set_platform_font_files`] lists. +/// Whether [`system_catalog`] asks the platform's font service: not when the lister was set with +/// [`set_platform_font_files_complete`]. +pub(crate) fn uses_font_service() -> bool { + #[cfg(not(target_arch = "wasm32"))] + return !LISTER_IS_COMPLETE.load(std::sync::atomic::Ordering::Relaxed); + #[cfg(target_arch = "wasm32")] + true +} + +/// The catalog of [`FontDb::global`]: the platform's font folders, the platform's font service +/// ([`uses_font_service`]), the font store, VectorCraft's own folders ([`app_dirs`]) and the files +/// [`set_platform_font_files`] lists. pub(super) fn system_catalog() -> Catalog { - let catalog = Catalog::new(FontEnv::from_process()).with_lister(Arc::new(platform_font_files)); + let catalog = Catalog::new(FontEnv::from_process()).with_font_service(uses_font_service()).with_lister(Arc::new(platform_font_files)); catalog.set_app_dirs(app_dirs()); catalog } diff --git a/crates/text/src/lib.rs b/crates/text/src/lib.rs index af85cf99bd..73b3026361 100644 --- a/crates/text/src/lib.rs +++ b/crates/text/src/lib.rs @@ -49,8 +49,8 @@ pub use fontdb::{ CompositeCoverage, FALLBACK_FAMILY, FontClass, FontDb, FontFace, FontLikeness, FontMatch, FontTraits, GENERIC_FAMILIES, GlyphAlternate, GlyphCategory, GlyphCategoryKind, GlyphOrigin, IcfMargins, InstalledFace, JoiningPosition, LentCompositeFonts, MAX_FILE_FACES, OutlineFormat, PlatformFontFiles, RECENTLY_ADDED_WITHIN, RecentlyAdded, StylisticSet, Substitution, SubstitutionKind, UnloadedFile, WantedFont, WantedFonts, - app_font_dir, is_font_file, is_generic_family, is_suitcase, set_app_font_dir, set_platform_font_files, set_user_font_dirs, - set_user_font_dirs_confined, style_weight, system_font_dirs, user_font_dirs, + app_font_dir, is_font_file, is_generic_family, is_suitcase, set_app_font_dir, set_platform_font_files, set_platform_font_files_complete, + set_user_font_dirs, set_user_font_dirs_confined, style_weight, system_font_dirs, user_font_dirs, }; pub use hyphen::{hyphenation_exceptions, set_hyphenation_exceptions}; pub use layout::{envelope_ink, layout_inputs, register_envelope_ink}; diff --git a/crates/text/src/tests/sysfonts.rs b/crates/text/src/tests/sysfonts.rs index d82ca9ae38..0a8a8bc474 100644 --- a/crates/text/src/tests/sysfonts.rs +++ b/crates/text/src/tests/sysfonts.rs @@ -760,7 +760,9 @@ fn fonts_the_platform_lists_outside_the_font_folders_are_cataloged() { use std::sync::Mutex; static FILES: Mutex> = Mutex::new(Vec::new()); let list = |files: Vec| *FILES.lock().unwrap_or_else(|e| e.into_inner()) = files; - set_platform_font_files(|| FILES.lock().unwrap_or_else(|e| e.into_inner()).clone()); + assert!(crate::fontdb::uses_font_service(), "without a complete lister the scan asks the font service"); + set_platform_font_files_complete(|| FILES.lock().unwrap_or_else(|e| e.into_inner()).clone()); + assert!(!crate::fontdb::uses_font_service(), "with a complete lister the scan does not also ask the font service"); let file = service_font(); std::fs::create_dir_all(file.parent().unwrap()).unwrap(); let _ = std::fs::remove_file(&file); From 94acea6ef60a4df367d278b96afec2d995b972e5 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 12:11:54 -0800 Subject: [PATCH 56/62] Swatch Strip: a right-click needs its press and release on the same chip A right-button release on a chip set the stroke even when the press began elsewhere, so a right-drag from empty space onto a chip changed the stroke. The strip now remembers the chip (by document and paint) that a right press landed on and sets the stroke only when the release lands on that chip. Presses on a layer covering a chip, and the invisible sizing pass of a measuring container, do not count, and a chip that moves in the list between press and release still does. --- crates/ui-egui/src/panels/swatch_strip.rs | 180 +++++++++++++++++++++- 1 file changed, 175 insertions(+), 5 deletions(-) diff --git a/crates/ui-egui/src/panels/swatch_strip.rs b/crates/ui-egui/src/panels/swatch_strip.rs index ae05df4904..c91b5b3b7a 100644 --- a/crates/ui-egui/src/panels/swatch_strip.rs +++ b/crates/ui-egui/src/panels/swatch_strip.rs @@ -11,7 +11,7 @@ use craft::theme::Srgba; use craft::ui::choice::Swatch; use craft::ui::contract::{Props as _, Scroll, Show as _, ShowContainer as _}; use craft::ui::layout_components::{Row, Stack}; -use egui::{PointerButton, Ui}; +use egui::{Event, PointerButton, Rect, Ui}; use serde_json::{Value, json}; use vectorcraft_color::Paint; @@ -57,6 +57,9 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) { } let chips = chips(app); let mut picked = None; + // Where each chip shows (clipped to the scroll area), for placing the frame's right-button events. + // A sizing pass draws the chips first; the drawing pass after it writes over its rects. + let mut hits: Vec> = vec![None; chips.len()]; Stack::new().id_salt(ID).fill().scroll(Scroll::vertical()).show(ui, |ui, _| { Row::new().fill_width().wrap(true).show(ui, |ui, _| { for (at, chip) in chips.iter().enumerate() { @@ -65,14 +68,42 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) { None => Swatch::optional(chip.name.clone(), None::), }; let out = swatch.id_salt(at).tooltip(chip.name.clone()).show(ui); - // A right-click ends on the chip, as the framework's swatch palette reads one. - let secondary = out.response.contains_pointer() && ui.input(|i| i.pointer.button_released(PointerButton::Secondary)); - if out.clicked || secondary { - picked = Some((at, secondary || out.activation.is_some_and(|a| a.mods.alt))); + if let Some(hit) = hits.get_mut(at) { + *hit = Some(out.response.rect.intersect(ui.clip_rect())); + } + if out.clicked { + picked = Some((at, out.activation.is_some_and(|a| a.mods.alt))); } } }); }); + // A right-click sets the stroke when its press and its release both land on the same chip. + let press_id = ui.scope_id().with((ID, "secondary-press")); + // The chip is kept by its document and the paint it sends, so a swatch that moves in the list between press and + // release still counts, and a release in another document does not. + let uid = app.session.active().map_or(0, |st| st.uid); + let keys: Vec = chips.iter().map(|c| format!("{uid}:{}", c.params)).collect(); + let laid_out: Vec<(Rect, String)> = hits.iter().zip(&keys).filter_map(|(r, k)| r.map(|r| (r, k.clone()))).collect(); + // A container's measuring run shows the strip in an invisible sizing pass with the same id and input before the + // frame's real run; it leaves the remembered press alone, so the real run's release still finds it. + if !ui.is_sizing_pass() { + let mut pressed_on = ui.ctx().data(|d| d.get_temp::>(press_id)).flatten(); + for event in ui.input(|i| i.events.clone()) { + if let Event::PointerButton { pos, button: PointerButton::Secondary, pressed, .. } = event { + // A chip under another layer (a popup, a floating panel) does not take the event. + let on_layer = ui.ctx().layer_id_at(pos) == Some(ui.layer_id()); + let key = if on_layer { laid_out.iter().find(|(r, _)| r.contains(pos)).map(|(_, k)| k.clone()) } else { None }; + if pressed { + pressed_on = key; + } else if let Some(k) = pressed_on.take() + && key.as_ref() == Some(&k) + { + picked = keys.iter().position(|x| *x == k).map(|at| (at, true)); + } + } + } + ui.ctx().data_mut(|d| d.insert_temp(press_id, pressed_on)); + } if let Some((at, stroke)) = picked && let Some(chip) = chips.get(at) { @@ -143,6 +174,145 @@ mod tests { assert_eq!(panel.app().session.fill_active, fill_active, "the active proxy stays as it was"); } + #[test] + fn a_right_drag_from_outside_onto_a_chip_leaves_the_stroke() { + let mut panel = Panel::new(app(), show); + let before = paints(&panel).1; + let chip = panel.rect("Strip Green"); + let outside = egui::pos2(chip.center().x, chip.bottom() + chip.height() * 3.0); + let button = + |at, pressed| egui::Event::PointerButton { pos: at, button: egui::PointerButton::Secondary, pressed, modifiers: Modifiers::NONE }; + panel.frame_with(vec![egui::Event::PointerMoved(outside)]); + panel.frame_with(vec![button(outside, true)]); + panel.frame_with(vec![egui::Event::PointerMoved(chip.center())]); + panel.frame_with(vec![button(chip.center(), false)]); + panel.frame(); + assert_eq!(paints(&panel).1, before, "a right-button release on a chip whose press began elsewhere sets nothing"); + + panel.frame_with(vec![ + egui::Event::PointerMoved(outside), + button(outside, true), + egui::Event::PointerMoved(chip.center()), + button(chip.center(), false), + ]); + panel.frame(); + assert_eq!(paints(&panel).1, before, "the same gesture within one frame sets nothing either"); + + panel.secondary_click("Strip Green"); + assert_eq!(swatch_of(&paints(&panel).1).as_deref(), Some("Strip Green"), "a right-click on the chip still sets the stroke"); + } + + #[test] + fn a_right_click_counts_for_the_swatch_pressed_when_the_list_reorders_under_it() { + let mut panel = Panel::new(app(), show); + let from = panel.rect("Strip Red").center(); + let button = + |at, pressed| egui::Event::PointerButton { pos: at, button: egui::PointerButton::Secondary, pressed, modifiers: Modifiers::NONE }; + panel.frame_with(vec![egui::Event::PointerMoved(from)]); + panel.frame_with(vec![button(from, true)]); + panel.app().run("swatch.move", json!({"names": ["Strip Blue"], "to": 0})).unwrap(); + panel.frame(); + let to = panel.rect("Strip Red").center(); + assert_ne!(from, to, "the move shifts the pressed chip: {from:?}"); + panel.frame_with(vec![egui::Event::PointerMoved(to), button(to, false)]); + panel.frame(); + assert_eq!(swatch_of(&paints(&panel).1).as_deref(), Some("Strip Red"), "the release on the same swatch sets the stroke"); + } + + #[test] + fn a_right_click_in_the_frame_the_strip_remeasures_still_sets_the_stroke() { + let mut panel = Panel::new(app(), show); + panel.room(vec2(4000.0, 200.0)).frame(); + panel.frame(); + let at = panel.rect("Strip Green").center(); + let button = |pressed| egui::Event::PointerButton { pos: at, button: egui::PointerButton::Secondary, pressed, modifiers: Modifiers::NONE }; + panel.frame_with(vec![egui::Event::PointerMoved(at)]); + // A new width makes the strip measure itself again in the frame that carries the press. + panel.room(vec2(3000.0, 200.0)); + panel.frame_with(vec![button(true)]); + panel.frame_with(vec![button(false)]); + panel.frame(); + assert_eq!(swatch_of(&paints(&panel).1).as_deref(), Some("Strip Green"), "the right-click sets the stroke"); + } + + #[test] + fn a_right_release_in_another_document_leaves_its_stroke() { + let mut app = app(); + app.run("file.new", json!({"width": 200, "height": 200})).unwrap(); + app.run("swatch.new", json!({"name": "Strip Green", "color": "#22aa44", "global": true})).unwrap(); + app.run("shape.rectangle", json!({"x": 10, "y": 10, "width": 50, "height": 50})).unwrap(); + let mut panel = Panel::new(app, show); + let from = panel.rect("Strip Green").center(); + let button = + |at, pressed| egui::Event::PointerButton { pos: at, button: egui::PointerButton::Secondary, pressed, modifiers: Modifiers::NONE }; + panel.frame_with(vec![egui::Event::PointerMoved(from)]); + panel.frame_with(vec![button(from, true)]); + assert!(panel.app().session.set_active(0), "the first document becomes active"); + panel.frame(); + let before = paints(&panel).1; + let to = panel.rect("Strip Green").center(); + panel.frame_with(vec![egui::Event::PointerMoved(to), button(to, false)]); + panel.frame(); + assert_eq!(paints(&panel).1, before, "a press in one document and a release in another set nothing"); + } + + /// The strip measured first in an invisible sizing pass elsewhere on the screen, with the same scope id, then shown. + fn measured(app: &mut VectorcraftApp, ui: &mut egui::Ui) { + let away = ui.max_rect().translate(vec2(5000.0, 5000.0)); + let mut sizing = ui.new_child(egui::UiBuilder::new().scope_id(ui.scope_id()).max_rect(away).sizing_pass().invisible()); + show(app, &mut sizing); + show(app, ui); + } + + #[test] + fn a_sizing_pass_leaves_the_right_click_to_the_shown_strip() { + let mut panel = Panel::new(app(), measured); + let at = panel.rect("Strip Green").center(); + let button = |pressed| egui::Event::PointerButton { pos: at, button: egui::PointerButton::Secondary, pressed, modifiers: Modifiers::NONE }; + panel.frame_with(vec![egui::Event::PointerMoved(at)]); + panel.frame_with(vec![button(true)]); + panel.frame_with(vec![button(false)]); + panel.frame(); + assert_eq!(swatch_of(&paints(&panel).1).as_deref(), Some("Strip Green"), "the shown strip's right-click sets the stroke"); + } + + thread_local! { + /// Whether [`covered`] draws its cover. + static COVER: std::cell::Cell = const { std::cell::Cell::new(true) }; + } + + /// The strip with a foreground area covering the first 400 by 400 points while [`COVER`] is set. + fn covered(app: &mut VectorcraftApp, ui: &mut egui::Ui) { + show(app, ui); + if COVER.with(|c| c.get()) { + egui::Area::new(egui::Id::unique("strip-cover")).order(egui::Order::Foreground).fixed_pos(egui::pos2(0.0, 0.0)).show(ui.ctx(), |ui| { + ui.allocate_exact_size(vec2(400.0, 400.0), egui::Sense::click()); + }); + } + } + + #[test] + fn a_right_press_on_a_layer_covering_a_chip_leaves_the_stroke() { + COVER.with(|c| c.set(true)); + let mut panel = Panel::new(app(), covered); + let before = paints(&panel).1; + let at = panel.rect("Strip Green").center(); + assert!(at.x < 400.0 && at.y < 400.0, "the cover lies over the chip: {at:?}"); + let button = |pressed| egui::Event::PointerButton { pos: at, button: egui::PointerButton::Secondary, pressed, modifiers: Modifiers::NONE }; + panel.frame_with(vec![egui::Event::PointerMoved(at)]); + panel.frame_with(vec![button(true)]); + // The cover goes away while the button is down, so the release lands on the chip itself. + COVER.with(|c| c.set(false)); + panel.frame(); + panel.frame(); + panel.frame_with(vec![button(false)]); + panel.frame(); + assert_eq!(paints(&panel).1, before, "a press on the covering layer does not count as a press on the chip"); + + panel.secondary_click("Strip Green"); + assert_eq!(swatch_of(&paints(&panel).1).as_deref(), Some("Strip Green"), "with the cover gone a right-click reaches the chip"); + } + #[test] fn the_none_chip_comes_first_and_takes_the_paint_off() { let mut panel = Panel::new(app(), show); From ae0adc1fff76729f0d520239051a94b84c0bba1e Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 12:12:55 -0800 Subject: [PATCH 57/62] Menus: keep the shortcut catalog when a Scripts read leaves its rows as they were The catalog's generation hashed the Scripts menu's revision and the font database's generation. Each startup step that moved either one (the Scripts note before the first listing, the listing itself, the font scan) made the catalog's rows again and built the window's keymap again, even when the rows were the same. On a fresh start that happened three times in the first frames. The catalog is now kept when its rows are unchanged: the rows the scripts and fonts add are compared as rows, and the catalog's generation hashes each row's key, label and kind. A menu that shows or hides an item the rows already have no longer moves the generation either. On Windows (release build, fresh settings folder, 3 runs), the UI thread's work in frames 0 to 2 went from a median of 226 ms to 130 ms, and catalog and keymap builds in the first 6 seconds went from 4 to 2. --- crates/ui-egui/src/menus/model.rs | 53 ++++++++++++++++++++++++++++-- crates/ui-egui/src/scripts_menu.rs | 6 ++++ 2 files changed, 56 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/menus/model.rs b/crates/ui-egui/src/menus/model.rs index 56b6d2ce80..e4b09fc43f 100644 --- a/crates/ui-egui/src/menus/model.rs +++ b/crates/ui-egui/src/menus/model.rs @@ -310,14 +310,27 @@ fn role(title: &str) -> MenuRole { /// The hash of what the catalog's rows depend on, which moves its generation: `plays` are the /// actions' function keys, a row each, `type_keys` the chords the Type tool's commands take and `tools` the set the -/// tool rows' icons come from. +/// tool rows' icons come from. The rows the scripts and the fonts add are compared as rows ([`CatalogInputs`]) and +/// hashed into the catalog's generation as rows ([`rows_generation`]), so a new listing or font scan that leaves them +/// as they were keeps the catalog and the window's keymap. fn generation(listed: &Listed, plays: &[(String, craft::keymap::Chord)], type_keys: &[(&str, Vec)], tools: ToolIcons) -> u64 { let mut h = DefaultHasher::new(); - (crate::i18n::current().code(), plugin_revision(), crate::scripts_menu::revision(), vectorcraft_text::FontDb::global().generation()).hash(&mut h); + (crate::i18n::current().code(), plugin_revision()).hash(&mut h); (listed, plays, type_keys, tools).hash(&mut h); h.finish() } +/// The catalog's generation: `base` ([`generation`]) with each row's key, label and kind, so it moves when a row comes, +/// goes or is renamed, and not when a menu shows or hides an item the rows already had. +fn rows_generation(base: u64, defs: &[CommandDef]) -> u64 { + let mut h = DefaultHasher::new(); + base.hash(&mut h); + for def in defs { + (def.command.key(), &def.label, &def.kind).hash(&mut h); + } + h.finish() +} + /// Hashes the names of the saved workspaces and the custom toolbars, which the Window menu lists as rows. fn hash_listed_names(ui: &UiState, h: &mut DefaultHasher) { for w in &ui.workspaces.set.saved { @@ -476,7 +489,8 @@ fn catalog_defs(inputs: &CatalogInputs) -> (Vec, HashSet) { fn build_catalog(app: &VectorcraftApp, listed: &Listed, plays: &[(String, craft::keymap::Chord)], defs: Vec) -> Option { let type_keys = crate::type_editing::app_keys(&defs, &app.shortcut_overrides); let (defs, linked_keys) = without_linked(defs); - match AppCatalog::new(defs, generation(listed, plays, &type_keys, ToolIcons::of(&app.session.prefs))) { + let generation = rows_generation(generation(listed, plays, &type_keys, ToolIcons::of(&app.session.prefs)), &defs); + match AppCatalog::new(defs, generation) { Ok(catalog) => { // While a text field has the keys no shortcut runs, as in production; the text-editing chords still edit it, // and the Type tool's commands run while it types. @@ -805,6 +819,39 @@ mod tests { assert!(app.menus.states.get(&CommandRef::new("object.group")).is_some_and(CommandState::is_enabled)); } + /// A new Scripts revision that leaves the menu's rows as they were (the note before the first listing, or a read + /// that finds the same scripts) lays the menus out again and keeps the catalog, so the window's keymap is not + /// built again. The fonts and plug-ins are held steady against tests running alongside, and the steps run again, + /// at most 20 times, until the shortcut editor's snapshot (which a test switching languages replaces) held still + /// through them. + #[test] + fn a_scripts_revision_with_the_same_rows_keeps_the_catalog() { + let fonts = vectorcraft_text::FontDb::global(); + let _steady = (vectorcraft_text::test_fonts::steady_fonts(fonts), vectorcraft_plugins::steady::steady_plugins()); + let snapshot = snapshot_addr; + for _ in 0..20 { + let (mut app, ctx) = app_with_document(); + refresh(&mut app, &ctx); + let before = snapshot(); + let (rebuilds, builds, generation) = (app.menus.rebuilds, CATALOG_BUILDS.get(), app.menus.catalog_generation()); + crate::scripts_menu::bump_revision(); + refresh(&mut app, &ctx); + if snapshot() != before { + continue; + } + assert_eq!(app.menus.rebuilds, rebuilds + 1, "the new revision lays the menus out again"); + assert_eq!(CATALOG_BUILDS.get(), builds, "the catalog's rows are not made again"); + assert_eq!(app.menus.catalog_generation(), generation, "the catalog, which the keymap is built from, stays"); + return; + } + panic!("the shortcut editor's snapshot changed during each of 20 tries"); + } + + /// The address of the shortcut editor's current snapshot. + fn snapshot_addr() -> usize { + std::sync::Arc::as_ptr(&crate::shortcut_editor::snapshot()).addr() + } + /// A new window keymap with nothing else changed (the framework builds the first one after the first frame's /// menus) sets the panel rows' shortcuts from it, in the bar and in the laid-out bar, without building the menus /// again. The menus are also built again when a process-wide catalog changes, so the fonts and plug-ins are held diff --git a/crates/ui-egui/src/scripts_menu.rs b/crates/ui-egui/src/scripts_menu.rs index e8b1f229d9..db6cc9ca71 100644 --- a/crates/ui-egui/src/scripts_menu.rs +++ b/crates/ui-egui/src/scripts_menu.rs @@ -155,6 +155,12 @@ pub fn revision() -> u64 { state.revision * 2 + u64::from(state.note_at(now()) == Some(SLOW)) } +/// Moves [`revision`] on this test's thread with the listing left as it was, as a read that finds the same scripts does. +#[cfg(test)] +pub(crate) fn bump_revision() { + state().revision += 1; +} + /// Read the Scripts folder again, unless the session has no folder (the web, and a run without /// preferences) or the context has no host. A read asked for while one runs waits for it (the /// queue runs one job per folder). `ctx` is asked to draw when the read ends. From a00e0eb2bd6d3161152d36f6f67bdaecbb84b466 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 12:31:35 -0800 Subject: [PATCH 58/62] CI: unreached-rs skips the standalone example panel plug-in The example panel plug-in in #10981 is a Cargo project of its own (`crates/plugins/example-panel`, with its own `[workspace]`) that builds for wasm32 only, so no workspace module reaches its `src/lib.rs` and the gate's unreached-rs check fails the lint leg. The gate's `unreached-rs-allow` input now lists that directory next to the default `**/fixtures/**`. --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c86dfb998a..5e6b5a3306 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,6 +80,11 @@ jobs: pkg-config libxkbcommon-dev libwayland-dev libx11-dev libxcb1-dev libxcursor-dev libxrandr-dev libxi-dev libfontconfig1-dev libfreetype-dev mesa-vulkan-drivers libgl1-mesa-dev + # `.rs` files that no workspace module reaches on purpose: fixture trees (the gate's default) + # and the example panel plug-in, a Cargo project of its own that builds for wasm32 only. + unreached-rs-allow: | + **/fixtures/** + crates/plugins/example-panel/** # The nightly cold run never restores the rolling crates entry, so the old entry is only overlap # while the cold run saves its own: two entries of about 4.6 GB, which with the others go over the From 9866d013b92a0b5e9141ae030bc66a9c644f6f83 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 12:33:51 -0800 Subject: [PATCH 59/62] Save: Close waits for a file comparison, scripts hold it, reads follow the caller's scope - Close with Save waits while the save compares the document's file. The OK of the import-loss question runs File > Save, which can start a comparison; Close used to report "not saved, so not closed" and stop. - A comparison that answers while a script runs waits for the script to end when its document is not active. Activating the document to write it failed with a busy error while the script ran. - The digest and comparison threads check read access under the file-access scope of the call that started them. A file that scope may not read leaves no digest, and Save asks as it does on a change. --- crates/ui-egui/src/io/save.rs | 23 ++++++++-- crates/ui-egui/src/io/saved_contents.rs | 44 +++++++++++++++++-- crates/ui-egui/src/tests/save.rs | 58 +++++++++++++++++++++++++ crates/ui-egui/src/unsaved.rs | 16 +++++-- 4 files changed, 131 insertions(+), 10 deletions(-) diff --git a/crates/ui-egui/src/io/save.rs b/crates/ui-egui/src/io/save.rs index aa60e9835b..3fd847f4db 100644 --- a/crates/ui-egui/src/io/save.rs +++ b/crates/ui-egui/src/io/save.rs @@ -171,7 +171,7 @@ pub(crate) fn checks_pending(app: &VectorcraftApp) -> bool { /// Whether document `uid`'s save has to wait: the document shows a dialog's preview or a drag not /// yet committed, which the save would write (typing in progress is saved, as by any Save), or /// writing it activates its document, which would put it under an open dialog or file picker of -/// another document, or cancel a drag in progress in the active one. +/// another document, cancel a drag in progress in the active one, or fail while a script runs. #[cfg(not(target_arch = "wasm32"))] fn held(app: &VectorcraftApp, uid: u64) -> bool { if app.session.documents().iter().any(|d| d.uid == uid && d.interaction.as_ref().is_some_and(|it| it.label != "Typing")) { @@ -179,7 +179,23 @@ fn held(app: &VectorcraftApp, uid: u64) -> bool { } let active = app.session.active(); active.map(|d| d.uid) != Some(uid) - && (app.any_dialog_open() || app.file_dialog_open() || active.is_some_and(|d| d.interaction.is_some()) || app.canvas.grab.is_some()) + && (app.any_dialog_open() + || app.file_dialog_open() + || active.is_some_and(|d| d.interaction.is_some()) + || app.canvas.grab.is_some() + || app.session.script_running()) +} + +/// Whether document `uid`'s save waits for the comparison of its file. +#[cfg(not(target_arch = "wasm32"))] +pub(crate) fn checking(app: &VectorcraftApp, uid: u64) -> bool { + app.saves.checks.contains_key(&uid) +} + +/// The web has no file comparisons. +#[cfg(target_arch = "wasm32")] +pub(crate) fn checking(_: &VectorcraftApp, _: u64) -> bool { + false } /// Asks for one frame when a save waited in the last pass and this pass's UI closed what it @@ -293,7 +309,8 @@ fn resume_checked(app: &mut VectorcraftApp, wait: bool) { continue; }; // Writing activates the save's document: while a dialog or file picker of another document - // is open, or a drag goes on in it, the answer stays in its channel for a later pass. + // is open, a drag goes on in it, or a script runs, the answer stays in its channel for a + // later pass. if !wait && held(app, uid) { app.saves.held = true; continue; diff --git a/crates/ui-egui/src/io/saved_contents.rs b/crates/ui-egui/src/io/saved_contents.rs index 1c77b56b7c..2ff6ab92fd 100644 --- a/crates/ui-egui/src/io/saved_contents.rs +++ b/crates/ui-egui/src/io/saved_contents.rs @@ -5,7 +5,8 @@ //! file on disk still holds the bytes the app wrote, Save writes without asking. //! //! Files are read and digested on threads of their own: a file in a cloud folder may have to be -//! downloaded first. +//! downloaded first. Each thread reads under the file-access scope of the call that started it: a +//! file that scope may not read leaves no digest, and Save asks as it does on a change. use std::collections::HashMap; use std::fs::File; @@ -18,6 +19,7 @@ use std::thread::JoinHandle; use craft::host::Wake; use craft::platform::watch::FileStamp; use sha2::{Digest, Sha256}; +use vectorcraft_engine::file_access::{self, ScopeHandle}; /// A version of a document's file: its path, its stamp when read, and the digest of its bytes. #[derive(Clone)] @@ -65,7 +67,11 @@ impl SavedContents { }; let state = Arc::clone(&self.state); let path = path.to_path_buf(); + let scope = ScopeHandle::capture_now(); let work = move || { + if !readable(scope, &path) { + return; + } let Ok(file) = File::open(&path) else { return }; let Some(digest) = digest_of(file, stamp) else { return }; let mut state = lock(&state); @@ -82,20 +88,23 @@ impl SavedContents { /// Starts comparing document `key`'s file at `path` with the version the app last read or /// wrote, on a thread of its own that first waits for that version's digest. The answer is /// the file's version now when it holds the same bytes, and `None` when the bytes differ, the - /// file can't be read, or no digest of `path` was taken. `wake` runs once the answer is sent, - /// so a frame collects it. `None` here when no thread starts. + /// file can't be read (or the caller's scope may not read it), or no digest of `path` was + /// taken. `wake` runs once the answer is sent, so a frame collects it. `None` here when no + /// thread starts. pub(crate) fn check(&self, key: u64, path: &Path, wake: Wake) -> Option>> { let pending = lock(&self.state).pending.remove(&key); let state = Arc::clone(&self.state); let path = path.to_path_buf(); + let scope = ScopeHandle::capture_now(); let (send, answer) = mpsc::channel(); let work = move || { if let Some(handle) = pending { // A digest thread that panicked recorded nothing. let _ = handle.join(); } + let same = if readable(scope, &path) { unchanged(&state, key, &path) } else { None }; // The caller may be gone (its document closed): the answer is dropped. - let _ = send.send(unchanged(&state, key, &path)); + let _ = send.send(same); wake.wake(); }; std::thread::Builder::new().name("vectorcraft-file-check".into()).spawn(work).ok().map(|_| answer) @@ -123,6 +132,11 @@ impl SavedContents { } } +/// May `scope`, the file-access scope of the call that started a thread, read `path`? +fn readable(scope: ScopeHandle, path: &Path) -> bool { + scope.run(|| file_access::check_read(&path.to_string_lossy()).is_ok()) +} + /// [`SavedContents::check`]'s answer, on its thread. fn unchanged(state: &Mutex, key: u64, path: &Path) -> Option { let version = lock(state).versions.get(&key).filter(|v| v.path == path).cloned()?; @@ -185,4 +199,26 @@ mod tests { assert!(contents.check(3, path, Wake::none()).unwrap().recv().unwrap().is_none()); assert!(contents.check(2, path, Wake::none()).unwrap().recv().unwrap().is_some()); } + + /// A file in a folder the caller may write but not read is neither digested nor compared. + #[test] + fn a_file_the_callers_scope_may_not_read_is_not_read() { + let folder = crate::tests_folder::Folder::new("saved-contents-write-only"); + let file = folder.file("document", b"saved contents"); + let path = Path::new(&file); + let stamp = FileStamp::at(path).unwrap(); + let roots = file_access::AutomationRoots::new(&[], &[path.parent().unwrap()]).unwrap(); + let contents = SavedContents::new(); + + file_access::confine(roots.as_ref(), || contents.note(1, path, stamp)); + let noted_confined = contents.check(1, path, Wake::none()).unwrap().recv().unwrap(); + + contents.note(2, path, stamp); + let confined = file_access::confine(roots.as_ref(), || contents.check(2, path, Wake::none())).unwrap().recv().unwrap(); + let unconfined = contents.check(2, path, Wake::none()).unwrap().recv().unwrap(); + + assert!(noted_confined.is_none(), "no digest is taken of a file the scope may not read"); + assert!(confined.is_none(), "a comparison in a scope that may not read the file does not read it"); + assert!(unconfined.is_some(), "the digest taken outside that scope still compares"); + } } diff --git a/crates/ui-egui/src/tests/save.rs b/crates/ui-egui/src/tests/save.rs index cc23df8b53..8fb9c4446e 100644 --- a/crates/ui-egui/src/tests/save.rs +++ b/crates/ui-egui/src/tests/save.rs @@ -859,3 +859,61 @@ fn a_save_that_ends_first_drops_the_pending_comparison() { assert!(!pending, "the comparison is dropped"); assert!(next.is_ok(), "the next save starts: {next:?}"); } + +/// A comparison that answers while a script runs waits for the script to end, since writing +/// activates the save's document and the engine refuses that while a script runs. +#[test] +fn a_comparison_waits_while_a_script_runs() { + let (d, path, mut app) = opened_then_put_back("compare-under-script", true); + let before = std::fs::read(&path).unwrap(); + assert_eq!(app.run("file.save", json!({})).unwrap()["pending"], "checkingFile"); + app.run("file.new", json!({"width": 100, "height": 100})).unwrap(); + app.session.execute("script.run", &json!({"source": "1", "name": "t.js"})).unwrap(); + io::save::wait_for_answers(&mut app); + let ctx = egui::Context::default(); + io::save::pump(&mut app, &ctx); + let running = app.session.script_running(); + let pending = io::save::checks_pending(&app); + let unwritten = std::fs::read(&path).unwrap() == before; + // Once the script ends, the save goes on and writes the file. + for _ in 0..10_000 { + if app.session.script_pump().is_some() { + break; + } + } + let ended = !app.session.script_running(); + io::save::pump(&mut app, &ctx); + crate::background::wait_all(&mut app); + let written = std::fs::read(&path).unwrap() != before; + let _ = std::fs::remove_dir_all(d); + assert!(running, "the script runs while the comparison answers"); + assert!(!pending, "no frames are asked for while the save waits for the script"); + assert!(unwritten, "nothing is written while the script runs"); + assert!(ended, "the script ended"); + assert!(written, "the save finishes once the script ends"); +} + +/// Close with Save waits while the save compares the document's file, then closes the document +/// once the save has written it. +#[test] +fn close_waits_while_its_save_compares_the_file() { + let (d, path, mut app) = opened_then_put_back("compare-close", true); + let before = std::fs::read(&path).unwrap(); + let uid = app.session.active().unwrap().uid; + assert_eq!(app.run("file.save", json!({})).unwrap()["pending"], "checkingFile"); + crate::unsaved::saving_for_test(&mut app, uid); + let ctx = egui::Context::default(); + crate::unsaved::pump(&mut app, &ctx); + let waiting = app.closing.is_some(); + let open = app.session.documents().len(); + io::save::wait_for_checks(&mut app); + crate::background::wait_all(&mut app); + crate::unsaved::pump(&mut app, &ctx); + let closed = app.session.documents().is_empty(); + let written = std::fs::read(&path).unwrap() != before; + let _ = std::fs::remove_dir_all(d); + assert!(waiting, "Close waits for the comparison"); + assert_eq!(open, 1, "the document stays open while its file is compared"); + assert!(written, "the save writes the file"); + assert!(closed, "the document closes once it is saved"); +} diff --git a/crates/ui-egui/src/unsaved.rs b/crates/ui-egui/src/unsaved.rs index 466413484f..5c1c8dbfd4 100644 --- a/crates/ui-egui/src/unsaved.rs +++ b/crates/ui-egui/src/unsaved.rs @@ -200,13 +200,14 @@ pub(crate) fn pump(app: &mut VectorcraftApp, ctx: &egui::Context) { } /// The save of document `uid` that a Save answer started and that waited on a later frame: once the -/// document is saved it closes and the operation goes on; while its dialog or write is still running -/// it waits; given up (its Save As cancelled) the document stays open and the operation stops. +/// document is saved it closes and the operation goes on; while its dialog, the comparison of its +/// file or its write is still running it waits; given up (its Save As cancelled) the document stays +/// open and the operation stops. fn finish_save(app: &mut VectorcraftApp, uid: u64) { let doc = app.session.documents().iter().find(|d| d.uid == uid); let saved = doc.is_none_or(|d| !d.is_dirty()); let asking = app.dialogs().is_some_and(|d| d.with(|h| !h.open_dialogs().is_empty())); - if !saved && (app.file_dialog_open() || asking || app.background.busy_with(uid)) { + if !saved && (app.file_dialog_open() || asking || app.background.busy_with(uid) || io::save::checking(app, uid)) { return; } let title = doc.map(|d| d.title()).unwrap_or_default(); @@ -291,6 +292,15 @@ pub(crate) fn ready_for_test(app: &mut VectorcraftApp) -> egui::Context { ctx } +/// Close of document `uid` answered with Save, and the save already started on its own (as the OK +/// of the import-loss question starts it): the operation waits for that save. +#[cfg(test)] +pub(crate) fn saving_for_test(app: &mut VectorcraftApp, uid: u64) { + let mut guard = CloseGuard::new(Then::Close.scope(), vec![uid]); + let _ = guard.answer(CloseAnswer::Save); + app.closing = Some(Closing { guard, front: None, then: Then::Close, saving: Some(uid) }); +} + #[cfg(test)] mod tests { use super::*; From f6255a1d8aceb967bfd498051180a1116ec8e5ef Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 13:10:35 -0800 Subject: [PATCH 60/62] Menus: start the Scripts revision test from the app's own snapshot The test compared the shared shortcut editor snapshot before and after the steps. Another test switching languages can replace that snapshot after the app's catalog was built, so the refresh rebuilt the catalog while the guard saw no change and the assertion failed. The guard now starts from the snapshot the app's catalog holds. --- crates/ui-egui/src/menus/model.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/menus/model.rs b/crates/ui-egui/src/menus/model.rs index e4b09fc43f..460b394b5c 100644 --- a/crates/ui-egui/src/menus/model.rs +++ b/crates/ui-egui/src/menus/model.rs @@ -823,7 +823,7 @@ mod tests { /// that finds the same scripts) lays the menus out again and keeps the catalog, so the window's keymap is not /// built again. The fonts and plug-ins are held steady against tests running alongside, and the steps run again, /// at most 20 times, until the shortcut editor's snapshot (which a test switching languages replaces) held still - /// through them. + /// through them, starting from the snapshot the app's catalog was built from. #[test] fn a_scripts_revision_with_the_same_rows_keeps_the_catalog() { let fonts = vectorcraft_text::FontDb::global(); @@ -832,7 +832,11 @@ mod tests { for _ in 0..20 { let (mut app, ctx) = app_with_document(); refresh(&mut app, &ctx); - let before = snapshot(); + // The snapshot the app's catalog was built from, not the shared one, which another thread may have + // replaced since. + let Some(before) = app.menus.rows.as_ref().map(|r| std::sync::Arc::as_ptr(&r.inputs.snapshot).addr()) else { + panic!("the first refresh made the catalog's rows"); + }; let (rebuilds, builds, generation) = (app.menus.rebuilds, CATALOG_BUILDS.get(), app.menus.catalog_generation()); crate::scripts_menu::bump_revision(); refresh(&mut app, &ctx); From c914f6963df8659e60061a1a4b9c4407bc40bcce Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 13:14:53 -0800 Subject: [PATCH 61/62] DXF/DWG import: keep symbols apart only where their art differs A block's symbol was looked up by its scale alone, so a placement whose art the nesting limit cut short, or that left out a block placing one of its ancestors, could hand that shortened art to a complete placement at the same scale. The symbol key now also holds the depth where the block's art reaches the nesting limit (counted under the ancestors it places) and the ancestors it places within that limit. The scale scan reuses a "yes" only while none of the blocks it went into to reach the dashes is an ancestor, and keeps up to four of them; it checks anonymous blocks with everything they inherit, as they are drawn. Inserts on hidden layers are not followed. The new shape checks have an import-wide work budget and a memory budget. --- crates/cad/src/import/build.rs | 337 +++++++++++++++++++++-- crates/cad/src/import/tests.rs | 328 ++++++++++++++++++++++ docs/mcp.md | 4 +- docs/progress/dxf-scaled-block-dashes.md | 1 + 4 files changed, 640 insertions(+), 30 deletions(-) create mode 100644 docs/progress/dxf-scaled-block-dashes.md diff --git a/crates/cad/src/import/build.rs b/crates/cad/src/import/build.rs index c8c6a0e2ad..11bfac399c 100644 --- a/crates/cad/src/import/build.rs +++ b/crates/cad/src/import/build.rs @@ -34,6 +34,13 @@ const MAX_VISITS: usize = if cfg!(test) { 1_000_000 } else { 20_000_000 }; /// The most scale checks kept for one block at one depth that left out a block inside itself /// under different ancestors. const MAX_SCANS_HERE: usize = 16; +/// The most blocks the checks of which blocks a block places look at in one import; past it the +/// checks take the art as different for each placement (a symbol of its own). +const MAX_SHAPE_WORK: usize = if cfg!(test) { 1_000_000 } else { 20_000_000 }; +/// The most bytes of block names the shape checks keep in their sets of placed blocks. +const MAX_REACH_KEPT: usize = if cfg!(test) { 1_000_000 } else { 32_000_000 }; +/// The most "yes" scale scans kept for one block and what it inherits. +const MAX_SCALED_YES: usize = 4; /// The most path elements an import makes (blocks drawn as art are copied for every placement). pub(crate) const MAX_ELEMENTS: usize = if cfg!(test) { 1_000_000 } else { 4_000_000 }; /// The most dash lengths an import keeps (every dashed path holds its own copy of its pattern). @@ -91,6 +98,20 @@ struct Inherit { layer: Option, } +/// A symbol's block, what it inherits, the scale slot, the depth when the nesting limit may cut +/// off its art, and its ancestors that it places (sorted). +type SymbolKey = (String, Inherit, u64, Option, Vec>); + +/// A shape check's block, its levels to the nesting limit and the ancestors it holds for. +type ShapeKey = (Rc, u32, Vec>); + +/// The blocks a block places within some levels (`None`: the shape checks' budgets ran out). +type Reach = Option>>; + +/// A kept scale scan: the shallowest and deepest depths it holds at, whether the nesting limit +/// cut off art, and the blocks it went into to reach dashes or wide polylines. +type ScaledLook = (u32, u32, bool, Rc>); + /// A scale scan of a block that left out a block inside itself: its answer, whether the nesting /// limit cut off art, the blocks it went into and the ones it left out. #[derive(Debug)] @@ -156,14 +177,34 @@ pub(crate) struct Build<'d, 'a> { blocks: HashMap>>, bounds: HashMap>, sensitive: HashMap, - /// Symbol names by block, what it inherits and the scale its art is drawn at (the bits of - /// [`symbol_scale`]'s answer, or of -1 - depth for art the nesting limit may have cut off at - /// that depth; `None`: the block has no art). - symbols: HashMap<(String, Inherit, u64), Option>, + /// Symbol names by block, what it inherits, the scale its art is drawn at (the bits of + /// [`symbol_scale`]'s answer), the depth when the nesting limit may cut off some of its art + /// there, and the ancestors it places, which are left out of its art (`None`: the block has + /// no art). + symbols: HashMap>, + /// The blocks a block places within some levels below itself (see [`Build::reach_within`]). + reaches: HashMap, + /// The blocks each block places directly (see [`Build::placed_blocks`]). + placed: HashMap>>, + /// How many levels of blocks a block draws below itself (see [`Build::height_under`]). + block_height: HashMap, + /// Whether a block placed with so many levels left before the nesting limit reaches it (see + /// [`Build::reaches_limit`]). + limit_reached: HashMap, + /// The ancestors a block places, by block, levels to the nesting limit and ancestors. + ancestors_placed: HashMap>>, + /// One shared copy of each ancestor name the keys above hold. + interned: HashSet>, + /// The steps the shape checks have taken (see [`Build::shape_step`]). + shape_work: usize, + /// How many bytes of names the kept sets of `reaches` hold. + reach_kept: usize, /// Whether a block placed with what it inherits draws dashes or wide polylines, whose - /// lengths and widths follow the insert's scale: the depths each answer holds at, and whether - /// the nesting limit cut off art (see [`Build::scaled_look`]). - scaled_looks: HashMap<(String, Inherit, bool), (u32, u32, bool)>, + /// lengths and widths follow the insert's scale: the depths each answer holds at, whether + /// the nesting limit cut off art, and for a "yes" the blocks it went into to reach the dashes + /// or wide polylines (see [`Build::scaled_look`]). + /// A "yes" keeps up to [`MAX_SCALED_YES`] answers that reached their dashes by different blocks. + scaled_looks: HashMap<(String, Inherit, bool), Vec>, /// The same answers for scans that left out a block inside itself, by depth. scaled_looks_here: HashMap<(String, Inherit, u32), Vec>>, /// The steps of the scale scan in progress. @@ -248,6 +289,14 @@ impl<'d, 'a> Build<'d, 'a> { bounds: HashMap::new(), sensitive: HashMap::new(), symbols: HashMap::new(), + reaches: HashMap::new(), + placed: HashMap::new(), + shape_work: 0, + reach_kept: 0, + limit_reached: HashMap::new(), + ancestors_placed: HashMap::new(), + interned: HashSet::new(), + block_height: HashMap::new(), scaled_looks: HashMap::new(), scaled_looks_here: HashMap::new(), scan_trail: Vec::new(), @@ -463,6 +512,185 @@ impl<'d, 'a> Build<'d, 'a> { true } + /// The blocks block `name` places directly, once each (inserts on a hidden layer other than + /// layer 0 are left out, as `art` leaves them out), or `None` when it is missing or an + /// external reference. Read once per block. + fn placed_blocks(&mut self, name: &str) -> Option>> { + if let Some(p) = self.placed.get(name) { + return Some(p.clone()); + } + if !self.blocks.contains_key(name) && self.d.blocks.get(name).is_none_or(|b| b.xref) { + return None; + } + let items = self.block(name)?; + let mut seen = HashSet::new(); + let mut placed = vec![]; + for it in items.iter() { + if let Geom::Insert(ins) = &it.geom + && !(it.props.layer != "0" && self.d.layer(&it.props.layer).is_some_and(|l| l.hidden)) + && seen.insert(ins.block.as_str()) + { + placed.push(ins.block.clone()); + } + } + let placed = Rc::new(placed); + self.placed.insert(name.to_string(), placed.clone()); + Some(placed) + } + + /// The shared copy of block name `name`. + fn intern(&mut self, name: &str) -> Rc { + if let Some(n) = self.interned.get(name) { + return n.clone(); + } + let n: Rc = Rc::from(name); + self.interned.insert(n.clone()); + n + } + + /// Counts one step of the shape checks against their import-wide budget; false once it is + /// spent, when the checks give their cautious answers. + fn shape_step(&mut self) -> bool { + self.shape_work = self.shape_work.saturating_add(1); + self.shape_work <= MAX_SHAPE_WORK + } + + /// The blocks block `name` places within `levels` levels below itself, not looking below an + /// ancestor (only blocks drawn above the nesting limit are read), or `None` when the shape + /// checks' budgets ran out. + fn reach_within(&mut self, name: &str, levels: u32) -> Option>> { + // A set that met no ancestor is kept for any ancestors that it does not hold, where it + // meets none either; one cut short at an ancestor is kept for these ancestors alone. + let open = (self.intern(name), levels, vec![]); + if let Some(r) = self.reaches.get(&open) + && r.as_ref().is_none_or(|r| !self.stack.iter().any(|s| r.contains(s))) + { + return r.clone(); + } + let stack: Vec> = self.stack.clone().iter().map(|s| self.intern(s)).collect(); + let key = (open.0.clone(), levels, stack); + if let Some(r) = self.reaches.get(&key) { + return r.clone(); + } + // Past the shape checks' budget the block is taken to place every ancestor. The kept + // entries hold at most `MAX_REACH_KEPT` bytes in all (names, with a word or so of overhead + // each, and each key's ancestors); past it a result is used without being kept. + let mut seen = HashSet::new(); + let mut size = 64usize.saturating_add(key.2.len().saturating_mul(16)); + // An ancestor is left out where it is placed, so nothing is looked at below it. + let stack = self.stack.clone(); + let mut stopped_at_ancestor = false; + let mut layer = vec![name.to_string()]; + let mut complete = true; + 'levels: for _ in 0..levels { + let mut next = vec![]; + for n in &layer { + for child in self.placed_blocks(n).unwrap_or_default().iter() { + if !self.shape_step() { + complete = false; + break 'levels; + } + if seen.contains(child) { + continue; + } + size = size.saturating_add(child.len().saturating_add(32)); + seen.insert(child.clone()); + if stack.contains(child) { + stopped_at_ancestor = true; + } else { + next.push(child.clone()); + } + } + } + if next.is_empty() { + break; + } + layer = next; + } + let r = complete.then(|| Rc::new(seen)); + if !complete { + size = 64usize.saturating_add(key.2.len().saturating_mul(16)); + } + if self.reach_kept.saturating_add(size) <= MAX_REACH_KEPT { + self.reach_kept += size; + self.reaches.insert(if stopped_at_ancestor || !complete { key } else { open }, r.clone()); + } + r + } + + /// Does block `name` placed `depth` deep draw blocks down to the nesting limit, which then + /// cuts off art? Counted under `ancestors`, the ancestors it places, which are left out, as is + /// a block inside itself. Yes when the shape checks' budget ran out. + fn reaches_limit(&mut self, name: &str, depth: u32, ancestors: &[Rc]) -> bool { + let limit = match MAX_NEST.checked_sub(depth) { + Some(limit) if limit > 0 => limit, + _ => return true, + }; + let key = (self.intern(name), limit, ancestors.to_vec()); + if let Some(r) = self.limit_reached.get(&key) { + return *r; + } + let r = self.height_under(name, limit, &mut ancestors.iter().map(|a| a.to_string()).collect()).0.is_none(); + if self.shape_work <= MAX_SHAPE_WORK { + self.limit_reached.insert(key, r); + } + r + } + + /// How many levels of blocks block `name` draws below itself under the blocks in `path`, or + /// `None` for `limit` levels or more (`limit` is at least 1); with the shallowest index in + /// `path` of a block it left out as a block inside itself (`usize::MAX`: none). Each child + /// looked at counts against the shape checks' budget. Only blocks drawn above the limit are + /// read. + fn height_under(&mut self, name: &str, limit: u32, path: &mut Vec) -> (Option, usize) { + if let Some(&h) = self.block_height.get(name) { + return ((h < limit).then_some(h), usize::MAX); + } + if !self.shape_step() { + return (None, 0); + } + path.push(name.to_string()); + let mut h = Some(0); + let mut hit = usize::MAX; + for child in self.placed_blocks(name).unwrap_or_default().iter() { + if !self.shape_step() { + (h, hit) = (None, 0); + break; + } + // A missing block draws nothing at any depth. + if !self.blocks.contains_key(child) && self.d.blocks.get(child).is_none_or(|b| b.xref) { + continue; + } + // A block inside itself is left out. + if let Some(i) = path.iter().position(|p| p == child) { + hit = hit.min(i); + continue; + } + // A child at the limit is not drawn, and is not read. + if limit == 1 { + h = None; + break; + } + let (child_h, child_hit) = self.height_under(child, limit - 1, path); + hit = hit.min(child_hit); + h = h.zip(child_h).map(|(a, b)| a.max(b.saturating_add(1))); + if h.is_none() { + break; + } + } + path.pop(); + // A count that left out a block inside itself anywhere below may count a path that is a + // loop under other ancestors, and one stopped at the limit may not have looked at every + // child, so only a complete count with neither is kept. + if let Some(h) = h + && hit == usize::MAX + && self.shape_work <= MAX_SHAPE_WORK + { + self.block_height.insert(name.to_string(), h); + } + (h, hit) + } + /// A block's bounds in its coordinates less its base point. fn block_bounds(&mut self, name: &str, depth: u32) -> Option { if let Some(b) = self.bounds.get(name) { @@ -1129,29 +1357,33 @@ impl<'d, 'a> Build<'d, 'a> { /// still within the nesting limit. A "no" that left out a block inside itself, or that the /// work budget stopped, holds nowhere. Last, whether the nesting limit cut off any of the /// block's art at this depth. `nested` is set when the scan of an enclosing block asks. - fn scaled_look(&mut self, name: &str, inh: &Inherit, depth: u32, nested: bool) -> (bool, (u32, u32), bool) { + fn scaled_look(&mut self, name: &str, inh: &Inherit, depth: u32, nested: bool) -> (bool, (u32, u32), bool, Rc>) { // A block inside itself is left out only under this chain of ancestors, so the answer // holds nowhere else. It is left out at any depth, so the nesting limit cuts off nothing. if self.stack.iter().any(|s| s == name) { self.warn(NESTED); self.scan_trail.push(Trail::LeftOut(name.to_string())); - return (false, (u32::MAX, 0), false); + return (false, (u32::MAX, 0), false, Rc::default()); } let items = self.block(name); // A placement past the nesting limit draws none of the block, so its items are not // looked at or charged for, and no answer made at a shallower depth applies. if items.is_some() && depth >= MAX_NEST { self.warn(NESTED); - return (false, (depth, u32::MAX), true); + return (false, (depth, u32::MAX), true, Rc::default()); } // A block can have a "yes" for shallow placements and a "no" for deep ones, so each answer - // is kept with its own depths. + // is kept with its own depths. A "yes" holds only while none of the blocks it went into to + // reach the dashes or wide polylines is an ancestor, which would leave them out. let key = (name.to_string(), inh.clone()); for s in [true, false] { - if let Some(&(lo, hi, cut)) = self.scaled_looks.get(&(key.0.clone(), key.1.clone(), s)) - && (lo..=hi).contains(&depth) + let stack = &self.stack; + if let Some((lo, hi, cut, via)) = self + .scaled_looks + .get(&(key.0.clone(), key.1.clone(), s)) + .and_then(|answers| answers.iter().find(|(lo, hi, _, via)| (*lo..=*hi).contains(&depth) && !via.iter().any(|v| stack.contains(v)))) { - return (s, (lo, hi), cut); + return (s, (*lo, *hi), *cut, via.clone()); } } let context = (key.0.clone(), key.1.clone(), depth); @@ -1162,14 +1394,16 @@ impl<'d, 'a> Build<'d, 'a> { answers.iter().find(|a| a.left_out.iter().all(|l| stack.contains(l)) && !stack.iter().any(|s| a.reached.contains(s))) }); if let Some(a) = here.cloned() { + // Which of the blocks it went into hold the dashes is not kept, so all of them count. + let via = Rc::new(if a.scaled { a.reached.iter().cloned().collect() } else { vec![] }); if !nested { - return (a.scaled, (u32::MAX, 0), a.cut); + return (a.scaled, (u32::MAX, 0), a.cut, via); } let (scaled, cut) = (a.scaled, a.cut); // The scan in progress keeps one reference to it, not a copy of its names (see // `keep_new_steps`). self.scan_trail.push(Trail::Reused(a)); - return (scaled, (u32::MAX, 0), cut); + return (scaled, (u32::MAX, 0), cut, via); } let trail_start = self.scan_trail.len(); // Looking at a block's items counts against the block work as placing it does, so the @@ -1177,11 +1411,11 @@ impl<'d, 'a> Build<'d, 'a> { self.visits = self.visits.saturating_add(1 + items.as_ref().map_or(0, |i| i.len())); if self.visits > MAX_VISITS { self.warn(TOO_MUCH_BLOCK_WORK); - return (false, (u32::MAX, 0), false); + return (false, (u32::MAX, 0), false, Rc::default()); } - let Some(items) = items else { return (false, (0, u32::MAX), false) }; + let Some(items) = items else { return (false, (0, u32::MAX), false, Rc::default()) }; if !self.enter(name, depth) { - return (false, (depth, u32::MAX), true); + return (false, (depth, u32::MAX), true, Rc::default()); } self.scan_trail.push(Trail::Went(name.to_string())); // The steps this scan has recorded, so that each is kept once. @@ -1190,6 +1424,8 @@ impl<'d, 'a> Build<'d, 'a> { let mut s = false; let mut from = 0; let mut cut = false; + // The blocks gone into to reach the art that made `s`. + let mut via = Rc::default(); // The deepest placement at which the art that made `s` is still drawn. let mut until = MAX_NEST - 1; for it in items.iter() { @@ -1209,9 +1445,12 @@ impl<'d, 'a> Build<'d, 'a> { Geom::Shaded { .. } | Geom::Text(_) | Geom::Image(_) => false, Geom::Insert(ins) => { let child = self.inherit(&it.props, inh); - let child = if self.is_sensitive(&ins.block, depth + 1) { child } else { Inherit::default() }; + // An anonymous block is drawn with all it inherits (see `insert`); a named one + // is looked up as its symbol is. + let keep = ins.block.starts_with('*') || self.is_sensitive(&ins.block, depth + 1); + let child = if keep { child } else { Inherit::default() }; let mark = self.scan_trail.len(); - let (scaled, (child_lo, child_hi), child_cut) = self.scaled_look(&ins.block, &child, depth + 1, true); + let (scaled, (child_lo, child_hi), child_cut, child_via) = self.scaled_look(&ins.block, &child, depth + 1, true); if !self.keep_new_steps(mark, &mut seen) { stopped = true; break; @@ -1219,6 +1458,10 @@ impl<'d, 'a> Build<'d, 'a> { cut |= child_cut; if scaled { until = child_hi.saturating_sub(1); + let mut v = Vec::with_capacity(child_via.len() + 1); + v.push(ins.block.clone()); + v.extend(child_via.iter().cloned()); + via = Rc::new(v); } else { from = from.max(child_lo.saturating_sub(1)); } @@ -1231,11 +1474,18 @@ impl<'d, 'a> Build<'d, 'a> { } self.stack.pop(); if stopped { - return (false, (u32::MAX, 0), false); + return (false, (u32::MAX, 0), false, Rc::default()); } let holds = if s { (0, until) } else { (from, u32::MAX) }; if (holds.0..=holds.1).contains(&depth) { - self.scaled_looks.insert((key.0, key.1, s), (holds.0, holds.1, cut)); + let answers = self.scaled_looks.entry((key.0, key.1, s)).or_default(); + // A "no" replaces the one before; a "yes" is kept beside others, the oldest going first. + if !s { + answers.clear(); + } else if answers.len() >= MAX_SCALED_YES { + answers.remove(0); + } + answers.push((holds.0, holds.1, cut, via.clone())); } else { // An answer that left out a block inside itself holds again wherever it would leave // out the same ancestors. A block left out because the scan itself went into it @@ -1271,7 +1521,7 @@ impl<'d, 'a> Build<'d, 'a> { #[cfg(test)] SCANS_HERE_MOST.with(|n| n.set(n.get().max(answers.len()))); } - (s, holds, cut) + (s, holds, cut, via) } /// Keeps the steps recorded on the scan trail from `mark` on that the scan has not recorded @@ -1315,12 +1565,41 @@ impl<'d, 'a> Build<'d, 'a> { } let inh = if self.is_sensitive(name, depth) { inh.clone() } else { Inherit::default() }; self.scan_trail.clear(); - let (scaled, _, cut) = self.scaled_look(name, &inh, depth, false); + let (scaled, ..) = self.scaled_look(name, &inh, depth, false); let scale = if scaled { scale } else { 1.0 }; - // A "no" for art the nesting limit cut off keeps its symbol apart from those drawn at - // other depths, by the depth (as -1 - depth). - let slot = if !scaled && cut { (-1.0 - f64::from(depth)).to_bits() } else { scale.to_bits() }; - let key = (name.to_string(), inh, slot); + let slot = scale.to_bits(); + // The art drawn here may also differ by the depth (the nesting limit) and by the + // ancestors it places (left out of it), whatever the scan found before it stopped. The + // depth counts only where the block's art reaches the nesting limit, under any ancestors. + // Only an ancestor it places above the nesting limit changes the art (all of them when the + // checks' budget ran out). + // Down to the nesting limit itself: an ancestor there is left out either way, and counting + // it here keeps it from looking like art the limit cuts off. The answer is kept for these + // ancestors, whether or not the set it came from could be kept. The keys share one copy + // of each ancestor's name. + let levels = MAX_NEST.saturating_sub(depth); + let context: ShapeKey = (self.intern(name), levels, self.stack.clone().iter().map(|s| self.intern(s)).collect()); + let left_out = match self.stack.is_empty() { + true => vec![], + false => match self.ancestors_placed.get(&context) { + Some(found) => found.clone(), + None => { + let reach = self.reach_within(name, levels); + let mut found: Vec> = context.2.iter().filter(|s| reach.as_ref().is_none_or(|r| r.contains(&***s))).cloned().collect(); + found.sort(); + found.dedup(); + // Charged to the same budget as the kept sets. + let size = 64usize.saturating_add(context.2.len().saturating_add(found.len()).saturating_mul(16)); + if self.reach_kept.saturating_add(size) <= MAX_REACH_KEPT { + self.reach_kept += size; + self.ancestors_placed.insert(context, found.clone()); + } + found + } + }, + }; + let deep = self.reaches_limit(name, depth, &left_out); + let key = (name.to_string(), inh, slot, deep.then_some(depth), left_out); if let Some(s) = self.symbols.get(&key) { let s = s.clone()?; if !draw || !self.empty.contains(&s) { diff --git a/crates/cad/src/import/tests.rs b/crates/cad/src/import/tests.rs index 60584a839c..097cdd375c 100644 --- a/crates/cad/src/import/tests.rs +++ b/crates/cad/src/import/tests.rs @@ -1805,6 +1805,332 @@ fn a_block_cut_off_by_the_nesting_limit_keeps_the_art_a_shallower_placement_draw assert_eq!(strokes.len(), 2, "{names:?}: the shallower placement draws the lines of S and D1: {strokes:?}"); } +#[test] +fn a_dashed_block_cut_off_by_the_nesting_limit_keeps_its_art_for_a_shallow_placement_at_the_same_scale() { + let tables = [(0, "TABLE"), (2, "LTYPE"), (0, "LTYPE"), (2, "DASHED"), (73, "2"), (40, "15"), (49, "10"), (49, "-5"), (0, "ENDTAB")]; + // "P" has a dashed line and places "C", which has a solid line. The anonymous chain + // *B1 > ... > *B7 places "P" at scale 10 too deep to draw "C"; the drawing places "P" at + // scale 1, the chain, then "P" at scale 10. + let mut blocks: Vec<(i32, &'static str)> = vec![(0, "BLOCK"), (8, "0"), (2, "C"), (70, "0"), (10, "0"), (20, "0")]; + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "10"), (11, "100"), (21, "10"), (0, "ENDBLK")]); + blocks.extend([(0, "BLOCK"), (8, "0"), (2, "P"), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "LINE"), (8, "0"), (6, "DASHED"), (10, "0"), (20, "0"), (11, "100"), (21, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "C"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + let chain = 7; + for i in 1..=chain { + let name: &'static str = Box::leak(format!("*B{i}").into_boxed_str()); + blocks.extend([(0, "BLOCK"), (8, "0"), (2, name), (70, "1"), (10, "0"), (20, "0")]); + if i == chain { + blocks.extend([(0, "INSERT"), (8, "0"), (2, "P"), (10, "0"), (20, "0"), (41, "10"), (42, "10"), (0, "ENDBLK")]); + } else { + let next: &'static str = Box::leak(format!("*B{}", i + 1).into_boxed_str()); + blocks.extend([(0, "INSERT"), (8, "0"), (2, next), (10, "0"), (20, "0"), (0, "ENDBLK")]); + } + } + let top = [ + (0, "INSERT"), + (2, "P"), + (10, "0"), + (20, "0"), + (0, "INSERT"), + (2, "*B1"), + (10, "0"), + (20, "200"), + (0, "INSERT"), + (2, "P"), + (10, "0"), + (20, "400"), + (41, "10"), + (42, "10"), + ]; + let doc = open(&drawing(&[], &tables, &blocks, &top), &points()).document; + let names: Vec<&str> = doc.symbols.iter().map(|s| s.name.as_str()).collect(); + let insts = leaves(&doc); + let [first, deep, last] = &insts[..] else { panic!("{names:?}: {insts:?}") }; + assert_eq!(instance_strokes(&doc, first).len(), 2, "{names:?}"); + assert_eq!(instance_strokes(&doc, deep).len(), 1, "{names:?}: the deep placement draws only the dashed line"); + assert_eq!(instance_strokes(&doc, last).len(), 2, "{names:?}: the shallow placement at scale 10 draws the line of C"); +} + +#[test] +fn a_dashed_block_placed_inside_its_own_child_keeps_its_art_for_a_direct_placement_at_the_same_scale() { + let tables = [(0, "TABLE"), (2, "LTYPE"), (0, "LTYPE"), (2, "DASHED"), (73, "2"), (40, "15"), (49, "10"), (49, "-5"), (0, "ENDTAB")]; + // "P" has a dashed line and places *A, which has a solid line and places "P". The drawing + // places "P" at scale 1, *A at scale 10, then "P" at scale 10. + let mut blocks: Vec<(i32, &'static str)> = vec![(0, "BLOCK"), (8, "0"), (2, "P"), (70, "0"), (10, "0"), (20, "0")]; + blocks.extend([(0, "LINE"), (8, "0"), (6, "DASHED"), (10, "0"), (20, "0"), (11, "100"), (21, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "*A"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + blocks.extend([(0, "BLOCK"), (8, "0"), (2, "*A"), (70, "1"), (10, "0"), (20, "0")]); + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "10"), (11, "100"), (21, "10")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "P"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + let top = [ + (0, "INSERT"), + (2, "P"), + (10, "0"), + (20, "0"), + (0, "INSERT"), + (2, "*A"), + (10, "0"), + (20, "200"), + (41, "10"), + (42, "10"), + (0, "INSERT"), + (2, "P"), + (10, "0"), + (20, "400"), + (41, "10"), + (42, "10"), + ]; + let doc = open(&drawing(&[], &tables, &blocks, &top), &points()).document; + let names: Vec<&str> = doc.symbols.iter().map(|s| s.name.as_str()).collect(); + let insts = leaves(&doc); + let last = insts.last().unwrap_or_else(|| panic!("{names:?}")); + assert_eq!(instance_strokes(&doc, last).len(), 2, "{names:?}: the direct placement at scale 10 draws the line of *A"); +} + +#[test] +fn a_block_whose_dashes_are_in_an_ancestor_shares_one_symbol_across_its_scales() { + let tables = [(0, "TABLE"), (2, "LTYPE"), (0, "LTYPE"), (2, "DASHED"), (73, "2"), (40, "15"), (49, "10"), (49, "-5"), (0, "ENDTAB")]; + // "P" has a solid line and places "D"; "D" has a dashed line and places "P". The drawing + // places "P", then "D" at scales 2 and 3, inside which "P" leaves out "D" and its dashes. + let mut blocks: Vec<(i32, &'static str)> = vec![(0, "BLOCK"), (8, "0"), (2, "P"), (70, "0"), (10, "0"), (20, "0")]; + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "10"), (11, "100"), (21, "10")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "D"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + blocks.extend([(0, "BLOCK"), (8, "0"), (2, "D"), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "LINE"), (8, "0"), (6, "DASHED"), (10, "0"), (20, "0"), (11, "100"), (21, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "P"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + let top = [ + (0, "INSERT"), + (2, "P"), + (10, "0"), + (20, "0"), + (0, "INSERT"), + (2, "D"), + (10, "0"), + (20, "200"), + (41, "2"), + (42, "2"), + (0, "INSERT"), + (2, "D"), + (10, "0"), + (20, "400"), + (41, "3"), + (42, "3"), + ]; + let doc = open(&drawing(&[], &tables, &blocks, &top), &points()).document; + let names: Vec<&str> = doc.symbols.iter().map(|s| s.name.as_str()).collect(); + // One "P" placed directly, and one for its solid art inside "D" at either scale. + assert_eq!(names.iter().filter(|n| n.starts_with('P')).count(), 2, "{names:?}"); +} + +#[test] +fn a_block_reaching_dashes_by_two_ancestors_in_turn_is_scale_checked_once_for_each() { + let tables = [(0, "TABLE"), (2, "LTYPE"), (0, "LTYPE"), (2, "DASHED"), (73, "2"), (40, "15"), (49, "10"), (49, "-5"), (0, "ENDTAB")]; + // "P" has a solid line and places *A1 and *A2, each with a dashed line and an insert of "P". + // Inside *A1, "P" reaches dashes only through *A2, and inside *A2 only through *A1. The drawing + // places *A1 and *A2 in turn. + let mut blocks: Vec<(i32, &'static str)> = vec![(0, "BLOCK"), (8, "0"), (2, "P"), (70, "0"), (10, "0"), (20, "0")]; + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "10"), (11, "100"), (21, "10")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "*A1"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "*A2"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + for a in ["*A1", "*A2"] { + blocks.extend([(0, "BLOCK"), (8, "0"), (2, a), (70, "1"), (10, "0"), (20, "0")]); + blocks.extend([(0, "LINE"), (8, "0"), (6, "DASHED"), (10, "0"), (20, "0"), (11, "100"), (21, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "P"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + } + let insert = |block: &'static str| [(0, "INSERT"), (2, block), (10, "0"), (20, "0")]; + let top: Vec<(i32, &str)> = (0..500).flat_map(|_| [insert("*A1"), insert("*A2")]).flatten().collect(); + build::SCALED_LOOK_ITEMS.with(|n| n.set(0)); + let r = open(&drawing(&[], &tables, &blocks, &top), &points()); + let looked = build::SCALED_LOOK_ITEMS.with(std::cell::Cell::get); + assert!(looked < 100, "{looked} items looked at"); + assert!(!r.warnings.iter().any(|w| w.contains("too much work")), "{:?}", r.warnings); +} + +#[test] +fn blocks_placing_each_other_share_one_symbol_shallow_and_near_the_nesting_limit() { + // "A" and "B" each have a solid line and place each other. The drawing places "B", then "A", + // then the anonymous chain *C1 > ... > *C6, which places "A" six levels deep: "A" and "B" + // still draw there, and the copy of "A" inside "B" is left out in both placements. + let mut blocks: Vec<(i32, &'static str)> = vec![]; + for (name, other) in [("A", "B"), ("B", "A")] { + blocks.extend([(0, "BLOCK"), (8, "0"), (2, name), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "0"), (11, "100"), (21, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, other), (10, "0"), (20, "10"), (0, "ENDBLK")]); + } + let chain = 6; + for i in 1..=chain { + let name: &'static str = Box::leak(format!("*C{i}").into_boxed_str()); + let next: &'static str = if i == chain { "A" } else { Box::leak(format!("*C{}", i + 1).into_boxed_str()) }; + blocks.extend([(0, "BLOCK"), (8, "0"), (2, name), (70, "1"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, next), (10, "0"), (20, "0"), (0, "ENDBLK")]); + } + let insert = |block: &'static str| [(0, "INSERT"), (2, block), (10, "0"), (20, "0")]; + let top: Vec<(i32, &str)> = [insert("B"), insert("A"), insert("*C1")].concat(); + let doc = open(&drawing(&[], &[], &blocks, &top), &points()).document; + let names: Vec<&str> = doc.symbols.iter().map(|s| s.name.as_str()).collect(); + // One "A" inside "B", which leaves out "B", and one for both placements of "A" itself. + assert_eq!(names.iter().filter(|n| n.starts_with('A')).count(), 2, "{names:?}"); +} + +#[test] +fn a_block_placed_at_the_nesting_limit_first_leaves_its_partner_one_symbol() { + // "A" and "B" each have a solid line and place each other. The anonymous chain *D1 > ... > *D7 + // places "A" seven levels deep, where it draws only its line; *C1 > ... > *C6 places "B" six + // levels deep, where "B" draws "A", which leaves out "B". The drawing places the two chains, + // then "B", which draws the same art. + let mut blocks: Vec<(i32, &'static str)> = vec![]; + for (name, other) in [("A", "B"), ("B", "A")] { + blocks.extend([(0, "BLOCK"), (8, "0"), (2, name), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "0"), (11, "100"), (21, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, other), (10, "0"), (20, "10"), (0, "ENDBLK")]); + } + for (prefix, chain, target) in [("D", 7, "A"), ("C", 6, "B")] { + for i in 1..=chain { + let name: &'static str = Box::leak(format!("*{prefix}{i}").into_boxed_str()); + let next: &'static str = if i == chain { target } else { Box::leak(format!("*{prefix}{}", i + 1).into_boxed_str()) }; + blocks.extend([(0, "BLOCK"), (8, "0"), (2, name), (70, "1"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, next), (10, "0"), (20, "0"), (0, "ENDBLK")]); + } + } + let insert = |block: &'static str| [(0, "INSERT"), (2, block), (10, "0"), (20, "0")]; + let top: Vec<(i32, &str)> = [insert("*D1"), insert("*C1"), insert("B")].concat(); + let doc = open(&drawing(&[], &[], &blocks, &top), &points()).document; + let names: Vec<&str> = doc.symbols.iter().map(|s| s.name.as_str()).collect(); + assert_eq!(names.iter().filter(|n| n.starts_with('B')).count(), 1, "{names:?}"); +} + +#[test] +fn a_block_placing_its_anonymous_parent_shares_one_symbol_at_the_nesting_limit() { + // "P" has a solid line and places *A; *A places "P". Inside *A, "P" leaves out *A at any + // depth. The drawing places *A, then the chain *C1 > ... > *C6, which places *A six levels + // deep, so "P" is seven levels deep there. + let mut blocks: Vec<(i32, &'static str)> = vec![(0, "BLOCK"), (8, "0"), (2, "P"), (70, "0"), (10, "0"), (20, "0")]; + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "0"), (11, "100"), (21, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "*A"), (10, "0"), (20, "10"), (0, "ENDBLK")]); + blocks.extend([(0, "BLOCK"), (8, "0"), (2, "*A"), (70, "1"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "P"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + let chain = 6; + for i in 1..=chain { + let name: &'static str = Box::leak(format!("*C{i}").into_boxed_str()); + let next: &'static str = if i == chain { "*A" } else { Box::leak(format!("*C{}", i + 1).into_boxed_str()) }; + blocks.extend([(0, "BLOCK"), (8, "0"), (2, name), (70, "1"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, next), (10, "0"), (20, "0"), (0, "ENDBLK")]); + } + let insert = |block: &'static str| [(0, "INSERT"), (2, block), (10, "0"), (20, "0")]; + let top: Vec<(i32, &str)> = [insert("*A"), insert("*C1")].concat(); + let doc = open(&drawing(&[], &[], &blocks, &top), &points()).document; + let names: Vec<&str> = doc.symbols.iter().map(|s| s.name.as_str()).collect(); + assert_eq!(leaves(&doc).len(), 2, "{names:?}"); + assert_eq!(names, ["P"]); +} + +#[test] +fn a_block_reaching_other_ancestors_only_through_a_left_out_one_shares_one_symbol() { + // "O" places "W1" and "W2", each of which places "P"; "P" has a solid line and places "O". + // Inside either wrapper, "P" leaves out "O", and with it the other wrapper. + let mut blocks: Vec<(i32, &'static str)> = vec![(0, "BLOCK"), (8, "0"), (2, "O"), (70, "0"), (10, "0"), (20, "0")]; + blocks.extend([(0, "INSERT"), (8, "0"), (2, "W1"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "W2"), (10, "0"), (20, "100"), (0, "ENDBLK")]); + for w in ["W1", "W2"] { + blocks.extend([(0, "BLOCK"), (8, "0"), (2, w), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "P"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + } + blocks.extend([(0, "BLOCK"), (8, "0"), (2, "P"), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "0"), (11, "100"), (21, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "O"), (10, "0"), (20, "10"), (0, "ENDBLK")]); + let top = [(0, "INSERT"), (2, "O"), (10, "0"), (20, "0")]; + let doc = open(&drawing(&[], &[], &blocks, &top), &points()).document; + let names: Vec<&str> = doc.symbols.iter().map(|s| s.name.as_str()).collect(); + assert_eq!(names.iter().filter(|n| n.starts_with('P')).count(), 1, "{names:?}"); +} + +#[test] +fn a_block_placing_its_ancestors_only_on_a_hidden_layer_shares_one_symbol_under_each() { + let tables = [(0, "TABLE"), (2, "LAYER"), (0, "LAYER"), (2, "Off"), (70, "0"), (62, "-1"), (0, "ENDTAB")]; + // "P" has a solid line and places "W1" and "W2" on a hidden layer; "W1" and "W2" each place + // "P". The drawing places "W1" and "W2". + let mut blocks: Vec<(i32, &'static str)> = vec![(0, "BLOCK"), (8, "0"), (2, "P"), (70, "0"), (10, "0"), (20, "0")]; + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "0"), (11, "100"), (21, "0")]); + blocks.extend([(0, "INSERT"), (8, "Off"), (2, "W1"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "Off"), (2, "W2"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + for w in ["W1", "W2"] { + blocks.extend([(0, "BLOCK"), (8, "0"), (2, w), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "P"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + } + let top = [(0, "INSERT"), (2, "W1"), (10, "0"), (20, "0"), (0, "INSERT"), (2, "W2"), (10, "0"), (20, "200")]; + let doc = open(&drawing(&[], &tables, &blocks, &top), &points()).document; + let names: Vec<&str> = doc.symbols.iter().map(|s| s.name.as_str()).collect(); + assert_eq!(names.iter().filter(|n| n.starts_with('P')).count(), 1, "{names:?}"); +} + +#[test] +fn an_anonymous_block_is_scale_checked_with_the_layer_it_is_drawn_on() { + let tables = [ + (0, "TABLE"), + (2, "LTYPE"), + (0, "LTYPE"), + (2, "DASHED"), + (73, "2"), + (40, "15"), + (49, "10"), + (49, "-5"), + (0, "ENDTAB"), + (0, "TABLE"), + (2, "LAYER"), + (0, "LAYER"), + (2, "Dashy"), + (70, "0"), + (62, "7"), + (6, "DASHED"), + (0, "ENDTAB"), + ]; + // *D has a line on layer 0 in the layer's linetype. *P places *D on layer 0 with its own + // color, lineweight and linetype, so *P alone does not look like it follows its insert. + // "N" places *P on "Dashy", whose linetype *D's line takes. "M" places *P too, and the chain + // *B1 > ... > *B6 places "M" where *D is past the nesting limit. The drawing places the + // chain, then "N" at scales 1 and 10. + let mut blocks: Vec<(i32, &'static str)> = vec![(0, "BLOCK"), (8, "0"), (2, "*D"), (70, "1"), (10, "0"), (20, "0")]; + blocks.extend([(0, "LINE"), (8, "0"), (10, "0"), (20, "0"), (11, "100"), (21, "0"), (0, "ENDBLK")]); + blocks.extend([(0, "BLOCK"), (8, "0"), (2, "*P"), (70, "1"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (6, "CONTINUOUS"), (62, "1"), (370, "25"), (2, "*D"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + blocks.extend([(0, "BLOCK"), (8, "0"), (2, "N"), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "Dashy"), (2, "*P"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + blocks.extend([(0, "BLOCK"), (8, "0"), (2, "M"), (70, "0"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, "*P"), (10, "0"), (20, "0"), (0, "ENDBLK")]); + let chain = 6; + for i in 1..=chain { + let name: &'static str = Box::leak(format!("*B{i}").into_boxed_str()); + let next: &'static str = if i == chain { "M" } else { Box::leak(format!("*B{}", i + 1).into_boxed_str()) }; + blocks.extend([(0, "BLOCK"), (8, "0"), (2, name), (70, "1"), (10, "0"), (20, "0")]); + blocks.extend([(0, "INSERT"), (8, "0"), (2, next), (10, "0"), (20, "0"), (0, "ENDBLK")]); + } + let top = [ + (0, "INSERT"), + (2, "*B1"), + (10, "0"), + (20, "0"), + (0, "INSERT"), + (2, "N"), + (10, "0"), + (20, "200"), + (0, "INSERT"), + (2, "N"), + (10, "0"), + (20, "400"), + (41, "10"), + (42, "10"), + ]; + let doc = open(&drawing(&[], &tables, &blocks, &top), &points()).document; + let names: Vec<&str> = doc.symbols.iter().map(|s| s.name.as_str()).collect(); + let insts = leaves(&doc); + let [.., one, ten] = &insts[..] else { panic!("{names:?}: {insts:?}") }; + let dashes = |n: &Node| instance_strokes(&doc, n).first().map(|s| s.0.clone()).unwrap_or_default(); + let (a, b) = (dashes(one), dashes(ten)); + assert!(!a.is_empty(), "{names:?}: N draws *D's line dashed"); + assert_eq!(b, a.iter().map(|v| v * 10.0).collect::>(), "{names:?}: N at scale 10 scales its dashes"); +} + #[test] fn a_block_left_out_inside_itself_does_not_fix_the_scale_of_another_placement() { let tables = [(0, "TABLE"), (2, "LTYPE"), (0, "LTYPE"), (2, "DASHED"), (73, "2"), (40, "15"), (49, "10"), (49, "-5"), (0, "ENDTAB")]; @@ -2036,6 +2362,8 @@ fn placing_a_block_inside_itself_many_times_stays_within_the_work_budget() { let top: Vec<(i32, &str)> = (0..20_000).flat_map(|_| [(0, "INSERT"), (2, "C0"), (10, "0"), (20, "0")]).collect(); let r = open(&drawing(&[], &[], &blocks, &top), &points()); assert!(!r.warnings.iter().any(|w| w.contains("too much work")), "{:?}", r.warnings); + let c0 = r.document.symbols.iter().filter(|s| s.name.starts_with("C0")).count(); + assert_eq!(c0, 1, "every placement of C0 shares one symbol"); } #[test] diff --git a/docs/mcp.md b/docs/mcp.md index 71dc70d75e..884959bd8a 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -13062,7 +13062,9 @@ and dots and stroked at the lineweight without the linetype; a pattern hatch wit than 20,000 dashes, 200,000 boundary edges or 20,000,000 clipping and dash steps, or past the drawing's budget of 2,000,000 dashes or 200,000,000 clipping steps, as its boundary), text and multiline text point type, named blocks symbols -(one per look when their art takes colour "by block"), anonymous blocks such as dimensions groups. 3D faces, polyface +(one per look when their art takes colour "by block"; one per insert scale when they draw dashes or wide polylines, +which scale with the insert; and one per depth or set of ancestors when the nesting limit or a block placing one of its +own ancestors changes the art they draw), anonymous blocks such as dimensions groups. 3D faces, polyface meshes and polygon meshes are seen from above, their height dropped: a 3D face or a polyface mesh's face becomes the lines of its visible edges (closed when every edge is visible), and a polygon mesh one path of its M and N lines (smoothed meshes draw their surface's vertices). Indexed colours diff --git a/docs/progress/dxf-scaled-block-dashes.md b/docs/progress/dxf-scaled-block-dashes.md new file mode 100644 index 0000000000..a508108dec --- /dev/null +++ b/docs/progress/dxf-scaled-block-dashes.md @@ -0,0 +1 @@ +DXF and DWG import draw a block's dashes and wide polylines at each insert's scale, with one symbol per scale for such blocks, and keep a block's art apart where the nesting limit or a block placing one of its own ancestors changes what it draws (#10930). Headline numbers unchanged. From 8faf2a10f256d72ad94996c40fc2265bc6288b02 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 5 Dec 2026 14:18:42 -0800 Subject: [PATCH 62/62] CI: keep integration test executables out of the gate's crates cache The gate's `build` job builds the integration tests without recording their units, so the trim before the cache save was meant to drop them. actions/cache-trim keeps every unrecorded unit built during the job, so a cold main build saved all of them: a 9.68 GB gate-crates entry, over the repository's 10 GB cache budget, which was then evicted and left every following build cold. `cargo xtask ci archive` now collects the unit directories of the integration test executables those builds made and deletes them once the shard archives are written, in a leg that saves the cache. Units the record names stay, and a unit that cannot be deleted is named in a warning. The shards run the executables from their archives, and the doctests that follow do not use them. --- xtask/src/cache_units.rs | 205 +++++++++++++++++++++++++++++++++++++-- xtask/src/main.rs | 9 +- 2 files changed, 203 insertions(+), 11 deletions(-) diff --git a/xtask/src/cache_units.rs b/xtask/src/cache_units.rs index 686a17c2f3..d548a91761 100644 --- a/xtask/src/cache_units.rs +++ b/xtask/src/cache_units.rs @@ -6,7 +6,13 @@ //! every unit a build compiled or found fresh. The builds of `cargo xtask ci archive` append those //! messages to the file, so the saved entry holds this build and no older builds of updated //! dependencies. Without `CRAFT_CACHE_UNITS` the commands run as they always have. +//! +//! The trim keeps an unrecorded unit that was built during the job, so the integration tests' +//! builds, which stay out of the record, would put their executables in the entry. `ci archive` +//! collects those units with [`run_unrecorded`] and deletes them with [`drop_units`] once the +//! archives are written. +use std::collections::HashSet; use std::fs::OpenOptions; use std::io::{BufRead, BufReader, Write}; use std::path::{Path, PathBuf}; @@ -31,24 +37,115 @@ pub fn run(cmd: Command, what: &str) -> Result<(), String> { } /// [`run`] with the record in `file`. -fn run_recorded(mut cmd: Command, what: &str, file: &Path) -> Result<(), String> { - // After `--` the flag would go to rustc or the test binaries instead of cargo. - if cmd.get_args().any(|a| a == "--") { - return Err(format!("{what}: a recorded build takes no `--` arguments")); - } +fn run_recorded(cmd: Command, what: &str, file: &Path) -> Result<(), String> { + no_separator(&cmd, what)?; + let mut record = OpenOptions::new().create(true).append(true).open(file).map_err(|e| format!("{}: {e}", file.display()))?; + run_routed(cmd, what, &mut record, &format!("recording the build units in {}", file.display())) +} + +/// Runs `cmd`, a cargo build shown as `what`, which must exit successfully, with Cargo's messages +/// going to `messages` (`doing` names that in an error) and every other stdout line to stdout. +fn run_routed(mut cmd: Command, what: &str, messages: &mut impl Write, doing: &str) -> Result<(), String> { + no_separator(&cmd, what)?; cmd.args(MESSAGE_FORMAT); eprintln!("$ {what} {}", MESSAGE_FORMAT.join(" ")); - let mut record = OpenOptions::new().create(true).append(true).open(file).map_err(|e| format!("{}: {e}", file.display()))?; let mut child = cmd.stdout(Stdio::piped()).spawn().map_err(|e| format!("{what}: failed to spawn: {e}"))?; let routed = match child.stdout.take() { - Some(stdout) => route(BufReader::new(stdout), &mut record, &mut std::io::stdout().lock()), + Some(stdout) => route(BufReader::new(stdout), messages, &mut std::io::stdout().lock()), None => Err(std::io::Error::other("no stdout pipe")), }; let status = child.wait().map_err(|e| format!("{what}: {e}"))?; - routed.map_err(|e| format!("{what}: recording the build units in {}: {e}", file.display()))?; + routed.map_err(|e| format!("{what}: {doing}: {e}"))?; if status.success() { Ok(()) } else { Err(format!("{what}: exited with {status}")) } } +/// After `--` the message-format flag would go to rustc or the test binaries instead of cargo. +fn no_separator(cmd: &Command, what: &str) -> Result<(), String> { + if cmd.get_args().any(|a| a == "--") { Err(format!("{what}: a recorded build takes no `--` arguments")) } else { Ok(()) } +} + +/// Runs `cmd`, a cargo build shown as `what` whose units stay out of the record, which must exit +/// successfully. When this leg saves the cache, it returns the unit directories of the integration +/// test executables the build compiled or found fresh, for [`drop_units`]; otherwise none. +pub fn run_unrecorded(cmd: Command, what: &str) -> Result, String> { + if file().is_none() { + crate::run(cmd, what)?; + return Ok(Vec::new()); + } + let mut messages = Vec::new(); + run_routed(cmd, what, &mut messages, "reading the build messages")?; + Ok(integration_units(&messages)) +} + +/// The unit directory of each integration test executable that Cargo's `messages` name, or the +/// executable itself when it lies in no unit directory. +fn integration_units(messages: &[u8]) -> Vec { + let mut units = Vec::new(); + for line in messages.split(|b| *b == b'\n') { + let Ok(m) = serde_json::from_slice::(line) else { continue }; + let integration = m["reason"] == "compiler-artifact" + && m["profile"]["test"] == true + && m["target"]["kind"].as_array().is_some_and(|k| k.iter().any(|k| k == "test")); + let Some(exe) = m["executable"].as_str().filter(|_| integration) else { continue }; + let exe = Path::new(exe); + let unit = unit_of(exe).unwrap_or(exe).to_path_buf(); + if !units.contains(&unit) { + units.push(unit); + } + } + units +} + +/// The `/build//` directory `path` lies in, as actions/cache-trim finds it. +fn unit_of(path: &Path) -> Option<&Path> { + path.ancestors().find(|d| { + let hash = d.file_name().and_then(|n| n.to_str()).is_some_and(|n| n.len() == 16 && n.bytes().all(|b| b.is_ascii_hexdigit())); + hash && d.parent().and_then(Path::parent).and_then(Path::file_name).is_some_and(|n| n == "build") + }) +} + +/// Deletes `units` ([`run_unrecorded`]) from the target directory before the cache is saved, except +/// those the record names. Nothing later in the build job runs the integration tests' executables: +/// the shards run them from their archives. A unit that cannot be deleted is named in a warning and +/// stays in the entry. +pub fn drop_units(units: &[PathBuf]) { + if let Some(record) = file().filter(|_| !units.is_empty()) { + drop_units_in(units, &record); + } +} + +/// [`drop_units`] with the record in `record`; returns how many units it deleted. +fn drop_units_in(units: &[PathBuf], record: &Path) -> usize { + let recorded = match std::fs::read_to_string(record) { + Ok(text) => recorded_units(&text), + Err(e) => { + println!("::warning::ci archive: {}: {e}; the integration test executables stay in the cache entry", record.display()); + return 0; + } + }; + let mut dropped = 0; + for unit in units.iter().filter(|u| !recorded.contains(*u)) { + let removed = if unit.is_dir() { std::fs::remove_dir_all(unit) } else { std::fs::remove_file(unit) }; + match removed { + Ok(()) => dropped += 1, + Err(e) if e.kind() == std::io::ErrorKind::NotFound => {} + Err(e) => println!("::warning::ci archive: could not delete {}: {e}; it stays in the cache entry", unit.display()), + } + } + eprintln!("ci archive: deleted {dropped} integration test units, which the cache entry does not keep"); + dropped +} + +/// The unit directories, or files outside one, that the record's messages name. +fn recorded_units(record: &str) -> HashSet { + let mut units = HashSet::new(); + for m in record.lines().filter_map(|l| serde_json::from_str::(l).ok()) { + let named = m["filenames"].as_array().into_iter().flatten().chain([&m["executable"], &m["out_dir"]]); + units.extend(named.filter_map(|p| p.as_str()).map(Path::new).map(|p| unit_of(p).unwrap_or(p).to_path_buf())); + } + units +} + /// Records xtask's own units. `cargo xtask` builds xtask before xtask can record anything, and the /// trim deletes an unrecorded unit from the entry, so the next run would build xtask again. The /// build is fresh by now, so this only prints the messages. @@ -145,4 +242,96 @@ mod tests { } std::fs::remove_dir_all(dir).unwrap(); } + + /// A `compiler-artifact` message for a target of `kind`, built in the test profile or not. + fn artifact(kind: &str, test: bool, executable: Option<&str>, filenames: &[&str]) -> String { + serde_json::json!({ + "reason": "compiler-artifact", + "target": { "kind": [kind], "name": "fixture" }, + "profile": { "test": test }, + "filenames": filenames, + "executable": executable, + "fresh": false, + }) + .to_string() + } + + #[test] + fn only_integration_test_executables_are_collected() { + let it = "/t/debug/build/fixture/0123456789abcdef/out/it-0123456789abcdef"; + let messages = [ + artifact("test", true, Some(it), &[it]), + // The same unit found fresh by a later build. + artifact("test", true, Some(it), &[it]), + // The library's test harness: recorded by the unit tests' build, never dropped. + artifact("lib", true, Some("/t/debug/build/fixture/fedcba9876543210/out/fixture-fedcba9876543210"), &[]), + artifact("lib", false, None, &["/t/debug/build/fixture/1111111111111111/out/libfixture.rlib"]), + // An executable outside a unit directory (Cargo's older `deps/` layout). + artifact("test", true, Some("/t/debug/deps/other-2222222222222222"), &[]), + "running 0 tests".into(), + serde_json::json!({ "reason": "build-finished", "success": true }).to_string(), + ] + .join("\n"); + assert_eq!( + integration_units(messages.as_bytes()), + [PathBuf::from("/t/debug/build/fixture/0123456789abcdef"), PathBuf::from("/t/debug/deps/other-2222222222222222")] + ); + } + + #[test] + fn dropping_units_keeps_the_ones_the_record_names() { + let dir = std::env::temp_dir().join(format!("xtask-cache-units-drop-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + let unit = |hash: &str| dir.join("debug/build/fixture").join(hash); + let (dropped, recorded, missing) = (unit("0123456789abcdef"), unit("fedcba9876543210"), unit("1111111111111111")); + for u in [&dropped, &recorded] { + std::fs::create_dir_all(u.join("out")).unwrap(); + std::fs::write(u.join("out/bin"), "x").unwrap(); + } + let record = dir.join("units.jsonl"); + let named = recorded.join("out/bin"); + std::fs::write(&record, artifact("lib", true, named.to_str(), &[]) + "\n").unwrap(); + assert_eq!(drop_units_in(&[dropped.clone(), recorded.clone(), missing], &record), 1); + assert!(!dropped.exists()); + assert!(named.exists()); + // Without a readable record nothing is deleted. + assert_eq!(drop_units_in(std::slice::from_ref(&recorded), &dir.join("absent.jsonl")), 0); + assert!(named.exists()); + std::fs::remove_dir_all(dir).unwrap(); + } + + #[test] + fn a_real_integration_test_build_is_dropped_and_the_record_kept() { + let dir = std::env::temp_dir().join(format!("xtask-cache-units-it-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + std::fs::create_dir_all(dir.join("src")).unwrap(); + std::fs::create_dir_all(dir.join("tests")).unwrap(); + std::fs::write(dir.join("Cargo.toml"), "[package]\nname = \"cache-unit-it\"\nversion = \"0.1.0\"\nedition = \"2021\"\n\n[workspace]\n") + .unwrap(); + std::fs::write(dir.join("src/lib.rs"), "pub fn one() -> u32 { 1 }\n#[test]\nfn unit() {}\n").unwrap(); + std::fs::write(dir.join("tests/it.rs"), "#[test]\nfn it() { assert_eq!(cache_unit_it::one(), 1); }\n").unwrap(); + let build = |args: &[&str]| { + let mut c = crate::cargo(); + c.current_dir(&dir) + .env("CARGO_TARGET_DIR", dir.join("target")) + .env("CARGO_BUILD_BUILD_DIR", dir.join("target")) + .env("CARGO_NET_OFFLINE", "true") + .args(args); + c + }; + let record = dir.join("units.jsonl"); + run_recorded(build(&["test", "--lib", "--no-run"]), "cargo test --lib --no-run", &record).unwrap(); + let mut messages = Vec::new(); + run_routed(build(&["test", "--test", "*", "--no-run"]), "cargo test --test '*' --no-run", &mut messages, "reading").unwrap(); + let executable = |m: &serde_json::Value| m["executable"].as_str().map(PathBuf::from); + let parsed: Vec = messages.split(|b| *b == b'\n').filter_map(|l| serde_json::from_slice(l).ok()).collect(); + let it = parsed.iter().find(|m| m["target"]["name"] == "it").and_then(executable).unwrap(); + let record_text = std::fs::read_to_string(&record).unwrap(); + let harness = record_text.lines().map(|l| serde_json::from_str::(l).unwrap()).find_map(|m| executable(&m)).unwrap(); + assert!(it.is_file() && harness.is_file()); + assert_eq!(drop_units_in(&integration_units(&messages), &record), 1); + assert!(!it.exists(), "{}", it.display()); + assert!(harness.is_file(), "{}", harness.display()); + std::fs::remove_dir_all(dir).unwrap(); + } } diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 2ec7e394b5..727afe1ac1 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -465,8 +465,9 @@ fn cmd_ci_shard() -> Result<(), String> { /// /// In a leg that saves the cache, the library and binary tests' builds record their units in /// `CRAFT_CACHE_UNITS` (xtask/src/cache_units.rs), xtask's own build included, and the -/// integration tests' builds do not, so the saved entry holds every dependency and -/// dev-dependency the tests build with and none of the integration tests' executables. +/// integration tests' builds do not. The trim keeps an unrecorded unit built during the job, so +/// once the archives are written this deletes the integration tests' executables, and the saved +/// entry holds every dependency and dev-dependency the tests build with and none of them. fn cmd_ci_archive() -> Result<(), String> { let var = |key: &str| { std::env::var(key).ok().filter(|v| !v.is_empty()).ok_or_else(|| format!("ci archive: {key} is not set (the gate workflow sets it)")) @@ -479,9 +480,10 @@ fn cmd_ci_archive() -> Result<(), String> { cache_units::record_xtask()?; let checked = shards::run()?; let archived = archived_runs(&checked)?; + let mut integration = Vec::new(); for (units, r) in archive_builds(&checked) { let (c, what) = test_build(&r, units); - if units { cache_units::run(c, &what)? } else { run(c, &what)? } + if units { cache_units::run(c, &what)? } else { integration.extend(cache_units::run_unrecorded(c, &what)?) } } for (i, (shard, r)) in checked.iter().zip(archived).enumerate() { let file = dir.join((i + 1).to_string()).join(&name); @@ -500,6 +502,7 @@ fn cmd_ci_archive() -> Result<(), String> { let what = format!("cargo nextest archive {} ({}) --archive-file {}", r.targets.shown(), shards::names(&r.crates), file.display()); run(c, &what)?; } + cache_units::drop_units(&integration); Ok(()) }