@absolutejs/absolute 0.19.0-beta.704 → 0.19.0-beta.706

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 (103) hide show
  1. package/dist/angular/browser.js +6 -4
  2. package/dist/angular/browser.js.map +3 -3
  3. package/dist/angular/index.js +71 -82
  4. package/dist/angular/index.js.map +10 -10
  5. package/dist/angular/server.js +70 -81
  6. package/dist/angular/server.js.map +10 -10
  7. package/dist/build.js +152 -84
  8. package/dist/build.js.map +15 -15
  9. package/dist/cli/index.js +330 -296
  10. package/dist/client/index.js +7 -4
  11. package/dist/client/index.js.map +3 -3
  12. package/dist/index.js +253 -153
  13. package/dist/index.js.map +24 -24
  14. package/dist/islands/index.js +9 -6
  15. package/dist/islands/index.js.map +5 -5
  16. package/dist/react/browser.js +7 -7
  17. package/dist/react/browser.js.map +2 -2
  18. package/dist/react/components/browser/index.js +101 -101
  19. package/dist/react/components/index.js +104 -104
  20. package/dist/react/components/index.js.map +2 -2
  21. package/dist/react/index.js +77 -88
  22. package/dist/react/index.js.map +10 -10
  23. package/dist/react/jsxDevRuntimeCompat.js +1 -6
  24. package/dist/react/jsxDevRuntimeCompat.js.map +3 -3
  25. package/dist/react/server.js +57 -71
  26. package/dist/react/server.js.map +8 -8
  27. package/dist/src/angular/components/defer-slot-templates.directive.d.ts +0 -7
  28. package/dist/src/angular/components/defer-slot.component.d.ts +2 -5
  29. package/dist/src/angular/components/image.component.d.ts +2 -5
  30. package/dist/src/angular/components/index.d.ts +4 -4
  31. package/dist/src/angular/components/stream-slot.component.d.ts +0 -3
  32. package/dist/src/angular/pageHandler.d.ts +6 -1
  33. package/dist/src/angular/ssrRender.d.ts +1 -1
  34. package/dist/src/build/buildAngularVendor.d.ts +3 -4
  35. package/dist/src/constants.d.ts +21 -0
  36. package/dist/src/core/ssrCache.d.ts +1 -1
  37. package/dist/src/core/wrapPageHandlerWithStreamingSlots.d.ts +1 -1
  38. package/dist/src/react/jsxDevRuntimeCompat.d.ts +3 -6
  39. package/dist/src/react/pageHandler.d.ts +2 -1
  40. package/dist/src/svelte/pageHandler.d.ts +2 -2
  41. package/dist/src/utils/defineConfig.d.ts +2 -2
  42. package/dist/src/utils/imageProcessing.d.ts +1 -1
  43. package/dist/src/utils/loadConfig.d.ts +38 -2
  44. package/dist/src/vue/components/Image.d.ts +3 -3
  45. package/dist/src/vue/components/index.d.ts +1 -1
  46. package/dist/src/vue/index.d.ts +1 -1
  47. package/dist/src/vue/pageHandler.d.ts +2 -1
  48. package/dist/svelte/index.js +52 -58
  49. package/dist/svelte/index.js.map +10 -10
  50. package/dist/svelte/server.js +46 -55
  51. package/dist/svelte/server.js.map +9 -9
  52. package/dist/vue/components/Image.js +18 -18
  53. package/dist/vue/components/Image.js.map +3 -3
  54. package/dist/vue/components/index.js +77 -62
  55. package/dist/vue/components/index.js.map +5 -5
  56. package/dist/vue/index.js +137 -142
  57. package/dist/vue/index.js.map +13 -13
  58. package/dist/vue/server.js +54 -77
  59. package/dist/vue/server.js.map +8 -8
  60. package/package.json +42 -42
  61. package/dist/angular/components/constants.js +0 -56
  62. package/dist/angular/components/core/streamingSlotRegistrar.js +0 -58
  63. package/dist/angular/components/core/streamingSlotRegistry.js +0 -114
  64. package/dist/angular/components/defer-slot-payload.js +0 -6
  65. package/dist/angular/components/defer-slot-templates.directive.js +0 -44
  66. package/dist/angular/components/defer-slot.component.js +0 -149
  67. package/dist/angular/components/image.component.js +0 -202
  68. package/dist/angular/components/index.js +0 -4
  69. package/dist/angular/components/stream-slot.component.js +0 -103
  70. package/dist/dev/client/constants.ts +0 -26
  71. package/dist/dev/client/cssUtils.ts +0 -307
  72. package/dist/dev/client/domDiff.ts +0 -226
  73. package/dist/dev/client/domState.ts +0 -421
  74. package/dist/dev/client/domTracker.ts +0 -61
  75. package/dist/dev/client/errorOverlay.ts +0 -184
  76. package/dist/dev/client/frameworkDetect.ts +0 -63
  77. package/dist/dev/client/handlers/angular.ts +0 -551
  78. package/dist/dev/client/handlers/angularRuntime.ts +0 -206
  79. package/dist/dev/client/handlers/html.ts +0 -363
  80. package/dist/dev/client/handlers/htmx.ts +0 -272
  81. package/dist/dev/client/handlers/react.ts +0 -108
  82. package/dist/dev/client/handlers/rebuild.ts +0 -153
  83. package/dist/dev/client/handlers/svelte.ts +0 -332
  84. package/dist/dev/client/handlers/vue.ts +0 -292
  85. package/dist/dev/client/headPatch.ts +0 -233
  86. package/dist/dev/client/hmrClient.ts +0 -251
  87. package/dist/dev/client/hmrState.ts +0 -14
  88. package/dist/dev/client/moduleVersions.ts +0 -62
  89. package/dist/dev/client/reactRefreshSetup.ts +0 -33
  90. package/dist/src/angular/components/constants.d.ts +0 -53
  91. package/dist/svelte/components/AwaitSlot.svelte +0 -39
  92. package/dist/svelte/components/AwaitSlot.svelte.d.ts +0 -2
  93. package/dist/svelte/components/Head.svelte +0 -144
  94. package/dist/svelte/components/Head.svelte.d.ts +0 -2
  95. package/dist/svelte/components/Image.svelte +0 -164
  96. package/dist/svelte/components/Image.svelte.d.ts +0 -5
  97. package/dist/svelte/components/Island.svelte +0 -71
  98. package/dist/svelte/components/Island.svelte.d.ts +0 -5
  99. package/dist/svelte/components/JsonLd.svelte +0 -21
  100. package/dist/svelte/components/JsonLd.svelte.d.ts +0 -2
  101. package/dist/svelte/components/StreamSlot.svelte +0 -41
  102. package/dist/svelte/components/StreamSlot.svelte.d.ts +0 -2
  103. package/dist/types/globals.d.ts +0 -121
