@gtkx/react 1.0.0-rc.3 → 1.0.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.
Files changed (203) hide show
  1. package/README.md +8 -9
  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 +4 -4
  7. package/dist/adw/dialog.d.ts.map +1 -1
  8. package/dist/adw/dialog.js +16 -21
  9. package/dist/adw/dialog.js.map +1 -1
  10. package/dist/adw/element-behaviors.js +104 -57
  11. package/dist/adw/element-behaviors.js.map +1 -1
  12. package/dist/adw/element-config.d.ts +0 -5
  13. package/dist/adw/element-config.d.ts.map +1 -1
  14. package/dist/adw/element-config.js +25 -26
  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 +35 -4
  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-window.d.ts +5 -0
  26. package/dist/components/application-window.d.ts.map +1 -0
  27. package/dist/components/application-window.js +7 -0
  28. package/dist/components/application-window.js.map +1 -0
  29. package/dist/components/application.d.ts +3 -8
  30. package/dist/components/application.d.ts.map +1 -1
  31. package/dist/components/application.js +22 -6
  32. package/dist/components/application.js.map +1 -1
  33. package/dist/components/element.d.ts +13 -2
  34. package/dist/components/element.d.ts.map +1 -1
  35. package/dist/components/element.js +39 -15
  36. package/dist/components/element.js.map +1 -1
  37. package/dist/components/portaled.d.ts +5 -0
  38. package/dist/components/portaled.d.ts.map +1 -0
  39. package/dist/components/portaled.js +8 -0
  40. package/dist/components/portaled.js.map +1 -0
  41. package/dist/components/window.d.ts +6 -5
  42. package/dist/components/window.d.ts.map +1 -1
  43. package/dist/components/window.js +17 -16
  44. package/dist/components/window.js.map +1 -1
  45. package/dist/config.d.ts +7 -2
  46. package/dist/config.d.ts.map +1 -1
  47. package/dist/config.js +5 -1
  48. package/dist/config.js.map +1 -1
  49. package/dist/element-behaviors.js +11 -2
  50. package/dist/element-behaviors.js.map +1 -1
  51. package/dist/element-config.d.ts +4 -3
  52. package/dist/element-config.d.ts.map +1 -1
  53. package/dist/element-config.js +19 -15
  54. package/dist/element-config.js.map +1 -1
  55. package/dist/hooks/use-bind-setting.d.ts +8 -7
  56. package/dist/hooks/use-bind-setting.d.ts.map +1 -1
  57. package/dist/hooks/use-bind-setting.js +2 -7
  58. package/dist/hooks/use-bind-setting.js.map +1 -1
  59. package/dist/hooks/use-merged-refs.d.ts +1 -4
  60. package/dist/hooks/use-merged-refs.d.ts.map +1 -1
  61. package/dist/hooks/use-merged-refs.js +1 -1
  62. package/dist/hooks/use-merged-refs.js.map +1 -1
  63. package/dist/hooks/use-parent-window.d.ts +3 -1
  64. package/dist/hooks/use-parent-window.d.ts.map +1 -1
  65. package/dist/hooks/use-parent-window.js +3 -1
  66. package/dist/hooks/use-parent-window.js.map +1 -1
  67. package/dist/hooks/use-presented-instance.d.ts +12 -0
  68. package/dist/hooks/use-presented-instance.d.ts.map +1 -0
  69. package/dist/hooks/use-presented-instance.js +27 -0
  70. package/dist/hooks/use-presented-instance.js.map +1 -0
  71. package/dist/hooks/use-property.d.ts +4 -3
  72. package/dist/hooks/use-property.d.ts.map +1 -1
  73. package/dist/hooks/use-property.js +1 -2
  74. package/dist/hooks/use-property.js.map +1 -1
  75. package/dist/hooks/use-setting.d.ts +2 -3
  76. package/dist/hooks/use-setting.d.ts.map +1 -1
  77. package/dist/hooks/use-setting.js +2 -3
  78. package/dist/hooks/use-setting.js.map +1 -1
  79. package/dist/hooks/use-signal.d.ts +15 -8
  80. package/dist/hooks/use-signal.d.ts.map +1 -1
  81. package/dist/hooks/use-signal.js +6 -8
  82. package/dist/hooks/use-signal.js.map +1 -1
  83. package/dist/index.d.ts +10 -2
  84. package/dist/index.d.ts.map +1 -1
  85. package/dist/index.js +8 -0
  86. package/dist/index.js.map +1 -1
  87. package/dist/internal.d.ts +8 -5
  88. package/dist/internal.d.ts.map +1 -1
  89. package/dist/internal.js +7 -5
  90. package/dist/internal.js.map +1 -1
  91. package/dist/prop-types.d.ts +88 -4
  92. package/dist/prop-types.d.ts.map +1 -1
  93. package/dist/prop-types.js.map +1 -1
  94. package/dist/reconciler/apply-props.d.ts +4 -4
  95. package/dist/reconciler/apply-props.d.ts.map +1 -1
  96. package/dist/reconciler/apply-props.js +62 -20
  97. package/dist/reconciler/apply-props.js.map +1 -1
  98. package/dist/reconciler/behaviors.d.ts +9 -20
  99. package/dist/reconciler/behaviors.d.ts.map +1 -1
  100. package/dist/reconciler/behaviors.js +44 -41
  101. package/dist/reconciler/behaviors.js.map +1 -1
  102. package/dist/reconciler/devtools.d.ts +6 -0
  103. package/dist/reconciler/devtools.d.ts.map +1 -0
  104. package/dist/reconciler/devtools.js +11 -0
  105. package/dist/reconciler/devtools.js.map +1 -0
  106. package/dist/reconciler/host-config.d.ts +1 -1
  107. package/dist/reconciler/host-config.d.ts.map +1 -1
  108. package/dist/reconciler/host-config.js +17 -26
  109. package/dist/reconciler/host-config.js.map +1 -1
  110. package/dist/reconciler/instance.d.ts.map +1 -1
  111. package/dist/reconciler/instance.js +6 -4
  112. package/dist/reconciler/instance.js.map +1 -1
  113. package/dist/reconciler/metadata.d.ts +2 -2
  114. package/dist/reconciler/metadata.d.ts.map +1 -1
  115. package/dist/reconciler/metadata.js +9 -11
  116. package/dist/reconciler/metadata.js.map +1 -1
  117. package/dist/reconciler/node.d.ts +4 -3
  118. package/dist/reconciler/node.d.ts.map +1 -1
  119. package/dist/reconciler/node.js +8 -7
  120. package/dist/reconciler/node.js.map +1 -1
  121. package/dist/reconciler/placement.js +20 -20
  122. package/dist/reconciler/placement.js.map +1 -1
  123. package/dist/reconciler/registry.d.ts +46 -32
  124. package/dist/reconciler/registry.d.ts.map +1 -1
  125. package/dist/reconciler/registry.js +10 -19
  126. package/dist/reconciler/registry.js.map +1 -1
  127. package/dist/reconciler/root-element.d.ts +1 -1
  128. package/dist/reconciler/root-element.d.ts.map +1 -1
  129. package/dist/reconciler/root-element.js +0 -1
  130. package/dist/reconciler/root-element.js.map +1 -1
  131. package/dist/reconciler/root.d.ts +9 -20
  132. package/dist/reconciler/root.d.ts.map +1 -1
  133. package/dist/reconciler/root.js +6 -19
  134. package/dist/reconciler/root.js.map +1 -1
  135. package/dist/reconciler/signals.d.ts +1 -2
  136. package/dist/reconciler/signals.d.ts.map +1 -1
  137. package/dist/reconciler/signals.js +3 -3
  138. package/dist/reconciler/signals.js.map +1 -1
  139. package/dist/reconciler/text.js +5 -5
  140. package/dist/reconciler/text.js.map +1 -1
  141. package/dist/utils/accessible-props.d.ts +57 -9
  142. package/dist/utils/accessible-props.d.ts.map +1 -1
  143. package/dist/utils/accessible-props.js +11 -13
  144. package/dist/utils/accessible-props.js.map +1 -1
  145. package/dist/utils/ref-prop.d.ts +0 -6
  146. package/dist/utils/ref-prop.d.ts.map +1 -1
  147. package/dist/utils/ref-prop.js +0 -6
  148. package/dist/utils/ref-prop.js.map +1 -1
  149. package/dist/utils/settings.d.ts +7 -0
  150. package/dist/utils/settings.d.ts.map +1 -1
  151. package/dist/utils/settings.js.map +1 -1
  152. package/dist/utils/variant.d.ts +33 -1
  153. package/dist/utils/variant.d.ts.map +1 -1
  154. package/dist/utils/variant.js.map +1 -1
  155. package/env.d.ts +11 -4
  156. package/package.json +5 -5
  157. package/src/adw/config.ts +1 -0
  158. package/src/adw/dialog.tsx +23 -25
  159. package/src/adw/element-behaviors.ts +131 -60
  160. package/src/adw/element-config.ts +25 -26
  161. package/src/adw/index.ts +1 -0
  162. package/src/adw/prop-types.ts +36 -3
  163. package/src/bootstrap.ts +1 -1
  164. package/src/components/application-window.tsx +10 -0
  165. package/src/components/application.tsx +32 -5
  166. package/src/components/element.tsx +52 -17
  167. package/src/components/portaled.tsx +14 -0
  168. package/src/components/window.tsx +25 -23
  169. package/src/config.ts +13 -8
  170. package/src/element-behaviors.ts +20 -1
  171. package/src/element-config.ts +19 -15
  172. package/src/hooks/use-bind-setting.ts +8 -7
  173. package/src/hooks/use-merged-refs.ts +1 -1
  174. package/src/hooks/use-parent-window.ts +3 -1
  175. package/src/hooks/use-presented-instance.tsx +50 -0
  176. package/src/hooks/use-property.ts +4 -3
  177. package/src/hooks/use-setting.ts +2 -3
  178. package/src/hooks/use-signal.ts +18 -11
  179. package/src/index.ts +10 -2
  180. package/src/internal.ts +8 -5
  181. package/src/prop-types.ts +119 -11
  182. package/src/reconciler/apply-props.ts +77 -24
  183. package/src/reconciler/behaviors.ts +77 -50
  184. package/src/reconciler/devtools.ts +18 -0
  185. package/src/reconciler/host-config.ts +20 -32
  186. package/src/reconciler/instance.ts +7 -4
  187. package/src/reconciler/metadata.ts +11 -14
  188. package/src/reconciler/node.ts +12 -9
  189. package/src/reconciler/placement.ts +25 -25
  190. package/src/reconciler/registry.ts +56 -39
  191. package/src/reconciler/root-element.ts +4 -2
  192. package/src/reconciler/root.ts +12 -20
  193. package/src/reconciler/signals.ts +2 -3
  194. package/src/reconciler/text.ts +6 -6
  195. package/src/utils/accessible-props.ts +70 -25
  196. package/src/utils/ref-prop.ts +0 -6
  197. package/src/utils/settings.ts +7 -0
  198. package/src/utils/variant.ts +33 -1
  199. package/dist/utils/accessible-metadata.d.ts +0 -12
  200. package/dist/utils/accessible-metadata.d.ts.map +0 -1
  201. package/dist/utils/accessible-metadata.js +0 -25
  202. package/dist/utils/accessible-metadata.js.map +0 -1
  203. package/src/utils/accessible-metadata.ts +0 -31
