@isoloop/runtime 0.0.0-next.56111e3 → 0.0.0-next.5bbb503

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 (2) hide show
  1. package/dist/bootstrap.js +27 -8
  2. package/package.json +3 -3
package/dist/bootstrap.js CHANGED
@@ -516,7 +516,7 @@ var ISOLOOP_DOM_FMT;
516
516
  var init_records_wVZrPpqr = __esmMin((() => {
517
517
  ISOLOOP_DOM_FMT = "isoloop-dom@1";
518
518
  }));
519
- // ../dom/dist/dom-9S5T0UVQ.js
519
+ // ../dom/dist/dom-7EzPoV0N.js
520
520
  function createStyle(el) {
521
521
  const decls = /* @__PURE__ */ new Map();
522
522
  const write = () => {
@@ -707,6 +707,10 @@ function createDom(opts) {
707
707
  if (!node) return;
708
708
  if ((node instanceof WHTMLInputElement || node instanceof WHTMLTextAreaElement || node instanceof WHTMLSelectElement) && event.value !== void 0) node.isoSetProp("value", event.value, false);
709
709
  if (node instanceof WHTMLInputElement && event.checked !== void 0) node.isoSetProp("checked", event.checked, false);
710
+ if (event.type === "scroll" && node instanceof WElement) node.isoScroll = {
711
+ top: event.scrollTop ?? 0,
712
+ left: event.scrollLeft ?? 0
713
+ };
710
714
  node.dispatchEvent(toEvent(event));
711
715
  }
712
716
  };
@@ -714,7 +718,7 @@ function createDom(opts) {
714
718
  /** A real `Event` with the fields frameworks read from mouse and keyboard events. */
715
719
  function toEvent(e) {
716
720
  const ev = new Event(e.type, {
717
- bubbles: true,
721
+ bubbles: e.type !== "scroll",
718
722
  cancelable: true
719
723
  });
720
724
  const mods = {
@@ -740,7 +744,7 @@ function toEvent(e) {
740
744
  return ev;
741
745
  }
742
746
  var HTML_NS, SVG_NS, str, domError, WEventTarget, WNode, WCharacterData, WText, WComment, kebab, WDOMTokenList, dataAttr, dataKey, WParentNode, WDocumentFragment, WElement, HANDLER_EVENTS, WHTMLElement, WSVGElement, WHTMLIFrameElement, WHTMLInputElement, WHTMLTextAreaElement, WHTMLSelectElement, WHTMLOptionElement, HTML_CLASSES, WDocument;
743
- var init_dom_9S5T0UVQ = __esmMin((() => {
747
+ var init_dom_7EzPoV0N = __esmMin((() => {
744
748
  HTML_NS = "http://www.w3.org/1999/xhtml";
745
749
  SVG_NS = "http://www.w3.org/2000/svg";
746
750
  str = (v) => typeof v === "string" ? v : typeof v === "number" || typeof v === "boolean" || typeof v === "bigint" ? String(v) : "";
@@ -1172,6 +1176,11 @@ var init_dom_9S5T0UVQ = __esmMin((() => {
1172
1176
  /** @internal */ isoStyle = null;
1173
1177
  /** @internal */ isoClassList = null;
1174
1178
  /** @internal */ isoDataset = null;
1179
+ /** @internal The offsets the last `scroll` event brought (design §4.6). */
1180
+ isoScroll = {
1181
+ top: 0,
1182
+ left: 0
1183
+ };
1175
1184
  constructor(doc, id, localName, ns) {
1176
1185
  super(doc, id);
1177
1186
  this.localName = localName;
@@ -1238,6 +1247,16 @@ var init_dom_9S5T0UVQ = __esmMin((() => {
1238
1247
  this.isoDataset ??= createDataset(this);
1239
1248
  return this.isoDataset;
1240
1249
  }
1250
+ /**
1251
+ * Read only, and as of the last `scroll` event the element got: the host
1252
+ * owns scrolling. 0 until the element is scrolled and listens for `scroll`.
1253
+ */
1254
+ get scrollTop() {
1255
+ return this.isoScroll.top;
1256
+ }
1257
+ get scrollLeft() {
1258
+ return this.isoScroll.left;
1259
+ }
1241
1260
  get id() {
1242
1261
  return this.getAttribute("id") ?? "";
1243
1262
  }
@@ -1543,7 +1562,7 @@ var init_dom_9S5T0UVQ = __esmMin((() => {
1543
1562
  };
1544
1563
  defineHandlers(WDocument.prototype);
1545
1564
  }));
1546
- // ../dom/dist/install-DBKGtAel.js
1565
+ // ../dom/dist/install-DE1VIvyG.js
1547
1566
  /**
1548
1567
  * Exposes `dom` as the worker's `document`, `window` and DOM classes, so
1549
1568
  * frameworks find them where they look. Only for isolates with a surface; a
@@ -1563,8 +1582,8 @@ function install(dom, scope) {
1563
1582
  dom.document.defaultView = scope;
1564
1583
  }
1565
1584
  var DOM_GLOBALS;
1566
- var init_install_DBKGtAel = __esmMin((() => {
1567
- init_dom_9S5T0UVQ();
1585
+ var init_install_DE1VIvyG = __esmMin((() => {
1586
+ init_dom_7EzPoV0N();
1568
1587
  DOM_GLOBALS = {
1569
1588
  Node: WNode,
1570
1589
  Element: WElement,
@@ -1584,8 +1603,8 @@ var init_install_DBKGtAel = __esmMin((() => {
1584
1603
  // ../dom/dist/worker.js
1585
1604
  var init_worker = __esmMin((() => {
1586
1605
  init_records_wVZrPpqr();
1587
- init_dom_9S5T0UVQ();
1588
- init_install_DBKGtAel();
1606
+ init_dom_7EzPoV0N();
1607
+ init_install_DE1VIvyG();
1589
1608
  }));
1590
1609
  // src/render/index.ts
1591
1610
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isoloop/runtime",
3
- "version": "0.0.0-next.56111e3",
3
+ "version": "0.0.0-next.5bbb503",
4
4
  "description": "Isolate-side runtime that runs inside each worker.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -27,8 +27,8 @@
27
27
  }
28
28
  },
29
29
  "dependencies": {
30
- "@isoloop/dom": "0.0.0-next.56111e3",
31
- "@isoloop/protocol": "0.0.0-next.56111e3"
30
+ "@isoloop/dom": "0.0.0-next.5bbb503",
31
+ "@isoloop/protocol": "0.0.0-next.5bbb503"
32
32
  },
33
33
  "devDependencies": {
34
34
  "typescript": "7.0.2"