@webamoki/web-svelte 2.5.2 → 2.5.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,22 +1,20 @@
1
- import type { StandardSchemaV1 } from '@standard-schema/spec';
2
1
  import type { RemoteCommand } from '@sveltejs/kit';
3
2
  import type { CommandResult, CommandSuccess, ResponseError } from './remote.js';
4
- type RC<Schema extends StandardSchemaV1, O extends CommandSuccess> = RemoteCommand<StandardSchemaV1.InferInput<Schema>, Promise<CommandResult<O>>>;
5
- type RCInput<Schema extends StandardSchemaV1> = StandardSchemaV1.InferInput<Schema>;
3
+ type RC<S, O extends CommandSuccess> = RemoteCommand<S, Promise<CommandResult<O>>>;
6
4
  /**
7
5
  * Command Remote function handler for Client
8
6
  * - state for dynamic input
9
7
  * - execute function, which handles toast and callbacks
10
8
  * - submitting state for tracking pending executions
11
9
  */
12
- export declare class CommandAction<Schema extends StandardSchemaV1, O extends CommandSuccess> {
10
+ export declare class CommandAction<S, O extends CommandSuccess> {
13
11
  #private;
14
- input: RCInput<Schema>;
12
+ input: S;
15
13
  get submitting(): boolean;
16
- constructor(remote: RC<Schema, O>, defaultInput: RCInput<Schema>, config?: {
14
+ constructor(remote: RC<S, O>, defaultInput: S, config?: {
17
15
  onError?: (error: ResponseError) => void;
18
16
  onSuccess?: (state: {
19
- input: RCInput<Schema>;
17
+ input: S;
20
18
  result: O;
21
19
  }) => void;
22
20
  toastError?: boolean;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public",
5
5
  "provenance": true
6
6
  },
7
- "version": "2.5.2",
7
+ "version": "2.5.3",
8
8
  "license": "MIT",
9
9
  "repository": {
10
10
  "type": "git",