Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@nodegui/svelte-nodegui

nodegui97MIT0.1.2TypeScript support: included

Svelte integration for NodeGUI

nodegui, svelte

readme

Svelte NodeGUI

Join the NodeGUI community on Spectrum Join the Svelte community on Discord All Contributors JS Party #96

Build and Test status

Build performant, native and cross-platform desktop applications with Node.js and Svelte.🚀

Svelte NodeGUI is powered by Svelte and Qt5 💚 which makes it CPU- and memory-efficient when compared to Chromium-based solutions like Electron. Svelte NodeGUI is essentially a Svelte renderer for NodeGUI.

If you are looking for the React-based version, check out: React NodeGUI.

If you are looking for the Vue-based version, check out: Vue NodeGUI.

Visit: https://svelte.nodegui.org for docs.

logo

How does it look?

demo_linux demo_win demo_mac
kitchendemo_macdemo_win

More screenshots?

More Examples:

https://github.com/nodegui/examples


Features

  • 🧬 Cross platform. Should work on major Linux flavours, Windows and macOS.
  • 📉 Low CPU and memory footprint. Current CPU stays at 0% on idle and memory usage is under 20 MB for a Hello World program.
  • 💅 Styling with CSS (includes actual cascading). Also has full support for Flexbox layout (thanks to Yoga).
  • ✅ Complete Node.js api support (Currently runs on Node v12.x - and is easily upgradable). Hence has access to all Node.js-compatible npm modules.
  • 🎪 Native widget event listener support. Supports all events available from Qt / NodeJs.
  • 💸 Can be used for Commercial applications.
  • 🕵️‍♂️ Good Devtools support.
  • 📚 Good documentation and website.
  • 🧙‍♂️ Good documentation for contributors.
  • 🦹🏻‍♀️ Good support for dark mode (Thanks to Qt).
  • 🏅 First class TypeScript support. (Works on regular JS projects too 😉).

Getting Started

Docs for contributing

Svelte NodeGUI

