diff --git a/src/plugin-ui/index.html b/src/plugin-ui/index.html index 698de1c..4df37a1 100644 --- a/src/plugin-ui/index.html +++ b/src/plugin-ui/index.html @@ -4,9 +4,62 @@ Prism Spectrum + +
+
Loading Prism plugin UI...
diff --git a/src/plugin-ui/main.tsx b/src/plugin-ui/main.tsx index 4cf470f..4577d45 100644 --- a/src/plugin-ui/main.tsx +++ b/src/plugin-ui/main.tsx @@ -210,4 +210,13 @@ if (!rootElement) { throw new Error('Missing #root element') } -createRoot(rootElement).render({buildApp()}) +try { + createRoot(rootElement).render({buildApp()}) + document.documentElement.classList.add('prism-plugin-mounted') +} catch (error) { + const reporter = (window as unknown as { + __PRISM_PLUGIN_ERROR__?: (message: string) => void + }).__PRISM_PLUGIN_ERROR__ + reporter?.(error instanceof Error ? error.message : String(error)) + throw error +}