@gtkx/testing 0.21.0 → 1.0.0-rc.2

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 (216) hide show
  1. package/README.md +137 -34
  2. package/dist/act.d.ts +19 -0
  3. package/dist/act.d.ts.map +1 -0
  4. package/dist/act.js +56 -0
  5. package/dist/act.js.map +1 -0
  6. package/dist/bound-queries.d.ts +33 -0
  7. package/dist/bound-queries.d.ts.map +1 -0
  8. package/dist/bound-queries.js +2 -0
  9. package/dist/bound-queries.js.map +1 -0
  10. package/dist/build-queries.d.ts +16 -0
  11. package/dist/build-queries.d.ts.map +1 -0
  12. package/dist/build-queries.js +115 -0
  13. package/dist/build-queries.js.map +1 -0
  14. package/dist/cleanup-registry.d.ts +5 -0
  15. package/dist/cleanup-registry.d.ts.map +1 -0
  16. package/dist/cleanup-registry.js +21 -0
  17. package/dist/cleanup-registry.js.map +1 -0
  18. package/dist/config.d.ts +20 -52
  19. package/dist/config.d.ts.map +1 -1
  20. package/dist/config.js +17 -46
  21. package/dist/config.js.map +1 -1
  22. package/dist/editable.d.ts +8 -0
  23. package/dist/editable.d.ts.map +1 -0
  24. package/dist/editable.js +26 -0
  25. package/dist/editable.js.map +1 -0
  26. package/dist/errors.d.ts +30 -0
  27. package/dist/errors.d.ts.map +1 -0
  28. package/dist/errors.js +135 -0
  29. package/dist/errors.js.map +1 -0
  30. package/dist/fire-event.d.ts +8 -25
  31. package/dist/fire-event.d.ts.map +1 -1
  32. package/dist/fire-event.js +11 -30
  33. package/dist/fire-event.js.map +1 -1
  34. package/dist/frame-sync.d.ts +4 -0
  35. package/dist/frame-sync.d.ts.map +1 -0
  36. package/dist/frame-sync.js +37 -0
  37. package/dist/frame-sync.js.map +1 -0
  38. package/dist/index.d.ts +17 -12
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +11 -7
  41. package/dist/index.js.map +1 -1
  42. package/dist/matchers.d.ts +59 -0
  43. package/dist/matchers.d.ts.map +1 -0
  44. package/dist/matchers.js +117 -0
  45. package/dist/matchers.js.map +1 -0
  46. package/dist/pretty-widget.d.ts +24 -26
  47. package/dist/pretty-widget.d.ts.map +1 -1
  48. package/dist/pretty-widget.js +111 -117
  49. package/dist/pretty-widget.js.map +1 -1
  50. package/dist/queries.d.ts +190 -180
  51. package/dist/queries.d.ts.map +1 -1
  52. package/dist/queries.js +291 -320
  53. package/dist/queries.js.map +1 -1
  54. package/dist/register-test-hooks.d.ts +2 -0
  55. package/dist/register-test-hooks.d.ts.map +1 -0
  56. package/dist/register-test-hooks.js +16 -0
  57. package/dist/register-test-hooks.js.map +1 -0
  58. package/dist/render-hook.d.ts +15 -35
  59. package/dist/render-hook.d.ts.map +1 -1
  60. package/dist/render-hook.js +9 -45
  61. package/dist/render-hook.js.map +1 -1
  62. package/dist/render.d.ts +13 -42
  63. package/dist/render.d.ts.map +1 -1
  64. package/dist/render.js +138 -121
  65. package/dist/render.js.map +1 -1
  66. package/dist/role-helpers.d.ts +19 -53
  67. package/dist/role-helpers.d.ts.map +1 -1
  68. package/dist/role-helpers.js +48 -63
  69. package/dist/role-helpers.js.map +1 -1
  70. package/dist/screen.d.ts +7 -63
  71. package/dist/screen.d.ts.map +1 -1
  72. package/dist/screen.js +24 -110
  73. package/dist/screen.js.map +1 -1
  74. package/dist/screenshot.d.ts +21 -23
  75. package/dist/screenshot.d.ts.map +1 -1
  76. package/dist/screenshot.js +98 -50
  77. package/dist/screenshot.js.map +1 -1
  78. package/dist/suggestions.d.ts +27 -0
  79. package/dist/suggestions.d.ts.map +1 -0
  80. package/dist/suggestions.js +61 -0
  81. package/dist/suggestions.js.map +1 -0
  82. package/dist/traversal.d.ts +12 -10
  83. package/dist/traversal.d.ts.map +1 -1
  84. package/dist/traversal.js +36 -15
  85. package/dist/traversal.js.map +1 -1
  86. package/dist/types.d.ts +115 -169
  87. package/dist/types.d.ts.map +1 -1
  88. package/dist/types.js.map +1 -1
  89. package/dist/user-event/adjustment.d.ts +10 -0
  90. package/dist/user-event/adjustment.d.ts.map +1 -0
  91. package/dist/user-event/adjustment.js +35 -0
  92. package/dist/user-event/adjustment.js.map +1 -0
  93. package/dist/user-event/click.d.ts +8 -0
  94. package/dist/user-event/click.d.ts.map +1 -0
  95. package/dist/user-event/click.js +73 -0
  96. package/dist/user-event/click.js.map +1 -0
  97. package/dist/user-event/controller.d.ts +8 -0
  98. package/dist/user-event/controller.d.ts.map +1 -0
  99. package/dist/user-event/controller.js +31 -0
  100. package/dist/user-event/controller.js.map +1 -0
  101. package/dist/user-event/dispatch.d.ts +7 -0
  102. package/dist/user-event/dispatch.d.ts.map +1 -0
  103. package/dist/user-event/dispatch.js +11 -0
  104. package/dist/user-event/dispatch.js.map +1 -0
  105. package/dist/user-event/event-wrapper.d.ts +4 -0
  106. package/dist/user-event/event-wrapper.d.ts.map +1 -0
  107. package/dist/user-event/event-wrapper.js +59 -0
  108. package/dist/user-event/event-wrapper.js.map +1 -0
  109. package/dist/user-event/gesture.d.ts +35 -0
  110. package/dist/user-event/gesture.d.ts.map +1 -0
  111. package/dist/user-event/gesture.js +138 -0
  112. package/dist/user-event/gesture.js.map +1 -0
  113. package/dist/user-event/index.d.ts +51 -0
  114. package/dist/user-event/index.d.ts.map +1 -0
  115. package/dist/user-event/index.js +42 -0
  116. package/dist/user-event/index.js.map +1 -0
  117. package/dist/user-event/keyboard.d.ts +10 -0
  118. package/dist/user-event/keyboard.d.ts.map +1 -0
  119. package/dist/user-event/keyboard.js +204 -0
  120. package/dist/user-event/keyboard.js.map +1 -0
  121. package/dist/user-event/pointer.d.ts +10 -0
  122. package/dist/user-event/pointer.d.ts.map +1 -0
  123. package/dist/user-event/pointer.js +30 -0
  124. package/dist/user-event/pointer.js.map +1 -0
  125. package/dist/user-event/selection.d.ts +5 -0
  126. package/dist/user-event/selection.d.ts.map +1 -0
  127. package/dist/user-event/selection.js +105 -0
  128. package/dist/user-event/selection.js.map +1 -0
  129. package/dist/user-event/state.d.ts +7 -0
  130. package/dist/user-event/state.d.ts.map +1 -0
  131. package/dist/user-event/state.js +3 -0
  132. package/dist/user-event/state.js.map +1 -0
  133. package/dist/user-event/text.d.ts +18 -0
  134. package/dist/user-event/text.d.ts.map +1 -0
  135. package/dist/user-event/text.js +113 -0
  136. package/dist/user-event/text.js.map +1 -0
  137. package/dist/wait-for.d.ts +16 -36
  138. package/dist/wait-for.d.ts.map +1 -1
  139. package/dist/wait-for.js +74 -70
  140. package/dist/wait-for.js.map +1 -1
  141. package/dist/widget-accessible-properties.d.ts +34 -0
  142. package/dist/widget-accessible-properties.d.ts.map +1 -0
  143. package/dist/widget-accessible-properties.js +260 -0
  144. package/dist/widget-accessible-properties.js.map +1 -0
  145. package/dist/within.d.ts +10 -26
  146. package/dist/within.d.ts.map +1 -1
  147. package/dist/within.js +16 -25
  148. package/dist/within.js.map +1 -1
  149. package/package.json +23 -12
  150. package/src/act.ts +77 -0
  151. package/src/bound-queries.ts +37 -0
  152. package/src/build-queries.ts +226 -0
  153. package/src/cleanup-registry.ts +27 -0
  154. package/src/config.ts +35 -62
  155. package/src/editable.ts +37 -0
  156. package/src/errors.ts +191 -0
  157. package/src/fire-event.ts +13 -38
  158. package/src/frame-sync.ts +51 -0
  159. package/src/index.ts +58 -15
  160. package/src/matchers.ts +251 -0
  161. package/src/pretty-widget.ts +163 -130
  162. package/src/queries.ts +485 -396
  163. package/src/register-test-hooks.ts +19 -0
  164. package/src/render-hook.tsx +38 -45
  165. package/src/render.tsx +192 -155
  166. package/src/role-helpers.ts +65 -72
  167. package/src/screen.ts +26 -114
  168. package/src/screenshot.ts +128 -56
  169. package/src/suggestions.ts +106 -0
  170. package/src/traversal.ts +56 -22
  171. package/src/types.ts +144 -172
  172. package/src/user-event/adjustment.ts +62 -0
  173. package/src/user-event/click.ts +99 -0
  174. package/src/user-event/controller.ts +58 -0
  175. package/src/user-event/dispatch.ts +25 -0
  176. package/src/user-event/event-wrapper.ts +80 -0
  177. package/src/user-event/gesture.ts +239 -0
  178. package/src/user-event/index.ts +81 -0
  179. package/src/user-event/keyboard.ts +290 -0
  180. package/src/user-event/pointer.ts +46 -0
  181. package/src/user-event/selection.ts +159 -0
  182. package/src/user-event/state.ts +8 -0
  183. package/src/user-event/text.ts +172 -0
  184. package/src/wait-for.ts +117 -78
  185. package/src/widget-accessible-properties.ts +388 -0
  186. package/src/within.ts +29 -27
  187. package/dist/bind-queries.d.ts +0 -14
  188. package/dist/bind-queries.d.ts.map +0 -1
  189. package/dist/bind-queries.js +0 -29
  190. package/dist/bind-queries.js.map +0 -1
  191. package/dist/error-builder.d.ts +0 -28
  192. package/dist/error-builder.d.ts.map +0 -1
  193. package/dist/error-builder.js +0 -81
  194. package/dist/error-builder.js.map +0 -1
  195. package/dist/timing.d.ts +0 -18
  196. package/dist/timing.d.ts.map +0 -1
  197. package/dist/timing.js +0 -18
  198. package/dist/timing.js.map +0 -1
  199. package/dist/user-event.d.ts +0 -138
  200. package/dist/user-event.d.ts.map +0 -1
  201. package/dist/user-event.js +0 -411
  202. package/dist/user-event.js.map +0 -1
  203. package/dist/widget-text.d.ts +0 -69
  204. package/dist/widget-text.d.ts.map +0 -1
  205. package/dist/widget-text.js +0 -177
  206. package/dist/widget-text.js.map +0 -1
  207. package/dist/widget.d.ts +0 -3
  208. package/dist/widget.d.ts.map +0 -1
  209. package/dist/widget.js +0 -13
  210. package/dist/widget.js.map +0 -1
  211. package/src/bind-queries.ts +0 -52
  212. package/src/error-builder.ts +0 -102
  213. package/src/timing.ts +0 -17
  214. package/src/user-event.ts +0 -492
  215. package/src/widget-text.ts +0 -202
  216. package/src/widget.ts +0 -15
