@cngx/ui 0.1.0-rc.7 → 0.1.0-rc.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/README.md +0 -1
  2. package/a11y/README.md +11 -5
  3. package/accordion/README.md +4 -2
  4. package/breadcrumb/README.md +262 -0
  5. package/collection/README.md +6 -0
  6. package/command-palette/README.md +227 -0
  7. package/data-grid-accordion/README.md +76 -2
  8. package/feedback/README.md +40 -0
  9. package/fesm2022/cngx-ui-a11y.mjs +189 -57
  10. package/fesm2022/cngx-ui-a11y.mjs.map +1 -1
  11. package/fesm2022/cngx-ui-accordion.mjs +120 -36
  12. package/fesm2022/cngx-ui-accordion.mjs.map +1 -1
  13. package/fesm2022/cngx-ui-action-button.mjs +121 -56
  14. package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
  15. package/fesm2022/cngx-ui-breadcrumb.mjs +228 -108
  16. package/fesm2022/cngx-ui-breadcrumb.mjs.map +1 -1
  17. package/fesm2022/cngx-ui-chart-panel.mjs +180 -23
  18. package/fesm2022/cngx-ui-chart-panel.mjs.map +1 -1
  19. package/fesm2022/cngx-ui-collection.mjs +204 -62
  20. package/fesm2022/cngx-ui-collection.mjs.map +1 -1
  21. package/fesm2022/cngx-ui-command-palette.mjs +395 -119
  22. package/fesm2022/cngx-ui-command-palette.mjs.map +1 -1
  23. package/fesm2022/cngx-ui-context-menu.mjs +209 -40
  24. package/fesm2022/cngx-ui-context-menu.mjs.map +1 -1
  25. package/fesm2022/cngx-ui-data-grid-accordion.mjs +498 -101
  26. package/fesm2022/cngx-ui-data-grid-accordion.mjs.map +1 -1
  27. package/fesm2022/cngx-ui-empty-state.mjs +16 -6
  28. package/fesm2022/cngx-ui-empty-state.mjs.map +1 -1
  29. package/fesm2022/cngx-ui-feedback.mjs +1074 -460
  30. package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
  31. package/fesm2022/cngx-ui-mat-accordion.mjs +76 -7
  32. package/fesm2022/cngx-ui-mat-accordion.mjs.map +1 -1
  33. package/fesm2022/cngx-ui-mat-paginator.mjs +67 -24
  34. package/fesm2022/cngx-ui-mat-paginator.mjs.map +1 -1
  35. package/fesm2022/cngx-ui-mat-stepper.mjs +72 -47
  36. package/fesm2022/cngx-ui-mat-stepper.mjs.map +1 -1
  37. package/fesm2022/cngx-ui-mat-tabs.mjs +555 -204
  38. package/fesm2022/cngx-ui-mat-tabs.mjs.map +1 -1
  39. package/fesm2022/cngx-ui-overlay.mjs +69 -13
  40. package/fesm2022/cngx-ui-overlay.mjs.map +1 -1
  41. package/fesm2022/cngx-ui-paginator.mjs +553 -198
  42. package/fesm2022/cngx-ui-paginator.mjs.map +1 -1
  43. package/fesm2022/cngx-ui-sidenav.mjs +344 -109
  44. package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
  45. package/fesm2022/cngx-ui-skeleton.mjs +4 -16
  46. package/fesm2022/cngx-ui-skeleton.mjs.map +1 -1
  47. package/fesm2022/cngx-ui-speak.mjs +107 -8
  48. package/fesm2022/cngx-ui-speak.mjs.map +1 -1
  49. package/fesm2022/cngx-ui-stat-card.mjs +146 -46
  50. package/fesm2022/cngx-ui-stat-card.mjs.map +1 -1
  51. package/fesm2022/cngx-ui-stepper.mjs +234 -99
  52. package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
  53. package/fesm2022/cngx-ui-tabs.mjs +88 -25
  54. package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
  55. package/fesm2022/cngx-ui-timeline.mjs +98 -23
  56. package/fesm2022/cngx-ui-timeline.mjs.map +1 -1
  57. package/fesm2022/cngx-ui-toc.mjs +101 -33
  58. package/fesm2022/cngx-ui-toc.mjs.map +1 -1
  59. package/fesm2022/cngx-ui.mjs +15 -20
  60. package/fesm2022/cngx-ui.mjs.map +1 -1
  61. package/mat-paginator/README.md +9 -2
  62. package/mat-tabs/README.md +30 -6
  63. package/mat-tabs/styles/mat-tabs.css +188 -42
  64. package/overlay/README.md +9 -4
  65. package/package.json +31 -7
  66. package/paginator/README.md +8 -4
  67. package/schematics/collection.json +9 -0
  68. package/schematics/ng-add/index.js +9 -0
  69. package/schematics/ng-add/schema.json +91 -0
  70. package/schematics/package.json +3 -0
  71. package/sidenav/README.md +33 -11
  72. package/speak/README.md +3 -2
  73. package/stepper/README.md +14 -2
  74. package/timeline/README.md +1 -1
  75. package/toc/README.md +4 -1
  76. package/types/cngx-ui-a11y.d.ts +121 -30
  77. package/types/cngx-ui-accordion.d.ts +100 -28
  78. package/types/cngx-ui-action-button.d.ts +44 -3
  79. package/types/cngx-ui-breadcrumb.d.ts +167 -60
  80. package/types/cngx-ui-chart-panel.d.ts +122 -18
  81. package/types/cngx-ui-collection.d.ts +157 -55
  82. package/types/cngx-ui-command-palette.d.ts +297 -183
  83. package/types/cngx-ui-context-menu.d.ts +140 -10
  84. package/types/cngx-ui-data-grid-accordion.d.ts +278 -39
  85. package/types/cngx-ui-empty-state.d.ts +9 -2
  86. package/types/cngx-ui-feedback.d.ts +605 -59
  87. package/types/cngx-ui-mat-accordion.d.ts +30 -1
  88. package/types/cngx-ui-mat-paginator.d.ts +37 -8
  89. package/types/cngx-ui-mat-stepper.d.ts +23 -11
  90. package/types/cngx-ui-mat-tabs.d.ts +250 -34
  91. package/types/cngx-ui-overlay.d.ts +56 -10
  92. package/types/cngx-ui-paginator.d.ts +425 -136
  93. package/types/cngx-ui-sidenav.d.ts +248 -74
  94. package/types/cngx-ui-skeleton.d.ts +6 -7
  95. package/types/cngx-ui-speak.d.ts +118 -5
  96. package/types/cngx-ui-stat-card.d.ts +117 -33
  97. package/types/cngx-ui-stepper.d.ts +88 -49
  98. package/types/cngx-ui-tabs.d.ts +6 -4
  99. package/types/cngx-ui-timeline.d.ts +35 -11
  100. package/types/cngx-ui-toc.d.ts +93 -16
  101. package/types/cngx-ui.d.ts +7 -4
