Files
olivv-cs-ComfyUI-FunPack/app/composer/composer.js
T
digital-garbage 58193d3f21 composer: the internals, provable with no elements defined
register/zlayer/anchor/motion/density are pure cores over plain data, so most of
the suite runs with no DOM at all; jsdom covers only what is genuinely DOM.
100 tests, zero elements.

These five are why v4 had 11 hand-built modals and 7 hand-built popovers: there
was nothing shared to reuse. register makes an element exist only because a file
defined it; portal gives every overlay one stacking parent; zlayer owns the only
z-index in the app; dismiss keeps one stack so Escape pops the top and not the
modal underneath; anchor measures, flips and clamps once.

Three bugs the tests found: unmount() called removeChild on null when no portal
existed yet, focusables() checked aria-hidden on the element instead of its
ancestors so a hidden subtree stayed tab-reachable, and the density ratios v4
hand-tuned are now derived from the gap they were meant to allow for.
2026-08-28 15:03:19 +03:00

17 lines
713 B
JavaScript

// The kit's public surface.
//
// A module receives exactly this and nothing else: element factories, reached by
// name. There is no handle here to el(), to document, or to any internal -- which
// is what makes "a module never styles anything" a fact about the code rather
// than a rule people are asked to remember.
import "./elements/index.js"; // elements register themselves on import
import { composer } from "./internals/register.js";
export { composer };
export default composer;
// Re-exported for the shell and the catalogue, which legitimately need to know
// what registered. Modules never import this file directly.
export { entries, has, UnknownElement } from "./internals/register.js";