@gjsify/adwaita-core 0.59.1 → 0.61.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.
@@ -0,0 +1,25 @@
1
+ /** The slice of a DOM element these members read; core has no DOM lib. */
2
+ interface WidgetNode {
3
+ dir: string;
4
+ readonly isConnected: boolean;
5
+ removeAttribute(name: string): void;
6
+ readonly firstElementChild: unknown;
7
+ readonly lastElementChild: unknown;
8
+ readonly nextElementSibling: unknown;
9
+ readonly previousElementSibling: unknown;
10
+ readonly parentElement: unknown;
11
+ readonly classList: {
12
+ add(name: string): void;
13
+ remove(name: string): void;
14
+ contains(name: string): boolean;
15
+ };
16
+ }
17
+ /**
18
+ * Mirrors the held direction onto the `dir` attribute. A custom element may not take an attribute
19
+ * while `createElement` constructs it, and a widget's constructor is where GTK code pins its
20
+ * direction, so a widget that is not connected yet only holds it; the door calls this on connect.
21
+ */
22
+ export declare function syncDirection(node: WidgetNode): void;
23
+ /** The members of `Gtk.Widget` that a registered class gets from the port. */
24
+ export declare function widgetTreeMembers(): Record<string, (this: WidgetNode, ...args: never[]) => unknown>;
25
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/adwaita-core",
3
- "version": "0.59.1",
3
+ "version": "0.61.0",
4
4
  "description": "Headless Adwaita widget behavior (breakpoint condition grammar + apply/unapply state machine, color-scheme observable, avatar derivation) shared by the web and NativeScript Adwaita renderers — pure TS, no platform imports",
5
5
  "type": "module",
6
6
  "module": "lib/esm/index.js",
@@ -40,12 +40,14 @@
40
40
  "build:test:gjs": "gjsify build src/test.mts --app gjs --outfile test.gjs.mjs",
41
41
  "build:test:node": "gjsify build src/test.mts --app node --outfile test.node.mjs",
42
42
  "build:test:browser": "gjsify build src/test.browser.mts --app browser --outfile dist/test.browser.mjs",
43
+ "build:test:android": "gjsify build src/test.android.mts --app nativescript --format esm --no-minify --outfile dist/test.android.mjs",
43
44
  "test": "gjsify run build:gjsify && gjsify run build:test && gjsify run test:node && gjsify run test:gjs",
44
45
  "test:gjs": "gjsify run test.gjs.mjs",
45
46
  "test:node": "node test.node.mjs",
46
47
  "test:bun": "bun test.node.mjs",
47
48
  "test:deno": "deno run -A --no-lock --node-modules-dir=none --min-dep-age=0 test.node.mjs",
48
- "test:cross-runtime": "gjsify run build:test:node && gjsify run test:node && gjsify run test:bun && gjsify run test:deno"
49
+ "test:cross-runtime": "gjsify run build:test:node && gjsify run test:node && gjsify run test:bun && gjsify run test:deno",
50
+ "test:gjs-on-node": "gjsify build src/test.node-gi.mts --app node --outfile dist/test.node-gi.mjs && node dist/test.node-gi.mjs"
49
51
  },
50
52
  "keywords": [
51
53
  "gjs",
@@ -58,8 +60,9 @@
58
60
  "headless"
59
61
  ],
60
62
  "devDependencies": {
61
- "@gjsify/cli": "^0.59.1",
62
- "@gjsify/unit": "^0.59.1",
63
+ "@gjsify/cli": "^0.61.0",
64
+ "@gjsify/node-gi": "file:../../../packages/node-gi/node-gi",
65
+ "@gjsify/unit": "^0.61.0",
63
66
  "@types/node": "^25.9.2",
64
67
  "typescript": "^6.0.3"
65
68
  },