@absolutejs/absolute 0.19.0-beta.291 → 0.19.0-beta.292

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 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 ISLAND_TAG_RE2, ATTRIBUTE_RE, 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) => {
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 = ATTRIBUTE_RE.exec(attributeString);
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 = ATTRIBUTE_RE.exec(attributeString);
31155
+ match = attributeRe.exec(attributeString);
31155
31156
  continue;
31156
31157
  }
31157
31158
  const value = doubleQuotedValue ?? singleQuotedValue ?? "";
31158
31159
  attributes.set(key, value);
31159
- match = ATTRIBUTE_RE.exec(attributeString);
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
- if (!ISLAND_TAG_RE2.test(originalHtml)) {
31193
+ const islandTagRe = new RegExp(ISLAND_TAG_RE_SOURCE, "gi");
31194
+ if (!islandTagRe.test(originalHtml)) {
31194
31195
  return;
31195
31196
  }
31196
- ISLAND_TAG_RE2.lastIndex = 0;
31197
+ islandTagRe.lastIndex = 0;
31197
31198
  let transformedHtml = "";
31198
31199
  let lastIndex = 0;
31199
- let match = ISLAND_TAG_RE2.exec(originalHtml);
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 = ISLAND_TAG_RE2.exec(originalHtml);
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",
@@ -204730,9 +204728,9 @@ var setCurrentIslandRegistry = (registry) => {
204730
204728
  };
204731
204729
 
204732
204730
  // src/angular/lowerServerIslands.ts
204733
- 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;", ">"), isRecord5 = (value) => typeof value === "object" && value !== null, isIslandFramework3 = (value) => islandFrameworks3.some((framework) => framework === value), isIslandHydrate2 = (value) => islandHydrationModes3.some((mode) => mode === value), parseAttributes = (attributeString) => {
204731
+ 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;", ">"), isRecord5 = (value) => typeof value === "object" && value !== null, isIslandFramework3 = (value) => islandFrameworks3.some((framework) => framework === value), isIslandHydrate2 = (value) => islandHydrationModes3.some((mode) => mode === value), parseAttributes = (attributeString) => {
204734
204732
  const attributes = new Map;
204735
- let match = ATTRIBUTE_RE2.exec(attributeString);
204733
+ let match = ATTRIBUTE_RE.exec(attributeString);
204736
204734
  while (match) {
204737
204735
  const key = match[1];
204738
204736
  const doubleQuotedValue = match[2];
@@ -204740,9 +204738,9 @@ var ANGULAR_ISLAND_TAG_RE, ATTRIBUTE_RE2, islandFrameworks3, islandHydrationMode
204740
204738
  if (key) {
204741
204739
  attributes.set(key, decodeHtmlAttribute(doubleQuotedValue ?? singleQuotedValue ?? ""));
204742
204740
  }
204743
- match = ATTRIBUTE_RE2.exec(attributeString);
204741
+ match = ATTRIBUTE_RE.exec(attributeString);
204744
204742
  }
204745
- ATTRIBUTE_RE2.lastIndex = 0;
204743
+ ATTRIBUTE_RE.lastIndex = 0;
204746
204744
  return attributes;
204747
204745
  }, parseAngularIslandProps = (attributeString) => {
204748
204746
  const attributes = parseAttributes(attributeString);
@@ -204794,7 +204792,7 @@ var ANGULAR_ISLAND_TAG_RE, ATTRIBUTE_RE2, islandFrameworks3, islandHydrationMode
204794
204792
  var init_lowerServerIslands = __esm(() => {
204795
204793
  init_renderIslandMarkup();
204796
204794
  ANGULAR_ISLAND_TAG_RE = /<absolute-island\b([^>]*)>[\s\S]*?<\/absolute-island>/gi;
204797
- ATTRIBUTE_RE2 = /([A-Za-z_:][-A-Za-z0-9_:.]*)\s*=\s*(?:"([^"]*)"|'([^']*)')/g;
204795
+ ATTRIBUTE_RE = /([A-Za-z_:][-A-Za-z0-9_:.]*)\s*=\s*(?:"([^"]*)"|'([^']*)')/g;
204798
204796
  islandFrameworks3 = [
204799
204797
  "react",
204800
204798
  "svelte",
@@ -208006,5 +208004,5 @@ export {
208006
208004
  build
208007
208005
  };
208008
208006
 
208009
- //# debugId=C9D80972CB3D466064756E2164756E21
208007
+ //# debugId=4F40D8F8DF75710A64756E2164756E21
208010
208008
  //# sourceMappingURL=build.js.map