slint-ui 1.9.0-nightly.2024121316 → 1.9.0-nightly.2024121716
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.toml +4 -4
- package/cover.md +9 -6
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/package.json +9 -9
- package/thirdparty.hbs +81 -0
- package/typescript/index.ts +2 -2
package/Cargo.toml
CHANGED
|
@@ -41,10 +41,10 @@ accessibility = ["slint-interpreter/accessibility"]
|
|
|
41
41
|
[dependencies]
|
|
42
42
|
napi = { version = "2.14.0", default-features = false, features = ["napi8"] }
|
|
43
43
|
napi-derive = "2.14.0"
|
|
44
|
-
i-slint-compiler = { features = ["default"] , git = "https://github.com/slint-ui/slint", rev = "
|
|
45
|
-
i-slint-core = { features = ["default", "gettext-rs"] , git = "https://github.com/slint-ui/slint", rev = "
|
|
46
|
-
i-slint-backend-selector = { git = "https://github.com/slint-ui/slint", rev = "
|
|
47
|
-
slint-interpreter = { default-features = false , features = ["display-diagnostics", "internal", "compat-1-2"] , git = "https://github.com/slint-ui/slint", rev = "
|
|
44
|
+
i-slint-compiler = { features = ["default"] , git = "https://github.com/slint-ui/slint", rev = "dc4bda958ebfda6184825bdacf6cb0bbd6fc7bd2", version = "=1.9.0", default-features = false }
|
|
45
|
+
i-slint-core = { features = ["default", "gettext-rs"] , git = "https://github.com/slint-ui/slint", rev = "dc4bda958ebfda6184825bdacf6cb0bbd6fc7bd2", version = "=1.9.0", default-features = false }
|
|
46
|
+
i-slint-backend-selector = { git = "https://github.com/slint-ui/slint", rev = "dc4bda958ebfda6184825bdacf6cb0bbd6fc7bd2", version = "=1.9.0", default-features = false }
|
|
47
|
+
slint-interpreter = { default-features = false , features = ["display-diagnostics", "internal", "compat-1-2"] , git = "https://github.com/slint-ui/slint", rev = "dc4bda958ebfda6184825bdacf6cb0bbd6fc7bd2", version = "=1.9.0"}
|
|
48
48
|
spin_on = { version = "0.1" }
|
|
49
49
|
css-color-parser2 = { version = "1.0.1" }
|
|
50
50
|
itertools = { version = "0.13" }
|
package/cover.md
CHANGED
|
@@ -15,7 +15,7 @@ Slint-node is still in the early stages of development: APIs will change and imp
|
|
|
15
15
|
|
|
16
16
|
## Slint Language Manual
|
|
17
17
|
|
|
18
|
-
The [Slint Language Documentation](
|
|
18
|
+
The [Slint Language Documentation](http://slint.dev/docs/slint) covers the Slint UI description language
|
|
19
19
|
in detail.
|
|
20
20
|
|
|
21
21
|
## Prerequisites
|
|
@@ -194,7 +194,7 @@ This is your main TypeScript entry point:
|
|
|
194
194
|
|
|
195
195
|
### Instantiating a Component
|
|
196
196
|
|
|
197
|
-
Use the {@link loadFile} function to load a `.slint` file. Instantiate the [exported component](
|
|
197
|
+
Use the {@link loadFile} function to load a `.slint` file. Instantiate the [exported component](http://slint.dev/docs/slint/src/language/concepts/file)
|
|
198
198
|
with the new operator. Access exported callbacks and properties as JavaScript properties on the instantiated component. In addition,
|
|
199
199
|
the returned object implements the {@link ComponentHandle} interface, to show/hide the instance or access the window.
|
|
200
200
|
|
|
@@ -233,7 +233,7 @@ let component = new ui.MainWindow({
|
|
|
233
233
|
|
|
234
234
|
### Accessing a Properties
|
|
235
235
|
|
|
236
|
-
[Properties](
|
|
236
|
+
[Properties](http://slint.dev/docs/slint/src/language/syntax/properties) declared as `out` or `in-out` in `.slint` files are visible as JavaScript properties on the component instance.
|
|
237
237
|
|
|
238
238
|
**`main.slint`**
|
|
239
239
|
export component MainWindow {
|
|
@@ -250,7 +250,7 @@ instance.name = "Joe";
|
|
|
250
250
|
|
|
251
251
|
### Setting and Invoking Callbacks
|
|
252
252
|
|
|
253
|
-
[Callbacks](
|
|
253
|
+
[Callbacks](http://slint.dev/docs/slint/src/language/syntax/callbacks) declared in `.slint` files are visible as JavaScript function properties on the component instance. Invoke them
|
|
254
254
|
as function to invoke the callback, and assign JavaScript functions to set the callback handler.
|
|
255
255
|
|
|
256
256
|
**`ui/my-component.slint`**
|
|
@@ -303,7 +303,7 @@ The types used for properties in .slint design markup each translate to specific
|
|
|
303
303
|
|
|
304
304
|
### Arrays and Models
|
|
305
305
|
|
|
306
|
-
[Array properties](
|
|
306
|
+
[Array properties](http://slint.dev/docs/slint/src/language/syntax/types#arrays-and-models) can be set from JavaScript by passing
|
|
307
307
|
either `Array` objects or implementations of the {@link Model} interface.
|
|
308
308
|
|
|
309
309
|
When passing a JavaScript `Array` object, the contents of the array are copied. Any changes to the JavaScript afterwards will not be visible on the Slint side.
|
|
@@ -390,7 +390,7 @@ component.position = ui.Position.bottom;
|
|
|
390
390
|
|
|
391
391
|
### Globals
|
|
392
392
|
|
|
393
|
-
You can declare [globally available singletons](
|
|
393
|
+
You can declare [globally available singletons](http://slint.dev/docs/slint/src/language/syntax/globals) in your
|
|
394
394
|
`.slint` files. If exported, these singletons are accessible as properties on your main
|
|
395
395
|
componen instance. Each global singleton is represented by an object with properties and callbacks,
|
|
396
396
|
similar to API that's created for your `.slint` component.
|
|
@@ -420,3 +420,6 @@ component.Logic.to_upper_case = (str) => {
|
|
|
420
420
|
**Note**: Global singletons are instantiated once per component. When declaring multiple components for `export` to JavaScript,
|
|
421
421
|
each instance will have their own instance of associated globals singletons.
|
|
422
422
|
|
|
423
|
+
## Third-Party Licenses
|
|
424
|
+
|
|
425
|
+
For a list of the third-party licenses of all dependencies, see the separate [Third-Party Licenses page](thirdparty.html).
|
package/dist/index.d.ts
CHANGED
|
@@ -204,7 +204,7 @@ export interface LoadFileOptions {
|
|
|
204
204
|
* @returns Returns an object that is immutable and provides a constructor function for each exported Window component found in the `.slint` file.
|
|
205
205
|
* For instance, in the example above, a `Main` property is available, which can be used to create instances of the `Main` component using the `new` keyword.
|
|
206
206
|
* These instances offer properties and event handlers, adhering to the {@link ComponentHandle} interface.
|
|
207
|
-
* For further information on the available properties, refer to [Instantiating A Component](../index.html#
|
|
207
|
+
* For further information on the available properties, refer to [Instantiating A Component](../index.html#instantiating-a-component).
|
|
208
208
|
* @throws {@link CompileError} if errors occur during compilation.
|
|
209
209
|
*/
|
|
210
210
|
export declare function loadFile(filePath: string | URL, options?: LoadFileOptions): Object;
|
|
@@ -233,7 +233,7 @@ export declare function loadFile(filePath: string | URL, options?: LoadFileOptio
|
|
|
233
233
|
* @returns Returns an object that is immutable and provides a constructor function for each exported Window component found in the `.slint` file.
|
|
234
234
|
* For instance, in the example above, a `Main` property is available, which can be used to create instances of the `Main` component using the `new` keyword.
|
|
235
235
|
* These instances offer properties and event handlers, adhering to the {@link ComponentHandle} interface.
|
|
236
|
-
* For further information on the available properties, refer to [Instantiating A Component](../index.html#
|
|
236
|
+
* For further information on the available properties, refer to [Instantiating A Component](../index.html#instantiating-a-component).
|
|
237
237
|
* @throws {@link CompileError} if errors occur during compilation.
|
|
238
238
|
*/
|
|
239
239
|
export declare function loadSource(source: string, filePath: string, options?: LoadFileOptions): Object;
|
package/dist/index.js
CHANGED
|
@@ -328,7 +328,7 @@ function loadSlint(loadData) {
|
|
|
328
328
|
* @returns Returns an object that is immutable and provides a constructor function for each exported Window component found in the `.slint` file.
|
|
329
329
|
* For instance, in the example above, a `Main` property is available, which can be used to create instances of the `Main` component using the `new` keyword.
|
|
330
330
|
* These instances offer properties and event handlers, adhering to the {@link ComponentHandle} interface.
|
|
331
|
-
* For further information on the available properties, refer to [Instantiating A Component](../index.html#
|
|
331
|
+
* For further information on the available properties, refer to [Instantiating A Component](../index.html#instantiating-a-component).
|
|
332
332
|
* @throws {@link CompileError} if errors occur during compilation.
|
|
333
333
|
*/
|
|
334
334
|
function loadFile(filePath, options) {
|
|
@@ -364,7 +364,7 @@ exports.loadFile = loadFile;
|
|
|
364
364
|
* @returns Returns an object that is immutable and provides a constructor function for each exported Window component found in the `.slint` file.
|
|
365
365
|
* For instance, in the example above, a `Main` property is available, which can be used to create instances of the `Main` component using the `new` keyword.
|
|
366
366
|
* These instances offer properties and event handlers, adhering to the {@link ComponentHandle} interface.
|
|
367
|
-
* For further information on the available properties, refer to [Instantiating A Component](../index.html#
|
|
367
|
+
* For further information on the available properties, refer to [Instantiating A Component](../index.html#instantiating-a-component).
|
|
368
368
|
* @throws {@link CompileError} if errors occur during compilation.
|
|
369
369
|
*/
|
|
370
370
|
function loadSource(source, filePath, options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slint-ui",
|
|
3
|
-
"version": "1.9.0-nightly.
|
|
3
|
+
"version": "1.9.0-nightly.2024121716",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"homepage": "https://github.com/slint-ui/slint",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"capture-console": "1.0.2",
|
|
29
29
|
"jimp": "1.6.0",
|
|
30
30
|
"ts-node": "10.9.2",
|
|
31
|
-
"typedoc": "0.
|
|
31
|
+
"typedoc": "0.27",
|
|
32
32
|
"typescript": "5.2.2"
|
|
33
33
|
},
|
|
34
34
|
"engines": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"build:debug": "napi build --platform --js rust-module.cjs --dts rust-module.d.ts -c binaries.json && pnpm compile",
|
|
42
42
|
"build:testing": "napi build --platform --js rust-module.cjs --dts rust-module.d.ts -c binaries.json --features testing && pnpm compile",
|
|
43
43
|
"install": "node build-on-demand.mjs",
|
|
44
|
-
"docs": "pnpm build && typedoc --hideGenerator --
|
|
44
|
+
"docs": "pnpm build && typedoc --hideGenerator --readme cover.md typescript/index.ts && cargo about generate thirdparty.hbs -o docs/thirdparty.html",
|
|
45
45
|
"check": "biome check",
|
|
46
46
|
"format": "biome format",
|
|
47
47
|
"format:fix": "biome format --write",
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
"@napi-rs/cli": "2.18.4"
|
|
68
68
|
},
|
|
69
69
|
"optionalDependencies": {
|
|
70
|
-
"@slint-ui/slint-ui-binary-linux-x64-gnu": "1.9.0-nightly.
|
|
71
|
-
"@slint-ui/slint-ui-binary-linux-arm64-gnu": "1.9.0-nightly.
|
|
72
|
-
"@slint-ui/slint-ui-binary-darwin-x64": "1.9.0-nightly.
|
|
73
|
-
"@slint-ui/slint-ui-binary-darwin-arm64": "1.9.0-nightly.
|
|
74
|
-
"@slint-ui/slint-ui-binary-win32-x64-msvc": "1.9.0-nightly.
|
|
75
|
-
"@slint-ui/slint-ui-binary-win32-ia32-msvc": "1.9.0-nightly.
|
|
70
|
+
"@slint-ui/slint-ui-binary-linux-x64-gnu": "1.9.0-nightly.2024121716",
|
|
71
|
+
"@slint-ui/slint-ui-binary-linux-arm64-gnu": "1.9.0-nightly.2024121716",
|
|
72
|
+
"@slint-ui/slint-ui-binary-darwin-x64": "1.9.0-nightly.2024121716",
|
|
73
|
+
"@slint-ui/slint-ui-binary-darwin-arm64": "1.9.0-nightly.2024121716",
|
|
74
|
+
"@slint-ui/slint-ui-binary-win32-x64-msvc": "1.9.0-nightly.2024121716",
|
|
75
|
+
"@slint-ui/slint-ui-binary-win32-ia32-msvc": "1.9.0-nightly.2024121716"
|
|
76
76
|
}
|
|
77
77
|
}
|
package/thirdparty.hbs
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<!-- Copyright © SixtyFPS GmbH <info@slint.dev> ; SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 -->
|
|
3
|
+
|
|
4
|
+
<html>
|
|
5
|
+
|
|
6
|
+
<head>
|
|
7
|
+
<style>
|
|
8
|
+
@media (prefers-color-scheme: dark) {
|
|
9
|
+
body {
|
|
10
|
+
background: #333;
|
|
11
|
+
color: white;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
a {
|
|
15
|
+
color: skyblue;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.container {
|
|
20
|
+
font-family: sans-serif;
|
|
21
|
+
max-width: 800px;
|
|
22
|
+
margin: 0 auto;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.intro {
|
|
26
|
+
text-align: center;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.licenses-list {
|
|
30
|
+
list-style-type: none;
|
|
31
|
+
margin: 0;
|
|
32
|
+
padding: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.license-used-by {
|
|
36
|
+
margin-top: -10px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.license-text {
|
|
40
|
+
max-height: 200px;
|
|
41
|
+
overflow-y: scroll;
|
|
42
|
+
white-space: pre-wrap;
|
|
43
|
+
}
|
|
44
|
+
</style>
|
|
45
|
+
</head>
|
|
46
|
+
|
|
47
|
+
<body>
|
|
48
|
+
<main class="container">
|
|
49
|
+
<div class="intro">
|
|
50
|
+
<h1>Third Party Licenses</h1>
|
|
51
|
+
<p>This page lists the licenses of the dependencies used by Slint.</p>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<h2>Overview of licenses:</h2>
|
|
55
|
+
<ul class="licenses-overview">
|
|
56
|
+
{{#each overview}}
|
|
57
|
+
<li><a href="#{{id}}">{{name}}</a> ({{count}})</li>
|
|
58
|
+
{{/each}}
|
|
59
|
+
</ul>
|
|
60
|
+
|
|
61
|
+
<h2>All license text:</h2>
|
|
62
|
+
<ul class="licenses-list">
|
|
63
|
+
{{#each licenses}}
|
|
64
|
+
<li class="license">
|
|
65
|
+
<h3 id="{{id}}">{{name}}</h3>
|
|
66
|
+
<h4>Used by:</h4>
|
|
67
|
+
<ul class="license-used-by">
|
|
68
|
+
{{#each used_by}}
|
|
69
|
+
<li><a
|
|
70
|
+
href="{{#if crate.repository}} {{crate.repository}} {{else}} https://crates.io/crates/{{crate.name}} {{/if}}">{{crate.name}}
|
|
71
|
+
{{crate.version}}</a></li>
|
|
72
|
+
{{/each}}
|
|
73
|
+
</ul>
|
|
74
|
+
<pre class="license-text">{{text}}</pre>
|
|
75
|
+
</li>
|
|
76
|
+
{{/each}}
|
|
77
|
+
</ul>
|
|
78
|
+
<main>
|
|
79
|
+
</body>
|
|
80
|
+
|
|
81
|
+
</html>
|
package/typescript/index.ts
CHANGED
|
@@ -619,7 +619,7 @@ function loadSlint(loadData: LoadData): Object {
|
|
|
619
619
|
* @returns Returns an object that is immutable and provides a constructor function for each exported Window component found in the `.slint` file.
|
|
620
620
|
* For instance, in the example above, a `Main` property is available, which can be used to create instances of the `Main` component using the `new` keyword.
|
|
621
621
|
* These instances offer properties and event handlers, adhering to the {@link ComponentHandle} interface.
|
|
622
|
-
* For further information on the available properties, refer to [Instantiating A Component](../index.html#
|
|
622
|
+
* For further information on the available properties, refer to [Instantiating A Component](../index.html#instantiating-a-component).
|
|
623
623
|
* @throws {@link CompileError} if errors occur during compilation.
|
|
624
624
|
*/
|
|
625
625
|
export function loadFile(
|
|
@@ -658,7 +658,7 @@ export function loadFile(
|
|
|
658
658
|
* @returns Returns an object that is immutable and provides a constructor function for each exported Window component found in the `.slint` file.
|
|
659
659
|
* For instance, in the example above, a `Main` property is available, which can be used to create instances of the `Main` component using the `new` keyword.
|
|
660
660
|
* These instances offer properties and event handlers, adhering to the {@link ComponentHandle} interface.
|
|
661
|
-
* For further information on the available properties, refer to [Instantiating A Component](../index.html#
|
|
661
|
+
* For further information on the available properties, refer to [Instantiating A Component](../index.html#instantiating-a-component).
|
|
662
662
|
* @throws {@link CompileError} if errors occur during compilation.
|
|
663
663
|
*/
|
|
664
664
|
export function loadSource(
|