File issues and get in touch (e.g. on the Svelte Discord's #nativedev channel), and we can guide you to something broken that needs fixing!

NodeGUI

Looking to contribute to NodeGUI? If you wish to implement a new widget/add more features and need help understanding the codebase, you can start here: Contributing developer docs.

Please read https://github.com/nodegui/.github/blob/master/CONTRIBUTING.md

Building

npm run build

Optionally set QT_INSTALL_DIR='/path/to/qt' environment variable to build using your own version of Qt.

Updating docs

Generating docs from source code

The docs generation process is currently a manual operation (text edit everything yourself). The docs are a copy-paste of the React NodeGUI docs, with some text replacement. We're also carrying around a slight fork of the React NodeGUI source in the codebase. In future we hope to clean up this workflow and make it more automatable using typedoc just like the original React NodeGUI workflow.

Deploying docs to GitHub Pages

cd website && GIT_USER=<your_git_username> npm run deploy

Funding

As no funding infrastructure is in place for Svelte NodeGUI specifically, please consider supporting NodeGUI instead, which would be just as productive!

Special Thanks

Code of Conduct

https://github.com/nodegui/.github/blob/master/CODE_OF_CONDUCT.md

License

MIT

Maintainers ✨

People maintaining this project.

Jamie Birch
Jamie Birch

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Jamie Birch

💻

Saurav Sahu

💻

Matthieu PERREIRA DA SILVA

💻

Jonas Grunert

💻

LukeyBeachBoy

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[0.9.4]

  • Only include children that set the same property on parent when calculating index.

[0.9.3]

  • Fix regression in attribute setter logic

[0.9.2]

  • Test harness is working again
  • Fixed regression for tabstrip item removal
  • Resolved more property names

[0.9.1]

  • Nativescript 7 support
  • Resolve [Object object] in listview when using itemTemplateSelector

[0.8.5]

  • Resolve Formatted string reactivity #166
  • Prevent resolving of log messages when trace is not enabled

[0.8.4]

  • Remove calls to deprecated "topmost()"

[0.8.3]

  • Fix animations by overwriting NativeScripts slightly non-compliant requestAnimationFrame
  • Fix slide animation

[0.8.2]

  • Fix event bubbling with less monkey patching.

[0.8.1]

  • Fix event bubbling #124

[0.8.0]

  • Fix bug in segmented bar (re)creation closes #118 and #119
  • Correctly handle multiple child text nodes
  • Added ability to override nativescript tags with your own. Closes #105
  • Swap to @nativescript/core from tns-core-modules. Closes #103
  • Internal logger now skips evaluation of template strings when logging is disabled
  • Upgrade to nativescript 6.4
  • Upgrade to svelte 3.19.*

[0.7.3]

  • provide timestamp to requestAnimationFrame shim,fixes transition problems with svelte 3.16+

[0.7.2]

  • use most recent patch of svelte and tns-core-modules instead of most recent minor, this should help prevent breakages by upstream dependencies
  • Require svelte 3.16.*
  • Detect nativescripts own requestAnimationFrame polyfill and don't try to overwrite

[0.7.1]

  • Fix Tabs component rendering on iOS
  • Fix Tabs component on start page crashes app on iOS

[0.7.0]

  • Support for Nativescript 6.2
  • Clear history when frame direct child change causes a navigation, closes #96

[0.6.1]

[0.6.0]

Breaking Changes

  • Renamed NativeElementNode to NativeViewElementNode and added a parent class NativeElementNode which handles nativescript entities not derived from View
  • Removed "meta" legacy onInsert and Remove hook container

Added

  • support for prop: directive to set the value of the containing node to the nativeView of the current node e.g <gridLayout prop:mainContent> for sideDrawer
  • Added a parameter to NativeElementNode that configures the prop: behaviour and defines the correct casing of any property
  • Added a parameter setsParentProp to NativeElementNode that specifies a property on the perent node to set to constructed element when inserted.
  • Added registerNativeViewElement and registerNativeConfigElement exports. These help change:
    registerElement('myTag', () => new NativeViewElementNode('myTag', require('some-tns-plugin/mytag').MyTag))
    into
    registerNativeViewElement('myTag', () => require('some-tns-plugin/mytag').MyTag )
  • Added svelteNativeNoFrame which allows you to launch your app without an implicit root frame. Great for when you are using RadSidebar

Changes

  • Refactored property name normalization to cache based on object prototype so we aren't walking all defined properties every time we get or set.
  • Use the new 'scoped styles' boolean parameter when calling addCss if we don't detect any :global() styles. This should improve perf.

[0.5.3]

  • Add support for itemTemplateSelector closes #86

[0.5.2]

  • Fix frame not found by Id #82

[0.5.1]

  • Fix animations when using latest svelte

[0.5.0]

  • Updated to NativeScript 6.1
  • Support Tabs, TabStrip, and Bottom Navigation components

[0.4.3]

  • Support sveltes new dev document.dispatch calls
  • Update to svelte 3.12.1

[0.4.2]

[0.4.1]

[0.4.0] -

  • Built against latest svelte 3.6.7 and Nativescript 6.0

[0.3.4] - 2019-06-15

  • ListItem template components are now created with intro: true

[0.3.3] - 2019-05-22

Fixed

  • mounting with anchor uses correct index during insert (fixes #30)

[0.3.2] - 2019-05-16

Fixed

  • class: directives now work with falsy values

Changed

  • Bumped Nativescript to 5.4
  • Bumped Svelte to 3.4
  • Updated unit tests to use bundled svelte components instead of compiling as part of test.

[0.3.1] - 2019-04-30

Added

  • Removed console log spam and added to a NativeScript trace category exported as DomTraceCategory

[0.3.0] - 2019-04-23

Added

  • Introduced a Changelog

Changed

  • Bumped versions to use freshly released Svelte 3.0.0