/** * Global scoping for component code. * * This module decides WHICH global names are visible to a component's script * and expression code, and under what names. It is a *scoping convenience* — * injecting these as function parameters is what lets component code read like * plain JS (`fetch(...)` instead of `window.fetch(...)`). * * IT IS NOT A SECURITY BOUNDARY. Component scripts run with full access to the * page (window, document, fetch, …) — see the "Security & Trust Model" section * of the README and docs/22-csp-and-security.md. Component HTML is trusted * code, exactly like a `.js` file you import. Do not rely on the lists below * to run untrusted component files. * * (This file was previously named `sandbox.ts`, which invited exactly the * wrong reading. The name was changed; the behaviour was not.) */ /** * Globals injected into component scope as function parameters, with their * real values. * * Since SHADOWED_GLOBALS is empty, most browser APIs would already be reachable * via the normal global scope chain. This list exists so the common ones * resolve as bare identifiers without a `window.` prefix. */ export declare const INJECTED_GLOBALS: readonly string[]; /** * Global names shadowed with `undefined` in component scope. * * This once blocked many browser APIs (fetch, setTimeout, …), which was too * restrictive — component code is your own application code and should have * full access to JS. It is intentionally empty. * * NOTE: this is a scoping list, not a security control. A name omitted here is * not "allowed" by a trust boundary; there is no trust boundary. Shadowing a * name only stops accidental use, never deliberate use (`globalThis.x` still * resolves). */ export declare const SHADOWED_GLOBALS: readonly never[]; export declare const RESERVED_WORDS: Set; /** * Framework helper names that are injected into component scripts. * These use the $ prefix convention */ export declare const FRAMEWORK_HELPERS: readonly string[];