Commit Graph
194 Commits
Author SHA1 Message Date
aiongg 9dfdb4c26f Runtime: a host declares its own egui canvas as the window's document canvas
focus::host_canvas registers the app's own egui widget as a canvas stop
through the stop registration a framework canvas uses, so a bare Tab
toggles that window's panels, and the canvas takes keys as its KeyUse says
while it has focus.
2026-11-12 14:32:48 +00:00
aiongg 263ad24c08 Runtime: copy from an egui label selection stays egui's
The focus end hook records whether egui holds a label text selection; while
it does, the key stage leaves the copy and cut events in egui's input, so
egui copies the selection. A focused framework editor still takes them.
2026-11-12 14:32:48 +00:00
aiongg a1362ea605 Runtime: an app's own focused egui widget or popup keeps Tab, Escape and the clipboard
The focus end hook records whether egui focus is on a widget no framework
component made, or an egui popup is open, while no framework press or drag
is captured. While that holds, the key stage leaves Tab, Shift+Tab, plain
Escape and egui's clipboard events in egui's input and routes nothing for
them.
2026-11-12 14:32:48 +00:00
aiongg cde64912bc Runtime: the IME engine reads and writes the IME only while a framework editor owns it
The input hook leaves IME events in egui's input, and the end hook leaves
PlatformOutput.ime alone, unless a framework editor owns the IME or the
engine's reset is pending, so an app's own TextEdit or IME reader keeps
working under the runtime.
2026-11-12 14:32:48 +00:00
aiongg 3251c6c6fb Runtime: a press on the widget that holds egui focus keeps it
classify_press compares the press target with egui's focused widget, so a
host's own focused egui field keeps its focus when pressed, as a focused
framework stop already did.
2026-11-12 14:32:48 +00:00
aiongg 9b22aa4e0f Fill propagates down a column whose width is given
A content-sized inline container shown in a `Stack` body given its width
passes that width on to its own body: its children measure and show as in
a given column, so a child that fills (a fill-width row, a list, a divider,
a picture, a side-labelled control) takes the width, and the container
takes what its content took. A content-sized mount (dialog, popover, menu),
a row, a grid or a held container stops it, so their bodies stay content
columns and measure as before.

The env carries the fact as `given_column`, set by a `Stack` body that is
not a content column and listed in the measure key's env facts. No pass,
record or measuring run is added.

Panel roots that set `fill_width()` only to span their pane now take the
default: CharacterControls, ParagraphControls, TimecodePanel,
ReorderableSections and BlendIfBar each hold a fill child, and where they
sit in a content column (BlendIfBar in the Layer Style page) the column
around them hugs them either way.

