mobx-view-model-devtools 0.0.43 → 0.0.45

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/index.d.ts CHANGED
@@ -58,11 +58,14 @@ declare class PropertyListItem extends ListItem<any> {
58
58
  isEditMode: boolean;
59
59
  get isExpanded(): boolean;
60
60
  get isExpandable(): boolean;
61
- get data(): any;
61
+ get data(): unknown;
62
62
  get descriptor(): PropertyDescriptor | null | undefined;
63
- get dataType(): "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
63
+ get dataType(): string;
64
64
  get stringifiedDataType(): string;
65
- get type(): "array" | "instance" | "function" | "object" | "primitive";
65
+ get instanceClassName(): string;
66
+ get isInaccessibleDisplay(): boolean;
67
+ get inaccessibleDisplayLabel(): string;
68
+ get type(): "primitive" | "array" | "function" | "instance" | "object";
66
69
  get children(): PropertyListItem[];
67
70
  get extraContent(): "," | null;
68
71
  private get propertyClosingTag();
@@ -97,10 +100,15 @@ interface SearchEngineConfig {
97
100
  getRootItems: () => ListItem<any>[];
98
101
  getPresentationMode: () => 'tree' | 'list';
99
102
  }
103
+ interface OwnerInfo {
104
+ type: 'vm' | 'extras' | 'unknown';
105
+ name: string;
106
+ key: string;
107
+ }
100
108
  interface SearchSuggestion {
101
109
  value: string;
102
110
  suffix: string;
103
- vmName: string;
111
+ owner: OwnerInfo;
104
112
  }
105
113
  declare class SearchEngine {
106
114
  private config;
@@ -110,6 +118,8 @@ declare class SearchEngine {
110
118
  selectedSuggestionIndex: number;
111
119
  isSearchInputFocused: boolean;
112
120
  isSuggestionsDismissed: boolean;
121
+ selectedPathOwnerKey: string | null;
122
+ selectedPathSegment: string | null;
113
123
  searchCacheKey: string;
114
124
  isSearching: boolean;
115
125
  private searchTextToSearchTimeout;
@@ -128,6 +138,8 @@ declare class SearchEngine {
128
138
  get isSearchTextDebouncing(): boolean;
129
139
  get shouldShowSuggestions(): boolean;
130
140
  get suggestionItems(): SearchSuggestion[];
141
+ private getActiveSearchText;
142
+ private buildSuggestionItemsForText;
131
143
  get selectedSuggestion(): SearchSuggestion | null;
132
144
  /**
133
145
  * Суффикс выбранного свойства, которое начинается с последнего сегмента.
@@ -135,11 +147,25 @@ declare class SearchEngine {
135
147
  * Например: ввод "_pay" → suggestionSuffix = "load" (от "_payload")
136
148
  */
137
149
  get suggestionSuffix(): string;
138
- applySuggestion: (suggestion: SearchSuggestion) => void;
150
+ selectSuggestionAtIndex: (index: number) => void;
151
+ applySuggestion: (suggestion: SearchSuggestion, options?: {
152
+ commitOwner?: boolean;
153
+ dismissSuggestions?: boolean;
154
+ }) => void;
155
+ applySuggestionFromClick: (suggestion: SearchSuggestion, index: number) => void;
139
156
  handleSearchInput: (e: ChangeEvent<HTMLInputElement>) => void;
140
157
  handleSearchInputFocus: (_e: FocusEvent<HTMLInputElement>) => void;
141
158
  handleSearchInputBlur: (_e: FocusEvent<HTMLInputElement>) => void;
142
159
  handleKeyDown: (e: KeyboardEvent<HTMLInputElement>) => void;
160
+ private commitSuggestionOwner;
161
+ private handlePathOwnerSelectionFromInput;
162
+ /**
163
+ * При вводе точки debounce ещё не применил searchTextToSearch,
164
+ * поэтому owner берём из подсказок предыдущего сегмента.
165
+ * Если пользователь явно не выбирал — берём exact-match `service`, иначе первый в списке.
166
+ */
167
+ private getFirstPathSegment;
168
+ private resolvePathOwnerSuggestion;
143
169
  private clearSearchDebounce;
144
170
  private scheduleSearchTextDebounce;
145
171
  private scheduleScrollToFirstSearchMatch;
@@ -157,13 +183,15 @@ declare class SearchEngine {
157
183
  private getOwnerMatchedPathCandidates;
158
184
  private getPropertyPathCandidates;
159
185
  private getDirectPropertyChildren;
186
+ private isOwnerAllowedForFirstPathSegment;
187
+ private isPathOwnerLockedToAnotherOwner;
160
188
  /**
161
189
  * Уже введённый path-сегмент должен совпадать строго:
162
190
  * `product.` заходит только в `product`, а не в `productAsyncTasks`
163
191
  * или `serviceAndProductSearch`.
164
192
  */
165
193
  private getPathMatchingProps;
166
- private getOwnerVMName;
194
+ private getOwnerInfo;
167
195
  /**
168
196
  * Навигация вглубь по цепочке свойств.
169
197
  * Возвращает свойства на нужной глубине.