diff --git a/app/web/src/nova/ed/panel/main/main.tsx b/app/web/src/nova/ed/panel/main/main.tsx index 0b85b068..530d10a2 100644 --- a/app/web/src/nova/ed/panel/main/main.tsx +++ b/app/web/src/nova/ed/panel/main/main.tsx @@ -21,6 +21,13 @@ export const EdMain = () => { return ""; }; + if (w.prasiContext) { + w.prasiContext.renderEditor = () => { + active.should_render_main = true; + p.render(); + }; + } + let meta: undefined | IMeta = undefined; if (active.comp_id) { 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 5e82fda9..c9bb6a6d 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 @@ -30,8 +30,13 @@ export const declareScope = (p: PG, meta: IMeta, monaco: Monaco) => { } } - const vars: Record = - {}; + const vars: Record< + string, + { + mode: "local" | "prop" | "type"; + val: string; + } + > = {}; let m_prev = null; const comp_types = {} as Record; diff --git a/app/web/src/utils/types/general.ts b/app/web/src/utils/types/general.ts index 7e1961c1..6e67d324 100644 --- a/app/web/src/utils/types/general.ts +++ b/app/web/src/utils/types/general.ts @@ -28,6 +28,7 @@ export const w = window as unknown as { navigateOverride: (s: string) => string; isDesktop: boolean; prasiApi: Record; + prasiContext: { render: () => void; renderEditor: () => void }; loadedFonts: string[]; prasiApiDbPull: boolean; mobile?: any;