@flxgde/gigamenu 0.6.0 → 0.8.0
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.
- package/README.md +110 -10
- package/fesm2022/flxgde-gigamenu.mjs +144 -68
- package/fesm2022/flxgde-gigamenu.mjs.map +1 -1
- package/package.json +5 -4
- package/styles.css +2 -2
- package/types/flxgde-gigamenu.d.ts +67 -16
|
@@ -1,15 +1,30 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal, computed, Injectable,
|
|
2
|
+
import { inject, Injector, signal, computed, Injectable, TemplateRef, Directive, PLATFORM_ID, Inject, viewChild, contentChild, DestroyRef, effect, untracked, HostListener, Component } from '@angular/core';
|
|
3
|
+
import { Router } from '@angular/router';
|
|
3
4
|
import { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';
|
|
4
5
|
|
|
5
|
-
/** Colors for parameter highlighting */
|
|
6
|
+
/** Colors for parameter highlighting (themeable via --gm-param-1 ... --gm-param-5) */
|
|
6
7
|
const PARAM_COLORS = [
|
|
7
|
-
'text-
|
|
8
|
-
'text-
|
|
9
|
-
'text-
|
|
10
|
-
'text-
|
|
11
|
-
'text-
|
|
8
|
+
'text-(color:--_gm-param-1)',
|
|
9
|
+
'text-(color:--_gm-param-2)',
|
|
10
|
+
'text-(color:--_gm-param-3)',
|
|
11
|
+
'text-(color:--_gm-param-4)',
|
|
12
|
+
'text-(color:--_gm-param-5)',
|
|
12
13
|
];
|
|
14
|
+
const DEFAULT_LABELS = {
|
|
15
|
+
pageBadge: 'P',
|
|
16
|
+
commandBadge: 'C',
|
|
17
|
+
pageTag: 'page',
|
|
18
|
+
commandTag: 'command',
|
|
19
|
+
paramHint: 'Tab',
|
|
20
|
+
footerBrand: 'gigamenu',
|
|
21
|
+
noResults: 'No results found',
|
|
22
|
+
navigate: 'navigate',
|
|
23
|
+
params: 'params',
|
|
24
|
+
next: 'next',
|
|
25
|
+
select: 'select',
|
|
26
|
+
execute: 'execute',
|
|
27
|
+
};
|
|
13
28
|
const DEFAULT_CONFIG = {
|
|
14
29
|
placeholder: 'Search pages and commands...',
|
|
15
30
|
maxResults: 10,
|
|
@@ -18,6 +33,9 @@ const DEFAULT_CONFIG = {
|
|
|
18
33
|
darkModeClass: 'dark',
|
|
19
34
|
autocompleteTabBehavior: 'cycle',
|
|
20
35
|
autocompleteDismiss: 'on-type',
|
|
36
|
+
frecency: true,
|
|
37
|
+
showFooter: true,
|
|
38
|
+
showCategoryTags: true,
|
|
21
39
|
};
|
|
22
40
|
/**
|
|
23
41
|
* Helper function to define a command with type safety.
|
|
@@ -32,26 +50,30 @@ const DEFAULT_PROVIDER_OPTIONS = {
|
|
|
32
50
|
group: '',
|
|
33
51
|
};
|
|
34
52
|
class GigamenuService {
|
|
53
|
+
injector = inject(Injector);
|
|
35
54
|
_router;
|
|
36
|
-
_items = signal(new Map(),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
55
|
+
_items = signal(new Map(), /* @ts-ignore */
|
|
56
|
+
...(ngDevMode ? [{ debugName: "_items" }] : /* istanbul ignore next */ []));
|
|
57
|
+
_providers = signal(new Map(), /* @ts-ignore */
|
|
58
|
+
...(ngDevMode ? [{ debugName: "_providers" }] : /* istanbul ignore next */ []));
|
|
59
|
+
_isOpen = signal(false, /* @ts-ignore */
|
|
60
|
+
...(ngDevMode ? [{ debugName: "_isOpen" }] : /* istanbul ignore next */ []));
|
|
61
|
+
_config = signal(DEFAULT_CONFIG, /* @ts-ignore */
|
|
62
|
+
...(ngDevMode ? [{ debugName: "_config" }] : /* istanbul ignore next */ []));
|
|
63
|
+
items = computed(() => Array.from(this._items().values()), /* @ts-ignore */
|
|
64
|
+
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
41
65
|
providers = this._providers.asReadonly();
|
|
42
66
|
isOpen = this._isOpen.asReadonly();
|
|
43
67
|
config = this._config.asReadonly();
|
|
44
68
|
/**
|
|
45
|
-
*
|
|
69
|
+
* Optionally set the router instance. By default the router is injected lazily
|
|
70
|
+
* on first use, so calling this is only needed to use a different instance.
|
|
46
71
|
*/
|
|
47
72
|
setRouter(router) {
|
|
48
73
|
this._router = router;
|
|
49
74
|
}
|
|
50
75
|
get router() {
|
|
51
|
-
|
|
52
|
-
throw new Error('GigamenuService: Router not set. Call setRouter() in your app initialization.');
|
|
53
|
-
}
|
|
54
|
-
return this._router;
|
|
76
|
+
return (this._router ??= this.injector.get(Router));
|
|
55
77
|
}
|
|
56
78
|
configure(config) {
|
|
57
79
|
this._config.update((current) => ({ ...current, ...config }));
|
|
@@ -134,16 +156,17 @@ class GigamenuService {
|
|
|
134
156
|
// Replace each parameter with corresponding arg value
|
|
135
157
|
paramsToReplace.forEach((param, index) => {
|
|
136
158
|
if (argValues[index]) {
|
|
137
|
-
path = path.replace(`:${param}`, argValues[index]);
|
|
159
|
+
path = path.replace(`:${param}`, encodeURIComponent(argValues[index]));
|
|
138
160
|
}
|
|
139
161
|
});
|
|
140
162
|
}
|
|
141
|
-
|
|
163
|
+
// Parse as a full URL so `#fragment` and `?query` parts are supported
|
|
164
|
+
this.router.navigateByUrl(this.router.parseUrl(path));
|
|
142
165
|
},
|
|
143
166
|
});
|
|
144
167
|
}
|
|
145
168
|
extractParamNames(path) {
|
|
146
|
-
const paramRegex = /:([
|
|
169
|
+
const paramRegex = /:([^/?#]+)/g;
|
|
147
170
|
const params = [];
|
|
148
171
|
let match;
|
|
149
172
|
while ((match = paramRegex.exec(path)) !== null) {
|
|
@@ -210,10 +233,10 @@ class GigamenuService {
|
|
|
210
233
|
.replace(/[-_]/g, ' ')
|
|
211
234
|
.replace(/\b\w/g, (c) => c.toUpperCase());
|
|
212
235
|
}
|
|
213
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
214
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
236
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: GigamenuService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
237
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: GigamenuService, providedIn: 'root' });
|
|
215
238
|
}
|
|
216
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
239
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: GigamenuService, decorators: [{
|
|
217
240
|
type: Injectable,
|
|
218
241
|
args: [{ providedIn: 'root' }]
|
|
219
242
|
}] });
|
|
@@ -234,10 +257,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
234
257
|
*/
|
|
235
258
|
class GigamenuItemTemplate {
|
|
236
259
|
template = inject(TemplateRef);
|
|
237
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
238
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
260
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: GigamenuItemTemplate, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
261
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.5", type: GigamenuItemTemplate, isStandalone: true, selector: "[gmItem]", ngImport: i0 });
|
|
239
262
|
}
|
|
240
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
263
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: GigamenuItemTemplate, decorators: [{
|
|
241
264
|
type: Directive,
|
|
242
265
|
args: [{
|
|
243
266
|
selector: '[gmItem]',
|
|
@@ -258,10 +281,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
258
281
|
*/
|
|
259
282
|
class GigamenuEmptyTemplate {
|
|
260
283
|
template = inject(TemplateRef);
|
|
261
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
262
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
284
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: GigamenuEmptyTemplate, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
285
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.5", type: GigamenuEmptyTemplate, isStandalone: true, selector: "[gmEmpty]", ngImport: i0 });
|
|
263
286
|
}
|
|
264
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: GigamenuEmptyTemplate, decorators: [{
|
|
265
288
|
type: Directive,
|
|
266
289
|
args: [{
|
|
267
290
|
selector: '[gmEmpty]',
|
|
@@ -282,10 +305,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
282
305
|
*/
|
|
283
306
|
class GigamenuHeaderTemplate {
|
|
284
307
|
template = inject(TemplateRef);
|
|
285
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
286
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
308
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: GigamenuHeaderTemplate, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
309
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.5", type: GigamenuHeaderTemplate, isStandalone: true, selector: "[gmHeader]", ngImport: i0 });
|
|
287
310
|
}
|
|
288
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
311
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: GigamenuHeaderTemplate, decorators: [{
|
|
289
312
|
type: Directive,
|
|
290
313
|
args: [{
|
|
291
314
|
selector: '[gmHeader]',
|
|
@@ -306,10 +329,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
306
329
|
*/
|
|
307
330
|
class GigamenuFooterTemplate {
|
|
308
331
|
template = inject(TemplateRef);
|
|
309
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
310
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
332
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: GigamenuFooterTemplate, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
333
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.5", type: GigamenuFooterTemplate, isStandalone: true, selector: "[gmFooter]", ngImport: i0 });
|
|
311
334
|
}
|
|
312
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
335
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: GigamenuFooterTemplate, decorators: [{
|
|
313
336
|
type: Directive,
|
|
314
337
|
args: [{
|
|
315
338
|
selector: '[gmFooter]',
|
|
@@ -318,10 +341,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
318
341
|
}] });
|
|
319
342
|
class GigamenuPanelTemplate {
|
|
320
343
|
template = inject(TemplateRef);
|
|
321
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
322
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
344
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: GigamenuPanelTemplate, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
345
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.5", type: GigamenuPanelTemplate, isStandalone: true, selector: "[gmPanel]", ngImport: i0 });
|
|
323
346
|
}
|
|
324
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
347
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: GigamenuPanelTemplate, decorators: [{
|
|
325
348
|
type: Directive,
|
|
326
349
|
args: [{
|
|
327
350
|
selector: '[gmPanel]',
|
|
@@ -965,6 +988,7 @@ const DECAY_FACTOR = 0.9;
|
|
|
965
988
|
class FrecencyService {
|
|
966
989
|
data = {};
|
|
967
990
|
isBrowser;
|
|
991
|
+
gigamenu = inject(GigamenuService);
|
|
968
992
|
constructor(platformId) {
|
|
969
993
|
this.isBrowser = isPlatformBrowser(platformId);
|
|
970
994
|
this.load();
|
|
@@ -973,6 +997,8 @@ class FrecencyService {
|
|
|
973
997
|
* Record that an item was selected for a given search term.
|
|
974
998
|
*/
|
|
975
999
|
recordSelection(searchTerm, itemId) {
|
|
1000
|
+
if (!this.enabled)
|
|
1001
|
+
return;
|
|
976
1002
|
// Always record to global for overall frecency
|
|
977
1003
|
this.recordToKey(GLOBAL_KEY, itemId);
|
|
978
1004
|
// Also record to specific search term if provided
|
|
@@ -1010,6 +1036,8 @@ class FrecencyService {
|
|
|
1010
1036
|
*/
|
|
1011
1037
|
getScores(searchTerm) {
|
|
1012
1038
|
const scores = new Map();
|
|
1039
|
+
if (!this.enabled)
|
|
1040
|
+
return scores;
|
|
1013
1041
|
const normalizedTerm = this.normalizeTerm(searchTerm);
|
|
1014
1042
|
// If no search term, return global scores
|
|
1015
1043
|
if (!normalizedTerm) {
|
|
@@ -1047,6 +1075,8 @@ class FrecencyService {
|
|
|
1047
1075
|
* Returns itemId if there's a strong match, null otherwise.
|
|
1048
1076
|
*/
|
|
1049
1077
|
getTopMatch(searchTerm) {
|
|
1078
|
+
if (!this.enabled)
|
|
1079
|
+
return null;
|
|
1050
1080
|
const normalizedTerm = this.normalizeTerm(searchTerm);
|
|
1051
1081
|
if (!normalizedTerm)
|
|
1052
1082
|
return null;
|
|
@@ -1061,6 +1091,10 @@ class FrecencyService {
|
|
|
1061
1091
|
}
|
|
1062
1092
|
return null;
|
|
1063
1093
|
}
|
|
1094
|
+
/** Disabled via `frecency: false` in the config (reactive, reads a signal). */
|
|
1095
|
+
get enabled() {
|
|
1096
|
+
return this.gigamenu.config().frecency !== false;
|
|
1097
|
+
}
|
|
1064
1098
|
calculateScore(entry) {
|
|
1065
1099
|
const ageInHours = (Date.now() - entry.lastUsed) / (60 * 60 * 24);
|
|
1066
1100
|
const recencyScore = Math.pow(DECAY_FACTOR, ageInHours);
|
|
@@ -1107,10 +1141,10 @@ class FrecencyService {
|
|
|
1107
1141
|
// Storage full or unavailable
|
|
1108
1142
|
}
|
|
1109
1143
|
}
|
|
1110
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1111
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1144
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: FrecencyService, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1145
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: FrecencyService, providedIn: 'root' });
|
|
1112
1146
|
}
|
|
1113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1147
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: FrecencyService, decorators: [{
|
|
1114
1148
|
type: Injectable,
|
|
1115
1149
|
args: [{ providedIn: 'root' }]
|
|
1116
1150
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
@@ -1121,40 +1155,64 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1121
1155
|
class GigamenuComponent {
|
|
1122
1156
|
service;
|
|
1123
1157
|
frecency;
|
|
1124
|
-
searchInput = viewChild('searchInput',
|
|
1125
|
-
|
|
1158
|
+
searchInput = viewChild('searchInput', /* @ts-ignore */
|
|
1159
|
+
...(ngDevMode ? [{ debugName: "searchInput" }] : /* istanbul ignore next */ []));
|
|
1160
|
+
listContainer = viewChild('listContainer', /* @ts-ignore */
|
|
1161
|
+
...(ngDevMode ? [{ debugName: "listContainer" }] : /* istanbul ignore next */ []));
|
|
1126
1162
|
isBrowser;
|
|
1127
1163
|
// Template queries
|
|
1128
|
-
itemTemplate = contentChild(GigamenuItemTemplate,
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1164
|
+
itemTemplate = contentChild(GigamenuItemTemplate, /* @ts-ignore */
|
|
1165
|
+
...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
|
|
1166
|
+
emptyTemplate = contentChild(GigamenuEmptyTemplate, /* @ts-ignore */
|
|
1167
|
+
...(ngDevMode ? [{ debugName: "emptyTemplate" }] : /* istanbul ignore next */ []));
|
|
1168
|
+
headerTemplate = contentChild(GigamenuHeaderTemplate, /* @ts-ignore */
|
|
1169
|
+
...(ngDevMode ? [{ debugName: "headerTemplate" }] : /* istanbul ignore next */ []));
|
|
1170
|
+
footerTemplate = contentChild(GigamenuFooterTemplate, /* @ts-ignore */
|
|
1171
|
+
...(ngDevMode ? [{ debugName: "footerTemplate" }] : /* istanbul ignore next */ []));
|
|
1172
|
+
panelTemplate = contentChild(GigamenuPanelTemplate, /* @ts-ignore */
|
|
1173
|
+
...(ngDevMode ? [{ debugName: "panelTemplate" }] : /* istanbul ignore next */ []));
|
|
1174
|
+
// Dark mode: mirrors the configured dark mode class on <html>
|
|
1175
|
+
dark = signal(false, /* @ts-ignore */
|
|
1176
|
+
...(ngDevMode ? [{ debugName: "dark" }] : /* istanbul ignore next */ []));
|
|
1177
|
+
labels = computed(() => ({
|
|
1178
|
+
...DEFAULT_LABELS,
|
|
1179
|
+
...this.service.config().labels,
|
|
1180
|
+
}), /* @ts-ignore */
|
|
1181
|
+
...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
|
|
1133
1182
|
// Core state signals
|
|
1134
|
-
query = signal('',
|
|
1135
|
-
|
|
1183
|
+
query = signal('', /* @ts-ignore */
|
|
1184
|
+
...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
|
|
1185
|
+
selectedIndex = signal(0, /* @ts-ignore */
|
|
1186
|
+
...(ngDevMode ? [{ debugName: "selectedIndex" }] : /* istanbul ignore next */ []));
|
|
1136
1187
|
// Step-by-step input state
|
|
1137
|
-
lockedAction = signal(null,
|
|
1138
|
-
|
|
1188
|
+
lockedAction = signal(null, /* @ts-ignore */
|
|
1189
|
+
...(ngDevMode ? [{ debugName: "lockedAction" }] : /* istanbul ignore next */ []));
|
|
1190
|
+
paramValues = signal([], /* @ts-ignore */
|
|
1191
|
+
...(ngDevMode ? [{ debugName: "paramValues" }] : /* istanbul ignore next */ []));
|
|
1139
1192
|
// Autocomplete state signals
|
|
1140
|
-
autocompleteSuggestions = signal([],
|
|
1193
|
+
autocompleteSuggestions = signal([], /* @ts-ignore */
|
|
1194
|
+
...(ngDevMode ? [{ debugName: "autocompleteSuggestions" }] : /* istanbul ignore next */ []));
|
|
1141
1195
|
autocompleteCache = new Map();
|
|
1142
|
-
selectedParamOptions = signal(new Map(),
|
|
1196
|
+
selectedParamOptions = signal(new Map(), /* @ts-ignore */
|
|
1197
|
+
...(ngDevMode ? [{ debugName: "selectedParamOptions" }] : /* istanbul ignore next */ []));
|
|
1143
1198
|
// Dynamic provider state
|
|
1144
|
-
providerResults = signal(new Map(),
|
|
1199
|
+
providerResults = signal(new Map(), /* @ts-ignore */
|
|
1200
|
+
...(ngDevMode ? [{ debugName: "providerResults" }] : /* istanbul ignore next */ []));
|
|
1145
1201
|
providerTimers = new Map();
|
|
1146
1202
|
providerInvocation = 0;
|
|
1147
1203
|
// Query parsing (simplified - only used for filtering)
|
|
1148
1204
|
queryParser = computed(() => {
|
|
1149
1205
|
const separator = this.service.config().argSeparator ?? ' ';
|
|
1150
1206
|
return new QueryParser(separator);
|
|
1151
|
-
},
|
|
1207
|
+
}, /* @ts-ignore */
|
|
1208
|
+
...(ngDevMode ? [{ debugName: "queryParser" }] : /* istanbul ignore next */ []));
|
|
1152
1209
|
// Selected item from display list
|
|
1153
1210
|
selectedItem = computed(() => {
|
|
1154
1211
|
const items = this.displayItems();
|
|
1155
1212
|
const index = this.selectedIndex();
|
|
1156
1213
|
return items[index] ?? null;
|
|
1157
|
-
},
|
|
1214
|
+
}, /* @ts-ignore */
|
|
1215
|
+
...(ngDevMode ? [{ debugName: "selectedItem" }] : /* istanbul ignore next */ []));
|
|
1158
1216
|
currentParamIndex = computed(() => {
|
|
1159
1217
|
const action = this.lockedAction();
|
|
1160
1218
|
if (!action || !action.params)
|
|
@@ -1163,27 +1221,31 @@ class GigamenuComponent {
|
|
|
1163
1221
|
if (filled >= action.params.length)
|
|
1164
1222
|
return null;
|
|
1165
1223
|
return filled;
|
|
1166
|
-
},
|
|
1224
|
+
}, /* @ts-ignore */
|
|
1225
|
+
...(ngDevMode ? [{ debugName: "currentParamIndex" }] : /* istanbul ignore next */ []));
|
|
1167
1226
|
currentParamName = computed(() => {
|
|
1168
1227
|
const action = this.lockedAction();
|
|
1169
1228
|
const idx = this.currentParamIndex();
|
|
1170
1229
|
if (!action || idx === null || !action.params)
|
|
1171
1230
|
return null;
|
|
1172
1231
|
return action.params[idx] ?? null;
|
|
1173
|
-
},
|
|
1232
|
+
}, /* @ts-ignore */
|
|
1233
|
+
...(ngDevMode ? [{ debugName: "currentParamName" }] : /* istanbul ignore next */ []));
|
|
1174
1234
|
hasAutocomplete = computed(() => {
|
|
1175
1235
|
const action = this.lockedAction();
|
|
1176
1236
|
const paramName = this.currentParamName();
|
|
1177
1237
|
if (!action || !paramName)
|
|
1178
1238
|
return false;
|
|
1179
1239
|
return computeHasAutocomplete(action, paramName);
|
|
1180
|
-
},
|
|
1240
|
+
}, /* @ts-ignore */
|
|
1241
|
+
...(ngDevMode ? [{ debugName: "hasAutocomplete" }] : /* istanbul ignore next */ []));
|
|
1181
1242
|
currentState = computed(() => {
|
|
1182
1243
|
return computeInputState({
|
|
1183
1244
|
isOpen: this.service.isOpen(),
|
|
1184
1245
|
hasLockedAction: this.lockedAction() !== null,
|
|
1185
1246
|
});
|
|
1186
|
-
},
|
|
1247
|
+
}, /* @ts-ignore */
|
|
1248
|
+
...(ngDevMode ? [{ debugName: "currentState" }] : /* istanbul ignore next */ []));
|
|
1187
1249
|
filteredItems = computed(() => {
|
|
1188
1250
|
const searchTerm = this.query().toLowerCase().trim();
|
|
1189
1251
|
const items = this.service.items();
|
|
@@ -1195,7 +1257,8 @@ class GigamenuComponent {
|
|
|
1195
1257
|
const matched = filterItems(items, searchTerm, this.queryParser());
|
|
1196
1258
|
const scores = this.frecency.getScores(searchTerm);
|
|
1197
1259
|
return sortByFrecency(matched, scores).slice(0, maxResults);
|
|
1198
|
-
},
|
|
1260
|
+
}, /* @ts-ignore */
|
|
1261
|
+
...(ngDevMode ? [{ debugName: "filteredItems" }] : /* istanbul ignore next */ []));
|
|
1199
1262
|
// Display items: actions in ActionSelection, suggestions in ParameterInput
|
|
1200
1263
|
displayItems = computed(() => {
|
|
1201
1264
|
const state = this.currentState();
|
|
@@ -1216,13 +1279,26 @@ class GigamenuComponent {
|
|
|
1216
1279
|
dynamic.push(...items);
|
|
1217
1280
|
}
|
|
1218
1281
|
return [...staticItems, ...dynamic];
|
|
1219
|
-
},
|
|
1282
|
+
}, /* @ts-ignore */
|
|
1283
|
+
...(ngDevMode ? [{ debugName: "displayItems" }] : /* istanbul ignore next */ []));
|
|
1220
1284
|
// Template helper
|
|
1221
1285
|
getParamColor = getParamColor;
|
|
1222
1286
|
constructor(service, frecency, platformId) {
|
|
1223
1287
|
this.service = service;
|
|
1224
1288
|
this.frecency = frecency;
|
|
1225
1289
|
this.isBrowser = isPlatformBrowser(platformId);
|
|
1290
|
+
// Track the dark mode class on <html> (class name is configurable)
|
|
1291
|
+
if (this.isBrowser) {
|
|
1292
|
+
const root = document.documentElement;
|
|
1293
|
+
const sync = () => this.dark.set(root.classList.contains(this.service.config().darkModeClass ?? 'dark'));
|
|
1294
|
+
const observer = new MutationObserver(sync);
|
|
1295
|
+
observer.observe(root, { attributes: true, attributeFilter: ['class'] });
|
|
1296
|
+
inject(DestroyRef).onDestroy(() => observer.disconnect());
|
|
1297
|
+
effect(() => {
|
|
1298
|
+
this.service.config();
|
|
1299
|
+
untracked(sync);
|
|
1300
|
+
});
|
|
1301
|
+
}
|
|
1226
1302
|
// Focus effect
|
|
1227
1303
|
effect(() => {
|
|
1228
1304
|
if (this.service.isOpen() && this.isBrowser) {
|
|
@@ -1651,12 +1727,12 @@ class GigamenuComponent {
|
|
|
1651
1727
|
this.selectedIndex.set(0);
|
|
1652
1728
|
}
|
|
1653
1729
|
}
|
|
1654
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1655
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: GigamenuComponent, isStandalone: true, selector: "gm-gigamenu", host: { listeners: { "document:keydown": "onGlobalKeydown($event)" } }, queries: [{ propertyName: "itemTemplate", first: true, predicate: GigamenuItemTemplate, descendants: true, isSignal: true }, { propertyName: "emptyTemplate", first: true, predicate: GigamenuEmptyTemplate, descendants: true, isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: GigamenuHeaderTemplate, descendants: true, isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: GigamenuFooterTemplate, descendants: true, isSignal: true }, { propertyName: "panelTemplate", first: true, predicate: GigamenuPanelTemplate, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }, { propertyName: "listContainer", first: true, predicate: ["listContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (service.isOpen()) {\n<div\n class=\"fixed inset-0 z-50 flex items-stretch justify-center sm:items-start sm:pt-[15vh]\"\n (click)=\"onBackdropClick($event)\"\n>\n <div class=\"fixed inset-0 bg-black/50 backdrop-blur-sm\"></div>\n\n <!-- Custom panel template -->\n @if (panelTemplate(); as pt) {\n <ng-container\n [ngTemplateOutlet]=\"pt.template\"\n [ngTemplateOutletContext]=\"getPanelContext()\"\n ></ng-container>\n } @else {\n <!-- Default panel -->\n <div\n class=\"relative z-10 w-full flex flex-col overflow-hidden border border-neutral-200 bg-white shadow-2xl dark:border-neutral-700 dark:bg-neutral-900 sm:max-w-xl sm:min-h-50 sm:flex-none sm:rounded-xl\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Command menu\"\n >\n <!-- Header -->\n @if (headerTemplate(); as ht) {\n <ng-container\n [ngTemplateOutlet]=\"ht.template\"\n [ngTemplateOutletContext]=\"getHeaderContext()\"\n ></ng-container>\n } @else {\n <div class=\"border-b border-neutral-200 dark:border-neutral-700\">\n <!-- Breadcrumb (when action is locked) -->\n @if (lockedAction(); as action) {\n <div class=\"flex flex-wrap items-center gap-1 px-4 py-2 text-sm\">\n <button\n type=\"button\"\n (click)=\"unlockActionFromUI()\"\n class=\"inline-flex items-center gap-1.5 rounded-md bg-blue-100 px-2 py-1 font-medium text-blue-800 hover:bg-blue-200 dark:bg-blue-900/40 dark:text-blue-300 dark:hover:bg-blue-900/60\"\n >\n @if (action.icon) {\n <span>{{ action.icon }}</span>\n }\n {{ action.label }}\n </button>\n @for (value of paramValues(); track $index) {\n <span class=\"text-neutral-400\">\u203A</span>\n <button\n type=\"button\"\n (click)=\"goToParam($index)\"\n [class]=\"'rounded-md px-2 py-1 font-medium hover:opacity-80 ' + getParamColor($index)\"\n >\n <span class=\"text-xs opacity-60\">{{ action.params?.[$index] }}:</span>\n {{ value }}\n </button>\n }\n @if (currentParamName(); as paramName) {\n <span class=\"text-neutral-400\">\u203A</span>\n <span class=\"text-neutral-500 dark:text-neutral-400 italic\">{{ paramName }}:</span>\n }\n </div>\n }\n\n <!-- Search input row -->\n <div class=\"flex items-center px-4\">\n <svg\n class=\"h-5 w-5 text-neutral-400\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z\"\n />\n </svg>\n <input\n #searchInput\n type=\"text\"\n [placeholder]=\"lockedAction() ? (currentParamName() ?? 'Enter value...') : service.config().placeholder\"\n [value]=\"query()\"\n (input)=\"onQueryChange($event)\"\n (keydown)=\"onInputKeydown($event)\"\n class=\"w-full px-3 py-4 text-base text-neutral-900 placeholder-neutral-400 outline-none dark:text-neutral-100 bg-transparent\"\n />\n <kbd\n class=\"rounded border border-neutral-200 bg-neutral-100 px-1.5 py-0.5 text-xs text-neutral-500 dark:border-neutral-600 dark:bg-neutral-800 dark:text-neutral-400\"\n >\n ESC\n </kbd>\n </div>\n </div>\n }\n\n <!-- Items list -->\n <div #listContainer class=\"flex-1 overflow-y-auto p-2 sm:flex-none sm:max-h-80\">\n @if (displayItems().length === 0) {\n <!-- Empty state -->\n @if (emptyTemplate(); as et) {\n <ng-container\n [ngTemplateOutlet]=\"et.template\"\n [ngTemplateOutletContext]=\"getEmptyContext()\"\n ></ng-container>\n } @else {\n <div class=\"px-3 py-8 text-center text-neutral-500\">\n @if (lockedAction()) {\n @if (hasAutocomplete()) {\n Type to search...\n } @else {\n Enter a value and press Tab or Enter\n }\n } @else {\n No results found\n }\n </div>\n }\n } @else {\n @for (item of displayItems(); track item.id; let i = $index) {\n <!-- Custom item template -->\n @if (itemTemplate(); as it) {\n <ng-container\n [ngTemplateOutlet]=\"it.template\"\n [ngTemplateOutletContext]=\"getItemContext(item, i)\"\n ></ng-container>\n } @else {\n <!-- Default item -->\n <button\n type=\"button\"\n (click)=\"onItemClick(item, i)\"\n (mouseenter)=\"selectedIndex.set(i)\"\n [attr.data-index]=\"i\"\n [class]=\"\n 'flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-left transition-colors ' +\n (selectedIndex() === i\n ? 'bg-neutral-100 dark:bg-neutral-800'\n : 'hover:bg-neutral-50 dark:hover:bg-neutral-800/50')\n \"\n >\n @if (!lockedAction()) {\n <!-- Action mode: show icon -->\n @if (item.iconClass) {\n <i [class]=\"item.iconClass + ' text-lg text-neutral-600 dark:text-neutral-300'\"></i>\n } @else if (item.icon) {\n <span class=\"text-lg\">{{ item.icon }}</span>\n } @else {\n <span\n class=\"flex h-6 w-6 items-center justify-center rounded bg-neutral-200 text-xs font-medium text-neutral-600 dark:bg-neutral-700 dark:text-neutral-300\"\n >\n {{ item.category === 'page' ? 'P' : 'C' }}\n </span>\n }\n }\n <div class=\"flex-1 min-w-0\">\n <div class=\"truncate font-medium text-neutral-900 dark:text-neutral-100\">\n {{ item.label }}@if (!lockedAction() && item.params) { @for (param of item.params; track $index) {<span class=\"whitespace-pre\"> </span><span [class]=\"getParamColor($index)\"><{{ param }}></span>}@if (item.paramProviders) {<span class=\"ml-2 inline-flex items-center rounded border border-neutral-300 bg-neutral-100 px-1 py-0.5 text-[10px] font-normal text-neutral-500 dark:border-neutral-600 dark:bg-neutral-700 dark:text-neutral-400\">Tab</span>}}\n </div>\n @if (item.description) {\n <div class=\"truncate text-sm text-neutral-500 dark:text-neutral-400\">\n {{ item.description }}\n </div>\n }\n </div>\n @if (!lockedAction()) {\n <span\n class=\"rounded-full px-2 py-0.5 text-xs\"\n [class]=\"\n item.category === 'page'\n ? 'bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400'\n : 'bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400'\n \"\n >\n {{ item.category }}\n </span>\n }\n </button>\n }\n }\n }\n </div>\n\n <!-- Footer -->\n @if (footerTemplate(); as ft) {\n <ng-container\n [ngTemplateOutlet]=\"ft.template\"\n [ngTemplateOutletContext]=\"getFooterContext()\"\n ></ng-container>\n } @else {\n <div\n class=\"flex items-center justify-between border-t border-neutral-200 px-4 py-2 text-xs text-neutral-500 dark:border-neutral-700\"\n >\n <div class=\"flex items-center gap-3\">\n <span class=\"flex items-center gap-1\">\n <kbd class=\"rounded border border-neutral-300 bg-neutral-100 px-1 dark:border-neutral-600 dark:bg-neutral-800\">\u2191</kbd>\n <kbd class=\"rounded border border-neutral-300 bg-neutral-100 px-1 dark:border-neutral-600 dark:bg-neutral-800\">\u2193</kbd>\n navigate\n </span>\n <span class=\"flex items-center gap-1\">\n <kbd class=\"rounded border border-neutral-300 bg-neutral-100 px-1 dark:border-neutral-600 dark:bg-neutral-800\">Tab</kbd>\n @if (lockedAction()) {\n next\n } @else {\n params\n }\n </span>\n <span class=\"flex items-center gap-1\">\n <kbd class=\"rounded border border-neutral-300 bg-neutral-100 px-1 dark:border-neutral-600 dark:bg-neutral-800\">\u21B5</kbd>\n @if (lockedAction()) {\n execute\n } @else {\n select\n }\n </span>\n </div>\n <span>gigamenu</span>\n </div>\n }\n </div>\n }\n</div>\n}\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
1730
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: GigamenuComponent, deps: [{ token: GigamenuService }, { token: FrecencyService }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });
|
|
1731
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: GigamenuComponent, isStandalone: true, selector: "gm-gigamenu", host: { listeners: { "document:keydown": "onGlobalKeydown($event)" }, properties: { "attr.data-gm-dark": "dark() ? \"\" : null" } }, queries: [{ propertyName: "itemTemplate", first: true, predicate: GigamenuItemTemplate, descendants: true, isSignal: true }, { propertyName: "emptyTemplate", first: true, predicate: GigamenuEmptyTemplate, descendants: true, isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: GigamenuHeaderTemplate, descendants: true, isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: GigamenuFooterTemplate, descendants: true, isSignal: true }, { propertyName: "panelTemplate", first: true, predicate: GigamenuPanelTemplate, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }, { propertyName: "listContainer", first: true, predicate: ["listContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (service.isOpen()) {\n<div\n class=\"fixed inset-0 z-50 flex items-stretch justify-center sm:items-start sm:pt-[15vh]\"\n (click)=\"onBackdropClick($event)\"\n>\n <div class=\"fixed inset-0 bg-(--_gm-overlay) backdrop-blur-sm\"></div>\n\n <!-- Custom panel template -->\n @if (panelTemplate(); as pt) {\n <ng-container\n [ngTemplateOutlet]=\"pt.template\"\n [ngTemplateOutletContext]=\"getPanelContext()\"\n ></ng-container>\n } @else {\n <!-- Default panel -->\n <div\n class=\"relative z-10 w-full flex flex-col overflow-hidden border border-(color:--_gm-border) bg-(--_gm-bg) text-(color:--_gm-fg) shadow-2xl sm:max-w-xl sm:min-h-50 sm:flex-none sm:rounded-(--_gm-radius)\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Command menu\"\n >\n <!-- Header -->\n @if (headerTemplate(); as ht) {\n <ng-container\n [ngTemplateOutlet]=\"ht.template\"\n [ngTemplateOutletContext]=\"getHeaderContext()\"\n ></ng-container>\n } @else {\n <div class=\"border-b border-(color:--_gm-border)\">\n <!-- Breadcrumb (when action is locked) -->\n @if (lockedAction(); as action) {\n <div class=\"flex flex-wrap items-center gap-1 px-4 py-2 text-sm\">\n <button\n type=\"button\"\n (click)=\"unlockActionFromUI()\"\n class=\"inline-flex items-center gap-1.5 rounded-md bg-(--_gm-accent-bg) px-2 py-1 font-medium text-(color:--_gm-accent-fg) hover:bg-(--_gm-accent-hover-bg)\"\n >\n @if (action.icon) {\n <span>{{ action.icon }}</span>\n }\n {{ action.label }}\n </button>\n @for (value of paramValues(); track $index) {\n <span class=\"text-(color:--_gm-fg-subtle)\">\u203A</span>\n <button\n type=\"button\"\n (click)=\"goToParam($index)\"\n [class]=\"'rounded-md px-2 py-1 font-medium hover:opacity-80 ' + getParamColor($index)\"\n >\n <span class=\"text-xs opacity-60\">{{ action.params?.[$index] }}:</span>\n {{ value }}\n </button>\n }\n @if (currentParamName(); as paramName) {\n <span class=\"text-(color:--_gm-fg-subtle)\">\u203A</span>\n <span class=\"text-(color:--_gm-fg-muted) italic\">{{ paramName }}:</span>\n }\n </div>\n }\n\n <!-- Search input row -->\n <div class=\"flex items-center px-4\">\n <svg\n class=\"h-5 w-5 text-(color:--_gm-fg-subtle)\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z\"\n />\n </svg>\n <input\n #searchInput\n type=\"text\"\n [placeholder]=\"lockedAction() ? (currentParamName() ?? 'Enter value...') : service.config().placeholder\"\n [value]=\"query()\"\n (input)=\"onQueryChange($event)\"\n (keydown)=\"onInputKeydown($event)\"\n class=\"w-full px-3 py-4 text-base text-(color:--_gm-fg) placeholder-(--_gm-fg-subtle) outline-none bg-transparent\"\n />\n <kbd\n class=\"rounded border border-(color:--_gm-kbd-border) bg-(--_gm-kbd-bg) px-1.5 py-0.5 text-xs text-(color:--_gm-fg-muted)\"\n >\n ESC\n </kbd>\n </div>\n </div>\n }\n\n <!-- Items list -->\n <div #listContainer class=\"flex-1 overflow-y-auto p-2 sm:flex-none sm:max-h-80\">\n @if (displayItems().length === 0) {\n <!-- Empty state -->\n @if (emptyTemplate(); as et) {\n <ng-container\n [ngTemplateOutlet]=\"et.template\"\n [ngTemplateOutletContext]=\"getEmptyContext()\"\n ></ng-container>\n } @else {\n <div class=\"px-3 py-8 text-center text-(color:--_gm-fg-muted)\">\n @if (lockedAction()) {\n @if (hasAutocomplete()) {\n Type to search...\n } @else {\n Enter a value and press Tab or Enter\n }\n } @else {\n {{ labels().noResults }}\n }\n </div>\n }\n } @else {\n @for (item of displayItems(); track item.id; let i = $index) {\n <!-- Custom item template -->\n @if (itemTemplate(); as it) {\n <ng-container\n [ngTemplateOutlet]=\"it.template\"\n [ngTemplateOutletContext]=\"getItemContext(item, i)\"\n ></ng-container>\n } @else {\n <!-- Default item -->\n <button\n type=\"button\"\n (click)=\"onItemClick(item, i)\"\n (mouseenter)=\"selectedIndex.set(i)\"\n [attr.data-index]=\"i\"\n [class]=\"\n 'flex w-full items-center gap-3 rounded-[calc(var(--_gm-radius)-0.25rem)] px-3 py-2.5 text-left transition-colors ' +\n (selectedIndex() === i\n ? 'bg-(--_gm-selected-bg)'\n : 'hover:bg-(--_gm-hover-bg)')\n \"\n >\n @if (!lockedAction()) {\n <!-- Action mode: show icon -->\n @if (item.iconClass) {\n <i [class]=\"item.iconClass + ' text-lg text-(color:--_gm-fg-icon)'\"></i>\n } @else if (item.icon) {\n <span class=\"text-lg\">{{ item.icon }}</span>\n } @else {\n <span\n class=\"flex h-6 w-6 items-center justify-center rounded bg-(--_gm-badge-bg) text-xs font-medium text-(color:--_gm-fg-icon)\"\n >\n {{ item.category === 'page' ? labels().pageBadge : labels().commandBadge }}\n </span>\n }\n }\n <div class=\"flex-1 min-w-0\">\n <div class=\"truncate font-medium text-(color:--_gm-fg)\">\n {{ item.label }}@if (!lockedAction() && item.params) { @for (param of item.params; track $index) {<span class=\"whitespace-pre\"> </span><span [class]=\"getParamColor($index)\"><{{ param }}></span>}@if (item.paramProviders) {<span class=\"ml-2 inline-flex items-center rounded border border-(color:--_gm-kbd-border) bg-(--_gm-kbd-bg) px-1 py-0.5 text-[10px] font-normal text-(color:--_gm-fg-muted)\">{{ labels().paramHint }}</span>}}\n </div>\n @if (item.description) {\n <div class=\"truncate text-sm text-(color:--_gm-fg-muted)\">\n {{ item.description }}\n </div>\n }\n </div>\n @if (!lockedAction() && service.config().showCategoryTags !== false) {\n <span\n class=\"rounded-full px-2 py-0.5 text-xs\"\n [class]=\"\n item.category === 'page'\n ? 'bg-(--_gm-page-bg) text-(color:--_gm-page-fg)'\n : 'bg-(--_gm-command-bg) text-(color:--_gm-command-fg)'\n \"\n >\n {{ item.category === 'page' ? labels().pageTag : labels().commandTag }}\n </span>\n }\n </button>\n }\n }\n }\n </div>\n\n <!-- Footer -->\n @if (footerTemplate(); as ft) {\n <ng-container\n [ngTemplateOutlet]=\"ft.template\"\n [ngTemplateOutletContext]=\"getFooterContext()\"\n ></ng-container>\n } @else if (service.config().showFooter !== false) {\n <div\n class=\"flex items-center justify-between border-t border-(color:--_gm-border) px-4 py-2 text-xs text-(color:--_gm-fg-muted)\"\n >\n <div class=\"flex items-center gap-3\">\n <span class=\"flex items-center gap-1\">\n <kbd class=\"rounded border border-(color:--_gm-kbd-border) bg-(--_gm-kbd-bg) px-1\">\u2191</kbd>\n <kbd class=\"rounded border border-(color:--_gm-kbd-border) bg-(--_gm-kbd-bg) px-1\">\u2193</kbd>\n {{ labels().navigate }}\n </span>\n <span class=\"flex items-center gap-1\">\n <kbd class=\"rounded border border-(color:--_gm-kbd-border) bg-(--_gm-kbd-bg) px-1\">Tab</kbd>\n @if (lockedAction()) {\n {{ labels().next }}\n } @else {\n {{ labels().params }}\n }\n </span>\n <span class=\"flex items-center gap-1\">\n <kbd class=\"rounded border border-(color:--_gm-kbd-border) bg-(--_gm-kbd-bg) px-1\">\u21B5</kbd>\n @if (lockedAction()) {\n {{ labels().execute }}\n } @else {\n {{ labels().select }}\n }\n </span>\n </div>\n <span>{{ labels().footerBrand }}</span>\n </div>\n }\n </div>\n }\n</div>\n}\n", styles: [":host{display:contents;--_gm-bg: var(--gm-bg, oklch(100% 0 0));--_gm-fg: var(--gm-fg, oklch(20.5% 0 0));--_gm-fg-muted: var(--gm-fg-muted, oklch(55.6% 0 0));--_gm-fg-subtle: var(--gm-fg-subtle, oklch(70.8% 0 0));--_gm-fg-icon: var(--gm-fg-icon, oklch(43.9% 0 0));--_gm-border: var(--gm-border, oklch(92.2% 0 0));--_gm-hover-bg: var(--gm-hover-bg, oklch(98.5% 0 0));--_gm-selected-bg: var(--gm-selected-bg, oklch(97% 0 0));--_gm-badge-bg: var(--gm-badge-bg, oklch(92.2% 0 0));--_gm-kbd-bg: var(--gm-kbd-bg, oklch(97% 0 0));--_gm-kbd-border: var(--gm-kbd-border, oklch(87% 0 0));--_gm-accent-bg: var(--gm-accent-bg, oklch(93.2% .032 255.585));--_gm-accent-hover-bg: var(--gm-accent-hover-bg, oklch(88.2% .059 254.128));--_gm-accent-fg: var(--gm-accent-fg, oklch(42.4% .199 265.638));--_gm-page-bg: var(--gm-page-bg, oklch(93.2% .032 255.585));--_gm-page-fg: var(--gm-page-fg, oklch(48.8% .243 264.376));--_gm-command-bg: var(--gm-command-bg, oklch(94.6% .033 307.174));--_gm-command-fg: var(--gm-command-fg, oklch(49.6% .265 301.924));--_gm-param-1: var(--gm-param-1, oklch(62.3% .214 259.815));--_gm-param-2: var(--gm-param-2, oklch(72.3% .219 149.579));--_gm-param-3: var(--gm-param-3, oklch(70.5% .213 47.604));--_gm-param-4: var(--gm-param-4, oklch(65.6% .241 354.308));--_gm-param-5: var(--gm-param-5, oklch(71.5% .143 215.221));--_gm-radius: var(--gm-radius, .75rem);--_gm-overlay: var(--gm-overlay, rgb(0 0 0 / 50%))}:host([data-gm-dark]){--_gm-bg: var(--gm-bg, oklch(20.5% 0 0));--_gm-fg: var(--gm-fg, oklch(97% 0 0));--_gm-fg-muted: var(--gm-fg-muted, oklch(70.8% 0 0));--_gm-fg-icon: var(--gm-fg-icon, oklch(87% 0 0));--_gm-border: var(--gm-border, oklch(37.1% 0 0));--_gm-hover-bg: var(--gm-hover-bg, oklch(26.9% 0 0 / 50%));--_gm-selected-bg: var(--gm-selected-bg, oklch(26.9% 0 0));--_gm-badge-bg: var(--gm-badge-bg, oklch(37.1% 0 0));--_gm-kbd-bg: var(--gm-kbd-bg, oklch(26.9% 0 0));--_gm-kbd-border: var(--gm-kbd-border, oklch(43.9% 0 0));--_gm-accent-bg: var(--gm-accent-bg, oklch(37.9% .146 265.522 / 40%));--_gm-accent-hover-bg: var(--gm-accent-hover-bg, oklch(37.9% .146 265.522 / 60%));--_gm-accent-fg: var(--gm-accent-fg, oklch(80.9% .105 251.813));--_gm-page-bg: var(--gm-page-bg, oklch(37.9% .146 265.522 / 30%));--_gm-page-fg: var(--gm-page-fg, oklch(70.7% .165 254.624));--_gm-command-bg: var(--gm-command-bg, oklch(38.1% .176 304.987 / 30%));--_gm-command-fg: var(--gm-command-fg, oklch(71.4% .203 305.504));--_gm-param-1: var(--gm-param-1, oklch(70.7% .165 254.624));--_gm-param-2: var(--gm-param-2, oklch(79.2% .209 151.711));--_gm-param-3: var(--gm-param-3, oklch(75% .183 55.934));--_gm-param-4: var(--gm-param-4, oklch(71.8% .202 349.761));--_gm-param-5: var(--gm-param-5, oklch(78.9% .154 211.53))}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
1656
1732
|
}
|
|
1657
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1733
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: GigamenuComponent, decorators: [{
|
|
1658
1734
|
type: Component,
|
|
1659
|
-
args: [{ selector: 'gm-gigamenu', standalone: true, imports: [NgTemplateOutlet], template: "@if (service.isOpen()) {\n<div\n class=\"fixed inset-0 z-50 flex items-stretch justify-center sm:items-start sm:pt-[15vh]\"\n (click)=\"onBackdropClick($event)\"\n>\n <div class=\"fixed inset-0 bg-black/50 backdrop-blur-sm\"></div>\n\n <!-- Custom panel template -->\n @if (panelTemplate(); as pt) {\n <ng-container\n [ngTemplateOutlet]=\"pt.template\"\n [ngTemplateOutletContext]=\"getPanelContext()\"\n ></ng-container>\n } @else {\n <!-- Default panel -->\n <div\n class=\"relative z-10 w-full flex flex-col overflow-hidden border border-neutral-200 bg-white shadow-2xl dark:border-neutral-700 dark:bg-neutral-900 sm:max-w-xl sm:min-h-50 sm:flex-none sm:rounded-xl\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Command menu\"\n >\n <!-- Header -->\n @if (headerTemplate(); as ht) {\n <ng-container\n [ngTemplateOutlet]=\"ht.template\"\n [ngTemplateOutletContext]=\"getHeaderContext()\"\n ></ng-container>\n } @else {\n <div class=\"border-b border-neutral-200 dark:border-neutral-700\">\n <!-- Breadcrumb (when action is locked) -->\n @if (lockedAction(); as action) {\n <div class=\"flex flex-wrap items-center gap-1 px-4 py-2 text-sm\">\n <button\n type=\"button\"\n (click)=\"unlockActionFromUI()\"\n class=\"inline-flex items-center gap-1.5 rounded-md bg-blue-100 px-2 py-1 font-medium text-blue-800 hover:bg-blue-200 dark:bg-blue-900/40 dark:text-blue-300 dark:hover:bg-blue-900/60\"\n >\n @if (action.icon) {\n <span>{{ action.icon }}</span>\n }\n {{ action.label }}\n </button>\n @for (value of paramValues(); track $index) {\n <span class=\"text-neutral-400\">\u203A</span>\n <button\n type=\"button\"\n (click)=\"goToParam($index)\"\n [class]=\"'rounded-md px-2 py-1 font-medium hover:opacity-80 ' + getParamColor($index)\"\n >\n <span class=\"text-xs opacity-60\">{{ action.params?.[$index] }}:</span>\n {{ value }}\n </button>\n }\n @if (currentParamName(); as paramName) {\n <span class=\"text-neutral-400\">\u203A</span>\n <span class=\"text-neutral-500 dark:text-neutral-400 italic\">{{ paramName }}:</span>\n }\n </div>\n }\n\n <!-- Search input row -->\n <div class=\"flex items-center px-4\">\n <svg\n class=\"h-5 w-5 text-neutral-400\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z\"\n />\n </svg>\n <input\n #searchInput\n type=\"text\"\n [placeholder]=\"lockedAction() ? (currentParamName() ?? 'Enter value...') : service.config().placeholder\"\n [value]=\"query()\"\n (input)=\"onQueryChange($event)\"\n (keydown)=\"onInputKeydown($event)\"\n class=\"w-full px-3 py-4 text-base text-neutral-900 placeholder-neutral-400 outline-none dark:text-neutral-100 bg-transparent\"\n />\n <kbd\n class=\"rounded border border-neutral-200 bg-neutral-100 px-1.5 py-0.5 text-xs text-neutral-500 dark:border-neutral-600 dark:bg-neutral-800 dark:text-neutral-400\"\n >\n ESC\n </kbd>\n </div>\n </div>\n }\n\n <!-- Items list -->\n <div #listContainer class=\"flex-1 overflow-y-auto p-2 sm:flex-none sm:max-h-80\">\n @if (displayItems().length === 0) {\n <!-- Empty state -->\n @if (emptyTemplate(); as et) {\n <ng-container\n [ngTemplateOutlet]=\"et.template\"\n [ngTemplateOutletContext]=\"getEmptyContext()\"\n ></ng-container>\n } @else {\n <div class=\"px-3 py-8 text-center text-neutral-500\">\n @if (lockedAction()) {\n @if (hasAutocomplete()) {\n Type to search...\n } @else {\n Enter a value and press Tab or Enter\n }\n } @else {\n No results found\n }\n </div>\n }\n } @else {\n @for (item of displayItems(); track item.id; let i = $index) {\n <!-- Custom item template -->\n @if (itemTemplate(); as it) {\n <ng-container\n [ngTemplateOutlet]=\"it.template\"\n [ngTemplateOutletContext]=\"getItemContext(item, i)\"\n ></ng-container>\n } @else {\n <!-- Default item -->\n <button\n type=\"button\"\n (click)=\"onItemClick(item, i)\"\n (mouseenter)=\"selectedIndex.set(i)\"\n [attr.data-index]=\"i\"\n [class]=\"\n 'flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-left transition-colors ' +\n (selectedIndex() === i\n ? 'bg-neutral-100 dark:bg-neutral-800'\n : 'hover:bg-neutral-50 dark:hover:bg-neutral-800/50')\n \"\n >\n @if (!lockedAction()) {\n <!-- Action mode: show icon -->\n @if (item.iconClass) {\n <i [class]=\"item.iconClass + ' text-lg text-neutral-600 dark:text-neutral-300'\"></i>\n } @else if (item.icon) {\n <span class=\"text-lg\">{{ item.icon }}</span>\n } @else {\n <span\n class=\"flex h-6 w-6 items-center justify-center rounded bg-neutral-200 text-xs font-medium text-neutral-600 dark:bg-neutral-700 dark:text-neutral-300\"\n >\n {{ item.category === 'page' ? 'P' : 'C' }}\n </span>\n }\n }\n <div class=\"flex-1 min-w-0\">\n <div class=\"truncate font-medium text-neutral-900 dark:text-neutral-100\">\n {{ item.label }}@if (!lockedAction() && item.params) { @for (param of item.params; track $index) {<span class=\"whitespace-pre\"> </span><span [class]=\"getParamColor($index)\"><{{ param }}></span>}@if (item.paramProviders) {<span class=\"ml-2 inline-flex items-center rounded border border-neutral-300 bg-neutral-100 px-1 py-0.5 text-[10px] font-normal text-neutral-500 dark:border-neutral-600 dark:bg-neutral-700 dark:text-neutral-400\">Tab</span>}}\n </div>\n @if (item.description) {\n <div class=\"truncate text-sm text-neutral-500 dark:text-neutral-400\">\n {{ item.description }}\n </div>\n }\n </div>\n @if (!lockedAction()) {\n <span\n class=\"rounded-full px-2 py-0.5 text-xs\"\n [class]=\"\n item.category === 'page'\n ? 'bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400'\n : 'bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400'\n \"\n >\n {{ item.category }}\n </span>\n }\n </button>\n }\n }\n }\n </div>\n\n <!-- Footer -->\n @if (footerTemplate(); as ft) {\n <ng-container\n [ngTemplateOutlet]=\"ft.template\"\n [ngTemplateOutletContext]=\"getFooterContext()\"\n ></ng-container>\n } @else {\n <div\n class=\"flex items-center justify-between border-t border-neutral-200 px-4 py-2 text-xs text-neutral-500 dark:border-neutral-700\"\n >\n <div class=\"flex items-center gap-3\">\n <span class=\"flex items-center gap-1\">\n <kbd class=\"rounded border border-neutral-300 bg-neutral-100 px-1 dark:border-neutral-600 dark:bg-neutral-800\">\u2191</kbd>\n <kbd class=\"rounded border border-neutral-300 bg-neutral-100 px-1 dark:border-neutral-600 dark:bg-neutral-800\">\u2193</kbd>\n navigate\n </span>\n <span class=\"flex items-center gap-1\">\n <kbd class=\"rounded border border-neutral-300 bg-neutral-100 px-1 dark:border-neutral-600 dark:bg-neutral-800\">Tab</kbd>\n @if (lockedAction()) {\n next\n } @else {\n params\n }\n </span>\n <span class=\"flex items-center gap-1\">\n <kbd class=\"rounded border border-neutral-300 bg-neutral-100 px-1 dark:border-neutral-600 dark:bg-neutral-800\">\u21B5</kbd>\n @if (lockedAction()) {\n execute\n } @else {\n select\n }\n </span>\n </div>\n <span>gigamenu</span>\n </div>\n }\n </div>\n }\n</div>\n}\n", styles: [":host{display:contents}\n"] }]
|
|
1735
|
+
args: [{ selector: 'gm-gigamenu', standalone: true, imports: [NgTemplateOutlet], host: { '[attr.data-gm-dark]': 'dark() ? "" : null' }, template: "@if (service.isOpen()) {\n<div\n class=\"fixed inset-0 z-50 flex items-stretch justify-center sm:items-start sm:pt-[15vh]\"\n (click)=\"onBackdropClick($event)\"\n>\n <div class=\"fixed inset-0 bg-(--_gm-overlay) backdrop-blur-sm\"></div>\n\n <!-- Custom panel template -->\n @if (panelTemplate(); as pt) {\n <ng-container\n [ngTemplateOutlet]=\"pt.template\"\n [ngTemplateOutletContext]=\"getPanelContext()\"\n ></ng-container>\n } @else {\n <!-- Default panel -->\n <div\n class=\"relative z-10 w-full flex flex-col overflow-hidden border border-(color:--_gm-border) bg-(--_gm-bg) text-(color:--_gm-fg) shadow-2xl sm:max-w-xl sm:min-h-50 sm:flex-none sm:rounded-(--_gm-radius)\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Command menu\"\n >\n <!-- Header -->\n @if (headerTemplate(); as ht) {\n <ng-container\n [ngTemplateOutlet]=\"ht.template\"\n [ngTemplateOutletContext]=\"getHeaderContext()\"\n ></ng-container>\n } @else {\n <div class=\"border-b border-(color:--_gm-border)\">\n <!-- Breadcrumb (when action is locked) -->\n @if (lockedAction(); as action) {\n <div class=\"flex flex-wrap items-center gap-1 px-4 py-2 text-sm\">\n <button\n type=\"button\"\n (click)=\"unlockActionFromUI()\"\n class=\"inline-flex items-center gap-1.5 rounded-md bg-(--_gm-accent-bg) px-2 py-1 font-medium text-(color:--_gm-accent-fg) hover:bg-(--_gm-accent-hover-bg)\"\n >\n @if (action.icon) {\n <span>{{ action.icon }}</span>\n }\n {{ action.label }}\n </button>\n @for (value of paramValues(); track $index) {\n <span class=\"text-(color:--_gm-fg-subtle)\">\u203A</span>\n <button\n type=\"button\"\n (click)=\"goToParam($index)\"\n [class]=\"'rounded-md px-2 py-1 font-medium hover:opacity-80 ' + getParamColor($index)\"\n >\n <span class=\"text-xs opacity-60\">{{ action.params?.[$index] }}:</span>\n {{ value }}\n </button>\n }\n @if (currentParamName(); as paramName) {\n <span class=\"text-(color:--_gm-fg-subtle)\">\u203A</span>\n <span class=\"text-(color:--_gm-fg-muted) italic\">{{ paramName }}:</span>\n }\n </div>\n }\n\n <!-- Search input row -->\n <div class=\"flex items-center px-4\">\n <svg\n class=\"h-5 w-5 text-(color:--_gm-fg-subtle)\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z\"\n />\n </svg>\n <input\n #searchInput\n type=\"text\"\n [placeholder]=\"lockedAction() ? (currentParamName() ?? 'Enter value...') : service.config().placeholder\"\n [value]=\"query()\"\n (input)=\"onQueryChange($event)\"\n (keydown)=\"onInputKeydown($event)\"\n class=\"w-full px-3 py-4 text-base text-(color:--_gm-fg) placeholder-(--_gm-fg-subtle) outline-none bg-transparent\"\n />\n <kbd\n class=\"rounded border border-(color:--_gm-kbd-border) bg-(--_gm-kbd-bg) px-1.5 py-0.5 text-xs text-(color:--_gm-fg-muted)\"\n >\n ESC\n </kbd>\n </div>\n </div>\n }\n\n <!-- Items list -->\n <div #listContainer class=\"flex-1 overflow-y-auto p-2 sm:flex-none sm:max-h-80\">\n @if (displayItems().length === 0) {\n <!-- Empty state -->\n @if (emptyTemplate(); as et) {\n <ng-container\n [ngTemplateOutlet]=\"et.template\"\n [ngTemplateOutletContext]=\"getEmptyContext()\"\n ></ng-container>\n } @else {\n <div class=\"px-3 py-8 text-center text-(color:--_gm-fg-muted)\">\n @if (lockedAction()) {\n @if (hasAutocomplete()) {\n Type to search...\n } @else {\n Enter a value and press Tab or Enter\n }\n } @else {\n {{ labels().noResults }}\n }\n </div>\n }\n } @else {\n @for (item of displayItems(); track item.id; let i = $index) {\n <!-- Custom item template -->\n @if (itemTemplate(); as it) {\n <ng-container\n [ngTemplateOutlet]=\"it.template\"\n [ngTemplateOutletContext]=\"getItemContext(item, i)\"\n ></ng-container>\n } @else {\n <!-- Default item -->\n <button\n type=\"button\"\n (click)=\"onItemClick(item, i)\"\n (mouseenter)=\"selectedIndex.set(i)\"\n [attr.data-index]=\"i\"\n [class]=\"\n 'flex w-full items-center gap-3 rounded-[calc(var(--_gm-radius)-0.25rem)] px-3 py-2.5 text-left transition-colors ' +\n (selectedIndex() === i\n ? 'bg-(--_gm-selected-bg)'\n : 'hover:bg-(--_gm-hover-bg)')\n \"\n >\n @if (!lockedAction()) {\n <!-- Action mode: show icon -->\n @if (item.iconClass) {\n <i [class]=\"item.iconClass + ' text-lg text-(color:--_gm-fg-icon)'\"></i>\n } @else if (item.icon) {\n <span class=\"text-lg\">{{ item.icon }}</span>\n } @else {\n <span\n class=\"flex h-6 w-6 items-center justify-center rounded bg-(--_gm-badge-bg) text-xs font-medium text-(color:--_gm-fg-icon)\"\n >\n {{ item.category === 'page' ? labels().pageBadge : labels().commandBadge }}\n </span>\n }\n }\n <div class=\"flex-1 min-w-0\">\n <div class=\"truncate font-medium text-(color:--_gm-fg)\">\n {{ item.label }}@if (!lockedAction() && item.params) { @for (param of item.params; track $index) {<span class=\"whitespace-pre\"> </span><span [class]=\"getParamColor($index)\"><{{ param }}></span>}@if (item.paramProviders) {<span class=\"ml-2 inline-flex items-center rounded border border-(color:--_gm-kbd-border) bg-(--_gm-kbd-bg) px-1 py-0.5 text-[10px] font-normal text-(color:--_gm-fg-muted)\">{{ labels().paramHint }}</span>}}\n </div>\n @if (item.description) {\n <div class=\"truncate text-sm text-(color:--_gm-fg-muted)\">\n {{ item.description }}\n </div>\n }\n </div>\n @if (!lockedAction() && service.config().showCategoryTags !== false) {\n <span\n class=\"rounded-full px-2 py-0.5 text-xs\"\n [class]=\"\n item.category === 'page'\n ? 'bg-(--_gm-page-bg) text-(color:--_gm-page-fg)'\n : 'bg-(--_gm-command-bg) text-(color:--_gm-command-fg)'\n \"\n >\n {{ item.category === 'page' ? labels().pageTag : labels().commandTag }}\n </span>\n }\n </button>\n }\n }\n }\n </div>\n\n <!-- Footer -->\n @if (footerTemplate(); as ft) {\n <ng-container\n [ngTemplateOutlet]=\"ft.template\"\n [ngTemplateOutletContext]=\"getFooterContext()\"\n ></ng-container>\n } @else if (service.config().showFooter !== false) {\n <div\n class=\"flex items-center justify-between border-t border-(color:--_gm-border) px-4 py-2 text-xs text-(color:--_gm-fg-muted)\"\n >\n <div class=\"flex items-center gap-3\">\n <span class=\"flex items-center gap-1\">\n <kbd class=\"rounded border border-(color:--_gm-kbd-border) bg-(--_gm-kbd-bg) px-1\">\u2191</kbd>\n <kbd class=\"rounded border border-(color:--_gm-kbd-border) bg-(--_gm-kbd-bg) px-1\">\u2193</kbd>\n {{ labels().navigate }}\n </span>\n <span class=\"flex items-center gap-1\">\n <kbd class=\"rounded border border-(color:--_gm-kbd-border) bg-(--_gm-kbd-bg) px-1\">Tab</kbd>\n @if (lockedAction()) {\n {{ labels().next }}\n } @else {\n {{ labels().params }}\n }\n </span>\n <span class=\"flex items-center gap-1\">\n <kbd class=\"rounded border border-(color:--_gm-kbd-border) bg-(--_gm-kbd-bg) px-1\">\u21B5</kbd>\n @if (lockedAction()) {\n {{ labels().execute }}\n } @else {\n {{ labels().select }}\n }\n </span>\n </div>\n <span>{{ labels().footerBrand }}</span>\n </div>\n }\n </div>\n }\n</div>\n}\n", styles: [":host{display:contents;--_gm-bg: var(--gm-bg, oklch(100% 0 0));--_gm-fg: var(--gm-fg, oklch(20.5% 0 0));--_gm-fg-muted: var(--gm-fg-muted, oklch(55.6% 0 0));--_gm-fg-subtle: var(--gm-fg-subtle, oklch(70.8% 0 0));--_gm-fg-icon: var(--gm-fg-icon, oklch(43.9% 0 0));--_gm-border: var(--gm-border, oklch(92.2% 0 0));--_gm-hover-bg: var(--gm-hover-bg, oklch(98.5% 0 0));--_gm-selected-bg: var(--gm-selected-bg, oklch(97% 0 0));--_gm-badge-bg: var(--gm-badge-bg, oklch(92.2% 0 0));--_gm-kbd-bg: var(--gm-kbd-bg, oklch(97% 0 0));--_gm-kbd-border: var(--gm-kbd-border, oklch(87% 0 0));--_gm-accent-bg: var(--gm-accent-bg, oklch(93.2% .032 255.585));--_gm-accent-hover-bg: var(--gm-accent-hover-bg, oklch(88.2% .059 254.128));--_gm-accent-fg: var(--gm-accent-fg, oklch(42.4% .199 265.638));--_gm-page-bg: var(--gm-page-bg, oklch(93.2% .032 255.585));--_gm-page-fg: var(--gm-page-fg, oklch(48.8% .243 264.376));--_gm-command-bg: var(--gm-command-bg, oklch(94.6% .033 307.174));--_gm-command-fg: var(--gm-command-fg, oklch(49.6% .265 301.924));--_gm-param-1: var(--gm-param-1, oklch(62.3% .214 259.815));--_gm-param-2: var(--gm-param-2, oklch(72.3% .219 149.579));--_gm-param-3: var(--gm-param-3, oklch(70.5% .213 47.604));--_gm-param-4: var(--gm-param-4, oklch(65.6% .241 354.308));--_gm-param-5: var(--gm-param-5, oklch(71.5% .143 215.221));--_gm-radius: var(--gm-radius, .75rem);--_gm-overlay: var(--gm-overlay, rgb(0 0 0 / 50%))}:host([data-gm-dark]){--_gm-bg: var(--gm-bg, oklch(20.5% 0 0));--_gm-fg: var(--gm-fg, oklch(97% 0 0));--_gm-fg-muted: var(--gm-fg-muted, oklch(70.8% 0 0));--_gm-fg-icon: var(--gm-fg-icon, oklch(87% 0 0));--_gm-border: var(--gm-border, oklch(37.1% 0 0));--_gm-hover-bg: var(--gm-hover-bg, oklch(26.9% 0 0 / 50%));--_gm-selected-bg: var(--gm-selected-bg, oklch(26.9% 0 0));--_gm-badge-bg: var(--gm-badge-bg, oklch(37.1% 0 0));--_gm-kbd-bg: var(--gm-kbd-bg, oklch(26.9% 0 0));--_gm-kbd-border: var(--gm-kbd-border, oklch(43.9% 0 0));--_gm-accent-bg: var(--gm-accent-bg, oklch(37.9% .146 265.522 / 40%));--_gm-accent-hover-bg: var(--gm-accent-hover-bg, oklch(37.9% .146 265.522 / 60%));--_gm-accent-fg: var(--gm-accent-fg, oklch(80.9% .105 251.813));--_gm-page-bg: var(--gm-page-bg, oklch(37.9% .146 265.522 / 30%));--_gm-page-fg: var(--gm-page-fg, oklch(70.7% .165 254.624));--_gm-command-bg: var(--gm-command-bg, oklch(38.1% .176 304.987 / 30%));--_gm-command-fg: var(--gm-command-fg, oklch(71.4% .203 305.504));--_gm-param-1: var(--gm-param-1, oklch(70.7% .165 254.624));--_gm-param-2: var(--gm-param-2, oklch(79.2% .209 151.711));--_gm-param-3: var(--gm-param-3, oklch(75% .183 55.934));--_gm-param-4: var(--gm-param-4, oklch(71.8% .202 349.761));--_gm-param-5: var(--gm-param-5, oklch(78.9% .154 211.53))}\n"] }]
|
|
1660
1736
|
}], ctorParameters: () => [{ type: GigamenuService }, { type: FrecencyService }, { type: undefined, decorators: [{
|
|
1661
1737
|
type: Inject,
|
|
1662
1738
|
args: [PLATFORM_ID]
|
|
@@ -1669,5 +1745,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1669
1745
|
* Generated bundle index. Do not edit.
|
|
1670
1746
|
*/
|
|
1671
1747
|
|
|
1672
|
-
export { DEFAULT_CONFIG, FrecencyService, GigamenuComponent, GigamenuEmptyTemplate, GigamenuFooterTemplate, GigamenuHeaderTemplate, GigamenuItemTemplate, GigamenuPanelTemplate, GigamenuService, PARAM_COLORS, defineCommand };
|
|
1748
|
+
export { DEFAULT_CONFIG, DEFAULT_LABELS, FrecencyService, GigamenuComponent, GigamenuEmptyTemplate, GigamenuFooterTemplate, GigamenuHeaderTemplate, GigamenuItemTemplate, GigamenuPanelTemplate, GigamenuService, PARAM_COLORS, defineCommand };
|
|
1673
1749
|
//# sourceMappingURL=flxgde-gigamenu.mjs.map
|