Skip to content

CanvasAnvil is an open source AI diagram maker and flowchart generator - an infinite-canvas diagram editor and self-hosted drawio alternative that writes editable .drawio files. Text to diagram, then fix nodes, layout and labels in place. Also AI presentations, interior design CAD/BOM, posters and infographics.

1.9 KB
Raw Blame
<!doctype html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/favicon.svg?v=CanvasAnvil" />
    <link rel="shortcut icon" href="/favicon.svg?v=CanvasAnvil" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>CanvasAnvil</title>
    <!-- Runs before first paint so a dark-theme user never sees an ivory
         flash, and so `lang` matches the interface language from the start
         (it picks the CJK glyph forms and the screen-reader voice). Kept in
         sync with client/shared/theme.ts and client/shared/i18n/language.ts. -->
    <script>
      (function () {
        try {
          var stored = localStorage.getItem('CanvasAnvil-theme-v1');
          if (stored !== 'light' && stored !== 'dark' && stored !== 'system') {
            var legacy = localStorage.getItem('next-ai-draw-io-dark-mode');
            stored = legacy === 'true' ? 'dark' : legacy === 'false' ? 'light' : 'system';
          }
          var dark =
            stored === 'dark' ||
            (stored === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches);
          document.documentElement.classList.toggle('dark', dark);
          document.documentElement.lang =
            localStorage.getItem('CanvasAnvil-ui-lang-v1') === 'en' ? 'en' : 'zh-CN';
        } catch (e) {
          /* Blocked storage just means we fall through to the light default. */
        }
      })();
    </script>
    <script type="module">
      if (import.meta.hot?.on) {
        import.meta.hot.on('vite:error', (error) => {
          if (error.err) {
            console.error(
              [error.err.message, error.err.frame].filter(Boolean).join('\n'),
            )
          }
        })
      }
    </script>
  </head>
  <body>
    <div id="root"></div>
    <script type="module" src="/client/main.tsx"></script>
  </body>
</html>