@gtkx/react 0.1.51 → 0.1.53

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.
package/dist/batch.js CHANGED
@@ -5,10 +5,15 @@ export const beginCommit = () => {
5
5
  };
6
6
  export const endCommit = () => {
7
7
  inCommit = false;
8
- for (const callback of pendingFlushes) {
9
- callback();
8
+ if (pendingFlushes.size > 0) {
9
+ const callbacks = [...pendingFlushes];
10
+ pendingFlushes.clear();
11
+ queueMicrotask(() => {
12
+ for (const callback of callbacks) {
13
+ callback();
14
+ }
15
+ });
10
16
  }
11
- pendingFlushes.clear();
12
17
  };
13
18
  export const scheduleFlush = (callback) => {
14
19
  if (inCommit) {
@@ -635,9 +635,7 @@ ${widgetPropsContent}
635
635
  * The menu will appear in the window's title bar on supported platforms.
636
636
  * Use Menu.Item, Menu.Section, and Menu.Submenu as children.
637
637
  */
638
- export function ApplicationMenu(props: MenuRootProps): import("react").ReactElement {
639
- \treturn createElement("ApplicationMenu", props);
640
- }
638
+ export const ApplicationMenu = "ApplicationMenu" as const;
641
639
 
642
640
  function MenuItem(props: MenuItemProps): import("react").ReactElement {
643
641
  \treturn createElement("Menu.Item", props);
@@ -11749,7 +11749,7 @@ export declare const WindowHandle: "WindowHandle";
11749
11749
  * The menu will appear in the window's title bar on supported platforms.
11750
11750
  * Use Menu.Item, Menu.Section, and Menu.Submenu as children.
11751
11751
  */
11752
- export declare function ApplicationMenu(props: MenuRootProps): import("react").ReactElement;
11752
+ export declare const ApplicationMenu: "ApplicationMenu";
11753
11753
  declare function MenuItem(props: MenuItemProps): import("react").ReactElement;
11754
11754
  declare function MenuSection(props: MenuSectionProps): import("react").ReactElement;
11755
11755
  declare function MenuSubmenu(props: MenuSubmenuProps): import("react").ReactElement;
@@ -5815,9 +5815,7 @@ export const WindowHandle = "WindowHandle";
5815
5815
  * The menu will appear in the window's title bar on supported platforms.
5816
5816
  * Use Menu.Item, Menu.Section, and Menu.Submenu as children.
5817
5817
  */
5818
- export function ApplicationMenu(props) {
5819
- return createElement("ApplicationMenu", props);
5820
- }
5818
+ export const ApplicationMenu = "ApplicationMenu";
5821
5819
  function MenuItem(props) {
5822
5820
  return createElement("Menu.Item", props);
5823
5821
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gtkx/react",
3
- "version": "0.1.51",
3
+ "version": "0.1.53",
4
4
  "description": "Build GTK4 desktop applications with React and TypeScript",
5
5
  "keywords": [
6
6
  "gtk",
@@ -36,10 +36,10 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "react-reconciler": "0.33.0",
39
- "@gtkx/ffi": "0.1.51"
39
+ "@gtkx/ffi": "0.1.53"
40
40
  },
41
41
  "devDependencies": {
42
- "@gtkx/gir": "0.1.51"
42
+ "@gtkx/gir": "0.1.53"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": "^19"