@retailcrm/embed-ui-v1-contexts 0.4.5 → 0.4.7

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.
Files changed (2) hide show
  1. package/dist/remote.d.ts +3 -7
  2. package/package.json +3 -3
package/dist/remote.d.ts CHANGED
@@ -1,13 +1,7 @@
1
1
  import { Context, ContextAccessor, ContextSchema, ContextSchemaMap, RejectionHandler, TypeOf, Writable } from '@retailcrm/embed-ui-v1-types/context';
2
2
  import { Endpoint } from '@remote-ui/rpc';
3
3
  import { Maybe } from '@retailcrm/embed-ui-v1-types/scaffolding';
4
- import { PiniaPluginContext, Store, StoreDefinition } from 'pinia';
5
- export type ContextStore<S extends ContextSchema> = Store<string, Context<S>, {
6
- schema(): S;
7
- }, {
8
- initialize(): Promise<void>;
9
- set<F extends keyof Writable<S>>(field: F, value: TypeOf<S[F]>): void;
10
- }>;
4
+ import { PiniaPluginContext, StoreDefinition } from 'pinia';
11
5
  declare module 'pinia' {
12
6
  interface PiniaCustomProperties {
13
7
  endpoint: Endpoint<ContextAccessor>;
@@ -20,3 +14,5 @@ export declare const defineContext: <Id extends string, S extends ContextSchema>
20
14
  initialize(): Promise<void>;
21
15
  set<F extends keyof Writable<S>>(field: F, value: TypeOf<S[F]>, onReject?: Maybe<RejectionHandler>): void;
22
16
  }>;
17
+ export type ContextStore<S extends ContextSchema> = ReturnType<ContextStoreDefinition<string, S>>;
18
+ export type ContextStoreDefinition<Id extends string, S extends ContextSchema> = ReturnType<typeof defineContext<Id, S>>;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@retailcrm/embed-ui-v1-contexts",
3
3
  "description": "Reactive contexts for RetailCRM JS API",
4
4
  "type": "module",
5
- "version": "0.4.5",
5
+ "version": "0.4.7",
6
6
  "license": "MIT",
7
7
  "author": "RetailDriverLLC <integration@retailcrm.ru>",
8
8
  "repository": "git@github.com:retailcrm/embed-ui.git",
@@ -93,10 +93,10 @@
93
93
  "pinia": "^2.2"
94
94
  },
95
95
  "dependencies": {
96
- "@retailcrm/embed-ui-v1-testing": "^0.4.5",
97
- "@retailcrm/embed-ui-v1-types": "^0.4.5"
96
+ "@retailcrm/embed-ui-v1-types": "^0.4.7"
98
97
  },
99
98
  "devDependencies": {
99
+ "@retailcrm/embed-ui-v1-testing": "^0.4.7",
100
100
  "tsx": "^4.19.2",
101
101
  "typescript": "^5.6.3",
102
102
  "vite": "^5.4.11",