slint-ui 1.9.0-nightly.2024100517 → 1.9.0-nightly.2024100719
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/README.md +1 -1
- package/biome.json +2 -3
- package/package.json +22 -21
- package/rust-module.cjs +3 -61
- package/rust-module.d.ts +14 -14
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"] , 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 = "40cd2cc8fe650e7650580c874621dc0d23a0d792", version = "=1.9.0", default-features = false }
|
|
45
|
+
i-slint-core = { features = ["default"] , git = "https://github.com/slint-ui/slint", rev = "40cd2cc8fe650e7650580c874621dc0d23a0d792", version = "=1.9.0", default-features = false }
|
|
46
|
+
i-slint-backend-selector = { git = "https://github.com/slint-ui/slint", rev = "40cd2cc8fe650e7650580c874621dc0d23a0d792", 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 = "40cd2cc8fe650e7650580c874621dc0d23a0d792", 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/README.md
CHANGED
|
@@ -32,7 +32,7 @@ npm install slint-ui
|
|
|
32
32
|
You need to install the following components:
|
|
33
33
|
|
|
34
34
|
* **[Node.js](https://nodejs.org/download/release/)** (v16. or newer)
|
|
35
|
-
* **[
|
|
35
|
+
* **[pnpm](https://www.pnpm.io/)**
|
|
36
36
|
* **[Rust compiler](https://www.rust-lang.org/tools/install)** (1.77 or newer)
|
|
37
37
|
|
|
38
38
|
You will also need a few more dependencies, see <https://github.com/slint-ui/slint/blob/master/docs/building.md#prerequisites>
|
package/biome.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
|
|
3
2
|
"extends": ["../../biome.json"],
|
|
4
3
|
"formatter": {
|
|
5
|
-
"ignore": ["rust-module.d.ts", "rust-module.cjs", "dist/"]
|
|
4
|
+
"ignore": ["rust-module.d.ts", "rust-module.cjs", "dist/", "docs/"]
|
|
6
5
|
},
|
|
7
6
|
"linter": {
|
|
8
|
-
"ignore": ["rust-module.d.ts", "rust-module.cjs", "dist/"],
|
|
7
|
+
"ignore": ["rust-module.d.ts", "rust-module.cjs", "dist/", "docs/"],
|
|
9
8
|
"rules": {
|
|
10
9
|
"complexity": {
|
|
11
10
|
"useArrowFunction": "off",
|
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.2024100719",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"homepage": "https://github.com/slint-ui/slint",
|
|
@@ -20,17 +20,17 @@
|
|
|
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
|
-
"@ava/typescript": "
|
|
23
|
+
"@ava/typescript": "4.1.0",
|
|
24
24
|
"@biomejs/biome": "1.8.3",
|
|
25
|
-
"@types/capture-console": "
|
|
26
|
-
"@types/node": "
|
|
27
|
-
"@types/node-fetch": "
|
|
28
|
-
"ava": "
|
|
29
|
-
"capture-console": "
|
|
30
|
-
"jimp": "
|
|
31
|
-
"ts-node": "
|
|
32
|
-
"typedoc": "
|
|
33
|
-
"typescript": "
|
|
25
|
+
"@types/capture-console": "1.0.5",
|
|
26
|
+
"@types/node": "20.8.6",
|
|
27
|
+
"@types/node-fetch": "2.6.7",
|
|
28
|
+
"ava": "5.3.0",
|
|
29
|
+
"capture-console": "1.0.2",
|
|
30
|
+
"jimp": "0.22.8",
|
|
31
|
+
"ts-node": "10.9.1",
|
|
32
|
+
"typedoc": "0.25.2",
|
|
33
|
+
"typescript": "5.2.2"
|
|
34
34
|
},
|
|
35
35
|
"engines": {
|
|
36
36
|
"node": ">= 10"
|
|
@@ -39,16 +39,17 @@
|
|
|
39
39
|
"artifacts": "napi artifacts",
|
|
40
40
|
"compile": "tsc",
|
|
41
41
|
"build": "napi build --platform --release --js rust-module.cjs --dts rust-module.d.ts -c binaries.json",
|
|
42
|
-
"build:debug": "napi build --platform --js rust-module.cjs --dts rust-module.d.ts -c binaries.json &&
|
|
43
|
-
"build:testing": "napi build --platform --js rust-module.cjs --dts rust-module.d.ts -c binaries.json --features testing &&
|
|
42
|
+
"build:debug": "napi build --platform --js rust-module.cjs --dts rust-module.d.ts -c binaries.json && pnpm compile",
|
|
43
|
+
"build:testing": "napi build --platform --js rust-module.cjs --dts rust-module.d.ts -c binaries.json --features testing && pnpm compile",
|
|
44
44
|
"install": "node build-on-demand.mjs",
|
|
45
|
-
"docs": "
|
|
45
|
+
"docs": "pnpm build && typedoc --hideGenerator --treatWarningsAsErrors --readme cover.md typescript/index.ts",
|
|
46
46
|
"check": "biome check",
|
|
47
47
|
"format": "biome format",
|
|
48
48
|
"format:fix": "biome format --write",
|
|
49
49
|
"lint": "biome lint",
|
|
50
50
|
"lint:fix": "biome lint --fix",
|
|
51
|
-
"test": "ava"
|
|
51
|
+
"test": "ava",
|
|
52
|
+
"type-check": "tsc --noEmit"
|
|
52
53
|
},
|
|
53
54
|
"ava": {
|
|
54
55
|
"extensions": {
|
|
@@ -64,13 +65,13 @@
|
|
|
64
65
|
"workerThreads": false
|
|
65
66
|
},
|
|
66
67
|
"dependencies": {
|
|
67
|
-
"@napi-rs/cli": "
|
|
68
|
+
"@napi-rs/cli": "2.16.5"
|
|
68
69
|
},
|
|
69
70
|
"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.
|
|
71
|
+
"@slint-ui/slint-ui-binary-linux-x64-gnu": "1.9.0-nightly.2024100719",
|
|
72
|
+
"@slint-ui/slint-ui-binary-darwin-x64": "1.9.0-nightly.2024100719",
|
|
73
|
+
"@slint-ui/slint-ui-binary-darwin-arm64": "1.9.0-nightly.2024100719",
|
|
74
|
+
"@slint-ui/slint-ui-binary-win32-x64-msvc": "1.9.0-nightly.2024100719",
|
|
75
|
+
"@slint-ui/slint-ui-binary-win32-ia32-msvc": "1.9.0-nightly.2024100719"
|
|
75
76
|
}
|
|
76
77
|
}
|
package/rust-module.cjs
CHANGED
|
@@ -224,72 +224,14 @@ switch (platform) {
|
|
|
224
224
|
}
|
|
225
225
|
break
|
|
226
226
|
case 'arm':
|
|
227
|
-
if (isMusl()) {
|
|
228
|
-
localFileExisted = existsSync(
|
|
229
|
-
join(__dirname, 'index.linux-arm-musleabihf.node')
|
|
230
|
-
)
|
|
231
|
-
try {
|
|
232
|
-
if (localFileExisted) {
|
|
233
|
-
nativeBinding = require('./index.linux-arm-musleabihf.node')
|
|
234
|
-
} else {
|
|
235
|
-
nativeBinding = require('@slint-ui/slint-ui-binary-linux-arm-musleabihf')
|
|
236
|
-
}
|
|
237
|
-
} catch (e) {
|
|
238
|
-
loadError = e
|
|
239
|
-
}
|
|
240
|
-
} else {
|
|
241
|
-
localFileExisted = existsSync(
|
|
242
|
-
join(__dirname, 'index.linux-arm-gnueabihf.node')
|
|
243
|
-
)
|
|
244
|
-
try {
|
|
245
|
-
if (localFileExisted) {
|
|
246
|
-
nativeBinding = require('./index.linux-arm-gnueabihf.node')
|
|
247
|
-
} else {
|
|
248
|
-
nativeBinding = require('@slint-ui/slint-ui-binary-linux-arm-gnueabihf')
|
|
249
|
-
}
|
|
250
|
-
} catch (e) {
|
|
251
|
-
loadError = e
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
break
|
|
255
|
-
case 'riscv64':
|
|
256
|
-
if (isMusl()) {
|
|
257
|
-
localFileExisted = existsSync(
|
|
258
|
-
join(__dirname, 'index.linux-riscv64-musl.node')
|
|
259
|
-
)
|
|
260
|
-
try {
|
|
261
|
-
if (localFileExisted) {
|
|
262
|
-
nativeBinding = require('./index.linux-riscv64-musl.node')
|
|
263
|
-
} else {
|
|
264
|
-
nativeBinding = require('@slint-ui/slint-ui-binary-linux-riscv64-musl')
|
|
265
|
-
}
|
|
266
|
-
} catch (e) {
|
|
267
|
-
loadError = e
|
|
268
|
-
}
|
|
269
|
-
} else {
|
|
270
|
-
localFileExisted = existsSync(
|
|
271
|
-
join(__dirname, 'index.linux-riscv64-gnu.node')
|
|
272
|
-
)
|
|
273
|
-
try {
|
|
274
|
-
if (localFileExisted) {
|
|
275
|
-
nativeBinding = require('./index.linux-riscv64-gnu.node')
|
|
276
|
-
} else {
|
|
277
|
-
nativeBinding = require('@slint-ui/slint-ui-binary-linux-riscv64-gnu')
|
|
278
|
-
}
|
|
279
|
-
} catch (e) {
|
|
280
|
-
loadError = e
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
break
|
|
284
|
-
case 's390x':
|
|
285
227
|
localFileExisted = existsSync(
|
|
286
|
-
join(__dirname, 'index.linux-
|
|
228
|
+
join(__dirname, 'index.linux-arm-gnueabihf.node')
|
|
287
229
|
)
|
|
288
230
|
try {
|
|
289
231
|
if (localFileExisted) {
|
|
290
|
-
nativeBinding = require('./index.linux-
|
|
232
|
+
nativeBinding = require('./index.linux-arm-gnueabihf.node')
|
|
291
233
|
} else {
|
|
292
|
-
nativeBinding = require('@slint-ui/slint-ui-binary-linux-
|
|
234
|
+
nativeBinding = require('@slint-ui/slint-ui-binary-linux-arm-gnueabihf')
|
|
293
235
|
}
|
|
294
236
|
} catch (e) {
|
|
295
237
|
loadError = e
|
package/rust-module.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
/* auto-generated by NAPI-RS */
|
|
5
5
|
|
|
6
|
-
export
|
|
6
|
+
export class ExternalObject<T> {
|
|
7
7
|
readonly '': {
|
|
8
8
|
readonly '': unique symbol
|
|
9
9
|
[K: symbol]: T
|
|
@@ -88,7 +88,7 @@ export type JsComponentCompiler = ComponentCompiler
|
|
|
88
88
|
* ComponentCompiler is the entry point to the Slint interpreter that can be used
|
|
89
89
|
* to load .slint files or compile them on-the-fly from a string.
|
|
90
90
|
*/
|
|
91
|
-
export
|
|
91
|
+
export class ComponentCompiler {
|
|
92
92
|
/** Returns a new ComponentCompiler. */
|
|
93
93
|
constructor()
|
|
94
94
|
set includePaths(includePaths: Array<string>)
|
|
@@ -108,7 +108,7 @@ export declare class ComponentCompiler {
|
|
|
108
108
|
buildFromSource(sourceCode: string, path: string): Record<string, JsComponentDefinition>
|
|
109
109
|
}
|
|
110
110
|
export type JsComponentDefinition = ComponentDefinition
|
|
111
|
-
export
|
|
111
|
+
export class ComponentDefinition {
|
|
112
112
|
constructor()
|
|
113
113
|
get properties(): Array<JsProperty>
|
|
114
114
|
get callbacks(): Array<string>
|
|
@@ -121,7 +121,7 @@ export declare class ComponentDefinition {
|
|
|
121
121
|
get name(): string
|
|
122
122
|
}
|
|
123
123
|
export type JsComponentInstance = ComponentInstance
|
|
124
|
-
export
|
|
124
|
+
export class ComponentInstance {
|
|
125
125
|
constructor()
|
|
126
126
|
definition(): ComponentDefinition
|
|
127
127
|
getProperty(name: string): unknown
|
|
@@ -137,7 +137,7 @@ export declare class ComponentInstance {
|
|
|
137
137
|
window(): JsWindow
|
|
138
138
|
}
|
|
139
139
|
export type JsProperty = Property
|
|
140
|
-
export
|
|
140
|
+
export class Property {
|
|
141
141
|
name: string
|
|
142
142
|
valueType: ValueType
|
|
143
143
|
}
|
|
@@ -147,7 +147,7 @@ export type JsWindow = Window
|
|
|
147
147
|
* scene of a component. It provides API to control windowing system specific aspects such
|
|
148
148
|
* as the position on the screen.
|
|
149
149
|
*/
|
|
150
|
-
export
|
|
150
|
+
export class Window {
|
|
151
151
|
/** @hidden */
|
|
152
152
|
constructor()
|
|
153
153
|
/**
|
|
@@ -194,7 +194,7 @@ export declare class Window {
|
|
|
194
194
|
set minimized(minimized: boolean)
|
|
195
195
|
}
|
|
196
196
|
/** SlintRgbaColor implements {@link RgbaColor}. */
|
|
197
|
-
export
|
|
197
|
+
export class SlintRgbaColor {
|
|
198
198
|
/** Creates a new transparent color. */
|
|
199
199
|
constructor()
|
|
200
200
|
/**
|
|
@@ -246,7 +246,7 @@ export declare class SlintRgbaColor {
|
|
|
246
246
|
toString(): string
|
|
247
247
|
}
|
|
248
248
|
/** SlintBrush implements {@link Brush}. */
|
|
249
|
-
export
|
|
249
|
+
export class SlintBrush {
|
|
250
250
|
constructor(color: RgbaColor)
|
|
251
251
|
static fromBrush(brush: Brush): SlintBrush
|
|
252
252
|
get color(): RgbaColor
|
|
@@ -288,7 +288,7 @@ export declare class SlintBrush {
|
|
|
288
288
|
toString(): string
|
|
289
289
|
}
|
|
290
290
|
/** SlintPoint implements {@link ImageData}. */
|
|
291
|
-
export
|
|
291
|
+
export class SlintImageData {
|
|
292
292
|
/**
|
|
293
293
|
* Constructs a new image with the given width and height.
|
|
294
294
|
* Each pixel will set to red = 0, green = 0, blue = 0 and alpha = 0.
|
|
@@ -307,24 +307,24 @@ export declare class SlintImageData {
|
|
|
307
307
|
/** @hidden */
|
|
308
308
|
get image(): ExternalObject<ImageData>
|
|
309
309
|
}
|
|
310
|
-
export
|
|
311
|
-
export
|
|
310
|
+
export class SharedModelNotify { }
|
|
311
|
+
export class ReadOnlyRustModel {
|
|
312
312
|
rowCount(): number
|
|
313
313
|
rowData(row: number): unknown
|
|
314
314
|
setRowData(row: number, data: unknown): void
|
|
315
315
|
}
|
|
316
|
-
export
|
|
316
|
+
export class ModelIterator {
|
|
317
317
|
next(): unknown
|
|
318
318
|
}
|
|
319
319
|
/** SlintPoint implements {@link Point}. */
|
|
320
|
-
export
|
|
320
|
+
export class SlintPoint {
|
|
321
321
|
x: number
|
|
322
322
|
y: number
|
|
323
323
|
/** Constructs new point from x and y. */
|
|
324
324
|
constructor(x: number, y: number)
|
|
325
325
|
}
|
|
326
326
|
/** SlintPoint implements {@link Size}. */
|
|
327
|
-
export
|
|
327
|
+
export class SlintSize {
|
|
328
328
|
width: number
|
|
329
329
|
height: number
|
|
330
330
|
/** Constructs a size from the given width and height. */
|