@barefootjs/client 0.33.6 → 0.35.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.
@@ -168761,6 +168761,18 @@ var import_typescript10 = __toESM(require_typescript(), 1);
168761
168761
 
168762
168762
  // ../jsx/src/expression-parser.ts
168763
168763
  var import_typescript = __toESM(require_typescript(), 1);
168764
+
168765
+ // ../jsx/src/lowering-registry.ts
168766
+ var plugins = [];
168767
+ function registerLoweringPlugin(plugin) {
168768
+ const existing = plugins.findIndex((p) => p.name === plugin.name);
168769
+ if (existing >= 0)
168770
+ plugins[existing] = plugin;
168771
+ else
168772
+ plugins.push(plugin);
168773
+ }
168774
+
168775
+ // ../jsx/src/expression-parser.ts
168764
168776
  var UNSUPPORTED_METHODS = new Set([
168765
168777
  "filter",
168766
168778
  "map",
@@ -169083,6 +169095,12 @@ class BindingScope {
169083
169095
  }
169084
169096
  }
169085
169097
 
169098
+ // ../jsx/src/ir-to-client-js/safe-html.ts
169099
+ function safeHtml(expr) {
169100
+ return expr;
169101
+ }
169102
+ var EMPTY_MARKUP = safeHtml("''");
169103
+
169086
169104
  // ../jsx/src/ir-to-client-js/html-template.ts
169087
169105
  var VOID_ELEMENTS = new Set([
169088
169106
  "area",
@@ -169369,6 +169387,7 @@ var CLIENT_EXPORTS = new Set([
169369
169387
  "isSSRPortal",
169370
169388
  "findSiblingSlot",
169371
169389
  "cleanupPortalPlaceholder",
169390
+ "trackPosition",
169372
169391
  "createSearchParams",
169373
169392
  "queryHref",
169374
169393
  "formatDate",
@@ -169429,7 +169448,8 @@ var BROWSER_ONLY_CLIENT_APIS = new Set([
169429
169448
  "createPortal",
169430
169449
  "isSSRPortal",
169431
169450
  "findSiblingSlot",
169432
- "cleanupPortalPlaceholder"
169451
+ "cleanupPortalPlaceholder",
169452
+ "trackPosition"
169433
169453
  ]);
169434
169454
  var REACTIVE_PRIMITIVES = new Set([
169435
169455
  "createSignal",
@@ -170014,18 +170034,6 @@ var import_typescript16 = __toESM(require_typescript(), 1);
170014
170034
 
170015
170035
  // ../jsx/src/relocate.ts
170016
170036
  var import_typescript18 = __toESM(require_typescript(), 1);
170017
-
170018
- // ../jsx/src/lowering-registry.ts
170019
- var plugins = [];
170020
- function registerLoweringPlugin(plugin) {
170021
- const existing = plugins.findIndex((p) => p.name === plugin.name);
170022
- if (existing >= 0)
170023
- plugins[existing] = plugin;
170024
- else
170025
- plugins.push(plugin);
170026
- }
170027
-
170028
- // ../jsx/src/relocate.ts
170029
170037
  var REGISTRY_SAFE_BINDING_KINDS = new Set([
170030
170038
  "global",
170031
170039
  "module-import",
package/dist/index.d.ts CHANGED
@@ -7,6 +7,6 @@ export { unwrap } from './unwrap.ts';
7
7
  export { queryHref, type QueryParams, type QueryParamValue } from './query-href.ts';
8
8
  export { formatDate } from './format-date.ts';
9
9
  export { createContext, type Context } from './context.ts';
10
- export { useContext, provideContext, createPortal, isSSRPortal, findSiblingSlot, cleanupPortalPlaceholder, type Portal, type PortalChildren, type PortalOptions, type Renderable, } from './shims.ts';
10
+ export { useContext, provideContext, createPortal, isSSRPortal, findSiblingSlot, cleanupPortalPlaceholder, trackPosition, type Portal, type PortalChildren, type PortalOptions, type Renderable, } from './shims.ts';
11
11
  export { Async, Region, type AsyncProps, type RegionProps, } from './builtins.ts';
12
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,sBAAsB,EACtB,UAAU,EACV,cAAc,EACd,UAAU,EACV,SAAS,EACT,OAAO,EACP,OAAO,EACP,KAAK,EACL,eAAe,EACf,SAAS,EACT,OAAO,EACP,gBAAgB,EAMhB,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,sBAAsB,EACtB,KAAK,QAAQ,EACb,KAAK,MAAM,EACX,KAAK,IAAI,EACT,KAAK,SAAS,EACd,KAAK,QAA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EACd,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,cAAc,GACpB,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EACL,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,aAAa,GACnB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C,OAAO,EAAE,MAAM,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAA;AAEnD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,OAAO,EAAE,SAAS,EAAE,KAAK,WAAW,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C,OAAO,EAAE,aAAa,EAAE,KAAK,OAAO,EAAE,MAAM,cAAc,CAAA;AAE1D,OAAO,EACL,UAAU,EACV,cAAc,EACd,YAAY,EACZ,WAAW,EACX,eAAe,EACf,wBAAwB,EACxB,aAAa,EACb,KAAK,MAAM,EACX,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,UAAU,GAChB,MAAM,YAAY,CAAA;AAKnB,OAAO,EACL,KAAK,EACL,MAAM,EACN,KAAK,UAAU,EACf,KAAK,WAAW,GACjB,MAAM,eAAe,CAAA"}
package/dist/index.js CHANGED
@@ -285,6 +285,9 @@ function findSiblingSlot(_el, _slotSelector) {
285
285
  function cleanupPortalPlaceholder(_portalId) {
286
286
  return browserOnly("cleanupPortalPlaceholder");
287
287
  }
288
+ function trackPosition(_update) {
289
+ return browserOnly("trackPosition");
290
+ }
288
291
  // src/builtins.ts
289
292
  function compiledAway(name) {
290
293
  throw new Error(`[barefootjs] <${name}> is a compiler built-in and is compiled away. ` + `If you are seeing this at runtime, the JSX was rendered without going ` + `through the BarefootJS compiler — please report a bug.`);
@@ -299,6 +302,7 @@ export {
299
302
  useContext,
300
303
  unwrap,
301
304
  untrack,
305
+ trackPosition,
302
306
  splitProps,
303
307
  setProfilerSink,
304
308
  queryHref,
@@ -189,6 +189,29 @@ export declare function escapeAttr(value: unknown): string;
189
189
  * the reactive path.
190
190
  */
191
191
  export declare function escapeText(value: unknown): string;
192
+ /**
193
+ * Neutralize a value for splicing into an HTML COMMENT (`<!--...-->`), the
194
+ * whole-item loop conditional's `bf-loop-i:<key>` anchor (#1665,
195
+ * `itemAnchorTemplate` in `ir-to-client-js/html-template.ts`) being the one
196
+ * caller today. Standard HTML escaping (`escapeAttr`/`escapeText`) does
197
+ * NOT help here: `-`, `<`, `>` are not special in comment content the way
198
+ * `& < > " '` are in text/attributes — the only thing that terminates a
199
+ * comment early is the literal three-character sequence `-->`, which
200
+ * `escapeAttr` never touches.
201
+ *
202
+ * The key's exact text does not need to round-trip: nothing reads it back
203
+ * out of the DOM (`mapArrayAnchored` matches items positionally on first
204
+ * hydration and by its own JS-computed key afterward, never by re-parsing
205
+ * `Comment.nodeValue`, `map-array.ts`'s `isItemAnchor`/`findItemAnchors`).
206
+ * So replacing every ASCII hyphen with the visually-similar U+2010 HYPHEN
207
+ * is sufficient and simpler than a reversible escape: it makes `-->`
208
+ * unconstructible from the result (a hyphen adjacent to the template's own
209
+ * literal `-->` can no longer complete the sequence), and — because it is
210
+ * a different Unicode character rather than an HTML entity — needs no
211
+ * decoding: HTML comments do not interpret character references at all,
212
+ * so `&#45;` would appear as literal text `&#45;`, not `-`.
213
+ */
214
+ export declare function escapeCommentText(value: unknown): string;
192
215
  /**
193
216
  * Brand carried by `bfMarkup()` — see that function's docstring. A string
194
217
  * key (not a `Symbol`) because the brand must survive `structuredClone`
@@ -213,7 +236,7 @@ export interface BfMarkup {
213
236
  * itself assembled from a JSX element passed at a non-`children` component
214
237
  * prop position (`header={<strong>Title</strong>}`) — every text segment
215
238
  * inside that assembly was already escaped node-by-node during the
216
- * assembly (the same `escapeHtml` / `escapeTextSlotExpr` calls
239
+ * assembly (the same `escapeHtml` calls / `spliceChildValue` door
217
240
  * `html-template.ts` uses for ordinary element children), so the
218
241
  * concatenated result is exactly as safe as any other compiler-emitted
219
242
  * template fragment.
@@ -231,8 +254,8 @@ export declare function isBfMarkup(value: unknown): value is BfMarkup;
231
254
  /**
232
255
  * `escapeText`'s counterpart for a claim-plan slot the compiler has
233
256
  * classified `kind: 'markup'` at STATIC/initial-render time
234
- * (`html-template.ts`'s `escapeTextSlotExpr`, gated on the same
235
- * `ctx.dynamicElements` membership `emit-reactive.ts` reads to pick the
257
+ * (`html-template.ts`'s `spliceChildValue` door, `safe-html.ts`, gated on
258
+ * the same `ctx.dynamicElements` membership `emit-reactive.ts` reads to pick the
236
259
  * writer kind for the REACTIVE side, below) — #2651. A `bfMarkup()`-branded
237
260
  * value is compiler-built HTML the compiler already escaped piecewise
238
261
  * while assembling it, and must reach the template raw, unescaped a second
@@ -245,9 +268,8 @@ export declare function isBfMarkup(value: unknown): value is BfMarkup;
245
268
  export declare function escapeTextOrMarkup(value: unknown): string;
246
269
  /**
247
270
  * Nullish guard for a bare `${children}` passthrough splice
248
- * (`ir-to-client-js/html-template.ts`'s no-`slotId` `'expression'` branches
249
- * — the "bare `${...}` interpolations" the docstring above `escapeTextSlotExpr`
250
- * describes) — #2775. The value here is ALREADY-STRINGIFIED MARKUP, not an
271
+ * (`ir-to-client-js/safe-html.ts`'s `spliceChildValue` door, no-`slotId`
272
+ * `'expression'` branches) #2775. The value here is ALREADY-STRINGIFIED MARKUP, not an
251
273
  * arbitrary prop: `materializeComponent` (this file, "Template functions
252
274
  * expect children as an HTML string, not an array") joins a component's
253
275
  * `children` into an HTML string before the template lambda ever runs, so by
@@ -278,7 +300,7 @@ export declare function markupOrEmpty(value: unknown): string;
278
300
  * interpret HTML, so a raw un-escaped string is an injection/corruption
279
301
  * risk exactly where the initial SSR/CSR TEMPLATE already calls
280
302
  * `escapeText` on the same expression (`html-template.ts`'s
281
- * `escapeTextSlotExpr`). A live `Node`, by contrast, must pass through
303
+ * `spliceChildValue` door, `safe-html.ts`). A live `Node`, by contrast, must pass through
282
304
  * untouched — `escapeText(node)` would stringify it to garbage, and
283
305
  * `writeMarkup`'s own `instanceof Node` check needs the real object to
284
306
  * splice in by identity. This is the single call every "dynamic JSX/text
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/runtime/component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAmBH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAS9C,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAExD;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAQpE;AAED;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG;IAAE,SAAS,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;CAAE,CAAA;AAsB9F,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,aAAa,GAAG,IAAI,GAAG,aAAa,GAAG,IAAI,CAI9E;AAQD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,CAQjD;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH;;;GAGG;AACH;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACtC,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAA;IACd,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,MAAM,GAAG,YAAY,EAChC,KA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,MAAM,CAEjD;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAOjD;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAGjD;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAGxD;AAED;;;;;;GAMG;AACH,QAAA,MAAM,eAAe,eAAe,CAAA;AAEpC;;;;;;GAMG;AACH,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,CAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CACnC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAE/C;AAED,8GAA8G;AAC9G,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,QAAQ,CAU5D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAGzD;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEpD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAI9D;AAaD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,gBAAgB,CAejF"}
@@ -8,6 +8,7 @@ export { queryHref, type QueryParams, type QueryParamValue } from '../query-href
8
8
  export { formatDate } from '../format-date.ts';
9
9
  export { createContext, useContext, provideContext, setCurrentScope, type Context, } from './context.ts';
10
10
  export { createPortal, isSSRPortal, findSiblingSlot, cleanupPortalPlaceholder, type Portal, type PortalOptions, type Renderable, type PortalChildren, } from './portal.ts';
11
+ export { trackPosition } from './track-position.ts';
11
12
  export { getLoopChildren, getLoopNodes } from './loop-markers.ts';
12
13
  export { qsaItem, upsertChildItem } from './qsa-item.ts';
13
14
  export { mapArray, mapArrayAnchored } from './map-array.ts';
@@ -15,7 +16,7 @@ export { mapArrayLazy, type LazyRowEntry, type LazyRowPlan } from './map-array-l
15
16
  export { patchLeaf } from './patch-leaf.ts';
16
17
  export { claimSlots, lazySlots, lazyClaimSlots, textOrNode, type SlotSpec, type ClaimPlan, type ClaimedSlots, type ClaimedSlotsRW, type SlotWriter } from './claim-slots.ts';
17
18
  export { registerTemplate, getTemplate, hasTemplate, type TemplateFn } from './template.ts';
18
- export { createComponent, mountRowRoot, renderChild, withParentScope, parseHTML, escapeAttr, escapeText, escapeTextOrNode, bfMarkup, isBfMarkup, escapeTextOrMarkup, markupOrEmpty, type BfMarkup, } from './component.ts';
19
+ export { createComponent, mountRowRoot, renderChild, withParentScope, parseHTML, escapeAttr, escapeText, escapeCommentText, escapeTextOrNode, bfMarkup, isBfMarkup, escapeTextOrMarkup, markupOrEmpty, type BfMarkup, } from './component.ts';
19
20
  export { applyRestAttrs } from './apply-rest-attrs.ts';
20
21
  export { spreadAttrs } from './spread-attrs.ts';
21
22
  export { styleToCss } from './style.ts';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,sBAAsB,EACtB,UAAU,EACV,cAAc,EACd,UAAU,EACV,SAAS,EACT,OAAO,EACP,OAAO,EACP,KAAK,EACL,eAAe,EACf,SAAS,EACT,OAAO,EACP,gBAAgB,EAOhB,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,sBAAsB,EACtB,KAAK,QAAQ,EACb,KAAK,MAAM,EACX,KAAK,IAAI,EACT,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,CAAA;AAC9G,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AACpH,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3F,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,KAAK,YAAY,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAA;AACrG,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAQ3C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAG5C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAGrD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAGpC,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAG1D,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA"}
@@ -9,7 +9,7 @@ import {
9
9
  onCleanup,
10
10
  onMount,
11
11
  untrack as untrack4,
12
- batch,
12
+ batch as batch2,
13
13
  setProfilerSink,
14
14
  beginTurn,
15
15
  endTurn,
@@ -1614,6 +1614,11 @@ function escapeText(value) {
1614
1614
  return "";
1615
1615
  return escapeAttr(value);
1616
1616
  }
1617
+ function escapeCommentText(value) {
1618
+ if (value == null)
1619
+ return "";
1620
+ return String(value).replace(/-/g, "‐");
1621
+ }
1617
1622
  var BF_MARKUP_BRAND = "__bfMarkup";
1618
1623
  function bfMarkup(html) {
1619
1624
  return { [BF_MARKUP_BRAND]: html };
@@ -1747,6 +1752,46 @@ function cleanupPortalPlaceholder(portalId) {
1747
1752
  const placeholder = document.querySelector(`template[${BF_PORTAL_PLACEHOLDER}="${portalId}"]`);
1748
1753
  placeholder?.remove();
1749
1754
  }
1755
+ var pendingPortals = [];
1756
+ var pendingObserver = null;
1757
+ function moveToContainerEnd(container, element) {
1758
+ const moveBefore = container.moveBefore;
1759
+ if (typeof moveBefore === "function") {
1760
+ moveBefore.call(container, element, null);
1761
+ } else {
1762
+ container.appendChild(element);
1763
+ }
1764
+ }
1765
+ function flushPendingPortals() {
1766
+ for (const pending of pendingPortals.slice()) {
1767
+ if (!pending.subject.isConnected)
1768
+ continue;
1769
+ pendingPortals.splice(pendingPortals.indexOf(pending), 1);
1770
+ if (pending.element.parentNode === pending.container) {
1771
+ moveToContainerEnd(pending.container, pending.element);
1772
+ }
1773
+ }
1774
+ if (pendingPortals.length === 0 && pendingObserver) {
1775
+ pendingObserver.disconnect();
1776
+ pendingObserver = null;
1777
+ }
1778
+ }
1779
+ function enqueuePendingPortal(pending) {
1780
+ pendingPortals.push(pending);
1781
+ if (!pendingObserver) {
1782
+ pendingObserver = new MutationObserver(flushPendingPortals);
1783
+ pendingObserver.observe(document, { childList: true, subtree: true });
1784
+ }
1785
+ }
1786
+ function cancelPendingPortal(element) {
1787
+ const idx = pendingPortals.findIndex((p) => p.element === element);
1788
+ if (idx >= 0)
1789
+ pendingPortals.splice(idx, 1);
1790
+ if (pendingPortals.length === 0 && pendingObserver) {
1791
+ pendingObserver.disconnect();
1792
+ pendingObserver = null;
1793
+ }
1794
+ }
1750
1795
  function createPortal(children, container = document.body, options) {
1751
1796
  let element;
1752
1797
  if (children instanceof HTMLElement) {
@@ -1768,16 +1813,35 @@ function createPortal(children, container = document.body, options) {
1768
1813
  element.setAttribute(BF_PORTAL_OWNER, scopeId);
1769
1814
  }
1770
1815
  }
1816
+ const owner = options?.ownerScope;
1817
+ const formerParent = children instanceof HTMLElement ? children.parentNode : null;
1818
+ const subject = owner && !element.contains(owner) ? owner : formerParent instanceof Element ? formerParent : null;
1771
1819
  container.appendChild(element);
1820
+ if (subject && !subject.isConnected && typeof MutationObserver !== "undefined") {
1821
+ enqueuePendingPortal({ element, container, subject });
1822
+ }
1772
1823
  return {
1773
1824
  element,
1774
1825
  unmount() {
1826
+ cancelPendingPortal(element);
1775
1827
  if (element.parentNode) {
1776
1828
  element.parentNode.removeChild(element);
1777
1829
  }
1778
1830
  }
1779
1831
  };
1780
1832
  }
1833
+ // src/runtime/track-position.ts
1834
+ function trackPosition(update) {
1835
+ update();
1836
+ const onChange = () => update();
1837
+ window.addEventListener("scroll", onChange, true);
1838
+ window.addEventListener("resize", onChange);
1839
+ return () => {
1840
+ window.removeEventListener("scroll", onChange, true);
1841
+ window.removeEventListener("resize", onChange);
1842
+ update();
1843
+ };
1844
+ }
1781
1845
  // src/runtime/loop-markers.ts
1782
1846
  function findLoopMarkers(container, markerId) {
1783
1847
  let startMarker = null;
@@ -1904,7 +1968,7 @@ function upsertChildItem(primaryEl, name, slotId, props, key, anchorScope) {
1904
1968
  return null;
1905
1969
  }
1906
1970
  // src/runtime/map-array.ts
1907
- import { createSignal, createEffect, createRoot as createRoot2 } from "@barefootjs/client/reactive";
1971
+ import { createSignal, createEffect, createRoot as createRoot2, batch } from "@barefootjs/client/reactive";
1908
1972
  function scopeIdOf(start) {
1909
1973
  const rest = (start.nodeValue ?? "").slice(BF_SCOPE_COMMENT_PREFIX.length);
1910
1974
  const pipe = rest.indexOf("|");
@@ -2049,17 +2113,20 @@ function createItemScope(item, index, renderItem, existingPrimary, existingExtra
2049
2113
  let primaryEl;
2050
2114
  let dispose;
2051
2115
  let setItem;
2116
+ let setIndex;
2052
2117
  let extras = [];
2053
2118
  let startMarker = null;
2054
2119
  let scopeComments = null;
2055
2120
  createRoot2((d) => {
2056
2121
  dispose = d;
2057
2122
  const [itemAccessor, itemSetter] = createSignal(item);
2123
+ const [indexAccessor, indexSetter] = createSignal(index);
2058
2124
  setItem = itemSetter;
2125
+ setIndex = indexSetter;
2059
2126
  const ownsRowMount = !existingPrimary && !!rowMount;
2060
2127
  const prevRowMount = ownsRowMount ? setRowMountPoint(rowMount) : null;
2061
2128
  try {
2062
- primaryEl = renderItem(itemAccessor, index, existingPrimary);
2129
+ primaryEl = renderItem(itemAccessor, indexAccessor, existingPrimary);
2063
2130
  } catch (err) {
2064
2131
  const parked = rowMount?.mounted;
2065
2132
  if (parked?.parentNode)
@@ -2092,7 +2159,7 @@ function createItemScope(item, index, renderItem, existingPrimary, existingExtra
2092
2159
  if (rowMount && !existingPrimary && extras.length > 0 && primaryEl.parentNode) {
2093
2160
  primaryEl.remove();
2094
2161
  }
2095
- return { startMarker, primaryEl, extras, scopeComments, dispose, setItem };
2162
+ return { startMarker, primaryEl, extras, scopeComments, dispose, setItem, setIndex };
2096
2163
  }
2097
2164
  function mapArray(accessor, container, getKey, renderItem, markerId, bfId, keyAttrName2 = BF_KEY) {
2098
2165
  if (!container)
@@ -2170,7 +2237,8 @@ function mapArray(accessor, container, getKey, renderItem, markerId, bfId, keyAt
2170
2237
  extras: range.extras,
2171
2238
  scopeComments: range.scopeComments,
2172
2239
  dispose: () => {},
2173
- setItem: () => {}
2240
+ setItem: () => {},
2241
+ setIndex: () => {}
2174
2242
  });
2175
2243
  }
2176
2244
  }
@@ -2216,7 +2284,10 @@ function mapArray(accessor, container, getKey, renderItem, markerId, bfId, keyAt
2216
2284
  newKeys.add(key);
2217
2285
  const existing = scopes.get(key);
2218
2286
  if (existing) {
2219
- existing.setItem(item);
2287
+ batch(() => {
2288
+ existing.setItem(item);
2289
+ existing.setIndex(i2);
2290
+ });
2220
2291
  desiredOrder.push(existing);
2221
2292
  } else {
2222
2293
  const scope = createItemScope(item, i2, renderItem, undefined, undefined, undefined, undefined, { container, anchor });
@@ -2314,23 +2385,26 @@ function removeAnchorScope(scope, end) {
2314
2385
  function createAnchorScope(item, index, key, renderItem, existingAnchor) {
2315
2386
  let dispose;
2316
2387
  let setItem;
2388
+ let setIndex;
2317
2389
  let returned;
2318
2390
  createRoot2((d) => {
2319
2391
  dispose = d;
2320
2392
  const [itemAccessor, itemSetter] = createSignal(item);
2393
+ const [indexAccessor, indexSetter] = createSignal(index);
2321
2394
  setItem = itemSetter;
2322
- returned = renderItem(itemAccessor, index, existingAnchor);
2395
+ setIndex = indexSetter;
2396
+ returned = renderItem(itemAccessor, indexAccessor, existingAnchor);
2323
2397
  return;
2324
2398
  });
2325
2399
  if (existingAnchor) {
2326
- return { anchor: existingAnchor, pending: null, dispose, setItem };
2400
+ return { anchor: existingAnchor, pending: null, dispose, setItem, setIndex };
2327
2401
  }
2328
2402
  const frag = returned;
2329
2403
  const anchor = frag.firstChild;
2330
2404
  if (anchor && !anchor.nodeValue?.startsWith(ITEM_PREFIX)) {
2331
2405
  anchor.nodeValue = loopItemMarker(key);
2332
2406
  }
2333
- return { anchor, pending: frag, dispose, setItem };
2407
+ return { anchor, pending: frag, dispose, setItem, setIndex };
2334
2408
  }
2335
2409
  function mapArrayAnchored(accessor, container, getKey, renderItem, markerId, bfId) {
2336
2410
  if (!container)
@@ -2381,7 +2455,10 @@ function mapArrayAnchored(accessor, container, getKey, renderItem, markerId, bfI
2381
2455
  newKeys.add(key);
2382
2456
  const existing = scopes.get(key);
2383
2457
  if (existing) {
2384
- existing.setItem(item);
2458
+ batch(() => {
2459
+ existing.setItem(item);
2460
+ existing.setIndex(i);
2461
+ });
2385
2462
  desiredOrder.push(existing);
2386
2463
  } else {
2387
2464
  const scope = createAnchorScope(item, i, key, renderItem);
@@ -2452,6 +2529,7 @@ function mapArrayLazy(accessor, container, getKey, plan, markerId, bfId, keyAttr
2452
2529
  key,
2453
2530
  primaryEl: undefined,
2454
2531
  item,
2532
+ index,
2455
2533
  refs: null,
2456
2534
  last: null
2457
2535
  };
@@ -2481,7 +2559,7 @@ function mapArrayLazy(accessor, container, getKey, plan, markerId, bfId, keyAttr
2481
2559
  const el = doms[i2];
2482
2560
  const ssrKey = el.getAttribute(keyAttrName2);
2483
2561
  const key = ssrKey !== null ? ssrKey : getKey ? getKey(items[i2], i2) : String(i2);
2484
- const entry = { key, primaryEl: el, item: items[i2], refs: null, last: null };
2562
+ const entry = { key, primaryEl: el, item: items[i2], index: i2, refs: null, last: null };
2485
2563
  entries.set(key, entry);
2486
2564
  list.push(entry);
2487
2565
  }
@@ -2536,11 +2614,19 @@ function mapArrayLazy(accessor, container, getKey, plan, markerId, bfId, keyAttr
2536
2614
  newKeys.add(key);
2537
2615
  const existing = entries.get(key);
2538
2616
  if (existing) {
2539
- if (!Object.is(existing.item, item)) {
2617
+ const itemChanged = !Object.is(existing.item, item);
2618
+ const indexChanged = plan.indexDriven === true && existing.index !== i2;
2619
+ if (itemChanged) {
2540
2620
  const prevItem = existing.item;
2541
2621
  existing.item = item;
2622
+ existing.index = i2;
2542
2623
  untrack2(() => plan.applyItem(existing, prevItem));
2543
2624
  markStranded();
2625
+ } else if (indexChanged) {
2626
+ existing.index = i2;
2627
+ untrack2(() => plan.applyItem(existing, item));
2628
+ } else {
2629
+ existing.index = i2;
2544
2630
  }
2545
2631
  desiredOrder.push(existing);
2546
2632
  } else {
@@ -3402,6 +3488,7 @@ export {
3402
3488
  upsertChild,
3403
3489
  unwrap,
3404
3490
  untrack4 as untrack,
3491
+ trackPosition,
3405
3492
  textOrNode,
3406
3493
  textNodeAfterComment as tAfter,
3407
3494
  styleToCss,
@@ -3455,6 +3542,7 @@ export {
3455
3542
  escapeTextOrNode,
3456
3543
  escapeTextOrMarkup,
3457
3544
  escapeText,
3545
+ escapeCommentText,
3458
3546
  escapeAttr,
3459
3547
  endTurn,
3460
3548
  disposeScope,
@@ -3475,7 +3563,7 @@ export {
3475
3563
  claimSlots,
3476
3564
  bfMarkup,
3477
3565
  beginTurn,
3478
- batch,
3566
+ batch2 as batch,
3479
3567
  applyRestAttrs,
3480
3568
  __slot,
3481
3569
  __bf_swap,
@@ -65,6 +65,18 @@
65
65
  * (a misclassification must be harmless, not silently wrong) and for the
66
66
  * three stranding sequences it prevents, each reproduced before it existed.
67
67
  *
68
+ * **Index-driven bindings (#2859 follow-up).** A row's position is tracked
69
+ * on `entry.index`, updated on every reconcile whether or not any binding
70
+ * reads it. A plan that sets `indexDriven: true` (emitted when
71
+ * `LazyRowPlanData.readsIndex`) is telling the runtime that some binding of
72
+ * `applyItem` reads `entry.index` — so the reconciler also calls
73
+ * `applyItem` on a pure reorder (item unchanged, position changed), not only
74
+ * on an item change. This mirrors the eager `mapArray` runtime's per-row
75
+ * index SIGNAL (`ItemScope.setIndex`) with no per-row reactive resource: the
76
+ * reconciler already knows a row's position changed the same way it already
77
+ * knows its item changed, so re-delivering that fact through a signal would
78
+ * be exactly the redundant machinery this design exists to avoid.
79
+ *
68
80
  * **Plan (compiler-emitted) obligations:**
69
81
  * - `createRow` MUST write ALL bindings — item-driven AND outer-involving —
70
82
  * with current values (it is CSR creation; it computes everything anyway)
@@ -121,6 +133,13 @@ export interface LazyRowEntry<T> {
121
133
  key: string;
122
134
  primaryEl: HTMLElement;
123
135
  item: T;
136
+ /**
137
+ * The row's current position in the reconciled list (#2859 follow-up).
138
+ * Kept current on EVERY reconcile, whether or not the plan reads it —
139
+ * cheap bookkeeping, and it is what makes a bare reorder (no item change)
140
+ * detectable for `plan.indexDriven` loops.
141
+ */
142
+ index: number;
124
143
  /** plan-owned: claimed DOM refs, null until the row's first item-driven write */
125
144
  refs: unknown | null;
126
145
  /** plan-owned: per-binding last-value dedup state */
@@ -149,6 +168,16 @@ export interface LazyRowPlan<T> {
149
168
  * nodeValue) to initialize its dedup value and write only where the
150
169
  * computed value differs (read-compare-write, spec §9.3(1)). */
151
170
  applyOuter?(entries: ReadonlyArray<LazyRowEntry<T>>, seed: boolean): void;
171
+ /**
172
+ * True when some binding, condition, or preamble-substituted dependency of
173
+ * this row reads the loop's INDEX (#2859 follow-up,
174
+ * `LazyRowPlanData.readsIndex`). Such a binding is always `readsItem`
175
+ * (compiler-side), so the runtime must also call `applyItem` when a row's
176
+ * POSITION changes with no item change — a plain reorder — not only when
177
+ * `!Object.is(oldItem, newItem)`. Absent/false for every other loop, which
178
+ * keeps a bare reorder exactly as cheap as before this widening.
179
+ */
180
+ indexDriven?: boolean;
152
181
  }
153
182
  /**
154
183
  * Lazy-row-graph keyed list rendering (spec/slot-unification.md §9).
@@ -1 +1 @@
1
- {"version":3,"file":"map-array-lazy.d.ts","sourceRoot":"","sources":["../../src/runtime/map-array-lazy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkHG;AAMH;;;GAGG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,WAAW,CAAA;IACtB,IAAI,EAAE,CAAC,CAAA;IACP,iFAAiF;IACjF,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;IACpB,qDAAqD;IACrD,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B;gFAC4E;IAC5E,SAAS,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,CAAA;IAC7D;;;4EAGwE;IACxE,SAAS,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,CAAA;IACpD;;;;;;;qEAOiE;IACjE,UAAU,CAAC,CAAC,OAAO,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;CAC1E;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,QAAQ,EAAE,MAAM,CAAC,EAAE,EACnB,SAAS,EAAE,WAAW,GAAG,IAAI,EAC7B,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,IAAI,EACnD,IAAI,EAAE,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Q,EAAE,MAAM,CAAC,EAAE,EACnB,SAAS,EAAE,WAAW,GAAG,IAAI,EAC7B,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,IAAI,EACnD,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EACpB,QAAQ,CAAC,EAAE,MAAM,EACjB,IAAI,CAAC,EAAE,MAAM,EACb,WAAW,GAAE,MAAe,GAC3B,IAAI,CAwTN"}
@@ -17,6 +17,16 @@
17
17
  * extras...) triple — moves, mounts, and unmounts as a single unit.
18
18
  * Single-root loops continue to flow through the legacy path verbatim.
19
19
  */
20
+ /**
21
+ * Shape `renderItem` callbacks are compiled to. `index` mirrors `item`:
22
+ * an accessor, not a plain number, so a row body's reference to the raw
23
+ * `.map()` index parameter — rewritten to a call by
24
+ * `wrapLoopParamAsAccessor` — reads the row's CURRENT position instead of
25
+ * the value captured when the row was first created (#2859). `existing`
26
+ * stays optional/untyped-per-call-site since `mapArray` and
27
+ * `mapArrayAnchored` return different element shapes.
28
+ */
29
+ export type RenderItem<T, E, R> = (item: () => T, index: () => number, existing?: E) => R;
20
30
  /**
21
31
  * Find loop boundary comment markers in a container.
22
32
  *
@@ -73,7 +83,7 @@ export declare function longestIncreasingSubsequenceIndices(arr: number[]): numb
73
83
  * replaced a hardcoded constant instead of just fixing
74
84
  * the value).
75
85
  */
76
- export declare function mapArray<T>(accessor: () => T[], container: HTMLElement | null, getKey: ((item: T, index: number) => string) | null, renderItem: (item: () => T, index: number, existing?: HTMLElement) => HTMLElement, markerId?: string, bfId?: string, keyAttrName?: string): void;
86
+ export declare function mapArray<T>(accessor: () => T[], container: HTMLElement | null, getKey: ((item: T, index: number) => string) | null, renderItem: RenderItem<T, HTMLElement, HTMLElement>, markerId?: string, bfId?: string, keyAttrName?: string): void;
77
87
  /**
78
88
  * Per-item scoped list rendering for whole-item conditionals (#1665).
79
89
  *
@@ -82,5 +92,5 @@ export declare function mapArray<T>(accessor: () => T[], container: HTMLElement
82
92
  * (hydration). Items may render zero elements; the anchor is the stable
83
93
  * identity and position.
84
94
  */
85
- export declare function mapArrayAnchored<T>(accessor: () => T[], container: HTMLElement | null, getKey: ((item: T, index: number) => string) | null, renderItem: (item: () => T, index: number, existing?: Comment) => DocumentFragment | Comment, markerId?: string, bfId?: string): void;
95
+ export declare function mapArrayAnchored<T>(accessor: () => T[], container: HTMLElement | null, getKey: ((item: T, index: number) => string) | null, renderItem: RenderItem<T, Comment, DocumentFragment | Comment>, markerId?: string, bfId?: string): void;
86
96
  //# sourceMappingURL=map-array.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"map-array.d.ts","sourceRoot":"","sources":["../../src/runtime/map-array.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAkEH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,WAAW,EACtB,QAAQ,CAAC,EAAE,MAAM,GAChB;IAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAAA;CAAE,CA+BhD;AAyHD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mCAAmC,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CA2B3E;AA4GD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EACxB,QAAQ,EAAE,MAAM,CAAC,EAAE,EACnB,SAAS,EAAE,WAAW,GAAG,IAAI,EAC7B,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,IAAI,EACnD,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,WAAW,KAAK,WAAW,EACjF,QAAQ,CAAC,EAAE,MAAM,EACjB,IAA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EAAE,EACnB,SAAS,EAAE,WAAW,GAAG,IAAI,EAC7B,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,IAAI,EACnD,UAAU,EAAE,UAAU,CAAC,CAAC,EAAE,WAAW,EAAE,WAAW,CAAC,EACnD,QAAQ,CAAC,EAAE,MAAM,EACjB,IAAI,CAAC,EAAE,MAAM,EACb,WAAW,GAAE,MAAe,GAC3B,IAAI,CA4UN;AA0HD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,QAAQ,EAAE,MAAM,CAAC,EAAE,EACnB,SAAS,EAAE,WAAW,GAAG,IAAI,EAC7B,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,IAAI,EACnD,UAAU,EAAE,UAAU,CAAC,CAAC,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,EAC9D,QAAQ,CAAC,EAAE,MAAM,EACjB,IAAI,CAAC,EAAE,MAAM,GACZ,IAAI,CAoGN"}
@@ -92,5 +92,49 @@ export declare function isSSRPortal(element: HTMLElement): boolean;
92
92
  */
93
93
  export declare function findSiblingSlot(el: HTMLElement, slotSelector: string): HTMLElement | null;
94
94
  export declare function cleanupPortalPlaceholder(portalId: string): void;
95
+ /**
96
+ * Insertion rule (#2717): the portal's content is appended to `container`
97
+ * synchronously, at call time, and — when the component it belongs to is
98
+ * not yet in the document — re-appended once that component connects,
99
+ * which moves it to the container's end.
100
+ *
101
+ * - Owner already connected (hydration: SSR markup is in the document
102
+ * before `init` runs), or nothing to wait for: a single append, at the
103
+ * container's end — unchanged behaviour.
104
+ * - Owner not yet connected (a client-side mount: `materializeComponent`
105
+ * runs `init` — and so the `ref` callbacks that call this — BEFORE the
106
+ * bare-`createComponent` caller connects the root): the element is
107
+ * appended now all the same, and a reorder is queued; once the owner
108
+ * connects, pending portals are re-appended in creation order.
109
+ *
110
+ * Without the reorder the two construction paths disagree on
111
+ * `document.body`'s child order: hydration yields `[root, …portals]`
112
+ * while a CSR mount yields `[…portals, root]`, because the root is
113
+ * appended AFTER its portals were. Child order is user-visible (paint
114
+ * order between equal-`z-index` overlays, focus traversal, `querySelector`
115
+ * results), so both paths converge on the hydration answer.
116
+ *
117
+ * The append itself is never deferred: the element is connected to the
118
+ * document at every point in time, only its position among the
119
+ * container's children settles asynchronously (as a microtask, before the
120
+ * next paint). Portal consumers measure layout synchronously in the same
121
+ * tick as their `ref` callback — `createEffect`'s first run is synchronous,
122
+ * and the floating-position components (popover, dropdown-menu, context-
123
+ * menu, …) read `offsetWidth`/`offsetHeight` of the portaled element there,
124
+ * gated only on their open signal — so a portal that was briefly absent
125
+ * from the document would hand them zero-sized boxes with nothing to
126
+ * re-trigger the measurement once it landed.
127
+ *
128
+ * The subject whose connection is awaited is the `ownerScope` when given
129
+ * and it lies outside the element; otherwise the element's former parent.
130
+ * The self-owner shape (`ownerScope === element`: a child component whose
131
+ * own root carries `bf-s`, e.g. DialogOverlay/DialogContent) needs that
132
+ * fallback, since the immediate append connects the element — and so the
133
+ * owner — right away, while the component under construction is the tree
134
+ * it was taken from. An element in a detached tree with no owner (a
135
+ * fragment-root component, whose scope lives on a comment) is the same
136
+ * case. A bare element with neither has nothing that will ever connect
137
+ * it, so there is nothing to wait for.
138
+ */
95
139
  export declare function createPortal(children: PortalChildren, container?: HTMLElement, options?: PortalOptions): Portal;
96
140
  //# sourceMappingURL=portal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"portal.d.ts","sourceRoot":"","sources":["../../src/runtime/portal.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,MAAM,MAAM,MAAM,GAAG;IACnB,0BAA0B;IAC1B,OAAO,EAAE,WAAW,CAAA;IACpB,8CAA8C;IAC9C,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,CAAA;AAED;;GAEG;AACH,MAAM,W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