slint-ui 1.9.0-nightly.2024112122 → 1.9.0-nightly.2024112302
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/dist/index.d.ts +5 -0
- package/dist/index.js +9 -1
- package/package.json +6 -6
- package/rust/lib.rs +6 -0
- package/rust-module.cjs +2 -1
- package/rust-module.d.ts +1 -0
- package/typescript/index.ts +8 -0
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 = "613b2982f1f16d0fed6c42f474a30abb254f794f", version = "=1.9.0", default-features = false }
|
|
45
|
+
i-slint-core = { features = ["default", "gettext-rs"] , git = "https://github.com/slint-ui/slint", rev = "613b2982f1f16d0fed6c42f474a30abb254f794f", version = "=1.9.0", default-features = false }
|
|
46
|
+
i-slint-backend-selector = { git = "https://github.com/slint-ui/slint", rev = "613b2982f1f16d0fed6c42f474a30abb254f794f", 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 = "613b2982f1f16d0fed6c42f474a30abb254f794f", 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/dist/index.d.ts
CHANGED
|
@@ -426,6 +426,11 @@ export declare namespace private_api {
|
|
|
426
426
|
* ````
|
|
427
427
|
*/
|
|
428
428
|
export declare function initTranslations(domain: string, path: string | URL): void;
|
|
429
|
+
/**
|
|
430
|
+
* Sets the application id for use on Wayland or X11 with [xdg](https://specifications.freedesktop.org/desktop-entry-spec/latest/)
|
|
431
|
+
* compliant window managers. This must be set before the window is shown.
|
|
432
|
+
*/
|
|
433
|
+
export declare function setXdgAppId(app_id: string): void;
|
|
429
434
|
/**
|
|
430
435
|
* @hidden
|
|
431
436
|
*/
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright © SixtyFPS GmbH <info@slint.dev>
|
|
3
3
|
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.initTranslations = exports.private_api = exports.quitEventLoop = exports.runEventLoop = exports.loadSource = exports.loadFile = exports.CompileError = exports.ArrayModel = exports.Model = exports.Brush = exports.RgbaColor = exports.DiagnosticLevel = exports.Diagnostic = void 0;
|
|
5
|
+
exports.setXdgAppId = exports.initTranslations = exports.private_api = exports.quitEventLoop = exports.runEventLoop = exports.loadSource = exports.loadFile = exports.CompileError = exports.ArrayModel = exports.Model = exports.Brush = exports.RgbaColor = exports.DiagnosticLevel = exports.Diagnostic = void 0;
|
|
6
6
|
const napi = require("../rust-module.cjs");
|
|
7
7
|
var rust_module_cjs_1 = require("../rust-module.cjs");
|
|
8
8
|
Object.defineProperty(exports, "Diagnostic", { enumerable: true, get: function () { return rust_module_cjs_1.Diagnostic; } });
|
|
@@ -629,6 +629,14 @@ function initTranslations(domain, path) {
|
|
|
629
629
|
napi.initTranslations(domain, pathname);
|
|
630
630
|
}
|
|
631
631
|
exports.initTranslations = initTranslations;
|
|
632
|
+
/**
|
|
633
|
+
* Sets the application id for use on Wayland or X11 with [xdg](https://specifications.freedesktop.org/desktop-entry-spec/latest/)
|
|
634
|
+
* compliant window managers. This must be set before the window is shown.
|
|
635
|
+
*/
|
|
636
|
+
function setXdgAppId(app_id) {
|
|
637
|
+
napi.setXdgAppId(app_id);
|
|
638
|
+
}
|
|
639
|
+
exports.setXdgAppId = setXdgAppId;
|
|
632
640
|
/**
|
|
633
641
|
* @hidden
|
|
634
642
|
*/
|
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.2024112302",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"homepage": "https://github.com/slint-ui/slint",
|
|
@@ -67,10 +67,10 @@
|
|
|
67
67
|
"@napi-rs/cli": "2.16.5"
|
|
68
68
|
},
|
|
69
69
|
"optionalDependencies": {
|
|
70
|
-
"@slint-ui/slint-ui-binary-linux-x64-gnu": "1.9.0-nightly.
|
|
71
|
-
"@slint-ui/slint-ui-binary-darwin-x64": "1.9.0-nightly.
|
|
72
|
-
"@slint-ui/slint-ui-binary-darwin-arm64": "1.9.0-nightly.
|
|
73
|
-
"@slint-ui/slint-ui-binary-win32-x64-msvc": "1.9.0-nightly.
|
|
74
|
-
"@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.2024112302",
|
|
71
|
+
"@slint-ui/slint-ui-binary-darwin-x64": "1.9.0-nightly.2024112302",
|
|
72
|
+
"@slint-ui/slint-ui-binary-darwin-arm64": "1.9.0-nightly.2024112302",
|
|
73
|
+
"@slint-ui/slint-ui-binary-win32-x64-msvc": "1.9.0-nightly.2024112302",
|
|
74
|
+
"@slint-ui/slint-ui-binary-win32-ia32-msvc": "1.9.0-nightly.2024112302"
|
|
75
75
|
}
|
|
76
76
|
}
|
package/rust/lib.rs
CHANGED
|
@@ -94,6 +94,12 @@ pub fn init_translations(domain: String, dir_name: String) -> napi::Result<()> {
|
|
|
94
94
|
.map_err(|e| napi::Error::from_reason(e.to_string()))
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
#[napi]
|
|
98
|
+
pub fn set_xdg_app_id(app_id: String) -> napi::Result<()> {
|
|
99
|
+
i_slint_backend_selector::with_global_context(|ctx| ctx.set_xdg_app_id(app_id.into()))
|
|
100
|
+
.map_err(|e| napi::Error::from_reason(e.to_string()))
|
|
101
|
+
}
|
|
102
|
+
|
|
97
103
|
pub fn print_to_console(env: Env, function: &str, arguments: core::fmt::Arguments) {
|
|
98
104
|
let Ok(global) = env.get_global() else {
|
|
99
105
|
eprintln!("Unable to obtain global object");
|
package/rust-module.cjs
CHANGED
|
@@ -252,7 +252,7 @@ if (!nativeBinding) {
|
|
|
252
252
|
throw new Error(`Failed to load native binding`)
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
-
const { DiagnosticLevel, ComponentCompiler, ComponentDefinition, ComponentInstance, ValueType, Property, Window, SlintRgbaColor, SlintBrush, SlintImageData, SharedModelNotify, jsModelNotifyNew, jsModelNotifyRowDataChanged, jsModelNotifyRowAdded, jsModelNotifyRowRemoved, jsModelNotifyReset, ReadOnlyRustModel, ModelIterator, SlintPoint, SlintSize, mockElapsedTime, getMockedTime, ProcessEventsResult, processEvents, invokeFromEventLoop, setQuitOnLastWindowClosed, initTesting, initTranslations } = nativeBinding
|
|
255
|
+
const { DiagnosticLevel, ComponentCompiler, ComponentDefinition, ComponentInstance, ValueType, Property, Window, SlintRgbaColor, SlintBrush, SlintImageData, SharedModelNotify, jsModelNotifyNew, jsModelNotifyRowDataChanged, jsModelNotifyRowAdded, jsModelNotifyRowRemoved, jsModelNotifyReset, ReadOnlyRustModel, ModelIterator, SlintPoint, SlintSize, mockElapsedTime, getMockedTime, ProcessEventsResult, processEvents, invokeFromEventLoop, setQuitOnLastWindowClosed, initTesting, initTranslations, setXdgAppId } = nativeBinding
|
|
256
256
|
|
|
257
257
|
module.exports.DiagnosticLevel = DiagnosticLevel
|
|
258
258
|
module.exports.ComponentCompiler = ComponentCompiler
|
|
@@ -282,3 +282,4 @@ module.exports.invokeFromEventLoop = invokeFromEventLoop
|
|
|
282
282
|
module.exports.setQuitOnLastWindowClosed = setQuitOnLastWindowClosed
|
|
283
283
|
module.exports.initTesting = initTesting
|
|
284
284
|
module.exports.initTranslations = initTranslations
|
|
285
|
+
module.exports.setXdgAppId = setXdgAppId
|
package/rust-module.d.ts
CHANGED
|
@@ -84,6 +84,7 @@ export declare function invokeFromEventLoop(callback: (...args: any[]) => any):
|
|
|
84
84
|
export declare function setQuitOnLastWindowClosed(quitOnLastWindowClosed: boolean): void
|
|
85
85
|
export declare function initTesting(): void
|
|
86
86
|
export declare function initTranslations(domain: string, dirName: string): void
|
|
87
|
+
export declare function setXdgAppId(appId: string): void
|
|
87
88
|
export type JsComponentCompiler = ComponentCompiler
|
|
88
89
|
/**
|
|
89
90
|
* ComponentCompiler is the entry point to the Slint interpreter that can be used
|
package/typescript/index.ts
CHANGED
|
@@ -952,6 +952,14 @@ export function initTranslations(domain: string, path: string | URL) {
|
|
|
952
952
|
napi.initTranslations(domain, pathname);
|
|
953
953
|
}
|
|
954
954
|
|
|
955
|
+
/**
|
|
956
|
+
* Sets the application id for use on Wayland or X11 with [xdg](https://specifications.freedesktop.org/desktop-entry-spec/latest/)
|
|
957
|
+
* compliant window managers. This must be set before the window is shown.
|
|
958
|
+
*/
|
|
959
|
+
export function setXdgAppId(app_id: string) {
|
|
960
|
+
napi.setXdgAppId(app_id);
|
|
961
|
+
}
|
|
962
|
+
|
|
955
963
|
/**
|
|
956
964
|
* @hidden
|
|
957
965
|
*/
|