@absolutejs/absolute 0.19.0-beta.1114 → 0.19.0-beta.1116

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.
Files changed (90) hide show
  1. package/dist/angular/browser.js +53 -47
  2. package/dist/angular/browser.js.map +5 -5
  3. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  4. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  5. package/dist/angular/hmrPreserveCore.ts +73 -34
  6. package/dist/angular/index.js +63 -58
  7. package/dist/angular/index.js.map +10 -10
  8. package/dist/angular/server.js +20 -38
  9. package/dist/angular/server.js.map +8 -8
  10. package/dist/build.js +601 -547
  11. package/dist/build.js.map +32 -32
  12. package/dist/cli/config/client.js +8 -8
  13. package/dist/cli/config/server.js +87 -75
  14. package/dist/cli/index.js +146 -127
  15. package/dist/client/index.js +1 -19
  16. package/dist/client/index.js.map +3 -3
  17. package/dist/core/streamingSlotRegistrar.js +1 -19
  18. package/dist/core/streamingSlotRegistrar.js.map +2 -2
  19. package/dist/core/streamingSlotRegistry.js +1 -19
  20. package/dist/core/streamingSlotRegistry.js.map +2 -2
  21. package/dist/dev/client/errorOverlay.ts +11 -10
  22. package/dist/dev/client/handlers/angularHmrShim.ts +6 -6
  23. package/dist/dev/client/handlers/angularRemount.ts +64 -44
  24. package/dist/dev/client/hmrClient.ts +31 -26
  25. package/dist/dev/client/hmrToast.ts +2 -4
  26. package/dist/dev/serverBootstrap.js +36 -0
  27. package/dist/index.js +742 -615
  28. package/dist/index.js.map +39 -38
  29. package/dist/islands/browser.js +1 -19
  30. package/dist/islands/browser.js.map +2 -2
  31. package/dist/islands/index.js +1 -19
  32. package/dist/islands/index.js.map +3 -3
  33. package/dist/react/browser.js +1 -19
  34. package/dist/react/browser.js.map +2 -2
  35. package/dist/react/components/index.js +1 -19
  36. package/dist/react/components/index.js.map +2 -2
  37. package/dist/react/hooks/index.js +1 -19
  38. package/dist/react/hooks/index.js.map +2 -2
  39. package/dist/react/index.js +15 -37
  40. package/dist/react/index.js.map +7 -7
  41. package/dist/react/jsxDevRuntimeCompat.js +1 -19
  42. package/dist/react/jsxDevRuntimeCompat.js.map +2 -2
  43. package/dist/react/router/browser.js +1 -19
  44. package/dist/react/router/browser.js.map +2 -2
  45. package/dist/react/router/index.js +1 -19
  46. package/dist/react/router/index.js.map +2 -2
  47. package/dist/react/server.js +15 -37
  48. package/dist/react/server.js.map +6 -6
  49. package/dist/src/angular/hmrPreserveCore.d.ts +2 -2
  50. package/dist/src/cli/config/absolute/resolveAbsoluteConfig.d.ts +1 -1
  51. package/dist/src/cli/config/auth/resolveAuthSettings.d.ts +1 -1
  52. package/dist/src/cli/config/packageJson/resolvePackageJson.d.ts +1 -2
  53. package/dist/src/cli/config/schema/fromType.d.ts +1 -2
  54. package/dist/src/cli/config/server.d.ts +2 -2
  55. package/dist/src/core/build.d.ts +3 -2
  56. package/dist/src/core/prepare.d.ts +1 -0
  57. package/dist/src/dev/angular/fastHmrCompiler.d.ts +4 -2
  58. package/dist/src/dev/serverBootstrap.d.ts +1 -0
  59. package/dist/src/dev/serverEntryWatcher.d.ts +3 -3
  60. package/dist/src/dev/webSocket.d.ts +1 -1
  61. package/dist/src/plugins/hmr.d.ts +1 -0
  62. package/dist/src/svelte/router/matchPath.d.ts +2 -2
  63. package/dist/src/utils/defineConvention.d.ts +2 -2
  64. package/dist/src/utils/inlinePageCss.d.ts +1 -1
  65. package/dist/src/utils/isTestSourcePath.d.ts +1 -0
  66. package/dist/svelte/browser.js +1 -19
  67. package/dist/svelte/browser.js.map +2 -2
  68. package/dist/svelte/index.js +15 -36
  69. package/dist/svelte/index.js.map +8 -8
  70. package/dist/svelte/router/Link.svelte.d.ts +3 -3
  71. package/dist/svelte/router/Route.svelte.d.ts +5 -5
  72. package/dist/svelte/router/Router.svelte.d.ts +3 -3
  73. package/dist/svelte/router/matchPath.ts +25 -20
  74. package/dist/svelte/router/prefetchCache.ts +6 -4
  75. package/dist/svelte/router/viewTransitions.ts +22 -12
  76. package/dist/svelte/server.js +15 -36
  77. package/dist/svelte/server.js.map +7 -7
  78. package/dist/types/angular.d.ts +1 -1
  79. package/dist/types/globals.d.ts +5 -0
  80. package/dist/vue/browser.js +1 -19
  81. package/dist/vue/browser.js.map +2 -2
  82. package/dist/vue/components/Image.js +1 -19
  83. package/dist/vue/components/Image.js.map +2 -2
  84. package/dist/vue/components/index.js +1 -19
  85. package/dist/vue/components/index.js.map +2 -2
  86. package/dist/vue/index.js +41 -55
  87. package/dist/vue/index.js.map +10 -10
  88. package/dist/vue/server.js +32 -48
  89. package/dist/vue/server.js.map +8 -8
  90. package/package.json +285 -19
