@gjsify/example-dom-three-loader-ldraw 0.53.0 → 0.55.0
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/dist/browser.js +8102 -3066
- package/dist/gjs.js +42 -42
- package/dist/gjs.node.mjs +34 -34
- package/package.json +6 -6
- package/src/gjs/ldraw-window.d.blp.ts +45 -0
- package/src/gjs/ldraw-window.ts +5 -21
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/example-dom-three-loader-ldraw",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.55.0",
|
|
4
4
|
"description": "Three.js LDraw loader showcase ported from refs/three/examples/webgl_loader_ldraw.html with Adwaita controls",
|
|
5
5
|
"main": "dist/gjs.js",
|
|
6
6
|
"type": "module",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"build:assets": "gjsify copy src/browser/index.html src/browser/webgl.css src/assets dist/"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@gjsify/webgl": "^0.
|
|
31
|
+
"@gjsify/webgl": "^0.55.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@girs/adw-1": "5.4.0",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"@girs/gjs": "5.4.0",
|
|
37
37
|
"@girs/gobject-2.0": "5.4.0",
|
|
38
38
|
"@girs/gtk-4.0": "5.4.0",
|
|
39
|
-
"@gjsify/adwaita-web": "^0.
|
|
40
|
-
"@gjsify/cli": "^0.
|
|
41
|
-
"@gjsify/devtools": "^0.
|
|
39
|
+
"@gjsify/adwaita-web": "^0.55.0",
|
|
40
|
+
"@gjsify/cli": "^0.55.0",
|
|
41
|
+
"@gjsify/devtools": "^0.55.0",
|
|
42
42
|
"@gjsify/node-gi": "file:../../../packages/node-gi/node-gi",
|
|
43
|
-
"@gjsify/vite-plugin-blueprint": "^0.
|
|
43
|
+
"@gjsify/vite-plugin-blueprint": "^0.55.0",
|
|
44
44
|
"@types/node": "^25.9.2",
|
|
45
45
|
"@types/three": "^0.185.0",
|
|
46
46
|
"http-server": "^14.1.1",
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// GENERATED from ldraw-window.blp — do not edit. ADR 0088 says what these exports mean.
|
|
2
|
+
// Regenerate with `gjsify blueprint types`; `scripts/check-blueprint-sidecars.mjs` holds it.
|
|
3
|
+
|
|
4
|
+
import type Adw from 'gi://Adw?version=1';
|
|
5
|
+
import type Gtk from 'gi://Gtk?version=4.0';
|
|
6
|
+
|
|
7
|
+
/** The GtkBuilder XML this `.blp` compiles to. */
|
|
8
|
+
declare const xml: string;
|
|
9
|
+
export default xml;
|
|
10
|
+
|
|
11
|
+
/** The class `template $LDrawWindow` defines. */
|
|
12
|
+
export declare const GTypeName: 'LDrawWindow';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Every id inside the template, in source order — what `registerClass` is given.
|
|
16
|
+
*
|
|
17
|
+
* A MUTABLE tuple, and the `readonly` is missing for a reason that is not ours: `@girs`
|
|
18
|
+
* declares `GObject.MetaInfo['InternalChildren']` as `string[]`, so a `readonly` tuple is
|
|
19
|
+
* refused at the call site with TS4104 and the consumer would have to spread it — the
|
|
20
|
+
* boilerplate ADR 0088 exists to remove. The tuple still pins the exact ids and arity,
|
|
21
|
+
* which is the property that matters. `status/open-todos/blueprint.md` carries the
|
|
22
|
+
* upstream half.
|
|
23
|
+
*/
|
|
24
|
+
export declare const InternalChildren: [
|
|
25
|
+
'modelRow',
|
|
26
|
+
'flatColorsRow',
|
|
27
|
+
'mergeModelRow',
|
|
28
|
+
'smoothNormalsRow',
|
|
29
|
+
'buildingStepRow',
|
|
30
|
+
'displayLinesRow',
|
|
31
|
+
'conditionalLinesRow',
|
|
32
|
+
'glAreaContainer',
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
/** The `_`-prefixed members GJS installs for them. Merge it into the class interface. */
|
|
36
|
+
export interface Children {
|
|
37
|
+
_modelRow: Adw.ComboRow;
|
|
38
|
+
_flatColorsRow: Adw.SwitchRow;
|
|
39
|
+
_mergeModelRow: Adw.SwitchRow;
|
|
40
|
+
_smoothNormalsRow: Adw.SwitchRow;
|
|
41
|
+
_buildingStepRow: Adw.SpinRow;
|
|
42
|
+
_displayLinesRow: Adw.SwitchRow;
|
|
43
|
+
_conditionalLinesRow: Adw.SwitchRow;
|
|
44
|
+
_glAreaContainer: Gtk.Box;
|
|
45
|
+
}
|
package/src/gjs/ldraw-window.ts
CHANGED
|
@@ -9,33 +9,17 @@ import Gtk from 'gi://Gtk?version=4.0';
|
|
|
9
9
|
import Adw from 'gi://Adw?version=1';
|
|
10
10
|
import { WebGLBridge } from '@gjsify/webgl';
|
|
11
11
|
import { start, MODEL_LIST, DEFAULT_MODEL_INDEX, type LDrawDemo } from '../three-demo.js';
|
|
12
|
-
import Template from './ldraw-window.blp';
|
|
12
|
+
import Template, { type Children, GTypeName, InternalChildren } from './ldraw-window.blp';
|
|
13
13
|
|
|
14
|
+
// oxlint-disable-next-line no-unsafe-declaration-merging -- intentional: GJS installs the internal children (ADR 0088)
|
|
15
|
+
export interface LDrawWindow extends Children {}
|
|
14
16
|
export class LDrawWindow extends Adw.ApplicationWindow {
|
|
15
|
-
declare private _glAreaContainer: Gtk.Box;
|
|
16
|
-
declare private _modelRow: Adw.ComboRow;
|
|
17
|
-
declare private _flatColorsRow: Adw.SwitchRow;
|
|
18
|
-
declare private _mergeModelRow: Adw.SwitchRow;
|
|
19
|
-
declare private _smoothNormalsRow: Adw.SwitchRow;
|
|
20
|
-
declare private _buildingStepRow: Adw.SpinRow;
|
|
21
|
-
declare private _displayLinesRow: Adw.SwitchRow;
|
|
22
|
-
declare private _conditionalLinesRow: Adw.SwitchRow;
|
|
23
|
-
|
|
24
17
|
static {
|
|
25
18
|
GObject.registerClass(
|
|
26
19
|
{
|
|
27
|
-
GTypeName
|
|
20
|
+
GTypeName,
|
|
28
21
|
Template,
|
|
29
|
-
InternalChildren
|
|
30
|
-
'glAreaContainer',
|
|
31
|
-
'modelRow',
|
|
32
|
-
'flatColorsRow',
|
|
33
|
-
'mergeModelRow',
|
|
34
|
-
'smoothNormalsRow',
|
|
35
|
-
'buildingStepRow',
|
|
36
|
-
'displayLinesRow',
|
|
37
|
-
'conditionalLinesRow',
|
|
38
|
-
],
|
|
22
|
+
InternalChildren,
|
|
39
23
|
},
|
|
40
24
|
this,
|
|
41
25
|
);
|