@gtkx/testing 0.1.32 → 0.1.33

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 (2) hide show
  1. package/dist/render.js +3 -6
  2. package/package.json +4 -4
package/dist/render.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { start, stop } from "@gtkx/ffi";
3
3
  import * as Gtk from "@gtkx/ffi/gtk";
4
- import { reconciler } from "@gtkx/react";
4
+ import { ApplicationWindow, reconciler } from "@gtkx/react";
5
5
  import * as queries from "./queries.js";
6
6
  import { setScreenRoot } from "./screen.js";
7
7
  const APP_ID = "com.gtkx.testing";
@@ -57,11 +57,8 @@ const ensureInitialized = () => {
57
57
  }
58
58
  return { app, container };
59
59
  };
60
- const wrapElement = (element, Wrapper) => {
61
- if (!Wrapper)
62
- return element;
63
- return _jsx(Wrapper, { children: element });
64
- };
60
+ const DefaultWrapper = ({ children }) => (_jsx(ApplicationWindow, { children: children }));
61
+ const wrapElement = (element, Wrapper = DefaultWrapper) => (_jsx(Wrapper, { children: element }));
65
62
  export const render = (element, options) => {
66
63
  const { app: application, container: fiberRoot } = ensureInitialized();
67
64
  const instance = reconciler.getInstance();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gtkx/testing",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "description": "Testing utilities for GTKX applications",
5
5
  "keywords": [
6
6
  "gtk",
@@ -32,9 +32,9 @@
32
32
  "dist"
33
33
  ],
34
34
  "dependencies": {
35
- "@gtkx/ffi": "0.1.32",
36
- "@gtkx/native": "0.1.32",
37
- "@gtkx/react": "0.1.32"
35
+ "@gtkx/ffi": "0.1.33",
36
+ "@gtkx/native": "0.1.33",
37
+ "@gtkx/react": "0.1.33"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "tsc -b && cp ../../README.md .",