@@ -1 +1 @@
1
- {"version":3,"file":"use-setting.d.ts","sourceRoot":"","sources":["../../src/hooks/use-setting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GA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AS,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"]}
@@ -1,12 +1,21 @@
1
1
  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
+ /** The signal map `T` declares, from signal name to handler signature. */
4
5
  type Signals<T extends GObject.Object> = NonNullable<T["__signals__"]>;
6
+ /** Every signal name `T` declares, on its own or narrowed by a `::detail` suffix. */
5
7
  type SignalName<T extends GObject.Object> = keyof Signals<T> | `${keyof Signals<T> & string}::${string}`;
8
+ /**
9
+ * The handler signature `T` declares for signal `S`, looked up through any `::detail` suffix and
10
+ * falling back to an untyped `SignalHandler` when the object declares no such signal.
11
+ */
6
12
  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;
13
+ /** Options for {@link useSignal}. */
7
14
  type UseSignalOptions = {
8
- after?: boolean;
9
- immediate?: boolean;
15
+ /** Runs the handler after the object's own default handler rather than before it. */
16
+ isAfter?: boolean;
17
+ /** Invokes the handler once, with no arguments, as soon as the signal is connected. */
18
+ isImmediate?: boolean;
10
19
  };
11
20
  /**
12
21
  * Connects a handler to a GObject signal for the lifetime of the component, reconnecting when the object changes.
@@ -18,11 +27,9 @@ type UseSignalOptions = {
18
27
  * runs the handler captured on the first render. Keep the calling component unwrapped, or read the values the
19
28
  * handler needs off the GObject itself. React fixes this on the 19.3 line.
20
29
  *
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.
30
+ * @param signal The signal name, optionally with a `::detail` suffix.
31
+ * @param options `isAfter` runs the handler after the default handler; `isImmediate` also invokes it on connect.
25
32
  */
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;
27
- export { useSignal, type SignalName, type TypedSignalHandler };
33
+ 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;
34
+ export { useSignal };
28
35
  //# 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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AE,WAAmB,EAAE,GAAE,gBAAqB,GAChE,IAAI,CAoBN;AAED,OAAO,EAAE,SAAS,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;AA2BpE;;;;;;;;;;;;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,EAAE,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\n/** The signal map `T` declares, from signal name to handler signature. */\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 };\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,eA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AAC;AACjF,cAAc;AACd,YAAY,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,cAAc;AACd,YAAY,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC"}
