@loomweaver/shell 0.7.8 → 0.7.9

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.
@@ -8896,6 +8896,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
8896
8896
  args: [{ selector: '[lwRetainedComponent]' }]
8897
8897
  }], ctorParameters: () => [], propDecorators: { lwRetainedComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "lwRetainedComponent", required: true }] }], componentInjector: [{ type: i0.Input, args: [{ isSignal: true, alias: "componentInjector", required: true }] }], retentionKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "retentionKey", required: true }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], retain: [{ type: i0.Input, args: [{ isSignal: true, alias: "retain", required: false }] }] } });
8898
8898
 
8899
+ const SURFACE_PADDING = new InjectionToken('lw.surface-padding', {
8900
+ providedIn: 'root',
8901
+ factory: () => 'none',
8902
+ });
8903
+ function effectivePadding(declared, fallback) {
8904
+ return declared === undefined ? fallback === 'inset' : declared;
8905
+ }
8906
+
8899
8907
  class ContentSecondaryPane {
8900
8908
  path = input.required(/* @ts-ignore */
8901
8909
  ...(ngDevMode ? [{ debugName: "path" }] : /* istanbul ignore next */ []));
@@ -8907,6 +8915,7 @@ class ContentSecondaryPane {
8907
8915
  ...(ngDevMode ? [{ debugName: "retentionScope" }] : /* istanbul ignore next */ []));
8908
8916
  instanceReleased = output();
8909
8917
  registry = inject(ContributionRegistry);
8918
+ padding = inject(SURFACE_PADDING);
8910
8919
  viewMount = inject(ViewMountService);
8911
8920
  componentLoader = inject(ComponentLoader);
8912
8921
  auth = inject(AuthContext);
@@ -8934,7 +8943,7 @@ class ContentSecondaryPane {
8934
8943
  ...(ngDevMode ? [{ debugName: "declaredRoute" }] : /* istanbul ignore next */ []));
8935
8944
  isContainerSurface = computed(() => this.declaredRoute()?.container !== undefined, /* @ts-ignore */
8936
8945
  ...(ngDevMode ? [{ debugName: "isContainerSurface" }] : /* istanbul ignore next */ []));
8937
- padded = computed(() => this.declared()?.padded !== false, /* @ts-ignore */
8946
+ padded = computed(() => effectivePadding(this.declared()?.padded, this.padding), /* @ts-ignore */
8938
8947
  ...(ngDevMode ? [{ debugName: "padded" }] : /* istanbul ignore next */ []));
8939
8948
  hostClass = computed(() => {
8940
8949
  if (this.isContainerSurface()) {
@@ -10459,6 +10468,7 @@ class ContentArea {
10459
10468
  auth = inject(AuthContext);
10460
10469
  features = inject(SHELL_FEATURES).content;
10461
10470
  retention = inject(SURFACE_RETENTION);
10471
+ padding = inject(SURFACE_PADDING);
10462
10472
  componentLoader = inject(ComponentLoader);
10463
10473
  surfaceInjectorFor = surfaceInjectorFactory(inject(Injector), inject(EnvironmentInjector), { urlDriven: true });
10464
10474
  urlPaneId = computed(() => this.layout.primaryId(CONTENT_DOCK), /* @ts-ignore */
@@ -10544,7 +10554,7 @@ class ContentArea {
10544
10554
  return false;
10545
10555
  }
10546
10556
  const route = matchRoute(this.registry.contentRoutes(), this.tabs.activeTabRoot());
10547
- return route?.padded !== false;
10557
+ return effectivePadding(route?.padded, this.padding);
10548
10558
  }, /* @ts-ignore */
10549
10559
  ...(ngDevMode ? [{ debugName: "activeIsPadded" }] : /* istanbul ignore next */ []));
10550
10560
  canMinimize = computed(() => this.features.minimize && this.isSplit() && !this.maximized(), /* @ts-ignore */
@@ -11596,7 +11606,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
11596
11606
  // GENERATED — do not edit by hand.
11597
11607
  // Written by tools/stamp-version.mjs from <Version> in Directory.Build.props.
11598
11608
  // Single source of truth: Directory.Build.props (bump via scripts/bump-version.sh).
11599
- const APP_VERSION = '0.7.8';
11609
+ const APP_VERSION = '0.7.9';
11600
11610
 
11601
11611
  /**
11602
11612
  * The running build's version, sourced from `<Version>` in Directory.Build.props
@@ -14774,6 +14784,9 @@ function provideShell(options = {}) {
14774
14784
  ...(options.retention === undefined
14775
14785
  ? []
14776
14786
  : [{ provide: SURFACE_RETENTION, useValue: options.retention }]),
14787
+ ...(options.padding === undefined
14788
+ ? []
14789
+ : [{ provide: SURFACE_PADDING, useValue: options.padding }]),
14777
14790
  ...(options.serviceWorker === false
14778
14791
  ? []
14779
14792
  : [
@@ -15238,6 +15251,7 @@ class ContentRouter {
15238
15251
  lastRoutes = [];
15239
15252
  lastOmitted = [];
15240
15253
  pendingDeepLink = null;
15254
+ parkedOnPlaceholder = false;
15241
15255
  userNavigated = false;
15242
15256
  start() {
15243
15257
  if (this.started) {
@@ -15261,9 +15275,10 @@ class ContentRouter {
15261
15275
  }
15262
15276
  this.lastRoutes = routes;
15263
15277
  this.lastOmitted = omitted;
15278
+ const wasParked = this.parkedOnPlaceholder;
15264
15279
  this.applyConfig(routes, omitted);
15265
15280
  this.reuse.pruneExcept((key) => matchRoute(routes, key) !== undefined);
15266
- this.retryDeepLink();
15281
+ this.retryDeepLink(wasParked);
15267
15282
  }, { injector: this.injector });
15268
15283
  let firstAuthRun = true;
15269
15284
  effect(() => {
@@ -15284,18 +15299,40 @@ class ContentRouter {
15284
15299
  }, { injector: this.injector });
15285
15300
  }
15286
15301
  applyConfig(routes, omitted) {
15302
+ const pending = this.pendingPlaceholder(routes);
15303
+ this.parkedOnPlaceholder = pending.length > 0;
15287
15304
  this.router.resetConfig([
15288
15305
  { path: `${POPOUT_PREFIX}/**`, component: PopoutView },
15289
15306
  ...buildContentRoutes(routes, omitted, this.retention),
15307
+ ...pending,
15290
15308
  ]);
15291
15309
  }
15292
- retryDeepLink() {
15310
+ pendingPlaceholder(routes) {
15311
+ const target = this.pendingDeepLink;
15312
+ if (target === null) {
15313
+ return [];
15314
+ }
15315
+ const path = normalizePath(target);
15316
+ const matched = matchRoute(routes, path);
15317
+ if (path === '' || segmentsOf(matched?.path ?? '').length > 0) {
15318
+ return [];
15319
+ }
15320
+ return [
15321
+ {
15322
+ path,
15323
+ component: RouteUnavailableView,
15324
+ canActivate: [keepPopout],
15325
+ data: { content: true, routePlaceholder: true },
15326
+ },
15327
+ ];
15328
+ }
15329
+ retryDeepLink(wasParked) {
15293
15330
  const target = this.pendingDeepLink;
15294
15331
  if (!target) {
15295
15332
  return;
15296
15333
  }
15297
15334
  const here = normalizePath(this.router.url);
15298
- if (here === normalizePath(target) || this.userNavigated) {
15335
+ if ((here === normalizePath(target) && !wasParked) || this.userNavigated) {
15299
15336
  this.pendingDeepLink = null;
15300
15337
  return;
15301
15338
  }
@@ -15304,7 +15341,7 @@ class ContentRouter {
15304
15341
  return;
15305
15342
  }
15306
15343
  void this.router
15307
- .navigateByUrl(target)
15344
+ .navigateByUrl(target, { onSameUrlNavigation: 'reload' })
15308
15345
  .then((ok) => {
15309
15346
  if (ok) {
15310
15347
  this.pendingDeepLink = null;
@@ -16335,7 +16372,7 @@ function sanitizeRpcSurface(pluginId, surface, permitted) {
16335
16372
  : undefined,
16336
16373
  saveOn: raw['saveOn'] === 'hide' ? 'hide' : undefined,
16337
16374
  closable: raw['closable'] === false ? false : undefined,
16338
- padded: raw['padded'] === false ? false : undefined,
16375
+ padded: typeof raw['padded'] === 'boolean' ? raw['padded'] : undefined,
16339
16376
  routable,
16340
16377
  docks,
16341
16378
  };