slint-ui 1.15.0-nightly.2025120611 → 1.15.0-nightly.2025121016

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 CHANGED
@@ -6,7 +6,7 @@ name = "slint-node"
6
6
  description = "Internal Slint Runtime Library for NodeJS API."
7
7
  authors = ["Slint Developers <info@slint.dev>"]
8
8
  documentation = "https://slint.dev/docs"
9
- edition = "2021"
9
+ edition = "2024"
10
10
  homepage = "https://slint.dev"
11
11
  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"
@@ -42,10 +42,10 @@ accessibility = ["slint-interpreter/accessibility"]
42
42
  [dependencies]
43
43
  napi = { version = "2.14.0", default-features = false, features = ["napi8"] }
44
44
  napi-derive = "2.14.0"
45
- i-slint-compiler = { features = ["default"] , git = "https://github.com/slint-ui/slint", rev = "bcf4f164599194815797eacd82c53dca33147ffb", version = "=1.15.0", default-features = false }
46
- i-slint-core = { features = ["default", "gettext-rs"] , git = "https://github.com/slint-ui/slint", rev = "bcf4f164599194815797eacd82c53dca33147ffb", version = "=1.15.0", default-features = false }
47
- i-slint-backend-selector = { git = "https://github.com/slint-ui/slint", rev = "bcf4f164599194815797eacd82c53dca33147ffb", version = "=1.15.0", default-features = false }
48
- slint-interpreter = { default-features = false , features = ["display-diagnostics", "internal", "compat-1-2"] , git = "https://github.com/slint-ui/slint", rev = "bcf4f164599194815797eacd82c53dca33147ffb", version = "=1.15.0"}
45
+ i-slint-compiler = { features = ["default"] , git = "https://github.com/slint-ui/slint", rev = "c91ce5acef7866dd3f5303336fca7772dee616f2", version = "=1.15.0", default-features = false }
46
+ i-slint-core = { features = ["default", "gettext-rs"] , git = "https://github.com/slint-ui/slint", rev = "c91ce5acef7866dd3f5303336fca7772dee616f2", version = "=1.15.0", default-features = false }
47
+ i-slint-backend-selector = { git = "https://github.com/slint-ui/slint", rev = "c91ce5acef7866dd3f5303336fca7772dee616f2", version = "=1.15.0", default-features = false }
48
+ slint-interpreter = { default-features = false , features = ["display-diagnostics", "internal", "compat-1-2"] , git = "https://github.com/slint-ui/slint", rev = "c91ce5acef7866dd3f5303336fca7772dee616f2", version = "=1.15.0"}
49
49
  spin_on = { version = "0.1" }
50
50
  css-color-parser2 = { version = "1.0.1" }
51
51
  itertools = { version = "0.14" }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slint-ui",
3
- "version": "1.15.0-nightly.2025120611",
3
+ "version": "1.15.0-nightly.2025121016",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "homepage": "https://github.com/slint-ui/slint",
@@ -20,14 +20,14 @@
20
20
  ],
21
21
  "description": "Slint is a declarative GUI toolkit to build native user interfaces for desktop and embedded applications.",
22
22
  "devDependencies": {
23
- "@biomejs/biome": "2.3.7",
23
+ "@biomejs/biome": "2.3.8",
24
24
  "@types/capture-console": "1.0.5",
25
25
  "@types/node": "20.16.10",
26
26
  "capture-console": "1.0.2",
27
27
  "jimp": "1.6.0",
28
- "typedoc": "0.28.14",
28
+ "typedoc": "0.28.15",
29
29
  "typescript": "5.9.3",
30
- "vitest": "4.0.13"
30
+ "vitest": "4.0.15"
31
31
  },
32
32
  "engines": {
33
33
  "node": ">= 10"
@@ -36,11 +36,11 @@
36
36
  "@napi-rs/cli": "2.18.4"
37
37
  },
38
38
  "optionalDependencies": {
39
- "@slint-ui/slint-ui-binary-linux-x64-gnu": "1.15.0-nightly.2025120611",
40
- "@slint-ui/slint-ui-binary-linux-arm64-gnu": "1.15.0-nightly.2025120611",
41
- "@slint-ui/slint-ui-binary-darwin-arm64": "1.15.0-nightly.2025120611",
42
- "@slint-ui/slint-ui-binary-win32-x64-msvc": "1.15.0-nightly.2025120611",
43
- "@slint-ui/slint-ui-binary-win32-arm64-msvc": "1.15.0-nightly.2025120611"
39
+ "@slint-ui/slint-ui-binary-linux-x64-gnu": "1.15.0-nightly.2025121016",
40
+ "@slint-ui/slint-ui-binary-linux-arm64-gnu": "1.15.0-nightly.2025121016",
41
+ "@slint-ui/slint-ui-binary-darwin-arm64": "1.15.0-nightly.2025121016",
42
+ "@slint-ui/slint-ui-binary-win32-x64-msvc": "1.15.0-nightly.2025121016",
43
+ "@slint-ui/slint-ui-binary-win32-arm64-msvc": "1.15.0-nightly.2025121016"
44
44
  },
