@gtkx/config 2.0.0-beta.13 → 2.0.0-beta.14

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @gtkx/config
2
2
 
3
- Typed application configuration for GTKX.
3
+ Typed configuration for GTK apps built with GTKX.
4
4
 
5
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.
6
6
 
@@ -14,6 +14,6 @@ export default defineConfig({
14
14
 
15
15
  [Guide](https://gtkx.dev/v2/guide/configuration-and-codegen) · [API reference](https://gtkx.dev/v2/reference/@gtkx/config/) · [GTKX](https://gtkx.dev)
16
16
 
17
- GTKX requires Linux, Node.js, and the [native prerequisites](https://gtkx.dev/v2/guide/getting-started).
17
+ GTKX requires Linux, Node.js, and the [native prerequisites](https://gtkx.dev/v2/guide/getting-started#what-you-need).
18
18
 
19
19
  [MPL-2.0](https://github.com/gtkx-org/gtkx/blob/main/LICENSE).
package/dist/config.d.ts CHANGED
@@ -3,9 +3,17 @@ import { z } from "zod";
3
3
  import { type DeployOptions } from "./deploy.ts";
4
4
  /** Object form of the `reactCompiler` config key, forwarded to `babel-plugin-react-compiler`. */
5
5
  type ReactCompilerOptions = {
6
- /** Which functions the React Compiler processes. */
6
+ /**
7
+ * Which functions the React Compiler processes.
8
+ *
9
+ * @defaultValue `"infer"`, the React Compiler's own default
10
+ */
7
11
  compilationMode?: "all" | "annotation" | "infer" | "syntax" | undefined;
8
- /** Which React Compiler diagnostics fail the build. */
12
+ /**
13
+ * Which React Compiler diagnostics fail the build.
14
+ *
15
+ * @defaultValue `"none"`, the React Compiler's own default
16
+ */
9
17
  panicThreshold?: "all_errors" | "critical_errors" | "none" | undefined;
10
18
  };
11
19
  /**
@@ -18,43 +26,94 @@ type ResolvedReactCompilerOptions = ReactCompilerOptions & {
18
26
  };
19
27
  /**
20
28
  * GTKX project configuration authored in `gtkx.config.ts` and validated when loaded.
29
+ *
30
+ * [Configuration and Codegen](https://gtkx.dev/v2/guide/configuration-and-codegen) shows how to set up the file
31
+ * and what codegen generates from it.
21
32
  */
22
33
  type Config = {
23
34
  /**
24
35
  * Additional GIR libraries to bind, such as `WebKit-6.0`.
25
36
  * Adwaita and GTK are included implicitly and must not be listed.
37
+ *
38
+ * @defaultValue None: GTKX binds `Adw-1`, `Gtk-4.0` and the libraries they depend on
26
39
  */
27
40
  libraries?: string[] | undefined;
28
- /** Additional GIR search directories. Relative paths are resolved from the project root. */
41
+ /**
42
+ * Additional GIR search directories, searched before the system ones. Relative paths are resolved from the
43
+ * project root.
44
+ *
45
+ * @defaultValue None: GTKX searches `/usr/share/gir-1.0` and the GIR directories pkg-config reports for
46
+ * `gobject-introspection-1.0`
47
+ */
29
48
  girPath?: string[] | undefined;
30
49
  /**
31
50
  * GApplication identifier, such as `com.example.Tasks`. Required to run, build or deploy the project as an
32
51
  * application; a package that is not an application, such as a component library, leaves it out.
52
+ *
53
+ * @defaultValue None: the project loads as a package, with `isApplication` set to `false`
33
54
  */
34
55
  applicationId?: string | undefined;
35
- /** Whether to enable the React Compiler, or options passed to it. Enabled by default. */
56
+ /**
57
+ * Whether to enable the React Compiler, or options passed to it. `false` disables it.
58
+ *
59
+ * @defaultValue `true`
60
+ * @example
61
+ * ```ts
62
+ * reactCompiler: { compilationMode: "annotation" },
63
+ * ```
64
+ */
36
65
  reactCompiler?: boolean | ReactCompilerOptions | undefined;
37
66
  /**
38
67
  * Whether GTKX generates project bindings. Set to `false` to reuse an installed binding store.
39
- * Defaults to `true`.
68
+ *
69
+ * @defaultValue `true`
40
70
  */
41
71
  codegen?: boolean | undefined;
42
72
  /**
43
73
  * Additional signals to suppress during React property updates, keyed by GLib type name.
44
74
  * Entries extend the built-in signal lists.
75
+ *
76
+ * @defaultValue `{}`: only the built-in lists
45
77
  */
46
78
  userEventSignals?: Record<string, string[]> | undefined;
47
- /** Custom element behaviors and overrides for generated components, props, and documentation. */
79
+ /**
80
+ * Custom element behaviors and overrides for generated components, props, and documentation.
81
+ *
82
+ * @defaultValue `{}`: no custom behaviors or overrides
83
+ */
48
84
  elements?: ElementsOptions | undefined;
49
- /** Path to an icon theme directory or a single application icon file, relative to the project root. */
85
+ /**
86
+ * Path to an icon theme directory or a single SVG, PNG or XPM application icon file, relative to the project
87
+ * root. Deployment requires an icon.
88
+ *
89
+ * @defaultValue The one `<applicationId>.svg`, `.png` or `.xpm` file in the project root, if exactly one
90
+ * exists
91
+ */
50
92
  applicationIcon?: string | undefined;
51
- /** Application metadata, bundled runtime settings, and packaging options used by `gtkx deploy`. */
93
+ /**
94
+ * Application metadata, bundled runtime settings, and packaging options used by `gtkx deploy`.
95
+ *
96
+ * @defaultValue `{}`: metadata comes from `package.json` and packaging builds a Flatpak
97
+ */
52
98
  deploy?: DeployOptions | undefined;
53
- /** Controls the project instructions and reference files generated for coding agents. */
99
+ /**
100
+ * Controls the project instructions and reference files generated for coding agents.
101
+ *
102
+ * @defaultValue `{}`: an application gets both, a package neither
103
+ */
54
104
  agents?: AgentsOptions | undefined;
55
- /** Default tool selection and access mode for the project's MCP server. Command-line flags take precedence. */
105
+ /**
106
+ * Default tool selection and access mode for the project's MCP server. The `gtkx mcp` flags `--tools` and
107
+ * `--read-only` take precedence.
108
+ *
109
+ * @defaultValue `{}`: every tool, app interactions included
110
+ */
56
111
  mcp?: McpOptions | undefined;
57
- /** Controls warnings for deprecated configuration and behavior. */
112
+ /**
113
+ * Controls warnings for deprecated configuration and behavior.
114
+ *
115
+ * @defaultValue `{}`: every deprecation warning is shown
116
+ */
58
117
  deprecations?: DeprecationsOptions | undefined;
59
118
  };
60
119
  /** A {@link Config} whose `applicationId` is known, as loaded for an application. */
@@ -76,30 +135,64 @@ type ElementPropsExport = {
76
135
  export: string;
77
136
  /**
78
137
  * How the exported props are combined: `intersection` is inherited; `factory` applies only to this type.
79
- * Defaults to `intersection`.
138
+ *
139
+ * @defaultValue `"intersection"`
80
140
  */
81
141
  composition?: "factory" | "intersection" | undefined;
82
- /** Props that can only be set when the element is created; changing them afterward throws. */
142
+ /**
143
+ * Props that can only be set when the element is created; changing them afterward throws.
144
+ *
145
+ * @defaultValue `[]`
146
+ */
83
147
  constructOnly?: string[] | undefined;
84
148
  };
85
149
  /** Overrides for one GLib type in `elements.config`, keyed by its registered type name. */
86
150
  type ElementConfigOptions = {
87
- /** Component export that wraps the generated element. */
151
+ /**
152
+ * Component export that wraps the generated element.
153
+ *
154
+ * @defaultValue None: no wrapper `component`
155
+ */
88
156
  component?: ModuleExport | undefined;
89
- /** Additional props type to combine with the generated element props. */
157
+ /**
158
+ * Additional props type to combine with the generated element props.
159
+ *
160
+ * @defaultValue None: no extra `props` type
161
+ */
90
162
  props?: ElementPropsExport | undefined;
91
- /** Whether the parent container creates this element's GObject instead of the element constructing its own. */
163
+ /**
164
+ * Whether the parent container creates this element's GObject instead of the element constructing its own.
165
+ * Subtypes inherit the setting.
166
+ *
167
+ * @defaultValue `false`
168
+ */
92
169
  isLazy?: boolean | undefined;
93
- /** Accepted child GLib type names to show in the generated element documentation. */
170
+ /**
171
+ * Accepted child GLib type names to show in the generated element documentation.
172
+ *
173
+ * @defaultValue `[]`
174
+ */
94
175
  acceptedChildTypes?: string[] | undefined;
95
- /** GObject properties to leave out of generated props, such as properties managed by an element behavior. */
176
+ /**
177
+ * GObject properties to leave out of generated props, such as properties managed by an element behavior.
178
+ *
179
+ * @defaultValue `[]`: every GObject property becomes a prop
180
+ */
96
181
  omittedProps?: string[] | undefined;
97
182
  };
98
183
  /** The `elements` options: custom element behaviors and per-type overrides for generated elements. */
99
184
  type ElementsOptions = {
100
- /** Path, relative to the project root, of the module exporting the element behavior map. */
185
+ /**
186
+ * Path, relative to the project root, of the module exporting the element behavior map.
187
+ *
188
+ * @defaultValue None: only the behaviors built into `@gtkx/react` apply
189
+ */
101
190
  behaviors?: string | undefined;
102
- /** Element configuration overrides keyed by GLib type name, such as `GtkWidget`. */
191
+ /**
192
+ * Element configuration overrides keyed by GLib type name, such as `GtkWidget`.
193
+ *
194
+ * @defaultValue `{}`
195
+ */
103
196
  config?: Record<string, ElementConfigOptions> | undefined;
104
197
  };
105
198
  /** The `agents` options: which files codegen maintains for coding agents. */
@@ -107,13 +200,16 @@ type AgentsOptions = {
107
200
  /**
108
201
  * Whether codegen maintains the GTKX rules in `AGENTS.md` and creates a missing `CLAUDE.md` import.
109
202
  * `false` removes rules written earlier, deleting `AGENTS.md` and the `CLAUDE.md` import when nothing else
110
- * remains. Defaults to `true` for an application and `false` for a package without an `applicationId`.
203
+ * remains.
204
+ *
205
+ * @defaultValue `true` for an application, `false` for a package without an `applicationId`
111
206
  */
112
207
  rules?: boolean | undefined;
113
208
  /**
114
209
  * Whether codegen writes the generated element reference to `.gtkx/reference` and points the rules at it.
115
- * `false` removes a reference generated earlier. Defaults to `true` for an application and `false` for a
116
- * package without an `applicationId`.
210
+ * `false` removes a reference generated earlier.
211
+ *
212
+ * @defaultValue `true` for an application, `false` for a package without an `applicationId`
117
213
  */
118
214
  reference?: boolean | undefined;
119
215
  };
@@ -122,17 +218,30 @@ type McpOptions = {
122
218
  /**
123
219
  * Tool name patterns applied in order: `*` matches any text and a leading `!` excludes matches.
124
220
  * Omitted, empty, or exclusion-only lists start with all tools; other lists start with none.
221
+ * `gtkx mcp --tools` overrides it.
222
+ *
223
+ * @defaultValue `[]`: every tool
224
+ * @example
225
+ * ```ts
226
+ * tools: ["gtkx_*", "!gtkx_take_screenshot"],
227
+ * ```
125
228
  */
126
229
  tools?: string[] | undefined;
127
230
  /**
128
231
  * Whether the MCP server exposes only inspection and reference tools, excluding app interactions.
129
- * Defaults to `false`.
232
+ * `gtkx mcp --read-only` overrides it.
233
+ *
234
+ * @defaultValue `false`
130
235
  */
131
236
  readOnly?: boolean | undefined;
132
237
  };
133
238
  /** The `deprecations` options: which deprecation warnings stay silent. */
134
239
  type DeprecationsOptions = {
135
- /** Deprecation identifiers whose warnings are suppressed. There are currently no accepted identifiers. */
240
+ /**
241
+ * Deprecation identifiers whose warnings are suppressed. There are currently no accepted identifiers.
242
+ *
243
+ * @defaultValue `[]`
244
+ */
136
245
  silence?: never[] | undefined;
137
246
  };
138
247
  type McpSettings = {
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,KAAK,CAAC;AAG5D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,KAAK,aAAa,EAAgB,MAAM,aAAa,CAAC;AAI/D,iGAAiG;AACjG,KAAK,oBAAoB,GAAG;IACxB,oDAAoD;IACpD,eAAe,CAAC,EAAE,KAAK,GAAG,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;IACxE,uDAAuD;IACvD,cAAc,CAAC,EAAE,YAAY,GAAG,iBAAiB,GAAG,MAAM,GAAG,SAAS,CAAC;CAC1E,CAAC;AAEF;;;GAGG;AACH,KAAK,4BAA4B,GAAG,oBAAoB,GAAG;IACvD,kDAAkD;IAClD,MAAM,EAAE,IAAI,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,KAAK,MAAM,GAAG;IACV;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACjC,4FAA4F;IAC5F,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC/B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,yFAAyF;IACzF,aAAa,CAAC,EAAE,OAAO,GAAG,oBAAoB,GAAG,SAAS,CAAC;IAC3D;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,SAAS,CAAC;IAC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AAM,EAAE,SAAS,IAAI,aAAa,CAAC;AAE9C,MAAM,kBAAkB,GAAG,CAAC,MAAc,EAAe,EAAE,CAAC,CAAC;IACzD,KAAK,EAAE,MAAM,CAAC,GAAG,EAAE,KAAK,IAAI,EAAE;IAC9B,UAAU,EAAE,MAAM,CAAC,GAAG,EAAE,QAAQ,KAAK,IAAI;CAC5C,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,CAAC,MAAyB,EAAE,iBAAyB,EAAE,IAAa,EAAkB,EAAE,CAAC,CAAC;IAC5G,aAAa,EAAE,MAAM,CAAC,aAAa;IACnC,iBAAiB;IACjB,aAAa,EAAE,2BAA2B,CAAC,MAAM,CAAC,aAAa,CAAC;IAChE,gBAAgB,EAAE,uBAAuB,CAAC,MAAM,CAAC,gBAAgB,CAAC;IAClE,QAAQ,EAAE,qBAAqB,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,CAAC;IACjE,YAAY,EAAE,mBAAmB,CAAC,MAAM,CAAC,QAAQ,CAAC;CACrD,CAAC,CAAC;AAEH,OAAO,EACH,YAAY,EACZ,yBAAyB,EACzB,sBAAsB,EACtB,YAAY,EACZ,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,GAchB,CAAC","sourcesContent":["import { createDefineConfig, type DefineConfig } from \"c12\";\nimport { defu } from \"defu\";\nimport { resolve } from \"node:path\";\nimport { z } from \"zod\";\nimport { configError, isRecord } from \"./config-error.ts\";\nimport { type DeployOptions, deploySchema } from \"./deploy.ts\";\nimport { girLibrary, text } from \"./schema-text.ts\";\nimport { resolveUserEventSignals } from \"./user-event-signals.ts\";\n\n/** Object form of the `reactCompiler` config key, forwarded to `babel-plugin-react-compiler`. */\ntype ReactCompilerOptions = {\n /** Which functions the React Compiler processes. */\n compilationMode?: \"all\" | \"annotation\" | \"infer\" | \"syntax\" | undefined;\n /** Which React Compiler diagnostics fail the build. */\n panicThreshold?: \"all_errors\" | \"critical_errors\" | \"none\" | undefined;\n};\n\n/**\n * The React Compiler options the build hands to `babel-plugin-react-compiler`, with the React version\n * GTKX targets filled in.\n */\ntype ResolvedReactCompilerOptions = ReactCompilerOptions & {\n /** React major version the compiler emits for. */\n target: \"19\";\n};\n\n/**\n * GTKX project configuration authored in `gtkx.config.ts` and validated when loaded.\n */\ntype Config = {\n /**\n * Additional GIR libraries to bind, such as `WebKit-6.0`.\n * Adwaita and GTK are included implicitly and must not be listed.\n */\n libraries?: string[] | undefined;\n /** Additional GIR search directories. Relative paths are resolved from the project root. */\n girPath?: string[] | undefined;\n /**\n * GApplication identifier, such as `com.example.Tasks`. Required to run, build or deploy the project as an\n * application; a package that is not an application, such as a component library, leaves it out.\n */\n applicationId?: string | undefined;\n /** Whether to enable the React Compiler, or options passed to it. Enabled by default. */\n reactCompiler?: boolean | ReactCompilerOptions | undefined;\n /**\n * Whether GTKX generates project bindings. Set to `false` to reuse an installed binding store.\n * Defaults to `true`.\n */\n codegen?: boolean | undefined;\n /**\n * Additional signals to suppress during React property updates, keyed by GLib type name.\n * Entries extend the built-in signal lists.\n */\n userEventSignals?: Record<string, string[]> | undefined;\n /** Custom element behaviors and overrides for generated components, props, and documentation. */\n elements?: ElementsOptions | undefined;\n /** Path to an icon theme directory or a single application icon file, relative to the project root. */\n applicationIcon?: string | undefined;\n /** Application metadata, bundled runtime settings, and packaging options used by `gtkx deploy`. */\n deploy?: DeployOptions | undefined;\n /** Controls the project instructions and reference files generated for coding agents. */\n agents?: AgentsOptions | undefined;\n /** Default tool selection and access mode for the project's MCP server. Command-line flags take precedence. */\n mcp?: McpOptions | undefined;\n /** Controls warnings for deprecated configuration and behavior. */\n deprecations?: DeprecationsOptions | undefined;\n};\n/** A {@link Config} whose `applicationId` is known, as loaded for an application. */\ntype ApplicationConfig = Config & { applicationId: string };\n\n/** A named export of a module, which `elements.config` entries reference for components and props. */\ntype ModuleExport = {\n /** Module specifier containing the named export; relative paths start at the project root. */\n module: string;\n /** Name of the export to import from the module. */\n export: string;\n};\n\n/** The props type an `elements.config` entry adds to a generated element, and how it combines with them. */\ntype ElementPropsExport = {\n /** Module specifier containing the named export; relative paths start at the project root. */\n module: string;\n /** Name of the props type to import from the module. */\n export: string;\n /**\n * How the exported props are combined: `intersection` is inherited; `factory` applies only to this type.\n * Defaults to `intersection`.\n */\n composition?: \"factory\" | \"intersection\" | undefined;\n /** Props that can only be set when the element is created; changing them afterward throws. */\n constructOnly?: string[] | undefined;\n};\n\n/** Overrides for one GLib type in `elements.config`, keyed by its registered type name. */\ntype ElementConfigOptions = {\n /** Component export that wraps the generated element. */\n component?: ModuleExport | undefined;\n /** Additional props type to combine with the generated element props. */\n props?: ElementPropsExport | undefined;\n /** Whether the parent container creates this element's GObject instead of the element constructing its own. */\n isLazy?: boolean | undefined;\n /** Accepted child GLib type names to show in the generated element documentation. */\n acceptedChildTypes?: string[] | undefined;\n /** GObject properties to leave out of generated props, such as properties managed by an element behavior. */\n omittedProps?: string[] | undefined;\n};\n\n/** The `elements` options: custom element behaviors and per-type overrides for generated elements. */\ntype ElementsOptions = {\n /** Path, relative to the project root, of the module exporting the element behavior map. */\n behaviors?: string | undefined;\n /** Element configuration overrides keyed by GLib type name, such as `GtkWidget`. */\n config?: Record<string, ElementConfigOptions> | undefined;\n};\n\n/** The `agents` options: which files codegen maintains for coding agents. */\ntype AgentsOptions = {\n /**\n * Whether codegen maintains the GTKX rules in `AGENTS.md` and creates a missing `CLAUDE.md` import.\n * `false` removes rules written earlier, deleting `AGENTS.md` and the `CLAUDE.md` import when nothing else\n * remains. Defaults to `true` for an application and `false` for a package without an `applicationId`.\n */\n rules?: boolean | undefined;\n /**\n * Whether codegen writes the generated element reference to `.gtkx/reference` and points the rules at it.\n * `false` removes a reference generated earlier. Defaults to `true` for an application and `false` for a\n * package without an `applicationId`.\n */\n reference?: boolean | undefined;\n};\n\n/** The `mcp` options: the tools `gtkx mcp` offers by default and whether it may interact with the app. */\ntype McpOptions = {\n /**\n * Tool name patterns applied in order: `*` matches any text and a leading `!` excludes matches.\n * Omitted, empty, or exclusion-only lists start with all tools; other lists start with none.\n */\n tools?: string[] | undefined;\n /**\n * Whether the MCP server exposes only inspection and reference tools, excluding app interactions.\n * Defaults to `false`.\n */\n readOnly?: boolean | undefined;\n};\n\n/** The `deprecations` options: which deprecation warnings stay silent. */\ntype DeprecationsOptions = {\n /** Deprecation identifiers whose warnings are suppressed. There are currently no accepted identifiers. */\n silence?: never[] | undefined;\n};\n\ntype McpSettings = {\n tools: string[];\n isReadOnly: boolean;\n};\n\n/** Configuration reduced to the values the app runtime and the build need, with paths already resolved. */\ntype ResolvedConfig = {\n /** The GApplication identifier the app registers under. */\n applicationId: string;\n /** The gettext domain, which is the `applicationId` production builds use. */\n translationDomain: string;\n /** React Compiler options for the build, or `null` when the compiler is disabled. */\n reactCompiler: ResolvedReactCompilerOptions | null;\n /**\n * Signal names, keyed by GLib type name, that stay suppressed while a React commit writes to a widget.\n * `notify` stays suppressed only for the property being written.\n */\n userEventSignals: Record<string, string[]>;\n /** Path of the module exporting per-element configs, or `null` when none is configured. */\n elements: string | null;\n /** GLib type names of the elements marked `isLazy`, whose GObject their parent container creates. */\n lazyElements: string[];\n};\n\nconst APPLICATION_ID_PATTERN = /^[A-Za-z_][A-Za-z0-9_-]*(\\.[A-Za-z_][A-Za-z0-9_-]*)+$/;\nconst APPLICATION_ID_MAX_LENGTH = 255;\nconst LIBRARY_APPLICATION_ID = \"org.gtkx.Library\";\nconst IMPLICIT_LIBRARIES: Set<string> = new Set([\"Adw-1\", \"Gtk-4.0\"]);\n/** Compilation modes `babel-plugin-react-compiler` accepts. */\nconst COMPILATION_MODES = [\"infer\", \"syntax\", \"annotation\", \"all\"] as const;\n/** Panic thresholds `babel-plugin-react-compiler` accepts. */\nconst PANIC_THRESHOLDS = [\"none\", \"critical_errors\", \"all_errors\"] as const;\nconst REACT_COMPILER_TARGET = \"19\";\n\nconst librarySchema = girLibrary('must be of the form \"Name-Version\", such as \"Adw-1\"').refine(\n (library) => !IMPLICIT_LIBRARIES.has(library),\n { error: \"is bound implicitly; remove it\" },\n);\n\nconst librariesSchema = z\n .array(librarySchema, { error: \"must be a non-empty string array or omitted\" })\n .min(1, { error: \"must be a non-empty string array or omitted\" });\n\nconst applicationIdSchema = z\n .string({\n error: (issue) =>\n issue.input === undefined\n ? 'is required to run, build or deploy an application, such as \"org.example.MyApp\"'\n : \"must satisfy g_application_id_is_valid\",\n })\n .refine((value) => isValidApplicationId(value), {\n error: 'must satisfy g_application_id_is_valid, such as \"org.example.MyApp\"',\n });\n\nconst reactCompilerOptionsSchema = z.strictObject({\n compilationMode: z.enum(COMPILATION_MODES).optional(),\n panicThreshold: z.enum(PANIC_THRESHOLDS).optional(),\n}) satisfies z.ZodType<ReactCompilerOptions>;\n\nconst reactCompilerSchema = z.union([z.boolean(), reactCompilerOptionsSchema]);\n\nconst userEventSignalsSchema = z.record(\n z.string(),\n z.array(\n z.string({ error: \"must be a non-empty signal name\" }).min(1, { error: \"must be a non-empty signal name\" }),\n {\n error: \"must be an array of signal names\",\n },\n ),\n { error: \"must be a record of GLib type names to signal name arrays\" },\n);\n\nconst moduleExportSchema = z.strictObject(\n {\n module: z.string({ error: \"must be a module specifier\" }).min(1, { error: \"must be a module specifier\" }),\n export: z.string({ error: \"must be an export name\" }).min(1, { error: \"must be an export name\" }),\n },\n { error: \"must be a { module, export } object\" },\n) satisfies z.ZodType<ModuleExport>;\n\nconst elementPropsSchema = moduleExportSchema.extend({\n composition: z.enum([\"factory\", \"intersection\"]).optional(),\n constructOnly: z.array(z.string()).optional(),\n}) satisfies z.ZodType<ElementPropsExport>;\n\nconst elementConfigSchema = z.strictObject({\n component: moduleExportSchema.optional(),\n props: elementPropsSchema.optional(),\n isLazy: z.boolean({ error: \"must be a boolean\" }).optional(),\n acceptedChildTypes: z.array(z.string()).optional(),\n omittedProps: z\n .array(\n z.string({ error: \"must be a non-empty property name\" }).min(1, {\n error: \"must be a non-empty property name\",\n }),\n { error: \"must be an array of property names\" },\n )\n .optional(),\n}) satisfies z.ZodType<ElementConfigOptions>;\n\nconst elementsSchema = z.strictObject({\n behaviors: z\n .string({ error: \"must be a path to a module exporting element behaviors\" })\n .min(1, { error: \"must be a path to a module exporting element behaviors\" })\n .optional(),\n config: z.record(z.string(), elementConfigSchema).optional(),\n}) satisfies z.ZodType<ElementsOptions>;\n\nconst agentsSchema = z.strictObject({\n rules: z.boolean({ error: \"must be a boolean\" }).optional(),\n reference: z.boolean({ error: \"must be a boolean\" }).optional(),\n}) satisfies z.ZodType<AgentsOptions>;\n\nconst mcpSchema = z.strictObject({\n tools: z\n .array(z.string({ error: \"must be a tool name pattern\" }).min(1, { error: \"must be a tool name pattern\" }), {\n error: \"must be an array of tool name patterns\",\n })\n .optional(),\n readOnly: z.boolean({ error: \"must be a boolean\" }).optional(),\n}) satisfies z.ZodType<McpOptions>;\n\nconst graduatedFutureSchema = z\n .object({\n v2ByteArrays: z.literal(true, { error: \"can only be true; remove the flag\" }).optional(),\n v2ValueReturns: z.literal(true, { error: \"can only be true; remove the flag\" }).optional(),\n v2FinishResults: z.literal(true, { error: \"can only be true; remove the flag\" }).optional(),\n v2InoutReturns: z.literal(true, { error: \"can only be true; remove the flag\" }).optional(),\n v2ResourceImports: z.literal(true, { error: \"can only be true; remove the flag\" }).optional(),\n v2DefaultLibraries: z.literal(true, { error: \"can only be true; remove the flag\" }).optional(),\n v2TreeShaking: z.literal(true, { error: \"can only be true; remove the flag\" }).optional(),\n })\n .strict();\n\nconst deprecationsSchema = z.strictObject({\n silence: z\n .array(z.never({ error: \"does not name a current deprecation\" }), {\n error: \"must be an array of current deprecation ids\",\n })\n .optional(),\n}) satisfies z.ZodType<DeprecationsOptions>;\n\n/** Schema every `gtkx.config.ts` is validated against. */\nconst configSchema = z.strictObject({\n libraries: librariesSchema.optional(),\n girPath: z.array(z.string(), { error: \"must be an array of strings if provided\" }).optional(),\n applicationId: applicationIdSchema.optional(),\n reactCompiler: reactCompilerSchema.optional(),\n codegen: z.boolean({ error: \"must be a boolean\" }).optional(),\n userEventSignals: userEventSignalsSchema.optional(),\n elements: elementsSchema.optional(),\n applicationIcon: text(\"must be a path to an icon theme directory or a single icon file\").optional(),\n deploy: deploySchema.optional(),\n agents: agentsSchema.optional(),\n mcp: mcpSchema.optional(),\n deprecations: deprecationsSchema.optional(),\n}) satisfies z.ZodType<Config>;\n\n/**\n * Returns the given configuration unchanged, typed as {@link Config}, so `gtkx.config.ts` gets\n * autocompletion and type checking.\n */\nconst defineConfig: DefineConfig<Config> = createDefineConfig<Config>();\nconst validationSchema = configSchema.extend({\n applicationId: applicationIdSchema,\n future: graduatedFutureSchema.optional(),\n});\n\nconst isValidApplicationId = (applicationId: string): boolean =>\n applicationId.length <= APPLICATION_ID_MAX_LENGTH && APPLICATION_ID_PATTERN.test(applicationId);\n\nconst resolveReactCompilerOptions = (setting: Config[\"reactCompiler\"]): ResolvedReactCompilerOptions | null => {\n if (setting === false) {\n return null;\n }\n\n const overrides = setting === undefined || setting === true ? {} : setting;\n\n return {\n ...(overrides.compilationMode !== undefined && { compilationMode: overrides.compilationMode }),\n ...(overrides.panicThreshold !== undefined && { panicThreshold: overrides.panicThreshold }),\n target: REACT_COMPILER_TARGET,\n };\n};\n\nconst validateConfig: (config: unknown, configFile?: string) => asserts config is ApplicationConfig = (\n config,\n configFile,\n) => {\n const result = validationSchema.safeParse(config);\n\n if (!result.success) {\n throw configError(result.error, configFile);\n }\n};\n\nconst graduatedFutureKeys = (config: unknown): string[] => {\n if (!isRecord(config) || !isRecord(config.future)) {\n return [];\n }\n\n return Object.keys(config.future).toSorted((first, second) => first.localeCompare(second));\n};\n\n/**\n * Deep-merges a configuration over a base. `override` wins over `base` on conflicting scalar and object keys, while\n * arrays are concatenated with the `override` entries first.\n */\nconst mergeConfig = (base: Config, override: Config): Config => defu(override, base);\n\nconst resolveElementsModule = (behaviors: string | undefined, root: string | undefined): string | null => {\n if (behaviors === undefined) {\n return null;\n }\n\n return root === undefined ? behaviors : resolve(root, behaviors);\n};\n\nconst resolveLazyElements = (elements: Config[\"elements\"]): string[] =>\n Object.entries(elements?.config ?? {})\n .filter(([, entry]) => entry.isLazy === true)\n .map(([type]) => type);\n\nconst elementEntryValues = <T>(\n elements: Config[\"elements\"],\n pick: (entry: ElementConfigOptions) => T | undefined,\n): Record<string, T> =>\n Object.fromEntries(\n Object.entries(elements?.config ?? {}).flatMap(([type, entry]) => {\n const value = pick(entry);\n\n return value === undefined ? [] : [[type, value] as const];\n }),\n );\n\nconst resolveModuleSpecifier = <T extends { module: string }>(reference: T, root: string): T =>\n reference.module.startsWith(\"./\") || reference.module.startsWith(\"../\")\n ? { ...reference, module: resolve(root, reference.module) }\n : reference;\n\nconst resolveElementComponents = (elements: Config[\"elements\"], root: string): Record<string, ModuleExport> =>\n elementEntryValues(elements, (entry) => entry.component && resolveModuleSpecifier(entry.component, root));\n\nconst resolveElementProps = (elements: Config[\"elements\"], root: string): Record<string, ElementPropsExport> =>\n elementEntryValues(elements, (entry) => entry.props && resolveModuleSpecifier(entry.props, root));\n\nconst resolveAcceptedChildTypes = (elements: Config[\"elements\"]): Record<string, string[]> =>\n elementEntryValues(elements, (entry) => entry.acceptedChildTypes);\n\nconst resolveOmittedProps = (elements: Config[\"elements\"]): Record<string, string[]> =>\n elementEntryValues(elements, (entry) => entry.omittedProps);\n\nconst isAgentRulesEnabled = (config: Config, isApplication: boolean): boolean => config.agents?.rules ?? isApplication;\nconst isAgentReferenceEnabled = (config: Config, isApplication: boolean): boolean =>\n config.agents?.reference ?? isApplication;\n\nconst resolveMcpSettings = (config: Config): McpSettings => ({\n tools: config.mcp?.tools ?? [],\n isReadOnly: config.mcp?.readOnly === true,\n});\n\nconst resolveConfig = (config: ApplicationConfig, translationDomain: string, root?: string): ResolvedConfig => ({\n applicationId: config.applicationId,\n translationDomain,\n reactCompiler: resolveReactCompilerOptions(config.reactCompiler),\n userEventSignals: resolveUserEventSignals(config.userEventSignals),\n elements: resolveElementsModule(config.elements?.behaviors, root),\n lazyElements: resolveLazyElements(config.elements),\n});\n\nexport {\n configSchema,\n APPLICATION_ID_MAX_LENGTH,\n LIBRARY_APPLICATION_ID,\n defineConfig,\n isAgentReferenceEnabled,\n isAgentRulesEnabled,\n isValidApplicationId,\n graduatedFutureKeys,\n validateConfig,\n mergeConfig,\n resolveLazyElements,\n resolveElementComponents,\n resolveElementProps,\n resolveAcceptedChildTypes,\n resolveMcpSettings,\n resolveOmittedProps,\n resolveConfig,\n type AgentsOptions,\n type DeprecationsOptions,\n type ElementsOptions,\n type McpOptions,\n type McpSettings,\n type ReactCompilerOptions,\n type ResolvedReactCompilerOptions,\n type ApplicationConfig,\n type Config,\n type ElementConfigOptions,\n type ElementPropsExport,\n type ModuleExport,\n type ResolvedConfig,\n};\n"]}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAqB,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAsB,YAAY,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAqRlE,MAAM,sBAAsB,GAAG,uDAAuD,CAAC;AACvF,MAAM,yBAAyB,GAAG,GAAG,CAAC;AACtC,MAAM,sBAAsB,GAAG,kBAAkB,CAAC;AAClD,MAAM,kBAAk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KAAK,EAAE,MAAM,CAAC,GAAG,EAAE,KAAK,IAAI,EAAE;IAC9B,UAAU,EAAE,MAAM,CAAC,GAAG,EAAE,QAAQ,KAAK,IAAI;CAC5C,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,CAAC,MAAyB,EAAE,iBAAyB,EAAE,IAAa,EAAkB,EAAE,CAAC,CAAC;IAC5G,aAAa,EAAE,MAAM,CAAC,aAAa;IACnC,iBAAiB;IACjB,aAAa,EAAE,2BAA2B,CAAC,MAAM,CAAC,aAAa,CAAC;IAChE,gBAAgB,EAAE,uBAAuB,CAAC,MAAM,CAAC,gBAAgB,CAAC;IAClE,QAAQ,EAAE,qBAAqB,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,CAAC;IACjE,YAAY,EAAE,mBAAmB,CAAC,MAAM,CAAC,QAAQ,CAAC;CACrD,CAAC,CAAC;AAEH,OAAO,EACH,YAAY,EACZ,yBAAyB,EACzB,sBAAsB,EACtB,YAAY,EACZ,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,GAchB,CAAC","sourcesContent":["import { createDefineConfig, type DefineConfig } from \"c12\";\nimport { defu } from \"defu\";\nimport { resolve } from \"node:path\";\nimport { z } from \"zod\";\nimport { configError, isRecord } from \"./config-error.ts\";\nimport { type DeployOptions, deploySchema } from \"./deploy.ts\";\nimport { girLibrary, text } from \"./schema-text.ts\";\nimport { resolveUserEventSignals } from \"./user-event-signals.ts\";\n\n/** Object form of the `reactCompiler` config key, forwarded to `babel-plugin-react-compiler`. */\ntype ReactCompilerOptions = {\n /**\n * Which functions the React Compiler processes.\n *\n * @defaultValue `\"infer\"`, the React Compiler's own default\n */\n compilationMode?: \"all\" | \"annotation\" | \"infer\" | \"syntax\" | undefined;\n /**\n * Which React Compiler diagnostics fail the build.\n *\n * @defaultValue `\"none\"`, the React Compiler's own default\n */\n panicThreshold?: \"all_errors\" | \"critical_errors\" | \"none\" | undefined;\n};\n\n/**\n * The React Compiler options the build hands to `babel-plugin-react-compiler`, with the React version\n * GTKX targets filled in.\n */\ntype ResolvedReactCompilerOptions = ReactCompilerOptions & {\n /** React major version the compiler emits for. */\n target: \"19\";\n};\n\n/**\n * GTKX project configuration authored in `gtkx.config.ts` and validated when loaded.\n *\n * [Configuration and Codegen](https://gtkx.dev/v2/guide/configuration-and-codegen) shows how to set up the file\n * and what codegen generates from it.\n */\ntype Config = {\n /**\n * Additional GIR libraries to bind, such as `WebKit-6.0`.\n * Adwaita and GTK are included implicitly and must not be listed.\n *\n * @defaultValue None: GTKX binds `Adw-1`, `Gtk-4.0` and the libraries they depend on\n */\n libraries?: string[] | undefined;\n /**\n * Additional GIR search directories, searched before the system ones. Relative paths are resolved from the\n * project root.\n *\n * @defaultValue None: GTKX searches `/usr/share/gir-1.0` and the GIR directories pkg-config reports for\n * `gobject-introspection-1.0`\n */\n girPath?: string[] | undefined;\n /**\n * GApplication identifier, such as `com.example.Tasks`. Required to run, build or deploy the project as an\n * application; a package that is not an application, such as a component library, leaves it out.\n *\n * @defaultValue None: the project loads as a package, with `isApplication` set to `false`\n */\n applicationId?: string | undefined;\n /**\n * Whether to enable the React Compiler, or options passed to it. `false` disables it.\n *\n * @defaultValue `true`\n * @example\n * ```ts\n * reactCompiler: { compilationMode: \"annotation\" },\n * ```\n */\n reactCompiler?: boolean | ReactCompilerOptions | undefined;\n /**\n * Whether GTKX generates project bindings. Set to `false` to reuse an installed binding store.\n *\n * @defaultValue `true`\n */\n codegen?: boolean | undefined;\n /**\n * Additional signals to suppress during React property updates, keyed by GLib type name.\n * Entries extend the built-in signal lists.\n *\n * @defaultValue `{}`: only the built-in lists\n */\n userEventSignals?: Record<string, string[]> | undefined;\n /**\n * Custom element behaviors and overrides for generated components, props, and documentation.\n *\n * @defaultValue `{}`: no custom behaviors or overrides\n */\n elements?: ElementsOptions | undefined;\n /**\n * Path to an icon theme directory or a single SVG, PNG or XPM application icon file, relative to the project\n * root. Deployment requires an icon.\n *\n * @defaultValue The one `<applicationId>.svg`, `.png` or `.xpm` file in the project root, if exactly one\n * exists\n */\n applicationIcon?: string | undefined;\n /**\n * Application metadata, bundled runtime settings, and packaging options used by `gtkx deploy`.\n *\n * @defaultValue `{}`: metadata comes from `package.json` and packaging builds a Flatpak\n */\n deploy?: DeployOptions | undefined;\n /**\n * Controls the project instructions and reference files generated for coding agents.\n *\n * @defaultValue `{}`: an application gets both, a package neither\n */\n agents?: AgentsOptions | undefined;\n /**\n * Default tool selection and access mode for the project's MCP server. The `gtkx mcp` flags `--tools` and\n * `--read-only` take precedence.\n *\n * @defaultValue `{}`: every tool, app interactions included\n */\n mcp?: McpOptions | undefined;\n /**\n * Controls warnings for deprecated configuration and behavior.\n *\n * @defaultValue `{}`: every deprecation warning is shown\n */\n deprecations?: DeprecationsOptions | undefined;\n};\n/** A {@link Config} whose `applicationId` is known, as loaded for an application. */\ntype ApplicationConfig = Config & { applicationId: string };\n\n/** A named export of a module, which `elements.config` entries reference for components and props. */\ntype ModuleExport = {\n /** Module specifier containing the named export; relative paths start at the project root. */\n module: string;\n /** Name of the export to import from the module. */\n export: string;\n};\n\n/** The props type an `elements.config` entry adds to a generated element, and how it combines with them. */\ntype ElementPropsExport = {\n /** Module specifier containing the named export; relative paths start at the project root. */\n module: string;\n /** Name of the props type to import from the module. */\n export: string;\n /**\n * How the exported props are combined: `intersection` is inherited; `factory` applies only to this type.\n *\n * @defaultValue `\"intersection\"`\n */\n composition?: \"factory\" | \"intersection\" | undefined;\n /**\n * Props that can only be set when the element is created; changing them afterward throws.\n *\n * @defaultValue `[]`\n */\n constructOnly?: string[] | undefined;\n};\n\n/** Overrides for one GLib type in `elements.config`, keyed by its registered type name. */\ntype ElementConfigOptions = {\n /**\n * Component export that wraps the generated element.\n *\n * @defaultValue None: no wrapper `component`\n */\n component?: ModuleExport | undefined;\n /**\n * Additional props type to combine with the generated element props.\n *\n * @defaultValue None: no extra `props` type\n */\n props?: ElementPropsExport | undefined;\n /**\n * Whether the parent container creates this element's GObject instead of the element constructing its own.\n * Subtypes inherit the setting.\n *\n * @defaultValue `false`\n */\n isLazy?: boolean | undefined;\n /**\n * Accepted child GLib type names to show in the generated element documentation.\n *\n * @defaultValue `[]`\n */\n acceptedChildTypes?: string[] | undefined;\n /**\n * GObject properties to leave out of generated props, such as properties managed by an element behavior.\n *\n * @defaultValue `[]`: every GObject property becomes a prop\n */\n omittedProps?: string[] | undefined;\n};\n\n/** The `elements` options: custom element behaviors and per-type overrides for generated elements. */\ntype ElementsOptions = {\n /**\n * Path, relative to the project root, of the module exporting the element behavior map.\n *\n * @defaultValue None: only the behaviors built into `@gtkx/react` apply\n */\n behaviors?: string | undefined;\n /**\n * Element configuration overrides keyed by GLib type name, such as `GtkWidget`.\n *\n * @defaultValue `{}`\n */\n config?: Record<string, ElementConfigOptions> | undefined;\n};\n\n/** The `agents` options: which files codegen maintains for coding agents. */\ntype AgentsOptions = {\n /**\n * Whether codegen maintains the GTKX rules in `AGENTS.md` and creates a missing `CLAUDE.md` import.\n * `false` removes rules written earlier, deleting `AGENTS.md` and the `CLAUDE.md` import when nothing else\n * remains.\n *\n * @defaultValue `true` for an application, `false` for a package without an `applicationId`\n */\n rules?: boolean | undefined;\n /**\n * Whether codegen writes the generated element reference to `.gtkx/reference` and points the rules at it.\n * `false` removes a reference generated earlier.\n *\n * @defaultValue `true` for an application, `false` for a package without an `applicationId`\n */\n reference?: boolean | undefined;\n};\n\n/** The `mcp` options: the tools `gtkx mcp` offers by default and whether it may interact with the app. */\ntype McpOptions = {\n /**\n * Tool name patterns applied in order: `*` matches any text and a leading `!` excludes matches.\n * Omitted, empty, or exclusion-only lists start with all tools; other lists start with none.\n * `gtkx mcp --tools` overrides it.\n *\n * @defaultValue `[]`: every tool\n * @example\n * ```ts\n * tools: [\"gtkx_*\", \"!gtkx_take_screenshot\"],\n * ```\n */\n tools?: string[] | undefined;\n /**\n * Whether the MCP server exposes only inspection and reference tools, excluding app interactions.\n * `gtkx mcp --read-only` overrides it.\n *\n * @defaultValue `false`\n */\n readOnly?: boolean | undefined;\n};\n\n/** The `deprecations` options: which deprecation warnings stay silent. */\ntype DeprecationsOptions = {\n /**\n * Deprecation identifiers whose warnings are suppressed. There are currently no accepted identifiers.\n *\n * @defaultValue `[]`\n */\n silence?: never[] | undefined;\n};\n\ntype McpSettings = {\n tools: string[];\n isReadOnly: boolean;\n};\n\n/** Configuration reduced to the values the app runtime and the build need, with paths already resolved. */\ntype ResolvedConfig = {\n /** The GApplication identifier the app registers under. */\n applicationId: string;\n /** The gettext domain, which is the `applicationId` production builds use. */\n translationDomain: string;\n /** React Compiler options for the build, or `null` when the compiler is disabled. */\n reactCompiler: ResolvedReactCompilerOptions | null;\n /**\n * Signal names, keyed by GLib type name, that stay suppressed while a React commit writes to a widget.\n * `notify` stays suppressed only for the property being written.\n */\n userEventSignals: Record<string, string[]>;\n /** Path of the module exporting per-element configs, or `null` when none is configured. */\n elements: string | null;\n /** GLib type names of the elements marked `isLazy`, whose GObject their parent container creates. */\n lazyElements: string[];\n};\n\nconst APPLICATION_ID_PATTERN = /^[A-Za-z_][A-Za-z0-9_-]*(\\.[A-Za-z_][A-Za-z0-9_-]*)+$/;\nconst APPLICATION_ID_MAX_LENGTH = 255;\nconst LIBRARY_APPLICATION_ID = \"org.gtkx.Library\";\nconst IMPLICIT_LIBRARIES: Set<string> = new Set([\"Adw-1\", \"Gtk-4.0\"]);\n/** Compilation modes `babel-plugin-react-compiler` accepts. */\nconst COMPILATION_MODES = [\"infer\", \"syntax\", \"annotation\", \"all\"] as const;\n/** Panic thresholds `babel-plugin-react-compiler` accepts. */\nconst PANIC_THRESHOLDS = [\"none\", \"critical_errors\", \"all_errors\"] as const;\nconst REACT_COMPILER_TARGET = \"19\";\n\nconst librarySchema = girLibrary('must be of the form \"Name-Version\", such as \"Adw-1\"').refine(\n (library) => !IMPLICIT_LIBRARIES.has(library),\n { error: \"is bound implicitly; remove it\" },\n);\n\nconst librariesSchema = z\n .array(librarySchema, { error: \"must be a non-empty string array or omitted\" })\n .min(1, { error: \"must be a non-empty string array or omitted\" });\n\nconst applicationIdSchema = z\n .string({\n error: (issue) =>\n issue.input === undefined\n ? 'is required to run, build or deploy an application, such as \"org.example.MyApp\"'\n : \"must satisfy g_application_id_is_valid\",\n })\n .refine((value) => isValidApplicationId(value), {\n error: 'must satisfy g_application_id_is_valid, such as \"org.example.MyApp\"',\n });\n\nconst reactCompilerOptionsSchema = z.strictObject({\n compilationMode: z.enum(COMPILATION_MODES).optional(),\n panicThreshold: z.enum(PANIC_THRESHOLDS).optional(),\n}) satisfies z.ZodType<ReactCompilerOptions>;\n\nconst reactCompilerSchema = z.union([z.boolean(), reactCompilerOptionsSchema]);\n\nconst userEventSignalsSchema = z.record(\n z.string(),\n z.array(\n z.string({ error: \"must be a non-empty signal name\" }).min(1, { error: \"must be a non-empty signal name\" }),\n {\n error: \"must be an array of signal names\",\n },\n ),\n { error: \"must be a record of GLib type names to signal name arrays\" },\n);\n\nconst moduleExportSchema = z.strictObject(\n {\n module: z.string({ error: \"must be a module specifier\" }).min(1, { error: \"must be a module specifier\" }),\n export: z.string({ error: \"must be an export name\" }).min(1, { error: \"must be an export name\" }),\n },\n { error: \"must be a { module, export } object\" },\n) satisfies z.ZodType<ModuleExport>;\n\nconst elementPropsSchema = moduleExportSchema.extend({\n composition: z.enum([\"factory\", \"intersection\"]).optional(),\n constructOnly: z.array(z.string()).optional(),\n}) satisfies z.ZodType<ElementPropsExport>;\n\nconst elementConfigSchema = z.strictObject({\n component: moduleExportSchema.optional(),\n props: elementPropsSchema.optional(),\n isLazy: z.boolean({ error: \"must be a boolean\" }).optional(),\n acceptedChildTypes: z.array(z.string()).optional(),\n omittedProps: z\n .array(\n z.string({ error: \"must be a non-empty property name\" }).min(1, {\n error: \"must be a non-empty property name\",\n }),\n { error: \"must be an array of property names\" },\n )\n .optional(),\n}) satisfies z.ZodType<ElementConfigOptions>;\n\nconst elementsSchema = z.strictObject({\n behaviors: z\n .string({ error: \"must be a path to a module exporting element behaviors\" })\n .min(1, { error: \"must be a path to a module exporting element behaviors\" })\n .optional(),\n config: z.record(z.string(), elementConfigSchema).optional(),\n}) satisfies z.ZodType<ElementsOptions>;\n\nconst agentsSchema = z.strictObject({\n rules: z.boolean({ error: \"must be a boolean\" }).optional(),\n reference: z.boolean({ error: \"must be a boolean\" }).optional(),\n}) satisfies z.ZodType<AgentsOptions>;\n\nconst mcpSchema = z.strictObject({\n tools: z\n .array(z.string({ error: \"must be a tool name pattern\" }).min(1, { error: \"must be a tool name pattern\" }), {\n error: \"must be an array of tool name patterns\",\n })\n .optional(),\n readOnly: z.boolean({ error: \"must be a boolean\" }).optional(),\n}) satisfies z.ZodType<McpOptions>;\n\nconst graduatedFutureSchema = z\n .object({\n v2ByteArrays: z.literal(true, { error: \"can only be true; remove the flag\" }).optional(),\n v2ValueReturns: z.literal(true, { error: \"can only be true; remove the flag\" }).optional(),\n v2FinishResults: z.literal(true, { error: \"can only be true; remove the flag\" }).optional(),\n v2InoutReturns: z.literal(true, { error: \"can only be true; remove the flag\" }).optional(),\n v2ResourceImports: z.literal(true, { error: \"can only be true; remove the flag\" }).optional(),\n v2DefaultLibraries: z.literal(true, { error: \"can only be true; remove the flag\" }).optional(),\n v2TreeShaking: z.literal(true, { error: \"can only be true; remove the flag\" }).optional(),\n })\n .strict();\n\nconst deprecationsSchema = z.strictObject({\n silence: z\n .array(z.never({ error: \"does not name a current deprecation\" }), {\n error: \"must be an array of current deprecation ids\",\n })\n .optional(),\n}) satisfies z.ZodType<DeprecationsOptions>;\n\n/** Schema every `gtkx.config.ts` is validated against. */\nconst configSchema = z.strictObject({\n libraries: librariesSchema.optional(),\n girPath: z.array(z.string(), { error: \"must be an array of strings if provided\" }).optional(),\n applicationId: applicationIdSchema.optional(),\n reactCompiler: reactCompilerSchema.optional(),\n codegen: z.boolean({ error: \"must be a boolean\" }).optional(),\n userEventSignals: userEventSignalsSchema.optional(),\n elements: elementsSchema.optional(),\n applicationIcon: text(\"must be a path to an icon theme directory or a single icon file\").optional(),\n deploy: deploySchema.optional(),\n agents: agentsSchema.optional(),\n mcp: mcpSchema.optional(),\n deprecations: deprecationsSchema.optional(),\n}) satisfies z.ZodType<Config>;\n\n/**\n * Returns the given configuration unchanged, typed as {@link Config}, so `gtkx.config.ts` gets\n * autocompletion and type checking.\n */\nconst defineConfig: DefineConfig<Config> = createDefineConfig<Config>();\nconst validationSchema = configSchema.extend({\n applicationId: applicationIdSchema,\n future: graduatedFutureSchema.optional(),\n});\n\nconst isValidApplicationId = (applicationId: string): boolean =>\n applicationId.length <= APPLICATION_ID_MAX_LENGTH && APPLICATION_ID_PATTERN.test(applicationId);\n\nconst resolveReactCompilerOptions = (setting: Config[\"reactCompiler\"]): ResolvedReactCompilerOptions | null => {\n if (setting === false) {\n return null;\n }\n\n const overrides = setting === undefined || setting === true ? {} : setting;\n\n return {\n ...(overrides.compilationMode !== undefined && { compilationMode: overrides.compilationMode }),\n ...(overrides.panicThreshold !== undefined && { panicThreshold: overrides.panicThreshold }),\n target: REACT_COMPILER_TARGET,\n };\n};\n\nconst validateConfig: (config: unknown, configFile?: string) => asserts config is ApplicationConfig = (\n config,\n configFile,\n) => {\n const result = validationSchema.safeParse(config);\n\n if (!result.success) {\n throw configError(result.error, configFile);\n }\n};\n\nconst graduatedFutureKeys = (config: unknown): string[] => {\n if (!isRecord(config) || !isRecord(config.future)) {\n return [];\n }\n\n return Object.keys(config.future).toSorted((first, second) => first.localeCompare(second));\n};\n\n/**\n * Deep-merges a configuration over a base. `override` wins over `base` on conflicting scalar and object keys, while\n * arrays are concatenated with the `override` entries first.\n */\nconst mergeConfig = (base: Config, override: Config): Config => defu(override, base);\n\nconst resolveElementsModule = (behaviors: string | undefined, root: string | undefined): string | null => {\n if (behaviors === undefined) {\n return null;\n }\n\n return root === undefined ? behaviors : resolve(root, behaviors);\n};\n\nconst resolveLazyElements = (elements: Config[\"elements\"]): string[] =>\n Object.entries(elements?.config ?? {})\n .filter(([, entry]) => entry.isLazy === true)\n .map(([type]) => type);\n\nconst elementEntryValues = <T>(\n elements: Config[\"elements\"],\n pick: (entry: ElementConfigOptions) => T | undefined,\n): Record<string, T> =>\n Object.fromEntries(\n Object.entries(elements?.config ?? {}).flatMap(([type, entry]) => {\n const value = pick(entry);\n\n return value === undefined ? [] : [[type, value] as const];\n }),\n );\n\nconst resolveModuleSpecifier = <T extends { module: string }>(reference: T, root: string): T =>\n reference.module.startsWith(\"./\") || reference.module.startsWith(\"../\")\n ? { ...reference, module: resolve(root, reference.module) }\n : reference;\n\nconst resolveElementComponents = (elements: Config[\"elements\"], root: string): Record<string, ModuleExport> =>\n elementEntryValues(elements, (entry) => entry.component && resolveModuleSpecifier(entry.component, root));\n\nconst resolveElementProps = (elements: Config[\"elements\"], root: string): Record<string, ElementPropsExport> =>\n elementEntryValues(elements, (entry) => entry.props && resolveModuleSpecifier(entry.props, root));\n\nconst resolveAcceptedChildTypes = (elements: Config[\"elements\"]): Record<string, string[]> =>\n elementEntryValues(elements, (entry) => entry.acceptedChildTypes);\n\nconst resolveOmittedProps = (elements: Config[\"elements\"]): Record<string, string[]> =>\n elementEntryValues(elements, (entry) => entry.omittedProps);\n\nconst isAgentRulesEnabled = (config: Config, isApplication: boolean): boolean => config.agents?.rules ?? isApplication;\nconst isAgentReferenceEnabled = (config: Config, isApplication: boolean): boolean =>\n config.agents?.reference ?? isApplication;\n\nconst resolveMcpSettings = (config: Config): McpSettings => ({\n tools: config.mcp?.tools ?? [],\n isReadOnly: config.mcp?.readOnly === true,\n});\n\nconst resolveConfig = (config: ApplicationConfig, translationDomain: string, root?: string): ResolvedConfig => ({\n applicationId: config.applicationId,\n translationDomain,\n reactCompiler: resolveReactCompilerOptions(config.reactCompiler),\n userEventSignals: resolveUserEventSignals(config.userEventSignals),\n elements: resolveElementsModule(config.elements?.behaviors, root),\n lazyElements: resolveLazyElements(config.elements),\n});\n\nexport {\n configSchema,\n APPLICATION_ID_MAX_LENGTH,\n LIBRARY_APPLICATION_ID,\n defineConfig,\n isAgentReferenceEnabled,\n isAgentRulesEnabled,\n isValidApplicationId,\n graduatedFutureKeys,\n validateConfig,\n mergeConfig,\n resolveLazyElements,\n resolveElementComponents,\n resolveElementProps,\n resolveAcceptedChildTypes,\n resolveMcpSettings,\n resolveOmittedProps,\n resolveConfig,\n type AgentsOptions,\n type DeprecationsOptions,\n type ElementsOptions,\n type McpOptions,\n type McpSettings,\n type ReactCompilerOptions,\n type ResolvedReactCompilerOptions,\n type ApplicationConfig,\n type Config,\n type ElementConfigOptions,\n type ElementPropsExport,\n type ModuleExport,\n type ResolvedConfig,\n};\n"]}