@gtkx/react 1.0.0-rc.3 → 1.0.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/README.md +4 -5
  2. package/dist/adw/config.d.ts +1 -0
  3. package/dist/adw/config.d.ts.map +1 -1
  4. package/dist/adw/config.js +1 -0
  5. package/dist/adw/config.js.map +1 -1
  6. package/dist/adw/dialog.d.ts +1 -0
  7. package/dist/adw/dialog.d.ts.map +1 -1
  8. package/dist/adw/dialog.js +1 -0
  9. package/dist/adw/dialog.js.map +1 -1
  10. package/dist/adw/element-behaviors.js +2 -3
  11. package/dist/adw/element-behaviors.js.map +1 -1
  12. package/dist/adw/element-config.d.ts +4 -3
  13. package/dist/adw/element-config.d.ts.map +1 -1
  14. package/dist/adw/element-config.js +14 -13
  15. package/dist/adw/element-config.js.map +1 -1
  16. package/dist/adw/index.d.ts +1 -0
  17. package/dist/adw/index.d.ts.map +1 -1
  18. package/dist/adw/index.js +1 -0
  19. package/dist/adw/index.js.map +1 -1
  20. package/dist/adw/prop-types.d.ts +1 -1
  21. package/dist/adw/prop-types.d.ts.map +1 -1
  22. package/dist/adw/prop-types.js.map +1 -1
  23. package/dist/bootstrap.js +1 -1
  24. package/dist/bootstrap.js.map +1 -1
  25. package/dist/components/application.d.ts +1 -0
  26. package/dist/components/application.d.ts.map +1 -1
  27. package/dist/components/application.js +1 -0
  28. package/dist/components/application.js.map +1 -1
  29. package/dist/components/element.d.ts +0 -1
  30. package/dist/components/element.d.ts.map +1 -1
  31. package/dist/components/element.js +0 -1
  32. package/dist/components/element.js.map +1 -1
  33. package/dist/components/window.d.ts +1 -0
  34. package/dist/components/window.d.ts.map +1 -1
  35. package/dist/components/window.js +1 -0
  36. package/dist/components/window.js.map +1 -1
  37. package/dist/config.d.ts +5 -2
  38. package/dist/config.d.ts.map +1 -1
  39. package/dist/config.js +3 -1
  40. package/dist/config.js.map +1 -1
  41. package/dist/element-behaviors.js +0 -1
  42. package/dist/element-behaviors.js.map +1 -1
  43. package/dist/element-config.d.ts +4 -3
  44. package/dist/element-config.d.ts.map +1 -1
  45. package/dist/element-config.js +12 -11
  46. package/dist/element-config.js.map +1 -1
  47. package/dist/hooks/use-bind-setting.d.ts +8 -7
  48. package/dist/hooks/use-bind-setting.d.ts.map +1 -1
  49. package/dist/hooks/use-bind-setting.js +2 -7
  50. package/dist/hooks/use-bind-setting.js.map +1 -1
  51. package/dist/hooks/use-parent-window.d.ts +3 -1
  52. package/dist/hooks/use-parent-window.d.ts.map +1 -1
  53. package/dist/hooks/use-parent-window.js +3 -1
  54. package/dist/hooks/use-parent-window.js.map +1 -1
  55. package/dist/hooks/use-property.d.ts +2 -2
  56. package/dist/hooks/use-property.d.ts.map +1 -1
  57. package/dist/hooks/use-property.js +1 -2
  58. package/dist/hooks/use-property.js.map +1 -1
  59. package/dist/hooks/use-setting.d.ts +2 -3
  60. package/dist/hooks/use-setting.d.ts.map +1 -1
  61. package/dist/hooks/use-setting.js +2 -3
  62. package/dist/hooks/use-setting.js.map +1 -1
  63. package/dist/hooks/use-signal.d.ts +13 -7
  64. package/dist/hooks/use-signal.d.ts.map +1 -1
  65. package/dist/hooks/use-signal.js +6 -8
  66. package/dist/hooks/use-signal.js.map +1 -1
  67. package/dist/index.d.ts +10 -2
  68. package/dist/index.d.ts.map +1 -1
  69. package/dist/index.js +8 -0
  70. package/dist/index.js.map +1 -1
  71. package/dist/internal.d.ts +4 -3
  72. package/dist/internal.d.ts.map +1 -1
  73. package/dist/internal.js +2 -3
  74. package/dist/internal.js.map +1 -1
  75. package/dist/prop-types.d.ts +60 -0
  76. package/dist/prop-types.d.ts.map +1 -1
  77. package/dist/prop-types.js.map +1 -1
  78. package/dist/reconciler/behaviors.d.ts +0 -15
  79. package/dist/reconciler/behaviors.d.ts.map +1 -1
  80. package/dist/reconciler/behaviors.js +5 -20
  81. package/dist/reconciler/behaviors.js.map +1 -1
  82. package/dist/reconciler/host-config.d.ts +1 -1
  83. package/dist/reconciler/host-config.d.ts.map +1 -1
  84. package/dist/reconciler/host-config.js.map +1 -1
  85. package/dist/reconciler/instance.js +1 -1
  86. package/dist/reconciler/instance.js.map +1 -1
  87. package/dist/reconciler/metadata.d.ts +1 -1
  88. package/dist/reconciler/metadata.d.ts.map +1 -1
  89. package/dist/reconciler/metadata.js +7 -7
  90. package/dist/reconciler/metadata.js.map +1 -1
  91. package/dist/reconciler/node.d.ts +2 -2
  92. package/dist/reconciler/node.d.ts.map +1 -1
  93. package/dist/reconciler/node.js +1 -1
  94. package/dist/reconciler/node.js.map +1 -1
  95. package/dist/reconciler/placement.js +6 -6
  96. package/dist/reconciler/placement.js.map +1 -1
  97. package/dist/reconciler/registry.d.ts +42 -30
  98. package/dist/reconciler/registry.d.ts.map +1 -1
  99. package/dist/reconciler/registry.js +10 -19
  100. package/dist/reconciler/registry.js.map +1 -1
  101. package/dist/reconciler/root-element.d.ts +0 -1
  102. package/dist/reconciler/root-element.d.ts.map +1 -1
  103. package/dist/reconciler/root-element.js +0 -1
  104. package/dist/reconciler/root-element.js.map +1 -1
  105. package/dist/reconciler/root.d.ts +6 -20
  106. package/dist/reconciler/root.d.ts.map +1 -1
  107. package/dist/reconciler/root.js +4 -19
  108. package/dist/reconciler/root.js.map +1 -1
  109. package/dist/reconciler/signals.js +2 -2
  110. package/dist/reconciler/signals.js.map +1 -1
  111. package/dist/reconciler/text.js +5 -5
  112. package/dist/reconciler/text.js.map +1 -1
  113. package/dist/utils/accessible-metadata.d.ts +0 -7
  114. package/dist/utils/accessible-metadata.d.ts.map +1 -1
  115. package/dist/utils/accessible-metadata.js +0 -7
  116. package/dist/utils/accessible-metadata.js.map +1 -1
  117. package/dist/utils/accessible-props.d.ts +49 -1
  118. package/dist/utils/accessible-props.d.ts.map +1 -1
  119. package/dist/utils/accessible-props.js.map +1 -1
  120. package/dist/utils/ref-prop.d.ts +0 -6
  121. package/dist/utils/ref-prop.d.ts.map +1 -1
  122. package/dist/utils/ref-prop.js +0 -6
  123. package/dist/utils/ref-prop.js.map +1 -1
  124. package/dist/utils/settings.d.ts +6 -0
  125. package/dist/utils/settings.d.ts.map +1 -1
  126. package/dist/utils/settings.js.map +1 -1
  127. package/env.d.ts +11 -4
  128. package/package.json +5 -5
  129. package/src/adw/config.ts +1 -0
  130. package/src/adw/dialog.tsx +1 -0
  131. package/src/adw/element-behaviors.ts +2 -3
  132. package/src/adw/element-config.ts +14 -13
  133. package/src/adw/index.ts +1 -0
  134. package/src/adw/prop-types.ts +1 -1
  135. package/src/bootstrap.ts +1 -1
  136. package/src/components/application.tsx +1 -0
  137. package/src/components/element.tsx +0 -1
  138. package/src/components/window.tsx +1 -0
  139. package/src/config.ts +5 -9
  140. package/src/element-behaviors.ts +0 -1
  141. package/src/element-config.ts +12 -11
  142. package/src/hooks/use-bind-setting.ts +8 -7
  143. package/src/hooks/use-parent-window.ts +3 -1
  144. package/src/hooks/use-property.ts +2 -2
  145. package/src/hooks/use-setting.ts +2 -3
  146. package/src/hooks/use-signal.ts +16 -10
  147. package/src/index.ts +10 -2
  148. package/src/internal.ts +4 -3
  149. package/src/prop-types.ts +86 -5
  150. package/src/reconciler/behaviors.ts +6 -21
  151. package/src/reconciler/host-config.ts +1 -1
  152. package/src/reconciler/instance.ts +1 -1
  153. package/src/reconciler/metadata.ts +8 -8
  154. package/src/reconciler/node.ts +3 -3
  155. package/src/reconciler/placement.ts +6 -6
  156. package/src/reconciler/registry.ts +52 -37
  157. package/src/reconciler/root-element.ts +0 -1
  158. package/src/reconciler/root.ts +6 -20
  159. package/src/reconciler/signals.ts +2 -2
  160. package/src/reconciler/text.ts +6 -6
  161. package/src/utils/accessible-metadata.ts +0 -7
  162. package/src/utils/accessible-props.ts +49 -1
  163. package/src/utils/ref-prop.ts +0 -6
  164. package/src/utils/settings.ts +6 -0
