fontdue-js 2.12.1 → 2.13.0

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 (56) hide show
  1. package/dist/__generated__/CartOrder_viewer.graphql.d.ts +2 -2
  2. package/dist/__generated__/CartOrder_viewer.graphql.js +2 -6
  3. package/dist/__generated__/CartQuery.graphql.d.ts +1 -1
  4. package/dist/__generated__/CartQuery.graphql.js +94 -70
  5. package/dist/__generated__/CartStateRemoveDiscountMutation.graphql.d.ts +1 -1
  6. package/dist/__generated__/CartStateRemoveDiscountMutation.graphql.js +12 -3
  7. package/dist/__generated__/CartStateUpdateMutation.graphql.d.ts +1 -1
  8. package/dist/__generated__/CartStateUpdateMutation.graphql.js +12 -3
  9. package/dist/__generated__/CouponCodeInputApplyCouponMutation.graphql.d.ts +1 -1
  10. package/dist/__generated__/CouponCodeInputApplyCouponMutation.graphql.js +12 -3
  11. package/dist/__generated__/StoreModalCartQuery.graphql.d.ts +2 -2
  12. package/dist/__generated__/StoreModalCartQuery.graphql.js +94 -73
  13. package/dist/__generated__/StoreModalCheckoutQuery.graphql.d.ts +1 -1
  14. package/dist/__generated__/StoreModalCheckoutQuery.graphql.js +42 -12
  15. package/dist/__generated__/StoreModalUnifiedCheckoutCompleteOrderMutation.graphql.d.ts +1 -1
  16. package/dist/__generated__/StoreModalUnifiedCheckoutCompleteOrderMutation.graphql.js +35 -19
  17. package/dist/__generated__/StoreModalUnifiedCheckoutUpdateCustomerMutation.graphql.d.ts +1 -1
  18. package/dist/__generated__/StoreModalUnifiedCheckoutUpdateCustomerMutation.graphql.js +35 -19
  19. package/dist/__generated__/StoreModalUnifiedCheckoutUpdateOrderMutation.graphql.d.ts +1 -1
  20. package/dist/__generated__/StoreModalUnifiedCheckoutUpdateOrderMutation.graphql.js +34 -18
  21. package/dist/__generated__/StoreModalUnifiedCheckout_order.graphql.d.ts +5 -1
  22. package/dist/__generated__/StoreModalUnifiedCheckout_order.graphql.js +32 -16
  23. package/dist/__generated__/StripeProvider_viewer.graphql.d.ts +9 -3
  24. package/dist/__generated__/StripeProvider_viewer.graphql.js +41 -11
  25. package/dist/__generated__/TypeTestersIDQuery.graphql.d.ts +1 -1
  26. package/dist/__generated__/TypeTestersIDQuery.graphql.js +15 -3
  27. package/dist/__generated__/TypeTestersRefetchQuery.graphql.d.ts +1 -1
  28. package/dist/__generated__/TypeTestersRefetchQuery.graphql.js +16 -4
  29. package/dist/__generated__/TypeTestersSlugQuery.graphql.d.ts +1 -1
  30. package/dist/__generated__/TypeTestersSlugQuery.graphql.js +15 -3
  31. package/dist/__generated__/TypeTesters_collection.graphql.d.ts +3 -1
  32. package/dist/__generated__/TypeTesters_collection.graphql.js +14 -2
  33. package/dist/components/Cart/CartOrder.js +2 -4
  34. package/dist/components/Cart/CouponCodeInput.d.ts +1 -5
  35. package/dist/components/Cart/CouponCodeInput.js +15 -67
  36. package/dist/components/ConfigContext.d.ts +10 -0
  37. package/dist/components/ConfigContext.js +6 -1
  38. package/dist/components/StoreModal/StoreModalCart.js +2 -4
  39. package/dist/components/StripeProvider/index.js +20 -15
  40. package/dist/components/TypeTester/TypeTesterContext.d.ts +6 -0
  41. package/dist/components/TypeTester/TypeTesterContext.js +5 -0
  42. package/dist/components/TypeTester/TypeTesterStandalone.d.ts +1 -0
  43. package/dist/components/TypeTester/TypeTesterStandalone.js +2 -0
  44. package/dist/components/TypeTester/TypeTesterStandaloneElement.d.ts +1 -0
  45. package/dist/components/TypeTester/TypeTesterStandaloneElement.js +2 -0
  46. package/dist/components/TypeTester/TypeTesterState.d.ts +2 -0
  47. package/dist/components/TypeTester/TypeTesterState.js +7 -0
  48. package/dist/components/TypeTester/TypeTesterToolbar.js +13 -2
  49. package/dist/components/TypeTester/index.d.ts +5 -0
  50. package/dist/components/TypeTester/useTypeTesterStyler.d.ts +2 -1
  51. package/dist/components/TypeTester/useTypeTesterStyler.js +8 -1
  52. package/dist/components/TypeTesters/TypeTestersElement.js +1 -1
  53. package/dist/components/TypeTesters/index.js +3 -2
  54. package/dist/components/elements/StoreModalUnifiedCheckout.js +9 -3
  55. package/dist/fontdue.css +12 -9
  56. package/package.json +1 -1
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  /**
8
- * @generated SignedSource<<ef3b4ba4d0eae6811a136a792b0a2fbe>>
8
+ * @generated SignedSource<<4238c12cf3971ac1ea702387409f7e02>>
9
9
  * @lightSyntaxTransform
10
10
  * @nogrep
11
11
  */
@@ -30,19 +30,49 @@ const node = {
30
30
  "alias": null,
31
31
  "args": null,
32
32
  "kind": "ScalarField",
33
- "name": "uiFontUrl",
34
- "storageKey": null
35
- }, {
36
- "alias": null,
37
- "args": null,
38
- "kind": "ScalarField",
39
- "name": "uiFontName",
33
+ "name": "taxSystem",
40
34
  "storageKey": null
41
35
  }, {
42
36
  "alias": null,
43
37
  "args": null,
44
- "kind": "ScalarField",
45
- "name": "taxSystem",
38
+ "concreteType": "FontStyle",
39
+ "kind": "LinkedField",
40
+ "name": "uiFontStyle",
41
+ "plural": false,
42
+ "selections": [{
43
+ "alias": null,
44
+ "args": null,
45
+ "kind": "ScalarField",
46
+ "name": "name",
47
+ "storageKey": null
48
+ }, {
49
+ "alias": null,
50
+ "args": null,
51
+ "kind": "ScalarField",
52
+ "name": "cssFamily",
53
+ "storageKey": null
54
+ }, {
55
+ "alias": null,
56
+ "args": null,
57
+ "concreteType": "WebfontSource",
58
+ "kind": "LinkedField",
59
+ "name": "webfontSources",
60
+ "plural": true,
61
+ "selections": [{
62
+ "alias": null,
63
+ "args": null,
64
+ "kind": "ScalarField",
65
+ "name": "format",
66
+ "storageKey": null
67
+ }, {
68
+ "alias": null,
69
+ "args": null,
70
+ "kind": "ScalarField",
71
+ "name": "url",
72
+ "storageKey": null
73
+ }],
74
+ "storageKey": null
75
+ }],
46
76
  "storageKey": null
47
77
  }],
