jaxs 0.3.1 → 0.4.0

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.
Files changed (69) hide show
  1. package/dist/jaxs.d.ts +634 -0
  2. package/dist/jaxs.js +793 -1054
  3. package/dist/jaxs.umd.cjs +1 -0
  4. package/package.json +41 -30
  5. package/.env +0 -1
  6. package/README.md +0 -15
  7. package/bun.lockb +0 -0
  8. package/bundle.ts +0 -5
  9. package/bunfig.toml +0 -0
  10. package/cypress/e2e/add-remove-nested-children.cy.js +0 -39
  11. package/cypress/e2e/add-remove-root-children.cy.js +0 -37
  12. package/cypress/e2e/svg-renders.cy.js +0 -10
  13. package/cypress/jaxs-apps/add-remove-nested-children.html +0 -12
  14. package/cypress/jaxs-apps/add-remove-nested-children.jsx +0 -85
  15. package/cypress/jaxs-apps/add-remove-root-children.html +0 -15
  16. package/cypress/jaxs-apps/add-remove-root-children.jsx +0 -54
  17. package/cypress/jaxs-apps/dist/add-remove-nested-children.afcab974.js +0 -1022
  18. package/cypress/jaxs-apps/dist/add-remove-nested-children.afcab974.js.map +0 -1
  19. package/cypress/jaxs-apps/dist/add-remove-nested-children.html +0 -12
  20. package/cypress/jaxs-apps/dist/add-remove-root-children.3bb9b3f5.js +0 -1665
  21. package/cypress/jaxs-apps/dist/add-remove-root-children.3bb9b3f5.js.map +0 -1
  22. package/cypress/jaxs-apps/dist/add-remove-root-children.fbb4ec9b.js +0 -1011
  23. package/cypress/jaxs-apps/dist/add-remove-root-children.fbb4ec9b.js.map +0 -1
  24. package/cypress/jaxs-apps/dist/add-remove-root-children.html +0 -15
  25. package/cypress/jaxs-apps/dist/svg.04290504.js +0 -644
  26. package/cypress/jaxs-apps/dist/svg.04290504.js.map +0 -1
  27. package/cypress/jaxs-apps/dist/svg.html +0 -11
  28. package/cypress/jaxs-apps/svg.html +0 -11
  29. package/cypress/jaxs-apps/svg.jsx +0 -15
  30. package/cypress/support/commands.js +0 -25
  31. package/cypress/support/e2e.js +0 -20
  32. package/cypress.config.js +0 -10
  33. package/src/app.ts +0 -64
  34. package/src/debugging.js +0 -5
  35. package/src/jaxs.ts +0 -7
  36. package/src/jsx.js +0 -27
  37. package/src/messageBus.ts +0 -70
  38. package/src/navigation/findHref.js +0 -10
  39. package/src/navigation/routeState.js +0 -15
  40. package/src/navigation/setupHistory.js +0 -38
  41. package/src/navigation/setupNavigation.js +0 -25
  42. package/src/navigation.ts +0 -2
  43. package/src/rendering/change/compile.ts +0 -1
  44. package/src/rendering/change/instructions/attributes.ts +0 -81
  45. package/src/rendering/change/instructions/children.ts +0 -127
  46. package/src/rendering/change/instructions/element.ts +0 -49
  47. package/src/rendering/change/instructions/events.ts +0 -51
  48. package/src/rendering/change/instructions/generate.ts +0 -122
  49. package/src/rendering/change/instructions/idMap.js +0 -55
  50. package/src/rendering/change/instructions/node.ts +0 -55
  51. package/src/rendering/change/instructions/text.ts +0 -10
  52. package/src/rendering/change.ts +0 -139
  53. package/src/rendering/dom/attributesAndEvents.ts +0 -33
  54. package/src/rendering/dom/create.ts +0 -68
  55. package/src/rendering/dom/svg.ts +0 -18
  56. package/src/rendering/templates/bound.js +0 -56
  57. package/src/rendering/templates/children.ts +0 -99
  58. package/src/rendering/templates/root.ts +0 -55
  59. package/src/rendering/templates/tag.ts +0 -92
  60. package/src/rendering/templates/text.ts +0 -17
  61. package/src/state/equality.js +0 -36
  62. package/src/state/stores.js +0 -63
  63. package/src/state/testingTypes.js +0 -6
  64. package/src/state.js +0 -89
  65. package/src/types.ts +0 -152
  66. package/src/views/conditionals.jsx +0 -18
  67. package/src/views/link.jsx +0 -5
  68. package/src/views.js +0 -7
  69. package/tsconfig.json +0 -26
