Commit Graph
72 Commits
Author SHA1 Message Date
bflatastic 9dde889711 Merge branch 'area/app3' into area/app4
# Conflicts:
#	apps/vectorcraft-web/Cargo.toml
2026-11-24 07:15:04 +07:00
bflatastic 3a53c15d7e Pin craft-libs at bf62d509f (port/stubs head); egui fork unchanged at f5025284 2026-11-24 02:17:49 +07:00
bflatastic 4f7876ef74 Web: craft-web-api is a wasm32 dependency, as its only user (the page API module) is wasm-only; native builds no longer warn that it is unused 2026-11-24 01:33:21 +07:00
bflatastic 531890f668 Pin craft-libs at 0726c0f87 (port/stubs head); egui fork unchanged at f5025284 2026-11-24 01:05:23 +07:00
bflatastic 48b1adc3b4 Type tool: its app commands with a chord (align, justify, underline, super- and subscript, size steps, reset tracking and horizontal scale, highlight font name and kerning, hidden characters, line composer, hyphenate, create outlines) join the type editor's typing command set, so their chords run while it types under TypingRule::AllWait, on the app command's chords with the user's own; an Alt chord that types a character loses its press when the layout typed other text with it, so that text is typed as it came (raw_input in the desktop, web and test hosts) 2026-11-24 00:15:36 +07:00
bflatastic 81e43f086f Pin every craft-libs crate to e36d3d003 (port/stubs head), REV in xtask pdf_deps with it; egui fork stays at f5025284, as that commit pins it 2026-11-23 22:23:03 +07:00
bflatastic d6ab5d69a1 The web app builds for the browser again: the host's file service is the framework's BrowserFiles (the app's WebFiles lacked Files::save, can_pick and browser_saves), the font stack fetches the served interface faces through BrowserFetcher, the page's key filter reads the running context through its slot, a drop the page followed lands where VectorcraftApp::drop_spot says, and the calls the framework replaced (want_chars, drop_paste_key_presses, the native-only embed::before_ui) are gone 2026-11-23 21:40:48 +07:00
bflatastic 16d8a42b7b Merge branch 'area/app3' into area/app4
area/app3's formatting, clippy fixes, restored behaviours, the install_fonts test and the wasm-only web-time dependency. save.rs keeps area/app3's removal of save_reporting and cancel, which nothing calls, with this branch's native-only save flow on top. A recovered copy's age is read with the recovery store's clock, which stamped it (the page's on the web, where the document clock reads none). The lock gains web-time under the UI crate.
2026-11-23 21:32:52 +07:00
bflatastic 7323bd60d8 Pin every craft-libs crate at 0c633a83c (port/stubs) and the egui fork at f5025284, the revs that commit builds with. The five crates production pinned ahead of the framework branch move too: 0c633a83c contains their commits, and split pins resolved second copies of craft-svg, craft-image-codecs, craft-tiff, hayro-jbig2 and others, which pdf-deps rejects 2026-11-23 18:53:47 +07:00
bflatastic 7d1a87bf31 Web app: kept_from_browser builds only for wasm32, where its caller is 2026-11-23 17:38:28 +07:00
bflatastic 482c937100 Apply clippy's suggested fixes in the UI crate and the web app 2026-11-23 17:04:22 +07:00
bflatastic fa7a2afc44 Format the workspace with cargo fmt 2026-11-23 16:42:57 +07:00
bflatastic c537758ead Follow the refreshed framework: channel rules from the alpha rule's whole steps, Color Guide glue reads a cell's grid spot and colour, Save for Web's table edits take the edit and its colours, preset previews as keyed faces, constructors for hold settings, card sources, web documents and preset drafts, the drawer marks a tool only when there is one, Shift+Enter reaches the type tool, a nudge reads Backtick from the keys held with its arrow, the web host drops pick_pending, font loading takes every cataloged version of a family's faces 2026-11-23 06:33:12 +07:00
bflatastic 6411453ed5 Give the app its window before the first frame, and the frame's keymap the user's shortcuts
The hosts hand the app the window's context when they create it, so the first frame's input has
the app's commands. The frame's command input carries the shortcut overrides and the hold
shortcuts (kb.C14). Framework Select All and Delete run the engine's select.all and edit.clear.
shortcuts.set reads X X and Hold X (kb.C13b). Plug-in shortcut tests draw a frame after an
install, as the window's keymap takes new commands per frame (shortcuts-w7 note 4).
Test frames adopt their context first; testing gains part_frame and fixture_input.
2026-11-22 21:31:40 +07:00
bflatastic 20d9113f68 Write the craft-fonts tables with the framework's fonts-build: embedded faces for the interface stack, served faces for the web 2026-11-22 08:43:18 +07:00
bflatastic a724e36fc7 Pin craft-libs at the port branch merged with next 2026-11-22 02:08:29 +07:00
bflatastic 6a55604109 Spell framework paths through the craft facade at their real public paths; make modules the sibling files reach pub(crate); drop the test-module line of a deleted file 2026-11-22 00:38:54 +07:00
bflatastic 77c8565c84 Pin craft-web-api at the framework head 2026-11-21 23:54:09 +07:00
bflatastic a30131fb4d Pin craft-libs at the framework head, drop unused workspace entries, mcp and apps reach automation through the craft facade 2026-11-21 23:49:27 +07:00
bflatastic cb39ac0681 files-w6: net change of 1 commits
- files-w6: written from its sheet
2026-11-21 23:42:19 +07:00
bflatastic fb5879acdc shortcuts-w6: net change of 1 commits
- shortcuts-w6: written from its sheet
2026-11-21 23:25:20 +07:00
bflatastic 65818d6f30 shell-w19: net change of 2 commits
- shell-w19: written from its sheet
- shell-w19: repair 1
2026-11-21 23:23:17 +07:00
bflatastic 40b354dbb6 shell-w13: net change of 2 commits
- shell-w13: written from its sheet
- shell-w13: repair 1
2026-11-21 23:22:47 +07:00
bflatastic d2b499cfe2 shell-w12: net change of 2 commits
- shell-w12: written from its sheet
- shell-w12: repair 1
2026-11-21 23:22:43 +07:00
bflatastic 5635b53c1c shell-w10: net change of 2 commits
- shell-w10: written from its sheet
- shell-w10: repair 1
2026-11-21 23:22:31 +07:00
bflatastic b8ece9f34f hub-w3: net change of 2 commits
- hub-w3: written from its sheet
- hub-w3: repair 1
2026-11-21 23:22:12 +07:00
FredAppsandCodex cb8f5e0405 chore: unify shared craft-libs pin for HPGL and palette (#8703)
* 778: align shared dependencies on merged HPGL repair [skip ci]

* 778: record Windows-resolved unified shared lock [skip ci]

* 778: prepare unified merged palette dependency revision [skip ci]

* 778: record Windows-resolved palette revision lock [skip ci]

---------

Co-authored-by: Codex <[email protected]>
2026-11-19 09:18:36 -05:00
BFlat 3d7acda832 Merge pull request #7134 from dotCooCoo/feat/web-korean-devanagari-fonts
Web: Korean and Hindi interface text draws with real glyphs
2026-11-18 10:30:59 +07:00
dotCooCoo 07afd411bb Dependencies: take every craft-libs crate from craft-libs main at 64b181977a
Every storytold/craft-libs git dependency, the hayro, krilla and
linesweeper patches and the web app's craft-web-api now use one
revision, 64b181977a, so Cargo.lock holds one copy of each craft-libs
crate. craft-ui's docking Monitor has a new work_area field; the
monitors VectorCraft lists set it to None, as winit reports no work
area.
2026-11-16 18:57:11 -08:00
dotCooCoo 6fb111cfff Merge main into feat/web-korean-devanagari-fonts 2026-11-14 09:52:23 -08:00
dotCooCoo c08d42fd58 Web: Data Recovery's lock snapshots use the monotonic clock
The browser build stamped each snapshot of the Web Locks held with
Date.now() and judged its age against Date.now(). After the system
clock was set back, an old snapshot read as fresh, so a tab could
report no lock on an area another tab still held. Snapshots are now
stamped and aged with vectorcraft_ui_egui::now_ms(), and a snapshot
stamped later than now is not trusted.
2026-11-13 20:57:53 -08:00
dotCooCoo 44c3ef4f56 UI fonts: a font search that cannot start keeps its characters
When the thread for a fallback font search could not be created, the
characters taken for that search were lost. Characters no font covered
were already removed from the retry list, and characters met that frame
were already marked seen, so neither was looked for again. Now the
characters no font covered go back to the retry list, and the ones met
that frame are looked for when they are painted again.

A web test also checks that a face fetched again after a failure is not
fetched a second time at once, whether the interface asks for its
script again or the retry timer fires.
2026-11-13 09:06:12 -08:00
dotCooCoo d491249329 Web: a clock set back after a failed font fetch no longer stops its retry
The demand-font retry deadlines were read from the wall clock. If the
system clock went back after a fetch failed, the retry timer fired but
the deadline still lay ahead, so the face was never fetched again that
session. The deadlines now use the monotonic clock (now_ms), and a retry
also starts when the clock reads earlier than the failure.
2026-11-13 07:41:08 -08:00
dotCooCoo 1f64044f1c Web: Korean and Hindi interface text draws with real glyphs
The web build had no face for Hangul or Devanagari, so a Korean or Hindi
interface, and a layer or file name in either script, drew as
missing-glyph boxes.

- crates/text/web-fonts.txt gains a `demand` kind: NanumGothic Regular
  and Noto Sans Devanagari Regular are served beside the wasm like the
  other web faces, and fetched only when the interface language or the
  interface's own text needs their script. They are not fetched at
  startup or in the background queue.
- The interface reports the characters no loaded font covers
  (`on_missing_glyphs`), and keeps them so that they are looked for again
  when the font database changes. The frame after a face arrives adds it
  to the interface fonts, and the frame after that draws the characters
  painted before it with that face.
- After a failed fetch the next try comes about 30 seconds later, and the
  wait doubles after each further failure, for at most five tries.
- A new test checks that the two faces cover every Hangul and Devanagari
  character the catalogs use, where craft-fonts has them.

Docs: gaps.md, localization-hi.md, localization-parity.md,
target-app-parity.md.
2026-11-13 05:45:25 -08:00
dotCooCoo ad05c3b99d Plug-ins: an install that automation asked for is not approved in its dialog
An approval question that a control request, MCP, injected input, or a
file dialog one of them opened leads to now keeps OK disabled and
refuses every confirm, a person's click included. The dialog says to
choose Object › Plug-ins › Install Plug-in…, and ui.installPlugin answers
approval: "personMustStartInstall". The person's own Install Plug-in…,
File › Open or drop inspects the module again and asks a new question
with its half-second delay.

The origin is fixed when the request is made and goes with a native
file dialog's deferred answer and the web picker's answers, which now
arrive apart from drops and from window.vectorcraft.openFile (always
automation). A question about taking another module's place now opens
in the approval dialog, and automation's replace: true no longer skips
it. A module that needs no approval still installs at once.
2026-11-11 21:56:58 -08:00
dotCooCoo 2c0d09e079 Scripts: File › Scripts › Other Script… runs JavaScript files
File › Scripts › Other Script… picks a .js or .jsx file, shows a warning
that can be turned off in Preferences › General, and runs the script
against the open documents through the `vc` object. The new
`script.run` and `script.stop` commands run and stop a script over MCP.

- A run is one transaction. Each document it changed gets one undo step
  named Run Script. An uncaught error, a limit or a stop puts every
  document, the paint, the clipboard, menu state and preferences back.
- A command that fails inside a run, or whose result is too large to
  reach the script, is undone and throws an error the script can catch.
- Files a command wrote stay on disk and the report names them, also
  when the run is stopped from the quit question.
- While a script runs, other commands that change anything fail with a
  busy error; MCP reports it as JSON-RPC error -32003.
- In the app the run advances one slice per frame with a Stop button in
  the status bar. A run that adds a great many objects asks whether to
  continue; Stop and Escape end it.
- Commands that change state outside the documents, such as prefs.*,
  plugin.* and file.place.queue, are refused to scripts.

Docs: docs/mcp.md, docs/gaps.md, docs/roadmap.md,
docs/target-app-parity.md.
2026-11-09 18:35:41 -08:00
dotCooCoo d5e1c00470 File formats: HEIC and HEIF images open and place
File › Open and File › Place read HEIC and HEIF still images (.heic,
.heif) through heic-rs 0.1.4, the pure-Rust decoder photocraft-heif
uses, and store the pixels as PNG. Single pictures and grids of tiles,
8 to 10 bits, with or without an alpha image, are read with the
container's rotation, mirror and crop applied. A grid without a color
box of its own takes its tiles'. When neither the image nor its tiles
have an nclx box, the HEVC stream's video signal type gives the
samples' matrix and range. An RGB ICC profile, or Display P3 with the
sRGB curve named by an nclx box or, without a color box, by the
stream, is converted to sRGB. The EXIF resolution tags size the image;
without them it is 72 ppi. When the container's rotations turn the
image an odd number of quarter turns, the resolution's axes swap with
the pixels'.

Image sequences, images that aren't HEVC-coded, grids of cropped tiles
and images past the pixel allowance are refused with a message before
the pixels are decoded. The allowance counts each coded picture at the
size its sequence parameter sets give it.

The decoder is in the engine's `heif` feature, which is on by default
and listed by the desktop, CLI and web apps. A build without it still
recognizes the files and refuses them with a message.
2026-11-08 23:51:41 +07:00
Helen Kwok f9bf685cbd vectorcraft-web: window.vectorcraft takes its request functions from craft-web-api
request, execute, commands and screenshot move onto the shared crate (storytold/craft-libs#413): a timeout on every call, the screenshot's PNG also in data, and docInspect and uiInspect beside them. A call the page gave up on gives up its request if the app has not started it, so the app skips it. openFile, captureDownloads, files, readFile and inspect stay VectorCraft's own, on the same object.
2026-11-07 09:18:00 +07:00
byoungyoonandClaude Opus 5.5 c82a1eb0e8 Fix #5555: Cmd+V pastes once on the web
eframe's web runner reports a Cmd+V press both as the key press and, with the
clipboard's text, as a Paste event; the app pasted on each (egui's window
integration sends only the Paste). The web shell now drops the paste key's
press when a Paste is in the same frame's input; its release stays for
PasteChord, and a Cmd+V with no text on the clipboard keeps its press.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-04 16:33:24 +07:00
dotCooCoo e8e09af782 Brushes: Calligraphic and Scatter values follow pen tilt, bearing and rotation
Squashed from #5031 onto main.
2026-11-02 14:33:02 +07:00
G.J.R. Timmer 11f19da6dd Web build: show the app icon as the tab and home-screen icon
index.html had no icon link, so browsers requested /favicon.ico and got a 404. Trunk now copies the existing app icon (SVG, 32 px and 256 px PNG) from assets/app-icon into icons/ and index.html links them as icon and apple-touch-icon. No new artwork.
2026-10-29 20:36:09 +07:00
skylar taylor-barrick 581c79dcb1 M14: distinguish qualification from publication (#4173) 2026-10-25 23:47:58 -04:00
Drew Dibble f6a20c9f56 Web: shortcuts the browser also has run only in the app
Squashed from #4106 onto main.
2026-10-26 09:09:47 +07:00
dotCooCoo be5bd7dbf0 Pen tablets: a pen's eraser end selects the Eraser in the web build
Pointer Events report a press of a pen's eraser end as the eraser button
(button 5). The browser build ignored that press. It now presses like the
tip, and the web runner writes the pen's samples into a stylus feed with
the end they came from, so the canvas selects the Eraser tool before the
press and the press erases. The next press of the tip selects the tool
used before, as on Linux and macOS. A hovering pen keeps the end it last
pressed with, since Pointer Events report no end while a pen hovers. A
mouse or finger takes the pen out of the feed; a palm rejected while the
pen presses does not.

Docs: docs/hardware-parity.md, docs/gaps.md (G14),
docs/target-app-parity.md.
2026-10-26 09:09:47 +07:00
skylartaylor 340e3495d8 egui037: migrate VectorCraft UI and reconcile current main 2026-10-25 03:27:29 +01:00
Drew DibbleandClaude Opus 5.5 e321c7179b Text: an embedder of the egui panels may leave the bundled fonts out
#2027 gave vectorcraft-text and vectorcraft-engine a `bundled-fonts`
feature for an embedder that supplies every document font at run
time, but vectorcraft-ui-egui (and vectorcraft-mcp) named the engine
with its default features, so an embedder that hosts the panels got
the fonts whatever it asked for. Each now has a `bundled-fonts`
feature of its own, on by default, that turns the engine's on, so a
downstream user keeps the fonts unless it asks otherwise. For a
member to leave the engine's default features out, the workspace has
to declare the engine without them, as it already declares
vectorcraft-text; the crates that used the engine's default now ask
for the fonts: the three apps and vectorcraft-testkit. Off,
vectorcraft-text's copy of the fonts (3.4 MB) is left out; theme.rs's
own copies of five of them, the panels' interface faces, stay either
way.

Nothing the workspace builds changes: for every workspace member and
for the whole workspace, with and without dev-dependencies, for all
targets, wasm32-unknown-unknown, aarch64-apple-darwin and
x86_64-pc-windows-msvc, `cargo tree -e normal[,dev] -f '{p} [{f}]'`
resolves the same features for every package as on main, apart from
the new feature names (the engine's `default` no longer listed;
ui-egui's and mcp's `bundled-fonts` and `default`).

A test of the panels can't see their configuration without the fonts
(their dev-dependencies turn them on), so `cargo xtask ci`'s
`no-bundled-fonts` step now also reads that tree for
vectorcraft-ui-egui and vectorcraft-mcp: with their default features
it must show the fonts, and without them, for any target (a wasm-only
dependency too), it must not. Documented in docs/development.md
(Fonts › Leaving out the bundled fonts).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-21 23:32:26 +07:00
focuerandClaude Opus 5.5 dc7216f0e4 web: rustfmt window.vectorcraft
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 23:50:58 +07:00
focuerandClaude Opus 5.5 9dbab52168 web: window.vectorcraft, the control channel for the page
The same JSON methods as the desktop control server (engine.execute, ui.inspect, ui.screenshot, …),
as promises on window.vectorcraft, like FilmCraft's window.filmcraft: an agent driving the editor in a
browser tab or an <iframe> uses the same commands as the CLI and the MCP server. openFile opens
bytes the way a dropped file opens; captureDownloads keeps saves in the page for readFile.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 23:50:58 +07:00
dotCooCoo 25df070576 Color: Sample Color from Screen picks a color anywhere on the screen
The Color Picker gets an eyedropper button beside the New and Original
chips, and `ui.sampleScreenColor {stroke?, picker?}` shows the system's
color sampler. The command answers at once. When the person clicks a
color anywhere on the screen, the color becomes the fill or the stroke
through paint.setFill / paint.setStroke as one undo step, or with
`picker` it becomes the open Color Picker's color, which previews on the
selection as any pick does. Escape cancels the sampler. The sampled sRGB
color goes through Cms::srgb_to_rgb, so in a Display P3 working space a
color inside sRGB shows as it did on the screen. `ui.inspect` reports
`screenSampler` while the sampler is open.

- macOS uses NSColorSampler (apps/vectorcraft/src/mac_screen_color.rs).
- The web app uses the browser's EyeDropper API where the browser has
  one.
- Without a sampler (Windows, Linux, other browsers) the button is gray
  and the command returns an error. Keyboard Shortcuts lists the
  command, so it can be given a key.

Docs: docs/control-protocol.md, docs/target-app-parity.md.
2026-10-16 02:25:53 +07:00
gniax 6f23190925 fix(web): preserve pen buttons and touch-only input 2026-10-16 01:36:24 +07:00