@@ -31443,21 +31443,37 @@ var JSON_CANDIDATES, OTHER_CANDIDATES, CATEGORY_ORDER, cachedOptions = null, loa
31443
31443
  for (const name of JSON_CANDIDATES) {
31444
31444
  const candidate = resolve5(cwd, name);
31445
31445
  if (existsSync6(candidate) && readJsonObject(candidate)) {
31446
- return { configPath: candidate, format: "json" };
31446
+ const discovery2 = {
31447
+ configPath: candidate,
31448
+ format: "json"
31449
+ };
31450
+ return discovery2;
31447
31451
  }
31448
31452
  }
31449
31453
  const pkgPath = resolve5(cwd, "package.json");
31450
31454
  const pkg = existsSync6(pkgPath) ? readJsonObject(pkgPath) : null;
31451
31455
  if (pkg && isRecord(pkg.prettier)) {
31452
- return { configPath: pkgPath, format: "package" };
31456
+ const discovery2 = {
31457
+ configPath: pkgPath,
31458
+ format: "package"
31459
+ };
31460
+ return discovery2;
31453
31461
  }
31454
31462
  for (const name of OTHER_CANDIDATES) {
31455
31463
  const candidate = resolve5(cwd, name);
31456
31464
  if (existsSync6(candidate)) {
31457
- return { configPath: candidate, format: "other" };
31465
+ const discovery2 = {
31466
+ configPath: candidate,
31467
+ format: "other"
31468
+ };
31469
+ return discovery2;
31458
31470
  }
31459
31471
  }
31460
- return { configPath: null, format: "none" };
31472
+ const discovery = {
31473
+ configPath: null,
31474
+ format: "none"
31475
+ };
31476
+ return discovery;
31461
31477
  }, readCurrent = (cwd, configPath, format2) => {
31462
31478
  if (format2 === "json" && configPath)
31463
31479
  return readJsonObject(configPath) ?? {};
@@ -31525,10 +31541,11 @@ var VIRTUAL_NAME = "__absolute_type_introspect__.ts", MAX_DEPTH2 = 6, isFramewor
31525
31541
  }