@@ -79,7 +79,7 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
79
79
  var __require = import.meta.require;
80
80
 
81
81
  // src/constants.ts
82
- var ANGULAR_INIT_TIMEOUT_MS = 500, ANSI_ESCAPE_LENGTH = 3, ASCII_SPACE = 32, BASE_36_RADIX = 36, BUN_BUILD_WARNING_SUPPRESSION = "wildcard sideEffects are not supported yet", BODY_SLICE_LENGTH = 2000, BYTES_PER_KILOBYTE = 1024, CLI_ARGS_OFFSET = 3, CSS_ERROR_RESOLVE_DELAY_MS = 50, CSS_MAX_CHECK_ATTEMPTS = 10, CSS_MAX_PARSE_TIMEOUT_MS = 500, CSS_SHEET_READY_TIMEOUT_MS = 100, DEFAULT_CHUNK_SIZE = 16384, DEFAULT_DEBOUNCE_MS = 15, DEFAULT_PORT = 3000, DEV_SERVER_RESTART_DEBOUNCE_MS = 100, DOM_UPDATE_DELAY_MS = 50, FILE_PROTOCOL_PREFIX_LENGTH = 7, FOCUS_ID_PREFIX_LENGTH = 3, FOCUS_IDX_PREFIX_LENGTH = 4, FOCUS_NAME_PREFIX_LENGTH = 5, HMR_UPDATE_TIMEOUT_MS = 2000, HOOK_SIGNATURE_LENGTH = 12, EXCLUDE_LAST_OFFSET = -1, HTTP_STATUS_OK = 200, HTTP_STATUS_BAD_REQUEST = 400, HTTP_STATUS_NOT_FOUND = 404, HOURS_IN_DAY = 24, HOURS_IN_HALF_DAY = 12, MAX_ERROR_LENGTH = 200, MAX_RECONNECT_ATTEMPTS = 60, MILLISECONDS_IN_A_SECOND = 1000, MINUTES_IN_AN_HOUR = 60, SECONDS_IN_A_MINUTE = 60, MILLISECONDS_IN_A_MINUTE, MILLISECONDS_IN_A_DAY, OVERLAY_FADE_DURATION_MS = 150, PING_INTERVAL_MS = 30000, RAF_BATCH_COUNT = 3, RANDOM_ID_END_INDEX = 11, REBUILD_BATCH_DELAY_MS = 10, REBUILD_RELOAD_DELAY_MS = 200, RECONNECT_INITIAL_DELAY_MS = 500, RECONNECT_POLL_INTERVAL_MS = 300, REACT_STREAM_SLOT_FAST_DELAY_MS = 5, REACT_STREAM_SLOT_SLOW_DELAY_MS = 20, SIGINT_EXIT_CODE = 130, SIGTERM_EXIT_CODE = 143, SVELTE_CSS_LOAD_TIMEOUT_MS = 500, TIME_PRECISION = 2, TWO_THIRDS, UNFOUND_INDEX = -1, WEBSOCKET_NORMAL_CLOSURE = 1000;
82
+ var ANGULAR_INIT_TIMEOUT_MS = 500, ANSI_ESCAPE_LENGTH = 3, ASCII_SPACE = 32, BASE_36_RADIX = 36, BUN_BUILD_WARNING_SUPPRESSION = "wildcard sideEffects are not supported yet", BODY_SLICE_LENGTH = 2000, BYTES_PER_KILOBYTE = 1024, CLI_ARGS_OFFSET = 3, CSS_ERROR_RESOLVE_DELAY_MS = 50, CSS_MAX_CHECK_ATTEMPTS = 10, CSS_MAX_PARSE_TIMEOUT_MS = 500, CSS_SHEET_READY_TIMEOUT_MS = 100, DEFAULT_CHUNK_SIZE = 16384, DEFAULT_DEBOUNCE_MS = 15, DEFAULT_PORT = 3000, DEV_SERVER_RESTART_DEBOUNCE_MS = 100, DOM_UPDATE_DELAY_MS = 50, FILE_PROTOCOL_PREFIX_LENGTH = 7, FOCUS_ID_PREFIX_LENGTH = 3, FOCUS_IDX_PREFIX_LENGTH = 4, FOCUS_NAME_PREFIX_LENGTH = 5, HMR_UPDATE_TIMEOUT_MS = 2000, HOOK_SIGNATURE_LENGTH = 12, EXCLUDE_LAST_OFFSET = -1, HTTP_STATUS_OK = 200, HTTP_STATUS_BAD_REQUEST = 400, HTTP_STATUS_NOT_FOUND = 404, HOURS_IN_DAY = 24, HOURS_IN_HALF_DAY = 12, MAX_ERROR_LENGTH = 200, MAX_RECONNECT_ATTEMPTS = 60, MILLISECONDS_IN_A_SECOND = 1000, MINUTES_IN_AN_HOUR = 60, SECONDS_IN_A_MINUTE = 60, MILLISECONDS_IN_A_MINUTE, MILLISECONDS_IN_A_DAY, OVERLAY_FADE_DURATION_MS = 150, PING_INTERVAL_MS = 30000, RAF_BATCH_COUNT = 3, RANDOM_ID_END_INDEX = 11, REBUILD_BATCH_DELAY_MS = 10, REBUILD_RELOAD_DELAY_MS = 200, RECONNECT_INITIAL_DELAY_MS = 500, RECONNECT_POLL_INTERVAL_MS = 300, REACT_STREAM_SLOT_FAST_DELAY_MS = 5, REACT_STREAM_SLOT_SLOW_DELAY_MS = 20, SIGINT_EXIT_CODE = 130, SIGTERM_EXIT_CODE = 143, SVELTE_CSS_LOAD_TIMEOUT_MS = 500, TIME_PRECISION = 2, TWO_THIRDS, UNFOUND_INDEX = -1, WEBSOCKET_NORMAL_CLOSURE = 1000, WORKSPACE_COMMAND_ARGS_OFFSET = 3, WORKSPACE_FAILURE_LOG_PRINT_LIMIT = 30, WORKSPACE_FAILURE_RECENT_LOG_LIMIT = 60, WORKSPACE_READY_ATTEMPT_TIMEOUT_MS = 5000, WORKSPACE_READY_PROBE_INTERVAL_MS = 250, WORKSPACE_READY_TIMEOUT_MS = 30000, WORKSPACE_SHUTDOWN_TIMEOUT_MS = 1e4, WORKSPACE_TUI_DEFAULT_HEIGHT = 28, WORKSPACE_TUI_DEFAULT_WIDTH = 100, WORKSPACE_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30, WORKSPACE_TUI_FOOTER_LINE_COUNT = 3, WORKSPACE_TUI_MIN_LOG_HEIGHT = 3, WORKSPACE_TUI_MIN_SERVICE_NAME_WIDTH = 7, WORKSPACE_TUI_MIN_TARGET_WIDTH = 8, WORKSPACE_TUI_MIN_WRAP_WIDTH = 12, WORKSPACE_TUI_PROMPT_CURSOR_OFFSET = 3, WORKSPACE_TUI_RECENT_LOG_LIMIT = 40, WORKSPACE_TUI_RENDER_DEBOUNCE_MS = 16, WORKSPACE_TUI_STATUS_WIDTH = 10, WORKSPACE_TUI_TARGET_PADDING_WIDTH = 6, WORKSPACE_TUI_VISIBILITY_WIDTH = 8;
83
83
  var init_constants = __esm(() => {
84
84
  MILLISECONDS_IN_A_MINUTE = MILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE;
85
85
  MILLISECONDS_IN_A_DAY = MILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE * MINUTES_IN_AN_HOUR * HOURS_IN_DAY;
@@ -302,7 +302,9 @@ var initDominoAdapter = (platformServer) => {
302
302
  import(resolveAngularPackage("@angular/common")),
303
303
  import(resolveAngularPackage("@angular/core"))
304
304
  ]);
305
- if (false) {}
305
+ if (true) {
306
+ core.enableProdMode();
307
+ }
306
308
  initDominoAdapter(platformServer);
307
309
  return {
308
310
  APP_BASE_HREF: common.APP_BASE_HREF,
@@ -359,7 +361,7 @@ var routePropsCache, cacheRouteData = (pagePath, data) => {
359
361
  Sanitizer: core.Sanitizer,
360
362
  SecurityContext: core.SecurityContext
361
363
  };
362
- }, buildProviders = (deps, sanitizer, maybeProps, tokenMap) => {
364
+ }, buildProviders = (deps, sanitizer, maybeProps, tokenMap, userProviders = []) => {
363
365
  const providers = [
364
366
  deps.provideServerRendering(),
365
367
  deps.provideClientHydration(),
@@ -369,7 +371,8 @@ var routePropsCache, cacheRouteData = (pagePath, data) => {
369
371
  provide: deps.DomSanitizer,
370
372
  useValue: sanitizer
371
373
  },
372
- { provide: deps.Sanitizer, useValue: sanitizer }
374
+ { provide: deps.Sanitizer, useValue: sanitizer },
375
+ ...userProviders
373
376
  ];
374
377
  if (!maybeProps) {
375
378
  return providers;
@@ -995,7 +998,7 @@ ${contents}` : contents, normalizePostcssModule = (mod) => {
995
998
  const config = normalizePostcssModule(loaded);
996
999
  const value = typeof config === "function" ? await config({
997
1000
  cwd: process.cwd(),
998
- env: "development"
1001
+ env: "test"
999
1002
  }) : config;
1000
1003
  return normalizePostcssModule(value) ?? {};
1001
1004
  }, normalizePostcssPlugins = (plugins) => {
@@ -1652,7 +1655,7 @@ __export(exports_devRouteRegistrationCallsite, {
1652
1655
  });
1653
1656
  import { AsyncLocalStorage } from "async_hooks";
1654
1657
  import { Elysia } from "elysia";
1655
- var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES, isObjectRecord3 = (value) => Boolean(value) && typeof value === "object", isAsyncLocalStorage2 = (value) => isObjectRecord3(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function", getRouteCallsiteStorage = () => {
1658
+ var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES, isObjectRecord3 = (value) => Boolean(value) && typeof value === "object", isAsyncLocalStorage2 = (value) => isObjectRecord3(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function", isRouteMethod = (value) => typeof value === "function", getRouteCallsiteStorage = () => {
1656
1659
  const value = Reflect.get(globalThis, ROUTE_CALLSITE_STORAGE_KEY);
1657
1660
  if (value === null || typeof value === "undefined") {
1658
1661
  return;
@@ -1666,19 +1669,10 @@ var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES,
1666
1669
  const storage = new AsyncLocalStorage;
1667
1670
  Reflect.set(globalThis, ROUTE_CALLSITE_STORAGE_KEY, storage);
1668
1671
  return storage;
1669
- }, normalizeCallsitePath = (value) => value.replace(`${process.cwd()}/`, "").replace(process.cwd(), "").replace(/^\.\/+/, ""), extractRouteRegistrationCallsite = (stack) => {
1670
- const frames = stack.split(`
1671
- `).slice(1).map((line) => line.trim());
1672
- for (const frame of frames) {
1673
- if (frame.includes("/node_modules/") || frame.includes("/dist/") || frame.includes("/src/core/devRouteRegistrationCallsite.")) {
1674
- continue;
1675
- }
1676
- const locationMatch = frame.match(/\((\/[^)]+:\d+:\d+)\)$/) ?? frame.match(/at (\/[^ ]+:\d+:\d+)$/);
1677
- if (locationMatch?.[1]) {
1678
- return normalizeCallsitePath(locationMatch[1]);
1679
- }
1680
- }
1681
- return;
1672
+ }, normalizeCallsitePath = (value) => value.replace(`${process.cwd()}/`, "").replace(process.cwd(), "").replace(/^\.\/+/, ""), shouldIgnoreRouteCallsiteFrame = (frame) => frame.includes("/node_modules/") || frame.includes("/dist/") || frame.includes("/src/core/devRouteRegistrationCallsite."), getRouteCallsiteLocation = (frame) => frame.match(/\((\/[^)]+:\d+:\d+)\)$/)?.[1] ?? frame.match(/at (\/[^ ]+:\d+:\d+)$/)?.[1], extractRouteRegistrationCallsite = (stack) => {
1673
+ const location = stack.split(`
1674
+ `).slice(1).map((line) => line.trim()).filter((frame) => !shouldIgnoreRouteCallsiteFrame(frame)).map((frame) => getRouteCallsiteLocation(frame)).find((frameLocation) => frameLocation !== undefined);
1675
+ return location ? normalizeCallsitePath(location) : undefined;
1682
1676
  }, captureRouteRegistrationCallsite = () => {
1683
1677
  const { stack } = new Error;
1684
1678
  if (!stack) {
@@ -1690,29 +1684,29 @@ var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES,
1690
1684
  return handler;
1691
1685
  }
1692
1686
  const storage = ensureRouteCallsiteStorage();
1687
+ const routeHandler = handler;
1693
1688
  return function wrappedRouteHandler(...args) {
1694
- return storage.run({ callsite }, () => Reflect.apply(handler, this, args));
1689
+ return storage.run({ callsite }, () => Reflect.apply(routeHandler, this, args));
1695
1690
  };
1691
+ }, createPatchedRouteMethod = (originalMethod) => function patchedRouteMethod(path, handler, ...rest) {
1692
+ const callsite = captureRouteRegistrationCallsite();
1693
+ return Reflect.apply(originalMethod, this, [
1694
+ path,
1695
+ wrapRouteHandlerWithCallsite(handler, callsite),
1696
+ ...rest
1697
+ ]);
1696
1698
  }, getCurrentRouteRegistrationCallsite = () => getRouteCallsiteStorage()?.getStore()?.callsite, patchElysiaRouteRegistrationCallsites = () => {
1697
1699
  if (false) {}
1698
1700
  if (Reflect.get(globalThis, ROUTE_CALLSITE_PATCHED_KEY) === true) {
1699
1701
  return;
1700
1702
  }
1701
- const prototype = Elysia.prototype;
1702
- for (const methodName of ROUTE_METHOD_NAMES) {
1703
- const originalMethod = prototype[methodName];
1704
- if (typeof originalMethod !== "function") {
1705
- continue;
1706
- }
1707
- prototype[methodName] = function patchedRouteMethod(path, handler, ...rest) {
1708
- const callsite = captureRouteRegistrationCallsite();
1709
- return Reflect.apply(originalMethod, this, [
1710
- path,
1711
- wrapRouteHandlerWithCallsite(handler, callsite),
1712
- ...rest
1713
- ]);
1714
- };
1715
- }
1703
+ const { prototype } = Elysia;
1704
+ ROUTE_METHOD_NAMES.forEach((methodName) => {
1705
+ const originalMethod = Reflect.get(prototype, methodName);
1706
+ if (!isRouteMethod(originalMethod))
1707
+ return;
1708
+ Reflect.set(prototype, methodName, createPatchedRouteMethod(originalMethod));
1709
+ });
1716
1710
  Reflect.set(globalThis, ROUTE_CALLSITE_PATCHED_KEY, true);
1717
1711
  };
1718
1712
  var init_devRouteRegistrationCallsite = __esm(() => {
@@ -2549,9 +2543,9 @@ var init_logger = __esm(() => {
2549
2543
  });
2550
2544
 
2551
2545
  // src/core/ssrCache.ts
2552
- var dirtyFrameworks, markSsrCacheDirty = (framework) => {
2546
+ var dirtyFrameworks, isSsrCacheDirty = (framework) => dirtyFrameworks.has(framework), markSsrCacheDirty = (framework) => {
2553
2547
  dirtyFrameworks.add(framework);
2554
- }, isSsrCacheDirty = (framework) => dirtyFrameworks.has(framework);
2548
+ };
2555
2549
  var init_ssrCache = __esm(() => {
2556
2550
  dirtyFrameworks = new Set;
2557
2551
  });
@@ -4404,7 +4398,7 @@ var resolveNotFoundConventionPath = (framework) => getMap()[framework]?.defaults
4404
4398
  var setConventions = (map) => {
4405
4399
  Reflect.set(globalThis, CONVENTIONS_KEY, map);
4406
4400
  };
4407
- var isDev = () => true;
4401
+ var isDev = () => false;
4408
4402
  var buildErrorProps = (error) => {
4409
4403
  const message = error instanceof Error ? error.message : String(error);
4410
4404
  const stack = isDev() && error instanceof Error ? error.stack : undefined;
@@ -4578,14 +4572,21 @@ var NOT_FOUND_PRIORITY = [
4578
4572
  "angular"
4579
4573
  ];
4580
4574
  var renderFirstNotFound = async () => {
4581
- for (const framework of NOT_FOUND_PRIORITY) {
4582
- if (!getMap()[framework]?.defaults?.notFound)
4583
- continue;
4575
+ const renderNext = async (frameworks) => {
4576
+ const [framework, ...remaining] = frameworks;
4577
+ if (!framework) {
4578
+ return null;
4579
+ }
4580
+ if (!getMap()[framework]?.defaults?.notFound) {
4581
+ return renderNext(remaining);
4582
+ }
4584
4583
  const response = await renderConventionNotFound(framework);
4585
- if (response)
4584
+ if (response) {
4586
4585
  return response;
4587
- }
4588
- return null;
4586
+ }
4587
+ return renderNext(remaining);
4588
+ };
4589
+ return renderNext(NOT_FOUND_PRIORITY);
4589
4590
  };
4590
4591
 
4591
4592
  // src/angular/pageHandler.ts
@@ -4810,19 +4811,12 @@ var formatWarningCallsite = (callsite) => {
4810
4811
  }
4811
4812
  return `\x1B[36m${match[1]}\x1B[33m${match[2]}\x1B[0m`;
4812
4813
  };
4814
+ var shouldIgnoreWarningFrame = (frame) => frame.includes("/node_modules/") || frame.includes("/dist/") || frame.includes("/src/react/pageHandler.") || frame.includes("/src/vue/pageHandler.") || frame.includes("/src/svelte/pageHandler.") || frame.includes("/src/angular/pageHandler.") || frame.includes("/src/core/streamingSlotWarningScope.");
4815
+ var getWarningLocation = (frame) => frame.match(/\((\/[^)]+:\d+:\d+)\)$/)?.[1] ?? frame.match(/at (\/[^ ]+:\d+:\d+)$/)?.[1];
4813
4816
  var extractCallsiteFromStack = (stack) => {
4814
- const frames = stack.split(`
4815
- `).slice(1).map((line) => line.trim());
4816
- for (const frame of frames) {
4817
- if (frame.includes("/node_modules/") || frame.includes("/dist/") || frame.includes("/src/react/pageHandler.") || frame.includes("/src/vue/pageHandler.") || frame.includes("/src/svelte/pageHandler.") || frame.includes("/src/angular/pageHandler.") || frame.includes("/src/core/streamingSlotWarningScope.")) {
4818
- continue;
4819
- }
4820
- const locationMatch = frame.match(/\((\/[^)]+:\d+:\d+)\)$/) ?? frame.match(/at (\/[^ ]+:\d+:\d+)$/);
4821
- if (locationMatch?.[1]) {
4822
- return normalizeCallsitePath2(locationMatch[1]);
4823
- }
4824
- }
4825
- return;
4817
+ const location = stack.split(`
4818
+ `).slice(1).map((line) => line.trim()).filter((frame) => !shouldIgnoreWarningFrame(frame)).map((frame) => getWarningLocation(frame)).find((frameLocation) => frameLocation !== undefined);
4819
+ return location ? normalizeCallsitePath2(location) : undefined;
4826
4820
  };
4827
4821
  var buildMissingCollectorWarning = (primitiveName, handlerCallsite) => `${primitiveName} rendered during SSR without streaming slot collection enabled. Add { collectStreamingSlots: true } to this page handler to enable out-of-order streaming for this route.${handlerCallsite ? ` Update ${formatWarningCallsite(handlerCallsite)}.` : ""}`;
4828
4822
  setStreamingSlotWarningController({
@@ -4851,6 +4845,13 @@ init_ssrRender();
4851
4845
  var lastSelector = "angular-page";
4852
4846
  var isRecord5 = (value) => typeof value === "object" && value !== null;
4853
4847
  var isAngularComponent = (value) => typeof value === "function";
4848
+ var resolvePageComponent = (pageModule) => {
4849
+ if (isAngularComponent(pageModule.default)) {
4850
+ return pageModule.default;
4851
+ }
4852
+ return Object.values(pageModule).find((value) => isAngularComponent(value));
4853
+ };
4854
+ var isAngularPageRequestInput = (value) => typeof value === "object" && value !== null && ("pagePath" in value) && ("indexPath" in value);
4854
4855
  var compilerImportPromise = null;
4855
4856
  var ensureAngularCompiler = () => {
4856
4857
  if (!compilerImportPromise) {
@@ -4894,29 +4895,17 @@ var resolveRuntimeAngularModulePath = async (pagePath) => {
4894
4895
  };
4895
4896
  var angularSsrContext = new AsyncLocalStorage3;
4896
4897
  setSsrContextGetter(() => angularSsrContext.getStore());
4897
- var handleAngularPageRequest = async (PageOrInput, pagePath, indexPath, headTag = "<head></head>", ...args) => {
4898
+ async function handleAngularPageRequest(PageOrInput, pagePath, indexPath, headTag = "<head></head>", ...args) {
4898
4899
  const requestId = `angular_${Date.now()}_${Math.random().toString(BASE_36_RADIX).substring(2, RANDOM_ID_END_INDEX)}`;
4899
4900
  return angularSsrContext.run(requestId, async () => {
4900
4901
  await ensureAngularCompiler();
4901
- const {
4902
- headTag: resolvedHeadTag,
4903
- indexPath: resolvedIndexPath,
4904
- options,
4905
- pagePath: resolvedPagePath,
4906
- props: maybeProps
4907
- } = typeof PageOrInput === "object" && PageOrInput !== null && "pagePath" in PageOrInput && "indexPath" in PageOrInput ? {
4908
- headTag: PageOrInput.headTag ?? "<head></head>",
4909
- indexPath: PageOrInput.indexPath,
4910
- options: PageOrInput,
4911
- pagePath: PageOrInput.pagePath,
4912
- props: PageOrInput.props
4913
- } : {
4914
- headTag,
4915
- indexPath: indexPath ?? "",
4916
- options: args[1],
4917
- pagePath: pagePath ?? "",
4918
- props: args[0]
4919
- };
4902
+ const isInput = isAngularPageRequestInput(PageOrInput);
4903
+ const resolvedHeadTag = isInput ? PageOrInput.headTag ?? "<head></head>" : headTag;
4904
+ const resolvedIndexPath = isInput ? PageOrInput.indexPath : indexPath ?? "";
4905
+ const options = isInput ? PageOrInput : args[1];
4906
+ const resolvedPagePath = isInput ? PageOrInput.pagePath : pagePath ?? "";
4907
+ const maybeProps = isInput ? PageOrInput.props : args[0];
4908
+ const userProviders = isInput ? PageOrInput.providers : undefined;
4920
4909
  cacheRouteData(resolvedPagePath, {
4921
4910
  headTag: resolvedHeadTag,
4922
4911
  props: maybeProps
@@ -4939,9 +4928,9 @@ var handleAngularPageRequest = async (PageOrInput, pagePath, indexPath, headTag
4939
4928
  if (!pageModule) {
4940
4929
  throw new Error(`Invalid Angular page module: ${resolvedPagePath}`);
4941
4930
  }
4942
- const PageComponent = pageModule.default;
4931
+ const PageComponent = resolvePageComponent(pageModule);
4943
4932
  if (!isAngularComponent(PageComponent)) {
4944
- throw new Error(`Angular page module must export a component by default: ${resolvedPagePath}`);
4933
+ throw new Error(`Angular page module must export an Angular component: ${resolvedPagePath}`);
4945
4934
  }
4946
4935
  const hasIslands = typeof pageModule.__ABSOLUTE_PAGE_HAS_ISLANDS__ === "boolean" ? pageModule.__ABSOLUTE_PAGE_HAS_ISLANDS__ : false;
4947
4936
  const ssrResult = await loadSsrDeps(runtimePagePath);
@@ -4953,7 +4942,7 @@ var handleAngularPageRequest = async (PageOrInput, pagePath, indexPath, headTag
4953
4942
  if (ssrResult?.core)
4954
4943
  resetSsrSanitizer();
4955
4944
  const sanitizer = getSsrSanitizer(deps);
4956
- const providers = buildProviders(deps, sanitizer, maybeProps, tokenMap);
4945
+ const providers = buildProviders(deps, sanitizer, maybeProps, tokenMap, userProviders);
4957
4946
  const rawHtml = await renderAngularApp(deps, PageComponent, providers, htmlString);
4958
4947
  const shouldProcessIslands = hasIslands || rawHtml.includes("<absolute-island");
4959
4948
  const htmlWithLoweredIslands = shouldProcessIslands ? await lowerAngularServerIslands(rawHtml) : rawHtml;
@@ -4975,10 +4964,10 @@ var handleAngularPageRequest = async (PageOrInput, pagePath, indexPath, headTag
4975
4964
  });
4976
4965
  }
4977
4966
  });
4978
- };
4967
+ }
4979
4968
  export {
4980
4969
  handleAngularPageRequest
4981
4970
  };
4982
4971
 
4983
- //# debugId=1538E35073996FC164756E2164756E21
4972
+ //# debugId=3176CF51FDCF791164756E2164756E21
4984
4973
  //# sourceMappingURL=server.js.map