J-P Nurmi
c5248c005e
Allow specifying paths for @library
imports
2023-10-20 16:47:00 +02:00
Tobias Hunger
df544fe1c9
interpreter: Introduce internal
feature
...
... and use it to hide internal functionality so users will notice that
they depend on fucntionality we do not provide any guarantees for.
Make the lsp and viewer request the internal feature when building the
interpreter.
2023-10-20 15:34:49 +02:00
Tobias Hunger
d6ec7f23a1
Change component factory API
...
... to avoid winit panicing on us when embedding some item tree.
2023-10-20 15:34:49 +02:00
Olivier Goffart
3ab98a7596
LSP: harmonize spaces when auto-completing element name
...
Fixes #3714
2023-10-20 14:35:59 +02:00
Tobias Hunger
23a9f5aeb8
LSP: Fix race condition
...
In rare cases I was getting a response before the request that the LSP
sent out way registered in the event queue. Insert the request earlier.
2023-10-19 20:55:09 +02:00
Olivier Goffart
f4dd08783c
janitor: C++: make the code more readable by having the type explicit
2023-10-19 18:09:14 +02:00
Olivier Goffart
172dcfa775
C++: fix crash when accessing empty model from Slint
...
Fixes #3704
2023-10-19 18:09:14 +02:00
Simon Hausmann
403bb6c716
napi: Catch typescript errors in the CI and in debug builds ( #3703 )
...
We use esbuild to transform index.ts into index.js, but we also need to
perform a type check. esbuild doesn't do that, this is left to the
typescript compiler. So let's run it with -noEmit as recommended by the
esbuild folks, in debug builds as well as in the CI (which doesn't do
debug builds).
2023-10-19 18:05:32 +02:00
Guilhem Vallat
75b3a3e07b
Implement Model:as_any() for all adapter models
2023-10-19 17:19:40 +02:00
Guilhem Vallat
dc43c6f620
Add source_model() to FilterModel, SortModel, ReverseModel and MapModel
...
As a mean of getting the inner model, useful to be able to push into the
underlying model.
2023-10-19 17:19:40 +02:00
Tobias Hunger
6cd68e84a7
interpreter: Fix highlighting
...
Clean the highlight pass so that it is in the same form as the paths
stored in the interpreter. Otherwise they do not match and highlighting
will fail.
2023-10-19 15:01:46 +02:00
Tobias Hunger
f12b3d2df4
vscode: Create highlight function again and pass it to the LSP
...
This stops a panic then triggering a highlight to happen.
2023-10-19 15:01:46 +02:00
Tobias Hunger
f6f369251b
Revert "vscode: Use ESM modules"
...
Using ESM modules causes issues with the web extension: It complains
about use of "ImportScript" in a module. Something adds that into the
module, I need to properly investigate what and why. Let's revert this
till then.
This reverts commit cb66bc1650
.
2023-10-19 15:01:46 +02:00
Tobias Hunger
c1456e5153
component_container: Add background rectangle
2023-10-19 13:22:39 +02:00
Florian Blasius
f4eb46465b
napi documentation ( #3689 )
...
* napi documentation
* Add missing documentation
* Generate documentation with typedoc
* Update api/napi/cover.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/cover.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/cover.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/cover.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/index.ts
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/cover.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/cover.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/cover.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/cover.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/cover.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/src/types/size.rs
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/cover.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/index.ts
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/index.ts
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/src/types/size.rs
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* code review feedback.
* Update api/napi/cover.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/cover.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/cover.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/cover.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Code review feedback.
* Update api/napi/index.ts
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* code review feedback.
* Update api/napi/cover.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/cover.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/cover.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/cover.md
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Code review feedback.
* napi: added slint example to callback
* napi: added example to instantiating a component
* Update api/napi/src/interpreter/diagnostic.rs
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/src/interpreter/diagnostic.rs
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/src/interpreter/diagnostic.rs
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/src/interpreter/diagnostic.rs
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/src/interpreter/diagnostic.rs
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/src/types/brush.rs
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* Update api/napi/src/types/image_data.rs
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
* napi: more code review stuff
---------
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
2023-10-19 11:53:00 +02:00
Update Translations Bot
1caa23547a
Update Translations: extract strings
2023-10-19 03:04:11 +00:00
J-P Nurmi
8ea3153e87
SW: fix eliding of multiline text ( #3612 )
...
SW: fix eliding and vertical alignment of multiline text
2023-10-18 10:15:55 +02:00
Florian Blasius
3e3dd03566
Added focus-changed-event callback to FocusScope ( #3650 )
2023-10-17 17:30:19 +02:00
Olivier Goffart
807f19484b
Fix has-hover in Flickable with scroll wheel
...
The code that was making sure has-hover is kept in sync was no longer working
because of the introduction of the scroll-event.
Sadly, the flickable3.slint test didn't catch that because of another
bug.
Fixes #3666
2023-10-17 14:11:13 +02:00
Olivier Goffart
02e9bd96f2
Remove dead code
...
This was no longer used
2023-10-17 14:11:13 +02:00
Simon Hausmann
b34e365701
doc: Add missing space as word separator
2023-10-17 13:32:32 +02:00
Simon Hausmann
e0d1d4366d
doc: In the type mapping, refer to the angle as "angle", not as "value"
2023-10-17 13:26:04 +02:00
Tobias Hunger
962d70a357
core: Fix two-way-bindings of two-way-bindings
...
Fix binding a two-way bound property to another property: The value of
the first bproperty was used here, while it is documented to use the
value of the second.
Add test cases for two-way bindings in first, second an in both places
when creating another two-way binding to make sure everything works and
stays that way :-)
2023-10-17 13:00:52 +02:00
Olivier Goffart
5513e470d5
Fix LSP not quiting when it shows a preview
...
The "LanguageServer" thread (New name also given in that commit) is
blocked while waiting for the io threads because the preview keeps a
ServerNotifier in its content cache.
We first need to tell the preview to quit before waiting on these
threads.
2023-10-17 11:09:53 +02:00
Tobias Hunger
cb66bc1650
vscode: Use ESM modules
...
A vscode extension must use CJS, but that code may use ESM modules in
turn.
So update to ESM, fixing a warning when importing our WASM code.
2023-10-17 10:28:30 +02:00
Simon Hausmann
d9672c5a21
linuxkms: Initialize xkb lazily
...
This has two benefits:
- It improves start-up time for device that are touch-only because
the xkb parsing is delayed until a keyboard is attached and key is
pressed
- It fixes #3678 by working around the situation where xkb would
crash if the xkbcommon data files (in /usr/share/X11/xkb) aren't
there. Sadly, no error is reported in that case (that we could
handle), instead just crashes.
2023-10-16 19:03:10 +02:00
Olivier Goffart
166f19aeff
Fix compiler panic when trying to resolve aliases in invalid import
...
Fixes #3674
2023-10-16 16:37:49 +02:00
Tobias Hunger
4a077e19b2
VSCode: Fix refactoring code
...
The refatoring code (wrap in eleemnt/remove element) needs some setup to
happen before the client is started. Add a little helper function and
call it.
2023-10-16 14:13:19 +02:00
Tobias Hunger
caee0b2f9d
janitor: Fix a semi-random selection of clippy warnings
...
Nothing serious in there.
2023-10-16 13:44:37 +02:00
Tobias Hunger
88170937e9
janitor: Fix clippy error
...
That's the only one this time round.
2023-10-16 13:44:37 +02:00
Florian Blasius
030cf2cd19
Update scroll offset on ScrollView on ScrollBar scroll-event ( #3668 )
2023-10-16 10:41:39 +02:00
Tobias Hunger
b12575a4c4
janitor: Go over our spell checking setup
...
* Extend the cspell word list
* Remove those extensions from individual source files
* white-list licenses and such as we should not meddle with those
* Fix spelling
2023-10-16 09:01:51 +02:00
Olivier Goffart
ef39adce30
Prospective fix for nightly build: increase minimum supported vscode version
...
We use `@types/vscode": "1.82.0"` meaning we need vscode 1.82 minimum
2023-10-14 13:18:58 +02:00
J-P Nurmi
c4864d62ff
SW: stop breaking lines after reaching the max (elided) lines
2023-10-13 22:14:58 +02:00
Simon Hausmann
7c73aee21f
Run embedded build ci job nightly
2023-10-13 21:38:51 +02:00
Tobias Hunger
a562c534ad
vscode: Mirror the code in slintpad for the LSP worker more closely
...
The code is not identical, so it can not be shared (yet), but at least
minimize the diff.
2023-10-13 18:44:02 +02:00
Tobias Hunger
8311533cb1
vscode: Update dependencies
...
Adapt to new APIs and move more code into common.ts so that it is shared
between the web and the "native" extension.
2023-10-13 18:44:02 +02:00
Olivier Goffart
c0a12d05d5
interpreter: fix default style selection
...
The interpreter knows whether we have Qt or not, but its logic was not
adapted to the recent change of default.
2023-10-13 18:42:34 +02:00
Simon Hausmann
7c1f90d2e9
Fix embedded ci build
...
Don't build uefi demo
2023-10-13 16:48:21 +02:00
Simon Hausmann
17e4ad6631
Prospective fix for cross builds
...
Don't build linuxkms yet, as the dependencies are not installed yet.
2023-10-13 15:35:20 +02:00
Simon Hausmann
0d35e01724
Revert "linuxkms: Update drm and gbm dependencies"
...
This reverts commit 17afe1aa8a
.
This causes
thread '<unnamed>' panicked at 'assertion failed: (has_modifier && modifier.is_some()) || (!has_modifier && modifier.is_none())', drm-0.10.0/src/control/mod.rs:324:9
when running on qemu-virgl.
2023-10-13 15:21:15 +02:00
Tobias Hunger
136ded634a
slintpad: Remove now unused service_worker code
2023-10-13 13:59:14 +02:00
J-P Nurmi
49c8d94f92
Janitor: add itertools as a workspace dependency
2023-10-13 13:40:27 +02:00
Simon Hausmann
31ddd7a58d
Exclude the ffmpeg example from the embedded demos
...
The build breaks because the containers need additional dependencies, but
the example isn't really suitable for embedded anyway.
2023-10-13 13:39:08 +02:00
Florian Blasius
e83f3c8068
Added SpinBoxBase, use scroll-event to change value. ( #3665 )
2023-10-13 13:37:20 +02:00
Simon Hausmann
b0483a2aea
Fix creation of C++ docker image
...
Don't get stuck at a debconf prompt
2023-10-13 10:38:03 +02:00
Simon Hausmann
39ebfa8b78
ci: add slint-napi to the excluded packages for the cross build
2023-10-13 09:22:27 +02:00
Simon Hausmann
17afe1aa8a
linuxkms: Update drm and gbm dependencies
2023-10-13 08:54:59 +02:00
Tobias Hunger
283ef4b461
compiler: Implement resource URL remapping
...
This is used in slintpad to map relative image URLs to their real
download locations.
This has the side-effect of removing the service worker.
Fixes : #2905
2023-10-12 21:41:26 +02:00
Tobias Hunger
20908dacb8
compiler: Fix image resolution for WASM
...
Resolve an image path to soemthing relative to the syntax node that
pulls it in if the path can not get resolved.
This typically happens in WASM as file existence is checked during image
resolution, which is not possible there.
2023-10-12 19:15:53 +02:00