sample-cross-fx 0.15.0-beta.4756 → 0.15.0-beta.4791

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.
@@ -54633,13 +54633,39 @@ __webpack_require__.r(__webpack_exports__);
54633
54633
  const wasmLib = 'Microsoft.AspNetCore.Components.WebAssembly';
54634
54634
  const coreLib = 'Piral.Blazor.Core';
54635
54635
 
54636
+ function createBase() {
54637
+ // Nothing found, we need to guess
54638
+ const el = document.createElement('base');
54639
+ let baseUrl = el.href; // The main app is served by a script - but we don't know which one
54640
+ // hence we just iterate over all the local ones and use the script
54641
+ // that is served from the "shortest" route - should work almost
54642
+ // always and if not - one can always explicitely set a <base> node
54643
+
54644
+ for (let i = document.scripts.length; i--;) {
54645
+ const s = document.scripts[i];
54646
+ const src = s.getAttribute('src');
54647
+
54648
+ if (src && src.startsWith('/')) {
54649
+ const segEnd = src.lastIndexOf('/');
54650
+ const newUrl = src.substring(0, segEnd + 1);
54651
+
54652
+ if (baseUrl.split('/').length > newUrl.split('/').length) {
54653
+ baseUrl = newUrl;
54654
+ }
54655
+ }
54656
+ }
54657
+
54658
+ el.href = baseUrl;
54659
+ return document.head.appendChild(el);
54660
+ }
54661
+
54636
54662
  function createBlazorStarter(publicPath) {
54637
54663
  const root = document.body.appendChild(document.createElement('div'));
54638
54664
  root.style.display = 'none';
54639
54665
  root.id = 'blazor-root';
54640
54666
 
54641
54667
  if (publicPath) {
54642
- const baseElement = document.head.querySelector('base') || document.head.appendChild(document.createElement('base'));
54668
+ const baseElement = document.head.querySelector('base') || createBase();
54643
54669
  const originalBase = baseElement.href;
54644
54670
  baseElement.href = publicPath;
54645
54671
  return () => {
@@ -63673,12 +63699,12 @@ function installPiralDebug(options) {
63673
63699
  debug: debugApiVersion,
63674
63700
  instance: {
63675
63701
  name: "sample-cross-fx",
63676
- version: "0.15.0-beta.4756",
63702
+ version: "0.15.0-beta.4791",
63677
63703
  dependencies: "@angular/common,@angular/compiler,@angular/core,@angular/platform-browser,@angular/platform-browser-dynamic,@webcomponents/webcomponentsjs,angular,aurelia-framework,aurelia-templating-binding,aurelia-templating-resources,aurelia-pal-browser,aurelia-event-aggregator,aurelia-history-browser,hyperapp,inferno,inferno-create-element,mithril,lit-element,solid-js,solid-js/dom,piral-ng/common,preact,riot,rxjs,vue,zone.js,tslib,react,react-dom,react-router,react-router-dom"
63678
63704
  },
63679
63705
  build: {
63680
- date: "2022-10-19T23:50:34.101Z",
63681
- cli: "0.15.0-beta.4756",
63706
+ date: "2022-10-25T20:38:47.169Z",
63707
+ cli: "0.15.0-beta.4791",
63682
63708
  compat: "0.15"
63683
63709
  }
63684
63710
  };
@@ -216315,4 +216341,4 @@ root.render( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__.createElement(piral
216315
216341
 
216316
216342
  /******/ })()
216317
216343
  ;
216318
- //# sourceMappingURL=index.6ad00d.js.map
216344
+ //# sourceMappingURL=index.4b45cb.js.map