@@ -1 +1 @@
1
- {"version":3,"file":"element-behaviors.js","sourceRoot":"","sources":["../src/element-behaviors.ts"],"names":[],"mappings":"AACA,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C;AACpE,CAAC;AAED,MAAM,SAAS,GAAG,CAAC,KAAiB,EAAY,EAAE;IAC9C,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;IAE5B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACvB,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC;AAEF,SAAS,cAAc,CAAC,IAAc,EAAE,IAAc;IAClD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC;IAEjC,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QAC7B,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QAEnD,OAAO;IACX,CAAC;IAED,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QAC7B,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QAEnD,OAAO;IACX,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC;AAC5C,CAAC;AAED,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;AACnC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC","sourcesContent":["import type * as GObject from \"@gtkx/gi/gobject\";\nimport * as Gio from \"@gtkx/gi/gio\";\nimport * as Gtk from \"@gtkx/gi/gtk\";\nimport type {\n ActionAccel,\n CreditSection,\n DragSourceIcon,\n LevelBarOffset,\n MenuItem,\n ScaleMark,\n VflConstraints,\n} from \"./prop-types.js\";\nimport { BUILTIN_ELEMENTS, SINGLE_CHILD_TYPES } from \"./element-config.js\";\nimport {\n addRemoveSlot,\n adoptedChildrenSlot,\n boxSlot,\n childSetterSlot,\n controlledText,\n deferred,\n list,\n slot,\n value,\n wrappingIndexedSlot,\n} from \"./reconciler/behaviors.js\";\nimport { type ElementConfig, forTypes, registerElements } from \"./reconciler/registry.js\";\n\n/** The runtime half of the built-in element configuration: the behaviors bound to each GObject type. */\nconst BUILTIN_BEHAVIORS: Record<string, ElementConfig<never>> = {\n ...forTypes(SINGLE_CHILD_TYPES, {\n behaviors: [childSetterSlot()],\n }),\n ...forTypes([\"GtkHeaderBar\", \"GtkActionBar\"], {\n behaviors: [\n addRemoveSlot<Gtk.Widget, Gtk.HeaderBar | Gtk.ActionBar>(\n \"start\",\n \"GtkWidget\",\n (bar, child) => {\n bar.packStart(child);\n },\n (bar, child) => {\n bar.remove(child);\n },\n ),\n addRemoveSlot<Gtk.Widget, Gtk.HeaderBar | Gtk.ActionBar>(\n \"end\",\n \"GtkWidget\",\n (bar, child) => {\n bar.packEnd(child);\n },\n (bar, child) => {\n bar.remove(child);\n },\n ),\n ],\n }),\n GtkWindow: {\n behaviors: [childSetterSlot()],\n },\n GtkWidget: {\n behaviors: [\n slot<Gtk.Widget, Gtk.Popover>(\"children\", \"GtkPopover\", {\n attach: (parent, popover) => {\n popover.setParent(parent);\n },\n detach: (_parent, popover) => {\n popover.unparent();\n },\n }),\n addRemoveSlot<Gtk.EventController, Gtk.Widget>(\n \"controllers\",\n \"GtkEventController\",\n (widget, controller) => {\n widget.addController(controller);\n },\n (widget, controller) => {\n widget.removeController(controller);\n },\n ),\n slot<Gtk.Widget, Gtk.LayoutManager>(\"layoutManager\", \"GtkLayoutManager\", {\n attach: (widget, manager) => {\n widget.setLayoutManager(manager);\n },\n detach: (widget) => {\n widget.setLayoutManager(null);\n },\n }),\n slot<Gtk.Widget, Gio.ActionGroup>(\"actionGroups\", \"GActionGroup\", {\n attach: (widget, group, info) => {\n widget.insertActionGroup((info.props.prefix as string | null) ?? \"\", group);\n },\n detach: (widget, _group, info) => {\n widget.insertActionGroup((info.props.prefix as string | null) ?? \"\", null);\n },\n }),\n ],\n },\n GtkBox: {\n behaviors: [boxSlot<Gtk.Box>()],\n },\n GtkListBox: {\n behaviors: [\n wrappingIndexedSlot(Gtk.ListBoxRow, (row, inner) => {\n row.setChild(inner);\n }),\n ],\n },\n GtkFlowBox: {\n behaviors: [\n wrappingIndexedSlot(Gtk.FlowBoxChild, (child, inner) => {\n child.setChild(inner);\n }),\n ],\n },\n GtkOverlay: {\n behaviors: [\n childSetterSlot<Gtk.Overlay>(),\n slot<Gtk.Overlay, Gtk.Widget>(\"overlays\", \"GtkWidget\", {\n attach: (overlay, child) => {\n overlay.addOverlay(child);\n },\n detach: (overlay, child) => {\n overlay.removeOverlay(child);\n },\n resolve: layoutChild,\n }),\n ],\n },\n GtkShortcutController: {\n behaviors: [\n addRemoveSlot<Gtk.Shortcut, Gtk.ShortcutController>(\n \"shortcuts\",\n \"GtkShortcut\",\n (controller, shortcut) => {\n controller.addShortcut(shortcut);\n },\n (controller, shortcut) => {\n controller.removeShortcut(shortcut);\n },\n ),\n ],\n },\n GtkTextChildAnchor: {\n behaviors: [{ create: () => Gtk.TextChildAnchor.new() }],\n },\n GtkTextView: {\n behaviors: [\n slot<Gtk.TextView, Gtk.TextBuffer>(\"children\", \"GtkTextBuffer\", {\n attach: (view, buffer) => {\n view.setBuffer(buffer);\n },\n detach: (view) => {\n view.setBuffer(null);\n },\n }),\n ],\n },\n GActionMap: {\n behaviors: [\n slot<Gio.ActionMap, Gio.Action>(\"actions\", \"GAction\", {\n attach: (map, action) => {\n map.addAction(action);\n },\n detach: (map, _action, info) => {\n map.removeAction((info.props.name as string | null) ?? \"\");\n },\n }),\n ],\n },\n GMenu: {\n behaviors: [\n list<Gio.Menu, MenuItem>(\"items\", {\n clear: (menu) => {\n menu.removeAll();\n },\n add: (menu, item) => {\n appendMenuItem(menu, item);\n },\n }),\n ],\n },\n GtkColumnView: {\n behaviors: [\n slot<Gtk.ColumnView, Gtk.ColumnViewColumn>(\"children\", \"GtkColumnViewColumn\", {\n attach: (view, column, info) => {\n view.insertColumn(info.index, column);\n },\n detach: (view, column) => {\n view.removeColumn(column);\n },\n }),\n ],\n },\n GtkGrid: {\n behaviors: [\n slot<Gtk.Grid, Gtk.Widget>(\"children\", \"GtkWidget\", {\n attach: (grid, child) => {\n grid.attach(child, 0, 0, 1, 1);\n },\n detach: (grid, child) => {\n grid.remove(child);\n },\n resolve: layoutChild,\n }),\n ],\n },\n GtkFixed: {\n behaviors: [\n slot<Gtk.Fixed, Gtk.Widget>(\"children\", \"GtkWidget\", {\n attach: (fixed, child) => {\n fixed.put(child, 0, 0);\n },\n detach: (fixed, child) => {\n fixed.remove(child);\n },\n resolve: layoutChild,\n }),\n ],\n },\n GtkSizeGroup: {\n behaviors: [\n list<Gtk.SizeGroup, Gtk.Widget>(\"widgets\", {\n add: (group, widget) => {\n group.addWidget(widget);\n },\n remove: (group, widget) => {\n group.removeWidget(widget);\n },\n }),\n ],\n },\n GtkConstraintLayout: {\n behaviors: [\n addRemoveSlot<Gtk.Constraint, Gtk.ConstraintLayout>(\n \"constraints\",\n \"GtkConstraint\",\n (layout, constraint) => {\n layout.addConstraint(constraint);\n },\n (layout, constraint) => {\n layout.removeConstraint(constraint);\n },\n ),\n addRemoveSlot<Gtk.ConstraintGuide, Gtk.ConstraintLayout>(\n \"guides\",\n \"GtkConstraintGuide\",\n (layout, guide) => {\n layout.addGuide(guide);\n },\n (layout, guide) => {\n layout.removeGuide(guide);\n },\n ),\n list<Gtk.ConstraintLayout, VflConstraints, Gtk.Constraint[]>(\"vfl\", {\n add: (layout, item) => [\n ...layout.addConstraintsFromDescription(\n item.lines,\n item.hspacing ?? 0,\n item.vspacing ?? 0,\n item.views ?? new Map<string, Gtk.ConstraintTarget>(),\n ),\n ],\n remove: (layout, _item, constraints) => {\n for (const constraint of constraints) {\n layout.removeConstraint(constraint);\n }\n },\n }),\n ],\n },\n GtkStack: {\n behaviors: [\n adoptedChildrenSlot<Gtk.Stack, Gtk.Widget>(\n \"GtkWidget\",\n (stack, child) => stack.addChild(child),\n (stack, child) => {\n stack.remove(child);\n },\n ),\n deferred<Gtk.Stack, string>(\"visibleChildName\", (stack, name) => stack.getChildByName(name) !== null),\n ],\n },\n GtkNotebook: {\n behaviors: [\n slot<Gtk.Notebook, Gtk.Widget>(\"children\", \"GtkWidget\", {\n attach: (notebook, child, info) => notebook.insertPage(child, null, info.index),\n reorder: (notebook, child, info) => {\n notebook.reorderChild(child, info.index);\n },\n detach: (notebook, child) => {\n notebook.detachTab(child);\n },\n resolve: (notebook, child) => notebook.getPage(child),\n }),\n ],\n },\n GtkApplication: {\n behaviors: [\n addRemoveSlot<Gtk.Window, Gtk.Application>(\n \"children\",\n \"GtkWindow\",\n (application, window) => {\n application.addWindow(window);\n },\n (application, window) => {\n application.removeWindow(window);\n },\n ),\n list<Gtk.Application, ActionAccel>(\"actionAccels\", {\n add: (application, item) => {\n application.setAccelsForAction(item.detailedActionName, item.accels);\n },\n remove: (application, item) => {\n application.setAccelsForAction(item.detailedActionName, []);\n },\n }),\n ],\n },\n GtkAboutDialog: {\n behaviors: [\n list<Gtk.AboutDialog, CreditSection>(\"creditSections\", {\n add: (dialog, section) => {\n dialog.addCreditSection(section.sectionName, section.people);\n },\n }),\n ],\n },\n GtkScale: {\n behaviors: [\n list<Gtk.Scale, ScaleMark>(\"marks\", {\n add: (scale, mark) => {\n scale.addMark(mark.value ?? 0, mark.position, mark.markup ?? null);\n },\n clear: (scale) => {\n scale.clearMarks();\n },\n }),\n ],\n },\n GtkCalendar: {\n behaviors: [\n list<Gtk.Calendar, number>(\"markedDays\", {\n add: (calendar, day) => {\n calendar.markDay(day);\n },\n clear: (calendar) => {\n calendar.clearMarks();\n },\n }),\n ],\n },\n GtkLevelBar: {\n behaviors: [\n list<Gtk.LevelBar, LevelBarOffset>(\"offsets\", {\n add: (bar, offset) => {\n bar.addOffsetValue(offset.name, offset.value ?? 0);\n },\n remove: (bar, offset) => {\n bar.removeOffsetValue(offset.name);\n },\n }),\n ],\n },\n GtkDropTarget: {\n behaviors: [\n value<Gtk.DropTarget, GObject.Type[]>(\"types\", (target, types) => {\n target.setGtypes(types);\n }),\n ],\n },\n GtkDrawingArea: {\n behaviors: [\n value<Gtk.DrawingArea, Gtk.DrawingAreaDrawFunc>(\"drawFunc\", (area, draw) => {\n area.setDrawFunc(draw);\n area.queueDraw();\n }),\n ],\n },\n GtkDragSource: {\n behaviors: [\n value<Gtk.DragSource, DragSourceIcon>(\"icon\", (source, icon) => {\n source.setIcon(icon.paintable ?? null, icon.hotX ?? 0, icon.hotY ?? 0);\n }),\n ],\n },\n GtkEditable: {\n behaviors: [controlledText(\"text\")],\n },\n};\n\nfunction layoutChild(parent: Gtk.Widget, child: Gtk.Widget): GObject.Object | null {\n return parent.getLayoutManager()?.getLayoutChild(child) ?? null;\n}\n\nconst buildMenu = (items: MenuItem[]): Gio.Menu => {\n const menu = Gio.Menu.new();\n\n for (const item of items) {\n appendMenuItem(menu, item);\n }\n\n return menu;\n};\n\nfunction appendMenuItem(menu: Gio.Menu, item: MenuItem): void {\n const label = item.label ?? null;\n\n if (item.submenu !== undefined) {\n menu.appendSubmenu(label, buildMenu(item.submenu));\n\n return;\n }\n\n if (item.section !== undefined) {\n menu.appendSection(label, buildMenu(item.section));\n\n return;\n }\n\n menu.append(label, item.action ?? null);\n}\n\nregisterElements(BUILTIN_ELEMENTS);\nregisterElements(BUILTIN_BEHAVIORS);\n"]}
1
+ {"version":3,"file":"element-behaviors.js","sourceRoot":"","sources":["../src/element-behaviors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AAUpC,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EACH,aAAa,EACb,mBAAmB,EACnB,OAAO,EACP,eAAe,EACf,cAAc,EACd,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,mBAAmB,GACtB,MAAM,2BAA2B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EAAE,IAAc;IAClD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC;IAEjC,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QAC7B,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QAEnD,OAAO;IACX,CAAC;IAED,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QAC7B,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QAEnD,OAAO;IACX,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC;AAC5C,CAAC;AAED,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;AACnC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC","sourcesContent":["import type * as GObject from \"@gtkx/gi/gobject\";\nimport * as Gio from \"@gtkx/gi/gio\";\nimport * as Gtk from \"@gtkx/gi/gtk\";\nimport type {\n ActionAccel,\n CreditSection,\n DragSourceIcon,\n LevelBarOffset,\n MenuItem,\n ScaleMark,\n VflConstraints,\n} from \"./prop-types.js\";\nimport { BUILTIN_ELEMENTS, SINGLE_CHILD_TYPES } from \"./element-config.js\";\nimport {\n addRemoveSlot,\n adoptedChildrenSlot,\n boxSlot,\n childSetterSlot,\n controlledText,\n deferred,\n list,\n slot,\n value,\n wrappingIndexedSlot,\n} from \"./reconciler/behaviors.js\";\nimport { type ElementConfig, forTypes, registerElements } from \"./reconciler/registry.js\";\n\nconst BUILTIN_BEHAVIORS: Record<string, ElementConfig<never>> = {\n ...forTypes(SINGLE_CHILD_TYPES, {\n behaviors: [childSetterSlot()],\n }),\n ...forTypes([\"GtkHeaderBar\", \"GtkActionBar\"], {\n behaviors: [\n addRemoveSlot<Gtk.Widget, Gtk.HeaderBar | Gtk.ActionBar>(\n \"start\",\n \"GtkWidget\",\n (bar, child) => {\n bar.packStart(child);\n },\n (bar, child) => {\n bar.remove(child);\n },\n ),\n addRemoveSlot<Gtk.Widget, Gtk.HeaderBar | Gtk.ActionBar>(\n \"end\",\n \"GtkWidget\",\n (bar, child) => {\n bar.packEnd(child);\n },\n (bar, child) => {\n bar.remove(child);\n },\n ),\n ],\n }),\n GtkWindow: {\n behaviors: [childSetterSlot()],\n },\n GtkWidget: {\n behaviors: [\n slot<Gtk.Widget, Gtk.Popover>(\"children\", \"GtkPopover\", {\n attach: (parent, popover) => {\n popover.setParent(parent);\n },\n detach: (_parent, popover) => {\n popover.unparent();\n },\n }),\n addRemoveSlot<Gtk.EventController, Gtk.Widget>(\n \"controllers\",\n \"GtkEventController\",\n (widget, controller) => {\n widget.addController(controller);\n },\n (widget, controller) => {\n widget.removeController(controller);\n },\n ),\n slot<Gtk.Widget, Gtk.LayoutManager>(\"layoutManager\", \"GtkLayoutManager\", {\n attach: (widget, manager) => {\n widget.setLayoutManager(manager);\n },\n detach: (widget) => {\n widget.setLayoutManager(null);\n },\n }),\n slot<Gtk.Widget, Gio.ActionGroup>(\"actionGroups\", \"GActionGroup\", {\n attach: (widget, group, info) => {\n widget.insertActionGroup((info.props.prefix as string | null) ?? \"\", group);\n },\n detach: (widget, _group, info) => {\n widget.insertActionGroup((info.props.prefix as string | null) ?? \"\", null);\n },\n }),\n ],\n },\n GtkBox: {\n behaviors: [boxSlot<Gtk.Box>()],\n },\n GtkListBox: {\n behaviors: [\n wrappingIndexedSlot(Gtk.ListBoxRow, (row, inner) => {\n row.setChild(inner);\n }),\n ],\n },\n GtkFlowBox: {\n behaviors: [\n wrappingIndexedSlot(Gtk.FlowBoxChild, (child, inner) => {\n child.setChild(inner);\n }),\n ],\n },\n GtkOverlay: {\n behaviors: [\n childSetterSlot<Gtk.Overlay>(),\n slot<Gtk.Overlay, Gtk.Widget>(\"overlays\", \"GtkWidget\", {\n attach: (overlay, child) => {\n overlay.addOverlay(child);\n },\n detach: (overlay, child) => {\n overlay.removeOverlay(child);\n },\n resolve: layoutChild,\n }),\n ],\n },\n GtkShortcutController: {\n behaviors: [\n addRemoveSlot<Gtk.Shortcut, Gtk.ShortcutController>(\n \"shortcuts\",\n \"GtkShortcut\",\n (controller, shortcut) => {\n controller.addShortcut(shortcut);\n },\n (controller, shortcut) => {\n controller.removeShortcut(shortcut);\n },\n ),\n ],\n },\n GtkTextChildAnchor: {\n behaviors: [{ create: () => Gtk.TextChildAnchor.new() }],\n },\n GtkTextView: {\n behaviors: [\n slot<Gtk.TextView, Gtk.TextBuffer>(\"children\", \"GtkTextBuffer\", {\n attach: (view, buffer) => {\n view.setBuffer(buffer);\n },\n detach: (view) => {\n view.setBuffer(null);\n },\n }),\n ],\n },\n GActionMap: {\n behaviors: [\n slot<Gio.ActionMap, Gio.Action>(\"actions\", \"GAction\", {\n attach: (map, action) => {\n map.addAction(action);\n },\n detach: (map, _action, info) => {\n map.removeAction((info.props.name as string | null) ?? \"\");\n },\n }),\n ],\n },\n GMenu: {\n behaviors: [\n list<Gio.Menu, MenuItem>(\"items\", {\n clear: (menu) => {\n menu.removeAll();\n },\n add: (menu, item) => {\n appendMenuItem(menu, item);\n },\n }),\n ],\n },\n GtkColumnView: {\n behaviors: [\n slot<Gtk.ColumnView, Gtk.ColumnViewColumn>(\"children\", \"GtkColumnViewColumn\", {\n attach: (view, column, info) => {\n view.insertColumn(info.index, column);\n },\n detach: (view, column) => {\n view.removeColumn(column);\n },\n }),\n ],\n },\n GtkGrid: {\n behaviors: [\n slot<Gtk.Grid, Gtk.Widget>(\"children\", \"GtkWidget\", {\n attach: (grid, child) => {\n grid.attach(child, 0, 0, 1, 1);\n },\n detach: (grid, child) => {\n grid.remove(child);\n },\n resolve: layoutChild,\n }),\n ],\n },\n GtkFixed: {\n behaviors: [\n slot<Gtk.Fixed, Gtk.Widget>(\"children\", \"GtkWidget\", {\n attach: (fixed, child) => {\n fixed.put(child, 0, 0);\n },\n detach: (fixed, child) => {\n fixed.remove(child);\n },\n resolve: layoutChild,\n }),\n ],\n },\n GtkSizeGroup: {\n behaviors: [\n list<Gtk.SizeGroup, Gtk.Widget>(\"widgets\", {\n add: (group, widget) => {\n group.addWidget(widget);\n },\n remove: (group, widget) => {\n group.removeWidget(widget);\n },\n }),\n ],\n },\n GtkConstraintLayout: {\n behaviors: [\n addRemoveSlot<Gtk.Constraint, Gtk.ConstraintLayout>(\n \"constraints\",\n \"GtkConstraint\",\n (layout, constraint) => {\n layout.addConstraint(constraint);\n },\n (layout, constraint) => {\n layout.removeConstraint(constraint);\n },\n ),\n addRemoveSlot<Gtk.ConstraintGuide, Gtk.ConstraintLayout>(\n \"guides\",\n \"GtkConstraintGuide\",\n (layout, guide) => {\n layout.addGuide(guide);\n },\n (layout, guide) => {\n layout.removeGuide(guide);\n },\n ),\n list<Gtk.ConstraintLayout, VflConstraints, Gtk.Constraint[]>(\"vfl\", {\n add: (layout, item) => [\n ...layout.addConstraintsFromDescription(\n item.lines,\n item.hspacing ?? 0,\n item.vspacing ?? 0,\n item.views ?? new Map<string, Gtk.ConstraintTarget>(),\n ),\n ],\n remove: (layout, _item, constraints) => {\n for (const constraint of constraints) {\n layout.removeConstraint(constraint);\n }\n },\n }),\n ],\n },\n GtkStack: {\n behaviors: [\n adoptedChildrenSlot<Gtk.Stack, Gtk.Widget>(\n \"GtkWidget\",\n (stack, child) => stack.addChild(child),\n (stack, child) => {\n stack.remove(child);\n },\n ),\n deferred<Gtk.Stack, string>(\"visibleChildName\", (stack, name) => stack.getChildByName(name) !== null),\n ],\n },\n GtkNotebook: {\n behaviors: [\n slot<Gtk.Notebook, Gtk.Widget>(\"children\", \"GtkWidget\", {\n attach: (notebook, child, info) => notebook.insertPage(child, null, info.index),\n reorder: (notebook, child, info) => {\n notebook.reorderChild(child, info.index);\n },\n detach: (notebook, child) => {\n notebook.detachTab(child);\n },\n resolve: (notebook, child) => notebook.getPage(child),\n }),\n ],\n },\n GtkApplication: {\n behaviors: [\n addRemoveSlot<Gtk.Window, Gtk.Application>(\n \"children\",\n \"GtkWindow\",\n (application, window) => {\n application.addWindow(window);\n },\n (application, window) => {\n application.removeWindow(window);\n },\n ),\n list<Gtk.Application, ActionAccel>(\"actionAccels\", {\n add: (application, item) => {\n application.setAccelsForAction(item.detailedActionName, item.accels);\n },\n remove: (application, item) => {\n application.setAccelsForAction(item.detailedActionName, []);\n },\n }),\n ],\n },\n GtkAboutDialog: {\n behaviors: [\n list<Gtk.AboutDialog, CreditSection>(\"creditSections\", {\n add: (dialog, section) => {\n dialog.addCreditSection(section.sectionName, section.people);\n },\n }),\n ],\n },\n GtkScale: {\n behaviors: [\n list<Gtk.Scale, ScaleMark>(\"marks\", {\n add: (scale, mark) => {\n scale.addMark(mark.value ?? 0, mark.position, mark.markup ?? null);\n },\n clear: (scale) => {\n scale.clearMarks();\n },\n }),\n ],\n },\n GtkCalendar: {\n behaviors: [\n list<Gtk.Calendar, number>(\"markedDays\", {\n add: (calendar, day) => {\n calendar.markDay(day);\n },\n clear: (calendar) => {\n calendar.clearMarks();\n },\n }),\n ],\n },\n GtkLevelBar: {\n behaviors: [\n list<Gtk.LevelBar, LevelBarOffset>(\"offsets\", {\n add: (bar, offset) => {\n bar.addOffsetValue(offset.name, offset.value ?? 0);\n },\n remove: (bar, offset) => {\n bar.removeOffsetValue(offset.name);\n },\n }),\n ],\n },\n GtkDropTarget: {\n behaviors: [\n value<Gtk.DropTarget, GObject.Type[]>(\"types\", (target, types) => {\n target.setGtypes(types);\n }),\n ],\n },\n GtkDrawingArea: {\n behaviors: [\n value<Gtk.DrawingArea, Gtk.DrawingAreaDrawFunc>(\"drawFunc\", (area, draw) => {\n area.setDrawFunc(draw);\n area.queueDraw();\n }),\n ],\n },\n GtkDragSource: {\n behaviors: [\n value<Gtk.DragSource, DragSourceIcon>(\"icon\", (source, icon) => {\n source.setIcon(icon.paintable ?? null, icon.hotX ?? 0, icon.hotY ?? 0);\n }),\n ],\n },\n GtkEditable: {\n behaviors: [controlledText(\"text\")],\n },\n};\n\nfunction layoutChild(parent: Gtk.Widget, child: Gtk.Widget): GObject.Object | null {\n return parent.getLayoutManager()?.getLayoutChild(child) ?? null;\n}\n\nconst buildMenu = (items: MenuItem[]): Gio.Menu => {\n const menu = Gio.Menu.new();\n\n for (const item of items) {\n appendMenuItem(menu, item);\n }\n\n return menu;\n};\n\nfunction appendMenuItem(menu: Gio.Menu, item: MenuItem): void {\n const label = item.label ?? null;\n\n if (item.submenu !== undefined) {\n menu.appendSubmenu(label, buildMenu(item.submenu));\n\n return;\n }\n\n if (item.section !== undefined) {\n menu.appendSection(label, buildMenu(item.section));\n\n return;\n }\n\n menu.append(label, item.action ?? null);\n}\n\nregisterElements(BUILTIN_ELEMENTS);\nregisterElements(BUILTIN_BEHAVIORS);\n"]}
@@ -1,9 +1,10 @@
1
1
  import { type ElementConfig } from "./reconciler/registry.js";
2
2
  declare const SINGLE_CHILD_TYPES: string[];
3
3
  /**
4
- * The static, runtime-free half of the built-in element configuration: which base props interface each
5
- * generated element extends, which component wraps it, and whether its GObject is created lazily by its
6
- * parent. Codegen imports this module, so it must never reach the GObject bindings.
4
+ * The framework's own element configuration for the GTK types it customizes: the base props interface each
5
+ * generated element extends, the component that wraps it, the GObject properties left out of its generated
6
+ * props, and whether its GObject is created by its parent. Carries no behaviors, so importing it never
7
+ * reaches the GObject bindings.
7
8
  */
8
9
  declare const BUILTIN_ELEMENTS: Record<string, ElementConfig>;
9
10
  export { SINGLE_CHILD_TYPES, BUILTIN_ELEMENTS };
@@ -1 +1 @@
1
- {"version":3,"file":"element-config.d.ts","sourceRoot":"","sources":["../src/element-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAsB,MAAM,0BAA0B,CAAC;AAElF,QAAA,MAAM,kBAAkB,EAAE,MAAM,EAsB/B,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAqHnD,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"element-config.d.ts","sourceRoot":"","sources":["../src/element-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAsB,MAAM,0BAA0B,CAAC;AAElF,QAAA,MAAM,kBAAkB,EAAE,MAAM,EAsB/B,CAAC;AAEF;;;;;GAKG;AACH,QAAA,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAqHnD,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,CAAC"}
@@ -23,14 +23,15 @@ const SINGLE_CHILD_TYPES = [
23
23
  "GtkWindowHandle",
24
24
  ];
25
25
  /**
26
- * The static, runtime-free half of the built-in element configuration: which base props interface each
27
- * generated element extends, which component wraps it, and whether its GObject is created lazily by its
28
- * parent. Codegen imports this module, so it must never reach the GObject bindings.
26
+ * The framework's own element configuration for the GTK types it customizes: the base props interface each
27
+ * generated element extends, the component that wraps it, the GObject properties left out of its generated
28
+ * props, and whether its GObject is created by its parent. Carries no behaviors, so importing it never
29
+ * reaches the GObject bindings.
29
30
  */
30
31
  const BUILTIN_ELEMENTS = {
31
32
  ...forTypes(SINGLE_CHILD_TYPES, {
32
33
  props: internal("ChildrenProps"),
33
- omitProps: ["child"],
34
+ omittedProps: ["child"],
34
35
  }),
35
36
  ...forTypes(["GtkHeaderBar", "GtkActionBar"], {
36
37
  props: internal("GtkHeaderBarProps"),
@@ -38,7 +39,7 @@ const BUILTIN_ELEMENTS = {
38
39
  GtkWindow: {
39
40
  props: internal("ChildrenProps"),
40
41
  component: internal("createWindowComponent"),
41
- omitProps: ["child"],
42
+ omittedProps: ["child"],
42
43
  },
43
44
  GtkLabel: {
44
45
  props: internal("ChildrenProps"),
@@ -53,19 +54,19 @@ const BUILTIN_ELEMENTS = {
53
54
  props: internal("GtkTextChildAnchorProps"),
54
55
  },
55
56
  GtkGridLayoutChild: {
56
- lazy: true,
57
+ isLazy: true,
57
58
  },
58
59
  GtkFixedLayoutChild: {
59
- lazy: true,
60
+ isLazy: true,
60
61
  },
61
62
  GtkOverlayLayoutChild: {
62
- lazy: true,
63
+ isLazy: true,
63
64
  },
64
65
  GtkStackPage: {
65
- lazy: true,
66
+ isLazy: true,
66
67
  },
67
68
  GtkNotebookPage: {
68
- lazy: true,
69
+ isLazy: true,
69
70
  },
70
71
  GActionGroup: {
71
72
  props: internal("GActionGroupProps"),
@@ -84,7 +85,7 @@ const BUILTIN_ELEMENTS = {
84
85
  },
85
86
  GtkOverlay: {
86
87
  props: internal("GtkOverlayProps"),
87
- omitProps: ["child"],
88
+ omittedProps: ["child"],
88
89
  },
89
90
  GtkShortcutController: {
90
91
  props: internal("GtkShortcutControllerProps"),
@@ -1 +1 @@
1
- {"version":3,"file":"element-config.js","sourceRoot":"","sources":["../src/element-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAElF,MAAM,kBAAkB,GAAa;IACjC,gBAAgB;IAChB,WAAW;IACX,gBAAgB;IAChB,aAAa;IACb,aAAa;IACb,aAAa;IACb,iBAAiB;IACjB,UAAU;IACV,oBAAoB;IACpB,eAAe;IACf,eAAe;IACf,aAAa;IACb,eAAe;IACf,YAAY;IACZ,eAAe;IACf,aAAa;IACb,mBAAmB;IACnB,cAAc;IACd,iBAAiB;IACjB,aAAa;IACb,iBAAiB;CACpB,CAAC;AAEF;;;;GAIG;AACH,MAAM,gBAAgB,GAAkC;IACpD,GAAG,QAAQ,CAAC,kBAAkB,EAAE;QAC5B,KAAK,EAAE,QAAQ,CAAC,eAAe,CAAC;QAChC,SAAS,EAAE,CAAC,OAAO,CAAC;KACvB,CAAC;IACF,GAAG,QAAQ,CAAC,CAAC,cAAc,EAAE,cAAc,CAAC,EAAE;QAC1C,KAAK,EAAE,QAAQ,CAAC,mBAAmB,CAAC;KACvC,CAAC;IACF,SA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sourcesContent":["import { type ElementConfig, forTypes, internal } from \"./reconciler/registry.js\";\n\nconst SINGLE_CHILD_TYPES: string[] = [\n \"GtkAspectFrame\",\n \"GtkButton\",\n \"GtkCheckButton\",\n \"GtkComboBox\",\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\n/**\n * The static, runtime-free half of the built-in element configuration: which base props interface each\n * generated element extends, which component wraps it, and whether its GObject is created lazily by its\n * parent. Codegen imports this module, so it must never reach the GObject bindings.\n */\nconst BUILTIN_ELEMENTS: Record<string, ElementConfig> = {\n ...forTypes(SINGLE_CHILD_TYPES, {\n props: internal(\"ChildrenProps\"),\n omitProps: [\"child\"],\n }),\n ...forTypes([\"GtkHeaderBar\", \"GtkActionBar\"], {\n props: internal(\"GtkHeaderBarProps\"),\n }),\n GtkWindow: {\n props: internal(\"ChildrenProps\"),\n component: internal(\"createWindowComponent\"),\n omitProps: [\"child\"],\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\"),\n },\n GtkGridLayoutChild: {\n lazy: true,\n },\n GtkFixedLayoutChild: {\n lazy: true,\n },\n GtkOverlayLayoutChild: {\n lazy: true,\n },\n GtkStackPage: {\n lazy: true,\n },\n GtkNotebookPage: {\n lazy: true,\n },\n GActionGroup: {\n props: internal(\"GActionGroupProps\"),\n },\n GtkWidget: {\n props: internal(\"GtkWidgetProps\"),\n },\n GtkBox: {\n props: internal(\"ChildrenProps\"),\n },\n GtkListBox: {\n props: internal(\"ChildrenProps\"),\n },\n GtkFlowBox: {\n props: internal(\"ChildrenProps\"),\n },\n GtkOverlay: {\n props: internal(\"GtkOverlayProps\"),\n omitProps: [\"child\"],\n },\n GtkShortcutController: {\n props: internal(\"GtkShortcutControllerProps\"),\n },\n GtkTextView: {\n props: internal(\"ChildrenProps\"),\n },\n GActionMap: {\n props: internal(\"GActionMapProps\"),\n },\n GMenu: {\n props: internal(\"GMenuProps\"),\n },\n GtkColumnView: {\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 },\n GtkConstraintLayout: {\n props: internal(\"GtkConstraintLayoutProps\"),\n },\n GtkStack: {\n props: internal(\"ChildrenProps\"),\n },\n GtkNotebook: {\n props: internal(\"ChildrenProps\"),\n },\n GtkApplication: {\n props: internal(\"GtkApplicationProps\"),\n component: internal(\"createApplicationComponent\"),\n },\n GtkAboutDialog: {\n props: internal(\"GtkAboutDialogProps\"),\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};\n\nexport { SINGLE_CHILD_TYPES, BUILTIN_ELEMENTS };\n"]}
1
+ {"version":3,"file":"element-config.js","sourceRoot":"","sources":["../src/element-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAElF,MAAM,kBAAkB,GAAa;IACjC,gBAAgB;IAChB,WAAW;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;KACpD;IACD,cAAc,EAAE;QACZ,KAAK,EAAE,QAAQ,CAAC,qBAAqB,CAAC;KACzC;IACD,QAAQ,EAAE;QACN,KAAK,EAAE,QAAQ,CAAC,eAAe,CAAC;KACnC;IACD,WAAW,EAAE;QACT,KAAK,EAAE,QAAQ,CAAC,kBAAkB,CAAC;KACtC;IACD,WAAW,EAAE;QACT,KAAK,EAAE,QAAQ,CAAC,kBAAkB,CAAC;KACtC;IACD,aAAa,EAAE;QACX,KAAK,EAAE,QAAQ,CAAC,oBAAoB,CAAC;KACxC;IACD,cAAc,EAAE;QACZ,KAAK,EAAE,QAAQ,CAAC,qBAAqB,CAAC;KACzC;IACD,aAAa,EAAE;QACX,KAAK,EAAE,QAAQ,CAAC,oBAAoB,CAAC;KACxC;CACJ,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,CAAC","sourcesContent":["import { type ElementConfig, forTypes, internal } from \"./reconciler/registry.js\";\n\nconst SINGLE_CHILD_TYPES: string[] = [\n \"GtkAspectFrame\",\n \"GtkButton\",\n \"GtkCheckButton\",\n \"GtkComboBox\",\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\n/**\n * The framework's own element configuration for the GTK types it customizes: the base props interface each\n * generated element extends, the component that wraps it, the GObject properties left out of its generated\n * props, and whether its GObject is created by its parent. Carries no behaviors, so importing it never\n * reaches the GObject bindings.\n */\nconst BUILTIN_ELEMENTS: Record<string, ElementConfig> = {\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 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\"),\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(\"GActionGroupProps\"),\n },\n GtkWidget: {\n props: internal(\"GtkWidgetProps\"),\n },\n GtkBox: {\n props: internal(\"ChildrenProps\"),\n },\n GtkListBox: {\n props: internal(\"ChildrenProps\"),\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 GtkTextView: {\n props: internal(\"ChildrenProps\"),\n },\n GActionMap: {\n props: internal(\"GActionMapProps\"),\n },\n GMenu: {\n props: internal(\"GMenuProps\"),\n },\n GtkColumnView: {\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 },\n GtkConstraintLayout: {\n props: internal(\"GtkConstraintLayoutProps\"),\n },\n GtkStack: {\n props: internal(\"ChildrenProps\"),\n },\n GtkNotebook: {\n props: internal(\"ChildrenProps\"),\n },\n GtkApplication: {\n props: internal(\"GtkApplicationProps\"),\n component: internal(\"createApplicationComponent\"),\n },\n GtkAboutDialog: {\n props: internal(\"GtkAboutDialogProps\"),\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};\n\nexport { SINGLE_CHILD_TYPES, BUILTIN_ELEMENTS };\n"]}
@@ -2,21 +2,22 @@ import type * as GObject from "@gtkx/gi/gobject";
2
2
  import * as Gio from "@gtkx/gi/gio";
3
3
  import type { SettingsSchema, SettingsSchemaKeys } from "../utils/settings.js";
4
4
  import { type RefProp } from "../utils/ref-prop.js";
5
+ /** Options for {@link useBindSetting}. */
5
6
  type UseBindSettingOptions<K extends SettingsSchemaKeys> = {
7
+ /** Schema the settings object is opened from. */
6
8
  schema: SettingsSchema<K>;
9
+ /** Key of that schema to bind. */
7
10
  key: keyof K & string;
11
+ /** Object holding the property, given directly or as a ref; nothing is bound while it is absent. */
8
12
  object: RefProp<GObject.Object>;
13
+ /** camelCase name of the property to keep in sync with the key. */
9
14
  property: string;
15
+ /** Direction and conversion behavior of the bind; defaults to `Gio.SettingsBindFlags.DEFAULT`. */
10
16
  flags?: Gio.SettingsBindFlags;
11
17
  };
12
18
  /**
13
- * Binds a GSettings key to a property of a GObject, keeping the two in sync for the object's lifetime.
14
- *
15
- * @param options.schema The schema reference identifying the settings backend.
16
- * @param options.key The key within the schema to bind.
17
- * @param options.object The GObject whose property is bound to the setting.
18
- * @param options.property The name of the object property to bind.
19
- * @param options.flags Flags controlling the binding's direction and behaviour.
19
+ * Binds a GSettings key to a property of a GObject, keeping the two in sync until the component unmounts.
20
+ * `property` is given in camelCase, and `flags` defaults to `Gio.SettingsBindFlags.DEFAULT`, a two-way bind.
20
21
  */
21
22
  declare function useBindSetting<K extends SettingsSchemaKeys>({ schema, key, object, property, flags, }: UseBindSettingOptions<K>): void;
22
23
  export { useBindSetting };
@@ -1 +1 @@
1
- {"version":3,"file":"use-bind-setting.d.ts","sourceRoot":"","sources":["../../src/hooks/use-bind-setting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,OAAO,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AAGpC,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAE,KAAK,OAAO,EAAkB,MAAM,sBAAsB,CAAC;AAGpE,KAAK,qBAAqB,CAAC,CAAC,SAAS,kBAAkB,IAAI;IACvD,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC;CACjC,CAAC;AAEF;;;;;;;;GAQG;AACH,iBAAS,cAAc,CAAC,CAAC,SAAS,kBAAkB,EAAE,EAClD,MAAM,EACN,GAAG,EACH,MAAM,EACN,QAAQ,EACR,KAAqC,GACxC,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,IAAI,CAiBjC;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"use-bind-setting.d.ts","sourceRoot":"","sources":["../../src/hooks/use-bind-setting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,OAAO,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AAGpC,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAE,KAAK,OAAO,EAAkB,MAAM,sBAAsB,CAAC;AAGpE,0CAA0C;AAC1C,KAAK,qBAAqB,CAAC,CAAC,SAAS,kBAAkB,IAAI;IACvD,iDAAiD;IACjD,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAC1B,kCAAkC;IAClC,GAAG,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC;IACtB,oGAAoG;IACpG,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAChC,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAC;IACjB,kGAAkG;IAClG,KAAK,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC;CACjC,CAAC;AAEF;;;GAGG;AACH,iBAAS,cAAc,CAAC,CAAC,SAAS,kBAAkB,EAAE,EAClD,MAAM,EACN,GAAG,EACH,MAAM,EACN,QAAQ,EACR,KAAqC,GACxC,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,IAAI,CAiBjC;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -4,13 +4,8 @@ import { useLayoutEffect } from "react";
4
4
  import { resolveRefProp } from "../utils/ref-prop.js";
5
5
  import { useSettings } from "./use-setting.js";
6
6
  /**
7
- * Binds a GSettings key to a property of a GObject, keeping the two in sync for the object's lifetime.
8
- *
9
- * @param options.schema The schema reference identifying the settings backend.
10
- * @param options.key The key within the schema to bind.
11
- * @param options.object The GObject whose property is bound to the setting.
12
- * @param options.property The name of the object property to bind.
13
- * @param options.flags Flags controlling the binding's direction and behaviour.
7
+ * Binds a GSettings key to a property of a GObject, keeping the two in sync until the component unmounts.
8
+ * `property` is given in camelCase, and `flags` defaults to `Gio.SettingsBindFlags.DEFAULT`, a two-way bind.
14
9
  */
15
10
  function useBindSetting({ schema, key, object, property, flags = Gio.SettingsBindFlags.DEFAULT, }) {
16
11
  const settings = useSettings(schema);
@@ -1 +1 @@
1
- {"version":3,"file":"use-bind-setting.js","sourceRoot":"","sources":["../../src/hooks/use-bind-setting.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAAgB,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAU/C;;;;;;;;GAQG;AACH,SAAS,cAAc,CAA+B,EAClD,MAAM,EACN,GAAG,EACH,MAAM,EACN,QAAQ,EACR,KAAK,GAAG,GAAG,CAAC,iBAAiB,CAAC,OAAO,GACd;IACvB,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;IACrC,MAAM,YAAY,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;IAEzC,eAAe,CAAC,GAAG,EAAE;QACjB,MAAM,QAAQ,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;QAExC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,OAAO;QACX,CAAC;QAED,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;QAElD,OAAO,GAAG,EAAE;YACR,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;QAChD,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC;AACrD,CAAC;AAED,OAAO,EAAE,cAAc,EAAE,CAAC","sourcesContent":["import type * as GObject from \"@gtkx/gi/gobject\";\nimport * as Gio from \"@gtkx/gi/gio\";\nimport { kebabCase } from \"@gtkx/utils\";\nimport { useLayoutEffect } from \"react\";\nimport type { SettingsSchema, SettingsSchemaKeys } from \"../utils/settings.js\";\nimport { type RefProp, resolveRefProp } from \"../utils/ref-prop.js\";\nimport { useSettings } from \"./use-setting.js\";\n\ntype UseBindSettingOptions<K extends SettingsSchemaKeys> = {\n schema: SettingsSchema<K>;\n key: keyof K & string;\n object: RefProp<GObject.Object>;\n property: string;\n flags?: Gio.SettingsBindFlags;\n};\n\n/**\n * Binds a GSettings key to a property of a GObject, keeping the two in sync for the object's lifetime.\n *\n * @param options.schema The schema reference identifying the settings backend.\n * @param options.key The key within the schema to bind.\n * @param options.object The GObject whose property is bound to the setting.\n * @param options.property The name of the object property to bind.\n * @param options.flags Flags controlling the binding's direction and behaviour.\n */\nfunction useBindSetting<K extends SettingsSchemaKeys>({\n schema,\n key,\n object,\n property,\n flags = Gio.SettingsBindFlags.DEFAULT,\n}: UseBindSettingOptions<K>): void {\n const settings = useSettings(schema);\n const propertyName = kebabCase(property);\n\n useLayoutEffect(() => {\n const resolved = resolveRefProp(object);\n\n if (!resolved) {\n return;\n }\n\n settings.bind(key, resolved, propertyName, flags);\n\n return () => {\n Gio.Settings.unbind(resolved, propertyName);\n };\n }, [settings, key, object, propertyName, flags]);\n}\n\nexport { useBindSetting };\n"]}
1
+ {"version":3,"file":"use-bind-setting.js","sourceRoot":"","sources":["../../src/hooks/use-bind-setting.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAAgB,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAgB/C;;;GAGG;AACH,SAAS,cAAc,CAA+B,EAClD,MAAM,EACN,GAAG,EACH,MAAM,EACN,QAAQ,EACR,KAAK,GAAG,GAAG,CAAC,iBAAiB,CAAC,OAAO,GACd;IACvB,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;IACrC,MAAM,YAAY,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;IAEzC,eAAe,CAAC,GAAG,EAAE;QACjB,MAAM,QAAQ,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;QAExC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,OAAO;QACX,CAAC;QAED,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;QAElD,OAAO,GAAG,EAAE;YACR,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;QAChD,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC;AACrD,CAAC;AAED,OAAO,EAAE,cAAc,EAAE,CAAC","sourcesContent":["import type * as GObject from \"@gtkx/gi/gobject\";\nimport * as Gio from \"@gtkx/gi/gio\";\nimport { kebabCase } from \"@gtkx/utils\";\nimport { useLayoutEffect } from \"react\";\nimport type { SettingsSchema, SettingsSchemaKeys } from \"../utils/settings.js\";\nimport { type RefProp, resolveRefProp } from \"../utils/ref-prop.js\";\nimport { useSettings } from \"./use-setting.js\";\n\n/** Options for {@link useBindSetting}. */\ntype UseBindSettingOptions<K extends SettingsSchemaKeys> = {\n /** Schema the settings object is opened from. */\n schema: SettingsSchema<K>;\n /** Key of that schema to bind. */\n key: keyof K & string;\n /** Object holding the property, given directly or as a ref; nothing is bound while it is absent. */\n object: RefProp<GObject.Object>;\n /** camelCase name of the property to keep in sync with the key. */\n property: string;\n /** Direction and conversion behavior of the bind; defaults to `Gio.SettingsBindFlags.DEFAULT`. */\n flags?: Gio.SettingsBindFlags;\n};\n\n/**\n * Binds a GSettings key to a property of a GObject, keeping the two in sync until the component unmounts.\n * `property` is given in camelCase, and `flags` defaults to `Gio.SettingsBindFlags.DEFAULT`, a two-way bind.\n */\nfunction useBindSetting<K extends SettingsSchemaKeys>({\n schema,\n key,\n object,\n property,\n flags = Gio.SettingsBindFlags.DEFAULT,\n}: UseBindSettingOptions<K>): void {\n const settings = useSettings(schema);\n const propertyName = kebabCase(property);\n\n useLayoutEffect(() => {\n const resolved = resolveRefProp(object);\n\n if (!resolved) {\n return;\n }\n\n settings.bind(key, resolved, propertyName, flags);\n\n return () => {\n Gio.Settings.unbind(resolved, propertyName);\n };\n }, [settings, key, object, propertyName, flags]);\n}\n\nexport { useBindSetting };\n"]}
@@ -2,7 +2,9 @@ import type * as Gtk from "@gtkx/gi/gtk";
2
2
  import { type Context } from "react";
3
3
  declare const ParentWindowContext: Context<Gtk.Window | null>;
4
4
  /**
5
- * Returns the `Gtk.Window` provided by the nearest window ancestor, or `null` when there is none.
5
+ * Returns the `Gtk.Window` of the nearest window ancestor. This is `null` on the first render even inside a
6
+ * window, because a window provides itself only once its GObject exists, and stays `null` outside one. The
7
+ * component re-renders when it resolves, so derive from the value rather than reading it once.
6
8
  */
7
9
  declare const useParentWindow: () => Gtk.Window | null;
8
10
  export { ParentWindowContext, useParentWindow };
@@ -1 +1 @@
1
- {"version":3,"file":"use-parent-window.d.ts","sourceRoot":"","sources":["../../src/hooks/use-parent-window.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,GAAG,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,KAAK,OAAO,EAAsB,MAAM,OAAO,CAAC;AAEzD,QAAA,MAAM,mBAAmB,EAAE,OAAO,CAAC,GAAG,CAAC,MAAM,GAAG,IAAI,CAA0C,CAAC;AAE/F;;GAEG;AACH,QAAA,MAAM,eAAe,QAAO,GAAG,CAAC,MAAM,GAAG,IAAgC,CAAC;AAE1E,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"use-parent-window.d.ts","sourceRoot":"","sources":["../../src/hooks/use-parent-window.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,GAAG,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,KAAK,OAAO,EAAsB,MAAM,OAAO,CAAC;AAEzD,QAAA,MAAM,mBAAmB,EAAE,OAAO,CAAC,GAAG,CAAC,MAAM,GAAG,IAAI,CAA0C,CAAC;AAE/F;;;;GAIG;AACH,QAAA,MAAM,eAAe,QAAO,GAAG,CAAC,MAAM,GAAG,IAAgC,CAAC;AAE1E,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,CAAC"}
@@ -1,7 +1,9 @@
1
1
  import { createContext, use } from "react";
2
2
  const ParentWindowContext = createContext(null);
3
3
  /**
4
- * Returns the `Gtk.Window` provided by the nearest window ancestor, or `null` when there is none.
4
+ * Returns the `Gtk.Window` of the nearest window ancestor. This is `null` on the first render even inside a
5
+ * window, because a window provides itself only once its GObject exists, and stays `null` outside one. The
6
+ * component re-renders when it resolves, so derive from the value rather than reading it once.
5
7
  */
6
8
  const useParentWindow = () => use(ParentWindowContext);
7
9
  export { ParentWindowContext, useParentWindow };
@@ -1 +1 @@
1
- {"version":3,"file":"use-parent-window.js","sourceRoot":"","sources":["../../src/hooks/use-parent-window.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,aAAa,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEzD,MAAM,mBAAmB,GAA+B,aAAa,CAAoB,IAAI,CAAC,CAAC;AAE/F;;GAEG;AACH,MAAM,eAAe,GAAG,GAAsB,EAAE,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;AAE1E,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,CAAC","sourcesContent":["import type * as Gtk from \"@gtkx/gi/gtk\";\nimport { type Context, createContext, use } from \"react\";\n\nconst ParentWindowContext: Context<Gtk.Window | null> = createContext<Gtk.Window | null>(null);\n\n/**\n * Returns the `Gtk.Window` provided by the nearest window ancestor, or `null` when there is none.\n */\nconst useParentWindow = (): Gtk.Window | null => use(ParentWindowContext);\n\nexport { ParentWindowContext, useParentWindow };\n"]}
1
+ {"version":3,"file":"use-parent-window.js","sourceRoot":"","sources":["../../src/hooks/use-parent-window.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,aAAa,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEzD,MAAM,mBAAmB,GAA+B,aAAa,CAAoB,IAAI,CAAC,CAAC;AAE/F;;;;GAIG;AACH,MAAM,eAAe,GAAG,GAAsB,EAAE,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;AAE1E,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,CAAC","sourcesContent":["import type * as Gtk from \"@gtkx/gi/gtk\";\nimport { type Context, createContext, use } from \"react\";\n\nconst ParentWindowContext: Context<Gtk.Window | null> = createContext<Gtk.Window | null>(null);\n\n/**\n * Returns the `Gtk.Window` of the nearest window ancestor. This is `null` on the first render even inside a\n * window, because a window provides itself only once its GObject exists, and stays `null` outside one. The\n * component re-renders when it resolves, so derive from the value rather than reading it once.\n */\nconst useParentWindow = (): Gtk.Window | null => use(ParentWindowContext);\n\nexport { ParentWindowContext, useParentWindow };\n"]}
@@ -1,13 +1,13 @@
1
1
  import type * as GObject from "@gtkx/gi/gobject";
2
2
  import type { RefProp } from "../utils/ref-prop.js";
3
3
  type Properties<T extends GObject.Object> = NonNullable<T["__properties__"]>;
4
+ /** Every property `T` declares that is also readable off the instance, in camelCase. */
4
5
  type PropertyName<T extends GObject.Object> = keyof Properties<T> & keyof T;
5
6
  /**
6
7
  * Subscribes to a GObject property and returns its current value, re-rendering when the property changes.
7
8
  *
8
- * @param object The GObject (or ref to one) whose property to observe.
9
9
  * @param propertyName The camelCase name of a readable property on the object.
10
- * @returns The current property value, or `undefined` when the object is not resolved.
10
+ * @returns The current value, or `undefined` while the object is null or an unresolved ref.
11
11
  */
12
12
  declare function useProperty<T extends GObject.Object, P extends PropertyName<T>>(object: RefProp<T>, propertyName: P & string): T[P] | undefined;
13
13
  export { useProperty, type PropertyName };
@@ -1 +1 @@
1
- {"version":3,"file":"use-property.d.ts","sourceRoot":"","sources":["../../src/hooks/use-property.ts"],"names":[],"mappings":"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,CAAC,GAAG,MAAM,GACzB,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAElB;AAED,OAAO,EAAE,WAAW,EAAE,KAAK,YAAY,EAAE,CAAC"}
@@ -3,9 +3,8 @@ import { useObjectValue } from "./use-object-value.js";
3
3
  /**
4
4
  * Subscribes to a GObject property and returns its current value, re-rendering when the property changes.
5
5
  *
6
- * @param object The GObject (or ref to one) whose property to observe.
7
6
  * @param propertyName The camelCase name of a readable property on the object.
8
- * @returns The current property value, or `undefined` when the object is not resolved.
7
+ * @returns The current value, or `undefined` while the object is null or an unresolved ref.
9
8
  */
10
9
  function useProperty(object, propertyName) {
11
10
  return useObjectValue(object, `notify::${kebabCase(propertyName)}`, (obj) => obj?.[propertyName]);
@@ -1 +1 @@
1
- {"version":3,"file":"use-property.js","sourceRoot":"","sources":["../../src/hooks/use-property.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAKvD;;;;;;GAMG;AACH,SAAS,WAAW,CAChB,MAAkB,EAClB,YAAwB;IAExB,OAAO,cAAc,CAAC,MAAM,EAAE,WAAW,SAAS,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;AACtG,CAAC;AAED,OAAO,EAAE,WAAW,EAAqB,CAAC","sourcesContent":["import type * as GObject from \"@gtkx/gi/gobject\";\nimport { kebabCase } from \"@gtkx/utils\";\nimport type { RefProp } from \"../utils/ref-prop.js\";\nimport { useObjectValue } from \"./use-object-value.js\";\n\ntype Properties<T extends GObject.Object> = NonNullable<T[\"__properties__\"]>;\ntype PropertyName<T extends GObject.Object> = keyof Properties<T> & keyof T;\n\n/**\n * Subscribes to a GObject property and returns its current value, re-rendering when the property changes.\n *\n * @param object The GObject (or ref to one) whose property to observe.\n * @param propertyName The camelCase name of a readable property on the object.\n * @returns The current property value, or `undefined` when the object is not resolved.\n */\nfunction useProperty<T extends GObject.Object, P extends PropertyName<T>>(\n object: RefProp<T>,\n propertyName: P & string,\n): T[P] | undefined {\n return useObjectValue(object, `notify::${kebabCase(propertyName)}`, (obj) => obj?.[propertyName]);\n}\n\nexport { useProperty, type PropertyName };\n"]}
1
+ {"version":3,"file":"use-property.js","sourceRoot":"","sources":["../../src/hooks/use-property.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAMvD;;;;;GAKG;AACH,SAAS,WAAW,CAChB,MAAkB,EAClB,YAAwB;IAExB,OAAO,cAAc,CAAC,MAAM,EAAE,WAAW,SAAS,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;AACtG,CAAC;AAED,OAAO,EAAE,WAAW,EAAqB,CAAC","sourcesContent":["import type * as GObject from \"@gtkx/gi/gobject\";\nimport { kebabCase } from \"@gtkx/utils\";\nimport type { RefProp } from \"../utils/ref-prop.js\";\nimport { useObjectValue } from \"./use-object-value.js\";\n\ntype Properties<T extends GObject.Object> = NonNullable<T[\"__properties__\"]>;\n/** Every property `T` declares that is also readable off the instance, in camelCase. */\ntype PropertyName<T extends GObject.Object> = keyof Properties<T> & keyof T;\n\n/**\n * Subscribes to a GObject property and returns its current value, re-rendering when the property changes.\n *\n * @param propertyName The camelCase name of a readable property on the object.\n * @returns The current value, or `undefined` while the object is null or an unresolved ref.\n */\nfunction useProperty<T extends GObject.Object, P extends PropertyName<T>>(\n object: RefProp<T>,\n propertyName: P & string,\n): T[P] | undefined {\n return useObjectValue(object, `notify::${kebabCase(propertyName)}`, (obj) => obj?.[propertyName]);\n}\n\nexport { useProperty, type PropertyName };\n"]}
@@ -5,9 +5,8 @@ declare const useSettings: <K extends SettingsSchemaKeys>({ id, path }: UseSetti
5
5
  /**
6
6
  * Reads and writes a single key of a GSettings schema, re-rendering when the stored value changes.
7
7
  *
8
- * @param schema The schema reference identifying the settings backend.
9
- * @param key The key within the schema to read and write.
10
- * @returns A tuple of the current value and a setter that persists a new value.
8
+ * @returns The current value, and a setter that writes a new one back to GSettings.
9
+ * @throws When the key is not declared in the schema.
11
10
  */
12
11
  declare function useSetting<K extends SettingsSchemaKeys, P extends keyof K>(schema: SettingsSchema<K>, key: P & string): [SettingValue<K, P>, (value: SettingValue<K, P>) => void];
13
12
  export { useSettings, useSetting };
@@ -1 +1 @@
1
- {"version":3,"file":"use-setting.d.ts","sourceRoot":"","sources":["../../src/hooks/use-setting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AAEpC,OAAO,EAEH,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACpB,MAAM,sBAAsB,CAAC;AAG9B,KAAK,gBAAgB,CAAC,CAAC,SAAS,kBAAkB,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,CAAC;AAE7F,QAAA,MAAM,WAAW,GAAI,CAAC,SAAS,kBAAkB,EAAE,cAAc,gBAAgB,CAAC,CAAC,CAAC,KAAG,GAAG,CAAC,QACU,CAAC;AAEtG;;;;;;GAMG;AACH,iBAAS,UAAU,CAAC,CAAC,SAAS,kBAAkB,EAAE,CAAC,SAAS,MAAM,CAAC,EAC/D,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,EACzB,GAAG,EAAE,CAAC,GAAG,MAAM,GAChB,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAM3D;AAED,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"use-setting.d.ts","sourceRoot":"","sources":["../../src/hooks/use-setting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AAEpC,OAAO,EAEH,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACpB,MAAM,sBAAsB,CAAC;AAG9B,KAAK,gBAAgB,CAAC,CAAC,SAAS,kBAAkB,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,CAAC;AAE7F,QAAA,MAAM,WAAW,GAAI,CAAC,SAAS,kBAAkB,EAAE,cAAc,gBAAgB,CAAC,CAAC,CAAC,KAAG,GAAG,CAAC,QACU,CAAC;AAEtG;;;;;GAKG;AACH,iBAAS,UAAU,CAAC,CAAC,SAAS,kBAAkB,EAAE,CAAC,SAAS,MAAM,CAAC,EAC/D,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,EACzB,GAAG,EAAE,CAAC,GAAG,MAAM,GAChB,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAM3D;AAED,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC"}
@@ -6,9 +6,8 @@ const useSettings = ({ id, path }) => useMemo(() => (path ? new Gio.Settings({ s
6
6
  /**
7
7
  * Reads and writes a single key of a GSettings schema, re-rendering when the stored value changes.
8
8
  *
9
- * @param schema The schema reference identifying the settings backend.
10
- * @param key The key within the schema to read and write.
11
- * @returns A tuple of the current value and a setter that persists a new value.
9
+ * @returns The current value, and a setter that writes a new one back to GSettings.
10
+ * @throws When the key is not declared in the schema.
12
11
  */
13
12
  function useSetting(schema, key) {
14
13
  const settings = useSettings({ id: schema.id, path: schema.path });
@@ -1 +1 @@
1
- {"version":3,"file":"use-setting.js","sourceRoot":"","sources":["../../src/hooks/use-setting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EACH,sBAAsB,GAIzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAIvD,MAAM,WAAW,GAAG,CAA+B,EAAE,EAAE,EAAE,IAAI,EAAuB,EAAgB,EAAE,CAClG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;AAEtG;;;;;;GAMG;AACH,SAAS,UAAU,CACf,MAAyB,EACzB,GAAe;IAEf,MAAM,QAAQ,GAAG,WAAW,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;IACnE,MAAM,QAAQ,GAAG,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/D,MAAM,KAAK,GAAG,cAAc,CAAC,QAAQ,EAAE,YAAY,GAAG,EAAE,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;IAEhF,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;AACjC,CAAC;AAED,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC","sourcesContent":["import * as Gio from \"@gtkx/gi/gio\";\nimport { useMemo } from \"react\";\nimport {\n resolveSettingAccessor,\n type SettingsSchema,\n type SettingsSchemaKeys,\n type SettingValue,\n} from \"../utils/settings.js\";\nimport { useObjectValue } from \"./use-object-value.js\";\n\ntype UseSettingsProps<K extends SettingsSchemaKeys> = Pick<SettingsSchema<K>, \"id\" | \"path\">;\n\nconst useSettings = <K extends SettingsSchemaKeys>({ id, path }: UseSettingsProps<K>): Gio.Settings =>\n useMemo(() => (path ? new Gio.Settings({ schema: id, path }) : Gio.Settings.new(id)), [id, path]);\n\n/**\n * Reads and writes a single key of a GSettings schema, re-rendering when the stored value changes.\n *\n * @param schema The schema reference identifying the settings backend.\n * @param key The key within the schema to read and write.\n * @returns A tuple of the current value and a setter that persists a new value.\n */\nfunction useSetting<K extends SettingsSchemaKeys, P extends keyof K>(\n schema: SettingsSchema<K>,\n key: P & string,\n): [SettingValue<K, P>, (value: SettingValue<K, P>) => void] {\n const settings = useSettings({ id: schema.id, path: schema.path });\n const accessor = resolveSettingAccessor(settings, schema, key);\n const value = useObjectValue(settings, `changed::${key}`, () => accessor.get());\n\n return [value, accessor.set];\n}\n\nexport { useSettings, useSetting };\n"]}
1
+ {"version":3,"file":"use-setting.js","sourceRoot":"","sources":["../../src/hooks/use-setting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EACH,sBAAsB,GAIzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAIvD,MAAM,WAAW,GAAG,CAA+B,EAAE,EAAE,EAAE,IAAI,EAAuB,EAAgB,EAAE,CAClG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;AAEtG;;;;;GAKG;AACH,SAAS,UAAU,CACf,MAAyB,EACzB,GAAe;IAEf,MAAM,QAAQ,GAAG,WAAW,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;IACnE,MAAM,QAAQ,GAAG,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/D,MAAM,KAAK,GAAG,cAAc,CAAC,QAAQ,EAAE,YAAY,GAAG,EAAE,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;IAEhF,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;AACjC,CAAC;AAED,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC","sourcesContent":["import * as Gio from \"@gtkx/gi/gio\";\nimport { useMemo } from \"react\";\nimport {\n resolveSettingAccessor,\n type SettingsSchema,\n type SettingsSchemaKeys,\n type SettingValue,\n} from \"../utils/settings.js\";\nimport { useObjectValue } from \"./use-object-value.js\";\n\ntype UseSettingsProps<K extends SettingsSchemaKeys> = Pick<SettingsSchema<K>, \"id\" | \"path\">;\n\nconst useSettings = <K extends SettingsSchemaKeys>({ id, path }: UseSettingsProps<K>): Gio.Settings =>\n useMemo(() => (path ? new Gio.Settings({ schema: id, path }) : Gio.Settings.new(id)), [id, path]);\n\n/**\n * Reads and writes a single key of a GSettings schema, re-rendering when the stored value changes.\n *\n * @returns The current value, and a setter that writes a new one back to GSettings.\n * @throws When the key is not declared in the schema.\n */\nfunction useSetting<K extends SettingsSchemaKeys, P extends keyof K>(\n schema: SettingsSchema<K>,\n key: P & string,\n): [SettingValue<K, P>, (value: SettingValue<K, P>) => void] {\n const settings = useSettings({ id: schema.id, path: schema.path });\n const accessor = resolveSettingAccessor(settings, schema, key);\n const value = useObjectValue(settings, `changed::${key}`, () => accessor.get());\n\n return [value, accessor.set];\n}\n\nexport { useSettings, useSetting };\n"]}
@@ -2,11 +2,19 @@ import type * as GObject from "@gtkx/gi/gobject";
2
2
  import type { SignalHandler } from "@gtkx/runtime";
3
3
  import { type RefProp } from "../utils/ref-prop.js";
4
4
  type Signals<T extends GObject.Object> = NonNullable<T["__signals__"]>;
5
+ /** Every signal name `T` declares, on its own or narrowed by a `::detail` suffix. */
5
6
  type SignalName<T extends GObject.Object> = keyof Signals<T> | `${keyof Signals<T> & string}::${string}`;
7
+ /**
8
+ * The handler signature `T` declares for signal `S`, looked up through any `::detail` suffix and
9
+ * falling back to an untyped `SignalHandler` when the object declares no such signal.
10
+ */
6
11
  type TypedSignalHandler<T extends GObject.Object, S extends string> = S extends keyof Signals<T> ? Signals<T>[S] : S extends `${infer TBase}::${string}` ? TBase extends keyof Signals<T> ? Signals<T>[TBase] : SignalHandler : SignalHandler;
12
+ /** Options for {@link useSignal}. */
7
13
  type UseSignalOptions = {
8
- after?: boolean;
9
- immediate?: boolean;
14
+ /** Runs the handler after the object's own default handler rather than before it. */
15
+ isAfter?: boolean;
16
+ /** Invokes the handler once, with no arguments, as soon as the signal is connected. */
17
+ isImmediate?: boolean;
10
18
  };
11
19
  /**
12
20
  * Connects a handler to a GObject signal for the lifetime of the component, reconnecting when the object changes.
@@ -18,11 +26,9 @@ type UseSignalOptions = {
18
26
  * runs the handler captured on the first render. Keep the calling component unwrapped, or read the values the
19
27
  * handler needs off the GObject itself. React fixes this on the 19.3 line.
20
28
  *
21
- * @param object The GObject (or ref to one) to connect to.
22
- * @param signal The signal name, optionally with a detail suffix.
23
- * @param handler The callback invoked when the signal is emitted.
24
- * @param options Connection options such as running after the default handler or invoking immediately.
29
+ * @param signal The signal name, optionally with a `::detail` suffix.
30
+ * @param options `isAfter` runs the handler after the default handler; `isImmediate` also invokes it on connect.
25
31
  */
26
- declare function useSignal<T extends GObject.Object, S extends SignalName<T> & string>(object: RefProp<T>, signal: S, handler: TypedSignalHandler<T, S>, { after, immediate }?: UseSignalOptions): void;
32
+ declare function useSignal<T extends GObject.Object, S extends SignalName<T> & string>(object: RefProp<T>, signal: S, handler: TypedSignalHandler<T, S>, { isAfter, isImmediate }?: UseSignalOptions): void;
27
33
  export { useSignal, type SignalName, type TypedSignalHandler };
28
34
  //# sourceMappingURL=use-signal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-signal.d.ts","sourceRoot":"","sources":["../../src/hooks/use-signal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,OAAO,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,KAAK,OAAO,EAAkB,MAAM,sBAAsB,CAAC;AAEpE,KAAK,OAAO,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,IAAI,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;AACvE,KAAK,UAAU,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,IAAI,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,GAAG,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,KAAK,MAAM,EAAE,CAAC;AAEzG,KAAK,kBAAkB,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,EAAE,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,MAAM,OAAO,CAAC,CAAC,CAAC,GAC1F,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACb,CAAC,SAAS,GAAG,MAAM,KAAK,KAAK,MAAM,EAAE,GACjC,KAAK,SAAS,MAAM,OAAO,CAAC,CAAC,CAAC,GAC1B,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GACjB,aAAa,GACjB,aAAa,CAAC;AAExB,KAAK,gBAAgB,GAAG;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,iBAAS,SAAS,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,EAAE,CAAC,SAAS,UAAU,C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gBAAgB,GAAG;IACpB,qFAAqF;IACrF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uFAAuF;IACvF,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,iBAAS,SAAS,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,EAAE,CAAC,SAAS,UAAU,CAAC,CAAC,CAAC,GAAG,MAAM,EACzE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAClB,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,EACjC,EAAE,OAAe,EAAE,WAAmB,EAAE,GAAE,gBAAqB,GAChE,IAAI,CAoBN;AAED,OAAO,EAAE,SAAS,EAAE,KAAK,UAAU,EAAE,KAAK,kBAAkB,EAAE,CAAC"}
@@ -10,26 +10,24 @@ import { resolveRefProp } from "../utils/ref-prop.js";
10
10
  * runs the handler captured on the first render. Keep the calling component unwrapped, or read the values the
11
11
  * handler needs off the GObject itself. React fixes this on the 19.3 line.
12
12
  *
13
- * @param object The GObject (or ref to one) to connect to.
14
- * @param signal The signal name, optionally with a detail suffix.
15
- * @param handler The callback invoked when the signal is emitted.
16
- * @param options Connection options such as running after the default handler or invoking immediately.
13
+ * @param signal The signal name, optionally with a `::detail` suffix.
14
+ * @param options `isAfter` runs the handler after the default handler; `isImmediate` also invokes it on connect.
17
15
  */
18
- function useSignal(object, signal, handler, { after = false, immediate = false } = {}) {
16
+ function useSignal(object, signal, handler, { isAfter = false, isImmediate = false } = {}) {
19
17
  const emit = useEffectEvent(handler);
20
18
  useLayoutEffect(() => {
21
19
  const resolved = resolveRefProp(object);
22
20
  if (!resolved) {
23
21
  return;
24
22
  }
25
- resolved.on(signal, emit, after);
26
- if (immediate) {
23
+ resolved.on(signal, emit, isAfter);
24
+ if (isImmediate) {
27
25
  emit();
28
26
  }
29
27
  return () => {
30
28
  resolved.off(signal, emit);
31
29
  };
32
- }, [object, signal, after, immediate]);
30
+ }, [object, signal, isAfter, isImmediate]);
33
31
  }
34
32
  export { useSignal };
35
33
  //# sourceMappingURL=use-signal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-signal.js","sourceRoot":"","sources":["../../src/hooks/use-signal.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,EAAgB,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAkBpE;;;;;;;;;;;;;;GAcG;AACH,SAAS,SAAS,CACd,MAAkB,EAClB,MAAS,EACT,OAAiC,EACjC,EAAE,KAAK,GAAG,KAAK,EAAE,SAAS,GAAG,KAAK,KAAuB,EAAE;IAE3D,MAAM,IAAI,GAAG,cAAc,CAAC,OAAwB,CAAC,CAAC;IAEtD,eAAe,CAAC,GAAG,EAAE;QACjB,MAAM,QAAQ,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;QAExC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,OAAO;QACX,CAAC;QAED,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;QAEjC,IAAI,SAAS,EAAE,CAAC;YACZ,IAAI,EAAE,CAAC;QACX,CAAC;QAED,OAAO,GAAG,EAAE;YACR,QAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC/B,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;AAC3C,CAAC;AAED,OAAO,EAAE,SAAS,EAA4C,CAAC","sourcesContent":["import type * as GObject from \"@gtkx/gi/gobject\";\nimport type { SignalHandler } from \"@gtkx/runtime\";\nimport { useEffectEvent, useLayoutEffect } from \"react\";\nimport { type RefProp, resolveRefProp } from \"../utils/ref-prop.js\";\n\ntype Signals<T extends GObject.Object> = NonNullable<T[\"__signals__\"]>;\ntype SignalName<T extends GObject.Object> = keyof Signals<T> | `${keyof Signals<T> & string}::${string}`;\n\ntype TypedSignalHandler<T extends GObject.Object, S extends string> = S extends keyof Signals<T>\n ? Signals<T>[S]\n : S extends `${infer TBase}::${string}`\n ? TBase extends keyof Signals<T>\n ? Signals<T>[TBase]\n : SignalHandler\n : SignalHandler;\n\ntype UseSignalOptions = {\n after?: boolean;\n immediate?: boolean;\n};\n\n/**\n * Connects a handler to a GObject signal for the lifetime of the component, reconnecting when the object changes.\n *\n * Each emission runs the handler from the latest render, so it does not have to be stable and a\n * changing handler never reconnects the signal.\n *\n * On React 19.2 this does not hold inside a component wrapped in `memo` or `forwardRef`, where every emission\n * runs the handler captured on the first render. Keep the calling component unwrapped, or read the values the\n * handler needs off the GObject itself. React fixes this on the 19.3 line.\n *\n * @param object The GObject (or ref to one) to connect to.\n * @param signal The signal name, optionally with a detail suffix.\n * @param handler The callback invoked when the signal is emitted.\n * @param options Connection options such as running after the default handler or invoking immediately.\n */\nfunction useSignal<T extends GObject.Object, S extends SignalName<T> & string>(\n object: RefProp<T>,\n signal: S,\n handler: TypedSignalHandler<T, S>,\n { after = false, immediate = false }: UseSignalOptions = {},\n): void {\n const emit = useEffectEvent(handler as SignalHandler);\n\n useLayoutEffect(() => {\n const resolved = resolveRefProp(object);\n\n if (!resolved) {\n return;\n }\n\n resolved.on(signal, emit, after);\n\n if (immediate) {\n emit();\n }\n\n return () => {\n resolved.off(signal, emit);\n };\n }, [object, signal, after, immediate]);\n}\n\nexport { useSignal, type SignalName, type TypedSignalHandler };\n"]}
1
+ {"version":3,"file":"use-signal.js","sourceRoot":"","sources":["../../src/hooks/use-signal.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,EAAgB,cAAc,EAAE,MAAM,sBAAsB,CAAC;AA0BpE;;;;;;;;;;;;GAYG;AACH,SAAS,SAAS,CACd,MAAkB,EAClB,MAAS,EACT,OAAiC,EACjC,EAAE,OAAO,GAAG,KAAK,EAAE,WAAW,GAAG,KAAK,KAAuB,EAAE;IAE/D,MAAM,IAAI,GAAG,cAAc,CAAC,OAAwB,CAAC,CAAC;IAEtD,eAAe,CAAC,GAAG,EAAE;QACjB,MAAM,QAAQ,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;QAExC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,OAAO;QACX,CAAC;QAED,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAEnC,IAAI,WAAW,EAAE,CAAC;YACd,IAAI,EAAE,CAAC;QACX,CAAC;QAED,OAAO,GAAG,EAAE;YACR,QAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC/B,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC;AAC/C,CAAC;AAED,OAAO,EAAE,SAAS,EAA4C,CAAC","sourcesContent":["import type * as GObject from \"@gtkx/gi/gobject\";\nimport type { SignalHandler } from \"@gtkx/runtime\";\nimport { useEffectEvent, useLayoutEffect } from \"react\";\nimport { type RefProp, resolveRefProp } from \"../utils/ref-prop.js\";\n\ntype Signals<T extends GObject.Object> = NonNullable<T[\"__signals__\"]>;\n/** Every signal name `T` declares, on its own or narrowed by a `::detail` suffix. */\ntype SignalName<T extends GObject.Object> = keyof Signals<T> | `${keyof Signals<T> & string}::${string}`;\n\n/**\n * The handler signature `T` declares for signal `S`, looked up through any `::detail` suffix and\n * falling back to an untyped `SignalHandler` when the object declares no such signal.\n */\ntype TypedSignalHandler<T extends GObject.Object, S extends string> = S extends keyof Signals<T>\n ? Signals<T>[S]\n : S extends `${infer TBase}::${string}`\n ? TBase extends keyof Signals<T>\n ? Signals<T>[TBase]\n : SignalHandler\n : SignalHandler;\n\n/** Options for {@link useSignal}. */\ntype UseSignalOptions = {\n /** Runs the handler after the object's own default handler rather than before it. */\n isAfter?: boolean;\n /** Invokes the handler once, with no arguments, as soon as the signal is connected. */\n isImmediate?: boolean;\n};\n\n/**\n * Connects a handler to a GObject signal for the lifetime of the component, reconnecting when the object changes.\n *\n * Each emission runs the handler from the latest render, so it does not have to be stable and a\n * changing handler never reconnects the signal.\n *\n * On React 19.2 this does not hold inside a component wrapped in `memo` or `forwardRef`, where every emission\n * runs the handler captured on the first render. Keep the calling component unwrapped, or read the values the\n * handler needs off the GObject itself. React fixes this on the 19.3 line.\n *\n * @param signal The signal name, optionally with a `::detail` suffix.\n * @param options `isAfter` runs the handler after the default handler; `isImmediate` also invokes it on connect.\n */\nfunction useSignal<T extends GObject.Object, S extends SignalName<T> & string>(\n object: RefProp<T>,\n signal: S,\n handler: TypedSignalHandler<T, S>,\n { isAfter = false, isImmediate = false }: UseSignalOptions = {},\n): void {\n const emit = useEffectEvent(handler as SignalHandler);\n\n useLayoutEffect(() => {\n const resolved = resolveRefProp(object);\n\n if (!resolved) {\n return;\n }\n\n resolved.on(signal, emit, isAfter);\n\n if (isImmediate) {\n emit();\n }\n\n return () => {\n resolved.off(signal, emit);\n };\n }, [object, signal, isAfter, isImmediate]);\n}\n\nexport { useSignal, type SignalName, type TypedSignalHandler };\n"]}
package/dist/index.d.ts CHANGED
@@ -1,14 +1,22 @@
1
1
  import "./bootstrap.js";
2
+ /** @public */
2
3
  export { useApplication } from "./hooks/use-application.js";
4
+ /** @public */
3
5
  export { useBindSetting } from "./hooks/use-bind-setting.js";
6
+ /** @public */
4
7
  export { useParentWindow } from "./hooks/use-parent-window.js";
8
+ /** @public */
5
9
  export { useProperty } from "./hooks/use-property.js";
10
+ /** @public */
6
11
  export { useSetting } from "./hooks/use-setting.js";
12
+ /** @public */
7
13
  export { useSignal } from "./hooks/use-signal.js";
8
- export type { MenuItem, VflConstraints } from "./prop-types.js";
14
+ /** @public */
9
15
  export { type RootElement, rootElement } from "./reconciler/root-element.js";
16
+ /** @public */
10
17
  export { createPortal, createRoot, quit, type Root } from "./reconciler/root.js";
18
+ /** @public */
11
19
  export type { AccessibleProps } from "./utils/accessible-props.js";
20
+ /** @public */
12
21
  export type { RefProp } from "./utils/ref-prop.js";
13
- export type { SettingsSchema, SettingsSchemaKeys, SettingValue } from "./utils/settings.js";
14
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,YAAY,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,KAAK,WAAW,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,IAAI,EAAE,MAAM,sBAAsB,CAAC;AACjF,YAAY,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,YAAY,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAExB,cAAc;AACd,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,cAAc;AACd,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,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