@liquid-glass-forge/dom 0.0.0-stage → 0.1.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nami Poursafargholi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/NOTICE ADDED
@@ -0,0 +1,7 @@
1
+ Liquid Glass Forge
2
+ Copyright (c) 2026 Nami Poursafargholi. MIT licensed.
3
+
4
+ Independent implementation inspired by Apple's Liquid Glass design.
5
+ Not affiliated with, sponsored by or endorsed by Apple Inc.
6
+ Apple and its design/assets remain subject to their respective rights.
7
+ No Apple assets or upstream Liquid Glass/Sileo implementation is included.
package/README.md CHANGED
@@ -1,3 +1,48 @@
1
- # Temporary Holding Version
1
+ # Liquid Glass Forge DOM sources
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Experimental preview. API and device/performance qualification remain open; iPad is unqualified.
4
+
5
+ Experimental preview `0.1.0-rc.1` sources, coordinate mapping and vanilla host/lifecycle.
6
+ Requires exact matching core/CPU package versions. ESM and TypeScript
7
+ declarations are included; imports are SSR-safe and start no timers or network.
8
+
9
+ ```ts
10
+ import { SourceProvider, mapSourceRegion, createGlassScene } from '@liquid-glass-forge/dom';
11
+ const p = new SourceProvider({ kind: 'pixels', width: 1, height: 1,
12
+ data: new Uint8Array([255, 0, 0, 255]) });
13
+ const snapshot = await p.read(); // independent, owned straight-sRGB RGBA8 bytes
14
+ p.destroy();
15
+ ```
16
+
17
+ Sources: explicit bytes, sRGB ImageData, borrowed ImageBitmap, decoded URL image,
18
+ readable canvas/OffscreenCanvas, or borrowed HTMLVideoElement. Inputs remain
19
+ caller-owned. Reads have bounded cancellation and latest-generation semantics.
20
+ For explicit bytes or sRGB ImageData, `readInto(target)` copies every pixel into
21
+ an attached caller-owned RGBA8 view of the exact size. It returns borrowed
22
+ metadata and never transfers or retains the target; source/target aliasing is
23
+ rejected. Reuse the target only after consumers have captured or finished it.
24
+ The ordinary `read()` continues to return a fresh owned snapshot.
25
+ Canvas drawing needs explicit invalidation; video subscription can observe frame
26
+ revisions through a cancellable frame callback or bounded event/timer fallback.
27
+
28
+ `mapSourceRegion` maps explicit viewport rectangles, object fit/position,
29
+ source-pixel padding, clipping, DPR and positive axis scale/translation. It returns
30
+ typed invalid/empty/unsupported results. Preserve sample/crop/output offsets;
31
+ it does not parse arbitrary CSS or capture DOM.
32
+
33
+ See the repository [source contract](https://github.com/namipsg/liquid-glass-forge/blob/main/docs/SOURCES.md)
34
+ for full API semantics and limits. `createGlassScene()` mounts CSS/opaque material with bounded lifecycle and shared
35
+ dirty/visibility scheduling. Load the `./styles.css` asset export; JavaScript imports
36
+ inject no styles. `scene.attach(element)`, `ready`, `update`, `pause`, `resume` and
37
+ `dispose` preserve native content and release owned resources. The optional
38
+ source/renderer pair is a low-level adapter seam; `createCpuRenderer` supplies
39
+ JavaScript CPU optics with optional workers, capped backing resolution and
40
+ cancellable update pacing. See the project Phase 5 document for usage and
41
+ source-bound performance/device qualification. A `surface(request)` callback
42
+ can supply per-request radius, bevel and strength; values are validated and
43
+ captured before asynchronous work. Diagnostics report effective optics, actual
44
+ execution start, rate wait and presentation pacing. Active completion pacing is
45
+ included in the documented service measurements; idle hosts schedule no work.
46
+ See the [host contract](https://github.com/namipsg/liquid-glass-forge/blob/main/docs/HOSTS.md).
47
+ Framework adapters and public browser-support tiers are outside this package.
48
+ Performance claims are limited to the repository's measured workload/environment.
package/dist/cpu.d.ts ADDED
@@ -0,0 +1,85 @@
1
+ import type { SourceRect } from '@liquid-glass-forge/core';
2
+ import type { CpuEffects, CpuExecutorOptions, CpuTimings } from '@liquid-glass-forge/cpu';
3
+ import type { FramePixels, GlassRenderer, RenderRequest } from './scene.js';
4
+ export interface CpuSurfaceOptions {
5
+ readonly radius?: number;
6
+ readonly bevel?: number;
7
+ readonly strength?: number;
8
+ }
9
+ export interface CpuRendererOptions {
10
+ readonly executor?: CpuExecutorOptions;
11
+ /** Distances are measured in effective output backing pixels. */
12
+ readonly surface?: CpuSurfaceOptions | ((request: RenderRequest) => CpuSurfaceOptions);
13
+ readonly effects?: CpuEffects;
14
+ /** Omitted means sample the complete source. */
15
+ readonly sourceRect?: SourceRect | ((request: RenderRequest) => SourceRect);
16
+ readonly quality?: {
17
+ readonly maxPixels?: number;
18
+ readonly maxWidth?: number;
19
+ readonly maxHeight?: number;
20
+ readonly maxUpdatesPerSecond?: number;
21
+ readonly maxSourcePixels?: number;
22
+ };
23
+ }
24
+ /** One scene owns this adapter. Initialization owns resources; construction only snapshots data. */
25
+ export declare class CpuRenderer implements GlassRenderer {
26
+ #private;
27
+ constructor(options?: CpuRendererOptions);
28
+ private executorDiagnostics;
29
+ get diagnostics(): Readonly<{
30
+ backend: 'cpu';
31
+ execution: "main" | "worker";
32
+ disposed: boolean;
33
+ initialized: boolean;
34
+ requested: Readonly<{
35
+ width: number;
36
+ height: number;
37
+ }> | undefined;
38
+ effective: Readonly<{
39
+ width: number;
40
+ height: number;
41
+ }> | undefined;
42
+ requestedWidth: number | undefined;
43
+ requestedHeight: number | undefined;
44
+ effectiveWidth: number | undefined;
45
+ effectiveHeight: number | undefined;
46
+ qualityReduced: boolean;
47
+ reasons: readonly string[];
48
+ quality: Required<{
49
+ readonly maxPixels?: number;
50
+ readonly maxWidth?: number;
51
+ readonly maxHeight?: number;
52
+ readonly maxUpdatesPerSecond?: number;
53
+ readonly maxSourcePixels?: number;
54
+ }>;
55
+ timings: (CpuTimings & {
56
+ readonly captureMs: number;
57
+ readonly rateWaitMs: number;
58
+ readonly presentationWaitMs: number;
59
+ }) | undefined;
60
+ surface: Readonly<Required<CpuSurfaceOptions>> | undefined;
61
+ executor: Readonly<{
62
+ execution: "main" | "worker";
63
+ inFlight: 0 | 1;
64
+ pending: 0 | 1;
65
+ mainCachedBytes: number;
66
+ workerCachedBytes: number;
67
+ sharedKernelBytes: number;
68
+ fixedKernelReservationBytes: number;
69
+ pooledBytes: number;
70
+ inputPooledBytes: number;
71
+ inputPooledBuffers: number;
72
+ leasedBytes: number;
73
+ reservedBytes: number;
74
+ lostBytes: number;
75
+ completedBatches: number;
76
+ discardedBatches: number;
77
+ disposed: boolean;
78
+ fallbackReason?: string;
79
+ }> | undefined;
80
+ }>;
81
+ initialize(signal: AbortSignal): () => void;
82
+ render(request: RenderRequest, signal: AbortSignal): Promise<FramePixels>;
83
+ dispose(): void;
84
+ }
85
+ export declare function createCpuRenderer(options?: CpuRendererOptions): CpuRenderer;
package/dist/cpu.js ADDED
@@ -0,0 +1,236 @@
1
+ import { createFrame, MAX_PIXELS, validateSource } from '@liquid-glass-forge/core';
2
+ import { CpuError, CpuExecutor, CpuDeadlineScheduler, snapshotCpuEffects } from '@liquid-glass-forge/cpu';
3
+ function object(input, keys, name) {
4
+ if (!input || typeof input !== 'object' || Array.isArray(input) || Reflect.ownKeys(input).some(k => typeof k !== 'string' || !keys.includes(k))) {
5
+ throw new CpuError('INVALID_OPTIONS', `Invalid ${name}`);
6
+ }
7
+ }
8
+ function finite(value, low, high, name) {
9
+ if (!Number.isFinite(value) || value < low || value > high)
10
+ throw new CpuError('INVALID_OPTIONS', `Invalid ${name}`);
11
+ }
12
+ function sourceRect(input) {
13
+ object(input, ['x', 'y', 'width', 'height'], 'sourceRect');
14
+ finite(input.x, 0, MAX_PIXELS, 'sourceRect.x');
15
+ finite(input.y, 0, MAX_PIXELS, 'sourceRect.y');
16
+ finite(input.width, Number.MIN_VALUE, MAX_PIXELS, 'sourceRect.width');
17
+ finite(input.height, Number.MIN_VALUE, MAX_PIXELS, 'sourceRect.height');
18
+ return Object.freeze({ x: input.x, y: input.y, width: input.width, height: input.height });
19
+ }
20
+ function surfaceOptions(input) {
21
+ object(input, ['radius', 'bevel', 'strength'], 'surface');
22
+ if ('then' in input)
23
+ throw new CpuError('INVALID_OPTIONS', 'Surface options must be synchronous data');
24
+ if (input.radius !== undefined)
25
+ finite(input.radius, 0, 1_000_000, 'radius');
26
+ if (input.bevel !== undefined)
27
+ finite(input.bevel, Number.MIN_VALUE, 1_000_000, 'bevel');
28
+ if (input.strength !== undefined)
29
+ finite(input.strength, 0, 1_000_000, 'strength');
30
+ return Object.freeze({ ...input });
31
+ }
32
+ /** Floor after uniform scaling, then account for min-one rounding on very thin surfaces. */
33
+ function boundedSize(width, height, q) {
34
+ const scale = Math.min(1, q.maxWidth / width, q.maxHeight / height, Math.sqrt(q.maxPixels / width / height));
35
+ let w = Math.max(1, Math.floor(width * scale)), h = Math.max(1, Math.floor(height * scale));
36
+ if (w * h > q.maxPixels) {
37
+ if (w >= h)
38
+ w = Math.max(1, Math.floor(q.maxPixels / h));
39
+ else
40
+ h = Math.max(1, Math.floor(q.maxPixels / w));
41
+ }
42
+ return Object.freeze({ width: w, height: h });
43
+ }
44
+ /** One scene owns this adapter. Initialization owns resources; construction only snapshots data. */
45
+ export class CpuRenderer {
46
+ #executorOptions;
47
+ #surface;
48
+ #lastSurface;
49
+ #effects;
50
+ #sourceRect;
51
+ #quality;
52
+ #executor;
53
+ #pacer;
54
+ #cleanup;
55
+ #disposed = false;
56
+ #generation = 0;
57
+ #revision = 0;
58
+ #job;
59
+ #lastStart;
60
+ #lastReady;
61
+ #requested;
62
+ #effective;
63
+ #reasons = Object.freeze([]);
64
+ #timings;
65
+ #lastExecutor;
66
+ constructor(options = {}) {
67
+ object(options, ['executor', 'surface', 'effects', 'sourceRect', 'quality'], 'CPU renderer options');
68
+ const executor = options.executor === undefined ? {} : options.executor;
69
+ object(executor, ['cacheSources', 'worker', 'workerFactory', 'timeoutMs', 'maxPoolBytes', 'maxOwnedBytes'], 'executor options');
70
+ // CpuExecutor construction itself is data-only and is the canonical validator.
71
+ new CpuExecutor(executor);
72
+ this.#executorOptions = Object.freeze({ cacheSources: true, ...executor });
73
+ const surface = options.surface === undefined ? {} : options.surface;
74
+ this.#surface = typeof surface === 'function' ? surface : surfaceOptions(surface);
75
+ this.#effects = snapshotCpuEffects(options.effects);
76
+ this.#sourceRect = typeof options.sourceRect === 'function' || options.sourceRect === undefined ? options.sourceRect : sourceRect(options.sourceRect);
77
+ const quality = options.quality === undefined ? {} : options.quality;
78
+ object(quality, ['maxPixels', 'maxWidth', 'maxHeight', 'maxUpdatesPerSecond', 'maxSourcePixels'], 'quality');
79
+ const q = { maxPixels: quality.maxPixels === undefined ? 57600 : quality.maxPixels,
80
+ maxWidth: quality.maxWidth === undefined ? 320 : quality.maxWidth, maxHeight: quality.maxHeight === undefined ? 180 : quality.maxHeight,
81
+ maxUpdatesPerSecond: quality.maxUpdatesPerSecond === undefined ? 30 : quality.maxUpdatesPerSecond,
82
+ maxSourcePixels: quality.maxSourcePixels === undefined ? 230400 : quality.maxSourcePixels };
83
+ for (const key of ['maxPixels', 'maxWidth', 'maxHeight', 'maxSourcePixels']) {
84
+ finite(q[key], 1, MAX_PIXELS, key);
85
+ if (!Number.isSafeInteger(q[key]))
86
+ throw new CpuError('INVALID_OPTIONS', `${key} must be an integer`);
87
+ }
88
+ finite(q.maxUpdatesPerSecond, 1, 30, 'maxUpdatesPerSecond');
89
+ this.#quality = Object.freeze(q);
90
+ }
91
+ executorDiagnostics() { return this.#executor.diagnostics; }
92
+ get diagnostics() {
93
+ const executor = this.#executor?.diagnostics ?? this.#lastExecutor;
94
+ return Object.freeze({ backend: 'cpu', execution: executor?.execution ?? 'main', disposed: this.#disposed,
95
+ initialized: !!this.#executor, requested: this.#requested, effective: this.#effective,
96
+ requestedWidth: this.#requested?.width, requestedHeight: this.#requested?.height,
97
+ effectiveWidth: this.#effective?.width, effectiveHeight: this.#effective?.height,
98
+ qualityReduced: this.#reasons.length > 0, reasons: this.#reasons, quality: this.#quality,
99
+ timings: this.#timings, surface: this.#lastSurface, executor });
100
+ }
101
+ initialize(signal) {
102
+ if (this.#disposed)
103
+ throw new CpuError('DISPOSED', 'CPU renderer disposed');
104
+ if (signal.aborted)
105
+ throw new CpuError('ABORTED', 'CPU renderer initialization aborted');
106
+ this.#cleanup?.();
107
+ const executor = new CpuExecutor(this.#executorOptions), pacer = new CpuDeadlineScheduler(), generation = ++this.#generation;
108
+ this.#executor = executor;
109
+ this.#pacer = pacer;
110
+ this.#lastStart = undefined;
111
+ this.#lastReady = undefined;
112
+ let cleaned = false;
113
+ const cleanup = () => {
114
+ if (cleaned)
115
+ return;
116
+ cleaned = true;
117
+ signal.removeEventListener('abort', cleanup);
118
+ if (generation === this.#generation && this.#executor === executor) {
119
+ this.#generation++;
120
+ this.#job?.abort(new CpuError('ABORTED', 'CPU renderer initialization ended'));
121
+ this.#job = undefined;
122
+ this.#executor = undefined;
123
+ this.#pacer = undefined;
124
+ this.#cleanup = undefined;
125
+ this.#lastReady = undefined;
126
+ }
127
+ executor.dispose();
128
+ pacer.dispose();
129
+ this.#lastExecutor = executor.diagnostics;
130
+ };
131
+ this.#cleanup = cleanup;
132
+ signal.addEventListener('abort', cleanup, { once: true });
133
+ if (signal.aborted)
134
+ cleanup();
135
+ return cleanup;
136
+ }
137
+ async render(request, signal) {
138
+ if (this.#disposed)
139
+ throw new CpuError('DISPOSED', 'CPU renderer disposed');
140
+ const executor = this.#executor, pacer = this.#pacer, generation = this.#generation;
141
+ if (!executor || !pacer)
142
+ throw new CpuError('NOT_INITIALIZED', 'Initialize CPU renderer before rendering');
143
+ this.#job?.abort(new CpuError('SUPERSEDED', 'CPU render superseded'));
144
+ const controller = new AbortController();
145
+ this.#job = controller;
146
+ const abort = () => controller.abort(new CpuError('ABORTED', 'CPU render aborted'));
147
+ signal.addEventListener('abort', abort, { once: true });
148
+ if (signal.aborted)
149
+ abort();
150
+ const current = () => {
151
+ if (controller.signal.aborted)
152
+ throw controller.signal.reason;
153
+ if (this.#disposed || generation !== this.#generation || executor !== this.#executor || this.#job !== controller)
154
+ throw new CpuError('STALE', 'CPU render no longer current');
155
+ };
156
+ try {
157
+ current();
158
+ if (!request || !Number.isSafeInteger(request.width) || !Number.isSafeInteger(request.height) || request.width < 1 || request.height < 1)
159
+ throw new CpuError('INVALID_OPTIONS', 'Invalid requested CPU dimensions');
160
+ validateSource(request.snapshot.source);
161
+ const source = request.snapshot.source;
162
+ if (source.width * source.height > this.#quality.maxSourcePixels)
163
+ throw new CpuError('SOURCE_LIMIT', 'CPU source exceeds maxSourcePixels');
164
+ const size = boundedSize(request.width, request.height, this.#quality), reasons = [];
165
+ if (request.width > this.#quality.maxWidth)
166
+ reasons.push('maxWidth');
167
+ if (request.height > this.#quality.maxHeight)
168
+ reasons.push('maxHeight');
169
+ if (request.width * request.height > this.#quality.maxPixels)
170
+ reasons.push('maxPixels');
171
+ const rect = typeof this.#sourceRect === 'function' ? sourceRect(this.#sourceRect(request)) : this.#sourceRect;
172
+ const surface = typeof this.#surface === 'function' ? surfaceOptions(this.#surface(request)) : this.#surface;
173
+ if (this.#revision === Number.MAX_SAFE_INTEGER)
174
+ throw new CpuError('INVALID_OPTIONS', 'CPU renderer revision exhausted');
175
+ const frame = createFrame({ contractVersion: 1, generation: request.snapshot.generation, revision: ++this.#revision, sourceRevision: source.revision,
176
+ surfaces: [{ id: 'cpu', ...size, ...surface, ...(rect === undefined ? {} : { sourceRect: rect }) }] }, source);
177
+ const effectiveSurface = frame.surfaces[0];
178
+ this.#lastSurface = Object.freeze({ radius: effectiveSurface.radius, bevel: effectiveSurface.bevel, strength: effectiveSurface.strength });
179
+ this.#requested = Object.freeze({ width: request.width, height: request.height });
180
+ this.#effective = size;
181
+ const period = 1000 / this.#quality.maxUpdatesPerSecond;
182
+ // Reserve measured computation time before the next presentation. Fast
183
+ // kernels should wait before execution instead of spending a whole frame
184
+ // in presentation smoothing. Source capture and cancellation stay owned.
185
+ const computeMargin = Math.min(period, Math.max(4, (this.#timings?.roundTripMs ?? 0) * 1.25 + 1));
186
+ const notBefore = this.#lastStart === undefined ? 0 : Math.max(this.#lastStart + period, (this.#lastReady ?? 0) + period - computeMargin);
187
+ const paceOutput = this.#lastStart !== undefined && performance.now() - this.#lastStart < 2000 / this.#quality.maxUpdatesPerSecond;
188
+ current();
189
+ this.#reasons = Object.freeze([...reasons]);
190
+ // The executor captures owned bytes synchronously before its deferred start.
191
+ // This avoids a second adapter snapshot during a rate wait.
192
+ const pending = executor.render(source, frame, {
193
+ ...(this.#effects === undefined ? {} : { effects: this.#effects }), signal: controller.signal, notBefore,
194
+ onStart: startedAt => { current(); this.#lastStart = startedAt; }
195
+ });
196
+ const batch = await pending;
197
+ try {
198
+ current();
199
+ // Keep completion cadence without an unconditional execution-relative
200
+ // delay. The next execution already reserves its measured compute time.
201
+ const presentationWaitMs = paceOutput && this.#lastReady !== undefined
202
+ ? await pacer.waitUntil(this.#lastReady + period, controller.signal) : 0;
203
+ current();
204
+ const output = batch.surfaces[0], rateWaitMs = batch.timings.scheduledWaitMs ?? 0;
205
+ if (rateWaitMs > 0 || presentationWaitMs > 0)
206
+ reasons.push('maxUpdatesPerSecond');
207
+ this.#reasons = Object.freeze(reasons);
208
+ this.#timings = Object.freeze({ ...batch.timings, captureMs: 0, rateWaitMs, presentationWaitMs });
209
+ this.#lastReady = performance.now();
210
+ return Object.freeze({ width: output.width, height: output.height, data: output.data, release: () => {
211
+ batch.release();
212
+ if (this.#executor !== executor && this.#generation === generation + 1)
213
+ this.#lastExecutor = executor.diagnostics;
214
+ } });
215
+ }
216
+ catch (cause) {
217
+ batch.release();
218
+ if (this.#executor !== executor && this.#generation === generation + 1)
219
+ this.#lastExecutor = executor.diagnostics;
220
+ throw cause;
221
+ }
222
+ }
223
+ finally {
224
+ signal.removeEventListener('abort', abort);
225
+ if (this.#job === controller)
226
+ this.#job = undefined;
227
+ }
228
+ }
229
+ dispose() {
230
+ if (this.#disposed)
231
+ return;
232
+ this.#disposed = true;
233
+ this.#cleanup?.();
234
+ }
235
+ }
236
+ export function createCpuRenderer(options = {}) { return new CpuRenderer(options); }
package/dist/host.d.ts ADDED
@@ -0,0 +1,41 @@
1
+ import { type PixelBytes } from '@liquid-glass-forge/core';
2
+ export type GlassMaterial = 'glass' | 'opaque';
3
+ export interface HostPixels {
4
+ readonly width: number;
5
+ readonly height: number;
6
+ readonly data: PixelBytes;
7
+ }
8
+ export interface HostCanvas {
9
+ readonly width: number;
10
+ readonly height: number;
11
+ readonly canvas: HTMLCanvasElement;
12
+ }
13
+ export interface HostPresented {
14
+ readonly width: number;
15
+ readonly height: number;
16
+ readonly presentedTarget: HTMLCanvasElement;
17
+ }
18
+ export type HostFrame = HostPixels | HostCanvas | HostPresented;
19
+ export interface GlassHostOptions {
20
+ readonly target?: HTMLCanvasElement;
21
+ readonly material?: GlassMaterial;
22
+ }
23
+ export interface GlassHost {
24
+ readonly element: HTMLElement;
25
+ readonly target: HTMLCanvasElement;
26
+ measure(): Readonly<{
27
+ width: number;
28
+ height: number;
29
+ }>;
30
+ setMaterial(material: GlassMaterial): void;
31
+ prepareCanvas(width: number, height: number): HTMLCanvasElement;
32
+ present(pixels: HostFrame): void;
33
+ clear(): void;
34
+ dispose(): void;
35
+ }
36
+ export declare class HostError extends Error {
37
+ readonly code: 'INVALID_HOST' | 'INVALID_PIXELS' | 'UNAVAILABLE_HOST' | 'DISPOSED';
38
+ constructor(code: 'INVALID_HOST' | 'INVALID_PIXELS' | 'UNAVAILABLE_HOST' | 'DISPOSED', message: string, options?: ErrorOptions);
39
+ }
40
+ /** Own only a decorative target and explicitly touched host styles. Never move semantic children. */
41
+ export declare function mountGlassHost(element: HTMLElement, options?: GlassHostOptions): GlassHost;