package/dist/index.js CHANGED
@@ -1,10 +1,18 @@
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";
14
+ /** @public */
8
15
  export { rootElement } from "./reconciler/root-element.js";
16
+ /** @public */
9
17
  export { createPortal, createRoot, quit } from "./reconciler/root.js";
10
18
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","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;AAElD,OAAO,EAAoB,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,IAAI,EAAa,MAAM,sBAAsB,CAAC","sourcesContent":["import \"./bootstrap.js\";\n\nexport { useApplication } from \"./hooks/use-application.js\";\nexport { useBindSetting } from \"./hooks/use-bind-setting.js\";\nexport { useParentWindow } from \"./hooks/use-parent-window.js\";\nexport { useProperty } from \"./hooks/use-property.js\";\nexport { useSetting } from \"./hooks/use-setting.js\";\nexport { useSignal } from \"./hooks/use-signal.js\";\nexport type { MenuItem, VflConstraints } from \"./prop-types.js\";\nexport { type RootElement, rootElement } from \"./reconciler/root-element.js\";\nexport { createPortal, createRoot, quit, type Root } from \"./reconciler/root.js\";\nexport type { AccessibleProps } from \"./utils/accessible-props.js\";\nexport type { RefProp } from \"./utils/ref-prop.js\";\nexport type { SettingsSchema, SettingsSchemaKeys, SettingValue } from \"./utils/settings.js\";\n"]}
1
+ {"version":3,"file":"index.js","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,CAAC;AAC7D,cAAc;AACd,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,cAAc;AACd,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,cAAc;AACd,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,cAAc;AACd,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,cAAc;AACd,OAAO,EAAoB,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC7E,cAAc;AACd,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,IAAI,EAAa,MAAM,sBAAsB,CAAC","sourcesContent":["import \"./bootstrap.js\";\n\n/** @public */\nexport { useApplication } from \"./hooks/use-application.js\";\n/** @public */\nexport { useBindSetting } from \"./hooks/use-bind-setting.js\";\n/** @public */\nexport { useParentWindow } from \"./hooks/use-parent-window.js\";\n/** @public */\nexport { useProperty } from \"./hooks/use-property.js\";\n/** @public */\nexport { useSetting } from \"./hooks/use-setting.js\";\n/** @public */\nexport { useSignal } from \"./hooks/use-signal.js\";\n/** @public */\nexport { type RootElement, rootElement } from \"./reconciler/root-element.js\";\n/** @public */\nexport { createPortal, createRoot, quit, type Root } from \"./reconciler/root.js\";\n/** @public */\nexport type { AccessibleProps } from \"./utils/accessible-props.js\";\n/** @public */\nexport type { RefProp } from \"./utils/ref-prop.js\";\n"]}
@@ -1,14 +1,17 @@
1
1
  import "./bootstrap.js";
2
+ /** @internal */
3
+ export { createApplicationWindowComponent } from "./components/application-window.js";
4
+ /** @internal */
2
5
  export { createApplicationComponent } from "./components/application.js";
3
6
  export { createElementComponent } from "./components/element.js";
7
+ /** @internal */
8
+ export { createPortaledComponent } from "./components/portaled.js";
9
+ /** @internal */
4
10
  export { createWindowComponent } from "./components/window.js";
5
- export { ApplicationContext } from "./hooks/use-application.js";
6
11
  export { useMergedRef } from "./hooks/use-merged-refs.js";
7
- export { useObjectValue } from "./hooks/use-object-value.js";
8
12
  export type * from "./prop-types.js";
13
+ export { settleAccessible } from "./reconciler/apply-props.js";
9
14
  export { isRootElement } from "./reconciler/root-element.js";
10
15
  export { createReconcilerRoot, type ReconcilerRoot, setReconcilerErrorHandler } from "./reconciler/root.js";
11
- export { applyWrite } from "./reconciler/signals.js";
12
- export { getAccessibleMetadata } from "./utils/accessible-metadata.js";
13
- export { type RefProp, resolveRefProp } from "./utils/ref-prop.js";
16
+ export type { SettingsSchema, SettingsSchemaKeys, SettingValue } from "./utils/settings.js";
14
17
  //# sourceMappingURL=internal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAExB,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,M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}
package/dist/internal.js CHANGED
@@ -1,13 +1,15 @@
1
1
  import "./bootstrap.js";
2
+ /** @internal */
3
+ export { createApplicationWindowComponent } from "./components/application-window.js";
4
+ /** @internal */
2
5
  export { createApplicationComponent } from "./components/application.js";
3
6
  export { createElementComponent } from "./components/element.js";
7
+ /** @internal */
8
+ export { createPortaledComponent } from "./components/portaled.js";
9
+ /** @internal */
4
10
  export { createWindowComponent } from "./components/window.js";
5
- export { ApplicationContext } from "./hooks/use-application.js";
6
11
  export { useMergedRef } from "./hooks/use-merged-refs.js";
7
- export { useObjectValue } from "./hooks/use-object-value.js";
12
+ export { settleAccessible } from "./reconciler/apply-props.js";
8
13
  export { isRootElement } from "./reconciler/root-element.js";
9
14
  export { createReconcilerRoot, setReconcilerErrorHandler } from "./reconciler/root.js";
