@gtkx/config 2.0.0-beta.10 → 2.0.0-beta.12

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.
Files changed (68) hide show
  1. package/README.md +11 -169
  2. package/dist/builtin-elements.d.ts +11 -0
  3. package/dist/builtin-elements.d.ts.map +1 -0
  4. package/dist/builtin-elements.js +329 -0
  5. package/dist/builtin-elements.js.map +1 -0
  6. package/dist/config-dependencies.d.ts +5 -3
  7. package/dist/config-dependencies.d.ts.map +1 -1
  8. package/dist/config-dependencies.js +57 -24
  9. package/dist/config-dependencies.js.map +1 -1
  10. package/dist/config-error.d.ts.map +1 -1
  11. package/dist/config-error.js.map +1 -1
  12. package/dist/config-reloader.d.ts +8 -0
  13. package/dist/config-reloader.d.ts.map +1 -0
  14. package/dist/config-reloader.js +32 -0
  15. package/dist/config-reloader.js.map +1 -0
  16. package/dist/config-source.d.ts +9 -0
  17. package/dist/config-source.d.ts.map +1 -0
  18. package/dist/config-source.js +32 -0
  19. package/dist/config-source.js.map +1 -0
  20. package/dist/config.d.ts +63 -29
  21. package/dist/config.d.ts.map +1 -1
  22. package/dist/config.js +72 -12
  23. package/dist/config.js.map +1 -1
  24. package/dist/deploy.d.ts +67 -13
  25. package/dist/deploy.d.ts.map +1 -1
  26. package/dist/deploy.js +169 -12
  27. package/dist/deploy.js.map +1 -1
  28. package/dist/index.d.ts +2 -2
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js.map +1 -1
  31. package/dist/internal.d.ts +5 -3
  32. package/dist/internal.d.ts.map +1 -1
  33. package/dist/internal.js +5 -3
  34. package/dist/internal.js.map +1 -1
  35. package/dist/loader.d.ts +3 -1
  36. package/dist/loader.d.ts.map +1 -1
  37. package/dist/loader.js +18 -35
  38. package/dist/loader.js.map +1 -1
  39. package/dist/node-version.d.ts +2 -1
  40. package/dist/node-version.d.ts.map +1 -1
  41. package/dist/node-version.js +2 -1
  42. package/dist/node-version.js.map +1 -1
  43. package/dist/resource-base-path.d.ts.map +1 -1
  44. package/dist/schema-text.d.ts.map +1 -1
  45. package/dist/user-event-signals.d.ts.map +1 -1
  46. package/dist/virtual.d.ts +1 -1
  47. package/dist/virtual.d.ts.map +1 -1
  48. package/dist/virtual.js +3 -4
  49. package/dist/virtual.js.map +1 -1
  50. package/dist/vite-plugin.d.ts +2 -0
  51. package/dist/vite-plugin.d.ts.map +1 -1
  52. package/dist/vite-plugin.js +4 -3
  53. package/dist/vite-plugin.js.map +1 -1
  54. package/dist/vite-root.d.ts.map +1 -1
  55. package/package.json +15 -16
  56. package/src/builtin-elements.ts +338 -0
  57. package/src/config-dependencies.ts +65 -29
  58. package/src/config-error.ts +5 -3
  59. package/src/config-reloader.ts +45 -0
  60. package/src/config-source.ts +48 -0
  61. package/src/config.ts +87 -18
  62. package/src/deploy.ts +207 -29
  63. package/src/index.ts +9 -2
  64. package/src/internal.ts +5 -2
  65. package/src/loader.ts +27 -52
  66. package/src/node-version.ts +2 -1
  67. package/src/virtual.ts +5 -6
  68. package/src/vite-plugin.ts +9 -4
package/README.md CHANGED
@@ -1,177 +1,19 @@
1
- <p align="center">
2
- <img src="https://raw.githubusercontent.com/gtkx-org/gtkx/main/logo.svg" alt="GTKX" width="100" />
3
- </p>
1
+ # @gtkx/config
4
2
 
5
- <h1 align="center">GTKX</h1>
3
+ Typed application configuration for GTKX.
6
4
 
7
- <p align="center">
8
- The React framework for Linux.<br />
9
- Write native GNOME applications with React and TypeScript.
10
- Real Adwaita and GTK4 widgets with standard web tooling.
11
- </p>
5
+ Use `defineConfig` in `gtkx.config.ts` to declare the application ID, additional native libraries, application icon, and deployment settings. The CLI loads this configuration for development, code generation, and builds.
12
6
 