48
78
  "storageKey": null
@@ -101,6 +131,6 @@ const node = {
101
131
  "type": "Viewer",
102
132
  "abstractKey": null
103
133
  };
104
- node.hash = "f605dbdf8e21abec2830e0ce0c7bcc4a";
134
+ node.hash = "dd5fd4cdd75d727050b8d1d6f4269fa8";
105
135
  var _default = node;
106
136
  exports.default = _default;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @generated SignedSource<<ee944923898769db839c5f9202e4aab5>>
2
+ * @generated SignedSource<<f0d878bad3783039c7a23d6aac28d635>>
3
3
  * @lightSyntaxTransform
4
4
  * @nogrep
5
5
  */
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  /**
8
- * @generated SignedSource<<ee944923898769db839c5f9202e4aab5>>
8
+ * @generated SignedSource<<f0d878bad3783039c7a23d6aac28d635>>
9
9
  * @lightSyntaxTransform
10
10
  * @nogrep
11
11
  */
@@ -371,6 +371,18 @@ const node = function () {
371
371
  "kind": "ScalarField",
372
372
  "name": "lineHeight",
373
373
  "storageKey": null
374
+ }, {
375
+ "alias": null,
376
+ "args": null,
377
+ "kind": "ScalarField",
378
+ "name": "letterSpacing",
379
+ "storageKey": null
380
+ }, {
381
+ "alias": null,
382
+ "args": null,
383
+ "kind": "ScalarField",
384
+ "name": "autofit",
385
+ "storageKey": null
374
386
  }, {
375
387
  "alias": null,
376
388
  "args": null,
@@ -541,12 +553,12 @@ const node = function () {
541
553
  }]
542
554
  },
543
555
  "params": {
544
- "cacheID": "5a39e6fabe7524112fe2fe1fbd43606b",
556
+ "cacheID": "1bd04fcecc86c7434859a534427568e7",
545
557
  "id": null,
546
558
  "metadata": {},
547
559
  "name": "TypeTestersIDQuery",
548
560
  "operationKind": "query",
549
- "text": "query TypeTestersIDQuery(\n $collectionId: ID!\n $tags: [String!]\n $excludeTags: [String!]\n $selectable: Boolean!\n) {\n viewer {\n ...TypeTesters_viewer_4g9a6U\n id\n }\n collection: node(id: $collectionId) {\n __typename\n ...TypeTesters_collection_4Goyz5\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n cssFamily\n name\n}\n\nfragment PriceBarSection_node_3BtHDv on FontCollection {\n id\n name\n collectionType\n sku {\n ...SelectButton_sku_3BtHDv\n id\n priceWithLicenseOptions: price(licenseOptions: [], orderVariables: []) {\n ...Price_price\n }\n }\n totalStyles\n totalStylesPrice(licenseOptions: []) {\n ...Price_price\n }\n}\n\nfragment PriceBar_node_3BtHDv on FontCollection {\n ...PriceBarSection_node_3BtHDv\n parent {\n ...PriceBarSection_node_3BtHDv\n id\n }\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku_3BtHDv on Sku {\n id\n price(licenseOptions: [], orderVariables: []) {\n amount\n ...Price_price\n }\n}\n\nfragment SelectButton_sku_3BtHDv on Sku {\n id\n ...SKUPrice_sku_3BtHDv\n}\n\nfragment TypeTesterFeaturesButton_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n}\n\nfragment TypeTesterFeatures_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n}\n\nfragment TypeTesterFloatingToolbar_testers on TypeTester {\n id\n fontStyle {\n ...TypeTesterToolbar_fontStyle\n ...TypeTesterFeatures_fontStyle\n id\n }\n}\n\nfragment TypeTesterStyleSelectData_fontStyle on FontStyle {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n family {\n name\n id\n }\n}\n\nfragment TypeTesterStyleSelectData_viewer_4g9a6U on Viewer {\n families: fontCollections(collectionTypes: [FAMILY], first: 999) @include(if: $selectable) {\n edges {\n node {\n id\n name\n isVariableFont\n fontStyles {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n }\n }\n }\n }\n}\n\nfragment TypeTesterToolbar_fontStyle on FontStyle {\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterFeaturesButton_fontStyle\n}\n\nfragment TypeTesterVariableAxes_fontStyle on FontStyle {\n variableAxes {\n axis\n name\n minValue\n maxValue\n }\n}\n\nfragment TypeTester_fontStyle_3BtHDv on FontStyle {\n id\n ...TypeTesterFeatures_fontStyle\n ...TypeTesterStyleSelectData_fontStyle\n ...FontStyle_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterToolbar_fontStyle\n family {\n cssUrl\n id\n }\n sku {\n ...SelectButton_sku_3BtHDv\n ...SKUPrice_sku_3BtHDv\n id\n basePrice: price {\n amount\n }\n }\n}\n\nfragment TypeTester_viewer_4g9a6U on Viewer {\n ...TypeTesterStyleSelectData_viewer_4g9a6U\n}\n\nfragment TypeTesters_collection_4Goyz5 on FontCollection {\n typeTesters(first: 999, tags: $tags, excludeTags: $excludeTags) {\n edges {\n node {\n id\n content\n size\n lineHeight\n direction\n fontStyle {\n ...TypeTester_fontStyle_3BtHDv\n id\n family {\n id\n }\n }\n variableSettings {\n axis\n value\n }\n featureSettings {\n feature\n value\n }\n ...TypeTesterFloatingToolbar_testers\n }\n }\n }\n typeTesterFeatures\n typeTesterAxes\n id\n ...PriceBar_node_3BtHDv\n families: children(collectionTypes: [FAMILY]) {\n id\n ...PriceBar_node_3BtHDv\n }\n parent {\n id\n }\n}\n\nfragment TypeTesters_viewer_4g9a6U on Viewer {\n ...TypeTester_viewer_4g9a6U\n}\n\nfragment useFeaturesData_fontStyle on FontStyle {\n fontFeatures {\n supportedFeatures\n stylisticSetNames {\n featureName\n humanName\n }\n }\n}\n"
561
+ "text": "query TypeTestersIDQuery(\n $collectionId: ID!\n $tags: [String!]\n $excludeTags: [String!]\n $selectable: Boolean!\n) {\n viewer {\n ...TypeTesters_viewer_4g9a6U\n id\n }\n collection: node(id: $collectionId) {\n __typename\n ...TypeTesters_collection_4Goyz5\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n cssFamily\n name\n}\n\nfragment PriceBarSection_node_3BtHDv on FontCollection {\n id\n name\n collectionType\n sku {\n ...SelectButton_sku_3BtHDv\n id\n priceWithLicenseOptions: price(licenseOptions: [], orderVariables: []) {\n ...Price_price\n }\n }\n totalStyles\n totalStylesPrice(licenseOptions: []) {\n ...Price_price\n }\n}\n\nfragment PriceBar_node_3BtHDv on FontCollection {\n ...PriceBarSection_node_3BtHDv\n parent {\n ...PriceBarSection_node_3BtHDv\n id\n }\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku_3BtHDv on Sku {\n id\n price(licenseOptions: [], orderVariables: []) {\n amount\n ...Price_price\n }\n}\n\nfragment SelectButton_sku_3BtHDv on Sku {\n id\n ...SKUPrice_sku_3BtHDv\n}\n\nfragment TypeTesterFeaturesButton_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n}\n\nfragment TypeTesterFeatures_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n}\n\nfragment TypeTesterFloatingToolbar_testers on TypeTester {\n id\n fontStyle {\n ...TypeTesterToolbar_fontStyle\n ...TypeTesterFeatures_fontStyle\n id\n }\n}\n\nfragment TypeTesterStyleSelectData_fontStyle on FontStyle {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n family {\n name\n id\n }\n}\n\nfragment TypeTesterStyleSelectData_viewer_4g9a6U on Viewer {\n families: fontCollections(collectionTypes: [FAMILY], first: 999) @include(if: $selectable) {\n edges {\n node {\n id\n name\n isVariableFont\n fontStyles {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n }\n }\n }\n }\n}\n\nfragment TypeTesterToolbar_fontStyle on FontStyle {\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterFeaturesButton_fontStyle\n}\n\nfragment TypeTesterVariableAxes_fontStyle on FontStyle {\n variableAxes {\n axis\n name\n minValue\n maxValue\n }\n}\n\nfragment TypeTester_fontStyle_3BtHDv on FontStyle {\n id\n ...TypeTesterFeatures_fontStyle\n ...TypeTesterStyleSelectData_fontStyle\n ...FontStyle_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterToolbar_fontStyle\n family {\n cssUrl\n id\n }\n sku {\n ...SelectButton_sku_3BtHDv\n ...SKUPrice_sku_3BtHDv\n id\n basePrice: price {\n amount\n }\n }\n}\n\nfragment TypeTester_viewer_4g9a6U on Viewer {\n ...TypeTesterStyleSelectData_viewer_4g9a6U\n}\n\nfragment TypeTesters_collection_4Goyz5 on FontCollection {\n typeTesters(first: 999, tags: $tags, excludeTags: $excludeTags) {\n edges {\n node {\n id\n content\n size\n lineHeight\n letterSpacing\n autofit\n direction\n fontStyle {\n ...TypeTester_fontStyle_3BtHDv\n id\n family {\n id\n }\n }\n variableSettings {\n axis\n value\n }\n featureSettings {\n feature\n value\n }\n ...TypeTesterFloatingToolbar_testers\n }\n }\n }\n typeTesterFeatures\n typeTesterAxes\n id\n ...PriceBar_node_3BtHDv\n families: children(collectionTypes: [FAMILY]) {\n id\n ...PriceBar_node_3BtHDv\n }\n parent {\n id\n }\n}\n\nfragment TypeTesters_viewer_4g9a6U on Viewer {\n ...TypeTester_viewer_4g9a6U\n}\n\nfragment useFeaturesData_fontStyle on FontStyle {\n fontFeatures {\n supportedFeatures\n stylisticSetNames {\n featureName\n humanName\n }\n }\n}\n"
550
562
  }
