@absolutejs/absolute 0.19.0-beta.1005 → 0.19.0-beta.1007

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.
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  var __require = import.meta.require;
3
3
 
4
- // .angular-partial-tmp-YncvOu/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-WJqUtu/src/core/streamingSlotRegistrar.ts
5
5
  var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
6
6
  var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
7
7
  var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  var __require = import.meta.require;
3
3
 
4
- // .angular-partial-tmp-YncvOu/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-WJqUtu/src/core/streamingSlotRegistrar.ts
5
5
  var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
6
6
  var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
7
7
  var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
@@ -48,7 +48,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
48
48
  getWarningController()?.maybeWarn(primitiveName);
49
49
  };
50
50
 
51
- // .angular-partial-tmp-YncvOu/src/core/streamingSlotRegistry.ts
51
+ // .angular-partial-tmp-WJqUtu/src/core/streamingSlotRegistry.ts
52
52
  var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
53
53
  var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
54
54
  var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
@@ -14742,12 +14742,34 @@ init_ssrRender();
14742
14742
  var lastSelector = "angular-page";
14743
14743
  var isRecord5 = (value) => typeof value === "object" && value !== null;
14744
14744
  var isAngularComponent2 = (value) => typeof value === "function";
14745
+ var componentHostsRouterOutlet = (component) => {
14746
+ const componentDef = Reflect.get(component, "\u0275cmp");
14747
+ if (!componentDef)
14748
+ return false;
14749
+ const rawDependencies = componentDef.dependencies;
14750
+ const dependencies = typeof rawDependencies === "function" ? rawDependencies() : rawDependencies;
14751
+ if (!Array.isArray(dependencies))
14752
+ return false;
14753
+ return dependencies.some((dependency) => {
14754
+ const directiveDef = Reflect.get(dependency, "\u0275dir") ?? dependency;
14755
+ const selectors = directiveDef?.selectors;
14756
+ return Array.isArray(selectors) && JSON.stringify(selectors).includes("router-outlet");
14757
+ });
14758
+ };
14745
14759
  var resolvePageComponent = (pageModule) => {
14746
14760
  const defaultExport = pageModule.default;
14747
14761
  if (isAngularComponent2(defaultExport)) {
14748
14762
  return defaultExport;
14749
14763
  }
14750
- return Object.values(pageModule).findLast((value) => isAngularComponent2(value));
14764
+ const components = Object.values(pageModule).filter(isAngularComponent2);
14765
+ if (components.length <= 1) {
14766
+ return components[0];
14767
+ }
14768
+ const outletHosts = components.filter(componentHostsRouterOutlet);
14769
+ if (outletHosts.length === 1) {
14770
+ return outletHosts[0];
14771
+ }
14772
+ return components.at(-1);
14751
14773
  };
14752
14774
  var compilerImportPromise = null;
14753
14775
  var ensureAngularCompiler = () => {
@@ -15426,5 +15448,5 @@ export {
15426
15448
  ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
15427
15449
  };
15428
15450
 
15429
- //# debugId=02EA2C04A14C82A864756E2164756E21
15451
+ //# debugId=118B11B67ED8951964756E2164756E21
15430
15452
  //# sourceMappingURL=index.js.map