31526
31542
  }, compilerOptionsFor = (cwd) => {
31527
31543
  const tsconfigPath = ts2.findConfigFile(cwd, ts2.sys.fileExists, "tsconfig.json");
31528
- const base = tsconfigPath && ts2.getParsedCommandLineOfConfigFile(tsconfigPath, {}, {
31544
+ const parseConfigHost = {
31529
31545
  ...ts2.sys,
31530
31546
  onUnRecoverableConfigFileDiagnostic: () => {}
31531
- })?.options;
31547
+ };
31548
+ const base = tsconfigPath && ts2.getParsedCommandLineOfConfigFile(tsconfigPath, {}, parseConfigHost)?.options;
31532
31549
  return {
31533
31550
  ...base ?? ts2.getDefaultCompilerOptions(),
31534
31551
  noEmit: true,
@@ -31566,7 +31583,7 @@ var VIRTUAL_NAME = "__absolute_type_introspect__.ts", MAX_DEPTH2 = 6, isFramewor
31566
31583
  }, readDiskCache = (cwd, typeName2, signature, specifier) => {
31567
31584
  try {
31568
31585
  const cached = JSON.parse(readFileSync9(cacheFile(cwd, typeName2, specifier), "utf-8"));
31569
- if (cached?.signature === signature && Array.isArray(cached.fields)) {
31586
+ if (isRecord(cached) && cached.signature === signature && Array.isArray(cached.fields)) {
31570
31587
  return cached.fields;
31571
31588
  }
31572
31589
  } catch {}
@@ -31588,15 +31605,15 @@ var VIRTUAL_NAME = "__absolute_type_introspect__.ts", MAX_DEPTH2 = 6, isFramewor
31588
31605
  return type.value;
31589
31606
  return null;
31590
31607
  }, toSchema = (type, checker, depth, seen) => {
31591
- const opaque2 = () => ({
31608
+ const opaque = () => ({
31592
31609
  kind: "opaque",
31593
31610
  typeText: checker.typeToString(type)
31594
31611
  });
31595
31612
  if (depth > MAX_DEPTH2)
31596
- return opaque2();
31613
+ return opaque();
31597
31614
  const parts = unionParts(type).filter((part) => !hasFlag(part, ts2.TypeFlags.Undefined) && !hasFlag(part, ts2.TypeFlags.Null));
31598
31615
  if (parts.length === 0)
31599
- return opaque2();
31616
+ return opaque();
31600
31617
  if (parts.every((part) => hasFlag(part, ts2.TypeFlags.BooleanLike))) {
31601
31618
  return { kind: "boolean" };
31602
31619
  }
@@ -31611,9 +31628,9 @@ var VIRTUAL_NAME = "__absolute_type_introspect__.ts", MAX_DEPTH2 = 6, isFramewor
31611
31628
  };
31612
31629
  }
31613
31630
  const [only] = parts;
31614
- return only ? single(only, checker, depth, seen) : opaque2();
31631
+ return only ? single(only, checker, depth, seen) : opaque();
31615
31632
  }, single = (type, checker, depth, seen) => {
31616
- const opaque2 = () => ({
31633
+ const opaque = () => ({
31617
31634
  kind: "opaque",
31618
31635
  typeText: checker.typeToString(type)
31619
31636
  });
@@ -31624,9 +31641,9 @@ var VIRTUAL_NAME = "__absolute_type_introspect__.ts", MAX_DEPTH2 = 6, isFramewor
31624
31641
  if (hasFlag(type, ts2.TypeFlags.StringLike))
31625
31642
  return { kind: "string" };
31626
31643
  if (!hasFlag(type, ts2.TypeFlags.Object))
31627
- return opaque2();
31644
+ return opaque();
31628
31645
  if (type.getCallSignatures().length > 0)
31629
- return opaque2();
31646
+ return opaque();
31630
31647
  const element = type.getNumberIndexType();
31631
31648
  const stringIndex = type.getStringIndexType();
31632
31649
  const props = checker.getPropertiesOfType(type);
@@ -31637,7 +31654,7 @@ var VIRTUAL_NAME = "__absolute_type_introspect__.ts", MAX_DEPTH2 = 6, isFramewor
31637
31654
  };
31638
31655
  }
31639
31656
  if (seen.has(type))
31640
- return opaque2();
31657
+ return opaque();
31641
31658
  seen.add(type);
31642
31659
  try {
31643
31660
  if (props.length > 0) {
@@ -31658,7 +31675,7 @@ var VIRTUAL_NAME = "__absolute_type_introspect__.ts", MAX_DEPTH2 = 6, isFramewor
31658
31675
  } finally {
31659
31676
  seen.delete(type);
31660
31677
  }
31661
- return opaque2();
31678
+ return opaque();
31662
31679
  }, introspectFrom = (cwd, specifier, typeName2, options, exclude) => {
31663
31680
  const virtualPath = resolve6(cwd, VIRTUAL_NAME);
31664
31681
  const source = `import type { ${typeName2} } from '${specifier}';
@@ -31681,7 +31698,7 @@ export { value };
31681
31698
  sourceFile.forEachChild((node) => {
31682
31699
  if (!ts2.isVariableStatement(node))
31683
31700
  return;
31684
- const declaration = node.declarationList.declarations[0];
31701
+ const [declaration] = node.declarationList.declarations;
31685
31702
  if (!declaration)
31686
31703
  return;
31687
31704
  const type = checker.getTypeAtLocation(declaration);
@@ -31753,22 +31770,21 @@ var CONFIG_CANDIDATES3, RUNTIME_FIELDS, findConfigPath2 = (cwd, override) => {
31753
31770
  }
31754
31771
  return null;
31755
31772
  }, parseSource = (configPath, text) => ts3.createSourceFile(configPath, text, ts3.ScriptTarget.Latest, true), findConfigObject = (sourceFile) => {
31756
- let found = null;
31757
- const visit2 = (node) => {
31758
- if (found)
31759
- return;
31760
- if (ts3.isCallExpression(node) && ts3.isIdentifier(node.expression) && node.expression.text === "defineConfig" && node.arguments[0] && ts3.isObjectLiteralExpression(node.arguments[0])) {
31761
- found = node.arguments[0];
31762
- return;
31773
+ const pending = [sourceFile];
31774
+ while (pending.length > 0) {
31775
+ const node = pending.pop();
31776
+ if (!node)
31777
+ continue;
31778
+ const [firstArgument] = ts3.isCallExpression(node) ? node.arguments : [];
31779
+ if (ts3.isCallExpression(node) && ts3.isIdentifier(node.expression) && node.expression.text === "defineConfig" && firstArgument && ts3.isObjectLiteralExpression(firstArgument)) {
31780
+ return firstArgument;
31763
31781
  }
31764
31782
  if (ts3.isExportAssignment(node) && ts3.isObjectLiteralExpression(node.expression)) {
31765
- found = node.expression;
31766
- return;
31783
+ return node.expression;
31767
31784
  }
31768
- ts3.forEachChild(node, visit2);
31769
- };
31770
- visit2(sourceFile);
31771
- return found;
31785
+ node.forEachChild((child) => pending.push(child));
31786
+ }
31787
+ return null;
31772
31788
  }, parseConfigObject = (configPath) => {
31773
31789
  const text = readFileSync10(configPath, "utf-8");
31774
31790
  return { object: findConfigObject(parseSource(configPath, text)), text };
@@ -31957,20 +31973,20 @@ var lineStartOffset = (text, position) => {
31957
31973
  };
31958
31974
  }
31959
31975
  const indent = indentBefore(text, last.getStart(sourceFile));
31960
- let at2 = last.getEnd();
31961
- const hasComma = text[at2] === ",";
31976
+ let insertionIndex = last.getEnd();
31977
+ const hasComma = text[insertionIndex] === ",";
31962
31978
  if (hasComma)
31963
- at2 += 1;
31979
+ insertionIndex += 1;
31964
31980
  const insertion = `${hasComma ? "" : ","}
31965
31981
  ${indent}${entry}`;
31966
- writeFileSync5(configPath, text.slice(0, at2) + insertion + text.slice(at2), "utf-8");
31982
+ writeFileSync5(configPath, text.slice(0, insertionIndex) + insertion + text.slice(insertionIndex), "utf-8");
31967
31983
  } else {
31968
- const at2 = object.getStart(sourceFile) + 1;
31984
+ const insertionIndex = object.getStart(sourceFile) + 1;
31969
31985
  const indent = `${indentBefore(text, object.getStart(sourceFile))} `;
31970
31986
  const insertion = `
31971
31987
  ${indent}${entry}
31972
31988
  ${indentBefore(text, object.getStart(sourceFile))}`;
31973
- writeFileSync5(configPath, text.slice(0, at2) + insertion + text.slice(at2), "utf-8");
31989
+ writeFileSync5(configPath, text.slice(0, insertionIndex) + insertion + text.slice(insertionIndex), "utf-8");
31974
31990
  }
31975
31991
  return { message: `Updated ${request.name}`, ok: true };
31976
31992
  } catch (error) {
@@ -32375,23 +32391,21 @@ var AUTH_PACKAGE = "@absolutejs/auth", CONFIG_CANDIDATES4, findAuthSettingsPath
32375
32391
  }
32376
32392
  return null;
32377
32393
  }, parseSource2 = (configPath, text) => ts5.createSourceFile(configPath, text, ts5.ScriptTarget.Latest, true), findAuthSettingsObject = (sourceFile) => {
32378
- let found = null;
32379
- const visit2 = (node) => {
32380
- if (found)
32381
- return;
32394
+ const pending = [sourceFile];
32395
+ while (pending.length > 0) {
32396
+ const node = pending.pop();
32397
+ if (!node)
32398
+ continue;
32382
32399
  const [firstArgument] = ts5.isCallExpression(node) ? node.arguments : [];
32383
32400
  if (ts5.isCallExpression(node) && ts5.isIdentifier(node.expression) && node.expression.text === "defineAuthSettings" && firstArgument && ts5.isObjectLiteralExpression(firstArgument)) {
32384
- found = firstArgument;
32385
- return;
32401
+ return firstArgument;
32386
32402
  }
32387
32403
  if (ts5.isExportAssignment(node) && ts5.isObjectLiteralExpression(node.expression)) {
32388
- found = node.expression;
32389
- return;
32404
+ return node.expression;
32390
32405
  }
32391
- ts5.forEachChild(node, visit2);
32392
- };
32393
- visit2(sourceFile);
32394
- return found;
32406
+ node.forEachChild((child) => pending.push(child));
32407
+ }
32408
+ return null;
32395
32409
  }, parseAuthSettingsObject = (configPath) => {
32396
32410
  const text = readFileSync14(configPath, "utf-8");
32397
32411
  return {
@@ -32583,18 +32597,17 @@ var AUTH_PACKAGE2 = "@absolutejs/auth", REPO_URL = "https://github.com/absolutej
32583
32597
  const bindings = authBindings(sourceFile);
32584
32598
  if (bindings.size === 0)
32585
32599
  return null;
32586
- let match = null;
32587
- const visit2 = (node) => {
32588
- if (match)
32589
- return;
32600
+ const pending = [sourceFile];
32601
+ while (pending.length > 0) {
32602
+ const node = pending.pop();
32603
+ if (!node)
32604
+ continue;
32590
32605
  if (ts6.isCallExpression(node) && isAuthCall(node, bindings)) {
32591
- match = matchFromCall(node);
32592
- return;
32606
+ return matchFromCall(node);
32593
32607
  }
32594
- ts6.forEachChild(node, visit2);
32595
- };
32596
- visit2(sourceFile);
32597
- return match;
32608
+ node.forEachChild((child) => pending.push(child));
32609
+ }
32610
+ return null;
32598
32611
  }, featureStatuses = (keys) => AUTH_FEATURES.map((feature) => ({
32599
32612
  blurb: feature.blurb,
32600
32613
  configKey: feature.configKey,
@@ -33149,10 +33162,10 @@ var RecordField = ({ onChange, schema, value }) => {
33149
33162
  if (schema.kind !== "record")
33150
33163
  return null;
33151
33164
  const entries = isRecord(value) ? Object.entries(value) : [];
33152
- const rename = (from, to) => {
33165
+ const rename = (from, destination) => {
33153
33166
  const next = {};
33154
33167
  for (const [key, val] of entries)
33155
- next[key === from ? to : key] = val;
33168
+ next[key === from ? destination : key] = val;
33156
33169
  onChange(next);
33157
33170
  };
33158
33171
  const setValue = (key, val) => onChange(Object.fromEntries(entries.map((e) => e[0] === key ? [key, val] : e)));
@@ -33336,7 +33349,7 @@ var FieldEditor = (props) => {
33336
33349
 
33337
33350
  // src/cli/config/schema/fromJsonSchema.ts
33338
33351
  var MAX_DEPTH = 6;
33339
- var opaque = () => ({ kind: "opaque", typeText: "json" });
33352
+ var OPAQUE_SCHEMA = { kind: "opaque", typeText: "json" };
33340
33353
  var eslintOptionsSchema = (metaSchema) => {
33341
33354
  if (Array.isArray(metaSchema)) {
33342
33355
  if (metaSchema.length === 0)
@@ -33355,7 +33368,7 @@ var eslintOptionsSchema = (metaSchema) => {
33355
33368
  };
33356
33369
  var fromJsonSchema = (schema, depth = 0) => {
33357
33370
  if (depth > MAX_DEPTH || !isRecord(schema))
33358
- return opaque();
33371
+ return OPAQUE_SCHEMA;
33359
33372
  if (Array.isArray(schema.enum)) {
33360
33373
  const choices = schema.enum.filter((value) => typeof value === "string" || typeof value === "number");
33361
33374
  if (choices.length > 0)
@@ -33385,7 +33398,7 @@ var fromJsonSchema = (schema, depth = 0) => {
33385
33398
  };
33386
33399
  }
33387
33400
  return {
33388
- item: items ? fromJsonSchema(items, depth + 1) : opaque(),
33401
+ item: items ? fromJsonSchema(items, depth + 1) : OPAQUE_SCHEMA,
33389
33402
  kind: "array"
33390
33403
  };
33391
33404
  }
@@ -33408,11 +33421,11 @@ var fromJsonSchema = (schema, depth = 0) => {
33408
33421
  };
33409
33422
  }
33410
33423
  if (additional !== false) {
33411
- return { kind: "record", value: opaque() };
33424
+ return { kind: "record", value: OPAQUE_SCHEMA };
33412
33425
  }
33413
33426
  return { fields: [], kind: "object" };
33414
33427
  }
33415
- return opaque();
33428
+ return OPAQUE_SCHEMA;
33416
33429
  };
33417
33430
 
33418
33431
  // src/cli/config/eslint/EslintPanel.tsx
@@ -34968,10 +34981,10 @@ var AbsoluteConfigPanel = ({
34968
34981
  setBusy(null);
34969
34982
  }
34970
34983
  };
34971
- const opaque2 = new Set(state.opaqueKeys);
34984
+ const opaque = new Set(state.opaqueKeys);
34972
34985
  const visible = state.fields.filter((field) => matchesQuery4(query, field.name, field.description));
34973
- const editable = visible.filter((field) => !opaque2.has(field.name));
34974
- const advanced = visible.filter((field) => opaque2.has(field.name));
34986
+ const editable = visible.filter((field) => !opaque.has(field.name));
34987
+ const advanced = visible.filter((field) => opaque.has(field.name));
34975
34988
  return /* @__PURE__ */ jsx_dev_runtime5.jsxDEV("div", {
34976
34989
  className: "shell",
34977
34990
  children: [
@@ -38422,8 +38435,8 @@ var isDev = () => true;
38422
38435
  var buildErrorProps = (error) => {
38423
38436
  if (error instanceof Error) {
38424
38437
  return {
38425
- name: error.name,
38426
38438
  message: error.message,
38439
+ name: error.name,
38427
38440
  ...isDev() && error.stack ? { stack: error.stack } : {}
38428
38441
  };
38429
38442
  }
@@ -38527,7 +38540,7 @@ var tryFrameworkErrorConvention = async (framework, pageName, errorProps, error)
38527
38540
  let conventionPath = resolveErrorConventionPath(framework, pageName);
38528
38541
  if (!conventionPath && error instanceof Error && error.stack) {
38529
38542
  for (const match of error.stack.matchAll(/^\s*at\s+([A-Za-z_$][\w$]*)/gm)) {
38530
- const candidate = match[1];
38543
+ const [, candidate] = match;
38531
38544
  if (!candidate)
38532
38545
  continue;
38533
38546
  conventionPath = resolveErrorConventionPath(framework, candidate);
@@ -38672,9 +38685,10 @@ var renderFirstNotFound = async () => {
38672
38685
  // src/utils/spaRouteManifest.ts
38673
38686
  import { basename } from "path";
38674
38687
  var SPA_ROUTES_KEY = "__absoluteSpaRoutes";
38688
+ var isRuntimeSpaHost = (value) => typeof value === "object" && value !== null && typeof Reflect.get(value, "framework") === "string";
38675
38689
  var getSpaRouteManifest = () => {
38676
38690
  const value = Reflect.get(globalThis, SPA_ROUTES_KEY);
38677
- return Array.isArray(value) ? value : [];
38691
+ return Array.isArray(value) ? value.filter(isRuntimeSpaHost) : [];
38678
38692
  };
38679
38693
  var normalizePath = (path) => {
38680
38694
  const withLeadingSlash = path.startsWith("/") ? path : `/${path}`;
@@ -38741,6 +38755,7 @@ var renderSpaNotFound = async (framework, pageName, request) => {
38741
38755
  };
38742
38756
 
38743
38757
  // src/react/pageHandler.ts
38758
+ var withRequestUrl = (props, url) => Object.assign(Object.create(null), props, { url });
38744
38759
  var resolveRequestPathname = (request) => {
38745
38760
  if (!request)
38746
38761
  return;
@@ -38761,10 +38776,7 @@ var handleReactPageRequest = async (input) => {
38761
38776
  const options = input;
38762
38777
  const userProps = input.props;
38763
38778
  const requestPathname = resolveRequestPathname(input.request);
38764
- const maybeProps = requestPathname !== undefined && (!userProps || !("url" in userProps)) ? {
38765
- ...userProps ?? {},
38766
- url: requestPathname
38767
- } : userProps;
38779
+ const maybeProps = requestPathname !== undefined && (!userProps || !("url" in userProps)) ? withRequestUrl(userProps, requestPathname) : userProps;
38768
38780
  const pageName = Page.name || Page.displayName || "";
38769
38781
  try {
38770
38782
  const spaNotFound = await renderSpaNotFound("react", pageName, input.request);