551
563
  };
552
564
  }();
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @generated SignedSource<<cb0937e6f3f4e69e7b7a06528d1b6e13>>
2
+ * @generated SignedSource<<d7dfeb9b63f530f7188702c279aa090e>>
3
3
  * @lightSyntaxTransform
4
4
  * @nogrep
5
5
  */
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  /**
8
- * @generated SignedSource<<cb0937e6f3f4e69e7b7a06528d1b6e13>>
8
+ * @generated SignedSource<<d7dfeb9b63f530f7188702c279aa090e>>
9
9
  * @lightSyntaxTransform
10
10
  * @nogrep
11
11
  */
@@ -258,6 +258,18 @@ const node = function () {
258
258
  "kind": "ScalarField",
259
259
  "name": "lineHeight",
260
260
  "storageKey": null
261
+ }, {
262
+ "alias": null,
263
+ "args": null,
264
+ "kind": "ScalarField",
265
+ "name": "letterSpacing",
266
+ "storageKey": null
267
+ }, {
268
+ "alias": null,
269
+ "args": null,
270
+ "kind": "ScalarField",
271
+ "name": "autofit",
272
+ "storageKey": null
261
273
  }, {
262
274
  "alias": null,
263
275
  "args": null,
@@ -468,15 +480,15 @@ const node = function () {
468
480
  }]
469
481
  },
