@moonbase.sh/vue 0.1.82 → 0.1.84

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/dist/index.d.cts CHANGED
@@ -1,11 +1,13 @@
1
1
  import * as _moonbase_sh_storefront_api from '@moonbase.sh/storefront-api';
2
- import { Storefront, Order, User, MoonbaseClient, StorefrontBundle, StorefrontProduct, Activation, PricingVariation, LineItem } from '@moonbase.sh/storefront-api';
2
+ import { MoonbaseConfiguration, Storefront, Order, User, MoonbaseClient, StorefrontBundle, StorefrontProduct, Activation, PricingVariation, LineItem } from '@moonbase.sh/storefront-api';
3
3
  export * from '@moonbase.sh/storefront-api';
4
4
  import * as vue from 'vue';
5
- import { Plugin, Ref, App, InjectionKey } from 'vue';
5
+ import { Plugin, Ref, App, UnwrapRef, InjectionKey } from 'vue';
6
6
  import { Address } from '@moonbase.sh/storefront-api/src';
7
7
 
8
8
  interface StorefrontContext extends Pick<Plugin, keyof Plugin> {
9
+ configuration: MoonbaseConfiguration;
10
+ stateFactory: StateFactory;
9
11
  storefront: Ref<Storefront>;
10
12
  loadedStorefront: Ref<boolean>;
11
13
  currentOrder: Ref<Order>;
@@ -23,7 +25,7 @@ interface StorefrontContext extends Pick<Plugin, keyof Plugin> {
23
25
  */
24
26
  install(app: App): any;
25
27
  }
26
- type StateFactory = (key: string, state: any) => Ref<typeof state>;
28
+ type StateFactory = <T>(key: string, state: T) => Ref<T> | Ref<UnwrapRef<T>>;
27
29
 
28
30
  declare function useBundle(bundleId: string): Ref<StorefrontBundle | null>;
29
31
 
@@ -145,6 +147,14 @@ declare function useVoucher(): {
145
147
  tagline: string;
146
148
  iconUrl: string | null;
147
149
  owned: boolean;
150
+ currentVersion?: string | undefined;
151
+ downloads?: {
152
+ path: string | null;
153
+ name: string;
154
+ key: string;
155
+ platform: _moonbase_sh_storefront_api.Platform;
156
+ size: number;
157
+ }[] | undefined;
148
158
  defaultVariation?: {
149
159
  id: string;
150
160
  name: string;
@@ -202,6 +212,14 @@ declare function useVoucher(): {
202
212
  tagline: string;
203
213
  iconUrl: string | null;
204
214
  owned: boolean;
215
+ currentVersion?: string | undefined;
216
+ downloads?: {
217
+ path: string | null;
218
+ name: string;
219
+ key: string;
220
+ platform: _moonbase_sh_storefront_api.Platform;
221
+ size: number;
222
+ }[] | undefined;
205
223
  defaultVariation?: {
206
224
  id: string;
207
225
  name: string;
@@ -299,6 +317,14 @@ declare function useVoucher(): {
299
317
  tagline: string;
300
318
  iconUrl: string | null;
301
319
  owned: boolean;
320
+ currentVersion?: string | undefined;
321
+ downloads?: {
322
+ path: string | null;
323
+ name: string;
324
+ key: string;
325
+ platform: _moonbase_sh_storefront_api.Platform;
326
+ size: number;
327
+ }[] | undefined;
302
328
  defaultVariation?: {
303
329
  id: string;
304
330
  name: string;
@@ -356,6 +382,14 @@ declare function useVoucher(): {
356
382
  tagline: string;
357
383
  iconUrl: string | null;
358
384
  owned: boolean;
385
+ currentVersion?: string | undefined;
386
+ downloads?: {
387
+ path: string | null;
388
+ name: string;
389
+ key: string;
390
+ platform: _moonbase_sh_storefront_api.Platform;
391
+ size: number;
392
+ }[] | undefined;
359
393
  defaultVariation?: {
360
394
  id: string;
361
395
  name: string;
@@ -475,6 +509,14 @@ declare function useCart(): {
475
509
  tagline: string;
476
510
  iconUrl: string | null;
477
511
  owned: boolean;
512
+ currentVersion?: string | undefined;
513
+ downloads?: {
514
+ path: string | null;
515
+ name: string;
516
+ key: string;
517
+ platform: _moonbase_sh_storefront_api.Platform;
518
+ size: number;
519
+ }[] | undefined;
478
520
  defaultVariation?: {
479
521
  id: string;
480
522
  name: string;
@@ -569,6 +611,14 @@ declare function useCart(): {
569
611
  tagline: string;
570
612
  iconUrl: string | null;
571
613
  owned: boolean;
614
+ currentVersion?: string | undefined;
615
+ downloads?: {
616
+ path: string | null;
617
+ name: string;
618
+ key: string;
619
+ platform: _moonbase_sh_storefront_api.Platform;
620
+ size: number;
621
+ }[] | undefined;
572
622
  defaultVariation?: {
573
623
  id: string;
574
624
  name: string;
package/dist/index.d.ts CHANGED
@@ -1,11 +1,13 @@
1
1
  import * as _moonbase_sh_storefront_api from '@moonbase.sh/storefront-api';
2
- import { Storefront, Order, User, MoonbaseClient, StorefrontBundle, StorefrontProduct, Activation, PricingVariation, LineItem } from '@moonbase.sh/storefront-api';
2
+ import { MoonbaseConfiguration, Storefront, Order, User, MoonbaseClient, StorefrontBundle, StorefrontProduct, Activation, PricingVariation, LineItem } from '@moonbase.sh/storefront-api';
3
3
  export * from '@moonbase.sh/storefront-api';
4
4
  import * as vue from 'vue';
5
- import { Plugin, Ref, App, InjectionKey } from 'vue';
5
+ import { Plugin, Ref, App, UnwrapRef, InjectionKey } from 'vue';
6
6
  import { Address } from '@moonbase.sh/storefront-api/src';
7
7
 
8
8
  interface StorefrontContext extends Pick<Plugin, keyof Plugin> {
9
+ configuration: MoonbaseConfiguration;
10
+ stateFactory: StateFactory;
9
11
  storefront: Ref<Storefront>;
10
12
  loadedStorefront: Ref<boolean>;
11
13
  currentOrder: Ref<Order>;
@@ -23,7 +25,7 @@ interface StorefrontContext extends Pick<Plugin, keyof Plugin> {
23
25
  */
24
26
  install(app: App): any;
25
27
  }
26
- type StateFactory = (key: string, state: any) => Ref<typeof state>;
28
+ type StateFactory = <T>(key: string, state: T) => Ref<T> | Ref<UnwrapRef<T>>;
27
29
 
28
30
  declare function useBundle(bundleId: string): Ref<StorefrontBundle | null>;
29
31
 
@@ -145,6 +147,14 @@ declare function useVoucher(): {
145
147
  tagline: string;
146
148
  iconUrl: string | null;
147
149
  owned: boolean;
150
+ currentVersion?: string | undefined;
151
+ downloads?: {
152
+ path: string | null;
153
+ name: string;
154
+ key: string;
155
+ platform: _moonbase_sh_storefront_api.Platform;
156
+ size: number;
157
+ }[] | undefined;
148
158
  defaultVariation?: {
149
159
  id: string;
150
160
  name: string;
@@ -202,6 +212,14 @@ declare function useVoucher(): {
202
212
  tagline: string;
203
213
  iconUrl: string | null;
204
214
  owned: boolean;
215
+ currentVersion?: string | undefined;
216
+ downloads?: {
217
+ path: string | null;
218
+ name: string;
219
+ key: string;
220
+ platform: _moonbase_sh_storefront_api.Platform;
221
+ size: number;
222
+ }[] | undefined;
205
223
  defaultVariation?: {
206
224
  id: string;
207
225
  name: string;
@@ -299,6 +317,14 @@ declare function useVoucher(): {
299
317
  tagline: string;
300
318
  iconUrl: string | null;
301
319
  owned: boolean;
320
+ currentVersion?: string | undefined;
321
+ downloads?: {
322
+ path: string | null;
323
+ name: string;
324
+ key: string;
325
+ platform: _moonbase_sh_storefront_api.Platform;
326
+ size: number;
327
+ }[] | undefined;
302
328
  defaultVariation?: {
303
329
  id: string;
304
330
  name: string;
@@ -356,6 +382,14 @@ declare function useVoucher(): {
356
382
  tagline: string;
357
383
  iconUrl: string | null;
358
384
  owned: boolean;
385
+ currentVersion?: string | undefined;
386
+ downloads?: {
387
+ path: string | null;
388
+ name: string;
389
+ key: string;
390
+ platform: _moonbase_sh_storefront_api.Platform;
391
+ size: number;
392
+ }[] | undefined;
359
393
  defaultVariation?: {
360
394
  id: string;
361
395
  name: string;
@@ -475,6 +509,14 @@ declare function useCart(): {
475
509
  tagline: string;
476
510
  iconUrl: string | null;
477
511
  owned: boolean;
512
+ currentVersion?: string | undefined;
513
+ downloads?: {
514
+ path: string | null;
515
+ name: string;
516
+ key: string;
517
+ platform: _moonbase_sh_storefront_api.Platform;
518
+ size: number;
519
+ }[] | undefined;
478
520
  defaultVariation?: {
479
521
  id: string;
480
522
  name: string;
@@ -569,6 +611,14 @@ declare function useCart(): {
569
611
  tagline: string;
570
612
  iconUrl: string | null;
571
613
  owned: boolean;
614
+ currentVersion?: string | undefined;
615
+ downloads?: {
616
+ path: string | null;
617
+ name: string;
618
+ key: string;
619
+ platform: _moonbase_sh_storefront_api.Platform;
620
+ size: number;
621
+ }[] | undefined;
572
622
  defaultVariation?: {
573
623
  id: string;
574
624
  name: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@moonbase.sh/vue",
3
3
  "type": "module",
4
- "version": "0.1.82",
4
+ "version": "0.1.84",
5
5
  "description": "Package to let you build vue.js storefronts with Moonbase.sh as payment and delivery provider",
6
6
  "author": "Tobias Lønnerød Madsen <m@dsen.tv>",
7
7
  "license": "MIT",
@@ -18,7 +18,7 @@
18
18
  "dependencies": {
19
19
  "@vue/devtools-api": "^6.5.1",
20
20
  "uuid": "^9.0.1",
21
- "@moonbase.sh/storefront-api": "0.1.82"
21
+ "@moonbase.sh/storefront-api": "0.1.84"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/uuid": "^9.0.7",