10
- export { applyWrite } from "./reconciler/signals.js";
11
- export { getAccessibleMetadata } from "./utils/accessible-metadata.js";
12
- export { resolveRefProp } from "./utils/ref-prop.js";
13
15
  //# sourceMappingURL=internal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAExB,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAuB,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAC5G,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAgB,cAAc,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["import \"./bootstrap.js\";\n\nexport { createApplicationComponent } from \"./components/application.js\";\nexport { createElementComponent } from \"./components/element.js\";\nexport { createWindowComponent } from \"./components/window.js\";\nexport { ApplicationContext } from \"./hooks/use-application.js\";\nexport { useMergedRef } from \"./hooks/use-merged-refs.js\";\nexport { useObjectValue } from \"./hooks/use-object-value.js\";\nexport type * from \"./prop-types.js\";\nexport { isRootElement } from \"./reconciler/root-element.js\";\nexport { createReconcilerRoot, type ReconcilerRoot, setReconcilerErrorHandler } from \"./reconciler/root.js\";\nexport { applyWrite } from \"./reconciler/signals.js\";\nexport { getAccessibleMetadata } from \"./utils/accessible-metadata.js\";\nexport { type RefProp, resolveRefProp } from \"./utils/ref-prop.js\";\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AAExB,gBAAgB;AAChB,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,gBAAgB;AAChB,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,gBAAgB;AAChB,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,gBAAgB;AAChB,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAuB,yBAAyB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["import \"./bootstrap.js\";\n\n/** @internal */\nexport { createApplicationWindowComponent } from \"./components/application-window.js\";\n/** @internal */\nexport { createApplicationComponent } from \"./components/application.js\";\nexport { createElementComponent } from \"./components/element.js\";\n/** @internal */\nexport { createPortaledComponent } from \"./components/portaled.js\";\n/** @internal */\nexport { createWindowComponent } from \"./components/window.js\";\nexport { useMergedRef } from \"./hooks/use-merged-refs.js\";\nexport type * from \"./prop-types.js\";\nexport { settleAccessible } from \"./reconciler/apply-props.js\";\nexport { isRootElement } from \"./reconciler/root-element.js\";\nexport { createReconcilerRoot, type ReconcilerRoot, setReconcilerErrorHandler } from \"./reconciler/root.js\";\nexport type { SettingsSchema, SettingsSchemaKeys, SettingValue } from \"./utils/settings.js\";\n"]}
@@ -1,110 +1,194 @@
1
1
  import type * as Gdk from "@gtkx/gi/gdk";
2
+ import type * as GLib from "@gtkx/gi/glib";
2
3
  import type * as GObject from "@gtkx/gi/gobject";
3
4
  import type * as Gtk from "@gtkx/gi/gtk";
4
5
  import type { ReactNode } from "react";
5
6
  /** One entry of a `GMenu`'s `items` prop; `submenu` and `section` nest further menus. */
6
7
  type MenuItem = {
8
+ /** Text shown for the entry, or the heading of the submenu or section it introduces. */
7
9
  label?: string | null;
10
+ /** Detailed action name the entry activates, ignored when `submenu` or `section` is given. */
8
11
  action?: string | null;
12
+ /** Entries of a separate menu the labelled entry opens. */
9
13
  submenu?: MenuItem[];
14
+ /** Entries appended below the label as an inline section, used only when `submenu` is absent. */
10
15
  section?: MenuItem[];
11
16
  };
12
17
  /** One Visual Format Language block applied to a `Gtk.ConstraintLayout`. */
13
18
  type VflConstraints = {
19
+ /** Format lines, each describing every constraint on one row or column. */
14
20
  lines: string[];
21
+ /** Default horizontal spacing the `-` operator stands for; defaults to 0. */
15
22
  hspacing?: number;
23
+ /** Default vertical spacing the `-` operator stands for; defaults to 0. */
16
24
  vspacing?: number;
25
+ /** Targets the view names in `lines` refer to; defaults to none. */
17
26
  views?: Map<string, Gtk.ConstraintTarget>;
18
27
  };
19
28
  /** One mark on a `Gtk.Scale`. */
20
29
  type ScaleMark = {
30
+ /** Point on the scale the mark is drawn at; defaults to 0. */
21
31
  value?: number;
32
+ /** Side of the scale the mark and its label sit on. */
22
33
  position: Gtk.PositionType;
34
+ /** Pango markup drawn beside the mark, or `null` for an unlabelled one. */
23
35
  markup?: string | null;
24
36
  };
25
37
  /** One labelled offset on a `Gtk.LevelBar`. */
26
38
  type LevelBarOffset = {
39
+ /** Style class applied to the bar's blocks while the value falls in this offset's interval. */
27
40
  name: string;
41
+ /** Upper bound of that interval; defaults to 0. */
28
42
  value?: number;
29
43
  };
30
44
  /** One credit section on a `Gtk.AboutDialog`. */
31
45
  type CreditSection = {
46
+ /** Heading the names are listed under. */
32
47
  sectionName: string;
48
+ /** Names listed in the section. */
33
49
  people: string[];
34
50
  };
51
+ /** One command-line option a `Gtk.Application` accepts. */
52
+ type MainOption = {
53
+ /** Name the option is spelled with after two dashes, such as `verbose` for `--verbose`. */
54
+ longName: string;
55
+ /** Single character the option is spelled with after one dash, such as `v` for `-v`; defaults to none. */
56
+ shortName?: string | null;
57
+ /** How the option itself is parsed and listed; defaults to `GLib.OptionFlags.NONE`. */
58
+ flags?: GLib.OptionFlags;
59
+ /** Type of argument the option takes; defaults to `GLib.OptionArg.NONE`, meaning it takes none. */
60
+ arg?: GLib.OptionArg;
61
+ /** Text describing the option in `--help`. */
62
+ description: string;
63
+ /** Placeholder standing for the option's argument in `--help`; defaults to none. */
64
+ argDescription?: string | null;
65
+ };
35
66
  /** One accelerator binding on a `Gtk.Application`. */
36
67
  type ActionAccel = {
68
+ /** Action the accelerators activate, such as `app.quit` or `win.open('file')`. */
37
69
  detailedActionName: string;
70
+ /** Accelerators in `Gtk.acceleratorParse` syntax, cleared when the entry goes away. */
38
71
  accels: string[];
39
72
  };
40
73
  /** The drag icon of a `Gtk.DragSource`, with its hotspot. */
