decky-frontend-lib
Advanced tools
Comparing version 3.21.6 to 3.21.7
@@ -9,8 +9,3 @@ import * as React from 'react'; | ||
export declare function wrapReactType(node: any, prop?: any): any; | ||
export declare function wrapReactClass(node: any, prop?: any): { | ||
new (): { | ||
[x: string]: any; | ||
}; | ||
[x: string]: any; | ||
}; | ||
export declare function wrapReactClass(node: any, prop?: any): any; | ||
export declare function getReactInstance(o: HTMLElement | Element | Node): any; | ||
@@ -17,0 +12,0 @@ export interface findInTreeOpts { |
@@ -30,9 +30,22 @@ export function fakeRenderComponent(fun, customHooks = {}) { | ||
export function wrapReactType(node, prop = 'type') { | ||
return (node[prop] = { ...node[prop] }); | ||
if (node[prop]?.__DECKY_WRAPPED) { | ||
return node[prop]; | ||
} | ||
else { | ||
return (node[prop] = { ...node[prop], __DECKY_WRAPPED: true }); | ||
} | ||
} | ||
export function wrapReactClass(node, prop = 'type') { | ||
const cls = node[prop]; | ||
const wrappedCls = class extends cls { | ||
}; | ||
return (node[prop] = wrappedCls); | ||
var _a; | ||
if (node[prop]?.__DECKY_WRAPPED) { | ||
return node[prop]; | ||
} | ||
else { | ||
const cls = node[prop]; | ||
const wrappedCls = (_a = class extends cls { | ||
}, | ||
_a.__DECKY_WRAPPED = true, | ||
_a); | ||
return (node[prop] = wrappedCls); | ||
} | ||
} | ||
@@ -39,0 +52,0 @@ export function getReactInstance(o) { |
{ | ||
"name": "decky-frontend-lib", | ||
"version": "3.21.6", | ||
"version": "3.21.7", | ||
"description": "A library for building decky plugins", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -49,9 +49,17 @@ import * as React from 'react'; | ||
export function wrapReactType(node: any, prop: any = 'type') { | ||
return (node[prop] = { ...node[prop] }); | ||
if (node[prop]?.__DECKY_WRAPPED) { | ||
return node[prop]; | ||
} else { | ||
return (node[prop] = { ...node[prop], __DECKY_WRAPPED: true }); | ||
} | ||
} | ||
export function wrapReactClass(node: any, prop: any = 'type') { | ||
const cls = node[prop]; | ||
const wrappedCls = class extends cls {}; | ||
return (node[prop] = wrappedCls); | ||
if (node[prop]?.__DECKY_WRAPPED) { | ||
return node[prop]; | ||
} else { | ||
const cls = node[prop]; | ||
const wrappedCls = class extends cls { static __DECKY_WRAPPED = true; }; | ||
return (node[prop] = wrappedCls); | ||
} | ||
} | ||
@@ -58,0 +66,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
222059
5340