@cngx/common 0.1.0-rc.7 → 0.1.0-rc.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/card/README.md +2 -1
- package/data/README.md +10 -1
- package/dialog/README.md +23 -1
- package/fesm2022/cngx-common-a11y.mjs +125 -111
- package/fesm2022/cngx-common-a11y.mjs.map +1 -1
- package/fesm2022/cngx-common-audio.mjs +47 -5
- package/fesm2022/cngx-common-audio.mjs.map +1 -1
- package/fesm2022/cngx-common-card.mjs +300 -46
- package/fesm2022/cngx-common-card.mjs.map +1 -1
- package/fesm2022/cngx-common-chart.mjs +1176 -453
- package/fesm2022/cngx-common-chart.mjs.map +1 -1
- package/fesm2022/cngx-common-command.mjs +37 -10
- package/fesm2022/cngx-common-command.mjs.map +1 -1
- package/fesm2022/cngx-common-data.mjs +1318 -469
- package/fesm2022/cngx-common-data.mjs.map +1 -1
- package/fesm2022/cngx-common-dialog.mjs +151 -14
- package/fesm2022/cngx-common-dialog.mjs.map +1 -1
- package/fesm2022/cngx-common-display.mjs +340 -73
- package/fesm2022/cngx-common-display.mjs.map +1 -1
- package/fesm2022/cngx-common-interactive.mjs +1744 -952
- package/fesm2022/cngx-common-interactive.mjs.map +1 -1
- package/fesm2022/cngx-common-layout.mjs +841 -114
- package/fesm2022/cngx-common-layout.mjs.map +1 -1
- package/fesm2022/cngx-common-popover.mjs +350 -60
- package/fesm2022/cngx-common-popover.mjs.map +1 -1
- package/fesm2022/cngx-common-stepper.mjs +727 -317
- package/fesm2022/cngx-common-stepper.mjs.map +1 -1
- package/fesm2022/cngx-common-tabs.mjs +1601 -1243
- package/fesm2022/cngx-common-tabs.mjs.map +1 -1
- package/fesm2022/cngx-common-timeline.mjs +137 -53
- package/fesm2022/cngx-common-timeline.mjs.map +1 -1
- package/fesm2022/cngx-common.mjs +1 -1
- package/interactive/README.md +15 -4
- package/layout/README.md +21 -1
- package/package.json +3 -3
- package/popover/README.md +18 -2
- package/stepper/README.md +6 -4
- package/theming/components/cngx-accordion.css +1 -1
- package/theming/components/cngx-backdrop.css +12 -0
- package/theming/components/cngx-button-toggle.css +29 -3
- package/theming/components/cngx-data-grid.css +168 -1
- package/theming/components/cngx-dialog.css +13 -0
- package/theming/components/cngx-listbox.css +21 -12
- package/theming/components/cngx-menu.css +56 -16
- package/theming/components/cngx-popover.css +24 -0
- package/theming/components/cngx-recycler-placeholder.css +196 -0
- package/theming/components/cngx-ripple.css +1 -1
- package/theming/components/cngx-slider.css +32 -1
- package/theming/components/cngx-tooltip.css +12 -0
- package/timeline/README.md +155 -0
- package/types/cngx-common-a11y.d.ts +42 -18
- package/types/cngx-common-card.d.ts +201 -17
- package/types/cngx-common-chart.d.ts +343 -47
- package/types/cngx-common-command.d.ts +31 -8
- package/types/cngx-common-data.d.ts +581 -68
- package/types/cngx-common-dialog.d.ts +158 -3
- package/types/cngx-common-display.d.ts +356 -142
- package/types/cngx-common-interactive.d.ts +859 -210
- package/types/cngx-common-layout.d.ts +567 -28
- package/types/cngx-common-popover.d.ts +262 -39
- package/types/cngx-common-stepper.d.ts +366 -116
- package/types/cngx-common-tabs.d.ts +214 -50
- package/types/cngx-common-timeline.d.ts +82 -16
|
@@ -40,12 +40,12 @@ interface CngxCommand {
|
|
|
40
40
|
/**
|
|
41
41
|
* A named cluster of commands. The palette renders grouped results (Recents on
|
|
42
42
|
* an empty query, then categories) and the consumer's async result source is a
|
|
43
|
-
* `CngxAsyncState<
|
|
43
|
+
* `CngxAsyncState<CngxCommandGroup[]>`.
|
|
44
44
|
*
|
|
45
45
|
* @category common/command
|
|
46
46
|
* @since 0.1.0
|
|
47
47
|
*/
|
|
48
|
-
interface
|
|
48
|
+
interface CngxCommandGroup {
|
|
49
49
|
/** Stable identity for the group header slot and change detection. */
|
|
50
50
|
readonly id: string;
|
|
51
51
|
/** Header label rendered above the group's commands. */
|
|
@@ -53,6 +53,14 @@ interface CommandGroup {
|
|
|
53
53
|
/** The commands in this group, in render order. */
|
|
54
54
|
readonly commands: readonly CngxCommand[];
|
|
55
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated Use {@link CngxCommandGroup}. Published under the unprefixed
|
|
58
|
+
* name by mistake; the alias remains for compatibility and will be removed in
|
|
59
|
+
* a future major.
|
|
60
|
+
* @category common/command
|
|
61
|
+
* @since 0.1.0
|
|
62
|
+
*/
|
|
63
|
+
type CommandGroup = CngxCommandGroup;
|
|
56
64
|
|
|
57
65
|
/**
|
|
58
66
|
* A command contribution. Either a static list or a reactive `Signal` of
|
|
@@ -116,12 +124,20 @@ declare function injectCommands(): Signal<readonly CngxCommand[]>;
|
|
|
116
124
|
* @category common/command
|
|
117
125
|
* @since 0.1.0
|
|
118
126
|
*/
|
|
119
|
-
interface
|
|
127
|
+
interface CngxRankedCommand {
|
|
120
128
|
/** The matched command. */
|
|
121
129
|
readonly command: CngxCommand;
|
|
122
130
|
/** Relevance score for the query; higher ranks first. `0` for an empty query. */
|
|
123
131
|
readonly score: number;
|
|
124
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* @deprecated Use {@link CngxRankedCommand}. Published under the unprefixed
|
|
135
|
+
* name by mistake; the alias remains for compatibility and will be removed in
|
|
136
|
+
* a future major.
|
|
137
|
+
* @category common/command
|
|
138
|
+
* @since 0.1.0
|
|
139
|
+
*/
|
|
140
|
+
type RankedCommand = CngxRankedCommand;
|
|
125
141
|
/**
|
|
126
142
|
* Ranks and filters a command set against a query and optional scope. Swappable
|
|
127
143
|
* via {@link CNGX_COMMAND_MATCH_FACTORY} - a consumer drops in Levenshtein or a
|
|
@@ -130,7 +146,7 @@ interface RankedCommand {
|
|
|
130
146
|
* @category common/command
|
|
131
147
|
* @since 0.1.0
|
|
132
148
|
*/
|
|
133
|
-
type CngxCommandMatcher = (commands: readonly CngxCommand[], term: string, scope?: string) => readonly
|
|
149
|
+
type CngxCommandMatcher = (commands: readonly CngxCommand[], term: string, scope?: string) => readonly CngxRankedCommand[];
|
|
134
150
|
/**
|
|
135
151
|
* Builds the default matcher: a pure label/keyword ranker. An empty query
|
|
136
152
|
* returns every (scoped) command at score `0` in registration order; a
|
|
@@ -138,14 +154,21 @@ type CngxCommandMatcher = (commands: readonly CngxCommand[], term: string, scope
|
|
|
138
154
|
* label-exact > label-prefix > label-substring > keyword. The optional scope
|
|
139
155
|
* filters to commands whose `group` equals it.
|
|
140
156
|
*
|
|
157
|
+
* Query, labels and keywords are compared case- and accent-tolerant
|
|
158
|
+
* ({@link foldForMatching}): `uber` finds `Über`. Pass the app locale (the
|
|
159
|
+
* default `CNGX_COMMAND_MATCH_FACTORY` passes `injectLocale()`) so case folds
|
|
160
|
+
* by its rules, e.g. Turkish `I` / `ı`; read inside a `computed()`, a locale
|
|
161
|
+
* switch re-ranks.
|
|
162
|
+
*
|
|
141
163
|
* @category common/command
|
|
142
164
|
* @since 0.1.0
|
|
143
165
|
*/
|
|
144
|
-
declare function createDefaultCommandMatcher(): CngxCommandMatcher;
|
|
166
|
+
declare function createDefaultCommandMatcher(locale?: Signal<string>): CngxCommandMatcher;
|
|
145
167
|
|
|
146
168
|
/**
|
|
147
169
|
* Factory producing a {@link CngxCommandMatcher}. The exact signature is
|
|
148
|
-
* captured so an override matches it precisely.
|
|
170
|
+
* captured so an override matches it precisely. The panel calls it in an
|
|
171
|
+
* injection context, so a factory may `inject()` what its matcher needs.
|
|
149
172
|
*
|
|
150
173
|
* @category common/command
|
|
151
174
|
* @since 0.1.0
|
|
@@ -153,7 +176,7 @@ declare function createDefaultCommandMatcher(): CngxCommandMatcher;
|
|
|
153
176
|
type CngxCommandMatchFactory = () => CngxCommandMatcher;
|
|
154
177
|
/**
|
|
155
178
|
* Swappable match-strategy seam. Defaults to {@link createDefaultCommandMatcher}
|
|
156
|
-
* (pure label/keyword ranking). Override it - app-wide via `providers` or
|
|
179
|
+
* (pure label/keyword ranking, case- and accent-tolerant in the app locale). Override it - app-wide via `providers` or
|
|
157
180
|
* per-component via `viewProviders` - to drop in a fuzzy/Levenshtein ranker
|
|
158
181
|
* without touching the panel. The fuzzy engine stays a consumer swap; the
|
|
159
182
|
* default bundle ships only the pure ranker.
|
|
@@ -164,4 +187,4 @@ type CngxCommandMatchFactory = () => CngxCommandMatcher;
|
|
|
164
187
|
declare const CNGX_COMMAND_MATCH_FACTORY: InjectionToken<CngxCommandMatchFactory>;
|
|
165
188
|
|
|
166
189
|
export { CNGX_COMMAND_MATCH_FACTORY, CNGX_COMMAND_SOURCE, createDefaultCommandMatcher, injectCommands, provideCommands };
|
|
167
|
-
export type { CngxCommand, CngxCommandMatchFactory, CngxCommandMatcher, CngxCommandSource, CommandGroup, RankedCommand };
|
|
190
|
+
export type { CngxCommand, CngxCommandGroup, CngxCommandMatchFactory, CngxCommandMatcher, CngxCommandSource, CngxRankedCommand, CommandGroup, RankedCommand };
|