The fill_column trial shows the given column, nesting, a row stopping it,
the hug kept in a popover, and the measuring-run count against a
fill-width column.
2026-11-12 14:32:47 +00:00
aiongg 39be8c8025 Notice cards: one card width (size.notice.width), a status card's edge and title in its tone, and a toast stack measured and placed inside the body whose corner it sits at 2026-11-12 14:32:47 +00:00
aiongg 47508315ef craft-ui-shell: public embed hooks for apps with their own eframe App
shell::embed holds install (runtime plus fonts), before_input, logic and
before_ui, and CloseDecision. app::run's Driver calls the same hooks.
runtime::keys::with_window_intents is public: the host's read of the
window-level keys no component took. docs/craft-framework.md 2.2
describes the recipe and what install takes over. A trial drives its
own frame loop through the hooks alone.
2026-11-12 14:32:46 +00:00
aiongg b8e9b5b0ec TargetMark: a pulsing accent ring around a part of the window, on a placed passive layer 2026-11-12 14:32:46 +00:00
aiongg 760669272f craft-fonts-build: cut interface faces with craft-font-subset
The subset feature uses craft-font-subset's cut_face (HarfBuzz) in place of
skera, which leaves the workspace. CFF interface faces now cut correctly, so
Error::NotTrueType goes; a cut keeps its source's extension.
2026-11-12 14:32:45 +00:00
aiongg 5bfb923ccd craft-font-subset: add the fsType embed-permission check
embed_permission reads the OS/2 fsType usage permission (installable, editable,
preview and print, restricted) and the no-subsetting and bitmap-only bits, with
the precedence cadcraft's PDF export uses; allows_subset says whether an
exported file may carry a subset.
2026-11-12 14:32:45 +00:00
aiongg 4717f13ae7 Add craft-font-subset and harfbuzz-subset-sys from font-preview-service
Moves font-preview-service's HarfBuzz subsetter into the framework as the one
font subsetter: harfbuzz-subset-sys builds the vendored HarfBuzz 15.0.0
subsetter and holds the safe wrappers, so unsafe stays in that crate (added to
design-lint's contract/unsafe-allow). craft-font-subset keeps the service's
API (subset, subset_renamed, encode_woff2, closure, codepoints) and tests, and
adds cut_face for build-time interface cuts. The facade gets the native-only
font-subset feature.
2026-11-12 14:32:45 +00:00
aiongg 56b30b938d Components index lists the round's new components and stories 2026-11-12 14:32:45 +00:00
aiongg eef17642ba Toasts: one queue per window; each AppShell, embedded ones included, shows its own window's toasts at the end-bottom corner of its body (Anchor::Corner replaces Anchor::Viewport), so nested shells no longer each draw every card at the viewport corner; NoticeCenter posts to its window, and the NoticeCenter and ToastStack stories show three notices in their own area, as the old ones did 2026-11-12 14:32:44 +00:00
aiongg 84639de189 A disabled component that shows data paints its enabled look faded
Component::DISABLED picks how a disabled instance looks: the style's Disabled
state (DisabledLook::States, the default for chrome controls) or its enabled
look at Opacity::DISABLED (DisabledLook::Faded). Step 13 fades the surface,
part layers, paint, faces and paint_over of a faded component; its children
and step 14 paint outside the fade and show their own disabled look. egui
fades a shape as it is added, so a settled region replays the faded paint.

Tile, RowThumb, Swatch, PointPicker, Navigator, PreviewPane, ColorStrip,
ColorArea, PaintChip, PagePicture, PagePictures, ReadingView and DrawPad
declare Faded. The tile's disabled veil and the Disabled entries of the tile
and swatch looks go. Opacity::DISABLED is 0.5, the old disabled fade and the
old knob's disabled share.
2026-11-12 14:32:44 +00:00
aiongg 27ca0a19ba A stripe role for striped lists and tables 2026-11-12 14:32:43 +00:00
aiongg 9777ba9c83 Rows, notices and gallery story columns derive their sizes from role tokens
A list row with a thumbnail is at least a standard control and the panel padding tall (the old
thumb_row_min), a centred notice reads about 38 body sizes wide, and the stage tokens become the story
stage (size.story), whose least width also sets the gallery's story columns. A gallery card is at
least a story and its padding wide, and its height guesses come from type and control roles.
size.thumb_row goes.
2026-11-12 14:32:43 +00:00
aiongg a338de11aa Value controls derive their sizes from role tokens: dial, dead zone, switch, progress bar and thumb row thumb
The angle dial is 1.75 standard control heights across with a dead zone of 0.1 (the old dial), the brush
ellipse two dials, the switch track twice its height (the old SWITCH_ASPECT), a progress bar two grooves
thick, and a thumb row thumb as the old levels thumb from the handle sides. size.dial, hit.dead_zone,
toggle, meter and marker go.
2026-11-12 14:32:43 +00:00
aiongg 03d2526deb Slider thumbs take the knob shape role and the control glyph size; component tokens removed
The slider thumb lengths were the only component tokens. A round knob is the control's glyph across
(StyleCx::glyph, shared with the icon-only button glyph); a tab knob is the control's icon side tall.
Themes choose the shape with shape.knob; Classic sets the tab, its old 10 x 16 thumb. TokenRef
collapses into ColorToken, and the theme file's components maps go.
2026-11-12 14:32:43 +00:00
aiongg 90ec9741b4 craft::egui_fork::REV names the lockfile's egui revision, 3f56db2d 2026-11-12 14:32:43 +00:00
aiongg 0f68189efc docs: build a crate's tests instead of checking it first
A check is a separate cargo build of the same crates, so cl check followed
by cl test compiled every edited crate's front end twice.
2026-11-12 14:32:42 +00:00
aiongg d8f6719fdd tools/cl: a timing report and a cl.log line for every build
Every build cl composes passes --timings (the newest 200 reports kept), and
every cl command appends one line to <target>/cl.log with its build and
test-run wall time, exit code and report, so a slow loop can be read from
data afterwards.
2026-11-12 14:32:42 +00:00
aiongg a12625ddfc tools/cl: builds through CL_LAUNCHER, test binaries and renders through CL_RUNNER
cl test builds with cargo test --no-run and runs each test binary itself, as
cargo would, through CL_RUNNER. A wrapper that limits how many test binaries
run at once then holds its limit only for the run; held for the build, it
queued every build behind the slowest one while the job pool already shares
the cores between builds.
2026-11-12 14:32:42 +00:00
aiongg 592f383687 Absolute value drags set the value on press
A part that senses SETS_ON_PRESS runs its gesture through Cx::follow_press: the press begins it with the value under the pointer, shown in the press pass, a drag follows the pointer and the release commits. PointPicker (and ColorArea through it), ColorStrip, ColorWheel and ColorRamp use it in place of their own DragStart, Drag, Release and click handling; their drags take no modifiers, as before the port. ValueDrag::at gives an absolute drag's value at a point. The suite's slop case expects a one-value gesture within slop on such a part.
2026-11-12 14:32:42 +00:00
aiongg 4d6ff42eb7 Selection parts: read-only text any component can make selectable
PartsCx::selectable_text declares a run as a selection part with a press-only
stop in no group; step 8b gives the focused one Select All and Copy; and
PaintUi::selectable_text shows it through the text widget with the run's own
galley, in the state's colours. Notice title and message, MetadataTable values
(ListRow::cell_selectable) and SelectableText use it. SelectableText loses its
Bind and Input::Text path and becomes a label whose value is its text. The
suite presses the focus registration's press-only stops when Tab reaches
nothing, instead of guessing from Input::Text and a read-only node.
2026-11-12 14:32:41 +00:00
aiongg 81c22f3469 Old modality: Tour and ViewportWindow block nothing, Preferences is app-modal, a tool window ignores Escape (K17, D10)
The tour card is a popup that blocks and dims nothing and stays on an outside press; Backdrop::ScrimWithHole and the
cover layer's hole go with it. ViewportWindow blocks nothing until app_modal(backdrop). A modeless Dialog without a
footer ignores Escape; a modal one or one with a footer closes on it. PreferencesWindow drops modeless and takes the
shared app-modal path (blocked cursor, refused close).
2026-11-12 14:32:41 +00:00
aiongg 73fc9dc801 Collection members run their parts, update and finish: a member's parts are sensed with it, its output gives the item event, its parts' nodes sit under its node; TabStrip's tabs are members 2026-11-12 14:32:41 +00:00
aiongg 476602d4a3 A filling story's card is as tall as its content, and content taller than the room shares it
Along a height its parent sizes from its content, a container that fills takes its content height, at most the
room it is offered. When the content is taller, the measuring run is taken back and the container is laid out as
given the room, so its list and the bar under it share it; a record of the content height lets later runs and kept
transcripts lay it out the same. room_height only offers a finite room inside a scroll: a gallery card is as tall as
its story's content, at most the view, as the old gallery's tiles were.

layout_memory::draft runs a measuring run whose hand-forwards can be taken back once its result is seen: records,
kept transcripts, the open transcript's items, leaves and inputs, and each contribution (Contribution::undo for
column widths, label control minimums and reads). steps::id::draft takes the Auto id ordinals back with it. The
shrinking row's least probe is a draft taken back that reads nothing from outside.