470
482
  "params": {
471
- "cacheID": "b3412f01ca41784fbcb457f04eb6e95f",
483
+ "cacheID": "7707201442bb1c24b64bf1714d8a385e",
472
484
  "id": null,
473
485
  "metadata": {},
474
486
  "name": "TypeTestersRefetchQuery",
475
487
  "operationKind": "query",
476
- "text": "query TypeTestersRefetchQuery(\n $excludeTags: [String!] = null\n $licenseOptions: [LicenseOptionsSpec] = []\n $orderVariables: [OrderVariableSelectionInput!] = []\n $tags: [String!] = null\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...TypeTesters_collection_32it0Z\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n cssFamily\n name\n}\n\nfragment PriceBarSection_node_4sncub on FontCollection {\n id\n name\n collectionType\n sku {\n ...SelectButton_sku_4sncub\n id\n priceWithLicenseOptions: price(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n ...Price_price\n }\n }\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions) {\n ...Price_price\n }\n}\n\nfragment PriceBar_node_4sncub on FontCollection {\n ...PriceBarSection_node_4sncub\n parent {\n ...PriceBarSection_node_4sncub\n id\n }\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku_4sncub on Sku {\n id\n price(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n ...Price_price\n }\n}\n\nfragment SelectButton_sku_4sncub on Sku {\n id\n ...SKUPrice_sku_4sncub\n}\n\nfragment TypeTesterFeaturesButton_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n}\n\nfragment TypeTesterFeatures_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n}\n\nfragment TypeTesterFloatingToolbar_testers on TypeTester {\n id\n fontStyle {\n ...TypeTesterToolbar_fontStyle\n ...TypeTesterFeatures_fontStyle\n id\n }\n}\n\nfragment TypeTesterStyleSelectData_fontStyle on FontStyle {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n family {\n name\n id\n }\n}\n\nfragment TypeTesterToolbar_fontStyle on FontStyle {\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterFeaturesButton_fontStyle\n}\n\nfragment TypeTesterVariableAxes_fontStyle on FontStyle {\n variableAxes {\n axis\n name\n minValue\n maxValue\n }\n}\n\nfragment TypeTester_fontStyle_4sncub on FontStyle {\n id\n ...TypeTesterFeatures_fontStyle\n ...TypeTesterStyleSelectData_fontStyle\n ...FontStyle_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterToolbar_fontStyle\n family {\n cssUrl\n id\n }\n sku {\n ...SelectButton_sku_4sncub\n ...SKUPrice_sku_4sncub\n id\n basePrice: price {\n amount\n }\n }\n}\n\nfragment TypeTesters_collection_32it0Z on FontCollection {\n typeTesters(first: 999, tags: $tags, excludeTags: $excludeTags) {\n edges {\n node {\n id\n content\n size\n lineHeight\n direction\n fontStyle {\n ...TypeTester_fontStyle_4sncub\n id\n family {\n id\n }\n }\n variableSettings {\n axis\n value\n }\n featureSettings {\n feature\n value\n }\n ...TypeTesterFloatingToolbar_testers\n }\n }\n }\n typeTesterFeatures\n typeTesterAxes\n id\n ...PriceBar_node_4sncub\n families: children(collectionTypes: [FAMILY]) {\n id\n ...PriceBar_node_4sncub\n }\n parent {\n id\n }\n}\n\nfragment useFeaturesData_fontStyle on FontStyle {\n fontFeatures {\n supportedFeatures\n stylisticSetNames {\n featureName\n humanName\n }\n }\n}\n"
488
+ "text": "query TypeTestersRefetchQuery(\n $excludeTags: [String!] = null\n $licenseOptions: [LicenseOptionsSpec] = []\n $orderVariables: [OrderVariableSelectionInput!] = []\n $tags: [String!] = null\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...TypeTesters_collection_32it0Z\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n cssFamily\n name\n}\n\nfragment PriceBarSection_node_4sncub on FontCollection {\n id\n name\n collectionType\n sku {\n ...SelectButton_sku_4sncub\n id\n priceWithLicenseOptions: price(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n ...Price_price\n }\n }\n totalStyles\n totalStylesPrice(licenseOptions: $licenseOptions) {\n ...Price_price\n }\n}\n\nfragment PriceBar_node_4sncub on FontCollection {\n ...PriceBarSection_node_4sncub\n parent {\n ...PriceBarSection_node_4sncub\n id\n }\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku_4sncub on Sku {\n id\n price(licenseOptions: $licenseOptions, orderVariables: $orderVariables) {\n amount\n ...Price_price\n }\n}\n\nfragment SelectButton_sku_4sncub on Sku {\n id\n ...SKUPrice_sku_4sncub\n}\n\nfragment TypeTesterFeaturesButton_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n}\n\nfragment TypeTesterFeatures_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n}\n\nfragment TypeTesterFloatingToolbar_testers on TypeTester {\n id\n fontStyle {\n ...TypeTesterToolbar_fontStyle\n ...TypeTesterFeatures_fontStyle\n id\n }\n}\n\nfragment TypeTesterStyleSelectData_fontStyle on FontStyle {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n family {\n name\n id\n }\n}\n\nfragment TypeTesterToolbar_fontStyle on FontStyle {\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterFeaturesButton_fontStyle\n}\n\nfragment TypeTesterVariableAxes_fontStyle on FontStyle {\n variableAxes {\n axis\n name\n minValue\n maxValue\n }\n}\n\nfragment TypeTester_fontStyle_4sncub on FontStyle {\n id\n ...TypeTesterFeatures_fontStyle\n ...TypeTesterStyleSelectData_fontStyle\n ...FontStyle_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterToolbar_fontStyle\n family {\n cssUrl\n id\n }\n sku {\n ...SelectButton_sku_4sncub\n ...SKUPrice_sku_4sncub\n id\n basePrice: price {\n amount\n }\n }\n}\n\nfragment TypeTesters_collection_32it0Z on FontCollection {\n typeTesters(first: 999, tags: $tags, excludeTags: $excludeTags) {\n edges {\n node {\n id\n content\n size\n lineHeight\n letterSpacing\n autofit\n direction\n fontStyle {\n ...TypeTester_fontStyle_4sncub\n id\n family {\n id\n }\n }\n variableSettings {\n axis\n value\n }\n featureSettings {\n feature\n value\n }\n ...TypeTesterFloatingToolbar_testers\n }\n }\n }\n typeTesterFeatures\n typeTesterAxes\n id\n ...PriceBar_node_4sncub\n families: children(collectionTypes: [FAMILY]) {\n id\n ...PriceBar_node_4sncub\n }\n parent {\n id\n }\n}\n\nfragment useFeaturesData_fontStyle on FontStyle {\n fontFeatures {\n supportedFeatures\n stylisticSetNames {\n featureName\n humanName\n }\n }\n}\n"
477
489
  }
478
490
  };
479
491
  }();
480
- node.hash = "4304ae7b554a9365ab05ba8b984c1bea";
492
+ node.hash = "6f88c9b86f2c60ecc35f1be282b3ee50";
481
493
  var _default = node;
482
494
  exports.default = _default;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @generated SignedSource<<6607556190fa9bd2bc755b2ca724be3f>>
2
+ * @generated SignedSource<<e592966b3436eb5abe53b64294ed9796>>
3
3
  * @lightSyntaxTransform
4
4
  * @nogrep
5
5
  */
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  /**
8
- * @generated SignedSource<<6607556190fa9bd2bc755b2ca724be3f>>
8
+ * @generated SignedSource<<e592966b3436eb5abe53b64294ed9796>>
9
9
  * @lightSyntaxTransform
10
10
  * @nogrep
11
11
  */
@@ -377,6 +377,18 @@ const node = function () {
377
377
  "kind": "ScalarField",
378
378
  "name": "lineHeight",
379
379
  "storageKey": null
380
+ }, {
381
+ "alias": null,
382
+ "args": null,
383
+ "kind": "ScalarField",
384
+ "name": "letterSpacing",
385
+ "storageKey": null
386
+ }, {
387
+ "alias": null,
388
+ "args": null,
389
+ "kind": "ScalarField",
390
+ "name": "autofit",
391
+ "storageKey": null
380
392
  }, {
381
393
  "alias": null,
382
394
  "args": null,
@@ -548,12 +560,12 @@ const node = function () {
548
560
  }]
549
561
  },
