@fusion.dev/helix-headless 0.14.0 → 0.15.1

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/types/vue.d.ts CHANGED
@@ -2975,6 +2975,12 @@ export type HelixHeadlessFilterInputElementEvent<E = Event> = TypedEvent<
2975
2975
  /** `helix-before-change` event type */
2976
2976
  export type HelixHeadlessFilterInputHelixBeforeChangeElementEvent =
2977
2977
  HelixHeadlessFilterInputElementEvent<HelixBeforeChangeEvent>;
2978
+ /** `helix-before-close` event type */
2979
+ export type HelixHeadlessFilterInputHelixBeforeCloseElementEvent =
2980
+ HelixHeadlessFilterInputElementEvent<HelixBeforeCloseEvent>;
2981
+ /** `helix-before-open` event type */
2982
+ export type HelixHeadlessFilterInputHelixBeforeOpenElementEvent =
2983
+ HelixHeadlessFilterInputElementEvent<HelixBeforeOpenEvent>;
2978
2984
 
2979
2985
  export type HelixHeadlessFilterInputVueProps = {
2980
2986
  /** Whether the field offers a button that empties it.
@@ -2992,6 +2998,23 @@ them. */
2992
2998
 
2993
2999
  Not a label: it goes when typing starts. */
2994
3000
  placeholder?: (HelixHeadlessFilterInput["placeholder"]) | undefined;
3001
+ /** Whether the element is open.
3002
+
3003
+ One property, not two, so `dialog.open` answers the question anyone
3004
+ asking it meant. Writing always applies; `<helix-dialog open>` is the
3005
+ same statement in markup.
3006
+
3007
+ **Not reflected, and that is required rather than tidy.** Reflection
3008
+ writes the resolved state back as an attribute, so an element that opened
3009
+ itself would put `open` on its own host: cloned, serialized for
3010
+ hydration, or diffed by a framework, it comes back holding whatever the
3011
+ last reader did rather than what the author wrote. `:state(open)` carries
3012
+ the resolved state for stylesheets, which is what the mirror is for. */
3013
+ open?: (HelixHeadlessFilterInput["open"]) | undefined;
3014
+ /** Initial open state for uncontrolled use, where nothing declared one. */
3015
+ "default-open"?: (HelixHeadlessFilterInput["defaultOpen"]) | undefined;
3016
+ /** Initial open state for uncontrolled use, where nothing declared one. */
3017
+ defaultOpen?: (HelixHeadlessFilterInput["defaultOpen"]) | undefined;
2995
3018
  /** What the control says once everything is showing. */
2996
3019
  "collapse-label"?: (HelixHeadlessFilterInput["collapseLabel"]) | undefined;
2997
3020
  /** What the control says once everything is showing. */
@@ -3058,8 +3081,14 @@ export type HelixHeadlessFilterInputVueEvents = {
3058
3081
  change: HelixHeadlessFilterInputElementEvent;
3059
3082
  /** Fired as the text changes, and cancelable. */
3060
3083
  "helix-before-change": HelixHeadlessFilterInputHelixBeforeChangeElementEvent;
3084
+ /** Fired before the suggestions go, and cancelable. */
3085
+ "helix-before-close": HelixHeadlessFilterInputHelixBeforeCloseElementEvent;
3086
+ /** Fired before the suggestions show, and cancelable. */
3087
+ "helix-before-open": HelixHeadlessFilterInputHelixBeforeOpenElementEvent;
3061
3088
  /** Announced once the text has moved. */
3062
3089
  input: HelixHeadlessFilterInputElementEvent;
3090
+ /** Says the panel moved, carrying `newState` and `oldState`. */
3091
+ toggle: HelixHeadlessFilterInputElementEvent;
3063
3092
  };
3064
3093
 
3065
3094
  export type HelixHeadlessFormatDateVueProps = {
@@ -8333,7 +8362,7 @@ export interface WcToolkitVueGlobalComponents {
8333
8362
  HelixHeadlessFileInputVueProps,
8334
8363
  HelixHeadlessFileInputVueEvents
8335
8364
  >;
8336
- /** **The tokens are the consumer's own elements, slotted.** What a filter narrows by belongs to the consumer's model rather than to this element: a facet with a prefix, a saved query, a range. So they are slotted rather than rendered from a list of strings, and removing one is a request this element makes rather than a change it applies. Combobox is the other way round, and that is the difference between the two: its tokens are a view of a selection it owns, drawn from options it was handed. **'value' is the text being typed, not the tokens**, which is what makes this a field a consumer can listen to. Every keystroke announces 'input' with the text on the element, so a table narrows as the reader types. The tokens need no reporting back, being markup the consumer already holds. Backspace on an empty field asks the last token to go, through the same 'helix-dismiss' its own remove control fires, so a consumer who handled the pointer has already handled the keyboard. */
8365
+ /** **The tokens are the consumer's own elements, slotted.** What a filter narrows by belongs to the consumer's model rather than to this element: a facet with a prefix, a saved query, a range. So they are slotted rather than rendered from a list of strings, and removing one is a request this element makes rather than a change it applies. Combobox is the other way round, and that is the difference between the two: its tokens are a view of a selection it owns, drawn from options it was handed. **'value' is the text being typed, not the tokens**, which is what makes this a field a consumer can listen to. Every keystroke announces 'input' with the text on the element, so a table narrows as the reader types. The tokens need no reporting back, being markup the consumer already holds. Backspace on an empty field asks the last token to go, through the same 'helix-dismiss' its own remove control fires, so a consumer who handled the pointer has already handled the keyboard. **It can suggest what to type next, and it never learns the grammar.** Slot 'helix-option' elements into 'suggestions' and the field shows them, moves through them with the arrows, and lets Enter press one; the option fires its own 'helix-select' and the consumer decides what choosing meant. Deciding *what* to suggest is theirs too: keys before a colon and values after it are the same panel with different contents, which is all a two-level filter is, and the parse that tells them apart belongs where the domain does. **The panel opens when there is something in it and closes when there is not**, rather than on a choice. A reader who picks a key wants its values next, and closing on the choice would shut the panel between two renders. Use 'selectionStart' and 'setSelectionRange' to write a completion back and put the caret after it, or the next parse reads the wrong term. */
8337
8366
  "helix-headless-filter-input": DefineCustomElement<
8338
8367
  HelixHeadlessFilterInput,
8339
8368
  HelixHeadlessFilterInputVueProps,