A scrolling collection that fills keeps to its measured height in the real run under a body sized from its content,
so a footer under it stays below its rows. The PlacesTree story keeps the old 380 pt box.
2026-11-12 14:32:40 +00:00
aiongg c897f3faf3 Collection members: a collection's items can be members of its run, sensed in its arena and painted as faces; SwatchTable's cells are members, SwatchCell goes 2026-11-12 14:32:40 +00:00
aiongg f74d963e8f Collection keys: Cmd+] and Cmd+[ move the selected items, Shift to the ends
The stacking keys replace Alt+Up and Alt+Down as the reorder keys of every reorderable
collection and section stack, from one table in the key table. ] moves toward the front:
the start of a vertical order, later in a horizontal strip. The keys move the selection
as a block (the lead alone when it is not selected), with the tree rule for into_groups;
the single-row nudge helpers go. Alt+Down is Open everywhere.
2026-11-12 14:32:39 +00:00
aiongg 353579afd3 Docking: a new float opens at a height fitted to its content
A panel or group floated out of the dock opens at its docked width and at
the height its group measures at in a floating window's room, at most
size.float.height. Content that fills its body opens at that height.

- Proposal::Size measures a component as it is shown at a rect of that
  size, with no share of the parent body's room.
- drag::amend lets a host change a drag's payload in the frame the drag
  started. The dock area measures the dragged panel there and puts the
  size on PanelDrag::source / GroupDrag::source. The Float command and a
  tab torn out of the window measure where they run.
