@@ -1,5 +1,5 @@
|
|||||||
import { ClassDB, Node, type NodePathMap } from "godot"
|
import { ClassDB, Node, type NodePathMap } from "godot"
|
||||||
import ReactReconciler from "react-reconciler"
|
import ReactReconciler, { type HostConfig } from "react-reconciler"
|
||||||
import { camelToSnake, hasProperty, snakeToPascal } from "./utils.js"
|
import { camelToSnake, hasProperty, snakeToPascal } from "./utils.js"
|
||||||
|
|
||||||
|
|
||||||
@@ -139,60 +139,77 @@ export const make = () => {
|
|||||||
cancelTimeout: clearTimeout,
|
cancelTimeout: clearTimeout,
|
||||||
noTimeout: -1,
|
noTimeout: -1,
|
||||||
|
|
||||||
isPrimaryRenderer: true,
|
// isPrimaryRenderer: true,
|
||||||
supportsPersistence: false,
|
// supportsPersistence: false,
|
||||||
|
|
||||||
preparePortalMount(_containerInfo) {
|
// preparePortalMount(_containerInfo) {
|
||||||
throw new Error("Function not implemented.")
|
// throw new Error("Function not implemented.")
|
||||||
},
|
// },
|
||||||
getInstanceFromNode(_node) {
|
// getInstanceFromNode(_node) {
|
||||||
throw new Error("Function not implemented.")
|
// throw new Error("Function not implemented.")
|
||||||
},
|
// },
|
||||||
beforeActiveInstanceBlur() {
|
// beforeActiveInstanceBlur() {
|
||||||
throw new Error("Function not implemented.")
|
// throw new Error("Function not implemented.")
|
||||||
},
|
// },
|
||||||
afterActiveInstanceBlur() {
|
// afterActiveInstanceBlur() {
|
||||||
throw new Error("Function not implemented.")
|
// throw new Error("Function not implemented.")
|
||||||
},
|
// },
|
||||||
prepareScopeUpdate(_scopeInstance, _instance) {
|
// prepareScopeUpdate(_scopeInstance, _instance) {
|
||||||
throw new Error("Function not implemented.")
|
// throw new Error("Function not implemented.")
|
||||||
},
|
// },
|
||||||
getInstanceFromScope(_scopeInstance) {
|
// getInstanceFromScope(_scopeInstance) {
|
||||||
throw new Error("Function not implemented.")
|
// throw new Error("Function not implemented.")
|
||||||
},
|
// },
|
||||||
detachDeletedInstance(_node) {
|
// detachDeletedInstance(_node) {
|
||||||
throw new Error("Function not implemented.")
|
// throw new Error("Function not implemented.")
|
||||||
},
|
// },
|
||||||
|
|
||||||
supportsHydration: false,
|
// supportsHydration: false,
|
||||||
NotPendingTransition: undefined,
|
// NotPendingTransition: undefined,
|
||||||
HostTransitionContext: undefined as any,
|
// HostTransitionContext: undefined as any,
|
||||||
|
|
||||||
resetFormInstance(_form) {
|
// resetFormInstance(_form) {
|
||||||
throw new Error("Function not implemented.")
|
// throw new Error("Function not implemented.")
|
||||||
},
|
// },
|
||||||
requestPostPaintCallback(_callback: (time: number) => void) {
|
// requestPostPaintCallback(_callback: (time: number) => void) {
|
||||||
throw new Error("Function not implemented.")
|
// throw new Error("Function not implemented.")
|
||||||
},
|
// },
|
||||||
shouldAttemptEagerTransition: (): boolean => {
|
// shouldAttemptEagerTransition: (): boolean => {
|
||||||
throw new Error("Function not implemented.")
|
// throw new Error("Function not implemented.")
|
||||||
},
|
// },
|
||||||
maySuspendCommit(_type, _props) {
|
// maySuspendCommit(_type, _props) {
|
||||||
throw new Error("Function not implemented.")
|
// throw new Error("Function not implemented.")
|
||||||
},
|
// },
|
||||||
preloadInstance(_type, _props) {
|
// preloadInstance(_type, _props) {
|
||||||
throw new Error("Function not implemented.")
|
// throw new Error("Function not implemented.")
|
||||||
},
|
// },
|
||||||
startSuspendingCommit() {
|
// startSuspendingCommit() {
|
||||||
throw new Error("Function not implemented.")
|
// throw new Error("Function not implemented.")
|
||||||
},
|
// },
|
||||||
suspendInstance(_type, _props) {
|
// suspendInstance(_type, _props) {
|
||||||
throw new Error("Function not implemented.")
|
// throw new Error("Function not implemented.")
|
||||||
},
|
// },
|
||||||
waitForCommitToBeReady() {
|
// waitForCommitToBeReady() {
|
||||||
throw new Error("Function not implemented.")
|
// throw new Error("Function not implemented.")
|
||||||
},
|
// },
|
||||||
})
|
} as Partial<
|
||||||
|
HostConfig<
|
||||||
|
string,
|
||||||
|
Record<string, unknown>,
|
||||||
|
Node<NodePathMap>,
|
||||||
|
Node<NodePathMap>,
|
||||||
|
Node<NodePathMap>,
|
||||||
|
Node<NodePathMap>,
|
||||||
|
Node<NodePathMap>,
|
||||||
|
Node<NodePathMap>,
|
||||||
|
Node<NodePathMap>,
|
||||||
|
unknown,
|
||||||
|
unknown,
|
||||||
|
unknown,
|
||||||
|
unknown,
|
||||||
|
unknown
|
||||||
|
>
|
||||||
|
> as any)
|
||||||
}
|
}
|
||||||
|
|
||||||
const applyNextProps = (instance: Node<NodePathMap>, nextProps: Record<string, unknown>) => {
|
const applyNextProps = (instance: Node<NodePathMap>, nextProps: Record<string, unknown>) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user