Simon Hausmann
4f4d2b10e9
Add missing license tag
2020-10-20 18:18:24 +02:00
Simon Hausmann
e0e7aa1a91
Small typo fix
...
Missing letter :)
2020-10-20 18:11:01 +02:00
Simon Hausmann
8f73259cf6
Minor edit
...
Avoid "easy" as that may be perceived as patronizing.
2020-10-20 18:10:23 +02:00
Olivier Goffart
0c253efb0d
Some changes in the rust documentation and its README
2020-10-20 18:02:28 +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
Olivier Goffart
65ec7e9b7d
Fix panic on parse error
...
Properly report the errors instead.
The later passes panic if the AST is not well formed
2020-10-19 19:43:13 +02:00
Olivier Goffart
1de39e5769
String concatenation
2020-10-19 18:37:15 +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
e4e601de83
Draw the frame properly around the native scrollview
2020-10-16 10:45:17 +02:00
Simon Hausmann
6aa292eac1
Change the names of the logical and physical pixel units
...
The logical pixels are now just called "px" and the less frequently
used physical pixels have the "phx" suffix.
The existing markup was adapted using the syntax updater and the
following patch:
+ if node.kind() == SyntaxKind::NumberLiteral {
+ if node.text().ends_with("lx") {
+ return write!(
+ file,
+ "{}px",
+ node.text().as_str().split_at(node.text().as_str().len() - 2).0
+ );
+ }
+ if node.text().ends_with("px") {
+ return write!(
+ file,
+ "{}phx",
+ node.text().as_str().split_at(node.text().as_str().len() - 2).0
+ );
+ }
+ }
Fixes #49
2020-10-16 07:19:40 +02:00
Simon Hausmann
8835e25ccd
Advocate the CMake FetchContent approach for the C++ Integration
...
This may be slightly easier to use than the separate build & install sequence.
2020-10-15 16:00:49 +02:00
Simon Hausmann
a59b710c05
Fix wasm interpreter build
2020-10-14 16:02:41 +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
Simon Hausmann
603abeabed
Fix up links to markdown files from within other markdown files in the Rust docs
...
Our language reference .md file contains a refernce to
builtin_elements.md. Since rustdoc doesn't further process the embedded
markdown file, the .md link remains as-is and is broken. But we can fix
it up using a small snippet of JavaScript.
Fixes #87
2020-10-14 10:27:50 +02:00
Simon Hausmann
48602c3b5c
Fix MSVC warning about #pragma GCC
...
Only use the pragma with GCC and Clang
2020-10-13 23:00:12 +02:00
Simon Hausmann
dd55f5205d
Replace wildcard version with the released one for now
2020-10-13 15:10:24 +02:00
Olivier Goffart
8f206aa664
Fix typo in README
2020-10-13 14:10:01 +02:00
Olivier Goffart
c4deac88c5
Add links to crates.io
2020-10-13 11:51:00 +02:00
Olivier Goffart
a650f29abe
Rename sixtyfps-rs-macro to sixtyfps-macros
2020-10-13 11:10:26 +02:00
Olivier Goffart
ba80d6f515
Do not inject the sixtyfps-docs-integration.html for docs.rs just yet
2020-10-13 10:40:43 +02:00
Olivier Goffart
6075860c9e
Documentation about how to generate the doc
2020-10-13 09:54:35 +02:00
Simon Hausmann
9c23d9b571
Alternate fix for image loading in docs preview
...
Revert commit 9f488bba3b
for now and
instead resort to an absolute url to the image. This way we
don't have to use the wrong base url.
2020-10-13 09:44:25 +02:00
Simon Hausmann
9f488bba3b
Try to get the image loading work in the embedded doc preview
...
By specifying the CORS-friendly github raw url as base url for the interpreter,
we can load images using relative paths.
According to the inspector the image is loaded successfully,
so what seems to be left to fix is an event loop related issue.
2020-10-13 09:31:42 +02:00
Olivier Goffart
dbdc8483e2
Disable the check for the SIXTYFPS_STYLE env variable on wasm
2020-10-13 09:30:18 +02:00
Olivier Goffart
1138c9dbed
Normalize the spelling of SixtyFPS
2020-10-13 07:48:55 +02:00
Simon Hausmann
a37d42fa0e
Add an init function to the Item vtable
...
This will be called by the run-time and will allow items to set up
bindings that rely on internals that should not be exposed to the
compiler/runtime.
2020-10-12 16:49:44 +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
7eff181e6f
sixtyfps_build: add a compile_with_config function
2020-10-12 12:35:03 +02:00
Olivier Goffart
84f0fb7b07
Display a warning when no style is selected
2020-10-12 11:50:39 +02:00
Olivier Goffart
7bd77f698f
cmake: use the newly introduced CRATES option from corrosion
2020-10-12 06:57:03 +02:00
Olivier Goffart
9a909142a8
Disable wayland dependency by default
2020-10-10 16:10:22 +02:00
Olivier Goffart
9d106c6830
Some changes in the README
2020-10-09 13:49:39 +02:00
Simon Hausmann
67f387e628
Prepare for relative resource loading from the web
...
Pass the base url as path to the interpreter
2020-10-08 20:42:46 +02:00
Olivier Goffart
d8f7139f48
Fix Native StandardListView with C++
2020-10-08 17:18:22 +02:00
Olivier Goffart
4169254169
StandardListView in rust
2020-10-08 16:22:16 +02:00
Olivier Goffart
4bdf447b11
C++ build documentation and README
2020-10-08 12:25:12 +02:00