- DockGroupOutput::drag_started also reports tab drags.
- FloatSpace::size_of caps a panel's, group's or column's height at the
  default float height. FloatSpace::record and its contents are gone.
2026-11-12 14:32:39 +00:00
aiongg 264ad8cc53 Native windows: the macOS title-row move starts on the press
The tracked macOS move sent StartMove a pass after the pointer passed the
click distance. winit hands performWindowDragWithEvent the event AppKit is
handling when the command runs, and in that later pass it is often not the
press, or none, so the drag took only some of the time.

- StartMove goes out in the band's Down pass where the OS tracks moves. The
  move is reported (Begin, Update, Commit) once the system pointer has passed
  the click distance; a click on the row moves and docks nothing.
- A window whose move the app runs keeps AppKit's own movable flag: the band
  writes nothing for it and the end hook leaves it alone. AppKit moves such a
  window for the hand-off and resizes it from its edges only while it is
  movable.
2026-11-12 14:32:39 +00:00
aiongg 6cf7952263 docs/development.md: the renderer's dependency lines in cl doctor 2026-11-12 14:32:39 +00:00
aiongg f49cd1742a docs/development.md: the old gallery for frame-time comparisons builds with the gallery profile's settings 2026-11-12 14:32:39 +00:00
aiongg bc1a92fcd9 docs/development.md: measuring frame time on the gallery profile, in a measuring-only worktree 2026-11-12 14:32:39 +00:00
aiongg 7e9768f07b Dev profile: craft-ui-contract at opt-level 0
An edit to the runtime's 65k lines spent 35-90 s in opt-level 1 codegen before
its test binary linked. The hot pipeline is generic and compiles in the
dependants anyway; theme, behavior and proof stay at opt-level 1.
2026-11-12 14:32:39 +00:00
aiongg 7410239246 tools/cl: every command resolves features through feature-root, one framework build per target dir
cargo unifies features only over the packages a command selects, so a framework
crate's tests, a domain crate's tests, the gallery and the story renderer each
built their own copy of the framework and of wgpu. feature-root carries the
gallery's dependencies with every domain crate; cl selects it beside every
command's package and names the crate's own targets, so nothing of it builds.
The per-crate feature anchors go; cl check also checks a crate's bins.
2026-11-12 14:32:39 +00:00
aiongg 543ab4236e Overview: selecting a component glides its card to the top
Lazy::reveal asks its scroll body to glide until the child starts at the
view's start, run or not; the body follows the child's place on the motion
service's follow curve and a move of its own ends the glide. It replaces
Lazy::keep. The gallery's Overview passes the selected card's reveal in the
pass its cards follow the selection, in place of egui's scroll_to_rect,
which no scroll body reads.
2026-11-12 14:32:39 +00:00
aiongg c19abe8663 Dock a native window by dragging its title row
A floating dock group in its own OS window now moves through a window move
gesture the app runs, which reports Begin, Update, Commit and Cancel like a
layer's move, so the dock marks the target under the pointer and docks the
whole window on release.

- macOS (Caps::OS_MOVES_TRACKED): the OS moves the window (StartMove), and the
  app follows the system pointer, button and Cmd through SystemWindows, the
  running platform's WindowSystem in craft-window. The hand-off ends when the
  system reports the button up.
- X11 and Windows: the app moves the window with SetOuterPosition so the
  pressed point stays under the pointer; Escape puts it back.
- A drag started by a container shown in its own OS window follows that
  window's pointer, not its parent's.
- The runtime's end hook sets NSWindow.movable for every window; a window
  whose move the app runs is never moved by AppKit from its band.