41
74
  type DragSourceIcon = {
75
+ /** Image shown under the pointer during the drag; defaults to none. */
42
76
  paintable?: Gdk.Paintable | null;
77
+ /** Horizontal offset of the pointer within the image; defaults to 0. */
43
78
  hotX?: number;
79
+ /** Vertical offset of the pointer within the image; defaults to 0. */
44
80
  hotY?: number;
45
81
  };
46
82
  /** Props of an element that accepts children. */
47
83
  type ChildrenProps = {
84
+ /** Elements attached to the element's default child slot, or its text for elements that hold text. */
48
85
  children?: ReactNode;
49
86
  };
87
+ /** Objects a widget takes through a method call rather than a property. */
50
88
  type GtkWidgetProps = {
89
+ /** `Gtk.EventController` elements added to the widget. */
51
90
  controllers?: ReactNode | null | undefined;
91
+ /** `Gio.ActionGroup` elements inserted into the widget, each under its own `prefix`. */
52
92
  actionGroups?: ReactNode | null | undefined;
53
93
  } & ChildrenProps;
54
- type GActionGroupProps = {
94
+ /** Props of an action group placed in a widget's `actionGroups` slot. */
95
+ type ActionGroupProps = {
96
+ /** Prefix the group's actions are addressed by, such as `win`; defaults to the empty string. */
55
97
  prefix?: string | null | undefined;
56
98
  };
57
- type GActionMapProps = {
99
+ /** Props of an element implementing `Gio.ActionMap`. */
100
+ type ActionMapProps = {
101
+ /** `Gio.Action` elements added to the map, removed again by their `name`. */
58
102
  actions?: ReactNode | null | undefined;
59
103
  };
60
- type GMenuProps = {
104
+ /** Props of a `Gio.Menu` element. */
105
+ type MenuProps = {
106
+ /** Entries the menu is rebuilt from whenever they change. */
61
107
  items?: MenuItem[] | null | undefined;
62
108
  };
109
+ /** Props of a `Gtk.ShortcutController` element. */
63
110
  type GtkShortcutControllerProps = {
111
+ /** `Gtk.Shortcut` elements the controller watches for. */
64
112
  shortcuts?: ReactNode | null | undefined;
65
113
  };
114
+ /** Props of a `Gtk.Overlay` element, whose `children` is the widget the overlays sit above. */
66
115
  type GtkOverlayProps = {
116
+ /** Widgets stacked over the main child. */
67
117
  overlays?: ReactNode | null | undefined;
68
118
  } & ChildrenProps;
119
+ /** Props of a `Gtk.ConstraintLayout` element. */
69
120
  type GtkConstraintLayoutProps = {
121
+ /** `Gtk.Constraint` elements added to the layout. */
70
122
  constraints?: ReactNode | null | undefined;
123
+ /** `Gtk.ConstraintGuide` elements added to the layout as invisible spacers. */
71
124
  guides?: ReactNode | null | undefined;
125
+ /** Visual Format Language blocks whose constraints are added alongside `constraints`. */
72
126
  vfl?: VflConstraints[] | null | undefined;
73
127
  };
74
128
  /** Props of `GtkTextChildAnchor`, which embeds either a child widget or a paintable in a text buffer. */
75
129
  type GtkTextChildAnchorProps = {
130
+ /** Image inserted into the buffer instead of an anchored widget; giving both is an error. */
76
131
  paintable?: Gdk.Paintable | null | undefined;
77
132
  } & ChildrenProps;
133
+ /** Props of a `Gtk.HeaderBar` or `Gtk.ActionBar` element. */
78
134
  type GtkHeaderBarProps = {
135
+ /** Widgets packed at the start of the bar. */
79
136
  start?: ReactNode | null | undefined;
137
+ /** Widgets packed at the end of the bar. */
80
138
  end?: ReactNode | null | undefined;
81
139
  };
140
+ /** Props of a `Gtk.Scale` element. */
82
141
  type GtkScaleProps = {
142
+ /** Marks drawn along the scale, cleared and re-added whenever the list changes. */
83
143
  marks?: ScaleMark[] | null | undefined;
84
144
  };
145
+ /** Props of a `Gtk.Calendar` element. */
85
146
  type GtkCalendarProps = {
147
+ /** Days of the shown month drawn as marked, cleared and re-marked whenever the list changes. */
86
148
  markedDays?: number[] | null | undefined;
87
149
  };
150
+ /** Props of a `Gtk.LevelBar` element. */
88
151
  type GtkLevelBarProps = {
152
+ /** Offsets that split the bar's range into differently styled intervals. */
89
153
  offsets?: LevelBarOffset[] | null | undefined;
90
154
  };
155
+ /** Props of a `Gtk.SizeGroup` element. */
91
156
  type GtkSizeGroupProps = {
157
+ /** Widgets the group keeps at a common size. */
92
158
  widgets?: Gtk.Widget[] | null | undefined;
93
159
  };
160
+ /** Props of a `Gtk.AboutDialog` element. */
94
161
  type GtkAboutDialogProps = {
162
+ /**
163
+ * Extra sections appended to the dialog's credits. GTK offers no way to remove one, so the list
164
+ * cannot change once it has been applied.
165
+ */
95
166
  creditSections?: CreditSection[] | null | undefined;
96
167
  };
168
+ /** Props of a `Gtk.Application` element, whose `children` are the windows it owns. */
97
169
  type GtkApplicationProps = {
170
+ /** Accelerators bound to the application's actions. */
98
171
  actionAccels?: ActionAccel[] | null | undefined;
172
+ /**
173
+ * Command-line options the application parses, registered before it starts. GLib offers no way to
174
+ * unregister one, so the list cannot change once it has been applied.
175
+ */
176
+ mainOptions?: MainOption[] | null | undefined;
99
177
  } & ChildrenProps;
178
+ /** Props of a `Gtk.DropTarget` element. */
100
179
  type GtkDropTargetProps = {
180
+ /** GTypes the target accepts a drop of. */
101
181
  types?: GObject.Type[] | null | undefined;
102
182
  };
183
+ /** Props of a `Gtk.DrawingArea` element. */
103
184
  type GtkDrawingAreaProps = {
185
+ /** Callback that draws the area's contents; setting it queues a redraw. */
104
186
  drawFunc?: Gtk.DrawingAreaDrawFunc | null | undefined;
105
187
  };
188
+ /** Props of a `Gtk.DragSource` element. */
106
189
  type GtkDragSourceProps = {
190
+ /** Icon shown under the pointer while a drag started from this source is in flight. */
107
191
  icon?: DragSourceIcon | null | undefined;
108
192
  };
109
- export { type MenuItem, type VflConstraints, type ScaleMark, type LevelBarOffset, type CreditSection, type ActionAccel, type DragSourceIcon, type ChildrenProps, type GtkWidgetProps, type GActionGroupProps, type GActionMapProps, type GMenuProps, type GtkShortcutControllerProps, type GtkOverlayProps, type GtkTextChildAnchorProps, type GtkConstraintLayoutProps, type GtkHeaderBarProps, type GtkScaleProps, type GtkCalendarProps, type GtkLevelBarProps, type GtkSizeGroupProps, type GtkAboutDialogProps, type GtkApplicationProps, type GtkDropTargetProps, type GtkDrawingAreaProps, type GtkDragSourceProps, };
193
+ export { type MenuItem, type VflConstraints, type ScaleMark, type LevelBarOffset, type CreditSection, type MainOption, type ActionAccel, type DragSourceIcon, type ChildrenProps, type GtkWidgetProps, type ActionGroupProps, type ActionMapProps, type MenuProps, type GtkShortcutControllerProps, type GtkOverlayProps, type GtkTextChildAnchorProps, type GtkConstraintLayoutProps, type GtkHeaderBarProps, type GtkScaleProps, type GtkCalendarProps, type GtkLevelBarProps, type GtkSizeGroupProps, type GtkAboutDialogProps, type GtkApplicationProps, type GtkDropTargetProps, type GtkDrawingAreaProps, type GtkDragSourceProps, };
110
194
  //# sourceMappingURL=prop-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../src/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,GAAG,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,KAAK,OAAO,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,KAAK,GAAG,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,yFAAyF;AACzF,KAAK,QAAQ,GAAG;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC;CACxB,CAAC;AAEF,4EAA4E;AAC5E,KAAK,cAAc,GAAG;IAClB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CAC7C,CAAC;AAEF,iCAAiC;AACjC,KAAK,SAAS,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,GAAG,CAAC,YAAY,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AACxF,+CAA+C;AAC/C,KAAK,cAAc,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AACvD,iDAAiD;AACjD,KAAK,aAAa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,0BAA0B,EAC/B,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GAC1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"prop-types.js","sourceRoot":"","sources":["../src/prop-types.ts"],"names":[],"mappings":"AAkHA,OAAO,EA2BN,CAAC","sourcesContent":["import type * as Gdk from \"@gtkx/gi/gdk\";\nimport type * as GObject from \"@gtkx/gi/gobject\";\nimport type * as Gtk from \"@gtkx/gi/gtk\";\nimport type { ReactNode } from \"react\";\n\n/** One entry of a `GMenu`'s `items` prop; `submenu` and `section` nest further menus. */\ntype MenuItem = {\n label?: string | null;\n action?: string | null;\n submenu?: MenuItem[];\n section?: MenuItem[];\n};\n\n/** One Visual Format Language block applied to a `Gtk.ConstraintLayout`. */\ntype VflConstraints = {\n lines: string[];\n hspacing?: number;\n vspacing?: number;\n views?: Map<string, Gtk.ConstraintTarget>;\n};\n\n/** One mark on a `Gtk.Scale`. */\ntype ScaleMark = { value?: number; position: Gtk.PositionType; markup?: string | null };\n/** One labelled offset on a `Gtk.LevelBar`. */\ntype LevelBarOffset = { name: string; value?: number };\n/** One credit section on a `Gtk.AboutDialog`. */\ntype CreditSection = { sectionName: string; people: string[] };\n/** One accelerator binding on a `Gtk.Application`. */\ntype ActionAccel = { detailedActionName: string; accels: string[] };\n/** The drag icon of a `Gtk.DragSource`, with its hotspot. */\ntype DragSourceIcon = { paintable?: Gdk.Paintable | null; hotX?: number; hotY?: number };\n\n/** Props of an element that accepts children. */\ntype ChildrenProps = {\n children?: ReactNode;\n};\n\ntype GtkWidgetProps = {\n controllers?: ReactNode | null | undefined;\n actionGroups?: ReactNode | null | undefined;\n} & ChildrenProps;\n\ntype GActionGroupProps = {\n prefix?: string | null | undefined;\n};\n\ntype GActionMapProps = {\n actions?: ReactNode | null | undefined;\n};\n\ntype GMenuProps = {\n items?: MenuItem[] | null | undefined;\n};\n\ntype GtkShortcutControllerProps = {\n shortcuts?: ReactNode | null | undefined;\n};\n\ntype GtkOverlayProps = {\n overlays?: ReactNode | null | undefined;\n} & ChildrenProps;\n\ntype GtkConstraintLayoutProps = {\n constraints?: ReactNode | null | undefined;\n guides?: ReactNode | null | undefined;\n vfl?: VflConstraints[] | null | undefined;\n};\n\n/** Props of `GtkTextChildAnchor`, which embeds either a child widget or a paintable in a text buffer. */\ntype GtkTextChildAnchorProps = {\n paintable?: Gdk.Paintable | null | undefined;\n} & ChildrenProps;\n\ntype GtkHeaderBarProps = {\n start?: ReactNode | null | undefined;\n end?: ReactNode | null | undefined;\n};\n\ntype GtkScaleProps = {\n marks?: ScaleMark[] | null | undefined;\n};\n\ntype GtkCalendarProps = {\n markedDays?: number[] | null | undefined;\n};\n\ntype GtkLevelBarProps = {\n offsets?: LevelBarOffset[] | null | undefined;\n};\n\ntype GtkSizeGroupProps = {\n widgets?: Gtk.Widget[] | null | undefined;\n};\n\ntype GtkAboutDialogProps = {\n creditSections?: CreditSection[] | null | undefined;\n};\n\ntype GtkApplicationProps = {\n actionAccels?: ActionAccel[] | null | undefined;\n} & ChildrenProps;\n\ntype GtkDropTargetProps = {\n types?: GObject.Type[] | null | undefined;\n};\n\ntype GtkDrawingAreaProps = {\n drawFunc?: Gtk.DrawingAreaDrawFunc | null | undefined;\n};\n\ntype GtkDragSourceProps = {\n icon?: DragSourceIcon | null | undefined;\n};\n\nexport {\n type MenuItem,\n type VflConstraints,\n type ScaleMark,\n type LevelBarOffset,\n type CreditSection,\n type ActionAccel,\n type DragSourceIcon,\n type ChildrenProps,\n type GtkWidgetProps,\n type GActionGroupProps,\n type GActionMapProps,\n type GMenuProps,\n type GtkShortcutControllerProps,\n type GtkOverlayProps,\n type GtkTextChildAnchorProps,\n type GtkConstraintLayoutProps,\n type GtkHeaderBarProps,\n type GtkScaleProps,\n type GtkCalendarProps,\n type GtkLevelBarProps,\n type GtkSizeGroupProps,\n type GtkAboutDialogProps,\n type GtkApplicationProps,\n type GtkDropTargetProps,\n type GtkDrawingAreaProps,\n type GtkDragSourceProps,\n};\n"]}
1
+ {"version":3,"file":"prop-types.js","sourceRoot":"","sources":["../src/prop-types.ts"],"names":[],"mappings":"AA6NA,OAAO,EA4BN,CAAC","sourcesContent":["/* eslint-disable gtkx/no-library-prefix */\nimport type * as Gdk from \"@gtkx/gi/gdk\";\nimport type * as GLib from \"@gtkx/gi/glib\";\nimport type * as GObject from \"@gtkx/gi/gobject\";\nimport type * as Gtk from \"@gtkx/gi/gtk\";\nimport type { ReactNode } from \"react\";\n\n/** One entry of a `GMenu`'s `items` prop; `submenu` and `section` nest further menus. */\ntype MenuItem = {\n /** Text shown for the entry, or the heading of the submenu or section it introduces. */\n label?: string | null;\n /** Detailed action name the entry activates, ignored when `submenu` or `section` is given. */\n action?: string | null;\n /** Entries of a separate menu the labelled entry opens. */\n submenu?: MenuItem[];\n /** Entries appended below the label as an inline section, used only when `submenu` is absent. */\n section?: MenuItem[];\n};\n\n/** One Visual Format Language block applied to a `Gtk.ConstraintLayout`. */\ntype VflConstraints = {\n /** Format lines, each describing every constraint on one row or column. */\n lines: string[];\n /** Default horizontal spacing the `-` operator stands for; defaults to 0. */\n hspacing?: number;\n /** Default vertical spacing the `-` operator stands for; defaults to 0. */\n vspacing?: number;\n /** Targets the view names in `lines` refer to; defaults to none. */\n views?: Map<string, Gtk.ConstraintTarget>;\n};\n\n/** One mark on a `Gtk.Scale`. */\ntype ScaleMark = {\n /** Point on the scale the mark is drawn at; defaults to 0. */\n value?: number;\n /** Side of the scale the mark and its label sit on. */\n position: Gtk.PositionType;\n /** Pango markup drawn beside the mark, or `null` for an unlabelled one. */\n markup?: string | null;\n};\n\n/** One labelled offset on a `Gtk.LevelBar`. */\ntype LevelBarOffset = {\n /** Style class applied to the bar's blocks while the value falls in this offset's interval. */\n name: string;\n /** Upper bound of that interval; defaults to 0. */\n value?: number;\n};\n\n/** One credit section on a `Gtk.AboutDialog`. */\ntype CreditSection = {\n /** Heading the names are listed under. */\n sectionName: string;\n /** Names listed in the section. */\n people: string[];\n};\n\n/** One command-line option a `Gtk.Application` accepts. */\ntype MainOption = {\n /** Name the option is spelled with after two dashes, such as `verbose` for `--verbose`. */\n longName: string;\n /** Single character the option is spelled with after one dash, such as `v` for `-v`; defaults to none. */\n shortName?: string | null;\n /** How the option itself is parsed and listed; defaults to `GLib.OptionFlags.NONE`. */\n flags?: GLib.OptionFlags;\n /** Type of argument the option takes; defaults to `GLib.OptionArg.NONE`, meaning it takes none. */\n arg?: GLib.OptionArg;\n /** Text describing the option in `--help`. */\n description: string;\n /** Placeholder standing for the option's argument in `--help`; defaults to none. */\n argDescription?: string | null;\n};\n\n/** One accelerator binding on a `Gtk.Application`. */\ntype ActionAccel = {\n /** Action the accelerators activate, such as `app.quit` or `win.open('file')`. */\n detailedActionName: string;\n /** Accelerators in `Gtk.acceleratorParse` syntax, cleared when the entry goes away. */\n accels: string[];\n};\n\n/** The drag icon of a `Gtk.DragSource`, with its hotspot. */\ntype DragSourceIcon = {\n /** Image shown under the pointer during the drag; defaults to none. */\n paintable?: Gdk.Paintable | null;\n /** Horizontal offset of the pointer within the image; defaults to 0. */\n hotX?: number;\n /** Vertical offset of the pointer within the image; defaults to 0. */\n hotY?: number;\n};\n\n/** Props of an element that accepts children. */\ntype ChildrenProps = {\n /** Elements attached to the element's default child slot, or its text for elements that hold text. */\n children?: ReactNode;\n};\n\n/** Objects a widget takes through a method call rather than a property. */\ntype GtkWidgetProps = {\n /** `Gtk.EventController` elements added to the widget. */\n controllers?: ReactNode | null | undefined;\n /** `Gio.ActionGroup` elements inserted into the widget, each under its own `prefix`. */\n actionGroups?: ReactNode | null | undefined;\n} & ChildrenProps;\n\n/** Props of an action group placed in a widget's `actionGroups` slot. */\ntype ActionGroupProps = {\n /** Prefix the group's actions are addressed by, such as `win`; defaults to the empty string. */\n prefix?: string | null | undefined;\n};\n\n/** Props of an element implementing `Gio.ActionMap`. */\ntype ActionMapProps = {\n /** `Gio.Action` elements added to the map, removed again by their `name`. */\n actions?: ReactNode | null | undefined;\n};\n\n/** Props of a `Gio.Menu` element. */\ntype MenuProps = {\n /** Entries the menu is rebuilt from whenever they change. */\n items?: MenuItem[] | null | undefined;\n};\n\n/** Props of a `Gtk.ShortcutController` element. */\ntype GtkShortcutControllerProps = {\n /** `Gtk.Shortcut` elements the controller watches for. */\n shortcuts?: ReactNode | null | undefined;\n};\n\n/** Props of a `Gtk.Overlay` element, whose `children` is the widget the overlays sit above. */\ntype GtkOverlayProps = {\n /** Widgets stacked over the main child. */\n overlays?: ReactNode | null | undefined;\n} & ChildrenProps;\n\n/** Props of a `Gtk.ConstraintLayout` element. */\ntype GtkConstraintLayoutProps = {\n /** `Gtk.Constraint` elements added to the layout. */\n constraints?: ReactNode | null | undefined;\n /** `Gtk.ConstraintGuide` elements added to the layout as invisible spacers. */\n guides?: ReactNode | null | undefined;\n /** Visual Format Language blocks whose constraints are added alongside `constraints`. */\n vfl?: VflConstraints[] | null | undefined;\n};\n\n/** Props of `GtkTextChildAnchor`, which embeds either a child widget or a paintable in a text buffer. */\ntype GtkTextChildAnchorProps = {\n /** Image inserted into the buffer instead of an anchored widget; giving both is an error. */\n paintable?: Gdk.Paintable | null | undefined;\n} & ChildrenProps;\n\n/** Props of a `Gtk.HeaderBar` or `Gtk.ActionBar` element. */\ntype GtkHeaderBarProps = {\n /** Widgets packed at the start of the bar. */\n start?: ReactNode | null | undefined;\n /** Widgets packed at the end of the bar. */\n end?: ReactNode | null | undefined;\n};\n\n/** Props of a `Gtk.Scale` element. */\ntype GtkScaleProps = {\n /** Marks drawn along the scale, cleared and re-added whenever the list changes. */\n marks?: ScaleMark[] | null | undefined;\n};\n\n/** Props of a `Gtk.Calendar` element. */\ntype GtkCalendarProps = {\n /** Days of the shown month drawn as marked, cleared and re-marked whenever the list changes. */\n markedDays?: number[] | null | undefined;\n};\n\n/** Props of a `Gtk.LevelBar` element. */\ntype GtkLevelBarProps = {\n /** Offsets that split the bar's range into differently styled intervals. */\n offsets?: LevelBarOffset[] | null | undefined;\n};\n\n/** Props of a `Gtk.SizeGroup` element. */\ntype GtkSizeGroupProps = {\n /** Widgets the group keeps at a common size. */\n widgets?: Gtk.Widget[] | null | undefined;\n};\n\n/** Props of a `Gtk.AboutDialog` element. */\ntype GtkAboutDialogProps = {\n /**\n * Extra sections appended to the dialog's credits. GTK offers no way to remove one, so the list\n * cannot change once it has been applied.\n */\n creditSections?: CreditSection[] | null | undefined;\n};\n\n/** Props of a `Gtk.Application` element, whose `children` are the windows it owns. */\ntype GtkApplicationProps = {\n /** Accelerators bound to the application's actions. */\n actionAccels?: ActionAccel[] | null | undefined;\n /**\n * Command-line options the application parses, registered before it starts. GLib offers no way to\n * unregister one, so the list cannot change once it has been applied.\n */\n mainOptions?: MainOption[] | null | undefined;\n} & ChildrenProps;\n\n/** Props of a `Gtk.DropTarget` element. */\ntype GtkDropTargetProps = {\n /** GTypes the target accepts a drop of. */\n types?: GObject.Type[] | null | undefined;\n};\n\n/** Props of a `Gtk.DrawingArea` element. */\ntype GtkDrawingAreaProps = {\n /** Callback that draws the area's contents; setting it queues a redraw. */\n drawFunc?: Gtk.DrawingAreaDrawFunc | null | undefined;\n};\n\n/** Props of a `Gtk.DragSource` element. */\ntype GtkDragSourceProps = {\n /** Icon shown under the pointer while a drag started from this source is in flight. */\n icon?: DragSourceIcon | null | undefined;\n};\n\nexport {\n type MenuItem,\n type VflConstraints,\n type ScaleMark,\n type LevelBarOffset,\n type CreditSection,\n type MainOption,\n type ActionAccel,\n type DragSourceIcon,\n type ChildrenProps,\n type GtkWidgetProps,\n type ActionGroupProps,\n type ActionMapProps,\n type MenuProps,\n type GtkShortcutControllerProps,\n type GtkOverlayProps,\n type GtkTextChildAnchorProps,\n type GtkConstraintLayoutProps,\n type GtkHeaderBarProps,\n type GtkScaleProps,\n type GtkCalendarProps,\n type GtkLevelBarProps,\n type GtkSizeGroupProps,\n type GtkAboutDialogProps,\n type GtkApplicationProps,\n type GtkDropTargetProps,\n type GtkDrawingAreaProps,\n type GtkDragSourceProps,\n};\n"]}
@@ -1,11 +1,11 @@
1
1
  import type { Props } from "./registry.js";
2
2
  import { type ElementNode, type SignalTarget } from "./node.js";
3
- declare const assertConstructOnlyUnchanged: (typeName: string, prev: Props, next: Props) => void;
3
+ declare const assertPropsCanChange: (typeName: string, prev: Props, next: Props) => void;
4
4
  declare const markFlush: (node: ElementNode) => void;
5
5
  declare const flushBehaviors: () => void;
6
- declare const mountBehaviors: (node: ElementNode) => void;
7
- declare const unmountBehaviors: (node: ElementNode) => void;
6
+ declare const settleAccessible: () => void;
7
+ declare const flushAccessible: () => void;
8
8
  declare const applyElementProps: (node: ElementNode, prev: Props, next: Props) => void;
9
9
  declare const applyAdoptedProps: (target: SignalTarget, prev: Props, next: Props) => void;
10
- export { markFlush, flushBehaviors, mountBehaviors, unmountBehaviors, applyElementProps, applyAdoptedProps, assertConstructOnlyUnchanged, };
10
+ export { markFlush, flushAccessible, settleAccessible, flushBehaviors, applyElementProps, applyAdoptedProps, assertPropsCanChange, };
11
11
  //# sourceMappingURL=apply-props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"apply-props.d.ts","sourceRoot":"","sources":["../../src/reconciler/apply-props.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAmB,KAAK,EAAE,MAAM,eAAe,CAAC;AAG5D,OAAO,EAAE,KAAK,WAAW,EAAsB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AA+GpF,QAAA,MAAM,4BAA4B,GAAI,UAAU,MAAM,EAAE,MAAM,KAAK,EAAE,MAAM,KAAK,KAAG,IAUlF,CAAC;AAqEF,QAAA,MAAM,SAAS,GAAI,MAAM,WAAW,KAAG,IAItC,CAAC;A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