Repository navigation
Releases
Releases · XTSoftwareLabs/nativeboat
NativeBoat 0.1.0-alpha.7
- Bundled applications (electron-vite, vite-plugin-electron, Forge with
Vite) ship only the files their main process, preloads and forked
modules name: MarkText's output is back to 27 files from 1,191 with
0.1.0-alpha.6. In every layout, test folders and their fixtures,
packages' style sheet sources and native build leftovers stay behind,
and the application'sfilesexclusions apply to package files, as
electron-builder applies them. - The application's files are in
resources\appbeside the executable,
as in a packaged Electron application:app.getAppPath(),__dirname
and module paths point there.extraResourcesare inresourcesand
extraFilesbeside the executable. - Scripts that pages build as text from a template literal and insert as
<script>elements run, compiled ahead of time, as VS Code's webviews
defineacquireVsCodeApi. - An inserted classic script runs in a task of its own and fires
load
right after, so AMD loaders get each script'sdefine. fork()children get the module path inprocess.argv, as in Node.- TypeScript that its build compiles to CommonJS calls the module's
requirealso when it declaresrequirefor TypeScript. - CSS:
grid-template-areasand named grid lines ingrid-area,
grid-rowandgrid-column;border-inline-*andborder-block-*;
Chromium's-webkit-margin-*and-webkit-padding-*names. Properties
with-moz-,-ms-and-o-prefixes are ignored, as Chromium
ignores them. - Text in web fonts that asks for OpenType features, such as
font-variant-numeric: tabular-nums, is drawn in its font without the
features instead of as missing-glyph boxes. - Repainting a small area, such as a caret's blink, draws only what is in
that area.
Download nativeboat-0.1.0-alpha.7-windows-x64.zip, extract it and add the folder to your PATH; see the README. SHA256SUMS.txt holds the archive's checksum.
NativeBoat 0.1.0-alpha.6
- Fixes builds that failed with
error[E0502]: cannot borrow *realm as mutablein a generated crate, as MarkText's did with 0.1.0-alpha.5:
functions whose source text the program reads compile again. - Pages show
<iframe>documents: each frame runs its document's compiled
scripts in a realm of its own, painted and sized at the frame's box,
withcontentWindowandcontentDocumentfor same-origin frames,
postMessagebetween frames,loadevents,requestAnimationFrameand
document.open,writeandclose. Frames are 300 by 150 pixels with
an inset border unless styled. Thedocumentssetting names HTML files
that pages show in frames by URLs they build while they run. - Service workers: pages register them with
navigator.serviceWorker,
and a worker installs, activates, claims its pages and exchanges
messages with them. Itsfetchevent answers thefetch()calls,
images and linked style sheets of the pages it controls, and it has
clientsand in-memorycaches. Markup a page writes with
document.writeloads its images, style sheets and handlers. - Functions run in the realm that made them, so a frame calling its
page's listener sees the page's globals. - CSS container queries:
container-type,container-name, the
containershorthand and@containerrules with size conditions, also
for::beforeand::after. PerformanceObserverreports the page's marks and measures.net.isOnline()andnet.onlinereport whether Windows has a network
connection, andwindows-foreground-loveand@vscode/fs-copyfileare
supported native modules.- Paths through
app.asaror*.asar.unpackedread the folders those
archives were packed from, as packaged Electron applications expect. - The
forkssetting names modules a program starts withfork()by
paths it builds while it runs, and forked modules get files at those
paths, so programs that check a module exists before they fork it work. - The
scriptssetting names scripts that pages load by URLs they build
while they run, such as those of HTML the application generates, with
the source each compiles from. createRequire(import.meta.url)kept as a value, as esbuild's ESM
bundles keep it, requires modules by name when the application runs.- Packages around plugin packages that keep what they share, such as an
editor'sextensions/node_modules, get their dependencies installed.
Download nativeboat-0.1.0-alpha.6-windows-x64.zip, extract it and add the folder to your PATH; see the README. SHA256SUMS.txt holds the archive's checksum.
NativeBoat 0.1.0-alpha.5
- NativeBoat is open source under the MIT license. Its source, releases and
documentation are in the nativeboat
repository, and built applications'THIRD-PARTY-NOTICES.txtincludes
NativeBoat's own MIT notice. - HTTPS responses stream as they arrive:
dataevents follow the
download, a response read slowly pauses it, and large downloads such as
updates no longer wait whole in memory.rejectUnauthorized: false, on
the request or its agent, andNODE_TLS_REJECT_UNAUTHORIZED=0accept
server certificates Windows does not trust, as in Node. - Form controls check their constraints as Chromium does:
required
(radio groups and select placeholders included),pattern, email
addresses and URLs, number and date ranges and number steps, with
Chromium's messages invalidationMessage.:validand:invalid
match controls, forms and fieldsets, andsetCustomValiditymakes a
control invalid. -webkit-text-fill-colorfills text,font-kerning: nonekeeps glyph
pairs unkerned, and-webkit-user-dragdecides whether pressing and
moving over an element drags it:nonekeeps images and links still and
elementdrags any element.- Drawn selects place their arrow where Chromium does, 8.5 pixels inside
the right border whatever the padding, and checkboxes and radio buttons
made fully transparent, as switches lay them over their track, show the
page beneath them and still take the clicks. ::beforeand::afterboxes in the flow paint their backgrounds and
borders, so an empty dot drawn withcontent: ""shows.- Text fields with transparent text show what the page draws beneath
them, with their caret and placeholder, as fields laid over a
highlighted copy of their text expect; translucent field text blends as
CSS colors do. text-underline-offsetplaces underlines that far below the baseline.- In preloads,
process.nextTickcallbacks the page's code queues run
after the page has rendered, as on Electron's next Node turn, so work a
library starts that way no longer holds back the page's next frame. - Main processes and preloads have Node's global
performance:now(),
timeOrigin, marks and measures with their entries, andtoJSON(). nativeboat build --config <FILE>reads a settings file for the native
build, so the project needs no change: itspublishnames the feed native
builds update from, before package.json'snativeboat.publish.- Checkboxes and radio buttons look as in Chromium, and fill with the
page'saccent-colorwhen checked. - The pointer over a form control moves over the page:
:hoverstyles,
mousemove,mouseoverandmouseenterevents and the hover look of
checkboxes follow it, and controls show the cursor their style asks
for, such ascursor: pointer. child_process.spawnSyncworks as in Node: it returns the process's
pid,status,stdout,stderrandoutput, asBuffers or in the
encodingasked for, and a program that cannot start gives anerror
with Node'scode, such asENOENT.- A label the pointer is over or presses hovers or presses its control
too, as in Chromium::hoverand:activestyles and the hover look of
a checkbox follow the pointer over its label. nativeboat analyzereports React as Partial anddisplay: contentsas
Supported, as the compatibility list does, and its notes for web fonts
and web notifications say what works.- Applications that keep only some Electron locales with
electron-builder'selectronLanguagestake their locale from those, as
Electron does from the resources it ships: an application keeping only
en-USreportsen-USfromapp.getLocale()andnavigator.language
on a Chinese Windows, and uses English default fonts.monospaceis
Courier New before Electron 36, which made it Consolas where text uses
ClearType. - Single-line text fields stay in the middle of their line when the page
around them scrolls or changes size; their text and placeholder used to
jump to the top of the line. - Buttons laid out as blocks or flex containers in the flow of text are
as wide as their content when their width isauto, as in Chromium,
rather than as wide as their container. - Styled selects are as tall as in Chromium: their label's line is the
height of the primary font's, whatever fonts the label falls back to,
with a device pixel above and below it unlessappearance: none. app.getPreferredSystemLanguages()lists the languages of Windows'
language settings, such aszh-Hans-CN, and pages'navigator.languages
is the application's locale followed by them, as in Electron.nativeboat buildprints the project's warnings, such as electron-builder
settings it does not use. Applications that open no windows, such as tray
applications, are not warned that no page was found.- Message boxes look and answer as Electron's: a message without a
detailis the dialog's content, buttons named OK, Cancel, Yes, No,
Retry or Close are the dialog's own and other buttons are command links
unlessnoLinkis set, an empty title shows the application's name,
defaultIdandcancelIdtake Electron's defaults, and
checkboxLabeladds a checkbox whose state the result reports.
dialog.showOpenDialogSync,showSaveDialogSyncand
showMessageBoxSyncare available, and a canceled save dialog gives an
emptyfilePath. safeStorageencrypts and decrypts as Electron does on Windows: its key
is protected for the user by Windows and kept inLocal Statein the
user data directory, so text an Electron build of the application
encrypted decrypts in the native build.powerSaveBlockerkeeps the
computer, or also the display, from sleeping.powerMonitorreports idle time and state, whether the computer runs on
its battery, and emitssuspend,resume,on-ac,on-battery,
lock-screenandunlock-screen.systemPreferencesgives the accent
color, Windows' system colors, animation settings and media access, and
emitsaccent-color-changedandcolor-changed, as in Electron.- The
webContentsmodule finds the contents of the application's
windows:getAllWebContents,fromIdandgetFocusedWebContents. - Windows take the
iconoption andsetIcon, and windows without one
show the application's icon.autoHideMenuBarhides the menu bar until
Alt shows it, withsetMenuBarVisibility,setAutoHideMenuBar,
isMenuBarVisibleandisMenuBarAutoHide. Thetransparent,
alwaysOnTopandskipTaskbaroptions work, and Electron's macOS-only
window methods, such assetSimpleFullScreenandisDocumentEdited,
exist and behave as Electron's do on Windows. - Menus look like Electron's: rounded corners, Chromium's shadow, and
shortcuts and submenu arrows sharing the right column. - Rounded corners, elliptical ones included, are antialiased as in
Chromium, for backgrounds, borders and clipped content. Thin strokes,
such as those of icons, keep their weight. - SVG files work as images again, in
<img>and as backgrounds, drawn as
vectors at any size. - Videos show their poster or first frame and report their duration and
loading events, with Chromium's colors and scaling. nativeImagebehaves as Electron's on Windows: JPEG and icon files,
thumbnails at the size asked for,resizeandcropas Chromium does
them,toJPEG, scale factors and representations, and Electron's
errors.- Shadow DOM:
attachShadow, slots, and styles, layout and painting of
shadow trees, with:hostand::slotted(). Custom elements:
customElements.define, upgrades and the lifecycle callbacks.
:lang(),:dir()and:nth-child(An+B of S)match, and@supports
accepts declarations whose values usevar(). - Pages can start dedicated workers. They run on the page's thread, each
with a worker global of its own, and exchange messages and errors with
the page. A worker can be made from a function's text, since
Function.prototype.toStringreturns the source of functions a program
reads as text. - Message ports:
MessageChannel,MessagePortandBroadcastChannel
in Node code and inworker_threads. Electron'sMessageChannelMain
ports pass between the main process, preloads and pages through
webContents.postMessage, andutilityProcessand
child_process.forkrun modules as child processes with message
channels. - Node's
cryptomodule runs on Windows' cryptography (CNG): MD5, SHA-1
and SHA-2 hashes, HMACs, PBKDF2 and HKDF, AES in ECB, CBC, CTR and GCM
modes, random values,timingSafeEqual, secret keys and X.509
certificates. Every page and process has the Web Crypto API:
getRandomValues, andcrypto.subtlewith SHA digests, HMAC, AES-GCM,
AES-CBC, AES-CTR, PBKDF2 and HKDF; other algorithms reject with
NotSupportedError. - Main processes and preloads have Node's
WebSocketclient forws:
andwss:URLs, through the system's TLS and proxy settings. @vscode/sqlite3databases run on Windows' own SQLite (3.38 or later)
when the system has it, and otherwise on a built-in engine that covers
tables, indexes, constraints, queries, upserts, transactions, pragmas and
ALTER TABLE ... ADD COLUMNandRENAME TO.- WebAssembly modules load and run, with the JavaScript API over them.
They are interpreted, so they run slower than in Electron. - More of Node:
netservers and clients over Windows named pipes,
vmcontexts (without evaluating code strings),inspector(with no
debugger attached),moduleresolve hooks andcreateRequire,
diagnostics_channel,perf_hooks,v8,dns,util/types,
process.memoryUsage,cpuUsage,uptime,availableMemory,
releaseandconfig, and anavigatorglobal outside pages. A child
process's output streams giveBuffers untilsetEncodingis called. - More of Electron: the `protoc...