@gtkx/config 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,5 +19,6 @@ declare const MENU_ITEM_ATTRIBUTES: {
19
19
  */
20
20
  declare const BUILTIN_ELEMENTS: Record<string, ElementConfigOptions>;
21
21
  export { SINGLE_CHILD_TYPES, CONTENT_SETTER_TYPES, MENU_ITEM_ATTRIBUTES, BUILTIN_ELEMENTS };
22
+ export { CONTROLLED_PROPS, defaultPropName, type ControlledProp } from "./controlled-props.ts";
22
23
  export type { ElementConfigOptions, ElementPropsExport, ModuleExport } from "./config.ts";
23
24
  //# 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;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"}
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,CAiU1D,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,CAAC;AAE5F,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE/F,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
@@ -55,9 +55,12 @@ const BUILTIN_ELEMENTS = {
55
55
  ...SINGLE_CHILD_CONFIG,
56
56
  component: internal("createSearchBarComponent"),
57
57
  },
58
- ...forTypes(["GtkHeaderBar", "GtkActionBar"], {
58
+ GtkHeaderBar: {
59
59
  props: internal("GtkHeaderBarProps"),
60
- }),
60
+ },
61
+ GtkActionBar: {
62
+ props: internal("GtkActionBarProps"),
63
+ },
61
64
  GtkMenuButton: {
62
65
  props: internal("GtkMenuButtonProps"),
63
66
  component: internal("createCustomChildrenComponent"),
@@ -105,6 +108,8 @@ const BUILTIN_ELEMENTS = {
105
108
  },
106
109
  GtkNotebookPage: {
107
110
  isLazy: true,
111
+ props: internal("GtkNotebookPageProps"),
112
+ omittedProps: ["tab"],
108
113
  },
109
114
  GActionGroup: {
110
115
  props: internal("ActionGroupProps"),
@@ -198,7 +203,7 @@ const BUILTIN_ELEMENTS = {
198
203
  component: internal("createStackComponent"),
199
204
  },
200
205
  GtkNotebook: {
201
- props: internal("ChildrenProps"),
206
+ props: internal("GtkNotebookProps"),
202
207
  },
203
208
  GtkApplication: {
204
209
  acceptedChildTypes: ["GtkWindow"],
@@ -323,6 +328,10 @@ const BUILTIN_ELEMENTS = {
323
328
  acceptedChildTypes: ["AdwPreferencesPage"],
324
329
  props: internal("ChildrenProps"),
325
330
  },
331
+ AdwPreferencesWindow: {
332
+ acceptedChildTypes: ["AdwPreferencesPage"],
333
+ props: internal("ChildrenProps"),
334
+ },
326
335
  AdwPreferencesGroup: {
327
336
  props: internal("ChildrenProps"),
328
337
  },
@@ -363,4 +372,5 @@ const BUILTIN_ELEMENTS = {
363
372
  },
364
373
  };
365
374
  export { SINGLE_CHILD_TYPES, CONTENT_SETTER_TYPES, MENU_ITEM_ATTRIBUTES, BUILTIN_ELEMENTS };
375
+ export { CONTROLLED_PROPS, defaultPropName } from "./controlled-props.js";
366
376
  //# sourceMappingURL=builtin-elements.js.map
@@ -1 +1 @@
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,CAAC,IAAY,EAAgB,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AAEpG,MAAM,kBAAkB,GAAa;IACjC,QAAQ;IACR,UAAU;IACV,mBAAmB;IACnB,gBAAgB;IAChB,eAAe;IACf,gBAAgB;IAChB,iBAAiB;IACjB,WAAW;IACX,gBAAgB;IAChB,WAAW;IACX,gBAAgB;IAChB,aAAa;IACb,aAAa;IACb,iBAAiB;I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C,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"]}
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,K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AAE,eAAe,EAAuB,MAAM,uBAAuB,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 GtkHeaderBar: {\n props: internal(\"GtkHeaderBarProps\"),\n },\n GtkActionBar: {\n props: internal(\"GtkActionBarProps\"),\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 props: internal(\"GtkNotebookPageProps\"),\n omittedProps: [\"tab\"],\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(\"GtkNotebookProps\"),\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 AdwPreferencesWindow: {\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 { CONTROLLED_PROPS, defaultPropName, type ControlledProp } from \"./controlled-props.ts\";\n\nexport type { ElementConfigOptions, ElementPropsExport, ModuleExport } from \"./config.ts\";\n"]}
package/dist/config.d.ts CHANGED
@@ -115,6 +115,12 @@ type Config = {
115
115
  * @defaultValue `{}`: every deprecation warning is shown
116
116
  */
117
117
  deprecations?: DeprecationsOptions | undefined;
118
+ /**
119
+ * Opts into behavior that becomes the default in the next major version.
120
+ *
121
+ * @defaultValue `{}`: every flag is off
122
+ */
123
+ future?: FutureOptions | undefined;
118
124
  };
119
125
  /** A {@link Config} whose `applicationId` is known, as loaded for an application. */
120
126
  type ApplicationConfig = Config & {
@@ -244,6 +250,17 @@ type DeprecationsOptions = {
244
250
  */
245
251
  silence?: never[] | undefined;
246
252
  };
253
+ /** The `future` options: behavior that becomes the default in GTKX 3.0. */
254
+ type FutureOptions = {
255
+ /**
256
+ * Whether props that hold state the user edits, such as `text` on an entry or `active` on a check button, return
257
+ * to their rendered value after every change the user makes, unless a handler renders the new value. Leaving such
258
+ * a prop out, or passing `undefined`, leaves the value to the widget.
259
+ *
260
+ * @defaultValue `false`: these props are written only when their rendered value changes
261
+ */
262
+ v3ControlledRestore?: boolean | undefined;
263
+ };
247
264
  type McpSettings = {
248
265
  tools: string[];
249
266
  isReadOnly: boolean;
@@ -261,6 +278,10 @@ type ResolvedConfig = {
261
278
  * `notify` stays suppressed only for the property being written.
262
279
  */
263
280
  userEventSignals: Record<string, string[]>;
281
+ /** The `future` flags, each resolved to whether it is on. */
282
+ future: {
283
+ v3ControlledRestore: boolean;
284
+ };
264
285
  /** Path of the module exporting per-element configs, or `null` when none is configured. */
265
286
  elements: string | null;
266
287
  /** GLib type names of the elements marked `isLazy`, whose GObject their parent container creates. */
@@ -562,6 +583,9 @@ declare const configSchema: z.ZodObject<{
562
583
  deprecations: z.ZodOptional<z.ZodObject<{
563
584
  silence: z.ZodOptional<z.ZodArray<z.ZodNever>>;
564
585
  }, z.core.$strict>>;
586
+ future: z.ZodOptional<z.ZodObject<{
587
+ v3ControlledRestore: z.ZodOptional<z.ZodBoolean>;
588
+ }, z.core.$strict>>;
565
589
  }, z.core.$strict>;
566
590
  /**
567
591
  * Returns the given configuration unchanged, typed as {@link Config}, so `gtkx.config.ts` gets
@@ -585,5 +609,5 @@ declare const isAgentRulesEnabled: (config: Config, isApplication: boolean) => b
585
609
  declare const isAgentReferenceEnabled: (config: Config, isApplication: boolean) => boolean;
586
610
  declare const resolveMcpSettings: (config: Config) => McpSettings;
587
611
  declare const resolveConfig: (config: ApplicationConfig, translationDomain: string, root?: string) => ResolvedConfig;
588
- 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, };
612
+ 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 FutureOptions, type McpOptions, type McpSettings, type ReactCompilerOptions, type ResolvedReactCompilerOptions, type ApplicationConfig, type Config, type ElementConfigOptions, type ElementPropsExport, type ModuleExport, type ResolvedConfig, };
589
613
  //# sourceMappingURL=config.d.ts.map
@@ -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;;;;OAIG;IACH,eAAe,CAAC,EAAE,KAAK,GAAG,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;IACxE;;;;OAIG;IACH,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;;;;;GAKG;AACH,KAAK,MAAM,GAAG;IACV;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM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,EAChB,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EACjC,KAAK,iBAAiB,EACtB,KAAK,MAAM,EACX,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,cAAc,GACtB,CAAC"}
package/dist/config.js CHANGED
@@ -74,8 +74,10 @@ const mcpSchema = z.strictObject({
74
74
  .optional(),
75
75
  readOnly: z.boolean({ error: "must be a boolean" }).optional(),
76
76
  });
77
- const graduatedFutureSchema = z
78
- .object({
77
+ const futureSchema = z.strictObject({
78
+ v3ControlledRestore: z.boolean({ error: "must be a boolean" }).optional(),
79
+ });
80
+ const graduatedFutureSchema = futureSchema.extend({
79
81
  v2ByteArrays: z.literal(true, { error: "can only be true; remove the flag" }).optional(),
80
82
  v2ValueReturns: z.literal(true, { error: "can only be true; remove the flag" }).optional(),
81
83
  v2FinishResults: z.literal(true, { error: "can only be true; remove the flag" }).optional(),
@@ -83,8 +85,7 @@ const graduatedFutureSchema = z
83
85
  v2ResourceImports: z.literal(true, { error: "can only be true; remove the flag" }).optional(),
84
86
  v2DefaultLibraries: z.literal(true, { error: "can only be true; remove the flag" }).optional(),
85
87
  v2TreeShaking: z.literal(true, { error: "can only be true; remove the flag" }).optional(),
86
- })
87
- .strict();
88
+ });
88
89
  const deprecationsSchema = z.strictObject({
89
90
  silence: z
90
91
  .array(z.never({ error: "does not name a current deprecation" }), {
@@ -106,6 +107,7 @@ const configSchema = z.strictObject({
106
107
  agents: agentsSchema.optional(),
107
108
  mcp: mcpSchema.optional(),
108
109
  deprecations: deprecationsSchema.optional(),
110
+ future: futureSchema.optional(),
109
111
  });
110
112
  /**
111
113
  * Returns the given configuration unchanged, typed as {@link Config}, so `gtkx.config.ts` gets
@@ -138,7 +140,9 @@ const graduatedFutureKeys = (config) => {
138
140
  if (!isRecord(config) || !isRecord(config.future)) {
139
141
  return [];
140
142
  }
141
- return Object.keys(config.future).toSorted((first, second) => first.localeCompare(second));
143
+ return Object.keys(config.future)
144
+ .filter((key) => !Object.hasOwn(futureSchema.shape, key))
145
+ .toSorted((first, second) => first.localeCompare(second));
142
146
  };
143
147
  /**
144
148
  * Deep-merges a configuration over a base. `override` wins over `base` on conflicting scalar and object keys, while
@@ -176,6 +180,7 @@ const resolveConfig = (config, translationDomain, root) => ({
176
180
  translationDomain,
177
181
  reactCompiler: resolveReactCompilerOptions(config.reactCompiler),
178
182
  userEventSignals: resolveUserEventSignals(config.userEventSignals),
183
+ future: { v3ControlledRestore: config.future?.v3ControlledRestore === true },
179
184
  elements: resolveElementsModule(config.elements?.behaviors, root),
180
185
  lazyElements: resolveLazyElements(config.elements),
181
186
  });
@@ -1 +1 @@
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,kBAAkB,GAAgB,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AACtE,+DAA+D;AAC/D,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,CAAU,CAAC;AAC5E,8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AAyB,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"]}
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;AAySlE,MAAM,sBAAsB,GAAG,uDAAuD,CAAC;AACvF,MAAM,yBAAyB,GAAG,GAAG,CAAC;AACtC,MAAM,sBAAsB,GAAG,kBAAkB,CAAC;AAClD,MAAM,kBAAkB,GAAgB,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AACtE,+DAA+D;AAC/D,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,CAAU,CAAC;AAC5E,8DAA8D;AAC9D,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,iBAAiB,EAAE,YAAY,CAAU,CAAC;AAC5E,M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,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,MAAM,EAAE,EAAE,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,EAAE;IAC5E,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,GAehB,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 * Opts into behavior that becomes the default in the next major version.\n *\n * @defaultValue `{}`: every flag is off\n */\n future?: FutureOptions | 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\n/** The `future` options: behavior that becomes the default in GTKX 3.0. */\ntype FutureOptions = {\n /**\n * Whether props that hold state the user edits, such as `text` on an entry or `active` on a check button, return\n * to their rendered value after every change the user makes, unless a handler renders the new value. Leaving such\n * a prop out, or passing `undefined`, leaves the value to the widget.\n *\n * @defaultValue `false`: these props are written only when their rendered value changes\n */\n v3ControlledRestore?: boolean | 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 /** The `future` flags, each resolved to whether it is on. */\n future: { v3ControlledRestore: boolean };\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 futureSchema = z.strictObject({\n v3ControlledRestore: z.boolean({ error: \"must be a boolean\" }).optional(),\n}) satisfies z.ZodType<FutureOptions>;\n\nconst graduatedFutureSchema = futureSchema.extend({\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\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 future: futureSchema.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)\n .filter((key) => !Object.hasOwn(futureSchema.shape, key))\n .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 future: { v3ControlledRestore: config.future?.v3ControlledRestore === true },\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 FutureOptions,\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"]}
@@ -0,0 +1,69 @@
1
+ /** How GTKX keeps one controlled prop at its rendered value. */
2
+ type ControlledProp = {
3
+ /** Signal the widget emits when the user changes the prop. */
4
+ signal: string;
5
+ /**
6
+ * Other signals the widget emits for the same change, such as a notebook's `switch-page`. In development, an
7
+ * element that passes the prop warns unless it has a handler for one of these, for `signal`, or for the prop's
8
+ * notification, which a bare `onNotify` also receives.
9
+ */
10
+ reportedBy?: string[];
11
+ /**
12
+ * Prop of the widget the user changes the value through, the element itself or the text view showing a buffer,
13
+ * that keeps the user from changing it while false, such as `editable` for text. In development, an element whose
14
+ * widget has it set to false does not warn about a missing handler.
15
+ */
16
+ enabledBy?: string;
17
+ /**
18
+ * Props holding the lowest and highest value the widget currently accepts. GTKX writes the rendered value clamped
19
+ * to them, and checks it again whenever they change, so a value out of reach settles on the nearest one the widget
20
+ * accepts and returns once it comes into reach.
21
+ */
22
+ range?: [min: string, max: string];
23
+ /**
24
+ * Whether the value is the `name` of one of the element's children, or of the page the element creates for one,
25
+ * such as the page a preferences dialog shows. GTKX then leaves it out of construction, writes it only while a
26
+ * child the element holds has that name, and writes it again when a child with that name is placed, so a page
27
+ * rendered after the element or removed and added back is shown, with or without `future.v3ControlledRestore`.
28
+ */
29
+ namesChild?: boolean;
30
+ /**
31
+ * Property of the element holding the list model of the children the value is a position among, such as a
32
+ * notebook's `pages`. GTKX then writes the value again when placing children adds the one at that position to that
33
+ * model, so a page rendered after the element or removed and added back is the one selected, with or without
34
+ * `future.v3ControlledRestore`.
35
+ */
36
+ positionIn?: string;
37
+ /**
38
+ * Signal through which the user asks for a change that could not be undone, such as closing a window, which
39
+ * destroys it. Once the app's own handlers have run, GTKX stops the signal by returning `true`, so only the app
40
+ * makes the change, by rendering it.
41
+ */
42
+ refusedSignal?: string;
43
+ /**
44
+ * Prop that lets the widget make the change the refused signal asks for itself, before GTKX can refuse it, as
45
+ * `hideOnClose` hides a window. While it is `false`, the prop never changes when the user asks, so only the refused
46
+ * signal's handler reports the request.
47
+ */
48
+ refusedUnless?: string;
49
+ /**
50
+ * Whether writing the prop shows something anchored to the widget, such as a menu button's popover, which the
51
+ * compositor only places once the widget is mapped in a window that has painted a frame. With or without
52
+ * `future.v3ControlledRestore`, GTKX leaves the prop out of construction and writes `true` only then, and an
53
+ * `Activity` boundary that hides the widget closes it and opens it again on reveal.
54
+ */
55
+ isAnchored?: boolean;
56
+ };
57
+ /**
58
+ * Props that hold state the user edits, keyed by GLib type name. Under `future.v3ControlledRestore`, GTKX restores
59
+ * each one to its rendered value after every change the user makes. Every element that has one also takes its
60
+ * `default*` prop, named by {@link defaultPropName}. Subtypes inherit the entries of their ancestors and interfaces.
61
+ */
62
+ declare const CONTROLLED_PROPS: Record<string, Record<string, ControlledProp>>;
63
+ /**
64
+ * The prop that gives the controlled prop `name` its value when the element is created and then leaves it to the
65
+ * widget, such as `defaultText` for `text`.
66
+ */
67
+ declare const defaultPropName: (name: string) => string;
68
+ export { CONTROLLED_PROPS, defaultPropName, type ControlledProp };
69
+ //# sourceMappingURL=controlled-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controlled-props.d.ts","sourceRoot":"","sources":["../src/controlled-props.ts"],"names":[],"mappings":"AAEA,gEAAgE;AAChE,KAAK,cAAc,GAAG;IAClB,8DAA8D;IAC9D,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;IACnC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CA2CpE,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,eAAe,SAAU,MAAM,KAAG,MAAsC,CAAC;AAE/E,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,KAAK,cAAc,EAAE,CAAC"}
@@ -0,0 +1,57 @@
1
+ import { upperFirst } from "@gtkx/utils";
2
+ /**
3
+ * Props that hold state the user edits, keyed by GLib type name. Under `future.v3ControlledRestore`, GTKX restores
4
+ * each one to its rendered value after every change the user makes. Every element that has one also takes its
5
+ * `default*` prop, named by {@link defaultPropName}. Subtypes inherit the entries of their ancestors and interfaces.
6
+ */
7
+ const CONTROLLED_PROPS = {
8
+ AdwComboRow: { selected: { signal: "notify::selected", reportedBy: ["notify::selected-item"] } },
9
+ AdwExpanderRow: {
10
+ enableExpansion: { signal: "notify::enable-expansion", enabledBy: "showEnableSwitch" },
11
+ expanded: { signal: "notify::expanded" },
12
+ },
13
+ AdwPreferencesDialog: {
14
+ visiblePageName: {
15
+ signal: "notify::visible-page-name",
16
+ reportedBy: ["notify::visible-page"],
17
+ namesChild: true,
18
+ },
19
+ },
20
+ AdwPreferencesWindow: {
21
+ visiblePageName: {
22
+ signal: "notify::visible-page-name",
23
+ reportedBy: ["notify::visible-page"],
24
+ namesChild: true,
25
+ },
26
+ },
27
+ AdwSidebar: {
28
+ selected: {
29
+ signal: "notify::selected",
30
+ reportedBy: ["notify::selected-item", "activated"],
31
+ positionIn: "items",
32
+ },
33
+ },
34
+ AdwSpinRow: { value: { signal: "notify::value", reportedBy: ["changed"] } },
35
+ AdwSwitchRow: { active: { signal: "notify::active" } },
36
+ GtkAdjustment: { value: { signal: "value-changed" } },
37
+ GtkCheckButton: { active: { signal: "toggled" } },
38
+ GtkDropDown: { selected: { signal: "notify::selected", reportedBy: ["notify::selected-item"] } },
39
+ GtkEditable: { text: { signal: "changed", enabledBy: "editable" } },
40
+ GtkExpander: { expanded: { signal: "notify::expanded" } },
41
+ GtkMenuButton: { active: { signal: "notify::active", isAnchored: true } },
42
+ GtkNotebook: { page: { signal: "notify::page", reportedBy: ["switch-page"], positionIn: "pages" } },
43
+ GtkPaned: { position: { signal: "notify::position", range: ["minPosition", "maxPosition"] } },
44
+ GtkPopover: { visible: { signal: "notify::visible", reportedBy: ["closed"] } },
45
+ GtkSpinButton: { value: { signal: "value-changed", reportedBy: ["changed"] } },
46
+ GtkSwitch: { active: { signal: "notify::active", reportedBy: ["state-set"] } },
47
+ GtkTextBuffer: { text: { signal: "changed", enabledBy: "editable" } },
48
+ GtkToggleButton: { active: { signal: "toggled", reportedBy: ["clicked"] } },
49
+ GtkWindow: { visible: { signal: "notify::visible", refusedSignal: "close-request", refusedUnless: "hideOnClose" } },
50
+ };
51
+ /**
52
+ * The prop that gives the controlled prop `name` its value when the element is created and then leaves it to the
53
+ * widget, such as `defaultText` for `text`.
54
+ */
55
+ const defaultPropName = (name) => `default${upperFirst(name)}`;
56
+ export { CONTROLLED_PROPS, defaultPropName };
57
+ //# sourceMappingURL=controlled-props.js.map