@absolutejs/absolute 0.19.0-beta.707 → 0.19.0-beta.708
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/angular/browser.js +1 -19
- package/dist/angular/browser.js.map +3 -3
- package/dist/angular/index.js +85 -28
- package/dist/angular/index.js.map +4 -4
- package/dist/angular/server.js +85 -28
- package/dist/angular/server.js.map +4 -4
- package/dist/build.js +224 -137
- package/dist/build.js.map +10 -10
- package/dist/cli/index.js +44 -25
- package/dist/client/index.js +85 -28
- package/dist/client/index.js.map +4 -4
- package/dist/core/streamingSlotRegistrar.js +1 -19
- package/dist/core/streamingSlotRegistrar.js.map +2 -2
- package/dist/core/streamingSlotRegistry.js +1 -19
- package/dist/core/streamingSlotRegistry.js.map +2 -2
- package/dist/dev/client/handlers/angular.ts +41 -35
- package/dist/dev/client/handlers/angularRuntime.ts +8 -3
- package/dist/dev/client/hmrClient.ts +1 -1
- package/dist/dev/client/reactRefreshSetup.ts +0 -1
- package/dist/index.js +254 -155
- package/dist/index.js.map +13 -13
- package/dist/islands/browser.js +1 -19
- package/dist/islands/browser.js.map +2 -2
- package/dist/islands/index.js +75 -19
- package/dist/islands/index.js.map +3 -3
- package/dist/react/browser.js +1 -19
- package/dist/react/browser.js.map +2 -2
- package/dist/react/components/index.js +1 -19
- package/dist/react/components/index.js.map +3 -3
- package/dist/react/hooks/index.js +1 -19
- package/dist/react/hooks/index.js.map +2 -2
- package/dist/react/index.js +85 -28
- package/dist/react/index.js.map +4 -4
- package/dist/react/jsxDevRuntimeCompat.js +1 -19
- package/dist/react/jsxDevRuntimeCompat.js.map +2 -2
- package/dist/react/server.js +11 -28
- package/dist/react/server.js.map +3 -3
- package/dist/src/client/streamSwap.d.ts +0 -10
- package/dist/src/dev/rebuildTrigger.d.ts +1 -1
- package/dist/src/svelte/renderToPipeableStream.d.ts +2 -2
- package/dist/src/svelte/renderToReadableStream.d.ts +2 -2
- package/dist/src/svelte/renderToString.d.ts +2 -2
- package/dist/src/vue/components/Image.d.ts +3 -3
- package/dist/svelte/browser.js +1 -19
- package/dist/svelte/browser.js.map +2 -2
- package/dist/svelte/index.js +87 -29
- package/dist/svelte/index.js.map +5 -5
- package/dist/svelte/server.js +13 -29
- package/dist/svelte/server.js.map +4 -4
- package/dist/types/globals.d.ts +10 -2
- package/dist/vue/browser.js +1 -19
- package/dist/vue/browser.js.map +2 -2
- package/dist/vue/components/Image.js +1 -19
- package/dist/vue/components/Image.js.map +3 -3
- package/dist/vue/components/index.js +1 -19
- package/dist/vue/components/index.js.map +3 -3
- package/dist/vue/index.js +85 -28
- package/dist/vue/index.js.map +5 -5
- package/dist/vue/server.js +11 -28
- package/dist/vue/server.js.map +3 -3
- package/package.json +1 -1
package/dist/angular/index.js
CHANGED
|
@@ -3,7 +3,6 @@ var __create = Object.create;
|
|
|
3
3
|
var __getProtoOf = Object.getPrototypeOf;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
7
|
function __accessProp(key) {
|
|
9
8
|
return this[key];
|
|
@@ -30,23 +29,6 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
30
29
|
cache.set(mod, to);
|
|
31
30
|
return to;
|
|
32
31
|
};
|
|
33
|
-
var __toCommonJS = (from) => {
|
|
34
|
-
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
35
|
-
if (entry)
|
|
36
|
-
return entry;
|
|
37
|
-
entry = __defProp({}, "__esModule", { value: true });
|
|
38
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
39
|
-
for (var key of __getOwnPropNames(from))
|
|
40
|
-
if (!__hasOwnProp.call(entry, key))
|
|
41
|
-
__defProp(entry, key, {
|
|
42
|
-
get: __accessProp.bind(from, key),
|
|
43
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
__moduleCache.set(from, entry);
|
|
47
|
-
return entry;
|
|
48
|
-
};
|
|
49
|
-
var __moduleCache;
|
|
50
32
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
51
33
|
var __returnValue = (v) => v;
|
|
52
34
|
function __exportSetter(name, newValue) {
|
|
@@ -251,6 +233,65 @@ var ensureHead = (doc) => {
|
|
|
251
233
|
}
|
|
252
234
|
const head = doc.createElement("head");
|
|
253
235
|
doc.documentElement.insertBefore(head, doc.documentElement.firstChild);
|
|
236
|
+
}, SSR_LAYOUT_RECT, layoutPatchApplied = false, patchElementLayout = (doc) => {
|
|
237
|
+
if (layoutPatchApplied || !doc) {
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
let element;
|
|
241
|
+
try {
|
|
242
|
+
element = doc.createElement("div");
|
|
243
|
+
} catch {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
const proto = Object.getPrototypeOf(element);
|
|
247
|
+
if (!proto)
|
|
248
|
+
return;
|
|
249
|
+
const define = (name, value) => {
|
|
250
|
+
if (typeof proto[name] !== "function") {
|
|
251
|
+
Object.defineProperty(proto, name, {
|
|
252
|
+
configurable: true,
|
|
253
|
+
value,
|
|
254
|
+
writable: true
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
define("getBoundingClientRect", function() {
|
|
259
|
+
return { ...SSR_LAYOUT_RECT };
|
|
260
|
+
});
|
|
261
|
+
define("getClientRects", function() {
|
|
262
|
+
return [];
|
|
263
|
+
});
|
|
264
|
+
define("scrollTo", function() {});
|
|
265
|
+
define("scrollBy", function() {});
|
|
266
|
+
define("scrollIntoView", function() {});
|
|
267
|
+
define("focus", function() {});
|
|
268
|
+
define("blur", function() {});
|
|
269
|
+
const numericProps = [
|
|
270
|
+
"clientWidth",
|
|
271
|
+
"clientHeight",
|
|
272
|
+
"clientLeft",
|
|
273
|
+
"clientTop",
|
|
274
|
+
"offsetWidth",
|
|
275
|
+
"offsetHeight",
|
|
276
|
+
"offsetLeft",
|
|
277
|
+
"offsetTop",
|
|
278
|
+
"scrollWidth",
|
|
279
|
+
"scrollHeight",
|
|
280
|
+
"scrollLeft",
|
|
281
|
+
"scrollTop"
|
|
282
|
+
];
|
|
283
|
+
for (const prop of numericProps) {
|
|
284
|
+
const desc = Object.getOwnPropertyDescriptor(proto, prop);
|
|
285
|
+
if (desc)
|
|
286
|
+
continue;
|
|
287
|
+
Object.defineProperty(proto, prop, {
|
|
288
|
+
configurable: true,
|
|
289
|
+
get() {
|
|
290
|
+
return 0;
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
layoutPatchApplied = true;
|
|
254
295
|
}, applyPatches = async () => {
|
|
255
296
|
const { \u{275}DominoAdapter } = await import(resolveAngularPackage("@angular/platform-server"));
|
|
256
297
|
if (!\u{275}DominoAdapter?.prototype) {
|
|
@@ -269,18 +310,33 @@ var ensureHead = (doc) => {
|
|
|
269
310
|
proto.createHtmlDocument = function() {
|
|
270
311
|
const doc = origCreateHtmlDocument.call(this);
|
|
271
312
|
ensureHead(doc);
|
|
313
|
+
patchElementLayout(doc);
|
|
272
314
|
return doc;
|
|
273
315
|
};
|
|
274
316
|
const origGetDefaultDocument = proto.getDefaultDocument;
|
|
275
317
|
proto.getDefaultDocument = function() {
|
|
276
318
|
const doc = origGetDefaultDocument.call(this);
|
|
277
319
|
ensureHead(doc);
|
|
320
|
+
patchElementLayout(doc);
|
|
278
321
|
return doc;
|
|
279
322
|
};
|
|
280
323
|
return true;
|
|
281
324
|
};
|
|
282
325
|
var init_angularPatch = __esm(() => {
|
|
283
326
|
init_resolveAngularPackage();
|
|
327
|
+
SSR_LAYOUT_RECT = Object.freeze({
|
|
328
|
+
bottom: 0,
|
|
329
|
+
height: 0,
|
|
330
|
+
left: 0,
|
|
331
|
+
right: 0,
|
|
332
|
+
top: 0,
|
|
333
|
+
width: 0,
|
|
334
|
+
x: 0,
|
|
335
|
+
y: 0,
|
|
336
|
+
toJSON() {
|
|
337
|
+
return this;
|
|
338
|
+
}
|
|
339
|
+
});
|
|
284
340
|
});
|
|
285
341
|
|
|
286
342
|
// src/angular/angularDeps.ts
|
|
@@ -1724,14 +1780,15 @@ var init_devRouteRegistrationCallsite = __esm(() => {
|
|
|
1724
1780
|
|
|
1725
1781
|
// src/client/streamSwap.ts
|
|
1726
1782
|
var streamSwapRuntime = () => {
|
|
1783
|
+
const absoluteWindow = window;
|
|
1727
1784
|
const SLOT_PATCH_EVENT = "absolutejs:slot-patch";
|
|
1728
|
-
if (
|
|
1785
|
+
if (absoluteWindow.__ABS_SLOT_RUNTIME__ === true)
|
|
1729
1786
|
return;
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
const consumers =
|
|
1734
|
-
const pending =
|
|
1787
|
+
absoluteWindow.__ABS_SLOT_RUNTIME__ = true;
|
|
1788
|
+
absoluteWindow.__ABS_SLOT_CONSUMERS__ = absoluteWindow.__ABS_SLOT_CONSUMERS__ ?? {};
|
|
1789
|
+
absoluteWindow.__ABS_SLOT_PENDING__ = absoluteWindow.__ABS_SLOT_PENDING__ ?? {};
|
|
1790
|
+
const consumers = absoluteWindow.__ABS_SLOT_CONSUMERS__;
|
|
1791
|
+
const pending = absoluteWindow.__ABS_SLOT_PENDING__;
|
|
1735
1792
|
const isObjectRecord4 = (value) => Boolean(value) && typeof value === "object";
|
|
1736
1793
|
const isPatchedPendingEntry = (value) => {
|
|
1737
1794
|
if (!isObjectRecord4(value))
|
|
@@ -1739,7 +1796,7 @@ var streamSwapRuntime = () => {
|
|
|
1739
1796
|
return value.domPatched === true && "payload" in value;
|
|
1740
1797
|
};
|
|
1741
1798
|
const unwrapPendingPayload = (value) => isPatchedPendingEntry(value) ? value.payload : value;
|
|
1742
|
-
const canApplyImmediately = () =>
|
|
1799
|
+
const canApplyImmediately = () => absoluteWindow.__ABS_SLOT_HYDRATION_PENDING__ !== true;
|
|
1743
1800
|
const isAngularDeferPayload = (payload) => {
|
|
1744
1801
|
if (!isObjectRecord4(payload))
|
|
1745
1802
|
return false;
|
|
@@ -1809,8 +1866,8 @@ var streamSwapRuntime = () => {
|
|
|
1809
1866
|
apply(id, pending[id] ?? "");
|
|
1810
1867
|
}
|
|
1811
1868
|
};
|
|
1812
|
-
|
|
1813
|
-
|
|
1869
|
+
absoluteWindow.__ABS_SLOT_FLUSH__ = flush;
|
|
1870
|
+
absoluteWindow.__ABS_SLOT_ENQUEUE__ = (id, payload) => {
|
|
1814
1871
|
apply(id, payload);
|
|
1815
1872
|
};
|
|
1816
1873
|
if (typeof MutationObserver === "function") {
|
|
@@ -14209,5 +14266,5 @@ export {
|
|
|
14209
14266
|
Island
|
|
14210
14267
|
};
|
|
14211
14268
|
|
|
14212
|
-
//# debugId=
|
|
14269
|
+
//# debugId=C81A016DA6FA8D6B64756E2164756E21
|
|
14213
14270
|
//# sourceMappingURL=index.js.map
|