@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/index.js CHANGED
@@ -31715,22 +31715,22 @@ var init_renderIslandMarkup = __esm(() => {
31715
31715
 
31716
31716
  // src/build/staticIslandPages.ts
31717
31717
  import { readFileSync as readFileSync3, writeFileSync as writeFileSync4 } from "fs";
31718
- var ISLAND_TAG_RE2, ATTRIBUTE_RE, islandFrameworks2, islandHydrationModes2, isRecord5 = (value) => typeof value === "object" && value !== null, isIslandFramework2 = (value) => islandFrameworks2.some((framework) => framework === value), isIslandHydrationMode = (value) => islandHydrationModes2.some((mode) => mode === value), parseIslandAttributes = (attributeString) => {
31718
+ var ISLAND_TAG_RE_SOURCE = "<island\\b([^>]*?)(?:\\/\\>|>(?:[\\s\\S]*?)<\\/island>)", ATTRIBUTE_RE_SOURCE = `([A-Za-z_:][-A-Za-z0-9_:.]*)\\s*=\\s*(?:"([^"]*)"|'([^']*)')`, islandFrameworks2, islandHydrationModes2, isRecord5 = (value) => typeof value === "object" && value !== null, isIslandFramework2 = (value) => islandFrameworks2.some((framework) => framework === value), isIslandHydrationMode = (value) => islandHydrationModes2.some((mode) => mode === value), parseIslandAttributes = (attributeString) => {
31719
+ const attributeRe = new RegExp(ATTRIBUTE_RE_SOURCE, "g");
31719
31720
  const attributes = new Map;
31720
- let match = ATTRIBUTE_RE.exec(attributeString);
31721
+ let match = attributeRe.exec(attributeString);
31721
31722
  while (match) {
31722
31723
  const key = match[1];
31723
31724
  const doubleQuotedValue = match[2];
31724
31725
  const singleQuotedValue = match[3];
31725
31726
  if (!key) {
31726
- match = ATTRIBUTE_RE.exec(attributeString);
31727
+ match = attributeRe.exec(attributeString);
31727
31728
  continue;
31728
31729
  }
31729
31730
  const value = doubleQuotedValue ?? singleQuotedValue ?? "";
31730
31731
  attributes.set(key, value);
31731
- match = ATTRIBUTE_RE.exec(attributeString);
31732
+ match = attributeRe.exec(attributeString);
31732
31733
  }
31733
- ATTRIBUTE_RE.lastIndex = 0;
31734
31734
  return attributes;
31735
31735
  }, parseIslandTag = (attributeString) => {
31736
31736
  const attributes = parseIslandAttributes(attributeString);
@@ -31762,13 +31762,14 @@ var ISLAND_TAG_RE2, ATTRIBUTE_RE, islandFrameworks2, islandHydrationModes2, isRe
31762
31762
  };
31763
31763
  }, transformStaticPage = async (pagePath, registry) => {
31764
31764
  const originalHtml = readFileSync3(pagePath, "utf-8");
31765
- if (!ISLAND_TAG_RE2.test(originalHtml)) {
31765
+ const islandTagRe = new RegExp(ISLAND_TAG_RE_SOURCE, "gi");
31766
+ if (!islandTagRe.test(originalHtml)) {
31766
31767
  return;
31767
31768
  }
31768
- ISLAND_TAG_RE2.lastIndex = 0;
31769
+ islandTagRe.lastIndex = 0;
31769
31770
  let transformedHtml = "";
31770
31771
  let lastIndex = 0;
31771
- let match = ISLAND_TAG_RE2.exec(originalHtml);
31772
+ let match = islandTagRe.exec(originalHtml);
31772
31773
  while (match) {
31773
31774
  const fullMatch = match[0];
31774
31775
  const attributeString = match[1] ?? "";
@@ -31777,9 +31778,8 @@ var ISLAND_TAG_RE2, ATTRIBUTE_RE, islandFrameworks2, islandHydrationModes2, isRe
31777
31778
  const props = parseIslandTag(attributeString);
31778
31779
  transformedHtml += props ? await renderIslandMarkup(registry, props) : fullMatch;
31779
31780
  lastIndex = matchIndex + fullMatch.length;
31780
- match = ISLAND_TAG_RE2.exec(originalHtml);
31781
+ match = islandTagRe.exec(originalHtml);
31781
31782
  }
31782
- ISLAND_TAG_RE2.lastIndex = 0;
31783
31783
  transformedHtml += originalHtml.slice(lastIndex);
31784
31784
  if (transformedHtml !== originalHtml) {
31785
31785
  writeFileSync4(pagePath, transformedHtml);
@@ -31794,8 +31794,6 @@ var ISLAND_TAG_RE2, ATTRIBUTE_RE, islandFrameworks2, islandHydrationModes2, isRe
31794
31794
  var init_staticIslandPages = __esm(() => {
31795
31795
  init_renderIslandMarkup();
31796
31796
  init_islandEntries();
31797
- ISLAND_TAG_RE2 = /<island\b([^>]*?)(?:\/>|>(?:[\s\S]*?)<\/island>)/gi;
31798
- ATTRIBUTE_RE = /([A-Za-z_:][-A-Za-z0-9_:.]*)\s*=\s*(?:"([^"]*)"|'([^']*)')/g;
31799
31797
  islandFrameworks2 = [
31800
31798
  "react",
31801
31799
  "svelte",
@@ -203667,6 +203665,13 @@ ${content.slice(firstUseIdx)}`;
203667
203665
  const nonReactClientOutputs = nonReactClientResult?.outputs ?? [];
203668
203666
  const islandClientLogs = islandClientResult?.logs ?? [];
203669
203667
  const islandClientOutputs = islandClientResult?.outputs ?? [];
203668
+ const islandClientOutputPaths = islandClientOutputs.map((artifact) => artifact.path);
203669
+ if (vendorPaths && islandClientOutputPaths.length > 0) {
203670
+ await rewriteReactImports(islandClientOutputPaths, vendorPaths);
203671
+ }
203672
+ if (hmr && islandClientOutputPaths.length > 0) {
203673
+ await patchRefreshGlobals(islandClientOutputPaths);
203674
+ }
203670
203675
  if (nonReactClientResult && !nonReactClientResult.success && nonReactClientLogs.length > 0) {
203671
203676
  extractBuildError(nonReactClientLogs, "non-react-client", "Non-React client", frameworkNames, isIncremental, throwOnError);
203672
203677
  }
@@ -204780,9 +204785,9 @@ var init_webSocket = __esm(() => {
204780
204785
  });
204781
204786
 
204782
204787
  // src/angular/lowerServerIslands.ts
204783
- var ANGULAR_ISLAND_TAG_RE, ATTRIBUTE_RE2, islandFrameworks3, islandHydrationModes3, decodeHtmlAttribute = (value) => value.replaceAll("&quot;", '"').replaceAll("&#34;", '"').replaceAll("&apos;", "'").replaceAll("&#39;", "'").replaceAll("&amp;", "&").replaceAll("&lt;", "<").replaceAll("&gt;", ">"), isRecord6 = (value) => typeof value === "object" && value !== null, isIslandFramework3 = (value) => islandFrameworks3.some((framework) => framework === value), isIslandHydrate2 = (value) => islandHydrationModes3.some((mode) => mode === value), parseAttributes = (attributeString) => {
204788
+ var ANGULAR_ISLAND_TAG_RE, ATTRIBUTE_RE, islandFrameworks3, islandHydrationModes3, decodeHtmlAttribute = (value) => value.replaceAll("&quot;", '"').replaceAll("&#34;", '"').replaceAll("&apos;", "'").replaceAll("&#39;", "'").replaceAll("&amp;", "&").replaceAll("&lt;", "<").replaceAll("&gt;", ">"), isRecord6 = (value) => typeof value === "object" && value !== null, isIslandFramework3 = (value) => islandFrameworks3.some((framework) => framework === value), isIslandHydrate2 = (value) => islandHydrationModes3.some((mode) => mode === value), parseAttributes = (attributeString) => {
204784
204789
  const attributes = new Map;
204785
- let match = ATTRIBUTE_RE2.exec(attributeString);
204790
+ let match = ATTRIBUTE_RE.exec(attributeString);
204786
204791
  while (match) {
204787
204792
  const key = match[1];
204788
204793
  const doubleQuotedValue = match[2];
@@ -204790,9 +204795,9 @@ var ANGULAR_ISLAND_TAG_RE, ATTRIBUTE_RE2, islandFrameworks3, islandHydrationMode
204790
204795
  if (key) {
204791
204796
  attributes.set(key, decodeHtmlAttribute(doubleQuotedValue ?? singleQuotedValue ?? ""));
204792
204797
  }
204793
- match = ATTRIBUTE_RE2.exec(attributeString);
204798
+ match = ATTRIBUTE_RE.exec(attributeString);
204794
204799
  }
204795
- ATTRIBUTE_RE2.lastIndex = 0;
204800
+ ATTRIBUTE_RE.lastIndex = 0;
204796
204801
  return attributes;
204797
204802
  }, parseAngularIslandProps = (attributeString) => {
204798
204803
  const attributes = parseAttributes(attributeString);
@@ -204844,7 +204849,7 @@ var ANGULAR_ISLAND_TAG_RE, ATTRIBUTE_RE2, islandFrameworks3, islandHydrationMode
204844
204849
  var init_lowerServerIslands = __esm(() => {
204845
204850
  init_renderIslandMarkup();
204846
204851
  ANGULAR_ISLAND_TAG_RE = /<absolute-island\b([^>]*)>[\s\S]*?<\/absolute-island>/gi;
204847
- ATTRIBUTE_RE2 = /([A-Za-z_:][-A-Za-z0-9_:.]*)\s*=\s*(?:"([^"]*)"|'([^']*)')/g;
204852
+ ATTRIBUTE_RE = /([A-Za-z_:][-A-Za-z0-9_:.]*)\s*=\s*(?:"([^"]*)"|'([^']*)')/g;
204848
204853
  islandFrameworks3 = [
204849
204854
  "react",
204850
204855
  "svelte",
@@ -215451,5 +215456,5 @@ export {
215451
215456
  ANGULAR_INIT_TIMEOUT_MS
215452
215457
  };
215453
215458
 
215454
- //# debugId=6A6938F7FEBE179964756E2164756E21
215459
+ //# debugId=0AD113D3BB7C3BD764756E2164756E21
215455
215460
  //# sourceMappingURL=index.js.map