45
45
  "scripts": {
46
46
  "artifacts": "napi artifacts",
@@ -1,8 +1,8 @@
1
1
  // Copyright © SixtyFPS GmbH <info@slint.dev>
2
2
  // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
3
3
 
4
- use crate::to_js_unknown;
5
4
  use crate::RefCountedReference;
5
+ use crate::to_js_unknown;
6
6
 
7
7
  use super::JsComponentDefinition;
8
8
  use super::JsDiagnostic;
@@ -2,8 +2,8 @@
2
2
  // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
3
3
 
4
4
  use crate::{
5
- js_into_rust_model, rust_into_js_model, ReadOnlyRustModel, RgbaColor, SlintBrush,
6
- SlintImageData,
5
+ ReadOnlyRustModel, RgbaColor, SlintBrush, SlintImageData, js_into_rust_model,
6
+ rust_into_js_model,
7
7
  };
8
8
  use i_slint_compiler::langtype::Type;
9
9
  use i_slint_core::graphics::{Image, Rgba8Pixel, SharedPixelBuffer};
@@ -111,7 +111,7 @@ pub fn to_value(env: &Env, unknown: JsUnknown, typ: &Type) -> Result<Value> {
111
111
  Type::Color => {
112
112
  match unknown.get_type() {
113
113
  Ok(ValueType::String) => {
114
- return unknown.coerce_to_string().and_then(string_to_brush)
114
+ return unknown.coerce_to_string().and_then(string_to_brush);
115
115
  }
116
116
  Ok(ValueType::Object) => {
117
117
  if let Ok(rgb_color_or_brush) = unknown.coerce_to_object() {
@@ -292,6 +292,7 @@ pub fn to_value(env: &Env, unknown: JsUnknown, typ: &Type) -> Result<Value> {
292
292
  | Type::Easing
293
293
  | Type::PathData
294
294
  | Type::LayoutCache
295
+ | Type::ArrayOfU16
295
296
  | Type::ElementReference
296
297
  | Type::StyledText => Err(napi::Error::from_reason("reason")),
297
298
  }
@@ -1,8 +1,8 @@
1
1
  // Copyright © SixtyFPS GmbH <info@slint.dev>
2
2
  // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
3
3
 
4
- use i_slint_core::{graphics::GradientStop, Brush, Color};
5
- use napi::{bindgen_prelude::External, Error, Result};
4
+ use i_slint_core::{Brush, Color, graphics::GradientStop};
5
+ use napi::{Error, Result, bindgen_prelude::External};
6
6
 
7
7
  /// RgbaColor represents a color in the Slint run-time, represented using 8-bit channels for red, green, blue and the alpha (opacity).
8
8
  #[napi(object)]
@@ -4,12 +4,12 @@
4
4
  use std::vec;
5
5
 
6
6
  use i_slint_core::{
7
- graphics::{Image, SharedImageBuffer, SharedPixelBuffer},
8
7
  ImageInner,
8
+ graphics::{Image, SharedImageBuffer, SharedPixelBuffer},
9
9
  };
10
10
  use napi::{
11
- bindgen_prelude::{Buffer, External},
12
11
  Env, JsUnknown,
12
+ bindgen_prelude::{Buffer, External},
13
13
  };
14
14
 
15
15
  // This is needed for typedoc check JsImageData::image
@@ -59,14 +59,14 @@ impl SlintImageData {
59
59
  return Buffer::from(rgb_to_rgba(
60
60
  buffer.as_bytes(),
61
61
  (self.width() * self.height()) as usize,
62
- ))
62
+ ));
63
63
  }
64
64
  SharedImageBuffer::RGBA8(buffer) => return Buffer::from(buffer.as_bytes()),
65
65
  SharedImageBuffer::RGBA8Premultiplied(buffer) => {
66
66
  return Buffer::from(rgb_to_rgba(
67
67
  buffer.as_bytes(),
68
68
  (self.width() * self.height()) as usize,
69
- ))
69
+ ));
70
70
  }
71
71
  }
72
72
  }
