@getflip/swirl-ai 0.456.3 → 0.457.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/components/swirl-option-list.md +1 -1
- package/dist/custom-elements.manifest.json +29 -0
- package/dist/types/components/swirl-option-list/swirl-option-list.d.ts +1 -0
- package/dist/types/components/swirl-select/swirl-select.d.ts +35 -0
- package/dist/types/components.d.ts +1 -0
- package/package.json +2 -2
|
@@ -36866,6 +36866,35 @@
|
|
|
36866
36866
|
"text": "string[] | undefined"
|
|
36867
36867
|
},
|
|
36868
36868
|
"default": "[]"
|
|
36869
|
+
},
|
|
36870
|
+
{
|
|
36871
|
+
"kind": "method",
|
|
36872
|
+
"name": "focusItemWithValue",
|
|
36873
|
+
"parameters": [
|
|
36874
|
+
{
|
|
36875
|
+
"name": "value",
|
|
36876
|
+
"type": {
|
|
36877
|
+
"text": "string",
|
|
36878
|
+
"references": [
|
|
36879
|
+
{
|
|
36880
|
+
"name": "Promise",
|
|
36881
|
+
"package": "global:"
|
|
36882
|
+
}
|
|
36883
|
+
]
|
|
36884
|
+
}
|
|
36885
|
+
}
|
|
36886
|
+
],
|
|
36887
|
+
"return": {
|
|
36888
|
+
"type": {
|
|
36889
|
+
"text": "Promise<void>",
|
|
36890
|
+
"references": [
|
|
36891
|
+
{
|
|
36892
|
+
"name": "Promise",
|
|
36893
|
+
"package": "global:"
|
|
36894
|
+
}
|
|
36895
|
+
]
|
|
36896
|
+
}
|
|
36897
|
+
}
|
|
36869
36898
|
}
|
|
36870
36899
|
],
|
|
36871
36900
|
"events": [
|
|
@@ -43,6 +43,7 @@ export declare class SwirlOptionList implements SwirlFormInput<string[]> {
|
|
|
43
43
|
watchDisabled(): void;
|
|
44
44
|
watchMultiSelect(): void;
|
|
45
45
|
watchValue(): void;
|
|
46
|
+
focusItemWithValue(value: string): Promise<void>;
|
|
46
47
|
private onClick;
|
|
47
48
|
private onKeyDown;
|
|
48
49
|
private observeSlotChanges;
|
|
@@ -29,6 +29,8 @@ export declare class SwirlSelect implements SwirlFormInput<string[]> {
|
|
|
29
29
|
private optionList;
|
|
30
30
|
private searchInput;
|
|
31
31
|
private swirlPopover;
|
|
32
|
+
private typeaheadBuffer;
|
|
33
|
+
private typeaheadTimeout;
|
|
32
34
|
componentWillLoad(): void;
|
|
33
35
|
disconnectedCallback(): void;
|
|
34
36
|
onWindowFocusIn(event: FocusEvent): void;
|
|
@@ -41,6 +43,39 @@ export declare class SwirlSelect implements SwirlFormInput<string[]> {
|
|
|
41
43
|
private onOpen;
|
|
42
44
|
private onClose;
|
|
43
45
|
private onKeyDown;
|
|
46
|
+
/**
|
|
47
|
+
* Returns true for printable single-character keys that should trigger
|
|
48
|
+
* typeahead, excluding Space (used for selection) and keys combined with
|
|
49
|
+
* modifiers. Ignores events from the search input.
|
|
50
|
+
*/
|
|
51
|
+
private isTypeaheadKey;
|
|
52
|
+
/**
|
|
53
|
+
* Manages the typeahead buffer and delegates to either cycling (repeated
|
|
54
|
+
* same character) or prefix matching (different characters). Resets the
|
|
55
|
+
* buffer if transitioning out of cycling mode. The buffer auto-clears
|
|
56
|
+
* after 500ms of inactivity.
|
|
57
|
+
*/
|
|
58
|
+
private handleTypeahead;
|
|
59
|
+
/**
|
|
60
|
+
* Cycles focus/selection through options that start with the given
|
|
61
|
+
* character, wrapping around to the first match after the last one.
|
|
62
|
+
*/
|
|
63
|
+
private cycleTypeahead;
|
|
64
|
+
/**
|
|
65
|
+
* Finds the first enabled option whose label starts with the given prefix
|
|
66
|
+
* (case-insensitive) and focuses/selects it. Returns whether a match was
|
|
67
|
+
* found, so the caller can fall back to a single-character retry.
|
|
68
|
+
*/
|
|
69
|
+
private prefixMatchTypeahead;
|
|
70
|
+
/**
|
|
71
|
+
* Returns the value of the currently focused option (when open) or the
|
|
72
|
+
* last selected value (when closed), used as the starting point for cycling.
|
|
73
|
+
*/
|
|
74
|
+
private getTypeaheadAnchorValue;
|
|
75
|
+
/**
|
|
76
|
+
* Applies a typeahead match by focusing the option in the open list.
|
|
77
|
+
*/
|
|
78
|
+
private applyTypeaheadMatch;
|
|
44
79
|
private onSearchInput;
|
|
45
80
|
private getValueLabel;
|
|
46
81
|
render(): any;
|
|
@@ -3272,6 +3272,7 @@ export namespace Components {
|
|
|
3272
3272
|
*/
|
|
3273
3273
|
"assistiveTextItemMoving"?: string;
|
|
3274
3274
|
"disabled"?: boolean;
|
|
3275
|
+
"focusItemWithValue": (value: string) => Promise<void>;
|
|
3275
3276
|
"label"?: string;
|
|
3276
3277
|
"multiSelect"?: boolean;
|
|
3277
3278
|
"optionListId"?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getflip/swirl-ai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.457.0",
|
|
4
4
|
"description": "Swirl Design System AI package with artifacts for AI agents",
|
|
5
5
|
"author": "Flip GmbH",
|
|
6
6
|
"repository": "https://github.com/getflip/swirl",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"zod": "3.24.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@getflip/swirl-components": "0.
|
|
49
|
+
"@getflip/swirl-components": "0.457.0",
|
|
50
50
|
"@types/node": "25.3.0",
|
|
51
51
|
"tsup": "^8.0.0",
|
|
52
52
|
"tsx": "^4.7.0",
|