This commit is contained in:
Rizky 2024-06-24 16:55:31 +07:00
parent 526efe15fe
commit 964f0fe8ba
3 changed files with 15 additions and 2 deletions

View File

@ -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) {

View File

@ -30,8 +30,13 @@ export const declareScope = (p: PG, meta: IMeta, monaco: Monaco) => {
}
}
const vars: Record<string, { mode: "local" | "prop" | "type"; val: string }> =
{};
const vars: Record<
string,
{
mode: "local" | "prop" | "type";
val: string;
}
> = {};
let m_prev = null;
const comp_types = {} as Record<string, string>;

View File

@ -28,6 +28,7 @@ export const w = window as unknown as {
navigateOverride: (s: string) => string;
isDesktop: boolean;
prasiApi: Record<string, PrasiAPI>;
prasiContext: { render: () => void; renderEditor: () => void };
loadedFonts: string[];
prasiApiDbPull: boolean;
mobile?: any;