diff --git a/app/web/src/nova/ed/panel/popup/script/scope/scope.tsx b/app/web/src/nova/ed/panel/popup/script/scope/scope.tsx index 4f62a091..3a10bc38 100644 --- a/app/web/src/nova/ed/panel/popup/script/scope/scope.tsx +++ b/app/web/src/nova/ed/panel/popup/script/scope/scope.tsx @@ -85,11 +85,19 @@ export const declareScope = (p: PG, meta: IMeta, monaco: Monaco) => { if (comp && comp.typings) { try { - const fn = new Function(`\ + const arg = { + ...exports, + params, + }; + + const fn = new Function( + ...Object.keys(arg), + `\ ${comp.typings}; return typings; -`); - const result = fn(); +` + ); + const result = fn(...Object.values(arg)); if (typeof result === "object" && typeof result._raw === "object") { for (const [k, v] of Object.entries(result._raw) as any) { comp_types[k] = v; diff --git a/app/web/src/nova/ed/panel/side/prop-master.tsx b/app/web/src/nova/ed/panel/side/prop-master.tsx index a6b06640..dd882ab1 100644 --- a/app/web/src/nova/ed/panel/side/prop-master.tsx +++ b/app/web/src/nova/ed/panel/side/prop-master.tsx @@ -322,7 +322,6 @@ const treeClasses = { placeholder: "placeholder", draggingSource: css` background: #e4f0ff; - cursor: not-allowed; `, };