Client Library
Unreleased
v6.4.0
API: storage
- Export
storage.clear()andstorage.removeData(key)functions.
TypeScript
- Add missing properties to the
WindowMenuinterface.
v6.3.0
TypeScript
- Fix several type definition issues by updating the Rollup build script and Rollup TypeScript plugin.
v6.2.0
API: draggable region API
The new draggable region API implementation uses native, platform-specific window dragging event via the window.beginDrag() function, so now draggable regions behave the same as native window dragging with features such as window snapping, unlike the previous draggable region implementation.
The new draggable region API lets developers exclude specific elements (i.e., window control buttons) from the registered draggable region DOM element:
const d = await setDraggableRegion('title-bar', {
exclude: ['close-btn'],
})
// Exclude elements using DOM references or IDs
d.exclusions.add('help-btn')
d.exclusions.add(document.getElementById('info-btn'))
d.exclusions.add('tag1', 'tag2')
// Remove excluded elements
d.exclusions.remove('help-btn')
d.exclusions.remove(document.getElementById('info-btn'))
d.exclusions.remove('tag1', 'tag2')
// Remove all exclusions
d.exclusions.removeAll()
API: window
- Export the
Neutralino.window.print()function. - Export the
window.beginDrag()function.
API: filesystem
- Export
filesystem.getJoinedPath(...paths),filesystem.getNormalizedPath(path), andfilesystem.getUnnormalizedPath(path)functions.
v6.1.0
API: window
- Export the
window.setMainMenufunction.
v6.0.0
API: filesystem
- Export
filesystem.getPermissions(path)andfilesystem.setPermissions(path, permissions, mode)functions.
API: os
- Support sending environment variables via
os.execCommand()andos.spawnProcess()functions.
API: clipboard
- Export
clipboard.readHTML()andclipboard.writeHTML(html)functions.
Bugfixes/improvements
- Fixing a circular dependency issue in the codebase.
- Several TypeScript-related development fixes.
v5.6.0
API: server
- Export
server.mount(),server.unmount(), andserver.getMounts()functions.
API: resources
- Export
resources.getStats()andresources.extractDirectory()functions.
API: window
- Export
window.snapshot()function.
API: clipboard
- Add the
formatparameter to theclipboard.readImage()function format pixel data. Accepted formats:rgb,rgba,argb, andbgra.
Bugfixes/improvements
- Fix the slow loading issue on Windows by using
127.0.0.1instead oflocalhost.
v5.5.0
Core: initialization
- Support client library source injection
TypeScript
- Fix some missing type details.
v5.4.0
API: resources
- Export
getFiles(),extractFile(path, dest),readFile(path), andreadBinaryFile(path)functions.
API: window
- Export
minimize(),unminimize(), andisMinimized()functions. - Add
alwaysCaptureanddragMinDistanceoptions to thewindow.setDraggableRegion()function and improve the performance of the overall draggable window implementation.
Bugfixes/improvements
- Fix several issues with TypeScript exports and definitions.
v5.3.0
API: filesystem
- Expose
filesystem.getAbsolutePath(path),filesystem.getRelativePath(path, ?base), andfilesystem.getPathParts(path)functions.
v5.2.0
API: filesystem
- Accept
overwrite,skip, andrecursiveoptions for thefilesystem.copy()function.
Bugfixes/improvements
- Improve the
window.create()function's option-to-CLI argument mapping logic.
v5.1.1
NPM
- Fix the NPM package import issue.
v5.1.0
API: clipboard
- Export new framework functions:
clipboard.getFormat(),clipboard.readImage(), andclipboard.writeImage(image).
TypeScript
- Separate type definitions into a new directory to improve project structure.
- Add missing type definitions.
v5.0.1
TypeScript
- Fix type declaration issues with the
windowglobal object. Now,window.NL_VERSION, etc. won't display errors on code editors or with the TypeScript compiler.
v5.0.0
API: app
- Expose
app.readProcessInput(readAll=false),app.writeProcessOutput(), andapp.writeProcessError()functions.
API: filesystem
- Export/deprecate functions based on framework's v5 release. See framework changelog for more details.
v3.13.0
API: window
- Add
extendUserAgentWithandexitProcessOnCloseoptions towindow.createTypeScript definition.
v3.12.0
Improvements/bugfixes
- Improved the performance of the draggable regions API by throttling Neutralino framework function calls.
- Fix the restarting issue that happens when the app path contains spaces.
v3.11.0
API: window
- Avoid saving the window state for child windows in the
window.createfunction by using the--window-use-saved-state=falseinternal CLI argument.
v3.10.0
API: window
- Export the
window.centerfunction.
v3.9.0
API: file watchers
- Export
filesystem.createWatcherandfilesystem.removeWatcherfunctions.
DevOps
- Publish to NPM only if there are unreleased changes in changelog.
v3.8.2
NPM/ESM support
- Add ESM support for the client library via
neutralino.mjs. - Publish (and automate) the client library as an NPM package,
@neutralinojs/lib.
v3.8.0
API: custom methods and file streams
- Expose functions in framework's custom methods and file streams implementations.
v3.7.0
API: os, filesystem, storage, and computer
- Expose new framework functions:
os.getEnvs,storage.getKeys, andcomputer.getMousePosition. - Add
sizeandposoptions tofilesystem.readFileandfilesystem.readBinaryFilefunctions.
v3.6.0
API: System information API
- Expose the new system information API functions:
computer.getArch,computer.getKernelInfo,computer.getOSInfo,computer.getCPUInfo, andcomputer.getDisplays.
API: os
- Add the
defaultPathoption to set the default file path for all file dialogs.
v3.5.0
API: filesystem
- Expose
createdAtandmodifiedAtJavaScript timestamps with thefilesystem.getStatsfunction.
API: os
- Add new functions for spawning processes.
spawnProcess,getSpawnedProcesses, andupdateSpawnedProcess.
v3.4.0
DevOps
- Add nightly builds support. Developers can download the nightly builds by setting
cli.clientVersiontonightly.
Core: global variables
- Add
NL_CCOMMITto hold the release commit of the client library.
v3.3.0
API: window
- Add
window.getPositionto get the current window coordinates.
API: filesystem
- Add
filesystem.appendFileto append text content to a file. Thrown errors are similar to thefilesystem.writeFilefunction. - Add
filesystem.appendBinaryFileto append binary content to a file. Thrown errors are similar to thefilesystem.writeBinaryFilefunction.
v3.2.0
API: init
- Store
NL_TOKENin sessionStorage and handle native API calls after page reload. - Show a message to the user via HTML if
NL_TOKENis not valid (Eg: when the user tries to open the app from another client withone-timetoken).
API: window
- Add
window.setAlwaysOnTop(bool). - Add
window.getSize.
v3.1.0
API: clipboard
clipboard.readTextandclipboard.writeTextfunctions added.
v3.0.0
Core: Extensions
- Extension API functions. Queue messages dispatched to extensions and send when the extension is ready.
Core: Init
- Reload app based on
--neu-dev-auto-reload(--debug-moderemoved) with theneuDev_reloadAppevent.
API: window.create
- Return process information with the promise.
API: window.setDraggableRegion
- Allow passing DOM element as the param.
API: window.unsetDraggableRegion
- Newly introduced method to remove draggable region handlers from an element.
API: Updater
- Updater API functions.
Improvements
- Make return values of
eventsnamespace functions consistent. - Rename
res.neutoresources.neu.
Core: Ping on browsers
- Polling action to the server was removed and replaced by the server process's internal idle check.
app.keepAlivewas removed.
Events
- Client-side implementaion of
extensionReady. - Allow developers to call native APIs without depending on the
readyevent (it's not removed becuase of the internal usage).