@@ -1,644 +0,0 @@
1
- // modules are defined as an array
2
- // [ module function, map of requires ]
3
- //
4
- // map of requires is short require name -> numeric require
5
- //
6
- // anything defined in a previous bundle is accessed via the
7
- // orig method which is the require for previous bundles
8
-
9
- (function (modules, entry, mainEntry, parcelRequireName, globalName) {
10
- /* eslint-disable no-undef */
11
- var globalObject =
12
- typeof globalThis !== 'undefined'
13
- ? globalThis
14
- : typeof self !== 'undefined'
15
- ? self
16
- : typeof window !== 'undefined'
17
- ? window
18
- : typeof global !== 'undefined'
19
- ? global
20
- : {};
21
- /* eslint-enable no-undef */
22
-
23
- // Save the require from previous bundle to this closure if any
24
- var previousRequire =
25
- typeof globalObject[parcelRequireName] === 'function' &&
26
- globalObject[parcelRequireName];
27
-
28
- var cache = previousRequire.cache || {};
29
- // Do not use `require` to prevent Webpack from trying to bundle this call
30
- var nodeRequire =
31
- typeof module !== 'undefined' &&
32
- typeof module.require === 'function' &&
33
- module.require.bind(module);
34
-
35
- function newRequire(name, jumped) {
36
- if (!cache[name]) {
37
- if (!modules[name]) {
38
- // if we cannot find the module within our internal map or
39
- // cache jump to the current global require ie. the last bundle
40
- // that was added to the page.
41
- var currentRequire =
42
- typeof globalObject[parcelRequireName] === 'function' &&
43
- globalObject[parcelRequireName];
44
- if (!jumped && currentRequire) {
45
- return currentRequire(name, true);
46
- }
47
-
48
- // If there are other bundles on this page the require from the
49
- // previous one is saved to 'previousRequire'. Repeat this as
50
- // many times as there are bundles until the module is found or
51
- // we exhaust the require chain.
52
- if (previousRequire) {
53
- return previousRequire(name, true);
54
- }
55
-
56
- // Try the node require function if it exists.
57
- if (nodeRequire && typeof name === 'string') {
58
- return nodeRequire(name);
59
- }
60
-
61
- var err = new Error("Cannot find module '" + name + "'");
62
- err.code = 'MODULE_NOT_FOUND';
63
- throw err;
64
- }
65
-
66
- localRequire.resolve = resolve;
67
- localRequire.cache = {};
68
-
69
- var module = (cache[name] = new newRequire.Module(name));
70
-
71
- modules[name][0].call(
72
- module.exports,
73
- localRequire,
74
- module,
75
- module.exports,
76
- this
77
- );
78
- }
79
-
80
- return cache[name].exports;
81
-
82
- function localRequire(x) {
83
- var res = localRequire.resolve(x);
84
- return res === false ? {} : newRequire(res);
85
- }
86
-
87
- function resolve(x) {
88
- var id = modules[name][1][x];
89
- return id != null ? id : x;
90
- }
91
- }
92
-
93
- function Module(moduleName) {
94
- this.id = moduleName;
95
- this.bundle = newRequire;
96
- this.exports = {};
97
- }
98
-
99
- newRequire.isParcelRequire = true;
100
- newRequire.Module = Module;
101
- newRequire.modules = modules;
102
- newRequire.cache = cache;
103
- newRequire.parent = previousRequire;
104
- newRequire.register = function (id, exports) {
105
- modules[id] = [
106
- function (require, module) {
107
- module.exports = exports;
108
- },
109
- {},
110
- ];
111
- };
112
-
113
- Object.defineProperty(newRequire, 'root', {
114
- get: function () {
115
- return globalObject[parcelRequireName];
116
- },
117
- });
118
-
119
- globalObject[parcelRequireName] = newRequire;
120
-
121
- for (var i = 0; i < entry.length; i++) {
122
- newRequire(entry[i]);
123
- }
124
-
125
- if (mainEntry) {
126
- // Expose entry point to Node, AMD or browser globals
127
- // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
128
- var mainExports = newRequire(mainEntry);
129
-
130
- // CommonJS
131
- if (typeof exports === 'object' && typeof module !== 'undefined') {
132
- module.exports = mainExports;
133
-
134
- // RequireJS
135
- } else if (typeof define === 'function' && define.amd) {
136
- define(function () {
137
- return mainExports;
138
- });
139
-
140
- // <script>
141
- } else if (globalName) {
142
- this[globalName] = mainExports;
143
- }
144
- }
145
- })({"cHD8g":[function(require,module,exports) {
146
- var global = arguments[3];
147
- var HMR_HOST = null;
148
- var HMR_PORT = null;
149
- var HMR_SECURE = false;
150
- var HMR_ENV_HASH = "d6ea1d42532a7575";
151
- module.bundle.HMR_BUNDLE_ID = "318855cf04290504";
152
- "use strict";
153
- /* global HMR_HOST, HMR_PORT, HMR_ENV_HASH, HMR_SECURE, chrome, browser, __parcel__import__, __parcel__importScripts__, ServiceWorkerGlobalScope */ /*::
154
- import type {
155
- HMRAsset,
156
- HMRMessage,
157
- } from '@parcel/reporter-dev-server/src/HMRServer.js';
158
- interface ParcelRequire {
159
- (string): mixed;
160
- cache: {|[string]: ParcelModule|};
161
- hotData: {|[string]: mixed|};
162
- Module: any;
163
- parent: ?ParcelRequire;
164
- isParcelRequire: true;
165
- modules: {|[string]: [Function, {|[string]: string|}]|};
166
- HMR_BUNDLE_ID: string;
167
- root: ParcelRequire;
168
- }
169
- interface ParcelModule {
170
- hot: {|
171
- data: mixed,
172
- accept(cb: (Function) => void): void,
173
- dispose(cb: (mixed) => void): void,
174
- // accept(deps: Array<string> | string, cb: (Function) => void): void,
175
- // decline(): void,
176
- _acceptCallbacks: Array<(Function) => void>,
177
- _disposeCallbacks: Array<(mixed) => void>,
178
- |};
179
- }
180
- interface ExtensionContext {
181
- runtime: {|
182
- reload(): void,
183
- getURL(url: string): string;
184
- getManifest(): {manifest_version: number, ...};
185
- |};
186
- }
187
- declare var module: {bundle: ParcelRequire, ...};
188
- declare var HMR_HOST: string;
189
- declare var HMR_PORT: string;
190
- declare var HMR_ENV_HASH: string;
191
- declare var HMR_SECURE: boolean;
192
- declare var chrome: ExtensionContext;
193
- declare var browser: ExtensionContext;
194
- declare var __parcel__import__: (string) => Promise<void>;
195
- declare var __parcel__importScripts__: (string) => Promise<void>;
196
- declare var globalThis: typeof self;
197
- declare var ServiceWorkerGlobalScope: Object;
198
- */ var OVERLAY_ID = "__parcel__error__overlay__";
199
- var OldModule = module.bundle.Module;
200
- function Module(moduleName) {
201
- OldModule.call(this, moduleName);
202
- this.hot = {
203
- data: module.bundle.hotData[moduleName],
204
- _acceptCallbacks: [],
205
- _disposeCallbacks: [],
206
- accept: function(fn) {
207
- this._acceptCallbacks.push(fn || function() {});
208
- },
209
- dispose: function(fn) {
210
- this._disposeCallbacks.push(fn);
211
- }
212
- };
213
- module.bundle.hotData[moduleName] = undefined;
214
- }
215
- module.bundle.Module = Module;
216
- module.bundle.hotData = {};
217
- var checkedAssets /*: {|[string]: boolean|} */ , assetsToDispose /*: Array<[ParcelRequire, string]> */ , assetsToAccept /*: Array<[ParcelRequire, string]> */ ;
218
- function getHostname() {
219
- return HMR_HOST || (location.protocol.indexOf("http") === 0 ? location.hostname : "localhost");
220
- }
221
- function getPort() {
222
- return HMR_PORT || location.port;
223
- }
224
- // eslint-disable-next-line no-redeclare
225
- var parent = module.bundle.parent;
226
- if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== "undefined") {
227
- var hostname = getHostname();
228
- var port = getPort();
229
- var protocol = HMR_SECURE || location.protocol == "https:" && ![
230
- "localhost",
231
- "127.0.0.1",
232
- "0.0.0.0"
233
- ].includes(hostname) ? "wss" : "ws";
234
- var ws;
235
- try {
236
- ws = new WebSocket(protocol + "://" + hostname + (port ? ":" + port : "") + "/");
237
- } catch (err) {
238
- if (err.message) console.error(err.message);
239
- ws = {};
240
- }
241
- // Web extension context
242
- var extCtx = typeof browser === "undefined" ? typeof chrome === "undefined" ? null : chrome : browser;
243
- // Safari doesn't support sourceURL in error stacks.
244
- // eval may also be disabled via CSP, so do a quick check.
245
- var supportsSourceURL = false;
246
- try {
247
- (0, eval)('throw new Error("test"); //# sourceURL=test.js');
248
- } catch (err) {
249
- supportsSourceURL = err.stack.includes("test.js");
250
- }
251
- // $FlowFixMe
252
- ws.onmessage = async function(event /*: {data: string, ...} */ ) {
253
- checkedAssets = {} /*: {|[string]: boolean|} */ ;
254
- assetsToAccept = [];
255
- assetsToDispose = [];
256
- var data /*: HMRMessage */ = JSON.parse(event.data);
257
- if (data.type === "update") {
258
- // Remove error overlay if there is one
259
- if (typeof document !== "undefined") removeErrorOverlay();
260
- let assets = data.assets.filter((asset)=>asset.envHash === HMR_ENV_HASH);
261
- // Handle HMR Update
262
- let handled = assets.every((asset)=>{
263
- return asset.type === "css" || asset.type === "js" && hmrAcceptCheck(module.bundle.root, asset.id, asset.depsByBundle);
264
- });
265
- if (handled) {
266
- console.clear();
267
- // Dispatch custom event so other runtimes (e.g React Refresh) are aware.
268
- if (typeof window !== "undefined" && typeof CustomEvent !== "undefined") window.dispatchEvent(new CustomEvent("parcelhmraccept"));
269
- await hmrApplyUpdates(assets);
270
- // Dispose all old assets.
271
- let processedAssets = {} /*: {|[string]: boolean|} */ ;
272
- for(let i = 0; i < assetsToDispose.length; i++){
273
- let id = assetsToDispose[i][1];
274
- if (!processedAssets[id]) {
275
- hmrDispose(assetsToDispose[i][0], id);
276
- processedAssets[id] = true;
277
- }
278
- }
279
- // Run accept callbacks. This will also re-execute other disposed assets in topological order.
280
- processedAssets = {};
281
- for(let i = 0; i < assetsToAccept.length; i++){
282
- let id = assetsToAccept[i][1];
283
- if (!processedAssets[id]) {
284
- hmrAccept(assetsToAccept[i][0], id);
285
- processedAssets[id] = true;
286
- }
287
- }
288
- } else fullReload();
289
- }
290
- if (data.type === "error") {
291
- // Log parcel errors to console
292
- for (let ansiDiagnostic of data.diagnostics.ansi){
293
- let stack = ansiDiagnostic.codeframe ? ansiDiagnostic.codeframe : ansiDiagnostic.stack;
294
- console.error("\uD83D\uDEA8 [parcel]: " + ansiDiagnostic.message + "\n" + stack + "\n\n" + ansiDiagnostic.hints.join("\n"));
295
- }
296
- if (typeof document !== "undefined") {
297
- // Render the fancy html overlay
298
- removeErrorOverlay();
299
- var overlay = createErrorOverlay(data.diagnostics.html);
300
- // $FlowFixMe
301
- document.body.appendChild(overlay);
302
- }
303
- }
304
- };
305
- ws.onerror = function(e) {
306
- if (e.message) console.error(e.message);
307
- };
308
- ws.onclose = function() {
309
- console.warn("[parcel] \uD83D\uDEA8 Connection to the HMR server was lost");
310
- };
311
- }
312
- function removeErrorOverlay() {
313
- var overlay = document.getElementById(OVERLAY_ID);
314
- if (overlay) {
315
- overlay.remove();
316
- console.log("[parcel] \u2728 Error resolved");
317
- }
318
- }
319
- function createErrorOverlay(diagnostics) {
320
- var overlay = document.createElement("div");
321
- overlay.id = OVERLAY_ID;
322
- let errorHTML = '<div style="background: black; opacity: 0.85; font-size: 16px; color: white; position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; padding: 30px; font-family: Menlo, Consolas, monospace; z-index: 9999;">';
323
- for (let diagnostic of diagnostics){
324
- let stack = diagnostic.frames.length ? diagnostic.frames.reduce((p, frame)=>{
325
- return `${p}
326
- <a href="/__parcel_launch_editor?file=${encodeURIComponent(frame.location)}" style="text-decoration: underline; color: #888" onclick="fetch(this.href); return false">${frame.location}</a>
327
- ${frame.code}`;
328
- }, "") : diagnostic.stack;
329
- errorHTML += `
330
- <div>
331
- <div style="font-size: 18px; font-weight: bold; margin-top: 20px;">
332
- \u{1F6A8} ${diagnostic.message}
333
- </div>
334
- <pre>${stack}</pre>
335
- <div>
336
- ${diagnostic.hints.map((hint)=>"<div>\uD83D\uDCA1 " + hint + "</div>").join("")}
337
- </div>
338
- ${diagnostic.documentation ? `<div>\u{1F4DD} <a style="color: violet" href="${diagnostic.documentation}" target="_blank">Learn more</a></div>` : ""}
339
- </div>
340
- `;
341
- }
342
- errorHTML += "</div>";
343
- overlay.innerHTML = errorHTML;
344
- return overlay;
345
- }
346
- function fullReload() {
347
- if ("reload" in location) location.reload();
348
- else if (extCtx && extCtx.runtime && extCtx.runtime.reload) extCtx.runtime.reload();
349
- }
350
- function getParents(bundle, id) /*: Array<[ParcelRequire, string]> */ {
351
- var modules = bundle.modules;
352
- if (!modules) return [];
353
- var parents = [];
354
- var k, d, dep;
355
- for(k in modules)for(d in modules[k][1]){
356
- dep = modules[k][1][d];
357
- if (dep === id || Array.isArray(dep) && dep[dep.length - 1] === id) parents.push([
358
- bundle,
359
- k
360
- ]);
361
- }
362
- if (bundle.parent) parents = parents.concat(getParents(bundle.parent, id));
363
- return parents;
364
- }
365
- function updateLink(link) {
366
- var href = link.getAttribute("href");
367
- if (!href) return;
368
- var newLink = link.cloneNode();
369
- newLink.onload = function() {
370
- if (link.parentNode !== null) // $FlowFixMe
371
- link.parentNode.removeChild(link);
372
- };
373
- newLink.setAttribute("href", // $FlowFixMe
374
- href.split("?")[0] + "?" + Date.now());
375
- // $FlowFixMe
376
- link.parentNode.insertBefore(newLink, link.nextSibling);
377
- }
378
- var cssTimeout = null;
379
- function reloadCSS() {
380
- if (cssTimeout) return;
381
- cssTimeout = setTimeout(function() {
382
- var links = document.querySelectorAll('link[rel="stylesheet"]');
383
- for(var i = 0; i < links.length; i++){
384
- // $FlowFixMe[incompatible-type]
385
- var href /*: string */ = links[i].getAttribute("href");
386
- var hostname = getHostname();
387
- var servedFromHMRServer = hostname === "localhost" ? new RegExp("^(https?:\\/\\/(0.0.0.0|127.0.0.1)|localhost):" + getPort()).test(href) : href.indexOf(hostname + ":" + getPort());
388
- var absolute = /^https?:\/\//i.test(href) && href.indexOf(location.origin) !== 0 && !servedFromHMRServer;
389
- if (!absolute) updateLink(links[i]);
390
- }
391
- cssTimeout = null;
392
- }, 50);
393
- }
394
- function hmrDownload(asset) {
395
- if (asset.type === "js") {
396
- if (typeof document !== "undefined") {
397
- let script = document.createElement("script");
398
- script.src = asset.url + "?t=" + Date.now();
399
- if (asset.outputFormat === "esmodule") script.type = "module";
400
- return new Promise((resolve, reject)=>{
401
- var _document$head;
402
- script.onload = ()=>resolve(script);
403
- script.onerror = reject;
404
- (_document$head = document.head) === null || _document$head === void 0 || _document$head.appendChild(script);
405
- });
406
- } else if (typeof importScripts === "function") {
407
- // Worker scripts
408
- if (asset.outputFormat === "esmodule") return import(asset.url + "?t=" + Date.now());
409
- else return new Promise((resolve, reject)=>{
410
- try {
411
- importScripts(asset.url + "?t=" + Date.now());
412
- resolve();
413
- } catch (err) {
414
- reject(err);
415
- }
416
- });
417
- }
418
- }
419
- }
420
- async function hmrApplyUpdates(assets) {
421
- global.parcelHotUpdate = Object.create(null);
422
- let scriptsToRemove;
423
- try {
424
- // If sourceURL comments aren't supported in eval, we need to load
425
- // the update from the dev server over HTTP so that stack traces
426
- // are correct in errors/logs. This is much slower than eval, so
427
- // we only do it if needed (currently just Safari).
428
- // https://bugs.webkit.org/show_bug.cgi?id=137297
429
- // This path is also taken if a CSP disallows eval.
430
- if (!supportsSourceURL) {
431
- let promises = assets.map((asset)=>{
432
- var _hmrDownload;
433
- return (_hmrDownload = hmrDownload(asset)) === null || _hmrDownload === void 0 ? void 0 : _hmrDownload.catch((err)=>{
434
- // Web extension fix
435
- if (extCtx && extCtx.runtime && extCtx.runtime.getManifest().manifest_version == 3 && typeof ServiceWorkerGlobalScope != "undefined" && global instanceof ServiceWorkerGlobalScope) {
436
- extCtx.runtime.reload();
437
- return;
438
- }
439
- throw err;
440
- });
441
- });
442
- scriptsToRemove = await Promise.all(promises);
443
- }
444
- assets.forEach(function(asset) {
445
- hmrApply(module.bundle.root, asset);
446
- });
447
- } finally{
448
- delete global.parcelHotUpdate;
449
- if (scriptsToRemove) scriptsToRemove.forEach((script)=>{
450
- if (script) {
451
- var _document$head2;
452
- (_document$head2 = document.head) === null || _document$head2 === void 0 || _document$head2.removeChild(script);
453
- }
454
- });
455
- }
456
- }
457
- function hmrApply(bundle /*: ParcelRequire */ , asset /*: HMRAsset */ ) {
458
- var modules = bundle.modules;
459
- if (!modules) return;
460
- if (asset.type === "css") reloadCSS();
461
- else if (asset.type === "js") {
462
- let deps = asset.depsByBundle[bundle.HMR_BUNDLE_ID];
463
- if (deps) {
464
- if (modules[asset.id]) {
465
- // Remove dependencies that are removed and will become orphaned.
466
- // This is necessary so that if the asset is added back again, the cache is gone, and we prevent a full page reload.
467
- let oldDeps = modules[asset.id][1];
468
- for(let dep in oldDeps)if (!deps[dep] || deps[dep] !== oldDeps[dep]) {
469
- let id = oldDeps[dep];
470
- let parents = getParents(module.bundle.root, id);
471
- if (parents.length === 1) hmrDelete(module.bundle.root, id);
472
- }
473
- }
474
- if (supportsSourceURL) // Global eval. We would use `new Function` here but browser
475
- // support for source maps is better with eval.
476
- (0, eval)(asset.output);
477
- // $FlowFixMe
478
- let fn = global.parcelHotUpdate[asset.id];
479
- modules[asset.id] = [
480
- fn,
481
- deps
482
- ];
483
- } else if (bundle.parent) hmrApply(bundle.parent, asset);
484
- }
485
- }
486
- function hmrDelete(bundle, id) {
487
- let modules = bundle.modules;
488
- if (!modules) return;
489
- if (modules[id]) {
490
- // Collect dependencies that will become orphaned when this module is deleted.
491
- let deps = modules[id][1];
492
- let orphans = [];
493
- for(let dep in deps){
494
- let parents = getParents(module.bundle.root, deps[dep]);
495
- if (parents.length === 1) orphans.push(deps[dep]);
496
- }
497
- // Delete the module. This must be done before deleting dependencies in case of circular dependencies.
498
- delete modules[id];
499
- delete bundle.cache[id];
500
- // Now delete the orphans.
501
- orphans.forEach((id)=>{
502
- hmrDelete(module.bundle.root, id);
503
- });
504
- } else if (bundle.parent) hmrDelete(bundle.parent, id);
505
- }
506
- function hmrAcceptCheck(bundle /*: ParcelRequire */ , id /*: string */ , depsByBundle /*: ?{ [string]: { [string]: string } }*/ ) {
507
- if (hmrAcceptCheckOne(bundle, id, depsByBundle)) return true;
508
- // Traverse parents breadth first. All possible ancestries must accept the HMR update, or we'll reload.
509
- let parents = getParents(module.bundle.root, id);
510
- let accepted = false;
511
- while(parents.length > 0){
512
- let v = parents.shift();
513
- let a = hmrAcceptCheckOne(v[0], v[1], null);
514
- if (a) // If this parent accepts, stop traversing upward, but still consider siblings.
515
- accepted = true;
516
- else {
517
- // Otherwise, queue the parents in the next level upward.
518
- let p = getParents(module.bundle.root, v[1]);
519
- if (p.length === 0) {
520
- // If there are no parents, then we've reached an entry without accepting. Reload.
521
- accepted = false;
522
- break;
523
- }
524
- parents.push(...p);
525
- }
526
- }
527
- return accepted;
528
- }
529
- function hmrAcceptCheckOne(bundle /*: ParcelRequire */ , id /*: string */ , depsByBundle /*: ?{ [string]: { [string]: string } }*/ ) {
530
- var modules = bundle.modules;
531
- if (!modules) return;
532
- if (depsByBundle && !depsByBundle[bundle.HMR_BUNDLE_ID]) {
533
- // If we reached the root bundle without finding where the asset should go,
534
- // there's nothing to do. Mark as "accepted" so we don't reload the page.
535
- if (!bundle.parent) return true;
536
- return hmrAcceptCheck(bundle.parent, id, depsByBundle);
537
- }
538
- if (checkedAssets[id]) return true;
539
- checkedAssets[id] = true;
540
- var cached = bundle.cache[id];
541
- assetsToDispose.push([
542
- bundle,
543
- id
544
- ]);
545
- if (!cached || cached.hot && cached.hot._acceptCallbacks.length) {
546
- assetsToAccept.push([
547
- bundle,
548
- id
549
- ]);
550
- return true;
551
- }
552
- }
553
- function hmrDispose(bundle /*: ParcelRequire */ , id /*: string */ ) {
554
- var cached = bundle.cache[id];
555
- bundle.hotData[id] = {};
556
- if (cached && cached.hot) cached.hot.data = bundle.hotData[id];
557
- if (cached && cached.hot && cached.hot._disposeCallbacks.length) cached.hot._disposeCallbacks.forEach(function(cb) {
558
- cb(bundle.hotData[id]);
559
- });
560
- delete bundle.cache[id];
561
- }
562
- function hmrAccept(bundle /*: ParcelRequire */ , id /*: string */ ) {
563
- // Execute the module.
564
- bundle(id);
565
- // Run the accept callbacks in the new version of the module.
566
- var cached = bundle.cache[id];
567
- if (cached && cached.hot && cached.hot._acceptCallbacks.length) cached.hot._acceptCallbacks.forEach(function(cb) {
568
- var assetsToAlsoAccept = cb(function() {
569
- return getParents(module.bundle.root, id);
570
- });
571
- if (assetsToAlsoAccept && assetsToAccept.length) {
572
- assetsToAlsoAccept.forEach(function(a) {
573
- hmrDispose(a[0], a[1]);
574
- });
575
- // $FlowFixMe[method-unbinding]
576
- assetsToAccept.push.apply(assetsToAccept, assetsToAlsoAccept);
577
- }
578
- });
579
- }
580
-
581
- },{}],"adUzY":[function(require,module,exports) {
582
- var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
583
- parcelHelpers.defineInteropFlag(exports);
584
- parcelHelpers.export(exports, "EyeIcon", ()=>EyeIcon);
585
- var _jaxsJs = require("../../dist/jaxs.js");
586
- const app = (0, _jaxsJs.createApp)();
587
- const EyeIcon = ()=>{
588
- return /*#__PURE__*/ (0, _jaxsJs.jsx)("svg", {
589
- xmlns: "http://www.w3.org/2000/svg",
590
- class: "icon icon-tabler icon-tabler-eye",
591
- width: "24",
592
- height: "24",
593
- viewBox: "0 0 24 24",
594
- "stroke-width": "2",
595
- stroke: "currentColor",
596
- fill: "none",
597
- "stroke-linecap": "round",
598
- "stroke-linejoin": "round",
599
- __source: {
600
- fileName: "cypress/jaxs-apps/svg.jsx",
601
- lineNumber: 7,
602
- columnNumber: 5
603
- },
604
- __self: undefined
605
- }, /*#__PURE__*/ (0, _jaxsJs.jsx)("path", {
606
- stroke: "none",
607
- d: "M0 0h24v24H0z",
608
- fill: "none",
609
- __source: {
610
- fileName: "cypress/jaxs-apps/svg.jsx",
611
- lineNumber: 8,
612
- columnNumber: 7
613
- },
614
- __self: undefined
615
- }), /*#__PURE__*/ (0, _jaxsJs.jsx)("path", {
616
- d: "M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",
617
- __source: {
618
- fileName: "cypress/jaxs-apps/svg.jsx",
619
- lineNumber: 9,
620
- columnNumber: 7
621
- },
622
- __self: undefined
623
- }), /*#__PURE__*/ (0, _jaxsJs.jsx)("path", {
624
- d: "M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",
625
- __source: {
626
- fileName: "cypress/jaxs-apps/svg.jsx",
627
- lineNumber: 10,
628
- columnNumber: 7
629
- },
630
- __self: undefined
631
- }));
632
- };
633
- app.render(/*#__PURE__*/ (0, _jaxsJs.jsx)(EyeIcon, {
634
- __source: {
635
- fileName: "cypress/jaxs-apps/svg.jsx",
636
- lineNumber: 15,
637
- columnNumber: 12
638
- },
639
- __self: undefined
640
- }), "#app");
641
-
642
- },{"../../dist/jaxs.js":"bAfYR","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}]},["cHD8g","adUzY"], "adUzY", "parcelRequireee15")
643
-
644
- //# sourceMappingURL=svg.04290504.js.map