From d1c2f138ec3873a010e3b8e41605222570c4a20c Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 09:10:26 +0000 Subject: [PATCH] fix: allow module import without a DOM (Node/SSR) so calculate() works MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The module ran document.createElement() at the top level and extended HTMLElement / called customElements.define() unconditionally, so importing it threw 'ReferenceError: document is not defined' in any non-browser environment. This broke the exported calculate() function — documented as 'no DOM required' — for Node consumers and crashed server-side rendering (Next.js/Astro/etc.) at build time. - Build the