slint-ui 1.7.0 → 1.7.1-nightly.2024072317
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 +5 -5
- package/binaries.json +1 -1
- package/cover.md +3 -0
- package/index.js +8 -1
- package/index.ts +12 -1
- package/package.json +6 -6
package/Cargo.toml
CHANGED
|
@@ -12,7 +12,7 @@ keywords = ["gui", "toolkit", "graphics", "design", "ui"]
|
|
|
12
12
|
license = "GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0"
|
|
13
13
|
repository = "https://github.com/slint-ui/slint"
|
|
14
14
|
rust-version = "1.73"
|
|
15
|
-
version = "1.7.
|
|
15
|
+
version = "1.7.1"
|
|
16
16
|
categories = ["gui", "development-tools"]
|
|
17
17
|
build = "build.rs"
|
|
18
18
|
|
|
@@ -40,10 +40,10 @@ accessibility = ["slint-interpreter/accessibility"]
|
|
|
40
40
|
[dependencies]
|
|
41
41
|
napi = { version = "2.14.0", default-features = false, features = ["napi8"] }
|
|
42
42
|
napi-derive = "2.14.0"
|
|
43
|
-
i-slint-compiler = { features = ["default"] , version = "=1.7.
|
|
44
|
-
i-slint-core = { features = ["default"] , version = "=1.7.
|
|
45
|
-
i-slint-backend-selector = { version = "=1.7.
|
|
46
|
-
slint-interpreter = { default-features = false , features = ["display-diagnostics", "internal", "compat-1-2"] , version = "=1.7.
|
|
43
|
+
i-slint-compiler = { features = ["default"] , git = "https://github.com/slint-ui/slint", rev = "f5d003d1e21ffe26b80881ae6996b1ab76f1b4dc", version = "=1.7.1", default-features = false }
|
|
44
|
+
i-slint-core = { features = ["default"] , git = "https://github.com/slint-ui/slint", rev = "f5d003d1e21ffe26b80881ae6996b1ab76f1b4dc", version = "=1.7.1", default-features = false }
|
|
45
|
+
i-slint-backend-selector = { git = "https://github.com/slint-ui/slint", rev = "f5d003d1e21ffe26b80881ae6996b1ab76f1b4dc", version = "=1.7.1", default-features = false }
|
|
46
|
+
slint-interpreter = { default-features = false , features = ["display-diagnostics", "internal", "compat-1-2"] , git = "https://github.com/slint-ui/slint", rev = "f5d003d1e21ffe26b80881ae6996b1ab76f1b4dc", version = "=1.7.1"}
|
|
47
47
|
spin_on = { version = "0.1" }
|
|
48
48
|
css-color-parser2 = { version = "1.0.1" }
|
|
49
49
|
itertools = { version = "0.13" }
|
package/binaries.json
CHANGED
package/cover.md
CHANGED
|
@@ -300,3 +300,6 @@ component.Logic.to_upper_case = (str) => {
|
|
|
300
300
|
return str.toUpperCase();
|
|
301
301
|
};
|
|
302
302
|
```
|
|
303
|
+
|
|
304
|
+
**Note**: Global singletons are instantiated once per component. When declaring multiple components for `export` to JavaScript,
|
|
305
|
+
each instance will have their own instance of associated globals singletons.
|
package/index.js
CHANGED
|
@@ -433,7 +433,14 @@ class CompileError extends Error {
|
|
|
433
433
|
* @param diagnostics represent a list of diagnostic items emitted while compiling .slint code.
|
|
434
434
|
*/
|
|
435
435
|
constructor(message, diagnostics) {
|
|
436
|
-
|
|
436
|
+
const formattedDiagnostics = diagnostics
|
|
437
|
+
.map((d) => `[${d.fileName}:${d.lineNumber}:${d.columnNumber}] ${d.message}`)
|
|
438
|
+
.join("\n");
|
|
439
|
+
let formattedMessage = message;
|
|
440
|
+
if (diagnostics.length > 0) {
|
|
441
|
+
formattedMessage += `\nDiagnostics:\n${formattedDiagnostics}`;
|
|
442
|
+
}
|
|
443
|
+
super(formattedMessage);
|
|
437
444
|
this.diagnostics = diagnostics;
|
|
438
445
|
}
|
|
439
446
|
}
|
package/index.ts
CHANGED
|
@@ -635,7 +635,18 @@ export class CompileError extends Error {
|
|
|
635
635
|
* @param diagnostics represent a list of diagnostic items emitted while compiling .slint code.
|
|
636
636
|
*/
|
|
637
637
|
constructor(message: string, diagnostics: napi.Diagnostic[]) {
|
|
638
|
-
|
|
638
|
+
const formattedDiagnostics = diagnostics
|
|
639
|
+
.map((d) =>
|
|
640
|
+
`[${d.fileName}:${d.lineNumber}:${d.columnNumber}] ${d.message}`
|
|
641
|
+
)
|
|
642
|
+
.join("\n");
|
|
643
|
+
|
|
644
|
+
let formattedMessage = message;
|
|
645
|
+
if (diagnostics.length > 0) {
|
|
646
|
+
formattedMessage += `\nDiagnostics:\n${formattedDiagnostics}`;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
super(formattedMessage);
|
|
639
650
|
this.diagnostics = diagnostics;
|
|
640
651
|
}
|
|
641
652
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slint-ui",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.1-nightly.2024072317",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"homepage": "https://github.com/slint-ui/slint",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"@napi-rs/cli": "^2.16.5"
|
|
60
60
|
},
|
|
61
61
|
"optionalDependencies": {
|
|
62
|
-
"@slint-ui/slint-ui-binary-linux-x64-gnu": "1.7.
|
|
63
|
-
"@slint-ui/slint-ui-binary-darwin-x64": "1.7.
|
|
64
|
-
"@slint-ui/slint-ui-binary-darwin-arm64": "1.7.
|
|
65
|
-
"@slint-ui/slint-ui-binary-win32-x64-msvc": "1.7.
|
|
66
|
-
"@slint-ui/slint-ui-binary-win32-ia32-msvc": "1.7.
|
|
62
|
+
"@slint-ui/slint-ui-binary-linux-x64-gnu": "1.7.1-nightly.2024072317",
|
|
63
|
+
"@slint-ui/slint-ui-binary-darwin-x64": "1.7.1-nightly.2024072317",
|
|
64
|
+
"@slint-ui/slint-ui-binary-darwin-arm64": "1.7.1-nightly.2024072317",
|
|
65
|
+
"@slint-ui/slint-ui-binary-win32-x64-msvc": "1.7.1-nightly.2024072317",
|
|
66
|
+
"@slint-ui/slint-ui-binary-win32-ia32-msvc": "1.7.1-nightly.2024072317"
|
|
67
67
|
}
|
|
68
68
|
}
|