13
- <p align="center">
14
- <a href="https://www.npmjs.com/package/create-gtkx"><img src="https://img.shields.io/npm/v/create-gtkx?color=cb3837&logo=npm&label=create-gtkx" alt="npm version" /></a>
15
- <a href="https://www.npmjs.com/package/create-gtkx"><img src="https://img.shields.io/npm/dm/create-gtkx?color=cb3837&logo=npm&label=downloads" alt="npm downloads" /></a>
16
- <img src="https://img.shields.io/badge/node-%E2%89%A526.7-339933?logo=node.js&logoColor=white" alt="Node >= 26.7" />
17
- <a href="https://github.com/gtkx-org/gtkx/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MPL--2.0-blue.svg" alt="License: MPL-2.0" /></a>
18
- <a href="https://github.com/gtkx-org/gtkx/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/gtkx-org/gtkx/ci.yml?branch=main&logo=github&label=CI" alt="CI status" /></a>
19
- <img src="https://img.shields.io/badge/TypeScript-strict-3178c6?logo=typescript&logoColor=white" alt="TypeScript" />
20
- </p>
7
+ ```ts
8
+ import { defineConfig } from "@gtkx/config";
21
9
 
22
- <p align="center">
23
- <a href="https://gtkx.dev">Homepage</a> &middot;
24
- <a href="https://gtkx.dev/guide/getting-started">Documentation</a> &middot;
25
- <a href="https://github.com/gtkx-org/gtkx/tree/main/examples">Examples</a> &middot;
26
- <a href="https://github.com/gtkx-org/gtkx/blob/main/CONTRIBUTING.md">Contributing</a>
27
- </p>
28
-
29
- ---
30
-
31
- <p align="center">
32
- <img src="https://raw.githubusercontent.com/gtkx-org/gtkx/main/examples/tutorial/assets/screenshot.png" alt="The Tasks app: an Adwaita window with a sidebar of smart views and colored lists on the left, and a boxed task list on the right." />
33
- </p>
34
-
35
- <p align="center">
36
- <em>The Tasks app you build in the <a href="https://gtkx.dev/tutorial/">tutorial</a>.</em>
37
- </p>
38
-
39
- ## Demo
40
-
41
- This app starts with an Adwaita application shell, renders native GTK4 widgets inside it, and uses ordinary React hooks and events:
42
-
43
- ```tsx
44
- import * as Gtk from "@gtkx/gi/gtk";
45
- import { AdwApplication, AdwApplicationWindow, AdwHeaderBar, AdwToolbarView } from "@gtkx/jsx/adw";
46
- import { GtkBox, GtkButton, GtkLabel } from "@gtkx/jsx/gtk";
47
- import { createRoot, quit } from "@gtkx/react";
48
- import { useState } from "react";
49
-
50
- const Counter = () => {
51
- const [count, setCount] = useState(0);
52
-
53
- return (
54
- <AdwApplicationWindow
55
- title="Hello GTKX"
56
- defaultWidth={400}
57
- defaultHeight={300}
58
- onCloseRequest={quit}
59
- >
60
- <AdwToolbarView topBar={<AdwHeaderBar />}>
61
- <GtkBox
62
- orientation={Gtk.Orientation.VERTICAL}
63
- spacing={20}
64
- marginTop={40}
65
- marginBottom={40}
66
- marginStart={40}
67
- marginEnd={40}
68
- valign={Gtk.Align.CENTER}
69
- halign={Gtk.Align.CENTER}
70
- >
71
- <GtkLabel cssClasses={["title-1"]}>Welcome to GTKX!</GtkLabel>
72
- <GtkLabel cssClasses={["title-2"]}>{`Count: ${String(count)}`}</GtkLabel>
73
- <GtkButton
74
- label="Increment"
75
- onClicked={() => setCount((c) => c + 1)}
76
- cssClasses={["suggested-action", "pill"]}
77
- />
78
- </GtkBox>
79
- </AdwToolbarView>
80
- </AdwApplicationWindow>
81
- );
82
- };
83
-
84
- const App = () => (
85
- <AdwApplication>
86
- <Counter />
87
- </AdwApplication>
88
- );
89
-
90
- createRoot().render(<App />);
91
- ```
92
-
93
- This is the [`hello-world`](https://github.com/gtkx-org/gtkx/tree/main/examples/hello-world) example, with `app.tsx` and `index.tsx` combined into a single snippet. `@gtkx/gi` and `@gtkx/jsx` are per-project bindings generated by the CLI, not packages you install from npm.
94
-
95
- ## Why GTKX
96
-
97
- ### Adwaita-first application development
98
-
99
- GTKX uses Adwaita as the foundation for applications, windows, navigation, dialogs, and adaptive layouts, with the complete GTK4 toolkit underneath. It adds a declarative React layer and an integrated TypeScript toolchain to the GNOME platform:
100
-
101
- - a React reconciler that exposes every GObject as a JSX element,
102
- - a CLI for scaffolding, development, and production builds,
103
- - a dev server with Fast Refresh that patches your running UI in place,
104
- - CSS-in-JS styling, React Hook Form-powered Adwaita controls, gettext-backed react-i18next localization, React Spring animations, React Navigation stack, tab, drawer, and split view navigators, and high-level list, grid, and dialog components,
105
- - a Testing Library-style API for querying and driving your widgets in tests,
106
- - and a Model Context Protocol (MCP) server that exposes your live app to AI agents.
107
-
108
- ### Native GNOME widgets, without a compatibility layer
109
-
110
- React Native and similar frameworks hide the native toolkit so one API can run everywhere. GTKX renders real Adwaita and GTK4 widgets and exposes any other GObject-Introspection library on your system. It is GNOME-native and Linux-only by design.
111
-
112
- ### Why Node.js, and why generated bindings
113
-
114
- GTKX runs on Node.js, which puts native modules, the npm ecosystem, and the tooling built for Node.js APIs within reach. GJS is GNOME's own runtime, built on SpiderMonkey rather than V8; node-gtk runs on Node.js but is lightly maintained, on the older nan/V8 ABI rather than N-API, and still centered on GTK3. The [Why GTKX guide](https://gtkx.dev/guide/why-gtkx) covers what running on Node.js means day to day.
115
-
116
- GTKX generates the TypeScript types and native FFI calls from the same GObject-Introspection data, so the types cannot drift from the calls they back. `Adw-1` is the sole default GIR root; its GIR include pulls in `Gtk-4.0`, so codegen covers both complete API surfaces. Neither belongs in a GTKX 2 `libraries` list.
117
-
118
- At runtime, the native Rust core calls straight into the system Adwaita, GTK4, and GLib libraries through libffi, without loading libgirepository at all.
119
-
120
- ## Quick start
121
-
122
- GTKX is Linux-only and needs Node.js 26.7 or later. See [Requirements](#requirements).
123
-
124
- Scaffold a new app with the `create-gtkx` initializer:
125
-
126
- ```sh
127
- npm create gtkx@beta
10
+ export default defineConfig({
11
+ applicationId: "com.example.MyApp",
12
+ });
128
13
  ```
129
14
 
130
- The same command works with other package managers: `pnpm create gtkx@beta` or `yarn create gtkx@beta`.
131
-
132
- Then run your new app:
133
-
134
- ```sh
135
- cd my-app
136
- npm run dev
137
- ```
138
-
139
- To go further, follow the [tutorial](https://gtkx.dev/tutorial/).
140
-
141
- ## Documentation
142
-
143
- The documentation at **[gtkx.dev](https://gtkx.dev)** includes a step-by-step tutorial that builds a complete GNOME app, from scaffolding to packaging and shipping, plus guides and a full API reference.
144
-
145
- **[Read the docs &rarr;](https://gtkx.dev/guide/why-gtkx)**
146
-
147
- ## Requirements
148
-
149
- GTKX is Linux-only. You need:
150
-
151
- - Linux with the Adwaita (1.8 or later), GTK4 (4.20 or later), and GLib development libraries
152
- - Node.js 26.7 or later
153
-
154
- The `@gtkx/native` addon ships prebuilt for x64 and arm64 glibc Linux; other targets need to build it from the GTKX repository, which requires a Rust toolchain.
155
-
156
- ## Examples
157
-
158
- Explore the [example apps](https://github.com/gtkx-org/gtkx/tree/main/examples):
159
-
160
- - [`hello-world`](https://github.com/gtkx-org/gtkx/tree/main/examples/hello-world): the Adwaita counter above.
161
- - [`gtk-demo`](https://github.com/gtkx-org/gtkx/tree/main/examples/gtk-demo): the official GTK4 widget showcase in an Adwaita application shell, covering lists, dialogs, gestures, CSS, and OpenGL.
162
- - [`browser`](https://github.com/gtkx-org/gtkx/tree/main/examples/browser): an Adwaita browser built around `WebKitWebView`.
163
- - [`animations`](https://github.com/gtkx-org/gtkx/tree/main/examples/animations): an Adwaita showcase for `@gtkx/animated`, with React Spring animations driven by the GTK frame clock.
164
- - [`navigation`](https://github.com/gtkx-org/gtkx/tree/main/examples/navigation): a tour of `@gtkx/navigation`, React Navigation's stack, tab, and drawer navigators rendered with libadwaita.
165
- - [`tutorial`](https://github.com/gtkx-org/gtkx/tree/main/examples/tutorial): the Tasks app the documentation builds.
166
-
167
- ## Status
168
-
169
- GTKX is stable and ready for production use.
170
-
171
- ## Contributing
172
-
173
- Contributions are welcome. See [CONTRIBUTING.md](https://github.com/gtkx-org/gtkx/blob/main/CONTRIBUTING.md), the [Code of Conduct](https://github.com/gtkx-org/gtkx/blob/main/CODE_OF_CONDUCT.md), and the [security policy](https://github.com/gtkx-org/gtkx/blob/main/SECURITY.md). Building the repo needs Node.js 26.7 or later, pnpm, and a Rust toolchain.
15
+ [Guide](https://gtkx.dev/v2/guide/configuration-and-codegen) · [API reference](https://gtkx.dev/v2/reference/@gtkx/config/) · [GTKX](https://gtkx.dev)
174
16
 
175
- ## License
17
+ GTKX requires Linux, Node.js, and the [native prerequisites](https://gtkx.dev/v2/guide/getting-started).
176
18
 
177
- GTKX is licensed under [MPL-2.0](https://github.com/gtkx-org/gtkx/blob/main/LICENSE).
19
+ [MPL-2.0](https://github.com/gtkx-org/gtkx/blob/main/LICENSE).
@@ -0,0 +1,11 @@
1
+ import type { ElementConfigOptions } from "./config.ts";
2
+ declare const SINGLE_CHILD_TYPES: string[];
3
+ declare const CONTENT_SETTER_TYPES: string[];
4
+ /**
5
+ * Built-in GTK and Adwaita element metadata: base props, component wrappers, omitted properties,
6
+ * and parent-created objects. Contains no behaviors and can be imported without loading GI bindings.
7
+ */
8
+ declare const BUILTIN_ELEMENTS: Record<string, ElementConfigOptions>;
9
+ export { SINGLE_CHILD_TYPES, CONTENT_SETTER_TYPES, BUILTIN_ELEMENTS };
10
+ export type { ElementConfigOptions, ElementPropsExport, ModuleExport } from "./config.ts";
11
+ //# sourceMappingURL=builtin-elements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtin-elements.d.ts","sourceRoot":"","sources":["../src/builtin-elements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAgB,MAAM,aAAa,CAAC;AAOtE,QAAA,MAAM,kBAAkB,EAAE,MAAM,EA6B/B,CAAC;AAEF,QAAA,MAAM,oBAAoB,EAAE,MAAM,EAA8C,CAAC;AAEjF;;;GAGG;AACH,QAAA,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAiS1D,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,CAAC;AAEtE,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,329 @@
1
+ const forTypes = (types, config) => Object.fromEntries(types.map((type) => [type, config]));
2
+ const internal = (name) => ({ module: "@gtkx/react/internal", export: name });
3
+ const SINGLE_CHILD_TYPES = [
4
+ "AdwBin",
5
+ "AdwClamp",
6
+ "AdwNavigationPage",
7
+ "AdwSplitButton",
8
+ "AdwStatusPage",
9
+ "AdwTabOverview",
10
+ "AdwToastOverlay",
11
+ "AdwToggle",
12
+ "GtkAspectFrame",
13
+ "GtkButton",
14
+ "GtkCheckButton",
15
+ "GtkDragIcon",
16
+ "GtkExpander",
17
+ "GtkFlowBoxChild",
18
+ "GtkFrame",
19
+ "GtkGraphicsOffload",
20
+ "GtkListBoxRow",
21
+ "GtkListHeader",
22
+ "GtkListItem",
23
+ "GtkMenuButton",
24
+ "GtkPopover",
25
+ "GtkPopoverBin",
26
+ "GtkRevealer",
27
+ "GtkScrolledWindow",
28
+ "GtkSearchBar",
29
+ "GtkTreeExpander",
30
+ "GtkViewport",
31
+ "GtkWindowHandle",
32
+ ];
33
+ const CONTENT_SETTER_TYPES = ["AdwBottomSheet", "AdwOverlaySplitView"];
34
+ /**
35
+ * Built-in GTK and Adwaita element metadata: base props, component wrappers, omitted properties,
36
+ * and parent-created objects. Contains no behaviors and can be imported without loading GI bindings.
37
+ */
38
+ const BUILTIN_ELEMENTS = {
39
+ ...forTypes(SINGLE_CHILD_TYPES, {
40
+ props: internal("ChildrenProps"),
41
+ omittedProps: ["child"],
42
+ }),
43
+ ...forTypes(["GtkHeaderBar", "GtkActionBar"], {
44
+ props: internal("GtkHeaderBarProps"),
45
+ }),
46
+ GtkWindow: {
47
+ props: internal("ChildrenProps"),
48
+ component: internal("createWindowComponent"),
49
+ omittedProps: ["child"],
50
+ },
51
+ GtkApplicationWindow: {
52
+ component: internal("createApplicationWindowComponent"),
53
+ },
54
+ GtkLabel: {
55
+ props: internal("ChildrenProps"),
56
+ },
57
+ GtkTextBuffer: {
58
+ props: internal("ChildrenProps"),
59
+ },
60
+ GtkTextTag: {
61
+ props: internal("ChildrenProps"),
62
+ },
63
+ GtkTextChildAnchor: {
64
+ props: { ...internal("GtkTextChildAnchorProps"), constructOnly: ["replacement"] },
65
+ },
66
+ GtkGridLayoutChild: {
67
+ isLazy: true,
68
+ },
69
+ GtkFixedLayoutChild: {
70
+ isLazy: true,
71
+ },
72
+ GtkOverlayLayoutChild: {
73
+ isLazy: true,
74
+ },
75
+ GtkStackPage: {
76
+ isLazy: true,
77
+ },
78
+ GtkNotebookPage: {
79
+ isLazy: true,
80
+ },
81
+ GActionGroup: {
82
+ props: internal("ActionGroupProps"),
83
+ },
84
+ GtkAccessible: {
85
+ props: { module: "@gtkx/react", export: "AccessibleProps" },
86
+ },
87
+ GtkWidget: {
88
+ props: { ...internal("GtkWidgetProps"), constructOnly: ["textChildAnchor"] },
89
+ },
90
+ GtkBox: {
91
+ props: internal("ChildrenProps"),
92
+ },
93
+ GtkListBox: {
94
+ props: internal("GtkListBoxProps"),
95
+ component: internal("createListBoxComponent"),
96
+ },
97
+ GtkFlowBox: {
98
+ props: internal("ChildrenProps"),
99
+ },
100
+ GtkOverlay: {
101
+ props: internal("GtkOverlayProps"),
102
+ omittedProps: ["child"],
103
+ },
104
+ GtkShortcutController: {
105
+ props: internal("GtkShortcutControllerProps"),
106
+ },
107
+ GtkCallbackAction: {
108
+ component: internal("createCallbackActionComponent"),
109
+ props: {
110
+ ...internal("GtkCallbackActionElementProps"),
111
+ composition: "factory",
112
+ constructOnly: ["callback"],
113
+ },
114
+ },
115
+ GtkCustomLayout: {
116
+ component: internal("createCustomLayoutComponent"),
117
+ props: {
118
+ ...internal("GtkCustomLayoutElementProps"),
119
+ composition: "factory",
120
+ constructOnly: ["requestMode", "measure", "allocate"],
121
+ },
122
+ },
123
+ GtkShortcutTrigger: {
124
+ component: internal("createShortcutTriggerComponent"),
125
+ props: {
126
+ ...internal("GtkShortcutTriggerElementProps"),
127
+ composition: "factory",
128
+ constructOnly: ["accelerator"],
129
+ },
130
+ },
131
+ GtkTextView: {
132
+ acceptedChildTypes: ["GtkTextBuffer", "GtkWidget"],
133
+ props: internal("ChildrenProps"),
134
+ },
135
+ GActionMap: {
136
+ props: internal("ActionMapProps"),
137
+ },
138
+ GMenu: {
139
+ acceptedChildTypes: ["GMenuItem"],
140
+ props: internal("MenuProps"),
141
+ component: internal("createMenuComponent"),
142
+ },
143
+ GMenuItem: {
144
+ component: internal("createMenuItemComponent"),
145
+ props: { ...internal("MenuItemProps"), constructOnly: ["label", "action"] },
146
+ },
147
+ GtkColumnView: {
148
+ acceptedChildTypes: ["GtkColumnViewColumn"],
149
+ props: internal("ChildrenProps"),
150
+ },
151
+ GtkGrid: {
152
+ props: internal("ChildrenProps"),
153
+ },
154
+ GtkFixed: {
155
+ props: internal("ChildrenProps"),
156
+ },
157
+ GtkSizeGroup: {
158
+ props: internal("GtkSizeGroupProps"),
159
+ component: internal("createPortaledComponent"),
160
+ },
161
+ GtkConstraintLayout: {
162
+ component: internal("createConstraintLayoutComponent"),
163
+ props: internal("GtkConstraintLayoutProps"),
164
+ },
165
+ GtkStack: {
166
+ props: internal("ChildrenProps"),
167
+ component: internal("createStackComponent"),
168
+ },
169
+ GtkNotebook: {
170
+ props: internal("ChildrenProps"),
171
+ },
172
+ GtkApplication: {
173
+ acceptedChildTypes: ["GtkWindow"],
174
+ props: { ...internal("GtkApplicationProps"), constructOnly: ["mainOptions"] },
175
+ component: internal("createApplicationComponent"),
176
+ },
177
+ GtkAboutDialog: {
178
+ props: { ...internal("GtkAboutDialogProps"), constructOnly: ["creditSections"] },
179
+ },
180
+ GtkScale: {
181
+ props: internal("GtkScaleProps"),
182
+ },
183
+ GtkCalendar: {
184
+ props: internal("GtkCalendarProps"),
185
+ },
186
+ GtkLevelBar: {
187
+ props: internal("GtkLevelBarProps"),
188
+ },
189
+ GtkDropTarget: {
190
+ props: internal("GtkDropTargetProps"),
191
+ },
192
+ GtkDrawingArea: {
193
+ props: internal("GtkDrawingAreaProps"),
194
+ },
195
+ GtkDragSource: {
196
+ props: internal("GtkDragSourceProps"),
197
+ },
198
+ ...forTypes(CONTENT_SETTER_TYPES, {
199
+ props: internal("ChildrenProps"),
200
+ omittedProps: ["content"],
201
+ }),
202
+ AdwClampScrollable: {
203
+ props: internal("ChildrenProps"),
204
+ omittedProps: ["child"],
205
+ },
206
+ AdwViewStackPage: {
207
+ isLazy: true,
208
+ },
209
+ AdwTabPage: {
210
+ isLazy: true,
211
+ props: { ...internal("AdwTabPageProps"), constructOnly: ["parent"] },
212
+ },
213
+ AdwTabBar: {
214
+ props: internal("AdwTabDropProps"),
215
+ },
216
+ AdwTabOverview: {
217
+ props: internal("AdwTabDropProps"),
218
+ omittedProps: ["child"],
219
+ },
220
+ AdwAboutDialog: {
221
+ props: {
222
+ ...internal("AdwAboutDialogProps"),
223
+ constructOnly: ["links", "creditSections", "acknowledgementSections", "legalSections", "otherApps"],
224
+ },
225
+ },
226
+ AdwLayout: {
227
+ isLazy: true,
228
+ },
229
+ AdwSidebar: {
230
+ acceptedChildTypes: ["AdwSidebarSection"],
231
+ props: internal("ChildrenProps"),
232
+ },
233
+ AdwSidebarSection: {
234
+ acceptedChildTypes: ["AdwSidebarItem"],
235
+ props: internal("ChildrenProps"),
236
+ },
237
+ AdwMultiLayoutView: {
238
+ props: internal("AdwMultiLayoutViewProps"),
239
+ component: internal("createMultiLayoutViewComponent"),
240
+ },
241
+ AdwPreferencesRow: {
242
+ props: internal("AdwPreferencesRowProps"),
243
+ },
244
+ AdwDialog: {
245
+ props: internal("AdwBreakpointsProps"),
246
+ component: internal("createDialogComponent"),
247
+ omittedProps: ["child"],
248
+ },
249
+ AdwApplicationWindow: {
250
+ props: internal("AdwBreakpointsProps"),
251
+ omittedProps: ["content"],
252
+ },
253
+ AdwWindow: {
254
+ props: internal("AdwBreakpointsProps"),
255
+ omittedProps: ["content"],
256
+ },
257
+ AdwBreakpointBin: {
258
+ props: internal("AdwBreakpointsProps"),
259
+ omittedProps: ["child"],
260
+ },
261
+ AdwActionRow: {
262
+ props: internal("AdwPreferencesRowProps"),
263
+ },
264
+ AdwEntryRow: {
265
+ props: internal("AdwPreferencesRowProps"),
266
+ },
267
+ AdwExpanderRow: {
268
+ props: internal("AdwExpanderRowProps"),
269
+ },
270
+ AdwNavigationSplitView: {
271
+ acceptedChildTypes: ["AdwNavigationPage"],
272
+ props: internal("ChildrenProps"),
273
+ omittedProps: ["content"],
274
+ },
275
+ AdwWrapBox: {
276
+ props: internal("ChildrenProps"),
277
+ },
278
+ AdwCarousel: {
279
+ props: internal("ChildrenProps"),
280
+ },
281
+ AdwPreferencesPage: {
282
+ acceptedChildTypes: ["AdwPreferencesGroup"],
283
+ props: internal("ChildrenProps"),
284
+ },
285
+ AdwPreferencesDialog: {
286
+ acceptedChildTypes: ["AdwPreferencesPage"],
287
+ props: internal("ChildrenProps"),
288
+ },
289
+ AdwPreferencesGroup: {
290
+ props: internal("ChildrenProps"),
291
+ },
292
+ AdwTabView: {
293
+ props: internal("ChildrenProps"),
294
+ },
295
+ AdwNavigationView: {
296
+ acceptedChildTypes: ["AdwNavigationPage"],
297
+ props: internal("ChildrenProps"),
298
+ },
299
+ AdwViewStack: {
300
+ props: internal("ChildrenProps"),
301
+ component: internal("createViewStackComponent"),
302
+ },
303
+ AdwToolbarView: {
304
+ props: internal("AdwToolbarViewProps"),
305
+ omittedProps: ["content"],
306
+ },
307
+ AdwHeaderBar: {
308
+ props: internal("GtkHeaderBarProps"),
309
+ },
310
+ AdwShortcutsDialog: {
311
+ acceptedChildTypes: ["AdwShortcutsSection"],
312
+ props: internal("ChildrenProps"),
313
+ },
314
+ AdwShortcutsSection: {
315
+ acceptedChildTypes: ["AdwShortcutsItem"],
316
+ props: internal("ChildrenProps"),
317
+ },
318
+ AdwToggleGroup: {
319
+ props: { ...internal("AdwToggleGroupProps"), composition: "intersection" },
320
+ acceptedChildTypes: ["AdwToggle"],
321
+ component: internal("createToggleGroupComponent"),
322
+ },
323
+ AdwAlertDialog: {
324
+ props: internal("AdwAlertDialogProps"),
325
+ omittedProps: ["extraChild"],
326
+ },
327
+ };
328
+ export { SINGLE_CHILD_TYPES, CONTENT_SETTER_TYPES, BUILTIN_ELEMENTS };
329
+ //# sourceMappingURL=builtin-elements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtin-elements.js","sourceRoot":"","sources":["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AC","sourcesContent":["import type { ElementConfigOptions, ModuleExport } from \"./config.ts\";\n\nconst forTypes = (types: string[], config: ElementConfigOptions): Record<string, ElementConfigOptions> =>\n Object.fromEntries(types.map((type) => [type, config]));\n\nconst internal = (name: string): ModuleExport => ({ module: \"@gtkx/react/internal\", export: name });\n\nconst SINGLE_CHILD_TYPES: string[] = [\n \"AdwBin\",\n \"AdwClamp\",\n \"AdwNavigationPage\",\n \"AdwSplitButton\",\n \"AdwStatusPage\",\n \"AdwTabOverview\",\n \"AdwToastOverlay\",\n \"AdwToggle\",\n \"GtkAspectFrame\",\n \"GtkButton\",\n \"GtkCheckButton\",\n \"GtkDragIcon\",\n \"GtkExpander\",\n \"GtkFlowBoxChild\",\n \"GtkFrame\",\n \"GtkGraphicsOffload\",\n \"GtkListBoxRow\",\n \"GtkListHeader\",\n \"GtkListItem\",\n \"GtkMenuButton\",\n \"GtkPopover\",\n \"GtkPopoverBin\",\n \"GtkRevealer\",\n \"GtkScrolledWindow\",\n \"GtkSearchBar\",\n \"GtkTreeExpander\",\n \"GtkViewport\",\n \"GtkWindowHandle\",\n];\n\nconst CONTENT_SETTER_TYPES: string[] = [\"AdwBottomSheet\", \"AdwOverlaySplitView\"];\n\n/**\n * Built-in GTK and Adwaita element metadata: base props, component wrappers, omitted properties,\n * and parent-created objects. Contains no behaviors and can be imported without loading GI bindings.\n */\nconst BUILTIN_ELEMENTS: Record<string, ElementConfigOptions> = {\n ...forTypes(SINGLE_CHILD_TYPES, {\n props: internal(\"ChildrenProps\"),\n omittedProps: [\"child\"],\n }),\n ...forTypes([\"GtkHeaderBar\", \"GtkActionBar\"], {\n props: internal(\"GtkHeaderBarProps\"),\n }),\n GtkWindow: {\n props: internal(\"ChildrenProps\"),\n component: internal(\"createWindowComponent\"),\n omittedProps: [\"child\"],\n },\n GtkApplicationWindow: {\n component: internal(\"createApplicationWindowComponent\"),\n },\n GtkLabel: {\n props: internal(\"ChildrenProps\"),\n },\n GtkTextBuffer: {\n props: internal(\"ChildrenProps\"),\n },\n GtkTextTag: {\n props: internal(\"ChildrenProps\"),\n },\n GtkTextChildAnchor: {\n props: { ...internal(\"GtkTextChildAnchorProps\"), constructOnly: [\"replacement\"] },\n },\n GtkGridLayoutChild: {\n isLazy: true,\n },\n GtkFixedLayoutChild: {\n isLazy: true,\n },\n GtkOverlayLayoutChild: {\n isLazy: true,\n },\n GtkStackPage: {\n isLazy: true,\n },\n GtkNotebookPage: {\n isLazy: true,\n },\n GActionGroup: {\n props: internal(\"ActionGroupProps\"),\n },\n GtkAccessible: {\n props: { module: \"@gtkx/react\", export: \"AccessibleProps\" },\n },\n GtkWidget: {\n props: { ...internal(\"GtkWidgetProps\"), constructOnly: [\"textChildAnchor\"] },\n },\n GtkBox: {\n props: internal(\"ChildrenProps\"),\n },\n GtkListBox: {\n props: internal(\"GtkListBoxProps\"),\n component: internal(\"createListBoxComponent\"),\n },\n GtkFlowBox: {\n props: internal(\"ChildrenProps\"),\n },\n GtkOverlay: {\n props: internal(\"GtkOverlayProps\"),\n omittedProps: [\"child\"],\n },\n GtkShortcutController: {\n props: internal(\"GtkShortcutControllerProps\"),\n },\n GtkCallbackAction: {\n component: internal(\"createCallbackActionComponent\"),\n props: {\n ...internal(\"GtkCallbackActionElementProps\"),\n composition: \"factory\",\n constructOnly: [\"callback\"],\n },\n },\n GtkCustomLayout: {\n component: internal(\"createCustomLayoutComponent\"),\n props: {\n ...internal(\"GtkCustomLayoutElementProps\"),\n composition: \"factory\",\n constructOnly: [\"requestMode\", \"measure\", \"allocate\"],\n },\n },\n GtkShortcutTrigger: {\n component: internal(\"createShortcutTriggerComponent\"),\n props: {\n ...internal(\"GtkShortcutTriggerElementProps\"),\n composition: \"factory\",\n constructOnly: [\"accelerator\"],\n },\n },\n GtkTextView: {\n acceptedChildTypes: [\"GtkTextBuffer\", \"GtkWidget\"],\n props: internal(\"ChildrenProps\"),\n },\n GActionMap: {\n props: internal(\"ActionMapProps\"),\n },\n GMenu: {\n acceptedChildTypes: [\"GMenuItem\"],\n props: internal(\"MenuProps\"),\n component: internal(\"createMenuComponent\"),\n },\n GMenuItem: {\n component: internal(\"createMenuItemComponent\"),\n props: { ...internal(\"MenuItemProps\"), constructOnly: [\"label\", \"action\"] },\n },\n GtkColumnView: {\n acceptedChildTypes: [\"GtkColumnViewColumn\"],\n props: internal(\"ChildrenProps\"),\n },\n GtkGrid: {\n props: internal(\"ChildrenProps\"),\n },\n GtkFixed: {\n props: internal(\"ChildrenProps\"),\n },\n GtkSizeGroup: {\n props: internal(\"GtkSizeGroupProps\"),\n component: internal(\"createPortaledComponent\"),\n },\n GtkConstraintLayout: {\n component: internal(\"createConstraintLayoutComponent\"),\n props: internal(\"GtkConstraintLayoutProps\"),\n },\n GtkStack: {\n props: internal(\"ChildrenProps\"),\n component: internal(\"createStackComponent\"),\n },\n GtkNotebook: {\n props: internal(\"ChildrenProps\"),\n },\n GtkApplication: {\n acceptedChildTypes: [\"GtkWindow\"],\n props: { ...internal(\"GtkApplicationProps\"), constructOnly: [\"mainOptions\"] },\n component: internal(\"createApplicationComponent\"),\n },\n GtkAboutDialog: {\n props: { ...internal(\"GtkAboutDialogProps\"), constructOnly: [\"creditSections\"] },\n },\n GtkScale: {\n props: internal(\"GtkScaleProps\"),\n },\n GtkCalendar: {\n props: internal(\"GtkCalendarProps\"),\n },\n GtkLevelBar: {\n props: internal(\"GtkLevelBarProps\"),\n },\n GtkDropTarget: {\n props: internal(\"GtkDropTargetProps\"),\n },\n GtkDrawingArea: {\n props: internal(\"GtkDrawingAreaProps\"),\n },\n GtkDragSource: {\n props: internal(\"GtkDragSourceProps\"),\n },\n ...forTypes(CONTENT_SETTER_TYPES, {\n props: internal(\"ChildrenProps\"),\n omittedProps: [\"content\"],\n }),\n AdwClampScrollable: {\n props: internal(\"ChildrenProps\"),\n omittedProps: [\"child\"],\n },\n AdwViewStackPage: {\n isLazy: true,\n },\n AdwTabPage: {\n isLazy: true,\n props: { ...internal(\"AdwTabPageProps\"), constructOnly: [\"parent\"] },\n },\n AdwTabBar: {\n props: internal(\"AdwTabDropProps\"),\n },\n AdwTabOverview: {\n props: internal(\"AdwTabDropProps\"),\n omittedProps: [\"child\"],\n },\n AdwAboutDialog: {\n props: {\n ...internal(\"AdwAboutDialogProps\"),\n constructOnly: [\"links\", \"creditSections\", \"acknowledgementSections\", \"legalSections\", \"otherApps\"],\n },\n },\n AdwLayout: {\n isLazy: true,\n },\n AdwSidebar: {\n acceptedChildTypes: [\"AdwSidebarSection\"],\n props: internal(\"ChildrenProps\"),\n },\n AdwSidebarSection: {\n acceptedChildTypes: [\"AdwSidebarItem\"],\n props: internal(\"ChildrenProps\"),\n },\n AdwMultiLayoutView: {\n props: internal(\"AdwMultiLayoutViewProps\"),\n component: internal(\"createMultiLayoutViewComponent\"),\n },\n AdwPreferencesRow: {\n props: internal(\"AdwPreferencesRowProps\"),\n },\n AdwDialog: {\n props: internal(\"AdwBreakpointsProps\"),\n component: internal(\"createDialogComponent\"),\n omittedProps: [\"child\"],\n },\n AdwApplicationWindow: {\n props: internal(\"AdwBreakpointsProps\"),\n omittedProps: [\"content\"],\n },\n AdwWindow: {\n props: internal(\"AdwBreakpointsProps\"),\n omittedProps: [\"content\"],\n },\n AdwBreakpointBin: {\n props: internal(\"AdwBreakpointsProps\"),\n omittedProps: [\"child\"],\n },\n AdwActionRow: {\n props: internal(\"AdwPreferencesRowProps\"),\n },\n AdwEntryRow: {\n props: internal(\"AdwPreferencesRowProps\"),\n },\n AdwExpanderRow: {\n props: internal(\"AdwExpanderRowProps\"),\n },\n AdwNavigationSplitView: {\n acceptedChildTypes: [\"AdwNavigationPage\"],\n props: internal(\"ChildrenProps\"),\n omittedProps: [\"content\"],\n },\n AdwWrapBox: {\n props: internal(\"ChildrenProps\"),\n },\n AdwCarousel: {\n props: internal(\"ChildrenProps\"),\n },\n AdwPreferencesPage: {\n acceptedChildTypes: [\"AdwPreferencesGroup\"],\n props: internal(\"ChildrenProps\"),\n },\n AdwPreferencesDialog: {\n acceptedChildTypes: [\"AdwPreferencesPage\"],\n props: internal(\"ChildrenProps\"),\n },\n AdwPreferencesGroup: {\n props: internal(\"ChildrenProps\"),\n },\n AdwTabView: {\n props: internal(\"ChildrenProps\"),\n },\n AdwNavigationView: {\n acceptedChildTypes: [\"AdwNavigationPage\"],\n props: internal(\"ChildrenProps\"),\n },\n AdwViewStack: {\n props: internal(\"ChildrenProps\"),\n component: internal(\"createViewStackComponent\"),\n },\n AdwToolbarView: {\n props: internal(\"AdwToolbarViewProps\"),\n omittedProps: [\"content\"],\n },\n AdwHeaderBar: {\n props: internal(\"GtkHeaderBarProps\"),\n },\n AdwShortcutsDialog: {\n acceptedChildTypes: [\"AdwShortcutsSection\"],\n props: internal(\"ChildrenProps\"),\n },\n AdwShortcutsSection: {\n acceptedChildTypes: [\"AdwShortcutsItem\"],\n props: internal(\"ChildrenProps\"),\n },\n AdwToggleGroup: {\n props: { ...internal(\"AdwToggleGroupProps\"), composition: \"intersection\" },\n acceptedChildTypes: [\"AdwToggle\"],\n component: internal(\"createToggleGroupComponent\"),\n },\n AdwAlertDialog: {\n props: internal(\"AdwAlertDialogProps\"),\n omittedProps: [\"extraChild\"],\n },\n};\n\nexport { SINGLE_CHILD_TYPES, CONTENT_SETTER_TYPES, BUILTIN_ELEMENTS };\n\nexport type { ElementConfigOptions, ElementPropsExport, ModuleExport } from \"./config.ts\";\n"]}
@@ -1,11 +1,13 @@
1
- import { type TransformOptions, type TransformResult } from "jiti";
1
+ import { type Jiti } from "jiti";
2
2
  type CapturedConfig<T> = {
3
3
  dependencies: string[];
4
4
  value: T;
5
5
  };
6
- declare const transformConfigModule: (options: TransformOptions) => TransformResult;
6
+ declare const addConfigSource: (path: string) => void;
7
+ declare const createConfigImporter: () => Jiti;
7
8
  declare const setConfigDependencies: (value: object, dependencies: Iterable<string>) => void;
8
9
  declare const configDependenciesFor: (value: unknown) => string[];
9
10
  declare const captureConfigDependencies: <T>(operation: () => Promise<T>) => Promise<CapturedConfig<T>>;
10
- export { captureConfigDependencies, configDependenciesFor, setConfigDependencies, transformConfigModule, };
11
+ declare const loadConfigModule: (path: string) => Promise<unknown>;
12
+ export { addConfigSource, captureConfigDependencies, configDependenciesFor, createConfigImporter, loadConfigModule, setConfigDependencies, };
11
13
  //# sourceMappingURL=config-dependencies.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config-dependencies.d.ts","sourceRoot":"","sources":["../src/config-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,MAAM,CAAC;AAO1F,KAAK,cAAc,CAAC,CAAC,IAAI;IAAE,YAAY,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC;AAuD9D,QAAA,MAAM,qBAAqB,GAAI,SAAS,gBAAgB,KAAG,eAY1D,CAAC;AAEF,QAAA,MAAM,qBAAqB,GAAI,OAAO,MAAM,EAAE,cAAc,QAAQ,CAAC,MAAM,CAAC,KAAG,IAI9E,CAAC;AAEF,QAAA,MAAM,qBAAqB,GAAI,OAAO,OAAO,KAAG,MAAM,EACqC,CAAC;AAE5F,QAAA,MAAM,yBAAyB,GAAU,CAAC,EAAE,WAAW,MAAM,OAAO,CAAC,CAAC,CAAC,KAAG,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAqBlG,CAAC;AAEF,OAAO,EACH,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,GACxB,CAAC"}
1
+ {"version":3,"file":"config-dependencies.d.ts","sourceRoot":"","sources":["../src/config-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,IAAI,EAAE,MAAM,MAAM,CAAC;AAS7C,KAAK,cAAc,CAAC,CAAC,IAAI;IAAE,YAAY,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC;AAoB9D,QAAA,MAAM,eAAe,SAAU,MAAM,KAAG,I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