@gtkx/config 2.0.0-beta.12 → 2.0.0-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builtin-elements.d.ts +13 -1
- package/dist/builtin-elements.d.ts.map +1 -1
- package/dist/builtin-elements.js +47 -10
- package/dist/builtin-elements.js.map +1 -1
- package/dist/config-source.d.ts +2 -2
- package/dist/config-source.d.ts.map +1 -1
- package/dist/config-source.js +10 -7
- package/dist/config-source.js.map +1 -1
- package/dist/config.d.ts +147 -57
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +27 -72
- package/dist/config.js.map +1 -1
- package/dist/deploy.d.ts +370 -50
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +6 -161
- package/dist/deploy.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +1 -1
- package/dist/internal.js.map +1 -1
- package/dist/loader.d.ts +20 -4
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +51 -18
- package/dist/loader.js.map +1 -1
- package/dist/virtual.d.ts.map +1 -1
- package/dist/virtual.js +1 -0
- package/dist/virtual.js.map +1 -1
- package/package.json +4 -4
- package/src/builtin-elements.ts +49 -10
- package/src/config-source.ts +11 -7
- package/src/config.ts +180 -91
- package/src/deploy.ts +431 -194
- package/src/index.ts +34 -2
- package/src/internal.ts +1 -0
- package/src/loader.ts +96 -22
- package/src/virtual.ts +1 -0
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
import type { ElementConfigOptions } from "./config.ts";
|
|
2
2
|
declare const SINGLE_CHILD_TYPES: string[];
|
|
3
3
|
declare const CONTENT_SETTER_TYPES: string[];
|
|
4
|
+
/** `GMenuItem` props written as the GtkBuilder menu attribute of the same name, keyed by prop. */
|
|
5
|
+
declare const MENU_ITEM_ATTRIBUTES: {
|
|
6
|
+
readonly custom: "custom";
|
|
7
|
+
readonly hiddenWhen: "hidden-when";
|
|
8
|
+
readonly accel: "accel";
|
|
9
|
+
readonly icon: "icon";
|
|
10
|
+
readonly verbIcon: "verb-icon";
|
|
11
|
+
readonly useMarkup: "use-markup";
|
|
12
|
+
readonly submenuAction: "submenu-action";
|
|
13
|
+
readonly displayHint: "display-hint";
|
|
14
|
+
readonly textDirection: "text-direction";
|
|
15
|
+
};
|
|
4
16
|
/**
|
|
5
17
|
* Built-in GTK and Adwaita element metadata: base props, component wrappers, omitted properties,
|
|
6
18
|
* and parent-created objects. Contains no behaviors and can be imported without loading GI bindings.
|
|
7
19
|
*/
|
|
8
20
|
declare const BUILTIN_ELEMENTS: Record<string, ElementConfigOptions>;
|
|
9
|
-
export { SINGLE_CHILD_TYPES, CONTENT_SETTER_TYPES, BUILTIN_ELEMENTS };
|
|
21
|
+
export { SINGLE_CHILD_TYPES, CONTENT_SETTER_TYPES, MENU_ITEM_ATTRIBUTES, BUILTIN_ELEMENTS };
|
|
10
22
|
export type { ElementConfigOptions, ElementPropsExport, ModuleExport } from "./config.ts";
|
|
11
23
|
//# sourceMappingURL=builtin-elements.d.ts.map
|
|
@@ -1 +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;
|
|
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;AAKjF,kGAAkG;AAClG,QAAA,MAAM,oBAAoB;qBACd,QAAQ;yBACJ,aAAa;oBAClB,OAAO;mBACR,MAAM;uBACF,WAAW;wBACV,YAAY;4BACR,gBAAgB;0BAClB,cAAc;4BACZ,gBAAgB;CACQ,CAAC;AAE5C;;;GAGG;AACH,QAAA,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAwT1D,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,CAAC;AAE5F,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/builtin-elements.js
CHANGED
|
@@ -31,18 +31,46 @@ const SINGLE_CHILD_TYPES = [
|
|
|
31
31
|
"GtkWindowHandle",
|
|
32
32
|
];
|
|
33
33
|
const CONTENT_SETTER_TYPES = ["AdwBottomSheet", "AdwOverlaySplitView"];
|
|
34
|
+
const SINGLE_CHILD_CONFIG = { props: internal("ChildrenProps"), omittedProps: ["child"] };
|
|
35
|
+
const CONTENT_SETTER_CONFIG = { props: internal("ChildrenProps"), omittedProps: ["content"] };
|
|
36
|
+
/** `GMenuItem` props written as the GtkBuilder menu attribute of the same name, keyed by prop. */
|
|
37
|
+
const MENU_ITEM_ATTRIBUTES = {
|
|
38
|
+
custom: "custom",
|
|
39
|
+
hiddenWhen: "hidden-when",
|
|
40
|
+
accel: "accel",
|
|
41
|
+
icon: "icon",
|
|
42
|
+
verbIcon: "verb-icon",
|
|
43
|
+
useMarkup: "use-markup",
|
|
44
|
+
submenuAction: "submenu-action",
|
|
45
|
+
displayHint: "display-hint",
|
|
46
|
+
textDirection: "text-direction",
|
|
47
|
+
};
|
|
34
48
|
/**
|
|
35
49
|
* Built-in GTK and Adwaita element metadata: base props, component wrappers, omitted properties,
|
|
36
50
|
* and parent-created objects. Contains no behaviors and can be imported without loading GI bindings.
|
|
37
51
|
*/
|
|
38
52
|
const BUILTIN_ELEMENTS = {
|
|
39
|
-
...forTypes(SINGLE_CHILD_TYPES,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
53
|
+
...forTypes(SINGLE_CHILD_TYPES, SINGLE_CHILD_CONFIG),
|
|
54
|
+
GtkSearchBar: {
|
|
55
|
+
...SINGLE_CHILD_CONFIG,
|
|
56
|
+
component: internal("createSearchBarComponent"),
|
|
57
|
+
},
|
|
43
58
|
...forTypes(["GtkHeaderBar", "GtkActionBar"], {
|
|
44
59
|
props: internal("GtkHeaderBarProps"),
|
|
45
60
|
}),
|
|
61
|
+
GtkMenuButton: {
|
|
62
|
+
props: internal("GtkMenuButtonProps"),
|
|
63
|
+
component: internal("createCustomChildrenComponent"),
|
|
64
|
+
omittedProps: ["child"],
|
|
65
|
+
},
|
|
66
|
+
GtkPopoverMenu: {
|
|
67
|
+
props: internal("CustomChildrenProps"),
|
|
68
|
+
component: internal("createCustomChildrenComponent"),
|
|
69
|
+
},
|
|
70
|
+
GtkPopoverMenuBar: {
|
|
71
|
+
props: internal("CustomChildrenProps"),
|
|
72
|
+
component: internal("createCustomChildrenComponent"),
|
|
73
|
+
},
|
|
46
74
|
GtkWindow: {
|
|
47
75
|
props: internal("ChildrenProps"),
|
|
48
76
|
component: internal("createWindowComponent"),
|
|
@@ -142,7 +170,10 @@ const BUILTIN_ELEMENTS = {
|
|
|
142
170
|
},
|
|
143
171
|
GMenuItem: {
|
|
144
172
|
component: internal("createMenuItemComponent"),
|
|
145
|
-
props: {
|
|
173
|
+
props: {
|
|
174
|
+
...internal("MenuItemProps"),
|
|
175
|
+
constructOnly: ["label", "action", ...Object.keys(MENU_ITEM_ATTRIBUTES)],
|
|
176
|
+
},
|
|
146
177
|
},
|
|
147
178
|
GtkColumnView: {
|
|
148
179
|
acceptedChildTypes: ["GtkColumnViewColumn"],
|
|
@@ -195,10 +226,14 @@ const BUILTIN_ELEMENTS = {
|
|
|
195
226
|
GtkDragSource: {
|
|
196
227
|
props: internal("GtkDragSourceProps"),
|
|
197
228
|
},
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
229
|
+
AdwBottomSheet: {
|
|
230
|
+
...CONTENT_SETTER_CONFIG,
|
|
231
|
+
component: internal("createBottomSheetComponent"),
|
|
232
|
+
},
|
|
233
|
+
AdwOverlaySplitView: {
|
|
234
|
+
...CONTENT_SETTER_CONFIG,
|
|
235
|
+
component: internal("createOverlaySplitViewComponent"),
|
|
236
|
+
},
|
|
202
237
|
AdwClampScrollable: {
|
|
203
238
|
props: internal("ChildrenProps"),
|
|
204
239
|
omittedProps: ["child"],
|
|
@@ -215,6 +250,7 @@ const BUILTIN_ELEMENTS = {
|
|
|
215
250
|
},
|
|
216
251
|
AdwTabOverview: {
|
|
217
252
|
props: internal("AdwTabDropProps"),
|
|
253
|
+
component: internal("createTabOverviewComponent"),
|
|
218
254
|
omittedProps: ["child"],
|
|
219
255
|
},
|
|
220
256
|
AdwAboutDialog: {
|
|
@@ -270,6 +306,7 @@ const BUILTIN_ELEMENTS = {
|
|
|
270
306
|
AdwNavigationSplitView: {
|
|
271
307
|
acceptedChildTypes: ["AdwNavigationPage"],
|
|
272
308
|
props: internal("ChildrenProps"),
|
|
309
|
+
component: internal("createNavigationSplitViewComponent"),
|
|
273
310
|
omittedProps: ["content"],
|
|
274
311
|
},
|
|
275
312
|
AdwWrapBox: {
|
|
@@ -325,5 +362,5 @@ const BUILTIN_ELEMENTS = {
|
|
|
325
362
|
omittedProps: ["extraChild"],
|
|
326
363
|
},
|
|
327
364
|
};
|
|
328
|
-
export { SINGLE_CHILD_TYPES, CONTENT_SETTER_TYPES, BUILTIN_ELEMENTS };
|
|
365
|
+
export { SINGLE_CHILD_TYPES, CONTENT_SETTER_TYPES, MENU_ITEM_ATTRIBUTES, BUILTIN_ELEMENTS };
|
|
329
366
|
//# sourceMappingURL=builtin-elements.js.map
|
|
@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C;AAEF,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,CAAC","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
|
+
{"version":3,"file":"builtin-elements.js","sourceRoot":"","sources":["../src/builtin-elements.ts"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG,CAAC,KAAe,EAAE,MAA4B,EAAwC,EAAE,CACrG,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;AAE5D,MAAM,QAAQ,GAAG,C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Q,CAAC,eAAe,CAAC;QAChC,SAAS,EAAE,QAAQ,CAAC,0BAA0B,CAAC;KAClD;IACD,cAAc,EAAE;QACZ,KAAK,EAAE,QAAQ,CAAC,qBAAqB,CAAC;QACtC,YAAY,EAAE,CAAC,SAAS,CAAC;KAC5B;IACD,YAAY,EAAE;QACV,KAAK,EAAE,QAAQ,CAAC,mBAAmB,CAAC;KACvC;IACD,kBAAkB,EAAE;QAChB,kBAAkB,EAAE,CAAC,qBAAqB,CAAC;QAC3C,KAAK,EAAE,QAAQ,CAAC,eAAe,CAAC;KACnC;IACD,mBAAmB,EAAE;QACjB,kBAAkB,EAAE,CAAC,kBAAkB,CAAC;QACxC,KAAK,EAAE,QAAQ,CAAC,eAAe,CAAC;KACnC;IACD,cAAc,EAAE;QACZ,KAAK,EAAE,EAAE,GAAG,QAAQ,CAAC,qBAAqB,CAAC,EAAE,WAAW,EAAE,cAAc,EAAE;QAC1E,kBAAkB,EAAE,CAAC,WAAW,CAAC;QACjC,SAAS,EAAE,QAAQ,CAAC,4BAA4B,CAAC;KACpD;IACD,cAAc,EAAE;QACZ,KAAK,EAAE,QAAQ,CAAC,qBAAqB,CAAC;QACtC,YAAY,EAAE,CAAC,YAAY,CAAC;KAC/B;CACJ,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,CAAC","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\nconst SINGLE_CHILD_CONFIG: ElementConfigOptions = { props: internal(\"ChildrenProps\"), omittedProps: [\"child\"] };\nconst CONTENT_SETTER_CONFIG: ElementConfigOptions = { props: internal(\"ChildrenProps\"), omittedProps: [\"content\"] };\n\n/** `GMenuItem` props written as the GtkBuilder menu attribute of the same name, keyed by prop. */\nconst MENU_ITEM_ATTRIBUTES = {\n custom: \"custom\",\n hiddenWhen: \"hidden-when\",\n accel: \"accel\",\n icon: \"icon\",\n verbIcon: \"verb-icon\",\n useMarkup: \"use-markup\",\n submenuAction: \"submenu-action\",\n displayHint: \"display-hint\",\n textDirection: \"text-direction\",\n} as const satisfies Record<string, string>;\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, SINGLE_CHILD_CONFIG),\n GtkSearchBar: {\n ...SINGLE_CHILD_CONFIG,\n component: internal(\"createSearchBarComponent\"),\n },\n ...forTypes([\"GtkHeaderBar\", \"GtkActionBar\"], {\n props: internal(\"GtkHeaderBarProps\"),\n }),\n GtkMenuButton: {\n props: internal(\"GtkMenuButtonProps\"),\n component: internal(\"createCustomChildrenComponent\"),\n omittedProps: [\"child\"],\n },\n GtkPopoverMenu: {\n props: internal(\"CustomChildrenProps\"),\n component: internal(\"createCustomChildrenComponent\"),\n },\n GtkPopoverMenuBar: {\n props: internal(\"CustomChildrenProps\"),\n component: internal(\"createCustomChildrenComponent\"),\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: {\n ...internal(\"MenuItemProps\"),\n constructOnly: [\"label\", \"action\", ...Object.keys(MENU_ITEM_ATTRIBUTES)],\n },\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 AdwBottomSheet: {\n ...CONTENT_SETTER_CONFIG,\n component: internal(\"createBottomSheetComponent\"),\n },\n AdwOverlaySplitView: {\n ...CONTENT_SETTER_CONFIG,\n component: internal(\"createOverlaySplitViewComponent\"),\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 component: internal(\"createTabOverviewComponent\"),\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 component: internal(\"createNavigationSplitViewComponent\"),\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, MENU_ITEM_ATTRIBUTES, BUILTIN_ELEMENTS };\n\nexport type { ElementConfigOptions, ElementPropsExport, ModuleExport } from \"./config.ts\";\n"]}
|
package/dist/config-source.d.ts
CHANGED
|
@@ -4,6 +4,6 @@ type ConfigResolutionOptions = {
|
|
|
4
4
|
};
|
|
5
5
|
declare const configCandidatePaths: (directory: string) => string[];
|
|
6
6
|
declare const configSourceCandidates: (path: string) => string[];
|
|
7
|
-
declare const
|
|
8
|
-
export { configCandidatePaths, configSourceCandidates,
|
|
7
|
+
declare const localConfigSourcePaths: (source: string, options: ConfigResolutionOptions) => string[];
|
|
8
|
+
export { configCandidatePaths, configSourceCandidates, localConfigSourcePaths, type ConfigResolutionOptions };
|
|
9
9
|
//# sourceMappingURL=config-source.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-source.d.ts","sourceRoot":"","sources":["../src/config-source.ts"],"names":[],"mappings":"AAGA,KAAK,uBAAuB,GAAG;IAAE,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAK7F,QAAA,MAAM,oBAAoB,cAAe,MAAM,KAAG,MAAM,EAGnD,CAAC;AAEN,QAAA,MAAM,sBAAsB,SAAU,MAAM,KAAG,MAAM,EAYpD,CAAC;AAUF,QAAA,MAAM,
|
|
1
|
+
{"version":3,"file":"config-source.d.ts","sourceRoot":"","sources":["../src/config-source.ts"],"names":[],"mappings":"AAGA,KAAK,uBAAuB,GAAG;IAAE,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAK7F,QAAA,MAAM,oBAAoB,cAAe,MAAM,KAAG,MAAM,EAGnD,CAAC;AAEN,QAAA,MAAM,sBAAsB,SAAU,MAAM,KAAG,MAAM,EAYpD,CAAC;AAUF,QAAA,MAAM,sBAAsB,WAAY,MAAM,WAAW,uBAAuB,KAAG,MAAM,EAcxF,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,KAAK,uBAAuB,EAAE,CAAC"}
|
package/dist/config-source.js
CHANGED
|
@@ -19,14 +19,17 @@ const isDirectoryConfigSource = (source) => {
|
|
|
19
19
|
const extension = extname(source);
|
|
20
20
|
return extension.length === 0 || extension === basename(source);
|
|
21
21
|
};
|
|
22
|
-
const
|
|
22
|
+
const localConfigSourcePaths = (source, options) => {
|
|
23
23
|
if (source === "." || !isLocalConfigSource(source)) {
|
|
24
|
-
return
|
|
24
|
+
return [];
|
|
25
25
|
}
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
const path = resolve(options.cwd ?? process.cwd(), source);
|
|
27
|
+
if (!isDirectoryConfigSource(source)) {
|
|
28
|
+
return [path];
|
|
29
|
+
}
|
|
30
|
+
return options.configFile === undefined || options.configFile === CONFIG_LOCATIONS[0]
|
|
31
|
+
? configCandidatePaths(path)
|
|
32
|
+
: [join(path, options.configFile)];
|
|
30
33
|
};
|
|
31
|
-
export { configCandidatePaths, configSourceCandidates,
|
|
34
|
+
export { configCandidatePaths, configSourceCandidates, localConfigSourcePaths };
|
|
32
35
|
//# sourceMappingURL=config-source.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-source.js","sourceRoot":"","sources":["../src/config-source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,KAAK,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzE,MAAM,gBAAgB,GAAG,CAAC,aAAa,EAAE,cAAc,EAAE,qBAAqB,CAAC,CAAC;AAChF,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,MA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,OAAO,CAAC,UAAU,KAAK,gBAAgB,CAAC,CAAC,CAAC;QACjF,CAAC,CAAC,oBAAoB,CAAC,IAAI,CAAC;QAC5B,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;AAC3C,CAAC,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,sBAAsB,EAAgC,CAAC","sourcesContent":["import { SUPPORTED_EXTENSIONS } from \"c12\";\nimport { basename, extname, isAbsolute, join, resolve } from \"node:path\";\n\ntype ConfigResolutionOptions = { configFile?: string | undefined; cwd?: string | undefined };\n\nconst CONFIG_LOCATIONS = [\"gtkx.config\", \".config/gtkx\", \".config/gtkx.config\"];\nconst CONFIG_EXTENSIONS = SUPPORTED_EXTENSIONS.filter((extension) => extension !== \".cjs\" && extension !== \".cts\");\n\nconst configCandidatePaths = (directory: string): string[] =>\n CONFIG_LOCATIONS.flatMap((location) =>\n CONFIG_EXTENSIONS.map((extension) => join(directory, `${location}${extension}`)),\n );\n\nconst configSourceCandidates = (path: string): string[] => {\n const extension = extname(path);\n const fallback = extension === \".js\" ? \".ts\" : extension === \".mjs\" ? \".mts\" : undefined;\n\n if (extension.length > 0) {\n return fallback === undefined ? [path] : [path, `${path.slice(0, -extension.length)}${fallback}`];\n }\n\n return [\n path,\n ...CONFIG_EXTENSIONS.flatMap((candidate) => [`${path}${candidate}`, join(path, `index${candidate}`)]),\n ];\n};\n\nconst isLocalConfigSource = (source: string): boolean => source.startsWith(\".\") || isAbsolute(source);\n\nconst isDirectoryConfigSource = (source: string): boolean => {\n const extension = extname(source);\n\n return extension.length === 0 || extension === basename(source);\n};\n\nconst localConfigSourcePaths = (source: string, options: ConfigResolutionOptions): string[] => {\n if (source === \".\" || !isLocalConfigSource(source)) {\n return [];\n }\n\n const path = resolve(options.cwd ?? process.cwd(), source);\n\n if (!isDirectoryConfigSource(source)) {\n return [path];\n }\n\n return options.configFile === undefined || options.configFile === CONFIG_LOCATIONS[0]\n ? configCandidatePaths(path)\n : [join(path, options.configFile)];\n};\n\nexport { configCandidatePaths, configSourceCandidates, localConfigSourcePaths, type ConfigResolutionOptions };\n"]}
|
package/dist/config.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { type DefineConfig } from "c12";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { type DeployOptions } from "./deploy.ts";
|
|
3
4
|
/** Object form of the `reactCompiler` config key, forwarded to `babel-plugin-react-compiler`. */
|
|
4
5
|
type ReactCompilerOptions = {
|
|
5
|
-
/** Which functions the
|
|
6
|
-
compilationMode?:
|
|
7
|
-
/** Which
|
|
8
|
-
panicThreshold?:
|
|
6
|
+
/** Which functions the React Compiler processes. */
|
|
7
|
+
compilationMode?: "all" | "annotation" | "infer" | "syntax" | undefined;
|
|
8
|
+
/** Which React Compiler diagnostics fail the build. */
|
|
9
|
+
panicThreshold?: "all_errors" | "critical_errors" | "none" | undefined;
|
|
9
10
|
};
|
|
10
11
|
/**
|
|
11
12
|
* The React Compiler options the build hands to `babel-plugin-react-compiler`, with the React version
|
|
@@ -18,11 +19,122 @@ type ResolvedReactCompilerOptions = ReactCompilerOptions & {
|
|
|
18
19
|
/**
|
|
19
20
|
* GTKX project configuration authored in `gtkx.config.ts` and validated when loaded.
|
|
20
21
|
*/
|
|
21
|
-
type Config =
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
type Config = {
|
|
23
|
+
/**
|
|
24
|
+
* Additional GIR libraries to bind, such as `WebKit-6.0`.
|
|
25
|
+
* Adwaita and GTK are included implicitly and must not be listed.
|
|
26
|
+
*/
|
|
27
|
+
libraries?: string[] | undefined;
|
|
28
|
+
/** Additional GIR search directories. Relative paths are resolved from the project root. */
|
|
29
|
+
girPath?: string[] | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* GApplication identifier, such as `com.example.Tasks`. Required to run, build or deploy the project as an
|
|
32
|
+
* application; a package that is not an application, such as a component library, leaves it out.
|
|
33
|
+
*/
|
|
34
|
+
applicationId?: string | undefined;
|
|
35
|
+
/** Whether to enable the React Compiler, or options passed to it. Enabled by default. */
|
|
36
|
+
reactCompiler?: boolean | ReactCompilerOptions | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Whether GTKX generates project bindings. Set to `false` to reuse an installed binding store.
|
|
39
|
+
* Defaults to `true`.
|
|
40
|
+
*/
|
|
41
|
+
codegen?: boolean | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Additional signals to suppress during React property updates, keyed by GLib type name.
|
|
44
|
+
* Entries extend the built-in signal lists.
|
|
45
|
+
*/
|
|
46
|
+
userEventSignals?: Record<string, string[]> | undefined;
|
|
47
|
+
/** Custom element behaviors and overrides for generated components, props, and documentation. */
|
|
48
|
+
elements?: ElementsOptions | undefined;
|
|
49
|
+
/** Path to an icon theme directory or a single application icon file, relative to the project root. */
|
|
50
|
+
applicationIcon?: string | undefined;
|
|
51
|
+
/** Application metadata, bundled runtime settings, and packaging options used by `gtkx deploy`. */
|
|
52
|
+
deploy?: DeployOptions | undefined;
|
|
53
|
+
/** Controls the project instructions and reference files generated for coding agents. */
|
|
54
|
+
agents?: AgentsOptions | undefined;
|
|
55
|
+
/** Default tool selection and access mode for the project's MCP server. Command-line flags take precedence. */
|
|
56
|
+
mcp?: McpOptions | undefined;
|
|
57
|
+
/** Controls warnings for deprecated configuration and behavior. */
|
|
58
|
+
deprecations?: DeprecationsOptions | undefined;
|
|
59
|
+
};
|
|
60
|
+
/** A {@link Config} whose `applicationId` is known, as loaded for an application. */
|
|
61
|
+
type ApplicationConfig = Config & {
|
|
62
|
+
applicationId: string;
|
|
63
|
+
};
|
|
64
|
+
/** A named export of a module, which `elements.config` entries reference for components and props. */
|
|
65
|
+
type ModuleExport = {
|
|
66
|
+
/** Module specifier containing the named export; relative paths start at the project root. */
|
|
67
|
+
module: string;
|
|
68
|
+
/** Name of the export to import from the module. */
|
|
69
|
+
export: string;
|
|
70
|
+
};
|
|
71
|
+
/** The props type an `elements.config` entry adds to a generated element, and how it combines with them. */
|
|
72
|
+
type ElementPropsExport = {
|
|
73
|
+
/** Module specifier containing the named export; relative paths start at the project root. */
|
|
74
|
+
module: string;
|
|
75
|
+
/** Name of the props type to import from the module. */
|
|
76
|
+
export: string;
|
|
77
|
+
/**
|
|
78
|
+
* How the exported props are combined: `intersection` is inherited; `factory` applies only to this type.
|
|
79
|
+
* Defaults to `intersection`.
|
|
80
|
+
*/
|
|
81
|
+
composition?: "factory" | "intersection" | undefined;
|
|
82
|
+
/** Props that can only be set when the element is created; changing them afterward throws. */
|
|
83
|
+
constructOnly?: string[] | undefined;
|
|
84
|
+
};
|
|
24
85
|
/** Overrides for one GLib type in `elements.config`, keyed by its registered type name. */
|
|
25
|
-
type ElementConfigOptions =
|
|
86
|
+
type ElementConfigOptions = {
|
|
87
|
+
/** Component export that wraps the generated element. */
|
|
88
|
+
component?: ModuleExport | undefined;
|
|
89
|
+
/** Additional props type to combine with the generated element props. */
|
|
90
|
+
props?: ElementPropsExport | undefined;
|
|
91
|
+
/** Whether the parent container creates this element's GObject instead of the element constructing its own. */
|
|
92
|
+
isLazy?: boolean | undefined;
|
|
93
|
+
/** Accepted child GLib type names to show in the generated element documentation. */
|
|
94
|
+
acceptedChildTypes?: string[] | undefined;
|
|
95
|
+
/** GObject properties to leave out of generated props, such as properties managed by an element behavior. */
|
|
96
|
+
omittedProps?: string[] | undefined;
|
|
97
|
+
};
|
|
98
|
+
/** The `elements` options: custom element behaviors and per-type overrides for generated elements. */
|
|
99
|
+
type ElementsOptions = {
|
|
100
|
+
/** Path, relative to the project root, of the module exporting the element behavior map. */
|
|
101
|
+
behaviors?: string | undefined;
|
|
102
|
+
/** Element configuration overrides keyed by GLib type name, such as `GtkWidget`. */
|
|
103
|
+
config?: Record<string, ElementConfigOptions> | undefined;
|
|
104
|
+
};
|
|
105
|
+
/** The `agents` options: which files codegen maintains for coding agents. */
|
|
106
|
+
type AgentsOptions = {
|
|
107
|
+
/**
|
|
108
|
+
* Whether codegen maintains the GTKX rules in `AGENTS.md` and creates a missing `CLAUDE.md` import.
|
|
109
|
+
* `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`.
|
|
111
|
+
*/
|
|
112
|
+
rules?: boolean | undefined;
|
|
113
|
+
/**
|
|
114
|
+
* 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`.
|
|
117
|
+
*/
|
|
118
|
+
reference?: boolean | undefined;
|
|
119
|
+
};
|
|
120
|
+
/** The `mcp` options: the tools `gtkx mcp` offers by default and whether it may interact with the app. */
|
|
121
|
+
type McpOptions = {
|
|
122
|
+
/**
|
|
123
|
+
* Tool name patterns applied in order: `*` matches any text and a leading `!` excludes matches.
|
|
124
|
+
* Omitted, empty, or exclusion-only lists start with all tools; other lists start with none.
|
|
125
|
+
*/
|
|
126
|
+
tools?: string[] | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* Whether the MCP server exposes only inspection and reference tools, excluding app interactions.
|
|
129
|
+
* Defaults to `false`.
|
|
130
|
+
*/
|
|
131
|
+
readOnly?: boolean | undefined;
|
|
132
|
+
};
|
|
133
|
+
/** The `deprecations` options: which deprecation warnings stay silent. */
|
|
134
|
+
type DeprecationsOptions = {
|
|
135
|
+
/** Deprecation identifiers whose warnings are suppressed. There are currently no accepted identifiers. */
|
|
136
|
+
silence?: never[] | undefined;
|
|
137
|
+
};
|
|
26
138
|
type McpSettings = {
|
|
27
139
|
tools: string[];
|
|
28
140
|
isReadOnly: boolean;
|
|
@@ -31,6 +143,8 @@ type McpSettings = {
|
|
|
31
143
|
type ResolvedConfig = {
|
|
32
144
|
/** The GApplication identifier the app registers under. */
|
|
33
145
|
applicationId: string;
|
|
146
|
+
/** The gettext domain, which is the `applicationId` production builds use. */
|
|
147
|
+
translationDomain: string;
|
|
34
148
|
/** React Compiler options for the build, or `null` when the compiler is disabled. */
|
|
35
149
|
reactCompiler: ResolvedReactCompilerOptions | null;
|
|
36
150
|
/**
|
|
@@ -44,47 +158,12 @@ type ResolvedConfig = {
|
|
|
44
158
|
lazyElements: string[];
|
|
45
159
|
};
|
|
46
160
|
declare const APPLICATION_ID_MAX_LENGTH = 255;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
/** Panic thresholds `babel-plugin-react-compiler` accepts. */
|
|
50
|
-
declare const PANIC_THRESHOLDS: readonly ["none", "critical_errors", "all_errors"];
|
|
51
|
-
declare const moduleExportSchema: z.ZodObject<{
|
|
52
|
-
module: z.ZodString;
|
|
53
|
-
export: z.ZodString;
|
|
54
|
-
}, z.core.$strict>;
|
|
55
|
-
declare const elementPropsSchema: z.ZodObject<{
|
|
56
|
-
module: z.ZodString;
|
|
57
|
-
export: z.ZodString;
|
|
58
|
-
composition: z.ZodOptional<z.ZodEnum<{
|
|
59
|
-
factory: "factory";
|
|
60
|
-
intersection: "intersection";
|
|
61
|
-
}>>;
|
|
62
|
-
constructOnly: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
63
|
-
}, z.core.$strict>;
|
|
64
|
-
/** Schema for one element override and the source of {@link ElementConfigOptions}. */
|
|
65
|
-
declare const elementConfigSchema: z.ZodObject<{
|
|
66
|
-
component: z.ZodOptional<z.ZodObject<{
|
|
67
|
-
module: z.ZodString;
|
|
68
|
-
export: z.ZodString;
|
|
69
|
-
}, z.core.$strict>>;
|
|
70
|
-
props: z.ZodOptional<z.ZodObject<{
|
|
71
|
-
module: z.ZodString;
|
|
72
|
-
export: z.ZodString;
|
|
73
|
-
composition: z.ZodOptional<z.ZodEnum<{
|
|
74
|
-
factory: "factory";
|
|
75
|
-
intersection: "intersection";
|
|
76
|
-
}>>;
|
|
77
|
-
constructOnly: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
78
|
-
}, z.core.$strict>>;
|
|
79
|
-
isLazy: z.ZodOptional<z.ZodBoolean>;
|
|
80
|
-
acceptedChildTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
81
|
-
omittedProps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
82
|
-
}, z.core.$strict>;
|
|
83
|
-
/** Schema every `gtkx.config.ts` is validated against, and the source of the {@link Config} type. */
|
|
161
|
+
declare const LIBRARY_APPLICATION_ID = "org.gtkx.Library";
|
|
162
|
+
/** Schema every `gtkx.config.ts` is validated against. */
|
|
84
163
|
declare const configSchema: z.ZodObject<{
|
|
85
164
|
libraries: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
86
165
|
girPath: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
87
|
-
applicationId: z.ZodString
|
|
166
|
+
applicationId: z.ZodOptional<z.ZodString>;
|
|
88
167
|
reactCompiler: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
89
168
|
compilationMode: z.ZodOptional<z.ZodEnum<{
|
|
90
169
|
all: "all";
|
|
@@ -216,7 +295,10 @@ declare const configSchema: z.ZodObject<{
|
|
|
216
295
|
desktopEntry: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
217
296
|
metainfoExtra: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
218
297
|
isDbusActivatable: z.ZodOptional<z.ZodBoolean>;
|
|
219
|
-
extraFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.
|
|
298
|
+
extraFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
299
|
+
source: z.ZodString;
|
|
300
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
301
|
+
}, z.core.$strict>]>>>;
|
|
220
302
|
minimumLibraryVersions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
221
303
|
depends: z.ZodOptional<z.ZodObject<{
|
|
222
304
|
deb: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -245,11 +327,9 @@ declare const configSchema: z.ZodObject<{
|
|
|
245
327
|
}, z.core.$strict>>;
|
|
246
328
|
breaks: z.ZodOptional<z.ZodObject<{
|
|
247
329
|
deb: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
248
|
-
rpm: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
249
330
|
}, z.core.$strict>>;
|
|
250
331
|
preDepends: z.ZodOptional<z.ZodObject<{
|
|
251
332
|
deb: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
252
|
-
rpm: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
253
333
|
}, z.core.$strict>>;
|
|
254
334
|
}, z.core.$strict>>;
|
|
255
335
|
scripts: z.ZodOptional<z.ZodObject<{
|
|
@@ -258,7 +338,17 @@ declare const configSchema: z.ZodObject<{
|
|
|
258
338
|
preRemove: z.ZodOptional<z.ZodString>;
|
|
259
339
|
postRemove: z.ZodOptional<z.ZodString>;
|
|
260
340
|
}, z.core.$strict>>;
|
|
261
|
-
node: z.ZodOptional<z.
|
|
341
|
+
node: z.ZodOptional<z.ZodObject<{
|
|
342
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
343
|
+
download: "download";
|
|
344
|
+
host: "host";
|
|
345
|
+
path: "path";
|
|
346
|
+
}>>;
|
|
347
|
+
version: z.ZodOptional<z.ZodString>;
|
|
348
|
+
path: z.ZodOptional<z.ZodString>;
|
|
349
|
+
shouldStrip: z.ZodOptional<z.ZodBoolean>;
|
|
350
|
+
shouldUseCompileCache: z.ZodOptional<z.ZodBoolean>;
|
|
351
|
+
}, z.core.$strict>>;
|
|
262
352
|
tools: z.ZodOptional<z.ZodObject<{
|
|
263
353
|
nfpm: z.ZodOptional<z.ZodString>;
|
|
264
354
|
}, z.core.$strict>>;
|
|
@@ -370,7 +460,7 @@ declare const configSchema: z.ZodObject<{
|
|
|
370
460
|
*/
|
|
371
461
|
declare const defineConfig: DefineConfig<Config>;
|
|
372
462
|
declare const isValidApplicationId: (applicationId: string) => boolean;
|
|
373
|
-
declare const validateConfig: (config: unknown, configFile?: string) =>
|
|
463
|
+
declare const validateConfig: (config: unknown, configFile?: string) => asserts config is ApplicationConfig;
|
|
374
464
|
declare const graduatedFutureKeys: (config: unknown) => string[];
|
|
375
465
|
/**
|
|
376
466
|
* Deep-merges a configuration over a base. `override` wins over `base` on conflicting scalar and object keys, while
|
|
@@ -378,13 +468,13 @@ declare const graduatedFutureKeys: (config: unknown) => string[];
|
|
|
378
468
|
*/
|
|
379
469
|
declare const mergeConfig: (base: Config, override: Config) => Config;
|
|
380
470
|
declare const resolveLazyElements: (elements: Config["elements"]) => string[];
|
|
381
|
-
declare const resolveElementComponents: (elements: Config["elements"]) => Record<string, ModuleExport>;
|
|
382
|
-
declare const resolveElementProps: (elements: Config["elements"]) => Record<string, ElementPropsExport>;
|
|
471
|
+
declare const resolveElementComponents: (elements: Config["elements"], root: string) => Record<string, ModuleExport>;
|
|
472
|
+
declare const resolveElementProps: (elements: Config["elements"], root: string) => Record<string, ElementPropsExport>;
|
|
383
473
|
declare const resolveAcceptedChildTypes: (elements: Config["elements"]) => Record<string, string[]>;
|
|
384
474
|
declare const resolveOmittedProps: (elements: Config["elements"]) => Record<string, string[]>;
|
|
385
|
-
declare const isAgentRulesEnabled: (config: Config) => boolean;
|
|
386
|
-
declare const isAgentReferenceEnabled: (config: Config) => boolean;
|
|
475
|
+
declare const isAgentRulesEnabled: (config: Config, isApplication: boolean) => boolean;
|
|
476
|
+
declare const isAgentReferenceEnabled: (config: Config, isApplication: boolean) => boolean;
|
|
387
477
|
declare const resolveMcpSettings: (config: Config) => McpSettings;
|
|
388
|
-
declare const resolveConfig: (config:
|
|
389
|
-
export { APPLICATION_ID_MAX_LENGTH, defineConfig, isAgentReferenceEnabled, isAgentRulesEnabled, isValidApplicationId, graduatedFutureKeys, validateConfig, mergeConfig, resolveLazyElements, resolveElementComponents, resolveElementProps, resolveAcceptedChildTypes, resolveMcpSettings, resolveOmittedProps, resolveConfig, type McpSettings, type ResolvedReactCompilerOptions, type Config, type ElementConfigOptions, type ElementPropsExport, type ModuleExport, type ResolvedConfig, };
|
|
478
|
+
declare const resolveConfig: (config: ApplicationConfig, translationDomain: string, root?: string) => ResolvedConfig;
|
|
479
|
+
export { configSchema, APPLICATION_ID_MAX_LENGTH, LIBRARY_APPLICATION_ID, defineConfig, isAgentReferenceEnabled, isAgentRulesEnabled, isValidApplicationId, graduatedFutureKeys, validateConfig, mergeConfig, resolveLazyElements, resolveElementComponents, resolveElementProps, resolveAcceptedChildTypes, resolveMcpSettings, resolveOmittedProps, resolveConfig, type AgentsOptions, type DeprecationsOptions, type ElementsOptions, type McpOptions, type McpSettings, type ReactCompilerOptions, type ResolvedReactCompilerOptions, type ApplicationConfig, type Config, type ElementConfigOptions, type ElementPropsExport, type ModuleExport, type ResolvedConfig, };
|
|
390
480
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -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;
|
|
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,cAA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