Repository navigation
v0.18.0
Oriel 0.18.0
The native renderer (-Dnative_ui) runs full apps that were written for a
web view: dialogs, disclosures, the session history, file and camera
inputs, date pickers, popovers, Intl, and the drawing such an app's CSS
asks for, drawn to match the web view build on Linux and Android.
Added
<dialog>:show(),showModal()(the top layer over every
z-index, with its::backdrop;:modal; the page outside inert, Tab
kept inside),close()andrequestClose(),returnValue,cancelon
Escape and the platform's back,closeafter it, the focus back where it
was,method=dialogforms.<details>and<summary>: closed, only the summary shows, with its
disclosure triangle; a click, Enter oropentoggles it and fires
toggle.- The Popover API:
popover,showPopover(),hidePopover(),
togglePopover(),popovertargetbuttons,:popover-open,
beforetoggleandtoggle; auto popovers close on Escape, a press
outside or another auto popover. - The session history:
history.pushState,replaceState,state,
back,forward,go,popstateandhashchange; the platform's
back closes a modal dialog, then walks the history. <input type=file>: the platform's file dialog (acceptnarrows it on
the desktops), or withcaptureon a phone the camera; the pick is
files[0](read lazily, as a dropped file), theninputandchange;
cancelwhen there's none. New page commandsnui:pick_fileand
nui:picked_file(src/modules/dialog/page.zig).<input type=date>: the platform's date picker on every platform (a
GtkCalendarpopover, the Date and Time Picker control, an
NSDatePickerpopover, aUIDatePicker,DatePickerDialog), the value
YYYY-MM-DD, the date shown in the user's format.Intl:NumberFormat,DateTimeFormat,Collator,PluralRulesand
thetoLocale*StringandlocaleComparemethods over them (English,
Spanish, Portuguese, French, German and Italian data, matching ICU's
output for the common options);navigator.languageis the user's on
Linux and Android.new Image()and<img>:naturalWidth/naturalHeightfrom the file's
header,complete,decode(),loadanderror.conic-gradient()backgrounds (pie and donut charts);background-image
gradients withbackground-size,background-positionand
no-repeat;:emptyin style sheets; anappearance: nonecheckbox's
::beforeand::after(a switch's knob);form.elements,
requestSubmit(submitter)andsubmitevents'submitter;
datalist.options;env()(the safe-area insets are 0).grid-columnplaces grid items (1 / -1,span N, a start line), as
browsers auto-place them row by row; absolutely positioned children take
no cell.::placeholder(and::-webkit-input-placeholder) colors a field's
placeholder; without one it's the platform browser's (WebKit's
darkgray, Chrome's#757575).- Every CSS named color (
darkgray,crimson,rebeccapurple…), not a
dozen. alert,confirmandpromptanswer as a browser with its dialogs
suppressed (they would block the UI thread) and log a warning.- Events the runtime fires are
isTrusted; a promise rejected with no
handler is logged.
Fixed
- The page starts after the app's
setupon the desktops, as a web
view's page does, so its first commands see whatsetupmade (a tray). - A block-level button centres its content only in its height (its
text-alignplaces the text);justify-contentand gaps apply to flex
and grid boxes only. The UA sheet centres a button's text. - A select with
appearance: nonehides the platform's arrow when the
page draws its own beside it; GTK's drop-down takes new options. - Stylesheet and script links with a query (
styles.css?v=8) load. - SVG icons follow the page's CSS
fill,strokeandstroke-widthon
the<svg>; an inline::before/::aftertext stays on its line. - Android: fields inside a modal dialog show; a border on only some sides
of a rotated box no longer draws hairlines on the others. - A focused control that gets disabled or leaves the page loses the focus
(the focus fixup rule), so its focus ring goes. matches(),closest()andquerySelector()know:focus,
:focus-visible,:hoverand:active.- A modal dialog with
margin: auto, a set width and an auto height is
centred, as tall as its content's room up to itsmax-height. - Grid
frcolumns stay equal beside padded cells (a partial last row
ofrepeat(auto-fit, …)), and an auto-fit grid's column count follows
its laid-out width. inline-flexandinline-gridlay their children out asflexand
griddo.- Line heights are in WebKit's 1/64 px units, so text sits on the same
pixel rows as the web view's; SVG elements have
getBoundingClientRect(). - GTK: text fields and selects take the page's
font-weight, style and
family, and place their text where WebKit does;focus()keeps a field's
selection (Tab still selects its text); a field under a modal's backdrop
shows its text, dimmed; a date shows its year in full; text fields use
WebKitGTK's 1px padding and select widths leave room for the arrow only
when it's drawn;gtk-interface-color-scheme(GTK 4.20, the desktop's
light or dark) setsprefers-color-scheme, and a change of it applies
at once. - Android: a date shows its year in full, as Chrome does; a one-line
field shows its text from the start until it's focused, and again once
left; a field under a modal's backdrop stays drawn there, dimmed. - A transparent box (
opacity: 0, a faded-out toast) no longer hides the
fields under it (Android cut a select's label to a sliver; GTK and
Windows hid the field). desktop-entry-release/desktop-entryinstall what the packages put
next to the executable (libggml-cuda.so,libggml-vulkan.so,
contents.files), so an app installed that way finds its GPU backends.- Phones: when the keyboard comes up, the focused field scrolls into what's
left of the page, as Chrome and Safari bring it into view.