Olivier Goffart
359f42c5f7
Prepare the compiler to be async
...
This will allow the online editor to load imports from URL asynchroniously later
Since currently the compiler is only working on a single thread, and that we
never await on a future that could block, it is allowed to use the spin_on executor
2020-10-30 15:00:04 +01:00
Olivier Goffart
263df7dc63
Remove the www from all sixtyfps.io URL
2020-10-29 11:06:06 +01:00
Olivier Goffart
70d6648880
Remove some remains of code that allowed to use Component as Object
2020-10-27 16:25:21 +01:00
Olivier Goffart
333c96fd79
Change Type::Object to be able to hold a name
...
Internally, structure will be represented with a Type::Object with a name
instead of a Component with a void base type
2020-10-27 16:09:05 +01:00
Olivier Goffart
211fa69ef5
Fix line ending
2020-10-26 14:19:12 +01:00
Olivier Goffart
27a6ff1227
Move Type and related concepts in a different module
...
Leaving only the TypeRegister in the typeregister module
2020-10-23 11:17:14 +02:00
Simon Hausmann
9d146b2b5f
Add npm badge also to the node README
2020-10-22 13:30:50 +02:00
Simon Hausmann
008455a106
Include a license file in the node source package
2020-10-22 13:14:56 +02:00
Olivier Goffart
b5b5a24941
Change the verison of sixtyfps-node
...
Even if it is not published on crates.io, it should have a version that matches
sixtyfps version
2020-10-22 09:35:35 +02:00
Olivier Goffart
20cfb65e53
Bump version
2020-10-22 08:41:45 +02:00
Simon Hausmann
68e35ab332
Fix removing todo items in node
...
After removal the index is wrong and I mistakely thought entries() adjuts.
2020-10-21 14:18:33 +02:00
Simon Hausmann
c59b1e61ac
Fix a bug in sixtyfps.ArrayModel.remove
...
Report the correct index/size to the runtime.
Also added convenience entries()/values() functions that forward to the array.
2020-10-21 13:48:13 +02:00
Olivier Goffart
ac6d4007ab
Node: Add setHandler features on signals
2020-10-21 12:22:22 +02:00
Simon Hausmann
e7d8455c49
Some more array model docs
2020-10-21 11:26:18 +02:00
Simon Hausmann
27972145a7
Add some documentation to the Model and ModelPeer
...
Also in this change:
* Make ArrayModel<T> implement Model<T>.
* Switch from jsdoc/better-docs to typedoc, which has much better
support for type annotations.
2020-10-21 11:14:24 +02:00
Simon Hausmann
0c8fcb5f7a
Some edits to the type mappings section of the node docs
...
Also use a consistent section title throughout.
2020-10-21 09:44:21 +02:00
Simon Hausmann
f6d8f78e3f
Hide the private API of the NodeJS integration
...
Hide it behind a `private_api` property in the module export.
2020-10-20 16:52:28 +02:00
Simon Hausmann
ce7d0c98e0
Use a base class for components in the Node API
...
In the event that a property is called "show" this theoretically still allows calling the show function through the
prototype chain.
2020-10-20 16:46:38 +02:00
Simon Hausmann
7905285562
Change the Model API for the NodeJS Integration to use CamelCase
2020-10-20 16:40:49 +02:00
Simon Hausmann
890c4450e0
Some updates to the Node README
...
* Bring the start in line with the C++ README
* Add an Install section (brief)
* Turn the "tutorial" into a "Using" section with "hello world"
2020-10-20 16:18:45 +02:00
Simon Hausmann
279ce560f9
Convert NodeJS API to use & export TypeScript
...
This will make the types available to API consumers and makes the
documentation clearer.
2020-10-20 15:57:50 +02:00
Simon Hausmann
c0ffb96166
Minor cleanup in the better-docs template
...
Provide a link to the Github page in the navigation bar and hide the generator footer.
2020-10-20 11:46:48 +02:00
Simon Hausmann
29a9466e73
Don't include sources in the JS docs
...
It shouldn't be needed
2020-10-20 11:42:42 +02:00
Simon Hausmann
b6466eaa9e
Expose the array model as an ecmascript class
...
This allows documenting it easily with JSDoc
2020-10-20 11:03:03 +02:00
Simon Hausmann
1fe2850461
Boilerlate for what could be API docs for node
2020-10-20 08:38:33 +02:00
Simon Hausmann
3b051f2176
Clarify hexadecimal color encoding
...
We parse hex colors as per CSS, including the #RRGGBBAA variant, as per
https://www.w3.org/TR/css-color-4/#hex-notation . This is now documented
and the JS conversion also generates that instead of #AARRGGBB.
2020-10-19 16:38:58 +02:00
Olivier Goffart
f6edfb5e8e
Some documentation
2020-10-17 16:46:45 +02:00
Olivier Goffart
14198052ac
ArrayModel support in JS
2020-10-17 13:33:22 +02:00
Simon Hausmann
071ab9fda1
Prepare for use of percentages as widths in layouts
...
Delay the conversion of percentage to the float to code generation type
by inserting the multiplication into the syntax tree. That way we will
be able to detect plain uses of percetages and interpret them
differently.
2020-10-16 15:38:35 +02:00
Olivier Goffart
cdc6a34eaf
Support for array in JS
2020-10-16 12:58:27 +02:00
Olivier Goffart
3ea524694e
Support for color in JS (as string)
2020-10-16 12:58:27 +02:00
Olivier Goffart
67dddd69e7
JS: implement conversion to Type::Object
2020-10-16 12:58:27 +02:00
Olivier Goffart
d57ad389e0
Default to the native style in the viewer if it is available
2020-10-14 14:51:47 +02:00
Olivier Goffart
1138c9dbed
Normalize the spelling of SixtyFPS
2020-10-13 07:48:55 +02:00
Simon Hausmann
8cf6cdb033
Fix build
...
Neon 0.4.2 was yanked from crates.io, so upgrade to a newer version
2020-10-12 16:46:21 +02:00
Olivier Goffart
59268c5231
Use neon from crates.io
2020-10-08 07:37:30 +02:00
Simon Hausmann
6190d197dd
Fix formatting
2020-09-30 15:26:24 +02:00
Simon Hausmann
9ad8968529
Add support for the initial_focus synthetic property
...
Setting it will translate to a set_focus_item call in the constructor.
This implements parts of #55
2020-09-30 15:11:01 +02:00
Simon Hausmann
e5dfb3a4c0
Implement basic focus handling
...
Similar to the mouse_grabber, we use a VisitChildrenResult field to
track the focus item within a component. Unlike the mouse grabber
however, it is set/cleared using dedicated focus events.
The key event now routes the key event directly to the focus item.
The focus can be requested via set_focus_item on a window, which the
TextItem does.
2020-09-25 10:43:47 +02:00
Simon Hausmann
7053aee0c8
Pass the ComponentWindow to ItemVTable::input_event
2020-09-18 16:18:48 +02:00
Olivier Goffart
8134fe5088
Support for named type as property
2020-09-17 13:14:01 +02:00
Simon Hausmann
26ae1bfdb2
Add From<String> and Into<String> for SharedString
2020-09-14 08:49:41 +02:00
Olivier Goffart
42aa91e3eb
Support for signal with arguments in the interpreter
2020-09-09 11:27:58 +02:00
Simon Hausmann
6f8018127a
Fix standalone node api build
...
Right now the code calls print() on the diagnostics, so we do need the display-diagnostics feature of the compiler lib.
2020-09-07 20:40:06 +02:00
Olivier Goffart
9f026c820d
Parse declaration of signal with arguments
2020-09-07 17:41:24 +02:00
Olivier Goffart
ae90a59513
Attempt to fix the window build by bringing a git version of neon
2020-09-05 17:26:09 +02:00
Simon Hausmann
ff9c118e07
Propagate warnings to the end of the compilation step and print them
2020-09-04 20:34:20 +02:00
Olivier Goffart
f1ad78bc25
Qt style support for the rust backend
...
Need to set the SIXTYFPS_STYLE=native env variable while compiling
2020-09-01 12:25:11 +02:00
Simon Hausmann
1b7d25efab
Provide a convenient way to get to the "website" via the docs
...
These markdown files are also included in other locations (Rust or C++), so
a way to get back to a future website is helpful.
2020-08-26 14:46:06 +02:00
Olivier Goffart
58cdaeb8dd
Update license header to mention that commertial option are available
2020-08-26 13:23:42 +02:00