@druid-ui/host 1.0.0-next.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/dist/ui.js ADDED
@@ -0,0 +1,571 @@
1
+ import {init as $k5Hkl$init, classModule as $k5Hkl$classModule, propsModule as $k5Hkl$propsModule, styleModule as $k5Hkl$styleModule, eventListenersModule as $k5Hkl$eventListenersModule, h as $k5Hkl$h} from "snabbdom";
2
+ import $k5Hkl$hyperid from "hyperid";
3
+
4
+
5
+ function $parcel$export(e, n, v, s) {
6
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
7
+ }
8
+ // Re-export everything for easy access
9
+ var $7ecf692fb720ca8d$exports = {};
10
+
11
+ $parcel$export($7ecf692fb720ca8d$exports, "log", () => $7ecf692fb720ca8d$export$bef1f36f5486a6a3);
12
+ $parcel$export($7ecf692fb720ca8d$exports, "DruidUI", () => $7ecf692fb720ca8d$export$6874335aa33ac2fe);
13
+ var $4195f124d99f64a1$exports = {};
14
+
15
+ $parcel$export($4195f124d99f64a1$exports, "HttpFileLoader", () => $4195f124d99f64a1$export$c104e8094d57b0fc);
16
+ class $4195f124d99f64a1$export$c104e8094d57b0fc {
17
+ constructor(baseUrl, authOptions, defaultHeaders){
18
+ this.baseUrl = baseUrl;
19
+ this.authOptions = authOptions;
20
+ this.defaultHeaders = defaultHeaders;
21
+ }
22
+ async loadHttp(path, options) {
23
+ const headers = {
24
+ ...this.defaultHeaders,
25
+ ...options?.headers
26
+ };
27
+ // Use instance auth options if no options provided, or merge with provided options
28
+ const authToUse = options?.auth || this.authOptions;
29
+ // Add authentication headers
30
+ if (authToUse) switch(authToUse.type){
31
+ case "bearer":
32
+ if (authToUse.token) headers["Authorization"] = `Bearer ${authToUse.token}`;
33
+ break;
34
+ case "basic":
35
+ if (authToUse.username && authToUse.password) {
36
+ const credentials = btoa(`${authToUse.username}:${authToUse.password}`);
37
+ headers["Authorization"] = `Basic ${credentials}`;
38
+ }
39
+ break;
40
+ case "api-key":
41
+ if (authToUse.apiKey) {
42
+ const headerName = authToUse.apiKeyHeader || "X-API-Key";
43
+ headers[headerName] = authToUse.apiKey;
44
+ }
45
+ break;
46
+ }
47
+ const res = await fetch(path, {
48
+ headers: headers,
49
+ cache: options?.cache === false ? "no-store" : "default"
50
+ });
51
+ if (!res.ok) throw new Error(`Failed to load file: ${path}, status: ${res.status}`);
52
+ // Extract all fetch-specific data
53
+ const text = await res.arrayBuffer();
54
+ const responseHeaders = {};
55
+ // Handle both real Headers object and mocked headers
56
+ if (res.headers && typeof res.headers.forEach === "function") res.headers.forEach((value, key)=>{
57
+ responseHeaders[key] = value;
58
+ });
59
+ const contentType = res.headers.get("Content-Type");
60
+ return {
61
+ buffer: text,
62
+ headers: responseHeaders,
63
+ contentType: contentType
64
+ };
65
+ }
66
+ async load(path, options) {
67
+ const filePath = this.baseUrl ? `${this.baseUrl}/${path}` : path;
68
+ const response = await this.loadHttp(filePath, options);
69
+ return response;
70
+ }
71
+ }
72
+
73
+
74
+
75
+ const $7705509af6e2b475$export$b76953f99ab2be78 = (0, $k5Hkl$init)([
76
+ // Init patch function with chosen modules
77
+ (0, $k5Hkl$classModule),
78
+ (0, $k5Hkl$propsModule),
79
+ (0, $k5Hkl$styleModule),
80
+ (0, $k5Hkl$eventListenersModule)
81
+ ]);
82
+
83
+
84
+ var $47d6f20d5f21b2bd$exports = {};
85
+
86
+ $parcel$export($47d6f20d5f21b2bd$exports, "HistoryRoutingStrategy", () => $47d6f20d5f21b2bd$export$ec331118eb897269);
87
+ $parcel$export($47d6f20d5f21b2bd$exports, "CustomRoutingStrategy", () => $47d6f20d5f21b2bd$export$943a5be802561a9a);
88
+ $parcel$export($47d6f20d5f21b2bd$exports, "createRoutingStrategy", () => $47d6f20d5f21b2bd$export$df70df7318f5f0f3);
89
+ class $47d6f20d5f21b2bd$export$ec331118eb897269 {
90
+ getCurrentPath() {
91
+ return window.location.pathname;
92
+ }
93
+ navigateTo(path) {
94
+ window.history.pushState({}, "", path);
95
+ }
96
+ }
97
+ class $47d6f20d5f21b2bd$export$943a5be802561a9a {
98
+ getCurrentPath() {
99
+ return this.currentPath;
100
+ }
101
+ navigateTo(path) {
102
+ this.currentPath = path;
103
+ }
104
+ constructor(){
105
+ this.currentPath = "/";
106
+ }
107
+ }
108
+ const $47d6f20d5f21b2bd$export$df70df7318f5f0f3 = (mode)=>{
109
+ if (mode === "custom") return new $47d6f20d5f21b2bd$export$943a5be802561a9a();
110
+ else return new $47d6f20d5f21b2bd$export$ec331118eb897269();
111
+ };
112
+
113
+
114
+ var $afa3b9af1178429b$exports = {};
115
+
116
+ $parcel$export($afa3b9af1178429b$exports, "loadTranspile", () => $afa3b9af1178429b$export$76f430ef6626d809);
117
+ const $afa3b9af1178429b$var$CACHE_KEY_PREFIX = "transpile_cache_";
118
+ // Helper functions for localStorage caching
119
+ const $afa3b9af1178429b$var$getCachedEntry = (file)=>{
120
+ try {
121
+ const cached = localStorage.getItem($afa3b9af1178429b$var$CACHE_KEY_PREFIX + file);
122
+ if (cached) return JSON.parse(cached);
123
+ } catch (e) {
124
+ console.warn("Failed to read from cache:", e);
125
+ }
126
+ return null;
127
+ };
128
+ const $afa3b9af1178429b$var$setCachedEntry = (file, entry)=>{
129
+ try {
130
+ localStorage.setItem($afa3b9af1178429b$var$CACHE_KEY_PREFIX + file, JSON.stringify(entry));
131
+ } catch (e) {
132
+ console.warn("Failed to write to cache:", e);
133
+ }
134
+ };
135
+ const $afa3b9af1178429b$var$transpileInWorker = async (buffer, name)=>{
136
+ return new Promise((resolve, reject)=>{
137
+ const worker = new Worker(new URL("transpile.worker.bc75f4c9.js", import.meta.url), {
138
+ type: "module"
139
+ });
140
+ worker.onmessage = (event)=>{
141
+ worker.terminate();
142
+ if (event.data.success) resolve(event.data.data);
143
+ else reject(new Error(event.data.error));
144
+ };
145
+ worker.onerror = (error)=>{
146
+ worker.terminate();
147
+ reject(error);
148
+ };
149
+ // Transfer the buffer ownership to the worker (zero-copy)
150
+ worker.postMessage({
151
+ buffer: buffer,
152
+ name: name
153
+ }, [
154
+ buffer
155
+ ]);
156
+ });
157
+ };
158
+ const $afa3b9af1178429b$export$76f430ef6626d809 = async (file, fileLoader)=>{
159
+ // Check cache first
160
+ const cached = $afa3b9af1178429b$var$getCachedEntry(file);
161
+ if (cached) // Verify URLs are still valid
162
+ try {
163
+ await fetch(cached.jsUrl, {
164
+ method: "HEAD"
165
+ });
166
+ return [
167
+ cached.jsUrl,
168
+ async (filename)=>{
169
+ const url = cached.fileUrls[filename];
170
+ if (!url) throw new Error(`File ${filename} not found in transpiled output.`);
171
+ const wasmResponse = await fetch(url);
172
+ const wasmBuffer = await wasmResponse.arrayBuffer();
173
+ return await WebAssembly.compile(wasmBuffer);
174
+ }
175
+ ];
176
+ } catch (e) {
177
+ // Cache is stale, proceed with transpilation
178
+ console.warn("Cached URLs are stale, re-transpiling");
179
+ }
180
+ const response = await fileLoader.load(file);
181
+ if (!response) throw new Error(`Failed to load file: ${file}`);
182
+ const files = {};
183
+ const t = await $afa3b9af1178429b$var$transpileInWorker(response.buffer, "test");
184
+ for (const file of t.files){
185
+ const [f, content] = file;
186
+ let blob = null;
187
+ if (f.endsWith(".js")) blob = new Blob([
188
+ new Uint8Array(content)
189
+ ], {
190
+ type: "application/javascript"
191
+ });
192
+ else if (f.endsWith(".wasm")) blob = new Blob([
193
+ new Uint8Array(content)
194
+ ], {
195
+ type: "application/wasm"
196
+ });
197
+ if (blob) {
198
+ const url = URL.createObjectURL(blob);
199
+ files[f] = url;
200
+ }
201
+ }
202
+ const jsFileEntry = Object.entries(files).find(([filename])=>filename.endsWith(".js"));
203
+ if (!jsFileEntry) throw new Error("No JavaScript file found in transpiled output.");
204
+ // Cache the result
205
+ const cacheEntry = {
206
+ jsUrl: jsFileEntry[1],
207
+ fileUrls: files
208
+ };
209
+ $afa3b9af1178429b$var$setCachedEntry(file, cacheEntry);
210
+ return [
211
+ jsFileEntry[1],
212
+ async (filename)=>{
213
+ const url = files[filename];
214
+ if (!url) throw new Error(`File ${filename} not found in transpiled output.`);
215
+ const wasmResponse = await fetch(url);
216
+ const wasmBuffer = await wasmResponse.arrayBuffer();
217
+ return await WebAssembly.compile(wasmBuffer);
218
+ }
219
+ ];
220
+ };
221
+
222
+
223
+
224
+
225
+ var $3f177c34ffa911f6$exports = {};
226
+
227
+ $parcel$export($3f177c34ffa911f6$exports, "Event", () => $3f177c34ffa911f6$export$d61e24a684f9e51);
228
+ class $3f177c34ffa911f6$export$d61e24a684f9e51 {
229
+ constructor(_value = "", _checked = false){
230
+ this._value = _value;
231
+ this._checked = _checked;
232
+ }
233
+ preventDefault() {}
234
+ stopPropagation() {}
235
+ value() {
236
+ return this._value;
237
+ }
238
+ checked() {
239
+ return this._checked;
240
+ }
241
+ }
242
+
243
+
244
+ const $0e97ad6bdcaa9a3e$var$nodes = new Map();
245
+ function $0e97ad6bdcaa9a3e$export$5833d9be8010042a(id, callback) {
246
+ console.debug(`Setting hook for id ${id} with callback ${callback}`);
247
+ const node = $0e97ad6bdcaa9a3e$var$nodes.get(id);
248
+ if (node) {
249
+ node.hooks = node.hooks || [];
250
+ node.hooks.push(callback);
251
+ } else console.warn(`setHook: No node found for id ${id}`);
252
+ }
253
+ function $0e97ad6bdcaa9a3e$export$2bfbd9808f953be9(element, props, children) {
254
+ console.debug("Creating DOM node:", element, props, children);
255
+ const id = (0, $k5Hkl$hyperid)();
256
+ $0e97ad6bdcaa9a3e$var$nodes.set(id.uuid, {
257
+ element: element,
258
+ props: props,
259
+ children: children
260
+ });
261
+ return id.uuid;
262
+ }
263
+ function $0e97ad6bdcaa9a3e$export$f570cabd7d9ab9b(msg) {
264
+ console.debug("UI LOG:", msg);
265
+ }
266
+ function $0e97ad6bdcaa9a3e$export$431694b633b87558(id, rerender, emitEvent, navigate) {
267
+ const node = $0e97ad6bdcaa9a3e$var$nodes.get(id);
268
+ //it is a bit strange to do it like that, in theory we want to better distinguish between text nodes and element nodes
269
+ if (!node) {
270
+ console.debug("Creating text node for id:", id);
271
+ return id;
272
+ }
273
+ const data = {};
274
+ // Set properties
275
+ if (node.props) {
276
+ data.props = {};
277
+ for (const prop of node.props.prop)data.props[prop.key] = prop.value;
278
+ data.on = {};
279
+ for (const eventType of node.props.on)data.on[eventType] = (e)=>{
280
+ console.debug("Emitting event:", id, eventType, e);
281
+ emitEvent(id, eventType, new (0, $3f177c34ffa911f6$export$d61e24a684f9e51)(e?.currentTarget?.value, e?.currentTarget?.checked));
282
+ rerender();
283
+ };
284
+ const href = data.props["href"];
285
+ if (href && !data.on["click"]) {
286
+ if (navigate) data.on.click = (e)=>{
287
+ e.preventDefault();
288
+ navigate(href);
289
+ };
290
+ }
291
+ if (node.hooks) {
292
+ data.hook = {};
293
+ for (const hookName of node.hooks)data.hook[hookName] = ()=>{
294
+ emitEvent(id, hookName, new (0, $3f177c34ffa911f6$export$d61e24a684f9e51)());
295
+ };
296
+ }
297
+ }
298
+ const ch = [];
299
+ if (node.children) for (const childId of node.children){
300
+ const childEl = $0e97ad6bdcaa9a3e$export$431694b633b87558(childId, rerender, emitEvent, navigate);
301
+ ch.push(childEl);
302
+ }
303
+ return (0, $k5Hkl$h)(node.element, data, ch);
304
+ }
305
+
306
+
307
+
308
+ var $36561bb1074897e9$exports = {};
309
+
310
+ $parcel$export($36561bb1074897e9$exports, "setCb", () => $36561bb1074897e9$export$f4651a9718246ed1);
311
+ $parcel$export($36561bb1074897e9$exports, "PromiseToResult", () => $36561bb1074897e9$export$e36240994a645832);
312
+
313
+ let $36561bb1074897e9$var$cb;
314
+ const $36561bb1074897e9$var$pending = [];
315
+ const $36561bb1074897e9$var$dispatch = (id, result)=>{
316
+ if ($36561bb1074897e9$var$cb) {
317
+ $36561bb1074897e9$var$cb(id, result);
318
+ return;
319
+ }
320
+ $36561bb1074897e9$var$pending.push({
321
+ id: id,
322
+ result: result
323
+ });
324
+ };
325
+ const $36561bb1074897e9$export$f4651a9718246ed1 = (callback)=>{
326
+ $36561bb1074897e9$var$cb = callback;
327
+ if ($36561bb1074897e9$var$pending.length === 0) return;
328
+ // Flush any results that arrived before the callback was registered.
329
+ while($36561bb1074897e9$var$pending.length > 0){
330
+ const { id: id, result: result } = $36561bb1074897e9$var$pending.shift();
331
+ $36561bb1074897e9$var$cb(id, result);
332
+ }
333
+ };
334
+ const $36561bb1074897e9$export$e36240994a645832 = (promiseFn)=>{
335
+ return (...args)=>{
336
+ const id = (0, $k5Hkl$hyperid)().uuid;
337
+ promiseFn(...args).then((result)=>{
338
+ $36561bb1074897e9$var$dispatch(id, {
339
+ tag: "ok",
340
+ val: result
341
+ });
342
+ }).catch((error)=>{
343
+ $36561bb1074897e9$var$dispatch(id, {
344
+ tag: "err",
345
+ val: error instanceof Error ? error.message : String(error)
346
+ });
347
+ });
348
+ return id;
349
+ };
350
+ };
351
+
352
+
353
+ function $7ecf692fb720ca8d$export$bef1f36f5486a6a3(msg) {
354
+ // Reuse internal logfunc for consistent labeling.
355
+ (0, $0e97ad6bdcaa9a3e$export$f570cabd7d9ab9b)(msg);
356
+ }
357
+ class $7ecf692fb720ca8d$export$6874335aa33ac2fe extends HTMLElement {
358
+ connectedCallback() {
359
+ this._connected = true;
360
+ if (this.rootComponent) {
361
+ this.rerender();
362
+ return;
363
+ }
364
+ this.reloadComponent();
365
+ }
366
+ disconnectedCallback() {
367
+ this._connected = false;
368
+ }
369
+ reloadComponent() {
370
+ if (!this._connected) {
371
+ console.warn("Component not connected, skipping reload.");
372
+ return;
373
+ }
374
+ const entrypoint = this._entrypoint;
375
+ if (!entrypoint) {
376
+ console.warn("No entrypoint attribute set.");
377
+ return;
378
+ }
379
+ if (!this.loader) {
380
+ console.warn("No file loader set.");
381
+ return;
382
+ }
383
+ if (this._sandbox) (0, $afa3b9af1178429b$export$76f430ef6626d809)(entrypoint, this.loader).then(([moduleUrl, compile])=>{
384
+ this.loadEntrypointFromWasmUrl(moduleUrl, compile);
385
+ });
386
+ else this.loadEntrypointFromJavaScriptUrl(entrypoint);
387
+ }
388
+ getWrapper() {
389
+ return this.wrapperEl;
390
+ }
391
+ set fileloader(loader) {
392
+ this.loader = loader;
393
+ this.reloadComponent();
394
+ }
395
+ set extensionObject(obj) {
396
+ this._extensionObject = obj;
397
+ }
398
+ set entrypoint(entrypoint) {
399
+ this._entrypoint = entrypoint;
400
+ this.reloadComponent();
401
+ }
402
+ set sandbox(sandbox) {
403
+ this._sandbox = sandbox;
404
+ this.reloadComponent();
405
+ }
406
+ set routeStrategy(strategy) {
407
+ this._routeStrategy = strategy;
408
+ this.rerender();
409
+ }
410
+ static get observedAttributes() {
411
+ return [
412
+ "entrypoint",
413
+ "path",
414
+ "profile",
415
+ "css",
416
+ "style",
417
+ "no-sandbox"
418
+ ];
419
+ }
420
+ attributeChangedCallback(name, oldValue, newValue) {
421
+ switch(name){
422
+ case "no-sandbox":
423
+ this._sandbox = newValue !== "true";
424
+ break;
425
+ case "entrypoint":
426
+ this.entrypoint = newValue;
427
+ break;
428
+ case "path":
429
+ if (oldValue) this.rerender();
430
+ break;
431
+ case "profile":
432
+ this.profile = newValue === "true";
433
+ break;
434
+ case "style":
435
+ const htmlString = newValue;
436
+ const styleEl = document.createElement("style");
437
+ styleEl.textContent = htmlString.trim();
438
+ // Insert style after all link elements
439
+ const lastLink = Array.from(this.shadow.querySelectorAll('link[rel="stylesheet"]')).pop();
440
+ //clear previous style elements
441
+ const existingStyles = this.shadow.querySelectorAll("style");
442
+ existingStyles.forEach((style)=>style.remove());
443
+ if (lastLink) this.shadow.insertBefore(styleEl, lastLink.nextSibling);
444
+ else this.shadow.insertBefore(styleEl, this.shadowRoot?.firstChild || null);
445
+ break;
446
+ case "css":
447
+ const css = newValue.split(",");
448
+ //clear previous css links
449
+ const existingLinks = this.shadow.querySelectorAll('link[rel="stylesheet"]');
450
+ existingLinks.forEach((link)=>link.remove());
451
+ for (const comp of css){
452
+ const link = document.createElement("link");
453
+ link.rel = "stylesheet";
454
+ link.href = comp;
455
+ this.shadow.insertBefore(link, this.shadowRoot?.firstChild || null);
456
+ }
457
+ break;
458
+ }
459
+ }
460
+ constructor(){
461
+ super(), this.profile = false, this.currentVNode = null, this._routeStrategy = new (0, $47d6f20d5f21b2bd$export$ec331118eb897269)(), this.loader = new (0, $4195f124d99f64a1$export$c104e8094d57b0fc)(), this._sandbox = true, this._extensionObject = {}, this._connected = false;
462
+ this.shadow = this.attachShadow({
463
+ mode: "open"
464
+ });
465
+ this.wrapperEl = document.createElement("div");
466
+ this.wrapperEl.classList.add("druid-wrapper");
467
+ this.mountEl = document.createElement("div");
468
+ this.mountEl.classList.add("druid-mount");
469
+ this.mountEl.innerText = "Transpiling...";
470
+ this.wrapperEl.appendChild(this.mountEl);
471
+ this.shadow.appendChild(this.wrapperEl);
472
+ }
473
+ getExtensionObject() {
474
+ return {
475
+ "druid:ui/ui": {
476
+ d: (element, props, children)=>{
477
+ return (0, $0e97ad6bdcaa9a3e$export$2bfbd9808f953be9)(element, props, children);
478
+ },
479
+ log: (msg)=>{
480
+ (0, $0e97ad6bdcaa9a3e$export$f570cabd7d9ab9b)(msg);
481
+ },
482
+ rerender: ()=>{
483
+ setTimeout(()=>this.rerender(), 0);
484
+ },
485
+ setHook: (0, $0e97ad6bdcaa9a3e$export$5833d9be8010042a)
486
+ },
487
+ "druid:ui/utils": {
488
+ Event: (0, $3f177c34ffa911f6$export$d61e24a684f9e51)
489
+ },
490
+ ...this._extensionObject
491
+ };
492
+ }
493
+ async loadEntrypointFromJavaScriptUrl(entrypoint) {
494
+ window["druid-ui"] = {
495
+ d: (0, $0e97ad6bdcaa9a3e$export$2bfbd9808f953be9)
496
+ };
497
+ window["druid-extension"] = this.getExtensionObject();
498
+ const response = await this.loader.load(entrypoint);
499
+ const bundleContent = response.buffer;
500
+ //load bundleContent as a module
501
+ const blob = new Blob([
502
+ bundleContent
503
+ ], {
504
+ type: "application/javascript"
505
+ });
506
+ const moduleUrl = URL.createObjectURL(blob);
507
+ const t = await import(/* @vite-ignore */ moduleUrl);
508
+ (0, $36561bb1074897e9$export$f4651a9718246ed1)(t.component.asyncComplete);
509
+ this.rootComponent = t;
510
+ this.rerender();
511
+ URL.revokeObjectURL(moduleUrl);
512
+ }
513
+ async loadEntrypointFromWasmUrl(entrypoint, loadCompile) {
514
+ const t = await import(/* @vite-ignore */ entrypoint);
515
+ URL.revokeObjectURL(entrypoint);
516
+ const i = await t.instantiate(loadCompile, this.getExtensionObject());
517
+ (0, $36561bb1074897e9$export$f4651a9718246ed1)(i.component.asyncComplete);
518
+ this.rootComponent = i;
519
+ this.rerender();
520
+ }
521
+ rerender() {
522
+ if (!this.rootComponent) {
523
+ console.warn("Root component not initialized yet.");
524
+ return;
525
+ }
526
+ let renderStart;
527
+ if (this.profile) // Start profiling
528
+ renderStart = performance.now();
529
+ const rootId = this.rootComponent.component.init({
530
+ path: this._routeStrategy.getCurrentPath()
531
+ });
532
+ if (this.profile) {
533
+ const initEnd = performance.now();
534
+ console.debug(`Init completed in ${(initEnd - renderStart).toFixed(2)} ms`);
535
+ }
536
+ this.mountEl.innerHTML = "";
537
+ const dom = (0, $0e97ad6bdcaa9a3e$export$431694b633b87558)(rootId, this.rerender.bind(this), (nodeId, eventType, e)=>{
538
+ this.rootComponent.component.emit(nodeId, eventType, e);
539
+ }, (href)=>{
540
+ this._routeStrategy.navigateTo(href);
541
+ this.rerender();
542
+ });
543
+ if (dom instanceof String) {
544
+ console.warn("Root DOM is a string, cannot render:", dom);
545
+ return;
546
+ }
547
+ if (this.currentVNode) (0, $7705509af6e2b475$export$b76953f99ab2be78)(this.currentVNode, dom);
548
+ else (0, $7705509af6e2b475$export$b76953f99ab2be78)(this.mountEl, dom);
549
+ this.currentVNode = dom;
550
+ if (this.profile) {
551
+ const renderEnd = performance.now();
552
+ console.debug(`Render completed in ${(renderEnd - renderStart).toFixed(2)} ms`);
553
+ }
554
+ }
555
+ }
556
+ customElements.define("druid-ui", $7ecf692fb720ca8d$export$6874335aa33ac2fe);
557
+
558
+
559
+
560
+
561
+
562
+
563
+
564
+ // Augment the Window interface to include 'druid'.
565
+ // We define a lightweight shape for better intellisense; extend as needed.
566
+
567
+
568
+
569
+
570
+ export {$7ecf692fb720ca8d$export$bef1f36f5486a6a3 as log, $7ecf692fb720ca8d$export$6874335aa33ac2fe as DruidUI, $3f177c34ffa911f6$export$d61e24a684f9e51 as Event, $4195f124d99f64a1$export$c104e8094d57b0fc as HttpFileLoader, $47d6f20d5f21b2bd$export$ec331118eb897269 as HistoryRoutingStrategy, $47d6f20d5f21b2bd$export$943a5be802561a9a as CustomRoutingStrategy, $47d6f20d5f21b2bd$export$df70df7318f5f0f3 as createRoutingStrategy, $afa3b9af1178429b$export$76f430ef6626d809 as loadTranspile, $36561bb1074897e9$export$f4651a9718246ed1 as setCb, $36561bb1074897e9$export$e36240994a645832 as PromiseToResult};
571
+ //# sourceMappingURL=ui.js.map
package/dist/ui.js.map ADDED
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;AAAA,uCAAuC;;;;;;;;AEyBhC,MAAM;IAMX,YACE,OAAgB,EAChB,WAAyB,EACzB,cAAuC,CACvC;QACA,IAAI,CAAC,OAAO,GAAG;QACf,IAAI,CAAC,WAAW,GAAG;QACnB,IAAI,CAAC,cAAc,GAAG;IACxB;IAEA,MAAgB,SACd,IAAY,EACZ,OAA2B,EACJ;QACvB,MAAM,UAAkC;YACtC,GAAG,IAAI,CAAC,cAAc;YACtB,GAAG,SAAS,OAAO;QACrB;QAEA,mFAAmF;QACnF,MAAM,YAAY,SAAS,QAAQ,IAAI,CAAC,WAAW;QAEnD,6BAA6B;QAC7B,IAAI,WACF,OAAQ,UAAU,IAAI;YACpB,KAAK;gBACH,IAAI,UAAU,KAAK,EACjB,OAAO,CAAC,gBAAgB,GAAG,CAAC,OAAO,EAAE,UAAU,KAAK,EAAE;gBAExD;YACF,KAAK;gBACH,IAAI,UAAU,QAAQ,IAAI,UAAU,QAAQ,EAAE;oBAC5C,MAAM,cAAc,KAClB,GAAG,UAAU,QAAQ,CAAC,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,YAAY,EAAE;aAEzB,CAAA,GAAA,yCAAI,EAAE,IAAI,CAAC,OAAO,EAAE;QAEtB,IAAI,CAAC,YAAY,GAAG;QACpB,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,MAAM,YAAY,YAAY,GAAG;YACjC,QAAQ,KAAK,CACX,CAAC,oBAAoB,EAAE,AAAC,CAAA,YAAY,WAAW,EAAG,OAAO,CAAC,GAAG,GAAG,CAAC;QAErE;IACF;AACF;AAEA,eAAe,MAAM,CAAC,YAAY;;;;;;;;AQjSlC,mDAAmD;AACnD,2EAA2E;;","sources":["packages/host/src/index.ts","packages/host/src/ui.ts","packages/host/src/file-loader.ts","packages/host/src/setup-snabbdom.ts","packages/host/src/routing-strategy.ts","packages/host/src/transpile.ts","packages/host/src/host-functions.ts","packages/host/src/types.ts","packages/host/src/utils.ts","packages/host/src/window.ts"],"sourcesContent":["// Re-export everything for easy access\nexport * from \"./ui\";\nexport * from \"./types\";\nexport * from \"./file-loader\";\nexport * from \"./routing-strategy\";\nexport * from \"./transpile\";\nexport * from \"./utils\";\n\n// Global Window augmentation (side-effect import for declaration output)\nimport \"./window\";\n","import { HttpFileLoader } from \"./file-loader\";\nimport { patch } from \"./setup-snabbdom\";\nimport { type VNode } from \"snabbdom\";\nimport {\n HistoryRoutingStrategy,\n type RoutingStrategy,\n} from \"./routing-strategy\";\nimport { loadTranspile } from \"./transpile\";\nimport { createDomFromIdRec, dfunc, logfunc, setHook } from \"./host-functions\";\nimport { Event } from \"./types\";\nimport { setCb } from \"./utils\";\n\nexport interface Props {\n prop: { key: string; value: any }[];\n on: string[]; // [eventType, fnid]\n}\n\n// Dev-time log function exposed for components importing from \"druid:ui/ui\".\nexport function log(msg: string) {\n // Reuse internal logfunc for consistent labeling.\n logfunc(msg);\n}\n\nexport class DruidUI extends HTMLElement {\n private shadow: ShadowRoot;\n private wrapperEl: HTMLElement;\n private mountEl: HTMLElement;\n private profile: boolean = false;\n private currentVNode: VNode | null = null;\n private _routeStrategy: RoutingStrategy = new HistoryRoutingStrategy();\n private loader = new HttpFileLoader();\n private _sandbox: boolean = true;\n private _extensionObject: object = {};\n private _entrypoint?: string;\n private rootComponent: any;\n private _connected: boolean = false;\n\n public connectedCallback() {\n this._connected = true;\n if (this.rootComponent) {\n this.rerender();\n return;\n }\n this.reloadComponent();\n }\n\n public disconnectedCallback() {\n this._connected = false;\n }\n\n public reloadComponent() {\n if (!this._connected) {\n console.warn(\"Component not connected, skipping reload.\");\n return;\n }\n const entrypoint = this._entrypoint;\n if (!entrypoint) {\n console.warn(\"No entrypoint attribute set.\");\n return;\n }\n if (!this.loader) {\n console.warn(\"No file loader set.\");\n return;\n }\n if (this._sandbox) {\n loadTranspile(entrypoint, this.loader).then(([moduleUrl, compile]) => {\n this.loadEntrypointFromWasmUrl(moduleUrl, compile);\n });\n } else {\n this.loadEntrypointFromJavaScriptUrl(entrypoint);\n }\n }\n\n public getWrapper(): HTMLElement {\n return this.wrapperEl;\n }\n set fileloader(loader: HttpFileLoader) {\n this.loader = loader;\n this.reloadComponent();\n }\n\n set extensionObject(obj: object) {\n this._extensionObject = obj;\n }\n set entrypoint(entrypoint: string) {\n this._entrypoint = entrypoint;\n this.reloadComponent();\n }\n\n set sandbox(sandbox: boolean) {\n this._sandbox = sandbox;\n this.reloadComponent();\n }\n\n set routeStrategy(strategy: RoutingStrategy) {\n this._routeStrategy = strategy;\n this.rerender();\n }\n\n static get observedAttributes() {\n return [\"entrypoint\", \"path\", \"profile\", \"css\", \"style\", \"no-sandbox\"];\n }\n\n attributeChangedCallback(\n name: string,\n oldValue: string | null,\n newValue: string\n ) {\n switch (name) {\n case \"no-sandbox\":\n this._sandbox = newValue !== \"true\";\n break;\n case \"entrypoint\":\n this.entrypoint = newValue;\n break;\n case \"path\":\n if (oldValue) {\n this.rerender();\n }\n break;\n case \"profile\":\n this.profile = newValue === \"true\";\n break;\n case \"style\":\n const htmlString = newValue;\n const styleEl = document.createElement(\"style\");\n styleEl.textContent = htmlString.trim();\n\n // Insert style after all link elements\n const lastLink = Array.from(\n this.shadow.querySelectorAll('link[rel=\"stylesheet\"]')\n ).pop();\n //clear previous style elements\n const existingStyles = this.shadow.querySelectorAll(\"style\");\n existingStyles.forEach((style) => style.remove());\n\n if (lastLink) {\n this.shadow.insertBefore(styleEl, lastLink.nextSibling);\n } else {\n this.shadow.insertBefore(\n styleEl,\n this.shadowRoot?.firstChild || null\n );\n }\n break;\n case \"css\":\n const css = newValue.split(\",\");\n //clear previous css links\n const existingLinks = this.shadow.querySelectorAll(\n 'link[rel=\"stylesheet\"]'\n );\n existingLinks.forEach((link) => link.remove());\n\n for (const comp of css) {\n const link = document.createElement(\"link\");\n link.rel = \"stylesheet\";\n link.href = comp;\n this.shadow.insertBefore(link, this.shadowRoot?.firstChild || null);\n }\n break;\n }\n }\n\n constructor() {\n super();\n this.shadow = this.attachShadow({ mode: \"open\" });\n\n this.wrapperEl = document.createElement(\"div\");\n this.wrapperEl.classList.add(\"druid-wrapper\");\n this.mountEl = document.createElement(\"div\");\n this.mountEl.classList.add(\"druid-mount\");\n this.mountEl.innerText = \"Transpiling...\";\n\n this.wrapperEl.appendChild(this.mountEl);\n this.shadow.appendChild(this.wrapperEl);\n }\n\n private getExtensionObject() {\n return {\n \"druid:ui/ui\": {\n d: (element: string, props: Props, children: string[]) => {\n return dfunc(element, props, children);\n },\n log: (msg: string) => {\n logfunc(msg);\n },\n rerender: () => {\n setTimeout(() => this.rerender(), 0);\n },\n setHook: setHook,\n },\n \"druid:ui/utils\": {\n Event: Event,\n },\n ...this._extensionObject,\n };\n }\n\n async loadEntrypointFromJavaScriptUrl(entrypoint: string) {\n window[\"druid-ui\"] = {\n d: dfunc,\n };\n\n window[\"druid-extension\"] = this.getExtensionObject();\n\n const response = await this.loader.load(entrypoint);\n\n const bundleContent = response.buffer;\n\n //load bundleContent as a module\n const blob = new Blob([bundleContent], { type: \"application/javascript\" });\n const moduleUrl = URL.createObjectURL(blob);\n const t = await import(/* @vite-ignore */ moduleUrl);\n\n setCb(t.component.asyncComplete);\n this.rootComponent = t;\n this.rerender();\n URL.revokeObjectURL(moduleUrl);\n }\n\n async loadEntrypointFromWasmUrl(\n entrypoint: string,\n loadCompile?: (file: string) => Promise<WebAssembly.Module>\n ) {\n const t = await import(/* @vite-ignore */ entrypoint!);\n\n URL.revokeObjectURL(entrypoint);\n\n const i = await t.instantiate(loadCompile, this.getExtensionObject());\n setCb(i.component.asyncComplete);\n\n this.rootComponent = i;\n this.rerender();\n }\n\n rerender() {\n if (!this.rootComponent) {\n console.warn(\"Root component not initialized yet.\");\n return;\n }\n let renderStart;\n if (this.profile) {\n // Start profiling\n renderStart = performance.now();\n }\n\n const rootId = this.rootComponent.component.init({\n path: this._routeStrategy.getCurrentPath(),\n });\n\n if (this.profile) {\n const initEnd = performance.now();\n console.debug(\n `Init completed in ${(initEnd - renderStart!).toFixed(2)} ms`\n );\n }\n\n this.mountEl.innerHTML = \"\";\n const dom = createDomFromIdRec(\n rootId,\n this.rerender.bind(this),\n (nodeId, eventType, e) => {\n this.rootComponent.component.emit(nodeId, eventType, e);\n },\n (href: string) => {\n this._routeStrategy.navigateTo(href);\n this.rerender();\n }\n );\n\n if (dom instanceof String) {\n console.warn(\"Root DOM is a string, cannot render:\", dom);\n return;\n }\n if (this.currentVNode) {\n patch(this.currentVNode, dom);\n } else {\n patch(this.mountEl, dom);\n }\n this.currentVNode = dom;\n if (this.profile) {\n const renderEnd = performance.now();\n console.debug(\n `Render completed in ${(renderEnd - renderStart!).toFixed(2)} ms`\n );\n }\n }\n}\n\ncustomElements.define(\"druid-ui\", DruidUI);\n","interface AuthOptions {\n type: \"bearer\" | \"basic\" | \"api-key\";\n token?: string;\n username?: string;\n password?: string;\n apiKey?: string;\n apiKeyHeader?: string;\n}\n\ninterface FileLoaderOptions {\n auth?: AuthOptions;\n headers?: Record<string, string>;\n cache?: boolean;\n}\n\ninterface HttpResponse {\n buffer: ArrayBuffer;\n headers: Record<string, string>;\n contentType: string | null;\n}\n\nexport interface FileLoader {\n load(path: string, options?: FileLoaderOptions): Promise<HttpResponse>;\n}\n\nexport class HttpFileLoader {\n private authOptions?: AuthOptions | undefined;\n private defaultHeaders?: Record<string, string> | undefined;\n\n private baseUrl?: string | undefined;\n\n constructor(\n baseUrl?: string,\n authOptions?: AuthOptions,\n defaultHeaders?: Record<string, string>\n ) {\n this.baseUrl = baseUrl;\n this.authOptions = authOptions;\n this.defaultHeaders = defaultHeaders;\n }\n\n protected async loadHttp(\n path: string,\n options?: FileLoaderOptions\n ): Promise<HttpResponse> {\n const headers: Record<string, string> = {\n ...this.defaultHeaders,\n ...options?.headers,\n };\n\n // Use instance auth options if no options provided, or merge with provided options\n const authToUse = options?.auth || this.authOptions;\n\n // Add authentication headers\n if (authToUse) {\n switch (authToUse.type) {\n case \"bearer\":\n if (authToUse.token) {\n headers[\"Authorization\"] = `Bearer ${authToUse.token}`;\n }\n break;\n case \"basic\":\n if (authToUse.username && authToUse.password) {\n const credentials = btoa(\n `${authToUse.username}:${authToUse.password}`\n );\n headers[\"Authorization\"] = `Basic ${credentials}`;\n }\n break;\n case \"api-key\":\n if (authToUse.apiKey) {\n const headerName = authToUse.apiKeyHeader || \"X-API-Key\";\n headers[headerName] = authToUse.apiKey;\n }\n break;\n }\n }\n\n const res = await fetch(path, {\n headers,\n cache: options?.cache === false ? \"no-store\" : \"default\",\n });\n\n if (!res.ok) {\n throw new Error(`Failed to load file: ${path}, status: ${res.status}`);\n }\n\n // Extract all fetch-specific data\n const text = await res.arrayBuffer();\n\n const responseHeaders: Record<string, string> = {};\n // Handle both real Headers object and mocked headers\n if (res.headers && typeof res.headers.forEach === \"function\") {\n res.headers.forEach((value, key) => {\n responseHeaders[key] = value;\n });\n }\n\n const contentType = res.headers.get(\"Content-Type\");\n\n return {\n buffer: text,\n headers: responseHeaders,\n contentType,\n };\n }\n\n async load(path: string, options?: FileLoaderOptions) {\n const filePath = this.baseUrl ? `${this.baseUrl}/${path}` : path;\n const response = await this.loadHttp(filePath, options);\n return response;\n }\n}\n","import {\n init,\n classModule,\n propsModule,\n styleModule,\n eventListenersModule,\n} from \"snabbdom\";\n\nexport const patch = init([\n // Init patch function with chosen modules\n classModule, // makes it easy to toggle classes\n propsModule, // for setting properties on DOM elements\n styleModule, // handles styling on elements with support for animations\n eventListenersModule, // attaches event listeners\n]);\n","export interface RoutingStrategy {\n getCurrentPath(): string;\n navigateTo(path: string): void;\n}\n\nexport class HistoryRoutingStrategy implements RoutingStrategy {\n getCurrentPath(): string {\n return window.location.pathname;\n }\n\n navigateTo(path: string): void {\n window.history.pushState({}, \"\", path);\n }\n}\n\nexport class CustomRoutingStrategy implements RoutingStrategy {\n private currentPath: string = \"/\";\n\n getCurrentPath(): string {\n return this.currentPath;\n }\n\n navigateTo(path: string): void {\n this.currentPath = path;\n }\n}\n\nexport const createRoutingStrategy = (\n mode: \"history\" | \"custom\"\n): RoutingStrategy => {\n if (mode === \"custom\") {\n return new CustomRoutingStrategy();\n } else {\n return new HistoryRoutingStrategy();\n }\n};\n","import type { FileLoader } from \"./file-loader\";\n\ninterface TranspileResult {\n files: Array<[string, Uint8Array]>;\n}\n\ninterface CacheEntry {\n jsUrl: string;\n fileUrls: Record<string, string>;\n}\n\nconst CACHE_KEY_PREFIX = \"transpile_cache_\";\n\n// Helper functions for localStorage caching\nconst getCachedEntry = (file: string): CacheEntry | null => {\n try {\n const cached = localStorage.getItem(CACHE_KEY_PREFIX + file);\n if (cached) {\n return JSON.parse(cached);\n }\n } catch (e) {\n console.warn(\"Failed to read from cache:\", e);\n }\n return null;\n};\n\nconst setCachedEntry = (file: string, entry: CacheEntry): void => {\n try {\n localStorage.setItem(CACHE_KEY_PREFIX + file, JSON.stringify(entry));\n } catch (e) {\n console.warn(\"Failed to write to cache:\", e);\n }\n};\n\nconst transpileInWorker = async (\n buffer: ArrayBuffer,\n name: string,\n): Promise<TranspileResult> => {\n return new Promise((resolve, reject) => {\n const worker = new Worker(\n new URL(\"./transpile.worker.ts\", import.meta.url),\n { type: \"module\" },\n );\n\n worker.onmessage = (event: MessageEvent) => {\n worker.terminate();\n if (event.data.success) {\n resolve(event.data.data);\n } else {\n reject(new Error(event.data.error));\n }\n };\n\n worker.onerror = (error) => {\n worker.terminate();\n reject(error);\n };\n\n // Transfer the buffer ownership to the worker (zero-copy)\n worker.postMessage({ buffer, name }, [buffer]);\n });\n};\n\nexport const loadTranspile = async (\n file: string,\n fileLoader: FileLoader,\n): Promise<[string, (filename: string) => Promise<WebAssembly.Module>]> => {\n // Check cache first\n const cached = getCachedEntry(file);\n if (cached) {\n // Verify URLs are still valid\n try {\n await fetch(cached.jsUrl, { method: \"HEAD\" });\n return [\n cached.jsUrl,\n async (filename: string) => {\n const url = cached.fileUrls[filename];\n if (!url) {\n throw new Error(`File ${filename} not found in transpiled output.`);\n }\n const wasmResponse = await fetch(url);\n const wasmBuffer = await wasmResponse.arrayBuffer();\n return await WebAssembly.compile(wasmBuffer);\n },\n ];\n } catch (e) {\n // Cache is stale, proceed with transpilation\n console.warn(\"Cached URLs are stale, re-transpiling\");\n }\n }\n\n const response = await fileLoader.load(file);\n if (!response) {\n throw new Error(`Failed to load file: ${file}`);\n }\n const files: Record<string, string> = {};\n const t = await transpileInWorker(response.buffer, \"test\");\n\n for (const file of t.files) {\n const [f, content] = file as [string, Uint8Array];\n\n let blob: Blob | null = null;\n if (f.endsWith(\".js\")) {\n blob = new Blob([new Uint8Array(content)], {\n type: \"application/javascript\",\n });\n } else if (f.endsWith(\".wasm\")) {\n blob = new Blob([new Uint8Array(content)], {\n type: \"application/wasm\",\n });\n }\n if (blob) {\n const url = URL.createObjectURL(blob);\n files[f] = url;\n }\n }\n const jsFileEntry = Object.entries(files).find(([filename]) =>\n filename.endsWith(\".js\"),\n );\n if (!jsFileEntry) {\n throw new Error(\"No JavaScript file found in transpiled output.\");\n }\n\n // Cache the result\n const cacheEntry: CacheEntry = {\n jsUrl: jsFileEntry[1],\n fileUrls: files,\n };\n setCachedEntry(file, cacheEntry);\n\n return [\n jsFileEntry[1],\n async (filename: string) => {\n const url = files[filename];\n if (!url) {\n throw new Error(`File ${filename} not found in transpiled output.`);\n }\n const wasmResponse = await fetch(url);\n const wasmBuffer = await wasmResponse.arrayBuffer();\n return await WebAssembly.compile(wasmBuffer);\n },\n ];\n};\n","import hyperid from \"hyperid\";\nimport type { Props } from \"druid:ui/ui\";\nimport { h, type VNode, type VNodeChildren, type VNodeData } from \"snabbdom\";\nimport { Event } from \"./types\";\n\nconst nodes = new Map<\n string,\n {\n element: string;\n props?: Props;\n children?: Array<string>;\n hooks?: string[];\n }\n>();\n\nexport function setHook(id: string, callback: string) {\n console.debug(`Setting hook for id ${id} with callback ${callback}`);\n const node = nodes.get(id);\n if (node) {\n node.hooks = node.hooks || [];\n node.hooks.push(callback);\n } else {\n console.warn(`setHook: No node found for id ${id}`);\n }\n}\n\nexport function dfunc(element: string, props: Props, children: string[]) {\n console.debug(\"Creating DOM node:\", element, props, children);\n const id = hyperid();\n\n nodes.set(id.uuid, { element, props, children });\n return id.uuid;\n}\n\nexport function logfunc(msg: string) {\n console.debug(\"UI LOG:\", msg);\n}\n\nexport function createDomFromIdRec(\n id: string,\n rerender: () => void,\n emitEvent: (id: string, eventType: string, event: Event) => void,\n navigate?: (href: string) => void\n): VNode | String {\n const node = nodes.get(id);\n //it is a bit strange to do it like that, in theory we want to better distinguish between text nodes and element nodes\n if (!node) {\n console.debug(\"Creating text node for id:\", id);\n return id;\n }\n\n const data: VNodeData = {};\n\n // Set properties\n if (node.props) {\n data.props = {};\n for (const prop of node.props.prop) {\n data.props[prop.key] = prop.value;\n }\n data.on = {};\n for (const eventType of node.props.on) {\n data.on[eventType] = (e) => {\n console.debug(\"Emitting event:\", id, eventType, e);\n emitEvent(\n id,\n eventType,\n new Event(e?.currentTarget?.value, e?.currentTarget?.checked)\n );\n rerender();\n };\n }\n const href = data.props[\"href\"];\n if (href && !data.on[\"click\"]) {\n if (navigate) {\n data.on.click = (e) => {\n e.preventDefault();\n navigate(href);\n };\n }\n }\n\n if (node.hooks) {\n data.hook = {};\n for (const hookName of node.hooks) {\n data.hook[hookName as keyof typeof data.hook] = () => {\n emitEvent(id, hookName, new Event());\n };\n }\n }\n }\n\n const ch: VNodeChildren = [];\n if (node.children) {\n for (const childId of node.children) {\n const childEl = createDomFromIdRec(\n childId,\n rerender,\n emitEvent,\n navigate\n );\n ch.push(childEl);\n }\n }\n\n return h(node.element, data, ch);\n}\n","export class Event {\n private _value: string;\n private _checked: boolean;\n\n constructor(_value: string = \"\", _checked: boolean = false) {\n this._value = _value;\n this._checked = _checked;\n }\n\n preventDefault() {}\n stopPropagation() {}\n value() {\n return this._value;\n }\n checked() {\n return this._checked;\n }\n}\n","import hyperid from \"hyperid\";\n\ntype Callback = (id: string, result: { tag: \"ok\" | \"err\"; val: any }) => void;\n\nlet cb: Callback | undefined;\n\nconst pending: Array<{ id: string; result: Parameters<Callback>[1] }> = [];\n\nconst dispatch = (id: string, result: Parameters<Callback>[1]) => {\n if (cb) {\n cb(id, result);\n return;\n }\n\n pending.push({ id, result });\n};\nexport const setCb = (\n callback: (id: string, result: { tag: \"ok\" | \"err\"; val: any }) => void\n) => {\n cb = callback;\n\n if (pending.length === 0) {\n return;\n }\n\n // Flush any results that arrived before the callback was registered.\n while (pending.length > 0) {\n const { id, result } = pending.shift()!;\n cb(id, result);\n }\n};\n\nexport const PromiseToResult = <T>(\n promiseFn: (...args: any[]) => Promise<T>\n) => {\n return (...args: any[]) => {\n const id = hyperid().uuid;\n promiseFn(...args)\n .then((result) => {\n dispatch(id, {\n tag: \"ok\",\n val: result,\n });\n })\n .catch((error) => {\n dispatch(id, {\n tag: \"err\",\n val: error instanceof Error ? error.message : String(error),\n });\n });\n return id;\n };\n};\n","// Augment the Window interface to include 'druid'.\n// We define a lightweight shape for better intellisense; extend as needed.\n\ntype DruidAPI = Record<string, any>;\n\ndeclare global {\n interface Window {\n \"druid-ui\": {\n d: (...args: any[]) => any;\n };\n \"druid-extension\"?: DruidAPI;\n }\n}\n\n// Mark this file as a module so global augmentation is always applied reliably.\nexport {};\n"],"names":[],"version":3,"file":"ui.js.map"}
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@druid-ui/host",
3
+ "version": "1.0.0-next.1",
4
+ "type": "module",
5
+ "main": "./dist/ui.js",
6
+ "types": "./dist/types/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/types/index.d.ts",
10
+ "import": "./dist/ui.js"
11
+ }
12
+ },
13
+ "files": [
14
+ "dist",
15
+ "src"
16
+ ],
17
+ "browserslist": [
18
+ "last 1 Chrome version"
19
+ ],
20
+ "scripts": {
21
+ "build": "parcel build src/index.ts"
22
+ },
23
+ "dependencies": {
24
+ "@bytecodealliance/jco": "^1.16.1",
25
+ "hyperid": "^3.3.0",
26
+ "jsdom": "^26.1.0",
27
+ "snabbdom": "^3.6.2"
28
+ },
29
+ "devDependencies": {
30
+ "parcel": "^2.16.1",
31
+ "typescript": "~5.8.3"
32
+ }
33
+ }