@ringozz/react-godot 4.7.2-628 → 4.7.2-641

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ringozz/react-godot",
3
3
  "author": "Vladimir Davidovich",
4
- "version": "4.7.2-628",
4
+ "version": "4.7.2-641",
5
5
  "description": "A React renderer for Godot Engine via @ringozz/godot",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -23,8 +23,8 @@
23
23
  "*.md"
24
24
  ],
25
25
  "dependencies": {
26
- "@ringozz/godot": "^4.7.2-628",
27
- "@types/react-reconciler": "^0.33.0",
26
+ "@ringozz/godot": "^4.7.2-641",
27
+ "@types/react-reconciler": "^0.33.1",
28
28
  "react-reconciler": "^0.34.0"
29
29
  },
30
30
  "peerDependencies": {
package/src/index.ts CHANGED
@@ -10,17 +10,18 @@ export * from './react-hooks.ts';
10
10
  export type * from './react-types.ts';
11
11
 
12
12
  const reconciler = Reconciler(FiberConfig);
13
- reconciler.injectIntoDevTools(undefined as never);
13
+ reconciler.injectIntoDevTools();
14
14
 
15
15
  export function createRoot(parent: Node) {
16
16
  const isStrictMode = process.env.NODE_ENV === 'development';
17
17
  const concurrentUpdatesByDefaultOverride = false;
18
18
  const identifierPrefix = '';
19
19
  /* eslint-disable @typescript-eslint/no-explicit-any */
20
- const onUncaughtError = (reconciler as any).defaultOnUncaughtError;
21
- const onCaughtError = (reconciler as any).defaultOnCaughtError;
22
- const onRecoverableError = (reconciler as any).defaultOnRecoverableError;
20
+ const onUncaughtError = reconciler.defaultOnUncaughtError;
21
+ const onCaughtError = reconciler.defaultOnCaughtError;
22
+ const onRecoverableError = reconciler.defaultOnRecoverableError;
23
23
  const onDefaultTransitionIndicator = () => { };
24
+ const transitionCallbacks = null;
24
25
  const root = reconciler.createContainer(
25
26
  parent,
26
27
  Constants.ConcurrentRoot,
@@ -31,7 +32,8 @@ export function createRoot(parent: Node) {
31
32
  onUncaughtError,
32
33
  onCaughtError,
33
34
  onRecoverableError,
34
- onDefaultTransitionIndicator
35
+ onDefaultTransitionIndicator,
36
+ transitionCallbacks
35
37
  );
36
38
  return {
37
39
  render: (component: React.ReactNode) => new Promise<void>((resolve, reject) => {
@@ -16,10 +16,12 @@ import type { InstanceProps } from './react-types.ts';
16
16
 
17
17
  export const rendererPackageName = pkg.name;
18
18
  export const rendererVersion = pkg.version;
19
+ export const extraDevToolsConfig = null;
19
20
  export const supportsMutation = true;
20
21
  export const supportsPersistence = false;
21
22
  export const supportsHydration = false;
22
23
  export const isPrimaryRenderer = true;
24
+ export const bindToConsole = (methodName: string, args: unknown[]) => (console as any)[methodName].bind(console, ...args);
23
25
 
24
26
  type Type = string;
25
27
  type Props = InstanceProps & Record<string, unknown>;
@@ -71,7 +73,7 @@ export function getRootHostContext(root: Container): HostContext | null {
71
73
  return EMPTY;
72
74
  }
73
75
 
74
- export function getChildHostContext(parentHostContext: HostContext, type: Type, root: Container): HostContext {
76
+ export function getChildHostContext(parentHostContext: HostContext, type: Type): HostContext {
75
77
  return parentHostContext;
76
78
  }
77
79
 
@@ -191,20 +193,33 @@ export function maySuspendCommit(type: Type, props: Props) {
191
193
  return false;
192
194
  }
193
195
 
194
- export function preloadInstance(type: Type, props: Props) {
196
+ export function maySuspendCommitOnUpdate(type: Type, oldProps: Props, newProps: Props) {
197
+ return false;
198
+ }
199
+
200
+ export function maySuspendCommitInSyncRender(type: Type, props: Props) {
201
+ return false;
202
+ }
203
+
204
+ export function getSuspendedCommitReason(state: unknown, root: Container): null | string {
205
+ return null;
206
+ }
207
+
208
+ export function preloadInstance(instance: Instance, type: Type, props: Props) {
195
209
  return true; // Return true to indicate it's already loaded
196
210
  }
197
211
 
198
- export function startSuspendingCommit() {
212
+ export function startSuspendingCommit(): unknown {
213
+ return null;
199
214
  }
200
215
 
201
- export function suspendInstance(type: Type, props: Props) {
216
+ export function suspendInstance(state: unknown, instance: Instance, type: Type, props: Props): void {
202
217
  }
203
218
 
204
- export function suspendOnActiveViewTransition() {
219
+ export function suspendOnActiveViewTransition(state: unknown, root: Container): void {
205
220
  }
206
221
 
207
- export function waitForCommitToBeReady() {
222
+ export function waitForCommitToBeReady(state: unknown, timeoutOffset: number) {
208
223
  return null;
209
224
  }
210
225