@@ -1 +1 @@
1
- {"version":3,"file":"pretty-widget.js","sourceRoot":"","sources":["../src/pretty-widget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAkB,aAAa,EAAE,MAAM,gBAAgB,C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AC;IAE5C,IAAI,SAAS,KAAK,CAAC,EAAE,CAAC;QAClB,OAAO,EAAE,CAAC;IACd,CAAC;IAED,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,IAAI,eAAe,EAAE,CAAC;IAC3D,MAAM,MAAM,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;IACzC,IAAI,MAAM,GAAG,EAAE,CAAC;IAEhB,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,YAAY,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAClG,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,GAAG,SAAS,EAAE,CAAC;QAC5B,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC;IAC9C,CAAC;IAED,OAAO,MAAM,CAAC,OAAO,EAAE,CAAC;AAC5B,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,SAAS,GAAG,CAAC,SAAkC,EAAE,OAA6B,EAAQ,EAAE;IAC1F,MAAM,UAAU,GAAgB,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAEnF,KAAK,MAAM,MAAM,IAAI,UAAU,EAAE,CAAC;QAC9B,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC/C,CAAC;AACL,CAAC,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,SAAS,EAA4B,CAAC","sourcesContent":["import type * as Gtk from \"@gtkx/gi/gtk\";\nimport { sortStringsBy } from \"@gtkx/utils\";\nimport { formatRole } from \"./role-helpers.js\";\nimport { type Container, roots } from \"./traversal.js\";\nimport { getWidgetNodeText } from \"./widget-accessible-properties.js\";\n\ntype WidgetIdResolver = (widget: Gtk.Widget) => string;\n\n/**\n * Options controlling how a widget tree is rendered to a string by\n * {@link prettyWidget} and {@link logWidget}.\n */\ntype PrettyWidgetOptions = {\n /** Truncates the output once it exceeds this many characters. */\n maxLength?: number;\n /** Whether to apply ANSI color highlighting; defaults to the terminal capabilities. */\n highlight?: boolean;\n /** Resolves an `id` attribute to show for each widget. */\n getId?: WidgetIdResolver;\n /** Stops descending past this depth, replacing deeper children with a summary line. */\n maxDepth?: number;\n};\n\ntype Colors = {\n tag: (s: string) => string;\n attr: (s: string) => string;\n value: (s: string) => string;\n};\n\ntype FormatContext = {\n getId: WidgetIdResolver | undefined;\n colors: Colors;\n maxDepth: number | undefined;\n};\n\nconst DEFAULT_MAX_LENGTH = 7000;\nconst INDENT = \" \";\n\nconst ansi = {\n cyan: \"\\u{1B}[36m\",\n yellow: \"\\u{1B}[33m\",\n green: \"\\u{1B}[32m\",\n reset: \"\\u{1B}[0m\",\n};\n\nconst buildAttrs = (widget: Gtk.Widget, getId: WidgetIdResolver | undefined): [string, string][] => {\n const attrs: [string, string][] = [];\n\n if (getId) {\n attrs.push([\"id\", getId(widget)]);\n }\n\n const name = widget.getName();\n\n if (name) {\n attrs.push([\"name\", name]);\n }\n\n attrs.push([\"role\", formatRole(widget.getAccessibleRole())]);\n\n if (!widget.getSensitive()) {\n attrs.push([\"accessible-disabled\", \"true\"]);\n }\n\n if (!widget.getVisible()) {\n attrs.push([\"accessible-hidden\", \"true\"]);\n }\n\n const idAttrs = attrs.filter(([key]) => key === \"id\");\n\n const otherAttrs = sortStringsBy(\n attrs.filter(([key]) => key !== \"id\"),\n ([key]) => key,\n );\n\n return [...idAttrs, ...otherAttrs];\n};\n\nconst shouldHighlight = (): boolean => {\n if (typeof process === \"undefined\") {\n return false;\n }\n\n if (process.env.COLORS === \"false\" || process.env.NO_COLOR) {\n return false;\n }\n\n if (process.env.COLORS === \"true\" || process.env.FORCE_COLOR) {\n return true;\n }\n\n return process.stdout.isTTY;\n};\n\nconst createColors = (isEnabled: boolean): Colors => {\n if (!isEnabled) {\n const identity = (s: string): string => s;\n\n return { tag: identity, attr: identity, value: identity };\n }\n\n return {\n tag: (s) => `${ansi.cyan}${s}${ansi.reset}`,\n attr: (s) => `${ansi.yellow}${s}${ansi.reset}`,\n value: (s) => `${ansi.green}${s}${ansi.reset}`,\n };\n};\n\nconst escapeAttrValue = (value: string): string => value.replaceAll('\"', \"&quot;\");\n\nconst formatAttr = (key: string, value: string, colors: Colors): string => {\n const quoted = `\"${escapeAttrValue(value)}\"`;\n\n return ` ${colors.attr(key)}=${colors.value(quoted)}`;\n};\n\nconst formatAttrs = (attrs: [string, string][], colors: Colors): string =>\n attrs.map(([key, value]) => formatAttr(key, value, colors)).join(\"\");\n\nconst countChildren = (widget: Gtk.Widget): number => {\n let count = 0;\n let child = widget.getFirstChild();\n\n while (child) {\n count += 1;\n child = child.getNextSibling();\n }\n\n return count;\n};\n\nconst formatHiddenChildrenLine = (widget: Gtk.Widget, depth: number, ctx: FormatContext): string => {\n const { getId, colors } = ctx;\n const indent = INDENT.repeat(depth);\n const count = countChildren(widget);\n const hint = getId ? ` (pass rootId=\"${getId(widget)}\" or raise maxDepth to expand)` : \"\";\n const plural = count === 1 ? \"\" : \"s\";\n const summary = `… ${String(count)} child widget${plural} hidden${hint}`;\n\n return `${indent}${INDENT}${colors.tag(summary)}\\n`;\n};\n\nconst formatChildren = (widget: Gtk.Widget, depth: number, ctx: FormatContext): string => {\n let output = \"\";\n let child = widget.getFirstChild();\n\n while (child) {\n output += formatWidget(child, depth + 1, ctx);\n child = child.getNextSibling();\n }\n\n return output;\n};\n\nconst formatWidget = (widget: Gtk.Widget, depth: number, ctx: FormatContext): string => {\n const { getId, colors, maxDepth } = ctx;\n const indent = INDENT.repeat(depth);\n const tag = widget.constructor.name;\n const attrs = formatAttrs(buildAttrs(widget, getId), colors);\n const openTag = `${colors.tag(\"<\")}${colors.tag(tag)}${attrs}${colors.tag(\">\")}`;\n const closeTag = `${colors.tag(\"</\")}${colors.tag(tag)}${colors.tag(\">\")}`;\n const text = getWidgetNodeText(widget);\n const firstChild = widget.getFirstChild();\n\n if (!text && !firstChild) {\n return `${indent}${openTag}\\n`;\n }\n\n let output = `${indent}${openTag}\\n`;\n\n if (text) {\n output += `${indent}${INDENT}${text}\\n`;\n }\n\n if (firstChild && maxDepth !== undefined && depth >= maxDepth) {\n output += formatHiddenChildrenLine(widget, depth, ctx);\n output += `${indent}${closeTag}\\n`;\n\n return output;\n }\n\n output += formatChildren(widget, depth, ctx);\n output += `${indent}${closeTag}\\n`;\n\n return output;\n};\n\nconst resolveMaxLength = (options: PrettyWidgetOptions): number => {\n const envLimit = process.env.DEBUG_PRINT_LIMIT ? Number(process.env.DEBUG_PRINT_LIMIT) : DEFAULT_MAX_LENGTH;\n\n return options.maxLength ?? envLimit;\n};\n\n/**\n * Renders a widget tree as an indented, HTML-like string showing each widget's\n * tag, accessible attributes, and text content.\n *\n * @param container The scope whose widget tree is formatted.\n * @param options Formatting options such as truncation length and highlighting.\n * @returns The formatted representation of the tree.\n */\nconst prettyWidget = (container: Container, options: PrettyWidgetOptions = {}): string => {\n const maxLength = resolveMaxLength(options);\n\n if (maxLength === 0) {\n return \"\";\n }\n\n const isHighlight = options.highlight ?? shouldHighlight();\n const colors = createColors(isHighlight);\n let output = \"\";\n\n for (const root of roots(container)) {\n output += formatWidget(root, 0, { getId: options.getId, colors, maxDepth: options.maxDepth });\n }\n\n if (output.length > maxLength) {\n return `${output.slice(0, maxLength)}...`;\n }\n\n return output.trimEnd();\n};\n\n/**\n * Prints one or more widget trees to the console using {@link prettyWidget}.\n *\n * @param container A single scope or an array of scopes to format and print.\n * @param options Formatting options passed through to {@link prettyWidget}.\n */\nconst logWidget = (container: Container | Container[], options?: PrettyWidgetOptions): void => {\n const containers: Container[] = Array.isArray(container) ? container : [container];\n\n for (const target of containers) {\n console.log(prettyWidget(target, options));\n }\n};\n\nexport { prettyWidget, logWidget, type PrettyWidgetOptions };\n"]}
package/dist/queries.d.ts CHANGED
@@ -1,182 +1,192 @@
1
- import * as Gtk from "@gtkx/ffi/gtk";
1
+ import * as Gtk from "@gtkx/gi/gtk";
2
+ import type { ByRoleOptions, Matcher, MatcherOptions, NormalizerFn, NormalizerOptions } from "./types.js";
2
3
  import { type Container } from "./traversal.js";
3
- import type { ByRoleOptions, TextMatch, TextMatchOptions } from "./types.js";
4
- /**
5
- * Finds all elements matching a role without throwing.
6
- *
7
- * @param container - The container to search within
8
- * @param role - The GTK accessible role to match
9
- * @param options - Query options including name and state filters
10
- * @returns Array of matching widgets (empty if none found)
11
- */
12
- export declare const queryAllByRole: (container: Container, role: Gtk.AccessibleRole, options?: ByRoleOptions) => Gtk.Widget[];
13
- /**
14
- * Finds a single element matching a role without throwing.
15
- *
16
- * @param container - The container to search within
17
- * @param role - The GTK accessible role to match
18
- * @param options - Query options including name and state filters
19
- * @returns The matching widget or null if not found
20
- * @throws Error if multiple elements match
21
- */
22
- export declare const queryByRole: (container: Container, role: Gtk.AccessibleRole, options?: ByRoleOptions) => Gtk.Widget | null;
23
- /**
24
- * Finds all elements that are labelled by a GtkLabel whose text matches.
25
- *
26
- * Uses GtkLabel's mnemonic widget association to find form elements
27
- * by their label text. Only returns widgets that are properly labelled
28
- * via GtkLabel's mnemonic-widget property.
29
- *
30
- * @param container - The container to search within
31
- * @param text - Label text to match (string, RegExp, or custom matcher)
32
- * @param options - Query options including normalization
33
- * @returns Array of labelled widgets (empty if none found)
34
- */
35
- export declare const queryAllByLabelText: (container: Container, text: TextMatch, options?: TextMatchOptions) => Gtk.Widget[];
36
- /**
37
- * Finds a single element matching label text without throwing.
38
- *
39
- * @param container - The container to search within
40
- * @param text - Text to match (string, RegExp, or custom matcher)
41
- * @param options - Query options including normalization
42
- * @returns The matching widget or null if not found
43
- * @throws Error if multiple elements match
44
- */
45
- export declare const queryByLabelText: (container: Container, text: TextMatch, options?: TextMatchOptions) => Gtk.Widget | null;
46
- /**
47
- * Finds all elements matching text content without throwing.
48
- *
49
- * @param container - The container to search within
50
- * @param text - Text to match (string, RegExp, or custom matcher)
51
- * @param options - Query options including normalization
52
- * @returns Array of matching widgets (empty if none found)
53
- */
54
- export declare const queryAllByText: (container: Container, text: TextMatch, options?: TextMatchOptions) => Gtk.Widget[];
55
- /**
56
- * Finds a single element matching text content without throwing.
57
- *
58
- * @param container - The container to search within
59
- * @param text - Text to match (string, RegExp, or custom matcher)
60
- * @param options - Query options including normalization
61
- * @returns The matching widget or null if not found
62
- * @throws Error if multiple elements match
63
- */
64
- export declare const queryByText: (container: Container, text: TextMatch, options?: TextMatchOptions) => Gtk.Widget | null;
65
- /**
66
- * Finds all elements matching a widget name without throwing.
67
- *
68
- * @param container - The container to search within
69
- * @param name - Widget name to match (string, RegExp, or custom matcher)
70
- * @param options - Query options including normalization
71
- * @returns Array of matching widgets (empty if none found)
72
- */
73
- export declare const queryAllByName: (container: Container, name: TextMatch, options?: TextMatchOptions) => Gtk.Widget[];
74
- /**
75
- * Finds a single element matching a widget name without throwing.
76
- *
77
- * @param container - The container to search within
78
- * @param name - Widget name to match (string, RegExp, or custom matcher)
79
- * @param options - Query options including normalization
80
- * @returns The matching widget or null if not found
81
- * @throws Error if multiple elements match
82
- */
83
- export declare const queryByName: (container: Container, name: TextMatch, options?: TextMatchOptions) => Gtk.Widget | null;
84
- /**
85
- * Finds a single element by accessible role.
86
- *
87
- * Waits for the element to appear, throwing if not found within timeout.
88
- *
89
- * @param container - The container to search within
90
- * @param role - The GTK accessible role to match
91
- * @param options - Query options including name, state filters, and timeout
92
- * @returns Promise resolving to the matching widget
93
- *
94
- * @example
95
- * ```tsx
96
- * const button = await findByRole(container, Gtk.AccessibleRole.BUTTON, { name: "Submit" });
97
- * ```
98
- */
99
- export declare const findByRole: (container: Container, role: Gtk.AccessibleRole, options?: ByRoleOptions) => Promise<Gtk.Widget>;
100
- /**
101
- * Finds all elements matching an accessible role.
102
- *
103
- * @param container - The container to search within
104
- * @param role - The GTK accessible role to match
105
- * @param options - Query options including name, state filters, and timeout
106
- * @returns Promise resolving to array of matching widgets
107
- */
108
- export declare const findAllByRole: (container: Container, role: Gtk.AccessibleRole, options?: ByRoleOptions) => Promise<Gtk.Widget[]>;
109
- /**
110
- * Finds a single element that is labelled by a GtkLabel whose text matches.
111
- *
112
- * Waits for the element to appear, throwing if not found within timeout.
113
- * Uses GtkLabel's mnemonic widget association to find form elements.
114
- *
115
- * @param container - The container to search within
116
- * @param text - Label text to match (string, RegExp, or custom matcher)
117
- * @param options - Query options including normalization and timeout
118
- * @returns Promise resolving to the labelled widget
119
- *
120
- * @example
121
- * ```tsx
122
- * const input = await findByLabelText(container, "Username");
123
- * ```
124
- */
125
- export declare const findByLabelText: (container: Container, text: TextMatch, options?: TextMatchOptions) => Promise<Gtk.Widget>;
126
- /**
127
- * Finds all elements matching label or text content.
128
- *
129
- * @param container - The container to search within
130
- * @param text - Text to match (string, RegExp, or custom matcher)
131
- * @param options - Query options including normalization and timeout
132
- * @returns Promise resolving to array of matching widgets
133
- */
134
- export declare const findAllByLabelText: (container: Container, text: TextMatch, options?: TextMatchOptions) => Promise<Gtk.Widget[]>;
135
- /**
136
- * Finds a single element by visible text content.
137
- *
138
- * Similar to {@link findByLabelText} but focuses on directly visible text.
139
- *
140
- * @param container - The container to search within
141
- * @param text - Text to match (string, RegExp, or custom matcher)
142
- * @param options - Query options including normalization and timeout
143
- * @returns Promise resolving to the matching widget
144
- */
145
- export declare const findByText: (container: Container, text: TextMatch, options?: TextMatchOptions) => Promise<Gtk.Widget>;
146
- /**
147
- * Finds all elements matching visible text content.
148
- *
149
- * @param container - The container to search within
150
- * @param text - Text to match (string, RegExp, or custom matcher)
151
- * @param options - Query options including normalization and timeout
152
- * @returns Promise resolving to array of matching widgets
153
- */
154
- export declare const findAllByText: (container: Container, text: TextMatch, options?: TextMatchOptions) => Promise<Gtk.Widget[]>;
155
- /**
156
- * Finds a single element by widget name.
157
- *
158
- * Uses the widget's `name` property (gtk_widget_get_name).
159
- * Set via the `name` prop on GTKX components.
160
- *
161
- * @param container - The container to search within
162
- * @param name - Widget name to match (string, RegExp, or custom matcher)
163
- * @param options - Query options including normalization and timeout
164
- * @returns Promise resolving to the matching widget
165
- *
166
- * @example
167
- * ```tsx
168
- * // In component: <GtkButton name="submit-btn" />
169
- * const button = await findByName(container, "submit-btn");
170
- * ```
171
- */
172
- export declare const findByName: (container: Container, name: TextMatch, options?: TextMatchOptions) => Promise<Gtk.Widget>;
173
- /**
174
- * Finds all elements matching a widget name pattern.
175
- *
176
- * @param container - The container to search within
177
- * @param name - Widget name to match (string, RegExp, or custom matcher)
178
- * @param options - Query options including normalization and timeout
179
- * @returns Promise resolving to array of matching widgets
180
- */
181
- export declare const findAllByName: (container: Container, name: TextMatch, options?: TextMatchOptions) => Promise<Gtk.Widget[]>;
4
+ type QueryFamilyReturns = {
5
+ queryBy: Gtk.Widget | null;
6
+ queryAllBy: Gtk.Widget[];
7
+ getBy: Gtk.Widget;
8
+ getAllBy: Gtk.Widget[];
9
+ findBy: Promise<Gtk.Widget>;
10
+ findAllBy: Promise<Gtk.Widget[]>;
11
+ };
12
+ type NamedFamily<Suffix extends string, Args extends unknown[]> = {
13
+ [K in keyof QueryFamilyReturns as `${K & string}${Suffix}`]: (container: Container, ...args: Args) => QueryFamilyReturns[K];
14
+ };
15
+ type BuiltinQueries = NamedFamily<"Role", [role: Gtk.AccessibleRole, options?: ByRoleOptions]> & NamedFamily<"LabelText", [text: Matcher, options?: MatcherOptions]> & NamedFamily<"Text", [text: Matcher, options?: MatcherOptions]> & NamedFamily<"Name", [name: Matcher, options?: MatcherOptions]> & NamedFamily<"PlaceholderText", [text: Matcher, options?: MatcherOptions]> & NamedFamily<"DisplayValue", [value: Matcher, options?: MatcherOptions]>;
16
+ declare const builtinQueries: BuiltinQueries;
17
+ /**
18
+ * Returns the single widget with a matching accessible role and options, or null when none match.
19
+ * Throws when more than one matches.
20
+ */
21
+ declare const queryByRole: BuiltinQueries["queryByRole"];
22
+ /** Returns every widget with a matching accessible role and options. Throws when none match. */
23
+ declare const getAllByRole: BuiltinQueries["getAllByRole"];
24
+ /**
25
+ * Returns the single widget with a matching accessible role and options.
26
+ * Throws when none or more than one matches.
27
+ */
28
+ declare const getByRole: BuiltinQueries["getByRole"];
29
+ /**
30
+ * Waits for and returns every widget with a matching accessible role and options, retrying until at
31
+ * least one appears or the timeout elapses.
32
+ */
33
+ declare const findAllByRole: BuiltinQueries["findAllByRole"];
34
+ /**
35
+ * Waits for and returns the single widget with a matching accessible role and options, retrying
36
+ * until it appears or the timeout elapses. Rejects when none or more than one matches.
37
+ */
38
+ declare const findByRole: BuiltinQueries["findByRole"];
39
+ /**
40
+ * Returns the single widget with matching associated label text, or null when none match.
41
+ * Throws when more than one matches.
42
+ */
43
+ declare const queryByLabelText: BuiltinQueries["queryByLabelText"];
44
+ /** Returns every widget with matching associated label text. Throws when none match. */
45
+ declare const getAllByLabelText: BuiltinQueries["getAllByLabelText"];
46
+ /** Returns the single widget with matching associated label text. Throws when none or more than one matches. */
47
+ declare const getByLabelText: BuiltinQueries["getByLabelText"];
48
+ /**
49
+ * Waits for and returns every widget with matching associated label text, retrying until at least
50
+ * one appears or the timeout elapses.
51
+ */
52
+ declare const findAllByLabelText: BuiltinQueries["findAllByLabelText"];
53
+ /**
54
+ * Waits for and returns the single widget with matching associated label text, retrying until it
55
+ * appears or the timeout elapses. Rejects when none or more than one matches.
56
+ */
57
+ declare const findByLabelText: BuiltinQueries["findByLabelText"];
58
+ /**
59
+ * Returns the single widget with matching rendered text content, or null when none match.
60
+ * Throws when more than one matches.
61
+ */
62
+ declare const queryByText: BuiltinQueries["queryByText"];
63
+ /** Returns every widget with matching rendered text content. Throws when none match. */
64
+ declare const getAllByText: BuiltinQueries["getAllByText"];
65
+ /** Returns the single widget with matching rendered text content. Throws when none or more than one matches. */
66
+ declare const getByText: BuiltinQueries["getByText"];
67
+ /**
68
+ * Waits for and returns every widget with matching rendered text content, retrying until at least
69
+ * one appears or the timeout elapses.
70
+ */
71
+ declare const findAllByText: BuiltinQueries["findAllByText"];
72
+ /**
73
+ * Waits for and returns the single widget with matching rendered text content, retrying until it
74
+ * appears or the timeout elapses. Rejects when none or more than one matches.
75
+ */
76
+ declare const findByText: BuiltinQueries["findByText"];
77
+ /**
78
+ * Returns the single widget with a matching widget name, or null when none match.
79
+ * Throws when more than one matches.
80
+ */
81
+ declare const queryByName: BuiltinQueries["queryByName"];
82
+ /** Returns every widget with a matching widget name. Throws when none match. */
83
+ declare const getAllByName: BuiltinQueries["getAllByName"];
84
+ /** Returns the single widget with a matching widget name. Throws when none or more than one matches. */
85
+ declare const getByName: BuiltinQueries["getByName"];
86
+ /**
87
+ * Waits for and returns every widget with a matching widget name, retrying until at least one
88
+ * appears or the timeout elapses.
89
+ */
90
+ declare const findAllByName: BuiltinQueries["findAllByName"];
91
+ /**
92
+ * Waits for and returns the single widget with a matching widget name, retrying until it appears or
93
+ * the timeout elapses. Rejects when none or more than one matches.
94
+ */
95
+ declare const findByName: BuiltinQueries["findByName"];
96
+ /**
97
+ * Returns the single widget with matching placeholder text, or null when none match.
98
+ * Throws when more than one matches.
99
+ */
100
+ declare const queryByPlaceholderText: BuiltinQueries["queryByPlaceholderText"];
101
+ /** Returns every widget with matching placeholder text. Throws when none match. */
102
+ declare const getAllByPlaceholderText: BuiltinQueries["getAllByPlaceholderText"];
103
+ /** Returns the single widget with matching placeholder text. Throws when none or more than one matches. */
104
+ declare const getByPlaceholderText: BuiltinQueries["getByPlaceholderText"];
105
+ /**
106
+ * Waits for and returns every widget with matching placeholder text, retrying until at least one
107
+ * appears or the timeout elapses.
108
+ */
109
+ declare const findAllByPlaceholderText: BuiltinQueries["findAllByPlaceholderText"];
110
+ /**
111
+ * Waits for and returns the single widget with matching placeholder text, retrying until it appears
112
+ * or the timeout elapses. Rejects when none or more than one matches.
113
+ */
114
+ declare const findByPlaceholderText: BuiltinQueries["findByPlaceholderText"];
115
+ /**
116
+ * Returns the single widget with a matching display value, or null when none match.
117
+ * Throws when more than one matches.
118
+ */
119
+ declare const queryByDisplayValue: BuiltinQueries["queryByDisplayValue"];
120
+ /** Returns every widget with a matching display value. Throws when none match. */
121
+ declare const getAllByDisplayValue: BuiltinQueries["getAllByDisplayValue"];
122
+ /** Returns the single widget with a matching display value. Throws when none or more than one matches. */
123
+ declare const getByDisplayValue: BuiltinQueries["getByDisplayValue"];
124
+ /**
125
+ * Waits for and returns every widget with a matching display value, retrying until at least one
126
+ * appears or the timeout elapses.
127
+ */
128
+ declare const findAllByDisplayValue: BuiltinQueries["findAllByDisplayValue"];
129
+ /**
130
+ * Waits for and returns the single widget with a matching display value, retrying until it appears
131
+ * or the timeout elapses. Rejects when none or more than one matches.
132
+ */
133
+ declare const findByDisplayValue: BuiltinQueries["findByDisplayValue"];
134
+ /**
135
+ * Builds the default text normalizer, which optionally trims surrounding whitespace and collapses
136
+ * runs of whitespace into single spaces.
137
+ * @param options Toggles for trimming and whitespace collapsing.
138
+ * @returns A function that normalizes a string for comparison against a matcher.
139
+ */
140
+ declare const getDefaultNormalizer: ({ trim, collapseWhitespace, }?: NormalizerOptions) => NormalizerFn;
141
+ /**
142
+ * Finds every widget under the container whose accessible role matches `role` and that satisfies the given options.
143
+ * Widgets excluded from the accessibility tree are skipped unless `options.hidden` is set.
144
+ * @param container Widget subtree to search.
145
+ * @param role Accessible role to match.
146
+ * @param options Additional accessible name, state, and value constraints.
147
+ * @returns Every matching widget, or an empty array when none match.
148
+ */
149
+ declare function queryAllByRole(container: Container, role: Gtk.AccessibleRole, options?: ByRoleOptions): Gtk.Widget[];
150
+ /**
151
+ * Finds every widget associated with a label whose text matches: a Gtk.Label mnemonic target, the
152
+ * widget's own accessible label, or its labelled-by relation.
153
+ * @param container Widget subtree to search.
154
+ * @param text Matcher for the label text.
155
+ * @param options Text matching options.
156
+ * @returns Every matching widget, or an empty array when none match.
157
+ */
158
+ declare function queryAllByLabelText(container: Container, text: Matcher, options?: MatcherOptions): Gtk.Widget[];
159
+ /**
160
+ * Finds every widget whose rendered text content matches.
161
+ * @param container Widget subtree to search.
162
+ * @param text Matcher for the widget text.
163
+ * @param options Text matching options.
164
+ * @returns Every matching widget, or an empty array when none match.
165
+ */
166
+ declare function queryAllByText(container: Container, text: Matcher, options?: MatcherOptions): Gtk.Widget[];
167
+ /**
168
+ * Finds every widget whose widget name matches.
169
+ * @param container Widget subtree to search.
170
+ * @param name Matcher for the widget name.
171
+ * @param options Text matching options.
172
+ * @returns Every matching widget, or an empty array when none match.
173
+ */
174
+ declare function queryAllByName(container: Container, name: Matcher, options?: MatcherOptions): Gtk.Widget[];
175
+ /**
176
+ * Finds every widget whose placeholder text matches.
177
+ * @param container Widget subtree to search.
178
+ * @param text Matcher for the placeholder text.
179
+ * @param options Text matching options.
180
+ * @returns Every matching widget, or an empty array when none match.
181
+ */
182
+ declare function queryAllByPlaceholderText(container: Container, text: Matcher, options?: MatcherOptions): Gtk.Widget[];
183
+ /**
184
+ * Finds every widget whose current display value matches.
185
+ * @param container Widget subtree to search.
186
+ * @param value Matcher for the display value.
187
+ * @param options Text matching options.
188
+ * @returns Every matching widget, or an empty array when none match.
189
+ */
190
+ declare function queryAllByDisplayValue(container: Container, value: Matcher, options?: MatcherOptions): Gtk.Widget[];
191
+ export { builtinQueries, queryByRole, getAllByRole, getByRole, findAllByRole, findByRole, queryByLabelText, getAllByLabelText, getByLabelText, findAllByLabelText, findByLabelText, queryByText, getAllByText, getByText, findAllByText, findByText, queryByName, getAllByName, getByName, findAllByName, findByName, queryByPlaceholderText, getAllByPlaceholderText, getByPlaceholderText, findAllByPlaceholderText, findByPlaceholderText, queryByDisplayValue, getAllByDisplayValue, getByDisplayValue, findAllByDisplayValue, findByDisplayValue, getDefaultNormalizer, queryAllByRole, queryAllByLabelText, queryAllByText, queryAllByName, queryAllByPlaceholderText, queryAllByDisplayValue, type BuiltinQueries, };
182
192
  //# sourceMappingURL=queries.d.ts.map
@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