@@ -1 +1 @@
1
- {"version":3,"file":"cngx-ui-command-palette.mjs","sources":["../../../projects/ui/command-palette/panel/command-palette-defaults.ts","../../../projects/ui/command-palette/config/command-palette-config.ts","../../../projects/ui/command-palette/panel/panel-host.token.ts","../../../projects/ui/command-palette/panel/command-panel.component.ts","../../../projects/ui/command-palette/panel/command-panel-shell.component.ts","../../../projects/ui/command-palette/slots/command-slots.ts","../../../projects/ui/command-palette/palette/palette-keybinding.ts","../../../projects/ui/command-palette/palette/command-palette.component.ts","../../../projects/ui/command-palette/palette/command-palette-trigger.directive.ts","../../../projects/ui/command-palette/public-api.ts","../../../projects/ui/command-palette/cngx-ui-command-palette.ts"],"sourcesContent":["import type { CngxCommandPaletteLegendEntry } from '../config/command-palette-config';\n\n/**\n * @internal\n * Built-in English strings for the default palette. Never exported from\n * `public-api.ts` - mirrors the select family's `CNGX_SELECT_GLYPHS` precedent,\n * so no strings are inlined in templates before the public config cascade\n * resolves. German (or any locale) is consumer-supplied through that cascade,\n * never hard-coded here.\n */\nexport interface CngxCommandPaletteDefaults {\n /** Combo string that opens the palette (parsed via `parseKeyCombo`). */\n readonly openShortcut: string;\n readonly searchPlaceholder: string;\n readonly listboxLabel: string;\n readonly emptyLabel: string;\n readonly loadingLabel: string;\n readonly errorLabel: string;\n readonly retryLabel: string;\n /** Builds the polite `aria-live` result-count message. */\n readonly resultCount: (count: number) => string;\n /** Keyboard-legend rows rendered in the footer. */\n readonly footerLegend: readonly CngxCommandPaletteLegendEntry[];\n}\n\n/** @internal */\nexport const CNGX_COMMAND_PALETTE_DEFAULTS: CngxCommandPaletteDefaults = {\n openShortcut: 'mod+k',\n searchPlaceholder: 'Type a command or search...',\n listboxLabel: 'Commands',\n emptyLabel: 'No matching commands.',\n loadingLabel: 'Loading commands...',\n errorLabel: 'Could not load commands.',\n retryLabel: 'Retry',\n resultCount: (count) => (count === 1 ? '1 result' : `${count} results`),\n footerLegend: [\n { keys: 'up down', label: 'Navigate' },\n { keys: 'enter', label: 'Run' },\n { keys: 'esc', label: 'Close' },\n ],\n};\n","import {\n inject,\n InjectionToken,\n makeEnvironmentProviders,\n Optional,\n SkipSelf,\n type EnvironmentProviders,\n type Provider,\n} from '@angular/core';\n\nimport { CNGX_COMMAND_PALETTE_DEFAULTS } from '../panel/command-palette-defaults';\nimport type {\n CngxCommandGroupHeaderContext,\n CngxCommandPaletteEmptyContext,\n CngxCommandPaletteErrorContext,\n CngxCommandPaletteFooterContext,\n CngxCommandPaletteLoadingContext,\n CngxCommandRowContext,\n} from '../slots/command-slots';\nimport type { TemplateRef } from '@angular/core';\n\n/**\n * Global default template overrides, keyed by slot. Resolution order for any\n * fragment is instance `*cngxCommand*` slot > this map > the built-in default.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport interface CngxCommandPaletteTemplates {\n readonly row?: TemplateRef<CngxCommandRowContext>;\n readonly groupHeader?: TemplateRef<CngxCommandGroupHeaderContext>;\n readonly empty?: TemplateRef<CngxCommandPaletteEmptyContext>;\n readonly loading?: TemplateRef<CngxCommandPaletteLoadingContext>;\n readonly error?: TemplateRef<CngxCommandPaletteErrorContext>;\n readonly footer?: TemplateRef<CngxCommandPaletteFooterContext>;\n}\n\n/**\n * One keyboard-legend row in the palette footer: the key glyphs and what they\n * do.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport interface CngxCommandPaletteLegendEntry {\n readonly keys: string;\n readonly label: string;\n}\n\n/**\n * Resolved, localisable configuration for the command palette. English by\n * default (sourced from the internal defaults); German or any other locale is\n * consumer-supplied through {@link provideCommandPaletteConfig} and the `with*`\n * features - never hard-coded (`feedback_en_default_locale`).\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport interface CngxCommandPaletteConfig {\n /**\n * Combo string that opens the palette (parsed via `parseKeyCombo`, e.g.\n * `'mod+k'`, `'mod+shift+p'`). A per-instance `[openShortcut]` wins over this.\n */\n readonly openShortcut: string;\n /** Placeholder + accessible name for the search input. */\n readonly searchPlaceholder: string;\n /** Accessible label for the results listbox. */\n readonly listboxLabel: string;\n /** Empty-state copy (async source returned no results). */\n readonly emptyLabel: string;\n /** First-load skeleton copy. */\n readonly loadingLabel: string;\n /** Error-state copy. */\n readonly errorLabel: string;\n /** Retry-button copy in the error state. */\n readonly retryLabel: string;\n /** Builds the polite `aria-live` result-count message. */\n readonly resultCount: (count: number) => string;\n /** Keyboard-legend rows rendered in the footer. */\n readonly footerLegend: readonly CngxCommandPaletteLegendEntry[];\n /** Global default slot templates (config = strings, slots = structure). */\n readonly templates?: CngxCommandPaletteTemplates;\n}\n\n/**\n * A partial-config override produced by a `with*` helper.\n *\n * There is one config surface today, so this is a plain mutator - no\n * `_target` discriminator. If a second palette config surface ever lands and a\n * `provideCngxCommandPalette` aggregator is introduced, add the discriminator\n * then (the menu family's `_target` pattern), not preemptively.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport type CngxCommandPaletteConfigFeature = (\n config: CngxCommandPaletteConfig,\n) => CngxCommandPaletteConfig;\n\n/**\n * Library-default palette configuration, built from the internal defaults\n * const. English-only.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport const DEFAULT_COMMAND_PALETTE_CONFIG: CngxCommandPaletteConfig = {\n openShortcut: CNGX_COMMAND_PALETTE_DEFAULTS.openShortcut,\n searchPlaceholder: CNGX_COMMAND_PALETTE_DEFAULTS.searchPlaceholder,\n listboxLabel: CNGX_COMMAND_PALETTE_DEFAULTS.listboxLabel,\n emptyLabel: CNGX_COMMAND_PALETTE_DEFAULTS.emptyLabel,\n loadingLabel: CNGX_COMMAND_PALETTE_DEFAULTS.loadingLabel,\n errorLabel: CNGX_COMMAND_PALETTE_DEFAULTS.errorLabel,\n retryLabel: CNGX_COMMAND_PALETTE_DEFAULTS.retryLabel,\n resultCount: CNGX_COMMAND_PALETTE_DEFAULTS.resultCount,\n footerLegend: CNGX_COMMAND_PALETTE_DEFAULTS.footerLegend,\n};\n\n/**\n * DI token carrying the resolved {@link CngxCommandPaletteConfig}. Defaults to\n * {@link DEFAULT_COMMAND_PALETTE_CONFIG} at root; override app-wide via\n * {@link provideCommandPaletteConfig} or per-scope via\n * {@link provideCommandPaletteConfigAt}.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport const CNGX_COMMAND_PALETTE_CONFIG = new InjectionToken<CngxCommandPaletteConfig>(\n 'CngxCommandPaletteConfig',\n { providedIn: 'root', factory: () => DEFAULT_COMMAND_PALETTE_CONFIG },\n);\n\n/** @internal */\nfunction applyFeatures(\n base: CngxCommandPaletteConfig,\n features: readonly CngxCommandPaletteConfigFeature[],\n): CngxCommandPaletteConfig {\n return features.reduce((config, feature) => feature(config), base);\n}\n\n/**\n * Provide a palette configuration at app root.\n *\n * ```ts\n * provideCommandPaletteConfig(\n * withCommandPaletteLabels({ emptyLabel: 'Keine Treffer.' }),\n * withKeyboardLegend([{ keys: 'enter', label: 'Ausführen' }]),\n * )\n * ```\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport function provideCommandPaletteConfig(\n ...features: CngxCommandPaletteConfigFeature[]\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: CNGX_COMMAND_PALETTE_CONFIG,\n useFactory: () => applyFeatures(DEFAULT_COMMAND_PALETTE_CONFIG, features),\n },\n ]);\n}\n\n/**\n * Component-scoped palette configuration override. Features merge on top of the\n * enclosing scope (root or a parent `viewProviders`).\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport function provideCommandPaletteConfigAt(\n ...features: CngxCommandPaletteConfigFeature[]\n): Provider[] {\n return [\n {\n provide: CNGX_COMMAND_PALETTE_CONFIG,\n useFactory: (parent: CngxCommandPaletteConfig | null) =>\n applyFeatures(parent ?? DEFAULT_COMMAND_PALETTE_CONFIG, features),\n deps: [[new SkipSelf(), new Optional(), CNGX_COMMAND_PALETTE_CONFIG]],\n },\n ];\n}\n\n/**\n * Resolves the {@link CngxCommandPaletteConfig} from the current injection\n * scope. Must run in an injection context.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport function injectCommandPaletteConfig(): CngxCommandPaletteConfig {\n return inject(CNGX_COMMAND_PALETTE_CONFIG);\n}\n\n/**\n * Override any subset of the palette's text labels. Unset labels keep the\n * English defaults.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport function withCommandPaletteLabels(\n labels: Partial<\n Pick<\n CngxCommandPaletteConfig,\n 'searchPlaceholder' | 'listboxLabel' | 'emptyLabel' | 'loadingLabel' | 'errorLabel' | 'retryLabel'\n >\n >,\n): CngxCommandPaletteConfigFeature {\n return (config) => ({ ...config, ...labels });\n}\n\n/**\n * Set the combo that opens the palette (parsed via `parseKeyCombo`, e.g.\n * `'mod+k'`, `'mod+shift+p'`). Applies app-wide via `provideCommandPaletteConfig`\n * or per-scope via `provideCommandPaletteConfigAt`. A per-instance\n * `[openShortcut]` input still wins over this.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport function withPaletteShortcut(combo: string): CngxCommandPaletteConfigFeature {\n return (config) => ({ ...config, openShortcut: combo });\n}\n\n/**\n * Replace the footer keyboard legend.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport function withKeyboardLegend(\n entries: readonly CngxCommandPaletteLegendEntry[],\n): CngxCommandPaletteConfigFeature {\n return (config) => ({ ...config, footerLegend: entries });\n}\n\n/**\n * Replace the `aria-live` result-count formatter (e.g. for pluralisation in\n * another locale).\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport function withResultCountFormatter(\n formatter: (count: number) => string,\n): CngxCommandPaletteConfigFeature {\n return (config) => ({ ...config, resultCount: formatter });\n}\n\n/**\n * Register global default slot templates. Merged over any already set; a\n * per-instance `*cngxCommand*` slot still wins over these.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport function withCommandPaletteTemplates(\n templates: CngxCommandPaletteTemplates,\n): CngxCommandPaletteConfigFeature {\n return (config) => ({\n ...config,\n templates: { ...config.templates, ...templates },\n });\n}\n","import { InjectionToken, type Signal } from '@angular/core';\n\n/**\n * Contract the palette surface exposes to its panel body. One token, single\n * surface today; the container-swap second token is the documented eject seam\n * if a second surface ever lands (tracked debt), not built for one consumer.\n *\n * Focus restore is intentionally NOT on this contract - the palette renders a\n * native modal `<dialog cngxDialog>`, so `showModal()` traps focus and\n * `CngxDialog` stores the trigger at open and returns focus after the close\n * transition settles. The panel only needs to know it is open and to ask the\n * surface to dismiss when a command runs.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport interface CngxCommandPaletteHost {\n /** Whether the palette surface is currently open. */\n readonly isOpen: Signal<boolean>;\n /** Dismiss the surface (e.g. after a command runs). */\n dismiss(): void;\n}\n\n/**\n * DI token the panel injects (optional) to reach its hosting palette surface.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport const CNGX_COMMAND_PALETTE_HOST = new InjectionToken<CngxCommandPaletteHost>(\n 'CNGX_COMMAND_PALETTE_HOST',\n);\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n ViewEncapsulation,\n type Signal,\n type TemplateRef,\n} from '@angular/core';\n\nimport {\n CNGX_COMMAND_MATCH_FACTORY,\n injectCommands,\n type CngxCommand,\n type CommandGroup,\n type RankedCommand,\n} from '@cngx/common/command';\nimport { CngxListbox, CngxOption, CngxSearch } from '@cngx/common/interactive';\nimport { CngxHighlight } from '@cngx/common/layout';\nimport { nextUid, type CngxAsyncState } from '@cngx/core/utils';\n\nimport { injectCommandPaletteConfig } from '../config/command-palette-config';\nimport type {\n CngxCommandGroupHeaderContext,\n CngxCommandRowContext,\n} from '../slots/command-slots';\nimport { CNGX_COMMAND_PALETTE_HOST } from './panel-host.token';\n\n/**\n * One rendered result group: a header label (null for the ungrouped bucket)\n * plus its ranked commands, in render order.\n * @internal\n */\ninterface RenderGroup {\n readonly id: string;\n readonly label: string | null;\n readonly items: readonly RankedCommand[];\n}\n\n/**\n * @internal\n * The command-palette result body: a `role=combobox` search input driving a\n * `role=listbox` of ranked commands with `aria-activedescendant`, grouped\n * results, match highlighting, a bound scope chip, and a polite result-count\n * live region. Composes existing atoms - `CngxSearch` (debounced term),\n * `CngxListbox` + `CngxOption` (navigation over the ranked list in final DOM\n * order via the listbox's own `CngxActiveDescendant`), `CngxHighlight` (match\n * marking) - with no reinvented debounce, navigation, or ranking engine.\n *\n * The ranked list is a `computed()` over the `equal`-guarded registry, the\n * swappable matcher, `term`, `scope`, and the consumer's async result source;\n * the per-option `matchFn` never runs, so there is no double-filter.\n */\n@Component({\n selector: 'cngx-command-panel',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxSearch, CngxListbox, CngxOption, CngxHighlight, NgTemplateOutlet],\n styleUrl: './command-panel.component.css',\n host: { class: 'cngx-command-panel' },\n template: `\n <div class=\"cngx-command-panel-input-row\">\n @if (scope(); as activeScope) {\n <span class=\"cngx-command-scope-chip\">{{ activeScope }}</span>\n }\n <input\n cngxSearch\n class=\"cngx-command-panel-input\"\n type=\"text\"\n role=\"combobox\"\n autocomplete=\"off\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"true\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"lb.ad.activeId()\"\n [attr.aria-label]=\"config.searchPlaceholder\"\n [placeholder]=\"config.searchPlaceholder\"\n [debounceMs]=\"debounceMs()\"\n (searchChange)=\"onTerm($event, lb)\"\n (keydown)=\"onKeydown($event, lb)\"\n />\n </div>\n\n <div\n cngxListbox\n #lb=\"cngxListbox\"\n [id]=\"listboxId\"\n class=\"cngx-command-panel-listbox\"\n [label]=\"config.listboxLabel\"\n [autoHighlightFirst]=\"true\"\n [externalActivation]=\"true\"\n >\n @for (group of groups(); track group.id) {\n <div role=\"group\" [attr.aria-labelledby]=\"group.label ? group.id + '-h' : null\">\n @if (group.label; as header) {\n <div class=\"cngx-command-group-header\" [id]=\"group.id + '-h'\">\n @if (groupHeaderTpl(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: toCommandGroup(group) }\"\n />\n } @else {\n {{ header }}\n }\n </div>\n }\n @for (entry of group.items; track entry.command.id) {\n <div\n cngxOption\n class=\"cngx-command-row\"\n [value]=\"entry.command.id\"\n [label]=\"entry.command.label\"\n [disabled]=\"isDisabled(entry.command)\"\n [attr.aria-describedby]=\"describedBy(entry.command)\"\n >\n @if (rowTpl(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: entry,\n term: term(),\n data: entry.command.data,\n active: lb.ad.activeValue() === entry.command.id,\n }\"\n />\n } @else {\n <span class=\"cngx-command-row-label\" [cngxHighlight]=\"term()\">{{\n entry.command.label\n }}</span>\n }\n @if (entry.command.disabledReason; as reason) {\n <!-- Target stays in the DOM whenever a reason exists; only the\n aria-describedby reference (describedBy) is gated on disabled\n state, so no referenced node ever appears/disappears mid-interaction. -->\n <span class=\"cngx-sr-only\" [id]=\"reasonId(entry.command)\">{{ reason }}</span>\n }\n </div>\n }\n </div>\n }\n </div>\n\n <span class=\"cngx-sr-only\" aria-live=\"polite\">{{ countMessage() }}</span>\n `,\n})\nexport class CngxCommandPanel {\n /** Consumer-derived async result source, merged in with the static registry. */\n readonly results = input<CngxAsyncState<CommandGroup[]> | undefined>(undefined);\n\n /** Persistent scope; feeds the matcher's scope filter and renders as a chip. */\n readonly scope = model<string | undefined>(undefined);\n\n /** Debounce for the search input (proxied to `CngxSearch`). */\n readonly debounceMs = input<number>(150);\n\n /** Resolved row slot template (instance > config > null). Built-in default when null. */\n readonly rowTpl = input<TemplateRef<CngxCommandRowContext> | null>(null);\n /** Resolved group-header slot template. Built-in default when null. */\n readonly groupHeaderTpl = input<TemplateRef<CngxCommandGroupHeaderContext> | null>(null);\n\n /** Emits the debounced term so the surface can mirror it (e.g. for the empty slot). */\n readonly termChange = output<string>();\n\n protected readonly config = injectCommandPaletteConfig();\n protected readonly listboxId = nextUid('cngx-command-listbox');\n\n private readonly commands = injectCommands();\n private readonly matcher = inject(CNGX_COMMAND_MATCH_FACTORY)();\n private readonly host = inject(CNGX_COMMAND_PALETTE_HOST, { optional: true });\n private readonly destroyRef = inject(DestroyRef);\n private readonly listbox = viewChild.required(CngxListbox);\n\n private readonly termState = signal('');\n /** Current debounced search term. Exposed for the consumer's result derivation. */\n readonly term: Signal<string> = this.termState.asReadonly();\n\n /** Grouped, ranked results: consumer async groups first, then the ranked registry. */\n protected readonly groups = computed<readonly RenderGroup[]>(\n () => {\n const ranked = this.matcher(this.commands(), this.term(), this.scope());\n const asyncState = this.results();\n const asyncGroups = asyncState ? toRenderGroups(asyncState.data() ?? []) : [];\n return [...asyncGroups, ...groupRanked(ranked)];\n },\n { equal: renderGroupsEqual },\n );\n\n /** Flat ranked list in render order, for count + command lookup. */\n private readonly flatItems = computed<readonly RankedCommand[]>(\n () => this.groups().flatMap((group) => group.items),\n { equal: rankedListEqual },\n );\n\n /** Number of results across every group. Exposed for the consumer. */\n readonly resultCount = computed<number>(() => this.flatItems().length);\n\n protected readonly countMessage = computed<string>(() =>\n this.config.resultCount(this.resultCount()),\n );\n\n constructor() {\n // Click on an option routes through the listbox's active-descendant, which\n // emits `activated`; Enter forwards through the same `activateCurrent` path.\n // One subscription runs the matching command for both. externalActivation\n // stops the listbox writing its own value on activation.\n afterNextRender(() => {\n const subscription = this.listbox().ad.activated.subscribe((value) => this.runById(value));\n this.destroyRef.onDestroy(() => subscription.unsubscribe());\n });\n }\n\n protected onTerm(term: string, lb: CngxListbox): void {\n this.termState.set(term);\n this.termChange.emit(term);\n // Reset the highlight so autoHighlightFirst re-fires the top result after a\n // re-rank shrinks the list below the previously active index.\n lb.ad.resetHighlight();\n }\n\n /** Maps an internal render group to the public `CommandGroup` slot context. */\n protected toCommandGroup(group: RenderGroup): CommandGroup {\n return {\n id: group.id,\n label: group.label ?? '',\n commands: group.items.map((entry) => entry.command),\n };\n }\n\n protected onKeydown(event: KeyboardEvent, lb: CngxListbox): void {\n const ad = lb.ad;\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n ad.highlightNext();\n return;\n case 'ArrowUp':\n event.preventDefault();\n ad.highlightPrev();\n return;\n case 'Home':\n event.preventDefault();\n ad.highlightFirst();\n return;\n case 'End':\n event.preventDefault();\n ad.highlightLast();\n return;\n case 'Enter':\n if (ad.activeItem()) {\n event.preventDefault();\n ad.activateCurrent();\n }\n return;\n }\n // Space, printable characters, and Backspace fall through to the input so\n // the search term picks them up.\n }\n\n protected isDisabled(command: CngxCommand): boolean {\n return command.disabled?.() ?? false;\n }\n\n protected reasonId(command: CngxCommand): string {\n return `${this.listboxId}-reason-${command.id}`;\n }\n\n protected describedBy(command: CngxCommand): string | null {\n return this.isDisabled(command) && command.disabledReason ? this.reasonId(command) : null;\n }\n\n private runById(value: unknown): void {\n const command = this.flatItems().find((entry) => entry.command.id === value)?.command;\n if (!command || this.isDisabled(command)) {\n return;\n }\n void command.run();\n this.host?.dismiss();\n }\n}\n\n/** @internal Groups ranked results by their `group` key, preserving rank order. */\nfunction groupRanked(ranked: readonly RankedCommand[]): RenderGroup[] {\n const groups: RenderGroup[] = [];\n const index = new Map<string, RankedCommand[]>();\n for (const entry of ranked) {\n const key = entry.command.group ?? '';\n let bucket = index.get(key);\n if (!bucket) {\n bucket = [];\n index.set(key, bucket);\n groups.push({ id: `g-${key || 'ungrouped'}`, label: entry.command.group ?? null, items: bucket });\n }\n bucket.push(entry);\n }\n return groups;\n}\n\n/** @internal Maps consumer async command groups into render groups (score 0). */\nfunction toRenderGroups(source: readonly CommandGroup[]): RenderGroup[] {\n return source.map((group) => ({\n id: `a-${group.id}`,\n label: group.label,\n items: group.commands.map((command) => ({ command, score: 0 })),\n }));\n}\n\n/** @internal Length + id + per-command identity across groups. */\nfunction renderGroupsEqual(a: readonly RenderGroup[], b: readonly RenderGroup[]): boolean {\n if (a === b) {\n return true;\n }\n if (a.length !== b.length) {\n return false;\n }\n return a.every((group, i) => {\n const other = b[i];\n return group.id === other.id && group.label === other.label && rankedListEqual(group.items, other.items);\n });\n}\n\n/** @internal Length + per-command identity. */\nfunction rankedListEqual(a: readonly RankedCommand[], b: readonly RankedCommand[]): boolean {\n if (a === b) {\n return true;\n }\n if (a.length !== b.length) {\n return false;\n }\n return a.every((entry, i) => entry.command === b[i].command && entry.score === b[i].score);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n output,\n ViewEncapsulation,\n type TemplateRef,\n} from '@angular/core';\n\nimport type { CommandGroup } from '@cngx/common/command';\nimport { resolveAsyncView, type AsyncView } from '@cngx/common/data';\nimport type { CngxAsyncState } from '@cngx/core/utils';\n\nimport { injectCommandPaletteConfig } from '../config/command-palette-config';\nimport type {\n CngxCommandPaletteEmptyContext,\n CngxCommandPaletteErrorContext,\n CngxCommandPaletteLoadingContext,\n} from '../slots/command-slots';\n\n/**\n * @internal\n * Async-state view switch that wraps {@link CngxCommandPanel}. Maps the\n * consumer's `CngxAsyncState<CommandGroup[]>` through `resolveAsyncView()` to\n * the six-state enum and renders the matching state: `skeleton` on first load,\n * `empty` on an empty success, `error` on a first-load failure, and the\n * projected panel for `content` / `content+error` / `none`. `content+error`\n * keeps the stale results visible while a re-query on the next keystroke errors.\n *\n * Each state resolves its slot template (instance > config > built-in default),\n * passed down from the palette. With no `[results]` bound (static registry\n * only) the view is always `content`, so the panel renders unconditionally.\n */\n@Component({\n selector: 'cngx-command-panel-shell',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NgTemplateOutlet],\n template: `\n @switch (view()) {\n @case ('skeleton') {\n @if (loadingTpl(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{}\" />\n } @else {\n <div class=\"cngx-command-state\" aria-busy=\"true\">{{ config.loadingLabel }}</div>\n }\n }\n @case ('empty') {\n @if (emptyTpl(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ term: term() }\" />\n } @else {\n <div class=\"cngx-command-state cngx-command-state--empty\">{{ config.emptyLabel }}</div>\n }\n }\n @case ('error') {\n @if (errorTpl(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ error: errorValue(), retry: emitRetry }\"\n />\n } @else {\n <div class=\"cngx-command-state cngx-command-state--error\" role=\"alert\">\n <span>{{ config.errorLabel }}</span>\n <button type=\"button\" class=\"cngx-command-retry\" (click)=\"retry.emit()\">\n {{ config.retryLabel }}\n </button>\n </div>\n }\n }\n @default {\n @if (view() === 'content+error') {\n <div class=\"cngx-command-state--error-banner\" role=\"alert\">{{ config.errorLabel }}</div>\n }\n <ng-content />\n }\n }\n `,\n})\nexport class CngxCommandPanelShell {\n /** Consumer-derived async result state driving the view switch. */\n readonly results = input<CngxAsyncState<CommandGroup[]> | undefined>(undefined);\n\n /** Current term, mirrored from the panel - the empty slot's context. */\n readonly term = input<string>('');\n\n /** Resolved slot templates (instance > config > null). Built-in default when null. */\n readonly emptyTpl = input<TemplateRef<CngxCommandPaletteEmptyContext> | null>(null);\n readonly loadingTpl = input<TemplateRef<CngxCommandPaletteLoadingContext> | null>(null);\n readonly errorTpl = input<TemplateRef<CngxCommandPaletteErrorContext> | null>(null);\n\n /** Fired when the user clicks Retry in the error state. */\n readonly retry = output<void>();\n\n protected readonly config = injectCommandPaletteConfig();\n\n /** The resolved view. `content` when no async source is bound. */\n protected readonly view = computed<AsyncView>(() => {\n const state = this.results();\n if (!state) {\n return 'content';\n }\n return resolveAsyncView(state.status(), state.isFirstLoad(), state.isEmpty());\n });\n\n protected readonly errorValue = computed<unknown>(() => this.results()?.error());\n\n /** Stable bound callback for the error slot's `retry`. */\n protected readonly emitRetry = (): void => this.retry.emit();\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\nimport type { CommandGroup, RankedCommand } from '@cngx/common/command';\n\n/**\n * Context for the {@link CngxCommandRow} slot. Region granularity: the whole\n * row is one slot, so the consumer lays out icon / label / shortcut-hint\n * inside its own template. `data` is the command's opaque payload, narrowed at\n * the use-site; `active` reflects the current `aria-activedescendant`.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport interface CngxCommandRowContext {\n readonly $implicit: RankedCommand;\n readonly term: string;\n readonly data: unknown;\n readonly active: boolean;\n}\n\n/** Context for the {@link CngxCommandGroupHeader} slot. Recents is a group. */\nexport interface CngxCommandGroupHeaderContext {\n readonly $implicit: CommandGroup;\n}\n\n/** Context for the {@link CngxCommandPaletteEmpty} slot. */\nexport interface CngxCommandPaletteEmptyContext {\n readonly term: string;\n}\n\n/** Context for the {@link CngxCommandPaletteLoading} slot. */\nexport type CngxCommandPaletteLoadingContext = Record<string, never>;\n\n/** Context for the {@link CngxCommandPaletteError} slot. */\nexport interface CngxCommandPaletteErrorContext {\n readonly error: unknown;\n readonly retry: () => void;\n}\n\n/** Context for the {@link CngxCommandPaletteFooter} slot. */\nexport type CngxCommandPaletteFooterContext = Record<string, never>;\n\n/**\n * Overrides the default command row. Project as content of\n * `<cngx-command-palette>`:\n *\n * ```html\n * <cngx-command-palette>\n * <ng-template cngxCommandRow let-entry let-active=\"active\">\n * <my-icon [name]=\"entry.command.icon\" />\n * <span>{{ entry.command.label }}</span>\n * </ng-template>\n * </cngx-command-palette>\n * ```\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\n@Directive({ selector: '[cngxCommandRow]', standalone: true })\nexport class CngxCommandRow {\n readonly templateRef = inject<TemplateRef<CngxCommandRowContext>>(TemplateRef);\n static ngTemplateContextGuard(_dir: CngxCommandRow, ctx: unknown): ctx is CngxCommandRowContext {\n return true;\n }\n}\n\n/**\n * Overrides the default group header.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\n@Directive({ selector: '[cngxCommandGroupHeader]', standalone: true })\nexport class CngxCommandGroupHeader {\n readonly templateRef = inject<TemplateRef<CngxCommandGroupHeaderContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _dir: CngxCommandGroupHeader,\n ctx: unknown,\n ): ctx is CngxCommandGroupHeaderContext {\n return true;\n }\n}\n\n/**\n * Overrides the default empty state.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\n@Directive({ selector: '[cngxCommandPaletteEmpty]', standalone: true })\nexport class CngxCommandPaletteEmpty {\n readonly templateRef = inject<TemplateRef<CngxCommandPaletteEmptyContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _dir: CngxCommandPaletteEmpty,\n ctx: unknown,\n ): ctx is CngxCommandPaletteEmptyContext {\n return true;\n }\n}\n\n/**\n * Overrides the default first-load skeleton.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\n@Directive({ selector: '[cngxCommandPaletteLoading]', standalone: true })\nexport class CngxCommandPaletteLoading {\n readonly templateRef = inject<TemplateRef<CngxCommandPaletteLoadingContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _dir: CngxCommandPaletteLoading,\n ctx: unknown,\n ): ctx is CngxCommandPaletteLoadingContext {\n return true;\n }\n}\n\n/**\n * Overrides the default error state. Wire `retry` to your reload path.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\n@Directive({ selector: '[cngxCommandPaletteError]', standalone: true })\nexport class CngxCommandPaletteError {\n readonly templateRef = inject<TemplateRef<CngxCommandPaletteErrorContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _dir: CngxCommandPaletteError,\n ctx: unknown,\n ): ctx is CngxCommandPaletteErrorContext {\n return true;\n }\n}\n\n/**\n * Overrides the default keyboard-legend footer.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\n@Directive({ selector: '[cngxCommandPaletteFooter]', standalone: true })\nexport class CngxCommandPaletteFooter {\n readonly templateRef = inject<TemplateRef<CngxCommandPaletteFooterContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _dir: CngxCommandPaletteFooter,\n ctx: unknown,\n ): ctx is CngxCommandPaletteFooterContext {\n return true;\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { matchesKeyCombo, type KeyCombo } from '@cngx/core/utils';\n\n/**\n * Handle returned by a palette keybinding: a teardown that removes the document\n * listener. The palette recreates the keybinding whenever the resolved combo\n * changes and tears the previous one down, so nothing leaks document-wide.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport interface CngxPaletteKeybinding {\n /** Removes the installed document keydown listener. */\n teardown(): void;\n}\n\n/**\n * Factory producing a {@link CngxPaletteKeybinding} for a combo. It installs a\n * global listener that invokes `onOpen` whenever the combo is pressed. Captured\n * as a type alias so an override matches the exact signature - a consumer can\n * swap in an enterprise key-capture policy without touching the palette.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport type CngxPaletteKeybindingFactory = (\n combo: KeyCombo,\n onOpen: () => void,\n) => CngxPaletteKeybinding;\n\n/**\n * Default palette keybinding: installs a document keydown listener that calls\n * `onOpen` whenever the combo is pressed (matched via `matchesKeyCombo`).\n * Side-effectful by design - it owns the global listener - so its `teardown`\n * must be called on destroy.\n *\n * `isMac` defaults to platform detection; pass it explicitly for deterministic\n * tests.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport function createPaletteKeybinding(\n combo: KeyCombo,\n onOpen: () => void,\n isMac: boolean = detectMac(),\n): CngxPaletteKeybinding {\n const handler = (event: KeyboardEvent): void => {\n if (matchesKeyCombo(event, combo, isMac)) {\n event.preventDefault();\n onOpen();\n }\n };\n document.addEventListener('keydown', handler);\n return { teardown: () => document.removeEventListener('keydown', handler) };\n}\n\n/**\n * Swappable open-trigger seam. Defaults to {@link createPaletteKeybinding}.\n * Override it to install an enterprise key-capture policy without touching the\n * palette. To only change the *combo*, prefer `withPaletteShortcut(...)` or the\n * `[openShortcut]` input - this token is for replacing the whole listener.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport const CNGX_PALETTE_KEYBINDING_FACTORY = new InjectionToken<CngxPaletteKeybindingFactory>(\n 'CNGX_PALETTE_KEYBINDING_FACTORY',\n { providedIn: 'root', factory: () => createPaletteKeybinding },\n);\n\n/** @internal Best-effort macOS detection; overridable via the `isMac` argument. */\nfunction detectMac(): boolean {\n return typeof navigator !== 'undefined' && /mac/i.test(navigator.platform);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n ViewEncapsulation,\n type Signal,\n} from '@angular/core';\n\nimport type { CommandGroup } from '@cngx/common/command';\nimport { CngxDialog } from '@cngx/common/dialog';\nimport { parseKeyCombo, type CngxAsyncState } from '@cngx/core/utils';\n\nimport { injectCommandPaletteConfig } from '../config/command-palette-config';\nimport { CngxCommandPanel } from '../panel/command-panel.component';\nimport { CngxCommandPanelShell } from '../panel/command-panel-shell.component';\nimport { CNGX_COMMAND_PALETTE_HOST, type CngxCommandPaletteHost } from '../panel/panel-host.token';\nimport {\n CngxCommandGroupHeader,\n CngxCommandPaletteEmpty,\n CngxCommandPaletteError,\n CngxCommandPaletteFooter,\n CngxCommandPaletteLoading,\n CngxCommandRow,\n} from '../slots/command-slots';\nimport { CNGX_PALETTE_KEYBINDING_FACTORY } from './palette-keybinding';\n\n/**\n * The opinionated Cmd/Ctrl+K command palette preset. Renders the panel body +\n * async-state shell inside a native modal `<dialog cngxDialog>`, so focus\n * trapping, trigger storage at open, and focus restore after the close\n * transition are handled by `CngxDialog` and the platform - no hand-rolled\n * focus machinery. The palette provides `CNGX_COMMAND_PALETTE_HOST` so the\n * panel can dismiss it when a command runs.\n *\n * Type-to-filter runs over the merged command registry (`injectCommands`) plus\n * the consumer's async `[results]`; the palette commits no form value - it\n * fires `command.run()`, the locked demarcation from `CngxCombobox`. The global\n * Cmd/Ctrl+K open combo is wired by the keybinding factory, not here.\n *\n * ```html\n * <cngx-command-palette #palette [results]=\"results()\" />\n * <button [cngxCommandPaletteTrigger]=\"palette\">Search commands</button>\n * ```\n *\n * @category ui/command-palette\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/command-palette/palette/command-palette.component.ts\n * @selector cngx-command-palette\n * @since 0.1.0\n * @relatedTo CngxCommandPaletteTrigger, provideCommands, CngxDialog\n */\n@Component({\n selector: 'cngx-command-palette',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxDialog, CngxCommandPanelShell, CngxCommandPanel, NgTemplateOutlet],\n providers: [{ provide: CNGX_COMMAND_PALETTE_HOST, useExisting: CngxCommandPalette }],\n styleUrl: './command-palette.component.css',\n template: `\n <dialog\n cngxDialog\n #dialog=\"cngxDialog\"\n class=\"cngx-command-palette\"\n [attr.aria-label]=\"ariaLabel()\"\n >\n <cngx-command-panel-shell\n [results]=\"results()\"\n [term]=\"term()\"\n [emptyTpl]=\"emptyTpl()\"\n [loadingTpl]=\"loadingTpl()\"\n [errorTpl]=\"errorTpl()\"\n (retry)=\"retry.emit()\"\n >\n <cngx-command-panel\n [results]=\"results()\"\n [(scope)]=\"scope\"\n [debounceMs]=\"debounceMs()\"\n [rowTpl]=\"rowTpl()\"\n [groupHeaderTpl]=\"groupHeaderTpl()\"\n (termChange)=\"term.set($event)\"\n />\n </cngx-command-panel-shell>\n <footer class=\"cngx-command-footer\">\n @if (footerTpl(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{}\" />\n } @else {\n @for (entry of config.footerLegend; track entry.label) {\n <span class=\"cngx-command-legend\"><kbd>{{ entry.keys }}</kbd> {{ entry.label }}</span>\n }\n }\n </footer>\n </dialog>\n `,\n})\nexport class CngxCommandPalette implements CngxCommandPaletteHost {\n /** Consumer-derived async result source. */\n readonly results = input<CngxAsyncState<CommandGroup[]> | undefined>(undefined);\n\n /** Two-way scope; feeds the matcher's scope filter and the panel chip. */\n readonly scope = model<string | undefined>(undefined);\n\n /** Debounce for the search input. */\n readonly debounceMs = input<number>(150);\n\n /** Accessible name for the dialog. */\n readonly ariaLabel = input<string>('Command palette');\n\n /**\n * Per-instance open combo (parsed via `parseKeyCombo`, e.g. `'mod+shift+p'`).\n * Wins over `CNGX_COMMAND_PALETTE_CONFIG.openShortcut` (`withPaletteShortcut`),\n * which wins over the `'mod+k'` default. Changing it live re-installs the\n * listener. For a full listener swap, override `CNGX_PALETTE_KEYBINDING_FACTORY`.\n */\n readonly openShortcut = input<string | undefined>(undefined);\n\n /** Fired when the user asks to retry a failed result load. */\n readonly retry = output<void>();\n\n protected readonly config = injectCommandPaletteConfig();\n\n /** Mirror of the panel's debounced term, so the empty slot can read it. */\n protected readonly term = signal('');\n\n // Instance slot directives (content-projected). contentChild must be a direct\n // field initializer (AOT NG8110). Each resolves instance > config > null.\n private readonly rowSlot = contentChild(CngxCommandRow);\n private readonly groupHeaderSlot = contentChild(CngxCommandGroupHeader);\n private readonly emptySlot = contentChild(CngxCommandPaletteEmpty);\n private readonly loadingSlot = contentChild(CngxCommandPaletteLoading);\n private readonly errorSlot = contentChild(CngxCommandPaletteError);\n private readonly footerSlot = contentChild(CngxCommandPaletteFooter);\n\n protected readonly rowTpl = computed(\n () => this.rowSlot()?.templateRef ?? this.config.templates?.row ?? null,\n );\n protected readonly groupHeaderTpl = computed(\n () => this.groupHeaderSlot()?.templateRef ?? this.config.templates?.groupHeader ?? null,\n );\n protected readonly emptyTpl = computed(\n () => this.emptySlot()?.templateRef ?? this.config.templates?.empty ?? null,\n );\n protected readonly loadingTpl = computed(\n () => this.loadingSlot()?.templateRef ?? this.config.templates?.loading ?? null,\n );\n protected readonly errorTpl = computed(\n () => this.errorSlot()?.templateRef ?? this.config.templates?.error ?? null,\n );\n protected readonly footerTpl = computed(\n () => this.footerSlot()?.templateRef ?? this.config.templates?.footer ?? null,\n );\n\n private readonly dialog = viewChild(CngxDialog);\n\n /** Whether the palette is open. Part of the {@link CngxCommandPaletteHost} contract. */\n readonly isOpen: Signal<boolean> = computed(\n () => (this.dialog()?.lifecycle() ?? 'closed') !== 'closed',\n );\n\n /** Resolved open combo: instance input > config > `'mod+k'` default. */\n private readonly resolvedShortcut = computed(\n () => this.openShortcut() ?? this.config.openShortcut,\n );\n\n constructor() {\n // The swappable factory installs the global open combo and calls back to\n // open the palette. The effect re-installs the listener whenever the\n // resolved combo changes; onCleanup tears down the previous listener (and\n // the last one on destroy), so nothing leaks document-wide.\n const factory = inject(CNGX_PALETTE_KEYBINDING_FACTORY);\n effect((onCleanup) => {\n const keybinding = factory(parseKeyCombo(this.resolvedShortcut()), () => this.open());\n onCleanup(() => keybinding.teardown());\n });\n }\n\n /** Open the palette. */\n open(): void {\n this.dialog()?.open();\n }\n\n /** Dismiss the palette. Focus returns to the trigger via `CngxDialog`. */\n dismiss(): void {\n this.dialog()?.dismiss();\n }\n}\n","import { Directive, input } from '@angular/core';\n\nimport type { CngxCommandPalette } from './command-palette.component';\n\n/**\n * Optional explicit trigger for a {@link CngxCommandPalette}. Opens the palette\n * on click and advertises the popup relationship to assistive tech. Pass the\n * palette by template reference - orthogonal composition, no ancestor\n * injection.\n *\n * ```html\n * <button [cngxCommandPaletteTrigger]=\"palette\">\n * Search <kbd>Cmd K</kbd>\n * </button>\n * <cngx-command-palette #palette />\n * ```\n *\n * @category ui/command-palette\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/command-palette/palette/command-palette-trigger.directive.ts\n * @since 0.1.0\n * @relatedTo CngxCommandPalette\n */\n@Directive({\n selector: '[cngxCommandPaletteTrigger]',\n exportAs: 'cngxCommandPaletteTrigger',\n standalone: true,\n host: {\n '[attr.aria-haspopup]': '\"dialog\"',\n '(click)': 'open()',\n },\n})\nexport class CngxCommandPaletteTrigger {\n /** The palette this trigger opens. */\n readonly palette = input.required<CngxCommandPalette>({ alias: 'cngxCommandPaletteTrigger' });\n\n protected open(): void {\n this.palette().open();\n }\n}\n","/**\n * @module @cngx/ui/command-palette\n */\nexport { CngxCommandPalette } from './palette/command-palette.component';\nexport { CngxCommandPaletteTrigger } from './palette/command-palette-trigger.directive';\nexport {\n CNGX_COMMAND_PALETTE_HOST,\n type CngxCommandPaletteHost,\n} from './panel/panel-host.token';\nexport {\n CNGX_PALETTE_KEYBINDING_FACTORY,\n createPaletteKeybinding,\n type CngxPaletteKeybinding,\n type CngxPaletteKeybindingFactory,\n} from './palette/palette-keybinding';\nexport {\n CNGX_COMMAND_PALETTE_CONFIG,\n provideCommandPaletteConfig,\n provideCommandPaletteConfigAt,\n injectCommandPaletteConfig,\n withCommandPaletteLabels,\n withPaletteShortcut,\n withKeyboardLegend,\n withResultCountFormatter,\n withCommandPaletteTemplates,\n type CngxCommandPaletteConfig,\n type CngxCommandPaletteConfigFeature,\n type CngxCommandPaletteLegendEntry,\n type CngxCommandPaletteTemplates,\n} from './config/command-palette-config';\nexport {\n CngxCommandRow,\n CngxCommandGroupHeader,\n CngxCommandPaletteEmpty,\n CngxCommandPaletteLoading,\n CngxCommandPaletteError,\n CngxCommandPaletteFooter,\n type CngxCommandRowContext,\n type CngxCommandGroupHeaderContext,\n type CngxCommandPaletteEmptyContext,\n type CngxCommandPaletteLoadingContext,\n type CngxCommandPaletteErrorContext,\n type CngxCommandPaletteFooterContext,\n} from './slots/command-slots';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAyBA;AACO,MAAM,6BAA6B,GAA+B;AACvE,IAAA,YAAY,EAAE,OAAO;AACrB,IAAA,iBAAiB,EAAE,6BAA6B;AAChD,IAAA,YAAY,EAAE,UAAU;AACxB,IAAA,UAAU,EAAE,uBAAuB;AACnC,IAAA,YAAY,EAAE,qBAAqB;AACnC,IAAA,UAAU,EAAE,0BAA0B;AACtC,IAAA,UAAU,EAAE,OAAO;IACnB,WAAW,EAAE,CAAC,KAAK,MAAM,KAAK,KAAK,CAAC,GAAG,UAAU,GAAG,CAAA,EAAG,KAAK,UAAU,CAAC;AACvE,IAAA,YAAY,EAAE;AACZ,QAAA,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE;AACtC,QA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FAAzB,yBAAyB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,6BAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,2BAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,QAAA,EAAA,EAAA,UAAA,EAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,2BAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBATrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,6BAA6B;AACvC,oBAAA,QAAQ,EAAE,2BAA2B;AACrC,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACJ,wBAAA,sBAAsB,EAAE,UAAU;AAClC,wBAAA,SAAS,EAAE,QAAQ;AACpB,qBAAA;AACF,iBAAA;;;AC/BD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"cngx-ui-command-palette.mjs","sources":["../../../projects/ui/command-palette/i18n/command-palette-language-section.ts","../../../projects/ui/command-palette/i18n/command-palette-i18n.ts","../../../projects/ui/command-palette/panel/command-palette-defaults.ts","../../../projects/ui/command-palette/config/command-palette-config.ts","../../../projects/ui/command-palette/panel/panel-host.token.ts","../../../projects/ui/command-palette/panel/command-panel.component.ts","../../../projects/ui/command-palette/panel/command-panel-shell.component.ts","../../../projects/ui/command-palette/slots/command-slots.ts","../../../projects/ui/command-palette/palette/palette-keybinding.ts","../../../projects/ui/command-palette/palette/command-palette.component.ts","../../../projects/ui/command-palette/palette/command-palette-trigger.directive.ts","../../../projects/ui/command-palette/public-api.ts","../../../projects/ui/command-palette/cngx-ui-command-palette.ts"],"sourcesContent":["import type { CngxMessage } from '@cngx/core/i18n';\n\n/**\n * The command-palette section of a {@link CngxLanguagePack}: the copy of\n * `CngxCommandPalette` and its panel. It feeds the copy keys of\n * `CNGX_COMMAND_PALETTE_CONFIG`; a key set through `withCommandPaletteLabels`,\n * `withResultCountFormatter` or `withKeyboardLegend` still wins. Messages use\n * `{name}` placeholders, numbers are formatted for the locale.\n *\n * @category ui/command-palette/i18n\n * @since 0.1.0\n * @relatedTo CNGX_COMMAND_PALETTE_CONFIG, withCommandPaletteLabels\n */\nexport interface CngxCommandPaletteLanguageSection {\n /** Placeholder and accessible name of the search input. */\n readonly searchPlaceholder: string;\n /** Accessible name of the result listbox. */\n readonly listboxLabel: string;\n /** Shown when no command matches. */\n readonly emptyLabel: string;\n /** Shown while the commands load. */\n readonly loadingLabel: string;\n /** Shown when the commands failed to load. */\n readonly errorLabel: string;\n /** Label of the retry button after a failed load. */\n readonly retryLabel: string;\n /** Accessible name of the palette dialog. */\n readonly paletteLabel: string;\n /** `{count}`: the announced number of matching commands. */\n readonly resultCount: CngxMessage;\n /** Keys of the footer legend's navigate entry, as shown. Never spoken. */\n readonly navigateKeys: string;\n /** The navigate entry's keys in words, as screen readers hear them. */\n readonly navigateKeysSpoken: string;\n /** Label of the footer legend's navigate entry. */\n readonly navigateLabel: string;\n /** Keys of the footer legend's run entry. */\n readonly runKeys: string;\n /** Label of the footer legend's run entry. */\n readonly runLabel: string;\n /** Keys of the footer legend's close entry. */\n readonly closeKeys: string;\n /** Label of the footer legend's close entry. */\n readonly closeLabel: string;\n /** `{keys}`, `{label}`: what a screen reader hears for one footer legend entry. */\n readonly legendEntry: CngxMessage;\n}\n\n/**\n * The English command-palette section: the single source of the palette's\n * English copy. The `CNGX_COMMAND_PALETTE_CONFIG` copy keys default to it.\n *\n * @category ui/command-palette/i18n\n * @since 0.1.0\n * @relatedTo CNGX_COMMAND_PALETTE_CONFIG\n */\nexport const CNGX_COMMAND_PALETTE_LANGUAGE_EN: CngxCommandPaletteLanguageSection = {\n searchPlaceholder: 'Type a command or search…',\n listboxLabel: 'Commands',\n emptyLabel: 'No matching commands',\n loadingLabel: 'Loading commands…',\n errorLabel: 'Could not load commands',\n retryLabel: 'Retry',\n paletteLabel: 'Command palette',\n resultCount: { one: '{count} result', other: '{count} results' },\n navigateKeys: '↑ ↓',\n navigateKeysSpoken: 'Up and Down arrows',\n navigateLabel: 'Navigate',\n runKeys: 'Enter',\n runLabel: 'Run',\n closeKeys: 'Esc',\n closeLabel: 'Close',\n legendEntry: '{keys} {label}',\n};\n\ndeclare module '@cngx/core/i18n' {\n interface CngxLanguagePack {\n readonly commandPalette: CngxCommandPaletteLanguageSection;\n }\n}\n","import { inject, InjectionToken, type Signal } from '@angular/core';\n\nimport { createLanguageSection, createSectionBundle, formatMessage } from '@cngx/core/i18n';\n\nimport type { CngxCommandPaletteLegendEntry } from '../config/command-palette-config';\nimport {\n CNGX_COMMAND_PALETTE_LANGUAGE_EN,\n type CngxCommandPaletteLanguageSection,\n} from './command-palette-language-section';\n\n/**\n * The command-palette copy of one section and locale, in the shape of the\n * config copy keys.\n *\n * @internal\n */\nexport interface CngxCommandPaletteSiteCopy {\n readonly searchPlaceholder: string;\n readonly listboxLabel: string;\n readonly emptyLabel: string;\n readonly loadingLabel: string;\n readonly errorLabel: string;\n readonly retryLabel: string;\n readonly paletteLabel: string;\n readonly resultCount: (count: number) => string;\n readonly footerLegend: readonly CngxCommandPaletteLegendEntry[];\n readonly legendEntry: (keys: string, label: string) => string;\n}\n\n/** @internal Turns a command-palette section into the config copy for a locale. Pure. */\nexport function commandPaletteCopyFrom(\n section: CngxCommandPaletteLanguageSection,\n locale: string,\n): CngxCommandPaletteSiteCopy {\n return {\n searchPlaceholder: section.searchPlaceholder,\n listboxLabel: section.listboxLabel,\n emptyLabel: section.emptyLabel,\n loadingLabel: section.loadingLabel,\n errorLabel: section.errorLabel,\n retryLabel: section.retryLabel,\n paletteLabel: section.paletteLabel,\n resultCount: (count) => formatMessage(section.resultCount, { count }, locale),\n footerLegend: [\n {\n keys: section.navigateKeys,\n spokenKeys: section.navigateKeysSpoken,\n label: section.navigateLabel,\n },\n { keys: section.runKeys, label: section.runLabel },\n { keys: section.closeKeys, label: section.closeLabel },\n ],\n legendEntry: (keys, label) => formatMessage(section.legendEntry, { keys, label }, locale),\n };\n}\n\n/** @internal The command-palette section of the active pack over the English section. */\nconst injectCommandPaletteLanguage = createLanguageSection(\n 'commandPalette',\n CNGX_COMMAND_PALETTE_LANGUAGE_EN,\n);\n\n/** @internal Builds and reads the section copy, formatted for the reading locale. */\nconst commandPaletteBundle = createSectionBundle<\n CngxCommandPaletteLanguageSection,\n CngxCommandPaletteSiteCopy\n>({\n section: injectCommandPaletteLanguage,\n toBundle: commandPaletteCopyFrom,\n});\n\n/**\n * @internal The command-palette copy of the active pack, formatted for the app\n * locale. Private: consumers override copy through the config features.\n */\nconst COMMAND_PALETTE_SECTION_COPY = new InjectionToken<Signal<CngxCommandPaletteSiteCopy>>(\n 'CngxCommandPaletteSectionCopy',\n { providedIn: 'root', factory: () => commandPaletteBundle.build() },\n);\n\n/**\n * @internal The command-palette copy at the reading site: the active pack's\n * section formatted for the locale of the injector that reads it. Injection\n * context required.\n */\nexport function injectCommandPaletteSiteCopy(): Signal<CngxCommandPaletteSiteCopy> {\n return commandPaletteBundle.resolve(inject(COMMAND_PALETTE_SECTION_COPY));\n}\n","/**\n * @internal\n * Built-in non-copy defaults of the palette. Never exported from\n * `public-api.ts`. The copy defaults live in the `commandPalette` section of\n * the language pack (`CNGX_COMMAND_PALETTE_LANGUAGE_EN`).\n */\nexport interface CngxCommandPaletteDefaults {\n /** Combo string that opens the palette (parsed via `parseKeyCombo`). */\n readonly openShortcut: string;\n}\n\n/** @internal */\nexport const CNGX_COMMAND_PALETTE_DEFAULTS: CngxCommandPaletteDefaults = {\n openShortcut: 'mod+k',\n};\n","import {\n computed,\n inject,\n InjectionToken,\n isSignal,\n makeEnvironmentProviders,\n Optional,\n SkipSelf,\n type EnvironmentProviders,\n type Provider,\n type Signal,\n} from '@angular/core';\nimport { coerceSignal } from '@cngx/core/utils';\nimport { recordEqual } from '@cngx/utils';\n\nimport {\n injectCommandPaletteSiteCopy,\n type CngxCommandPaletteSiteCopy,\n} from '../i18n/command-palette-i18n';\nimport { CNGX_COMMAND_PALETTE_DEFAULTS } from '../panel/command-palette-defaults';\nimport type {\n CngxCommandGroupHeaderContext,\n CngxCommandPaletteEmptyContext,\n CngxCommandPaletteErrorContext,\n CngxCommandPaletteFooterContext,\n CngxCommandPaletteLoadingContext,\n CngxCommandRowContext,\n} from '../slots/command-slots';\nimport type { TemplateRef } from '@angular/core';\n\n/**\n * Global default template overrides, keyed by slot. Resolution order for any\n * fragment is instance `*cngxCommand*` slot > this map > the built-in default.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport interface CngxCommandPaletteTemplates {\n readonly row?: TemplateRef<CngxCommandRowContext>;\n readonly groupHeader?: TemplateRef<CngxCommandGroupHeaderContext>;\n readonly empty?: TemplateRef<CngxCommandPaletteEmptyContext>;\n readonly loading?: TemplateRef<CngxCommandPaletteLoadingContext>;\n readonly error?: TemplateRef<CngxCommandPaletteErrorContext>;\n readonly footer?: TemplateRef<CngxCommandPaletteFooterContext>;\n}\n\n/**\n * One keyboard-legend row in the palette footer: the key glyphs and what they\n * do. `keys` is shown, never spoken; screen readers hear `spokenKeys` (the key\n * names in words, e.g. `'Up and Down arrows'` for `'↑ ↓'`), else `keys`.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport interface CngxCommandPaletteLegendEntry {\n readonly keys: string;\n readonly label: string;\n readonly spokenKeys?: string;\n}\n\n/**\n * Configuration for the command palette. The copy keys hold overrides only:\n * unset by default, a value or a `Signal` once a `with*` feature ran. Every\n * copy key they leave out reads the `commandPalette` section of the language\n * pack (English without one), so the palette follows a runtime language\n * switch.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport interface CngxCommandPaletteConfig {\n /**\n * Combo string that opens the palette (parsed via `parseKeyCombo`, e.g.\n * `'mod+k'`, `'mod+shift+p'`). A per-instance `[openShortcut]` wins over this.\n */\n readonly openShortcut: string;\n /** Placeholder + accessible name for the search input. */\n readonly searchPlaceholder?: string | Signal<string>;\n /** Accessible label for the results listbox. */\n readonly listboxLabel?: string | Signal<string>;\n /** Empty-state copy (async source returned no results). */\n readonly emptyLabel?: string | Signal<string>;\n /** First-load skeleton copy. */\n readonly loadingLabel?: string | Signal<string>;\n /** Error-state copy. */\n readonly errorLabel?: string | Signal<string>;\n /** Retry-button copy in the error state. */\n readonly retryLabel?: string | Signal<string>;\n /** Accessible name of the palette dialog while its `[ariaLabel]` is unbound. */\n readonly paletteLabel?: string | Signal<string>;\n /** Builds the polite `aria-live` result-count message. */\n readonly resultCount?: ((count: number) => string) | Signal<(count: number) => string>;\n /** Keyboard-legend rows rendered in the footer. */\n readonly footerLegend?:\n | readonly CngxCommandPaletteLegendEntry[]\n | Signal<readonly CngxCommandPaletteLegendEntry[]>;\n /** Global default slot templates (config = strings, slots = structure). */\n readonly templates?: CngxCommandPaletteTemplates;\n}\n\n/**\n * A partial-config override produced by a `with*` helper.\n *\n * There is one config surface today, so this is a plain mutator - no\n * `_target` discriminator. If a second palette config surface ever lands and a\n * `provideCngxCommandPalette` aggregator is introduced, add the discriminator\n * then (the menu family's `_target` pattern), not preemptively.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport type CngxCommandPaletteConfigFeature = (\n config: CngxCommandPaletteConfig,\n) => CngxCommandPaletteConfig;\n\n/**\n * Library-default palette configuration. Carries no copy: the copy defaults\n * are the `commandPalette` section of the language pack.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport const DEFAULT_COMMAND_PALETTE_CONFIG: CngxCommandPaletteConfig = {\n openShortcut: CNGX_COMMAND_PALETTE_DEFAULTS.openShortcut,\n};\n\n/**\n * DI token carrying the resolved {@link CngxCommandPaletteConfig}. Defaults to\n * {@link DEFAULT_COMMAND_PALETTE_CONFIG} at root; override app-wide via\n * {@link provideCommandPaletteConfig} or per-scope via\n * {@link provideCommandPaletteConfigAt}.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport const CNGX_COMMAND_PALETTE_CONFIG = new InjectionToken<CngxCommandPaletteConfig>(\n 'CngxCommandPaletteConfig',\n { providedIn: 'root', factory: () => DEFAULT_COMMAND_PALETTE_CONFIG },\n);\n\n/** @internal */\nfunction applyFeatures(\n base: CngxCommandPaletteConfig,\n features: readonly CngxCommandPaletteConfigFeature[],\n): CngxCommandPaletteConfig {\n return features.reduce((config, feature) => feature(config), base);\n}\n\n/**\n * Provide a palette configuration at app root.\n *\n * ```ts\n * provideCommandPaletteConfig(\n * withCommandPaletteLabels({ emptyLabel: 'Keine Treffer.' }),\n * withKeyboardLegend([{ keys: 'enter', label: 'Ausführen' }]),\n * )\n * ```\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport function provideCommandPaletteConfig(\n ...features: CngxCommandPaletteConfigFeature[]\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: CNGX_COMMAND_PALETTE_CONFIG,\n useFactory: () => applyFeatures(DEFAULT_COMMAND_PALETTE_CONFIG, features),\n },\n ]);\n}\n\n/**\n * Component-scoped palette configuration override. Features merge on top of the\n * enclosing scope (root or a parent `viewProviders`).\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport function provideCommandPaletteConfigAt(\n ...features: CngxCommandPaletteConfigFeature[]\n): Provider[] {\n return [\n {\n provide: CNGX_COMMAND_PALETTE_CONFIG,\n useFactory: (parent: CngxCommandPaletteConfig | null) =>\n applyFeatures(parent ?? DEFAULT_COMMAND_PALETTE_CONFIG, features),\n deps: [[new SkipSelf(), new Optional(), CNGX_COMMAND_PALETTE_CONFIG]],\n },\n ];\n}\n\n/**\n * Resolves the {@link CngxCommandPaletteConfig} from the current injection\n * scope. Must run in an injection context.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport function injectCommandPaletteConfig(): CngxCommandPaletteConfig {\n return inject(CNGX_COMMAND_PALETTE_CONFIG);\n}\n\nconst valueOf = <T>(source: T | Signal<T>): T => (isSignal(source) ? source() : source);\n\n/**\n * @internal - the config with every copy key unwrapped to a plain value. Still\n * a {@link CngxCommandPaletteConfig}, so a reader keeps one config shape.\n */\nexport type CngxCommandPaletteResolvedConfig = CngxCommandPaletteConfig &\n CngxCommandPaletteSiteCopy;\n\nconst RESOLVED_COPY = new WeakMap<\n Signal<CngxCommandPaletteSiteCopy>,\n WeakMap<CngxCommandPaletteConfig, Signal<CngxCommandPaletteResolvedConfig>>\n>();\n\n/**\n * @internal - one Signal of the config's copy keys, each unwrapped, over the\n * `commandPalette` section of the active pack at the reading site's locale, so\n * a language switch reaches every reader. A key the config leaves unset reads\n * the section. Memoized per site copy and config object: every palette part\n * under one injector reads the same `computed()`. Injection context required;\n * read the result inside a `computed()`, a template or a handler.\n */\nexport function resolveCommandPaletteCopy(\n config: CngxCommandPaletteConfig,\n): Signal<CngxCommandPaletteResolvedConfig> {\n const site = injectCommandPaletteSiteCopy();\n let byConfig = RESOLVED_COPY.get(site);\n if (!byConfig) {\n byConfig = new WeakMap();\n RESOLVED_COPY.set(site, byConfig);\n }\n const cached = byConfig.get(config);\n if (cached) {\n return cached;\n }\n const copy = computed<CngxCommandPaletteResolvedConfig>(\n () => {\n const defaults = site();\n return {\n ...config,\n searchPlaceholder: valueOf(config.searchPlaceholder) ?? defaults.searchPlaceholder,\n listboxLabel: valueOf(config.listboxLabel) ?? defaults.listboxLabel,\n emptyLabel: valueOf(config.emptyLabel) ?? defaults.emptyLabel,\n loadingLabel: valueOf(config.loadingLabel) ?? defaults.loadingLabel,\n errorLabel: valueOf(config.errorLabel) ?? defaults.errorLabel,\n retryLabel: valueOf(config.retryLabel) ?? defaults.retryLabel,\n paletteLabel: valueOf(config.paletteLabel) ?? defaults.paletteLabel,\n resultCount: valueOf(config.resultCount) ?? defaults.resultCount,\n footerLegend: valueOf(config.footerLegend) ?? defaults.footerLegend,\n legendEntry: defaults.legendEntry,\n };\n },\n { equal: recordEqual },\n );\n byConfig.set(config, copy);\n return copy;\n}\n\n/**\n * The text-label keys {@link withCommandPaletteLabels} overrides.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport type CngxCommandPaletteLabelKey =\n | 'searchPlaceholder'\n | 'listboxLabel'\n | 'emptyLabel'\n | 'loadingLabel'\n | 'errorLabel'\n | 'retryLabel'\n | 'paletteLabel';\n\nconst LABEL_KEYS: readonly CngxCommandPaletteLabelKey[] = [\n 'searchPlaceholder',\n 'listboxLabel',\n 'emptyLabel',\n 'loadingLabel',\n 'errorLabel',\n 'retryLabel',\n 'paletteLabel',\n];\n\n/**\n * Override any subset of the palette's text labels. Unset labels keep the\n * inherited value. Pass a `Signal` of the overrides to switch the language at\n * runtime; a key the Signal sets wins over the inherited value, an unset key\n * follows it.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport function withCommandPaletteLabels(\n labels:\n | Partial<Pick<CngxCommandPaletteConfig, CngxCommandPaletteLabelKey>>\n | Signal<Partial<Record<CngxCommandPaletteLabelKey, string>>>,\n): CngxCommandPaletteConfigFeature {\n if (!isSignal(labels)) {\n return (config) => ({ ...config, ...labels });\n }\n return (config) => {\n const next: Record<string, unknown> = { ...config };\n for (const key of LABEL_KEYS) {\n const inherited = coerceSignal(config[key]);\n next[key] = computed(() => {\n const patch = labels();\n return key in patch ? patch[key] : inherited();\n });\n }\n return next as unknown as CngxCommandPaletteConfig;\n };\n}\n\n/**\n * Set the combo that opens the palette (parsed via `parseKeyCombo`, e.g.\n * `'mod+k'`, `'mod+shift+p'`). Applies app-wide via `provideCommandPaletteConfig`\n * or per-scope via `provideCommandPaletteConfigAt`. A per-instance\n * `[openShortcut]` input still wins over this.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport function withPaletteShortcut(combo: string): CngxCommandPaletteConfigFeature {\n return (config) => ({ ...config, openShortcut: combo });\n}\n\n/**\n * Replace the footer keyboard legend. Pass a `Signal` to switch the language at\n * runtime.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport function withKeyboardLegend(\n entries:\n | readonly CngxCommandPaletteLegendEntry[]\n | Signal<readonly CngxCommandPaletteLegendEntry[]>,\n): CngxCommandPaletteConfigFeature {\n return (config) => ({ ...config, footerLegend: entries });\n}\n\n/**\n * Replace the `aria-live` result-count formatter (e.g. for pluralisation in\n * another locale). Pass a `Signal` of the formatter to switch the language at\n * runtime; the live count speaks the new formatter on its next change.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport function withResultCountFormatter(\n formatter: ((count: number) => string) | Signal<(count: number) => string>,\n): CngxCommandPaletteConfigFeature {\n return (config) => ({ ...config, resultCount: formatter });\n}\n\n/**\n * Register global default slot templates. Merged over any already set; a\n * per-instance `*cngxCommand*` slot still wins over these.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport function withCommandPaletteTemplates(\n templates: CngxCommandPaletteTemplates,\n): CngxCommandPaletteConfigFeature {\n return (config) => ({\n ...config,\n templates: { ...config.templates, ...templates },\n });\n}\n","import { InjectionToken, type Signal } from '@angular/core';\n\n/**\n * Contract the palette surface exposes to its panel body. One token, single\n * surface today; the container-swap second token is the documented eject seam\n * if a second surface ever lands (tracked debt), not built for one consumer.\n *\n * Focus restore is intentionally NOT on this contract - the palette renders a\n * native modal `<dialog cngxDialog>`, so `showModal()` traps focus and\n * `CngxDialog` stores the trigger at open and returns focus after the close\n * transition settles. The panel only needs to know it is open and to ask the\n * surface to dismiss when a command runs.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport interface CngxCommandPaletteHost {\n /**\n * Whether the palette surface is currently open. Two documented consumers:\n * the panel resets its term and highlight when this flips to `false` (state\n * must not leak into the next open), and a composing consumer derives open\n * state from it instead of tracking its own flag -\n * `CngxCommandPaletteTrigger` binds its `aria-expanded` to the palette's\n * implementation of this member.\n */\n readonly isOpen: Signal<boolean>;\n /** Dismiss the surface (e.g. after a command runs). */\n dismiss(): void;\n}\n\n/**\n * DI token the panel injects (optional) to reach its hosting palette surface.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport const CNGX_COMMAND_PALETTE_HOST = new InjectionToken<CngxCommandPaletteHost>(\n 'CNGX_COMMAND_PALETTE_HOST',\n);\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n effect,\n inject,\n input,\n model,\n signal,\n untracked,\n viewChild,\n ViewEncapsulation,\n type Signal,\n type TemplateRef,\n} from '@angular/core';\nimport { outputToObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport {\n CNGX_COMMAND_MATCH_FACTORY,\n injectCommands,\n type CngxCommand,\n type CngxCommandGroup,\n type CngxRankedCommand,\n} from '@cngx/common/command';\nimport { CngxListbox, CngxOption, CngxSearch } from '@cngx/common/interactive';\nimport { CngxHighlight } from '@cngx/common/layout';\nimport { nextUid, type CngxAsyncState } from '@cngx/core/utils';\n\nimport {\n injectCommandPaletteConfig,\n resolveCommandPaletteCopy,\n} from '../config/command-palette-config';\nimport type {\n CngxCommandGroupHeaderContext,\n CngxCommandPaletteEmptyContext,\n CngxCommandRowContext,\n} from '../slots/command-slots';\nimport { CNGX_COMMAND_PALETTE_HOST } from './panel-host.token';\n\n/**\n * One rendered result group: a header label (null for the ungrouped bucket)\n * plus its ranked commands, in render order. `id` is a panel-unique DOM id\n * minted by the panel (never a raw user string); `slot` is the stable\n * `CngxCommandGroup` handed to the group-header slot template.\n * @internal\n */\ninterface RenderGroup {\n readonly id: string;\n readonly label: string | null;\n readonly items: readonly CngxRankedCommand[];\n readonly slot: CngxCommandGroup;\n}\n\n/**\n * A result group before the panel mints its DOM id: `key` is a namespaced\n * dedupe key (`s:` static registry bucket, `a:` async consumer group), so a\n * static group literally labelled \"ungrouped\" can never collide with the\n * unlabelled bucket, and async ids can never collide with static labels.\n * `slotId` is the consumer-meaningful id echoed into the header slot context.\n * @internal\n */\ninterface RawRenderGroup {\n readonly key: string;\n readonly slotId: string;\n readonly label: string | null;\n readonly items: readonly CngxRankedCommand[];\n}\n\n/**\n * @internal\n * The command-palette result body: a `role=combobox` search input driving a\n * `role=listbox` of ranked commands with `aria-activedescendant`, grouped\n * results, match highlighting, a bound scope chip, and a polite result-count\n * live region. Composes existing atoms - `CngxSearch` (debounced term),\n * `CngxListbox` + `CngxOption` (navigation over the ranked list in final DOM\n * order via the listbox's own `CngxActiveDescendant`), `CngxHighlight` (match\n * marking) - with no reinvented debounce, navigation, or ranking engine.\n *\n * The ranked list is a `computed()` over the `equal`-guarded registry, the\n * swappable matcher, `term`, `scope`, and the consumer's async result source;\n * the per-option `matchFn` never runs, so there is no double-filter.\n */\n@Component({\n selector: 'cngx-command-panel',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxSearch, CngxListbox, CngxOption, CngxHighlight, NgTemplateOutlet],\n styleUrl: './command-panel.component.css',\n host: { class: 'cngx-command-panel' },\n template: `\n <div class=\"cngx-command-panel-input-row\">\n @if (scope(); as activeScope) {\n <span class=\"cngx-command-scope-chip\">{{ activeScope }}</span>\n }\n <input\n cngxSearch\n class=\"cngx-command-panel-input\"\n type=\"text\"\n role=\"combobox\"\n autocomplete=\"off\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"true\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"lb.ad.activeId()\"\n [attr.aria-label]=\"copy().searchPlaceholder\"\n [placeholder]=\"copy().searchPlaceholder\"\n [debounceMs]=\"debounceMs()\"\n (searchChange)=\"onTerm($event, lb)\"\n (keydown)=\"onKeydown($event, lb)\"\n />\n </div>\n\n <div\n cngxListbox\n #lb=\"cngxListbox\"\n [id]=\"listboxId\"\n class=\"cngx-command-panel-listbox\"\n [label]=\"copy().listboxLabel\"\n [autoHighlightFirst]=\"true\"\n [externalActivation]=\"true\"\n >\n @for (group of groups(); track group.id) {\n <div role=\"group\" [attr.aria-labelledby]=\"group.label ? group.id + '-h' : null\">\n @if (group.label; as header) {\n <div class=\"cngx-command-group-header\" [id]=\"group.id + '-h'\">\n @if (groupHeaderTpl(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ $implicit: group.slot }\"\n />\n } @else {\n {{ header }}\n }\n </div>\n }\n @for (entry of group.items; track entry.command.id) {\n <div\n cngxOption\n class=\"cngx-command-row\"\n [value]=\"entry.command.id\"\n [label]=\"entry.command.label\"\n [disabled]=\"isDisabled(entry.command)\"\n [attr.aria-describedby]=\"describedBy(entry.command)\"\n >\n @if (rowTpl(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: entry,\n term: term(),\n data: entry.command.data,\n active: lb.ad.activeValue() === entry.command.id,\n }\"\n />\n } @else {\n <span class=\"cngx-command-row-label\" [cngxHighlight]=\"term()\">{{\n entry.command.label\n }}</span>\n }\n @if (entry.command.disabledReason; as reason) {\n <!-- Target stays in the DOM whenever a reason exists; only the\n aria-describedby reference (describedBy) is gated on disabled\n state, so no referenced node ever appears/disappears mid-interaction. -->\n <span class=\"cngx-sr-only\" [id]=\"reasonId(entry.command)\">{{ reason }}</span>\n }\n </div>\n }\n </div>\n }\n </div>\n\n @if (resultCount() === 0) {\n @if (emptyTpl(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{ term: term() }\" />\n } @else {\n <div class=\"cngx-command-state cngx-command-state--empty\">{{ copy().emptyLabel }}</div>\n }\n }\n\n <span class=\"cngx-sr-only\" aria-live=\"polite\">{{ countMessage() }}</span>\n `,\n})\nexport class CngxCommandPanel {\n /** Consumer-derived async result source, merged in with the static registry. */\n readonly results = input<CngxAsyncState<CngxCommandGroup[]> | undefined>(undefined);\n\n /** Persistent scope; feeds the matcher's scope filter and renders as a chip. */\n readonly scope = model<string | undefined>(undefined);\n\n /** Debounce for the search input (proxied to `CngxSearch`). */\n readonly debounceMs = input<number>(150);\n\n /** Resolved row slot template (instance > config > null). Built-in default when null. */\n readonly rowTpl = input<TemplateRef<CngxCommandRowContext> | null>(null);\n /** Resolved group-header slot template. Built-in default when null. */\n readonly groupHeaderTpl = input<TemplateRef<CngxCommandGroupHeaderContext> | null>(null);\n /**\n * Resolved empty slot template. Rendered by the panel itself (below the\n * listbox, input stays mounted) whenever the result count is zero - this\n * covers both the static-registry mode, where the shell has no async state\n * to switch on, and an empty async success.\n */\n readonly emptyTpl = input<TemplateRef<CngxCommandPaletteEmptyContext> | null>(null);\n\n protected readonly copy = resolveCommandPaletteCopy(injectCommandPaletteConfig());\n protected readonly listboxId = nextUid('cngx-command-listbox');\n\n private readonly commands = injectCommands();\n private readonly matcher = inject(CNGX_COMMAND_MATCH_FACTORY)();\n private readonly host = inject(CNGX_COMMAND_PALETTE_HOST, { optional: true });\n private readonly destroyRef = inject(DestroyRef);\n private readonly listbox = viewChild(CngxListbox);\n private readonly search = viewChild(CngxSearch);\n\n private readonly termState = signal('');\n /** Current debounced search term. Exposed for the consumer's result derivation. */\n readonly term: Signal<string> = this.termState.asReadonly();\n\n /** Stable dedupe-key to DOM-id map behind {@link domGroupId}. */\n private readonly groupDomIds = new Map<string, string>();\n /** Stable command-id to reason-DOM-id map behind {@link reasonId}. */\n private readonly reasonDomIds = new Map<string, string>();\n\n /** Grouped, ranked results: consumer async groups first, then the ranked registry. */\n protected readonly groups = computed<readonly RenderGroup[]>(\n () => {\n const ranked = this.matcher(this.commands(), this.term(), this.scope());\n const asyncState = this.results();\n const asyncGroups = asyncState ? toRawGroups(asyncState.data() ?? []) : [];\n const raws = [...asyncGroups, ...groupRanked(ranked)];\n this.pruneDomIds(raws);\n return raws.map((raw) => ({\n id: this.domGroupId(raw.key),\n label: raw.label,\n items: raw.items,\n slot: {\n id: raw.slotId,\n label: raw.label ?? '',\n commands: raw.items.map((entry) => entry.command),\n },\n }));\n },\n { equal: renderGroupsEqual },\n );\n\n /**\n * Drop id-map entries whose group key / command id left the result set, so\n * the memoized maps stay bounded when a long-lived palette streams rotating\n * async group ids. Ids remain stable while their key is present; a key that\n * leaves and returns simply gets a fresh id.\n */\n private pruneDomIds(raws: readonly RawRenderGroup[]): void {\n const groupKeys = new Set(raws.map((raw) => raw.key));\n for (const key of this.groupDomIds.keys()) {\n if (!groupKeys.has(key)) {\n this.groupDomIds.delete(key);\n }\n }\n const commandIds = new Set(\n raws.flatMap((raw) => raw.items.map((entry) => entry.command.id)),\n );\n for (const key of this.reasonDomIds.keys()) {\n if (!commandIds.has(key)) {\n this.reasonDomIds.delete(key);\n }\n }\n }\n\n /** Flat ranked list in render order, for count + command lookup. */\n private readonly flatItems = computed<readonly CngxRankedCommand[]>(\n () => this.groups().flatMap((group) => group.items),\n { equal: rankedListEqual },\n );\n\n /** Number of results across every group. Exposed for the consumer. */\n readonly resultCount = computed<number>(() => this.flatItems().length);\n\n /**\n * @internal - polite live-region text. The count is the only tracked source; the\n * formatter is read and called untracked, so a language switch never re-speaks\n * the shown count and the next count change speaks the new language.\n */\n protected readonly countMessage = computed<string>(() => {\n const count = this.resultCount();\n return untracked(() => this.copy().resultCount(count));\n });\n\n /** The command id the user last saw highlighted; `null` after a term reset. */\n private lastHighlightedId: string | null = null;\n /** The AD item registry the highlight bookkeeping last saw (identity). */\n private lastRegistry: unknown = null;\n\n constructor() {\n // Click on an option routes through the listbox's active-descendant, which\n // emits `activated`; Enter forwards through the same `activateCurrent` path.\n // One subscription runs the matching command for both. externalActivation\n // stops the listbox writing its own value on activation.\n afterNextRender(() => {\n const lb = this.listbox();\n if (lb) {\n outputToObservable(lb.ad.activated)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((value) => this.runById(value));\n }\n });\n // Async groups PREPEND above the static results, and the highlight is\n // index-based - a prepend would silently move it onto a different command.\n // Re-resolve by VALUE whenever the AD item registry changes (the registry,\n // not the data list: options only register during change detection, and\n // the index goes stale exactly when the registry re-orders) so Enter runs\n // the item the user saw; when that item left the result set, reset so\n // autoHighlightFirst re-fires on the fresh list.\n effect(() => {\n const lb = this.listbox();\n if (!lb) {\n return;\n }\n const registry = lb.ad.resolvedItems();\n // Tracked so navigation keeps the bookkeeping current between registry changes.\n const active = lb.ad.activeValue();\n untracked(() => {\n const wanted = this.lastHighlightedId;\n const registryChanged = registry !== this.lastRegistry;\n if (registryChanged && wanted !== null && active !== wanted) {\n if (registry.some((item) => item.value === wanted)) {\n lb.ad.highlightByValue(wanted);\n } else {\n lb.ad.resetHighlight();\n }\n }\n this.lastRegistry = registry;\n const current = lb.ad.activeValue();\n this.lastHighlightedId = typeof current === 'string' ? current : null;\n });\n });\n // The palette dialog keeps its content mounted across close, so term and\n // highlight would leak into the next open. Reset when the host closes;\n // clear() feeds searchChange, which routes through onTerm.\n effect(() => {\n const open = this.host?.isOpen() ?? true;\n if (!open) {\n untracked(() => this.search()?.clear());\n }\n });\n }\n\n protected onTerm(term: string, lb: CngxListbox): void {\n this.termState.set(term);\n // Reset the highlight so autoHighlightFirst re-fires the top result after a\n // re-rank shrinks the list below the previously active index. The value\n // bookkeeping resets too - a new term means the old highlight is void.\n this.lastHighlightedId = null;\n lb.ad.resetHighlight();\n }\n\n /** Panel-unique DOM id for a group dedupe key. Stable per key for the panel's lifetime. */\n private domGroupId(key: string): string {\n let id = this.groupDomIds.get(key);\n if (!id) {\n id = `${this.listboxId}-g${this.groupDomIds.size}`;\n this.groupDomIds.set(key, id);\n }\n return id;\n }\n\n protected onKeydown(event: KeyboardEvent, lb: CngxListbox): void {\n // Never hijack browser/app shortcuts: modified combos pass through\n // untouched - the same guard the nav strategies apply. Without it,\n // Ctrl+ArrowDown in the input would navigate and swallow the event.\n if (event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n const ad = lb.ad;\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n ad.highlightNext();\n return;\n case 'ArrowUp':\n event.preventDefault();\n ad.highlightPrev();\n return;\n case 'Home':\n event.preventDefault();\n ad.highlightFirst();\n return;\n case 'End':\n event.preventDefault();\n ad.highlightLast();\n return;\n case 'Enter':\n if (ad.activeItem()) {\n event.preventDefault();\n ad.activateCurrent();\n }\n return;\n }\n // Space, printable characters, and Backspace fall through to the input so\n // the search term picks them up.\n }\n\n protected isDisabled(command: CngxCommand): boolean {\n return command.disabled?.() ?? false;\n }\n\n protected reasonId(command: CngxCommand): string {\n // Minted, never derived from the raw command id - user strings can carry\n // characters that break DOM ids and aria-describedby references.\n let id = this.reasonDomIds.get(command.id);\n if (!id) {\n id = `${this.listboxId}-reason-${this.reasonDomIds.size}`;\n this.reasonDomIds.set(command.id, id);\n }\n return id;\n }\n\n protected describedBy(command: CngxCommand): string | null {\n return this.isDisabled(command) && command.disabledReason ? this.reasonId(command) : null;\n }\n\n private runById(value: unknown): void {\n const command = this.flatItems().find((entry) => entry.command.id === value)?.command;\n if (!command || this.isDisabled(command)) {\n return;\n }\n void command.run();\n this.host?.dismiss();\n }\n}\n\n/** @internal Groups ranked results by their `group` key, preserving rank order. */\nfunction groupRanked(ranked: readonly CngxRankedCommand[]): RawRenderGroup[] {\n const groups: RawRenderGroup[] = [];\n const index = new Map<string, CngxRankedCommand[]>();\n for (const entry of ranked) {\n const key = entry.command.group ?? '';\n let bucket = index.get(key);\n if (!bucket) {\n bucket = [];\n index.set(key, bucket);\n groups.push({\n key: `s:${key}`,\n slotId: key,\n label: entry.command.group ?? null,\n items: bucket,\n });\n }\n bucket.push(entry);\n }\n return groups;\n}\n\n/** @internal Maps consumer async command groups into raw render groups (score 0). */\nfunction toRawGroups(source: readonly CngxCommandGroup[]): RawRenderGroup[] {\n return source.map((group) => ({\n key: `a:${group.id}`,\n slotId: group.id,\n label: group.label,\n items: group.commands.map((command) => ({ command, score: 0 })),\n }));\n}\n\n/** @internal Length + id + per-command identity across groups. */\nfunction renderGroupsEqual(a: readonly RenderGroup[], b: readonly RenderGroup[]): boolean {\n if (a === b) {\n return true;\n }\n if (a.length !== b.length) {\n return false;\n }\n return a.every((group, i) => {\n const other = b[i];\n return group.id === other.id && group.label === other.label && rankedListEqual(group.items, other.items);\n });\n}\n\n/** @internal Length + per-command identity. */\nfunction rankedListEqual(a: readonly CngxRankedCommand[], b: readonly CngxRankedCommand[]): boolean {\n if (a === b) {\n return true;\n }\n if (a.length !== b.length) {\n return false;\n }\n return a.every((entry, i) => entry.command === b[i].command && entry.score === b[i].score);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n output,\n untracked,\n ViewEncapsulation,\n type TemplateRef,\n} from '@angular/core';\n\nimport type { CngxCommandGroup } from '@cngx/common/command';\nimport { resolveAsyncView, type AsyncView } from '@cngx/common/data';\nimport type { CngxAsyncState } from '@cngx/core/utils';\n\nimport {\n injectCommandPaletteConfig,\n resolveCommandPaletteCopy,\n} from '../config/command-palette-config';\nimport type {\n CngxCommandPaletteErrorContext,\n CngxCommandPaletteLoadingContext,\n} from '../slots/command-slots';\n\n/**\n * @internal\n * Async-state view switch that wraps {@link CngxCommandPanel}. Maps the\n * consumer's `CngxAsyncState<CngxCommandGroup[]>` through `resolveAsyncView()` to\n * the six-state enum and renders the matching state: `skeleton` on first load,\n * `error` on a first-load failure, and the projected panel for everything\n * else. `content+error` keeps the stale results visible while a re-query on\n * the next keystroke errors. An empty success maps to `content` too: the\n * search input must stay mounted (the user keeps typing to refine the term),\n * so the panel itself renders the empty slot keyed on its own result count.\n *\n * Each state resolves its slot template (instance > config > built-in default),\n * passed down from the palette. With no `[results]` bound (static registry\n * only) the view is always `content`, so the panel renders unconditionally.\n */\n@Component({\n selector: 'cngx-command-panel-shell',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NgTemplateOutlet],\n template: `\n @switch (view()) {\n @case ('skeleton') {\n @if (loadingTpl(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{}\" />\n } @else {\n <div class=\"cngx-command-state\" aria-busy=\"true\">{{ copy().loadingLabel }}</div>\n }\n }\n @case ('error') {\n @if (errorTpl(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{ error: errorValue(), retry: emitRetry }\"\n />\n } @else {\n <div class=\"cngx-command-state cngx-command-state--error\" role=\"alert\">\n <span>{{ errorText() }}</span>\n <button type=\"button\" class=\"cngx-command-retry\" (click)=\"retry.emit()\">\n {{ retryText() }}\n </button>\n </div>\n }\n }\n @default {\n @if (view() === 'content+error') {\n <div class=\"cngx-command-state--error-banner\" role=\"alert\">{{ errorText() }}</div>\n }\n <ng-content />\n }\n }\n `,\n})\nexport class CngxCommandPanelShell {\n /** Consumer-derived async result state driving the view switch. */\n readonly results = input<CngxAsyncState<CngxCommandGroup[]> | undefined>(undefined);\n\n /** Resolved slot templates (instance > config > null). Built-in default when null. */\n readonly loadingTpl = input<TemplateRef<CngxCommandPaletteLoadingContext> | null>(null);\n readonly errorTpl = input<TemplateRef<CngxCommandPaletteErrorContext> | null>(null);\n\n /** Fired when the user clicks Retry in the error state. */\n readonly retry = output<void>();\n\n protected readonly copy = resolveCommandPaletteCopy(injectCommandPaletteConfig());\n\n /** The resolved view. `content` when no async source is bound. */\n protected readonly view = computed<AsyncView>(() => {\n const state = this.results();\n if (!state) {\n return 'content';\n }\n const view = resolveAsyncView(state.status(), state.isFirstLoad(), state.isEmpty());\n // An empty success keeps the panel (and its search input) mounted; the\n // panel renders the empty slot off its own result count instead.\n return view === 'empty' ? 'content' : view;\n });\n\n protected readonly errorValue = computed<unknown>(() => this.results()?.error());\n\n /**\n * @internal - copy of the `role=\"alert\"` error regions, keyed on the view. Read\n * untracked, so a language switch never re-speaks a shown error; the next error\n * speaks the new language.\n */\n protected readonly errorText = computed<string>(() => {\n this.view();\n return untracked(() => this.copy().errorLabel);\n });\n\n /** @internal - retry-button copy inside the error region, keyed like {@link errorText}. */\n protected readonly retryText = computed<string>(() => {\n this.view();\n return untracked(() => this.copy().retryLabel);\n });\n\n /** Stable bound callback for the error slot's `retry`. */\n protected readonly emitRetry = (): void => this.retry.emit();\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\nimport type { CngxCommandGroup, CngxRankedCommand } from '@cngx/common/command';\n\n/**\n * Context for the {@link CngxCommandRow} slot. Region granularity: the whole\n * row is one slot, so the consumer lays out icon / label / shortcut-hint\n * inside its own template. `data` is the command's opaque payload, narrowed at\n * the use-site; `active` reflects the current `aria-activedescendant`.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport interface CngxCommandRowContext {\n readonly $implicit: CngxRankedCommand;\n readonly term: string;\n readonly data: unknown;\n readonly active: boolean;\n}\n\n/** Context for the {@link CngxCommandGroupHeader} slot. Recents is a group. */\nexport interface CngxCommandGroupHeaderContext {\n readonly $implicit: CngxCommandGroup;\n}\n\n/** Context for the {@link CngxCommandPaletteEmpty} slot. */\nexport interface CngxCommandPaletteEmptyContext {\n readonly term: string;\n}\n\n/** Context for the {@link CngxCommandPaletteLoading} slot. */\nexport type CngxCommandPaletteLoadingContext = Record<string, never>;\n\n/** Context for the {@link CngxCommandPaletteError} slot. */\nexport interface CngxCommandPaletteErrorContext {\n readonly error: unknown;\n readonly retry: () => void;\n}\n\n/** Context for the {@link CngxCommandPaletteFooter} slot. */\nexport type CngxCommandPaletteFooterContext = Record<string, never>;\n\n/**\n * Overrides the default command row. Project as content of\n * `<cngx-command-palette>`:\n *\n * ```html\n * <cngx-command-palette>\n * <ng-template cngxCommandRow let-entry let-active=\"active\">\n * <my-icon [name]=\"entry.command.icon\" />\n * <span>{{ entry.command.label }}</span>\n * </ng-template>\n * </cngx-command-palette>\n * ```\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\n@Directive({ selector: '[cngxCommandRow]', standalone: true })\nexport class CngxCommandRow {\n readonly templateRef = inject<TemplateRef<CngxCommandRowContext>>(TemplateRef);\n static ngTemplateContextGuard(_dir: CngxCommandRow, ctx: unknown): ctx is CngxCommandRowContext {\n return true;\n }\n}\n\n/**\n * Overrides the default group header.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\n@Directive({ selector: '[cngxCommandGroupHeader]', standalone: true })\nexport class CngxCommandGroupHeader {\n readonly templateRef = inject<TemplateRef<CngxCommandGroupHeaderContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _dir: CngxCommandGroupHeader,\n ctx: unknown,\n ): ctx is CngxCommandGroupHeaderContext {\n return true;\n }\n}\n\n/**\n * Overrides the default empty state.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\n@Directive({ selector: '[cngxCommandPaletteEmpty]', standalone: true })\nexport class CngxCommandPaletteEmpty {\n readonly templateRef = inject<TemplateRef<CngxCommandPaletteEmptyContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _dir: CngxCommandPaletteEmpty,\n ctx: unknown,\n ): ctx is CngxCommandPaletteEmptyContext {\n return true;\n }\n}\n\n/**\n * Overrides the default first-load skeleton.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\n@Directive({ selector: '[cngxCommandPaletteLoading]', standalone: true })\nexport class CngxCommandPaletteLoading {\n readonly templateRef = inject<TemplateRef<CngxCommandPaletteLoadingContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _dir: CngxCommandPaletteLoading,\n ctx: unknown,\n ): ctx is CngxCommandPaletteLoadingContext {\n return true;\n }\n}\n\n/**\n * Overrides the default error state. Wire `retry` to your reload path.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\n@Directive({ selector: '[cngxCommandPaletteError]', standalone: true })\nexport class CngxCommandPaletteError {\n readonly templateRef = inject<TemplateRef<CngxCommandPaletteErrorContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _dir: CngxCommandPaletteError,\n ctx: unknown,\n ): ctx is CngxCommandPaletteErrorContext {\n return true;\n }\n}\n\n/**\n * Overrides the default keyboard-legend footer.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\n@Directive({ selector: '[cngxCommandPaletteFooter]', standalone: true })\nexport class CngxCommandPaletteFooter {\n readonly templateRef = inject<TemplateRef<CngxCommandPaletteFooterContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _dir: CngxCommandPaletteFooter,\n ctx: unknown,\n ): ctx is CngxCommandPaletteFooterContext {\n return true;\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { matchesKeyCombo, type KeyCombo } from '@cngx/core/utils';\n\n/**\n * Handle returned by a palette keybinding: a teardown that removes the document\n * listener. The palette recreates the keybinding whenever the resolved combo\n * changes and tears the previous one down, so nothing leaks document-wide.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport interface CngxPaletteKeybinding {\n /** Removes the installed document keydown listener. */\n teardown(): void;\n}\n\n/**\n * Factory producing a {@link CngxPaletteKeybinding} for a combo. It installs a\n * global listener that invokes `onOpen` whenever the combo is pressed. Captured\n * as a type alias so an override matches the exact signature - a consumer can\n * swap in an enterprise key-capture policy without touching the palette.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport type CngxPaletteKeybindingFactory = (\n combo: KeyCombo,\n onOpen: () => void,\n) => CngxPaletteKeybinding;\n\n/**\n * Default palette keybinding: installs a document keydown listener that calls\n * `onOpen` whenever the combo is pressed (matched via `matchesKeyCombo`).\n * Side-effectful by design - it owns the global listener - so its `teardown`\n * must be called on destroy.\n *\n * `isMac` defaults to platform detection; pass it explicitly for deterministic\n * tests.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport function createPaletteKeybinding(\n combo: KeyCombo,\n onOpen: () => void,\n isMac: boolean = detectMac(),\n): CngxPaletteKeybinding {\n // SSR: no document, no global listener - an inert handle keeps the\n // palette's effect/teardown cycle uniform across platforms.\n if (typeof document === 'undefined') {\n return { teardown: () => undefined };\n }\n const handler = (event: KeyboardEvent): void => {\n if (matchesKeyCombo(event, combo, isMac)) {\n event.preventDefault();\n onOpen();\n }\n };\n document.addEventListener('keydown', handler);\n return { teardown: () => document.removeEventListener('keydown', handler) };\n}\n\n/**\n * Swappable open-trigger seam. Defaults to {@link createPaletteKeybinding}.\n * Override it to install an enterprise key-capture policy without touching the\n * palette. To only change the *combo*, prefer `withPaletteShortcut(...)` or the\n * `[openShortcut]` input - this token is for replacing the whole listener.\n *\n * @category ui/command-palette\n * @since 0.1.0\n */\nexport const CNGX_PALETTE_KEYBINDING_FACTORY = new InjectionToken<CngxPaletteKeybindingFactory>(\n 'CNGX_PALETTE_KEYBINDING_FACTORY',\n { providedIn: 'root', factory: () => createPaletteKeybinding },\n);\n\n/** @internal Best-effort macOS detection; overridable via the `isMac` argument. */\nfunction detectMac(): boolean {\n return typeof navigator !== 'undefined' && /mac/i.test(navigator.platform);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n effect,\n inject,\n input,\n model,\n output,\n viewChild,\n ViewEncapsulation,\n type Signal,\n} from '@angular/core';\n\nimport type { CngxCommandGroup } from '@cngx/common/command';\nimport { CngxDialog } from '@cngx/common/dialog';\nimport { parseKeyCombo, type CngxAsyncState } from '@cngx/core/utils';\n\nimport {\n injectCommandPaletteConfig,\n resolveCommandPaletteCopy,\n} from '../config/command-palette-config';\nimport { CngxCommandPanel } from '../panel/command-panel.component';\nimport { CngxCommandPanelShell } from '../panel/command-panel-shell.component';\nimport { CNGX_COMMAND_PALETTE_HOST, type CngxCommandPaletteHost } from '../panel/panel-host.token';\nimport {\n CngxCommandGroupHeader,\n CngxCommandPaletteEmpty,\n CngxCommandPaletteError,\n CngxCommandPaletteFooter,\n CngxCommandPaletteLoading,\n CngxCommandRow,\n} from '../slots/command-slots';\nimport { CNGX_PALETTE_KEYBINDING_FACTORY } from './palette-keybinding';\n\n/**\n * The opinionated Cmd/Ctrl+K command palette preset. Renders the panel body +\n * async-state shell inside a native modal `<dialog cngxDialog>`, so focus\n * trapping, trigger storage at open, and focus restore after the close\n * transition are handled by `CngxDialog` and the platform - no hand-rolled\n * focus machinery. The palette provides `CNGX_COMMAND_PALETTE_HOST` so the\n * panel can dismiss it when a command runs.\n *\n * Type-to-filter runs over the merged command registry (`injectCommands`) plus\n * the consumer's async `[results]`; the palette commits no form value - it\n * fires `command.run()`, the locked demarcation from `CngxCombobox`. The global\n * Cmd/Ctrl+K open combo is wired by the keybinding factory, not here.\n *\n * ```html\n * <cngx-command-palette #palette [results]=\"results()\" />\n * <button [cngxCommandPaletteTrigger]=\"palette\">Search commands</button>\n * ```\n *\n * @category ui/command-palette\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/command-palette/palette/command-palette.component.ts\n * @selector cngx-command-palette\n * @since 0.1.0\n * @relatedTo CngxCommandPaletteTrigger, provideCommands, CngxDialog\n */\n@Component({\n selector: 'cngx-command-palette',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxDialog, CngxCommandPanelShell, CngxCommandPanel, NgTemplateOutlet],\n providers: [{ provide: CNGX_COMMAND_PALETTE_HOST, useExisting: CngxCommandPalette }],\n styleUrl: './command-palette.component.css',\n template: `\n <dialog\n cngxDialog\n #dialog=\"cngxDialog\"\n class=\"cngx-command-palette\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n >\n <cngx-command-panel-shell\n [results]=\"results()\"\n [loadingTpl]=\"loadingTpl()\"\n [errorTpl]=\"errorTpl()\"\n (retry)=\"retry.emit()\"\n >\n <cngx-command-panel\n [results]=\"results()\"\n [(scope)]=\"scope\"\n [debounceMs]=\"debounceMs()\"\n [rowTpl]=\"rowTpl()\"\n [groupHeaderTpl]=\"groupHeaderTpl()\"\n [emptyTpl]=\"emptyTpl()\"\n />\n </cngx-command-panel-shell>\n <footer class=\"cngx-command-footer\">\n @if (footerTpl(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"{}\" />\n } @else {\n @for (entry of copy().footerLegend; track entry.label) {\n <span class=\"cngx-command-legend\">\n <kbd aria-hidden=\"true\">{{ entry.keys }}</kbd>\n <span aria-hidden=\"true\">{{ entry.label }}</span>\n <span class=\"cngx-sr-only\">{{\n copy().legendEntry(entry.spokenKeys ?? entry.keys, entry.label)\n }}</span>\n </span>\n }\n }\n </footer>\n </dialog>\n `,\n})\nexport class CngxCommandPalette implements CngxCommandPaletteHost {\n /** Consumer-derived async result source. */\n readonly results = input<CngxAsyncState<CngxCommandGroup[]> | undefined>(undefined);\n\n /** Two-way scope; feeds the matcher's scope filter and the panel chip. */\n readonly scope = model<string | undefined>(undefined);\n\n /** Debounce for the search input. */\n readonly debounceMs = input<number>(150);\n\n private readonly config = injectCommandPaletteConfig();\n protected readonly copy = resolveCommandPaletteCopy(this.config);\n\n /**\n * Accessible name for the dialog. Unbound, `paletteLabel` from\n * `CNGX_COMMAND_PALETTE_CONFIG` (`withCommandPaletteLabels`) applies.\n */\n readonly ariaLabel = input<string | undefined>(undefined);\n\n /** @internal */\n protected readonly resolvedAriaLabel = computed(\n () => this.ariaLabel() ?? this.copy().paletteLabel,\n );\n\n /**\n * Per-instance open combo (parsed via `parseKeyCombo`, e.g. `'mod+shift+p'`).\n * Wins over `CNGX_COMMAND_PALETTE_CONFIG.openShortcut` (`withPaletteShortcut`),\n * which wins over the `'mod+k'` default. Changing it live re-installs the\n * listener. For a full listener swap, override `CNGX_PALETTE_KEYBINDING_FACTORY`.\n */\n readonly openShortcut = input<string | undefined>(undefined);\n\n /** Fired when the user asks to retry a failed result load. */\n readonly retry = output<void>();\n\n // Instance slot directives (content-projected). contentChild must be a direct\n // field initializer (AOT NG8110). Each resolves instance > config > null.\n private readonly rowSlot = contentChild(CngxCommandRow);\n private readonly groupHeaderSlot = contentChild(CngxCommandGroupHeader);\n private readonly emptySlot = contentChild(CngxCommandPaletteEmpty);\n private readonly loadingSlot = contentChild(CngxCommandPaletteLoading);\n private readonly errorSlot = contentChild(CngxCommandPaletteError);\n private readonly footerSlot = contentChild(CngxCommandPaletteFooter);\n\n protected readonly rowTpl = computed(\n () => this.rowSlot()?.templateRef ?? this.config.templates?.row ?? null,\n );\n protected readonly groupHeaderTpl = computed(\n () => this.groupHeaderSlot()?.templateRef ?? this.config.templates?.groupHeader ?? null,\n );\n protected readonly emptyTpl = computed(\n () => this.emptySlot()?.templateRef ?? this.config.templates?.empty ?? null,\n );\n protected readonly loadingTpl = computed(\n () => this.loadingSlot()?.templateRef ?? this.config.templates?.loading ?? null,\n );\n protected readonly errorTpl = computed(\n () => this.errorSlot()?.templateRef ?? this.config.templates?.error ?? null,\n );\n protected readonly footerTpl = computed(\n () => this.footerSlot()?.templateRef ?? this.config.templates?.footer ?? null,\n );\n\n private readonly dialog = viewChild(CngxDialog);\n\n /** Whether the palette is open. Part of the {@link CngxCommandPaletteHost} contract. */\n readonly isOpen: Signal<boolean> = computed(\n () => (this.dialog()?.lifecycle() ?? 'closed') !== 'closed',\n );\n\n /** Resolved open combo: instance input > config > `'mod+k'` default. */\n private readonly resolvedShortcut = computed(\n () => this.openShortcut() ?? this.config.openShortcut,\n );\n\n constructor() {\n // The swappable factory installs the global open combo and calls back to\n // open the palette. The effect re-installs the listener whenever the\n // resolved combo changes; onCleanup tears down the previous listener (and\n // the last one on destroy), so nothing leaks document-wide.\n const factory = inject(CNGX_PALETTE_KEYBINDING_FACTORY);\n effect((onCleanup) => {\n const keybinding = factory(parseKeyCombo(this.resolvedShortcut()), () => this.open());\n onCleanup(() => keybinding.teardown());\n });\n }\n\n /** Open the palette. */\n open(): void {\n this.dialog()?.open();\n }\n\n /** Dismiss the palette. Focus returns to the trigger via `CngxDialog`. */\n dismiss(): void {\n this.dialog()?.dismiss();\n }\n}\n","import { Directive, input } from '@angular/core';\n\nimport type { CngxCommandPalette } from './command-palette.component';\n\n/**\n * Optional explicit trigger for a {@link CngxCommandPalette}. Opens the palette\n * on click and advertises the popup relationship to assistive tech:\n * `aria-haspopup=\"dialog\"` plus `aria-expanded` derived from the palette's\n * `isOpen()` host seam, so the trigger communicates the open state without any\n * synced local flag. Pass the palette by template reference - orthogonal\n * composition, no ancestor injection.\n *\n * ```html\n * <button [cngxCommandPaletteTrigger]=\"palette\">\n * Search <kbd>Cmd K</kbd>\n * </button>\n * <cngx-command-palette #palette />\n * ```\n *\n * @category ui/command-palette\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/command-palette/palette/command-palette-trigger.directive.ts\n * @since 0.1.0\n * @relatedTo CngxCommandPalette\n */\n@Directive({\n selector: '[cngxCommandPaletteTrigger]',\n exportAs: 'cngxCommandPaletteTrigger',\n standalone: true,\n host: {\n '[attr.aria-haspopup]': '\"dialog\"',\n '[attr.aria-expanded]': 'palette().isOpen()',\n '(click)': 'open()',\n },\n})\nexport class CngxCommandPaletteTrigger {\n /** The palette this trigger opens. */\n readonly palette = input.required<CngxCommandPalette>({ alias: 'cngxCommandPaletteTrigger' });\n\n protected open(): void {\n this.palette().open();\n }\n}\n","/**\n * @module @cngx/ui/command-palette\n */\nexport { CngxCommandPalette } from './palette/command-palette.component';\nexport { CngxCommandPaletteTrigger } from './palette/command-palette-trigger.directive';\nexport {\n CNGX_COMMAND_PALETTE_HOST,\n type CngxCommandPaletteHost,\n} from './panel/panel-host.token';\nexport {\n CNGX_PALETTE_KEYBINDING_FACTORY,\n createPaletteKeybinding,\n type CngxPaletteKeybinding,\n type CngxPaletteKeybindingFactory,\n} from './palette/palette-keybinding';\nexport {\n CNGX_COMMAND_PALETTE_CONFIG,\n provideCommandPaletteConfig,\n provideCommandPaletteConfigAt,\n injectCommandPaletteConfig,\n withCommandPaletteLabels,\n withPaletteShortcut,\n withKeyboardLegend,\n withResultCountFormatter,\n withCommandPaletteTemplates,\n type CngxCommandPaletteConfig,\n type CngxCommandPaletteConfigFeature,\n type CngxCommandPaletteLabelKey,\n type CngxCommandPaletteLegendEntry,\n type CngxCommandPaletteTemplates,\n} from './config/command-palette-config';\nexport {\n CngxCommandRow,\n CngxCommandGroupHeader,\n CngxCommandPaletteEmpty,\n CngxCommandPaletteLoading,\n CngxCommandPaletteError,\n CngxCommandPaletteFooter,\n type CngxCommandRowContext,\n type CngxCommandGroupHeaderContext,\n type CngxCommandPaletteEmptyContext,\n type CngxCommandPaletteLoadingContext,\n type CngxCommandPaletteErrorContext,\n type CngxCommandPaletteFooterContext,\n} from './slots/command-slots';\nexport {\n CNGX_COMMAND_PALETTE_LANGUAGE_EN,\n type CngxCommandPaletteLanguageSection,\n} from './i18n/command-palette-language-section';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAgDA;;;;;;;AAOG;AACI,MAAM,gCAAgC,GAAsC;AACjF,IAAA,iBAAiB,EAAE,2BAA2B;AAC9C,IAAA,YAAY,EAAE,UAAU;AACxB,IAAA,UAAU,EAAE,sBAAsB;AAClC,IAAA,YAAY,EAAE,mBAAmB;AACjC,IAAA,UAAU,EAAE,yBAAyB;AACrC,IAAA,UAAU,EAAE,OAAO;AACnB,IAAA,YAAY,EAAE,iBAAiB;IAC/B,WAAW,EAAE,EAAE,GAAG,EAAE,gBAAgB,EAAE,KAAK,EAAE,iBAAiB,EAAE;AAChE,IAAA,YAAY,EAAE,KAAK;AACnB,IAAA,kBAAkB,EAAE,oBAAoB;AACxC,IAAA,aAAa,EAAE,UAAU;AACzB,IAAA,OAAO,EAAE,OAAO;AAChB,IAAA,QAAQ,EAAE,KAAK;AACf,IAAA,SAAS,EAAE,KAAK;AAChB,IAAA,UAAU,EAAE,OAAO;AACnB,IAAA,WAAW,EAAE,gBAAgB;;;AC3C/B;AACM,SAAU,sBAAsB,CACpC,OAA0C,EAC1C,MAAc,EAAA;IAEd,OAAO;QACL,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;QAC5C,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,UA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