@weaverse/hydrogen 3.1.10 → 3.1.12
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.mts +34 -3
- package/dist/index.d.ts +34 -3
- package/dist/index.js +32 -1
- package/dist/index.mjs +32 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -71,9 +71,11 @@ interface AllCacheOptions {
|
|
|
71
71
|
sMaxAge?: number;
|
|
72
72
|
staleIfError?: number;
|
|
73
73
|
}
|
|
74
|
-
type ComponentLoaderArgs<T = any> = {
|
|
74
|
+
type ComponentLoaderArgs<T = any, E = HydrogenThemeEnv> = {
|
|
75
75
|
data: T;
|
|
76
|
-
weaverse: WeaverseClient
|
|
76
|
+
weaverse: Omit<WeaverseClient, 'env'> & {
|
|
77
|
+
env: E;
|
|
78
|
+
};
|
|
77
79
|
};
|
|
78
80
|
interface RouteLoaderArgs extends LoaderFunctionArgs {
|
|
79
81
|
context: AppLoadContext & {
|
|
@@ -178,7 +180,7 @@ interface WeaverseHydrogenParams extends Omit<WeaverseCoreParams, 'ItemConstruct
|
|
|
178
180
|
internal: Partial<WeaverseInternal>;
|
|
179
181
|
requestInfo: WeaverseLoaderRequestInfo;
|
|
180
182
|
}
|
|
181
|
-
type HydrogenComponentLoaderFunction = (args: ComponentLoaderArgs) => Promise<unknown>;
|
|
183
|
+
type HydrogenComponentLoaderFunction<T = any, E = HydrogenThemeEnv> = (args: ComponentLoaderArgs<T, E>) => Promise<unknown>;
|
|
182
184
|
interface HydrogenComponent<T extends HydrogenComponentProps = any> {
|
|
183
185
|
default: ForwardRefExoticComponent<T>;
|
|
184
186
|
schema: HydrogenComponentSchema;
|
|
@@ -351,6 +353,35 @@ declare let IMAGES_PLACEHOLDERS: {
|
|
|
351
353
|
product_2: string;
|
|
352
354
|
product_3: string;
|
|
353
355
|
product_4: string;
|
|
356
|
+
gs_logo_white: string;
|
|
357
|
+
gs_logo_black: string;
|
|
358
|
+
gs_image: string;
|
|
359
|
+
gs_banner_1: string;
|
|
360
|
+
gs_banner_2: string;
|
|
361
|
+
gs_collection_1: string;
|
|
362
|
+
gs_collection_2: string;
|
|
363
|
+
gs_collection_3: string;
|
|
364
|
+
gs_collection_4: string;
|
|
365
|
+
gs_collection_5: string;
|
|
366
|
+
gs_collection_6: string;
|
|
367
|
+
gs_product_1: string;
|
|
368
|
+
gs_product_2: string;
|
|
369
|
+
gs_product_3: string;
|
|
370
|
+
gs_product_4: string;
|
|
371
|
+
gs_product_5: string;
|
|
372
|
+
gs_product_6: string;
|
|
373
|
+
gs_product_7: string;
|
|
374
|
+
gs_product_8: string;
|
|
375
|
+
gs_product_9: string;
|
|
376
|
+
gs_product_10: string;
|
|
377
|
+
gs_product_11: string;
|
|
378
|
+
gs_product_12: string;
|
|
379
|
+
gs_product_13: string;
|
|
380
|
+
gs_product_14: string;
|
|
381
|
+
gs_product_15: string;
|
|
382
|
+
gs_product_16: string;
|
|
383
|
+
gs_product_17: string;
|
|
384
|
+
gs_product_18: string;
|
|
354
385
|
};
|
|
355
386
|
|
|
356
387
|
declare class WeaverseHydrogen extends Weaverse {
|
package/dist/index.d.ts
CHANGED
|
@@ -71,9 +71,11 @@ interface AllCacheOptions {
|
|
|
71
71
|
sMaxAge?: number;
|
|
72
72
|
staleIfError?: number;
|
|
73
73
|
}
|
|
74
|
-
type ComponentLoaderArgs<T = any> = {
|
|
74
|
+
type ComponentLoaderArgs<T = any, E = HydrogenThemeEnv> = {
|
|
75
75
|
data: T;
|
|
76
|
-
weaverse: WeaverseClient
|
|
76
|
+
weaverse: Omit<WeaverseClient, 'env'> & {
|
|
77
|
+
env: E;
|
|
78
|
+
};
|
|
77
79
|
};
|
|
78
80
|
interface RouteLoaderArgs extends LoaderFunctionArgs {
|
|
79
81
|
context: AppLoadContext & {
|
|
@@ -178,7 +180,7 @@ interface WeaverseHydrogenParams extends Omit<WeaverseCoreParams, 'ItemConstruct
|
|
|
178
180
|
internal: Partial<WeaverseInternal>;
|
|
179
181
|
requestInfo: WeaverseLoaderRequestInfo;
|
|
180
182
|
}
|
|
181
|
-
type HydrogenComponentLoaderFunction = (args: ComponentLoaderArgs) => Promise<unknown>;
|
|
183
|
+
type HydrogenComponentLoaderFunction<T = any, E = HydrogenThemeEnv> = (args: ComponentLoaderArgs<T, E>) => Promise<unknown>;
|
|
182
184
|
interface HydrogenComponent<T extends HydrogenComponentProps = any> {
|
|
183
185
|
default: ForwardRefExoticComponent<T>;
|
|
184
186
|
schema: HydrogenComponentSchema;
|
|
@@ -351,6 +353,35 @@ declare let IMAGES_PLACEHOLDERS: {
|
|
|
351
353
|
product_2: string;
|
|
352
354
|
product_3: string;
|
|
353
355
|
product_4: string;
|
|
356
|
+
gs_logo_white: string;
|
|
357
|
+
gs_logo_black: string;
|
|
358
|
+
gs_image: string;
|
|
359
|
+
gs_banner_1: string;
|
|
360
|
+
gs_banner_2: string;
|
|
361
|
+
gs_collection_1: string;
|
|
362
|
+
gs_collection_2: string;
|
|
363
|
+
gs_collection_3: string;
|
|
364
|
+
gs_collection_4: string;
|
|
365
|
+
gs_collection_5: string;
|
|
366
|
+
gs_collection_6: string;
|
|
367
|
+
gs_product_1: string;
|
|
368
|
+
gs_product_2: string;
|
|
369
|
+
gs_product_3: string;
|
|
370
|
+
gs_product_4: string;
|
|
371
|
+
gs_product_5: string;
|
|
372
|
+
gs_product_6: string;
|
|
373
|
+
gs_product_7: string;
|
|
374
|
+
gs_product_8: string;
|
|
375
|
+
gs_product_9: string;
|
|
376
|
+
gs_product_10: string;
|
|
377
|
+
gs_product_11: string;
|
|
378
|
+
gs_product_12: string;
|
|
379
|
+
gs_product_13: string;
|
|
380
|
+
gs_product_14: string;
|
|
381
|
+
gs_product_15: string;
|
|
382
|
+
gs_product_16: string;
|
|
383
|
+
gs_product_17: string;
|
|
384
|
+
gs_product_18: string;
|
|
354
385
|
};
|
|
355
386
|
|
|
356
387
|
declare class WeaverseHydrogen extends Weaverse {
|
package/dist/index.js
CHANGED
|
@@ -574,6 +574,7 @@ function getSelectedProductOptions(request) {
|
|
|
574
574
|
|
|
575
575
|
// src/placeholders.ts
|
|
576
576
|
var IMAGES_PLACEHOLDERS = {
|
|
577
|
+
// Colored placeholders
|
|
577
578
|
image: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/h2-placeholder-image.svg",
|
|
578
579
|
banner: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/h2-placeholder-banner.svg",
|
|
579
580
|
backgroundImage: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/h2-placeholder-bg.svg",
|
|
@@ -586,7 +587,37 @@ var IMAGES_PLACEHOLDERS = {
|
|
|
586
587
|
product_1: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/h2-placeholder-tshirt-1.svg",
|
|
587
588
|
product_2: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/h2-placeholder-tshirt-2.svg",
|
|
588
589
|
product_3: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/h2-placeholder-tshirt-3.svg",
|
|
589
|
-
product_4: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/h2-placeholder-tshirt-4.svg"
|
|
590
|
+
product_4: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/h2-placeholder-tshirt-4.svg",
|
|
591
|
+
// Greyscale placeholders
|
|
592
|
+
gs_logo_white: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-logo-w-600x200.svg",
|
|
593
|
+
gs_logo_black: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-logo-k-600x200.svg",
|
|
594
|
+
gs_image: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-image-1024x1024.svg",
|
|
595
|
+
gs_banner_1: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-lifestyle-1-1800x900.svg",
|
|
596
|
+
gs_banner_2: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-lifestyle-2-1800x900.svg",
|
|
597
|
+
gs_collection_1: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-hats-1024x1024.svg",
|
|
598
|
+
gs_collection_2: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-shoes-1024x1024.svg",
|
|
599
|
+
gs_collection_3: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-glasses-1024x1024.svg",
|
|
600
|
+
gs_collection_4: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-lamps-1024x1024.svg",
|
|
601
|
+
gs_collection_5: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-bags-1024x1024.svg",
|
|
602
|
+
gs_collection_6: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-watches-1024x1024.svg",
|
|
603
|
+
gs_product_1: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-watch-3-1024x1024.svg",
|
|
604
|
+
gs_product_2: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-bag-2-1024x1024.svg",
|
|
605
|
+
gs_product_3: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-shoe-1-1024x1024.svg",
|
|
606
|
+
gs_product_4: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-lamp-2-1024x1024.svg",
|
|
607
|
+
gs_product_5: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-glasses-1-1024x1024.svg",
|
|
608
|
+
gs_product_6: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-lamp-1-1024x1024.svg",
|
|
609
|
+
gs_product_7: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-glasses-2-1024x1024.svg",
|
|
610
|
+
gs_product_8: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-hat-3-1024x1024.svg",
|
|
611
|
+
gs_product_9: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-bag-1-1024x1024.svg",
|
|
612
|
+
gs_product_10: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-shoe-2-1024x1024.svg",
|
|
613
|
+
gs_product_11: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-hat-2-1024x1024.svg",
|
|
614
|
+
gs_product_12: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-glasses-3-1024x1024.svg",
|
|
615
|
+
gs_product_13: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-shoe-3-1024x1024.svg",
|
|
616
|
+
gs_product_14: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-bag-3-1024x1024.svg",
|
|
617
|
+
gs_product_15: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-hat-1-1024x1024.svg",
|
|
618
|
+
gs_product_16: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-lamp-3-1024x1024.svg",
|
|
619
|
+
gs_product_17: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-watch-1-1024x1024.svg",
|
|
620
|
+
gs_product_18: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-watch-2-1024x1024.svg"
|
|
590
621
|
};
|
|
591
622
|
|
|
592
623
|
// src/index.ts
|
package/dist/index.mjs
CHANGED
|
@@ -544,6 +544,7 @@ function getSelectedProductOptions(request) {
|
|
|
544
544
|
|
|
545
545
|
// src/placeholders.ts
|
|
546
546
|
var IMAGES_PLACEHOLDERS = {
|
|
547
|
+
// Colored placeholders
|
|
547
548
|
image: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/h2-placeholder-image.svg",
|
|
548
549
|
banner: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/h2-placeholder-banner.svg",
|
|
549
550
|
backgroundImage: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/h2-placeholder-bg.svg",
|
|
@@ -556,7 +557,37 @@ var IMAGES_PLACEHOLDERS = {
|
|
|
556
557
|
product_1: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/h2-placeholder-tshirt-1.svg",
|
|
557
558
|
product_2: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/h2-placeholder-tshirt-2.svg",
|
|
558
559
|
product_3: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/h2-placeholder-tshirt-3.svg",
|
|
559
|
-
product_4: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/h2-placeholder-tshirt-4.svg"
|
|
560
|
+
product_4: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/h2-placeholder-tshirt-4.svg",
|
|
561
|
+
// Greyscale placeholders
|
|
562
|
+
gs_logo_white: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-logo-w-600x200.svg",
|
|
563
|
+
gs_logo_black: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-logo-k-600x200.svg",
|
|
564
|
+
gs_image: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-image-1024x1024.svg",
|
|
565
|
+
gs_banner_1: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-lifestyle-1-1800x900.svg",
|
|
566
|
+
gs_banner_2: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-lifestyle-2-1800x900.svg",
|
|
567
|
+
gs_collection_1: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-hats-1024x1024.svg",
|
|
568
|
+
gs_collection_2: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-shoes-1024x1024.svg",
|
|
569
|
+
gs_collection_3: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-glasses-1024x1024.svg",
|
|
570
|
+
gs_collection_4: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-lamps-1024x1024.svg",
|
|
571
|
+
gs_collection_5: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-bags-1024x1024.svg",
|
|
572
|
+
gs_collection_6: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-collection-watches-1024x1024.svg",
|
|
573
|
+
gs_product_1: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-watch-3-1024x1024.svg",
|
|
574
|
+
gs_product_2: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-bag-2-1024x1024.svg",
|
|
575
|
+
gs_product_3: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-shoe-1-1024x1024.svg",
|
|
576
|
+
gs_product_4: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-lamp-2-1024x1024.svg",
|
|
577
|
+
gs_product_5: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-glasses-1-1024x1024.svg",
|
|
578
|
+
gs_product_6: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-lamp-1-1024x1024.svg",
|
|
579
|
+
gs_product_7: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-glasses-2-1024x1024.svg",
|
|
580
|
+
gs_product_8: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-hat-3-1024x1024.svg",
|
|
581
|
+
gs_product_9: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-bag-1-1024x1024.svg",
|
|
582
|
+
gs_product_10: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-shoe-2-1024x1024.svg",
|
|
583
|
+
gs_product_11: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-hat-2-1024x1024.svg",
|
|
584
|
+
gs_product_12: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-glasses-3-1024x1024.svg",
|
|
585
|
+
gs_product_13: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-shoe-3-1024x1024.svg",
|
|
586
|
+
gs_product_14: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-bag-3-1024x1024.svg",
|
|
587
|
+
gs_product_15: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-hat-1-1024x1024.svg",
|
|
588
|
+
gs_product_16: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-lamp-3-1024x1024.svg",
|
|
589
|
+
gs_product_17: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-watch-1-1024x1024.svg",
|
|
590
|
+
gs_product_18: "https://cdn.shopify.com/s/files/1/0838/0052/3057/files/fpo-product-watch-2-1024x1024.svg"
|
|
560
591
|
};
|
|
561
592
|
|
|
562
593
|
// src/index.ts
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@weaverse/hydrogen",
|
|
3
3
|
"author": "Weaverse Team",
|
|
4
4
|
"description": "Components, hooks, and utilities for building Shopify Hydrogen websites with Weaverse",
|
|
5
|
-
"version": "3.1.
|
|
5
|
+
"version": "3.1.12",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"typings": "dist/index.d.ts",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"singleQuote": true
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@weaverse/react": "3.1.
|
|
36
|
+
"@weaverse/react": "3.1.12",
|
|
37
37
|
"react-error-boundary": "^4.0.13"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|