@loomweaver/shell 0.7.3 → 0.7.4
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.
|
@@ -11266,7 +11266,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
11266
11266
|
// GENERATED — do not edit by hand.
|
|
11267
11267
|
// Written by tools/stamp-version.mjs from <Version> in Directory.Build.props.
|
|
11268
11268
|
// Single source of truth: Directory.Build.props (bump via scripts/bump-version.sh).
|
|
11269
|
-
const APP_VERSION = '0.7.
|
|
11269
|
+
const APP_VERSION = '0.7.4';
|
|
11270
11270
|
|
|
11271
11271
|
/**
|
|
11272
11272
|
* The running build's version, sourced from `<Version>` in Directory.Build.props
|
|
@@ -15071,20 +15071,44 @@ function provideShellRouter(extraRoutes = []) {
|
|
|
15071
15071
|
];
|
|
15072
15072
|
}
|
|
15073
15073
|
|
|
15074
|
-
class
|
|
15074
|
+
class SearchEntry {
|
|
15075
|
+
commandId = input.required(/* @ts-ignore */
|
|
15076
|
+
...(ngDevMode ? [{ debugName: "commandId" }] : /* istanbul ignore next */ []));
|
|
15077
|
+
testId = input.required(/* @ts-ignore */
|
|
15078
|
+
...(ngDevMode ? [{ debugName: "testId" }] : /* istanbul ignore next */ []));
|
|
15075
15079
|
commands = inject(CommandService);
|
|
15076
15080
|
compact = inject(BAR_CONTEXT, { optional: true })?.dock === 'bottom';
|
|
15077
|
-
|
|
15081
|
+
command = computed(() => {
|
|
15082
|
+
const id = this.commandId();
|
|
15083
|
+
const command = this.commands.commands().find((entry) => entry.id === id);
|
|
15084
|
+
return command && this.commands.available(command) ? command : undefined;
|
|
15085
|
+
}, /* @ts-ignore */
|
|
15086
|
+
...(ngDevMode ? [{ debugName: "command" }] : /* istanbul ignore next */ []));
|
|
15087
|
+
shortcut = computed(() => this.commands.shortcutOf(this.command()), /* @ts-ignore */
|
|
15078
15088
|
...(ngDevMode ? [{ debugName: "shortcut" }] : /* istanbul ignore next */ []));
|
|
15079
15089
|
open() {
|
|
15080
|
-
this.commands.execute(
|
|
15090
|
+
this.commands.execute(this.commandId());
|
|
15081
15091
|
}
|
|
15092
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: SearchEntry, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15093
|
+
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" }] });
|
|
15094
|
+
}
|
|
15095
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: SearchEntry, decorators: [{
|
|
15096
|
+
type: Component,
|
|
15097
|
+
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" }]
|
|
15098
|
+
}], propDecorators: { commandId: [{ type: i0.Input, args: [{ isSignal: true, alias: "commandId", required: true }] }], testId: [{ type: i0.Input, args: [{ isSignal: true, alias: "testId", required: true }] }] } });
|
|
15099
|
+
|
|
15100
|
+
class CommandPaletteEntry {
|
|
15101
|
+
commandId = PALETTE_COMMAND_ID;
|
|
15082
15102
|
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: "
|
|
15103
|
+
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
15104
|
}
|
|
15085
15105
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: CommandPaletteEntry, decorators: [{
|
|
15086
15106
|
type: Component,
|
|
15087
|
-
args: [{
|
|
15107
|
+
args: [{
|
|
15108
|
+
selector: 'lw-command-palette-entry',
|
|
15109
|
+
imports: [SearchEntry],
|
|
15110
|
+
template: '<lw-search-entry [commandId]="commandId" testId="command-palette-entry" />',
|
|
15111
|
+
}]
|
|
15088
15112
|
}] });
|
|
15089
15113
|
|
|
15090
15114
|
/**
|
|
@@ -15093,6 +15117,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
15093
15117
|
* without a distribution component. Opt-in: omit it for a palette that opens only by shortcut. Uses the
|
|
15094
15118
|
* `shell.commandPaletteEntry` bar-item id, so `provideShell({ omit: ['shell.commandPaletteEntry'] })`
|
|
15095
15119
|
* removes it.
|
|
15120
|
+
*
|
|
15121
|
+
* The badge never outlives what it opens: omitting `shell.commandPalette`, or a session that may not
|
|
15122
|
+
* run it, takes the badge with it rather than leaving a control that does nothing. Switching
|
|
15123
|
+
* shortcuts off is the exception — the badge stays and still opens the palette, it simply names no
|
|
15124
|
+
* chord. Independent of {@link provideQuickOpenEntry}, which places the entry to the search over
|
|
15125
|
+
* open work.
|
|
15096
15126
|
*/
|
|
15097
15127
|
function provideCommandPaletteEntry(options = {}) {
|
|
15098
15128
|
return makeEnvironmentProviders(provideBarItems({
|
|
@@ -15104,6 +15134,43 @@ function provideCommandPaletteEntry(options = {}) {
|
|
|
15104
15134
|
}));
|
|
15105
15135
|
}
|
|
15106
15136
|
|
|
15137
|
+
class QuickOpenEntry {
|
|
15138
|
+
commandId = QUICK_OPEN_COMMAND_ID;
|
|
15139
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: QuickOpenEntry, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15140
|
+
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"] }] });
|
|
15141
|
+
}
|
|
15142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: QuickOpenEntry, decorators: [{
|
|
15143
|
+
type: Component,
|
|
15144
|
+
args: [{
|
|
15145
|
+
selector: 'lw-quick-open-entry',
|
|
15146
|
+
imports: [SearchEntry],
|
|
15147
|
+
template: '<lw-search-entry [commandId]="commandId" testId="quick-open-entry" />',
|
|
15148
|
+
}]
|
|
15149
|
+
}] });
|
|
15150
|
+
|
|
15151
|
+
/**
|
|
15152
|
+
* Places a built quick-open entry in a Bar — a badge-styled affordance (icon + the OS-correct
|
|
15153
|
+
* shortcut) that opens `shell.quickOpen`, the search over open work. Opt-in: omit it for a search
|
|
15154
|
+
* that opens only by shortcut. Uses the `shell.quickOpenEntry` bar-item id, so
|
|
15155
|
+
* `provideShell({ omit: ['shell.quickOpenEntry'] })` removes it.
|
|
15156
|
+
*
|
|
15157
|
+
* The badge never outlives what it opens: omitting `shell.quickOpen`, or a session that may not run
|
|
15158
|
+
* it, takes the badge with it rather than leaving a control that does nothing. A pop-out window is
|
|
15159
|
+
* the same case — it offers no search over open work, so the badge is absent there. Switching
|
|
15160
|
+
* shortcuts off is the exception: the badge stays and still opens the search, it simply names no
|
|
15161
|
+
* chord. Independent of {@link provideCommandPaletteEntry}, so a product may place either, both or
|
|
15162
|
+
* neither.
|
|
15163
|
+
*/
|
|
15164
|
+
function provideQuickOpenEntry(options = {}) {
|
|
15165
|
+
return makeEnvironmentProviders(provideBarItems({
|
|
15166
|
+
id: 'shell.quickOpenEntry',
|
|
15167
|
+
bar: options.bar ?? 'status-bar',
|
|
15168
|
+
slot: options.slot ?? 'start',
|
|
15169
|
+
order: options.order ?? 5,
|
|
15170
|
+
component: QuickOpenEntry,
|
|
15171
|
+
}));
|
|
15172
|
+
}
|
|
15173
|
+
|
|
15107
15174
|
class SurfaceRevealService {
|
|
15108
15175
|
paneTree = inject(PaneTreeService);
|
|
15109
15176
|
tabs = inject(ContentTabsService);
|
|
@@ -17012,5 +17079,5 @@ function provideIcons(icons) {
|
|
|
17012
17079
|
* Generated bundle index. Do not edit.
|
|
17013
17080
|
*/
|
|
17014
17081
|
|
|
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 };
|
|
17082
|
+
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
17083
|
//# sourceMappingURL=loomweaver-shell.mjs.map
|