@loomweaver/shell 0.7.3 → 0.7.5
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.
|
@@ -12,7 +12,7 @@ import { filter, map, of, catchError, forkJoin } from 'rxjs';
|
|
|
12
12
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
13
13
|
import { WindowMessenger, connect } from 'penpal';
|
|
14
14
|
import DOMPurify from 'dompurify';
|
|
15
|
-
import { heroMinus, heroArrowsPointingIn, heroArrowTopRightOnSquare, heroArrowsPointingOut, heroArrowDownTray, heroPuzzlePiece, heroMagnifyingGlass, heroQuestionMarkCircle, heroCog6Tooth, heroXCircle, heroExclamationTriangle, heroCheck, heroLockClosed, heroInformationCircle, heroArrowUturnLeft, heroArrowPath, heroArrowsUpDown, heroEye, heroTrash, heroPencilSquare, heroPlus, heroListBullet, heroBars3, heroDocument, heroRectangleGroup, heroXMark, heroChevronDown, heroChevronDoubleRight, heroChevronDoubleLeft, heroComputerDesktop, heroMoon, heroSun } from '@ng-icons/heroicons/outline';
|
|
15
|
+
import { heroMinus, heroArrowsPointingIn, heroArrowTopRightOnSquare, heroArrowsPointingOut, heroArrowDownTray, heroPuzzlePiece, heroMagnifyingGlass, heroQuestionMarkCircle, heroCog6Tooth, heroXCircle, heroExclamationTriangle, heroCheck, heroLockClosed, heroInformationCircle, heroArrowUturnLeft, heroArrowPath, heroArrowsUpDown, heroEye, heroTrash, heroPencilSquare, heroPlus, heroListBullet, heroBars3, heroViewColumns, heroDocument, heroRectangleGroup, heroXMark, heroChevronDown, heroChevronDoubleRight, heroChevronDoubleLeft, heroComputerDesktop, heroMoon, heroSun } from '@ng-icons/heroicons/outline';
|
|
16
16
|
import { HttpClient, provideHttpClient } from '@angular/common/http';
|
|
17
17
|
import { SwUpdate, provideServiceWorker } from '@angular/service-worker';
|
|
18
18
|
import { marked } from 'marked';
|
|
@@ -7854,6 +7854,7 @@ const LOOM_ICONS = {
|
|
|
7854
7854
|
workspaces: heroRectangleGroup,
|
|
7855
7855
|
menu: heroBars3,
|
|
7856
7856
|
document: heroDocument,
|
|
7857
|
+
openWork: heroViewColumns,
|
|
7857
7858
|
navigator: heroBars3,
|
|
7858
7859
|
outline: heroListBullet,
|
|
7859
7860
|
add: heroPlus,
|
|
@@ -11266,7 +11267,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
11266
11267
|
// GENERATED — do not edit by hand.
|
|
11267
11268
|
// Written by tools/stamp-version.mjs from <Version> in Directory.Build.props.
|
|
11268
11269
|
// Single source of truth: Directory.Build.props (bump via scripts/bump-version.sh).
|
|
11269
|
-
const APP_VERSION = '0.7.
|
|
11270
|
+
const APP_VERSION = '0.7.5';
|
|
11270
11271
|
|
|
11271
11272
|
/**
|
|
11272
11273
|
* The running build's version, sourced from `<Version>` in Directory.Build.props
|
|
@@ -14139,7 +14140,7 @@ function seedHostCommands(registry, layout, deps) {
|
|
|
14139
14140
|
registry.addCommand({
|
|
14140
14141
|
id: QUICK_OPEN_COMMAND_ID,
|
|
14141
14142
|
title: 'palette.quickOpenTitle',
|
|
14142
|
-
icon: '
|
|
14143
|
+
icon: 'openWork',
|
|
14143
14144
|
shortcut: 'mod+p',
|
|
14144
14145
|
run: () => {
|
|
14145
14146
|
dialogs.open(CommandPalette, {
|
|
@@ -15071,20 +15072,44 @@ function provideShellRouter(extraRoutes = []) {
|
|
|
15071
15072
|
];
|
|
15072
15073
|
}
|
|
15073
15074
|
|
|
15074
|
-
class
|
|
15075
|
+
class SearchEntry {
|
|
15076
|
+
commandId = input.required(/* @ts-ignore */
|
|
15077
|
+
...(ngDevMode ? [{ debugName: "commandId" }] : /* istanbul ignore next */ []));
|
|
15078
|
+
testId = input.required(/* @ts-ignore */
|
|
15079
|
+
...(ngDevMode ? [{ debugName: "testId" }] : /* istanbul ignore next */ []));
|
|
15075
15080
|
commands = inject(CommandService);
|
|
15076
15081
|
compact = inject(BAR_CONTEXT, { optional: true })?.dock === 'bottom';
|
|
15077
|
-
|
|
15082
|
+
command = computed(() => {
|
|
15083
|
+
const id = this.commandId();
|
|
15084
|
+
const command = this.commands.commands().find((entry) => entry.id === id);
|
|
15085
|
+
return command && this.commands.available(command) ? command : undefined;
|
|
15086
|
+
}, /* @ts-ignore */
|
|
15087
|
+
...(ngDevMode ? [{ debugName: "command" }] : /* istanbul ignore next */ []));
|
|
15088
|
+
shortcut = computed(() => this.commands.shortcutOf(this.command()), /* @ts-ignore */
|
|
15078
15089
|
...(ngDevMode ? [{ debugName: "shortcut" }] : /* istanbul ignore next */ []));
|
|
15079
15090
|
open() {
|
|
15080
|
-
this.commands.execute(
|
|
15091
|
+
this.commands.execute(this.commandId());
|
|
15081
15092
|
}
|
|
15093
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: SearchEntry, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15094
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: SearchEntry, isStandalone: true, selector: "lw-search-entry", inputs: { commandId: { classPropertyName: "commandId", publicName: "commandId", isSignal: true, isRequired: true, transformFunction: null }, testId: { classPropertyName: "testId", publicName: "testId", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@if (command(); as entry) {\n <button\n type=\"button\"\n (click)=\"open()\"\n [attr.data-testid]=\"testId()\"\n [class]=\"compact ? 'flex items-center rounded px-1.5 py-0.5 text-content-faint transition-colors hover:bg-surface-overlay hover:text-content' : 'lw-segmented'\"\n [attr.aria-label]=\"entry.title | transloco\"\n >\n <span\n [class]=\"compact ? 'relative flex items-center gap-1' : 'lw-segmented-item w-auto gap-2 px-1.5'\"\n >\n @if (entry.icon; as icon) {\n <lw-icon [name]=\"icon\" size=\"1rem\" />\n }\n @if (shortcut(); as chord) {\n <kbd class=\"text-[0.6875rem] leading-tight text-content-faint\">{{ chord }}</kbd>\n }\n <lw-tooltip\n [text]=\"entry.title | transloco\"\n [position]=\"compact ? 'top' : 'bottom'\"\n />\n </span>\n </button>\n}\n", dependencies: [{ kind: "pipe", type: TranslocoPipe, name: "transloco" }] });
|
|
15095
|
+
}
|
|
15096
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: SearchEntry, decorators: [{
|
|
15097
|
+
type: Component,
|
|
15098
|
+
args: [{ selector: 'lw-search-entry', imports: [TranslocoPipe], schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "@if (command(); as entry) {\n <button\n type=\"button\"\n (click)=\"open()\"\n [attr.data-testid]=\"testId()\"\n [class]=\"compact ? 'flex items-center rounded px-1.5 py-0.5 text-content-faint transition-colors hover:bg-surface-overlay hover:text-content' : 'lw-segmented'\"\n [attr.aria-label]=\"entry.title | transloco\"\n >\n <span\n [class]=\"compact ? 'relative flex items-center gap-1' : 'lw-segmented-item w-auto gap-2 px-1.5'\"\n >\n @if (entry.icon; as icon) {\n <lw-icon [name]=\"icon\" size=\"1rem\" />\n }\n @if (shortcut(); as chord) {\n <kbd class=\"text-[0.6875rem] leading-tight text-content-faint\">{{ chord }}</kbd>\n }\n <lw-tooltip\n [text]=\"entry.title | transloco\"\n [position]=\"compact ? 'top' : 'bottom'\"\n />\n </span>\n </button>\n}\n" }]
|
|
15099
|
+
}], propDecorators: { commandId: [{ type: i0.Input, args: [{ isSignal: true, alias: "commandId", required: true }] }], testId: [{ type: i0.Input, args: [{ isSignal: true, alias: "testId", required: true }] }] } });
|
|
15100
|
+
|
|
15101
|
+
class CommandPaletteEntry {
|
|
15102
|
+
commandId = PALETTE_COMMAND_ID;
|
|
15082
15103
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CommandPaletteEntry, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15083
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
15104
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.0", type: CommandPaletteEntry, isStandalone: true, selector: "lw-command-palette-entry", ngImport: i0, template: '<lw-search-entry [commandId]="commandId" testId="command-palette-entry" />', isInline: true, dependencies: [{ kind: "component", type: SearchEntry, selector: "lw-search-entry", inputs: ["commandId", "testId"] }] });
|
|
15084
15105
|
}
|
|
15085
15106
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CommandPaletteEntry, decorators: [{
|
|
15086
15107
|
type: Component,
|
|
15087
|
-
args: [{
|
|
15108
|
+
args: [{
|
|
15109
|
+
selector: 'lw-command-palette-entry',
|
|
15110
|
+
imports: [SearchEntry],
|
|
15111
|
+
template: '<lw-search-entry [commandId]="commandId" testId="command-palette-entry" />',
|
|
15112
|
+
}]
|
|
15088
15113
|
}] });
|
|
15089
15114
|
|
|
15090
15115
|
/**
|
|
@@ -15093,6 +15118,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
15093
15118
|
* without a distribution component. Opt-in: omit it for a palette that opens only by shortcut. Uses the
|
|
15094
15119
|
* `shell.commandPaletteEntry` bar-item id, so `provideShell({ omit: ['shell.commandPaletteEntry'] })`
|
|
15095
15120
|
* removes it.
|
|
15121
|
+
*
|
|
15122
|
+
* The badge never outlives what it opens: omitting `shell.commandPalette`, or a session that may not
|
|
15123
|
+
* run it, takes the badge with it rather than leaving a control that does nothing. Switching
|
|
15124
|
+
* shortcuts off is the exception — the badge stays and still opens the palette, it simply names no
|
|
15125
|
+
* chord. Independent of {@link provideQuickOpenEntry}, which places the entry to the search over
|
|
15126
|
+
* open work.
|
|
15096
15127
|
*/
|
|
15097
15128
|
function provideCommandPaletteEntry(options = {}) {
|
|
15098
15129
|
return makeEnvironmentProviders(provideBarItems({
|
|
@@ -15104,6 +15135,43 @@ function provideCommandPaletteEntry(options = {}) {
|
|
|
15104
15135
|
}));
|
|
15105
15136
|
}
|
|
15106
15137
|
|
|
15138
|
+
class QuickOpenEntry {
|
|
15139
|
+
commandId = QUICK_OPEN_COMMAND_ID;
|
|
15140
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: QuickOpenEntry, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15141
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.0", type: QuickOpenEntry, isStandalone: true, selector: "lw-quick-open-entry", ngImport: i0, template: '<lw-search-entry [commandId]="commandId" testId="quick-open-entry" />', isInline: true, dependencies: [{ kind: "component", type: SearchEntry, selector: "lw-search-entry", inputs: ["commandId", "testId"] }] });
|
|
15142
|
+
}
|
|
15143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: QuickOpenEntry, decorators: [{
|
|
15144
|
+
type: Component,
|
|
15145
|
+
args: [{
|
|
15146
|
+
selector: 'lw-quick-open-entry',
|
|
15147
|
+
imports: [SearchEntry],
|
|
15148
|
+
template: '<lw-search-entry [commandId]="commandId" testId="quick-open-entry" />',
|
|
15149
|
+
}]
|
|
15150
|
+
}] });
|
|
15151
|
+
|
|
15152
|
+
/**
|
|
15153
|
+
* Places a built quick-open entry in a Bar — a badge-styled affordance (icon + the OS-correct
|
|
15154
|
+
* shortcut) that opens `shell.quickOpen`, the search over open work. Opt-in: omit it for a search
|
|
15155
|
+
* that opens only by shortcut. Uses the `shell.quickOpenEntry` bar-item id, so
|
|
15156
|
+
* `provideShell({ omit: ['shell.quickOpenEntry'] })` removes it.
|
|
15157
|
+
*
|
|
15158
|
+
* The badge never outlives what it opens: omitting `shell.quickOpen`, or a session that may not run
|
|
15159
|
+
* it, takes the badge with it rather than leaving a control that does nothing. A pop-out window is
|
|
15160
|
+
* the same case — it offers no search over open work, so the badge is absent there. Switching
|
|
15161
|
+
* shortcuts off is the exception: the badge stays and still opens the search, it simply names no
|
|
15162
|
+
* chord. Independent of {@link provideCommandPaletteEntry}, so a product may place either, both or
|
|
15163
|
+
* neither.
|
|
15164
|
+
*/
|
|
15165
|
+
function provideQuickOpenEntry(options = {}) {
|
|
15166
|
+
return makeEnvironmentProviders(provideBarItems({
|
|
15167
|
+
id: 'shell.quickOpenEntry',
|
|
15168
|
+
bar: options.bar ?? 'status-bar',
|
|
15169
|
+
slot: options.slot ?? 'start',
|
|
15170
|
+
order: options.order ?? 5,
|
|
15171
|
+
component: QuickOpenEntry,
|
|
15172
|
+
}));
|
|
15173
|
+
}
|
|
15174
|
+
|
|
15107
15175
|
class SurfaceRevealService {
|
|
15108
15176
|
paneTree = inject(PaneTreeService);
|
|
15109
15177
|
tabs = inject(ContentTabsService);
|
|
@@ -17012,5 +17080,5 @@ function provideIcons(icons) {
|
|
|
17012
17080
|
* Generated bundle index. Do not edit.
|
|
17013
17081
|
*/
|
|
17014
17082
|
|
|
17015
|
-
export { AUTH_SOURCE, AuthContext, BAR_ITEM, CAPABILITY_GRANTS, COMMAND_INVOKER, CapabilityGrantService, CommandInvocationService, CommandService, ContentTabsService, ContributionRegistry, DEFAULT_LAYOUT, DEFAULT_SHELL_FEATURES, DEVICE_LEVEL_KEYS, DialogOutlet, DialogService, FRAME_PLUGIN, FramePluginRuntime, KeybindingService, LW_BUTTON_TAG, LW_ICON_TAG, LW_MARKDOWN_TAG, LW_TOOLTIP_TAG, LocalStorageStore, LwButton, LwButtonElement, LwIconElement, LwMarkdownElement, LwSettingRow, LwSpinner, LwTooltipElement, LwVersion, NotificationService, PLUGIN, PLUGIN_CATALOG, PluginEnablementService, PluginInstallService, PluginRuntime, PopoutService, RAIL_ITEM, SETTINGS_STORE, SHELL_FEATURES, SHELL_LAYOUT, SettingsService, Shell, StateSyncService, TRANSLATION_NAMESPACES, TRANSLATION_OVERRIDES, ThemeService, ToastOutlet, UpdateBadge, UpdateService, VIEW, VersionService, WORKING_STATE_STORE, WORKSPACE_DEFINITIONS, defineLwButton, defineLwIcon, defineLwMarkdown, defineLwTooltip, effectiveCapabilities, formatChord, provideAuthSource, provideBarItems, provideCapabilityGrants, provideCommandPaletteEntry, provideFramePlugins, provideIcons, provideIdentityScopedStores, provideLayout, providePluginCatalog, providePlugins, provideRailItems, provideSettingsStore, provideShell, provideShellFeatures, provideShellRouter, provideTabAddressResolver, provideTranslationNamespaces, provideTranslationOverrides, provideUnauthorizedRedirect, provideViews, provideWorkingStateStore, provideWorkspaces, urlPluginCatalog };
|
|
17083
|
+
export { AUTH_SOURCE, AuthContext, BAR_ITEM, CAPABILITY_GRANTS, COMMAND_INVOKER, CapabilityGrantService, CommandInvocationService, CommandService, ContentTabsService, ContributionRegistry, DEFAULT_LAYOUT, DEFAULT_SHELL_FEATURES, DEVICE_LEVEL_KEYS, DialogOutlet, DialogService, FRAME_PLUGIN, FramePluginRuntime, KeybindingService, LW_BUTTON_TAG, LW_ICON_TAG, LW_MARKDOWN_TAG, LW_TOOLTIP_TAG, LocalStorageStore, LwButton, LwButtonElement, LwIconElement, LwMarkdownElement, LwSettingRow, LwSpinner, LwTooltipElement, LwVersion, NotificationService, PLUGIN, PLUGIN_CATALOG, PluginEnablementService, PluginInstallService, PluginRuntime, PopoutService, RAIL_ITEM, SETTINGS_STORE, SHELL_FEATURES, SHELL_LAYOUT, SettingsService, Shell, StateSyncService, TRANSLATION_NAMESPACES, TRANSLATION_OVERRIDES, ThemeService, ToastOutlet, UpdateBadge, UpdateService, VIEW, VersionService, WORKING_STATE_STORE, WORKSPACE_DEFINITIONS, defineLwButton, defineLwIcon, defineLwMarkdown, defineLwTooltip, effectiveCapabilities, formatChord, provideAuthSource, provideBarItems, provideCapabilityGrants, provideCommandPaletteEntry, provideFramePlugins, provideIcons, provideIdentityScopedStores, provideLayout, providePluginCatalog, providePlugins, provideQuickOpenEntry, provideRailItems, provideSettingsStore, provideShell, provideShellFeatures, provideShellRouter, provideTabAddressResolver, provideTranslationNamespaces, provideTranslationOverrides, provideUnauthorizedRedirect, provideViews, provideWorkingStateStore, provideWorkspaces, urlPluginCatalog };
|
|
17016
17084
|
//# sourceMappingURL=loomweaver-shell.mjs.map
|