2026-11-12 14:32:39 +00:00
aiongg 31948854ad A native dock window's own title row is its only title bar
A tool window's frame comes from policy::tool_frame, whatever frame the main
window has: Inset with the traffic lights hidden on macOS, undecorated with no
caption buttons elsewhere. The installed decision applies to the other kinds.
2026-11-12 14:32:39 +00:00
aiongg 0799bc7588 Open floating dock windows as OS windows where the host reports window positions
DockConfig::native_windows is on by default. A float opens native where the
window host opens OS windows and reports their positions (ShellInfo::window_positions,
WindowHost::positions_reported: not on Wayland); a float never shown native opens
over its place in the main window. AppSpec::new takes the backend winit opens on.

The OS close of a native float is its Close action, taken when every panel in the
window may close; the group's open state belongs to the dock model. The gallery's
mock editor keeps its floats inside its preview.
2026-11-12 14:32:39 +00:00
aiongg 89981c691f cl runs cargo through CL_LAUNCHER when set; the job-pool docs describe the setting, not one machine 2026-11-12 14:32:39 +00:00
aiongg ecd4eca834 docs(development): CI coverage per workflow, the ui gate's path filter, and every crate no workflow tests 2026-11-12 14:32:39 +00:00
aiongg e2ae0d10ea docs(dialogs, docking, themes): name the library crate behind each craft_ui module 2026-11-12 14:32:39 +00:00
aiongg c49f9329d4 docs(authoring): which library crate a component goes in, the test executables of library and family crates, story groups and titles, cl commands 2026-11-12 14:32:39 +00:00
aiongg 8f4490ff99 docs(craft-framework): the split UI library, the egui fork, gates and landing as the code has them
- 3.1 to 3.4: the six library crates and the craft-ui facade, with a dependency
  diagram, the crate table and the craft-win32 unsafe exception; taxonomy covers
  every crate.
- 2.1 and 2.3: the gallery profile, cl and the story renderer.
- 3.6: layout memory's kept text; the scroll extent lives beside the offset.
- 3.7: the aiongg/egui pin, its 19 commits and what landing needs.
- 7.1: the step rule of closed list controls (Entry::stepped).
- 8.2: the gates that exist.
- 9.7 to 9.9: measured series size, landing rows without the pasted step rows,
  the facade and API map in place of deprecated aliases, aliases as a question.
- Appendix B: entries for craft-behavior, each library crate and craft-win32;
  where each concept lives.
2026-11-12 14:32:39 +00:00
aiongg afa3b3f6d7 docs(glossary): state where Lives in and Defined in point; drop the doc-test claim and DebugInspector 2026-11-12 14:32:39 +00:00
aiongg 5040dd0879 docs: regenerate contract-api.md from the split library crates 2026-11-12 14:32:38 +00:00
aiongg 64e3e6f4e5 A scroll body keeps its content extent with its offset
The extent that bounds a body's offset lived in shown memory (`BodyView`),
which is evicted soon after a body stops showing, while the offset and its
anchor live in session memory (`ScrollState`). A body shown again after a
longer hide clamped its kept offset against an extent of 0 and came back
at the top. The extent now lives in `ScrollState` beside the offset, with
the same lifetime; `BodyView` keeps the view rect.

The anchor rule runs only in the run that lays the content out for the
view: a measure run places no Lazy children, so it would clear the anchor.
2026-11-12 14:32:38 +00:00
aiongg e872978edc Overview first show runs only the cards in view
A Lazy child no pass showed yet takes the estimate its app gives
(`Lazy::new(key, estimate)`): that long along the axes its scroll area
scrolls, nothing across them, as a collection places rows it never built
by its item layout's estimate. The never-shown "always run" branch of
`lazy::decide` is gone. Gallery cards estimate their height from their
story rows.

A scroll position the framework holds is also named by content: the
first child at or after the view's start (`lazy::Anchor`, kept with the
offset in `ScrollState` and a collection's `Scrolled`). When extents
before it change, the offset follows the child and the pass runs again,
so the content in view does not move. Bound offsets keep no anchor.

Entries of the out-of-view store record their scroll area. A frame drops
only the entries an area that ran did not reach, so a hidden area (a tab
switched away) keeps its children's extents.

Trials: first show, shown again after a hide, content in view stays when
an estimate above it resolves, collection rows stay when a row above them
changes height; the gallery trial asserts each level first runs the cards
in view.
2026-11-12 14:32:38 +00:00