@loomweaver/shell 0.7.8 → 0.8.0-preview.1
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
|
|
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
|
|
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,20 @@ 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.
|
|
11609
|
+
const APP_VERSION = '0.8.0-preview.1';
|
|
11610
|
+
|
|
11611
|
+
const PRERELEASE_IDENTIFIER = /^[0-9A-Za-z-]+$/;
|
|
11612
|
+
function isPreviewVersion(version) {
|
|
11613
|
+
const withoutBuildMetadata = version.split('+', 1)[0];
|
|
11614
|
+
const marker = withoutBuildMetadata.indexOf('-');
|
|
11615
|
+
if (marker === -1) {
|
|
11616
|
+
return false;
|
|
11617
|
+
}
|
|
11618
|
+
return withoutBuildMetadata
|
|
11619
|
+
.slice(marker + 1)
|
|
11620
|
+
.split('.')
|
|
11621
|
+
.every((identifier) => PRERELEASE_IDENTIFIER.test(identifier));
|
|
11622
|
+
}
|
|
11600
11623
|
|
|
11601
11624
|
/**
|
|
11602
11625
|
* The running build's version, sourced from `<Version>` in Directory.Build.props
|
|
@@ -11610,6 +11633,16 @@ class VersionService {
|
|
|
11610
11633
|
/** SemVer of the running build, e.g. `0.1.0`. */
|
|
11611
11634
|
version = signal(APP_VERSION, /* @ts-ignore */
|
|
11612
11635
|
...(ngDevMode ? [{ debugName: "version" }] : /* istanbul ignore next */ []));
|
|
11636
|
+
/**
|
|
11637
|
+
* Whether {@link version} is a preview of a line that has not been released — `0.8.0-preview.3`
|
|
11638
|
+
* rather than `0.7.9`. Ask this instead of taking the version apart yourself.
|
|
11639
|
+
*
|
|
11640
|
+
* **Announcing it is yours.** The workbench marks a preview nowhere on its own: how loudly a
|
|
11641
|
+
* product tells its users that it is running something unfinished is the product's judgement.
|
|
11642
|
+
* A distribution that wants it visible draws it, from this.
|
|
11643
|
+
*/
|
|
11644
|
+
isPreview = computed(() => isPreviewVersion(this.version()), /* @ts-ignore */
|
|
11645
|
+
...(ngDevMode ? [{ debugName: "isPreview" }] : /* istanbul ignore next */ []));
|
|
11613
11646
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: VersionService, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
11614
11647
|
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.0", ngImport: i0, type: VersionService });
|
|
11615
11648
|
}
|
|
@@ -13403,6 +13436,7 @@ class CompositionReport {
|
|
|
13403
13436
|
barItems = inject(BAR_ITEM, { optional: true }) ?? [];
|
|
13404
13437
|
railItems = inject(RAIL_ITEM, { optional: true }) ?? [];
|
|
13405
13438
|
views = inject(VIEW, { optional: true }) ?? [];
|
|
13439
|
+
versions = inject(VersionService);
|
|
13406
13440
|
checkStaticContributions() {
|
|
13407
13441
|
for (const problem of this.staticProblems()) {
|
|
13408
13442
|
console.warn(problem);
|
|
@@ -13410,6 +13444,7 @@ class CompositionReport {
|
|
|
13410
13444
|
}
|
|
13411
13445
|
print() {
|
|
13412
13446
|
const lines = [
|
|
13447
|
+
`Version: ${this.versions.version()}${this.versions.isPreview() ? ' (preview)' : ''}`,
|
|
13413
13448
|
`Layout: ${this.layout.regions
|
|
13414
13449
|
.map((region) => `${region.id} (${region.type}/${region.dock})`)
|
|
13415
13450
|
.join(', ')}`,
|
|
@@ -14774,6 +14809,9 @@ function provideShell(options = {}) {
|
|
|
14774
14809
|
...(options.retention === undefined
|
|
14775
14810
|
? []
|
|
14776
14811
|
: [{ provide: SURFACE_RETENTION, useValue: options.retention }]),
|
|
14812
|
+
...(options.padding === undefined
|
|
14813
|
+
? []
|
|
14814
|
+
: [{ provide: SURFACE_PADDING, useValue: options.padding }]),
|
|
14777
14815
|
...(options.serviceWorker === false
|
|
14778
14816
|
? []
|
|
14779
14817
|
: [
|
|
@@ -15238,6 +15276,7 @@ class ContentRouter {
|
|
|
15238
15276
|
lastRoutes = [];
|
|
15239
15277
|
lastOmitted = [];
|
|
15240
15278
|
pendingDeepLink = null;
|
|
15279
|
+
parkedOnPlaceholder = false;
|
|
15241
15280
|
userNavigated = false;
|
|
15242
15281
|
start() {
|
|
15243
15282
|
if (this.started) {
|
|
@@ -15261,9 +15300,10 @@ class ContentRouter {
|
|
|
15261
15300
|
}
|
|
15262
15301
|
this.lastRoutes = routes;
|
|
15263
15302
|
this.lastOmitted = omitted;
|
|
15303
|
+
const wasParked = this.parkedOnPlaceholder;
|
|
15264
15304
|
this.applyConfig(routes, omitted);
|
|
15265
15305
|
this.reuse.pruneExcept((key) => matchRoute(routes, key) !== undefined);
|
|
15266
|
-
this.retryDeepLink();
|
|
15306
|
+
this.retryDeepLink(wasParked);
|
|
15267
15307
|
}, { injector: this.injector });
|
|
15268
15308
|
let firstAuthRun = true;
|
|
15269
15309
|
effect(() => {
|
|
@@ -15284,18 +15324,40 @@ class ContentRouter {
|
|
|
15284
15324
|
}, { injector: this.injector });
|
|
15285
15325
|
}
|
|
15286
15326
|
applyConfig(routes, omitted) {
|
|
15327
|
+
const pending = this.pendingPlaceholder(routes);
|
|
15328
|
+
this.parkedOnPlaceholder = pending.length > 0;
|
|
15287
15329
|
this.router.resetConfig([
|
|
15288
15330
|
{ path: `${POPOUT_PREFIX}/**`, component: PopoutView },
|
|
15289
15331
|
...buildContentRoutes(routes, omitted, this.retention),
|
|
15332
|
+
...pending,
|
|
15290
15333
|
]);
|
|
15291
15334
|
}
|
|
15292
|
-
|
|
15335
|
+
pendingPlaceholder(routes) {
|
|
15336
|
+
const target = this.pendingDeepLink;
|
|
15337
|
+
if (target === null) {
|
|
15338
|
+
return [];
|
|
15339
|
+
}
|
|
15340
|
+
const path = normalizePath(target);
|
|
15341
|
+
const matched = matchRoute(routes, path);
|
|
15342
|
+
if (path === '' || segmentsOf(matched?.path ?? '').length > 0) {
|
|
15343
|
+
return [];
|
|
15344
|
+
}
|
|
15345
|
+
return [
|
|
15346
|
+
{
|
|
15347
|
+
path,
|
|
15348
|
+
component: RouteUnavailableView,
|
|
15349
|
+
canActivate: [keepPopout],
|
|
15350
|
+
data: { content: true, routePlaceholder: true },
|
|
15351
|
+
},
|
|
15352
|
+
];
|
|
15353
|
+
}
|
|
15354
|
+
retryDeepLink(wasParked) {
|
|
15293
15355
|
const target = this.pendingDeepLink;
|
|
15294
15356
|
if (!target) {
|
|
15295
15357
|
return;
|
|
15296
15358
|
}
|
|
15297
15359
|
const here = normalizePath(this.router.url);
|
|
15298
|
-
if (here === normalizePath(target) || this.userNavigated) {
|
|
15360
|
+
if ((here === normalizePath(target) && !wasParked) || this.userNavigated) {
|
|
15299
15361
|
this.pendingDeepLink = null;
|
|
15300
15362
|
return;
|
|
15301
15363
|
}
|
|
@@ -15304,7 +15366,7 @@ class ContentRouter {
|
|
|
15304
15366
|
return;
|
|
15305
15367
|
}
|
|
15306
15368
|
void this.router
|
|
15307
|
-
.navigateByUrl(target)
|
|
15369
|
+
.navigateByUrl(target, { onSameUrlNavigation: 'reload' })
|
|
15308
15370
|
.then((ok) => {
|
|
15309
15371
|
if (ok) {
|
|
15310
15372
|
this.pendingDeepLink = null;
|
|
@@ -15822,6 +15884,7 @@ class HostPluginContext {
|
|
|
15822
15884
|
};
|
|
15823
15885
|
this.hostFacts = {
|
|
15824
15886
|
version: version.version,
|
|
15887
|
+
isPreview: version.isPreview,
|
|
15825
15888
|
updateAvailable: update.updateAvailable,
|
|
15826
15889
|
updatesEnabled: update.enabled,
|
|
15827
15890
|
checkForUpdate: () => update.checkForUpdate(),
|
|
@@ -16335,7 +16398,7 @@ function sanitizeRpcSurface(pluginId, surface, permitted) {
|
|
|
16335
16398
|
: undefined,
|
|
16336
16399
|
saveOn: raw['saveOn'] === 'hide' ? 'hide' : undefined,
|
|
16337
16400
|
closable: raw['closable'] === false ? false : undefined,
|
|
16338
|
-
padded: raw['padded'] ===
|
|
16401
|
+
padded: typeof raw['padded'] === 'boolean' ? raw['padded'] : undefined,
|
|
16339
16402
|
routable,
|
|
16340
16403
|
docks,
|
|
16341
16404
|
};
|