550
562
  "params": {
551
- "cacheID": "fb98d46ced357d68f30f4297935c3b50",
563
+ "cacheID": "6642607e781f3a02be23b132955cb71d",
552
564
  "id": null,
553
565
  "metadata": {},
554
566
  "name": "TypeTestersSlugQuery",
555
567
  "operationKind": "query",
556
- "text": "query TypeTestersSlugQuery(\n $collectionSlug: String!\n $tags: [String!]\n $excludeTags: [String!]\n $selectable: Boolean!\n) {\n viewer {\n ...TypeTesters_viewer_4g9a6U\n slug(name: $collectionSlug) {\n collection: fontCollection {\n ...TypeTesters_collection_4Goyz5\n id\n }\n id\n }\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n cssFamily\n name\n}\n\nfragment PriceBarSection_node_3BtHDv on FontCollection {\n id\n name\n collectionType\n sku {\n ...SelectButton_sku_3BtHDv\n id\n priceWithLicenseOptions: price(licenseOptions: [], orderVariables: []) {\n ...Price_price\n }\n }\n totalStyles\n totalStylesPrice(licenseOptions: []) {\n ...Price_price\n }\n}\n\nfragment PriceBar_node_3BtHDv on FontCollection {\n ...PriceBarSection_node_3BtHDv\n parent {\n ...PriceBarSection_node_3BtHDv\n id\n }\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku_3BtHDv on Sku {\n id\n price(licenseOptions: [], orderVariables: []) {\n amount\n ...Price_price\n }\n}\n\nfragment SelectButton_sku_3BtHDv on Sku {\n id\n ...SKUPrice_sku_3BtHDv\n}\n\nfragment TypeTesterFeaturesButton_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n}\n\nfragment TypeTesterFeatures_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n}\n\nfragment TypeTesterFloatingToolbar_testers on TypeTester {\n id\n fontStyle {\n ...TypeTesterToolbar_fontStyle\n ...TypeTesterFeatures_fontStyle\n id\n }\n}\n\nfragment TypeTesterStyleSelectData_fontStyle on FontStyle {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n family {\n name\n id\n }\n}\n\nfragment TypeTesterStyleSelectData_viewer_4g9a6U on Viewer {\n families: fontCollections(collectionTypes: [FAMILY], first: 999) @include(if: $selectable) {\n edges {\n node {\n id\n name\n isVariableFont\n fontStyles {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n }\n }\n }\n }\n}\n\nfragment TypeTesterToolbar_fontStyle on FontStyle {\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterFeaturesButton_fontStyle\n}\n\nfragment TypeTesterVariableAxes_fontStyle on FontStyle {\n variableAxes {\n axis\n name\n minValue\n maxValue\n }\n}\n\nfragment TypeTester_fontStyle_3BtHDv on FontStyle {\n id\n ...TypeTesterFeatures_fontStyle\n ...TypeTesterStyleSelectData_fontStyle\n ...FontStyle_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterToolbar_fontStyle\n family {\n cssUrl\n id\n }\n sku {\n ...SelectButton_sku_3BtHDv\n ...SKUPrice_sku_3BtHDv\n id\n basePrice: price {\n amount\n }\n }\n}\n\nfragment TypeTester_viewer_4g9a6U on Viewer {\n ...TypeTesterStyleSelectData_viewer_4g9a6U\n}\n\nfragment TypeTesters_collection_4Goyz5 on FontCollection {\n typeTesters(first: 999, tags: $tags, excludeTags: $excludeTags) {\n edges {\n node {\n id\n content\n size\n lineHeight\n direction\n fontStyle {\n ...TypeTester_fontStyle_3BtHDv\n id\n family {\n id\n }\n }\n variableSettings {\n axis\n value\n }\n featureSettings {\n feature\n value\n }\n ...TypeTesterFloatingToolbar_testers\n }\n }\n }\n typeTesterFeatures\n typeTesterAxes\n id\n ...PriceBar_node_3BtHDv\n families: children(collectionTypes: [FAMILY]) {\n id\n ...PriceBar_node_3BtHDv\n }\n parent {\n id\n }\n}\n\nfragment TypeTesters_viewer_4g9a6U on Viewer {\n ...TypeTester_viewer_4g9a6U\n}\n\nfragment useFeaturesData_fontStyle on FontStyle {\n fontFeatures {\n supportedFeatures\n stylisticSetNames {\n featureName\n humanName\n }\n }\n}\n"
568
+ "text": "query TypeTestersSlugQuery(\n $collectionSlug: String!\n $tags: [String!]\n $excludeTags: [String!]\n $selectable: Boolean!\n) {\n viewer {\n ...TypeTesters_viewer_4g9a6U\n slug(name: $collectionSlug) {\n collection: fontCollection {\n ...TypeTesters_collection_4Goyz5\n id\n }\n id\n }\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n cssFamily\n name\n}\n\nfragment PriceBarSection_node_3BtHDv on FontCollection {\n id\n name\n collectionType\n sku {\n ...SelectButton_sku_3BtHDv\n id\n priceWithLicenseOptions: price(licenseOptions: [], orderVariables: []) {\n ...Price_price\n }\n }\n totalStyles\n totalStylesPrice(licenseOptions: []) {\n ...Price_price\n }\n}\n\nfragment PriceBar_node_3BtHDv on FontCollection {\n ...PriceBarSection_node_3BtHDv\n parent {\n ...PriceBarSection_node_3BtHDv\n id\n }\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku_3BtHDv on Sku {\n id\n price(licenseOptions: [], orderVariables: []) {\n amount\n ...Price_price\n }\n}\n\nfragment SelectButton_sku_3BtHDv on Sku {\n id\n ...SKUPrice_sku_3BtHDv\n}\n\nfragment TypeTesterFeaturesButton_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n}\n\nfragment TypeTesterFeatures_fontStyle on FontStyle {\n ...useFeaturesData_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n}\n\nfragment TypeTesterFloatingToolbar_testers on TypeTester {\n id\n fontStyle {\n ...TypeTesterToolbar_fontStyle\n ...TypeTesterFeatures_fontStyle\n id\n }\n}\n\nfragment TypeTesterStyleSelectData_fontStyle on FontStyle {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n family {\n name\n id\n }\n}\n\nfragment TypeTesterStyleSelectData_viewer_4g9a6U on Viewer {\n families: fontCollections(collectionTypes: [FAMILY], first: 999) @include(if: $selectable) {\n edges {\n node {\n id\n name\n isVariableFont\n fontStyles {\n id\n name\n cssWeight\n cssStyle\n cssStretch\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n }\n }\n }\n }\n}\n\nfragment TypeTesterToolbar_fontStyle on FontStyle {\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterFeaturesButton_fontStyle\n}\n\nfragment TypeTesterVariableAxes_fontStyle on FontStyle {\n variableAxes {\n axis\n name\n minValue\n maxValue\n }\n}\n\nfragment TypeTester_fontStyle_3BtHDv on FontStyle {\n id\n ...TypeTesterFeatures_fontStyle\n ...TypeTesterStyleSelectData_fontStyle\n ...FontStyle_fontStyle\n ...TypeTesterVariableAxes_fontStyle\n ...TypeTesterToolbar_fontStyle\n family {\n cssUrl\n id\n }\n sku {\n ...SelectButton_sku_3BtHDv\n ...SKUPrice_sku_3BtHDv\n id\n basePrice: price {\n amount\n }\n }\n}\n\nfragment TypeTester_viewer_4g9a6U on Viewer {\n ...TypeTesterStyleSelectData_viewer_4g9a6U\n}\n\nfragment TypeTesters_collection_4Goyz5 on FontCollection {\n typeTesters(first: 999, tags: $tags, excludeTags: $excludeTags) {\n edges {\n node {\n id\n content\n size\n lineHeight\n letterSpacing\n autofit\n direction\n fontStyle {\n ...TypeTester_fontStyle_3BtHDv\n id\n family {\n id\n }\n }\n variableSettings {\n axis\n value\n }\n featureSettings {\n feature\n value\n }\n ...TypeTesterFloatingToolbar_testers\n }\n }\n }\n typeTesterFeatures\n typeTesterAxes\n id\n ...PriceBar_node_3BtHDv\n families: children(collectionTypes: [FAMILY]) {\n id\n ...PriceBar_node_3BtHDv\n }\n parent {\n id\n }\n}\n\nfragment TypeTesters_viewer_4g9a6U on Viewer {\n ...TypeTester_viewer_4g9a6U\n}\n\nfragment useFeaturesData_fontStyle on FontStyle {\n fontFeatures {\n supportedFeatures\n stylisticSetNames {\n featureName\n humanName\n }\n }\n}\n"
557
569
  }
