@absolutejs/absolute 0.19.0-beta.291 → 0.19.0-beta.293
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/build.js +23 -18
- package/dist/build.js.map +4 -4
- package/dist/index.js +23 -18
- package/dist/index.js.map +4 -4
- package/dist/react/browser.js +30125 -9
- package/dist/react/browser.js.map +19 -3
- package/dist/src/react/browser.d.ts +1 -0
- package/package.json +1 -1
package/dist/build.js
CHANGED
|
@@ -31143,22 +31143,22 @@ var init_renderIslandMarkup = __esm(() => {
|
|
|
31143
31143
|
|
|
31144
31144
|
// src/build/staticIslandPages.ts
|
|
31145
31145
|
import { readFileSync as readFileSync2, writeFileSync as writeFileSync4 } from "fs";
|
|
31146
|
-
var
|
|
31146
|
+
var ISLAND_TAG_RE_SOURCE = "<island\\b([^>]*?)(?:\\/\\>|>(?:[\\s\\S]*?)<\\/island>)", ATTRIBUTE_RE_SOURCE = `([A-Za-z_:][-A-Za-z0-9_:.]*)\\s*=\\s*(?:"([^"]*)"|'([^']*)')`, islandFrameworks, islandHydrationModes, isRecord4 = (value) => typeof value === "object" && value !== null, isIslandFramework = (value) => islandFrameworks.some((framework) => framework === value), isIslandHydrationMode = (value) => islandHydrationModes.some((mode) => mode === value), parseIslandAttributes = (attributeString) => {
|
|
31147
|
+
const attributeRe = new RegExp(ATTRIBUTE_RE_SOURCE, "g");
|
|
31147
31148
|
const attributes = new Map;
|
|
31148
|
-
let match =
|
|
31149
|
+
let match = attributeRe.exec(attributeString);
|
|
31149
31150
|
while (match) {
|
|
31150
31151
|
const key = match[1];
|
|
31151
31152
|
const doubleQuotedValue = match[2];
|
|
31152
31153
|
const singleQuotedValue = match[3];
|
|
31153
31154
|
if (!key) {
|
|
31154
|
-
match =
|
|
31155
|
+
match = attributeRe.exec(attributeString);
|
|
31155
31156
|
continue;
|
|
31156
31157
|
}
|
|
31157
31158
|
const value = doubleQuotedValue ?? singleQuotedValue ?? "";
|
|
31158
31159
|
attributes.set(key, value);
|
|
31159
|
-
match =
|
|
31160
|
+
match = attributeRe.exec(attributeString);
|
|
31160
31161
|
}
|
|
31161
|
-
ATTRIBUTE_RE.lastIndex = 0;
|
|
31162
31162
|
return attributes;
|
|
31163
31163
|
}, parseIslandTag = (attributeString) => {
|
|
31164
31164
|
const attributes = parseIslandAttributes(attributeString);
|
|
@@ -31190,13 +31190,14 @@ var ISLAND_TAG_RE2, ATTRIBUTE_RE, islandFrameworks, islandHydrationModes, isReco
|
|
|
31190
31190
|
};
|
|
31191
31191
|
}, transformStaticPage = async (pagePath, registry) => {
|
|
31192
31192
|
const originalHtml = readFileSync2(pagePath, "utf-8");
|
|
31193
|
-
|
|
31193
|
+
const islandTagRe = new RegExp(ISLAND_TAG_RE_SOURCE, "gi");
|
|
31194
|
+
if (!islandTagRe.test(originalHtml)) {
|
|
31194
31195
|
return;
|
|
31195
31196
|
}
|
|
31196
|
-
|
|
31197
|
+
islandTagRe.lastIndex = 0;
|
|
31197
31198
|
let transformedHtml = "";
|
|
31198
31199
|
let lastIndex = 0;
|
|
31199
|
-
let match =
|
|
31200
|
+
let match = islandTagRe.exec(originalHtml);
|
|
31200
31201
|
while (match) {
|
|
31201
31202
|
const fullMatch = match[0];
|
|
31202
31203
|
const attributeString = match[1] ?? "";
|
|
@@ -31205,9 +31206,8 @@ var ISLAND_TAG_RE2, ATTRIBUTE_RE, islandFrameworks, islandHydrationModes, isReco
|
|
|
31205
31206
|
const props = parseIslandTag(attributeString);
|
|
31206
31207
|
transformedHtml += props ? await renderIslandMarkup(registry, props) : fullMatch;
|
|
31207
31208
|
lastIndex = matchIndex + fullMatch.length;
|
|
31208
|
-
match =
|
|
31209
|
+
match = islandTagRe.exec(originalHtml);
|
|
31209
31210
|
}
|
|
31210
|
-
ISLAND_TAG_RE2.lastIndex = 0;
|
|
31211
31211
|
transformedHtml += originalHtml.slice(lastIndex);
|
|
31212
31212
|
if (transformedHtml !== originalHtml) {
|
|
31213
31213
|
writeFileSync4(pagePath, transformedHtml);
|
|
@@ -31222,8 +31222,6 @@ var ISLAND_TAG_RE2, ATTRIBUTE_RE, islandFrameworks, islandHydrationModes, isReco
|
|
|
31222
31222
|
var init_staticIslandPages = __esm(() => {
|
|
31223
31223
|
init_renderIslandMarkup();
|
|
31224
31224
|
init_islandEntries();
|
|
31225
|
-
ISLAND_TAG_RE2 = /<island\b([^>]*?)(?:\/>|>(?:[\s\S]*?)<\/island>)/gi;
|
|
31226
|
-
ATTRIBUTE_RE = /([A-Za-z_:][-A-Za-z0-9_:.]*)\s*=\s*(?:"([^"]*)"|'([^']*)')/g;
|
|
31227
31225
|
islandFrameworks = [
|
|
31228
31226
|
"react",
|
|
31229
31227
|
"svelte",
|
|
@@ -203182,6 +203180,13 @@ ${content.slice(firstUseIdx)}`;
|
|
|
203182
203180
|
const nonReactClientOutputs = nonReactClientResult?.outputs ?? [];
|
|
203183
203181
|
const islandClientLogs = islandClientResult?.logs ?? [];
|
|
203184
203182
|
const islandClientOutputs = islandClientResult?.outputs ?? [];
|
|
203183
|
+
const islandClientOutputPaths = islandClientOutputs.map((artifact) => artifact.path);
|
|
203184
|
+
if (vendorPaths && islandClientOutputPaths.length > 0) {
|
|
203185
|
+
await rewriteReactImports(islandClientOutputPaths, vendorPaths);
|
|
203186
|
+
}
|
|
203187
|
+
if (hmr && islandClientOutputPaths.length > 0) {
|
|
203188
|
+
await patchRefreshGlobals(islandClientOutputPaths);
|
|
203189
|
+
}
|
|
203185
203190
|
if (nonReactClientResult && !nonReactClientResult.success && nonReactClientLogs.length > 0) {
|
|
203186
203191
|
extractBuildError(nonReactClientLogs, "non-react-client", "Non-React client", frameworkNames, isIncremental, throwOnError);
|
|
203187
203192
|
}
|
|
@@ -204730,9 +204735,9 @@ var setCurrentIslandRegistry = (registry) => {
|
|
|
204730
204735
|
};
|
|
204731
204736
|
|
|
204732
204737
|
// src/angular/lowerServerIslands.ts
|
|
204733
|
-
var ANGULAR_ISLAND_TAG_RE,
|
|
204738
|
+
var ANGULAR_ISLAND_TAG_RE, ATTRIBUTE_RE, islandFrameworks3, islandHydrationModes3, decodeHtmlAttribute = (value) => value.replaceAll(""", '"').replaceAll(""", '"').replaceAll("'", "'").replaceAll("'", "'").replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">"), isRecord5 = (value) => typeof value === "object" && value !== null, isIslandFramework3 = (value) => islandFrameworks3.some((framework) => framework === value), isIslandHydrate2 = (value) => islandHydrationModes3.some((mode) => mode === value), parseAttributes = (attributeString) => {
|
|
204734
204739
|
const attributes = new Map;
|
|
204735
|
-
let match =
|
|
204740
|
+
let match = ATTRIBUTE_RE.exec(attributeString);
|
|
204736
204741
|
while (match) {
|
|
204737
204742
|
const key = match[1];
|
|
204738
204743
|
const doubleQuotedValue = match[2];
|
|
@@ -204740,9 +204745,9 @@ var ANGULAR_ISLAND_TAG_RE, ATTRIBUTE_RE2, islandFrameworks3, islandHydrationMode
|
|
|
204740
204745
|
if (key) {
|
|
204741
204746
|
attributes.set(key, decodeHtmlAttribute(doubleQuotedValue ?? singleQuotedValue ?? ""));
|
|
204742
204747
|
}
|
|
204743
|
-
match =
|
|
204748
|
+
match = ATTRIBUTE_RE.exec(attributeString);
|
|
204744
204749
|
}
|
|
204745
|
-
|
|
204750
|
+
ATTRIBUTE_RE.lastIndex = 0;
|
|
204746
204751
|
return attributes;
|
|
204747
204752
|
}, parseAngularIslandProps = (attributeString) => {
|
|
204748
204753
|
const attributes = parseAttributes(attributeString);
|
|
@@ -204794,7 +204799,7 @@ var ANGULAR_ISLAND_TAG_RE, ATTRIBUTE_RE2, islandFrameworks3, islandHydrationMode
|
|
|
204794
204799
|
var init_lowerServerIslands = __esm(() => {
|
|
204795
204800
|
init_renderIslandMarkup();
|
|
204796
204801
|
ANGULAR_ISLAND_TAG_RE = /<absolute-island\b([^>]*)>[\s\S]*?<\/absolute-island>/gi;
|
|
204797
|
-
|
|
204802
|
+
ATTRIBUTE_RE = /([A-Za-z_:][-A-Za-z0-9_:.]*)\s*=\s*(?:"([^"]*)"|'([^']*)')/g;
|
|
204798
204803
|
islandFrameworks3 = [
|
|
204799
204804
|
"react",
|
|
204800
204805
|
"svelte",
|
|
@@ -208006,5 +208011,5 @@ export {
|
|
|
208006
208011
|
build
|
|
208007
208012
|
};
|
|
208008
208013
|
|
|
208009
|
-
//# debugId=
|
|
208014
|
+
//# debugId=85FE370D781DFAE264756E2164756E21
|
|
208010
208015
|
//# sourceMappingURL=build.js.map
|