@@ -5,10 +5,10 @@ use std::rc::Rc;
5
5
 
6
6
  use i_slint_compiler::langtype::Type;
7
7
  use i_slint_core::model::{Model, ModelNotify, ModelRc};
8
- use napi::{bindgen_prelude::*, JsSymbol};
9
8
  use napi::{Env, JsFunction, JsNumber, JsObject, JsUnknown, Result, ValueType};
9
+ use napi::{JsSymbol, bindgen_prelude::*};
10
10
 
11
- use crate::{to_js_unknown, to_value, RefCountedReference};
11
+ use crate::{RefCountedReference, to_js_unknown, to_value};
12
12
 
13
13
  #[napi]
14
14
  #[derive(Clone, Default)]
@@ -101,7 +101,9 @@ impl Model for JsModel {
101
101
  };
102
102
 
103
103
  let Some(row_count_property_fn) = row_count_property else {
104
- eprintln!("Node.js: JavaScript Model<T> implementation's rowCount property is not a callable function");
104
+ eprintln!(
105
+ "Node.js: JavaScript Model<T> implementation's rowCount property is not a callable function"
106
+ );
105
107
  return 0;
106
108
  };
107
109
 
@@ -111,12 +113,16 @@ impl Model for JsModel {
111
113
  };
112
114
 
113
115
  let Ok(row_count_number) = row_count_result.coerce_to_number() else {
114
- eprintln!("Node.js: JavaScript Model<T>'s rowCount function returned a value that cannot be coerced to a number");
116
+ eprintln!(
117
+ "Node.js: JavaScript Model<T>'s rowCount function returned a value that cannot be coerced to a number"
118
+ );
115
119
  return 0;
116
120
  };
117
121
 
118
122
  let Ok(row_count) = row_count_number.get_uint32() else {
119
- eprintln!("Node.js: JavaScript Model<T>'s rowCount function returned a number that cannot be mapped to a uint32");
123
+ eprintln!(
124
+ "Node.js: JavaScript Model<T>'s rowCount function returned a number that cannot be mapped to a uint32"
125
+ );
120
126
  return 0;
121
127
  };
122
128
 
@@ -151,7 +157,9 @@ impl Model for JsModel {
151
157
  None
152
158
  } else {
153
159
  let Ok(js_value) = to_value(&self.env, row_data, &self.row_data_type) else {
154
- eprintln!("Node.js: JavaScript Model<T>'s rowData function returned data type that cannot be represented in Rust");
160
+ eprintln!(
161
+ "Node.js: JavaScript Model<T>'s rowData function returned data type that cannot be represented in Rust"
162
+ );
155
163
  return None;
156
164
  };
157
165
  Some(js_value)
@@ -175,7 +183,9 @@ impl Model for JsModel {
175
183
  };
176
184
 
177
185
  let Ok(js_data) = to_js_unknown(&self.env, &data) else {
178
- eprintln!("Node.js: Model<T>'s set_row_data called by Rust with data type that can't be represented in JavaScript");
186
+ eprintln!(
187
+ "Node.js: Model<T>'s set_row_data called by Rust with data type that can't be represented in JavaScript"
188
+ );
179
189
  return;
180
190
  };
181
191
 
@@ -225,7 +235,9 @@ impl ReadOnlyRustModel {
225
235
 
226
236
  #[napi]
227
237
  pub fn set_row_data(&self, _env: Env, _row: u32, _data: JsUnknown) {
228
- eprintln!("setRowData called on a model which does not re-implement this method. This happens when trying to modify a read-only model")
238
+ eprintln!(
239
+ "setRowData called on a model which does not re-implement this method. This happens when trying to modify a read-only model"
240
+ )
229
241
  }
230
242
 
231
243
  pub fn into_js(self, env: &Env) -> Result<JsUnknown> {
@@ -2,8 +2,8 @@
2
2
  // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
3
3
 
4
4
  use napi::{
5
- bindgen_prelude::{FromNapiValue, Object},
6
5
  JsUnknown,
6
+ bindgen_prelude::{FromNapiValue, Object},
7
7
  };
8
8
 
9
9
  /// SlintPoint implements {@link Point}.
@@ -2,8 +2,8 @@
2
2
  // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
3
3
 
4
4
  use napi::{
5
- bindgen_prelude::{FromNapiValue, Object},
6
5
  JsUnknown, Result,
6
+ bindgen_prelude::{FromNapiValue, Object},
7
7
  };
8
8
 
9
9
  /// SlintPoint implements {@link Size}.