558
570
  };
559
571
  }();
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @generated SignedSource<<4ae11831133e999bbbea55d5203c2e41>>
2
+ * @generated SignedSource<<842ed9fbeaf4b40cce7e057fedf65418>>
3
3
  * @lightSyntaxTransform
4
4
  * @nogrep
5
5
  */
@@ -19,6 +19,7 @@ export type TypeTesters_collection$data = {
19
19
  readonly typeTesters: {
20
20
  readonly edges: ReadonlyArray<{
21
21
  readonly node: {
22
+ readonly autofit: boolean | null;
22
23
  readonly content: string | null;
23
24
  readonly direction: string | null;
24
25
  readonly featureSettings: ReadonlyArray<{
@@ -33,6 +34,7 @@ export type TypeTesters_collection$data = {
33
34
  readonly " $fragmentSpreads": FragmentRefs<"TypeTester_fontStyle">;
34
35
  } | null;
35
36
  readonly id: string;
37
+ readonly letterSpacing: string | null;
36
38
  readonly lineHeight: string | null;
37
39
  readonly size: string | null;
38
40
  readonly variableSettings: ReadonlyArray<{
@@ -7,7 +7,7 @@ exports.default = void 0;
7
7
  var _TypeTestersRefetchQuery = _interopRequireDefault(require("./TypeTestersRefetchQuery.graphql"));
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
9
  /**
10
- * @generated SignedSource<<4ae11831133e999bbbea55d5203c2e41>>
10
+ * @generated SignedSource<<842ed9fbeaf4b40cce7e057fedf65418>>
11
11
  * @lightSyntaxTransform
12
12
  * @nogrep
13
13
  */
@@ -128,6 +128,18 @@ const node = function () {
128
128
  "kind": "ScalarField",
129
129
  "name": "lineHeight",
130
130
  "storageKey": null
131
+ }, {
132
+ "alias": null,
133
+ "args": null,
134
+ "kind": "ScalarField",
135
+ "name": "letterSpacing",
136
+ "storageKey": null
137
+ }, {
138
+ "alias": null,
139
+ "args": null,
140
+ "kind": "ScalarField",
141
+ "name": "autofit",
142
+ "storageKey": null
131
143
  }, {
132
144
  "alias": null,
133
145
  "args": null,
@@ -235,6 +247,6 @@ const node = function () {
235
247
  "abstractKey": null
236
248
  };
237
249
  }();
238
- node.hash = "4304ae7b554a9365ab05ba8b984c1bea";
250
+ node.hash = "6f88c9b86f2c60ecc35f1be282b3ee50";
239
251
  var _default = node;
240
252
  exports.default = _default;
@@ -55,7 +55,7 @@ const CartOrder = _ref => {
55
55
  const stripe = (0, _reactStripeJs.useStripe)();
56
56
  const dispatch = (0, _reactRedux.useDispatch)();
57
57
  const order = (0, _reactRelay.useFragment)((_CartOrder_order2.default.hash && _CartOrder_order2.default.hash !== "25ef000c40000c4f76f973ac6ac7f593" && console.error("The definition of 'CartOrder_order' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _CartOrder_order2.default), orderKey);
58
- const viewer = (0, _reactRelay.useFragment)((_CartOrder_viewer2.default.hash && _CartOrder_viewer2.default.hash !== "13e1fb5c61670fcdf4add0214ea88ea5" && console.error("The definition of 'CartOrder_viewer' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _CartOrder_viewer2.default), viewerKey);
58
+ const viewer = (0, _reactRelay.useFragment)((_CartOrder_viewer2.default.hash && _CartOrder_viewer2.default.hash !== "8cf5ab5a33a474483a6c231cc44b0df1" && console.error("The definition of 'CartOrder_viewer' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _CartOrder_viewer2.default), viewerKey);
59
59
 
60
60
  // errors is from the payload, typically user errors,
61
61
  // whereas 'error' refers to schema/network/catastrophic errors
@@ -275,9 +275,7 @@ const CartOrder = _ref => {
275
275
  className: "cart__additions"
276
276
  }, !order.discount && /*#__PURE__*/_react.default.createElement("div", {
277
277
  className: "cart__coupon-input"
278
- }, /*#__PURE__*/_react.default.createElement(_CouponCodeInput.default, {
279
- viewer: viewer
280
- }))), reviewing ? /*#__PURE__*/_react.default.createElement("div", {
278
+ }, /*#__PURE__*/_react.default.createElement(_CouponCodeInput.default, null))), reviewing ? /*#__PURE__*/_react.default.createElement("div", {
281
279
  className: "cart__checkout-button"
282
280
  }, /*#__PURE__*/_react.default.createElement("button", {
283
281
  className: "submit-button",
@@ -1,7 +1,3 @@
1
1
  import React from 'react';
2
- import { CouponCodeInput_viewer$key } from '__generated__/CouponCodeInput_viewer.graphql';
3
- interface CouponCodeInput_props {
4
- viewer: CouponCodeInput_viewer$key;
5
- }
6
- declare const CouponCodeInput: ({ viewer: viewerKey }: CouponCodeInput_props) => React.JSX.Element;
2
+ declare function CouponCodeInput(): React.JSX.Element;
7
3
  export default CouponCodeInput;
@@ -4,64 +4,21 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _CouponCodeInput_viewer2 = _interopRequireDefault(require("../../__generated__/CouponCodeInput_viewer.graphql"));
8
7
  var _CouponCodeInputApplyCouponMutation2 = _interopRequireDefault(require("../../__generated__/CouponCodeInputApplyCouponMutation.graphql"));
9
8
  var _react = _interopRequireWildcard(require("react"));
10
9
  var _reactRelay = require("react-relay");
11
10
  var _Icons = require("../Icons");
12
- var _CouponText = _interopRequireDefault(require("../CouponText"));
13
- var _CouponCodeRefetchQuery = _interopRequireDefault(require("../../__generated__/CouponCodeRefetchQuery.graphql"));
14
11
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
15
12
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
- function useDebounce(value, delay) {
18
- const [debouncedValue, setDebouncedValue] = (0, _react.useState)(value);
19
- (0, _react.useEffect)(() => {
20
- const handler = setTimeout(() => {
21
- setDebouncedValue(value);
22
- }, delay);
23
- return () => {
24
- clearTimeout(handler);
25
- };
26
- }, [value, delay]);
27
- return debouncedValue;
28
- }
29
14
  const applyCouponMutation = (_CouponCodeInputApplyCouponMutation2.default.hash && _CouponCodeInputApplyCouponMutation2.default.hash !== "c53b64e200d60a461b3f47f15578e34e" && console.error("The definition of 'CouponCodeInputApplyCouponMutation' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _CouponCodeInputApplyCouponMutation2.default);
30
- const CouponCodeInput = _ref => {
31
- var _viewer$coupon, _viewer$coupon2, _viewer$coupon3, _viewer$coupon4;
32
- let {
33
- viewer: viewerKey
34
- } = _ref;
15
+ function CouponCodeInput() {
35
16
  const environment = (0, _reactRelay.useRelayEnvironment)();
36
- const [viewer, refetch] = (0, _reactRelay.useRefetchableFragment)((_CouponCodeInput_viewer2.default.hash && _CouponCodeInput_viewer2.default.hash !== "06207af721d062f5fb4c32dc2a260e74" && console.error("The definition of 'CouponCodeInput_viewer' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _CouponCodeInput_viewer2.default), viewerKey);
37
17
  const [submitting, setSubmitting] = (0, _react.useState)(false);
38
18
  const [expanded, setExpanded] = (0, _react.useState)(false);
39
19
  const [value, setValue] = (0, _react.useState)('');
40
- const [suppressError, setSuppressError] = (0, _react.useState)(false);
20
+ const [error, setError] = (0, _react.useState)(null);
41
21
  const inputRef = (0, _react.useRef)(null);
42
- const debouncedValue = useDebounce(value, 300);
43
- (0, _react.useEffect)(() => {
44
- if (debouncedValue === '') return;
45
- const subscription = (0, _reactRelay.fetchQuery)(environment, _CouponCodeRefetchQuery.default, {
46
- code: debouncedValue,
47
- includeCoupon: true
48
- }).subscribe({
49
- complete: () => {
50
- setSuppressError(false);
51
- refetch({
52
- code: debouncedValue,
53
- includeCoupon: true
54
- }, {
55
- fetchPolicy: 'store-only'
56
- });
57
- }
58
- });
59
- return () => subscription.unsubscribe();
60
- }, [debouncedValue]);
61
- const isError = !suppressError && ((_viewer$coupon = viewer.coupon) === null || _viewer$coupon === void 0 ? void 0 : _viewer$coupon.__typename) === 'Error';
62
-
63
- // server will always return an error if the coupon is invalid
64
- const isValid = (viewer === null || viewer === void 0 ? void 0 : (_viewer$coupon2 = viewer.coupon) === null || _viewer$coupon2 === void 0 ? void 0 : _viewer$coupon2.__typename) === 'Coupon';
65
22
  const applyCoupon = () => {
66
23
  if (submitting) return;
67
24
  setSubmitting(true);
@@ -73,8 +30,9 @@ const CouponCodeInput = _ref => {
73
30
  }
74
31
  },
75
32
  onCompleted: (_result, errors) => {
33
+ setSubmitting(false);
76
34
  if (errors !== null && errors !== void 0 && errors[0]) {
77
- console.error(errors === null || errors === void 0 ? void 0 : errors[0]);
35
+ setError(errors === null || errors === void 0 ? void 0 : errors[0].message);
78
36
  }
79
37
  }
80
38
  });
@@ -83,18 +41,14 @@ const CouponCodeInput = _ref => {
83
41
  e.preventDefault();
84
42
  applyCoupon();
85
43
  };
86
- const handleBlur = () => {
87
- if (isValid) applyCoupon();
88
- };
89
44
  const handleIconClick = () => {
90
- if (isError) {
45
+ if (error) {
46
+ var _inputRef$current;
91
47
  setValue('');
92
- setSuppressError(true);
48
+ setError(null);
49
+ (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
93
50
  }
94
51
  };
95
- let status = 'idle';
96
- if (isValid) status = 'valid';
97
- if (isError) status = 'error';
98
52
  if (!expanded) {
99
53
  return /*#__PURE__*/_react.default.createElement("div", {
100
54
  className: "cart-additions"
@@ -106,7 +60,7 @@ const CouponCodeInput = _ref => {
106
60
  }
107
61
  return /*#__PURE__*/_react.default.createElement("div", {
108
62
  className: "cart-additions",
109
- "data-status": status
63
+ "data-status": error ? 'error' : 'idle'
110
64
  }, /*#__PURE__*/_react.default.createElement("form", {
111
65
  onSubmit: handleSubmit,
112
66
  className: "cart-additions__form"
@@ -118,26 +72,20 @@ const CouponCodeInput = _ref => {
118
72
  value: value,
119
73
  onChange: e => {
120
74
  setValue(e.target.value);
121
- setSuppressError(true);
75
+ setError(null);
122
76
  },
123
- onBlur: handleBlur,
124
77
  placeholder: "Enter code",
125
78
  size: 21,
126
79
  className: "cart-additions__field"
127
80
  }), /*#__PURE__*/_react.default.createElement("div", {
128
81
  className: "cart-additions__state-icon",
129
82
  onClick: handleIconClick
130
- }, isValid ? /*#__PURE__*/_react.default.createElement(_Icons.Check, null) : isError ? /*#__PURE__*/_react.default.createElement(_Icons.X, null) : null)), /*#__PURE__*/_react.default.createElement("button", {
83
+ }, error ? /*#__PURE__*/_react.default.createElement(_Icons.X, null) : null)), /*#__PURE__*/_react.default.createElement("button", {
131
84
  type: "submit",
132
- className: "cart-additions__button",
133
- disabled: !isValid
134
- }, "Apply")), isError && ((_viewer$coupon3 = viewer.coupon) === null || _viewer$coupon3 === void 0 ? void 0 : _viewer$coupon3.__typename) === 'Error' && /*#__PURE__*/_react.default.createElement("p", {
85
+ className: "cart-additions__button"
86
+ }, "Apply")), error && /*#__PURE__*/_react.default.createElement("p", {
135
87
  className: "cart-additions__error"
136
- }, viewer.coupon.message), ((_viewer$coupon4 = viewer.coupon) === null || _viewer$coupon4 === void 0 ? void 0 : _viewer$coupon4.__typename) === 'Coupon' && /*#__PURE__*/_react.default.createElement("p", {
137
- className: "cart-additions__valid-text"
138
- }, /*#__PURE__*/_react.default.createElement(_CouponText.default, {
139
- coupon: viewer.coupon
140
- })));
141
- };
88
+ }, error));
89
+ }
142
90
  var _default = CouponCodeInput;
143
91
  exports.default = _default;
@@ -50,6 +50,11 @@ export declare const makeConfig: (config?: Config) => {
50
50
  min: number;
51
51
  max: number;
52
52
  } | undefined;
53
+ letterSpacing: {
54
+ label: string | false;
55
+ min: number;
56
+ max: number;
57
+ } | undefined;
53
58
  };
54
59
  form: {
55
60
  checkboxStyle: "check" | "cross";
@@ -101,6 +106,11 @@ declare const _default: React.Context<{
101
106
  min: number;
102
107
  max: number;
103
108
  } | undefined;
109
+ letterSpacing: {
110
+ label: string | false;
111
+ min: number;
112
+ max: number;
113
+ } | undefined;
104
114
  };
105
115
  form: {
106
116
  checkboxStyle: "check" | "cross";
@@ -7,7 +7,7 @@ exports.makeConfig = exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
9
  const makeTypeTesterConfig = config => {
10
- var _config$openTypeFeatu, _config$openTypeFeatu2, _config$openTypeFeatu3, _config$openTypeFeatu4, _config$size, _config$size2, _config$size3, _config$lineHeight, _config$lineHeight2, _config$lineHeight3;
10
+ var _config$openTypeFeatu, _config$openTypeFeatu2, _config$openTypeFeatu3, _config$openTypeFeatu4, _config$size, _config$size2, _config$size3, _config$lineHeight, _config$lineHeight2, _config$lineHeight3, _config$letterSpacing, _config$letterSpacing2, _config$letterSpacing3;
11
11
  let shy = (config === null || config === void 0 ? void 0 : config.shy) ?? false;
12
12
  if (shy === true) shy = 'hover';
13
13
  let toolsPosition = (config === null || config === void 0 ? void 0 : config.toolsPosition) ?? 'inline';
@@ -45,6 +45,11 @@ const makeTypeTesterConfig = config => {
45
45
  label: (config === null || config === void 0 ? void 0 : (_config$lineHeight = config.lineHeight) === null || _config$lineHeight === void 0 ? void 0 : _config$lineHeight.label) ?? 'Line height',
46
46
  min: (config === null || config === void 0 ? void 0 : (_config$lineHeight2 = config.lineHeight) === null || _config$lineHeight2 === void 0 ? void 0 : _config$lineHeight2.min) ?? 0.7,
47
47
  max: (config === null || config === void 0 ? void 0 : (_config$lineHeight3 = config.lineHeight) === null || _config$lineHeight3 === void 0 ? void 0 : _config$lineHeight3.max) ?? 2
48
+ } : undefined,
49
+ letterSpacing: config !== null && config !== void 0 && config.letterSpacing ? {
50
+ label: (config === null || config === void 0 ? void 0 : (_config$letterSpacing = config.letterSpacing) === null || _config$letterSpacing === void 0 ? void 0 : _config$letterSpacing.label) ?? 'Letter spacing',
51
+ min: (config === null || config === void 0 ? void 0 : (_config$letterSpacing2 = config.letterSpacing) === null || _config$letterSpacing2 === void 0 ? void 0 : _config$letterSpacing2.min) ?? -0.05,
52
+ max: (config === null || config === void 0 ? void 0 : (_config$letterSpacing3 = config.letterSpacing) === null || _config$letterSpacing3 === void 0 ? void 0 : _config$letterSpacing3.max) ?? 0.2
48
53
  } : undefined
49
54
  };
50
55
  };
@@ -26,7 +26,7 @@ const StoreModalCart = _ref => {
26
26
  let {
27
27
  prepared
28
28
  } = _ref;
29
- const data = (0, _reactRelay.usePreloadedQuery)((_StoreModalCartQuery2.default.hash && _StoreModalCartQuery2.default.hash !== "93e2e176a9d9e14f49d28bbc0a239928" && console.error("The definition of 'StoreModalCartQuery' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _StoreModalCartQuery2.default), prepared.cartQuery);
29
+ const data = (0, _reactRelay.usePreloadedQuery)((_StoreModalCartQuery2.default.hash && _StoreModalCartQuery2.default.hash !== "a52c45ea8135e2cdae562683dcbfefdf" && console.error("The definition of 'StoreModalCartQuery' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _StoreModalCartQuery2.default), prepared.cartQuery);
30
30
  const order = data.viewer.currentOrder;
31
31
  const orderHasItems = ((order === null || order === void 0 ? void 0 : (_order$orderItems = order.orderItems) === null || _order$orderItems === void 0 ? void 0 : _order$orderItems.length) ?? 0) > 0;
32
32
  const checkoutEnabled = (0, _utils.textVariablesAllHaveText)(order);
@@ -57,9 +57,7 @@ const StoreModalCart = _ref => {
57
57
  errors: errors === null || errors === void 0 ? void 0 : (_errors$orderItems = errors.orderItems) === null || _errors$orderItems === void 0 ? void 0 : _errors$orderItems[i]
58
58
  });
59
59
  }),
60
- couponCodeInput: !(order && order.discount) && /*#__PURE__*/_react.default.createElement(_CouponCodeInput.default, {
61
- viewer: data.viewer
62
- }),
60
+ couponCodeInput: !(order && order.discount) && /*#__PURE__*/_react.default.createElement(_CouponCodeInput.default, null),
63
61
  totals: /*#__PURE__*/_react.default.createElement(_CartTotals.default, {
64
62
  order: order,
65
63
  onRemoveDiscount: onRemoveDiscount,