@astral/mobx-query 1.18.1 → 1.18.3

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.
@@ -1,8 +1,8 @@
1
1
  import { AuxiliaryQuery } from '../AuxiliaryQuery';
2
- import type { DataStorage } from '../DataStorage';
2
+ import { type DataStorage } from '../DataStorage';
3
3
  import { QueryContainer } from '../QueryContainer';
4
4
  import { type StatusStorage } from '../StatusStorage';
5
- import type { FetchPolicy, QueryBaseActions, Sync, SyncParams } from '../types';
5
+ import { type FetchPolicy, type QueryBaseActions, type Sync, type SyncParams } from '../types';
6
6
  export declare const DEFAULT_INFINITE_ITEMS_COUNT = 30;
7
7
  export type InfiniteParams = {
8
8
  offset: number;
@@ -2,8 +2,8 @@ import { type InfiniteExecutor, InfiniteQuery, type InfiniteQueryParams } from '
2
2
  import { Mutation, type MutationExecutor, type MutationParams } from '../Mutation';
3
3
  import { Query, type QueryExecutor, type QueryParams } from '../Query';
4
4
  import { InfiniteQuerySet, type InfiniteQuerySetConfig, type InfiniteQuerySetConfigurator, MutationSet, QuerySet, type QuerySetConfig, type QuerySetConfigurator } from '../Sets';
5
- import type { CacheKey, FetchPolicy } from '../types';
6
- import type { UnknownCachedQuery } from './types';
5
+ import { type CacheKey, type FetchPolicy } from '../types';
6
+ import { type UnknownCachedQuery } from './types';
7
7
  /**
8
8
  * Стандартный обработчик ошибки запроса,
9
9
  * будет вызван, если при вызове sync не был передан отдельный onError параметр
@@ -1,6 +1,6 @@
1
1
  import { AuxiliaryQuery } from '../AuxiliaryQuery';
2
2
  import { QueryContainer } from '../QueryContainer';
3
- import type { QueryBaseActions, Sync, SyncParams } from '../types';
3
+ import { type QueryBaseActions, type Sync, type SyncParams } from '../types';
4
4
  /**
5
5
  * Исполнитель запроса
6
6
  */
package/Query/Query.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { AuxiliaryQuery } from '../AuxiliaryQuery';
2
- import type { DataStorage } from '../DataStorage';
2
+ import { type DataStorage } from '../DataStorage';
3
3
  import { QueryContainer } from '../QueryContainer';
4
4
  import { type StatusStorage } from '../StatusStorage';
5
- import type { FetchPolicy, QueryBaseActions, Sync, SyncParams } from '../types';
5
+ import { type FetchPolicy, type QueryBaseActions, type Sync, type SyncParams } from '../types';
6
6
  /**
7
7
  * Исполнитель запроса
8
8
  */
package/README.md CHANGED
@@ -437,7 +437,7 @@ await editDocMutation.async({ params: { id: 'docID', name: 'test' } });
437
437
 
438
438
  ```ts
439
439
  class DocStore {
440
- private readonly creationDocMutation: Mutation<DocsDTO.CreateDocResponse, DocsDTO.CreateDocInput>;
440
+ private readonly creationDocMutation;
441
441
 
442
442
  public constructor(
443
443
  private readonly _docsFetcher: DocsFetcher,
@@ -88,6 +88,7 @@ export declare const createDocumentMock: () => {
88
88
  (eventInterface: "CloseEvent"): CloseEvent;
89
89
  (eventInterface: "CompositionEvent"): CompositionEvent;
90
90
  (eventInterface: "ContentVisibilityAutoStateChangeEvent"): ContentVisibilityAutoStateChangeEvent;
91
+ (eventInterface: "CookieChangeEvent"): CookieChangeEvent;
91
92
  (eventInterface: "CustomEvent"): CustomEvent;
92
93
  (eventInterface: "DeviceMotionEvent"): DeviceMotionEvent;
93
94
  (eventInterface: "DeviceOrientationEvent"): DeviceOrientationEvent;
@@ -173,7 +174,7 @@ export declare const createDocumentMock: () => {
173
174
  getSelection: (() => Selection | null) & import("vitest-mock-extended").CalledWithMock<Selection | null, []>;
174
175
  hasFocus: (() => boolean) & import("vitest-mock-extended").CalledWithMock<boolean, []>;
175
176
  hasStorageAccess: (() => Promise<boolean>) & import("vitest-mock-extended").CalledWithMock<Promise<boolean>, []>;
176
- importNode: (<T extends Node>(node: T, subtree?: boolean) => T) & import("vitest-mock-extended").CalledWithMock<Node, [node: Node, subtree?: boolean | undefined]>;
177
+ importNode: (<T extends Node>(node: T, options?: boolean | ImportNodeOptions) => T) & import("vitest-mock-extended").CalledWithMock<Node, [node: Node, options?: boolean | ImportNodeOptions | undefined]>;
177
178
  open: {
178
179
  (unused1?: string, unused2?: string): Document;
179
180
  (url: string | URL, name: string, features: string): WindowProxy | null;
@@ -185,9 +186,10 @@ export declare const createDocumentMock: () => {
185
186
  queryCommandValue: ((commandId: string) => string) & import("vitest-mock-extended").CalledWithMock<string, [commandId: string]>;
186
187
  releaseEvents: (() => void) & import("vitest-mock-extended").CalledWithMock<void, []>;
187
188
  requestStorageAccess: (() => Promise<void>) & import("vitest-mock-extended").CalledWithMock<Promise<void>, []>;
188
- startViewTransition: ((callbackOptions?: ViewTransitionUpdateCallback) => ViewTransition) & import("vitest-mock-extended").CalledWithMock<ViewTransition, [callbackOptions?: ViewTransitionUpdateCallback | undefined]>;
189
+ startViewTransition: ((callbackOptions?: ViewTransitionUpdateCallback | StartViewTransitionOptions) => ViewTransition) & import("vitest-mock-extended").CalledWithMock<ViewTransition, [callbackOptions?: ViewTransitionUpdateCallback | StartViewTransitionOptions | undefined]>;
189
190
  write: ((...text: string[]) => void) & import("vitest-mock-extended").CalledWithMock<void, string[]>;
190
191
  writeln: ((...text: string[]) => void) & import("vitest-mock-extended").CalledWithMock<void, string[]>;
192
+ readonly textContent: null;
191
193
  addEventListener: {
192
194
  <K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
193
195
  (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@@ -208,7 +210,6 @@ export declare const createDocumentMock: () => {
208
210
  readonly parentElement: HTMLElement | null;
209
211
  readonly parentNode: ParentNode | null;
210
212
  readonly previousSibling: ChildNode | null;
211
- textContent: string | null;
212
213
  appendChild: (<T extends Node>(node: T) => T) & import("vitest-mock-extended").CalledWithMock<Node, [node: Node]>;
213
214
  cloneNode: ((subtree?: boolean) => Node) & import("vitest-mock-extended").CalledWithMock<Node, [subtree?: boolean | undefined]>;
214
215
  compareDocumentPosition: ((other: Node) => number) & import("vitest-mock-extended").CalledWithMock<number, [other: Node]>;
@@ -258,18 +259,19 @@ export declare const createDocumentMock: () => {
258
259
  onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
259
260
  onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
260
261
  onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
261
- onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
262
+ onauxclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
262
263
  onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
263
- onbeforetoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
264
+ onbeforematch: ((this: GlobalEventHandlers, ev: Event) => any) | null;
265
+ onbeforetoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
264
266
  onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
265
267
  oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
266
268
  oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
267
269
  oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
268
270
  onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
269
- onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
271
+ onclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
270
272
  onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
271
273
  oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
272
- oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
274
+ oncontextmenu: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
273
275
  oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
274
276
  oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
275
277
  oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
@@ -317,6 +319,7 @@ export declare const createDocumentMock: () => {
317
319
  onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
318
320
  onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
319
321
  onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
322
+ onpointerrawupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
320
323
  onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
321
324
  onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
322
325
  onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
@@ -335,7 +338,7 @@ export declare const createDocumentMock: () => {
335
338
  onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
336
339
  onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
337
340
  ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
338
- ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
341
+ ontoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
339
342
  ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined | undefined;
340
343
  ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined | undefined;
341
344
  ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined | undefined;
@@ -1,8 +1,8 @@
1
1
  import { AuxiliaryQuery } from '../AuxiliaryQuery';
2
- import type { DataStorage } from '../DataStorage';
2
+ import { type DataStorage } from '../DataStorage';
3
3
  import { QueryContainer } from '../QueryContainer';
4
4
  import { type StatusStorage } from '../StatusStorage';
5
- import type { FetchPolicy, QueryBaseActions, Sync, SyncParams } from '../types';
5
+ import { type FetchPolicy, type QueryBaseActions, type Sync, type SyncParams } from '../types';
6
6
  export declare const DEFAULT_INFINITE_ITEMS_COUNT = 30;
7
7
  export type InfiniteParams = {
8
8
  offset: number;
@@ -2,8 +2,8 @@ import { type InfiniteExecutor, InfiniteQuery, type InfiniteQueryParams } from '
2
2
  import { Mutation, type MutationExecutor, type MutationParams } from '../Mutation';
3
3
  import { Query, type QueryExecutor, type QueryParams } from '../Query';
4
4
  import { InfiniteQuerySet, type InfiniteQuerySetConfig, type InfiniteQuerySetConfigurator, MutationSet, QuerySet, type QuerySetConfig, type QuerySetConfigurator } from '../Sets';
5
- import type { CacheKey, FetchPolicy } from '../types';
6
- import type { UnknownCachedQuery } from './types';
5
+ import { type CacheKey, type FetchPolicy } from '../types';
6
+ import { type UnknownCachedQuery } from './types';
7
7
  /**
8
8
  * Стандартный обработчик ошибки запроса,
9
9
  * будет вызван, если при вызове sync не был передан отдельный onError параметр
@@ -1,6 +1,6 @@
1
1
  import { AuxiliaryQuery } from '../AuxiliaryQuery';
2
2
  import { QueryContainer } from '../QueryContainer';
3
- import type { QueryBaseActions, Sync, SyncParams } from '../types';
3
+ import { type QueryBaseActions, type Sync, type SyncParams } from '../types';
4
4
  /**
5
5
  * Исполнитель запроса
6
6
  */
@@ -1,8 +1,8 @@
1
1
  import { AuxiliaryQuery } from '../AuxiliaryQuery';
2
- import type { DataStorage } from '../DataStorage';
2
+ import { type DataStorage } from '../DataStorage';
3
3
  import { QueryContainer } from '../QueryContainer';
4
4
  import { type StatusStorage } from '../StatusStorage';
5
- import type { FetchPolicy, QueryBaseActions, Sync, SyncParams } from '../types';
5
+ import { type FetchPolicy, type QueryBaseActions, type Sync, type SyncParams } from '../types';
6
6
  /**
7
7
  * Исполнитель запроса
8
8
  */
@@ -88,6 +88,7 @@ export declare const createDocumentMock: () => {
88
88
  (eventInterface: "CloseEvent"): CloseEvent;
89
89
  (eventInterface: "CompositionEvent"): CompositionEvent;
90
90
  (eventInterface: "ContentVisibilityAutoStateChangeEvent"): ContentVisibilityAutoStateChangeEvent;
91
+ (eventInterface: "CookieChangeEvent"): CookieChangeEvent;
91
92
  (eventInterface: "CustomEvent"): CustomEvent;
92
93
  (eventInterface: "DeviceMotionEvent"): DeviceMotionEvent;
93
94
  (eventInterface: "DeviceOrientationEvent"): DeviceOrientationEvent;
@@ -173,7 +174,7 @@ export declare const createDocumentMock: () => {
173
174
  getSelection: (() => Selection | null) & import("vitest-mock-extended").CalledWithMock<Selection | null, []>;
174
175
  hasFocus: (() => boolean) & import("vitest-mock-extended").CalledWithMock<boolean, []>;
175
176
  hasStorageAccess: (() => Promise<boolean>) & import("vitest-mock-extended").CalledWithMock<Promise<boolean>, []>;
176
- importNode: (<T extends Node>(node: T, subtree?: boolean) => T) & import("vitest-mock-extended").CalledWithMock<Node, [node: Node, subtree?: boolean | undefined]>;
177
+ importNode: (<T extends Node>(node: T, options?: boolean | ImportNodeOptions) => T) & import("vitest-mock-extended").CalledWithMock<Node, [node: Node, options?: boolean | ImportNodeOptions | undefined]>;
177
178
  open: {
178
179
  (unused1?: string, unused2?: string): Document;
179
180
  (url: string | URL, name: string, features: string): WindowProxy | null;
@@ -185,9 +186,10 @@ export declare const createDocumentMock: () => {
185
186
  queryCommandValue: ((commandId: string) => string) & import("vitest-mock-extended").CalledWithMock<string, [commandId: string]>;
186
187
  releaseEvents: (() => void) & import("vitest-mock-extended").CalledWithMock<void, []>;
187
188
  requestStorageAccess: (() => Promise<void>) & import("vitest-mock-extended").CalledWithMock<Promise<void>, []>;
188
- startViewTransition: ((callbackOptions?: ViewTransitionUpdateCallback) => ViewTransition) & import("vitest-mock-extended").CalledWithMock<ViewTransition, [callbackOptions?: ViewTransitionUpdateCallback | undefined]>;
189
+ startViewTransition: ((callbackOptions?: ViewTransitionUpdateCallback | StartViewTransitionOptions) => ViewTransition) & import("vitest-mock-extended").CalledWithMock<ViewTransition, [callbackOptions?: ViewTransitionUpdateCallback | StartViewTransitionOptions | undefined]>;
189
190
  write: ((...text: string[]) => void) & import("vitest-mock-extended").CalledWithMock<void, string[]>;
190
191
  writeln: ((...text: string[]) => void) & import("vitest-mock-extended").CalledWithMock<void, string[]>;
192
+ readonly textContent: null;
191
193
  addEventListener: {
192
194
  <K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
193
195
  (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@@ -208,7 +210,6 @@ export declare const createDocumentMock: () => {
208
210
  readonly parentElement: HTMLElement | null;
209
211
  readonly parentNode: ParentNode | null;
210
212
  readonly previousSibling: ChildNode | null;
211
- textContent: string | null;
212
213
  appendChild: (<T extends Node>(node: T) => T) & import("vitest-mock-extended").CalledWithMock<Node, [node: Node]>;
213
214
  cloneNode: ((subtree?: boolean) => Node) & import("vitest-mock-extended").CalledWithMock<Node, [subtree?: boolean | undefined]>;
214
215
  compareDocumentPosition: ((other: Node) => number) & import("vitest-mock-extended").CalledWithMock<number, [other: Node]>;
@@ -258,18 +259,19 @@ export declare const createDocumentMock: () => {
258
259
  onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
259
260
  onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
260
261
  onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
261
- onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
262
+ onauxclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
262
263
  onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
263
- onbeforetoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
264
+ onbeforematch: ((this: GlobalEventHandlers, ev: Event) => any) | null;
265
+ onbeforetoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
264
266
  onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
265
267
  oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
266
268
  oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
267
269
  oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
268
270
  onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
269
- onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
271
+ onclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
270
272
  onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
271
273
  oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
272
- oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
274
+ oncontextmenu: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
273
275
  oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
274
276
  oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
275
277
  oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
@@ -317,6 +319,7 @@ export declare const createDocumentMock: () => {
317
319
  onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
318
320
  onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
319
321
  onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
322
+ onpointerrawupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
320
323
  onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
321
324
  onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
322
325
  onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
@@ -335,7 +338,7 @@ export declare const createDocumentMock: () => {
335
338
  onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
336
339
  onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
337
340
  ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
338
- ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
341
+ ontoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
339
342
  ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined | undefined;
340
343
  ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined | undefined;
341
344
  ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined | undefined;
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "peerDependencies": {
11
11
  "mobx": "^6.0.0"
12
12
  },
13
- "version": "1.18.1",
13
+ "version": "1.18.3",
14
14
  "author": "Astral.Soft",
15
15
  "license": "MIT",
16
16
  "repository": {
@@ -23,6 +23,7 @@
23
23
  "sideEffects": false,
24
24
  "exports": {
25
25
  ".": {
26
+ "node": "./node/index.js",
26
27
  "module": "./index.js",
27
28
  "require": "./node/index.js",
28
29
  "types": "./index.d.ts",